@layers-app/shared 0.0.39-comments.1 → 0.0.39-comments.2
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/{KanbanLayout-Zrp-GCX5.js → KanbanLayout-DGHT9E0N.js} +1 -1
- package/dist/components/CommentsPanel/types.d.ts +8 -0
- package/dist/{index-DaGcVdf6.js → index-BI1_FPl_.js} +15999 -42223
- package/dist/index.d.ts +1 -0
- package/dist/index.js +188 -187
- package/dist/index.umd.cjs +59 -59
- package/package.json +1 -1
- package/dist/layers.0M7J0esZ-Dv4LR3AD.js +0 -320
- package/dist/layers.3NbRpYmD-DseHenG9.js +0 -58
- package/dist/layers.4JzCVvMZ-CAL5es51.js +0 -37
- package/dist/layers.5o5xs_By-C3uBAi0o.js +0 -39
- package/dist/layers.7JqFgE4--yD2PijdI.js +0 -15
- package/dist/layers.9jp0zT5p-BtaIXduC.js +0 -793
- package/dist/layers.9tX9hjoM-DA5HvLtX.js +0 -11692
- package/dist/layers.B3J_fZyl-DcnuDTZ5.js +0 -40
- package/dist/layers.BBDEec2--Dgr5PeNA.js +0 -373
- package/dist/layers.BBSSuOTj-CuN5vcAP.js +0 -42
- package/dist/layers.BDdKUJAF-DDrAkmpE.js +0 -299
- package/dist/layers.BE7tt6pj-Bc0RkfNx.js +0 -5
- package/dist/layers.BH7NG-CF-DKNcXdtY.js +0 -21749
- package/dist/layers.BHn7KE3K-DIYBx7kU.js +0 -44
- package/dist/layers.BIpZCj8M-z5qcwvbl.js +0 -268
- package/dist/layers.BKG94O1d-C8RNLGVB.js +0 -84
- package/dist/layers.BQqf-9pt-QHnFZUGU.js +0 -803
- package/dist/layers.BRBfASmX-USmRfq3F.js +0 -40
- package/dist/layers.BRbnbv5Q-CsWD-MMk.js +0 -1580
- package/dist/layers.BTupUEAy-DFIwfzXW.js +0 -48147
- package/dist/layers.BUuzLIhn-DZiZma1Z.js +0 -41
- package/dist/layers.BVCGdqMm-DZpx5RRd.js +0 -65
- package/dist/layers.BXs8FHo3-Y6_UOUED.js +0 -33
- package/dist/layers.BXy4JdMT-DsfgtmoG.js +0 -41
- package/dist/layers.BYLivd1X-C6JfjRfy.js +0 -2235
- package/dist/layers.B_o0dZtI-Dp1RhKA2.js +0 -1034
- package/dist/layers.BbCfEXyj-BOPI71G1.js +0 -55
- package/dist/layers.BiJ8hfRt-eHla4UVc.js +0 -1510
- package/dist/layers.Bj5NYX-j-BpCPKRpy.js +0 -437
- package/dist/layers.Bj_ndfrI-CPtrGiLq.js +0 -32
- package/dist/layers.BkJp445q-DLv-fFAB.js +0 -32
- package/dist/layers.Bksb2QPF-2VbJoHGP.js +0 -904
- package/dist/layers.Bn8Vcr4Q-BLfsio_2.js +0 -32
- package/dist/layers.Bp7MmS3R-D_U1dPcA.js +0 -1283
- package/dist/layers.BpilXLfW-D9liKMYh.js +0 -6
- package/dist/layers.BsI9FWV9-D91Uedml.js +0 -501
- package/dist/layers.BsUd5wPr-Dy2CbdUO.js +0 -41
- package/dist/layers.Bt9pP_ty-Fm_beroO.js +0 -40
- package/dist/layers.Bxn6DnFg-DHhrOEX5.js +0 -40
- package/dist/layers.Bz-WSBaO-WlzUugyF.js +0 -6
- package/dist/layers.C-5qA4v3-CJ-zWxVv.js +0 -233
- package/dist/layers.C-ywNW9b-B03y0zYk.js +0 -42
- package/dist/layers.C0ZjQj3k-CFZofYjh.js +0 -19
- package/dist/layers.C1GWZnVU-Dd4ayASu.js +0 -33
- package/dist/layers.C1vp8FgL-Cgpiz8-D.js +0 -36
- package/dist/layers.C6lulNcA-yqYL2yrL.js +0 -2965
- package/dist/layers.C7lIplJU-BUFD8jZ2.js +0 -247
- package/dist/layers.C8_lu5UH-C8_lu5UH.js +0 -23
- package/dist/layers.CAu-WZjA-DPZBCz-V.js +0 -42
- package/dist/layers.CBtJbAdN-Cj-KUdzm.js +0 -8
- package/dist/layers.CDx2AjoG-DccLfWpq.js +0 -1126
- package/dist/layers.CFPFCyEq-CDEmpSN_.js +0 -40
- package/dist/layers.CJ1_gd8f-DDnsWfSX.js +0 -1089
- package/dist/layers.CNQjoJj3-DH6vx-SD.js +0 -319
- package/dist/layers.CQA6RMRE-BXEAZne3.js +0 -2479
- package/dist/layers.CS9Nkea7-CRl9CnU-.js +0 -41
- package/dist/layers.CXdn1lVd-kkhttCdF.js +0 -39
- package/dist/layers.CYgM6mK1-VfuzQGi8.js +0 -40
- package/dist/layers.Cbh0ZnrP-0bHy381n.js +0 -38
- package/dist/layers.CeaPTZ2b-BLOSgXUN.js +0 -802
- package/dist/layers.ClCdq2Hz-Nq33obP6.js +0 -6
- package/dist/layers.CqVTtuYm-CX5ThAMt.js +0 -6
- package/dist/layers.Ct4LHLoS-DsVYHOuQ.js +0 -39
- package/dist/layers.CuMp_mh8-Ds0LPYTb.js +0 -1359
- package/dist/layers.Cv-reM2z-Duq6rT7O.js +0 -41
- package/dist/layers.CwjkRMPg-Cs6ZNi1L.js +0 -38
- package/dist/layers.CxOmTN2J-CdMKWYMB.js +0 -202
- package/dist/layers.D0_qLxH6-xyCj286F.js +0 -1555
- package/dist/layers.D2-u1Bp8-BDRrMvg0.js +0 -42
- package/dist/layers.D4fGb2cV-BUFIHFI0.js +0 -1269
- package/dist/layers.D6Dbhm1Q-BzmYrtHw.js +0 -40
- package/dist/layers.D7W7Lzv2-CxXoeMp1.js +0 -790
- package/dist/layers.D7jGxypv-IWOh3OLf.js +0 -8
- package/dist/layers.DA9ck-MO-Cqd6OW0D.js +0 -36
- package/dist/layers.DBYXAcOz-BX_F26c6.js +0 -40
- package/dist/layers.DCSgw3lU-B9bKZvhj.js +0 -39
- package/dist/layers.DGuOiUst-BwSsM2E8.js +0 -40
- package/dist/layers.DIIFfMQs-D-Dbci1v.js +0 -41
- package/dist/layers.DLvGOLBc-JWyXkvEo.js +0 -1265
- package/dist/layers.DLwuMfdd-DpWVWJIn.js +0 -84
- package/dist/layers.DN9HoVxI-BHiOHhvL.js +0 -18
- package/dist/layers.DPAgpxzn-DcZCtAnG.js +0 -32
- package/dist/layers.DQS5qUUh-DIFojcoA.js +0 -36
- package/dist/layers.DSKtAtTl-DSDuMwGr.js +0 -423
- package/dist/layers.DTdQRt9t-Bz7R9Vhf.js +0 -21938
- package/dist/layers.DYdc5q0J-i8MJJ9aQ.js +0 -38
- package/dist/layers.DZPFx0xX-vBQA4TBy.js +0 -41
- package/dist/layers.DjUOC4st-BkHeCwco.js +0 -16
- package/dist/layers.DjqQyNcM-iwW8wIPQ.js +0 -40
- package/dist/layers.DovN5XJl-Dd2wMX5W.js +0 -35
- package/dist/layers.Dv3Sj2XI-DVTxuZIa.js +0 -769
- package/dist/layers.DwEKp0yH-B27p8CS8.js +0 -39
- package/dist/layers.DwuzMny7-sTqt8umI.js +0 -37
- package/dist/layers.DxA6ocdw-DxA6ocdw.js +0 -70
- package/dist/layers.Dy1naDTQ-D-9Lu-r_.js +0 -14
- package/dist/layers.Gt5A3tMM-4pNWGwHY.js +0 -931
- package/dist/layers.K-7Gu1_x-CNULEfQY.js +0 -960
- package/dist/layers.KyTKOuZZ-f-ZzX8_u.js +0 -42
- package/dist/layers.U97Ybm7Q-ZO6PKDFe.js +0 -14
- package/dist/layers.VyaHkISm-DijGN0L3.js +0 -220
- package/dist/layers.ZGBCn3zX-CgKiMp5K.js +0 -41
- package/dist/layers.Zy6ZgZiH-BQgnY83P.js +0 -39
- package/dist/layers.b0h5ZBmD-D13KqT9v.js +0 -61
- package/dist/layers.bLwsNWeP-DN6v6o8z.js +0 -36
- package/dist/layers.bxNX0iN9-CDrSOhta.js +0 -37
- package/dist/layers.i787zp_7-CdmHpv2W.js +0 -35
- package/dist/layers.lCpg7dOn-DZXcjLcw.js +0 -21
- package/dist/layers.mpMlUsl6-DPrPAW4a.js +0 -37
- package/dist/layers.nlKwIrbC-CGIhMVFp.js +0 -34
- package/dist/layers.pGa4_XI1-QfsNs9ym.js +0 -32
- package/dist/layers.q6HEryYi-BfQFMIuE.js +0 -39
- package/dist/layers.qApELtc--BF8AQB24.js +0 -39
- package/dist/layers.sIRS0zFx-8Y7Eyk8H.js +0 -1088
- package/dist/layers.sP0b2kja-Cqui1r6E.js +0 -32
- package/dist/layers.uMXcx8OG-CU69bWSU.js +0 -186
- package/dist/layers.v5s2UJIr-BPieEBx3.js +0 -39
- package/dist/layers.vjG7fiQ8-z8OCuiMk.js +0 -9140
|
@@ -1,790 +0,0 @@
|
|
|
1
|
-
import { j as je, X as Xe } from "./layers.CDx2AjoG-DccLfWpq.js";
|
|
2
|
-
import { l as $, g as So, d as kt, Y as J_, _ as _y, $ as uy, a0 as Ff, t as Ol, V as H0, j as go } from "./layers.vjG7fiQ8-z8OCuiMk.js";
|
|
3
|
-
import * as t from "lodash-es";
|
|
4
|
-
import { $ as $n } from "./layers.D4fGb2cV-BUFIHFI0.js";
|
|
5
|
-
import { m } from "./layers.C7lIplJU-BUFD8jZ2.js";
|
|
6
|
-
import { w as we, u as ue$1, Q as Q$1, O as O$1, e as ee$1, d as de$1, b as be, f as fe$1, p as pe$1 } from "./layers.Bj5NYX-j-BpCPKRpy.js";
|
|
7
|
-
import { P } from "./layers.C1GWZnVU-Dd4ayASu.js";
|
|
8
|
-
import "./layers.BH7NG-CF-DKNcXdtY.js";
|
|
9
|
-
function Ct(r) {
|
|
10
|
-
if (!r.ok) throw new Error(r.status + " " + r.statusText);
|
|
11
|
-
return r.text();
|
|
12
|
-
}
|
|
13
|
-
function It(r, e) {
|
|
14
|
-
return fetch(r, e).then(Ct);
|
|
15
|
-
}
|
|
16
|
-
function Bt(r) {
|
|
17
|
-
return (e, t2) => It(e, t2).then((n) => new DOMParser().parseFromString(n, r));
|
|
18
|
-
}
|
|
19
|
-
var Mt = Bt("image/svg+xml"), Y = {
|
|
20
|
-
normal: Rt,
|
|
21
|
-
vee: Gt,
|
|
22
|
-
undirected: Pt
|
|
23
|
-
};
|
|
24
|
-
function Dt(r) {
|
|
25
|
-
Y = r;
|
|
26
|
-
}
|
|
27
|
-
function Rt(r, e, t2, n) {
|
|
28
|
-
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");
|
|
29
|
-
O$1(s, t2[n + "Style"]), t2[n + "Class"] && s.attr("class", t2[n + "Class"]);
|
|
30
|
-
}
|
|
31
|
-
function Gt(r, e, t2, n) {
|
|
32
|
-
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");
|
|
33
|
-
O$1(s, t2[n + "Style"]), t2[n + "Class"] && s.attr("class", t2[n + "Class"]);
|
|
34
|
-
}
|
|
35
|
-
function Pt(r, e, t2, n) {
|
|
36
|
-
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");
|
|
37
|
-
O$1(s, t2[n + "Style"]), t2[n + "Class"] && s.attr("class", t2[n + "Class"]);
|
|
38
|
-
}
|
|
39
|
-
function Ut(r, e) {
|
|
40
|
-
var t2 = r;
|
|
41
|
-
return t2.node().appendChild(e.label), O$1(t2, e.labelStyle), t2;
|
|
42
|
-
}
|
|
43
|
-
function $t(r, e) {
|
|
44
|
-
for (var t2 = r.append("text"), n = Wt(e.label).split(`
|
|
45
|
-
`), a = 0; a < n.length; a++)
|
|
46
|
-
t2.append("tspan").attr("xml:space", "preserve").attr("dy", "1em").attr("x", "1").text(n[a]);
|
|
47
|
-
return O$1(t2, e.labelStyle), t2;
|
|
48
|
-
}
|
|
49
|
-
function Wt(r) {
|
|
50
|
-
for (var e = "", t2 = false, n, a = 0; a < r.length; ++a)
|
|
51
|
-
if (n = r[a], t2) {
|
|
52
|
-
switch (n) {
|
|
53
|
-
case "n":
|
|
54
|
-
e += `
|
|
55
|
-
`;
|
|
56
|
-
break;
|
|
57
|
-
default:
|
|
58
|
-
e += n;
|
|
59
|
-
}
|
|
60
|
-
t2 = false;
|
|
61
|
-
} else n === "\\" ? t2 = true : e += n;
|
|
62
|
-
return e;
|
|
63
|
-
}
|
|
64
|
-
function K(r, e, t2) {
|
|
65
|
-
var n = e.label, a = r.append("g");
|
|
66
|
-
e.labelType === "svg" ? Ut(a, e) : typeof n != "string" || e.labelType === "html" ? ee$1(a, e) : $t(a, e);
|
|
67
|
-
var s = a.node().getBBox(), i;
|
|
68
|
-
switch (t2) {
|
|
69
|
-
case "top":
|
|
70
|
-
i = -e.height / 2;
|
|
71
|
-
break;
|
|
72
|
-
case "bottom":
|
|
73
|
-
i = e.height / 2 - s.height;
|
|
74
|
-
break;
|
|
75
|
-
default:
|
|
76
|
-
i = -s.height / 2;
|
|
77
|
-
}
|
|
78
|
-
return a.attr("transform", "translate(" + -s.width / 2 + "," + i + ")"), a;
|
|
79
|
-
}
|
|
80
|
-
var H = function(r, e) {
|
|
81
|
-
var t2 = e.nodes().filter(function(s) {
|
|
82
|
-
return de$1(e, s);
|
|
83
|
-
}), n = r.selectAll("g.cluster").data(t2, function(s) {
|
|
84
|
-
return s;
|
|
85
|
-
});
|
|
86
|
-
fe$1(n.exit(), e).style("opacity", 0).remove();
|
|
87
|
-
var a = n.enter().append("g").attr("class", "cluster").attr("id", function(s) {
|
|
88
|
-
var i = e.node(s);
|
|
89
|
-
return i.id;
|
|
90
|
-
}).style("opacity", 0).each(function(s) {
|
|
91
|
-
var i = e.node(s), o = kt(this);
|
|
92
|
-
kt(this).append("rect");
|
|
93
|
-
var c = o.append("g").attr("class", "label");
|
|
94
|
-
K(c, i, i.clusterLabelPos);
|
|
95
|
-
});
|
|
96
|
-
return n = n.merge(a), n = fe$1(n, e).style("opacity", 1), n.selectAll("rect").each(function(s) {
|
|
97
|
-
var i = e.node(s), o = kt(this);
|
|
98
|
-
O$1(o, i.style);
|
|
99
|
-
}), n;
|
|
100
|
-
};
|
|
101
|
-
function Vt(r) {
|
|
102
|
-
H = r;
|
|
103
|
-
}
|
|
104
|
-
let X = function(r, e) {
|
|
105
|
-
var t$1 = r.selectAll("g.edgeLabel").data(e.edges(), function(a) {
|
|
106
|
-
return pe$1(a);
|
|
107
|
-
}).classed("update", true);
|
|
108
|
-
t$1.exit().remove(), t$1.enter().append("g").classed("edgeLabel", true).style("opacity", 0), t$1 = r.selectAll("g.edgeLabel"), t$1.each(function(a) {
|
|
109
|
-
var s = kt(this);
|
|
110
|
-
s.select(".label").remove();
|
|
111
|
-
var i = e.edge(a), o = K(s, e.edge(a), 0).classed("label", true), c = o.node().getBBox();
|
|
112
|
-
i.labelId && o.attr("id", i.labelId), t.has(i, "width") || (i.width = c.width), t.has(i, "height") || (i.height = c.height);
|
|
113
|
-
});
|
|
114
|
-
var n;
|
|
115
|
-
return t$1.exit ? n = t$1.exit() : n = t$1.selectAll(null), fe$1(n, e).style("opacity", 0).remove(), t$1;
|
|
116
|
-
};
|
|
117
|
-
function zt(r) {
|
|
118
|
-
X = r;
|
|
119
|
-
}
|
|
120
|
-
function Z(r, e) {
|
|
121
|
-
return r.intersect(e);
|
|
122
|
-
}
|
|
123
|
-
var F = function(r, e, t$1) {
|
|
124
|
-
var n = r.selectAll("g.edgePath").data(e.edges(), function(i) {
|
|
125
|
-
return pe$1(i);
|
|
126
|
-
}).classed("update", true), a = qt(n, e);
|
|
127
|
-
Qt(n, e);
|
|
128
|
-
var s = n.merge !== void 0 ? n.merge(a) : n;
|
|
129
|
-
return fe$1(s, e).style("opacity", 1), s.each(function(i) {
|
|
130
|
-
var o = kt(this), c = e.edge(i);
|
|
131
|
-
c.elem = this, c.id && o.attr("id", c.id), be(
|
|
132
|
-
o,
|
|
133
|
-
c.class,
|
|
134
|
-
(o.classed("update") ? "update " : "") + "edgePath"
|
|
135
|
-
);
|
|
136
|
-
}), s.selectAll("path.path").each(function(i) {
|
|
137
|
-
var o = e.edge(i);
|
|
138
|
-
o.arrowheadId = t.uniqueId("arrowhead");
|
|
139
|
-
var c = kt(this).attr("marker-end", function() {
|
|
140
|
-
return "url(" + Ht(location.href, o.arrowheadId) + ")";
|
|
141
|
-
}).style("fill", "none");
|
|
142
|
-
fe$1(c, e).attr("d", function(d) {
|
|
143
|
-
return Xt(e, d);
|
|
144
|
-
}), O$1(c, o.style);
|
|
145
|
-
}), s.selectAll("defs *").remove(), s.selectAll("defs").each(function(i) {
|
|
146
|
-
var o = e.edge(i), c = t$1[o.arrowhead];
|
|
147
|
-
c(kt(this), o.arrowheadId, o, "arrowhead");
|
|
148
|
-
}), s;
|
|
149
|
-
};
|
|
150
|
-
function Yt(r) {
|
|
151
|
-
F = r;
|
|
152
|
-
}
|
|
153
|
-
function Ht(r, e) {
|
|
154
|
-
var t2 = r.split("#")[0];
|
|
155
|
-
return t2 + "#" + e;
|
|
156
|
-
}
|
|
157
|
-
function Xt(r, e) {
|
|
158
|
-
var t2 = r.edge(e), n = r.node(e.v), a = r.node(e.w), s = t2.points.slice(1, t2.points.length - 1);
|
|
159
|
-
return s.unshift(Z(n, s[0])), s.push(Z(a, s[s.length - 1])), it(t2, s);
|
|
160
|
-
}
|
|
161
|
-
function it(r, e) {
|
|
162
|
-
var t2 = (P || Mt.line)().x(function(n) {
|
|
163
|
-
return n.x;
|
|
164
|
-
}).y(function(n) {
|
|
165
|
-
return n.y;
|
|
166
|
-
});
|
|
167
|
-
return (t2.curve || t2.interpolate)(r.curve), t2(e);
|
|
168
|
-
}
|
|
169
|
-
function Ft(r) {
|
|
170
|
-
var e = r.getBBox(), t2 = r.ownerSVGElement.getScreenCTM().inverse().multiply(r.getScreenCTM()).translate(e.width / 2, e.height / 2);
|
|
171
|
-
return { x: t2.e, y: t2.f };
|
|
172
|
-
}
|
|
173
|
-
function qt(r, e) {
|
|
174
|
-
var t$1 = r.enter().append("g").attr("class", "edgePath").style("opacity", 0);
|
|
175
|
-
return t$1.append("path").attr("class", "path").attr("d", function(n) {
|
|
176
|
-
var a = e.edge(n), s = e.node(n.v).elem, i = t.range(a.points.length).map(function() {
|
|
177
|
-
return Ft(s);
|
|
178
|
-
});
|
|
179
|
-
return it(a, i);
|
|
180
|
-
}), t$1.append("defs"), t$1;
|
|
181
|
-
}
|
|
182
|
-
function Qt(r, e) {
|
|
183
|
-
var t2 = r.exit();
|
|
184
|
-
fe$1(t2, e).style("opacity", 0).remove();
|
|
185
|
-
}
|
|
186
|
-
var q = function(r, e, t$1) {
|
|
187
|
-
var n = e.nodes().filter(function(i) {
|
|
188
|
-
return !de$1(e, i);
|
|
189
|
-
}), a = r.selectAll("g.node").data(n, function(i) {
|
|
190
|
-
return i;
|
|
191
|
-
}).classed("update", true);
|
|
192
|
-
a.exit().remove(), a.enter().append("g").attr("class", "node").style("opacity", 0), a = r.selectAll("g.node"), a.each(function(i) {
|
|
193
|
-
var o = e.node(i), c = kt(this);
|
|
194
|
-
be(
|
|
195
|
-
c,
|
|
196
|
-
o.class,
|
|
197
|
-
(c.classed("update") ? "update " : "") + "node"
|
|
198
|
-
), c.select("g.label").remove();
|
|
199
|
-
var d = c.append("g").attr("class", "label"), l = K(d, o), v = t$1[o.shape], h = t.pick(l.node().getBBox(), "width", "height");
|
|
200
|
-
o.elem = this, o.id && c.attr("id", o.id), o.labelId && d.attr("id", o.labelId), t.has(o, "width") && (h.width = o.width), t.has(o, "height") && (h.height = o.height), h.width += o.paddingLeft + o.paddingRight, h.height += o.paddingTop + o.paddingBottom, d.attr(
|
|
201
|
-
"transform",
|
|
202
|
-
"translate(" + (o.paddingLeft - o.paddingRight) / 2 + "," + (o.paddingTop - o.paddingBottom) / 2 + ")"
|
|
203
|
-
);
|
|
204
|
-
var u = kt(this);
|
|
205
|
-
u.select(".label-container").remove();
|
|
206
|
-
var p = v(u, h, o).classed("label-container", true);
|
|
207
|
-
O$1(p, o.style);
|
|
208
|
-
var w = p.node().getBBox();
|
|
209
|
-
o.width = w.width, o.height = w.height;
|
|
210
|
-
});
|
|
211
|
-
var s;
|
|
212
|
-
return a.exit ? s = a.exit() : s = a.selectAll(null), fe$1(s, e).style("opacity", 0).remove(), a;
|
|
213
|
-
};
|
|
214
|
-
function Kt(r) {
|
|
215
|
-
q = r;
|
|
216
|
-
}
|
|
217
|
-
function Jt(r, e) {
|
|
218
|
-
var t2 = r.filter(function() {
|
|
219
|
-
return !kt(this).classed("update");
|
|
220
|
-
});
|
|
221
|
-
function n(a) {
|
|
222
|
-
var s = e.node(a);
|
|
223
|
-
return "translate(" + s.x + "," + s.y + ")";
|
|
224
|
-
}
|
|
225
|
-
t2.attr("transform", n), fe$1(r, e).style("opacity", 1).attr("transform", n), fe$1(t2.selectAll("rect"), e).attr("width", function(a) {
|
|
226
|
-
return e.node(a).width;
|
|
227
|
-
}).attr("height", function(a) {
|
|
228
|
-
return e.node(a).height;
|
|
229
|
-
}).attr("x", function(a) {
|
|
230
|
-
var s = e.node(a);
|
|
231
|
-
return -s.width / 2;
|
|
232
|
-
}).attr("y", function(a) {
|
|
233
|
-
var s = e.node(a);
|
|
234
|
-
return -s.height / 2;
|
|
235
|
-
});
|
|
236
|
-
}
|
|
237
|
-
function Zt(r, e) {
|
|
238
|
-
var t$1 = r.filter(function() {
|
|
239
|
-
return !kt(this).classed("update");
|
|
240
|
-
});
|
|
241
|
-
function n(a) {
|
|
242
|
-
var s = e.edge(a);
|
|
243
|
-
return t.has(s, "x") ? "translate(" + s.x + "," + s.y + ")" : "";
|
|
244
|
-
}
|
|
245
|
-
t$1.attr("transform", n), fe$1(r, e).style("opacity", 1).attr("transform", n);
|
|
246
|
-
}
|
|
247
|
-
function Ot(r, e) {
|
|
248
|
-
var t2 = r.filter(function() {
|
|
249
|
-
return !kt(this).classed("update");
|
|
250
|
-
});
|
|
251
|
-
function n(a) {
|
|
252
|
-
var s = e.node(a);
|
|
253
|
-
return "translate(" + s.x + "," + s.y + ")";
|
|
254
|
-
}
|
|
255
|
-
t2.attr("transform", n), fe$1(r, e).style("opacity", 1).attr("transform", n);
|
|
256
|
-
}
|
|
257
|
-
function ot(r, e, t2, n) {
|
|
258
|
-
var a = r.x, s = r.y, i = a - n.x, o = s - n.y, c = Math.sqrt(e * e * o * o + t2 * t2 * i * i), d = Math.abs(e * t2 * i / c);
|
|
259
|
-
n.x < a && (d = -d);
|
|
260
|
-
var l = Math.abs(e * t2 * o / c);
|
|
261
|
-
return n.y < s && (l = -l), { x: a + d, y: s + l };
|
|
262
|
-
}
|
|
263
|
-
function jt(r, e, t2) {
|
|
264
|
-
return ot(r, e, e, t2);
|
|
265
|
-
}
|
|
266
|
-
function te(r, e, t2, n) {
|
|
267
|
-
var a, s, i, o, c, d, l, v, h, u, p, w, f, y, S;
|
|
268
|
-
if (a = e.y - r.y, i = r.x - e.x, c = e.x * r.y - r.x * e.y, h = a * t2.x + i * t2.y + c, u = a * n.x + i * n.y + c, !(h !== 0 && u !== 0 && O(h, u)) && (s = n.y - t2.y, o = t2.x - n.x, d = n.x * t2.y - t2.x * n.y, l = s * r.x + o * r.y + d, v = s * e.x + o * e.y + d, !(l !== 0 && v !== 0 && O(l, v)) && (p = a * o - s * i, p !== 0)))
|
|
269
|
-
return w = Math.abs(p / 2), f = i * d - o * c, y = f < 0 ? (f - w) / p : (f + w) / p, f = s * c - a * d, S = f < 0 ? (f - w) / p : (f + w) / p, { x: y, y: S };
|
|
270
|
-
}
|
|
271
|
-
function O(r, e) {
|
|
272
|
-
return r * e > 0;
|
|
273
|
-
}
|
|
274
|
-
function T(r, e, t2) {
|
|
275
|
-
var n = r.x, a = r.y, s = [], i = Number.POSITIVE_INFINITY, o = Number.POSITIVE_INFINITY;
|
|
276
|
-
e.forEach(function(p) {
|
|
277
|
-
i = Math.min(i, p.x), o = Math.min(o, p.y);
|
|
278
|
-
});
|
|
279
|
-
for (var c = n - r.width / 2 - i, d = a - r.height / 2 - o, l = 0; l < e.length; l++) {
|
|
280
|
-
var v = e[l], h = e[l < e.length - 1 ? l + 1 : 0], u = te(
|
|
281
|
-
r,
|
|
282
|
-
t2,
|
|
283
|
-
{ x: c + v.x, y: d + v.y },
|
|
284
|
-
{ x: c + h.x, y: d + h.y }
|
|
285
|
-
);
|
|
286
|
-
u && s.push(u);
|
|
287
|
-
}
|
|
288
|
-
return s.length ? (s.length > 1 && s.sort(function(p, w) {
|
|
289
|
-
var f = p.x - t2.x, y = p.y - t2.y, S = Math.sqrt(f * f + y * y), I = w.x - t2.x, _ = w.y - t2.y, U = Math.sqrt(I * I + _ * _);
|
|
290
|
-
return S < U ? -1 : S === U ? 0 : 1;
|
|
291
|
-
}), s[0]) : (console.log("NO INTERSECTION FOUND, RETURN NODE CENTER", r), r);
|
|
292
|
-
}
|
|
293
|
-
function J(r, e) {
|
|
294
|
-
var t2 = r.x, n = r.y, a = e.x - t2, s = e.y - n, i = r.width / 2, o = r.height / 2, c, d;
|
|
295
|
-
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: t2 + c, y: n + d };
|
|
296
|
-
}
|
|
297
|
-
var Q = {
|
|
298
|
-
rect: re,
|
|
299
|
-
ellipse: ae,
|
|
300
|
-
circle: ne,
|
|
301
|
-
diamond: se
|
|
302
|
-
};
|
|
303
|
-
function ee(r) {
|
|
304
|
-
Q = r;
|
|
305
|
-
}
|
|
306
|
-
function re(r, e, t2) {
|
|
307
|
-
var n = r.insert("rect", ":first-child").attr("rx", t2.rx).attr("ry", t2.ry).attr("x", -e.width / 2).attr("y", -e.height / 2).attr("width", e.width).attr("height", e.height);
|
|
308
|
-
return t2.intersect = function(a) {
|
|
309
|
-
return J(t2, a);
|
|
310
|
-
}, n;
|
|
311
|
-
}
|
|
312
|
-
function ae(r, e, t2) {
|
|
313
|
-
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);
|
|
314
|
-
return t2.intersect = function(i) {
|
|
315
|
-
return ot(t2, n, a, i);
|
|
316
|
-
}, s;
|
|
317
|
-
}
|
|
318
|
-
function ne(r, e, t2) {
|
|
319
|
-
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);
|
|
320
|
-
return t2.intersect = function(s) {
|
|
321
|
-
return jt(t2, n, s);
|
|
322
|
-
}, a;
|
|
323
|
-
}
|
|
324
|
-
function se(r, e, t2) {
|
|
325
|
-
var n = e.width * Math.SQRT2 / 2, a = e.height * Math.SQRT2 / 2, s = [
|
|
326
|
-
{ x: 0, y: -a },
|
|
327
|
-
{ x: -n, y: 0 },
|
|
328
|
-
{ x: 0, y: a },
|
|
329
|
-
{ x: n, y: 0 }
|
|
330
|
-
], i = r.insert("polygon", ":first-child").attr(
|
|
331
|
-
"points",
|
|
332
|
-
s.map(function(o) {
|
|
333
|
-
return o.x + "," + o.y;
|
|
334
|
-
}).join(" ")
|
|
335
|
-
);
|
|
336
|
-
return t2.intersect = function(o) {
|
|
337
|
-
return T(t2, s, o);
|
|
338
|
-
}, i;
|
|
339
|
-
}
|
|
340
|
-
function ie() {
|
|
341
|
-
var r = function(e, t2) {
|
|
342
|
-
ce(t2);
|
|
343
|
-
var n = M(e, "output"), a = M(n, "clusters"), s = M(n, "edgePaths"), i = X(M(n, "edgeLabels"), t2), o = q(M(n, "nodes"), t2, Q);
|
|
344
|
-
$n(t2), Ot(o, t2), Zt(i, t2), F(s, t2, Y);
|
|
345
|
-
var c = H(a, t2);
|
|
346
|
-
Jt(c, t2), de(t2);
|
|
347
|
-
};
|
|
348
|
-
return r.createNodes = function(e) {
|
|
349
|
-
return arguments.length ? (Kt(e), r) : q;
|
|
350
|
-
}, r.createClusters = function(e) {
|
|
351
|
-
return arguments.length ? (Vt(e), r) : H;
|
|
352
|
-
}, r.createEdgeLabels = function(e) {
|
|
353
|
-
return arguments.length ? (zt(e), r) : X;
|
|
354
|
-
}, r.createEdgePaths = function(e) {
|
|
355
|
-
return arguments.length ? (Yt(e), r) : F;
|
|
356
|
-
}, r.shapes = function(e) {
|
|
357
|
-
return arguments.length ? (ee(e), r) : Q;
|
|
358
|
-
}, r.arrows = function(e) {
|
|
359
|
-
return arguments.length ? (Dt(e), r) : Y;
|
|
360
|
-
}, r;
|
|
361
|
-
}
|
|
362
|
-
var oe = {
|
|
363
|
-
paddingLeft: 10,
|
|
364
|
-
paddingRight: 10,
|
|
365
|
-
paddingTop: 10,
|
|
366
|
-
paddingBottom: 10,
|
|
367
|
-
rx: 0,
|
|
368
|
-
ry: 0,
|
|
369
|
-
shape: "rect"
|
|
370
|
-
}, le = {
|
|
371
|
-
arrowhead: "normal",
|
|
372
|
-
curve: Ff
|
|
373
|
-
};
|
|
374
|
-
function ce(r) {
|
|
375
|
-
r.nodes().forEach(function(e) {
|
|
376
|
-
var t$1 = r.node(e);
|
|
377
|
-
!t.has(t$1, "label") && !r.children(e).length && (t$1.label = e), t.has(t$1, "paddingX") && t.defaults(t$1, {
|
|
378
|
-
paddingLeft: t$1.paddingX,
|
|
379
|
-
paddingRight: t$1.paddingX
|
|
380
|
-
}), t.has(t$1, "paddingY") && t.defaults(t$1, {
|
|
381
|
-
paddingTop: t$1.paddingY,
|
|
382
|
-
paddingBottom: t$1.paddingY
|
|
383
|
-
}), t.has(t$1, "padding") && t.defaults(t$1, {
|
|
384
|
-
paddingLeft: t$1.padding,
|
|
385
|
-
paddingRight: t$1.padding,
|
|
386
|
-
paddingTop: t$1.padding,
|
|
387
|
-
paddingBottom: t$1.padding
|
|
388
|
-
}), t.defaults(t$1, oe), t.each(["paddingLeft", "paddingRight", "paddingTop", "paddingBottom"], function(n) {
|
|
389
|
-
t$1[n] = Number(t$1[n]);
|
|
390
|
-
}), t.has(t$1, "width") && (t$1._prevWidth = t$1.width), t.has(t$1, "height") && (t$1._prevHeight = t$1.height);
|
|
391
|
-
}), r.edges().forEach(function(e) {
|
|
392
|
-
var t$1 = r.edge(e);
|
|
393
|
-
t.has(t$1, "label") || (t$1.label = ""), t.defaults(t$1, le);
|
|
394
|
-
});
|
|
395
|
-
}
|
|
396
|
-
function de(r) {
|
|
397
|
-
t.each(r.nodes(), function(e) {
|
|
398
|
-
var t$1 = r.node(e);
|
|
399
|
-
t.has(t$1, "_prevWidth") ? t$1.width = t$1._prevWidth : delete t$1.width, t.has(t$1, "_prevHeight") ? t$1.height = t$1._prevHeight : delete t$1.height, delete t$1._prevWidth, delete t$1._prevHeight;
|
|
400
|
-
});
|
|
401
|
-
}
|
|
402
|
-
function M(r, e) {
|
|
403
|
-
var t2 = r.select("g." + e);
|
|
404
|
-
return t2.empty() && (t2 = r.append("g").attr("class", e)), t2;
|
|
405
|
-
}
|
|
406
|
-
function lt(r, e, t2) {
|
|
407
|
-
const n = e.width, a = e.height, s = (n + a) * 0.9, i = [
|
|
408
|
-
{ x: s / 2, y: 0 },
|
|
409
|
-
{ x: s, y: -s / 2 },
|
|
410
|
-
{ x: s / 2, y: -s },
|
|
411
|
-
{ x: 0, y: -s / 2 }
|
|
412
|
-
], o = A(r, s, s, i);
|
|
413
|
-
return t2.intersect = function(c) {
|
|
414
|
-
return T(t2, i, c);
|
|
415
|
-
}, o;
|
|
416
|
-
}
|
|
417
|
-
function ct(r, e, t2) {
|
|
418
|
-
const a = e.height, s = a / 4, i = e.width + 2 * s, o = [
|
|
419
|
-
{ x: s, y: 0 },
|
|
420
|
-
{ x: i - s, y: 0 },
|
|
421
|
-
{ x: i, y: -a / 2 },
|
|
422
|
-
{ x: i - s, y: -a },
|
|
423
|
-
{ x: s, y: -a },
|
|
424
|
-
{ x: 0, y: -a / 2 }
|
|
425
|
-
], c = A(r, i, a, o);
|
|
426
|
-
return t2.intersect = function(d) {
|
|
427
|
-
return T(t2, o, d);
|
|
428
|
-
}, c;
|
|
429
|
-
}
|
|
430
|
-
function dt(r, e, t2) {
|
|
431
|
-
const n = e.width, a = e.height, s = [
|
|
432
|
-
{ x: -a / 2, y: 0 },
|
|
433
|
-
{ x: n, y: 0 },
|
|
434
|
-
{ x: n, y: -a },
|
|
435
|
-
{ x: -a / 2, y: -a },
|
|
436
|
-
{ x: 0, y: -a / 2 }
|
|
437
|
-
], i = A(r, n, a, s);
|
|
438
|
-
return t2.intersect = function(o) {
|
|
439
|
-
return T(t2, s, o);
|
|
440
|
-
}, i;
|
|
441
|
-
}
|
|
442
|
-
function ht(r, e, t2) {
|
|
443
|
-
const n = e.width, a = e.height, s = [
|
|
444
|
-
{ x: -2 * a / 6, y: 0 },
|
|
445
|
-
{ x: n - a / 6, y: 0 },
|
|
446
|
-
{ x: n + 2 * a / 6, y: -a },
|
|
447
|
-
{ x: a / 6, y: -a }
|
|
448
|
-
], i = A(r, n, a, s);
|
|
449
|
-
return t2.intersect = function(o) {
|
|
450
|
-
return T(t2, s, o);
|
|
451
|
-
}, i;
|
|
452
|
-
}
|
|
453
|
-
function ut(r, e, t2) {
|
|
454
|
-
const n = e.width, a = e.height, s = [
|
|
455
|
-
{ x: 2 * a / 6, y: 0 },
|
|
456
|
-
{ x: n + a / 6, y: 0 },
|
|
457
|
-
{ x: n - 2 * a / 6, y: -a },
|
|
458
|
-
{ x: -a / 6, y: -a }
|
|
459
|
-
], i = A(r, n, a, s);
|
|
460
|
-
return t2.intersect = function(o) {
|
|
461
|
-
return T(t2, s, o);
|
|
462
|
-
}, i;
|
|
463
|
-
}
|
|
464
|
-
function ft(r, e, t2) {
|
|
465
|
-
const n = e.width, a = e.height, s = [
|
|
466
|
-
{ x: -2 * a / 6, y: 0 },
|
|
467
|
-
{ x: n + 2 * a / 6, y: 0 },
|
|
468
|
-
{ x: n - a / 6, y: -a },
|
|
469
|
-
{ x: a / 6, y: -a }
|
|
470
|
-
], i = A(r, n, a, s);
|
|
471
|
-
return t2.intersect = function(o) {
|
|
472
|
-
return T(t2, s, o);
|
|
473
|
-
}, i;
|
|
474
|
-
}
|
|
475
|
-
function pt(r, e, t2) {
|
|
476
|
-
const n = e.width, a = e.height, s = [
|
|
477
|
-
{ x: a / 6, y: 0 },
|
|
478
|
-
{ x: n - a / 6, y: 0 },
|
|
479
|
-
{ x: n + 2 * a / 6, y: -a },
|
|
480
|
-
{ x: -2 * a / 6, y: -a }
|
|
481
|
-
], i = A(r, n, a, s);
|
|
482
|
-
return t2.intersect = function(o) {
|
|
483
|
-
return T(t2, s, o);
|
|
484
|
-
}, i;
|
|
485
|
-
}
|
|
486
|
-
function vt(r, e, t2) {
|
|
487
|
-
const n = e.width, a = e.height, s = [
|
|
488
|
-
{ x: 0, y: 0 },
|
|
489
|
-
{ x: n + a / 2, y: 0 },
|
|
490
|
-
{ x: n, y: -a / 2 },
|
|
491
|
-
{ x: n + a / 2, y: -a },
|
|
492
|
-
{ x: 0, y: -a }
|
|
493
|
-
], i = A(r, n, a, s);
|
|
494
|
-
return t2.intersect = function(o) {
|
|
495
|
-
return T(t2, s, o);
|
|
496
|
-
}, i;
|
|
497
|
-
}
|
|
498
|
-
function gt(r, e, t2) {
|
|
499
|
-
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);
|
|
500
|
-
return t2.intersect = function(i) {
|
|
501
|
-
return J(t2, i);
|
|
502
|
-
}, s;
|
|
503
|
-
}
|
|
504
|
-
function yt(r, e, t2) {
|
|
505
|
-
const n = e.width, a = e.height, s = [
|
|
506
|
-
{ x: 0, y: 0 },
|
|
507
|
-
{ x: n, y: 0 },
|
|
508
|
-
{ x: n, y: -a },
|
|
509
|
-
{ x: 0, y: -a },
|
|
510
|
-
{ x: 0, y: 0 },
|
|
511
|
-
{ x: -8, y: 0 },
|
|
512
|
-
{ x: n + 8, y: 0 },
|
|
513
|
-
{ x: n + 8, y: -a },
|
|
514
|
-
{ x: -8, y: -a },
|
|
515
|
-
{ x: -8, y: 0 }
|
|
516
|
-
], i = A(r, n, a, s);
|
|
517
|
-
return t2.intersect = function(o) {
|
|
518
|
-
return T(t2, s, o);
|
|
519
|
-
}, i;
|
|
520
|
-
}
|
|
521
|
-
function wt(r, e, t2) {
|
|
522
|
-
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) + ")");
|
|
523
|
-
return t2.intersect = function(d) {
|
|
524
|
-
const l = J(t2, d), v = l.x - t2.x;
|
|
525
|
-
if (a != 0 && (Math.abs(v) < t2.width / 2 || Math.abs(v) == t2.width / 2 && Math.abs(l.y - t2.y) > t2.height / 2 - s)) {
|
|
526
|
-
let h = s * s * (1 - v * v / (a * a));
|
|
527
|
-
h != 0 && (h = Math.sqrt(h)), h = s - h, d.y - t2.y > 0 && (h = -h), l.y += h;
|
|
528
|
-
}
|
|
529
|
-
return l;
|
|
530
|
-
}, c;
|
|
531
|
-
}
|
|
532
|
-
function he(r) {
|
|
533
|
-
r.shapes().question = lt, r.shapes().hexagon = ct, r.shapes().stadium = gt, r.shapes().subroutine = yt, r.shapes().cylinder = wt, r.shapes().rect_left_inv_arrow = dt, r.shapes().lean_right = ht, r.shapes().lean_left = ut, r.shapes().trapezoid = ft, r.shapes().inv_trapezoid = pt, r.shapes().rect_right_inv_arrow = vt;
|
|
534
|
-
}
|
|
535
|
-
function ue(r) {
|
|
536
|
-
r({ question: lt }), r({ hexagon: ct }), r({ stadium: gt }), r({ subroutine: yt }), r({ cylinder: wt }), r({ rect_left_inv_arrow: dt }), r({ lean_right: ht }), r({ lean_left: ut }), r({ trapezoid: ft }), r({ inv_trapezoid: pt }), r({ rect_right_inv_arrow: vt });
|
|
537
|
-
}
|
|
538
|
-
function A(r, e, t2, n) {
|
|
539
|
-
return r.insert("polygon", ":first-child").attr(
|
|
540
|
-
"points",
|
|
541
|
-
n.map(function(a) {
|
|
542
|
-
return a.x + "," + a.y;
|
|
543
|
-
}).join(" ")
|
|
544
|
-
).attr("transform", "translate(" + -e / 2 + "," + t2 / 2 + ")");
|
|
545
|
-
}
|
|
546
|
-
const fe = {
|
|
547
|
-
addToRender: he,
|
|
548
|
-
addToRenderV2: ue
|
|
549
|
-
}, xt = {}, pe = function(r) {
|
|
550
|
-
const e = Object.keys(r);
|
|
551
|
-
for (const t2 of e)
|
|
552
|
-
xt[t2] = r[t2];
|
|
553
|
-
}, mt = async function(r, e, t2, n, a, s) {
|
|
554
|
-
const i = n ? n.select(`[id="${t2}"]`) : kt(`[id="${t2}"]`), o = a || document, c = Object.keys(r);
|
|
555
|
-
for (const d of c) {
|
|
556
|
-
const l = r[d];
|
|
557
|
-
let v = "default";
|
|
558
|
-
l.classes.length > 0 && (v = l.classes.join(" "));
|
|
559
|
-
const h = _y(l.styles);
|
|
560
|
-
let u = l.text !== void 0 ? l.text : l.id, p;
|
|
561
|
-
if (Ol(So().flowchart.htmlLabels)) {
|
|
562
|
-
const y = {
|
|
563
|
-
label: await H0(
|
|
564
|
-
u.replace(
|
|
565
|
-
/fa[blrs]?:fa-[\w-]+/g,
|
|
566
|
-
// cspell:disable-line
|
|
567
|
-
(S) => `<i class='${S.replace(":", " ")}'></i>`
|
|
568
|
-
),
|
|
569
|
-
So()
|
|
570
|
-
)
|
|
571
|
-
};
|
|
572
|
-
p = ee$1(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 S = u.split(go.lineBreakRegex);
|
|
577
|
-
for (const I of S) {
|
|
578
|
-
const _ = o.createElementNS("http://www.w3.org/2000/svg", "tspan");
|
|
579
|
-
_.setAttributeNS("http://www.w3.org/XML/1998/namespace", "xml:space", "preserve"), _.setAttribute("dy", "1em"), _.setAttribute("x", "1"), _.textContent = I, y.appendChild(_);
|
|
580
|
-
}
|
|
581
|
-
p = y;
|
|
582
|
-
}
|
|
583
|
-
let w = 0, f = "";
|
|
584
|
-
switch (l.type) {
|
|
585
|
-
case "round":
|
|
586
|
-
w = 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
|
-
$.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: w,
|
|
642
|
-
ry: w,
|
|
643
|
-
class: v,
|
|
644
|
-
style: h.style,
|
|
645
|
-
id: s.db.lookUpDomId(l.id)
|
|
646
|
-
});
|
|
647
|
-
}
|
|
648
|
-
}, bt = async function(r, e, t2) {
|
|
649
|
-
let n = 0, a, s;
|
|
650
|
-
if (r.defaultStyle !== void 0) {
|
|
651
|
-
const i = _y(r.defaultStyle);
|
|
652
|
-
a = i.style, s = i.labelStyle;
|
|
653
|
-
}
|
|
654
|
-
for (const i of r) {
|
|
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 = _y(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 = uy(i.interpolate, Ff) : r.defaultInterpolate !== void 0 ? l.curve = uy(r.defaultInterpolate, Ff) : l.curve = uy(xt.curve, Ff), i.text === void 0 ? i.style !== void 0 && (l.arrowheadStyle = "fill: #333") : (l.arrowheadStyle = "fill: #333", l.labelpos = "c", Ol(So().flowchart.htmlLabels) ? (l.labelType = "html", l.label = `<span id="L-${o}" class="edgeLabel L-${c}' L-${d}" style="${l.labelStyle}">${await H0(
|
|
675
|
-
i.text.replace(
|
|
676
|
-
/fa[blrs]?:fa-[\w-]+/g,
|
|
677
|
-
// cspell:disable-line
|
|
678
|
-
(u) => `<i class='${u.replace(":", " ")}'></i>`
|
|
679
|
-
),
|
|
680
|
-
So()
|
|
681
|
-
)}</span>`) : (l.labelType = "text", l.label = i.text.replace(go.lineBreakRegex, `
|
|
682
|
-
`), 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(t2.db.lookUpDomId(i.start), t2.db.lookUpDomId(i.end), l, n);
|
|
683
|
-
}
|
|
684
|
-
}, ve = function(r, e) {
|
|
685
|
-
return $.info("Extracting classes"), e.db.getClasses();
|
|
686
|
-
}, ge = async function(r, e, t2, n) {
|
|
687
|
-
$.info("Drawing flowchart");
|
|
688
|
-
const { securityLevel: a, flowchart: s } = So();
|
|
689
|
-
let i;
|
|
690
|
-
a === "sandbox" && (i = kt("#i" + e));
|
|
691
|
-
const o = a === "sandbox" ? kt(i.nodes()[0].contentDocument.body) : kt("body"), c = a === "sandbox" ? i.nodes()[0].contentDocument : document;
|
|
692
|
-
let d = n.db.getDirection();
|
|
693
|
-
d === void 0 && (d = "TD");
|
|
694
|
-
const l = s.nodeSpacing || 50, v = s.rankSpacing || 50, h = new m({
|
|
695
|
-
multigraph: true,
|
|
696
|
-
compound: true
|
|
697
|
-
}).setGraph({
|
|
698
|
-
rankdir: d,
|
|
699
|
-
nodesep: l,
|
|
700
|
-
ranksep: v,
|
|
701
|
-
marginx: 8,
|
|
702
|
-
marginy: 8
|
|
703
|
-
}).setDefaultEdgeLabel(function() {
|
|
704
|
-
return {};
|
|
705
|
-
});
|
|
706
|
-
let u;
|
|
707
|
-
const p = n.db.getSubGraphs();
|
|
708
|
-
for (let x = p.length - 1; x >= 0; x--)
|
|
709
|
-
u = p[x], n.db.addVertex(u.id, u.title, "group", void 0, u.classes);
|
|
710
|
-
const w = n.db.getVertices();
|
|
711
|
-
$.warn("Get vertices", w);
|
|
712
|
-
const f = n.db.getEdges();
|
|
713
|
-
let y = 0;
|
|
714
|
-
for (y = p.length - 1; y >= 0; y--) {
|
|
715
|
-
u = p[y], Q$1("cluster").append("text");
|
|
716
|
-
for (let x = 0; x < u.nodes.length; x++)
|
|
717
|
-
$.warn(
|
|
718
|
-
"Setting subgraph",
|
|
719
|
-
u.nodes[x],
|
|
720
|
-
n.db.lookUpDomId(u.nodes[x]),
|
|
721
|
-
n.db.lookUpDomId(u.id)
|
|
722
|
-
), h.setParent(n.db.lookUpDomId(u.nodes[x]), n.db.lookUpDomId(u.id));
|
|
723
|
-
}
|
|
724
|
-
await mt(w, h, e, o, c, n), await bt(f, h, n);
|
|
725
|
-
const S = new ie();
|
|
726
|
-
fe.addToRender(S), S.arrows().none = function(k, L, m2, B) {
|
|
727
|
-
const C = k.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");
|
|
728
|
-
O$1(C, m2[B + "Style"]);
|
|
729
|
-
}, S.arrows().normal = function(k, L) {
|
|
730
|
-
k.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");
|
|
731
|
-
};
|
|
732
|
-
const I = o.select(`[id="${e}"]`), _ = o.select("#" + e + " g");
|
|
733
|
-
for (S(_, h), _.selectAll("g.node").attr("title", function() {
|
|
734
|
-
return n.db.getTooltip(this.id);
|
|
735
|
-
}), n.db.indexNodes("subGraph" + y), y = 0; y < p.length; y++)
|
|
736
|
-
if (u = p[y], u.title !== "undefined") {
|
|
737
|
-
const x = c.querySelectorAll(
|
|
738
|
-
"#" + e + ' [id="' + n.db.lookUpDomId(u.id) + '"] rect'
|
|
739
|
-
), k = c.querySelectorAll(
|
|
740
|
-
"#" + e + ' [id="' + n.db.lookUpDomId(u.id) + '"]'
|
|
741
|
-
), L = x[0].x.baseVal.value, m2 = x[0].y.baseVal.value, B = x[0].width.baseVal.value, C = kt(k[0]).select(".label");
|
|
742
|
-
C.attr("transform", `translate(${L + B / 2}, ${m2 + 14})`), C.attr("id", e + "Text");
|
|
743
|
-
for (let $2 = 0; $2 < u.classes.length; $2++)
|
|
744
|
-
k[0].classList.add(u.classes[$2]);
|
|
745
|
-
}
|
|
746
|
-
if (!s.htmlLabels) {
|
|
747
|
-
const x = c.querySelectorAll('[id="' + e + '"] .edgeLabel .label');
|
|
748
|
-
for (const k of x) {
|
|
749
|
-
const L = k.getBBox(), m2 = c.createElementNS("http://www.w3.org/2000/svg", "rect");
|
|
750
|
-
m2.setAttribute("rx", 0), m2.setAttribute("ry", 0), m2.setAttribute("width", L.width), m2.setAttribute("height", L.height), k.insertBefore(m2, k.firstChild);
|
|
751
|
-
}
|
|
752
|
-
}
|
|
753
|
-
J_(h, I, s.diagramPadding, s.useMaxWidth), Object.keys(w).forEach(function(x) {
|
|
754
|
-
const k = w[x];
|
|
755
|
-
if (k.link) {
|
|
756
|
-
const L = o.select("#" + e + ' [id="' + n.db.lookUpDomId(x) + '"]');
|
|
757
|
-
if (L) {
|
|
758
|
-
const m2 = c.createElementNS("http://www.w3.org/2000/svg", "a");
|
|
759
|
-
m2.setAttributeNS("http://www.w3.org/2000/svg", "class", k.classes.join(" ")), m2.setAttributeNS("http://www.w3.org/2000/svg", "href", k.link), m2.setAttributeNS("http://www.w3.org/2000/svg", "rel", "noopener"), a === "sandbox" ? m2.setAttributeNS("http://www.w3.org/2000/svg", "target", "_top") : k.linkTarget && m2.setAttributeNS("http://www.w3.org/2000/svg", "target", k.linkTarget);
|
|
760
|
-
const B = L.insert(function() {
|
|
761
|
-
return m2;
|
|
762
|
-
}, ":first-child"), G = L.select(".label-container");
|
|
763
|
-
G && B.append(function() {
|
|
764
|
-
return G.node();
|
|
765
|
-
});
|
|
766
|
-
const C = L.select(".label");
|
|
767
|
-
C && B.append(function() {
|
|
768
|
-
return C.node();
|
|
769
|
-
});
|
|
770
|
-
}
|
|
771
|
-
}
|
|
772
|
-
});
|
|
773
|
-
}, ye = {
|
|
774
|
-
setConf: pe,
|
|
775
|
-
addVertices: mt,
|
|
776
|
-
addEdges: bt,
|
|
777
|
-
getClasses: ve,
|
|
778
|
-
draw: ge
|
|
779
|
-
}, _e = {
|
|
780
|
-
parser: Xe,
|
|
781
|
-
db: je,
|
|
782
|
-
renderer: ue$1,
|
|
783
|
-
styles: we,
|
|
784
|
-
init: (r) => {
|
|
785
|
-
r.flowchart || (r.flowchart = {}), r.flowchart.arrowMarkerAbsolute = r.arrowMarkerAbsolute, ye.setConf(r.flowchart), je.clear(), je.setGen("gen-1");
|
|
786
|
-
}
|
|
787
|
-
};
|
|
788
|
-
export {
|
|
789
|
-
_e as diagram
|
|
790
|
-
};
|