for-humanity 0.11.0 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (226) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/README.md +16 -9
  3. package/dist/browser.js +16 -16
  4. package/dist/cli.css +2 -941
  5. package/dist/cli.js +92 -2290
  6. package/dist/config.js +1 -0
  7. package/dist/constant/copy.d.ts +100 -0
  8. package/dist/constant/site.d.ts +20 -0
  9. package/dist/constant/status.d.ts +19 -0
  10. package/dist/copy-C1uzvEnr.js +103 -0
  11. package/dist/group-path-XAThmzvC.js +10 -0
  12. package/dist/load-site-CbpLEhwu.js +2379 -0
  13. package/dist/logger-Dv1i9xSV.js +9 -0
  14. package/dist/mermaid/THIRD-PARTY-NOTICES.txt +3134 -0
  15. package/dist/mermaid/chunk--TN-qHgG.js +2 -0
  16. package/dist/mermaid/chunk-0kM1Lv4D.js +2 -0
  17. package/dist/mermaid/chunk-3FHei3pH.js +2001 -0
  18. package/dist/mermaid/chunk-3_2p2GqN.js +2 -0
  19. package/dist/mermaid/chunk-6HLei9i0.js +84 -0
  20. package/dist/mermaid/chunk-7Sz3kAwl.js +2214 -0
  21. package/dist/mermaid/chunk-7Tarqbpa.js +18047 -0
  22. package/dist/mermaid/chunk-9kkt8lzL.js +10 -0
  23. package/dist/mermaid/chunk-B--pNBQF.js +884 -0
  24. package/dist/mermaid/chunk-B4F-pysn.js +4241 -0
  25. package/dist/mermaid/chunk-B58sEIY_.js +14 -0
  26. package/dist/mermaid/chunk-B9_UWzSH.js +1517 -0
  27. package/dist/mermaid/chunk-BB8uZHwY.js +75 -0
  28. package/dist/mermaid/chunk-BFfk0LEc.js +717 -0
  29. package/dist/mermaid/chunk-BKri0qr7.js +89 -0
  30. package/dist/mermaid/chunk-BL404pH5.js +26 -0
  31. package/dist/mermaid/chunk-BLeiQSWo.js +354 -0
  32. package/dist/mermaid/chunk-BOmH_UFd.js +2 -0
  33. package/dist/mermaid/chunk-BSej9Nhy.js +1361 -0
  34. package/dist/mermaid/chunk-BYzrzvCI.js +12 -0
  35. package/dist/mermaid/chunk-BariMtWr.js +3020 -0
  36. package/dist/mermaid/chunk-BcrBoMwH.js +2352 -0
  37. package/dist/mermaid/chunk-Bok8z-Yo.js +67 -0
  38. package/dist/mermaid/chunk-BpTHLKQM.js +1970 -0
  39. package/dist/mermaid/chunk-BqjuxRsC.js +733 -0
  40. package/dist/mermaid/chunk-BuvPd-s5.js +1073 -0
  41. package/dist/mermaid/chunk-BvVehae3.js +5069 -0
  42. package/dist/mermaid/chunk-C-JABYpd.js +3075 -0
  43. package/dist/mermaid/chunk-C9XlTm4w.js +2 -0
  44. package/dist/mermaid/chunk-CApNbSU9.js +6 -0
  45. package/dist/mermaid/chunk-CCM2AH-C.js +9 -0
  46. package/dist/mermaid/chunk-CD1E0F_N.js +2 -0
  47. package/dist/mermaid/chunk-CDWvKG7D.js +2 -0
  48. package/dist/mermaid/chunk-CEVPpC1F.js +34 -0
  49. package/dist/mermaid/chunk-CLDr12lf.js +47504 -0
  50. package/dist/mermaid/chunk-CLVYqOBI.js +61 -0
  51. package/dist/mermaid/chunk-CLeOkFb5.js +15 -0
  52. package/dist/mermaid/chunk-CLgRAtOz.js +37 -0
  53. package/dist/mermaid/chunk-CMqFNUBl.js +134 -0
  54. package/dist/mermaid/chunk-CTPaBJXB.js +2 -0
  55. package/dist/mermaid/chunk-CVi6IGBL.js +2 -0
  56. package/dist/mermaid/chunk-CWV_EN-4.js +4745 -0
  57. package/dist/mermaid/chunk-CZ0dAs3g.js +2 -0
  58. package/dist/mermaid/chunk-C_YGy4Fn.js +236 -0
  59. package/dist/mermaid/chunk-CcVH22Yt.js +100 -0
  60. package/dist/mermaid/chunk-CgG6CD9_.js +7175 -0
  61. package/dist/mermaid/chunk-CgOP6IDB.js +3397 -0
  62. package/dist/mermaid/chunk-Cgg2UTSf.js +13 -0
  63. package/dist/mermaid/chunk-ChJfJJ1A.js +214 -0
  64. package/dist/mermaid/chunk-Ck5XRA46.js +447 -0
  65. package/dist/mermaid/chunk-Ckuw16cl.js +203 -0
  66. package/dist/mermaid/chunk-CpAbRCbF.js +1880 -0
  67. package/dist/mermaid/chunk-CuYekbSv.js +2 -0
  68. package/dist/mermaid/chunk-CwS4wZ5a.js +2 -0
  69. package/dist/mermaid/chunk-D-bcrBO3.js +82 -0
  70. package/dist/mermaid/chunk-D3IEAkCW.js +76 -0
  71. package/dist/mermaid/chunk-D8XfBJ_K.js +645 -0
  72. package/dist/mermaid/chunk-D9Ddd9y4.js +2228 -0
  73. package/dist/mermaid/chunk-DBh1mIbK.js +12 -0
  74. package/dist/mermaid/chunk-DD6Df6Ic.js +5 -0
  75. package/dist/mermaid/chunk-DGVDaXjx.js +8 -0
  76. package/dist/mermaid/chunk-DK9KqIXj.js +632 -0
  77. package/dist/mermaid/chunk-DORnIAsy.js +4487 -0
  78. package/dist/mermaid/chunk-DU69_VcF.js +363 -0
  79. package/dist/mermaid/chunk-DVNvSFoz.js +2144 -0
  80. package/dist/mermaid/chunk-DZe-4kde.js +20 -0
  81. package/dist/mermaid/chunk-D_a06Rz4.js +287 -0
  82. package/dist/mermaid/chunk-DfyFJJi2.js +972 -0
  83. package/dist/mermaid/chunk-DhKYPp1Z.js +2 -0
  84. package/dist/mermaid/chunk-DjFqgNTG.js +94 -0
  85. package/dist/mermaid/chunk-DmbDDrr-.js +65 -0
  86. package/dist/mermaid/chunk-DpuxlyL_.js +696 -0
  87. package/dist/mermaid/chunk-DqGhppWe.js +2 -0
  88. package/dist/mermaid/chunk-DqPZxHXa.js +5 -0
  89. package/dist/mermaid/chunk-Dt_1Jyif.js +293 -0
  90. package/dist/mermaid/chunk-DyQBE_NW.js +1935 -0
  91. package/dist/mermaid/chunk-JckyC4mW.js +1009 -0
  92. package/dist/mermaid/chunk-K7Myuj2-.js +1334 -0
  93. package/dist/mermaid/chunk-KuPYb48V.js +275 -0
  94. package/dist/mermaid/chunk-MFVRUoO0.js +4020 -0
  95. package/dist/mermaid/chunk-MbInCS_6.js +28 -0
  96. package/dist/mermaid/chunk-MexOLyKV.js +355 -0
  97. package/dist/mermaid/chunk-NnbDtJzg.js +21856 -0
  98. package/dist/mermaid/chunk-SGpOYZbI.js +2139 -0
  99. package/dist/mermaid/chunk-TbxLDlcU.js +198 -0
  100. package/dist/mermaid/chunk-TftHqGLg.js +490 -0
  101. package/dist/mermaid/chunk-UjQ8vA_Z.js +4138 -0
  102. package/dist/mermaid/chunk-YgmVTKqc.js +16 -0
  103. package/dist/mermaid/chunk-_a9EZE1v.js +1798 -0
  104. package/dist/mermaid/chunk-dTb8jqeP.js +2 -0
  105. package/dist/mermaid/chunk-fFdMfF8S.js +2240 -0
  106. package/dist/mermaid/chunk-feYbMzBj.js +1267 -0
  107. package/dist/mermaid/chunk-g3Pn8DkW.js +46 -0
  108. package/dist/mermaid/chunk-hM77LvCb.js +19832 -0
  109. package/dist/mermaid/chunk-hUDb-eAW.js +527 -0
  110. package/dist/mermaid/chunk-tpABtZ-3.js +4252 -0
  111. package/dist/mermaid/chunk-xIbz3oFK.js +59 -0
  112. package/dist/mermaid/chunk-yBz-vst0.js +976 -0
  113. package/dist/mermaid/mermaid-BhtR3wyB.js +1145 -0
  114. package/dist/run-site-command-C80YoNOe.js +129 -0
  115. package/dist/site-config-bllORGpm.js +90 -0
  116. package/dist/site.js +1 -0
  117. package/dist/start-dev-server-C4_Lu1nZ.js +176 -0
  118. package/dist/to-change-queue-DbEnZGNK.js +34 -0
  119. package/dist/to-error-message-pF6_7wGK.js +16 -0
  120. package/dist/type/group-path.d.ts +7 -0
  121. package/dist/type/site-config.d.ts +57 -0
  122. package/package.json +34 -17
  123. package/src/component/widget/cursor-face/_constant/cursor-face.ts +0 -14
  124. package/src/component/widget/cursor-face/wg-cursor-face.css +0 -15
  125. package/src/component/widget/cursor-face/wg-cursor-face.tsx +0 -153
  126. package/src/component/widget/navigation/_constant/locale.ts +0 -9
  127. package/src/component/widget/navigation/_constant/navigation-data-schema.ts +0 -33
  128. package/src/component/widget/navigation/_constant/navigation.ts +0 -9
  129. package/src/component/widget/navigation/_constant/reading-line.ts +0 -4
  130. package/src/component/widget/navigation/_function/restore-navigation-scroll.ts +0 -59
  131. package/src/component/widget/navigation/_function/to-doc-groups/_to-doc-branches.ts +0 -15
  132. package/src/component/widget/navigation/_function/to-doc-groups/_to-doc-group-branches.ts +0 -70
  133. package/src/component/widget/navigation/_function/to-doc-groups/to-doc-groups.ts +0 -15
  134. package/src/component/widget/navigation/_function/to-navigation-data/_to-navigation-document.ts +0 -13
  135. package/src/component/widget/navigation/_function/to-navigation-data/_to-navigation-group.ts +0 -13
  136. package/src/component/widget/navigation/_function/to-navigation-data/to-navigation-data.ts +0 -18
  137. package/src/component/widget/navigation/_function/to-navigation-json.ts +0 -8
  138. package/src/component/widget/navigation/_function/to-toc-groups.ts +0 -38
  139. package/src/component/widget/navigation/_type/doc-branch.ts +0 -11
  140. package/src/component/widget/navigation/_type/doc-group.ts +0 -24
  141. package/src/component/widget/navigation/_type/navigation-data.ts +0 -75
  142. package/src/component/widget/navigation/_type/navigation-focus-snapshot.ts +0 -17
  143. package/src/component/widget/navigation/_type/toc-group.ts +0 -39
  144. package/src/component/widget/navigation/_wg-navigation-nav-list.css +0 -48
  145. package/src/component/widget/navigation/_wg-navigation-nav-list.tsx +0 -61
  146. package/src/component/widget/navigation/_wg-navigation-nav.css +0 -21
  147. package/src/component/widget/navigation/_wg-navigation-nav.tsx +0 -33
  148. package/src/component/widget/navigation/_wg-navigation-scroll.tsx +0 -117
  149. package/src/component/widget/navigation/_wg-navigation-toc.css +0 -91
  150. package/src/component/widget/navigation/_wg-navigation-toc.tsx +0 -114
  151. package/src/component/widget/navigation/wg-navigation.css +0 -282
  152. package/src/component/widget/navigation/wg-navigation.tsx +0 -420
  153. package/src/component/widget/prose/_constant/heading-highlight.ts +0 -4
  154. package/src/component/widget/prose/_constant/section.ts +0 -7
  155. package/src/component/widget/prose/_constant/status.ts +0 -9
  156. package/src/component/widget/prose/_function/has-block-content.ts +0 -30
  157. package/src/component/widget/prose/_function/rehype-head.ts +0 -31
  158. package/src/component/widget/prose/_function/rehype-sections/_to-section-headings.ts +0 -20
  159. package/src/component/widget/prose/_function/rehype-sections/rehype-sections.ts +0 -21
  160. package/src/component/widget/prose/_function/rehype-tables.ts +0 -22
  161. package/src/component/widget/prose/_function/remark-blocks.ts +0 -112
  162. package/src/component/widget/prose/_function/remark-flow.ts +0 -26
  163. package/src/component/widget/prose/_function/remark-links.ts +0 -33
  164. package/src/component/widget/prose/_function/remark-parts.ts +0 -26
  165. package/src/component/widget/prose/_function/remark-status.ts +0 -59
  166. package/src/component/widget/prose/_function/remark-swatch.ts +0 -16
  167. package/src/component/widget/prose/_function/remark-unknown-directives.ts +0 -25
  168. package/src/component/widget/prose/wg-prose.css +0 -454
  169. package/src/component/widget/prose/wg-prose.tsx +0 -43
  170. package/src/component/widget/shell/wg-shell.css +0 -63
  171. package/src/component/widget/shell/wg-shell.tsx +0 -88
  172. package/src/component/widget/shell-controls/wg-shell-controls.css +0 -4
  173. package/src/component/widget/shell-controls/wg-shell-controls.tsx +0 -170
  174. package/src/constant/asset.ts +0 -63
  175. package/src/constant/copy.ts +0 -133
  176. package/src/constant/doc.ts +0 -13
  177. package/src/constant/font.ts +0 -34
  178. package/src/constant/site.ts +0 -24
  179. package/src/constant/status.ts +0 -15
  180. package/src/entry/browser/browser.tsx +0 -22
  181. package/src/entry/cli/_constant/cli.ts +0 -19
  182. package/src/entry/cli/_constant/crawling.ts +0 -14
  183. package/src/entry/cli/_constant/snippet.ts +0 -21
  184. package/src/entry/cli/_function/create-app.tsx +0 -57
  185. package/src/entry/cli/_function/create-dev-app.ts +0 -87
  186. package/src/entry/cli/_function/create-processor/_rehype-assets.ts +0 -70
  187. package/src/entry/cli/_function/create-processor/_rehype-heading-ids.ts +0 -34
  188. package/src/entry/cli/_function/create-processor/_remark-report.ts +0 -15
  189. package/src/entry/cli/_function/create-processor/_remark-snippets.ts +0 -117
  190. package/src/entry/cli/_function/create-processor/_shiki-transformers.ts +0 -55
  191. package/src/entry/cli/_function/create-processor/create-processor.ts +0 -64
  192. package/src/entry/cli/_function/read-docs.ts +0 -128
  193. package/src/entry/cli/_function/read-home.ts +0 -32
  194. package/src/entry/cli/_function/to-crawling-app.ts +0 -42
  195. package/src/entry/cli/cli.test.ts +0 -782
  196. package/src/entry/cli/cli.ts +0 -206
  197. package/src/env.d.ts +0 -6
  198. package/src/page/doc/pg-doc.tsx +0 -35
  199. package/src/page/home/pg-home.tsx +0 -40
  200. package/src/store/navigation/create-navigation-stores.test.ts +0 -74
  201. package/src/store/navigation/create-navigation-stores.ts +0 -59
  202. package/src/store/navigation/navigation-state.ts +0 -36
  203. package/src/store/navigation/navigation-storage.ts +0 -9
  204. package/src/store/navigation/to-navigation-scroll-state.ts +0 -42
  205. package/src/style/base.css +0 -28
  206. package/src/style/token.css +0 -186
  207. package/src/type/doc-content.ts +0 -15
  208. package/src/type/doc-data.ts +0 -38
  209. package/src/type/doc-file-data.ts +0 -21
  210. package/src/type/doc-heading.ts +0 -17
  211. package/src/type/doc-outline.ts +0 -16
  212. package/src/type/doc-section.ts +0 -9
  213. package/src/type/doc.ts +0 -20
  214. package/src/type/group-path.ts +0 -7
  215. package/src/type/site-assets.ts +0 -25
  216. package/src/type/site-config.ts +0 -73
  217. package/src/type/vfile-data.d.ts +0 -10
  218. package/src/util/async/to-change-queue.test.ts +0 -58
  219. package/src/util/async/to-change-queue.ts +0 -43
  220. package/src/util/dom/find-hash-target.ts +0 -18
  221. package/src/util/dom/reveal-hash-target.ts +0 -15
  222. package/src/util/error/to-error-message.ts +0 -10
  223. package/src/util/file/to-asset-path.ts +0 -26
  224. package/src/util/font/to-font-css.test.ts +0 -41
  225. package/src/util/font/to-font-css.ts +0 -28
  226. package/src/util/mermaid/render-flow.js +0 -321
@@ -0,0 +1,2352 @@
1
+ import { m as e } from "./chunk-DVNvSFoz.js";
2
+ import { n as t } from "./chunk-BYzrzvCI.js";
3
+ import { b as n } from "./chunk-MFVRUoO0.js";
4
+ import "./chunk-K7Myuj2-.js";
5
+ import "./chunk-Bok8z-Yo.js";
6
+ import "./chunk-KuPYb48V.js";
7
+ import "./chunk-_a9EZE1v.js";
8
+ import { c as r } from "./chunk-DORnIAsy.js";
9
+ import { a as i, i as a, n as o } from "./chunk-CLgRAtOz.js";
10
+ import { r as s } from "./chunk-DU69_VcF.js";
11
+ import { a as c, i as l, l as u } from "./chunk-DpuxlyL_.js";
12
+ import { $ as d, A as f, B as p, C as m, D as h, E as g, F as _, G as ee, H as v, I as te, J as ne, K as re, L as ie, M as ae, N as oe, O as se, P as y, Q as b, R as ce, S as le, T as ue, U as de, V as fe, W as pe, X as me, Y as he, Z as x, _ as S, a as C, b as ge, c as _e, d as ve, et as w, f as T, g as ye, h as be, i as E, it as xe, j as Se, k as Ce, l as we, m as Te, n as D, nt as Ee, o as O, p as De, q as Oe, r as k, rt as ke, s as Ae, t as A, tt as j, u as je, v as Me, w as Ne, x as Pe, y as Fe, z as M } from "./chunk-feYbMzBj.js";
13
+ import { c as Ie, i as Le, n as N, o as Re, r as ze, s as Be, t as Ve } from "./chunk-BLeiQSWo.js";
14
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_trimmedEndIndex.js
15
+ var He = /\s/;
16
+ function Ue(e) {
17
+ for (var t = e.length; t-- && He.test(e.charAt(t)););
18
+ return t;
19
+ }
20
+ //#endregion
21
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseTrim.js
22
+ var We = /^\s+/;
23
+ function Ge(e) {
24
+ return e && e.slice(0, Ue(e) + 1).replace(We, "");
25
+ }
26
+ //#endregion
27
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/toNumber.js
28
+ var Ke = NaN, qe = /^[-+]0x[0-9a-f]+$/i, Je = /^0b[01]+$/i, Ye = /^0o[0-7]+$/i, Xe = parseInt;
29
+ function Ze(e) {
30
+ if (typeof e == "number") return e;
31
+ if (w(e)) return Ke;
32
+ if (x(e)) {
33
+ var t = typeof e.valueOf == "function" ? e.valueOf() : e;
34
+ e = x(t) ? t + "" : t;
35
+ }
36
+ if (typeof e != "string") return e === 0 ? e : +e;
37
+ e = Ge(e);
38
+ var n = Je.test(e);
39
+ return n || Ye.test(e) ? Xe(e.slice(2), n ? 2 : 8) : qe.test(e) ? Ke : +e;
40
+ }
41
+ //#endregion
42
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/toFinite.js
43
+ var Qe = 1 / 0, $e = 17976931348623157e292;
44
+ function P(e) {
45
+ return e ? (e = Ze(e), e === Qe || e === -Qe ? (e < 0 ? -1 : 1) * $e : e === e ? e : 0) : e === 0 ? e : 0;
46
+ }
47
+ //#endregion
48
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/toInteger.js
49
+ function et(e) {
50
+ var t = P(e), n = t % 1;
51
+ return t === t ? n ? t - n : t : 0;
52
+ }
53
+ //#endregion
54
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseCreate.js
55
+ var tt = Object.create, nt = function() {
56
+ function e() {}
57
+ return function(t) {
58
+ if (!x(t)) return {};
59
+ if (tt) return tt(t);
60
+ e.prototype = t;
61
+ var n = new e();
62
+ return e.prototype = void 0, n;
63
+ };
64
+ }();
65
+ //#endregion
66
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_copyArray.js
67
+ function rt(e, t) {
68
+ var n = -1, r = e.length;
69
+ for (t ||= Array(r); ++n < r;) t[n] = e[n];
70
+ return t;
71
+ }
72
+ //#endregion
73
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignValue.js
74
+ function it(e, t, n) {
75
+ t == "__proto__" && Oe ? Oe(e, t, {
76
+ configurable: !0,
77
+ enumerable: !0,
78
+ value: n,
79
+ writable: !0
80
+ }) : e[t] = n;
81
+ }
82
+ //#endregion
83
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_assignValue.js
84
+ var at = Object.prototype.hasOwnProperty;
85
+ function F(e, t, n) {
86
+ var r = e[t];
87
+ (!(at.call(e, t) && v(r, n)) || n === void 0 && !(t in e)) && it(e, t, n);
88
+ }
89
+ //#endregion
90
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_copyObject.js
91
+ function I(e, t, n, r) {
92
+ var i = !n;
93
+ n ||= {};
94
+ for (var a = -1, o = t.length; ++a < o;) {
95
+ var s = t[a], c = r ? r(n[s], e[s], s, n, e) : void 0;
96
+ c === void 0 && (c = e[s]), i ? it(n, s, c) : F(n, s, c);
97
+ }
98
+ return n;
99
+ }
100
+ //#endregion
101
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_isIterateeCall.js
102
+ function L(e, t, n) {
103
+ if (!x(n)) return !1;
104
+ var r = typeof t;
105
+ return (r == "number" ? M(n) && de(t, n.length) : r == "string" && t in n) ? v(n[t], e) : !1;
106
+ }
107
+ //#endregion
108
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_createAssigner.js
109
+ function ot(e) {
110
+ return p(function(t, n) {
111
+ var r = -1, i = n.length, a = i > 1 ? n[i - 1] : void 0, o = i > 2 ? n[2] : void 0;
112
+ for (a = e.length > 3 && typeof a == "function" ? (i--, a) : void 0, o && L(n[0], n[1], o) && (a = i < 3 ? void 0 : a, i = 1), t = Object(t); ++r < i;) {
113
+ var s = n[r];
114
+ s && e(t, s, r, a);
115
+ }
116
+ return t;
117
+ });
118
+ }
119
+ //#endregion
120
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeysIn.js
121
+ function st(e) {
122
+ var t = [];
123
+ if (e != null) for (var n in Object(e)) t.push(n);
124
+ return t;
125
+ }
126
+ //#endregion
127
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseKeysIn.js
128
+ var ct = Object.prototype.hasOwnProperty;
129
+ function lt(e) {
130
+ if (!x(e)) return st(e);
131
+ var t = ce(e), n = [];
132
+ for (var r in e) (r != "constructor" || !t && ct.call(e, r)) && n.push(r);
133
+ return n;
134
+ }
135
+ //#endregion
136
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/keysIn.js
137
+ function R(e) {
138
+ return M(e) ? ae(e, !0) : lt(e);
139
+ }
140
+ //#endregion
141
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/flatten.js
142
+ function z(e) {
143
+ return e != null && e.length ? m(e, 1) : [];
144
+ }
145
+ //#endregion
146
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_flatRest.js
147
+ function ut(e) {
148
+ return re(fe(e, void 0, z), e + "");
149
+ }
150
+ //#endregion
151
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_getPrototype.js
152
+ var dt = Se(Object.getPrototypeOf, Object), ft = "[object Object]", pt = Function.prototype, mt = Object.prototype, ht = pt.toString, gt = mt.hasOwnProperty, _t = ht.call(Object);
153
+ function vt(e) {
154
+ if (!j(e) || Ee(e) != ft) return !1;
155
+ var t = dt(e);
156
+ if (t === null) return !0;
157
+ var n = gt.call(t, "constructor") && t.constructor;
158
+ return typeof n == "function" && n instanceof n && ht.call(n) == _t;
159
+ }
160
+ //#endregion
161
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_hasUnicode.js
162
+ var yt = RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");
163
+ function bt(e) {
164
+ return yt.test(e);
165
+ }
166
+ //#endregion
167
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseAssign.js
168
+ function xt(e, t) {
169
+ return e && I(t, Ce(t), e);
170
+ }
171
+ //#endregion
172
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseAssignIn.js
173
+ function St(e, t) {
174
+ return e && I(t, R(t), e);
175
+ }
176
+ //#endregion
177
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_cloneBuffer.js
178
+ var Ct = typeof exports == "object" && exports && !exports.nodeType && exports, wt = Ct && typeof module == "object" && module && !module.nodeType && module, Tt = wt && wt.exports === Ct ? xe.Buffer : void 0, Et = Tt ? Tt.allocUnsafe : void 0;
179
+ function Dt(e, t) {
180
+ if (t) return e.slice();
181
+ var n = e.length, r = Et ? Et(n) : new e.constructor(n);
182
+ return e.copy(r), r;
183
+ }
184
+ //#endregion
185
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_copySymbols.js
186
+ function Ot(e, t) {
187
+ return I(e, ge(e), t);
188
+ }
189
+ //#endregion
190
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_getSymbolsIn.js
191
+ var kt = Object.getOwnPropertySymbols ? function(e) {
192
+ for (var t = []; e;) Ne(t, ge(e)), e = dt(e);
193
+ return t;
194
+ } : Pe;
195
+ //#endregion
196
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_copySymbolsIn.js
197
+ function At(e, t) {
198
+ return I(e, kt(e), t);
199
+ }
200
+ //#endregion
201
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_getAllKeysIn.js
202
+ function jt(e) {
203
+ return Fe(e, R, kt);
204
+ }
205
+ //#endregion
206
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_initCloneArray.js
207
+ var Mt = Object.prototype.hasOwnProperty;
208
+ function Nt(e) {
209
+ var t = e.length, n = new e.constructor(t);
210
+ return t && typeof e[0] == "string" && Mt.call(e, "index") && (n.index = e.index, n.input = e.input), n;
211
+ }
212
+ //#endregion
213
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_cloneArrayBuffer.js
214
+ function Pt(e) {
215
+ var t = new e.constructor(e.byteLength);
216
+ return new ye(t).set(new ye(e)), t;
217
+ }
218
+ //#endregion
219
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_cloneDataView.js
220
+ function Ft(e, t) {
221
+ var n = t ? Pt(e.buffer) : e.buffer;
222
+ return new e.constructor(n, e.byteOffset, e.byteLength);
223
+ }
224
+ //#endregion
225
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_cloneRegExp.js
226
+ var It = /\w*$/;
227
+ function Lt(e) {
228
+ var t = new e.constructor(e.source, It.exec(e));
229
+ return t.lastIndex = e.lastIndex, t;
230
+ }
231
+ //#endregion
232
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_cloneSymbol.js
233
+ var Rt = ke ? ke.prototype : void 0, zt = Rt ? Rt.valueOf : void 0;
234
+ function Bt(e) {
235
+ return zt ? Object(zt.call(e)) : {};
236
+ }
237
+ //#endregion
238
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_cloneTypedArray.js
239
+ function Vt(e, t) {
240
+ var n = t ? Pt(e.buffer) : e.buffer;
241
+ return new e.constructor(n, e.byteOffset, e.length);
242
+ }
243
+ //#endregion
244
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_initCloneByTag.js
245
+ var Ht = "[object Boolean]", Ut = "[object Date]", Wt = "[object Map]", Gt = "[object Number]", Kt = "[object RegExp]", qt = "[object Set]", Jt = "[object String]", Yt = "[object Symbol]", Xt = "[object ArrayBuffer]", Zt = "[object DataView]", Qt = "[object Float32Array]", $t = "[object Float64Array]", en = "[object Int8Array]", tn = "[object Int16Array]", nn = "[object Int32Array]", rn = "[object Uint8Array]", an = "[object Uint8ClampedArray]", on = "[object Uint16Array]", sn = "[object Uint32Array]";
246
+ function cn(e, t, n) {
247
+ var r = e.constructor;
248
+ switch (t) {
249
+ case Xt: return Pt(e);
250
+ case Ht:
251
+ case Ut: return new r(+e);
252
+ case Zt: return Ft(e, n);
253
+ case Qt:
254
+ case $t:
255
+ case en:
256
+ case tn:
257
+ case nn:
258
+ case rn:
259
+ case an:
260
+ case on:
261
+ case sn: return Vt(e, n);
262
+ case Wt: return new r();
263
+ case Gt:
264
+ case Jt: return new r(e);
265
+ case Kt: return Lt(e);
266
+ case qt: return new r();
267
+ case Yt: return Bt(e);
268
+ }
269
+ }
270
+ //#endregion
271
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_initCloneObject.js
272
+ function ln(e) {
273
+ return typeof e.constructor == "function" && !ce(e) ? nt(dt(e)) : {};
274
+ }
275
+ //#endregion
276
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseIsMap.js
277
+ var un = "[object Map]";
278
+ function dn(e) {
279
+ return j(e) && S(e) == un;
280
+ }
281
+ //#endregion
282
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isMap.js
283
+ var fn = y && y.isMap, pn = fn ? _(fn) : dn, mn = "[object Set]";
284
+ function hn(e) {
285
+ return j(e) && S(e) == mn;
286
+ }
287
+ //#endregion
288
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isSet.js
289
+ var gn = y && y.isSet, _n = gn ? _(gn) : hn, vn = 1, yn = 2, bn = 4, xn = "[object Arguments]", Sn = "[object Array]", Cn = "[object Boolean]", wn = "[object Date]", Tn = "[object Error]", En = "[object Function]", Dn = "[object GeneratorFunction]", On = "[object Map]", kn = "[object Number]", An = "[object Object]", jn = "[object RegExp]", Mn = "[object Set]", Nn = "[object String]", Pn = "[object Symbol]", Fn = "[object WeakMap]", In = "[object ArrayBuffer]", Ln = "[object DataView]", Rn = "[object Float32Array]", zn = "[object Float64Array]", Bn = "[object Int8Array]", Vn = "[object Int16Array]", Hn = "[object Int32Array]", Un = "[object Uint8Array]", Wn = "[object Uint8ClampedArray]", Gn = "[object Uint16Array]", Kn = "[object Uint32Array]", B = {};
290
+ B[xn] = B[Sn] = B[In] = B[Ln] = B[Cn] = B[wn] = B[Rn] = B[zn] = B[Bn] = B[Vn] = B[Hn] = B[On] = B[kn] = B[An] = B[jn] = B[Mn] = B[Nn] = B[Pn] = B[Un] = B[Wn] = B[Gn] = B[Kn] = !0, B[Tn] = B[En] = B[Fn] = !1;
291
+ function V(e, t, n, r, i, a) {
292
+ var o, s = t & vn, c = t & yn, l = t & bn;
293
+ if (n && (o = i ? n(e, r, i, a) : n(e)), o !== void 0) return o;
294
+ if (!x(e)) return e;
295
+ var u = b(e);
296
+ if (u) {
297
+ if (o = Nt(e), !s) return rt(e, o);
298
+ } else {
299
+ var d = S(e), f = d == En || d == Dn;
300
+ if (te(e)) return Dt(e, s);
301
+ if (d == An || d == xn || f && !i) {
302
+ if (o = c || f ? {} : ln(e), !s) return c ? At(e, St(o, e)) : Ot(e, xt(o, e));
303
+ } else {
304
+ if (!B[d]) return i ? e : {};
305
+ o = cn(e, d, s);
306
+ }
307
+ }
308
+ a ||= new le();
309
+ var p = a.get(e);
310
+ if (p) return p;
311
+ a.set(e, o), _n(e) ? e.forEach(function(r) {
312
+ o.add(V(r, t, n, r, e, a));
313
+ }) : pn(e) && e.forEach(function(r, i) {
314
+ o.set(i, V(r, t, n, i, e, a));
315
+ });
316
+ var m = u ? void 0 : (l ? c ? jt : Me : c ? R : Ce)(e);
317
+ return ee(m || e, function(r, i) {
318
+ m && (i = r, r = e[i]), F(o, i, V(r, t, n, i, e, a));
319
+ }), o;
320
+ }
321
+ //#endregion
322
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/cloneDeep.js
323
+ var qn = 1, Jn = 4;
324
+ function Yn(e) {
325
+ return V(e, qn | Jn);
326
+ }
327
+ //#endregion
328
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/now.js
329
+ var Xn = function() {
330
+ return xe.Date.now();
331
+ }, Zn = Object.prototype, Qn = Zn.hasOwnProperty, $n = p(function(e, t) {
332
+ e = Object(e);
333
+ var n = -1, r = t.length, i = r > 2 ? t[2] : void 0;
334
+ for (i && L(t[0], t[1], i) && (r = 1); ++n < r;) for (var a = t[n], o = R(a), s = -1, c = o.length; ++s < c;) {
335
+ var l = o[s], u = e[l];
336
+ (u === void 0 || v(u, Zn[l]) && !Qn.call(e, l)) && (e[l] = a[l]);
337
+ }
338
+ return e;
339
+ });
340
+ //#endregion
341
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_assignMergeValue.js
342
+ function er(e, t, n) {
343
+ (n !== void 0 && !v(e[t], n) || n === void 0 && !(t in e)) && it(e, t, n);
344
+ }
345
+ //#endregion
346
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_safeGet.js
347
+ function tr(e, t) {
348
+ if ((t !== "constructor" || typeof e[t] != "function") && t != "__proto__") return e[t];
349
+ }
350
+ //#endregion
351
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/toPlainObject.js
352
+ function nr(e) {
353
+ return I(e, R(e));
354
+ }
355
+ //#endregion
356
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseMergeDeep.js
357
+ function rr(e, t, n, r, i, a, o) {
358
+ var s = tr(e, n), c = tr(t, n), l = o.get(c);
359
+ if (l) er(e, n, l);
360
+ else {
361
+ var u = a ? a(s, c, n + "", e, t, o) : void 0, d = u === void 0;
362
+ if (d) {
363
+ var f = b(c), p = !f && te(c), m = !f && !p && oe(c);
364
+ u = c, f || p || m ? b(s) ? u = s : _e(s) ? u = rt(s) : p ? (d = !1, u = Dt(c, !0)) : m ? (d = !1, u = Vt(c, !0)) : u = [] : vt(c) || ie(c) ? (u = s, ie(s) ? u = nr(s) : (!x(s) || he(s)) && (u = ln(c))) : d = !1;
365
+ }
366
+ d && (o.set(c, u), i(u, c, r, a, o), o.delete(c)), er(e, n, u);
367
+ }
368
+ }
369
+ //#endregion
370
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseMerge.js
371
+ function ir(e, t, n, r, i) {
372
+ e !== t && ve(t, function(a, o) {
373
+ if (i ||= new le(), x(a)) rr(e, t, o, n, ir, r, i);
374
+ else {
375
+ var s = r ? r(tr(e, o), a, o + "", e, t, i) : void 0;
376
+ s === void 0 && (s = a), er(e, o, s);
377
+ }
378
+ }, R);
379
+ }
380
+ //#endregion
381
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/last.js
382
+ function H(e) {
383
+ var t = e == null ? 0 : e.length;
384
+ return t ? e[t - 1] : void 0;
385
+ }
386
+ //#endregion
387
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_createFind.js
388
+ function ar(e) {
389
+ return function(t, n, r) {
390
+ var i = Object(t);
391
+ if (!M(t)) {
392
+ var a = T(n, 3);
393
+ t = Ce(t), n = function(e) {
394
+ return a(i[e], e, i);
395
+ };
396
+ }
397
+ var o = e(t, n, r);
398
+ return o > -1 ? i[a ? t[o] : o] : void 0;
399
+ };
400
+ }
401
+ //#endregion
402
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/findIndex.js
403
+ var or = Math.max;
404
+ function sr(e, t, n) {
405
+ var r = e == null ? 0 : e.length;
406
+ if (!r) return -1;
407
+ var i = n == null ? 0 : et(n);
408
+ return i < 0 && (i = or(r + i, 0)), pe(e, T(t, 3), i);
409
+ }
410
+ //#endregion
411
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/find.js
412
+ var cr = ar(sr);
413
+ //#endregion
414
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseMap.js
415
+ function lr(e, t) {
416
+ var n = -1, r = M(e) ? Array(e.length) : [];
417
+ return we(e, function(e, i, a) {
418
+ r[++n] = t(e, i, a);
419
+ }), r;
420
+ }
421
+ //#endregion
422
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/map.js
423
+ function U(e, t) {
424
+ return (b(e) ? d : lr)(e, T(t, 3));
425
+ }
426
+ //#endregion
427
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/forIn.js
428
+ function ur(e, t) {
429
+ return e == null ? e : ve(e, Ae(t), R);
430
+ }
431
+ //#endregion
432
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/forOwn.js
433
+ function dr(e, t) {
434
+ return e && je(e, Ae(t));
435
+ }
436
+ //#endregion
437
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseGt.js
438
+ function fr(e, t) {
439
+ return e > t;
440
+ }
441
+ //#endregion
442
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseHas.js
443
+ var pr = Object.prototype.hasOwnProperty;
444
+ function mr(e, t) {
445
+ return e != null && pr.call(e, t);
446
+ }
447
+ //#endregion
448
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/has.js
449
+ function hr(e, t) {
450
+ return e != null && be(e, t, mr);
451
+ }
452
+ //#endregion
453
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/isString.js
454
+ var gr = "[object String]";
455
+ function _r(e) {
456
+ return typeof e == "string" || !b(e) && j(e) && Ee(e) == gr;
457
+ }
458
+ //#endregion
459
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseLt.js
460
+ function vr(e, t) {
461
+ return e < t;
462
+ }
463
+ //#endregion
464
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/mapValues.js
465
+ function W(e, t) {
466
+ var n = {};
467
+ return t = T(t, 3), je(e, function(e, r, i) {
468
+ it(n, r, t(e, r, i));
469
+ }), n;
470
+ }
471
+ //#endregion
472
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseExtremum.js
473
+ function yr(e, t, n) {
474
+ for (var r = -1, i = e.length; ++r < i;) {
475
+ var a = e[r], o = t(a);
476
+ if (o != null && (s === void 0 ? o === o && !w(o) : n(o, s))) var s = o, c = a;
477
+ }
478
+ return c;
479
+ }
480
+ //#endregion
481
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/max.js
482
+ function G(e) {
483
+ return e && e.length ? yr(e, me, fr) : void 0;
484
+ }
485
+ //#endregion
486
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/merge.js
487
+ var br = ot(function(e, t, n) {
488
+ ir(e, t, n);
489
+ });
490
+ //#endregion
491
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/min.js
492
+ function K(e) {
493
+ return e && e.length ? yr(e, me, vr) : void 0;
494
+ }
495
+ //#endregion
496
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/minBy.js
497
+ function xr(e, t) {
498
+ return e && e.length ? yr(e, T(t, 2), vr) : void 0;
499
+ }
500
+ //#endregion
501
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseSet.js
502
+ function Sr(e, t, n, r) {
503
+ if (!x(e)) return e;
504
+ t = h(t, e);
505
+ for (var i = -1, a = t.length, o = a - 1, s = e; s != null && ++i < a;) {
506
+ var c = g(t[i]), l = n;
507
+ if (c === "__proto__" || c === "constructor" || c === "prototype") return e;
508
+ if (i != o) {
509
+ var u = s[c];
510
+ l = r ? r(u, c, s) : void 0, l === void 0 && (l = x(u) ? u : de(t[i + 1]) ? [] : {});
511
+ }
512
+ F(s, c, l), s = s[c];
513
+ }
514
+ return e;
515
+ }
516
+ //#endregion
517
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_basePickBy.js
518
+ function Cr(e, t, n) {
519
+ for (var r = -1, i = t.length, a = {}; ++r < i;) {
520
+ var o = t[r], s = ue(e, o);
521
+ n(s, o) && Sr(a, h(o, e), s);
522
+ }
523
+ return a;
524
+ }
525
+ //#endregion
526
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseSortBy.js
527
+ function wr(e, t) {
528
+ var n = e.length;
529
+ for (e.sort(t); n--;) e[n] = e[n].value;
530
+ return e;
531
+ }
532
+ //#endregion
533
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_compareAscending.js
534
+ function Tr(e, t) {
535
+ if (e !== t) {
536
+ var n = e !== void 0, r = e === null, i = e === e, a = w(e), o = t !== void 0, s = t === null, c = t === t, l = w(t);
537
+ if (!s && !l && !a && e > t || a && o && c && !s && !l || r && o && c || !n && c || !i) return 1;
538
+ if (!r && !a && !l && e < t || l && n && i && !r && !a || s && n && i || !o && i || !c) return -1;
539
+ }
540
+ return 0;
541
+ }
542
+ //#endregion
543
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_compareMultiple.js
544
+ function Er(e, t, n) {
545
+ for (var r = -1, i = e.criteria, a = t.criteria, o = i.length, s = n.length; ++r < o;) {
546
+ var c = Tr(i[r], a[r]);
547
+ if (c) return r >= s ? c : c * (n[r] == "desc" ? -1 : 1);
548
+ }
549
+ return e.index - t.index;
550
+ }
551
+ //#endregion
552
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseOrderBy.js
553
+ function Dr(e, t, n) {
554
+ t = t.length ? d(t, function(e) {
555
+ return b(e) ? function(t) {
556
+ return ue(t, e.length === 1 ? e[0] : e);
557
+ } : e;
558
+ }) : [me];
559
+ var r = -1;
560
+ return t = d(t, _(T)), wr(lr(e, function(e, n, i) {
561
+ return {
562
+ criteria: d(t, function(t) {
563
+ return t(e);
564
+ }),
565
+ index: ++r,
566
+ value: e
567
+ };
568
+ }), function(e, t) {
569
+ return Er(e, t, n);
570
+ });
571
+ }
572
+ //#endregion
573
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_asciiSize.js
574
+ var Or = De("length"), kr = "\\ud800-\\udfff", Ar = "\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff", jr = "\\ufe0e\\ufe0f", Mr = "[" + kr + "]", Nr = "[" + Ar + "]", Pr = "\\ud83c[\\udffb-\\udfff]", Fr = "(?:" + Nr + "|" + Pr + ")", Ir = "[^" + kr + "]", Lr = "(?:\\ud83c[\\udde6-\\uddff]){2}", Rr = "[\\ud800-\\udbff][\\udc00-\\udfff]", zr = "\\u200d", Br = Fr + "?", Vr = "[" + jr + "]?", Hr = "(?:" + zr + "(?:" + [
575
+ Ir,
576
+ Lr,
577
+ Rr
578
+ ].join("|") + ")" + Vr + Br + ")*", Ur = Vr + Br + Hr, Wr = "(?:" + [
579
+ Ir + Nr + "?",
580
+ Nr,
581
+ Lr,
582
+ Rr,
583
+ Mr
584
+ ].join("|") + ")", Gr = RegExp(Pr + "(?=" + Pr + ")|" + Wr + Ur, "g");
585
+ function Kr(e) {
586
+ for (var t = Gr.lastIndex = 0; Gr.test(e);) ++t;
587
+ return t;
588
+ }
589
+ //#endregion
590
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_stringSize.js
591
+ function qr(e) {
592
+ return bt(e) ? Kr(e) : Or(e);
593
+ }
594
+ //#endregion
595
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_basePick.js
596
+ function Jr(e, t) {
597
+ return Cr(e, t, function(t, n) {
598
+ return Te(e, n);
599
+ });
600
+ }
601
+ //#endregion
602
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/pick.js
603
+ var q = ut(function(e, t) {
604
+ return e == null ? {} : Jr(e, t);
605
+ }), Yr = Math.ceil, Xr = Math.max;
606
+ function Zr(e, t, n, r) {
607
+ for (var i = -1, a = Xr(Yr((t - e) / (n || 1)), 0), o = Array(a); a--;) o[r ? a : ++i] = e, e += n;
608
+ return o;
609
+ }
610
+ //#endregion
611
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_createRange.js
612
+ function Qr(e) {
613
+ return function(t, n, r) {
614
+ return r && typeof r != "number" && L(t, n, r) && (n = r = void 0), t = P(t), n === void 0 ? (n = t, t = 0) : n = P(n), r = r === void 0 ? t < n ? 1 : -1 : P(r), Zr(t, n, r, e);
615
+ };
616
+ }
617
+ //#endregion
618
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/range.js
619
+ var J = Qr(), $r = "[object Map]", ei = "[object Set]";
620
+ function ti(e) {
621
+ if (e == null) return 0;
622
+ if (M(e)) return _r(e) ? qr(e) : e.length;
623
+ var t = S(e);
624
+ return t == $r || t == ei ? e.size : f(e).length;
625
+ }
626
+ //#endregion
627
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/sortBy.js
628
+ var Y = p(function(e, t) {
629
+ if (e == null) return [];
630
+ var n = t.length;
631
+ return n > 1 && L(e, t[0], t[1]) ? t = [] : n > 2 && L(t[0], t[1], t[2]) && (t = [t[0]]), Dr(e, m(t, 1), []);
632
+ }), ni = 0;
633
+ function ri(e) {
634
+ var t = ++ni;
635
+ return se(e) + t;
636
+ }
637
+ //#endregion
638
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/_baseZipObject.js
639
+ function ii(e, t, n) {
640
+ for (var r = -1, i = e.length, a = t.length, o = {}; ++r < i;) {
641
+ var s = r < a ? t[r] : void 0;
642
+ n(o, e[r], s);
643
+ }
644
+ return o;
645
+ }
646
+ //#endregion
647
+ //#region node_modules/.pnpm/lodash-es@4.18.1/node_modules/lodash-es/zipObject.js
648
+ function ai(e, t) {
649
+ return ii(e || [], t || [], F);
650
+ }
651
+ //#endregion
652
+ //#region node_modules/.pnpm/dagre-d3-es@7.0.14/node_modules/dagre-d3-es/src/dagre/data/list.js
653
+ var oi = class {
654
+ constructor() {
655
+ var e = {};
656
+ e._next = e._prev = e, this._sentinel = e;
657
+ }
658
+ dequeue() {
659
+ var e = this._sentinel, t = e._prev;
660
+ if (t !== e) return si(t), t;
661
+ }
662
+ enqueue(e) {
663
+ var t = this._sentinel;
664
+ e._prev && e._next && si(e), e._next = t._next, t._next._prev = e, t._next = e, e._prev = t;
665
+ }
666
+ toString() {
667
+ for (var e = [], t = this._sentinel, n = t._prev; n !== t;) e.push(JSON.stringify(n, ci)), n = n._prev;
668
+ return "[" + e.join(", ") + "]";
669
+ }
670
+ };
671
+ function si(e) {
672
+ e._prev._next = e._next, e._next._prev = e._prev, delete e._next, delete e._prev;
673
+ }
674
+ function ci(e, t) {
675
+ if (e !== "_next" && e !== "_prev") return t;
676
+ }
677
+ //#endregion
678
+ //#region node_modules/.pnpm/dagre-d3-es@7.0.14/node_modules/dagre-d3-es/src/dagre/greedy-fas.js
679
+ var li = ne(1);
680
+ function ui(e, t) {
681
+ if (e.nodeCount() <= 1) return [];
682
+ var n = pi(e, t || li);
683
+ return z(U(di(n.graph, n.buckets, n.zeroIdx), function(t) {
684
+ return e.outEdges(t.v, t.w);
685
+ }));
686
+ }
687
+ function di(e, t, n) {
688
+ for (var r = [], i = t[t.length - 1], a = t[0], o; e.nodeCount();) {
689
+ for (; o = a.dequeue();) fi(e, t, n, o);
690
+ for (; o = i.dequeue();) fi(e, t, n, o);
691
+ if (e.nodeCount()) {
692
+ for (var s = t.length - 2; s > 0; --s) if (o = t[s].dequeue(), o) {
693
+ r = r.concat(fi(e, t, n, o, !0));
694
+ break;
695
+ }
696
+ }
697
+ }
698
+ return r;
699
+ }
700
+ function fi(e, t, n, r, i) {
701
+ var a = i ? [] : void 0;
702
+ return O(e.inEdges(r.v), function(r) {
703
+ var o = e.edge(r), s = e.node(r.v);
704
+ i && a.push({
705
+ v: r.v,
706
+ w: r.w
707
+ }), s.out -= o, mi(t, n, s);
708
+ }), O(e.outEdges(r.v), function(r) {
709
+ var i = e.edge(r), a = r.w, o = e.node(a);
710
+ o.in -= i, mi(t, n, o);
711
+ }), e.removeNode(r.v), a;
712
+ }
713
+ function pi(e, t) {
714
+ var n = new A(), r = 0, i = 0;
715
+ O(e.nodes(), function(e) {
716
+ n.setNode(e, {
717
+ v: e,
718
+ in: 0,
719
+ out: 0
720
+ });
721
+ }), O(e.edges(), function(e) {
722
+ var a = n.edge(e.v, e.w) || 0, o = t(e), s = a + o;
723
+ n.setEdge(e.v, e.w, s), i = Math.max(i, n.node(e.v).out += o), r = Math.max(r, n.node(e.w).in += o);
724
+ });
725
+ var a = J(i + r + 3).map(function() {
726
+ return new oi();
727
+ }), o = r + 1;
728
+ return O(n.nodes(), function(e) {
729
+ mi(a, o, n.node(e));
730
+ }), {
731
+ graph: n,
732
+ buckets: a,
733
+ zeroIdx: o
734
+ };
735
+ }
736
+ function mi(e, t, n) {
737
+ n.out ? n.in ? e[n.out - n.in + t].enqueue(n) : e[e.length - 1].enqueue(n) : e[0].enqueue(n);
738
+ }
739
+ //#endregion
740
+ //#region node_modules/.pnpm/dagre-d3-es@7.0.14/node_modules/dagre-d3-es/src/dagre/acyclic.js
741
+ function hi(e) {
742
+ var t = e.graph().acyclicer === "greedy" ? ui(e, n(e)) : gi(e);
743
+ O(t, function(t) {
744
+ var n = e.edge(t);
745
+ e.removeEdge(t), n.forwardName = t.name, n.reversed = !0, e.setEdge(t.w, t.v, n, ri("rev"));
746
+ });
747
+ function n(e) {
748
+ return function(t) {
749
+ return e.edge(t).weight;
750
+ };
751
+ }
752
+ }
753
+ function gi(e) {
754
+ var t = [], n = {}, r = {};
755
+ function i(a) {
756
+ Object.prototype.hasOwnProperty.call(r, a) || (r[a] = !0, n[a] = !0, O(e.outEdges(a), function(e) {
757
+ Object.prototype.hasOwnProperty.call(n, e.w) ? t.push(e) : i(e.w);
758
+ }), delete n[a]);
759
+ }
760
+ return O(e.nodes(), i), t;
761
+ }
762
+ function _i(e) {
763
+ O(e.edges(), function(t) {
764
+ var n = e.edge(t);
765
+ if (n.reversed) {
766
+ e.removeEdge(t);
767
+ var r = n.forwardName;
768
+ delete n.reversed, delete n.forwardName, e.setEdge(t.w, t.v, n, r);
769
+ }
770
+ });
771
+ }
772
+ //#endregion
773
+ //#region node_modules/.pnpm/dagre-d3-es@7.0.14/node_modules/dagre-d3-es/src/dagre/util.js
774
+ function X(e, t, n, r) {
775
+ var i;
776
+ do
777
+ i = ri(r);
778
+ while (e.hasNode(i));
779
+ return n.dummy = t, e.setNode(i, n), i;
780
+ }
781
+ function vi(e) {
782
+ var t = new A().setGraph(e.graph());
783
+ return O(e.nodes(), function(n) {
784
+ t.setNode(n, e.node(n));
785
+ }), O(e.edges(), function(n) {
786
+ var r = t.edge(n.v, n.w) || {
787
+ weight: 0,
788
+ minlen: 1
789
+ }, i = e.edge(n);
790
+ t.setEdge(n.v, n.w, {
791
+ weight: r.weight + i.weight,
792
+ minlen: Math.max(r.minlen, i.minlen)
793
+ });
794
+ }), t;
795
+ }
796
+ function yi(e) {
797
+ var t = new A({ multigraph: e.isMultigraph() }).setGraph(e.graph());
798
+ return O(e.nodes(), function(n) {
799
+ e.children(n).length || t.setNode(n, e.node(n));
800
+ }), O(e.edges(), function(n) {
801
+ t.setEdge(n, e.edge(n));
802
+ }), t;
803
+ }
804
+ function bi(e, t) {
805
+ var n = e.x, r = e.y, i = t.x - n, a = t.y - r, o = e.width / 2, s = e.height / 2;
806
+ if (!i && !a) throw Error("Not possible to find intersection inside of the rectangle");
807
+ var c, l;
808
+ return Math.abs(a) * o > Math.abs(i) * s ? (a < 0 && (s = -s), c = s * i / a, l = s) : (i < 0 && (o = -o), c = o, l = o * a / i), {
809
+ x: n + c,
810
+ y: r + l
811
+ };
812
+ }
813
+ function Z(e) {
814
+ var t = U(J(wi(e) + 1), function() {
815
+ return [];
816
+ });
817
+ return O(e.nodes(), function(n) {
818
+ var r = e.node(n), i = r.rank;
819
+ k(i) || (t[i][r.order] = n);
820
+ }), t;
821
+ }
822
+ function xi(e) {
823
+ var t = K(U(e.nodes(), function(t) {
824
+ return e.node(t).rank;
825
+ }));
826
+ O(e.nodes(), function(n) {
827
+ var r = e.node(n);
828
+ hr(r, "rank") && (r.rank -= t);
829
+ });
830
+ }
831
+ function Si(e) {
832
+ var t = K(U(e.nodes(), function(t) {
833
+ return e.node(t).rank;
834
+ })), n = [];
835
+ O(e.nodes(), function(r) {
836
+ var i = e.node(r).rank - t;
837
+ n[i] || (n[i] = []), n[i].push(r);
838
+ });
839
+ var r = 0, i = e.graph().nodeRankFactor;
840
+ O(n, function(t, n) {
841
+ k(t) && n % i !== 0 ? --r : r && O(t, function(t) {
842
+ e.node(t).rank += r;
843
+ });
844
+ });
845
+ }
846
+ function Ci(e, t, n, r) {
847
+ var i = {
848
+ width: 0,
849
+ height: 0
850
+ };
851
+ return arguments.length >= 4 && (i.rank = n, i.order = r), X(e, "border", i, t);
852
+ }
853
+ function wi(e) {
854
+ return G(U(e.nodes(), function(t) {
855
+ var n = e.node(t).rank;
856
+ if (!k(n)) return n;
857
+ }));
858
+ }
859
+ function Ti(e, t) {
860
+ var n = {
861
+ lhs: [],
862
+ rhs: []
863
+ };
864
+ return O(e, function(e) {
865
+ t(e) ? n.lhs.push(e) : n.rhs.push(e);
866
+ }), n;
867
+ }
868
+ function Ei(e, t) {
869
+ var n = Xn();
870
+ try {
871
+ return t();
872
+ } finally {
873
+ console.log(e + " time: " + (Xn() - n) + "ms");
874
+ }
875
+ }
876
+ function Di(e, t) {
877
+ return t();
878
+ }
879
+ //#endregion
880
+ //#region node_modules/.pnpm/dagre-d3-es@7.0.14/node_modules/dagre-d3-es/src/dagre/add-border-segments.js
881
+ function Oi(e) {
882
+ function t(n) {
883
+ var r = e.children(n), i = e.node(n);
884
+ if (r.length && O(r, t), Object.prototype.hasOwnProperty.call(i, "minRank")) {
885
+ i.borderLeft = [], i.borderRight = [];
886
+ for (var a = i.minRank, o = i.maxRank + 1; a < o; ++a) ki(e, "borderLeft", "_bl", n, i, a), ki(e, "borderRight", "_br", n, i, a);
887
+ }
888
+ }
889
+ O(e.children(), t);
890
+ }
891
+ function ki(e, t, n, r, i, a) {
892
+ var o = {
893
+ width: 0,
894
+ height: 0,
895
+ rank: a,
896
+ borderType: t
897
+ }, s = i[t][a - 1], c = X(e, "border", o, n);
898
+ i[t][a] = c, e.setParent(c, r), s && e.setEdge(s, c, { weight: 1 });
899
+ }
900
+ //#endregion
901
+ //#region node_modules/.pnpm/dagre-d3-es@7.0.14/node_modules/dagre-d3-es/src/dagre/coordinate-system.js
902
+ function Ai(e) {
903
+ var t = e.graph().rankdir.toLowerCase();
904
+ (t === "lr" || t === "rl") && Mi(e);
905
+ }
906
+ function ji(e) {
907
+ var t = e.graph().rankdir.toLowerCase();
908
+ (t === "bt" || t === "rl") && Pi(e), (t === "lr" || t === "rl") && (Ii(e), Mi(e));
909
+ }
910
+ function Mi(e) {
911
+ O(e.nodes(), function(t) {
912
+ Ni(e.node(t));
913
+ }), O(e.edges(), function(t) {
914
+ Ni(e.edge(t));
915
+ });
916
+ }
917
+ function Ni(e) {
918
+ var t = e.width;
919
+ e.width = e.height, e.height = t;
920
+ }
921
+ function Pi(e) {
922
+ O(e.nodes(), function(t) {
923
+ Fi(e.node(t));
924
+ }), O(e.edges(), function(t) {
925
+ var n = e.edge(t);
926
+ O(n.points, Fi), Object.prototype.hasOwnProperty.call(n, "y") && Fi(n);
927
+ });
928
+ }
929
+ function Fi(e) {
930
+ e.y = -e.y;
931
+ }
932
+ function Ii(e) {
933
+ O(e.nodes(), function(t) {
934
+ Li(e.node(t));
935
+ }), O(e.edges(), function(t) {
936
+ var n = e.edge(t);
937
+ O(n.points, Li), Object.prototype.hasOwnProperty.call(n, "x") && Li(n);
938
+ });
939
+ }
940
+ function Li(e) {
941
+ var t = e.x;
942
+ e.x = e.y, e.y = t;
943
+ }
944
+ //#endregion
945
+ //#region node_modules/.pnpm/dagre-d3-es@7.0.14/node_modules/dagre-d3-es/src/dagre/normalize.js
946
+ function Ri(e) {
947
+ e.graph().dummyChains = [], O(e.edges(), function(t) {
948
+ zi(e, t);
949
+ });
950
+ }
951
+ function zi(e, t) {
952
+ var n = t.v, r = e.node(n).rank, i = t.w, a = e.node(i).rank, o = t.name, s = e.edge(t), c = s.labelRank;
953
+ if (a !== r + 1) {
954
+ e.removeEdge(t);
955
+ var l = void 0, u, d = 0;
956
+ for (++r; r < a; ++d, ++r) s.points = [], l = {
957
+ width: 0,
958
+ height: 0,
959
+ edgeLabel: s,
960
+ edgeObj: t,
961
+ rank: r
962
+ }, u = X(e, "edge", l, "_d"), r === c && (l.width = s.width, l.height = s.height, l.dummy = "edge-label", l.labelpos = s.labelpos), e.setEdge(n, u, { weight: s.weight }, o), d === 0 && e.graph().dummyChains.push(u), n = u;
963
+ e.setEdge(n, i, { weight: s.weight }, o);
964
+ }
965
+ }
966
+ function Bi(e) {
967
+ O(e.graph().dummyChains, function(t) {
968
+ var n = e.node(t), r = n.edgeLabel, i;
969
+ for (e.setEdge(n.edgeObj, r); n.dummy;) i = e.successors(t)[0], e.removeNode(t), r.points.push({
970
+ x: n.x,
971
+ y: n.y
972
+ }), n.dummy === "edge-label" && (r.x = n.x, r.y = n.y, r.width = n.width, r.height = n.height), t = i, n = e.node(t);
973
+ });
974
+ }
975
+ //#endregion
976
+ //#region node_modules/.pnpm/dagre-d3-es@7.0.14/node_modules/dagre-d3-es/src/dagre/rank/util.js
977
+ function Vi(e) {
978
+ var t = {};
979
+ function n(r) {
980
+ var i = e.node(r);
981
+ if (Object.prototype.hasOwnProperty.call(t, r)) return i.rank;
982
+ t[r] = !0;
983
+ var a = K(U(e.outEdges(r), function(t) {
984
+ return n(t.w) - e.edge(t).minlen;
985
+ }));
986
+ return (a === Infinity || a == null) && (a = 0), i.rank = a;
987
+ }
988
+ O(e.sources(), n);
989
+ }
990
+ function Q(e, t) {
991
+ return e.node(t.w).rank - e.node(t.v).rank - e.edge(t).minlen;
992
+ }
993
+ //#endregion
994
+ //#region node_modules/.pnpm/dagre-d3-es@7.0.14/node_modules/dagre-d3-es/src/dagre/rank/feasible-tree.js
995
+ function Hi(e) {
996
+ var t = new A({ directed: !1 }), n = e.nodes()[0], r = e.nodeCount();
997
+ t.setNode(n, {});
998
+ for (var i, a; Ui(t, e) < r;) i = Wi(t, e), a = t.hasNode(i.v) ? Q(e, i) : -Q(e, i), Gi(t, e, a);
999
+ return t;
1000
+ }
1001
+ function Ui(e, t) {
1002
+ function n(r) {
1003
+ O(t.nodeEdges(r), function(i) {
1004
+ var a = i.v, o = r === a ? i.w : a;
1005
+ !e.hasNode(o) && !Q(t, i) && (e.setNode(o, {}), e.setEdge(r, o, {}), n(o));
1006
+ });
1007
+ }
1008
+ return O(e.nodes(), n), e.nodeCount();
1009
+ }
1010
+ function Wi(e, t) {
1011
+ return xr(t.edges(), function(n) {
1012
+ if (e.hasNode(n.v) !== e.hasNode(n.w)) return Q(t, n);
1013
+ });
1014
+ }
1015
+ function Gi(e, t, n) {
1016
+ O(e.nodes(), function(e) {
1017
+ t.node(e).rank += n;
1018
+ });
1019
+ }
1020
+ //#endregion
1021
+ //#region node_modules/.pnpm/dagre-d3-es@7.0.14/node_modules/dagre-d3-es/src/graphlib/alg/topsort.js
1022
+ ne(1), ne(1), Ki.CycleException = qi;
1023
+ function Ki(e) {
1024
+ var t = {}, n = {}, r = [];
1025
+ function i(a) {
1026
+ if (Object.prototype.hasOwnProperty.call(n, a)) throw new qi();
1027
+ Object.prototype.hasOwnProperty.call(t, a) || (n[a] = !0, t[a] = !0, O(e.predecessors(a), i), delete n[a], r.push(a));
1028
+ }
1029
+ if (O(e.sinks(), i), ti(t) !== e.nodeCount()) throw new qi();
1030
+ return r;
1031
+ }
1032
+ function qi() {}
1033
+ qi.prototype = /* @__PURE__ */ Error();
1034
+ //#endregion
1035
+ //#region node_modules/.pnpm/dagre-d3-es@7.0.14/node_modules/dagre-d3-es/src/graphlib/alg/dfs.js
1036
+ function Ji(e, t, n) {
1037
+ b(t) || (t = [t]);
1038
+ var r = (e.isDirected() ? e.successors : e.neighbors).bind(e), i = [], a = {};
1039
+ return O(t, function(t) {
1040
+ if (!e.hasNode(t)) throw Error("Graph does not have node: " + t);
1041
+ Yi(e, t, n === "post", a, r, i);
1042
+ }), i;
1043
+ }
1044
+ function Yi(e, t, n, r, i, a) {
1045
+ Object.prototype.hasOwnProperty.call(r, t) || (r[t] = !0, n || a.push(t), O(i(t), function(t) {
1046
+ Yi(e, t, n, r, i, a);
1047
+ }), n && a.push(t));
1048
+ }
1049
+ //#endregion
1050
+ //#region node_modules/.pnpm/dagre-d3-es@7.0.14/node_modules/dagre-d3-es/src/graphlib/alg/postorder.js
1051
+ function Xi(e, t) {
1052
+ return Ji(e, t, "post");
1053
+ }
1054
+ //#endregion
1055
+ //#region node_modules/.pnpm/dagre-d3-es@7.0.14/node_modules/dagre-d3-es/src/graphlib/alg/preorder.js
1056
+ function Zi(e, t) {
1057
+ return Ji(e, t, "pre");
1058
+ }
1059
+ $.initLowLimValues = ta, $.initCutValues = Qi, $.calcCutValue = ea, $.leaveEdge = ra, $.enterEdge = ia, $.exchangeEdges = aa;
1060
+ function $(e) {
1061
+ e = vi(e), Vi(e);
1062
+ var t = Hi(e);
1063
+ ta(t), Qi(t, e);
1064
+ for (var n, r; n = ra(t);) r = ia(t, e, n), aa(t, e, n, r);
1065
+ }
1066
+ function Qi(e, t) {
1067
+ var n = Xi(e, e.nodes());
1068
+ n = n.slice(0, n.length - 1), O(n, function(n) {
1069
+ $i(e, t, n);
1070
+ });
1071
+ }
1072
+ function $i(e, t, n) {
1073
+ var r = e.node(n).parent;
1074
+ e.edge(n, r).cutvalue = ea(e, t, n);
1075
+ }
1076
+ function ea(e, t, n) {
1077
+ var r = e.node(n).parent, i = !0, a = t.edge(n, r), o = 0;
1078
+ return a ||= (i = !1, t.edge(r, n)), o = a.weight, O(t.nodeEdges(n), function(a) {
1079
+ var s = a.v === n, c = s ? a.w : a.v;
1080
+ if (c !== r) {
1081
+ var l = s === i, u = t.edge(a).weight;
1082
+ if (o += l ? u : -u, sa(e, n, c)) {
1083
+ var d = e.edge(n, c).cutvalue;
1084
+ o += l ? -d : d;
1085
+ }
1086
+ }
1087
+ }), o;
1088
+ }
1089
+ function ta(e, t) {
1090
+ arguments.length < 2 && (t = e.nodes()[0]), na(e, {}, 1, t);
1091
+ }
1092
+ function na(e, t, n, r, i) {
1093
+ var a = n, o = e.node(r);
1094
+ return t[r] = !0, O(e.neighbors(r), function(i) {
1095
+ Object.prototype.hasOwnProperty.call(t, i) || (n = na(e, t, n, i, r));
1096
+ }), o.low = a, o.lim = n++, i ? o.parent = i : delete o.parent, n;
1097
+ }
1098
+ function ra(e) {
1099
+ return cr(e.edges(), function(t) {
1100
+ return e.edge(t).cutvalue < 0;
1101
+ });
1102
+ }
1103
+ function ia(e, t, n) {
1104
+ var r = n.v, i = n.w;
1105
+ t.hasEdge(r, i) || (r = n.w, i = n.v);
1106
+ var a = e.node(r), o = e.node(i), s = a, c = !1;
1107
+ return a.lim > o.lim && (s = o, c = !0), xr(C(t.edges(), function(t) {
1108
+ return c === ca(e, e.node(t.v), s) && c !== ca(e, e.node(t.w), s);
1109
+ }), function(e) {
1110
+ return Q(t, e);
1111
+ });
1112
+ }
1113
+ function aa(e, t, n, r) {
1114
+ var i = n.v, a = n.w;
1115
+ e.removeEdge(i, a), e.setEdge(r.v, r.w, {}), ta(e), Qi(e, t), oa(e, t);
1116
+ }
1117
+ function oa(e, t) {
1118
+ var n = Zi(e, cr(e.nodes(), function(e) {
1119
+ return !t.node(e).parent;
1120
+ }));
1121
+ n = n.slice(1), O(n, function(n) {
1122
+ var r = e.node(n).parent, i = t.edge(n, r), a = !1;
1123
+ i || (i = t.edge(r, n), a = !0), t.node(n).rank = t.node(r).rank + (a ? i.minlen : -i.minlen);
1124
+ });
1125
+ }
1126
+ function sa(e, t, n) {
1127
+ return e.hasEdge(t, n);
1128
+ }
1129
+ function ca(e, t, n) {
1130
+ return n.low <= t.lim && t.lim <= n.lim;
1131
+ }
1132
+ //#endregion
1133
+ //#region node_modules/.pnpm/dagre-d3-es@7.0.14/node_modules/dagre-d3-es/src/dagre/rank/index.js
1134
+ function la(e) {
1135
+ switch (e.graph().ranker) {
1136
+ case "network-simplex":
1137
+ fa(e);
1138
+ break;
1139
+ case "tight-tree":
1140
+ da(e);
1141
+ break;
1142
+ case "longest-path":
1143
+ ua(e);
1144
+ break;
1145
+ default: fa(e);
1146
+ }
1147
+ }
1148
+ var ua = Vi;
1149
+ function da(e) {
1150
+ Vi(e), Hi(e);
1151
+ }
1152
+ function fa(e) {
1153
+ $(e);
1154
+ }
1155
+ //#endregion
1156
+ //#region node_modules/.pnpm/dagre-d3-es@7.0.14/node_modules/dagre-d3-es/src/dagre/nesting-graph.js
1157
+ function pa(e) {
1158
+ var t = X(e, "root", {}, "_root"), n = ha(e), r = G(E(n)) - 1, i = 2 * r + 1;
1159
+ e.graph().nestingRoot = t, O(e.edges(), function(t) {
1160
+ e.edge(t).minlen *= i;
1161
+ });
1162
+ var a = ga(e) + 1;
1163
+ O(e.children(), function(o) {
1164
+ ma(e, t, i, a, r, n, o);
1165
+ }), e.graph().nodeRankFactor = i;
1166
+ }
1167
+ function ma(e, t, n, r, i, a, o) {
1168
+ var s = e.children(o);
1169
+ if (!s.length) o !== t && e.setEdge(t, o, {
1170
+ weight: 0,
1171
+ minlen: n
1172
+ });
1173
+ else {
1174
+ var c = Ci(e, "_bt"), l = Ci(e, "_bb"), u = e.node(o);
1175
+ e.setParent(c, o), u.borderTop = c, e.setParent(l, o), u.borderBottom = l, O(s, function(s) {
1176
+ ma(e, t, n, r, i, a, s);
1177
+ var u = e.node(s), d = u.borderTop ? u.borderTop : s, f = u.borderBottom ? u.borderBottom : s, p = u.borderTop ? r : 2 * r, m = d === f ? i - a[o] + 1 : 1;
1178
+ e.setEdge(c, d, {
1179
+ weight: p,
1180
+ minlen: m,
1181
+ nestingEdge: !0
1182
+ }), e.setEdge(f, l, {
1183
+ weight: p,
1184
+ minlen: m,
1185
+ nestingEdge: !0
1186
+ });
1187
+ }), e.parent(o) || e.setEdge(t, c, {
1188
+ weight: 0,
1189
+ minlen: i + a[o]
1190
+ });
1191
+ }
1192
+ }
1193
+ function ha(e) {
1194
+ var t = {};
1195
+ function n(r, i) {
1196
+ var a = e.children(r);
1197
+ a && a.length && O(a, function(e) {
1198
+ n(e, i + 1);
1199
+ }), t[r] = i;
1200
+ }
1201
+ return O(e.children(), function(e) {
1202
+ n(e, 1);
1203
+ }), t;
1204
+ }
1205
+ function ga(e) {
1206
+ return D(e.edges(), function(t, n) {
1207
+ return t + e.edge(n).weight;
1208
+ }, 0);
1209
+ }
1210
+ function _a(e) {
1211
+ var t = e.graph();
1212
+ e.removeNode(t.nestingRoot), delete t.nestingRoot, O(e.edges(), function(t) {
1213
+ e.edge(t).nestingEdge && e.removeEdge(t);
1214
+ });
1215
+ }
1216
+ //#endregion
1217
+ //#region node_modules/.pnpm/dagre-d3-es@7.0.14/node_modules/dagre-d3-es/src/dagre/order/add-subgraph-constraints.js
1218
+ function va(e, t, n) {
1219
+ var r = {}, i;
1220
+ O(n, function(n) {
1221
+ for (var a = e.parent(n), o, s; a;) {
1222
+ if (o = e.parent(a), o ? (s = r[o], r[o] = a) : (s = i, i = a), s && s !== a) {
1223
+ t.setEdge(s, a);
1224
+ return;
1225
+ }
1226
+ a = o;
1227
+ }
1228
+ });
1229
+ }
1230
+ //#endregion
1231
+ //#region node_modules/.pnpm/dagre-d3-es@7.0.14/node_modules/dagre-d3-es/src/dagre/order/build-layer-graph.js
1232
+ function ya(e, t, n) {
1233
+ var r = ba(e), i = new A({ compound: !0 }).setGraph({ root: r }).setDefaultNodeLabel(function(t) {
1234
+ return e.node(t);
1235
+ });
1236
+ return O(e.nodes(), function(a) {
1237
+ var o = e.node(a), s = e.parent(a);
1238
+ (o.rank === t || o.minRank <= t && t <= o.maxRank) && (i.setNode(a), i.setParent(a, s || r), O(e[n](a), function(t) {
1239
+ var n = t.v === a ? t.w : t.v, r = i.edge(n, a), o = k(r) ? 0 : r.weight;
1240
+ i.setEdge(n, a, { weight: e.edge(t).weight + o });
1241
+ }), Object.prototype.hasOwnProperty.call(o, "minRank") && i.setNode(a, {
1242
+ borderLeft: o.borderLeft[t],
1243
+ borderRight: o.borderRight[t]
1244
+ }));
1245
+ }), i;
1246
+ }
1247
+ function ba(e) {
1248
+ for (var t; e.hasNode(t = ri("_root")););
1249
+ return t;
1250
+ }
1251
+ //#endregion
1252
+ //#region node_modules/.pnpm/dagre-d3-es@7.0.14/node_modules/dagre-d3-es/src/dagre/order/cross-count.js
1253
+ function xa(e, t) {
1254
+ for (var n = 0, r = 1; r < t.length; ++r) n += Sa(e, t[r - 1], t[r]);
1255
+ return n;
1256
+ }
1257
+ function Sa(e, t, n) {
1258
+ for (var r = ai(n, U(n, function(e, t) {
1259
+ return t;
1260
+ })), i = z(U(t, function(t) {
1261
+ return Y(U(e.outEdges(t), function(t) {
1262
+ return {
1263
+ pos: r[t.w],
1264
+ weight: e.edge(t).weight
1265
+ };
1266
+ }), "pos");
1267
+ })), a = 1; a < n.length;) a <<= 1;
1268
+ var o = 2 * a - 1;
1269
+ --a;
1270
+ var s = U(Array(o), function() {
1271
+ return 0;
1272
+ }), c = 0;
1273
+ return O(i.forEach(function(e) {
1274
+ var t = e.pos + a;
1275
+ s[t] += e.weight;
1276
+ for (var n = 0; t > 0;) t % 2 && (n += s[t + 1]), t = t - 1 >> 1, s[t] += e.weight;
1277
+ c += e.weight * n;
1278
+ })), c;
1279
+ }
1280
+ //#endregion
1281
+ //#region node_modules/.pnpm/dagre-d3-es@7.0.14/node_modules/dagre-d3-es/src/dagre/order/init-order.js
1282
+ function Ca(e) {
1283
+ var t = {}, n = C(e.nodes(), function(t) {
1284
+ return !e.children(t).length;
1285
+ }), r = U(J(G(U(n, function(t) {
1286
+ return e.node(t).rank;
1287
+ })) + 1), function() {
1288
+ return [];
1289
+ });
1290
+ function i(n) {
1291
+ hr(t, n) || (t[n] = !0, r[e.node(n).rank].push(n), O(e.successors(n), i));
1292
+ }
1293
+ var a = Y(n, function(t) {
1294
+ return e.node(t).rank;
1295
+ });
1296
+ return O(a, i), r;
1297
+ }
1298
+ //#endregion
1299
+ //#region node_modules/.pnpm/dagre-d3-es@7.0.14/node_modules/dagre-d3-es/src/dagre/order/barycenter.js
1300
+ function wa(e, t) {
1301
+ return U(t, function(t) {
1302
+ var n = e.inEdges(t);
1303
+ if (n.length) {
1304
+ var r = D(n, function(t, n) {
1305
+ var r = e.edge(n), i = e.node(n.v);
1306
+ return {
1307
+ sum: t.sum + r.weight * i.order,
1308
+ weight: t.weight + r.weight
1309
+ };
1310
+ }, {
1311
+ sum: 0,
1312
+ weight: 0
1313
+ });
1314
+ return {
1315
+ v: t,
1316
+ barycenter: r.sum / r.weight,
1317
+ weight: r.weight
1318
+ };
1319
+ }
1320
+ return { v: t };
1321
+ });
1322
+ }
1323
+ //#endregion
1324
+ //#region node_modules/.pnpm/dagre-d3-es@7.0.14/node_modules/dagre-d3-es/src/dagre/order/resolve-conflicts.js
1325
+ function Ta(e, t) {
1326
+ var n = {};
1327
+ return O(e, function(e, t) {
1328
+ var r = n[e.v] = {
1329
+ indegree: 0,
1330
+ in: [],
1331
+ out: [],
1332
+ vs: [e.v],
1333
+ i: t
1334
+ };
1335
+ k(e.barycenter) || (r.barycenter = e.barycenter, r.weight = e.weight);
1336
+ }), O(t.edges(), function(e) {
1337
+ var t = n[e.v], r = n[e.w];
1338
+ !k(t) && !k(r) && (r.indegree++, t.out.push(n[e.w]));
1339
+ }), Ea(C(n, function(e) {
1340
+ return !e.indegree;
1341
+ }));
1342
+ }
1343
+ function Ea(e) {
1344
+ var t = [];
1345
+ function n(e) {
1346
+ return function(t) {
1347
+ t.merged || (k(t.barycenter) || k(e.barycenter) || t.barycenter >= e.barycenter) && Da(e, t);
1348
+ };
1349
+ }
1350
+ function r(t) {
1351
+ return function(n) {
1352
+ n.in.push(t), --n.indegree === 0 && e.push(n);
1353
+ };
1354
+ }
1355
+ for (; e.length;) {
1356
+ var i = e.pop();
1357
+ t.push(i), O(i.in.reverse(), n(i)), O(i.out, r(i));
1358
+ }
1359
+ return U(C(t, function(e) {
1360
+ return !e.merged;
1361
+ }), function(e) {
1362
+ return q(e, [
1363
+ "vs",
1364
+ "i",
1365
+ "barycenter",
1366
+ "weight"
1367
+ ]);
1368
+ });
1369
+ }
1370
+ function Da(e, t) {
1371
+ var n = 0, r = 0;
1372
+ e.weight && (n += e.barycenter * e.weight, r += e.weight), t.weight && (n += t.barycenter * t.weight, r += t.weight), e.vs = t.vs.concat(e.vs), e.barycenter = n / r, e.weight = r, e.i = Math.min(t.i, e.i), t.merged = !0;
1373
+ }
1374
+ //#endregion
1375
+ //#region node_modules/.pnpm/dagre-d3-es@7.0.14/node_modules/dagre-d3-es/src/dagre/order/sort.js
1376
+ function Oa(e, t) {
1377
+ var n = Ti(e, function(e) {
1378
+ return Object.prototype.hasOwnProperty.call(e, "barycenter");
1379
+ }), r = n.lhs, i = Y(n.rhs, function(e) {
1380
+ return -e.i;
1381
+ }), a = [], o = 0, s = 0, c = 0;
1382
+ r.sort(Aa(!!t)), c = ka(a, i, c), O(r, function(e) {
1383
+ c += e.vs.length, a.push(e.vs), o += e.barycenter * e.weight, s += e.weight, c = ka(a, i, c);
1384
+ });
1385
+ var l = { vs: z(a) };
1386
+ return s && (l.barycenter = o / s, l.weight = s), l;
1387
+ }
1388
+ function ka(e, t, n) {
1389
+ for (var r; t.length && (r = H(t)).i <= n;) t.pop(), e.push(r.vs), n++;
1390
+ return n;
1391
+ }
1392
+ function Aa(e) {
1393
+ return function(t, n) {
1394
+ return t.barycenter < n.barycenter ? -1 : t.barycenter > n.barycenter ? 1 : e ? n.i - t.i : t.i - n.i;
1395
+ };
1396
+ }
1397
+ //#endregion
1398
+ //#region node_modules/.pnpm/dagre-d3-es@7.0.14/node_modules/dagre-d3-es/src/dagre/order/sort-subgraph.js
1399
+ function ja(e, t, n, r) {
1400
+ var i = e.children(t), a = e.node(t), o = a ? a.borderLeft : void 0, s = a ? a.borderRight : void 0, c = {};
1401
+ o && (i = C(i, function(e) {
1402
+ return e !== o && e !== s;
1403
+ }));
1404
+ var l = wa(e, i);
1405
+ O(l, function(t) {
1406
+ if (e.children(t.v).length) {
1407
+ var i = ja(e, t.v, n, r);
1408
+ c[t.v] = i, Object.prototype.hasOwnProperty.call(i, "barycenter") && Na(t, i);
1409
+ }
1410
+ });
1411
+ var u = Ta(l, n);
1412
+ Ma(u, c);
1413
+ var d = Oa(u, r);
1414
+ if (o && (d.vs = z([
1415
+ o,
1416
+ d.vs,
1417
+ s
1418
+ ]), e.predecessors(o).length)) {
1419
+ var f = e.node(e.predecessors(o)[0]), p = e.node(e.predecessors(s)[0]);
1420
+ Object.prototype.hasOwnProperty.call(d, "barycenter") || (d.barycenter = 0, d.weight = 0), d.barycenter = (d.barycenter * d.weight + f.order + p.order) / (d.weight + 2), d.weight += 2;
1421
+ }
1422
+ return d;
1423
+ }
1424
+ function Ma(e, t) {
1425
+ O(e, function(e) {
1426
+ e.vs = z(e.vs.map(function(e) {
1427
+ return t[e] ? t[e].vs : e;
1428
+ }));
1429
+ });
1430
+ }
1431
+ function Na(e, t) {
1432
+ k(e.barycenter) ? (e.barycenter = t.barycenter, e.weight = t.weight) : (e.barycenter = (e.barycenter * e.weight + t.barycenter * t.weight) / (e.weight + t.weight), e.weight += t.weight);
1433
+ }
1434
+ //#endregion
1435
+ //#region node_modules/.pnpm/dagre-d3-es@7.0.14/node_modules/dagre-d3-es/src/dagre/order/index.js
1436
+ function Pa(e) {
1437
+ var t = wi(e), n = Fa(e, J(1, t + 1), "inEdges"), r = Fa(e, J(t - 1, -1, -1), "outEdges"), i = Ca(e);
1438
+ La(e, i);
1439
+ for (var a = Infinity, o, s = 0, c = 0; c < 4; ++s, ++c) {
1440
+ Ia(s % 2 ? n : r, s % 4 >= 2), i = Z(e);
1441
+ var l = xa(e, i);
1442
+ l < a && (c = 0, o = Yn(i), a = l);
1443
+ }
1444
+ La(e, o);
1445
+ }
1446
+ function Fa(e, t, n) {
1447
+ return U(t, function(t) {
1448
+ return ya(e, t, n);
1449
+ });
1450
+ }
1451
+ function Ia(e, t) {
1452
+ var n = new A();
1453
+ O(e, function(e) {
1454
+ var r = e.graph().root, i = ja(e, r, n, t);
1455
+ O(i.vs, function(t, n) {
1456
+ e.node(t).order = n;
1457
+ }), va(e, n, i.vs);
1458
+ });
1459
+ }
1460
+ function La(e, t) {
1461
+ O(t, function(t) {
1462
+ O(t, function(t, n) {
1463
+ e.node(t).order = n;
1464
+ });
1465
+ });
1466
+ }
1467
+ //#endregion
1468
+ //#region node_modules/.pnpm/dagre-d3-es@7.0.14/node_modules/dagre-d3-es/src/dagre/parent-dummy-chains.js
1469
+ function Ra(e) {
1470
+ var t = Ba(e);
1471
+ O(e.graph().dummyChains, function(n) {
1472
+ for (var r = e.node(n), i = r.edgeObj, a = za(e, t, i.v, i.w), o = a.path, s = a.lca, c = 0, l = o[c], u = !0; n !== i.w;) {
1473
+ if (r = e.node(n), u) {
1474
+ for (; (l = o[c]) !== s && e.node(l).maxRank < r.rank;) c++;
1475
+ l === s && (u = !1);
1476
+ }
1477
+ if (!u) {
1478
+ for (; c < o.length - 1 && e.node(l = o[c + 1]).minRank <= r.rank;) c++;
1479
+ l = o[c];
1480
+ }
1481
+ e.setParent(n, l), n = e.successors(n)[0];
1482
+ }
1483
+ });
1484
+ }
1485
+ function za(e, t, n, r) {
1486
+ var i = [], a = [], o = Math.min(t[n].low, t[r].low), s = Math.max(t[n].lim, t[r].lim), c = n, l;
1487
+ do
1488
+ c = e.parent(c), i.push(c);
1489
+ while (c && (t[c].low > o || s > t[c].lim));
1490
+ for (l = c, c = r; (c = e.parent(c)) !== l;) a.push(c);
1491
+ return {
1492
+ path: i.concat(a.reverse()),
1493
+ lca: l
1494
+ };
1495
+ }
1496
+ function Ba(e) {
1497
+ var t = {}, n = 0;
1498
+ function r(i) {
1499
+ var a = n;
1500
+ O(e.children(i), r), t[i] = {
1501
+ low: a,
1502
+ lim: n++
1503
+ };
1504
+ }
1505
+ return O(e.children(), r), t;
1506
+ }
1507
+ //#endregion
1508
+ //#region node_modules/.pnpm/dagre-d3-es@7.0.14/node_modules/dagre-d3-es/src/dagre/position/bk.js
1509
+ function Va(e, t) {
1510
+ var n = {};
1511
+ function r(t, r) {
1512
+ var i = 0, a = 0, o = t.length, s = H(r);
1513
+ return O(r, function(t, c) {
1514
+ var l = Ua(e, t), u = l ? e.node(l).order : o;
1515
+ (l || t === s) && (O(r.slice(a, c + 1), function(t) {
1516
+ O(e.predecessors(t), function(r) {
1517
+ var a = e.node(r), o = a.order;
1518
+ (o < i || u < o) && !(a.dummy && e.node(t).dummy) && Wa(n, r, t);
1519
+ });
1520
+ }), a = c + 1, i = u);
1521
+ }), r;
1522
+ }
1523
+ return D(t, r), n;
1524
+ }
1525
+ function Ha(e, t) {
1526
+ var n = {};
1527
+ function r(t, r, i, a, o) {
1528
+ var s;
1529
+ O(J(r, i), function(r) {
1530
+ s = t[r], e.node(s).dummy && O(e.predecessors(s), function(t) {
1531
+ var r = e.node(t);
1532
+ r.dummy && (r.order < a || r.order > o) && Wa(n, t, s);
1533
+ });
1534
+ });
1535
+ }
1536
+ function i(t, n) {
1537
+ var i = -1, a, o = 0;
1538
+ return O(n, function(s, c) {
1539
+ if (e.node(s).dummy === "border") {
1540
+ var l = e.predecessors(s);
1541
+ l.length && (a = e.node(l[0]).order, r(n, o, c, i, a), o = c, i = a);
1542
+ }
1543
+ r(n, o, n.length, a, t.length);
1544
+ }), n;
1545
+ }
1546
+ return D(t, i), n;
1547
+ }
1548
+ function Ua(e, t) {
1549
+ if (e.node(t).dummy) return cr(e.predecessors(t), function(t) {
1550
+ return e.node(t).dummy;
1551
+ });
1552
+ }
1553
+ function Wa(e, t, n) {
1554
+ if (t > n) {
1555
+ var r = t;
1556
+ t = n, n = r;
1557
+ }
1558
+ Object.prototype.hasOwnProperty.call(e, t) || Object.defineProperty(e, t, {
1559
+ enumerable: !0,
1560
+ configurable: !0,
1561
+ value: {},
1562
+ writable: !0
1563
+ });
1564
+ var i = e[t];
1565
+ Object.defineProperty(i, n, {
1566
+ enumerable: !0,
1567
+ configurable: !0,
1568
+ value: !0,
1569
+ writable: !0
1570
+ });
1571
+ }
1572
+ function Ga(e, t, n) {
1573
+ if (t > n) {
1574
+ var r = t;
1575
+ t = n, n = r;
1576
+ }
1577
+ return !!e[t] && Object.prototype.hasOwnProperty.call(e[t], n);
1578
+ }
1579
+ function Ka(e, t, n, r) {
1580
+ var i = {}, a = {}, o = {};
1581
+ return O(t, function(e) {
1582
+ O(e, function(e, t) {
1583
+ i[e] = e, a[e] = e, o[e] = t;
1584
+ });
1585
+ }), O(t, function(e) {
1586
+ var t = -1;
1587
+ O(e, function(e) {
1588
+ var s = r(e);
1589
+ if (s.length) {
1590
+ s = Y(s, function(e) {
1591
+ return o[e];
1592
+ });
1593
+ for (var c = (s.length - 1) / 2, l = Math.floor(c), u = Math.ceil(c); l <= u; ++l) {
1594
+ var d = s[l];
1595
+ a[e] === e && t < o[d] && !Ga(n, e, d) && (a[d] = e, a[e] = i[e] = i[d], t = o[d]);
1596
+ }
1597
+ }
1598
+ });
1599
+ }), {
1600
+ root: i,
1601
+ align: a
1602
+ };
1603
+ }
1604
+ function qa(e, t, n, r, i) {
1605
+ var a = {}, o = Ja(e, t, n, i), s = i ? "borderLeft" : "borderRight";
1606
+ function c(e, t) {
1607
+ for (var n = o.nodes(), r = n.pop(), i = {}; r;) i[r] ? e(r) : (i[r] = !0, n.push(r), n = n.concat(t(r))), r = n.pop();
1608
+ }
1609
+ function l(e) {
1610
+ a[e] = o.inEdges(e).reduce(function(e, t) {
1611
+ return Math.max(e, a[t.v] + o.edge(t));
1612
+ }, 0);
1613
+ }
1614
+ function u(t) {
1615
+ var n = o.outEdges(t).reduce(function(e, t) {
1616
+ return Math.min(e, a[t.w] - o.edge(t));
1617
+ }, Infinity), r = e.node(t);
1618
+ n !== Infinity && r.borderType !== s && (a[t] = Math.max(a[t], n));
1619
+ }
1620
+ return c(l, o.predecessors.bind(o)), c(u, o.successors.bind(o)), O(r, function(e) {
1621
+ a[e] = a[n[e]];
1622
+ }), a;
1623
+ }
1624
+ function Ja(e, t, n, r) {
1625
+ var i = new A(), a = e.graph(), o = $a(a.nodesep, a.edgesep, r);
1626
+ return O(t, function(t) {
1627
+ var r;
1628
+ O(t, function(t) {
1629
+ var a = n[t];
1630
+ if (i.setNode(a), r) {
1631
+ var s = n[r], c = i.edge(s, a);
1632
+ i.setEdge(s, a, Math.max(o(e, t, r), c || 0));
1633
+ }
1634
+ r = t;
1635
+ });
1636
+ }), i;
1637
+ }
1638
+ function Ya(e, t) {
1639
+ return xr(E(t), function(t) {
1640
+ var n = -Infinity, r = Infinity;
1641
+ return ur(t, function(t, i) {
1642
+ var a = eo(e, i) / 2;
1643
+ n = Math.max(t + a, n), r = Math.min(t - a, r);
1644
+ }), n - r;
1645
+ });
1646
+ }
1647
+ function Xa(e, t) {
1648
+ var n = E(t), r = K(n), i = G(n);
1649
+ O(["u", "d"], function(n) {
1650
+ O(["l", "r"], function(a) {
1651
+ var o = n + a, s = e[o], c;
1652
+ if (s !== t) {
1653
+ var l = E(s);
1654
+ c = a === "l" ? r - K(l) : i - G(l), c && (e[o] = W(s, function(e) {
1655
+ return e + c;
1656
+ }));
1657
+ }
1658
+ });
1659
+ });
1660
+ }
1661
+ function Za(e, t) {
1662
+ return W(e.ul, function(n, r) {
1663
+ if (t) return e[t.toLowerCase()][r];
1664
+ var i = Y(U(e, r));
1665
+ return (i[1] + i[2]) / 2;
1666
+ });
1667
+ }
1668
+ function Qa(e) {
1669
+ var t = Z(e), n = br(Va(e, t), Ha(e, t)), r = {}, i;
1670
+ return O(["u", "d"], function(a) {
1671
+ i = a === "u" ? t : E(t).reverse(), O(["l", "r"], function(t) {
1672
+ t === "r" && (i = U(i, function(e) {
1673
+ return E(e).reverse();
1674
+ }));
1675
+ var o = (a === "u" ? e.predecessors : e.successors).bind(e), s = Ka(e, i, n, o), c = qa(e, i, s.root, s.align, t === "r");
1676
+ t === "r" && (c = W(c, function(e) {
1677
+ return -e;
1678
+ })), r[a + t] = c;
1679
+ });
1680
+ }), Xa(r, Ya(e, r)), Za(r, e.graph().align);
1681
+ }
1682
+ function $a(e, t, n) {
1683
+ return function(r, i, a) {
1684
+ var o = r.node(i), s = r.node(a), c = 0, l;
1685
+ if (c += o.width / 2, Object.prototype.hasOwnProperty.call(o, "labelpos")) switch (o.labelpos.toLowerCase()) {
1686
+ case "l":
1687
+ l = -o.width / 2;
1688
+ break;
1689
+ case "r": l = o.width / 2;
1690
+ }
1691
+ if (l && (c += n ? l : -l), l = 0, c += (o.dummy ? t : e) / 2, c += (s.dummy ? t : e) / 2, c += s.width / 2, Object.prototype.hasOwnProperty.call(s, "labelpos")) switch (s.labelpos.toLowerCase()) {
1692
+ case "l":
1693
+ l = s.width / 2;
1694
+ break;
1695
+ case "r": l = -s.width / 2;
1696
+ }
1697
+ return l && (c += n ? l : -l), l = 0, c;
1698
+ };
1699
+ }
1700
+ function eo(e, t) {
1701
+ return e.node(t).width;
1702
+ }
1703
+ //#endregion
1704
+ //#region node_modules/.pnpm/dagre-d3-es@7.0.14/node_modules/dagre-d3-es/src/dagre/position/index.js
1705
+ function to(e) {
1706
+ e = yi(e), no(e), dr(Qa(e), function(t, n) {
1707
+ e.node(n).x = t;
1708
+ });
1709
+ }
1710
+ function no(e) {
1711
+ var t = Z(e), n = e.graph().ranksep, r = 0;
1712
+ O(t, function(t) {
1713
+ var i = G(U(t, function(t) {
1714
+ return e.node(t).height;
1715
+ }));
1716
+ O(t, function(t) {
1717
+ e.node(t).y = r + i / 2;
1718
+ }), r += i + n;
1719
+ });
1720
+ }
1721
+ //#endregion
1722
+ //#region node_modules/.pnpm/dagre-d3-es@7.0.14/node_modules/dagre-d3-es/src/dagre/layout.js
1723
+ function ro(e, t) {
1724
+ var n = t && t.debugTiming ? Ei : Di;
1725
+ n("layout", () => {
1726
+ var t = n(" buildLayoutGraph", () => ho(e));
1727
+ n(" runLayout", () => io(t, n)), n(" updateInputGraph", () => ao(e, t));
1728
+ });
1729
+ }
1730
+ function io(e, t) {
1731
+ t(" makeSpaceForEdgeLabels", () => go(e)), t(" removeSelfEdges", () => To(e)), t(" acyclic", () => hi(e)), t(" nestingGraph.run", () => pa(e)), t(" rank", () => la(yi(e))), t(" injectEdgeLabelProxies", () => _o(e)), t(" removeEmptyRanks", () => Si(e)), t(" nestingGraph.cleanup", () => _a(e)), t(" normalizeRanks", () => xi(e)), t(" assignRankMinMax", () => vo(e)), t(" removeEdgeLabelProxies", () => yo(e)), t(" normalize.run", () => Ri(e)), t(" parentDummyChains", () => Ra(e)), t(" addBorderSegments", () => Oi(e)), t(" order", () => Pa(e)), t(" insertSelfEdges", () => Eo(e)), t(" adjustCoordinateSystem", () => Ai(e)), t(" position", () => to(e)), t(" positionSelfEdges", () => Do(e)), t(" removeBorderNodes", () => wo(e)), t(" normalize.undo", () => Bi(e)), t(" fixupEdgeLabelCoords", () => So(e)), t(" undoCoordinateSystem", () => ji(e)), t(" translateGraph", () => bo(e)), t(" assignNodeIntersects", () => xo(e)), t(" reversePoints", () => Co(e)), t(" acyclic.undo", () => _i(e));
1732
+ }
1733
+ function ao(e, t) {
1734
+ O(e.nodes(), function(n) {
1735
+ var r = e.node(n), i = t.node(n);
1736
+ r && (r.x = i.x, r.y = i.y, t.children(n).length && (r.width = i.width, r.height = i.height));
1737
+ }), O(e.edges(), function(n) {
1738
+ var r = e.edge(n), i = t.edge(n);
1739
+ r.points = i.points, Object.prototype.hasOwnProperty.call(i, "x") && (r.x = i.x, r.y = i.y);
1740
+ }), e.graph().width = t.graph().width, e.graph().height = t.graph().height;
1741
+ }
1742
+ var oo = [
1743
+ "nodesep",
1744
+ "edgesep",
1745
+ "ranksep",
1746
+ "marginx",
1747
+ "marginy"
1748
+ ], so = {
1749
+ ranksep: 50,
1750
+ edgesep: 20,
1751
+ nodesep: 50,
1752
+ rankdir: "tb"
1753
+ }, co = [
1754
+ "acyclicer",
1755
+ "ranker",
1756
+ "rankdir",
1757
+ "align"
1758
+ ], lo = ["width", "height"], uo = {
1759
+ width: 0,
1760
+ height: 0
1761
+ }, fo = [
1762
+ "minlen",
1763
+ "weight",
1764
+ "width",
1765
+ "height",
1766
+ "labeloffset"
1767
+ ], po = {
1768
+ minlen: 1,
1769
+ weight: 1,
1770
+ width: 0,
1771
+ height: 0,
1772
+ labeloffset: 10,
1773
+ labelpos: "r"
1774
+ }, mo = ["labelpos"];
1775
+ function ho(e) {
1776
+ var t = new A({
1777
+ multigraph: !0,
1778
+ compound: !0
1779
+ }), n = ko(e.graph());
1780
+ return t.setGraph(br({}, so, Oo(n, oo), q(n, co))), O(e.nodes(), function(n) {
1781
+ var r = ko(e.node(n));
1782
+ t.setNode(n, $n(Oo(r, lo), uo)), t.setParent(n, e.parent(n));
1783
+ }), O(e.edges(), function(n) {
1784
+ var r = ko(e.edge(n));
1785
+ t.setEdge(n, br({}, po, Oo(r, fo), q(r, mo)));
1786
+ }), t;
1787
+ }
1788
+ function go(e) {
1789
+ var t = e.graph();
1790
+ t.ranksep /= 2, O(e.edges(), function(n) {
1791
+ var r = e.edge(n);
1792
+ r.minlen *= 2, r.labelpos.toLowerCase() !== "c" && (t.rankdir === "TB" || t.rankdir === "BT" ? r.width += r.labeloffset : r.height += r.labeloffset);
1793
+ });
1794
+ }
1795
+ function _o(e) {
1796
+ O(e.edges(), function(t) {
1797
+ var n = e.edge(t);
1798
+ if (n.width && n.height) {
1799
+ var r = e.node(t.v);
1800
+ X(e, "edge-proxy", {
1801
+ rank: (e.node(t.w).rank - r.rank) / 2 + r.rank,
1802
+ e: t
1803
+ }, "_ep");
1804
+ }
1805
+ });
1806
+ }
1807
+ function vo(e) {
1808
+ var t = 0;
1809
+ O(e.nodes(), function(n) {
1810
+ var r = e.node(n);
1811
+ r.borderTop && (r.minRank = e.node(r.borderTop).rank, r.maxRank = e.node(r.borderBottom).rank, t = G(t, r.maxRank));
1812
+ }), e.graph().maxRank = t;
1813
+ }
1814
+ function yo(e) {
1815
+ O(e.nodes(), function(t) {
1816
+ var n = e.node(t);
1817
+ n.dummy === "edge-proxy" && (e.edge(n.e).labelRank = n.rank, e.removeNode(t));
1818
+ });
1819
+ }
1820
+ function bo(e) {
1821
+ var t = Infinity, n = 0, r = Infinity, i = 0, a = e.graph(), o = a.marginx || 0, s = a.marginy || 0;
1822
+ function c(e) {
1823
+ var a = e.x, o = e.y, s = e.width, c = e.height;
1824
+ t = Math.min(t, a - s / 2), n = Math.max(n, a + s / 2), r = Math.min(r, o - c / 2), i = Math.max(i, o + c / 2);
1825
+ }
1826
+ O(e.nodes(), function(t) {
1827
+ c(e.node(t));
1828
+ }), O(e.edges(), function(t) {
1829
+ var n = e.edge(t);
1830
+ Object.prototype.hasOwnProperty.call(n, "x") && c(n);
1831
+ }), t -= o, r -= s, O(e.nodes(), function(n) {
1832
+ var i = e.node(n);
1833
+ i.x -= t, i.y -= r;
1834
+ }), O(e.edges(), function(n) {
1835
+ var i = e.edge(n);
1836
+ O(i.points, function(e) {
1837
+ e.x -= t, e.y -= r;
1838
+ }), Object.prototype.hasOwnProperty.call(i, "x") && (i.x -= t), Object.prototype.hasOwnProperty.call(i, "y") && (i.y -= r);
1839
+ }), a.width = n - t + o, a.height = i - r + s;
1840
+ }
1841
+ function xo(e) {
1842
+ O(e.edges(), function(t) {
1843
+ var n = e.edge(t), r = e.node(t.v), i = e.node(t.w), a, o;
1844
+ n.points ? (a = n.points[0], o = n.points[n.points.length - 1]) : (n.points = [], a = i, o = r), n.points.unshift(bi(r, a)), n.points.push(bi(i, o));
1845
+ });
1846
+ }
1847
+ function So(e) {
1848
+ O(e.edges(), function(t) {
1849
+ var n = e.edge(t);
1850
+ if (Object.prototype.hasOwnProperty.call(n, "x")) switch ((n.labelpos === "l" || n.labelpos === "r") && (n.width -= n.labeloffset), n.labelpos) {
1851
+ case "l":
1852
+ n.x -= n.width / 2 + n.labeloffset;
1853
+ break;
1854
+ case "r": n.x += n.width / 2 + n.labeloffset;
1855
+ }
1856
+ });
1857
+ }
1858
+ function Co(e) {
1859
+ O(e.edges(), function(t) {
1860
+ var n = e.edge(t);
1861
+ n.reversed && n.points.reverse();
1862
+ });
1863
+ }
1864
+ function wo(e) {
1865
+ O(e.nodes(), function(t) {
1866
+ if (e.children(t).length) {
1867
+ var n = e.node(t), r = e.node(n.borderTop), i = e.node(n.borderBottom), a = e.node(H(n.borderLeft)), o = e.node(H(n.borderRight));
1868
+ n.width = Math.abs(o.x - a.x), n.height = Math.abs(i.y - r.y), n.x = a.x + n.width / 2, n.y = r.y + n.height / 2;
1869
+ }
1870
+ }), O(e.nodes(), function(t) {
1871
+ e.node(t).dummy === "border" && e.removeNode(t);
1872
+ });
1873
+ }
1874
+ function To(e) {
1875
+ O(e.edges(), function(t) {
1876
+ if (t.v === t.w) {
1877
+ var n = e.node(t.v);
1878
+ n.selfEdges ||= [], n.selfEdges.push({
1879
+ e: t,
1880
+ label: e.edge(t)
1881
+ }), e.removeEdge(t);
1882
+ }
1883
+ });
1884
+ }
1885
+ function Eo(e) {
1886
+ var t = Z(e);
1887
+ O(t, function(t) {
1888
+ var n = 0;
1889
+ O(t, function(t, r) {
1890
+ var i = e.node(t);
1891
+ i.order = r + n, O(i.selfEdges, function(t) {
1892
+ X(e, "selfedge", {
1893
+ width: t.label.width,
1894
+ height: t.label.height,
1895
+ rank: i.rank,
1896
+ order: r + ++n,
1897
+ e: t.e,
1898
+ label: t.label
1899
+ }, "_se");
1900
+ }), delete i.selfEdges;
1901
+ });
1902
+ });
1903
+ }
1904
+ function Do(e) {
1905
+ O(e.nodes(), function(t) {
1906
+ var n = e.node(t);
1907
+ if (n.dummy === "selfedge") {
1908
+ var r = e.node(n.e.v), i = r.x + r.width / 2, a = r.y, o = n.x - i, s = r.height / 2;
1909
+ e.setEdge(n.e, n.label), e.removeNode(t), n.label.points = [
1910
+ {
1911
+ x: i + 2 * o / 3,
1912
+ y: a - s
1913
+ },
1914
+ {
1915
+ x: i + 5 * o / 6,
1916
+ y: a - s
1917
+ },
1918
+ {
1919
+ x: i + o,
1920
+ y: a
1921
+ },
1922
+ {
1923
+ x: i + 5 * o / 6,
1924
+ y: a + s
1925
+ },
1926
+ {
1927
+ x: i + 2 * o / 3,
1928
+ y: a + s
1929
+ }
1930
+ ], n.label.x = n.x, n.label.y = n.y;
1931
+ }
1932
+ });
1933
+ }
1934
+ function Oo(e, t) {
1935
+ return W(q(e, t), Number);
1936
+ }
1937
+ function ko(e) {
1938
+ var t = {};
1939
+ return O(e, function(e, n) {
1940
+ t[n.toLowerCase()] = e;
1941
+ }), t;
1942
+ }
1943
+ //#endregion
1944
+ //#region node_modules/.pnpm/mermaid@12.2.0/node_modules/mermaid/dist/chunks/mermaid.core/dagre-NK4GIZVX.mjs
1945
+ var Ao = /* @__PURE__ */ t((e, t, n) => Math.max(t, Math.min(n, e)), "clamp"), jo = /* @__PURE__ */ t((e = "TB") => {
1946
+ switch (e) {
1947
+ case "BT": return "bottom";
1948
+ case "LR": return "right";
1949
+ case "RL": return "left";
1950
+ default: return "top";
1951
+ }
1952
+ }, "getDefaultSelfLoopSide"), Mo = /* @__PURE__ */ t((e) => e === "flowchart" || e === "flowchart-v2" || e === "stateDiagram" || e === "er" || e === "classDiagram", "shouldMergeSelfLoopSegments"), No = [
1953
+ "x",
1954
+ "y",
1955
+ "width",
1956
+ "height",
1957
+ "labelBBox",
1958
+ "intersect",
1959
+ "calcIntersect",
1960
+ "diff",
1961
+ "clusterNode"
1962
+ ], Po = /* @__PURE__ */ t((e, t, n, r, i) => {
1963
+ let a = [], o = /* @__PURE__ */ new Set();
1964
+ if (n.forEach(({ start: e, end: t }) => {
1965
+ e !== r && o.add(e), t !== r && o.add(t);
1966
+ }), o.forEach((t) => {
1967
+ let n = e.node(t);
1968
+ typeof n?.x == "number" && typeof n?.y == "number" && a.push(n);
1969
+ }), a.length === 0 && n.forEach(({ edge: e }) => {
1970
+ (e.points ?? []).forEach((e) => {
1971
+ typeof e?.x == "number" && typeof e?.y == "number" && a.push(e);
1972
+ });
1973
+ }), a.length === 0) return jo(i);
1974
+ let s = a.reduce((e, t) => ({
1975
+ x: e.x + t.x / a.length,
1976
+ y: e.y + t.y / a.length
1977
+ }), {
1978
+ x: 0,
1979
+ y: 0
1980
+ }), c = s.x - t.x, l = s.y - t.y;
1981
+ return Math.abs(c) > Math.abs(l) ? c > 0 ? "right" : "left" : Math.abs(l) > 0 ? l > 0 ? "bottom" : "top" : jo(i);
1982
+ }, "getSelfLoopSide"), Fo = /* @__PURE__ */ t((e, t = "top", n = 0, r = 0) => {
1983
+ let i = e.x, a = e.y - n, o = e.width / 2, s = e.height / 2, c = Math.max(36, Math.min(100, e.width * .8)), l = Ao(Math.max(r, e.width * .35), 36, c), u = Ao(Math.min(e.width, e.height) * .45, 24, 48);
1984
+ switch (t) {
1985
+ case "bottom": {
1986
+ let e = a + s;
1987
+ return [
1988
+ {
1989
+ x: i - l / 2,
1990
+ y: e
1991
+ },
1992
+ {
1993
+ x: i - l / 2,
1994
+ y: e + u
1995
+ },
1996
+ {
1997
+ x: i + l / 2,
1998
+ y: e + u
1999
+ },
2000
+ {
2001
+ x: i + l / 2,
2002
+ y: e
2003
+ }
2004
+ ];
2005
+ }
2006
+ case "right": {
2007
+ let e = i + o;
2008
+ return [
2009
+ {
2010
+ x: e,
2011
+ y: a - l / 2
2012
+ },
2013
+ {
2014
+ x: e + u,
2015
+ y: a - l / 2
2016
+ },
2017
+ {
2018
+ x: e + u,
2019
+ y: a + l / 2
2020
+ },
2021
+ {
2022
+ x: e,
2023
+ y: a + l / 2
2024
+ }
2025
+ ];
2026
+ }
2027
+ case "left": {
2028
+ let e = i - o;
2029
+ return [
2030
+ {
2031
+ x: e,
2032
+ y: a - l / 2
2033
+ },
2034
+ {
2035
+ x: e - u,
2036
+ y: a - l / 2
2037
+ },
2038
+ {
2039
+ x: e - u,
2040
+ y: a + l / 2
2041
+ },
2042
+ {
2043
+ x: e,
2044
+ y: a + l / 2
2045
+ }
2046
+ ];
2047
+ }
2048
+ default: {
2049
+ let e = a - s;
2050
+ return [
2051
+ {
2052
+ x: i - l / 2,
2053
+ y: e
2054
+ },
2055
+ {
2056
+ x: i - l / 2,
2057
+ y: e - u
2058
+ },
2059
+ {
2060
+ x: i + l / 2,
2061
+ y: e - u
2062
+ },
2063
+ {
2064
+ x: i + l / 2,
2065
+ y: e
2066
+ }
2067
+ ];
2068
+ }
2069
+ }
2070
+ }, "getSelfLoopPoints"), Io = /* @__PURE__ */ t((e, t, n = "top", r = 0, i = {}) => {
2071
+ let a = e.x, o = e.y - r, s = i.width ?? 0, c = i.height ?? 0;
2072
+ switch (n) {
2073
+ case "bottom": return {
2074
+ x: a,
2075
+ y: Math.max(...t.map((e) => e.y)) + c / 2 + 4
2076
+ };
2077
+ case "right": return {
2078
+ x: Math.max(...t.map((e) => e.x)) + s / 2 + 4,
2079
+ y: o
2080
+ };
2081
+ case "left": return {
2082
+ x: Math.min(...t.map((e) => e.x)) - s / 2 - 4,
2083
+ y: o
2084
+ };
2085
+ default: return {
2086
+ x: a,
2087
+ y: Math.min(...t.map((e) => e.y)) - c / 2 - 4
2088
+ };
2089
+ }
2090
+ }, "getSelfLoopLabelPosition"), Lo = /* @__PURE__ */ t((e, t = 0, { mergeSelfLoops: n = !0 } = {}) => {
2091
+ let r = /* @__PURE__ */ new Map(), i = [], a = e.graph()?.rankdir;
2092
+ return e.edges().forEach((t) => {
2093
+ let a = e.edge(t);
2094
+ if (n && a.selfLoop) {
2095
+ let e = a.selfLoop.id;
2096
+ r.has(e) || r.set(e, []), r.get(e).push({
2097
+ edge: a,
2098
+ start: t.v,
2099
+ end: t.w
2100
+ });
2101
+ } else i.push({
2102
+ edge: a,
2103
+ start: t.v,
2104
+ end: t.w
2105
+ });
2106
+ }), r.forEach((n) => {
2107
+ if (n.length !== 3) {
2108
+ n.forEach((e) => i.push(e));
2109
+ return;
2110
+ }
2111
+ n.sort((e, t) => e.edge.selfLoop.order - t.edge.selfLoop.order);
2112
+ let [r, o, s] = n, c = r.edge.originalEdge ?? o.edge.originalEdge ?? s.edge.originalEdge ?? o.edge, l = e.node(c.start);
2113
+ if (!l) {
2114
+ n.forEach((e) => i.push(e));
2115
+ return;
2116
+ }
2117
+ let u = {
2118
+ width: o.edge.width,
2119
+ height: o.edge.height
2120
+ }, d = Po(e, l, n, c.start, a), f = Fo(l, d, t, u.width ?? 0), p = Io(l, f, d, t, u), m = {
2121
+ ...o.edge,
2122
+ ...c,
2123
+ id: c.id,
2124
+ points: f,
2125
+ start: c.start,
2126
+ end: c.end,
2127
+ x: p.x,
2128
+ y: p.y,
2129
+ width: u.width,
2130
+ height: u.height,
2131
+ labelStyle: o.edge.labelStyle,
2132
+ fromCluster: r.edge.fromCluster ?? o.edge.fromCluster ?? s.edge.fromCluster,
2133
+ toCluster: r.edge.toCluster ?? o.edge.toCluster ?? s.edge.toCluster
2134
+ };
2135
+ delete m.selfLoop, delete m.originalEdge, i.push({
2136
+ edge: m,
2137
+ start: m.start,
2138
+ end: m.end
2139
+ });
2140
+ }), i;
2141
+ }, "getEdgesToRender"), Ro = /* @__PURE__ */ t(async ({ element: n, graph: a, diagramType: s, id: l, parentCluster: u, siteConfig: d }) => {
2142
+ let f = a.graph().rankdir;
2143
+ e.trace("Dir in recursive render - dir:", f);
2144
+ let { clusters: p, edgePaths: m, edgeLabels: h, nodes: g, rootGroups: _ } = Le(n, { edgePathsClass: "edgePaths" });
2145
+ a.nodes() ? e.info("Recursive render XXX", a.nodes()) : e.info("No nodes found for", a), a.edges().length > 0 && e.info("Recursive edges", a.edge(a.edges()[0]));
2146
+ let ee = Mo(s);
2147
+ await Promise.all(a.nodes().map(async function(t) {
2148
+ let n = a.node(t);
2149
+ if (u !== void 0) {
2150
+ let n = JSON.parse(JSON.stringify(u.clusterData));
2151
+ e.trace("Setting data for parent cluster XXX\n Node.id = ", t, "\n data=", n.height, "\nParent cluster", u.height), a.setNode(u.id, n), a.parent(t) || (e.trace("Setting parent", t, u.id), a.setParent(t, u.id, n));
2152
+ }
2153
+ if (e.info("(Insert) Node XXX" + t + ": " + JSON.stringify(a.node(t))), n?.clusterNode) {
2154
+ e.info("Cluster identified XBX", t, n.width, a.node(t));
2155
+ let { ranksep: o, nodesep: c } = a.graph();
2156
+ n.graph.setGraph({
2157
+ ...n.graph.graph(),
2158
+ ranksep: o + 25,
2159
+ nodesep: c
2160
+ });
2161
+ let u = await Go({
2162
+ element: g,
2163
+ graph: n.graph,
2164
+ diagramType: s,
2165
+ id: l,
2166
+ parentCluster: a.node(t),
2167
+ siteConfig: d
2168
+ }), f = u.elem;
2169
+ r(n, f), n.diff = u.diff || 0, e.info("New compound node after recursive render XAX", t, "width", n.width, "height", n.height), i(f, n);
2170
+ } else a.children(t).length > 0 ? (e.trace("Cluster - the non recursive path XBX", t, n.id, n, n.width, "Graph:", a), e.trace(Re(n.id, a)), N.set(n.id, {
2171
+ id: Re(n.id, a),
2172
+ node: n
2173
+ })) : (e.trace("Node - the non recursive path XAX", t, g, a.node(t), f), await Be(g, a.node(t), {
2174
+ config: d,
2175
+ dir: f
2176
+ }));
2177
+ })), await (/* @__PURE__ */ t(async () => {
2178
+ let t = a.edges().map(async function(t) {
2179
+ let n = a.edge(t.v, t.w, t.name);
2180
+ if (e.info("Edge " + t.v + " -> " + t.w + ": " + JSON.stringify(t)), e.info("Edge " + t.v + " -> " + t.w + ": ", t, " ", JSON.stringify(a.edge(t))), e.info("Fix", N, "ids:", t.v, t.w, "Translating: ", N.get(t.v), N.get(t.w)), ee && n.selfLoop) {
2181
+ if (n.selfLoop.order !== 1) return;
2182
+ let e = {
2183
+ ...n.originalEdge,
2184
+ ...n,
2185
+ id: n.selfLoop.id,
2186
+ startLabelLeft: n.originalEdge?.startLabelLeft ?? n.startLabelLeft,
2187
+ startLabelRight: n.originalEdge?.startLabelRight ?? n.startLabelRight,
2188
+ endLabelLeft: n.originalEdge?.endLabelLeft ?? n.endLabelLeft,
2189
+ endLabelRight: n.originalEdge?.endLabelRight ?? n.endLabelRight
2190
+ };
2191
+ await c(h, e), n.width = e.width, n.height = e.height, n.labelStyle = e.labelStyle;
2192
+ } else await c(h, n);
2193
+ });
2194
+ await Promise.all(t);
2195
+ }, "processEdges"))();
2196
+ let { subGraphTitleTotalMargin: v } = o(d);
2197
+ return {
2198
+ elem: _,
2199
+ graph: a,
2200
+ groups: {
2201
+ clusters: p,
2202
+ edgePaths: m,
2203
+ edgeLabels: h,
2204
+ nodes: g,
2205
+ rootGroups: _
2206
+ },
2207
+ diagramType: s,
2208
+ id: l,
2209
+ mergeSelfLoops: ee,
2210
+ subGraphTitleTotalMargin: v
2211
+ };
2212
+ }, "measureDagreGraph"), zo = /* @__PURE__ */ t((t) => {
2213
+ e.info("############################################# XXX"), e.info("### Layout ### XXX"), e.info("############################################# XXX"), ro(t);
2214
+ }, "runDagreGraphLayout"), Bo = /* @__PURE__ */ t((e, t, n) => {
2215
+ let r = e.node(t);
2216
+ if (!r) return;
2217
+ let i = { ...r };
2218
+ return r?.clusterNode ? i.y = (r.y ?? 0) + n : e.children(t).length > 0 ? i.height = (r.height ?? 0) + n : i.y = (r.y ?? 0) + n / 2, i;
2219
+ }, "normalizeDagreNode"), Vo = /* @__PURE__ */ t((e, t) => {
2220
+ No.forEach((n) => {
2221
+ t[n] !== void 0 && (e[n] = t[n]);
2222
+ });
2223
+ }, "applyDagreNodeLayout"), Ho = /* @__PURE__ */ t((e, t, n, r) => ({
2224
+ ...e,
2225
+ start: e.start ?? t,
2226
+ end: e.end ?? n,
2227
+ points: (e.points ?? []).map((e) => ({
2228
+ ...e,
2229
+ y: typeof e.y == "number" ? e.y + r : e.y
2230
+ }))
2231
+ }), "normalizeDagreEdge"), Uo = /* @__PURE__ */ t((e, t) => {
2232
+ let { graph: n, mergeSelfLoops: r, subGraphTitleTotalMargin: i = 0 } = t, a = new Map(e.nodes.map((e) => [e.id, e]));
2233
+ Ie(n).forEach((e) => {
2234
+ let t = Bo(n, e, i);
2235
+ if (!t) return;
2236
+ Vo(n.node(e), t);
2237
+ let r = a.get(e);
2238
+ r && Vo(r, t);
2239
+ });
2240
+ let o = i / 2;
2241
+ return e.edges = Lo(n, o, { mergeSelfLoops: r }).map(({ edge: e, start: t, end: n }) => Ho(e, t, n, o)), e;
2242
+ }, "applyDagreLayoutResult"), Wo = /* @__PURE__ */ t(async ({ elem: t, graph: n, groups: { clusters: r, edgePaths: i }, diagramType: o, id: c, mergeSelfLoops: d, subGraphTitleTotalMargin: f }) => {
2243
+ let p = 0;
2244
+ await Promise.all(Ie(n).map(async function(t) {
2245
+ let i = n.node(t);
2246
+ if (e.info("Position XBX => " + t + ": (" + i.x, "," + i.y, ") width: ", i.width, " height: ", i.height), i?.clusterNode) i.y += f, e.info("A tainted cluster node XBX1", t, i.id, i.width, i.height, i.x, i.y, n.parent(t)), N.get(i.id).node = i, a(i);
2247
+ else if (n.children(t).length > 0) {
2248
+ e.info("A pure cluster node XBX1", t, i.id, i.x, i.y, i.width, i.height, n.parent(t)), i.height += f, n.node(i.parentId);
2249
+ let a = i?.padding / 2 || 0, o = i?.labelBBox?.height || 0, c = o - a || 0;
2250
+ e.debug("OffsetY", c, "labelHeight", o, "halfPadding", a), await s(r, i), N.get(i.id).node = i;
2251
+ } else {
2252
+ let t = n.node(i.parentId);
2253
+ i.y += f / 2, e.info("A regular node XBX1 - using the padding", i.id, "parent", i.parentId, i.width, i.height, i.x, i.y, "offsetY", i.offsetY, "parent", t, t?.offsetY, i), a(i);
2254
+ }
2255
+ }));
2256
+ let m = f / 2;
2257
+ return Lo(n, m, { mergeSelfLoops: d }).forEach(function({ edge: t, start: r, end: a }) {
2258
+ e.info("Edge " + r + " -> " + a + ": " + JSON.stringify(t), t), t.points.forEach((e) => e.y += m);
2259
+ let s = n.node(r), d = n.node(a), f = l(i, t, N, o, s, d, c);
2260
+ u(t, f);
2261
+ }), n.nodes().forEach(function(t) {
2262
+ let r = n.node(t);
2263
+ e.info(t, r.type, r.diff), r.isGroup && (p = r.diff);
2264
+ }), e.warn("Returning from recursive render XAX", t, p), {
2265
+ elem: t,
2266
+ diff: p
2267
+ };
2268
+ }, "paintDagreLayoutCore"), Go = /* @__PURE__ */ t(async (e) => {
2269
+ let t = await Ro(e);
2270
+ return zo(t.graph), await Wo(t);
2271
+ }, "renderDagreSubgraph"), Ko = /* @__PURE__ */ t((t) => {
2272
+ let n = new A({
2273
+ multigraph: !0,
2274
+ compound: !0
2275
+ }).setGraph({
2276
+ rankdir: t.direction,
2277
+ nodesep: t.config?.nodeSpacing || t.nodeSpacing || t.config?.flowchart?.nodeSpacing,
2278
+ ranksep: t.config?.rankSpacing || t.rankSpacing || t.config?.flowchart?.rankSpacing,
2279
+ marginx: 8,
2280
+ marginy: 8
2281
+ }).setDefaultEdgeLabel(function() {
2282
+ return {};
2283
+ });
2284
+ return t.nodes.forEach((e) => {
2285
+ n.setNode(e.id, { ...e }), e.parentId && n.setParent(e.id, e.parentId);
2286
+ }), e.debug("Edges:", t.edges), t.edges.forEach((e) => {
2287
+ if (e.start === e.end) {
2288
+ let t = e.start, r = t + "---" + t + "---1", i = t + "---" + t + "---2", a = n.node(t);
2289
+ n.setNode(r, {
2290
+ domId: r,
2291
+ id: r,
2292
+ parentId: a.parentId,
2293
+ labelStyle: "",
2294
+ label: "",
2295
+ padding: 0,
2296
+ shape: "labelRect",
2297
+ style: "",
2298
+ width: 10,
2299
+ height: 10
2300
+ }), n.setParent(r, a.parentId), n.setNode(i, {
2301
+ domId: i,
2302
+ id: i,
2303
+ parentId: a.parentId,
2304
+ labelStyle: "",
2305
+ padding: 0,
2306
+ shape: "labelRect",
2307
+ label: "",
2308
+ style: "",
2309
+ width: 10,
2310
+ height: 10
2311
+ }), n.setParent(i, a.parentId);
2312
+ let o = structuredClone(e), s = structuredClone(e), c = structuredClone(e), l = structuredClone(e);
2313
+ s.originalEdge = o, s.selfLoop = {
2314
+ id: o.id,
2315
+ order: 0
2316
+ }, c.originalEdge = o, c.selfLoop = {
2317
+ id: o.id,
2318
+ order: 1
2319
+ }, l.originalEdge = o, l.selfLoop = {
2320
+ id: o.id,
2321
+ order: 2
2322
+ }, s.label = "", s.arrowTypeEnd = "none", s.endLabelLeft = "", s.endLabelRight = "", s.startLabelLeft = "", s.id = t + "-cyclic-special-1", c.startLabelRight = "", c.startLabelLeft = "", c.endLabelLeft = "", c.endLabelRight = "", c.arrowTypeStart = "none", c.arrowTypeEnd = "none", c.id = t + "-cyclic-special-mid", l.label = "", l.startLabelRight = "", l.startLabelLeft = "", l.arrowTypeStart = "none", a.isGroup && (s.fromCluster = t, l.toCluster = t), l.id = t + "-cyclic-special-2", l.arrowTypeStart = "none", n.setEdge(t, r, s, t + "-cyclic-special-0"), n.setEdge(r, i, c, t + "-cyclic-special-1"), n.setEdge(i, t, l, t + "-cyclic-special-2");
2323
+ } else n.setEdge(e.start, e.end, { ...e }, e.id);
2324
+ }), Ve(n), { graph: n };
2325
+ }, "prepareLayoutForDagre"), qo = /* @__PURE__ */ t(async (e, { element: t, preparedLayout: r }) => {
2326
+ let i = r ?? Ko(e), a = n(), o = await Ro({
2327
+ element: t,
2328
+ graph: i.graph,
2329
+ diagramType: e.type,
2330
+ id: e.diagramId,
2331
+ parentCluster: void 0,
2332
+ siteConfig: a
2333
+ });
2334
+ return i.measuredLayout = o, o;
2335
+ }, "measureDagreLayout"), Jo = /* @__PURE__ */ t((e, t) => {
2336
+ let n = t.preparedLayout?.measuredLayout;
2337
+ if (!n) throw Error("runDagreLayoutCore requires measureDagreLayout to run first");
2338
+ return zo(n.graph), Uo(e, n), n;
2339
+ }, "runDagreLayoutCore"), Yo = ze({
2340
+ prepareLayout: Ko,
2341
+ measureLayout: qo,
2342
+ runLayoutCore: Jo,
2343
+ paintOptions: {
2344
+ clusterDb: N,
2345
+ getNodes: /* @__PURE__ */ t((e, { measure: t }) => Ie(t.graph).map((e) => t.graph.node(e)).filter(Boolean), "getDagrePaintNodes"),
2346
+ getEdgeNode: /* @__PURE__ */ t((e, t, { measure: n }) => e ? n.graph.node(e) : void 0, "getDagreEdgeNode"),
2347
+ skipNode: /* @__PURE__ */ t((e, { measure: t }) => !t.graph.hasNode(e.id), "skipNode"),
2348
+ isCluster: /* @__PURE__ */ t((e, { measure: t }) => t.graph.hasNode(e.id) && (t.graph.children(e.id) ?? []).length > 0, "isCluster")
2349
+ }
2350
+ });
2351
+ //#endregion
2352
+ export { Uo as applyDagreLayoutResult, Lo as getEdgesToRender, qo as measureDagreLayout, Ko as prepareLayoutForDagre, Yo as render, Jo as runDagreLayoutCore };