lowcoder-comps 0.0.26 → 0.0.28
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/000297fb.js +5 -0
- package/{92fb34a2.js → 0205ce17.js} +27 -27
- package/{3f63d12d.js → 1269154d.js} +32711 -34763
- package/{6fbc4c21.js → 1f088099.js} +18 -18
- package/{2b3b3386.js → 2ae47d58.js} +548 -548
- package/2ff7471d.js +9 -0
- package/{44cd1a62.js → 42b75267.js} +11 -11
- package/{ed8c376c.js → 45a7c119.js} +286 -293
- package/4bc5ef7f.js +881 -0
- package/{90d3581f.js → 4c822e6b.js} +133 -132
- package/5bb002c8.js +64 -0
- package/{82c8e71b.js → 6517e88b.js} +12 -10
- package/65d3daa9.js +391 -0
- package/{87b4699c.js → 6909d829.js} +1 -1
- package/{b28dda80.js → 711961f8.js} +13 -12
- package/77491f00.js +86 -0
- package/7805c934.js +455 -0
- package/7dc7ce37.js +19104 -0
- package/{c3caea77.js → 83feec48.js} +45 -43
- package/{c66d9114.js → 8c8fb30b.js} +25 -24
- package/{3220cb2e.js → 945d7302.js} +2 -1
- package/{4891fa68.js → 9a9b397d.js} +6 -5
- package/{3ebbaeae.js → a2d32dbb.js} +18 -18
- package/{2c0287e1.js → a39d3869.js} +2 -2
- package/a40faea7.js +11624 -0
- package/b7bda09a.js +237 -0
- package/{5f138044.js → b99f5b2a.js} +158 -147
- package/bcc07d29.js +1536 -0
- package/c2bf7d82.js +819 -0
- package/c4bd6ed7.js +1269 -0
- package/c4c5f13b.js +8 -0
- package/d2bae1f4.js +2284 -0
- package/d4b9d281.js +1089 -0
- package/{11b36d97.js → d4ba48b2.js} +148 -145
- package/dd0ec77a.js +48428 -0
- package/{c889073f.js → e0bacb89.js} +1 -1
- package/{b70abaaf.js → e437d53e.js} +1 -1
- package/e95fa522.js +1102 -0
- package/ed46c11a.js +1276 -0
- package/f2b8cbc8.js +25 -0
- package/index.js +2 -2
- package/package.json +1 -1
- package/33035c6f.js +0 -86
- package/3f82489c.js +0 -2396
- package/454ca826.js +0 -46724
- package/4938ecf8.js +0 -22
- package/558b96ef.js +0 -18798
- package/596b7f71.js +0 -365
- package/637a168a.js +0 -235
- package/765a2a38.js +0 -1055
- package/8ed940ee.js +0 -786
- package/9c1ceb2f.js +0 -448
- package/aad4f2fa.js +0 -1235
- package/b053e17f.js +0 -1000
- package/bed24264.js +0 -2192
- package/d3478475.js +0 -64
package/8ed940ee.js
DELETED
|
@@ -1,786 +0,0 @@
|
|
|
1
|
-
import { p as St, f as W } from "./5f138044.js";
|
|
2
|
-
import { h as S, u as Lt, r as Et, p as _t, l as Tt, d as M, f as tt, G as Nt } from "./3f82489c.js";
|
|
3
|
-
import { h as m, n as P, o as z, p as et, c as J, j as rt, l as R, q as V, r as At } from "./3f63d12d.js";
|
|
4
|
-
import { a as N, b as at, i as nt, c as _, e as st, d as it, f as Ct, g as It, s as Bt } from "./9c1ceb2f.js";
|
|
5
|
-
import { l as Mt } from "./b70abaaf.js";
|
|
6
|
-
import "./596b7f71.js";
|
|
7
|
-
import "./b053e17f.js";
|
|
8
|
-
import "./3220cb2e.js";
|
|
9
|
-
import "./2ff2c7a6.js";
|
|
10
|
-
import "./256b619e.js";
|
|
11
|
-
function Dt(r) {
|
|
12
|
-
if (!r.ok)
|
|
13
|
-
throw new Error(r.status + " " + r.statusText);
|
|
14
|
-
return r.text();
|
|
15
|
-
}
|
|
16
|
-
function Rt(r, e) {
|
|
17
|
-
return fetch(r, e).then(Dt);
|
|
18
|
-
}
|
|
19
|
-
function Gt(r) {
|
|
20
|
-
return (e, t) => Rt(e, t).then((n) => new DOMParser().parseFromString(n, r));
|
|
21
|
-
}
|
|
22
|
-
var Pt = Gt("image/svg+xml"), Y = {
|
|
23
|
-
normal: $t,
|
|
24
|
-
vee: Wt,
|
|
25
|
-
undirected: Vt
|
|
26
|
-
};
|
|
27
|
-
function Ut(r) {
|
|
28
|
-
Y = r;
|
|
29
|
-
}
|
|
30
|
-
function $t(r, e, t, n) {
|
|
31
|
-
var a = r.append("marker").attr("id", e).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerUnits", "strokeWidth").attr("markerWidth", 8).attr("markerHeight", 6).attr("orient", "auto"), s = a.append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").style("stroke-width", 1).style("stroke-dasharray", "1,0");
|
|
32
|
-
N(s, t[n + "Style"]), t[n + "Class"] && s.attr("class", t[n + "Class"]);
|
|
33
|
-
}
|
|
34
|
-
function Wt(r, e, t, n) {
|
|
35
|
-
var a = r.append("marker").attr("id", e).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerUnits", "strokeWidth").attr("markerWidth", 8).attr("markerHeight", 6).attr("orient", "auto"), s = a.append("path").attr("d", "M 0 0 L 10 5 L 0 10 L 4 5 z").style("stroke-width", 1).style("stroke-dasharray", "1,0");
|
|
36
|
-
N(s, t[n + "Style"]), t[n + "Class"] && s.attr("class", t[n + "Class"]);
|
|
37
|
-
}
|
|
38
|
-
function Vt(r, e, t, n) {
|
|
39
|
-
var a = r.append("marker").attr("id", e).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerUnits", "strokeWidth").attr("markerWidth", 8).attr("markerHeight", 6).attr("orient", "auto"), s = a.append("path").attr("d", "M 0 5 L 10 5").style("stroke-width", 1).style("stroke-dasharray", "1,0");
|
|
40
|
-
N(s, t[n + "Style"]), t[n + "Class"] && s.attr("class", t[n + "Class"]);
|
|
41
|
-
}
|
|
42
|
-
function zt(r, e) {
|
|
43
|
-
var t = r;
|
|
44
|
-
return t.node().appendChild(e.label), N(t, e.labelStyle), t;
|
|
45
|
-
}
|
|
46
|
-
function Yt(r, e) {
|
|
47
|
-
for (var t = r.append("text"), n = Ht(e.label).split(`
|
|
48
|
-
`), a = 0; a < n.length; a++)
|
|
49
|
-
t.append("tspan").attr("xml:space", "preserve").attr("dy", "1em").attr("x", "1").text(n[a]);
|
|
50
|
-
return N(t, e.labelStyle), t;
|
|
51
|
-
}
|
|
52
|
-
function Ht(r) {
|
|
53
|
-
for (var e = "", t = !1, n, a = 0; a < r.length; ++a)
|
|
54
|
-
if (n = r[a], t) {
|
|
55
|
-
switch (n) {
|
|
56
|
-
case "n":
|
|
57
|
-
e += `
|
|
58
|
-
`;
|
|
59
|
-
break;
|
|
60
|
-
default:
|
|
61
|
-
e += n;
|
|
62
|
-
}
|
|
63
|
-
t = !1;
|
|
64
|
-
} else
|
|
65
|
-
n === "\\" ? t = !0 : e += n;
|
|
66
|
-
return e;
|
|
67
|
-
}
|
|
68
|
-
function K(r, e, t) {
|
|
69
|
-
var n = e.label, a = r.append("g");
|
|
70
|
-
e.labelType === "svg" ? zt(a, e) : typeof n != "string" || e.labelType === "html" ? at(a, e) : Yt(a, e);
|
|
71
|
-
var s = a.node().getBBox(), i;
|
|
72
|
-
switch (t) {
|
|
73
|
-
case "top":
|
|
74
|
-
i = -e.height / 2;
|
|
75
|
-
break;
|
|
76
|
-
case "bottom":
|
|
77
|
-
i = e.height / 2 - s.height;
|
|
78
|
-
break;
|
|
79
|
-
default:
|
|
80
|
-
i = -s.height / 2;
|
|
81
|
-
}
|
|
82
|
-
return a.attr("transform", "translate(" + -s.width / 2 + "," + i + ")"), a;
|
|
83
|
-
}
|
|
84
|
-
var H = function(r, e) {
|
|
85
|
-
var t = e.nodes().filter(function(s) {
|
|
86
|
-
return nt(e, s);
|
|
87
|
-
}), n = r.selectAll("g.cluster").data(t, function(s) {
|
|
88
|
-
return s;
|
|
89
|
-
});
|
|
90
|
-
_(n.exit(), e).style("opacity", 0).remove();
|
|
91
|
-
var a = n.enter().append("g").attr("class", "cluster").attr("id", function(s) {
|
|
92
|
-
var i = e.node(s);
|
|
93
|
-
return i.id;
|
|
94
|
-
}).style("opacity", 0).each(function(s) {
|
|
95
|
-
var i = e.node(s), o = m(this);
|
|
96
|
-
m(this).append("rect");
|
|
97
|
-
var c = o.append("g").attr("class", "label");
|
|
98
|
-
K(c, i, i.clusterLabelPos);
|
|
99
|
-
});
|
|
100
|
-
return n = n.merge(a), n = _(n, e).style("opacity", 1), n.selectAll("rect").each(function(s) {
|
|
101
|
-
var i = e.node(s), o = m(this);
|
|
102
|
-
N(o, i.style);
|
|
103
|
-
}), n;
|
|
104
|
-
};
|
|
105
|
-
function Xt(r) {
|
|
106
|
-
H = r;
|
|
107
|
-
}
|
|
108
|
-
let X = function(r, e) {
|
|
109
|
-
var t = r.selectAll("g.edgeLabel").data(e.edges(), function(a) {
|
|
110
|
-
return st(a);
|
|
111
|
-
}).classed("update", !0);
|
|
112
|
-
t.exit().remove(), t.enter().append("g").classed("edgeLabel", !0).style("opacity", 0), t = r.selectAll("g.edgeLabel"), t.each(function(a) {
|
|
113
|
-
var s = m(this);
|
|
114
|
-
s.select(".label").remove();
|
|
115
|
-
var i = e.edge(a), o = K(s, e.edge(a), 0).classed("label", !0), c = o.node().getBBox();
|
|
116
|
-
i.labelId && o.attr("id", i.labelId), S(i, "width") || (i.width = c.width), S(i, "height") || (i.height = c.height);
|
|
117
|
-
});
|
|
118
|
-
var n;
|
|
119
|
-
return t.exit ? n = t.exit() : n = t.selectAll(null), _(n, e).style("opacity", 0).remove(), t;
|
|
120
|
-
};
|
|
121
|
-
function Ft(r) {
|
|
122
|
-
X = r;
|
|
123
|
-
}
|
|
124
|
-
function O(r, e) {
|
|
125
|
-
return r.intersect(e);
|
|
126
|
-
}
|
|
127
|
-
var F = function(r, e, t) {
|
|
128
|
-
var n = r.selectAll("g.edgePath").data(e.edges(), function(i) {
|
|
129
|
-
return st(i);
|
|
130
|
-
}).classed("update", !0), a = Zt(n, e);
|
|
131
|
-
Ot(n, e);
|
|
132
|
-
var s = n.merge !== void 0 ? n.merge(a) : n;
|
|
133
|
-
return _(s, e).style("opacity", 1), s.each(function(i) {
|
|
134
|
-
var o = m(this), c = e.edge(i);
|
|
135
|
-
c.elem = this, c.id && o.attr("id", c.id), it(
|
|
136
|
-
o,
|
|
137
|
-
c.class,
|
|
138
|
-
(o.classed("update") ? "update " : "") + "edgePath"
|
|
139
|
-
);
|
|
140
|
-
}), s.selectAll("path.path").each(function(i) {
|
|
141
|
-
var o = e.edge(i);
|
|
142
|
-
o.arrowheadId = Lt("arrowhead");
|
|
143
|
-
var c = m(this).attr("marker-end", function() {
|
|
144
|
-
return "url(" + Qt(location.href, o.arrowheadId) + ")";
|
|
145
|
-
}).style("fill", "none");
|
|
146
|
-
_(c, e).attr("d", function(d) {
|
|
147
|
-
return Jt(e, d);
|
|
148
|
-
}), N(c, o.style);
|
|
149
|
-
}), s.selectAll("defs *").remove(), s.selectAll("defs").each(function(i) {
|
|
150
|
-
var o = e.edge(i), c = t[o.arrowhead];
|
|
151
|
-
c(m(this), o.arrowheadId, o, "arrowhead");
|
|
152
|
-
}), s;
|
|
153
|
-
};
|
|
154
|
-
function qt(r) {
|
|
155
|
-
F = r;
|
|
156
|
-
}
|
|
157
|
-
function Qt(r, e) {
|
|
158
|
-
var t = r.split("#")[0];
|
|
159
|
-
return t + "#" + e;
|
|
160
|
-
}
|
|
161
|
-
function Jt(r, e) {
|
|
162
|
-
var t = r.edge(e), n = r.node(e.v), a = r.node(e.w), s = t.points.slice(1, t.points.length - 1);
|
|
163
|
-
return s.unshift(O(n, s[0])), s.push(O(a, s[s.length - 1])), ot(t, s);
|
|
164
|
-
}
|
|
165
|
-
function ot(r, e) {
|
|
166
|
-
var t = (Mt || Pt.line)().x(function(n) {
|
|
167
|
-
return n.x;
|
|
168
|
-
}).y(function(n) {
|
|
169
|
-
return n.y;
|
|
170
|
-
});
|
|
171
|
-
return (t.curve || t.interpolate)(r.curve), t(e);
|
|
172
|
-
}
|
|
173
|
-
function Kt(r) {
|
|
174
|
-
var e = r.getBBox(), t = r.ownerSVGElement.getScreenCTM().inverse().multiply(r.getScreenCTM()).translate(e.width / 2, e.height / 2);
|
|
175
|
-
return { x: t.e, y: t.f };
|
|
176
|
-
}
|
|
177
|
-
function Zt(r, e) {
|
|
178
|
-
var t = r.enter().append("g").attr("class", "edgePath").style("opacity", 0);
|
|
179
|
-
return t.append("path").attr("class", "path").attr("d", function(n) {
|
|
180
|
-
var a = e.edge(n), s = e.node(n.v).elem, i = Et(a.points.length).map(function() {
|
|
181
|
-
return Kt(s);
|
|
182
|
-
});
|
|
183
|
-
return ot(a, i);
|
|
184
|
-
}), t.append("defs"), t;
|
|
185
|
-
}
|
|
186
|
-
function Ot(r, e) {
|
|
187
|
-
var t = r.exit();
|
|
188
|
-
_(t, e).style("opacity", 0).remove();
|
|
189
|
-
}
|
|
190
|
-
var q = function(r, e, t) {
|
|
191
|
-
var n = e.nodes().filter(function(i) {
|
|
192
|
-
return !nt(e, i);
|
|
193
|
-
}), a = r.selectAll("g.node").data(n, function(i) {
|
|
194
|
-
return i;
|
|
195
|
-
}).classed("update", !0);
|
|
196
|
-
a.exit().remove(), a.enter().append("g").attr("class", "node").style("opacity", 0), a = r.selectAll("g.node"), a.each(function(i) {
|
|
197
|
-
var o = e.node(i), c = m(this);
|
|
198
|
-
it(
|
|
199
|
-
c,
|
|
200
|
-
o.class,
|
|
201
|
-
(c.classed("update") ? "update " : "") + "node"
|
|
202
|
-
), c.select("g.label").remove();
|
|
203
|
-
var d = c.append("g").attr("class", "label"), l = K(d, o), v = t[o.shape], h = _t(l.node().getBBox(), "width", "height");
|
|
204
|
-
o.elem = this, o.id && c.attr("id", o.id), o.labelId && d.attr("id", o.labelId), S(o, "width") && (h.width = o.width), S(o, "height") && (h.height = o.height), h.width += o.paddingLeft + o.paddingRight, h.height += o.paddingTop + o.paddingBottom, d.attr(
|
|
205
|
-
"transform",
|
|
206
|
-
"translate(" + (o.paddingLeft - o.paddingRight) / 2 + "," + (o.paddingTop - o.paddingBottom) / 2 + ")"
|
|
207
|
-
);
|
|
208
|
-
var u = m(this);
|
|
209
|
-
u.select(".label-container").remove();
|
|
210
|
-
var p = v(u, h, o).classed("label-container", !0);
|
|
211
|
-
N(p, o.style);
|
|
212
|
-
var g = p.node().getBBox();
|
|
213
|
-
o.width = g.width, o.height = g.height;
|
|
214
|
-
});
|
|
215
|
-
var s;
|
|
216
|
-
return a.exit ? s = a.exit() : s = a.selectAll(null), _(s, e).style("opacity", 0).remove(), a;
|
|
217
|
-
};
|
|
218
|
-
function jt(r) {
|
|
219
|
-
q = r;
|
|
220
|
-
}
|
|
221
|
-
function te(r, e) {
|
|
222
|
-
var t = r.filter(function() {
|
|
223
|
-
return !m(this).classed("update");
|
|
224
|
-
});
|
|
225
|
-
function n(a) {
|
|
226
|
-
var s = e.node(a);
|
|
227
|
-
return "translate(" + s.x + "," + s.y + ")";
|
|
228
|
-
}
|
|
229
|
-
t.attr("transform", n), _(r, e).style("opacity", 1).attr("transform", n), _(t.selectAll("rect"), e).attr("width", function(a) {
|
|
230
|
-
return e.node(a).width;
|
|
231
|
-
}).attr("height", function(a) {
|
|
232
|
-
return e.node(a).height;
|
|
233
|
-
}).attr("x", function(a) {
|
|
234
|
-
var s = e.node(a);
|
|
235
|
-
return -s.width / 2;
|
|
236
|
-
}).attr("y", function(a) {
|
|
237
|
-
var s = e.node(a);
|
|
238
|
-
return -s.height / 2;
|
|
239
|
-
});
|
|
240
|
-
}
|
|
241
|
-
function ee(r, e) {
|
|
242
|
-
var t = r.filter(function() {
|
|
243
|
-
return !m(this).classed("update");
|
|
244
|
-
});
|
|
245
|
-
function n(a) {
|
|
246
|
-
var s = e.edge(a);
|
|
247
|
-
return S(s, "x") ? "translate(" + s.x + "," + s.y + ")" : "";
|
|
248
|
-
}
|
|
249
|
-
t.attr("transform", n), _(r, e).style("opacity", 1).attr("transform", n);
|
|
250
|
-
}
|
|
251
|
-
function re(r, e) {
|
|
252
|
-
var t = r.filter(function() {
|
|
253
|
-
return !m(this).classed("update");
|
|
254
|
-
});
|
|
255
|
-
function n(a) {
|
|
256
|
-
var s = e.node(a);
|
|
257
|
-
return "translate(" + s.x + "," + s.y + ")";
|
|
258
|
-
}
|
|
259
|
-
t.attr("transform", n), _(r, e).style("opacity", 1).attr("transform", n);
|
|
260
|
-
}
|
|
261
|
-
function lt(r, e, t, n) {
|
|
262
|
-
var a = r.x, s = r.y, i = a - n.x, o = s - n.y, c = Math.sqrt(e * e * o * o + t * t * i * i), d = Math.abs(e * t * i / c);
|
|
263
|
-
n.x < a && (d = -d);
|
|
264
|
-
var l = Math.abs(e * t * o / c);
|
|
265
|
-
return n.y < s && (l = -l), { x: a + d, y: s + l };
|
|
266
|
-
}
|
|
267
|
-
function ae(r, e, t) {
|
|
268
|
-
return lt(r, e, e, t);
|
|
269
|
-
}
|
|
270
|
-
function ne(r, e, t, n) {
|
|
271
|
-
var a, s, i, o, c, d, l, v, h, u, p, g, f, y, k;
|
|
272
|
-
if (a = e.y - r.y, i = r.x - e.x, c = e.x * r.y - r.x * e.y, h = a * t.x + i * t.y + c, u = a * n.x + i * n.y + c, !(h !== 0 && u !== 0 && j(h, u)) && (s = n.y - t.y, o = t.x - n.x, d = n.x * t.y - t.x * n.y, l = s * r.x + o * r.y + d, v = s * e.x + o * e.y + d, !(l !== 0 && v !== 0 && j(l, v)) && (p = a * o - s * i, p !== 0)))
|
|
273
|
-
return g = Math.abs(p / 2), f = i * d - o * c, y = f < 0 ? (f - g) / p : (f + g) / p, f = s * c - a * d, k = f < 0 ? (f - g) / p : (f + g) / p, { x: y, y: k };
|
|
274
|
-
}
|
|
275
|
-
function j(r, e) {
|
|
276
|
-
return r * e > 0;
|
|
277
|
-
}
|
|
278
|
-
function T(r, e, t) {
|
|
279
|
-
var n = r.x, a = r.y, s = [], i = Number.POSITIVE_INFINITY, o = Number.POSITIVE_INFINITY;
|
|
280
|
-
e.forEach(function(p) {
|
|
281
|
-
i = Math.min(i, p.x), o = Math.min(o, p.y);
|
|
282
|
-
});
|
|
283
|
-
for (var c = n - r.width / 2 - i, d = a - r.height / 2 - o, l = 0; l < e.length; l++) {
|
|
284
|
-
var v = e[l], h = e[l < e.length - 1 ? l + 1 : 0], u = ne(
|
|
285
|
-
r,
|
|
286
|
-
t,
|
|
287
|
-
{ x: c + v.x, y: d + v.y },
|
|
288
|
-
{ x: c + h.x, y: d + h.y }
|
|
289
|
-
);
|
|
290
|
-
u && s.push(u);
|
|
291
|
-
}
|
|
292
|
-
return s.length ? (s.length > 1 && s.sort(function(p, g) {
|
|
293
|
-
var f = p.x - t.x, y = p.y - t.y, k = Math.sqrt(f * f + y * y), I = g.x - t.x, E = g.y - t.y, U = Math.sqrt(I * I + E * E);
|
|
294
|
-
return k < U ? -1 : k === U ? 0 : 1;
|
|
295
|
-
}), s[0]) : (console.log("NO INTERSECTION FOUND, RETURN NODE CENTER", r), r);
|
|
296
|
-
}
|
|
297
|
-
function Z(r, e) {
|
|
298
|
-
var t = r.x, n = r.y, a = e.x - t, s = e.y - n, i = r.width / 2, o = r.height / 2, c, d;
|
|
299
|
-
return Math.abs(s) * i > Math.abs(a) * o ? (s < 0 && (o = -o), c = s === 0 ? 0 : o * a / s, d = o) : (a < 0 && (i = -i), c = i, d = a === 0 ? 0 : i * s / a), { x: t + c, y: n + d };
|
|
300
|
-
}
|
|
301
|
-
var Q = {
|
|
302
|
-
rect: ie,
|
|
303
|
-
ellipse: oe,
|
|
304
|
-
circle: le,
|
|
305
|
-
diamond: ce
|
|
306
|
-
};
|
|
307
|
-
function se(r) {
|
|
308
|
-
Q = r;
|
|
309
|
-
}
|
|
310
|
-
function ie(r, e, t) {
|
|
311
|
-
var n = r.insert("rect", ":first-child").attr("rx", t.rx).attr("ry", t.ry).attr("x", -e.width / 2).attr("y", -e.height / 2).attr("width", e.width).attr("height", e.height);
|
|
312
|
-
return t.intersect = function(a) {
|
|
313
|
-
return Z(t, a);
|
|
314
|
-
}, n;
|
|
315
|
-
}
|
|
316
|
-
function oe(r, e, t) {
|
|
317
|
-
var n = e.width / 2, a = e.height / 2, s = r.insert("ellipse", ":first-child").attr("x", -e.width / 2).attr("y", -e.height / 2).attr("rx", n).attr("ry", a);
|
|
318
|
-
return t.intersect = function(i) {
|
|
319
|
-
return lt(t, n, a, i);
|
|
320
|
-
}, s;
|
|
321
|
-
}
|
|
322
|
-
function le(r, e, t) {
|
|
323
|
-
var n = Math.max(e.width, e.height) / 2, a = r.insert("circle", ":first-child").attr("x", -e.width / 2).attr("y", -e.height / 2).attr("r", n);
|
|
324
|
-
return t.intersect = function(s) {
|
|
325
|
-
return ae(t, n, s);
|
|
326
|
-
}, a;
|
|
327
|
-
}
|
|
328
|
-
function ce(r, e, t) {
|
|
329
|
-
var n = e.width * Math.SQRT2 / 2, a = e.height * Math.SQRT2 / 2, s = [
|
|
330
|
-
{ x: 0, y: -a },
|
|
331
|
-
{ x: -n, y: 0 },
|
|
332
|
-
{ x: 0, y: a },
|
|
333
|
-
{ x: n, y: 0 }
|
|
334
|
-
], i = r.insert("polygon", ":first-child").attr(
|
|
335
|
-
"points",
|
|
336
|
-
s.map(function(o) {
|
|
337
|
-
return o.x + "," + o.y;
|
|
338
|
-
}).join(" ")
|
|
339
|
-
);
|
|
340
|
-
return t.intersect = function(o) {
|
|
341
|
-
return T(t, s, o);
|
|
342
|
-
}, i;
|
|
343
|
-
}
|
|
344
|
-
function de() {
|
|
345
|
-
var r = function(e, t) {
|
|
346
|
-
fe(t);
|
|
347
|
-
var n = D(e, "output"), a = D(n, "clusters"), s = D(n, "edgePaths"), i = X(D(n, "edgeLabels"), t), o = q(D(n, "nodes"), t, Q);
|
|
348
|
-
Tt(t), re(o, t), ee(i, t), F(s, t, Y);
|
|
349
|
-
var c = H(a, t);
|
|
350
|
-
te(c, t), pe(t);
|
|
351
|
-
};
|
|
352
|
-
return r.createNodes = function(e) {
|
|
353
|
-
return arguments.length ? (jt(e), r) : q;
|
|
354
|
-
}, r.createClusters = function(e) {
|
|
355
|
-
return arguments.length ? (Xt(e), r) : H;
|
|
356
|
-
}, r.createEdgeLabels = function(e) {
|
|
357
|
-
return arguments.length ? (Ft(e), r) : X;
|
|
358
|
-
}, r.createEdgePaths = function(e) {
|
|
359
|
-
return arguments.length ? (qt(e), r) : F;
|
|
360
|
-
}, r.shapes = function(e) {
|
|
361
|
-
return arguments.length ? (se(e), r) : Q;
|
|
362
|
-
}, r.arrows = function(e) {
|
|
363
|
-
return arguments.length ? (Ut(e), r) : Y;
|
|
364
|
-
}, r;
|
|
365
|
-
}
|
|
366
|
-
var he = {
|
|
367
|
-
paddingLeft: 10,
|
|
368
|
-
paddingRight: 10,
|
|
369
|
-
paddingTop: 10,
|
|
370
|
-
paddingBottom: 10,
|
|
371
|
-
rx: 0,
|
|
372
|
-
ry: 0,
|
|
373
|
-
shape: "rect"
|
|
374
|
-
}, ue = {
|
|
375
|
-
arrowhead: "normal",
|
|
376
|
-
curve: P
|
|
377
|
-
};
|
|
378
|
-
function fe(r) {
|
|
379
|
-
r.nodes().forEach(function(e) {
|
|
380
|
-
var t = r.node(e);
|
|
381
|
-
!S(t, "label") && !r.children(e).length && (t.label = e), S(t, "paddingX") && M(t, {
|
|
382
|
-
paddingLeft: t.paddingX,
|
|
383
|
-
paddingRight: t.paddingX
|
|
384
|
-
}), S(t, "paddingY") && M(t, {
|
|
385
|
-
paddingTop: t.paddingY,
|
|
386
|
-
paddingBottom: t.paddingY
|
|
387
|
-
}), S(t, "padding") && M(t, {
|
|
388
|
-
paddingLeft: t.padding,
|
|
389
|
-
paddingRight: t.padding,
|
|
390
|
-
paddingTop: t.padding,
|
|
391
|
-
paddingBottom: t.padding
|
|
392
|
-
}), M(t, he), tt(["paddingLeft", "paddingRight", "paddingTop", "paddingBottom"], function(n) {
|
|
393
|
-
t[n] = Number(t[n]);
|
|
394
|
-
}), S(t, "width") && (t._prevWidth = t.width), S(t, "height") && (t._prevHeight = t.height);
|
|
395
|
-
}), r.edges().forEach(function(e) {
|
|
396
|
-
var t = r.edge(e);
|
|
397
|
-
S(t, "label") || (t.label = ""), M(t, ue);
|
|
398
|
-
});
|
|
399
|
-
}
|
|
400
|
-
function pe(r) {
|
|
401
|
-
tt(r.nodes(), function(e) {
|
|
402
|
-
var t = r.node(e);
|
|
403
|
-
S(t, "_prevWidth") ? t.width = t._prevWidth : delete t.width, S(t, "_prevHeight") ? t.height = t._prevHeight : delete t.height, delete t._prevWidth, delete t._prevHeight;
|
|
404
|
-
});
|
|
405
|
-
}
|
|
406
|
-
function D(r, e) {
|
|
407
|
-
var t = r.select("g." + e);
|
|
408
|
-
return t.empty() && (t = r.append("g").attr("class", e)), t;
|
|
409
|
-
}
|
|
410
|
-
function ct(r, e, t) {
|
|
411
|
-
const n = e.width, a = e.height, s = (n + a) * 0.9, i = [
|
|
412
|
-
{ x: s / 2, y: 0 },
|
|
413
|
-
{ x: s, y: -s / 2 },
|
|
414
|
-
{ x: s / 2, y: -s },
|
|
415
|
-
{ x: 0, y: -s / 2 }
|
|
416
|
-
], o = A(r, s, s, i);
|
|
417
|
-
return t.intersect = function(c) {
|
|
418
|
-
return T(t, i, c);
|
|
419
|
-
}, o;
|
|
420
|
-
}
|
|
421
|
-
function dt(r, e, t) {
|
|
422
|
-
const a = e.height, s = a / 4, i = e.width + 2 * s, o = [
|
|
423
|
-
{ x: s, y: 0 },
|
|
424
|
-
{ x: i - s, y: 0 },
|
|
425
|
-
{ x: i, y: -a / 2 },
|
|
426
|
-
{ x: i - s, y: -a },
|
|
427
|
-
{ x: s, y: -a },
|
|
428
|
-
{ x: 0, y: -a / 2 }
|
|
429
|
-
], c = A(r, i, a, o);
|
|
430
|
-
return t.intersect = function(d) {
|
|
431
|
-
return T(t, o, d);
|
|
432
|
-
}, c;
|
|
433
|
-
}
|
|
434
|
-
function ht(r, e, t) {
|
|
435
|
-
const n = e.width, a = e.height, s = [
|
|
436
|
-
{ x: -a / 2, y: 0 },
|
|
437
|
-
{ x: n, y: 0 },
|
|
438
|
-
{ x: n, y: -a },
|
|
439
|
-
{ x: -a / 2, y: -a },
|
|
440
|
-
{ x: 0, y: -a / 2 }
|
|
441
|
-
], i = A(r, n, a, s);
|
|
442
|
-
return t.intersect = function(o) {
|
|
443
|
-
return T(t, s, o);
|
|
444
|
-
}, i;
|
|
445
|
-
}
|
|
446
|
-
function ut(r, e, t) {
|
|
447
|
-
const n = e.width, a = e.height, s = [
|
|
448
|
-
{ x: -2 * a / 6, y: 0 },
|
|
449
|
-
{ x: n - a / 6, y: 0 },
|
|
450
|
-
{ x: n + 2 * a / 6, y: -a },
|
|
451
|
-
{ x: a / 6, y: -a }
|
|
452
|
-
], i = A(r, n, a, s);
|
|
453
|
-
return t.intersect = function(o) {
|
|
454
|
-
return T(t, s, o);
|
|
455
|
-
}, i;
|
|
456
|
-
}
|
|
457
|
-
function ft(r, e, t) {
|
|
458
|
-
const n = e.width, a = e.height, s = [
|
|
459
|
-
{ x: 2 * a / 6, y: 0 },
|
|
460
|
-
{ x: n + a / 6, y: 0 },
|
|
461
|
-
{ x: n - 2 * a / 6, y: -a },
|
|
462
|
-
{ x: -a / 6, y: -a }
|
|
463
|
-
], i = A(r, n, a, s);
|
|
464
|
-
return t.intersect = function(o) {
|
|
465
|
-
return T(t, s, o);
|
|
466
|
-
}, i;
|
|
467
|
-
}
|
|
468
|
-
function pt(r, e, t) {
|
|
469
|
-
const n = e.width, a = e.height, s = [
|
|
470
|
-
{ x: -2 * a / 6, y: 0 },
|
|
471
|
-
{ x: n + 2 * a / 6, y: 0 },
|
|
472
|
-
{ x: n - a / 6, y: -a },
|
|
473
|
-
{ x: a / 6, y: -a }
|
|
474
|
-
], i = A(r, n, a, s);
|
|
475
|
-
return t.intersect = function(o) {
|
|
476
|
-
return T(t, s, o);
|
|
477
|
-
}, i;
|
|
478
|
-
}
|
|
479
|
-
function vt(r, e, t) {
|
|
480
|
-
const n = e.width, a = e.height, s = [
|
|
481
|
-
{ x: a / 6, y: 0 },
|
|
482
|
-
{ x: n - a / 6, y: 0 },
|
|
483
|
-
{ x: n + 2 * a / 6, y: -a },
|
|
484
|
-
{ x: -2 * a / 6, y: -a }
|
|
485
|
-
], i = A(r, n, a, s);
|
|
486
|
-
return t.intersect = function(o) {
|
|
487
|
-
return T(t, s, o);
|
|
488
|
-
}, i;
|
|
489
|
-
}
|
|
490
|
-
function yt(r, e, t) {
|
|
491
|
-
const n = e.width, a = e.height, s = [
|
|
492
|
-
{ x: 0, y: 0 },
|
|
493
|
-
{ x: n + a / 2, y: 0 },
|
|
494
|
-
{ x: n, y: -a / 2 },
|
|
495
|
-
{ x: n + a / 2, y: -a },
|
|
496
|
-
{ x: 0, y: -a }
|
|
497
|
-
], i = A(r, n, a, s);
|
|
498
|
-
return t.intersect = function(o) {
|
|
499
|
-
return T(t, s, o);
|
|
500
|
-
}, i;
|
|
501
|
-
}
|
|
502
|
-
function gt(r, e, t) {
|
|
503
|
-
const n = e.height, a = e.width + n / 4, s = r.insert("rect", ":first-child").attr("rx", n / 2).attr("ry", n / 2).attr("x", -a / 2).attr("y", -n / 2).attr("width", a).attr("height", n);
|
|
504
|
-
return t.intersect = function(i) {
|
|
505
|
-
return Z(t, i);
|
|
506
|
-
}, s;
|
|
507
|
-
}
|
|
508
|
-
function wt(r, e, t) {
|
|
509
|
-
const n = e.width, a = e.height, s = [
|
|
510
|
-
{ x: 0, y: 0 },
|
|
511
|
-
{ x: n, y: 0 },
|
|
512
|
-
{ x: n, y: -a },
|
|
513
|
-
{ x: 0, y: -a },
|
|
514
|
-
{ x: 0, y: 0 },
|
|
515
|
-
{ x: -8, y: 0 },
|
|
516
|
-
{ x: n + 8, y: 0 },
|
|
517
|
-
{ x: n + 8, y: -a },
|
|
518
|
-
{ x: -8, y: -a },
|
|
519
|
-
{ x: -8, y: 0 }
|
|
520
|
-
], i = A(r, n, a, s);
|
|
521
|
-
return t.intersect = function(o) {
|
|
522
|
-
return T(t, s, o);
|
|
523
|
-
}, i;
|
|
524
|
-
}
|
|
525
|
-
function xt(r, e, t) {
|
|
526
|
-
const n = e.width, a = n / 2, s = a / (2.5 + n / 50), i = e.height + s, o = "M 0," + s + " a " + a + "," + s + " 0,0,0 " + n + " 0 a " + a + "," + s + " 0,0,0 " + -n + " 0 l 0," + i + " a " + a + "," + s + " 0,0,0 " + n + " 0 l 0," + -i, c = r.attr("label-offset-y", s).insert("path", ":first-child").attr("d", o).attr("transform", "translate(" + -n / 2 + "," + -(i / 2 + s) + ")");
|
|
527
|
-
return t.intersect = function(d) {
|
|
528
|
-
const l = Z(t, d), v = l.x - t.x;
|
|
529
|
-
if (a != 0 && (Math.abs(v) < t.width / 2 || Math.abs(v) == t.width / 2 && Math.abs(l.y - t.y) > t.height / 2 - s)) {
|
|
530
|
-
let h = s * s * (1 - v * v / (a * a));
|
|
531
|
-
h != 0 && (h = Math.sqrt(h)), h = s - h, d.y - t.y > 0 && (h = -h), l.y += h;
|
|
532
|
-
}
|
|
533
|
-
return l;
|
|
534
|
-
}, c;
|
|
535
|
-
}
|
|
536
|
-
function ve(r) {
|
|
537
|
-
r.shapes().question = ct, r.shapes().hexagon = dt, r.shapes().stadium = gt, r.shapes().subroutine = wt, r.shapes().cylinder = xt, r.shapes().rect_left_inv_arrow = ht, r.shapes().lean_right = ut, r.shapes().lean_left = ft, r.shapes().trapezoid = pt, r.shapes().inv_trapezoid = vt, r.shapes().rect_right_inv_arrow = yt;
|
|
538
|
-
}
|
|
539
|
-
function ye(r) {
|
|
540
|
-
r({ question: ct }), r({ hexagon: dt }), r({ stadium: gt }), r({ subroutine: wt }), r({ cylinder: xt }), r({ rect_left_inv_arrow: ht }), r({ lean_right: ut }), r({ lean_left: ft }), r({ trapezoid: pt }), r({ inv_trapezoid: vt }), r({ rect_right_inv_arrow: yt });
|
|
541
|
-
}
|
|
542
|
-
function A(r, e, t, n) {
|
|
543
|
-
return r.insert("polygon", ":first-child").attr(
|
|
544
|
-
"points",
|
|
545
|
-
n.map(function(a) {
|
|
546
|
-
return a.x + "," + a.y;
|
|
547
|
-
}).join(" ")
|
|
548
|
-
).attr("transform", "translate(" + -e / 2 + "," + t / 2 + ")");
|
|
549
|
-
}
|
|
550
|
-
const ge = {
|
|
551
|
-
addToRender: ve,
|
|
552
|
-
addToRenderV2: ye
|
|
553
|
-
}, mt = {}, we = function(r) {
|
|
554
|
-
const e = Object.keys(r);
|
|
555
|
-
for (const t of e)
|
|
556
|
-
mt[t] = r[t];
|
|
557
|
-
}, bt = function(r, e, t, n, a, s) {
|
|
558
|
-
const i = n ? n.select(`[id="${t}"]`) : m(`[id="${t}"]`), o = a || document;
|
|
559
|
-
Object.keys(r).forEach(function(d) {
|
|
560
|
-
const l = r[d];
|
|
561
|
-
let v = "default";
|
|
562
|
-
l.classes.length > 0 && (v = l.classes.join(" "));
|
|
563
|
-
const h = z(l.styles);
|
|
564
|
-
let u = l.text !== void 0 ? l.text : l.id, p;
|
|
565
|
-
if (et(J().flowchart.htmlLabels)) {
|
|
566
|
-
const y = {
|
|
567
|
-
label: u.replace(
|
|
568
|
-
/fa[blrs]?:fa-[\w-]+/g,
|
|
569
|
-
(k) => `<i class='${k.replace(":", " ")}'></i>`
|
|
570
|
-
)
|
|
571
|
-
};
|
|
572
|
-
p = at(i, y).node(), p.parentNode.removeChild(p);
|
|
573
|
-
} else {
|
|
574
|
-
const y = o.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
575
|
-
y.setAttribute("style", h.labelStyle.replace("color:", "fill:"));
|
|
576
|
-
const k = u.split(rt.lineBreakRegex);
|
|
577
|
-
for (const I of k) {
|
|
578
|
-
const E = o.createElementNS("http://www.w3.org/2000/svg", "tspan");
|
|
579
|
-
E.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), E.setAttribute("dy", "1em"), E.setAttribute("x", "1"), E.textContent = I, y.appendChild(E);
|
|
580
|
-
}
|
|
581
|
-
p = y;
|
|
582
|
-
}
|
|
583
|
-
let g = 0, f = "";
|
|
584
|
-
switch (l.type) {
|
|
585
|
-
case "round":
|
|
586
|
-
g = 5, f = "rect";
|
|
587
|
-
break;
|
|
588
|
-
case "square":
|
|
589
|
-
f = "rect";
|
|
590
|
-
break;
|
|
591
|
-
case "diamond":
|
|
592
|
-
f = "question";
|
|
593
|
-
break;
|
|
594
|
-
case "hexagon":
|
|
595
|
-
f = "hexagon";
|
|
596
|
-
break;
|
|
597
|
-
case "odd":
|
|
598
|
-
f = "rect_left_inv_arrow";
|
|
599
|
-
break;
|
|
600
|
-
case "lean_right":
|
|
601
|
-
f = "lean_right";
|
|
602
|
-
break;
|
|
603
|
-
case "lean_left":
|
|
604
|
-
f = "lean_left";
|
|
605
|
-
break;
|
|
606
|
-
case "trapezoid":
|
|
607
|
-
f = "trapezoid";
|
|
608
|
-
break;
|
|
609
|
-
case "inv_trapezoid":
|
|
610
|
-
f = "inv_trapezoid";
|
|
611
|
-
break;
|
|
612
|
-
case "odd_right":
|
|
613
|
-
f = "rect_left_inv_arrow";
|
|
614
|
-
break;
|
|
615
|
-
case "circle":
|
|
616
|
-
f = "circle";
|
|
617
|
-
break;
|
|
618
|
-
case "ellipse":
|
|
619
|
-
f = "ellipse";
|
|
620
|
-
break;
|
|
621
|
-
case "stadium":
|
|
622
|
-
f = "stadium";
|
|
623
|
-
break;
|
|
624
|
-
case "subroutine":
|
|
625
|
-
f = "subroutine";
|
|
626
|
-
break;
|
|
627
|
-
case "cylinder":
|
|
628
|
-
f = "cylinder";
|
|
629
|
-
break;
|
|
630
|
-
case "group":
|
|
631
|
-
f = "rect";
|
|
632
|
-
break;
|
|
633
|
-
default:
|
|
634
|
-
f = "rect";
|
|
635
|
-
}
|
|
636
|
-
R.warn("Adding node", l.id, l.domId), e.setNode(s.db.lookUpDomId(l.id), {
|
|
637
|
-
labelType: "svg",
|
|
638
|
-
labelStyle: h.labelStyle,
|
|
639
|
-
shape: f,
|
|
640
|
-
label: p,
|
|
641
|
-
rx: g,
|
|
642
|
-
ry: g,
|
|
643
|
-
class: v,
|
|
644
|
-
style: h.style,
|
|
645
|
-
id: s.db.lookUpDomId(l.id)
|
|
646
|
-
});
|
|
647
|
-
});
|
|
648
|
-
}, kt = function(r, e, t) {
|
|
649
|
-
let n = 0, a, s;
|
|
650
|
-
if (r.defaultStyle !== void 0) {
|
|
651
|
-
const i = z(r.defaultStyle);
|
|
652
|
-
a = i.style, s = i.labelStyle;
|
|
653
|
-
}
|
|
654
|
-
r.forEach(function(i) {
|
|
655
|
-
n++;
|
|
656
|
-
const o = "L-" + i.start + "-" + i.end, c = "LS-" + i.start, d = "LE-" + i.end, l = {};
|
|
657
|
-
i.type === "arrow_open" ? l.arrowhead = "none" : l.arrowhead = "normal";
|
|
658
|
-
let v = "", h = "";
|
|
659
|
-
if (i.style !== void 0) {
|
|
660
|
-
const u = z(i.style);
|
|
661
|
-
v = u.style, h = u.labelStyle;
|
|
662
|
-
} else
|
|
663
|
-
switch (i.stroke) {
|
|
664
|
-
case "normal":
|
|
665
|
-
v = "fill:none", a !== void 0 && (v = a), s !== void 0 && (h = s);
|
|
666
|
-
break;
|
|
667
|
-
case "dotted":
|
|
668
|
-
v = "fill:none;stroke-width:2px;stroke-dasharray:3;";
|
|
669
|
-
break;
|
|
670
|
-
case "thick":
|
|
671
|
-
v = " stroke-width: 3.5px;fill:none";
|
|
672
|
-
break;
|
|
673
|
-
}
|
|
674
|
-
l.style = v, l.labelStyle = h, i.interpolate !== void 0 ? l.curve = V(i.interpolate, P) : r.defaultInterpolate !== void 0 ? l.curve = V(r.defaultInterpolate, P) : l.curve = V(mt.curve, P), i.text === void 0 ? i.style !== void 0 && (l.arrowheadStyle = "fill: #333") : (l.arrowheadStyle = "fill: #333", l.labelpos = "c", et(J().flowchart.htmlLabels) ? (l.labelType = "html", l.label = `<span id="L-${o}" class="edgeLabel L-${c}' L-${d}" style="${l.labelStyle}">${i.text.replace(
|
|
675
|
-
/fa[blrs]?:fa-[\w-]+/g,
|
|
676
|
-
(u) => `<i class='${u.replace(":", " ")}'></i>`
|
|
677
|
-
)}</span>`) : (l.labelType = "text", l.label = i.text.replace(rt.lineBreakRegex, `
|
|
678
|
-
`), i.style === void 0 && (l.style = l.style || "stroke: #333; stroke-width: 1.5px;fill:none"), l.labelStyle = l.labelStyle.replace("color:", "fill:"))), l.id = o, l.class = c + " " + d, l.minlen = i.length || 1, e.setEdge(t.db.lookUpDomId(i.start), t.db.lookUpDomId(i.end), l, n);
|
|
679
|
-
});
|
|
680
|
-
}, xe = function(r, e) {
|
|
681
|
-
return R.info("Extracting classes"), e.db.getClasses();
|
|
682
|
-
}, me = function(r, e, t, n) {
|
|
683
|
-
R.info("Drawing flowchart");
|
|
684
|
-
const { securityLevel: a, flowchart: s } = J();
|
|
685
|
-
let i;
|
|
686
|
-
a === "sandbox" && (i = m("#i" + e));
|
|
687
|
-
const o = a === "sandbox" ? m(i.nodes()[0].contentDocument.body) : m("body"), c = a === "sandbox" ? i.nodes()[0].contentDocument : document;
|
|
688
|
-
let d = n.db.getDirection();
|
|
689
|
-
d === void 0 && (d = "TD");
|
|
690
|
-
const l = s.nodeSpacing || 50, v = s.rankSpacing || 50, h = new Nt({
|
|
691
|
-
multigraph: !0,
|
|
692
|
-
compound: !0
|
|
693
|
-
}).setGraph({
|
|
694
|
-
rankdir: d,
|
|
695
|
-
nodesep: l,
|
|
696
|
-
ranksep: v,
|
|
697
|
-
marginx: 8,
|
|
698
|
-
marginy: 8
|
|
699
|
-
}).setDefaultEdgeLabel(function() {
|
|
700
|
-
return {};
|
|
701
|
-
});
|
|
702
|
-
let u;
|
|
703
|
-
const p = n.db.getSubGraphs();
|
|
704
|
-
for (let w = p.length - 1; w >= 0; w--)
|
|
705
|
-
u = p[w], n.db.addVertex(u.id, u.title, "group", void 0, u.classes);
|
|
706
|
-
const g = n.db.getVertices();
|
|
707
|
-
R.warn("Get vertices", g);
|
|
708
|
-
const f = n.db.getEdges();
|
|
709
|
-
let y = 0;
|
|
710
|
-
for (y = p.length - 1; y >= 0; y--) {
|
|
711
|
-
u = p[y], Bt("cluster").append("text");
|
|
712
|
-
for (let w = 0; w < u.nodes.length; w++)
|
|
713
|
-
R.warn(
|
|
714
|
-
"Setting subgraph",
|
|
715
|
-
u.nodes[w],
|
|
716
|
-
n.db.lookUpDomId(u.nodes[w]),
|
|
717
|
-
n.db.lookUpDomId(u.id)
|
|
718
|
-
), h.setParent(n.db.lookUpDomId(u.nodes[w]), n.db.lookUpDomId(u.id));
|
|
719
|
-
}
|
|
720
|
-
bt(g, h, e, o, c, n), kt(f, h, n);
|
|
721
|
-
const k = new de();
|
|
722
|
-
ge.addToRender(k), k.arrows().none = function(b, L, x, B) {
|
|
723
|
-
const C = b.append("marker").attr("id", L).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerUnits", "strokeWidth").attr("markerWidth", 8).attr("markerHeight", 6).attr("orient", "auto").append("path").attr("d", "M 0 0 L 0 0 L 0 0 z");
|
|
724
|
-
N(C, x[B + "Style"]);
|
|
725
|
-
}, k.arrows().normal = function(b, L) {
|
|
726
|
-
b.append("marker").attr("id", L).attr("viewBox", "0 0 10 10").attr("refX", 9).attr("refY", 5).attr("markerUnits", "strokeWidth").attr("markerWidth", 8).attr("markerHeight", 6).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("class", "arrowheadPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
|
|
727
|
-
};
|
|
728
|
-
const I = o.select(`[id="${e}"]`), E = o.select("#" + e + " g");
|
|
729
|
-
for (k(E, h), E.selectAll("g.node").attr("title", function() {
|
|
730
|
-
return n.db.getTooltip(this.id);
|
|
731
|
-
}), n.db.indexNodes("subGraph" + y), y = 0; y < p.length; y++)
|
|
732
|
-
if (u = p[y], u.title !== "undefined") {
|
|
733
|
-
const w = c.querySelectorAll(
|
|
734
|
-
"#" + e + ' [id="' + n.db.lookUpDomId(u.id) + '"] rect'
|
|
735
|
-
), b = c.querySelectorAll(
|
|
736
|
-
"#" + e + ' [id="' + n.db.lookUpDomId(u.id) + '"]'
|
|
737
|
-
), L = w[0].x.baseVal.value, x = w[0].y.baseVal.value, B = w[0].width.baseVal.value, C = m(b[0]).select(".label");
|
|
738
|
-
C.attr("transform", `translate(${L + B / 2}, ${x + 14})`), C.attr("id", e + "Text");
|
|
739
|
-
for (let $ = 0; $ < u.classes.length; $++)
|
|
740
|
-
b[0].classList.add(u.classes[$]);
|
|
741
|
-
}
|
|
742
|
-
if (!s.htmlLabels) {
|
|
743
|
-
const w = c.querySelectorAll('[id="' + e + '"] .edgeLabel .label');
|
|
744
|
-
for (const b of w) {
|
|
745
|
-
const L = b.getBBox(), x = c.createElementNS("http://www.w3.org/2000/svg", "rect");
|
|
746
|
-
x.setAttribute("rx", 0), x.setAttribute("ry", 0), x.setAttribute("width", L.width), x.setAttribute("height", L.height), b.insertBefore(x, b.firstChild);
|
|
747
|
-
}
|
|
748
|
-
}
|
|
749
|
-
At(h, I, s.diagramPadding, s.useMaxWidth), Object.keys(g).forEach(function(w) {
|
|
750
|
-
const b = g[w];
|
|
751
|
-
if (b.link) {
|
|
752
|
-
const L = o.select("#" + e + ' [id="' + n.db.lookUpDomId(w) + '"]');
|
|
753
|
-
if (L) {
|
|
754
|
-
const x = c.createElementNS("http://www.w3.org/2000/svg", "a");
|
|
755
|
-
x.setAttributeNS("http://www.w3.org/2000/svg", "class", b.classes.join(" ")), x.setAttributeNS("http://www.w3.org/2000/svg", "href", b.link), x.setAttributeNS("http://www.w3.org/2000/svg", "rel", "noopener"), a === "sandbox" ? x.setAttributeNS("http://www.w3.org/2000/svg", "target", "_top") : b.linkTarget && x.setAttributeNS("http://www.w3.org/2000/svg", "target", b.linkTarget);
|
|
756
|
-
const B = L.insert(function() {
|
|
757
|
-
return x;
|
|
758
|
-
}, ":first-child"), G = L.select(".label-container");
|
|
759
|
-
G && B.append(function() {
|
|
760
|
-
return G.node();
|
|
761
|
-
});
|
|
762
|
-
const C = L.select(".label");
|
|
763
|
-
C && B.append(function() {
|
|
764
|
-
return C.node();
|
|
765
|
-
});
|
|
766
|
-
}
|
|
767
|
-
}
|
|
768
|
-
});
|
|
769
|
-
}, be = {
|
|
770
|
-
setConf: we,
|
|
771
|
-
addVertices: bt,
|
|
772
|
-
addEdges: kt,
|
|
773
|
-
getClasses: xe,
|
|
774
|
-
draw: me
|
|
775
|
-
}, Be = {
|
|
776
|
-
parser: St,
|
|
777
|
-
db: W,
|
|
778
|
-
renderer: Ct,
|
|
779
|
-
styles: It,
|
|
780
|
-
init: (r) => {
|
|
781
|
-
r.flowchart || (r.flowchart = {}), r.flowchart.arrowMarkerAbsolute = r.arrowMarkerAbsolute, be.setConf(r.flowchart), W.clear(), W.setGen("gen-1");
|
|
782
|
-
}
|
|
783
|
-
};
|
|
784
|
-
export {
|
|
785
|
-
Be as diagram
|
|
786
|
-
};
|