@layers.digital/layers-design-system-vue3 1.0.13 → 1.0.14

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