vue-quest-ui 0.0.4 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/vue-quest-ui.css +1 -1
- package/dist/vue-quest-ui.js +238 -238
- package/dist/vue-quest-ui.umd.cjs +1 -1
- package/package.json +4 -4
package/dist/vue-quest-ui.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.base-icon__wrapper[data-v-af0f176c]{display:inline-flex;align-items:center;justify-content:center}.image-icon[data-v-af0f176c]{width:1.1em}.user-image__wrapper[data-v-5fa938c7]{display:inline-block}.user-image[data-v-5fa938c7]{border-radius:50%;width:2.35em}.user-icon[data-v-5fa938c7]{color:var(--37a07012)}.user-icon [data-v-5fa938c7] svg{width:2.3em;height:2.3em}
|
|
1
|
+
.base-icon__wrapper[data-v-af0f176c]{display:inline-flex;align-items:center;justify-content:center}.image-icon[data-v-af0f176c]{width:1.1em}.user-image__wrapper[data-v-5fa938c7]{display:inline-block}.user-image[data-v-5fa938c7]{border-radius:50%;width:2.35em}.user-icon[data-v-5fa938c7]{color:var(--37a07012)}.user-icon [data-v-5fa938c7] svg{width:2.3em;height:2.3em}.base-icon__wrapper[data-v-369c65cf]{display:inline-flex;align-items:center;justify-content:center}.base-icon__wrapper.icon--align[data-v-369c65cf]{vertical-align:sub}.image-icon[data-v-369c65cf]{width:1.1em}.user-image__wrapper[data-v-72891255]{display:inline-block}.user-image[data-v-72891255]{border-radius:50%;width:2.35em}[data-v-72891255] .user-icon svg{width:2.3em!important;height:2.3em!important}[data-v-72891255] .user-icon.icon-border{border:1px solid white;border-radius:50%}
|
package/dist/vue-quest-ui.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent as ve, h as K, computed as Se, createElementBlock as _, openBlock as k, normalizeClass as le, normalizeStyle as B, createBlock as ue, unref as ke } from "vue";
|
|
2
|
+
const ae = /^[a-z0-9]+(-[a-z0-9]+)*$/, z = (e, t, o, i = "") => {
|
|
3
3
|
const n = e.split(":");
|
|
4
4
|
if (e.slice(0, 1) === "@") {
|
|
5
5
|
if (n.length < 2 || n.length > 3)
|
|
@@ -48,11 +48,11 @@ const ue = /^[a-z0-9]+(-[a-z0-9]+)*$/, z = (e, t, o, i = "") => {
|
|
|
48
48
|
rotate: 0,
|
|
49
49
|
vFlip: !1,
|
|
50
50
|
hFlip: !1
|
|
51
|
-
}),
|
|
51
|
+
}), N = Object.freeze({
|
|
52
52
|
...fe,
|
|
53
53
|
...M
|
|
54
54
|
}), $ = Object.freeze({
|
|
55
|
-
...
|
|
55
|
+
...N,
|
|
56
56
|
body: "",
|
|
57
57
|
hidden: !1
|
|
58
58
|
});
|
|
@@ -68,7 +68,7 @@ function J(e, t) {
|
|
|
68
68
|
i in M ? i in e && !(i in o) && (o[i] = M[i]) : i in t ? o[i] = t[i] : i in e && (o[i] = e[i]);
|
|
69
69
|
return o;
|
|
70
70
|
}
|
|
71
|
-
function
|
|
71
|
+
function Ce(e, t) {
|
|
72
72
|
const o = e.icons, i = e.aliases || /* @__PURE__ */ Object.create(null), n = /* @__PURE__ */ Object.create(null);
|
|
73
73
|
function s(r) {
|
|
74
74
|
if (o[r])
|
|
@@ -82,7 +82,7 @@ function Pe(e, t) {
|
|
|
82
82
|
}
|
|
83
83
|
return Object.keys(o).concat(Object.keys(i)).forEach(s), n;
|
|
84
84
|
}
|
|
85
|
-
function
|
|
85
|
+
function Pe(e, t, o) {
|
|
86
86
|
const i = e.icons, n = e.aliases || /* @__PURE__ */ Object.create(null);
|
|
87
87
|
let s = {};
|
|
88
88
|
function r(c) {
|
|
@@ -93,37 +93,37 @@ function je(e, t, o) {
|
|
|
93
93
|
}
|
|
94
94
|
return r(t), o.forEach(r), J(e, s);
|
|
95
95
|
}
|
|
96
|
-
function
|
|
96
|
+
function de(e, t) {
|
|
97
97
|
const o = [];
|
|
98
98
|
if (typeof e != "object" || typeof e.icons != "object")
|
|
99
99
|
return o;
|
|
100
100
|
e.not_found instanceof Array && e.not_found.forEach((n) => {
|
|
101
101
|
t(n, null), o.push(n);
|
|
102
102
|
});
|
|
103
|
-
const i =
|
|
103
|
+
const i = Ce(e);
|
|
104
104
|
for (const n in i) {
|
|
105
105
|
const s = i[n];
|
|
106
|
-
s && (t(n,
|
|
106
|
+
s && (t(n, Pe(e, n, s)), o.push(n));
|
|
107
107
|
}
|
|
108
108
|
return o;
|
|
109
109
|
}
|
|
110
|
-
const
|
|
110
|
+
const je = {
|
|
111
111
|
provider: "",
|
|
112
112
|
aliases: {},
|
|
113
113
|
not_found: {},
|
|
114
114
|
...fe
|
|
115
115
|
};
|
|
116
|
-
function
|
|
116
|
+
function q(e, t) {
|
|
117
117
|
for (const o in t)
|
|
118
118
|
if (o in e && typeof e[o] != typeof t[o])
|
|
119
119
|
return !1;
|
|
120
120
|
return !0;
|
|
121
121
|
}
|
|
122
|
-
function
|
|
122
|
+
function pe(e) {
|
|
123
123
|
if (typeof e != "object" || e === null)
|
|
124
124
|
return null;
|
|
125
125
|
const t = e;
|
|
126
|
-
if (typeof t.prefix != "string" || !e.icons || typeof e.icons != "object" || !
|
|
126
|
+
if (typeof t.prefix != "string" || !e.icons || typeof e.icons != "object" || !q(e, je))
|
|
127
127
|
return null;
|
|
128
128
|
const o = t.icons;
|
|
129
129
|
for (const n in o) {
|
|
@@ -132,7 +132,7 @@ function de(e) {
|
|
|
132
132
|
// Name cannot be empty
|
|
133
133
|
!n || // Must have body
|
|
134
134
|
typeof s.body != "string" || // Check other props
|
|
135
|
-
!
|
|
135
|
+
!q(
|
|
136
136
|
s,
|
|
137
137
|
$
|
|
138
138
|
)
|
|
@@ -146,7 +146,7 @@ function de(e) {
|
|
|
146
146
|
// Name cannot be empty
|
|
147
147
|
!n || // Parent must be set and point to existing icon
|
|
148
148
|
typeof r != "string" || !o[r] && !i[r] || // Check other props
|
|
149
|
-
!
|
|
149
|
+
!q(
|
|
150
150
|
s,
|
|
151
151
|
$
|
|
152
152
|
)
|
|
@@ -156,7 +156,7 @@ function de(e) {
|
|
|
156
156
|
return t;
|
|
157
157
|
}
|
|
158
158
|
const X = /* @__PURE__ */ Object.create(null);
|
|
159
|
-
function
|
|
159
|
+
function Ee(e, t) {
|
|
160
160
|
return {
|
|
161
161
|
provider: e,
|
|
162
162
|
prefix: t,
|
|
@@ -164,16 +164,16 @@ function Le(e, t) {
|
|
|
164
164
|
missing: /* @__PURE__ */ new Set()
|
|
165
165
|
};
|
|
166
166
|
}
|
|
167
|
-
function
|
|
167
|
+
function T(e, t) {
|
|
168
168
|
const o = X[e] || (X[e] = /* @__PURE__ */ Object.create(null));
|
|
169
|
-
return o[t] || (o[t] =
|
|
169
|
+
return o[t] || (o[t] = Ee(e, t));
|
|
170
170
|
}
|
|
171
171
|
function he(e, t) {
|
|
172
|
-
return
|
|
172
|
+
return pe(t) ? de(t, (o, i) => {
|
|
173
173
|
i ? e.icons[o] = i : e.missing.add(o);
|
|
174
174
|
}) : [];
|
|
175
175
|
}
|
|
176
|
-
function
|
|
176
|
+
function Le(e, t, o) {
|
|
177
177
|
try {
|
|
178
178
|
if (typeof o.body == "string")
|
|
179
179
|
return e.icons[t] = { ...o }, !0;
|
|
@@ -182,30 +182,30 @@ function Fe(e, t, o) {
|
|
|
182
182
|
return !1;
|
|
183
183
|
}
|
|
184
184
|
let E = !1;
|
|
185
|
-
function
|
|
185
|
+
function ge(e) {
|
|
186
186
|
return typeof e == "boolean" && (E = e), E;
|
|
187
187
|
}
|
|
188
|
-
function
|
|
188
|
+
function Fe(e) {
|
|
189
189
|
const t = typeof e == "string" ? z(e, !0, E) : e;
|
|
190
190
|
if (t) {
|
|
191
|
-
const o =
|
|
191
|
+
const o = T(t.provider, t.prefix), i = t.name;
|
|
192
192
|
return o.icons[i] || (o.missing.has(i) ? null : void 0);
|
|
193
193
|
}
|
|
194
194
|
}
|
|
195
|
-
function
|
|
195
|
+
function Oe(e, t) {
|
|
196
196
|
const o = z(e, !0, E);
|
|
197
197
|
if (!o)
|
|
198
198
|
return !1;
|
|
199
|
-
const i =
|
|
200
|
-
return t ?
|
|
199
|
+
const i = T(o.provider, o.prefix);
|
|
200
|
+
return t ? Le(i, o.name, t) : (i.missing.add(o.name), !0);
|
|
201
201
|
}
|
|
202
|
-
function
|
|
202
|
+
function Ae(e, t) {
|
|
203
203
|
if (typeof e != "object")
|
|
204
204
|
return !1;
|
|
205
205
|
if (typeof t != "string" && (t = e.provider || ""), E && !t && !e.prefix) {
|
|
206
206
|
let n = !1;
|
|
207
|
-
return
|
|
208
|
-
|
|
207
|
+
return pe(e) && (e.prefix = "", de(e, (s, r) => {
|
|
208
|
+
Oe(s, r) && (n = !0);
|
|
209
209
|
})), n;
|
|
210
210
|
}
|
|
211
211
|
const o = e.prefix;
|
|
@@ -214,18 +214,18 @@ function _e(e, t) {
|
|
|
214
214
|
name: "a"
|
|
215
215
|
}))
|
|
216
216
|
return !1;
|
|
217
|
-
const i =
|
|
217
|
+
const i = T(t, o);
|
|
218
218
|
return !!he(i, e);
|
|
219
219
|
}
|
|
220
|
-
const
|
|
220
|
+
const me = Object.freeze({
|
|
221
221
|
width: null,
|
|
222
222
|
height: null
|
|
223
|
-
}),
|
|
223
|
+
}), ye = Object.freeze({
|
|
224
224
|
// Dimensions
|
|
225
|
-
...
|
|
225
|
+
...me,
|
|
226
226
|
// Transformations
|
|
227
227
|
...M
|
|
228
|
-
}),
|
|
228
|
+
}), _e = /(-?[0-9.]*[0-9]+[0-9.]*)/g, Me = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
|
|
229
229
|
function Y(e, t, o) {
|
|
230
230
|
if (t === 1)
|
|
231
231
|
return e;
|
|
@@ -233,11 +233,11 @@ function Y(e, t, o) {
|
|
|
233
233
|
return Math.ceil(e * t * o) / o;
|
|
234
234
|
if (typeof e != "string")
|
|
235
235
|
return e;
|
|
236
|
-
const i = e.split(
|
|
236
|
+
const i = e.split(_e);
|
|
237
237
|
if (i === null || !i.length)
|
|
238
238
|
return e;
|
|
239
239
|
const n = [];
|
|
240
|
-
let s = i.shift(), r =
|
|
240
|
+
let s = i.shift(), r = Me.test(s);
|
|
241
241
|
for (; ; ) {
|
|
242
242
|
if (r) {
|
|
243
243
|
const c = parseFloat(s);
|
|
@@ -249,7 +249,7 @@ function Y(e, t, o) {
|
|
|
249
249
|
r = !r;
|
|
250
250
|
}
|
|
251
251
|
}
|
|
252
|
-
function
|
|
252
|
+
function ze(e, t = "defs") {
|
|
253
253
|
let o = "";
|
|
254
254
|
const i = e.indexOf("<" + t);
|
|
255
255
|
for (; i >= 0; ) {
|
|
@@ -270,16 +270,16 @@ function Ne(e, t) {
|
|
|
270
270
|
return e ? "<defs>" + e + "</defs>" + t : t;
|
|
271
271
|
}
|
|
272
272
|
function Re(e, t, o) {
|
|
273
|
-
const i =
|
|
273
|
+
const i = ze(e);
|
|
274
274
|
return Ne(i.defs, t + i.content + o);
|
|
275
275
|
}
|
|
276
|
-
const
|
|
277
|
-
function
|
|
276
|
+
const qe = (e) => e === "unset" || e === "undefined" || e === "none";
|
|
277
|
+
function De(e, t) {
|
|
278
278
|
const o = {
|
|
279
|
-
...
|
|
279
|
+
...N,
|
|
280
280
|
...e
|
|
281
281
|
}, i = {
|
|
282
|
-
...
|
|
282
|
+
...ye,
|
|
283
283
|
...t
|
|
284
284
|
}, n = {
|
|
285
285
|
left: o.left,
|
|
@@ -289,63 +289,63 @@ function Be(e, t) {
|
|
|
289
289
|
};
|
|
290
290
|
let s = o.body;
|
|
291
291
|
[o, i].forEach((g) => {
|
|
292
|
-
const
|
|
293
|
-
let
|
|
294
|
-
S ? w ?
|
|
292
|
+
const a = [], S = g.hFlip, w = g.vFlip;
|
|
293
|
+
let x = g.rotate;
|
|
294
|
+
S ? w ? x += 2 : (a.push(
|
|
295
295
|
"translate(" + (n.width + n.left).toString() + " " + (0 - n.top).toString() + ")"
|
|
296
|
-
),
|
|
296
|
+
), a.push("scale(-1 1)"), n.top = n.left = 0) : w && (a.push(
|
|
297
297
|
"translate(" + (0 - n.left).toString() + " " + (n.height + n.top).toString() + ")"
|
|
298
|
-
),
|
|
298
|
+
), a.push("scale(1 -1)"), n.top = n.left = 0);
|
|
299
299
|
let y;
|
|
300
|
-
switch (
|
|
300
|
+
switch (x < 0 && (x -= Math.floor(x / 4) * 4), x = x % 4, x) {
|
|
301
301
|
case 1:
|
|
302
|
-
y = n.height / 2 + n.top,
|
|
302
|
+
y = n.height / 2 + n.top, a.unshift(
|
|
303
303
|
"rotate(90 " + y.toString() + " " + y.toString() + ")"
|
|
304
304
|
);
|
|
305
305
|
break;
|
|
306
306
|
case 2:
|
|
307
|
-
|
|
307
|
+
a.unshift(
|
|
308
308
|
"rotate(180 " + (n.width / 2 + n.left).toString() + " " + (n.height / 2 + n.top).toString() + ")"
|
|
309
309
|
);
|
|
310
310
|
break;
|
|
311
311
|
case 3:
|
|
312
|
-
y = n.width / 2 + n.left,
|
|
312
|
+
y = n.width / 2 + n.left, a.unshift(
|
|
313
313
|
"rotate(-90 " + y.toString() + " " + y.toString() + ")"
|
|
314
314
|
);
|
|
315
315
|
break;
|
|
316
316
|
}
|
|
317
|
-
|
|
317
|
+
x % 2 === 1 && (n.left !== n.top && (y = n.left, n.left = n.top, n.top = y), n.width !== n.height && (y = n.width, n.width = n.height, n.height = y)), a.length && (s = Re(
|
|
318
318
|
s,
|
|
319
|
-
'<g transform="' +
|
|
319
|
+
'<g transform="' + a.join(" ") + '">',
|
|
320
320
|
"</g>"
|
|
321
321
|
));
|
|
322
322
|
});
|
|
323
323
|
const r = i.width, c = i.height, l = n.width, u = n.height;
|
|
324
|
-
let
|
|
325
|
-
r === null ? (d = c === null ? "1em" : c === "auto" ? u : c,
|
|
326
|
-
const
|
|
327
|
-
|
|
324
|
+
let f, d;
|
|
325
|
+
r === null ? (d = c === null ? "1em" : c === "auto" ? u : c, f = Y(d, l / u)) : (f = r === "auto" ? l : r, d = c === null ? Y(f, u / l) : c === "auto" ? u : c);
|
|
326
|
+
const h = {}, m = (g, a) => {
|
|
327
|
+
qe(a) || (h[g] = a.toString());
|
|
328
328
|
};
|
|
329
|
-
m("width",
|
|
329
|
+
m("width", f), m("height", d);
|
|
330
330
|
const I = [n.left, n.top, l, u];
|
|
331
|
-
return
|
|
332
|
-
attributes:
|
|
331
|
+
return h.viewBox = I.join(" "), {
|
|
332
|
+
attributes: h,
|
|
333
333
|
viewBox: I,
|
|
334
334
|
body: s
|
|
335
335
|
};
|
|
336
336
|
}
|
|
337
|
-
const
|
|
338
|
-
let
|
|
339
|
-
function
|
|
337
|
+
const Be = /\sid="(\S+)"/g, $e = "IconifyId" + Date.now().toString(16) + (Math.random() * 16777216 | 0).toString(16);
|
|
338
|
+
let Ue = 0;
|
|
339
|
+
function Qe(e, t = $e) {
|
|
340
340
|
const o = [];
|
|
341
341
|
let i;
|
|
342
|
-
for (; i =
|
|
342
|
+
for (; i = Be.exec(e); )
|
|
343
343
|
o.push(i[1]);
|
|
344
344
|
if (!o.length)
|
|
345
345
|
return e;
|
|
346
346
|
const n = "suffix" + (Math.random() * 16777216 | Date.now()).toString(16);
|
|
347
347
|
return o.forEach((s) => {
|
|
348
|
-
const r = typeof t == "function" ? t(s) : t + (
|
|
348
|
+
const r = typeof t == "function" ? t(s) : t + (Ue++).toString(), c = s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
349
349
|
e = e.replace(
|
|
350
350
|
// Allowed characters before id: [#;"]
|
|
351
351
|
// Allowed characters after id: [)"], .[a-z]
|
|
@@ -355,7 +355,7 @@ function Ve(e, t = Ue) {
|
|
|
355
355
|
}), e = e.replace(new RegExp(n, "g"), ""), e;
|
|
356
356
|
}
|
|
357
357
|
const U = /* @__PURE__ */ Object.create(null);
|
|
358
|
-
function
|
|
358
|
+
function Ve(e, t) {
|
|
359
359
|
U[e] = t;
|
|
360
360
|
}
|
|
361
361
|
function Q(e) {
|
|
@@ -395,14 +395,14 @@ for (; P.length > 0; )
|
|
|
395
395
|
G[""] = H({
|
|
396
396
|
resources: ["https://api.iconify.design"].concat(O)
|
|
397
397
|
});
|
|
398
|
-
function
|
|
398
|
+
function He(e, t) {
|
|
399
399
|
const o = H(t);
|
|
400
400
|
return o === null ? !1 : (G[e] = o, !0);
|
|
401
401
|
}
|
|
402
402
|
function W(e) {
|
|
403
403
|
return G[e];
|
|
404
404
|
}
|
|
405
|
-
const
|
|
405
|
+
const Ge = () => {
|
|
406
406
|
let e;
|
|
407
407
|
try {
|
|
408
408
|
if (e = fetch, typeof e == "function")
|
|
@@ -410,8 +410,8 @@ const We = () => {
|
|
|
410
410
|
} catch {
|
|
411
411
|
}
|
|
412
412
|
};
|
|
413
|
-
let Z =
|
|
414
|
-
function
|
|
413
|
+
let Z = Ge();
|
|
414
|
+
function We(e, t) {
|
|
415
415
|
const o = W(e);
|
|
416
416
|
if (!o)
|
|
417
417
|
return 0;
|
|
@@ -428,11 +428,11 @@ function Ke(e, t) {
|
|
|
428
428
|
}
|
|
429
429
|
return i;
|
|
430
430
|
}
|
|
431
|
-
function
|
|
431
|
+
function Ke(e) {
|
|
432
432
|
return e === 404;
|
|
433
433
|
}
|
|
434
|
-
const
|
|
435
|
-
const i = [], n =
|
|
434
|
+
const Je = (e, t, o) => {
|
|
435
|
+
const i = [], n = We(e, t), s = "icons";
|
|
436
436
|
let r = {
|
|
437
437
|
type: s,
|
|
438
438
|
provider: e,
|
|
@@ -448,7 +448,7 @@ const Xe = (e, t, o) => {
|
|
|
448
448
|
}, c = l.length), r.icons.push(l);
|
|
449
449
|
}), i.push(r), i;
|
|
450
450
|
};
|
|
451
|
-
function
|
|
451
|
+
function Xe(e) {
|
|
452
452
|
if (typeof e == "string") {
|
|
453
453
|
const t = W(e);
|
|
454
454
|
if (t)
|
|
@@ -456,12 +456,12 @@ function Ye(e) {
|
|
|
456
456
|
}
|
|
457
457
|
return "/";
|
|
458
458
|
}
|
|
459
|
-
const
|
|
459
|
+
const Ye = (e, t, o) => {
|
|
460
460
|
if (!Z) {
|
|
461
461
|
o("abort", 424);
|
|
462
462
|
return;
|
|
463
463
|
}
|
|
464
|
-
let i =
|
|
464
|
+
let i = Xe(t.provider);
|
|
465
465
|
switch (t.type) {
|
|
466
466
|
case "icons": {
|
|
467
467
|
const s = t.prefix, c = t.icons.join(","), l = new URLSearchParams({
|
|
@@ -484,7 +484,7 @@ const Ze = (e, t, o) => {
|
|
|
484
484
|
const r = s.status;
|
|
485
485
|
if (r !== 200) {
|
|
486
486
|
setTimeout(() => {
|
|
487
|
-
o(
|
|
487
|
+
o(Ke(r) ? "abort" : "next", r);
|
|
488
488
|
});
|
|
489
489
|
return;
|
|
490
490
|
}
|
|
@@ -502,11 +502,11 @@ const Ze = (e, t, o) => {
|
|
|
502
502
|
}).catch(() => {
|
|
503
503
|
o("next", n);
|
|
504
504
|
});
|
|
505
|
-
},
|
|
506
|
-
prepare:
|
|
507
|
-
send:
|
|
505
|
+
}, Ze = {
|
|
506
|
+
prepare: Je,
|
|
507
|
+
send: Ye
|
|
508
508
|
};
|
|
509
|
-
function
|
|
509
|
+
function et(e) {
|
|
510
510
|
const t = {
|
|
511
511
|
loaded: [],
|
|
512
512
|
missing: [],
|
|
@@ -522,24 +522,24 @@ function tt(e) {
|
|
|
522
522
|
if (i.name === n.name && i.prefix === n.prefix && i.provider === n.provider)
|
|
523
523
|
return;
|
|
524
524
|
i = n;
|
|
525
|
-
const s = n.provider, r = n.prefix, c = n.name, l = o[s] || (o[s] = /* @__PURE__ */ Object.create(null)), u = l[r] || (l[r] =
|
|
526
|
-
let
|
|
527
|
-
c in u.icons ?
|
|
525
|
+
const s = n.provider, r = n.prefix, c = n.name, l = o[s] || (o[s] = /* @__PURE__ */ Object.create(null)), u = l[r] || (l[r] = T(s, r));
|
|
526
|
+
let f;
|
|
527
|
+
c in u.icons ? f = t.loaded : r === "" || u.missing.has(c) ? f = t.missing : f = t.pending;
|
|
528
528
|
const d = {
|
|
529
529
|
provider: s,
|
|
530
530
|
prefix: r,
|
|
531
531
|
name: c
|
|
532
532
|
};
|
|
533
|
-
|
|
533
|
+
f.push(d);
|
|
534
534
|
}), t;
|
|
535
535
|
}
|
|
536
|
-
function
|
|
536
|
+
function be(e, t) {
|
|
537
537
|
e.forEach((o) => {
|
|
538
538
|
const i = o.loaderCallbacks;
|
|
539
539
|
i && (o.loaderCallbacks = i.filter((n) => n.id !== t));
|
|
540
540
|
});
|
|
541
541
|
}
|
|
542
|
-
function
|
|
542
|
+
function tt(e) {
|
|
543
543
|
e.pendingCallbacksFlag || (e.pendingCallbacksFlag = !0, setTimeout(() => {
|
|
544
544
|
e.pendingCallbacksFlag = !1;
|
|
545
545
|
const t = e.loaderCallbacks ? e.loaderCallbacks.slice(0) : [];
|
|
@@ -568,7 +568,7 @@ function nt(e) {
|
|
|
568
568
|
else
|
|
569
569
|
return o = !0, !0;
|
|
570
570
|
return !1;
|
|
571
|
-
}), r.pending.length !== c && (o ||
|
|
571
|
+
}), r.pending.length !== c && (o || be([e], s.id), s.callback(
|
|
572
572
|
r.loaded.slice(0),
|
|
573
573
|
r.missing.slice(0),
|
|
574
574
|
r.pending.slice(0),
|
|
@@ -577,9 +577,9 @@ function nt(e) {
|
|
|
577
577
|
});
|
|
578
578
|
}));
|
|
579
579
|
}
|
|
580
|
-
let
|
|
581
|
-
function
|
|
582
|
-
const i =
|
|
580
|
+
let nt = 0;
|
|
581
|
+
function ot(e, t, o) {
|
|
582
|
+
const i = nt++, n = be.bind(null, o, i);
|
|
583
583
|
if (!t.pending.length)
|
|
584
584
|
return n;
|
|
585
585
|
const s = {
|
|
@@ -592,14 +592,14 @@ function it(e, t, o) {
|
|
|
592
592
|
(r.loaderCallbacks || (r.loaderCallbacks = [])).push(s);
|
|
593
593
|
}), n;
|
|
594
594
|
}
|
|
595
|
-
function
|
|
595
|
+
function it(e, t = !0, o = !1) {
|
|
596
596
|
const i = [];
|
|
597
597
|
return e.forEach((n) => {
|
|
598
598
|
const s = typeof n == "string" ? z(n, t, o) : n;
|
|
599
599
|
s && i.push(s);
|
|
600
600
|
}), i;
|
|
601
601
|
}
|
|
602
|
-
var
|
|
602
|
+
var st = {
|
|
603
603
|
resources: [],
|
|
604
604
|
index: 0,
|
|
605
605
|
timeout: 2e3,
|
|
@@ -607,31 +607,31 @@ var rt = {
|
|
|
607
607
|
random: !1,
|
|
608
608
|
dataAfterTimeout: !1
|
|
609
609
|
};
|
|
610
|
-
function
|
|
610
|
+
function rt(e, t, o, i) {
|
|
611
611
|
const n = e.resources.length, s = e.random ? Math.floor(Math.random() * n) : e.index;
|
|
612
612
|
let r;
|
|
613
613
|
if (e.random) {
|
|
614
|
-
let
|
|
615
|
-
for (r = [];
|
|
616
|
-
const
|
|
617
|
-
r.push(
|
|
614
|
+
let p = e.resources.slice(0);
|
|
615
|
+
for (r = []; p.length > 1; ) {
|
|
616
|
+
const b = Math.floor(Math.random() * p.length);
|
|
617
|
+
r.push(p[b]), p = p.slice(0, b).concat(p.slice(b + 1));
|
|
618
618
|
}
|
|
619
|
-
r = r.concat(
|
|
619
|
+
r = r.concat(p);
|
|
620
620
|
} else
|
|
621
621
|
r = e.resources.slice(s).concat(e.resources.slice(0, s));
|
|
622
622
|
const c = Date.now();
|
|
623
|
-
let l = "pending", u = 0,
|
|
623
|
+
let l = "pending", u = 0, f, d = null, h = [], m = [];
|
|
624
624
|
typeof i == "function" && m.push(i);
|
|
625
625
|
function I() {
|
|
626
626
|
d && (clearTimeout(d), d = null);
|
|
627
627
|
}
|
|
628
628
|
function g() {
|
|
629
|
-
l === "pending" && (l = "aborted"), I(),
|
|
630
|
-
|
|
631
|
-
}),
|
|
629
|
+
l === "pending" && (l = "aborted"), I(), h.forEach((p) => {
|
|
630
|
+
p.status === "pending" && (p.status = "aborted");
|
|
631
|
+
}), h = [];
|
|
632
632
|
}
|
|
633
|
-
function
|
|
634
|
-
|
|
633
|
+
function a(p, b) {
|
|
634
|
+
b && (m = []), typeof p == "function" && m.push(p);
|
|
635
635
|
}
|
|
636
636
|
function S() {
|
|
637
637
|
return {
|
|
@@ -639,24 +639,24 @@ function ct(e, t, o, i) {
|
|
|
639
639
|
payload: t,
|
|
640
640
|
status: l,
|
|
641
641
|
queriesSent: u,
|
|
642
|
-
queriesPending:
|
|
643
|
-
subscribe:
|
|
642
|
+
queriesPending: h.length,
|
|
643
|
+
subscribe: a,
|
|
644
644
|
abort: g
|
|
645
645
|
};
|
|
646
646
|
}
|
|
647
647
|
function w() {
|
|
648
|
-
l = "failed", m.forEach((
|
|
649
|
-
|
|
648
|
+
l = "failed", m.forEach((p) => {
|
|
649
|
+
p(void 0, f);
|
|
650
650
|
});
|
|
651
651
|
}
|
|
652
|
-
function
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
}),
|
|
652
|
+
function x() {
|
|
653
|
+
h.forEach((p) => {
|
|
654
|
+
p.status === "pending" && (p.status = "aborted");
|
|
655
|
+
}), h = [];
|
|
656
656
|
}
|
|
657
|
-
function y(
|
|
658
|
-
const L =
|
|
659
|
-
switch (
|
|
657
|
+
function y(p, b, C) {
|
|
658
|
+
const L = b !== "success";
|
|
659
|
+
switch (h = h.filter((v) => v !== p), l) {
|
|
660
660
|
case "pending":
|
|
661
661
|
break;
|
|
662
662
|
case "failed":
|
|
@@ -666,51 +666,51 @@ function ct(e, t, o, i) {
|
|
|
666
666
|
default:
|
|
667
667
|
return;
|
|
668
668
|
}
|
|
669
|
-
if (
|
|
670
|
-
|
|
669
|
+
if (b === "abort") {
|
|
670
|
+
f = C, w();
|
|
671
671
|
return;
|
|
672
672
|
}
|
|
673
673
|
if (L) {
|
|
674
|
-
|
|
674
|
+
f = C, h.length || (r.length ? R() : w());
|
|
675
675
|
return;
|
|
676
676
|
}
|
|
677
|
-
if (I(),
|
|
678
|
-
const v = e.resources.indexOf(
|
|
677
|
+
if (I(), x(), !e.random) {
|
|
678
|
+
const v = e.resources.indexOf(p.resource);
|
|
679
679
|
v !== -1 && v !== e.index && (e.index = v);
|
|
680
680
|
}
|
|
681
681
|
l = "completed", m.forEach((v) => {
|
|
682
|
-
v(
|
|
682
|
+
v(C);
|
|
683
683
|
});
|
|
684
684
|
}
|
|
685
|
-
function
|
|
685
|
+
function R() {
|
|
686
686
|
if (l !== "pending")
|
|
687
687
|
return;
|
|
688
688
|
I();
|
|
689
|
-
const
|
|
690
|
-
if (
|
|
691
|
-
if (
|
|
689
|
+
const p = r.shift();
|
|
690
|
+
if (p === void 0) {
|
|
691
|
+
if (h.length) {
|
|
692
692
|
d = setTimeout(() => {
|
|
693
|
-
I(), l === "pending" && (
|
|
693
|
+
I(), l === "pending" && (x(), w());
|
|
694
694
|
}, e.timeout);
|
|
695
695
|
return;
|
|
696
696
|
}
|
|
697
697
|
w();
|
|
698
698
|
return;
|
|
699
699
|
}
|
|
700
|
-
const
|
|
700
|
+
const b = {
|
|
701
701
|
status: "pending",
|
|
702
|
-
resource:
|
|
703
|
-
callback: (
|
|
704
|
-
y(
|
|
702
|
+
resource: p,
|
|
703
|
+
callback: (C, L) => {
|
|
704
|
+
y(b, C, L);
|
|
705
705
|
}
|
|
706
706
|
};
|
|
707
|
-
|
|
707
|
+
h.push(b), u++, d = setTimeout(R, e.rotate), o(p, t, b.callback);
|
|
708
708
|
}
|
|
709
|
-
return setTimeout(
|
|
709
|
+
return setTimeout(R), S;
|
|
710
710
|
}
|
|
711
711
|
function xe(e) {
|
|
712
712
|
const t = {
|
|
713
|
-
...
|
|
713
|
+
...st,
|
|
714
714
|
...e
|
|
715
715
|
};
|
|
716
716
|
let o = [];
|
|
@@ -718,15 +718,15 @@ function xe(e) {
|
|
|
718
718
|
o = o.filter((c) => c().status === "pending");
|
|
719
719
|
}
|
|
720
720
|
function n(c, l, u) {
|
|
721
|
-
const
|
|
721
|
+
const f = rt(
|
|
722
722
|
t,
|
|
723
723
|
c,
|
|
724
724
|
l,
|
|
725
|
-
(d,
|
|
726
|
-
i(), u && u(d,
|
|
725
|
+
(d, h) => {
|
|
726
|
+
i(), u && u(d, h);
|
|
727
727
|
}
|
|
728
728
|
);
|
|
729
|
-
return o.push(
|
|
729
|
+
return o.push(f), f;
|
|
730
730
|
}
|
|
731
731
|
function s(c) {
|
|
732
732
|
return o.find((l) => c(l)) || null;
|
|
@@ -744,7 +744,7 @@ function xe(e) {
|
|
|
744
744
|
function ee() {
|
|
745
745
|
}
|
|
746
746
|
const D = /* @__PURE__ */ Object.create(null);
|
|
747
|
-
function
|
|
747
|
+
function ct(e) {
|
|
748
748
|
if (!D[e]) {
|
|
749
749
|
const t = W(e);
|
|
750
750
|
if (!t)
|
|
@@ -757,14 +757,14 @@ function lt(e) {
|
|
|
757
757
|
}
|
|
758
758
|
return D[e];
|
|
759
759
|
}
|
|
760
|
-
function
|
|
760
|
+
function lt(e, t, o) {
|
|
761
761
|
let i, n;
|
|
762
762
|
if (typeof e == "string") {
|
|
763
763
|
const s = Q(e);
|
|
764
764
|
if (!s)
|
|
765
765
|
return o(void 0, 424), ee;
|
|
766
766
|
n = s.send;
|
|
767
|
-
const r =
|
|
767
|
+
const r = ct(e);
|
|
768
768
|
r && (i = r.redundancy);
|
|
769
769
|
} else {
|
|
770
770
|
const s = H(e);
|
|
@@ -778,15 +778,15 @@ function ut(e, t, o) {
|
|
|
778
778
|
}
|
|
779
779
|
function te() {
|
|
780
780
|
}
|
|
781
|
-
function
|
|
781
|
+
function ut(e) {
|
|
782
782
|
e.iconsLoaderFlag || (e.iconsLoaderFlag = !0, setTimeout(() => {
|
|
783
|
-
e.iconsLoaderFlag = !1,
|
|
783
|
+
e.iconsLoaderFlag = !1, tt(e);
|
|
784
784
|
}));
|
|
785
785
|
}
|
|
786
786
|
function at(e) {
|
|
787
787
|
const t = [], o = [];
|
|
788
788
|
return e.forEach((i) => {
|
|
789
|
-
(i.match(
|
|
789
|
+
(i.match(ae) ? t : o).push(i);
|
|
790
790
|
}), {
|
|
791
791
|
valid: t,
|
|
792
792
|
invalid: o
|
|
@@ -808,7 +808,7 @@ function j(e, t, o) {
|
|
|
808
808
|
} catch (n) {
|
|
809
809
|
console.error(n);
|
|
810
810
|
}
|
|
811
|
-
i(),
|
|
811
|
+
i(), ut(e);
|
|
812
812
|
}
|
|
813
813
|
function ne(e, t) {
|
|
814
814
|
e instanceof Promise ? e.then((o) => {
|
|
@@ -817,7 +817,7 @@ function ne(e, t) {
|
|
|
817
817
|
t(null);
|
|
818
818
|
}) : t(e);
|
|
819
819
|
}
|
|
820
|
-
function
|
|
820
|
+
function ft(e, t) {
|
|
821
821
|
e.iconsToLoad ? e.iconsToLoad = e.iconsToLoad.concat(t).sort() : e.iconsToLoad = t, e.iconsQueueFlag || (e.iconsQueueFlag = !0, setTimeout(() => {
|
|
822
822
|
e.iconsQueueFlag = !1;
|
|
823
823
|
const { provider: o, prefix: i } = e, n = e.iconsToLoad;
|
|
@@ -827,23 +827,23 @@ function dt(e, t) {
|
|
|
827
827
|
if (e.loadIcons && (n.length > 1 || !s)) {
|
|
828
828
|
ne(
|
|
829
829
|
e.loadIcons(n, i, o),
|
|
830
|
-
(
|
|
831
|
-
j(e, n,
|
|
830
|
+
(f) => {
|
|
831
|
+
j(e, n, f);
|
|
832
832
|
}
|
|
833
833
|
);
|
|
834
834
|
return;
|
|
835
835
|
}
|
|
836
836
|
if (s) {
|
|
837
|
-
n.forEach((
|
|
838
|
-
const d = s(
|
|
839
|
-
ne(d, (
|
|
840
|
-
const m =
|
|
837
|
+
n.forEach((f) => {
|
|
838
|
+
const d = s(f, i, o);
|
|
839
|
+
ne(d, (h) => {
|
|
840
|
+
const m = h ? {
|
|
841
841
|
prefix: i,
|
|
842
842
|
icons: {
|
|
843
|
-
[
|
|
843
|
+
[f]: h
|
|
844
844
|
}
|
|
845
845
|
} : null;
|
|
846
|
-
j(e, [
|
|
846
|
+
j(e, [f], m);
|
|
847
847
|
});
|
|
848
848
|
});
|
|
849
849
|
return;
|
|
@@ -851,20 +851,20 @@ function dt(e, t) {
|
|
|
851
851
|
const { valid: r, invalid: c } = at(n);
|
|
852
852
|
if (c.length && j(e, c, null), !r.length)
|
|
853
853
|
return;
|
|
854
|
-
const l = i.match(
|
|
854
|
+
const l = i.match(ae) ? Q(o) : null;
|
|
855
855
|
if (!l) {
|
|
856
856
|
j(e, r, null);
|
|
857
857
|
return;
|
|
858
858
|
}
|
|
859
|
-
l.prepare(o, i, r).forEach((
|
|
860
|
-
|
|
861
|
-
j(e,
|
|
859
|
+
l.prepare(o, i, r).forEach((f) => {
|
|
860
|
+
lt(o, f, (d) => {
|
|
861
|
+
j(e, f.icons, d);
|
|
862
862
|
});
|
|
863
863
|
});
|
|
864
864
|
}));
|
|
865
865
|
}
|
|
866
|
-
const
|
|
867
|
-
const o =
|
|
866
|
+
const dt = (e, t) => {
|
|
867
|
+
const o = it(e, !0, ge()), i = et(o);
|
|
868
868
|
if (!i.pending.length) {
|
|
869
869
|
let l = !0;
|
|
870
870
|
return t && setTimeout(() => {
|
|
@@ -881,19 +881,19 @@ const ht = (e, t) => {
|
|
|
881
881
|
const n = /* @__PURE__ */ Object.create(null), s = [];
|
|
882
882
|
let r, c;
|
|
883
883
|
return i.pending.forEach((l) => {
|
|
884
|
-
const { provider: u, prefix:
|
|
885
|
-
if (
|
|
884
|
+
const { provider: u, prefix: f } = l;
|
|
885
|
+
if (f === c && u === r)
|
|
886
886
|
return;
|
|
887
|
-
r = u, c =
|
|
887
|
+
r = u, c = f, s.push(T(u, f));
|
|
888
888
|
const d = n[u] || (n[u] = /* @__PURE__ */ Object.create(null));
|
|
889
|
-
d[
|
|
889
|
+
d[f] || (d[f] = []);
|
|
890
890
|
}), i.pending.forEach((l) => {
|
|
891
|
-
const { provider: u, prefix:
|
|
892
|
-
m.has(d) || (m.add(d), n[u][
|
|
891
|
+
const { provider: u, prefix: f, name: d } = l, h = T(u, f), m = h.pendingIcons || (h.pendingIcons = /* @__PURE__ */ new Set());
|
|
892
|
+
m.has(d) || (m.add(d), n[u][f].push(d));
|
|
893
893
|
}), s.forEach((l) => {
|
|
894
894
|
const u = n[l.provider][l.prefix];
|
|
895
|
-
u.length &&
|
|
896
|
-
}), t ?
|
|
895
|
+
u.length && ft(l, u);
|
|
896
|
+
}), t ? ot(t, i, s) : te;
|
|
897
897
|
};
|
|
898
898
|
function pt(e, t) {
|
|
899
899
|
const o = {
|
|
@@ -901,13 +901,13 @@ function pt(e, t) {
|
|
|
901
901
|
};
|
|
902
902
|
for (const i in t) {
|
|
903
903
|
const n = t[i], s = typeof n;
|
|
904
|
-
i in
|
|
904
|
+
i in me ? (n === null || n && (s === "string" || s === "number")) && (o[i] = n) : s === typeof o[i] && (o[i] = i === "rotate" ? n % 4 : n);
|
|
905
905
|
}
|
|
906
906
|
return o;
|
|
907
907
|
}
|
|
908
|
-
const
|
|
909
|
-
function
|
|
910
|
-
t.split(
|
|
908
|
+
const ht = /[\s,]+/;
|
|
909
|
+
function gt(e, t) {
|
|
910
|
+
t.split(ht).forEach((o) => {
|
|
911
911
|
switch (o.trim()) {
|
|
912
912
|
case "horizontal":
|
|
913
913
|
e.hFlip = !0;
|
|
@@ -918,7 +918,7 @@ function mt(e, t) {
|
|
|
918
918
|
}
|
|
919
919
|
});
|
|
920
920
|
}
|
|
921
|
-
function
|
|
921
|
+
function mt(e, t = 0) {
|
|
922
922
|
const o = e.replace(/^-?[0-9.]*/, "");
|
|
923
923
|
function i(n) {
|
|
924
924
|
for (; n < 0; )
|
|
@@ -944,7 +944,7 @@ function yt(e, t = 0) {
|
|
|
944
944
|
}
|
|
945
945
|
return t;
|
|
946
946
|
}
|
|
947
|
-
function
|
|
947
|
+
function yt(e, t) {
|
|
948
948
|
let o = e.indexOf("xlink:") === -1 ? "" : ' xmlns:xlink="http://www.w3.org/1999/xlink"';
|
|
949
949
|
for (const i in t)
|
|
950
950
|
o += " " + i + '="' + t[i] + '"';
|
|
@@ -953,25 +953,25 @@ function xt(e, t) {
|
|
|
953
953
|
function bt(e) {
|
|
954
954
|
return e.replace(/"/g, "'").replace(/%/g, "%25").replace(/#/g, "%23").replace(/</g, "%3C").replace(/>/g, "%3E").replace(/\s+/g, " ");
|
|
955
955
|
}
|
|
956
|
-
function
|
|
956
|
+
function xt(e) {
|
|
957
957
|
return "data:image/svg+xml," + bt(e);
|
|
958
958
|
}
|
|
959
|
-
function
|
|
960
|
-
return 'url("' +
|
|
959
|
+
function It(e) {
|
|
960
|
+
return 'url("' + xt(e) + '")';
|
|
961
961
|
}
|
|
962
962
|
const oe = {
|
|
963
|
-
...
|
|
963
|
+
...ye,
|
|
964
964
|
inline: !1
|
|
965
|
-
},
|
|
965
|
+
}, wt = {
|
|
966
966
|
xmlns: "http://www.w3.org/2000/svg",
|
|
967
967
|
"xmlns:xlink": "http://www.w3.org/1999/xlink",
|
|
968
968
|
"aria-hidden": !0,
|
|
969
969
|
role: "img"
|
|
970
|
-
},
|
|
970
|
+
}, vt = {
|
|
971
971
|
display: "inline-block"
|
|
972
972
|
}, V = {
|
|
973
973
|
backgroundColor: "currentColor"
|
|
974
|
-
},
|
|
974
|
+
}, Ie = {
|
|
975
975
|
backgroundColor: "transparent"
|
|
976
976
|
}, ie = {
|
|
977
977
|
Image: "var(--svg)",
|
|
@@ -980,7 +980,7 @@ const oe = {
|
|
|
980
980
|
}, se = {
|
|
981
981
|
webkitMask: V,
|
|
982
982
|
mask: V,
|
|
983
|
-
background:
|
|
983
|
+
background: Ie
|
|
984
984
|
};
|
|
985
985
|
for (const e in se) {
|
|
986
986
|
const t = se[e];
|
|
@@ -996,10 +996,10 @@ function re(e) {
|
|
|
996
996
|
return e + (e.match(/^[-0-9.]+$/) ? "px" : "");
|
|
997
997
|
}
|
|
998
998
|
const ce = (e, t) => {
|
|
999
|
-
const o = pt(oe, t), i = { ...
|
|
999
|
+
const o = pt(oe, t), i = { ...wt }, n = t.mode || "svg", s = {}, r = t.style, c = typeof r == "object" && !(r instanceof Array) ? r : {};
|
|
1000
1000
|
for (let g in t) {
|
|
1001
|
-
const
|
|
1002
|
-
if (
|
|
1001
|
+
const a = t[g];
|
|
1002
|
+
if (a !== void 0)
|
|
1003
1003
|
switch (g) {
|
|
1004
1004
|
// Properties to ignore
|
|
1005
1005
|
case "icon":
|
|
@@ -1012,57 +1012,57 @@ const ce = (e, t) => {
|
|
|
1012
1012
|
case "inline":
|
|
1013
1013
|
case "hFlip":
|
|
1014
1014
|
case "vFlip":
|
|
1015
|
-
o[g] =
|
|
1015
|
+
o[g] = a === !0 || a === "true" || a === 1;
|
|
1016
1016
|
break;
|
|
1017
1017
|
// Flip as string: 'horizontal,vertical'
|
|
1018
1018
|
case "flip":
|
|
1019
|
-
typeof
|
|
1019
|
+
typeof a == "string" && gt(o, a);
|
|
1020
1020
|
break;
|
|
1021
1021
|
// Color: override style
|
|
1022
1022
|
case "color":
|
|
1023
|
-
s.color =
|
|
1023
|
+
s.color = a;
|
|
1024
1024
|
break;
|
|
1025
1025
|
// Rotation as string
|
|
1026
1026
|
case "rotate":
|
|
1027
|
-
typeof
|
|
1027
|
+
typeof a == "string" ? o[g] = mt(a) : typeof a == "number" && (o[g] = a);
|
|
1028
1028
|
break;
|
|
1029
1029
|
// Remove aria-hidden
|
|
1030
1030
|
case "ariaHidden":
|
|
1031
1031
|
case "aria-hidden":
|
|
1032
|
-
|
|
1032
|
+
a !== !0 && a !== "true" && delete i["aria-hidden"];
|
|
1033
1033
|
break;
|
|
1034
1034
|
default: {
|
|
1035
1035
|
const S = A[g];
|
|
1036
|
-
S ? (
|
|
1036
|
+
S ? (a === !0 || a === "true" || a === 1) && (o[S] = !0) : oe[g] === void 0 && (i[g] = a);
|
|
1037
1037
|
}
|
|
1038
1038
|
}
|
|
1039
1039
|
}
|
|
1040
|
-
const l =
|
|
1040
|
+
const l = De(e, o), u = l.attributes;
|
|
1041
1041
|
if (o.inline && (s.verticalAlign = "-0.125em"), n === "svg") {
|
|
1042
1042
|
i.style = {
|
|
1043
1043
|
...s,
|
|
1044
1044
|
...c
|
|
1045
1045
|
}, Object.assign(i, u);
|
|
1046
|
-
let g = 0,
|
|
1047
|
-
return typeof
|
|
1046
|
+
let g = 0, a = t.id;
|
|
1047
|
+
return typeof a == "string" && (a = a.replace(/-/g, "_")), i.innerHTML = Qe(l.body, a ? () => a + "ID" + g++ : "iconifyVue"), K("svg", i);
|
|
1048
1048
|
}
|
|
1049
|
-
const { body:
|
|
1049
|
+
const { body: f, width: d, height: h } = e, m = n === "mask" || (n === "bg" ? !1 : f.indexOf("currentColor") !== -1), I = yt(f, {
|
|
1050
1050
|
...u,
|
|
1051
1051
|
width: d + "",
|
|
1052
|
-
height:
|
|
1052
|
+
height: h + ""
|
|
1053
1053
|
});
|
|
1054
1054
|
return i.style = {
|
|
1055
1055
|
...s,
|
|
1056
|
-
"--svg":
|
|
1056
|
+
"--svg": It(I),
|
|
1057
1057
|
width: re(u.width),
|
|
1058
1058
|
height: re(u.height),
|
|
1059
|
-
...
|
|
1060
|
-
...m ? V :
|
|
1059
|
+
...vt,
|
|
1060
|
+
...m ? V : Ie,
|
|
1061
1061
|
...c
|
|
1062
1062
|
}, K("span", i);
|
|
1063
1063
|
};
|
|
1064
|
-
|
|
1065
|
-
|
|
1064
|
+
ge(!0);
|
|
1065
|
+
Ve("", Ze);
|
|
1066
1066
|
if (typeof document < "u" && typeof window < "u") {
|
|
1067
1067
|
const e = window;
|
|
1068
1068
|
if (e.IconifyPreload !== void 0) {
|
|
@@ -1072,7 +1072,7 @@ if (typeof document < "u" && typeof window < "u") {
|
|
|
1072
1072
|
// Check if item is an object and not null/array
|
|
1073
1073
|
(typeof i != "object" || i === null || i instanceof Array || // Check for 'icons' and 'prefix'
|
|
1074
1074
|
typeof i.icons != "object" || typeof i.prefix != "string" || // Add icon set
|
|
1075
|
-
!
|
|
1075
|
+
!Ae(i)) && console.error(o);
|
|
1076
1076
|
} catch {
|
|
1077
1077
|
console.error(o);
|
|
1078
1078
|
}
|
|
@@ -1087,17 +1087,17 @@ if (typeof document < "u" && typeof window < "u") {
|
|
|
1087
1087
|
const n = t[o];
|
|
1088
1088
|
if (typeof n != "object" || !n || n.resources === void 0)
|
|
1089
1089
|
continue;
|
|
1090
|
-
|
|
1090
|
+
He(o, n) || console.error(i);
|
|
1091
1091
|
} catch {
|
|
1092
1092
|
console.error(i);
|
|
1093
1093
|
}
|
|
1094
1094
|
}
|
|
1095
1095
|
}
|
|
1096
1096
|
}
|
|
1097
|
-
const
|
|
1098
|
-
...
|
|
1097
|
+
const St = {
|
|
1098
|
+
...N,
|
|
1099
1099
|
body: ""
|
|
1100
|
-
},
|
|
1100
|
+
}, kt = ve({
|
|
1101
1101
|
// Do not inherit other attributes: it is handled by render()
|
|
1102
1102
|
inheritAttrs: !1,
|
|
1103
1103
|
// Set initial data
|
|
@@ -1132,11 +1132,11 @@ const kt = {
|
|
|
1132
1132
|
let i;
|
|
1133
1133
|
if (typeof e != "string" || (i = z(e, !1, !0)) === null)
|
|
1134
1134
|
return this.abortLoading(), null;
|
|
1135
|
-
let n =
|
|
1135
|
+
let n = Fe(i);
|
|
1136
1136
|
if (!n)
|
|
1137
1137
|
return (!this._loadingIcon || this._loadingIcon.name !== e) && (this.abortLoading(), this._name = "", n !== null && (this._loadingIcon = {
|
|
1138
1138
|
name: e,
|
|
1139
|
-
abort:
|
|
1139
|
+
abort: dt([i], () => {
|
|
1140
1140
|
this.counter++;
|
|
1141
1141
|
})
|
|
1142
1142
|
})), null;
|
|
@@ -1154,56 +1154,61 @@ const kt = {
|
|
|
1154
1154
|
this.counter;
|
|
1155
1155
|
const e = this.$attrs, t = this.iconMounted || e.ssr ? this.getIcon(e.icon, e.onLoad, e.customise) : null;
|
|
1156
1156
|
if (!t)
|
|
1157
|
-
return ce(
|
|
1157
|
+
return ce(St, e);
|
|
1158
1158
|
let o = e;
|
|
1159
1159
|
return t.classes && (o = {
|
|
1160
1160
|
...e,
|
|
1161
1161
|
class: (typeof e.class == "string" ? e.class + " " : "") + t.classes.join(" ")
|
|
1162
1162
|
}), ce({
|
|
1163
|
-
...
|
|
1163
|
+
...N,
|
|
1164
1164
|
...t.data
|
|
1165
1165
|
}, o);
|
|
1166
1166
|
}
|
|
1167
|
-
}),
|
|
1167
|
+
}), we = (e, t) => {
|
|
1168
1168
|
const o = e.__vccOpts || e;
|
|
1169
1169
|
for (const [i, n] of t)
|
|
1170
1170
|
o[i] = n;
|
|
1171
1171
|
return o;
|
|
1172
|
-
}, Tt = ["src"],
|
|
1172
|
+
}, Tt = ["src"], Ct = {
|
|
1173
1173
|
__name: "BaseIcon",
|
|
1174
1174
|
props: {
|
|
1175
1175
|
icon: {
|
|
1176
1176
|
type: String,
|
|
1177
1177
|
required: !0,
|
|
1178
|
-
|
|
1178
|
+
tsType: "string",
|
|
1179
|
+
description: "Any iconify value."
|
|
1179
1180
|
},
|
|
1180
1181
|
color: {
|
|
1181
1182
|
type: String,
|
|
1182
1183
|
required: !1,
|
|
1183
|
-
default:
|
|
1184
|
+
default: null,
|
|
1185
|
+
tsType: "string",
|
|
1184
1186
|
description: "Color of the icon."
|
|
1185
1187
|
},
|
|
1186
1188
|
circle: {
|
|
1187
1189
|
type: Boolean,
|
|
1188
1190
|
required: !1,
|
|
1189
1191
|
default: !1,
|
|
1192
|
+
tsType: "boolean",
|
|
1190
1193
|
description: "Shows the icon in a circle."
|
|
1191
1194
|
},
|
|
1192
1195
|
size: {
|
|
1193
1196
|
type: String,
|
|
1194
1197
|
required: !1,
|
|
1195
|
-
default: "
|
|
1198
|
+
default: "16px",
|
|
1199
|
+
tsType: "string",
|
|
1196
1200
|
description: "Size of the icon."
|
|
1197
1201
|
},
|
|
1198
1202
|
alignText: {
|
|
1199
1203
|
type: Boolean,
|
|
1200
1204
|
required: !1,
|
|
1201
1205
|
default: !1,
|
|
1206
|
+
tsType: "boolean",
|
|
1202
1207
|
description: "Vertically aligns the icon and text."
|
|
1203
1208
|
}
|
|
1204
1209
|
},
|
|
1205
1210
|
setup(e) {
|
|
1206
|
-
const t = e, o =
|
|
1211
|
+
const t = e, o = Se(() => t.circle ? {
|
|
1207
1212
|
backgroundColor: t.color,
|
|
1208
1213
|
color: "white",
|
|
1209
1214
|
borderRadius: "50%",
|
|
@@ -1213,13 +1218,13 @@ const kt = {
|
|
|
1213
1218
|
var s;
|
|
1214
1219
|
return k(), _("div", {
|
|
1215
1220
|
style: B({ fontSize: e.size }),
|
|
1216
|
-
class:
|
|
1221
|
+
class: le([{ "icon--align": e.alignText }, "base-icon__wrapper"])
|
|
1217
1222
|
}, [
|
|
1218
1223
|
(s = e.icon) != null && s.startsWith("https") ? (k(), _("img", {
|
|
1219
1224
|
key: 0,
|
|
1220
1225
|
src: e.icon,
|
|
1221
1226
|
class: "image-icon"
|
|
1222
|
-
}, null, 8, Tt)) : (k(),
|
|
1227
|
+
}, null, 8, Tt)) : (k(), ue(ke(kt), {
|
|
1223
1228
|
key: 1,
|
|
1224
1229
|
icon: e.icon,
|
|
1225
1230
|
style: B(o.value)
|
|
@@ -1227,55 +1232,50 @@ const kt = {
|
|
|
1227
1232
|
], 6);
|
|
1228
1233
|
};
|
|
1229
1234
|
}
|
|
1230
|
-
},
|
|
1235
|
+
}, Pt = /* @__PURE__ */ we(Ct, [["__scopeId", "data-v-369c65cf"]]), jt = { class: "user-image__wrapper" }, Et = ["src"], Lt = {
|
|
1231
1236
|
__name: "UserImage",
|
|
1232
1237
|
props: {
|
|
1233
1238
|
image: {
|
|
1234
1239
|
type: String,
|
|
1235
1240
|
required: !1,
|
|
1236
|
-
default:
|
|
1241
|
+
default: null,
|
|
1242
|
+
tsType: "string",
|
|
1237
1243
|
description: "The image for the user, if not provided defaults to a user icon."
|
|
1238
1244
|
},
|
|
1239
1245
|
size: {
|
|
1240
1246
|
type: String,
|
|
1241
1247
|
required: !1,
|
|
1242
1248
|
default: "14px",
|
|
1249
|
+
tsType: "string",
|
|
1243
1250
|
description: "Size of the image."
|
|
1244
1251
|
},
|
|
1245
|
-
|
|
1252
|
+
backgroundColor: {
|
|
1246
1253
|
type: String,
|
|
1247
1254
|
required: !1,
|
|
1248
|
-
default:
|
|
1255
|
+
default: null,
|
|
1256
|
+
tsType: "string",
|
|
1249
1257
|
description: "Background color when showing the user icon."
|
|
1250
|
-
},
|
|
1251
|
-
iconColor: {
|
|
1252
|
-
type: String,
|
|
1253
|
-
required: !1,
|
|
1254
|
-
default: "#fff",
|
|
1255
|
-
description: "Color when showing the user icon."
|
|
1256
1258
|
}
|
|
1257
1259
|
},
|
|
1258
1260
|
setup(e) {
|
|
1259
|
-
return
|
|
1260
|
-
"37a07012": e.iconColor
|
|
1261
|
-
})), (t, o) => (k(), _("div", Et, [
|
|
1261
|
+
return (t, o) => (k(), _("div", jt, [
|
|
1262
1262
|
e.image ? (k(), _("img", {
|
|
1263
1263
|
key: 0,
|
|
1264
1264
|
src: e.image,
|
|
1265
1265
|
style: B({ fontSize: e.size }),
|
|
1266
1266
|
class: "user-image"
|
|
1267
|
-
}, null, 12,
|
|
1267
|
+
}, null, 12, Et)) : (k(), ue(Pt, {
|
|
1268
1268
|
key: 1,
|
|
1269
1269
|
icon: "ph:user-fill",
|
|
1270
1270
|
size: e.size,
|
|
1271
1271
|
circle: "",
|
|
1272
|
-
color: e.
|
|
1273
|
-
class: "user-icon"
|
|
1274
|
-
}, null, 8, ["size", "color"]))
|
|
1272
|
+
color: e.backgroundColor,
|
|
1273
|
+
class: le([{ "icon-border": !e.backgroundColor }, "user-icon"])
|
|
1274
|
+
}, null, 8, ["size", "color", "class"]))
|
|
1275
1275
|
]));
|
|
1276
1276
|
}
|
|
1277
|
-
},
|
|
1277
|
+
}, Ot = /* @__PURE__ */ we(Lt, [["__scopeId", "data-v-72891255"]]);
|
|
1278
1278
|
export {
|
|
1279
|
-
|
|
1280
|
-
|
|
1279
|
+
Pt as BaseIcon,
|
|
1280
|
+
Ot as UserImage
|
|
1281
1281
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(k,h){typeof exports=="object"&&typeof module<"u"?h(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],h):(k=typeof globalThis<"u"?globalThis:k||self,h(k.QuestUI={},k.Vue))})(this,function(k,h){"use strict";const W=/^[a-z0-9]+(-[a-z0-9]+)*$/,L=(e,t,o,i="")=>{const n=e.split(":");if(e.slice(0,1)==="@"){if(n.length<2||n.length>3)return null;i=n.shift().slice(1)}if(n.length>3||!n.length)return null;if(n.length>1){const c=n.pop(),l=n.pop(),f={provider:n.length>0?n[0]:i,prefix:l,name:c};return t&&!O(f)?null:f}const s=n[0],r=s.split("-");if(r.length>1){const c={provider:i,prefix:r.shift(),name:r.join("-")};return t&&!O(c)?null:c}if(o&&i===""){const c={provider:i,prefix:"",name:s};return t&&!O(c,o)?null:c}return null},O=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1,K=Object.freeze({left:0,top:0,width:16,height:16}),_=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),A=Object.freeze({...K,..._}),q=Object.freeze({...A,body:"",hidden:!1});function xe(e,t){const o={};!e.hFlip!=!t.hFlip&&(o.hFlip=!0),!e.vFlip!=!t.vFlip&&(o.vFlip=!0);const i=((e.rotate||0)+(t.rotate||0))%4;return i&&(o.rotate=i),o}function J(e,t){const o=xe(e,t);for(const i in q)i in _?i in e&&!(i in o)&&(o[i]=_[i]):i in t?o[i]=t[i]:i in e&&(o[i]=e[i]);return o}function Ie(e,t){const o=e.icons,i=e.aliases||Object.create(null),n=Object.create(null);function s(r){if(o[r])return n[r]=[];if(!(r in n)){n[r]=null;const c=i[r]&&i[r].parent,l=c&&s(c);l&&(n[r]=[c].concat(l))}return n[r]}return Object.keys(o).concat(Object.keys(i)).forEach(s),n}function we(e,t,o){const i=e.icons,n=e.aliases||Object.create(null);let s={};function r(c){s=J(i[c]||n[c],s)}return r(t),o.forEach(r),J(e,s)}function X(e,t){const o=[];if(typeof e!="object"||typeof e.icons!="object")return o;e.not_found instanceof Array&&e.not_found.forEach(n=>{t(n,null),o.push(n)});const i=Ie(e);for(const n in i){const s=i[n];s&&(t(n,we(e,n,s)),o.push(n))}return o}const ke={provider:"",aliases:{},not_found:{},...K};function N(e,t){for(const o in t)if(o in e&&typeof e[o]!=typeof t[o])return!1;return!0}function Y(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!N(e,ke))return null;const o=t.icons;for(const n in o){const s=o[n];if(!n||typeof s.body!="string"||!N(s,q))return null}const i=t.aliases||Object.create(null);for(const n in i){const s=i[n],r=s.parent;if(!n||typeof r!="string"||!o[r]&&!i[r]||!N(s,q))return null}return t}const Z=Object.create(null);function Se(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function C(e,t){const o=Z[e]||(Z[e]=Object.create(null));return o[t]||(o[t]=Se(e,t))}function ee(e,t){return Y(t)?X(t,(o,i)=>{i?e.icons[o]=i:e.missing.add(o)}):[]}function ve(e,t,o){try{if(typeof o.body=="string")return e.icons[t]={...o},!0}catch{}return!1}let P=!1;function te(e){return typeof e=="boolean"&&(P=e),P}function Ce(e){const t=typeof e=="string"?L(e,!0,P):e;if(t){const o=C(t.provider,t.prefix),i=t.name;return o.icons[i]||(o.missing.has(i)?null:void 0)}}function Te(e,t){const o=L(e,!0,P);if(!o)return!1;const i=C(o.provider,o.prefix);return t?ve(i,o.name,t):(i.missing.add(o.name),!0)}function Pe(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),P&&!t&&!e.prefix){let n=!1;return Y(e)&&(e.prefix="",X(e,(s,r)=>{Te(s,r)&&(n=!0)})),n}const o=e.prefix;if(!O({prefix:o,name:"a"}))return!1;const i=C(t,o);return!!ee(i,e)}const ne=Object.freeze({width:null,height:null}),oe=Object.freeze({...ne,..._}),je=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Ee=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function ie(e,t,o){if(t===1)return e;if(o=o||100,typeof e=="number")return Math.ceil(e*t*o)/o;if(typeof e!="string")return e;const i=e.split(je);if(i===null||!i.length)return e;const n=[];let s=i.shift(),r=Ee.test(s);for(;;){if(r){const c=parseFloat(s);isNaN(c)?n.push(s):n.push(Math.ceil(c*t*o)/o)}else n.push(s);if(s=i.shift(),s===void 0)return n.join("");r=!r}}function Fe(e,t="defs"){let o="";const i=e.indexOf("<"+t);for(;i>=0;){const n=e.indexOf(">",i),s=e.indexOf("</"+t);if(n===-1||s===-1)break;const r=e.indexOf(">",s);if(r===-1)break;o+=e.slice(n+1,s).trim(),e=e.slice(0,i).trim()+e.slice(r+1)}return{defs:o,content:e}}function Le(e,t){return e?"<defs>"+e+"</defs>"+t:t}function Oe(e,t,o){const i=Fe(e);return Le(i.defs,t+i.content+o)}const _e=e=>e==="unset"||e==="undefined"||e==="none";function Ae(e,t){const o={...A,...e},i={...oe,...t},n={left:o.left,top:o.top,width:o.width,height:o.height};let s=o.body;[o,i].forEach(m=>{const a=[],T=m.hFlip,S=m.vFlip;let I=m.rotate;T?S?I+=2:(a.push("translate("+(n.width+n.left).toString()+" "+(0-n.top).toString()+")"),a.push("scale(-1 1)"),n.top=n.left=0):S&&(a.push("translate("+(0-n.left).toString()+" "+(n.height+n.top).toString()+")"),a.push("scale(1 -1)"),n.top=n.left=0);let b;switch(I<0&&(I-=Math.floor(I/4)*4),I=I%4,I){case 1:b=n.height/2+n.top,a.unshift("rotate(90 "+b.toString()+" "+b.toString()+")");break;case 2:a.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:b=n.width/2+n.left,a.unshift("rotate(-90 "+b.toString()+" "+b.toString()+")");break}I%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=Oe(s,'<g transform="'+a.join(" ")+'">',"</g>"))});const r=i.width,c=i.height,l=n.width,f=n.height;let u,d;r===null?(d=c===null?"1em":c==="auto"?f:c,u=ie(d,l/f)):(u=r==="auto"?l:r,d=c===null?ie(u,f/l):c==="auto"?f:c);const g={},y=(m,a)=>{_e(a)||(g[m]=a.toString())};y("width",u),y("height",d);const w=[n.left,n.top,l,f];return g.viewBox=w.join(" "),{attributes:g,viewBox:w,body:s}}const Me=/\sid="(\S+)"/g,ze="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let Be=0;function qe(e,t=ze){const o=[];let i;for(;i=Me.exec(e);)o.push(i[1]);if(!o.length)return e;const n="suffix"+(Math.random()*16777216|Date.now()).toString(16);return o.forEach(s=>{const r=typeof t=="function"?t(s):t+(Be++).toString(),c=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+r+n+"$3")}),e=e.replace(new RegExp(n,"g"),""),e}const R=Object.create(null);function Ne(e,t){R[e]=t}function D(e){return R[e]||R[""]}function U(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const $=Object.create(null),j=["https://api.simplesvg.com","https://api.unisvg.com"],M=[];for(;j.length>0;)j.length===1||Math.random()>.5?M.push(j.shift()):M.push(j.pop());$[""]=U({resources:["https://api.iconify.design"].concat(M)});function Re(e,t){const o=U(t);return o===null?!1:($[e]=o,!0)}function Q(e){return $[e]}let se=(()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}})();function De(e,t){const o=Q(e);if(!o)return 0;let i;if(!o.maxURL)i=0;else{let n=0;o.resources.forEach(r=>{n=Math.max(n,r.length)});const s=t+".json?icons=";i=o.maxURL-n-o.path.length-s.length}return i}function Ue(e){return e===404}const $e=(e,t,o)=>{const i=[],n=De(e,t),s="icons";let r={type:s,provider:e,prefix:t,icons:[]},c=0;return o.forEach((l,f)=>{c+=l.length+1,c>=n&&f>0&&(i.push(r),r={type:s,provider:e,prefix:t,icons:[]},c=l.length),r.icons.push(l)}),i.push(r),i};function Qe(e){if(typeof e=="string"){const t=Q(e);if(t)return t.path}return"/"}const Ve={prepare:$e,send:(e,t,o)=>{if(!se){o("abort",424);return}let i=Qe(t.provider);switch(t.type){case"icons":{const s=t.prefix,c=t.icons.join(","),l=new URLSearchParams({icons:c});i+=s+".json?"+l.toString();break}case"custom":{const s=t.uri;i+=s.slice(0,1)==="/"?s.slice(1):s;break}default:o("abort",400);return}let n=503;se(e+i).then(s=>{const r=s.status;if(r!==200){setTimeout(()=>{o(Ue(r)?"abort":"next",r)});return}return n=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?o("abort",s):o("next",n)});return}setTimeout(()=>{o("success",s)})}).catch(()=>{o("next",n)})}};function He(e){const t={loaded:[],missing:[],pending:[]},o=Object.create(null);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));let i={provider:"",prefix:"",name:""};return e.forEach(n=>{if(i.name===n.name&&i.prefix===n.prefix&&i.provider===n.provider)return;i=n;const s=n.provider,r=n.prefix,c=n.name,l=o[s]||(o[s]=Object.create(null)),f=l[r]||(l[r]=C(s,r));let u;c in f.icons?u=t.loaded:r===""||f.missing.has(c)?u=t.missing:u=t.pending;const d={provider:s,prefix:r,name:c};u.push(d)}),t}function re(e,t){e.forEach(o=>{const i=o.loaderCallbacks;i&&(o.loaderCallbacks=i.filter(n=>n.id!==t))})}function Ge(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let o=!1;const i=e.provider,n=e.prefix;t.forEach(s=>{const r=s.icons,c=r.pending.length;r.pending=r.pending.filter(l=>{if(l.prefix!==n)return!0;const f=l.name;if(e.icons[f])r.loaded.push({provider:i,prefix:n,name:f});else if(e.missing.has(f))r.missing.push({provider:i,prefix:n,name:f});else return o=!0,!0;return!1}),r.pending.length!==c&&(o||re([e],s.id),s.callback(r.loaded.slice(0),r.missing.slice(0),r.pending.slice(0),s.abort))})}))}let We=0;function Ke(e,t,o){const i=We++,n=re.bind(null,o,i);if(!t.pending.length)return n;const s={id:i,icons:t,callback:e,abort:n};return o.forEach(r=>{(r.loaderCallbacks||(r.loaderCallbacks=[])).push(s)}),n}function Je(e,t=!0,o=!1){const i=[];return e.forEach(n=>{const s=typeof n=="string"?L(n,t,o):n;s&&i.push(s)}),i}var Xe={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Ye(e,t,o,i){const n=e.resources.length,s=e.random?Math.floor(Math.random()*n):e.index;let r;if(e.random){let p=e.resources.slice(0);for(r=[];p.length>1;){const x=Math.floor(Math.random()*p.length);r.push(p[x]),p=p.slice(0,x).concat(p.slice(x+1))}r=r.concat(p)}else r=e.resources.slice(s).concat(e.resources.slice(0,s));const c=Date.now();let l="pending",f=0,u,d=null,g=[],y=[];typeof i=="function"&&y.push(i);function w(){d&&(clearTimeout(d),d=null)}function m(){l==="pending"&&(l="aborted"),w(),g.forEach(p=>{p.status==="pending"&&(p.status="aborted")}),g=[]}function a(p,x){x&&(y=[]),typeof p=="function"&&y.push(p)}function T(){return{startTime:c,payload:t,status:l,queriesSent:f,queriesPending:g.length,subscribe:a,abort:m}}function S(){l="failed",y.forEach(p=>{p(void 0,u)})}function I(){g.forEach(p=>{p.status==="pending"&&(p.status="aborted")}),g=[]}function b(p,x,F){const B=x!=="success";switch(g=g.filter(v=>v!==p),l){case"pending":break;case"failed":if(B||!e.dataAfterTimeout)return;break;default:return}if(x==="abort"){u=F,S();return}if(B){u=F,g.length||(r.length?G():S());return}if(w(),I(),!e.random){const v=e.resources.indexOf(p.resource);v!==-1&&v!==e.index&&(e.index=v)}l="completed",y.forEach(v=>{v(F)})}function G(){if(l!=="pending")return;w();const p=r.shift();if(p===void 0){if(g.length){d=setTimeout(()=>{w(),l==="pending"&&(I(),S())},e.timeout);return}S();return}const x={status:"pending",resource:p,callback:(F,B)=>{b(x,F,B)}};g.push(x),f++,d=setTimeout(G,e.rotate),o(p,t,x.callback)}return setTimeout(G),T}function ce(e){const t={...Xe,...e};let o=[];function i(){o=o.filter(c=>c().status==="pending")}function n(c,l,f){const u=Ye(t,c,l,(d,g)=>{i(),f&&f(d,g)});return o.push(u),u}function s(c){return o.find(l=>c(l))||null}return{query:n,find:s,setIndex:c=>{t.index=c},getIndex:()=>t.index,cleanup:i}}function le(){}const V=Object.create(null);function Ze(e){if(!V[e]){const t=Q(e);if(!t)return;const o=ce(t),i={config:t,redundancy:o};V[e]=i}return V[e]}function et(e,t,o){let i,n;if(typeof e=="string"){const s=D(e);if(!s)return o(void 0,424),le;n=s.send;const r=Ze(e);r&&(i=r.redundancy)}else{const s=U(e);if(s){i=ce(s);const r=e.resources?e.resources[0]:"",c=D(r);c&&(n=c.send)}}return!i||!n?(o(void 0,424),le):i.query(t,n,o)().abort}function fe(){}function tt(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Ge(e)}))}function nt(e){const t=[],o=[];return e.forEach(i=>{(i.match(W)?t:o).push(i)}),{valid:t,invalid:o}}function E(e,t,o){function i(){const n=e.pendingIcons;t.forEach(s=>{n&&n.delete(s),e.icons[s]||e.missing.add(s)})}if(o&&typeof o=="object")try{if(!ee(e,o).length){i();return}}catch(n){console.error(n)}i(),tt(e)}function ae(e,t){e instanceof Promise?e.then(o=>{t(o)}).catch(()=>{t(null)}):t(e)}function ot(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:o,prefix:i}=e,n=e.iconsToLoad;if(delete e.iconsToLoad,!n||!n.length)return;const s=e.loadIcon;if(e.loadIcons&&(n.length>1||!s)){ae(e.loadIcons(n,i,o),u=>{E(e,n,u)});return}if(s){n.forEach(u=>{const d=s(u,i,o);ae(d,g=>{const y=g?{prefix:i,icons:{[u]:g}}:null;E(e,[u],y)})});return}const{valid:r,invalid:c}=nt(n);if(c.length&&E(e,c,null),!r.length)return;const l=i.match(W)?D(o):null;if(!l){E(e,r,null);return}l.prepare(o,i,r).forEach(u=>{et(o,u,d=>{E(e,u.icons,d)})})}))}const it=(e,t)=>{const o=Je(e,!0,te()),i=He(o);if(!i.pending.length){let l=!0;return t&&setTimeout(()=>{l&&t(i.loaded,i.missing,i.pending,fe)}),()=>{l=!1}}const n=Object.create(null),s=[];let r,c;return i.pending.forEach(l=>{const{provider:f,prefix:u}=l;if(u===c&&f===r)return;r=f,c=u,s.push(C(f,u));const d=n[f]||(n[f]=Object.create(null));d[u]||(d[u]=[])}),i.pending.forEach(l=>{const{provider:f,prefix:u,name:d}=l,g=C(f,u),y=g.pendingIcons||(g.pendingIcons=new Set);y.has(d)||(y.add(d),n[f][u].push(d))}),s.forEach(l=>{const f=n[l.provider][l.prefix];f.length&&ot(l,f)}),t?Ke(t,i,s):fe};function st(e,t){const o={...e};for(const i in t){const n=t[i],s=typeof n;i in ne?(n===null||n&&(s==="string"||s==="number"))&&(o[i]=n):s===typeof o[i]&&(o[i]=i==="rotate"?n%4:n)}return o}const rt=/[\s,]+/;function ct(e,t){t.split(rt).forEach(o=>{switch(o.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function lt(e,t=0){const o=e.replace(/^-?[0-9.]*/,"");function i(n){for(;n<0;)n+=4;return n%4}if(o===""){const n=parseInt(e);return isNaN(n)?0:i(n)}else if(o!==e){let n=0;switch(o){case"%":n=25;break;case"deg":n=90}if(n){let s=parseFloat(e.slice(0,e.length-o.length));return isNaN(s)?0:(s=s/n,s%1===0?i(s):0)}}return t}function ft(e,t){let o=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in t)o+=" "+i+'="'+t[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+o+">"+e+"</svg>"}function at(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function ut(e){return"data:image/svg+xml,"+at(e)}function dt(e){return'url("'+ut(e)+'")'}const ue={...oe,inline:!1},ht={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},pt={display:"inline-block"},H={backgroundColor:"currentColor"},de={backgroundColor:"transparent"},he={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},pe={webkitMask:H,mask:H,background:de};for(const e in pe){const t=pe[e];for(const o in he)t[e+o]=he[o]}const z={};["horizontal","vertical"].forEach(e=>{const t=e.slice(0,1)+"Flip";z[e+"-flip"]=t,z[e.slice(0,1)+"-flip"]=t,z[e+"Flip"]=t});function ge(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const me=(e,t)=>{const o=st(ue,t),i={...ht},n=t.mode||"svg",s={},r=t.style,c=typeof r=="object"&&!(r instanceof Array)?r:{};for(let m in t){const a=t[m];if(a!==void 0)switch(m){case"icon":case"style":case"onLoad":case"mode":case"ssr":break;case"inline":case"hFlip":case"vFlip":o[m]=a===!0||a==="true"||a===1;break;case"flip":typeof a=="string"&&ct(o,a);break;case"color":s.color=a;break;case"rotate":typeof a=="string"?o[m]=lt(a):typeof a=="number"&&(o[m]=a);break;case"ariaHidden":case"aria-hidden":a!==!0&&a!=="true"&&delete i["aria-hidden"];break;default:{const T=z[m];T?(a===!0||a==="true"||a===1)&&(o[T]=!0):ue[m]===void 0&&(i[m]=a)}}}const l=Ae(e,o),f=l.attributes;if(o.inline&&(s.verticalAlign="-0.125em"),n==="svg"){i.style={...s,...c},Object.assign(i,f);let m=0,a=t.id;return typeof a=="string"&&(a=a.replace(/-/g,"_")),i.innerHTML=qe(l.body,a?()=>a+"ID"+m++:"iconifyVue"),h.h("svg",i)}const{body:u,width:d,height:g}=e,y=n==="mask"||(n==="bg"?!1:u.indexOf("currentColor")!==-1),w=ft(u,{...f,width:d+"",height:g+""});return i.style={...s,"--svg":dt(w),width:ge(f.width),height:ge(f.height),...pt,...y?H:de,...c},h.h("span",i)};if(te(!0),Ne("",Ve),typeof document<"u"&&typeof window<"u"){const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,o="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(i=>{try{(typeof i!="object"||i===null||i instanceof Array||typeof i.icons!="object"||typeof i.prefix!="string"||!Pe(i))&&console.error(o)}catch{console.error(o)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(let o in t){const i="IconifyProviders["+o+"] is invalid.";try{const n=t[o];if(typeof n!="object"||!n||n.resources===void 0)continue;Re(o,n)||console.error(i)}catch{console.error(i)}}}}const gt={...A,body:""},mt=h.defineComponent({inheritAttrs:!1,data(){return{_name:"",_loadingIcon:null,iconMounted:!1,counter:0}},mounted(){this.iconMounted=!0},unmounted(){this.abortLoading()},methods:{abortLoading(){this._loadingIcon&&(this._loadingIcon.abort(),this._loadingIcon=null)},getIcon(e,t,o){if(typeof e=="object"&&e!==null&&typeof e.body=="string")return this._name="",this.abortLoading(),{data:e};let i;if(typeof e!="string"||(i=L(e,!1,!0))===null)return this.abortLoading(),null;let n=Ce(i);if(!n)return(!this._loadingIcon||this._loadingIcon.name!==e)&&(this.abortLoading(),this._name="",n!==null&&(this._loadingIcon={name:e,abort:it([i],()=>{this.counter++})})),null;if(this.abortLoading(),this._name!==e&&(this._name=e,t&&t(e)),o){n=Object.assign({},n);const r=o(n.body,i.name,i.prefix,i.provider);typeof r=="string"&&(n.body=r)}const s=["iconify"];return i.prefix!==""&&s.push("iconify--"+i.prefix),i.provider!==""&&s.push("iconify--"+i.provider),{data:n,classes:s}}},render(){this.counter;const e=this.$attrs,t=this.iconMounted||e.ssr?this.getIcon(e.icon,e.onLoad,e.customise):null;if(!t)return me(gt,e);let o=e;return t.classes&&(o={...e,class:(typeof e.class=="string"?e.class+" ":"")+t.classes.join(" ")}),me({...A,...t.data},o)}}),ye=(e,t)=>{const o=e.__vccOpts||e;for(const[i,n]of t)o[i]=n;return o},yt=["src"],be=ye({__name:"BaseIcon",props:{icon:{type:String,required:!0,description:"Predefined icon string or any iconify value."},color:{type:String,required:!1,default:"",description:"Color of the icon."},circle:{type:Boolean,required:!1,default:!1,description:"Shows the icon in a circle."},size:{type:String,required:!1,default:"14px",description:"Size of the icon."},alignText:{type:Boolean,required:!1,default:!1,description:"Vertically aligns the icon and text."}},setup(e){const t=e,o=h.computed(()=>t.circle?{backgroundColor:t.color,color:"white",borderRadius:"50%",padding:"3px"}:t.color?{color:t.color}:null);return(i,n)=>{var s;return h.openBlock(),h.createElementBlock("div",{style:h.normalizeStyle({fontSize:e.size}),class:h.normalizeClass([{"align-sub":e.alignText},"base-icon__wrapper"])},[(s=e.icon)!=null&&s.startsWith("https")?(h.openBlock(),h.createElementBlock("img",{key:0,src:e.icon,class:"image-icon"},null,8,yt)):(h.openBlock(),h.createBlock(h.unref(mt),{key:1,icon:e.icon,style:h.normalizeStyle(o.value)},null,8,["icon","style"]))],6)}}},[["__scopeId","data-v-af0f176c"]]),bt={class:"user-image__wrapper"},xt=["src"],It=ye({__name:"UserImage",props:{image:{type:String,required:!1,default:"",description:"The image for the user, if not provided defaults to a user icon."},size:{type:String,required:!1,default:"14px",description:"Size of the image."},bgColor:{type:String,required:!1,default:"#616161",description:"Background color when showing the user icon."},iconColor:{type:String,required:!1,default:"#fff",description:"Color when showing the user icon."}},setup(e){return h.useCssVars(t=>({"37a07012":e.iconColor})),(t,o)=>(h.openBlock(),h.createElementBlock("div",bt,[e.image?(h.openBlock(),h.createElementBlock("img",{key:0,src:e.image,style:h.normalizeStyle({fontSize:e.size}),class:"user-image"},null,12,xt)):(h.openBlock(),h.createBlock(be,{key:1,icon:"ph:user-fill",size:e.size,circle:"",color:e.bgColor,class:"user-icon"},null,8,["size","color"]))]))}},[["__scopeId","data-v-5fa938c7"]]);k.BaseIcon=be,k.UserImage=It,Object.defineProperty(k,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(k,p){typeof exports=="object"&&typeof module<"u"?p(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],p):(k=typeof globalThis<"u"?globalThis:k||self,p(k.QuestUI={},k.Vue))})(this,function(k,p){"use strict";const W=/^[a-z0-9]+(-[a-z0-9]+)*$/,L=(e,t,o,i="")=>{const n=e.split(":");if(e.slice(0,1)==="@"){if(n.length<2||n.length>3)return null;i=n.shift().slice(1)}if(n.length>3||!n.length)return null;if(n.length>1){const c=n.pop(),l=n.pop(),a={provider:n.length>0?n[0]:i,prefix:l,name:c};return t&&!O(a)?null:a}const s=n[0],r=s.split("-");if(r.length>1){const c={provider:i,prefix:r.shift(),name:r.join("-")};return t&&!O(c)?null:c}if(o&&i===""){const c={provider:i,prefix:"",name:s};return t&&!O(c,o)?null:c}return null},O=(e,t)=>e?!!((t&&e.prefix===""||e.prefix)&&e.name):!1,K=Object.freeze({left:0,top:0,width:16,height:16}),A=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),_=Object.freeze({...K,...A}),q=Object.freeze({..._,body:"",hidden:!1});function xe(e,t){const o={};!e.hFlip!=!t.hFlip&&(o.hFlip=!0),!e.vFlip!=!t.vFlip&&(o.vFlip=!0);const i=((e.rotate||0)+(t.rotate||0))%4;return i&&(o.rotate=i),o}function J(e,t){const o=xe(e,t);for(const i in q)i in A?i in e&&!(i in o)&&(o[i]=A[i]):i in t?o[i]=t[i]:i in e&&(o[i]=e[i]);return o}function Ie(e,t){const o=e.icons,i=e.aliases||Object.create(null),n=Object.create(null);function s(r){if(o[r])return n[r]=[];if(!(r in n)){n[r]=null;const c=i[r]&&i[r].parent,l=c&&s(c);l&&(n[r]=[c].concat(l))}return n[r]}return Object.keys(o).concat(Object.keys(i)).forEach(s),n}function we(e,t,o){const i=e.icons,n=e.aliases||Object.create(null);let s={};function r(c){s=J(i[c]||n[c],s)}return r(t),o.forEach(r),J(e,s)}function X(e,t){const o=[];if(typeof e!="object"||typeof e.icons!="object")return o;e.not_found instanceof Array&&e.not_found.forEach(n=>{t(n,null),o.push(n)});const i=Ie(e);for(const n in i){const s=i[n];s&&(t(n,we(e,n,s)),o.push(n))}return o}const ke={provider:"",aliases:{},not_found:{},...K};function N(e,t){for(const o in t)if(o in e&&typeof e[o]!=typeof t[o])return!1;return!0}function Y(e){if(typeof e!="object"||e===null)return null;const t=e;if(typeof t.prefix!="string"||!e.icons||typeof e.icons!="object"||!N(e,ke))return null;const o=t.icons;for(const n in o){const s=o[n];if(!n||typeof s.body!="string"||!N(s,q))return null}const i=t.aliases||Object.create(null);for(const n in i){const s=i[n],r=s.parent;if(!n||typeof r!="string"||!o[r]&&!i[r]||!N(s,q))return null}return t}const Z=Object.create(null);function Se(e,t){return{provider:e,prefix:t,icons:Object.create(null),missing:new Set}}function v(e,t){const o=Z[e]||(Z[e]=Object.create(null));return o[t]||(o[t]=Se(e,t))}function ee(e,t){return Y(t)?X(t,(o,i)=>{i?e.icons[o]=i:e.missing.add(o)}):[]}function Te(e,t,o){try{if(typeof o.body=="string")return e.icons[t]={...o},!0}catch{}return!1}let j=!1;function te(e){return typeof e=="boolean"&&(j=e),j}function ve(e){const t=typeof e=="string"?L(e,!0,j):e;if(t){const o=v(t.provider,t.prefix),i=t.name;return o.icons[i]||(o.missing.has(i)?null:void 0)}}function Ce(e,t){const o=L(e,!0,j);if(!o)return!1;const i=v(o.provider,o.prefix);return t?Te(i,o.name,t):(i.missing.add(o.name),!0)}function je(e,t){if(typeof e!="object")return!1;if(typeof t!="string"&&(t=e.provider||""),j&&!t&&!e.prefix){let n=!1;return Y(e)&&(e.prefix="",X(e,(s,r)=>{Ce(s,r)&&(n=!0)})),n}const o=e.prefix;if(!O({prefix:o,name:"a"}))return!1;const i=v(t,o);return!!ee(i,e)}const ne=Object.freeze({width:null,height:null}),oe=Object.freeze({...ne,...A}),Pe=/(-?[0-9.]*[0-9]+[0-9.]*)/g,Ee=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function ie(e,t,o){if(t===1)return e;if(o=o||100,typeof e=="number")return Math.ceil(e*t*o)/o;if(typeof e!="string")return e;const i=e.split(Pe);if(i===null||!i.length)return e;const n=[];let s=i.shift(),r=Ee.test(s);for(;;){if(r){const c=parseFloat(s);isNaN(c)?n.push(s):n.push(Math.ceil(c*t*o)/o)}else n.push(s);if(s=i.shift(),s===void 0)return n.join("");r=!r}}function Fe(e,t="defs"){let o="";const i=e.indexOf("<"+t);for(;i>=0;){const n=e.indexOf(">",i),s=e.indexOf("</"+t);if(n===-1||s===-1)break;const r=e.indexOf(">",s);if(r===-1)break;o+=e.slice(n+1,s).trim(),e=e.slice(0,i).trim()+e.slice(r+1)}return{defs:o,content:e}}function Le(e,t){return e?"<defs>"+e+"</defs>"+t:t}function Oe(e,t,o){const i=Fe(e);return Le(i.defs,t+i.content+o)}const Ae=e=>e==="unset"||e==="undefined"||e==="none";function _e(e,t){const o={..._,...e},i={...oe,...t},n={left:o.left,top:o.top,width:o.width,height:o.height};let s=o.body;[o,i].forEach(m=>{const f=[],C=m.hFlip,S=m.vFlip;let I=m.rotate;C?S?I+=2:(f.push("translate("+(n.width+n.left).toString()+" "+(0-n.top).toString()+")"),f.push("scale(-1 1)"),n.top=n.left=0):S&&(f.push("translate("+(0-n.left).toString()+" "+(n.height+n.top).toString()+")"),f.push("scale(1 -1)"),n.top=n.left=0);let b;switch(I<0&&(I-=Math.floor(I/4)*4),I=I%4,I){case 1:b=n.height/2+n.top,f.unshift("rotate(90 "+b.toString()+" "+b.toString()+")");break;case 2:f.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:b=n.width/2+n.left,f.unshift("rotate(-90 "+b.toString()+" "+b.toString()+")");break}I%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)),f.length&&(s=Oe(s,'<g transform="'+f.join(" ")+'">',"</g>"))});const r=i.width,c=i.height,l=n.width,a=n.height;let u,d;r===null?(d=c===null?"1em":c==="auto"?a:c,u=ie(d,l/a)):(u=r==="auto"?l:r,d=c===null?ie(u,a/l):c==="auto"?a:c);const g={},y=(m,f)=>{Ae(f)||(g[m]=f.toString())};y("width",u),y("height",d);const w=[n.left,n.top,l,a];return g.viewBox=w.join(" "),{attributes:g,viewBox:w,body:s}}const Me=/\sid="(\S+)"/g,ze="IconifyId"+Date.now().toString(16)+(Math.random()*16777216|0).toString(16);let Be=0;function qe(e,t=ze){const o=[];let i;for(;i=Me.exec(e);)o.push(i[1]);if(!o.length)return e;const n="suffix"+(Math.random()*16777216|Date.now()).toString(16);return o.forEach(s=>{const r=typeof t=="function"?t(s):t+(Be++).toString(),c=s.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");e=e.replace(new RegExp('([#;"])('+c+')([")]|\\.[a-z])',"g"),"$1"+r+n+"$3")}),e=e.replace(new RegExp(n,"g"),""),e}const R=Object.create(null);function Ne(e,t){R[e]=t}function D(e){return R[e]||R[""]}function U(e){let t;if(typeof e.resources=="string")t=[e.resources];else if(t=e.resources,!(t instanceof Array)||!t.length)return null;return{resources:t,path:e.path||"/",maxURL:e.maxURL||500,rotate:e.rotate||750,timeout:e.timeout||5e3,random:e.random===!0,index:e.index||0,dataAfterTimeout:e.dataAfterTimeout!==!1}}const $=Object.create(null),P=["https://api.simplesvg.com","https://api.unisvg.com"],M=[];for(;P.length>0;)P.length===1||Math.random()>.5?M.push(P.shift()):M.push(P.pop());$[""]=U({resources:["https://api.iconify.design"].concat(M)});function Re(e,t){const o=U(t);return o===null?!1:($[e]=o,!0)}function Q(e){return $[e]}let se=(()=>{let e;try{if(e=fetch,typeof e=="function")return e}catch{}})();function De(e,t){const o=Q(e);if(!o)return 0;let i;if(!o.maxURL)i=0;else{let n=0;o.resources.forEach(r=>{n=Math.max(n,r.length)});const s=t+".json?icons=";i=o.maxURL-n-o.path.length-s.length}return i}function Ue(e){return e===404}const $e=(e,t,o)=>{const i=[],n=De(e,t),s="icons";let r={type:s,provider:e,prefix:t,icons:[]},c=0;return o.forEach((l,a)=>{c+=l.length+1,c>=n&&a>0&&(i.push(r),r={type:s,provider:e,prefix:t,icons:[]},c=l.length),r.icons.push(l)}),i.push(r),i};function Qe(e){if(typeof e=="string"){const t=Q(e);if(t)return t.path}return"/"}const Ve={prepare:$e,send:(e,t,o)=>{if(!se){o("abort",424);return}let i=Qe(t.provider);switch(t.type){case"icons":{const s=t.prefix,c=t.icons.join(","),l=new URLSearchParams({icons:c});i+=s+".json?"+l.toString();break}case"custom":{const s=t.uri;i+=s.slice(0,1)==="/"?s.slice(1):s;break}default:o("abort",400);return}let n=503;se(e+i).then(s=>{const r=s.status;if(r!==200){setTimeout(()=>{o(Ue(r)?"abort":"next",r)});return}return n=501,s.json()}).then(s=>{if(typeof s!="object"||s===null){setTimeout(()=>{s===404?o("abort",s):o("next",n)});return}setTimeout(()=>{o("success",s)})}).catch(()=>{o("next",n)})}};function He(e){const t={loaded:[],missing:[],pending:[]},o=Object.create(null);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));let i={provider:"",prefix:"",name:""};return e.forEach(n=>{if(i.name===n.name&&i.prefix===n.prefix&&i.provider===n.provider)return;i=n;const s=n.provider,r=n.prefix,c=n.name,l=o[s]||(o[s]=Object.create(null)),a=l[r]||(l[r]=v(s,r));let u;c in a.icons?u=t.loaded:r===""||a.missing.has(c)?u=t.missing:u=t.pending;const d={provider:s,prefix:r,name:c};u.push(d)}),t}function re(e,t){e.forEach(o=>{const i=o.loaderCallbacks;i&&(o.loaderCallbacks=i.filter(n=>n.id!==t))})}function Ge(e){e.pendingCallbacksFlag||(e.pendingCallbacksFlag=!0,setTimeout(()=>{e.pendingCallbacksFlag=!1;const t=e.loaderCallbacks?e.loaderCallbacks.slice(0):[];if(!t.length)return;let o=!1;const i=e.provider,n=e.prefix;t.forEach(s=>{const r=s.icons,c=r.pending.length;r.pending=r.pending.filter(l=>{if(l.prefix!==n)return!0;const a=l.name;if(e.icons[a])r.loaded.push({provider:i,prefix:n,name:a});else if(e.missing.has(a))r.missing.push({provider:i,prefix:n,name:a});else return o=!0,!0;return!1}),r.pending.length!==c&&(o||re([e],s.id),s.callback(r.loaded.slice(0),r.missing.slice(0),r.pending.slice(0),s.abort))})}))}let We=0;function Ke(e,t,o){const i=We++,n=re.bind(null,o,i);if(!t.pending.length)return n;const s={id:i,icons:t,callback:e,abort:n};return o.forEach(r=>{(r.loaderCallbacks||(r.loaderCallbacks=[])).push(s)}),n}function Je(e,t=!0,o=!1){const i=[];return e.forEach(n=>{const s=typeof n=="string"?L(n,t,o):n;s&&i.push(s)}),i}var Xe={resources:[],index:0,timeout:2e3,rotate:750,random:!1,dataAfterTimeout:!1};function Ye(e,t,o,i){const n=e.resources.length,s=e.random?Math.floor(Math.random()*n):e.index;let r;if(e.random){let h=e.resources.slice(0);for(r=[];h.length>1;){const x=Math.floor(Math.random()*h.length);r.push(h[x]),h=h.slice(0,x).concat(h.slice(x+1))}r=r.concat(h)}else r=e.resources.slice(s).concat(e.resources.slice(0,s));const c=Date.now();let l="pending",a=0,u,d=null,g=[],y=[];typeof i=="function"&&y.push(i);function w(){d&&(clearTimeout(d),d=null)}function m(){l==="pending"&&(l="aborted"),w(),g.forEach(h=>{h.status==="pending"&&(h.status="aborted")}),g=[]}function f(h,x){x&&(y=[]),typeof h=="function"&&y.push(h)}function C(){return{startTime:c,payload:t,status:l,queriesSent:a,queriesPending:g.length,subscribe:f,abort:m}}function S(){l="failed",y.forEach(h=>{h(void 0,u)})}function I(){g.forEach(h=>{h.status==="pending"&&(h.status="aborted")}),g=[]}function b(h,x,F){const B=x!=="success";switch(g=g.filter(T=>T!==h),l){case"pending":break;case"failed":if(B||!e.dataAfterTimeout)return;break;default:return}if(x==="abort"){u=F,S();return}if(B){u=F,g.length||(r.length?G():S());return}if(w(),I(),!e.random){const T=e.resources.indexOf(h.resource);T!==-1&&T!==e.index&&(e.index=T)}l="completed",y.forEach(T=>{T(F)})}function G(){if(l!=="pending")return;w();const h=r.shift();if(h===void 0){if(g.length){d=setTimeout(()=>{w(),l==="pending"&&(I(),S())},e.timeout);return}S();return}const x={status:"pending",resource:h,callback:(F,B)=>{b(x,F,B)}};g.push(x),a++,d=setTimeout(G,e.rotate),o(h,t,x.callback)}return setTimeout(G),C}function ce(e){const t={...Xe,...e};let o=[];function i(){o=o.filter(c=>c().status==="pending")}function n(c,l,a){const u=Ye(t,c,l,(d,g)=>{i(),a&&a(d,g)});return o.push(u),u}function s(c){return o.find(l=>c(l))||null}return{query:n,find:s,setIndex:c=>{t.index=c},getIndex:()=>t.index,cleanup:i}}function le(){}const V=Object.create(null);function Ze(e){if(!V[e]){const t=Q(e);if(!t)return;const o=ce(t),i={config:t,redundancy:o};V[e]=i}return V[e]}function et(e,t,o){let i,n;if(typeof e=="string"){const s=D(e);if(!s)return o(void 0,424),le;n=s.send;const r=Ze(e);r&&(i=r.redundancy)}else{const s=U(e);if(s){i=ce(s);const r=e.resources?e.resources[0]:"",c=D(r);c&&(n=c.send)}}return!i||!n?(o(void 0,424),le):i.query(t,n,o)().abort}function ae(){}function tt(e){e.iconsLoaderFlag||(e.iconsLoaderFlag=!0,setTimeout(()=>{e.iconsLoaderFlag=!1,Ge(e)}))}function nt(e){const t=[],o=[];return e.forEach(i=>{(i.match(W)?t:o).push(i)}),{valid:t,invalid:o}}function E(e,t,o){function i(){const n=e.pendingIcons;t.forEach(s=>{n&&n.delete(s),e.icons[s]||e.missing.add(s)})}if(o&&typeof o=="object")try{if(!ee(e,o).length){i();return}}catch(n){console.error(n)}i(),tt(e)}function fe(e,t){e instanceof Promise?e.then(o=>{t(o)}).catch(()=>{t(null)}):t(e)}function ot(e,t){e.iconsToLoad?e.iconsToLoad=e.iconsToLoad.concat(t).sort():e.iconsToLoad=t,e.iconsQueueFlag||(e.iconsQueueFlag=!0,setTimeout(()=>{e.iconsQueueFlag=!1;const{provider:o,prefix:i}=e,n=e.iconsToLoad;if(delete e.iconsToLoad,!n||!n.length)return;const s=e.loadIcon;if(e.loadIcons&&(n.length>1||!s)){fe(e.loadIcons(n,i,o),u=>{E(e,n,u)});return}if(s){n.forEach(u=>{const d=s(u,i,o);fe(d,g=>{const y=g?{prefix:i,icons:{[u]:g}}:null;E(e,[u],y)})});return}const{valid:r,invalid:c}=nt(n);if(c.length&&E(e,c,null),!r.length)return;const l=i.match(W)?D(o):null;if(!l){E(e,r,null);return}l.prepare(o,i,r).forEach(u=>{et(o,u,d=>{E(e,u.icons,d)})})}))}const it=(e,t)=>{const o=Je(e,!0,te()),i=He(o);if(!i.pending.length){let l=!0;return t&&setTimeout(()=>{l&&t(i.loaded,i.missing,i.pending,ae)}),()=>{l=!1}}const n=Object.create(null),s=[];let r,c;return i.pending.forEach(l=>{const{provider:a,prefix:u}=l;if(u===c&&a===r)return;r=a,c=u,s.push(v(a,u));const d=n[a]||(n[a]=Object.create(null));d[u]||(d[u]=[])}),i.pending.forEach(l=>{const{provider:a,prefix:u,name:d}=l,g=v(a,u),y=g.pendingIcons||(g.pendingIcons=new Set);y.has(d)||(y.add(d),n[a][u].push(d))}),s.forEach(l=>{const a=n[l.provider][l.prefix];a.length&&ot(l,a)}),t?Ke(t,i,s):ae};function st(e,t){const o={...e};for(const i in t){const n=t[i],s=typeof n;i in ne?(n===null||n&&(s==="string"||s==="number"))&&(o[i]=n):s===typeof o[i]&&(o[i]=i==="rotate"?n%4:n)}return o}const rt=/[\s,]+/;function ct(e,t){t.split(rt).forEach(o=>{switch(o.trim()){case"horizontal":e.hFlip=!0;break;case"vertical":e.vFlip=!0;break}})}function lt(e,t=0){const o=e.replace(/^-?[0-9.]*/,"");function i(n){for(;n<0;)n+=4;return n%4}if(o===""){const n=parseInt(e);return isNaN(n)?0:i(n)}else if(o!==e){let n=0;switch(o){case"%":n=25;break;case"deg":n=90}if(n){let s=parseFloat(e.slice(0,e.length-o.length));return isNaN(s)?0:(s=s/n,s%1===0?i(s):0)}}return t}function at(e,t){let o=e.indexOf("xlink:")===-1?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const i in t)o+=" "+i+'="'+t[i]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+o+">"+e+"</svg>"}function ft(e){return e.replace(/"/g,"'").replace(/%/g,"%25").replace(/#/g,"%23").replace(/</g,"%3C").replace(/>/g,"%3E").replace(/\s+/g," ")}function ut(e){return"data:image/svg+xml,"+ft(e)}function dt(e){return'url("'+ut(e)+'")'}const ue={...oe,inline:!1},pt={xmlns:"http://www.w3.org/2000/svg","xmlns:xlink":"http://www.w3.org/1999/xlink","aria-hidden":!0,role:"img"},ht={display:"inline-block"},H={backgroundColor:"currentColor"},de={backgroundColor:"transparent"},pe={Image:"var(--svg)",Repeat:"no-repeat",Size:"100% 100%"},he={webkitMask:H,mask:H,background:de};for(const e in he){const t=he[e];for(const o in pe)t[e+o]=pe[o]}const z={};["horizontal","vertical"].forEach(e=>{const t=e.slice(0,1)+"Flip";z[e+"-flip"]=t,z[e.slice(0,1)+"-flip"]=t,z[e+"Flip"]=t});function ge(e){return e+(e.match(/^[-0-9.]+$/)?"px":"")}const me=(e,t)=>{const o=st(ue,t),i={...pt},n=t.mode||"svg",s={},r=t.style,c=typeof r=="object"&&!(r instanceof Array)?r:{};for(let m in t){const f=t[m];if(f!==void 0)switch(m){case"icon":case"style":case"onLoad":case"mode":case"ssr":break;case"inline":case"hFlip":case"vFlip":o[m]=f===!0||f==="true"||f===1;break;case"flip":typeof f=="string"&&ct(o,f);break;case"color":s.color=f;break;case"rotate":typeof f=="string"?o[m]=lt(f):typeof f=="number"&&(o[m]=f);break;case"ariaHidden":case"aria-hidden":f!==!0&&f!=="true"&&delete i["aria-hidden"];break;default:{const C=z[m];C?(f===!0||f==="true"||f===1)&&(o[C]=!0):ue[m]===void 0&&(i[m]=f)}}}const l=_e(e,o),a=l.attributes;if(o.inline&&(s.verticalAlign="-0.125em"),n==="svg"){i.style={...s,...c},Object.assign(i,a);let m=0,f=t.id;return typeof f=="string"&&(f=f.replace(/-/g,"_")),i.innerHTML=qe(l.body,f?()=>f+"ID"+m++:"iconifyVue"),p.h("svg",i)}const{body:u,width:d,height:g}=e,y=n==="mask"||(n==="bg"?!1:u.indexOf("currentColor")!==-1),w=at(u,{...a,width:d+"",height:g+""});return i.style={...s,"--svg":dt(w),width:ge(a.width),height:ge(a.height),...ht,...y?H:de,...c},p.h("span",i)};if(te(!0),Ne("",Ve),typeof document<"u"&&typeof window<"u"){const e=window;if(e.IconifyPreload!==void 0){const t=e.IconifyPreload,o="Invalid IconifyPreload syntax.";typeof t=="object"&&t!==null&&(t instanceof Array?t:[t]).forEach(i=>{try{(typeof i!="object"||i===null||i instanceof Array||typeof i.icons!="object"||typeof i.prefix!="string"||!je(i))&&console.error(o)}catch{console.error(o)}})}if(e.IconifyProviders!==void 0){const t=e.IconifyProviders;if(typeof t=="object"&&t!==null)for(let o in t){const i="IconifyProviders["+o+"] is invalid.";try{const n=t[o];if(typeof n!="object"||!n||n.resources===void 0)continue;Re(o,n)||console.error(i)}catch{console.error(i)}}}}const gt={..._,body:""},mt=p.defineComponent({inheritAttrs:!1,data(){return{_name:"",_loadingIcon:null,iconMounted:!1,counter:0}},mounted(){this.iconMounted=!0},unmounted(){this.abortLoading()},methods:{abortLoading(){this._loadingIcon&&(this._loadingIcon.abort(),this._loadingIcon=null)},getIcon(e,t,o){if(typeof e=="object"&&e!==null&&typeof e.body=="string")return this._name="",this.abortLoading(),{data:e};let i;if(typeof e!="string"||(i=L(e,!1,!0))===null)return this.abortLoading(),null;let n=ve(i);if(!n)return(!this._loadingIcon||this._loadingIcon.name!==e)&&(this.abortLoading(),this._name="",n!==null&&(this._loadingIcon={name:e,abort:it([i],()=>{this.counter++})})),null;if(this.abortLoading(),this._name!==e&&(this._name=e,t&&t(e)),o){n=Object.assign({},n);const r=o(n.body,i.name,i.prefix,i.provider);typeof r=="string"&&(n.body=r)}const s=["iconify"];return i.prefix!==""&&s.push("iconify--"+i.prefix),i.provider!==""&&s.push("iconify--"+i.provider),{data:n,classes:s}}},render(){this.counter;const e=this.$attrs,t=this.iconMounted||e.ssr?this.getIcon(e.icon,e.onLoad,e.customise):null;if(!t)return me(gt,e);let o=e;return t.classes&&(o={...e,class:(typeof e.class=="string"?e.class+" ":"")+t.classes.join(" ")}),me({..._,...t.data},o)}}),ye=(e,t)=>{const o=e.__vccOpts||e;for(const[i,n]of t)o[i]=n;return o},yt=["src"],be=ye({__name:"BaseIcon",props:{icon:{type:String,required:!0,tsType:"string",description:"Any iconify value."},color:{type:String,required:!1,default:null,tsType:"string",description:"Color of the icon."},circle:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Shows the icon in a circle."},size:{type:String,required:!1,default:"16px",tsType:"string",description:"Size of the icon."},alignText:{type:Boolean,required:!1,default:!1,tsType:"boolean",description:"Vertically aligns the icon and text."}},setup(e){const t=e,o=p.computed(()=>t.circle?{backgroundColor:t.color,color:"white",borderRadius:"50%",padding:"3px"}:t.color?{color:t.color}:null);return(i,n)=>{var s;return p.openBlock(),p.createElementBlock("div",{style:p.normalizeStyle({fontSize:e.size}),class:p.normalizeClass([{"icon--align":e.alignText},"base-icon__wrapper"])},[(s=e.icon)!=null&&s.startsWith("https")?(p.openBlock(),p.createElementBlock("img",{key:0,src:e.icon,class:"image-icon"},null,8,yt)):(p.openBlock(),p.createBlock(p.unref(mt),{key:1,icon:e.icon,style:p.normalizeStyle(o.value)},null,8,["icon","style"]))],6)}}},[["__scopeId","data-v-369c65cf"]]),bt={class:"user-image__wrapper"},xt=["src"],It=ye({__name:"UserImage",props:{image:{type:String,required:!1,default:null,tsType:"string",description:"The image for the user, if not provided defaults to a user icon."},size:{type:String,required:!1,default:"14px",tsType:"string",description:"Size of the image."},backgroundColor:{type:String,required:!1,default:null,tsType:"string",description:"Background color when showing the user icon."}},setup(e){return(t,o)=>(p.openBlock(),p.createElementBlock("div",bt,[e.image?(p.openBlock(),p.createElementBlock("img",{key:0,src:e.image,style:p.normalizeStyle({fontSize:e.size}),class:"user-image"},null,12,xt)):(p.openBlock(),p.createBlock(be,{key:1,icon:"ph:user-fill",size:e.size,circle:"",color:e.backgroundColor,class:p.normalizeClass([{"icon-border":!e.backgroundColor},"user-icon"])},null,8,["size","color","class"]))]))}},[["__scopeId","data-v-72891255"]]);k.BaseIcon=be,k.UserImage=It,Object.defineProperty(k,Symbol.toStringTag,{value:"Module"})});
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vue-quest-ui",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.6",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"dist",
|
|
@@ -12,9 +12,9 @@
|
|
|
12
12
|
"exports": {
|
|
13
13
|
".": {
|
|
14
14
|
"import": "./dist/vue-quest-ui.js",
|
|
15
|
-
"require": "./dist/vue-quest-ui-umd.cjs"
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
"require": "./dist/vue-quest-ui-umd.cjs"
|
|
16
|
+
},
|
|
17
|
+
"./dist/*.css": "./dist/*.css"
|
|
18
18
|
},
|
|
19
19
|
"description": "A reusable component library",
|
|
20
20
|
"keywords": [
|