bricks-ui-library 0.0.1
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 +173 -0
- package/dist/bricks-ui-library.css +1 -0
- package/dist/bricks-ui-library.es.js +1320 -0
- package/dist/bricks-ui-library.umd.js +1 -0
- package/dist/favicon.ico +0 -0
- package/package.json +60 -0
|
@@ -0,0 +1,1320 @@
|
|
|
1
|
+
import { defineComponent as D, createElementBlock as I, openBlock as y, createElementVNode as P, createCommentVNode as ye, normalizeStyle as W, toDisplayString as C, h as te, normalizeClass as Oe, renderSlot as H, createBlock as be, unref as Ae, createTextVNode as ne, Fragment as oe, renderList as ie, withCtx as Fe } from "vue";
|
|
2
|
+
const Me = { class: "hello-world" }, Ne = /* @__PURE__ */ D({
|
|
3
|
+
__name: "HelloWorld",
|
|
4
|
+
props: {
|
|
5
|
+
title: { default: "Hello World!" },
|
|
6
|
+
subtitle: { default: "This is a sample component" },
|
|
7
|
+
titleColor: { default: "#42b883" },
|
|
8
|
+
subtitleColor: { default: "#7f8c8d" },
|
|
9
|
+
showSubtitle: { type: Boolean, default: !0 }
|
|
10
|
+
},
|
|
11
|
+
setup(e) {
|
|
12
|
+
return (t, o) => (y(), I("div", Me, [
|
|
13
|
+
P("h1", {
|
|
14
|
+
class: "title",
|
|
15
|
+
style: W({ color: e.titleColor })
|
|
16
|
+
}, C(e.title), 5),
|
|
17
|
+
e.showSubtitle ? (y(), I("h3", {
|
|
18
|
+
key: 0,
|
|
19
|
+
class: "subtitle",
|
|
20
|
+
style: W({ color: e.subtitleColor })
|
|
21
|
+
}, C(e.subtitle), 5)) : ye("", !0)
|
|
22
|
+
]));
|
|
23
|
+
}
|
|
24
|
+
}), Y = (e, t) => {
|
|
25
|
+
const o = e.__vccOpts || e;
|
|
26
|
+
for (const [i, n] of t)
|
|
27
|
+
o[i] = n;
|
|
28
|
+
return o;
|
|
29
|
+
}, xe = /* @__PURE__ */ Y(Ne, [["__scopeId", "data-v-029130f9"]]), we = /^[a-z0-9]+(-[a-z0-9]+)*$/, $ = (e, t, o, i = "") => {
|
|
30
|
+
const n = e.split(":");
|
|
31
|
+
if (e.slice(0, 1) === "@") {
|
|
32
|
+
if (n.length < 2 || n.length > 3)
|
|
33
|
+
return null;
|
|
34
|
+
i = n.shift().slice(1);
|
|
35
|
+
}
|
|
36
|
+
if (n.length > 3 || !n.length)
|
|
37
|
+
return null;
|
|
38
|
+
if (n.length > 1) {
|
|
39
|
+
const c = n.pop(), l = n.pop(), u = {
|
|
40
|
+
// Allow provider without '@': "provider:prefix:name"
|
|
41
|
+
provider: n.length > 0 ? n[0] : i,
|
|
42
|
+
prefix: l,
|
|
43
|
+
name: c
|
|
44
|
+
};
|
|
45
|
+
return t && !F(u) ? null : u;
|
|
46
|
+
}
|
|
47
|
+
const s = n[0], r = s.split("-");
|
|
48
|
+
if (r.length > 1) {
|
|
49
|
+
const c = {
|
|
50
|
+
provider: i,
|
|
51
|
+
prefix: r.shift(),
|
|
52
|
+
name: r.join("-")
|
|
53
|
+
};
|
|
54
|
+
return t && !F(c) ? null : c;
|
|
55
|
+
}
|
|
56
|
+
if (o && i === "") {
|
|
57
|
+
const c = {
|
|
58
|
+
provider: i,
|
|
59
|
+
prefix: "",
|
|
60
|
+
name: s
|
|
61
|
+
};
|
|
62
|
+
return t && !F(c, o) ? null : c;
|
|
63
|
+
}
|
|
64
|
+
return null;
|
|
65
|
+
}, F = (e, t) => e ? !!// Check prefix: cannot be empty, unless allowSimpleName is enabled
|
|
66
|
+
// Check name: cannot be empty
|
|
67
|
+
((t && e.prefix === "" || e.prefix) && e.name) : !1, Ie = Object.freeze(
|
|
68
|
+
{
|
|
69
|
+
left: 0,
|
|
70
|
+
top: 0,
|
|
71
|
+
width: 16,
|
|
72
|
+
height: 16
|
|
73
|
+
}
|
|
74
|
+
), V = Object.freeze({
|
|
75
|
+
rotate: 0,
|
|
76
|
+
vFlip: !1,
|
|
77
|
+
hFlip: !1
|
|
78
|
+
}), R = Object.freeze({
|
|
79
|
+
...Ie,
|
|
80
|
+
...V
|
|
81
|
+
}), q = Object.freeze({
|
|
82
|
+
...R,
|
|
83
|
+
body: "",
|
|
84
|
+
hidden: !1
|
|
85
|
+
});
|
|
86
|
+
function Ve(e, t) {
|
|
87
|
+
const o = {};
|
|
88
|
+
!e.hFlip != !t.hFlip && (o.hFlip = !0), !e.vFlip != !t.vFlip && (o.vFlip = !0);
|
|
89
|
+
const i = ((e.rotate || 0) + (t.rotate || 0)) % 4;
|
|
90
|
+
return i && (o.rotate = i), o;
|
|
91
|
+
}
|
|
92
|
+
function se(e, t) {
|
|
93
|
+
const o = Ve(e, t);
|
|
94
|
+
for (const i in q)
|
|
95
|
+
i in V ? i in e && !(i in o) && (o[i] = V[i]) : i in t ? o[i] = t[i] : i in e && (o[i] = e[i]);
|
|
96
|
+
return o;
|
|
97
|
+
}
|
|
98
|
+
function De(e, t) {
|
|
99
|
+
const o = e.icons, i = e.aliases || /* @__PURE__ */ Object.create(null), n = /* @__PURE__ */ Object.create(null);
|
|
100
|
+
function s(r) {
|
|
101
|
+
if (o[r])
|
|
102
|
+
return n[r] = [];
|
|
103
|
+
if (!(r in n)) {
|
|
104
|
+
n[r] = null;
|
|
105
|
+
const c = i[r] && i[r].parent, l = c && s(c);
|
|
106
|
+
l && (n[r] = [c].concat(l));
|
|
107
|
+
}
|
|
108
|
+
return n[r];
|
|
109
|
+
}
|
|
110
|
+
return Object.keys(o).concat(Object.keys(i)).forEach(s), n;
|
|
111
|
+
}
|
|
112
|
+
function $e(e, t, o) {
|
|
113
|
+
const i = e.icons, n = e.aliases || /* @__PURE__ */ Object.create(null);
|
|
114
|
+
let s = {};
|
|
115
|
+
function r(c) {
|
|
116
|
+
s = se(
|
|
117
|
+
i[c] || n[c],
|
|
118
|
+
s
|
|
119
|
+
);
|
|
120
|
+
}
|
|
121
|
+
return r(t), o.forEach(r), se(e, s);
|
|
122
|
+
}
|
|
123
|
+
function ve(e, t) {
|
|
124
|
+
const o = [];
|
|
125
|
+
if (typeof e != "object" || typeof e.icons != "object")
|
|
126
|
+
return o;
|
|
127
|
+
e.not_found instanceof Array && e.not_found.forEach((n) => {
|
|
128
|
+
t(n, null), o.push(n);
|
|
129
|
+
});
|
|
130
|
+
const i = De(e);
|
|
131
|
+
for (const n in i) {
|
|
132
|
+
const s = i[n];
|
|
133
|
+
s && (t(n, $e(e, n, s)), o.push(n));
|
|
134
|
+
}
|
|
135
|
+
return o;
|
|
136
|
+
}
|
|
137
|
+
const Re = {
|
|
138
|
+
provider: "",
|
|
139
|
+
aliases: {},
|
|
140
|
+
not_found: {},
|
|
141
|
+
...Ie
|
|
142
|
+
};
|
|
143
|
+
function U(e, t) {
|
|
144
|
+
for (const o in t)
|
|
145
|
+
if (o in e && typeof e[o] != typeof t[o])
|
|
146
|
+
return !1;
|
|
147
|
+
return !0;
|
|
148
|
+
}
|
|
149
|
+
function ke(e) {
|
|
150
|
+
if (typeof e != "object" || e === null)
|
|
151
|
+
return null;
|
|
152
|
+
const t = e;
|
|
153
|
+
if (typeof t.prefix != "string" || !e.icons || typeof e.icons != "object" || !U(e, Re))
|
|
154
|
+
return null;
|
|
155
|
+
const o = t.icons;
|
|
156
|
+
for (const n in o) {
|
|
157
|
+
const s = o[n];
|
|
158
|
+
if (
|
|
159
|
+
// Name cannot be empty
|
|
160
|
+
!n || // Must have body
|
|
161
|
+
typeof s.body != "string" || // Check other props
|
|
162
|
+
!U(
|
|
163
|
+
s,
|
|
164
|
+
q
|
|
165
|
+
)
|
|
166
|
+
)
|
|
167
|
+
return null;
|
|
168
|
+
}
|
|
169
|
+
const i = t.aliases || /* @__PURE__ */ Object.create(null);
|
|
170
|
+
for (const n in i) {
|
|
171
|
+
const s = i[n], r = s.parent;
|
|
172
|
+
if (
|
|
173
|
+
// Name cannot be empty
|
|
174
|
+
!n || // Parent must be set and point to existing icon
|
|
175
|
+
typeof r != "string" || !o[r] && !i[r] || // Check other props
|
|
176
|
+
!U(
|
|
177
|
+
s,
|
|
178
|
+
q
|
|
179
|
+
)
|
|
180
|
+
)
|
|
181
|
+
return null;
|
|
182
|
+
}
|
|
183
|
+
return t;
|
|
184
|
+
}
|
|
185
|
+
const re = /* @__PURE__ */ Object.create(null);
|
|
186
|
+
function ze(e, t) {
|
|
187
|
+
return {
|
|
188
|
+
provider: e,
|
|
189
|
+
prefix: t,
|
|
190
|
+
icons: /* @__PURE__ */ Object.create(null),
|
|
191
|
+
missing: /* @__PURE__ */ new Set()
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
function _(e, t) {
|
|
195
|
+
const o = re[e] || (re[e] = /* @__PURE__ */ Object.create(null));
|
|
196
|
+
return o[t] || (o[t] = ze(e, t));
|
|
197
|
+
}
|
|
198
|
+
function Se(e, t) {
|
|
199
|
+
return ke(t) ? ve(t, (o, i) => {
|
|
200
|
+
i ? e.icons[o] = i : e.missing.add(o);
|
|
201
|
+
}) : [];
|
|
202
|
+
}
|
|
203
|
+
function He(e, t, o) {
|
|
204
|
+
try {
|
|
205
|
+
if (typeof o.body == "string")
|
|
206
|
+
return e.icons[t] = { ...o }, !0;
|
|
207
|
+
} catch {
|
|
208
|
+
}
|
|
209
|
+
return !1;
|
|
210
|
+
}
|
|
211
|
+
let O = !1;
|
|
212
|
+
function Te(e) {
|
|
213
|
+
return typeof e == "boolean" && (O = e), O;
|
|
214
|
+
}
|
|
215
|
+
function Ue(e) {
|
|
216
|
+
const t = typeof e == "string" ? $(e, !0, O) : e;
|
|
217
|
+
if (t) {
|
|
218
|
+
const o = _(t.provider, t.prefix), i = t.name;
|
|
219
|
+
return o.icons[i] || (o.missing.has(i) ? null : void 0);
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
function Be(e, t) {
|
|
223
|
+
const o = $(e, !0, O);
|
|
224
|
+
if (!o)
|
|
225
|
+
return !1;
|
|
226
|
+
const i = _(o.provider, o.prefix);
|
|
227
|
+
return t ? He(i, o.name, t) : (i.missing.add(o.name), !0);
|
|
228
|
+
}
|
|
229
|
+
function We(e, t) {
|
|
230
|
+
if (typeof e != "object")
|
|
231
|
+
return !1;
|
|
232
|
+
if (typeof t != "string" && (t = e.provider || ""), O && !t && !e.prefix) {
|
|
233
|
+
let n = !1;
|
|
234
|
+
return ke(e) && (e.prefix = "", ve(e, (s, r) => {
|
|
235
|
+
Be(s, r) && (n = !0);
|
|
236
|
+
})), n;
|
|
237
|
+
}
|
|
238
|
+
const o = e.prefix;
|
|
239
|
+
if (!F({
|
|
240
|
+
prefix: o,
|
|
241
|
+
name: "a"
|
|
242
|
+
}))
|
|
243
|
+
return !1;
|
|
244
|
+
const i = _(t, o);
|
|
245
|
+
return !!Se(i, e);
|
|
246
|
+
}
|
|
247
|
+
const Ce = Object.freeze({
|
|
248
|
+
width: null,
|
|
249
|
+
height: null
|
|
250
|
+
}), _e = Object.freeze({
|
|
251
|
+
// Dimensions
|
|
252
|
+
...Ce,
|
|
253
|
+
// Transformations
|
|
254
|
+
...V
|
|
255
|
+
}), qe = /(-?[0-9.]*[0-9]+[0-9.]*)/g, Qe = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
|
|
256
|
+
function ce(e, t, o) {
|
|
257
|
+
if (t === 1)
|
|
258
|
+
return e;
|
|
259
|
+
if (o = o || 100, typeof e == "number")
|
|
260
|
+
return Math.ceil(e * t * o) / o;
|
|
261
|
+
if (typeof e != "string")
|
|
262
|
+
return e;
|
|
263
|
+
const i = e.split(qe);
|
|
264
|
+
if (i === null || !i.length)
|
|
265
|
+
return e;
|
|
266
|
+
const n = [];
|
|
267
|
+
let s = i.shift(), r = Qe.test(s);
|
|
268
|
+
for (; ; ) {
|
|
269
|
+
if (r) {
|
|
270
|
+
const c = parseFloat(s);
|
|
271
|
+
isNaN(c) ? n.push(s) : n.push(Math.ceil(c * t * o) / o);
|
|
272
|
+
} else
|
|
273
|
+
n.push(s);
|
|
274
|
+
if (s = i.shift(), s === void 0)
|
|
275
|
+
return n.join("");
|
|
276
|
+
r = !r;
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
function Ge(e, t = "defs") {
|
|
280
|
+
let o = "";
|
|
281
|
+
const i = e.indexOf("<" + t);
|
|
282
|
+
for (; i >= 0; ) {
|
|
283
|
+
const n = e.indexOf(">", i), s = e.indexOf("</" + t);
|
|
284
|
+
if (n === -1 || s === -1)
|
|
285
|
+
break;
|
|
286
|
+
const r = e.indexOf(">", s);
|
|
287
|
+
if (r === -1)
|
|
288
|
+
break;
|
|
289
|
+
o += e.slice(n + 1, s).trim(), e = e.slice(0, i).trim() + e.slice(r + 1);
|
|
290
|
+
}
|
|
291
|
+
return {
|
|
292
|
+
defs: o,
|
|
293
|
+
content: e
|
|
294
|
+
};
|
|
295
|
+
}
|
|
296
|
+
function Ke(e, t) {
|
|
297
|
+
return e ? "<defs>" + e + "</defs>" + t : t;
|
|
298
|
+
}
|
|
299
|
+
function Ye(e, t, o) {
|
|
300
|
+
const i = Ge(e);
|
|
301
|
+
return Ke(i.defs, t + i.content + o);
|
|
302
|
+
}
|
|
303
|
+
const Je = (e) => e === "unset" || e === "undefined" || e === "none";
|
|
304
|
+
function Xe(e, t) {
|
|
305
|
+
const o = {
|
|
306
|
+
...R,
|
|
307
|
+
...e
|
|
308
|
+
}, i = {
|
|
309
|
+
..._e,
|
|
310
|
+
...t
|
|
311
|
+
}, n = {
|
|
312
|
+
left: o.left,
|
|
313
|
+
top: o.top,
|
|
314
|
+
width: o.width,
|
|
315
|
+
height: o.height
|
|
316
|
+
};
|
|
317
|
+
let s = o.body;
|
|
318
|
+
[o, i].forEach((g) => {
|
|
319
|
+
const a = [], T = g.hFlip, k = g.vFlip;
|
|
320
|
+
let w = g.rotate;
|
|
321
|
+
T ? k ? w += 2 : (a.push(
|
|
322
|
+
"translate(" + (n.width + n.left).toString() + " " + (0 - n.top).toString() + ")"
|
|
323
|
+
), a.push("scale(-1 1)"), n.top = n.left = 0) : k && (a.push(
|
|
324
|
+
"translate(" + (0 - n.left).toString() + " " + (n.height + n.top).toString() + ")"
|
|
325
|
+
), a.push("scale(1 -1)"), n.top = n.left = 0);
|
|
326
|
+
let b;
|
|
327
|
+
switch (w < 0 && (w -= Math.floor(w / 4) * 4), w = w % 4, w) {
|
|
328
|
+
case 1:
|
|
329
|
+
b = n.height / 2 + n.top, a.unshift(
|
|
330
|
+
"rotate(90 " + b.toString() + " " + b.toString() + ")"
|
|
331
|
+
);
|
|
332
|
+
break;
|
|
333
|
+
case 2:
|
|
334
|
+
a.unshift(
|
|
335
|
+
"rotate(180 " + (n.width / 2 + n.left).toString() + " " + (n.height / 2 + n.top).toString() + ")"
|
|
336
|
+
);
|
|
337
|
+
break;
|
|
338
|
+
case 3:
|
|
339
|
+
b = n.width / 2 + n.left, a.unshift(
|
|
340
|
+
"rotate(-90 " + b.toString() + " " + b.toString() + ")"
|
|
341
|
+
);
|
|
342
|
+
break;
|
|
343
|
+
}
|
|
344
|
+
w % 2 === 1 && (n.left !== n.top && (b = n.left, n.left = n.top, n.top = b), n.width !== n.height && (b = n.width, n.width = n.height, n.height = b)), a.length && (s = Ye(
|
|
345
|
+
s,
|
|
346
|
+
'<g transform="' + a.join(" ") + '">',
|
|
347
|
+
"</g>"
|
|
348
|
+
));
|
|
349
|
+
});
|
|
350
|
+
const r = i.width, c = i.height, l = n.width, u = n.height;
|
|
351
|
+
let f, d;
|
|
352
|
+
r === null ? (d = c === null ? "1em" : c === "auto" ? u : c, f = ce(d, l / u)) : (f = r === "auto" ? l : r, d = c === null ? ce(f, u / l) : c === "auto" ? u : c);
|
|
353
|
+
const p = {}, m = (g, a) => {
|
|
354
|
+
Je(a) || (p[g] = a.toString());
|
|
355
|
+
};
|
|
356
|
+
m("width", f), m("height", d);
|
|
357
|
+
const v = [n.left, n.top, l, u];
|
|
358
|
+
return p.viewBox = v.join(" "), {
|
|
359
|
+
attributes: p,
|
|
360
|
+
viewBox: v,
|
|
361
|
+
body: s
|
|
362
|
+
};
|
|
363
|
+
}
|
|
364
|
+
const Ze = /\sid="(\S+)"/g, et = "IconifyId" + Date.now().toString(16) + (Math.random() * 16777216 | 0).toString(16);
|
|
365
|
+
let tt = 0;
|
|
366
|
+
function nt(e, t = et) {
|
|
367
|
+
const o = [];
|
|
368
|
+
let i;
|
|
369
|
+
for (; i = Ze.exec(e); )
|
|
370
|
+
o.push(i[1]);
|
|
371
|
+
if (!o.length)
|
|
372
|
+
return e;
|
|
373
|
+
const n = "suffix" + (Math.random() * 16777216 | Date.now()).toString(16);
|
|
374
|
+
return o.forEach((s) => {
|
|
375
|
+
const r = typeof t == "function" ? t(s) : t + (tt++).toString(), c = s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
376
|
+
e = e.replace(
|
|
377
|
+
// Allowed characters before id: [#;"]
|
|
378
|
+
// Allowed characters after id: [)"], .[a-z]
|
|
379
|
+
new RegExp('([#;"])(' + c + ')([")]|\\.[a-z])', "g"),
|
|
380
|
+
"$1" + r + n + "$3"
|
|
381
|
+
);
|
|
382
|
+
}), e = e.replace(new RegExp(n, "g"), ""), e;
|
|
383
|
+
}
|
|
384
|
+
const Q = /* @__PURE__ */ Object.create(null);
|
|
385
|
+
function ot(e, t) {
|
|
386
|
+
Q[e] = t;
|
|
387
|
+
}
|
|
388
|
+
function G(e) {
|
|
389
|
+
return Q[e] || Q[""];
|
|
390
|
+
}
|
|
391
|
+
function J(e) {
|
|
392
|
+
let t;
|
|
393
|
+
if (typeof e.resources == "string")
|
|
394
|
+
t = [e.resources];
|
|
395
|
+
else if (t = e.resources, !(t instanceof Array) || !t.length)
|
|
396
|
+
return null;
|
|
397
|
+
return {
|
|
398
|
+
// API hosts
|
|
399
|
+
resources: t,
|
|
400
|
+
// Root path
|
|
401
|
+
path: e.path || "/",
|
|
402
|
+
// URL length limit
|
|
403
|
+
maxURL: e.maxURL || 500,
|
|
404
|
+
// Timeout before next host is used.
|
|
405
|
+
rotate: e.rotate || 750,
|
|
406
|
+
// Timeout before failing query.
|
|
407
|
+
timeout: e.timeout || 5e3,
|
|
408
|
+
// Randomise default API end point.
|
|
409
|
+
random: e.random === !0,
|
|
410
|
+
// Start index
|
|
411
|
+
index: e.index || 0,
|
|
412
|
+
// Receive data after time out (used if time out kicks in first, then API module sends data anyway).
|
|
413
|
+
dataAfterTimeout: e.dataAfterTimeout !== !1
|
|
414
|
+
};
|
|
415
|
+
}
|
|
416
|
+
const X = /* @__PURE__ */ Object.create(null), j = [
|
|
417
|
+
"https://api.simplesvg.com",
|
|
418
|
+
"https://api.unisvg.com"
|
|
419
|
+
], M = [];
|
|
420
|
+
for (; j.length > 0; )
|
|
421
|
+
j.length === 1 || Math.random() > 0.5 ? M.push(j.shift()) : M.push(j.pop());
|
|
422
|
+
X[""] = J({
|
|
423
|
+
resources: ["https://api.iconify.design"].concat(M)
|
|
424
|
+
});
|
|
425
|
+
function it(e, t) {
|
|
426
|
+
const o = J(t);
|
|
427
|
+
return o === null ? !1 : (X[e] = o, !0);
|
|
428
|
+
}
|
|
429
|
+
function Z(e) {
|
|
430
|
+
return X[e];
|
|
431
|
+
}
|
|
432
|
+
const st = () => {
|
|
433
|
+
let e;
|
|
434
|
+
try {
|
|
435
|
+
if (e = fetch, typeof e == "function")
|
|
436
|
+
return e;
|
|
437
|
+
} catch {
|
|
438
|
+
}
|
|
439
|
+
};
|
|
440
|
+
let le = st();
|
|
441
|
+
function rt(e, t) {
|
|
442
|
+
const o = Z(e);
|
|
443
|
+
if (!o)
|
|
444
|
+
return 0;
|
|
445
|
+
let i;
|
|
446
|
+
if (!o.maxURL)
|
|
447
|
+
i = 0;
|
|
448
|
+
else {
|
|
449
|
+
let n = 0;
|
|
450
|
+
o.resources.forEach((r) => {
|
|
451
|
+
n = Math.max(n, r.length);
|
|
452
|
+
});
|
|
453
|
+
const s = t + ".json?icons=";
|
|
454
|
+
i = o.maxURL - n - o.path.length - s.length;
|
|
455
|
+
}
|
|
456
|
+
return i;
|
|
457
|
+
}
|
|
458
|
+
function ct(e) {
|
|
459
|
+
return e === 404;
|
|
460
|
+
}
|
|
461
|
+
const lt = (e, t, o) => {
|
|
462
|
+
const i = [], n = rt(e, t), s = "icons";
|
|
463
|
+
let r = {
|
|
464
|
+
type: s,
|
|
465
|
+
provider: e,
|
|
466
|
+
prefix: t,
|
|
467
|
+
icons: []
|
|
468
|
+
}, c = 0;
|
|
469
|
+
return o.forEach((l, u) => {
|
|
470
|
+
c += l.length + 1, c >= n && u > 0 && (i.push(r), r = {
|
|
471
|
+
type: s,
|
|
472
|
+
provider: e,
|
|
473
|
+
prefix: t,
|
|
474
|
+
icons: []
|
|
475
|
+
}, c = l.length), r.icons.push(l);
|
|
476
|
+
}), i.push(r), i;
|
|
477
|
+
};
|
|
478
|
+
function ut(e) {
|
|
479
|
+
if (typeof e == "string") {
|
|
480
|
+
const t = Z(e);
|
|
481
|
+
if (t)
|
|
482
|
+
return t.path;
|
|
483
|
+
}
|
|
484
|
+
return "/";
|
|
485
|
+
}
|
|
486
|
+
const at = (e, t, o) => {
|
|
487
|
+
if (!le) {
|
|
488
|
+
o("abort", 424);
|
|
489
|
+
return;
|
|
490
|
+
}
|
|
491
|
+
let i = ut(t.provider);
|
|
492
|
+
switch (t.type) {
|
|
493
|
+
case "icons": {
|
|
494
|
+
const s = t.prefix, c = t.icons.join(","), l = new URLSearchParams({
|
|
495
|
+
icons: c
|
|
496
|
+
});
|
|
497
|
+
i += s + ".json?" + l.toString();
|
|
498
|
+
break;
|
|
499
|
+
}
|
|
500
|
+
case "custom": {
|
|
501
|
+
const s = t.uri;
|
|
502
|
+
i += s.slice(0, 1) === "/" ? s.slice(1) : s;
|
|
503
|
+
break;
|
|
504
|
+
}
|
|
505
|
+
default:
|
|
506
|
+
o("abort", 400);
|
|
507
|
+
return;
|
|
508
|
+
}
|
|
509
|
+
let n = 503;
|
|
510
|
+
le(e + i).then((s) => {
|
|
511
|
+
const r = s.status;
|
|
512
|
+
if (r !== 200) {
|
|
513
|
+
setTimeout(() => {
|
|
514
|
+
o(ct(r) ? "abort" : "next", r);
|
|
515
|
+
});
|
|
516
|
+
return;
|
|
517
|
+
}
|
|
518
|
+
return n = 501, s.json();
|
|
519
|
+
}).then((s) => {
|
|
520
|
+
if (typeof s != "object" || s === null) {
|
|
521
|
+
setTimeout(() => {
|
|
522
|
+
s === 404 ? o("abort", s) : o("next", n);
|
|
523
|
+
});
|
|
524
|
+
return;
|
|
525
|
+
}
|
|
526
|
+
setTimeout(() => {
|
|
527
|
+
o("success", s);
|
|
528
|
+
});
|
|
529
|
+
}).catch(() => {
|
|
530
|
+
o("next", n);
|
|
531
|
+
});
|
|
532
|
+
}, ft = {
|
|
533
|
+
prepare: lt,
|
|
534
|
+
send: at
|
|
535
|
+
};
|
|
536
|
+
function dt(e) {
|
|
537
|
+
const t = {
|
|
538
|
+
loaded: [],
|
|
539
|
+
missing: [],
|
|
540
|
+
pending: []
|
|
541
|
+
}, o = /* @__PURE__ */ Object.create(null);
|
|
542
|
+
e.sort((n, s) => n.provider !== s.provider ? n.provider.localeCompare(s.provider) : n.prefix !== s.prefix ? n.prefix.localeCompare(s.prefix) : n.name.localeCompare(s.name));
|
|
543
|
+
let i = {
|
|
544
|
+
provider: "",
|
|
545
|
+
prefix: "",
|
|
546
|
+
name: ""
|
|
547
|
+
};
|
|
548
|
+
return e.forEach((n) => {
|
|
549
|
+
if (i.name === n.name && i.prefix === n.prefix && i.provider === n.provider)
|
|
550
|
+
return;
|
|
551
|
+
i = n;
|
|
552
|
+
const s = n.provider, r = n.prefix, c = n.name, l = o[s] || (o[s] = /* @__PURE__ */ Object.create(null)), u = l[r] || (l[r] = _(s, r));
|
|
553
|
+
let f;
|
|
554
|
+
c in u.icons ? f = t.loaded : r === "" || u.missing.has(c) ? f = t.missing : f = t.pending;
|
|
555
|
+
const d = {
|
|
556
|
+
provider: s,
|
|
557
|
+
prefix: r,
|
|
558
|
+
name: c
|
|
559
|
+
};
|
|
560
|
+
f.push(d);
|
|
561
|
+
}), t;
|
|
562
|
+
}
|
|
563
|
+
function Le(e, t) {
|
|
564
|
+
e.forEach((o) => {
|
|
565
|
+
const i = o.loaderCallbacks;
|
|
566
|
+
i && (o.loaderCallbacks = i.filter((n) => n.id !== t));
|
|
567
|
+
});
|
|
568
|
+
}
|
|
569
|
+
function ht(e) {
|
|
570
|
+
e.pendingCallbacksFlag || (e.pendingCallbacksFlag = !0, setTimeout(() => {
|
|
571
|
+
e.pendingCallbacksFlag = !1;
|
|
572
|
+
const t = e.loaderCallbacks ? e.loaderCallbacks.slice(0) : [];
|
|
573
|
+
if (!t.length)
|
|
574
|
+
return;
|
|
575
|
+
let o = !1;
|
|
576
|
+
const i = e.provider, n = e.prefix;
|
|
577
|
+
t.forEach((s) => {
|
|
578
|
+
const r = s.icons, c = r.pending.length;
|
|
579
|
+
r.pending = r.pending.filter((l) => {
|
|
580
|
+
if (l.prefix !== n)
|
|
581
|
+
return !0;
|
|
582
|
+
const u = l.name;
|
|
583
|
+
if (e.icons[u])
|
|
584
|
+
r.loaded.push({
|
|
585
|
+
provider: i,
|
|
586
|
+
prefix: n,
|
|
587
|
+
name: u
|
|
588
|
+
});
|
|
589
|
+
else if (e.missing.has(u))
|
|
590
|
+
r.missing.push({
|
|
591
|
+
provider: i,
|
|
592
|
+
prefix: n,
|
|
593
|
+
name: u
|
|
594
|
+
});
|
|
595
|
+
else
|
|
596
|
+
return o = !0, !0;
|
|
597
|
+
return !1;
|
|
598
|
+
}), r.pending.length !== c && (o || Le([e], s.id), s.callback(
|
|
599
|
+
r.loaded.slice(0),
|
|
600
|
+
r.missing.slice(0),
|
|
601
|
+
r.pending.slice(0),
|
|
602
|
+
s.abort
|
|
603
|
+
));
|
|
604
|
+
});
|
|
605
|
+
}));
|
|
606
|
+
}
|
|
607
|
+
let pt = 0;
|
|
608
|
+
function gt(e, t, o) {
|
|
609
|
+
const i = pt++, n = Le.bind(null, o, i);
|
|
610
|
+
if (!t.pending.length)
|
|
611
|
+
return n;
|
|
612
|
+
const s = {
|
|
613
|
+
id: i,
|
|
614
|
+
icons: t,
|
|
615
|
+
callback: e,
|
|
616
|
+
abort: n
|
|
617
|
+
};
|
|
618
|
+
return o.forEach((r) => {
|
|
619
|
+
(r.loaderCallbacks || (r.loaderCallbacks = [])).push(s);
|
|
620
|
+
}), n;
|
|
621
|
+
}
|
|
622
|
+
function mt(e, t = !0, o = !1) {
|
|
623
|
+
const i = [];
|
|
624
|
+
return e.forEach((n) => {
|
|
625
|
+
const s = typeof n == "string" ? $(n, t, o) : n;
|
|
626
|
+
s && i.push(s);
|
|
627
|
+
}), i;
|
|
628
|
+
}
|
|
629
|
+
var yt = {
|
|
630
|
+
resources: [],
|
|
631
|
+
index: 0,
|
|
632
|
+
timeout: 2e3,
|
|
633
|
+
rotate: 750,
|
|
634
|
+
random: !1,
|
|
635
|
+
dataAfterTimeout: !1
|
|
636
|
+
};
|
|
637
|
+
function bt(e, t, o, i) {
|
|
638
|
+
const n = e.resources.length, s = e.random ? Math.floor(Math.random() * n) : e.index;
|
|
639
|
+
let r;
|
|
640
|
+
if (e.random) {
|
|
641
|
+
let h = e.resources.slice(0);
|
|
642
|
+
for (r = []; h.length > 1; ) {
|
|
643
|
+
const x = Math.floor(Math.random() * h.length);
|
|
644
|
+
r.push(h[x]), h = h.slice(0, x).concat(h.slice(x + 1));
|
|
645
|
+
}
|
|
646
|
+
r = r.concat(h);
|
|
647
|
+
} else
|
|
648
|
+
r = e.resources.slice(s).concat(e.resources.slice(0, s));
|
|
649
|
+
const c = Date.now();
|
|
650
|
+
let l = "pending", u = 0, f, d = null, p = [], m = [];
|
|
651
|
+
typeof i == "function" && m.push(i);
|
|
652
|
+
function v() {
|
|
653
|
+
d && (clearTimeout(d), d = null);
|
|
654
|
+
}
|
|
655
|
+
function g() {
|
|
656
|
+
l === "pending" && (l = "aborted"), v(), p.forEach((h) => {
|
|
657
|
+
h.status === "pending" && (h.status = "aborted");
|
|
658
|
+
}), p = [];
|
|
659
|
+
}
|
|
660
|
+
function a(h, x) {
|
|
661
|
+
x && (m = []), typeof h == "function" && m.push(h);
|
|
662
|
+
}
|
|
663
|
+
function T() {
|
|
664
|
+
return {
|
|
665
|
+
startTime: c,
|
|
666
|
+
payload: t,
|
|
667
|
+
status: l,
|
|
668
|
+
queriesSent: u,
|
|
669
|
+
queriesPending: p.length,
|
|
670
|
+
subscribe: a,
|
|
671
|
+
abort: g
|
|
672
|
+
};
|
|
673
|
+
}
|
|
674
|
+
function k() {
|
|
675
|
+
l = "failed", m.forEach((h) => {
|
|
676
|
+
h(void 0, f);
|
|
677
|
+
});
|
|
678
|
+
}
|
|
679
|
+
function w() {
|
|
680
|
+
p.forEach((h) => {
|
|
681
|
+
h.status === "pending" && (h.status = "aborted");
|
|
682
|
+
}), p = [];
|
|
683
|
+
}
|
|
684
|
+
function b(h, x, L) {
|
|
685
|
+
const A = x !== "success";
|
|
686
|
+
switch (p = p.filter((S) => S !== h), l) {
|
|
687
|
+
case "pending":
|
|
688
|
+
break;
|
|
689
|
+
case "failed":
|
|
690
|
+
if (A || !e.dataAfterTimeout)
|
|
691
|
+
return;
|
|
692
|
+
break;
|
|
693
|
+
default:
|
|
694
|
+
return;
|
|
695
|
+
}
|
|
696
|
+
if (x === "abort") {
|
|
697
|
+
f = L, k();
|
|
698
|
+
return;
|
|
699
|
+
}
|
|
700
|
+
if (A) {
|
|
701
|
+
f = L, p.length || (r.length ? z() : k());
|
|
702
|
+
return;
|
|
703
|
+
}
|
|
704
|
+
if (v(), w(), !e.random) {
|
|
705
|
+
const S = e.resources.indexOf(h.resource);
|
|
706
|
+
S !== -1 && S !== e.index && (e.index = S);
|
|
707
|
+
}
|
|
708
|
+
l = "completed", m.forEach((S) => {
|
|
709
|
+
S(L);
|
|
710
|
+
});
|
|
711
|
+
}
|
|
712
|
+
function z() {
|
|
713
|
+
if (l !== "pending")
|
|
714
|
+
return;
|
|
715
|
+
v();
|
|
716
|
+
const h = r.shift();
|
|
717
|
+
if (h === void 0) {
|
|
718
|
+
if (p.length) {
|
|
719
|
+
d = setTimeout(() => {
|
|
720
|
+
v(), l === "pending" && (w(), k());
|
|
721
|
+
}, e.timeout);
|
|
722
|
+
return;
|
|
723
|
+
}
|
|
724
|
+
k();
|
|
725
|
+
return;
|
|
726
|
+
}
|
|
727
|
+
const x = {
|
|
728
|
+
status: "pending",
|
|
729
|
+
resource: h,
|
|
730
|
+
callback: (L, A) => {
|
|
731
|
+
b(x, L, A);
|
|
732
|
+
}
|
|
733
|
+
};
|
|
734
|
+
p.push(x), u++, d = setTimeout(z, e.rotate), o(h, t, x.callback);
|
|
735
|
+
}
|
|
736
|
+
return setTimeout(z), T;
|
|
737
|
+
}
|
|
738
|
+
function je(e) {
|
|
739
|
+
const t = {
|
|
740
|
+
...yt,
|
|
741
|
+
...e
|
|
742
|
+
};
|
|
743
|
+
let o = [];
|
|
744
|
+
function i() {
|
|
745
|
+
o = o.filter((c) => c().status === "pending");
|
|
746
|
+
}
|
|
747
|
+
function n(c, l, u) {
|
|
748
|
+
const f = bt(
|
|
749
|
+
t,
|
|
750
|
+
c,
|
|
751
|
+
l,
|
|
752
|
+
(d, p) => {
|
|
753
|
+
i(), u && u(d, p);
|
|
754
|
+
}
|
|
755
|
+
);
|
|
756
|
+
return o.push(f), f;
|
|
757
|
+
}
|
|
758
|
+
function s(c) {
|
|
759
|
+
return o.find((l) => c(l)) || null;
|
|
760
|
+
}
|
|
761
|
+
return {
|
|
762
|
+
query: n,
|
|
763
|
+
find: s,
|
|
764
|
+
setIndex: (c) => {
|
|
765
|
+
t.index = c;
|
|
766
|
+
},
|
|
767
|
+
getIndex: () => t.index,
|
|
768
|
+
cleanup: i
|
|
769
|
+
};
|
|
770
|
+
}
|
|
771
|
+
function ue() {
|
|
772
|
+
}
|
|
773
|
+
const B = /* @__PURE__ */ Object.create(null);
|
|
774
|
+
function xt(e) {
|
|
775
|
+
if (!B[e]) {
|
|
776
|
+
const t = Z(e);
|
|
777
|
+
if (!t)
|
|
778
|
+
return;
|
|
779
|
+
const o = je(t), i = {
|
|
780
|
+
config: t,
|
|
781
|
+
redundancy: o
|
|
782
|
+
};
|
|
783
|
+
B[e] = i;
|
|
784
|
+
}
|
|
785
|
+
return B[e];
|
|
786
|
+
}
|
|
787
|
+
function wt(e, t, o) {
|
|
788
|
+
let i, n;
|
|
789
|
+
if (typeof e == "string") {
|
|
790
|
+
const s = G(e);
|
|
791
|
+
if (!s)
|
|
792
|
+
return o(void 0, 424), ue;
|
|
793
|
+
n = s.send;
|
|
794
|
+
const r = xt(e);
|
|
795
|
+
r && (i = r.redundancy);
|
|
796
|
+
} else {
|
|
797
|
+
const s = J(e);
|
|
798
|
+
if (s) {
|
|
799
|
+
i = je(s);
|
|
800
|
+
const r = e.resources ? e.resources[0] : "", c = G(r);
|
|
801
|
+
c && (n = c.send);
|
|
802
|
+
}
|
|
803
|
+
}
|
|
804
|
+
return !i || !n ? (o(void 0, 424), ue) : i.query(t, n, o)().abort;
|
|
805
|
+
}
|
|
806
|
+
function ae() {
|
|
807
|
+
}
|
|
808
|
+
function It(e) {
|
|
809
|
+
e.iconsLoaderFlag || (e.iconsLoaderFlag = !0, setTimeout(() => {
|
|
810
|
+
e.iconsLoaderFlag = !1, ht(e);
|
|
811
|
+
}));
|
|
812
|
+
}
|
|
813
|
+
function vt(e) {
|
|
814
|
+
const t = [], o = [];
|
|
815
|
+
return e.forEach((i) => {
|
|
816
|
+
(i.match(we) ? t : o).push(i);
|
|
817
|
+
}), {
|
|
818
|
+
valid: t,
|
|
819
|
+
invalid: o
|
|
820
|
+
};
|
|
821
|
+
}
|
|
822
|
+
function E(e, t, o) {
|
|
823
|
+
function i() {
|
|
824
|
+
const n = e.pendingIcons;
|
|
825
|
+
t.forEach((s) => {
|
|
826
|
+
n && n.delete(s), e.icons[s] || e.missing.add(s);
|
|
827
|
+
});
|
|
828
|
+
}
|
|
829
|
+
if (o && typeof o == "object")
|
|
830
|
+
try {
|
|
831
|
+
if (!Se(e, o).length) {
|
|
832
|
+
i();
|
|
833
|
+
return;
|
|
834
|
+
}
|
|
835
|
+
} catch (n) {
|
|
836
|
+
console.error(n);
|
|
837
|
+
}
|
|
838
|
+
i(), It(e);
|
|
839
|
+
}
|
|
840
|
+
function fe(e, t) {
|
|
841
|
+
e instanceof Promise ? e.then((o) => {
|
|
842
|
+
t(o);
|
|
843
|
+
}).catch(() => {
|
|
844
|
+
t(null);
|
|
845
|
+
}) : t(e);
|
|
846
|
+
}
|
|
847
|
+
function kt(e, t) {
|
|
848
|
+
e.iconsToLoad ? e.iconsToLoad = e.iconsToLoad.concat(t).sort() : e.iconsToLoad = t, e.iconsQueueFlag || (e.iconsQueueFlag = !0, setTimeout(() => {
|
|
849
|
+
e.iconsQueueFlag = !1;
|
|
850
|
+
const { provider: o, prefix: i } = e, n = e.iconsToLoad;
|
|
851
|
+
if (delete e.iconsToLoad, !n || !n.length)
|
|
852
|
+
return;
|
|
853
|
+
const s = e.loadIcon;
|
|
854
|
+
if (e.loadIcons && (n.length > 1 || !s)) {
|
|
855
|
+
fe(
|
|
856
|
+
e.loadIcons(n, i, o),
|
|
857
|
+
(f) => {
|
|
858
|
+
E(e, n, f);
|
|
859
|
+
}
|
|
860
|
+
);
|
|
861
|
+
return;
|
|
862
|
+
}
|
|
863
|
+
if (s) {
|
|
864
|
+
n.forEach((f) => {
|
|
865
|
+
const d = s(f, i, o);
|
|
866
|
+
fe(d, (p) => {
|
|
867
|
+
const m = p ? {
|
|
868
|
+
prefix: i,
|
|
869
|
+
icons: {
|
|
870
|
+
[f]: p
|
|
871
|
+
}
|
|
872
|
+
} : null;
|
|
873
|
+
E(e, [f], m);
|
|
874
|
+
});
|
|
875
|
+
});
|
|
876
|
+
return;
|
|
877
|
+
}
|
|
878
|
+
const { valid: r, invalid: c } = vt(n);
|
|
879
|
+
if (c.length && E(e, c, null), !r.length)
|
|
880
|
+
return;
|
|
881
|
+
const l = i.match(we) ? G(o) : null;
|
|
882
|
+
if (!l) {
|
|
883
|
+
E(e, r, null);
|
|
884
|
+
return;
|
|
885
|
+
}
|
|
886
|
+
l.prepare(o, i, r).forEach((f) => {
|
|
887
|
+
wt(o, f, (d) => {
|
|
888
|
+
E(e, f.icons, d);
|
|
889
|
+
});
|
|
890
|
+
});
|
|
891
|
+
}));
|
|
892
|
+
}
|
|
893
|
+
const St = (e, t) => {
|
|
894
|
+
const o = mt(e, !0, Te()), i = dt(o);
|
|
895
|
+
if (!i.pending.length) {
|
|
896
|
+
let l = !0;
|
|
897
|
+
return t && setTimeout(() => {
|
|
898
|
+
l && t(
|
|
899
|
+
i.loaded,
|
|
900
|
+
i.missing,
|
|
901
|
+
i.pending,
|
|
902
|
+
ae
|
|
903
|
+
);
|
|
904
|
+
}), () => {
|
|
905
|
+
l = !1;
|
|
906
|
+
};
|
|
907
|
+
}
|
|
908
|
+
const n = /* @__PURE__ */ Object.create(null), s = [];
|
|
909
|
+
let r, c;
|
|
910
|
+
return i.pending.forEach((l) => {
|
|
911
|
+
const { provider: u, prefix: f } = l;
|
|
912
|
+
if (f === c && u === r)
|
|
913
|
+
return;
|
|
914
|
+
r = u, c = f, s.push(_(u, f));
|
|
915
|
+
const d = n[u] || (n[u] = /* @__PURE__ */ Object.create(null));
|
|
916
|
+
d[f] || (d[f] = []);
|
|
917
|
+
}), i.pending.forEach((l) => {
|
|
918
|
+
const { provider: u, prefix: f, name: d } = l, p = _(u, f), m = p.pendingIcons || (p.pendingIcons = /* @__PURE__ */ new Set());
|
|
919
|
+
m.has(d) || (m.add(d), n[u][f].push(d));
|
|
920
|
+
}), s.forEach((l) => {
|
|
921
|
+
const u = n[l.provider][l.prefix];
|
|
922
|
+
u.length && kt(l, u);
|
|
923
|
+
}), t ? gt(t, i, s) : ae;
|
|
924
|
+
};
|
|
925
|
+
function Tt(e, t) {
|
|
926
|
+
const o = {
|
|
927
|
+
...e
|
|
928
|
+
};
|
|
929
|
+
for (const i in t) {
|
|
930
|
+
const n = t[i], s = typeof n;
|
|
931
|
+
i in Ce ? (n === null || n && (s === "string" || s === "number")) && (o[i] = n) : s === typeof o[i] && (o[i] = i === "rotate" ? n % 4 : n);
|
|
932
|
+
}
|
|
933
|
+
return o;
|
|
934
|
+
}
|
|
935
|
+
const Ct = /[\s,]+/;
|
|
936
|
+
function _t(e, t) {
|
|
937
|
+
t.split(Ct).forEach((o) => {
|
|
938
|
+
switch (o.trim()) {
|
|
939
|
+
case "horizontal":
|
|
940
|
+
e.hFlip = !0;
|
|
941
|
+
break;
|
|
942
|
+
case "vertical":
|
|
943
|
+
e.vFlip = !0;
|
|
944
|
+
break;
|
|
945
|
+
}
|
|
946
|
+
});
|
|
947
|
+
}
|
|
948
|
+
function Lt(e, t = 0) {
|
|
949
|
+
const o = e.replace(/^-?[0-9.]*/, "");
|
|
950
|
+
function i(n) {
|
|
951
|
+
for (; n < 0; )
|
|
952
|
+
n += 4;
|
|
953
|
+
return n % 4;
|
|
954
|
+
}
|
|
955
|
+
if (o === "") {
|
|
956
|
+
const n = parseInt(e);
|
|
957
|
+
return isNaN(n) ? 0 : i(n);
|
|
958
|
+
} else if (o !== e) {
|
|
959
|
+
let n = 0;
|
|
960
|
+
switch (o) {
|
|
961
|
+
case "%":
|
|
962
|
+
n = 25;
|
|
963
|
+
break;
|
|
964
|
+
case "deg":
|
|
965
|
+
n = 90;
|
|
966
|
+
}
|
|
967
|
+
if (n) {
|
|
968
|
+
let s = parseFloat(e.slice(0, e.length - o.length));
|
|
969
|
+
return isNaN(s) ? 0 : (s = s / n, s % 1 === 0 ? i(s) : 0);
|
|
970
|
+
}
|
|
971
|
+
}
|
|
972
|
+
return t;
|
|
973
|
+
}
|
|
974
|
+
function jt(e, t) {
|
|
975
|
+
let o = e.indexOf("xlink:") === -1 ? "" : ' xmlns:xlink="http://www.w3.org/1999/xlink"';
|
|
976
|
+
for (const i in t)
|
|
977
|
+
o += " " + i + '="' + t[i] + '"';
|
|
978
|
+
return '<svg xmlns="http://www.w3.org/2000/svg"' + o + ">" + e + "</svg>";
|
|
979
|
+
}
|
|
980
|
+
function Et(e) {
|
|
981
|
+
return e.replace(/"/g, "'").replace(/%/g, "%25").replace(/#/g, "%23").replace(/</g, "%3C").replace(/>/g, "%3E").replace(/\s+/g, " ");
|
|
982
|
+
}
|
|
983
|
+
function Pt(e) {
|
|
984
|
+
return "data:image/svg+xml," + Et(e);
|
|
985
|
+
}
|
|
986
|
+
function Ot(e) {
|
|
987
|
+
return 'url("' + Pt(e) + '")';
|
|
988
|
+
}
|
|
989
|
+
const de = {
|
|
990
|
+
..._e,
|
|
991
|
+
inline: !1
|
|
992
|
+
}, At = {
|
|
993
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
994
|
+
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
995
|
+
"aria-hidden": !0,
|
|
996
|
+
role: "img"
|
|
997
|
+
}, Ft = {
|
|
998
|
+
display: "inline-block"
|
|
999
|
+
}, K = {
|
|
1000
|
+
backgroundColor: "currentColor"
|
|
1001
|
+
}, Ee = {
|
|
1002
|
+
backgroundColor: "transparent"
|
|
1003
|
+
}, he = {
|
|
1004
|
+
Image: "var(--svg)",
|
|
1005
|
+
Repeat: "no-repeat",
|
|
1006
|
+
Size: "100% 100%"
|
|
1007
|
+
}, pe = {
|
|
1008
|
+
webkitMask: K,
|
|
1009
|
+
mask: K,
|
|
1010
|
+
background: Ee
|
|
1011
|
+
};
|
|
1012
|
+
for (const e in pe) {
|
|
1013
|
+
const t = pe[e];
|
|
1014
|
+
for (const o in he)
|
|
1015
|
+
t[e + o] = he[o];
|
|
1016
|
+
}
|
|
1017
|
+
const N = {};
|
|
1018
|
+
["horizontal", "vertical"].forEach((e) => {
|
|
1019
|
+
const t = e.slice(0, 1) + "Flip";
|
|
1020
|
+
N[e + "-flip"] = t, N[e.slice(0, 1) + "-flip"] = t, N[e + "Flip"] = t;
|
|
1021
|
+
});
|
|
1022
|
+
function ge(e) {
|
|
1023
|
+
return e + (e.match(/^[-0-9.]+$/) ? "px" : "");
|
|
1024
|
+
}
|
|
1025
|
+
const me = (e, t) => {
|
|
1026
|
+
const o = Tt(de, t), i = { ...At }, n = t.mode || "svg", s = {}, r = t.style, c = typeof r == "object" && !(r instanceof Array) ? r : {};
|
|
1027
|
+
for (let g in t) {
|
|
1028
|
+
const a = t[g];
|
|
1029
|
+
if (a !== void 0)
|
|
1030
|
+
switch (g) {
|
|
1031
|
+
// Properties to ignore
|
|
1032
|
+
case "icon":
|
|
1033
|
+
case "style":
|
|
1034
|
+
case "onLoad":
|
|
1035
|
+
case "mode":
|
|
1036
|
+
case "ssr":
|
|
1037
|
+
break;
|
|
1038
|
+
// Boolean attributes
|
|
1039
|
+
case "inline":
|
|
1040
|
+
case "hFlip":
|
|
1041
|
+
case "vFlip":
|
|
1042
|
+
o[g] = a === !0 || a === "true" || a === 1;
|
|
1043
|
+
break;
|
|
1044
|
+
// Flip as string: 'horizontal,vertical'
|
|
1045
|
+
case "flip":
|
|
1046
|
+
typeof a == "string" && _t(o, a);
|
|
1047
|
+
break;
|
|
1048
|
+
// Color: override style
|
|
1049
|
+
case "color":
|
|
1050
|
+
s.color = a;
|
|
1051
|
+
break;
|
|
1052
|
+
// Rotation as string
|
|
1053
|
+
case "rotate":
|
|
1054
|
+
typeof a == "string" ? o[g] = Lt(a) : typeof a == "number" && (o[g] = a);
|
|
1055
|
+
break;
|
|
1056
|
+
// Remove aria-hidden
|
|
1057
|
+
case "ariaHidden":
|
|
1058
|
+
case "aria-hidden":
|
|
1059
|
+
a !== !0 && a !== "true" && delete i["aria-hidden"];
|
|
1060
|
+
break;
|
|
1061
|
+
default: {
|
|
1062
|
+
const T = N[g];
|
|
1063
|
+
T ? (a === !0 || a === "true" || a === 1) && (o[T] = !0) : de[g] === void 0 && (i[g] = a);
|
|
1064
|
+
}
|
|
1065
|
+
}
|
|
1066
|
+
}
|
|
1067
|
+
const l = Xe(e, o), u = l.attributes;
|
|
1068
|
+
if (o.inline && (s.verticalAlign = "-0.125em"), n === "svg") {
|
|
1069
|
+
i.style = {
|
|
1070
|
+
...s,
|
|
1071
|
+
...c
|
|
1072
|
+
}, Object.assign(i, u);
|
|
1073
|
+
let g = 0, a = t.id;
|
|
1074
|
+
return typeof a == "string" && (a = a.replace(/-/g, "_")), i.innerHTML = nt(l.body, a ? () => a + "ID" + g++ : "iconifyVue"), te("svg", i);
|
|
1075
|
+
}
|
|
1076
|
+
const { body: f, width: d, height: p } = e, m = n === "mask" || (n === "bg" ? !1 : f.indexOf("currentColor") !== -1), v = jt(f, {
|
|
1077
|
+
...u,
|
|
1078
|
+
width: d + "",
|
|
1079
|
+
height: p + ""
|
|
1080
|
+
});
|
|
1081
|
+
return i.style = {
|
|
1082
|
+
...s,
|
|
1083
|
+
"--svg": Ot(v),
|
|
1084
|
+
width: ge(u.width),
|
|
1085
|
+
height: ge(u.height),
|
|
1086
|
+
...Ft,
|
|
1087
|
+
...m ? K : Ee,
|
|
1088
|
+
...c
|
|
1089
|
+
}, te("span", i);
|
|
1090
|
+
};
|
|
1091
|
+
Te(!0);
|
|
1092
|
+
ot("", ft);
|
|
1093
|
+
if (typeof document < "u" && typeof window < "u") {
|
|
1094
|
+
const e = window;
|
|
1095
|
+
if (e.IconifyPreload !== void 0) {
|
|
1096
|
+
const t = e.IconifyPreload, o = "Invalid IconifyPreload syntax.";
|
|
1097
|
+
typeof t == "object" && t !== null && (t instanceof Array ? t : [t]).forEach((i) => {
|
|
1098
|
+
try {
|
|
1099
|
+
// Check if item is an object and not null/array
|
|
1100
|
+
(typeof i != "object" || i === null || i instanceof Array || // Check for 'icons' and 'prefix'
|
|
1101
|
+
typeof i.icons != "object" || typeof i.prefix != "string" || // Add icon set
|
|
1102
|
+
!We(i)) && console.error(o);
|
|
1103
|
+
} catch {
|
|
1104
|
+
console.error(o);
|
|
1105
|
+
}
|
|
1106
|
+
});
|
|
1107
|
+
}
|
|
1108
|
+
if (e.IconifyProviders !== void 0) {
|
|
1109
|
+
const t = e.IconifyProviders;
|
|
1110
|
+
if (typeof t == "object" && t !== null)
|
|
1111
|
+
for (let o in t) {
|
|
1112
|
+
const i = "IconifyProviders[" + o + "] is invalid.";
|
|
1113
|
+
try {
|
|
1114
|
+
const n = t[o];
|
|
1115
|
+
if (typeof n != "object" || !n || n.resources === void 0)
|
|
1116
|
+
continue;
|
|
1117
|
+
it(o, n) || console.error(i);
|
|
1118
|
+
} catch {
|
|
1119
|
+
console.error(i);
|
|
1120
|
+
}
|
|
1121
|
+
}
|
|
1122
|
+
}
|
|
1123
|
+
}
|
|
1124
|
+
const Mt = {
|
|
1125
|
+
...R,
|
|
1126
|
+
body: ""
|
|
1127
|
+
}, Nt = D({
|
|
1128
|
+
// Do not inherit other attributes: it is handled by render()
|
|
1129
|
+
inheritAttrs: !1,
|
|
1130
|
+
// Set initial data
|
|
1131
|
+
data() {
|
|
1132
|
+
return {
|
|
1133
|
+
// Current icon name
|
|
1134
|
+
_name: "",
|
|
1135
|
+
// Loading
|
|
1136
|
+
_loadingIcon: null,
|
|
1137
|
+
// Mounted status
|
|
1138
|
+
iconMounted: !1,
|
|
1139
|
+
// Callback counter to trigger re-render
|
|
1140
|
+
counter: 0
|
|
1141
|
+
};
|
|
1142
|
+
},
|
|
1143
|
+
mounted() {
|
|
1144
|
+
this.iconMounted = !0;
|
|
1145
|
+
},
|
|
1146
|
+
unmounted() {
|
|
1147
|
+
this.abortLoading();
|
|
1148
|
+
},
|
|
1149
|
+
methods: {
|
|
1150
|
+
abortLoading() {
|
|
1151
|
+
this._loadingIcon && (this._loadingIcon.abort(), this._loadingIcon = null);
|
|
1152
|
+
},
|
|
1153
|
+
// Get data for icon to render or null
|
|
1154
|
+
getIcon(e, t, o) {
|
|
1155
|
+
if (typeof e == "object" && e !== null && typeof e.body == "string")
|
|
1156
|
+
return this._name = "", this.abortLoading(), {
|
|
1157
|
+
data: e
|
|
1158
|
+
};
|
|
1159
|
+
let i;
|
|
1160
|
+
if (typeof e != "string" || (i = $(e, !1, !0)) === null)
|
|
1161
|
+
return this.abortLoading(), null;
|
|
1162
|
+
let n = Ue(i);
|
|
1163
|
+
if (!n)
|
|
1164
|
+
return (!this._loadingIcon || this._loadingIcon.name !== e) && (this.abortLoading(), this._name = "", n !== null && (this._loadingIcon = {
|
|
1165
|
+
name: e,
|
|
1166
|
+
abort: St([i], () => {
|
|
1167
|
+
this.counter++;
|
|
1168
|
+
})
|
|
1169
|
+
})), null;
|
|
1170
|
+
if (this.abortLoading(), this._name !== e && (this._name = e, t && t(e)), o) {
|
|
1171
|
+
n = Object.assign({}, n);
|
|
1172
|
+
const r = o(n.body, i.name, i.prefix, i.provider);
|
|
1173
|
+
typeof r == "string" && (n.body = r);
|
|
1174
|
+
}
|
|
1175
|
+
const s = ["iconify"];
|
|
1176
|
+
return i.prefix !== "" && s.push("iconify--" + i.prefix), i.provider !== "" && s.push("iconify--" + i.provider), { data: n, classes: s };
|
|
1177
|
+
}
|
|
1178
|
+
},
|
|
1179
|
+
// Render icon
|
|
1180
|
+
render() {
|
|
1181
|
+
this.counter;
|
|
1182
|
+
const e = this.$attrs, t = this.iconMounted || e.ssr ? this.getIcon(e.icon, e.onLoad, e.customise) : null;
|
|
1183
|
+
if (!t)
|
|
1184
|
+
return me(Mt, e);
|
|
1185
|
+
let o = e;
|
|
1186
|
+
return t.classes && (o = {
|
|
1187
|
+
...e,
|
|
1188
|
+
class: (typeof e.class == "string" ? e.class + " " : "") + t.classes.join(" ")
|
|
1189
|
+
}), me({
|
|
1190
|
+
...R,
|
|
1191
|
+
...t.data
|
|
1192
|
+
}, o);
|
|
1193
|
+
}
|
|
1194
|
+
}), Vt = { class: "icon-wrapper" }, Dt = {
|
|
1195
|
+
key: 1,
|
|
1196
|
+
class: "default-icon"
|
|
1197
|
+
}, $t = { class: "details" }, Rt = { class: "heading" }, zt = { class: "content" }, Ht = /* @__PURE__ */ D({
|
|
1198
|
+
__name: "WelcomeItem",
|
|
1199
|
+
props: {
|
|
1200
|
+
icon: { default: "" },
|
|
1201
|
+
heading: { default: "Item Title" },
|
|
1202
|
+
content: { default: "Item content description" },
|
|
1203
|
+
vertical: { type: Boolean, default: !1 },
|
|
1204
|
+
iconSize: { default: "1.5rem" }
|
|
1205
|
+
},
|
|
1206
|
+
setup(e) {
|
|
1207
|
+
return (t, o) => (y(), I("div", {
|
|
1208
|
+
class: Oe(["item", { vertical: e.vertical }])
|
|
1209
|
+
}, [
|
|
1210
|
+
P("div", Vt, [
|
|
1211
|
+
H(t.$slots, "icon", {}, () => [
|
|
1212
|
+
e.icon ? (y(), be(Ae(Nt), {
|
|
1213
|
+
key: 0,
|
|
1214
|
+
icon: e.icon,
|
|
1215
|
+
style: W({ fontSize: e.iconSize }),
|
|
1216
|
+
class: "iconify-icon"
|
|
1217
|
+
}, null, 8, ["icon", "style"])) : (y(), I("div", Dt, C(e.icon || "?"), 1))
|
|
1218
|
+
], !0)
|
|
1219
|
+
]),
|
|
1220
|
+
P("div", $t, [
|
|
1221
|
+
P("h3", Rt, [
|
|
1222
|
+
H(t.$slots, "heading", {}, () => [
|
|
1223
|
+
ne(C(e.heading), 1)
|
|
1224
|
+
], !0)
|
|
1225
|
+
]),
|
|
1226
|
+
P("div", zt, [
|
|
1227
|
+
H(t.$slots, "default", {}, () => [
|
|
1228
|
+
ne(C(e.content), 1)
|
|
1229
|
+
], !0)
|
|
1230
|
+
])
|
|
1231
|
+
])
|
|
1232
|
+
], 2));
|
|
1233
|
+
}
|
|
1234
|
+
}), ee = /* @__PURE__ */ Y(Ht, [["__scopeId", "data-v-207e41b6"]]), Ut = { class: "welcome-container" }, Bt = {
|
|
1235
|
+
key: 0,
|
|
1236
|
+
class: "welcome-title"
|
|
1237
|
+
}, Wt = { key: 0 }, qt = ["innerHTML"], Qt = ["innerHTML"], Gt = /* @__PURE__ */ D({
|
|
1238
|
+
__name: "TheWelcome",
|
|
1239
|
+
props: {
|
|
1240
|
+
items: { default: () => [
|
|
1241
|
+
{
|
|
1242
|
+
icon: "documentation",
|
|
1243
|
+
heading: "Documentation",
|
|
1244
|
+
content: "Vue's official documentation provides you with all information you need to get started."
|
|
1245
|
+
},
|
|
1246
|
+
{
|
|
1247
|
+
icon: "tooling",
|
|
1248
|
+
heading: "Tooling",
|
|
1249
|
+
content: "This project is served and bundled with Vite. The recommended IDE setup is VSCode + Vue - Official extension."
|
|
1250
|
+
},
|
|
1251
|
+
{
|
|
1252
|
+
icon: "ecosystem",
|
|
1253
|
+
heading: "Ecosystem",
|
|
1254
|
+
content: "Get official tools and libraries for your project: Pinia, Vue Router, Vue Test Utils, and Vue Dev Tools."
|
|
1255
|
+
},
|
|
1256
|
+
{
|
|
1257
|
+
icon: "community",
|
|
1258
|
+
heading: "Community",
|
|
1259
|
+
content: "Got stuck? Ask your question on Vue Land (our official Discord server), or StackOverflow."
|
|
1260
|
+
},
|
|
1261
|
+
{
|
|
1262
|
+
icon: "support",
|
|
1263
|
+
heading: "Support Vue",
|
|
1264
|
+
content: "As an independent project, Vue relies on community backing for its sustainability. You can help us by becoming a sponsor."
|
|
1265
|
+
}
|
|
1266
|
+
] },
|
|
1267
|
+
title: { default: "Welcome to Your Component Library" }
|
|
1268
|
+
},
|
|
1269
|
+
setup(e) {
|
|
1270
|
+
const t = (o) => ({
|
|
1271
|
+
documentation: "mdi:book-open-variant",
|
|
1272
|
+
tooling: "mdi:hammer-wrench",
|
|
1273
|
+
ecosystem: "mdi:puzzle",
|
|
1274
|
+
community: "mdi:forum",
|
|
1275
|
+
support: "mdi:heart"
|
|
1276
|
+
})[o] ?? "mdi:information";
|
|
1277
|
+
return (o, i) => (y(), I("div", Ut, [
|
|
1278
|
+
e.title ? (y(), I("h2", Bt, C(e.title), 1)) : ye("", !0),
|
|
1279
|
+
(y(!0), I(oe, null, ie(e.items, (n, s) => (y(), be(ee, {
|
|
1280
|
+
key: s,
|
|
1281
|
+
icon: t(n.icon),
|
|
1282
|
+
heading: n.heading
|
|
1283
|
+
}, {
|
|
1284
|
+
default: Fe(() => [
|
|
1285
|
+
Array.isArray(n.content) ? (y(), I("div", Wt, [
|
|
1286
|
+
(y(!0), I(oe, null, ie(n.content, (r, c) => (y(), I("p", {
|
|
1287
|
+
key: c,
|
|
1288
|
+
innerHTML: r
|
|
1289
|
+
}, null, 8, qt))), 128))
|
|
1290
|
+
])) : (y(), I("div", {
|
|
1291
|
+
key: 1,
|
|
1292
|
+
innerHTML: n.content
|
|
1293
|
+
}, null, 8, Qt))
|
|
1294
|
+
]),
|
|
1295
|
+
_: 2
|
|
1296
|
+
}, 1032, ["icon", "heading"]))), 128))
|
|
1297
|
+
]));
|
|
1298
|
+
}
|
|
1299
|
+
}), Pe = /* @__PURE__ */ Y(Gt, [["__scopeId", "data-v-95e350f3"]]), Kt = [
|
|
1300
|
+
xe,
|
|
1301
|
+
Pe,
|
|
1302
|
+
ee
|
|
1303
|
+
], Yt = (e) => {
|
|
1304
|
+
Kt.forEach((t) => {
|
|
1305
|
+
const o = t.name || t.__name || "UnknownComponent";
|
|
1306
|
+
e.component(o, t);
|
|
1307
|
+
});
|
|
1308
|
+
}, Jt = {
|
|
1309
|
+
install: Yt,
|
|
1310
|
+
HelloWorld: xe,
|
|
1311
|
+
TheWelcome: Pe,
|
|
1312
|
+
WelcomeItem: ee
|
|
1313
|
+
};
|
|
1314
|
+
typeof window < "u" && window.Vue && window.Vue.use(Jt);
|
|
1315
|
+
export {
|
|
1316
|
+
xe as HelloWorld,
|
|
1317
|
+
Pe as TheWelcome,
|
|
1318
|
+
ee as WelcomeItem,
|
|
1319
|
+
Jt as default
|
|
1320
|
+
};
|