@antdv-next/x 1.0.2-beta.1 → 1.0.2-beta.2

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 (133) hide show
  1. package/dist/code-highlighter/CodeHighlighter.js +24 -7
  2. package/dist/index.umd.js +49 -8
  3. package/dist/package.js +1 -1
  4. package/dist/x-provider/context.d.ts +5 -1
  5. package/dist/x-provider/index.d.ts +47 -0
  6. package/dist/x-provider/index.js +25 -0
  7. package/{dist-browser/_basePickBy-Cy7KVmkk.js → es/_basePickBy-DPqob0cQ.js} +2 -2
  8. package/{dist-browser/_baseUniq-Ch3HuHeT.js → es/_baseUniq-AMhRdOMz.js} +2 -2
  9. package/es/antdv-next-x.esm.js +22171 -0
  10. package/es/architecture-PBZL5I3N-CBmkTWjb.js +3 -0
  11. package/{dist-browser/architectureDiagram-2XIMDMQ5-D3IYLROv.js → es/architectureDiagram-2XIMDMQ5-ZOgJV9Kg.js} +84 -84
  12. package/{dist-browser/blockDiagram-WCTKOSBZ-nXanZ0sc.js → es/blockDiagram-WCTKOSBZ-8iZwAKBK.js} +529 -529
  13. package/{dist-browser/c4Diagram-IC4MRINW-C-gVp6th.js → es/c4Diagram-IC4MRINW-DrH9eRMR.js} +168 -168
  14. package/{dist-browser/channel-DoEe9DF9.js → es/channel-DIQFjdG3.js} +1 -1
  15. package/{dist-browser/chunk-4BX2VUAB-fLFD6XW0.js → es/chunk-4BX2VUAB-DUVpjbJi.js} +1 -1
  16. package/{dist-browser/chunk-55IACEB6-OtyKJzCH.js → es/chunk-55IACEB6-RlJ-J3tE.js} +1 -1
  17. package/{dist-browser/chunk-7E7YKBS2-C1dd36rm.js → es/chunk-7E7YKBS2-ChLFamzc.js} +1 -1
  18. package/{dist-browser/chunk-7R4GIKGN-DuTRhdsf.js → es/chunk-7R4GIKGN-B9vamSzt.js} +2 -2
  19. package/{dist-browser/chunk-C72U2L5F-ClmZGhFC.js → es/chunk-C72U2L5F-BV-rXau1.js} +1 -1
  20. package/{dist-browser/chunk-EGIJ26TM-Bar_u1MN.js → es/chunk-EGIJ26TM-GvsuORRL.js} +1 -1
  21. package/{dist-browser/chunk-FMBD7UC4-C_uJ_JJA.js → es/chunk-FMBD7UC4-D6ZlqqMC.js} +1 -1
  22. package/{dist-browser/chunk-GEFDOKGD-P7WhyrTU.js → es/chunk-GEFDOKGD-DM6dsEsk.js} +251 -251
  23. package/{dist-browser/chunk-GLR3WWYH-BvazRgdo.js → es/chunk-GLR3WWYH-CqFdLic9.js} +16 -16
  24. package/{dist-browser/chunk-HHEYEP7N-rv5s5WD4.js → es/chunk-HHEYEP7N-FVfYw94p.js} +2 -2
  25. package/{dist-browser/chunk-JSJVCQXG-89HUGe9V.js → es/chunk-JSJVCQXG-Wr9uPcCh.js} +2 -2
  26. package/{dist-browser/chunk-KX2RTZJC-pMHnNRQg.js → es/chunk-KX2RTZJC-BGffjoxB.js} +2 -2
  27. package/{dist-browser/chunk-KYZI473N-DJmSs1gK.js → es/chunk-KYZI473N-Bit5smNE.js} +571 -571
  28. package/{dist-browser/chunk-L3YUKLVL-Ck54qytQ.js → es/chunk-L3YUKLVL-DBuHDpQ2.js} +1 -1
  29. package/{dist-browser/chunk-MX3YWQON-MkpK3uBD.js → es/chunk-MX3YWQON-Cbj2WwUZ.js} +1 -1
  30. package/{dist-browser/chunk-NQ4KR5QH-DGshodQv.js → es/chunk-NQ4KR5QH-FPQ-IHJN.js} +119 -119
  31. package/{dist-browser/chunk-O4XLMI2P-e-ZzDQwg.js → es/chunk-O4XLMI2P-BCDk0ZIW.js} +237 -237
  32. package/{dist-browser/chunk-OZEHJAEY-DULNd43V.js → es/chunk-OZEHJAEY-BZ24IOgQ.js} +1 -1
  33. package/{dist-browser/chunk-PQ6SQG4A-CQ9Csv7s.js → es/chunk-PQ6SQG4A-DpwBx6Hx.js} +2 -2
  34. package/{dist-browser/chunk-PU5JKC2W-DkEFvrjH.js → es/chunk-PU5JKC2W-BNpJuXxn.js} +63 -63
  35. package/{dist-browser/chunk-QZHKN3VN-qww1plfw.js → es/chunk-QZHKN3VN-NEMwPryC.js} +1 -1
  36. package/{dist-browser/chunk-R5LLSJPH-BERXSDGJ.js → es/chunk-R5LLSJPH-g44vgerl.js} +1 -1
  37. package/{dist-browser/chunk-WL4C6EOR-C-d8WPS7.js → es/chunk-WL4C6EOR-B6l-Yy2t.js} +119 -119
  38. package/{dist-browser/chunk-XIRO2GV7-CFHofxVB.js → es/chunk-XIRO2GV7-CaFInIOW.js} +1 -1
  39. package/{dist-browser/chunk-XPW4576I-DgvoNZkW.js → es/chunk-XPW4576I-Cp1j6iTN.js} +1 -1
  40. package/{dist-browser/chunk-XZSTWKYB-k8_EXrSa.js → es/chunk-XZSTWKYB-CGk7ipHd.js} +5 -5
  41. package/{dist-browser/chunk-YBOYWFTD-BUW4AzEX.js → es/chunk-YBOYWFTD-dOTBpTYs.js} +7 -7
  42. package/es/classDiagram-VBA2DB6C-B3yBiQy3.js +29 -0
  43. package/es/classDiagram-v2-RAHNMMFH-jbFYm_Xj.js +29 -0
  44. package/{dist-browser/clone-BXDbKCDu.js → es/clone-DXVS0uSx.js} +1 -1
  45. package/{dist-browser/cose-bilkent-S5V4N54A-CnrS2OC1.js → es/cose-bilkent-S5V4N54A-DlmXyn6m.js} +1 -1
  46. package/{dist-browser/css-Dh17kjFY.js → es/css-DyS1hwc1.js} +1 -1
  47. package/es/css-HrHT_VUz.js +2 -0
  48. package/{dist-browser/dagre-BJOzGlhW.js → es/dagre-B1qTL793.js} +6 -6
  49. package/es/dagre-KLK3FWXG-CEhXRLVR.js +294 -0
  50. package/{dist-browser/diagram-E7M64L7V-DxuJj8ZG.js → es/diagram-E7M64L7V-Dnd8N74o.js} +59 -59
  51. package/{dist-browser/diagram-IFDJBPK2-BOpPZ6pu.js → es/diagram-IFDJBPK2-Dan7RsGr.js} +30 -30
  52. package/{dist-browser/diagram-P4PSJMXO--ChDmcya.js → es/diagram-P4PSJMXO-DwKJpttH.js} +31 -31
  53. package/{dist-browser/erDiagram-INFDFZHY-BA3m-v87.js → es/erDiagram-INFDFZHY-CGO6k23w.js} +127 -127
  54. package/{dist-browser/flowDiagram-PKNHOUZH-BCq6k3kr.js → es/flowDiagram-PKNHOUZH-DFN1GsRx.js} +155 -155
  55. package/{dist-browser/ganttDiagram-A5KZAMGK-DdMePS21.js → es/ganttDiagram-A5KZAMGK-Cf5NxH1w.js} +599 -602
  56. package/es/gitGraph-HDMCJU4V-CrEEHSZS.js +3 -0
  57. package/{dist-browser/gitGraphDiagram-K3NZZRJ6-CLbRwChG.js → es/gitGraphDiagram-K3NZZRJ6-BgE6aSZO.js} +175 -175
  58. package/{dist-browser/graphlib-C7ysKz4u.js → es/graphlib-DFxSohCv.js} +3 -3
  59. package/{dist-browser/html-BmZO1Eoo.js → es/html-C2-_98S6.js} +2 -2
  60. package/es/html-JbFqcNgP.js +2 -0
  61. package/es/info-3K5VOQVL-Dg3DCp4F.js +3 -0
  62. package/{dist-browser/infoDiagram-LFFYTUFH-DQAZ-vFk.js → es/infoDiagram-LFFYTUFH-WcApcdl5.js} +4 -4
  63. package/{dist-browser/isEmpty-2JxdWtc-.js → es/isEmpty-B1YrVV8B.js} +1 -1
  64. package/{dist-browser/ishikawaDiagram-PHBUUO56-B0r2IgGz.js → es/ishikawaDiagram-PHBUUO56-DwK7J31a.js} +65 -65
  65. package/{dist-browser/journeyDiagram-4ABVD52K-DnMUhOvg.js → es/journeyDiagram-4ABVD52K-CWuA57by.js} +4 -4
  66. package/{dist-browser/kanban-definition-K7BYSVSG-Da5Y-nJy.js → es/kanban-definition-K7BYSVSG-DBt3gYRQ.js} +10 -10
  67. package/{dist-browser/line-h2iCTGsE.js → es/line-zOBKZCP5.js} +1 -1
  68. package/{dist-browser/linear-Bv7XrZCH.js → es/linear-DttXWw4q.js} +1 -1
  69. package/{dist-browser/mermaid-parser.core-kTgpNO7M.js → es/mermaid-parser.core-CWNEdmZ_.js} +15 -15
  70. package/{dist-browser/mermaid.core-DRuUNxpC.js → es/mermaid.core-DPBXXViR.js} +206 -206
  71. package/{dist-browser/mindmap-definition-YRQLILUH-CYeqnCde.js → es/mindmap-definition-YRQLILUH-Bq2xqboX.js} +12 -12
  72. package/es/packet-RMMSAZCW-Dk7mKMJ4.js +3 -0
  73. package/es/pie-UPGHQEXC-CnM5YLNO.js +3 -0
  74. package/{dist-browser/pieDiagram-SKSYHLDU-DAsfTGvY.js → es/pieDiagram-SKSYHLDU-D4iMzwzH.js} +24 -24
  75. package/{dist-browser/quadrantDiagram-337W2JSQ-CZLbmQS4.js → es/quadrantDiagram-337W2JSQ-DSbXC0z6.js} +3 -3
  76. package/es/radar-KQ55EAFF-BwfADDx8.js +3 -0
  77. package/{dist-browser/requirementDiagram-Z7DCOOCP-Cb_Ygnfe.js → es/requirementDiagram-Z7DCOOCP-D7eLn3fs.js} +58 -58
  78. package/{dist-browser/sankeyDiagram-WA2Y5GQK-DBe5YfW4.js → es/sankeyDiagram-WA2Y5GQK-DN5ZPgWU.js} +2 -2
  79. package/{dist-browser/sequenceDiagram-2WXFIKYE-C_KUoojT.js → es/sequenceDiagram-2WXFIKYE-CRFEBP8-.js} +388 -388
  80. package/{dist-browser/stateDiagram-RAJIS63D-boG6DyfW.js → es/stateDiagram-RAJIS63D-CfO23QJX.js} +67 -67
  81. package/es/stateDiagram-v2-FVOUBMTO-BGWbXepL.js +27 -0
  82. package/{dist-browser/timeline-definition-YZTLITO2-pFt6rZ6S.js → es/timeline-definition-YZTLITO2-DmpPrD-3.js} +2 -2
  83. package/es/treemap-KZPCXAKY-BWfn7JxQ.js +3 -0
  84. package/{dist-browser/vennDiagram-LZ73GAT5-VaCO6k4H.js → es/vennDiagram-LZ73GAT5-B80Xr4jV.js} +104 -104
  85. package/{dist-browser/vue-BJ0ov2CZ.js → es/vue-DTiWrQBM.js} +3 -3
  86. package/{dist-browser/vue-html-D0gyDbfn.js → es/vue-html-BG3Xflut.js} +1 -1
  87. package/{dist-browser/xychartDiagram-JWTSCODW-xS5ybemA.js → es/xychartDiagram-JWTSCODW-DvQyPDr4.js} +98 -98
  88. package/package.json +13 -11
  89. package/dist/index.esm.js +0 -11377
  90. package/dist-browser/architecture-PBZL5I3N-DHfBr78A.js +0 -3
  91. package/dist-browser/classDiagram-VBA2DB6C-DWTAs0Zm.js +0 -29
  92. package/dist-browser/classDiagram-v2-RAHNMMFH-CoxCdmrt.js +0 -29
  93. package/dist-browser/css-D9vrnIUE.js +0 -2
  94. package/dist-browser/dagre-KLK3FWXG-CFC0naVr.js +0 -294
  95. package/dist-browser/gitGraph-HDMCJU4V-DbzpICZW.js +0 -3
  96. package/dist-browser/html-DnTYsv5k.js +0 -2
  97. package/dist-browser/index.es.js +0 -56150
  98. package/dist-browser/index.umd.js +0 -3281
  99. package/dist-browser/info-3K5VOQVL-CpUiQuel.js +0 -3
  100. package/dist-browser/packet-RMMSAZCW-UTFQ0FQx.js +0 -3
  101. package/dist-browser/pie-UPGHQEXC-CarAcBSi.js +0 -3
  102. package/dist-browser/radar-KQ55EAFF-NXK5PC9R.js +0 -3
  103. package/dist-browser/stateDiagram-v2-FVOUBMTO-DHCajhrN.js +0 -27
  104. package/dist-browser/treemap-KZPCXAKY-Cj9QakFB.js +0 -3
  105. /package/{dist-browser → es}/Serializer-y_SfSPKv.js +0 -0
  106. /package/{dist-browser → es}/arc-caEkbRYF.js +0 -0
  107. /package/{dist-browser → es}/array-CWNufkl9.js +0 -0
  108. /package/{dist-browser → es}/bash-CXEwhtGQ.js +0 -0
  109. /package/{dist-browser → es}/chunk-WQLz0Won.js +0 -0
  110. /package/{dist-browser → es}/cytoscape.esm-BY3wHcbp.js +0 -0
  111. /package/{dist-browser → es}/defaultLocale-BaPFSbai.js +0 -0
  112. /package/{dist-browser → es}/diff-BSu5dsa2.js +0 -0
  113. /package/{dist-browser → es}/dist-DltyvPj3.js +0 -0
  114. /package/{dist-browser → es}/init-PAs0hR-b.js +0 -0
  115. /package/{dist-browser/isArrayLikeObject-y3HlYDaX.js → es/isArrayLikeObject-BEG9p74d.js} +0 -0
  116. /package/{dist-browser → es}/javascript-BXHK_bZ2.js +0 -0
  117. /package/{dist-browser → es}/javascript-NV_FQBab.js +0 -0
  118. /package/{dist-browser → es}/json-C8Y9C4Ne.js +0 -0
  119. /package/{dist-browser → es}/json-DZ_9-j3Q.js +0 -0
  120. /package/{dist-browser → es}/jsx-CxlNNvOI.js +0 -0
  121. /package/{dist-browser/katex-b-xdokOf.js → es/katex-OR8z_f6I.js} +0 -0
  122. /package/{dist-browser → es}/markdown-BKwT7HWz.js +0 -0
  123. /package/{dist-browser → es}/math-DPzKeDKn.js +0 -0
  124. /package/{dist-browser → es}/mermaid-C1RUu_Iw.js +0 -0
  125. /package/{dist-browser → es}/ordinal-D8PKtxfM.js +0 -0
  126. /package/{dist-browser → es}/path-DZ-6AyWK.js +0 -0
  127. /package/{dist-browser → es}/python-BQM8giqx.js +0 -0
  128. /package/{dist-browser → es}/rough.esm-C_hJ3ICT.js +0 -0
  129. /package/{dist-browser/src-BukXhifV.js → es/src-BH16DVv0.js} +0 -0
  130. /package/{dist-browser → es}/tsx-DIYEV_g7.js +0 -0
  131. /package/{dist-browser → es}/typescript-B6MWEsBH.js +0 -0
  132. /package/{dist-browser → es}/typescript-CR48gG1F.js +0 -0
  133. /package/{dist-browser → es}/yaml-Y0CqUPTQ.js +0 -0
@@ -1,60 +1,60 @@
1
- import { g as e, h as t, p as n } from "./src-BukXhifV.js";
2
- import { i as r, l as i, n as a } from "./chunk-GEFDOKGD-P7WhyrTU.js";
3
- import { L as o, R as s, b as c, h as l, j as u, k as d, w as f, y as p } from "./chunk-7R4GIKGN-DuTRhdsf.js";
4
- import { n as m, r as h } from "./chunk-PU5JKC2W-DkEFvrjH.js";
5
- import { n as g, t as _ } from "./chunk-YBOYWFTD-BUW4AzEX.js";
6
- import { a as v, i as y, r as b, t as x } from "./chunk-PQ6SQG4A-CQ9Csv7s.js";
1
+ import { i as e, l as t, n } from "./chunk-GEFDOKGD-DM6dsEsk.js";
2
+ import { g as r, h as i, p as a } from "./src-BH16DVv0.js";
3
+ import { L as o, R as s, b as c, h as l, j as u, k as d, w as f, y as p } from "./chunk-7R4GIKGN-B9vamSzt.js";
4
+ import { n as m, r as h } from "./chunk-PU5JKC2W-BNpJuXxn.js";
5
+ import { n as g, t as _ } from "./chunk-YBOYWFTD-dOTBpTYs.js";
6
+ import { a as v, i as y, r as b, t as x } from "./chunk-PQ6SQG4A-DpwBx6Hx.js";
7
7
  import { t as S } from "./rough.esm-C_hJ3ICT.js";
8
8
  //#region ../../node_modules/mermaid/dist/chunks/mermaid.core/chunk-KYZI473N.mjs
9
- var C = /* @__PURE__ */ t(async (e, t, a) => {
10
- let s, u = t.useHtmlLabels || l(c()?.htmlLabels);
11
- s = a || "node default";
12
- let d = e.insert("g").attr("class", s).attr("id", t.domId || t.id), f = d.insert("g").attr("class", "label").attr("style", i(t.labelStyle)), p;
13
- p = t.label === void 0 ? "" : typeof t.label == "string" ? t.label : t.label[0];
14
- let h = !!t.icon || !!t.img, g = t.labelType === "markdown", v = await m(f, o(r(p), c()), {
9
+ var C = /* @__PURE__ */ i(async (n, r, i) => {
10
+ let s, u = r.useHtmlLabels || l(c()?.htmlLabels);
11
+ s = i || "node default";
12
+ let d = n.insert("g").attr("class", s).attr("id", r.domId || r.id), f = d.insert("g").attr("class", "label").attr("style", t(r.labelStyle)), p;
13
+ p = r.label === void 0 ? "" : typeof r.label == "string" ? r.label : r.label[0];
14
+ let h = !!r.icon || !!r.img, g = r.labelType === "markdown", v = await m(f, o(e(p), c()), {
15
15
  useHtmlLabels: u,
16
- width: t.width || c().flowchart?.wrappingWidth,
16
+ width: r.width || c().flowchart?.wrappingWidth,
17
17
  cssClasses: g ? "markdown-node-label" : void 0,
18
- style: t.labelStyle,
18
+ style: r.labelStyle,
19
19
  addSvgBackground: h,
20
20
  markdown: g
21
- }, c()), y = v.getBBox(), b = (t?.padding ?? 0) / 2;
21
+ }, c()), y = v.getBBox(), b = (r?.padding ?? 0) / 2;
22
22
  if (u) {
23
- let e = v.children[0], t = n(v);
23
+ let e = v.children[0], t = a(v);
24
24
  await _(e, p), y = e.getBoundingClientRect(), t.attr("width", y.width), t.attr("height", y.height);
25
25
  }
26
- return u ? f.attr("transform", "translate(" + -y.width / 2 + ", " + -y.height / 2 + ")") : f.attr("transform", "translate(0, " + -y.height / 2 + ")"), t.centerLabel && f.attr("transform", "translate(" + -y.width / 2 + ", " + -y.height / 2 + ")"), f.insert("rect", ":first-child"), {
26
+ return u ? f.attr("transform", "translate(" + -y.width / 2 + ", " + -y.height / 2 + ")") : f.attr("transform", "translate(0, " + -y.height / 2 + ")"), r.centerLabel && f.attr("transform", "translate(" + -y.width / 2 + ", " + -y.height / 2 + ")"), f.insert("rect", ":first-child"), {
27
27
  shapeSvg: d,
28
28
  bbox: y,
29
29
  halfPadding: b,
30
30
  label: f
31
31
  };
32
- }, "labelHelper"), w = /* @__PURE__ */ t(async (e, t, i) => {
33
- let a = i.useHtmlLabels ?? f(c()), s = e.insert("g").attr("class", "label").attr("style", i.labelStyle || ""), l = await m(s, o(r(t), c()), {
34
- useHtmlLabels: a,
35
- width: i.width || c()?.flowchart?.wrappingWidth,
36
- style: i.labelStyle,
37
- addSvgBackground: !!i.icon || !!i.img
38
- }), u = l.getBBox(), d = i.padding / 2;
32
+ }, "labelHelper"), w = /* @__PURE__ */ i(async (t, n, r) => {
33
+ let i = r.useHtmlLabels ?? f(c()), s = t.insert("g").attr("class", "label").attr("style", r.labelStyle || ""), l = await m(s, o(e(n), c()), {
34
+ useHtmlLabels: i,
35
+ width: r.width || c()?.flowchart?.wrappingWidth,
36
+ style: r.labelStyle,
37
+ addSvgBackground: !!r.icon || !!r.img
38
+ }), u = l.getBBox(), d = r.padding / 2;
39
39
  if (f(c())) {
40
- let e = l.children[0], t = n(l);
40
+ let e = l.children[0], t = a(l);
41
41
  u = e.getBoundingClientRect(), t.attr("width", u.width), t.attr("height", u.height);
42
42
  }
43
- return a ? s.attr("transform", "translate(" + -u.width / 2 + ", " + -u.height / 2 + ")") : s.attr("transform", "translate(0, " + -u.height / 2 + ")"), i.centerLabel && s.attr("transform", "translate(" + -u.width / 2 + ", " + -u.height / 2 + ")"), s.insert("rect", ":first-child"), {
44
- shapeSvg: e,
43
+ return i ? s.attr("transform", "translate(" + -u.width / 2 + ", " + -u.height / 2 + ")") : s.attr("transform", "translate(0, " + -u.height / 2 + ")"), r.centerLabel && s.attr("transform", "translate(" + -u.width / 2 + ", " + -u.height / 2 + ")"), s.insert("rect", ":first-child"), {
44
+ shapeSvg: t,
45
45
  bbox: u,
46
46
  halfPadding: d,
47
47
  label: s
48
48
  };
49
- }, "insertLabel"), T = /* @__PURE__ */ t((e, t) => {
49
+ }, "insertLabel"), T = /* @__PURE__ */ i((e, t) => {
50
50
  let n = t.node().getBBox();
51
51
  e.width = n.width, e.height = n.height;
52
- }, "updateNodeBounds"), E = /* @__PURE__ */ t((e, t) => (e.look === "handDrawn" ? "rough-node" : "node") + " " + e.cssClasses + " " + (t || ""), "getNodeClasses");
52
+ }, "updateNodeBounds"), E = /* @__PURE__ */ i((e, t) => (e.look === "handDrawn" ? "rough-node" : "node") + " " + e.cssClasses + " " + (t || ""), "getNodeClasses");
53
53
  function D(e) {
54
54
  let t = e.map((e, t) => `${t === 0 ? "M" : "L"}${e.x},${e.y}`);
55
55
  return t.push("Z"), t.join(" ");
56
56
  }
57
- t(D, "createPathFromPoints");
57
+ i(D, "createPathFromPoints");
58
58
  function O(e, t, n, r, i, a) {
59
59
  let o = [], s = n - e, c = r - t, l = s / a, u = 2 * Math.PI / l, d = t + c / 2;
60
60
  for (let t = 0; t <= 50; t++) {
@@ -66,7 +66,7 @@ function O(e, t, n, r, i, a) {
66
66
  }
67
67
  return o;
68
68
  }
69
- t(O, "generateFullSineWavePoints");
69
+ i(O, "generateFullSineWavePoints");
70
70
  function k(e, t, n, r, i, a) {
71
71
  let o = [], s = i * Math.PI / 180, c = (a * Math.PI / 180 - s) / (r - 1);
72
72
  for (let i = 0; i < r; i++) {
@@ -78,14 +78,14 @@ function k(e, t, n, r, i, a) {
78
78
  }
79
79
  return o;
80
80
  }
81
- t(k, "generateCirclePoints");
82
- var A = /* @__PURE__ */ t((e, t) => {
81
+ i(k, "generateCirclePoints");
82
+ var A = /* @__PURE__ */ i((e, t) => {
83
83
  var n = e.x, r = e.y, i = t.x - n, a = t.y - r, o = e.width / 2, s = e.height / 2, c, l;
84
84
  return Math.abs(a) * o > Math.abs(i) * s ? (a < 0 && (s = -s), c = a === 0 ? 0 : s * i / a, l = s) : (i < 0 && (o = -o), c = o, l = i === 0 ? 0 : o * a / i), {
85
85
  x: n + c,
86
86
  y: r + l
87
87
  };
88
- }, "intersectRect"), j = /* @__PURE__ */ t(async (e, t, n, r = !1, i = !1) => {
88
+ }, "intersectRect"), j = /* @__PURE__ */ i(async (e, t, n, r = !1, i = !1) => {
89
89
  let a = t || "";
90
90
  typeof a == "object" && (a = a[0]);
91
91
  let o = c(), s = f(o);
@@ -97,7 +97,7 @@ var A = /* @__PURE__ */ t((e, t) => {
97
97
  isNode: i,
98
98
  width: Infinity
99
99
  }, o);
100
- }, "createLabel"), M = /* @__PURE__ */ t((e, t, n, r, i) => [
100
+ }, "createLabel"), M = /* @__PURE__ */ i((e, t, n, r, i) => [
101
101
  "M",
102
102
  e + i,
103
103
  t,
@@ -142,43 +142,43 @@ var A = /* @__PURE__ */ t((e, t) => {
142
142
  e + i,
143
143
  t,
144
144
  "Z"
145
- ].join(" "), "createRoundedRectPathD"), N = /* @__PURE__ */ t(async (t, r) => {
146
- e.info("Creating subgraph rect for ", r.id, r);
147
- let i = c(), { themeVariables: a, handDrawnSeed: o } = i, { clusterBkg: s, clusterBorder: l } = a, { labelStyles: u, nodeStyles: d, borderStyles: p, backgroundStyles: h } = y(r), _ = t.insert("g").attr("class", "cluster " + r.cssClasses).attr("id", r.id).attr("data-look", r.look), b = f(i), x = _.insert("g").attr("class", "cluster-label "), C;
148
- C = r.labelType === "markdown" ? await m(x, r.label, {
149
- style: r.labelStyle,
145
+ ].join(" "), "createRoundedRectPathD"), N = /* @__PURE__ */ i(async (e, t) => {
146
+ r.info("Creating subgraph rect for ", t.id, t);
147
+ let n = c(), { themeVariables: i, handDrawnSeed: o } = n, { clusterBkg: s, clusterBorder: l } = i, { labelStyles: u, nodeStyles: d, borderStyles: p, backgroundStyles: h } = y(t), _ = e.insert("g").attr("class", "cluster " + t.cssClasses).attr("id", t.id).attr("data-look", t.look), b = f(n), x = _.insert("g").attr("class", "cluster-label "), C;
148
+ C = t.labelType === "markdown" ? await m(x, t.label, {
149
+ style: t.labelStyle,
150
150
  useHtmlLabels: b,
151
151
  isNode: !0,
152
- width: r.width
153
- }) : await j(x, r.label, r.labelStyle || "", !1, !0);
152
+ width: t.width
153
+ }) : await j(x, t.label, t.labelStyle || "", !1, !0);
154
154
  let w = C.getBBox();
155
- if (f(i)) {
156
- let e = C.children[0], t = n(C);
155
+ if (f(n)) {
156
+ let e = C.children[0], t = a(C);
157
157
  w = e.getBoundingClientRect(), t.attr("width", w.width), t.attr("height", w.height);
158
158
  }
159
- let T = r.width <= w.width + r.padding ? w.width + r.padding : r.width;
160
- r.width <= w.width + r.padding ? r.diff = (T - r.width) / 2 - r.padding : r.diff = -r.padding;
161
- let E = r.height, D = r.x - T / 2, O = r.y - E / 2;
162
- e.trace("Data ", r, JSON.stringify(r));
159
+ let T = t.width <= w.width + t.padding ? w.width + t.padding : t.width;
160
+ t.width <= w.width + t.padding ? t.diff = (T - t.width) / 2 - t.padding : t.diff = -t.padding;
161
+ let E = t.height, D = t.x - T / 2, O = t.y - E / 2;
162
+ r.trace("Data ", t, JSON.stringify(t));
163
163
  let k;
164
- if (r.look === "handDrawn") {
165
- let t = S.svg(_), n = v(r, {
164
+ if (t.look === "handDrawn") {
165
+ let e = S.svg(_), n = v(t, {
166
166
  roughness: .7,
167
167
  fill: s,
168
168
  stroke: l,
169
169
  fillWeight: 3,
170
170
  seed: o
171
- }), i = t.path(M(D, O, T, E, 0), n);
172
- k = _.insert(() => (e.debug("Rough node insert CXC", i), i), ":first-child"), k.select("path:nth-child(2)").attr("style", p.join(";")), k.select("path").attr("style", h.join(";").replace("fill", "stroke"));
173
- } else k = _.insert("rect", ":first-child"), k.attr("style", d).attr("rx", r.rx).attr("ry", r.ry).attr("x", D).attr("y", O).attr("width", T).attr("height", E);
174
- let { subGraphTitleTopMargin: N } = g(i);
175
- if (x.attr("transform", `translate(${r.x - w.width / 2}, ${r.y - r.height / 2 + N})`), u) {
171
+ }), i = e.path(M(D, O, T, E, 0), n);
172
+ k = _.insert(() => (r.debug("Rough node insert CXC", i), i), ":first-child"), k.select("path:nth-child(2)").attr("style", p.join(";")), k.select("path").attr("style", h.join(";").replace("fill", "stroke"));
173
+ } else k = _.insert("rect", ":first-child"), k.attr("style", d).attr("rx", t.rx).attr("ry", t.ry).attr("x", D).attr("y", O).attr("width", T).attr("height", E);
174
+ let { subGraphTitleTopMargin: N } = g(n);
175
+ if (x.attr("transform", `translate(${t.x - w.width / 2}, ${t.y - t.height / 2 + N})`), u) {
176
176
  let e = x.select("span");
177
177
  e && e.attr("style", u);
178
178
  }
179
179
  let P = k.node().getBBox();
180
- return r.offsetX = 0, r.width = P.width, r.height = P.height, r.offsetY = w.height - r.padding / 2, r.intersect = function(e) {
181
- return A(r, e);
180
+ return t.offsetX = 0, t.width = P.width, t.height = P.height, t.offsetY = w.height - t.padding / 2, t.intersect = function(e) {
181
+ return A(t, e);
182
182
  }, {
183
183
  cluster: _,
184
184
  labelBBox: w
@@ -186,10 +186,10 @@ var A = /* @__PURE__ */ t((e, t) => {
186
186
  }, "rect"), P = {
187
187
  rect: N,
188
188
  squareRect: N,
189
- roundedWithTitle: /* @__PURE__ */ t(async (e, t) => {
190
- let r = c(), { themeVariables: i, handDrawnSeed: a } = r, { altBackground: o, compositeBackground: s, compositeTitleBackground: l, nodeBorder: u } = i, d = e.insert("g").attr("class", t.cssClasses).attr("id", t.id).attr("data-id", t.id).attr("data-look", t.look), p = d.insert("g", ":first-child"), m = d.insert("g").attr("class", "cluster-label"), h = d.append("rect"), g = await j(m, t.label, t.labelStyle, void 0, !0), _ = g.getBBox();
191
- if (f(r)) {
192
- let e = g.children[0], t = n(g);
189
+ roundedWithTitle: /* @__PURE__ */ i(async (e, t) => {
190
+ let n = c(), { themeVariables: r, handDrawnSeed: i } = n, { altBackground: o, compositeBackground: s, compositeTitleBackground: l, nodeBorder: u } = r, d = e.insert("g").attr("class", t.cssClasses).attr("id", t.id).attr("data-id", t.id).attr("data-look", t.look), p = d.insert("g", ":first-child"), m = d.insert("g").attr("class", "cluster-label"), h = d.append("rect"), g = await j(m, t.label, t.labelStyle, void 0, !0), _ = g.getBBox();
191
+ if (f(n)) {
192
+ let e = g.children[0], t = a(g);
193
193
  _ = e.getBoundingClientRect(), t.attr("width", _.width), t.attr("height", _.height);
194
194
  }
195
195
  let v = 0 * t.padding, y = v / 2, b = (t.width <= _.width + t.padding ? _.width + t.padding : t.width) + v;
@@ -203,25 +203,25 @@ var A = /* @__PURE__ */ t((e, t) => {
203
203
  fill: l,
204
204
  fillStyle: "solid",
205
205
  stroke: u,
206
- seed: a
207
- }) : n.rectangle(w, T, b, x, { seed: a });
206
+ seed: i
207
+ }) : n.rectangle(w, T, b, x, { seed: i });
208
208
  D = d.insert(() => r, ":first-child");
209
- let i = n.rectangle(w, E, b, C, {
209
+ let a = n.rectangle(w, E, b, C, {
210
210
  fill: e ? o : s,
211
211
  fillStyle: e ? "hachure" : "solid",
212
212
  stroke: u,
213
- seed: a
213
+ seed: i
214
214
  });
215
- D = d.insert(() => r, ":first-child"), h = d.insert(() => i);
215
+ D = d.insert(() => r, ":first-child"), h = d.insert(() => a);
216
216
  } else D = p.insert("rect", ":first-child"), D.attr("class", "outer").attr("x", w).attr("y", T).attr("width", b).attr("height", x).attr("data-look", t.look), h.attr("class", "inner").attr("x", w).attr("y", E).attr("width", b).attr("height", C);
217
- return m.attr("transform", `translate(${t.x - _.width / 2}, ${T + 1 - (f(r) ? 0 : 3)})`), t.height = D.node().getBBox().height, t.offsetX = 0, t.offsetY = _.height - t.padding / 2, t.labelBBox = _, t.intersect = function(e) {
217
+ return m.attr("transform", `translate(${t.x - _.width / 2}, ${T + 1 - (f(n) ? 0 : 3)})`), t.height = D.node().getBBox().height, t.offsetX = 0, t.offsetY = _.height - t.padding / 2, t.labelBBox = _, t.intersect = function(e) {
218
218
  return A(t, e);
219
219
  }, {
220
220
  cluster: d,
221
221
  labelBBox: _
222
222
  };
223
223
  }, "roundedWithTitle"),
224
- noteGroup: /* @__PURE__ */ t((e, t) => {
224
+ noteGroup: /* @__PURE__ */ i((e, t) => {
225
225
  let n = e.insert("g").attr("class", "note-cluster").attr("id", t.id), r = n.insert("rect", ":first-child"), i = 0 * t.padding, a = i / 2;
226
226
  r.attr("rx", t.rx).attr("ry", t.ry).attr("x", t.x - t.width / 2 - a).attr("y", t.y - t.height / 2 - a).attr("width", t.width + i).attr("height", t.height + i).attr("fill", "none");
227
227
  let o = r.node().getBBox();
@@ -235,7 +235,7 @@ var A = /* @__PURE__ */ t((e, t) => {
235
235
  }
236
236
  };
237
237
  }, "noteGroup"),
238
- divider: /* @__PURE__ */ t((e, t) => {
238
+ divider: /* @__PURE__ */ i((e, t) => {
239
239
  let { themeVariables: n, handDrawnSeed: r } = c(), { nodeBorder: i } = n, a = e.insert("g").attr("class", t.cssClasses).attr("id", t.id).attr("data-look", t.look), o = a.insert("g", ":first-child"), s = 0 * t.padding, l = t.width + s;
240
240
  t.diff = -t.padding;
241
241
  let u = t.height + s, d = t.x - l / 2, f = t.y - u / 2;
@@ -258,56 +258,56 @@ var A = /* @__PURE__ */ t((e, t) => {
258
258
  labelBBox: {}
259
259
  };
260
260
  }, "divider"),
261
- kanbanSection: /* @__PURE__ */ t(async (t, r) => {
262
- e.info("Creating subgraph rect for ", r.id, r);
263
- let i = c(), { themeVariables: a, handDrawnSeed: o } = i, { clusterBkg: s, clusterBorder: l } = a, { labelStyles: u, nodeStyles: d, borderStyles: p, backgroundStyles: h } = y(r), _ = t.insert("g").attr("class", "cluster " + r.cssClasses).attr("id", r.id).attr("data-look", r.look), b = f(i), x = _.insert("g").attr("class", "cluster-label "), C = await m(x, r.label, {
264
- style: r.labelStyle,
261
+ kanbanSection: /* @__PURE__ */ i(async (e, t) => {
262
+ r.info("Creating subgraph rect for ", t.id, t);
263
+ let n = c(), { themeVariables: i, handDrawnSeed: o } = n, { clusterBkg: s, clusterBorder: l } = i, { labelStyles: u, nodeStyles: d, borderStyles: p, backgroundStyles: h } = y(t), _ = e.insert("g").attr("class", "cluster " + t.cssClasses).attr("id", t.id).attr("data-look", t.look), b = f(n), x = _.insert("g").attr("class", "cluster-label "), C = await m(x, t.label, {
264
+ style: t.labelStyle,
265
265
  useHtmlLabels: b,
266
266
  isNode: !0,
267
- width: r.width
267
+ width: t.width
268
268
  }), w = C.getBBox();
269
- if (f(i)) {
270
- let e = C.children[0], t = n(C);
269
+ if (f(n)) {
270
+ let e = C.children[0], t = a(C);
271
271
  w = e.getBoundingClientRect(), t.attr("width", w.width), t.attr("height", w.height);
272
272
  }
273
- let T = r.width <= w.width + r.padding ? w.width + r.padding : r.width;
274
- r.width <= w.width + r.padding ? r.diff = (T - r.width) / 2 - r.padding : r.diff = -r.padding;
275
- let E = r.height, D = r.x - T / 2, O = r.y - E / 2;
276
- e.trace("Data ", r, JSON.stringify(r));
273
+ let T = t.width <= w.width + t.padding ? w.width + t.padding : t.width;
274
+ t.width <= w.width + t.padding ? t.diff = (T - t.width) / 2 - t.padding : t.diff = -t.padding;
275
+ let E = t.height, D = t.x - T / 2, O = t.y - E / 2;
276
+ r.trace("Data ", t, JSON.stringify(t));
277
277
  let k;
278
- if (r.look === "handDrawn") {
279
- let t = S.svg(_), n = v(r, {
278
+ if (t.look === "handDrawn") {
279
+ let e = S.svg(_), n = v(t, {
280
280
  roughness: .7,
281
281
  fill: s,
282
282
  stroke: l,
283
283
  fillWeight: 4,
284
284
  seed: o
285
- }), i = t.path(M(D, O, T, E, r.rx), n);
286
- k = _.insert(() => (e.debug("Rough node insert CXC", i), i), ":first-child"), k.select("path:nth-child(2)").attr("style", p.join(";")), k.select("path").attr("style", h.join(";").replace("fill", "stroke"));
287
- } else k = _.insert("rect", ":first-child"), k.attr("style", d).attr("rx", r.rx).attr("ry", r.ry).attr("x", D).attr("y", O).attr("width", T).attr("height", E);
288
- let { subGraphTitleTopMargin: j } = g(i);
289
- if (x.attr("transform", `translate(${r.x - w.width / 2}, ${r.y - r.height / 2 + j})`), u) {
285
+ }), i = e.path(M(D, O, T, E, t.rx), n);
286
+ k = _.insert(() => (r.debug("Rough node insert CXC", i), i), ":first-child"), k.select("path:nth-child(2)").attr("style", p.join(";")), k.select("path").attr("style", h.join(";").replace("fill", "stroke"));
287
+ } else k = _.insert("rect", ":first-child"), k.attr("style", d).attr("rx", t.rx).attr("ry", t.ry).attr("x", D).attr("y", O).attr("width", T).attr("height", E);
288
+ let { subGraphTitleTopMargin: j } = g(n);
289
+ if (x.attr("transform", `translate(${t.x - w.width / 2}, ${t.y - t.height / 2 + j})`), u) {
290
290
  let e = x.select("span");
291
291
  e && e.attr("style", u);
292
292
  }
293
293
  let N = k.node().getBBox();
294
- return r.offsetX = 0, r.width = N.width, r.height = N.height, r.offsetY = w.height - r.padding / 2, r.intersect = function(e) {
295
- return A(r, e);
294
+ return t.offsetX = 0, t.width = N.width, t.height = N.height, t.offsetY = w.height - t.padding / 2, t.intersect = function(e) {
295
+ return A(t, e);
296
296
  }, {
297
297
  cluster: _,
298
298
  labelBBox: w
299
299
  };
300
300
  }, "kanbanSection")
301
- }, F = /* @__PURE__ */ new Map(), I = /* @__PURE__ */ t(async (e, t) => {
301
+ }, F = /* @__PURE__ */ new Map(), I = /* @__PURE__ */ i(async (e, t) => {
302
302
  let n = await P[t.shape || "rect"](e, t);
303
303
  return F.set(t.id, n), n;
304
- }, "insertCluster"), L = /* @__PURE__ */ t(() => {
304
+ }, "insertCluster"), L = /* @__PURE__ */ i(() => {
305
305
  F = /* @__PURE__ */ new Map();
306
306
  }, "clear");
307
307
  function R(e, t) {
308
308
  return e.intersect(t);
309
309
  }
310
- t(R, "intersectNode");
310
+ i(R, "intersectNode");
311
311
  var z = R;
312
312
  function B(e, t, n, r) {
313
313
  var i = e.x, a = e.y, o = i - r.x, s = a - r.y, c = Math.sqrt(t * t * s * s + n * n * o * o), l = Math.abs(t * n * o / c);
@@ -318,12 +318,12 @@ function B(e, t, n, r) {
318
318
  y: a + u
319
319
  };
320
320
  }
321
- t(B, "intersectEllipse");
321
+ i(B, "intersectEllipse");
322
322
  var V = B;
323
323
  function ee(e, t, n) {
324
324
  return V(e, t, t, n);
325
325
  }
326
- t(ee, "intersectCircle");
326
+ i(ee, "intersectCircle");
327
327
  var te = ee;
328
328
  function ne(e, t, n, r) {
329
329
  {
@@ -340,11 +340,11 @@ function ne(e, t, n, r) {
340
340
  };
341
341
  }
342
342
  }
343
- t(ne, "intersectLine");
343
+ i(ne, "intersectLine");
344
344
  function H(e, t) {
345
345
  return e * t > 0;
346
346
  }
347
- t(H, "sameSign");
347
+ i(H, "sameSign");
348
348
  var U = ne;
349
349
  function re(e, t, n) {
350
350
  let r = e.x, i = e.y, a = [], o = Infinity, s = Infinity;
@@ -367,7 +367,7 @@ function re(e, t, n) {
367
367
  return a < c ? -1 : a === c ? 0 : 1;
368
368
  }), a[0]) : e;
369
369
  }
370
- t(re, "intersectPolygon");
370
+ i(re, "intersectPolygon");
371
371
  var W = {
372
372
  node: z,
373
373
  circle: te,
@@ -375,23 +375,23 @@ var W = {
375
375
  polygon: re,
376
376
  rect: A
377
377
  };
378
- function ie(t, n) {
379
- let { labelStyles: r } = y(n);
380
- n.labelStyle = r;
378
+ function ie(e, n) {
379
+ let { labelStyles: i } = y(n);
380
+ n.labelStyle = i;
381
381
  let a = E(n), o = a;
382
382
  a || (o = "anchor");
383
- let s = t.insert("g").attr("class", o).attr("id", n.domId || n.id), { cssStyles: c } = n, l = S.svg(s), u = v(n, {
383
+ let s = e.insert("g").attr("class", o).attr("id", n.domId || n.id), { cssStyles: c } = n, l = S.svg(s), u = v(n, {
384
384
  fill: "black",
385
385
  stroke: "none",
386
386
  fillStyle: "solid"
387
387
  });
388
388
  n.look !== "handDrawn" && (u.roughness = 0);
389
389
  let d = l.circle(0, 0, 2, u), f = s.insert(() => d, ":first-child");
390
- return f.attr("class", "anchor").attr("style", i(c)), T(n, f), n.intersect = function(t) {
391
- return e.info("Circle intersect", n, 1, t), W.circle(n, 1, t);
390
+ return f.attr("class", "anchor").attr("style", t(c)), T(n, f), n.intersect = function(e) {
391
+ return r.info("Circle intersect", n, 1, e), W.circle(n, 1, e);
392
392
  }, s;
393
393
  }
394
- t(ie, "anchor");
394
+ i(ie, "anchor");
395
395
  function ae(e, t, n, r, i, a, o) {
396
396
  let s = (e + n) / 2, c = (t + r) / 2, l = Math.atan2(r - t, n - e), u = (n - e) / 2, d = (r - t) / 2, f = u / i, p = d / a, m = Math.sqrt(f ** 2 + p ** 2);
397
397
  if (m > 1) throw Error("The given radii are too small to create an arc between the points.");
@@ -407,7 +407,7 @@ function ae(e, t, n, r, i, a, o) {
407
407
  }
408
408
  return b;
409
409
  }
410
- t(ae, "generateArcPoints");
410
+ i(ae, "generateArcPoints");
411
411
  async function oe(e, t) {
412
412
  let { labelStyles: n, nodeStyles: r } = y(t);
413
413
  t.labelStyle = n;
@@ -433,13 +433,13 @@ async function oe(e, t) {
433
433
  return W.polygon(t, d, e);
434
434
  }, i;
435
435
  }
436
- t(oe, "bowTieRect");
436
+ i(oe, "bowTieRect");
437
437
  function G(e, t, n, r) {
438
438
  return e.insert("polygon", ":first-child").attr("points", r.map(function(e) {
439
439
  return e.x + "," + e.y;
440
440
  }).join(" ")).attr("class", "label-container").attr("transform", "translate(" + -t / 2 + "," + n / 2 + ")");
441
441
  }
442
- t(G, "insertPolygonShape");
442
+ i(G, "insertPolygonShape");
443
443
  async function se(e, t) {
444
444
  let { labelStyles: n, nodeStyles: r } = y(t);
445
445
  t.labelStyle = n;
@@ -477,7 +477,7 @@ async function se(e, t) {
477
477
  return W.polygon(t, u, e);
478
478
  }, i;
479
479
  }
480
- t(se, "card");
480
+ i(se, "card");
481
481
  function ce(e, t) {
482
482
  let { nodeStyles: n } = y(t);
483
483
  t.label = "";
@@ -505,23 +505,23 @@ function ce(e, t) {
505
505
  return W.polygon(t, o, e);
506
506
  }, r;
507
507
  }
508
- t(ce, "choice");
509
- async function le(t, n, r) {
508
+ i(ce, "choice");
509
+ async function le(e, n, i) {
510
510
  let { labelStyles: a, nodeStyles: o } = y(n);
511
511
  n.labelStyle = a;
512
- let { shapeSvg: s, bbox: c, halfPadding: l } = await C(t, n, E(n)), u = r?.padding ?? l, d = c.width / 2 + u, f, { cssStyles: p } = n;
512
+ let { shapeSvg: s, bbox: c, halfPadding: l } = await C(e, n, E(n)), u = i?.padding ?? l, d = c.width / 2 + u, f, { cssStyles: p } = n;
513
513
  if (n.look === "handDrawn") {
514
- let e = S.svg(s), t = v(n, {}), r = e.circle(0, 0, d * 2, t);
515
- f = s.insert(() => r, ":first-child"), f.attr("class", "basic label-container").attr("style", i(p));
514
+ let e = S.svg(s), r = v(n, {}), i = e.circle(0, 0, d * 2, r);
515
+ f = s.insert(() => i, ":first-child"), f.attr("class", "basic label-container").attr("style", t(p));
516
516
  } else f = s.insert("circle", ":first-child").attr("class", "basic label-container").attr("style", o).attr("r", d).attr("cx", 0).attr("cy", 0);
517
517
  return T(n, f), n.calcIntersect = function(e, t) {
518
518
  let n = e.width / 2;
519
519
  return W.circle(e, n, t);
520
- }, n.intersect = function(t) {
521
- return e.info("Circle intersect", n, d, t), W.circle(n, d, t);
520
+ }, n.intersect = function(e) {
521
+ return r.info("Circle intersect", n, d, e), W.circle(n, d, e);
522
522
  }, s;
523
523
  }
524
- t(le, "circle");
524
+ i(le, "circle");
525
525
  function ue(e) {
526
526
  let t = Math.cos(Math.PI / 4), n = Math.sin(Math.PI / 4), r = e * 2, i = {
527
527
  x: r / 2 * t,
@@ -539,21 +539,21 @@ function ue(e) {
539
539
  return `M ${a.x},${a.y} L ${s.x},${s.y}
540
540
  M ${i.x},${i.y} L ${o.x},${o.y}`;
541
541
  }
542
- t(ue, "createLine");
543
- function de(t, n) {
544
- let { labelStyles: r, nodeStyles: i } = y(n);
545
- n.labelStyle = r, n.label = "";
546
- let a = t.insert("g").attr("class", E(n)).attr("id", n.domId ?? n.id), o = Math.max(30, n?.width ?? 0), { cssStyles: s } = n, c = S.svg(a), l = v(n, {});
547
- n.look !== "handDrawn" && (l.roughness = 0, l.fillStyle = "solid");
542
+ i(ue, "createLine");
543
+ function de(e, t) {
544
+ let { labelStyles: n, nodeStyles: i } = y(t);
545
+ t.labelStyle = n, t.label = "";
546
+ let a = e.insert("g").attr("class", E(t)).attr("id", t.domId ?? t.id), o = Math.max(30, t?.width ?? 0), { cssStyles: s } = t, c = S.svg(a), l = v(t, {});
547
+ t.look !== "handDrawn" && (l.roughness = 0, l.fillStyle = "solid");
548
548
  let u = c.circle(0, 0, o * 2, l), d = ue(o), f = c.path(d, l), p = a.insert(() => u, ":first-child");
549
- return p.insert(() => f), s && n.look !== "handDrawn" && p.selectAll("path").attr("style", s), i && n.look !== "handDrawn" && p.selectAll("path").attr("style", i), T(n, p), n.intersect = function(t) {
550
- return e.info("crossedCircle intersect", n, {
549
+ return p.insert(() => f), s && t.look !== "handDrawn" && p.selectAll("path").attr("style", s), i && t.look !== "handDrawn" && p.selectAll("path").attr("style", i), T(t, p), t.intersect = function(e) {
550
+ return r.info("crossedCircle intersect", t, {
551
551
  radius: o,
552
- point: t
553
- }), W.circle(n, o, t);
552
+ point: e
553
+ }), W.circle(t, o, e);
554
554
  }, a;
555
555
  }
556
- t(de, "crossedCircle");
556
+ i(de, "crossedCircle");
557
557
  function K(e, t, n, r = 100, i = 0, a = 180) {
558
558
  let o = [], s = i * Math.PI / 180, c = (a * Math.PI / 180 - s) / (r - 1);
559
559
  for (let i = 0; i < r; i++) {
@@ -565,7 +565,7 @@ function K(e, t, n, r = 100, i = 0, a = 180) {
565
565
  }
566
566
  return o;
567
567
  }
568
- t(K, "generateCirclePoints");
568
+ i(K, "generateCirclePoints");
569
569
  async function fe(e, t) {
570
570
  let { labelStyles: n, nodeStyles: r } = y(t);
571
571
  t.labelStyle = n;
@@ -618,7 +618,7 @@ async function fe(e, t) {
618
618
  return W.polygon(t, f, e);
619
619
  }, i;
620
620
  }
621
- t(fe, "curlyBraceLeft");
621
+ i(fe, "curlyBraceLeft");
622
622
  function q(e, t, n, r = 100, i = 0, a = 180) {
623
623
  let o = [], s = i * Math.PI / 180, c = (a * Math.PI / 180 - s) / (r - 1);
624
624
  for (let i = 0; i < r; i++) {
@@ -630,7 +630,7 @@ function q(e, t, n, r = 100, i = 0, a = 180) {
630
630
  }
631
631
  return o;
632
632
  }
633
- t(q, "generateCirclePoints");
633
+ i(q, "generateCirclePoints");
634
634
  async function pe(e, t) {
635
635
  let { labelStyles: n, nodeStyles: r } = y(t);
636
636
  t.labelStyle = n;
@@ -683,7 +683,7 @@ async function pe(e, t) {
683
683
  return W.polygon(t, f, e);
684
684
  }, i;
685
685
  }
686
- t(pe, "curlyBraceRight");
686
+ i(pe, "curlyBraceRight");
687
687
  function J(e, t, n, r = 100, i = 0, a = 180) {
688
688
  let o = [], s = i * Math.PI / 180, c = (a * Math.PI / 180 - s) / (r - 1);
689
689
  for (let i = 0; i < r; i++) {
@@ -695,7 +695,7 @@ function J(e, t, n, r = 100, i = 0, a = 180) {
695
695
  }
696
696
  return o;
697
697
  }
698
- t(J, "generateCirclePoints");
698
+ i(J, "generateCirclePoints");
699
699
  async function me(e, t) {
700
700
  let { labelStyles: n, nodeStyles: r } = y(t);
701
701
  t.labelStyle = n;
@@ -773,7 +773,7 @@ async function me(e, t) {
773
773
  return W.polygon(t, p, e);
774
774
  }, i;
775
775
  }
776
- t(me, "curlyBraces");
776
+ i(me, "curlyBraces");
777
777
  async function he(e, t) {
778
778
  let { labelStyles: n, nodeStyles: r } = y(t);
779
779
  t.labelStyle = n;
@@ -806,43 +806,43 @@ async function he(e, t) {
806
806
  return W.polygon(t, g, e);
807
807
  }, i;
808
808
  }
809
- t(he, "curvedTrapezoid");
810
- var ge = /* @__PURE__ */ t((e, t, n, r, i, a) => [
809
+ i(he, "curvedTrapezoid");
810
+ var ge = /* @__PURE__ */ i((e, t, n, r, i, a) => [
811
811
  `M${e},${t + a}`,
812
812
  `a${i},${a} 0,0,0 ${n},0`,
813
813
  `a${i},${a} 0,0,0 ${-n},0`,
814
814
  `l0,${r}`,
815
815
  `a${i},${a} 0,0,0 ${n},0`,
816
816
  `l0,${-r}`
817
- ].join(" "), "createCylinderPathD"), _e = /* @__PURE__ */ t((e, t, n, r, i, a) => [
817
+ ].join(" "), "createCylinderPathD"), _e = /* @__PURE__ */ i((e, t, n, r, i, a) => [
818
818
  `M${e},${t + a}`,
819
819
  `M${e + n},${t + a}`,
820
820
  `a${i},${a} 0,0,0 ${-n},0`,
821
821
  `l0,${r}`,
822
822
  `a${i},${a} 0,0,0 ${n},0`,
823
823
  `l0,${-r}`
824
- ].join(" "), "createOuterCylinderPathD"), ve = /* @__PURE__ */ t((e, t, n, r, i, a) => [`M${e - n / 2},${-r / 2}`, `a${i},${a} 0,0,0 ${n},0`].join(" "), "createInnerCylinderPathD");
825
- async function ye(e, t) {
826
- let { labelStyles: n, nodeStyles: r } = y(t);
827
- t.labelStyle = n;
828
- let { shapeSvg: a, bbox: o, label: s } = await C(e, t, E(t)), c = Math.max(o.width + t.padding, t.width ?? 0), l = c / 2, u = l / (2.5 + c / 50), d = Math.max(o.height + u + t.padding, t.height ?? 0), f, { cssStyles: p } = t;
829
- if (t.look === "handDrawn") {
830
- let e = S.svg(a), n = _e(0, 0, c, d, l, u), r = ve(0, u, c, d, l, u), i = e.path(n, v(t, {})), o = e.path(r, v(t, { fill: "none" }));
824
+ ].join(" "), "createOuterCylinderPathD"), ve = /* @__PURE__ */ i((e, t, n, r, i, a) => [`M${e - n / 2},${-r / 2}`, `a${i},${a} 0,0,0 ${n},0`].join(" "), "createInnerCylinderPathD");
825
+ async function ye(e, n) {
826
+ let { labelStyles: r, nodeStyles: i } = y(n);
827
+ n.labelStyle = r;
828
+ let { shapeSvg: a, bbox: o, label: s } = await C(e, n, E(n)), c = Math.max(o.width + n.padding, n.width ?? 0), l = c / 2, u = l / (2.5 + c / 50), d = Math.max(o.height + u + n.padding, n.height ?? 0), f, { cssStyles: p } = n;
829
+ if (n.look === "handDrawn") {
830
+ let e = S.svg(a), t = _e(0, 0, c, d, l, u), r = ve(0, u, c, d, l, u), i = e.path(t, v(n, {})), o = e.path(r, v(n, { fill: "none" }));
831
831
  f = a.insert(() => o, ":first-child"), f = a.insert(() => i, ":first-child"), f.attr("class", "basic label-container"), p && f.attr("style", p);
832
832
  } else {
833
833
  let e = ge(0, 0, c, d, l, u);
834
- f = a.insert("path", ":first-child").attr("d", e).attr("class", "basic label-container").attr("style", i(p)).attr("style", r);
834
+ f = a.insert("path", ":first-child").attr("d", e).attr("class", "basic label-container").attr("style", t(p)).attr("style", i);
835
835
  }
836
- return f.attr("label-offset-y", u), f.attr("transform", `translate(${-c / 2}, ${-(d / 2 + u)})`), T(t, f), s.attr("transform", `translate(${-(o.width / 2) - (o.x - (o.left ?? 0))}, ${-(o.height / 2) + (t.padding ?? 0) / 1.5 - (o.y - (o.top ?? 0))})`), t.intersect = function(e) {
837
- let n = W.rect(t, e), r = n.x - (t.x ?? 0);
838
- if (l != 0 && (Math.abs(r) < (t.width ?? 0) / 2 || Math.abs(r) == (t.width ?? 0) / 2 && Math.abs(n.y - (t.y ?? 0)) > (t.height ?? 0) / 2 - u)) {
836
+ return f.attr("label-offset-y", u), f.attr("transform", `translate(${-c / 2}, ${-(d / 2 + u)})`), T(n, f), s.attr("transform", `translate(${-(o.width / 2) - (o.x - (o.left ?? 0))}, ${-(o.height / 2) + (n.padding ?? 0) / 1.5 - (o.y - (o.top ?? 0))})`), n.intersect = function(e) {
837
+ let t = W.rect(n, e), r = t.x - (n.x ?? 0);
838
+ if (l != 0 && (Math.abs(r) < (n.width ?? 0) / 2 || Math.abs(r) == (n.width ?? 0) / 2 && Math.abs(t.y - (n.y ?? 0)) > (n.height ?? 0) / 2 - u)) {
839
839
  let i = u * u * (1 - r * r / (l * l));
840
- i > 0 && (i = Math.sqrt(i)), i = u - i, e.y - (t.y ?? 0) > 0 && (i = -i), n.y += i;
840
+ i > 0 && (i = Math.sqrt(i)), i = u - i, e.y - (n.y ?? 0) > 0 && (i = -i), t.y += i;
841
841
  }
842
- return n;
842
+ return t;
843
843
  }, a;
844
844
  }
845
- t(ye, "cylinder");
845
+ i(ye, "cylinder");
846
846
  async function be(e, t) {
847
847
  let { labelStyles: n, nodeStyles: r } = y(t);
848
848
  t.labelStyle = n;
@@ -882,48 +882,48 @@ async function be(e, t) {
882
882
  return W.rect(t, e);
883
883
  }, i;
884
884
  }
885
- t(be, "dividedRectangle");
886
- async function xe(t, n) {
887
- let { labelStyles: r, nodeStyles: a } = y(n);
888
- n.labelStyle = r;
889
- let { shapeSvg: o, bbox: s, halfPadding: c } = await C(t, n, E(n)), l = s.width / 2 + c + 5, u = s.width / 2 + c, d, { cssStyles: f } = n;
885
+ i(be, "dividedRectangle");
886
+ async function xe(e, n) {
887
+ let { labelStyles: i, nodeStyles: a } = y(n);
888
+ n.labelStyle = i;
889
+ let { shapeSvg: o, bbox: s, halfPadding: c } = await C(e, n, E(n)), l = s.width / 2 + c + 5, u = s.width / 2 + c, d, { cssStyles: f } = n;
890
890
  if (n.look === "handDrawn") {
891
- let e = S.svg(o), t = v(n, {
891
+ let e = S.svg(o), r = v(n, {
892
892
  roughness: .2,
893
893
  strokeWidth: 2.5
894
- }), r = v(n, {
894
+ }), i = v(n, {
895
895
  roughness: .2,
896
896
  strokeWidth: 1.5
897
- }), a = e.circle(0, 0, l * 2, t), s = e.circle(0, 0, u * 2, r);
898
- d = o.insert("g", ":first-child"), d.attr("class", i(n.cssClasses)).attr("style", i(f)), d.node()?.appendChild(a), d.node()?.appendChild(s);
897
+ }), a = e.circle(0, 0, l * 2, r), s = e.circle(0, 0, u * 2, i);
898
+ d = o.insert("g", ":first-child"), d.attr("class", t(n.cssClasses)).attr("style", t(f)), d.node()?.appendChild(a), d.node()?.appendChild(s);
899
899
  } else {
900
900
  d = o.insert("g", ":first-child");
901
901
  let e = d.insert("circle", ":first-child"), t = d.insert("circle");
902
902
  d.attr("class", "basic label-container").attr("style", a), e.attr("class", "outer-circle").attr("style", a).attr("r", l).attr("cx", 0).attr("cy", 0), t.attr("class", "inner-circle").attr("style", a).attr("r", u).attr("cx", 0).attr("cy", 0);
903
903
  }
904
- return T(n, d), n.intersect = function(t) {
905
- return e.info("DoubleCircle intersect", n, l, t), W.circle(n, l, t);
904
+ return T(n, d), n.intersect = function(e) {
905
+ return r.info("DoubleCircle intersect", n, l, e), W.circle(n, l, e);
906
906
  }, o;
907
907
  }
908
- t(xe, "doublecircle");
909
- function Se(t, n, { config: { themeVariables: r } }) {
910
- let { labelStyles: i, nodeStyles: a } = y(n);
911
- n.label = "", n.labelStyle = i;
912
- let o = t.insert("g").attr("class", E(n)).attr("id", n.domId ?? n.id), { cssStyles: s } = n, c = S.svg(o), { nodeBorder: l } = r, u = v(n, { fillStyle: "solid" });
913
- n.look !== "handDrawn" && (u.roughness = 0);
908
+ i(xe, "doublecircle");
909
+ function Se(e, t, { config: { themeVariables: n } }) {
910
+ let { labelStyles: i, nodeStyles: a } = y(t);
911
+ t.label = "", t.labelStyle = i;
912
+ let o = e.insert("g").attr("class", E(t)).attr("id", t.domId ?? t.id), { cssStyles: s } = t, c = S.svg(o), { nodeBorder: l } = n, u = v(t, { fillStyle: "solid" });
913
+ t.look !== "handDrawn" && (u.roughness = 0);
914
914
  let d = c.circle(0, 0, 14, u), f = o.insert(() => d, ":first-child");
915
- return f.selectAll("path").attr("style", `fill: ${l} !important;`), s && s.length > 0 && n.look !== "handDrawn" && f.selectAll("path").attr("style", s), a && n.look !== "handDrawn" && f.selectAll("path").attr("style", a), T(n, f), n.intersect = function(t) {
916
- return e.info("filledCircle intersect", n, {
915
+ return f.selectAll("path").attr("style", `fill: ${l} !important;`), s && s.length > 0 && t.look !== "handDrawn" && f.selectAll("path").attr("style", s), a && t.look !== "handDrawn" && f.selectAll("path").attr("style", a), T(t, f), t.intersect = function(e) {
916
+ return r.info("filledCircle intersect", t, {
917
917
  radius: 7,
918
- point: t
919
- }), W.circle(n, 7, t);
918
+ point: e
919
+ }), W.circle(t, 7, e);
920
920
  }, o;
921
921
  }
922
- t(Se, "filledCircle");
923
- async function Ce(t, n) {
924
- let { labelStyles: r, nodeStyles: i } = y(n);
925
- n.labelStyle = r;
926
- let { shapeSvg: a, bbox: o, label: s } = await C(t, n, E(n)), c = o.width + (n.padding ?? 0), l = c + o.height, u = c + o.height, d = [
922
+ i(Se, "filledCircle");
923
+ async function Ce(e, t) {
924
+ let { labelStyles: n, nodeStyles: i } = y(t);
925
+ t.labelStyle = n;
926
+ let { shapeSvg: a, bbox: o, label: s } = await C(e, t, E(t)), c = o.width + (t.padding ?? 0), l = c + o.height, u = c + o.height, d = [
927
927
  {
928
928
  x: 0,
929
929
  y: -l
@@ -936,14 +936,14 @@ async function Ce(t, n) {
936
936
  x: u / 2,
937
937
  y: 0
938
938
  }
939
- ], { cssStyles: f } = n, p = S.svg(a), m = v(n, {});
940
- n.look !== "handDrawn" && (m.roughness = 0, m.fillStyle = "solid");
939
+ ], { cssStyles: f } = t, p = S.svg(a), m = v(t, {});
940
+ t.look !== "handDrawn" && (m.roughness = 0, m.fillStyle = "solid");
941
941
  let h = D(d), g = p.path(h, m), _ = a.insert(() => g, ":first-child").attr("transform", `translate(${-l / 2}, ${l / 2})`);
942
- return f && n.look !== "handDrawn" && _.selectChildren("path").attr("style", f), i && n.look !== "handDrawn" && _.selectChildren("path").attr("style", i), n.width = c, n.height = l, T(n, _), s.attr("transform", `translate(${-o.width / 2 - (o.x - (o.left ?? 0))}, ${-l / 2 + (n.padding ?? 0) / 2 + (o.y - (o.top ?? 0))})`), n.intersect = function(t) {
943
- return e.info("Triangle intersect", n, d, t), W.polygon(n, d, t);
942
+ return f && t.look !== "handDrawn" && _.selectChildren("path").attr("style", f), i && t.look !== "handDrawn" && _.selectChildren("path").attr("style", i), t.width = c, t.height = l, T(t, _), s.attr("transform", `translate(${-o.width / 2 - (o.x - (o.left ?? 0))}, ${-l / 2 + (t.padding ?? 0) / 2 + (o.y - (o.top ?? 0))})`), t.intersect = function(e) {
943
+ return r.info("Triangle intersect", t, d, e), W.polygon(t, d, e);
944
944
  }, a;
945
945
  }
946
- t(Ce, "flippedTriangle");
946
+ i(Ce, "flippedTriangle");
947
947
  function we(e, t, { dir: n, config: { state: r, themeVariables: i } }) {
948
948
  let { nodeStyles: a } = y(t);
949
949
  t.label = "";
@@ -961,12 +961,12 @@ function we(e, t, { dir: n, config: { state: r, themeVariables: i } }) {
961
961
  return W.rect(t, e);
962
962
  }, o;
963
963
  }
964
- t(we, "forkJoin");
965
- async function Te(t, n) {
966
- let { labelStyles: r, nodeStyles: i } = y(n);
967
- n.labelStyle = r;
968
- let { shapeSvg: a, bbox: o } = await C(t, n, E(n)), s = Math.max(80, o.width + (n.padding ?? 0) * 2, n?.width ?? 0), c = Math.max(50, o.height + (n.padding ?? 0) * 2, n?.height ?? 0), l = c / 2, { cssStyles: u } = n, d = S.svg(a), f = v(n, {});
969
- n.look !== "handDrawn" && (f.roughness = 0, f.fillStyle = "solid");
964
+ i(we, "forkJoin");
965
+ async function Te(e, t) {
966
+ let { labelStyles: n, nodeStyles: i } = y(t);
967
+ t.labelStyle = n;
968
+ let { shapeSvg: a, bbox: o } = await C(e, t, E(t)), s = Math.max(80, o.width + (t.padding ?? 0) * 2, t?.width ?? 0), c = Math.max(50, o.height + (t.padding ?? 0) * 2, t?.height ?? 0), l = c / 2, { cssStyles: u } = t, d = S.svg(a), f = v(t, {});
969
+ t.look !== "handDrawn" && (f.roughness = 0, f.fillStyle = "solid");
970
970
  let p = [
971
971
  {
972
972
  x: -s / 2,
@@ -986,15 +986,15 @@ async function Te(t, n) {
986
986
  y: c / 2
987
987
  }
988
988
  ], m = D(p), h = d.path(m, f), g = a.insert(() => h, ":first-child");
989
- return g.attr("class", "basic label-container"), u && n.look !== "handDrawn" && g.selectChildren("path").attr("style", u), i && n.look !== "handDrawn" && g.selectChildren("path").attr("style", i), T(n, g), n.intersect = function(t) {
990
- return e.info("Pill intersect", n, {
989
+ return g.attr("class", "basic label-container"), u && t.look !== "handDrawn" && g.selectChildren("path").attr("style", u), i && t.look !== "handDrawn" && g.selectChildren("path").attr("style", i), T(t, g), t.intersect = function(e) {
990
+ return r.info("Pill intersect", t, {
991
991
  radius: l,
992
- point: t
993
- }), W.polygon(n, p, t);
992
+ point: e
993
+ }), W.polygon(t, p, e);
994
994
  }, a;
995
995
  }
996
- t(Te, "halfRoundedRectangle");
997
- var Ee = /* @__PURE__ */ t((e, t, n, r, i) => [
996
+ i(Te, "halfRoundedRectangle");
997
+ var Ee = /* @__PURE__ */ i((e, t, n, r, i) => [
998
998
  `M${e + i},${t}`,
999
999
  `L${e + n - i},${t}`,
1000
1000
  `L${e + n},${t - r / 2}`,
@@ -1040,12 +1040,12 @@ async function De(e, t) {
1040
1040
  return W.polygon(t, l, e);
1041
1041
  }, i;
1042
1042
  }
1043
- t(De, "hexagon");
1044
- async function Oe(t, n) {
1045
- let { labelStyles: r, nodeStyles: i } = y(n);
1046
- n.label = "", n.labelStyle = r;
1047
- let { shapeSvg: a } = await C(t, n, E(n)), o = Math.max(30, n?.width ?? 0), s = Math.max(30, n?.height ?? 0), { cssStyles: c } = n, l = S.svg(a), u = v(n, {});
1048
- n.look !== "handDrawn" && (u.roughness = 0, u.fillStyle = "solid");
1043
+ i(De, "hexagon");
1044
+ async function Oe(e, t) {
1045
+ let { labelStyles: n, nodeStyles: i } = y(t);
1046
+ t.label = "", t.labelStyle = n;
1047
+ let { shapeSvg: a } = await C(e, t, E(t)), o = Math.max(30, t?.width ?? 0), s = Math.max(30, t?.height ?? 0), { cssStyles: c } = t, l = S.svg(a), u = v(t, {});
1048
+ t.look !== "handDrawn" && (u.roughness = 0, u.fillStyle = "solid");
1049
1049
  let d = [
1050
1050
  {
1051
1051
  x: 0,
@@ -1064,118 +1064,118 @@ async function Oe(t, n) {
1064
1064
  y: s
1065
1065
  }
1066
1066
  ], f = D(d), p = l.path(f, u), m = a.insert(() => p, ":first-child");
1067
- return m.attr("class", "basic label-container"), c && n.look !== "handDrawn" && m.selectChildren("path").attr("style", c), i && n.look !== "handDrawn" && m.selectChildren("path").attr("style", i), m.attr("transform", `translate(${-o / 2}, ${-s / 2})`), T(n, m), n.intersect = function(t) {
1068
- return e.info("Pill intersect", n, { points: d }), W.polygon(n, d, t);
1067
+ return m.attr("class", "basic label-container"), c && t.look !== "handDrawn" && m.selectChildren("path").attr("style", c), i && t.look !== "handDrawn" && m.selectChildren("path").attr("style", i), m.attr("transform", `translate(${-o / 2}, ${-s / 2})`), T(t, m), t.intersect = function(e) {
1068
+ return r.info("Pill intersect", t, { points: d }), W.polygon(t, d, e);
1069
1069
  }, a;
1070
1070
  }
1071
- t(Oe, "hourglass");
1072
- async function ke(t, n, { config: { themeVariables: r, flowchart: i } }) {
1073
- let { labelStyles: a } = y(n);
1074
- n.labelStyle = a;
1075
- let o = n.assetHeight ?? 48, s = n.assetWidth ?? 48, c = Math.max(o, s), l = i?.wrappingWidth;
1076
- n.width = Math.max(c, l ?? 0);
1077
- let { shapeSvg: u, bbox: d, label: f } = await C(t, n, "icon-shape default"), p = n.pos === "t", m = c, g = c, { nodeBorder: _ } = r, { stylesMap: b } = x(n), w = -g / 2, E = -m / 2, D = n.label ? 8 : 0, O = S.svg(u), k = v(n, {
1071
+ i(Oe, "hourglass");
1072
+ async function ke(e, t, { config: { themeVariables: n, flowchart: i } }) {
1073
+ let { labelStyles: a } = y(t);
1074
+ t.labelStyle = a;
1075
+ let o = t.assetHeight ?? 48, s = t.assetWidth ?? 48, c = Math.max(o, s), l = i?.wrappingWidth;
1076
+ t.width = Math.max(c, l ?? 0);
1077
+ let { shapeSvg: u, bbox: d, label: f } = await C(e, t, "icon-shape default"), p = t.pos === "t", m = c, g = c, { nodeBorder: _ } = n, { stylesMap: b } = x(t), w = -g / 2, E = -m / 2, D = t.label ? 8 : 0, O = S.svg(u), k = v(t, {
1078
1078
  stroke: "none",
1079
1079
  fill: "none"
1080
1080
  });
1081
- n.look !== "handDrawn" && (k.roughness = 0, k.fillStyle = "solid");
1081
+ t.look !== "handDrawn" && (k.roughness = 0, k.fillStyle = "solid");
1082
1082
  let A = O.rectangle(w, E, g, m, k), j = Math.max(g, d.width), M = m + d.height + D, N = O.rectangle(-j / 2, -M / 2, j, M, {
1083
1083
  ...k,
1084
1084
  fill: "transparent",
1085
1085
  stroke: "none"
1086
1086
  }), P = u.insert(() => A, ":first-child"), F = u.insert(() => N);
1087
- if (n.icon) {
1087
+ if (t.icon) {
1088
1088
  let e = u.append("g");
1089
- e.html(`<g>${await h(n.icon, {
1089
+ e.html(`<g>${await h(t.icon, {
1090
1090
  height: c,
1091
1091
  width: c,
1092
1092
  fallbackPrefix: ""
1093
1093
  })}</g>`);
1094
- let t = e.node().getBBox(), r = t.width, i = t.height, a = t.x, o = t.y;
1094
+ let n = e.node().getBBox(), r = n.width, i = n.height, a = n.x, o = n.y;
1095
1095
  e.attr("transform", `translate(${-r / 2 - a},${p ? d.height / 2 + D / 2 - i / 2 - o : -d.height / 2 - D / 2 - i / 2 - o})`), e.attr("style", `color: ${b.get("stroke") ?? _};`);
1096
1096
  }
1097
- return f.attr("transform", `translate(${-d.width / 2 - (d.x - (d.left ?? 0))},${p ? -M / 2 : M / 2 - d.height})`), P.attr("transform", `translate(0,${p ? d.height / 2 + D / 2 : -d.height / 2 - D / 2})`), T(n, F), n.intersect = function(t) {
1098
- if (e.info("iconSquare intersect", n, t), !n.label) return W.rect(n, t);
1099
- let r = n.x ?? 0, i = n.y ?? 0, a = n.height ?? 0, o = [];
1097
+ return f.attr("transform", `translate(${-d.width / 2 - (d.x - (d.left ?? 0))},${p ? -M / 2 : M / 2 - d.height})`), P.attr("transform", `translate(0,${p ? d.height / 2 + D / 2 : -d.height / 2 - D / 2})`), T(t, F), t.intersect = function(e) {
1098
+ if (r.info("iconSquare intersect", t, e), !t.label) return W.rect(t, e);
1099
+ let n = t.x ?? 0, i = t.y ?? 0, a = t.height ?? 0, o = [];
1100
1100
  return o = p ? [
1101
1101
  {
1102
- x: r - d.width / 2,
1102
+ x: n - d.width / 2,
1103
1103
  y: i - a / 2
1104
1104
  },
1105
1105
  {
1106
- x: r + d.width / 2,
1106
+ x: n + d.width / 2,
1107
1107
  y: i - a / 2
1108
1108
  },
1109
1109
  {
1110
- x: r + d.width / 2,
1110
+ x: n + d.width / 2,
1111
1111
  y: i - a / 2 + d.height + D
1112
1112
  },
1113
1113
  {
1114
- x: r + g / 2,
1114
+ x: n + g / 2,
1115
1115
  y: i - a / 2 + d.height + D
1116
1116
  },
1117
1117
  {
1118
- x: r + g / 2,
1118
+ x: n + g / 2,
1119
1119
  y: i + a / 2
1120
1120
  },
1121
1121
  {
1122
- x: r - g / 2,
1122
+ x: n - g / 2,
1123
1123
  y: i + a / 2
1124
1124
  },
1125
1125
  {
1126
- x: r - g / 2,
1126
+ x: n - g / 2,
1127
1127
  y: i - a / 2 + d.height + D
1128
1128
  },
1129
1129
  {
1130
- x: r - d.width / 2,
1130
+ x: n - d.width / 2,
1131
1131
  y: i - a / 2 + d.height + D
1132
1132
  }
1133
1133
  ] : [
1134
1134
  {
1135
- x: r - g / 2,
1135
+ x: n - g / 2,
1136
1136
  y: i - a / 2
1137
1137
  },
1138
1138
  {
1139
- x: r + g / 2,
1139
+ x: n + g / 2,
1140
1140
  y: i - a / 2
1141
1141
  },
1142
1142
  {
1143
- x: r + g / 2,
1143
+ x: n + g / 2,
1144
1144
  y: i - a / 2 + m
1145
1145
  },
1146
1146
  {
1147
- x: r + d.width / 2,
1147
+ x: n + d.width / 2,
1148
1148
  y: i - a / 2 + m
1149
1149
  },
1150
1150
  {
1151
- x: r + d.width / 2 / 2,
1151
+ x: n + d.width / 2 / 2,
1152
1152
  y: i + a / 2
1153
1153
  },
1154
1154
  {
1155
- x: r - d.width / 2,
1155
+ x: n - d.width / 2,
1156
1156
  y: i + a / 2
1157
1157
  },
1158
1158
  {
1159
- x: r - d.width / 2,
1159
+ x: n - d.width / 2,
1160
1160
  y: i - a / 2 + m
1161
1161
  },
1162
1162
  {
1163
- x: r - g / 2,
1163
+ x: n - g / 2,
1164
1164
  y: i - a / 2 + m
1165
1165
  }
1166
- ], W.polygon(n, o, t);
1166
+ ], W.polygon(t, o, e);
1167
1167
  }, u;
1168
1168
  }
1169
- t(ke, "icon");
1170
- async function Ae(t, n, { config: { themeVariables: r, flowchart: i } }) {
1171
- let { labelStyles: a } = y(n);
1172
- n.labelStyle = a;
1173
- let o = n.assetHeight ?? 48, s = n.assetWidth ?? 48, c = Math.max(o, s), l = i?.wrappingWidth;
1174
- n.width = Math.max(c, l ?? 0);
1175
- let { shapeSvg: u, bbox: d, label: f } = await C(t, n, "icon-shape default"), p = n.label ? 8 : 0, m = n.pos === "t", { nodeBorder: g, mainBkg: _ } = r, { stylesMap: b } = x(n), w = S.svg(u), E = v(n, {});
1176
- n.look !== "handDrawn" && (E.roughness = 0, E.fillStyle = "solid"), E.stroke = b.get("fill") ?? _;
1169
+ i(ke, "icon");
1170
+ async function Ae(e, t, { config: { themeVariables: n, flowchart: i } }) {
1171
+ let { labelStyles: a } = y(t);
1172
+ t.labelStyle = a;
1173
+ let o = t.assetHeight ?? 48, s = t.assetWidth ?? 48, c = Math.max(o, s), l = i?.wrappingWidth;
1174
+ t.width = Math.max(c, l ?? 0);
1175
+ let { shapeSvg: u, bbox: d, label: f } = await C(e, t, "icon-shape default"), p = t.label ? 8 : 0, m = t.pos === "t", { nodeBorder: g, mainBkg: _ } = n, { stylesMap: b } = x(t), w = S.svg(u), E = v(t, {});
1176
+ t.look !== "handDrawn" && (E.roughness = 0, E.fillStyle = "solid"), E.stroke = b.get("fill") ?? _;
1177
1177
  let D = u.append("g");
1178
- n.icon && D.html(`<g>${await h(n.icon, {
1178
+ t.icon && D.html(`<g>${await h(t.icon, {
1179
1179
  height: c,
1180
1180
  width: c,
1181
1181
  fallbackPrefix: ""
@@ -1185,296 +1185,296 @@ async function Ae(t, n, { config: { themeVariables: r, flowchart: i } }) {
1185
1185
  fill: "transparent",
1186
1186
  stroke: "none"
1187
1187
  }), R = u.insert(() => P, ":first-child"), z = u.insert(() => L);
1188
- return D.attr("transform", `translate(${-k / 2 - j},${m ? d.height / 2 + p / 2 - A / 2 - M : -d.height / 2 - p / 2 - A / 2 - M})`), D.attr("style", `color: ${b.get("stroke") ?? g};`), f.attr("transform", `translate(${-d.width / 2 - (d.x - (d.left ?? 0))},${m ? -I / 2 : I / 2 - d.height})`), R.attr("transform", `translate(0,${m ? d.height / 2 + p / 2 : -d.height / 2 - p / 2})`), T(n, z), n.intersect = function(t) {
1189
- return e.info("iconSquare intersect", n, t), W.rect(n, t);
1188
+ return D.attr("transform", `translate(${-k / 2 - j},${m ? d.height / 2 + p / 2 - A / 2 - M : -d.height / 2 - p / 2 - A / 2 - M})`), D.attr("style", `color: ${b.get("stroke") ?? g};`), f.attr("transform", `translate(${-d.width / 2 - (d.x - (d.left ?? 0))},${m ? -I / 2 : I / 2 - d.height})`), R.attr("transform", `translate(0,${m ? d.height / 2 + p / 2 : -d.height / 2 - p / 2})`), T(t, z), t.intersect = function(e) {
1189
+ return r.info("iconSquare intersect", t, e), W.rect(t, e);
1190
1190
  }, u;
1191
1191
  }
1192
- t(Ae, "iconCircle");
1193
- async function je(t, n, { config: { themeVariables: r, flowchart: i } }) {
1194
- let { labelStyles: a } = y(n);
1195
- n.labelStyle = a;
1196
- let o = n.assetHeight ?? 48, s = n.assetWidth ?? 48, c = Math.max(o, s), l = i?.wrappingWidth;
1197
- n.width = Math.max(c, l ?? 0);
1198
- let { shapeSvg: u, bbox: d, halfPadding: f, label: p } = await C(t, n, "icon-shape default"), m = n.pos === "t", g = c + f * 2, _ = c + f * 2, { nodeBorder: b, mainBkg: w } = r, { stylesMap: E } = x(n), D = -_ / 2, O = -g / 2, k = n.label ? 8 : 0, A = S.svg(u), j = v(n, {});
1199
- n.look !== "handDrawn" && (j.roughness = 0, j.fillStyle = "solid"), j.stroke = E.get("fill") ?? w;
1192
+ i(Ae, "iconCircle");
1193
+ async function je(e, t, { config: { themeVariables: n, flowchart: i } }) {
1194
+ let { labelStyles: a } = y(t);
1195
+ t.labelStyle = a;
1196
+ let o = t.assetHeight ?? 48, s = t.assetWidth ?? 48, c = Math.max(o, s), l = i?.wrappingWidth;
1197
+ t.width = Math.max(c, l ?? 0);
1198
+ let { shapeSvg: u, bbox: d, halfPadding: f, label: p } = await C(e, t, "icon-shape default"), m = t.pos === "t", g = c + f * 2, _ = c + f * 2, { nodeBorder: b, mainBkg: w } = n, { stylesMap: E } = x(t), D = -_ / 2, O = -g / 2, k = t.label ? 8 : 0, A = S.svg(u), j = v(t, {});
1199
+ t.look !== "handDrawn" && (j.roughness = 0, j.fillStyle = "solid"), j.stroke = E.get("fill") ?? w;
1200
1200
  let N = A.path(M(D, O, _, g, 5), j), P = Math.max(_, d.width), F = g + d.height + k, I = A.rectangle(-P / 2, -F / 2, P, F, {
1201
1201
  ...j,
1202
1202
  fill: "transparent",
1203
1203
  stroke: "none"
1204
1204
  }), L = u.insert(() => N, ":first-child").attr("class", "icon-shape2"), R = u.insert(() => I);
1205
- if (n.icon) {
1205
+ if (t.icon) {
1206
1206
  let e = u.append("g");
1207
- e.html(`<g>${await h(n.icon, {
1207
+ e.html(`<g>${await h(t.icon, {
1208
1208
  height: c,
1209
1209
  width: c,
1210
1210
  fallbackPrefix: ""
1211
1211
  })}</g>`);
1212
- let t = e.node().getBBox(), r = t.width, i = t.height, a = t.x, o = t.y;
1212
+ let n = e.node().getBBox(), r = n.width, i = n.height, a = n.x, o = n.y;
1213
1213
  e.attr("transform", `translate(${-r / 2 - a},${m ? d.height / 2 + k / 2 - i / 2 - o : -d.height / 2 - k / 2 - i / 2 - o})`), e.attr("style", `color: ${E.get("stroke") ?? b};`);
1214
1214
  }
1215
- return p.attr("transform", `translate(${-d.width / 2 - (d.x - (d.left ?? 0))},${m ? -F / 2 : F / 2 - d.height})`), L.attr("transform", `translate(0,${m ? d.height / 2 + k / 2 : -d.height / 2 - k / 2})`), T(n, R), n.intersect = function(t) {
1216
- if (e.info("iconSquare intersect", n, t), !n.label) return W.rect(n, t);
1217
- let r = n.x ?? 0, i = n.y ?? 0, a = n.height ?? 0, o = [];
1215
+ return p.attr("transform", `translate(${-d.width / 2 - (d.x - (d.left ?? 0))},${m ? -F / 2 : F / 2 - d.height})`), L.attr("transform", `translate(0,${m ? d.height / 2 + k / 2 : -d.height / 2 - k / 2})`), T(t, R), t.intersect = function(e) {
1216
+ if (r.info("iconSquare intersect", t, e), !t.label) return W.rect(t, e);
1217
+ let n = t.x ?? 0, i = t.y ?? 0, a = t.height ?? 0, o = [];
1218
1218
  return o = m ? [
1219
1219
  {
1220
- x: r - d.width / 2,
1220
+ x: n - d.width / 2,
1221
1221
  y: i - a / 2
1222
1222
  },
1223
1223
  {
1224
- x: r + d.width / 2,
1224
+ x: n + d.width / 2,
1225
1225
  y: i - a / 2
1226
1226
  },
1227
1227
  {
1228
- x: r + d.width / 2,
1228
+ x: n + d.width / 2,
1229
1229
  y: i - a / 2 + d.height + k
1230
1230
  },
1231
1231
  {
1232
- x: r + _ / 2,
1232
+ x: n + _ / 2,
1233
1233
  y: i - a / 2 + d.height + k
1234
1234
  },
1235
1235
  {
1236
- x: r + _ / 2,
1236
+ x: n + _ / 2,
1237
1237
  y: i + a / 2
1238
1238
  },
1239
1239
  {
1240
- x: r - _ / 2,
1240
+ x: n - _ / 2,
1241
1241
  y: i + a / 2
1242
1242
  },
1243
1243
  {
1244
- x: r - _ / 2,
1244
+ x: n - _ / 2,
1245
1245
  y: i - a / 2 + d.height + k
1246
1246
  },
1247
1247
  {
1248
- x: r - d.width / 2,
1248
+ x: n - d.width / 2,
1249
1249
  y: i - a / 2 + d.height + k
1250
1250
  }
1251
1251
  ] : [
1252
1252
  {
1253
- x: r - _ / 2,
1253
+ x: n - _ / 2,
1254
1254
  y: i - a / 2
1255
1255
  },
1256
1256
  {
1257
- x: r + _ / 2,
1257
+ x: n + _ / 2,
1258
1258
  y: i - a / 2
1259
1259
  },
1260
1260
  {
1261
- x: r + _ / 2,
1261
+ x: n + _ / 2,
1262
1262
  y: i - a / 2 + g
1263
1263
  },
1264
1264
  {
1265
- x: r + d.width / 2,
1265
+ x: n + d.width / 2,
1266
1266
  y: i - a / 2 + g
1267
1267
  },
1268
1268
  {
1269
- x: r + d.width / 2 / 2,
1269
+ x: n + d.width / 2 / 2,
1270
1270
  y: i + a / 2
1271
1271
  },
1272
1272
  {
1273
- x: r - d.width / 2,
1273
+ x: n - d.width / 2,
1274
1274
  y: i + a / 2
1275
1275
  },
1276
1276
  {
1277
- x: r - d.width / 2,
1277
+ x: n - d.width / 2,
1278
1278
  y: i - a / 2 + g
1279
1279
  },
1280
1280
  {
1281
- x: r - _ / 2,
1281
+ x: n - _ / 2,
1282
1282
  y: i - a / 2 + g
1283
1283
  }
1284
- ], W.polygon(n, o, t);
1284
+ ], W.polygon(t, o, e);
1285
1285
  }, u;
1286
1286
  }
1287
- t(je, "iconRounded");
1288
- async function Me(t, n, { config: { themeVariables: r, flowchart: i } }) {
1289
- let { labelStyles: a } = y(n);
1290
- n.labelStyle = a;
1291
- let o = n.assetHeight ?? 48, s = n.assetWidth ?? 48, c = Math.max(o, s), l = i?.wrappingWidth;
1292
- n.width = Math.max(c, l ?? 0);
1293
- let { shapeSvg: u, bbox: d, halfPadding: f, label: p } = await C(t, n, "icon-shape default"), m = n.pos === "t", g = c + f * 2, _ = c + f * 2, { nodeBorder: b, mainBkg: w } = r, { stylesMap: E } = x(n), D = -_ / 2, O = -g / 2, k = n.label ? 8 : 0, A = S.svg(u), j = v(n, {});
1294
- n.look !== "handDrawn" && (j.roughness = 0, j.fillStyle = "solid"), j.stroke = E.get("fill") ?? w;
1287
+ i(je, "iconRounded");
1288
+ async function Me(e, t, { config: { themeVariables: n, flowchart: i } }) {
1289
+ let { labelStyles: a } = y(t);
1290
+ t.labelStyle = a;
1291
+ let o = t.assetHeight ?? 48, s = t.assetWidth ?? 48, c = Math.max(o, s), l = i?.wrappingWidth;
1292
+ t.width = Math.max(c, l ?? 0);
1293
+ let { shapeSvg: u, bbox: d, halfPadding: f, label: p } = await C(e, t, "icon-shape default"), m = t.pos === "t", g = c + f * 2, _ = c + f * 2, { nodeBorder: b, mainBkg: w } = n, { stylesMap: E } = x(t), D = -_ / 2, O = -g / 2, k = t.label ? 8 : 0, A = S.svg(u), j = v(t, {});
1294
+ t.look !== "handDrawn" && (j.roughness = 0, j.fillStyle = "solid"), j.stroke = E.get("fill") ?? w;
1295
1295
  let N = A.path(M(D, O, _, g, .1), j), P = Math.max(_, d.width), F = g + d.height + k, I = A.rectangle(-P / 2, -F / 2, P, F, {
1296
1296
  ...j,
1297
1297
  fill: "transparent",
1298
1298
  stroke: "none"
1299
1299
  }), L = u.insert(() => N, ":first-child"), R = u.insert(() => I);
1300
- if (n.icon) {
1300
+ if (t.icon) {
1301
1301
  let e = u.append("g");
1302
- e.html(`<g>${await h(n.icon, {
1302
+ e.html(`<g>${await h(t.icon, {
1303
1303
  height: c,
1304
1304
  width: c,
1305
1305
  fallbackPrefix: ""
1306
1306
  })}</g>`);
1307
- let t = e.node().getBBox(), r = t.width, i = t.height, a = t.x, o = t.y;
1307
+ let n = e.node().getBBox(), r = n.width, i = n.height, a = n.x, o = n.y;
1308
1308
  e.attr("transform", `translate(${-r / 2 - a},${m ? d.height / 2 + k / 2 - i / 2 - o : -d.height / 2 - k / 2 - i / 2 - o})`), e.attr("style", `color: ${E.get("stroke") ?? b};`);
1309
1309
  }
1310
- return p.attr("transform", `translate(${-d.width / 2 - (d.x - (d.left ?? 0))},${m ? -F / 2 : F / 2 - d.height})`), L.attr("transform", `translate(0,${m ? d.height / 2 + k / 2 : -d.height / 2 - k / 2})`), T(n, R), n.intersect = function(t) {
1311
- if (e.info("iconSquare intersect", n, t), !n.label) return W.rect(n, t);
1312
- let r = n.x ?? 0, i = n.y ?? 0, a = n.height ?? 0, o = [];
1310
+ return p.attr("transform", `translate(${-d.width / 2 - (d.x - (d.left ?? 0))},${m ? -F / 2 : F / 2 - d.height})`), L.attr("transform", `translate(0,${m ? d.height / 2 + k / 2 : -d.height / 2 - k / 2})`), T(t, R), t.intersect = function(e) {
1311
+ if (r.info("iconSquare intersect", t, e), !t.label) return W.rect(t, e);
1312
+ let n = t.x ?? 0, i = t.y ?? 0, a = t.height ?? 0, o = [];
1313
1313
  return o = m ? [
1314
1314
  {
1315
- x: r - d.width / 2,
1315
+ x: n - d.width / 2,
1316
1316
  y: i - a / 2
1317
1317
  },
1318
1318
  {
1319
- x: r + d.width / 2,
1319
+ x: n + d.width / 2,
1320
1320
  y: i - a / 2
1321
1321
  },
1322
1322
  {
1323
- x: r + d.width / 2,
1323
+ x: n + d.width / 2,
1324
1324
  y: i - a / 2 + d.height + k
1325
1325
  },
1326
1326
  {
1327
- x: r + _ / 2,
1327
+ x: n + _ / 2,
1328
1328
  y: i - a / 2 + d.height + k
1329
1329
  },
1330
1330
  {
1331
- x: r + _ / 2,
1331
+ x: n + _ / 2,
1332
1332
  y: i + a / 2
1333
1333
  },
1334
1334
  {
1335
- x: r - _ / 2,
1335
+ x: n - _ / 2,
1336
1336
  y: i + a / 2
1337
1337
  },
1338
1338
  {
1339
- x: r - _ / 2,
1339
+ x: n - _ / 2,
1340
1340
  y: i - a / 2 + d.height + k
1341
1341
  },
1342
1342
  {
1343
- x: r - d.width / 2,
1343
+ x: n - d.width / 2,
1344
1344
  y: i - a / 2 + d.height + k
1345
1345
  }
1346
1346
  ] : [
1347
1347
  {
1348
- x: r - _ / 2,
1348
+ x: n - _ / 2,
1349
1349
  y: i - a / 2
1350
1350
  },
1351
1351
  {
1352
- x: r + _ / 2,
1352
+ x: n + _ / 2,
1353
1353
  y: i - a / 2
1354
1354
  },
1355
1355
  {
1356
- x: r + _ / 2,
1356
+ x: n + _ / 2,
1357
1357
  y: i - a / 2 + g
1358
1358
  },
1359
1359
  {
1360
- x: r + d.width / 2,
1360
+ x: n + d.width / 2,
1361
1361
  y: i - a / 2 + g
1362
1362
  },
1363
1363
  {
1364
- x: r + d.width / 2 / 2,
1364
+ x: n + d.width / 2 / 2,
1365
1365
  y: i + a / 2
1366
1366
  },
1367
1367
  {
1368
- x: r - d.width / 2,
1368
+ x: n - d.width / 2,
1369
1369
  y: i + a / 2
1370
1370
  },
1371
1371
  {
1372
- x: r - d.width / 2,
1372
+ x: n - d.width / 2,
1373
1373
  y: i - a / 2 + g
1374
1374
  },
1375
1375
  {
1376
- x: r - _ / 2,
1376
+ x: n - _ / 2,
1377
1377
  y: i - a / 2 + g
1378
1378
  }
1379
- ], W.polygon(n, o, t);
1379
+ ], W.polygon(t, o, e);
1380
1380
  }, u;
1381
1381
  }
1382
- t(Me, "iconSquare");
1383
- async function Ne(t, n, { config: { flowchart: r } }) {
1382
+ i(Me, "iconSquare");
1383
+ async function Ne(e, t, { config: { flowchart: n } }) {
1384
1384
  let i = new Image();
1385
- i.src = n?.img ?? "", await i.decode();
1385
+ i.src = t?.img ?? "", await i.decode();
1386
1386
  let a = Number(i.naturalWidth.toString().replace("px", "")), o = Number(i.naturalHeight.toString().replace("px", ""));
1387
- n.imageAspectRatio = a / o;
1388
- let { labelStyles: s } = y(n);
1389
- n.labelStyle = s;
1390
- let c = r?.wrappingWidth;
1391
- n.defaultWidth = r?.wrappingWidth;
1392
- let l = Math.max(n.label ? c ?? 0 : 0, n?.assetWidth ?? a), u = n.constraint === "on" && n?.assetHeight ? n.assetHeight * n.imageAspectRatio : l, d = n.constraint === "on" ? u / n.imageAspectRatio : n?.assetHeight ?? o;
1393
- n.width = Math.max(u, c ?? 0);
1394
- let { shapeSvg: f, bbox: p, label: m } = await C(t, n, "image-shape default"), h = n.pos === "t", g = -u / 2, _ = -d / 2, b = n.label ? 8 : 0, x = S.svg(f), w = v(n, {});
1395
- n.look !== "handDrawn" && (w.roughness = 0, w.fillStyle = "solid");
1387
+ t.imageAspectRatio = a / o;
1388
+ let { labelStyles: s } = y(t);
1389
+ t.labelStyle = s;
1390
+ let c = n?.wrappingWidth;
1391
+ t.defaultWidth = n?.wrappingWidth;
1392
+ let l = Math.max(t.label ? c ?? 0 : 0, t?.assetWidth ?? a), u = t.constraint === "on" && t?.assetHeight ? t.assetHeight * t.imageAspectRatio : l, d = t.constraint === "on" ? u / t.imageAspectRatio : t?.assetHeight ?? o;
1393
+ t.width = Math.max(u, c ?? 0);
1394
+ let { shapeSvg: f, bbox: p, label: m } = await C(e, t, "image-shape default"), h = t.pos === "t", g = -u / 2, _ = -d / 2, b = t.label ? 8 : 0, x = S.svg(f), w = v(t, {});
1395
+ t.look !== "handDrawn" && (w.roughness = 0, w.fillStyle = "solid");
1396
1396
  let E = x.rectangle(g, _, u, d, w), D = Math.max(u, p.width), O = d + p.height + b, k = x.rectangle(-D / 2, -O / 2, D, O, {
1397
1397
  ...w,
1398
1398
  fill: "none",
1399
1399
  stroke: "none"
1400
1400
  }), A = f.insert(() => E, ":first-child"), j = f.insert(() => k);
1401
- if (n.img) {
1401
+ if (t.img) {
1402
1402
  let e = f.append("image");
1403
- e.attr("href", n.img), e.attr("width", u), e.attr("height", d), e.attr("preserveAspectRatio", "none"), e.attr("transform", `translate(${-u / 2},${h ? O / 2 - d : -O / 2})`);
1403
+ e.attr("href", t.img), e.attr("width", u), e.attr("height", d), e.attr("preserveAspectRatio", "none"), e.attr("transform", `translate(${-u / 2},${h ? O / 2 - d : -O / 2})`);
1404
1404
  }
1405
- return m.attr("transform", `translate(${-p.width / 2 - (p.x - (p.left ?? 0))},${h ? -d / 2 - p.height / 2 - b / 2 : d / 2 - p.height / 2 + b / 2})`), A.attr("transform", `translate(0,${h ? p.height / 2 + b / 2 : -p.height / 2 - b / 2})`), T(n, j), n.intersect = function(t) {
1406
- if (e.info("iconSquare intersect", n, t), !n.label) return W.rect(n, t);
1407
- let r = n.x ?? 0, i = n.y ?? 0, a = n.height ?? 0, o = [];
1405
+ return m.attr("transform", `translate(${-p.width / 2 - (p.x - (p.left ?? 0))},${h ? -d / 2 - p.height / 2 - b / 2 : d / 2 - p.height / 2 + b / 2})`), A.attr("transform", `translate(0,${h ? p.height / 2 + b / 2 : -p.height / 2 - b / 2})`), T(t, j), t.intersect = function(e) {
1406
+ if (r.info("iconSquare intersect", t, e), !t.label) return W.rect(t, e);
1407
+ let n = t.x ?? 0, i = t.y ?? 0, a = t.height ?? 0, o = [];
1408
1408
  return o = h ? [
1409
1409
  {
1410
- x: r - p.width / 2,
1410
+ x: n - p.width / 2,
1411
1411
  y: i - a / 2
1412
1412
  },
1413
1413
  {
1414
- x: r + p.width / 2,
1414
+ x: n + p.width / 2,
1415
1415
  y: i - a / 2
1416
1416
  },
1417
1417
  {
1418
- x: r + p.width / 2,
1418
+ x: n + p.width / 2,
1419
1419
  y: i - a / 2 + p.height + b
1420
1420
  },
1421
1421
  {
1422
- x: r + u / 2,
1422
+ x: n + u / 2,
1423
1423
  y: i - a / 2 + p.height + b
1424
1424
  },
1425
1425
  {
1426
- x: r + u / 2,
1426
+ x: n + u / 2,
1427
1427
  y: i + a / 2
1428
1428
  },
1429
1429
  {
1430
- x: r - u / 2,
1430
+ x: n - u / 2,
1431
1431
  y: i + a / 2
1432
1432
  },
1433
1433
  {
1434
- x: r - u / 2,
1434
+ x: n - u / 2,
1435
1435
  y: i - a / 2 + p.height + b
1436
1436
  },
1437
1437
  {
1438
- x: r - p.width / 2,
1438
+ x: n - p.width / 2,
1439
1439
  y: i - a / 2 + p.height + b
1440
1440
  }
1441
1441
  ] : [
1442
1442
  {
1443
- x: r - u / 2,
1443
+ x: n - u / 2,
1444
1444
  y: i - a / 2
1445
1445
  },
1446
1446
  {
1447
- x: r + u / 2,
1447
+ x: n + u / 2,
1448
1448
  y: i - a / 2
1449
1449
  },
1450
1450
  {
1451
- x: r + u / 2,
1451
+ x: n + u / 2,
1452
1452
  y: i - a / 2 + d
1453
1453
  },
1454
1454
  {
1455
- x: r + p.width / 2,
1455
+ x: n + p.width / 2,
1456
1456
  y: i - a / 2 + d
1457
1457
  },
1458
1458
  {
1459
- x: r + p.width / 2 / 2,
1459
+ x: n + p.width / 2 / 2,
1460
1460
  y: i + a / 2
1461
1461
  },
1462
1462
  {
1463
- x: r - p.width / 2,
1463
+ x: n - p.width / 2,
1464
1464
  y: i + a / 2
1465
1465
  },
1466
1466
  {
1467
- x: r - p.width / 2,
1467
+ x: n - p.width / 2,
1468
1468
  y: i - a / 2 + d
1469
1469
  },
1470
1470
  {
1471
- x: r - u / 2,
1471
+ x: n - u / 2,
1472
1472
  y: i - a / 2 + d
1473
1473
  }
1474
- ], W.polygon(n, o, t);
1474
+ ], W.polygon(t, o, e);
1475
1475
  }, f;
1476
1476
  }
1477
- t(Ne, "imageSquare");
1477
+ i(Ne, "imageSquare");
1478
1478
  async function Pe(e, t) {
1479
1479
  let { labelStyles: n, nodeStyles: r } = y(t);
1480
1480
  t.labelStyle = n;
@@ -1504,29 +1504,29 @@ async function Pe(e, t) {
1504
1504
  return W.polygon(t, c, e);
1505
1505
  }, i;
1506
1506
  }
1507
- t(Pe, "inv_trapezoid");
1508
- async function Y(e, t, n) {
1509
- let { labelStyles: r, nodeStyles: a } = y(t);
1510
- t.labelStyle = r;
1511
- let { shapeSvg: o, bbox: s } = await C(e, t, E(t)), c = Math.max(s.width + n.labelPaddingX * 2, t?.width || 0), l = Math.max(s.height + n.labelPaddingY * 2, t?.height || 0), u = -c / 2, d = -l / 2, f, { rx: p, ry: m } = t, { cssStyles: h } = t;
1512
- if (n?.rx && n.ry && (p = n.rx, m = n.ry), t.look === "handDrawn") {
1513
- let e = S.svg(o), n = v(t, {}), r = p || m ? e.path(M(u, d, c, l, p || 0), n) : e.rectangle(u, d, c, l, n);
1514
- f = o.insert(() => r, ":first-child"), f.attr("class", "basic label-container").attr("style", i(h));
1515
- } else f = o.insert("rect", ":first-child"), f.attr("class", "basic label-container").attr("style", a).attr("rx", i(p)).attr("ry", i(m)).attr("x", u).attr("y", d).attr("width", c).attr("height", l);
1516
- return T(t, f), t.calcIntersect = function(e, t) {
1507
+ i(Pe, "inv_trapezoid");
1508
+ async function Y(e, n, r) {
1509
+ let { labelStyles: i, nodeStyles: a } = y(n);
1510
+ n.labelStyle = i;
1511
+ let { shapeSvg: o, bbox: s } = await C(e, n, E(n)), c = Math.max(s.width + r.labelPaddingX * 2, n?.width || 0), l = Math.max(s.height + r.labelPaddingY * 2, n?.height || 0), u = -c / 2, d = -l / 2, f, { rx: p, ry: m } = n, { cssStyles: h } = n;
1512
+ if (r?.rx && r.ry && (p = r.rx, m = r.ry), n.look === "handDrawn") {
1513
+ let e = S.svg(o), r = v(n, {}), i = p || m ? e.path(M(u, d, c, l, p || 0), r) : e.rectangle(u, d, c, l, r);
1514
+ f = o.insert(() => i, ":first-child"), f.attr("class", "basic label-container").attr("style", t(h));
1515
+ } else f = o.insert("rect", ":first-child"), f.attr("class", "basic label-container").attr("style", a).attr("rx", t(p)).attr("ry", t(m)).attr("x", u).attr("y", d).attr("width", c).attr("height", l);
1516
+ return T(n, f), n.calcIntersect = function(e, t) {
1517
1517
  return W.rect(e, t);
1518
- }, t.intersect = function(e) {
1519
- return W.rect(t, e);
1518
+ }, n.intersect = function(e) {
1519
+ return W.rect(n, e);
1520
1520
  }, o;
1521
1521
  }
1522
- t(Y, "drawRect");
1522
+ i(Y, "drawRect");
1523
1523
  async function Fe(e, t) {
1524
1524
  let { shapeSvg: n, bbox: r, label: i } = await C(e, t, "label"), a = n.insert("rect", ":first-child");
1525
1525
  return a.attr("width", .1).attr("height", .1), n.attr("class", "label edgeLabel"), i.attr("transform", `translate(${-(r.width / 2) - (r.x - (r.left ?? 0))}, ${-(r.height / 2) - (r.y - (r.top ?? 0))})`), T(t, a), t.intersect = function(e) {
1526
1526
  return W.rect(t, e);
1527
1527
  }, n;
1528
1528
  }
1529
- t(Fe, "labelRect");
1529
+ i(Fe, "labelRect");
1530
1530
  async function Ie(e, t) {
1531
1531
  let { labelStyles: n, nodeStyles: r } = y(t);
1532
1532
  t.labelStyle = n;
@@ -1556,7 +1556,7 @@ async function Ie(e, t) {
1556
1556
  return W.polygon(t, c, e);
1557
1557
  }, i;
1558
1558
  }
1559
- t(Ie, "lean_left");
1559
+ i(Ie, "lean_left");
1560
1560
  async function Le(e, t) {
1561
1561
  let { labelStyles: n, nodeStyles: r } = y(t);
1562
1562
  t.labelStyle = n;
@@ -1586,11 +1586,11 @@ async function Le(e, t) {
1586
1586
  return W.polygon(t, c, e);
1587
1587
  }, i;
1588
1588
  }
1589
- t(Le, "lean_right");
1590
- function Re(t, n) {
1591
- let { labelStyles: r, nodeStyles: i } = y(n);
1592
- n.label = "", n.labelStyle = r;
1593
- let a = t.insert("g").attr("class", E(n)).attr("id", n.domId ?? n.id), { cssStyles: o } = n, s = Math.max(35, n?.width ?? 0), c = Math.max(35, n?.height ?? 0), l = [
1589
+ i(Le, "lean_right");
1590
+ function Re(e, t) {
1591
+ let { labelStyles: n, nodeStyles: i } = y(t);
1592
+ t.label = "", t.labelStyle = n;
1593
+ let a = e.insert("g").attr("class", E(t)).attr("id", t.domId ?? t.id), { cssStyles: o } = t, s = Math.max(35, t?.width ?? 0), c = Math.max(35, t?.height ?? 0), l = [
1594
1594
  {
1595
1595
  x: s,
1596
1596
  y: 0
@@ -1615,15 +1615,15 @@ function Re(t, n) {
1615
1615
  x: 14,
1616
1616
  y: c - 7 / 2
1617
1617
  }
1618
- ], u = S.svg(a), d = v(n, {});
1619
- n.look !== "handDrawn" && (d.roughness = 0, d.fillStyle = "solid");
1618
+ ], u = S.svg(a), d = v(t, {});
1619
+ t.look !== "handDrawn" && (d.roughness = 0, d.fillStyle = "solid");
1620
1620
  let f = D(l), p = u.path(f, d), m = a.insert(() => p, ":first-child");
1621
- return o && n.look !== "handDrawn" && m.selectAll("path").attr("style", o), i && n.look !== "handDrawn" && m.selectAll("path").attr("style", i), m.attr("transform", `translate(-${s / 2},${-c})`), T(n, m), n.intersect = function(t) {
1622
- return e.info("lightningBolt intersect", n, t), W.polygon(n, l, t);
1621
+ return o && t.look !== "handDrawn" && m.selectAll("path").attr("style", o), i && t.look !== "handDrawn" && m.selectAll("path").attr("style", i), m.attr("transform", `translate(-${s / 2},${-c})`), T(t, m), t.intersect = function(e) {
1622
+ return r.info("lightningBolt intersect", t, e), W.polygon(t, l, e);
1623
1623
  }, a;
1624
1624
  }
1625
- t(Re, "lightningBolt");
1626
- var ze = /* @__PURE__ */ t((e, t, n, r, i, a, o) => [
1625
+ i(Re, "lightningBolt");
1626
+ var ze = /* @__PURE__ */ i((e, t, n, r, i, a, o) => [
1627
1627
  `M${e},${t + a}`,
1628
1628
  `a${i},${a} 0,0,0 ${n},0`,
1629
1629
  `a${i},${a} 0,0,0 ${-n},0`,
@@ -1632,7 +1632,7 @@ var ze = /* @__PURE__ */ t((e, t, n, r, i, a, o) => [
1632
1632
  `l0,${-r}`,
1633
1633
  `M${e},${t + a + o}`,
1634
1634
  `a${i},${a} 0,0,0 ${n},0`
1635
- ].join(" "), "createCylinderPathD"), Be = /* @__PURE__ */ t((e, t, n, r, i, a, o) => [
1635
+ ].join(" "), "createCylinderPathD"), Be = /* @__PURE__ */ i((e, t, n, r, i, a, o) => [
1636
1636
  `M${e},${t + a}`,
1637
1637
  `M${e + n},${t + a}`,
1638
1638
  `a${i},${a} 0,0,0 ${-n},0`,
@@ -1641,28 +1641,28 @@ var ze = /* @__PURE__ */ t((e, t, n, r, i, a, o) => [
1641
1641
  `l0,${-r}`,
1642
1642
  `M${e},${t + a + o}`,
1643
1643
  `a${i},${a} 0,0,0 ${n},0`
1644
- ].join(" "), "createOuterCylinderPathD"), Ve = /* @__PURE__ */ t((e, t, n, r, i, a) => [`M${e - n / 2},${-r / 2}`, `a${i},${a} 0,0,0 ${n},0`].join(" "), "createInnerCylinderPathD");
1645
- async function He(e, t) {
1646
- let { labelStyles: n, nodeStyles: r } = y(t);
1647
- t.labelStyle = n;
1648
- let { shapeSvg: a, bbox: o, label: s } = await C(e, t, E(t)), c = Math.max(o.width + (t.padding ?? 0), t.width ?? 0), l = c / 2, u = l / (2.5 + c / 50), d = Math.max(o.height + u + (t.padding ?? 0), t.height ?? 0), f = d * .1, p, { cssStyles: m } = t;
1649
- if (t.look === "handDrawn") {
1650
- let e = S.svg(a), n = Be(0, 0, c, d, l, u, f), r = Ve(0, u, c, d, l, u), i = v(t, {}), o = e.path(n, i), s = e.path(r, i);
1644
+ ].join(" "), "createOuterCylinderPathD"), Ve = /* @__PURE__ */ i((e, t, n, r, i, a) => [`M${e - n / 2},${-r / 2}`, `a${i},${a} 0,0,0 ${n},0`].join(" "), "createInnerCylinderPathD");
1645
+ async function He(e, n) {
1646
+ let { labelStyles: r, nodeStyles: i } = y(n);
1647
+ n.labelStyle = r;
1648
+ let { shapeSvg: a, bbox: o, label: s } = await C(e, n, E(n)), c = Math.max(o.width + (n.padding ?? 0), n.width ?? 0), l = c / 2, u = l / (2.5 + c / 50), d = Math.max(o.height + u + (n.padding ?? 0), n.height ?? 0), f = d * .1, p, { cssStyles: m } = n;
1649
+ if (n.look === "handDrawn") {
1650
+ let e = S.svg(a), t = Be(0, 0, c, d, l, u, f), r = Ve(0, u, c, d, l, u), i = v(n, {}), o = e.path(t, i), s = e.path(r, i);
1651
1651
  a.insert(() => s, ":first-child").attr("class", "line"), p = a.insert(() => o, ":first-child"), p.attr("class", "basic label-container"), m && p.attr("style", m);
1652
1652
  } else {
1653
1653
  let e = ze(0, 0, c, d, l, u, f);
1654
- p = a.insert("path", ":first-child").attr("d", e).attr("class", "basic label-container").attr("style", i(m)).attr("style", r);
1654
+ p = a.insert("path", ":first-child").attr("d", e).attr("class", "basic label-container").attr("style", t(m)).attr("style", i);
1655
1655
  }
1656
- return p.attr("label-offset-y", u), p.attr("transform", `translate(${-c / 2}, ${-(d / 2 + u)})`), T(t, p), s.attr("transform", `translate(${-(o.width / 2) - (o.x - (o.left ?? 0))}, ${-(o.height / 2) + u - (o.y - (o.top ?? 0))})`), t.intersect = function(e) {
1657
- let n = W.rect(t, e), r = n.x - (t.x ?? 0);
1658
- if (l != 0 && (Math.abs(r) < (t.width ?? 0) / 2 || Math.abs(r) == (t.width ?? 0) / 2 && Math.abs(n.y - (t.y ?? 0)) > (t.height ?? 0) / 2 - u)) {
1656
+ return p.attr("label-offset-y", u), p.attr("transform", `translate(${-c / 2}, ${-(d / 2 + u)})`), T(n, p), s.attr("transform", `translate(${-(o.width / 2) - (o.x - (o.left ?? 0))}, ${-(o.height / 2) + u - (o.y - (o.top ?? 0))})`), n.intersect = function(e) {
1657
+ let t = W.rect(n, e), r = t.x - (n.x ?? 0);
1658
+ if (l != 0 && (Math.abs(r) < (n.width ?? 0) / 2 || Math.abs(r) == (n.width ?? 0) / 2 && Math.abs(t.y - (n.y ?? 0)) > (n.height ?? 0) / 2 - u)) {
1659
1659
  let i = u * u * (1 - r * r / (l * l));
1660
- i > 0 && (i = Math.sqrt(i)), i = u - i, e.y - (t.y ?? 0) > 0 && (i = -i), n.y += i;
1660
+ i > 0 && (i = Math.sqrt(i)), i = u - i, e.y - (n.y ?? 0) > 0 && (i = -i), t.y += i;
1661
1661
  }
1662
- return n;
1662
+ return t;
1663
1663
  }, a;
1664
1664
  }
1665
- t(He, "linedCylinder");
1665
+ i(He, "linedCylinder");
1666
1666
  async function Ue(e, t) {
1667
1667
  let { labelStyles: n, nodeStyles: r } = y(t);
1668
1668
  t.labelStyle = n;
@@ -1703,7 +1703,7 @@ async function Ue(e, t) {
1703
1703
  return W.polygon(t, m, e);
1704
1704
  }, i;
1705
1705
  }
1706
- t(Ue, "linedWaveEdgedRect");
1706
+ i(Ue, "linedWaveEdgedRect");
1707
1707
  async function We(e, t) {
1708
1708
  let { labelStyles: n, nodeStyles: r } = y(t);
1709
1709
  t.labelStyle = n;
@@ -1791,7 +1791,7 @@ async function We(e, t) {
1791
1791
  return W.polygon(t, m, e);
1792
1792
  }, i;
1793
1793
  }
1794
- t(We, "multiRect");
1794
+ i(We, "multiRect");
1795
1795
  async function Ge(e, t) {
1796
1796
  let { labelStyles: n, nodeStyles: r } = y(t);
1797
1797
  t.labelStyle = n;
@@ -1873,7 +1873,7 @@ async function Ge(e, t) {
1873
1873
  return W.polygon(t, g, e);
1874
1874
  }, i;
1875
1875
  }
1876
- t(Ge, "multiWaveEdgedRectangle");
1876
+ i(Ge, "multiWaveEdgedRectangle");
1877
1877
  async function Ke(e, t, { config: { themeVariables: n } }) {
1878
1878
  let { labelStyles: r, nodeStyles: i } = y(t);
1879
1879
  t.labelStyle = r, t.useHtmlLabels || f(p()) || (t.centerLabel = !0);
@@ -1887,8 +1887,8 @@ async function Ke(e, t, { config: { themeVariables: n } }) {
1887
1887
  return W.rect(t, e);
1888
1888
  }, a;
1889
1889
  }
1890
- t(Ke, "note");
1891
- var qe = /* @__PURE__ */ t((e, t, n) => [
1890
+ i(Ke, "note");
1891
+ var qe = /* @__PURE__ */ i((e, t, n) => [
1892
1892
  `M${e + n / 2},${t}`,
1893
1893
  `L${e + n},${t - n / 2}`,
1894
1894
  `L${e + n / 2},${t - n}`,
@@ -1947,7 +1947,7 @@ async function Je(e, t) {
1947
1947
  return this.calcIntersect(t, e);
1948
1948
  }, i;
1949
1949
  }
1950
- t(Je, "question");
1950
+ i(Je, "question");
1951
1951
  async function Ye(e, t) {
1952
1952
  let { labelStyles: n, nodeStyles: r } = y(t);
1953
1953
  t.labelStyle = n;
@@ -1979,35 +1979,35 @@ async function Ye(e, t) {
1979
1979
  return W.polygon(t, f, e);
1980
1980
  }, i;
1981
1981
  }
1982
- t(Ye, "rect_left_inv_arrow");
1983
- async function Xe(t, r) {
1984
- let { labelStyles: i, nodeStyles: a } = y(r);
1985
- r.labelStyle = i;
1982
+ i(Ye, "rect_left_inv_arrow");
1983
+ async function Xe(e, t) {
1984
+ let { labelStyles: n, nodeStyles: i } = y(t);
1985
+ t.labelStyle = n;
1986
1986
  let o;
1987
- o = r.cssClasses ? "node " + r.cssClasses : "node default";
1988
- let s = t.insert("g").attr("class", o).attr("id", r.domId || r.id), l = s.insert("g"), u = s.insert("g").attr("class", "label").attr("style", a), d = r.description, p = r.label, m = await j(u, p, r.labelStyle, !0, !0), h = {
1987
+ o = t.cssClasses ? "node " + t.cssClasses : "node default";
1988
+ let s = e.insert("g").attr("class", o).attr("id", t.domId || t.id), l = s.insert("g"), u = s.insert("g").attr("class", "label").attr("style", i), d = t.description, p = t.label, m = await j(u, p, t.labelStyle, !0, !0), h = {
1989
1989
  width: 0,
1990
1990
  height: 0
1991
1991
  };
1992
1992
  if (f(c())) {
1993
- let e = m.children[0], t = n(m);
1993
+ let e = m.children[0], t = a(m);
1994
1994
  h = e.getBoundingClientRect(), t.attr("width", h.width), t.attr("height", h.height);
1995
1995
  }
1996
- e.info("Text 2", d);
1997
- let g = d || [], _ = m.getBBox(), b = await j(u, Array.isArray(g) ? g.join("<br/>") : g, r.labelStyle, !0, !0), x = b.children[0], C = n(b);
1996
+ r.info("Text 2", d);
1997
+ let g = d || [], _ = m.getBBox(), b = await j(u, Array.isArray(g) ? g.join("<br/>") : g, t.labelStyle, !0, !0), x = b.children[0], C = a(b);
1998
1998
  h = x.getBoundingClientRect(), C.attr("width", h.width), C.attr("height", h.height);
1999
- let w = (r.padding || 0) / 2;
2000
- n(b).attr("transform", "translate( " + (h.width > _.width ? 0 : (_.width - h.width) / 2) + ", " + (_.height + w + 5) + ")"), n(m).attr("transform", "translate( " + (h.width < _.width ? 0 : -(_.width - h.width) / 2) + ", 0)"), h = u.node().getBBox(), u.attr("transform", "translate(" + -h.width / 2 + ", " + (-h.height / 2 - w + 3) + ")");
2001
- let E = h.width + (r.padding || 0), D = h.height + (r.padding || 0), O = -h.width / 2 - w, k = -h.height / 2 - w, A, N;
2002
- if (r.look === "handDrawn") {
2003
- let t = S.svg(s), n = v(r, {}), i = t.path(M(O, k, E, D, r.rx || 0), n), a = t.line(-h.width / 2 - w, -h.height / 2 - w + _.height + w, h.width / 2 + w, -h.height / 2 - w + _.height + w, n);
2004
- N = s.insert(() => (e.debug("Rough node insert CXC", i), a), ":first-child"), A = s.insert(() => (e.debug("Rough node insert CXC", i), i), ":first-child");
2005
- } else A = l.insert("rect", ":first-child"), N = l.insert("line"), A.attr("class", "outer title-state").attr("style", a).attr("x", -h.width / 2 - w).attr("y", -h.height / 2 - w).attr("width", h.width + (r.padding || 0)).attr("height", h.height + (r.padding || 0)), N.attr("class", "divider").attr("x1", -h.width / 2 - w).attr("x2", h.width / 2 + w).attr("y1", -h.height / 2 - w + _.height + w).attr("y2", -h.height / 2 - w + _.height + w);
2006
- return T(r, A), r.intersect = function(e) {
2007
- return W.rect(r, e);
1999
+ let w = (t.padding || 0) / 2;
2000
+ a(b).attr("transform", "translate( " + (h.width > _.width ? 0 : (_.width - h.width) / 2) + ", " + (_.height + w + 5) + ")"), a(m).attr("transform", "translate( " + (h.width < _.width ? 0 : -(_.width - h.width) / 2) + ", 0)"), h = u.node().getBBox(), u.attr("transform", "translate(" + -h.width / 2 + ", " + (-h.height / 2 - w + 3) + ")");
2001
+ let E = h.width + (t.padding || 0), D = h.height + (t.padding || 0), O = -h.width / 2 - w, k = -h.height / 2 - w, A, N;
2002
+ if (t.look === "handDrawn") {
2003
+ let e = S.svg(s), n = v(t, {}), i = e.path(M(O, k, E, D, t.rx || 0), n), a = e.line(-h.width / 2 - w, -h.height / 2 - w + _.height + w, h.width / 2 + w, -h.height / 2 - w + _.height + w, n);
2004
+ N = s.insert(() => (r.debug("Rough node insert CXC", i), a), ":first-child"), A = s.insert(() => (r.debug("Rough node insert CXC", i), i), ":first-child");
2005
+ } else A = l.insert("rect", ":first-child"), N = l.insert("line"), A.attr("class", "outer title-state").attr("style", i).attr("x", -h.width / 2 - w).attr("y", -h.height / 2 - w).attr("width", h.width + (t.padding || 0)).attr("height", h.height + (t.padding || 0)), N.attr("class", "divider").attr("x1", -h.width / 2 - w).attr("x2", h.width / 2 + w).attr("y1", -h.height / 2 - w + _.height + w).attr("y2", -h.height / 2 - w + _.height + w);
2006
+ return T(t, A), t.intersect = function(e) {
2007
+ return W.rect(t, e);
2008
2008
  }, s;
2009
2009
  }
2010
- t(Xe, "rectWithTitle");
2010
+ i(Xe, "rectWithTitle");
2011
2011
  async function Ze(e, t) {
2012
2012
  return Y(e, t, {
2013
2013
  rx: 5,
@@ -2017,12 +2017,12 @@ async function Ze(e, t) {
2017
2017
  labelPaddingY: (t?.padding || 0) * 1
2018
2018
  });
2019
2019
  }
2020
- t(Ze, "roundedRect");
2021
- async function Qe(e, t) {
2022
- let { labelStyles: n, nodeStyles: r } = y(t);
2023
- t.labelStyle = n;
2024
- let { shapeSvg: a, bbox: o, label: s } = await C(e, t, E(t)), c = t?.padding ?? 0, l = Math.max(o.width + (t.padding ?? 0) * 2, t?.width ?? 0), u = Math.max(o.height + (t.padding ?? 0) * 2, t?.height ?? 0), d = -o.width / 2 - c, f = -o.height / 2 - c, { cssStyles: p } = t, m = S.svg(a), h = v(t, {});
2025
- t.look !== "handDrawn" && (h.roughness = 0, h.fillStyle = "solid");
2020
+ i(Ze, "roundedRect");
2021
+ async function Qe(e, n) {
2022
+ let { labelStyles: r, nodeStyles: i } = y(n);
2023
+ n.labelStyle = r;
2024
+ let { shapeSvg: a, bbox: o, label: s } = await C(e, n, E(n)), c = n?.padding ?? 0, l = Math.max(o.width + (n.padding ?? 0) * 2, n?.width ?? 0), u = Math.max(o.height + (n.padding ?? 0) * 2, n?.height ?? 0), d = -o.width / 2 - c, f = -o.height / 2 - c, { cssStyles: p } = n, m = S.svg(a), h = v(n, {});
2025
+ n.look !== "handDrawn" && (h.roughness = 0, h.fillStyle = "solid");
2026
2026
  let g = [
2027
2027
  {
2028
2028
  x: d,
@@ -2053,11 +2053,11 @@ async function Qe(e, t) {
2053
2053
  y: f + u
2054
2054
  }
2055
2055
  ], _ = m.polygon(g.map((e) => [e.x, e.y]), h), b = a.insert(() => _, ":first-child");
2056
- return b.attr("class", "basic label-container").attr("style", i(p)), r && t.look !== "handDrawn" && b.selectAll("path").attr("style", r), p && t.look !== "handDrawn" && b.selectAll("path").attr("style", r), s.attr("transform", `translate(${-l / 2 + 4 + (t.padding ?? 0) - (o.x - (o.left ?? 0))},${-u / 2 + (t.padding ?? 0) - (o.y - (o.top ?? 0))})`), T(t, b), t.intersect = function(e) {
2057
- return W.rect(t, e);
2056
+ return b.attr("class", "basic label-container").attr("style", t(p)), i && n.look !== "handDrawn" && b.selectAll("path").attr("style", i), p && n.look !== "handDrawn" && b.selectAll("path").attr("style", i), s.attr("transform", `translate(${-l / 2 + 4 + (n.padding ?? 0) - (o.x - (o.left ?? 0))},${-u / 2 + (n.padding ?? 0) - (o.y - (o.top ?? 0))})`), T(n, b), n.intersect = function(e) {
2057
+ return W.rect(n, e);
2058
2058
  }, a;
2059
2059
  }
2060
- t(Qe, "shadedProcess");
2060
+ i(Qe, "shadedProcess");
2061
2061
  async function $e(e, t) {
2062
2062
  let { labelStyles: n, nodeStyles: r } = y(t);
2063
2063
  t.labelStyle = n;
@@ -2085,7 +2085,7 @@ async function $e(e, t) {
2085
2085
  return W.polygon(t, m, e);
2086
2086
  }, i;
2087
2087
  }
2088
- t($e, "slopedRect");
2088
+ i($e, "slopedRect");
2089
2089
  async function et(e, t) {
2090
2090
  return Y(e, t, {
2091
2091
  rx: 0,
@@ -2095,7 +2095,7 @@ async function et(e, t) {
2095
2095
  labelPaddingY: (t?.padding || 0) * 1
2096
2096
  });
2097
2097
  }
2098
- t(et, "squareRect");
2098
+ i(et, "squareRect");
2099
2099
  async function tt(e, t) {
2100
2100
  let { labelStyles: n, nodeStyles: r } = y(t);
2101
2101
  t.labelStyle = n;
@@ -2121,7 +2121,7 @@ async function tt(e, t) {
2121
2121
  return W.polygon(t, f, e);
2122
2122
  }, i;
2123
2123
  }
2124
- t(tt, "stadium");
2124
+ i(tt, "stadium");
2125
2125
  async function nt(e, t) {
2126
2126
  return Y(e, t, {
2127
2127
  rx: 5,
@@ -2129,7 +2129,7 @@ async function nt(e, t) {
2129
2129
  classes: "flowchart-node"
2130
2130
  });
2131
2131
  }
2132
- t(nt, "state");
2132
+ i(nt, "state");
2133
2133
  function rt(e, t, { config: { themeVariables: n } }) {
2134
2134
  let { labelStyles: r, nodeStyles: i } = y(t);
2135
2135
  t.labelStyle = r;
@@ -2150,7 +2150,7 @@ function rt(e, t, { config: { themeVariables: n } }) {
2150
2150
  return W.circle(t, 7, e);
2151
2151
  }, l;
2152
2152
  }
2153
- t(rt, "stateEnd");
2153
+ i(rt, "stateEnd");
2154
2154
  function it(e, t, { config: { themeVariables: n } }) {
2155
2155
  let { lineColor: r } = n, i = e.insert("g").attr("class", "node default").attr("id", t.domId || t.id), a;
2156
2156
  if (t.look === "handDrawn") {
@@ -2161,11 +2161,11 @@ function it(e, t, { config: { themeVariables: n } }) {
2161
2161
  return W.circle(t, 7, e);
2162
2162
  }, i;
2163
2163
  }
2164
- t(it, "stateStart");
2165
- async function at(e, t) {
2166
- let { labelStyles: n, nodeStyles: r } = y(t);
2167
- t.labelStyle = n;
2168
- let { shapeSvg: a, bbox: o } = await C(e, t, E(t)), s = (t?.padding || 0) / 2, c = o.width + t.padding, l = o.height + t.padding, u = -o.width / 2 - s, d = -o.height / 2 - s, f = [
2164
+ i(it, "stateStart");
2165
+ async function at(e, n) {
2166
+ let { labelStyles: r, nodeStyles: i } = y(n);
2167
+ n.labelStyle = r;
2168
+ let { shapeSvg: a, bbox: o } = await C(e, n, E(n)), s = (n?.padding || 0) / 2, c = o.width + n.padding, l = o.height + n.padding, u = -o.width / 2 - s, d = -o.height / 2 - s, f = [
2169
2169
  {
2170
2170
  x: 0,
2171
2171
  y: 0
@@ -2207,20 +2207,20 @@ async function at(e, t) {
2207
2207
  y: 0
2208
2208
  }
2209
2209
  ];
2210
- if (t.look === "handDrawn") {
2211
- let e = S.svg(a), n = v(t, {}), r = e.rectangle(u - 8, d, c + 16, l, n), o = e.line(u, d, u, d + l, n), s = e.line(u + c, d, u + c, d + l, n);
2210
+ if (n.look === "handDrawn") {
2211
+ let e = S.svg(a), r = v(n, {}), i = e.rectangle(u - 8, d, c + 16, l, r), o = e.line(u, d, u, d + l, r), s = e.line(u + c, d, u + c, d + l, r);
2212
2212
  a.insert(() => o, ":first-child"), a.insert(() => s, ":first-child");
2213
- let f = a.insert(() => r, ":first-child"), { cssStyles: p } = t;
2214
- f.attr("class", "basic label-container").attr("style", i(p)), T(t, f);
2213
+ let f = a.insert(() => i, ":first-child"), { cssStyles: p } = n;
2214
+ f.attr("class", "basic label-container").attr("style", t(p)), T(n, f);
2215
2215
  } else {
2216
2216
  let e = G(a, c, l, f);
2217
- r && e.attr("style", r), T(t, e);
2217
+ i && e.attr("style", i), T(n, e);
2218
2218
  }
2219
- return t.intersect = function(e) {
2220
- return W.polygon(t, f, e);
2219
+ return n.intersect = function(e) {
2220
+ return W.polygon(n, f, e);
2221
2221
  }, a;
2222
2222
  }
2223
- t(at, "subroutine");
2223
+ i(at, "subroutine");
2224
2224
  async function ot(e, t) {
2225
2225
  let { labelStyles: n, nodeStyles: r } = y(t);
2226
2226
  t.labelStyle = n;
@@ -2264,7 +2264,7 @@ async function ot(e, t) {
2264
2264
  return W.polygon(t, h, e);
2265
2265
  }, i;
2266
2266
  }
2267
- t(ot, "taggedRect");
2267
+ i(ot, "taggedRect");
2268
2268
  async function st(e, t) {
2269
2269
  let { labelStyles: n, nodeStyles: r } = y(t);
2270
2270
  t.labelStyle = n;
@@ -2306,7 +2306,7 @@ async function st(e, t) {
2306
2306
  return W.polygon(t, g, e);
2307
2307
  }, i;
2308
2308
  }
2309
- t(st, "taggedWaveEdgedRectangle");
2309
+ i(st, "taggedWaveEdgedRectangle");
2310
2310
  async function ct(e, t) {
2311
2311
  let { labelStyles: n, nodeStyles: r } = y(t);
2312
2312
  t.labelStyle = n;
@@ -2315,42 +2315,42 @@ async function ct(e, t) {
2315
2315
  return W.rect(t, e);
2316
2316
  }, i;
2317
2317
  }
2318
- t(ct, "text");
2319
- var lt = /* @__PURE__ */ t((e, t, n, r, i, a) => `M${e},${t}
2318
+ i(ct, "text");
2319
+ var lt = /* @__PURE__ */ i((e, t, n, r, i, a) => `M${e},${t}
2320
2320
  a${i},${a} 0,0,1 0,${-r}
2321
2321
  l${n},0
2322
2322
  a${i},${a} 0,0,1 0,${r}
2323
2323
  M${n},${-r}
2324
2324
  a${i},${a} 0,0,0 0,${r}
2325
- l${-n},0`, "createCylinderPathD"), ut = /* @__PURE__ */ t((e, t, n, r, i, a) => [
2325
+ l${-n},0`, "createCylinderPathD"), ut = /* @__PURE__ */ i((e, t, n, r, i, a) => [
2326
2326
  `M${e},${t}`,
2327
2327
  `M${e + n},${t}`,
2328
2328
  `a${i},${a} 0,0,0 0,${-r}`,
2329
2329
  `l${-n},0`,
2330
2330
  `a${i},${a} 0,0,0 0,${r}`,
2331
2331
  `l${n},0`
2332
- ].join(" "), "createOuterCylinderPathD"), dt = /* @__PURE__ */ t((e, t, n, r, i, a) => [`M${e + n / 2},${-r / 2}`, `a${i},${a} 0,0,0 0,${r}`].join(" "), "createInnerCylinderPathD");
2333
- async function ft(e, t) {
2334
- let { labelStyles: n, nodeStyles: r } = y(t);
2335
- t.labelStyle = n;
2336
- let { shapeSvg: a, bbox: o, label: s, halfPadding: c } = await C(e, t, E(t)), l = t.look === "neo" ? c * 2 : c, u = o.height + l, d = u / 2, f = d / (2.5 + u / 50), p = o.width + f + l, { cssStyles: m } = t, h;
2337
- if (t.look === "handDrawn") {
2338
- let e = S.svg(a), n = ut(0, 0, p, u, f, d), r = dt(0, 0, p, u, f, d), i = e.path(n, v(t, {})), o = e.path(r, v(t, { fill: "none" }));
2332
+ ].join(" "), "createOuterCylinderPathD"), dt = /* @__PURE__ */ i((e, t, n, r, i, a) => [`M${e + n / 2},${-r / 2}`, `a${i},${a} 0,0,0 0,${r}`].join(" "), "createInnerCylinderPathD");
2333
+ async function ft(e, n) {
2334
+ let { labelStyles: r, nodeStyles: i } = y(n);
2335
+ n.labelStyle = r;
2336
+ let { shapeSvg: a, bbox: o, label: s, halfPadding: c } = await C(e, n, E(n)), l = n.look === "neo" ? c * 2 : c, u = o.height + l, d = u / 2, f = d / (2.5 + u / 50), p = o.width + f + l, { cssStyles: m } = n, h;
2337
+ if (n.look === "handDrawn") {
2338
+ let e = S.svg(a), t = ut(0, 0, p, u, f, d), r = dt(0, 0, p, u, f, d), i = e.path(t, v(n, {})), o = e.path(r, v(n, { fill: "none" }));
2339
2339
  h = a.insert(() => o, ":first-child"), h = a.insert(() => i, ":first-child"), h.attr("class", "basic label-container"), m && h.attr("style", m);
2340
2340
  } else {
2341
2341
  let e = lt(0, 0, p, u, f, d);
2342
- h = a.insert("path", ":first-child").attr("d", e).attr("class", "basic label-container").attr("style", i(m)).attr("style", r), h.attr("class", "basic label-container"), m && h.selectAll("path").attr("style", m), r && h.selectAll("path").attr("style", r);
2342
+ h = a.insert("path", ":first-child").attr("d", e).attr("class", "basic label-container").attr("style", t(m)).attr("style", i), h.attr("class", "basic label-container"), m && h.selectAll("path").attr("style", m), i && h.selectAll("path").attr("style", i);
2343
2343
  }
2344
- return h.attr("label-offset-x", f), h.attr("transform", `translate(${-p / 2}, ${u / 2} )`), s.attr("transform", `translate(${-(o.width / 2) - f - (o.x - (o.left ?? 0))}, ${-(o.height / 2) - (o.y - (o.top ?? 0))})`), T(t, h), t.intersect = function(e) {
2345
- let n = W.rect(t, e), r = n.y - (t.y ?? 0);
2346
- if (d != 0 && (Math.abs(r) < (t.height ?? 0) / 2 || Math.abs(r) == (t.height ?? 0) / 2 && Math.abs(n.x - (t.x ?? 0)) > (t.width ?? 0) / 2 - f)) {
2344
+ return h.attr("label-offset-x", f), h.attr("transform", `translate(${-p / 2}, ${u / 2} )`), s.attr("transform", `translate(${-(o.width / 2) - f - (o.x - (o.left ?? 0))}, ${-(o.height / 2) - (o.y - (o.top ?? 0))})`), T(n, h), n.intersect = function(e) {
2345
+ let t = W.rect(n, e), r = t.y - (n.y ?? 0);
2346
+ if (d != 0 && (Math.abs(r) < (n.height ?? 0) / 2 || Math.abs(r) == (n.height ?? 0) / 2 && Math.abs(t.x - (n.x ?? 0)) > (n.width ?? 0) / 2 - f)) {
2347
2347
  let i = f * f * (1 - r * r / (d * d));
2348
- i != 0 && (i = Math.sqrt(Math.abs(i))), i = f - i, e.x - (t.x ?? 0) > 0 && (i = -i), n.x += i;
2348
+ i != 0 && (i = Math.sqrt(Math.abs(i))), i = f - i, e.x - (n.x ?? 0) > 0 && (i = -i), t.x += i;
2349
2349
  }
2350
- return n;
2350
+ return t;
2351
2351
  }, a;
2352
2352
  }
2353
- t(ft, "tiltedCylinder");
2353
+ i(ft, "tiltedCylinder");
2354
2354
  async function pt(e, t) {
2355
2355
  let { labelStyles: n, nodeStyles: r } = y(t);
2356
2356
  t.labelStyle = n;
@@ -2380,7 +2380,7 @@ async function pt(e, t) {
2380
2380
  return W.polygon(t, c, e);
2381
2381
  }, i;
2382
2382
  }
2383
- t(pt, "trapezoid");
2383
+ i(pt, "trapezoid");
2384
2384
  async function mt(e, t) {
2385
2385
  let { labelStyles: n, nodeStyles: r } = y(t);
2386
2386
  t.labelStyle = n;
@@ -2416,11 +2416,11 @@ async function mt(e, t) {
2416
2416
  return W.polygon(t, d, e);
2417
2417
  }, i;
2418
2418
  }
2419
- t(mt, "trapezoidalPentagon");
2420
- async function ht(t, n) {
2421
- let { labelStyles: r, nodeStyles: i } = y(n);
2422
- n.labelStyle = r;
2423
- let { shapeSvg: a, bbox: o, label: s } = await C(t, n, E(n)), l = n.useHtmlLabels || f(c()), u = o.width + (n.padding ?? 0), d = u + o.height, p = u + o.height, m = [
2419
+ i(mt, "trapezoidalPentagon");
2420
+ async function ht(e, t) {
2421
+ let { labelStyles: n, nodeStyles: i } = y(t);
2422
+ t.labelStyle = n;
2423
+ let { shapeSvg: a, bbox: o, label: s } = await C(e, t, E(t)), l = t.useHtmlLabels || f(c()), u = o.width + (t.padding ?? 0), d = u + o.height, p = u + o.height, m = [
2424
2424
  {
2425
2425
  x: 0,
2426
2426
  y: 0
@@ -2433,14 +2433,14 @@ async function ht(t, n) {
2433
2433
  x: p / 2,
2434
2434
  y: -d
2435
2435
  }
2436
- ], { cssStyles: h } = n, g = S.svg(a), _ = v(n, {});
2437
- n.look !== "handDrawn" && (_.roughness = 0, _.fillStyle = "solid");
2436
+ ], { cssStyles: h } = t, g = S.svg(a), _ = v(t, {});
2437
+ t.look !== "handDrawn" && (_.roughness = 0, _.fillStyle = "solid");
2438
2438
  let b = D(m), x = g.path(b, _), w = a.insert(() => x, ":first-child").attr("transform", `translate(${-d / 2}, ${d / 2})`);
2439
- return h && n.look !== "handDrawn" && w.selectChildren("path").attr("style", h), i && n.look !== "handDrawn" && w.selectChildren("path").attr("style", i), n.width = u, n.height = d, T(n, w), s.attr("transform", `translate(${-o.width / 2 - (o.x - (o.left ?? 0))}, ${d / 2 - (o.height + (n.padding ?? 0) / (l ? 2 : 1) - (o.y - (o.top ?? 0)))})`), n.intersect = function(t) {
2440
- return e.info("Triangle intersect", n, m, t), W.polygon(n, m, t);
2439
+ return h && t.look !== "handDrawn" && w.selectChildren("path").attr("style", h), i && t.look !== "handDrawn" && w.selectChildren("path").attr("style", i), t.width = u, t.height = d, T(t, w), s.attr("transform", `translate(${-o.width / 2 - (o.x - (o.left ?? 0))}, ${d / 2 - (o.height + (t.padding ?? 0) / (l ? 2 : 1) - (o.y - (o.top ?? 0)))})`), t.intersect = function(e) {
2440
+ return r.info("Triangle intersect", t, m, e), W.polygon(t, m, e);
2441
2441
  }, a;
2442
2442
  }
2443
- t(ht, "triangle");
2443
+ i(ht, "triangle");
2444
2444
  async function gt(e, t) {
2445
2445
  let { labelStyles: n, nodeStyles: r } = y(t);
2446
2446
  t.labelStyle = n;
@@ -2465,7 +2465,7 @@ async function gt(e, t) {
2465
2465
  return W.polygon(t, g, e);
2466
2466
  }, i;
2467
2467
  }
2468
- t(gt, "waveEdgedRectangle");
2468
+ i(gt, "waveEdgedRectangle");
2469
2469
  async function _t(e, t) {
2470
2470
  let { labelStyles: n, nodeStyles: r } = y(t);
2471
2471
  t.labelStyle = n;
@@ -2489,7 +2489,7 @@ async function _t(e, t) {
2489
2489
  return W.polygon(t, g, e);
2490
2490
  }, i;
2491
2491
  }
2492
- t(_t, "waveRectangle");
2492
+ i(_t, "waveRectangle");
2493
2493
  async function vt(e, t) {
2494
2494
  let { labelStyles: n, nodeStyles: r } = y(t);
2495
2495
  t.labelStyle = n;
@@ -2519,7 +2519,7 @@ async function vt(e, t) {
2519
2519
  return W.polygon(t, m, e);
2520
2520
  }, i;
2521
2521
  }
2522
- t(vt, "windowPane");
2522
+ i(vt, "windowPane");
2523
2523
  async function yt(e, t) {
2524
2524
  let r = t;
2525
2525
  if (r.alias && (t.label = r.alias), t.look === "handDrawn") {
@@ -2535,20 +2535,20 @@ async function yt(e, t) {
2535
2535
  t.useHtmlLabels = i.htmlLabels;
2536
2536
  let o = i.er?.diagramPadding ?? 10, s = i.er?.entityPadding ?? 6, { cssStyles: c } = t, { labelStyles: u, nodeStyles: d } = y(t);
2537
2537
  if (r.attributes.length === 0 && t.label) {
2538
- let n = {
2538
+ let r = {
2539
2539
  rx: 0,
2540
2540
  ry: 0,
2541
2541
  labelPaddingX: o,
2542
2542
  labelPaddingY: o * 1.5,
2543
2543
  classes: ""
2544
2544
  };
2545
- a(t.label, i) + n.labelPaddingX * 2 < i.er.minEntityWidth && (t.width = i.er.minEntityWidth);
2546
- let r = await Y(e, t, n);
2545
+ n(t.label, i) + r.labelPaddingX * 2 < i.er.minEntityWidth && (t.width = i.er.minEntityWidth);
2546
+ let a = await Y(e, t, r);
2547
2547
  if (!l(i.htmlLabels)) {
2548
- let e = r.select("text"), t = e.node()?.getBBox();
2548
+ let e = a.select("text"), t = e.node()?.getBBox();
2549
2549
  e.attr("transform", `translate(${-t.width / 2}, 0)`);
2550
2550
  }
2551
- return r;
2551
+ return a;
2552
2552
  }
2553
2553
  i.htmlLabels || (o *= 1.25, s *= 1.25);
2554
2554
  let f = E(t);
@@ -2583,13 +2583,13 @@ async function yt(e, t) {
2583
2583
  let F = 0;
2584
2584
  b.length > 0 && (F = b.reduce((e, t) => e + (t?.rowHeight ?? 0), 0));
2585
2585
  let I = Math.max(j.width + o * 2, t?.width || 0, M), L = Math.max((F ?? 0) + h.height, t?.height || 0), R = -I / 2, z = -L / 2;
2586
- m.selectAll("g:not(:first-child)").each((e, t, r) => {
2587
- let i = n(r[t]), a = i.attr("transform"), c = 0, l = 0;
2588
- if (a) {
2589
- let e = RegExp(/translate\(([^,]+),([^)]+)\)/).exec(a);
2590
- e && (c = parseFloat(e[1]), l = parseFloat(e[2]), i.attr("class").includes("attribute-name") ? c += x : i.attr("class").includes("attribute-keys") ? c += x + C : i.attr("class").includes("attribute-comment") && (c += x + C + w));
2586
+ m.selectAll("g:not(:first-child)").each((e, t, n) => {
2587
+ let r = a(n[t]), i = r.attr("transform"), c = 0, l = 0;
2588
+ if (i) {
2589
+ let e = RegExp(/translate\(([^,]+),([^)]+)\)/).exec(i);
2590
+ e && (c = parseFloat(e[1]), l = parseFloat(e[2]), r.attr("class").includes("attribute-name") ? c += x : r.attr("class").includes("attribute-keys") ? c += x + C : r.attr("class").includes("attribute-comment") && (c += x + C + w));
2591
2591
  }
2592
- i.attr("transform", `translate(${R + o / 2 + c}, ${l + z + h.height + s / 2})`);
2592
+ r.attr("transform", `translate(${R + o / 2 + c}, ${l + z + h.height + s / 2})`);
2593
2593
  }), m.select(".name").attr("transform", "translate(" + -h.width / 2 + ", " + (z + s / 2) + ")");
2594
2594
  let B = N.rectangle(R, z, I, L, P), V = m.insert(() => B, ":first-child").attr("style", c.join("")), { themeVariables: ee } = p(), { rowEven: te, rowOdd: ne, nodeBorder: H } = ee;
2595
2595
  _.push(0);
@@ -2612,12 +2612,12 @@ async function yt(e, t) {
2612
2612
  return W.rect(t, e);
2613
2613
  }, m;
2614
2614
  }
2615
- t(yt, "erBox");
2615
+ i(yt, "erBox");
2616
2616
  async function X(e, t, r, i = 0, o = 0, s = [], c = "") {
2617
2617
  let d = e.insert("g").attr("class", `label ${s.join(" ")}`).attr("transform", `translate(${i}, ${o})`).attr("style", c);
2618
2618
  t !== u(t) && (t = u(t), t = t.replaceAll("<", "&lt;").replaceAll(">", "&gt;"));
2619
2619
  let f = d.node().appendChild(await m(d, t, {
2620
- width: a(t, r) + 100,
2620
+ width: n(t, r) + 100,
2621
2621
  style: c,
2622
2622
  useHtmlLabels: r.htmlLabels
2623
2623
  }, r));
@@ -2629,12 +2629,12 @@ async function X(e, t, r, i = 0, o = 0, s = [], c = "") {
2629
2629
  if (l(r.htmlLabels)) {
2630
2630
  let e = f.children[0];
2631
2631
  e.style.textAlign = "start";
2632
- let t = n(f);
2632
+ let t = a(f);
2633
2633
  p = e.getBoundingClientRect(), t.attr("width", p.width), t.attr("height", p.height);
2634
2634
  }
2635
2635
  return p;
2636
2636
  }
2637
- t(X, "addText");
2637
+ i(X, "addText");
2638
2638
  async function bt(e, t, n, r, i = n.class.padding ?? 12) {
2639
2639
  let a = r ? 0 : 3, o = e.insert("g").attr("class", E(t)).attr("id", t.domId || t.id), s = null, c = null, l = null, u = null, d = 0, f = 0, p = 0;
2640
2640
  if (s = o.insert("g").attr("class", "annotation-group text"), t.annotations.length > 0) {
@@ -2665,77 +2665,77 @@ async function bt(e, t, n, r, i = n.class.padding ?? 12) {
2665
2665
  bbox: _
2666
2666
  };
2667
2667
  }
2668
- t(bt, "textHelper");
2669
- async function Z(e, i, o, c = []) {
2670
- let u = e.insert("g").attr("class", "label").attr("style", c.join("; ")), f = p(), h = "useHtmlLabels" in i ? i.useHtmlLabels : l(f.htmlLabels) ?? !0, g = "";
2671
- g = "text" in i ? i.text : i.label, !h && g.startsWith("\\") && (g = g.substring(1)), d(g) && (h = !0);
2672
- let _ = await m(u, s(r(g)), {
2673
- width: a(g, f) + 50,
2668
+ i(bt, "textHelper");
2669
+ async function Z(t, r, o, c = []) {
2670
+ let u = t.insert("g").attr("class", "label").attr("style", c.join("; ")), f = p(), h = "useHtmlLabels" in r ? r.useHtmlLabels : l(f.htmlLabels) ?? !0, g = "";
2671
+ g = "text" in r ? r.text : r.label, !h && g.startsWith("\\") && (g = g.substring(1)), d(g) && (h = !0);
2672
+ let _ = await m(u, s(e(g)), {
2673
+ width: n(g, f) + 50,
2674
2674
  classes: "markdown-node-label",
2675
2675
  useHtmlLabels: h
2676
2676
  }, f), v, y = 1;
2677
2677
  if (h) {
2678
- let e = _.children[0], r = n(_);
2678
+ let e = _.children[0], t = a(_);
2679
2679
  y = e.innerHTML.split("<br>").length, e.innerHTML.includes("</math>") && (y += e.innerHTML.split("<mrow>").length - 1);
2680
- let i = e.getElementsByTagName("img");
2681
- if (i) {
2680
+ let n = e.getElementsByTagName("img");
2681
+ if (n) {
2682
2682
  let e = g.replace(/<img[^>]*>/g, "").trim() === "";
2683
- await Promise.all([...i].map((n) => new Promise((r) => {
2684
- function i() {
2685
- if (n.style.display = "flex", n.style.flexDirection = "column", e) {
2686
- let e = f.fontSize?.toString() ?? window.getComputedStyle(document.body).fontSize, t = parseInt(e, 10) * 5 + "px";
2687
- n.style.minWidth = t, n.style.maxWidth = t;
2688
- } else n.style.width = "100%";
2689
- r(n);
2683
+ await Promise.all([...n].map((t) => new Promise((n) => {
2684
+ function r() {
2685
+ if (t.style.display = "flex", t.style.flexDirection = "column", e) {
2686
+ let e = f.fontSize?.toString() ?? window.getComputedStyle(document.body).fontSize, n = parseInt(e, 10) * 5 + "px";
2687
+ t.style.minWidth = n, t.style.maxWidth = n;
2688
+ } else t.style.width = "100%";
2689
+ n(t);
2690
2690
  }
2691
- t(i, "setupImage"), setTimeout(() => {
2692
- n.complete && i();
2693
- }), n.addEventListener("error", i), n.addEventListener("load", i);
2691
+ i(r, "setupImage"), setTimeout(() => {
2692
+ t.complete && r();
2693
+ }), t.addEventListener("error", r), t.addEventListener("load", r);
2694
2694
  })));
2695
2695
  }
2696
- v = e.getBoundingClientRect(), r.attr("width", v.width), r.attr("height", v.height);
2696
+ v = e.getBoundingClientRect(), t.attr("width", v.width), t.attr("height", v.height);
2697
2697
  } else {
2698
- c.includes("font-weight: bolder") && n(_).selectAll("tspan").attr("font-weight", ""), y = _.children.length;
2698
+ c.includes("font-weight: bolder") && a(_).selectAll("tspan").attr("font-weight", ""), y = _.children.length;
2699
2699
  let e = _.children[0];
2700
2700
  (_.textContent === "" || _.textContent.includes("&gt")) && (e.textContent = g[0] + g.substring(1).replaceAll("&gt;", ">").replaceAll("&lt;", "<").trim(), g[1] === " " && (e.textContent = e.textContent[0] + " " + e.textContent.substring(1))), e.textContent === "undefined" && (e.textContent = ""), v = _.getBBox();
2701
2701
  }
2702
2702
  return u.attr("transform", "translate(0," + (-v.height / (2 * y) + o) + ")"), v.height;
2703
2703
  }
2704
- t(Z, "addText");
2704
+ i(Z, "addText");
2705
2705
  async function xt(e, t) {
2706
- let r = c(), i = r.class.padding ?? 12, a = i, o = t.useHtmlLabels ?? l(r.htmlLabels) ?? !0, s = t;
2706
+ let n = c(), r = n.class.padding ?? 12, i = r, o = t.useHtmlLabels ?? l(n.htmlLabels) ?? !0, s = t;
2707
2707
  s.annotations = s.annotations ?? [], s.members = s.members ?? [], s.methods = s.methods ?? [];
2708
- let { shapeSvg: u, bbox: d } = await bt(e, t, r, o, a), { labelStyles: f, nodeStyles: p } = y(t);
2708
+ let { shapeSvg: u, bbox: d } = await bt(e, t, n, o, i), { labelStyles: f, nodeStyles: p } = y(t);
2709
2709
  t.labelStyle = f, t.cssStyles = s.styles || "";
2710
2710
  let m = s.styles?.join(";") || p || "";
2711
2711
  t.cssStyles ||= m.replaceAll("!important", "").split(";");
2712
- let h = s.members.length === 0 && s.methods.length === 0 && !r.class?.hideEmptyMembersBox, g = S.svg(u), _ = v(t, {});
2712
+ let h = s.members.length === 0 && s.methods.length === 0 && !n.class?.hideEmptyMembersBox, g = S.svg(u), _ = v(t, {});
2713
2713
  t.look !== "handDrawn" && (_.roughness = 0, _.fillStyle = "solid");
2714
2714
  let b = d.width, x = d.height;
2715
- s.members.length === 0 && s.methods.length === 0 ? x += a : s.members.length > 0 && s.methods.length === 0 && (x += a * 2);
2716
- let C = -b / 2, w = -x / 2, E = g.rectangle(C - i, w - i - (h ? i : s.members.length === 0 && s.methods.length === 0 ? -i / 2 : 0), b + 2 * i, x + 2 * i + (h ? i * 2 : s.members.length === 0 && s.methods.length === 0 ? -i : 0), _), D = u.insert(() => E, ":first-child");
2715
+ s.members.length === 0 && s.methods.length === 0 ? x += i : s.members.length > 0 && s.methods.length === 0 && (x += i * 2);
2716
+ let C = -b / 2, w = -x / 2, E = g.rectangle(C - r, w - r - (h ? r : s.members.length === 0 && s.methods.length === 0 ? -r / 2 : 0), b + 2 * r, x + 2 * r + (h ? r * 2 : s.members.length === 0 && s.methods.length === 0 ? -r : 0), _), D = u.insert(() => E, ":first-child");
2717
2717
  D.attr("class", "basic label-container");
2718
2718
  let O = D.node().getBBox();
2719
- u.selectAll(".text").each((e, t, r) => {
2720
- let a = n(r[t]), c = a.attr("transform"), l = 0;
2719
+ u.selectAll(".text").each((e, t, n) => {
2720
+ let i = a(n[t]), c = i.attr("transform"), l = 0;
2721
2721
  if (c) {
2722
2722
  let e = RegExp(/translate\(([^,]+),([^)]+)\)/).exec(c);
2723
2723
  e && (l = parseFloat(e[2]));
2724
2724
  }
2725
- let d = l + w + i - (h ? i : s.members.length === 0 && s.methods.length === 0 ? -i / 2 : 0);
2725
+ let d = l + w + r - (h ? r : s.members.length === 0 && s.methods.length === 0 ? -r / 2 : 0);
2726
2726
  o || (d -= 4);
2727
2727
  let f = C;
2728
- (a.attr("class").includes("label-group") || a.attr("class").includes("annotation-group")) && (f = -a.node()?.getBBox().width / 2 || 0, u.selectAll("text").each(function(e, t, n) {
2728
+ (i.attr("class").includes("label-group") || i.attr("class").includes("annotation-group")) && (f = -i.node()?.getBBox().width / 2 || 0, u.selectAll("text").each(function(e, t, n) {
2729
2729
  window.getComputedStyle(n[t]).textAnchor === "middle" && (f = 0);
2730
- })), a.attr("transform", `translate(${f}, ${d})`);
2730
+ })), i.attr("transform", `translate(${f}, ${d})`);
2731
2731
  });
2732
- let k = u.select(".annotation-group").node().getBBox().height - (h ? i / 2 : 0) || 0, A = u.select(".label-group").node().getBBox().height - (h ? i / 2 : 0) || 0, j = u.select(".members-group").node().getBBox().height - (h ? i / 2 : 0) || 0;
2732
+ let k = u.select(".annotation-group").node().getBBox().height - (h ? r / 2 : 0) || 0, A = u.select(".label-group").node().getBBox().height - (h ? r / 2 : 0) || 0, j = u.select(".members-group").node().getBBox().height - (h ? r / 2 : 0) || 0;
2733
2733
  if (s.members.length > 0 || s.methods.length > 0 || h) {
2734
- let e = g.line(O.x, k + A + w + i, O.x + O.width, k + A + w + i, _);
2734
+ let e = g.line(O.x, k + A + w + r, O.x + O.width, k + A + w + r, _);
2735
2735
  u.insert(() => e).attr("class", "divider").attr("style", m);
2736
2736
  }
2737
2737
  if (h || s.members.length > 0 || s.methods.length > 0) {
2738
- let e = g.line(O.x, k + A + j + w + a * 2 + i, O.x + O.width, k + A + j + w + i + a * 2, _);
2738
+ let e = g.line(O.x, k + A + j + w + i * 2 + r, O.x + O.width, k + A + j + w + r + i * 2, _);
2739
2739
  u.insert(() => e).attr("class", "divider").attr("style", m);
2740
2740
  }
2741
2741
  if (s.look !== "handDrawn" && u.selectAll("path").attr("style", m), D.select(":nth-child(2)").attr("style", m), u.selectAll(".divider").select("path").attr("style", m), t.labelStyle ? u.selectAll("span").attr("style", t.labelStyle) : u.selectAll("span").attr("style", m), !o) {
@@ -2755,20 +2755,20 @@ async function xt(e, t) {
2755
2755
  return W.rect(t, e);
2756
2756
  }, u;
2757
2757
  }
2758
- t(xt, "classBox");
2758
+ i(xt, "classBox");
2759
2759
  async function St(e, t) {
2760
- let { labelStyles: r, nodeStyles: i } = y(t);
2761
- t.labelStyle = r;
2762
- let a = t, o = t, s = "verifyMethod" in t, c = E(t), l = e.insert("g").attr("class", c).attr("id", t.domId ?? t.id), u;
2763
- u = s ? await Q(l, `&lt;&lt;${a.type}&gt;&gt;`, 0, t.labelStyle) : await Q(l, "&lt;&lt;Element&gt;&gt;", 0, t.labelStyle);
2764
- let d = u, f = await Q(l, a.name, d, t.labelStyle + "; font-weight: bold;");
2760
+ let { labelStyles: n, nodeStyles: r } = y(t);
2761
+ t.labelStyle = n;
2762
+ let i = t, o = t, s = "verifyMethod" in t, c = E(t), l = e.insert("g").attr("class", c).attr("id", t.domId ?? t.id), u;
2763
+ u = s ? await Q(l, `&lt;&lt;${i.type}&gt;&gt;`, 0, t.labelStyle) : await Q(l, "&lt;&lt;Element&gt;&gt;", 0, t.labelStyle);
2764
+ let d = u, f = await Q(l, i.name, d, t.labelStyle + "; font-weight: bold;");
2765
2765
  if (d += f + 20, s) {
2766
- let e = await Q(l, `${a.requirementId ? `ID: ${a.requirementId}` : ""}`, d, t.labelStyle);
2766
+ let e = await Q(l, `${i.requirementId ? `ID: ${i.requirementId}` : ""}`, d, t.labelStyle);
2767
2767
  d += e;
2768
- let n = await Q(l, `${a.text ? `Text: ${a.text}` : ""}`, d, t.labelStyle);
2768
+ let n = await Q(l, `${i.text ? `Text: ${i.text}` : ""}`, d, t.labelStyle);
2769
2769
  d += n;
2770
- let r = await Q(l, `${a.risk ? `Risk: ${a.risk}` : ""}`, d, t.labelStyle);
2771
- d += r, await Q(l, `${a.verifyMethod ? `Verification: ${a.verifyMethod}` : ""}`, d, t.labelStyle);
2770
+ let r = await Q(l, `${i.risk ? `Risk: ${i.risk}` : ""}`, d, t.labelStyle);
2771
+ d += r, await Q(l, `${i.verifyMethod ? `Verification: ${i.verifyMethod}` : ""}`, d, t.labelStyle);
2772
2772
  } else {
2773
2773
  let e = await Q(l, `${o.type ? `Type: ${o.type}` : ""}`, d, t.labelStyle);
2774
2774
  d += e, await Q(l, `${o.docRef ? `Doc Ref: ${o.docRef}` : ""}`, d, t.labelStyle);
@@ -2776,33 +2776,33 @@ async function St(e, t) {
2776
2776
  let p = (l.node()?.getBBox().width ?? 200) + 20, m = (l.node()?.getBBox().height ?? 200) + 20, h = -p / 2, g = -m / 2, _ = S.svg(l), b = v(t, {});
2777
2777
  t.look !== "handDrawn" && (b.roughness = 0, b.fillStyle = "solid");
2778
2778
  let x = _.rectangle(h, g, p, m, b), C = l.insert(() => x, ":first-child");
2779
- if (C.attr("class", "basic label-container").attr("style", i), l.selectAll(".label").each((e, t, r) => {
2780
- let i = n(r[t]), a = i.attr("transform"), o = 0, s = 0;
2781
- if (a) {
2782
- let e = RegExp(/translate\(([^,]+),([^)]+)\)/).exec(a);
2779
+ if (C.attr("class", "basic label-container").attr("style", r), l.selectAll(".label").each((e, t, n) => {
2780
+ let r = a(n[t]), i = r.attr("transform"), o = 0, s = 0;
2781
+ if (i) {
2782
+ let e = RegExp(/translate\(([^,]+),([^)]+)\)/).exec(i);
2783
2783
  e && (o = parseFloat(e[1]), s = parseFloat(e[2]));
2784
2784
  }
2785
2785
  let c = s - m / 2, l = h + 20 / 2;
2786
- (t === 0 || t === 1) && (l = o), i.attr("transform", `translate(${l}, ${c + 20})`);
2786
+ (t === 0 || t === 1) && (l = o), r.attr("transform", `translate(${l}, ${c + 20})`);
2787
2787
  }), d > u + f + 20) {
2788
2788
  let e = _.line(h, g + u + f + 20, h + p, g + u + f + 20, b);
2789
- l.insert(() => e).attr("style", i);
2789
+ l.insert(() => e).attr("style", r);
2790
2790
  }
2791
2791
  return T(t, C), t.intersect = function(e) {
2792
2792
  return W.rect(t, e);
2793
2793
  }, l;
2794
2794
  }
2795
- t(St, "requirementBox");
2796
- async function Q(e, t, i, o = "") {
2797
- if (t === "") return 0;
2798
- let l = e.insert("g").attr("class", "label").attr("style", o), u = c(), d = u.htmlLabels ?? !0, f = await m(l, s(r(t)), {
2799
- width: a(t, u) + 50,
2795
+ i(St, "requirementBox");
2796
+ async function Q(t, r, i, o = "") {
2797
+ if (r === "") return 0;
2798
+ let l = t.insert("g").attr("class", "label").attr("style", o), u = c(), d = u.htmlLabels ?? !0, f = await m(l, s(e(r)), {
2799
+ width: n(r, u) + 50,
2800
2800
  classes: "markdown-node-label",
2801
2801
  useHtmlLabels: d,
2802
2802
  style: o
2803
2803
  }, u), p;
2804
2804
  if (d) {
2805
- let e = f.children[0], t = n(f);
2805
+ let e = f.children[0], t = a(f);
2806
2806
  p = e.getBoundingClientRect(), t.attr("width", p.width), t.attr("height", p.height);
2807
2807
  } else {
2808
2808
  let e = f.children[0];
@@ -2811,8 +2811,8 @@ async function Q(e, t, i, o = "") {
2811
2811
  }
2812
2812
  return l.attr("transform", `translate(${-p.width / 2},${-p.height / 2 + i})`), p.height;
2813
2813
  }
2814
- t(Q, "addText");
2815
- var Ct = /* @__PURE__ */ t((e) => {
2814
+ i(Q, "addText");
2815
+ var Ct = /* @__PURE__ */ i((e) => {
2816
2816
  switch (e) {
2817
2817
  case "Very High": return "red";
2818
2818
  case "High": return "orange";
@@ -2857,11 +2857,11 @@ async function wt(e, t, { config: n }) {
2857
2857
  return W.rect(t, e);
2858
2858
  }, o;
2859
2859
  }
2860
- t(wt, "kanbanItem");
2861
- async function Tt(t, n) {
2862
- let { labelStyles: r, nodeStyles: a } = y(n);
2863
- n.labelStyle = r;
2864
- let { shapeSvg: o, bbox: s, halfPadding: c, label: l } = await C(t, n, E(n)), u = s.width + 10 * c, d = s.height + 8 * c, f = .15 * u, { cssStyles: p } = n, m = s.width + 20, h = s.height + 20, g = Math.max(u, m), _ = Math.max(d, h);
2860
+ i(wt, "kanbanItem");
2861
+ async function Tt(e, n) {
2862
+ let { labelStyles: i, nodeStyles: a } = y(n);
2863
+ n.labelStyle = i;
2864
+ let { shapeSvg: o, bbox: s, halfPadding: c, label: l } = await C(e, n, E(n)), u = s.width + 10 * c, d = s.height + 8 * c, f = .15 * u, { cssStyles: p } = n, m = s.width + 20, h = s.height + 20, g = Math.max(u, m), _ = Math.max(d, h);
2865
2865
  l.attr("transform", `translate(${-s.width / 2}, ${-s.height / 2})`);
2866
2866
  let b, x = `M0 0
2867
2867
  a${f},${f} 1 0,0 ${g * .25},${-1 * _ * .1}
@@ -2883,20 +2883,20 @@ async function Tt(t, n) {
2883
2883
  a${f},${f} 1 0,0 ${g * .1},${-1 * _ * .33}
2884
2884
  H0 V0 Z`;
2885
2885
  if (n.look === "handDrawn") {
2886
- let e = S.svg(o), t = v(n, {}), r = e.path(x, t);
2887
- b = o.insert(() => r, ":first-child"), b.attr("class", "basic label-container").attr("style", i(p));
2886
+ let e = S.svg(o), r = v(n, {}), i = e.path(x, r);
2887
+ b = o.insert(() => i, ":first-child"), b.attr("class", "basic label-container").attr("style", t(p));
2888
2888
  } else b = o.insert("path", ":first-child").attr("class", "basic label-container").attr("style", a).attr("d", x);
2889
2889
  return b.attr("transform", `translate(${-g / 2}, ${-_ / 2})`), T(n, b), n.calcIntersect = function(e, t) {
2890
2890
  return W.rect(e, t);
2891
- }, n.intersect = function(t) {
2892
- return e.info("Bang intersect", n, t), W.rect(n, t);
2891
+ }, n.intersect = function(e) {
2892
+ return r.info("Bang intersect", n, e), W.rect(n, e);
2893
2893
  }, o;
2894
2894
  }
2895
- t(Tt, "bang");
2896
- async function Et(t, n) {
2897
- let { labelStyles: r, nodeStyles: a } = y(n);
2898
- n.labelStyle = r;
2899
- let { shapeSvg: o, bbox: s, halfPadding: c, label: l } = await C(t, n, E(n)), u = s.width + 2 * c, d = s.height + 2 * c, f = .15 * u, p = .25 * u, m = .35 * u, h = .2 * u, { cssStyles: g } = n, _, b = `M0 0
2895
+ i(Tt, "bang");
2896
+ async function Et(e, n) {
2897
+ let { labelStyles: i, nodeStyles: a } = y(n);
2898
+ n.labelStyle = i;
2899
+ let { shapeSvg: o, bbox: s, halfPadding: c, label: l } = await C(e, n, E(n)), u = s.width + 2 * c, d = s.height + 2 * c, f = .15 * u, p = .25 * u, m = .35 * u, h = .2 * u, { cssStyles: g } = n, _, b = `M0 0
2900
2900
  a${f},${f} 0 0,1 ${u * .25},${-1 * u * .1}
2901
2901
  a${m},${m} 1 0,1 ${u * .4},${-1 * u * .1}
2902
2902
  a${p},${p} 1 0,1 ${u * .35},${u * .2}
@@ -2912,16 +2912,16 @@ async function Et(t, n) {
2912
2912
  a${h},${h} 1 0,1 ${u * .1},${-1 * d * .65}
2913
2913
  H0 V0 Z`;
2914
2914
  if (n.look === "handDrawn") {
2915
- let e = S.svg(o), t = v(n, {}), r = e.path(b, t);
2916
- _ = o.insert(() => r, ":first-child"), _.attr("class", "basic label-container").attr("style", i(g));
2915
+ let e = S.svg(o), r = v(n, {}), i = e.path(b, r);
2916
+ _ = o.insert(() => i, ":first-child"), _.attr("class", "basic label-container").attr("style", t(g));
2917
2917
  } else _ = o.insert("path", ":first-child").attr("class", "basic label-container").attr("style", a).attr("d", b);
2918
2918
  return l.attr("transform", `translate(${-s.width / 2}, ${-s.height / 2})`), _.attr("transform", `translate(${-u / 2}, ${-d / 2})`), T(n, _), n.calcIntersect = function(e, t) {
2919
2919
  return W.rect(e, t);
2920
- }, n.intersect = function(t) {
2921
- return e.info("Cloud intersect", n, t), W.rect(n, t);
2920
+ }, n.intersect = function(e) {
2921
+ return r.info("Cloud intersect", n, e), W.rect(n, e);
2922
2922
  }, o;
2923
2923
  }
2924
- t(Et, "cloud");
2924
+ i(Et, "cloud");
2925
2925
  async function Dt(e, t) {
2926
2926
  let { labelStyles: n, nodeStyles: r } = y(t);
2927
2927
  t.labelStyle = n;
@@ -2943,11 +2943,11 @@ async function Dt(e, t) {
2943
2943
  return W.rect(t, e);
2944
2944
  }, i;
2945
2945
  }
2946
- t(Dt, "defaultMindmapNode");
2946
+ i(Dt, "defaultMindmapNode");
2947
2947
  async function Ot(e, t) {
2948
2948
  return le(e, t, { padding: t.padding ?? 0 });
2949
2949
  }
2950
- t(Ot, "mindmapCircle");
2950
+ i(Ot, "mindmapCircle");
2951
2951
  var kt = [
2952
2952
  {
2953
2953
  semanticName: "Process",
@@ -3377,7 +3377,7 @@ var kt = [
3377
3377
  aliases: ["lined-document"],
3378
3378
  handler: Ue
3379
3379
  }
3380
- ], At = (/* @__PURE__ */ t(() => {
3380
+ ], At = (/* @__PURE__ */ i(() => {
3381
3381
  let e = [...Object.entries({
3382
3382
  state: nt,
3383
3383
  choice: ce,
@@ -3406,7 +3406,7 @@ var kt = [
3406
3406
  function jt(e) {
3407
3407
  return e in At;
3408
3408
  }
3409
- t(jt, "isValidShape");
3409
+ i(jt, "isValidShape");
3410
3410
  var $ = /* @__PURE__ */ new Map();
3411
3411
  async function Mt(e, t, n) {
3412
3412
  let r, i;
@@ -3419,16 +3419,16 @@ async function Mt(e, t, n) {
3419
3419
  } else i = await a(e, t, n), r = i;
3420
3420
  return t.tooltip && i.attr("title", t.tooltip), $.set(t.id, r), t.haveCallback && r.attr("class", r.attr("class") + " clickable"), r;
3421
3421
  }
3422
- t(Mt, "insertNode");
3423
- var Nt = /* @__PURE__ */ t((e, t) => {
3422
+ i(Mt, "insertNode");
3423
+ var Nt = /* @__PURE__ */ i((e, t) => {
3424
3424
  $.set(t.id, e);
3425
- }, "setNodeElem"), Pt = /* @__PURE__ */ t(() => {
3425
+ }, "setNodeElem"), Pt = /* @__PURE__ */ i(() => {
3426
3426
  $.clear();
3427
- }, "clear"), Ft = /* @__PURE__ */ t((t) => {
3428
- let n = $.get(t.id);
3429
- e.trace("Transforming node", t.diff, t, "translate(" + (t.x - t.width / 2 - 5) + ", " + t.width / 2 + ")");
3430
- let r = t.diff || 0;
3431
- return t.clusterNode ? n.attr("transform", "translate(" + (t.x + r - t.width / 2) + ", " + (t.y - t.height / 2 - 8) + ")") : n.attr("transform", "translate(" + t.x + ", " + t.y + ")"), r;
3427
+ }, "clear"), Ft = /* @__PURE__ */ i((e) => {
3428
+ let t = $.get(e.id);
3429
+ r.trace("Transforming node", e.diff, e, "translate(" + (e.x - e.width / 2 - 5) + ", " + e.width / 2 + ")");
3430
+ let n = e.diff || 0;
3431
+ return e.clusterNode ? t.attr("transform", "translate(" + (e.x + n - e.width / 2) + ", " + (e.y - e.height / 2 - 8) + ")") : t.attr("transform", "translate(" + e.x + ", " + e.y + ")"), n;
3432
3432
  }, "positionNode");
3433
3433
  //#endregion
3434
3434
  export { Mt as a, Ft as c, I as i, Nt as l, Pt as n, jt as o, j as r, C as s, L as t, T as u };