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/5bb002c8.js
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { ap as o, m as i } from "./1269154d.js";
|
|
2
|
+
const l = (s, t) => {
|
|
3
|
+
const e = s.append("rect");
|
|
4
|
+
if (e.attr("x", t.x), e.attr("y", t.y), e.attr("fill", t.fill), e.attr("stroke", t.stroke), e.attr("width", t.width), e.attr("height", t.height), t.name && e.attr("name", t.name), t.rx !== void 0 && e.attr("rx", t.rx), t.ry !== void 0 && e.attr("ry", t.ry), t.attrs !== void 0)
|
|
5
|
+
for (const r in t.attrs)
|
|
6
|
+
e.attr(r, t.attrs[r]);
|
|
7
|
+
return t.class !== void 0 && e.attr("class", t.class), e;
|
|
8
|
+
}, x = (s, t) => {
|
|
9
|
+
const e = {
|
|
10
|
+
x: t.startx,
|
|
11
|
+
y: t.starty,
|
|
12
|
+
width: t.stopx - t.startx,
|
|
13
|
+
height: t.stopy - t.starty,
|
|
14
|
+
fill: t.fill,
|
|
15
|
+
stroke: t.stroke,
|
|
16
|
+
class: "rect"
|
|
17
|
+
};
|
|
18
|
+
l(s, e).lower();
|
|
19
|
+
}, d = (s, t) => {
|
|
20
|
+
const e = t.text.replace(o, " "), r = s.append("text");
|
|
21
|
+
r.attr("x", t.x), r.attr("y", t.y), r.attr("class", "legend"), r.style("text-anchor", t.anchor), t.class !== void 0 && r.attr("class", t.class);
|
|
22
|
+
const n = r.append("tspan");
|
|
23
|
+
return n.attr("x", t.x + t.textMargin * 2), n.text(e), r;
|
|
24
|
+
}, h = (s, t, e, r) => {
|
|
25
|
+
const n = s.append("image");
|
|
26
|
+
n.attr("x", t), n.attr("y", e);
|
|
27
|
+
const a = i.sanitizeUrl(r);
|
|
28
|
+
n.attr("xlink:href", a);
|
|
29
|
+
}, y = (s, t, e, r) => {
|
|
30
|
+
const n = s.append("use");
|
|
31
|
+
n.attr("x", t), n.attr("y", e);
|
|
32
|
+
const a = i.sanitizeUrl(r);
|
|
33
|
+
n.attr("xlink:href", `#${a}`);
|
|
34
|
+
}, p = () => ({
|
|
35
|
+
x: 0,
|
|
36
|
+
y: 0,
|
|
37
|
+
width: 100,
|
|
38
|
+
height: 100,
|
|
39
|
+
fill: "#EDF2AE",
|
|
40
|
+
stroke: "#666",
|
|
41
|
+
anchor: "start",
|
|
42
|
+
rx: 0,
|
|
43
|
+
ry: 0
|
|
44
|
+
}), g = () => ({
|
|
45
|
+
x: 0,
|
|
46
|
+
y: 0,
|
|
47
|
+
width: 100,
|
|
48
|
+
height: 100,
|
|
49
|
+
"text-anchor": "start",
|
|
50
|
+
style: "#666",
|
|
51
|
+
textMargin: 0,
|
|
52
|
+
rx: 0,
|
|
53
|
+
ry: 0,
|
|
54
|
+
tspan: !0
|
|
55
|
+
});
|
|
56
|
+
export {
|
|
57
|
+
x as a,
|
|
58
|
+
g as b,
|
|
59
|
+
y as c,
|
|
60
|
+
l as d,
|
|
61
|
+
h as e,
|
|
62
|
+
d as f,
|
|
63
|
+
p as g
|
|
64
|
+
};
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { p as
|
|
2
|
-
import { c as v, l as y, h as B, i as W, F as $,
|
|
3
|
-
import { G as O
|
|
4
|
-
import { l as
|
|
1
|
+
import { p as A, d as S, s as G } from "./d4b9d281.js";
|
|
2
|
+
import { c as v, l as y, h as B, i as W, F as $, A as M, G as I } from "./1269154d.js";
|
|
3
|
+
import { G as O } from "./4bc5ef7f.js";
|
|
4
|
+
import { l as P } from "./bcc07d29.js";
|
|
5
|
+
import { l as X } from "./e437d53e.js";
|
|
5
6
|
import "./2ff2c7a6.js";
|
|
6
7
|
import "./256b619e.js";
|
|
7
8
|
let H = 0;
|
|
@@ -162,6 +163,7 @@ const E = 20, L = function(i) {
|
|
|
162
163
|
}
|
|
163
164
|
o.db.getRelations().forEach(function(e) {
|
|
164
165
|
y.info(
|
|
166
|
+
// cspell:ignore tjoho
|
|
165
167
|
"tjoho" + L(e.id1) + L(e.id2) + JSON.stringify(e)
|
|
166
168
|
), r.setEdge(
|
|
167
169
|
L(e.id1),
|
|
@@ -202,17 +204,17 @@ const E = 20, L = function(i) {
|
|
|
202
204
|
W(n, w, m, p.useMaxWidth);
|
|
203
205
|
const k = `${u.x - E} ${u.y - E} ${m} ${w}`;
|
|
204
206
|
y.debug(`viewBox ${k}`), n.attr("viewBox", k);
|
|
205
|
-
},
|
|
207
|
+
}, U = {
|
|
206
208
|
draw: F
|
|
207
|
-
},
|
|
208
|
-
parser:
|
|
209
|
+
}, tt = {
|
|
210
|
+
parser: A,
|
|
209
211
|
db: S,
|
|
210
|
-
renderer:
|
|
211
|
-
styles:
|
|
212
|
+
renderer: U,
|
|
213
|
+
styles: G,
|
|
212
214
|
init: (i) => {
|
|
213
215
|
i.class || (i.class = {}), i.class.arrowMarkerAbsolute = i.arrowMarkerAbsolute, S.clear();
|
|
214
216
|
}
|
|
215
217
|
};
|
|
216
218
|
export {
|
|
217
|
-
|
|
219
|
+
tt as diagram
|
|
218
220
|
};
|
package/65d3daa9.js
ADDED
|
@@ -0,0 +1,391 @@
|
|
|
1
|
+
var X = (n, t, e) => new Promise((r, i) => {
|
|
2
|
+
var a = (l) => {
|
|
3
|
+
try {
|
|
4
|
+
d(e.next(l));
|
|
5
|
+
} catch (h) {
|
|
6
|
+
i(h);
|
|
7
|
+
}
|
|
8
|
+
}, u = (l) => {
|
|
9
|
+
try {
|
|
10
|
+
d(e.throw(l));
|
|
11
|
+
} catch (h) {
|
|
12
|
+
i(h);
|
|
13
|
+
}
|
|
14
|
+
}, d = (l) => l.done ? r(l.value) : Promise.resolve(l.value).then(a, u);
|
|
15
|
+
d((e = e.apply(n, t)).next());
|
|
16
|
+
});
|
|
17
|
+
import { i as N, G as H } from "./4bc5ef7f.js";
|
|
18
|
+
import { m as J, l as V } from "./bcc07d29.js";
|
|
19
|
+
import { c as U } from "./c4c5f13b.js";
|
|
20
|
+
import { i as W, u as _, s as q, a as z, b as K, g as T, p as $, c as Q, d as Y, e as Z, f as I, h as L, j as D } from "./e95fa522.js";
|
|
21
|
+
import { l as s, c as O, p as B, h as R } from "./1269154d.js";
|
|
22
|
+
import { a as tt } from "./945d7302.js";
|
|
23
|
+
function m(n) {
|
|
24
|
+
var t = {
|
|
25
|
+
options: {
|
|
26
|
+
directed: n.isDirected(),
|
|
27
|
+
multigraph: n.isMultigraph(),
|
|
28
|
+
compound: n.isCompound()
|
|
29
|
+
},
|
|
30
|
+
nodes: et(n),
|
|
31
|
+
edges: nt(n)
|
|
32
|
+
};
|
|
33
|
+
return N(n.graph()) || (t.value = U(n.graph())), t;
|
|
34
|
+
}
|
|
35
|
+
function et(n) {
|
|
36
|
+
return J(n.nodes(), function(t) {
|
|
37
|
+
var e = n.node(t), r = n.parent(t), i = { v: t };
|
|
38
|
+
return N(e) || (i.value = e), N(r) || (i.parent = r), i;
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
function nt(n) {
|
|
42
|
+
return J(n.edges(), function(t) {
|
|
43
|
+
var e = n.edge(t), r = { v: t.v, w: t.w };
|
|
44
|
+
return N(t.name) || (r.name = t.name), N(e) || (r.value = e), r;
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
let f = {}, g = {}, P = {};
|
|
48
|
+
const it = () => {
|
|
49
|
+
g = {}, P = {}, f = {};
|
|
50
|
+
}, p = (n, t) => (s.trace("In isDescendant", t, " ", n, " = ", g[t].includes(n)), !!g[t].includes(n)), st = (n, t) => (s.info("Descendants of ", t, " is ", g[t]), s.info("Edge is ", n), n.v === t || n.w === t ? !1 : g[t] ? g[t].includes(n.v) || p(n.v, t) || p(n.w, t) || g[t].includes(n.w) : (s.debug("Tilt, ", t, ",not in descendants"), !1)), k = (n, t, e, r) => {
|
|
51
|
+
s.warn(
|
|
52
|
+
"Copying children of ",
|
|
53
|
+
n,
|
|
54
|
+
"root",
|
|
55
|
+
r,
|
|
56
|
+
"data",
|
|
57
|
+
t.node(n),
|
|
58
|
+
r
|
|
59
|
+
);
|
|
60
|
+
const i = t.children(n) || [];
|
|
61
|
+
n !== r && i.push(n), s.warn("Copying (nodes) clusterId", n, "nodes", i), i.forEach((a) => {
|
|
62
|
+
if (t.children(a).length > 0)
|
|
63
|
+
k(a, t, e, r);
|
|
64
|
+
else {
|
|
65
|
+
const u = t.node(a);
|
|
66
|
+
s.info("cp ", a, " to ", r, " with parent ", n), e.setNode(a, u), r !== t.parent(a) && (s.warn("Setting parent", a, t.parent(a)), e.setParent(a, t.parent(a))), n !== r && a !== n ? (s.debug("Setting parent", a, n), e.setParent(a, n)) : (s.info("In copy ", n, "root", r, "data", t.node(n), r), s.debug(
|
|
67
|
+
"Not Setting parent for node=",
|
|
68
|
+
a,
|
|
69
|
+
"cluster!==rootId",
|
|
70
|
+
n !== r,
|
|
71
|
+
"node!==clusterId",
|
|
72
|
+
a !== n
|
|
73
|
+
));
|
|
74
|
+
const d = t.edges(a);
|
|
75
|
+
s.debug("Copying Edges", d), d.forEach((l) => {
|
|
76
|
+
s.info("Edge", l);
|
|
77
|
+
const h = t.edge(l.v, l.w, l.name);
|
|
78
|
+
s.info("Edge data", h, r);
|
|
79
|
+
try {
|
|
80
|
+
st(l, r) ? (s.info("Copying as ", l.v, l.w, h, l.name), e.setEdge(l.v, l.w, h, l.name), s.info("newGraph edges ", e.edges(), e.edge(e.edges()[0]))) : s.info(
|
|
81
|
+
"Skipping copy of edge ",
|
|
82
|
+
l.v,
|
|
83
|
+
"-->",
|
|
84
|
+
l.w,
|
|
85
|
+
" rootId: ",
|
|
86
|
+
r,
|
|
87
|
+
" clusterId:",
|
|
88
|
+
n
|
|
89
|
+
);
|
|
90
|
+
} catch (w) {
|
|
91
|
+
s.error(w);
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
s.debug("Removing node", a), t.removeNode(a);
|
|
96
|
+
});
|
|
97
|
+
}, F = (n, t) => {
|
|
98
|
+
const e = t.children(n);
|
|
99
|
+
let r = [...e];
|
|
100
|
+
for (const i of e)
|
|
101
|
+
P[i] = n, r = [...r, ...F(i, t)];
|
|
102
|
+
return r;
|
|
103
|
+
}, C = (n, t) => {
|
|
104
|
+
s.trace("Searching", n);
|
|
105
|
+
const e = t.children(n);
|
|
106
|
+
if (s.trace("Searching children of id ", n, e), e.length < 1)
|
|
107
|
+
return s.trace("This is a valid node", n), n;
|
|
108
|
+
for (const r of e) {
|
|
109
|
+
const i = C(r, t);
|
|
110
|
+
if (i)
|
|
111
|
+
return s.trace("Found replacement for", n, " => ", i), i;
|
|
112
|
+
}
|
|
113
|
+
}, S = (n) => !f[n] || !f[n].externalConnections ? n : f[n] ? f[n].id : n, rt = (n, t) => {
|
|
114
|
+
if (!n || t > 10) {
|
|
115
|
+
s.debug("Opting out, no graph ");
|
|
116
|
+
return;
|
|
117
|
+
} else
|
|
118
|
+
s.debug("Opting in, graph ");
|
|
119
|
+
n.nodes().forEach(function(e) {
|
|
120
|
+
n.children(e).length > 0 && (s.warn(
|
|
121
|
+
"Cluster identified",
|
|
122
|
+
e,
|
|
123
|
+
" Replacement id in edges: ",
|
|
124
|
+
C(e, n)
|
|
125
|
+
), g[e] = F(e, n), f[e] = { id: C(e, n), clusterData: n.node(e) });
|
|
126
|
+
}), n.nodes().forEach(function(e) {
|
|
127
|
+
const r = n.children(e), i = n.edges();
|
|
128
|
+
r.length > 0 ? (s.debug("Cluster identified", e, g), i.forEach((a) => {
|
|
129
|
+
if (a.v !== e && a.w !== e) {
|
|
130
|
+
const u = p(a.v, e), d = p(a.w, e);
|
|
131
|
+
u ^ d && (s.warn("Edge: ", a, " leaves cluster ", e), s.warn("Descendants of XXX ", e, ": ", g[e]), f[e].externalConnections = !0);
|
|
132
|
+
}
|
|
133
|
+
})) : s.debug("Not a cluster ", e, g);
|
|
134
|
+
});
|
|
135
|
+
for (let e of Object.keys(f)) {
|
|
136
|
+
const r = f[e].id, i = n.parent(r);
|
|
137
|
+
i !== e && f[i] && !f[i].externalConnections && (f[e].id = i);
|
|
138
|
+
}
|
|
139
|
+
n.edges().forEach(function(e) {
|
|
140
|
+
const r = n.edge(e);
|
|
141
|
+
s.warn("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(e)), s.warn("Edge " + e.v + " -> " + e.w + ": " + JSON.stringify(n.edge(e)));
|
|
142
|
+
let i = e.v, a = e.w;
|
|
143
|
+
if (s.warn(
|
|
144
|
+
"Fix XXX",
|
|
145
|
+
f,
|
|
146
|
+
"ids:",
|
|
147
|
+
e.v,
|
|
148
|
+
e.w,
|
|
149
|
+
"Translating: ",
|
|
150
|
+
f[e.v],
|
|
151
|
+
" --- ",
|
|
152
|
+
f[e.w]
|
|
153
|
+
), f[e.v] && f[e.w] && f[e.v] === f[e.w]) {
|
|
154
|
+
s.warn("Fixing and trixing link to self - removing XXX", e.v, e.w, e.name), s.warn("Fixing and trixing - removing XXX", e.v, e.w, e.name), i = S(e.v), a = S(e.w), n.removeEdge(e.v, e.w, e.name);
|
|
155
|
+
const u = e.w + "---" + e.v;
|
|
156
|
+
n.setNode(u, {
|
|
157
|
+
domId: u,
|
|
158
|
+
id: u,
|
|
159
|
+
labelStyle: "",
|
|
160
|
+
labelText: r.label,
|
|
161
|
+
padding: 0,
|
|
162
|
+
shape: "labelRect",
|
|
163
|
+
style: ""
|
|
164
|
+
});
|
|
165
|
+
const d = structuredClone(r), l = structuredClone(r);
|
|
166
|
+
d.label = "", d.arrowTypeEnd = "none", l.label = "", d.fromCluster = e.v, l.toCluster = e.v, n.setEdge(i, u, d, e.name + "-cyclic-special"), n.setEdge(u, a, l, e.name + "-cyclic-special");
|
|
167
|
+
} else if (f[e.v] || f[e.w]) {
|
|
168
|
+
if (s.warn("Fixing and trixing - removing XXX", e.v, e.w, e.name), i = S(e.v), a = S(e.w), n.removeEdge(e.v, e.w, e.name), i !== e.v) {
|
|
169
|
+
const u = n.parent(i);
|
|
170
|
+
f[u].externalConnections = !0, r.fromCluster = e.v;
|
|
171
|
+
}
|
|
172
|
+
if (a !== e.w) {
|
|
173
|
+
const u = n.parent(a);
|
|
174
|
+
f[u].externalConnections = !0, r.toCluster = e.w;
|
|
175
|
+
}
|
|
176
|
+
s.warn("Fix Replacing with XXX", i, a, e.name), n.setEdge(i, a, r, e.name);
|
|
177
|
+
}
|
|
178
|
+
}), s.warn("Adjusted Graph", m(n)), G(n, 0), s.trace(f);
|
|
179
|
+
}, G = (n, t) => {
|
|
180
|
+
if (s.warn("extractor - ", t, m(n), n.children("D")), t > 10) {
|
|
181
|
+
s.error("Bailing out");
|
|
182
|
+
return;
|
|
183
|
+
}
|
|
184
|
+
let e = n.nodes(), r = !1;
|
|
185
|
+
for (const i of e) {
|
|
186
|
+
const a = n.children(i);
|
|
187
|
+
r = r || a.length > 0;
|
|
188
|
+
}
|
|
189
|
+
if (!r) {
|
|
190
|
+
s.debug("Done, no node has children", n.nodes());
|
|
191
|
+
return;
|
|
192
|
+
}
|
|
193
|
+
s.debug("Nodes = ", e, t);
|
|
194
|
+
for (const i of e)
|
|
195
|
+
if (s.debug(
|
|
196
|
+
"Extracting node",
|
|
197
|
+
i,
|
|
198
|
+
f,
|
|
199
|
+
f[i] && !f[i].externalConnections,
|
|
200
|
+
!n.parent(i),
|
|
201
|
+
n.node(i),
|
|
202
|
+
n.children("D"),
|
|
203
|
+
" Depth ",
|
|
204
|
+
t
|
|
205
|
+
), !f[i])
|
|
206
|
+
s.debug("Not a cluster", i, t);
|
|
207
|
+
else if (!f[i].externalConnections && // !graph.parent(node) &&
|
|
208
|
+
n.children(i) && n.children(i).length > 0) {
|
|
209
|
+
s.warn(
|
|
210
|
+
"Cluster without external connections, without a parent and with children",
|
|
211
|
+
i,
|
|
212
|
+
t
|
|
213
|
+
);
|
|
214
|
+
let u = n.graph().rankdir === "TB" ? "LR" : "TB";
|
|
215
|
+
f[i] && f[i].clusterData && f[i].clusterData.dir && (u = f[i].clusterData.dir, s.warn("Fixing dir", f[i].clusterData.dir, u));
|
|
216
|
+
const d = new H({
|
|
217
|
+
multigraph: !0,
|
|
218
|
+
compound: !0
|
|
219
|
+
}).setGraph({
|
|
220
|
+
rankdir: u,
|
|
221
|
+
// Todo: set proper spacing
|
|
222
|
+
nodesep: 50,
|
|
223
|
+
ranksep: 50,
|
|
224
|
+
marginx: 8,
|
|
225
|
+
marginy: 8
|
|
226
|
+
}).setDefaultEdgeLabel(function() {
|
|
227
|
+
return {};
|
|
228
|
+
});
|
|
229
|
+
s.warn("Old graph before copy", m(n)), k(i, n, d, i), n.setNode(i, {
|
|
230
|
+
clusterNode: !0,
|
|
231
|
+
id: i,
|
|
232
|
+
clusterData: f[i].clusterData,
|
|
233
|
+
labelText: f[i].labelText,
|
|
234
|
+
graph: d
|
|
235
|
+
}), s.warn("New graph after copy node: (", i, ")", m(d)), s.debug("Old graph after copy", m(n));
|
|
236
|
+
} else
|
|
237
|
+
s.warn(
|
|
238
|
+
"Cluster ** ",
|
|
239
|
+
i,
|
|
240
|
+
" **not meeting the criteria !externalConnections:",
|
|
241
|
+
!f[i].externalConnections,
|
|
242
|
+
" no parent: ",
|
|
243
|
+
!n.parent(i),
|
|
244
|
+
" children ",
|
|
245
|
+
n.children(i) && n.children(i).length > 0,
|
|
246
|
+
n.children("D"),
|
|
247
|
+
t
|
|
248
|
+
), s.debug(f);
|
|
249
|
+
e = n.nodes(), s.warn("New list of nodes", e);
|
|
250
|
+
for (const i of e) {
|
|
251
|
+
const a = n.node(i);
|
|
252
|
+
s.warn(" Now next level", i, a), a.clusterNode && G(a.graph, t + 1);
|
|
253
|
+
}
|
|
254
|
+
}, j = (n, t) => {
|
|
255
|
+
if (t.length === 0)
|
|
256
|
+
return [];
|
|
257
|
+
let e = Object.assign(t);
|
|
258
|
+
return t.forEach((r) => {
|
|
259
|
+
const i = n.children(r), a = j(n, i);
|
|
260
|
+
e = [...e, ...a];
|
|
261
|
+
}), e;
|
|
262
|
+
}, at = (n) => j(n, n.children()), ct = (n, t) => {
|
|
263
|
+
s.info("Creating subgraph rect for ", t.id, t);
|
|
264
|
+
const e = O(), r = n.insert("g").attr("class", "cluster" + (t.class ? " " + t.class : "")).attr("id", t.id), i = r.insert("rect", ":first-child"), a = B(e.flowchart.htmlLabels), u = r.insert("g").attr("class", "cluster-label"), d = t.labelType === "markdown" ? tt(u, t.labelText, { style: t.labelStyle, useHtmlLabels: a }) : u.node().appendChild(L(t.labelText, t.labelStyle, void 0, !0));
|
|
265
|
+
let l = d.getBBox();
|
|
266
|
+
if (B(e.flowchart.htmlLabels)) {
|
|
267
|
+
const c = d.children[0], o = R(d);
|
|
268
|
+
l = c.getBoundingClientRect(), o.attr("width", l.width), o.attr("height", l.height);
|
|
269
|
+
}
|
|
270
|
+
const h = 0 * t.padding, w = h / 2, x = t.width <= l.width + h ? l.width + h : t.width;
|
|
271
|
+
t.width <= l.width + h ? t.diff = (l.width - t.width) / 2 - t.padding / 2 : t.diff = -t.padding / 2, s.trace("Data ", t, JSON.stringify(t)), i.attr("style", t.style).attr("rx", t.rx).attr("ry", t.ry).attr("x", t.x - x / 2).attr("y", t.y - t.height / 2 - w).attr("width", x).attr("height", t.height + h);
|
|
272
|
+
const { subGraphTitleTopMargin: v } = T(e);
|
|
273
|
+
a ? u.attr(
|
|
274
|
+
"transform",
|
|
275
|
+
// This puts the label on top of the box instead of inside it
|
|
276
|
+
`translate(${t.x - l.width / 2}, ${t.y - t.height / 2 + v})`
|
|
277
|
+
) : u.attr(
|
|
278
|
+
"transform",
|
|
279
|
+
// This puts the label on top of the box instead of inside it
|
|
280
|
+
`translate(${t.x}, ${t.y - t.height / 2 + v})`
|
|
281
|
+
);
|
|
282
|
+
const y = i.node().getBBox();
|
|
283
|
+
return t.width = y.width, t.height = y.height, t.intersect = function(c) {
|
|
284
|
+
return D(t, c);
|
|
285
|
+
}, r;
|
|
286
|
+
}, ot = (n, t) => {
|
|
287
|
+
const e = n.insert("g").attr("class", "note-cluster").attr("id", t.id), r = e.insert("rect", ":first-child"), i = 0 * t.padding, a = i / 2;
|
|
288
|
+
r.attr("rx", t.rx).attr("ry", t.ry).attr("x", t.x - t.width / 2 - a).attr("y", t.y - t.height / 2 - a).attr("width", t.width + i).attr("height", t.height + i).attr("fill", "none");
|
|
289
|
+
const u = r.node().getBBox();
|
|
290
|
+
return t.width = u.width, t.height = u.height, t.intersect = function(d) {
|
|
291
|
+
return D(t, d);
|
|
292
|
+
}, e;
|
|
293
|
+
}, lt = (n, t) => {
|
|
294
|
+
const e = O(), r = n.insert("g").attr("class", t.classes).attr("id", t.id), i = r.insert("rect", ":first-child"), a = r.insert("g").attr("class", "cluster-label"), u = r.append("rect"), d = a.node().appendChild(L(t.labelText, t.labelStyle, void 0, !0));
|
|
295
|
+
let l = d.getBBox();
|
|
296
|
+
if (B(e.flowchart.htmlLabels)) {
|
|
297
|
+
const c = d.children[0], o = R(d);
|
|
298
|
+
l = c.getBoundingClientRect(), o.attr("width", l.width), o.attr("height", l.height);
|
|
299
|
+
}
|
|
300
|
+
l = d.getBBox();
|
|
301
|
+
const h = 0 * t.padding, w = h / 2, x = t.width <= l.width + t.padding ? l.width + t.padding : t.width;
|
|
302
|
+
t.width <= l.width + t.padding ? t.diff = (l.width + t.padding * 0 - t.width) / 2 : t.diff = -t.padding / 2, i.attr("class", "outer").attr("x", t.x - x / 2 - w).attr("y", t.y - t.height / 2 - w).attr("width", x + h).attr("height", t.height + h), u.attr("class", "inner").attr("x", t.x - x / 2 - w).attr("y", t.y - t.height / 2 - w + l.height - 1).attr("width", x + h).attr("height", t.height + h - l.height - 3);
|
|
303
|
+
const { subGraphTitleTopMargin: v } = T(e);
|
|
304
|
+
a.attr(
|
|
305
|
+
"transform",
|
|
306
|
+
`translate(${t.x - l.width / 2}, ${t.y - t.height / 2 - t.padding / 3 + (B(e.flowchart.htmlLabels) ? 5 : 3) + v})`
|
|
307
|
+
);
|
|
308
|
+
const y = i.node().getBBox();
|
|
309
|
+
return t.height = y.height, t.intersect = function(c) {
|
|
310
|
+
return D(t, c);
|
|
311
|
+
}, r;
|
|
312
|
+
}, ft = (n, t) => {
|
|
313
|
+
const e = n.insert("g").attr("class", t.classes).attr("id", t.id), r = e.insert("rect", ":first-child"), i = 0 * t.padding, a = i / 2;
|
|
314
|
+
r.attr("class", "divider").attr("x", t.x - t.width / 2 - a).attr("y", t.y - t.height / 2).attr("width", t.width + i).attr("height", t.height + i);
|
|
315
|
+
const u = r.node().getBBox();
|
|
316
|
+
return t.width = u.width, t.height = u.height, t.diff = -t.padding / 2, t.intersect = function(d) {
|
|
317
|
+
return D(t, d);
|
|
318
|
+
}, e;
|
|
319
|
+
}, dt = { rect: ct, roundedWithTitle: lt, noteGroup: ot, divider: ft };
|
|
320
|
+
let M = {};
|
|
321
|
+
const ut = (n, t) => {
|
|
322
|
+
s.trace("Inserting cluster");
|
|
323
|
+
const e = t.shape || "rect";
|
|
324
|
+
M[t.id] = dt[e](n, t);
|
|
325
|
+
}, ht = () => {
|
|
326
|
+
M = {};
|
|
327
|
+
}, A = (n, t, e, r, i, a) => X(void 0, null, function* () {
|
|
328
|
+
s.info("Graph in recursive render: XXX", m(t), i);
|
|
329
|
+
const u = t.graph().rankdir;
|
|
330
|
+
s.trace("Dir in recursive render - dir:", u);
|
|
331
|
+
const d = n.insert("g").attr("class", "root");
|
|
332
|
+
t.nodes() ? s.info("Recursive render XXX", t.nodes()) : s.info("No nodes found for", t), t.edges().length > 0 && s.trace("Recursive edges", t.edge(t.edges()[0]));
|
|
333
|
+
const l = d.insert("g").attr("class", "clusters"), h = d.insert("g").attr("class", "edgePaths"), w = d.insert("g").attr("class", "edgeLabels"), x = d.insert("g").attr("class", "nodes");
|
|
334
|
+
yield Promise.all(
|
|
335
|
+
t.nodes().map(function(c) {
|
|
336
|
+
return X(this, null, function* () {
|
|
337
|
+
const o = t.node(c);
|
|
338
|
+
if (i !== void 0) {
|
|
339
|
+
const b = JSON.parse(JSON.stringify(i.clusterData));
|
|
340
|
+
s.info("Setting data for cluster XXX (", c, ") ", b, i), t.setNode(i.id, b), t.parent(c) || (s.trace("Setting parent", c, i.id), t.setParent(c, i.id, b));
|
|
341
|
+
}
|
|
342
|
+
if (s.info("(Insert) Node XXX" + c + ": " + JSON.stringify(t.node(c))), o && o.clusterNode) {
|
|
343
|
+
s.info("Cluster identified", c, o.width, t.node(c));
|
|
344
|
+
const b = yield A(
|
|
345
|
+
x,
|
|
346
|
+
o.graph,
|
|
347
|
+
e,
|
|
348
|
+
r,
|
|
349
|
+
t.node(c),
|
|
350
|
+
a
|
|
351
|
+
), E = b.elem;
|
|
352
|
+
_(o, E), o.diff = b.diff || 0, s.info("Node bounds (abc123)", c, o, o.width, o.x, o.y), q(E, o), s.warn("Recursive render complete ", E, o);
|
|
353
|
+
} else
|
|
354
|
+
t.children(c).length > 0 ? (s.info("Cluster - the non recursive path XXX", c, o.id, o, t), s.info(C(o.id, t)), f[o.id] = { id: C(o.id, t), node: o }) : (s.info("Node - the non recursive path", c, o.id, o), yield z(x, t.node(c), u));
|
|
355
|
+
});
|
|
356
|
+
})
|
|
357
|
+
), t.edges().forEach(function(c) {
|
|
358
|
+
const o = t.edge(c.v, c.w, c.name);
|
|
359
|
+
s.info("Edge " + c.v + " -> " + c.w + ": " + JSON.stringify(c)), s.info("Edge " + c.v + " -> " + c.w + ": ", c, " ", JSON.stringify(t.edge(c))), s.info("Fix", f, "ids:", c.v, c.w, "Translating: ", f[c.v], f[c.w]), K(w, o);
|
|
360
|
+
}), t.edges().forEach(function(c) {
|
|
361
|
+
s.info("Edge " + c.v + " -> " + c.w + ": " + JSON.stringify(c));
|
|
362
|
+
}), s.info("#############################################"), s.info("### Layout ###"), s.info("#############################################"), s.info(t), V(t), s.info("Graph after layout:", m(t));
|
|
363
|
+
let v = 0;
|
|
364
|
+
const { subGraphTitleTotalMargin: y } = T(a);
|
|
365
|
+
return at(t).forEach(function(c) {
|
|
366
|
+
const o = t.node(c);
|
|
367
|
+
s.info("Position " + c + ": " + JSON.stringify(t.node(c))), s.info(
|
|
368
|
+
"Position " + c + ": (" + o.x,
|
|
369
|
+
"," + o.y,
|
|
370
|
+
") width: ",
|
|
371
|
+
o.width,
|
|
372
|
+
" height: ",
|
|
373
|
+
o.height
|
|
374
|
+
), o && o.clusterNode ? (o.y += y, $(o)) : t.children(c).length > 0 ? (o.height += y, ut(l, o), f[o.id].node = o) : (o.y += y / 2, $(o));
|
|
375
|
+
}), t.edges().forEach(function(c) {
|
|
376
|
+
const o = t.edge(c);
|
|
377
|
+
s.info("Edge " + c.v + " -> " + c.w + ": " + JSON.stringify(o), o), o.points.forEach((E) => E.y += y / 2);
|
|
378
|
+
const b = Q(h, c, o, f, e, t, r);
|
|
379
|
+
Y(o, b);
|
|
380
|
+
}), t.nodes().forEach(function(c) {
|
|
381
|
+
const o = t.node(c);
|
|
382
|
+
s.info(c, o.type, o.diff), o.type === "group" && (v = o.diff);
|
|
383
|
+
}), { elem: d, diff: v };
|
|
384
|
+
}), Et = (n, t, e, r, i) => X(void 0, null, function* () {
|
|
385
|
+
W(n, e, r, i), Z(), I(), ht(), it(), s.warn("Graph at first:", JSON.stringify(m(t))), rt(t), s.warn("Graph after:", JSON.stringify(m(t)));
|
|
386
|
+
const a = O();
|
|
387
|
+
yield A(n, t, r, i, void 0, a);
|
|
388
|
+
});
|
|
389
|
+
export {
|
|
390
|
+
Et as r
|
|
391
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { c as Y, g as Ut, s as zt, a as Mt, b as Ht,
|
|
1
|
+
import { c as Y, g as Ut, s as zt, a as Mt, b as Ht, C as Xt, D as Kt, l as D, j as ot, E as Wt, a6 as Jt } from "./1269154d.js";
|
|
2
2
|
var gt = function() {
|
|
3
3
|
var t = function(C, r, n, i) {
|
|
4
4
|
for (n = n || {}, i = C.length; i--; n[C[i]] = r)
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { p as P, d as N, s as W } from "./
|
|
2
|
-
import { c as t, h as H, l as b, i as R, j as T, F as v,
|
|
3
|
-
import { G as C
|
|
4
|
-
import { l as
|
|
1
|
+
import { p as P, d as N, s as W } from "./6909d829.js";
|
|
2
|
+
import { c as t, h as H, l as b, i as R, j as T, F as v, A as U } from "./1269154d.js";
|
|
3
|
+
import { G as C } from "./4bc5ef7f.js";
|
|
4
|
+
import { l as F } from "./bcc07d29.js";
|
|
5
|
+
import { l as $ } from "./e437d53e.js";
|
|
5
6
|
import "./2ff2c7a6.js";
|
|
6
7
|
import "./256b619e.js";
|
|
7
8
|
const O = (e) => e.append("circle").attr("class", "start-state").attr("r", t().state.sizeUnit).attr("cx", t().state.padding + t().state.sizeUnit).attr("cy", t().state.padding + t().state.sizeUnit), X = (e) => e.append("line").style("stroke", "grey").style("stroke-dasharray", "3").attr("x1", t().state.textHeight).attr("class", "divider").attr("x2", t().state.textHeight * 2).attr("y1", 0).attr("y2", 0), J = (e, i) => {
|
|
@@ -87,7 +88,7 @@ const O = (e) => e.append("circle").attr("class", "start-state").attr("r", t().s
|
|
|
87
88
|
const g = s.node().getBBox();
|
|
88
89
|
return c.width = g.width + 2 * t().state.padding, c.height = g.height + 2 * t().state.padding, c;
|
|
89
90
|
};
|
|
90
|
-
let
|
|
91
|
+
let A = 0;
|
|
91
92
|
const K = function(e, i, o) {
|
|
92
93
|
const c = function(r) {
|
|
93
94
|
switch (r) {
|
|
@@ -106,7 +107,7 @@ const K = function(e, i, o) {
|
|
|
106
107
|
return r.x;
|
|
107
108
|
}).y(function(r) {
|
|
108
109
|
return r.y;
|
|
109
|
-
}).curve(v), p = e.append("path").attr("d", g(s)).attr("id", "edge" +
|
|
110
|
+
}).curve(v), p = e.append("path").attr("d", g(s)).attr("id", "edge" + A).attr("class", "transition");
|
|
110
111
|
let a = "";
|
|
111
112
|
if (t().state.arrowMarkerAbsolute && (a = window.location.protocol + "//" + window.location.host + window.location.pathname + window.location.search, a = a.replace(/\(/g, "\\("), a = a.replace(/\)/g, "\\)")), p.attr(
|
|
112
113
|
"marker-end",
|
|
@@ -128,7 +129,7 @@ const K = function(e, i, o) {
|
|
|
128
129
|
const n = r.node().getBBox();
|
|
129
130
|
r.insert("rect", ":first-child").attr("class", "box").attr("x", y - w / 2 - t().state.padding / 2).attr("y", x - k / 2 - t().state.padding / 2 - 3.5).attr("width", w + t().state.padding).attr("height", k + t().state.padding), b.info(n);
|
|
130
131
|
}
|
|
131
|
-
|
|
132
|
+
A++;
|
|
132
133
|
};
|
|
133
134
|
let B;
|
|
134
135
|
const z = {}, Q = function() {
|
|
@@ -144,13 +145,13 @@ const z = {}, Q = function() {
|
|
|
144
145
|
const r = p.select(`[id='${i}']`);
|
|
145
146
|
V(r);
|
|
146
147
|
const y = c.db.getRootDoc();
|
|
147
|
-
|
|
148
|
+
G(y, r, void 0, !1, p, a, c);
|
|
148
149
|
const x = B.padding, d = r.node().getBBox(), l = d.width + x * 2, m = d.height + x * 2, w = l * 1.75;
|
|
149
150
|
R(r, m, w, B.useMaxWidth), r.attr(
|
|
150
151
|
"viewBox",
|
|
151
152
|
`${d.x - B.padding} ${d.y - B.padding} ` + l + " " + m
|
|
152
153
|
);
|
|
153
|
-
}, tt = (e) => e ? e.length * B.fontSizeFactor : 1,
|
|
154
|
+
}, tt = (e) => e ? e.length * B.fontSizeFactor : 1, G = (e, i, o, c, s, g, p) => {
|
|
154
155
|
const a = new C({
|
|
155
156
|
compound: !0,
|
|
156
157
|
multigraph: !0
|
|
@@ -194,7 +195,7 @@ const z = {}, Q = function() {
|
|
|
194
195
|
let h;
|
|
195
196
|
if (u.doc) {
|
|
196
197
|
let f = i.append("g").attr("id", u.id).attr("class", "stateGroup");
|
|
197
|
-
h =
|
|
198
|
+
h = G(u.doc, f, u.id, !c, s, g, p);
|
|
198
199
|
{
|
|
199
200
|
f = I(f, u, c);
|
|
200
201
|
let S = f.node().getBBox();
|
|
@@ -253,7 +254,7 @@ const z = {}, Q = function() {
|
|
|
253
254
|
}, et = {
|
|
254
255
|
setConf: Q,
|
|
255
256
|
draw: D
|
|
256
|
-
},
|
|
257
|
+
}, ct = {
|
|
257
258
|
parser: P,
|
|
258
259
|
db: N,
|
|
259
260
|
renderer: et,
|
|
@@ -263,5 +264,5 @@ const z = {}, Q = function() {
|
|
|
263
264
|
}
|
|
264
265
|
};
|
|
265
266
|
export {
|
|
266
|
-
|
|
267
|
+
ct as diagram
|
|
267
268
|
};
|
package/77491f00.js
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { w as ln, c as I } from "./256b619e.js";
|
|
2
|
+
import { av as an, aw as j, ax as D, ay as rn, az as y, U as on, aA as K, aB as _, aC as un, aD as t, aE as sn, aF as tn, aG as fn } from "./1269154d.js";
|
|
3
|
+
function cn(l) {
|
|
4
|
+
return l.innerRadius;
|
|
5
|
+
}
|
|
6
|
+
function yn(l) {
|
|
7
|
+
return l.outerRadius;
|
|
8
|
+
}
|
|
9
|
+
function gn(l) {
|
|
10
|
+
return l.startAngle;
|
|
11
|
+
}
|
|
12
|
+
function mn(l) {
|
|
13
|
+
return l.endAngle;
|
|
14
|
+
}
|
|
15
|
+
function pn(l) {
|
|
16
|
+
return l && l.padAngle;
|
|
17
|
+
}
|
|
18
|
+
function xn(l, h, z, E, v, A, O, a) {
|
|
19
|
+
var B = z - l, i = E - h, n = O - v, m = a - A, r = m * B - n * i;
|
|
20
|
+
if (!(r * r < y))
|
|
21
|
+
return r = (n * (h - A) - m * (l - v)) / r, [l + r * B, h + r * i];
|
|
22
|
+
}
|
|
23
|
+
function W(l, h, z, E, v, A, O) {
|
|
24
|
+
var a = l - z, B = h - E, i = (O ? A : -A) / K(a * a + B * B), n = i * B, m = -i * a, r = l + n, s = h + m, f = z + n, c = E + m, S = (r + f) / 2, o = (s + c) / 2, p = f - r, g = c - s, R = p * p + g * g, T = v - A, w = r * c - f * s, C = (g < 0 ? -1 : 1) * K(fn(0, T * T * R - w * w)), F = (w * g - p * C) / R, G = (-w * p - g * C) / R, P = (w * g + p * C) / R, x = (-w * p + g * C) / R, d = F - S, e = G - o, u = P - S, U = x - o;
|
|
25
|
+
return d * d + e * e > u * u + U * U && (F = P, G = x), {
|
|
26
|
+
cx: F,
|
|
27
|
+
cy: G,
|
|
28
|
+
x01: -n,
|
|
29
|
+
y01: -m,
|
|
30
|
+
x11: F * (v / T - 1),
|
|
31
|
+
y11: G * (v / T - 1)
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
function vn() {
|
|
35
|
+
var l = cn, h = yn, z = I(0), E = null, v = gn, A = mn, O = pn, a = null, B = ln(i);
|
|
36
|
+
function i() {
|
|
37
|
+
var n, m, r = +l.apply(this, arguments), s = +h.apply(this, arguments), f = v.apply(this, arguments) - rn, c = A.apply(this, arguments) - rn, S = un(c - f), o = c > f;
|
|
38
|
+
if (a || (a = n = B()), s < r && (m = s, s = r, r = m), !(s > y))
|
|
39
|
+
a.moveTo(0, 0);
|
|
40
|
+
else if (S > on - y)
|
|
41
|
+
a.moveTo(s * j(f), s * D(f)), a.arc(0, 0, s, f, c, !o), r > y && (a.moveTo(r * j(c), r * D(c)), a.arc(0, 0, r, c, f, o));
|
|
42
|
+
else {
|
|
43
|
+
var p = f, g = c, R = f, T = c, w = S, C = S, F = O.apply(this, arguments) / 2, G = F > y && (E ? +E.apply(this, arguments) : K(r * r + s * s)), P = _(un(s - r) / 2, +z.apply(this, arguments)), x = P, d = P, e, u;
|
|
44
|
+
if (G > y) {
|
|
45
|
+
var U = sn(G / r * D(F)), L = sn(G / s * D(F));
|
|
46
|
+
(w -= U * 2) > y ? (U *= o ? 1 : -1, R += U, T -= U) : (w = 0, R = T = (f + c) / 2), (C -= L * 2) > y ? (L *= o ? 1 : -1, p += L, g -= L) : (C = 0, p = g = (f + c) / 2);
|
|
47
|
+
}
|
|
48
|
+
var H = s * j(p), J = s * D(p), M = r * j(T), N = r * D(T);
|
|
49
|
+
if (P > y) {
|
|
50
|
+
var Q = s * j(g), V = s * D(g), X = r * j(R), Y = r * D(R), q;
|
|
51
|
+
if (S < an)
|
|
52
|
+
if (q = xn(H, J, X, Y, Q, V, M, N)) {
|
|
53
|
+
var Z = H - q[0], $ = J - q[1], k = Q - q[0], b = V - q[1], nn = 1 / D(tn((Z * k + $ * b) / (K(Z * Z + $ * $) * K(k * k + b * b))) / 2), en = K(q[0] * q[0] + q[1] * q[1]);
|
|
54
|
+
x = _(P, (r - en) / (nn - 1)), d = _(P, (s - en) / (nn + 1));
|
|
55
|
+
} else
|
|
56
|
+
x = d = 0;
|
|
57
|
+
}
|
|
58
|
+
C > y ? d > y ? (e = W(X, Y, H, J, s, d, o), u = W(Q, V, M, N, s, d, o), a.moveTo(e.cx + e.x01, e.cy + e.y01), d < P ? a.arc(e.cx, e.cy, d, t(e.y01, e.x01), t(u.y01, u.x01), !o) : (a.arc(e.cx, e.cy, d, t(e.y01, e.x01), t(e.y11, e.x11), !o), a.arc(0, 0, s, t(e.cy + e.y11, e.cx + e.x11), t(u.cy + u.y11, u.cx + u.x11), !o), a.arc(u.cx, u.cy, d, t(u.y11, u.x11), t(u.y01, u.x01), !o))) : (a.moveTo(H, J), a.arc(0, 0, s, p, g, !o)) : a.moveTo(H, J), !(r > y) || !(w > y) ? a.lineTo(M, N) : x > y ? (e = W(M, N, Q, V, r, -x, o), u = W(H, J, X, Y, r, -x, o), a.lineTo(e.cx + e.x01, e.cy + e.y01), x < P ? a.arc(e.cx, e.cy, x, t(e.y01, e.x01), t(u.y01, u.x01), !o) : (a.arc(e.cx, e.cy, x, t(e.y01, e.x01), t(e.y11, e.x11), !o), a.arc(0, 0, r, t(e.cy + e.y11, e.cx + e.x11), t(u.cy + u.y11, u.cx + u.x11), o), a.arc(u.cx, u.cy, x, t(u.y11, u.x11), t(u.y01, u.x01), !o))) : a.arc(0, 0, r, T, R, o);
|
|
59
|
+
}
|
|
60
|
+
if (a.closePath(), n)
|
|
61
|
+
return a = null, n + "" || null;
|
|
62
|
+
}
|
|
63
|
+
return i.centroid = function() {
|
|
64
|
+
var n = (+l.apply(this, arguments) + +h.apply(this, arguments)) / 2, m = (+v.apply(this, arguments) + +A.apply(this, arguments)) / 2 - an / 2;
|
|
65
|
+
return [j(m) * n, D(m) * n];
|
|
66
|
+
}, i.innerRadius = function(n) {
|
|
67
|
+
return arguments.length ? (l = typeof n == "function" ? n : I(+n), i) : l;
|
|
68
|
+
}, i.outerRadius = function(n) {
|
|
69
|
+
return arguments.length ? (h = typeof n == "function" ? n : I(+n), i) : h;
|
|
70
|
+
}, i.cornerRadius = function(n) {
|
|
71
|
+
return arguments.length ? (z = typeof n == "function" ? n : I(+n), i) : z;
|
|
72
|
+
}, i.padRadius = function(n) {
|
|
73
|
+
return arguments.length ? (E = n == null ? null : typeof n == "function" ? n : I(+n), i) : E;
|
|
74
|
+
}, i.startAngle = function(n) {
|
|
75
|
+
return arguments.length ? (v = typeof n == "function" ? n : I(+n), i) : v;
|
|
76
|
+
}, i.endAngle = function(n) {
|
|
77
|
+
return arguments.length ? (A = typeof n == "function" ? n : I(+n), i) : A;
|
|
78
|
+
}, i.padAngle = function(n) {
|
|
79
|
+
return arguments.length ? (O = typeof n == "function" ? n : I(+n), i) : O;
|
|
80
|
+
}, i.context = function(n) {
|
|
81
|
+
return arguments.length ? (a = n == null ? null : n, i) : a;
|
|
82
|
+
}, i;
|
|
83
|
+
}
|
|
84
|
+
export {
|
|
85
|
+
vn as a
|
|
86
|
+
};
|