@versini/sassysaint 8.107.3 → 8.108.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.
- package/dist/chunks/{AboutChangelog.BmMVyf-Q.js → AboutChangelog.55tIwnGe.js} +2 -2
- package/dist/chunks/{AboutEntry.wD5hG0ON.js → AboutEntry.D1zAHjel.js} +7 -7
- package/dist/chunks/{App.FyINLNSp.js → App.Br7HE-y0.js} +1746 -1908
- package/dist/chunks/{Bubble.Ci-pu6NI.js → Bubble.Ic_8FEhH.js} +47 -74
- package/dist/chunks/{Table.Dzy9ts3i.js → ButtonIconDelete.DRBd_G40.js} +125 -104
- package/dist/chunks/{Chart.DYVf2gst.js → Chart.CwIVbBYb.js} +2 -2
- package/dist/chunks/{ChatBubbleAssistant.CD6bVvcQ.js → ChatBubbleAssistant.DHlLzqdc.js} +199 -208
- package/dist/chunks/{ChatBubbleUser.Cre3cX04.js → ChatBubbleUser.D7ksCr76.js} +27 -36
- package/dist/chunks/{ChatHistoryTable.D_kOkWN9.js → ChatHistoryTable.DhUDW7QO.js} +108 -121
- package/dist/chunks/{HistoryEntry.BFNME4Z8.js → HistoryEntry.BxnMfiXN.js} +6 -6
- package/dist/chunks/{LoginEntry.SW7wyEpU.js → LoginEntry.XF9rPWdB.js} +4 -4
- package/dist/chunks/{LogoEntry.BAKpdJEy.js → LogoEntry.CnTI8jpv.js} +304 -385
- package/dist/chunks/{MemoriesEntry.Ztyx_8Wm.js → MemoriesEntry.BjNXrPW2.js} +164 -169
- package/dist/chunks/{ProfileEntry.CjzAusYw.js → ProfileEntry.S6XO2uMT.js} +4 -4
- package/dist/chunks/{SettingsEntry.D4IKmfYP.js → SettingsEntry.C5jHUJzu.js} +5 -5
- package/dist/chunks/{UsageEntry.D7sTPflE.js → UsageEntry.CQTLPweE.js} +5 -5
- package/dist/chunks/_basePickBy.Dj6LWOd3.js +151 -0
- package/dist/chunks/_baseUniq.DfiF6jap.js +614 -0
- package/dist/chunks/arc.CLrqhM1J.js +83 -0
- package/dist/chunks/architecture-U656AL7Q.CuF-GD1P.js +36 -0
- package/dist/chunks/architectureDiagram-VXUJARFQ.BGPIWweD.js +4653 -0
- package/dist/chunks/blockDiagram-VD42YOAC.cLfUaXxm.js +2254 -0
- package/dist/chunks/browser.B8WuOmYx.js +260 -0
- package/dist/chunks/c4Diagram-YG6GDRKO.Cc4f8G62.js +1579 -0
- package/dist/chunks/channel.D7pUQPat.js +5 -0
- package/dist/chunks/chunk-4BX2VUAB.C5gP6CzO.js +8 -0
- package/dist/chunks/chunk-55IACEB6.CMTOMhuf.js +8 -0
- package/dist/chunks/chunk-B4BG7PRW.CQz5CpXp.js +1375 -0
- package/dist/chunks/chunk-DI55MBZ5.C4SOgQau.js +1370 -0
- package/dist/chunks/chunk-FMBD7UC4.5tYrPDWZ.js +19 -0
- package/dist/chunks/chunk-QN33PNHL.P3o9PZBW.js +19 -0
- package/dist/chunks/chunk-QZHKN3VN.COvsjomn.js +15 -0
- package/dist/chunks/chunk-TZMSLE5B.C5QPHQlj.js +64 -0
- package/dist/chunks/classDiagram-2ON5EDUG.DrIfmpHo.js +16 -0
- package/dist/chunks/classDiagram-v2-WZHVMYZB.DrIfmpHo.js +16 -0
- package/dist/chunks/clone.47X4nGV4.js +8 -0
- package/dist/chunks/cose-bilkent-S5V4N54A.B1umrZne.js +2600 -0
- package/dist/chunks/cytoscape.esm.DmRZGnqW.js +18700 -0
- package/dist/chunks/dagre-6UL2VRFP.Ce4VSTky.js +444 -0
- package/dist/chunks/defaultLocale.CPJLP5jg.js +171 -0
- package/dist/chunks/diagram-PSM6KHXK.B1yvSG9p.js +531 -0
- package/dist/chunks/diagram-QEK2KX5R.CYDnnLB3.js +217 -0
- package/dist/chunks/diagram-S2PKOQOG.BI6w7TZJ.js +142 -0
- package/dist/chunks/erDiagram-Q2GNP2WA.D7mTQJ6P.js +841 -0
- package/dist/chunks/flowDiagram-NV44I4VS.Col8_E_0.js +1620 -0
- package/dist/chunks/ganttDiagram-JELNMOA3.GAUSoSKL.js +2647 -0
- package/dist/chunks/gitGraph-F6HP7TQM.3I_jmRrt.js +27 -0
- package/dist/chunks/gitGraphDiagram-NY62KEGX.DZQ_LVDe.js +699 -0
- package/dist/chunks/graph.BmJVbvPo.js +247 -0
- package/dist/chunks/index.Bi0z4EE1.js +90 -0
- package/dist/chunks/{index.QiLu2wkI.js → index.C0El17wt.js} +2 -2
- package/dist/chunks/{index.DBovegdE.js → index.CUn5zNJg.js} +1 -1
- package/dist/chunks/index.CbEVdl_N.js +279 -0
- package/dist/chunks/{index.BT3Do9Po.js → index.CoZgV6rn.js} +34 -43
- package/dist/chunks/{index.16gcBvke.js → index.DCqTKdor.js} +60 -69
- package/dist/chunks/index.DctDXsYU.js +67 -0
- package/dist/chunks/{index.BfTDtoYy.js → index.Df-tNwfZ.js} +1 -1
- package/dist/chunks/{index.BI1_ccPN.js → index.DxGkXGdu.js} +3 -3
- package/dist/chunks/{index.uILjvEfo.js → index.z2e7pMwp.js} +1 -1
- package/dist/chunks/info-NVLQJR56.D9ao7_Su.js +27 -0
- package/dist/chunks/infoDiagram-WHAUD3N6.DmFB-CXk.js +24 -0
- package/dist/chunks/init.DAGnb5BH.js +16 -0
- package/dist/chunks/journeyDiagram-XKPGCS4Q.C9FISQxf.js +834 -0
- package/dist/chunks/kanban-definition-3W4ZIXB7.ChmJnTyd.js +719 -0
- package/dist/chunks/{index.DJlv39cv.js → katex.D0sQThIv.js} +1638 -1943
- package/dist/chunks/layout.DtZQLIyC.js +1332 -0
- package/dist/chunks/linear.CIDfImUo.js +625 -0
- package/dist/chunks/mermaid-parser.core.CO83pegl.js +12724 -0
- package/dist/chunks/mindmap-definition-VGOIOE7T.B3dfWebK.js +759 -0
- package/dist/chunks/ordinal.EWT-qnu7.js +61 -0
- package/dist/chunks/packet-BFZMPI3H.q9qJMgm9.js +27 -0
- package/dist/chunks/pie-7BOR55EZ.BTnKDmrp.js +32 -0
- package/dist/chunks/pieDiagram-ADFJNKIX.B23eDSnQ.js +161 -0
- package/dist/chunks/quadrantDiagram-AYHSOK5B.B3ZIlLhO.js +1022 -0
- package/dist/chunks/radar-NHE76QYJ.BeKykujs.js +27 -0
- package/dist/chunks/rehype-mermaid.DkS2NcIa.js +14283 -0
- package/dist/chunks/requirementDiagram-UZGBJVZJ.0vOl9IL2.js +850 -0
- package/dist/chunks/sankeyDiagram-TZEHDZUN.DxwTK65F.js +810 -0
- package/dist/chunks/sequenceDiagram-WL72ISMW.BmOg83Gx.js +2511 -0
- package/dist/chunks/stateDiagram-FKZM4ZOC.DBiU28Wu.js +263 -0
- package/dist/chunks/stateDiagram-v2-4FDKWEC3.B6t8_4cH.js +16 -0
- package/dist/chunks/timeline-definition-IT6M3QCI.DpWxwytE.js +795 -0
- package/dist/chunks/treemap-KMMF4GRG.KqgFrxbV.js +81 -0
- package/dist/chunks/{useMarkdown.BberHabr.js → useMarkdown.CxuK_DLo.js} +2078 -2072
- package/dist/chunks/xychartDiagram-PRI3JC2R.CBaIBQ89.js +1340 -0
- package/dist/components/SassySaint/SassySaint.js +1 -1
- package/dist/index.js +3 -3
- package/dist/style.css +1 -1
- package/package.json +5 -5
- package/dist/chunks/index.BjnVQ4X3.js +0 -99
- package/dist/chunks/index.uVDYkuxz.js +0 -297
|
@@ -0,0 +1,444 @@
|
|
|
1
|
+
import { __name as w, markers_default as F, clear2 as Y, clear$1 as H, clear$2 as _, log as i, getConfig2 as $, updateNodeBounds as V, setNodeElem as U, insertNode as q, getSubGraphTitleMargins as z, positionNode as P, insertCluster as K, insertEdge as Q, positionEdgeLabel as W, insertEdgeLabel as Z } from "./rehype-mermaid.DkS2NcIa.js";
|
|
2
|
+
import { layout as I } from "./layout.DtZQLIyC.js";
|
|
3
|
+
import { isUndefined as b } from "./_baseUniq.DfiF6jap.js";
|
|
4
|
+
import { clone as L } from "./clone.47X4nGV4.js";
|
|
5
|
+
import { map as B } from "./_basePickBy.Dj6LWOd3.js";
|
|
6
|
+
import { Graph as A } from "./graph.BmJVbvPo.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 B(e.nodes(), function(t) {
|
|
21
|
+
var n = e.node(t), c = e.parent(t), s = { v: t };
|
|
22
|
+
return b(n) || (s.value = n), b(c) || (s.parent = c), s;
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
function ne(e) {
|
|
26
|
+
return B(e.edges(), function(t) {
|
|
27
|
+
var n = e.edge(t), c = { v: t.v, w: t.w };
|
|
28
|
+
return b(t.name) || (c.name = t.name), b(n) || (c.value = n), c;
|
|
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"), re = /* @__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 ? !1 : n ? n.includes(e.v) || D(e.v, t) || D(e.w, t) || n.includes(e.w) : (i.debug("Tilt, ", t, ",not in descendants"), !1);
|
|
39
|
+
}, "edgeInCluster"), R = /* @__PURE__ */ w((e, t, n, c) => {
|
|
40
|
+
i.warn(
|
|
41
|
+
"Copying children of ",
|
|
42
|
+
e,
|
|
43
|
+
"root",
|
|
44
|
+
c,
|
|
45
|
+
"data",
|
|
46
|
+
t.node(e),
|
|
47
|
+
c
|
|
48
|
+
);
|
|
49
|
+
const s = t.children(e) || [];
|
|
50
|
+
e !== c && s.push(e), i.warn("Copying (nodes) clusterId", e, "nodes", s), s.forEach((o) => {
|
|
51
|
+
if (t.children(o).length > 0)
|
|
52
|
+
R(o, t, n, c);
|
|
53
|
+
else {
|
|
54
|
+
const l = t.node(o);
|
|
55
|
+
i.info("cp ", o, " to ", c, " with parent ", e), n.setNode(o, l), c !== t.parent(o) && (i.warn("Setting parent", o, t.parent(o)), n.setParent(o, t.parent(o))), e !== c && o !== e ? (i.debug("Setting parent", o, e), n.setParent(o, e)) : (i.info("In copy ", e, "root", c, "data", t.node(e), c), i.debug(
|
|
56
|
+
"Not Setting parent for node=",
|
|
57
|
+
o,
|
|
58
|
+
"cluster!==rootId",
|
|
59
|
+
e !== c,
|
|
60
|
+
"node!==clusterId",
|
|
61
|
+
o !== e
|
|
62
|
+
));
|
|
63
|
+
const u = t.edges(o);
|
|
64
|
+
i.debug("Copying Edges", u), u.forEach((a) => {
|
|
65
|
+
i.info("Edge", a);
|
|
66
|
+
const m = t.edge(a.v, a.w, a.name);
|
|
67
|
+
i.info("Edge data", m, c);
|
|
68
|
+
try {
|
|
69
|
+
re(a, c) ? (i.info("Copying as ", a.v, a.w, m, a.name), n.setEdge(a.v, a.w, m, a.name), i.info("newGraph edges ", n.edges(), n.edge(n.edges()[0]))) : i.info(
|
|
70
|
+
"Skipping copy of edge ",
|
|
71
|
+
a.v,
|
|
72
|
+
"-->",
|
|
73
|
+
a.w,
|
|
74
|
+
" rootId: ",
|
|
75
|
+
c,
|
|
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"), T = /* @__PURE__ */ w((e, t) => {
|
|
87
|
+
const n = t.children(e);
|
|
88
|
+
let c = [...n];
|
|
89
|
+
for (const s of n)
|
|
90
|
+
J.set(s, e), c = [...c, ...T(s, t)];
|
|
91
|
+
return c;
|
|
92
|
+
}, "extractDescendants"), ie = /* @__PURE__ */ w((e, t, n) => {
|
|
93
|
+
const c = e.edges().filter((a) => a.v === t || a.w === t), s = e.edges().filter((a) => a.v === n || a.w === n), o = c.map((a) => ({ v: a.v === t ? n : a.v, w: a.w === t ? t : a.w })), l = s.map((a) => ({ v: a.v, w: a.w }));
|
|
94
|
+
return o.filter((a) => l.some((m) => a.v === m.v && a.w === m.w));
|
|
95
|
+
}, "findCommonEdges"), C = /* @__PURE__ */ w((e, t, n) => {
|
|
96
|
+
const c = t.children(e);
|
|
97
|
+
if (i.trace("Searching children of id ", e, c), c.length < 1)
|
|
98
|
+
return e;
|
|
99
|
+
let s;
|
|
100
|
+
for (const o of c) {
|
|
101
|
+
const l = C(o, t, n), u = ie(t, n, l);
|
|
102
|
+
if (l)
|
|
103
|
+
if (u.length > 0)
|
|
104
|
+
s = l;
|
|
105
|
+
else
|
|
106
|
+
return l;
|
|
107
|
+
}
|
|
108
|
+
return s;
|
|
109
|
+
}, "findNonClusterChild"), k = /* @__PURE__ */ w((e) => !d.has(e) || !d.get(e).externalConnections ? e : d.has(e) ? d.get(e).id : e, "getAnchorId"), se = /* @__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, T(n, e)), d.set(n, { id: C(n, e, n), clusterData: e.node(n) }));
|
|
122
|
+
}), e.nodes().forEach(function(n) {
|
|
123
|
+
const c = e.children(n), s = e.edges();
|
|
124
|
+
c.length > 0 ? (i.debug("Cluster identified", n, p), s.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 = !0);
|
|
127
|
+
})) : i.debug("Not a cluster ", n, p);
|
|
128
|
+
});
|
|
129
|
+
for (let n of d.keys()) {
|
|
130
|
+
const c = d.get(n).id, s = e.parent(c);
|
|
131
|
+
s !== n && d.has(s) && !d.get(s).externalConnections && (d.get(n).id = s);
|
|
132
|
+
}
|
|
133
|
+
e.edges().forEach(function(n) {
|
|
134
|
+
const c = 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 s = 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), s = k(n.v), o = k(n.w), e.removeEdge(n.v, n.w, n.name), s !== n.v) {
|
|
149
|
+
const l = e.parent(s);
|
|
150
|
+
d.get(l).externalConnections = !0, c.fromCluster = n.v;
|
|
151
|
+
}
|
|
152
|
+
if (o !== n.w) {
|
|
153
|
+
const l = e.parent(o);
|
|
154
|
+
d.get(l).externalConnections = !0, c.toCluster = n.w;
|
|
155
|
+
}
|
|
156
|
+
i.warn("Fix Replacing with XXX", s, o, n.name), e.setEdge(s, o, c, n.name);
|
|
157
|
+
}
|
|
158
|
+
}), i.warn("Adjusted Graph", h(e)), G(e, 0), i.trace(d);
|
|
159
|
+
}, "adjustClustersAndEdges"), G = /* @__PURE__ */ w((e, t) => {
|
|
160
|
+
if (i.warn("extractor - ", t, h(e), e.children("D")), t > 10) {
|
|
161
|
+
i.error("Bailing out");
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
let n = e.nodes(), c = !1;
|
|
165
|
+
for (const s of n) {
|
|
166
|
+
const o = e.children(s);
|
|
167
|
+
c = c || o.length > 0;
|
|
168
|
+
}
|
|
169
|
+
if (!c) {
|
|
170
|
+
i.debug("Done, no node has children", e.nodes());
|
|
171
|
+
return;
|
|
172
|
+
}
|
|
173
|
+
i.debug("Nodes = ", n, t);
|
|
174
|
+
for (const s of n)
|
|
175
|
+
if (i.debug(
|
|
176
|
+
"Extracting node",
|
|
177
|
+
s,
|
|
178
|
+
d,
|
|
179
|
+
d.has(s) && !d.get(s).externalConnections,
|
|
180
|
+
!e.parent(s),
|
|
181
|
+
e.node(s),
|
|
182
|
+
e.children("D"),
|
|
183
|
+
" Depth ",
|
|
184
|
+
t
|
|
185
|
+
), !d.has(s))
|
|
186
|
+
i.debug("Not a cluster", s, t);
|
|
187
|
+
else if (!d.get(s).externalConnections && e.children(s) && e.children(s).length > 0) {
|
|
188
|
+
i.warn(
|
|
189
|
+
"Cluster without external connections, without a parent and with children",
|
|
190
|
+
s,
|
|
191
|
+
t
|
|
192
|
+
);
|
|
193
|
+
let l = e.graph().rankdir === "TB" ? "LR" : "TB";
|
|
194
|
+
d.get(s)?.clusterData?.dir && (l = d.get(s).clusterData.dir, i.warn("Fixing dir", d.get(s).clusterData.dir, l));
|
|
195
|
+
const u = new A({
|
|
196
|
+
multigraph: !0,
|
|
197
|
+
compound: !0
|
|
198
|
+
}).setGraph({
|
|
199
|
+
rankdir: l,
|
|
200
|
+
nodesep: 50,
|
|
201
|
+
ranksep: 50,
|
|
202
|
+
marginx: 8,
|
|
203
|
+
marginy: 8
|
|
204
|
+
}).setDefaultEdgeLabel(function() {
|
|
205
|
+
return {};
|
|
206
|
+
});
|
|
207
|
+
i.warn("Old graph before copy", h(e)), R(s, e, u, s), e.setNode(s, {
|
|
208
|
+
clusterNode: !0,
|
|
209
|
+
id: s,
|
|
210
|
+
clusterData: d.get(s).clusterData,
|
|
211
|
+
label: d.get(s).label,
|
|
212
|
+
graph: u
|
|
213
|
+
}), i.warn("New graph after copy node: (", s, ")", h(u)), i.debug("Old graph after copy", h(e));
|
|
214
|
+
} else
|
|
215
|
+
i.warn(
|
|
216
|
+
"Cluster ** ",
|
|
217
|
+
s,
|
|
218
|
+
" **not meeting the criteria !externalConnections:",
|
|
219
|
+
!d.get(s).externalConnections,
|
|
220
|
+
" no parent: ",
|
|
221
|
+
!e.parent(s),
|
|
222
|
+
" children ",
|
|
223
|
+
e.children(s) && e.children(s).length > 0,
|
|
224
|
+
e.children("D"),
|
|
225
|
+
t
|
|
226
|
+
), i.debug(d);
|
|
227
|
+
n = e.nodes(), i.warn("New list of nodes", n);
|
|
228
|
+
for (const s of n) {
|
|
229
|
+
const o = e.node(s);
|
|
230
|
+
i.warn(" Now next level", s, o), o?.clusterNode && G(o.graph, t + 1);
|
|
231
|
+
}
|
|
232
|
+
}, "extractor"), M = /* @__PURE__ */ w((e, t) => {
|
|
233
|
+
if (t.length === 0)
|
|
234
|
+
return [];
|
|
235
|
+
let n = Object.assign([], t);
|
|
236
|
+
return t.forEach((c) => {
|
|
237
|
+
const s = e.children(c), o = M(e, s);
|
|
238
|
+
n = [...n, ...o];
|
|
239
|
+
}), n;
|
|
240
|
+
}, "sorter"), oe = /* @__PURE__ */ w((e) => M(e, e.children()), "sortNodesByHierarchy"), j = /* @__PURE__ */ w(async (e, t, n, c, s, o) => {
|
|
241
|
+
i.warn("Graph in recursive render:XAX", h(t), s);
|
|
242
|
+
const l = t.graph().rankdir;
|
|
243
|
+
i.trace("Dir in recursive render - dir:", l);
|
|
244
|
+
const u = e.insert("g").attr("class", "root");
|
|
245
|
+
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]));
|
|
246
|
+
const a = 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");
|
|
247
|
+
await Promise.all(
|
|
248
|
+
t.nodes().map(async function(f) {
|
|
249
|
+
const r = t.node(f);
|
|
250
|
+
if (s !== void 0) {
|
|
251
|
+
const g = JSON.parse(JSON.stringify(s.clusterData));
|
|
252
|
+
i.trace(
|
|
253
|
+
`Setting data for parent cluster XXX
|
|
254
|
+
Node.id = `,
|
|
255
|
+
f,
|
|
256
|
+
`
|
|
257
|
+
data=`,
|
|
258
|
+
g.height,
|
|
259
|
+
`
|
|
260
|
+
Parent cluster`,
|
|
261
|
+
s.height
|
|
262
|
+
), t.setNode(s.id, g), t.parent(f) || (i.trace("Setting parent", f, s.id), t.setParent(f, s.id, g));
|
|
263
|
+
}
|
|
264
|
+
if (i.info("(Insert) Node XXX" + f + ": " + JSON.stringify(t.node(f))), r?.clusterNode) {
|
|
265
|
+
i.info("Cluster identified XBX", f, r.width, t.node(f));
|
|
266
|
+
const { ranksep: g, nodesep: E } = t.graph();
|
|
267
|
+
r.graph.setGraph({
|
|
268
|
+
...r.graph.graph(),
|
|
269
|
+
ranksep: g + 25,
|
|
270
|
+
nodesep: E
|
|
271
|
+
});
|
|
272
|
+
const N = await j(
|
|
273
|
+
X,
|
|
274
|
+
r.graph,
|
|
275
|
+
n,
|
|
276
|
+
c,
|
|
277
|
+
t.node(f),
|
|
278
|
+
o
|
|
279
|
+
), x = N.elem;
|
|
280
|
+
V(r, x), r.diff = N.diff || 0, i.info(
|
|
281
|
+
"New compound node after recursive render XAX",
|
|
282
|
+
f,
|
|
283
|
+
"width",
|
|
284
|
+
// node,
|
|
285
|
+
r.width,
|
|
286
|
+
"height",
|
|
287
|
+
r.height
|
|
288
|
+
// node.x,
|
|
289
|
+
// node.y
|
|
290
|
+
), U(x, r);
|
|
291
|
+
} else
|
|
292
|
+
t.children(f).length > 0 ? (i.trace(
|
|
293
|
+
"Cluster - the non recursive path XBX",
|
|
294
|
+
f,
|
|
295
|
+
r.id,
|
|
296
|
+
r,
|
|
297
|
+
r.width,
|
|
298
|
+
"Graph:",
|
|
299
|
+
t
|
|
300
|
+
), i.trace(C(r.id, t)), d.set(r.id, { id: C(r.id, t), node: r })) : (i.trace("Node - the non recursive path XAX", f, X, t.node(f), l), await q(X, t.node(f), { config: o, dir: l }));
|
|
301
|
+
})
|
|
302
|
+
), await (/* @__PURE__ */ w(async () => {
|
|
303
|
+
const f = t.edges().map(async function(r) {
|
|
304
|
+
const g = t.edge(r.v, r.w, r.name);
|
|
305
|
+
i.info("Edge " + r.v + " -> " + r.w + ": " + JSON.stringify(r)), i.info("Edge " + r.v + " -> " + r.w + ": ", r, " ", JSON.stringify(t.edge(r))), i.info(
|
|
306
|
+
"Fix",
|
|
307
|
+
d,
|
|
308
|
+
"ids:",
|
|
309
|
+
r.v,
|
|
310
|
+
r.w,
|
|
311
|
+
"Translating: ",
|
|
312
|
+
d.get(r.v),
|
|
313
|
+
d.get(r.w)
|
|
314
|
+
), await Z(v, g);
|
|
315
|
+
});
|
|
316
|
+
await Promise.all(f);
|
|
317
|
+
}, "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)));
|
|
318
|
+
let O = 0, { subGraphTitleTotalMargin: S } = z(o);
|
|
319
|
+
return await Promise.all(
|
|
320
|
+
oe(t).map(async function(f) {
|
|
321
|
+
const r = t.node(f);
|
|
322
|
+
if (i.info(
|
|
323
|
+
"Position XBX => " + f + ": (" + r.x,
|
|
324
|
+
"," + r.y,
|
|
325
|
+
") width: ",
|
|
326
|
+
r.width,
|
|
327
|
+
" height: ",
|
|
328
|
+
r.height
|
|
329
|
+
), r?.clusterNode)
|
|
330
|
+
r.y += S, i.info(
|
|
331
|
+
"A tainted cluster node XBX1",
|
|
332
|
+
f,
|
|
333
|
+
r.id,
|
|
334
|
+
r.width,
|
|
335
|
+
r.height,
|
|
336
|
+
r.x,
|
|
337
|
+
r.y,
|
|
338
|
+
t.parent(f)
|
|
339
|
+
), d.get(r.id).node = r, P(r);
|
|
340
|
+
else if (t.children(f).length > 0) {
|
|
341
|
+
i.info(
|
|
342
|
+
"A pure cluster node XBX1",
|
|
343
|
+
f,
|
|
344
|
+
r.id,
|
|
345
|
+
r.x,
|
|
346
|
+
r.y,
|
|
347
|
+
r.width,
|
|
348
|
+
r.height,
|
|
349
|
+
t.parent(f)
|
|
350
|
+
), r.height += S, t.node(r.parentId);
|
|
351
|
+
const g = r?.padding / 2 || 0, E = r?.labelBBox?.height || 0, N = E - g || 0;
|
|
352
|
+
i.debug("OffsetY", N, "labelHeight", E, "halfPadding", g), await K(a, r), d.get(r.id).node = r;
|
|
353
|
+
} else {
|
|
354
|
+
const g = t.node(r.parentId);
|
|
355
|
+
r.y += S / 2, i.info(
|
|
356
|
+
"A regular node XBX1 - using the padding",
|
|
357
|
+
r.id,
|
|
358
|
+
"parent",
|
|
359
|
+
r.parentId,
|
|
360
|
+
r.width,
|
|
361
|
+
r.height,
|
|
362
|
+
r.x,
|
|
363
|
+
r.y,
|
|
364
|
+
"offsetY",
|
|
365
|
+
r.offsetY,
|
|
366
|
+
"parent",
|
|
367
|
+
g,
|
|
368
|
+
g?.offsetY,
|
|
369
|
+
r
|
|
370
|
+
), P(r);
|
|
371
|
+
}
|
|
372
|
+
})
|
|
373
|
+
), t.edges().forEach(function(f) {
|
|
374
|
+
const r = t.edge(f);
|
|
375
|
+
i.info("Edge " + f.v + " -> " + f.w + ": " + JSON.stringify(r), r), r.points.forEach((x) => x.y += S / 2);
|
|
376
|
+
const g = t.node(f.v);
|
|
377
|
+
var E = t.node(f.w);
|
|
378
|
+
const N = Q(m, r, d, n, g, E, c);
|
|
379
|
+
W(r, N);
|
|
380
|
+
}), t.nodes().forEach(function(f) {
|
|
381
|
+
const r = t.node(f);
|
|
382
|
+
i.info(f, r.type, r.diff), r.isGroup && (O = r.diff);
|
|
383
|
+
}), i.warn("Returning from recursive render XAX", u, O), { elem: u, diff: O };
|
|
384
|
+
}, "recursiveRender"), ge = /* @__PURE__ */ w(async (e, t) => {
|
|
385
|
+
const n = new A({
|
|
386
|
+
multigraph: !0,
|
|
387
|
+
compound: !0
|
|
388
|
+
}).setGraph({
|
|
389
|
+
rankdir: e.direction,
|
|
390
|
+
nodesep: e.config?.nodeSpacing || e.config?.flowchart?.nodeSpacing || e.nodeSpacing,
|
|
391
|
+
ranksep: e.config?.rankSpacing || e.config?.flowchart?.rankSpacing || e.rankSpacing,
|
|
392
|
+
marginx: 8,
|
|
393
|
+
marginy: 8
|
|
394
|
+
}).setDefaultEdgeLabel(function() {
|
|
395
|
+
return {};
|
|
396
|
+
}), c = t.select("g");
|
|
397
|
+
F(c, e.markers, e.type, e.diagramId), Y(), H(), _(), te(), e.nodes.forEach((o) => {
|
|
398
|
+
n.setNode(o.id, { ...o }), o.parentId && n.setParent(o.id, o.parentId);
|
|
399
|
+
}), i.debug("Edges:", e.edges), e.edges.forEach((o) => {
|
|
400
|
+
if (o.start === o.end) {
|
|
401
|
+
const l = o.start, u = l + "---" + l + "---1", a = l + "---" + l + "---2", m = n.node(l);
|
|
402
|
+
n.setNode(u, {
|
|
403
|
+
domId: u,
|
|
404
|
+
id: u,
|
|
405
|
+
parentId: m.parentId,
|
|
406
|
+
labelStyle: "",
|
|
407
|
+
label: "",
|
|
408
|
+
padding: 0,
|
|
409
|
+
shape: "labelRect",
|
|
410
|
+
// shape: 'rect',
|
|
411
|
+
style: "",
|
|
412
|
+
width: 10,
|
|
413
|
+
height: 10
|
|
414
|
+
}), n.setParent(u, m.parentId), n.setNode(a, {
|
|
415
|
+
domId: a,
|
|
416
|
+
id: a,
|
|
417
|
+
parentId: m.parentId,
|
|
418
|
+
labelStyle: "",
|
|
419
|
+
padding: 0,
|
|
420
|
+
// shape: 'rect',
|
|
421
|
+
shape: "labelRect",
|
|
422
|
+
label: "",
|
|
423
|
+
style: "",
|
|
424
|
+
width: 10,
|
|
425
|
+
height: 10
|
|
426
|
+
}), n.setParent(a, m.parentId);
|
|
427
|
+
const v = structuredClone(o), X = structuredClone(o), y = structuredClone(o);
|
|
428
|
+
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, a, X, l + "-cyclic-special-1"), n.setEdge(a, l, y, l + "-cyc<lic-special-2");
|
|
429
|
+
} else
|
|
430
|
+
n.setEdge(o.start, o.end, { ...o }, o.id);
|
|
431
|
+
}), i.warn("Graph at first:", JSON.stringify(h(n))), se(n), i.warn("Graph after XAX:", JSON.stringify(h(n)));
|
|
432
|
+
const s = $();
|
|
433
|
+
await j(
|
|
434
|
+
c,
|
|
435
|
+
n,
|
|
436
|
+
e.type,
|
|
437
|
+
e.diagramId,
|
|
438
|
+
void 0,
|
|
439
|
+
s
|
|
440
|
+
);
|
|
441
|
+
}, "render");
|
|
442
|
+
export {
|
|
443
|
+
ge as render
|
|
444
|
+
};
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
function H(n) {
|
|
2
|
+
return Math.abs(n = Math.round(n)) >= 1e21 ? n.toLocaleString("en").replace(/,/g, "") : n.toString(10);
|
|
3
|
+
}
|
|
4
|
+
function j(n, t) {
|
|
5
|
+
if ((e = (n = t ? n.toExponential(t - 1) : n.toExponential()).indexOf("e")) < 0) return null;
|
|
6
|
+
var e, i = n.slice(0, e);
|
|
7
|
+
return [
|
|
8
|
+
i.length > 1 ? i[0] + i.slice(2) : i,
|
|
9
|
+
+n.slice(e + 1)
|
|
10
|
+
];
|
|
11
|
+
}
|
|
12
|
+
function J(n) {
|
|
13
|
+
return n = j(Math.abs(n)), n ? n[1] : NaN;
|
|
14
|
+
}
|
|
15
|
+
function K(n, t) {
|
|
16
|
+
return function(e, i) {
|
|
17
|
+
for (var o = e.length, f = [], c = 0, u = n[0], b = 0; o > 0 && u > 0 && (b + u + 1 > i && (u = Math.max(1, i - b)), f.push(e.substring(o -= u, o + u)), !((b += u + 1) > i)); )
|
|
18
|
+
u = n[c = (c + 1) % n.length];
|
|
19
|
+
return f.reverse().join(t);
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
function Q(n) {
|
|
23
|
+
return function(t) {
|
|
24
|
+
return t.replace(/[0-9]/g, function(e) {
|
|
25
|
+
return n[+e];
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
var V = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
|
|
30
|
+
function N(n) {
|
|
31
|
+
if (!(t = V.exec(n))) throw new Error("invalid format: " + n);
|
|
32
|
+
var t;
|
|
33
|
+
return new $({
|
|
34
|
+
fill: t[1],
|
|
35
|
+
align: t[2],
|
|
36
|
+
sign: t[3],
|
|
37
|
+
symbol: t[4],
|
|
38
|
+
zero: t[5],
|
|
39
|
+
width: t[6],
|
|
40
|
+
comma: t[7],
|
|
41
|
+
precision: t[8] && t[8].slice(1),
|
|
42
|
+
trim: t[9],
|
|
43
|
+
type: t[10]
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
N.prototype = $.prototype;
|
|
47
|
+
function $(n) {
|
|
48
|
+
this.fill = n.fill === void 0 ? " " : n.fill + "", this.align = n.align === void 0 ? ">" : n.align + "", this.sign = n.sign === void 0 ? "-" : n.sign + "", this.symbol = n.symbol === void 0 ? "" : n.symbol + "", this.zero = !!n.zero, this.width = n.width === void 0 ? void 0 : +n.width, this.comma = !!n.comma, this.precision = n.precision === void 0 ? void 0 : +n.precision, this.trim = !!n.trim, this.type = n.type === void 0 ? "" : n.type + "";
|
|
49
|
+
}
|
|
50
|
+
$.prototype.toString = function() {
|
|
51
|
+
return this.fill + this.align + this.sign + this.symbol + (this.zero ? "0" : "") + (this.width === void 0 ? "" : Math.max(1, this.width | 0)) + (this.comma ? "," : "") + (this.precision === void 0 ? "" : "." + Math.max(0, this.precision | 0)) + (this.trim ? "~" : "") + this.type;
|
|
52
|
+
};
|
|
53
|
+
function W(n) {
|
|
54
|
+
n: for (var t = n.length, e = 1, i = -1, o; e < t; ++e)
|
|
55
|
+
switch (n[e]) {
|
|
56
|
+
case ".":
|
|
57
|
+
i = o = e;
|
|
58
|
+
break;
|
|
59
|
+
case "0":
|
|
60
|
+
i === 0 && (i = e), o = e;
|
|
61
|
+
break;
|
|
62
|
+
default:
|
|
63
|
+
if (!+n[e]) break n;
|
|
64
|
+
i > 0 && (i = 0);
|
|
65
|
+
break;
|
|
66
|
+
}
|
|
67
|
+
return i > 0 ? n.slice(0, i) + n.slice(o + 1) : n;
|
|
68
|
+
}
|
|
69
|
+
var U;
|
|
70
|
+
function _(n, t) {
|
|
71
|
+
var e = j(n, t);
|
|
72
|
+
if (!e) return n + "";
|
|
73
|
+
var i = e[0], o = e[1], f = o - (U = Math.max(-8, Math.min(8, Math.floor(o / 3))) * 3) + 1, c = i.length;
|
|
74
|
+
return f === c ? i : f > c ? i + new Array(f - c + 1).join("0") : f > 0 ? i.slice(0, f) + "." + i.slice(f) : "0." + new Array(1 - f).join("0") + j(n, Math.max(0, t + f - 1))[0];
|
|
75
|
+
}
|
|
76
|
+
function G(n, t) {
|
|
77
|
+
var e = j(n, t);
|
|
78
|
+
if (!e) return n + "";
|
|
79
|
+
var i = e[0], o = e[1];
|
|
80
|
+
return o < 0 ? "0." + new Array(-o).join("0") + i : i.length > o + 1 ? i.slice(0, o + 1) + "." + i.slice(o + 1) : i + new Array(o - i.length + 2).join("0");
|
|
81
|
+
}
|
|
82
|
+
const I = {
|
|
83
|
+
"%": (n, t) => (n * 100).toFixed(t),
|
|
84
|
+
b: (n) => Math.round(n).toString(2),
|
|
85
|
+
c: (n) => n + "",
|
|
86
|
+
d: H,
|
|
87
|
+
e: (n, t) => n.toExponential(t),
|
|
88
|
+
f: (n, t) => n.toFixed(t),
|
|
89
|
+
g: (n, t) => n.toPrecision(t),
|
|
90
|
+
o: (n) => Math.round(n).toString(8),
|
|
91
|
+
p: (n, t) => G(n * 100, t),
|
|
92
|
+
r: G,
|
|
93
|
+
s: _,
|
|
94
|
+
X: (n) => Math.round(n).toString(16).toUpperCase(),
|
|
95
|
+
x: (n) => Math.round(n).toString(16)
|
|
96
|
+
};
|
|
97
|
+
function X(n) {
|
|
98
|
+
return n;
|
|
99
|
+
}
|
|
100
|
+
var O = Array.prototype.map, R = ["y", "z", "a", "f", "p", "n", "µ", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y"];
|
|
101
|
+
function v(n) {
|
|
102
|
+
var t = n.grouping === void 0 || n.thousands === void 0 ? X : K(O.call(n.grouping, Number), n.thousands + ""), e = n.currency === void 0 ? "" : n.currency[0] + "", i = n.currency === void 0 ? "" : n.currency[1] + "", o = n.decimal === void 0 ? "." : n.decimal + "", f = n.numerals === void 0 ? X : Q(O.call(n.numerals, String)), c = n.percent === void 0 ? "%" : n.percent + "", u = n.minus === void 0 ? "−" : n.minus + "", b = n.nan === void 0 ? "NaN" : n.nan + "";
|
|
103
|
+
function F(a) {
|
|
104
|
+
a = N(a);
|
|
105
|
+
var x = a.fill, M = a.align, m = a.sign, w = a.symbol, l = a.zero, S = a.width, E = a.comma, g = a.precision, L = a.trim, d = a.type;
|
|
106
|
+
d === "n" ? (E = !0, d = "g") : I[d] || (g === void 0 && (g = 12), L = !0, d = "g"), (l || x === "0" && M === "=") && (l = !0, x = "0", M = "=");
|
|
107
|
+
var Z = w === "$" ? e : w === "#" && /[boxX]/.test(d) ? "0" + d.toLowerCase() : "", q = w === "$" ? i : /[%p]/.test(d) ? c : "", T = I[d], B = /[defgprs%]/.test(d);
|
|
108
|
+
g = g === void 0 ? 6 : /[gprs]/.test(d) ? Math.max(1, Math.min(21, g)) : Math.max(0, Math.min(20, g));
|
|
109
|
+
function C(r) {
|
|
110
|
+
var y = Z, h = q, p, D, k;
|
|
111
|
+
if (d === "c")
|
|
112
|
+
h = T(r) + h, r = "";
|
|
113
|
+
else {
|
|
114
|
+
r = +r;
|
|
115
|
+
var P = r < 0 || 1 / r < 0;
|
|
116
|
+
if (r = isNaN(r) ? b : T(Math.abs(r), g), L && (r = W(r)), P && +r == 0 && m !== "+" && (P = !1), y = (P ? m === "(" ? m : u : m === "-" || m === "(" ? "" : m) + y, h = (d === "s" ? R[8 + U / 3] : "") + h + (P && m === "(" ? ")" : ""), B) {
|
|
117
|
+
for (p = -1, D = r.length; ++p < D; )
|
|
118
|
+
if (k = r.charCodeAt(p), 48 > k || k > 57) {
|
|
119
|
+
h = (k === 46 ? o + r.slice(p + 1) : r.slice(p)) + h, r = r.slice(0, p);
|
|
120
|
+
break;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
E && !l && (r = t(r, 1 / 0));
|
|
125
|
+
var z = y.length + r.length + h.length, s = z < S ? new Array(S - z + 1).join(x) : "";
|
|
126
|
+
switch (E && l && (r = t(s + r, s.length ? S - h.length : 1 / 0), s = ""), M) {
|
|
127
|
+
case "<":
|
|
128
|
+
r = y + r + h + s;
|
|
129
|
+
break;
|
|
130
|
+
case "=":
|
|
131
|
+
r = y + s + r + h;
|
|
132
|
+
break;
|
|
133
|
+
case "^":
|
|
134
|
+
r = s.slice(0, z = s.length >> 1) + y + r + h + s.slice(z);
|
|
135
|
+
break;
|
|
136
|
+
default:
|
|
137
|
+
r = s + y + r + h;
|
|
138
|
+
break;
|
|
139
|
+
}
|
|
140
|
+
return f(r);
|
|
141
|
+
}
|
|
142
|
+
return C.toString = function() {
|
|
143
|
+
return a + "";
|
|
144
|
+
}, C;
|
|
145
|
+
}
|
|
146
|
+
function Y(a, x) {
|
|
147
|
+
var M = F((a = N(a), a.type = "f", a)), m = Math.max(-8, Math.min(8, Math.floor(J(x) / 3))) * 3, w = Math.pow(10, -m), l = R[8 + m / 3];
|
|
148
|
+
return function(S) {
|
|
149
|
+
return M(w * S) + l;
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
return {
|
|
153
|
+
format: F,
|
|
154
|
+
formatPrefix: Y
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
var A, nn, tn;
|
|
158
|
+
rn({
|
|
159
|
+
thousands: ",",
|
|
160
|
+
grouping: [3],
|
|
161
|
+
currency: ["$", ""]
|
|
162
|
+
});
|
|
163
|
+
function rn(n) {
|
|
164
|
+
return A = v(n), nn = A.format, tn = A.formatPrefix, A;
|
|
165
|
+
}
|
|
166
|
+
export {
|
|
167
|
+
J as exponent,
|
|
168
|
+
nn as format,
|
|
169
|
+
tn as formatPrefix,
|
|
170
|
+
N as formatSpecifier
|
|
171
|
+
};
|