@marimo-team/islands 0.13.16-dev2 → 0.13.16-dev21

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 (86) hide show
  1. package/dist/{ConnectedDataExplorerComponent-BizAnuDQ.js → ConnectedDataExplorerComponent-CbgMGTNw.js} +1495 -1496
  2. package/dist/ImageComparisonComponent-BEvxQRYY.js +248 -0
  3. package/dist/{VegaLite-BvtjUHLS.js → VegaLite-CtlLD_UH.js} +12483 -12485
  4. package/dist/{_baseUniq-C1K8a5jF.js → _baseUniq-BPYian-Y.js} +13 -13
  5. package/dist/{any-language-editor-D3C2KiQW.js → any-language-editor-B9yuOY2a.js} +2 -2
  6. package/dist/{architectureDiagram-IEHRJDOE-DhrFWr1a.js → architectureDiagram-IEHRJDOE-yPyQlJjy.js} +1800 -1800
  7. package/dist/asn1-jKiBa2Ya.js +10 -10
  8. package/dist/assets/{save-worker-9HEtFDM0.js → save-worker-DwN_qfSx.js} +695 -702
  9. package/dist/assets/{worker-BGGm0KYZ.js → worker-BzMPE1Lq.js} +732 -739
  10. package/dist/assets/{worker-BNsqBj5w.js → worker-ISYYr8IB.js} +726 -732
  11. package/dist/blockDiagram-JOT3LUYC-548hLzGM.js +2249 -0
  12. package/dist/{c4Diagram-VJAJSXHY-DKSU0_Zg.js → c4Diagram-VJAJSXHY-CkEjf0GP.js} +401 -400
  13. package/dist/{channel-DMiLp-mI.js → channel-B4Bg4vOE.js} +1 -1
  14. package/dist/chunk-4BMEZGHF-De9P61oF.js +9 -0
  15. package/dist/chunk-A2AXSNBT-geH9ZZvt.js +1373 -0
  16. package/dist/chunk-AEK57VVT-B2sQ0hQa.js +1416 -0
  17. package/dist/{chunk-D6G4REZN-BZV3ukOi.js → chunk-D6G4REZN-C2nlv3Zm.js} +2 -2
  18. package/dist/{chunk-RZ5BOZE2-B4rOVQD8.js → chunk-RZ5BOZE2-CmOabQbu.js} +8 -8
  19. package/dist/chunk-XZIHB7SX-C-O1Dk7e.js +16 -0
  20. package/dist/{classDiagram-GIVACNV2-DLRT4_A4.js → classDiagram-GIVACNV2-Du2vgWFA.js} +2 -2
  21. package/dist/{classDiagram-v2-COTLJTTW-DLRT4_A4.js → classDiagram-v2-COTLJTTW-Du2vgWFA.js} +2 -2
  22. package/dist/clojure-CCKyeQKf.js +2 -2
  23. package/dist/{clone-CPwu6xRn.js → clone-DnSM2M6p.js} +1 -1
  24. package/dist/css-bIlmDBTK.js +19 -19
  25. package/dist/{cytoscape.esm-DAyNQ0qu.js → cytoscape.esm-CCQ3SVU1.js} +2301 -2301
  26. package/dist/dagre-OKDRZEBW-CnGJy_Hk.js +447 -0
  27. package/dist/{data-editor-CYvUeKhw.js → data-editor--qYs3N6K.js} +5785 -5795
  28. package/dist/{diagram-SSKATNLV-D8WhiY2q.js → diagram-SSKATNLV-Ba25ch_t.js} +13 -13
  29. package/dist/{diagram-VNBRO52H-Bil9sOsr.js → diagram-VNBRO52H-ky1Bklgc.js} +3 -3
  30. package/dist/{erDiagram-Q7BY3M3F-J-Jm-DD7.js → erDiagram-Q7BY3M3F-DKx4pdnF.js} +263 -262
  31. package/dist/flowDiagram-4HSFHLVR-D2g6V5ro.js +1623 -0
  32. package/dist/{ganttDiagram-APWFNJXF-C2G0-fOq.js → ganttDiagram-APWFNJXF-CM2375VL.js} +45 -45
  33. package/dist/gitGraphDiagram-7IBYFJ6S-CYBXIIJu.js +712 -0
  34. package/dist/{graph-BFerxzEi.js → graph-BXO6Y4fK.js} +9 -9
  35. package/dist/{index-DfpR00QG.js → index-BXQhgr_p.js} +99 -98
  36. package/dist/{index-BhtvwOag.js → index-CLVuMf-N.js} +28 -28
  37. package/dist/{index-j8M50mVa.js → index-DsjbPR0S.js} +4 -4
  38. package/dist/{index-DkuVwdVm.js → index-kCGDeFbz.js} +9 -9
  39. package/dist/{infoDiagram-PH2N3AL5-AYtb1_Lz.js → infoDiagram-PH2N3AL5-Bysuy2jX.js} +3 -3
  40. package/dist/javascript-WMWNx-Vj.js +47 -47
  41. package/dist/{journeyDiagram-U35MCT3I-Bdz9gIBI.js → journeyDiagram-U35MCT3I-TBaQruI8.js} +18 -18
  42. package/dist/kanban-definition-NDS4AKOZ-D4jw_Hry.js +719 -0
  43. package/dist/{katex-9tX9hjoM.js → katex-CUSbq6rG.js} +2180 -2180
  44. package/dist/{layout-Qs-BVu8V.js → layout-BUA-DPJm.js} +27 -27
  45. package/dist/{linear-SIbCb7yI.js → linear-BnTRnU3J.js} +2 -2
  46. package/dist/main-D-37AaR4.js +169855 -0
  47. package/dist/main.js +1 -1
  48. package/dist/mermaid-BzFQ2d9i.js +14517 -0
  49. package/dist/{mhchem-L5-rce7L.js → mhchem-Db_f2n8C.js} +30 -30
  50. package/dist/{min-BTA1UVkn.js → min-D_xIH6wU.js} +2 -2
  51. package/dist/{mindmap-definition-ALO5MXBD-CdrD5BzZ.js → mindmap-definition-ALO5MXBD-J6RsqNRW.js} +359 -359
  52. package/dist/mllike-BSnXJBGA.js +7 -7
  53. package/dist/{pieDiagram-IB7DONF6-BbbxWeqU.js → pieDiagram-IB7DONF6-CyMim2nt.js} +34 -34
  54. package/dist/pug-BqUR2bBq.js +35 -35
  55. package/dist/python-B5QdSKoL.js +18 -18
  56. package/dist/quadrantDiagram-7GDLP6J5-wbyf83kA.js +1025 -0
  57. package/dist/{radar-MK3ICKWK-Z5R0bt0z.js → radar-MK3ICKWK-BDGRcSnx.js} +2555 -2554
  58. package/dist/{react-plotly-DqDxe4Uh.js → react-plotly-DrgClWur.js} +6595 -6597
  59. package/dist/{requirementDiagram-KVF5MWMF-DMnvzAxX.js → requirementDiagram-KVF5MWMF-Cm8xuD8x.js} +251 -250
  60. package/dist/rpm-IznJm2Xc.js +9 -9
  61. package/dist/{sankeyDiagram-QLVOVGJD-DbUWg3a4.js → sankeyDiagram-QLVOVGJD-iRFZmvn2.js} +339 -338
  62. package/dist/{sequenceDiagram-X6HHIX6F-JltcBwLF.js → sequenceDiagram-X6HHIX6F-Dr8oo1TZ.js} +822 -821
  63. package/dist/{slides-component-DVr5mf9p.js → slides-component-D8N71t3Y.js} +280 -280
  64. package/dist/sql-mMre1Bo3.js +9 -9
  65. package/dist/{stateDiagram-DGXRK772-qbXtyoS6.js → stateDiagram-DGXRK772-BNQYJSkB.js} +17 -17
  66. package/dist/{stateDiagram-v2-YXO3MK2T-Ba7q5pMK.js → stateDiagram-v2-YXO3MK2T-Dl249u1C.js} +2 -2
  67. package/dist/style.css +1 -1
  68. package/dist/{time-DHD8Fix8.js → time-hpTGXdsY.js} +2 -2
  69. package/dist/{timeline-definition-BDJGKUSR-q4gOCBRq.js → timeline-definition-BDJGKUSR-kYwIJd20.js} +261 -261
  70. package/dist/timer-BYwnU4DF.js +378 -378
  71. package/dist/ttcn-cfg-Bac_acMi.js +9 -9
  72. package/dist/{vega-component-D2NZFVvw.js → vega-component-CIAcZw-F.js} +82 -82
  73. package/dist/{xychartDiagram-VJFVF3MP-BZs9xPvU.js → xychartDiagram-VJFVF3MP-Cj3j6vWQ.js} +472 -471
  74. package/package.json +7 -6
  75. package/dist/blockDiagram-JOT3LUYC-COVagShg.js +0 -2248
  76. package/dist/chunk-4BMEZGHF-CeMSohVe.js +0 -9
  77. package/dist/chunk-A2AXSNBT-mQ3fXQfx.js +0 -1372
  78. package/dist/chunk-AEK57VVT-B7kw2yt6.js +0 -1415
  79. package/dist/chunk-XZIHB7SX-C3-5SkZh.js +0 -15
  80. package/dist/dagre-OKDRZEBW-yEQf6TwX.js +0 -447
  81. package/dist/flowDiagram-4HSFHLVR-Dhymtq1g.js +0 -1622
  82. package/dist/gitGraphDiagram-7IBYFJ6S-DCZAwPro.js +0 -712
  83. package/dist/kanban-definition-NDS4AKOZ-ByLpDX9Y.js +0 -719
  84. package/dist/main-Cx3zrED9.js +0 -156521
  85. package/dist/mermaid-DAi_EtLa.js +0 -11991
  86. package/dist/quadrantDiagram-7GDLP6J5-1UQgbW9Z.js +0 -1024
@@ -0,0 +1,447 @@
1
+ import { _ as w, ab as F, ac as Y, ad as _, ae as H, l as i, c as V, af as $, ag as U, a0 as q, a5 as z, a1 as P, $ as K, ah as Q, ai as W, aj as Z } from "./mermaid-BzFQ2d9i.js";
2
+ import { G as B } from "./graph-BXO6Y4fK.js";
3
+ import { l as I } from "./layout-BUA-DPJm.js";
4
+ import { i as b } from "./_baseUniq-BPYian-Y.js";
5
+ import { c as L } from "./clone-DnSM2M6p.js";
6
+ import { m as A } from "./min-D_xIH6wU.js";
7
+ function h(e) {
8
+ var t = {
9
+ options: {
10
+ directed: e.isDirected(),
11
+ multigraph: e.isMultigraph(),
12
+ compound: e.isCompound()
13
+ },
14
+ nodes: ee(e),
15
+ edges: ne(e)
16
+ };
17
+ return b(e.graph()) || (t.value = L(e.graph())), t;
18
+ }
19
+ function ee(e) {
20
+ return A(e.nodes(), function(t) {
21
+ var n = e.node(t), a = e.parent(t), r = { v: t };
22
+ return b(n) || (r.value = n), b(a) || (r.parent = a), r;
23
+ });
24
+ }
25
+ function ne(e) {
26
+ return A(e.edges(), function(t) {
27
+ var n = e.edge(t), a = { v: t.v, w: t.w };
28
+ return b(t.name) || (a.name = t.name), b(n) || (a.value = n), a;
29
+ });
30
+ }
31
+ var d = /* @__PURE__ */ new Map(), p = /* @__PURE__ */ new Map(), J = /* @__PURE__ */ new Map(), te = /* @__PURE__ */ w(() => {
32
+ p.clear(), J.clear(), d.clear();
33
+ }, "clear"), D = /* @__PURE__ */ w((e, t) => {
34
+ const n = p.get(t) || [];
35
+ return i.trace("In isDescendant", t, " ", e, " = ", n.includes(e)), n.includes(e);
36
+ }, "isDescendant"), se = /* @__PURE__ */ w((e, t) => {
37
+ const n = p.get(t) || [];
38
+ return i.info("Descendants of ", t, " is ", n), i.info("Edge is ", e), e.v === t || e.w === t ? false : n ? n.includes(e.v) || D(e.v, t) || D(e.w, t) || n.includes(e.w) : (i.debug("Tilt, ", t, ",not in descendants"), false);
39
+ }, "edgeInCluster"), G = /* @__PURE__ */ w((e, t, n, a) => {
40
+ i.warn(
41
+ "Copying children of ",
42
+ e,
43
+ "root",
44
+ a,
45
+ "data",
46
+ t.node(e),
47
+ a
48
+ );
49
+ const r = t.children(e) || [];
50
+ e !== a && r.push(e), i.warn("Copying (nodes) clusterId", e, "nodes", r), r.forEach((o) => {
51
+ if (t.children(o).length > 0)
52
+ G(o, t, n, a);
53
+ else {
54
+ const l = t.node(o);
55
+ i.info("cp ", o, " to ", a, " with parent ", e), n.setNode(o, l), a !== t.parent(o) && (i.warn("Setting parent", o, t.parent(o)), n.setParent(o, t.parent(o))), e !== a && o !== e ? (i.debug("Setting parent", o, e), n.setParent(o, e)) : (i.info("In copy ", e, "root", a, "data", t.node(e), a), i.debug(
56
+ "Not Setting parent for node=",
57
+ o,
58
+ "cluster!==rootId",
59
+ e !== a,
60
+ "node!==clusterId",
61
+ o !== e
62
+ ));
63
+ const u = t.edges(o);
64
+ i.debug("Copying Edges", u), u.forEach((c) => {
65
+ i.info("Edge", c);
66
+ const m = t.edge(c.v, c.w, c.name);
67
+ i.info("Edge data", m, a);
68
+ try {
69
+ se(c, a) ? (i.info("Copying as ", c.v, c.w, m, c.name), n.setEdge(c.v, c.w, m, c.name), i.info("newGraph edges ", n.edges(), n.edge(n.edges()[0]))) : i.info(
70
+ "Skipping copy of edge ",
71
+ c.v,
72
+ "-->",
73
+ c.w,
74
+ " rootId: ",
75
+ a,
76
+ " clusterId:",
77
+ e
78
+ );
79
+ } catch (v) {
80
+ i.error(v);
81
+ }
82
+ });
83
+ }
84
+ i.debug("Removing node", o), t.removeNode(o);
85
+ });
86
+ }, "copy"), R = /* @__PURE__ */ w((e, t) => {
87
+ const n = t.children(e);
88
+ let a = [...n];
89
+ for (const r of n)
90
+ J.set(r, e), a = [...a, ...R(r, t)];
91
+ return a;
92
+ }, "extractDescendants"), ie = /* @__PURE__ */ w((e, t, n) => {
93
+ const a = e.edges().filter((c) => c.v === t || c.w === t), r = e.edges().filter((c) => c.v === n || c.w === n), o = a.map((c) => ({ v: c.v === t ? n : c.v, w: c.w === t ? t : c.w })), l = r.map((c) => ({ v: c.v, w: c.w }));
94
+ return o.filter((c) => l.some((m) => c.v === m.v && c.w === m.w));
95
+ }, "findCommonEdges"), C = /* @__PURE__ */ w((e, t, n) => {
96
+ const a = t.children(e);
97
+ if (i.trace("Searching children of id ", e, a), a.length < 1)
98
+ return e;
99
+ let r;
100
+ for (const o of a) {
101
+ const l = C(o, t, n), u = ie(t, n, l);
102
+ if (l)
103
+ if (u.length > 0)
104
+ r = l;
105
+ else
106
+ return l;
107
+ }
108
+ return r;
109
+ }, "findNonClusterChild"), k = /* @__PURE__ */ w((e) => !d.has(e) || !d.get(e).externalConnections ? e : d.has(e) ? d.get(e).id : e, "getAnchorId"), re = /* @__PURE__ */ w((e, t) => {
110
+ if (!e || t > 10) {
111
+ i.debug("Opting out, no graph ");
112
+ return;
113
+ } else
114
+ i.debug("Opting in, graph ");
115
+ e.nodes().forEach(function(n) {
116
+ e.children(n).length > 0 && (i.warn(
117
+ "Cluster identified",
118
+ n,
119
+ " Replacement id in edges: ",
120
+ C(n, e, n)
121
+ ), p.set(n, R(n, e)), d.set(n, { id: C(n, e, n), clusterData: e.node(n) }));
122
+ }), e.nodes().forEach(function(n) {
123
+ const a = e.children(n), r = e.edges();
124
+ a.length > 0 ? (i.debug("Cluster identified", n, p), r.forEach((o) => {
125
+ const l = D(o.v, n), u = D(o.w, n);
126
+ l ^ u && (i.warn("Edge: ", o, " leaves cluster ", n), i.warn("Descendants of XXX ", n, ": ", p.get(n)), d.get(n).externalConnections = true);
127
+ })) : i.debug("Not a cluster ", n, p);
128
+ });
129
+ for (let n of d.keys()) {
130
+ const a = d.get(n).id, r = e.parent(a);
131
+ r !== n && d.has(r) && !d.get(r).externalConnections && (d.get(n).id = r);
132
+ }
133
+ e.edges().forEach(function(n) {
134
+ const a = e.edge(n);
135
+ i.warn("Edge " + n.v + " -> " + n.w + ": " + JSON.stringify(n)), i.warn("Edge " + n.v + " -> " + n.w + ": " + JSON.stringify(e.edge(n)));
136
+ let r = n.v, o = n.w;
137
+ if (i.warn(
138
+ "Fix XXX",
139
+ d,
140
+ "ids:",
141
+ n.v,
142
+ n.w,
143
+ "Translating: ",
144
+ d.get(n.v),
145
+ " --- ",
146
+ d.get(n.w)
147
+ ), d.get(n.v) || d.get(n.w)) {
148
+ if (i.warn("Fixing and trying - removing XXX", n.v, n.w, n.name), r = k(n.v), o = k(n.w), e.removeEdge(n.v, n.w, n.name), r !== n.v) {
149
+ const l = e.parent(r);
150
+ d.get(l).externalConnections = true, a.fromCluster = n.v;
151
+ }
152
+ if (o !== n.w) {
153
+ const l = e.parent(o);
154
+ d.get(l).externalConnections = true, a.toCluster = n.w;
155
+ }
156
+ i.warn("Fix Replacing with XXX", r, o, n.name), e.setEdge(r, o, a, n.name);
157
+ }
158
+ }), i.warn("Adjusted Graph", h(e)), T(e, 0), i.trace(d);
159
+ }, "adjustClustersAndEdges"), T = /* @__PURE__ */ w((e, t) => {
160
+ var _a, _b;
161
+ if (i.warn("extractor - ", t, h(e), e.children("D")), t > 10) {
162
+ i.error("Bailing out");
163
+ return;
164
+ }
165
+ let n = e.nodes(), a = false;
166
+ for (const r of n) {
167
+ const o = e.children(r);
168
+ a = a || o.length > 0;
169
+ }
170
+ if (!a) {
171
+ i.debug("Done, no node has children", e.nodes());
172
+ return;
173
+ }
174
+ i.debug("Nodes = ", n, t);
175
+ for (const r of n)
176
+ if (i.debug(
177
+ "Extracting node",
178
+ r,
179
+ d,
180
+ d.has(r) && !d.get(r).externalConnections,
181
+ !e.parent(r),
182
+ e.node(r),
183
+ e.children("D"),
184
+ " Depth ",
185
+ t
186
+ ), !d.has(r))
187
+ i.debug("Not a cluster", r, t);
188
+ else if (!d.get(r).externalConnections && e.children(r) && e.children(r).length > 0) {
189
+ i.warn(
190
+ "Cluster without external connections, without a parent and with children",
191
+ r,
192
+ t
193
+ );
194
+ let l = e.graph().rankdir === "TB" ? "LR" : "TB";
195
+ ((_b = (_a = d.get(r)) == null ? void 0 : _a.clusterData) == null ? void 0 : _b.dir) && (l = d.get(r).clusterData.dir, i.warn("Fixing dir", d.get(r).clusterData.dir, l));
196
+ const u = new B({
197
+ multigraph: true,
198
+ compound: true
199
+ }).setGraph({
200
+ rankdir: l,
201
+ nodesep: 50,
202
+ ranksep: 50,
203
+ marginx: 8,
204
+ marginy: 8
205
+ }).setDefaultEdgeLabel(function() {
206
+ return {};
207
+ });
208
+ i.warn("Old graph before copy", h(e)), G(r, e, u, r), e.setNode(r, {
209
+ clusterNode: true,
210
+ id: r,
211
+ clusterData: d.get(r).clusterData,
212
+ label: d.get(r).label,
213
+ graph: u
214
+ }), i.warn("New graph after copy node: (", r, ")", h(u)), i.debug("Old graph after copy", h(e));
215
+ } else
216
+ i.warn(
217
+ "Cluster ** ",
218
+ r,
219
+ " **not meeting the criteria !externalConnections:",
220
+ !d.get(r).externalConnections,
221
+ " no parent: ",
222
+ !e.parent(r),
223
+ " children ",
224
+ e.children(r) && e.children(r).length > 0,
225
+ e.children("D"),
226
+ t
227
+ ), i.debug(d);
228
+ n = e.nodes(), i.warn("New list of nodes", n);
229
+ for (const r of n) {
230
+ const o = e.node(r);
231
+ i.warn(" Now next level", r, o), (o == null ? void 0 : o.clusterNode) && T(o.graph, t + 1);
232
+ }
233
+ }, "extractor"), M = /* @__PURE__ */ w((e, t) => {
234
+ if (t.length === 0)
235
+ return [];
236
+ let n = Object.assign([], t);
237
+ return t.forEach((a) => {
238
+ const r = e.children(a), o = M(e, r);
239
+ n = [...n, ...o];
240
+ }), n;
241
+ }, "sorter"), oe = /* @__PURE__ */ w((e) => M(e, e.children()), "sortNodesByHierarchy"), j = /* @__PURE__ */ w(async (e, t, n, a, r, o) => {
242
+ i.warn("Graph in recursive render:XAX", h(t), r);
243
+ const l = t.graph().rankdir;
244
+ i.trace("Dir in recursive render - dir:", l);
245
+ const u = e.insert("g").attr("class", "root");
246
+ t.nodes() ? i.info("Recursive render XXX", t.nodes()) : i.info("No nodes found for", t), t.edges().length > 0 && i.info("Recursive edges", t.edge(t.edges()[0]));
247
+ const c = u.insert("g").attr("class", "clusters"), m = u.insert("g").attr("class", "edgePaths"), v = u.insert("g").attr("class", "edgeLabels"), X = u.insert("g").attr("class", "nodes");
248
+ await Promise.all(
249
+ t.nodes().map(async function(f) {
250
+ const s = t.node(f);
251
+ if (r !== void 0) {
252
+ const g = JSON.parse(JSON.stringify(r.clusterData));
253
+ i.trace(
254
+ `Setting data for parent cluster XXX
255
+ Node.id = `,
256
+ f,
257
+ `
258
+ data=`,
259
+ g.height,
260
+ `
261
+ Parent cluster`,
262
+ r.height
263
+ ), t.setNode(r.id, g), t.parent(f) || (i.trace("Setting parent", f, r.id), t.setParent(f, r.id, g));
264
+ }
265
+ if (i.info("(Insert) Node XXX" + f + ": " + JSON.stringify(t.node(f))), s == null ? void 0 : s.clusterNode) {
266
+ i.info("Cluster identified XBX", f, s.width, t.node(f));
267
+ const { ranksep: g, nodesep: E } = t.graph();
268
+ s.graph.setGraph({
269
+ ...s.graph.graph(),
270
+ ranksep: g + 25,
271
+ nodesep: E
272
+ });
273
+ const N = await j(
274
+ X,
275
+ s.graph,
276
+ n,
277
+ a,
278
+ t.node(f),
279
+ o
280
+ ), x = N.elem;
281
+ $(s, x), s.diff = N.diff || 0, i.info(
282
+ "New compound node after recursive render XAX",
283
+ f,
284
+ "width",
285
+ // node,
286
+ s.width,
287
+ "height",
288
+ s.height
289
+ // node.x,
290
+ // node.y
291
+ ), U(x, s);
292
+ } else
293
+ t.children(f).length > 0 ? (i.trace(
294
+ "Cluster - the non recursive path XBX",
295
+ f,
296
+ s.id,
297
+ s,
298
+ s.width,
299
+ "Graph:",
300
+ t
301
+ ), i.trace(C(s.id, t)), d.set(s.id, { id: C(s.id, t), node: s })) : (i.trace("Node - the non recursive path XAX", f, X, t.node(f), l), await q(X, t.node(f), { config: o, dir: l }));
302
+ })
303
+ ), await (/* @__PURE__ */ w(async () => {
304
+ const f = t.edges().map(async function(s) {
305
+ const g = t.edge(s.v, s.w, s.name);
306
+ i.info("Edge " + s.v + " -> " + s.w + ": " + JSON.stringify(s)), i.info("Edge " + s.v + " -> " + s.w + ": ", s, " ", JSON.stringify(t.edge(s))), i.info(
307
+ "Fix",
308
+ d,
309
+ "ids:",
310
+ s.v,
311
+ s.w,
312
+ "Translating: ",
313
+ d.get(s.v),
314
+ d.get(s.w)
315
+ ), await Z(v, g);
316
+ });
317
+ await Promise.all(f);
318
+ }, "processEdges"))(), i.info("Graph before layout:", JSON.stringify(h(t))), i.info("############################################# XXX"), i.info("### Layout ### XXX"), i.info("############################################# XXX"), I(t), i.info("Graph after layout:", JSON.stringify(h(t)));
319
+ let O = 0, { subGraphTitleTotalMargin: S } = z(o);
320
+ return await Promise.all(
321
+ oe(t).map(async function(f) {
322
+ var _a;
323
+ const s = t.node(f);
324
+ if (i.info(
325
+ "Position XBX => " + f + ": (" + s.x,
326
+ "," + s.y,
327
+ ") width: ",
328
+ s.width,
329
+ " height: ",
330
+ s.height
331
+ ), s == null ? void 0 : s.clusterNode)
332
+ s.y += S, i.info(
333
+ "A tainted cluster node XBX1",
334
+ f,
335
+ s.id,
336
+ s.width,
337
+ s.height,
338
+ s.x,
339
+ s.y,
340
+ t.parent(f)
341
+ ), d.get(s.id).node = s, P(s);
342
+ else if (t.children(f).length > 0) {
343
+ i.info(
344
+ "A pure cluster node XBX1",
345
+ f,
346
+ s.id,
347
+ s.x,
348
+ s.y,
349
+ s.width,
350
+ s.height,
351
+ t.parent(f)
352
+ ), s.height += S, t.node(s.parentId);
353
+ const g = (s == null ? void 0 : s.padding) / 2 || 0, E = ((_a = s == null ? void 0 : s.labelBBox) == null ? void 0 : _a.height) || 0, N = E - g || 0;
354
+ i.debug("OffsetY", N, "labelHeight", E, "halfPadding", g), await K(c, s), d.get(s.id).node = s;
355
+ } else {
356
+ const g = t.node(s.parentId);
357
+ s.y += S / 2, i.info(
358
+ "A regular node XBX1 - using the padding",
359
+ s.id,
360
+ "parent",
361
+ s.parentId,
362
+ s.width,
363
+ s.height,
364
+ s.x,
365
+ s.y,
366
+ "offsetY",
367
+ s.offsetY,
368
+ "parent",
369
+ g,
370
+ g == null ? void 0 : g.offsetY,
371
+ s
372
+ ), P(s);
373
+ }
374
+ })
375
+ ), t.edges().forEach(function(f) {
376
+ const s = t.edge(f);
377
+ i.info("Edge " + f.v + " -> " + f.w + ": " + JSON.stringify(s), s), s.points.forEach((x) => x.y += S / 2);
378
+ const g = t.node(f.v);
379
+ var E = t.node(f.w);
380
+ const N = Q(m, s, d, n, g, E, a);
381
+ W(s, N);
382
+ }), t.nodes().forEach(function(f) {
383
+ const s = t.node(f);
384
+ i.info(f, s.type, s.diff), s.isGroup && (O = s.diff);
385
+ }), i.warn("Returning from recursive render XAX", u, O), { elem: u, diff: O };
386
+ }, "recursiveRender"), ge = /* @__PURE__ */ w(async (e, t) => {
387
+ var _a, _b, _c, _d, _e, _f;
388
+ const n = new B({
389
+ multigraph: true,
390
+ compound: true
391
+ }).setGraph({
392
+ rankdir: e.direction,
393
+ nodesep: ((_a = e.config) == null ? void 0 : _a.nodeSpacing) || ((_c = (_b = e.config) == null ? void 0 : _b.flowchart) == null ? void 0 : _c.nodeSpacing) || e.nodeSpacing,
394
+ ranksep: ((_d = e.config) == null ? void 0 : _d.rankSpacing) || ((_f = (_e = e.config) == null ? void 0 : _e.flowchart) == null ? void 0 : _f.rankSpacing) || e.rankSpacing,
395
+ marginx: 8,
396
+ marginy: 8
397
+ }).setDefaultEdgeLabel(function() {
398
+ return {};
399
+ }), a = t.select("g");
400
+ F(a, e.markers, e.type, e.diagramId), Y(), _(), H(), te(), e.nodes.forEach((o) => {
401
+ n.setNode(o.id, { ...o }), o.parentId && n.setParent(o.id, o.parentId);
402
+ }), i.debug("Edges:", e.edges), e.edges.forEach((o) => {
403
+ if (o.start === o.end) {
404
+ const l = o.start, u = l + "---" + l + "---1", c = l + "---" + l + "---2", m = n.node(l);
405
+ n.setNode(u, {
406
+ domId: u,
407
+ id: u,
408
+ parentId: m.parentId,
409
+ labelStyle: "",
410
+ label: "",
411
+ padding: 0,
412
+ shape: "labelRect",
413
+ // shape: 'rect',
414
+ style: "",
415
+ width: 10,
416
+ height: 10
417
+ }), n.setParent(u, m.parentId), n.setNode(c, {
418
+ domId: c,
419
+ id: c,
420
+ parentId: m.parentId,
421
+ labelStyle: "",
422
+ padding: 0,
423
+ // shape: 'rect',
424
+ shape: "labelRect",
425
+ label: "",
426
+ style: "",
427
+ width: 10,
428
+ height: 10
429
+ }), n.setParent(c, m.parentId);
430
+ const v = structuredClone(o), X = structuredClone(o), y = structuredClone(o);
431
+ v.label = "", v.arrowTypeEnd = "none", v.id = l + "-cyclic-special-1", X.arrowTypeStart = "none", X.arrowTypeEnd = "none", X.id = l + "-cyclic-special-mid", y.label = "", m.isGroup && (v.fromCluster = l, y.toCluster = l), y.id = l + "-cyclic-special-2", y.arrowTypeStart = "none", n.setEdge(l, u, v, l + "-cyclic-special-0"), n.setEdge(u, c, X, l + "-cyclic-special-1"), n.setEdge(c, l, y, l + "-cyc<lic-special-2");
432
+ } else
433
+ n.setEdge(o.start, o.end, { ...o }, o.id);
434
+ }), i.warn("Graph at first:", JSON.stringify(h(n))), re(n), i.warn("Graph after XAX:", JSON.stringify(h(n)));
435
+ const r = V();
436
+ await j(
437
+ a,
438
+ n,
439
+ e.type,
440
+ e.diagramId,
441
+ void 0,
442
+ r
443
+ );
444
+ }, "render");
445
+ export {
446
+ ge as render
447
+ };