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

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 (156) hide show
  1. package/dist/actions/Actions.js +1 -1
  2. package/dist/attachments/index.js +1 -1
  3. package/dist/code-highlighter/CodeHighlighter.js +24 -7
  4. package/dist/conversations/index.js +1 -1
  5. package/dist/file-card/FileCard.js +1 -1
  6. package/dist/file-card/List.js +1 -1
  7. package/dist/index.umd.js +73 -32
  8. package/dist/locale/useLocale.js +1 -1
  9. package/dist/mermaid/Mermaid.js +1 -1
  10. package/dist/package.js +1 -1
  11. package/dist/prompts/Prompts.js +1 -1
  12. package/dist/sender/Sender.js +1 -1
  13. package/dist/sender/SenderHeader.js +1 -1
  14. package/dist/sender/SenderSwitch.js +1 -1
  15. package/dist/sources/Sources.js +1 -1
  16. package/dist/suggestion/Suggestion.js +1 -1
  17. package/dist/theme/genStyleUtils.js +1 -1
  18. package/dist/think/Think.js +1 -1
  19. package/dist/thought-chain/Item.js +1 -1
  20. package/dist/thought-chain/Node.js +1 -1
  21. package/dist/thought-chain/ThoughtChain.js +1 -1
  22. package/dist/welcome/index.js +1 -1
  23. package/dist/x-provider/context.d.ts +5 -1
  24. package/dist/x-provider/hooks/use-x-provider-context.js +1 -1
  25. package/dist/x-provider/index.d.ts +47 -0
  26. package/dist/x-provider/index.js +25 -0
  27. package/{dist-browser/Serializer-y_SfSPKv.js → es/Serializer-D1JYN1kI.js} +4 -4
  28. package/{dist-browser/_basePickBy-Cy7KVmkk.js → es/_basePickBy-DZiMKfOQ.js} +23 -23
  29. package/{dist-browser/_baseUniq-Ch3HuHeT.js → es/_baseUniq-DY3uHjSO.js} +83 -83
  30. package/es/antdv-next-x.esm.js +21009 -0
  31. package/{dist-browser/arc-caEkbRYF.js → es/arc-BuXEd18J.js} +3 -3
  32. package/es/architecture-PBZL5I3N-BdQzc3t9.js +3 -0
  33. package/{dist-browser/architectureDiagram-2XIMDMQ5-D3IYLROv.js → es/architectureDiagram-2XIMDMQ5-C8x7stcr.js} +85 -85
  34. package/{dist-browser/blockDiagram-WCTKOSBZ-nXanZ0sc.js → es/blockDiagram-WCTKOSBZ-DA-s3zoq.js} +530 -530
  35. package/{dist-browser/c4Diagram-IC4MRINW-C-gVp6th.js → es/c4Diagram-IC4MRINW-DD81dyS8.js} +170 -170
  36. package/es/channel-DZcPzDuw.js +5 -0
  37. package/{dist-browser/chunk-4BX2VUAB-fLFD6XW0.js → es/chunk-4BX2VUAB-B3zzxglQ.js} +2 -2
  38. package/{dist-browser/chunk-55IACEB6-OtyKJzCH.js → es/chunk-55IACEB6-CA9CRLkM.js} +2 -2
  39. package/{dist-browser/chunk-7E7YKBS2-C1dd36rm.js → es/chunk-7E7YKBS2-C_F-WOLQ.js} +2 -2
  40. package/{dist-browser/chunk-7R4GIKGN-DuTRhdsf.js → es/chunk-7R4GIKGN-CaI-1szl.js} +3 -3
  41. package/{dist-browser/chunk-C72U2L5F-ClmZGhFC.js → es/chunk-C72U2L5F-l6RZhGri.js} +2 -2
  42. package/{dist-browser/chunk-EGIJ26TM-Bar_u1MN.js → es/chunk-EGIJ26TM-Be42NeHw.js} +2 -2
  43. package/{dist-browser/chunk-FMBD7UC4-C_uJ_JJA.js → es/chunk-FMBD7UC4-DJh0L322.js} +2 -2
  44. package/{dist-browser/chunk-GEFDOKGD-P7WhyrTU.js → es/chunk-GEFDOKGD-BWt_f4io.js} +278 -278
  45. package/es/chunk-GLR3WWYH-B30PgFZZ.js +41 -0
  46. package/{dist-browser/chunk-HHEYEP7N-rv5s5WD4.js → es/chunk-HHEYEP7N-DkMnkoQX.js} +3 -3
  47. package/{dist-browser/chunk-JSJVCQXG-89HUGe9V.js → es/chunk-JSJVCQXG-ddNKdfu8.js} +4 -4
  48. package/{dist-browser/chunk-KX2RTZJC-pMHnNRQg.js → es/chunk-KX2RTZJC-BbnGQVgL.js} +3 -3
  49. package/{dist-browser/chunk-KYZI473N-DJmSs1gK.js → es/chunk-KYZI473N-B2rmiORt.js} +573 -573
  50. package/{dist-browser/chunk-L3YUKLVL-Ck54qytQ.js → es/chunk-L3YUKLVL-CmAZrf2E.js} +2 -2
  51. package/{dist-browser/chunk-MX3YWQON-MkpK3uBD.js → es/chunk-MX3YWQON-B3_AxMM1.js} +2 -2
  52. package/{dist-browser/chunk-NQ4KR5QH-DGshodQv.js → es/chunk-NQ4KR5QH-CmCG9ow3.js} +120 -120
  53. package/{dist-browser/chunk-O4XLMI2P-e-ZzDQwg.js → es/chunk-O4XLMI2P-CTLwv925.js} +238 -238
  54. package/{dist-browser/chunk-OZEHJAEY-DULNd43V.js → es/chunk-OZEHJAEY-CtONdvqY.js} +2 -2
  55. package/{dist-browser/chunk-PQ6SQG4A-CQ9Csv7s.js → es/chunk-PQ6SQG4A-Dx7no2mb.js} +3 -3
  56. package/{dist-browser/chunk-PU5JKC2W-DkEFvrjH.js → es/chunk-PU5JKC2W-O9_8B7zU.js} +76 -76
  57. package/{dist-browser/chunk-QZHKN3VN-qww1plfw.js → es/chunk-QZHKN3VN-BbuqVxkO.js} +2 -2
  58. package/{dist-browser/chunk-R5LLSJPH-BERXSDGJ.js → es/chunk-R5LLSJPH-CpwKqyBY.js} +2 -2
  59. package/{dist-browser/chunk-WL4C6EOR-C-d8WPS7.js → es/chunk-WL4C6EOR-BXrjoxmr.js} +120 -120
  60. package/{dist-browser/chunk-XIRO2GV7-CFHofxVB.js → es/chunk-XIRO2GV7-4kMze38t.js} +2 -2
  61. package/{dist-browser/chunk-XPW4576I-DgvoNZkW.js → es/chunk-XPW4576I-DG6JendS.js} +2 -2
  62. package/{dist-browser/chunk-XZSTWKYB-k8_EXrSa.js → es/chunk-XZSTWKYB-DjOnj3KP.js} +93 -93
  63. package/{dist-browser/chunk-YBOYWFTD-BUW4AzEX.js → es/chunk-YBOYWFTD-DVAsFYJ-.js} +8 -8
  64. package/es/classDiagram-VBA2DB6C-wt_pcvEN.js +29 -0
  65. package/es/classDiagram-v2-RAHNMMFH-B8Bw4b3n.js +29 -0
  66. package/es/clone-CtpnpaZq.js +8 -0
  67. package/{dist-browser/cose-bilkent-S5V4N54A-CnrS2OC1.js → es/cose-bilkent-S5V4N54A-IRlkXPnk.js} +3 -3
  68. package/{dist-browser/css-Dh17kjFY.js → es/css-DyS1hwc1.js} +1 -1
  69. package/es/css-HrHT_VUz.js +2 -0
  70. package/{dist-browser/cytoscape.esm-BY3wHcbp.js → es/cytoscape.esm-i2CZcWd-.js} +1 -1
  71. package/{dist-browser/dagre-BJOzGlhW.js → es/dagre-Dm2PNtRY.js} +57 -57
  72. package/es/dagre-KLK3FWXG-DLgOeqbz.js +294 -0
  73. package/{dist-browser/defaultLocale-BaPFSbai.js → es/defaultLocale-bckJcYh1.js} +12 -12
  74. package/{dist-browser/diagram-E7M64L7V-DxuJj8ZG.js → es/diagram-E7M64L7V-Cdek_47s.js} +83 -83
  75. package/{dist-browser/diagram-IFDJBPK2-BOpPZ6pu.js → es/diagram-IFDJBPK2-DzCaWPW3.js} +31 -31
  76. package/{dist-browser/diagram-P4PSJMXO--ChDmcya.js → es/diagram-P4PSJMXO-B7pPaer-.js} +32 -32
  77. package/{dist-browser/dist-DltyvPj3.js → es/dist-BX_roQzC.js} +1 -1
  78. package/{dist-browser/erDiagram-INFDFZHY-BA3m-v87.js → es/erDiagram-INFDFZHY-BZHMCNB3.js} +128 -128
  79. package/{dist-browser/flowDiagram-PKNHOUZH-BCq6k3kr.js → es/flowDiagram-PKNHOUZH-BBJx8-jP.js} +156 -156
  80. package/{dist-browser/ganttDiagram-A5KZAMGK-DdMePS21.js → es/ganttDiagram-A5KZAMGK-4TJAHJUF.js} +622 -625
  81. package/es/gitGraph-HDMCJU4V-CGPcRI5K.js +3 -0
  82. package/{dist-browser/gitGraphDiagram-K3NZZRJ6-CLbRwChG.js → es/gitGraphDiagram-K3NZZRJ6-CSATib_y.js} +176 -176
  83. package/{dist-browser/graphlib-C7ysKz4u.js → es/graphlib-WtNUGuyd.js} +4 -4
  84. package/{dist-browser/html-BmZO1Eoo.js → es/html-B6UxjOv0.js} +2 -2
  85. package/es/html-Hb1oe8XT.js +2 -0
  86. package/es/info-3K5VOQVL-D6bOjfim.js +3 -0
  87. package/{dist-browser/infoDiagram-LFFYTUFH-DQAZ-vFk.js → es/infoDiagram-LFFYTUFH-ahqynRAA.js} +5 -5
  88. package/{dist-browser/init-PAs0hR-b.js → es/init-B75p2clj.js} +1 -1
  89. package/{dist-browser/isArrayLikeObject-y3HlYDaX.js → es/isArrayLikeObject-D4gDJaEW.js} +80 -80
  90. package/{dist-browser/isEmpty-2JxdWtc-.js → es/isEmpty-BgdRybYg.js} +3 -3
  91. package/{dist-browser/ishikawaDiagram-PHBUUO56-B0r2IgGz.js → es/ishikawaDiagram-PHBUUO56-B9NWp429.js} +67 -67
  92. package/{dist-browser/journeyDiagram-4ABVD52K-DnMUhOvg.js → es/journeyDiagram-4ABVD52K-CXmYa8OF.js} +6 -6
  93. package/{dist-browser/kanban-definition-K7BYSVSG-Da5Y-nJy.js → es/kanban-definition-K7BYSVSG-g9tToeab.js} +11 -11
  94. package/{dist-browser/katex-b-xdokOf.js → es/katex-Bvh2oRWI.js} +1 -1
  95. package/{dist-browser/line-h2iCTGsE.js → es/line-DETnb8Mr.js} +4 -4
  96. package/{dist-browser/linear-Bv7XrZCH.js → es/linear-DGQDIL28.js} +23 -23
  97. package/{dist-browser/math-DPzKeDKn.js → es/math-CoDOuve-.js} +1 -1
  98. package/{dist-browser/mermaid-parser.core-kTgpNO7M.js → es/mermaid-parser.core-DXn-0ev4.js} +16 -16
  99. package/{dist-browser/mermaid.core-DRuUNxpC.js → es/mermaid.core-W4vXivv8.js} +208 -208
  100. package/{dist-browser/mindmap-definition-YRQLILUH-CYeqnCde.js → es/mindmap-definition-YRQLILUH-x9QfilEP.js} +16 -16
  101. package/{dist-browser/ordinal-D8PKtxfM.js → es/ordinal-F3U6aXtP.js} +3 -3
  102. package/es/packet-RMMSAZCW-CW6reTze.js +3 -0
  103. package/{dist-browser/path-DZ-6AyWK.js → es/path-Dm3C8WEs.js} +3 -3
  104. package/es/pie-UPGHQEXC-ByJXXnsc.js +3 -0
  105. package/{dist-browser/pieDiagram-SKSYHLDU-DAsfTGvY.js → es/pieDiagram-SKSYHLDU-CG2GOW6Z.js} +32 -32
  106. package/{dist-browser/quadrantDiagram-337W2JSQ-CZLbmQS4.js → es/quadrantDiagram-337W2JSQ-C81pfz0c.js} +4 -4
  107. package/es/radar-KQ55EAFF-DLq-eYVH.js +3 -0
  108. package/{dist-browser/requirementDiagram-Z7DCOOCP-Cb_Ygnfe.js → es/requirementDiagram-Z7DCOOCP-J-tc0fnw.js} +59 -59
  109. package/{dist-browser/rough.esm-C_hJ3ICT.js → es/rough.esm-BhGP2Udb.js} +1 -1
  110. package/{dist-browser/sankeyDiagram-WA2Y5GQK-DBe5YfW4.js → es/sankeyDiagram-WA2Y5GQK-BfGyH2f1.js} +18 -18
  111. package/{dist-browser/sequenceDiagram-2WXFIKYE-C_KUoojT.js → es/sequenceDiagram-2WXFIKYE-m6aSnjku.js} +390 -390
  112. package/{dist-browser/src-BukXhifV.js → es/src-CFVe5TPD.js} +86 -86
  113. package/{dist-browser/stateDiagram-RAJIS63D-boG6DyfW.js → es/stateDiagram-RAJIS63D-CPJuOh-s.js} +68 -68
  114. package/es/stateDiagram-v2-FVOUBMTO-uxSkj8dH.js +27 -0
  115. package/{dist-browser/timeline-definition-YZTLITO2-pFt6rZ6S.js → es/timeline-definition-YZTLITO2-C7Vz32PK.js} +4 -4
  116. package/es/treemap-KZPCXAKY-BhLuAwPA.js +3 -0
  117. package/{dist-browser/vennDiagram-LZ73GAT5-VaCO6k4H.js → es/vennDiagram-LZ73GAT5-BWloH3fI.js} +107 -107
  118. package/{dist-browser/vue-BJ0ov2CZ.js → es/vue-2aJw7p5p.js} +3 -3
  119. package/{dist-browser/vue-html-D0gyDbfn.js → es/vue-html-DEjI8X9t.js} +1 -1
  120. package/{dist-browser/xychartDiagram-JWTSCODW-xS5ybemA.js → es/xychartDiagram-JWTSCODW-l-SVBlqB.js} +103 -103
  121. package/package.json +13 -11
  122. package/dist/index.esm.js +0 -11377
  123. package/dist-browser/architecture-PBZL5I3N-DHfBr78A.js +0 -3
  124. package/dist-browser/channel-DoEe9DF9.js +0 -5
  125. package/dist-browser/chunk-GLR3WWYH-BvazRgdo.js +0 -41
  126. package/dist-browser/classDiagram-VBA2DB6C-DWTAs0Zm.js +0 -29
  127. package/dist-browser/classDiagram-v2-RAHNMMFH-CoxCdmrt.js +0 -29
  128. package/dist-browser/clone-BXDbKCDu.js +0 -8
  129. package/dist-browser/css-D9vrnIUE.js +0 -2
  130. package/dist-browser/dagre-KLK3FWXG-CFC0naVr.js +0 -294
  131. package/dist-browser/gitGraph-HDMCJU4V-DbzpICZW.js +0 -3
  132. package/dist-browser/html-DnTYsv5k.js +0 -2
  133. package/dist-browser/index.es.js +0 -56150
  134. package/dist-browser/index.umd.js +0 -3281
  135. package/dist-browser/info-3K5VOQVL-CpUiQuel.js +0 -3
  136. package/dist-browser/packet-RMMSAZCW-UTFQ0FQx.js +0 -3
  137. package/dist-browser/pie-UPGHQEXC-CarAcBSi.js +0 -3
  138. package/dist-browser/radar-KQ55EAFF-NXK5PC9R.js +0 -3
  139. package/dist-browser/stateDiagram-v2-FVOUBMTO-DHCajhrN.js +0 -27
  140. package/dist-browser/treemap-KZPCXAKY-Cj9QakFB.js +0 -3
  141. /package/{dist-browser → es}/array-CWNufkl9.js +0 -0
  142. /package/{dist-browser → es}/bash-CXEwhtGQ.js +0 -0
  143. /package/{dist-browser → es}/chunk-WQLz0Won.js +0 -0
  144. /package/{dist-browser → es}/diff-BSu5dsa2.js +0 -0
  145. /package/{dist-browser → es}/javascript-BXHK_bZ2.js +0 -0
  146. /package/{dist-browser → es}/javascript-NV_FQBab.js +0 -0
  147. /package/{dist-browser → es}/json-C8Y9C4Ne.js +0 -0
  148. /package/{dist-browser → es}/json-DZ_9-j3Q.js +0 -0
  149. /package/{dist-browser → es}/jsx-CxlNNvOI.js +0 -0
  150. /package/{dist-browser → es}/markdown-BKwT7HWz.js +0 -0
  151. /package/{dist-browser → es}/mermaid-C1RUu_Iw.js +0 -0
  152. /package/{dist-browser → es}/python-BQM8giqx.js +0 -0
  153. /package/{dist-browser → es}/tsx-DIYEV_g7.js +0 -0
  154. /package/{dist-browser → es}/typescript-B6MWEsBH.js +0 -0
  155. /package/{dist-browser → es}/typescript-CR48gG1F.js +0 -0
  156. /package/{dist-browser → es}/yaml-Y0CqUPTQ.js +0 -0
@@ -1,17 +1,17 @@
1
- import { g as e, h as t, p as n } from "./src-BukXhifV.js";
2
- import { C as r, D as i, E as a, O as o, S as s, T as c, _ as l, b as u, h as d, v as f, w as p, x as m, y as h } from "./chunk-GEFDOKGD-P7WhyrTU.js";
3
- import { b as g, w as _ } from "./chunk-7R4GIKGN-DuTRhdsf.js";
4
- import { t as v } from "./line-h2iCTGsE.js";
5
- import { n as y } from "./chunk-PU5JKC2W-DkEFvrjH.js";
6
- import { i as b, n as x, r as S, t as C } from "./chunk-MX3YWQON-MkpK3uBD.js";
7
- import { n as w } from "./chunk-YBOYWFTD-BUW4AzEX.js";
8
- import { i as T, n as E } from "./chunk-PQ6SQG4A-CQ9Csv7s.js";
9
- import { t as D } from "./rough.esm-C_hJ3ICT.js";
10
- import { r as O } from "./chunk-KYZI473N-DJmSs1gK.js";
11
- //#region ../../node_modules/mermaid/dist/chunks/mermaid.core/chunk-O4XLMI2P.mjs
12
- var ee = /* @__PURE__ */ t((e, t, n, r, i, a) => {
13
- t.arrowTypeStart && A(e, "start", t.arrowTypeStart, n, r, i, a), t.arrowTypeEnd && A(e, "end", t.arrowTypeEnd, n, r, i, a);
14
- }, "addEdgeMarkers"), k = {
1
+ import { C as e, D as t, E as n, O as r, S as i, T as a, _ as o, b as s, h as c, v as l, w as u, x as d, y as f } from "./chunk-GEFDOKGD-BWt_f4io.js";
2
+ import { g as p, h as m, p as h } from "./src-CFVe5TPD.js";
3
+ import { b as g, w as _ } from "./chunk-7R4GIKGN-CaI-1szl.js";
4
+ import { t as v } from "./line-DETnb8Mr.js";
5
+ import { n as y } from "./chunk-PU5JKC2W-O9_8B7zU.js";
6
+ import { i as b, n as x, r as S, t as C } from "./chunk-MX3YWQON-B3_AxMM1.js";
7
+ import { n as w } from "./chunk-YBOYWFTD-DVAsFYJ-.js";
8
+ import { i as T, n as ee } from "./chunk-PQ6SQG4A-Dx7no2mb.js";
9
+ import { t as te } from "./rough.esm-BhGP2Udb.js";
10
+ import { r as E } from "./chunk-KYZI473N-B2rmiORt.js";
11
+ //#region ../../node_modules/.pnpm/mermaid@11.13.0/node_modules/mermaid/dist/chunks/mermaid.core/chunk-O4XLMI2P.mjs
12
+ var D = /* @__PURE__ */ m((e, t, n, r, i, a) => {
13
+ t.arrowTypeStart && k(e, "start", t.arrowTypeStart, n, r, i, a), t.arrowTypeEnd && k(e, "end", t.arrowTypeEnd, n, r, i, a);
14
+ }, "addEdgeMarkers"), O = {
15
15
  arrow_cross: {
16
16
  type: "cross",
17
17
  fill: !1
@@ -72,182 +72,182 @@ var ee = /* @__PURE__ */ t((e, t, n, r, i, a) => {
72
72
  type: "requirement_contains",
73
73
  fill: !1
74
74
  }
75
- }, A = /* @__PURE__ */ t((t, n, r, i, a, o, s) => {
76
- let c = k[r];
77
- if (!c) {
78
- e.warn(`Unknown arrow type: ${r}`);
75
+ }, k = /* @__PURE__ */ m((e, t, n, r, i, a, o) => {
76
+ let s = O[n];
77
+ if (!s) {
78
+ p.warn(`Unknown arrow type: ${n}`);
79
79
  return;
80
80
  }
81
- let l = `${a}_${o}-${c.type}${n === "start" ? "Start" : "End"}`;
82
- if (s && s.trim() !== "") {
83
- let e = `${l}_${s.replace(/[^\dA-Za-z]/g, "_")}`;
84
- if (!document.getElementById(e)) {
85
- let t = document.getElementById(l);
86
- if (t) {
87
- let n = t.cloneNode(!0);
88
- n.id = e, n.querySelectorAll("path, circle, line").forEach((e) => {
89
- e.setAttribute("stroke", s), c.fill && e.setAttribute("fill", s);
90
- }), t.parentNode?.appendChild(n);
81
+ let c = `${i}_${a}-${s.type}${t === "start" ? "Start" : "End"}`;
82
+ if (o && o.trim() !== "") {
83
+ let n = `${c}_${o.replace(/[^\dA-Za-z]/g, "_")}`;
84
+ if (!document.getElementById(n)) {
85
+ let e = document.getElementById(c);
86
+ if (e) {
87
+ let t = e.cloneNode(!0);
88
+ t.id = n, t.querySelectorAll("path, circle, line").forEach((e) => {
89
+ e.setAttribute("stroke", o), s.fill && e.setAttribute("fill", o);
90
+ }), e.parentNode?.appendChild(t);
91
91
  }
92
92
  }
93
- t.attr(`marker-${n}`, `url(${i}#${e})`);
94
- } else t.attr(`marker-${n}`, `url(${i}#${l})`);
95
- }, "addEdgeMarker"), te = /* @__PURE__ */ t((e) => typeof e == "string" ? e : g()?.flowchart?.curve, "resolveEdgeCurveType"), j = /* @__PURE__ */ new Map(), M = /* @__PURE__ */ new Map(), N = /* @__PURE__ */ t(() => {
96
- j.clear(), M.clear();
97
- }, "clear"), P = /* @__PURE__ */ t((e) => e ? typeof e == "string" ? e : e.reduce((e, t) => e + ";" + t, "") : "", "getLabelStyles"), F = /* @__PURE__ */ t(async (t, r) => {
98
- let i = g(), a = _(i), { labelStyles: o } = T(r);
99
- r.labelStyle = o;
100
- let s = t.insert("g").attr("class", "edgeLabel"), c = s.insert("g").attr("class", "label").attr("data-id", r.id), l = r.labelType === "markdown", u = await y(t, r.label, {
101
- style: P(r.labelStyle),
102
- useHtmlLabels: a,
93
+ e.attr(`marker-${t}`, `url(${r}#${n})`);
94
+ } else e.attr(`marker-${t}`, `url(${r}#${c})`);
95
+ }, "addEdgeMarker"), ne = /* @__PURE__ */ m((e) => typeof e == "string" ? e : g()?.flowchart?.curve, "resolveEdgeCurveType"), A = /* @__PURE__ */ new Map(), j = /* @__PURE__ */ new Map(), M = /* @__PURE__ */ m(() => {
96
+ A.clear(), j.clear();
97
+ }, "clear"), N = /* @__PURE__ */ m((e) => e ? typeof e == "string" ? e : e.reduce((e, t) => e + ";" + t, "") : "", "getLabelStyles"), P = /* @__PURE__ */ m(async (e, t) => {
98
+ let n = g(), r = _(n), { labelStyles: i } = T(t);
99
+ t.labelStyle = i;
100
+ let a = e.insert("g").attr("class", "edgeLabel"), o = a.insert("g").attr("class", "label").attr("data-id", t.id), s = t.labelType === "markdown", c = await y(e, t.label, {
101
+ style: N(t.labelStyle),
102
+ useHtmlLabels: r,
103
103
  addSvgBackground: !0,
104
104
  isNode: !1,
105
- markdown: l,
105
+ markdown: s,
106
106
  width: void 0
107
- }, i);
108
- c.node().appendChild(u), e.info("abc82", r, r.labelType);
109
- let d = u.getBBox(), f = d;
110
- if (a) {
111
- let e = u.children[0], t = n(u);
112
- d = e.getBoundingClientRect(), f = d, t.attr("width", d.width), t.attr("height", d.height);
107
+ }, n);
108
+ o.node().appendChild(c), p.info("abc82", t, t.labelType);
109
+ let l = c.getBBox(), u = l;
110
+ if (r) {
111
+ let e = c.children[0], t = h(c);
112
+ l = e.getBoundingClientRect(), u = l, t.attr("width", l.width), t.attr("height", l.height);
113
113
  } else {
114
- let e = n(u).select("text").node();
115
- e && typeof e.getBBox == "function" && (f = e.getBBox());
114
+ let e = h(c).select("text").node();
115
+ e && typeof e.getBBox == "function" && (u = e.getBBox());
116
116
  }
117
- c.attr("transform", C(f, a)), j.set(r.id, s), r.width = d.width, r.height = d.height;
118
- let p;
119
- if (r.startLabelLeft) {
120
- let e = t.insert("g").attr("class", "edgeTerminals"), i = e.insert("g").attr("class", "inner"), o = await O(i, r.startLabelLeft, P(r.labelStyle) || "", !1, !1);
121
- p = o;
122
- let s = o.getBBox();
123
- if (a) {
124
- let e = o.children[0], t = n(o);
125
- s = e.getBoundingClientRect(), t.attr("width", s.width), t.attr("height", s.height);
117
+ o.attr("transform", C(u, r)), A.set(t.id, a), t.width = l.width, t.height = l.height;
118
+ let d;
119
+ if (t.startLabelLeft) {
120
+ let n = e.insert("g").attr("class", "edgeTerminals"), i = n.insert("g").attr("class", "inner"), a = await E(i, t.startLabelLeft, N(t.labelStyle) || "", !1, !1);
121
+ d = a;
122
+ let o = a.getBBox();
123
+ if (r) {
124
+ let e = a.children[0], t = h(a);
125
+ o = e.getBoundingClientRect(), t.attr("width", o.width), t.attr("height", o.height);
126
126
  }
127
- i.attr("transform", C(s, a)), M.get(r.id) || M.set(r.id, {}), M.get(r.id).startLeft = e, I(p, r.startLabelLeft);
127
+ i.attr("transform", C(o, r)), j.get(t.id) || j.set(t.id, {}), j.get(t.id).startLeft = n, F(d, t.startLabelLeft);
128
128
  }
129
- if (r.startLabelRight) {
130
- let e = t.insert("g").attr("class", "edgeTerminals"), i = e.insert("g").attr("class", "inner"), o = await O(i, r.startLabelRight, P(r.labelStyle) || "", !1, !1);
131
- p = o, i.node().appendChild(o);
132
- let s = o.getBBox();
133
- if (a) {
134
- let e = o.children[0], t = n(o);
135
- s = e.getBoundingClientRect(), t.attr("width", s.width), t.attr("height", s.height);
129
+ if (t.startLabelRight) {
130
+ let n = e.insert("g").attr("class", "edgeTerminals"), i = n.insert("g").attr("class", "inner"), a = await E(i, t.startLabelRight, N(t.labelStyle) || "", !1, !1);
131
+ d = a, i.node().appendChild(a);
132
+ let o = a.getBBox();
133
+ if (r) {
134
+ let e = a.children[0], t = h(a);
135
+ o = e.getBoundingClientRect(), t.attr("width", o.width), t.attr("height", o.height);
136
136
  }
137
- i.attr("transform", C(s, a)), M.get(r.id) || M.set(r.id, {}), M.get(r.id).startRight = e, I(p, r.startLabelRight);
137
+ i.attr("transform", C(o, r)), j.get(t.id) || j.set(t.id, {}), j.get(t.id).startRight = n, F(d, t.startLabelRight);
138
138
  }
139
- if (r.endLabelLeft) {
140
- let e = t.insert("g").attr("class", "edgeTerminals"), i = e.insert("g").attr("class", "inner"), o = await O(i, r.endLabelLeft, P(r.labelStyle) || "", !1, !1);
141
- p = o;
142
- let s = o.getBBox();
143
- if (a) {
144
- let e = o.children[0], t = n(o);
145
- s = e.getBoundingClientRect(), t.attr("width", s.width), t.attr("height", s.height);
139
+ if (t.endLabelLeft) {
140
+ let n = e.insert("g").attr("class", "edgeTerminals"), i = n.insert("g").attr("class", "inner"), a = await E(i, t.endLabelLeft, N(t.labelStyle) || "", !1, !1);
141
+ d = a;
142
+ let o = a.getBBox();
143
+ if (r) {
144
+ let e = a.children[0], t = h(a);
145
+ o = e.getBoundingClientRect(), t.attr("width", o.width), t.attr("height", o.height);
146
146
  }
147
- i.attr("transform", C(s, a)), e.node().appendChild(o), M.get(r.id) || M.set(r.id, {}), M.get(r.id).endLeft = e, I(p, r.endLabelLeft);
147
+ i.attr("transform", C(o, r)), n.node().appendChild(a), j.get(t.id) || j.set(t.id, {}), j.get(t.id).endLeft = n, F(d, t.endLabelLeft);
148
148
  }
149
- if (r.endLabelRight) {
150
- let e = t.insert("g").attr("class", "edgeTerminals"), i = e.insert("g").attr("class", "inner"), o = await O(i, r.endLabelRight, P(r.labelStyle) || "", !1, !1);
151
- p = o;
152
- let s = o.getBBox();
153
- if (a) {
154
- let e = o.children[0], t = n(o);
155
- s = e.getBoundingClientRect(), t.attr("width", s.width), t.attr("height", s.height);
149
+ if (t.endLabelRight) {
150
+ let n = e.insert("g").attr("class", "edgeTerminals"), i = n.insert("g").attr("class", "inner"), a = await E(i, t.endLabelRight, N(t.labelStyle) || "", !1, !1);
151
+ d = a;
152
+ let o = a.getBBox();
153
+ if (r) {
154
+ let e = a.children[0], t = h(a);
155
+ o = e.getBoundingClientRect(), t.attr("width", o.width), t.attr("height", o.height);
156
156
  }
157
- i.attr("transform", C(s, a)), e.node().appendChild(o), M.get(r.id) || M.set(r.id, {}), M.get(r.id).endRight = e, I(p, r.endLabelRight);
157
+ i.attr("transform", C(o, r)), n.node().appendChild(a), j.get(t.id) || j.set(t.id, {}), j.get(t.id).endRight = n, F(d, t.endLabelRight);
158
158
  }
159
- return u;
159
+ return c;
160
160
  }, "insertEdgeLabel");
161
- function I(e, t) {
161
+ function F(e, t) {
162
162
  _(g()) && e && (e.style.width = t.length * 9 + "px", e.style.height = "12px");
163
163
  }
164
- t(I, "setTerminalWidth");
165
- var L = /* @__PURE__ */ t((t, n) => {
166
- e.debug("Moving label abc88 ", t.id, t.label, j.get(t.id), n);
167
- let r = n.updatedPath ? n.updatedPath : n.originalPath, { subGraphTitleTotalMargin: i } = w(g());
168
- if (t.label) {
169
- let a = j.get(t.id), o = t.x, s = t.y;
170
- if (r) {
171
- let i = d.calcLabelPosition(r);
172
- e.debug("Moving label " + t.label + " from (", o, ",", s, ") to (", i.x, ",", i.y, ") abc88"), n.updatedPath && (o = i.x, s = i.y);
164
+ m(F, "setTerminalWidth");
165
+ var I = /* @__PURE__ */ m((e, t) => {
166
+ p.debug("Moving label abc88 ", e.id, e.label, A.get(e.id), t);
167
+ let n = t.updatedPath ? t.updatedPath : t.originalPath, { subGraphTitleTotalMargin: r } = w(g());
168
+ if (e.label) {
169
+ let i = A.get(e.id), a = e.x, o = e.y;
170
+ if (n) {
171
+ let r = c.calcLabelPosition(n);
172
+ p.debug("Moving label " + e.label + " from (", a, ",", o, ") to (", r.x, ",", r.y, ") abc88"), t.updatedPath && (a = r.x, o = r.y);
173
173
  }
174
- a.attr("transform", `translate(${o}, ${s + i / 2})`);
174
+ i.attr("transform", `translate(${a}, ${o + r / 2})`);
175
175
  }
176
- if (t.startLabelLeft) {
177
- let e = M.get(t.id).startLeft, n = t.x, i = t.y;
178
- if (r) {
179
- let e = d.calcTerminalLabelPosition(t.arrowTypeStart ? 10 : 0, "start_left", r);
180
- n = e.x, i = e.y;
176
+ if (e.startLabelLeft) {
177
+ let t = j.get(e.id).startLeft, r = e.x, i = e.y;
178
+ if (n) {
179
+ let t = c.calcTerminalLabelPosition(e.arrowTypeStart ? 10 : 0, "start_left", n);
180
+ r = t.x, i = t.y;
181
181
  }
182
- e.attr("transform", `translate(${n}, ${i})`);
182
+ t.attr("transform", `translate(${r}, ${i})`);
183
183
  }
184
- if (t.startLabelRight) {
185
- let e = M.get(t.id).startRight, n = t.x, i = t.y;
186
- if (r) {
187
- let e = d.calcTerminalLabelPosition(t.arrowTypeStart ? 10 : 0, "start_right", r);
188
- n = e.x, i = e.y;
184
+ if (e.startLabelRight) {
185
+ let t = j.get(e.id).startRight, r = e.x, i = e.y;
186
+ if (n) {
187
+ let t = c.calcTerminalLabelPosition(e.arrowTypeStart ? 10 : 0, "start_right", n);
188
+ r = t.x, i = t.y;
189
189
  }
190
- e.attr("transform", `translate(${n}, ${i})`);
190
+ t.attr("transform", `translate(${r}, ${i})`);
191
191
  }
192
- if (t.endLabelLeft) {
193
- let e = M.get(t.id).endLeft, n = t.x, i = t.y;
194
- if (r) {
195
- let e = d.calcTerminalLabelPosition(t.arrowTypeEnd ? 10 : 0, "end_left", r);
196
- n = e.x, i = e.y;
192
+ if (e.endLabelLeft) {
193
+ let t = j.get(e.id).endLeft, r = e.x, i = e.y;
194
+ if (n) {
195
+ let t = c.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_left", n);
196
+ r = t.x, i = t.y;
197
197
  }
198
- e.attr("transform", `translate(${n}, ${i})`);
198
+ t.attr("transform", `translate(${r}, ${i})`);
199
199
  }
200
- if (t.endLabelRight) {
201
- let e = M.get(t.id).endRight, n = t.x, i = t.y;
202
- if (r) {
203
- let e = d.calcTerminalLabelPosition(t.arrowTypeEnd ? 10 : 0, "end_right", r);
204
- n = e.x, i = e.y;
200
+ if (e.endLabelRight) {
201
+ let t = j.get(e.id).endRight, r = e.x, i = e.y;
202
+ if (n) {
203
+ let t = c.calcTerminalLabelPosition(e.arrowTypeEnd ? 10 : 0, "end_right", n);
204
+ r = t.x, i = t.y;
205
205
  }
206
- e.attr("transform", `translate(${n}, ${i})`);
206
+ t.attr("transform", `translate(${r}, ${i})`);
207
207
  }
208
- }, "positionEdgeLabel"), R = /* @__PURE__ */ t((e, t) => {
208
+ }, "positionEdgeLabel"), L = /* @__PURE__ */ m((e, t) => {
209
209
  let n = e.x, r = e.y, i = Math.abs(t.x - n), a = Math.abs(t.y - r), o = e.width / 2, s = e.height / 2;
210
210
  return i >= o || a >= s;
211
- }, "outsideNode"), z = /* @__PURE__ */ t((t, n, r) => {
212
- e.debug(`intersection calc abc89:
213
- outsidePoint: ${JSON.stringify(n)}
214
- insidePoint : ${JSON.stringify(r)}
215
- node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);
216
- let i = t.x, a = t.y, o = Math.abs(i - r.x), s = t.width / 2, c = r.x < n.x ? s - o : s + o, l = t.height / 2, u = Math.abs(n.y - r.y), d = Math.abs(n.x - r.x);
217
- if (Math.abs(a - n.y) * s > Math.abs(i - n.x) * l) {
218
- let t = r.y < n.y ? n.y - l - a : a - l - n.y;
219
- c = d * t / u;
220
- let i = {
221
- x: r.x < n.x ? r.x + c : r.x - d + c,
222
- y: r.y < n.y ? r.y + u - t : r.y - u + t
211
+ }, "outsideNode"), R = /* @__PURE__ */ m((e, t, n) => {
212
+ p.debug(`intersection calc abc89:
213
+ outsidePoint: ${JSON.stringify(t)}
214
+ insidePoint : ${JSON.stringify(n)}
215
+ node : x:${e.x} y:${e.y} w:${e.width} h:${e.height}`);
216
+ let r = e.x, i = e.y, a = Math.abs(r - n.x), o = e.width / 2, s = n.x < t.x ? o - a : o + a, c = e.height / 2, l = Math.abs(t.y - n.y), u = Math.abs(t.x - n.x);
217
+ if (Math.abs(i - t.y) * o > Math.abs(r - t.x) * c) {
218
+ let e = n.y < t.y ? t.y - c - i : i - c - t.y;
219
+ s = u * e / l;
220
+ let r = {
221
+ x: n.x < t.x ? n.x + s : n.x - u + s,
222
+ y: n.y < t.y ? n.y + l - e : n.y - l + e
223
223
  };
224
- return c === 0 && (i.x = n.x, i.y = n.y), d === 0 && (i.x = n.x), u === 0 && (i.y = n.y), e.debug(`abc89 top/bottom calc, Q ${u}, q ${t}, R ${d}, r ${c}`, i), i;
224
+ return s === 0 && (r.x = t.x, r.y = t.y), u === 0 && (r.x = t.x), l === 0 && (r.y = t.y), p.debug(`abc89 top/bottom calc, Q ${l}, q ${e}, R ${u}, r ${s}`, r), r;
225
225
  } else {
226
- c = r.x < n.x ? n.x - s - i : i - s - n.x;
227
- let t = u * c / d, a = r.x < n.x ? r.x + d - c : r.x - d + c, o = r.y < n.y ? r.y + t : r.y - t;
228
- return e.debug(`sides calc abc89, Q ${u}, q ${t}, R ${d}, r ${c}`, {
229
- _x: a,
230
- _y: o
231
- }), c === 0 && (a = n.x, o = n.y), d === 0 && (a = n.x), u === 0 && (o = n.y), {
232
- x: a,
233
- y: o
226
+ s = n.x < t.x ? t.x - o - r : r - o - t.x;
227
+ let e = l * s / u, i = n.x < t.x ? n.x + u - s : n.x - u + s, a = n.y < t.y ? n.y + e : n.y - e;
228
+ return p.debug(`sides calc abc89, Q ${l}, q ${e}, R ${u}, r ${s}`, {
229
+ _x: i,
230
+ _y: a
231
+ }), s === 0 && (i = t.x, a = t.y), u === 0 && (i = t.x), l === 0 && (a = t.y), {
232
+ x: i,
233
+ y: a
234
234
  };
235
235
  }
236
- }, "intersection"), B = /* @__PURE__ */ t((t, n) => {
237
- e.warn("abc88 cutPathAtIntersect", t, n);
238
- let r = [], i = t[0], a = !1;
239
- return t.forEach((t) => {
240
- if (e.info("abc88 checking point", t, n), !R(n, t) && !a) {
241
- let o = z(n, i, t);
242
- e.debug("abc88 inside", t, i, o), e.debug("abc88 intersection", o, n);
243
- let s = !1;
244
- r.forEach((e) => {
245
- s ||= e.x === o.x && e.y === o.y;
246
- }), r.some((e) => e.x === o.x && e.y === o.y) ? e.warn("abc88 no intersect", o, r) : r.push(o), a = !0;
247
- } else e.warn("abc88 outside", t, i), i = t, a || r.push(t);
248
- }), e.debug("returning points", r), r;
236
+ }, "intersection"), z = /* @__PURE__ */ m((e, t) => {
237
+ p.warn("abc88 cutPathAtIntersect", e, t);
238
+ let n = [], r = e[0], i = !1;
239
+ return e.forEach((e) => {
240
+ if (p.info("abc88 checking point", e, t), !L(t, e) && !i) {
241
+ let a = R(t, r, e);
242
+ p.debug("abc88 inside", e, r, a), p.debug("abc88 intersection", a, t);
243
+ let o = !1;
244
+ n.forEach((e) => {
245
+ o ||= e.x === a.x && e.y === a.y;
246
+ }), n.some((e) => e.x === a.x && e.y === a.y) ? p.warn("abc88 no intersect", a, n) : n.push(a), i = !0;
247
+ } else p.warn("abc88 outside", e, r), r = e, i || n.push(e);
248
+ }), p.debug("returning points", n), n;
249
249
  }, "cutPathAtIntersect");
250
- function V(e) {
250
+ function B(e) {
251
251
  let t = [], n = [];
252
252
  for (let r = 1; r < e.length - 1; r++) {
253
253
  let i = e[r - 1], a = e[r], o = e[r + 1];
@@ -258,88 +258,88 @@ function V(e) {
258
258
  cornerPointPositions: n
259
259
  };
260
260
  }
261
- t(V, "extractCornerPoints");
262
- var H = /* @__PURE__ */ t(function(e, t, n) {
261
+ m(B, "extractCornerPoints");
262
+ var V = /* @__PURE__ */ m(function(e, t, n) {
263
263
  let r = t.x - e.x, i = t.y - e.y, a = n / Math.sqrt(r * r + i * i);
264
264
  return {
265
265
  x: t.x - a * r,
266
266
  y: t.y - a * i
267
267
  };
268
- }, "findAdjacentPoint"), ne = /* @__PURE__ */ t(function(t) {
269
- let { cornerPointPositions: n } = V(t), r = [];
270
- for (let i = 0; i < t.length; i++) if (n.includes(i)) {
271
- let n = t[i - 1], a = t[i + 1], o = t[i], s = H(n, o, 5), c = H(a, o, 5), l = c.x - s.x, u = c.y - s.y;
272
- r.push(s);
273
- let d = Math.sqrt(2) * 2, f = {
274
- x: o.x,
275
- y: o.y
268
+ }, "findAdjacentPoint"), H = /* @__PURE__ */ m(function(e) {
269
+ let { cornerPointPositions: t } = B(e), n = [];
270
+ for (let r = 0; r < e.length; r++) if (t.includes(r)) {
271
+ let t = e[r - 1], i = e[r + 1], a = e[r], o = V(t, a, 5), s = V(i, a, 5), c = s.x - o.x, l = s.y - o.y;
272
+ n.push(o);
273
+ let u = Math.sqrt(2) * 2, d = {
274
+ x: a.x,
275
+ y: a.y
276
276
  };
277
- Math.abs(a.x - n.x) > 10 && Math.abs(a.y - n.y) >= 10 ? (e.debug("Corner point fixing", Math.abs(a.x - n.x), Math.abs(a.y - n.y)), f = o.x === s.x ? {
278
- x: l < 0 ? s.x - 5 + d : s.x + 5 - d,
279
- y: u < 0 ? s.y - d : s.y + d
277
+ Math.abs(i.x - t.x) > 10 && Math.abs(i.y - t.y) >= 10 ? (p.debug("Corner point fixing", Math.abs(i.x - t.x), Math.abs(i.y - t.y)), d = a.x === o.x ? {
278
+ x: c < 0 ? o.x - 5 + u : o.x + 5 - u,
279
+ y: l < 0 ? o.y - u : o.y + u
280
280
  } : {
281
- x: l < 0 ? s.x - d : s.x + d,
282
- y: u < 0 ? s.y - 5 + d : s.y + 5 - d
283
- }) : e.debug("Corner point skipping fixing", Math.abs(a.x - n.x), Math.abs(a.y - n.y)), r.push(f, c);
284
- } else r.push(t[i]);
285
- return r;
286
- }, "fixCorners"), re = /* @__PURE__ */ t((e, t, n) => {
281
+ x: c < 0 ? o.x - u : o.x + u,
282
+ y: l < 0 ? o.y - 5 + u : o.y + 5 - u
283
+ }) : p.debug("Corner point skipping fixing", Math.abs(i.x - t.x), Math.abs(i.y - t.y)), n.push(d, s);
284
+ } else n.push(e[r]);
285
+ return n;
286
+ }, "fixCorners"), re = /* @__PURE__ */ m((e, t, n) => {
287
287
  let r = e - t - n, i = Math.floor(r / 4);
288
288
  return `0 ${t} ${Array(i).fill("2 2").join(" ")} ${n}`;
289
- }, "generateDashArray"), U = /* @__PURE__ */ t(function(t, _, y, S, C, w, T, O = !1) {
290
- let { handDrawnSeed: k } = g(), A = _.points, j = !1, M = C;
291
- var N = w;
292
- let P = [];
293
- for (let e in _.cssCompiledStyles) E(e) || P.push(_.cssCompiledStyles[e]);
294
- e.debug("UIO intersect check", _.points, N.x, M.x), N.intersect && M.intersect && !O && (A = A.slice(1, _.points.length - 1), A.unshift(M.intersect(A[0])), e.debug("Last point UIO", _.start, "-->", _.end, A[A.length - 1], N, N.intersect(A[A.length - 1])), A.push(N.intersect(A[A.length - 1])));
295
- let F = btoa(JSON.stringify(A));
296
- _.toCluster && (e.info("to cluster abc88", y.get(_.toCluster)), A = B(_.points, y.get(_.toCluster).node), j = !0), _.fromCluster && (e.debug("from cluster abc88", y.get(_.fromCluster), JSON.stringify(A, null, 2)), A = B(A.reverse(), y.get(_.fromCluster).node).reverse(), j = !0);
297
- let I = A.filter((e) => !Number.isNaN(e.y)), L = te(_.curve);
298
- L !== "rounded" && (I = ne(I));
299
- let R = o;
300
- switch (L) {
289
+ }, "generateDashArray"), U = /* @__PURE__ */ m(function(m, _, y, S, C, w, T, E = !1) {
290
+ let { handDrawnSeed: O } = g(), k = _.points, A = !1, j = C;
291
+ var M = w;
292
+ let N = [];
293
+ for (let e in _.cssCompiledStyles) ee(e) || N.push(_.cssCompiledStyles[e]);
294
+ p.debug("UIO intersect check", _.points, M.x, j.x), M.intersect && j.intersect && !E && (k = k.slice(1, _.points.length - 1), k.unshift(j.intersect(k[0])), p.debug("Last point UIO", _.start, "-->", _.end, k[k.length - 1], M, M.intersect(k[k.length - 1])), k.push(M.intersect(k[k.length - 1])));
295
+ let P = btoa(JSON.stringify(k));
296
+ _.toCluster && (p.info("to cluster abc88", y.get(_.toCluster)), k = z(_.points, y.get(_.toCluster).node), A = !0), _.fromCluster && (p.debug("from cluster abc88", y.get(_.fromCluster), JSON.stringify(k, null, 2)), k = z(k.reverse(), y.get(_.fromCluster).node).reverse(), A = !0);
297
+ let F = k.filter((e) => !Number.isNaN(e.y)), I = ne(_.curve);
298
+ I !== "rounded" && (F = H(F));
299
+ let L = r;
300
+ switch (I) {
301
301
  case "linear":
302
- R = o;
302
+ L = r;
303
303
  break;
304
304
  case "basis":
305
- R = c;
305
+ L = a;
306
306
  break;
307
307
  case "cardinal":
308
- R = p;
308
+ L = u;
309
309
  break;
310
310
  case "bumpX":
311
- R = a;
311
+ L = n;
312
312
  break;
313
313
  case "bumpY":
314
- R = i;
314
+ L = t;
315
315
  break;
316
316
  case "catmullRom":
317
- R = r;
317
+ L = e;
318
318
  break;
319
319
  case "monotoneX":
320
- R = m;
320
+ L = d;
321
321
  break;
322
322
  case "monotoneY":
323
- R = s;
323
+ L = i;
324
324
  break;
325
325
  case "natural":
326
- R = u;
326
+ L = s;
327
327
  break;
328
328
  case "step":
329
- R = h;
329
+ L = f;
330
330
  break;
331
331
  case "stepAfter":
332
- R = l;
332
+ L = o;
333
333
  break;
334
334
  case "stepBefore":
335
- R = f;
335
+ L = l;
336
336
  break;
337
337
  case "rounded":
338
- R = o;
338
+ L = r;
339
339
  break;
340
- default: R = c;
340
+ default: L = a;
341
341
  }
342
- let { x: z, y: V } = x(_), H = v().x(z).y(V).curve(R), U;
342
+ let { x: R, y: B } = x(_), V = v().x(R).y(B).curve(L), U;
343
343
  switch (_.thickness) {
344
344
  case "normal":
345
345
  U = "edge-thickness-normal";
@@ -364,37 +364,37 @@ var H = /* @__PURE__ */ t(function(e, t, n) {
364
364
  break;
365
365
  default: U += " edge-pattern-solid";
366
366
  }
367
- let G, q = L === "rounded" ? W(K(I, _), 5) : H(I), J = Array.isArray(_.style) ? _.style : [_.style], Y = J.find((e) => e?.startsWith("stroke:")), X = "";
367
+ let G, q = I === "rounded" ? W(K(F, _), 5) : V(F), J = Array.isArray(_.style) ? _.style : [_.style], Y = J.find((e) => e?.startsWith("stroke:")), X = "";
368
368
  _.animate && (X = "edge-animation-fast"), _.animation && (X = "edge-animation-" + _.animation);
369
369
  let Z = !1;
370
370
  if (_.look === "handDrawn") {
371
- let e = D.svg(t);
372
- Object.assign([], I);
373
- let r = e.path(q, {
371
+ let e = te.svg(m);
372
+ Object.assign([], F);
373
+ let t = e.path(q, {
374
374
  roughness: .3,
375
- seed: k
375
+ seed: O
376
376
  });
377
- U += " transition", G = n(r).select("path").attr("id", _.id).attr("class", " " + U + (_.classes ? " " + _.classes : "") + (X ? " " + X : "")).attr("style", J ? J.reduce((e, t) => e + ";" + t, "") : "");
378
- let i = G.attr("d");
379
- G.attr("d", i), t.node().appendChild(G.node());
377
+ U += " transition", G = h(t).select("path").attr("id", _.id).attr("class", " " + U + (_.classes ? " " + _.classes : "") + (X ? " " + X : "")).attr("style", J ? J.reduce((e, t) => e + ";" + t, "") : "");
378
+ let n = G.attr("d");
379
+ G.attr("d", n), m.node().appendChild(G.node());
380
380
  } else {
381
- let e = P.join(";"), n = J ? J.reduce((e, t) => e + t + ";", "") : "", r = (e ? e + ";" + n + ";" : n) + ";" + (J ? J.reduce((e, t) => e + ";" + t, "") : "");
382
- G = t.append("path").attr("d", q).attr("id", _.id).attr("class", " " + U + (_.classes ? " " + _.classes : "") + (X ? " " + X : "")).attr("style", r), Y = r.match(/stroke:([^;]+)/)?.[1], Z = _.animate === !0 || !!_.animation || e.includes("animation");
383
- let i = G.node(), a = typeof i.getTotalLength == "function" ? i.getTotalLength() : 0, o = b[_.arrowTypeStart] || 0, s = b[_.arrowTypeEnd] || 0;
381
+ let e = N.join(";"), t = J ? J.reduce((e, t) => e + t + ";", "") : "", n = (e ? e + ";" + t + ";" : t) + ";" + (J ? J.reduce((e, t) => e + ";" + t, "") : "");
382
+ G = m.append("path").attr("d", q).attr("id", _.id).attr("class", " " + U + (_.classes ? " " + _.classes : "") + (X ? " " + X : "")).attr("style", n), Y = n.match(/stroke:([^;]+)/)?.[1], Z = _.animate === !0 || !!_.animation || e.includes("animation");
383
+ let r = G.node(), i = typeof r.getTotalLength == "function" ? r.getTotalLength() : 0, a = b[_.arrowTypeStart] || 0, o = b[_.arrowTypeEnd] || 0;
384
384
  if (_.look === "neo" && !Z) {
385
- let e = `stroke-dasharray: ${_.pattern === "dotted" || _.pattern === "dashed" ? re(a, o, s) : `0 ${o} ${a - o - s} ${s}`}; stroke-dashoffset: 0;`;
385
+ let e = `stroke-dasharray: ${_.pattern === "dotted" || _.pattern === "dashed" ? re(i, a, o) : `0 ${a} ${i - a - o} ${o}`}; stroke-dashoffset: 0;`;
386
386
  G.attr("style", e + G.attr("style"));
387
387
  }
388
388
  }
389
- G.attr("data-edge", !0), G.attr("data-et", "edge"), G.attr("data-id", _.id), G.attr("data-points", F), _.showPoints && I.forEach((e) => {
390
- t.append("circle").style("stroke", "red").style("fill", "red").attr("r", 1).attr("cx", e.x).attr("cy", e.y);
389
+ G.attr("data-edge", !0), G.attr("data-et", "edge"), G.attr("data-id", _.id), G.attr("data-points", P), _.showPoints && F.forEach((e) => {
390
+ m.append("circle").style("stroke", "red").style("fill", "red").attr("r", 1).attr("cx", e.x).attr("cy", e.y);
391
391
  });
392
392
  let Q = "";
393
- (g().flowchart.arrowMarkerAbsolute || g().state.arrowMarkerAbsolute) && (Q = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, Q = Q.replace(/\(/g, "\\(").replace(/\)/g, "\\)")), e.info("arrowTypeStart", _.arrowTypeStart), e.info("arrowTypeEnd", _.arrowTypeEnd), ee(G, _, Q, T, S, Y);
394
- let ie = Math.floor(A.length / 2), ae = A[ie];
395
- d.isLabelCoordinateInPath(ae, G.attr("d")) || (j = !0);
393
+ (g().flowchart.arrowMarkerAbsolute || g().state.arrowMarkerAbsolute) && (Q = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, Q = Q.replace(/\(/g, "\\(").replace(/\)/g, "\\)")), p.info("arrowTypeStart", _.arrowTypeStart), p.info("arrowTypeEnd", _.arrowTypeEnd), D(G, _, Q, T, S, Y);
394
+ let ie = Math.floor(k.length / 2), ae = k[ie];
395
+ c.isLabelCoordinateInPath(ae, G.attr("d")) || (A = !0);
396
396
  let $ = {};
397
- return j && ($.updatedPath = A), $.originalPath = _.points, $;
397
+ return A && ($.updatedPath = k), $.originalPath = _.points, $;
398
398
  }, "insertEdge");
399
399
  function W(e, t) {
400
400
  if (e.length < 2) return "";
@@ -420,7 +420,7 @@ function W(e, t) {
420
420
  }
421
421
  return n;
422
422
  }
423
- t(W, "generateRoundedPath");
423
+ m(W, "generateRoundedPath");
424
424
  function G(e, t) {
425
425
  if (!e || !t) return {
426
426
  angle: 0,
@@ -434,7 +434,7 @@ function G(e, t) {
434
434
  deltaY: r
435
435
  };
436
436
  }
437
- t(G, "calculateDeltaAndAngle");
437
+ m(G, "calculateDeltaAndAngle");
438
438
  function K(e, t) {
439
439
  let n = e.map((e) => ({ ...e }));
440
440
  if (e.length >= 2 && S[t.arrowTypeStart]) {
@@ -448,64 +448,64 @@ function K(e, t) {
448
448
  }
449
449
  return n;
450
450
  }
451
- t(K, "applyMarkerOffsetsToPoints");
452
- var q = /* @__PURE__ */ t((e, t, n, r) => {
451
+ m(K, "applyMarkerOffsetsToPoints");
452
+ var q = /* @__PURE__ */ m((e, t, n, r) => {
453
453
  t.forEach((t) => {
454
454
  J[t](e, n, r);
455
455
  });
456
456
  }, "insertMarkers"), J = {
457
- extension: /* @__PURE__ */ t((t, n, r) => {
458
- e.trace("Making markers for ", r), t.append("defs").append("marker").attr("id", r + "_" + n + "-extensionStart").attr("class", "marker extension " + n).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 1,7 L18,13 V 1 Z"), t.append("defs").append("marker").attr("id", r + "_" + n + "-extensionEnd").attr("class", "marker extension " + n).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z");
457
+ extension: /* @__PURE__ */ m((e, t, n) => {
458
+ p.trace("Making markers for ", n), e.append("defs").append("marker").attr("id", n + "_" + t + "-extensionStart").attr("class", "marker extension " + t).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 1,7 L18,13 V 1 Z"), e.append("defs").append("marker").attr("id", n + "_" + t + "-extensionEnd").attr("class", "marker extension " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z");
459
459
  }, "extension"),
460
- composition: /* @__PURE__ */ t((e, t, n) => {
460
+ composition: /* @__PURE__ */ m((e, t, n) => {
461
461
  e.append("defs").append("marker").attr("id", n + "_" + t + "-compositionStart").attr("class", "marker composition " + t).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", n + "_" + t + "-compositionEnd").attr("class", "marker composition " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
462
462
  }, "composition"),
463
- aggregation: /* @__PURE__ */ t((e, t, n) => {
463
+ aggregation: /* @__PURE__ */ m((e, t, n) => {
464
464
  e.append("defs").append("marker").attr("id", n + "_" + t + "-aggregationStart").attr("class", "marker aggregation " + t).attr("refX", 18).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", n + "_" + t + "-aggregationEnd").attr("class", "marker aggregation " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
465
465
  }, "aggregation"),
466
- dependency: /* @__PURE__ */ t((e, t, n) => {
466
+ dependency: /* @__PURE__ */ m((e, t, n) => {
467
467
  e.append("defs").append("marker").attr("id", n + "_" + t + "-dependencyStart").attr("class", "marker dependency " + t).attr("refX", 6).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 5,7 L9,13 L1,7 L9,1 Z"), e.append("defs").append("marker").attr("id", n + "_" + t + "-dependencyEnd").attr("class", "marker dependency " + t).attr("refX", 13).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z");
468
468
  }, "dependency"),
469
- lollipop: /* @__PURE__ */ t((e, t, n) => {
469
+ lollipop: /* @__PURE__ */ m((e, t, n) => {
470
470
  e.append("defs").append("marker").attr("id", n + "_" + t + "-lollipopStart").attr("class", "marker lollipop " + t).attr("refX", 13).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6), e.append("defs").append("marker").attr("id", n + "_" + t + "-lollipopEnd").attr("class", "marker lollipop " + t).attr("refX", 1).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("fill", "transparent").attr("cx", 7).attr("cy", 7).attr("r", 6);
471
471
  }, "lollipop"),
472
- point: /* @__PURE__ */ t((e, t, n) => {
472
+ point: /* @__PURE__ */ m((e, t, n) => {
473
473
  e.append("marker").attr("id", n + "_" + t + "-pointEnd").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", 5).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 8).attr("markerHeight", 8).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"), e.append("marker").attr("id", n + "_" + t + "-pointStart").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", 4.5).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 8).attr("markerHeight", 8).attr("orient", "auto").append("path").attr("d", "M 0 5 L 10 10 L 10 0 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
474
474
  }, "point"),
475
- circle: /* @__PURE__ */ t((e, t, n) => {
475
+ circle: /* @__PURE__ */ m((e, t, n) => {
476
476
  e.append("marker").attr("id", n + "_" + t + "-circleEnd").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", 11).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"), e.append("marker").attr("id", n + "_" + t + "-circleStart").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", -1).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
477
477
  }, "circle"),
478
- cross: /* @__PURE__ */ t((e, t, n) => {
478
+ cross: /* @__PURE__ */ m((e, t, n) => {
479
479
  e.append("marker").attr("id", n + "_" + t + "-crossEnd").attr("class", "marker cross " + t).attr("viewBox", "0 0 11 11").attr("refX", 12).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0"), e.append("marker").attr("id", n + "_" + t + "-crossStart").attr("class", "marker cross " + t).attr("viewBox", "0 0 11 11").attr("refX", -1).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0");
480
480
  }, "cross"),
481
- barb: /* @__PURE__ */ t((e, t, n) => {
481
+ barb: /* @__PURE__ */ m((e, t, n) => {
482
482
  e.append("defs").append("marker").attr("id", n + "_" + t + "-barbEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 14).attr("markerUnits", "userSpaceOnUse").attr("orient", "auto").append("path").attr("d", "M 19,7 L9,13 L14,7 L9,1 Z");
483
483
  }, "barb"),
484
- only_one: /* @__PURE__ */ t((e, t, n) => {
484
+ only_one: /* @__PURE__ */ m((e, t, n) => {
485
485
  e.append("defs").append("marker").attr("id", n + "_" + t + "-onlyOneStart").attr("class", "marker onlyOne " + t).attr("refX", 0).attr("refY", 9).attr("markerWidth", 18).attr("markerHeight", 18).attr("orient", "auto").append("path").attr("d", "M9,0 L9,18 M15,0 L15,18"), e.append("defs").append("marker").attr("id", n + "_" + t + "-onlyOneEnd").attr("class", "marker onlyOne " + t).attr("refX", 18).attr("refY", 9).attr("markerWidth", 18).attr("markerHeight", 18).attr("orient", "auto").append("path").attr("d", "M3,0 L3,18 M9,0 L9,18");
486
486
  }, "only_one"),
487
- zero_or_one: /* @__PURE__ */ t((e, t, n) => {
487
+ zero_or_one: /* @__PURE__ */ m((e, t, n) => {
488
488
  let r = e.append("defs").append("marker").attr("id", n + "_" + t + "-zeroOrOneStart").attr("class", "marker zeroOrOne " + t).attr("refX", 0).attr("refY", 9).attr("markerWidth", 30).attr("markerHeight", 18).attr("orient", "auto");
489
489
  r.append("circle").attr("fill", "white").attr("cx", 21).attr("cy", 9).attr("r", 6), r.append("path").attr("d", "M9,0 L9,18");
490
490
  let i = e.append("defs").append("marker").attr("id", n + "_" + t + "-zeroOrOneEnd").attr("class", "marker zeroOrOne " + t).attr("refX", 30).attr("refY", 9).attr("markerWidth", 30).attr("markerHeight", 18).attr("orient", "auto");
491
491
  i.append("circle").attr("fill", "white").attr("cx", 9).attr("cy", 9).attr("r", 6), i.append("path").attr("d", "M21,0 L21,18");
492
492
  }, "zero_or_one"),
493
- one_or_more: /* @__PURE__ */ t((e, t, n) => {
493
+ one_or_more: /* @__PURE__ */ m((e, t, n) => {
494
494
  e.append("defs").append("marker").attr("id", n + "_" + t + "-oneOrMoreStart").attr("class", "marker oneOrMore " + t).attr("refX", 18).attr("refY", 18).attr("markerWidth", 45).attr("markerHeight", 36).attr("orient", "auto").append("path").attr("d", "M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"), e.append("defs").append("marker").attr("id", n + "_" + t + "-oneOrMoreEnd").attr("class", "marker oneOrMore " + t).attr("refX", 27).attr("refY", 18).attr("markerWidth", 45).attr("markerHeight", 36).attr("orient", "auto").append("path").attr("d", "M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18");
495
495
  }, "one_or_more"),
496
- zero_or_more: /* @__PURE__ */ t((e, t, n) => {
496
+ zero_or_more: /* @__PURE__ */ m((e, t, n) => {
497
497
  let r = e.append("defs").append("marker").attr("id", n + "_" + t + "-zeroOrMoreStart").attr("class", "marker zeroOrMore " + t).attr("refX", 18).attr("refY", 18).attr("markerWidth", 57).attr("markerHeight", 36).attr("orient", "auto");
498
498
  r.append("circle").attr("fill", "white").attr("cx", 48).attr("cy", 18).attr("r", 6), r.append("path").attr("d", "M0,18 Q18,0 36,18 Q18,36 0,18");
499
499
  let i = e.append("defs").append("marker").attr("id", n + "_" + t + "-zeroOrMoreEnd").attr("class", "marker zeroOrMore " + t).attr("refX", 39).attr("refY", 18).attr("markerWidth", 57).attr("markerHeight", 36).attr("orient", "auto");
500
500
  i.append("circle").attr("fill", "white").attr("cx", 9).attr("cy", 18).attr("r", 6), i.append("path").attr("d", "M21,18 Q39,0 57,18 Q39,36 21,18");
501
501
  }, "zero_or_more"),
502
- requirement_arrow: /* @__PURE__ */ t((e, t, n) => {
502
+ requirement_arrow: /* @__PURE__ */ m((e, t, n) => {
503
503
  e.append("defs").append("marker").attr("id", n + "_" + t + "-requirement_arrowEnd").attr("refX", 20).attr("refY", 10).attr("markerWidth", 20).attr("markerHeight", 20).attr("orient", "auto").append("path").attr("d", "M0,0\n L20,10\n M20,10\n L0,20");
504
504
  }, "requirement_arrow"),
505
- requirement_contains: /* @__PURE__ */ t((e, t, n) => {
505
+ requirement_contains: /* @__PURE__ */ m((e, t, n) => {
506
506
  let r = e.append("defs").append("marker").attr("id", n + "_" + t + "-requirement_containsStart").attr("refX", 0).attr("refY", 10).attr("markerWidth", 20).attr("markerHeight", 20).attr("orient", "auto").append("g");
507
507
  r.append("circle").attr("cx", 10).attr("cy", 10).attr("r", 9).attr("fill", "none"), r.append("line").attr("x1", 1).attr("x2", 19).attr("y1", 10).attr("y2", 10), r.append("line").attr("y1", 1).attr("y2", 19).attr("x1", 10).attr("x2", 10);
508
508
  }, "requirement_contains")
509
509
  }, Y = q;
510
510
  //#endregion
511
- export { L as a, Y as i, U as n, F as r, N as t };
511
+ export { I as a, Y as i, U as n, P as r, M as t };