@wzh-/ai-chat-example 1.0.2 → 1.0.4

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 (1008) hide show
  1. package/dist/css/index.css +2 -0
  2. package/dist/js/_basePickBy.js +135 -0
  3. package/dist/js/_baseUniq.js +573 -0
  4. package/dist/js/angular-html.js +14 -0
  5. package/dist/js/angular-html2.js +5 -0
  6. package/dist/js/angular-ts.js +19 -0
  7. package/dist/js/apl.js +15 -0
  8. package/dist/js/arc.js +78 -0
  9. package/dist/js/architecture-U656AL7Q.js +8 -0
  10. package/dist/js/architectureDiagram-VXUJARFQ.js +4053 -0
  11. package/dist/js/astro.js +16 -0
  12. package/dist/js/bash.js +2 -0
  13. package/dist/js/blade.js +19 -0
  14. package/dist/js/blockDiagram-VD42YOAC.js +3013 -0
  15. package/dist/js/bsl.js +3 -0
  16. package/dist/js/c.js +2 -0
  17. package/dist/js/c4Diagram-YG6GDRKO.js +2955 -0
  18. package/dist/js/cairo.js +3 -0
  19. package/dist/js/channel.js +3 -0
  20. package/dist/js/chunk-4BX2VUAB.js +6 -0
  21. package/dist/js/chunk-55IACEB6.js +6 -0
  22. package/dist/js/chunk-76Q3JFCE.js +19 -0
  23. package/dist/js/chunk-ABZYJK2D.js +2515 -0
  24. package/dist/js/chunk-ATLVNIR6.js +65 -0
  25. package/dist/js/chunk-B4BG7PRW.js +3108 -0
  26. package/dist/js/chunk-CVBHYZKI.js +10 -0
  27. package/dist/js/chunk-DI55MBZ5.js +1994 -0
  28. package/dist/js/chunk-EXTU4WIE.js +7 -0
  29. package/dist/js/chunk-FMBD7UC4.js +3 -0
  30. package/dist/js/chunk-FPAJGGOC.js +12252 -0
  31. package/dist/js/chunk-FWNWRKHM.js +56 -0
  32. package/dist/js/chunk-HN2XXSSU.js +74 -0
  33. package/dist/js/chunk-JA3XYJ7Z.js +463 -0
  34. package/dist/js/chunk-JZLCHNYA.js +4861 -0
  35. package/dist/js/chunk-LBM3YZW2.js +19 -0
  36. package/dist/js/chunk-LHMN2FUI.js +19 -0
  37. package/dist/js/chunk-MI3HLSF2.js +1140 -0
  38. package/dist/js/chunk-N4CR4FBY.js +39 -0
  39. package/dist/js/chunk-O7ZBX7Z2.js +26 -0
  40. package/dist/js/chunk-QN33PNHL.js +23 -0
  41. package/dist/js/chunk-QXUST7PY.js +486 -0
  42. package/dist/js/chunk-QZHKN3VN.js +11 -0
  43. package/dist/js/chunk-S3R3BYOJ.js +1074 -0
  44. package/dist/js/chunk-S6J4BHB3.js +19 -0
  45. package/dist/js/chunk-T53DSG4Q.js +24 -0
  46. package/dist/js/chunk-TZMSLE5B.js +55 -0
  47. package/dist/js/classDiagram-2ON5EDUG.js +33 -0
  48. package/dist/js/classDiagram-v2-WZHVMYZB.js +33 -0
  49. package/dist/js/clone.js +7 -0
  50. package/dist/js/cmake.js +2 -0
  51. package/dist/js/cobol.js +10 -0
  52. package/dist/js/coffee.js +3 -0
  53. package/dist/js/cose-bilkent-S5V4N54A.js +2250 -0
  54. package/dist/js/cpp.js +16 -0
  55. package/dist/js/cpp2.js +6 -0
  56. package/dist/js/crystal.js +16 -0
  57. package/dist/js/csharp.js +2 -0
  58. package/dist/js/css.js +2 -0
  59. package/dist/js/csv.js +2 -0
  60. package/dist/js/dagre-6UL2VRFP.js +298 -0
  61. package/dist/js/dagre.js +1395 -0
  62. package/dist/js/diagram-PSM6KHXK.js +497 -0
  63. package/dist/js/diagram-QEK2KX5R.js +226 -0
  64. package/dist/js/diagram-S2PKOQOG.js +144 -0
  65. package/dist/js/diff.js +2 -0
  66. package/dist/js/dist.js +49 -0
  67. package/dist/js/edge.js +12 -0
  68. package/dist/js/elixir.js +5 -0
  69. package/dist/js/elm.js +4 -0
  70. package/dist/js/erDiagram-Q2GNP2WA.js +1603 -0
  71. package/dist/js/erb.js +25 -0
  72. package/dist/js/erlang.js +3 -0
  73. package/dist/js/flowDiagram-NV44I4VS.js +4132 -0
  74. package/dist/js/fortran-fixed-form.js +3 -0
  75. package/dist/js/fortran-free-form.js +2 -0
  76. package/dist/js/fsharp.js +3 -0
  77. package/dist/js/ganttDiagram-JELNMOA3.js +3009 -0
  78. package/dist/js/gdresource.js +8 -0
  79. package/dist/js/gdscript.js +2 -0
  80. package/dist/js/gdshader.js +2 -0
  81. package/dist/js/git-commit.js +3 -0
  82. package/dist/js/git-rebase.js +3 -0
  83. package/dist/js/gitGraph-F6HP7TQM.js +8 -0
  84. package/dist/js/gitGraphDiagram-NY62KEGX.js +634 -0
  85. package/dist/js/github-dark.js +2 -0
  86. package/dist/js/github-light.js +2 -0
  87. package/dist/js/glimmer-js.js +12 -0
  88. package/dist/js/glimmer-ts.js +12 -0
  89. package/dist/js/glsl.js +3 -0
  90. package/dist/js/glsl2.js +3 -0
  91. package/dist/js/go.js +2 -0
  92. package/dist/js/graphlib.js +223 -0
  93. package/dist/js/graphql.js +6 -0
  94. package/dist/js/graphql2.js +12 -0
  95. package/dist/js/hack.js +10 -0
  96. package/dist/js/haml.js +4 -0
  97. package/dist/js/haml2.js +8 -0
  98. package/dist/js/handlebars.js +12 -0
  99. package/dist/js/haxe.js +2 -0
  100. package/dist/js/hlsl.js +2 -0
  101. package/dist/js/html-derivative.js +5 -0
  102. package/dist/js/html-derivative2.js +3 -0
  103. package/dist/js/html.js +4 -0
  104. package/dist/js/html2.js +8 -0
  105. package/dist/js/http.js +17 -0
  106. package/dist/js/hurl.js +15 -0
  107. package/dist/js/hxml.js +3 -0
  108. package/dist/js/index.js +37693 -0
  109. package/dist/js/info-NVLQJR56.js +8 -0
  110. package/dist/js/infoDiagram-WHAUD3N6.js +31 -0
  111. package/dist/js/isEmpty.js +32 -0
  112. package/dist/js/java.js +2 -0
  113. package/dist/js/javascript.js +2 -0
  114. package/dist/js/jinja.js +5 -0
  115. package/dist/js/jison.js +3 -0
  116. package/dist/js/journeyDiagram-XKPGCS4Q.js +884 -0
  117. package/dist/js/json.js +2 -0
  118. package/dist/js/jsx.js +2 -0
  119. package/dist/js/julia.js +17 -0
  120. package/dist/js/kanban-definition-3W4ZIXB7.js +971 -0
  121. package/dist/js/katex.js +2 -0
  122. package/dist/js/latex.js +4 -0
  123. package/dist/js/less.js +2 -0
  124. package/dist/js/line.js +30 -0
  125. package/dist/js/linear.js +250 -0
  126. package/dist/js/liquid.js +12 -0
  127. package/dist/js/lua.js +3 -0
  128. package/dist/js/lua2.js +3 -0
  129. package/dist/js/markdown.js +2 -0
  130. package/dist/js/marko.js +12 -0
  131. package/dist/js/mdc.js +13 -0
  132. package/dist/js/mermaid-parser.core.js +48 -0
  133. package/dist/js/mermaid.core.js +895 -0
  134. package/dist/js/mindmap-definition-VGOIOE7T.js +960 -0
  135. package/dist/js/nginx.js +4 -0
  136. package/dist/js/nim.js +19 -0
  137. package/dist/js/ordinal.js +61 -0
  138. package/dist/js/packet-BFZMPI3H.js +8 -0
  139. package/dist/js/perl.js +15 -0
  140. package/dist/js/php.js +9 -0
  141. package/dist/js/php2.js +16 -0
  142. package/dist/js/pie-7BOR55EZ.js +8 -0
  143. package/dist/js/pieDiagram-ADFJNKIX.js +172 -0
  144. package/dist/js/postcss.js +2 -0
  145. package/dist/js/pug.js +10 -0
  146. package/dist/js/python.js +2 -0
  147. package/dist/js/qml.js +3 -0
  148. package/dist/js/quadrantDiagram-AYHSOK5B.js +1970 -0
  149. package/dist/js/r.js +2 -0
  150. package/dist/js/radar-NHE76QYJ.js +8 -0
  151. package/dist/js/razor.js +10 -0
  152. package/dist/js/regexp.js +2 -0
  153. package/dist/js/requirementDiagram-UZGBJVZJ.js +2194 -0
  154. package/dist/js/rst.js +34 -0
  155. package/dist/js/ruby.js +20 -0
  156. package/dist/js/ruby2.js +28 -0
  157. package/dist/js/sankeyDiagram-TZEHDZUN.js +884 -0
  158. package/dist/js/sas.js +3 -0
  159. package/dist/js/scss.js +3 -0
  160. package/dist/js/scss2.js +3 -0
  161. package/dist/js/sdbl.js +2 -0
  162. package/dist/js/sequenceDiagram-WL72ISMW.js +3560 -0
  163. package/dist/js/shaderlab.js +3 -0
  164. package/dist/js/shellscript.js +2 -0
  165. package/dist/js/shellsession.js +3 -0
  166. package/dist/js/soy.js +5 -0
  167. package/dist/js/sparql.js +3 -0
  168. package/dist/js/sql.js +2 -0
  169. package/dist/js/src.js +1975 -0
  170. package/dist/js/stata.js +3 -0
  171. package/dist/js/stateDiagram-FKZM4ZOC.js +224 -0
  172. package/dist/js/stateDiagram-v2-4FDKWEC3.js +32 -0
  173. package/dist/js/stylus.js +2 -0
  174. package/dist/js/svelte.js +12 -0
  175. package/dist/js/templ.js +10 -0
  176. package/dist/js/tex.js +3 -0
  177. package/dist/js/tex2.js +3 -0
  178. package/dist/js/timeline-definition-IT6M3QCI.js +830 -0
  179. package/dist/js/treemap-KMMF4GRG.js +8 -0
  180. package/dist/js/ts-tags.js +38 -0
  181. package/dist/js/tsx.js +2 -0
  182. package/dist/js/turtle.js +2 -0
  183. package/dist/js/twig.js +33 -0
  184. package/dist/js/typescript.js +2 -0
  185. package/dist/js/vue-html.js +13 -0
  186. package/dist/js/vue-vine.js +22 -0
  187. package/dist/js/vue.js +20 -0
  188. package/dist/js/vue2.js +8 -0
  189. package/dist/js/xml.js +3 -0
  190. package/dist/js/xml2.js +3 -0
  191. package/dist/js/xsl.js +4 -0
  192. package/dist/js/xychartDiagram-PRI3JC2R.js +2022 -0
  193. package/dist/js/yaml.js +2 -0
  194. package/dist/types/components/ai-elements/artifact/ArtifactAction.vue.d.ts +32 -0
  195. package/dist/types/components/ai-elements/artifact/ArtifactClose.vue.d.ts +27 -0
  196. package/dist/types/components/ai-elements/checkpoint/CheckpointTrigger.vue.d.ts +27 -0
  197. package/dist/types/components/ai-elements/conversation/Conversation.vue.d.ts +47 -0
  198. package/dist/types/components/ai-elements/message/MessageAction.vue.d.ts +28 -0
  199. package/dist/types/components/ai-elements/prompt-input/PromptInputButton.vue.d.ts +20 -0
  200. package/dist/types/components/ai-elements/prompt-input/PromptInputSubmit.vue.d.ts +30 -0
  201. package/dist/types/components/ai-elements/shimmer/Shimmer.vue.d.ts +28 -0
  202. package/dist/types/components/ai-elements/web-preview/WebPreviewNavigationButton.vue.d.ts +30 -0
  203. package/dist/types/components/ui/badge/index.d.ts +6 -0
  204. package/dist/types/components/ui/button/Button.vue.d.ts +27 -0
  205. package/dist/types/components/ui/button/index.d.ts +7 -0
  206. package/dist/types/components/ui/button-group/ButtonGroupSeparator.vue.d.ts +9 -0
  207. package/dist/types/components/ui/button-group/ButtonGroupText.vue.d.ts +26 -0
  208. package/dist/types/components/ui/button-group/index.d.ts +8 -0
  209. package/dist/types/components/ui/carousel/CarouselNext.vue.d.ts +26 -0
  210. package/dist/types/components/ui/carousel/CarouselPrevious.vue.d.ts +26 -0
  211. package/dist/types/components/ui/input-group/InputGroupButton.vue.d.ts +21 -0
  212. package/dist/types/components/ui/select/Select.vue.d.ts +28 -0
  213. package/dist/types/components/ui/separator/Separator.vue.d.ts +10 -0
  214. package/dist/types/composables/useChat.d.ts +8 -0
  215. package/dist/types/types/css.d.ts +5 -0
  216. package/package.json +12 -6
  217. package/dist/_basePickBy-CkZky1V-.js +0 -135
  218. package/dist/_baseUniq-f11MNaXe.js +0 -573
  219. package/dist/angular-html-C5vmpet2.js +0 -14
  220. package/dist/angular-html-CLTv4jM9.js +0 -5
  221. package/dist/angular-ts-BKqJWrwt.js +0 -19
  222. package/dist/apl-BcJs32yU.js +0 -15
  223. package/dist/arc-Dh_0vvHo.js +0 -78
  224. package/dist/architecture-U656AL7Q-BqUSHYp0.js +0 -8
  225. package/dist/architectureDiagram-VXUJARFQ-BQvEdgpc.js +0 -4053
  226. package/dist/astro-q-huTQEP.js +0 -16
  227. package/dist/bash-DI_p7w58.js +0 -2
  228. package/dist/blade-Ckff5WJQ.js +0 -19
  229. package/dist/blockDiagram-VD42YOAC-DKkDshq3.js +0 -3013
  230. package/dist/bsl-BTNab0FD.js +0 -3
  231. package/dist/c-BYDGkYzS.js +0 -2
  232. package/dist/c4Diagram-YG6GDRKO-KsGqOrVB.js +0 -2955
  233. package/dist/cairo-DUZgbTPW.js +0 -3
  234. package/dist/channel-BrxVk5HC.js +0 -3
  235. package/dist/chunk-4BX2VUAB-BGxl5VGr.js +0 -6
  236. package/dist/chunk-55IACEB6-CDMD5yu1.js +0 -6
  237. package/dist/chunk-76Q3JFCE-Db4Lkmow.js +0 -19
  238. package/dist/chunk-ABZYJK2D-BZvlc6Ej.js +0 -2515
  239. package/dist/chunk-ATLVNIR6-C3g7rsIT.js +0 -65
  240. package/dist/chunk-B4BG7PRW-Dx-bGI1r.js +0 -3108
  241. package/dist/chunk-CVBHYZKI-DxEBlSK7.js +0 -10
  242. package/dist/chunk-DI55MBZ5-CCWuZnfW.js +0 -1994
  243. package/dist/chunk-EXTU4WIE-BjMX7pAs.js +0 -7
  244. package/dist/chunk-FMBD7UC4-Dj3Ok4Bk.js +0 -3
  245. package/dist/chunk-FPAJGGOC-nWbO3e1v.js +0 -12252
  246. package/dist/chunk-FWNWRKHM-CjcwRw2u.js +0 -56
  247. package/dist/chunk-HN2XXSSU-Lv4Ef0co.js +0 -74
  248. package/dist/chunk-JA3XYJ7Z-Dhh1_u_p.js +0 -463
  249. package/dist/chunk-JZLCHNYA-vrb_Ucuc.js +0 -4861
  250. package/dist/chunk-LBM3YZW2-D8lrIfGo.js +0 -19
  251. package/dist/chunk-LHMN2FUI-DLQ0i8hl.js +0 -19
  252. package/dist/chunk-MI3HLSF2-Dy6F9XgR.js +0 -1140
  253. package/dist/chunk-N4CR4FBY-BdaGxHlZ.js +0 -39
  254. package/dist/chunk-O7ZBX7Z2-D8Yaukr5.js +0 -26
  255. package/dist/chunk-QN33PNHL-DnPw7tni.js +0 -23
  256. package/dist/chunk-QXUST7PY-D9mGQ-UP.js +0 -486
  257. package/dist/chunk-QZHKN3VN-ClanGuXA.js +0 -11
  258. package/dist/chunk-S3R3BYOJ-DHTsHczu.js +0 -1074
  259. package/dist/chunk-S6J4BHB3-8RrHs9bD.js +0 -19
  260. package/dist/chunk-T53DSG4Q-C2BDA_QX.js +0 -24
  261. package/dist/chunk-TZMSLE5B-F4nHm7N1.js +0 -55
  262. package/dist/classDiagram-2ON5EDUG-C_ZEMlKu.js +0 -33
  263. package/dist/classDiagram-v2-WZHVMYZB-BHb5nZOM.js +0 -33
  264. package/dist/clone-BRioDvRr.js +0 -7
  265. package/dist/cmake-CA3Lfsq7.js +0 -2
  266. package/dist/cobol-DhzLzJib.js +0 -10
  267. package/dist/coffee-P21KTKMu.js +0 -3
  268. package/dist/components/ai-elements/artifact/ArtifactAction.vue.d.ts +0 -32
  269. package/dist/components/ai-elements/artifact/ArtifactClose.vue.d.ts +0 -27
  270. package/dist/components/ai-elements/checkpoint/CheckpointTrigger.vue.d.ts +0 -27
  271. package/dist/components/ai-elements/conversation/Conversation.vue.d.ts +0 -47
  272. package/dist/components/ai-elements/message/MessageAction.vue.d.ts +0 -28
  273. package/dist/components/ai-elements/prompt-input/PromptInputButton.vue.d.ts +0 -20
  274. package/dist/components/ai-elements/prompt-input/PromptInputSubmit.vue.d.ts +0 -30
  275. package/dist/components/ai-elements/shimmer/Shimmer.vue.d.ts +0 -28
  276. package/dist/components/ai-elements/web-preview/WebPreviewNavigationButton.vue.d.ts +0 -30
  277. package/dist/components/ui/badge/index.d.ts +0 -6
  278. package/dist/components/ui/button/Button.vue.d.ts +0 -27
  279. package/dist/components/ui/button/index.d.ts +0 -7
  280. package/dist/components/ui/button-group/ButtonGroupSeparator.vue.d.ts +0 -9
  281. package/dist/components/ui/button-group/ButtonGroupText.vue.d.ts +0 -26
  282. package/dist/components/ui/button-group/index.d.ts +0 -8
  283. package/dist/components/ui/carousel/CarouselNext.vue.d.ts +0 -26
  284. package/dist/components/ui/carousel/CarouselPrevious.vue.d.ts +0 -26
  285. package/dist/components/ui/input-group/InputGroupButton.vue.d.ts +0 -21
  286. package/dist/components/ui/select/Select.vue.d.ts +0 -28
  287. package/dist/components/ui/separator/Separator.vue.d.ts +0 -10
  288. package/dist/composables/useChat.d.ts +0 -8
  289. package/dist/cose-bilkent-S5V4N54A-Dy-do3hl.js +0 -2250
  290. package/dist/cpp-C6JyDxZu.js +0 -16
  291. package/dist/cpp-GAIEvywS.js +0 -6
  292. package/dist/crystal-BJfcoGS4.js +0 -16
  293. package/dist/csharp-JE-9ns6W.js +0 -2
  294. package/dist/css-Cy-fypCV.js +0 -2
  295. package/dist/csv-DJ7xG4PY.js +0 -2
  296. package/dist/dagre-6UL2VRFP-B38_sZWh.js +0 -298
  297. package/dist/dagre-DtvXp3zQ.js +0 -1395
  298. package/dist/diagram-PSM6KHXK-D6swsG-y.js +0 -497
  299. package/dist/diagram-QEK2KX5R-B7Hi0LAL.js +0 -226
  300. package/dist/diagram-S2PKOQOG-DLx7PlpM.js +0 -144
  301. package/dist/diff-COB48_rb.js +0 -2
  302. package/dist/dist-CrnZo_23.js +0 -49
  303. package/dist/edge-Dm7HQa9N.js +0 -12
  304. package/dist/elixir-BkvHyCNd.js +0 -5
  305. package/dist/elm-rz9wTSrn.js +0 -4
  306. package/dist/erDiagram-Q2GNP2WA-B67FD8rh.js +0 -1603
  307. package/dist/erb-DyrwQYVz.js +0 -25
  308. package/dist/erlang-DLFKZs5N.js +0 -3
  309. package/dist/flowDiagram-NV44I4VS-DHXgrdJY.js +0 -4132
  310. package/dist/fortran-fixed-form-SzB0QY3n.js +0 -3
  311. package/dist/fortran-free-form-Js8JrQQE.js +0 -2
  312. package/dist/fsharp-CtWO0jvL.js +0 -3
  313. package/dist/ganttDiagram-JELNMOA3-CGIqBt1P.js +0 -3009
  314. package/dist/gdresource-CgyXKpe4.js +0 -8
  315. package/dist/gdscript-STdmRKv-.js +0 -2
  316. package/dist/gdshader-Bs2s6cSB.js +0 -2
  317. package/dist/git-commit--0GGwZNa.js +0 -3
  318. package/dist/git-rebase-orw-bSIZ.js +0 -3
  319. package/dist/gitGraph-F6HP7TQM-CH5XLm5Z.js +0 -8
  320. package/dist/gitGraphDiagram-NY62KEGX-Cq8AbOhM.js +0 -634
  321. package/dist/github-dark-CMN1tZPn.js +0 -2
  322. package/dist/github-light-Y8g-VxKq.js +0 -2
  323. package/dist/glimmer-js-C6E6wJv0.js +0 -12
  324. package/dist/glimmer-ts-C6GgTGNO.js +0 -12
  325. package/dist/glsl-D8_YBRKT.js +0 -3
  326. package/dist/glsl-rwn_QCp2.js +0 -3
  327. package/dist/go-BhDDN9y4.js +0 -2
  328. package/dist/graphlib-BZdVmxO6.js +0 -223
  329. package/dist/graphql-DQHhbQm2.js +0 -6
  330. package/dist/graphql-DoBLseH6.js +0 -12
  331. package/dist/hack-DEAxoi73.js +0 -10
  332. package/dist/haml-BG2d3iX4.js +0 -4
  333. package/dist/haml-mA656Lm7.js +0 -8
  334. package/dist/handlebars-CO5xAxJ3.js +0 -12
  335. package/dist/haxe-BJVSeYxy.js +0 -2
  336. package/dist/hlsl-Dt9-unql.js +0 -2
  337. package/dist/html-DFCxtjnd.js +0 -4
  338. package/dist/html-DKSj3FeM.js +0 -8
  339. package/dist/html-derivative-BCRkrTcD.js +0 -5
  340. package/dist/html-derivative-C-vidKoA.js +0 -3
  341. package/dist/http-CYP1tEDW.js +0 -17
  342. package/dist/hurl-BJexUSKz.js +0 -15
  343. package/dist/hxml-XfuSEjM-.js +0 -3
  344. package/dist/index.js +0 -2984
  345. package/dist/index.mjs +0 -37693
  346. package/dist/info-NVLQJR56-hEN1y0nS.js +0 -8
  347. package/dist/infoDiagram-WHAUD3N6-btPwHXxp.js +0 -31
  348. package/dist/isEmpty-CCym_WUL.js +0 -32
  349. package/dist/java-DIOGgqAD.js +0 -2
  350. package/dist/javascript-9-JPeKdm.js +0 -2
  351. package/dist/jinja-CVFxFRh6.js +0 -5
  352. package/dist/jison-0X6LppGq.js +0 -3
  353. package/dist/journeyDiagram-XKPGCS4Q-3OxtBx3I.js +0 -884
  354. package/dist/json-DJtYdWQK.js +0 -2
  355. package/dist/jsx-qo0JNHpZ.js +0 -2
  356. package/dist/julia-ChGs-n_c.js +0 -17
  357. package/dist/kanban-definition-3W4ZIXB7-zdtnJaXz.js +0 -971
  358. package/dist/katex-K1dsczyg.js +0 -2
  359. package/dist/latex-BnWZlY4q.js +0 -4
  360. package/dist/less-B4ybD-7s.js +0 -2
  361. package/dist/line-EpckC7pZ.js +0 -30
  362. package/dist/linear-DjVN4o4U.js +0 -250
  363. package/dist/liquid-pc5Mduds.js +0 -12
  364. package/dist/lua-0TqNbT8C.js +0 -3
  365. package/dist/lua-6pXga3HV.js +0 -3
  366. package/dist/markdown-LaaQ4Eua.js +0 -2
  367. package/dist/marko-D8uDUUEs.js +0 -12
  368. package/dist/mdc-Ki3KnB5U.js +0 -13
  369. package/dist/mermaid-parser.core-DVXSGppp.js +0 -48
  370. package/dist/mermaid.core-Ra1JFCui.js +0 -895
  371. package/dist/mindmap-definition-VGOIOE7T-CRPO52xV.js +0 -960
  372. package/dist/nginx-B46vdQ9n.js +0 -4
  373. package/dist/nim-BxQNx10D.js +0 -19
  374. package/dist/ordinal-CYQpsShT.js +0 -61
  375. package/dist/packet-BFZMPI3H-Bnlch4JI.js +0 -8
  376. package/dist/perl-D1bDaADZ.js +0 -15
  377. package/dist/php-BX51InqL.js +0 -9
  378. package/dist/php-D5tmU8Cr.js +0 -16
  379. package/dist/pie-7BOR55EZ-B9egLHl5.js +0 -8
  380. package/dist/pieDiagram-ADFJNKIX-CKSgB7fx.js +0 -172
  381. package/dist/postcss-ainQkoyY.js +0 -2
  382. package/dist/pug-BcLlS7Yb.js +0 -10
  383. package/dist/python-CuBu5pyY.js +0 -2
  384. package/dist/qml-MD0NqqIl.js +0 -3
  385. package/dist/quadrantDiagram-AYHSOK5B-BHzqivzD.js +0 -1970
  386. package/dist/r-CQeHOO4c.js +0 -2
  387. package/dist/radar-NHE76QYJ-DdALhlvV.js +0 -8
  388. package/dist/razor-eRwFWsjJ.js +0 -10
  389. package/dist/regexp-Ca0eDBa2.js +0 -2
  390. package/dist/requirementDiagram-UZGBJVZJ-Darhwvir.js +0 -2194
  391. package/dist/rst-DFmSdXGd.js +0 -34
  392. package/dist/ruby-BAEFomR0.js +0 -20
  393. package/dist/ruby-DDMUvAvC.js +0 -28
  394. package/dist/sankeyDiagram-TZEHDZUN-KiSvBN_C.js +0 -884
  395. package/dist/sas-TjtLSnOp.js +0 -3
  396. package/dist/scss-C-bthdG1.js +0 -3
  397. package/dist/scss-D-6-mg-f.js +0 -3
  398. package/dist/sdbl-gc7zIVWR.js +0 -2
  399. package/dist/sequenceDiagram-WL72ISMW-D2Mo7Vtj.js +0 -3560
  400. package/dist/shaderlab-BRlB5fpk.js +0 -3
  401. package/dist/shellscript-DZa_4vvb.js +0 -2
  402. package/dist/shellsession-CIlmlgbR.js +0 -3
  403. package/dist/soy-DwSCrzEF.js +0 -5
  404. package/dist/sparql-D9kVSpEx.js +0 -3
  405. package/dist/sql-Bi3LyNPb.js +0 -2
  406. package/dist/src-B-SBGd0A.js +0 -1975
  407. package/dist/stata-DkEObyNb.js +0 -3
  408. package/dist/stateDiagram-FKZM4ZOC-BRQN2Npg.js +0 -224
  409. package/dist/stateDiagram-v2-4FDKWEC3-CeeIKiFG.js +0 -32
  410. package/dist/stylus-DEHALDNh.js +0 -2
  411. package/dist/svelte-KFuclcR6.js +0 -12
  412. package/dist/templ-C5mtYbb_.js +0 -10
  413. package/dist/tex-B4uYy1vC.js +0 -3
  414. package/dist/tex-BoVFa1ir.js +0 -3
  415. package/dist/timeline-definition-IT6M3QCI-CSwH0Pnx.js +0 -830
  416. package/dist/treemap-KMMF4GRG-COjpj6-C.js +0 -8
  417. package/dist/ts-tags-DRdTXGhb.js +0 -38
  418. package/dist/tsx-BaaPsUbd.js +0 -2
  419. package/dist/turtle-BRmolh-6.js +0 -2
  420. package/dist/twig-cEhAbahS.js +0 -33
  421. package/dist/typescript-CmJ8D0yY.js +0 -2
  422. package/dist/vue-B3C4YeUK.js +0 -8
  423. package/dist/vue-DMpjAWNv.js +0 -20
  424. package/dist/vue-html-BIZN50ug.js +0 -13
  425. package/dist/vue-vine-DxezWcjL.js +0 -22
  426. package/dist/xml-BglBgo29.js +0 -3
  427. package/dist/xml-BxRdgEAX.js +0 -3
  428. package/dist/xsl-Cni90e0k.js +0 -4
  429. package/dist/xychartDiagram-PRI3JC2R-CGXFYn39.js +0 -2022
  430. package/dist/yaml-DQRfaSRo.js +0 -2
  431. /package/dist/{abap--jVlqvLx.js → js/abap.js} +0 -0
  432. /package/dist/{actionscript-3-N1AoJtTA.js → js/actionscript-3.js} +0 -0
  433. /package/dist/{ada-CYGINLea.js → js/ada.js} +0 -0
  434. /package/dist/{andromeeda-CvsZnG9k.js → js/andromeeda.js} +0 -0
  435. /package/dist/{apache-D6X-_dyJ.js → js/apache.js} +0 -0
  436. /package/dist/{apex-C7VgAgAE.js → js/apex.js} +0 -0
  437. /package/dist/{applescript-DN64Su6U.js → js/applescript.js} +0 -0
  438. /package/dist/{ara-Dm1jHrgg.js → js/ara.js} +0 -0
  439. /package/dist/{array-CkdOJbdT.js → js/array.js} +0 -0
  440. /package/dist/{asciidoc-BpqtqRF5.js → js/asciidoc.js} +0 -0
  441. /package/dist/{asm-DUGlKYIq.js → js/asm.js} +0 -0
  442. /package/dist/{aurora-x-DwOih-un.js → js/aurora-x.js} +0 -0
  443. /package/dist/{awk-DcnVbJrN.js → js/awk.js} +0 -0
  444. /package/dist/{ayu-dark-Bd-89MKE.js → js/ayu-dark.js} +0 -0
  445. /package/dist/{ballerina-BQVdQd9X.js → js/ballerina.js} +0 -0
  446. /package/dist/{bat-juB1J52r.js → js/bat.js} +0 -0
  447. /package/dist/{beancount-ThxIlRc3.js → js/beancount.js} +0 -0
  448. /package/dist/{berry-qC18BfC_.js → js/berry.js} +0 -0
  449. /package/dist/{bibtex-CahMDY_0.js → js/bibtex.js} +0 -0
  450. /package/dist/{bicep-CHLBKS47.js → js/bicep.js} +0 -0
  451. /package/dist/{c-CX6yudYR.js → js/c2.js} +0 -0
  452. /package/dist/{cadence-DA5J9-Di.js → js/cadence.js} +0 -0
  453. /package/dist/{catppuccin-frappe-CE3kxG1f.js → js/catppuccin-frappe.js} +0 -0
  454. /package/dist/{catppuccin-latte-DW2FXeIv.js → js/catppuccin-latte.js} +0 -0
  455. /package/dist/{catppuccin-macchiato-CD5qjRSF.js → js/catppuccin-macchiato.js} +0 -0
  456. /package/dist/{catppuccin-mocha-BYwVJvjI.js → js/catppuccin-mocha.js} +0 -0
  457. /package/dist/{chunk-XAJISQIX-Bz7ki7DY.js → js/chunk-XAJISQIX.js} +0 -0
  458. /package/dist/{chunk-DNh5sLlG.js → js/chunk.js} +0 -0
  459. /package/dist/{clarity-CsFOkG3c.js → js/clarity.js} +0 -0
  460. /package/dist/{clojure-u1TZmmdQ.js → js/clojure.js} +0 -0
  461. /package/dist/{cmake-K1k8HMYR.js → js/cmake2.js} +0 -0
  462. /package/dist/{codeowners-l4eSxhtA.js → js/codeowners.js} +0 -0
  463. /package/dist/{codeql-5CeQaktT.js → js/codeql.js} +0 -0
  464. /package/dist/{common-lisp-BVttGbYJ.js → js/common-lisp.js} +0 -0
  465. /package/dist/{coq-CZjzQDnb.js → js/coq.js} +0 -0
  466. /package/dist/{csharp-BbUwciq4.js → js/csharp2.js} +0 -0
  467. /package/dist/{css-Crp0iO_o.js → js/css2.js} +0 -0
  468. /package/dist/{csv-DtT8LmMi.js → js/csv2.js} +0 -0
  469. /package/dist/{cue-BwjaQTCz.js → js/cue.js} +0 -0
  470. /package/dist/{cypher-B7e06enY.js → js/cypher.js} +0 -0
  471. /package/dist/{cytoscape.esm-CWqS6puh.js → js/cytoscape.esm.js} +0 -0
  472. /package/dist/{d-q60wkid4.js → js/d.js} +0 -0
  473. /package/dist/{dark-plus-D_fA88xf.js → js/dark-plus.js} +0 -0
  474. /package/dist/{dart-DjkWvBgr.js → js/dart.js} +0 -0
  475. /package/dist/{dax-lueLIZQI.js → js/dax.js} +0 -0
  476. /package/dist/{defaultLocale-CoJOMwPq.js → js/defaultLocale.js} +0 -0
  477. /package/dist/{desktop-DaphHKD5.js → js/desktop.js} +0 -0
  478. /package/dist/{diff-DlXnqUMK.js → js/diff2.js} +0 -0
  479. /package/dist/{docker-DZKmuwpA.js → js/docker.js} +0 -0
  480. /package/dist/{dotenv-hmNahw-8.js → js/dotenv.js} +0 -0
  481. /package/dist/{dracula-soft-vfA-TA_S.js → js/dracula-soft.js} +0 -0
  482. /package/dist/{dracula-ddM3a7au.js → js/dracula.js} +0 -0
  483. /package/dist/{dream-maker-Cxa2a8FY.js → js/dream-maker.js} +0 -0
  484. /package/dist/{emacs-lisp-w5URnZPZ.js → js/emacs-lisp.js} +0 -0
  485. /package/dist/{everforest-dark-DAPtv4yI.js → js/everforest-dark.js} +0 -0
  486. /package/dist/{everforest-light-nQzYm8GO.js → js/everforest-light.js} +0 -0
  487. /package/dist/{fennel-CJDNJZTU.js → js/fennel.js} +0 -0
  488. /package/dist/{fish-BkYaLI4-.js → js/fish.js} +0 -0
  489. /package/dist/{fluent-DShra35H.js → js/fluent.js} +0 -0
  490. /package/dist/{fortran-free-form-CgbOAJnm.js → js/fortran-free-form2.js} +0 -0
  491. /package/dist/{gdscript-DnurdQnh.js → js/gdscript2.js} +0 -0
  492. /package/dist/{gdshader-YiVaPq6D.js → js/gdshader2.js} +0 -0
  493. /package/dist/{genie-BppkvzZC.js → js/genie.js} +0 -0
  494. /package/dist/{gherkin-Bp4zdWMb.js → js/gherkin.js} +0 -0
  495. /package/dist/{github-dark-default-DVCJut02.js → js/github-dark-default.js} +0 -0
  496. /package/dist/{github-dark-dimmed-DXu9oDqW.js → js/github-dark-dimmed.js} +0 -0
  497. /package/dist/{github-dark-high-contrast-BBZdE-mX.js → js/github-dark-high-contrast.js} +0 -0
  498. /package/dist/{github-dark-DxCf_Qaz.js → js/github-dark2.js} +0 -0
  499. /package/dist/{github-light-default-BNGkGE--.js → js/github-light-default.js} +0 -0
  500. /package/dist/{github-light-high-contrast-DiSIc-nG.js → js/github-light-high-contrast.js} +0 -0
  501. /package/dist/{github-light-CfdX7txK.js → js/github-light2.js} +0 -0
  502. /package/dist/{gleam-Lw0tKp8T.js → js/gleam.js} +0 -0
  503. /package/dist/{gnuplot-BeA3etmO.js → js/gnuplot.js} +0 -0
  504. /package/dist/{go-xfE7BrfS.js → js/go2.js} +0 -0
  505. /package/dist/{groovy-C5-mv4io.js → js/groovy.js} +0 -0
  506. /package/dist/{gruvbox-dark-hard-CULu6kVy.js → js/gruvbox-dark-hard.js} +0 -0
  507. /package/dist/{gruvbox-dark-medium-BJM4uQXO.js → js/gruvbox-dark-medium.js} +0 -0
  508. /package/dist/{gruvbox-dark-soft-CVaORUwa.js → js/gruvbox-dark-soft.js} +0 -0
  509. /package/dist/{gruvbox-light-hard-B-WJAGLa.js → js/gruvbox-light-hard.js} +0 -0
  510. /package/dist/{gruvbox-light-medium-jc8FWnuC.js → js/gruvbox-light-medium.js} +0 -0
  511. /package/dist/{gruvbox-light-soft-CmvYQK92.js → js/gruvbox-light-soft.js} +0 -0
  512. /package/dist/{haskell-Hsexh2aP.js → js/haskell.js} +0 -0
  513. /package/dist/{haxe-CD_Rs3P5.js → js/haxe2.js} +0 -0
  514. /package/dist/{hcl-D098sJ_J.js → js/hcl.js} +0 -0
  515. /package/dist/{hjson-BwXHX5r6.js → js/hjson.js} +0 -0
  516. /package/dist/{hlsl-B0pnUVYG.js → js/hlsl2.js} +0 -0
  517. /package/dist/{houston-C7hMWO_I.js → js/houston.js} +0 -0
  518. /package/dist/{hy-DPQ04rHt.js → js/hy.js} +0 -0
  519. /package/dist/{imba-Bgu2n5Mo.js → js/imba.js} +0 -0
  520. /package/dist/{ini-g9mZnyrk.js → js/ini.js} +0 -0
  521. /package/dist/{init-CBay3kgM.js → js/init.js} +0 -0
  522. /package/dist/{isArrayLikeObject-Dz_TDfw0.js → js/isArrayLikeObject.js} +0 -0
  523. /package/dist/{java-CUbPyze1.js → js/java2.js} +0 -0
  524. /package/dist/{javascript-De1qhUaI.js → js/javascript2.js} +0 -0
  525. /package/dist/{json-fcFpRaf3.js → js/json2.js} +0 -0
  526. /package/dist/{json5-CPTZJOmf.js → js/json5.js} +0 -0
  527. /package/dist/{jsonc-CYrayg0k.js → js/jsonc.js} +0 -0
  528. /package/dist/{jsonl-Bsv7LjJ3.js → js/jsonl.js} +0 -0
  529. /package/dist/{jsonnet-B7LkHJxg.js → js/jsonnet.js} +0 -0
  530. /package/dist/{jssm-BopKGZKg.js → js/jssm.js} +0 -0
  531. /package/dist/{jsx-Bf3Nk9Di.js → js/jsx2.js} +0 -0
  532. /package/dist/{kanagawa-dragon-CSqqi78I.js → js/kanagawa-dragon.js} +0 -0
  533. /package/dist/{kanagawa-lotus-l2vgoxpH.js → js/kanagawa-lotus.js} +0 -0
  534. /package/dist/{kanagawa-wave-BWhFcnLj.js → js/kanagawa-wave.js} +0 -0
  535. /package/dist/{katex-BcWXJDMd.js → js/katex2.js} +0 -0
  536. /package/dist/{kdl-BbokxoZ9.js → js/kdl.js} +0 -0
  537. /package/dist/{kotlin-3dXKmwyJ.js → js/kotlin.js} +0 -0
  538. /package/dist/{kusto-Os6_yHEz.js → js/kusto.js} +0 -0
  539. /package/dist/{laserwave-8RcN1zf8.js → js/laserwave.js} +0 -0
  540. /package/dist/{lean--0Wr4Cy4.js → js/lean.js} +0 -0
  541. /package/dist/{less-Cb54jO7u.js → js/less2.js} +0 -0
  542. /package/dist/{light-plus-CP_iZQDF.js → js/light-plus.js} +0 -0
  543. /package/dist/{llvm-ILH_SX7E.js → js/llvm.js} +0 -0
  544. /package/dist/{log-DwO_GzA0.js → js/log.js} +0 -0
  545. /package/dist/{logo-B4FeRowR.js → js/logo.js} +0 -0
  546. /package/dist/{luau-DsUEyLJN.js → js/luau.js} +0 -0
  547. /package/dist/{make-p6NYc19I.js → js/make.js} +0 -0
  548. /package/dist/{markdown-CCRtgC0b.js → js/markdown2.js} +0 -0
  549. /package/dist/{marked.esm-D9xINNve.js → js/marked.esm.js} +0 -0
  550. /package/dist/{material-theme-darker-CWC5BoMv.js → js/material-theme-darker.js} +0 -0
  551. /package/dist/{material-theme-lighter-BJrV5b2o.js → js/material-theme-lighter.js} +0 -0
  552. /package/dist/{material-theme-ocean-DYpMfDiX.js → js/material-theme-ocean.js} +0 -0
  553. /package/dist/{material-theme-palenight-3Ix3iI7Q.js → js/material-theme-palenight.js} +0 -0
  554. /package/dist/{material-theme-D__z84-n.js → js/material-theme.js} +0 -0
  555. /package/dist/{math-CJAnbPum.js → js/math.js} +0 -0
  556. /package/dist/{matlab-CL0oMGfq.js → js/matlab.js} +0 -0
  557. /package/dist/{mdx-BTufVkNP.js → js/mdx.js} +0 -0
  558. /package/dist/{mermaid-FCjIh1A7.js → js/mermaid.js} +0 -0
  559. /package/dist/{min-dark-B4KRMcN3.js → js/min-dark.js} +0 -0
  560. /package/dist/{min-light-BQVJODr0.js → js/min-light.js} +0 -0
  561. /package/dist/{mipsasm-Cn6AQ4lM.js → js/mipsasm.js} +0 -0
  562. /package/dist/{mojo-C9IiQhp4.js → js/mojo.js} +0 -0
  563. /package/dist/{monokai-vDwMMRi4.js → js/monokai.js} +0 -0
  564. /package/dist/{move-BdizQ4_I.js → js/move.js} +0 -0
  565. /package/dist/{narrat-BP2kx-u2.js → js/narrat.js} +0 -0
  566. /package/dist/{nextflow-CyRmCGOe.js → js/nextflow.js} +0 -0
  567. /package/dist/{night-owl-DmjkOa5g.js → js/night-owl.js} +0 -0
  568. /package/dist/{nix-qPhlsqZI.js → js/nix.js} +0 -0
  569. /package/dist/{nord-sjxbvIbg.js → js/nord.js} +0 -0
  570. /package/dist/{nushell-puA-1bCW.js → js/nushell.js} +0 -0
  571. /package/dist/{objective-c-D-qDLNy5.js → js/objective-c.js} +0 -0
  572. /package/dist/{objective-cpp-CFxSAM6p.js → js/objective-cpp.js} +0 -0
  573. /package/dist/{ocaml-CsLB7SWJ.js → js/ocaml.js} +0 -0
  574. /package/dist/{one-dark-pro-BHH-VjFD.js → js/one-dark-pro.js} +0 -0
  575. /package/dist/{one-light-BqE6erWk.js → js/one-light.js} +0 -0
  576. /package/dist/{openscad-DJCIQfnJ.js → js/openscad.js} +0 -0
  577. /package/dist/{pascal-CPg9_ZFN.js → js/pascal.js} +0 -0
  578. /package/dist/{path-esxOUfAH.js → js/path.js} +0 -0
  579. /package/dist/{pkl-BQQ96hvn.js → js/pkl.js} +0 -0
  580. /package/dist/{plastic-BrNUBdSC.js → js/plastic.js} +0 -0
  581. /package/dist/{plsql-Co7Bxe7U.js → js/plsql.js} +0 -0
  582. /package/dist/{po-BqzJCro7.js → js/po.js} +0 -0
  583. /package/dist/{poimandres-C_AK8TlO.js → js/poimandres.js} +0 -0
  584. /package/dist/{polar-CtdYIPEe.js → js/polar.js} +0 -0
  585. /package/dist/{postcss-ChqFKb46.js → js/postcss2.js} +0 -0
  586. /package/dist/{powerquery-CDugc1w-.js → js/powerquery.js} +0 -0
  587. /package/dist/{powershell-j5X-IA59.js → js/powershell.js} +0 -0
  588. /package/dist/{prisma-Cyl7YhUw.js → js/prisma.js} +0 -0
  589. /package/dist/{prolog-DELKnUYf.js → js/prolog.js} +0 -0
  590. /package/dist/{proto-C4A_gDBY.js → js/proto.js} +0 -0
  591. /package/dist/{puppet-DFC9LyFj.js → js/puppet.js} +0 -0
  592. /package/dist/{purescript-eECq7_n2.js → js/purescript.js} +0 -0
  593. /package/dist/{python-BhdCuCld.js → js/python2.js} +0 -0
  594. /package/dist/{qmldir-BpJII-Ze.js → js/qmldir.js} +0 -0
  595. /package/dist/{qss-CpMcemMc.js → js/qss.js} +0 -0
  596. /package/dist/{r-D90zdkbN.js → js/r2.js} +0 -0
  597. /package/dist/{racket-COTs6Zfi.js → js/racket.js} +0 -0
  598. /package/dist/{raku-DfOtwMUC.js → js/raku.js} +0 -0
  599. /package/dist/{red-CWGFZsim.js → js/red.js} +0 -0
  600. /package/dist/{reg-BX5DwoEA.js → js/reg.js} +0 -0
  601. /package/dist/{regexp-Cap8fK_2.js → js/regexp2.js} +0 -0
  602. /package/dist/{rel-CzXuLSk3.js → js/rel.js} +0 -0
  603. /package/dist/{riscv-DnFIiqh3.js → js/riscv.js} +0 -0
  604. /package/dist/{rose-pine-dawn-D5sdDB-J.js → js/rose-pine-dawn.js} +0 -0
  605. /package/dist/{rose-pine-moon-2Vb7bLLO.js → js/rose-pine-moon.js} +0 -0
  606. /package/dist/{rose-pine-C4v2iQVe.js → js/rose-pine.js} +0 -0
  607. /package/dist/{rosmsg-D02ul3fM.js → js/rosmsg.js} +0 -0
  608. /package/dist/{rust-s3hBbfQg.js → js/rust.js} +0 -0
  609. /package/dist/{sass-v3HeJ9Fl.js → js/sass.js} +0 -0
  610. /package/dist/{scala-BTIBM_Vn.js → js/scala.js} +0 -0
  611. /package/dist/{scheme-C4NQMf7a.js → js/scheme.js} +0 -0
  612. /package/dist/{sdbl-BA3l-JrH.js → js/sdbl2.js} +0 -0
  613. /package/dist/{shellscript-BQ8mKDAF.js → js/shellscript2.js} +0 -0
  614. /package/dist/{slack-dark-DhXO5DWr.js → js/slack-dark.js} +0 -0
  615. /package/dist/{slack-ochin-aAGl4PPH.js → js/slack-ochin.js} +0 -0
  616. /package/dist/{smalltalk-DbwVUw_i.js → js/smalltalk.js} +0 -0
  617. /package/dist/{snazzy-light-B4S5mk83.js → js/snazzy-light.js} +0 -0
  618. /package/dist/{solarized-dark-Dexkq3Fm.js → js/solarized-dark.js} +0 -0
  619. /package/dist/{solarized-light-I-Bzy8UC.js → js/solarized-light.js} +0 -0
  620. /package/dist/{solidity-SMk0TJDc.js → js/solidity.js} +0 -0
  621. /package/dist/{splunk-DXXu2r7r.js → js/splunk.js} +0 -0
  622. /package/dist/{sql-D0eLHBiZ.js → js/sql2.js} +0 -0
  623. /package/dist/{ssh-config-DyVcFTfI.js → js/ssh-config.js} +0 -0
  624. /package/dist/{stylus-BKTuFHcX.js → js/stylus2.js} +0 -0
  625. /package/dist/{swift-Cenptrnf.js → js/swift.js} +0 -0
  626. /package/dist/{synthwave-84-BRkDuVE-.js → js/synthwave-84.js} +0 -0
  627. /package/dist/{system-verilog-Cvgukx4v.js → js/system-verilog.js} +0 -0
  628. /package/dist/{systemd-BepdslJQ.js → js/systemd.js} +0 -0
  629. /package/dist/{talonscript-Q98m-VXh.js → js/talonscript.js} +0 -0
  630. /package/dist/{tasl-uebrX98X.js → js/tasl.js} +0 -0
  631. /package/dist/{tcl-B1Ny4XFf.js → js/tcl.js} +0 -0
  632. /package/dist/{terraform-0mA5ERTe.js → js/terraform.js} +0 -0
  633. /package/dist/{tokyo-night-D0mU3-u8.js → js/tokyo-night.js} +0 -0
  634. /package/dist/{toml-vMAjra5M.js → js/toml.js} +0 -0
  635. /package/dist/{tsv-BnmbkntZ.js → js/tsv.js} +0 -0
  636. /package/dist/{tsx-C0w0w5St.js → js/tsx2.js} +0 -0
  637. /package/dist/{turtle-4UWi_qX6.js → js/turtle2.js} +0 -0
  638. /package/dist/{typescript-4YtK2JL4.js → js/typescript2.js} +0 -0
  639. /package/dist/{typespec-CILw3zvZ.js → js/typespec.js} +0 -0
  640. /package/dist/{typst-CLajFw6q.js → js/typst.js} +0 -0
  641. /package/dist/{v-MJV2RQvK.js → js/v.js} +0 -0
  642. /package/dist/{vala-Dc1TiHw1.js → js/vala.js} +0 -0
  643. /package/dist/{vb-CoJdNmGs.js → js/vb.js} +0 -0
  644. /package/dist/{verilog-C7aVmiO0.js → js/verilog.js} +0 -0
  645. /package/dist/{vesper-Cvcqyrim.js → js/vesper.js} +0 -0
  646. /package/dist/{vhdl-CYQvzAG1.js → js/vhdl.js} +0 -0
  647. /package/dist/{viml-DOyjiDI8.js → js/viml.js} +0 -0
  648. /package/dist/{vitesse-black-CUYJaB5b.js → js/vitesse-black.js} +0 -0
  649. /package/dist/{vitesse-dark-BNlzDJ1Z.js → js/vitesse-dark.js} +0 -0
  650. /package/dist/{vitesse-light-JU98KqVa.js → js/vitesse-light.js} +0 -0
  651. /package/dist/{vyper-JU_r7Ch6.js → js/vyper.js} +0 -0
  652. /package/dist/{wasm-DJ1S--fN.js → js/wasm.js} +0 -0
  653. /package/dist/{wasm-eLFiAU8u.js → js/wasm2.js} +0 -0
  654. /package/dist/{wenyan-CqkzmyWz.js → js/wenyan.js} +0 -0
  655. /package/dist/{wgsl-gV62iTnF.js → js/wgsl.js} +0 -0
  656. /package/dist/{wikitext-BfUl8La4.js → js/wikitext.js} +0 -0
  657. /package/dist/{wit-kp_bCf2U.js → js/wit.js} +0 -0
  658. /package/dist/{wolfram-aPsN9AKt.js → js/wolfram.js} +0 -0
  659. /package/dist/{yaml-P2kjOPvW.js → js/yaml2.js} +0 -0
  660. /package/dist/{zenscript-BuY4FX-t.js → js/zenscript.js} +0 -0
  661. /package/dist/{zig-CGDGjytz.js → js/zig.js} +0 -0
  662. /package/dist/{App.vue.d.ts → types/App.vue.d.ts} +0 -0
  663. /package/dist/{components → types/components}/ChatConversation/ChatConversation.vue.d.ts +0 -0
  664. /package/dist/{components → types/components}/ChatConversation/index.d.ts +0 -0
  665. /package/dist/{components → types/components}/ChatPromptInputProvider/ChatPromptInputProvider.vue.d.ts +0 -0
  666. /package/dist/{components → types/components}/ChatPromptInputProvider/index.d.ts +0 -0
  667. /package/dist/{components → types/components}/ai-elements/artifact/Artifact.vue.d.ts +0 -0
  668. /package/dist/{components → types/components}/ai-elements/artifact/ArtifactActions.vue.d.ts +0 -0
  669. /package/dist/{components → types/components}/ai-elements/artifact/ArtifactContent.vue.d.ts +0 -0
  670. /package/dist/{components → types/components}/ai-elements/artifact/ArtifactDescription.vue.d.ts +0 -0
  671. /package/dist/{components → types/components}/ai-elements/artifact/ArtifactHeader.vue.d.ts +0 -0
  672. /package/dist/{components → types/components}/ai-elements/artifact/ArtifactTitle.vue.d.ts +0 -0
  673. /package/dist/{components → types/components}/ai-elements/artifact/index.d.ts +0 -0
  674. /package/dist/{components → types/components}/ai-elements/canvas/index.d.ts +0 -0
  675. /package/dist/{components → types/components}/ai-elements/chain-of-thought/ChainOfThought.vue.d.ts +0 -0
  676. /package/dist/{components → types/components}/ai-elements/chain-of-thought/ChainOfThoughtContent.vue.d.ts +0 -0
  677. /package/dist/{components → types/components}/ai-elements/chain-of-thought/ChainOfThoughtHeader.vue.d.ts +0 -0
  678. /package/dist/{components → types/components}/ai-elements/chain-of-thought/ChainOfThoughtImage.vue.d.ts +0 -0
  679. /package/dist/{components → types/components}/ai-elements/chain-of-thought/ChainOfThoughtSearchResult.vue.d.ts +0 -0
  680. /package/dist/{components → types/components}/ai-elements/chain-of-thought/ChainOfThoughtSearchResults.vue.d.ts +0 -0
  681. /package/dist/{components → types/components}/ai-elements/chain-of-thought/ChainOfThoughtStep.vue.d.ts +0 -0
  682. /package/dist/{components → types/components}/ai-elements/chain-of-thought/context.d.ts +0 -0
  683. /package/dist/{components → types/components}/ai-elements/chain-of-thought/index.d.ts +0 -0
  684. /package/dist/{components → types/components}/ai-elements/checkpoint/Checkpoint.vue.d.ts +0 -0
  685. /package/dist/{components → types/components}/ai-elements/checkpoint/CheckpointIcon.vue.d.ts +0 -0
  686. /package/dist/{components → types/components}/ai-elements/checkpoint/index.d.ts +0 -0
  687. /package/dist/{components → types/components}/ai-elements/code-block/CodeBlock.vue.d.ts +0 -0
  688. /package/dist/{components → types/components}/ai-elements/code-block/CodeBlockCopyButton.vue.d.ts +0 -0
  689. /package/dist/{components → types/components}/ai-elements/code-block/context.d.ts +0 -0
  690. /package/dist/{components → types/components}/ai-elements/code-block/index.d.ts +0 -0
  691. /package/dist/{components → types/components}/ai-elements/code-block/utils.d.ts +0 -0
  692. /package/dist/{components → types/components}/ai-elements/confirmation/Confirmation.vue.d.ts +0 -0
  693. /package/dist/{components → types/components}/ai-elements/confirmation/ConfirmationAccepted.vue.d.ts +0 -0
  694. /package/dist/{components → types/components}/ai-elements/confirmation/ConfirmationAction.vue.d.ts +0 -0
  695. /package/dist/{components → types/components}/ai-elements/confirmation/ConfirmationActions.vue.d.ts +0 -0
  696. /package/dist/{components → types/components}/ai-elements/confirmation/ConfirmationRejected.vue.d.ts +0 -0
  697. /package/dist/{components → types/components}/ai-elements/confirmation/ConfirmationRequest.vue.d.ts +0 -0
  698. /package/dist/{components → types/components}/ai-elements/confirmation/ConfirmationTitle.vue.d.ts +0 -0
  699. /package/dist/{components → types/components}/ai-elements/confirmation/context.d.ts +0 -0
  700. /package/dist/{components → types/components}/ai-elements/confirmation/index.d.ts +0 -0
  701. /package/dist/{components → types/components}/ai-elements/connection/Connection.vue.d.ts +0 -0
  702. /package/dist/{components → types/components}/ai-elements/connection/index.d.ts +0 -0
  703. /package/dist/{components → types/components}/ai-elements/context/Context.vue.d.ts +0 -0
  704. /package/dist/{components → types/components}/ai-elements/context/ContextCacheUsage.vue.d.ts +0 -0
  705. /package/dist/{components → types/components}/ai-elements/context/ContextContent.vue.d.ts +0 -0
  706. /package/dist/{components → types/components}/ai-elements/context/ContextContentBody.vue.d.ts +0 -0
  707. /package/dist/{components → types/components}/ai-elements/context/ContextContentFooter.vue.d.ts +0 -0
  708. /package/dist/{components → types/components}/ai-elements/context/ContextContentHeader.vue.d.ts +0 -0
  709. /package/dist/{components → types/components}/ai-elements/context/ContextIcon.vue.d.ts +0 -0
  710. /package/dist/{components → types/components}/ai-elements/context/ContextInputUsage.vue.d.ts +0 -0
  711. /package/dist/{components → types/components}/ai-elements/context/ContextOutputUsage.vue.d.ts +0 -0
  712. /package/dist/{components → types/components}/ai-elements/context/ContextReasoningUsage.vue.d.ts +0 -0
  713. /package/dist/{components → types/components}/ai-elements/context/ContextTrigger.vue.d.ts +0 -0
  714. /package/dist/{components → types/components}/ai-elements/context/TokensWithCost.vue.d.ts +0 -0
  715. /package/dist/{components → types/components}/ai-elements/context/context.d.ts +0 -0
  716. /package/dist/{components → types/components}/ai-elements/context/index.d.ts +0 -0
  717. /package/dist/{components → types/components}/ai-elements/controls/Controls.vue.d.ts +0 -0
  718. /package/dist/{components → types/components}/ai-elements/controls/index.d.ts +0 -0
  719. /package/dist/{components → types/components}/ai-elements/conversation/ConversationContent.vue.d.ts +0 -0
  720. /package/dist/{components → types/components}/ai-elements/conversation/ConversationEmptyState.vue.d.ts +0 -0
  721. /package/dist/{components → types/components}/ai-elements/conversation/ConversationScrollButton.vue.d.ts +0 -0
  722. /package/dist/{components → types/components}/ai-elements/conversation/index.d.ts +0 -0
  723. /package/dist/{components → types/components}/ai-elements/edge/Animated.vue.d.ts +0 -0
  724. /package/dist/{components → types/components}/ai-elements/edge/Temporary.vue.d.ts +0 -0
  725. /package/dist/{components → types/components}/ai-elements/edge/index.d.ts +0 -0
  726. /package/dist/{components → types/components}/ai-elements/image/Image.vue.d.ts +0 -0
  727. /package/dist/{components → types/components}/ai-elements/image/index.d.ts +0 -0
  728. /package/dist/{components → types/components}/ai-elements/inline-citation/InlineCitation.vue.d.ts +0 -0
  729. /package/dist/{components → types/components}/ai-elements/inline-citation/InlineCitationCard.vue.d.ts +0 -0
  730. /package/dist/{components → types/components}/ai-elements/inline-citation/InlineCitationCardBody.vue.d.ts +0 -0
  731. /package/dist/{components → types/components}/ai-elements/inline-citation/InlineCitationCardTrigger.vue.d.ts +0 -0
  732. /package/dist/{components → types/components}/ai-elements/inline-citation/InlineCitationCarousel.vue.d.ts +0 -0
  733. /package/dist/{components → types/components}/ai-elements/inline-citation/InlineCitationCarouselContent.vue.d.ts +0 -0
  734. /package/dist/{components → types/components}/ai-elements/inline-citation/InlineCitationCarouselHeader.vue.d.ts +0 -0
  735. /package/dist/{components → types/components}/ai-elements/inline-citation/InlineCitationCarouselIndex.vue.d.ts +0 -0
  736. /package/dist/{components → types/components}/ai-elements/inline-citation/InlineCitationCarouselItem.vue.d.ts +0 -0
  737. /package/dist/{components → types/components}/ai-elements/inline-citation/InlineCitationCarouselNext.vue.d.ts +0 -0
  738. /package/dist/{components → types/components}/ai-elements/inline-citation/InlineCitationCarouselPrev.vue.d.ts +0 -0
  739. /package/dist/{components → types/components}/ai-elements/inline-citation/InlineCitationQuote.vue.d.ts +0 -0
  740. /package/dist/{components → types/components}/ai-elements/inline-citation/InlineCitationSource.vue.d.ts +0 -0
  741. /package/dist/{components → types/components}/ai-elements/inline-citation/InlineCitationText.vue.d.ts +0 -0
  742. /package/dist/{components → types/components}/ai-elements/inline-citation/index.d.ts +0 -0
  743. /package/dist/{components → types/components}/ai-elements/loader/Loader.vue.d.ts +0 -0
  744. /package/dist/{components → types/components}/ai-elements/loader/LoaderIcon.vue.d.ts +0 -0
  745. /package/dist/{components → types/components}/ai-elements/loader/index.d.ts +0 -0
  746. /package/dist/{components → types/components}/ai-elements/message/Message.vue.d.ts +0 -0
  747. /package/dist/{components → types/components}/ai-elements/message/MessageActions.vue.d.ts +0 -0
  748. /package/dist/{components → types/components}/ai-elements/message/MessageAttachment.vue.d.ts +0 -0
  749. /package/dist/{components → types/components}/ai-elements/message/MessageAttachments.vue.d.ts +0 -0
  750. /package/dist/{components → types/components}/ai-elements/message/MessageAvatar.vue.d.ts +0 -0
  751. /package/dist/{components → types/components}/ai-elements/message/MessageBranch.vue.d.ts +0 -0
  752. /package/dist/{components → types/components}/ai-elements/message/MessageBranchContent.vue.d.ts +0 -0
  753. /package/dist/{components → types/components}/ai-elements/message/MessageBranchNext.vue.d.ts +0 -0
  754. /package/dist/{components → types/components}/ai-elements/message/MessageBranchPage.vue.d.ts +0 -0
  755. /package/dist/{components → types/components}/ai-elements/message/MessageBranchPrevious.vue.d.ts +0 -0
  756. /package/dist/{components → types/components}/ai-elements/message/MessageBranchSelector.vue.d.ts +0 -0
  757. /package/dist/{components → types/components}/ai-elements/message/MessageContent.vue.d.ts +0 -0
  758. /package/dist/{components → types/components}/ai-elements/message/MessageResponse.vue.d.ts +0 -0
  759. /package/dist/{components → types/components}/ai-elements/message/MessageToolbar.vue.d.ts +0 -0
  760. /package/dist/{components → types/components}/ai-elements/message/context.d.ts +0 -0
  761. /package/dist/{components → types/components}/ai-elements/message/index.d.ts +0 -0
  762. /package/dist/{components → types/components}/ai-elements/model-selector/ModelSelector.vue.d.ts +0 -0
  763. /package/dist/{components → types/components}/ai-elements/model-selector/ModelSelectorContent.vue.d.ts +0 -0
  764. /package/dist/{components → types/components}/ai-elements/model-selector/ModelSelectorDialog.vue.d.ts +0 -0
  765. /package/dist/{components → types/components}/ai-elements/model-selector/ModelSelectorEmpty.vue.d.ts +0 -0
  766. /package/dist/{components → types/components}/ai-elements/model-selector/ModelSelectorGroup.vue.d.ts +0 -0
  767. /package/dist/{components → types/components}/ai-elements/model-selector/ModelSelectorInput.vue.d.ts +0 -0
  768. /package/dist/{components → types/components}/ai-elements/model-selector/ModelSelectorItem.vue.d.ts +0 -0
  769. /package/dist/{components → types/components}/ai-elements/model-selector/ModelSelectorList.vue.d.ts +0 -0
  770. /package/dist/{components → types/components}/ai-elements/model-selector/ModelSelectorLogo.vue.d.ts +0 -0
  771. /package/dist/{components → types/components}/ai-elements/model-selector/ModelSelectorLogoGroup.vue.d.ts +0 -0
  772. /package/dist/{components → types/components}/ai-elements/model-selector/ModelSelectorName.vue.d.ts +0 -0
  773. /package/dist/{components → types/components}/ai-elements/model-selector/ModelSelectorSeparator.vue.d.ts +0 -0
  774. /package/dist/{components → types/components}/ai-elements/model-selector/ModelSelectorShortcut.vue.d.ts +0 -0
  775. /package/dist/{components → types/components}/ai-elements/model-selector/ModelSelectorTrigger.vue.d.ts +0 -0
  776. /package/dist/{components → types/components}/ai-elements/model-selector/index.d.ts +0 -0
  777. /package/dist/{components → types/components}/ai-elements/node/Node.vue.d.ts +0 -0
  778. /package/dist/{components → types/components}/ai-elements/node/NodeAction.vue.d.ts +0 -0
  779. /package/dist/{components → types/components}/ai-elements/node/NodeContent.vue.d.ts +0 -0
  780. /package/dist/{components → types/components}/ai-elements/node/NodeDescription.vue.d.ts +0 -0
  781. /package/dist/{components → types/components}/ai-elements/node/NodeFooter.vue.d.ts +0 -0
  782. /package/dist/{components → types/components}/ai-elements/node/NodeHeader.vue.d.ts +0 -0
  783. /package/dist/{components → types/components}/ai-elements/node/NodeTitle.vue.d.ts +0 -0
  784. /package/dist/{components → types/components}/ai-elements/node/index.d.ts +0 -0
  785. /package/dist/{components → types/components}/ai-elements/open-in-chat/OpenIn.vue.d.ts +0 -0
  786. /package/dist/{components → types/components}/ai-elements/open-in-chat/OpenInContent.vue.d.ts +0 -0
  787. /package/dist/{components → types/components}/ai-elements/open-in-chat/OpenInItemLink.vue.d.ts +0 -0
  788. /package/dist/{components → types/components}/ai-elements/open-in-chat/OpenInTrigger.vue.d.ts +0 -0
  789. /package/dist/{components → types/components}/ai-elements/open-in-chat/context.d.ts +0 -0
  790. /package/dist/{components → types/components}/ai-elements/open-in-chat/index.d.ts +0 -0
  791. /package/dist/{components → types/components}/ai-elements/open-in-chat/providers/icons/ChatGPT.vue.d.ts +0 -0
  792. /package/dist/{components → types/components}/ai-elements/open-in-chat/providers/icons/Claude.vue.d.ts +0 -0
  793. /package/dist/{components → types/components}/ai-elements/open-in-chat/providers/icons/Cursor.vue.d.ts +0 -0
  794. /package/dist/{components → types/components}/ai-elements/open-in-chat/providers/icons/Github.vue.d.ts +0 -0
  795. /package/dist/{components → types/components}/ai-elements/open-in-chat/providers/icons/Scira.vue.d.ts +0 -0
  796. /package/dist/{components → types/components}/ai-elements/open-in-chat/providers/icons/V0.vue.d.ts +0 -0
  797. /package/dist/{components → types/components}/ai-elements/open-in-chat/providers/icons/index.d.ts +0 -0
  798. /package/dist/{components → types/components}/ai-elements/open-in-chat/providers/index.d.ts +0 -0
  799. /package/dist/{components → types/components}/ai-elements/open-in-chat/providers/items/OpenInChatGPT.vue.d.ts +0 -0
  800. /package/dist/{components → types/components}/ai-elements/open-in-chat/providers/items/OpenInClaude.vue.d.ts +0 -0
  801. /package/dist/{components → types/components}/ai-elements/open-in-chat/providers/items/OpenInCursor.vue.d.ts +0 -0
  802. /package/dist/{components → types/components}/ai-elements/open-in-chat/providers/items/OpenInScira.vue.d.ts +0 -0
  803. /package/dist/{components → types/components}/ai-elements/open-in-chat/providers/items/OpenInT3.vue.d.ts +0 -0
  804. /package/dist/{components → types/components}/ai-elements/open-in-chat/providers/items/OpenInv0.vue.d.ts +0 -0
  805. /package/dist/{components → types/components}/ai-elements/panel/Panel.vue.d.ts +0 -0
  806. /package/dist/{components → types/components}/ai-elements/panel/index.d.ts +0 -0
  807. /package/dist/{components → types/components}/ai-elements/plan/Plan.vue.d.ts +0 -0
  808. /package/dist/{components → types/components}/ai-elements/plan/PlanAction.vue.d.ts +0 -0
  809. /package/dist/{components → types/components}/ai-elements/plan/PlanContent.vue.d.ts +0 -0
  810. /package/dist/{components → types/components}/ai-elements/plan/PlanDescription.vue.d.ts +0 -0
  811. /package/dist/{components → types/components}/ai-elements/plan/PlanFooter.vue.d.ts +0 -0
  812. /package/dist/{components → types/components}/ai-elements/plan/PlanHeader.vue.d.ts +0 -0
  813. /package/dist/{components → types/components}/ai-elements/plan/PlanTitle.vue.d.ts +0 -0
  814. /package/dist/{components → types/components}/ai-elements/plan/PlanTrigger.vue.d.ts +0 -0
  815. /package/dist/{components → types/components}/ai-elements/plan/context.d.ts +0 -0
  816. /package/dist/{components → types/components}/ai-elements/plan/index.d.ts +0 -0
  817. /package/dist/{components → types/components}/ai-elements/prompt-input/PromptInput.vue.d.ts +0 -0
  818. /package/dist/{components → types/components}/ai-elements/prompt-input/PromptInputActionAddAttachments.vue.d.ts +0 -0
  819. /package/dist/{components → types/components}/ai-elements/prompt-input/PromptInputActionMenu.vue.d.ts +0 -0
  820. /package/dist/{components → types/components}/ai-elements/prompt-input/PromptInputActionMenuContent.vue.d.ts +0 -0
  821. /package/dist/{components → types/components}/ai-elements/prompt-input/PromptInputActionMenuItem.vue.d.ts +0 -0
  822. /package/dist/{components → types/components}/ai-elements/prompt-input/PromptInputActionMenuTrigger.vue.d.ts +0 -0
  823. /package/dist/{components → types/components}/ai-elements/prompt-input/PromptInputAttachment.vue.d.ts +0 -0
  824. /package/dist/{components → types/components}/ai-elements/prompt-input/PromptInputAttachments.vue.d.ts +0 -0
  825. /package/dist/{components → types/components}/ai-elements/prompt-input/PromptInputBody.vue.d.ts +0 -0
  826. /package/dist/{components → types/components}/ai-elements/prompt-input/PromptInputCommand.vue.d.ts +0 -0
  827. /package/dist/{components → types/components}/ai-elements/prompt-input/PromptInputCommandEmpty.vue.d.ts +0 -0
  828. /package/dist/{components → types/components}/ai-elements/prompt-input/PromptInputCommandGroup.vue.d.ts +0 -0
  829. /package/dist/{components → types/components}/ai-elements/prompt-input/PromptInputCommandInput.vue.d.ts +0 -0
  830. /package/dist/{components → types/components}/ai-elements/prompt-input/PromptInputCommandItem.vue.d.ts +0 -0
  831. /package/dist/{components → types/components}/ai-elements/prompt-input/PromptInputCommandList.vue.d.ts +0 -0
  832. /package/dist/{components → types/components}/ai-elements/prompt-input/PromptInputCommandSeparator.vue.d.ts +0 -0
  833. /package/dist/{components → types/components}/ai-elements/prompt-input/PromptInputFooter.vue.d.ts +0 -0
  834. /package/dist/{components → types/components}/ai-elements/prompt-input/PromptInputHeader.vue.d.ts +0 -0
  835. /package/dist/{components → types/components}/ai-elements/prompt-input/PromptInputHoverCard.vue.d.ts +0 -0
  836. /package/dist/{components → types/components}/ai-elements/prompt-input/PromptInputHoverCardContent.vue.d.ts +0 -0
  837. /package/dist/{components → types/components}/ai-elements/prompt-input/PromptInputHoverCardTrigger.vue.d.ts +0 -0
  838. /package/dist/{components → types/components}/ai-elements/prompt-input/PromptInputProvider.vue.d.ts +0 -0
  839. /package/dist/{components → types/components}/ai-elements/prompt-input/PromptInputSelect.vue.d.ts +0 -0
  840. /package/dist/{components → types/components}/ai-elements/prompt-input/PromptInputSelectContent.vue.d.ts +0 -0
  841. /package/dist/{components → types/components}/ai-elements/prompt-input/PromptInputSelectItem.vue.d.ts +0 -0
  842. /package/dist/{components → types/components}/ai-elements/prompt-input/PromptInputSelectTrigger.vue.d.ts +0 -0
  843. /package/dist/{components → types/components}/ai-elements/prompt-input/PromptInputSelectValue.vue.d.ts +0 -0
  844. /package/dist/{components → types/components}/ai-elements/prompt-input/PromptInputSpeechButton.vue.d.ts +0 -0
  845. /package/dist/{components → types/components}/ai-elements/prompt-input/PromptInputTab.vue.d.ts +0 -0
  846. /package/dist/{components → types/components}/ai-elements/prompt-input/PromptInputTabBody.vue.d.ts +0 -0
  847. /package/dist/{components → types/components}/ai-elements/prompt-input/PromptInputTabItem.vue.d.ts +0 -0
  848. /package/dist/{components → types/components}/ai-elements/prompt-input/PromptInputTabLabel.vue.d.ts +0 -0
  849. /package/dist/{components → types/components}/ai-elements/prompt-input/PromptInputTabsList.vue.d.ts +0 -0
  850. /package/dist/{components → types/components}/ai-elements/prompt-input/PromptInputTextarea.vue.d.ts +0 -0
  851. /package/dist/{components → types/components}/ai-elements/prompt-input/PromptInputTools.vue.d.ts +0 -0
  852. /package/dist/{components → types/components}/ai-elements/prompt-input/context.d.ts +0 -0
  853. /package/dist/{components → types/components}/ai-elements/prompt-input/index.d.ts +0 -0
  854. /package/dist/{components → types/components}/ai-elements/prompt-input/types.d.ts +0 -0
  855. /package/dist/{components → types/components}/ai-elements/queue/Queue.vue.d.ts +0 -0
  856. /package/dist/{components → types/components}/ai-elements/queue/QueueItem.vue.d.ts +0 -0
  857. /package/dist/{components → types/components}/ai-elements/queue/QueueItemAction.vue.d.ts +0 -0
  858. /package/dist/{components → types/components}/ai-elements/queue/QueueItemActions.vue.d.ts +0 -0
  859. /package/dist/{components → types/components}/ai-elements/queue/QueueItemAttachment.vue.d.ts +0 -0
  860. /package/dist/{components → types/components}/ai-elements/queue/QueueItemContent.vue.d.ts +0 -0
  861. /package/dist/{components → types/components}/ai-elements/queue/QueueItemDescription.vue.d.ts +0 -0
  862. /package/dist/{components → types/components}/ai-elements/queue/QueueItemFile.vue.d.ts +0 -0
  863. /package/dist/{components → types/components}/ai-elements/queue/QueueItemImage.vue.d.ts +0 -0
  864. /package/dist/{components → types/components}/ai-elements/queue/QueueItemIndicator.vue.d.ts +0 -0
  865. /package/dist/{components → types/components}/ai-elements/queue/QueueList.vue.d.ts +0 -0
  866. /package/dist/{components → types/components}/ai-elements/queue/QueueSection.vue.d.ts +0 -0
  867. /package/dist/{components → types/components}/ai-elements/queue/QueueSectionContent.vue.d.ts +0 -0
  868. /package/dist/{components → types/components}/ai-elements/queue/QueueSectionLabel.vue.d.ts +0 -0
  869. /package/dist/{components → types/components}/ai-elements/queue/QueueSectionTrigger.vue.d.ts +0 -0
  870. /package/dist/{components → types/components}/ai-elements/queue/index.d.ts +0 -0
  871. /package/dist/{components → types/components}/ai-elements/reasoning/Reasoning.vue.d.ts +0 -0
  872. /package/dist/{components → types/components}/ai-elements/reasoning/ReasoningContent.vue.d.ts +0 -0
  873. /package/dist/{components → types/components}/ai-elements/reasoning/ReasoningTrigger.vue.d.ts +0 -0
  874. /package/dist/{components → types/components}/ai-elements/reasoning/context.d.ts +0 -0
  875. /package/dist/{components → types/components}/ai-elements/reasoning/index.d.ts +0 -0
  876. /package/dist/{components → types/components}/ai-elements/shimmer/index.d.ts +0 -0
  877. /package/dist/{components → types/components}/ai-elements/sources/Source.vue.d.ts +0 -0
  878. /package/dist/{components → types/components}/ai-elements/sources/Sources.vue.d.ts +0 -0
  879. /package/dist/{components → types/components}/ai-elements/sources/SourcesContent.vue.d.ts +0 -0
  880. /package/dist/{components → types/components}/ai-elements/sources/SourcesTrigger.vue.d.ts +0 -0
  881. /package/dist/{components → types/components}/ai-elements/sources/index.d.ts +0 -0
  882. /package/dist/{components → types/components}/ai-elements/suggestion/Suggestion.vue.d.ts +0 -0
  883. /package/dist/{components → types/components}/ai-elements/suggestion/Suggestions.vue.d.ts +0 -0
  884. /package/dist/{components → types/components}/ai-elements/suggestion/index.d.ts +0 -0
  885. /package/dist/{components → types/components}/ai-elements/task/Task.vue.d.ts +0 -0
  886. /package/dist/{components → types/components}/ai-elements/task/TaskContent.vue.d.ts +0 -0
  887. /package/dist/{components → types/components}/ai-elements/task/TaskItem.vue.d.ts +0 -0
  888. /package/dist/{components → types/components}/ai-elements/task/TaskItemFile.vue.d.ts +0 -0
  889. /package/dist/{components → types/components}/ai-elements/task/TaskTrigger.vue.d.ts +0 -0
  890. /package/dist/{components → types/components}/ai-elements/task/index.d.ts +0 -0
  891. /package/dist/{components → types/components}/ai-elements/tool/Tool.vue.d.ts +0 -0
  892. /package/dist/{components → types/components}/ai-elements/tool/ToolContent.vue.d.ts +0 -0
  893. /package/dist/{components → types/components}/ai-elements/tool/ToolHeader.vue.d.ts +0 -0
  894. /package/dist/{components → types/components}/ai-elements/tool/ToolInput.vue.d.ts +0 -0
  895. /package/dist/{components → types/components}/ai-elements/tool/ToolOutput.vue.d.ts +0 -0
  896. /package/dist/{components → types/components}/ai-elements/tool/ToolStatusBadge.vue.d.ts +0 -0
  897. /package/dist/{components → types/components}/ai-elements/tool/index.d.ts +0 -0
  898. /package/dist/{components → types/components}/ai-elements/toolbar/Toolbar.vue.d.ts +0 -0
  899. /package/dist/{components → types/components}/ai-elements/toolbar/index.d.ts +0 -0
  900. /package/dist/{components → types/components}/ai-elements/web-preview/WebPreview.vue.d.ts +0 -0
  901. /package/dist/{components → types/components}/ai-elements/web-preview/WebPreviewBody.vue.d.ts +0 -0
  902. /package/dist/{components → types/components}/ai-elements/web-preview/WebPreviewConsole.vue.d.ts +0 -0
  903. /package/dist/{components → types/components}/ai-elements/web-preview/WebPreviewNavigation.vue.d.ts +0 -0
  904. /package/dist/{components → types/components}/ai-elements/web-preview/WebPreviewUrl.vue.d.ts +0 -0
  905. /package/dist/{components → types/components}/ai-elements/web-preview/context.d.ts +0 -0
  906. /package/dist/{components → types/components}/ai-elements/web-preview/index.d.ts +0 -0
  907. /package/dist/{components → types/components}/ui/alert/Alert.vue.d.ts +0 -0
  908. /package/dist/{components → types/components}/ui/alert/AlertDescription.vue.d.ts +0 -0
  909. /package/dist/{components → types/components}/ui/alert/AlertTitle.vue.d.ts +0 -0
  910. /package/dist/{components → types/components}/ui/alert/index.d.ts +0 -0
  911. /package/dist/{components → types/components}/ui/avatar/Avatar.vue.d.ts +0 -0
  912. /package/dist/{components → types/components}/ui/avatar/AvatarFallback.vue.d.ts +0 -0
  913. /package/dist/{components → types/components}/ui/avatar/AvatarImage.vue.d.ts +0 -0
  914. /package/dist/{components → types/components}/ui/avatar/index.d.ts +0 -0
  915. /package/dist/{components → types/components}/ui/badge/Badge.vue.d.ts +0 -0
  916. /package/dist/{components → types/components}/ui/button-group/ButtonGroup.vue.d.ts +0 -0
  917. /package/dist/{components → types/components}/ui/card/Card.vue.d.ts +0 -0
  918. /package/dist/{components → types/components}/ui/card/CardAction.vue.d.ts +0 -0
  919. /package/dist/{components → types/components}/ui/card/CardContent.vue.d.ts +0 -0
  920. /package/dist/{components → types/components}/ui/card/CardDescription.vue.d.ts +0 -0
  921. /package/dist/{components → types/components}/ui/card/CardFooter.vue.d.ts +0 -0
  922. /package/dist/{components → types/components}/ui/card/CardHeader.vue.d.ts +0 -0
  923. /package/dist/{components → types/components}/ui/card/CardTitle.vue.d.ts +0 -0
  924. /package/dist/{components → types/components}/ui/card/index.d.ts +0 -0
  925. /package/dist/{components → types/components}/ui/carousel/CarouselContent.vue.d.ts +0 -0
  926. /package/dist/{components → types/components}/ui/carousel/CarouselItem.vue.d.ts +0 -0
  927. /package/dist/{components → types/components}/ui/carousel/index.d.ts +0 -0
  928. /package/dist/{components → types/components}/ui/carousel/interface.d.ts +0 -0
  929. /package/dist/{components → types/components}/ui/collapsible/Collapsible.vue.d.ts +0 -0
  930. /package/dist/{components → types/components}/ui/collapsible/CollapsibleContent.vue.d.ts +0 -0
  931. /package/dist/{components → types/components}/ui/collapsible/CollapsibleTrigger.vue.d.ts +0 -0
  932. /package/dist/{components → types/components}/ui/collapsible/index.d.ts +0 -0
  933. /package/dist/{components → types/components}/ui/command/Command.vue.d.ts +0 -0
  934. /package/dist/{components → types/components}/ui/command/CommandDialog.vue.d.ts +0 -0
  935. /package/dist/{components → types/components}/ui/command/CommandEmpty.vue.d.ts +0 -0
  936. /package/dist/{components → types/components}/ui/command/CommandGroup.vue.d.ts +0 -0
  937. /package/dist/{components → types/components}/ui/command/CommandInput.vue.d.ts +0 -0
  938. /package/dist/{components → types/components}/ui/command/CommandItem.vue.d.ts +0 -0
  939. /package/dist/{components → types/components}/ui/command/CommandList.vue.d.ts +0 -0
  940. /package/dist/{components → types/components}/ui/command/CommandSeparator.vue.d.ts +0 -0
  941. /package/dist/{components → types/components}/ui/command/CommandShortcut.vue.d.ts +0 -0
  942. /package/dist/{components → types/components}/ui/command/index.d.ts +0 -0
  943. /package/dist/{components → types/components}/ui/dialog/Dialog.vue.d.ts +0 -0
  944. /package/dist/{components → types/components}/ui/dialog/DialogClose.vue.d.ts +0 -0
  945. /package/dist/{components → types/components}/ui/dialog/DialogContent.vue.d.ts +0 -0
  946. /package/dist/{components → types/components}/ui/dialog/DialogDescription.vue.d.ts +0 -0
  947. /package/dist/{components → types/components}/ui/dialog/DialogFooter.vue.d.ts +0 -0
  948. /package/dist/{components → types/components}/ui/dialog/DialogHeader.vue.d.ts +0 -0
  949. /package/dist/{components → types/components}/ui/dialog/DialogOverlay.vue.d.ts +0 -0
  950. /package/dist/{components → types/components}/ui/dialog/DialogScrollContent.vue.d.ts +0 -0
  951. /package/dist/{components → types/components}/ui/dialog/DialogTitle.vue.d.ts +0 -0
  952. /package/dist/{components → types/components}/ui/dialog/DialogTrigger.vue.d.ts +0 -0
  953. /package/dist/{components → types/components}/ui/dialog/index.d.ts +0 -0
  954. /package/dist/{components → types/components}/ui/dropdown-menu/DropdownMenu.vue.d.ts +0 -0
  955. /package/dist/{components → types/components}/ui/dropdown-menu/DropdownMenuCheckboxItem.vue.d.ts +0 -0
  956. /package/dist/{components → types/components}/ui/dropdown-menu/DropdownMenuContent.vue.d.ts +0 -0
  957. /package/dist/{components → types/components}/ui/dropdown-menu/DropdownMenuGroup.vue.d.ts +0 -0
  958. /package/dist/{components → types/components}/ui/dropdown-menu/DropdownMenuItem.vue.d.ts +0 -0
  959. /package/dist/{components → types/components}/ui/dropdown-menu/DropdownMenuLabel.vue.d.ts +0 -0
  960. /package/dist/{components → types/components}/ui/dropdown-menu/DropdownMenuRadioGroup.vue.d.ts +0 -0
  961. /package/dist/{components → types/components}/ui/dropdown-menu/DropdownMenuRadioItem.vue.d.ts +0 -0
  962. /package/dist/{components → types/components}/ui/dropdown-menu/DropdownMenuSeparator.vue.d.ts +0 -0
  963. /package/dist/{components → types/components}/ui/dropdown-menu/DropdownMenuShortcut.vue.d.ts +0 -0
  964. /package/dist/{components → types/components}/ui/dropdown-menu/DropdownMenuSub.vue.d.ts +0 -0
  965. /package/dist/{components → types/components}/ui/dropdown-menu/DropdownMenuSubContent.vue.d.ts +0 -0
  966. /package/dist/{components → types/components}/ui/dropdown-menu/DropdownMenuSubTrigger.vue.d.ts +0 -0
  967. /package/dist/{components → types/components}/ui/dropdown-menu/DropdownMenuTrigger.vue.d.ts +0 -0
  968. /package/dist/{components → types/components}/ui/dropdown-menu/index.d.ts +0 -0
  969. /package/dist/{components → types/components}/ui/hover-card/HoverCard.vue.d.ts +0 -0
  970. /package/dist/{components → types/components}/ui/hover-card/HoverCardContent.vue.d.ts +0 -0
  971. /package/dist/{components → types/components}/ui/hover-card/HoverCardTrigger.vue.d.ts +0 -0
  972. /package/dist/{components → types/components}/ui/hover-card/index.d.ts +0 -0
  973. /package/dist/{components → types/components}/ui/input/Input.vue.d.ts +0 -0
  974. /package/dist/{components → types/components}/ui/input/index.d.ts +0 -0
  975. /package/dist/{components → types/components}/ui/input-group/InputGroup.vue.d.ts +0 -0
  976. /package/dist/{components → types/components}/ui/input-group/InputGroupAddon.vue.d.ts +0 -0
  977. /package/dist/{components → types/components}/ui/input-group/InputGroupInput.vue.d.ts +0 -0
  978. /package/dist/{components → types/components}/ui/input-group/InputGroupText.vue.d.ts +0 -0
  979. /package/dist/{components → types/components}/ui/input-group/InputGroupTextarea.vue.d.ts +0 -0
  980. /package/dist/{components → types/components}/ui/input-group/index.d.ts +0 -0
  981. /package/dist/{components → types/components}/ui/progress/Progress.vue.d.ts +0 -0
  982. /package/dist/{components → types/components}/ui/progress/index.d.ts +0 -0
  983. /package/dist/{components → types/components}/ui/scroll-area/ScrollArea.vue.d.ts +0 -0
  984. /package/dist/{components → types/components}/ui/scroll-area/ScrollBar.vue.d.ts +0 -0
  985. /package/dist/{components → types/components}/ui/scroll-area/index.d.ts +0 -0
  986. /package/dist/{components → types/components}/ui/select/SelectContent.vue.d.ts +0 -0
  987. /package/dist/{components → types/components}/ui/select/SelectGroup.vue.d.ts +0 -0
  988. /package/dist/{components → types/components}/ui/select/SelectItem.vue.d.ts +0 -0
  989. /package/dist/{components → types/components}/ui/select/SelectItemText.vue.d.ts +0 -0
  990. /package/dist/{components → types/components}/ui/select/SelectLabel.vue.d.ts +0 -0
  991. /package/dist/{components → types/components}/ui/select/SelectScrollDownButton.vue.d.ts +0 -0
  992. /package/dist/{components → types/components}/ui/select/SelectScrollUpButton.vue.d.ts +0 -0
  993. /package/dist/{components → types/components}/ui/select/SelectSeparator.vue.d.ts +0 -0
  994. /package/dist/{components → types/components}/ui/select/SelectTrigger.vue.d.ts +0 -0
  995. /package/dist/{components → types/components}/ui/select/SelectValue.vue.d.ts +0 -0
  996. /package/dist/{components → types/components}/ui/select/index.d.ts +0 -0
  997. /package/dist/{components → types/components}/ui/separator/index.d.ts +0 -0
  998. /package/dist/{components → types/components}/ui/textarea/Textarea.vue.d.ts +0 -0
  999. /package/dist/{components → types/components}/ui/textarea/index.d.ts +0 -0
  1000. /package/dist/{components → types/components}/ui/tooltip/Tooltip.vue.d.ts +0 -0
  1001. /package/dist/{components → types/components}/ui/tooltip/TooltipContent.vue.d.ts +0 -0
  1002. /package/dist/{components → types/components}/ui/tooltip/TooltipProvider.vue.d.ts +0 -0
  1003. /package/dist/{components → types/components}/ui/tooltip/TooltipTrigger.vue.d.ts +0 -0
  1004. /package/dist/{components → types/components}/ui/tooltip/index.d.ts +0 -0
  1005. /package/dist/{index.d.ts → types/index.d.ts} +0 -0
  1006. /package/dist/{lib → types/lib}/utils.d.ts +0 -0
  1007. /package/dist/{main.d.ts → types/main.d.ts} +0 -0
  1008. /package/dist/{request → types/request}/index.d.ts +0 -0
@@ -1,4053 +0,0 @@
1
- import { i as __toESM, t as __commonJSMin } from "./chunk-DNh5sLlG.js";
2
- import "./marked.esm-D9xINNve.js";
3
- import "./chunk-FPAJGGOC-nWbO3e1v.js";
4
- import "./isArrayLikeObject-Dz_TDfw0.js";
5
- import "./_baseUniq-f11MNaXe.js";
6
- import "./_basePickBy-CkZky1V-.js";
7
- import "./isEmpty-CCym_WUL.js";
8
- import { c as getEdgeId, i as cleanAndMerge } from "./chunk-S3R3BYOJ-DHTsHczu.js";
9
- import "./clone-BRioDvRr.js";
10
- import "./chunk-O7ZBX7Z2-D8Yaukr5.js";
11
- import "./chunk-S6J4BHB3-8RrHs9bD.js";
12
- import "./chunk-LBM3YZW2-D8lrIfGo.js";
13
- import "./chunk-76Q3JFCE-Db4Lkmow.js";
14
- import "./chunk-T53DSG4Q-C2BDA_QX.js";
15
- import "./chunk-LHMN2FUI-DLQ0i8hl.js";
16
- import "./chunk-FWNWRKHM-CjcwRw2u.js";
17
- import { g as log, h as __name, p as select_default } from "./src-B-SBGd0A.js";
18
- import { B as setAccTitle, C as getDiagramTitle, G as setupGraphViewbox, I as sanitizeText, U as setDiagramTitle, _ as getAccDescription, a as clear, b as getConfig2, d as defaultConfig_default, v as getAccTitle, y as getConfig, z as setAccDescription } from "./chunk-ABZYJK2D-BZvlc6Ej.js";
19
- import "./math-CJAnbPum.js";
20
- import { t as selectSvgElement } from "./chunk-EXTU4WIE-BjMX7pAs.js";
21
- import "./dist-CrnZo_23.js";
22
- import { i as registerIconPacks, n as createText, o as unknownIcon, r as getIconSVG } from "./chunk-JA3XYJ7Z-Dhh1_u_p.js";
23
- import { t as populateCommonDb } from "./chunk-4BX2VUAB-BGxl5VGr.js";
24
- import { t as parse } from "./mermaid-parser.core-DVXSGppp.js";
25
- import { t as cytoscape$1 } from "./cytoscape.esm-CWqS6puh.js";
26
- var require_layout_base = /* @__PURE__ */ __commonJSMin(((e, t) => {
27
- (function(n, r) {
28
- 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();
29
- })(e, function() {
30
- return (function(e) {
31
- var t = {};
32
- function n(r) {
33
- if (t[r]) return t[r].exports;
34
- var i = t[r] = {
35
- i: r,
36
- l: !1,
37
- exports: {}
38
- };
39
- return e[r].call(i.exports, i, i.exports, n), i.l = !0, i.exports;
40
- }
41
- return n.m = e, n.c = t, n.i = function(e) {
42
- return e;
43
- }, n.d = function(e, t, r) {
44
- n.o(e, t) || Object.defineProperty(e, t, {
45
- configurable: !1,
46
- enumerable: !0,
47
- get: r
48
- });
49
- }, n.n = function(e) {
50
- var t = e && e.__esModule ? function() {
51
- return e.default;
52
- } : function() {
53
- return e;
54
- };
55
- return n.d(t, "a", t), t;
56
- }, n.o = function(e, t) {
57
- return Object.prototype.hasOwnProperty.call(e, t);
58
- }, n.p = "", n(n.s = 28);
59
- })([
60
- (function(e, t, n) {
61
- function r() {}
62
- 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;
63
- }),
64
- (function(e, t, n) {
65
- var r = n(2), i = n(8), a = n(9);
66
- function o(e, t, n) {
67
- r.call(this, n), this.isOverlapingSourceAndTarget = !1, this.vGraphObject = n, this.bendpoints = [], this.source = e, this.target = t;
68
- }
69
- for (var s in o.prototype = Object.create(r.prototype), r) o[s] = r[s];
70
- o.prototype.getSource = function() {
71
- return this.source;
72
- }, o.prototype.getTarget = function() {
73
- return this.target;
74
- }, o.prototype.isInterGraph = function() {
75
- return this.isInterGraph;
76
- }, o.prototype.getLength = function() {
77
- return this.length;
78
- }, o.prototype.isOverlapingSourceAndTarget = function() {
79
- return this.isOverlapingSourceAndTarget;
80
- }, o.prototype.getBendpoints = function() {
81
- return this.bendpoints;
82
- }, o.prototype.getLca = function() {
83
- return this.lca;
84
- }, o.prototype.getSourceInLca = function() {
85
- return this.sourceInLca;
86
- }, o.prototype.getTargetInLca = function() {
87
- return this.targetInLca;
88
- }, o.prototype.getOtherEnd = function(e) {
89
- if (this.source === e) return this.target;
90
- if (this.target === e) return this.source;
91
- throw "Node is not incident with this edge";
92
- }, o.prototype.getOtherEndInGraph = function(e, t) {
93
- for (var n = this.getOtherEnd(e), r = t.getGraphManager().getRoot();;) {
94
- if (n.getOwner() == t) return n;
95
- if (n.getOwner() == r) break;
96
- n = n.getOwner().getParent();
97
- }
98
- return null;
99
- }, o.prototype.updateLength = function() {
100
- var e = [
101
- ,
102
- ,
103
- ,
104
- ,
105
- ];
106
- 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));
107
- }, o.prototype.updateLengthSimple = function() {
108
- 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);
109
- }, e.exports = o;
110
- }),
111
- (function(e, t, n) {
112
- function r(e) {
113
- this.vGraphObject = e;
114
- }
115
- e.exports = r;
116
- }),
117
- (function(e, t, n) {
118
- var r = n(2), i = n(10), a = n(13), o = n(0), s = n(16), c = n(5);
119
- function l(e, t, n, o) {
120
- 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();
121
- }
122
- for (var u in l.prototype = Object.create(r.prototype), r) l[u] = r[u];
123
- l.prototype.getEdges = function() {
124
- return this.edges;
125
- }, l.prototype.getChild = function() {
126
- return this.child;
127
- }, l.prototype.getOwner = function() {
128
- return this.owner;
129
- }, l.prototype.getWidth = function() {
130
- return this.rect.width;
131
- }, l.prototype.setWidth = function(e) {
132
- this.rect.width = e;
133
- }, l.prototype.getHeight = function() {
134
- return this.rect.height;
135
- }, l.prototype.setHeight = function(e) {
136
- this.rect.height = e;
137
- }, l.prototype.getCenterX = function() {
138
- return this.rect.x + this.rect.width / 2;
139
- }, l.prototype.getCenterY = function() {
140
- return this.rect.y + this.rect.height / 2;
141
- }, l.prototype.getCenter = function() {
142
- return new c(this.rect.x + this.rect.width / 2, this.rect.y + this.rect.height / 2);
143
- }, l.prototype.getLocation = function() {
144
- return new c(this.rect.x, this.rect.y);
145
- }, l.prototype.getRect = function() {
146
- return this.rect;
147
- }, l.prototype.getDiagonal = function() {
148
- return Math.sqrt(this.rect.width * this.rect.width + this.rect.height * this.rect.height);
149
- }, l.prototype.getHalfTheDiagonal = function() {
150
- return Math.sqrt(this.rect.height * this.rect.height + this.rect.width * this.rect.width) / 2;
151
- }, l.prototype.setRect = function(e, t) {
152
- this.rect.x = e.x, this.rect.y = e.y, this.rect.width = t.width, this.rect.height = t.height;
153
- }, l.prototype.setCenter = function(e, t) {
154
- this.rect.x = e - this.rect.width / 2, this.rect.y = t - this.rect.height / 2;
155
- }, l.prototype.setLocation = function(e, t) {
156
- this.rect.x = e, this.rect.y = t;
157
- }, l.prototype.moveBy = function(e, t) {
158
- this.rect.x += e, this.rect.y += t;
159
- }, l.prototype.getEdgeListToNode = function(e) {
160
- var t = [], n = this;
161
- return n.edges.forEach(function(r) {
162
- if (r.target == e) {
163
- if (r.source != n) throw "Incorrect edge source!";
164
- t.push(r);
165
- }
166
- }), t;
167
- }, l.prototype.getEdgesBetween = function(e) {
168
- var t = [], n = this;
169
- return n.edges.forEach(function(r) {
170
- if (!(r.source == n || r.target == n)) throw "Incorrect edge source and/or target";
171
- (r.target == e || r.source == e) && t.push(r);
172
- }), t;
173
- }, l.prototype.getNeighborsList = function() {
174
- var e = /* @__PURE__ */ new Set(), t = this;
175
- return t.edges.forEach(function(n) {
176
- if (n.source == t) e.add(n.target);
177
- else {
178
- if (n.target != t) throw "Incorrect incidency!";
179
- e.add(n.source);
180
- }
181
- }), e;
182
- }, l.prototype.withChildren = function() {
183
- var e = /* @__PURE__ */ new Set(), t, n;
184
- 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) {
185
- e.add(t);
186
- });
187
- return e;
188
- }, l.prototype.getNoOfChildren = function() {
189
- var e = 0, t;
190
- if (this.child == null) e = 1;
191
- else for (var n = this.child.getNodes(), r = 0; r < n.length; r++) t = n[r], e += t.getNoOfChildren();
192
- return e == 0 && (e = 1), e;
193
- }, l.prototype.getEstimatedSize = function() {
194
- if (this.estimatedSize == i.MIN_VALUE) throw "assert failed";
195
- return this.estimatedSize;
196
- }, l.prototype.calcEstimatedSize = function() {
197
- 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);
198
- }, l.prototype.scatter = function() {
199
- var e, t, n = -o.INITIAL_WORLD_BOUNDARY, r = o.INITIAL_WORLD_BOUNDARY;
200
- e = o.WORLD_CENTER_X + s.nextDouble() * (r - n) + n;
201
- var i = -o.INITIAL_WORLD_BOUNDARY, a = o.INITIAL_WORLD_BOUNDARY;
202
- t = o.WORLD_CENTER_Y + s.nextDouble() * (a - i) + i, this.rect.x = e, this.rect.y = t;
203
- }, l.prototype.updateBounds = function() {
204
- if (this.getChild() == null) throw "assert failed";
205
- if (this.getChild().getNodes().length != 0) {
206
- var e = this.getChild();
207
- 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) {
208
- var t = e.getRight() - e.getLeft(), n = e.getBottom() - e.getTop();
209
- this.labelWidth && (this.labelPosHorizontal == "left" ? (this.rect.x -= this.labelWidth, this.setWidth(t + this.labelWidth)) : this.labelPosHorizontal == "center" && this.labelWidth > t ? (this.rect.x -= (this.labelWidth - t) / 2, this.setWidth(this.labelWidth)) : this.labelPosHorizontal == "right" && this.setWidth(t + this.labelWidth)), this.labelHeight && (this.labelPosVertical == "top" ? (this.rect.y -= this.labelHeight, this.setHeight(n + this.labelHeight)) : this.labelPosVertical == "center" && this.labelHeight > n ? (this.rect.y -= (this.labelHeight - n) / 2, this.setHeight(this.labelHeight)) : this.labelPosVertical == "bottom" && this.setHeight(n + this.labelHeight));
210
- }
211
- }
212
- }, l.prototype.getInclusionTreeDepth = function() {
213
- if (this.inclusionTreeDepth == i.MAX_VALUE) throw "assert failed";
214
- return this.inclusionTreeDepth;
215
- }, l.prototype.transform = function(e) {
216
- var t = this.rect.x;
217
- t > o.WORLD_BOUNDARY ? t = o.WORLD_BOUNDARY : t < -o.WORLD_BOUNDARY && (t = -o.WORLD_BOUNDARY);
218
- var n = this.rect.y;
219
- n > o.WORLD_BOUNDARY ? n = o.WORLD_BOUNDARY : n < -o.WORLD_BOUNDARY && (n = -o.WORLD_BOUNDARY);
220
- var r = new c(t, n), i = e.inverseTransformPoint(r);
221
- this.setLocation(i.x, i.y);
222
- }, l.prototype.getLeft = function() {
223
- return this.rect.x;
224
- }, l.prototype.getRight = function() {
225
- return this.rect.x + this.rect.width;
226
- }, l.prototype.getTop = function() {
227
- return this.rect.y;
228
- }, l.prototype.getBottom = function() {
229
- return this.rect.y + this.rect.height;
230
- }, l.prototype.getParent = function() {
231
- return this.owner == null ? null : this.owner.getParent();
232
- }, e.exports = l;
233
- }),
234
- (function(e, t, n) {
235
- var r = n(0);
236
- function i() {}
237
- for (var a in r) i[a] = r[a];
238
- 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;
239
- }),
240
- (function(e, t, n) {
241
- function r(e, t) {
242
- e == null && t == null ? (this.x = 0, this.y = 0) : (this.x = e, this.y = t);
243
- }
244
- r.prototype.getX = function() {
245
- return this.x;
246
- }, r.prototype.getY = function() {
247
- return this.y;
248
- }, r.prototype.setX = function(e) {
249
- this.x = e;
250
- }, r.prototype.setY = function(e) {
251
- this.y = e;
252
- }, r.prototype.getDifference = function(e) {
253
- return new DimensionD(this.x - e.x, this.y - e.y);
254
- }, r.prototype.getCopy = function() {
255
- return new r(this.x, this.y);
256
- }, r.prototype.translate = function(e) {
257
- return this.x += e.width, this.y += e.height, this;
258
- }, e.exports = r;
259
- }),
260
- (function(e, t, n) {
261
- var r = n(2), i = n(10), a = n(0), o = n(7), s = n(3), c = n(1), l = n(13), u = n(12), d = n(11);
262
- function f(e, t, n) {
263
- 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);
264
- }
265
- for (var p in f.prototype = Object.create(r.prototype), r) f[p] = r[p];
266
- f.prototype.getNodes = function() {
267
- return this.nodes;
268
- }, f.prototype.getEdges = function() {
269
- return this.edges;
270
- }, f.prototype.getGraphManager = function() {
271
- return this.graphManager;
272
- }, f.prototype.getParent = function() {
273
- return this.parent;
274
- }, f.prototype.getLeft = function() {
275
- return this.left;
276
- }, f.prototype.getRight = function() {
277
- return this.right;
278
- }, f.prototype.getTop = function() {
279
- return this.top;
280
- }, f.prototype.getBottom = function() {
281
- return this.bottom;
282
- }, f.prototype.isConnected = function() {
283
- return this.isConnected;
284
- }, f.prototype.add = function(e, t, n) {
285
- if (t == null && n == null) {
286
- var r = e;
287
- if (this.graphManager == null) throw "Graph has no graph mgr!";
288
- if (this.getNodes().indexOf(r) > -1) throw "Node already in graph!";
289
- return r.owner = this, this.getNodes().push(r), r;
290
- } else {
291
- var i = e;
292
- if (!(this.getNodes().indexOf(t) > -1 && this.getNodes().indexOf(n) > -1)) throw "Source or target not in graph!";
293
- if (!(t.owner == n.owner && t.owner == this)) throw "Both owners must be this graph!";
294
- 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;
295
- }
296
- }, f.prototype.remove = function(e) {
297
- var t = e;
298
- if (e instanceof s) {
299
- if (t == null) throw "Node is null!";
300
- if (!(t.owner != null && t.owner == this)) throw "Owner graph is invalid!";
301
- if (this.graphManager == null) throw "Owner graph manager is invalid!";
302
- 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);
303
- var o = this.nodes.indexOf(t);
304
- if (o == -1) throw "Node not in owner node list!";
305
- this.nodes.splice(o, 1);
306
- } else if (e instanceof c) {
307
- var r = e;
308
- if (r == null) throw "Edge is null!";
309
- if (!(r.source != null && r.target != null)) throw "Source and/or target is null!";
310
- 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!";
311
- var l = r.source.edges.indexOf(r), u = r.target.edges.indexOf(r);
312
- if (!(l > -1 && u > -1)) throw "Source and/or target doesn't know this edge!";
313
- r.source.edges.splice(l, 1), r.target != r.source && r.target.edges.splice(u, 1);
314
- var o = r.source.owner.getEdges().indexOf(r);
315
- if (o == -1) throw "Not in owner's edge list!";
316
- r.source.owner.getEdges().splice(o, 1);
317
- }
318
- }, f.prototype.updateLeftTop = function() {
319
- for (var e = i.MAX_VALUE, t = i.MAX_VALUE, n, r, a, o = this.getNodes(), s = o.length, c = 0; c < s; c++) {
320
- var l = o[c];
321
- n = l.getTop(), r = l.getLeft(), e > n && (e = n), t > r && (t = r);
322
- }
323
- 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));
324
- }, f.prototype.updateBounds = function(e) {
325
- 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++) {
326
- var h = f[m];
327
- 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);
328
- }
329
- var g = new l(t, r, n - t, a - r);
330
- 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;
331
- }, f.calculateBounds = function(e) {
332
- 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++) {
333
- var p = e[f];
334
- 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);
335
- }
336
- return new l(t, r, n - t, a - r);
337
- }, f.prototype.getInclusionTreeDepth = function() {
338
- return this == this.graphManager.getRoot() ? 1 : this.parent.getInclusionTreeDepth();
339
- }, f.prototype.getEstimatedSize = function() {
340
- if (this.estimatedSize == i.MIN_VALUE) throw "assert failed";
341
- return this.estimatedSize;
342
- }, f.prototype.calcEstimatedSize = function() {
343
- for (var e = 0, t = this.nodes, n = t.length, r = 0; r < n; r++) {
344
- var i = t[r];
345
- e += i.calcEstimatedSize();
346
- }
347
- return e == 0 ? this.estimatedSize = a.EMPTY_COMPOUND_NODE_SIZE : this.estimatedSize = e / Math.sqrt(this.nodes.length), this.estimatedSize;
348
- }, f.prototype.updateConnected = function() {
349
- var e = this;
350
- if (this.nodes.length == 0) {
351
- this.isConnected = !0;
352
- return;
353
- }
354
- var t = new d(), n = /* @__PURE__ */ new Set(), r = this.nodes[0], i, a;
355
- for (r.withChildren().forEach(function(e) {
356
- t.push(e), n.add(e);
357
- }); t.length !== 0;) {
358
- r = t.shift(), i = r.getEdges();
359
- 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) {
360
- t.push(e), n.add(e);
361
- });
362
- }
363
- if (this.isConnected = !1, n.size >= this.nodes.length) {
364
- var c = 0;
365
- n.forEach(function(t) {
366
- t.owner == e && c++;
367
- }), c == this.nodes.length && (this.isConnected = !0);
368
- }
369
- }, e.exports = f;
370
- }),
371
- (function(e, t, n) {
372
- var r, i = n(1);
373
- function a(e) {
374
- r = n(6), this.layout = e, this.graphs = [], this.edges = [];
375
- }
376
- a.prototype.addRoot = function() {
377
- var e = this.layout.newGraph(), t = this.layout.newNode(null), n = this.add(e, t);
378
- return this.setRootGraph(n), this.rootGraph;
379
- }, a.prototype.add = function(e, t, n, r, i) {
380
- if (n == null && r == null && i == null) {
381
- if (e == null) throw "Graph is null!";
382
- if (t == null) throw "Parent node is null!";
383
- if (this.graphs.indexOf(e) > -1) throw "Graph already in this graph mgr!";
384
- if (this.graphs.push(e), e.parent != null) throw "Already has a parent!";
385
- if (t.child != null) throw "Already has a child!";
386
- return e.parent = t, t.child = e, e;
387
- } else {
388
- i = n, r = t, n = e;
389
- var a = r.getOwner(), o = i.getOwner();
390
- if (!(a != null && a.getGraphManager() == this)) throw "Source not in this graph mgr!";
391
- if (!(o != null && o.getGraphManager() == this)) throw "Target not in this graph mgr!";
392
- if (a == o) return n.isInterGraph = !1, a.add(n, r, i);
393
- if (n.isInterGraph = !0, n.source = r, n.target = i, this.edges.indexOf(n) > -1) throw "Edge already in inter-graph edge list!";
394
- if (this.edges.push(n), !(n.source != null && n.target != null)) throw "Edge source and/or target is null!";
395
- if (!(n.source.edges.indexOf(n) == -1 && n.target.edges.indexOf(n) == -1)) throw "Edge already in source and/or target incidency list!";
396
- return n.source.edges.push(n), n.target.edges.push(n), n;
397
- }
398
- }, a.prototype.remove = function(e) {
399
- if (e instanceof r) {
400
- var t = e;
401
- if (t.getGraphManager() != this) throw "Graph not in this graph mgr";
402
- if (!(t == this.rootGraph || t.parent != null && t.parent.graphManager == this)) throw "Invalid parent node!";
403
- var n = [];
404
- n = n.concat(t.getEdges());
405
- for (var a, o = n.length, s = 0; s < o; s++) a = n[s], t.remove(a);
406
- var c = [];
407
- c = c.concat(t.getNodes());
408
- var l;
409
- o = c.length;
410
- for (var s = 0; s < o; s++) l = c[s], t.remove(l);
411
- t == this.rootGraph && this.setRootGraph(null);
412
- var u = this.graphs.indexOf(t);
413
- this.graphs.splice(u, 1), t.parent = null;
414
- } else if (e instanceof i) {
415
- if (a = e, a == null) throw "Edge is null!";
416
- if (!a.isInterGraph) throw "Not an inter-graph edge!";
417
- if (!(a.source != null && a.target != null)) throw "Source and/or target is null!";
418
- if (!(a.source.edges.indexOf(a) != -1 && a.target.edges.indexOf(a) != -1)) throw "Source and/or target doesn't know this edge!";
419
- var u = a.source.edges.indexOf(a);
420
- 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!";
421
- if (a.source.owner.getGraphManager().edges.indexOf(a) == -1) throw "Not in owner graph manager's edge list!";
422
- var u = a.source.owner.getGraphManager().edges.indexOf(a);
423
- a.source.owner.getGraphManager().edges.splice(u, 1);
424
- }
425
- }, a.prototype.updateBounds = function() {
426
- this.rootGraph.updateBounds(!0);
427
- }, a.prototype.getGraphs = function() {
428
- return this.graphs;
429
- }, a.prototype.getAllNodes = function() {
430
- if (this.allNodes == null) {
431
- for (var e = [], t = this.getGraphs(), n = t.length, r = 0; r < n; r++) e = e.concat(t[r].getNodes());
432
- this.allNodes = e;
433
- }
434
- return this.allNodes;
435
- }, a.prototype.resetAllNodes = function() {
436
- this.allNodes = null;
437
- }, a.prototype.resetAllEdges = function() {
438
- this.allEdges = null;
439
- }, a.prototype.resetAllNodesToApplyGravitation = function() {
440
- this.allNodesToApplyGravitation = null;
441
- }, a.prototype.getAllEdges = function() {
442
- if (this.allEdges == null) {
443
- var e = [], t = this.getGraphs();
444
- t.length;
445
- for (var n = 0; n < t.length; n++) e = e.concat(t[n].getEdges());
446
- e = e.concat(this.edges), this.allEdges = e;
447
- }
448
- return this.allEdges;
449
- }, a.prototype.getAllNodesToApplyGravitation = function() {
450
- return this.allNodesToApplyGravitation;
451
- }, a.prototype.setAllNodesToApplyGravitation = function(e) {
452
- if (this.allNodesToApplyGravitation != null) throw "assert failed";
453
- this.allNodesToApplyGravitation = e;
454
- }, a.prototype.getRoot = function() {
455
- return this.rootGraph;
456
- }, a.prototype.setRootGraph = function(e) {
457
- if (e.getGraphManager() != this) throw "Root not in this graph mgr!";
458
- this.rootGraph = e, e.parent ??= this.layout.newNode("Root node");
459
- }, a.prototype.getLayout = function() {
460
- return this.layout;
461
- }, a.prototype.isOneAncestorOfOther = function(e, t) {
462
- if (!(e != null && t != null)) throw "assert failed";
463
- if (e == t) return !0;
464
- var n = e.getOwner(), r;
465
- do {
466
- if (r = n.getParent(), r == null) break;
467
- if (r == t) return !0;
468
- if (n = r.getOwner(), n == null) break;
469
- } while (!0);
470
- n = t.getOwner();
471
- do {
472
- if (r = n.getParent(), r == null) break;
473
- if (r == e) return !0;
474
- if (n = r.getOwner(), n == null) break;
475
- } while (!0);
476
- return !1;
477
- }, a.prototype.calcLowestCommonAncestors = function() {
478
- for (var e, t, n, r, i, a = this.getAllEdges(), o = a.length, s = 0; s < o; s++) {
479
- if (e = a[s], t = e.source, n = e.target, e.lca = null, e.sourceInLca = t, e.targetInLca = n, t == n) {
480
- e.lca = t.getOwner();
481
- continue;
482
- }
483
- for (r = t.getOwner(); e.lca == null;) {
484
- for (e.targetInLca = n, i = n.getOwner(); e.lca == null;) {
485
- if (i == r) {
486
- e.lca = i;
487
- break;
488
- }
489
- if (i == this.rootGraph) break;
490
- if (e.lca != null) throw "assert failed";
491
- e.targetInLca = i.getParent(), i = e.targetInLca.getOwner();
492
- }
493
- if (r == this.rootGraph) break;
494
- e.lca ?? (e.sourceInLca = r.getParent(), r = e.sourceInLca.getOwner());
495
- }
496
- if (e.lca == null) throw "assert failed";
497
- }
498
- }, a.prototype.calcLowestCommonAncestor = function(e, t) {
499
- if (e == t) return e.getOwner();
500
- var n = e.getOwner();
501
- do {
502
- if (n == null) break;
503
- var r = t.getOwner();
504
- do {
505
- if (r == null) break;
506
- if (r == n) return r;
507
- r = r.getParent().getOwner();
508
- } while (!0);
509
- n = n.getParent().getOwner();
510
- } while (!0);
511
- return n;
512
- }, a.prototype.calcInclusionTreeDepths = function(e, t) {
513
- e == null && t == null && (e = this.rootGraph, t = 1);
514
- 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);
515
- }, a.prototype.includesInvalidEdge = function() {
516
- for (var e, t = [], n = this.edges.length, r = 0; r < n; r++) e = this.edges[r], this.isOneAncestorOfOther(e.source, e.target) && t.push(e);
517
- for (var r = 0; r < t.length; r++) this.remove(t[r]);
518
- return !1;
519
- }, e.exports = a;
520
- }),
521
- (function(e, t, n) {
522
- var r = n(12);
523
- function i() {}
524
- i.calcSeparationAmount = function(e, t, n, r) {
525
- if (!e.intersects(t)) throw "assert failed";
526
- var i = [, ,];
527
- 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()));
528
- var a = Math.abs((t.getCenterY() - e.getCenterY()) / (t.getCenterX() - e.getCenterX()));
529
- t.getCenterY() === e.getCenterY() && t.getCenterX() === e.getCenterX() && (a = 1);
530
- var o = a * n[0], s = n[1] / a;
531
- 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);
532
- }, i.decideDirectionsForOverlappingNodes = function(e, t, n) {
533
- e.getCenterX() < t.getCenterX() ? n[0] = -1 : n[0] = 1, e.getCenterY() < t.getCenterY() ? n[1] = -1 : n[1] = 1;
534
- }, i.getIntersection2 = function(e, t, n) {
535
- var r = e.getCenterX(), i = e.getCenterY(), a = t.getCenterX(), o = t.getCenterY();
536
- if (e.intersects(t)) return n[0] = r, n[1] = i, n[2] = a, n[3] = o, !0;
537
- 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;
538
- if (r === a) {
539
- if (i > o) return n[0] = r, n[1] = c, n[2] = a, n[3] = y, !1;
540
- if (i < o) return n[0] = r, n[1] = d, n[2] = a, n[3] = g, !1;
541
- } else if (i === o) {
542
- if (r > a) return n[0] = s, n[1] = i, n[2] = _, n[3] = o, !1;
543
- if (r < a) return n[0] = l, n[1] = i, n[2] = h, n[3] = o, !1;
544
- } else {
545
- 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;
546
- 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;
547
- 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) {
548
- case 1:
549
- j = c, A = r + -m / D, n[0] = A, n[1] = j;
550
- break;
551
- case 2:
552
- A = f, j = i + p * D, n[0] = A, n[1] = j;
553
- break;
554
- case 3:
555
- j = d, A = r + m / D, n[0] = A, n[1] = j;
556
- break;
557
- case 4:
558
- A = u, j = i + -p * D, n[0] = A, n[1] = j;
559
- break;
560
- }
561
- if (!w) switch (k) {
562
- case 1:
563
- N = g, M = a + -S / D, n[2] = M, n[3] = N;
564
- break;
565
- case 2:
566
- M = b, N = o + x * D, n[2] = M, n[3] = N;
567
- break;
568
- case 3:
569
- N = y, M = a + S / D, n[2] = M, n[3] = N;
570
- break;
571
- case 4:
572
- M = v, N = o + -x * D, n[2] = M, n[3] = N;
573
- break;
574
- }
575
- }
576
- return !1;
577
- }, i.getCardinalDirection = function(e, t, n) {
578
- return e > t ? n : 1 + n % 4;
579
- }, i.getIntersection = function(e, t, n, i) {
580
- if (i == null) return this.getIntersection2(e, t, n);
581
- 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;
582
- 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));
583
- }, i.angleOfVector = function(e, t, n, r) {
584
- var i = void 0;
585
- 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;
586
- }, i.doIntersect = function(e, t, n, r) {
587
- 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);
588
- if (f === 0) return !1;
589
- var p = ((d - l) * (u - i) + (c - u) * (d - a)) / f, m = ((a - s) * (u - i) + (o - i) * (d - a)) / f;
590
- return 0 < p && p < 1 && 0 < m && m < 1;
591
- }, i.findCircleLineIntersections = function(e, t, n, r, i, a, o) {
592
- var s = (n - e) * (n - e) + (r - t) * (r - t), c = 2 * ((e - i) * (n - e) + (t - a) * (r - t)), l = (e - i) * (e - i) + (t - a) * (t - a) - o * o;
593
- if (c * c - 4 * s * l >= 0) {
594
- var u = (-c + Math.sqrt(c * c - 4 * s * l)) / (2 * s), d = (-c - Math.sqrt(c * c - 4 * s * l)) / (2 * s);
595
- return u >= 0 && u <= 1 ? [u] : d >= 0 && d <= 1 ? [d] : null;
596
- } else return null;
597
- }, 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;
598
- }),
599
- (function(e, t, n) {
600
- function r() {}
601
- r.sign = function(e) {
602
- return e > 0 ? 1 : e < 0 ? -1 : 0;
603
- }, r.floor = function(e) {
604
- return e < 0 ? Math.ceil(e) : Math.floor(e);
605
- }, r.ceil = function(e) {
606
- return e < 0 ? Math.floor(e) : Math.ceil(e);
607
- }, e.exports = r;
608
- }),
609
- (function(e, t, n) {
610
- function r() {}
611
- r.MAX_VALUE = 2147483647, r.MIN_VALUE = -2147483648, e.exports = r;
612
- }),
613
- (function(e, t, n) {
614
- var r = function() {
615
- function e(e, t) {
616
- for (var n = 0; n < t.length; n++) {
617
- var r = t[n];
618
- r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
619
- }
620
- }
621
- return function(t, n, r) {
622
- return n && e(t.prototype, n), r && e(t, r), t;
623
- };
624
- }();
625
- function i(e, t) {
626
- if (!(e instanceof t)) throw TypeError("Cannot call a class as a function");
627
- }
628
- var a = function(e) {
629
- return {
630
- value: e,
631
- next: null,
632
- prev: null
633
- };
634
- }, o = function(e, t, n, r) {
635
- 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;
636
- }, s = function(e, t) {
637
- var n = e.prev, r = e.next;
638
- 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;
639
- };
640
- e.exports = function() {
641
- function e(t) {
642
- var n = this;
643
- i(this, e), this.length = 0, this.head = null, this.tail = null, t?.forEach(function(e) {
644
- return n.push(e);
645
- });
646
- }
647
- return r(e, [
648
- {
649
- key: "size",
650
- value: function() {
651
- return this.length;
652
- }
653
- },
654
- {
655
- key: "insertBefore",
656
- value: function(e, t) {
657
- return o(t.prev, a(e), t, this);
658
- }
659
- },
660
- {
661
- key: "insertAfter",
662
- value: function(e, t) {
663
- return o(t, a(e), t.next, this);
664
- }
665
- },
666
- {
667
- key: "insertNodeBefore",
668
- value: function(e, t) {
669
- return o(t.prev, e, t, this);
670
- }
671
- },
672
- {
673
- key: "insertNodeAfter",
674
- value: function(e, t) {
675
- return o(t, e, t.next, this);
676
- }
677
- },
678
- {
679
- key: "push",
680
- value: function(e) {
681
- return o(this.tail, a(e), null, this);
682
- }
683
- },
684
- {
685
- key: "unshift",
686
- value: function(e) {
687
- return o(null, a(e), this.head, this);
688
- }
689
- },
690
- {
691
- key: "remove",
692
- value: function(e) {
693
- return s(e, this);
694
- }
695
- },
696
- {
697
- key: "pop",
698
- value: function() {
699
- return s(this.tail, this).value;
700
- }
701
- },
702
- {
703
- key: "popNode",
704
- value: function() {
705
- return s(this.tail, this);
706
- }
707
- },
708
- {
709
- key: "shift",
710
- value: function() {
711
- return s(this.head, this).value;
712
- }
713
- },
714
- {
715
- key: "shiftNode",
716
- value: function() {
717
- return s(this.head, this);
718
- }
719
- },
720
- {
721
- key: "get_object_at",
722
- value: function(e) {
723
- if (e <= this.length()) {
724
- for (var t = 1, n = this.head; t < e;) n = n.next, t++;
725
- return n.value;
726
- }
727
- }
728
- },
729
- {
730
- key: "set_object_at",
731
- value: function(e, t) {
732
- if (e <= this.length()) {
733
- for (var n = 1, r = this.head; n < e;) r = r.next, n++;
734
- r.value = t;
735
- }
736
- }
737
- }
738
- ]), e;
739
- }();
740
- }),
741
- (function(e, t, n) {
742
- function r(e, t, n) {
743
- 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);
744
- }
745
- r.prototype.getX = function() {
746
- return this.x;
747
- }, r.prototype.getY = function() {
748
- return this.y;
749
- }, r.prototype.getLocation = function() {
750
- return new r(this.x, this.y);
751
- }, r.prototype.setLocation = function(e, t, n) {
752
- 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)));
753
- }, r.prototype.move = function(e, t) {
754
- this.x = e, this.y = t;
755
- }, r.prototype.translate = function(e, t) {
756
- this.x += e, this.y += t;
757
- }, r.prototype.equals = function(e) {
758
- if (e.constructor.name == "Point") {
759
- var t = e;
760
- return this.x == t.x && this.y == t.y;
761
- }
762
- return this == e;
763
- }, r.prototype.toString = function() {
764
- return new r().constructor.name + "[x=" + this.x + ",y=" + this.y + "]";
765
- }, e.exports = r;
766
- }),
767
- (function(e, t, n) {
768
- function r(e, t, n, r) {
769
- 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);
770
- }
771
- r.prototype.getX = function() {
772
- return this.x;
773
- }, r.prototype.setX = function(e) {
774
- this.x = e;
775
- }, r.prototype.getY = function() {
776
- return this.y;
777
- }, r.prototype.setY = function(e) {
778
- this.y = e;
779
- }, r.prototype.getWidth = function() {
780
- return this.width;
781
- }, r.prototype.setWidth = function(e) {
782
- this.width = e;
783
- }, r.prototype.getHeight = function() {
784
- return this.height;
785
- }, r.prototype.setHeight = function(e) {
786
- this.height = e;
787
- }, r.prototype.getRight = function() {
788
- return this.x + this.width;
789
- }, r.prototype.getBottom = function() {
790
- return this.y + this.height;
791
- }, r.prototype.intersects = function(e) {
792
- return !(this.getRight() < e.x || this.getBottom() < e.y || e.getRight() < this.x || e.getBottom() < this.y);
793
- }, r.prototype.getCenterX = function() {
794
- return this.x + this.width / 2;
795
- }, r.prototype.getMinX = function() {
796
- return this.getX();
797
- }, r.prototype.getMaxX = function() {
798
- return this.getX() + this.width;
799
- }, r.prototype.getCenterY = function() {
800
- return this.y + this.height / 2;
801
- }, r.prototype.getMinY = function() {
802
- return this.getY();
803
- }, r.prototype.getMaxY = function() {
804
- return this.getY() + this.height;
805
- }, r.prototype.getWidthHalf = function() {
806
- return this.width / 2;
807
- }, r.prototype.getHeightHalf = function() {
808
- return this.height / 2;
809
- }, e.exports = r;
810
- }),
811
- (function(e, t, n) {
812
- var r = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? function(e) {
813
- return typeof e;
814
- } : function(e) {
815
- return e && typeof Symbol == "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e;
816
- };
817
- function i() {}
818
- i.lastID = 0, i.createID = function(e) {
819
- return i.isPrimitive(e) ? e : e.uniqueID == null ? (e.uniqueID = i.getString(), i.lastID++, e.uniqueID) : e.uniqueID;
820
- }, i.getString = function(e) {
821
- return e ??= i.lastID, "Object#" + e;
822
- }, i.isPrimitive = function(e) {
823
- var t = e === void 0 ? "undefined" : r(e);
824
- return e == null || t != "object" && t != "function";
825
- }, e.exports = i;
826
- }),
827
- (function(e, t, n) {
828
- function r(e) {
829
- if (Array.isArray(e)) {
830
- for (var t = 0, n = Array(e.length); t < e.length; t++) n[t] = e[t];
831
- return n;
832
- } else return Array.from(e);
833
- }
834
- var i = n(0), a = n(7), o = n(3), s = n(1), c = n(6), l = n(5), u = n(17), d = n(29);
835
- function f(e) {
836
- 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);
837
- }
838
- f.RANDOM_SEED = 1, f.prototype = Object.create(d.prototype), f.prototype.getGraphManager = function() {
839
- return this.graphManager;
840
- }, f.prototype.getAllNodes = function() {
841
- return this.graphManager.getAllNodes();
842
- }, f.prototype.getAllEdges = function() {
843
- return this.graphManager.getAllEdges();
844
- }, f.prototype.getAllNodesToApplyGravitation = function() {
845
- return this.graphManager.getAllNodesToApplyGravitation();
846
- }, f.prototype.newGraphManager = function() {
847
- var e = new a(this);
848
- return this.graphManager = e, e;
849
- }, f.prototype.newGraph = function(e) {
850
- return new c(null, this.graphManager, e);
851
- }, f.prototype.newNode = function(e) {
852
- return new o(this.graphManager, e);
853
- }, f.prototype.newEdge = function(e) {
854
- return new s(null, null, e);
855
- }, f.prototype.checkLayoutSuccess = function() {
856
- return this.graphManager.getRoot() == null || this.graphManager.getRoot().getNodes().length == 0 || this.graphManager.includesInvalidEdge();
857
- }, f.prototype.runLayout = function() {
858
- this.isLayoutFinished = !1, this.tilingPreLayout && this.tilingPreLayout(), this.initParameters();
859
- var e = this.checkLayoutSuccess() ? !1 : this.layout();
860
- return i.ANIMATE === "during" ? !1 : (e && (this.isSubLayout || this.doPostLayout()), this.tilingPostLayout && this.tilingPostLayout(), this.isLayoutFinished = !0, e);
861
- }, f.prototype.doPostLayout = function() {
862
- this.incremental || this.transform(), this.update();
863
- }, f.prototype.update2 = function() {
864
- if (this.createBendsAsNeeded && (this.createBendpointsFromDummyNodes(), this.graphManager.resetAllEdges()), !this.isRemoteUse) {
865
- for (var e = this.graphManager.getAllEdges(), t = 0; t < e.length; t++) e[t];
866
- for (var n = this.graphManager.getRoot().getNodes(), t = 0; t < n.length; t++) n[t];
867
- this.update(this.graphManager.getRoot());
868
- }
869
- }, f.prototype.update = function(e) {
870
- if (e == null) this.update2();
871
- else if (e instanceof o) {
872
- var t = e;
873
- if (t.getChild() != null) for (var n = t.getChild().getNodes(), r = 0; r < n.length; r++) update(n[r]);
874
- t.vGraphObject != null && t.vGraphObject.update(t);
875
- } else if (e instanceof s) {
876
- var i = e;
877
- i.vGraphObject != null && i.vGraphObject.update(i);
878
- } else if (e instanceof c) {
879
- var a = e;
880
- a.vGraphObject != null && a.vGraphObject.update(a);
881
- }
882
- }, f.prototype.initParameters = function() {
883
- 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);
884
- }, f.prototype.transform = function(e) {
885
- if (e == null) this.transform(new l(0, 0));
886
- else {
887
- var t = new u(), n = this.graphManager.getRoot().updateLeftTop();
888
- if (n != null) {
889
- t.setWorldOrgX(e.x), t.setWorldOrgY(e.y), t.setDeviceOrgX(n.x), t.setDeviceOrgY(n.y);
890
- for (var r = this.getAllNodes(), i, a = 0; a < r.length; a++) i = r[a], i.transform(t);
891
- }
892
- }
893
- }, f.prototype.positionNodesRandomly = function(e) {
894
- if (e == null) this.positionNodesRandomly(this.getGraphManager().getRoot()), this.getGraphManager().getRoot().updateBounds(!0);
895
- 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());
896
- }, f.prototype.getFlatForest = function() {
897
- for (var e = [], t = !0, n = this.graphManager.getRoot().getNodes(), i = !0, a = 0; a < n.length; a++) n[a].getChild() != null && (i = !1);
898
- if (!i) return e;
899
- var o = /* @__PURE__ */ new Set(), s = [], c = /* @__PURE__ */ new Map(), l = [];
900
- for (l = l.concat(n); l.length > 0 && t;) {
901
- for (s.push(l[0]); s.length > 0 && t;) {
902
- var u = s[0];
903
- s.splice(0, 1), o.add(u);
904
- for (var d = u.getEdges(), a = 0; a < d.length; a++) {
905
- var f = d[a].getOtherEnd(u);
906
- if (c.get(u) != f) if (!o.has(f)) s.push(f), c.set(f, u);
907
- else {
908
- t = !1;
909
- break;
910
- }
911
- }
912
- }
913
- if (!t) e = [];
914
- else {
915
- var p = [].concat(r(o));
916
- e.push(p);
917
- for (var a = 0; a < p.length; a++) {
918
- var m = p[a], h = l.indexOf(m);
919
- h > -1 && l.splice(h, 1);
920
- }
921
- o = /* @__PURE__ */ new Set(), c = /* @__PURE__ */ new Map();
922
- }
923
- }
924
- return e;
925
- }, f.prototype.createDummyNodesForBendpoints = function(e) {
926
- for (var t = [], n = e.source, r = this.graphManager.calcLowestCommonAncestor(e.source, e.target), i = 0; i < e.bendpoints.length; i++) {
927
- var a = this.newNode(null);
928
- a.setRect(new Point(0, 0), new Dimension(1, 1)), r.add(a);
929
- var o = this.newEdge(null);
930
- this.graphManager.add(o, n, a), t.add(a), n = a;
931
- }
932
- var o = this.newEdge(null);
933
- return this.graphManager.add(o, n, e.target), this.edgeToDummyNodes.set(e, t), e.isInterGraph() ? this.graphManager.remove(e) : r.remove(e), t;
934
- }, f.prototype.createBendpointsFromDummyNodes = function() {
935
- var e = [];
936
- e = e.concat(this.graphManager.getAllEdges()), e = [].concat(r(this.edgeToDummyNodes.keys()), e);
937
- for (var t = 0; t < e.length; t++) {
938
- var n = e[t];
939
- if (n.bendpoints.length > 0) {
940
- for (var i = this.edgeToDummyNodes.get(n), a = 0; a < i.length; a++) {
941
- var o = i[a], s = new l(o.getCenterX(), o.getCenterY()), c = n.bendpoints.get(a);
942
- c.x = s.x, c.y = s.y, o.getOwner().remove(o);
943
- }
944
- this.graphManager.add(n, n.source, n.target);
945
- }
946
- }
947
- }, f.transform = function(e, t, n, r) {
948
- if (n != null && r != null) {
949
- var i = t;
950
- if (e <= 50) {
951
- var a = t / n;
952
- i -= (t - a) / 50 * (50 - e);
953
- } else {
954
- var o = t * r;
955
- i += (o - t) / 50 * (e - 50);
956
- }
957
- return i;
958
- } else {
959
- var s, c;
960
- return e <= 50 ? (s = 9 * t / 500, c = t / 10) : (s = 9 * t / 50, c = -8 * t), s * e + c;
961
- }
962
- }, f.findCenterOfTree = function(e) {
963
- var t = [];
964
- t = t.concat(e);
965
- var n = [], r = /* @__PURE__ */ new Map(), i = !1, a = null;
966
- (t.length == 1 || t.length == 2) && (i = !0, a = t[0]);
967
- for (var o = 0; o < t.length; o++) {
968
- var s = t[o], c = s.getNeighborsList().size;
969
- r.set(s, s.getNeighborsList().size), c == 1 && n.push(s);
970
- }
971
- var l = [];
972
- for (l = l.concat(n); !i;) {
973
- var u = [];
974
- u = u.concat(l), l = [];
975
- for (var o = 0; o < t.length; o++) {
976
- var s = t[o], d = t.indexOf(s);
977
- d >= 0 && t.splice(d, 1), s.getNeighborsList().forEach(function(e) {
978
- if (n.indexOf(e) < 0) {
979
- var t = r.get(e) - 1;
980
- t == 1 && l.push(e), r.set(e, t);
981
- }
982
- });
983
- }
984
- n = n.concat(l), (t.length == 1 || t.length == 2) && (i = !0, a = t[0]);
985
- }
986
- return a;
987
- }, f.prototype.setGraphManager = function(e) {
988
- this.graphManager = e;
989
- }, e.exports = f;
990
- }),
991
- (function(e, t, n) {
992
- function r() {}
993
- r.seed = 1, r.x = 0, r.nextDouble = function() {
994
- return r.x = Math.sin(r.seed++) * 1e4, r.x - Math.floor(r.x);
995
- }, e.exports = r;
996
- }),
997
- (function(e, t, n) {
998
- var r = n(5);
999
- function i(e, t) {
1000
- this.lworldOrgX = 0, this.lworldOrgY = 0, this.ldeviceOrgX = 0, this.ldeviceOrgY = 0, this.lworldExtX = 1, this.lworldExtY = 1, this.ldeviceExtX = 1, this.ldeviceExtY = 1;
1001
- }
1002
- i.prototype.getWorldOrgX = function() {
1003
- return this.lworldOrgX;
1004
- }, i.prototype.setWorldOrgX = function(e) {
1005
- this.lworldOrgX = e;
1006
- }, i.prototype.getWorldOrgY = function() {
1007
- return this.lworldOrgY;
1008
- }, i.prototype.setWorldOrgY = function(e) {
1009
- this.lworldOrgY = e;
1010
- }, i.prototype.getWorldExtX = function() {
1011
- return this.lworldExtX;
1012
- }, i.prototype.setWorldExtX = function(e) {
1013
- this.lworldExtX = e;
1014
- }, i.prototype.getWorldExtY = function() {
1015
- return this.lworldExtY;
1016
- }, i.prototype.setWorldExtY = function(e) {
1017
- this.lworldExtY = e;
1018
- }, i.prototype.getDeviceOrgX = function() {
1019
- return this.ldeviceOrgX;
1020
- }, i.prototype.setDeviceOrgX = function(e) {
1021
- this.ldeviceOrgX = e;
1022
- }, i.prototype.getDeviceOrgY = function() {
1023
- return this.ldeviceOrgY;
1024
- }, i.prototype.setDeviceOrgY = function(e) {
1025
- this.ldeviceOrgY = e;
1026
- }, i.prototype.getDeviceExtX = function() {
1027
- return this.ldeviceExtX;
1028
- }, i.prototype.setDeviceExtX = function(e) {
1029
- this.ldeviceExtX = e;
1030
- }, i.prototype.getDeviceExtY = function() {
1031
- return this.ldeviceExtY;
1032
- }, i.prototype.setDeviceExtY = function(e) {
1033
- this.ldeviceExtY = e;
1034
- }, i.prototype.transformX = function(e) {
1035
- var t = 0, n = this.lworldExtX;
1036
- return n != 0 && (t = this.ldeviceOrgX + (e - this.lworldOrgX) * this.ldeviceExtX / n), t;
1037
- }, i.prototype.transformY = function(e) {
1038
- var t = 0, n = this.lworldExtY;
1039
- return n != 0 && (t = this.ldeviceOrgY + (e - this.lworldOrgY) * this.ldeviceExtY / n), t;
1040
- }, i.prototype.inverseTransformX = function(e) {
1041
- var t = 0, n = this.ldeviceExtX;
1042
- return n != 0 && (t = this.lworldOrgX + (e - this.ldeviceOrgX) * this.lworldExtX / n), t;
1043
- }, i.prototype.inverseTransformY = function(e) {
1044
- var t = 0, n = this.ldeviceExtY;
1045
- return n != 0 && (t = this.lworldOrgY + (e - this.ldeviceOrgY) * this.lworldExtY / n), t;
1046
- }, i.prototype.inverseTransformPoint = function(e) {
1047
- return new r(this.inverseTransformX(e.x), this.inverseTransformY(e.y));
1048
- }, e.exports = i;
1049
- }),
1050
- (function(e, t, n) {
1051
- function r(e) {
1052
- if (Array.isArray(e)) {
1053
- for (var t = 0, n = Array(e.length); t < e.length; t++) n[t] = e[t];
1054
- return n;
1055
- } else return Array.from(e);
1056
- }
1057
- var i = n(15), a = n(4), o = n(0), s = n(8), c = n(9);
1058
- function l() {
1059
- i.call(this), this.useSmartIdealEdgeLengthCalculation = a.DEFAULT_USE_SMART_IDEAL_EDGE_LENGTH_CALCULATION, this.gravityConstant = a.DEFAULT_GRAVITY_STRENGTH, this.compoundGravityConstant = a.DEFAULT_COMPOUND_GRAVITY_STRENGTH, this.gravityRangeFactor = a.DEFAULT_GRAVITY_RANGE_FACTOR, this.compoundGravityRangeFactor = a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR, this.displacementThresholdPerNode = 3 * a.DEFAULT_EDGE_LENGTH / 100, this.coolingFactor = a.DEFAULT_COOLING_FACTOR_INCREMENTAL, this.initialCoolingFactor = a.DEFAULT_COOLING_FACTOR_INCREMENTAL, this.totalDisplacement = 0, this.oldTotalDisplacement = 0, this.maxIterations = a.MAX_ITERATIONS;
1060
- }
1061
- for (var u in l.prototype = Object.create(i.prototype), i) l[u] = i[u];
1062
- l.prototype.initParameters = function() {
1063
- i.prototype.initParameters.call(this, arguments), this.totalIterations = 0, this.notAnimatedIterations = 0, this.useFRGridVariant = a.DEFAULT_USE_SMART_REPULSION_RANGE_CALCULATION, this.grid = [];
1064
- }, l.prototype.calcIdealEdgeLengths = function() {
1065
- for (var e, t, n, r, i, s, c, l = this.getGraphManager().getAllEdges(), u = 0; u < l.length; u++) e = l[u], t = e.idealLength, e.isInterGraph && (r = e.getSource(), i = e.getTarget(), s = e.getSourceInLca().getEstimatedSize(), c = e.getTargetInLca().getEstimatedSize(), this.useSmartIdealEdgeLengthCalculation && (e.idealLength += s + c - 2 * o.SIMPLE_NODE_SIZE), n = e.getLca().getInclusionTreeDepth(), e.idealLength += t * a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR * (r.getInclusionTreeDepth() + i.getInclusionTreeDepth() - 2 * n));
1066
- }, l.prototype.initSpringEmbedder = function() {
1067
- var e = this.getAllNodes().length;
1068
- 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.displacementThresholdPerNode = 3 * a.DEFAULT_EDGE_LENGTH / 100, this.totalDisplacementThreshold = this.displacementThresholdPerNode * this.getAllNodes().length, this.repulsionRange = this.calcRepulsionRange();
1069
- }, l.prototype.calcSpringForces = function() {
1070
- for (var e = this.getAllEdges(), t, n = 0; n < e.length; n++) t = e[n], this.calcSpringForce(t, t.idealLength);
1071
- }, l.prototype.calcRepulsionForces = function() {
1072
- 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;
1073
- 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);
1074
- 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);
1075
- }, l.prototype.calcGravitationalForces = function() {
1076
- for (var e, t = this.getAllNodesToApplyGravitation(), n = 0; n < t.length; n++) e = t[n], this.calcGravitationalForce(e);
1077
- }, l.prototype.moveNodes = function() {
1078
- for (var e = this.getAllNodes(), t, n = 0; n < e.length; n++) t = e[n], t.move();
1079
- }, l.prototype.calcSpringForce = function(e, t) {
1080
- var n = e.getSource(), r = e.getTarget(), i, a, o, s;
1081
- if (this.uniformLeafNodeSizes && n.getChild() == null && r.getChild() == null) e.updateLengthSimple();
1082
- else if (e.updateLength(), e.isOverlapingSourceAndTarget) return;
1083
- i = e.getLength(), i != 0 && (a = e.edgeElasticity * (i - t), o = a * (e.lengthX / i), s = a * (e.lengthY / i), n.springForceX += o, n.springForceY += s, r.springForceX -= o, r.springForceY -= s);
1084
- }, l.prototype.calcRepulsionForce = function(e, t) {
1085
- var n = e.getRect(), r = t.getRect(), i = [, ,], o = [
1086
- ,
1087
- ,
1088
- ,
1089
- ,
1090
- ], l, u, d, f, p, m, h;
1091
- if (n.intersects(r)) {
1092
- s.calcSeparationAmount(n, r, i, a.DEFAULT_EDGE_LENGTH / 2), m = 2 * i[0], h = 2 * i[1];
1093
- var g = e.noOfChildren * t.noOfChildren / (e.noOfChildren + t.noOfChildren);
1094
- e.repulsionForceX -= g * m, e.repulsionForceY -= g * h, t.repulsionForceX += g * m, t.repulsionForceY += g * h;
1095
- } 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 = (e.nodeRepulsion / 2 + t.nodeRepulsion / 2) * 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;
1096
- }, l.prototype.calcGravitationalForce = function(e) {
1097
- 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;
1098
- 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));
1099
- }, l.prototype.isConverged = function() {
1100
- var e, t = !1;
1101
- 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;
1102
- }, l.prototype.animate = function() {
1103
- this.animationDuringLayout && !this.isSubLayout && (this.notAnimatedIterations == this.animationPeriod ? (this.update(), this.notAnimatedIterations = 0) : this.notAnimatedIterations++);
1104
- }, l.prototype.calcNoOfChildrenForAllNodes = function() {
1105
- for (var e, t = this.graphManager.getAllNodes(), n = 0; n < t.length; n++) e = t[n], e.noOfChildren = e.getNoOfChildren();
1106
- }, l.prototype.calcGrid = function(e) {
1107
- var t = 0, n = 0;
1108
- t = parseInt(Math.ceil((e.getRight() - e.getLeft()) / this.repulsionRange)), n = parseInt(Math.ceil((e.getBottom() - e.getTop()) / this.repulsionRange));
1109
- for (var r = Array(t), i = 0; i < t; i++) r[i] = Array(n);
1110
- for (var i = 0; i < t; i++) for (var a = 0; a < n; a++) r[i][a] = [];
1111
- return r;
1112
- }, l.prototype.addNodeToGrid = function(e, t, n) {
1113
- var r = 0, i = 0, a = 0, o = 0;
1114
- 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));
1115
- 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);
1116
- }, l.prototype.updateGrid = function() {
1117
- var e, t, n = this.getAllNodes();
1118
- 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());
1119
- }, l.prototype.calculateRepulsionForceOfANode = function(e, t, n, i) {
1120
- if (this.totalIterations % a.GRID_CALCULATION_CHECK_PERIOD == 1 && n || i) {
1121
- var o = /* @__PURE__ */ new Set();
1122
- e.surrounding = [];
1123
- 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)) {
1124
- 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)) {
1125
- 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);
1126
- f <= this.repulsionRange && p <= this.repulsionRange && o.add(s);
1127
- }
1128
- }
1129
- e.surrounding = [].concat(r(o));
1130
- }
1131
- for (l = 0; l < e.surrounding.length; l++) this.calcRepulsionForce(e, e.surrounding[l]);
1132
- }, l.prototype.calcRepulsionRange = function() {
1133
- return 0;
1134
- }, e.exports = l;
1135
- }),
1136
- (function(e, t, n) {
1137
- var r = n(1), i = n(4);
1138
- function a(e, t, n) {
1139
- r.call(this, e, t, n), this.idealLength = i.DEFAULT_EDGE_LENGTH, this.edgeElasticity = i.DEFAULT_SPRING_STRENGTH;
1140
- }
1141
- for (var o in a.prototype = Object.create(r.prototype), r) a[o] = r[o];
1142
- e.exports = a;
1143
- }),
1144
- (function(e, t, n) {
1145
- var r = n(3), i = n(4);
1146
- function a(e, t, n, a) {
1147
- r.call(this, e, t, n, a), this.nodeRepulsion = i.DEFAULT_REPULSION_STRENGTH, this.springForceX = 0, this.springForceY = 0, this.repulsionForceX = 0, this.repulsionForceY = 0, this.gravitationForceX = 0, this.gravitationForceY = 0, this.displacementX = 0, this.displacementY = 0, this.startX = 0, this.finishX = 0, this.startY = 0, this.finishY = 0, this.surrounding = [];
1148
- }
1149
- for (var o in a.prototype = Object.create(r.prototype), r) a[o] = r[o];
1150
- a.prototype.setGridCoordinates = function(e, t, n, r) {
1151
- this.startX = e, this.finishX = t, this.startY = n, this.finishY = r;
1152
- }, e.exports = a;
1153
- }),
1154
- (function(e, t, n) {
1155
- function r(e, t) {
1156
- this.width = 0, this.height = 0, e !== null && t !== null && (this.height = t, this.width = e);
1157
- }
1158
- r.prototype.getWidth = function() {
1159
- return this.width;
1160
- }, r.prototype.setWidth = function(e) {
1161
- this.width = e;
1162
- }, r.prototype.getHeight = function() {
1163
- return this.height;
1164
- }, r.prototype.setHeight = function(e) {
1165
- this.height = e;
1166
- }, e.exports = r;
1167
- }),
1168
- (function(e, t, n) {
1169
- var r = n(14);
1170
- function i() {
1171
- this.map = {}, this.keys = [];
1172
- }
1173
- i.prototype.put = function(e, t) {
1174
- var n = r.createID(e);
1175
- this.contains(n) || (this.map[n] = t, this.keys.push(e));
1176
- }, i.prototype.contains = function(e) {
1177
- return r.createID(e), this.map[e] != null;
1178
- }, i.prototype.get = function(e) {
1179
- var t = r.createID(e);
1180
- return this.map[t];
1181
- }, i.prototype.keySet = function() {
1182
- return this.keys;
1183
- }, e.exports = i;
1184
- }),
1185
- (function(e, t, n) {
1186
- var r = n(14);
1187
- function i() {
1188
- this.set = {};
1189
- }
1190
- i.prototype.add = function(e) {
1191
- var t = r.createID(e);
1192
- this.contains(t) || (this.set[t] = e);
1193
- }, i.prototype.remove = function(e) {
1194
- delete this.set[r.createID(e)];
1195
- }, i.prototype.clear = function() {
1196
- this.set = {};
1197
- }, i.prototype.contains = function(e) {
1198
- return this.set[r.createID(e)] == e;
1199
- }, i.prototype.isEmpty = function() {
1200
- return this.size() === 0;
1201
- }, i.prototype.size = function() {
1202
- return Object.keys(this.set).length;
1203
- }, i.prototype.addAllTo = function(e) {
1204
- for (var t = Object.keys(this.set), n = t.length, r = 0; r < n; r++) e.push(this.set[t[r]]);
1205
- }, i.prototype.size = function() {
1206
- return Object.keys(this.set).length;
1207
- }, i.prototype.addAll = function(e) {
1208
- for (var t = e.length, n = 0; n < t; n++) {
1209
- var r = e[n];
1210
- this.add(r);
1211
- }
1212
- }, e.exports = i;
1213
- }),
1214
- (function(e, t, n) {
1215
- function r() {}
1216
- r.multMat = function(e, t) {
1217
- for (var n = [], r = 0; r < e.length; r++) {
1218
- n[r] = [];
1219
- for (var i = 0; i < t[0].length; i++) {
1220
- n[r][i] = 0;
1221
- for (var a = 0; a < e[0].length; a++) n[r][i] += e[r][a] * t[a][i];
1222
- }
1223
- }
1224
- return n;
1225
- }, r.transpose = function(e) {
1226
- for (var t = [], n = 0; n < e[0].length; n++) {
1227
- t[n] = [];
1228
- for (var r = 0; r < e.length; r++) t[n][r] = e[r][n];
1229
- }
1230
- return t;
1231
- }, r.multCons = function(e, t) {
1232
- for (var n = [], r = 0; r < e.length; r++) n[r] = e[r] * t;
1233
- return n;
1234
- }, r.minusOp = function(e, t) {
1235
- for (var n = [], r = 0; r < e.length; r++) n[r] = e[r] - t[r];
1236
- return n;
1237
- }, r.dotProduct = function(e, t) {
1238
- for (var n = 0, r = 0; r < e.length; r++) n += e[r] * t[r];
1239
- return n;
1240
- }, r.mag = function(e) {
1241
- return Math.sqrt(this.dotProduct(e, e));
1242
- }, r.normalize = function(e) {
1243
- for (var t = [], n = this.mag(e), r = 0; r < e.length; r++) t[r] = e[r] / n;
1244
- return t;
1245
- }, r.multGamma = function(e) {
1246
- for (var t = [], n = 0, r = 0; r < e.length; r++) n += e[r];
1247
- n *= -1 / e.length;
1248
- for (var i = 0; i < e.length; i++) t[i] = n + e[i];
1249
- return t;
1250
- }, r.multL = function(e, t, n) {
1251
- for (var r = [], i = [], a = [], o = 0; o < t[0].length; o++) {
1252
- for (var s = 0, c = 0; c < t.length; c++) s += -.5 * t[c][o] * e[c];
1253
- i[o] = s;
1254
- }
1255
- for (var l = 0; l < n.length; l++) {
1256
- for (var u = 0, d = 0; d < n.length; d++) u += n[l][d] * i[d];
1257
- a[l] = u;
1258
- }
1259
- for (var f = 0; f < t.length; f++) {
1260
- for (var p = 0, m = 0; m < t[0].length; m++) p += t[f][m] * a[m];
1261
- r[f] = p;
1262
- }
1263
- return r;
1264
- }, e.exports = r;
1265
- }),
1266
- (function(e, t, n) {
1267
- var r = function() {
1268
- function e(e, t) {
1269
- for (var n = 0; n < t.length; n++) {
1270
- var r = t[n];
1271
- r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
1272
- }
1273
- }
1274
- return function(t, n, r) {
1275
- return n && e(t.prototype, n), r && e(t, r), t;
1276
- };
1277
- }();
1278
- function i(e, t) {
1279
- if (!(e instanceof t)) throw TypeError("Cannot call a class as a function");
1280
- }
1281
- var a = n(11);
1282
- e.exports = function() {
1283
- function e(t, n) {
1284
- i(this, e), (n !== null || n !== void 0) && (this.compareFunction = this._defaultCompareFunction);
1285
- var r = void 0;
1286
- r = t instanceof a ? t.size() : t.length, this._quicksort(t, 0, r - 1);
1287
- }
1288
- return r(e, [
1289
- {
1290
- key: "_quicksort",
1291
- value: function(e, t, n) {
1292
- if (t < n) {
1293
- var r = this._partition(e, t, n);
1294
- this._quicksort(e, t, r), this._quicksort(e, r + 1, n);
1295
- }
1296
- }
1297
- },
1298
- {
1299
- key: "_partition",
1300
- value: function(e, t, n) {
1301
- for (var r = this._get(e, t), i = t, a = n;;) {
1302
- for (; this.compareFunction(r, this._get(e, a));) a--;
1303
- for (; this.compareFunction(this._get(e, i), r);) i++;
1304
- if (i < a) this._swap(e, i, a), i++, a--;
1305
- else return a;
1306
- }
1307
- }
1308
- },
1309
- {
1310
- key: "_get",
1311
- value: function(e, t) {
1312
- return e instanceof a ? e.get_object_at(t) : e[t];
1313
- }
1314
- },
1315
- {
1316
- key: "_set",
1317
- value: function(e, t, n) {
1318
- e instanceof a ? e.set_object_at(t, n) : e[t] = n;
1319
- }
1320
- },
1321
- {
1322
- key: "_swap",
1323
- value: function(e, t, n) {
1324
- var r = this._get(e, t);
1325
- this._set(e, t, this._get(e, n)), this._set(e, n, r);
1326
- }
1327
- },
1328
- {
1329
- key: "_defaultCompareFunction",
1330
- value: function(e, t) {
1331
- return t > e;
1332
- }
1333
- }
1334
- ]), e;
1335
- }();
1336
- }),
1337
- (function(e, t, n) {
1338
- function r() {}
1339
- r.svd = function(e) {
1340
- this.U = null, this.V = null, this.s = null, this.m = 0, this.n = 0, this.m = e.length, this.n = e[0].length;
1341
- var t = Math.min(this.m, this.n);
1342
- this.s = function(e) {
1343
- for (var t = []; e-- > 0;) t.push(0);
1344
- return t;
1345
- }(Math.min(this.m + 1, this.n)), this.U = function(e) {
1346
- return function e(t) {
1347
- if (t.length == 0) return 0;
1348
- for (var n = [], r = 0; r < t[0]; r++) n.push(e(t.slice(1)));
1349
- return n;
1350
- }(e);
1351
- }([this.m, t]), this.V = function(e) {
1352
- return function e(t) {
1353
- if (t.length == 0) return 0;
1354
- for (var n = [], r = 0; r < t[0]; r++) n.push(e(t.slice(1)));
1355
- return n;
1356
- }(e);
1357
- }([this.n, this.n]);
1358
- for (var n = function(e) {
1359
- for (var t = []; e-- > 0;) t.push(0);
1360
- return t;
1361
- }(this.n), i = function(e) {
1362
- for (var t = []; e-- > 0;) t.push(0);
1363
- return t;
1364
- }(this.m), a = !0, o = !0, s = Math.min(this.m - 1, this.n), c = Math.max(0, Math.min(this.n - 2, this.m)), l = 0; l < Math.max(s, c); l++) {
1365
- if (l < s) {
1366
- this.s[l] = 0;
1367
- for (var u = l; u < this.m; u++) this.s[l] = r.hypot(this.s[l], e[u][l]);
1368
- if (this.s[l] !== 0) {
1369
- e[l][l] < 0 && (this.s[l] = -this.s[l]);
1370
- for (var d = l; d < this.m; d++) e[d][l] /= this.s[l];
1371
- e[l][l] += 1;
1372
- }
1373
- this.s[l] = -this.s[l];
1374
- }
1375
- for (var f = l + 1; f < this.n; f++) {
1376
- if (function(e, t) {
1377
- return e && t;
1378
- }(l < s, this.s[l] !== 0)) {
1379
- for (var p = 0, m = l; m < this.m; m++) p += e[m][l] * e[m][f];
1380
- p = -p / e[l][l];
1381
- for (var h = l; h < this.m; h++) e[h][f] += p * e[h][l];
1382
- }
1383
- n[f] = e[l][f];
1384
- }
1385
- if (function(e, t) {
1386
- return e && t;
1387
- }(a, l < s)) for (var g = l; g < this.m; g++) this.U[g][l] = e[g][l];
1388
- if (l < c) {
1389
- n[l] = 0;
1390
- for (var _ = l + 1; _ < this.n; _++) n[l] = r.hypot(n[l], n[_]);
1391
- if (n[l] !== 0) {
1392
- n[l + 1] < 0 && (n[l] = -n[l]);
1393
- for (var v = l + 1; v < this.n; v++) n[v] /= n[l];
1394
- n[l + 1] += 1;
1395
- }
1396
- if (n[l] = -n[l], function(e, t) {
1397
- return e && t;
1398
- }(l + 1 < this.m, n[l] !== 0)) {
1399
- for (var y = l + 1; y < this.m; y++) i[y] = 0;
1400
- for (var b = l + 1; b < this.n; b++) for (var x = l + 1; x < this.m; x++) i[x] += n[b] * e[x][b];
1401
- for (var S = l + 1; S < this.n; S++) for (var C = -n[S] / n[l + 1], w = l + 1; w < this.m; w++) e[w][S] += C * i[w];
1402
- }
1403
- if (o) for (var T = l + 1; T < this.n; T++) this.V[T][l] = n[T];
1404
- }
1405
- }
1406
- var E = Math.min(this.n, this.m + 1);
1407
- if (s < this.n && (this.s[s] = e[s][s]), this.m < E && (this.s[E - 1] = 0), c + 1 < E && (n[c] = e[c][E - 1]), n[E - 1] = 0, a) {
1408
- for (var D = s; D < t; D++) {
1409
- for (var O = 0; O < this.m; O++) this.U[O][D] = 0;
1410
- this.U[D][D] = 1;
1411
- }
1412
- for (var k = s - 1; k >= 0; k--) if (this.s[k] !== 0) {
1413
- for (var A = k + 1; A < t; A++) {
1414
- for (var j = 0, M = k; M < this.m; M++) j += this.U[M][k] * this.U[M][A];
1415
- j = -j / this.U[k][k];
1416
- for (var N = k; N < this.m; N++) this.U[N][A] += j * this.U[N][k];
1417
- }
1418
- for (var P = k; P < this.m; P++) this.U[P][k] = -this.U[P][k];
1419
- this.U[k][k] = 1 + this.U[k][k];
1420
- for (var ee = 0; ee < k - 1; ee++) this.U[ee][k] = 0;
1421
- } else {
1422
- for (var te = 0; te < this.m; te++) this.U[te][k] = 0;
1423
- this.U[k][k] = 1;
1424
- }
1425
- }
1426
- if (o) for (var F = this.n - 1; F >= 0; F--) {
1427
- if (function(e, t) {
1428
- return e && t;
1429
- }(F < c, n[F] !== 0)) for (var I = F + 1; I < t; I++) {
1430
- for (var L = 0, R = F + 1; R < this.n; R++) L += this.V[R][F] * this.V[R][I];
1431
- L = -L / this.V[F + 1][F];
1432
- for (var z = F + 1; z < this.n; z++) this.V[z][I] += L * this.V[z][F];
1433
- }
1434
- for (var B = 0; B < this.n; B++) this.V[B][F] = 0;
1435
- this.V[F][F] = 1;
1436
- }
1437
- for (var ne = E - 1, V = 0, re = 2 ** -52, ie = 2 ** -966; E > 0;) {
1438
- var H = void 0, U = void 0;
1439
- for (H = E - 2; H >= -1 && H !== -1; H--) if (Math.abs(n[H]) <= ie + re * (Math.abs(this.s[H]) + Math.abs(this.s[H + 1]))) {
1440
- n[H] = 0;
1441
- break;
1442
- }
1443
- if (H === E - 2) U = 4;
1444
- else {
1445
- var W = void 0;
1446
- for (W = E - 1; W >= H && W !== H; W--) {
1447
- var ae = (W === E ? 0 : Math.abs(n[W])) + (W === H + 1 ? 0 : Math.abs(n[W - 1]));
1448
- if (Math.abs(this.s[W]) <= ie + re * ae) {
1449
- this.s[W] = 0;
1450
- break;
1451
- }
1452
- }
1453
- W === H ? U = 3 : W === E - 1 ? U = 1 : (U = 2, H = W);
1454
- }
1455
- switch (H++, U) {
1456
- case 1:
1457
- var G = n[E - 2];
1458
- n[E - 2] = 0;
1459
- for (var K = E - 2; K >= H; K--) {
1460
- var oe = r.hypot(this.s[K], G), q = this.s[K] / oe, se = G / oe;
1461
- if (this.s[K] = oe, K !== H && (G = -se * n[K - 1], n[K - 1] = q * n[K - 1]), o) for (var J = 0; J < this.n; J++) oe = q * this.V[J][K] + se * this.V[J][E - 1], this.V[J][E - 1] = -se * this.V[J][K] + q * this.V[J][E - 1], this.V[J][K] = oe;
1462
- }
1463
- break;
1464
- case 2:
1465
- var ce = n[H - 1];
1466
- n[H - 1] = 0;
1467
- for (var Y = H; Y < E; Y++) {
1468
- var le = r.hypot(this.s[Y], ce), ue = this.s[Y] / le, de = ce / le;
1469
- if (this.s[Y] = le, ce = -de * n[Y], n[Y] = ue * n[Y], a) for (var fe = 0; fe < this.m; fe++) le = ue * this.U[fe][Y] + de * this.U[fe][H - 1], this.U[fe][H - 1] = -de * this.U[fe][Y] + ue * this.U[fe][H - 1], this.U[fe][Y] = le;
1470
- }
1471
- break;
1472
- case 3:
1473
- var pe = Math.max(Math.max(Math.max(Math.max(Math.abs(this.s[E - 1]), Math.abs(this.s[E - 2])), Math.abs(n[E - 2])), Math.abs(this.s[H])), Math.abs(n[H])), me = this.s[E - 1] / pe, he = this.s[E - 2] / pe, ge = n[E - 2] / pe, _e = this.s[H] / pe, ve = n[H] / pe, ye = ((he + me) * (he - me) + ge * ge) / 2, be = me * ge * (me * ge), xe = 0;
1474
- (function(e, t) {
1475
- return e || t;
1476
- })(ye !== 0, be !== 0) && (xe = Math.sqrt(ye * ye + be), ye < 0 && (xe = -xe), xe = be / (ye + xe));
1477
- for (var Se = (_e + me) * (_e - me) + xe, Ce = _e * ve, X = H; X < E - 1; X++) {
1478
- var Z = r.hypot(Se, Ce), Q = Se / Z, $ = Ce / Z;
1479
- if (X !== H && (n[X - 1] = Z), Se = Q * this.s[X] + $ * n[X], n[X] = Q * n[X] - $ * this.s[X], Ce = $ * this.s[X + 1], this.s[X + 1] = Q * this.s[X + 1], o) for (var we = 0; we < this.n; we++) Z = Q * this.V[we][X] + $ * this.V[we][X + 1], this.V[we][X + 1] = -$ * this.V[we][X] + Q * this.V[we][X + 1], this.V[we][X] = Z;
1480
- if (Z = r.hypot(Se, Ce), Q = Se / Z, $ = Ce / Z, this.s[X] = Z, Se = Q * n[X] + $ * this.s[X + 1], this.s[X + 1] = -$ * n[X] + Q * this.s[X + 1], Ce = $ * n[X + 1], n[X + 1] = Q * n[X + 1], a && X < this.m - 1) for (var Te = 0; Te < this.m; Te++) Z = Q * this.U[Te][X] + $ * this.U[Te][X + 1], this.U[Te][X + 1] = -$ * this.U[Te][X] + Q * this.U[Te][X + 1], this.U[Te][X] = Z;
1481
- }
1482
- n[E - 2] = Se, V += 1;
1483
- break;
1484
- case 4:
1485
- if (this.s[H] <= 0 && (this.s[H] = this.s[H] < 0 ? -this.s[H] : 0, o)) for (var Ee = 0; Ee <= ne; Ee++) this.V[Ee][H] = -this.V[Ee][H];
1486
- for (; H < ne && !(this.s[H] >= this.s[H + 1]);) {
1487
- var De = this.s[H];
1488
- if (this.s[H] = this.s[H + 1], this.s[H + 1] = De, o && H < this.n - 1) for (var Oe = 0; Oe < this.n; Oe++) De = this.V[Oe][H + 1], this.V[Oe][H + 1] = this.V[Oe][H], this.V[Oe][H] = De;
1489
- if (a && H < this.m - 1) for (var ke = 0; ke < this.m; ke++) De = this.U[ke][H + 1], this.U[ke][H + 1] = this.U[ke][H], this.U[ke][H] = De;
1490
- H++;
1491
- }
1492
- V = 0, E--;
1493
- break;
1494
- }
1495
- }
1496
- return {
1497
- U: this.U,
1498
- V: this.V,
1499
- S: this.s
1500
- };
1501
- }, r.hypot = function(e, t) {
1502
- var n = void 0;
1503
- return Math.abs(e) > Math.abs(t) ? (n = t / e, n = Math.abs(e) * Math.sqrt(1 + n * n)) : t == 0 ? n = 0 : (n = e / t, n = Math.abs(t) * Math.sqrt(1 + n * n)), n;
1504
- }, e.exports = r;
1505
- }),
1506
- (function(e, t, n) {
1507
- var r = function() {
1508
- function e(e, t) {
1509
- for (var n = 0; n < t.length; n++) {
1510
- var r = t[n];
1511
- r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
1512
- }
1513
- }
1514
- return function(t, n, r) {
1515
- return n && e(t.prototype, n), r && e(t, r), t;
1516
- };
1517
- }();
1518
- function i(e, t) {
1519
- if (!(e instanceof t)) throw TypeError("Cannot call a class as a function");
1520
- }
1521
- e.exports = function() {
1522
- function e(t, n) {
1523
- 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;
1524
- 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);
1525
- for (var s = 0; s < this.iMax; s++) {
1526
- this.grid[s] = Array(this.jMax);
1527
- for (var c = 0; c < this.jMax; c++) this.grid[s][c] = 0;
1528
- }
1529
- this.tracebackGrid = Array(this.iMax);
1530
- for (var l = 0; l < this.iMax; l++) {
1531
- this.tracebackGrid[l] = Array(this.jMax);
1532
- for (var u = 0; u < this.jMax; u++) this.tracebackGrid[l][u] = [
1533
- null,
1534
- null,
1535
- null
1536
- ];
1537
- }
1538
- this.alignments = [], this.score = -1, this.computeGrids();
1539
- }
1540
- return r(e, [
1541
- {
1542
- key: "getScore",
1543
- value: function() {
1544
- return this.score;
1545
- }
1546
- },
1547
- {
1548
- key: "getAlignments",
1549
- value: function() {
1550
- return this.alignments;
1551
- }
1552
- },
1553
- {
1554
- key: "computeGrids",
1555
- value: function() {
1556
- for (var e = 1; e < this.jMax; e++) this.grid[0][e] = this.grid[0][e - 1] + this.gap_penalty, this.tracebackGrid[0][e] = [
1557
- !1,
1558
- !1,
1559
- !0
1560
- ];
1561
- for (var t = 1; t < this.iMax; t++) this.grid[t][0] = this.grid[t - 1][0] + this.gap_penalty, this.tracebackGrid[t][0] = [
1562
- !1,
1563
- !0,
1564
- !1
1565
- ];
1566
- for (var n = 1; n < this.iMax; n++) for (var r = 1; r < this.jMax; r++) {
1567
- var i = void 0;
1568
- 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;
1569
- var a = this.grid[n - 1][r] + this.gap_penalty, o = this.grid[n][r - 1] + this.gap_penalty, s = [
1570
- i,
1571
- a,
1572
- o
1573
- ], c = this.arrayAllMaxIndexes(s);
1574
- this.grid[n][r] = s[c[0]], this.tracebackGrid[n][r] = [
1575
- c.includes(0),
1576
- c.includes(1),
1577
- c.includes(2)
1578
- ];
1579
- }
1580
- this.score = this.grid[this.iMax - 1][this.jMax - 1];
1581
- }
1582
- },
1583
- {
1584
- key: "alignmentTraceback",
1585
- value: function() {
1586
- var e = [];
1587
- for (e.push({
1588
- pos: [this.sequence1.length, this.sequence2.length],
1589
- seq1: "",
1590
- seq2: ""
1591
- }); e[0];) {
1592
- var t = e[0], n = this.tracebackGrid[t.pos[0]][t.pos[1]];
1593
- n[0] && e.push({
1594
- pos: [t.pos[0] - 1, t.pos[1] - 1],
1595
- seq1: this.sequence1[t.pos[0] - 1] + t.seq1,
1596
- seq2: this.sequence2[t.pos[1] - 1] + t.seq2
1597
- }), n[1] && e.push({
1598
- pos: [t.pos[0] - 1, t.pos[1]],
1599
- seq1: this.sequence1[t.pos[0] - 1] + t.seq1,
1600
- seq2: "-" + t.seq2
1601
- }), n[2] && e.push({
1602
- pos: [t.pos[0], t.pos[1] - 1],
1603
- seq1: "-" + t.seq1,
1604
- seq2: this.sequence2[t.pos[1] - 1] + t.seq2
1605
- }), t.pos[0] === 0 && t.pos[1] === 0 && this.alignments.push({
1606
- sequence1: t.seq1,
1607
- sequence2: t.seq2
1608
- }), e.shift();
1609
- }
1610
- return this.alignments;
1611
- }
1612
- },
1613
- {
1614
- key: "getAllIndexes",
1615
- value: function(e, t) {
1616
- for (var n = [], r = -1; (r = e.indexOf(t, r + 1)) !== -1;) n.push(r);
1617
- return n;
1618
- }
1619
- },
1620
- {
1621
- key: "arrayAllMaxIndexes",
1622
- value: function(e) {
1623
- return this.getAllIndexes(e, Math.max.apply(null, e));
1624
- }
1625
- }
1626
- ]), e;
1627
- }();
1628
- }),
1629
- (function(e, t, n) {
1630
- var r = function() {};
1631
- r.FDLayout = n(18), r.FDLayoutConstants = n(4), 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(5), r.RandomSeed = n(16), r.RectangleD = n(13), r.Transform = n(17), r.UniqueIDGeneretor = n(14), r.Quicksort = n(25), r.LinkedList = n(11), r.LGraphObject = n(2), r.LGraph = n(6), r.LEdge = n(1), r.LGraphManager = n(7), r.LNode = n(3), r.Layout = n(15), r.LayoutConstants = n(0), r.NeedlemanWunsch = n(27), r.Matrix = n(24), r.SVD = n(26), e.exports = r;
1632
- }),
1633
- (function(e, t, n) {
1634
- function r() {
1635
- this.listeners = [];
1636
- }
1637
- var i = r.prototype;
1638
- i.addListener = function(e, t) {
1639
- this.listeners.push({
1640
- event: e,
1641
- callback: t
1642
- });
1643
- }, i.removeListener = function(e, t) {
1644
- for (var n = this.listeners.length; n >= 0; n--) {
1645
- var r = this.listeners[n];
1646
- r.event === e && r.callback === t && this.listeners.splice(n, 1);
1647
- }
1648
- }, i.emit = function(e, t) {
1649
- for (var n = 0; n < this.listeners.length; n++) {
1650
- var r = this.listeners[n];
1651
- e === r.event && r.callback(t);
1652
- }
1653
- }, e.exports = r;
1654
- })
1655
- ]);
1656
- });
1657
- })), require_cose_base = /* @__PURE__ */ __commonJSMin(((e, t) => {
1658
- (function(n, r) {
1659
- typeof e == "object" && typeof t == "object" ? t.exports = r(require_layout_base()) : typeof define == "function" && define.amd ? define(["layout-base"], r) : typeof e == "object" ? e.coseBase = r(require_layout_base()) : n.coseBase = r(n.layoutBase);
1660
- })(e, function(e) {
1661
- return (() => {
1662
- var t = {
1663
- 45: ((e, t, n) => {
1664
- var r = {};
1665
- r.layoutBase = n(551), r.CoSEConstants = n(806), r.CoSEEdge = n(767), r.CoSEGraph = n(880), r.CoSEGraphManager = n(578), r.CoSELayout = n(765), r.CoSENode = n(991), r.ConstraintHandler = n(902), e.exports = r;
1666
- }),
1667
- 806: ((e, t, n) => {
1668
- var r = n(551).FDLayoutConstants;
1669
- function i() {}
1670
- for (var a in r) i[a] = r[a];
1671
- 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.TRANSFORM_ON_CONSTRAINT_HANDLING = !0, i.ENFORCE_CONSTRAINTS = !0, i.APPLY_LAYOUT = !0, i.RELAX_MOVEMENT_ON_CONSTRAINTS = !0, i.TREE_REDUCTION_ON_INCREMENTAL = !0, i.PURE_INCREMENTAL = i.DEFAULT_INCREMENTAL, e.exports = i;
1672
- }),
1673
- 767: ((e, t, n) => {
1674
- var r = n(551).FDLayoutEdge;
1675
- function i(e, t, n) {
1676
- r.call(this, e, t, n);
1677
- }
1678
- for (var a in i.prototype = Object.create(r.prototype), r) i[a] = r[a];
1679
- e.exports = i;
1680
- }),
1681
- 880: ((e, t, n) => {
1682
- var r = n(551).LGraph;
1683
- function i(e, t, n) {
1684
- r.call(this, e, t, n);
1685
- }
1686
- for (var a in i.prototype = Object.create(r.prototype), r) i[a] = r[a];
1687
- e.exports = i;
1688
- }),
1689
- 578: ((e, t, n) => {
1690
- var r = n(551).LGraphManager;
1691
- function i(e) {
1692
- r.call(this, e);
1693
- }
1694
- for (var a in i.prototype = Object.create(r.prototype), r) i[a] = r[a];
1695
- e.exports = i;
1696
- }),
1697
- 765: ((e, t, n) => {
1698
- var r = n(551).FDLayout, i = n(578), a = n(880), o = n(991), s = n(767), c = n(806), l = n(902), u = n(551).FDLayoutConstants, d = n(551).LayoutConstants, f = n(551).Point, p = n(551).PointD, m = n(551).DimensionD, h = n(551).Layout, g = n(551).Integer, _ = n(551).IGeometry, v = n(551).LGraph, y = n(551).Transform, b = n(551).LinkedList;
1699
- function x() {
1700
- r.call(this), this.toBeTiled = {}, this.constraints = {};
1701
- }
1702
- for (var S in x.prototype = Object.create(r.prototype), r) x[S] = r[S];
1703
- x.prototype.newGraphManager = function() {
1704
- var e = new i(this);
1705
- return this.graphManager = e, e;
1706
- }, x.prototype.newGraph = function(e) {
1707
- return new a(null, this.graphManager, e);
1708
- }, x.prototype.newNode = function(e) {
1709
- return new o(this.graphManager, e);
1710
- }, x.prototype.newEdge = function(e) {
1711
- return new s(null, null, e);
1712
- }, x.prototype.initParameters = function() {
1713
- 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.gravityConstant = u.DEFAULT_GRAVITY_STRENGTH, this.compoundGravityConstant = u.DEFAULT_COMPOUND_GRAVITY_STRENGTH, this.gravityRangeFactor = u.DEFAULT_GRAVITY_RANGE_FACTOR, this.compoundGravityRangeFactor = u.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR, this.prunedNodesAll = [], this.growTreeIterations = 0, this.afterGrowthIterations = 0, this.isTreeGrowing = !1, this.isGrowthFinished = !1);
1714
- }, x.prototype.initSpringEmbedder = function() {
1715
- r.prototype.initSpringEmbedder.call(this), this.coolingCycle = 0, this.maxCoolingCycle = this.maxIterations / u.CONVERGENCE_CHECK_PERIOD, this.finalTemperature = .04, this.coolingAdjuster = 1;
1716
- }, x.prototype.layout = function() {
1717
- return d.DEFAULT_CREATE_BENDS_AS_NEEDED && (this.createBendpoints(), this.graphManager.resetAllEdges()), this.level = 0, this.classicLayout();
1718
- }, x.prototype.classicLayout = function() {
1719
- 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) {
1720
- if (c.TREE_REDUCTION_ON_INCREMENTAL) {
1721
- this.reduceTrees(), this.graphManager.resetAllNodesToApplyGravitation();
1722
- var e = new Set(this.getAllNodes()), t = this.nodesWithGravity.filter(function(t) {
1723
- return e.has(t);
1724
- });
1725
- this.graphManager.setAllNodesToApplyGravitation(t);
1726
- }
1727
- } else {
1728
- var n = this.getFlatForest();
1729
- if (n.length > 0) this.positionNodesRadially(n);
1730
- else {
1731
- this.reduceTrees(), this.graphManager.resetAllNodesToApplyGravitation();
1732
- var e = new Set(this.getAllNodes()), t = this.nodesWithGravity.filter(function(t) {
1733
- return e.has(t);
1734
- });
1735
- this.graphManager.setAllNodesToApplyGravitation(t), this.positionNodesRandomly();
1736
- }
1737
- }
1738
- return Object.keys(this.constraints).length > 0 && (l.handleConstraints(this), this.initConstraintVariables()), this.initSpringEmbedder(), c.APPLY_LAYOUT && this.runSpringEmbedder(), !0;
1739
- }, x.prototype.tick = function() {
1740
- if (this.totalIterations++, this.totalIterations === this.maxIterations && !this.isTreeGrowing && !this.isGrowthFinished) if (this.prunedNodesAll.length > 0) this.isTreeGrowing = !0;
1741
- else return !0;
1742
- if (this.totalIterations % u.CONVERGENCE_CHECK_PERIOD == 0 && !this.isTreeGrowing && !this.isGrowthFinished) {
1743
- if (this.isConverged()) if (this.prunedNodesAll.length > 0) this.isTreeGrowing = !0;
1744
- else return !0;
1745
- 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));
1746
- }
1747
- if (this.isTreeGrowing) {
1748
- if (this.growTreeIterations % 10 == 0) if (this.prunedNodesAll.length > 0) {
1749
- this.graphManager.updateBounds(), this.updateGrid(), this.growTree(this.prunedNodesAll), this.graphManager.resetAllNodesToApplyGravitation();
1750
- var e = new Set(this.getAllNodes()), t = this.nodesWithGravity.filter(function(t) {
1751
- return e.has(t);
1752
- });
1753
- this.graphManager.setAllNodesToApplyGravitation(t), this.graphManager.updateBounds(), this.updateGrid(), c.PURE_INCREMENTAL ? this.coolingFactor = u.DEFAULT_COOLING_FACTOR_INCREMENTAL / 2 : this.coolingFactor = u.DEFAULT_COOLING_FACTOR_INCREMENTAL;
1754
- } else this.isTreeGrowing = !1, this.isGrowthFinished = !0;
1755
- this.growTreeIterations++;
1756
- }
1757
- if (this.isGrowthFinished) {
1758
- if (this.isConverged()) return !0;
1759
- this.afterGrowthIterations % 10 == 0 && (this.graphManager.updateBounds(), this.updateGrid()), c.PURE_INCREMENTAL ? this.coolingFactor = u.DEFAULT_COOLING_FACTOR_INCREMENTAL / 2 * ((100 - this.afterGrowthIterations) / 100) : this.coolingFactor = u.DEFAULT_COOLING_FACTOR_INCREMENTAL * ((100 - this.afterGrowthIterations) / 100), this.afterGrowthIterations++;
1760
- }
1761
- var n = !this.isTreeGrowing && !this.isGrowthFinished, r = this.growTreeIterations % 10 == 1 && this.isTreeGrowing || this.afterGrowthIterations % 10 == 1 && this.isGrowthFinished;
1762
- return this.totalDisplacement = 0, this.graphManager.updateBounds(), this.calcSpringForces(), this.calcRepulsionForces(n, r), this.calcGravitationalForces(), this.moveNodes(), this.animate(), !1;
1763
- }, x.prototype.getPositionsData = function() {
1764
- for (var e = this.graphManager.getAllNodes(), t = {}, n = 0; n < e.length; n++) {
1765
- var r = e[n].rect, i = e[n].id;
1766
- t[i] = {
1767
- id: i,
1768
- x: r.getCenterX(),
1769
- y: r.getCenterY(),
1770
- w: r.width,
1771
- h: r.height
1772
- };
1773
- }
1774
- return t;
1775
- }, x.prototype.runSpringEmbedder = function() {
1776
- this.initialAnimationPeriod = 25, this.animationPeriod = this.initialAnimationPeriod;
1777
- var e = !1;
1778
- if (u.ANIMATE === "during") this.emit("layoutstarted");
1779
- else {
1780
- for (; !e;) e = this.tick();
1781
- this.graphManager.updateBounds();
1782
- }
1783
- }, x.prototype.moveNodes = function() {
1784
- for (var e = this.getAllNodes(), t, n = 0; n < e.length; n++) t = e[n], t.calculateDisplacement();
1785
- Object.keys(this.constraints).length > 0 && this.updateDisplacements();
1786
- for (var n = 0; n < e.length; n++) t = e[n], t.move();
1787
- }, x.prototype.initConstraintVariables = function() {
1788
- var e = this;
1789
- this.idToNodeMap = /* @__PURE__ */ new Map(), this.fixedNodeSet = /* @__PURE__ */ new Set();
1790
- for (var t = this.graphManager.getAllNodes(), n = 0; n < t.length; n++) {
1791
- var r = t[n];
1792
- this.idToNodeMap.set(r.id, r);
1793
- }
1794
- var i = function t(n) {
1795
- for (var r = n.getChild().getNodes(), i, a = 0, o = 0; o < r.length; o++) i = r[o], i.getChild() == null ? e.fixedNodeSet.has(i.id) && (a += 100) : a += t(i);
1796
- return a;
1797
- };
1798
- if (this.constraints.fixedNodeConstraint) {
1799
- this.constraints.fixedNodeConstraint.forEach(function(t) {
1800
- e.fixedNodeSet.add(t.nodeId);
1801
- });
1802
- for (var t = this.graphManager.getAllNodes(), r, n = 0; n < t.length; n++) if (r = t[n], r.getChild() != null) {
1803
- var a = i(r);
1804
- a > 0 && (r.fixedNodeWeight = a);
1805
- }
1806
- }
1807
- if (this.constraints.relativePlacementConstraint) {
1808
- var o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Map();
1809
- if (this.dummyToNodeForVerticalAlignment = /* @__PURE__ */ new Map(), this.dummyToNodeForHorizontalAlignment = /* @__PURE__ */ new Map(), this.fixedNodesOnHorizontal = /* @__PURE__ */ new Set(), this.fixedNodesOnVertical = /* @__PURE__ */ new Set(), this.fixedNodeSet.forEach(function(t) {
1810
- e.fixedNodesOnHorizontal.add(t), e.fixedNodesOnVertical.add(t);
1811
- }), this.constraints.alignmentConstraint) {
1812
- if (this.constraints.alignmentConstraint.vertical) for (var l = this.constraints.alignmentConstraint.vertical, n = 0; n < l.length; n++) this.dummyToNodeForVerticalAlignment.set("dummy" + n, []), l[n].forEach(function(t) {
1813
- o.set(t, "dummy" + n), e.dummyToNodeForVerticalAlignment.get("dummy" + n).push(t), e.fixedNodeSet.has(t) && e.fixedNodesOnHorizontal.add("dummy" + n);
1814
- });
1815
- if (this.constraints.alignmentConstraint.horizontal) for (var u = this.constraints.alignmentConstraint.horizontal, n = 0; n < u.length; n++) this.dummyToNodeForHorizontalAlignment.set("dummy" + n, []), u[n].forEach(function(t) {
1816
- s.set(t, "dummy" + n), e.dummyToNodeForHorizontalAlignment.get("dummy" + n).push(t), e.fixedNodeSet.has(t) && e.fixedNodesOnVertical.add("dummy" + n);
1817
- });
1818
- }
1819
- if (c.RELAX_MOVEMENT_ON_CONSTRAINTS) this.shuffle = function(e) {
1820
- var t, n, r;
1821
- for (r = e.length - 1; r >= 2 * e.length / 3; r--) t = Math.floor(Math.random() * (r + 1)), n = e[r], e[r] = e[t], e[t] = n;
1822
- return e;
1823
- }, this.nodesInRelativeHorizontal = [], this.nodesInRelativeVertical = [], this.nodeToRelativeConstraintMapHorizontal = /* @__PURE__ */ new Map(), this.nodeToRelativeConstraintMapVertical = /* @__PURE__ */ new Map(), this.nodeToTempPositionMapHorizontal = /* @__PURE__ */ new Map(), this.nodeToTempPositionMapVertical = /* @__PURE__ */ new Map(), this.constraints.relativePlacementConstraint.forEach(function(t) {
1824
- if (t.left) {
1825
- var n = o.has(t.left) ? o.get(t.left) : t.left, r = o.has(t.right) ? o.get(t.right) : t.right;
1826
- e.nodesInRelativeHorizontal.includes(n) || (e.nodesInRelativeHorizontal.push(n), e.nodeToRelativeConstraintMapHorizontal.set(n, []), e.dummyToNodeForVerticalAlignment.has(n) ? e.nodeToTempPositionMapHorizontal.set(n, e.idToNodeMap.get(e.dummyToNodeForVerticalAlignment.get(n)[0]).getCenterX()) : e.nodeToTempPositionMapHorizontal.set(n, e.idToNodeMap.get(n).getCenterX())), e.nodesInRelativeHorizontal.includes(r) || (e.nodesInRelativeHorizontal.push(r), e.nodeToRelativeConstraintMapHorizontal.set(r, []), e.dummyToNodeForVerticalAlignment.has(r) ? e.nodeToTempPositionMapHorizontal.set(r, e.idToNodeMap.get(e.dummyToNodeForVerticalAlignment.get(r)[0]).getCenterX()) : e.nodeToTempPositionMapHorizontal.set(r, e.idToNodeMap.get(r).getCenterX())), e.nodeToRelativeConstraintMapHorizontal.get(n).push({
1827
- right: r,
1828
- gap: t.gap
1829
- }), e.nodeToRelativeConstraintMapHorizontal.get(r).push({
1830
- left: n,
1831
- gap: t.gap
1832
- });
1833
- } else {
1834
- var i = s.has(t.top) ? s.get(t.top) : t.top, a = s.has(t.bottom) ? s.get(t.bottom) : t.bottom;
1835
- e.nodesInRelativeVertical.includes(i) || (e.nodesInRelativeVertical.push(i), e.nodeToRelativeConstraintMapVertical.set(i, []), e.dummyToNodeForHorizontalAlignment.has(i) ? e.nodeToTempPositionMapVertical.set(i, e.idToNodeMap.get(e.dummyToNodeForHorizontalAlignment.get(i)[0]).getCenterY()) : e.nodeToTempPositionMapVertical.set(i, e.idToNodeMap.get(i).getCenterY())), e.nodesInRelativeVertical.includes(a) || (e.nodesInRelativeVertical.push(a), e.nodeToRelativeConstraintMapVertical.set(a, []), e.dummyToNodeForHorizontalAlignment.has(a) ? e.nodeToTempPositionMapVertical.set(a, e.idToNodeMap.get(e.dummyToNodeForHorizontalAlignment.get(a)[0]).getCenterY()) : e.nodeToTempPositionMapVertical.set(a, e.idToNodeMap.get(a).getCenterY())), e.nodeToRelativeConstraintMapVertical.get(i).push({
1836
- bottom: a,
1837
- gap: t.gap
1838
- }), e.nodeToRelativeConstraintMapVertical.get(a).push({
1839
- top: i,
1840
- gap: t.gap
1841
- });
1842
- }
1843
- });
1844
- else {
1845
- var d = /* @__PURE__ */ new Map(), f = /* @__PURE__ */ new Map();
1846
- this.constraints.relativePlacementConstraint.forEach(function(e) {
1847
- if (e.left) {
1848
- var t = o.has(e.left) ? o.get(e.left) : e.left, n = o.has(e.right) ? o.get(e.right) : e.right;
1849
- d.has(t) ? d.get(t).push(n) : d.set(t, [n]), d.has(n) ? d.get(n).push(t) : d.set(n, [t]);
1850
- } else {
1851
- var r = s.has(e.top) ? s.get(e.top) : e.top, i = s.has(e.bottom) ? s.get(e.bottom) : e.bottom;
1852
- f.has(r) ? f.get(r).push(i) : f.set(r, [i]), f.has(i) ? f.get(i).push(r) : f.set(i, [r]);
1853
- }
1854
- });
1855
- var p = function(e, t) {
1856
- var n = [], r = [], i = new b(), a = /* @__PURE__ */ new Set(), o = 0;
1857
- return e.forEach(function(s, c) {
1858
- if (!a.has(c)) {
1859
- n[o] = [], r[o] = !1;
1860
- var l = c;
1861
- for (i.push(l), a.add(l), n[o].push(l); i.length != 0;) l = i.shift(), t.has(l) && (r[o] = !0), e.get(l).forEach(function(e) {
1862
- a.has(e) || (i.push(e), a.add(e), n[o].push(e));
1863
- });
1864
- o++;
1865
- }
1866
- }), {
1867
- components: n,
1868
- isFixed: r
1869
- };
1870
- }, m = p(d, e.fixedNodesOnHorizontal);
1871
- this.componentsOnHorizontal = m.components, this.fixedComponentsOnHorizontal = m.isFixed;
1872
- var h = p(f, e.fixedNodesOnVertical);
1873
- this.componentsOnVertical = h.components, this.fixedComponentsOnVertical = h.isFixed;
1874
- }
1875
- }
1876
- }, x.prototype.updateDisplacements = function() {
1877
- var e = this;
1878
- if (this.constraints.fixedNodeConstraint && this.constraints.fixedNodeConstraint.forEach(function(t) {
1879
- var n = e.idToNodeMap.get(t.nodeId);
1880
- n.displacementX = 0, n.displacementY = 0;
1881
- }), this.constraints.alignmentConstraint) {
1882
- if (this.constraints.alignmentConstraint.vertical) for (var t = this.constraints.alignmentConstraint.vertical, n = 0; n < t.length; n++) {
1883
- for (var r = 0, i = 0; i < t[n].length; i++) {
1884
- if (this.fixedNodeSet.has(t[n][i])) {
1885
- r = 0;
1886
- break;
1887
- }
1888
- r += this.idToNodeMap.get(t[n][i]).displacementX;
1889
- }
1890
- for (var a = r / t[n].length, i = 0; i < t[n].length; i++) this.idToNodeMap.get(t[n][i]).displacementX = a;
1891
- }
1892
- if (this.constraints.alignmentConstraint.horizontal) for (var o = this.constraints.alignmentConstraint.horizontal, n = 0; n < o.length; n++) {
1893
- for (var s = 0, i = 0; i < o[n].length; i++) {
1894
- if (this.fixedNodeSet.has(o[n][i])) {
1895
- s = 0;
1896
- break;
1897
- }
1898
- s += this.idToNodeMap.get(o[n][i]).displacementY;
1899
- }
1900
- for (var l = s / o[n].length, i = 0; i < o[n].length; i++) this.idToNodeMap.get(o[n][i]).displacementY = l;
1901
- }
1902
- }
1903
- if (this.constraints.relativePlacementConstraint) if (c.RELAX_MOVEMENT_ON_CONSTRAINTS) this.totalIterations % 10 == 0 && (this.shuffle(this.nodesInRelativeHorizontal), this.shuffle(this.nodesInRelativeVertical)), this.nodesInRelativeHorizontal.forEach(function(t) {
1904
- if (!e.fixedNodesOnHorizontal.has(t)) {
1905
- var n = 0;
1906
- n = e.dummyToNodeForVerticalAlignment.has(t) ? e.idToNodeMap.get(e.dummyToNodeForVerticalAlignment.get(t)[0]).displacementX : e.idToNodeMap.get(t).displacementX, e.nodeToRelativeConstraintMapHorizontal.get(t).forEach(function(r) {
1907
- if (r.right) {
1908
- var i = e.nodeToTempPositionMapHorizontal.get(r.right) - e.nodeToTempPositionMapHorizontal.get(t) - n;
1909
- i < r.gap && (n -= r.gap - i);
1910
- } else {
1911
- var i = e.nodeToTempPositionMapHorizontal.get(t) - e.nodeToTempPositionMapHorizontal.get(r.left) + n;
1912
- i < r.gap && (n += r.gap - i);
1913
- }
1914
- }), e.nodeToTempPositionMapHorizontal.set(t, e.nodeToTempPositionMapHorizontal.get(t) + n), e.dummyToNodeForVerticalAlignment.has(t) ? e.dummyToNodeForVerticalAlignment.get(t).forEach(function(t) {
1915
- e.idToNodeMap.get(t).displacementX = n;
1916
- }) : e.idToNodeMap.get(t).displacementX = n;
1917
- }
1918
- }), this.nodesInRelativeVertical.forEach(function(t) {
1919
- if (!e.fixedNodesOnHorizontal.has(t)) {
1920
- var n = 0;
1921
- n = e.dummyToNodeForHorizontalAlignment.has(t) ? e.idToNodeMap.get(e.dummyToNodeForHorizontalAlignment.get(t)[0]).displacementY : e.idToNodeMap.get(t).displacementY, e.nodeToRelativeConstraintMapVertical.get(t).forEach(function(r) {
1922
- if (r.bottom) {
1923
- var i = e.nodeToTempPositionMapVertical.get(r.bottom) - e.nodeToTempPositionMapVertical.get(t) - n;
1924
- i < r.gap && (n -= r.gap - i);
1925
- } else {
1926
- var i = e.nodeToTempPositionMapVertical.get(t) - e.nodeToTempPositionMapVertical.get(r.top) + n;
1927
- i < r.gap && (n += r.gap - i);
1928
- }
1929
- }), e.nodeToTempPositionMapVertical.set(t, e.nodeToTempPositionMapVertical.get(t) + n), e.dummyToNodeForHorizontalAlignment.has(t) ? e.dummyToNodeForHorizontalAlignment.get(t).forEach(function(t) {
1930
- e.idToNodeMap.get(t).displacementY = n;
1931
- }) : e.idToNodeMap.get(t).displacementY = n;
1932
- }
1933
- });
1934
- else {
1935
- for (var n = 0; n < this.componentsOnHorizontal.length; n++) {
1936
- var u = this.componentsOnHorizontal[n];
1937
- if (this.fixedComponentsOnHorizontal[n]) for (var i = 0; i < u.length; i++) this.dummyToNodeForVerticalAlignment.has(u[i]) ? this.dummyToNodeForVerticalAlignment.get(u[i]).forEach(function(t) {
1938
- e.idToNodeMap.get(t).displacementX = 0;
1939
- }) : this.idToNodeMap.get(u[i]).displacementX = 0;
1940
- else {
1941
- for (var d = 0, f = 0, i = 0; i < u.length; i++) if (this.dummyToNodeForVerticalAlignment.has(u[i])) {
1942
- var p = this.dummyToNodeForVerticalAlignment.get(u[i]);
1943
- d += p.length * this.idToNodeMap.get(p[0]).displacementX, f += p.length;
1944
- } else d += this.idToNodeMap.get(u[i]).displacementX, f++;
1945
- for (var m = d / f, i = 0; i < u.length; i++) this.dummyToNodeForVerticalAlignment.has(u[i]) ? this.dummyToNodeForVerticalAlignment.get(u[i]).forEach(function(t) {
1946
- e.idToNodeMap.get(t).displacementX = m;
1947
- }) : this.idToNodeMap.get(u[i]).displacementX = m;
1948
- }
1949
- }
1950
- for (var n = 0; n < this.componentsOnVertical.length; n++) {
1951
- var u = this.componentsOnVertical[n];
1952
- if (this.fixedComponentsOnVertical[n]) for (var i = 0; i < u.length; i++) this.dummyToNodeForHorizontalAlignment.has(u[i]) ? this.dummyToNodeForHorizontalAlignment.get(u[i]).forEach(function(t) {
1953
- e.idToNodeMap.get(t).displacementY = 0;
1954
- }) : this.idToNodeMap.get(u[i]).displacementY = 0;
1955
- else {
1956
- for (var d = 0, f = 0, i = 0; i < u.length; i++) if (this.dummyToNodeForHorizontalAlignment.has(u[i])) {
1957
- var p = this.dummyToNodeForHorizontalAlignment.get(u[i]);
1958
- d += p.length * this.idToNodeMap.get(p[0]).displacementY, f += p.length;
1959
- } else d += this.idToNodeMap.get(u[i]).displacementY, f++;
1960
- for (var m = d / f, i = 0; i < u.length; i++) this.dummyToNodeForHorizontalAlignment.has(u[i]) ? this.dummyToNodeForHorizontalAlignment.get(u[i]).forEach(function(t) {
1961
- e.idToNodeMap.get(t).displacementY = m;
1962
- }) : this.idToNodeMap.get(u[i]).displacementY = m;
1963
- }
1964
- }
1965
- }
1966
- }, x.prototype.calculateNodesToApplyGravitationTo = function() {
1967
- var e = [], t, n = this.graphManager.getGraphs(), r = n.length, i;
1968
- for (i = 0; i < r; i++) t = n[i], t.updateConnected(), t.isConnected || (e = e.concat(t.getNodes()));
1969
- return e;
1970
- }, x.prototype.createBendpoints = function() {
1971
- var e = [];
1972
- e = e.concat(this.graphManager.getAllEdges());
1973
- var t = /* @__PURE__ */ new Set(), n;
1974
- for (n = 0; n < e.length; n++) {
1975
- var r = e[n];
1976
- if (!t.has(r)) {
1977
- var i = r.getSource(), a = r.getTarget();
1978
- if (i == a) r.getBendpoints().push(new p()), r.getBendpoints().push(new p()), this.createDummyNodesForBendpoints(r), t.add(r);
1979
- else {
1980
- var o = [];
1981
- if (o = o.concat(i.getEdgeListToNode(a)), o = o.concat(a.getEdgeListToNode(i)), !t.has(o[0])) {
1982
- if (o.length > 1) {
1983
- var s;
1984
- for (s = 0; s < o.length; s++) {
1985
- var c = o[s];
1986
- c.getBendpoints().push(new p()), this.createDummyNodesForBendpoints(c);
1987
- }
1988
- }
1989
- o.forEach(function(e) {
1990
- t.add(e);
1991
- });
1992
- }
1993
- }
1994
- }
1995
- if (t.size == e.length) break;
1996
- }
1997
- }, x.prototype.positionNodesRadially = function(e) {
1998
- for (var t = new f(0, 0), n = Math.ceil(Math.sqrt(e.length)), r = 0, i = 0, a = 0, o = new p(0, 0), s = 0; s < e.length; s++) {
1999
- s % n == 0 && (a = 0, i = r, s != 0 && (i += c.DEFAULT_COMPONENT_SEPERATION), r = 0);
2000
- var l = e[s], u = h.findCenterOfTree(l);
2001
- t.x = a, t.y = i, o = x.radialLayout(l, u, t), o.y > r && (r = Math.floor(o.y)), a = Math.floor(o.x + c.DEFAULT_COMPONENT_SEPERATION);
2002
- }
2003
- this.transform(new p(d.WORLD_CENTER_X - o.x / 2, d.WORLD_CENTER_Y - o.y / 2));
2004
- }, x.radialLayout = function(e, t, n) {
2005
- var r = Math.max(this.maxDiagonalInTree(e), c.DEFAULT_RADIAL_SEPARATION);
2006
- x.branchRadialLayout(t, null, 0, 359, 0, r);
2007
- var i = v.calculateBounds(e), a = new y();
2008
- a.setDeviceOrgX(i.getMinX()), a.setDeviceOrgY(i.getMinY()), a.setWorldOrgX(n.x), a.setWorldOrgY(n.y);
2009
- for (var o = 0; o < e.length; o++) e[o].transform(a);
2010
- var s = new p(i.getMaxX(), i.getMaxY());
2011
- return a.inverseTransformPoint(s);
2012
- }, x.branchRadialLayout = function(e, t, n, r, i, a) {
2013
- var o = (r - n + 1) / 2;
2014
- o < 0 && (o += 180);
2015
- var s = (o + n) % 360 * _.TWO_PI / 360, c = i * Math.cos(s), l = i * Math.sin(s);
2016
- e.setCenter(c, l);
2017
- var u = [];
2018
- u = u.concat(e.getEdges());
2019
- var d = u.length;
2020
- t != null && d--;
2021
- for (var f = 0, p = u.length, m, h = e.getEdgesBetween(t); h.length > 1;) {
2022
- var g = h[0];
2023
- h.splice(0, 1);
2024
- var v = u.indexOf(g);
2025
- v >= 0 && u.splice(v, 1), p--, d--;
2026
- }
2027
- m = t == null ? 0 : (u.indexOf(h[0]) + 1) % p;
2028
- for (var y = Math.abs(r - n) / d, b = m; f != d; b = ++b % p) {
2029
- var S = u[b].getOtherEnd(e);
2030
- if (S != t) {
2031
- var C = (n + f * y) % 360, w = (C + y) % 360;
2032
- x.branchRadialLayout(S, e, C, w, i + a, a), f++;
2033
- }
2034
- }
2035
- }, x.maxDiagonalInTree = function(e) {
2036
- for (var t = g.MIN_VALUE, n = 0; n < e.length; n++) {
2037
- var r = e[n].getDiagonal();
2038
- r > t && (t = r);
2039
- }
2040
- return t;
2041
- }, x.prototype.calcRepulsionRange = function() {
2042
- return 2 * (this.level + 1) * this.idealEdgeLength;
2043
- }, x.prototype.groupZeroDegreeMembers = function() {
2044
- var e = this, t = {};
2045
- this.memberGroups = {}, this.idToDummyNode = {};
2046
- for (var n = [], r = this.graphManager.getAllNodes(), i = 0; i < r.length; i++) {
2047
- var a = r[i], s = a.getParent();
2048
- this.getNodeDegreeWithChildren(a) === 0 && (s.id == null || !this.getToBeTiled(s)) && n.push(a);
2049
- }
2050
- for (var i = 0; i < n.length; i++) {
2051
- var a = n[i], c = a.getParent().id;
2052
- t[c] === void 0 && (t[c] = []), t[c] = t[c].concat(a);
2053
- }
2054
- Object.keys(t).forEach(function(n) {
2055
- if (t[n].length > 1) {
2056
- var r = "DummyCompound_" + n;
2057
- e.memberGroups[r] = t[n];
2058
- var i = t[n][0].getParent(), a = new o(e.graphManager);
2059
- 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;
2060
- var s = e.getGraphManager().add(e.newGraph(), a), c = i.getChild();
2061
- c.add(a);
2062
- for (var l = 0; l < t[n].length; l++) {
2063
- var u = t[n][l];
2064
- c.remove(u), s.add(u);
2065
- }
2066
- }
2067
- });
2068
- }, x.prototype.clearCompounds = function() {
2069
- var e = {}, t = {};
2070
- this.performDFSOnCompounds();
2071
- 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;
2072
- this.graphManager.resetAllNodes(), this.tileCompoundMembers(e, t);
2073
- }, x.prototype.clearZeroDegreeMembers = function() {
2074
- var e = this, t = this.tiledZeroDegreePack = [];
2075
- Object.keys(this.memberGroups).forEach(function(n) {
2076
- var r = e.idToDummyNode[n];
2077
- if (t[n] = e.tileNodes(e.memberGroups[n], r.paddingLeft + r.paddingRight), r.rect.width = t[n].width, r.rect.height = t[n].height, r.setCenter(t[n].centerX, t[n].centerY), r.labelMarginLeft = 0, r.labelMarginTop = 0, c.NODE_DIMENSIONS_INCLUDE_LABELS) {
2078
- var i = r.rect.width, a = r.rect.height;
2079
- r.labelWidth && (r.labelPosHorizontal == "left" ? (r.rect.x -= r.labelWidth, r.setWidth(i + r.labelWidth), r.labelMarginLeft = r.labelWidth) : r.labelPosHorizontal == "center" && r.labelWidth > i ? (r.rect.x -= (r.labelWidth - i) / 2, r.setWidth(r.labelWidth), r.labelMarginLeft = (r.labelWidth - i) / 2) : r.labelPosHorizontal == "right" && r.setWidth(i + r.labelWidth)), r.labelHeight && (r.labelPosVertical == "top" ? (r.rect.y -= r.labelHeight, r.setHeight(a + r.labelHeight), r.labelMarginTop = r.labelHeight) : r.labelPosVertical == "center" && r.labelHeight > a ? (r.rect.y -= (r.labelHeight - a) / 2, r.setHeight(r.labelHeight), r.labelMarginTop = (r.labelHeight - a) / 2) : r.labelPosVertical == "bottom" && r.setHeight(a + r.labelHeight));
2080
- }
2081
- });
2082
- }, x.prototype.repopulateCompounds = function() {
2083
- for (var e = this.compoundOrder.length - 1; e >= 0; e--) {
2084
- var t = this.compoundOrder[e], n = t.id, r = t.paddingLeft, i = t.paddingTop, a = t.labelMarginLeft, o = t.labelMarginTop;
2085
- this.adjustLocations(this.tiledMemberPack[n], t.rect.x, t.rect.y, r, i, a, o);
2086
- }
2087
- }, x.prototype.repopulateZeroDegreeMembers = function() {
2088
- var e = this, t = this.tiledZeroDegreePack;
2089
- Object.keys(t).forEach(function(n) {
2090
- var r = e.idToDummyNode[n], i = r.paddingLeft, a = r.paddingTop, o = r.labelMarginLeft, s = r.labelMarginTop;
2091
- e.adjustLocations(t[n], r.rect.x, r.rect.y, i, a, o, s);
2092
- });
2093
- }, x.prototype.getToBeTiled = function(e) {
2094
- var t = e.id;
2095
- if (this.toBeTiled[t] != null) return this.toBeTiled[t];
2096
- var n = e.getChild();
2097
- if (n == null) return this.toBeTiled[t] = !1, !1;
2098
- for (var r = n.getNodes(), i = 0; i < r.length; i++) {
2099
- var a = r[i];
2100
- if (this.getNodeDegree(a) > 0) return this.toBeTiled[t] = !1, !1;
2101
- if (a.getChild() == null) {
2102
- this.toBeTiled[a.id] = !1;
2103
- continue;
2104
- }
2105
- if (!this.getToBeTiled(a)) return this.toBeTiled[t] = !1, !1;
2106
- }
2107
- return this.toBeTiled[t] = !0, !0;
2108
- }, x.prototype.getNodeDegree = function(e) {
2109
- e.id;
2110
- for (var t = e.getEdges(), n = 0, r = 0; r < t.length; r++) {
2111
- var i = t[r];
2112
- i.getSource().id !== i.getTarget().id && (n += 1);
2113
- }
2114
- return n;
2115
- }, x.prototype.getNodeDegreeWithChildren = function(e) {
2116
- var t = this.getNodeDegree(e);
2117
- if (e.getChild() == null) return t;
2118
- for (var n = e.getChild().getNodes(), r = 0; r < n.length; r++) {
2119
- var i = n[r];
2120
- t += this.getNodeDegreeWithChildren(i);
2121
- }
2122
- return t;
2123
- }, x.prototype.performDFSOnCompounds = function() {
2124
- this.compoundOrder = [], this.fillCompexOrderByDFS(this.graphManager.getRoot().getNodes());
2125
- }, x.prototype.fillCompexOrderByDFS = function(e) {
2126
- for (var t = 0; t < e.length; t++) {
2127
- var n = e[t];
2128
- n.getChild() != null && this.fillCompexOrderByDFS(n.getChild().getNodes()), this.getToBeTiled(n) && this.compoundOrder.push(n);
2129
- }
2130
- }, x.prototype.adjustLocations = function(e, t, n, r, i, a, o) {
2131
- t += r + a, n += i + o;
2132
- for (var s = t, c = 0; c < e.rows.length; c++) {
2133
- var l = e.rows[c];
2134
- t = s;
2135
- for (var u = 0, d = 0; d < l.length; d++) {
2136
- var f = l[d];
2137
- f.rect.x = t, f.rect.y = n, t += f.rect.width + e.horizontalPadding, f.rect.height > u && (u = f.rect.height);
2138
- }
2139
- n += u + e.verticalPadding;
2140
- }
2141
- }, x.prototype.tileCompoundMembers = function(e, t) {
2142
- var n = this;
2143
- this.tiledMemberPack = [], Object.keys(e).forEach(function(r) {
2144
- var i = t[r];
2145
- if (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, i.setCenter(n.tiledMemberPack[r].centerX, n.tiledMemberPack[r].centerY), i.labelMarginLeft = 0, i.labelMarginTop = 0, c.NODE_DIMENSIONS_INCLUDE_LABELS) {
2146
- var a = i.rect.width, o = i.rect.height;
2147
- i.labelWidth && (i.labelPosHorizontal == "left" ? (i.rect.x -= i.labelWidth, i.setWidth(a + i.labelWidth), i.labelMarginLeft = i.labelWidth) : i.labelPosHorizontal == "center" && i.labelWidth > a ? (i.rect.x -= (i.labelWidth - a) / 2, i.setWidth(i.labelWidth), i.labelMarginLeft = (i.labelWidth - a) / 2) : i.labelPosHorizontal == "right" && i.setWidth(a + i.labelWidth)), i.labelHeight && (i.labelPosVertical == "top" ? (i.rect.y -= i.labelHeight, i.setHeight(o + i.labelHeight), i.labelMarginTop = i.labelHeight) : i.labelPosVertical == "center" && i.labelHeight > o ? (i.rect.y -= (i.labelHeight - o) / 2, i.setHeight(i.labelHeight), i.labelMarginTop = (i.labelHeight - o) / 2) : i.labelPosVertical == "bottom" && i.setHeight(o + i.labelHeight));
2148
- }
2149
- });
2150
- }, x.prototype.tileNodes = function(e, t) {
2151
- var n = this.tileNodesByFavoringDim(e, t, !0), r = this.tileNodesByFavoringDim(e, t, !1), i = this.getOrgRatio(n);
2152
- return this.getOrgRatio(r) < i ? r : n;
2153
- }, x.prototype.getOrgRatio = function(e) {
2154
- var t = e.width / e.height;
2155
- return t < 1 && (t = 1 / t), t;
2156
- }, x.prototype.calcIdealRowWidth = function(e, t) {
2157
- var n = c.TILING_PADDING_VERTICAL, r = c.TILING_PADDING_HORIZONTAL, i = e.length, a = 0, o = 0, s = 0;
2158
- e.forEach(function(e) {
2159
- a += e.getWidth(), o += e.getHeight(), e.getWidth() > s && (s = e.getWidth());
2160
- });
2161
- var l = a / i, u = o / i, d = (n - r) ** 2 + 4 * (l + r) * (u + n) * i, f = (r - n + Math.sqrt(d)) / (2 * (l + r)), p;
2162
- t ? (p = Math.ceil(f), p == f && p++) : p = Math.floor(f);
2163
- var m = p * (l + r) - r;
2164
- return s > m && (m = s), m += r * 2, m;
2165
- }, x.prototype.tileNodesByFavoringDim = function(e, t, n) {
2166
- var r = c.TILING_PADDING_VERTICAL, i = c.TILING_PADDING_HORIZONTAL, a = c.TILING_COMPARE_BY, o = {
2167
- rows: [],
2168
- rowWidth: [],
2169
- rowHeight: [],
2170
- width: 0,
2171
- height: t,
2172
- verticalPadding: r,
2173
- horizontalPadding: i,
2174
- centerX: 0,
2175
- centerY: 0
2176
- };
2177
- a && (o.idealRowWidth = this.calcIdealRowWidth(e, n));
2178
- var s = function(e) {
2179
- return e.rect.width * e.rect.height;
2180
- }, l = function(e, t) {
2181
- return s(t) - s(e);
2182
- };
2183
- e.sort(function(e, t) {
2184
- var n = l;
2185
- return o.idealRowWidth ? (n = a, n(e.id, t.id)) : n(e, t);
2186
- });
2187
- for (var u = 0, d = 0, f = 0; f < e.length; f++) {
2188
- var p = e[f];
2189
- u += p.getCenterX(), d += p.getCenterY();
2190
- }
2191
- o.centerX = u / e.length, o.centerY = d / e.length;
2192
- for (var f = 0; f < e.length; f++) {
2193
- var p = e[f];
2194
- if (o.rows.length == 0) this.insertNodeToRow(o, p, 0, t);
2195
- else if (this.canAddHorizontal(o, p.rect.width, p.rect.height)) {
2196
- var m = o.rows.length - 1;
2197
- o.idealRowWidth || (m = this.getShortestRowIndex(o)), this.insertNodeToRow(o, p, m, t);
2198
- } else this.insertNodeToRow(o, p, o.rows.length, t);
2199
- this.shiftToLastRow(o);
2200
- }
2201
- return o;
2202
- }, x.prototype.insertNodeToRow = function(e, t, n, r) {
2203
- var i = r;
2204
- n == e.rows.length && (e.rows.push([]), e.rowWidth.push(i), e.rowHeight.push(0));
2205
- var a = e.rowWidth[n] + t.rect.width;
2206
- e.rows[n].length > 0 && (a += e.horizontalPadding), e.rowWidth[n] = a, e.width < a && (e.width = a);
2207
- var o = t.rect.height;
2208
- n > 0 && (o += e.verticalPadding);
2209
- var s = 0;
2210
- 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);
2211
- }, x.prototype.getShortestRowIndex = function(e) {
2212
- 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]);
2213
- return t;
2214
- }, x.prototype.getLongestRowIndex = function(e) {
2215
- 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]);
2216
- return t;
2217
- }, x.prototype.canAddHorizontal = function(e, t, n) {
2218
- if (e.idealRowWidth) {
2219
- var r = e.rows.length - 1;
2220
- return e.rowWidth[r] + t + e.horizontalPadding <= e.idealRowWidth;
2221
- }
2222
- var i = this.getShortestRowIndex(e);
2223
- if (i < 0) return !0;
2224
- var a = e.rowWidth[i];
2225
- if (a + e.horizontalPadding + t <= e.width) return !0;
2226
- var o = 0;
2227
- e.rowHeight[i] < n && i > 0 && (o = n + e.verticalPadding - e.rowHeight[i]);
2228
- var s = e.width - a >= t + e.horizontalPadding ? (e.height + o) / (a + t + e.horizontalPadding) : (e.height + o) / e.width;
2229
- o = n + e.verticalPadding;
2230
- var c = e.width < t ? (e.height + o) / t : (e.height + o) / e.width;
2231
- return c < 1 && (c = 1 / c), s < 1 && (s = 1 / s), s < c;
2232
- }, x.prototype.shiftToLastRow = function(e) {
2233
- var t = this.getLongestRowIndex(e), n = e.rowWidth.length - 1, r = e.rows[t], i = r[r.length - 1], a = i.width + e.horizontalPadding;
2234
- if (e.width - e.rowWidth[n] > a && t != n) {
2235
- 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)];
2236
- for (var o = Number.MIN_VALUE, s = 0; s < r.length; s++) r[s].height > o && (o = r[s].height);
2237
- t > 0 && (o += e.verticalPadding);
2238
- var c = e.rowHeight[t] + e.rowHeight[n];
2239
- e.rowHeight[t] = o, e.rowHeight[n] < i.height + e.verticalPadding && (e.rowHeight[n] = i.height + e.verticalPadding);
2240
- var l = e.rowHeight[t] + e.rowHeight[n];
2241
- e.height += l - c, this.shiftToLastRow(e);
2242
- }
2243
- }, x.prototype.tilingPreLayout = function() {
2244
- c.TILE && (this.groupZeroDegreeMembers(), this.clearCompounds(), this.clearZeroDegreeMembers());
2245
- }, x.prototype.tilingPostLayout = function() {
2246
- c.TILE && (this.repopulateZeroDegreeMembers(), this.repopulateCompounds());
2247
- }, x.prototype.reduceTrees = function() {
2248
- for (var e = [], t = !0, n; t;) {
2249
- var r = this.graphManager.getAllNodes(), i = [];
2250
- t = !1;
2251
- for (var a = 0; a < r.length; a++) if (n = r[a], n.getEdges().length == 1 && !n.getEdges()[0].isInterGraph && n.getChild() == null) {
2252
- if (c.PURE_INCREMENTAL) {
2253
- var o = n.getEdges()[0].getOtherEnd(n), s = new m(n.getCenterX() - o.getCenterX(), n.getCenterY() - o.getCenterY());
2254
- i.push([
2255
- n,
2256
- n.getEdges()[0],
2257
- n.getOwner(),
2258
- s
2259
- ]);
2260
- } else i.push([
2261
- n,
2262
- n.getEdges()[0],
2263
- n.getOwner()
2264
- ]);
2265
- t = !0;
2266
- }
2267
- if (t == 1) {
2268
- for (var l = [], u = 0; u < i.length; u++) i[u][0].getEdges().length == 1 && (l.push(i[u]), i[u][0].getOwner().remove(i[u][0]));
2269
- e.push(l), this.graphManager.resetAllNodes(), this.graphManager.resetAllEdges();
2270
- }
2271
- }
2272
- this.prunedNodesAll = e;
2273
- }, x.prototype.growTree = function(e) {
2274
- 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);
2275
- e.splice(e.length - 1, 1), this.graphManager.resetAllNodes(), this.graphManager.resetAllEdges();
2276
- }, x.prototype.findPlaceforPrunedNode = function(e) {
2277
- var t, n, r = e[0];
2278
- if (n = r == e[1].source ? e[1].target : e[1].source, c.PURE_INCREMENTAL) r.setCenter(n.getCenterX() + e[3].getWidth(), n.getCenterY() + e[3].getHeight());
2279
- else {
2280
- var i = n.startX, a = n.finishX, o = n.startY, s = n.finishY, l = [
2281
- 0,
2282
- 0,
2283
- 0,
2284
- 0
2285
- ];
2286
- if (o > 0) for (var d = i; d <= a; d++) l[0] += this.grid[d][o - 1].length + this.grid[d][o].length - 1;
2287
- if (a < this.grid.length - 1) for (var d = o; d <= s; d++) l[1] += this.grid[a + 1][d].length + this.grid[a][d].length - 1;
2288
- if (s < this.grid[0].length - 1) for (var d = i; d <= a; d++) l[2] += this.grid[d][s + 1].length + this.grid[d][s].length - 1;
2289
- if (i > 0) for (var d = o; d <= s; d++) l[3] += this.grid[i - 1][d].length + this.grid[i][d].length - 1;
2290
- for (var f = g.MAX_VALUE, p, m, h = 0; h < l.length; h++) l[h] < f ? (f = l[h], p = 1, m = h) : l[h] == f && p++;
2291
- if (p == 3 && f == 0) l[0] == 0 && l[1] == 0 && l[2] == 0 ? t = 1 : l[0] == 0 && l[1] == 0 && l[3] == 0 ? t = 0 : l[0] == 0 && l[2] == 0 && l[3] == 0 ? t = 3 : l[1] == 0 && l[2] == 0 && l[3] == 0 && (t = 2);
2292
- else if (p == 2 && f == 0) {
2293
- var _ = Math.floor(Math.random() * 2);
2294
- t = l[0] == 0 && l[1] == 0 ? _ == 0 ? 0 : 1 : l[0] == 0 && l[2] == 0 ? _ == 0 ? 0 : 2 : l[0] == 0 && l[3] == 0 ? _ == 0 ? 0 : 3 : l[1] == 0 && l[2] == 0 ? _ == 0 ? 1 : 2 : l[1] == 0 && l[3] == 0 ? _ == 0 ? 1 : 3 : _ == 0 ? 2 : 3;
2295
- } else if (p == 4 && f == 0) {
2296
- var _ = Math.floor(Math.random() * 4);
2297
- t = _;
2298
- } else t = m;
2299
- t == 0 ? r.setCenter(n.getCenterX(), n.getCenterY() - n.getHeight() / 2 - u.DEFAULT_EDGE_LENGTH - r.getHeight() / 2) : t == 1 ? r.setCenter(n.getCenterX() + n.getWidth() / 2 + u.DEFAULT_EDGE_LENGTH + r.getWidth() / 2, n.getCenterY()) : t == 2 ? r.setCenter(n.getCenterX(), n.getCenterY() + n.getHeight() / 2 + u.DEFAULT_EDGE_LENGTH + r.getHeight() / 2) : r.setCenter(n.getCenterX() - n.getWidth() / 2 - u.DEFAULT_EDGE_LENGTH - r.getWidth() / 2, n.getCenterY());
2300
- }
2301
- }, e.exports = x;
2302
- }),
2303
- 991: ((e, t, n) => {
2304
- var r = n(551).FDLayoutNode, i = n(551).IMath;
2305
- function a(e, t, n, i) {
2306
- r.call(this, e, t, n, i);
2307
- }
2308
- for (var o in a.prototype = Object.create(r.prototype), r) a[o] = r[o];
2309
- a.prototype.calculateDisplacement = function() {
2310
- var e = this.graphManager.getLayout();
2311
- this.getChild() != null && this.fixedNodeWeight ? (this.displacementX += e.coolingFactor * (this.springForceX + this.repulsionForceX + this.gravitationForceX) / this.fixedNodeWeight, this.displacementY += e.coolingFactor * (this.springForceY + this.repulsionForceY + this.gravitationForceY) / this.fixedNodeWeight) : (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 && this.child.getNodes().length > 0 && this.propogateDisplacementToChildren(this.displacementX, this.displacementY);
2312
- }, a.prototype.propogateDisplacementToChildren = function(e, t) {
2313
- for (var n = this.getChild().getNodes(), r, i = 0; i < n.length; i++) r = n[i], r.getChild() == null ? (r.displacementX += e, r.displacementY += t) : r.propogateDisplacementToChildren(e, t);
2314
- }, a.prototype.move = function() {
2315
- var e = this.graphManager.getLayout();
2316
- (this.child == null || this.child.getNodes().length == 0) && (this.moveBy(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;
2317
- }, a.prototype.setPred1 = function(e) {
2318
- this.pred1 = e;
2319
- }, a.prototype.getPred1 = function() {
2320
- return pred1;
2321
- }, a.prototype.getPred2 = function() {
2322
- return pred2;
2323
- }, a.prototype.setNext = function(e) {
2324
- this.next = e;
2325
- }, a.prototype.getNext = function() {
2326
- return next;
2327
- }, a.prototype.setProcessed = function(e) {
2328
- this.processed = e;
2329
- }, a.prototype.isProcessed = function() {
2330
- return processed;
2331
- }, e.exports = a;
2332
- }),
2333
- 902: ((e, t, n) => {
2334
- function r(e) {
2335
- if (Array.isArray(e)) {
2336
- for (var t = 0, n = Array(e.length); t < e.length; t++) n[t] = e[t];
2337
- return n;
2338
- } else return Array.from(e);
2339
- }
2340
- var i = n(806), a = n(551).LinkedList, o = n(551).Matrix, s = n(551).SVD;
2341
- function c() {}
2342
- c.handleConstraints = function(e) {
2343
- var t = {};
2344
- t.fixedNodeConstraint = e.constraints.fixedNodeConstraint, t.alignmentConstraint = e.constraints.alignmentConstraint, t.relativePlacementConstraint = e.constraints.relativePlacementConstraint;
2345
- for (var n = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new Map(), l = [], u = [], d = e.getAllNodes(), f = 0, p = 0; p < d.length; p++) {
2346
- var m = d[p];
2347
- m.getChild() ?? (c.set(m.id, f++), l.push(m.getCenterX()), u.push(m.getCenterY()), n.set(m.id, m));
2348
- }
2349
- t.relativePlacementConstraint && t.relativePlacementConstraint.forEach(function(e) {
2350
- !e.gap && e.gap != 0 && (e.left ? e.gap = i.DEFAULT_EDGE_LENGTH + n.get(e.left).getWidth() / 2 + n.get(e.right).getWidth() / 2 : e.gap = i.DEFAULT_EDGE_LENGTH + n.get(e.top).getHeight() / 2 + n.get(e.bottom).getHeight() / 2);
2351
- });
2352
- var h = function(e, t) {
2353
- return {
2354
- x: e.x - t.x,
2355
- y: e.y - t.y
2356
- };
2357
- }, g = function(e) {
2358
- var t = 0, n = 0;
2359
- return e.forEach(function(e) {
2360
- t += l[c.get(e)], n += u[c.get(e)];
2361
- }), {
2362
- x: t / e.size,
2363
- y: n / e.size
2364
- };
2365
- }, _ = function(e, t, n, i, o) {
2366
- function s(e, t) {
2367
- var n = new Set(e), r = !0, i = !1, a = void 0;
2368
- try {
2369
- for (var o = t[Symbol.iterator](), s; !(r = (s = o.next()).done); r = !0) {
2370
- var c = s.value;
2371
- n.add(c);
2372
- }
2373
- } catch (e) {
2374
- i = !0, a = e;
2375
- } finally {
2376
- try {
2377
- !r && o.return && o.return();
2378
- } finally {
2379
- if (i) throw a;
2380
- }
2381
- }
2382
- return n;
2383
- }
2384
- var d = /* @__PURE__ */ new Map();
2385
- e.forEach(function(e, t) {
2386
- d.set(t, 0);
2387
- }), e.forEach(function(e, t) {
2388
- e.forEach(function(e) {
2389
- d.set(e.id, d.get(e.id) + 1);
2390
- });
2391
- });
2392
- var f = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map(), m = new a();
2393
- d.forEach(function(e, r) {
2394
- e == 0 ? (m.push(r), n || (t == "horizontal" ? f.set(r, c.has(r) ? l[c.get(r)] : i.get(r)) : f.set(r, c.has(r) ? u[c.get(r)] : i.get(r)))) : f.set(r, -Infinity), n && p.set(r, new Set([r]));
2395
- }), n && o.forEach(function(e) {
2396
- var r = [];
2397
- if (e.forEach(function(e) {
2398
- n.has(e) && r.push(e);
2399
- }), r.length > 0) {
2400
- var a = 0;
2401
- r.forEach(function(e) {
2402
- t == "horizontal" ? (f.set(e, c.has(e) ? l[c.get(e)] : i.get(e)), a += f.get(e)) : (f.set(e, c.has(e) ? u[c.get(e)] : i.get(e)), a += f.get(e));
2403
- }), a /= r.length, e.forEach(function(e) {
2404
- n.has(e) || f.set(e, a);
2405
- });
2406
- } else {
2407
- var o = 0;
2408
- e.forEach(function(e) {
2409
- t == "horizontal" ? o += c.has(e) ? l[c.get(e)] : i.get(e) : o += c.has(e) ? u[c.get(e)] : i.get(e);
2410
- }), o /= e.length, e.forEach(function(e) {
2411
- f.set(e, o);
2412
- });
2413
- }
2414
- });
2415
- for (var h = function() {
2416
- var r = m.shift();
2417
- e.get(r).forEach(function(e) {
2418
- if (f.get(e.id) < f.get(r) + e.gap) if (n && n.has(e.id)) {
2419
- var a = void 0;
2420
- if (a = t == "horizontal" ? c.has(e.id) ? l[c.get(e.id)] : i.get(e.id) : c.has(e.id) ? u[c.get(e.id)] : i.get(e.id), f.set(e.id, a), a < f.get(r) + e.gap) {
2421
- var o = f.get(r) + e.gap - a;
2422
- p.get(r).forEach(function(e) {
2423
- f.set(e, f.get(e) - o);
2424
- });
2425
- }
2426
- } else f.set(e.id, f.get(r) + e.gap);
2427
- d.set(e.id, d.get(e.id) - 1), d.get(e.id) == 0 && m.push(e.id), n && p.set(e.id, s(p.get(r), p.get(e.id)));
2428
- });
2429
- }; m.length != 0;) h();
2430
- if (n) {
2431
- var g = /* @__PURE__ */ new Set();
2432
- e.forEach(function(e, t) {
2433
- e.length == 0 && g.add(t);
2434
- });
2435
- var _ = [];
2436
- p.forEach(function(e, t) {
2437
- if (g.has(t)) {
2438
- var i = !1, a = !0, o = !1, s = void 0;
2439
- try {
2440
- for (var c = e[Symbol.iterator](), l; !(a = (l = c.next()).done); a = !0) {
2441
- var u = l.value;
2442
- n.has(u) && (i = !0);
2443
- }
2444
- } catch (e) {
2445
- o = !0, s = e;
2446
- } finally {
2447
- try {
2448
- !a && c.return && c.return();
2449
- } finally {
2450
- if (o) throw s;
2451
- }
2452
- }
2453
- if (!i) {
2454
- var d = !1, f = void 0;
2455
- _.forEach(function(t, n) {
2456
- t.has([].concat(r(e))[0]) && (d = !0, f = n);
2457
- }), d ? e.forEach(function(e) {
2458
- _[f].add(e);
2459
- }) : _.push(new Set(e));
2460
- }
2461
- }
2462
- }), _.forEach(function(e, n) {
2463
- var r = Infinity, a = Infinity, o = -Infinity, s = -Infinity, d = !0, p = !1, m = void 0;
2464
- try {
2465
- for (var h = e[Symbol.iterator](), g; !(d = (g = h.next()).done); d = !0) {
2466
- var _ = g.value, v = void 0;
2467
- v = t == "horizontal" ? c.has(_) ? l[c.get(_)] : i.get(_) : c.has(_) ? u[c.get(_)] : i.get(_);
2468
- var y = f.get(_);
2469
- v < r && (r = v), v > o && (o = v), y < a && (a = y), y > s && (s = y);
2470
- }
2471
- } catch (e) {
2472
- p = !0, m = e;
2473
- } finally {
2474
- try {
2475
- !d && h.return && h.return();
2476
- } finally {
2477
- if (p) throw m;
2478
- }
2479
- }
2480
- var b = (r + o) / 2 - (a + s) / 2, x = !0, S = !1, C = void 0;
2481
- try {
2482
- for (var w = e[Symbol.iterator](), T; !(x = (T = w.next()).done); x = !0) {
2483
- var E = T.value;
2484
- f.set(E, f.get(E) + b);
2485
- }
2486
- } catch (e) {
2487
- S = !0, C = e;
2488
- } finally {
2489
- try {
2490
- !x && w.return && w.return();
2491
- } finally {
2492
- if (S) throw C;
2493
- }
2494
- }
2495
- });
2496
- }
2497
- return f;
2498
- }, v = function(e) {
2499
- var t = 0, n = 0, r = 0, i = 0;
2500
- if (e.forEach(function(e) {
2501
- e.left ? l[c.get(e.left)] - l[c.get(e.right)] >= 0 ? t++ : n++ : u[c.get(e.top)] - u[c.get(e.bottom)] >= 0 ? r++ : i++;
2502
- }), t > n && r > i) for (var a = 0; a < c.size; a++) l[a] = -1 * l[a], u[a] = -1 * u[a];
2503
- else if (t > n) for (var o = 0; o < c.size; o++) l[o] = -1 * l[o];
2504
- else if (r > i) for (var s = 0; s < c.size; s++) u[s] = -1 * u[s];
2505
- }, y = function(e) {
2506
- var t = [], n = new a(), r = /* @__PURE__ */ new Set(), i = 0;
2507
- return e.forEach(function(a, o) {
2508
- if (!r.has(o)) {
2509
- t[i] = [];
2510
- var s = o;
2511
- for (n.push(s), r.add(s), t[i].push(s); n.length != 0;) s = n.shift(), e.get(s).forEach(function(e) {
2512
- r.has(e.id) || (n.push(e.id), r.add(e.id), t[i].push(e.id));
2513
- });
2514
- i++;
2515
- }
2516
- }), t;
2517
- }, b = function(e) {
2518
- var t = /* @__PURE__ */ new Map();
2519
- return e.forEach(function(e, n) {
2520
- t.set(n, []);
2521
- }), e.forEach(function(e, n) {
2522
- e.forEach(function(e) {
2523
- t.get(n).push(e), t.get(e.id).push({
2524
- id: n,
2525
- gap: e.gap,
2526
- direction: e.direction
2527
- });
2528
- });
2529
- }), t;
2530
- }, x = function(e) {
2531
- var t = /* @__PURE__ */ new Map();
2532
- return e.forEach(function(e, n) {
2533
- t.set(n, []);
2534
- }), e.forEach(function(e, n) {
2535
- e.forEach(function(e) {
2536
- t.get(e.id).push({
2537
- id: n,
2538
- gap: e.gap,
2539
- direction: e.direction
2540
- });
2541
- });
2542
- }), t;
2543
- }, S = [], C = [], w = !1, T = !1, E = /* @__PURE__ */ new Set(), D = /* @__PURE__ */ new Map(), O = /* @__PURE__ */ new Map(), k = [];
2544
- if (t.fixedNodeConstraint && t.fixedNodeConstraint.forEach(function(e) {
2545
- E.add(e.nodeId);
2546
- }), t.relativePlacementConstraint && (t.relativePlacementConstraint.forEach(function(e) {
2547
- e.left ? (D.has(e.left) ? D.get(e.left).push({
2548
- id: e.right,
2549
- gap: e.gap,
2550
- direction: "horizontal"
2551
- }) : D.set(e.left, [{
2552
- id: e.right,
2553
- gap: e.gap,
2554
- direction: "horizontal"
2555
- }]), D.has(e.right) || D.set(e.right, [])) : (D.has(e.top) ? D.get(e.top).push({
2556
- id: e.bottom,
2557
- gap: e.gap,
2558
- direction: "vertical"
2559
- }) : D.set(e.top, [{
2560
- id: e.bottom,
2561
- gap: e.gap,
2562
- direction: "vertical"
2563
- }]), D.has(e.bottom) || D.set(e.bottom, []));
2564
- }), O = b(D), k = y(O)), i.TRANSFORM_ON_CONSTRAINT_HANDLING) {
2565
- if (t.fixedNodeConstraint && t.fixedNodeConstraint.length > 1) t.fixedNodeConstraint.forEach(function(e, t) {
2566
- S[t] = [e.position.x, e.position.y], C[t] = [l[c.get(e.nodeId)], u[c.get(e.nodeId)]];
2567
- }), w = !0;
2568
- else if (t.alignmentConstraint) (function() {
2569
- var e = 0;
2570
- if (t.alignmentConstraint.vertical) {
2571
- for (var n = t.alignmentConstraint.vertical, i = function(t) {
2572
- var i = /* @__PURE__ */ new Set();
2573
- n[t].forEach(function(e) {
2574
- i.add(e);
2575
- });
2576
- var a = new Set([].concat(r(i)).filter(function(e) {
2577
- return E.has(e);
2578
- })), o = void 0;
2579
- o = a.size > 0 ? l[c.get(a.values().next().value)] : g(i).x, n[t].forEach(function(t) {
2580
- S[e] = [o, u[c.get(t)]], C[e] = [l[c.get(t)], u[c.get(t)]], e++;
2581
- });
2582
- }, a = 0; a < n.length; a++) i(a);
2583
- w = !0;
2584
- }
2585
- if (t.alignmentConstraint.horizontal) {
2586
- for (var o = t.alignmentConstraint.horizontal, s = function(t) {
2587
- var n = /* @__PURE__ */ new Set();
2588
- o[t].forEach(function(e) {
2589
- n.add(e);
2590
- });
2591
- var i = new Set([].concat(r(n)).filter(function(e) {
2592
- return E.has(e);
2593
- })), a = void 0;
2594
- a = i.size > 0 ? l[c.get(i.values().next().value)] : g(n).y, o[t].forEach(function(t) {
2595
- S[e] = [l[c.get(t)], a], C[e] = [l[c.get(t)], u[c.get(t)]], e++;
2596
- });
2597
- }, d = 0; d < o.length; d++) s(d);
2598
- w = !0;
2599
- }
2600
- t.relativePlacementConstraint && (T = !0);
2601
- })();
2602
- else if (t.relativePlacementConstraint) {
2603
- for (var A = 0, j = 0, M = 0; M < k.length; M++) k[M].length > A && (A = k[M].length, j = M);
2604
- if (A < O.size / 2) v(t.relativePlacementConstraint), w = !1, T = !1;
2605
- else {
2606
- var N = /* @__PURE__ */ new Map(), P = /* @__PURE__ */ new Map(), ee = [];
2607
- k[j].forEach(function(e) {
2608
- D.get(e).forEach(function(t) {
2609
- t.direction == "horizontal" ? (N.has(e) ? N.get(e).push(t) : N.set(e, [t]), N.has(t.id) || N.set(t.id, []), ee.push({
2610
- left: e,
2611
- right: t.id
2612
- })) : (P.has(e) ? P.get(e).push(t) : P.set(e, [t]), P.has(t.id) || P.set(t.id, []), ee.push({
2613
- top: e,
2614
- bottom: t.id
2615
- }));
2616
- });
2617
- }), v(ee), T = !1;
2618
- var te = _(N, "horizontal"), F = _(P, "vertical");
2619
- k[j].forEach(function(e, t) {
2620
- C[t] = [l[c.get(e)], u[c.get(e)]], S[t] = [], te.has(e) ? S[t][0] = te.get(e) : S[t][0] = l[c.get(e)], F.has(e) ? S[t][1] = F.get(e) : S[t][1] = u[c.get(e)];
2621
- }), w = !0;
2622
- }
2623
- }
2624
- if (w) {
2625
- for (var I = void 0, L = o.transpose(S), R = o.transpose(C), z = 0; z < L.length; z++) L[z] = o.multGamma(L[z]), R[z] = o.multGamma(R[z]);
2626
- var B = o.multMat(L, o.transpose(R)), ne = s.svd(B);
2627
- I = o.multMat(ne.V, o.transpose(ne.U));
2628
- for (var V = 0; V < c.size; V++) {
2629
- var re = [l[V], u[V]], ie = [I[0][0], I[1][0]], H = [I[0][1], I[1][1]];
2630
- l[V] = o.dotProduct(re, ie), u[V] = o.dotProduct(re, H);
2631
- }
2632
- T && v(t.relativePlacementConstraint);
2633
- }
2634
- }
2635
- if (i.ENFORCE_CONSTRAINTS) {
2636
- if (t.fixedNodeConstraint && t.fixedNodeConstraint.length > 0) {
2637
- var U = {
2638
- x: 0,
2639
- y: 0
2640
- };
2641
- t.fixedNodeConstraint.forEach(function(e, t) {
2642
- var n = {
2643
- x: l[c.get(e.nodeId)],
2644
- y: u[c.get(e.nodeId)]
2645
- }, r = e.position, i = h(r, n);
2646
- U.x += i.x, U.y += i.y;
2647
- }), U.x /= t.fixedNodeConstraint.length, U.y /= t.fixedNodeConstraint.length, l.forEach(function(e, t) {
2648
- l[t] += U.x;
2649
- }), u.forEach(function(e, t) {
2650
- u[t] += U.y;
2651
- }), t.fixedNodeConstraint.forEach(function(e) {
2652
- l[c.get(e.nodeId)] = e.position.x, u[c.get(e.nodeId)] = e.position.y;
2653
- });
2654
- }
2655
- if (t.alignmentConstraint) {
2656
- if (t.alignmentConstraint.vertical) for (var W = t.alignmentConstraint.vertical, ae = function(e) {
2657
- var t = /* @__PURE__ */ new Set();
2658
- W[e].forEach(function(e) {
2659
- t.add(e);
2660
- });
2661
- var n = new Set([].concat(r(t)).filter(function(e) {
2662
- return E.has(e);
2663
- })), i = void 0;
2664
- i = n.size > 0 ? l[c.get(n.values().next().value)] : g(t).x, t.forEach(function(e) {
2665
- E.has(e) || (l[c.get(e)] = i);
2666
- });
2667
- }, G = 0; G < W.length; G++) ae(G);
2668
- if (t.alignmentConstraint.horizontal) for (var K = t.alignmentConstraint.horizontal, oe = function(e) {
2669
- var t = /* @__PURE__ */ new Set();
2670
- K[e].forEach(function(e) {
2671
- t.add(e);
2672
- });
2673
- var n = new Set([].concat(r(t)).filter(function(e) {
2674
- return E.has(e);
2675
- })), i = void 0;
2676
- i = n.size > 0 ? u[c.get(n.values().next().value)] : g(t).y, t.forEach(function(e) {
2677
- E.has(e) || (u[c.get(e)] = i);
2678
- });
2679
- }, q = 0; q < K.length; q++) oe(q);
2680
- }
2681
- t.relativePlacementConstraint && (function() {
2682
- var e = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new Map(), s = /* @__PURE__ */ new Set(), d = /* @__PURE__ */ new Set();
2683
- if (E.forEach(function(e) {
2684
- s.add(e), d.add(e);
2685
- }), t.alignmentConstraint) {
2686
- if (t.alignmentConstraint.vertical) for (var f = t.alignmentConstraint.vertical, p = function(t) {
2687
- r.set("dummy" + t, []), f[t].forEach(function(n) {
2688
- e.set(n, "dummy" + t), r.get("dummy" + t).push(n), E.has(n) && s.add("dummy" + t);
2689
- }), a.set("dummy" + t, l[c.get(f[t][0])]);
2690
- }, m = 0; m < f.length; m++) p(m);
2691
- if (t.alignmentConstraint.horizontal) for (var h = t.alignmentConstraint.horizontal, g = function(e) {
2692
- i.set("dummy" + e, []), h[e].forEach(function(t) {
2693
- n.set(t, "dummy" + e), i.get("dummy" + e).push(t), E.has(t) && d.add("dummy" + e);
2694
- }), o.set("dummy" + e, u[c.get(h[e][0])]);
2695
- }, v = 0; v < h.length; v++) g(v);
2696
- }
2697
- var S = /* @__PURE__ */ new Map(), C = /* @__PURE__ */ new Map(), w = function(t) {
2698
- D.get(t).forEach(function(r) {
2699
- var i = void 0, a = void 0;
2700
- r.direction == "horizontal" ? (i = e.get(t) ? e.get(t) : t, a = e.get(r.id) ? {
2701
- id: e.get(r.id),
2702
- gap: r.gap,
2703
- direction: r.direction
2704
- } : r, S.has(i) ? S.get(i).push(a) : S.set(i, [a]), S.has(a.id) || S.set(a.id, [])) : (i = n.get(t) ? n.get(t) : t, a = n.get(r.id) ? {
2705
- id: n.get(r.id),
2706
- gap: r.gap,
2707
- direction: r.direction
2708
- } : r, C.has(i) ? C.get(i).push(a) : C.set(i, [a]), C.has(a.id) || C.set(a.id, []));
2709
- });
2710
- }, T = !0, O = !1, k = void 0;
2711
- try {
2712
- for (var A = D.keys()[Symbol.iterator](), j; !(T = (j = A.next()).done); T = !0) {
2713
- var M = j.value;
2714
- w(M);
2715
- }
2716
- } catch (e) {
2717
- O = !0, k = e;
2718
- } finally {
2719
- try {
2720
- !T && A.return && A.return();
2721
- } finally {
2722
- if (O) throw k;
2723
- }
2724
- }
2725
- var N = b(S), P = b(C), ee = y(N), te = y(P), F = x(S), I = x(C), L = [], R = [];
2726
- ee.forEach(function(e, t) {
2727
- L[t] = [], e.forEach(function(e) {
2728
- F.get(e).length == 0 && L[t].push(e);
2729
- });
2730
- }), te.forEach(function(e, t) {
2731
- R[t] = [], e.forEach(function(e) {
2732
- I.get(e).length == 0 && R[t].push(e);
2733
- });
2734
- });
2735
- var z = _(S, "horizontal", s, a, L), B = _(C, "vertical", d, o, R), ne = function(e) {
2736
- r.get(e) ? r.get(e).forEach(function(t) {
2737
- l[c.get(t)] = z.get(e);
2738
- }) : l[c.get(e)] = z.get(e);
2739
- }, V = !0, re = !1, ie = void 0;
2740
- try {
2741
- for (var H = z.keys()[Symbol.iterator](), U; !(V = (U = H.next()).done); V = !0) {
2742
- var W = U.value;
2743
- ne(W);
2744
- }
2745
- } catch (e) {
2746
- re = !0, ie = e;
2747
- } finally {
2748
- try {
2749
- !V && H.return && H.return();
2750
- } finally {
2751
- if (re) throw ie;
2752
- }
2753
- }
2754
- var ae = function(e) {
2755
- i.get(e) ? i.get(e).forEach(function(t) {
2756
- u[c.get(t)] = B.get(e);
2757
- }) : u[c.get(e)] = B.get(e);
2758
- }, G = !0, K = !1, oe = void 0;
2759
- try {
2760
- for (var q = B.keys()[Symbol.iterator](), se; !(G = (se = q.next()).done); G = !0) {
2761
- var W = se.value;
2762
- ae(W);
2763
- }
2764
- } catch (e) {
2765
- K = !0, oe = e;
2766
- } finally {
2767
- try {
2768
- !G && q.return && q.return();
2769
- } finally {
2770
- if (K) throw oe;
2771
- }
2772
- }
2773
- })();
2774
- }
2775
- for (var se = 0; se < d.length; se++) {
2776
- var J = d[se];
2777
- J.getChild() ?? J.setCenter(l[c.get(J.id)], u[c.get(J.id)]);
2778
- }
2779
- }, e.exports = c;
2780
- }),
2781
- 551: ((t) => {
2782
- t.exports = e;
2783
- })
2784
- }, n = {};
2785
- function r(e) {
2786
- var i = n[e];
2787
- if (i !== void 0) return i.exports;
2788
- var a = n[e] = { exports: {} };
2789
- return t[e](a, a.exports, r), a.exports;
2790
- }
2791
- return r(45);
2792
- })();
2793
- });
2794
- })), import_cytoscape_fcose = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((e, t) => {
2795
- (function(n, r) {
2796
- typeof e == "object" && typeof t == "object" ? t.exports = r(require_cose_base()) : typeof define == "function" && define.amd ? define(["cose-base"], r) : typeof e == "object" ? e.cytoscapeFcose = r(require_cose_base()) : n.cytoscapeFcose = r(n.coseBase);
2797
- })(e, function(e) {
2798
- return (() => {
2799
- var t = {
2800
- 658: ((e) => {
2801
- e.exports = Object.assign == null ? function(e) {
2802
- return [...arguments].slice(1).forEach(function(t) {
2803
- Object.keys(t).forEach(function(n) {
2804
- return e[n] = t[n];
2805
- });
2806
- }), e;
2807
- } : Object.assign.bind(Object);
2808
- }),
2809
- 548: ((e, t, n) => {
2810
- var r = function() {
2811
- function e(e, t) {
2812
- var n = [], r = !0, i = !1, a = void 0;
2813
- try {
2814
- for (var o = e[Symbol.iterator](), s; !(r = (s = o.next()).done) && (n.push(s.value), !(t && n.length === t)); r = !0);
2815
- } catch (e) {
2816
- i = !0, a = e;
2817
- } finally {
2818
- try {
2819
- !r && o.return && o.return();
2820
- } finally {
2821
- if (i) throw a;
2822
- }
2823
- }
2824
- return n;
2825
- }
2826
- return function(t, n) {
2827
- if (Array.isArray(t)) return t;
2828
- if (Symbol.iterator in Object(t)) return e(t, n);
2829
- throw TypeError("Invalid attempt to destructure non-iterable instance");
2830
- };
2831
- }(), i = n(140).layoutBase.LinkedList, a = {};
2832
- a.getTopMostNodes = function(e) {
2833
- for (var t = {}, n = 0; n < e.length; n++) t[e[n].id()] = !0;
2834
- return e.filter(function(e, n) {
2835
- typeof e == "number" && (e = n);
2836
- for (var r = e.parent()[0]; r != null;) {
2837
- if (t[r.id()]) return !1;
2838
- r = r.parent()[0];
2839
- }
2840
- return !0;
2841
- });
2842
- }, a.connectComponents = function(e, t, n, r) {
2843
- var a = new i(), o = /* @__PURE__ */ new Set(), s = [], c = void 0, l = void 0, u = void 0, d = !1, f = 1, p = [], m = [], h = function() {
2844
- var r = e.collection();
2845
- m.push(r);
2846
- var i = n[0], h = e.collection();
2847
- h.merge(i).merge(i.descendants().intersection(t)), s.push(i), h.forEach(function(e) {
2848
- a.push(e), o.add(e), r.merge(e);
2849
- });
2850
- for (var g = function() {
2851
- i = a.shift();
2852
- var l = e.collection();
2853
- i.neighborhood().nodes().forEach(function(e) {
2854
- t.intersection(i.edgesWith(e)).length > 0 && l.merge(e);
2855
- });
2856
- for (var u = 0; u < l.length; u++) {
2857
- var d = l[u];
2858
- c = n.intersection(d.union(d.ancestors())), c != null && !o.has(c[0]) && c.union(c.descendants()).forEach(function(e) {
2859
- a.push(e), o.add(e), r.merge(e), n.has(e) && s.push(e);
2860
- });
2861
- }
2862
- }; a.length != 0;) g();
2863
- if (r.forEach(function(e) {
2864
- t.intersection(e.connectedEdges()).forEach(function(e) {
2865
- r.has(e.source()) && r.has(e.target()) && r.merge(e);
2866
- });
2867
- }), s.length == n.length && (d = !0), !d || d && f > 1) {
2868
- l = s[0], u = l.connectedEdges().length, s.forEach(function(e) {
2869
- e.connectedEdges().length < u && (u = e.connectedEdges().length, l = e);
2870
- }), p.push(l.id());
2871
- var _ = e.collection();
2872
- _.merge(s[0]), s.forEach(function(e) {
2873
- _.merge(e);
2874
- }), s = [], n = n.difference(_), f++;
2875
- }
2876
- };
2877
- do
2878
- h();
2879
- while (!d);
2880
- return r && p.length > 0 && r.set("dummy" + (r.size + 1), p), m;
2881
- }, a.relocateComponent = function(e, t, n) {
2882
- if (!n.fixedNodeConstraint) {
2883
- var i = Infinity, a = -Infinity, o = Infinity, s = -Infinity;
2884
- if (n.quality == "draft") {
2885
- var c = !0, l = !1, u = void 0;
2886
- try {
2887
- for (var d = t.nodeIndexes[Symbol.iterator](), f; !(c = (f = d.next()).done); c = !0) {
2888
- var p = f.value, m = r(p, 2), h = m[0], g = m[1], _ = n.cy.getElementById(h);
2889
- if (_) {
2890
- var v = _.boundingBox(), y = t.xCoords[g] - v.w / 2, b = t.xCoords[g] + v.w / 2, x = t.yCoords[g] - v.h / 2, S = t.yCoords[g] + v.h / 2;
2891
- y < i && (i = y), b > a && (a = b), x < o && (o = x), S > s && (s = S);
2892
- }
2893
- }
2894
- } catch (e) {
2895
- l = !0, u = e;
2896
- } finally {
2897
- try {
2898
- !c && d.return && d.return();
2899
- } finally {
2900
- if (l) throw u;
2901
- }
2902
- }
2903
- var C = e.x - (a + i) / 2, w = e.y - (s + o) / 2;
2904
- t.xCoords = t.xCoords.map(function(e) {
2905
- return e + C;
2906
- }), t.yCoords = t.yCoords.map(function(e) {
2907
- return e + w;
2908
- });
2909
- } else {
2910
- Object.keys(t).forEach(function(e) {
2911
- var n = t[e], r = n.getRect().x, c = n.getRect().x + n.getRect().width, l = n.getRect().y, u = n.getRect().y + n.getRect().height;
2912
- r < i && (i = r), c > a && (a = c), l < o && (o = l), u > s && (s = u);
2913
- });
2914
- var T = e.x - (a + i) / 2, E = e.y - (s + o) / 2;
2915
- Object.keys(t).forEach(function(e) {
2916
- var n = t[e];
2917
- n.setCenter(n.getCenterX() + T, n.getCenterY() + E);
2918
- });
2919
- }
2920
- }
2921
- }, a.calcBoundingBox = function(e, t, n, r) {
2922
- for (var i = 2 ** 53 - 1, a = -(2 ** 53 - 1), o = 2 ** 53 - 1, s = -(2 ** 53 - 1), c = void 0, l = void 0, u = void 0, d = void 0, f = e.descendants().not(":parent"), p = f.length, m = 0; m < p; m++) {
2923
- var h = f[m];
2924
- c = t[r.get(h.id())] - h.width() / 2, l = t[r.get(h.id())] + h.width() / 2, u = n[r.get(h.id())] - h.height() / 2, d = n[r.get(h.id())] + h.height() / 2, i > c && (i = c), a < l && (a = l), o > u && (o = u), s < d && (s = d);
2925
- }
2926
- var g = {};
2927
- return g.topLeftX = i, g.topLeftY = o, g.width = a - i, g.height = s - o, g;
2928
- }, a.calcParentsWithoutChildren = function(e, t) {
2929
- var n = e.collection();
2930
- return t.nodes(":parent").forEach(function(e) {
2931
- var t = !1;
2932
- e.children().forEach(function(e) {
2933
- e.css("display") != "none" && (t = !0);
2934
- }), t || n.merge(e);
2935
- }), n;
2936
- }, e.exports = a;
2937
- }),
2938
- 816: ((e, t, n) => {
2939
- var r = n(548), i = n(140).CoSELayout, a = n(140).CoSENode, o = n(140).layoutBase.PointD, s = n(140).layoutBase.DimensionD, c = n(140).layoutBase.LayoutConstants, l = n(140).layoutBase.FDLayoutConstants, u = n(140).CoSEConstants;
2940
- e.exports = { coseLayout: function(e, t) {
2941
- var n = e.cy, d = e.eles, f = d.nodes(), p = d.edges(), m = void 0, h = void 0, g = void 0, _ = {};
2942
- e.randomize && (m = t.nodeIndexes, h = t.xCoords, g = t.yCoords);
2943
- var v = function(e) {
2944
- return typeof e == "function";
2945
- }, y = function(e, t) {
2946
- return v(e) ? e(t) : e;
2947
- }, b = r.calcParentsWithoutChildren(n, d), x = function e(t, n, i, c) {
2948
- for (var l = n.length, u = 0; u < l; u++) {
2949
- var d = n[u], f = null;
2950
- d.intersection(b).length == 0 && (f = d.children());
2951
- var p = void 0, v = d.layoutDimensions({ nodeDimensionsIncludeLabels: c.nodeDimensionsIncludeLabels });
2952
- if (d.outerWidth() != null && d.outerHeight() != null) if (c.randomize) if (!d.isParent()) p = t.add(new a(i.graphManager, new o(h[m.get(d.id())] - v.w / 2, g[m.get(d.id())] - v.h / 2), new s(parseFloat(v.w), parseFloat(v.h))));
2953
- else {
2954
- var x = r.calcBoundingBox(d, h, g, m);
2955
- p = d.intersection(b).length == 0 ? t.add(new a(i.graphManager, new o(x.topLeftX, x.topLeftY), new s(x.width, x.height))) : t.add(new a(i.graphManager, new o(x.topLeftX, x.topLeftY), new s(parseFloat(v.w), parseFloat(v.h))));
2956
- }
2957
- else p = t.add(new a(i.graphManager, new o(d.position("x") - v.w / 2, d.position("y") - v.h / 2), new s(parseFloat(v.w), parseFloat(v.h))));
2958
- else p = t.add(new a(this.graphManager));
2959
- if (p.id = d.data("id"), p.nodeRepulsion = y(c.nodeRepulsion, d), p.paddingLeft = parseInt(d.css("padding")), p.paddingTop = parseInt(d.css("padding")), p.paddingRight = parseInt(d.css("padding")), p.paddingBottom = parseInt(d.css("padding")), c.nodeDimensionsIncludeLabels && (p.labelWidth = d.boundingBox({
2960
- includeLabels: !0,
2961
- includeNodes: !1,
2962
- includeOverlays: !1
2963
- }).w, p.labelHeight = d.boundingBox({
2964
- includeLabels: !0,
2965
- includeNodes: !1,
2966
- includeOverlays: !1
2967
- }).h, p.labelPosVertical = d.css("text-valign"), p.labelPosHorizontal = d.css("text-halign")), _[d.data("id")] = p, isNaN(p.rect.x) && (p.rect.x = 0), isNaN(p.rect.y) && (p.rect.y = 0), f != null && f.length > 0) {
2968
- var S = void 0;
2969
- S = i.getGraphManager().add(i.newGraph(), p), e(S, f, i, c);
2970
- }
2971
- }
2972
- }, S = function(t, n, r) {
2973
- for (var i = 0, a = 0, o = 0; o < r.length; o++) {
2974
- var s = r[o], c = _[s.data("source")], d = _[s.data("target")];
2975
- if (c && d && c !== d && c.getEdgesBetween(d).length == 0) {
2976
- var f = n.add(t.newEdge(), c, d);
2977
- f.id = s.id(), f.idealLength = y(e.idealEdgeLength, s), f.edgeElasticity = y(e.edgeElasticity, s), i += f.idealLength, a++;
2978
- }
2979
- }
2980
- e.idealEdgeLength != null && (a > 0 ? u.DEFAULT_EDGE_LENGTH = l.DEFAULT_EDGE_LENGTH = i / a : v(e.idealEdgeLength) ? u.DEFAULT_EDGE_LENGTH = l.DEFAULT_EDGE_LENGTH = 50 : u.DEFAULT_EDGE_LENGTH = l.DEFAULT_EDGE_LENGTH = e.idealEdgeLength, u.MIN_REPULSION_DIST = l.MIN_REPULSION_DIST = l.DEFAULT_EDGE_LENGTH / 10, u.DEFAULT_RADIAL_SEPARATION = l.DEFAULT_EDGE_LENGTH);
2981
- }, C = function(e, t) {
2982
- t.fixedNodeConstraint && (e.constraints.fixedNodeConstraint = t.fixedNodeConstraint), t.alignmentConstraint && (e.constraints.alignmentConstraint = t.alignmentConstraint), t.relativePlacementConstraint && (e.constraints.relativePlacementConstraint = t.relativePlacementConstraint);
2983
- };
2984
- e.nestingFactor != null && (u.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = l.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR = e.nestingFactor), e.gravity != null && (u.DEFAULT_GRAVITY_STRENGTH = l.DEFAULT_GRAVITY_STRENGTH = e.gravity), e.numIter != null && (u.MAX_ITERATIONS = l.MAX_ITERATIONS = e.numIter), e.gravityRange != null && (u.DEFAULT_GRAVITY_RANGE_FACTOR = l.DEFAULT_GRAVITY_RANGE_FACTOR = e.gravityRange), e.gravityCompound != null && (u.DEFAULT_COMPOUND_GRAVITY_STRENGTH = l.DEFAULT_COMPOUND_GRAVITY_STRENGTH = e.gravityCompound), e.gravityRangeCompound != null && (u.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = l.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR = e.gravityRangeCompound), e.initialEnergyOnIncremental != null && (u.DEFAULT_COOLING_FACTOR_INCREMENTAL = l.DEFAULT_COOLING_FACTOR_INCREMENTAL = e.initialEnergyOnIncremental), e.tilingCompareBy != null && (u.TILING_COMPARE_BY = e.tilingCompareBy), e.quality == "proof" ? c.QUALITY = 2 : c.QUALITY = 0, u.NODE_DIMENSIONS_INCLUDE_LABELS = l.NODE_DIMENSIONS_INCLUDE_LABELS = c.NODE_DIMENSIONS_INCLUDE_LABELS = e.nodeDimensionsIncludeLabels, u.DEFAULT_INCREMENTAL = l.DEFAULT_INCREMENTAL = c.DEFAULT_INCREMENTAL = !e.randomize, u.ANIMATE = l.ANIMATE = c.ANIMATE = e.animate, u.TILE = e.tile, u.TILING_PADDING_VERTICAL = typeof e.tilingPaddingVertical == "function" ? e.tilingPaddingVertical.call() : e.tilingPaddingVertical, u.TILING_PADDING_HORIZONTAL = typeof e.tilingPaddingHorizontal == "function" ? e.tilingPaddingHorizontal.call() : e.tilingPaddingHorizontal, u.DEFAULT_INCREMENTAL = l.DEFAULT_INCREMENTAL = c.DEFAULT_INCREMENTAL = !0, u.PURE_INCREMENTAL = !e.randomize, c.DEFAULT_UNIFORM_LEAF_NODE_SIZES = e.uniformNodeDimensions, e.step == "transformed" && (u.TRANSFORM_ON_CONSTRAINT_HANDLING = !0, u.ENFORCE_CONSTRAINTS = !1, u.APPLY_LAYOUT = !1), e.step == "enforced" && (u.TRANSFORM_ON_CONSTRAINT_HANDLING = !1, u.ENFORCE_CONSTRAINTS = !0, u.APPLY_LAYOUT = !1), e.step == "cose" && (u.TRANSFORM_ON_CONSTRAINT_HANDLING = !1, u.ENFORCE_CONSTRAINTS = !1, u.APPLY_LAYOUT = !0), e.step == "all" && (e.randomize ? u.TRANSFORM_ON_CONSTRAINT_HANDLING = !0 : u.TRANSFORM_ON_CONSTRAINT_HANDLING = !1, u.ENFORCE_CONSTRAINTS = !0, u.APPLY_LAYOUT = !0), e.fixedNodeConstraint || e.alignmentConstraint || e.relativePlacementConstraint ? u.TREE_REDUCTION_ON_INCREMENTAL = !1 : u.TREE_REDUCTION_ON_INCREMENTAL = !0;
2985
- var w = new i(), T = w.newGraphManager();
2986
- return x(T.addRoot(), r.getTopMostNodes(f), w, e), S(w, T, p), C(w, e), w.runLayout(), _;
2987
- } };
2988
- }),
2989
- 212: ((e, t, n) => {
2990
- var r = function() {
2991
- function e(e, t) {
2992
- for (var n = 0; n < t.length; n++) {
2993
- var r = t[n];
2994
- r.enumerable = r.enumerable || !1, r.configurable = !0, "value" in r && (r.writable = !0), Object.defineProperty(e, r.key, r);
2995
- }
2996
- }
2997
- return function(t, n, r) {
2998
- return n && e(t.prototype, n), r && e(t, r), t;
2999
- };
3000
- }();
3001
- function i(e, t) {
3002
- if (!(e instanceof t)) throw TypeError("Cannot call a class as a function");
3003
- }
3004
- var a = n(658), o = n(548), s = n(657).spectralLayout, c = n(816).coseLayout, l = Object.freeze({
3005
- quality: "default",
3006
- randomize: !0,
3007
- animate: !0,
3008
- animationDuration: 1e3,
3009
- animationEasing: void 0,
3010
- fit: !0,
3011
- padding: 30,
3012
- nodeDimensionsIncludeLabels: !1,
3013
- uniformNodeDimensions: !1,
3014
- packComponents: !0,
3015
- step: "all",
3016
- samplingType: !0,
3017
- sampleSize: 25,
3018
- nodeSeparation: 75,
3019
- piTol: 1e-7,
3020
- nodeRepulsion: function(e) {
3021
- return 4500;
3022
- },
3023
- idealEdgeLength: function(e) {
3024
- return 50;
3025
- },
3026
- edgeElasticity: function(e) {
3027
- return .45;
3028
- },
3029
- nestingFactor: .1,
3030
- gravity: .25,
3031
- numIter: 2500,
3032
- tile: !0,
3033
- tilingCompareBy: void 0,
3034
- tilingPaddingVertical: 10,
3035
- tilingPaddingHorizontal: 10,
3036
- gravityRangeCompound: 1.5,
3037
- gravityCompound: 1,
3038
- gravityRange: 3.8,
3039
- initialEnergyOnIncremental: .3,
3040
- fixedNodeConstraint: void 0,
3041
- alignmentConstraint: void 0,
3042
- relativePlacementConstraint: void 0,
3043
- ready: function() {},
3044
- stop: function() {}
3045
- });
3046
- e.exports = function() {
3047
- function e(t) {
3048
- i(this, e), this.options = a({}, l, t);
3049
- }
3050
- return r(e, [{
3051
- key: "run",
3052
- value: function() {
3053
- var e = this, t = this.options, n = t.cy, r = t.eles, i = [], a = [], l = void 0, u = [];
3054
- t.fixedNodeConstraint && (!Array.isArray(t.fixedNodeConstraint) || t.fixedNodeConstraint.length == 0) && (t.fixedNodeConstraint = void 0), t.alignmentConstraint && (t.alignmentConstraint.vertical && (!Array.isArray(t.alignmentConstraint.vertical) || t.alignmentConstraint.vertical.length == 0) && (t.alignmentConstraint.vertical = void 0), t.alignmentConstraint.horizontal && (!Array.isArray(t.alignmentConstraint.horizontal) || t.alignmentConstraint.horizontal.length == 0) && (t.alignmentConstraint.horizontal = void 0)), t.relativePlacementConstraint && (!Array.isArray(t.relativePlacementConstraint) || t.relativePlacementConstraint.length == 0) && (t.relativePlacementConstraint = void 0), (t.fixedNodeConstraint || t.alignmentConstraint || t.relativePlacementConstraint) && (t.tile = !1, t.packComponents = !1);
3055
- var d = void 0, f = !1;
3056
- if (n.layoutUtilities && t.packComponents && (d = n.layoutUtilities("get"), d ||= n.layoutUtilities(), f = !0), r.nodes().length > 0) if (f) {
3057
- var p = o.getTopMostNodes(t.eles.nodes());
3058
- if (l = o.connectComponents(n, t.eles, p), l.forEach(function(e) {
3059
- var t = e.boundingBox();
3060
- u.push({
3061
- x: t.x1 + t.w / 2,
3062
- y: t.y1 + t.h / 2
3063
- });
3064
- }), t.randomize && l.forEach(function(e) {
3065
- t.eles = e, i.push(s(t));
3066
- }), t.quality == "default" || t.quality == "proof") {
3067
- var m = n.collection();
3068
- if (t.tile) {
3069
- var h = /* @__PURE__ */ new Map(), g = [], _ = [], v = 0, y = {
3070
- nodeIndexes: h,
3071
- xCoords: g,
3072
- yCoords: _
3073
- }, b = [];
3074
- if (l.forEach(function(e, t) {
3075
- e.edges().length == 0 && (e.nodes().forEach(function(t, n) {
3076
- m.merge(e.nodes()[n]), t.isParent() || (y.nodeIndexes.set(e.nodes()[n].id(), v++), y.xCoords.push(e.nodes()[0].position().x), y.yCoords.push(e.nodes()[0].position().y));
3077
- }), b.push(t));
3078
- }), m.length > 1) {
3079
- var x = m.boundingBox();
3080
- u.push({
3081
- x: x.x1 + x.w / 2,
3082
- y: x.y1 + x.h / 2
3083
- }), l.push(m), i.push(y);
3084
- for (var S = b.length - 1; S >= 0; S--) l.splice(b[S], 1), i.splice(b[S], 1), u.splice(b[S], 1);
3085
- }
3086
- }
3087
- l.forEach(function(e, n) {
3088
- t.eles = e, a.push(c(t, i[n])), o.relocateComponent(u[n], a[n], t);
3089
- });
3090
- } else l.forEach(function(e, n) {
3091
- o.relocateComponent(u[n], i[n], t);
3092
- });
3093
- var C = /* @__PURE__ */ new Set();
3094
- if (l.length > 1) {
3095
- var w = [], T = r.filter(function(e) {
3096
- return e.css("display") == "none";
3097
- });
3098
- l.forEach(function(e, n) {
3099
- var r = void 0;
3100
- if (t.quality == "draft" && (r = i[n].nodeIndexes), e.nodes().not(T).length > 0) {
3101
- var s = {};
3102
- s.edges = [], s.nodes = [];
3103
- var c = void 0;
3104
- e.nodes().not(T).forEach(function(e) {
3105
- if (t.quality == "draft") if (!e.isParent()) c = r.get(e.id()), s.nodes.push({
3106
- x: i[n].xCoords[c] - e.boundingbox().w / 2,
3107
- y: i[n].yCoords[c] - e.boundingbox().h / 2,
3108
- width: e.boundingbox().w,
3109
- height: e.boundingbox().h
3110
- });
3111
- else {
3112
- var l = o.calcBoundingBox(e, i[n].xCoords, i[n].yCoords, r);
3113
- s.nodes.push({
3114
- x: l.topLeftX,
3115
- y: l.topLeftY,
3116
- width: l.width,
3117
- height: l.height
3118
- });
3119
- }
3120
- else a[n][e.id()] && s.nodes.push({
3121
- x: a[n][e.id()].getLeft(),
3122
- y: a[n][e.id()].getTop(),
3123
- width: a[n][e.id()].getWidth(),
3124
- height: a[n][e.id()].getHeight()
3125
- });
3126
- }), e.edges().forEach(function(e) {
3127
- var c = e.source(), l = e.target();
3128
- if (c.css("display") != "none" && l.css("display") != "none") if (t.quality == "draft") {
3129
- var u = r.get(c.id()), d = r.get(l.id()), f = [], p = [];
3130
- if (c.isParent()) {
3131
- var m = o.calcBoundingBox(c, i[n].xCoords, i[n].yCoords, r);
3132
- f.push(m.topLeftX + m.width / 2), f.push(m.topLeftY + m.height / 2);
3133
- } else f.push(i[n].xCoords[u]), f.push(i[n].yCoords[u]);
3134
- if (l.isParent()) {
3135
- var h = o.calcBoundingBox(l, i[n].xCoords, i[n].yCoords, r);
3136
- p.push(h.topLeftX + h.width / 2), p.push(h.topLeftY + h.height / 2);
3137
- } else p.push(i[n].xCoords[d]), p.push(i[n].yCoords[d]);
3138
- s.edges.push({
3139
- startX: f[0],
3140
- startY: f[1],
3141
- endX: p[0],
3142
- endY: p[1]
3143
- });
3144
- } else a[n][c.id()] && a[n][l.id()] && s.edges.push({
3145
- startX: a[n][c.id()].getCenterX(),
3146
- startY: a[n][c.id()].getCenterY(),
3147
- endX: a[n][l.id()].getCenterX(),
3148
- endY: a[n][l.id()].getCenterY()
3149
- });
3150
- }), s.nodes.length > 0 && (w.push(s), C.add(n));
3151
- }
3152
- });
3153
- var E = d.packComponents(w, t.randomize).shifts;
3154
- if (t.quality == "draft") i.forEach(function(e, t) {
3155
- var n = e.xCoords.map(function(e) {
3156
- return e + E[t].dx;
3157
- }), r = e.yCoords.map(function(e) {
3158
- return e + E[t].dy;
3159
- });
3160
- e.xCoords = n, e.yCoords = r;
3161
- });
3162
- else {
3163
- var D = 0;
3164
- C.forEach(function(e) {
3165
- Object.keys(a[e]).forEach(function(t) {
3166
- var n = a[e][t];
3167
- n.setCenter(n.getCenterX() + E[D].dx, n.getCenterY() + E[D].dy);
3168
- }), D++;
3169
- });
3170
- }
3171
- }
3172
- } else {
3173
- var O = t.eles.boundingBox();
3174
- if (u.push({
3175
- x: O.x1 + O.w / 2,
3176
- y: O.y1 + O.h / 2
3177
- }), t.randomize) {
3178
- var k = s(t);
3179
- i.push(k);
3180
- }
3181
- t.quality == "default" || t.quality == "proof" ? (a.push(c(t, i[0])), o.relocateComponent(u[0], a[0], t)) : o.relocateComponent(u[0], i[0], t);
3182
- }
3183
- var A = function(e, n) {
3184
- if (t.quality == "default" || t.quality == "proof") {
3185
- typeof e == "number" && (e = n);
3186
- var r = void 0, o = void 0, s = e.data("id");
3187
- return a.forEach(function(e) {
3188
- s in e && (r = {
3189
- x: e[s].getRect().getCenterX(),
3190
- y: e[s].getRect().getCenterY()
3191
- }, o = e[s]);
3192
- }), t.nodeDimensionsIncludeLabels && (o.labelWidth && (o.labelPosHorizontal == "left" ? r.x += o.labelWidth / 2 : o.labelPosHorizontal == "right" && (r.x -= o.labelWidth / 2)), o.labelHeight && (o.labelPosVertical == "top" ? r.y += o.labelHeight / 2 : o.labelPosVertical == "bottom" && (r.y -= o.labelHeight / 2))), r ??= {
3193
- x: e.position("x"),
3194
- y: e.position("y")
3195
- }, {
3196
- x: r.x,
3197
- y: r.y
3198
- };
3199
- } else {
3200
- var c = void 0;
3201
- return i.forEach(function(t) {
3202
- var n = t.nodeIndexes.get(e.id());
3203
- n != null && (c = {
3204
- x: t.xCoords[n],
3205
- y: t.yCoords[n]
3206
- });
3207
- }), c ??= {
3208
- x: e.position("x"),
3209
- y: e.position("y")
3210
- }, {
3211
- x: c.x,
3212
- y: c.y
3213
- };
3214
- }
3215
- };
3216
- if (t.quality == "default" || t.quality == "proof" || t.randomize) {
3217
- var j = o.calcParentsWithoutChildren(n, r), M = r.filter(function(e) {
3218
- return e.css("display") == "none";
3219
- });
3220
- t.eles = r.not(M), r.nodes().not(":parent").not(M).layoutPositions(e, t, A), j.length > 0 && j.forEach(function(e) {
3221
- e.position(A(e));
3222
- });
3223
- } else console.log("If randomize option is set to false, then quality option must be 'default' or 'proof'.");
3224
- }
3225
- }]), e;
3226
- }();
3227
- }),
3228
- 657: ((e, t, n) => {
3229
- var r = n(548), i = n(140).layoutBase.Matrix, a = n(140).layoutBase.SVD;
3230
- e.exports = { spectralLayout: function(e) {
3231
- var t = e.cy, n = e.eles, o = n.nodes(), s = n.nodes(":parent"), c = /* @__PURE__ */ new Map(), l = /* @__PURE__ */ new Map(), u = /* @__PURE__ */ new Map(), d = [], f = [], p = [], m = [], h = [], g = [], _ = [], v = [], y = void 0, b = 1e8, x = 1e-9, S = e.piTol, C = e.samplingType, w = e.nodeSeparation, T = void 0, E = function() {
3232
- for (var e = 0, t = 0, n = !1; t < T;) {
3233
- e = Math.floor(Math.random() * y), n = !1;
3234
- for (var r = 0; r < t; r++) if (m[r] == e) {
3235
- n = !0;
3236
- break;
3237
- }
3238
- if (!n) m[t] = e, t++;
3239
- else continue;
3240
- }
3241
- }, D = function(e, t, n) {
3242
- for (var r = [], i = 0, a = 0, o = 0, s = void 0, c = [], u = 0, f = 1, p = 0; p < y; p++) c[p] = b;
3243
- for (r[a] = e, c[e] = 0; a >= i;) {
3244
- o = r[i++];
3245
- for (var m = d[o], _ = 0; _ < m.length; _++) s = l.get(m[_]), c[s] == b && (c[s] = c[o] + 1, r[++a] = s);
3246
- g[o][t] = c[o] * w;
3247
- }
3248
- if (n) {
3249
- for (var v = 0; v < y; v++) g[v][t] < h[v] && (h[v] = g[v][t]);
3250
- for (var x = 0; x < y; x++) h[x] > u && (u = h[x], f = x);
3251
- }
3252
- return f;
3253
- }, O = function(e) {
3254
- var t = void 0;
3255
- if (e) {
3256
- t = Math.floor(Math.random() * y);
3257
- for (var n = 0; n < y; n++) h[n] = b;
3258
- for (var r = 0; r < T; r++) m[r] = t, t = D(t, r, e);
3259
- } else {
3260
- E();
3261
- for (var i = 0; i < T; i++) D(m[i], i, e, !1);
3262
- }
3263
- for (var a = 0; a < y; a++) for (var o = 0; o < T; o++) g[a][o] *= g[a][o];
3264
- for (var s = 0; s < T; s++) _[s] = [];
3265
- for (var c = 0; c < T; c++) for (var l = 0; l < T; l++) _[c][l] = g[m[l]][c];
3266
- }, k = function() {
3267
- for (var e = a.svd(_), t = e.S, n = e.U, r = e.V, o = t[0] * t[0] * t[0], s = [], c = 0; c < T; c++) {
3268
- s[c] = [];
3269
- for (var l = 0; l < T; l++) s[c][l] = 0, c == l && (s[c][l] = t[c] / (t[c] * t[c] + o / (t[c] * t[c])));
3270
- }
3271
- v = i.multMat(i.multMat(r, s), i.transpose(n));
3272
- }, A = function() {
3273
- for (var e = void 0, t = void 0, n = [], r = [], a = [], o = [], s = 0; s < y; s++) n[s] = Math.random(), r[s] = Math.random();
3274
- n = i.normalize(n), r = i.normalize(r);
3275
- for (var c = 0, l = x, u = x, d = void 0;;) {
3276
- c++;
3277
- for (var m = 0; m < y; m++) a[m] = n[m];
3278
- if (n = i.multGamma(i.multL(i.multGamma(a), g, v)), e = i.dotProduct(a, n), n = i.normalize(n), l = i.dotProduct(a, n), d = Math.abs(l / u), d <= 1 + S && d >= 1) break;
3279
- u = l;
3280
- }
3281
- for (var h = 0; h < y; h++) a[h] = n[h];
3282
- for (c = 0, u = x;;) {
3283
- c++;
3284
- for (var _ = 0; _ < y; _++) o[_] = r[_];
3285
- if (o = i.minusOp(o, i.multCons(a, i.dotProduct(a, o))), r = i.multGamma(i.multL(i.multGamma(o), g, v)), t = i.dotProduct(o, r), r = i.normalize(r), l = i.dotProduct(o, r), d = Math.abs(l / u), d <= 1 + S && d >= 1) break;
3286
- u = l;
3287
- }
3288
- for (var b = 0; b < y; b++) o[b] = r[b];
3289
- f = i.multCons(a, Math.sqrt(Math.abs(e))), p = i.multCons(o, Math.sqrt(Math.abs(t)));
3290
- };
3291
- r.connectComponents(t, n, r.getTopMostNodes(o), c), s.forEach(function(e) {
3292
- r.connectComponents(t, n, r.getTopMostNodes(e.descendants().intersection(n)), c);
3293
- });
3294
- for (var j = 0, M = 0; M < o.length; M++) o[M].isParent() || l.set(o[M].id(), j++);
3295
- var N = !0, P = !1, ee = void 0;
3296
- try {
3297
- for (var te = c.keys()[Symbol.iterator](), F; !(N = (F = te.next()).done); N = !0) {
3298
- var I = F.value;
3299
- l.set(I, j++);
3300
- }
3301
- } catch (e) {
3302
- P = !0, ee = e;
3303
- } finally {
3304
- try {
3305
- !N && te.return && te.return();
3306
- } finally {
3307
- if (P) throw ee;
3308
- }
3309
- }
3310
- for (var L = 0; L < l.size; L++) d[L] = [];
3311
- s.forEach(function(e) {
3312
- for (var t = e.children().intersection(n); t.nodes(":childless").length == 0;) t = t.nodes()[0].children().intersection(n);
3313
- var r = 0, i = t.nodes(":childless")[0].connectedEdges().length;
3314
- t.nodes(":childless").forEach(function(e, t) {
3315
- e.connectedEdges().length < i && (i = e.connectedEdges().length, r = t);
3316
- }), u.set(e.id(), t.nodes(":childless")[r].id());
3317
- }), o.forEach(function(e) {
3318
- var t = void 0;
3319
- t = e.isParent() ? l.get(u.get(e.id())) : l.get(e.id()), e.neighborhood().nodes().forEach(function(r) {
3320
- n.intersection(e.edgesWith(r)).length > 0 && (r.isParent() ? d[t].push(u.get(r.id())) : d[t].push(r.id()));
3321
- });
3322
- });
3323
- var R = function(e) {
3324
- var n = l.get(e), r = void 0;
3325
- c.get(e).forEach(function(i) {
3326
- r = t.getElementById(i).isParent() ? u.get(i) : i, d[n].push(r), d[l.get(r)].push(e);
3327
- });
3328
- }, z = !0, B = !1, ne = void 0;
3329
- try {
3330
- for (var V = c.keys()[Symbol.iterator](), re; !(z = (re = V.next()).done); z = !0) {
3331
- var ie = re.value;
3332
- R(ie);
3333
- }
3334
- } catch (e) {
3335
- B = !0, ne = e;
3336
- } finally {
3337
- try {
3338
- !z && V.return && V.return();
3339
- } finally {
3340
- if (B) throw ne;
3341
- }
3342
- }
3343
- y = l.size;
3344
- var H = void 0;
3345
- if (y > 2) {
3346
- T = y < e.sampleSize ? y : e.sampleSize;
3347
- for (var U = 0; U < y; U++) g[U] = [];
3348
- for (var W = 0; W < T; W++) v[W] = [];
3349
- return e.quality == "draft" || e.step == "all" ? (O(C), k(), A(), H = {
3350
- nodeIndexes: l,
3351
- xCoords: f,
3352
- yCoords: p
3353
- }) : (l.forEach(function(e, n) {
3354
- f.push(t.getElementById(n).position("x")), p.push(t.getElementById(n).position("y"));
3355
- }), H = {
3356
- nodeIndexes: l,
3357
- xCoords: f,
3358
- yCoords: p
3359
- }), H;
3360
- } else {
3361
- var ae = l.keys(), G = t.getElementById(ae.next().value), K = G.position(), oe = G.outerWidth();
3362
- if (f.push(K.x), p.push(K.y), y == 2) {
3363
- var q = t.getElementById(ae.next().value).outerWidth();
3364
- f.push(K.x + oe / 2 + q / 2 + e.idealEdgeLength), p.push(K.y);
3365
- }
3366
- return H = {
3367
- nodeIndexes: l,
3368
- xCoords: f,
3369
- yCoords: p
3370
- }, H;
3371
- }
3372
- } };
3373
- }),
3374
- 579: ((e, t, n) => {
3375
- var r = n(212), i = function(e) {
3376
- e && e("layout", "fcose", r);
3377
- };
3378
- typeof cytoscape < "u" && i(cytoscape), e.exports = i;
3379
- }),
3380
- 140: ((t) => {
3381
- t.exports = e;
3382
- })
3383
- }, n = {};
3384
- function r(e) {
3385
- var i = n[e];
3386
- if (i !== void 0) return i.exports;
3387
- var a = n[e] = { exports: {} };
3388
- return t[e](a, a.exports, r), a.exports;
3389
- }
3390
- return r(579);
3391
- })();
3392
- });
3393
- })))(), 1), ArchitectureDirectionName = {
3394
- L: "left",
3395
- R: "right",
3396
- T: "top",
3397
- B: "bottom"
3398
- }, ArchitectureDirectionArrow = {
3399
- L: /* @__PURE__ */ __name((e) => `${e},${e / 2} 0,${e} 0,0`, "L"),
3400
- R: /* @__PURE__ */ __name((e) => `0,${e / 2} ${e},0 ${e},${e}`, "R"),
3401
- T: /* @__PURE__ */ __name((e) => `0,0 ${e},0 ${e / 2},${e}`, "T"),
3402
- B: /* @__PURE__ */ __name((e) => `${e / 2},0 ${e},${e} 0,${e}`, "B")
3403
- }, ArchitectureDirectionArrowShift = {
3404
- L: /* @__PURE__ */ __name((e, t) => e - t + 2, "L"),
3405
- R: /* @__PURE__ */ __name((e, t) => e - 2, "R"),
3406
- T: /* @__PURE__ */ __name((e, t) => e - t + 2, "T"),
3407
- B: /* @__PURE__ */ __name((e, t) => e - 2, "B")
3408
- }, getOppositeArchitectureDirection = /* @__PURE__ */ __name(function(e) {
3409
- return isArchitectureDirectionX(e) ? e === "L" ? "R" : "L" : e === "T" ? "B" : "T";
3410
- }, "getOppositeArchitectureDirection"), isArchitectureDirection = /* @__PURE__ */ __name(function(e) {
3411
- let t = e;
3412
- return t === "L" || t === "R" || t === "T" || t === "B";
3413
- }, "isArchitectureDirection"), isArchitectureDirectionX = /* @__PURE__ */ __name(function(e) {
3414
- let t = e;
3415
- return t === "L" || t === "R";
3416
- }, "isArchitectureDirectionX"), isArchitectureDirectionY = /* @__PURE__ */ __name(function(e) {
3417
- let t = e;
3418
- return t === "T" || t === "B";
3419
- }, "isArchitectureDirectionY"), isArchitectureDirectionXY = /* @__PURE__ */ __name(function(e, t) {
3420
- let n = isArchitectureDirectionX(e) && isArchitectureDirectionY(t), r = isArchitectureDirectionY(e) && isArchitectureDirectionX(t);
3421
- return n || r;
3422
- }, "isArchitectureDirectionXY"), isArchitecturePairXY = /* @__PURE__ */ __name(function(e) {
3423
- let t = e[0], n = e[1], r = isArchitectureDirectionX(t) && isArchitectureDirectionY(n), i = isArchitectureDirectionY(t) && isArchitectureDirectionX(n);
3424
- return r || i;
3425
- }, "isArchitecturePairXY"), isValidArchitectureDirectionPair = /* @__PURE__ */ __name(function(e) {
3426
- return e !== "LL" && e !== "RR" && e !== "TT" && e !== "BB";
3427
- }, "isValidArchitectureDirectionPair"), getArchitectureDirectionPair = /* @__PURE__ */ __name(function(e, t) {
3428
- let n = `${e}${t}`;
3429
- return isValidArchitectureDirectionPair(n) ? n : void 0;
3430
- }, "getArchitectureDirectionPair"), shiftPositionByArchitectureDirectionPair = /* @__PURE__ */ __name(function([e, t], n) {
3431
- let r = n[0], i = n[1];
3432
- return isArchitectureDirectionX(r) ? isArchitectureDirectionY(i) ? [e + (r === "L" ? -1 : 1), t + (i === "T" ? 1 : -1)] : [e + (r === "L" ? -1 : 1), t] : isArchitectureDirectionX(i) ? [e + (i === "L" ? 1 : -1), t + (r === "T" ? 1 : -1)] : [e, t + (r === "T" ? 1 : -1)];
3433
- }, "shiftPositionByArchitectureDirectionPair"), getArchitectureDirectionXYFactors = /* @__PURE__ */ __name(function(e) {
3434
- return e === "LT" || e === "TL" ? [1, 1] : e === "BL" || e === "LB" ? [1, -1] : e === "BR" || e === "RB" ? [-1, -1] : [-1, 1];
3435
- }, "getArchitectureDirectionXYFactors"), getArchitectureDirectionAlignment = /* @__PURE__ */ __name(function(e, t) {
3436
- return isArchitectureDirectionXY(e, t) ? "bend" : isArchitectureDirectionX(e) ? "horizontal" : "vertical";
3437
- }, "getArchitectureDirectionAlignment"), isArchitectureService = /* @__PURE__ */ __name(function(e) {
3438
- return e.type === "service";
3439
- }, "isArchitectureService"), isArchitectureJunction = /* @__PURE__ */ __name(function(e) {
3440
- return e.type === "junction";
3441
- }, "isArchitectureJunction"), edgeData = /* @__PURE__ */ __name((e) => e.data(), "edgeData"), nodeData = /* @__PURE__ */ __name((e) => e.data(), "nodeData"), DEFAULT_ARCHITECTURE_CONFIG = defaultConfig_default.architecture, ArchitectureDB = class {
3442
- constructor() {
3443
- this.nodes = {}, this.groups = {}, this.edges = [], this.registeredIds = {}, this.elements = {}, this.setAccTitle = setAccTitle, this.getAccTitle = getAccTitle, this.setDiagramTitle = setDiagramTitle, this.getDiagramTitle = getDiagramTitle, this.getAccDescription = getAccDescription, this.setAccDescription = setAccDescription, this.clear();
3444
- }
3445
- static #e = __name(this, "ArchitectureDB");
3446
- clear() {
3447
- this.nodes = {}, this.groups = {}, this.edges = [], this.registeredIds = {}, this.dataStructures = void 0, this.elements = {}, clear();
3448
- }
3449
- addService({ id: e, icon: t, in: n, title: r, iconText: i }) {
3450
- if (this.registeredIds[e] !== void 0) throw Error(`The service id [${e}] is already in use by another ${this.registeredIds[e]}`);
3451
- if (n !== void 0) {
3452
- if (e === n) throw Error(`The service [${e}] cannot be placed within itself`);
3453
- if (this.registeredIds[n] === void 0) throw Error(`The service [${e}]'s parent does not exist. Please make sure the parent is created before this service`);
3454
- if (this.registeredIds[n] === "node") throw Error(`The service [${e}]'s parent is not a group`);
3455
- }
3456
- this.registeredIds[e] = "node", this.nodes[e] = {
3457
- id: e,
3458
- type: "service",
3459
- icon: t,
3460
- iconText: i,
3461
- title: r,
3462
- edges: [],
3463
- in: n
3464
- };
3465
- }
3466
- getServices() {
3467
- return Object.values(this.nodes).filter(isArchitectureService);
3468
- }
3469
- addJunction({ id: e, in: t }) {
3470
- this.registeredIds[e] = "node", this.nodes[e] = {
3471
- id: e,
3472
- type: "junction",
3473
- edges: [],
3474
- in: t
3475
- };
3476
- }
3477
- getJunctions() {
3478
- return Object.values(this.nodes).filter(isArchitectureJunction);
3479
- }
3480
- getNodes() {
3481
- return Object.values(this.nodes);
3482
- }
3483
- getNode(e) {
3484
- return this.nodes[e] ?? null;
3485
- }
3486
- addGroup({ id: e, icon: t, in: n, title: r }) {
3487
- if (this.registeredIds?.[e] !== void 0) throw Error(`The group id [${e}] is already in use by another ${this.registeredIds[e]}`);
3488
- if (n !== void 0) {
3489
- if (e === n) throw Error(`The group [${e}] cannot be placed within itself`);
3490
- if (this.registeredIds?.[n] === void 0) throw Error(`The group [${e}]'s parent does not exist. Please make sure the parent is created before this group`);
3491
- if (this.registeredIds?.[n] === "node") throw Error(`The group [${e}]'s parent is not a group`);
3492
- }
3493
- this.registeredIds[e] = "group", this.groups[e] = {
3494
- id: e,
3495
- icon: t,
3496
- title: r,
3497
- in: n
3498
- };
3499
- }
3500
- getGroups() {
3501
- return Object.values(this.groups);
3502
- }
3503
- addEdge({ lhsId: e, rhsId: t, lhsDir: n, rhsDir: r, lhsInto: i, rhsInto: a, lhsGroup: o, rhsGroup: s, title: c }) {
3504
- if (!isArchitectureDirection(n)) throw Error(`Invalid direction given for left hand side of edge ${e}--${t}. Expected (L,R,T,B) got ${String(n)}`);
3505
- if (!isArchitectureDirection(r)) throw Error(`Invalid direction given for right hand side of edge ${e}--${t}. Expected (L,R,T,B) got ${String(r)}`);
3506
- if (this.nodes[e] === void 0 && this.groups[e] === void 0) throw Error(`The left-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);
3507
- if (this.nodes[t] === void 0 && this.groups[t] === void 0) throw Error(`The right-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);
3508
- let l = this.nodes[e].in, u = this.nodes[t].in;
3509
- if (o && l && u && l == u) throw Error(`The left-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);
3510
- if (s && l && u && l == u) throw Error(`The right-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);
3511
- let d = {
3512
- lhsId: e,
3513
- lhsDir: n,
3514
- lhsInto: i,
3515
- lhsGroup: o,
3516
- rhsId: t,
3517
- rhsDir: r,
3518
- rhsInto: a,
3519
- rhsGroup: s,
3520
- title: c
3521
- };
3522
- this.edges.push(d), this.nodes[e] && this.nodes[t] && (this.nodes[e].edges.push(this.edges[this.edges.length - 1]), this.nodes[t].edges.push(this.edges[this.edges.length - 1]));
3523
- }
3524
- getEdges() {
3525
- return this.edges;
3526
- }
3527
- getDataStructures() {
3528
- if (this.dataStructures === void 0) {
3529
- let e = {}, t = Object.entries(this.nodes).reduce((t, [n, r]) => (t[n] = r.edges.reduce((t, r) => {
3530
- let i = this.getNode(r.lhsId)?.in, a = this.getNode(r.rhsId)?.in;
3531
- if (i && a && i !== a) {
3532
- let t = getArchitectureDirectionAlignment(r.lhsDir, r.rhsDir);
3533
- t !== "bend" && (e[i] ??= {}, e[i][a] = t, e[a] ??= {}, e[a][i] = t);
3534
- }
3535
- if (r.lhsId === n) {
3536
- let e = getArchitectureDirectionPair(r.lhsDir, r.rhsDir);
3537
- e && (t[e] = r.rhsId);
3538
- } else {
3539
- let e = getArchitectureDirectionPair(r.rhsDir, r.lhsDir);
3540
- e && (t[e] = r.lhsId);
3541
- }
3542
- return t;
3543
- }, {}), t), {}), n = Object.keys(t)[0], r = { [n]: 1 }, i = Object.keys(t).reduce((e, t) => t === n ? e : {
3544
- ...e,
3545
- [t]: 1
3546
- }, {}), o = /* @__PURE__ */ __name((e) => {
3547
- let n = { [e]: [0, 0] }, a = [e];
3548
- for (; a.length > 0;) {
3549
- let e = a.shift();
3550
- if (e) {
3551
- r[e] = 1, delete i[e];
3552
- let o = t[e], [s, c] = n[e];
3553
- Object.entries(o).forEach(([e, t]) => {
3554
- r[t] || (n[t] = shiftPositionByArchitectureDirectionPair([s, c], e), a.push(t));
3555
- });
3556
- }
3557
- }
3558
- return n;
3559
- }, "BFS"), s = [o(n)];
3560
- for (; Object.keys(i).length > 0;) s.push(o(Object.keys(i)[0]));
3561
- this.dataStructures = {
3562
- adjList: t,
3563
- spatialMaps: s,
3564
- groupAlignments: e
3565
- };
3566
- }
3567
- return this.dataStructures;
3568
- }
3569
- setElementForId(e, t) {
3570
- this.elements[e] = t;
3571
- }
3572
- getElementById(e) {
3573
- return this.elements[e];
3574
- }
3575
- getConfig() {
3576
- return cleanAndMerge({
3577
- ...DEFAULT_ARCHITECTURE_CONFIG,
3578
- ...getConfig().architecture
3579
- });
3580
- }
3581
- getConfigField(e) {
3582
- return this.getConfig()[e];
3583
- }
3584
- }, populateDb = /* @__PURE__ */ __name((e, t) => {
3585
- populateCommonDb(e, t), e.groups.map((e) => t.addGroup(e)), e.services.map((e) => t.addService({
3586
- ...e,
3587
- type: "service"
3588
- })), e.junctions.map((e) => t.addJunction({
3589
- ...e,
3590
- type: "junction"
3591
- })), e.edges.map((e) => t.addEdge(e));
3592
- }, "populateDb"), parser = {
3593
- parser: { yy: void 0 },
3594
- parse: /* @__PURE__ */ __name(async (e) => {
3595
- let t = await parse("architecture", e);
3596
- log.debug(t);
3597
- let n = parser.parser?.yy;
3598
- if (!(n instanceof ArchitectureDB)) throw Error("parser.parser?.yy was not a ArchitectureDB. This is due to a bug within Mermaid, please report this issue at https://github.com/mermaid-js/mermaid/issues.");
3599
- populateDb(t, n);
3600
- }, "parse")
3601
- }, architectureStyles_default = /* @__PURE__ */ __name((e) => `
3602
- .edge {
3603
- stroke-width: ${e.archEdgeWidth};
3604
- stroke: ${e.archEdgeColor};
3605
- fill: none;
3606
- }
3607
-
3608
- .arrow {
3609
- fill: ${e.archEdgeArrowColor};
3610
- }
3611
-
3612
- .node-bkg {
3613
- fill: none;
3614
- stroke: ${e.archGroupBorderColor};
3615
- stroke-width: ${e.archGroupBorderWidth};
3616
- stroke-dasharray: 8;
3617
- }
3618
- .node-icon-text {
3619
- display: flex;
3620
- align-items: center;
3621
- }
3622
-
3623
- .node-icon-text > div {
3624
- color: #fff;
3625
- margin: 1px;
3626
- height: fit-content;
3627
- text-align: center;
3628
- overflow: hidden;
3629
- display: -webkit-box;
3630
- -webkit-box-orient: vertical;
3631
- }
3632
- `, "getStyles"), wrapIcon = /* @__PURE__ */ __name((e) => `<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/>${e}</g>`, "wrapIcon"), architectureIcons = {
3633
- prefix: "mermaid-architecture",
3634
- height: 80,
3635
- width: 80,
3636
- icons: {
3637
- database: { body: wrapIcon("<path id=\"b\" data-name=\"4\" d=\"m20,57.86c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><path id=\"c\" data-name=\"3\" d=\"m20,45.95c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><path id=\"d\" data-name=\"2\" d=\"m20,34.05c0,3.94,8.95,7.14,20,7.14s20-3.2,20-7.14\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><ellipse id=\"e\" data-name=\"1\" cx=\"40\" cy=\"22.14\" rx=\"20\" ry=\"7.14\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><line x1=\"20\" y1=\"57.86\" x2=\"20\" y2=\"22.14\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><line x1=\"60\" y1=\"57.86\" x2=\"60\" y2=\"22.14\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/>") },
3638
- server: { body: wrapIcon("<rect x=\"17.5\" y=\"17.5\" width=\"45\" height=\"45\" rx=\"2\" ry=\"2\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><line x1=\"17.5\" y1=\"32.5\" x2=\"62.5\" y2=\"32.5\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><line x1=\"17.5\" y1=\"47.5\" x2=\"62.5\" y2=\"47.5\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><g><path d=\"m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z\" style=\"fill: #fff; stroke-width: 0px;\"/><path d=\"m56.25,25c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10;\"/></g><g><path d=\"m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z\" style=\"fill: #fff; stroke-width: 0px;\"/><path d=\"m56.25,40c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10;\"/></g><g><path d=\"m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z\" style=\"fill: #fff; stroke-width: 0px;\"/><path d=\"m56.25,55c0,.27-.45.5-1,.5h-10.5c-.55,0-1-.23-1-.5s.45-.5,1-.5h10.5c.55,0,1,.23,1,.5Z\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10;\"/></g><g><circle cx=\"32.5\" cy=\"25\" r=\".75\" style=\"fill: #fff; stroke: #fff; stroke-miterlimit: 10;\"/><circle cx=\"27.5\" cy=\"25\" r=\".75\" style=\"fill: #fff; stroke: #fff; stroke-miterlimit: 10;\"/><circle cx=\"22.5\" cy=\"25\" r=\".75\" style=\"fill: #fff; stroke: #fff; stroke-miterlimit: 10;\"/></g><g><circle cx=\"32.5\" cy=\"40\" r=\".75\" style=\"fill: #fff; stroke: #fff; stroke-miterlimit: 10;\"/><circle cx=\"27.5\" cy=\"40\" r=\".75\" style=\"fill: #fff; stroke: #fff; stroke-miterlimit: 10;\"/><circle cx=\"22.5\" cy=\"40\" r=\".75\" style=\"fill: #fff; stroke: #fff; stroke-miterlimit: 10;\"/></g><g><circle cx=\"32.5\" cy=\"55\" r=\".75\" style=\"fill: #fff; stroke: #fff; stroke-miterlimit: 10;\"/><circle cx=\"27.5\" cy=\"55\" r=\".75\" style=\"fill: #fff; stroke: #fff; stroke-miterlimit: 10;\"/><circle cx=\"22.5\" cy=\"55\" r=\".75\" style=\"fill: #fff; stroke: #fff; stroke-miterlimit: 10;\"/></g>") },
3639
- disk: { body: wrapIcon("<rect x=\"20\" y=\"15\" width=\"40\" height=\"50\" rx=\"1\" ry=\"1\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><ellipse cx=\"24\" cy=\"19.17\" rx=\".8\" ry=\".83\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><ellipse cx=\"56\" cy=\"19.17\" rx=\".8\" ry=\".83\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><ellipse cx=\"24\" cy=\"60.83\" rx=\".8\" ry=\".83\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><ellipse cx=\"56\" cy=\"60.83\" rx=\".8\" ry=\".83\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><ellipse cx=\"40\" cy=\"33.75\" rx=\"14\" ry=\"14.58\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><ellipse cx=\"40\" cy=\"33.75\" rx=\"4\" ry=\"4.17\" style=\"fill: #fff; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><path d=\"m37.51,42.52l-4.83,13.22c-.26.71-1.1,1.02-1.76.64l-4.18-2.42c-.66-.38-.81-1.26-.33-1.84l9.01-10.8c.88-1.05,2.56-.08,2.09,1.2Z\" style=\"fill: #fff; stroke-width: 0px;\"/>") },
3640
- internet: { body: wrapIcon("<circle cx=\"40\" cy=\"40\" r=\"22.5\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><line x1=\"40\" y1=\"17.5\" x2=\"40\" y2=\"62.5\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><line x1=\"17.5\" y1=\"40\" x2=\"62.5\" y2=\"40\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><path d=\"m39.99,17.51c-15.28,11.1-15.28,33.88,0,44.98\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><path d=\"m40.01,17.51c15.28,11.1,15.28,33.88,0,44.98\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><line x1=\"19.75\" y1=\"30.1\" x2=\"60.25\" y2=\"30.1\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/><line x1=\"19.75\" y1=\"49.9\" x2=\"60.25\" y2=\"49.9\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/>") },
3641
- cloud: { body: wrapIcon("<path d=\"m65,47.5c0,2.76-2.24,5-5,5H20c-2.76,0-5-2.24-5-5,0-1.87,1.03-3.51,2.56-4.36-.04-.21-.06-.42-.06-.64,0-2.6,2.48-4.74,5.65-4.97,1.65-4.51,6.34-7.76,11.85-7.76.86,0,1.69.08,2.5.23,2.09-1.57,4.69-2.5,7.5-2.5,6.1,0,11.19,4.38,12.28,10.17,2.14.56,3.72,2.51,3.72,4.83,0,.03,0,.07-.01.1,2.29.46,4.01,2.48,4.01,4.9Z\" style=\"fill: none; stroke: #fff; stroke-miterlimit: 10; stroke-width: 2px;\"/>") },
3642
- unknown: unknownIcon,
3643
- blank: { body: wrapIcon("") }
3644
- }
3645
- }, drawEdges = /* @__PURE__ */ __name(async function(e, t, r) {
3646
- let i = r.getConfigField("padding"), a = r.getConfigField("iconSize"), o = a / 2, s = a / 6, c = s / 2;
3647
- await Promise.all(t.edges().map(async (t) => {
3648
- let { source: a, sourceDir: l, sourceArrow: u, sourceGroup: d, target: f, targetDir: p, targetArrow: h, targetGroup: g, label: _ } = edgeData(t), { x: v, y } = t[0].sourceEndpoint(), { x: b, y: S } = t[0].midpoint(), { x: C, y: w } = t[0].targetEndpoint(), T = i + 4;
3649
- if (d && (isArchitectureDirectionX(l) ? v += l === "L" ? -T : T : y += l === "T" ? -T : T + 18), g && (isArchitectureDirectionX(p) ? C += p === "L" ? -T : T : w += p === "T" ? -T : T + 18), !d && r.getNode(a)?.type === "junction" && (isArchitectureDirectionX(l) ? v += l === "L" ? o : -o : y += l === "T" ? o : -o), !g && r.getNode(f)?.type === "junction" && (isArchitectureDirectionX(p) ? C += p === "L" ? o : -o : w += p === "T" ? o : -o), t[0]._private.rscratch) {
3650
- let t = e.insert("g");
3651
- if (t.insert("path").attr("d", `M ${v},${y} L ${b},${S} L${C},${w} `).attr("class", "edge").attr("id", getEdgeId(a, f, { prefix: "L" })), u) {
3652
- let e = isArchitectureDirectionX(l) ? ArchitectureDirectionArrowShift[l](v, s) : v - c, n = isArchitectureDirectionY(l) ? ArchitectureDirectionArrowShift[l](y, s) : y - c;
3653
- t.insert("polygon").attr("points", ArchitectureDirectionArrow[l](s)).attr("transform", `translate(${e},${n})`).attr("class", "arrow");
3654
- }
3655
- if (h) {
3656
- let e = isArchitectureDirectionX(p) ? ArchitectureDirectionArrowShift[p](C, s) : C - c, n = isArchitectureDirectionY(p) ? ArchitectureDirectionArrowShift[p](w, s) : w - c;
3657
- t.insert("polygon").attr("points", ArchitectureDirectionArrow[p](s)).attr("transform", `translate(${e},${n})`).attr("class", "arrow");
3658
- }
3659
- if (_) {
3660
- let e = isArchitectureDirectionXY(l, p) ? "XY" : isArchitectureDirectionX(l) ? "X" : "Y", n = 0;
3661
- n = e === "X" ? Math.abs(v - C) : e === "Y" ? Math.abs(y - w) / 1.5 : Math.abs(v - C) / 2;
3662
- let r = t.append("g");
3663
- if (await createText(r, _, {
3664
- useHtmlLabels: !1,
3665
- width: n,
3666
- classes: "architecture-service-label"
3667
- }, getConfig2()), r.attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle"), e === "X") r.attr("transform", "translate(" + b + ", " + S + ")");
3668
- else if (e === "Y") r.attr("transform", "translate(" + b + ", " + S + ") rotate(-90)");
3669
- else if (e === "XY") {
3670
- let e = getArchitectureDirectionPair(l, p);
3671
- if (e && isArchitecturePairXY(e)) {
3672
- let t = r.node().getBoundingClientRect(), [n, i] = getArchitectureDirectionXYFactors(e);
3673
- r.attr("dominant-baseline", "auto").attr("transform", `rotate(${-1 * n * i * 45})`);
3674
- let a = r.node().getBoundingClientRect();
3675
- r.attr("transform", `
3676
- translate(${b}, ${S - t.height / 2})
3677
- translate(${n * a.width / 2}, ${i * a.height / 2})
3678
- rotate(${-1 * n * i * 45}, 0, ${t.height / 2})
3679
- `);
3680
- }
3681
- }
3682
- }
3683
- }
3684
- }));
3685
- }, "drawEdges"), drawGroups = /* @__PURE__ */ __name(async function(e, t, n) {
3686
- let r = n.getConfigField("padding") * .75, i = n.getConfigField("fontSize"), a = n.getConfigField("iconSize") / 2;
3687
- await Promise.all(t.nodes().map(async (t) => {
3688
- let o = nodeData(t);
3689
- if (o.type === "group") {
3690
- let { h: s, w: c, x1: l, y1: u } = t.boundingBox(), d = e.append("rect");
3691
- d.attr("id", `group-${o.id}`).attr("x", l + a).attr("y", u + a).attr("width", c).attr("height", s).attr("class", "node-bkg");
3692
- let f = e.append("g"), p = l, h = u;
3693
- if (o.icon) {
3694
- let e = f.append("g");
3695
- e.html(`<g>${await getIconSVG(o.icon, {
3696
- height: r,
3697
- width: r,
3698
- fallbackPrefix: architectureIcons.prefix
3699
- })}</g>`), e.attr("transform", "translate(" + (p + a + 1) + ", " + (h + a + 1) + ")"), p += r, h += i / 2 - 1 - 2;
3700
- }
3701
- if (o.label) {
3702
- let e = f.append("g");
3703
- await createText(e, o.label, {
3704
- useHtmlLabels: !1,
3705
- width: c,
3706
- classes: "architecture-service-label"
3707
- }, getConfig2()), e.attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "start").attr("text-anchor", "start"), e.attr("transform", "translate(" + (p + a + 4) + ", " + (h + a + 2) + ")");
3708
- }
3709
- n.setElementForId(o.id, d);
3710
- }
3711
- }));
3712
- }, "drawGroups"), drawServices = /* @__PURE__ */ __name(async function(e, t, n) {
3713
- let r = getConfig2();
3714
- for (let i of n) {
3715
- let n = t.append("g"), a = e.getConfigField("iconSize");
3716
- if (i.title) {
3717
- let e = n.append("g");
3718
- await createText(e, i.title, {
3719
- useHtmlLabels: !1,
3720
- width: a * 1.5,
3721
- classes: "architecture-service-label"
3722
- }, r), e.attr("dy", "1em").attr("alignment-baseline", "middle").attr("dominant-baseline", "middle").attr("text-anchor", "middle"), e.attr("transform", "translate(" + a / 2 + ", " + a + ")");
3723
- }
3724
- let o = n.append("g");
3725
- if (i.icon) o.html(`<g>${await getIconSVG(i.icon, {
3726
- height: a,
3727
- width: a,
3728
- fallbackPrefix: architectureIcons.prefix
3729
- })}</g>`);
3730
- else if (i.iconText) {
3731
- o.html(`<g>${await getIconSVG("blank", {
3732
- height: a,
3733
- width: a,
3734
- fallbackPrefix: architectureIcons.prefix
3735
- })}</g>`);
3736
- let e = o.append("g").append("foreignObject").attr("width", a).attr("height", a).append("div").attr("class", "node-icon-text").attr("style", `height: ${a}px;`).append("div").html(sanitizeText(i.iconText, r)), t = parseInt(window.getComputedStyle(e.node(), null).getPropertyValue("font-size").replace(/\D/g, "")) ?? 16;
3737
- e.attr("style", `-webkit-line-clamp: ${Math.floor((a - 2) / t)};`);
3738
- } else o.append("path").attr("class", "node-bkg").attr("id", "node-" + i.id).attr("d", `M0 ${a} v${-a} q0,-5 5,-5 h${a} q5,0 5,5 v${a} H0 Z`);
3739
- n.attr("id", `service-${i.id}`).attr("class", "architecture-service");
3740
- let { width: s, height: c } = n.node().getBBox();
3741
- i.width = s, i.height = c, e.setElementForId(i.id, n);
3742
- }
3743
- return 0;
3744
- }, "drawServices"), drawJunctions = /* @__PURE__ */ __name(function(e, t, n) {
3745
- n.forEach((n) => {
3746
- let r = t.append("g"), i = e.getConfigField("iconSize");
3747
- r.append("g").append("rect").attr("id", "node-" + n.id).attr("fill-opacity", "0").attr("width", i).attr("height", i), r.attr("class", "architecture-junction");
3748
- let { width: a, height: o } = r._groups[0][0].getBBox();
3749
- r.width = a, r.height = o, e.setElementForId(n.id, r);
3750
- });
3751
- }, "drawJunctions");
3752
- registerIconPacks([{
3753
- name: architectureIcons.prefix,
3754
- icons: architectureIcons
3755
- }]), cytoscape$1.use(import_cytoscape_fcose.default);
3756
- function addServices(e, t, n) {
3757
- e.forEach((e) => {
3758
- t.add({
3759
- group: "nodes",
3760
- data: {
3761
- type: "service",
3762
- id: e.id,
3763
- icon: e.icon,
3764
- label: e.title,
3765
- parent: e.in,
3766
- width: n.getConfigField("iconSize"),
3767
- height: n.getConfigField("iconSize")
3768
- },
3769
- classes: "node-service"
3770
- });
3771
- });
3772
- }
3773
- __name(addServices, "addServices");
3774
- function addJunctions(e, t, n) {
3775
- e.forEach((e) => {
3776
- t.add({
3777
- group: "nodes",
3778
- data: {
3779
- type: "junction",
3780
- id: e.id,
3781
- parent: e.in,
3782
- width: n.getConfigField("iconSize"),
3783
- height: n.getConfigField("iconSize")
3784
- },
3785
- classes: "node-junction"
3786
- });
3787
- });
3788
- }
3789
- __name(addJunctions, "addJunctions");
3790
- function positionNodes(e, t) {
3791
- t.nodes().map((t) => {
3792
- let n = nodeData(t);
3793
- n.type !== "group" && (n.x = t.position().x, n.y = t.position().y, e.getElementById(n.id).attr("transform", "translate(" + (n.x || 0) + "," + (n.y || 0) + ")"));
3794
- });
3795
- }
3796
- __name(positionNodes, "positionNodes");
3797
- function addGroups(e, t) {
3798
- e.forEach((e) => {
3799
- t.add({
3800
- group: "nodes",
3801
- data: {
3802
- type: "group",
3803
- id: e.id,
3804
- icon: e.icon,
3805
- label: e.title,
3806
- parent: e.in
3807
- },
3808
- classes: "node-group"
3809
- });
3810
- });
3811
- }
3812
- __name(addGroups, "addGroups");
3813
- function addEdges(e, t) {
3814
- e.forEach((e) => {
3815
- let { lhsId: n, rhsId: r, lhsInto: i, lhsGroup: a, rhsInto: o, lhsDir: s, rhsDir: c, rhsGroup: l, title: u } = e, d = isArchitectureDirectionXY(e.lhsDir, e.rhsDir) ? "segments" : "straight", f = {
3816
- id: `${n}-${r}`,
3817
- label: u,
3818
- source: n,
3819
- sourceDir: s,
3820
- sourceArrow: i,
3821
- sourceGroup: a,
3822
- sourceEndpoint: s === "L" ? "0 50%" : s === "R" ? "100% 50%" : s === "T" ? "50% 0" : "50% 100%",
3823
- target: r,
3824
- targetDir: c,
3825
- targetArrow: o,
3826
- targetGroup: l,
3827
- targetEndpoint: c === "L" ? "0 50%" : c === "R" ? "100% 50%" : c === "T" ? "50% 0" : "50% 100%"
3828
- };
3829
- t.add({
3830
- group: "edges",
3831
- data: f,
3832
- classes: d
3833
- });
3834
- });
3835
- }
3836
- __name(addEdges, "addEdges");
3837
- function getAlignments(e, t, n) {
3838
- let r = /* @__PURE__ */ __name((e, t) => Object.entries(e).reduce((e, [r, i]) => {
3839
- let a = 0, o = Object.entries(i);
3840
- if (o.length === 1) return e[r] = o[0][1], e;
3841
- for (let i = 0; i < o.length - 1; i++) for (let s = i + 1; s < o.length; s++) {
3842
- let [c, l] = o[i], [u, d] = o[s];
3843
- if (n[c]?.[u] === t) e[r] ??= [], e[r] = [
3844
- ...e[r],
3845
- ...l,
3846
- ...d
3847
- ];
3848
- else if (c === "default" || u === "default") e[r] ??= [], e[r] = [
3849
- ...e[r],
3850
- ...l,
3851
- ...d
3852
- ];
3853
- else {
3854
- let t = `${r}-${a++}`;
3855
- e[t] = l;
3856
- let n = `${r}-${a++}`;
3857
- e[n] = d;
3858
- }
3859
- }
3860
- return e;
3861
- }, {}), "flattenAlignments"), [i, o] = t.map((t) => {
3862
- let n = {}, i = {};
3863
- return Object.entries(t).forEach(([t, [r, a]]) => {
3864
- let o = e.getNode(t)?.in ?? "default";
3865
- n[a] ??= {}, n[a][o] ??= [], n[a][o].push(t), i[r] ??= {}, i[r][o] ??= [], i[r][o].push(t);
3866
- }), {
3867
- horiz: Object.values(r(n, "horizontal")).filter((e) => e.length > 1),
3868
- vert: Object.values(r(i, "vertical")).filter((e) => e.length > 1)
3869
- };
3870
- }).reduce(([e, t], { horiz: n, vert: r }) => [[...e, ...n], [...t, ...r]], [[], []]);
3871
- return {
3872
- horizontal: i,
3873
- vertical: o
3874
- };
3875
- }
3876
- __name(getAlignments, "getAlignments");
3877
- function getRelativeConstraints(e, t) {
3878
- let n = [], r = /* @__PURE__ */ __name((e) => `${e[0]},${e[1]}`, "posToStr"), i = /* @__PURE__ */ __name((e) => e.split(",").map((e) => parseInt(e)), "strToPos");
3879
- return e.forEach((e) => {
3880
- let a = Object.fromEntries(Object.entries(e).map(([e, t]) => [r(t), e])), o = [r([0, 0])], s = {}, c = {
3881
- L: [-1, 0],
3882
- R: [1, 0],
3883
- T: [0, 1],
3884
- B: [0, -1]
3885
- };
3886
- for (; o.length > 0;) {
3887
- let e = o.shift();
3888
- if (e) {
3889
- s[e] = 1;
3890
- let l = a[e];
3891
- if (l) {
3892
- let u = i(e);
3893
- Object.entries(c).forEach(([e, i]) => {
3894
- let c = r([u[0] + i[0], u[1] + i[1]]), d = a[c];
3895
- d && !s[c] && (o.push(c), n.push({
3896
- [ArchitectureDirectionName[e]]: d,
3897
- [ArchitectureDirectionName[getOppositeArchitectureDirection(e)]]: l,
3898
- gap: 1.5 * t.getConfigField("iconSize")
3899
- }));
3900
- });
3901
- }
3902
- }
3903
- }
3904
- }), n;
3905
- }
3906
- __name(getRelativeConstraints, "getRelativeConstraints");
3907
- function layoutArchitecture(e, t, n, r, s, { spatialMaps: c, groupAlignments: l }) {
3908
- return new Promise((u) => {
3909
- let d = select_default("body").append("div").attr("id", "cy").attr("style", "display:none"), f = cytoscape$1({
3910
- container: document.getElementById("cy"),
3911
- style: [
3912
- {
3913
- selector: "edge",
3914
- style: {
3915
- "curve-style": "straight",
3916
- label: "data(label)",
3917
- "source-endpoint": "data(sourceEndpoint)",
3918
- "target-endpoint": "data(targetEndpoint)"
3919
- }
3920
- },
3921
- {
3922
- selector: "edge.segments",
3923
- style: {
3924
- "curve-style": "segments",
3925
- "segment-weights": "0",
3926
- "segment-distances": [.5],
3927
- "edge-distances": "endpoints",
3928
- "source-endpoint": "data(sourceEndpoint)",
3929
- "target-endpoint": "data(targetEndpoint)"
3930
- }
3931
- },
3932
- {
3933
- selector: "node",
3934
- style: { "compound-sizing-wrt-labels": "include" }
3935
- },
3936
- {
3937
- selector: "node[label]",
3938
- style: {
3939
- "text-valign": "bottom",
3940
- "text-halign": "center",
3941
- "font-size": `${s.getConfigField("fontSize")}px`
3942
- }
3943
- },
3944
- {
3945
- selector: ".node-service",
3946
- style: {
3947
- label: "data(label)",
3948
- width: "data(width)",
3949
- height: "data(height)"
3950
- }
3951
- },
3952
- {
3953
- selector: ".node-junction",
3954
- style: {
3955
- width: "data(width)",
3956
- height: "data(height)"
3957
- }
3958
- },
3959
- {
3960
- selector: ".node-group",
3961
- style: { padding: `${s.getConfigField("padding")}px` }
3962
- }
3963
- ],
3964
- layout: {
3965
- name: "grid",
3966
- boundingBox: {
3967
- x1: 0,
3968
- x2: 100,
3969
- y1: 0,
3970
- y2: 100
3971
- }
3972
- }
3973
- });
3974
- d.remove(), addGroups(n, f), addServices(e, f, s), addJunctions(t, f, s), addEdges(r, f);
3975
- let p = getAlignments(s, c, l), m = getRelativeConstraints(c, s), h = f.layout({
3976
- name: "fcose",
3977
- quality: "proof",
3978
- styleEnabled: !1,
3979
- animate: !1,
3980
- nodeDimensionsIncludeLabels: !1,
3981
- idealEdgeLength(e) {
3982
- let [t, n] = e.connectedNodes(), { parent: r } = nodeData(t), { parent: i } = nodeData(n);
3983
- return r === i ? 1.5 * s.getConfigField("iconSize") : .5 * s.getConfigField("iconSize");
3984
- },
3985
- edgeElasticity(e) {
3986
- let [t, n] = e.connectedNodes(), { parent: r } = nodeData(t), { parent: i } = nodeData(n);
3987
- return r === i ? .45 : .001;
3988
- },
3989
- alignmentConstraint: p,
3990
- relativePlacementConstraint: m
3991
- });
3992
- h.one("layoutstop", () => {
3993
- function e(e, t, n, r) {
3994
- let i, a, { x: o, y: s } = e, { x: c, y: l } = t;
3995
- a = (r - s + (o - n) * (s - l) / (o - c)) / Math.sqrt(1 + ((s - l) / (o - c)) ** 2), i = Math.sqrt((r - s) ** 2 + (n - o) ** 2 - a ** 2);
3996
- let u = Math.sqrt((c - o) ** 2 + (l - s) ** 2);
3997
- i /= u;
3998
- let d = (c - o) * (r - s) - (l - s) * (n - o);
3999
- switch (!0) {
4000
- case d >= 0:
4001
- d = 1;
4002
- break;
4003
- case d < 0:
4004
- d = -1;
4005
- break;
4006
- }
4007
- let f = (c - o) * (n - o) + (l - s) * (r - s);
4008
- switch (!0) {
4009
- case f >= 0:
4010
- f = 1;
4011
- break;
4012
- case f < 0:
4013
- f = -1;
4014
- break;
4015
- }
4016
- return a = Math.abs(a) * d, i *= f, {
4017
- distances: a,
4018
- weights: i
4019
- };
4020
- }
4021
- __name(e, "getSegmentWeights"), f.startBatch();
4022
- for (let t of Object.values(f.edges())) if (t.data?.()) {
4023
- let { x: n, y: r } = t.source().position(), { x: i, y: a } = t.target().position();
4024
- if (n !== i && r !== a) {
4025
- let n = t.sourceEndpoint(), r = t.targetEndpoint(), { sourceDir: i } = edgeData(t), [a, o] = isArchitectureDirectionY(i) ? [n.x, r.y] : [r.x, n.y], { weights: s, distances: c } = e(n, r, a, o);
4026
- t.style("segment-distances", c), t.style("segment-weights", s);
4027
- }
4028
- }
4029
- f.endBatch(), h.run();
4030
- }), h.run(), f.ready((e) => {
4031
- log.info("Ready", e), u(f);
4032
- });
4033
- });
4034
- }
4035
- __name(layoutArchitecture, "layoutArchitecture");
4036
- var diagram = {
4037
- parser,
4038
- get db() {
4039
- return new ArchitectureDB();
4040
- },
4041
- renderer: { draw: /* @__PURE__ */ __name(async (e, t, n, r) => {
4042
- let i = r.db, a = i.getServices(), o = i.getJunctions(), s = i.getGroups(), c = i.getEdges(), u = i.getDataStructures(), d = selectSvgElement(t), f = d.append("g");
4043
- f.attr("class", "architecture-edges");
4044
- let p = d.append("g");
4045
- p.attr("class", "architecture-services");
4046
- let m = d.append("g");
4047
- m.attr("class", "architecture-groups"), await drawServices(i, p, a), drawJunctions(i, p, o);
4048
- let h = await layoutArchitecture(a, o, s, c, i, u);
4049
- await drawEdges(f, h, i), await drawGroups(m, h, i), positionNodes(i, h), setupGraphViewbox(void 0, d, i.getConfigField("padding"), i.getConfigField("useMaxWidth"));
4050
- }, "draw") },
4051
- styles: architectureStyles_default
4052
- };
4053
- export { diagram };