@schmitech/chatbot-widget 0.5.3 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/dist/_basePickBy-C3-QE0dl-5eQ6L29l.js +152 -0
  2. package/dist/_baseUniq-CstiM9Lp-AFR_Ns0a.js +615 -0
  3. package/dist/arc-W3NKKXLI-DHbDwLx0.js +84 -0
  4. package/dist/architecture-U656AL7Q-fn9wJZsH-BLoGjtkP.js +6 -0
  5. package/dist/architectureDiagram-VXUJARFQ-zzJsgPC6-C4OfUE0m.js +4667 -0
  6. package/dist/blockDiagram-VD42YOAC-D-In4h7h-BYXdRmeG.js +2266 -0
  7. package/dist/c4Diagram-YG6GDRKO-DBs8r9gh-BdLuHgPT.js +1582 -0
  8. package/dist/channel-RBWQyMSg-Cx0HUumY.js +6 -0
  9. package/dist/chatbot-widget.bundle.js +4473 -1556
  10. package/dist/chatbot-widget.css +1 -1
  11. package/dist/chatbot-widget.es.js +12 -63659
  12. package/dist/chatbot-widget.umd.js +4472 -1555
  13. package/dist/chunk-4BX2VUAB-BqD7w0AR-CbA2613c.js +10 -0
  14. package/dist/chunk-55IACEB6-D8pvDVEJ-DrL4SJSR.js +9 -0
  15. package/dist/chunk-B4BG7PRW-Dwma1pSy-BWjG5dc6.js +1375 -0
  16. package/dist/chunk-DI55MBZ5-BY2XXvZz-DbAvz3Pq.js +1383 -0
  17. package/dist/chunk-FMBD7UC4-BeiLbQ8U-BNaZTCv4.js +20 -0
  18. package/dist/chunk-QN33PNHL-BkO3hOeq-DkU1EzGA.js +21 -0
  19. package/dist/chunk-QZHKN3VN-Cwlo2qTG-DMmeZmp5.js +16 -0
  20. package/dist/chunk-TZMSLE5B-BnXK-OiF-RfzVsOBe.js +65 -0
  21. package/dist/classDiagram-2ON5EDUG-Crd6O69V-kCZrFOLN.js +17 -0
  22. package/dist/classDiagram-v2-WZHVMYZB-Crd6O69V-kCZrFOLN.js +17 -0
  23. package/dist/clone-CfLgyC8S-DsDOh4B4.js +9 -0
  24. package/dist/config/index.d.ts +4 -2
  25. package/dist/cose-bilkent-S5V4N54A-DKeVcPDK-de_7nZTY.js +2609 -0
  26. package/dist/cytoscape.esm-CjI2IsL8-Be2K4mI6.js +18723 -0
  27. package/dist/dagre-6UL2VRFP-BPf604Df-BhZs6zCq.js +448 -0
  28. package/dist/diagram-PSM6KHXK-DeLcpEV3-qb4rujeN.js +532 -0
  29. package/dist/diagram-QEK2KX5R-C_5RR1NJ-C5kZWmRl.js +222 -0
  30. package/dist/diagram-S2PKOQOG-DVx43aon-4nlw6iDz.js +144 -0
  31. package/dist/erDiagram-Q2GNP2WA-DgUeO5_h-DHc9Yphl.js +841 -0
  32. package/dist/flowDiagram-NV44I4VS-C5HQUzU9-DHjbmAtJ.js +1628 -0
  33. package/dist/ganttDiagram-JELNMOA3-DgSZ1ixF-C3hJs_k9.js +1936 -0
  34. package/dist/gitGraph-F6HP7TQM-UL7-Bx1s-Cog5rj3j.js +6 -0
  35. package/dist/gitGraphDiagram-NY62KEGX-DY5loT9K-CEcKQNrM.js +713 -0
  36. package/dist/graph-BfwqPHx6-DErF9dBN.js +248 -0
  37. package/dist/index-B5s_uaP2.js +124168 -0
  38. package/dist/index-BAOVR-xx-thst7Pu6.js +13251 -0
  39. package/dist/info-NVLQJR56-BsqQ0RXQ-BcYgZCCY.js +6 -0
  40. package/dist/infoDiagram-WHAUD3N6-DIqQ6vCk-BuiAAMSH.js +25 -0
  41. package/dist/journeyDiagram-XKPGCS4Q-DXjg3S3r-Byi_TGXs.js +835 -0
  42. package/dist/kanban-definition-3W4ZIXB7-Uxt7Am6n-jy96nA-g.js +721 -0
  43. package/dist/layout-CSfkE668-BjigbqJL.js +1333 -0
  44. package/dist/mermaid-parser.core-LjuO4CL3-BLqmPe8-.js +12891 -0
  45. package/dist/mindmap-definition-VGOIOE7T-DXwVuAPE-SK4e1Sse.js +787 -0
  46. package/dist/packet-BFZMPI3H-DJWkrKrV-BamBev9S.js +6 -0
  47. package/dist/pie-7BOR55EZ-DC8hTFwn-D1bcIQbR.js +6 -0
  48. package/dist/pieDiagram-ADFJNKIX-Cj0EHHtj-Dbr09c-S.js +161 -0
  49. package/dist/quadrantDiagram-AYHSOK5B-CnLDz007-Ci0DQl2T.js +1024 -0
  50. package/dist/radar-NHE76QYJ-Bijk-Fk9-9nAmDCMr.js +6 -0
  51. package/dist/requirementDiagram-UZGBJVZJ-rDaI-8Be-CSEc4S33.js +851 -0
  52. package/dist/sankeyDiagram-TZEHDZUN-A0YO8ixs-Zj8Z0j0n.js +810 -0
  53. package/dist/sequenceDiagram-WL72ISMW-BFF7TtP7-Dcofckjv.js +2519 -0
  54. package/dist/shared/styles.d.ts +1 -1
  55. package/dist/stateDiagram-FKZM4ZOC-ofFsB7HJ-BJBX12rE.js +264 -0
  56. package/dist/stateDiagram-v2-4FDKWEC3-CEZFbksU-BywmU88h.js +17 -0
  57. package/dist/timeline-definition-IT6M3QCI-5W361ZNm-MP_ufVe7.js +800 -0
  58. package/dist/treemap-KMMF4GRG-pGRoYcSn-BeZ7sXgP.js +6 -0
  59. package/dist/ui/Message.d.ts +1 -5
  60. package/dist/ui/MessagesList.d.ts +1 -5
  61. package/dist/utils/contentFiltering.d.ts +12 -0
  62. package/dist/xychartDiagram-PRI3JC2R-CSr0GxaP-DBgCtplP.js +1297 -0
  63. package/package.json +3 -3
  64. package/dist/ui/TypingEffect.d.ts +0 -18
@@ -0,0 +1,448 @@
1
+ import { x as v, O as F, s as j, c as L, A as M, a as t, p as Y, b as H, d as $, e as K, E as q, j as z, o as O, $ as Q, F as U, I as V } from "./index-B5s_uaP2.js";
2
+ import { L as k } from "./graph-BfwqPHx6-DErF9dBN.js";
3
+ import { o as W } from "./layout-CSfkE668-BjigbqJL.js";
4
+ import { S } from "./_baseUniq-CstiM9Lp-AFR_Ns0a.js";
5
+ import { a as Z } from "./clone-CfLgyC8S-DsDOh4B4.js";
6
+ import { b as G } from "./_basePickBy-C3-QE0dl-5eQ6L29l.js";
7
+ typeof window < "u" && (window.global = window);
8
+ function X(e) {
9
+ var n = {
10
+ options: {
11
+ directed: e.isDirected(),
12
+ multigraph: e.isMultigraph(),
13
+ compound: e.isCompound()
14
+ },
15
+ nodes: _(e),
16
+ edges: ee(e)
17
+ };
18
+ return S(e.graph()) || (n.value = Z(e.graph())), n;
19
+ }
20
+ function _(e) {
21
+ return G(e.nodes(), function(n) {
22
+ var r = e.node(n), s = e.parent(n), d = { v: n };
23
+ return S(r) || (d.value = r), S(s) || (d.parent = s), d;
24
+ });
25
+ }
26
+ function ee(e) {
27
+ return G(e.edges(), function(n) {
28
+ var r = e.edge(n), s = { v: n.v, w: n.w };
29
+ return S(n.name) || (s.name = n.name), S(r) || (s.value = r), s;
30
+ });
31
+ }
32
+ var u = /* @__PURE__ */ new Map(), E = /* @__PURE__ */ new Map(), A = /* @__PURE__ */ new Map(), ne = /* @__PURE__ */ v(() => {
33
+ E.clear(), A.clear(), u.clear();
34
+ }, "clear"), I = /* @__PURE__ */ v((e, n) => {
35
+ const r = E.get(n) || [];
36
+ return t.trace("In isDescendant", n, " ", e, " = ", r.includes(e)), r.includes(e);
37
+ }, "isDescendant"), re = /* @__PURE__ */ v((e, n) => {
38
+ const r = E.get(n) || [];
39
+ return t.info("Descendants of ", n, " is ", r), t.info("Edge is ", e), e.v === n || e.w === n ? !1 : r ? r.includes(e.v) || I(e.v, n) || I(e.w, n) || r.includes(e.w) : (t.debug("Tilt, ", n, ",not in descendants"), !1);
40
+ }, "edgeInCluster"), J = /* @__PURE__ */ v((e, n, r, s) => {
41
+ t.warn(
42
+ "Copying children of ",
43
+ e,
44
+ "root",
45
+ s,
46
+ "data",
47
+ n.node(e),
48
+ s
49
+ );
50
+ const d = n.children(e) || [];
51
+ e !== s && d.push(e), t.warn("Copying (nodes) clusterId", e, "nodes", d), d.forEach((c) => {
52
+ if (n.children(c).length > 0)
53
+ J(c, n, r, s);
54
+ else {
55
+ const o = n.node(c);
56
+ t.info("cp ", c, " to ", s, " with parent ", e), r.setNode(c, o), s !== n.parent(c) && (t.warn("Setting parent", c, n.parent(c)), r.setParent(c, n.parent(c))), e !== s && c !== e ? (t.debug("Setting parent", c, e), r.setParent(c, e)) : (t.info("In copy ", e, "root", s, "data", n.node(e), s), t.debug(
57
+ "Not Setting parent for node=",
58
+ c,
59
+ "cluster!==rootId",
60
+ e !== s,
61
+ "node!==clusterId",
62
+ c !== e
63
+ ));
64
+ const l = n.edges(c);
65
+ t.debug("Copying Edges", l), l.forEach((f) => {
66
+ t.info("Edge", f);
67
+ const b = n.edge(f.v, f.w, f.name);
68
+ t.info("Edge data", b, s);
69
+ try {
70
+ re(f, s) ? (t.info("Copying as ", f.v, f.w, b, f.name), r.setEdge(f.v, f.w, b, f.name), t.info("newGraph edges ", r.edges(), r.edge(r.edges()[0]))) : t.info(
71
+ "Skipping copy of edge ",
72
+ f.v,
73
+ "-->",
74
+ f.w,
75
+ " rootId: ",
76
+ s,
77
+ " clusterId:",
78
+ e
79
+ );
80
+ } catch (C) {
81
+ t.error(C);
82
+ }
83
+ });
84
+ }
85
+ t.debug("Removing node", c), n.removeNode(c);
86
+ });
87
+ }, "copy"), P = /* @__PURE__ */ v((e, n) => {
88
+ const r = n.children(e);
89
+ let s = [...r];
90
+ for (const d of r)
91
+ A.set(d, e), s = [...s, ...P(d, n)];
92
+ return s;
93
+ }, "extractDescendants"), te = /* @__PURE__ */ v((e, n, r) => {
94
+ const s = e.edges().filter((l) => l.v === n || l.w === n), d = e.edges().filter((l) => l.v === r || l.w === r), c = s.map((l) => ({ v: l.v === n ? r : l.v, w: l.w === n ? n : l.w })), o = d.map((l) => ({ v: l.v, w: l.w }));
95
+ return c.filter((l) => o.some((f) => l.v === f.v && l.w === f.w));
96
+ }, "findCommonEdges"), x = /* @__PURE__ */ v((e, n, r) => {
97
+ const s = n.children(e);
98
+ if (t.trace("Searching children of id ", e, s), s.length < 1)
99
+ return e;
100
+ let d;
101
+ for (const c of s) {
102
+ const o = x(c, n, r), l = te(n, r, o);
103
+ if (o)
104
+ if (l.length > 0)
105
+ d = o;
106
+ else
107
+ return o;
108
+ }
109
+ return d;
110
+ }, "findNonClusterChild"), D = /* @__PURE__ */ v((e) => !u.has(e) || !u.get(e).externalConnections ? e : u.has(e) ? u.get(e).id : e, "getAnchorId"), ie = /* @__PURE__ */ v((e, n) => {
111
+ if (!e || n > 10) {
112
+ t.debug("Opting out, no graph ");
113
+ return;
114
+ } else
115
+ t.debug("Opting in, graph ");
116
+ e.nodes().forEach(function(r) {
117
+ e.children(r).length > 0 && (t.warn(
118
+ "Cluster identified",
119
+ r,
120
+ " Replacement id in edges: ",
121
+ x(r, e, r)
122
+ ), E.set(r, P(r, e)), u.set(r, { id: x(r, e, r), clusterData: e.node(r) }));
123
+ }), e.nodes().forEach(function(r) {
124
+ const s = e.children(r), d = e.edges();
125
+ s.length > 0 ? (t.debug("Cluster identified", r, E), d.forEach((c) => {
126
+ const o = I(c.v, r), l = I(c.w, r);
127
+ o ^ l && (t.warn("Edge: ", c, " leaves cluster ", r), t.warn("Descendants of XXX ", r, ": ", E.get(r)), u.get(r).externalConnections = !0);
128
+ })) : t.debug("Not a cluster ", r, E);
129
+ });
130
+ for (let r of u.keys()) {
131
+ const s = u.get(r).id, d = e.parent(s);
132
+ d !== r && u.has(d) && !u.get(d).externalConnections && (u.get(r).id = d);
133
+ }
134
+ e.edges().forEach(function(r) {
135
+ const s = e.edge(r);
136
+ t.warn("Edge " + r.v + " -> " + r.w + ": " + JSON.stringify(r)), t.warn("Edge " + r.v + " -> " + r.w + ": " + JSON.stringify(e.edge(r)));
137
+ let d = r.v, c = r.w;
138
+ if (t.warn(
139
+ "Fix XXX",
140
+ u,
141
+ "ids:",
142
+ r.v,
143
+ r.w,
144
+ "Translating: ",
145
+ u.get(r.v),
146
+ " --- ",
147
+ u.get(r.w)
148
+ ), u.get(r.v) || u.get(r.w)) {
149
+ if (t.warn("Fixing and trying - removing XXX", r.v, r.w, r.name), d = D(r.v), c = D(r.w), e.removeEdge(r.v, r.w, r.name), d !== r.v) {
150
+ const o = e.parent(d);
151
+ u.get(o).externalConnections = !0, s.fromCluster = r.v;
152
+ }
153
+ if (c !== r.w) {
154
+ const o = e.parent(c);
155
+ u.get(o).externalConnections = !0, s.toCluster = r.w;
156
+ }
157
+ t.warn("Fix Replacing with XXX", d, c, r.name), e.setEdge(d, c, s, r.name);
158
+ }
159
+ }), t.warn("Adjusted Graph", X(e)), B(e, 0), t.trace(u);
160
+ }, "adjustClustersAndEdges"), B = /* @__PURE__ */ v((e, n) => {
161
+ var r, s;
162
+ if (t.warn("extractor - ", n, X(e), e.children("D")), n > 10) {
163
+ t.error("Bailing out");
164
+ return;
165
+ }
166
+ let d = e.nodes(), c = !1;
167
+ for (const o of d) {
168
+ const l = e.children(o);
169
+ c = c || l.length > 0;
170
+ }
171
+ if (!c) {
172
+ t.debug("Done, no node has children", e.nodes());
173
+ return;
174
+ }
175
+ t.debug("Nodes = ", d, n);
176
+ for (const o of d)
177
+ if (t.debug(
178
+ "Extracting node",
179
+ o,
180
+ u,
181
+ u.has(o) && !u.get(o).externalConnections,
182
+ !e.parent(o),
183
+ e.node(o),
184
+ e.children("D"),
185
+ " Depth ",
186
+ n
187
+ ), !u.has(o))
188
+ t.debug("Not a cluster", o, n);
189
+ else if (!u.get(o).externalConnections && e.children(o) && e.children(o).length > 0) {
190
+ t.warn(
191
+ "Cluster without external connections, without a parent and with children",
192
+ o,
193
+ n
194
+ );
195
+ let l = e.graph().rankdir === "TB" ? "LR" : "TB";
196
+ (s = (r = u.get(o)) == null ? void 0 : r.clusterData) != null && s.dir && (l = u.get(o).clusterData.dir, t.warn("Fixing dir", u.get(o).clusterData.dir, l));
197
+ const f = new k({
198
+ multigraph: !0,
199
+ compound: !0
200
+ }).setGraph({
201
+ rankdir: l,
202
+ nodesep: 50,
203
+ ranksep: 50,
204
+ marginx: 8,
205
+ marginy: 8
206
+ }).setDefaultEdgeLabel(function() {
207
+ return {};
208
+ });
209
+ t.warn("Old graph before copy", X(e)), J(o, e, f, o), e.setNode(o, {
210
+ clusterNode: !0,
211
+ id: o,
212
+ clusterData: u.get(o).clusterData,
213
+ label: u.get(o).label,
214
+ graph: f
215
+ }), t.warn("New graph after copy node: (", o, ")", X(f)), t.debug("Old graph after copy", X(e));
216
+ } else
217
+ t.warn(
218
+ "Cluster ** ",
219
+ o,
220
+ " **not meeting the criteria !externalConnections:",
221
+ !u.get(o).externalConnections,
222
+ " no parent: ",
223
+ !e.parent(o),
224
+ " children ",
225
+ e.children(o) && e.children(o).length > 0,
226
+ e.children("D"),
227
+ n
228
+ ), t.debug(u);
229
+ d = e.nodes(), t.warn("New list of nodes", d);
230
+ for (const o of d) {
231
+ const l = e.node(o);
232
+ t.warn(" Now next level", o, l), l != null && l.clusterNode && B(l.graph, n + 1);
233
+ }
234
+ }, "extractor"), T = /* @__PURE__ */ v((e, n) => {
235
+ if (n.length === 0)
236
+ return [];
237
+ let r = Object.assign([], n);
238
+ return n.forEach((s) => {
239
+ const d = e.children(s), c = T(e, d);
240
+ r = [...r, ...c];
241
+ }), r;
242
+ }, "sorter"), oe = /* @__PURE__ */ v((e) => T(e, e.children()), "sortNodesByHierarchy"), R = /* @__PURE__ */ v(async (e, n, r, s, d, c) => {
243
+ t.warn("Graph in recursive render:XAX", X(n), d);
244
+ const o = n.graph().rankdir;
245
+ t.trace("Dir in recursive render - dir:", o);
246
+ const l = e.insert("g").attr("class", "root");
247
+ n.nodes() ? t.info("Recursive render XXX", n.nodes()) : t.info("No nodes found for", n), n.edges().length > 0 && t.info("Recursive edges", n.edge(n.edges()[0]));
248
+ const f = l.insert("g").attr("class", "clusters"), b = l.insert("g").attr("class", "edgePaths"), C = l.insert("g").attr("class", "edgeLabels"), p = l.insert("g").attr("class", "nodes");
249
+ await Promise.all(
250
+ n.nodes().map(async function(g) {
251
+ const a = n.node(g);
252
+ if (d !== void 0) {
253
+ const i = JSON.parse(JSON.stringify(d.clusterData));
254
+ t.trace(
255
+ `Setting data for parent cluster XXX
256
+ Node.id = `,
257
+ g,
258
+ `
259
+ data=`,
260
+ i.height,
261
+ `
262
+ Parent cluster`,
263
+ d.height
264
+ ), n.setNode(d.id, i), n.parent(g) || (t.trace("Setting parent", g, d.id), n.setParent(g, d.id, i));
265
+ }
266
+ if (t.info("(Insert) Node XXX" + g + ": " + JSON.stringify(n.node(g))), a != null && a.clusterNode) {
267
+ t.info("Cluster identified XBX", g, a.width, n.node(g));
268
+ const { ranksep: i, nodesep: w } = n.graph();
269
+ a.graph.setGraph({
270
+ ...a.graph.graph(),
271
+ ranksep: i + 25,
272
+ nodesep: w
273
+ });
274
+ const m = await R(
275
+ p,
276
+ a.graph,
277
+ r,
278
+ s,
279
+ n.node(g),
280
+ c
281
+ ), N = m.elem;
282
+ H(a, N), a.diff = m.diff || 0, t.info(
283
+ "New compound node after recursive render XAX",
284
+ g,
285
+ "width",
286
+ // node,
287
+ a.width,
288
+ "height",
289
+ a.height
290
+ // node.x,
291
+ // node.y
292
+ ), $(N, a);
293
+ } else
294
+ n.children(g).length > 0 ? (t.trace(
295
+ "Cluster - the non recursive path XBX",
296
+ g,
297
+ a.id,
298
+ a,
299
+ a.width,
300
+ "Graph:",
301
+ n
302
+ ), t.trace(x(a.id, n)), u.set(a.id, { id: x(a.id, n), node: a })) : (t.trace("Node - the non recursive path XAX", g, p, n.node(g), o), await K(p, n.node(g), { config: c, dir: o }));
303
+ })
304
+ ), await (/* @__PURE__ */ v(async () => {
305
+ const g = n.edges().map(async function(a) {
306
+ const i = n.edge(a.v, a.w, a.name);
307
+ t.info("Edge " + a.v + " -> " + a.w + ": " + JSON.stringify(a)), t.info("Edge " + a.v + " -> " + a.w + ": ", a, " ", JSON.stringify(n.edge(a))), t.info(
308
+ "Fix",
309
+ u,
310
+ "ids:",
311
+ a.v,
312
+ a.w,
313
+ "Translating: ",
314
+ u.get(a.v),
315
+ u.get(a.w)
316
+ ), await q(C, i);
317
+ });
318
+ await Promise.all(g);
319
+ }, "processEdges"))(), t.info("Graph before layout:", JSON.stringify(X(n))), t.info("############################################# XXX"), t.info("### Layout ### XXX"), t.info("############################################# XXX"), W(n), t.info("Graph after layout:", JSON.stringify(X(n)));
320
+ let h = 0, { subGraphTitleTotalMargin: y } = z(c);
321
+ return await Promise.all(
322
+ oe(n).map(async function(g) {
323
+ var a;
324
+ const i = n.node(g);
325
+ if (t.info(
326
+ "Position XBX => " + g + ": (" + i.x,
327
+ "," + i.y,
328
+ ") width: ",
329
+ i.width,
330
+ " height: ",
331
+ i.height
332
+ ), i != null && i.clusterNode)
333
+ i.y += y, t.info(
334
+ "A tainted cluster node XBX1",
335
+ g,
336
+ i.id,
337
+ i.width,
338
+ i.height,
339
+ i.x,
340
+ i.y,
341
+ n.parent(g)
342
+ ), u.get(i.id).node = i, O(i);
343
+ else if (n.children(g).length > 0) {
344
+ t.info(
345
+ "A pure cluster node XBX1",
346
+ g,
347
+ i.id,
348
+ i.x,
349
+ i.y,
350
+ i.width,
351
+ i.height,
352
+ n.parent(g)
353
+ ), i.height += y, n.node(i.parentId);
354
+ const w = (i == null ? void 0 : i.padding) / 2 || 0, m = ((a = i == null ? void 0 : i.labelBBox) == null ? void 0 : a.height) || 0, N = m - w || 0;
355
+ t.debug("OffsetY", N, "labelHeight", m, "halfPadding", w), await Q(f, i), u.get(i.id).node = i;
356
+ } else {
357
+ const w = n.node(i.parentId);
358
+ i.y += y / 2, t.info(
359
+ "A regular node XBX1 - using the padding",
360
+ i.id,
361
+ "parent",
362
+ i.parentId,
363
+ i.width,
364
+ i.height,
365
+ i.x,
366
+ i.y,
367
+ "offsetY",
368
+ i.offsetY,
369
+ "parent",
370
+ w,
371
+ w == null ? void 0 : w.offsetY,
372
+ i
373
+ ), O(i);
374
+ }
375
+ })
376
+ ), n.edges().forEach(function(g) {
377
+ const a = n.edge(g);
378
+ t.info("Edge " + g.v + " -> " + g.w + ": " + JSON.stringify(a), a), a.points.forEach((N) => N.y += y / 2);
379
+ const i = n.node(g.v);
380
+ var w = n.node(g.w);
381
+ const m = U(b, a, u, r, i, w, s);
382
+ V(a, m);
383
+ }), n.nodes().forEach(function(g) {
384
+ const a = n.node(g);
385
+ t.info(g, a.type, a.diff), a.isGroup && (h = a.diff);
386
+ }), t.warn("Returning from recursive render XAX", l, h), { elem: l, diff: h };
387
+ }, "recursiveRender"), ue = /* @__PURE__ */ v(async (e, n) => {
388
+ var r, s, d, c, o, l;
389
+ const f = new k({
390
+ multigraph: !0,
391
+ compound: !0
392
+ }).setGraph({
393
+ rankdir: e.direction,
394
+ nodesep: ((r = e.config) == null ? void 0 : r.nodeSpacing) || ((d = (s = e.config) == null ? void 0 : s.flowchart) == null ? void 0 : d.nodeSpacing) || e.nodeSpacing,
395
+ ranksep: ((c = e.config) == null ? void 0 : c.rankSpacing) || ((l = (o = e.config) == null ? void 0 : o.flowchart) == null ? void 0 : l.rankSpacing) || e.rankSpacing,
396
+ marginx: 8,
397
+ marginy: 8
398
+ }).setDefaultEdgeLabel(function() {
399
+ return {};
400
+ }), b = n.select("g");
401
+ F(b, e.markers, e.type, e.diagramId), j(), L(), M(), ne(), e.nodes.forEach((p) => {
402
+ f.setNode(p.id, { ...p }), p.parentId && f.setParent(p.id, p.parentId);
403
+ }), t.debug("Edges:", e.edges), e.edges.forEach((p) => {
404
+ if (p.start === p.end) {
405
+ const h = p.start, y = h + "---" + h + "---1", g = h + "---" + h + "---2", a = f.node(h);
406
+ f.setNode(y, {
407
+ domId: y,
408
+ id: y,
409
+ parentId: a.parentId,
410
+ labelStyle: "",
411
+ label: "",
412
+ padding: 0,
413
+ shape: "labelRect",
414
+ // shape: 'rect',
415
+ style: "",
416
+ width: 10,
417
+ height: 10
418
+ }), f.setParent(y, a.parentId), f.setNode(g, {
419
+ domId: g,
420
+ id: g,
421
+ parentId: a.parentId,
422
+ labelStyle: "",
423
+ padding: 0,
424
+ // shape: 'rect',
425
+ shape: "labelRect",
426
+ label: "",
427
+ style: "",
428
+ width: 10,
429
+ height: 10
430
+ }), f.setParent(g, a.parentId);
431
+ const i = structuredClone(p), w = structuredClone(p), m = structuredClone(p);
432
+ i.label = "", i.arrowTypeEnd = "none", i.id = h + "-cyclic-special-1", w.arrowTypeStart = "none", w.arrowTypeEnd = "none", w.id = h + "-cyclic-special-mid", m.label = "", a.isGroup && (i.fromCluster = h, m.toCluster = h), m.id = h + "-cyclic-special-2", m.arrowTypeStart = "none", f.setEdge(h, y, i, h + "-cyclic-special-0"), f.setEdge(y, g, w, h + "-cyclic-special-1"), f.setEdge(g, h, m, h + "-cyc<lic-special-2");
433
+ } else
434
+ f.setEdge(p.start, p.end, { ...p }, p.id);
435
+ }), t.warn("Graph at first:", JSON.stringify(X(f))), ie(f), t.warn("Graph after XAX:", JSON.stringify(X(f)));
436
+ const C = Y();
437
+ await R(
438
+ b,
439
+ f,
440
+ e.type,
441
+ e.diagramId,
442
+ void 0,
443
+ C
444
+ );
445
+ }, "render");
446
+ export {
447
+ ue as render
448
+ };