vcomp-test 0.0.3 → 0.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/vcomp.es.js CHANGED
@@ -1,1086 +1,217 @@
1
- import { getCurrentInstance as K, inject as $, ref as T, computed as c, unref as l, readonly as Qt, getCurrentScope as en, onScopeDispose as tn, watch as le, onMounted as ut, isRef as nn, warn as rn, provide as ft, defineComponent as N, createElementBlock as O, openBlock as m, mergeProps as dt, renderSlot as F, createElementVNode as R, normalizeClass as P, createVNode as Be, Transition as pt, withCtx as D, withDirectives as ht, normalizeStyle as gt, createTextVNode as ze, toDisplayString as ye, vShow as vt, useSlots as on, Text as an, createBlock as A, resolveDynamicComponent as he, createCommentVNode as q, Fragment as mt, reactive as sn, toRef as Ze, shallowReactive as bt, withModifiers as ln, nextTick as cn, isVNode as yt, render as Je } from "vue";
2
- const _t = /* @__PURE__ */ Symbol(), ge = "el", un = "is-", V = (e, t, n, r, o) => {
3
- let a = `${e}-${t}`;
4
- return n && (a += `-${n}`), r && (a += `__${r}`), o && (a += `--${o}`), a;
5
- }, wt = /* @__PURE__ */ Symbol("namespaceContextKey"), fn = (e) => {
6
- const t = e || (K() ? $(wt, T(ge)) : T(ge));
7
- return c(() => l(t) || ge);
8
- }, Q = (e, t) => {
9
- const n = fn(t);
1
+ import { getCurrentInstance as Z, inject as w, ref as E, computed as h, unref as g, warn as Bt, defineComponent as I, createElementBlock as P, openBlock as S, mergeProps as lt, renderSlot as R, createElementVNode as At, watch as Et, useSlots as Ht, Text as Ct, createBlock as B, resolveDynamicComponent as G, withCtx as V, createCommentVNode as tt, Fragment as It, normalizeClass as W, provide as Rt, reactive as Vt, toRef as et, createTextVNode as ft, toDisplayString as dt } from "vue";
2
+ import { ElMessage as ht } from "element-plus";
3
+ const Pt = /* @__PURE__ */ Symbol(), D = "el", Tt = "is-", N = (t, r, e, n, a) => {
4
+ let o = `${t}-${r}`;
5
+ return e && (o += `-${e}`), n && (o += `__${n}`), a && (o += `--${a}`), o;
6
+ }, Ot = /* @__PURE__ */ Symbol("namespaceContextKey"), zt = (t) => {
7
+ const r = Z() ? w(Ot, E(D)) : E(D);
8
+ return h(() => g(r) || D);
9
+ }, F = (t, r) => {
10
+ const e = zt();
10
11
  return {
11
- namespace: n,
12
- b: (u = "") => V(n.value, e, u, "", ""),
13
- e: (u) => u ? V(n.value, e, "", u, "") : "",
14
- m: (u) => u ? V(n.value, e, "", "", u) : "",
15
- be: (u, v) => u && v ? V(n.value, e, u, v, "") : "",
16
- em: (u, v) => u && v ? V(n.value, e, "", u, v) : "",
17
- bm: (u, v) => u && v ? V(n.value, e, u, "", v) : "",
18
- bem: (u, v, d) => u && v && d ? V(n.value, e, u, v, d) : "",
19
- is: (u, ...v) => {
20
- const d = v.length >= 1 ? v[0] : !0;
21
- return u && d ? `${un}${u}` : "";
12
+ namespace: e,
13
+ b: (c = "") => N(e.value, t, c, "", ""),
14
+ e: (c) => c ? N(e.value, t, "", c, "") : "",
15
+ m: (c) => c ? N(e.value, t, "", "", c) : "",
16
+ be: (c, d) => c && d ? N(e.value, t, c, d, "") : "",
17
+ em: (c, d) => c && d ? N(e.value, t, "", c, d) : "",
18
+ bm: (c, d) => c && d ? N(e.value, t, c, "", d) : "",
19
+ bem: (c, d, u) => c && d && u ? N(e.value, t, c, d, u) : "",
20
+ is: (c, ...d) => {
21
+ const u = d.length >= 1 ? d[0] : !0;
22
+ return c && u ? `${Tt}${c}` : "";
22
23
  },
23
- cssVar: (u) => {
24
- const v = {};
25
- for (const d in u)
26
- u[d] && (v[`--${n.value}-${d}`] = u[d]);
27
- return v;
24
+ cssVar: (c) => {
25
+ const d = {};
26
+ for (const u in c)
27
+ c[u] && (d[`--${e.value}-${u}`] = c[u]);
28
+ return d;
28
29
  },
29
- cssVarName: (u) => `--${n.value}-${u}`,
30
- cssVarBlock: (u) => {
31
- const v = {};
32
- for (const d in u)
33
- u[d] && (v[`--${n.value}-${e}-${d}`] = u[d]);
34
- return v;
30
+ cssVarName: (c) => `--${e.value}-${c}`,
31
+ cssVarBlock: (c) => {
32
+ const d = {};
33
+ for (const u in c)
34
+ c[u] && (d[`--${e.value}-${t}-${u}`] = c[u]);
35
+ return d;
35
36
  },
36
- cssVarBlockName: (u) => `--${n.value}-${e}-${u}`
37
+ cssVarBlockName: (c) => `--${e.value}-${t}-${c}`
37
38
  };
38
39
  };
39
40
  process.env.NODE_ENV !== "production" && Object.freeze({});
40
41
  process.env.NODE_ENV !== "production" && Object.freeze([]);
41
- const dn = () => {
42
- }, pn = Object.prototype.hasOwnProperty, Ne = (e, t) => pn.call(e, t), hn = Array.isArray, ve = (e) => typeof e == "function", ee = (e) => typeof e == "string", St = (e) => e !== null && typeof e == "object";
43
- var gn = typeof global == "object" && global && global.Object === Object && global, vn = typeof self == "object" && self && self.Object === Object && self, je = gn || vn || Function("return this")(), X = je.Symbol, xt = Object.prototype, mn = xt.hasOwnProperty, bn = xt.toString, se = X ? X.toStringTag : void 0;
44
- function yn(e) {
45
- var t = mn.call(e, se), n = e[se];
46
- try {
47
- e[se] = void 0;
48
- var r = !0;
49
- } catch {
42
+ const Ft = () => {
43
+ }, jt = Object.prototype.hasOwnProperty, rt = (t, r) => jt.call(t, r), Y = (t) => typeof t == "string", gt = (t) => t !== null && typeof t == "object";
44
+ function Gt(t) {
45
+ for (var r = -1, e = t == null ? 0 : t.length, n = {}; ++r < e; ) {
46
+ var a = t[r];
47
+ n[a[0]] = a[1];
50
48
  }
51
- var o = bn.call(e);
52
- return r && (t ? e[se] = n : delete e[se]), o;
53
- }
54
- var _n = Object.prototype, wn = _n.toString;
55
- function Sn(e) {
56
- return wn.call(e);
57
- }
58
- var xn = "[object Null]", Cn = "[object Undefined]", qe = X ? X.toStringTag : void 0;
59
- function Ct(e) {
60
- return e == null ? e === void 0 ? Cn : xn : qe && qe in Object(e) ? yn(e) : Sn(e);
61
- }
62
- function kn(e) {
63
- return e != null && typeof e == "object";
64
- }
65
- var Tn = "[object Symbol]";
66
- function Fe(e) {
67
- return typeof e == "symbol" || kn(e) && Ct(e) == Tn;
68
- }
69
- function Mn(e, t) {
70
- for (var n = -1, r = e == null ? 0 : e.length, o = Array(r); ++n < r; )
71
- o[n] = t(e[n], n, e);
72
- return o;
73
- }
74
- var De = Array.isArray, Ye = X ? X.prototype : void 0, Xe = Ye ? Ye.toString : void 0;
75
- function kt(e) {
76
- if (typeof e == "string")
77
- return e;
78
- if (De(e))
79
- return Mn(e, kt) + "";
80
- if (Fe(e))
81
- return Xe ? Xe.call(e) : "";
82
- var t = e + "";
83
- return t == "0" && 1 / e == -1 / 0 ? "-0" : t;
84
- }
85
- function Tt(e) {
86
- var t = typeof e;
87
- return e != null && (t == "object" || t == "function");
88
- }
89
- var Nn = "[object AsyncFunction]", En = "[object Function]", $n = "[object GeneratorFunction]", On = "[object Proxy]";
90
- function An(e) {
91
- if (!Tt(e))
92
- return !1;
93
- var t = Ct(e);
94
- return t == En || t == $n || t == Nn || t == On;
95
- }
96
- var xe = je["__core-js_shared__"], Qe = (function() {
97
- var e = /[^.]+$/.exec(xe && xe.keys && xe.keys.IE_PROTO || "");
98
- return e ? "Symbol(src)_1." + e : "";
99
- })();
100
- function In(e) {
101
- return !!Qe && Qe in e;
102
- }
103
- var Pn = Function.prototype, Bn = Pn.toString;
104
- function zn(e) {
105
- if (e != null) {
106
- try {
107
- return Bn.call(e);
108
- } catch {
109
- }
110
- try {
111
- return e + "";
112
- } catch {
113
- }
114
- }
115
- return "";
116
- }
117
- var jn = /[\\^$.*+?()[\]{}|]/g, Fn = /^\[object .+?Constructor\]$/, Dn = Function.prototype, Rn = Object.prototype, Hn = Dn.toString, Ln = Rn.hasOwnProperty, Vn = RegExp(
118
- "^" + Hn.call(Ln).replace(jn, "\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, "$1.*?") + "$"
119
- );
120
- function Gn(e) {
121
- if (!Tt(e) || In(e))
122
- return !1;
123
- var t = An(e) ? Vn : Fn;
124
- return t.test(zn(e));
125
- }
126
- function Kn(e, t) {
127
- return e?.[t];
128
- }
129
- function Mt(e, t) {
130
- var n = Kn(e, t);
131
- return Gn(n) ? n : void 0;
132
- }
133
- function Un(e, t) {
134
- return e === t || e !== e && t !== t;
135
- }
136
- var Wn = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/, Zn = /^\w*$/;
137
- function Jn(e, t) {
138
- if (De(e))
139
- return !1;
140
- var n = typeof e;
141
- return n == "number" || n == "symbol" || n == "boolean" || e == null || Fe(e) ? !0 : Zn.test(e) || !Wn.test(e) || t != null && e in Object(t);
142
- }
143
- var ie = Mt(Object, "create");
144
- function qn() {
145
- this.__data__ = ie ? ie(null) : {}, this.size = 0;
146
- }
147
- function Yn(e) {
148
- var t = this.has(e) && delete this.__data__[e];
149
- return this.size -= t ? 1 : 0, t;
150
- }
151
- var Xn = "__lodash_hash_undefined__", Qn = Object.prototype, er = Qn.hasOwnProperty;
152
- function tr(e) {
153
- var t = this.__data__;
154
- if (ie) {
155
- var n = t[e];
156
- return n === Xn ? void 0 : n;
157
- }
158
- return er.call(t, e) ? t[e] : void 0;
159
- }
160
- var nr = Object.prototype, rr = nr.hasOwnProperty;
161
- function or(e) {
162
- var t = this.__data__;
163
- return ie ? t[e] !== void 0 : rr.call(t, e);
164
- }
165
- var ar = "__lodash_hash_undefined__";
166
- function sr(e, t) {
167
- var n = this.__data__;
168
- return this.size += this.has(e) ? 0 : 1, n[e] = ie && t === void 0 ? ar : t, this;
169
- }
170
- function U(e) {
171
- var t = -1, n = e == null ? 0 : e.length;
172
- for (this.clear(); ++t < n; ) {
173
- var r = e[t];
174
- this.set(r[0], r[1]);
175
- }
176
- }
177
- U.prototype.clear = qn;
178
- U.prototype.delete = Yn;
179
- U.prototype.get = tr;
180
- U.prototype.has = or;
181
- U.prototype.set = sr;
182
- function ir() {
183
- this.__data__ = [], this.size = 0;
184
- }
185
- function _e(e, t) {
186
- for (var n = e.length; n--; )
187
- if (Un(e[n][0], t))
188
- return n;
189
- return -1;
190
- }
191
- var lr = Array.prototype, cr = lr.splice;
192
- function ur(e) {
193
- var t = this.__data__, n = _e(t, e);
194
- if (n < 0)
195
- return !1;
196
- var r = t.length - 1;
197
- return n == r ? t.pop() : cr.call(t, n, 1), --this.size, !0;
198
- }
199
- function fr(e) {
200
- var t = this.__data__, n = _e(t, e);
201
- return n < 0 ? void 0 : t[n][1];
202
- }
203
- function dr(e) {
204
- return _e(this.__data__, e) > -1;
205
- }
206
- function pr(e, t) {
207
- var n = this.__data__, r = _e(n, e);
208
- return r < 0 ? (++this.size, n.push([e, t])) : n[r][1] = t, this;
209
- }
210
- function te(e) {
211
- var t = -1, n = e == null ? 0 : e.length;
212
- for (this.clear(); ++t < n; ) {
213
- var r = e[t];
214
- this.set(r[0], r[1]);
215
- }
216
- }
217
- te.prototype.clear = ir;
218
- te.prototype.delete = ur;
219
- te.prototype.get = fr;
220
- te.prototype.has = dr;
221
- te.prototype.set = pr;
222
- var hr = Mt(je, "Map");
223
- function gr() {
224
- this.size = 0, this.__data__ = {
225
- hash: new U(),
226
- map: new (hr || te)(),
227
- string: new U()
228
- };
229
- }
230
- function vr(e) {
231
- var t = typeof e;
232
- return t == "string" || t == "number" || t == "symbol" || t == "boolean" ? e !== "__proto__" : e === null;
233
- }
234
- function we(e, t) {
235
- var n = e.__data__;
236
- return vr(t) ? n[typeof t == "string" ? "string" : "hash"] : n.map;
237
- }
238
- function mr(e) {
239
- var t = we(this, e).delete(e);
240
- return this.size -= t ? 1 : 0, t;
241
- }
242
- function br(e) {
243
- return we(this, e).get(e);
244
- }
245
- function yr(e) {
246
- return we(this, e).has(e);
247
- }
248
- function _r(e, t) {
249
- var n = we(this, e), r = n.size;
250
- return n.set(e, t), this.size += n.size == r ? 0 : 1, this;
251
- }
252
- function J(e) {
253
- var t = -1, n = e == null ? 0 : e.length;
254
- for (this.clear(); ++t < n; ) {
255
- var r = e[t];
256
- this.set(r[0], r[1]);
257
- }
258
- }
259
- J.prototype.clear = gr;
260
- J.prototype.delete = mr;
261
- J.prototype.get = br;
262
- J.prototype.has = yr;
263
- J.prototype.set = _r;
264
- var wr = "Expected a function";
265
- function Re(e, t) {
266
- if (typeof e != "function" || t != null && typeof t != "function")
267
- throw new TypeError(wr);
268
- var n = function() {
269
- var r = arguments, o = t ? t.apply(this, r) : r[0], a = n.cache;
270
- if (a.has(o))
271
- return a.get(o);
272
- var s = e.apply(this, r);
273
- return n.cache = a.set(o, s) || a, s;
274
- };
275
- return n.cache = new (Re.Cache || J)(), n;
276
- }
277
- Re.Cache = J;
278
- var Sr = 500;
279
- function xr(e) {
280
- var t = Re(e, function(r) {
281
- return n.size === Sr && n.clear(), r;
282
- }), n = t.cache;
283
- return t;
284
- }
285
- var Cr = /[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g, kr = /\\(\\)?/g, Tr = xr(function(e) {
286
- var t = [];
287
- return e.charCodeAt(0) === 46 && t.push(""), e.replace(Cr, function(n, r, o, a) {
288
- t.push(o ? a.replace(kr, "$1") : r || n);
289
- }), t;
290
- });
291
- function Mr(e) {
292
- return e == null ? "" : kt(e);
293
- }
294
- function Nr(e, t) {
295
- return De(e) ? e : Jn(e, t) ? [e] : Tr(Mr(e));
296
- }
297
- function Er(e) {
298
- if (typeof e == "string" || Fe(e))
299
- return e;
300
- var t = e + "";
301
- return t == "0" && 1 / e == -1 / 0 ? "-0" : t;
302
- }
303
- function $r(e, t) {
304
- t = Nr(t, e);
305
- for (var n = 0, r = t.length; e != null && n < r; )
306
- e = e[Er(t[n++])];
307
- return n && n == r ? e : void 0;
308
- }
309
- function Or(e, t, n) {
310
- var r = e == null ? void 0 : $r(e, t);
311
- return r === void 0 ? n : r;
312
- }
313
- function Ar(e) {
314
- for (var t = -1, n = e == null ? 0 : e.length, r = {}; ++t < n; ) {
315
- var o = e[t];
316
- r[o[0]] = o[1];
317
- }
318
- return r;
319
- }
320
- const Ce = (e) => typeof e == "boolean", W = (e) => typeof e == "number", Ir = (e) => typeof Element > "u" ? !1 : e instanceof Element, Pr = (e) => ee(e) ? !Number.isNaN(Number(e)) : !1;
321
- function He(e) {
322
- return en() ? (tn(e), !0) : !1;
323
- }
324
- function Le(e) {
325
- return typeof e == "function" ? e() : l(e);
326
- }
327
- const ne = typeof window < "u" && typeof document < "u";
328
- typeof WorkerGlobalScope < "u" && globalThis instanceof WorkerGlobalScope;
329
- const Br = Object.prototype.toString, zr = (e) => Br.call(e) === "[object Object]", jr = () => {
330
- };
331
- function Fr(e, t, n = {}) {
332
- const {
333
- immediate: r = !0
334
- } = n, o = T(!1);
335
- let a = null;
336
- function s() {
337
- a && (clearTimeout(a), a = null);
338
- }
339
- function i() {
340
- o.value = !1, s();
341
- }
342
- function f(...b) {
343
- s(), o.value = !0, a = setTimeout(() => {
344
- o.value = !1, a = null, e(...b);
345
- }, Le(t));
346
- }
347
- return r && (o.value = !0, ne && f()), He(i), {
348
- isPending: Qt(o),
349
- start: f,
350
- stop: i
351
- };
352
- }
353
- function Ee(e) {
354
- var t;
355
- const n = Le(e);
356
- return (t = n?.$el) != null ? t : n;
357
- }
358
- const Nt = ne ? window : void 0;
359
- function Dr(...e) {
360
- let t, n, r, o;
361
- if (typeof e[0] == "string" || Array.isArray(e[0]) ? ([n, r, o] = e, t = Nt) : [t, n, r, o] = e, !t)
362
- return jr;
363
- Array.isArray(n) || (n = [n]), Array.isArray(r) || (r = [r]);
364
- const a = [], s = () => {
365
- a.forEach((h) => h()), a.length = 0;
366
- }, i = (h, g, _, M) => (h.addEventListener(g, _, M), () => h.removeEventListener(g, _, M)), f = le(
367
- () => [Ee(t), Le(o)],
368
- ([h, g]) => {
369
- if (s(), !h)
370
- return;
371
- const _ = zr(g) ? { ...g } : g;
372
- a.push(
373
- ...n.flatMap((M) => r.map((z) => i(h, M, z, _)))
374
- );
375
- },
376
- { immediate: !0, flush: "post" }
377
- ), b = () => {
378
- f(), s();
379
- };
380
- return He(b), b;
381
- }
382
- function Rr() {
383
- const e = T(!1), t = K();
384
- return t && ut(() => {
385
- e.value = !0;
386
- }, t), e;
387
- }
388
- function Hr(e) {
389
- const t = Rr();
390
- return c(() => (t.value, !!e()));
391
- }
392
- function Lr(e, t, n = {}) {
393
- const { window: r = Nt, ...o } = n;
394
- let a;
395
- const s = Hr(() => r && "ResizeObserver" in r), i = () => {
396
- a && (a.disconnect(), a = void 0);
397
- }, f = c(() => Array.isArray(e) ? e.map((g) => Ee(g)) : [Ee(e)]), b = le(
398
- f,
399
- (g) => {
400
- if (i(), s.value && r) {
401
- a = new ResizeObserver(t);
402
- for (const _ of g)
403
- _ && a.observe(_, o);
404
- }
405
- },
406
- { immediate: !0, flush: "post" }
407
- ), h = () => {
408
- i(), b();
409
- };
410
- return He(h), {
411
- isSupported: s,
412
- stop: h
413
- };
49
+ return n;
414
50
  }
415
- class Vr extends Error {
416
- constructor(t) {
417
- super(t), this.name = "ElementPlusError";
51
+ const Dt = (t) => typeof t == "number", Kt = (t) => Y(t) ? !Number.isNaN(Number(t)) : !1;
52
+ class Lt extends Error {
53
+ constructor(r) {
54
+ super(r), this.name = "ElementPlusError";
418
55
  }
419
56
  }
420
- function re(e, t) {
57
+ function vt(t, r) {
421
58
  if (process.env.NODE_ENV !== "production") {
422
- const n = ee(e) ? new Vr(`[${e}] ${t}`) : e;
423
- console.warn(n);
59
+ const e = Y(t) ? new Lt(`[${t}] ${r}`) : t;
60
+ console.warn(e);
424
61
  }
425
62
  }
426
- const et = {
427
- current: 0
428
- }, tt = T(0), Et = 2e3, nt = /* @__PURE__ */ Symbol("elZIndexContextKey"), $t = /* @__PURE__ */ Symbol("zIndexContextKey"), Gr = (e) => {
429
- const t = K() ? $(nt, et) : et, n = e || (K() ? $($t, void 0) : void 0), r = c(() => {
430
- const s = l(n);
431
- return W(s) ? s : Et;
432
- }), o = c(() => r.value + tt.value), a = () => (t.current++, tt.value = t.current, o.value);
433
- return !ne && !$(nt) && re(
434
- "ZIndexInjection",
435
- `Looks like you are using server rendering, you must provide a z-index provider to ensure the hydration process to be succeed
436
- usage: app.provide(ZINDEX_INJECTION_KEY, { current: 0 })`
437
- ), {
438
- initialZIndex: r,
439
- currentZIndex: o,
440
- nextZIndex: a
441
- };
442
- };
443
- var Kr = {
444
- name: "en",
445
- el: {
446
- breadcrumb: {
447
- label: "Breadcrumb"
448
- },
449
- colorpicker: {
450
- confirm: "OK",
451
- clear: "Clear",
452
- defaultLabel: "color picker",
453
- description: "current color is {color}. press enter to select a new color.",
454
- alphaLabel: "pick alpha value",
455
- alphaDescription: "alpha {alpha}, current color is {color}",
456
- hueLabel: "pick hue value",
457
- hueDescription: "hue {hue}, current color is {color}",
458
- svLabel: "pick saturation and brightness value",
459
- svDescription: "saturation {saturation}, brightness {brightness}, current color is {color}",
460
- predefineDescription: "select {value} as the color"
461
- },
462
- datepicker: {
463
- now: "Now",
464
- today: "Today",
465
- cancel: "Cancel",
466
- clear: "Clear",
467
- confirm: "OK",
468
- dateTablePrompt: "Use the arrow keys and enter to select the day of the month",
469
- monthTablePrompt: "Use the arrow keys and enter to select the month",
470
- yearTablePrompt: "Use the arrow keys and enter to select the year",
471
- selectedDate: "Selected date",
472
- selectDate: "Select date",
473
- selectTime: "Select time",
474
- startDate: "Start Date",
475
- startTime: "Start Time",
476
- endDate: "End Date",
477
- endTime: "End Time",
478
- prevYear: "Previous Year",
479
- nextYear: "Next Year",
480
- prevMonth: "Previous Month",
481
- nextMonth: "Next Month",
482
- year: "",
483
- month1: "January",
484
- month2: "February",
485
- month3: "March",
486
- month4: "April",
487
- month5: "May",
488
- month6: "June",
489
- month7: "July",
490
- month8: "August",
491
- month9: "September",
492
- month10: "October",
493
- month11: "November",
494
- month12: "December",
495
- weeks: {
496
- sun: "Sun",
497
- mon: "Mon",
498
- tue: "Tue",
499
- wed: "Wed",
500
- thu: "Thu",
501
- fri: "Fri",
502
- sat: "Sat"
503
- },
504
- weeksFull: {
505
- sun: "Sunday",
506
- mon: "Monday",
507
- tue: "Tuesday",
508
- wed: "Wednesday",
509
- thu: "Thursday",
510
- fri: "Friday",
511
- sat: "Saturday"
512
- },
513
- months: {
514
- jan: "Jan",
515
- feb: "Feb",
516
- mar: "Mar",
517
- apr: "Apr",
518
- may: "May",
519
- jun: "Jun",
520
- jul: "Jul",
521
- aug: "Aug",
522
- sep: "Sep",
523
- oct: "Oct",
524
- nov: "Nov",
525
- dec: "Dec"
526
- }
527
- },
528
- inputNumber: {
529
- decrease: "decrease number",
530
- increase: "increase number"
531
- },
532
- select: {
533
- loading: "Loading",
534
- noMatch: "No matching data",
535
- noData: "No data",
536
- placeholder: "Select"
537
- },
538
- mention: {
539
- loading: "Loading"
540
- },
541
- dropdown: {
542
- toggleDropdown: "Toggle Dropdown"
543
- },
544
- cascader: {
545
- noMatch: "No matching data",
546
- loading: "Loading",
547
- placeholder: "Select",
548
- noData: "No data"
549
- },
550
- pagination: {
551
- goto: "Go to",
552
- pagesize: "/page",
553
- total: "Total {total}",
554
- pageClassifier: "",
555
- page: "Page",
556
- prev: "Go to previous page",
557
- next: "Go to next page",
558
- currentPage: "page {pager}",
559
- prevPages: "Previous {pager} pages",
560
- nextPages: "Next {pager} pages",
561
- deprecationWarning: "Deprecated usages detected, please refer to the el-pagination documentation for more details"
562
- },
563
- dialog: {
564
- close: "Close this dialog"
565
- },
566
- drawer: {
567
- close: "Close this dialog"
568
- },
569
- messagebox: {
570
- title: "Message",
571
- confirm: "OK",
572
- cancel: "Cancel",
573
- error: "Illegal input",
574
- close: "Close this dialog"
575
- },
576
- upload: {
577
- deleteTip: "press delete to remove",
578
- delete: "Delete",
579
- preview: "Preview",
580
- continue: "Continue"
581
- },
582
- slider: {
583
- defaultLabel: "slider between {min} and {max}",
584
- defaultRangeStartLabel: "pick start value",
585
- defaultRangeEndLabel: "pick end value"
586
- },
587
- table: {
588
- emptyText: "No Data",
589
- confirmFilter: "Confirm",
590
- resetFilter: "Reset",
591
- clearFilter: "All",
592
- sumText: "Sum",
593
- selectAllLabel: "Select all rows",
594
- selectRowLabel: "Select this row",
595
- expandRowLabel: "Expand this row",
596
- collapseRowLabel: "Collapse this row",
597
- sortLabel: "Sort by {column}",
598
- filterLabel: "Filter by {column}"
599
- },
600
- tag: {
601
- close: "Close this tag"
602
- },
603
- tour: {
604
- next: "Next",
605
- previous: "Previous",
606
- finish: "Finish",
607
- close: "Close this dialog"
608
- },
609
- tree: {
610
- emptyText: "No Data"
611
- },
612
- transfer: {
613
- noMatch: "No matching data",
614
- noData: "No data",
615
- titles: ["List 1", "List 2"],
616
- filterPlaceholder: "Enter keyword",
617
- noCheckedFormat: "{total} items",
618
- hasCheckedFormat: "{checked}/{total} checked"
619
- },
620
- image: {
621
- error: "FAILED"
622
- },
623
- pageHeader: {
624
- title: "Back"
625
- },
626
- popconfirm: {
627
- confirmButtonText: "Yes",
628
- cancelButtonText: "No"
629
- },
630
- carousel: {
631
- leftArrow: "Carousel arrow left",
632
- rightArrow: "Carousel arrow right",
633
- indicator: "Carousel switch to index {index}"
634
- }
635
- }
636
- };
637
- const Ur = (e) => (t, n) => Wr(t, n, l(e)), Wr = (e, t, n) => Or(n, e, e).replace(
638
- /\{(\w+)\}/g,
639
- (r, o) => {
640
- var a;
641
- return `${(a = t?.[o]) != null ? a : `{${o}}`}`;
642
- }
643
- ), Zr = (e) => {
644
- const t = c(() => l(e).name), n = nn(e) ? e : T(e);
645
- return {
646
- lang: t,
647
- locale: n,
648
- t: Ur(e)
649
- };
650
- }, Ot = /* @__PURE__ */ Symbol("localeContextKey"), Jr = (e) => {
651
- const t = e || $(Ot, T());
652
- return Zr(c(() => t.value || Kr));
653
- }, At = "__epPropKey", k = (e) => e, qr = (e) => St(e) && !!e[At], It = (e, t) => {
654
- if (!St(e) || qr(e))
655
- return e;
656
- const { values: n, required: r, default: o, type: a, validator: s } = e, f = {
657
- type: a,
658
- required: !!r,
659
- validator: n || s ? (b) => {
660
- let h = !1, g = [];
661
- if (n && (g = Array.from(n), Ne(e, "default") && g.push(o), h || (h = g.includes(b))), s && (h || (h = s(b))), !h && g.length > 0) {
662
- const _ = [...new Set(g)].map((M) => JSON.stringify(M)).join(", ");
663
- rn(
664
- `Invalid prop: validation failed${t ? ` for prop "${t}"` : ""}. Expected one of [${_}], got value ${JSON.stringify(
665
- b
63
+ const pt = "__epPropKey", j = (t) => t, qt = (t) => gt(t) && !!t[pt], bt = (t, r) => {
64
+ if (!gt(t) || qt(t))
65
+ return t;
66
+ const { values: e, required: n, default: a, type: o, validator: i } = t, f = {
67
+ type: o,
68
+ required: !!n,
69
+ validator: e || i ? (m) => {
70
+ let v = !1, _ = [];
71
+ if (e && (_ = Array.from(e), rt(t, "default") && _.push(a), v || (v = _.includes(m))), i && (v || (v = i(m))), !v && _.length > 0) {
72
+ const H = [...new Set(_)].map((C) => JSON.stringify(C)).join(", ");
73
+ Bt(
74
+ `Invalid prop: validation failed${r ? ` for prop "${r}"` : ""}. Expected one of [${H}], got value ${JSON.stringify(
75
+ m
666
76
  )}.`
667
77
  );
668
78
  }
669
- return h;
79
+ return v;
670
80
  } : void 0,
671
- [At]: !0
81
+ [pt]: !0
672
82
  };
673
- return Ne(e, "default") && (f.default = o), f;
674
- }, oe = (e) => Ar(
675
- Object.entries(e).map(([t, n]) => [
676
- t,
677
- It(n, t)
83
+ return rt(t, "default") && (f.default = a), f;
84
+ }, mt = (t) => Gt(
85
+ Object.entries(t).map(([r, e]) => [
86
+ r,
87
+ bt(e, r)
678
88
  ])
679
- ), Yr = ["", "default", "small", "large"], Pt = It({
89
+ ), Wt = ["", "default", "small", "large"], Ut = bt({
680
90
  type: String,
681
- values: Yr,
91
+ values: Wt,
682
92
  required: !1
683
- }), Bt = /* @__PURE__ */ Symbol("size"), Xr = () => {
684
- const e = $(Bt, {});
685
- return c(() => l(e.size) || "");
686
- }, Qr = /* @__PURE__ */ Symbol("emptyValuesContextKey"), eo = oe({
687
- emptyValues: Array,
688
- valueOnClear: {
689
- type: k([
690
- String,
691
- Number,
692
- Boolean,
693
- Function
694
- ]),
695
- default: void 0,
696
- validator: (e) => (e = ve(e) ? e() : e, hn(e) ? e.every((t) => !t) : !e)
697
- }
698
- }), rt = (e) => Object.keys(e), me = T();
699
- function Ve(e, t = void 0) {
700
- const n = K() ? $(_t, me) : me;
701
- return e ? c(() => {
702
- var r, o;
703
- return (o = (r = n.value) == null ? void 0 : r[e]) != null ? o : t;
704
- }) : n;
705
- }
706
- function to(e, t) {
707
- const n = Ve(), r = Q(
708
- e,
709
- c(() => {
710
- var i;
711
- return ((i = n.value) == null ? void 0 : i.namespace) || ge;
712
- })
713
- ), o = Jr(c(() => {
714
- var i;
715
- return (i = n.value) == null ? void 0 : i.locale;
716
- })), a = Gr(
717
- c(() => {
718
- var i;
719
- return ((i = n.value) == null ? void 0 : i.zIndex) || Et;
720
- })
721
- ), s = c(() => {
722
- var i;
723
- return l(t) || ((i = n.value) == null ? void 0 : i.size) || "";
93
+ }), Jt = /* @__PURE__ */ Symbol("size"), Zt = () => {
94
+ const t = w(Jt, {});
95
+ return h(() => g(t.size) || "");
96
+ }, nt = E();
97
+ function Yt(t, r = void 0) {
98
+ const e = Z() ? w(Pt, nt) : nt;
99
+ return h(() => {
100
+ var n, a;
101
+ return (a = (n = e.value) == null ? void 0 : n[t]) != null ? a : r;
724
102
  });
725
- return zt(c(() => l(n) || {})), {
726
- ns: r,
727
- locale: o,
728
- zIndex: a,
729
- size: s
730
- };
731
103
  }
732
- const zt = (e, t, n = !1) => {
733
- var r;
734
- const o = !!K(), a = o ? Ve() : void 0, s = (r = void 0) != null ? r : o ? ft : void 0;
735
- if (!s) {
736
- re(
737
- "provideGlobalConfig",
738
- "provideGlobalConfig() can only be used inside setup()."
739
- );
740
- return;
741
- }
742
- const i = c(() => {
743
- const f = l(e);
744
- return a?.value ? no(a.value, f) : f;
745
- });
746
- return s(_t, i), s(
747
- Ot,
748
- c(() => i.value.locale)
749
- ), s(
750
- wt,
751
- c(() => i.value.namespace)
752
- ), s(
753
- $t,
754
- c(() => i.value.zIndex)
755
- ), s(Bt, {
756
- size: c(() => i.value.size || "")
757
- }), s(
758
- Qr,
759
- c(() => ({
760
- emptyValues: i.value.emptyValues,
761
- valueOnClear: i.value.valueOnClear
762
- }))
763
- ), (n || !me.value) && (me.value = i.value), i;
764
- }, no = (e, t) => {
765
- const n = [.../* @__PURE__ */ new Set([...rt(e), ...rt(t)])], r = {};
766
- for (const o of n)
767
- r[o] = t[o] !== void 0 ? t[o] : e[o];
768
- return r;
769
- };
770
- var ce = (e, t) => {
771
- const n = e.__vccOpts || e;
772
- for (const [r, o] of t)
773
- n[r] = o;
774
- return n;
775
- };
776
- const Ge = (e, t) => {
777
- if (e.install = (n) => {
778
- for (const r of [e, ...Object.values(t ?? {})])
779
- n.component(r.name, r);
780
- }, t)
781
- for (const [n, r] of Object.entries(t))
782
- e[n] = r;
104
+ var Q = (t, r) => {
105
+ const e = t.__vccOpts || t;
106
+ for (const [n, a] of r)
107
+ e[n] = a;
783
108
  return e;
784
- }, ro = (e, t) => (e.install = (n) => {
785
- e._context = n._context, n.config.globalProperties[t] = e;
786
- }, e), oo = (e) => (e.install = dn, e), ao = "utils/dom/style";
787
- function $e(e, t = "px") {
788
- if (!e && e !== 0)
109
+ };
110
+ const yt = (t, r) => {
111
+ if (t.install = (e) => {
112
+ for (const n of [t, ...Object.values(r ?? {})])
113
+ e.component(n.name, n);
114
+ }, r)
115
+ for (const [e, n] of Object.entries(r))
116
+ t[e] = n;
117
+ return t;
118
+ }, Qt = (t) => (t.install = Ft, t), Xt = "utils/dom/style";
119
+ function te(t, r = "px") {
120
+ if (!t && t !== 0)
789
121
  return "";
790
- if (W(e) || Pr(e))
791
- return `${e}${t}`;
792
- if (ee(e))
793
- return e;
794
- re(ao, "binding value must be a string or number");
122
+ if (Dt(t) || Kt(t))
123
+ return `${t}${r}`;
124
+ if (Y(t))
125
+ return t;
126
+ vt(Xt, "binding value must be a string or number");
795
127
  }
796
- const so = oe({
128
+ const ee = mt({
797
129
  size: {
798
- type: k([Number, String])
130
+ type: j([Number, String])
799
131
  },
800
132
  color: {
801
133
  type: String
802
134
  }
803
- }), io = N({
135
+ }), re = I({
804
136
  name: "ElIcon",
805
137
  inheritAttrs: !1,
806
138
  __name: "icon",
807
- props: so,
808
- setup(e) {
809
- const t = e, n = Q("icon"), r = c(() => {
810
- const { size: o, color: a } = t, s = $e(o);
811
- return !s && !a ? {} : {
812
- fontSize: s,
813
- "--color": a
139
+ props: ee,
140
+ setup(t) {
141
+ const r = t, e = F("icon"), n = h(() => {
142
+ const { size: a, color: o } = r, i = te(a);
143
+ return !i && !o ? {} : {
144
+ fontSize: i,
145
+ "--color": o
814
146
  };
815
147
  });
816
- return (o, a) => (m(), O(
148
+ return (a, o) => (S(), P(
817
149
  "i",
818
- dt({
819
- class: l(n).b(),
820
- style: r.value
821
- }, o.$attrs),
150
+ lt({
151
+ class: g(e).b(),
152
+ style: n.value
153
+ }, a.$attrs),
822
154
  [
823
- F(o.$slots, "default")
155
+ R(a.$slots, "default")
824
156
  ],
825
157
  16
826
158
  ));
827
159
  }
828
160
  });
829
- var lo = /* @__PURE__ */ ce(io, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/icon/src/icon.vue"]]);
830
- const be = Ge(lo);
831
- var co = /* @__PURE__ */ N({
832
- name: "CircleCloseFilled",
833
- __name: "circle-close-filled",
834
- setup(e) {
835
- return (t, n) => (m(), O("svg", {
836
- xmlns: "http://www.w3.org/2000/svg",
837
- viewBox: "0 0 1024 1024"
838
- }, [
839
- R("path", {
840
- fill: "currentColor",
841
- d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 393.664L407.936 353.6a38.4 38.4 0 1 0-54.336 54.336L457.664 512 353.6 616.064a38.4 38.4 0 1 0 54.336 54.336L512 566.336 616.064 670.4a38.4 38.4 0 1 0 54.336-54.336L566.336 512 670.4 407.936a38.4 38.4 0 1 0-54.336-54.336z"
842
- })
843
- ]));
844
- }
845
- }), uo = co, fo = /* @__PURE__ */ N({
846
- name: "Close",
847
- __name: "close",
848
- setup(e) {
849
- return (t, n) => (m(), O("svg", {
850
- xmlns: "http://www.w3.org/2000/svg",
851
- viewBox: "0 0 1024 1024"
852
- }, [
853
- R("path", {
854
- fill: "currentColor",
855
- 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"
856
- })
857
- ]));
858
- }
859
- }), po = fo, ho = /* @__PURE__ */ N({
860
- name: "InfoFilled",
861
- __name: "info-filled",
862
- setup(e) {
863
- return (t, n) => (m(), O("svg", {
864
- xmlns: "http://www.w3.org/2000/svg",
865
- viewBox: "0 0 1024 1024"
866
- }, [
867
- R("path", {
868
- fill: "currentColor",
869
- d: "M512 64a448 448 0 1 1 0 896.064A448 448 0 0 1 512 64m67.2 275.072c33.28 0 60.288-23.104 60.288-57.344s-27.072-57.344-60.288-57.344c-33.28 0-60.16 23.104-60.16 57.344s26.88 57.344 60.16 57.344M590.912 699.2c0-6.848 2.368-24.64 1.024-34.752l-52.608 60.544c-10.88 11.456-24.512 19.392-30.912 17.28a12.99 12.99 0 0 1-8.256-14.72l87.68-276.992c7.168-35.136-12.544-67.2-54.336-71.296-44.096 0-108.992 44.736-148.48 101.504 0 6.784-1.28 23.68.064 33.792l52.544-60.608c10.88-11.328 23.552-19.328 29.952-17.152a12.8 12.8 0 0 1 7.808 16.128L388.48 728.576c-10.048 32.256 8.96 63.872 55.04 71.04 67.84 0 107.904-43.648 147.456-100.416z"
870
- })
871
- ]));
872
- }
873
- }), ot = ho, go = /* @__PURE__ */ N({
161
+ var ne = /* @__PURE__ */ Q(re, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/icon/src/icon.vue"]]);
162
+ const at = yt(ne);
163
+ var ae = /* @__PURE__ */ I({
874
164
  name: "Loading",
875
165
  __name: "loading",
876
- setup(e) {
877
- return (t, n) => (m(), O("svg", {
166
+ setup(t) {
167
+ return (r, e) => (S(), P("svg", {
878
168
  xmlns: "http://www.w3.org/2000/svg",
879
169
  viewBox: "0 0 1024 1024"
880
170
  }, [
881
- R("path", {
171
+ At("path", {
882
172
  fill: "currentColor",
883
173
  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"
884
174
  })
885
175
  ]));
886
176
  }
887
- }), vo = go, mo = /* @__PURE__ */ N({
888
- name: "SuccessFilled",
889
- __name: "success-filled",
890
- setup(e) {
891
- return (t, n) => (m(), O("svg", {
892
- xmlns: "http://www.w3.org/2000/svg",
893
- viewBox: "0 0 1024 1024"
894
- }, [
895
- R("path", {
896
- fill: "currentColor",
897
- d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m-55.808 536.384-99.52-99.584a38.4 38.4 0 1 0-54.336 54.336l126.72 126.72a38.27 38.27 0 0 0 54.336 0l262.4-262.464a38.4 38.4 0 1 0-54.272-54.336z"
898
- })
899
- ]));
900
- }
901
- }), bo = mo, yo = /* @__PURE__ */ N({
902
- name: "WarningFilled",
903
- __name: "warning-filled",
904
- setup(e) {
905
- return (t, n) => (m(), O("svg", {
906
- xmlns: "http://www.w3.org/2000/svg",
907
- viewBox: "0 0 1024 1024"
908
- }, [
909
- R("path", {
910
- fill: "currentColor",
911
- d: "M512 64a448 448 0 1 1 0 896 448 448 0 0 1 0-896m0 192a58.43 58.43 0 0 0-58.24 63.744l23.36 256.384a35.072 35.072 0 0 0 69.76 0l23.296-256.384A58.43 58.43 0 0 0 512 256m0 512a51.2 51.2 0 1 0 0-102.4 51.2 51.2 0 0 0 0 102.4"
912
- })
913
- ]));
914
- }
915
- }), _o = yo;
916
- const Oe = k([
177
+ }), oe = ae;
178
+ const ot = j([
917
179
  String,
918
180
  Object,
919
181
  Function
920
- ]), wo = {
921
- Close: po
922
- }, at = {
923
- primary: ot,
924
- success: bo,
925
- warning: _o,
926
- error: uo,
927
- info: ot
928
- }, So = () => ne && /android/i.test(window.navigator.userAgent), xo = (e) => e, Ke = /* @__PURE__ */ Symbol("formContextKey"), jt = /* @__PURE__ */ Symbol("formItemContextKey"), Co = () => {
929
- const e = $(Ke, void 0), t = $(jt, void 0);
182
+ ]), X = /* @__PURE__ */ Symbol("formContextKey"), _t = /* @__PURE__ */ Symbol("formItemContextKey"), ie = () => {
183
+ const t = w(X, void 0), r = w(_t, void 0);
930
184
  return {
931
- form: e,
932
- formItem: t
185
+ form: t,
186
+ formItem: r
933
187
  };
934
- }, Ft = (e) => {
935
- const t = K();
936
- return c(() => {
937
- var n, r;
938
- return (r = (n = t?.proxy) == null ? void 0 : n.$props) == null ? void 0 : r[e];
188
+ }, St = (t) => {
189
+ const r = Z();
190
+ return h(() => {
191
+ var e, n;
192
+ return (n = (e = r?.proxy) == null ? void 0 : e.$props) == null ? void 0 : n[t];
939
193
  });
940
- }, ko = (e, t = {}) => {
941
- const n = T(void 0), r = t.prop ? n : Ft("size"), o = t.global ? n : Xr(), a = t.form ? { size: void 0 } : $(Ke, void 0), s = t.formItem ? { size: void 0 } : $(jt, void 0);
942
- return c(
943
- () => r.value || l(e) || s?.size || a?.size || o.value || ""
194
+ }, se = (t, r = {}) => {
195
+ const e = E(void 0), n = r.prop ? e : St("size"), a = r.global ? e : Zt(), o = r.form ? { size: void 0 } : w(X, void 0), i = r.formItem ? { size: void 0 } : w(_t, void 0);
196
+ return h(
197
+ () => n.value || g(t) || i?.size || o?.size || a.value || ""
944
198
  );
945
- }, Dt = (e) => {
946
- const t = Ft("disabled"), n = $(Ke, void 0);
947
- return c(() => {
948
- var r, o, a;
949
- return (a = (o = (r = t.value) != null ? r : l(e)) != null ? o : n?.disabled) != null ? a : !1;
199
+ }, xt = (t) => {
200
+ const r = St("disabled"), e = w(X, void 0);
201
+ return h(() => {
202
+ var n, a, o;
203
+ return (o = (a = (n = r.value) != null ? n : g(t)) != null ? a : e?.disabled) != null ? o : !1;
950
204
  });
951
- }, Ae = {
952
- tab: "Tab",
953
- enter: "Enter",
954
- space: "Space",
955
- left: "ArrowLeft",
956
- up: "ArrowUp",
957
- right: "ArrowRight",
958
- down: "ArrowDown",
959
- esc: "Escape",
960
- delete: "Delete",
961
- backspace: "Backspace",
962
- numpadEnter: "NumpadEnter",
963
- pageUp: "PageUp",
964
- pageDown: "PageDown",
965
- home: "Home",
966
- end: "End"
967
- }, To = (e) => {
968
- if (e.code && e.code !== "Unidentified")
969
- return e.code;
970
- const t = Mo(e);
971
- return t ? Object.values(Ae).includes(t) ? t : t === " " ? Ae.space : "" : "";
972
- }, Mo = (e) => {
973
- let t = e.key && e.key !== "Unidentified" ? e.key : "";
974
- if (!t && e.type === "keyup" && So()) {
975
- const n = e.target;
976
- t = n.value.charAt(n.selectionStart - 1);
977
- }
978
- return t;
979
- }, No = oe({
980
- value: {
981
- type: [String, Number],
982
- default: ""
983
- },
984
- max: {
985
- type: Number,
986
- default: 99
987
- },
988
- isDot: Boolean,
989
- hidden: Boolean,
990
- type: {
991
- type: String,
992
- values: ["primary", "success", "warning", "info", "danger"],
993
- default: "danger"
994
- },
995
- showZero: {
996
- type: Boolean,
997
- default: !0
998
- },
999
- color: String,
1000
- badgeStyle: {
1001
- type: k([String, Object, Array])
1002
- },
1003
- offset: {
1004
- type: k(Array),
1005
- default: [0, 0]
1006
- },
1007
- badgeClass: {
1008
- type: String
1009
- }
1010
- }), Eo = N({
1011
- name: "ElBadge",
1012
- __name: "badge",
1013
- props: No,
1014
- setup(e, { expose: t }) {
1015
- const n = e, r = Q("badge"), o = c(() => n.isDot ? "" : W(n.value) && W(n.max) ? n.max < n.value ? `${n.max}+` : `${n.value}` : `${n.value}`), a = c(() => {
1016
- var s;
1017
- return [
1018
- {
1019
- backgroundColor: n.color,
1020
- marginRight: $e(-n.offset[0]),
1021
- marginTop: $e(n.offset[1])
1022
- },
1023
- (s = n.badgeStyle) != null ? s : {}
1024
- ];
1025
- });
1026
- return t({
1027
- content: o
1028
- }), (s, i) => (m(), O(
1029
- "div",
1030
- {
1031
- class: P(l(r).b())
1032
- },
1033
- [
1034
- F(s.$slots, "default"),
1035
- Be(pt, {
1036
- name: `${l(r).namespace.value}-zoom-in-center`,
1037
- persisted: ""
1038
- }, {
1039
- default: D(() => [
1040
- ht(R(
1041
- "sup",
1042
- {
1043
- class: P([
1044
- l(r).e("content"),
1045
- l(r).em("content", s.type),
1046
- l(r).is("fixed", !!s.$slots.default),
1047
- l(r).is("dot", s.isDot),
1048
- l(r).is("hide-zero", !s.showZero && s.value === 0),
1049
- s.badgeClass
1050
- ]),
1051
- style: gt(a.value)
1052
- },
1053
- [
1054
- F(s.$slots, "content", { value: o.value }, () => [
1055
- ze(
1056
- ye(o.value),
1057
- 1
1058
- )
1059
- ])
1060
- ],
1061
- 6
1062
- ), [
1063
- [vt, !s.hidden && (o.value || s.isDot || s.$slots.content)]
1064
- ])
1065
- ]),
1066
- _: 3
1067
- }, 8, ["name"])
1068
- ],
1069
- 2
1070
- ));
1071
- }
1072
- });
1073
- var $o = /* @__PURE__ */ ce(Eo, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/badge/src/badge.vue"]]);
1074
- const Oo = Ge($o), Rt = /* @__PURE__ */ Symbol(
205
+ }, kt = /* @__PURE__ */ Symbol(
1075
206
  "buttonGroupContextKey"
1076
- ), Ao = ({ from: e, replacement: t, scope: n, version: r, ref: o, type: a = "API" }, s) => {
1077
- le(
1078
- () => l(s),
1079
- (i) => {
1080
- i && re(
1081
- n,
1082
- `[${a}] ${e} is about to be deprecated in version ${r}, please use ${t} instead.
1083
- For more detail, please visit: ${o}
207
+ ), ce = ({ from: t, replacement: r, scope: e, version: n, ref: a, type: o = "API" }, i) => {
208
+ Et(
209
+ () => g(i),
210
+ (s) => {
211
+ s && vt(
212
+ e,
213
+ `[${o}] ${t} is about to be deprecated in version ${n}, please use ${r} instead.
214
+ For more detail, please visit: ${a}
1084
215
  `
1085
216
  );
1086
217
  },
@@ -1088,8 +219,8 @@ For more detail, please visit: ${o}
1088
219
  immediate: !0
1089
220
  }
1090
221
  );
1091
- }, Io = (e, t) => {
1092
- Ao(
222
+ }, ue = (t, r) => {
223
+ ce(
1093
224
  {
1094
225
  from: "type.text",
1095
226
  replacement: "link",
@@ -1097,67 +228,67 @@ For more detail, please visit: ${o}
1097
228
  scope: "props",
1098
229
  ref: "https://element-plus.org/en-US/component/button.html#button-attributes"
1099
230
  },
1100
- c(() => e.type === "text")
231
+ h(() => t.type === "text")
1101
232
  );
1102
- const n = $(Rt, void 0), r = Ve("button"), { form: o } = Co(), a = ko(c(() => n?.size)), s = Dt(), i = T(), f = on(), b = c(
233
+ const e = w(kt, void 0), n = Yt("button"), { form: a } = ie(), o = se(h(() => e?.size)), i = xt(), s = E(), f = Ht(), m = h(
1103
234
  () => {
1104
- var d;
1105
- return e.type || n?.type || ((d = r.value) == null ? void 0 : d.type) || "";
235
+ var u;
236
+ return t.type || e?.type || ((u = n.value) == null ? void 0 : u.type) || "";
1106
237
  }
1107
- ), h = c(
238
+ ), v = h(
1108
239
  () => {
1109
- var d, p, w;
1110
- return (w = (p = e.autoInsertSpace) != null ? p : (d = r.value) == null ? void 0 : d.autoInsertSpace) != null ? w : !1;
240
+ var u, l, b;
241
+ return (b = (l = t.autoInsertSpace) != null ? l : (u = n.value) == null ? void 0 : u.autoInsertSpace) != null ? b : !1;
1111
242
  }
1112
- ), g = c(
243
+ ), _ = h(
1113
244
  () => {
1114
- var d, p, w;
1115
- return (w = (p = e.plain) != null ? p : (d = r.value) == null ? void 0 : d.plain) != null ? w : !1;
245
+ var u, l, b;
246
+ return (b = (l = t.plain) != null ? l : (u = n.value) == null ? void 0 : u.plain) != null ? b : !1;
1116
247
  }
1117
- ), _ = c(
248
+ ), H = h(
1118
249
  () => {
1119
- var d, p, w;
1120
- return (w = (p = e.round) != null ? p : (d = r.value) == null ? void 0 : d.round) != null ? w : !1;
250
+ var u, l, b;
251
+ return (b = (l = t.round) != null ? l : (u = n.value) == null ? void 0 : u.round) != null ? b : !1;
1121
252
  }
1122
- ), M = c(() => {
1123
- var d, p, w;
1124
- return (w = (p = e.text) != null ? p : (d = r.value) == null ? void 0 : d.text) != null ? w : !1;
1125
- }), z = c(() => e.tag === "button" ? {
1126
- ariaDisabled: s.value || e.loading,
1127
- disabled: s.value || e.loading,
1128
- autofocus: e.autofocus,
1129
- type: e.nativeType
1130
- } : {}), u = c(() => {
1131
- var d;
1132
- const p = (d = f.default) == null ? void 0 : d.call(f);
1133
- if (h.value && p?.length === 1) {
1134
- const w = p[0];
1135
- if (w?.type === an) {
1136
- const ue = w.children;
1137
- return new RegExp("^\\p{Unified_Ideograph}{2}$", "u").test(ue.trim());
253
+ ), C = h(() => {
254
+ var u, l, b;
255
+ return (b = (l = t.text) != null ? l : (u = n.value) == null ? void 0 : u.text) != null ? b : !1;
256
+ }), T = h(() => t.tag === "button" ? {
257
+ ariaDisabled: i.value || t.loading,
258
+ disabled: i.value || t.loading,
259
+ autofocus: t.autofocus,
260
+ type: t.nativeType
261
+ } : {}), c = h(() => {
262
+ var u;
263
+ const l = (u = f.default) == null ? void 0 : u.call(f);
264
+ if (v.value && l?.length === 1) {
265
+ const b = l[0];
266
+ if (b?.type === Ct) {
267
+ const Nt = b.children;
268
+ return new RegExp("^\\p{Unified_Ideograph}{2}$", "u").test(Nt.trim());
1138
269
  }
1139
270
  }
1140
271
  return !1;
1141
272
  });
1142
273
  return {
1143
- _disabled: s,
1144
- _size: a,
1145
- _type: b,
1146
- _ref: i,
1147
- _props: z,
1148
- _plain: g,
1149
- _round: _,
1150
- _text: M,
1151
- shouldAddSpace: u,
1152
- handleClick: (d) => {
1153
- if (s.value || e.loading) {
1154
- d.stopPropagation();
274
+ _disabled: i,
275
+ _size: o,
276
+ _type: m,
277
+ _ref: s,
278
+ _props: T,
279
+ _plain: _,
280
+ _round: H,
281
+ _text: C,
282
+ shouldAddSpace: c,
283
+ handleClick: (u) => {
284
+ if (i.value || t.loading) {
285
+ u.stopPropagation();
1155
286
  return;
1156
287
  }
1157
- e.nativeType === "reset" && o?.resetFields(), t("click", d);
288
+ t.nativeType === "reset" && a?.resetFields(), r("click", u);
1158
289
  }
1159
290
  };
1160
- }, Po = [
291
+ }, le = [
1161
292
  "default",
1162
293
  "primary",
1163
294
  "success",
@@ -1166,29 +297,29 @@ For more detail, please visit: ${o}
1166
297
  "danger",
1167
298
  "text",
1168
299
  ""
1169
- ], Bo = ["button", "submit", "reset"], Ie = oe({
1170
- size: Pt,
300
+ ], fe = ["button", "submit", "reset"], U = mt({
301
+ size: Ut,
1171
302
  disabled: {
1172
303
  type: Boolean,
1173
304
  default: void 0
1174
305
  },
1175
306
  type: {
1176
307
  type: String,
1177
- values: Po,
308
+ values: le,
1178
309
  default: ""
1179
310
  },
1180
311
  icon: {
1181
- type: Oe
312
+ type: ot
1182
313
  },
1183
314
  nativeType: {
1184
315
  type: String,
1185
- values: Bo,
316
+ values: fe,
1186
317
  default: "button"
1187
318
  },
1188
319
  loading: Boolean,
1189
320
  loadingIcon: {
1190
- type: Oe,
1191
- default: () => vo
321
+ type: ot,
322
+ default: () => oe
1192
323
  },
1193
324
  plain: {
1194
325
  type: Boolean,
@@ -1213,137 +344,137 @@ For more detail, please visit: ${o}
1213
344
  default: void 0
1214
345
  },
1215
346
  tag: {
1216
- type: k([String, Object]),
347
+ type: j([String, Object]),
1217
348
  default: "button"
1218
349
  }
1219
- }), zo = {
1220
- click: (e) => e instanceof MouseEvent
350
+ }), de = {
351
+ click: (t) => t instanceof MouseEvent
1221
352
  };
1222
- function S(e, t) {
1223
- jo(e) && (e = "100%");
1224
- var n = Fo(e);
1225
- 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);
353
+ function p(t, r) {
354
+ he(t) && (t = "100%");
355
+ var e = ge(t);
356
+ return t = r === 360 ? t : Math.min(r, Math.max(0, parseFloat(t))), e && (t = parseInt(String(t * r), 10) / 100), Math.abs(t - r) < 1e-6 ? 1 : (r === 360 ? t = (t < 0 ? t % r + r : t % r) / parseFloat(String(r)) : t = t % r / parseFloat(String(r)), t);
1226
357
  }
1227
- function de(e) {
1228
- return Math.min(1, Math.max(0, e));
358
+ function O(t) {
359
+ return Math.min(1, Math.max(0, t));
1229
360
  }
1230
- function jo(e) {
1231
- return typeof e == "string" && e.indexOf(".") !== -1 && parseFloat(e) === 1;
361
+ function he(t) {
362
+ return typeof t == "string" && t.indexOf(".") !== -1 && parseFloat(t) === 1;
1232
363
  }
1233
- function Fo(e) {
1234
- return typeof e == "string" && e.indexOf("%") !== -1;
364
+ function ge(t) {
365
+ return typeof t == "string" && t.indexOf("%") !== -1;
1235
366
  }
1236
- function Ht(e) {
1237
- return e = parseFloat(e), (isNaN(e) || e < 0 || e > 1) && (e = 1), e;
367
+ function wt(t) {
368
+ return t = parseFloat(t), (isNaN(t) || t < 0 || t > 1) && (t = 1), t;
1238
369
  }
1239
- function pe(e) {
1240
- return e <= 1 ? "".concat(Number(e) * 100, "%") : e;
370
+ function z(t) {
371
+ return t <= 1 ? "".concat(Number(t) * 100, "%") : t;
1241
372
  }
1242
- function G(e) {
1243
- return e.length === 1 ? "0" + e : String(e);
373
+ function A(t) {
374
+ return t.length === 1 ? "0" + t : String(t);
1244
375
  }
1245
- function Do(e, t, n) {
376
+ function ve(t, r, e) {
1246
377
  return {
1247
- r: S(e, 255) * 255,
1248
- g: S(t, 255) * 255,
1249
- b: S(n, 255) * 255
378
+ r: p(t, 255) * 255,
379
+ g: p(r, 255) * 255,
380
+ b: p(e, 255) * 255
1250
381
  };
1251
382
  }
1252
- function st(e, t, n) {
1253
- e = S(e, 255), t = S(t, 255), n = S(n, 255);
1254
- var r = Math.max(e, t, n), o = Math.min(e, t, n), a = 0, s = 0, i = (r + o) / 2;
1255
- if (r === o)
1256
- s = 0, a = 0;
383
+ function it(t, r, e) {
384
+ t = p(t, 255), r = p(r, 255), e = p(e, 255);
385
+ var n = Math.max(t, r, e), a = Math.min(t, r, e), o = 0, i = 0, s = (n + a) / 2;
386
+ if (n === a)
387
+ i = 0, o = 0;
1257
388
  else {
1258
- var f = r - o;
1259
- switch (s = i > 0.5 ? f / (2 - r - o) : f / (r + o), r) {
1260
- case e:
1261
- a = (t - n) / f + (t < n ? 6 : 0);
1262
- break;
389
+ var f = n - a;
390
+ switch (i = s > 0.5 ? f / (2 - n - a) : f / (n + a), n) {
1263
391
  case t:
1264
- a = (n - e) / f + 2;
392
+ o = (r - e) / f + (r < e ? 6 : 0);
393
+ break;
394
+ case r:
395
+ o = (e - t) / f + 2;
1265
396
  break;
1266
- case n:
1267
- a = (e - t) / f + 4;
397
+ case e:
398
+ o = (t - r) / f + 4;
1268
399
  break;
1269
400
  }
1270
- a /= 6;
401
+ o /= 6;
1271
402
  }
1272
- return { h: a, s, l: i };
403
+ return { h: o, s: i, l: s };
1273
404
  }
1274
- function ke(e, t, n) {
1275
- 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;
405
+ function K(t, r, e) {
406
+ return e < 0 && (e += 1), e > 1 && (e -= 1), e < 1 / 6 ? t + (r - t) * (6 * e) : e < 1 / 2 ? r : e < 2 / 3 ? t + (r - t) * (2 / 3 - e) * 6 : t;
1276
407
  }
1277
- function Ro(e, t, n) {
1278
- var r, o, a;
1279
- if (e = S(e, 360), t = S(t, 100), n = S(n, 100), t === 0)
1280
- o = n, a = n, r = n;
408
+ function pe(t, r, e) {
409
+ var n, a, o;
410
+ if (t = p(t, 360), r = p(r, 100), e = p(e, 100), r === 0)
411
+ a = e, o = e, n = e;
1281
412
  else {
1282
- var s = n < 0.5 ? n * (1 + t) : n + t - n * t, i = 2 * n - s;
1283
- r = ke(i, s, e + 1 / 3), o = ke(i, s, e), a = ke(i, s, e - 1 / 3);
413
+ var i = e < 0.5 ? e * (1 + r) : e + r - e * r, s = 2 * e - i;
414
+ n = K(s, i, t + 1 / 3), a = K(s, i, t), o = K(s, i, t - 1 / 3);
1284
415
  }
1285
- return { r: r * 255, g: o * 255, b: a * 255 };
416
+ return { r: n * 255, g: a * 255, b: o * 255 };
1286
417
  }
1287
- function it(e, t, n) {
1288
- e = S(e, 255), t = S(t, 255), n = S(n, 255);
1289
- var r = Math.max(e, t, n), o = Math.min(e, t, n), a = 0, s = r, i = r - o, f = r === 0 ? 0 : i / r;
1290
- if (r === o)
1291
- a = 0;
418
+ function st(t, r, e) {
419
+ t = p(t, 255), r = p(r, 255), e = p(e, 255);
420
+ var n = Math.max(t, r, e), a = Math.min(t, r, e), o = 0, i = n, s = n - a, f = n === 0 ? 0 : s / n;
421
+ if (n === a)
422
+ o = 0;
1292
423
  else {
1293
- switch (r) {
1294
- case e:
1295
- a = (t - n) / i + (t < n ? 6 : 0);
1296
- break;
424
+ switch (n) {
1297
425
  case t:
1298
- a = (n - e) / i + 2;
426
+ o = (r - e) / s + (r < e ? 6 : 0);
427
+ break;
428
+ case r:
429
+ o = (e - t) / s + 2;
1299
430
  break;
1300
- case n:
1301
- a = (e - t) / i + 4;
431
+ case e:
432
+ o = (t - r) / s + 4;
1302
433
  break;
1303
434
  }
1304
- a /= 6;
435
+ o /= 6;
1305
436
  }
1306
- return { h: a, s: f, v: s };
437
+ return { h: o, s: f, v: i };
1307
438
  }
1308
- function Ho(e, t, n) {
1309
- e = S(e, 360) * 6, t = S(t, 100), n = S(n, 100);
1310
- var r = Math.floor(e), o = e - r, a = n * (1 - t), s = n * (1 - o * t), i = n * (1 - (1 - o) * t), f = r % 6, b = [n, s, a, a, i, n][f], h = [i, n, n, s, a, a][f], g = [a, a, i, n, n, s][f];
1311
- return { r: b * 255, g: h * 255, b: g * 255 };
439
+ function be(t, r, e) {
440
+ t = p(t, 360) * 6, r = p(r, 100), e = p(e, 100);
441
+ var n = Math.floor(t), a = t - n, o = e * (1 - r), i = e * (1 - a * r), s = e * (1 - (1 - a) * r), f = n % 6, m = [e, i, o, o, s, e][f], v = [s, e, e, i, o, o][f], _ = [o, o, s, e, e, i][f];
442
+ return { r: m * 255, g: v * 255, b: _ * 255 };
1312
443
  }
1313
- function lt(e, t, n, r) {
1314
- var o = [
1315
- G(Math.round(e).toString(16)),
1316
- G(Math.round(t).toString(16)),
1317
- G(Math.round(n).toString(16))
444
+ function ct(t, r, e, n) {
445
+ var a = [
446
+ A(Math.round(t).toString(16)),
447
+ A(Math.round(r).toString(16)),
448
+ A(Math.round(e).toString(16))
1318
449
  ];
1319
- return r && o[0].startsWith(o[0].charAt(1)) && o[1].startsWith(o[1].charAt(1)) && o[2].startsWith(o[2].charAt(1)) ? o[0].charAt(0) + o[1].charAt(0) + o[2].charAt(0) : o.join("");
450
+ return n && 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("");
1320
451
  }
1321
- function Lo(e, t, n, r, o) {
1322
- var a = [
1323
- G(Math.round(e).toString(16)),
1324
- G(Math.round(t).toString(16)),
1325
- G(Math.round(n).toString(16)),
1326
- G(Vo(r))
452
+ function me(t, r, e, n, a) {
453
+ var o = [
454
+ A(Math.round(t).toString(16)),
455
+ A(Math.round(r).toString(16)),
456
+ A(Math.round(e).toString(16)),
457
+ A(ye(n))
1327
458
  ];
1328
- return o && a[0].startsWith(a[0].charAt(1)) && a[1].startsWith(a[1].charAt(1)) && a[2].startsWith(a[2].charAt(1)) && a[3].startsWith(a[3].charAt(1)) ? a[0].charAt(0) + a[1].charAt(0) + a[2].charAt(0) + a[3].charAt(0) : a.join("");
459
+ return a && o[0].startsWith(o[0].charAt(1)) && o[1].startsWith(o[1].charAt(1)) && o[2].startsWith(o[2].charAt(1)) && o[3].startsWith(o[3].charAt(1)) ? o[0].charAt(0) + o[1].charAt(0) + o[2].charAt(0) + o[3].charAt(0) : o.join("");
1329
460
  }
1330
- function Vo(e) {
1331
- return Math.round(parseFloat(e) * 255).toString(16);
461
+ function ye(t) {
462
+ return Math.round(parseFloat(t) * 255).toString(16);
1332
463
  }
1333
- function ct(e) {
1334
- return E(e) / 255;
464
+ function ut(t) {
465
+ return y(t) / 255;
1335
466
  }
1336
- function E(e) {
1337
- return parseInt(e, 16);
467
+ function y(t) {
468
+ return parseInt(t, 16);
1338
469
  }
1339
- function Go(e) {
470
+ function _e(t) {
1340
471
  return {
1341
- r: e >> 16,
1342
- g: (e & 65280) >> 8,
1343
- b: e & 255
472
+ r: t >> 16,
473
+ g: (t & 65280) >> 8,
474
+ b: t & 255
1344
475
  };
1345
476
  }
1346
- var Pe = {
477
+ var J = {
1347
478
  aliceblue: "#f0f8ff",
1348
479
  antiquewhite: "#faebd7",
1349
480
  aqua: "#00ffff",
@@ -1493,842 +624,442 @@ var Pe = {
1493
624
  yellow: "#ffff00",
1494
625
  yellowgreen: "#9acd32"
1495
626
  };
1496
- function Ko(e) {
1497
- var t = { r: 0, g: 0, b: 0 }, n = 1, r = null, o = null, a = null, s = !1, i = !1;
1498
- return typeof e == "string" && (e = Zo(e)), typeof e == "object" && (j(e.r) && j(e.g) && j(e.b) ? (t = Do(e.r, e.g, e.b), s = !0, i = String(e.r).substr(-1) === "%" ? "prgb" : "rgb") : j(e.h) && j(e.s) && j(e.v) ? (r = pe(e.s), o = pe(e.v), t = Ho(e.h, r, o), s = !0, i = "hsv") : j(e.h) && j(e.s) && j(e.l) && (r = pe(e.s), a = pe(e.l), t = Ro(e.h, r, a), s = !0, i = "hsl"), Object.prototype.hasOwnProperty.call(e, "a") && (n = e.a)), n = Ht(n), {
1499
- ok: s,
1500
- format: e.format || i,
1501
- r: Math.min(255, Math.max(t.r, 0)),
1502
- g: Math.min(255, Math.max(t.g, 0)),
1503
- b: Math.min(255, Math.max(t.b, 0)),
1504
- a: n
627
+ function Se(t) {
628
+ var r = { r: 0, g: 0, b: 0 }, e = 1, n = null, a = null, o = null, i = !1, s = !1;
629
+ return typeof t == "string" && (t = we(t)), typeof t == "object" && (k(t.r) && k(t.g) && k(t.b) ? (r = ve(t.r, t.g, t.b), i = !0, s = String(t.r).substr(-1) === "%" ? "prgb" : "rgb") : k(t.h) && k(t.s) && k(t.v) ? (n = z(t.s), a = z(t.v), r = be(t.h, n, a), i = !0, s = "hsv") : k(t.h) && k(t.s) && k(t.l) && (n = z(t.s), o = z(t.l), r = pe(t.h, n, o), i = !0, s = "hsl"), Object.prototype.hasOwnProperty.call(t, "a") && (e = t.a)), e = wt(e), {
630
+ ok: i,
631
+ format: t.format || s,
632
+ r: Math.min(255, Math.max(r.r, 0)),
633
+ g: Math.min(255, Math.max(r.g, 0)),
634
+ b: Math.min(255, Math.max(r.b, 0)),
635
+ a: e
1505
636
  };
1506
637
  }
1507
- var Uo = "[-\\+]?\\d+%?", Wo = "[-\\+]?\\d*\\.\\d+%?", L = "(?:".concat(Wo, ")|(?:").concat(Uo, ")"), Te = "[\\s|\\(]+(".concat(L, ")[,|\\s]+(").concat(L, ")[,|\\s]+(").concat(L, ")\\s*\\)?"), Me = "[\\s|\\(]+(".concat(L, ")[,|\\s]+(").concat(L, ")[,|\\s]+(").concat(L, ")[,|\\s]+(").concat(L, ")\\s*\\)?"), I = {
1508
- CSS_UNIT: new RegExp(L),
1509
- rgb: new RegExp("rgb" + Te),
1510
- rgba: new RegExp("rgba" + Me),
1511
- hsl: new RegExp("hsl" + Te),
1512
- hsla: new RegExp("hsla" + Me),
1513
- hsv: new RegExp("hsv" + Te),
1514
- hsva: new RegExp("hsva" + Me),
638
+ var xe = "[-\\+]?\\d+%?", ke = "[-\\+]?\\d*\\.\\d+%?", $ = "(?:".concat(ke, ")|(?:").concat(xe, ")"), L = "[\\s|\\(]+(".concat($, ")[,|\\s]+(").concat($, ")[,|\\s]+(").concat($, ")\\s*\\)?"), q = "[\\s|\\(]+(".concat($, ")[,|\\s]+(").concat($, ")[,|\\s]+(").concat($, ")[,|\\s]+(").concat($, ")\\s*\\)?"), x = {
639
+ CSS_UNIT: new RegExp($),
640
+ rgb: new RegExp("rgb" + L),
641
+ rgba: new RegExp("rgba" + q),
642
+ hsl: new RegExp("hsl" + L),
643
+ hsla: new RegExp("hsla" + q),
644
+ hsv: new RegExp("hsv" + L),
645
+ hsva: new RegExp("hsva" + q),
1515
646
  hex3: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
1516
647
  hex6: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
1517
648
  hex4: /^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
1518
649
  hex8: /^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
1519
650
  };
1520
- function Zo(e) {
1521
- if (e = e.trim().toLowerCase(), e.length === 0)
651
+ function we(t) {
652
+ if (t = t.trim().toLowerCase(), t.length === 0)
1522
653
  return !1;
1523
- var t = !1;
1524
- if (Pe[e])
1525
- e = Pe[e], t = !0;
1526
- else if (e === "transparent")
654
+ var r = !1;
655
+ if (J[t])
656
+ t = J[t], r = !0;
657
+ else if (t === "transparent")
1527
658
  return { r: 0, g: 0, b: 0, a: 0, format: "name" };
1528
- var n = I.rgb.exec(e);
1529
- return n ? { r: n[1], g: n[2], b: n[3] } : (n = I.rgba.exec(e), n ? { r: n[1], g: n[2], b: n[3], a: n[4] } : (n = I.hsl.exec(e), n ? { h: n[1], s: n[2], l: n[3] } : (n = I.hsla.exec(e), n ? { h: n[1], s: n[2], l: n[3], a: n[4] } : (n = I.hsv.exec(e), n ? { h: n[1], s: n[2], v: n[3] } : (n = I.hsva.exec(e), n ? { h: n[1], s: n[2], v: n[3], a: n[4] } : (n = I.hex8.exec(e), n ? {
1530
- r: E(n[1]),
1531
- g: E(n[2]),
1532
- b: E(n[3]),
1533
- a: ct(n[4]),
1534
- format: t ? "name" : "hex8"
1535
- } : (n = I.hex6.exec(e), n ? {
1536
- r: E(n[1]),
1537
- g: E(n[2]),
1538
- b: E(n[3]),
1539
- format: t ? "name" : "hex"
1540
- } : (n = I.hex4.exec(e), n ? {
1541
- r: E(n[1] + n[1]),
1542
- g: E(n[2] + n[2]),
1543
- b: E(n[3] + n[3]),
1544
- a: ct(n[4] + n[4]),
1545
- format: t ? "name" : "hex8"
1546
- } : (n = I.hex3.exec(e), n ? {
1547
- r: E(n[1] + n[1]),
1548
- g: E(n[2] + n[2]),
1549
- b: E(n[3] + n[3]),
1550
- format: t ? "name" : "hex"
659
+ var e = x.rgb.exec(t);
660
+ return e ? { r: e[1], g: e[2], b: e[3] } : (e = x.rgba.exec(t), e ? { r: e[1], g: e[2], b: e[3], a: e[4] } : (e = x.hsl.exec(t), e ? { h: e[1], s: e[2], l: e[3] } : (e = x.hsla.exec(t), e ? { h: e[1], s: e[2], l: e[3], a: e[4] } : (e = x.hsv.exec(t), e ? { h: e[1], s: e[2], v: e[3] } : (e = x.hsva.exec(t), e ? { h: e[1], s: e[2], v: e[3], a: e[4] } : (e = x.hex8.exec(t), e ? {
661
+ r: y(e[1]),
662
+ g: y(e[2]),
663
+ b: y(e[3]),
664
+ a: ut(e[4]),
665
+ format: r ? "name" : "hex8"
666
+ } : (e = x.hex6.exec(t), e ? {
667
+ r: y(e[1]),
668
+ g: y(e[2]),
669
+ b: y(e[3]),
670
+ format: r ? "name" : "hex"
671
+ } : (e = x.hex4.exec(t), e ? {
672
+ r: y(e[1] + e[1]),
673
+ g: y(e[2] + e[2]),
674
+ b: y(e[3] + e[3]),
675
+ a: ut(e[4] + e[4]),
676
+ format: r ? "name" : "hex8"
677
+ } : (e = x.hex3.exec(t), e ? {
678
+ r: y(e[1] + e[1]),
679
+ g: y(e[2] + e[2]),
680
+ b: y(e[3] + e[3]),
681
+ format: r ? "name" : "hex"
1551
682
  } : !1)))))))));
1552
683
  }
1553
- function j(e) {
1554
- return !!I.CSS_UNIT.exec(String(e));
684
+ function k(t) {
685
+ return !!x.CSS_UNIT.exec(String(t));
1555
686
  }
1556
- var Jo = (
687
+ var Me = (
1557
688
  /** @class */
1558
689
  (function() {
1559
- function e(t, n) {
1560
- t === void 0 && (t = ""), n === void 0 && (n = {});
1561
- var r;
1562
- if (t instanceof e)
1563
- return t;
1564
- typeof t == "number" && (t = Go(t)), this.originalInput = t;
1565
- var o = Ko(t);
1566
- this.originalInput = t, this.r = o.r, this.g = o.g, this.b = o.b, this.a = o.a, this.roundA = Math.round(100 * this.a) / 100, this.format = (r = n.format) !== null && r !== void 0 ? r : o.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 = o.ok;
690
+ function t(r, e) {
691
+ r === void 0 && (r = ""), e === void 0 && (e = {});
692
+ var n;
693
+ if (r instanceof t)
694
+ return r;
695
+ typeof r == "number" && (r = _e(r)), this.originalInput = r;
696
+ var a = Se(r);
697
+ this.originalInput = r, 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 = (n = e.format) !== null && n !== void 0 ? n : a.format, this.gradientType = e.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;
1567
698
  }
1568
- return e.prototype.isDark = function() {
699
+ return t.prototype.isDark = function() {
1569
700
  return this.getBrightness() < 128;
1570
- }, e.prototype.isLight = function() {
701
+ }, t.prototype.isLight = function() {
1571
702
  return !this.isDark();
1572
- }, e.prototype.getBrightness = function() {
1573
- var t = this.toRgb();
1574
- return (t.r * 299 + t.g * 587 + t.b * 114) / 1e3;
1575
- }, e.prototype.getLuminance = function() {
1576
- var t = this.toRgb(), n, r, o, a = t.r / 255, s = t.g / 255, i = t.b / 255;
1577
- return a <= 0.03928 ? n = a / 12.92 : n = Math.pow((a + 0.055) / 1.055, 2.4), s <= 0.03928 ? r = s / 12.92 : r = Math.pow((s + 0.055) / 1.055, 2.4), i <= 0.03928 ? o = i / 12.92 : o = Math.pow((i + 0.055) / 1.055, 2.4), 0.2126 * n + 0.7152 * r + 0.0722 * o;
1578
- }, e.prototype.getAlpha = function() {
703
+ }, t.prototype.getBrightness = function() {
704
+ var r = this.toRgb();
705
+ return (r.r * 299 + r.g * 587 + r.b * 114) / 1e3;
706
+ }, t.prototype.getLuminance = function() {
707
+ var r = this.toRgb(), e, n, a, o = r.r / 255, i = r.g / 255, s = r.b / 255;
708
+ return o <= 0.03928 ? e = o / 12.92 : e = Math.pow((o + 0.055) / 1.055, 2.4), i <= 0.03928 ? n = i / 12.92 : n = Math.pow((i + 0.055) / 1.055, 2.4), s <= 0.03928 ? a = s / 12.92 : a = Math.pow((s + 0.055) / 1.055, 2.4), 0.2126 * e + 0.7152 * n + 0.0722 * a;
709
+ }, t.prototype.getAlpha = function() {
1579
710
  return this.a;
1580
- }, e.prototype.setAlpha = function(t) {
1581
- return this.a = Ht(t), this.roundA = Math.round(100 * this.a) / 100, this;
1582
- }, e.prototype.isMonochrome = function() {
1583
- var t = this.toHsl().s;
1584
- return t === 0;
1585
- }, e.prototype.toHsv = function() {
1586
- var t = it(this.r, this.g, this.b);
1587
- return { h: t.h * 360, s: t.s, v: t.v, a: this.a };
1588
- }, e.prototype.toHsvString = function() {
1589
- var t = it(this.r, this.g, this.b), n = Math.round(t.h * 360), r = Math.round(t.s * 100), o = Math.round(t.v * 100);
1590
- return this.a === 1 ? "hsv(".concat(n, ", ").concat(r, "%, ").concat(o, "%)") : "hsva(".concat(n, ", ").concat(r, "%, ").concat(o, "%, ").concat(this.roundA, ")");
1591
- }, e.prototype.toHsl = function() {
1592
- var t = st(this.r, this.g, this.b);
1593
- return { h: t.h * 360, s: t.s, l: t.l, a: this.a };
1594
- }, e.prototype.toHslString = function() {
1595
- var t = st(this.r, this.g, this.b), n = Math.round(t.h * 360), r = Math.round(t.s * 100), o = Math.round(t.l * 100);
1596
- return this.a === 1 ? "hsl(".concat(n, ", ").concat(r, "%, ").concat(o, "%)") : "hsla(".concat(n, ", ").concat(r, "%, ").concat(o, "%, ").concat(this.roundA, ")");
1597
- }, e.prototype.toHex = function(t) {
1598
- return t === void 0 && (t = !1), lt(this.r, this.g, this.b, t);
1599
- }, e.prototype.toHexString = function(t) {
1600
- return t === void 0 && (t = !1), "#" + this.toHex(t);
1601
- }, e.prototype.toHex8 = function(t) {
1602
- return t === void 0 && (t = !1), Lo(this.r, this.g, this.b, this.a, t);
1603
- }, e.prototype.toHex8String = function(t) {
1604
- return t === void 0 && (t = !1), "#" + this.toHex8(t);
1605
- }, e.prototype.toHexShortString = function(t) {
1606
- return t === void 0 && (t = !1), this.a === 1 ? this.toHexString(t) : this.toHex8String(t);
1607
- }, e.prototype.toRgb = function() {
711
+ }, t.prototype.setAlpha = function(r) {
712
+ return this.a = wt(r), this.roundA = Math.round(100 * this.a) / 100, this;
713
+ }, t.prototype.isMonochrome = function() {
714
+ var r = this.toHsl().s;
715
+ return r === 0;
716
+ }, t.prototype.toHsv = function() {
717
+ var r = st(this.r, this.g, this.b);
718
+ return { h: r.h * 360, s: r.s, v: r.v, a: this.a };
719
+ }, t.prototype.toHsvString = function() {
720
+ var r = st(this.r, this.g, this.b), e = Math.round(r.h * 360), n = Math.round(r.s * 100), a = Math.round(r.v * 100);
721
+ return this.a === 1 ? "hsv(".concat(e, ", ").concat(n, "%, ").concat(a, "%)") : "hsva(".concat(e, ", ").concat(n, "%, ").concat(a, "%, ").concat(this.roundA, ")");
722
+ }, t.prototype.toHsl = function() {
723
+ var r = it(this.r, this.g, this.b);
724
+ return { h: r.h * 360, s: r.s, l: r.l, a: this.a };
725
+ }, t.prototype.toHslString = function() {
726
+ var r = it(this.r, this.g, this.b), e = Math.round(r.h * 360), n = Math.round(r.s * 100), a = Math.round(r.l * 100);
727
+ return this.a === 1 ? "hsl(".concat(e, ", ").concat(n, "%, ").concat(a, "%)") : "hsla(".concat(e, ", ").concat(n, "%, ").concat(a, "%, ").concat(this.roundA, ")");
728
+ }, t.prototype.toHex = function(r) {
729
+ return r === void 0 && (r = !1), ct(this.r, this.g, this.b, r);
730
+ }, t.prototype.toHexString = function(r) {
731
+ return r === void 0 && (r = !1), "#" + this.toHex(r);
732
+ }, t.prototype.toHex8 = function(r) {
733
+ return r === void 0 && (r = !1), me(this.r, this.g, this.b, this.a, r);
734
+ }, t.prototype.toHex8String = function(r) {
735
+ return r === void 0 && (r = !1), "#" + this.toHex8(r);
736
+ }, t.prototype.toHexShortString = function(r) {
737
+ return r === void 0 && (r = !1), this.a === 1 ? this.toHexString(r) : this.toHex8String(r);
738
+ }, t.prototype.toRgb = function() {
1608
739
  return {
1609
740
  r: Math.round(this.r),
1610
741
  g: Math.round(this.g),
1611
742
  b: Math.round(this.b),
1612
743
  a: this.a
1613
744
  };
1614
- }, e.prototype.toRgbString = function() {
1615
- var t = Math.round(this.r), n = Math.round(this.g), r = Math.round(this.b);
1616
- return this.a === 1 ? "rgb(".concat(t, ", ").concat(n, ", ").concat(r, ")") : "rgba(".concat(t, ", ").concat(n, ", ").concat(r, ", ").concat(this.roundA, ")");
1617
- }, e.prototype.toPercentageRgb = function() {
1618
- var t = function(n) {
1619
- return "".concat(Math.round(S(n, 255) * 100), "%");
745
+ }, t.prototype.toRgbString = function() {
746
+ var r = Math.round(this.r), e = Math.round(this.g), n = Math.round(this.b);
747
+ return this.a === 1 ? "rgb(".concat(r, ", ").concat(e, ", ").concat(n, ")") : "rgba(".concat(r, ", ").concat(e, ", ").concat(n, ", ").concat(this.roundA, ")");
748
+ }, t.prototype.toPercentageRgb = function() {
749
+ var r = function(e) {
750
+ return "".concat(Math.round(p(e, 255) * 100), "%");
1620
751
  };
1621
752
  return {
1622
- r: t(this.r),
1623
- g: t(this.g),
1624
- b: t(this.b),
753
+ r: r(this.r),
754
+ g: r(this.g),
755
+ b: r(this.b),
1625
756
  a: this.a
1626
757
  };
1627
- }, e.prototype.toPercentageRgbString = function() {
1628
- var t = function(n) {
1629
- return Math.round(S(n, 255) * 100);
758
+ }, t.prototype.toPercentageRgbString = function() {
759
+ var r = function(e) {
760
+ return Math.round(p(e, 255) * 100);
1630
761
  };
1631
- 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, ")");
1632
- }, e.prototype.toName = function() {
762
+ return this.a === 1 ? "rgb(".concat(r(this.r), "%, ").concat(r(this.g), "%, ").concat(r(this.b), "%)") : "rgba(".concat(r(this.r), "%, ").concat(r(this.g), "%, ").concat(r(this.b), "%, ").concat(this.roundA, ")");
763
+ }, t.prototype.toName = function() {
1633
764
  if (this.a === 0)
1634
765
  return "transparent";
1635
766
  if (this.a < 1)
1636
767
  return !1;
1637
- for (var t = "#" + lt(this.r, this.g, this.b, !1), n = 0, r = Object.entries(Pe); n < r.length; n++) {
1638
- var o = r[n], a = o[0], s = o[1];
1639
- if (t === s)
1640
- return a;
768
+ for (var r = "#" + ct(this.r, this.g, this.b, !1), e = 0, n = Object.entries(J); e < n.length; e++) {
769
+ var a = n[e], o = a[0], i = a[1];
770
+ if (r === i)
771
+ return o;
1641
772
  }
1642
773
  return !1;
1643
- }, e.prototype.toString = function(t) {
1644
- var n = !!t;
1645
- t = t ?? this.format;
1646
- var r = !1, o = this.a < 1 && this.a >= 0, a = !n && o && (t.startsWith("hex") || t === "name");
1647
- return a ? t === "name" && this.a === 0 ? this.toName() : this.toRgbString() : (t === "rgb" && (r = this.toRgbString()), t === "prgb" && (r = this.toPercentageRgbString()), (t === "hex" || t === "hex6") && (r = this.toHexString()), t === "hex3" && (r = this.toHexString(!0)), t === "hex4" && (r = this.toHex8String(!0)), t === "hex8" && (r = this.toHex8String()), t === "name" && (r = this.toName()), t === "hsl" && (r = this.toHslString()), t === "hsv" && (r = this.toHsvString()), r || this.toHexString());
1648
- }, e.prototype.toNumber = function() {
774
+ }, t.prototype.toString = function(r) {
775
+ var e = !!r;
776
+ r = r ?? this.format;
777
+ var n = !1, a = this.a < 1 && this.a >= 0, o = !e && a && (r.startsWith("hex") || r === "name");
778
+ return o ? r === "name" && this.a === 0 ? this.toName() : this.toRgbString() : (r === "rgb" && (n = this.toRgbString()), r === "prgb" && (n = this.toPercentageRgbString()), (r === "hex" || r === "hex6") && (n = this.toHexString()), r === "hex3" && (n = this.toHexString(!0)), r === "hex4" && (n = this.toHex8String(!0)), r === "hex8" && (n = this.toHex8String()), r === "name" && (n = this.toName()), r === "hsl" && (n = this.toHslString()), r === "hsv" && (n = this.toHsvString()), n || this.toHexString());
779
+ }, t.prototype.toNumber = function() {
1649
780
  return (Math.round(this.r) << 16) + (Math.round(this.g) << 8) + Math.round(this.b);
1650
- }, e.prototype.clone = function() {
1651
- return new e(this.toString());
1652
- }, e.prototype.lighten = function(t) {
1653
- t === void 0 && (t = 10);
1654
- var n = this.toHsl();
1655
- return n.l += t / 100, n.l = de(n.l), new e(n);
1656
- }, e.prototype.brighten = function(t) {
1657
- t === void 0 && (t = 10);
1658
- var n = this.toRgb();
1659
- return n.r = Math.max(0, Math.min(255, n.r - Math.round(255 * -(t / 100)))), n.g = Math.max(0, Math.min(255, n.g - Math.round(255 * -(t / 100)))), n.b = Math.max(0, Math.min(255, n.b - Math.round(255 * -(t / 100)))), new e(n);
1660
- }, e.prototype.darken = function(t) {
1661
- t === void 0 && (t = 10);
1662
- var n = this.toHsl();
1663
- return n.l -= t / 100, n.l = de(n.l), new e(n);
1664
- }, e.prototype.tint = function(t) {
1665
- return t === void 0 && (t = 10), this.mix("white", t);
1666
- }, e.prototype.shade = function(t) {
1667
- return t === void 0 && (t = 10), this.mix("black", t);
1668
- }, e.prototype.desaturate = function(t) {
1669
- t === void 0 && (t = 10);
1670
- var n = this.toHsl();
1671
- return n.s -= t / 100, n.s = de(n.s), new e(n);
1672
- }, e.prototype.saturate = function(t) {
1673
- t === void 0 && (t = 10);
1674
- var n = this.toHsl();
1675
- return n.s += t / 100, n.s = de(n.s), new e(n);
1676
- }, e.prototype.greyscale = function() {
781
+ }, t.prototype.clone = function() {
782
+ return new t(this.toString());
783
+ }, t.prototype.lighten = function(r) {
784
+ r === void 0 && (r = 10);
785
+ var e = this.toHsl();
786
+ return e.l += r / 100, e.l = O(e.l), new t(e);
787
+ }, t.prototype.brighten = function(r) {
788
+ r === void 0 && (r = 10);
789
+ var e = this.toRgb();
790
+ return e.r = Math.max(0, Math.min(255, e.r - Math.round(255 * -(r / 100)))), e.g = Math.max(0, Math.min(255, e.g - Math.round(255 * -(r / 100)))), e.b = Math.max(0, Math.min(255, e.b - Math.round(255 * -(r / 100)))), new t(e);
791
+ }, t.prototype.darken = function(r) {
792
+ r === void 0 && (r = 10);
793
+ var e = this.toHsl();
794
+ return e.l -= r / 100, e.l = O(e.l), new t(e);
795
+ }, t.prototype.tint = function(r) {
796
+ return r === void 0 && (r = 10), this.mix("white", r);
797
+ }, t.prototype.shade = function(r) {
798
+ return r === void 0 && (r = 10), this.mix("black", r);
799
+ }, t.prototype.desaturate = function(r) {
800
+ r === void 0 && (r = 10);
801
+ var e = this.toHsl();
802
+ return e.s -= r / 100, e.s = O(e.s), new t(e);
803
+ }, t.prototype.saturate = function(r) {
804
+ r === void 0 && (r = 10);
805
+ var e = this.toHsl();
806
+ return e.s += r / 100, e.s = O(e.s), new t(e);
807
+ }, t.prototype.greyscale = function() {
1677
808
  return this.desaturate(100);
1678
- }, e.prototype.spin = function(t) {
1679
- var n = this.toHsl(), r = (n.h + t) % 360;
1680
- return n.h = r < 0 ? 360 + r : r, new e(n);
1681
- }, e.prototype.mix = function(t, n) {
1682
- n === void 0 && (n = 50);
1683
- var r = this.toRgb(), o = new e(t).toRgb(), a = n / 100, s = {
1684
- r: (o.r - r.r) * a + r.r,
1685
- g: (o.g - r.g) * a + r.g,
1686
- b: (o.b - r.b) * a + r.b,
1687
- a: (o.a - r.a) * a + r.a
809
+ }, t.prototype.spin = function(r) {
810
+ var e = this.toHsl(), n = (e.h + r) % 360;
811
+ return e.h = n < 0 ? 360 + n : n, new t(e);
812
+ }, t.prototype.mix = function(r, e) {
813
+ e === void 0 && (e = 50);
814
+ var n = this.toRgb(), a = new t(r).toRgb(), o = e / 100, i = {
815
+ r: (a.r - n.r) * o + n.r,
816
+ g: (a.g - n.g) * o + n.g,
817
+ b: (a.b - n.b) * o + n.b,
818
+ a: (a.a - n.a) * o + n.a
1688
819
  };
1689
- return new e(s);
1690
- }, e.prototype.analogous = function(t, n) {
1691
- t === void 0 && (t = 6), n === void 0 && (n = 30);
1692
- var r = this.toHsl(), o = 360 / n, a = [this];
1693
- for (r.h = (r.h - (o * t >> 1) + 720) % 360; --t; )
1694
- r.h = (r.h + o) % 360, a.push(new e(r));
1695
- return a;
1696
- }, e.prototype.complement = function() {
1697
- var t = this.toHsl();
1698
- return t.h = (t.h + 180) % 360, new e(t);
1699
- }, e.prototype.monochromatic = function(t) {
1700
- t === void 0 && (t = 6);
1701
- for (var n = this.toHsv(), r = n.h, o = n.s, a = n.v, s = [], i = 1 / t; t--; )
1702
- s.push(new e({ h: r, s: o, v: a })), a = (a + i) % 1;
1703
- return s;
1704
- }, e.prototype.splitcomplement = function() {
1705
- var t = this.toHsl(), n = t.h;
820
+ return new t(i);
821
+ }, t.prototype.analogous = function(r, e) {
822
+ r === void 0 && (r = 6), e === void 0 && (e = 30);
823
+ var n = this.toHsl(), a = 360 / e, o = [this];
824
+ for (n.h = (n.h - (a * r >> 1) + 720) % 360; --r; )
825
+ n.h = (n.h + a) % 360, o.push(new t(n));
826
+ return o;
827
+ }, t.prototype.complement = function() {
828
+ var r = this.toHsl();
829
+ return r.h = (r.h + 180) % 360, new t(r);
830
+ }, t.prototype.monochromatic = function(r) {
831
+ r === void 0 && (r = 6);
832
+ for (var e = this.toHsv(), n = e.h, a = e.s, o = e.v, i = [], s = 1 / r; r--; )
833
+ i.push(new t({ h: n, s: a, v: o })), o = (o + s) % 1;
834
+ return i;
835
+ }, t.prototype.splitcomplement = function() {
836
+ var r = this.toHsl(), e = r.h;
1706
837
  return [
1707
838
  this,
1708
- new e({ h: (n + 72) % 360, s: t.s, l: t.l }),
1709
- new e({ h: (n + 216) % 360, s: t.s, l: t.l })
839
+ new t({ h: (e + 72) % 360, s: r.s, l: r.l }),
840
+ new t({ h: (e + 216) % 360, s: r.s, l: r.l })
1710
841
  ];
1711
- }, e.prototype.onBackground = function(t) {
1712
- var n = this.toRgb(), r = new e(t).toRgb(), o = n.a + r.a * (1 - n.a);
1713
- return new e({
1714
- r: (n.r * n.a + r.r * r.a * (1 - n.a)) / o,
1715
- g: (n.g * n.a + r.g * r.a * (1 - n.a)) / o,
1716
- b: (n.b * n.a + r.b * r.a * (1 - n.a)) / o,
1717
- a: o
842
+ }, t.prototype.onBackground = function(r) {
843
+ var e = this.toRgb(), n = new t(r).toRgb(), a = e.a + n.a * (1 - e.a);
844
+ return new t({
845
+ r: (e.r * e.a + n.r * n.a * (1 - e.a)) / a,
846
+ g: (e.g * e.a + n.g * n.a * (1 - e.a)) / a,
847
+ b: (e.b * e.a + n.b * n.a * (1 - e.a)) / a,
848
+ a
1718
849
  });
1719
- }, e.prototype.triad = function() {
850
+ }, t.prototype.triad = function() {
1720
851
  return this.polyad(3);
1721
- }, e.prototype.tetrad = function() {
852
+ }, t.prototype.tetrad = function() {
1722
853
  return this.polyad(4);
1723
- }, e.prototype.polyad = function(t) {
1724
- for (var n = this.toHsl(), r = n.h, o = [this], a = 360 / t, s = 1; s < t; s++)
1725
- o.push(new e({ h: (r + s * a) % 360, s: n.s, l: n.l }));
1726
- return o;
1727
- }, e.prototype.equals = function(t) {
1728
- return this.toRgbString() === new e(t).toRgbString();
1729
- }, e;
854
+ }, t.prototype.polyad = function(r) {
855
+ for (var e = this.toHsl(), n = e.h, a = [this], o = 360 / r, i = 1; i < r; i++)
856
+ a.push(new t({ h: (n + i * o) % 360, s: e.s, l: e.l }));
857
+ return a;
858
+ }, t.prototype.equals = function(r) {
859
+ return this.toRgbString() === new t(r).toRgbString();
860
+ }, t;
1730
861
  })()
1731
862
  );
1732
- function H(e, t = 20) {
1733
- return e.mix("#141414", t).toString();
1734
- }
1735
- function qo(e) {
1736
- const t = Dt(), n = Q("button");
1737
- return c(() => {
1738
- let r = {}, o = e.color;
1739
- if (o) {
1740
- const a = o.match(/var\((.*?)\)/);
1741
- a && (o = window.getComputedStyle(window.document.documentElement).getPropertyValue(a[1]));
1742
- const s = new Jo(o), i = e.dark ? s.tint(20).toString() : H(s, 20);
1743
- if (e.plain)
1744
- r = n.cssVarBlock({
1745
- "bg-color": e.dark ? H(s, 90) : s.tint(90).toString(),
1746
- "text-color": o,
1747
- "border-color": e.dark ? H(s, 50) : s.tint(50).toString(),
1748
- "hover-text-color": `var(${n.cssVarName("color-white")})`,
1749
- "hover-bg-color": o,
1750
- "hover-border-color": o,
1751
- "active-bg-color": i,
1752
- "active-text-color": `var(${n.cssVarName("color-white")})`,
1753
- "active-border-color": i
1754
- }), t.value && (r[n.cssVarBlockName("disabled-bg-color")] = e.dark ? H(s, 90) : s.tint(90).toString(), r[n.cssVarBlockName("disabled-text-color")] = e.dark ? H(s, 50) : s.tint(50).toString(), r[n.cssVarBlockName("disabled-border-color")] = e.dark ? H(s, 80) : s.tint(80).toString());
863
+ function M(t, r = 20) {
864
+ return t.mix("#141414", r).toString();
865
+ }
866
+ function $e(t) {
867
+ const r = xt(), e = F("button");
868
+ return h(() => {
869
+ let n = {}, a = t.color;
870
+ if (a) {
871
+ const o = a.match(/var\((.*?)\)/);
872
+ o && (a = window.getComputedStyle(window.document.documentElement).getPropertyValue(o[1]));
873
+ const i = new Me(a), s = t.dark ? i.tint(20).toString() : M(i, 20);
874
+ if (t.plain)
875
+ n = e.cssVarBlock({
876
+ "bg-color": t.dark ? M(i, 90) : i.tint(90).toString(),
877
+ "text-color": a,
878
+ "border-color": t.dark ? M(i, 50) : i.tint(50).toString(),
879
+ "hover-text-color": `var(${e.cssVarName("color-white")})`,
880
+ "hover-bg-color": a,
881
+ "hover-border-color": a,
882
+ "active-bg-color": s,
883
+ "active-text-color": `var(${e.cssVarName("color-white")})`,
884
+ "active-border-color": s
885
+ }), r.value && (n[e.cssVarBlockName("disabled-bg-color")] = t.dark ? M(i, 90) : i.tint(90).toString(), n[e.cssVarBlockName("disabled-text-color")] = t.dark ? M(i, 50) : i.tint(50).toString(), n[e.cssVarBlockName("disabled-border-color")] = t.dark ? M(i, 80) : i.tint(80).toString());
1755
886
  else {
1756
- const f = e.dark ? H(s, 30) : s.tint(30).toString(), b = s.isDark() ? `var(${n.cssVarName("color-white")})` : `var(${n.cssVarName("color-black")})`;
1757
- if (r = n.cssVarBlock({
1758
- "bg-color": o,
1759
- "text-color": b,
1760
- "border-color": o,
887
+ const f = t.dark ? M(i, 30) : i.tint(30).toString(), m = i.isDark() ? `var(${e.cssVarName("color-white")})` : `var(${e.cssVarName("color-black")})`;
888
+ if (n = e.cssVarBlock({
889
+ "bg-color": a,
890
+ "text-color": m,
891
+ "border-color": a,
1761
892
  "hover-bg-color": f,
1762
- "hover-text-color": b,
893
+ "hover-text-color": m,
1763
894
  "hover-border-color": f,
1764
- "active-bg-color": i,
1765
- "active-border-color": i
1766
- }), t.value) {
1767
- const h = e.dark ? H(s, 50) : s.tint(50).toString();
1768
- r[n.cssVarBlockName("disabled-bg-color")] = h, r[n.cssVarBlockName("disabled-text-color")] = e.dark ? "rgba(255, 255, 255, 0.5)" : `var(${n.cssVarName("color-white")})`, r[n.cssVarBlockName("disabled-border-color")] = h;
895
+ "active-bg-color": s,
896
+ "active-border-color": s
897
+ }), r.value) {
898
+ const v = t.dark ? M(i, 50) : i.tint(50).toString();
899
+ n[e.cssVarBlockName("disabled-bg-color")] = v, n[e.cssVarBlockName("disabled-text-color")] = t.dark ? "rgba(255, 255, 255, 0.5)" : `var(${e.cssVarName("color-white")})`, n[e.cssVarBlockName("disabled-border-color")] = v;
1769
900
  }
1770
901
  }
1771
902
  }
1772
- return r;
903
+ return n;
1773
904
  });
1774
905
  }
1775
- const Yo = N({
906
+ const Ne = I({
1776
907
  name: "ElButton",
1777
908
  __name: "button",
1778
- props: Ie,
1779
- emits: zo,
1780
- setup(e, { expose: t, emit: n }) {
1781
- const r = e, o = n, a = qo(r), s = Q("button"), {
1782
- _ref: i,
909
+ props: U,
910
+ emits: de,
911
+ setup(t, { expose: r, emit: e }) {
912
+ const n = t, a = e, o = $e(n), i = F("button"), {
913
+ _ref: s,
1783
914
  _size: f,
1784
- _type: b,
1785
- _disabled: h,
1786
- _props: g,
1787
- _plain: _,
1788
- _round: M,
1789
- _text: z,
1790
- shouldAddSpace: u,
1791
- handleClick: v
1792
- } = Io(r, o), d = c(() => [
1793
- s.b(),
1794
- s.m(b.value),
1795
- s.m(f.value),
1796
- s.is("disabled", h.value),
1797
- s.is("loading", r.loading),
1798
- s.is("plain", _.value),
1799
- s.is("round", M.value),
1800
- s.is("circle", r.circle),
1801
- s.is("text", z.value),
1802
- s.is("link", r.link),
1803
- s.is("has-bg", r.bg)
915
+ _type: m,
916
+ _disabled: v,
917
+ _props: _,
918
+ _plain: H,
919
+ _round: C,
920
+ _text: T,
921
+ shouldAddSpace: c,
922
+ handleClick: d
923
+ } = ue(n, a), u = h(() => [
924
+ i.b(),
925
+ i.m(m.value),
926
+ i.m(f.value),
927
+ i.is("disabled", v.value),
928
+ i.is("loading", n.loading),
929
+ i.is("plain", H.value),
930
+ i.is("round", C.value),
931
+ i.is("circle", n.circle),
932
+ i.is("text", T.value),
933
+ i.is("link", n.link),
934
+ i.is("has-bg", n.bg)
1804
935
  ]);
1805
- return t({
1806
- ref: i,
936
+ return r({
937
+ ref: s,
1807
938
  size: f,
1808
- type: b,
1809
- disabled: h,
1810
- shouldAddSpace: u
1811
- }), (p, w) => (m(), A(he(p.tag), dt({
939
+ type: m,
940
+ disabled: v,
941
+ shouldAddSpace: c
942
+ }), (l, b) => (S(), B(G(l.tag), lt({
1812
943
  ref_key: "_ref",
1813
- ref: i
1814
- }, l(g), {
1815
- class: d.value,
1816
- style: l(a),
1817
- onClick: l(v)
944
+ ref: s
945
+ }, g(_), {
946
+ class: u.value,
947
+ style: g(o),
948
+ onClick: g(d)
1818
949
  }), {
1819
- default: D(() => [
1820
- p.loading ? (m(), O(
1821
- mt,
950
+ default: V(() => [
951
+ l.loading ? (S(), P(
952
+ It,
1822
953
  { key: 0 },
1823
954
  [
1824
- p.$slots.loading ? F(p.$slots, "loading", { key: 0 }) : (m(), A(l(be), {
955
+ l.$slots.loading ? R(l.$slots, "loading", { key: 0 }) : (S(), B(g(at), {
1825
956
  key: 1,
1826
- class: P(l(s).is("loading"))
957
+ class: W(g(i).is("loading"))
1827
958
  }, {
1828
- default: D(() => [
1829
- (m(), A(he(p.loadingIcon)))
959
+ default: V(() => [
960
+ (S(), B(G(l.loadingIcon)))
1830
961
  ]),
1831
962
  _: 1
1832
963
  }, 8, ["class"]))
1833
964
  ],
1834
965
  64
1835
- )) : p.icon || p.$slots.icon ? (m(), A(l(be), { key: 1 }, {
1836
- default: D(() => [
1837
- p.icon ? (m(), A(he(p.icon), { key: 0 })) : F(p.$slots, "icon", { key: 1 })
966
+ )) : l.icon || l.$slots.icon ? (S(), B(g(at), { key: 1 }, {
967
+ default: V(() => [
968
+ l.icon ? (S(), B(G(l.icon), { key: 0 })) : R(l.$slots, "icon", { key: 1 })
1838
969
  ]),
1839
970
  _: 3
1840
- })) : q("v-if", !0),
1841
- p.$slots.default ? (m(), O(
971
+ })) : tt("v-if", !0),
972
+ l.$slots.default ? (S(), P(
1842
973
  "span",
1843
974
  {
1844
975
  key: 2,
1845
- class: P({ [l(s).em("text", "expand")]: l(u) })
976
+ class: W({ [g(i).em("text", "expand")]: g(c) })
1846
977
  },
1847
978
  [
1848
- F(p.$slots, "default")
979
+ R(l.$slots, "default")
1849
980
  ],
1850
981
  2
1851
- )) : q("v-if", !0)
982
+ )) : tt("v-if", !0)
1852
983
  ]),
1853
984
  _: 3
1854
985
  }, 16, ["class", "style", "onClick"]));
1855
986
  }
1856
987
  });
1857
- var Xo = /* @__PURE__ */ ce(Yo, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/button/src/button.vue"]]);
1858
- const Qo = {
1859
- size: Ie.size,
1860
- type: Ie.type,
988
+ var Be = /* @__PURE__ */ Q(Ne, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/button/src/button.vue"]]);
989
+ const Ae = {
990
+ size: U.size,
991
+ type: U.type,
1861
992
  direction: {
1862
- type: k(String),
993
+ type: j(String),
1863
994
  values: ["horizontal", "vertical"],
1864
995
  default: "horizontal"
1865
996
  }
1866
- }, ea = N({
997
+ }, Ee = I({
1867
998
  name: "ElButtonGroup",
1868
999
  __name: "button-group",
1869
- props: Qo,
1870
- setup(e) {
1871
- const t = e;
1872
- ft(
1873
- Rt,
1874
- sn({
1875
- size: Ze(t, "size"),
1876
- type: Ze(t, "type")
1000
+ props: Ae,
1001
+ setup(t) {
1002
+ const r = t;
1003
+ Rt(
1004
+ kt,
1005
+ Vt({
1006
+ size: et(r, "size"),
1007
+ type: et(r, "type")
1877
1008
  })
1878
1009
  );
1879
- const n = Q("button");
1880
- return (r, o) => (m(), O(
1010
+ const e = F("button");
1011
+ return (n, a) => (S(), P(
1881
1012
  "div",
1882
1013
  {
1883
- class: P([l(n).b("group"), l(n).bm("group", t.direction)])
1014
+ class: W([g(e).b("group"), g(e).bm("group", r.direction)])
1884
1015
  },
1885
1016
  [
1886
- F(r.$slots, "default")
1017
+ R(n.$slots, "default")
1887
1018
  ],
1888
1019
  2
1889
1020
  ));
1890
1021
  }
1891
1022
  });
1892
- var Lt = /* @__PURE__ */ ce(ea, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/button/src/button-group.vue"]]);
1893
- const Vt = Ge(Xo, {
1894
- ButtonGroup: Lt
1895
- });
1896
- oo(Lt);
1897
- const ta = oe({
1898
- a11y: {
1899
- type: Boolean,
1900
- default: !0
1901
- },
1902
- locale: {
1903
- type: k(Object)
1904
- },
1905
- size: Pt,
1906
- button: {
1907
- type: k(Object)
1908
- },
1909
- card: {
1910
- type: k(Object)
1911
- },
1912
- dialog: {
1913
- type: k(Object)
1914
- },
1915
- link: {
1916
- type: k(Object)
1917
- },
1918
- experimentalFeatures: {
1919
- type: k(Object)
1920
- },
1921
- keyboardNavigation: {
1922
- type: Boolean,
1923
- default: !0
1924
- },
1925
- message: {
1926
- type: k(Object)
1927
- },
1928
- zIndex: Number,
1929
- namespace: {
1930
- type: String,
1931
- default: "el"
1932
- },
1933
- ...eo
1934
- }), C = {
1935
- placement: "top"
1936
- };
1937
- N({
1938
- name: "ElConfigProvider",
1939
- props: ta,
1940
- setup(e, { slots: t }) {
1941
- const n = zt(e);
1942
- return le(
1943
- () => e.message,
1944
- (r) => {
1945
- var o, a;
1946
- Object.assign(C, (a = (o = n?.value) == null ? void 0 : o.message) != null ? a : {}, r ?? {});
1947
- },
1948
- { immediate: !0, deep: !0 }
1949
- ), () => F(t, "default", { config: n?.value });
1950
- }
1951
- });
1952
- const Gt = [
1953
- "primary",
1954
- "success",
1955
- "info",
1956
- "warning",
1957
- "error"
1958
- ], Kt = [
1959
- "top",
1960
- "top-left",
1961
- "top-right",
1962
- "bottom",
1963
- "bottom-left",
1964
- "bottom-right"
1965
- ], Y = "top", x = xo({
1966
- customClass: "",
1967
- dangerouslyUseHTMLString: !1,
1968
- duration: 3e3,
1969
- icon: void 0,
1970
- id: "",
1971
- message: "",
1972
- onClose: void 0,
1973
- showClose: !1,
1974
- type: "info",
1975
- plain: !1,
1976
- offset: 16,
1977
- placement: void 0,
1978
- zIndex: 0,
1979
- grouping: !1,
1980
- repeatNum: 1,
1981
- appendTo: ne ? document.body : void 0
1982
- }), na = oe({
1983
- customClass: {
1984
- type: String,
1985
- default: x.customClass
1986
- },
1987
- dangerouslyUseHTMLString: {
1988
- type: Boolean,
1989
- default: x.dangerouslyUseHTMLString
1990
- },
1991
- duration: {
1992
- type: Number,
1993
- default: x.duration
1994
- },
1995
- icon: {
1996
- type: Oe,
1997
- default: x.icon
1998
- },
1999
- id: {
2000
- type: String,
2001
- default: x.id
2002
- },
2003
- message: {
2004
- type: k([
2005
- String,
2006
- Object,
2007
- Function
2008
- ]),
2009
- default: x.message
2010
- },
2011
- onClose: {
2012
- type: k(Function),
2013
- default: x.onClose
2014
- },
2015
- showClose: {
2016
- type: Boolean,
2017
- default: x.showClose
2018
- },
2019
- type: {
2020
- type: String,
2021
- values: Gt,
2022
- default: x.type
2023
- },
2024
- plain: {
2025
- type: Boolean,
2026
- default: x.plain
2027
- },
2028
- offset: {
2029
- type: Number,
2030
- default: x.offset
2031
- },
2032
- placement: {
2033
- type: String,
2034
- values: Kt,
2035
- default: x.placement
2036
- },
2037
- zIndex: {
2038
- type: Number,
2039
- default: x.zIndex
2040
- },
2041
- grouping: {
2042
- type: Boolean,
2043
- default: x.grouping
2044
- },
2045
- repeatNum: {
2046
- type: Number,
2047
- default: x.repeatNum
2048
- }
2049
- }), ra = {
2050
- destroy: () => !0
2051
- }, B = bt(
2052
- {}
2053
- ), oa = (e) => (B[e] || (B[e] = bt([])), B[e]), aa = (e, t) => {
2054
- const n = B[t] || [], r = n.findIndex((s) => s.id === e), o = n[r];
2055
- let a;
2056
- return r > 0 && (a = n[r - 1]), { current: o, prev: a };
2057
- }, sa = (e, t) => {
2058
- const { prev: n } = aa(e, t);
2059
- return n ? n.vm.exposed.bottom.value : 0;
2060
- }, ia = (e, t, n) => (B[n] || []).findIndex((a) => a.id === e) > 0 ? 16 : t, la = ["id"], ca = ["innerHTML"], ua = N({
2061
- name: "ElMessage",
2062
- __name: "message",
2063
- props: na,
2064
- emits: ra,
2065
- setup(e, { expose: t, emit: n }) {
2066
- const { Close: r } = wo, o = e, a = n, s = T(!1), { ns: i, zIndex: f } = to("message"), { currentZIndex: b, nextZIndex: h } = f, g = T(), _ = T(!1), M = T(0);
2067
- let z;
2068
- const u = c(
2069
- () => o.type ? o.type === "error" ? "danger" : o.type : "info"
2070
- ), v = c(() => {
2071
- const y = o.type;
2072
- return { [i.bm("icon", y)]: y && at[y] };
2073
- }), d = c(
2074
- () => o.icon || at[o.type] || ""
2075
- ), p = c(() => o.placement || Y), w = c(() => sa(o.id, p.value)), ue = c(() => ia(o.id, o.offset, p.value) + w.value), Zt = c(() => M.value + ue.value), Jt = c(() => p.value.includes("left") ? i.is("left") : p.value.includes("right") ? i.is("right") : i.is("center")), Ue = c(
2076
- () => p.value.startsWith("top") ? "top" : "bottom"
2077
- ), qt = c(() => ({
2078
- [Ue.value]: `${ue.value}px`,
2079
- zIndex: b.value
2080
- }));
2081
- function Se() {
2082
- o.duration !== 0 && ({ stop: z } = Fr(() => {
2083
- fe();
2084
- }, o.duration));
2085
- }
2086
- function We() {
2087
- z?.();
2088
- }
2089
- function fe() {
2090
- _.value = !1, cn(() => {
2091
- var y;
2092
- s.value || ((y = o.onClose) == null || y.call(o), a("destroy"));
2093
- });
2094
- }
2095
- function Yt(y) {
2096
- To(y) === Ae.esc && fe();
2097
- }
2098
- return ut(() => {
2099
- Se(), h(), _.value = !0;
2100
- }), le(
2101
- () => o.repeatNum,
2102
- () => {
2103
- We(), Se();
2104
- }
2105
- ), Dr(document, "keydown", Yt), Lr(g, () => {
2106
- M.value = g.value.getBoundingClientRect().height;
2107
- }), t({
2108
- visible: _,
2109
- bottom: Zt,
2110
- close: fe
2111
- }), (y, ae) => (m(), A(pt, {
2112
- name: l(i).b("fade"),
2113
- onBeforeEnter: ae[0] || (ae[0] = (Xt) => s.value = !0),
2114
- onBeforeLeave: y.onClose,
2115
- onAfterLeave: ae[1] || (ae[1] = (Xt) => y.$emit("destroy")),
2116
- persisted: ""
2117
- }, {
2118
- default: D(() => [
2119
- ht(R("div", {
2120
- id: y.id,
2121
- ref_key: "messageRef",
2122
- ref: g,
2123
- class: P([
2124
- l(i).b(),
2125
- { [l(i).m(y.type)]: y.type },
2126
- l(i).is("closable", y.showClose),
2127
- l(i).is("plain", y.plain),
2128
- l(i).is("bottom", Ue.value === "bottom"),
2129
- Jt.value,
2130
- y.customClass
2131
- ]),
2132
- style: gt(qt.value),
2133
- role: "alert",
2134
- onMouseenter: We,
2135
- onMouseleave: Se
2136
- }, [
2137
- y.repeatNum > 1 ? (m(), A(l(Oo), {
2138
- key: 0,
2139
- value: y.repeatNum,
2140
- type: u.value,
2141
- class: P(l(i).e("badge"))
2142
- }, null, 8, ["value", "type", "class"])) : q("v-if", !0),
2143
- d.value ? (m(), A(l(be), {
2144
- key: 1,
2145
- class: P([l(i).e("icon"), v.value])
2146
- }, {
2147
- default: D(() => [
2148
- (m(), A(he(d.value)))
2149
- ]),
2150
- _: 1
2151
- }, 8, ["class"])) : q("v-if", !0),
2152
- F(y.$slots, "default", {}, () => [
2153
- y.dangerouslyUseHTMLString ? (m(), O(
2154
- mt,
2155
- { key: 1 },
2156
- [
2157
- q(" Caution here, message could've been compromised, never use user's input as message "),
2158
- R("p", {
2159
- class: P(l(i).e("content")),
2160
- innerHTML: y.message
2161
- }, null, 10, ca)
2162
- ],
2163
- 2112
2164
- )) : (m(), O(
2165
- "p",
2166
- {
2167
- key: 0,
2168
- class: P(l(i).e("content"))
2169
- },
2170
- ye(y.message),
2171
- 3
2172
- ))
2173
- ]),
2174
- y.showClose ? (m(), A(l(be), {
2175
- key: 2,
2176
- class: P(l(i).e("closeBtn")),
2177
- onClick: ln(fe, ["stop"])
2178
- }, {
2179
- default: D(() => [
2180
- Be(l(r))
2181
- ]),
2182
- _: 1
2183
- }, 8, ["class"])) : q("v-if", !0)
2184
- ], 46, la), [
2185
- [vt, _.value]
2186
- ])
2187
- ]),
2188
- _: 3
2189
- }, 8, ["name", "onBeforeLeave"]));
2190
- }
2191
- });
2192
- var fa = /* @__PURE__ */ ce(ua, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/message/src/message.vue"]]);
2193
- let da = 1;
2194
- const pa = (e) => {
2195
- if (!e.appendTo)
2196
- e.appendTo = document.body;
2197
- else if (ee(e.appendTo)) {
2198
- let n = document.querySelector(e.appendTo);
2199
- Ir(n) || (re(
2200
- "ElMessage",
2201
- "the appendTo option is not an HTMLElement. Falling back to document.body."
2202
- ), n = document.body), e.appendTo = n;
2203
- }
2204
- }, ha = (e) => {
2205
- !e.placement && ee(C.placement) && C.placement && (e.placement = C.placement), e.placement || (e.placement = Y), Kt.includes(e.placement) || (re(
2206
- "ElMessage",
2207
- `Invalid placement: ${e.placement}. Falling back to '${Y}'.`
2208
- ), e.placement = Y);
2209
- }, Ut = (e) => {
2210
- const t = !e || ee(e) || yt(e) || ve(e) ? { message: e } : e, n = {
2211
- ...x,
2212
- ...t
2213
- };
2214
- return pa(n), ha(n), Ce(C.grouping) && !n.grouping && (n.grouping = C.grouping), W(C.duration) && n.duration === 3e3 && (n.duration = C.duration), W(C.offset) && n.offset === 16 && (n.offset = C.offset), Ce(C.showClose) && !n.showClose && (n.showClose = C.showClose), Ce(C.plain) && !n.plain && (n.plain = C.plain), n;
2215
- }, ga = (e) => {
2216
- const t = e.props.placement || Y, n = B[t], r = n.indexOf(e);
2217
- if (r === -1)
2218
- return;
2219
- n.splice(r, 1);
2220
- const { handler: o } = e;
2221
- o.close();
2222
- }, va = ({ appendTo: e, ...t }, n) => {
2223
- const r = `message_${da++}`, o = t.onClose, a = document.createElement("div"), s = {
2224
- ...t,
2225
- id: r,
2226
- onClose: () => {
2227
- o?.(), ga(h);
2228
- },
2229
- onDestroy: () => {
2230
- Je(null, a);
2231
- }
2232
- }, i = Be(
2233
- fa,
2234
- s,
2235
- ve(s.message) || yt(s.message) ? {
2236
- default: ve(s.message) ? s.message : () => s.message
2237
- } : null
2238
- );
2239
- i.appContext = n || Z._context, Je(i, a), e.appendChild(a.firstElementChild);
2240
- const f = i.component, h = {
2241
- id: r,
2242
- vnode: i,
2243
- vm: f,
2244
- handler: {
2245
- close: () => {
2246
- f.exposed.close();
2247
- }
2248
- },
2249
- props: i.component.props
2250
- };
2251
- return h;
2252
- }, Z = (e = {}, t) => {
2253
- if (!ne)
2254
- return { close: () => {
2255
- } };
2256
- const n = Ut(e), r = oa(
2257
- n.placement || Y
2258
- );
2259
- if (n.grouping && r.length) {
2260
- const a = r.find(
2261
- ({ vnode: s }) => {
2262
- var i;
2263
- return ((i = s.props) == null ? void 0 : i.message) === n.message;
2264
- }
2265
- );
2266
- if (a)
2267
- return a.props.repeatNum += 1, a.props.type = n.type, a.handler;
2268
- }
2269
- if (W(C.max) && r.length >= C.max)
2270
- return { close: () => {
2271
- } };
2272
- const o = va(n, t);
2273
- return r.push(o), o.handler;
2274
- };
2275
- Gt.forEach((e) => {
2276
- Z[e] = (t = {}, n) => {
2277
- const r = Ut(t);
2278
- return Z({ ...r, type: e }, n);
2279
- };
1023
+ var Mt = /* @__PURE__ */ Q(Ee, [["__file", "/home/runner/work/element-plus/element-plus/packages/components/button/src/button-group.vue"]]);
1024
+ const $t = yt(Be, {
1025
+ ButtonGroup: Mt
2280
1026
  });
2281
- function ma(e) {
2282
- for (const t in B)
2283
- if (Ne(B, t)) {
2284
- const n = [...B[t]];
2285
- for (const r of n)
2286
- (!e || e === r.props.type) && r.handler.close();
2287
- }
2288
- }
2289
- function ba(e) {
2290
- if (!B[e])
2291
- return;
2292
- [...B[e]].forEach((n) => n.handler.close());
2293
- }
2294
- Z.closeAll = ma;
2295
- Z.closeAllByPlacement = ba;
2296
- Z._context = null;
2297
- const Wt = ro(Z, "$message"), _a = /* @__PURE__ */ N({
1027
+ Qt(Mt);
1028
+ const Ie = /* @__PURE__ */ I({
2298
1029
  __name: "TestComp",
2299
- setup(e) {
2300
- const t = T(0);
2301
- function n() {
2302
- t.value = t.value + 1, Wt({
2303
- message: `第次${t.value}点击!`,
1030
+ setup(t) {
1031
+ const r = E(0);
1032
+ function e() {
1033
+ r.value = r.value + 1, ht({
1034
+ message: `第次${r.value}点击!`,
2304
1035
  type: "success"
2305
1036
  });
2306
1037
  }
2307
- return (r, o) => {
2308
- const a = Vt;
2309
- return m(), A(a, { onClick: n }, {
2310
- default: D(() => [
2311
- ze(ye(l(t)), 1)
1038
+ return (n, a) => {
1039
+ const o = $t;
1040
+ return S(), B(o, { onClick: e }, {
1041
+ default: V(() => [
1042
+ ft(dt(g(r)), 1)
2312
1043
  ]),
2313
1044
  _: 1
2314
1045
  });
2315
1046
  };
2316
1047
  }
2317
- }), wa = /* @__PURE__ */ N({
1048
+ }), Re = /* @__PURE__ */ I({
2318
1049
  __name: "BtnComp",
2319
- setup(e) {
2320
- const t = T(0);
2321
- function n() {
2322
- t.value = t.value + 100, Wt({
2323
- message: `第次${t.value / 100}点击!`,
1050
+ setup(t) {
1051
+ const r = E(0);
1052
+ function e() {
1053
+ r.value = r.value + 100, ht({
1054
+ message: `第次${r.value / 100}点击!`,
2324
1055
  type: "warning"
2325
1056
  });
2326
1057
  }
2327
- return (r, o) => {
2328
- const a = Vt;
2329
- return m(), A(a, { onClick: n }, {
2330
- default: D(() => [
2331
- ze(ye(l(t)), 1)
1058
+ return (n, a) => {
1059
+ const o = $t;
1060
+ return S(), B(o, { onClick: e }, {
1061
+ default: V(() => [
1062
+ ft(dt(g(r)), 1)
2332
1063
  ]),
2333
1064
  _: 1
2334
1065
  });
@@ -2336,6 +1067,6 @@ const Wt = ro(Z, "$message"), _a = /* @__PURE__ */ N({
2336
1067
  }
2337
1068
  });
2338
1069
  export {
2339
- _a as BtnComp1,
2340
- wa as BtnComp100
1070
+ Ie as BtnComp1,
1071
+ Re as BtnComp100
2341
1072
  };