@hpcc-js/react 3.4.1 → 3.4.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/index.js CHANGED
@@ -1,1892 +1,42 @@
1
- var __defProp = Object.defineProperty;
2
- var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
3
- import { Utility, Palette, HTMLWidget, SVGWidget } from "@hpcc-js/common";
4
- const PKG_NAME = "@hpcc-js/react";
5
- const PKG_VERSION = "3.4.1";
6
- const BUILD_VERSION = "3.15.1";
7
- var n, l$1, u$2, i$1, r$1, o$1, e$1, f$2, c$1, s$1, a$1, p$1 = {}, v$1 = [], y$1 = /acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i, w$1 = Array.isArray;
8
- function d$1(n2, l2) {
9
- for (var u2 in l2) n2[u2] = l2[u2];
10
- return n2;
11
- }
12
- __name(d$1, "d$1");
13
- function g$1(n2) {
14
- n2 && n2.parentNode && n2.parentNode.removeChild(n2);
15
- }
16
- __name(g$1, "g$1");
17
- function _$1(l2, u2, t2) {
18
- var i2, r2, o2, e2 = {};
19
- for (o2 in u2) "key" == o2 ? i2 = u2[o2] : "ref" == o2 ? r2 = u2[o2] : e2[o2] = u2[o2];
20
- if (arguments.length > 2 && (e2.children = arguments.length > 3 ? n.call(arguments, 2) : t2), "function" == typeof l2 && null != l2.defaultProps) for (o2 in l2.defaultProps) void 0 === e2[o2] && (e2[o2] = l2.defaultProps[o2]);
21
- return m$1(l2, e2, i2, r2, null);
22
- }
23
- __name(_$1, "_$1");
24
- function m$1(n2, t2, i2, r2, o2) {
25
- var e2 = { type: n2, props: t2, key: i2, ref: r2, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: null == o2 ? ++u$2 : o2, __i: -1, __u: 0 };
26
- return null == o2 && null != l$1.vnode && l$1.vnode(e2), e2;
27
- }
28
- __name(m$1, "m$1");
29
- function k$1(n2) {
30
- return n2.children;
31
- }
32
- __name(k$1, "k$1");
33
- function x(n2, l2) {
34
- this.props = n2, this.context = l2;
35
- }
36
- __name(x, "x");
37
- function S(n2, l2) {
38
- if (null == l2) return n2.__ ? S(n2.__, n2.__i + 1) : null;
39
- for (var u2; l2 < n2.__k.length; l2++) if (null != (u2 = n2.__k[l2]) && null != u2.__e) return u2.__e;
40
- return "function" == typeof n2.type ? S(n2) : null;
41
- }
42
- __name(S, "S");
43
- function C$1(n2) {
44
- var l2, u2;
45
- if (null != (n2 = n2.__) && null != n2.__c) {
46
- for (n2.__e = n2.__c.base = null, l2 = 0; l2 < n2.__k.length; l2++) if (null != (u2 = n2.__k[l2]) && null != u2.__e) {
47
- n2.__e = n2.__c.base = u2.__e;
48
- break;
49
- }
50
- return C$1(n2);
51
- }
52
- }
53
- __name(C$1, "C$1");
54
- function M(n2) {
55
- (!n2.__d && (n2.__d = true) && i$1.push(n2) && !$.__r++ || r$1 != l$1.debounceRendering) && ((r$1 = l$1.debounceRendering) || o$1)($);
56
- }
57
- __name(M, "M");
58
- function $() {
59
- for (var n2, u2, t2, r2, o2, f2, c2, s2 = 1; i$1.length; ) i$1.length > s2 && i$1.sort(e$1), n2 = i$1.shift(), s2 = i$1.length, n2.__d && (t2 = void 0, r2 = void 0, o2 = (r2 = (u2 = n2).__v).__e, f2 = [], c2 = [], u2.__P && ((t2 = d$1({}, r2)).__v = r2.__v + 1, l$1.vnode && l$1.vnode(t2), O(u2.__P, t2, r2, u2.__n, u2.__P.namespaceURI, 32 & r2.__u ? [o2] : null, f2, null == o2 ? S(r2) : o2, !!(32 & r2.__u), c2), t2.__v = r2.__v, t2.__.__k[t2.__i] = t2, N$1(f2, t2, c2), r2.__e = r2.__ = null, t2.__e != o2 && C$1(t2)));
60
- $.__r = 0;
61
- }
62
- __name($, "$");
63
- function I(n2, l2, u2, t2, i2, r2, o2, e2, f2, c2, s2) {
64
- var a2, h2, y2, w2, d2, g2, _2, m2 = t2 && t2.__k || v$1, b = l2.length;
65
- for (f2 = P$1(u2, l2, m2, f2, b), a2 = 0; a2 < b; a2++) null != (y2 = u2.__k[a2]) && (h2 = -1 == y2.__i ? p$1 : m2[y2.__i] || p$1, y2.__i = a2, g2 = O(n2, y2, h2, i2, r2, o2, e2, f2, c2, s2), w2 = y2.__e, y2.ref && h2.ref != y2.ref && (h2.ref && B$2(h2.ref, null, y2), s2.push(y2.ref, y2.__c || w2, y2)), null == d2 && null != w2 && (d2 = w2), (_2 = !!(4 & y2.__u)) || h2.__k === y2.__k ? f2 = A(y2, f2, n2, _2) : "function" == typeof y2.type && void 0 !== g2 ? f2 = g2 : w2 && (f2 = w2.nextSibling), y2.__u &= -7);
66
- return u2.__e = d2, f2;
67
- }
68
- __name(I, "I");
69
- function P$1(n2, l2, u2, t2, i2) {
70
- var r2, o2, e2, f2, c2, s2 = u2.length, a2 = s2, h2 = 0;
71
- for (n2.__k = new Array(i2), r2 = 0; r2 < i2; r2++) null != (o2 = l2[r2]) && "boolean" != typeof o2 && "function" != typeof o2 ? (f2 = r2 + h2, (o2 = n2.__k[r2] = "string" == typeof o2 || "number" == typeof o2 || "bigint" == typeof o2 || o2.constructor == String ? m$1(null, o2, null, null, null) : w$1(o2) ? m$1(k$1, { children: o2 }, null, null, null) : null == o2.constructor && o2.__b > 0 ? m$1(o2.type, o2.props, o2.key, o2.ref ? o2.ref : null, o2.__v) : o2).__ = n2, o2.__b = n2.__b + 1, e2 = null, -1 != (c2 = o2.__i = L(o2, u2, f2, a2)) && (a2--, (e2 = u2[c2]) && (e2.__u |= 2)), null == e2 || null == e2.__v ? (-1 == c2 && (i2 > s2 ? h2-- : i2 < s2 && h2++), "function" != typeof o2.type && (o2.__u |= 4)) : c2 != f2 && (c2 == f2 - 1 ? h2-- : c2 == f2 + 1 ? h2++ : (c2 > f2 ? h2-- : h2++, o2.__u |= 4))) : n2.__k[r2] = null;
72
- if (a2) for (r2 = 0; r2 < s2; r2++) null != (e2 = u2[r2]) && 0 == (2 & e2.__u) && (e2.__e == t2 && (t2 = S(e2)), D$1(e2, e2));
73
- return t2;
74
- }
75
- __name(P$1, "P$1");
76
- function A(n2, l2, u2, t2) {
77
- var i2, r2;
78
- if ("function" == typeof n2.type) {
79
- for (i2 = n2.__k, r2 = 0; i2 && r2 < i2.length; r2++) i2[r2] && (i2[r2].__ = n2, l2 = A(i2[r2], l2, u2, t2));
80
- return l2;
81
- }
82
- n2.__e != l2 && (t2 && (l2 && n2.type && !l2.parentNode && (l2 = S(n2)), u2.insertBefore(n2.__e, l2 || null)), l2 = n2.__e);
83
- do {
84
- l2 = l2 && l2.nextSibling;
85
- } while (null != l2 && 8 == l2.nodeType);
86
- return l2;
87
- }
88
- __name(A, "A");
89
- function H$1(n2, l2) {
90
- return l2 = l2 || [], null == n2 || "boolean" == typeof n2 || (w$1(n2) ? n2.some(function(n3) {
91
- H$1(n3, l2);
92
- }) : l2.push(n2)), l2;
93
- }
94
- __name(H$1, "H$1");
95
- function L(n2, l2, u2, t2) {
96
- var i2, r2, o2, e2 = n2.key, f2 = n2.type, c2 = l2[u2], s2 = null != c2 && 0 == (2 & c2.__u);
97
- if (null === c2 && null == n2.key || s2 && e2 == c2.key && f2 == c2.type) return u2;
98
- if (t2 > (s2 ? 1 : 0)) {
99
- for (i2 = u2 - 1, r2 = u2 + 1; i2 >= 0 || r2 < l2.length; ) if (null != (c2 = l2[o2 = i2 >= 0 ? i2-- : r2++]) && 0 == (2 & c2.__u) && e2 == c2.key && f2 == c2.type) return o2;
100
- }
101
- return -1;
102
- }
103
- __name(L, "L");
104
- function T$2(n2, l2, u2) {
105
- "-" == l2[0] ? n2.setProperty(l2, null == u2 ? "" : u2) : n2[l2] = null == u2 ? "" : "number" != typeof u2 || y$1.test(l2) ? u2 : u2 + "px";
106
- }
107
- __name(T$2, "T$2");
108
- function j$2(n2, l2, u2, t2, i2) {
109
- var r2, o2;
110
- n: if ("style" == l2) if ("string" == typeof u2) n2.style.cssText = u2;
111
- else {
112
- if ("string" == typeof t2 && (n2.style.cssText = t2 = ""), t2) for (l2 in t2) u2 && l2 in u2 || T$2(n2.style, l2, "");
113
- if (u2) for (l2 in u2) t2 && u2[l2] == t2[l2] || T$2(n2.style, l2, u2[l2]);
114
- }
115
- else if ("o" == l2[0] && "n" == l2[1]) r2 = l2 != (l2 = l2.replace(f$2, "$1")), o2 = l2.toLowerCase(), l2 = o2 in n2 || "onFocusOut" == l2 || "onFocusIn" == l2 ? o2.slice(2) : l2.slice(2), n2.l || (n2.l = {}), n2.l[l2 + r2] = u2, u2 ? t2 ? u2.u = t2.u : (u2.u = c$1, n2.addEventListener(l2, r2 ? a$1 : s$1, r2)) : n2.removeEventListener(l2, r2 ? a$1 : s$1, r2);
116
- else {
117
- if ("http://www.w3.org/2000/svg" == i2) l2 = l2.replace(/xlink(H|:h)/, "h").replace(/sName$/, "s");
118
- else if ("width" != l2 && "height" != l2 && "href" != l2 && "list" != l2 && "form" != l2 && "tabIndex" != l2 && "download" != l2 && "rowSpan" != l2 && "colSpan" != l2 && "role" != l2 && "popover" != l2 && l2 in n2) try {
119
- n2[l2] = null == u2 ? "" : u2;
120
- break n;
121
- } catch (n3) {
122
- }
123
- "function" == typeof u2 || (null == u2 || false === u2 && "-" != l2[4] ? n2.removeAttribute(l2) : n2.setAttribute(l2, "popover" == l2 && 1 == u2 ? "" : u2));
124
- }
125
- }
126
- __name(j$2, "j$2");
127
- function F$1(n2) {
128
- return function(u2) {
129
- if (this.l) {
130
- var t2 = this.l[u2.type + n2];
131
- if (null == u2.t) u2.t = c$1++;
132
- else if (u2.t < t2.u) return;
133
- return t2(l$1.event ? l$1.event(u2) : u2);
134
- }
135
- };
136
- }
137
- __name(F$1, "F$1");
138
- function O(n2, u2, t2, i2, r2, o2, e2, f2, c2, s2) {
139
- var a2, h2, p2, v2, y2, _2, m2, b, S2, C2, M2, $2, P2, A2, H2, L2, T2, j2 = u2.type;
140
- if (null != u2.constructor) return null;
141
- 128 & t2.__u && (c2 = !!(32 & t2.__u), o2 = [f2 = u2.__e = t2.__e]), (a2 = l$1.__b) && a2(u2);
142
- n: if ("function" == typeof j2) try {
143
- if (b = u2.props, S2 = "prototype" in j2 && j2.prototype.render, C2 = (a2 = j2.contextType) && i2[a2.__c], M2 = a2 ? C2 ? C2.props.value : a2.__ : i2, t2.__c ? m2 = (h2 = u2.__c = t2.__c).__ = h2.__E : (S2 ? u2.__c = h2 = new j2(b, M2) : (u2.__c = h2 = new x(b, M2), h2.constructor = j2, h2.render = E$1), C2 && C2.sub(h2), h2.props = b, h2.state || (h2.state = {}), h2.context = M2, h2.__n = i2, p2 = h2.__d = true, h2.__h = [], h2._sb = []), S2 && null == h2.__s && (h2.__s = h2.state), S2 && null != j2.getDerivedStateFromProps && (h2.__s == h2.state && (h2.__s = d$1({}, h2.__s)), d$1(h2.__s, j2.getDerivedStateFromProps(b, h2.__s))), v2 = h2.props, y2 = h2.state, h2.__v = u2, p2) S2 && null == j2.getDerivedStateFromProps && null != h2.componentWillMount && h2.componentWillMount(), S2 && null != h2.componentDidMount && h2.__h.push(h2.componentDidMount);
144
- else {
145
- if (S2 && null == j2.getDerivedStateFromProps && b !== v2 && null != h2.componentWillReceiveProps && h2.componentWillReceiveProps(b, M2), !h2.__e && null != h2.shouldComponentUpdate && false === h2.shouldComponentUpdate(b, h2.__s, M2) || u2.__v == t2.__v) {
146
- for (u2.__v != t2.__v && (h2.props = b, h2.state = h2.__s, h2.__d = false), u2.__e = t2.__e, u2.__k = t2.__k, u2.__k.some(function(n3) {
147
- n3 && (n3.__ = u2);
148
- }), $2 = 0; $2 < h2._sb.length; $2++) h2.__h.push(h2._sb[$2]);
149
- h2._sb = [], h2.__h.length && e2.push(h2);
150
- break n;
151
- }
152
- null != h2.componentWillUpdate && h2.componentWillUpdate(b, h2.__s, M2), S2 && null != h2.componentDidUpdate && h2.__h.push(function() {
153
- h2.componentDidUpdate(v2, y2, _2);
154
- });
155
- }
156
- if (h2.context = M2, h2.props = b, h2.__P = n2, h2.__e = false, P2 = l$1.__r, A2 = 0, S2) {
157
- for (h2.state = h2.__s, h2.__d = false, P2 && P2(u2), a2 = h2.render(h2.props, h2.state, h2.context), H2 = 0; H2 < h2._sb.length; H2++) h2.__h.push(h2._sb[H2]);
158
- h2._sb = [];
159
- } else do {
160
- h2.__d = false, P2 && P2(u2), a2 = h2.render(h2.props, h2.state, h2.context), h2.state = h2.__s;
161
- } while (h2.__d && ++A2 < 25);
162
- h2.state = h2.__s, null != h2.getChildContext && (i2 = d$1(d$1({}, i2), h2.getChildContext())), S2 && !p2 && null != h2.getSnapshotBeforeUpdate && (_2 = h2.getSnapshotBeforeUpdate(v2, y2)), L2 = a2, null != a2 && a2.type === k$1 && null == a2.key && (L2 = V$1(a2.props.children)), f2 = I(n2, w$1(L2) ? L2 : [L2], u2, t2, i2, r2, o2, e2, f2, c2, s2), h2.base = u2.__e, u2.__u &= -161, h2.__h.length && e2.push(h2), m2 && (h2.__E = h2.__ = null);
163
- } catch (n3) {
164
- if (u2.__v = null, c2 || null != o2) if (n3.then) {
165
- for (u2.__u |= c2 ? 160 : 128; f2 && 8 == f2.nodeType && f2.nextSibling; ) f2 = f2.nextSibling;
166
- o2[o2.indexOf(f2)] = null, u2.__e = f2;
167
- } else {
168
- for (T2 = o2.length; T2--; ) g$1(o2[T2]);
169
- z$1(u2);
170
- }
171
- else u2.__e = t2.__e, u2.__k = t2.__k, n3.then || z$1(u2);
172
- l$1.__e(n3, u2, t2);
173
- }
174
- else null == o2 && u2.__v == t2.__v ? (u2.__k = t2.__k, u2.__e = t2.__e) : f2 = u2.__e = q$2(t2.__e, u2, t2, i2, r2, o2, e2, c2, s2);
175
- return (a2 = l$1.diffed) && a2(u2), 128 & u2.__u ? void 0 : f2;
176
- }
177
- __name(O, "O");
178
- function z$1(n2) {
179
- n2 && n2.__c && (n2.__c.__e = true), n2 && n2.__k && n2.__k.forEach(z$1);
180
- }
181
- __name(z$1, "z$1");
182
- function N$1(n2, u2, t2) {
183
- for (var i2 = 0; i2 < t2.length; i2++) B$2(t2[i2], t2[++i2], t2[++i2]);
184
- l$1.__c && l$1.__c(u2, n2), n2.some(function(u3) {
185
- try {
186
- n2 = u3.__h, u3.__h = [], n2.some(function(n3) {
187
- n3.call(u3);
188
- });
189
- } catch (n3) {
190
- l$1.__e(n3, u3.__v);
191
- }
192
- });
193
- }
194
- __name(N$1, "N$1");
195
- function V$1(n2) {
196
- return "object" != typeof n2 || null == n2 || n2.__b && n2.__b > 0 ? n2 : w$1(n2) ? n2.map(V$1) : d$1({}, n2);
197
- }
198
- __name(V$1, "V$1");
199
- function q$2(u2, t2, i2, r2, o2, e2, f2, c2, s2) {
200
- var a2, h2, v2, y2, d2, _2, m2, b = i2.props, k2 = t2.props, x2 = t2.type;
201
- if ("svg" == x2 ? o2 = "http://www.w3.org/2000/svg" : "math" == x2 ? o2 = "http://www.w3.org/1998/Math/MathML" : o2 || (o2 = "http://www.w3.org/1999/xhtml"), null != e2) {
202
- for (a2 = 0; a2 < e2.length; a2++) if ((d2 = e2[a2]) && "setAttribute" in d2 == !!x2 && (x2 ? d2.localName == x2 : 3 == d2.nodeType)) {
203
- u2 = d2, e2[a2] = null;
204
- break;
205
- }
206
- }
207
- if (null == u2) {
208
- if (null == x2) return document.createTextNode(k2);
209
- u2 = document.createElementNS(o2, x2, k2.is && k2), c2 && (l$1.__m && l$1.__m(t2, e2), c2 = false), e2 = null;
210
- }
211
- if (null == x2) b === k2 || c2 && u2.data == k2 || (u2.data = k2);
212
- else {
213
- if (e2 = e2 && n.call(u2.childNodes), b = i2.props || p$1, !c2 && null != e2) for (b = {}, a2 = 0; a2 < u2.attributes.length; a2++) b[(d2 = u2.attributes[a2]).name] = d2.value;
214
- for (a2 in b) if (d2 = b[a2], "children" == a2) ;
215
- else if ("dangerouslySetInnerHTML" == a2) v2 = d2;
216
- else if (!(a2 in k2)) {
217
- if ("value" == a2 && "defaultValue" in k2 || "checked" == a2 && "defaultChecked" in k2) continue;
218
- j$2(u2, a2, null, d2, o2);
219
- }
220
- for (a2 in k2) d2 = k2[a2], "children" == a2 ? y2 = d2 : "dangerouslySetInnerHTML" == a2 ? h2 = d2 : "value" == a2 ? _2 = d2 : "checked" == a2 ? m2 = d2 : c2 && "function" != typeof d2 || b[a2] === d2 || j$2(u2, a2, d2, b[a2], o2);
221
- if (h2) c2 || v2 && (h2.__html == v2.__html || h2.__html == u2.innerHTML) || (u2.innerHTML = h2.__html), t2.__k = [];
222
- else if (v2 && (u2.innerHTML = ""), I("template" == t2.type ? u2.content : u2, w$1(y2) ? y2 : [y2], t2, i2, r2, "foreignObject" == x2 ? "http://www.w3.org/1999/xhtml" : o2, e2, f2, e2 ? e2[0] : i2.__k && S(i2, 0), c2, s2), null != e2) for (a2 = e2.length; a2--; ) g$1(e2[a2]);
223
- c2 || (a2 = "value", "progress" == x2 && null == _2 ? u2.removeAttribute("value") : null != _2 && (_2 !== u2[a2] || "progress" == x2 && !_2 || "option" == x2 && _2 != b[a2]) && j$2(u2, a2, _2, b[a2], o2), a2 = "checked", null != m2 && m2 != u2[a2] && j$2(u2, a2, m2, b[a2], o2));
224
- }
225
- return u2;
226
- }
227
- __name(q$2, "q$2");
228
- function B$2(n2, u2, t2) {
229
- try {
230
- if ("function" == typeof n2) {
231
- var i2 = "function" == typeof n2.__u;
232
- i2 && n2.__u(), i2 && null == u2 || (n2.__u = n2(u2));
233
- } else n2.current = u2;
234
- } catch (n3) {
235
- l$1.__e(n3, t2);
236
- }
237
- }
238
- __name(B$2, "B$2");
239
- function D$1(n2, u2, t2) {
240
- var i2, r2;
241
- if (l$1.unmount && l$1.unmount(n2), (i2 = n2.ref) && (i2.current && i2.current != n2.__e || B$2(i2, null, u2)), null != (i2 = n2.__c)) {
242
- if (i2.componentWillUnmount) try {
243
- i2.componentWillUnmount();
244
- } catch (n3) {
245
- l$1.__e(n3, u2);
246
- }
247
- i2.base = i2.__P = null;
248
- }
249
- if (i2 = n2.__k) for (r2 = 0; r2 < i2.length; r2++) i2[r2] && D$1(i2[r2], u2, t2 || "function" != typeof n2.type);
250
- t2 || g$1(n2.__e), n2.__c = n2.__ = n2.__e = void 0;
251
- }
252
- __name(D$1, "D$1");
253
- function E$1(n2, l2, u2) {
254
- return this.constructor(n2, u2);
255
- }
256
- __name(E$1, "E$1");
257
- function G$1(u2, t2, i2) {
258
- var r2, o2, e2, f2;
259
- t2 == document && (t2 = document.documentElement), l$1.__ && l$1.__(u2, t2), o2 = (r2 = "function" == typeof i2) ? null : i2 && i2.__k || t2.__k, e2 = [], f2 = [], O(t2, u2 = (!r2 && i2 || t2).__k = _$1(k$1, null, [u2]), o2 || p$1, p$1, t2.namespaceURI, !r2 && i2 ? [i2] : o2 ? null : t2.firstChild ? n.call(t2.childNodes) : null, e2, !r2 && i2 ? i2 : o2 ? o2.__e : t2.firstChild, r2, f2), N$1(e2, u2, f2);
260
- }
261
- __name(G$1, "G$1");
262
- n = v$1.slice, l$1 = { __e: /* @__PURE__ */ __name(function(n2, l2, u2, t2) {
263
- for (var i2, r2, o2; l2 = l2.__; ) if ((i2 = l2.__c) && !i2.__) try {
264
- if ((r2 = i2.constructor) && null != r2.getDerivedStateFromError && (i2.setState(r2.getDerivedStateFromError(n2)), o2 = i2.__d), null != i2.componentDidCatch && (i2.componentDidCatch(n2, t2 || {}), o2 = i2.__d), o2) return i2.__E = i2;
265
- } catch (l3) {
266
- n2 = l3;
267
- }
268
- throw n2;
269
- }, "__e") }, u$2 = 0, x.prototype.setState = function(n2, l2) {
270
- var u2;
271
- u2 = null != this.__s && this.__s != this.state ? this.__s : this.__s = d$1({}, this.state), "function" == typeof n2 && (n2 = n2(d$1({}, u2), this.props)), n2 && d$1(u2, n2), null != n2 && this.__v && (l2 && this._sb.push(l2), M(this));
272
- }, x.prototype.forceUpdate = function(n2) {
273
- this.__v && (this.__e = true, n2 && this.__h.push(n2), M(this));
274
- }, x.prototype.render = k$1, i$1 = [], o$1 = "function" == typeof Promise ? Promise.prototype.then.bind(Promise.resolve()) : setTimeout, e$1 = /* @__PURE__ */ __name(function(n2, l2) {
275
- return n2.__v.__b - l2.__v.__b;
276
- }, "e$1"), $.__r = 0, f$2 = /(PointerCapture)$|Capture$/i, c$1 = 0, s$1 = F$1(false), a$1 = F$1(true);
277
- var f$1 = 0;
278
- function u$1(e2, t2, n2, o2, i2, u2) {
279
- t2 || (t2 = {});
280
- var a2, c2, p2 = t2;
281
- if ("ref" in p2) for (c2 in p2 = {}, t2) "ref" == c2 ? a2 = t2[c2] : p2[c2] = t2[c2];
282
- var l2 = { type: e2, props: p2, key: n2, ref: a2, __k: null, __: null, __b: 0, __e: null, __c: null, constructor: void 0, __v: --f$1, __i: -1, __u: 0, __source: i2, __self: u2 };
283
- if ("function" == typeof e2 && (a2 = e2.defaultProps)) for (c2 in a2) void 0 === p2[c2] && (p2[c2] = a2[c2]);
284
- return l$1.vnode && l$1.vnode(l2), l2;
285
- }
286
- __name(u$1, "u$1");
287
- var t, r, u, i, o = 0, f = [], c = l$1, e = c.__b, a = c.__r, v = c.diffed, l = c.__c, m = c.unmount, s = c.__;
288
- function p(n2, t2) {
289
- c.__h && c.__h(r, n2, o || t2), o = 0;
290
- var u2 = r.__H || (r.__H = { __: [], __h: [] });
291
- return n2 >= u2.__.length && u2.__.push({}), u2.__[n2];
292
- }
293
- __name(p, "p");
294
- function d(n2) {
295
- return o = 1, h(D, n2);
296
- }
297
- __name(d, "d");
298
- function h(n2, u2, i2) {
299
- var o2 = p(t++, 2);
300
- if (o2.t = n2, !o2.__c && (o2.__ = [i2 ? i2(u2) : D(void 0, u2), function(n3) {
301
- var t2 = o2.__N ? o2.__N[0] : o2.__[0], r2 = o2.t(t2, n3);
302
- t2 !== r2 && (o2.__N = [r2, o2.__[1]], o2.__c.setState({}));
303
- }], o2.__c = r, !r.__f)) {
304
- var f2 = /* @__PURE__ */ __name(function(n3, t2, r2) {
305
- if (!o2.__c.__H) return true;
306
- var u3 = o2.__c.__H.__.filter(function(n4) {
307
- return !!n4.__c;
308
- });
309
- if (u3.every(function(n4) {
310
- return !n4.__N;
311
- })) return !c2 || c2.call(this, n3, t2, r2);
312
- var i3 = o2.__c.props !== n3;
313
- return u3.forEach(function(n4) {
314
- if (n4.__N) {
315
- var t3 = n4.__[0];
316
- n4.__ = n4.__N, n4.__N = void 0, t3 !== n4.__[0] && (i3 = true);
317
- }
318
- }), c2 && c2.call(this, n3, t2, r2) || i3;
319
- }, "f");
320
- r.__f = true;
321
- var c2 = r.shouldComponentUpdate, e2 = r.componentWillUpdate;
322
- r.componentWillUpdate = function(n3, t2, r2) {
323
- if (this.__e) {
324
- var u3 = c2;
325
- c2 = void 0, f2(n3, t2, r2), c2 = u3;
326
- }
327
- e2 && e2.call(this, n3, t2, r2);
328
- }, r.shouldComponentUpdate = f2;
329
- }
330
- return o2.__N || o2.__;
331
- }
332
- __name(h, "h");
333
- function y(n2, u2) {
334
- var i2 = p(t++, 3);
335
- !c.__s && C(i2.__H, u2) && (i2.__ = n2, i2.u = u2, r.__H.__h.push(i2));
336
- }
337
- __name(y, "y");
338
- function _(n2, u2) {
339
- var i2 = p(t++, 4);
340
- !c.__s && C(i2.__H, u2) && (i2.__ = n2, i2.u = u2, r.__h.push(i2));
341
- }
342
- __name(_, "_");
343
- function T$1(n2, r2) {
344
- var u2 = p(t++, 7);
345
- return C(u2.__H, r2) && (u2.__ = n2(), u2.__H = r2, u2.__h = n2), u2.__;
346
- }
347
- __name(T$1, "T$1");
348
- function q$1(n2, t2) {
349
- return o = 8, T$1(function() {
350
- return n2;
351
- }, t2);
352
- }
353
- __name(q$1, "q$1");
354
- function j$1() {
355
- for (var n2; n2 = f.shift(); ) if (n2.__P && n2.__H) try {
356
- n2.__H.__h.forEach(z), n2.__H.__h.forEach(B$1), n2.__H.__h = [];
357
- } catch (t2) {
358
- n2.__H.__h = [], c.__e(t2, n2.__v);
359
- }
360
- }
361
- __name(j$1, "j$1");
362
- c.__b = function(n2) {
363
- r = null, e && e(n2);
364
- }, c.__ = function(n2, t2) {
365
- n2 && t2.__k && t2.__k.__m && (n2.__m = t2.__k.__m), s && s(n2, t2);
366
- }, c.__r = function(n2) {
367
- a && a(n2), t = 0;
368
- var i2 = (r = n2.__c).__H;
369
- i2 && (u === r ? (i2.__h = [], r.__h = [], i2.__.forEach(function(n3) {
370
- n3.__N && (n3.__ = n3.__N), n3.u = n3.__N = void 0;
371
- })) : (i2.__h.forEach(z), i2.__h.forEach(B$1), i2.__h = [], t = 0)), u = r;
372
- }, c.diffed = function(n2) {
373
- v && v(n2);
374
- var t2 = n2.__c;
375
- t2 && t2.__H && (t2.__H.__h.length && (1 !== f.push(t2) && i === c.requestAnimationFrame || ((i = c.requestAnimationFrame) || w)(j$1)), t2.__H.__.forEach(function(n3) {
376
- n3.u && (n3.__H = n3.u), n3.u = void 0;
377
- })), u = r = null;
378
- }, c.__c = function(n2, t2) {
379
- t2.some(function(n3) {
380
- try {
381
- n3.__h.forEach(z), n3.__h = n3.__h.filter(function(n4) {
382
- return !n4.__ || B$1(n4);
383
- });
384
- } catch (r2) {
385
- t2.some(function(n4) {
386
- n4.__h && (n4.__h = []);
387
- }), t2 = [], c.__e(r2, n3.__v);
388
- }
389
- }), l && l(n2, t2);
390
- }, c.unmount = function(n2) {
391
- m && m(n2);
392
- var t2, r2 = n2.__c;
393
- r2 && r2.__H && (r2.__H.__.forEach(function(n3) {
394
- try {
395
- z(n3);
396
- } catch (n4) {
397
- t2 = n4;
398
- }
399
- }), r2.__H = void 0, t2 && c.__e(t2, r2.__v));
400
- };
401
- var k = "function" == typeof requestAnimationFrame;
402
- function w(n2) {
403
- var t2, r2 = /* @__PURE__ */ __name(function() {
404
- clearTimeout(u2), k && cancelAnimationFrame(t2), setTimeout(n2);
405
- }, "r"), u2 = setTimeout(r2, 35);
406
- k && (t2 = requestAnimationFrame(r2));
407
- }
408
- __name(w, "w");
409
- function z(n2) {
410
- var t2 = r, u2 = n2.__c;
411
- "function" == typeof u2 && (n2.__c = void 0, u2()), r = t2;
412
- }
413
- __name(z, "z");
414
- function B$1(n2) {
415
- var t2 = r;
416
- n2.__c = n2.__(), r = t2;
417
- }
418
- __name(B$1, "B$1");
419
- function C(n2, t2) {
420
- return !n2 || n2.length !== t2.length || t2.some(function(t3, r2) {
421
- return t3 !== n2[r2];
422
- });
423
- }
424
- __name(C, "C");
425
- function D(n2, t2) {
426
- return "function" == typeof t2 ? t2(n2) : t2;
427
- }
428
- __name(D, "D");
429
- function g(n2, t2) {
430
- for (var e2 in t2) n2[e2] = t2[e2];
431
- return n2;
432
- }
433
- __name(g, "g");
434
- function E(n2, t2) {
435
- for (var e2 in n2) if ("__source" !== e2 && !(e2 in t2)) return true;
436
- for (var r2 in t2) if ("__source" !== r2 && n2[r2] !== t2[r2]) return true;
437
- return false;
438
- }
439
- __name(E, "E");
440
- function N(n2, t2) {
441
- this.props = n2, this.context = t2;
442
- }
443
- __name(N, "N");
444
- (N.prototype = new x()).isPureReactComponent = true, N.prototype.shouldComponentUpdate = function(n2, t2) {
445
- return E(this.props, n2) || E(this.state, t2);
446
- };
447
- var T = l$1.__b;
448
- l$1.__b = function(n2) {
449
- n2.type && n2.type.__f && n2.ref && (n2.props.ref = n2.ref, n2.ref = null), T && T(n2);
450
- };
451
- var F = l$1.__e;
452
- l$1.__e = function(n2, t2, e2, r2) {
453
- if (n2.then) {
454
- for (var u2, o2 = t2; o2 = o2.__; ) if ((u2 = o2.__c) && u2.__c) return null == t2.__e && (t2.__e = e2.__e, t2.__k = e2.__k), u2.__c(n2, t2);
455
- }
456
- F(n2, t2, e2, r2);
457
- };
458
- var U = l$1.unmount;
459
- function V(n2, t2, e2) {
460
- return n2 && (n2.__c && n2.__c.__H && (n2.__c.__H.__.forEach(function(n3) {
461
- "function" == typeof n3.__c && n3.__c();
462
- }), n2.__c.__H = null), null != (n2 = g({}, n2)).__c && (n2.__c.__P === e2 && (n2.__c.__P = t2), n2.__c.__e = true, n2.__c = null), n2.__k = n2.__k && n2.__k.map(function(n3) {
463
- return V(n3, t2, e2);
464
- })), n2;
465
- }
466
- __name(V, "V");
467
- function W(n2, t2, e2) {
468
- return n2 && e2 && (n2.__v = null, n2.__k = n2.__k && n2.__k.map(function(n3) {
469
- return W(n3, t2, e2);
470
- }), n2.__c && n2.__c.__P === t2 && (n2.__e && e2.appendChild(n2.__e), n2.__c.__e = true, n2.__c.__P = e2)), n2;
471
- }
472
- __name(W, "W");
473
- function P() {
474
- this.__u = 0, this.o = null, this.__b = null;
475
- }
476
- __name(P, "P");
477
- function j(n2) {
478
- var t2 = n2.__.__c;
479
- return t2 && t2.__a && t2.__a(n2);
480
- }
481
- __name(j, "j");
482
- function B() {
483
- this.i = null, this.l = null;
484
- }
485
- __name(B, "B");
486
- l$1.unmount = function(n2) {
487
- var t2 = n2.__c;
488
- t2 && t2.__R && t2.__R(), t2 && 32 & n2.__u && (n2.type = null), U && U(n2);
489
- }, (P.prototype = new x()).__c = function(n2, t2) {
490
- var e2 = t2.__c, r2 = this;
491
- null == r2.o && (r2.o = []), r2.o.push(e2);
492
- var u2 = j(r2.__v), o2 = false, i2 = /* @__PURE__ */ __name(function() {
493
- o2 || (o2 = true, e2.__R = null, u2 ? u2(l2) : l2());
494
- }, "i");
495
- e2.__R = i2;
496
- var l2 = /* @__PURE__ */ __name(function() {
497
- if (!--r2.__u) {
498
- if (r2.state.__a) {
499
- var n3 = r2.state.__a;
500
- r2.__v.__k[0] = W(n3, n3.__c.__P, n3.__c.__O);
501
- }
502
- var t3;
503
- for (r2.setState({ __a: r2.__b = null }); t3 = r2.o.pop(); ) t3.forceUpdate();
504
- }
505
- }, "l");
506
- r2.__u++ || 32 & t2.__u || r2.setState({ __a: r2.__b = r2.__v.__k[0] }), n2.then(i2, i2);
507
- }, P.prototype.componentWillUnmount = function() {
508
- this.o = [];
509
- }, P.prototype.render = function(n2, e2) {
510
- if (this.__b) {
511
- if (this.__v.__k) {
512
- var r2 = document.createElement("div"), o2 = this.__v.__k[0].__c;
513
- this.__v.__k[0] = V(this.__b, r2, o2.__O = o2.__P);
514
- }
515
- this.__b = null;
516
- }
517
- var i2 = e2.__a && _$1(k$1, null, n2.fallback);
518
- return i2 && (i2.__u &= -33), [_$1(k$1, null, e2.__a ? null : n2.children), i2];
519
- };
520
- var H = /* @__PURE__ */ __name(function(n2, t2, e2) {
521
- if (++e2[1] === e2[0] && n2.l.delete(t2), n2.props.revealOrder && ("t" !== n2.props.revealOrder[0] || !n2.l.size)) for (e2 = n2.i; e2; ) {
522
- for (; e2.length > 3; ) e2.pop()();
523
- if (e2[1] < e2[0]) break;
524
- n2.i = e2 = e2[2];
525
- }
526
- }, "H");
527
- (B.prototype = new x()).__a = function(n2) {
528
- var t2 = this, e2 = j(t2.__v), r2 = t2.l.get(n2);
529
- return r2[0]++, function(u2) {
530
- var o2 = /* @__PURE__ */ __name(function() {
531
- t2.props.revealOrder ? (r2.push(u2), H(t2, n2, r2)) : u2();
532
- }, "o");
533
- e2 ? e2(o2) : o2();
534
- };
535
- }, B.prototype.render = function(n2) {
536
- this.i = null, this.l = /* @__PURE__ */ new Map();
537
- var t2 = H$1(n2.children);
538
- n2.revealOrder && "b" === n2.revealOrder[0] && t2.reverse();
539
- for (var e2 = t2.length; e2--; ) this.l.set(t2[e2], this.i = [1, 0, this.i]);
540
- return n2.children;
541
- }, B.prototype.componentDidUpdate = B.prototype.componentDidMount = function() {
542
- var n2 = this;
543
- this.l.forEach(function(t2, e2) {
544
- H(n2, e2, t2);
545
- });
546
- };
547
- var q = "undefined" != typeof Symbol && Symbol.for && Symbol.for("react.element") || 60103, G = /^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/, J = /^on(Ani|Tra|Tou|BeforeInp|Compo)/, K = /[A-Z0-9]/g, Q = "undefined" != typeof document, X = /* @__PURE__ */ __name(function(n2) {
548
- return ("undefined" != typeof Symbol && "symbol" == typeof Symbol() ? /fil|che|rad/ : /fil|che|ra/).test(n2);
549
- }, "X");
550
- x.prototype.isReactComponent = {}, ["componentWillMount", "componentWillReceiveProps", "componentWillUpdate"].forEach(function(t2) {
551
- Object.defineProperty(x.prototype, t2, { configurable: true, get: /* @__PURE__ */ __name(function() {
552
- return this["UNSAFE_" + t2];
553
- }, "get"), set: /* @__PURE__ */ __name(function(n2) {
554
- Object.defineProperty(this, t2, { configurable: true, writable: true, value: n2 });
555
- }, "set") });
556
- });
557
- var en = l$1.event;
558
- function rn() {
559
- }
560
- __name(rn, "rn");
561
- function un() {
562
- return this.cancelBubble;
563
- }
564
- __name(un, "un");
565
- function on() {
566
- return this.defaultPrevented;
567
- }
568
- __name(on, "on");
569
- l$1.event = function(n2) {
570
- return en && (n2 = en(n2)), n2.persist = rn, n2.isPropagationStopped = un, n2.isDefaultPrevented = on, n2.nativeEvent = n2;
571
- };
572
- var cn = { enumerable: false, configurable: true, get: /* @__PURE__ */ __name(function() {
573
- return this.class;
574
- }, "get") }, fn = l$1.vnode;
575
- l$1.vnode = function(n2) {
576
- "string" == typeof n2.type && (function(n3) {
577
- var t2 = n3.props, e2 = n3.type, u2 = {}, o2 = -1 === e2.indexOf("-");
578
- for (var i2 in t2) {
579
- var l2 = t2[i2];
580
- if (!("value" === i2 && "defaultValue" in t2 && null == l2 || Q && "children" === i2 && "noscript" === e2 || "class" === i2 || "className" === i2)) {
581
- var c2 = i2.toLowerCase();
582
- "defaultValue" === i2 && "value" in t2 && null == t2.value ? i2 = "value" : "download" === i2 && true === l2 ? l2 = "" : "translate" === c2 && "no" === l2 ? l2 = false : "o" === c2[0] && "n" === c2[1] ? "ondoubleclick" === c2 ? i2 = "ondblclick" : "onchange" !== c2 || "input" !== e2 && "textarea" !== e2 || X(t2.type) ? "onfocus" === c2 ? i2 = "onfocusin" : "onblur" === c2 ? i2 = "onfocusout" : J.test(i2) && (i2 = c2) : c2 = i2 = "oninput" : o2 && G.test(i2) ? i2 = i2.replace(K, "-$&").toLowerCase() : null === l2 && (l2 = void 0), "oninput" === c2 && u2[i2 = c2] && (i2 = "oninputCapture"), u2[i2] = l2;
583
- }
584
- }
585
- "select" == e2 && u2.multiple && Array.isArray(u2.value) && (u2.value = H$1(t2.children).forEach(function(n4) {
586
- n4.props.selected = -1 != u2.value.indexOf(n4.props.value);
587
- })), "select" == e2 && null != u2.defaultValue && (u2.value = H$1(t2.children).forEach(function(n4) {
588
- n4.props.selected = u2.multiple ? -1 != u2.defaultValue.indexOf(n4.props.value) : u2.defaultValue == n4.props.value;
589
- })), t2.class && !t2.className ? (u2.class = t2.class, Object.defineProperty(u2, "className", cn)) : (t2.className && !t2.class || t2.class && t2.className) && (u2.class = u2.className = t2.className), n3.props = u2;
590
- })(n2), n2.$$typeof = q, fn && fn(n2);
591
- };
592
- var an = l$1.__r;
593
- l$1.__r = function(n2) {
594
- an && an(n2), n2.__c;
595
- };
596
- var sn = l$1.diffed;
597
- l$1.diffed = function(n2) {
598
- sn && sn(n2);
599
- var t2 = n2.props, e2 = n2.__e;
600
- null != e2 && "textarea" === n2.type && "value" in t2 && t2.value !== e2.value && (e2.value = null == t2.value ? "" : t2.value);
601
- };
602
- function bn(n2) {
603
- return !!n2.__k && (G$1(null, n2), true);
604
- }
605
- __name(bn, "bn");
606
- const preactShim = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
607
- __proto__: null,
608
- Component: x,
609
- Fragment: k$1,
610
- createElement: _$1,
611
- h: _$1,
612
- render: G$1,
613
- unmountComponentAtNode: bn,
614
- useCallback: q$1,
615
- useEffect: y,
616
- useLayoutEffect: _,
617
- useMemo: T$1,
618
- useReducer: h,
619
- useState: d
620
- }, Symbol.toStringTag, { value: "Module" }));
621
- const Image = /* @__PURE__ */ __name(({
622
- href,
623
- x: x2,
624
- y: y2 = 0,
625
- height = 12
626
- }) => {
627
- return /* @__PURE__ */ u$1(
628
- "image",
629
- {
630
- xlinkHref: href,
631
- x: x2 - height / 2,
632
- y: y2 - height / 2,
633
- width: height,
634
- height
635
- }
636
- );
637
- }, "Image");
638
- const ImageChar = /* @__PURE__ */ __name(({
639
- x: x2,
640
- y: y2 = 0,
641
- height = 12,
642
- fill,
643
- stroke,
644
- fontFamily = "FontAwesome",
645
- char = "",
646
- fontWeight
647
- }) => {
648
- const renderChar = T$1(() => {
649
- return fontFamily === "FontAwesome" ? Utility.faChar(char) : char;
650
- }, [char, fontFamily]);
651
- return /* @__PURE__ */ u$1(
652
- "text",
653
- {
654
- x: x2,
655
- y: y2,
656
- fill,
657
- stroke,
658
- fontFamily,
659
- fontSize: `${height}px`,
660
- fontWeight,
661
- dominantBaseline: "middle",
662
- style: { textAnchor: "middle", alignmentBaseline: "middle" },
663
- children: renderChar
664
- }
665
- );
666
- }, "ImageChar");
667
- const Circle = /* @__PURE__ */ __name(({
668
- radius = 32,
669
- fill = "navy",
670
- stroke = fill,
671
- strokeWidth = 1,
672
- shapeRendering
673
- }) => /* @__PURE__ */ u$1(
674
- "circle",
675
- {
676
- r: radius,
677
- fill,
678
- stroke,
679
- strokeWidth,
680
- shapeRendering
681
- }
682
- ), "Circle");
683
- const Square = /* @__PURE__ */ __name(({
684
- radius = 30,
685
- cornerRadius = 0,
686
- fill = "white",
687
- stroke,
688
- strokeWidth = 1,
689
- shapeRendering
690
- }) => /* @__PURE__ */ u$1(
691
- "rect",
692
- {
693
- x: -radius,
694
- y: -radius,
695
- rx: cornerRadius,
696
- ry: cornerRadius,
697
- width: radius * 2,
698
- height: radius * 2,
699
- fill,
700
- stroke: stroke || fill,
701
- strokeWidth,
702
- shapeRendering
703
- }
704
- ), "Square");
705
- const Rectangle = /* @__PURE__ */ __name(({
706
- width = 30,
707
- height = 30,
708
- cornerRadius = 0,
709
- fill = "white",
710
- stroke = "black",
711
- strokeWidth = 1,
712
- shapeRendering
713
- }) => {
714
- return /* @__PURE__ */ u$1(
715
- "rect",
716
- {
717
- x: -width / 2,
718
- y: -height / 2,
719
- rx: cornerRadius,
720
- ry: cornerRadius,
721
- width,
722
- height,
723
- fill,
724
- stroke: stroke || fill,
725
- strokeWidth,
726
- shapeRendering
727
- }
728
- );
729
- }, "Rectangle");
730
- const Shape = /* @__PURE__ */ __name(({
731
- shape = "circle",
732
- height = 128,
733
- width,
734
- fill,
735
- stroke,
736
- strokeWidth = 1,
737
- shapeRendering,
738
- cornerRadius
739
- }) => {
740
- switch (shape) {
741
- case "square":
742
- return /* @__PURE__ */ u$1(
743
- Square,
744
- {
745
- radius: height / 2,
746
- fill,
747
- stroke,
748
- strokeWidth,
749
- shapeRendering,
750
- cornerRadius
751
- }
752
- );
753
- case "rectangle":
754
- return /* @__PURE__ */ u$1(
755
- Rectangle,
756
- {
757
- width: width ?? height,
758
- height,
759
- fill,
760
- stroke,
761
- strokeWidth,
762
- shapeRendering,
763
- cornerRadius
764
- }
765
- );
766
- case "circle":
767
- default:
768
- return /* @__PURE__ */ u$1(
769
- Circle,
770
- {
771
- radius: height / 2,
772
- fill,
773
- stroke,
774
- strokeWidth,
775
- shapeRendering
776
- }
777
- );
778
- }
779
- }, "Shape");
780
- const Icon = /* @__PURE__ */ __name(({
781
- shape = "circle",
782
- width,
783
- height = 32,
784
- fill,
785
- stroke,
786
- strokeWidth = 0,
787
- imageUrl = "",
788
- imageFontFamily = "FontAwesome",
789
- imageChar = "",
790
- imageCharFill = Palette.textColor(fill),
791
- padding = height / 5,
792
- xOffset = 0,
793
- yOffset = 0,
794
- cornerRadius,
795
- shapeRendering
796
- }) => {
797
- return /* @__PURE__ */ u$1(k$1, { children: [
798
- /* @__PURE__ */ u$1(
799
- Shape,
800
- {
801
- shape,
802
- width,
803
- height,
804
- fill,
805
- stroke,
806
- strokeWidth,
807
- shapeRendering,
808
- cornerRadius
809
- }
810
- ),
811
- imageUrl ? /* @__PURE__ */ u$1(
812
- Image,
813
- {
814
- href: imageUrl,
815
- x: xOffset,
816
- y: yOffset,
817
- height: height - padding
818
- }
819
- ) : /* @__PURE__ */ u$1(
820
- ImageChar,
821
- {
822
- x: xOffset,
823
- y: yOffset,
824
- height: height - padding,
825
- fontFamily: imageFontFamily,
826
- char: imageChar,
827
- fill: imageCharFill,
828
- fontWeight: 400
829
- }
830
- )
831
- ] });
832
- }, "Icon");
833
- const Icons = /* @__PURE__ */ __name(({
834
- icons = []
835
- }) => {
836
- const IconComponents = icons.map((cat) => {
837
- return /* @__PURE__ */ u$1(
838
- "g",
839
- {
840
- id: cat.id,
841
- children: /* @__PURE__ */ u$1(
842
- Icon,
843
- {
844
- ...cat
845
- }
846
- )
847
- },
848
- cat.id
849
- );
850
- });
851
- return /* @__PURE__ */ u$1(k$1, { children: IconComponents });
852
- }, "Icons");
853
- const TextLine = /* @__PURE__ */ __name(({
854
- text,
855
- height = 12,
856
- anchor = "middle",
857
- baseline = "middle",
858
- fontFamily = "Verdana",
859
- fill = "black"
860
- }) => {
861
- return /* @__PURE__ */ u$1(
862
- "text",
863
- {
864
- "font-family": fontFamily,
865
- "font-size": `${height}px`,
866
- "text-anchor": anchor,
867
- "dominant-baseline": baseline,
868
- fill,
869
- children: text
870
- }
871
- );
872
- }, "TextLine");
873
- const Text = /* @__PURE__ */ __name(({
874
- text,
875
- height = 12,
876
- fontFamily = "Verdana",
877
- fill = "black",
878
- onSizeUpdate
879
- }) => {
880
- const [totalWidth, setTotalWidth] = d(0);
881
- const [totalHeight, setTotalHeight] = d(0);
882
- y(() => {
883
- if (onSizeUpdate) {
884
- onSizeUpdate({ width: totalWidth, height: totalHeight });
885
- }
886
- }, [totalWidth, totalHeight, onSizeUpdate]);
887
- const parts = T$1(() => {
888
- return text.split("\n");
889
- }, [text]);
890
- _(() => {
891
- const size = Utility.textSize(parts, fontFamily, height);
892
- setTotalWidth(size.width);
893
- setTotalHeight(size.height);
894
- }, [fontFamily, height, parts]);
895
- const TextLines = T$1(() => {
896
- const yOffset = -(totalHeight / 2) + height / 2;
897
- return parts.map((p2, i2) => {
898
- return /* @__PURE__ */ u$1("g", { transform: `translate(0 ${yOffset + i2 * (height + 2)})`, children: /* @__PURE__ */ u$1(
899
- TextLine,
900
- {
901
- text: p2,
902
- height,
903
- fontFamily,
904
- fill
905
- }
906
- ) }, `key-${i2}`);
907
- });
908
- }, [parts, totalHeight, height, fontFamily, fill]);
909
- return /* @__PURE__ */ u$1("g", { children: TextLines });
910
- }, "Text");
911
- const TextBox = /* @__PURE__ */ __name(({
912
- text,
913
- height = 12,
914
- fontFamily = "Verdana",
915
- padding = 4,
916
- fill = "whitesmoke",
917
- stroke = "lightgray",
918
- textFill = "black",
919
- strokeWidth = 1,
920
- cornerRadius = 0,
921
- onSizeUpdate
922
- }) => {
923
- const [textWidth, setTextWidthUpdate] = d(0);
924
- const [textHeight, setTextHeightUpdate] = d(0);
925
- y(() => {
926
- if (onSizeUpdate) {
927
- onSizeUpdate({ width: textWidth, height: textHeight });
928
- }
929
- }, [textWidth, textHeight, onSizeUpdate]);
930
- const onTextSizeUpdate = q$1((size) => {
931
- setTextWidthUpdate(size.width);
932
- setTextHeightUpdate(size.height);
933
- }, []);
934
- const w2 = textWidth + padding * 2 + strokeWidth;
935
- const h2 = textHeight + padding * 2 + strokeWidth;
936
- const textOffsetY = Math.floor(height / 10);
937
- return /* @__PURE__ */ u$1(k$1, { children: [
938
- /* @__PURE__ */ u$1(
939
- Rectangle,
940
- {
941
- width: w2,
942
- height: h2,
943
- fill,
944
- stroke,
945
- strokeWidth,
946
- cornerRadius
947
- }
948
- ),
949
- /* @__PURE__ */ u$1("g", { transform: `translate(0 ${textOffsetY})`, children: /* @__PURE__ */ u$1(
950
- Text,
951
- {
952
- text,
953
- fontFamily,
954
- height,
955
- fill: textFill,
956
- onSizeUpdate: onTextSizeUpdate
957
- }
958
- ) })
959
- ] });
960
- }, "TextBox");
961
- const LabelledRect = /* @__PURE__ */ __name(({
962
- text,
963
- height = 12,
964
- width = 12,
965
- fontFamily = "Verdana",
966
- fontSize = 10,
967
- padding = 3,
968
- fill = "whitesmoke",
969
- stroke = "lightgray",
970
- textFill = "black",
971
- strokeWidth = 1,
972
- cornerRadius = 0,
973
- onSizeUpdate
974
- }) => {
975
- const [actualWidth, setActualWidthUpdate] = d(width);
976
- const [actualHeight, setActualHeightUpdate] = d(height);
977
- _(() => {
978
- const size = Utility.textSize(text, fontFamily, fontSize);
979
- setActualWidthUpdate(size.width + padding * 2);
980
- setActualHeightUpdate(size.height + padding * 2);
981
- }, [text, fontFamily, fontSize, padding]);
982
- _(() => {
983
- if (onSizeUpdate) {
984
- onSizeUpdate({ width: actualWidth, height: actualHeight });
985
- }
986
- }, [actualWidth, actualHeight, padding, onSizeUpdate]);
987
- return /* @__PURE__ */ u$1(k$1, { children: [
988
- /* @__PURE__ */ u$1(
989
- Rectangle,
990
- {
991
- width,
992
- height,
993
- fill,
994
- stroke,
995
- strokeWidth,
996
- cornerRadius
997
- }
998
- ),
999
- /* @__PURE__ */ u$1("g", { transform: `translate(${-(width / 2) + padding} ${-(height / 2) + padding})`, children: /* @__PURE__ */ u$1(
1000
- TextLine,
1001
- {
1002
- text,
1003
- fontFamily,
1004
- height: fontSize,
1005
- fill: textFill,
1006
- anchor: "start",
1007
- baseline: "hanging"
1008
- }
1009
- ) })
1010
- ] });
1011
- }, "LabelledRect");
1012
- const IconLabelledRect = /* @__PURE__ */ __name(({
1013
- icon,
1014
- iconFontFamily,
1015
- text,
1016
- height = 12,
1017
- width = 12,
1018
- fontFamily = "Verdana",
1019
- fontSize = 10,
1020
- padding = 3,
1021
- fill = "whitesmoke",
1022
- stroke = "lightgray",
1023
- textFill = "black",
1024
- strokeWidth = 1,
1025
- cornerRadius = 0
1026
- }) => {
1027
- return /* @__PURE__ */ u$1(k$1, { children: [
1028
- /* @__PURE__ */ u$1(
1029
- Rectangle,
1030
- {
1031
- width,
1032
- height,
1033
- fill,
1034
- stroke,
1035
- strokeWidth,
1036
- cornerRadius
1037
- }
1038
- ),
1039
- /* @__PURE__ */ u$1("g", { transform: `translate(${-(width / 2) + padding} ${-(height / 2) + padding})`, children: /* @__PURE__ */ u$1(
1040
- Icon,
1041
- {
1042
- shape: "square",
1043
- imageFontFamily: iconFontFamily,
1044
- imageChar: icon,
1045
- height,
1046
- fill,
1047
- imageCharFill: textFill
1048
- }
1049
- ) }),
1050
- /* @__PURE__ */ u$1("g", { transform: `translate(${-(width / 2) + padding * 2 + height} ${-(height / 2) + padding})`, children: /* @__PURE__ */ u$1(
1051
- TextLine,
1052
- {
1053
- text,
1054
- fontFamily,
1055
- height: fontSize,
1056
- fill: textFill,
1057
- anchor: "start",
1058
- baseline: "hanging"
1059
- }
1060
- ) })
1061
- ] });
1062
- }, "IconLabelledRect");
1063
- const Edge = /* @__PURE__ */ __name(({
1064
- label,
1065
- labelPos,
1066
- labelFill = "black",
1067
- labelHeight = 12,
1068
- path,
1069
- stroke,
1070
- strokeWidth,
1071
- strokeDasharray
1072
- }) => {
1073
- return /* @__PURE__ */ u$1(k$1, { children: [
1074
- /* @__PURE__ */ u$1("path", { d: path, stroke, style: { strokeWidth, strokeDasharray } }),
1075
- label && labelPos && labelPos.length === 2 ? /* @__PURE__ */ u$1("g", { transform: `translate(${labelPos[0]} ${labelPos[1]})`, children: /* @__PURE__ */ u$1(Text, { text: label, fill: labelFill, height: labelHeight }) }) : void 0
1076
- ] });
1077
- }, "Edge");
1078
- function render(C2, props, parent, replaceNode) {
1079
- G$1(_$1(C2, props), parent, replaceNode);
1080
- }
1081
- __name(render, "render");
1082
- function svgRender(C2, props, parent, replaceNode) {
1083
- G$1(_$1("svg", null, _$1(C2, props)), parent, replaceNode);
1084
- }
1085
- __name(svgRender, "svgRender");
1086
- const _HTMLAdapter = class _HTMLAdapter extends HTMLWidget {
1087
- constructor(_component) {
1088
- super();
1089
- this._component = _component;
1090
- }
1091
- props(_2) {
1092
- if (!arguments.length) return this._props;
1093
- this._props = { ...this._props, ..._2 };
1094
- return this;
1095
- }
1096
- prop(_2, value) {
1097
- if (arguments.length === 1) return this._props[_2];
1098
- this._props[_2] = value;
1099
- return this;
1100
- }
1101
- update(domNode, element) {
1102
- super.update(domNode, element);
1103
- render(this._component, this._props, domNode);
1104
- }
1105
- };
1106
- __name(_HTMLAdapter, "HTMLAdapter");
1107
- let HTMLAdapter = _HTMLAdapter;
1108
- HTMLAdapter.prototype._class += " react_HTMLAdapter";
1109
- HTMLAdapter.prototype.publish("props", {}, "object", "Properties");
1110
- const _SVGAdapter = class _SVGAdapter extends SVGWidget {
1111
- constructor(_component) {
1112
- super();
1113
- this._component = _component;
1114
- }
1115
- props(_2) {
1116
- if (!arguments.length) return this._props;
1117
- this._props = { ...this._props, ..._2 };
1118
- return this;
1119
- }
1120
- prop(_2, value) {
1121
- if (arguments.length === 1) return this._props[_2];
1122
- this._props[_2] = value;
1123
- return this;
1124
- }
1125
- update(domNode, element) {
1126
- super.update(domNode, element);
1127
- render(this._component, this._props, domNode);
1128
- }
1129
- };
1130
- __name(_SVGAdapter, "SVGAdapter");
1131
- let SVGAdapter = _SVGAdapter;
1132
- SVGAdapter.prototype._class += " react_SVGAdapter";
1133
- SVGAdapter.prototype.publish("props", {}, "object", "Properties");
1134
- const Span = /* @__PURE__ */ __name(({
1135
- text
1136
- }) => /* @__PURE__ */ u$1("span", { children: text }), "Span");
1137
- const Annotations = /* @__PURE__ */ __name(({
1138
- x: x2,
1139
- y: y2,
1140
- annotationIDs = [],
1141
- stepSize = -16
1142
- }) => {
1143
- const IconComponents = annotationIDs.map(
1144
- (id, i2) => /* @__PURE__ */ u$1(
1145
- "g",
1146
- {
1147
- transform: `translate(${x2 + i2 * stepSize} ${y2})`,
1148
- children: /* @__PURE__ */ u$1(
1149
- "use",
1150
- {
1151
- xlinkHref: "#" + id
1152
- }
1153
- )
1154
- },
1155
- id
1156
- )
1157
- );
1158
- return /* @__PURE__ */ u$1(k$1, { children: IconComponents });
1159
- }, "Annotations");
1160
- const Vertex = /* @__PURE__ */ __name(({
1161
- categoryID = "",
1162
- text = "",
1163
- textHeight = 12,
1164
- textPadding = 4,
1165
- icon = {},
1166
- annotationsHeight = 12,
1167
- annotationIDs = [],
1168
- textFill,
1169
- textboxFill,
1170
- textboxStroke,
1171
- textFontFamily,
1172
- onSizeUpdate,
1173
- showLabel = true,
1174
- scale = 1
1175
- }) => {
1176
- icon = {
1177
- imageChar: "fa-question",
1178
- height: 32,
1179
- fill: "transparent",
1180
- ...icon
1181
- };
1182
- const [textBoxWidth, setTextBoxWidthUpdate] = d(0);
1183
- const [textBoxHeight, setTextBoxHeightUpdate] = d(0);
1184
- y(() => {
1185
- if (onSizeUpdate) {
1186
- onSizeUpdate({ width: 0, height: 0 });
1187
- }
1188
- }, [textBoxWidth, textBoxHeight, onSizeUpdate]);
1189
- let width = textBoxWidth;
1190
- width += 4;
1191
- let offsetY = -(icon.height * 2 / 6 + textHeight + 8) / 2;
1192
- const textboxOffsetY = icon.height / 3 + textBoxHeight / 2 + textPadding;
1193
- let annotationOffsetY = icon.height / 3 + textBoxHeight + textPadding + annotationsHeight / 3;
1194
- if (!showLabel) {
1195
- offsetY += (textHeight + 8) / 2;
1196
- annotationOffsetY -= textBoxHeight + textPadding;
1197
- }
1198
- const onTextBoxSizeUpdate = q$1((size) => {
1199
- setTextBoxWidthUpdate(size.width);
1200
- setTextBoxHeightUpdate(size.height);
1201
- }, []);
1202
- const label = showLabel ? /* @__PURE__ */ u$1("g", { transform: `translate(0 ${textboxOffsetY})`, children: /* @__PURE__ */ u$1(
1203
- TextBox,
1204
- {
1205
- text,
1206
- height: textHeight,
1207
- padding: textPadding,
1208
- onSizeUpdate: onTextBoxSizeUpdate,
1209
- textFill,
1210
- fill: textboxFill,
1211
- stroke: textboxStroke,
1212
- fontFamily: textFontFamily
1213
- }
1214
- ) }) : void 0;
1215
- return categoryID ? /* @__PURE__ */ u$1("g", { transform: `translate(0 ${offsetY}) scale(${scale})`, children: [
1216
- /* @__PURE__ */ u$1("use", { xlinkHref: "#" + categoryID }),
1217
- label,
1218
- /* @__PURE__ */ u$1(Annotations, { x: width / 2, y: annotationOffsetY, annotationIDs })
1219
- ] }) : /* @__PURE__ */ u$1("g", { transform: `translate(0 ${offsetY}) scale(${scale})`, children: [
1220
- /* @__PURE__ */ u$1(Icon, { ...icon }),
1221
- label
1222
- ] });
1223
- }, "Vertex");
1224
- const Vertex2 = /* @__PURE__ */ __name(({
1225
- categoryID = "",
1226
- text = "",
1227
- textHeight = 12,
1228
- textPadding = 4,
1229
- icon = {},
1230
- textFill = "black",
1231
- textboxFill = "white",
1232
- textboxStroke = "black",
1233
- textFontFamily,
1234
- annotationsHeight = 12,
1235
- annotationIDs = []
1236
- }) => {
1237
- icon = {
1238
- imageChar: "fa-question",
1239
- imageCharFill: "white",
1240
- height: 32,
1241
- fill: "black",
1242
- shape: "square",
1243
- ...icon
1244
- };
1245
- const textBoxHeight = textHeight + textPadding * 2;
1246
- const { width } = T$1(() => {
1247
- return Utility.textSize(text, textFontFamily, textHeight, false);
1248
- }, [text, textFontFamily, textHeight]);
1249
- const stepSize = annotationsHeight;
1250
- const textboxStrokeWidth = 1;
1251
- const halfTextboxHeight = textBoxHeight / 2;
1252
- const offsetX = 0;
1253
- const offsetY = -(icon.height * 2 / 6 + textHeight + 8) / 2;
1254
- const iconOffsetX = -icon.height / 2;
1255
- const iconOffsetY = 0;
1256
- const textboxOffsetX = Math.ceil(width / 2 + textPadding);
1257
- const textboxOffsetY = halfTextboxHeight - icon.height / 2;
1258
- const annotationOffsetX = stepSize / 2;
1259
- const annotationOffsetY = halfTextboxHeight;
1260
- return categoryID ? /* @__PURE__ */ u$1(
1261
- "g",
1262
- {
1263
- transform: `translate(${offsetX} ${offsetY})`,
1264
- children: [
1265
- /* @__PURE__ */ u$1(
1266
- "g",
1267
- {
1268
- transform: `translate(${iconOffsetX} ${iconOffsetY})`,
1269
- children: /* @__PURE__ */ u$1(
1270
- "use",
1271
- {
1272
- xlinkHref: "#" + categoryID
1273
- }
1274
- )
1275
- }
1276
- ),
1277
- /* @__PURE__ */ u$1(
1278
- "g",
1279
- {
1280
- transform: `translate(${textboxOffsetX} ${textboxOffsetY})`,
1281
- children: /* @__PURE__ */ u$1(
1282
- TextBox,
1283
- {
1284
- text,
1285
- height: textHeight,
1286
- padding: textPadding,
1287
- strokeWidth: textboxStrokeWidth,
1288
- stroke: textboxStroke,
1289
- fill: textboxFill,
1290
- textFill,
1291
- fontFamily: textFontFamily
1292
- }
1293
- )
1294
- }
1295
- ),
1296
- /* @__PURE__ */ u$1(
1297
- Annotations,
1298
- {
1299
- x: annotationOffsetX,
1300
- y: annotationOffsetY,
1301
- annotationIDs,
1302
- stepSize
1303
- }
1304
- )
1305
- ]
1306
- }
1307
- ) : /* @__PURE__ */ u$1(k$1, { children: [
1308
- /* @__PURE__ */ u$1(
1309
- "g",
1310
- {
1311
- transform: `translate(${iconOffsetX} ${iconOffsetY})scale(1.0002)`,
1312
- children: /* @__PURE__ */ u$1(
1313
- Icon,
1314
- {
1315
- ...icon,
1316
- shape: "square"
1317
- }
1318
- )
1319
- }
1320
- ),
1321
- /* @__PURE__ */ u$1(
1322
- "g",
1323
- {
1324
- transform: `translate(${textboxOffsetX} ${textboxOffsetY})scale(1.0002)`,
1325
- children: /* @__PURE__ */ u$1(
1326
- TextBox,
1327
- {
1328
- text,
1329
- height: textHeight,
1330
- padding: textPadding,
1331
- stroke: textboxStroke,
1332
- fill: textboxFill
1333
- }
1334
- )
1335
- }
1336
- )
1337
- ] });
1338
- }, "Vertex2");
1339
- const Vertex3 = /* @__PURE__ */ __name(({
1340
- text = "",
1341
- textHeight = 10,
1342
- textPadding = 4,
1343
- textFill = "#287EC4",
1344
- textboxFill = "white",
1345
- textboxStroke = "#CCCCCC",
1346
- textboxStrokeWidth = 1,
1347
- textFontFamily = "Verdana",
1348
- annotationGutter = 2,
1349
- annotations = [],
1350
- cornerRadius = 3,
1351
- icon = {},
1352
- subText = { text: "" },
1353
- showLabel = true,
1354
- noLabelRadius = 5,
1355
- expansionIcon,
1356
- scale = 1
1357
- }) => {
1358
- icon = {
1359
- height: 50,
1360
- imageChar: "?",
1361
- imageFontFamily: "FontAwesome",
1362
- imageCharFill: "#555555",
1363
- fill: "transparent",
1364
- strokeWidth: 0,
1365
- ...icon
1366
- };
1367
- subText = {
1368
- text: "",
1369
- fill: "white",
1370
- textFill: "#555555",
1371
- ...subText
1372
- };
1373
- expansionIcon = expansionIcon ? {
1374
- height: 16,
1375
- shape: "circle",
1376
- padding: 6,
1377
- imageChar: "?",
1378
- imageFontFamily: "FontAwesome",
1379
- imageCharFill: "black",
1380
- fill: "whitesmoke",
1381
- stroke: "whitesmoke",
1382
- strokeWidth: 0,
1383
- ...expansionIcon
1384
- } : void 0;
1385
- let fullAnnotationWidth = 0;
1386
- const annoOffsetY = 0;
1387
- const labelWidth = T$1(() => {
1388
- return Utility.textSize(text, textFontFamily, textHeight, false).width;
1389
- }, [text, textFontFamily, textHeight]);
1390
- let labelShapeWidth = 0;
1391
- if (text !== "") {
1392
- labelShapeWidth = labelWidth + textPadding * 2 + textboxStrokeWidth * 2;
1393
- }
1394
- fullAnnotationWidth += labelShapeWidth + annotationGutter;
1395
- const textOffsetX = fullAnnotationWidth - labelShapeWidth / 2;
1396
- const textShapeHeight = textHeight + textPadding * 2 + textboxStrokeWidth * 2;
1397
- const annotationArr = [];
1398
- annotations.forEach((anno, idx) => {
1399
- const annoText = anno.imageChar;
1400
- const annoShapeWidth = textShapeHeight;
1401
- fullAnnotationWidth += annoShapeWidth + annotationGutter;
1402
- const annoOffsetX = fullAnnotationWidth - annoShapeWidth / 2;
1403
- annotationArr.push(
1404
- /* @__PURE__ */ u$1("g", { className: "vertex3-anno", "data-click": "annotation", "data-click-data": JSON.stringify(anno), transform: `translate(${annoOffsetX} ${annoOffsetY})`, children: /* @__PURE__ */ u$1(
1405
- Icon,
1406
- {
1407
- ...anno,
1408
- shape: "square",
1409
- height: textShapeHeight,
1410
- imageChar: annoText,
1411
- imageFontFamily: anno.imageFontFamily,
1412
- cornerRadius,
1413
- strokeWidth: 0
1414
- }
1415
- ) }, idx)
1416
- );
1417
- });
1418
- if (annotations.length > 0) {
1419
- fullAnnotationWidth += annotationGutter * (annotations.length - 1);
1420
- }
1421
- const textElement = /* @__PURE__ */ u$1("g", { "data-click": "text", transform: `translate(${textOffsetX} ${annoOffsetY})`, children: !showLabel || text === "" ? /* @__PURE__ */ u$1("circle", { r: noLabelRadius, stroke: textboxStroke, fill: textFill }) : /* @__PURE__ */ u$1(
1422
- TextBox,
1423
- {
1424
- text,
1425
- height: textHeight,
1426
- padding: textPadding,
1427
- strokeWidth: textboxStrokeWidth,
1428
- stroke: textboxStroke,
1429
- fill: textboxFill,
1430
- textFill,
1431
- fontFamily: textFontFamily,
1432
- cornerRadius
1433
- }
1434
- ) });
1435
- const iconHeight = icon.height || 20;
1436
- const iconStrokeWidth = icon.strokeWidth || 0;
1437
- const iconOffsetX = 0;
1438
- let iconOffsetY = 0;
1439
- const subTextOffsetX = 0;
1440
- let subTextOffsetY = textShapeHeight + annotationGutter * 2;
1441
- if (text !== "" || annotationArr.length > 0) {
1442
- iconOffsetY = -(iconHeight / 2) - iconStrokeWidth - textShapeHeight / 2 - annotationGutter * 2;
1443
- } else if (subText.text !== "") {
1444
- subTextOffsetY = iconHeight / 2 + iconStrokeWidth + annotationGutter * 2;
1445
- }
1446
- const subtextElement = subText.text === "" ? null : /* @__PURE__ */ u$1(
1447
- "g",
1448
- {
1449
- "data-click": "subtext",
1450
- transform: `translate(${subTextOffsetX} ${subTextOffsetY})`,
1451
- children: /* @__PURE__ */ u$1(
1452
- TextBox,
1453
- {
1454
- fill: subText.fill || "#FFFFFF",
1455
- textFill: subText.textFill || textFill,
1456
- ...subText,
1457
- height: textHeight,
1458
- padding: textPadding,
1459
- strokeWidth: 0,
1460
- stroke: textboxStroke,
1461
- fontFamily: textFontFamily,
1462
- cornerRadius
1463
- }
1464
- )
1465
- }
1466
- );
1467
- return /* @__PURE__ */ u$1("g", { transform: `scale(${scale})`, children: [
1468
- /* @__PURE__ */ u$1("g", { "data-click": "icon", transform: `translate(${iconOffsetX} ${iconOffsetY})`, children: [
1469
- /* @__PURE__ */ u$1(Icon, { ...icon }),
1470
- expansionIcon && /* @__PURE__ */ u$1("g", { "data-click": "expanded-icon", "data-click-data": JSON.stringify(expansionIcon), transform: `translate(${(icon.height + iconStrokeWidth) / 2 - expansionIcon.height / 2} ${-(icon.height + iconStrokeWidth) / 2 + expansionIcon.height / 2})`, children: /* @__PURE__ */ u$1(Icon, { ...expansionIcon }) })
1471
- ] }),
1472
- /* @__PURE__ */ u$1("g", { transform: `translate(${-fullAnnotationWidth / 2} ${annoOffsetY})`, children: [
1473
- textElement,
1474
- annotationArr
1475
- ] }),
1476
- subtextElement
1477
- ] });
1478
- }, "Vertex3");
1479
- const CentroidVertex3 = /* @__PURE__ */ __name(function({
1480
- id,
1481
- categoryID = "",
1482
- text = "",
1483
- textHeight = 12,
1484
- textPadding = 10,
1485
- textFill = "#287EC4",
1486
- textboxFill = "white",
1487
- textboxStroke = "#CCCCCC",
1488
- textboxStrokeWidth = 1,
1489
- textFontFamily = "Verdana",
1490
- annotationGutter = 2,
1491
- annotations = [],
1492
- cornerRadius,
1493
- icon = {},
1494
- subText = {},
1495
- expansionIcon,
1496
- scale = 1
1497
- }) {
1498
- icon = {
1499
- height: 91,
1500
- padding: 40,
1501
- imageCharFill: "#555555",
1502
- imageFontFamily: "FontAwesome",
1503
- fill: "#FFCC33",
1504
- stroke: "#DFDFDF",
1505
- imageChar: "?",
1506
- strokeWidth: 4,
1507
- yOffset: -15,
1508
- ...icon
1509
- };
1510
- subText = {
1511
- text: "",
1512
- fill: "transparent",
1513
- textFill: "#555555",
1514
- ...subText
1515
- };
1516
- const props = {
1517
- id,
1518
- categoryID,
1519
- text,
1520
- textHeight,
1521
- textPadding,
1522
- textFill,
1523
- textboxFill,
1524
- textboxStroke,
1525
- textboxStrokeWidth,
1526
- textFontFamily,
1527
- annotationGutter,
1528
- annotations,
1529
- cornerRadius,
1530
- icon,
1531
- subText,
1532
- expansionIcon,
1533
- scale
1534
- };
1535
- return /* @__PURE__ */ u$1(
1536
- Vertex3,
1537
- {
1538
- ...props,
1539
- icon,
1540
- subText
1541
- }
1542
- );
1543
- }, "CentroidVertex3");
1544
- const Vertex4 = /* @__PURE__ */ __name(({
1545
- categoryID = "",
1546
- text = "",
1547
- textHeight = 10,
1548
- textPadding = 4,
1549
- textFill = "#287EC4",
1550
- textboxFill = "white",
1551
- textboxStroke = "#CCCCCC",
1552
- textboxStrokeWidth = 1,
1553
- textFontFamily = "Verdana",
1554
- annotationGutter = 2,
1555
- annotations = [],
1556
- iconAnnotations = [],
1557
- cornerRadius = 3,
1558
- icon = {},
1559
- subText = {},
1560
- showLabel = true,
1561
- noLabelRadius = 5,
1562
- iconBorderWidth = 1,
1563
- iconBorderColor = "#333",
1564
- iconBackgroundColor = "#fff",
1565
- iconFontColor = "#000",
1566
- iconFontSize = 20,
1567
- iconFontFamily = "FontAwesome",
1568
- shapeOffsetX = 0,
1569
- shapeOffsetY = 0,
1570
- iconOffsetX = 0,
1571
- iconOffsetY = 0,
1572
- iconPadding = 4,
1573
- iconText = "?",
1574
- shapeRendering = "auto"
1575
- }) => {
1576
- icon = {
1577
- height: 50,
1578
- imageChar: "?",
1579
- imageFontFamily: "FontAwesome",
1580
- imageCharFill: "#555555",
1581
- fill: "transparent",
1582
- strokeWidth: 0,
1583
- ...icon
1584
- };
1585
- subText = {
1586
- text: "",
1587
- fill: "white",
1588
- textFill: "#555555",
1589
- ...subText
1590
- };
1591
- const annoOffsetY = 0;
1592
- const labelWidth = T$1(() => {
1593
- return Utility.textSize(text, textFontFamily, textHeight, false).width;
1594
- }, [text, textFontFamily, textHeight]);
1595
- let labelShapeWidth = 0;
1596
- if (text !== "") {
1597
- labelShapeWidth = labelWidth + textPadding * 2 + textboxStrokeWidth * 2;
1598
- }
1599
- let fullAnnotationWidth = labelShapeWidth + annotationGutter;
1600
- const textOffsetX = fullAnnotationWidth - labelShapeWidth / 2;
1601
- const textShapeHeight = textHeight + annotationGutter * 2 + textboxStrokeWidth * 2;
1602
- const annoWidthArr = annotations.map((anno) => {
1603
- return Utility.textSize(anno.imageChar, anno.imageFontFamily, anno.height, false).width;
1604
- });
1605
- const annotationArr = [];
1606
- let _labelAnnoOffsetX = fullAnnotationWidth;
1607
- annotations.forEach((anno, i2) => {
1608
- const annoText = anno.imageChar;
1609
- const annoTextHeight = anno.height ?? textShapeHeight;
1610
- _labelAnnoOffsetX += annoWidthArr[i2] + annotationGutter;
1611
- const annoOffsetX = _labelAnnoOffsetX - annoWidthArr[i2] / 2;
1612
- annotationArr.push(
1613
- /* @__PURE__ */ u$1("g", { className: "vertex3-anno", "data-click": "annotation", "data-click-data": JSON.stringify(anno), transform: `translate(${annoOffsetX} ${annoOffsetY})`, children: /* @__PURE__ */ u$1(
1614
- Icon,
1615
- {
1616
- ...anno,
1617
- shape: "rectangle",
1618
- width: annoWidthArr[i2],
1619
- height: annoTextHeight,
1620
- imageChar: annoText,
1621
- imageFontFamily: anno.imageFontFamily,
1622
- cornerRadius,
1623
- strokeWidth: 0
1624
- }
1625
- ) }, i2)
1626
- );
1627
- });
1628
- if (annotations.length > 0) {
1629
- fullAnnotationWidth += annotationGutter * (annotations.length - 1);
1630
- }
1631
- const iconAnnotationArr = [];
1632
- iconAnnotations.forEach((anno, i2) => {
1633
- const x2 = anno.shapeOffsetX;
1634
- const y2 = anno.shapeOffsetY;
1635
- iconAnnotationArr.push(
1636
- /* @__PURE__ */ u$1("g", { className: "vertex3-iconAnno", "data-click": "icon-annotation", "data-click-data": JSON.stringify(anno), transform: `translate(${x2} ${y2})`, children: /* @__PURE__ */ u$1(
1637
- Icon,
1638
- {
1639
- ...anno,
1640
- shape: anno.shape ?? "square",
1641
- imageChar: anno.imageChar,
1642
- imageFontFamily: anno.imageFontFamily,
1643
- cornerRadius,
1644
- stroke: anno.stroke,
1645
- strokeWidth: anno.strokeWidth
1646
- }
1647
- ) }, i2)
1648
- );
1649
- });
1650
- const textElement = /* @__PURE__ */ u$1("g", { "data-click": "text", transform: `translate(${textOffsetX} ${annoOffsetY})`, children: !showLabel || text === "" ? /* @__PURE__ */ u$1("circle", { r: noLabelRadius, stroke: textboxStroke, fill: textFill }) : /* @__PURE__ */ u$1(
1651
- TextBox,
1652
- {
1653
- text,
1654
- height: textHeight,
1655
- padding: textPadding,
1656
- strokeWidth: textboxStrokeWidth,
1657
- stroke: textboxStroke,
1658
- fill: textboxFill,
1659
- textFill,
1660
- fontFamily: textFontFamily,
1661
- cornerRadius
1662
- }
1663
- ) });
1664
- const subTextOffsetX = 0;
1665
- const subTextOffsetY = textShapeHeight + annotationGutter * 2;
1666
- const subtextElement = subText.text === "" ? null : /* @__PURE__ */ u$1(
1667
- "g",
1668
- {
1669
- "data-click": "subtext",
1670
- transform: `translate(${subTextOffsetX} ${subTextOffsetY})`,
1671
- children: /* @__PURE__ */ u$1(
1672
- TextBox,
1673
- {
1674
- fill: subText.fill || "#FFFFFF",
1675
- textFill: subText.textFill || textFill,
1676
- ...subText,
1677
- height: textHeight,
1678
- padding: textPadding,
1679
- strokeWidth: 0,
1680
- stroke: textboxStroke,
1681
- fontFamily: textFontFamily,
1682
- cornerRadius
1683
- }
1684
- )
1685
- }
1686
- );
1687
- return /* @__PURE__ */ u$1("g", { children: [
1688
- /* @__PURE__ */ u$1(
1689
- "g",
1690
- {
1691
- "data-click": "icon",
1692
- transform: `translate(${shapeOffsetX} ${shapeOffsetY})`,
1693
- children: [
1694
- /* @__PURE__ */ u$1(
1695
- Icon,
1696
- {
1697
- ...icon,
1698
- strokeWidth: iconBorderWidth,
1699
- shape: "circle",
1700
- height: iconFontSize,
1701
- fill: iconBackgroundColor,
1702
- stroke: iconBorderColor,
1703
- imageFontFamily: iconFontFamily,
1704
- imageChar: iconText,
1705
- imageCharFill: iconFontColor,
1706
- padding: iconPadding,
1707
- xOffset: iconOffsetX,
1708
- yOffset: iconOffsetY,
1709
- cornerRadius,
1710
- shapeRendering
1711
- }
1712
- ),
1713
- iconAnnotationArr
1714
- ]
1715
- }
1716
- ),
1717
- /* @__PURE__ */ u$1(
1718
- "g",
1719
- {
1720
- transform: `translate(${-fullAnnotationWidth / 2} ${annoOffsetY})`,
1721
- children: [
1722
- textElement,
1723
- annotationArr
1724
- ]
1725
- }
1726
- ),
1727
- subtextElement
1728
- ] });
1729
- }, "Vertex4");
1730
- const CentroidVertex4 = /* @__PURE__ */ __name(function({
1731
- id,
1732
- categoryID = "",
1733
- text = "",
1734
- textHeight = 12,
1735
- textPadding = 10,
1736
- textFill = "#287EC4",
1737
- textboxFill = "white",
1738
- textboxStroke = "#CCCCCC",
1739
- textboxStrokeWidth = 1,
1740
- textFontFamily = "Verdana",
1741
- annotationGutter = 2,
1742
- annotations = [],
1743
- iconAnnotations = [],
1744
- cornerRadius,
1745
- icon = {},
1746
- subText = {},
1747
- showLabel = true,
1748
- noLabelRadius = 5,
1749
- iconBorderWidth = 1,
1750
- iconBorderColor = "#333",
1751
- iconBackgroundColor = "#fff",
1752
- iconFontColor = "#000",
1753
- iconFontSize = 20,
1754
- iconFontFamily = "FontAwesome",
1755
- shapeOffsetX = 0,
1756
- shapeOffsetY = 0,
1757
- iconOffsetX = 0,
1758
- iconOffsetY = 0,
1759
- iconPadding = 4,
1760
- iconText = "?",
1761
- shapeRendering = "auto"
1762
- }) {
1763
- icon = {
1764
- height: 91,
1765
- padding: 40,
1766
- imageCharFill: "#555555",
1767
- imageFontFamily: "FontAwesome",
1768
- fill: "#FFCC33",
1769
- stroke: "#DFDFDF",
1770
- imageChar: "?",
1771
- strokeWidth: 4,
1772
- yOffset: -15,
1773
- ...icon
1774
- };
1775
- subText = {
1776
- text: "",
1777
- fill: "transparent",
1778
- textFill: "#555555",
1779
- ...subText
1780
- };
1781
- const props = {
1782
- id,
1783
- categoryID,
1784
- text,
1785
- textHeight,
1786
- textPadding,
1787
- textFill,
1788
- textboxFill,
1789
- textboxStroke,
1790
- textboxStrokeWidth,
1791
- textFontFamily,
1792
- annotationGutter,
1793
- annotations,
1794
- iconAnnotations,
1795
- cornerRadius,
1796
- icon,
1797
- subText,
1798
- showLabel,
1799
- noLabelRadius,
1800
- iconBorderWidth,
1801
- iconBorderColor,
1802
- iconBackgroundColor,
1803
- iconFontColor,
1804
- iconFontSize,
1805
- iconFontFamily,
1806
- shapeOffsetX,
1807
- shapeOffsetY,
1808
- iconOffsetX,
1809
- iconOffsetY,
1810
- iconPadding,
1811
- iconText,
1812
- shapeRendering
1813
- };
1814
- return /* @__PURE__ */ u$1(
1815
- Vertex4,
1816
- {
1817
- ...props,
1818
- icon,
1819
- subText
1820
- }
1821
- );
1822
- }, "CentroidVertex4");
1823
- const Subgraph = /* @__PURE__ */ __name(({
1824
- text,
1825
- width = 100,
1826
- height = 100,
1827
- fill = "transparent",
1828
- stroke = "black",
1829
- fontHeight = 12,
1830
- fontFamily
1831
- }) => {
1832
- const tSize = Utility.textSize(text, fontFamily, fontHeight, false);
1833
- return /* @__PURE__ */ u$1(k$1, { children: [
1834
- /* @__PURE__ */ u$1(
1835
- Rectangle,
1836
- {
1837
- width,
1838
- height,
1839
- fill,
1840
- stroke
1841
- }
1842
- ),
1843
- /* @__PURE__ */ u$1(
1844
- "g",
1845
- {
1846
- transform: `translate(${(-width + tSize.width) / 2 + 4} ${(-height + tSize.height) / 2 + 4})`,
1847
- children: /* @__PURE__ */ u$1(
1848
- Text,
1849
- {
1850
- height: fontHeight,
1851
- text,
1852
- fontFamily
1853
- }
1854
- )
1855
- }
1856
- )
1857
- ] });
1858
- }, "Subgraph");
1859
- export {
1860
- Annotations,
1861
- BUILD_VERSION,
1862
- CentroidVertex3,
1863
- CentroidVertex4,
1864
- Circle,
1865
- Edge,
1866
- HTMLAdapter,
1867
- Icon,
1868
- IconLabelledRect,
1869
- Icons,
1870
- Image,
1871
- ImageChar,
1872
- LabelledRect,
1873
- PKG_NAME,
1874
- PKG_VERSION,
1875
- preactShim as React,
1876
- Rectangle,
1877
- SVGAdapter,
1878
- Shape,
1879
- Span,
1880
- Square,
1881
- Subgraph,
1882
- Text,
1883
- TextBox,
1884
- TextLine,
1885
- Vertex,
1886
- Vertex2,
1887
- Vertex3,
1888
- Vertex4,
1889
- render,
1890
- svgRender
1891
- };
1
+ var t=Object.defineProperty,e=(e,n)=>t(e,"name",{value:n,configurable:!0});import{Utility as n,Palette as i,HTMLWidget as o,SVGWidget as r}from"@hpcc-js/common";const l="@hpcc-js/react",_="3.4.2",a="3.16.0";var s,c,u,h,f,d,p,g,m,x,y,v={},k=[],F=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,b=Array.isArray;function C(t,e){for(var n in e)t[n]=e[n];return t}function w(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function S(t,e,n){var i,o,r,l={};for(r in e)"key"==r?i=e[r]:"ref"==r?o=e[r]:l[r]=e[r];if(arguments.length>2&&(l.children=arguments.length>3?s.call(arguments,2):n),"function"==typeof t&&null!=t.defaultProps)for(r in t.defaultProps)void 0===l[r]&&(l[r]=t.defaultProps[r]);return $(t,l,i,o,null)}function $(t,e,n,i,o){var r={type:t,props:e,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:null==o?++u:o,__i:-1,__u:0};return null==o&&null!=c.vnode&&c.vnode(r),r}function R(t){return t.children}function W(t,e){this.props=t,this.context=e}function P(t,e){if(null==e)return t.__?P(t.__,t.__i+1):null;for(var n;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e)return n.__e;return"function"==typeof t.type?P(t):null}function H(t){var e,n;if(null!=(t=t.__)&&null!=t.__c){for(t.__e=t.__c.base=null,e=0;e<t.__k.length;e++)if(null!=(n=t.__k[e])&&null!=n.__e){t.__e=t.__c.base=n.__e;break}return H(t)}}function O(t){(!t.__d&&(t.__d=!0)&&h.push(t)&&!A.__r++||f!=c.debounceRendering)&&((f=c.debounceRendering)||d)(A)}function A(){for(var t,e,n,i,o,r,l,_=1;h.length;)h.length>_&&h.sort(p),t=h.shift(),_=h.length,t.__d&&(n=void 0,i=void 0,o=(i=(e=t).__v).__e,r=[],l=[],e.__P&&((n=C({},i)).__v=i.__v+1,c.vnode&&c.vnode(n),V(e.__P,n,i,e.__n,e.__P.namespaceURI,32&i.__u?[o]:null,r,null==o?P(i):o,!!(32&i.__u),l),n.__v=i.__v,n.__.__k[n.__i]=n,B(r,n,l),i.__e=i.__=null,n.__e!=o&&H(n)));A.__r=0}function E(t,e,n,i,o,r,l,_,a,s,c){var u,h,f,d,p,g,m,x=i&&i.__k||k,y=e.length;for(a=N(n,e,x,a,y),u=0;u<y;u++)null!=(f=n.__k[u])&&(h=-1==f.__i?v:x[f.__i]||v,f.__i=u,g=V(t,f,h,o,r,l,_,a,s,c),d=f.__e,f.ref&&h.ref!=f.ref&&(h.ref&&G(h.ref,null,f),c.push(f.ref,f.__c||d,f)),null==p&&null!=d&&(p=d),(m=!!(4&f.__u))||h.__k===f.__k?a=T(f,a,t,m):"function"==typeof f.type&&void 0!==g?a=g:d&&(a=d.nextSibling),f.__u&=-7);return n.__e=p,a}function N(t,e,n,i,o){var r,l,_,a,s,c=n.length,u=c,h=0;for(t.__k=new Array(o),r=0;r<o;r++)null!=(l=e[r])&&"boolean"!=typeof l&&"function"!=typeof l?(a=r+h,(l=t.__k[r]="string"==typeof l||"number"==typeof l||"bigint"==typeof l||l.constructor==String?$(null,l,null,null,null):b(l)?$(R,{children:l},null,null,null):null==l.constructor&&l.__b>0?$(l.type,l.props,l.key,l.ref?l.ref:null,l.__v):l).__=t,l.__b=t.__b+1,_=null,-1!=(s=l.__i=U(l,n,a,u))&&(u--,(_=n[s])&&(_.__u|=2)),null==_||null==_.__v?(-1==s&&(o>c?h--:o<c&&h++),"function"!=typeof l.type&&(l.__u|=4)):s!=a&&(s==a-1?h--:s==a+1?h++:(s>a?h--:h++,l.__u|=4))):t.__k[r]=null;if(u)for(r=0;r<c;r++)null!=(_=n[r])&&!(2&_.__u)&&(_.__e==i&&(i=P(_)),X(_,_));return i}function T(t,e,n,i){var o,r;if("function"==typeof t.type){for(o=t.__k,r=0;o&&r<o.length;r++)o[r]&&(o[r].__=t,e=T(o[r],e,n,i));return e}t.__e!=e&&(i&&(e&&t.type&&!e.parentNode&&(e=P(t)),n.insertBefore(t.__e,e||null)),e=t.__e);do{e=e&&e.nextSibling}while(null!=e&&8==e.nodeType);return e}function D(t,e){return e=e||[],null==t||"boolean"==typeof t||(b(t)?t.some(function(t){D(t,e)}):e.push(t)),e}function U(t,e,n,i){var o,r,l,_=t.key,a=t.type,s=e[n],c=null!=s&&!(2&s.__u);if(null===s&&null==t.key||c&&_==s.key&&a==s.type)return n;if(i>(c?1:0))for(o=n-1,r=n+1;o>=0||r<e.length;)if(null!=(s=e[l=o>=0?o--:r++])&&!(2&s.__u)&&_==s.key&&a==s.type)return l;return-1}function L(t,e,n){"-"==e[0]?t.setProperty(e,null==n?"":n):t[e]=null==n?"":"number"!=typeof n||F.test(e)?n:n+"px"}function z(t,e,n,i,o){var r,l;t:if("style"==e)if("string"==typeof n)t.style.cssText=n;else{if("string"==typeof i&&(t.style.cssText=i=""),i)for(e in i)n&&e in n||L(t.style,e,"");if(n)for(e in n)i&&n[e]==i[e]||L(t.style,e,n[e])}else if("o"==e[0]&&"n"==e[1])r=e!=(e=e.replace(g,"$1")),l=e.toLowerCase(),e=l in t||"onFocusOut"==e||"onFocusIn"==e?l.slice(2):e.slice(2),t.l||(t.l={}),t.l[e+r]=n,n?i?n.u=i.u:(n.u=m,t.addEventListener(e,r?y:x,r)):t.removeEventListener(e,r?y:x,r);else{if("http://www.w3.org/2000/svg"==o)e=e.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=e&&"height"!=e&&"href"!=e&&"list"!=e&&"form"!=e&&"tabIndex"!=e&&"download"!=e&&"rowSpan"!=e&&"colSpan"!=e&&"role"!=e&&"popover"!=e&&e in t)try{t[e]=null==n?"":n;break t}catch(_){}"function"==typeof n||(null==n||!1===n&&"-"!=e[4]?t.removeAttribute(e):t.setAttribute(e,"popover"==e&&1==n?"":n))}}function I(t){return function(e){if(this.l){var n=this.l[e.type+t];if(null==e.t)e.t=m++;else if(e.t<n.u)return;return n(c.event?c.event(e):e)}}}function V(t,e,n,i,o,r,l,_,a,s){var u,h,f,d,p,g,m,x,y,v,k,F,S,$,P,H,O,A=e.type;if(null!=e.constructor)return null;128&n.__u&&(a=!!(32&n.__u),r=[_=e.__e=n.__e]),(u=c.__b)&&u(e);t:if("function"==typeof A)try{if(x=e.props,y="prototype"in A&&A.prototype.render,v=(u=A.contextType)&&i[u.__c],k=u?v?v.props.value:u.__:i,n.__c?m=(h=e.__c=n.__c).__=h.__E:(y?e.__c=h=new A(x,k):(e.__c=h=new W(x,k),h.constructor=A,h.render=Y),v&&v.sub(h),h.props=x,h.state||(h.state={}),h.context=k,h.__n=i,f=h.__d=!0,h.__h=[],h._sb=[]),y&&null==h.__s&&(h.__s=h.state),y&&null!=A.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=C({},h.__s)),C(h.__s,A.getDerivedStateFromProps(x,h.__s))),d=h.props,p=h.state,h.__v=e,f)y&&null==A.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),y&&null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else{if(y&&null==A.getDerivedStateFromProps&&x!==d&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(x,k),!h.__e&&null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(x,h.__s,k)||e.__v==n.__v){for(e.__v!=n.__v&&(h.props=x,h.state=h.__s,h.__d=!1),e.__e=n.__e,e.__k=n.__k,e.__k.some(function(t){t&&(t.__=e)}),F=0;F<h._sb.length;F++)h.__h.push(h._sb[F]);h._sb=[],h.__h.length&&l.push(h);break t}null!=h.componentWillUpdate&&h.componentWillUpdate(x,h.__s,k),y&&null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(d,p,g)})}if(h.context=k,h.props=x,h.__P=t,h.__e=!1,S=c.__r,$=0,y){for(h.state=h.__s,h.__d=!1,S&&S(e),u=h.render(h.props,h.state,h.context),P=0;P<h._sb.length;P++)h.__h.push(h._sb[P]);h._sb=[]}else do{h.__d=!1,S&&S(e),u=h.render(h.props,h.state,h.context),h.state=h.__s}while(h.__d&&++$<25);h.state=h.__s,null!=h.getChildContext&&(i=C(C({},i),h.getChildContext())),y&&!f&&null!=h.getSnapshotBeforeUpdate&&(g=h.getSnapshotBeforeUpdate(d,p)),H=u,null!=u&&u.type===R&&null==u.key&&(H=j(u.props.children)),_=E(t,b(H)?H:[H],e,n,i,o,r,l,_,a,s),h.base=e.__e,e.__u&=-161,h.__h.length&&l.push(h),m&&(h.__E=h.__=null)}catch(N){if(e.__v=null,a||null!=r)if(N.then){for(e.__u|=a?160:128;_&&8==_.nodeType&&_.nextSibling;)_=_.nextSibling;r[r.indexOf(_)]=null,e.__e=_}else{for(O=r.length;O--;)w(r[O]);M(e)}else e.__e=n.__e,e.__k=n.__k,N.then||M(e);c.__e(N,e,n)}else null==r&&e.__v==n.__v?(e.__k=n.__k,e.__e=n.__e):_=e.__e=q(n.__e,e,n,i,o,r,l,a,s);return(u=c.diffed)&&u(e),128&e.__u?void 0:_}function M(t){t&&t.__c&&(t.__c.__e=!0),t&&t.__k&&t.__k.forEach(M)}function B(t,e,n){for(var i=0;i<n.length;i++)G(n[i],n[++i],n[++i]);c.__c&&c.__c(e,t),t.some(function(e){try{t=e.__h,e.__h=[],t.some(function(t){t.call(e)})}catch(n){c.__e(n,e.__v)}})}function j(t){return"object"!=typeof t||null==t||t.__b&&t.__b>0?t:b(t)?t.map(j):C({},t)}function q(t,e,n,i,o,r,l,_,a){var u,h,f,d,p,g,m,x=n.props,y=e.props,k=e.type;if("svg"==k?o="http://www.w3.org/2000/svg":"math"==k?o="http://www.w3.org/1998/Math/MathML":o||(o="http://www.w3.org/1999/xhtml"),null!=r)for(u=0;u<r.length;u++)if((p=r[u])&&"setAttribute"in p==!!k&&(k?p.localName==k:3==p.nodeType)){t=p,r[u]=null;break}if(null==t){if(null==k)return document.createTextNode(y);t=document.createElementNS(o,k,y.is&&y),_&&(c.__m&&c.__m(e,r),_=!1),r=null}if(null==k)x===y||_&&t.data==y||(t.data=y);else{if(r=r&&s.call(t.childNodes),x=n.props||v,!_&&null!=r)for(x={},u=0;u<t.attributes.length;u++)x[(p=t.attributes[u]).name]=p.value;for(u in x)if(p=x[u],"children"==u);else if("dangerouslySetInnerHTML"==u)f=p;else if(!(u in y)){if("value"==u&&"defaultValue"in y||"checked"==u&&"defaultChecked"in y)continue;z(t,u,null,p,o)}for(u in y)p=y[u],"children"==u?d=p:"dangerouslySetInnerHTML"==u?h=p:"value"==u?g=p:"checked"==u?m=p:_&&"function"!=typeof p||x[u]===p||z(t,u,p,x[u],o);if(h)_||f&&(h.__html==f.__html||h.__html==t.innerHTML)||(t.innerHTML=h.__html),e.__k=[];else if(f&&(t.innerHTML=""),E("template"==e.type?t.content:t,b(d)?d:[d],e,n,i,"foreignObject"==k?"http://www.w3.org/1999/xhtml":o,r,l,r?r[0]:n.__k&&P(n,0),_,a),null!=r)for(u=r.length;u--;)w(r[u]);_||(u="value","progress"==k&&null==g?t.removeAttribute("value"):null!=g&&(g!==t[u]||"progress"==k&&!g||"option"==k&&g!=x[u])&&z(t,u,g,x[u],o),u="checked",null!=m&&m!=t[u]&&z(t,u,m,x[u],o))}return t}function G(t,e,n){try{if("function"==typeof t){var i="function"==typeof t.__u;i&&t.__u(),i&&null==e||(t.__u=t(e))}else t.current=e}catch(o){c.__e(o,n)}}function X(t,e,n){var i,o;if(c.unmount&&c.unmount(t),(i=t.ref)&&(i.current&&i.current!=t.__e||G(i,null,e)),null!=(i=t.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount()}catch(r){c.__e(r,e)}i.base=i.__P=null}if(i=t.__k)for(o=0;o<i.length;o++)i[o]&&X(i[o],e,n||"function"!=typeof t.type);n||w(t.__e),t.__c=t.__=t.__e=void 0}function Y(t,e,n){return this.constructor(t,n)}function J(t,e,n){var i,o,r,l;e==document&&(e=document.documentElement),c.__&&c.__(t,e),o=(i="function"==typeof n)?null:n&&n.__k||e.__k,r=[],l=[],V(e,t=(!i&&n||e).__k=S(R,null,[t]),o||v,v,e.namespaceURI,!i&&n?[n]:o?null:e.firstChild?s.call(e.childNodes):null,r,!i&&n?n:o?o.__e:e.firstChild,i,l),B(r,t,l)}e(C,"d$1"),e(w,"g$1"),e(S,"_$1"),e($,"m$1"),e(R,"k$1"),e(W,"x"),e(P,"S"),e(H,"C$1"),e(O,"M"),e(A,"$"),e(E,"I"),e(N,"P$1"),e(T,"A"),e(D,"H$1"),e(U,"L"),e(L,"T$2"),e(z,"j$2"),e(I,"F$1"),e(V,"O"),e(M,"z$1"),e(B,"N$1"),e(j,"V$1"),e(q,"q$2"),e(G,"B$2"),e(X,"D$1"),e(Y,"E$1"),e(J,"G$1"),s=k.slice,c={__e:/* @__PURE__ */e(function(t,e,n,i){for(var o,r,l;e=e.__;)if((o=e.__c)&&!o.__)try{if((r=o.constructor)&&null!=r.getDerivedStateFromError&&(o.setState(r.getDerivedStateFromError(t)),l=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(t,i||{}),l=o.__d),l)return o.__E=o}catch(_){t=_}throw t},"__e")},u=0,W.prototype.setState=function(t,e){var n;n=null!=this.__s&&this.__s!=this.state?this.__s:this.__s=C({},this.state),"function"==typeof t&&(t=t(C({},n),this.props)),t&&C(n,t),null!=t&&this.__v&&(e&&this._sb.push(e),O(this))},W.prototype.forceUpdate=function(t){this.__v&&(this.__e=!0,t&&this.__h.push(t),O(this))},W.prototype.render=R,h=[],d="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,p=/* @__PURE__ */e(function(t,e){return t.__v.__b-e.__v.__b},"e$1"),A.__r=0,g=/(PointerCapture)$|Capture$/i,m=0,x=I(!1),y=I(!0);var Z=0;function K(t,e,n,i,o,r){e||(e={});var l,_,a=e;if("ref"in a)for(_ in a={},e)"ref"==_?l=e[_]:a[_]=e[_];var s={type:t,props:a,key:n,ref:l,__k:null,__:null,__b:0,__e:null,__c:null,constructor:void 0,__v:--Z,__i:-1,__u:0,__source:o,__self:r};if("function"==typeof t&&(l=t.defaultProps))for(_ in l)void 0===a[_]&&(a[_]=l[_]);return c.vnode&&c.vnode(s),s}e(K,"u$1");var Q,tt,et,nt,it=0,ot=[],rt=c,lt=rt.__b,_t=rt.__r,at=rt.diffed,st=rt.__c,ct=rt.unmount,ut=rt.__;function ht(t,e){rt.__h&&rt.__h(tt,t,it||e),it=0;var n=tt.__H||(tt.__H={__:[],__h:[]});return t>=n.__.length&&n.__.push({}),n.__[t]}function ft(t){return it=1,dt(wt,t)}function dt(t,n,i){var o=ht(Q++,2);if(o.t=t,!o.__c&&(o.__=[i?i(n):wt(void 0,n),function(t){var e=o.__N?o.__N[0]:o.__[0],n=o.t(e,t);e!==n&&(o.__N=[n,o.__[1]],o.__c.setState({}))}],o.__c=tt,!tt.__f)){var r=/* @__PURE__ */e(function(t,e,n){if(!o.__c.__H)return!0;var i=o.__c.__H.__.filter(function(t){return!!t.__c});if(i.every(function(t){return!t.__N}))return!l||l.call(this,t,e,n);var r=o.__c.props!==t;return i.forEach(function(t){if(t.__N){var e=t.__[0];t.__=t.__N,t.__N=void 0,e!==t.__[0]&&(r=!0)}}),l&&l.call(this,t,e,n)||r},"f");tt.__f=!0;var l=tt.shouldComponentUpdate,_=tt.componentWillUpdate;tt.componentWillUpdate=function(t,e,n){if(this.__e){var i=l;l=void 0,r(t,e,n),l=i}_&&_.call(this,t,e,n)},tt.shouldComponentUpdate=r}return o.__N||o.__}function pt(t,e){var n=ht(Q++,3);!rt.__s&&Ct(n.__H,e)&&(n.__=t,n.u=e,tt.__H.__h.push(n))}function gt(t,e){var n=ht(Q++,4);!rt.__s&&Ct(n.__H,e)&&(n.__=t,n.u=e,tt.__h.push(n))}function mt(t,e){var n=ht(Q++,7);return Ct(n.__H,e)&&(n.__=t(),n.__H=e,n.__h=t),n.__}function xt(t,e){return it=8,mt(function(){return t},e)}function yt(){for(var t;t=ot.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(Ft),t.__H.__h.forEach(bt),t.__H.__h=[]}catch(e){t.__H.__h=[],rt.__e(e,t.__v)}}e(ht,"p"),e(ft,"d"),e(dt,"h"),e(pt,"y"),e(gt,"_"),e(mt,"T$1"),e(xt,"q$1"),e(yt,"j$1"),rt.__b=function(t){tt=null,lt&&lt(t)},rt.__=function(t,e){t&&e.__k&&e.__k.__m&&(t.__m=e.__k.__m),ut&&ut(t,e)},rt.__r=function(t){_t&&_t(t),Q=0;var e=(tt=t.__c).__H;e&&(et===tt?(e.__h=[],tt.__h=[],e.__.forEach(function(t){t.__N&&(t.__=t.__N),t.u=t.__N=void 0})):(e.__h.forEach(Ft),e.__h.forEach(bt),e.__h=[],Q=0)),et=tt},rt.diffed=function(t){at&&at(t);var e=t.__c;e&&e.__H&&(e.__H.__h.length&&(1!==ot.push(e)&&nt===rt.requestAnimationFrame||((nt=rt.requestAnimationFrame)||kt)(yt)),e.__H.__.forEach(function(t){t.u&&(t.__H=t.u),t.u=void 0})),et=tt=null},rt.__c=function(t,e){e.some(function(t){try{t.__h.forEach(Ft),t.__h=t.__h.filter(function(t){return!t.__||bt(t)})}catch(n){e.some(function(t){t.__h&&(t.__h=[])}),e=[],rt.__e(n,t.__v)}}),st&&st(t,e)},rt.unmount=function(t){ct&&ct(t);var e,n=t.__c;n&&n.__H&&(n.__H.__.forEach(function(t){try{Ft(t)}catch(n){e=n}}),n.__H=void 0,e&&rt.__e(e,n.__v))};var vt="function"==typeof requestAnimationFrame;function kt(t){var n,i=/* @__PURE__ */e(function(){clearTimeout(o),vt&&cancelAnimationFrame(n),setTimeout(t)},"r"),o=setTimeout(i,35);vt&&(n=requestAnimationFrame(i))}function Ft(t){var e=tt,n=t.__c;"function"==typeof n&&(t.__c=void 0,n()),tt=e}function bt(t){var e=tt;t.__c=t.__(),tt=e}function Ct(t,e){return!t||t.length!==e.length||e.some(function(e,n){return e!==t[n]})}function wt(t,e){return"function"==typeof e?e(t):e}function St(t,e){for(var n in e)t[n]=e[n];return t}function $t(t,e){for(var n in t)if("__source"!==n&&!(n in e))return!0;for(var i in e)if("__source"!==i&&t[i]!==e[i])return!0;return!1}function Rt(t,e){this.props=t,this.context=e}e(kt,"w"),e(Ft,"z"),e(bt,"B$1"),e(Ct,"C"),e(wt,"D"),e(St,"g"),e($t,"E"),e(Rt,"N"),(Rt.prototype=new W).isPureReactComponent=!0,Rt.prototype.shouldComponentUpdate=function(t,e){return $t(this.props,t)||$t(this.state,e)};var Wt=c.__b;c.__b=function(t){t.type&&t.type.__f&&t.ref&&(t.props.ref=t.ref,t.ref=null),Wt&&Wt(t)};var Pt=c.__e;c.__e=function(t,e,n,i){if(t.then)for(var o,r=e;r=r.__;)if((o=r.__c)&&o.__c)return null==e.__e&&(e.__e=n.__e,e.__k=n.__k),o.__c(t,e);Pt(t,e,n,i)};var Ht=c.unmount;function Ot(t,e,n){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(t){"function"==typeof t.__c&&t.__c()}),t.__c.__H=null),null!=(t=St({},t)).__c&&(t.__c.__P===n&&(t.__c.__P=e),t.__c.__e=!0,t.__c=null),t.__k=t.__k&&t.__k.map(function(t){return Ot(t,e,n)})),t}function At(t,e,n){return t&&n&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(t){return At(t,e,n)}),t.__c&&t.__c.__P===e&&(t.__e&&n.appendChild(t.__e),t.__c.__e=!0,t.__c.__P=n)),t}function Et(){this.__u=0,this.o=null,this.__b=null}function Nt(t){var e=t.__.__c;return e&&e.__a&&e.__a(t)}function Tt(){this.i=null,this.l=null}e(Ot,"V"),e(At,"W"),e(Et,"P"),e(Nt,"j"),e(Tt,"B"),c.unmount=function(t){var e=t.__c;e&&e.__R&&e.__R(),e&&32&t.__u&&(t.type=null),Ht&&Ht(t)},(Et.prototype=new W).__c=function(t,n){var i=n.__c,o=this;null==o.o&&(o.o=[]),o.o.push(i);var r=Nt(o.__v),l=!1,_=/* @__PURE__ */e(function(){l||(l=!0,i.__R=null,r?r(a):a())},"i");i.__R=_;var a=/* @__PURE__ */e(function(){if(! --o.__u){if(o.state.__a){var t=o.state.__a;o.__v.__k[0]=At(t,t.__c.__P,t.__c.__O)}var e;for(o.setState({__a:o.__b=null});e=o.o.pop();)e.forceUpdate()}},"l");o.__u++||32&n.__u||o.setState({__a:o.__b=o.__v.__k[0]}),t.then(_,_)},Et.prototype.componentWillUnmount=function(){this.o=[]},Et.prototype.render=function(t,e){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),i=this.__v.__k[0].__c;this.__v.__k[0]=Ot(this.__b,n,i.__O=i.__P)}this.__b=null}var o=e.__a&&S(R,null,t.fallback);return o&&(o.__u&=-33),[S(R,null,e.__a?null:t.children),o]};var Dt=/* @__PURE__ */e(function(t,e,n){if(++n[1]===n[0]&&t.l.delete(e),t.props.revealOrder&&("t"!==t.props.revealOrder[0]||!t.l.size))for(n=t.i;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;t.i=n=n[2]}},"H");(Tt.prototype=new W).__a=function(t){var n=this,i=Nt(n.__v),o=n.l.get(t);return o[0]++,function(r){var l=/* @__PURE__ */e(function(){n.props.revealOrder?(o.push(r),Dt(n,t,o)):r()},"o");i?i(l):l()}},Tt.prototype.render=function(t){this.i=null,this.l=/* @__PURE__ */new Map;var e=D(t.children);t.revealOrder&&"b"===t.revealOrder[0]&&e.reverse();for(var n=e.length;n--;)this.l.set(e[n],this.i=[1,0,this.i]);return t.children},Tt.prototype.componentDidUpdate=Tt.prototype.componentDidMount=function(){var t=this;this.l.forEach(function(e,n){Dt(t,n,e)})};var Ut="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,Lt=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,zt=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,It=/[A-Z0-9]/g,Vt="undefined"!=typeof document,Mt=/* @__PURE__ */e(function(t){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(t)},"X");W.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(t){Object.defineProperty(W.prototype,t,{configurable:!0,get:/* @__PURE__ */e(function(){return this["UNSAFE_"+t]},"get"),set:/* @__PURE__ */e(function(e){Object.defineProperty(this,t,{configurable:!0,writable:!0,value:e})},"set")})});var Bt=c.event;function jt(){}function qt(){return this.cancelBubble}function Gt(){return this.defaultPrevented}e(jt,"rn"),e(qt,"un"),e(Gt,"on"),c.event=function(t){return Bt&&(t=Bt(t)),t.persist=jt,t.isPropagationStopped=qt,t.isDefaultPrevented=Gt,t.nativeEvent=t};var Xt={enumerable:!1,configurable:!0,get:/* @__PURE__ */e(function(){return this.class},"get")},Yt=c.vnode;c.vnode=function(t){"string"==typeof t.type&&function(t){var e=t.props,n=t.type,i={},o=-1===n.indexOf("-");for(var r in e){var l=e[r];if(!("value"===r&&"defaultValue"in e&&null==l||Vt&&"children"===r&&"noscript"===n||"class"===r||"className"===r)){var _=r.toLowerCase();"defaultValue"===r&&"value"in e&&null==e.value?r="value":"download"===r&&!0===l?l="":"translate"===_&&"no"===l?l=!1:"o"===_[0]&&"n"===_[1]?"ondoubleclick"===_?r="ondblclick":"onchange"!==_||"input"!==n&&"textarea"!==n||Mt(e.type)?"onfocus"===_?r="onfocusin":"onblur"===_?r="onfocusout":zt.test(r)&&(r=_):_=r="oninput":o&&Lt.test(r)?r=r.replace(It,"-$&").toLowerCase():null===l&&(l=void 0),"oninput"===_&&i[r=_]&&(r="oninputCapture"),i[r]=l}}"select"==n&&i.multiple&&Array.isArray(i.value)&&(i.value=D(e.children).forEach(function(t){t.props.selected=-1!=i.value.indexOf(t.props.value)})),"select"==n&&null!=i.defaultValue&&(i.value=D(e.children).forEach(function(t){t.props.selected=i.multiple?-1!=i.defaultValue.indexOf(t.props.value):i.defaultValue==t.props.value})),e.class&&!e.className?(i.class=e.class,Object.defineProperty(i,"className",Xt)):(e.className&&!e.class||e.class&&e.className)&&(i.class=i.className=e.className),t.props=i}(t),t.$$typeof=Ut,Yt&&Yt(t)};var Jt=c.__r;c.__r=function(t){Jt&&Jt(t),t.__c};var Zt=c.diffed;function Kt(t){return!!t.__k&&(J(null,t),!0)}c.diffed=function(t){Zt&&Zt(t);var e=t.props,n=t.__e;null!=n&&"textarea"===t.type&&"value"in e&&e.value!==n.value&&(n.value=null==e.value?"":e.value)},e(Kt,"bn");const Qt=/* @__PURE__ */Object.freeze(/* @__PURE__ */Object.defineProperty({__proto__:null,Component:W,Fragment:R,createElement:S,h:S,render:J,unmountComponentAtNode:Kt,useCallback:xt,useEffect:pt,useLayoutEffect:gt,useMemo:mt,useReducer:dt,useState:ft},Symbol.toStringTag,{value:"Module"})),te=/* @__PURE__ */e(({href:t,x:e,y:n=0,height:i=12})=>/* @__PURE__ */K("image",{xlinkHref:t,x:e-i/2,y:n-i/2,width:i,height:i}),"Image"),ee=/* @__PURE__ */e(({x:t,y:e=0,height:i=12,fill:o,stroke:r,fontFamily:l="FontAwesome",char:_="",fontWeight:a})=>{const s=mt(()=>"FontAwesome"===l?n.faChar(_):_,[_,l]);/* @__PURE__ */
2
+ return K("text",{x:t,y:e,fill:o,stroke:r,fontFamily:l,fontSize:`${i}px`,fontWeight:a,dominantBaseline:"middle",style:{textAnchor:"middle",alignmentBaseline:"middle"},children:s})},"ImageChar"),ne=/* @__PURE__ */e(({radius:t=32,fill:e="navy",stroke:n=e,strokeWidth:i=1,shapeRendering:o})=>/* @__PURE__ */K("circle",{r:t,fill:e,stroke:n,strokeWidth:i,shapeRendering:o}),"Circle"),ie=/* @__PURE__ */e(({radius:t=30,cornerRadius:e=0,fill:n="white",stroke:i,strokeWidth:o=1,shapeRendering:r})=>/* @__PURE__ */K("rect",{x:-t,y:-t,rx:e,ry:e,width:2*t,height:2*t,fill:n,stroke:i||n,strokeWidth:o,shapeRendering:r}),"Square"),oe=/* @__PURE__ */e(({width:t=30,height:e=30,cornerRadius:n=0,fill:i="white",stroke:o="black",strokeWidth:r=1,shapeRendering:l})=>/* @__PURE__ */K("rect",{x:-t/2,y:-e/2,rx:n,ry:n,width:t,height:e,fill:i,stroke:o||i,strokeWidth:r,shapeRendering:l}),"Rectangle"),re=/* @__PURE__ */e(({shape:t="circle",height:e=128,width:n,fill:i,stroke:o,strokeWidth:r=1,shapeRendering:l,cornerRadius:_})=>{switch(t){case"square":/* @__PURE__ */
3
+ return K(ie,{radius:e/2,fill:i,stroke:o,strokeWidth:r,shapeRendering:l,cornerRadius:_});case"rectangle":/* @__PURE__ */
4
+ return K(oe,{width:n??e,height:e,fill:i,stroke:o,strokeWidth:r,shapeRendering:l,cornerRadius:_});default:/* @__PURE__ */
5
+ return K(ne,{radius:e/2,fill:i,stroke:o,strokeWidth:r,shapeRendering:l})}},"Shape"),le=/* @__PURE__ */e(({shape:t="circle",width:e,height:n=32,fill:o,stroke:r,strokeWidth:l=0,imageUrl:_="",imageFontFamily:a="FontAwesome",imageChar:s="",imageCharFill:c=i.textColor(o),padding:u=n/5,xOffset:h=0,yOffset:f=0,cornerRadius:d,shapeRendering:p})=>/* @__PURE__ */K(R,{children:[
6
+ /* @__PURE__ */K(re,{shape:t,width:e,height:n,fill:o,stroke:r,strokeWidth:l,shapeRendering:p,cornerRadius:d}),_?/* @__PURE__ */K(te,{href:_,x:h,y:f,height:n-u}):/* @__PURE__ */K(ee,{x:h,y:f,height:n-u,fontFamily:a,char:s,fill:c,fontWeight:400})]}),"Icon"),_e=/* @__PURE__ */e(({icons:t=[]})=>/* @__PURE__ */K(R,{children:t.map(t=>/* @__PURE__ */K("g",{id:t.id,children:/* @__PURE__ */K(le,{...t})},t.id))}),"Icons"),ae=/* @__PURE__ */e(({text:t,height:e=12,anchor:n="middle",baseline:i="middle",fontFamily:o="Verdana",fill:r="black"})=>/* @__PURE__ */K("text",{"font-family":o,"font-size":`${e}px`,"text-anchor":n,"dominant-baseline":i,fill:r,children:t}),"TextLine"),se=/* @__PURE__ */e(({text:t,height:e=12,fontFamily:i="Verdana",fill:o="black",onSizeUpdate:r})=>{const[l,_]=ft(0),[a,s]=ft(0);pt(()=>{r&&r({width:l,height:a})},[l,a,r]);const c=mt(()=>t.split("\n"),[t]);gt(()=>{const t=n.textSize(c,i,e);_(t.width),s(t.height)},[i,e,c]);/* @__PURE__ */
7
+ return K("g",{children:mt(()=>{const t=-a/2+e/2;return c.map((n,r)=>/* @__PURE__ */K("g",{transform:`translate(0 ${t+r*(e+2)})`,children:/* @__PURE__ */K(ae,{text:n,height:e,fontFamily:i,fill:o})},`key-${r}`))},[c,a,e,i,o])})},"Text"),ce=/* @__PURE__ */e(({text:t,height:e=12,fontFamily:n="Verdana",padding:i=4,fill:o="whitesmoke",stroke:r="lightgray",textFill:l="black",strokeWidth:_=1,cornerRadius:a=0,onSizeUpdate:s})=>{const[c,u]=ft(0),[h,f]=ft(0);pt(()=>{s&&s({width:c,height:h})},[c,h,s]);const d=xt(t=>{u(t.width),f(t.height)},[]),p=c+2*i+_,g=h+2*i+_,m=Math.floor(e/10);/* @__PURE__ */
8
+ return K(R,{children:[
9
+ /* @__PURE__ */K(oe,{width:p,height:g,fill:o,stroke:r,strokeWidth:_,cornerRadius:a}),
10
+ /* @__PURE__ */K("g",{transform:`translate(0 ${m})`,children:/* @__PURE__ */K(se,{text:t,fontFamily:n,height:e,fill:l,onSizeUpdate:d})})]})},"TextBox"),ue=/* @__PURE__ */e(({text:t,height:e=12,width:i=12,fontFamily:o="Verdana",fontSize:r=10,padding:l=3,fill:_="whitesmoke",stroke:a="lightgray",textFill:s="black",strokeWidth:c=1,cornerRadius:u=0,onSizeUpdate:h})=>{const[f,d]=ft(i),[p,g]=ft(e);return gt(()=>{const e=n.textSize(t,o,r);d(e.width+2*l),g(e.height+2*l)},[t,o,r,l]),gt(()=>{h&&h({width:f,height:p})},[f,p,l,h]),/* @__PURE__ */K(R,{children:[
11
+ /* @__PURE__ */K(oe,{width:i,height:e,fill:_,stroke:a,strokeWidth:c,cornerRadius:u}),
12
+ /* @__PURE__ */K("g",{transform:`translate(${-i/2+l} ${-e/2+l})`,children:/* @__PURE__ */K(ae,{text:t,fontFamily:o,height:r,fill:s,anchor:"start",baseline:"hanging"})})]})},"LabelledRect"),he=/* @__PURE__ */e(({icon:t,iconFontFamily:e,text:n,height:i=12,width:o=12,fontFamily:r="Verdana",fontSize:l=10,padding:_=3,fill:a="whitesmoke",stroke:s="lightgray",textFill:c="black",strokeWidth:u=1,cornerRadius:h=0})=>/* @__PURE__ */K(R,{children:[
13
+ /* @__PURE__ */K(oe,{width:o,height:i,fill:a,stroke:s,strokeWidth:u,cornerRadius:h}),
14
+ /* @__PURE__ */K("g",{transform:`translate(${-o/2+_} ${-i/2+_})`,children:/* @__PURE__ */K(le,{shape:"square",imageFontFamily:e,imageChar:t,height:i,fill:a,imageCharFill:c})}),
15
+ /* @__PURE__ */K("g",{transform:`translate(${-o/2+2*_+i} ${-i/2+_})`,children:/* @__PURE__ */K(ae,{text:n,fontFamily:r,height:l,fill:c,anchor:"start",baseline:"hanging"})})]}),"IconLabelledRect"),fe=/* @__PURE__ */e(({label:t,labelPos:e,labelFill:n="black",labelHeight:i=12,path:o,stroke:r,strokeWidth:l,strokeDasharray:_})=>/* @__PURE__ */K(R,{children:[
16
+ /* @__PURE__ */K("path",{d:o,stroke:r,style:{strokeWidth:l,strokeDasharray:_}}),t&&e&&2===e.length?/* @__PURE__ */K("g",{transform:`translate(${e[0]} ${e[1]})`,children:/* @__PURE__ */K(se,{text:t,fill:n,height:i})}):void 0]}),"Edge");function de(t,e,n,i){J(S(t,e),n,i)}function pe(t,e,n,i){J(S("svg",null,S(t,e)),n,i)}e(de,"render"),e(pe,"svgRender");const ge=class _HTMLAdapter extends o{constructor(t){super(),this._component=t}props(t){return arguments.length?(this._props={...this._props,...t},this):this._props}prop(t,e){return 1===arguments.length?this._props[t]:(this._props[t]=e,this)}update(t,e){super.update(t,e),de(this._component,this._props,t)}};e(ge,"HTMLAdapter");let me=ge;me.prototype._class+=" react_HTMLAdapter",me.prototype.publish("props",{},"object","Properties");const xe=class _SVGAdapter extends r{constructor(t){super(),this._component=t}props(t){return arguments.length?(this._props={...this._props,...t},this):this._props}prop(t,e){return 1===arguments.length?this._props[t]:(this._props[t]=e,this)}update(t,e){super.update(t,e),de(this._component,this._props,t)}};e(xe,"SVGAdapter");let ye=xe;ye.prototype._class+=" react_SVGAdapter",ye.prototype.publish("props",{},"object","Properties");const ve=/* @__PURE__ */e(({text:t})=>/* @__PURE__ */K("span",{children:t}),"Span"),ke=/* @__PURE__ */e(({x:t,y:e,annotationIDs:n=[],stepSize:i=-16})=>/* @__PURE__ */K(R,{children:n.map((n,o)=>/* @__PURE__ */K("g",{transform:`translate(${t+o*i} ${e})`,children:/* @__PURE__ */K("use",{xlinkHref:"#"+n})},n))}),"Annotations"),Fe=/* @__PURE__ */e(({categoryID:t="",text:e="",textHeight:n=12,textPadding:i=4,icon:o={},annotationsHeight:r=12,annotationIDs:l=[],textFill:_,textboxFill:a,textboxStroke:s,textFontFamily:c,onSizeUpdate:u,showLabel:h=!0,scale:f=1})=>{o={imageChar:"fa-question",height:32,fill:"transparent",...o};const[d,p]=ft(0),[g,m]=ft(0);pt(()=>{u&&u({width:0,height:0})},[d,g,u]);let x=d;x+=4;let y=-(2*o.height/6+n+8)/2;const v=o.height/3+g/2+i;let k=o.height/3+g+i+r/3;h||(y+=(n+8)/2,k-=g+i);const F=xt(t=>{p(t.width),m(t.height)},[]),b=h?/* @__PURE__ */K("g",{transform:`translate(0 ${v})`,children:/* @__PURE__ */K(ce,{text:e,height:n,padding:i,onSizeUpdate:F,textFill:_,fill:a,stroke:s,fontFamily:c})}):void 0;/* @__PURE__ */
17
+ return K("g",t?{transform:`translate(0 ${y}) scale(${f})`,children:[
18
+ /* @__PURE__ */K("use",{xlinkHref:"#"+t}),b,
19
+ /* @__PURE__ */K(ke,{x:x/2,y:k,annotationIDs:l})]}:{transform:`translate(0 ${y}) scale(${f})`,children:[
20
+ /* @__PURE__ */K(le,{...o}),b]})},"Vertex"),be=/* @__PURE__ */e(({categoryID:t="",text:e="",textHeight:i=12,textPadding:o=4,icon:r={},textFill:l="black",textboxFill:_="white",textboxStroke:a="black",textFontFamily:s,annotationsHeight:c=12,annotationIDs:u=[]})=>{r={imageChar:"fa-question",imageCharFill:"white",height:32,fill:"black",shape:"square",...r};const h=i+2*o,{width:f}=mt(()=>n.textSize(e,s,i,!1),[e,s,i]),d=c,p=h/2,g=-(2*r.height/6+i+8)/2,m=-r.height/2,x=Math.ceil(f/2+o),y=p-r.height/2,v=d/2,k=p;return t?/* @__PURE__ */K("g",{transform:`translate(0 ${g})`,children:[
21
+ /* @__PURE__ */K("g",{transform:`translate(${m} 0)`,children:/* @__PURE__ */K("use",{xlinkHref:"#"+t})}),
22
+ /* @__PURE__ */K("g",{transform:`translate(${x} ${y})`,children:/* @__PURE__ */K(ce,{text:e,height:i,padding:o,strokeWidth:1,stroke:a,fill:_,textFill:l,fontFamily:s})}),
23
+ /* @__PURE__ */K(ke,{x:v,y:k,annotationIDs:u,stepSize:d})]}):/* @__PURE__ */K(R,{children:[
24
+ /* @__PURE__ */K("g",{transform:`translate(${m} 0)scale(1.0002)`,children:/* @__PURE__ */K(le,{...r,shape:"square"})}),
25
+ /* @__PURE__ */K("g",{transform:`translate(${x} ${y})scale(1.0002)`,children:/* @__PURE__ */K(ce,{text:e,height:i,padding:o,stroke:a,fill:_})})]})},"Vertex2"),Ce=/* @__PURE__ */e(({text:t="",textHeight:e=10,textPadding:i=4,textFill:o="#287EC4",textboxFill:r="white",textboxStroke:l="#CCCCCC",textboxStrokeWidth:_=1,textFontFamily:a="Verdana",annotationGutter:s=2,annotations:c=[],cornerRadius:u=3,icon:h={},subText:f={text:""},showLabel:d=!0,noLabelRadius:p=5,expansionIcon:g,scale:m=1})=>{h={height:50,imageChar:"?",imageFontFamily:"FontAwesome",imageCharFill:"#555555",fill:"transparent",strokeWidth:0,...h},f={text:"",fill:"white",textFill:"#555555",...f},g=g?{height:16,shape:"circle",padding:6,imageChar:"?",imageFontFamily:"FontAwesome",imageCharFill:"black",fill:"whitesmoke",stroke:"whitesmoke",strokeWidth:0,...g}:void 0;let x=0;const y=mt(()=>n.textSize(t,a,e,!1).width,[t,a,e]);let v=0;""!==t&&(v=y+2*i+2*_),x+=v+s;const k=x-v/2,F=e+2*i+2*_,b=[];c.forEach((t,e)=>{const n=t.imageChar;x+=F+s;const i=x-F/2;b.push(
26
+ /* @__PURE__ */K("g",{className:"vertex3-anno","data-click":"annotation","data-click-data":JSON.stringify(t),transform:`translate(${i} 0)`,children:/* @__PURE__ */K(le,{...t,shape:"square",height:F,imageChar:n,imageFontFamily:t.imageFontFamily,cornerRadius:u,strokeWidth:0})},e))}),c.length>0&&(x+=s*(c.length-1));const C=/* @__PURE__ */K("g",{"data-click":"text",transform:`translate(${k} 0)`,children:d&&""!==t?/* @__PURE__ */K(ce,{text:t,height:e,padding:i,strokeWidth:_,stroke:l,fill:r,textFill:o,fontFamily:a,cornerRadius:u}):/* @__PURE__ */K("circle",{r:p,stroke:l,fill:o})}),w=h.height||20,S=h.strokeWidth||0;let $=0;let R=F+2*s;""!==t||b.length>0?$=-w/2-S-F/2-2*s:""!==f.text&&(R=w/2+S+2*s);const W=""===f.text?null:/* @__PURE__ */K("g",{"data-click":"subtext",transform:`translate(0 ${R})`,children:/* @__PURE__ */K(ce,{fill:f.fill||"#FFFFFF",textFill:f.textFill||o,...f,height:e,padding:i,strokeWidth:0,stroke:l,fontFamily:a,cornerRadius:u})});/* @__PURE__ */
27
+ return K("g",{transform:`scale(${m})`,children:[
28
+ /* @__PURE__ */K("g",{"data-click":"icon",transform:`translate(0 ${$})`,children:[
29
+ /* @__PURE__ */K(le,{...h}),g&&/* @__PURE__ */K("g",{"data-click":"expanded-icon","data-click-data":JSON.stringify(g),transform:`translate(${(h.height+S)/2-g.height/2} ${-(h.height+S)/2+g.height/2})`,children:/* @__PURE__ */K(le,{...g})})]}),
30
+ /* @__PURE__ */K("g",{transform:`translate(${-x/2} 0)`,children:[C,b]}),W]})},"Vertex3"),we=/* @__PURE__ */e(function({id:t,categoryID:e="",text:n="",textHeight:i=12,textPadding:o=10,textFill:r="#287EC4",textboxFill:l="white",textboxStroke:_="#CCCCCC",textboxStrokeWidth:a=1,textFontFamily:s="Verdana",annotationGutter:c=2,annotations:u=[],cornerRadius:h,icon:f={},subText:d={},expansionIcon:p,scale:g=1}){f={height:91,padding:40,imageCharFill:"#555555",imageFontFamily:"FontAwesome",fill:"#FFCC33",stroke:"#DFDFDF",imageChar:"?",strokeWidth:4,yOffset:-15,...f},d={text:"",fill:"transparent",textFill:"#555555",...d};/* @__PURE__ */
31
+ return K(Ce,{...{id:t,categoryID:e,text:n,textHeight:i,textPadding:o,textFill:r,textboxFill:l,textboxStroke:_,textboxStrokeWidth:a,textFontFamily:s,annotationGutter:c,annotations:u,cornerRadius:h,icon:f,subText:d,expansionIcon:p,scale:g},icon:f,subText:d})},"CentroidVertex3"),Se=/* @__PURE__ */e(({categoryID:t="",text:e="",textHeight:i=10,textPadding:o=4,textFill:r="#287EC4",textboxFill:l="white",textboxStroke:_="#CCCCCC",textboxStrokeWidth:a=1,textFontFamily:s="Verdana",annotationGutter:c=2,annotations:u=[],iconAnnotations:h=[],cornerRadius:f=3,icon:d={},subText:p={},showLabel:g=!0,noLabelRadius:m=5,iconBorderWidth:x=1,iconBorderColor:y="#333",iconBackgroundColor:v="#fff",iconFontColor:k="#000",iconFontSize:F=20,iconFontFamily:b="FontAwesome",shapeOffsetX:C=0,shapeOffsetY:w=0,iconOffsetX:S=0,iconOffsetY:$=0,iconPadding:R=4,iconText:W="?",shapeRendering:P="auto"})=>{d={height:50,imageChar:"?",imageFontFamily:"FontAwesome",imageCharFill:"#555555",fill:"transparent",strokeWidth:0,...d},p={text:"",fill:"white",textFill:"#555555",...p};const H=mt(()=>n.textSize(e,s,i,!1).width,[e,s,i]);let O=0;""!==e&&(O=H+2*o+2*a);let A=O+c;const E=A-O/2,N=i+2*c+2*a,T=u.map(t=>n.textSize(t.imageChar,t.imageFontFamily,t.height,!1).width),D=[];let U=A;u.forEach((t,e)=>{const n=t.imageChar,i=t.height??N;U+=T[e]+c;const o=U-T[e]/2;D.push(
32
+ /* @__PURE__ */K("g",{className:"vertex3-anno","data-click":"annotation","data-click-data":JSON.stringify(t),transform:`translate(${o} 0)`,children:/* @__PURE__ */K(le,{...t,shape:"rectangle",width:T[e],height:i,imageChar:n,imageFontFamily:t.imageFontFamily,cornerRadius:f,strokeWidth:0})},e))}),u.length>0&&(A+=c*(u.length-1));const L=[];h.forEach((t,e)=>{const n=t.shapeOffsetX,i=t.shapeOffsetY;L.push(
33
+ /* @__PURE__ */K("g",{className:"vertex3-iconAnno","data-click":"icon-annotation","data-click-data":JSON.stringify(t),transform:`translate(${n} ${i})`,children:/* @__PURE__ */K(le,{...t,shape:t.shape??"square",imageChar:t.imageChar,imageFontFamily:t.imageFontFamily,cornerRadius:f,stroke:t.stroke,strokeWidth:t.strokeWidth})},e))});const z=/* @__PURE__ */K("g",{"data-click":"text",transform:`translate(${E} 0)`,children:g&&""!==e?/* @__PURE__ */K(ce,{text:e,height:i,padding:o,strokeWidth:a,stroke:_,fill:l,textFill:r,fontFamily:s,cornerRadius:f}):/* @__PURE__ */K("circle",{r:m,stroke:_,fill:r})}),I=N+2*c,V=""===p.text?null:/* @__PURE__ */K("g",{"data-click":"subtext",transform:`translate(0 ${I})`,children:/* @__PURE__ */K(ce,{fill:p.fill||"#FFFFFF",textFill:p.textFill||r,...p,height:i,padding:o,strokeWidth:0,stroke:_,fontFamily:s,cornerRadius:f})});/* @__PURE__ */
34
+ return K("g",{children:[
35
+ /* @__PURE__ */K("g",{"data-click":"icon",transform:`translate(${C} ${w})`,children:[
36
+ /* @__PURE__ */K(le,{...d,strokeWidth:x,shape:"circle",height:F,fill:v,stroke:y,imageFontFamily:b,imageChar:W,imageCharFill:k,padding:R,xOffset:S,yOffset:$,cornerRadius:f,shapeRendering:P}),L]}),
37
+ /* @__PURE__ */K("g",{transform:`translate(${-A/2} 0)`,children:[z,D]}),V]})},"Vertex4"),$e=/* @__PURE__ */e(function({id:t,categoryID:e="",text:n="",textHeight:i=12,textPadding:o=10,textFill:r="#287EC4",textboxFill:l="white",textboxStroke:_="#CCCCCC",textboxStrokeWidth:a=1,textFontFamily:s="Verdana",annotationGutter:c=2,annotations:u=[],iconAnnotations:h=[],cornerRadius:f,icon:d={},subText:p={},showLabel:g=!0,noLabelRadius:m=5,iconBorderWidth:x=1,iconBorderColor:y="#333",iconBackgroundColor:v="#fff",iconFontColor:k="#000",iconFontSize:F=20,iconFontFamily:b="FontAwesome",shapeOffsetX:C=0,shapeOffsetY:w=0,iconOffsetX:S=0,iconOffsetY:$=0,iconPadding:R=4,iconText:W="?",shapeRendering:P="auto"}){d={height:91,padding:40,imageCharFill:"#555555",imageFontFamily:"FontAwesome",fill:"#FFCC33",stroke:"#DFDFDF",imageChar:"?",strokeWidth:4,yOffset:-15,...d},p={text:"",fill:"transparent",textFill:"#555555",...p};/* @__PURE__ */
38
+ return K(Se,{...{id:t,categoryID:e,text:n,textHeight:i,textPadding:o,textFill:r,textboxFill:l,textboxStroke:_,textboxStrokeWidth:a,textFontFamily:s,annotationGutter:c,annotations:u,iconAnnotations:h,cornerRadius:f,icon:d,subText:p,showLabel:g,noLabelRadius:m,iconBorderWidth:x,iconBorderColor:y,iconBackgroundColor:v,iconFontColor:k,iconFontSize:F,iconFontFamily:b,shapeOffsetX:C,shapeOffsetY:w,iconOffsetX:S,iconOffsetY:$,iconPadding:R,iconText:W,shapeRendering:P},icon:d,subText:p})},"CentroidVertex4"),Re=/* @__PURE__ */e(({text:t,width:e=100,height:i=100,fill:o="transparent",stroke:r="black",fontHeight:l=12,fontFamily:_})=>{const a=n.textSize(t,_,l,!1);/* @__PURE__ */
39
+ return K(R,{children:[
40
+ /* @__PURE__ */K(oe,{width:e,height:i,fill:o,stroke:r}),
41
+ /* @__PURE__ */K("g",{transform:`translate(${(-e+a.width)/2+4} ${(-i+a.height)/2+4})`,children:/* @__PURE__ */K(se,{height:l,text:t,fontFamily:_})})]})},"Subgraph");export{ke as Annotations,a as BUILD_VERSION,we as CentroidVertex3,$e as CentroidVertex4,ne as Circle,fe as Edge,me as HTMLAdapter,le as Icon,he as IconLabelledRect,_e as Icons,te as Image,ee as ImageChar,ue as LabelledRect,l as PKG_NAME,_ as PKG_VERSION,Qt as React,oe as Rectangle,ye as SVGAdapter,re as Shape,ve as Span,ie as Square,Re as Subgraph,se as Text,ce as TextBox,ae as TextLine,Fe as Vertex,be as Vertex2,Ce as Vertex3,Se as Vertex4,de as render,pe as svgRender};
1892
42
  //# sourceMappingURL=index.js.map