@vaebe/ccui 2.0.0-beta.0 → 2.0.1-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -0
- package/button/index.es.js +28 -22
- package/button/index.umd.js +1 -1
- package/calendar/index.es.js +445 -90
- package/calendar/index.umd.js +1 -1
- package/ccui-cli.css +1 -1
- package/check-box/index.es.js +8 -2
- package/check-box/index.umd.js +1 -1
- package/chunk-Ndeg2fpE.js +20 -0
- package/collapse/index.es.js +10 -7
- package/collapse/index.umd.js +1 -1
- package/config-provider/chunk-C_CI6nMA.js +13 -0
- package/config-provider/en-BG83iZ_P.js +24 -0
- package/config-provider/index.es.js +408 -53
- package/config-provider/index.umd.js +1 -1
- package/config-provider/ja-B-93MQG5.js +56 -0
- package/config-provider/ko-86th3uXt.js +56 -0
- package/config-provider/zh-cn-BQE-LNg1.js +59 -0
- package/date-picker/ccui-cli.css +1 -1
- package/date-picker/index.es.js +664 -482
- package/date-picker/index.umd.js +1 -1
- package/drawer/index.es.js +271 -279
- package/drawer/index.umd.js +1 -1
- package/dropdown/index.es.js +187 -171
- package/dropdown/index.umd.js +1 -1
- package/empty/index.es.js +341 -24
- package/empty/index.umd.js +1 -1
- package/en-BVwCvuzF.js +24 -0
- package/float-button/index.es.js +1134 -46
- package/float-button/index.umd.js +1 -1
- package/form/index.es.js +1357 -261
- package/form/index.umd.js +1 -1
- package/icon/index.es.js +93 -10
- package/icon/index.umd.js +1 -1
- package/image/index.es.js +353 -36
- package/image/index.umd.js +1 -1
- package/input/index.es.js +24 -15
- package/input/index.umd.js +1 -1
- package/input-number/index.es.js +45 -25
- package/input-number/index.umd.js +1 -1
- package/ja-B4U4rt8A.js +56 -0
- package/ko-BG35I8uK.js +56 -0
- package/menu/index.es.js +3 -1
- package/menu/index.umd.js +1 -1
- package/message/index.es.js +1179 -86
- package/message/index.umd.js +1 -1
- package/modal/index.es.js +735 -335
- package/modal/index.umd.js +1 -1
- package/notification/index.es.js +1176 -83
- package/notification/index.umd.js +1 -1
- package/package.json +9 -9
- package/pagination/index.es.js +381 -60
- package/pagination/index.umd.js +1 -1
- package/popconfirm/index.es.js +469 -143
- package/popconfirm/index.umd.js +1 -1
- package/popover/index.es.js +192 -175
- package/popover/index.umd.js +1 -1
- package/radio/index.es.js +8 -2
- package/radio/index.umd.js +1 -1
- package/rate/index.es.js +22 -12
- package/rate/index.umd.js +1 -1
- package/select/index.es.js +135 -53
- package/select/index.umd.js +1 -1
- package/slider/index.es.js +165 -155
- package/slider/index.umd.js +1 -1
- package/steps/index.es.js +1140 -49
- package/steps/index.umd.js +1 -1
- package/switch/index.es.js +2 -0
- package/switch/index.umd.js +1 -1
- package/tabs/index.es.js +31 -5
- package/tabs/index.umd.js +1 -1
- package/tag/index.es.js +53 -35
- package/tag/index.umd.js +1 -1
- package/tooltip/index.es.js +78 -77
- package/tooltip/index.umd.js +1 -1
- package/tree/ccui-cli.css +1 -1
- package/tree/index.es.js +1491 -276
- package/tree/index.umd.js +1 -1
- package/typography/index.es.js +1213 -125
- package/typography/index.umd.js +1 -1
- package/vue-ccui.es.js +8726 -7604
- package/vue-ccui.umd.js +1 -1
- package/zh-cn-C8nbfD5S.js +59 -0
package/typography/index.es.js
CHANGED
|
@@ -1,22 +1,1110 @@
|
|
|
1
|
-
import { computed as e, createTextVNode as t, createVNode as n, defineComponent as r, h as i, nextTick as a, onBeforeUnmount as o,
|
|
1
|
+
import { computed as e, createTextVNode as t, createVNode as n, defineComponent as r, h as i, nextTick as a, onBeforeUnmount as o, onMounted as s, onUnmounted as c, ref as l, shallowRef as u, watch as d } from "vue";
|
|
2
|
+
//#region ../../node_modules/.pnpm/@iconify+vue@5.0.1_vue@3.5.33_typescript@5.9.3_/node_modules/@iconify/vue/dist/iconify.mjs
|
|
3
|
+
var f = /^[a-z0-9]+(-[a-z0-9]+)*$/, p = (e, t, n, r = "") => {
|
|
4
|
+
let i = e.split(":");
|
|
5
|
+
if (e.slice(0, 1) === "@") {
|
|
6
|
+
if (i.length < 2 || i.length > 3) return null;
|
|
7
|
+
r = i.shift().slice(1);
|
|
8
|
+
}
|
|
9
|
+
if (i.length > 3 || !i.length) return null;
|
|
10
|
+
if (i.length > 1) {
|
|
11
|
+
let e = i.pop(), n = i.pop(), a = {
|
|
12
|
+
provider: i.length > 0 ? i[0] : r,
|
|
13
|
+
prefix: n,
|
|
14
|
+
name: e
|
|
15
|
+
};
|
|
16
|
+
return t && !m(a) ? null : a;
|
|
17
|
+
}
|
|
18
|
+
let a = i[0], o = a.split("-");
|
|
19
|
+
if (o.length > 1) {
|
|
20
|
+
let e = {
|
|
21
|
+
provider: r,
|
|
22
|
+
prefix: o.shift(),
|
|
23
|
+
name: o.join("-")
|
|
24
|
+
};
|
|
25
|
+
return t && !m(e) ? null : e;
|
|
26
|
+
}
|
|
27
|
+
if (n && r === "") {
|
|
28
|
+
let e = {
|
|
29
|
+
provider: r,
|
|
30
|
+
prefix: "",
|
|
31
|
+
name: a
|
|
32
|
+
};
|
|
33
|
+
return t && !m(e, n) ? null : e;
|
|
34
|
+
}
|
|
35
|
+
return null;
|
|
36
|
+
}, m = (e, t) => e ? !!((t && e.prefix === "" || e.prefix) && e.name) : !1;
|
|
37
|
+
function h(e, t) {
|
|
38
|
+
let n = e.icons, r = e.aliases || Object.create(null), i = Object.create(null);
|
|
39
|
+
function a(e) {
|
|
40
|
+
if (n[e]) return i[e] = [];
|
|
41
|
+
if (!(e in i)) {
|
|
42
|
+
i[e] = null;
|
|
43
|
+
let t = r[e] && r[e].parent, n = t && a(t);
|
|
44
|
+
n && (i[e] = [t].concat(n));
|
|
45
|
+
}
|
|
46
|
+
return i[e];
|
|
47
|
+
}
|
|
48
|
+
return Object.keys(n).concat(Object.keys(r)).forEach(a), i;
|
|
49
|
+
}
|
|
50
|
+
var g = Object.freeze({
|
|
51
|
+
left: 0,
|
|
52
|
+
top: 0,
|
|
53
|
+
width: 16,
|
|
54
|
+
height: 16
|
|
55
|
+
}), _ = Object.freeze({
|
|
56
|
+
rotate: 0,
|
|
57
|
+
vFlip: !1,
|
|
58
|
+
hFlip: !1
|
|
59
|
+
}), v = Object.freeze({
|
|
60
|
+
...g,
|
|
61
|
+
..._
|
|
62
|
+
}), y = Object.freeze({
|
|
63
|
+
...v,
|
|
64
|
+
body: "",
|
|
65
|
+
hidden: !1
|
|
66
|
+
});
|
|
67
|
+
function b(e, t) {
|
|
68
|
+
let n = {};
|
|
69
|
+
!e.hFlip != !t.hFlip && (n.hFlip = !0), !e.vFlip != !t.vFlip && (n.vFlip = !0);
|
|
70
|
+
let r = ((e.rotate || 0) + (t.rotate || 0)) % 4;
|
|
71
|
+
return r && (n.rotate = r), n;
|
|
72
|
+
}
|
|
73
|
+
function x(e, t) {
|
|
74
|
+
let n = b(e, t);
|
|
75
|
+
for (let r in y) r in _ ? r in e && !(r in n) && (n[r] = _[r]) : r in t ? n[r] = t[r] : r in e && (n[r] = e[r]);
|
|
76
|
+
return n;
|
|
77
|
+
}
|
|
78
|
+
function S(e, t, n) {
|
|
79
|
+
let r = e.icons, i = e.aliases || Object.create(null), a = {};
|
|
80
|
+
function o(e) {
|
|
81
|
+
a = x(r[e] || i[e], a);
|
|
82
|
+
}
|
|
83
|
+
return o(t), n.forEach(o), x(e, a);
|
|
84
|
+
}
|
|
85
|
+
function C(e, t) {
|
|
86
|
+
let n = [];
|
|
87
|
+
if (typeof e != "object" || typeof e.icons != "object") return n;
|
|
88
|
+
e.not_found instanceof Array && e.not_found.forEach((e) => {
|
|
89
|
+
t(e, null), n.push(e);
|
|
90
|
+
});
|
|
91
|
+
let r = h(e);
|
|
92
|
+
for (let i in r) {
|
|
93
|
+
let a = r[i];
|
|
94
|
+
a && (t(i, S(e, i, a)), n.push(i));
|
|
95
|
+
}
|
|
96
|
+
return n;
|
|
97
|
+
}
|
|
98
|
+
var ee = {
|
|
99
|
+
provider: "",
|
|
100
|
+
aliases: {},
|
|
101
|
+
not_found: {},
|
|
102
|
+
...g
|
|
103
|
+
};
|
|
104
|
+
function w(e, t) {
|
|
105
|
+
for (let n in t) if (n in e && typeof e[n] != typeof t[n]) return !1;
|
|
106
|
+
return !0;
|
|
107
|
+
}
|
|
108
|
+
function T(e) {
|
|
109
|
+
if (typeof e != "object" || !e) return null;
|
|
110
|
+
let t = e;
|
|
111
|
+
if (typeof t.prefix != "string" || !e.icons || typeof e.icons != "object" || !w(e, ee)) return null;
|
|
112
|
+
let n = t.icons;
|
|
113
|
+
for (let e in n) {
|
|
114
|
+
let t = n[e];
|
|
115
|
+
if (!e || typeof t.body != "string" || !w(t, y)) return null;
|
|
116
|
+
}
|
|
117
|
+
let r = t.aliases || Object.create(null);
|
|
118
|
+
for (let e in r) {
|
|
119
|
+
let t = r[e], i = t.parent;
|
|
120
|
+
if (!e || typeof i != "string" || !n[i] && !r[i] || !w(t, y)) return null;
|
|
121
|
+
}
|
|
122
|
+
return t;
|
|
123
|
+
}
|
|
124
|
+
var E = Object.create(null);
|
|
125
|
+
function D(e, t) {
|
|
126
|
+
return {
|
|
127
|
+
provider: e,
|
|
128
|
+
prefix: t,
|
|
129
|
+
icons: Object.create(null),
|
|
130
|
+
missing: /* @__PURE__ */ new Set()
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
function O(e, t) {
|
|
134
|
+
let n = E[e] || (E[e] = Object.create(null));
|
|
135
|
+
return n[t] || (n[t] = D(e, t));
|
|
136
|
+
}
|
|
137
|
+
function k(e, t) {
|
|
138
|
+
return T(t) ? C(t, (t, n) => {
|
|
139
|
+
n ? e.icons[t] = n : e.missing.add(t);
|
|
140
|
+
}) : [];
|
|
141
|
+
}
|
|
142
|
+
function te(e, t, n) {
|
|
143
|
+
try {
|
|
144
|
+
if (typeof n.body == "string") return e.icons[t] = { ...n }, !0;
|
|
145
|
+
} catch {}
|
|
146
|
+
return !1;
|
|
147
|
+
}
|
|
148
|
+
var A = !1;
|
|
149
|
+
function j(e) {
|
|
150
|
+
return typeof e == "boolean" && (A = e), A;
|
|
151
|
+
}
|
|
152
|
+
function ne(e) {
|
|
153
|
+
let t = typeof e == "string" ? p(e, !0, A) : e;
|
|
154
|
+
if (t) {
|
|
155
|
+
let e = O(t.provider, t.prefix), n = t.name;
|
|
156
|
+
return e.icons[n] || (e.missing.has(n) ? null : void 0);
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
function re(e, t) {
|
|
160
|
+
let n = p(e, !0, A);
|
|
161
|
+
if (!n) return !1;
|
|
162
|
+
let r = O(n.provider, n.prefix);
|
|
163
|
+
return t ? te(r, n.name, t) : (r.missing.add(n.name), !0);
|
|
164
|
+
}
|
|
165
|
+
function M(e, t) {
|
|
166
|
+
if (typeof e != "object") return !1;
|
|
167
|
+
if (typeof t != "string" && (t = e.provider || ""), A && !t && !e.prefix) {
|
|
168
|
+
let t = !1;
|
|
169
|
+
return T(e) && (e.prefix = "", C(e, (e, n) => {
|
|
170
|
+
re(e, n) && (t = !0);
|
|
171
|
+
})), t;
|
|
172
|
+
}
|
|
173
|
+
let n = e.prefix;
|
|
174
|
+
return m({
|
|
175
|
+
prefix: n,
|
|
176
|
+
name: "a"
|
|
177
|
+
}) ? !!k(O(t, n), e) : !1;
|
|
178
|
+
}
|
|
179
|
+
var N = Object.freeze({
|
|
180
|
+
width: null,
|
|
181
|
+
height: null
|
|
182
|
+
}), P = Object.freeze({
|
|
183
|
+
...N,
|
|
184
|
+
..._
|
|
185
|
+
}), ie = /(-?[0-9.]*[0-9]+[0-9.]*)/g, ae = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
|
|
186
|
+
function oe(e, t, n) {
|
|
187
|
+
if (t === 1) return e;
|
|
188
|
+
if (n ||= 100, typeof e == "number") return Math.ceil(e * t * n) / n;
|
|
189
|
+
if (typeof e != "string") return e;
|
|
190
|
+
let r = e.split(ie);
|
|
191
|
+
if (r === null || !r.length) return e;
|
|
192
|
+
let i = [], a = r.shift(), o = ae.test(a);
|
|
193
|
+
for (;;) {
|
|
194
|
+
if (o) {
|
|
195
|
+
let e = parseFloat(a);
|
|
196
|
+
isNaN(e) ? i.push(a) : i.push(Math.ceil(e * t * n) / n);
|
|
197
|
+
} else i.push(a);
|
|
198
|
+
if (a = r.shift(), a === void 0) return i.join("");
|
|
199
|
+
o = !o;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
function se(e, t = "defs") {
|
|
203
|
+
let n = "", r = e.indexOf("<" + t);
|
|
204
|
+
for (; r >= 0;) {
|
|
205
|
+
let i = e.indexOf(">", r), a = e.indexOf("</" + t);
|
|
206
|
+
if (i === -1 || a === -1) break;
|
|
207
|
+
let o = e.indexOf(">", a);
|
|
208
|
+
if (o === -1) break;
|
|
209
|
+
n += e.slice(i + 1, a).trim(), e = e.slice(0, r).trim() + e.slice(o + 1);
|
|
210
|
+
}
|
|
211
|
+
return {
|
|
212
|
+
defs: n,
|
|
213
|
+
content: e
|
|
214
|
+
};
|
|
215
|
+
}
|
|
216
|
+
function ce(e, t) {
|
|
217
|
+
return e ? "<defs>" + e + "</defs>" + t : t;
|
|
218
|
+
}
|
|
219
|
+
function le(e, t, n) {
|
|
220
|
+
let r = se(e);
|
|
221
|
+
return ce(r.defs, t + r.content + n);
|
|
222
|
+
}
|
|
223
|
+
var ue = (e) => e === "unset" || e === "undefined" || e === "none";
|
|
224
|
+
function de(e, t) {
|
|
225
|
+
let n = {
|
|
226
|
+
...v,
|
|
227
|
+
...e
|
|
228
|
+
}, r = {
|
|
229
|
+
...P,
|
|
230
|
+
...t
|
|
231
|
+
}, i = {
|
|
232
|
+
left: n.left,
|
|
233
|
+
top: n.top,
|
|
234
|
+
width: n.width,
|
|
235
|
+
height: n.height
|
|
236
|
+
}, a = n.body;
|
|
237
|
+
[n, r].forEach((e) => {
|
|
238
|
+
let t = [], n = e.hFlip, r = e.vFlip, o = e.rotate;
|
|
239
|
+
n ? r ? o += 2 : (t.push("translate(" + (i.width + i.left).toString() + " " + (0 - i.top).toString() + ")"), t.push("scale(-1 1)"), i.top = i.left = 0) : r && (t.push("translate(" + (0 - i.left).toString() + " " + (i.height + i.top).toString() + ")"), t.push("scale(1 -1)"), i.top = i.left = 0);
|
|
240
|
+
let s;
|
|
241
|
+
switch (o < 0 && (o -= Math.floor(o / 4) * 4), o %= 4, o) {
|
|
242
|
+
case 1:
|
|
243
|
+
s = i.height / 2 + i.top, t.unshift("rotate(90 " + s.toString() + " " + s.toString() + ")");
|
|
244
|
+
break;
|
|
245
|
+
case 2:
|
|
246
|
+
t.unshift("rotate(180 " + (i.width / 2 + i.left).toString() + " " + (i.height / 2 + i.top).toString() + ")");
|
|
247
|
+
break;
|
|
248
|
+
case 3:
|
|
249
|
+
s = i.width / 2 + i.left, t.unshift("rotate(-90 " + s.toString() + " " + s.toString() + ")");
|
|
250
|
+
break;
|
|
251
|
+
}
|
|
252
|
+
o % 2 == 1 && (i.left !== i.top && (s = i.left, i.left = i.top, i.top = s), i.width !== i.height && (s = i.width, i.width = i.height, i.height = s)), t.length && (a = le(a, "<g transform=\"" + t.join(" ") + "\">", "</g>"));
|
|
253
|
+
});
|
|
254
|
+
let o = r.width, s = r.height, c = i.width, l = i.height, u, d;
|
|
255
|
+
o === null ? (d = s === null ? "1em" : s === "auto" ? l : s, u = oe(d, c / l)) : (u = o === "auto" ? c : o, d = s === null ? oe(u, l / c) : s === "auto" ? l : s);
|
|
256
|
+
let f = {}, p = (e, t) => {
|
|
257
|
+
ue(t) || (f[e] = t.toString());
|
|
258
|
+
};
|
|
259
|
+
p("width", u), p("height", d);
|
|
260
|
+
let m = [
|
|
261
|
+
i.left,
|
|
262
|
+
i.top,
|
|
263
|
+
c,
|
|
264
|
+
l
|
|
265
|
+
];
|
|
266
|
+
return f.viewBox = m.join(" "), {
|
|
267
|
+
attributes: f,
|
|
268
|
+
viewBox: m,
|
|
269
|
+
body: a
|
|
270
|
+
};
|
|
271
|
+
}
|
|
272
|
+
var fe = /\sid="(\S+)"/g, pe = /* @__PURE__ */ new Map();
|
|
273
|
+
function me(e) {
|
|
274
|
+
e = e.replace(/[0-9]+$/, "") || "a";
|
|
275
|
+
let t = pe.get(e) || 0;
|
|
276
|
+
return pe.set(e, t + 1), t ? `${e}${t}` : e;
|
|
277
|
+
}
|
|
278
|
+
function he(e) {
|
|
279
|
+
let t = [], n;
|
|
280
|
+
for (; n = fe.exec(e);) t.push(n[1]);
|
|
281
|
+
if (!t.length) return e;
|
|
282
|
+
let r = "suffix" + (Math.random() * 16777216 | Date.now()).toString(16);
|
|
283
|
+
return t.forEach((t) => {
|
|
284
|
+
let n = me(t), i = t.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
285
|
+
e = e.replace(RegExp("([#;\"])(" + i + ")([\")]|\\.[a-z])", "g"), "$1" + n + r + "$3");
|
|
286
|
+
}), e = e.replace(new RegExp(r, "g"), ""), e;
|
|
287
|
+
}
|
|
288
|
+
var F = Object.create(null);
|
|
289
|
+
function ge(e, t) {
|
|
290
|
+
F[e] = t;
|
|
291
|
+
}
|
|
292
|
+
function I(e) {
|
|
293
|
+
return F[e] || F[""];
|
|
294
|
+
}
|
|
295
|
+
function L(e) {
|
|
296
|
+
let t;
|
|
297
|
+
if (typeof e.resources == "string") t = [e.resources];
|
|
298
|
+
else if (t = e.resources, !(t instanceof Array) || !t.length) return null;
|
|
299
|
+
return {
|
|
300
|
+
resources: t,
|
|
301
|
+
path: e.path || "/",
|
|
302
|
+
maxURL: e.maxURL || 500,
|
|
303
|
+
rotate: e.rotate || 750,
|
|
304
|
+
timeout: e.timeout || 5e3,
|
|
305
|
+
random: e.random === !0,
|
|
306
|
+
index: e.index || 0,
|
|
307
|
+
dataAfterTimeout: e.dataAfterTimeout !== !1
|
|
308
|
+
};
|
|
309
|
+
}
|
|
310
|
+
for (var R = Object.create(null), z = ["https://api.simplesvg.com", "https://api.unisvg.com"], B = []; z.length > 0;) z.length === 1 || Math.random() > .5 ? B.push(z.shift()) : B.push(z.pop());
|
|
311
|
+
R[""] = L({ resources: ["https://api.iconify.design"].concat(B) });
|
|
312
|
+
function _e(e, t) {
|
|
313
|
+
let n = L(t);
|
|
314
|
+
return n === null ? !1 : (R[e] = n, !0);
|
|
315
|
+
}
|
|
316
|
+
function V(e) {
|
|
317
|
+
return R[e];
|
|
318
|
+
}
|
|
319
|
+
var ve = (() => {
|
|
320
|
+
let e;
|
|
321
|
+
try {
|
|
322
|
+
if (e = fetch, typeof e == "function") return e;
|
|
323
|
+
} catch {}
|
|
324
|
+
})();
|
|
325
|
+
function ye(e, t) {
|
|
326
|
+
let n = V(e);
|
|
327
|
+
if (!n) return 0;
|
|
328
|
+
let r;
|
|
329
|
+
if (!n.maxURL) r = 0;
|
|
330
|
+
else {
|
|
331
|
+
let e = 0;
|
|
332
|
+
n.resources.forEach((t) => {
|
|
333
|
+
e = Math.max(e, t.length);
|
|
334
|
+
});
|
|
335
|
+
let i = t + ".json?icons=";
|
|
336
|
+
r = n.maxURL - e - n.path.length - i.length;
|
|
337
|
+
}
|
|
338
|
+
return r;
|
|
339
|
+
}
|
|
340
|
+
function be(e) {
|
|
341
|
+
return e === 404;
|
|
342
|
+
}
|
|
343
|
+
var xe = (e, t, n) => {
|
|
344
|
+
let r = [], i = ye(e, t), a = "icons", o = {
|
|
345
|
+
type: a,
|
|
346
|
+
provider: e,
|
|
347
|
+
prefix: t,
|
|
348
|
+
icons: []
|
|
349
|
+
}, s = 0;
|
|
350
|
+
return n.forEach((n, c) => {
|
|
351
|
+
s += n.length + 1, s >= i && c > 0 && (r.push(o), o = {
|
|
352
|
+
type: a,
|
|
353
|
+
provider: e,
|
|
354
|
+
prefix: t,
|
|
355
|
+
icons: []
|
|
356
|
+
}, s = n.length), o.icons.push(n);
|
|
357
|
+
}), r.push(o), r;
|
|
358
|
+
};
|
|
359
|
+
function Se(e) {
|
|
360
|
+
if (typeof e == "string") {
|
|
361
|
+
let t = V(e);
|
|
362
|
+
if (t) return t.path;
|
|
363
|
+
}
|
|
364
|
+
return "/";
|
|
365
|
+
}
|
|
366
|
+
var Ce = {
|
|
367
|
+
prepare: xe,
|
|
368
|
+
send: (e, t, n) => {
|
|
369
|
+
if (!ve) {
|
|
370
|
+
n("abort", 424);
|
|
371
|
+
return;
|
|
372
|
+
}
|
|
373
|
+
let r = Se(t.provider);
|
|
374
|
+
switch (t.type) {
|
|
375
|
+
case "icons": {
|
|
376
|
+
let e = t.prefix, n = t.icons.join(","), i = new URLSearchParams({ icons: n });
|
|
377
|
+
r += e + ".json?" + i.toString();
|
|
378
|
+
break;
|
|
379
|
+
}
|
|
380
|
+
case "custom": {
|
|
381
|
+
let e = t.uri;
|
|
382
|
+
r += e.slice(0, 1) === "/" ? e.slice(1) : e;
|
|
383
|
+
break;
|
|
384
|
+
}
|
|
385
|
+
default:
|
|
386
|
+
n("abort", 400);
|
|
387
|
+
return;
|
|
388
|
+
}
|
|
389
|
+
let i = 503;
|
|
390
|
+
ve(e + r).then((e) => {
|
|
391
|
+
let t = e.status;
|
|
392
|
+
if (t !== 200) {
|
|
393
|
+
setTimeout(() => {
|
|
394
|
+
n(be(t) ? "abort" : "next", t);
|
|
395
|
+
});
|
|
396
|
+
return;
|
|
397
|
+
}
|
|
398
|
+
return i = 501, e.json();
|
|
399
|
+
}).then((e) => {
|
|
400
|
+
if (typeof e != "object" || !e) {
|
|
401
|
+
setTimeout(() => {
|
|
402
|
+
e === 404 ? n("abort", e) : n("next", i);
|
|
403
|
+
});
|
|
404
|
+
return;
|
|
405
|
+
}
|
|
406
|
+
setTimeout(() => {
|
|
407
|
+
n("success", e);
|
|
408
|
+
});
|
|
409
|
+
}).catch(() => {
|
|
410
|
+
n("next", i);
|
|
411
|
+
});
|
|
412
|
+
}
|
|
413
|
+
};
|
|
414
|
+
function we(e, t) {
|
|
415
|
+
e.forEach((e) => {
|
|
416
|
+
let n = e.loaderCallbacks;
|
|
417
|
+
n && (e.loaderCallbacks = n.filter((e) => e.id !== t));
|
|
418
|
+
});
|
|
419
|
+
}
|
|
420
|
+
function Te(e) {
|
|
421
|
+
e.pendingCallbacksFlag || (e.pendingCallbacksFlag = !0, setTimeout(() => {
|
|
422
|
+
e.pendingCallbacksFlag = !1;
|
|
423
|
+
let t = e.loaderCallbacks ? e.loaderCallbacks.slice(0) : [];
|
|
424
|
+
if (!t.length) return;
|
|
425
|
+
let n = !1, r = e.provider, i = e.prefix;
|
|
426
|
+
t.forEach((t) => {
|
|
427
|
+
let a = t.icons, o = a.pending.length;
|
|
428
|
+
a.pending = a.pending.filter((t) => {
|
|
429
|
+
if (t.prefix !== i) return !0;
|
|
430
|
+
let o = t.name;
|
|
431
|
+
if (e.icons[o]) a.loaded.push({
|
|
432
|
+
provider: r,
|
|
433
|
+
prefix: i,
|
|
434
|
+
name: o
|
|
435
|
+
});
|
|
436
|
+
else if (e.missing.has(o)) a.missing.push({
|
|
437
|
+
provider: r,
|
|
438
|
+
prefix: i,
|
|
439
|
+
name: o
|
|
440
|
+
});
|
|
441
|
+
else return n = !0, !0;
|
|
442
|
+
return !1;
|
|
443
|
+
}), a.pending.length !== o && (n || we([e], t.id), t.callback(a.loaded.slice(0), a.missing.slice(0), a.pending.slice(0), t.abort));
|
|
444
|
+
});
|
|
445
|
+
}));
|
|
446
|
+
}
|
|
447
|
+
var Ee = 0;
|
|
448
|
+
function De(e, t, n) {
|
|
449
|
+
let r = Ee++, i = we.bind(null, n, r);
|
|
450
|
+
if (!t.pending.length) return i;
|
|
451
|
+
let a = {
|
|
452
|
+
id: r,
|
|
453
|
+
icons: t,
|
|
454
|
+
callback: e,
|
|
455
|
+
abort: i
|
|
456
|
+
};
|
|
457
|
+
return n.forEach((e) => {
|
|
458
|
+
(e.loaderCallbacks ||= []).push(a);
|
|
459
|
+
}), i;
|
|
460
|
+
}
|
|
461
|
+
function Oe(e) {
|
|
462
|
+
let t = {
|
|
463
|
+
loaded: [],
|
|
464
|
+
missing: [],
|
|
465
|
+
pending: []
|
|
466
|
+
}, n = Object.create(null);
|
|
467
|
+
e.sort((e, t) => e.provider === t.provider ? e.prefix === t.prefix ? e.name.localeCompare(t.name) : e.prefix.localeCompare(t.prefix) : e.provider.localeCompare(t.provider));
|
|
468
|
+
let r = {
|
|
469
|
+
provider: "",
|
|
470
|
+
prefix: "",
|
|
471
|
+
name: ""
|
|
472
|
+
};
|
|
473
|
+
return e.forEach((e) => {
|
|
474
|
+
if (r.name === e.name && r.prefix === e.prefix && r.provider === e.provider) return;
|
|
475
|
+
r = e;
|
|
476
|
+
let i = e.provider, a = e.prefix, o = e.name, s = n[i] || (n[i] = Object.create(null)), c = s[a] || (s[a] = O(i, a)), l;
|
|
477
|
+
l = o in c.icons ? t.loaded : a === "" || c.missing.has(o) ? t.missing : t.pending;
|
|
478
|
+
let u = {
|
|
479
|
+
provider: i,
|
|
480
|
+
prefix: a,
|
|
481
|
+
name: o
|
|
482
|
+
};
|
|
483
|
+
l.push(u);
|
|
484
|
+
}), t;
|
|
485
|
+
}
|
|
486
|
+
function ke(e, t = !0, n = !1) {
|
|
487
|
+
let r = [];
|
|
488
|
+
return e.forEach((e) => {
|
|
489
|
+
let i = typeof e == "string" ? p(e, t, n) : e;
|
|
490
|
+
i && r.push(i);
|
|
491
|
+
}), r;
|
|
492
|
+
}
|
|
493
|
+
var Ae = {
|
|
494
|
+
resources: [],
|
|
495
|
+
index: 0,
|
|
496
|
+
timeout: 2e3,
|
|
497
|
+
rotate: 750,
|
|
498
|
+
random: !1,
|
|
499
|
+
dataAfterTimeout: !1
|
|
500
|
+
};
|
|
501
|
+
function je(e, t, n, r) {
|
|
502
|
+
let i = e.resources.length, a = e.random ? Math.floor(Math.random() * i) : e.index, o;
|
|
503
|
+
if (e.random) {
|
|
504
|
+
let t = e.resources.slice(0);
|
|
505
|
+
for (o = []; t.length > 1;) {
|
|
506
|
+
let e = Math.floor(Math.random() * t.length);
|
|
507
|
+
o.push(t[e]), t = t.slice(0, e).concat(t.slice(e + 1));
|
|
508
|
+
}
|
|
509
|
+
o = o.concat(t);
|
|
510
|
+
} else o = e.resources.slice(a).concat(e.resources.slice(0, a));
|
|
511
|
+
let s = Date.now(), c = "pending", l = 0, u, d = null, f = [], p = [];
|
|
512
|
+
typeof r == "function" && p.push(r);
|
|
513
|
+
function m() {
|
|
514
|
+
d &&= (clearTimeout(d), null);
|
|
515
|
+
}
|
|
516
|
+
function h() {
|
|
517
|
+
c === "pending" && (c = "aborted"), m(), f.forEach((e) => {
|
|
518
|
+
e.status === "pending" && (e.status = "aborted");
|
|
519
|
+
}), f = [];
|
|
520
|
+
}
|
|
521
|
+
function g(e, t) {
|
|
522
|
+
t && (p = []), typeof e == "function" && p.push(e);
|
|
523
|
+
}
|
|
524
|
+
function _() {
|
|
525
|
+
return {
|
|
526
|
+
startTime: s,
|
|
527
|
+
payload: t,
|
|
528
|
+
status: c,
|
|
529
|
+
queriesSent: l,
|
|
530
|
+
queriesPending: f.length,
|
|
531
|
+
subscribe: g,
|
|
532
|
+
abort: h
|
|
533
|
+
};
|
|
534
|
+
}
|
|
535
|
+
function v() {
|
|
536
|
+
c = "failed", p.forEach((e) => {
|
|
537
|
+
e(void 0, u);
|
|
538
|
+
});
|
|
539
|
+
}
|
|
540
|
+
function y() {
|
|
541
|
+
f.forEach((e) => {
|
|
542
|
+
e.status === "pending" && (e.status = "aborted");
|
|
543
|
+
}), f = [];
|
|
544
|
+
}
|
|
545
|
+
function b(t, n, r) {
|
|
546
|
+
let i = n !== "success";
|
|
547
|
+
switch (f = f.filter((e) => e !== t), c) {
|
|
548
|
+
case "pending": break;
|
|
549
|
+
case "failed":
|
|
550
|
+
if (i || !e.dataAfterTimeout) return;
|
|
551
|
+
break;
|
|
552
|
+
default: return;
|
|
553
|
+
}
|
|
554
|
+
if (n === "abort") {
|
|
555
|
+
u = r, v();
|
|
556
|
+
return;
|
|
557
|
+
}
|
|
558
|
+
if (i) {
|
|
559
|
+
u = r, f.length || (o.length ? x() : v());
|
|
560
|
+
return;
|
|
561
|
+
}
|
|
562
|
+
if (m(), y(), !e.random) {
|
|
563
|
+
let n = e.resources.indexOf(t.resource);
|
|
564
|
+
n !== -1 && n !== e.index && (e.index = n);
|
|
565
|
+
}
|
|
566
|
+
c = "completed", p.forEach((e) => {
|
|
567
|
+
e(r);
|
|
568
|
+
});
|
|
569
|
+
}
|
|
570
|
+
function x() {
|
|
571
|
+
if (c !== "pending") return;
|
|
572
|
+
m();
|
|
573
|
+
let r = o.shift();
|
|
574
|
+
if (r === void 0) {
|
|
575
|
+
if (f.length) {
|
|
576
|
+
d = setTimeout(() => {
|
|
577
|
+
m(), c === "pending" && (y(), v());
|
|
578
|
+
}, e.timeout);
|
|
579
|
+
return;
|
|
580
|
+
}
|
|
581
|
+
v();
|
|
582
|
+
return;
|
|
583
|
+
}
|
|
584
|
+
let i = {
|
|
585
|
+
status: "pending",
|
|
586
|
+
resource: r,
|
|
587
|
+
callback: (e, t) => {
|
|
588
|
+
b(i, e, t);
|
|
589
|
+
}
|
|
590
|
+
};
|
|
591
|
+
f.push(i), l++, d = setTimeout(x, e.rotate), n(r, t, i.callback);
|
|
592
|
+
}
|
|
593
|
+
return setTimeout(x), _;
|
|
594
|
+
}
|
|
595
|
+
function Me(e) {
|
|
596
|
+
let t = {
|
|
597
|
+
...Ae,
|
|
598
|
+
...e
|
|
599
|
+
}, n = [];
|
|
600
|
+
function r() {
|
|
601
|
+
n = n.filter((e) => e().status === "pending");
|
|
602
|
+
}
|
|
603
|
+
function i(e, i, a) {
|
|
604
|
+
let o = je(t, e, i, (e, t) => {
|
|
605
|
+
r(), a && a(e, t);
|
|
606
|
+
});
|
|
607
|
+
return n.push(o), o;
|
|
608
|
+
}
|
|
609
|
+
function a(e) {
|
|
610
|
+
return n.find((t) => e(t)) || null;
|
|
611
|
+
}
|
|
612
|
+
return {
|
|
613
|
+
query: i,
|
|
614
|
+
find: a,
|
|
615
|
+
setIndex: (e) => {
|
|
616
|
+
t.index = e;
|
|
617
|
+
},
|
|
618
|
+
getIndex: () => t.index,
|
|
619
|
+
cleanup: r
|
|
620
|
+
};
|
|
621
|
+
}
|
|
622
|
+
function Ne() {}
|
|
623
|
+
var H = Object.create(null);
|
|
624
|
+
function Pe(e) {
|
|
625
|
+
if (!H[e]) {
|
|
626
|
+
let t = V(e);
|
|
627
|
+
if (!t) return;
|
|
628
|
+
H[e] = {
|
|
629
|
+
config: t,
|
|
630
|
+
redundancy: Me(t)
|
|
631
|
+
};
|
|
632
|
+
}
|
|
633
|
+
return H[e];
|
|
634
|
+
}
|
|
635
|
+
function Fe(e, t, n) {
|
|
636
|
+
let r, i;
|
|
637
|
+
if (typeof e == "string") {
|
|
638
|
+
let t = I(e);
|
|
639
|
+
if (!t) return n(void 0, 424), Ne;
|
|
640
|
+
i = t.send;
|
|
641
|
+
let a = Pe(e);
|
|
642
|
+
a && (r = a.redundancy);
|
|
643
|
+
} else {
|
|
644
|
+
let t = L(e);
|
|
645
|
+
if (t) {
|
|
646
|
+
r = Me(t);
|
|
647
|
+
let n = I(e.resources ? e.resources[0] : "");
|
|
648
|
+
n && (i = n.send);
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
return !r || !i ? (n(void 0, 424), Ne) : r.query(t, i, n)().abort;
|
|
652
|
+
}
|
|
653
|
+
function Ie() {}
|
|
654
|
+
function Le(e) {
|
|
655
|
+
e.iconsLoaderFlag || (e.iconsLoaderFlag = !0, setTimeout(() => {
|
|
656
|
+
e.iconsLoaderFlag = !1, Te(e);
|
|
657
|
+
}));
|
|
658
|
+
}
|
|
659
|
+
function Re(e) {
|
|
660
|
+
let t = [], n = [];
|
|
661
|
+
return e.forEach((e) => {
|
|
662
|
+
(e.match(f) ? t : n).push(e);
|
|
663
|
+
}), {
|
|
664
|
+
valid: t,
|
|
665
|
+
invalid: n
|
|
666
|
+
};
|
|
667
|
+
}
|
|
668
|
+
function U(e, t, n) {
|
|
669
|
+
function r() {
|
|
670
|
+
let n = e.pendingIcons;
|
|
671
|
+
t.forEach((t) => {
|
|
672
|
+
n && n.delete(t), e.icons[t] || e.missing.add(t);
|
|
673
|
+
});
|
|
674
|
+
}
|
|
675
|
+
if (n && typeof n == "object") try {
|
|
676
|
+
if (!k(e, n).length) {
|
|
677
|
+
r();
|
|
678
|
+
return;
|
|
679
|
+
}
|
|
680
|
+
} catch (e) {
|
|
681
|
+
console.error(e);
|
|
682
|
+
}
|
|
683
|
+
r(), Le(e);
|
|
684
|
+
}
|
|
685
|
+
function ze(e, t) {
|
|
686
|
+
e instanceof Promise ? e.then((e) => {
|
|
687
|
+
t(e);
|
|
688
|
+
}).catch(() => {
|
|
689
|
+
t(null);
|
|
690
|
+
}) : t(e);
|
|
691
|
+
}
|
|
692
|
+
function Be(e, t) {
|
|
693
|
+
e.iconsToLoad ? e.iconsToLoad = e.iconsToLoad.concat(t).sort() : e.iconsToLoad = t, e.iconsQueueFlag || (e.iconsQueueFlag = !0, setTimeout(() => {
|
|
694
|
+
e.iconsQueueFlag = !1;
|
|
695
|
+
let { provider: t, prefix: n } = e, r = e.iconsToLoad;
|
|
696
|
+
if (delete e.iconsToLoad, !r || !r.length) return;
|
|
697
|
+
let i = e.loadIcon;
|
|
698
|
+
if (e.loadIcons && (r.length > 1 || !i)) {
|
|
699
|
+
ze(e.loadIcons(r, n, t), (t) => {
|
|
700
|
+
U(e, r, t);
|
|
701
|
+
});
|
|
702
|
+
return;
|
|
703
|
+
}
|
|
704
|
+
if (i) {
|
|
705
|
+
r.forEach((r) => {
|
|
706
|
+
ze(i(r, n, t), (t) => {
|
|
707
|
+
U(e, [r], t ? {
|
|
708
|
+
prefix: n,
|
|
709
|
+
icons: { [r]: t }
|
|
710
|
+
} : null);
|
|
711
|
+
});
|
|
712
|
+
});
|
|
713
|
+
return;
|
|
714
|
+
}
|
|
715
|
+
let { valid: a, invalid: o } = Re(r);
|
|
716
|
+
if (o.length && U(e, o, null), !a.length) return;
|
|
717
|
+
let s = n.match(f) ? I(t) : null;
|
|
718
|
+
if (!s) {
|
|
719
|
+
U(e, a, null);
|
|
720
|
+
return;
|
|
721
|
+
}
|
|
722
|
+
s.prepare(t, n, a).forEach((n) => {
|
|
723
|
+
Fe(t, n, (t) => {
|
|
724
|
+
U(e, n.icons, t);
|
|
725
|
+
});
|
|
726
|
+
});
|
|
727
|
+
}));
|
|
728
|
+
}
|
|
729
|
+
var Ve = (e, t) => {
|
|
730
|
+
let n = Oe(ke(e, !0, j()));
|
|
731
|
+
if (!n.pending.length) {
|
|
732
|
+
let e = !0;
|
|
733
|
+
return t && setTimeout(() => {
|
|
734
|
+
e && t(n.loaded, n.missing, n.pending, Ie);
|
|
735
|
+
}), () => {
|
|
736
|
+
e = !1;
|
|
737
|
+
};
|
|
738
|
+
}
|
|
739
|
+
let r = Object.create(null), i = [], a, o;
|
|
740
|
+
return n.pending.forEach((e) => {
|
|
741
|
+
let { provider: t, prefix: n } = e;
|
|
742
|
+
if (n === o && t === a) return;
|
|
743
|
+
a = t, o = n, i.push(O(t, n));
|
|
744
|
+
let s = r[t] || (r[t] = Object.create(null));
|
|
745
|
+
s[n] || (s[n] = []);
|
|
746
|
+
}), n.pending.forEach((e) => {
|
|
747
|
+
let { provider: t, prefix: n, name: i } = e, a = O(t, n), o = a.pendingIcons ||= /* @__PURE__ */ new Set();
|
|
748
|
+
o.has(i) || (o.add(i), r[t][n].push(i));
|
|
749
|
+
}), i.forEach((e) => {
|
|
750
|
+
let t = r[e.provider][e.prefix];
|
|
751
|
+
t.length && Be(e, t);
|
|
752
|
+
}), t ? De(t, n, i) : Ie;
|
|
753
|
+
};
|
|
754
|
+
function He(e, t) {
|
|
755
|
+
let n = { ...e };
|
|
756
|
+
for (let e in t) {
|
|
757
|
+
let r = t[e], i = typeof r;
|
|
758
|
+
e in N ? (r === null || r && (i === "string" || i === "number")) && (n[e] = r) : i === typeof n[e] && (n[e] = e === "rotate" ? r % 4 : r);
|
|
759
|
+
}
|
|
760
|
+
return n;
|
|
761
|
+
}
|
|
762
|
+
var Ue = /[\s,]+/;
|
|
763
|
+
function We(e, t) {
|
|
764
|
+
t.split(Ue).forEach((t) => {
|
|
765
|
+
switch (t.trim()) {
|
|
766
|
+
case "horizontal":
|
|
767
|
+
e.hFlip = !0;
|
|
768
|
+
break;
|
|
769
|
+
case "vertical":
|
|
770
|
+
e.vFlip = !0;
|
|
771
|
+
break;
|
|
772
|
+
}
|
|
773
|
+
});
|
|
774
|
+
}
|
|
775
|
+
function Ge(e, t = 0) {
|
|
776
|
+
let n = e.replace(/^-?[0-9.]*/, "");
|
|
777
|
+
function r(e) {
|
|
778
|
+
for (; e < 0;) e += 4;
|
|
779
|
+
return e % 4;
|
|
780
|
+
}
|
|
781
|
+
if (n === "") {
|
|
782
|
+
let t = parseInt(e);
|
|
783
|
+
return isNaN(t) ? 0 : r(t);
|
|
784
|
+
} else if (n !== e) {
|
|
785
|
+
let t = 0;
|
|
786
|
+
switch (n) {
|
|
787
|
+
case "%":
|
|
788
|
+
t = 25;
|
|
789
|
+
break;
|
|
790
|
+
case "deg": t = 90;
|
|
791
|
+
}
|
|
792
|
+
if (t) {
|
|
793
|
+
let i = parseFloat(e.slice(0, e.length - n.length));
|
|
794
|
+
return isNaN(i) ? 0 : (i /= t, i % 1 == 0 ? r(i) : 0);
|
|
795
|
+
}
|
|
796
|
+
}
|
|
797
|
+
return t;
|
|
798
|
+
}
|
|
799
|
+
function Ke(e, t) {
|
|
800
|
+
let n = e.indexOf("xlink:") === -1 ? "" : " xmlns:xlink=\"http://www.w3.org/1999/xlink\"";
|
|
801
|
+
for (let e in t) n += " " + e + "=\"" + t[e] + "\"";
|
|
802
|
+
return "<svg xmlns=\"http://www.w3.org/2000/svg\"" + n + ">" + e + "</svg>";
|
|
803
|
+
}
|
|
804
|
+
function qe(e) {
|
|
805
|
+
return e.replace(/"/g, "'").replace(/%/g, "%25").replace(/#/g, "%23").replace(/</g, "%3C").replace(/>/g, "%3E").replace(/\s+/g, " ");
|
|
806
|
+
}
|
|
807
|
+
function Je(e) {
|
|
808
|
+
return "data:image/svg+xml," + qe(e);
|
|
809
|
+
}
|
|
810
|
+
function Ye(e) {
|
|
811
|
+
return "url(\"" + Je(e) + "\")";
|
|
812
|
+
}
|
|
813
|
+
var Xe = {
|
|
814
|
+
...P,
|
|
815
|
+
inline: !1
|
|
816
|
+
}, Ze = {
|
|
817
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
818
|
+
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
819
|
+
"aria-hidden": !0,
|
|
820
|
+
role: "img"
|
|
821
|
+
}, Qe = { display: "inline-block" }, W = { backgroundColor: "currentColor" }, $e = { backgroundColor: "transparent" }, et = {
|
|
822
|
+
Image: "var(--svg)",
|
|
823
|
+
Repeat: "no-repeat",
|
|
824
|
+
Size: "100% 100%"
|
|
825
|
+
}, tt = {
|
|
826
|
+
webkitMask: W,
|
|
827
|
+
mask: W,
|
|
828
|
+
background: $e
|
|
829
|
+
};
|
|
830
|
+
for (let e in tt) {
|
|
831
|
+
let t = tt[e];
|
|
832
|
+
for (let n in et) t[e + n] = et[n];
|
|
833
|
+
}
|
|
834
|
+
var G = {};
|
|
835
|
+
["horizontal", "vertical"].forEach((e) => {
|
|
836
|
+
let t = e.slice(0, 1) + "Flip";
|
|
837
|
+
G[e + "-flip"] = t, G[e.slice(0, 1) + "-flip"] = t, G[e + "Flip"] = t;
|
|
838
|
+
});
|
|
839
|
+
function nt(e) {
|
|
840
|
+
return e + (e.match(/^[-0-9.]+$/) ? "px" : "");
|
|
841
|
+
}
|
|
842
|
+
var rt = (e, t) => {
|
|
843
|
+
let n = He(Xe, t), r = { ...Ze }, a = t.mode || "svg", o = {}, s = t.style, c = typeof s == "object" && !(s instanceof Array) ? s : {};
|
|
844
|
+
for (let e in t) {
|
|
845
|
+
let i = t[e];
|
|
846
|
+
if (i !== void 0) switch (e) {
|
|
847
|
+
case "icon":
|
|
848
|
+
case "style":
|
|
849
|
+
case "onLoad":
|
|
850
|
+
case "mode":
|
|
851
|
+
case "ssr":
|
|
852
|
+
case "customise": break;
|
|
853
|
+
case "inline":
|
|
854
|
+
case "hFlip":
|
|
855
|
+
case "vFlip":
|
|
856
|
+
n[e] = i === !0 || i === "true" || i === 1;
|
|
857
|
+
break;
|
|
858
|
+
case "flip":
|
|
859
|
+
typeof i == "string" && We(n, i);
|
|
860
|
+
break;
|
|
861
|
+
case "color":
|
|
862
|
+
o.color = i;
|
|
863
|
+
break;
|
|
864
|
+
case "rotate":
|
|
865
|
+
typeof i == "string" ? n[e] = Ge(i) : typeof i == "number" && (n[e] = i);
|
|
866
|
+
break;
|
|
867
|
+
case "ariaHidden":
|
|
868
|
+
case "aria-hidden":
|
|
869
|
+
i !== !0 && i !== "true" && delete r["aria-hidden"];
|
|
870
|
+
break;
|
|
871
|
+
default: {
|
|
872
|
+
let t = G[e];
|
|
873
|
+
t ? (i === !0 || i === "true" || i === 1) && (n[t] = !0) : Xe[e] === void 0 && (r[e] = i);
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
}
|
|
877
|
+
let l = de(e, n), u = l.attributes;
|
|
878
|
+
if (n.inline && (o.verticalAlign = "-0.125em"), a === "svg") return r.style = {
|
|
879
|
+
...o,
|
|
880
|
+
...c
|
|
881
|
+
}, Object.assign(r, u), r.innerHTML = he(l.body), i("svg", r);
|
|
882
|
+
let { body: d, width: f, height: p } = e, m = a === "mask" || (a === "bg" ? !1 : d.indexOf("currentColor") !== -1), h = Ke(d, {
|
|
883
|
+
...u,
|
|
884
|
+
width: f + "",
|
|
885
|
+
height: p + ""
|
|
886
|
+
});
|
|
887
|
+
return r.style = {
|
|
888
|
+
...o,
|
|
889
|
+
"--svg": Ye(h),
|
|
890
|
+
width: nt(u.width),
|
|
891
|
+
height: nt(u.height),
|
|
892
|
+
...Qe,
|
|
893
|
+
...m ? W : $e,
|
|
894
|
+
...c
|
|
895
|
+
}, i("span", r);
|
|
896
|
+
};
|
|
897
|
+
if (j(!0), ge("", Ce), typeof document < "u" && typeof window < "u") {
|
|
898
|
+
let e = window;
|
|
899
|
+
if (e.IconifyPreload !== void 0) {
|
|
900
|
+
let t = e.IconifyPreload, n = "Invalid IconifyPreload syntax.";
|
|
901
|
+
typeof t == "object" && t && (t instanceof Array ? t : [t]).forEach((e) => {
|
|
902
|
+
try {
|
|
903
|
+
(typeof e != "object" || !e || e instanceof Array || typeof e.icons != "object" || typeof e.prefix != "string" || !M(e)) && console.error(n);
|
|
904
|
+
} catch {
|
|
905
|
+
console.error(n);
|
|
906
|
+
}
|
|
907
|
+
});
|
|
908
|
+
}
|
|
909
|
+
if (e.IconifyProviders !== void 0) {
|
|
910
|
+
let t = e.IconifyProviders;
|
|
911
|
+
if (typeof t == "object" && t) for (let e in t) {
|
|
912
|
+
let n = "IconifyProviders[" + e + "] is invalid.";
|
|
913
|
+
try {
|
|
914
|
+
let r = t[e];
|
|
915
|
+
if (typeof r != "object" || !r || r.resources === void 0) continue;
|
|
916
|
+
_e(e, r) || console.error(n);
|
|
917
|
+
} catch {
|
|
918
|
+
console.error(n);
|
|
919
|
+
}
|
|
920
|
+
}
|
|
921
|
+
}
|
|
922
|
+
}
|
|
923
|
+
var it = {
|
|
924
|
+
...v,
|
|
925
|
+
body: ""
|
|
926
|
+
}, at = r((e, { emit: t }) => {
|
|
927
|
+
let n = l(null);
|
|
928
|
+
function r() {
|
|
929
|
+
n.value &&= (n.value.abort?.(), null);
|
|
930
|
+
}
|
|
931
|
+
let i = l(!!e.ssr), o = l(""), f = u(null);
|
|
932
|
+
function m() {
|
|
933
|
+
let i = e.icon;
|
|
934
|
+
if (typeof i == "object" && i && typeof i.body == "string") return o.value = "", { data: i };
|
|
935
|
+
let s;
|
|
936
|
+
if (typeof i != "string" || (s = p(i, !1, !0)) === null) return null;
|
|
937
|
+
let c = ne(s);
|
|
938
|
+
if (!c) {
|
|
939
|
+
let e = n.value;
|
|
940
|
+
return (!e || e.name !== i) && (c === null ? n.value = { name: i } : n.value = {
|
|
941
|
+
name: i,
|
|
942
|
+
abort: Ve([s], h)
|
|
943
|
+
}), null;
|
|
944
|
+
}
|
|
945
|
+
r(), o.value !== i && (o.value = i, a(() => {
|
|
946
|
+
t("load", i);
|
|
947
|
+
}));
|
|
948
|
+
let l = e.customise;
|
|
949
|
+
if (l) {
|
|
950
|
+
c = Object.assign({}, c);
|
|
951
|
+
let e = l(c.body, s.name, s.prefix, s.provider);
|
|
952
|
+
typeof e == "string" && (c.body = e);
|
|
953
|
+
}
|
|
954
|
+
let u = ["iconify"];
|
|
955
|
+
return s.prefix !== "" && u.push("iconify--" + s.prefix), s.provider !== "" && u.push("iconify--" + s.provider), {
|
|
956
|
+
data: c,
|
|
957
|
+
classes: u
|
|
958
|
+
};
|
|
959
|
+
}
|
|
960
|
+
function h() {
|
|
961
|
+
let e = m();
|
|
962
|
+
e ? e.data !== f.value?.data && (f.value = e) : f.value = null;
|
|
963
|
+
}
|
|
964
|
+
return i.value ? h() : s(() => {
|
|
965
|
+
i.value = !0, h();
|
|
966
|
+
}), d(() => e.icon, h), c(r), () => {
|
|
967
|
+
let t = f.value;
|
|
968
|
+
if (!t) return rt(it, e);
|
|
969
|
+
let n = e;
|
|
970
|
+
return t.classes && (n = {
|
|
971
|
+
...e,
|
|
972
|
+
class: t.classes.join(" ")
|
|
973
|
+
}), rt({
|
|
974
|
+
...v,
|
|
975
|
+
...t.data
|
|
976
|
+
}, n);
|
|
977
|
+
};
|
|
978
|
+
}, {
|
|
979
|
+
props: [
|
|
980
|
+
"icon",
|
|
981
|
+
"mode",
|
|
982
|
+
"ssr",
|
|
983
|
+
"width",
|
|
984
|
+
"height",
|
|
985
|
+
"style",
|
|
986
|
+
"color",
|
|
987
|
+
"inline",
|
|
988
|
+
"rotate",
|
|
989
|
+
"hFlip",
|
|
990
|
+
"horizontalFlip",
|
|
991
|
+
"vFlip",
|
|
992
|
+
"verticalFlip",
|
|
993
|
+
"flip",
|
|
994
|
+
"id",
|
|
995
|
+
"ariaHidden",
|
|
996
|
+
"customise",
|
|
997
|
+
"title"
|
|
998
|
+
],
|
|
999
|
+
emits: ["load"]
|
|
1000
|
+
}), ot = {
|
|
1001
|
+
prefix: "mdi",
|
|
1002
|
+
icons: {
|
|
1003
|
+
"alert-circle": {
|
|
1004
|
+
width: 24,
|
|
1005
|
+
height: 24,
|
|
1006
|
+
body: "<path fill=\"currentColor\" d=\"M13 13h-2V7h2m0 10h-2v-2h2M12 2A10 10 0 0 0 2 12a10 10 0 0 0 10 10a10 10 0 0 0 10-10A10 10 0 0 0 12 2Z\"/>"
|
|
1007
|
+
},
|
|
1008
|
+
"arrow-up": {
|
|
1009
|
+
width: 24,
|
|
1010
|
+
height: 24,
|
|
1011
|
+
body: "<path fill=\"currentColor\" d=\"M13 20h-2V8l-5.5 5.5l-1.42-1.42L12 4.16l7.92 7.92l-1.42 1.42L13 8v12Z\"/>"
|
|
1012
|
+
},
|
|
1013
|
+
"calendar-outline": {
|
|
1014
|
+
width: 24,
|
|
1015
|
+
height: 24,
|
|
1016
|
+
body: "<path fill=\"currentColor\" d=\"M12 12h5v5h-5v-5m7-9h-1V1h-2v2H8V1H6v2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m0 2v2H5V5h14M5 19V9h14v10H5Z\"/>"
|
|
1017
|
+
},
|
|
1018
|
+
check: {
|
|
1019
|
+
width: 24,
|
|
1020
|
+
height: 24,
|
|
1021
|
+
body: "<path fill=\"currentColor\" d=\"M21 7L9 19l-5.5-5.5l1.41-1.41L9 16.17L19.59 5.59L21 7Z\"/>"
|
|
1022
|
+
},
|
|
1023
|
+
"check-circle": {
|
|
1024
|
+
width: 24,
|
|
1025
|
+
height: 24,
|
|
1026
|
+
body: "<path fill=\"currentColor\" d=\"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10s10-4.5 10-10S17.5 2 12 2m-2 15l-5-5l1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9Z\"/>"
|
|
1027
|
+
},
|
|
1028
|
+
"chevron-right": {
|
|
1029
|
+
width: 24,
|
|
1030
|
+
height: 24,
|
|
1031
|
+
body: "<path fill=\"currentColor\" d=\"M8.59 16.58L13.17 12L8.59 7.41L10 6l6 6l-6 6l-1.41-1.42Z\"/>"
|
|
1032
|
+
},
|
|
1033
|
+
"clock-outline": {
|
|
1034
|
+
width: 24,
|
|
1035
|
+
height: 24,
|
|
1036
|
+
body: "<path fill=\"currentColor\" d=\"M12 20a8 8 0 0 0 8-8a8 8 0 0 0-8-8a8 8 0 0 0-8 8a8 8 0 0 0 8 8m0-18a10 10 0 0 1 10 10a10 10 0 0 1-10 10C6.47 22 2 17.5 2 12A10 10 0 0 1 12 2m.5 5v5.25l4.5 2.67l-.75 1.23L11 13V7h1.5Z\"/>"
|
|
1037
|
+
},
|
|
1038
|
+
close: {
|
|
1039
|
+
width: 24,
|
|
1040
|
+
height: 24,
|
|
1041
|
+
body: "<path fill=\"currentColor\" d=\"M19 6.41L17.59 5L12 10.59L6.41 5L5 6.41L10.59 12L5 17.59L6.41 19L12 13.41L17.59 19L19 17.59L13.41 12L19 6.41Z\"/>"
|
|
1042
|
+
},
|
|
1043
|
+
"close-circle": {
|
|
1044
|
+
width: 24,
|
|
1045
|
+
height: 24,
|
|
1046
|
+
body: "<path fill=\"currentColor\" d=\"M12 2c5.53 0 10 4.47 10 10s-4.47 10-10 10S2 17.53 2 12S6.47 2 12 2m3.59 5L12 10.59L8.41 7L7 8.41L10.59 12L7 15.59L8.41 17L12 13.41L15.59 17L17 15.59L13.41 12L17 8.41L15.59 7Z\"/>"
|
|
1047
|
+
},
|
|
1048
|
+
"content-copy": {
|
|
1049
|
+
width: 24,
|
|
1050
|
+
height: 24,
|
|
1051
|
+
body: "<path fill=\"currentColor\" d=\"M19 21H8V7h11m0-2H8a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2m-3-4H4a2 2 0 0 0-2 2v14h2V3h12V1Z\"/>"
|
|
1052
|
+
},
|
|
1053
|
+
loading: {
|
|
1054
|
+
width: 24,
|
|
1055
|
+
height: 24,
|
|
1056
|
+
body: "<path fill=\"currentColor\" d=\"M12 4V2A10 10 0 0 0 2 12h2a8 8 0 0 1 8-8Z\"/>"
|
|
1057
|
+
},
|
|
1058
|
+
magnify: {
|
|
1059
|
+
width: 24,
|
|
1060
|
+
height: 24,
|
|
1061
|
+
body: "<path fill=\"currentColor\" d=\"M9.5 3A6.5 6.5 0 0 1 16 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5l-1.5 1.5l-5-5v-.79l-.27-.27A6.516 6.516 0 0 1 9.5 16A6.5 6.5 0 0 1 3 9.5A6.5 6.5 0 0 1 9.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14S14 12 14 9.5S12 5 9.5 5Z\"/>"
|
|
1062
|
+
},
|
|
1063
|
+
"menu-down": {
|
|
1064
|
+
width: 24,
|
|
1065
|
+
height: 24,
|
|
1066
|
+
body: "<path fill=\"currentColor\" d=\"m7 10l5 5l5-5H7Z\"/>"
|
|
1067
|
+
},
|
|
1068
|
+
"menu-right": {
|
|
1069
|
+
width: 24,
|
|
1070
|
+
height: 24,
|
|
1071
|
+
body: "<path fill=\"currentColor\" d=\"m10 17l5-5l-5-5v10Z\"/>"
|
|
1072
|
+
}
|
|
1073
|
+
}
|
|
1074
|
+
}, st = !1;
|
|
1075
|
+
function ct() {
|
|
1076
|
+
st ||= (M(ot), !0);
|
|
1077
|
+
}
|
|
1078
|
+
//#endregion
|
|
1079
|
+
//#region ../icons/dist/install.js
|
|
1080
|
+
ct();
|
|
1081
|
+
//#endregion
|
|
1082
|
+
//#region ../ccui/ui/shared/hooks/use-icon.ts
|
|
1083
|
+
function lt(e) {
|
|
1084
|
+
return e.includes(":");
|
|
1085
|
+
}
|
|
1086
|
+
function ut(e) {
|
|
1087
|
+
return e ? typeof e == "string" ? lt(e) ? i(at, { icon: e }) : i("i", { class: e }) : e : null;
|
|
1088
|
+
}
|
|
1089
|
+
//#endregion
|
|
2
1090
|
//#region ../ccui/ui/shared/hooks/use-namespace.ts
|
|
3
|
-
function
|
|
1091
|
+
function K(e, t, n) {
|
|
4
1092
|
let r = e;
|
|
5
1093
|
return t && (r += `__${t}`), n && (r += `--${n}`), r;
|
|
6
1094
|
}
|
|
7
|
-
function
|
|
1095
|
+
function dt(e, t = !1) {
|
|
8
1096
|
let n = t ? `.ccui-${e}` : `ccui-${e}`;
|
|
9
1097
|
return {
|
|
10
|
-
b: () =>
|
|
11
|
-
e: (e) => e ?
|
|
12
|
-
m: (e) => e ?
|
|
13
|
-
em: (e, t) => e && t ?
|
|
1098
|
+
b: () => K(n),
|
|
1099
|
+
e: (e) => e ? K(n, e) : "",
|
|
1100
|
+
m: (e) => e ? K(n, "", e) : "",
|
|
1101
|
+
em: (e, t) => e && t ? K(n, e, t) : "",
|
|
14
1102
|
is: (e) => `is-${e}`
|
|
15
1103
|
};
|
|
16
1104
|
}
|
|
17
1105
|
//#endregion
|
|
18
1106
|
//#region ../ccui/ui/typography/src/typography-types.ts
|
|
19
|
-
var
|
|
1107
|
+
var q = {
|
|
20
1108
|
type: {
|
|
21
1109
|
type: String,
|
|
22
1110
|
default: void 0
|
|
@@ -65,15 +1153,15 @@ var d = {
|
|
|
65
1153
|
type: [Boolean, Object],
|
|
66
1154
|
default: !1
|
|
67
1155
|
}
|
|
68
|
-
},
|
|
69
|
-
...
|
|
1156
|
+
}, ft = q, pt = q, mt = {
|
|
1157
|
+
...q,
|
|
70
1158
|
level: {
|
|
71
1159
|
type: Number,
|
|
72
1160
|
default: 1,
|
|
73
1161
|
validator: (e) => e >= 1 && e <= 5
|
|
74
1162
|
}
|
|
75
|
-
},
|
|
76
|
-
...
|
|
1163
|
+
}, ht = {
|
|
1164
|
+
...q,
|
|
77
1165
|
href: {
|
|
78
1166
|
type: String,
|
|
79
1167
|
default: void 0
|
|
@@ -82,189 +1170,189 @@ var d = {
|
|
|
82
1170
|
type: String,
|
|
83
1171
|
default: void 0
|
|
84
1172
|
}
|
|
85
|
-
},
|
|
86
|
-
function
|
|
1173
|
+
}, J = dt("typography");
|
|
1174
|
+
function gt(e) {
|
|
87
1175
|
return {
|
|
88
|
-
[
|
|
89
|
-
[
|
|
90
|
-
[
|
|
1176
|
+
[J.b()]: !0,
|
|
1177
|
+
[J.m(e.type)]: !!e.type,
|
|
1178
|
+
[J.m("disabled")]: e.disabled
|
|
91
1179
|
};
|
|
92
1180
|
}
|
|
93
|
-
function
|
|
1181
|
+
function Y(e, t) {
|
|
94
1182
|
let n = e;
|
|
95
1183
|
return t.code && (n = i("code", null, [n])), t.keyboard && (n = i("kbd", null, [n])), t.mark && (n = i("mark", null, [n])), t.underline && (n = i("u", null, [n])), t.delete && (n = i("del", null, [n])), t.strong && (n = i("strong", null, [n])), t.italic && (n = i("i", null, [n])), n;
|
|
96
1184
|
}
|
|
97
|
-
function
|
|
1185
|
+
function _t(e, t) {
|
|
98
1186
|
let n = e.default?.() ?? [];
|
|
99
|
-
return n.length === 0 ? "" : n.length === 1 ?
|
|
1187
|
+
return n.length === 0 ? "" : n.length === 1 ? Y(n[0], t) : n.map((e) => Y(e, t));
|
|
100
1188
|
}
|
|
101
|
-
function
|
|
1189
|
+
function X(e, t) {
|
|
102
1190
|
return e === !1 || e === void 0 ? null : e === !0 ? t : e;
|
|
103
1191
|
}
|
|
104
|
-
function
|
|
1192
|
+
function Z(e) {
|
|
105
1193
|
return (e.default?.() ?? []).map((e) => typeof e == "string" ? e : typeof e.children == "string" ? e.children : "").join("");
|
|
106
1194
|
}
|
|
107
|
-
function
|
|
1195
|
+
function Q(s, c, u, f) {
|
|
108
1196
|
return /* @__PURE__ */ r({
|
|
109
|
-
name:
|
|
110
|
-
props:
|
|
1197
|
+
name: s,
|
|
1198
|
+
props: c,
|
|
111
1199
|
emits: ["update:editable-text"],
|
|
112
|
-
setup(r, { slots:
|
|
113
|
-
let p = r, m = e(() =>
|
|
1200
|
+
setup(r, { slots: s, emit: c }) {
|
|
1201
|
+
let p = r, m = e(() => X(p.copyable, {})), h = l(!1), g = null, _ = async () => {
|
|
114
1202
|
let e = m.value;
|
|
115
1203
|
if (!e) return;
|
|
116
|
-
let t = e.text ??
|
|
1204
|
+
let t = e.text ?? Z(s);
|
|
117
1205
|
try {
|
|
118
1206
|
typeof navigator < "u" && navigator.clipboard?.writeText && await navigator.clipboard.writeText(t), h.value = !0, e.onCopy?.(t);
|
|
119
1207
|
let n = e.copyableDelay ?? 3e3;
|
|
120
|
-
|
|
121
|
-
h.value = !1,
|
|
1208
|
+
g !== null && clearTimeout(g), g = window.setTimeout(() => {
|
|
1209
|
+
h.value = !1, g = null;
|
|
122
1210
|
}, n);
|
|
123
1211
|
} catch {}
|
|
124
|
-
},
|
|
125
|
-
|
|
126
|
-
typeof e == "boolean" && (
|
|
1212
|
+
}, v = e(() => X(p.editable, {})), y = l(!1), b = l(""), x = l(null);
|
|
1213
|
+
d(() => v.value?.editing, (e) => {
|
|
1214
|
+
typeof e == "boolean" && (y.value = e);
|
|
127
1215
|
});
|
|
128
|
-
let
|
|
129
|
-
let e =
|
|
130
|
-
e && (
|
|
131
|
-
|
|
1216
|
+
let S = () => {
|
|
1217
|
+
let e = v.value;
|
|
1218
|
+
e && (b.value = e.text ?? Z(s), y.value = !0, e.onStart?.(), a(() => {
|
|
1219
|
+
x.value?.focus();
|
|
132
1220
|
}));
|
|
133
|
-
},
|
|
134
|
-
let e =
|
|
135
|
-
e && (
|
|
136
|
-
},
|
|
137
|
-
|
|
138
|
-
},
|
|
139
|
-
|
|
140
|
-
},
|
|
1221
|
+
}, C = () => {
|
|
1222
|
+
let e = v.value;
|
|
1223
|
+
e && (y.value = !1, e.onChange?.(b.value), e.onEnd?.(), c("update:editable-text", b.value));
|
|
1224
|
+
}, ee = () => {
|
|
1225
|
+
y.value = !1, v.value?.onCancel?.();
|
|
1226
|
+
}, w = (e) => {
|
|
1227
|
+
b.value = e.target.value;
|
|
1228
|
+
}, T = (e) => {
|
|
141
1229
|
if (e.key === "Escape") {
|
|
142
|
-
|
|
1230
|
+
ee();
|
|
143
1231
|
return;
|
|
144
1232
|
}
|
|
145
|
-
e.key === "Enter" && !e.shiftKey && (e.preventDefault(),
|
|
146
|
-
},
|
|
147
|
-
let e =
|
|
148
|
-
return e && typeof e.expanded == "boolean" ? e.expanded :
|
|
149
|
-
}),
|
|
150
|
-
let e =
|
|
1233
|
+
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), C());
|
|
1234
|
+
}, E = e(() => X(p.ellipsis, {})), D = l(!1), O = e(() => {
|
|
1235
|
+
let e = E.value;
|
|
1236
|
+
return e && typeof e.expanded == "boolean" ? e.expanded : D.value;
|
|
1237
|
+
}), k = e(() => E.value?.rows ?? 1), te = e(() => {
|
|
1238
|
+
let e = E.value;
|
|
151
1239
|
return e ? e.expandable === !0 || e.expandable === "collapsible" : !1;
|
|
152
|
-
}),
|
|
153
|
-
let e =
|
|
1240
|
+
}), A = () => {
|
|
1241
|
+
let e = E.value;
|
|
154
1242
|
if (!e) return;
|
|
155
|
-
let t = !
|
|
156
|
-
typeof e.expanded != "boolean" && (
|
|
1243
|
+
let t = !O.value;
|
|
1244
|
+
typeof e.expanded != "boolean" && (D.value = t), e.onExpand?.(t);
|
|
157
1245
|
};
|
|
158
1246
|
o(() => {
|
|
159
|
-
|
|
1247
|
+
g !== null && clearTimeout(g);
|
|
160
1248
|
});
|
|
161
|
-
let
|
|
162
|
-
...
|
|
1249
|
+
let j = e(() => ({
|
|
1250
|
+
...gt(p),
|
|
163
1251
|
...f ? f(p) : {},
|
|
164
|
-
[
|
|
165
|
-
[
|
|
166
|
-
})),
|
|
1252
|
+
[J.m("ellipsis")]: !!E.value && !O.value,
|
|
1253
|
+
[J.m(`ellipsis-${k.value}`)]: !!E.value && !O.value && k.value > 1
|
|
1254
|
+
})), ne = () => {
|
|
167
1255
|
let e = m.value;
|
|
168
1256
|
if (!e) return null;
|
|
169
1257
|
let t = e.tooltips === !1 ? null : e.tooltips ?? ["复制", "已复制"], r = t ? h.value ? t[1] : t[0] : void 0;
|
|
170
|
-
return
|
|
171
|
-
class: [
|
|
1258
|
+
return s["copy-icon"] ? n("span", {
|
|
1259
|
+
class: [J.e("copy"), h.value && J.is("copied")],
|
|
172
1260
|
role: "button",
|
|
173
1261
|
title: r,
|
|
174
|
-
onClick:
|
|
175
|
-
}, [
|
|
176
|
-
class: [
|
|
1262
|
+
onClick: _
|
|
1263
|
+
}, [s["copy-icon"]({ copied: h.value })]) : n("span", {
|
|
1264
|
+
class: [J.e("copy"), h.value && J.is("copied")],
|
|
177
1265
|
role: "button",
|
|
178
1266
|
title: r,
|
|
179
|
-
onClick:
|
|
180
|
-
}, [h.value ? "
|
|
181
|
-
},
|
|
182
|
-
let e =
|
|
183
|
-
return !e || !(e.triggerType ?? ["icon"]).includes("icon") ? null :
|
|
184
|
-
class:
|
|
1267
|
+
onClick: _
|
|
1268
|
+
}, [h.value ? ut("mdi:check") : ut("mdi:content-copy")]);
|
|
1269
|
+
}, re = () => {
|
|
1270
|
+
let e = v.value;
|
|
1271
|
+
return !e || !(e.triggerType ?? ["icon"]).includes("icon") ? null : s["edit-icon"] ? n("span", {
|
|
1272
|
+
class: J.e("edit"),
|
|
185
1273
|
role: "button",
|
|
186
1274
|
title: e.tooltip || void 0,
|
|
187
|
-
onClick:
|
|
188
|
-
}, [
|
|
189
|
-
class:
|
|
1275
|
+
onClick: S
|
|
1276
|
+
}, [s["edit-icon"]()]) : n("span", {
|
|
1277
|
+
class: J.e("edit"),
|
|
190
1278
|
role: "button",
|
|
191
1279
|
title: e.tooltip || void 0,
|
|
192
|
-
onClick:
|
|
1280
|
+
onClick: S
|
|
193
1281
|
}, [t("✎")]);
|
|
194
|
-
},
|
|
195
|
-
if (!
|
|
196
|
-
let e =
|
|
197
|
-
return
|
|
198
|
-
class:
|
|
1282
|
+
}, M = () => {
|
|
1283
|
+
if (!te.value) return null;
|
|
1284
|
+
let e = E.value;
|
|
1285
|
+
return O.value ? e.expandable !== "collapsible" && e.expandable !== !0 ? null : n("span", {
|
|
1286
|
+
class: J.e("collapse"),
|
|
199
1287
|
role: "button",
|
|
200
|
-
onClick:
|
|
201
|
-
}, [
|
|
202
|
-
class:
|
|
1288
|
+
onClick: A
|
|
1289
|
+
}, [s["collapse-text"] ? s["collapse-text"]() : "收起"]) : n("span", {
|
|
1290
|
+
class: J.e("expand"),
|
|
203
1291
|
role: "button",
|
|
204
|
-
onClick:
|
|
205
|
-
}, [
|
|
206
|
-
},
|
|
207
|
-
let e =
|
|
1292
|
+
onClick: A
|
|
1293
|
+
}, [s["expand-text"] ? s["expand-text"]() : "展开"]);
|
|
1294
|
+
}, N = () => {
|
|
1295
|
+
let e = v.value;
|
|
208
1296
|
return n("textarea", {
|
|
209
1297
|
ref: (e) => {
|
|
210
|
-
|
|
1298
|
+
x.value = e;
|
|
211
1299
|
},
|
|
212
|
-
class:
|
|
213
|
-
value:
|
|
1300
|
+
class: J.e("edit-input"),
|
|
1301
|
+
value: b.value,
|
|
214
1302
|
maxlength: e.maxLength,
|
|
215
|
-
onInput:
|
|
216
|
-
onKeydown:
|
|
217
|
-
onBlur:
|
|
1303
|
+
onInput: w,
|
|
1304
|
+
onKeydown: T,
|
|
1305
|
+
onBlur: C
|
|
218
1306
|
}, null);
|
|
219
|
-
},
|
|
220
|
-
let e =
|
|
221
|
-
e && (e.triggerType ?? ["icon"]).includes("text") &&
|
|
1307
|
+
}, P = () => {
|
|
1308
|
+
let e = v.value;
|
|
1309
|
+
e && (e.triggerType ?? ["icon"]).includes("text") && S();
|
|
222
1310
|
};
|
|
223
1311
|
return () => {
|
|
224
|
-
let e =
|
|
225
|
-
let e =
|
|
226
|
-
if (!(!e || !e.tooltip ||
|
|
1312
|
+
let e = u(p), t = (() => {
|
|
1313
|
+
let e = E.value;
|
|
1314
|
+
if (!(!e || !e.tooltip || O.value)) return typeof e.tooltip == "string" ? e.tooltip : Z(s);
|
|
227
1315
|
})();
|
|
228
|
-
if (
|
|
1316
|
+
if (y.value) return i(e, { class: j.value }, [N()]);
|
|
229
1317
|
let n = {
|
|
230
|
-
class:
|
|
1318
|
+
class: j.value,
|
|
231
1319
|
title: t,
|
|
232
|
-
"data-ellipsis-rows":
|
|
1320
|
+
"data-ellipsis-rows": E.value ? k.value : void 0
|
|
233
1321
|
};
|
|
234
|
-
|
|
235
|
-
let r = [], a =
|
|
1322
|
+
v.value && (v.value.triggerType ?? ["icon"]).includes("text") && (n.onClick = P), e === "a" && (n.href = p.href, n.target = p.target);
|
|
1323
|
+
let r = [], a = _t(s, p);
|
|
236
1324
|
Array.isArray(a) ? r.push(...a) : r.push(a);
|
|
237
|
-
let o =
|
|
238
|
-
return
|
|
1325
|
+
let o = re(), c = ne(), l = M();
|
|
1326
|
+
return l && r.push(l), o && r.push(o), c && r.push(c), i(e, n, r);
|
|
239
1327
|
};
|
|
240
1328
|
}
|
|
241
1329
|
});
|
|
242
1330
|
}
|
|
243
|
-
var
|
|
244
|
-
[
|
|
245
|
-
[
|
|
246
|
-
})),
|
|
1331
|
+
var vt = Q("CTypographyText", ft, () => "span", () => ({ [J.m("text")]: !0 })), yt = Q("CTypographyParagraph", pt, () => "div", () => ({ [J.m("paragraph")]: !0 })), bt = Q("CTypographyTitle", mt, (e) => `h${e.level}`, (e) => ({
|
|
1332
|
+
[J.m("title")]: !0,
|
|
1333
|
+
[J.m(`title-${e.level}`)]: !0
|
|
1334
|
+
})), xt = Q("CTypographyLink", ht, () => "a", () => ({ [J.m("link")]: !0 })), $ = /* @__PURE__ */ r({
|
|
247
1335
|
name: "CTypography",
|
|
248
1336
|
setup(e, { slots: t }) {
|
|
249
|
-
return () => i("article", { class:
|
|
250
|
-
}
|
|
251
|
-
}),
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
1337
|
+
return () => i("article", { class: J.b() }, t.default?.());
|
|
1338
|
+
}
|
|
1339
|
+
}), St = [
|
|
1340
|
+
$,
|
|
1341
|
+
vt,
|
|
1342
|
+
yt,
|
|
1343
|
+
bt,
|
|
1344
|
+
xt
|
|
257
1345
|
];
|
|
258
|
-
|
|
259
|
-
|
|
1346
|
+
$.install = function(e) {
|
|
1347
|
+
St.forEach((t) => e.component(t.name, t));
|
|
260
1348
|
};
|
|
261
|
-
var
|
|
1349
|
+
var Ct = {
|
|
262
1350
|
title: "Typography 排版",
|
|
263
1351
|
category: "通用",
|
|
264
1352
|
status: "100%",
|
|
265
1353
|
install(e) {
|
|
266
|
-
|
|
1354
|
+
St.forEach((t) => e.component(t.name, t));
|
|
267
1355
|
}
|
|
268
1356
|
};
|
|
269
1357
|
//#endregion
|
|
270
|
-
export {
|
|
1358
|
+
export { xt as Link, yt as Paragraph, vt as Text, bt as Title, $ as Typography, Ct as default };
|