flowboard-vue 1.0.3 → 1.0.4
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/flowboard-vue.es.js +624 -617
- package/dist/flowboard-vue.umd.js +3 -3
- package/dist/index.d.ts +4 -0
- package/dist/style.css +1 -1
- package/dist/types/index.d.ts +91 -0
- package/package.json +2 -1
package/dist/flowboard-vue.es.js
CHANGED
|
@@ -1,87 +1,87 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { Graph as
|
|
3
|
-
import { Selection as
|
|
4
|
-
import { DagreLayout as
|
|
1
|
+
import { defineComponent as V, createElementBlock as P, openBlock as w, createElementVNode as B, getCurrentInstance as Ie, inject as H, ref as E, computed as C, unref as f, isRef as $t, warn as Nt, mergeProps as ct, renderSlot as Y, watch as Oe, useSlots as Ft, Text as zt, createBlock as re, resolveDynamicComponent as Pe, withCtx as Z, createCommentVNode as q, Fragment as ut, normalizeClass as K, provide as Et, reactive as Bt, toRef as Ye, normalizeStyle as ce, withModifiers as We, createVNode as U, Transition as Ot, onMounted as At, nextTick as Xe, onUnmounted as Rt, toDisplayString as ve, createTextVNode as It, renderList as Lt } from "vue";
|
|
2
|
+
import { Graph as Ht } from "@antv/x6";
|
|
3
|
+
import { Selection as Vt } from "@antv/x6-plugin-selection";
|
|
4
|
+
import { DagreLayout as jt } from "@antv/layout";
|
|
5
5
|
/*! Element Plus Icons Vue v2.3.2 */
|
|
6
|
-
var
|
|
6
|
+
var Dt = /* @__PURE__ */ V({
|
|
7
7
|
name: "Close",
|
|
8
8
|
__name: "close",
|
|
9
9
|
setup(e) {
|
|
10
|
-
return (t, n) => (
|
|
10
|
+
return (t, n) => (w(), P("svg", {
|
|
11
11
|
xmlns: "http://www.w3.org/2000/svg",
|
|
12
12
|
viewBox: "0 0 1024 1024"
|
|
13
13
|
}, [
|
|
14
|
-
|
|
14
|
+
B("path", {
|
|
15
15
|
fill: "currentColor",
|
|
16
16
|
d: "M764.288 214.592 512 466.88 259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512 214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"
|
|
17
17
|
})
|
|
18
18
|
]));
|
|
19
19
|
}
|
|
20
|
-
}),
|
|
20
|
+
}), qe = Dt, Gt = /* @__PURE__ */ V({
|
|
21
21
|
name: "FullScreen",
|
|
22
22
|
__name: "full-screen",
|
|
23
23
|
setup(e) {
|
|
24
|
-
return (t, n) => (
|
|
24
|
+
return (t, n) => (w(), P("svg", {
|
|
25
25
|
xmlns: "http://www.w3.org/2000/svg",
|
|
26
26
|
viewBox: "0 0 1024 1024"
|
|
27
27
|
}, [
|
|
28
|
-
|
|
28
|
+
B("path", {
|
|
29
29
|
fill: "currentColor",
|
|
30
30
|
d: "m160 96.064 192 .192a32 32 0 0 1 0 64l-192-.192V352a32 32 0 0 1-64 0V96h64zm0 831.872V928H96V672a32 32 0 1 1 64 0v191.936l192-.192a32 32 0 1 1 0 64zM864 96.064V96h64v256a32 32 0 1 1-64 0V160.064l-192 .192a32 32 0 1 1 0-64zm0 831.872-192-.192a32 32 0 0 1 0-64l192 .192V672a32 32 0 1 1 64 0v256h-64z"
|
|
31
31
|
})
|
|
32
32
|
]));
|
|
33
33
|
}
|
|
34
|
-
}),
|
|
34
|
+
}), Kt = Gt, Ut = /* @__PURE__ */ V({
|
|
35
35
|
name: "Loading",
|
|
36
36
|
__name: "loading",
|
|
37
37
|
setup(e) {
|
|
38
|
-
return (t, n) => (
|
|
38
|
+
return (t, n) => (w(), P("svg", {
|
|
39
39
|
xmlns: "http://www.w3.org/2000/svg",
|
|
40
40
|
viewBox: "0 0 1024 1024"
|
|
41
41
|
}, [
|
|
42
|
-
|
|
42
|
+
B("path", {
|
|
43
43
|
fill: "currentColor",
|
|
44
44
|
d: "M512 64a32 32 0 0 1 32 32v192a32 32 0 0 1-64 0V96a32 32 0 0 1 32-32m0 640a32 32 0 0 1 32 32v192a32 32 0 1 1-64 0V736a32 32 0 0 1 32-32m448-192a32 32 0 0 1-32 32H736a32 32 0 1 1 0-64h192a32 32 0 0 1 32 32m-640 0a32 32 0 0 1-32 32H96a32 32 0 0 1 0-64h192a32 32 0 0 1 32 32M195.2 195.2a32 32 0 0 1 45.248 0L376.32 331.008a32 32 0 0 1-45.248 45.248L195.2 240.448a32 32 0 0 1 0-45.248m452.544 452.544a32 32 0 0 1 45.248 0L828.8 783.552a32 32 0 0 1-45.248 45.248L647.744 692.992a32 32 0 0 1 0-45.248M828.8 195.264a32 32 0 0 1 0 45.184L692.992 376.32a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0m-452.544 452.48a32 32 0 0 1 0 45.248L240.448 828.8a32 32 0 0 1-45.248-45.248l135.808-135.808a32 32 0 0 1 45.248 0"
|
|
45
45
|
})
|
|
46
46
|
]));
|
|
47
47
|
}
|
|
48
|
-
}),
|
|
48
|
+
}), Yt = Ut, Wt = /* @__PURE__ */ V({
|
|
49
49
|
name: "ZoomIn",
|
|
50
50
|
__name: "zoom-in",
|
|
51
51
|
setup(e) {
|
|
52
|
-
return (t, n) => (
|
|
52
|
+
return (t, n) => (w(), P("svg", {
|
|
53
53
|
xmlns: "http://www.w3.org/2000/svg",
|
|
54
54
|
viewBox: "0 0 1024 1024"
|
|
55
55
|
}, [
|
|
56
|
-
|
|
56
|
+
B("path", {
|
|
57
57
|
fill: "currentColor",
|
|
58
58
|
d: "m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704m-32-384v-96a32 32 0 0 1 64 0v96h96a32 32 0 0 1 0 64h-96v96a32 32 0 0 1-64 0v-96h-96a32 32 0 0 1 0-64z"
|
|
59
59
|
})
|
|
60
60
|
]));
|
|
61
61
|
}
|
|
62
|
-
}),
|
|
62
|
+
}), Xt = Wt, qt = /* @__PURE__ */ V({
|
|
63
63
|
name: "ZoomOut",
|
|
64
64
|
__name: "zoom-out",
|
|
65
65
|
setup(e) {
|
|
66
|
-
return (t, n) => (
|
|
66
|
+
return (t, n) => (w(), P("svg", {
|
|
67
67
|
xmlns: "http://www.w3.org/2000/svg",
|
|
68
68
|
viewBox: "0 0 1024 1024"
|
|
69
69
|
}, [
|
|
70
|
-
|
|
70
|
+
B("path", {
|
|
71
71
|
fill: "currentColor",
|
|
72
72
|
d: "m795.904 750.72 124.992 124.928a32 32 0 0 1-45.248 45.248L750.656 795.904a416 416 0 1 1 45.248-45.248zM480 832a352 352 0 1 0 0-704 352 352 0 0 0 0 704M352 448h256a32 32 0 0 1 0 64H352a32 32 0 0 1 0-64"
|
|
73
73
|
})
|
|
74
74
|
]));
|
|
75
75
|
}
|
|
76
|
-
}),
|
|
77
|
-
const
|
|
76
|
+
}), Jt = qt;
|
|
77
|
+
const Zt = Symbol(), $e = "el", Qt = "is-", Q = (e, t, n, r, a) => {
|
|
78
78
|
let i = `${e}-${t}`;
|
|
79
79
|
return n && (i += `-${n}`), r && (i += `__${r}`), a && (i += `--${a}`), i;
|
|
80
|
-
},
|
|
81
|
-
const t =
|
|
82
|
-
return
|
|
80
|
+
}, en = Symbol("namespaceContextKey"), tn = (e) => {
|
|
81
|
+
const t = Ie() ? H(en, E($e)) : E($e);
|
|
82
|
+
return C(() => f(t) || $e);
|
|
83
83
|
}, de = (e, t) => {
|
|
84
|
-
const n =
|
|
84
|
+
const n = tn();
|
|
85
85
|
return {
|
|
86
86
|
namespace: n,
|
|
87
87
|
b: (c = "") => Q(n.value, e, c, "", ""),
|
|
@@ -93,7 +93,7 @@ const Xt = Symbol(), Ce = "el", qt = "is-", Q = (e, t, n, r, a) => {
|
|
|
93
93
|
bem: (c, y, u) => c && y && u ? Q(n.value, e, c, y, u) : "",
|
|
94
94
|
is: (c, ...y) => {
|
|
95
95
|
const u = y.length >= 1 ? y[0] : !0;
|
|
96
|
-
return c && u ? `${
|
|
96
|
+
return c && u ? `${Qt}${c}` : "";
|
|
97
97
|
},
|
|
98
98
|
cssVar: (c) => {
|
|
99
99
|
const y = {};
|
|
@@ -118,73 +118,73 @@ const Xt = Symbol(), Ce = "el", qt = "is-", Q = (e, t, n, r, a) => {
|
|
|
118
118
|
**/
|
|
119
119
|
process.env.NODE_ENV !== "production" && Object.freeze({});
|
|
120
120
|
process.env.NODE_ENV !== "production" && Object.freeze([]);
|
|
121
|
-
const
|
|
122
|
-
},
|
|
123
|
-
var
|
|
124
|
-
function
|
|
125
|
-
var t =
|
|
121
|
+
const nn = () => {
|
|
122
|
+
}, rn = Object.prototype.hasOwnProperty, Je = (e, t) => rn.call(e, t), Le = (e) => typeof e == "string", dt = (e) => e !== null && typeof e == "object";
|
|
123
|
+
var on = typeof global == "object" && global && global.Object === Object && global, an = typeof self == "object" && self && self.Object === Object && self, He = on || an || Function("return this")(), oe = He.Symbol, ft = Object.prototype, sn = ft.hasOwnProperty, ln = ft.toString, le = oe ? oe.toStringTag : void 0;
|
|
124
|
+
function cn(e) {
|
|
125
|
+
var t = sn.call(e, le), n = e[le];
|
|
126
126
|
try {
|
|
127
127
|
e[le] = void 0;
|
|
128
128
|
var r = !0;
|
|
129
129
|
} catch {
|
|
130
130
|
}
|
|
131
|
-
var a =
|
|
131
|
+
var a = ln.call(e);
|
|
132
132
|
return r && (t ? e[le] = n : delete e[le]), a;
|
|
133
133
|
}
|
|
134
|
-
var
|
|
135
|
-
function
|
|
136
|
-
return
|
|
134
|
+
var un = Object.prototype, dn = un.toString;
|
|
135
|
+
function fn(e) {
|
|
136
|
+
return dn.call(e);
|
|
137
137
|
}
|
|
138
|
-
var
|
|
139
|
-
function
|
|
140
|
-
return e == null ? e === void 0 ?
|
|
138
|
+
var hn = "[object Null]", pn = "[object Undefined]", Ze = oe ? oe.toStringTag : void 0;
|
|
139
|
+
function ht(e) {
|
|
140
|
+
return e == null ? e === void 0 ? pn : hn : Ze && Ze in Object(e) ? cn(e) : fn(e);
|
|
141
141
|
}
|
|
142
|
-
function
|
|
142
|
+
function gn(e) {
|
|
143
143
|
return e != null && typeof e == "object";
|
|
144
144
|
}
|
|
145
|
-
var
|
|
146
|
-
function
|
|
147
|
-
return typeof e == "symbol" ||
|
|
145
|
+
var vn = "[object Symbol]";
|
|
146
|
+
function Ve(e) {
|
|
147
|
+
return typeof e == "symbol" || gn(e) && ht(e) == vn;
|
|
148
148
|
}
|
|
149
|
-
function
|
|
149
|
+
function bn(e, t) {
|
|
150
150
|
for (var n = -1, r = e == null ? 0 : e.length, a = Array(r); ++n < r; )
|
|
151
151
|
a[n] = t(e[n], n, e);
|
|
152
152
|
return a;
|
|
153
153
|
}
|
|
154
|
-
var
|
|
155
|
-
function
|
|
154
|
+
var je = Array.isArray, Qe = oe ? oe.prototype : void 0, et = Qe ? Qe.toString : void 0;
|
|
155
|
+
function pt(e) {
|
|
156
156
|
if (typeof e == "string")
|
|
157
157
|
return e;
|
|
158
|
-
if (
|
|
159
|
-
return
|
|
160
|
-
if (
|
|
161
|
-
return
|
|
158
|
+
if (je(e))
|
|
159
|
+
return bn(e, pt) + "";
|
|
160
|
+
if (Ve(e))
|
|
161
|
+
return et ? et.call(e) : "";
|
|
162
162
|
var t = e + "";
|
|
163
163
|
return t == "0" && 1 / e == -1 / 0 ? "-0" : t;
|
|
164
164
|
}
|
|
165
|
-
function
|
|
165
|
+
function gt(e) {
|
|
166
166
|
var t = typeof e;
|
|
167
167
|
return e != null && (t == "object" || t == "function");
|
|
168
168
|
}
|
|
169
|
-
var
|
|
170
|
-
function
|
|
171
|
-
if (!
|
|
169
|
+
var mn = "[object AsyncFunction]", yn = "[object Function]", _n = "[object GeneratorFunction]", wn = "[object Proxy]";
|
|
170
|
+
function xn(e) {
|
|
171
|
+
if (!gt(e))
|
|
172
172
|
return !1;
|
|
173
|
-
var t =
|
|
174
|
-
return t ==
|
|
173
|
+
var t = ht(e);
|
|
174
|
+
return t == yn || t == _n || t == mn || t == wn;
|
|
175
175
|
}
|
|
176
|
-
var
|
|
177
|
-
var e = /[^.]+$/.exec(
|
|
176
|
+
var Ne = He["__core-js_shared__"], tt = function() {
|
|
177
|
+
var e = /[^.]+$/.exec(Ne && Ne.keys && Ne.keys.IE_PROTO || "");
|
|
178
178
|
return e ? "Symbol(src)_1." + e : "";
|
|
179
179
|
}();
|
|
180
|
-
function _n(e) {
|
|
181
|
-
return !!Je && Je in e;
|
|
182
|
-
}
|
|
183
|
-
var wn = Function.prototype, xn = wn.toString;
|
|
184
180
|
function Sn(e) {
|
|
181
|
+
return !!tt && tt in e;
|
|
182
|
+
}
|
|
183
|
+
var kn = Function.prototype, Cn = kn.toString;
|
|
184
|
+
function Mn(e) {
|
|
185
185
|
if (e != null) {
|
|
186
186
|
try {
|
|
187
|
-
return
|
|
187
|
+
return Cn.call(e);
|
|
188
188
|
} catch {
|
|
189
189
|
}
|
|
190
190
|
try {
|
|
@@ -194,58 +194,58 @@ function Sn(e) {
|
|
|
194
194
|
}
|
|
195
195
|
return "";
|
|
196
196
|
}
|
|
197
|
-
var
|
|
198
|
-
"^" +
|
|
197
|
+
var Tn = /[\\^$.*+?()[\]{}|]/g, Pn = /^\[object .+?Constructor\]$/, $n = Function.prototype, Nn = Object.prototype, Fn = $n.toString, zn = Nn.hasOwnProperty, En = RegExp(
|
|
198
|
+
"^" + Fn.call(zn).replace(Tn, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
|
|
199
199
|
);
|
|
200
|
-
function
|
|
201
|
-
if (!
|
|
200
|
+
function Bn(e) {
|
|
201
|
+
if (!gt(e) || Sn(e))
|
|
202
202
|
return !1;
|
|
203
|
-
var t =
|
|
204
|
-
return t.test(
|
|
203
|
+
var t = xn(e) ? En : Pn;
|
|
204
|
+
return t.test(Mn(e));
|
|
205
205
|
}
|
|
206
|
-
function
|
|
206
|
+
function On(e, t) {
|
|
207
207
|
return e == null ? void 0 : e[t];
|
|
208
208
|
}
|
|
209
|
-
function
|
|
210
|
-
var n =
|
|
211
|
-
return
|
|
209
|
+
function vt(e, t) {
|
|
210
|
+
var n = On(e, t);
|
|
211
|
+
return Bn(n) ? n : void 0;
|
|
212
212
|
}
|
|
213
|
-
function
|
|
213
|
+
function An(e, t) {
|
|
214
214
|
return e === t || e !== e && t !== t;
|
|
215
215
|
}
|
|
216
|
-
var
|
|
217
|
-
function
|
|
218
|
-
if (
|
|
216
|
+
var Rn = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, In = /^\w*$/;
|
|
217
|
+
function Ln(e, t) {
|
|
218
|
+
if (je(e))
|
|
219
219
|
return !1;
|
|
220
220
|
var n = typeof e;
|
|
221
|
-
return n == "number" || n == "symbol" || n == "boolean" || e == null ||
|
|
221
|
+
return n == "number" || n == "symbol" || n == "boolean" || e == null || Ve(e) ? !0 : In.test(e) || !Rn.test(e) || t != null && e in Object(t);
|
|
222
222
|
}
|
|
223
|
-
var ue =
|
|
224
|
-
function
|
|
223
|
+
var ue = vt(Object, "create");
|
|
224
|
+
function Hn() {
|
|
225
225
|
this.__data__ = ue ? ue(null) : {}, this.size = 0;
|
|
226
226
|
}
|
|
227
|
-
function
|
|
227
|
+
function Vn(e) {
|
|
228
228
|
var t = this.has(e) && delete this.__data__[e];
|
|
229
229
|
return this.size -= t ? 1 : 0, t;
|
|
230
230
|
}
|
|
231
|
-
var
|
|
232
|
-
function
|
|
231
|
+
var jn = "__lodash_hash_undefined__", Dn = Object.prototype, Gn = Dn.hasOwnProperty;
|
|
232
|
+
function Kn(e) {
|
|
233
233
|
var t = this.__data__;
|
|
234
234
|
if (ue) {
|
|
235
235
|
var n = t[e];
|
|
236
|
-
return n ===
|
|
236
|
+
return n === jn ? void 0 : n;
|
|
237
237
|
}
|
|
238
|
-
return
|
|
238
|
+
return Gn.call(t, e) ? t[e] : void 0;
|
|
239
239
|
}
|
|
240
|
-
var
|
|
241
|
-
function
|
|
240
|
+
var Un = Object.prototype, Yn = Un.hasOwnProperty;
|
|
241
|
+
function Wn(e) {
|
|
242
242
|
var t = this.__data__;
|
|
243
|
-
return ue ? t[e] !== void 0 :
|
|
243
|
+
return ue ? t[e] !== void 0 : Yn.call(t, e);
|
|
244
244
|
}
|
|
245
|
-
var
|
|
246
|
-
function
|
|
245
|
+
var Xn = "__lodash_hash_undefined__";
|
|
246
|
+
function qn(e, t) {
|
|
247
247
|
var n = this.__data__;
|
|
248
|
-
return this.size += this.has(e) ? 0 : 1, n[e] = ue && t === void 0 ?
|
|
248
|
+
return this.size += this.has(e) ? 0 : 1, n[e] = ue && t === void 0 ? Xn : t, this;
|
|
249
249
|
}
|
|
250
250
|
function te(e) {
|
|
251
251
|
var t = -1, n = e == null ? 0 : e.length;
|
|
@@ -254,37 +254,37 @@ function te(e) {
|
|
|
254
254
|
this.set(r[0], r[1]);
|
|
255
255
|
}
|
|
256
256
|
}
|
|
257
|
-
te.prototype.clear =
|
|
258
|
-
te.prototype.delete =
|
|
259
|
-
te.prototype.get =
|
|
260
|
-
te.prototype.has =
|
|
261
|
-
te.prototype.set =
|
|
262
|
-
function
|
|
257
|
+
te.prototype.clear = Hn;
|
|
258
|
+
te.prototype.delete = Vn;
|
|
259
|
+
te.prototype.get = Kn;
|
|
260
|
+
te.prototype.has = Wn;
|
|
261
|
+
te.prototype.set = qn;
|
|
262
|
+
function Jn() {
|
|
263
263
|
this.__data__ = [], this.size = 0;
|
|
264
264
|
}
|
|
265
|
-
function
|
|
265
|
+
function _e(e, t) {
|
|
266
266
|
for (var n = e.length; n--; )
|
|
267
|
-
if (
|
|
267
|
+
if (An(e[n][0], t))
|
|
268
268
|
return n;
|
|
269
269
|
return -1;
|
|
270
270
|
}
|
|
271
|
-
var
|
|
272
|
-
function
|
|
273
|
-
var t = this.__data__, n =
|
|
271
|
+
var Zn = Array.prototype, Qn = Zn.splice;
|
|
272
|
+
function er(e) {
|
|
273
|
+
var t = this.__data__, n = _e(t, e);
|
|
274
274
|
if (n < 0)
|
|
275
275
|
return !1;
|
|
276
276
|
var r = t.length - 1;
|
|
277
|
-
return n == r ? t.pop() :
|
|
277
|
+
return n == r ? t.pop() : Qn.call(t, n, 1), --this.size, !0;
|
|
278
278
|
}
|
|
279
|
-
function
|
|
280
|
-
var t = this.__data__, n =
|
|
279
|
+
function tr(e) {
|
|
280
|
+
var t = this.__data__, n = _e(t, e);
|
|
281
281
|
return n < 0 ? void 0 : t[n][1];
|
|
282
282
|
}
|
|
283
|
-
function
|
|
284
|
-
return
|
|
283
|
+
function nr(e) {
|
|
284
|
+
return _e(this.__data__, e) > -1;
|
|
285
285
|
}
|
|
286
|
-
function
|
|
287
|
-
var n = this.__data__, r =
|
|
286
|
+
function rr(e, t) {
|
|
287
|
+
var n = this.__data__, r = _e(n, e);
|
|
288
288
|
return r < 0 ? (++this.size, n.push([e, t])) : n[r][1] = t, this;
|
|
289
289
|
}
|
|
290
290
|
function ae(e) {
|
|
@@ -294,39 +294,39 @@ function ae(e) {
|
|
|
294
294
|
this.set(r[0], r[1]);
|
|
295
295
|
}
|
|
296
296
|
}
|
|
297
|
-
ae.prototype.clear =
|
|
298
|
-
ae.prototype.delete =
|
|
299
|
-
ae.prototype.get =
|
|
300
|
-
ae.prototype.has =
|
|
301
|
-
ae.prototype.set =
|
|
302
|
-
var
|
|
303
|
-
function
|
|
297
|
+
ae.prototype.clear = Jn;
|
|
298
|
+
ae.prototype.delete = er;
|
|
299
|
+
ae.prototype.get = tr;
|
|
300
|
+
ae.prototype.has = nr;
|
|
301
|
+
ae.prototype.set = rr;
|
|
302
|
+
var or = vt(He, "Map");
|
|
303
|
+
function ar() {
|
|
304
304
|
this.size = 0, this.__data__ = {
|
|
305
305
|
hash: new te(),
|
|
306
|
-
map: new (
|
|
306
|
+
map: new (or || ae)(),
|
|
307
307
|
string: new te()
|
|
308
308
|
};
|
|
309
309
|
}
|
|
310
|
-
function
|
|
310
|
+
function ir(e) {
|
|
311
311
|
var t = typeof e;
|
|
312
312
|
return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null;
|
|
313
313
|
}
|
|
314
|
-
function
|
|
314
|
+
function we(e, t) {
|
|
315
315
|
var n = e.__data__;
|
|
316
|
-
return
|
|
316
|
+
return ir(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map;
|
|
317
317
|
}
|
|
318
|
-
function
|
|
319
|
-
var t =
|
|
318
|
+
function sr(e) {
|
|
319
|
+
var t = we(this, e).delete(e);
|
|
320
320
|
return this.size -= t ? 1 : 0, t;
|
|
321
321
|
}
|
|
322
|
-
function
|
|
323
|
-
return
|
|
322
|
+
function lr(e) {
|
|
323
|
+
return we(this, e).get(e);
|
|
324
324
|
}
|
|
325
|
-
function
|
|
326
|
-
return
|
|
325
|
+
function cr(e) {
|
|
326
|
+
return we(this, e).has(e);
|
|
327
327
|
}
|
|
328
|
-
function
|
|
329
|
-
var n =
|
|
328
|
+
function ur(e, t) {
|
|
329
|
+
var n = we(this, e), r = n.size;
|
|
330
330
|
return n.set(e, t), this.size += n.size == r ? 0 : 1, this;
|
|
331
331
|
}
|
|
332
332
|
function ne(e) {
|
|
@@ -336,15 +336,15 @@ function ne(e) {
|
|
|
336
336
|
this.set(r[0], r[1]);
|
|
337
337
|
}
|
|
338
338
|
}
|
|
339
|
-
ne.prototype.clear =
|
|
340
|
-
ne.prototype.delete =
|
|
341
|
-
ne.prototype.get =
|
|
342
|
-
ne.prototype.has =
|
|
343
|
-
ne.prototype.set =
|
|
344
|
-
var
|
|
345
|
-
function
|
|
339
|
+
ne.prototype.clear = ar;
|
|
340
|
+
ne.prototype.delete = sr;
|
|
341
|
+
ne.prototype.get = lr;
|
|
342
|
+
ne.prototype.has = cr;
|
|
343
|
+
ne.prototype.set = ur;
|
|
344
|
+
var dr = "Expected a function";
|
|
345
|
+
function De(e, t) {
|
|
346
346
|
if (typeof e != "function" || t != null && typeof t != "function")
|
|
347
|
-
throw new TypeError(
|
|
347
|
+
throw new TypeError(dr);
|
|
348
348
|
var n = function() {
|
|
349
349
|
var r = arguments, a = t ? t.apply(this, r) : r[0], i = n.cache;
|
|
350
350
|
if (i.has(a))
|
|
@@ -352,64 +352,64 @@ function He(e, t) {
|
|
|
352
352
|
var o = e.apply(this, r);
|
|
353
353
|
return n.cache = i.set(a, o) || i, o;
|
|
354
354
|
};
|
|
355
|
-
return n.cache = new (
|
|
355
|
+
return n.cache = new (De.Cache || ne)(), n;
|
|
356
356
|
}
|
|
357
|
-
|
|
358
|
-
var
|
|
359
|
-
function
|
|
360
|
-
var t =
|
|
361
|
-
return n.size ===
|
|
357
|
+
De.Cache = ne;
|
|
358
|
+
var fr = 500;
|
|
359
|
+
function hr(e) {
|
|
360
|
+
var t = De(e, function(r) {
|
|
361
|
+
return n.size === fr && n.clear(), r;
|
|
362
362
|
}), n = t.cache;
|
|
363
363
|
return t;
|
|
364
364
|
}
|
|
365
|
-
var
|
|
365
|
+
var pr = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, gr = /\\(\\)?/g, vr = hr(function(e) {
|
|
366
366
|
var t = [];
|
|
367
|
-
return e.charCodeAt(0) === 46 && t.push(""), e.replace(
|
|
368
|
-
t.push(a ? i.replace(
|
|
367
|
+
return e.charCodeAt(0) === 46 && t.push(""), e.replace(pr, function(n, r, a, i) {
|
|
368
|
+
t.push(a ? i.replace(gr, "$1") : r || n);
|
|
369
369
|
}), t;
|
|
370
370
|
});
|
|
371
|
-
function
|
|
372
|
-
return e == null ? "" :
|
|
371
|
+
function br(e) {
|
|
372
|
+
return e == null ? "" : pt(e);
|
|
373
373
|
}
|
|
374
|
-
function
|
|
375
|
-
return
|
|
374
|
+
function mr(e, t) {
|
|
375
|
+
return je(e) ? e : Ln(e, t) ? [e] : vr(br(e));
|
|
376
376
|
}
|
|
377
|
-
function
|
|
378
|
-
if (typeof e == "string" ||
|
|
377
|
+
function yr(e) {
|
|
378
|
+
if (typeof e == "string" || Ve(e))
|
|
379
379
|
return e;
|
|
380
380
|
var t = e + "";
|
|
381
381
|
return t == "0" && 1 / e == -1 / 0 ? "-0" : t;
|
|
382
382
|
}
|
|
383
|
-
function
|
|
384
|
-
t =
|
|
383
|
+
function _r(e, t) {
|
|
384
|
+
t = mr(t, e);
|
|
385
385
|
for (var n = 0, r = t.length; e != null && n < r; )
|
|
386
|
-
e = e[
|
|
386
|
+
e = e[yr(t[n++])];
|
|
387
387
|
return n && n == r ? e : void 0;
|
|
388
388
|
}
|
|
389
|
-
function
|
|
390
|
-
var r = e == null ? void 0 :
|
|
389
|
+
function wr(e, t, n) {
|
|
390
|
+
var r = e == null ? void 0 : _r(e, t);
|
|
391
391
|
return r === void 0 ? n : r;
|
|
392
392
|
}
|
|
393
|
-
function
|
|
393
|
+
function xr(e) {
|
|
394
394
|
for (var t = -1, n = e == null ? 0 : e.length, r = {}; ++t < n; ) {
|
|
395
395
|
var a = e[t];
|
|
396
396
|
r[a[0]] = a[1];
|
|
397
397
|
}
|
|
398
398
|
return r;
|
|
399
399
|
}
|
|
400
|
-
const
|
|
401
|
-
class
|
|
400
|
+
const Sr = (e) => typeof e == "number", kr = (e) => Le(e) ? !Number.isNaN(Number(e)) : !1;
|
|
401
|
+
class Cr extends Error {
|
|
402
402
|
constructor(t) {
|
|
403
403
|
super(t), this.name = "ElementPlusError";
|
|
404
404
|
}
|
|
405
405
|
}
|
|
406
|
-
function
|
|
406
|
+
function bt(e, t) {
|
|
407
407
|
if (process.env.NODE_ENV !== "production") {
|
|
408
|
-
const n =
|
|
408
|
+
const n = Le(e) ? new Cr(`[${e}] ${t}`) : e;
|
|
409
409
|
console.warn(n);
|
|
410
410
|
}
|
|
411
411
|
}
|
|
412
|
-
var
|
|
412
|
+
var Mr = {
|
|
413
413
|
name: "en",
|
|
414
414
|
el: {
|
|
415
415
|
breadcrumb: {
|
|
@@ -603,70 +603,70 @@ var Sr = {
|
|
|
603
603
|
}
|
|
604
604
|
}
|
|
605
605
|
};
|
|
606
|
-
const
|
|
606
|
+
const Tr = (e) => (t, n) => Pr(t, n, f(e)), Pr = (e, t, n) => wr(n, e, e).replace(
|
|
607
607
|
/\{(\w+)\}/g,
|
|
608
608
|
(r, a) => {
|
|
609
609
|
var i;
|
|
610
610
|
return `${(i = t == null ? void 0 : t[a]) != null ? i : `{${a}}`}`;
|
|
611
611
|
}
|
|
612
|
-
),
|
|
613
|
-
const t =
|
|
612
|
+
), $r = (e) => {
|
|
613
|
+
const t = C(() => f(e).name), n = $t(e) ? e : E(e);
|
|
614
614
|
return {
|
|
615
615
|
lang: t,
|
|
616
616
|
locale: n,
|
|
617
|
-
t:
|
|
617
|
+
t: Tr(e)
|
|
618
618
|
};
|
|
619
|
-
},
|
|
620
|
-
const t =
|
|
621
|
-
return
|
|
622
|
-
},
|
|
623
|
-
if (!
|
|
619
|
+
}, Nr = Symbol("localeContextKey"), Fr = (e) => {
|
|
620
|
+
const t = H(Nr, E());
|
|
621
|
+
return $r(C(() => t.value || Mr));
|
|
622
|
+
}, mt = "__epPropKey", xe = (e) => e, zr = (e) => dt(e) && !!e[mt], yt = (e, t) => {
|
|
623
|
+
if (!dt(e) || zr(e))
|
|
624
624
|
return e;
|
|
625
625
|
const { values: n, required: r, default: a, type: i, validator: o } = e, p = {
|
|
626
626
|
type: i,
|
|
627
627
|
required: !!r,
|
|
628
628
|
validator: n || o ? (x) => {
|
|
629
|
-
let S = !1,
|
|
630
|
-
if (n && (
|
|
631
|
-
const
|
|
632
|
-
|
|
633
|
-
`Invalid prop: validation failed${t ? ` for prop "${t}"` : ""}. Expected one of [${
|
|
629
|
+
let S = !1, h = [];
|
|
630
|
+
if (n && (h = Array.from(n), Je(e, "default") && h.push(a), S || (S = h.includes(x))), o && (S || (S = o(x))), !S && h.length > 0) {
|
|
631
|
+
const F = [...new Set(h)].map((O) => JSON.stringify(O)).join(", ");
|
|
632
|
+
Nt(
|
|
633
|
+
`Invalid prop: validation failed${t ? ` for prop "${t}"` : ""}. Expected one of [${F}], got value ${JSON.stringify(
|
|
634
634
|
x
|
|
635
635
|
)}.`
|
|
636
636
|
);
|
|
637
637
|
}
|
|
638
638
|
return S;
|
|
639
639
|
} : void 0,
|
|
640
|
-
[
|
|
640
|
+
[mt]: !0
|
|
641
641
|
};
|
|
642
|
-
return
|
|
643
|
-
},
|
|
642
|
+
return Je(e, "default") && (p.default = a), p;
|
|
643
|
+
}, Ge = (e) => xr(
|
|
644
644
|
Object.entries(e).map(([t, n]) => [
|
|
645
645
|
t,
|
|
646
|
-
|
|
646
|
+
yt(n, t)
|
|
647
647
|
])
|
|
648
|
-
),
|
|
648
|
+
), _t = ["", "default", "small", "large"], Er = yt({
|
|
649
649
|
type: String,
|
|
650
|
-
values:
|
|
650
|
+
values: _t,
|
|
651
651
|
required: !1
|
|
652
|
-
}),
|
|
653
|
-
const e =
|
|
654
|
-
return
|
|
655
|
-
},
|
|
656
|
-
function
|
|
657
|
-
const n =
|
|
658
|
-
return
|
|
652
|
+
}), Br = Symbol("size"), Or = () => {
|
|
653
|
+
const e = H(Br, {});
|
|
654
|
+
return C(() => f(e.size) || "");
|
|
655
|
+
}, nt = E();
|
|
656
|
+
function Ar(e, t = void 0) {
|
|
657
|
+
const n = Ie() ? H(Zt, nt) : nt;
|
|
658
|
+
return C(() => {
|
|
659
659
|
var r, a;
|
|
660
660
|
return (a = (r = n.value) == null ? void 0 : r[e]) != null ? a : t;
|
|
661
661
|
});
|
|
662
662
|
}
|
|
663
|
-
var
|
|
663
|
+
var Se = (e, t) => {
|
|
664
664
|
const n = e.__vccOpts || e;
|
|
665
665
|
for (const [r, a] of t)
|
|
666
666
|
n[r] = a;
|
|
667
667
|
return n;
|
|
668
668
|
};
|
|
669
|
-
const
|
|
669
|
+
const Ke = (e, t) => {
|
|
670
670
|
if (e.install = (n) => {
|
|
671
671
|
for (const r of [e, ...Object.values(t ?? {})])
|
|
672
672
|
n.component(r.name, r);
|
|
@@ -674,84 +674,84 @@ const je = (e, t) => {
|
|
|
674
674
|
for (const [n, r] of Object.entries(t))
|
|
675
675
|
e[n] = r;
|
|
676
676
|
return e;
|
|
677
|
-
},
|
|
678
|
-
function
|
|
677
|
+
}, Rr = (e) => (e.install = nn, e), Ir = "utils/dom/style";
|
|
678
|
+
function Lr(e, t = "px") {
|
|
679
679
|
if (!e && e !== 0)
|
|
680
680
|
return "";
|
|
681
|
-
if (
|
|
681
|
+
if (Sr(e) || kr(e))
|
|
682
682
|
return `${e}${t}`;
|
|
683
|
-
if (
|
|
683
|
+
if (Le(e))
|
|
684
684
|
return e;
|
|
685
|
-
|
|
685
|
+
bt(Ir, "binding value must be a string or number");
|
|
686
686
|
}
|
|
687
|
-
const
|
|
687
|
+
const Hr = Ge({
|
|
688
688
|
size: {
|
|
689
|
-
type:
|
|
689
|
+
type: xe([Number, String])
|
|
690
690
|
},
|
|
691
691
|
color: {
|
|
692
692
|
type: String
|
|
693
693
|
}
|
|
694
|
-
}),
|
|
694
|
+
}), Vr = V({
|
|
695
695
|
name: "ElIcon",
|
|
696
696
|
inheritAttrs: !1,
|
|
697
697
|
__name: "icon",
|
|
698
|
-
props:
|
|
698
|
+
props: Hr,
|
|
699
699
|
setup(e) {
|
|
700
|
-
const t = e, n = de("icon"), r =
|
|
701
|
-
const { size: a, color: i } = t, o =
|
|
700
|
+
const t = e, n = de("icon"), r = C(() => {
|
|
701
|
+
const { size: a, color: i } = t, o = Lr(a);
|
|
702
702
|
return !o && !i ? {} : {
|
|
703
703
|
fontSize: o,
|
|
704
704
|
"--color": i
|
|
705
705
|
};
|
|
706
706
|
});
|
|
707
|
-
return (a, i) => (
|
|
707
|
+
return (a, i) => (w(), P(
|
|
708
708
|
"i",
|
|
709
|
-
|
|
710
|
-
class:
|
|
709
|
+
ct({
|
|
710
|
+
class: f(n).b(),
|
|
711
711
|
style: r.value
|
|
712
712
|
}, a.$attrs),
|
|
713
713
|
[
|
|
714
|
-
|
|
714
|
+
Y(a.$slots, "default")
|
|
715
715
|
],
|
|
716
716
|
16
|
|
717
717
|
));
|
|
718
718
|
}
|
|
719
719
|
});
|
|
720
|
-
var
|
|
721
|
-
const
|
|
720
|
+
var jr = /* @__PURE__ */ Se(Vr, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/icon/src/icon.vue"]]);
|
|
721
|
+
const ye = Ke(jr), rt = xe([
|
|
722
722
|
String,
|
|
723
723
|
Object,
|
|
724
724
|
Function
|
|
725
|
-
]),
|
|
726
|
-
const e =
|
|
725
|
+
]), Ue = Symbol("formContextKey"), wt = Symbol("formItemContextKey"), Dr = () => {
|
|
726
|
+
const e = H(Ue, void 0), t = H(wt, void 0);
|
|
727
727
|
return {
|
|
728
728
|
form: e,
|
|
729
729
|
formItem: t
|
|
730
730
|
};
|
|
731
|
-
},
|
|
732
|
-
const t =
|
|
733
|
-
return
|
|
731
|
+
}, xt = (e) => {
|
|
732
|
+
const t = Ie();
|
|
733
|
+
return C(() => {
|
|
734
734
|
var n, r;
|
|
735
735
|
return (r = (n = t == null ? void 0 : t.proxy) == null ? void 0 : n.$props) == null ? void 0 : r[e];
|
|
736
736
|
});
|
|
737
|
-
},
|
|
738
|
-
const n =
|
|
739
|
-
return
|
|
740
|
-
() => r.value ||
|
|
737
|
+
}, St = (e, t = {}) => {
|
|
738
|
+
const n = E(void 0), r = t.prop ? n : xt("size"), a = t.global ? n : Or(), i = t.form ? { size: void 0 } : H(Ue, void 0), o = t.formItem ? { size: void 0 } : H(wt, void 0);
|
|
739
|
+
return C(
|
|
740
|
+
() => r.value || f(e) || (o == null ? void 0 : o.size) || (i == null ? void 0 : i.size) || a.value || ""
|
|
741
741
|
);
|
|
742
|
-
},
|
|
743
|
-
const t =
|
|
744
|
-
return
|
|
742
|
+
}, kt = (e) => {
|
|
743
|
+
const t = xt("disabled"), n = H(Ue, void 0);
|
|
744
|
+
return C(() => {
|
|
745
745
|
var r, a, i;
|
|
746
|
-
return (i = (a = (r = t.value) != null ? r :
|
|
746
|
+
return (i = (a = (r = t.value) != null ? r : f(e)) != null ? a : n == null ? void 0 : n.disabled) != null ? i : !1;
|
|
747
747
|
});
|
|
748
|
-
},
|
|
748
|
+
}, Ct = Symbol(
|
|
749
749
|
"buttonGroupContextKey"
|
|
750
|
-
),
|
|
751
|
-
|
|
752
|
-
() =>
|
|
750
|
+
), Gr = ({ from: e, replacement: t, scope: n, version: r, ref: a, type: i = "API" }, o) => {
|
|
751
|
+
Oe(
|
|
752
|
+
() => f(o),
|
|
753
753
|
(l) => {
|
|
754
|
-
l &&
|
|
754
|
+
l && bt(
|
|
755
755
|
n,
|
|
756
756
|
`[${i}] ${e} is about to be deprecated in version ${r}, please use ${t} instead.
|
|
757
757
|
For more detail, please visit: ${a}
|
|
@@ -762,8 +762,8 @@ For more detail, please visit: ${a}
|
|
|
762
762
|
immediate: !0
|
|
763
763
|
}
|
|
764
764
|
);
|
|
765
|
-
},
|
|
766
|
-
|
|
765
|
+
}, Kr = (e, t) => {
|
|
766
|
+
Gr(
|
|
767
767
|
{
|
|
768
768
|
from: "type.text",
|
|
769
769
|
replacement: "link",
|
|
@@ -771,43 +771,43 @@ For more detail, please visit: ${a}
|
|
|
771
771
|
scope: "props",
|
|
772
772
|
ref: "https://element-plus.org/en-US/component/button.html#button-attributes"
|
|
773
773
|
},
|
|
774
|
-
|
|
774
|
+
C(() => e.type === "text")
|
|
775
775
|
);
|
|
776
|
-
const n =
|
|
776
|
+
const n = H(Ct, void 0), r = Ar("button"), { form: a } = Dr(), i = St(C(() => n == null ? void 0 : n.size)), o = kt(), l = E(), p = Ft(), x = C(
|
|
777
777
|
() => {
|
|
778
778
|
var u;
|
|
779
779
|
return e.type || (n == null ? void 0 : n.type) || ((u = r.value) == null ? void 0 : u.type) || "";
|
|
780
780
|
}
|
|
781
|
-
), S =
|
|
781
|
+
), S = C(
|
|
782
782
|
() => {
|
|
783
|
-
var u,
|
|
784
|
-
return (
|
|
783
|
+
var u, g, T;
|
|
784
|
+
return (T = (g = e.autoInsertSpace) != null ? g : (u = r.value) == null ? void 0 : u.autoInsertSpace) != null ? T : !1;
|
|
785
785
|
}
|
|
786
|
-
),
|
|
786
|
+
), h = C(
|
|
787
787
|
() => {
|
|
788
|
-
var u,
|
|
789
|
-
return (
|
|
788
|
+
var u, g, T;
|
|
789
|
+
return (T = (g = e.plain) != null ? g : (u = r.value) == null ? void 0 : u.plain) != null ? T : !1;
|
|
790
790
|
}
|
|
791
|
-
),
|
|
791
|
+
), F = C(
|
|
792
792
|
() => {
|
|
793
|
-
var u,
|
|
794
|
-
return (
|
|
793
|
+
var u, g, T;
|
|
794
|
+
return (T = (g = e.round) != null ? g : (u = r.value) == null ? void 0 : u.round) != null ? T : !1;
|
|
795
795
|
}
|
|
796
|
-
),
|
|
797
|
-
var u,
|
|
798
|
-
return (
|
|
799
|
-
}),
|
|
796
|
+
), O = C(() => {
|
|
797
|
+
var u, g, T;
|
|
798
|
+
return (T = (g = e.text) != null ? g : (u = r.value) == null ? void 0 : u.text) != null ? T : !1;
|
|
799
|
+
}), I = C(() => e.tag === "button" ? {
|
|
800
800
|
ariaDisabled: o.value || e.loading,
|
|
801
801
|
disabled: o.value || e.loading,
|
|
802
802
|
autofocus: e.autofocus,
|
|
803
803
|
type: e.nativeType
|
|
804
|
-
} : {}), c =
|
|
804
|
+
} : {}), c = C(() => {
|
|
805
805
|
var u;
|
|
806
|
-
const
|
|
807
|
-
if (S.value && (
|
|
808
|
-
const
|
|
809
|
-
if ((
|
|
810
|
-
const ie =
|
|
806
|
+
const g = (u = p.default) == null ? void 0 : u.call(p);
|
|
807
|
+
if (S.value && (g == null ? void 0 : g.length) === 1) {
|
|
808
|
+
const T = g[0];
|
|
809
|
+
if ((T == null ? void 0 : T.type) === zt) {
|
|
810
|
+
const ie = T.children;
|
|
811
811
|
return new RegExp("^\\p{Unified_Ideograph}{2}$", "u").test(ie.trim());
|
|
812
812
|
}
|
|
813
813
|
}
|
|
@@ -818,10 +818,10 @@ For more detail, please visit: ${a}
|
|
|
818
818
|
_size: i,
|
|
819
819
|
_type: x,
|
|
820
820
|
_ref: l,
|
|
821
|
-
_props:
|
|
822
|
-
_plain:
|
|
823
|
-
_round:
|
|
824
|
-
_text:
|
|
821
|
+
_props: I,
|
|
822
|
+
_plain: h,
|
|
823
|
+
_round: F,
|
|
824
|
+
_text: O,
|
|
825
825
|
shouldAddSpace: c,
|
|
826
826
|
handleClick: (u) => {
|
|
827
827
|
if (o.value || e.loading) {
|
|
@@ -831,7 +831,7 @@ For more detail, please visit: ${a}
|
|
|
831
831
|
e.nativeType === "reset" && (a == null || a.resetFields()), t("click", u);
|
|
832
832
|
}
|
|
833
833
|
};
|
|
834
|
-
},
|
|
834
|
+
}, Ur = [
|
|
835
835
|
"default",
|
|
836
836
|
"primary",
|
|
837
837
|
"success",
|
|
@@ -840,29 +840,29 @@ For more detail, please visit: ${a}
|
|
|
840
840
|
"danger",
|
|
841
841
|
"text",
|
|
842
842
|
""
|
|
843
|
-
],
|
|
844
|
-
size:
|
|
843
|
+
], Yr = ["button", "submit", "reset"], Ae = Ge({
|
|
844
|
+
size: Er,
|
|
845
845
|
disabled: {
|
|
846
846
|
type: Boolean,
|
|
847
847
|
default: void 0
|
|
848
848
|
},
|
|
849
849
|
type: {
|
|
850
850
|
type: String,
|
|
851
|
-
values:
|
|
851
|
+
values: Ur,
|
|
852
852
|
default: ""
|
|
853
853
|
},
|
|
854
854
|
icon: {
|
|
855
|
-
type:
|
|
855
|
+
type: rt
|
|
856
856
|
},
|
|
857
857
|
nativeType: {
|
|
858
858
|
type: String,
|
|
859
|
-
values:
|
|
859
|
+
values: Yr,
|
|
860
860
|
default: "button"
|
|
861
861
|
},
|
|
862
862
|
loading: Boolean,
|
|
863
863
|
loadingIcon: {
|
|
864
|
-
type:
|
|
865
|
-
default: () =>
|
|
864
|
+
type: rt,
|
|
865
|
+
default: () => Yt
|
|
866
866
|
},
|
|
867
867
|
plain: {
|
|
868
868
|
type: Boolean,
|
|
@@ -887,44 +887,44 @@ For more detail, please visit: ${a}
|
|
|
887
887
|
default: void 0
|
|
888
888
|
},
|
|
889
889
|
tag: {
|
|
890
|
-
type:
|
|
890
|
+
type: xe([String, Object]),
|
|
891
891
|
default: "button"
|
|
892
892
|
}
|
|
893
|
-
}),
|
|
893
|
+
}), Wr = {
|
|
894
894
|
click: (e) => e instanceof MouseEvent
|
|
895
895
|
};
|
|
896
|
-
function
|
|
897
|
-
|
|
898
|
-
var n =
|
|
896
|
+
function $(e, t) {
|
|
897
|
+
Xr(e) && (e = "100%");
|
|
898
|
+
var n = qr(e);
|
|
899
899
|
return e = t === 360 ? e : Math.min(t, Math.max(0, parseFloat(e))), n && (e = parseInt(String(e * t), 10) / 100), Math.abs(e - t) < 1e-6 ? 1 : (t === 360 ? e = (e < 0 ? e % t + t : e % t) / parseFloat(String(t)) : e = e % t / parseFloat(String(t)), e);
|
|
900
900
|
}
|
|
901
|
-
function
|
|
901
|
+
function be(e) {
|
|
902
902
|
return Math.min(1, Math.max(0, e));
|
|
903
903
|
}
|
|
904
|
-
function
|
|
904
|
+
function Xr(e) {
|
|
905
905
|
return typeof e == "string" && e.indexOf(".") !== -1 && parseFloat(e) === 1;
|
|
906
906
|
}
|
|
907
|
-
function
|
|
907
|
+
function qr(e) {
|
|
908
908
|
return typeof e == "string" && e.indexOf("%") !== -1;
|
|
909
909
|
}
|
|
910
|
-
function
|
|
910
|
+
function Mt(e) {
|
|
911
911
|
return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e;
|
|
912
912
|
}
|
|
913
|
-
function
|
|
913
|
+
function me(e) {
|
|
914
914
|
return e <= 1 ? "".concat(Number(e) * 100, "%") : e;
|
|
915
915
|
}
|
|
916
916
|
function ee(e) {
|
|
917
917
|
return e.length === 1 ? "0" + e : String(e);
|
|
918
918
|
}
|
|
919
|
-
function
|
|
919
|
+
function Jr(e, t, n) {
|
|
920
920
|
return {
|
|
921
|
-
r:
|
|
922
|
-
g:
|
|
923
|
-
b:
|
|
921
|
+
r: $(e, 255) * 255,
|
|
922
|
+
g: $(t, 255) * 255,
|
|
923
|
+
b: $(n, 255) * 255
|
|
924
924
|
};
|
|
925
925
|
}
|
|
926
|
-
function
|
|
927
|
-
e =
|
|
926
|
+
function ot(e, t, n) {
|
|
927
|
+
e = $(e, 255), t = $(t, 255), n = $(n, 255);
|
|
928
928
|
var r = Math.max(e, t, n), a = Math.min(e, t, n), i = 0, o = 0, l = (r + a) / 2;
|
|
929
929
|
if (r === a)
|
|
930
930
|
o = 0, i = 0;
|
|
@@ -945,21 +945,21 @@ function et(e, t, n) {
|
|
|
945
945
|
}
|
|
946
946
|
return { h: i, s: o, l };
|
|
947
947
|
}
|
|
948
|
-
function
|
|
948
|
+
function Fe(e, t, n) {
|
|
949
949
|
return n < 0 && (n += 1), n > 1 && (n -= 1), n < 1 / 6 ? e + (t - e) * (6 * n) : n < 1 / 2 ? t : n < 2 / 3 ? e + (t - e) * (2 / 3 - n) * 6 : e;
|
|
950
950
|
}
|
|
951
|
-
function
|
|
951
|
+
function Zr(e, t, n) {
|
|
952
952
|
var r, a, i;
|
|
953
|
-
if (e =
|
|
953
|
+
if (e = $(e, 360), t = $(t, 100), n = $(n, 100), t === 0)
|
|
954
954
|
a = n, i = n, r = n;
|
|
955
955
|
else {
|
|
956
956
|
var o = n < 0.5 ? n * (1 + t) : n + t - n * t, l = 2 * n - o;
|
|
957
|
-
r =
|
|
957
|
+
r = Fe(l, o, e + 1 / 3), a = Fe(l, o, e), i = Fe(l, o, e - 1 / 3);
|
|
958
958
|
}
|
|
959
959
|
return { r: r * 255, g: a * 255, b: i * 255 };
|
|
960
960
|
}
|
|
961
|
-
function
|
|
962
|
-
e =
|
|
961
|
+
function at(e, t, n) {
|
|
962
|
+
e = $(e, 255), t = $(t, 255), n = $(n, 255);
|
|
963
963
|
var r = Math.max(e, t, n), a = Math.min(e, t, n), i = 0, o = r, l = r - a, p = r === 0 ? 0 : l / r;
|
|
964
964
|
if (r === a)
|
|
965
965
|
i = 0;
|
|
@@ -979,12 +979,12 @@ function tt(e, t, n) {
|
|
|
979
979
|
}
|
|
980
980
|
return { h: i, s: p, v: o };
|
|
981
981
|
}
|
|
982
|
-
function
|
|
983
|
-
e =
|
|
984
|
-
var r = Math.floor(e), a = e - r, i = n * (1 - t), o = n * (1 - a * t), l = n * (1 - (1 - a) * t), p = r % 6, x = [n, o, i, i, l, n][p], S = [l, n, n, o, i, i][p],
|
|
985
|
-
return { r: x * 255, g: S * 255, b:
|
|
982
|
+
function Qr(e, t, n) {
|
|
983
|
+
e = $(e, 360) * 6, t = $(t, 100), n = $(n, 100);
|
|
984
|
+
var r = Math.floor(e), a = e - r, i = n * (1 - t), o = n * (1 - a * t), l = n * (1 - (1 - a) * t), p = r % 6, x = [n, o, i, i, l, n][p], S = [l, n, n, o, i, i][p], h = [i, i, l, n, n, o][p];
|
|
985
|
+
return { r: x * 255, g: S * 255, b: h * 255 };
|
|
986
986
|
}
|
|
987
|
-
function
|
|
987
|
+
function it(e, t, n, r) {
|
|
988
988
|
var a = [
|
|
989
989
|
ee(Math.round(e).toString(16)),
|
|
990
990
|
ee(Math.round(t).toString(16)),
|
|
@@ -992,32 +992,32 @@ function nt(e, t, n, r) {
|
|
|
992
992
|
];
|
|
993
993
|
return r && a[0].startsWith(a[0].charAt(1)) && a[1].startsWith(a[1].charAt(1)) && a[2].startsWith(a[2].charAt(1)) ? a[0].charAt(0) + a[1].charAt(0) + a[2].charAt(0) : a.join("");
|
|
994
994
|
}
|
|
995
|
-
function
|
|
995
|
+
function eo(e, t, n, r, a) {
|
|
996
996
|
var i = [
|
|
997
997
|
ee(Math.round(e).toString(16)),
|
|
998
998
|
ee(Math.round(t).toString(16)),
|
|
999
999
|
ee(Math.round(n).toString(16)),
|
|
1000
|
-
ee(
|
|
1000
|
+
ee(to(r))
|
|
1001
1001
|
];
|
|
1002
1002
|
return a && i[0].startsWith(i[0].charAt(1)) && i[1].startsWith(i[1].charAt(1)) && i[2].startsWith(i[2].charAt(1)) && i[3].startsWith(i[3].charAt(1)) ? i[0].charAt(0) + i[1].charAt(0) + i[2].charAt(0) + i[3].charAt(0) : i.join("");
|
|
1003
1003
|
}
|
|
1004
|
-
function
|
|
1004
|
+
function to(e) {
|
|
1005
1005
|
return Math.round(parseFloat(e) * 255).toString(16);
|
|
1006
1006
|
}
|
|
1007
|
-
function
|
|
1008
|
-
return
|
|
1007
|
+
function st(e) {
|
|
1008
|
+
return A(e) / 255;
|
|
1009
1009
|
}
|
|
1010
|
-
function
|
|
1010
|
+
function A(e) {
|
|
1011
1011
|
return parseInt(e, 16);
|
|
1012
1012
|
}
|
|
1013
|
-
function
|
|
1013
|
+
function no(e) {
|
|
1014
1014
|
return {
|
|
1015
1015
|
r: e >> 16,
|
|
1016
1016
|
g: (e & 65280) >> 8,
|
|
1017
1017
|
b: e & 255
|
|
1018
1018
|
};
|
|
1019
1019
|
}
|
|
1020
|
-
var
|
|
1020
|
+
var Re = {
|
|
1021
1021
|
aliceblue: "#f0f8ff",
|
|
1022
1022
|
antiquewhite: "#faebd7",
|
|
1023
1023
|
aqua: "#00ffff",
|
|
@@ -1167,9 +1167,9 @@ var Be = {
|
|
|
1167
1167
|
yellow: "#ffff00",
|
|
1168
1168
|
yellowgreen: "#9acd32"
|
|
1169
1169
|
};
|
|
1170
|
-
function
|
|
1170
|
+
function ro(e) {
|
|
1171
1171
|
var t = { r: 0, g: 0, b: 0 }, n = 1, r = null, a = null, i = null, o = !1, l = !1;
|
|
1172
|
-
return typeof e == "string" && (e =
|
|
1172
|
+
return typeof e == "string" && (e = io(e)), typeof e == "object" && (G(e.r) && G(e.g) && G(e.b) ? (t = Jr(e.r, e.g, e.b), o = !0, l = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : G(e.h) && G(e.s) && G(e.v) ? (r = me(e.s), a = me(e.v), t = Qr(e.h, r, a), o = !0, l = "hsv") : G(e.h) && G(e.s) && G(e.l) && (r = me(e.s), i = me(e.l), t = Zr(e.h, r, i), o = !0, l = "hsl"), Object.prototype.hasOwnProperty.call(e, "a") && (n = e.a)), n = Mt(n), {
|
|
1173
1173
|
ok: o,
|
|
1174
1174
|
format: e.format || l,
|
|
1175
1175
|
r: Math.min(255, Math.max(t.r, 0)),
|
|
@@ -1178,56 +1178,56 @@ function eo(e) {
|
|
|
1178
1178
|
a: n
|
|
1179
1179
|
};
|
|
1180
1180
|
}
|
|
1181
|
-
var
|
|
1181
|
+
var oo = "[-\\+]?\\d+%?", ao = "[-\\+]?\\d*\\.\\d+%?", J = "(?:".concat(ao, ")|(?:").concat(oo, ")"), ze = "[\\s|\\(]+(".concat(J, ")[,|\\s]+(").concat(J, ")[,|\\s]+(").concat(J, ")\\s*\\)?"), Ee = "[\\s|\\(]+(".concat(J, ")[,|\\s]+(").concat(J, ")[,|\\s]+(").concat(J, ")[,|\\s]+(").concat(J, ")\\s*\\)?"), L = {
|
|
1182
1182
|
CSS_UNIT: new RegExp(J),
|
|
1183
|
-
rgb: new RegExp("rgb" +
|
|
1184
|
-
rgba: new RegExp("rgba" +
|
|
1185
|
-
hsl: new RegExp("hsl" +
|
|
1186
|
-
hsla: new RegExp("hsla" +
|
|
1187
|
-
hsv: new RegExp("hsv" +
|
|
1188
|
-
hsva: new RegExp("hsva" +
|
|
1183
|
+
rgb: new RegExp("rgb" + ze),
|
|
1184
|
+
rgba: new RegExp("rgba" + Ee),
|
|
1185
|
+
hsl: new RegExp("hsl" + ze),
|
|
1186
|
+
hsla: new RegExp("hsla" + Ee),
|
|
1187
|
+
hsv: new RegExp("hsv" + ze),
|
|
1188
|
+
hsva: new RegExp("hsva" + Ee),
|
|
1189
1189
|
hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
|
|
1190
1190
|
hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
|
|
1191
1191
|
hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
|
|
1192
1192
|
hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
|
|
1193
1193
|
};
|
|
1194
|
-
function
|
|
1194
|
+
function io(e) {
|
|
1195
1195
|
if (e = e.trim().toLowerCase(), e.length === 0)
|
|
1196
1196
|
return !1;
|
|
1197
1197
|
var t = !1;
|
|
1198
|
-
if (
|
|
1199
|
-
e =
|
|
1198
|
+
if (Re[e])
|
|
1199
|
+
e = Re[e], t = !0;
|
|
1200
1200
|
else if (e === "transparent")
|
|
1201
1201
|
return { r: 0, g: 0, b: 0, a: 0, format: "name" };
|
|
1202
1202
|
var n = L.rgb.exec(e);
|
|
1203
1203
|
return n ? { r: n[1], g: n[2], b: n[3] } : (n = L.rgba.exec(e), n ? { r: n[1], g: n[2], b: n[3], a: n[4] } : (n = L.hsl.exec(e), n ? { h: n[1], s: n[2], l: n[3] } : (n = L.hsla.exec(e), n ? { h: n[1], s: n[2], l: n[3], a: n[4] } : (n = L.hsv.exec(e), n ? { h: n[1], s: n[2], v: n[3] } : (n = L.hsva.exec(e), n ? { h: n[1], s: n[2], v: n[3], a: n[4] } : (n = L.hex8.exec(e), n ? {
|
|
1204
|
-
r:
|
|
1205
|
-
g:
|
|
1206
|
-
b:
|
|
1207
|
-
a:
|
|
1204
|
+
r: A(n[1]),
|
|
1205
|
+
g: A(n[2]),
|
|
1206
|
+
b: A(n[3]),
|
|
1207
|
+
a: st(n[4]),
|
|
1208
1208
|
format: t ? "name" : "hex8"
|
|
1209
1209
|
} : (n = L.hex6.exec(e), n ? {
|
|
1210
|
-
r:
|
|
1211
|
-
g:
|
|
1212
|
-
b:
|
|
1210
|
+
r: A(n[1]),
|
|
1211
|
+
g: A(n[2]),
|
|
1212
|
+
b: A(n[3]),
|
|
1213
1213
|
format: t ? "name" : "hex"
|
|
1214
1214
|
} : (n = L.hex4.exec(e), n ? {
|
|
1215
|
-
r:
|
|
1216
|
-
g:
|
|
1217
|
-
b:
|
|
1218
|
-
a:
|
|
1215
|
+
r: A(n[1] + n[1]),
|
|
1216
|
+
g: A(n[2] + n[2]),
|
|
1217
|
+
b: A(n[3] + n[3]),
|
|
1218
|
+
a: st(n[4] + n[4]),
|
|
1219
1219
|
format: t ? "name" : "hex8"
|
|
1220
1220
|
} : (n = L.hex3.exec(e), n ? {
|
|
1221
|
-
r:
|
|
1222
|
-
g:
|
|
1223
|
-
b:
|
|
1221
|
+
r: A(n[1] + n[1]),
|
|
1222
|
+
g: A(n[2] + n[2]),
|
|
1223
|
+
b: A(n[3] + n[3]),
|
|
1224
1224
|
format: t ? "name" : "hex"
|
|
1225
1225
|
} : !1)))))))));
|
|
1226
1226
|
}
|
|
1227
|
-
function
|
|
1227
|
+
function G(e) {
|
|
1228
1228
|
return !!L.CSS_UNIT.exec(String(e));
|
|
1229
1229
|
}
|
|
1230
|
-
var
|
|
1230
|
+
var so = (
|
|
1231
1231
|
/** @class */
|
|
1232
1232
|
function() {
|
|
1233
1233
|
function e(t, n) {
|
|
@@ -1235,8 +1235,8 @@ var oo = (
|
|
|
1235
1235
|
var r;
|
|
1236
1236
|
if (t instanceof e)
|
|
1237
1237
|
return t;
|
|
1238
|
-
typeof t == "number" && (t =
|
|
1239
|
-
var a =
|
|
1238
|
+
typeof t == "number" && (t = no(t)), this.originalInput = t;
|
|
1239
|
+
var a = ro(t);
|
|
1240
1240
|
this.originalInput = t, this.r = a.r, this.g = a.g, this.b = a.b, this.a = a.a, this.roundA = Math.round(100 * this.a) / 100, this.format = (r = n.format) !== null && r !== void 0 ? r : a.format, this.gradientType = n.gradientType, this.r < 1 && (this.r = Math.round(this.r)), this.g < 1 && (this.g = Math.round(this.g)), this.b < 1 && (this.b = Math.round(this.b)), this.isValid = a.ok;
|
|
1241
1241
|
}
|
|
1242
1242
|
return e.prototype.isDark = function() {
|
|
@@ -1252,28 +1252,28 @@ var oo = (
|
|
|
1252
1252
|
}, e.prototype.getAlpha = function() {
|
|
1253
1253
|
return this.a;
|
|
1254
1254
|
}, e.prototype.setAlpha = function(t) {
|
|
1255
|
-
return this.a =
|
|
1255
|
+
return this.a = Mt(t), this.roundA = Math.round(100 * this.a) / 100, this;
|
|
1256
1256
|
}, e.prototype.isMonochrome = function() {
|
|
1257
1257
|
var t = this.toHsl().s;
|
|
1258
1258
|
return t === 0;
|
|
1259
1259
|
}, e.prototype.toHsv = function() {
|
|
1260
|
-
var t =
|
|
1260
|
+
var t = at(this.r, this.g, this.b);
|
|
1261
1261
|
return { h: t.h * 360, s: t.s, v: t.v, a: this.a };
|
|
1262
1262
|
}, e.prototype.toHsvString = function() {
|
|
1263
|
-
var t =
|
|
1263
|
+
var t = at(this.r, this.g, this.b), n = Math.round(t.h * 360), r = Math.round(t.s * 100), a = Math.round(t.v * 100);
|
|
1264
1264
|
return this.a === 1 ? "hsv(".concat(n, ", ").concat(r, "%, ").concat(a, "%)") : "hsva(".concat(n, ", ").concat(r, "%, ").concat(a, "%, ").concat(this.roundA, ")");
|
|
1265
1265
|
}, e.prototype.toHsl = function() {
|
|
1266
|
-
var t =
|
|
1266
|
+
var t = ot(this.r, this.g, this.b);
|
|
1267
1267
|
return { h: t.h * 360, s: t.s, l: t.l, a: this.a };
|
|
1268
1268
|
}, e.prototype.toHslString = function() {
|
|
1269
|
-
var t =
|
|
1269
|
+
var t = ot(this.r, this.g, this.b), n = Math.round(t.h * 360), r = Math.round(t.s * 100), a = Math.round(t.l * 100);
|
|
1270
1270
|
return this.a === 1 ? "hsl(".concat(n, ", ").concat(r, "%, ").concat(a, "%)") : "hsla(".concat(n, ", ").concat(r, "%, ").concat(a, "%, ").concat(this.roundA, ")");
|
|
1271
1271
|
}, e.prototype.toHex = function(t) {
|
|
1272
|
-
return t === void 0 && (t = !1),
|
|
1272
|
+
return t === void 0 && (t = !1), it(this.r, this.g, this.b, t);
|
|
1273
1273
|
}, e.prototype.toHexString = function(t) {
|
|
1274
1274
|
return t === void 0 && (t = !1), "#" + this.toHex(t);
|
|
1275
1275
|
}, e.prototype.toHex8 = function(t) {
|
|
1276
|
-
return t === void 0 && (t = !1),
|
|
1276
|
+
return t === void 0 && (t = !1), eo(this.r, this.g, this.b, this.a, t);
|
|
1277
1277
|
}, e.prototype.toHex8String = function(t) {
|
|
1278
1278
|
return t === void 0 && (t = !1), "#" + this.toHex8(t);
|
|
1279
1279
|
}, e.prototype.toHexShortString = function(t) {
|
|
@@ -1290,7 +1290,7 @@ var oo = (
|
|
|
1290
1290
|
return this.a === 1 ? "rgb(".concat(t, ", ").concat(n, ", ").concat(r, ")") : "rgba(".concat(t, ", ").concat(n, ", ").concat(r, ", ").concat(this.roundA, ")");
|
|
1291
1291
|
}, e.prototype.toPercentageRgb = function() {
|
|
1292
1292
|
var t = function(n) {
|
|
1293
|
-
return "".concat(Math.round(
|
|
1293
|
+
return "".concat(Math.round($(n, 255) * 100), "%");
|
|
1294
1294
|
};
|
|
1295
1295
|
return {
|
|
1296
1296
|
r: t(this.r),
|
|
@@ -1300,7 +1300,7 @@ var oo = (
|
|
|
1300
1300
|
};
|
|
1301
1301
|
}, e.prototype.toPercentageRgbString = function() {
|
|
1302
1302
|
var t = function(n) {
|
|
1303
|
-
return Math.round(
|
|
1303
|
+
return Math.round($(n, 255) * 100);
|
|
1304
1304
|
};
|
|
1305
1305
|
return this.a === 1 ? "rgb(".concat(t(this.r), "%, ").concat(t(this.g), "%, ").concat(t(this.b), "%)") : "rgba(".concat(t(this.r), "%, ").concat(t(this.g), "%, ").concat(t(this.b), "%, ").concat(this.roundA, ")");
|
|
1306
1306
|
}, e.prototype.toName = function() {
|
|
@@ -1308,7 +1308,7 @@ var oo = (
|
|
|
1308
1308
|
return "transparent";
|
|
1309
1309
|
if (this.a < 1)
|
|
1310
1310
|
return !1;
|
|
1311
|
-
for (var t = "#" +
|
|
1311
|
+
for (var t = "#" + it(this.r, this.g, this.b, !1), n = 0, r = Object.entries(Re); n < r.length; n++) {
|
|
1312
1312
|
var a = r[n], i = a[0], o = a[1];
|
|
1313
1313
|
if (t === o)
|
|
1314
1314
|
return i;
|
|
@@ -1326,7 +1326,7 @@ var oo = (
|
|
|
1326
1326
|
}, e.prototype.lighten = function(t) {
|
|
1327
1327
|
t === void 0 && (t = 10);
|
|
1328
1328
|
var n = this.toHsl();
|
|
1329
|
-
return n.l += t / 100, n.l =
|
|
1329
|
+
return n.l += t / 100, n.l = be(n.l), new e(n);
|
|
1330
1330
|
}, e.prototype.brighten = function(t) {
|
|
1331
1331
|
t === void 0 && (t = 10);
|
|
1332
1332
|
var n = this.toRgb();
|
|
@@ -1334,7 +1334,7 @@ var oo = (
|
|
|
1334
1334
|
}, e.prototype.darken = function(t) {
|
|
1335
1335
|
t === void 0 && (t = 10);
|
|
1336
1336
|
var n = this.toHsl();
|
|
1337
|
-
return n.l -= t / 100, n.l =
|
|
1337
|
+
return n.l -= t / 100, n.l = be(n.l), new e(n);
|
|
1338
1338
|
}, e.prototype.tint = function(t) {
|
|
1339
1339
|
return t === void 0 && (t = 10), this.mix("white", t);
|
|
1340
1340
|
}, e.prototype.shade = function(t) {
|
|
@@ -1342,11 +1342,11 @@ var oo = (
|
|
|
1342
1342
|
}, e.prototype.desaturate = function(t) {
|
|
1343
1343
|
t === void 0 && (t = 10);
|
|
1344
1344
|
var n = this.toHsl();
|
|
1345
|
-
return n.s -= t / 100, n.s =
|
|
1345
|
+
return n.s -= t / 100, n.s = be(n.s), new e(n);
|
|
1346
1346
|
}, e.prototype.saturate = function(t) {
|
|
1347
1347
|
t === void 0 && (t = 10);
|
|
1348
1348
|
var n = this.toHsl();
|
|
1349
|
-
return n.s += t / 100, n.s =
|
|
1349
|
+
return n.s += t / 100, n.s = be(n.s), new e(n);
|
|
1350
1350
|
}, e.prototype.greyscale = function() {
|
|
1351
1351
|
return this.desaturate(100);
|
|
1352
1352
|
}, e.prototype.spin = function(t) {
|
|
@@ -1406,14 +1406,14 @@ var oo = (
|
|
|
1406
1406
|
function X(e, t = 20) {
|
|
1407
1407
|
return e.mix("#141414", t).toString();
|
|
1408
1408
|
}
|
|
1409
|
-
function
|
|
1410
|
-
const t =
|
|
1411
|
-
return
|
|
1409
|
+
function lo(e) {
|
|
1410
|
+
const t = kt(), n = de("button");
|
|
1411
|
+
return C(() => {
|
|
1412
1412
|
let r = {}, a = e.color;
|
|
1413
1413
|
if (a) {
|
|
1414
1414
|
const i = a.match(/var\((.*?)\)/);
|
|
1415
1415
|
i && (a = window.getComputedStyle(window.document.documentElement).getPropertyValue(i[1]));
|
|
1416
|
-
const o = new
|
|
1416
|
+
const o = new so(a), l = e.dark ? o.tint(20).toString() : X(o, 20);
|
|
1417
1417
|
if (e.plain)
|
|
1418
1418
|
r = n.cssVarBlock({
|
|
1419
1419
|
"bg-color": e.dark ? X(o, 90) : o.tint(90).toString(),
|
|
@@ -1446,33 +1446,33 @@ function ao(e) {
|
|
|
1446
1446
|
return r;
|
|
1447
1447
|
});
|
|
1448
1448
|
}
|
|
1449
|
-
const
|
|
1449
|
+
const co = V({
|
|
1450
1450
|
name: "ElButton",
|
|
1451
1451
|
__name: "button",
|
|
1452
|
-
props:
|
|
1453
|
-
emits:
|
|
1452
|
+
props: Ae,
|
|
1453
|
+
emits: Wr,
|
|
1454
1454
|
setup(e, { expose: t, emit: n }) {
|
|
1455
|
-
const r = e, a = n, i =
|
|
1455
|
+
const r = e, a = n, i = lo(r), o = de("button"), {
|
|
1456
1456
|
_ref: l,
|
|
1457
1457
|
_size: p,
|
|
1458
1458
|
_type: x,
|
|
1459
1459
|
_disabled: S,
|
|
1460
|
-
_props:
|
|
1461
|
-
_plain:
|
|
1462
|
-
_round:
|
|
1463
|
-
_text:
|
|
1460
|
+
_props: h,
|
|
1461
|
+
_plain: F,
|
|
1462
|
+
_round: O,
|
|
1463
|
+
_text: I,
|
|
1464
1464
|
shouldAddSpace: c,
|
|
1465
1465
|
handleClick: y
|
|
1466
|
-
} =
|
|
1466
|
+
} = Kr(r, a), u = C(() => [
|
|
1467
1467
|
o.b(),
|
|
1468
1468
|
o.m(x.value),
|
|
1469
1469
|
o.m(p.value),
|
|
1470
1470
|
o.is("disabled", S.value),
|
|
1471
1471
|
o.is("loading", r.loading),
|
|
1472
|
-
o.is("plain",
|
|
1473
|
-
o.is("round",
|
|
1472
|
+
o.is("plain", F.value),
|
|
1473
|
+
o.is("round", O.value),
|
|
1474
1474
|
o.is("circle", r.circle),
|
|
1475
|
-
o.is("text",
|
|
1475
|
+
o.is("text", I.value),
|
|
1476
1476
|
o.is("link", r.link),
|
|
1477
1477
|
o.is("has-bg", r.bg)
|
|
1478
1478
|
]);
|
|
@@ -1482,44 +1482,44 @@ const io = j({
|
|
|
1482
1482
|
type: x,
|
|
1483
1483
|
disabled: S,
|
|
1484
1484
|
shouldAddSpace: c
|
|
1485
|
-
}), (
|
|
1485
|
+
}), (g, T) => (w(), re(Pe(g.tag), ct({
|
|
1486
1486
|
ref_key: "_ref",
|
|
1487
1487
|
ref: l
|
|
1488
|
-
},
|
|
1488
|
+
}, f(h), {
|
|
1489
1489
|
class: u.value,
|
|
1490
|
-
style:
|
|
1491
|
-
onClick:
|
|
1490
|
+
style: f(i),
|
|
1491
|
+
onClick: f(y)
|
|
1492
1492
|
}), {
|
|
1493
1493
|
default: Z(() => [
|
|
1494
|
-
|
|
1495
|
-
|
|
1494
|
+
g.loading ? (w(), P(
|
|
1495
|
+
ut,
|
|
1496
1496
|
{ key: 0 },
|
|
1497
1497
|
[
|
|
1498
|
-
|
|
1498
|
+
g.$slots.loading ? Y(g.$slots, "loading", { key: 0 }) : (w(), re(f(ye), {
|
|
1499
1499
|
key: 1,
|
|
1500
|
-
class:
|
|
1500
|
+
class: K(f(o).is("loading"))
|
|
1501
1501
|
}, {
|
|
1502
1502
|
default: Z(() => [
|
|
1503
|
-
(
|
|
1503
|
+
(w(), re(Pe(g.loadingIcon)))
|
|
1504
1504
|
]),
|
|
1505
1505
|
_: 1
|
|
1506
1506
|
}, 8, ["class"]))
|
|
1507
1507
|
],
|
|
1508
1508
|
64
|
|
1509
|
-
)) :
|
|
1509
|
+
)) : g.icon || g.$slots.icon ? (w(), re(f(ye), { key: 1 }, {
|
|
1510
1510
|
default: Z(() => [
|
|
1511
|
-
|
|
1511
|
+
g.icon ? (w(), re(Pe(g.icon), { key: 0 })) : Y(g.$slots, "icon", { key: 1 })
|
|
1512
1512
|
]),
|
|
1513
1513
|
_: 3
|
|
1514
1514
|
})) : q("v-if", !0),
|
|
1515
|
-
|
|
1515
|
+
g.$slots.default ? (w(), P(
|
|
1516
1516
|
"span",
|
|
1517
1517
|
{
|
|
1518
1518
|
key: 2,
|
|
1519
|
-
class:
|
|
1519
|
+
class: K({ [f(o).em("text", "expand")]: f(c) })
|
|
1520
1520
|
},
|
|
1521
1521
|
[
|
|
1522
|
-
|
|
1522
|
+
Y(g.$slots, "default")
|
|
1523
1523
|
],
|
|
1524
1524
|
2
|
|
1525
1525
|
)) : q("v-if", !0)
|
|
@@ -1528,45 +1528,45 @@ const io = j({
|
|
|
1528
1528
|
}, 16, ["class", "style", "onClick"]));
|
|
1529
1529
|
}
|
|
1530
1530
|
});
|
|
1531
|
-
var
|
|
1532
|
-
const
|
|
1533
|
-
size:
|
|
1534
|
-
type:
|
|
1531
|
+
var uo = /* @__PURE__ */ Se(co, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/button/src/button.vue"]]);
|
|
1532
|
+
const fo = {
|
|
1533
|
+
size: Ae.size,
|
|
1534
|
+
type: Ae.type,
|
|
1535
1535
|
direction: {
|
|
1536
|
-
type:
|
|
1536
|
+
type: xe(String),
|
|
1537
1537
|
values: ["horizontal", "vertical"],
|
|
1538
1538
|
default: "horizontal"
|
|
1539
1539
|
}
|
|
1540
|
-
},
|
|
1540
|
+
}, ho = V({
|
|
1541
1541
|
name: "ElButtonGroup",
|
|
1542
1542
|
__name: "button-group",
|
|
1543
|
-
props:
|
|
1543
|
+
props: fo,
|
|
1544
1544
|
setup(e) {
|
|
1545
1545
|
const t = e;
|
|
1546
|
-
|
|
1547
|
-
|
|
1548
|
-
|
|
1549
|
-
size:
|
|
1550
|
-
type:
|
|
1546
|
+
Et(
|
|
1547
|
+
Ct,
|
|
1548
|
+
Bt({
|
|
1549
|
+
size: Ye(t, "size"),
|
|
1550
|
+
type: Ye(t, "type")
|
|
1551
1551
|
})
|
|
1552
1552
|
);
|
|
1553
1553
|
const n = de("button");
|
|
1554
|
-
return (r, a) => (
|
|
1554
|
+
return (r, a) => (w(), P(
|
|
1555
1555
|
"div",
|
|
1556
1556
|
{
|
|
1557
|
-
class:
|
|
1557
|
+
class: K([f(n).b("group"), f(n).bm("group", t.direction)])
|
|
1558
1558
|
},
|
|
1559
1559
|
[
|
|
1560
|
-
|
|
1560
|
+
Y(r.$slots, "default")
|
|
1561
1561
|
],
|
|
1562
1562
|
2
|
|
1563
1563
|
));
|
|
1564
1564
|
}
|
|
1565
1565
|
});
|
|
1566
|
-
var
|
|
1567
|
-
const
|
|
1568
|
-
ButtonGroup:
|
|
1569
|
-
}),
|
|
1566
|
+
var Tt = /* @__PURE__ */ Se(ho, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/button/src/button-group.vue"]]);
|
|
1567
|
+
const Be = Ke(uo, {
|
|
1568
|
+
ButtonGroup: Tt
|
|
1569
|
+
}), po = Rr(Tt), go = Ge({
|
|
1570
1570
|
type: {
|
|
1571
1571
|
type: String,
|
|
1572
1572
|
values: ["primary", "success", "info", "warning", "danger"],
|
|
@@ -1578,7 +1578,7 @@ const Ee = je(so, {
|
|
|
1578
1578
|
color: String,
|
|
1579
1579
|
size: {
|
|
1580
1580
|
type: String,
|
|
1581
|
-
values:
|
|
1581
|
+
values: _t
|
|
1582
1582
|
},
|
|
1583
1583
|
effect: {
|
|
1584
1584
|
type: String,
|
|
@@ -1586,108 +1586,108 @@ const Ee = je(so, {
|
|
|
1586
1586
|
default: "light"
|
|
1587
1587
|
},
|
|
1588
1588
|
round: Boolean
|
|
1589
|
-
}),
|
|
1589
|
+
}), vo = {
|
|
1590
1590
|
close: (e) => e instanceof MouseEvent,
|
|
1591
1591
|
click: (e) => e instanceof MouseEvent
|
|
1592
|
-
},
|
|
1592
|
+
}, bo = ["aria-label"], mo = ["aria-label"], yo = V({
|
|
1593
1593
|
name: "ElTag",
|
|
1594
1594
|
__name: "tag",
|
|
1595
|
-
props:
|
|
1596
|
-
emits:
|
|
1595
|
+
props: go,
|
|
1596
|
+
emits: vo,
|
|
1597
1597
|
setup(e, { emit: t }) {
|
|
1598
|
-
const n = e, r = t, a =
|
|
1599
|
-
const { type:
|
|
1598
|
+
const n = e, r = t, a = St(), { t: i } = Fr(), o = de("tag"), l = C(() => {
|
|
1599
|
+
const { type: h, hit: F, effect: O, closable: I, round: c } = n;
|
|
1600
1600
|
return [
|
|
1601
1601
|
o.b(),
|
|
1602
|
-
o.is("closable",
|
|
1603
|
-
o.m(
|
|
1602
|
+
o.is("closable", I),
|
|
1603
|
+
o.m(h || "primary"),
|
|
1604
1604
|
o.m(a.value),
|
|
1605
|
-
o.m(
|
|
1606
|
-
o.is("hit",
|
|
1605
|
+
o.m(O),
|
|
1606
|
+
o.is("hit", F),
|
|
1607
1607
|
o.is("round", c)
|
|
1608
1608
|
];
|
|
1609
|
-
}), p = (
|
|
1610
|
-
r("close",
|
|
1611
|
-
}, x = (
|
|
1612
|
-
r("click",
|
|
1613
|
-
}, S = (
|
|
1614
|
-
var
|
|
1615
|
-
(
|
|
1609
|
+
}), p = (h) => {
|
|
1610
|
+
r("close", h);
|
|
1611
|
+
}, x = (h) => {
|
|
1612
|
+
r("click", h);
|
|
1613
|
+
}, S = (h) => {
|
|
1614
|
+
var F, O, I;
|
|
1615
|
+
(I = (O = (F = h == null ? void 0 : h.component) == null ? void 0 : F.subTree) == null ? void 0 : O.component) != null && I.bum && (h.component.subTree.component.bum = null);
|
|
1616
1616
|
};
|
|
1617
|
-
return (
|
|
1617
|
+
return (h, F) => h.disableTransitions ? (w(), P(
|
|
1618
1618
|
"span",
|
|
1619
1619
|
{
|
|
1620
1620
|
key: 0,
|
|
1621
|
-
class:
|
|
1622
|
-
style: ce({ backgroundColor:
|
|
1621
|
+
class: K(l.value),
|
|
1622
|
+
style: ce({ backgroundColor: h.color }),
|
|
1623
1623
|
onClick: x
|
|
1624
1624
|
},
|
|
1625
1625
|
[
|
|
1626
|
-
|
|
1626
|
+
B(
|
|
1627
1627
|
"span",
|
|
1628
1628
|
{
|
|
1629
|
-
class:
|
|
1629
|
+
class: K(f(o).e("content"))
|
|
1630
1630
|
},
|
|
1631
1631
|
[
|
|
1632
|
-
|
|
1632
|
+
Y(h.$slots, "default")
|
|
1633
1633
|
],
|
|
1634
1634
|
2
|
|
1635
1635
|
),
|
|
1636
|
-
|
|
1636
|
+
h.closable ? (w(), P("button", {
|
|
1637
1637
|
key: 0,
|
|
1638
|
-
"aria-label":
|
|
1639
|
-
class:
|
|
1638
|
+
"aria-label": f(i)("el.tag.close"),
|
|
1639
|
+
class: K(f(o).e("close")),
|
|
1640
1640
|
type: "button",
|
|
1641
|
-
onClick:
|
|
1641
|
+
onClick: We(p, ["stop"])
|
|
1642
1642
|
}, [
|
|
1643
|
-
|
|
1643
|
+
U(f(ye), null, {
|
|
1644
1644
|
default: Z(() => [
|
|
1645
|
-
|
|
1645
|
+
U(f(qe))
|
|
1646
1646
|
]),
|
|
1647
1647
|
_: 1
|
|
1648
1648
|
})
|
|
1649
|
-
], 10,
|
|
1649
|
+
], 10, bo)) : q("v-if", !0)
|
|
1650
1650
|
],
|
|
1651
1651
|
6
|
|
1652
|
-
)) : (
|
|
1652
|
+
)) : (w(), re(Ot, {
|
|
1653
1653
|
key: 1,
|
|
1654
|
-
name: `${
|
|
1654
|
+
name: `${f(o).namespace.value}-zoom-in-center`,
|
|
1655
1655
|
appear: "",
|
|
1656
1656
|
onVnodeMounted: S
|
|
1657
1657
|
}, {
|
|
1658
1658
|
default: Z(() => [
|
|
1659
|
-
|
|
1659
|
+
B(
|
|
1660
1660
|
"span",
|
|
1661
1661
|
{
|
|
1662
|
-
class:
|
|
1663
|
-
style: ce({ backgroundColor:
|
|
1662
|
+
class: K(l.value),
|
|
1663
|
+
style: ce({ backgroundColor: h.color }),
|
|
1664
1664
|
onClick: x
|
|
1665
1665
|
},
|
|
1666
1666
|
[
|
|
1667
|
-
|
|
1667
|
+
B(
|
|
1668
1668
|
"span",
|
|
1669
1669
|
{
|
|
1670
|
-
class:
|
|
1670
|
+
class: K(f(o).e("content"))
|
|
1671
1671
|
},
|
|
1672
1672
|
[
|
|
1673
|
-
|
|
1673
|
+
Y(h.$slots, "default")
|
|
1674
1674
|
],
|
|
1675
1675
|
2
|
|
1676
1676
|
),
|
|
1677
|
-
|
|
1677
|
+
h.closable ? (w(), P("button", {
|
|
1678
1678
|
key: 0,
|
|
1679
|
-
"aria-label":
|
|
1680
|
-
class:
|
|
1679
|
+
"aria-label": f(i)("el.tag.close"),
|
|
1680
|
+
class: K(f(o).e("close")),
|
|
1681
1681
|
type: "button",
|
|
1682
|
-
onClick:
|
|
1682
|
+
onClick: We(p, ["stop"])
|
|
1683
1683
|
}, [
|
|
1684
|
-
|
|
1684
|
+
U(f(ye), null, {
|
|
1685
1685
|
default: Z(() => [
|
|
1686
|
-
|
|
1686
|
+
U(f(qe))
|
|
1687
1687
|
]),
|
|
1688
1688
|
_: 1
|
|
1689
1689
|
})
|
|
1690
|
-
], 10,
|
|
1690
|
+
], 10, mo)) : q("v-if", !0)
|
|
1691
1691
|
],
|
|
1692
1692
|
6
|
|
1693
1693
|
)
|
|
@@ -1696,8 +1696,8 @@ const Ee = je(so, {
|
|
|
1696
1696
|
}, 8, ["name"]));
|
|
1697
1697
|
}
|
|
1698
1698
|
});
|
|
1699
|
-
var
|
|
1700
|
-
const
|
|
1699
|
+
var _o = /* @__PURE__ */ Se(yo, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/tag/src/tag.vue"]]);
|
|
1700
|
+
const wo = Ke(_o), lt = {
|
|
1701
1701
|
start: {
|
|
1702
1702
|
shape: "circle",
|
|
1703
1703
|
width: 40,
|
|
@@ -1729,13 +1729,13 @@ const mo = je(bo), ot = {
|
|
|
1729
1729
|
defaultColor: "#5F95FF",
|
|
1730
1730
|
defaultBg: "#EFF4FF"
|
|
1731
1731
|
}
|
|
1732
|
-
},
|
|
1732
|
+
}, xo = {
|
|
1733
1733
|
key: 1,
|
|
1734
1734
|
class: "flow-board-controls"
|
|
1735
|
-
},
|
|
1735
|
+
}, So = { class: "tooltip-header" }, ko = { class: "tooltip-title" }, Co = {
|
|
1736
1736
|
key: 0,
|
|
1737
1737
|
class: "tooltip-content"
|
|
1738
|
-
},
|
|
1738
|
+
}, Mo = { class: "tooltip-label" }, To = { class: "tooltip-value" }, Po = /* @__PURE__ */ V({
|
|
1739
1739
|
__name: "FlowBoard",
|
|
1740
1740
|
props: {
|
|
1741
1741
|
data: {},
|
|
@@ -1750,10 +1750,10 @@ const mo = je(bo), ot = {
|
|
|
1750
1750
|
},
|
|
1751
1751
|
emits: ["node:click", "edge:click", "ready"],
|
|
1752
1752
|
setup(e, { expose: t, emit: n }) {
|
|
1753
|
-
const r = e, a = n, i =
|
|
1753
|
+
const r = e, a = n, i = E(null), o = E(null), l = E(null), p = E({ x: 0, y: 0 }), x = E(!1), S = E({}), h = E(!0), F = (s) => s ? ["done", "success", "completed"].includes(s) ? "success" : ["running", "process", "processing"].includes(s) ? "primary" : ["error", "failed", "reject"].includes(s) ? "danger" : ["warning", "pending"].includes(s) ? "warning" : "info" : "info", O = () => {
|
|
1754
1754
|
if (!i.value) return;
|
|
1755
1755
|
const { canvas: s } = r.config;
|
|
1756
|
-
o.value = new
|
|
1756
|
+
o.value = new Ht({
|
|
1757
1757
|
container: i.value,
|
|
1758
1758
|
autoResize: !1,
|
|
1759
1759
|
panning: {
|
|
@@ -1763,7 +1763,7 @@ const mo = je(bo), ot = {
|
|
|
1763
1763
|
mousewheel: {
|
|
1764
1764
|
enabled: (s == null ? void 0 : s.zoomable) ?? !0,
|
|
1765
1765
|
zoomAtMousePosition: !0,
|
|
1766
|
-
modifiers: "ctrl",
|
|
1766
|
+
modifiers: (s == null ? void 0 : s.zoomModifiers) === void 0 ? "ctrl" : s.zoomModifiers,
|
|
1767
1767
|
minScale: (s == null ? void 0 : s.minZoom) || 0.1,
|
|
1768
1768
|
maxScale: (s == null ? void 0 : s.maxZoom) || 3
|
|
1769
1769
|
},
|
|
@@ -1793,260 +1793,267 @@ const mo = je(bo), ot = {
|
|
|
1793
1793
|
edgeMovable: !((s == null ? void 0 : s.readonly) ?? !0)
|
|
1794
1794
|
}
|
|
1795
1795
|
}), s != null && s.selection && o.value.use(
|
|
1796
|
-
new
|
|
1796
|
+
new Vt({
|
|
1797
1797
|
enabled: !0,
|
|
1798
1798
|
multiple: !0,
|
|
1799
1799
|
rubberband: s.rubberband ?? !1,
|
|
1800
1800
|
showNodeSelectionBox: !0,
|
|
1801
1801
|
modifiers: s.rubberband ? [] : ["ctrl", "meta"]
|
|
1802
1802
|
})
|
|
1803
|
-
), o.value.on("node:click", ({ node:
|
|
1804
|
-
const
|
|
1805
|
-
a("node:click",
|
|
1806
|
-
}), o.value.on("edge:click", ({ edge:
|
|
1807
|
-
a("edge:click",
|
|
1808
|
-
}), o.value.on("node:mouseenter", ({ node:
|
|
1809
|
-
const
|
|
1810
|
-
l.value =
|
|
1811
|
-
const { left:
|
|
1803
|
+
), o.value.on("node:click", ({ node: v }) => {
|
|
1804
|
+
const m = v.getData();
|
|
1805
|
+
a("node:click", m);
|
|
1806
|
+
}), o.value.on("edge:click", ({ edge: v }) => {
|
|
1807
|
+
a("edge:click", v.getData());
|
|
1808
|
+
}), o.value.on("node:mouseenter", ({ node: v, e: m }) => {
|
|
1809
|
+
const d = v.getData();
|
|
1810
|
+
l.value = d;
|
|
1811
|
+
const { left: N, top: b } = i.value.getBoundingClientRect();
|
|
1812
1812
|
p.value = {
|
|
1813
|
-
x:
|
|
1814
|
-
y:
|
|
1813
|
+
x: m.clientX - N + 10,
|
|
1814
|
+
y: m.clientY - b + 10
|
|
1815
1815
|
};
|
|
1816
1816
|
}), o.value.on("node:mouseleave", () => {
|
|
1817
1817
|
l.value = null;
|
|
1818
|
-
}),
|
|
1819
|
-
},
|
|
1818
|
+
}), I(), s != null && s.rubberbandZoom && c(), g(), a("ready", o.value);
|
|
1819
|
+
}, I = () => {
|
|
1820
1820
|
const s = i.value;
|
|
1821
1821
|
if (!s || !o.value) return;
|
|
1822
|
-
const
|
|
1823
|
-
if (
|
|
1824
|
-
|
|
1825
|
-
const
|
|
1826
|
-
s.style.cursor = "grabbing", s.setPointerCapture(
|
|
1827
|
-
const
|
|
1828
|
-
const
|
|
1829
|
-
o.value.translate(
|
|
1830
|
-
},
|
|
1831
|
-
s.style.cursor = "", s.releasePointerCapture(
|
|
1822
|
+
const v = (d) => {
|
|
1823
|
+
if (d.pointerType === "mouse" && d.button === 1) {
|
|
1824
|
+
d.preventDefault();
|
|
1825
|
+
const N = d.clientX, b = d.clientY, { tx: _, ty: z } = o.value.translate();
|
|
1826
|
+
s.style.cursor = "grabbing", s.setPointerCapture(d.pointerId);
|
|
1827
|
+
const R = (k) => {
|
|
1828
|
+
const fe = k.clientX - N, he = k.clientY - b;
|
|
1829
|
+
o.value.translate(_ + fe, z + he);
|
|
1830
|
+
}, M = (k) => {
|
|
1831
|
+
s.style.cursor = "", s.releasePointerCapture(k.pointerId), s.removeEventListener("pointermove", R), s.removeEventListener("pointerup", M);
|
|
1832
1832
|
};
|
|
1833
|
-
s.addEventListener("pointermove",
|
|
1833
|
+
s.addEventListener("pointermove", R), s.addEventListener("pointerup", M);
|
|
1834
1834
|
}
|
|
1835
1835
|
};
|
|
1836
|
-
s.addEventListener("pointerdown",
|
|
1837
|
-
const
|
|
1838
|
-
s.removeEventListener("pointerdown",
|
|
1836
|
+
s.addEventListener("pointerdown", v);
|
|
1837
|
+
const m = () => {
|
|
1838
|
+
s.removeEventListener("pointerdown", v);
|
|
1839
1839
|
};
|
|
1840
|
-
o.value._middlePanCleanup =
|
|
1841
|
-
},
|
|
1842
|
-
|
|
1843
|
-
|
|
1844
|
-
|
|
1845
|
-
|
|
1846
|
-
|
|
1840
|
+
o.value._middlePanCleanup = m;
|
|
1841
|
+
}, c = () => {
|
|
1842
|
+
const s = i.value;
|
|
1843
|
+
if (!s) return;
|
|
1844
|
+
const v = (d) => {
|
|
1845
|
+
if (d.pointerType === "mouse" && (d.button !== 0 || d.ctrlKey || d.metaKey || d.shiftKey || d.altKey)) return;
|
|
1846
|
+
const N = d.target;
|
|
1847
|
+
if (N.closest(".x6-node") || N.closest(".x6-edge") || N.closest(".x6-port"))
|
|
1847
1848
|
return;
|
|
1848
|
-
|
|
1849
|
-
const
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
(I > 5 || G > 5) && (B = !0, x.value = !0);
|
|
1849
|
+
d.preventDefault();
|
|
1850
|
+
const b = d.clientX, _ = d.clientY, z = s.getBoundingClientRect(), R = z.left, M = z.top;
|
|
1851
|
+
let k = !1;
|
|
1852
|
+
s.setPointerCapture(d.pointerId);
|
|
1853
|
+
const fe = (W) => {
|
|
1854
|
+
if (!k) {
|
|
1855
|
+
const j = Math.abs(W.clientX - b), D = Math.abs(W.clientY - _);
|
|
1856
|
+
(j > 5 || D > 5) && (k = !0, x.value = !0);
|
|
1857
1857
|
}
|
|
1858
|
-
if (
|
|
1859
|
-
const
|
|
1858
|
+
if (k) {
|
|
1859
|
+
const j = W.clientX, D = W.clientY, Me = Math.min(b, j) - R, Te = Math.min(_, D) - M, pe = Math.abs(j - b), ge = Math.abs(D - _);
|
|
1860
1860
|
S.value = {
|
|
1861
|
-
left: `${
|
|
1862
|
-
top: `${
|
|
1863
|
-
width: `${
|
|
1864
|
-
height: `${
|
|
1861
|
+
left: `${Me}px`,
|
|
1862
|
+
top: `${Te}px`,
|
|
1863
|
+
width: `${pe}px`,
|
|
1864
|
+
height: `${ge}px`
|
|
1865
1865
|
};
|
|
1866
1866
|
}
|
|
1867
|
-
},
|
|
1868
|
-
if (
|
|
1869
|
-
if (o.value &&
|
|
1870
|
-
const
|
|
1871
|
-
|
|
1867
|
+
}, he = (W) => {
|
|
1868
|
+
if (s.releasePointerCapture(W.pointerId), s.removeEventListener("pointermove", fe), s.removeEventListener("pointerup", he), x.value) {
|
|
1869
|
+
if (o.value && k) {
|
|
1870
|
+
const j = o.value.clientToLocal(b, _), D = o.value.clientToLocal(W.clientX, W.clientY), Me = Math.min(j.x, D.x), Te = Math.min(j.y, D.y), pe = Math.abs(j.x - D.x), ge = Math.abs(j.y - D.y);
|
|
1871
|
+
pe > 20 && ge > 20 && o.value.zoomToRect({ x: Me, y: Te, width: pe, height: ge });
|
|
1872
1872
|
}
|
|
1873
1873
|
x.value = !1;
|
|
1874
1874
|
}
|
|
1875
1875
|
};
|
|
1876
|
-
|
|
1877
|
-
}
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1881
|
-
|
|
1882
|
-
|
|
1883
|
-
return ot[f];
|
|
1876
|
+
s.addEventListener("pointermove", fe), s.addEventListener("pointerup", he);
|
|
1877
|
+
};
|
|
1878
|
+
s.addEventListener("pointerdown", v);
|
|
1879
|
+
const m = () => {
|
|
1880
|
+
s.removeEventListener("pointerdown", v);
|
|
1881
|
+
};
|
|
1882
|
+
o.value._rubberbandCleanup = m;
|
|
1884
1883
|
}, y = (s) => {
|
|
1885
|
-
|
|
1884
|
+
var m;
|
|
1885
|
+
if ((m = r.config) != null && m.nodeShapes && r.config.nodeShapes[s])
|
|
1886
|
+
return r.config.nodeShapes[s];
|
|
1887
|
+
const v = Object.keys(lt).find((d) => s.toLowerCase().includes(d)) || "task";
|
|
1888
|
+
return lt[v];
|
|
1889
|
+
}, u = (s) => {
|
|
1890
|
+
const v = s.status || "default", m = r.statusMap[v] || {}, d = y(s.type);
|
|
1886
1891
|
return {
|
|
1887
1892
|
body: {
|
|
1888
|
-
stroke:
|
|
1889
|
-
fill:
|
|
1890
|
-
strokeWidth:
|
|
1891
|
-
strokeDasharray:
|
|
1893
|
+
stroke: m.borderColor || m.color || d.defaultColor,
|
|
1894
|
+
fill: m.bgColor || d.defaultBg,
|
|
1895
|
+
strokeWidth: m.borderWidth || 2,
|
|
1896
|
+
strokeDasharray: m.borderStyle === "dashed" ? "5 5" : void 0
|
|
1892
1897
|
},
|
|
1893
1898
|
label: {
|
|
1894
1899
|
text: s.label || "",
|
|
1895
1900
|
fill: "#333",
|
|
1896
1901
|
fontSize: 12,
|
|
1897
1902
|
textWrap: {
|
|
1898
|
-
width:
|
|
1903
|
+
width: d.width - 10,
|
|
1899
1904
|
ellipsis: !0
|
|
1900
1905
|
}
|
|
1901
1906
|
}
|
|
1902
1907
|
};
|
|
1903
|
-
},
|
|
1904
|
-
var
|
|
1908
|
+
}, g = () => {
|
|
1909
|
+
var v, m, d, N;
|
|
1905
1910
|
if (!o.value) return;
|
|
1906
1911
|
const s = [];
|
|
1907
|
-
r.data.nodes.forEach((
|
|
1908
|
-
const
|
|
1909
|
-
id:
|
|
1910
|
-
shape:
|
|
1911
|
-
width:
|
|
1912
|
-
height:
|
|
1913
|
-
x:
|
|
1914
|
-
y:
|
|
1915
|
-
data:
|
|
1916
|
-
attrs:
|
|
1912
|
+
r.data.nodes.forEach((b) => {
|
|
1913
|
+
const _ = y(b.type), z = u(b), R = o.value.createNode({
|
|
1914
|
+
id: b.id,
|
|
1915
|
+
shape: _.shape,
|
|
1916
|
+
width: _.width,
|
|
1917
|
+
height: _.height,
|
|
1918
|
+
x: b.x || 0,
|
|
1919
|
+
y: b.y || 0,
|
|
1920
|
+
data: b,
|
|
1921
|
+
attrs: z
|
|
1917
1922
|
});
|
|
1918
|
-
s.push(
|
|
1919
|
-
}), r.data.edges.forEach((
|
|
1920
|
-
const
|
|
1921
|
-
source:
|
|
1922
|
-
target:
|
|
1923
|
-
label:
|
|
1924
|
-
data:
|
|
1923
|
+
s.push(R);
|
|
1924
|
+
}), r.data.edges.forEach((b) => {
|
|
1925
|
+
const _ = b.status ? r.statusMap[b.status] : null, z = o.value.createEdge({
|
|
1926
|
+
source: b.source,
|
|
1927
|
+
target: b.target,
|
|
1928
|
+
label: b.label,
|
|
1929
|
+
data: b,
|
|
1925
1930
|
attrs: {
|
|
1926
1931
|
line: {
|
|
1927
|
-
stroke: (
|
|
1932
|
+
stroke: (_ == null ? void 0 : _.color) || "#A2B1C3",
|
|
1928
1933
|
strokeWidth: 2,
|
|
1929
|
-
strokeDasharray:
|
|
1930
|
-
style:
|
|
1934
|
+
strokeDasharray: b.animated || _ != null && _.animated ? "5 5" : void 0,
|
|
1935
|
+
style: b.animated || _ != null && _.animated ? { animation: "ant-line 30s infinite linear" } : void 0
|
|
1931
1936
|
}
|
|
1932
1937
|
}
|
|
1933
1938
|
});
|
|
1934
|
-
s.push(
|
|
1935
|
-
}), o.value.resetCells(s), (
|
|
1936
|
-
},
|
|
1937
|
-
var
|
|
1939
|
+
s.push(z);
|
|
1940
|
+
}), o.value.resetCells(s), (m = (v = r.config) == null ? void 0 : v.layout) != null && m.enable ? T() : (N = (d = r.config) == null ? void 0 : d.canvas) != null && N.fitView && o.value.centerContent();
|
|
1941
|
+
}, T = () => {
|
|
1942
|
+
var b, _, z, R;
|
|
1938
1943
|
if (!o.value) return;
|
|
1939
|
-
const s = ((
|
|
1944
|
+
const s = ((b = r.config) == null ? void 0 : b.layout) || {}, v = s.direction || "LR", m = new jt({
|
|
1940
1945
|
type: "dagre",
|
|
1941
|
-
rankdir:
|
|
1946
|
+
rankdir: v,
|
|
1942
1947
|
align: void 0,
|
|
1943
1948
|
nodesep: s.nodeSep || 50,
|
|
1944
1949
|
ranksep: s.rankSep || 50,
|
|
1945
1950
|
controlPoints: !0
|
|
1946
|
-
}),
|
|
1947
|
-
nodes: r.data.nodes.map((
|
|
1948
|
-
const
|
|
1951
|
+
}), d = {
|
|
1952
|
+
nodes: r.data.nodes.map((M) => {
|
|
1953
|
+
const k = y(M.type);
|
|
1949
1954
|
return {
|
|
1950
|
-
id:
|
|
1951
|
-
width:
|
|
1952
|
-
height:
|
|
1955
|
+
id: M.id,
|
|
1956
|
+
width: k.width,
|
|
1957
|
+
height: k.height
|
|
1953
1958
|
};
|
|
1954
1959
|
}),
|
|
1955
|
-
edges: r.data.edges.map((
|
|
1956
|
-
source:
|
|
1957
|
-
target:
|
|
1960
|
+
edges: r.data.edges.map((M) => ({
|
|
1961
|
+
source: M.source,
|
|
1962
|
+
target: M.target
|
|
1958
1963
|
}))
|
|
1959
1964
|
};
|
|
1960
|
-
(
|
|
1961
|
-
const
|
|
1962
|
-
|
|
1963
|
-
}), (
|
|
1964
|
-
var
|
|
1965
|
-
(
|
|
1965
|
+
(_ = m.layout(d).nodes) == null || _.forEach((M) => {
|
|
1966
|
+
const k = o.value.getCellById(M.id);
|
|
1967
|
+
k && k.isNode() && k.position(M.x, M.y);
|
|
1968
|
+
}), (R = (z = r.config) == null ? void 0 : z.canvas) != null && R.fitView && Xe(() => {
|
|
1969
|
+
var M, k;
|
|
1970
|
+
(M = o.value) == null || M.zoomToFit({ padding: 20 }), (k = o.value) == null || k.centerContent();
|
|
1966
1971
|
});
|
|
1967
|
-
},
|
|
1972
|
+
}, ie = () => {
|
|
1968
1973
|
var s;
|
|
1969
1974
|
(s = o.value) == null || s.zoom(0.1);
|
|
1970
|
-
},
|
|
1975
|
+
}, ke = () => {
|
|
1971
1976
|
var s;
|
|
1972
1977
|
(s = o.value) == null || s.zoom(-0.1);
|
|
1973
|
-
},
|
|
1974
|
-
var s,
|
|
1975
|
-
(s = o.value) == null || s.zoomToFit({ padding: 20 }), (
|
|
1978
|
+
}, Ce = () => {
|
|
1979
|
+
var s, v;
|
|
1980
|
+
(s = o.value) == null || s.zoomToFit({ padding: 20 }), (v = o.value) == null || v.centerContent();
|
|
1976
1981
|
};
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
}, { deep: !0 }),
|
|
1982
|
+
Oe(() => r.data, () => {
|
|
1983
|
+
g();
|
|
1984
|
+
}, { deep: !0 }), Oe(() => r.statusMap, () => {
|
|
1980
1985
|
o.value && r.data.nodes.forEach((s) => {
|
|
1981
|
-
const
|
|
1982
|
-
if (
|
|
1983
|
-
const
|
|
1984
|
-
|
|
1986
|
+
const v = o.value.getCellById(s.id);
|
|
1987
|
+
if (v && v.isNode()) {
|
|
1988
|
+
const m = u(s);
|
|
1989
|
+
v.setAttrs(m);
|
|
1985
1990
|
}
|
|
1986
1991
|
});
|
|
1987
1992
|
}, { deep: !0 });
|
|
1988
1993
|
let se = null;
|
|
1989
|
-
const
|
|
1994
|
+
const Pt = () => {
|
|
1990
1995
|
if (!i.value) return;
|
|
1991
1996
|
let s = !1;
|
|
1992
|
-
se = new ResizeObserver((
|
|
1997
|
+
se = new ResizeObserver((v) => {
|
|
1993
1998
|
if (!s)
|
|
1994
|
-
for (const
|
|
1995
|
-
const { width:
|
|
1996
|
-
if (o.value &&
|
|
1997
|
-
const
|
|
1998
|
-
(Math.abs(
|
|
1999
|
-
var
|
|
2000
|
-
(
|
|
1999
|
+
for (const m of v) {
|
|
2000
|
+
const { width: d, height: N } = m.contentRect;
|
|
2001
|
+
if (o.value && d > 0 && N > 0) {
|
|
2002
|
+
const b = o.value.getSize();
|
|
2003
|
+
(Math.abs(b.width - d) > 1 || Math.abs(b.height - N) > 1) && (s = !0, requestAnimationFrame(() => {
|
|
2004
|
+
var _, z, R, M, k;
|
|
2005
|
+
(_ = o.value) == null || _.resize(d, N), h.value && ((R = (z = r.config) == null ? void 0 : z.canvas) != null && R.fitView) && ((M = o.value) == null || M.zoomToFit({ padding: 20 }), (k = o.value) == null || k.centerContent(), h.value = !1), s = !1;
|
|
2001
2006
|
}));
|
|
2002
2007
|
}
|
|
2003
2008
|
}
|
|
2004
2009
|
}), se.observe(i.value);
|
|
2005
2010
|
};
|
|
2006
|
-
return
|
|
2007
|
-
|
|
2008
|
-
|
|
2009
|
-
|
|
2011
|
+
return At(() => {
|
|
2012
|
+
Xe(() => {
|
|
2013
|
+
O(), Pt();
|
|
2014
|
+
});
|
|
2015
|
+
}), Rt(() => {
|
|
2016
|
+
se && (se.disconnect(), se = null), o.value && (o.value._middlePanCleanup && o.value._middlePanCleanup(), o.value._rubberbandCleanup && o.value._rubberbandCleanup(), o.value.dispose());
|
|
2010
2017
|
}), t({
|
|
2011
2018
|
graph: o,
|
|
2012
|
-
zoomIn:
|
|
2013
|
-
zoomOut:
|
|
2014
|
-
fitContent:
|
|
2015
|
-
}), (s,
|
|
2019
|
+
zoomIn: ie,
|
|
2020
|
+
zoomOut: ke,
|
|
2021
|
+
fitContent: Ce
|
|
2022
|
+
}), (s, v) => (w(), P("div", {
|
|
2016
2023
|
class: "flow-board-wrapper",
|
|
2017
2024
|
style: ce({ width: e.width, height: e.height })
|
|
2018
2025
|
}, [
|
|
2019
|
-
|
|
2026
|
+
B("div", {
|
|
2020
2027
|
ref_key: "graphRef",
|
|
2021
2028
|
ref: i,
|
|
2022
2029
|
class: "flow-board-container"
|
|
2023
2030
|
}, null, 512),
|
|
2024
|
-
x.value ? (
|
|
2031
|
+
x.value ? (w(), P("div", {
|
|
2025
2032
|
key: 0,
|
|
2026
2033
|
class: "rubberband-box",
|
|
2027
2034
|
style: ce(S.value)
|
|
2028
2035
|
}, null, 4)) : q("", !0),
|
|
2029
|
-
e.showControls ? (
|
|
2030
|
-
|
|
2031
|
-
zoomIn:
|
|
2032
|
-
zoomOut:
|
|
2033
|
-
fitContent:
|
|
2036
|
+
e.showControls ? (w(), P("div", xo, [
|
|
2037
|
+
Y(s.$slots, "controls", {
|
|
2038
|
+
zoomIn: ie,
|
|
2039
|
+
zoomOut: ke,
|
|
2040
|
+
fitContent: Ce
|
|
2034
2041
|
}, () => [
|
|
2035
|
-
|
|
2042
|
+
U(f(po), null, {
|
|
2036
2043
|
default: Z(() => [
|
|
2037
|
-
|
|
2038
|
-
icon:
|
|
2039
|
-
onClick:
|
|
2044
|
+
U(f(Be), {
|
|
2045
|
+
icon: f(Xt),
|
|
2046
|
+
onClick: ie,
|
|
2040
2047
|
title: "放大"
|
|
2041
2048
|
}, null, 8, ["icon"]),
|
|
2042
|
-
|
|
2043
|
-
icon:
|
|
2044
|
-
onClick:
|
|
2049
|
+
U(f(Be), {
|
|
2050
|
+
icon: f(Jt),
|
|
2051
|
+
onClick: ke,
|
|
2045
2052
|
title: "缩小"
|
|
2046
2053
|
}, null, 8, ["icon"]),
|
|
2047
|
-
|
|
2048
|
-
icon:
|
|
2049
|
-
onClick:
|
|
2054
|
+
U(f(Be), {
|
|
2055
|
+
icon: f(Kt),
|
|
2056
|
+
onClick: Ce,
|
|
2050
2057
|
title: "适应画布"
|
|
2051
2058
|
}, null, 8, ["icon"])
|
|
2052
2059
|
]),
|
|
@@ -2054,48 +2061,48 @@ const mo = je(bo), ot = {
|
|
|
2054
2061
|
})
|
|
2055
2062
|
], !0)
|
|
2056
2063
|
])) : q("", !0),
|
|
2057
|
-
l.value ?
|
|
2064
|
+
l.value ? Y(s.$slots, "node-tooltip", {
|
|
2058
2065
|
key: 2,
|
|
2059
2066
|
node: l.value,
|
|
2060
2067
|
position: p.value
|
|
2061
2068
|
}, () => [
|
|
2062
|
-
|
|
2069
|
+
B("div", {
|
|
2063
2070
|
class: "default-tooltip",
|
|
2064
2071
|
style: ce({ left: p.value.x + "px", top: p.value.y + "px" })
|
|
2065
2072
|
}, [
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2073
|
+
B("div", So, [
|
|
2074
|
+
B("span", ko, ve(l.value.label), 1),
|
|
2075
|
+
U(f(wo), {
|
|
2069
2076
|
size: "small",
|
|
2070
|
-
type:
|
|
2077
|
+
type: F(l.value.status)
|
|
2071
2078
|
}, {
|
|
2072
2079
|
default: Z(() => [
|
|
2073
|
-
|
|
2080
|
+
It(ve(l.value.status), 1)
|
|
2074
2081
|
]),
|
|
2075
2082
|
_: 1
|
|
2076
2083
|
}, 8, ["type"])
|
|
2077
2084
|
]),
|
|
2078
|
-
l.value.data ? (
|
|
2079
|
-
(
|
|
2080
|
-
key:
|
|
2085
|
+
l.value.data ? (w(), P("div", Co, [
|
|
2086
|
+
(w(!0), P(ut, null, Lt(l.value.data, (m, d) => (w(), P("div", {
|
|
2087
|
+
key: d,
|
|
2081
2088
|
class: "tooltip-item"
|
|
2082
2089
|
}, [
|
|
2083
|
-
|
|
2084
|
-
|
|
2090
|
+
B("span", Mo, ve(d) + ":", 1),
|
|
2091
|
+
B("span", To, ve(m), 1)
|
|
2085
2092
|
]))), 128))
|
|
2086
2093
|
])) : q("", !0)
|
|
2087
2094
|
], 4)
|
|
2088
2095
|
], !0) : q("", !0)
|
|
2089
2096
|
], 4));
|
|
2090
2097
|
}
|
|
2091
|
-
}),
|
|
2098
|
+
}), $o = (e, t) => {
|
|
2092
2099
|
const n = e.__vccOpts || e;
|
|
2093
2100
|
for (const [r, a] of t)
|
|
2094
2101
|
n[r] = a;
|
|
2095
2102
|
return n;
|
|
2096
|
-
},
|
|
2103
|
+
}, Bo = /* @__PURE__ */ $o(Po, [["__scopeId", "data-v-6d641f4e"]]);
|
|
2097
2104
|
export {
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2105
|
+
lt as DEFAULT_SHAPE_STYLES,
|
|
2106
|
+
Bo as FlowBoard,
|
|
2107
|
+
Bo as default
|
|
2101
2108
|
};
|