lowcoder-comps 0.0.21 → 0.0.22
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/029c585a.js +825 -0
- package/0f49842f.js +915 -0
- package/14c95def.js +2396 -0
- package/{8219433d.js → 14de54b2.js} +7120 -6939
- package/17b0984b.js +1116 -0
- package/{31b1cdd2.js → 1a4b39ab.js} +29 -30
- package/1e35aee7.js +932 -0
- package/{54511d22.js → 1f97d569.js} +73 -76
- package/3120eee5.js +1235 -0
- package/313e94fb.js +796 -0
- package/{b38c288b.js → 41a4677f.js} +10 -12
- package/{2768fdea.js → 48a69d01.js} +89 -97
- package/4a8006fe.js +2501 -0
- package/{a6e7fb9e.js → 585231df.js} +64 -71
- package/5e96f5d8.js +64 -0
- package/5f9be850.js +1055 -0
- package/{f576ac90.js → 6e0c66a6.js} +97 -109
- package/76d315c1.js +2192 -0
- package/{7c62ef63.js → 867cdd47.js} +1 -1
- package/{3bd738e9.js → 8a65542f.js} +58 -64
- package/913e1a65.js +804 -0
- package/92e85b65.js +65 -0
- package/97298a99.js +2966 -0
- package/{450c6bd6.js → a396e61e.js} +44 -44
- package/a6d42292.js +1284 -0
- package/afd2e4d5.js +86 -0
- package/be5f3226.js +768 -0
- package/{9f3281b9.js → bf75928a.js} +30053 -30574
- package/{ba44e76c.js → bfd01456.js} +4257 -4221
- package/c239ec69.js +1000 -0
- package/e731f493.js +502 -0
- package/ef3524ce.js +960 -0
- package/f5b4a4bc.js +365 -0
- package/{fb09e069.js → fa29410e.js} +598 -622
- package/fbc7bdd4.js +218 -0
- package/index.js +2 -2
- package/package.json +2 -2
- package/04ea1009.js +0 -985
- package/0a1968f4.js +0 -832
- package/3087113d.js +0 -1032
- package/39f71758.js +0 -849
- package/4d1cf087.js +0 -2679
- package/59cbb8ee.js +0 -2456
- package/62c916e0.js +0 -86
- package/74645131.js +0 -1246
- package/75095038.js +0 -159
- package/86a4a706.js +0 -1118
- package/88c87bf8.js +0 -943
- package/8d8e98a7.js +0 -365
- package/9200edf7.js +0 -70
- package/acdad8f2.js +0 -7
- package/cbee3d44.js +0 -607
- package/cc0f1351.js +0 -793
- package/e614be0d.js +0 -91
- package/f40ee59a.js +0 -940
- package/fc5c5300.js +0 -2103
- package/fe636892.js +0 -823
- package/fea654db.js +0 -2827
package/39f71758.js
DELETED
|
@@ -1,849 +0,0 @@
|
|
|
1
|
-
var v = (r, t, a) => new Promise((n, e) => {
|
|
2
|
-
var s = (c) => {
|
|
3
|
-
try {
|
|
4
|
-
l(a.next(c));
|
|
5
|
-
} catch (o) {
|
|
6
|
-
e(o);
|
|
7
|
-
}
|
|
8
|
-
}, i = (c) => {
|
|
9
|
-
try {
|
|
10
|
-
l(a.throw(c));
|
|
11
|
-
} catch (o) {
|
|
12
|
-
e(o);
|
|
13
|
-
}
|
|
14
|
-
}, l = (c) => c.done ? n(c.value) : Promise.resolve(c.value).then(s, i);
|
|
15
|
-
l((a = a.apply(r, t)).next());
|
|
16
|
-
});
|
|
17
|
-
import { q as $, c as u, d as F, av as z, h as S, l as x, x as U, D as Q } from "./9f3281b9.js";
|
|
18
|
-
import { c as tt } from "./fea654db.js";
|
|
19
|
-
import { p as V } from "./75095038.js";
|
|
20
|
-
import { l as st } from "./7c62ef63.js";
|
|
21
|
-
const it = (r, t, a, n) => {
|
|
22
|
-
t.forEach((e) => {
|
|
23
|
-
bt[e](r, a, n);
|
|
24
|
-
});
|
|
25
|
-
}, nt = (r, t, a) => {
|
|
26
|
-
x.trace("Making markers for ", a), r.append("defs").append("marker").attr("id", t + "-extensionStart").attr("class", "marker extension " + t).attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 1,7 L18,13 V 1 Z"), r.append("defs").append("marker").attr("id", t + "-extensionEnd").attr("class", "marker extension " + t).attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 1,1 V 13 L18,7 Z");
|
|
27
|
-
}, lt = (r, t) => {
|
|
28
|
-
r.append("defs").append("marker").attr("id", t + "-compositionStart").attr("class", "marker composition " + t).attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), r.append("defs").append("marker").attr("id", t + "-compositionEnd").attr("class", "marker composition " + t).attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
|
|
29
|
-
}, ct = (r, t) => {
|
|
30
|
-
r.append("defs").append("marker").attr("id", t + "-aggregationStart").attr("class", "marker aggregation " + t).attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z"), r.append("defs").append("marker").attr("id", t + "-aggregationEnd").attr("class", "marker aggregation " + t).attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L1,7 L9,1 Z");
|
|
31
|
-
}, ht = (r, t) => {
|
|
32
|
-
r.append("defs").append("marker").attr("id", t + "-dependencyStart").attr("class", "marker dependency " + t).attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("path").attr("d", "M 5,7 L9,13 L1,7 L9,1 Z"), r.append("defs").append("marker").attr("id", t + "-dependencyEnd").attr("class", "marker dependency " + t).attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 28).attr("orient", "auto").append("path").attr("d", "M 18,7 L9,13 L14,7 L9,1 Z");
|
|
33
|
-
}, ot = (r, t) => {
|
|
34
|
-
r.append("defs").append("marker").attr("id", t + "-lollipopStart").attr("class", "marker lollipop " + t).attr("refX", 0).attr("refY", 7).attr("markerWidth", 190).attr("markerHeight", 240).attr("orient", "auto").append("circle").attr("stroke", "black").attr("fill", "white").attr("cx", 6).attr("cy", 7).attr("r", 6);
|
|
35
|
-
}, ft = (r, t) => {
|
|
36
|
-
r.append("marker").attr("id", t + "-pointEnd").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", 10).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 0 L 10 5 L 0 10 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"), r.append("marker").attr("id", t + "-pointStart").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", 0).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 12).attr("markerHeight", 12).attr("orient", "auto").append("path").attr("d", "M 0 5 L 10 10 L 10 0 z").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
|
|
37
|
-
}, pt = (r, t) => {
|
|
38
|
-
r.append("marker").attr("id", t + "-circleEnd").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", 11).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0"), r.append("marker").attr("id", t + "-circleStart").attr("class", "marker " + t).attr("viewBox", "0 0 10 10").attr("refX", -1).attr("refY", 5).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("circle").attr("cx", "5").attr("cy", "5").attr("r", "5").attr("class", "arrowMarkerPath").style("stroke-width", 1).style("stroke-dasharray", "1,0");
|
|
39
|
-
}, dt = (r, t) => {
|
|
40
|
-
r.append("marker").attr("id", t + "-crossEnd").attr("class", "marker cross " + t).attr("viewBox", "0 0 11 11").attr("refX", 12).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0"), r.append("marker").attr("id", t + "-crossStart").attr("class", "marker cross " + t).attr("viewBox", "0 0 11 11").attr("refX", -1).attr("refY", 5.2).attr("markerUnits", "userSpaceOnUse").attr("markerWidth", 11).attr("markerHeight", 11).attr("orient", "auto").append("path").attr("d", "M 1,1 l 9,9 M 10,1 l -9,9").attr("class", "arrowMarkerPath").style("stroke-width", 2).style("stroke-dasharray", "1,0");
|
|
41
|
-
}, yt = (r, t) => {
|
|
42
|
-
r.append("defs").append("marker").attr("id", t + "-barbEnd").attr("refX", 19).attr("refY", 7).attr("markerWidth", 20).attr("markerHeight", 14).attr("markerUnits", "strokeWidth").attr("orient", "auto").append("path").attr("d", "M 19,7 L9,13 L14,7 L9,1 Z");
|
|
43
|
-
}, bt = {
|
|
44
|
-
extension: nt,
|
|
45
|
-
composition: lt,
|
|
46
|
-
aggregation: ct,
|
|
47
|
-
dependency: ht,
|
|
48
|
-
lollipop: ot,
|
|
49
|
-
point: ft,
|
|
50
|
-
circle: pt,
|
|
51
|
-
cross: dt,
|
|
52
|
-
barb: yt
|
|
53
|
-
}, Pt = it;
|
|
54
|
-
function xt(r, t) {
|
|
55
|
-
t && r.attr("style", t);
|
|
56
|
-
}
|
|
57
|
-
function gt(r) {
|
|
58
|
-
const t = S(document.createElementNS("http://www.w3.org/2000/svg", "foreignObject")), a = t.append("xhtml:div"), n = r.label, e = r.isNode ? "nodeLabel" : "edgeLabel";
|
|
59
|
-
return a.html(
|
|
60
|
-
'<span class="' + e + '" ' + (r.labelStyle ? 'style="' + r.labelStyle + '"' : "") + ">" + n + "</span>"
|
|
61
|
-
), xt(a, r.labelStyle), a.style("display", "inline-block"), a.style("white-space", "nowrap"), a.attr("xmlns", "http://www.w3.org/1999/xhtml"), t.node();
|
|
62
|
-
}
|
|
63
|
-
const wt = (r, t, a, n) => {
|
|
64
|
-
let e = r || "";
|
|
65
|
-
if (typeof e == "object" && (e = e[0]), $(u().flowchart.htmlLabels)) {
|
|
66
|
-
e = e.replace(/\\n|\n/g, "<br />"), x.info("vertexText" + e);
|
|
67
|
-
const s = {
|
|
68
|
-
isNode: n,
|
|
69
|
-
label: z(e).replace(
|
|
70
|
-
/fa[blrs]?:fa-[\w-]+/g,
|
|
71
|
-
(l) => `<i class='${l.replace(":", " ")}'></i>`
|
|
72
|
-
),
|
|
73
|
-
labelStyle: t.replace("fill:", "color:")
|
|
74
|
-
};
|
|
75
|
-
return gt(s);
|
|
76
|
-
} else {
|
|
77
|
-
const s = document.createElementNS("http://www.w3.org/2000/svg", "text");
|
|
78
|
-
s.setAttribute("style", t.replace("color:", "fill:"));
|
|
79
|
-
let i = [];
|
|
80
|
-
typeof e == "string" ? i = e.split(/\\n|\n|<br\s*\/?>/gi) : Array.isArray(e) ? i = e : i = [];
|
|
81
|
-
for (const l of i) {
|
|
82
|
-
const c = document.createElementNS("http://www.w3.org/2000/svg", "tspan");
|
|
83
|
-
c.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), c.setAttribute("dy", "1em"), c.setAttribute("x", "0"), a ? c.setAttribute("class", "title-row") : c.setAttribute("class", "row"), c.textContent = l.trim(), s.appendChild(c);
|
|
84
|
-
}
|
|
85
|
-
return s;
|
|
86
|
-
}
|
|
87
|
-
}, R = wt, E = (r, t, a, n) => v(void 0, null, function* () {
|
|
88
|
-
let e;
|
|
89
|
-
const s = t.useHtmlLabels || $(u().flowchart.htmlLabels);
|
|
90
|
-
a ? e = a : e = "node default";
|
|
91
|
-
const i = r.insert("g").attr("class", e).attr("id", t.domId || t.id), l = i.insert("g").attr("class", "label").attr("style", t.labelStyle);
|
|
92
|
-
let c;
|
|
93
|
-
t.labelText === void 0 ? c = "" : c = typeof t.labelText == "string" ? t.labelText : t.labelText[0];
|
|
94
|
-
const o = l.node();
|
|
95
|
-
let h;
|
|
96
|
-
t.labelType === "markdown" ? h = tt(l, F(z(c), u()), {
|
|
97
|
-
useHtmlLabels: s,
|
|
98
|
-
width: t.width || u().flowchart.wrappingWidth,
|
|
99
|
-
classes: "markdown-node-label"
|
|
100
|
-
}) : h = o.appendChild(
|
|
101
|
-
R(
|
|
102
|
-
F(z(c), u()),
|
|
103
|
-
t.labelStyle,
|
|
104
|
-
!1,
|
|
105
|
-
n
|
|
106
|
-
)
|
|
107
|
-
);
|
|
108
|
-
let f = h.getBBox();
|
|
109
|
-
const b = t.padding / 2;
|
|
110
|
-
if ($(u().flowchart.htmlLabels)) {
|
|
111
|
-
const p = h.children[0], d = S(h), y = p.getElementsByTagName("img");
|
|
112
|
-
if (y) {
|
|
113
|
-
const g = c.replace(/<img[^>]*>/g, "").trim() === "";
|
|
114
|
-
yield Promise.all(
|
|
115
|
-
[...y].map(
|
|
116
|
-
(w) => new Promise(
|
|
117
|
-
(I) => w.addEventListener("load", function() {
|
|
118
|
-
if (w.style.display = "flex", w.style.flexDirection = "column", g) {
|
|
119
|
-
const H = u().fontSize ? u().fontSize : window.getComputedStyle(document.body).fontSize, B = 5;
|
|
120
|
-
w.style.width = parseInt(H, 10) * B + "px";
|
|
121
|
-
} else
|
|
122
|
-
w.style.width = "100%";
|
|
123
|
-
I(w);
|
|
124
|
-
})
|
|
125
|
-
)
|
|
126
|
-
)
|
|
127
|
-
);
|
|
128
|
-
}
|
|
129
|
-
f = p.getBoundingClientRect(), d.attr("width", f.width), d.attr("height", f.height);
|
|
130
|
-
}
|
|
131
|
-
return s ? l.attr("transform", "translate(" + -f.width / 2 + ", " + -f.height / 2 + ")") : l.attr("transform", "translate(0, " + -f.height / 2 + ")"), t.centerLabel && l.attr("transform", "translate(" + -f.width / 2 + ", " + -f.height / 2 + ")"), l.insert("rect", ":first-child"), { shapeSvg: i, bbox: f, halfPadding: b, label: l };
|
|
132
|
-
}), k = (r, t) => {
|
|
133
|
-
const a = t.node().getBBox();
|
|
134
|
-
r.width = a.width, r.height = a.height;
|
|
135
|
-
};
|
|
136
|
-
function _(r, t, a, n) {
|
|
137
|
-
return r.insert("polygon", ":first-child").attr(
|
|
138
|
-
"points",
|
|
139
|
-
n.map(function(e) {
|
|
140
|
-
return e.x + "," + e.y;
|
|
141
|
-
}).join(" ")
|
|
142
|
-
).attr("class", "label-container").attr("transform", "translate(" + -t / 2 + "," + a / 2 + ")");
|
|
143
|
-
}
|
|
144
|
-
function ut(r, t) {
|
|
145
|
-
return r.intersect(t);
|
|
146
|
-
}
|
|
147
|
-
function rt(r, t, a, n) {
|
|
148
|
-
var e = r.x, s = r.y, i = e - n.x, l = s - n.y, c = Math.sqrt(t * t * l * l + a * a * i * i), o = Math.abs(t * a * i / c);
|
|
149
|
-
n.x < e && (o = -o);
|
|
150
|
-
var h = Math.abs(t * a * l / c);
|
|
151
|
-
return n.y < s && (h = -h), { x: e + o, y: s + h };
|
|
152
|
-
}
|
|
153
|
-
function mt(r, t, a) {
|
|
154
|
-
return rt(r, t, t, a);
|
|
155
|
-
}
|
|
156
|
-
function kt(r, t, a, n) {
|
|
157
|
-
var e, s, i, l, c, o, h, f, b, p, d, y, g, w, I;
|
|
158
|
-
if (e = t.y - r.y, i = r.x - t.x, c = t.x * r.y - r.x * t.y, b = e * a.x + i * a.y + c, p = e * n.x + i * n.y + c, !(b !== 0 && p !== 0 && q(b, p)) && (s = n.y - a.y, l = a.x - n.x, o = n.x * a.y - a.x * n.y, h = s * r.x + l * r.y + o, f = s * t.x + l * t.y + o, !(h !== 0 && f !== 0 && q(h, f)) && (d = e * l - s * i, d !== 0)))
|
|
159
|
-
return y = Math.abs(d / 2), g = i * o - l * c, w = g < 0 ? (g - y) / d : (g + y) / d, g = s * c - e * o, I = g < 0 ? (g - y) / d : (g + y) / d, { x: w, y: I };
|
|
160
|
-
}
|
|
161
|
-
function q(r, t) {
|
|
162
|
-
return r * t > 0;
|
|
163
|
-
}
|
|
164
|
-
function vt(r, t, a) {
|
|
165
|
-
var n = r.x, e = r.y, s = [], i = Number.POSITIVE_INFINITY, l = Number.POSITIVE_INFINITY;
|
|
166
|
-
typeof t.forEach == "function" ? t.forEach(function(d) {
|
|
167
|
-
i = Math.min(i, d.x), l = Math.min(l, d.y);
|
|
168
|
-
}) : (i = Math.min(i, t.x), l = Math.min(l, t.y));
|
|
169
|
-
for (var c = n - r.width / 2 - i, o = e - r.height / 2 - l, h = 0; h < t.length; h++) {
|
|
170
|
-
var f = t[h], b = t[h < t.length - 1 ? h + 1 : 0], p = kt(
|
|
171
|
-
r,
|
|
172
|
-
a,
|
|
173
|
-
{ x: c + f.x, y: o + f.y },
|
|
174
|
-
{ x: c + b.x, y: o + b.y }
|
|
175
|
-
);
|
|
176
|
-
p && s.push(p);
|
|
177
|
-
}
|
|
178
|
-
return s.length ? (s.length > 1 && s.sort(function(d, y) {
|
|
179
|
-
var g = d.x - a.x, w = d.y - a.y, I = Math.sqrt(g * g + w * w), H = y.x - a.x, B = y.y - a.y, Y = Math.sqrt(H * H + B * B);
|
|
180
|
-
return I < Y ? -1 : I === Y ? 0 : 1;
|
|
181
|
-
}), s[0]) : r;
|
|
182
|
-
}
|
|
183
|
-
const Lt = (r, t) => {
|
|
184
|
-
var a = r.x, n = r.y, e = t.x - a, s = t.y - n, i = r.width / 2, l = r.height / 2, c, o;
|
|
185
|
-
return Math.abs(s) * i > Math.abs(e) * l ? (s < 0 && (l = -l), c = s === 0 ? 0 : l * e / s, o = l) : (e < 0 && (i = -i), c = i, o = e === 0 ? 0 : i * s / e), { x: a + c, y: n + o };
|
|
186
|
-
}, St = Lt, m = {
|
|
187
|
-
node: ut,
|
|
188
|
-
circle: mt,
|
|
189
|
-
ellipse: rt,
|
|
190
|
-
polygon: vt,
|
|
191
|
-
rect: St
|
|
192
|
-
}, Et = (r, t) => v(void 0, null, function* () {
|
|
193
|
-
t.useHtmlLabels || u().flowchart.htmlLabels || (t.centerLabel = !0);
|
|
194
|
-
const { shapeSvg: n, bbox: e, halfPadding: s } = yield E(
|
|
195
|
-
r,
|
|
196
|
-
t,
|
|
197
|
-
"node " + t.classes,
|
|
198
|
-
!0
|
|
199
|
-
);
|
|
200
|
-
x.info("Classes = ", t.classes);
|
|
201
|
-
const i = n.insert("rect", ":first-child");
|
|
202
|
-
return i.attr("rx", t.rx).attr("ry", t.ry).attr("x", -e.width / 2 - s).attr("y", -e.height / 2 - s).attr("width", e.width + t.padding).attr("height", e.height + t.padding), k(t, i), t.intersect = function(l) {
|
|
203
|
-
return m.rect(t, l);
|
|
204
|
-
}, n;
|
|
205
|
-
}), Bt = Et, J = (r, t) => v(void 0, null, function* () {
|
|
206
|
-
const { shapeSvg: a, bbox: n } = yield E(r, t, void 0, !0), e = n.width + t.padding, s = n.height + t.padding, i = e + s, l = [
|
|
207
|
-
{ x: i / 2, y: 0 },
|
|
208
|
-
{ x: i, y: -i / 2 },
|
|
209
|
-
{ x: i / 2, y: -i },
|
|
210
|
-
{ x: 0, y: -i / 2 }
|
|
211
|
-
];
|
|
212
|
-
x.info("Question main (Circle)");
|
|
213
|
-
const c = _(a, i, i, l);
|
|
214
|
-
return c.attr("style", t.style), k(t, c), t.intersect = function(o) {
|
|
215
|
-
return x.warn("Intersect called"), m.polygon(t, l, o);
|
|
216
|
-
}, a;
|
|
217
|
-
}), Mt = (r, t) => {
|
|
218
|
-
const a = r.insert("g").attr("class", "node default").attr("id", t.domId || t.id), n = 28, e = [
|
|
219
|
-
{ x: 0, y: n / 2 },
|
|
220
|
-
{ x: n / 2, y: 0 },
|
|
221
|
-
{ x: 0, y: -n / 2 },
|
|
222
|
-
{ x: -n / 2, y: 0 }
|
|
223
|
-
];
|
|
224
|
-
return a.insert("polygon", ":first-child").attr(
|
|
225
|
-
"points",
|
|
226
|
-
e.map(function(i) {
|
|
227
|
-
return i.x + "," + i.y;
|
|
228
|
-
}).join(" ")
|
|
229
|
-
).attr("class", "state-start").attr("r", 7).attr("width", 28).attr("height", 28), t.width = 28, t.height = 28, t.intersect = function(i) {
|
|
230
|
-
return m.circle(t, 14, i);
|
|
231
|
-
}, a;
|
|
232
|
-
}, Ct = (r, t) => v(void 0, null, function* () {
|
|
233
|
-
const { shapeSvg: a, bbox: n } = yield E(r, t, void 0, !0), e = 4, s = n.height + t.padding, i = s / e, l = n.width + 2 * i + t.padding, c = [
|
|
234
|
-
{ x: i, y: 0 },
|
|
235
|
-
{ x: l - i, y: 0 },
|
|
236
|
-
{ x: l, y: -s / 2 },
|
|
237
|
-
{ x: l - i, y: -s },
|
|
238
|
-
{ x: i, y: -s },
|
|
239
|
-
{ x: 0, y: -s / 2 }
|
|
240
|
-
], o = _(a, l, s, c);
|
|
241
|
-
return o.attr("style", t.style), k(t, o), t.intersect = function(h) {
|
|
242
|
-
return m.polygon(t, c, h);
|
|
243
|
-
}, a;
|
|
244
|
-
}), Tt = (r, t) => v(void 0, null, function* () {
|
|
245
|
-
const { shapeSvg: a, bbox: n } = yield E(r, t, void 0, !0), e = n.width + t.padding, s = n.height + t.padding, i = [
|
|
246
|
-
{ x: -s / 2, y: 0 },
|
|
247
|
-
{ x: e, y: 0 },
|
|
248
|
-
{ x: e, y: -s },
|
|
249
|
-
{ x: -s / 2, y: -s },
|
|
250
|
-
{ x: 0, y: -s / 2 }
|
|
251
|
-
];
|
|
252
|
-
return _(a, e, s, i).attr("style", t.style), t.width = e + s, t.height = s, t.intersect = function(c) {
|
|
253
|
-
return m.polygon(t, i, c);
|
|
254
|
-
}, a;
|
|
255
|
-
}), Rt = (r, t) => v(void 0, null, function* () {
|
|
256
|
-
const { shapeSvg: a, bbox: n } = yield E(r, t, void 0, !0), e = n.width + t.padding, s = n.height + t.padding, i = [
|
|
257
|
-
{ x: -2 * s / 6, y: 0 },
|
|
258
|
-
{ x: e - s / 6, y: 0 },
|
|
259
|
-
{ x: e + 2 * s / 6, y: -s },
|
|
260
|
-
{ x: s / 6, y: -s }
|
|
261
|
-
], l = _(a, e, s, i);
|
|
262
|
-
return l.attr("style", t.style), k(t, l), t.intersect = function(c) {
|
|
263
|
-
return m.polygon(t, i, c);
|
|
264
|
-
}, a;
|
|
265
|
-
}), It = (r, t) => v(void 0, null, function* () {
|
|
266
|
-
const { shapeSvg: a, bbox: n } = yield E(r, t, void 0, !0), e = n.width + t.padding, s = n.height + t.padding, i = [
|
|
267
|
-
{ x: 2 * s / 6, y: 0 },
|
|
268
|
-
{ x: e + s / 6, y: 0 },
|
|
269
|
-
{ x: e - 2 * s / 6, y: -s },
|
|
270
|
-
{ x: -s / 6, y: -s }
|
|
271
|
-
], l = _(a, e, s, i);
|
|
272
|
-
return l.attr("style", t.style), k(t, l), t.intersect = function(c) {
|
|
273
|
-
return m.polygon(t, i, c);
|
|
274
|
-
}, a;
|
|
275
|
-
}), Ht = (r, t) => v(void 0, null, function* () {
|
|
276
|
-
const { shapeSvg: a, bbox: n } = yield E(r, t, void 0, !0), e = n.width + t.padding, s = n.height + t.padding, i = [
|
|
277
|
-
{ x: -2 * s / 6, y: 0 },
|
|
278
|
-
{ x: e + 2 * s / 6, y: 0 },
|
|
279
|
-
{ x: e - s / 6, y: -s },
|
|
280
|
-
{ x: s / 6, y: -s }
|
|
281
|
-
], l = _(a, e, s, i);
|
|
282
|
-
return l.attr("style", t.style), k(t, l), t.intersect = function(c) {
|
|
283
|
-
return m.polygon(t, i, c);
|
|
284
|
-
}, a;
|
|
285
|
-
}), $t = (r, t) => v(void 0, null, function* () {
|
|
286
|
-
const { shapeSvg: a, bbox: n } = yield E(r, t, void 0, !0), e = n.width + t.padding, s = n.height + t.padding, i = [
|
|
287
|
-
{ x: s / 6, y: 0 },
|
|
288
|
-
{ x: e - s / 6, y: 0 },
|
|
289
|
-
{ x: e + 2 * s / 6, y: -s },
|
|
290
|
-
{ x: -2 * s / 6, y: -s }
|
|
291
|
-
], l = _(a, e, s, i);
|
|
292
|
-
return l.attr("style", t.style), k(t, l), t.intersect = function(c) {
|
|
293
|
-
return m.polygon(t, i, c);
|
|
294
|
-
}, a;
|
|
295
|
-
}), Nt = (r, t) => v(void 0, null, function* () {
|
|
296
|
-
const { shapeSvg: a, bbox: n } = yield E(r, t, void 0, !0), e = n.width + t.padding, s = n.height + t.padding, i = [
|
|
297
|
-
{ x: 0, y: 0 },
|
|
298
|
-
{ x: e + s / 2, y: 0 },
|
|
299
|
-
{ x: e, y: -s / 2 },
|
|
300
|
-
{ x: e + s / 2, y: -s },
|
|
301
|
-
{ x: 0, y: -s }
|
|
302
|
-
], l = _(a, e, s, i);
|
|
303
|
-
return l.attr("style", t.style), k(t, l), t.intersect = function(c) {
|
|
304
|
-
return m.polygon(t, i, c);
|
|
305
|
-
}, a;
|
|
306
|
-
}), _t = (r, t) => v(void 0, null, function* () {
|
|
307
|
-
const { shapeSvg: a, bbox: n } = yield E(r, t, void 0, !0), e = n.width + t.padding, s = e / 2, i = s / (2.5 + e / 50), l = n.height + i + t.padding, c = "M 0," + i + " a " + s + "," + i + " 0,0,0 " + e + " 0 a " + s + "," + i + " 0,0,0 " + -e + " 0 l 0," + l + " a " + s + "," + i + " 0,0,0 " + e + " 0 l 0," + -l, o = a.attr("label-offset-y", i).insert("path", ":first-child").attr("style", t.style).attr("d", c).attr("transform", "translate(" + -e / 2 + "," + -(l / 2 + i) + ")");
|
|
308
|
-
return k(t, o), t.intersect = function(h) {
|
|
309
|
-
const f = m.rect(t, h), b = f.x - t.x;
|
|
310
|
-
if (s != 0 && (Math.abs(b) < t.width / 2 || Math.abs(b) == t.width / 2 && Math.abs(f.y - t.y) > t.height / 2 - i)) {
|
|
311
|
-
let p = i * i * (1 - b * b / (s * s));
|
|
312
|
-
p != 0 && (p = Math.sqrt(p)), p = i - p, h.y - t.y > 0 && (p = -p), f.y += p;
|
|
313
|
-
}
|
|
314
|
-
return f;
|
|
315
|
-
}, a;
|
|
316
|
-
}), Wt = (r, t) => v(void 0, null, function* () {
|
|
317
|
-
const { shapeSvg: a, bbox: n, halfPadding: e } = yield E(
|
|
318
|
-
r,
|
|
319
|
-
t,
|
|
320
|
-
"node " + t.classes,
|
|
321
|
-
!0
|
|
322
|
-
), s = a.insert("rect", ":first-child"), i = n.width + t.padding, l = n.height + t.padding;
|
|
323
|
-
if (s.attr("class", "basic label-container").attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", -n.width / 2 - e).attr("y", -n.height / 2 - e).attr("width", i).attr("height", l), t.props) {
|
|
324
|
-
const c = new Set(Object.keys(t.props));
|
|
325
|
-
t.props.borders && (at(s, t.props.borders, i, l), c.delete("borders")), c.forEach((o) => {
|
|
326
|
-
x.warn(`Unknown node property ${o}`);
|
|
327
|
-
});
|
|
328
|
-
}
|
|
329
|
-
return k(t, s), t.intersect = function(c) {
|
|
330
|
-
return m.rect(t, c);
|
|
331
|
-
}, a;
|
|
332
|
-
}), Xt = (r, t) => v(void 0, null, function* () {
|
|
333
|
-
const { shapeSvg: a } = yield E(r, t, "label", !0);
|
|
334
|
-
x.trace("Classes = ", t.classes);
|
|
335
|
-
const n = a.insert("rect", ":first-child"), e = 0, s = 0;
|
|
336
|
-
if (n.attr("width", e).attr("height", s), a.attr("class", "label edgeLabel"), t.props) {
|
|
337
|
-
const i = new Set(Object.keys(t.props));
|
|
338
|
-
t.props.borders && (at(n, t.props.borders, e, s), i.delete("borders")), i.forEach((l) => {
|
|
339
|
-
x.warn(`Unknown node property ${l}`);
|
|
340
|
-
});
|
|
341
|
-
}
|
|
342
|
-
return k(t, n), t.intersect = function(i) {
|
|
343
|
-
return m.rect(t, i);
|
|
344
|
-
}, a;
|
|
345
|
-
});
|
|
346
|
-
function at(r, t, a, n) {
|
|
347
|
-
const e = [], s = (l) => {
|
|
348
|
-
e.push(l, 0);
|
|
349
|
-
}, i = (l) => {
|
|
350
|
-
e.push(0, l);
|
|
351
|
-
};
|
|
352
|
-
t.includes("t") ? (x.debug("add top border"), s(a)) : i(a), t.includes("r") ? (x.debug("add right border"), s(n)) : i(n), t.includes("b") ? (x.debug("add bottom border"), s(a)) : i(a), t.includes("l") ? (x.debug("add left border"), s(n)) : i(n), r.attr("stroke-dasharray", e.join(" "));
|
|
353
|
-
}
|
|
354
|
-
const Yt = (r, t) => {
|
|
355
|
-
let a;
|
|
356
|
-
t.classes ? a = "node " + t.classes : a = "node default";
|
|
357
|
-
const n = r.insert("g").attr("class", a).attr("id", t.domId || t.id), e = n.insert("rect", ":first-child"), s = n.insert("line"), i = n.insert("g").attr("class", "label"), l = t.labelText.flat ? t.labelText.flat() : t.labelText;
|
|
358
|
-
let c = "";
|
|
359
|
-
typeof l == "object" ? c = l[0] : c = l, x.info("Label text abc79", c, l, typeof l == "object");
|
|
360
|
-
const o = i.node().appendChild(R(c, t.labelStyle, !0, !0));
|
|
361
|
-
let h = { width: 0, height: 0 };
|
|
362
|
-
if ($(u().flowchart.htmlLabels)) {
|
|
363
|
-
const y = o.children[0], g = S(o);
|
|
364
|
-
h = y.getBoundingClientRect(), g.attr("width", h.width), g.attr("height", h.height);
|
|
365
|
-
}
|
|
366
|
-
x.info("Text 2", l);
|
|
367
|
-
const f = l.slice(1, l.length);
|
|
368
|
-
let b = o.getBBox();
|
|
369
|
-
const p = i.node().appendChild(
|
|
370
|
-
R(f.join ? f.join("<br/>") : f, t.labelStyle, !0, !0)
|
|
371
|
-
);
|
|
372
|
-
if ($(u().flowchart.htmlLabels)) {
|
|
373
|
-
const y = p.children[0], g = S(p);
|
|
374
|
-
h = y.getBoundingClientRect(), g.attr("width", h.width), g.attr("height", h.height);
|
|
375
|
-
}
|
|
376
|
-
const d = t.padding / 2;
|
|
377
|
-
return S(p).attr(
|
|
378
|
-
"transform",
|
|
379
|
-
"translate( " + // (titleBox.width - bbox.width) / 2 +
|
|
380
|
-
(h.width > b.width ? 0 : (b.width - h.width) / 2) + ", " + (b.height + d + 5) + ")"
|
|
381
|
-
), S(o).attr(
|
|
382
|
-
"transform",
|
|
383
|
-
"translate( " + // (titleBox.width - bbox.width) / 2 +
|
|
384
|
-
(h.width < b.width ? 0 : -(b.width - h.width) / 2) + ", 0)"
|
|
385
|
-
), h = i.node().getBBox(), i.attr(
|
|
386
|
-
"transform",
|
|
387
|
-
"translate(" + -h.width / 2 + ", " + (-h.height / 2 - d + 3) + ")"
|
|
388
|
-
), e.attr("class", "outer title-state").attr("x", -h.width / 2 - d).attr("y", -h.height / 2 - d).attr("width", h.width + t.padding).attr("height", h.height + t.padding), s.attr("class", "divider").attr("x1", -h.width / 2 - d).attr("x2", h.width / 2 + d).attr("y1", -h.height / 2 - d + b.height + d).attr("y2", -h.height / 2 - d + b.height + d), k(t, e), t.intersect = function(y) {
|
|
389
|
-
return m.rect(t, y);
|
|
390
|
-
}, n;
|
|
391
|
-
}, Dt = (r, t) => v(void 0, null, function* () {
|
|
392
|
-
const { shapeSvg: a, bbox: n } = yield E(r, t, void 0, !0), e = n.height + t.padding, s = n.width + e / 4 + t.padding, i = a.insert("rect", ":first-child").attr("style", t.style).attr("rx", e / 2).attr("ry", e / 2).attr("x", -s / 2).attr("y", -e / 2).attr("width", s).attr("height", e);
|
|
393
|
-
return k(t, i), t.intersect = function(l) {
|
|
394
|
-
return m.rect(t, l);
|
|
395
|
-
}, a;
|
|
396
|
-
}), Ut = (r, t) => v(void 0, null, function* () {
|
|
397
|
-
const { shapeSvg: a, bbox: n, halfPadding: e } = yield E(r, t, void 0, !0), s = a.insert("circle", ":first-child");
|
|
398
|
-
return s.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", n.width / 2 + e).attr("width", n.width + t.padding).attr("height", n.height + t.padding), x.info("Circle main"), k(t, s), t.intersect = function(i) {
|
|
399
|
-
return x.info("Circle intersect", t, n.width / 2 + e, i), m.circle(t, n.width / 2 + e, i);
|
|
400
|
-
}, a;
|
|
401
|
-
}), At = (r, t) => v(void 0, null, function* () {
|
|
402
|
-
const { shapeSvg: a, bbox: n, halfPadding: e } = yield E(r, t, void 0, !0), s = 5, i = a.insert("g", ":first-child"), l = i.insert("circle"), c = i.insert("circle");
|
|
403
|
-
return i.attr("class", t.class), l.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", n.width / 2 + e + s).attr("width", n.width + t.padding + s * 2).attr("height", n.height + t.padding + s * 2), c.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("r", n.width / 2 + e).attr("width", n.width + t.padding).attr("height", n.height + t.padding), x.info("DoubleCircle main"), k(t, l), t.intersect = function(o) {
|
|
404
|
-
return x.info("DoubleCircle intersect", t, n.width / 2 + e + s, o), m.circle(t, n.width / 2 + e + s, o);
|
|
405
|
-
}, a;
|
|
406
|
-
}), Ot = (r, t) => v(void 0, null, function* () {
|
|
407
|
-
const { shapeSvg: a, bbox: n } = yield E(r, t, void 0, !0), e = n.width + t.padding, s = n.height + t.padding, i = [
|
|
408
|
-
{ x: 0, y: 0 },
|
|
409
|
-
{ x: e, y: 0 },
|
|
410
|
-
{ x: e, y: -s },
|
|
411
|
-
{ x: 0, y: -s },
|
|
412
|
-
{ x: 0, y: 0 },
|
|
413
|
-
{ x: -8, y: 0 },
|
|
414
|
-
{ x: e + 8, y: 0 },
|
|
415
|
-
{ x: e + 8, y: -s },
|
|
416
|
-
{ x: -8, y: -s },
|
|
417
|
-
{ x: -8, y: 0 }
|
|
418
|
-
], l = _(a, e, s, i);
|
|
419
|
-
return l.attr("style", t.style), k(t, l), t.intersect = function(c) {
|
|
420
|
-
return m.polygon(t, i, c);
|
|
421
|
-
}, a;
|
|
422
|
-
}), jt = (r, t) => {
|
|
423
|
-
const a = r.insert("g").attr("class", "node default").attr("id", t.domId || t.id), n = a.insert("circle", ":first-child");
|
|
424
|
-
return n.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), k(t, n), t.intersect = function(e) {
|
|
425
|
-
return m.circle(t, 7, e);
|
|
426
|
-
}, a;
|
|
427
|
-
}, K = (r, t, a) => {
|
|
428
|
-
const n = r.insert("g").attr("class", "node default").attr("id", t.domId || t.id);
|
|
429
|
-
let e = 70, s = 10;
|
|
430
|
-
a === "LR" && (e = 10, s = 70);
|
|
431
|
-
const i = n.append("rect").attr("x", -1 * e / 2).attr("y", -1 * s / 2).attr("width", e).attr("height", s).attr("class", "fork-join");
|
|
432
|
-
return k(t, i), t.height = t.height + t.padding / 2, t.width = t.width + t.padding / 2, t.intersect = function(l) {
|
|
433
|
-
return m.rect(t, l);
|
|
434
|
-
}, n;
|
|
435
|
-
}, zt = (r, t) => {
|
|
436
|
-
const a = r.insert("g").attr("class", "node default").attr("id", t.domId || t.id), n = a.insert("circle", ":first-child"), e = a.insert("circle", ":first-child");
|
|
437
|
-
return e.attr("class", "state-start").attr("r", 7).attr("width", 14).attr("height", 14), n.attr("class", "state-end").attr("r", 5).attr("width", 10).attr("height", 10), k(t, e), t.intersect = function(s) {
|
|
438
|
-
return m.circle(t, 7, s);
|
|
439
|
-
}, a;
|
|
440
|
-
}, Zt = (r, t) => {
|
|
441
|
-
const a = t.padding / 2, n = 4, e = 8;
|
|
442
|
-
let s;
|
|
443
|
-
t.classes ? s = "node " + t.classes : s = "node default";
|
|
444
|
-
const i = r.insert("g").attr("class", s).attr("id", t.domId || t.id), l = i.insert("rect", ":first-child"), c = i.insert("line"), o = i.insert("line");
|
|
445
|
-
let h = 0, f = n;
|
|
446
|
-
const b = i.insert("g").attr("class", "label");
|
|
447
|
-
let p = 0;
|
|
448
|
-
const d = t.classData.annotations && t.classData.annotations[0], y = t.classData.annotations[0] ? "«" + t.classData.annotations[0] + "»" : "", g = b.node().appendChild(R(y, t.labelStyle, !0, !0));
|
|
449
|
-
let w = g.getBBox();
|
|
450
|
-
if ($(u().flowchart.htmlLabels)) {
|
|
451
|
-
const M = g.children[0], C = S(g);
|
|
452
|
-
w = M.getBoundingClientRect(), C.attr("width", w.width), C.attr("height", w.height);
|
|
453
|
-
}
|
|
454
|
-
t.classData.annotations[0] && (f += w.height + n, h += w.width);
|
|
455
|
-
let I = t.classData.label;
|
|
456
|
-
t.classData.type !== void 0 && t.classData.type !== "" && (u().flowchart.htmlLabels ? I += "<" + t.classData.type + ">" : I += "<" + t.classData.type + ">");
|
|
457
|
-
const H = b.node().appendChild(R(I, t.labelStyle, !0, !0));
|
|
458
|
-
S(H).attr("class", "classTitle");
|
|
459
|
-
let B = H.getBBox();
|
|
460
|
-
if ($(u().flowchart.htmlLabels)) {
|
|
461
|
-
const M = H.children[0], C = S(H);
|
|
462
|
-
B = M.getBoundingClientRect(), C.attr("width", B.width), C.attr("height", B.height);
|
|
463
|
-
}
|
|
464
|
-
f += B.height + n, B.width > h && (h = B.width);
|
|
465
|
-
const Y = [];
|
|
466
|
-
t.classData.members.forEach((M) => {
|
|
467
|
-
const C = V(M);
|
|
468
|
-
let W = C.displayText;
|
|
469
|
-
u().flowchart.htmlLabels && (W = W.replace(/</g, "<").replace(/>/g, ">"));
|
|
470
|
-
const N = b.node().appendChild(
|
|
471
|
-
R(
|
|
472
|
-
W,
|
|
473
|
-
C.cssStyle ? C.cssStyle : t.labelStyle,
|
|
474
|
-
!0,
|
|
475
|
-
!0
|
|
476
|
-
)
|
|
477
|
-
);
|
|
478
|
-
let T = N.getBBox();
|
|
479
|
-
if ($(u().flowchart.htmlLabels)) {
|
|
480
|
-
const j = N.children[0], D = S(N);
|
|
481
|
-
T = j.getBoundingClientRect(), D.attr("width", T.width), D.attr("height", T.height);
|
|
482
|
-
}
|
|
483
|
-
T.width > h && (h = T.width), f += T.height + n, Y.push(N);
|
|
484
|
-
}), f += e;
|
|
485
|
-
const Z = [];
|
|
486
|
-
if (t.classData.methods.forEach((M) => {
|
|
487
|
-
const C = V(M);
|
|
488
|
-
let W = C.displayText;
|
|
489
|
-
u().flowchart.htmlLabels && (W = W.replace(/</g, "<").replace(/>/g, ">"));
|
|
490
|
-
const N = b.node().appendChild(
|
|
491
|
-
R(
|
|
492
|
-
W,
|
|
493
|
-
C.cssStyle ? C.cssStyle : t.labelStyle,
|
|
494
|
-
!0,
|
|
495
|
-
!0
|
|
496
|
-
)
|
|
497
|
-
);
|
|
498
|
-
let T = N.getBBox();
|
|
499
|
-
if ($(u().flowchart.htmlLabels)) {
|
|
500
|
-
const j = N.children[0], D = S(N);
|
|
501
|
-
T = j.getBoundingClientRect(), D.attr("width", T.width), D.attr("height", T.height);
|
|
502
|
-
}
|
|
503
|
-
T.width > h && (h = T.width), f += T.height + n, Z.push(N);
|
|
504
|
-
}), f += e, d) {
|
|
505
|
-
let M = (h - w.width) / 2;
|
|
506
|
-
S(g).attr(
|
|
507
|
-
"transform",
|
|
508
|
-
"translate( " + (-1 * h / 2 + M) + ", " + -1 * f / 2 + ")"
|
|
509
|
-
), p = w.height + n;
|
|
510
|
-
}
|
|
511
|
-
let et = (h - B.width) / 2;
|
|
512
|
-
return S(H).attr(
|
|
513
|
-
"transform",
|
|
514
|
-
"translate( " + (-1 * h / 2 + et) + ", " + (-1 * f / 2 + p) + ")"
|
|
515
|
-
), p += B.height + n, c.attr("class", "divider").attr("x1", -h / 2 - a).attr("x2", h / 2 + a).attr("y1", -f / 2 - a + e + p).attr("y2", -f / 2 - a + e + p), p += e, Y.forEach((M) => {
|
|
516
|
-
S(M).attr(
|
|
517
|
-
"transform",
|
|
518
|
-
"translate( " + -h / 2 + ", " + (-1 * f / 2 + p + e / 2) + ")"
|
|
519
|
-
), p += B.height + n;
|
|
520
|
-
}), p += e, o.attr("class", "divider").attr("x1", -h / 2 - a).attr("x2", h / 2 + a).attr("y1", -f / 2 - a + e + p).attr("y2", -f / 2 - a + e + p), p += e, Z.forEach((M) => {
|
|
521
|
-
S(M).attr(
|
|
522
|
-
"transform",
|
|
523
|
-
"translate( " + -h / 2 + ", " + (-1 * f / 2 + p) + ")"
|
|
524
|
-
), p += B.height + n;
|
|
525
|
-
}), l.attr("class", "outer title-state").attr("x", -h / 2 - a).attr("y", -(f / 2) - a).attr("width", h + t.padding).attr("height", f + t.padding), k(t, l), t.intersect = function(M) {
|
|
526
|
-
return m.rect(t, M);
|
|
527
|
-
}, i;
|
|
528
|
-
}, G = {
|
|
529
|
-
rhombus: J,
|
|
530
|
-
question: J,
|
|
531
|
-
rect: Wt,
|
|
532
|
-
labelRect: Xt,
|
|
533
|
-
rectWithTitle: Yt,
|
|
534
|
-
choice: Mt,
|
|
535
|
-
circle: Ut,
|
|
536
|
-
doublecircle: At,
|
|
537
|
-
stadium: Dt,
|
|
538
|
-
hexagon: Ct,
|
|
539
|
-
rect_left_inv_arrow: Tt,
|
|
540
|
-
lean_right: Rt,
|
|
541
|
-
lean_left: It,
|
|
542
|
-
trapezoid: Ht,
|
|
543
|
-
inv_trapezoid: $t,
|
|
544
|
-
rect_right_inv_arrow: Nt,
|
|
545
|
-
cylinder: _t,
|
|
546
|
-
start: jt,
|
|
547
|
-
end: zt,
|
|
548
|
-
note: Bt,
|
|
549
|
-
subroutine: Ot,
|
|
550
|
-
fork: K,
|
|
551
|
-
join: K,
|
|
552
|
-
class_box: Zt
|
|
553
|
-
};
|
|
554
|
-
let X = {};
|
|
555
|
-
const tr = (r, t, a) => v(void 0, null, function* () {
|
|
556
|
-
let n, e;
|
|
557
|
-
if (t.link) {
|
|
558
|
-
let s;
|
|
559
|
-
u().securityLevel === "sandbox" ? s = "_top" : t.linkTarget && (s = t.linkTarget || "_blank"), n = r.insert("svg:a").attr("xlink:href", t.link).attr("target", s), e = yield G[t.shape](n, t, a);
|
|
560
|
-
} else
|
|
561
|
-
e = yield G[t.shape](r, t, a), n = e;
|
|
562
|
-
return t.tooltip && e.attr("title", t.tooltip), t.class && e.attr("class", "node default " + t.class), X[t.id] = n, t.haveCallback && X[t.id].attr("class", X[t.id].attr("class") + " clickable"), n;
|
|
563
|
-
}), rr = (r, t) => {
|
|
564
|
-
X[t.id] = r;
|
|
565
|
-
}, ar = () => {
|
|
566
|
-
X = {};
|
|
567
|
-
}, er = (r) => {
|
|
568
|
-
const t = X[r.id];
|
|
569
|
-
x.trace(
|
|
570
|
-
"Transforming node",
|
|
571
|
-
r.diff,
|
|
572
|
-
r,
|
|
573
|
-
"translate(" + (r.x - r.width / 2 - 5) + ", " + r.width / 2 + ")"
|
|
574
|
-
);
|
|
575
|
-
const a = 8, n = r.diff || 0;
|
|
576
|
-
return r.clusterNode ? t.attr(
|
|
577
|
-
"transform",
|
|
578
|
-
"translate(" + (r.x + n - r.width / 2) + ", " + (r.y - r.height / 2 - a) + ")"
|
|
579
|
-
) : t.attr("transform", "translate(" + r.x + ", " + r.y + ")"), n;
|
|
580
|
-
};
|
|
581
|
-
let O = {}, L = {};
|
|
582
|
-
const sr = () => {
|
|
583
|
-
O = {}, L = {};
|
|
584
|
-
}, ir = (r, t) => {
|
|
585
|
-
const a = $(u().flowchart.htmlLabels), n = t.labelType === "markdown" ? tt(r, t.label, {
|
|
586
|
-
style: t.labelStyle,
|
|
587
|
-
useHtmlLabels: a,
|
|
588
|
-
addSvgBackground: !0
|
|
589
|
-
}) : R(t.label, t.labelStyle);
|
|
590
|
-
x.info("abc82", t, t.labelType);
|
|
591
|
-
const e = r.insert("g").attr("class", "edgeLabel"), s = e.insert("g").attr("class", "label");
|
|
592
|
-
s.node().appendChild(n);
|
|
593
|
-
let i = n.getBBox();
|
|
594
|
-
if (a) {
|
|
595
|
-
const c = n.children[0], o = S(n);
|
|
596
|
-
i = c.getBoundingClientRect(), o.attr("width", i.width), o.attr("height", i.height);
|
|
597
|
-
}
|
|
598
|
-
s.attr("transform", "translate(" + -i.width / 2 + ", " + -i.height / 2 + ")"), O[t.id] = e, t.width = i.width, t.height = i.height;
|
|
599
|
-
let l;
|
|
600
|
-
if (t.startLabelLeft) {
|
|
601
|
-
const c = R(t.startLabelLeft, t.labelStyle), o = r.insert("g").attr("class", "edgeTerminals"), h = o.insert("g").attr("class", "inner");
|
|
602
|
-
l = h.node().appendChild(c);
|
|
603
|
-
const f = c.getBBox();
|
|
604
|
-
h.attr("transform", "translate(" + -f.width / 2 + ", " + -f.height / 2 + ")"), L[t.id] || (L[t.id] = {}), L[t.id].startLeft = o, A(l, t.startLabelLeft);
|
|
605
|
-
}
|
|
606
|
-
if (t.startLabelRight) {
|
|
607
|
-
const c = R(t.startLabelRight, t.labelStyle), o = r.insert("g").attr("class", "edgeTerminals"), h = o.insert("g").attr("class", "inner");
|
|
608
|
-
l = o.node().appendChild(c), h.node().appendChild(c);
|
|
609
|
-
const f = c.getBBox();
|
|
610
|
-
h.attr("transform", "translate(" + -f.width / 2 + ", " + -f.height / 2 + ")"), L[t.id] || (L[t.id] = {}), L[t.id].startRight = o, A(l, t.startLabelRight);
|
|
611
|
-
}
|
|
612
|
-
if (t.endLabelLeft) {
|
|
613
|
-
const c = R(t.endLabelLeft, t.labelStyle), o = r.insert("g").attr("class", "edgeTerminals"), h = o.insert("g").attr("class", "inner");
|
|
614
|
-
l = h.node().appendChild(c);
|
|
615
|
-
const f = c.getBBox();
|
|
616
|
-
h.attr("transform", "translate(" + -f.width / 2 + ", " + -f.height / 2 + ")"), o.node().appendChild(c), L[t.id] || (L[t.id] = {}), L[t.id].endLeft = o, A(l, t.endLabelLeft);
|
|
617
|
-
}
|
|
618
|
-
if (t.endLabelRight) {
|
|
619
|
-
const c = R(t.endLabelRight, t.labelStyle), o = r.insert("g").attr("class", "edgeTerminals"), h = o.insert("g").attr("class", "inner");
|
|
620
|
-
l = h.node().appendChild(c);
|
|
621
|
-
const f = c.getBBox();
|
|
622
|
-
h.attr("transform", "translate(" + -f.width / 2 + ", " + -f.height / 2 + ")"), o.node().appendChild(c), L[t.id] || (L[t.id] = {}), L[t.id].endRight = o, A(l, t.endLabelRight);
|
|
623
|
-
}
|
|
624
|
-
return n;
|
|
625
|
-
};
|
|
626
|
-
function A(r, t) {
|
|
627
|
-
u().flowchart.htmlLabels && r && (r.style.width = t.length * 9 + "px", r.style.height = "12px");
|
|
628
|
-
}
|
|
629
|
-
const nr = (r, t) => {
|
|
630
|
-
x.info("Moving label abc78 ", r.id, r.label, O[r.id]);
|
|
631
|
-
let a = t.updatedPath ? t.updatedPath : t.originalPath;
|
|
632
|
-
if (r.label) {
|
|
633
|
-
const n = O[r.id];
|
|
634
|
-
let e = r.x, s = r.y;
|
|
635
|
-
if (a) {
|
|
636
|
-
const i = U.calcLabelPosition(a);
|
|
637
|
-
x.info(
|
|
638
|
-
"Moving label " + r.label + " from (",
|
|
639
|
-
e,
|
|
640
|
-
",",
|
|
641
|
-
s,
|
|
642
|
-
") to (",
|
|
643
|
-
i.x,
|
|
644
|
-
",",
|
|
645
|
-
i.y,
|
|
646
|
-
") abc78"
|
|
647
|
-
), t.updatedPath && (e = i.x, s = i.y);
|
|
648
|
-
}
|
|
649
|
-
n.attr("transform", "translate(" + e + ", " + s + ")");
|
|
650
|
-
}
|
|
651
|
-
if (r.startLabelLeft) {
|
|
652
|
-
const n = L[r.id].startLeft;
|
|
653
|
-
let e = r.x, s = r.y;
|
|
654
|
-
if (a) {
|
|
655
|
-
const i = U.calcTerminalLabelPosition(r.arrowTypeStart ? 10 : 0, "start_left", a);
|
|
656
|
-
e = i.x, s = i.y;
|
|
657
|
-
}
|
|
658
|
-
n.attr("transform", "translate(" + e + ", " + s + ")");
|
|
659
|
-
}
|
|
660
|
-
if (r.startLabelRight) {
|
|
661
|
-
const n = L[r.id].startRight;
|
|
662
|
-
let e = r.x, s = r.y;
|
|
663
|
-
if (a) {
|
|
664
|
-
const i = U.calcTerminalLabelPosition(
|
|
665
|
-
r.arrowTypeStart ? 10 : 0,
|
|
666
|
-
"start_right",
|
|
667
|
-
a
|
|
668
|
-
);
|
|
669
|
-
e = i.x, s = i.y;
|
|
670
|
-
}
|
|
671
|
-
n.attr("transform", "translate(" + e + ", " + s + ")");
|
|
672
|
-
}
|
|
673
|
-
if (r.endLabelLeft) {
|
|
674
|
-
const n = L[r.id].endLeft;
|
|
675
|
-
let e = r.x, s = r.y;
|
|
676
|
-
if (a) {
|
|
677
|
-
const i = U.calcTerminalLabelPosition(r.arrowTypeEnd ? 10 : 0, "end_left", a);
|
|
678
|
-
e = i.x, s = i.y;
|
|
679
|
-
}
|
|
680
|
-
n.attr("transform", "translate(" + e + ", " + s + ")");
|
|
681
|
-
}
|
|
682
|
-
if (r.endLabelRight) {
|
|
683
|
-
const n = L[r.id].endRight;
|
|
684
|
-
let e = r.x, s = r.y;
|
|
685
|
-
if (a) {
|
|
686
|
-
const i = U.calcTerminalLabelPosition(r.arrowTypeEnd ? 10 : 0, "end_right", a);
|
|
687
|
-
e = i.x, s = i.y;
|
|
688
|
-
}
|
|
689
|
-
n.attr("transform", "translate(" + e + ", " + s + ")");
|
|
690
|
-
}
|
|
691
|
-
}, Ft = (r, t) => {
|
|
692
|
-
const a = r.x, n = r.y, e = Math.abs(t.x - a), s = Math.abs(t.y - n), i = r.width / 2, l = r.height / 2;
|
|
693
|
-
return e >= i || s >= l;
|
|
694
|
-
}, Qt = (r, t, a) => {
|
|
695
|
-
x.warn(`intersection calc abc89:
|
|
696
|
-
outsidePoint: ${JSON.stringify(t)}
|
|
697
|
-
insidePoint : ${JSON.stringify(a)}
|
|
698
|
-
node : x:${r.x} y:${r.y} w:${r.width} h:${r.height}`);
|
|
699
|
-
const n = r.x, e = r.y, s = Math.abs(n - a.x), i = r.width / 2;
|
|
700
|
-
let l = a.x < t.x ? i - s : i + s;
|
|
701
|
-
const c = r.height / 2, o = Math.abs(t.y - a.y), h = Math.abs(t.x - a.x);
|
|
702
|
-
if (Math.abs(e - t.y) * i > Math.abs(n - t.x) * c) {
|
|
703
|
-
let f = a.y < t.y ? t.y - c - e : e - c - t.y;
|
|
704
|
-
l = h * f / o;
|
|
705
|
-
const b = {
|
|
706
|
-
x: a.x < t.x ? a.x + l : a.x - h + l,
|
|
707
|
-
y: a.y < t.y ? a.y + o - f : a.y - o + f
|
|
708
|
-
};
|
|
709
|
-
return l === 0 && (b.x = t.x, b.y = t.y), h === 0 && (b.x = t.x), o === 0 && (b.y = t.y), x.warn(`abc89 topp/bott calc, Q ${o}, q ${f}, R ${h}, r ${l}`, b), b;
|
|
710
|
-
} else {
|
|
711
|
-
a.x < t.x ? l = t.x - i - n : l = n - i - t.x;
|
|
712
|
-
let f = o * l / h, b = a.x < t.x ? a.x + h - l : a.x - h + l, p = a.y < t.y ? a.y + f : a.y - f;
|
|
713
|
-
return x.warn(`sides calc abc89, Q ${o}, q ${f}, R ${h}, r ${l}`, { _x: b, _y: p }), l === 0 && (b = t.x, p = t.y), h === 0 && (b = t.x), o === 0 && (p = t.y), { x: b, y: p };
|
|
714
|
-
}
|
|
715
|
-
}, P = (r, t) => {
|
|
716
|
-
x.warn("abc88 cutPathAtIntersect", r, t);
|
|
717
|
-
let a = [], n = r[0], e = !1;
|
|
718
|
-
return r.forEach((s) => {
|
|
719
|
-
if (x.info("abc88 checking point", s, t), !Ft(t, s) && !e) {
|
|
720
|
-
const i = Qt(t, n, s);
|
|
721
|
-
x.warn("abc88 inside", s, n, i), x.warn("abc88 intersection", i);
|
|
722
|
-
let l = !1;
|
|
723
|
-
a.forEach((c) => {
|
|
724
|
-
l = l || c.x === i.x && c.y === i.y;
|
|
725
|
-
}), a.some((c) => c.x === i.x && c.y === i.y) ? x.warn("abc88 no intersect", i, a) : a.push(i), e = !0;
|
|
726
|
-
} else
|
|
727
|
-
x.warn("abc88 outside", s, n), n = s, e || a.push(s);
|
|
728
|
-
}), x.warn("abc88 returning points", a), a;
|
|
729
|
-
}, lr = function(r, t, a, n, e, s) {
|
|
730
|
-
let i = a.points, l = !1;
|
|
731
|
-
const c = s.node(t.v);
|
|
732
|
-
var o = s.node(t.w);
|
|
733
|
-
x.info("abc88 InsertEdge: ", a), o.intersect && c.intersect && (i = i.slice(1, a.points.length - 1), i.unshift(c.intersect(i[0])), x.info(
|
|
734
|
-
"Last point",
|
|
735
|
-
i[i.length - 1],
|
|
736
|
-
o,
|
|
737
|
-
o.intersect(i[i.length - 1])
|
|
738
|
-
), i.push(o.intersect(i[i.length - 1]))), a.toCluster && (x.info("to cluster abc88", n[a.toCluster]), i = P(a.points, n[a.toCluster].node), l = !0), a.fromCluster && (x.info("from cluster abc88", n[a.fromCluster]), i = P(i.reverse(), n[a.fromCluster].node).reverse(), l = !0);
|
|
739
|
-
const h = i.filter((w) => !Number.isNaN(w.y));
|
|
740
|
-
let f;
|
|
741
|
-
e === "graph" || e === "flowchart" ? f = a.curve || Q : f = Q;
|
|
742
|
-
const b = st().x(function(w) {
|
|
743
|
-
return w.x;
|
|
744
|
-
}).y(function(w) {
|
|
745
|
-
return w.y;
|
|
746
|
-
}).curve(f);
|
|
747
|
-
let p;
|
|
748
|
-
switch (a.thickness) {
|
|
749
|
-
case "normal":
|
|
750
|
-
p = "edge-thickness-normal";
|
|
751
|
-
break;
|
|
752
|
-
case "thick":
|
|
753
|
-
p = "edge-thickness-thick";
|
|
754
|
-
break;
|
|
755
|
-
case "invisible":
|
|
756
|
-
p = "edge-thickness-thick";
|
|
757
|
-
break;
|
|
758
|
-
default:
|
|
759
|
-
p = "";
|
|
760
|
-
}
|
|
761
|
-
switch (a.pattern) {
|
|
762
|
-
case "solid":
|
|
763
|
-
p += " edge-pattern-solid";
|
|
764
|
-
break;
|
|
765
|
-
case "dotted":
|
|
766
|
-
p += " edge-pattern-dotted";
|
|
767
|
-
break;
|
|
768
|
-
case "dashed":
|
|
769
|
-
p += " edge-pattern-dashed";
|
|
770
|
-
break;
|
|
771
|
-
}
|
|
772
|
-
const d = r.append("path").attr("d", b(h)).attr("id", a.id).attr("class", " " + p + (a.classes ? " " + a.classes : "")).attr("style", a.style);
|
|
773
|
-
let y = "";
|
|
774
|
-
switch ((u().flowchart.arrowMarkerAbsolute || u().state.arrowMarkerAbsolute) && (y = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, y = y.replace(/\(/g, "\\("), y = y.replace(/\)/g, "\\)")), x.info("arrowTypeStart", a.arrowTypeStart), x.info("arrowTypeEnd", a.arrowTypeEnd), a.arrowTypeStart) {
|
|
775
|
-
case "arrow_cross":
|
|
776
|
-
d.attr("marker-start", "url(" + y + "#" + e + "-crossStart)");
|
|
777
|
-
break;
|
|
778
|
-
case "arrow_point":
|
|
779
|
-
d.attr("marker-start", "url(" + y + "#" + e + "-pointStart)");
|
|
780
|
-
break;
|
|
781
|
-
case "arrow_barb":
|
|
782
|
-
d.attr("marker-start", "url(" + y + "#" + e + "-barbStart)");
|
|
783
|
-
break;
|
|
784
|
-
case "arrow_circle":
|
|
785
|
-
d.attr("marker-start", "url(" + y + "#" + e + "-circleStart)");
|
|
786
|
-
break;
|
|
787
|
-
case "aggregation":
|
|
788
|
-
d.attr("marker-start", "url(" + y + "#" + e + "-aggregationStart)");
|
|
789
|
-
break;
|
|
790
|
-
case "extension":
|
|
791
|
-
d.attr("marker-start", "url(" + y + "#" + e + "-extensionStart)");
|
|
792
|
-
break;
|
|
793
|
-
case "composition":
|
|
794
|
-
d.attr("marker-start", "url(" + y + "#" + e + "-compositionStart)");
|
|
795
|
-
break;
|
|
796
|
-
case "dependency":
|
|
797
|
-
d.attr("marker-start", "url(" + y + "#" + e + "-dependencyStart)");
|
|
798
|
-
break;
|
|
799
|
-
case "lollipop":
|
|
800
|
-
d.attr("marker-start", "url(" + y + "#" + e + "-lollipopStart)");
|
|
801
|
-
break;
|
|
802
|
-
}
|
|
803
|
-
switch (a.arrowTypeEnd) {
|
|
804
|
-
case "arrow_cross":
|
|
805
|
-
d.attr("marker-end", "url(" + y + "#" + e + "-crossEnd)");
|
|
806
|
-
break;
|
|
807
|
-
case "arrow_point":
|
|
808
|
-
d.attr("marker-end", "url(" + y + "#" + e + "-pointEnd)");
|
|
809
|
-
break;
|
|
810
|
-
case "arrow_barb":
|
|
811
|
-
d.attr("marker-end", "url(" + y + "#" + e + "-barbEnd)");
|
|
812
|
-
break;
|
|
813
|
-
case "arrow_circle":
|
|
814
|
-
d.attr("marker-end", "url(" + y + "#" + e + "-circleEnd)");
|
|
815
|
-
break;
|
|
816
|
-
case "aggregation":
|
|
817
|
-
d.attr("marker-end", "url(" + y + "#" + e + "-aggregationEnd)");
|
|
818
|
-
break;
|
|
819
|
-
case "extension":
|
|
820
|
-
d.attr("marker-end", "url(" + y + "#" + e + "-extensionEnd)");
|
|
821
|
-
break;
|
|
822
|
-
case "composition":
|
|
823
|
-
d.attr("marker-end", "url(" + y + "#" + e + "-compositionEnd)");
|
|
824
|
-
break;
|
|
825
|
-
case "dependency":
|
|
826
|
-
d.attr("marker-end", "url(" + y + "#" + e + "-dependencyEnd)");
|
|
827
|
-
break;
|
|
828
|
-
case "lollipop":
|
|
829
|
-
d.attr("marker-end", "url(" + y + "#" + e + "-lollipopEnd)");
|
|
830
|
-
break;
|
|
831
|
-
}
|
|
832
|
-
let g = {};
|
|
833
|
-
return l && (g.updatedPath = i), g.originalPath = a.points, g;
|
|
834
|
-
};
|
|
835
|
-
export {
|
|
836
|
-
tr as a,
|
|
837
|
-
ir as b,
|
|
838
|
-
lr as c,
|
|
839
|
-
nr as d,
|
|
840
|
-
ar as e,
|
|
841
|
-
sr as f,
|
|
842
|
-
R as g,
|
|
843
|
-
St as h,
|
|
844
|
-
Pt as i,
|
|
845
|
-
E as l,
|
|
846
|
-
er as p,
|
|
847
|
-
rr as s,
|
|
848
|
-
k as u
|
|
849
|
-
};
|