@zyzgroup/core-vue 0.0.40 → 0.0.41

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.
@@ -1,28 +1,28 @@
1
- import { getCurrentInstance as xt, createVNode as W, render as St, onMounted as Qe, onUnmounted as Ct, computed as It, defineComponent as R, h as Ie, openBlock as M, createElementBlock as $, normalizeStyle as w, unref as N, createElementVNode as b, ref as k, watch as Ot, createCommentVNode as ce, renderSlot as Y, createBlock as fe, toDisplayString as Pt, withCtx as kt } from "vue";
2
- import { createRouter as At, createWebHistory as Mt } from "vue-router";
3
- import { useStore as Ke, createNamespacedHelpers as ne, mapMutations as Et, mapActions as Lt, mapState as Tt, mapGetters as Ft } from "vuex";
4
- function Ao() {
5
- return xt();
1
+ import { getCurrentInstance as a, createVNode as p, render as R, onMounted as h, onUnmounted as g, computed as C } from "vue";
2
+ import { createRouter as l, createWebHistory as m } from "vue-router";
3
+ import { useStore as c, createNamespacedHelpers as u, mapMutations as x, mapActions as E, mapState as V, mapGetters as A } from "vuex";
4
+ function I() {
5
+ return a();
6
6
  }
7
- function Rt(e, t) {
8
- return W(e, t);
7
+ function v(t, e) {
8
+ return p(t, e);
9
9
  }
10
- function Mo(e) {
11
- const t = Rt(e.component, e.props);
12
- e.appContext && (t.appContext = e.appContext), St(t, e.selfContainer), e.parentContainer?.appendChild(e.selfContainer);
10
+ function b(t) {
11
+ const e = v(t.component, t.props);
12
+ t.appContext && (e.appContext = t.appContext), R(e, t.selfContainer), t.parentContainer?.appendChild(t.selfContainer);
13
13
  }
14
- function Eo(e) {
15
- let t;
16
- Qe(() => {
17
- t = e();
18
- }), Ct(() => {
19
- t?.();
14
+ function S(t) {
15
+ let e;
16
+ h(() => {
17
+ e = t();
18
+ }), g(() => {
19
+ e?.();
20
20
  });
21
21
  }
22
- function Lo(e) {
23
- const t = At({
24
- history: Mt("/"),
25
- routes: e,
22
+ function T(t) {
23
+ const e = l({
24
+ history: m("/"),
25
+ routes: t,
26
26
  // [
27
27
  // {
28
28
  // path: "/",
@@ -53,16 +53,16 @@ function Lo(e) {
53
53
  // component: Page404
54
54
  // }
55
55
  // ]
56
- scrollBehavior: (n, r, o) => o || { left: 0, top: 0 }
56
+ scrollBehavior: (r, o, n) => n || { left: 0, top: 0 }
57
57
  });
58
- return t.beforeEach(
59
- (n, r, o) => {
60
- o();
58
+ return e.beforeEach(
59
+ (r, o, n) => {
60
+ n();
61
61
  }
62
62
  ), {
63
- router: t,
64
- push: async (n) => {
65
- await t.push(n);
63
+ router: e,
64
+ push: async (r) => {
65
+ await e.push(r);
66
66
  },
67
67
  // {
68
68
  // name: Name;
@@ -71,8 +71,8 @@ function Lo(e) {
71
71
  // params: Params;
72
72
  // meta: Meta;
73
73
  // }
74
- to: function(n) {
75
- this.push({ path: n });
74
+ to: function(r) {
75
+ this.push({ path: r });
76
76
  },
77
77
  // 动态注册路由
78
78
  // const remove = addRoute("demo", {
@@ -81,22 +81,22 @@ function Lo(e) {
81
81
  // component: () => import("@/src/views/sub2.vue")
82
82
  // });
83
83
  // remove();
84
- addRoute: (n, r) => t.addRoute(n, r),
85
- removeRoute: (n) => {
86
- t.removeRoute(n);
84
+ addRoute: (r, o) => e.addRoute(r, o),
85
+ removeRoute: (r) => {
86
+ e.removeRoute(r);
87
87
  },
88
- hasRoute: (n) => t.hasRoute(n),
89
- getRoutes: () => t.getRoutes(),
88
+ hasRoute: (r) => e.hasRoute(r),
89
+ getRoutes: () => e.getRoutes(),
90
90
  getCurrentRoute: () => ({
91
- params: t.currentRoute.value.params,
92
- query: t.currentRoute.value.query
91
+ params: e.currentRoute.value.params,
92
+ query: e.currentRoute.value.query
93
93
  })
94
94
  };
95
95
  }
96
- const To = "increment", Fo = "decrement", Ro = "incrementAction";
97
- function jo() {
96
+ const _ = "increment", G = "decrement", q = "incrementAction";
97
+ function H() {
98
98
  return {
99
- store: Ke()
99
+ store: c()
100
100
  // state: store.state
101
101
  // ...useVuexStates(["count"]),
102
102
  // ...useVuexStates("demo", ["name"]),
@@ -119,2296 +119,42 @@ function jo() {
119
119
  // {{ store.getters["demo/nameFormat"] }}
120
120
  };
121
121
  }
122
- function $o(e, t) {
123
- let n = Tt;
124
- return typeof e == "string" && e.length > 0 ? n = ne(e).mapState : t = e, Ye(t, n);
125
- }
126
- function zo(e, t) {
127
- let n = Ft;
128
- return typeof e == "string" && e.length > 0 ? n = ne(e).mapGetters : t = e, Ye(t, n);
129
- }
130
- function Bo(e, t) {
131
- let n = Et;
132
- return typeof e == "string" && e.length > 0 ? n = ne(e).mapMutations : t = e, Array.isArray(t), n(t);
133
- }
134
- function Vo(e, t) {
135
- let n = Lt;
136
- return typeof e == "string" && e.length > 0 ? n = ne(e).mapActions : t = e, Array.isArray(t), n(t);
137
- }
138
- function Ye(e, t) {
139
- const n = Ke(), r = {}, o = t(e);
140
- return Object.keys(o).forEach((s) => {
141
- const i = o[s].bind({ $store: n });
142
- r[s] = It(i);
143
- }), r;
144
- }
145
- const G = /^[a-z0-9]+(-[a-z0-9]+)*$/, oe = (e, t, n, r = "") => {
146
- const o = e.split(":");
147
- if (e.slice(0, 1) === "@") {
148
- if (o.length < 2 || o.length > 3)
149
- return null;
150
- r = o.shift().slice(1);
151
- }
152
- if (o.length > 3 || !o.length)
153
- return null;
154
- if (o.length > 1) {
155
- const a = o.pop(), c = o.pop(), l = {
156
- // Allow provider without '@': "provider:prefix:name"
157
- provider: o.length > 0 ? o[0] : r,
158
- prefix: c,
159
- name: a
160
- };
161
- return t && !Z(l) ? null : l;
162
- }
163
- const s = o[0], i = s.split("-");
164
- if (i.length > 1) {
165
- const a = {
166
- provider: r,
167
- prefix: i.shift(),
168
- name: i.join("-")
169
- };
170
- return t && !Z(a) ? null : a;
171
- }
172
- if (n && r === "") {
173
- const a = {
174
- provider: r,
175
- prefix: "",
176
- name: s
177
- };
178
- return t && !Z(a, n) ? null : a;
179
- }
180
- return null;
181
- }, Z = (e, t) => e ? !!((e.provider === "" || e.provider.match(G)) && (t && e.prefix === "" || e.prefix.match(G)) && e.name.match(G)) : !1, Ze = Object.freeze(
182
- {
183
- left: 0,
184
- top: 0,
185
- width: 16,
186
- height: 16
187
- }
188
- ), te = Object.freeze({
189
- rotate: 0,
190
- vFlip: !1,
191
- hFlip: !1
192
- }), re = Object.freeze({
193
- ...Ze,
194
- ...te
195
- }), de = Object.freeze({
196
- ...re,
197
- body: "",
198
- hidden: !1
199
- });
200
- function jt(e, t) {
201
- const n = {};
202
- !e.hFlip != !t.hFlip && (n.hFlip = !0), !e.vFlip != !t.vFlip && (n.vFlip = !0);
203
- const r = ((e.rotate || 0) + (t.rotate || 0)) % 4;
204
- return r && (n.rotate = r), n;
205
- }
206
- function Oe(e, t) {
207
- const n = jt(e, t);
208
- for (const r in de)
209
- r in te ? r in e && !(r in n) && (n[r] = te[r]) : r in t ? n[r] = t[r] : r in e && (n[r] = e[r]);
210
- return n;
211
- }
212
- function $t(e, t) {
213
- const n = e.icons, r = e.aliases || /* @__PURE__ */ Object.create(null), o = /* @__PURE__ */ Object.create(null);
214
- function s(i) {
215
- if (n[i])
216
- return o[i] = [];
217
- if (!(i in o)) {
218
- o[i] = null;
219
- const a = r[i] && r[i].parent, c = a && s(a);
220
- c && (o[i] = [a].concat(c));
221
- }
222
- return o[i];
223
- }
224
- return (t || Object.keys(n).concat(Object.keys(r))).forEach(s), o;
225
- }
226
- function zt(e, t, n) {
227
- const r = e.icons, o = e.aliases || /* @__PURE__ */ Object.create(null);
228
- let s = {};
229
- function i(a) {
230
- s = Oe(
231
- r[a] || o[a],
232
- s
233
- );
234
- }
235
- return i(t), n.forEach(i), Oe(e, s);
236
- }
237
- function Je(e, t) {
238
- const n = [];
239
- if (typeof e != "object" || typeof e.icons != "object")
240
- return n;
241
- e.not_found instanceof Array && e.not_found.forEach((o) => {
242
- t(o, null), n.push(o);
243
- });
244
- const r = $t(e);
245
- for (const o in r) {
246
- const s = r[o];
247
- s && (t(o, zt(e, o, s)), n.push(o));
248
- }
249
- return n;
250
- }
251
- const Bt = {
252
- provider: "",
253
- aliases: {},
254
- not_found: {},
255
- ...Ze
256
- };
257
- function ae(e, t) {
258
- for (const n in t)
259
- if (n in e && typeof e[n] != typeof t[n])
260
- return !1;
261
- return !0;
262
- }
263
- function Xe(e) {
264
- if (typeof e != "object" || e === null)
265
- return null;
266
- const t = e;
267
- if (typeof t.prefix != "string" || !e.icons || typeof e.icons != "object" || !ae(e, Bt))
268
- return null;
269
- const n = t.icons;
270
- for (const o in n) {
271
- const s = n[o];
272
- if (!o.match(G) || typeof s.body != "string" || !ae(
273
- s,
274
- de
275
- ))
276
- return null;
277
- }
278
- const r = t.aliases || /* @__PURE__ */ Object.create(null);
279
- for (const o in r) {
280
- const s = r[o], i = s.parent;
281
- if (!o.match(G) || typeof i != "string" || !n[i] && !r[i] || !ae(
282
- s,
283
- de
284
- ))
285
- return null;
286
- }
287
- return t;
288
- }
289
- const Pe = /* @__PURE__ */ Object.create(null);
290
- function Vt(e, t) {
291
- return {
292
- provider: e,
293
- prefix: t,
294
- icons: /* @__PURE__ */ Object.create(null),
295
- missing: /* @__PURE__ */ new Set()
296
- };
297
- }
298
- function F(e, t) {
299
- const n = Pe[e] || (Pe[e] = /* @__PURE__ */ Object.create(null));
300
- return n[t] || (n[t] = Vt(e, t));
301
- }
302
- function ve(e, t) {
303
- return Xe(t) ? Je(t, (n, r) => {
304
- r ? e.icons[n] = r : e.missing.add(n);
305
- }) : [];
306
- }
307
- function Dt(e, t, n) {
308
- try {
309
- if (typeof n.body == "string")
310
- return e.icons[t] = { ...n }, !0;
311
- } catch {
312
- }
313
- return !1;
314
- }
315
- let U = !1;
316
- function et(e) {
317
- return typeof e == "boolean" && (U = e), U;
318
- }
319
- function Nt(e) {
320
- const t = typeof e == "string" ? oe(e, !0, U) : e;
321
- if (t) {
322
- const n = F(t.provider, t.prefix), r = t.name;
323
- return n.icons[r] || (n.missing.has(r) ? null : void 0);
324
- }
325
- }
326
- function Gt(e, t) {
327
- const n = oe(e, !0, U);
328
- if (!n)
329
- return !1;
330
- const r = F(n.provider, n.prefix);
331
- return Dt(r, n.name, t);
332
- }
333
- function Ut(e, t) {
334
- if (typeof e != "object")
335
- return !1;
336
- if (typeof t != "string" && (t = e.provider || ""), U && !t && !e.prefix) {
337
- let o = !1;
338
- return Xe(e) && (e.prefix = "", Je(e, (s, i) => {
339
- i && Gt(s, i) && (o = !0);
340
- })), o;
341
- }
342
- const n = e.prefix;
343
- if (!Z({
344
- provider: t,
345
- prefix: n,
346
- name: "a"
347
- }))
348
- return !1;
349
- const r = F(t, n);
350
- return !!ve(r, e);
351
- }
352
- const tt = Object.freeze({
353
- width: null,
354
- height: null
355
- }), nt = Object.freeze({
356
- // Dimensions
357
- ...tt,
358
- // Transformations
359
- ...te
360
- }), Ht = /(-?[0-9.]*[0-9]+[0-9.]*)/g, Wt = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
361
- function ke(e, t, n) {
362
- if (t === 1)
363
- return e;
364
- if (n = n || 100, typeof e == "number")
365
- return Math.ceil(e * t * n) / n;
366
- if (typeof e != "string")
367
- return e;
368
- const r = e.split(Ht);
369
- if (r === null || !r.length)
370
- return e;
371
- const o = [];
372
- let s = r.shift(), i = Wt.test(s);
373
- for (; ; ) {
374
- if (i) {
375
- const a = parseFloat(s);
376
- isNaN(a) ? o.push(s) : o.push(Math.ceil(a * t * n) / n);
377
- } else
378
- o.push(s);
379
- if (s = r.shift(), s === void 0)
380
- return o.join("");
381
- i = !i;
382
- }
383
- }
384
- function qt(e, t = "defs") {
385
- let n = "";
386
- const r = e.indexOf("<" + t);
387
- for (; r >= 0; ) {
388
- const o = e.indexOf(">", r), s = e.indexOf("</" + t);
389
- if (o === -1 || s === -1)
390
- break;
391
- const i = e.indexOf(">", s);
392
- if (i === -1)
393
- break;
394
- n += e.slice(o + 1, s).trim(), e = e.slice(0, r).trim() + e.slice(i + 1);
395
- }
396
- return {
397
- defs: n,
398
- content: e
399
- };
400
- }
401
- function Qt(e, t) {
402
- return e ? "<defs>" + e + "</defs>" + t : t;
403
- }
404
- function Kt(e, t, n) {
405
- const r = qt(e);
406
- return Qt(r.defs, t + r.content + n);
407
- }
408
- const Yt = (e) => e === "unset" || e === "undefined" || e === "none";
409
- function Zt(e, t) {
410
- const n = {
411
- ...re,
412
- ...e
413
- }, r = {
414
- ...nt,
415
- ...t
416
- }, o = {
417
- left: n.left,
418
- top: n.top,
419
- width: n.width,
420
- height: n.height
421
- };
422
- let s = n.body;
423
- [n, r].forEach((v) => {
424
- const f = [], I = v.hFlip, L = v.vFlip;
425
- let S = v.rotate;
426
- I ? L ? S += 2 : (f.push(
427
- "translate(" + (o.width + o.left).toString() + " " + (0 - o.top).toString() + ")"
428
- ), f.push("scale(-1 1)"), o.top = o.left = 0) : L && (f.push(
429
- "translate(" + (0 - o.left).toString() + " " + (o.height + o.top).toString() + ")"
430
- ), f.push("scale(1 -1)"), o.top = o.left = 0);
431
- let m;
432
- switch (S < 0 && (S -= Math.floor(S / 4) * 4), S = S % 4, S) {
433
- case 1:
434
- m = o.height / 2 + o.top, f.unshift(
435
- "rotate(90 " + m.toString() + " " + m.toString() + ")"
436
- );
437
- break;
438
- case 2:
439
- f.unshift(
440
- "rotate(180 " + (o.width / 2 + o.left).toString() + " " + (o.height / 2 + o.top).toString() + ")"
441
- );
442
- break;
443
- case 3:
444
- m = o.width / 2 + o.left, f.unshift(
445
- "rotate(-90 " + m.toString() + " " + m.toString() + ")"
446
- );
447
- break;
448
- }
449
- S % 2 === 1 && (o.left !== o.top && (m = o.left, o.left = o.top, o.top = m), o.width !== o.height && (m = o.width, o.width = o.height, o.height = m)), f.length && (s = Kt(
450
- s,
451
- '<g transform="' + f.join(" ") + '">',
452
- "</g>"
453
- ));
454
- });
455
- const i = r.width, a = r.height, c = o.width, l = o.height;
456
- let u, p;
457
- i === null ? (p = a === null ? "1em" : a === "auto" ? l : a, u = ke(p, c / l)) : (u = i === "auto" ? c : i, p = a === null ? ke(u, l / c) : a === "auto" ? l : a);
458
- const y = {}, x = (v, f) => {
459
- Yt(f) || (y[v] = f.toString());
460
- };
461
- x("width", u), x("height", p);
462
- const C = [o.left, o.top, c, l];
463
- return y.viewBox = C.join(" "), {
464
- attributes: y,
465
- viewBox: C,
466
- body: s
467
- };
468
- }
469
- const Jt = /\sid="(\S+)"/g, Xt = "IconifyId" + Date.now().toString(16) + (Math.random() * 16777216 | 0).toString(16);
470
- let en = 0;
471
- function tn(e, t = Xt) {
472
- const n = [];
473
- let r;
474
- for (; r = Jt.exec(e); )
475
- n.push(r[1]);
476
- if (!n.length)
477
- return e;
478
- const o = "suffix" + (Math.random() * 16777216 | Date.now()).toString(16);
479
- return n.forEach((s) => {
480
- const i = typeof t == "function" ? t(s) : t + (en++).toString(), a = s.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
481
- e = e.replace(
482
- // Allowed characters before id: [#;"]
483
- // Allowed characters after id: [)"], .[a-z]
484
- new RegExp('([#;"])(' + a + ')([")]|\\.[a-z])', "g"),
485
- "$1" + i + o + "$3"
486
- );
487
- }), e = e.replace(new RegExp(o, "g"), ""), e;
488
- }
489
- const he = /* @__PURE__ */ Object.create(null);
490
- function nn(e, t) {
491
- he[e] = t;
492
- }
493
- function pe(e) {
494
- return he[e] || he[""];
495
- }
496
- function we(e) {
497
- let t;
498
- if (typeof e.resources == "string")
499
- t = [e.resources];
500
- else if (t = e.resources, !(t instanceof Array) || !t.length)
501
- return null;
502
- return {
503
- // API hosts
504
- resources: t,
505
- // Root path
506
- path: e.path || "/",
507
- // URL length limit
508
- maxURL: e.maxURL || 500,
509
- // Timeout before next host is used.
510
- rotate: e.rotate || 750,
511
- // Timeout before failing query.
512
- timeout: e.timeout || 5e3,
513
- // Randomise default API end point.
514
- random: e.random === !0,
515
- // Start index
516
- index: e.index || 0,
517
- // Receive data after time out (used if time out kicks in first, then API module sends data anyway).
518
- dataAfterTimeout: e.dataAfterTimeout !== !1
519
- };
520
- }
521
- const _e = /* @__PURE__ */ Object.create(null), D = [
522
- "https://api.simplesvg.com",
523
- "https://api.unisvg.com"
524
- ], J = [];
525
- for (; D.length > 0; )
526
- D.length === 1 || Math.random() > 0.5 ? J.push(D.shift()) : J.push(D.pop());
527
- _e[""] = we({
528
- resources: ["https://api.iconify.design"].concat(J)
529
- });
530
- function on(e, t) {
531
- const n = we(t);
532
- return n === null ? !1 : (_e[e] = n, !0);
533
- }
534
- function xe(e) {
535
- return _e[e];
122
+ function O(t, e) {
123
+ let r = V;
124
+ return typeof t == "string" && t.length > 0 ? r = u(t).mapState : e = t, i(e, r);
536
125
  }
537
- const rn = () => {
538
- let e;
539
- try {
540
- if (e = fetch, typeof e == "function")
541
- return e;
542
- } catch {
543
- }
544
- };
545
- let Ae = rn();
546
- function sn(e, t) {
547
- const n = xe(e);
548
- if (!n)
549
- return 0;
550
- let r;
551
- if (!n.maxURL)
552
- r = 0;
553
- else {
554
- let o = 0;
555
- n.resources.forEach((i) => {
556
- o = Math.max(o, i.length);
557
- });
558
- const s = t + ".json?icons=";
559
- r = n.maxURL - o - n.path.length - s.length;
560
- }
561
- return r;
562
- }
563
- function cn(e) {
564
- return e === 404;
126
+ function j(t, e) {
127
+ let r = A;
128
+ return typeof t == "string" && t.length > 0 ? r = u(t).mapGetters : e = t, i(e, r);
565
129
  }
566
- const an = (e, t, n) => {
567
- const r = [], o = sn(e, t), s = "icons";
568
- let i = {
569
- type: s,
570
- provider: e,
571
- prefix: t,
572
- icons: []
573
- }, a = 0;
574
- return n.forEach((c, l) => {
575
- a += c.length + 1, a >= o && l > 0 && (r.push(i), i = {
576
- type: s,
577
- provider: e,
578
- prefix: t,
579
- icons: []
580
- }, a = c.length), i.icons.push(c);
581
- }), r.push(i), r;
582
- };
583
- function ln(e) {
584
- if (typeof e == "string") {
585
- const t = xe(e);
586
- if (t)
587
- return t.path;
588
- }
589
- return "/";
130
+ function w(t, e) {
131
+ let r = x;
132
+ return typeof t == "string" && t.length > 0 ? r = u(t).mapMutations : e = t, Array.isArray(e), r(e);
590
133
  }
591
- const un = (e, t, n) => {
592
- if (!Ae) {
593
- n("abort", 424);
594
- return;
595
- }
596
- let r = ln(t.provider);
597
- switch (t.type) {
598
- case "icons": {
599
- const s = t.prefix, a = t.icons.join(","), c = new URLSearchParams({
600
- icons: a
601
- });
602
- r += s + ".json?" + c.toString();
603
- break;
604
- }
605
- case "custom": {
606
- const s = t.uri;
607
- r += s.slice(0, 1) === "/" ? s.slice(1) : s;
608
- break;
609
- }
610
- default:
611
- n("abort", 400);
612
- return;
613
- }
614
- let o = 503;
615
- Ae(e + r).then((s) => {
616
- const i = s.status;
617
- if (i !== 200) {
618
- setTimeout(() => {
619
- n(cn(i) ? "abort" : "next", i);
620
- });
621
- return;
622
- }
623
- return o = 501, s.json();
624
- }).then((s) => {
625
- if (typeof s != "object" || s === null) {
626
- setTimeout(() => {
627
- s === 404 ? n("abort", s) : n("next", o);
628
- });
629
- return;
630
- }
631
- setTimeout(() => {
632
- n("success", s);
633
- });
634
- }).catch(() => {
635
- n("next", o);
636
- });
637
- }, fn = {
638
- prepare: an,
639
- send: un
640
- };
641
- function dn(e) {
642
- const t = {
643
- loaded: [],
644
- missing: [],
645
- pending: []
646
- }, n = /* @__PURE__ */ Object.create(null);
647
- e.sort((o, s) => o.provider !== s.provider ? o.provider.localeCompare(s.provider) : o.prefix !== s.prefix ? o.prefix.localeCompare(s.prefix) : o.name.localeCompare(s.name));
648
- let r = {
649
- provider: "",
650
- prefix: "",
651
- name: ""
652
- };
653
- return e.forEach((o) => {
654
- if (r.name === o.name && r.prefix === o.prefix && r.provider === o.provider)
655
- return;
656
- r = o;
657
- const s = o.provider, i = o.prefix, a = o.name, c = n[s] || (n[s] = /* @__PURE__ */ Object.create(null)), l = c[i] || (c[i] = F(s, i));
658
- let u;
659
- a in l.icons ? u = t.loaded : i === "" || l.missing.has(a) ? u = t.missing : u = t.pending;
660
- const p = {
661
- provider: s,
662
- prefix: i,
663
- name: a
664
- };
665
- u.push(p);
666
- }), t;
134
+ function B(t, e) {
135
+ let r = E;
136
+ return typeof t == "string" && t.length > 0 ? r = u(t).mapActions : e = t, Array.isArray(e), r(e);
667
137
  }
668
- function ot(e, t) {
669
- e.forEach((n) => {
670
- const r = n.loaderCallbacks;
671
- r && (n.loaderCallbacks = r.filter((o) => o.id !== t));
672
- });
673
- }
674
- function hn(e) {
675
- e.pendingCallbacksFlag || (e.pendingCallbacksFlag = !0, setTimeout(() => {
676
- e.pendingCallbacksFlag = !1;
677
- const t = e.loaderCallbacks ? e.loaderCallbacks.slice(0) : [];
678
- if (!t.length)
679
- return;
680
- let n = !1;
681
- const r = e.provider, o = e.prefix;
682
- t.forEach((s) => {
683
- const i = s.icons, a = i.pending.length;
684
- i.pending = i.pending.filter((c) => {
685
- if (c.prefix !== o)
686
- return !0;
687
- const l = c.name;
688
- if (e.icons[l])
689
- i.loaded.push({
690
- provider: r,
691
- prefix: o,
692
- name: l
693
- });
694
- else if (e.missing.has(l))
695
- i.missing.push({
696
- provider: r,
697
- prefix: o,
698
- name: l
699
- });
700
- else
701
- return n = !0, !0;
702
- return !1;
703
- }), i.pending.length !== a && (n || ot([e], s.id), s.callback(
704
- i.loaded.slice(0),
705
- i.missing.slice(0),
706
- i.pending.slice(0),
707
- s.abort
708
- ));
709
- });
710
- }));
711
- }
712
- let pn = 0;
713
- function gn(e, t, n) {
714
- const r = pn++, o = ot.bind(null, n, r);
715
- if (!t.pending.length)
716
- return o;
717
- const s = {
718
- id: r,
719
- icons: t,
720
- callback: e,
721
- abort: o
722
- };
723
- return n.forEach((i) => {
724
- (i.loaderCallbacks || (i.loaderCallbacks = [])).push(s);
138
+ function i(t, e) {
139
+ const r = c(), o = {}, n = e(t);
140
+ return Object.keys(n).forEach((s) => {
141
+ const f = n[s].bind({ $store: r });
142
+ o[s] = C(f);
725
143
  }), o;
726
144
  }
727
- function mn(e, t = !0, n = !1) {
728
- const r = [];
729
- return e.forEach((o) => {
730
- const s = typeof o == "string" ? oe(o, t, n) : o;
731
- s && r.push(s);
732
- }), r;
733
- }
734
- var yn = {
735
- resources: [],
736
- index: 0,
737
- timeout: 2e3,
738
- rotate: 750,
739
- random: !1,
740
- dataAfterTimeout: !1
741
- };
742
- function bn(e, t, n, r) {
743
- const o = e.resources.length, s = e.random ? Math.floor(Math.random() * o) : e.index;
744
- let i;
745
- if (e.random) {
746
- let g = e.resources.slice(0);
747
- for (i = []; g.length > 1; ) {
748
- const O = Math.floor(Math.random() * g.length);
749
- i.push(g[O]), g = g.slice(0, O).concat(g.slice(O + 1));
750
- }
751
- i = i.concat(g);
752
- } else
753
- i = e.resources.slice(s).concat(e.resources.slice(0, s));
754
- const a = Date.now();
755
- let c = "pending", l = 0, u, p = null, y = [], x = [];
756
- typeof r == "function" && x.push(r);
757
- function C() {
758
- p && (clearTimeout(p), p = null);
759
- }
760
- function v() {
761
- c === "pending" && (c = "aborted"), C(), y.forEach((g) => {
762
- g.status === "pending" && (g.status = "aborted");
763
- }), y = [];
764
- }
765
- function f(g, O) {
766
- O && (x = []), typeof g == "function" && x.push(g);
767
- }
768
- function I() {
769
- return {
770
- startTime: a,
771
- payload: t,
772
- status: c,
773
- queriesSent: l,
774
- queriesPending: y.length,
775
- subscribe: f,
776
- abort: v
777
- };
778
- }
779
- function L() {
780
- c = "failed", x.forEach((g) => {
781
- g(void 0, u);
782
- });
783
- }
784
- function S() {
785
- y.forEach((g) => {
786
- g.status === "pending" && (g.status = "aborted");
787
- }), y = [];
788
- }
789
- function m(g, O, V) {
790
- const q = O !== "success";
791
- switch (y = y.filter((T) => T !== g), c) {
792
- case "pending":
793
- break;
794
- case "failed":
795
- if (q || !e.dataAfterTimeout)
796
- return;
797
- break;
798
- default:
799
- return;
800
- }
801
- if (O === "abort") {
802
- u = V, L();
803
- return;
804
- }
805
- if (q) {
806
- u = V, y.length || (i.length ? j() : L());
807
- return;
808
- }
809
- if (C(), S(), !e.random) {
810
- const T = e.resources.indexOf(g.resource);
811
- T !== -1 && T !== e.index && (e.index = T);
812
- }
813
- c = "completed", x.forEach((T) => {
814
- T(V);
815
- });
816
- }
817
- function j() {
818
- if (c !== "pending")
819
- return;
820
- C();
821
- const g = i.shift();
822
- if (g === void 0) {
823
- if (y.length) {
824
- p = setTimeout(() => {
825
- C(), c === "pending" && (S(), L());
826
- }, e.timeout);
827
- return;
828
- }
829
- L();
830
- return;
831
- }
832
- const O = {
833
- status: "pending",
834
- resource: g,
835
- callback: (V, q) => {
836
- m(O, V, q);
837
- }
838
- };
839
- y.push(O), l++, p = setTimeout(j, e.rotate), n(g, t, O.callback);
840
- }
841
- return setTimeout(j), I;
842
- }
843
- function rt(e) {
844
- const t = {
845
- ...yn,
846
- ...e
847
- };
848
- let n = [];
849
- function r() {
850
- n = n.filter((a) => a().status === "pending");
851
- }
852
- function o(a, c, l) {
853
- const u = bn(
854
- t,
855
- a,
856
- c,
857
- (p, y) => {
858
- r(), l && l(p, y);
859
- }
860
- );
861
- return n.push(u), u;
862
- }
863
- function s(a) {
864
- return n.find((c) => a(c)) || null;
865
- }
866
- return {
867
- query: o,
868
- find: s,
869
- setIndex: (a) => {
870
- t.index = a;
871
- },
872
- getIndex: () => t.index,
873
- cleanup: r
874
- };
875
- }
876
- function Me() {
877
- }
878
- const le = /* @__PURE__ */ Object.create(null);
879
- function vn(e) {
880
- if (!le[e]) {
881
- const t = xe(e);
882
- if (!t)
883
- return;
884
- const n = rt(t), r = {
885
- config: t,
886
- redundancy: n
887
- };
888
- le[e] = r;
889
- }
890
- return le[e];
891
- }
892
- function wn(e, t, n) {
893
- let r, o;
894
- if (typeof e == "string") {
895
- const s = pe(e);
896
- if (!s)
897
- return n(void 0, 424), Me;
898
- o = s.send;
899
- const i = vn(e);
900
- i && (r = i.redundancy);
901
- } else {
902
- const s = we(e);
903
- if (s) {
904
- r = rt(s);
905
- const i = e.resources ? e.resources[0] : "", a = pe(i);
906
- a && (o = a.send);
907
- }
908
- }
909
- return !r || !o ? (n(void 0, 424), Me) : r.query(t, o, n)().abort;
910
- }
911
- const Ee = "iconify2", H = "iconify", st = H + "-count", Le = H + "-version", it = 36e5, _n = 168, xn = 50;
912
- function ge(e, t) {
913
- try {
914
- return e.getItem(t);
915
- } catch {
916
- }
917
- }
918
- function Se(e, t, n) {
919
- try {
920
- return e.setItem(t, n), !0;
921
- } catch {
922
- }
923
- }
924
- function Te(e, t) {
925
- try {
926
- e.removeItem(t);
927
- } catch {
928
- }
929
- }
930
- function me(e, t) {
931
- return Se(e, st, t.toString());
932
- }
933
- function ye(e) {
934
- return parseInt(ge(e, st)) || 0;
935
- }
936
- const se = {
937
- local: !0,
938
- session: !0
939
- }, ct = {
940
- local: /* @__PURE__ */ new Set(),
941
- session: /* @__PURE__ */ new Set()
942
- };
943
- let Ce = !1;
944
- function Sn(e) {
945
- Ce = e;
946
- }
947
- let Q = typeof window > "u" ? {} : window;
948
- function at(e) {
949
- const t = e + "Storage";
950
- try {
951
- if (Q && Q[t] && typeof Q[t].length == "number")
952
- return Q[t];
953
- } catch {
954
- }
955
- se[e] = !1;
956
- }
957
- function lt(e, t) {
958
- const n = at(e);
959
- if (!n)
960
- return;
961
- const r = ge(n, Le);
962
- if (r !== Ee) {
963
- if (r) {
964
- const a = ye(n);
965
- for (let c = 0; c < a; c++)
966
- Te(n, H + c.toString());
967
- }
968
- Se(n, Le, Ee), me(n, 0);
969
- return;
970
- }
971
- const o = Math.floor(Date.now() / it) - _n, s = (a) => {
972
- const c = H + a.toString(), l = ge(n, c);
973
- if (typeof l == "string") {
974
- try {
975
- const u = JSON.parse(l);
976
- if (typeof u == "object" && typeof u.cached == "number" && u.cached > o && typeof u.provider == "string" && typeof u.data == "object" && typeof u.data.prefix == "string" && // Valid item: run callback
977
- t(u, a))
978
- return !0;
979
- } catch {
980
- }
981
- Te(n, c);
982
- }
983
- };
984
- let i = ye(n);
985
- for (let a = i - 1; a >= 0; a--)
986
- s(a) || (a === i - 1 ? (i--, me(n, i)) : ct[e].add(a));
987
- }
988
- function ut() {
989
- if (!Ce) {
990
- Sn(!0);
991
- for (const e in se)
992
- lt(e, (t) => {
993
- const n = t.data, r = t.provider, o = n.prefix, s = F(
994
- r,
995
- o
996
- );
997
- if (!ve(s, n).length)
998
- return !1;
999
- const i = n.lastModified || -1;
1000
- return s.lastModifiedCached = s.lastModifiedCached ? Math.min(s.lastModifiedCached, i) : i, !0;
1001
- });
1002
- }
1003
- }
1004
- function Cn(e, t) {
1005
- const n = e.lastModifiedCached;
1006
- if (
1007
- // Matches or newer
1008
- n && n >= t
1009
- )
1010
- return n === t;
1011
- if (e.lastModifiedCached = t, n)
1012
- for (const r in se)
1013
- lt(r, (o) => {
1014
- const s = o.data;
1015
- return o.provider !== e.provider || s.prefix !== e.prefix || s.lastModified === t;
1016
- });
1017
- return !0;
1018
- }
1019
- function In(e, t) {
1020
- Ce || ut();
1021
- function n(r) {
1022
- let o;
1023
- if (!se[r] || !(o = at(r)))
1024
- return;
1025
- const s = ct[r];
1026
- let i;
1027
- if (s.size)
1028
- s.delete(i = Array.from(s).shift());
1029
- else if (i = ye(o), i >= xn || !me(o, i + 1))
1030
- return;
1031
- const a = {
1032
- cached: Math.floor(Date.now() / it),
1033
- provider: e.provider,
1034
- data: t
1035
- };
1036
- return Se(
1037
- o,
1038
- H + i.toString(),
1039
- JSON.stringify(a)
1040
- );
1041
- }
1042
- t.lastModified && !Cn(e, t.lastModified) || Object.keys(t.icons).length && (t.not_found && (t = Object.assign({}, t), delete t.not_found), n("local") || n("session"));
1043
- }
1044
- function Fe() {
1045
- }
1046
- function On(e) {
1047
- e.iconsLoaderFlag || (e.iconsLoaderFlag = !0, setTimeout(() => {
1048
- e.iconsLoaderFlag = !1, hn(e);
1049
- }));
1050
- }
1051
- function Pn(e, t) {
1052
- e.iconsToLoad ? e.iconsToLoad = e.iconsToLoad.concat(t).sort() : e.iconsToLoad = t, e.iconsQueueFlag || (e.iconsQueueFlag = !0, setTimeout(() => {
1053
- e.iconsQueueFlag = !1;
1054
- const { provider: n, prefix: r } = e, o = e.iconsToLoad;
1055
- delete e.iconsToLoad;
1056
- let s;
1057
- if (!o || !(s = pe(n)))
1058
- return;
1059
- s.prepare(n, r, o).forEach((a) => {
1060
- wn(n, a, (c) => {
1061
- if (typeof c != "object")
1062
- a.icons.forEach((l) => {
1063
- e.missing.add(l);
1064
- });
1065
- else
1066
- try {
1067
- const l = ve(
1068
- e,
1069
- c
1070
- );
1071
- if (!l.length)
1072
- return;
1073
- const u = e.pendingIcons;
1074
- u && l.forEach((p) => {
1075
- u.delete(p);
1076
- }), In(e, c);
1077
- } catch (l) {
1078
- console.error(l);
1079
- }
1080
- On(e);
1081
- });
1082
- });
1083
- }));
1084
- }
1085
- const kn = (e, t) => {
1086
- const n = mn(e, !0, et()), r = dn(n);
1087
- if (!r.pending.length) {
1088
- let c = !0;
1089
- return t && setTimeout(() => {
1090
- c && t(
1091
- r.loaded,
1092
- r.missing,
1093
- r.pending,
1094
- Fe
1095
- );
1096
- }), () => {
1097
- c = !1;
1098
- };
1099
- }
1100
- const o = /* @__PURE__ */ Object.create(null), s = [];
1101
- let i, a;
1102
- return r.pending.forEach((c) => {
1103
- const { provider: l, prefix: u } = c;
1104
- if (u === a && l === i)
1105
- return;
1106
- i = l, a = u, s.push(F(l, u));
1107
- const p = o[l] || (o[l] = /* @__PURE__ */ Object.create(null));
1108
- p[u] || (p[u] = []);
1109
- }), r.pending.forEach((c) => {
1110
- const { provider: l, prefix: u, name: p } = c, y = F(l, u), x = y.pendingIcons || (y.pendingIcons = /* @__PURE__ */ new Set());
1111
- x.has(p) || (x.add(p), o[l][u].push(p));
1112
- }), s.forEach((c) => {
1113
- const { provider: l, prefix: u } = c;
1114
- o[l][u].length && Pn(c, o[l][u]);
1115
- }), t ? gn(t, r, s) : Fe;
1116
- };
1117
- function An(e, t) {
1118
- const n = {
1119
- ...e
1120
- };
1121
- for (const r in t) {
1122
- const o = t[r], s = typeof o;
1123
- r in tt ? (o === null || o && (s === "string" || s === "number")) && (n[r] = o) : s === typeof n[r] && (n[r] = r === "rotate" ? o % 4 : o);
1124
- }
1125
- return n;
1126
- }
1127
- const Mn = /[\s,]+/;
1128
- function En(e, t) {
1129
- t.split(Mn).forEach((n) => {
1130
- switch (n.trim()) {
1131
- case "horizontal":
1132
- e.hFlip = !0;
1133
- break;
1134
- case "vertical":
1135
- e.vFlip = !0;
1136
- break;
1137
- }
1138
- });
1139
- }
1140
- function Ln(e, t = 0) {
1141
- const n = e.replace(/^-?[0-9.]*/, "");
1142
- function r(o) {
1143
- for (; o < 0; )
1144
- o += 4;
1145
- return o % 4;
1146
- }
1147
- if (n === "") {
1148
- const o = parseInt(e);
1149
- return isNaN(o) ? 0 : r(o);
1150
- } else if (n !== e) {
1151
- let o = 0;
1152
- switch (n) {
1153
- case "%":
1154
- o = 25;
1155
- break;
1156
- case "deg":
1157
- o = 90;
1158
- }
1159
- if (o) {
1160
- let s = parseFloat(e.slice(0, e.length - n.length));
1161
- return isNaN(s) ? 0 : (s = s / o, s % 1 === 0 ? r(s) : 0);
1162
- }
1163
- }
1164
- return t;
1165
- }
1166
- function Tn(e, t) {
1167
- let n = e.indexOf("xlink:") === -1 ? "" : ' xmlns:xlink="http://www.w3.org/1999/xlink"';
1168
- for (const r in t)
1169
- n += " " + r + '="' + t[r] + '"';
1170
- return '<svg xmlns="http://www.w3.org/2000/svg"' + n + ">" + e + "</svg>";
1171
- }
1172
- function Fn(e) {
1173
- return e.replace(/"/g, "'").replace(/%/g, "%25").replace(/#/g, "%23").replace(/</g, "%3C").replace(/>/g, "%3E").replace(/\s+/g, " ");
1174
- }
1175
- function Rn(e) {
1176
- return "data:image/svg+xml," + Fn(e);
1177
- }
1178
- function jn(e) {
1179
- return 'url("' + Rn(e) + '")';
1180
- }
1181
- const Re = {
1182
- ...nt,
1183
- inline: !1
1184
- }, $n = {
1185
- xmlns: "http://www.w3.org/2000/svg",
1186
- "xmlns:xlink": "http://www.w3.org/1999/xlink",
1187
- "aria-hidden": !0,
1188
- role: "img"
1189
- }, zn = {
1190
- display: "inline-block"
1191
- }, be = {
1192
- backgroundColor: "currentColor"
1193
- }, ft = {
1194
- backgroundColor: "transparent"
1195
- }, je = {
1196
- Image: "var(--svg)",
1197
- Repeat: "no-repeat",
1198
- Size: "100% 100%"
1199
- }, $e = {
1200
- webkitMask: be,
1201
- mask: be,
1202
- background: ft
1203
- };
1204
- for (const e in $e) {
1205
- const t = $e[e];
1206
- for (const n in je)
1207
- t[e + n] = je[n];
1208
- }
1209
- const X = {};
1210
- ["horizontal", "vertical"].forEach((e) => {
1211
- const t = e.slice(0, 1) + "Flip";
1212
- X[e + "-flip"] = t, X[e.slice(0, 1) + "-flip"] = t, X[e + "Flip"] = t;
1213
- });
1214
- function ze(e) {
1215
- return e + (e.match(/^[-0-9.]+$/) ? "px" : "");
1216
- }
1217
- const Be = (e, t) => {
1218
- const n = An(Re, t), r = { ...$n }, o = t.mode || "svg", s = {}, i = t.style, a = typeof i == "object" && !(i instanceof Array) ? i : {};
1219
- for (let v in t) {
1220
- const f = t[v];
1221
- if (f !== void 0)
1222
- switch (v) {
1223
- case "icon":
1224
- case "style":
1225
- case "onLoad":
1226
- case "mode":
1227
- break;
1228
- case "inline":
1229
- case "hFlip":
1230
- case "vFlip":
1231
- n[v] = f === !0 || f === "true" || f === 1;
1232
- break;
1233
- case "flip":
1234
- typeof f == "string" && En(n, f);
1235
- break;
1236
- case "color":
1237
- s.color = f;
1238
- break;
1239
- case "rotate":
1240
- typeof f == "string" ? n[v] = Ln(f) : typeof f == "number" && (n[v] = f);
1241
- break;
1242
- case "ariaHidden":
1243
- case "aria-hidden":
1244
- f !== !0 && f !== "true" && delete r["aria-hidden"];
1245
- break;
1246
- default: {
1247
- const I = X[v];
1248
- I ? (f === !0 || f === "true" || f === 1) && (n[I] = !0) : Re[v] === void 0 && (r[v] = f);
1249
- }
1250
- }
1251
- }
1252
- const c = Zt(e, n), l = c.attributes;
1253
- if (n.inline && (s.verticalAlign = "-0.125em"), o === "svg") {
1254
- r.style = {
1255
- ...s,
1256
- ...a
1257
- }, Object.assign(r, l);
1258
- let v = 0, f = t.id;
1259
- return typeof f == "string" && (f = f.replace(/-/g, "_")), r.innerHTML = tn(c.body, f ? () => f + "ID" + v++ : "iconifyVue"), Ie("svg", r);
1260
- }
1261
- const { body: u, width: p, height: y } = e, x = o === "mask" || (o === "bg" ? !1 : u.indexOf("currentColor") !== -1), C = Tn(u, {
1262
- ...l,
1263
- width: p + "",
1264
- height: y + ""
1265
- });
1266
- return r.style = {
1267
- ...s,
1268
- "--svg": jn(C),
1269
- width: ze(l.width),
1270
- height: ze(l.height),
1271
- ...zn,
1272
- ...x ? be : ft,
1273
- ...a
1274
- }, Ie("span", r);
1275
- };
1276
- et(!0);
1277
- nn("", fn);
1278
- if (typeof document < "u" && typeof window < "u") {
1279
- ut();
1280
- const e = window;
1281
- if (e.IconifyPreload !== void 0) {
1282
- const t = e.IconifyPreload, n = "Invalid IconifyPreload syntax.";
1283
- typeof t == "object" && t !== null && (t instanceof Array ? t : [t]).forEach((r) => {
1284
- try {
1285
- // Check if item is an object and not null/array
1286
- (typeof r != "object" || r === null || r instanceof Array || // Check for 'icons' and 'prefix'
1287
- typeof r.icons != "object" || typeof r.prefix != "string" || // Add icon set
1288
- !Ut(r)) && console.error(n);
1289
- } catch {
1290
- console.error(n);
1291
- }
1292
- });
1293
- }
1294
- if (e.IconifyProviders !== void 0) {
1295
- const t = e.IconifyProviders;
1296
- if (typeof t == "object" && t !== null)
1297
- for (let n in t) {
1298
- const r = "IconifyProviders[" + n + "] is invalid.";
1299
- try {
1300
- const o = t[n];
1301
- if (typeof o != "object" || !o || o.resources === void 0)
1302
- continue;
1303
- on(n, o) || console.error(r);
1304
- } catch {
1305
- console.error(r);
1306
- }
1307
- }
1308
- }
1309
- }
1310
- const Bn = {
1311
- ...re,
1312
- body: ""
1313
- }, Vn = R({
1314
- // Do not inherit other attributes: it is handled by render()
1315
- inheritAttrs: !1,
1316
- // Set initial data
1317
- data() {
1318
- return {
1319
- // Current icon name
1320
- _name: "",
1321
- // Loading
1322
- _loadingIcon: null,
1323
- // Mounted status
1324
- iconMounted: !1,
1325
- // Callback counter to trigger re-render
1326
- counter: 0
1327
- };
1328
- },
1329
- mounted() {
1330
- this.iconMounted = !0;
1331
- },
1332
- unmounted() {
1333
- this.abortLoading();
1334
- },
1335
- methods: {
1336
- abortLoading() {
1337
- this._loadingIcon && (this._loadingIcon.abort(), this._loadingIcon = null);
1338
- },
1339
- // Get data for icon to render or null
1340
- getIcon(e, t) {
1341
- if (typeof e == "object" && e !== null && typeof e.body == "string")
1342
- return this._name = "", this.abortLoading(), {
1343
- data: e
1344
- };
1345
- let n;
1346
- if (typeof e != "string" || (n = oe(e, !1, !0)) === null)
1347
- return this.abortLoading(), null;
1348
- const r = Nt(n);
1349
- if (!r)
1350
- return (!this._loadingIcon || this._loadingIcon.name !== e) && (this.abortLoading(), this._name = "", r !== null && (this._loadingIcon = {
1351
- name: e,
1352
- abort: kn([n], () => {
1353
- this.counter++;
1354
- })
1355
- })), null;
1356
- this.abortLoading(), this._name !== e && (this._name = e, t && t(e));
1357
- const o = ["iconify"];
1358
- return n.prefix !== "" && o.push("iconify--" + n.prefix), n.provider !== "" && o.push("iconify--" + n.provider), { data: r, classes: o };
1359
- }
1360
- },
1361
- // Render icon
1362
- render() {
1363
- this.counter;
1364
- const e = this.$attrs, t = this.iconMounted || e.ssr ? this.getIcon(e.icon, e.onLoad) : null;
1365
- if (!t)
1366
- return Be(Bn, e);
1367
- let n = e;
1368
- return t.classes && (n = {
1369
- ...e,
1370
- class: (typeof e.class == "string" ? e.class + " " : "") + t.classes.join(" ")
1371
- }), Be({
1372
- ...re,
1373
- ...t.data
1374
- }, n);
1375
- }
1376
- });
1377
- function dt() {
1378
- return typeof window < "u" ? window : typeof global < "u" ? global : this || {};
1379
- }
1380
- let Ve;
1381
- try {
1382
- Ve = Map;
1383
- } catch {
1384
- Ve = function() {
1385
- };
1386
- }
1387
- let De;
1388
- try {
1389
- De = Set;
1390
- } catch {
1391
- De = function() {
1392
- };
1393
- }
1394
- function Dn(e, t) {
1395
- if (e = parseFloat(e), isNaN(e)) {
1396
- if (typeof t == "number")
1397
- return t;
1398
- throw new Error(`parseNumber(${e}) isNaN!`);
1399
- }
1400
- return e;
1401
- }
1402
- const _ = (e, t, n) => e < t ? t : e > n ? n : e;
1403
- function Nn(e, t = 12) {
1404
- return Dn(e).toFixed(t);
1405
- }
1406
- function Gn(e, t = 12) {
1407
- return +Nn(e, t);
1408
- }
1409
- Un();
1410
- function Un() {
1411
- const e = new ArrayBuffer(4), t = new Float32Array(e), n = new Uint32Array(e), r = new Uint32Array(512), o = new Uint32Array(512);
1412
- for (let c = 0; c < 256; ++c) {
1413
- const l = c - 127;
1414
- l < -27 ? (r[c] = 0, r[c | 256] = 32768, o[c] = 24, o[c | 256] = 24) : l < -14 ? (r[c] = 1024 >> -l - 14, r[c | 256] = 1024 >> -l - 14 | 32768, o[c] = -l - 1, o[c | 256] = -l - 1) : l <= 15 ? (r[c] = l + 15 << 10, r[c | 256] = l + 15 << 10 | 32768, o[c] = 13, o[c | 256] = 13) : l < 128 ? (r[c] = 31744, r[c | 256] = 64512, o[c] = 24, o[c | 256] = 24) : (r[c] = 31744, r[c | 256] = 64512, o[c] = 13, o[c | 256] = 13);
1415
- }
1416
- const s = new Uint32Array(2048), i = new Uint32Array(64), a = new Uint32Array(64);
1417
- for (let c = 1; c < 1024; ++c) {
1418
- let l = c << 13, u = 0;
1419
- for (; !(l & 8388608); )
1420
- l <<= 1, u -= 8388608;
1421
- l &= -8388609, u += 947912704, s[c] = l | u;
1422
- }
1423
- for (let c = 1024; c < 2048; ++c)
1424
- s[c] = 939524096 + (c - 1024 << 13);
1425
- for (let c = 1; c < 31; ++c)
1426
- i[c] = c << 23;
1427
- i[31] = 1199570944, i[32] = 2147483648;
1428
- for (let c = 33; c < 63; ++c)
1429
- i[c] = 2147483648 + (c - 32 << 23);
1430
- i[63] = 3347054592;
1431
- for (let c = 1; c < 64; ++c)
1432
- c !== 32 && (a[c] = 1024);
1433
- return {
1434
- floatView: t,
1435
- uint32View: n,
1436
- baseTable: r,
1437
- shiftTable: o,
1438
- mantissaTable: s,
1439
- exponentTable: i,
1440
- offsetTable: a
1441
- };
1442
- }
1443
- function Hn(e, t) {
1444
- let n = !0;
1445
- return function(...r) {
1446
- n && (n = !1, e.apply(this, r), setTimeout(() => {
1447
- n = !0;
1448
- }, t));
1449
- };
1450
- }
1451
- class Wn {
1452
- events;
1453
- constructor() {
1454
- this.events = {};
1455
- }
1456
- on(t, n) {
1457
- return this.events[t] || (this.events[t] = []), this.events[t].push(n), this;
1458
- }
1459
- addListener(t, n) {
1460
- return this.on(t, n), this;
1461
- }
1462
- prependListener(t, n) {
1463
- return this.events[t] || (this.events[t] = []), this.events[t].unshift(n), this;
1464
- }
1465
- removeListener(t, n) {
1466
- if (this.events[t])
1467
- return this.events[t] = this.events[t].filter((r) => r !== n), this;
1468
- }
1469
- off(t, n) {
1470
- return this.removeListener(t, n), this;
1471
- }
1472
- removeAllListeners(t) {
1473
- return t ? this.events[t] = [] : this.events = {}, this;
1474
- }
1475
- emit(t, ...n) {
1476
- return this.events[t] && this.events[t].forEach((r) => {
1477
- r(...n);
1478
- }), this;
1479
- }
1480
- once(t, n) {
1481
- const o = (() => {
1482
- let s = !1;
1483
- return (...i) => {
1484
- s || (s = !0, n(...i), this.off(t, o));
1485
- };
1486
- })();
1487
- return this.on(t, o), this;
1488
- }
1489
- }
1490
- function qn(e) {
1491
- let t = !1;
1492
- return function(...n) {
1493
- if (!t)
1494
- return t = !0, e.apply(this, n);
1495
- };
1496
- }
1497
- Array.prototype.ap = function(e) {
1498
- return this.reduce((t, n) => t.concat(e.map(n)), []);
1499
- };
1500
- class Qn {
1501
- subscribers = /* @__PURE__ */ new Set();
1502
- add() {
1503
- }
1504
- notify() {
1505
- this.subscribers.forEach((t) => t());
1506
- }
1507
- }
1508
- const Ne = /* @__PURE__ */ new WeakMap();
1509
- function ee(e, t) {
1510
- let n = Ne.get(e);
1511
- n || (n = /* @__PURE__ */ new Map(), Ne.set(e, n));
1512
- let r = n.get(t);
1513
- return r || (r = new Qn(), n.set(t, r)), r;
1514
- }
1515
- function Kn(e, t = !1) {
1516
- return Object.keys(e).forEach((n) => {
1517
- let r = e[n];
1518
- if (t && typeof r == "object" && r !== null)
1519
- e[n] = ht(r, t);
1520
- else {
1521
- const o = ee(e, n);
1522
- Object.defineProperty(e, n, {
1523
- configurable: !0,
1524
- // 是否可删除、可配置
1525
- enumerable: !0,
1526
- // 是否可枚举
1527
- // 数据描述符
1528
- // value : 默认为 undefined
1529
- // writable : 是否可读写
1530
- // 存取描述符
1531
- get() {
1532
- return o.add(), r;
1533
- },
1534
- set(s) {
1535
- r != s && (r = s, o.notify());
1536
- }
1537
- });
1538
- }
1539
- }), e;
1540
- }
1541
- function ie(e, t = !1) {
1542
- return Kn({ value: e }, t);
1543
- }
1544
- function ht(e, t = !1) {
1545
- const n = {
1546
- // 拦截对象属性的读取
1547
- // target 目标对象、key 键值、receiver 当前proxy实例
1548
- get(o, s, i) {
1549
- const a = Reflect.get(o, s, i);
1550
- if (t && typeof a == "object" && a !== null && !("isYZReactiveProxy" in a)) {
1551
- const l = ht(a, t);
1552
- l.YZReactiveProxyParentTarget = o, l.YZReactiveProxyParentKey = s, Reflect.set(i, s, l);
1553
- }
1554
- return ee(o, s).add(), Reflect.get(o, s, i);
1555
- },
1556
- // 拦截对象属性的设置
1557
- // target 目标对象、key 键值、value 值、receiver 当前proxy实例
1558
- set(o, s, i, a) {
1559
- const c = Reflect.get(o, s, a), l = Reflect.set(o, s, i, a);
1560
- return Array.isArray(o) ? ee(
1561
- o.YZReactiveProxyParentTarget,
1562
- o.YZReactiveProxyParentKey
1563
- ).notify() : c != i && ee(o, s).notify(), l;
1564
- },
1565
- // 拦截 `key in proxy` 的操作,返回一个布尔值
1566
- has(o, s) {
1567
- return s === "isYZReactiveProxy" || s in o;
1568
- }
1569
- // 拦截 `delete proxy[key]` 的操作,返回一个布尔值
1570
- // deleteProperty(target, key) {
1571
- // return true;
1572
- // },
1573
- // 拦截 `Object.keys(proxy)`、`for...in` 等循环,返回一个数组
1574
- // ownKeys(target) {
1575
- // return [];
1576
- // },
1577
- // 拦截 `Object.getOwnPropertyDescriptor(proxy, key)`,返回属性的描述对象
1578
- // getOwnPropertyDescriptor(target, key) {
1579
- // return {};
1580
- // },
1581
- // 拦截 `Object.defineProperty(proxy, key, desc`,返回一个布尔值
1582
- // defineProperty(target, key, desc) {
1583
- // return true;
1584
- // },
1585
- // 拦截 `Object.preventExtensions(proxy)`,返回一个布尔值
1586
- // preventExtensions(target) {
1587
- // return true;
1588
- // },
1589
- // 拦截 `Object.getPrototypeOf(proxy)`,返回一个对象
1590
- // getPrototypeOf(target) {
1591
- // return {};
1592
- // },
1593
- // 拦截 `Object.isExtensible(proxy)`,返回一个布尔值
1594
- // isExtensible(target) {
1595
- // return true;
1596
- // },
1597
- // 拦截 `Object.setPrototypeOf(proxy, proto)`,返回一个布尔值
1598
- // setPrototypeOf(target, proto) {
1599
- // return true;
1600
- // },
1601
- // 拦截 Proxy 实例作为函数调用的操作
1602
- // apply(target, thisArg, args) {
1603
- // return target.apply(thisArg, args);
1604
- // }
1605
- // 拦截 Proxy 实例作为构造函数调用的操作
1606
- // construct(target, args) {
1607
- // return {};
1608
- // }
1609
- };
1610
- return new Proxy(e, n);
1611
- }
1612
- let Ge;
1613
- try {
1614
- Ge = Promise;
1615
- } catch {
1616
- Ge = function() {
1617
- };
1618
- }
1619
- const E = (e, t, n) => {
1620
- const r = async (o) => {
1621
- await n(o);
1622
- };
1623
- return e.addEventListener(t, r, !1), () => {
1624
- e.removeEventListener(t, r, !1);
1625
- };
1626
- };
1627
- function Yn() {
1628
- const e = new Wn();
1629
- return {
1630
- on: (t, n) => {
1631
- e.on(t, n);
1632
- },
1633
- off: (t, n) => {
1634
- e.off(t, n);
1635
- },
1636
- emit: (t, ...n) => {
1637
- e.emit(t, ...n);
1638
- }
1639
- };
1640
- }
1641
- const h = Yn();
1642
- let Ue = "";
1643
- const Zn = new MutationObserver((e, t) => {
1644
- location.href !== Ue && (Ue = location.href, h.emit("urlchange", location.href));
1645
- });
1646
- Zn.observe(document, {
1647
- attributes: !0,
1648
- childList: !0,
1649
- subtree: !0
1650
- });
1651
- E(window, "hashchange", () => {
1652
- h.emit("hashchange", location.hash);
1653
- });
1654
- E(window, "popstate", (e) => {
1655
- h.emit("popstate", e.state);
1656
- });
1657
- E(
1658
- window,
1659
- "orientationchange" in window ? "orientationchange" : "resize",
1660
- (e) => {
1661
- const t = e.target.innerWidth, n = e.target.innerHeight;
1662
- h.emit("windowresize", t, n);
1663
- }
1664
- );
1665
- let pt = !1;
1666
- E(window, "load", () => {
1667
- h.emit("load"), pt = !0;
1668
- });
1669
- E(window, "beforeunload", (e) => {
1670
- h.emit("beforeunload", e);
1671
- });
1672
- E(window, "pagehide", (e) => {
1673
- h.emit("pagehide", e);
1674
- });
1675
- E(window, "focus", (e) => {
1676
- h.emit("focus", e);
1677
- });
1678
- E(window, "blur", (e) => {
1679
- h.emit("blur", e);
1680
- });
1681
- E(window, "visibilitychange", (e) => {
1682
- document.hidden ? h.emit("windowhidden", e) : h.emit("windowvisible", e);
1683
- });
1684
- const Jn = {
1685
- getSelectedText: () => window.getSelection()?.toString() || "",
1686
- isTabInView: () => !document.hidden,
1687
- onurlchange: (e) => (h.on("urlchange", e), () => {
1688
- h.off("urlchange", e);
1689
- }),
1690
- onhashchange: (e) => (h.on("hashchange", e), () => {
1691
- h.off("hashchange", e);
1692
- }),
1693
- onpopstate: (e) => (h.on("popstate", e), () => {
1694
- h.off("popstate", e);
1695
- }),
1696
- // pushstate("/home?name=xxx")
1697
- pushstate: (e, t = null) => {
1698
- history.pushState(t, "", e);
1699
- },
1700
- replacestate: (e, t = null) => {
1701
- history.replaceState(t, "", e);
1702
- },
1703
- onwindowresize: (e) => (h.on("windowresize", e), () => {
1704
- h.off("windowresize", e);
1705
- }),
1706
- onload: (e) => {
1707
- const t = qn(e);
1708
- return h.on("load", t), pt && t(), () => {
1709
- h.off("load", t);
1710
- };
1711
- },
1712
- onbeforeunload: (e) => (h.on("beforeunload", e), () => {
1713
- h.off("beforeunload", e);
1714
- }),
1715
- onpagehide: (e) => (h.on("pagehide", e), () => {
1716
- h.off("pagehide", e);
1717
- }),
1718
- onfocus: (e) => (h.on("focus", e), () => {
1719
- h.off("focus", e);
1720
- }),
1721
- onblur: (e) => (h.on("blur", e), () => {
1722
- h.off("blur", e);
1723
- }),
1724
- onwindowvisible: (e) => (h.on("windowvisible", e), () => {
1725
- h.off("windowvisible", e);
1726
- }),
1727
- onwindowhidden: (e) => (h.on("windowhidden", e), () => {
1728
- h.off("windowhidden", e);
1729
- })
1730
- }, Xn = () => {
1731
- const e = navigator.userAgent.toLowerCase();
1732
- let t = "Unknown";
1733
- return /iphone|ipad|ipod/i.test(e) ? t = "iOS" : /android/i.test(e) ? t = "Android" : /BlackBerry/i.test(e) ? t = "BlackBerry" : /mac/i.test(e) ? t = "macOS" : /win/i.test(e) ? t = "Windows" : /linux/i.test(e) ? t = "Linux" : /bsd/i.test(e) && (t = "BSD"), t.toLowerCase();
1734
- };
1735
- function eo(e = navigator.userAgent) {
1736
- let t = "Unknown";
1737
- if (/iPhone|iPad|iPod/i.test(e)) {
1738
- const n = e.match(/OS (\d+_\d+)/i);
1739
- n && (t = n[1].replace("_", "."));
1740
- } else if (/Android/i.test(e)) {
1741
- const n = e.match(/Android (\d+\.\d+)/i);
1742
- n && (t = n[1]);
1743
- } else if (/Mac OS X/i.test(e)) {
1744
- const n = e.match(/Mac OS X (\d+_\d+)/i);
1745
- n && (t = n[1].replace("_", "."));
1746
- } else if (/Windows NT/i.test(e)) {
1747
- const n = e.match(/Windows NT (\d+\.\d+)/i);
1748
- n && (t = n[1]);
1749
- }
1750
- return t.toLowerCase();
1751
- }
1752
- function to(e, t) {
1753
- const n = e.split("."), r = t.split(".");
1754
- for (let o = 0, s = n.length; o < s; o++) {
1755
- if (r.length == o)
1756
- return 1;
1757
- if (n[o] != r[o])
1758
- return n[o] > r[o] ? 1 : -1;
1759
- }
1760
- return n.length != r.length ? -1 : 0;
1761
- }
1762
- function no() {
1763
- return Xn() === "ios";
1764
- }
1765
- function oo() {
1766
- const e = window.navigator.userAgent, t = e.indexOf("MSIE ");
1767
- if (t > 0)
1768
- return parseInt(e.substring(t + 5, e.indexOf(".", t)), 10);
1769
- if (e.indexOf("Trident/") > 0) {
1770
- const o = e.indexOf("rv:");
1771
- return parseInt(e.substring(o + 3, e.indexOf(".", o)), 10);
1772
- }
1773
- const r = e.indexOf("Edge/");
1774
- return r > 0 ? parseInt(e.substring(r + 5, e.indexOf(".", r)), 10) : -1;
1775
- }
1776
- oo();
1777
- (() => {
1778
- const e = dt();
1779
- return !!(e.Worker && e.Blob && e.Promise && e.OffscreenCanvas && e.OffscreenCanvasRenderingContext2D && e.HTMLCanvasElement && e.HTMLCanvasElement.prototype.transferControlToOffscreen && e.URL && e.URL.createObjectURL);
1780
- })();
1781
- (function() {
1782
- if (!dt().OffscreenCanvas)
1783
- return !1;
1784
- const t = new OffscreenCanvas(1, 1), n = t.getContext("2d");
1785
- n.fillRect(0, 0, 1, 1);
1786
- const r = t.transferToImageBitmap();
1787
- try {
1788
- n.createPattern(r, "no-repeat");
1789
- } catch {
1790
- return !1;
1791
- }
1792
- return !0;
1793
- })();
1794
- function He(e, t) {
1795
- let n;
1796
- if (typeof t == "string") {
1797
- const o = document.querySelector(t)?.shadowRoot;
1798
- o ? n = o : n = document.querySelector(t);
1799
- } else
1800
- n = t || document.getElementsByTagName("head")[0];
1801
- const r = document.createElement("style");
1802
- if (r.innerHTML = e, n)
1803
- return n.appendChild(r), () => {
1804
- (n instanceof HTMLElement || n instanceof ShadowRoot) && n.removeChild(r);
1805
- };
1806
- {
1807
- const o = document.styleSheets[0].insertRule(e);
1808
- return () => {
1809
- document.styleSheets[0].deleteRule(o);
1810
- };
1811
- }
1812
- }
1813
- no() && to(eo(), "11.2") < 0 ? He(`
1814
- :root {
1815
- /* iOS < 11.2 */
1816
- --sat: constant(safe-area-inset-top);
1817
- --sar: constant(safe-area-inset-right);
1818
- --sab: constant(safe-area-inset-bottom);
1819
- --sal: constant(safe-area-inset-left);
1820
- }
1821
- `) : He(`
1822
- :root {
1823
- /* iOS > 11.2 */
1824
- --sat: env(safe-area-inset-top);
1825
- --sar: env(safe-area-inset-right);
1826
- --sab: env(safe-area-inset-bottom);
1827
- --sal: env(safe-area-inset-left);
1828
- }
1829
- `);
1830
- const gt = ie("0px"), mt = ie("0px"), yt = ie("0px"), bt = ie("0px");
1831
- Jn.onload(() => {
1832
- const e = getComputedStyle(document.documentElement);
1833
- gt.value = e.getPropertyValue("--sat"), mt.value = e.getPropertyValue("--sar"), yt.value = e.getPropertyValue("--sab"), bt.value = e.getPropertyValue("--sal");
1834
- });
1835
- const ro = {
1836
- top: () => gt.value,
1837
- right: () => mt.value,
1838
- bottom: () => yt.value,
1839
- left: () => bt.value
1840
- }, so = getComputedStyle(document.documentElement);
1841
- function d(e) {
1842
- return so.getPropertyValue(e);
1843
- }
1844
- const A = {
1845
- colorPrimary: d("--color-primary") || "#5A82F0",
1846
- colorRed: d("--color-red") || "#ff5050",
1847
- colorOrange: d("--color-orange") || "#fa8c00",
1848
- colorYellow: d("--color-yellow") || "#fadc32",
1849
- colorGreen: d("--color-green") || "#00c878",
1850
- colorBlue: d("--color-blue") || "#00b4fa",
1851
- colorPurple: d("--color-purple") || "#6464fa",
1852
- colorBlack: d("--color-black") || "#001428",
1853
- colorGray00: d("--color-gray-00") || "#000000",
1854
- colorGray33: d("--color-gray-33") || "#333333",
1855
- colorGray66: d("--color-gray-66") || "#666666",
1856
- colorGray99: d("--color-gray-99") || "#999999",
1857
- colorGrayCC: d("--color-gray-cc") || "#cccccc",
1858
- colorGrayDD: d("--color-gray-dd") || "#dddddd",
1859
- colorGrayE6: d("--color-gray-e6") || "#e6e6e6",
1860
- colorGrayEE: d("--color-gray-ee") || "#eeeeee",
1861
- colorGrayEF: d("--color-gray-ef") || "#efefef",
1862
- colorGrayF5: d("--color-gray-f5") || "#f5f5f5",
1863
- colorGrayFF: d("--color-gray-ff") || "#ffffff",
1864
- fontLineHeight: d("--font-line-height") || "1.4",
1865
- fontSize32: d("--font-size-32") || "32px",
1866
- fontSize24: d("--font-size-24") || "24px",
1867
- fontSize22: d("--font-size-22") || "22px",
1868
- fontSize20: d("--font-size-20") || "20px",
1869
- fontSize18: d("--font-size-18") || "18px",
1870
- fontSize16: d("--font-size-16") || "16px",
1871
- fontSize14: d("--font-size-14") || "14px",
1872
- fontSize12: d("--font-size-12") || "12px",
1873
- fontSize10: d("--font-size-10") || "10px",
1874
- d4: d("--distance-4") || "4px",
1875
- /// borderRadius
1876
- d8: d("--distance-8") || "8px",
1877
- d12: d("--distance-12") || "12px",
1878
- d16: d("--distance-16") || "16px",
1879
- d20: d("--distance-20") || "20px",
1880
- d32: d("--distance-32") || "32px",
1881
- d40: d("--distance-40") || "40px",
1882
- d44: d("--distance-44") || "44px"
1883
- /// button-height
1884
- };
1885
- class P {
1886
- __color = {
1887
- r: 0,
1888
- // 0 - 255
1889
- g: 0,
1890
- // 0 - 255
1891
- b: 0,
1892
- // 0 - 255
1893
- a: 1
1894
- // 0 - 1
1895
- };
1896
- constructor(t, n) {
1897
- t && this.setColor(t), typeof n == "number" && this.setAlpha(n);
1898
- }
1899
- get color() {
1900
- return this.__color;
1901
- }
1902
- set color(t) {
1903
- this.__color = ue(t);
1904
- }
1905
- setColor(t) {
1906
- return this.color = t, this;
1907
- }
1908
- get r() {
1909
- return this.__color.r;
1910
- }
1911
- set r(t) {
1912
- this.__color.r = _(Math.round(t), 0, 255);
1913
- }
1914
- get g() {
1915
- return this.__color.g;
1916
- }
1917
- set g(t) {
1918
- this.__color.g = _(Math.round(t), 0, 255);
1919
- }
1920
- get b() {
1921
- return this.__color.b;
1922
- }
1923
- set b(t) {
1924
- this.__color.b = _(Math.round(t), 0, 255);
1925
- }
1926
- get a() {
1927
- return this.__color.a;
1928
- }
1929
- set a(t) {
1930
- this.__color.a = _(t, 0, 1);
1931
- }
1932
- setAlpha(t) {
1933
- return this.a = t, this;
1934
- }
1935
- setRGB(t, n, r) {
1936
- return this.r = t, this.g = n, this.b = r, this;
1937
- }
1938
- setRGBA(t, n, r, o) {
1939
- return this.r = t, this.g = n, this.b = r, this.a = o, this;
1940
- }
1941
- get hex() {
1942
- return (this.r << 16) + (this.g << 8) + this.b;
1943
- }
1944
- toString() {
1945
- if (this.a === 1) {
1946
- const t = "000000" + this.hex.toString(16);
1947
- return "#" + t.slice(t.length - 6);
1948
- } else
1949
- return `rgba(${this.r},${this.g},${this.b},${Gn(this.a, 6)})`;
1950
- }
1951
- clone() {
1952
- return new P(this.color);
1953
- }
1954
- copy(t) {
1955
- this.setColor(t.color);
1956
- }
1957
- opposite(t = !1, n = "#000000", r = "#ffffff") {
1958
- if (t)
1959
- return new P(
1960
- this.r * 0.299 + this.g * 0.587 + this.b * 0.114 > 186 ? n : r
1961
- );
1962
- {
1963
- const o = this.clone();
1964
- return o.r = 255 - o.r, o.g = 255 - o.g, o.b = 255 - o.b, o;
1965
- }
1966
- }
1967
- /// t: 0 ~ 1
1968
- lighten(t) {
1969
- t = _(Math.abs(t), 0, 1);
1970
- let { r: n, g: r, b: o } = this.color;
1971
- return n += (255 - n) * t, r += (255 - r) * t, o += (255 - o) * t, new P().setRGBA(n, r, o, this.color.a);
1972
- }
1973
- /// t: 0 ~ 1
1974
- darken(t) {
1975
- t = _(Math.abs(t), 0, 1);
1976
- let { r: n, g: r, b: o } = this.color;
1977
- return n = n * (1 - t), r = r * (1 - t), o = o * (1 - t), new P().setRGBA(n, r, o, this.color.a);
1978
- }
1979
- // 渐变色
1980
- static gradient(t, n, r) {
1981
- try {
1982
- const o = ue(t), s = ue(n);
1983
- return new P().setRGB(
1984
- (s.r - o.r) * r + o.r,
1985
- (s.g - o.g) * r + o.g,
1986
- (s.b - o.b) * r + o.b
1987
- );
1988
- } catch {
1989
- return new P(n);
1990
- }
1991
- }
1992
- static random() {
1993
- return new P(Math.random() * 16777215);
1994
- }
1995
- get hsv() {
1996
- const { r: t, g: n, b: r, a: o } = this.color, s = Math.max(t, n, r), i = Math.min(t, n, r), a = s - i;
1997
- let c;
1998
- return t === s ? c = (n - r) / a : n === s ? c = 2 + (r - t) / a : c = 4 + (t - n) / a, c /= 6, c < 0 && (c += 1), {
1999
- h: a == 0 ? 0 : c * 360,
2000
- s: s === 0 ? 0 : a / s,
2001
- v: s / 255,
2002
- a: o
2003
- };
2004
- }
2005
- set h(t) {
2006
- const n = this.hsv;
2007
- n.h = _(t, 0, 360), this.setColor(n);
2008
- }
2009
- get h() {
2010
- return this.hsv.h;
2011
- }
2012
- set s(t) {
2013
- const n = this.hsv;
2014
- n.s = _(t, 0, 1), this.setColor(n);
2015
- }
2016
- get s() {
2017
- return this.hsv.s;
2018
- }
2019
- set v(t) {
2020
- const n = this.hsv;
2021
- n.v = _(t, 0, 1), this.setColor(n);
2022
- }
2023
- get v() {
2024
- return this.hsv.v;
2025
- }
2026
- }
2027
- function K(e, t) {
2028
- return new P(e, t);
2029
- }
2030
- function ue(e) {
2031
- const t = Object.prototype.hasOwnProperty.call(e, "a") ? _(e.a, 0, 1) : 1;
2032
- if (Object.prototype.hasOwnProperty.call(e, "r") && Object.prototype.hasOwnProperty.call(e, "g") && Object.prototype.hasOwnProperty.call(e, "b"))
2033
- return e.r = _(Math.round(e.r), 0, 255), e.g = _(Math.round(e.g), 0, 255), e.b = _(Math.round(e.b), 0, 255), e.a = t, e;
2034
- if (Object.prototype.hasOwnProperty.call(e, "h") && Object.prototype.hasOwnProperty.call(e, "s") && Object.prototype.hasOwnProperty.call(e, "v")) {
2035
- const r = _(e.h, 0, 360), o = _(e.s, 0, 1), s = _(e.v, 0, 1), i = Math.floor(r / 60) % 6, a = r / 60 - Math.floor(r / 60), c = s * (1 - o), l = s * (1 - a * o), u = s * (1 - (1 - a) * o), p = [
2036
- [s, u, c],
2037
- [l, s, c],
2038
- [c, s, u],
2039
- [c, l, s],
2040
- [u, c, s],
2041
- [s, c, l]
2042
- ][i];
2043
- return {
2044
- r: Math.round(p[0] * 255),
2045
- g: Math.round(p[1] * 255),
2046
- b: Math.round(p[2] * 255),
2047
- a: t
2048
- };
2049
- }
2050
- const n = {
2051
- r: 0,
2052
- g: 0,
2053
- b: 0,
2054
- a: t
2055
- };
2056
- if (typeof e == "number")
2057
- e < Math.pow(2, 24) ? (n.r = e >> 16 & 255, n.g = e >> 8 & 255, n.b = e & 255) : (n.r = e >> 24 & 255, n.g = e >> 16 & 255, n.b = e >> 8 & 255, n.a = (e & 255) / 255);
2058
- else if (typeof e == "string") {
2059
- const r = /rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,?\s*(\d?\.?\d*)?\s*\)/gi.exec(
2060
- e
2061
- );
2062
- if (r)
2063
- n.r = parseInt(r[1]), n.g = parseInt(r[2]), n.b = parseInt(r[3]), r[4] && (n.a = parseFloat(r[4]));
2064
- else {
2065
- let o = e.match(/^#([A-F0-9])([A-F0-9])([A-F0-9])$/i);
2066
- o ? (n.r = parseInt(`${o[1]}${o[1]}`, 16), n.g = parseInt(`${o[2]}${o[2]}`, 16), n.b = parseInt(`${o[3]}${o[3]}`, 16)) : (o = e.match(/^#([A-F0-9]{2})([A-F0-9]{2})([A-F0-9]{2})$/i), o ? (n.r = parseInt(o[1], 16), n.g = parseInt(o[2], 16), n.b = parseInt(o[3], 16)) : (o = e.match(
2067
- /^#([A-F0-9]{2})([A-F0-9]{2})([A-F0-9]{2})([A-F0-9]{2})$/i
2068
- ), o ? (n.r = parseInt(o[1], 16), n.g = parseInt(o[2], 16), n.b = parseInt(o[3], 16), n.a = parseInt(o[4], 16) / 255) : e === "none" && (n.a = 0)));
2069
- }
2070
- } else
2071
- throw new Error("parseColor 不支持的颜色解析:" + e);
2072
- return n.r = _(n.r, 0, 255), n.g = _(n.g, 0, 255), n.b = _(n.b, 0, 255), n.a = _(n.a, 0, 1), n;
2073
- }
2074
- const z = {
2075
- backgroundColor: "#1a1a1a",
2076
- numberColor: "#2FA1D6",
2077
- booleanColor: "#806787",
2078
- stringColor: "#1ed36f",
2079
- functionColor: "#e61d5f",
2080
- saveRowColor: "#dad5cb",
2081
- buttonColor: "",
2082
- borderColor: "",
2083
- inputColor: ""
2084
- };
2085
- z.buttonColor = new P(z.saveRowColor).darken(0.1).toString();
2086
- z.borderColor = new P(
2087
- z.backgroundColor
2088
- ).lighten(0.07).toString();
2089
- z.inputColor = new P(
2090
- z.backgroundColor
2091
- ).lighten(0.085).toString();
2092
- function io(e) {
2093
- const t = document.documentElement, n = window.top === window.self ? window.devicePixelRatio : 1;
2094
- t.dataset.dpr = n;
2095
- let r = 100;
2096
- const o = function() {
2097
- const s = Math.min(t.clientWidth, e);
2098
- t.dataset.width = s, t.dataset.rem = r = Math.round(100 * (s / e)), t.style.fontSize = r + "px";
2099
- };
2100
- o(), window.rem2px = function(s) {
2101
- return s = parseFloat(s), s * r;
2102
- }, window.px2rem = function(s) {
2103
- return s = parseFloat(s), s / r;
2104
- }, window.addEventListener && window.addEventListener(
2105
- "orientationchange" in window ? "orientationchange" : "resize",
2106
- o,
2107
- !1
2108
- );
2109
- }
2110
- const co = /* @__PURE__ */ R({
2111
- __name: "Icon",
2112
- props: {
2113
- icon: { default: "mdi-light:home" },
2114
- color: { default: A.colorPrimary }
2115
- },
2116
- setup(e) {
2117
- const t = e;
2118
- return (n, r) => (M(), $("span", {
2119
- class: "icon",
2120
- style: w(["color: " + n.color])
2121
- }, [
2122
- W(N(Vn), {
2123
- icon: t.icon,
2124
- color: n.color
2125
- }, null, 8, ["icon", "color"])
2126
- ], 4));
2127
- }
2128
- });
2129
- const B = (e, t) => {
2130
- const n = e.__vccOpts || e;
2131
- for (const [r, o] of t)
2132
- n[r] = o;
2133
- return n;
2134
- }, We = /* @__PURE__ */ B(co, [["__scopeId", "data-v-3f9d90d2"]]), ao = {
2135
- class: "loading-11",
2136
- ref: "loading11"
2137
- }, lo = { class: "container container-1" }, uo = { class: "container container-2" }, fo = { class: "container container-3" }, ho = /* @__PURE__ */ R({
2138
- __name: "Loading11",
2139
- props: {
2140
- color: { default: A.colorPrimary },
2141
- width: { default: "0.8em" }
2142
- },
2143
- setup(e) {
2144
- const t = e;
2145
- return (n, r) => (M(), $("div", ao, [
2146
- b("div", {
2147
- class: "loading-11-inner",
2148
- style: w({ width: t.width, height: t.width })
2149
- }, [
2150
- b("div", lo, [
2151
- b("div", {
2152
- class: "dot dot-1",
2153
- style: w({ backgroundColor: t.color })
2154
- }, null, 4),
2155
- b("div", {
2156
- class: "dot dot-2",
2157
- style: w({ backgroundColor: t.color })
2158
- }, null, 4),
2159
- b("div", {
2160
- class: "dot dot-3",
2161
- style: w({ backgroundColor: t.color })
2162
- }, null, 4),
2163
- b("div", {
2164
- class: "dot dot-4",
2165
- style: w({ backgroundColor: t.color })
2166
- }, null, 4)
2167
- ]),
2168
- b("div", uo, [
2169
- b("div", {
2170
- class: "dot dot-1",
2171
- style: w({ backgroundColor: t.color })
2172
- }, null, 4),
2173
- b("div", {
2174
- class: "dot dot-2",
2175
- style: w({ backgroundColor: t.color })
2176
- }, null, 4),
2177
- b("div", {
2178
- class: "dot dot-3",
2179
- style: w({ backgroundColor: t.color })
2180
- }, null, 4),
2181
- b("div", {
2182
- class: "dot dot-4",
2183
- style: w({ backgroundColor: t.color })
2184
- }, null, 4)
2185
- ]),
2186
- b("div", fo, [
2187
- b("div", {
2188
- class: "dot dot-1",
2189
- style: w({ backgroundColor: t.color })
2190
- }, null, 4),
2191
- b("div", {
2192
- class: "dot dot-2",
2193
- style: w({ backgroundColor: t.color })
2194
- }, null, 4),
2195
- b("div", {
2196
- class: "dot dot-3",
2197
- style: w({ backgroundColor: t.color })
2198
- }, null, 4),
2199
- b("div", {
2200
- class: "dot dot-4",
2201
- style: w({ backgroundColor: t.color })
2202
- }, null, 4)
2203
- ])
2204
- ], 4)
2205
- ], 512));
2206
- }
2207
- });
2208
- const qe = /* @__PURE__ */ B(ho, [["__scopeId", "data-v-f95fac77"]]), po = {
2209
- key: 0,
2210
- class: "loading"
2211
- }, go = /* @__PURE__ */ R({
2212
- customOptions: { Loading11: qe },
2213
- inheritAttrs: !0,
2214
- __name: "Button",
2215
- props: {
2216
- label: {},
2217
- icon: {},
2218
- iconPosition: { default: "left" },
2219
- disabled: { type: Boolean, default: !1 },
2220
- width: { default: "auto" },
2221
- height: { default: "44px" },
2222
- padding: { default: "20px" },
2223
- fontSize: { default: "14px" },
2224
- borderRadius: { default: "4px" },
2225
- stylePattern: { default: "fullfilled" },
2226
- borderColor: {},
2227
- bgColor: {},
2228
- fontColor: {},
2229
- asyncClick: {}
2230
- },
2231
- emits: ["yz-click", "click"],
2232
- setup(e, { expose: t, emit: n }) {
2233
- const r = e, o = n, s = k(), i = k(r.borderColor), a = k(r.bgColor), c = k(r.fontColor), l = k(r.borderColor), u = k(r.bgColor);
2234
- function p(m) {
2235
- switch (m) {
2236
- case "outline":
2237
- i.value = r.borderColor ?? A.colorPrimary, a.value = r.bgColor ?? A.colorGrayFF, c.value = r.fontColor ?? A.colorPrimary, l.value = i.value, u.value = a.value;
2238
- break;
2239
- case "fullfilled":
2240
- default:
2241
- i.value = r.borderColor ?? A.colorPrimary, a.value = r.bgColor ?? A.colorPrimary, c.value = r.fontColor ?? A.colorGrayFF, l.value = i.value, u.value = a.value;
2242
- break;
2243
- }
2244
- }
2245
- Ot(
2246
- () => r.stylePattern,
2247
- () => {
2248
- p(r.stylePattern);
2249
- },
2250
- { immediate: !0 }
2251
- );
2252
- const y = k(r.disabled ? "0.6" : "1"), x = k(r.disabled ? "not-allowed" : "pointer");
2253
- let C = !1;
2254
- const v = () => {
2255
- r.disabled || (C = !0, i.value = K(l.value).lighten(0.05).toString(), a.value = K(u.value).lighten(0.05).toString());
2256
- }, f = () => {
2257
- r.disabled || (C = !1, i.value = l.value, a.value = u.value);
2258
- }, I = k(!1), S = Hn(() => {
2259
- r.disabled || I.value || (i.value = K(l.value).darken(0.05).toString(), a.value = K(u.value).darken(0.05).toString(), setTimeout(() => {
2260
- C ? v() : f();
2261
- }, 150), o("yz-click"), o("click"), r.asyncClick && (I.value = !0, r.asyncClick().then(() => {
2262
- I.value = !1;
2263
- }).catch(() => {
2264
- I.value = !1;
2265
- })));
2266
- }, 500);
2267
- return t({ el: s }), (m, j) => (M(), $("div", {
2268
- ref_key: "el",
2269
- ref: s,
2270
- class: "button",
2271
- style: w([
2272
- `opacity: ${y.value}`,
2273
- `border: 1px solid ${i.value}`,
2274
- `background-color: ${a.value}`,
2275
- `color: ${c.value}`,
2276
- `border-radius: ${r.borderRadius}`,
2277
- `width: ${r.width}`,
2278
- `height: ${r.height}`,
2279
- `line-height: ${r.height}`,
2280
- `font-size: ${r.fontSize}`,
2281
- `cursor: ${x.value}`,
2282
- "user-select: none"
2283
- ]),
2284
- onMouseover: v,
2285
- onMouseleave: f,
2286
- onClick: j[0] || (j[0] = //@ts-ignore
2287
- (...g) => N(S) && N(S)(...g))
2288
- }, [
2289
- b("label", {
2290
- class: "label truncate",
2291
- style: w({
2292
- padding: "0 " + m.padding,
2293
- cursor: x.value
2294
- })
2295
- }, [
2296
- I.value ? (M(), $("div", po, [
2297
- W(qe, { color: c.value }, null, 8, ["color"])
2298
- ])) : ce("", !0),
2299
- Y(m.$slots, "default", {}, () => [
2300
- m.icon && m.iconPosition === "left" ? (M(), fe(We, {
2301
- key: 0,
2302
- icon: m.icon,
2303
- color: c.value,
2304
- style: w({
2305
- marginRight: N(A).d4,
2306
- cursor: x.value
2307
- })
2308
- }, null, 8, ["icon", "color", "style"])) : ce("", !0),
2309
- b("span", {
2310
- style: w({
2311
- cursor: x.value
2312
- })
2313
- }, Pt(m.label), 5),
2314
- m.icon && m.iconPosition === "right" ? (M(), fe(We, {
2315
- key: 1,
2316
- icon: m.icon,
2317
- color: c.value,
2318
- style: w({
2319
- marginLeft: N(A).d4,
2320
- cursor: x.value
2321
- })
2322
- }, null, 8, ["icon", "color", "style"])) : ce("", !0)
2323
- ], !0)
2324
- ], 4)
2325
- ], 36));
2326
- }
2327
- });
2328
- const vt = /* @__PURE__ */ B(go, [["__scopeId", "data-v-999537e3"]]), Do = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2329
- __proto__: null,
2330
- default: vt
2331
- }, Symbol.toStringTag, { value: "Module" }));
2332
- const mo = { class: "page" }, yo = { class: "header" }, bo = { class: "main" }, vo = { class: "main-scroll" }, wo = { class: "footer" }, _o = /* @__PURE__ */ R({
2333
- customOptions: {},
2334
- inheritAttrs: !0,
2335
- __name: "LayoutMobile",
2336
- props: {
2337
- designWidth: { default: 750 }
2338
- },
2339
- setup(e, { expose: t, emit: n }) {
2340
- return io(e.designWidth), t({}), (o, s) => (M(), $("div", mo, [
2341
- b("header", yo, [
2342
- Y(o.$slots, "header", {}, void 0, !0)
2343
- ]),
2344
- b("div", bo, [
2345
- b("div", vo, [
2346
- Y(o.$slots, "default", {}, void 0, !0)
2347
- ])
2348
- ]),
2349
- b("footer", wo, [
2350
- Y(o.$slots, "footer", {}, void 0, !0)
2351
- ])
2352
- ]));
2353
- }
2354
- });
2355
- const wt = /* @__PURE__ */ B(_o, [["__scopeId", "data-v-8b6ffbe1"]]), No = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2356
- __proto__: null,
2357
- default: wt
2358
- }, Symbol.toStringTag, { value: "Module" })), xo = { class: "xg-footer-inner" }, So = /* @__PURE__ */ R({
2359
- __name: "Footer",
2360
- setup(e) {
2361
- const t = k("0px");
2362
- return Qe(() => {
2363
- t.value = ro.bottom();
2364
- }), (n, r) => (M(), $("div", {
2365
- class: "xg-footer",
2366
- style: w({ paddingBottom: t.value })
2367
- }, [
2368
- b("div", xo, [
2369
- W(vt, {
2370
- label: "去支付",
2371
- width: "100%"
2372
- })
2373
- ])
2374
- ], 4));
2375
- }
2376
- });
2377
- const _t = /* @__PURE__ */ B(So, [["__scopeId", "data-v-b845cb28"]]), Go = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2378
- __proto__: null,
2379
- default: _t
2380
- }, Symbol.toStringTag, { value: "Module" })), Co = /* @__PURE__ */ R({
2381
- __name: "Lot",
2382
- setup(e) {
2383
- return (t, n) => (M(), fe(wt, { class: "xg" }, {
2384
- footer: kt(() => [
2385
- W(_t)
2386
- ]),
2387
- _: 1
2388
- }));
2389
- }
2390
- });
2391
- const Io = /* @__PURE__ */ B(Co, [["__scopeId", "data-v-79c30c04"]]), Uo = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2392
- __proto__: null,
2393
- default: Io
2394
- }, Symbol.toStringTag, { value: "Module" }));
2395
145
  export {
2396
- Do as Button,
2397
- Fo as DECREMENT,
2398
- Go as Footer,
2399
- To as INCREMENT,
2400
- Ro as INCREMENTACTION,
2401
- No as LayoutMobile,
2402
- Uo as Lot,
2403
- Ao as getInstance,
2404
- Rt as getVNode,
2405
- Mo as renderComponent,
2406
- Eo as useVueEffect,
2407
- Lo as useVueRouter,
2408
- jo as useVuex,
2409
- Vo as useVuexActions,
2410
- zo as useVuexGetters,
2411
- Bo as useVuexMutations,
2412
- $o as useVuexStates
146
+ G as DECREMENT,
147
+ _ as INCREMENT,
148
+ q as INCREMENTACTION,
149
+ I as getInstance,
150
+ v as getVNode,
151
+ b as renderComponent,
152
+ S as useVueEffect,
153
+ T as useVueRouter,
154
+ H as useVuex,
155
+ B as useVuexActions,
156
+ j as useVuexGetters,
157
+ w as useVuexMutations,
158
+ O as useVuexStates
2413
159
  };
2414
160
  //# sourceMappingURL=zyzgroup_core_vue.js.map