xto-fronted 0.4.95 → 0.4.97

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.
@@ -0,0 +1,4285 @@
1
+ import { ref as P, computed as j, watch as Xe, defineComponent as Ae, resolveComponent as Pt, openBlock as y, createBlock as ie, unref as k, withCtx as X, createElementBlock as E, Fragment as me, renderList as we, createElementVNode as s, toDisplayString as G, createCommentVNode as le, normalizeClass as ye, withDirectives as lt, vShow as es, createVNode as R, createTextVNode as Fe, onMounted as wt, onUnmounted as yt, vModelText as kt, Transition as Ve, withModifiers as it, normalizeStyle as Ye, reactive as bt, createStaticVNode as nt, withKeys as ts, h as ss } from "vue";
2
+ import { defineStore as Je } from "pinia";
3
+ import { useRoute as qe, useRouter as ze, createRouter as xt, createWebHistory as Ct } from "vue-router";
4
+ import { SubMenu as _t, MenuItem as He, Menu as Nt, Tabs as ns, TabPane as os } from "@xto/navigation";
5
+ import { Icon as ee, Button as je } from "@xto/base";
6
+ import { Drawer as St, Message as Ie } from "@xto/feedback";
7
+ import { Form as rs, FormItem as mt, Input as Ot, Checkbox as as } from "@xto/form";
8
+ import ls from "axios";
9
+ import { createLocaleProvider as is, getSupportedLocales as cs, useLocale as us } from "@xto/core/locale";
10
+ const ot = P(""), rt = P(""), at = P("");
11
+ function ds(n) {
12
+ n.appId && (ot.value = n.appId), n.clientId && (rt.value = n.clientId), n.apiBaseUrl && (at.value = n.apiBaseUrl);
13
+ }
14
+ function ct() {
15
+ if (ot.value)
16
+ return ot.value;
17
+ try {
18
+ return "";
19
+ } catch {
20
+ return "";
21
+ }
22
+ }
23
+ function Rt() {
24
+ if (rt.value)
25
+ return rt.value;
26
+ try {
27
+ return "";
28
+ } catch {
29
+ return "";
30
+ }
31
+ }
32
+ function fs() {
33
+ if (at.value)
34
+ return at.value;
35
+ try {
36
+ return "";
37
+ } catch {
38
+ return "";
39
+ }
40
+ }
41
+ const Ha = {
42
+ appId: ot,
43
+ clientId: rt,
44
+ apiBaseUrl: at
45
+ }, Ke = "xto_", zt = (n) => ({
46
+ get(d) {
47
+ const h = n.getItem(Ke + d);
48
+ if (!h) return null;
49
+ try {
50
+ return JSON.parse(h);
51
+ } catch {
52
+ return h;
53
+ }
54
+ },
55
+ set(d, h) {
56
+ if (h == null) {
57
+ n.removeItem(Ke + d);
58
+ return;
59
+ }
60
+ const p = typeof h == "string" ? h : JSON.stringify(h);
61
+ n.setItem(Ke + d, p);
62
+ },
63
+ remove(d) {
64
+ n.removeItem(Ke + d);
65
+ },
66
+ clear() {
67
+ Object.keys(n).forEach((h) => {
68
+ h.startsWith(Ke) && n.removeItem(h);
69
+ });
70
+ }
71
+ }), et = zt(window.localStorage), tt = zt(window.sessionStorage), q = {
72
+ get: et.get,
73
+ set: et.set,
74
+ remove: et.remove,
75
+ clear: et.clear
76
+ }, Wa = {
77
+ get: tt.get,
78
+ set: tt.set,
79
+ remove: tt.remove,
80
+ clear: tt.clear
81
+ }, De = Je("app", () => {
82
+ const n = P(q.get("appName") || "XTO App"), d = P(q.get("indexPath") || "/dashboard"), h = P(q.get("isDark") || !1), p = P(q.get("theme") || "light"), v = P(q.get("layout") || "sidebar"), _ = P(q.get("isCollapsed") || !1), N = P(q.get("showTabs") ?? !0), g = P(q.get("showFooter") ?? !0), L = P(q.get("showBreadcrumb") ?? !0), w = P(q.get("primaryColor") || "#409eff"), x = P([]), M = P([]), C = j(() => h.value ? "dark" : "light"), K = (z) => {
83
+ n.value = z, q.set("appName", z);
84
+ }, J = (z) => {
85
+ d.value = z, q.set("indexPath", z);
86
+ }, T = () => {
87
+ h.value = !h.value, p.value = h.value ? "dark" : "light", V();
88
+ }, O = (z) => {
89
+ p.value = z, h.value = z === "dark", V();
90
+ }, V = () => {
91
+ const z = document.documentElement;
92
+ h.value ? z.classList.add("dark") : z.classList.remove("dark"), q.set("isDark", h.value), q.set("theme", p.value);
93
+ }, I = () => {
94
+ _.value = !_.value, q.set("isCollapsed", _.value);
95
+ }, Y = (z) => {
96
+ v.value = z, q.set("layout", z);
97
+ }, Z = () => {
98
+ N.value = !N.value, q.set("showTabs", N.value);
99
+ }, Q = () => {
100
+ g.value = !g.value, q.set("showFooter", g.value);
101
+ }, A = () => {
102
+ L.value = !L.value, q.set("showBreadcrumb", L.value);
103
+ }, B = (z) => {
104
+ w.value = z, document.documentElement.style.setProperty("--color-primary", z), q.set("primaryColor", z);
105
+ }, H = (z) => {
106
+ x.value.includes(z) || x.value.push(z);
107
+ }, te = (z) => {
108
+ const ce = x.value.indexOf(z);
109
+ ce > -1 && x.value.splice(ce, 1);
110
+ }, $ = () => {
111
+ x.value = [];
112
+ }, re = (z) => {
113
+ M.value = z;
114
+ }, se = () => {
115
+ V(), w.value !== "#409eff" && document.documentElement.style.setProperty("--color-primary", w.value);
116
+ };
117
+ return Xe(h, V), {
118
+ appName: n,
119
+ indexPath: d,
120
+ isDark: h,
121
+ theme: p,
122
+ layout: v,
123
+ isCollapsed: _,
124
+ showTabs: N,
125
+ showFooter: g,
126
+ showBreadcrumb: L,
127
+ primaryColor: w,
128
+ cachedViews: x,
129
+ mixSubMenus: M,
130
+ themeClass: C,
131
+ setAppName: K,
132
+ setIndexPath: J,
133
+ toggleTheme: T,
134
+ toggleCollapse: I,
135
+ setTheme: O,
136
+ setLayout: Y,
137
+ toggleTabs: Z,
138
+ toggleFooter: Q,
139
+ toggleBreadcrumb: A,
140
+ setPrimaryColor: B,
141
+ addCachedView: H,
142
+ removeCachedView: te,
143
+ clearCachedViews: $,
144
+ setMixSubMenus: re,
145
+ initTheme: se
146
+ };
147
+ }), ht = "menu_list", vt = "permission_list", ps = {
148
+ menuCode: "home",
149
+ menuName: "首页",
150
+ menuUrl: "/dashboard",
151
+ icon: "home",
152
+ closable: !1,
153
+ isDefault: !1,
154
+ isOut: !1
155
+ };
156
+ function Dt(n) {
157
+ return n.filter((d) => d.type !== 1).map((d) => ({
158
+ ...d,
159
+ children: d.children ? Dt(d.children) : void 0
160
+ }));
161
+ }
162
+ function ms(n) {
163
+ const d = [];
164
+ function h(p) {
165
+ p.forEach((v) => {
166
+ v.type === 1 && v.menuCode && d.push(v.menuCode), v.children && h(v.children);
167
+ });
168
+ }
169
+ return h(n), d;
170
+ }
171
+ const Pe = Je("menu", () => {
172
+ const n = P(q.get(ht) || []), d = P(q.get(vt) || []), h = j(() => n.value.length > 0);
173
+ return {
174
+ menuList: n,
175
+ permissions: d,
176
+ hasMenu: h,
177
+ setMenuList: (N) => {
178
+ d.value = ms(N), q.set(vt, d.value);
179
+ const g = Dt(N);
180
+ n.value = [ps, ...g], q.set(ht, n.value);
181
+ },
182
+ clearMenu: () => {
183
+ n.value = [], d.value = [], q.remove(ht), q.remove(vt);
184
+ },
185
+ hasPermission: (N) => Array.isArray(N) ? N.some((g) => d.value.includes(g)) : d.value.includes(N)
186
+ };
187
+ }), gt = "user_info", Ee = Je("user", () => {
188
+ const n = P(q.get(gt)), d = j(() => !!n.value), h = j(() => {
189
+ var M;
190
+ return ((M = n.value) == null ? void 0 : M.userId) || "";
191
+ }), p = j(() => {
192
+ var M;
193
+ return ((M = n.value) == null ? void 0 : M.userName) || "";
194
+ }), v = j(() => {
195
+ var M;
196
+ return ((M = n.value) == null ? void 0 : M.departmentName) || "";
197
+ }), _ = j(() => {
198
+ var M;
199
+ return ((M = n.value) == null ? void 0 : M.email) || "";
200
+ }), N = j(() => {
201
+ var M;
202
+ return ((M = n.value) == null ? void 0 : M.mobilePhone) || "";
203
+ }), g = j(() => {
204
+ var M;
205
+ return ((M = n.value) == null ? void 0 : M.positionName) || "";
206
+ }), L = j(() => {
207
+ var M;
208
+ return ((M = n.value) == null ? void 0 : M.avatar) || "";
209
+ });
210
+ return {
211
+ userInfo: n,
212
+ isLoggedIn: d,
213
+ userId: h,
214
+ userName: p,
215
+ departmentName: v,
216
+ email: _,
217
+ mobilePhone: N,
218
+ positionName: g,
219
+ avatar: L,
220
+ setUserInfo: (M) => {
221
+ n.value = M, q.set(gt, M);
222
+ },
223
+ clearUserInfo: () => {
224
+ n.value = null, q.remove(gt);
225
+ }
226
+ };
227
+ }), Et = "token", $t = "token_type", Mt = "refresh_token", Lt = "expires_time", It = "refresh_time", At = "code", ut = () => q.get(Et), hs = (n) => {
228
+ q.set(Et, n);
229
+ }, vs = () => q.get($t), gs = (n) => {
230
+ q.set($t, n);
231
+ }, Xa = () => q.get(Mt), _s = (n) => {
232
+ q.set(Mt, n);
233
+ }, ws = () => q.get(Lt), ys = (n) => {
234
+ q.set(Lt, n);
235
+ }, Ya = () => q.get(It), ks = (n) => {
236
+ q.set(It, n);
237
+ }, Ja = () => q.get(At), bs = (n) => {
238
+ q.set(At, n);
239
+ }, Ft = (n) => {
240
+ hs(n.access_token), gs(n.token_type || "Bearer"), _s(n.refresh_token), ys(n.expires_time), ks(n.refresh_time), n.code && bs(n.code);
241
+ }, We = () => {
242
+ q.remove(Et), q.remove($t), q.remove(Mt), q.remove(Lt), q.remove(It), q.remove(At);
243
+ }, xs = () => {
244
+ const n = ws();
245
+ return n ? Date.now() > n : !0;
246
+ }, Vt = () => !!ut() && !xs(), Ze = Je("auth", () => {
247
+ const n = P(ut()), d = j(() => Vt()), h = P(""), p = P(""), v = P(""), _ = P("/login");
248
+ return {
249
+ token: n,
250
+ isLoggedIn: d,
251
+ baseUrl: h,
252
+ appId: p,
253
+ clientId: v,
254
+ loginPath: _,
255
+ login: (C) => {
256
+ n.value = C.access_token, Ft(C);
257
+ },
258
+ logout: () => {
259
+ n.value = null, We();
260
+ },
261
+ setBaseUrl: (C) => {
262
+ h.value = C;
263
+ },
264
+ setAppId: (C) => {
265
+ p.value = C;
266
+ },
267
+ setClientId: (C) => {
268
+ v.value = C;
269
+ },
270
+ setLoginPath: (C) => {
271
+ _.value = C;
272
+ }
273
+ };
274
+ }), Cs = { class: "menu-item__content" }, Ns = { class: "menu-item__icon" }, Ss = {
275
+ key: 1,
276
+ class: "menu-item__char"
277
+ }, Es = { class: "menu-item__text" }, $s = { class: "menu-item__content" }, Ms = {
278
+ key: 0,
279
+ class: "menu-item__icon"
280
+ }, Ls = {
281
+ key: 1,
282
+ class: "menu-item__char"
283
+ }, Is = { class: "menu-item__text" }, As = /* @__PURE__ */ Ae({
284
+ __name: "SidebarMenuItem",
285
+ props: {
286
+ menu: {}
287
+ },
288
+ setup(n) {
289
+ const d = n, h = /* @__PURE__ */ new Set([
290
+ "arrow-up",
291
+ "arrow-down",
292
+ "arrow-left",
293
+ "arrow-right",
294
+ "caret-down",
295
+ "caret-right",
296
+ "plus",
297
+ "minus",
298
+ "close",
299
+ "check",
300
+ "edit",
301
+ "delete",
302
+ "copy",
303
+ "download",
304
+ "upload",
305
+ "refresh",
306
+ "search",
307
+ "filter",
308
+ "more",
309
+ "setting",
310
+ "share",
311
+ "loading",
312
+ "info",
313
+ "success",
314
+ "warning",
315
+ "error",
316
+ "question",
317
+ "user",
318
+ "user-add",
319
+ "user-group",
320
+ "logout",
321
+ "login",
322
+ "file",
323
+ "folder",
324
+ "folder-open",
325
+ "document",
326
+ "image",
327
+ "video",
328
+ "music",
329
+ "camera",
330
+ "mail",
331
+ "phone",
332
+ "chat",
333
+ "bell",
334
+ "message",
335
+ "eye",
336
+ "eye-off",
337
+ "calendar",
338
+ "clock",
339
+ "history",
340
+ "timer",
341
+ "location",
342
+ "map",
343
+ "globe",
344
+ "star",
345
+ "heart",
346
+ "thumb-up",
347
+ "link",
348
+ "external-link",
349
+ "lock",
350
+ "unlock",
351
+ "key",
352
+ "home",
353
+ "menu",
354
+ "menu-fold",
355
+ "menu-unfold",
356
+ "sidebar-fold",
357
+ "sidebar-expand",
358
+ "sidebar-left",
359
+ "dashboard",
360
+ "chart",
361
+ "chart-pie",
362
+ "chart-line",
363
+ "report",
364
+ "analytics",
365
+ "system",
366
+ "permission",
367
+ "role",
368
+ "user-manage",
369
+ "log",
370
+ "notification",
371
+ "app",
372
+ "list",
373
+ "grid",
374
+ "fullscreen",
375
+ "fullscreen-exit",
376
+ "zoom-in",
377
+ "zoom-out",
378
+ "print",
379
+ "bookmark",
380
+ "tag",
381
+ "code",
382
+ "terminal",
383
+ "database",
384
+ "server",
385
+ "cloud",
386
+ "gift",
387
+ "moon",
388
+ "sun",
389
+ "theme",
390
+ "skin"
391
+ ]), p = (g) => {
392
+ if (!g || g === "") return "";
393
+ if (g.startsWith("tineco-icon-")) {
394
+ const w = g.replace("tineco-icon-", "");
395
+ return {
396
+ home: "home",
397
+ dashboard: "dashboard",
398
+ system: "system",
399
+ user: "user",
400
+ role: "role",
401
+ menu: "list",
402
+ setting: "setting",
403
+ file: "file",
404
+ folder: "folder",
405
+ chart: "chart",
406
+ report: "report",
407
+ analytics: "analytics"
408
+ }[w] || w;
409
+ }
410
+ return {
411
+ dashboard: "dashboard",
412
+ system: "system",
413
+ user: "user",
414
+ role: "role",
415
+ menu: "list",
416
+ setting: "setting",
417
+ home: "home",
418
+ chart: "chart",
419
+ report: "report",
420
+ analytics: "analytics",
421
+ permission: "permission",
422
+ log: "log",
423
+ notification: "notification",
424
+ app: "app",
425
+ list: "list",
426
+ grid: "grid"
427
+ }[g] || g;
428
+ }, v = (g) => g ? g.charAt(0) : "", _ = (g) => h.has(g), N = j(() => d.menu.children && d.menu.children.length > 0);
429
+ return (g, L) => {
430
+ const w = Pt("SidebarMenuItem", !0);
431
+ return N.value ? (y(), ie(k(_t), {
432
+ key: 0,
433
+ index: n.menu.menuUrl
434
+ }, {
435
+ title: X(() => [
436
+ s("span", Cs, [
437
+ s("span", Ns, [
438
+ _(p(n.menu.icon)) ? (y(), ie(k(ee), {
439
+ key: 0,
440
+ name: p(n.menu.icon),
441
+ size: 16
442
+ }, null, 8, ["name"])) : (y(), E("span", Ss, G(v(n.menu.menuName)), 1))
443
+ ]),
444
+ s("span", Es, G(n.menu.menuName), 1)
445
+ ])
446
+ ]),
447
+ default: X(() => [
448
+ (y(!0), E(me, null, we(n.menu.children, (x) => (y(), ie(w, {
449
+ key: x.menuUrl,
450
+ menu: x
451
+ }, null, 8, ["menu"]))), 128))
452
+ ]),
453
+ _: 1
454
+ }, 8, ["index"])) : (y(), ie(k(He), {
455
+ key: 1,
456
+ index: n.menu.menuUrl
457
+ }, {
458
+ default: X(() => [
459
+ s("span", $s, [
460
+ n.menu.menuName !== "首页" ? (y(), E("span", Ms, [
461
+ _(p(n.menu.icon)) ? (y(), ie(k(ee), {
462
+ key: 0,
463
+ name: p(n.menu.icon),
464
+ size: 16
465
+ }, null, 8, ["name"])) : (y(), E("span", Ls, G(v(n.menu.menuName)), 1))
466
+ ])) : le("", !0),
467
+ s("span", Is, G(n.menu.menuName), 1)
468
+ ])
469
+ ]),
470
+ _: 1
471
+ }, 8, ["index"]));
472
+ };
473
+ }
474
+ }), $e = (n, d) => {
475
+ const h = n.__vccOpts || n;
476
+ for (const [p, v] of d)
477
+ h[p] = v;
478
+ return h;
479
+ }, Ts = /* @__PURE__ */ $e(As, [["__scopeId", "data-v-27c9479b"]]), Os = {
480
+ key: 0,
481
+ class: "sidebar__logo"
482
+ }, Us = ["src"], Bs = {
483
+ key: 1,
484
+ class: "sidebar__user"
485
+ }, Ps = { class: "sidebar__user-info" }, Rs = { class: "sidebar__user-name" }, zs = { class: "sidebar__user-role" }, Ut = "sidebar_opened_menus", Ds = /* @__PURE__ */ Ae({
486
+ __name: "Sidebar",
487
+ props: {
488
+ menuList: { default: () => [] },
489
+ showLogo: { type: Boolean, default: !0 },
490
+ showUser: { type: Boolean, default: !0 },
491
+ logoSrc: { default: "/vite.svg" }
492
+ },
493
+ setup(n) {
494
+ const d = n, h = qe(), p = ze(), v = Pe(), _ = Ee(), N = Ze(), g = De(), L = j(() => d.menuList.length > 0 ? d.menuList : v.menuList), w = j(() => g.isCollapsed), x = j(() => h.path), M = P(q.get(Ut) || []);
495
+ Xe(M, (I) => {
496
+ q.set(Ut, I);
497
+ }, { deep: !0 });
498
+ const C = (I, Y, Z = []) => {
499
+ var Q;
500
+ for (const A of I) {
501
+ if (Y === A.menuUrl || Y.startsWith(A.menuUrl + "/"))
502
+ return [...Z, A.menuUrl];
503
+ if ((Q = A.children) != null && Q.length) {
504
+ const B = C(A.children, Y, [...Z, A.menuUrl]);
505
+ if (B) return B;
506
+ }
507
+ }
508
+ return null;
509
+ };
510
+ Xe([() => h.path, L], ([I, Y]) => {
511
+ if (Y.length > 0) {
512
+ const Z = C(Y, I);
513
+ if (Z) {
514
+ const Q = Z.slice(0, -1), A = /* @__PURE__ */ new Set([...M.value, ...Q]);
515
+ M.value = Array.from(A);
516
+ }
517
+ }
518
+ }, { immediate: !0 });
519
+ const K = j(() => g.isDark ? "#1d1e1f" : "#fff"), J = j(() => g.isDark ? "#cfd3dc" : "#303133"), T = j(() => "#409eff"), O = (I) => {
520
+ I && I !== h.path && p.push(I);
521
+ }, V = () => {
522
+ N.logout(), _.clearUserInfo(), v.clearMenu(), p.push("/login");
523
+ };
524
+ return (I, Y) => (y(), E("div", {
525
+ class: ye(["sidebar", { "sidebar--collapsed": w.value }])
526
+ }, [
527
+ d.showLogo ? (y(), E("div", Os, [
528
+ s("img", {
529
+ src: d.logoSrc,
530
+ alt: "Logo",
531
+ class: "sidebar__logo-img"
532
+ }, null, 8, Us),
533
+ lt(s("span", { class: "sidebar__logo-text" }, G(k(g).appName), 513), [
534
+ [es, !w.value]
535
+ ])
536
+ ])) : le("", !0),
537
+ R(k(Nt), {
538
+ modelValue: x.value,
539
+ "onUpdate:modelValue": Y[0] || (Y[0] = (Z) => x.value = Z),
540
+ openeds: M.value,
541
+ "onUpdate:openeds": Y[1] || (Y[1] = (Z) => M.value = Z),
542
+ mode: "vertical",
543
+ collapse: w.value,
544
+ "collapse-transition": !1,
545
+ "background-color": K.value,
546
+ "text-color": J.value,
547
+ "active-text-color": T.value,
548
+ class: "sidebar__menu",
549
+ onSelect: O
550
+ }, {
551
+ default: X(() => [
552
+ (y(!0), E(me, null, we(L.value, (Z) => (y(), ie(Ts, {
553
+ key: Z.menuUrl,
554
+ menu: Z
555
+ }, null, 8, ["menu"]))), 128))
556
+ ]),
557
+ _: 1
558
+ }, 8, ["modelValue", "openeds", "collapse", "background-color", "text-color", "active-text-color"]),
559
+ d.showUser && !w.value ? (y(), E("div", Bs, [
560
+ s("div", Ps, [
561
+ s("span", Rs, G(k(_).userName), 1),
562
+ s("span", zs, G(k(_).departmentName), 1)
563
+ ]),
564
+ R(k(je), {
565
+ type: "text",
566
+ size: "small",
567
+ onClick: V
568
+ }, {
569
+ default: X(() => [...Y[2] || (Y[2] = [
570
+ Fe("退出", -1)
571
+ ])]),
572
+ _: 1
573
+ })
574
+ ])) : le("", !0)
575
+ ], 2));
576
+ }
577
+ }), Bt = /* @__PURE__ */ $e(Ds, [["__scopeId", "data-v-9cdb8060"]]), Fs = { class: "header" }, Vs = { class: "header__left" }, js = {
578
+ key: 0,
579
+ class: "header__breadcrumb"
580
+ }, qs = {
581
+ key: 0,
582
+ class: "breadcrumb-separator"
583
+ }, Gs = { class: "header__right" }, Ks = {
584
+ key: 0,
585
+ class: "header__search-dropdown"
586
+ }, Hs = {
587
+ key: 0,
588
+ class: "header__search-results"
589
+ }, Ws = ["onClick"], Xs = {
590
+ key: 0,
591
+ class: "header__search-icon"
592
+ }, Ys = {
593
+ key: 1,
594
+ class: "header__search-char"
595
+ }, Js = { class: "header__search-item-title" }, Zs = {
596
+ key: 1,
597
+ class: "header__search-item-parent"
598
+ }, Qs = {
599
+ key: 1,
600
+ class: "header__search-empty"
601
+ }, en = ["title"], tn = { class: "header__avatar" }, sn = { class: "header__user-name" }, nn = {
602
+ key: 0,
603
+ class: "header__dropdown"
604
+ }, on = { class: "header__dropdown-header" }, rn = { class: "header__dropdown-avatar" }, an = { class: "header__dropdown-info" }, ln = { class: "header__dropdown-name" }, cn = { class: "header__dropdown-role" }, un = { class: "header__dropdown-menu" }, dn = { class: "settings-drawer" }, fn = { class: "settings-section" }, pn = { class: "settings-layout-options" }, mn = ["onClick"], hn = { class: "layout-option__preview" }, vn = {
605
+ key: 0,
606
+ class: "layout-preview-sidebar"
607
+ }, gn = {
608
+ key: 1,
609
+ class: "layout-preview-top"
610
+ }, _n = {
611
+ key: 2,
612
+ class: "layout-preview-mix"
613
+ }, wn = { class: "layout-option__label" }, yn = { class: "settings-section" }, kn = { class: "settings-color-options" }, bn = ["title", "onClick"], xn = { class: "settings-section" }, Cn = { class: "settings-switch-list" }, Nn = { class: "settings-switch-item" }, Sn = { class: "settings-switch-item" }, En = /* @__PURE__ */ Ae({
614
+ __name: "Header",
615
+ setup(n) {
616
+ const d = qe(), h = ze(), p = De(), v = Ee(), _ = Ze(), N = Pe(), g = P(!1), L = P(!1), w = P(null), x = P(!1), M = P(!1), C = P(""), K = P(null), J = P(!1), T = [
617
+ { value: "sidebar", label: "左侧菜单", icon: "sidebar-left" },
618
+ { value: "top", label: "顶部菜单", icon: "menu" },
619
+ { value: "mix", label: "混合菜单", icon: "grid" }
620
+ ], O = [
621
+ { value: "#409eff", label: "默认蓝" },
622
+ { value: "#1890ff", label: "科技蓝" },
623
+ { value: "#52c41a", label: "极光绿" },
624
+ { value: "#faad14", label: "日落橙" },
625
+ { value: "#f5222d", label: "薄暮红" },
626
+ { value: "#722ed1", label: "酱紫" }
627
+ ], V = j(() => d.matched.filter((U) => U.meta && U.meta.title).map((U) => ({
628
+ title: U.meta.title,
629
+ path: U.path
630
+ }))), I = (W, U = "") => {
631
+ const e = [];
632
+ return W.forEach((t) => {
633
+ t.children && t.children.length > 0 ? e.push(...I(t.children, t.menuName)) : e.push({ ...t, parentTitle: U, title: t.menuName, path: t.menuUrl });
634
+ }), e;
635
+ }, Y = /* @__PURE__ */ new Set([
636
+ "arrow-up",
637
+ "arrow-down",
638
+ "arrow-left",
639
+ "arrow-right",
640
+ "caret-down",
641
+ "caret-right",
642
+ "plus",
643
+ "minus",
644
+ "close",
645
+ "check",
646
+ "edit",
647
+ "delete",
648
+ "copy",
649
+ "download",
650
+ "upload",
651
+ "refresh",
652
+ "search",
653
+ "filter",
654
+ "more",
655
+ "setting",
656
+ "share",
657
+ "loading",
658
+ "info",
659
+ "success",
660
+ "warning",
661
+ "error",
662
+ "question",
663
+ "user",
664
+ "user-add",
665
+ "user-group",
666
+ "logout",
667
+ "login",
668
+ "file",
669
+ "folder",
670
+ "folder-open",
671
+ "document",
672
+ "image",
673
+ "video",
674
+ "music",
675
+ "camera",
676
+ "mail",
677
+ "phone",
678
+ "chat",
679
+ "bell",
680
+ "message",
681
+ "eye",
682
+ "eye-off",
683
+ "calendar",
684
+ "clock",
685
+ "history",
686
+ "timer",
687
+ "location",
688
+ "map",
689
+ "globe",
690
+ "star",
691
+ "heart",
692
+ "thumb-up",
693
+ "link",
694
+ "external-link",
695
+ "lock",
696
+ "unlock",
697
+ "key",
698
+ "home",
699
+ "menu",
700
+ "menu-fold",
701
+ "menu-unfold",
702
+ "sidebar-fold",
703
+ "sidebar-expand",
704
+ "sidebar-left",
705
+ "dashboard",
706
+ "chart",
707
+ "chart-pie",
708
+ "chart-line",
709
+ "report",
710
+ "analytics",
711
+ "system",
712
+ "permission",
713
+ "role",
714
+ "user-manage",
715
+ "log",
716
+ "notification",
717
+ "app",
718
+ "list",
719
+ "grid",
720
+ "fullscreen",
721
+ "fullscreen-exit",
722
+ "zoom-in",
723
+ "zoom-out",
724
+ "print",
725
+ "bookmark",
726
+ "tag",
727
+ "code",
728
+ "terminal",
729
+ "database",
730
+ "server",
731
+ "cloud",
732
+ "gift",
733
+ "moon",
734
+ "sun",
735
+ "theme",
736
+ "skin"
737
+ ]), Z = (W) => {
738
+ if (!W || W === "") return "";
739
+ if (W.startsWith("tineco-icon-")) {
740
+ const e = W.replace("tineco-icon-", "");
741
+ return {
742
+ home: "home",
743
+ dashboard: "dashboard",
744
+ system: "system",
745
+ user: "user",
746
+ role: "role",
747
+ menu: "list",
748
+ setting: "setting",
749
+ file: "file",
750
+ folder: "folder",
751
+ chart: "chart",
752
+ report: "report",
753
+ analytics: "analytics"
754
+ }[e] || e;
755
+ }
756
+ return {
757
+ dashboard: "dashboard",
758
+ system: "system",
759
+ user: "user",
760
+ role: "role",
761
+ menu: "list",
762
+ setting: "setting",
763
+ home: "home",
764
+ chart: "chart",
765
+ report: "report",
766
+ analytics: "analytics",
767
+ permission: "permission",
768
+ log: "log",
769
+ notification: "notification",
770
+ app: "app",
771
+ list: "list",
772
+ grid: "grid"
773
+ }[W] || W;
774
+ }, Q = (W) => W ? W.charAt(0) : "", A = (W) => Y.has(W), B = j(() => C.value.trim() ? I(N.menuList).filter(
775
+ (U) => U.title.toLowerCase().includes(C.value.toLowerCase())
776
+ ) : []), H = j(() => p.layout), te = () => {
777
+ p.toggleCollapse();
778
+ }, $ = () => {
779
+ p.toggleTheme();
780
+ }, re = () => {
781
+ L.value = !0;
782
+ }, se = (W) => {
783
+ p.setLayout(W), L.value = !1;
784
+ }, z = (W) => {
785
+ J.value = W;
786
+ const U = document.documentElement;
787
+ W ? U.classList.add("grey-mode") : U.classList.remove("grey-mode");
788
+ }, ce = () => {
789
+ z(!J.value), L.value = !1;
790
+ }, ue = () => {
791
+ p.toggleTheme(), L.value = !1;
792
+ }, ke = () => {
793
+ document.fullscreenElement ? document.exitFullscreen() : document.documentElement.requestFullscreen();
794
+ }, ve = () => {
795
+ x.value = !!document.fullscreenElement;
796
+ }, ge = () => {
797
+ g.value = !g.value;
798
+ }, _e = () => {
799
+ g.value = !1;
800
+ }, be = () => {
801
+ M.value = !1, C.value = "";
802
+ }, Te = (W) => {
803
+ h.push(W), be();
804
+ }, Ne = (W) => {
805
+ p.setPrimaryColor(W), L.value = !1;
806
+ }, Oe = () => {
807
+ _e(), h.push("/profile");
808
+ }, S = () => {
809
+ _e(), h.push("/change-password");
810
+ }, Ue = () => {
811
+ _e(), _.logout(), v.clearUserInfo(), N.clearMenu(), h.push("/login");
812
+ }, Be = (W) => {
813
+ w.value && !w.value.contains(W.target) && _e(), K.value && !K.value.contains(W.target) && be();
814
+ }, Me = (W) => {
815
+ W.key === "Escape" && (be(), _e());
816
+ };
817
+ return wt(() => {
818
+ document.addEventListener("click", Be), document.addEventListener("fullscreenchange", ve), document.addEventListener("keydown", Me), p.initTheme(), J.value = document.documentElement.classList.contains("grey-mode");
819
+ }), yt(() => {
820
+ document.removeEventListener("click", Be), document.removeEventListener("fullscreenchange", ve), document.removeEventListener("keydown", Me);
821
+ }), (W, U) => {
822
+ var e;
823
+ return y(), E("div", Fs, [
824
+ s("div", Vs, [
825
+ s("div", {
826
+ class: "header__collapse",
827
+ onClick: te
828
+ }, [
829
+ R(k(ee), {
830
+ name: k(p).isCollapsed ? "menu-unfold" : "menu-fold",
831
+ size: 18
832
+ }, null, 8, ["name"])
833
+ ]),
834
+ k(p).showBreadcrumb ? (y(), E("div", js, [
835
+ (y(!0), E(me, null, we(V.value, (t, r) => (y(), E("span", {
836
+ key: t.path
837
+ }, [
838
+ r > 0 ? (y(), E("span", qs, "/")) : le("", !0),
839
+ s("span", {
840
+ class: ye({ "is-current": r === V.value.length - 1 })
841
+ }, G(t.title), 3)
842
+ ]))), 128))
843
+ ])) : le("", !0)
844
+ ]),
845
+ s("div", Gs, [
846
+ s("div", {
847
+ class: "header__search",
848
+ ref_key: "searchRef",
849
+ ref: K
850
+ }, [
851
+ R(k(ee), {
852
+ name: "search",
853
+ size: 14,
854
+ class: "header__search-icon"
855
+ }),
856
+ lt(s("input", {
857
+ "onUpdate:modelValue": U[0] || (U[0] = (t) => C.value = t),
858
+ type: "text",
859
+ class: "header__search-input",
860
+ placeholder: "搜索菜单...",
861
+ onFocus: U[1] || (U[1] = (t) => M.value = !0)
862
+ }, null, 544), [
863
+ [kt, C.value]
864
+ ]),
865
+ R(Ve, { name: "search-dropdown" }, {
866
+ default: X(() => [
867
+ M.value && (B.value.length > 0 || C.value) ? (y(), E("div", Ks, [
868
+ B.value.length > 0 ? (y(), E("div", Hs, [
869
+ (y(!0), E(me, null, we(B.value, (t) => (y(), E("div", {
870
+ key: t.path,
871
+ class: "header__search-item",
872
+ onClick: (r) => Te(t.path)
873
+ }, [
874
+ t.title !== "首页" ? (y(), E("span", Xs, [
875
+ A(Z(t.icon)) ? (y(), ie(k(ee), {
876
+ key: 0,
877
+ name: Z(t.icon),
878
+ size: 16
879
+ }, null, 8, ["name"])) : (y(), E("span", Ys, G(Q(t.title)), 1))
880
+ ])) : le("", !0),
881
+ s("span", Js, G(t.title), 1),
882
+ t.parentTitle ? (y(), E("span", Zs, G(t.parentTitle), 1)) : le("", !0)
883
+ ], 8, Ws))), 128))
884
+ ])) : (y(), E("div", Qs, " 未找到匹配的菜单 "))
885
+ ])) : le("", !0)
886
+ ]),
887
+ _: 1
888
+ })
889
+ ], 512),
890
+ s("div", {
891
+ class: "header__action",
892
+ onClick: ke,
893
+ title: x.value ? "退出全屏" : "全屏"
894
+ }, [
895
+ R(k(ee), {
896
+ name: x.value ? "fullscreen-exit" : "fullscreen",
897
+ size: 16
898
+ }, null, 8, ["name"])
899
+ ], 8, en),
900
+ s("div", {
901
+ class: "header__action",
902
+ onClick: re,
903
+ title: "换肤设置"
904
+ }, [
905
+ R(k(ee), {
906
+ name: "skin",
907
+ size: 16
908
+ })
909
+ ]),
910
+ s("div", {
911
+ class: "header__action",
912
+ onClick: $,
913
+ title: "切换主题"
914
+ }, [
915
+ R(k(ee), {
916
+ name: k(p).isDark ? "sun" : "moon",
917
+ size: 16
918
+ }, null, 8, ["name"])
919
+ ]),
920
+ s("div", {
921
+ class: "header__user",
922
+ ref_key: "dropdownRef",
923
+ ref: w
924
+ }, [
925
+ s("div", {
926
+ class: "header__user-trigger",
927
+ onClick: it(ge, ["stop"])
928
+ }, [
929
+ s("div", tn, [
930
+ s("span", null, G(((e = k(v).userName) == null ? void 0 : e.charAt(0)) || "U"), 1)
931
+ ]),
932
+ s("span", sn, G(k(v).userName), 1),
933
+ s("span", {
934
+ class: ye(["header__user-arrow", { "is-active": g.value }])
935
+ }, "▼", 2)
936
+ ]),
937
+ R(Ve, { name: "dropdown" }, {
938
+ default: X(() => {
939
+ var t;
940
+ return [
941
+ g.value ? (y(), E("div", nn, [
942
+ s("div", on, [
943
+ s("div", rn, [
944
+ s("span", null, G(((t = k(v).userName) == null ? void 0 : t.charAt(0)) || "U"), 1)
945
+ ]),
946
+ s("div", an, [
947
+ s("div", ln, G(k(v).userName), 1),
948
+ s("div", cn, G(k(v).departmentName), 1)
949
+ ])
950
+ ]),
951
+ U[7] || (U[7] = s("div", { class: "header__dropdown-divider" }, null, -1)),
952
+ s("div", un, [
953
+ s("div", {
954
+ class: "header__dropdown-item",
955
+ onClick: Oe
956
+ }, [
957
+ R(k(ee), {
958
+ name: "user",
959
+ size: 16
960
+ }),
961
+ U[3] || (U[3] = s("span", null, "个人信息", -1))
962
+ ]),
963
+ s("div", {
964
+ class: "header__dropdown-item",
965
+ onClick: S
966
+ }, [
967
+ R(k(ee), {
968
+ name: "lock",
969
+ size: 16
970
+ }),
971
+ U[4] || (U[4] = s("span", null, "修改密码", -1))
972
+ ]),
973
+ U[6] || (U[6] = s("div", { class: "header__dropdown-divider" }, null, -1)),
974
+ s("div", {
975
+ class: "header__dropdown-item header__dropdown-item--danger",
976
+ onClick: Ue
977
+ }, [
978
+ R(k(ee), {
979
+ name: "logout",
980
+ size: 16
981
+ }),
982
+ U[5] || (U[5] = s("span", null, "退出登录", -1))
983
+ ])
984
+ ])
985
+ ])) : le("", !0)
986
+ ];
987
+ }),
988
+ _: 1
989
+ })
990
+ ], 512)
991
+ ]),
992
+ R(k(St), {
993
+ modelValue: L.value,
994
+ "onUpdate:modelValue": U[2] || (U[2] = (t) => L.value = t),
995
+ title: "换肤设置",
996
+ direction: "rtl",
997
+ size: "320px"
998
+ }, {
999
+ default: X(() => [
1000
+ s("div", dn, [
1001
+ s("div", fn, [
1002
+ U[11] || (U[11] = s("div", { class: "settings-title" }, "布局模式", -1)),
1003
+ s("div", pn, [
1004
+ (y(), E(me, null, we(T, (t) => s("div", {
1005
+ key: t.value,
1006
+ class: ye(["layout-option", { "is-active": H.value === t.value }]),
1007
+ onClick: (r) => se(t.value)
1008
+ }, [
1009
+ s("div", hn, [
1010
+ t.value === "sidebar" ? (y(), E("div", vn, [...U[8] || (U[8] = [
1011
+ s("div", { class: "preview-aside" }, null, -1),
1012
+ s("div", { class: "preview-main" }, [
1013
+ s("div", { class: "preview-header" }),
1014
+ s("div", { class: "preview-content" })
1015
+ ], -1)
1016
+ ])])) : t.value === "top" ? (y(), E("div", gn, [...U[9] || (U[9] = [
1017
+ s("div", { class: "preview-header-full" }, null, -1),
1018
+ s("div", { class: "preview-content-full" }, null, -1)
1019
+ ])])) : (y(), E("div", _n, [...U[10] || (U[10] = [
1020
+ s("div", { class: "preview-header-mix" }, [
1021
+ s("div", { class: "preview-mix-left" })
1022
+ ], -1),
1023
+ s("div", { class: "preview-mix-body" }, [
1024
+ s("div", { class: "preview-mix-aside" }),
1025
+ s("div", { class: "preview-mix-content" })
1026
+ ], -1)
1027
+ ])]))
1028
+ ]),
1029
+ s("span", wn, G(t.label), 1)
1030
+ ], 10, mn)), 64))
1031
+ ])
1032
+ ]),
1033
+ s("div", yn, [
1034
+ U[12] || (U[12] = s("div", { class: "settings-title" }, "主题色", -1)),
1035
+ s("div", kn, [
1036
+ (y(), E(me, null, we(O, (t) => s("div", {
1037
+ key: t.value,
1038
+ class: ye(["color-option", { "is-active": k(p).primaryColor === t.value }]),
1039
+ style: Ye({ backgroundColor: t.value }),
1040
+ title: t.label,
1041
+ onClick: (r) => Ne(t.value)
1042
+ }, [
1043
+ k(p).primaryColor === t.value ? (y(), ie(k(ee), {
1044
+ key: 0,
1045
+ name: "check",
1046
+ size: 12,
1047
+ color: "#fff"
1048
+ })) : le("", !0)
1049
+ ], 14, bn)), 64))
1050
+ ])
1051
+ ]),
1052
+ s("div", xn, [
1053
+ U[17] || (U[17] = s("div", { class: "settings-title" }, "功能设置", -1)),
1054
+ s("div", Cn, [
1055
+ s("div", Nn, [
1056
+ U[14] || (U[14] = s("span", null, "灰色模式", -1)),
1057
+ s("div", {
1058
+ class: ye(["switch-wrapper", { "is-checked": J.value }]),
1059
+ onClick: ce
1060
+ }, [...U[13] || (U[13] = [
1061
+ s("span", { class: "switch-core" }, null, -1)
1062
+ ])], 2)
1063
+ ]),
1064
+ s("div", Sn, [
1065
+ U[16] || (U[16] = s("span", null, "暗黑模式", -1)),
1066
+ s("div", {
1067
+ class: ye(["switch-wrapper", { "is-checked": k(p).isDark }]),
1068
+ onClick: ue
1069
+ }, [...U[15] || (U[15] = [
1070
+ s("span", { class: "switch-core" }, null, -1)
1071
+ ])], 2)
1072
+ ])
1073
+ ])
1074
+ ])
1075
+ ])
1076
+ ]),
1077
+ _: 1
1078
+ }, 8, ["modelValue"])
1079
+ ]);
1080
+ };
1081
+ }
1082
+ }), $n = /* @__PURE__ */ $e(En, [["__scopeId", "data-v-89179947"]]), Mn = { class: "top-menu" }, Ln = { class: "top-menu__logo" }, In = ["src"], An = { class: "top-menu__logo-text" }, Tn = { class: "top-menu__menu-content" }, On = {
1083
+ key: 0,
1084
+ class: "top-menu__menu-icon"
1085
+ }, Un = {
1086
+ key: 1,
1087
+ class: "top-menu__menu-char"
1088
+ }, Bn = { class: "top-menu__menu-text" }, Pn = { class: "top-menu__menu-content" }, Rn = { class: "top-menu__menu-icon" }, zn = {
1089
+ key: 1,
1090
+ class: "top-menu__menu-char"
1091
+ }, Dn = { class: "top-menu__menu-text" }, Fn = { class: "top-menu__menu-content" }, Vn = { class: "top-menu__menu-icon" }, jn = {
1092
+ key: 1,
1093
+ class: "top-menu__menu-char"
1094
+ }, qn = { class: "top-menu__menu-text" }, Gn = { class: "top-menu__menu-content" }, Kn = { class: "top-menu__menu-icon" }, Hn = {
1095
+ key: 1,
1096
+ class: "top-menu__menu-char"
1097
+ }, Wn = { class: "top-menu__menu-text" }, Xn = { class: "top-menu__menu-content" }, Yn = {
1098
+ key: 0,
1099
+ class: "top-menu__menu-icon"
1100
+ }, Jn = {
1101
+ key: 1,
1102
+ class: "top-menu__menu-char"
1103
+ }, Zn = { class: "top-menu__menu-text" }, Qn = { class: "top-menu__actions" }, eo = {
1104
+ key: 0,
1105
+ class: "top-menu__search-dropdown"
1106
+ }, to = {
1107
+ key: 0,
1108
+ class: "top-menu__search-results"
1109
+ }, so = ["onClick"], no = {
1110
+ key: 0,
1111
+ class: "top-menu__search-icon-item"
1112
+ }, oo = {
1113
+ key: 1,
1114
+ class: "top-menu__search-char"
1115
+ }, ro = { class: "top-menu__search-item-title" }, ao = {
1116
+ key: 1,
1117
+ class: "top-menu__search-item-parent"
1118
+ }, lo = {
1119
+ key: 1,
1120
+ class: "top-menu__search-empty"
1121
+ }, io = ["title"], co = { class: "top-menu__avatar" }, uo = { class: "top-menu__user-name" }, fo = {
1122
+ key: 0,
1123
+ class: "top-menu__dropdown"
1124
+ }, po = { class: "top-menu__dropdown-header" }, mo = { class: "top-menu__dropdown-avatar" }, ho = { class: "top-menu__dropdown-info" }, vo = { class: "top-menu__dropdown-name" }, go = { class: "top-menu__dropdown-role" }, _o = { class: "top-menu__dropdown-menu" }, wo = { class: "settings-drawer" }, yo = { class: "settings-section" }, ko = { class: "settings-layout-options" }, bo = ["onClick"], xo = { class: "layout-option__preview" }, Co = {
1125
+ key: 0,
1126
+ class: "layout-preview-sidebar"
1127
+ }, No = {
1128
+ key: 1,
1129
+ class: "layout-preview-top"
1130
+ }, So = {
1131
+ key: 2,
1132
+ class: "layout-preview-mix"
1133
+ }, Eo = { class: "layout-option__label" }, $o = { class: "settings-section" }, Mo = { class: "settings-color-options" }, Lo = ["title", "onClick"], Io = { class: "settings-section" }, Ao = { class: "settings-switch-list" }, To = { class: "settings-switch-item" }, Oo = { class: "settings-switch-item" }, Uo = /* @__PURE__ */ Ae({
1134
+ __name: "TopMenu",
1135
+ props: {
1136
+ logoSrc: { default: "/vite.svg" }
1137
+ },
1138
+ setup(n) {
1139
+ const d = n, h = qe(), p = ze(), v = Pe(), _ = De(), N = Ee(), g = Ze(), L = j(() => h.path), w = (r, c = "") => {
1140
+ const u = [];
1141
+ return r.forEach((o) => {
1142
+ o.children && o.children.length > 0 ? u.push(...w(o.children, o.menuName)) : u.push({ ...o, parentTitle: c, title: o.menuName, path: o.menuUrl });
1143
+ }), u;
1144
+ }, x = j(() => Z.value.trim() ? w(v.menuList).filter(
1145
+ (c) => c.title.toLowerCase().includes(Z.value.toLowerCase())
1146
+ ) : []), M = j(() => _.isDark ? "#1d1e1f" : "#fff"), C = j(() => _.isDark ? "#cfd3dc" : "#303133"), K = j(() => "#409eff"), J = P(!1), T = P(null), O = P(!1), V = P(!1), I = P(!1), Y = P(!1), Z = P(""), Q = P(null), A = (r) => {
1147
+ r && r !== h.path && p.push(r);
1148
+ }, B = /* @__PURE__ */ new Set([
1149
+ "arrow-up",
1150
+ "arrow-down",
1151
+ "arrow-left",
1152
+ "arrow-right",
1153
+ "caret-down",
1154
+ "caret-right",
1155
+ "plus",
1156
+ "minus",
1157
+ "close",
1158
+ "check",
1159
+ "edit",
1160
+ "delete",
1161
+ "copy",
1162
+ "download",
1163
+ "upload",
1164
+ "refresh",
1165
+ "search",
1166
+ "filter",
1167
+ "more",
1168
+ "setting",
1169
+ "share",
1170
+ "loading",
1171
+ "info",
1172
+ "success",
1173
+ "warning",
1174
+ "error",
1175
+ "question",
1176
+ "user",
1177
+ "user-add",
1178
+ "user-group",
1179
+ "logout",
1180
+ "login",
1181
+ "file",
1182
+ "folder",
1183
+ "folder-open",
1184
+ "document",
1185
+ "image",
1186
+ "video",
1187
+ "music",
1188
+ "camera",
1189
+ "mail",
1190
+ "phone",
1191
+ "chat",
1192
+ "bell",
1193
+ "message",
1194
+ "eye",
1195
+ "eye-off",
1196
+ "calendar",
1197
+ "clock",
1198
+ "history",
1199
+ "timer",
1200
+ "location",
1201
+ "map",
1202
+ "globe",
1203
+ "star",
1204
+ "heart",
1205
+ "thumb-up",
1206
+ "link",
1207
+ "external-link",
1208
+ "lock",
1209
+ "unlock",
1210
+ "key",
1211
+ "home",
1212
+ "menu",
1213
+ "menu-fold",
1214
+ "menu-unfold",
1215
+ "sidebar-fold",
1216
+ "sidebar-expand",
1217
+ "sidebar-left",
1218
+ "dashboard",
1219
+ "chart",
1220
+ "chart-pie",
1221
+ "chart-line",
1222
+ "report",
1223
+ "analytics",
1224
+ "system",
1225
+ "permission",
1226
+ "role",
1227
+ "user-manage",
1228
+ "log",
1229
+ "notification",
1230
+ "app",
1231
+ "list",
1232
+ "grid",
1233
+ "fullscreen",
1234
+ "fullscreen-exit",
1235
+ "zoom-in",
1236
+ "zoom-out",
1237
+ "print",
1238
+ "bookmark",
1239
+ "tag",
1240
+ "code",
1241
+ "terminal",
1242
+ "database",
1243
+ "server",
1244
+ "cloud",
1245
+ "gift",
1246
+ "moon",
1247
+ "sun",
1248
+ "theme",
1249
+ "skin"
1250
+ ]), H = (r) => {
1251
+ if (!r || r === "") return "";
1252
+ if (r.startsWith("tineco-icon-")) {
1253
+ const u = r.replace("tineco-icon-", "");
1254
+ return {
1255
+ home: "home",
1256
+ dashboard: "dashboard",
1257
+ system: "system",
1258
+ user: "user",
1259
+ role: "role",
1260
+ menu: "list",
1261
+ setting: "setting",
1262
+ file: "file",
1263
+ folder: "folder",
1264
+ chart: "chart",
1265
+ report: "report",
1266
+ analytics: "analytics"
1267
+ }[u] || u;
1268
+ }
1269
+ return {
1270
+ dashboard: "dashboard",
1271
+ system: "system",
1272
+ user: "user",
1273
+ role: "role",
1274
+ menu: "list",
1275
+ setting: "setting",
1276
+ home: "home",
1277
+ chart: "chart",
1278
+ report: "report",
1279
+ analytics: "analytics",
1280
+ permission: "permission",
1281
+ log: "log",
1282
+ notification: "notification",
1283
+ app: "app",
1284
+ list: "list",
1285
+ grid: "grid"
1286
+ }[r] || r;
1287
+ }, te = (r) => r ? r.charAt(0) : "", $ = (r) => B.has(r), re = () => {
1288
+ _.toggleTheme(), V.value = !1;
1289
+ }, se = () => {
1290
+ document.fullscreenElement ? document.exitFullscreen() : document.documentElement.requestFullscreen();
1291
+ }, z = () => {
1292
+ O.value = !!document.fullscreenElement;
1293
+ }, ce = () => {
1294
+ J.value = !J.value;
1295
+ }, ue = () => {
1296
+ J.value = !1;
1297
+ }, ke = () => {
1298
+ Y.value = !1, Z.value = "";
1299
+ }, ve = (r) => {
1300
+ p.push(r), ke();
1301
+ }, ge = () => {
1302
+ V.value = !0;
1303
+ }, _e = (r) => {
1304
+ I.value = r;
1305
+ const c = document.documentElement;
1306
+ r ? c.classList.add("grey-mode") : c.classList.remove("grey-mode");
1307
+ }, be = () => {
1308
+ _e(!I.value), V.value = !1;
1309
+ }, Te = () => {
1310
+ _.toggleTheme(), V.value = !1;
1311
+ }, Ne = [
1312
+ { value: "sidebar", label: "左侧菜单", icon: "sidebar-left" },
1313
+ { value: "top", label: "顶部菜单", icon: "menu" },
1314
+ { value: "mix", label: "混合菜单", icon: "grid" }
1315
+ ], Oe = j(() => _.layout), S = (r) => {
1316
+ _.setLayout(r), V.value = !1;
1317
+ }, Ue = [
1318
+ { value: "#409eff", label: "默认蓝" },
1319
+ { value: "#1890ff", label: "科技蓝" },
1320
+ { value: "#52c41a", label: "极光绿" },
1321
+ { value: "#faad14", label: "日落橙" },
1322
+ { value: "#f5222d", label: "薄暮红" },
1323
+ { value: "#722ed1", label: "酱紫" }
1324
+ ], Be = (r) => {
1325
+ _.setPrimaryColor(r), V.value = !1;
1326
+ }, Me = () => {
1327
+ ue(), p.push("/profile");
1328
+ }, W = () => {
1329
+ ue(), p.push("/change-password");
1330
+ }, U = () => {
1331
+ ue(), g.logout(), N.clearUserInfo(), v.clearMenu(), p.push("/login");
1332
+ }, e = (r) => {
1333
+ T.value && !T.value.contains(r.target) && ue(), Q.value && !Q.value.contains(r.target) && ke();
1334
+ }, t = (r) => {
1335
+ r.key === "Escape" && (ke(), ue());
1336
+ };
1337
+ return wt(() => {
1338
+ document.addEventListener("click", e), document.addEventListener("fullscreenchange", z), document.addEventListener("keydown", t), I.value = document.documentElement.classList.contains("grey-mode");
1339
+ }), yt(() => {
1340
+ document.removeEventListener("click", e), document.removeEventListener("fullscreenchange", z), document.removeEventListener("keydown", t);
1341
+ }), (r, c) => {
1342
+ var u;
1343
+ return y(), E("div", Mn, [
1344
+ s("div", Ln, [
1345
+ s("img", {
1346
+ src: d.logoSrc,
1347
+ alt: "Logo",
1348
+ class: "top-menu__logo-img"
1349
+ }, null, 8, In),
1350
+ s("span", An, G(k(_).appName), 1)
1351
+ ]),
1352
+ R(k(Nt), {
1353
+ "model-value": L.value,
1354
+ mode: "horizontal",
1355
+ "background-color": M.value,
1356
+ "text-color": C.value,
1357
+ "active-text-color": K.value,
1358
+ class: "top-menu__menu",
1359
+ onSelect: A
1360
+ }, {
1361
+ default: X(() => [
1362
+ (y(!0), E(me, null, we(k(v).menuList, (o) => (y(), E(me, {
1363
+ key: o.menuUrl
1364
+ }, [
1365
+ o.children && o.children.length > 0 ? (y(), ie(k(_t), {
1366
+ key: 0,
1367
+ index: o.menuUrl
1368
+ }, {
1369
+ title: X(() => [
1370
+ s("span", Tn, [
1371
+ o.menuName !== "首页" ? (y(), E("span", On, [
1372
+ $(H(o.icon)) ? (y(), ie(k(ee), {
1373
+ key: 0,
1374
+ name: H(o.icon),
1375
+ size: 16
1376
+ }, null, 8, ["name"])) : (y(), E("span", Un, G(te(o.menuName)), 1))
1377
+ ])) : le("", !0),
1378
+ s("span", Bn, G(o.menuName), 1)
1379
+ ])
1380
+ ]),
1381
+ default: X(() => [
1382
+ (y(!0), E(me, null, we(o.children, (l) => (y(), E(me, {
1383
+ key: l.menuUrl
1384
+ }, [
1385
+ l.children && l.children.length > 0 ? (y(), ie(k(_t), {
1386
+ key: 0,
1387
+ index: l.menuUrl
1388
+ }, {
1389
+ title: X(() => [
1390
+ s("span", Pn, [
1391
+ s("span", Rn, [
1392
+ $(H(l.icon)) ? (y(), ie(k(ee), {
1393
+ key: 0,
1394
+ name: H(l.icon),
1395
+ size: 16
1396
+ }, null, 8, ["name"])) : (y(), E("span", zn, G(te(l.menuName)), 1))
1397
+ ]),
1398
+ s("span", Dn, G(l.menuName), 1)
1399
+ ])
1400
+ ]),
1401
+ default: X(() => [
1402
+ (y(!0), E(me, null, we(l.children, (i) => (y(), ie(k(He), {
1403
+ key: i.menuUrl,
1404
+ index: i.menuUrl
1405
+ }, {
1406
+ default: X(() => [
1407
+ s("span", Fn, [
1408
+ s("span", Vn, [
1409
+ $(H(i.icon)) ? (y(), ie(k(ee), {
1410
+ key: 0,
1411
+ name: H(i.icon),
1412
+ size: 16
1413
+ }, null, 8, ["name"])) : (y(), E("span", jn, G(te(i.menuName)), 1))
1414
+ ]),
1415
+ s("span", qn, G(i.menuName), 1)
1416
+ ])
1417
+ ]),
1418
+ _: 2
1419
+ }, 1032, ["index"]))), 128))
1420
+ ]),
1421
+ _: 2
1422
+ }, 1032, ["index"])) : (y(), ie(k(He), {
1423
+ key: 1,
1424
+ index: l.menuUrl
1425
+ }, {
1426
+ default: X(() => [
1427
+ s("span", Gn, [
1428
+ s("span", Kn, [
1429
+ $(H(l.icon)) ? (y(), ie(k(ee), {
1430
+ key: 0,
1431
+ name: H(l.icon),
1432
+ size: 16
1433
+ }, null, 8, ["name"])) : (y(), E("span", Hn, G(te(l.menuName)), 1))
1434
+ ]),
1435
+ s("span", Wn, G(l.menuName), 1)
1436
+ ])
1437
+ ]),
1438
+ _: 2
1439
+ }, 1032, ["index"]))
1440
+ ], 64))), 128))
1441
+ ]),
1442
+ _: 2
1443
+ }, 1032, ["index"])) : (y(), ie(k(He), {
1444
+ key: 1,
1445
+ index: o.menuUrl
1446
+ }, {
1447
+ default: X(() => [
1448
+ s("span", Xn, [
1449
+ o.menuName !== "首页" ? (y(), E("span", Yn, [
1450
+ $(H(o.icon)) ? (y(), ie(k(ee), {
1451
+ key: 0,
1452
+ name: H(o.icon),
1453
+ size: 16
1454
+ }, null, 8, ["name"])) : (y(), E("span", Jn, G(te(o.menuName)), 1))
1455
+ ])) : le("", !0),
1456
+ s("span", Zn, G(o.menuName), 1)
1457
+ ])
1458
+ ]),
1459
+ _: 2
1460
+ }, 1032, ["index"]))
1461
+ ], 64))), 128))
1462
+ ]),
1463
+ _: 1
1464
+ }, 8, ["model-value", "background-color", "text-color", "active-text-color"]),
1465
+ s("div", Qn, [
1466
+ s("div", {
1467
+ class: "top-menu__search",
1468
+ ref_key: "searchRef",
1469
+ ref: Q
1470
+ }, [
1471
+ R(k(ee), {
1472
+ name: "search",
1473
+ size: 14,
1474
+ class: "top-menu__search-icon"
1475
+ }),
1476
+ lt(s("input", {
1477
+ "onUpdate:modelValue": c[0] || (c[0] = (o) => Z.value = o),
1478
+ type: "text",
1479
+ class: "top-menu__search-input",
1480
+ placeholder: "搜索菜单...",
1481
+ onFocus: c[1] || (c[1] = (o) => Y.value = !0)
1482
+ }, null, 544), [
1483
+ [kt, Z.value]
1484
+ ]),
1485
+ R(Ve, { name: "search-dropdown" }, {
1486
+ default: X(() => [
1487
+ Y.value && (x.value.length > 0 || Z.value) ? (y(), E("div", eo, [
1488
+ x.value.length > 0 ? (y(), E("div", to, [
1489
+ (y(!0), E(me, null, we(x.value, (o) => (y(), E("div", {
1490
+ key: o.path,
1491
+ class: "top-menu__search-item",
1492
+ onClick: (l) => ve(o.path)
1493
+ }, [
1494
+ o.title !== "首页" ? (y(), E("span", no, [
1495
+ $(H(o.icon)) ? (y(), ie(k(ee), {
1496
+ key: 0,
1497
+ name: H(o.icon),
1498
+ size: 16
1499
+ }, null, 8, ["name"])) : (y(), E("span", oo, G(te(o.title)), 1))
1500
+ ])) : le("", !0),
1501
+ s("span", ro, G(o.title), 1),
1502
+ o.parentTitle ? (y(), E("span", ao, G(o.parentTitle), 1)) : le("", !0)
1503
+ ], 8, so))), 128))
1504
+ ])) : (y(), E("div", lo, " 未找到匹配的菜单 "))
1505
+ ])) : le("", !0)
1506
+ ]),
1507
+ _: 1
1508
+ })
1509
+ ], 512),
1510
+ s("div", {
1511
+ class: "top-menu__action",
1512
+ onClick: se,
1513
+ title: O.value ? "退出全屏" : "全屏"
1514
+ }, [
1515
+ R(k(ee), {
1516
+ name: O.value ? "fullscreen-exit" : "fullscreen",
1517
+ size: 16
1518
+ }, null, 8, ["name"])
1519
+ ], 8, io),
1520
+ s("div", {
1521
+ class: "top-menu__action",
1522
+ onClick: ge,
1523
+ title: "换肤设置"
1524
+ }, [
1525
+ R(k(ee), {
1526
+ name: "skin",
1527
+ size: 16
1528
+ })
1529
+ ]),
1530
+ s("div", {
1531
+ class: "top-menu__action",
1532
+ onClick: re,
1533
+ title: "切换主题"
1534
+ }, [
1535
+ R(k(ee), {
1536
+ name: k(_).isDark ? "sun" : "moon",
1537
+ size: 16
1538
+ }, null, 8, ["name"])
1539
+ ]),
1540
+ s("div", {
1541
+ class: "top-menu__user",
1542
+ ref_key: "dropdownRef",
1543
+ ref: T
1544
+ }, [
1545
+ s("div", {
1546
+ class: "top-menu__user-trigger",
1547
+ onClick: it(ce, ["stop"])
1548
+ }, [
1549
+ s("div", co, [
1550
+ s("span", null, G(((u = k(N).userName) == null ? void 0 : u.charAt(0)) || "U"), 1)
1551
+ ]),
1552
+ s("span", uo, G(k(N).userName), 1),
1553
+ s("span", {
1554
+ class: ye(["top-menu__user-arrow", { "is-active": J.value }])
1555
+ }, "▼", 2)
1556
+ ]),
1557
+ R(Ve, { name: "dropdown" }, {
1558
+ default: X(() => {
1559
+ var o;
1560
+ return [
1561
+ J.value ? (y(), E("div", fo, [
1562
+ s("div", po, [
1563
+ s("div", mo, [
1564
+ s("span", null, G(((o = k(N).userName) == null ? void 0 : o.charAt(0)) || "U"), 1)
1565
+ ]),
1566
+ s("div", ho, [
1567
+ s("div", vo, G(k(N).userName), 1),
1568
+ s("div", go, G(k(N).departmentName), 1)
1569
+ ])
1570
+ ]),
1571
+ c[7] || (c[7] = s("div", { class: "top-menu__dropdown-divider" }, null, -1)),
1572
+ s("div", _o, [
1573
+ s("div", {
1574
+ class: "top-menu__dropdown-item",
1575
+ onClick: Me
1576
+ }, [
1577
+ R(k(ee), {
1578
+ name: "user",
1579
+ size: 16
1580
+ }),
1581
+ c[3] || (c[3] = s("span", null, "个人信息", -1))
1582
+ ]),
1583
+ s("div", {
1584
+ class: "top-menu__dropdown-item",
1585
+ onClick: W
1586
+ }, [
1587
+ R(k(ee), {
1588
+ name: "lock",
1589
+ size: 16
1590
+ }),
1591
+ c[4] || (c[4] = s("span", null, "修改密码", -1))
1592
+ ]),
1593
+ c[6] || (c[6] = s("div", { class: "top-menu__dropdown-divider" }, null, -1)),
1594
+ s("div", {
1595
+ class: "top-menu__dropdown-item top-menu__dropdown-item--danger",
1596
+ onClick: U
1597
+ }, [
1598
+ R(k(ee), {
1599
+ name: "logout",
1600
+ size: 16
1601
+ }),
1602
+ c[5] || (c[5] = s("span", null, "退出登录", -1))
1603
+ ])
1604
+ ])
1605
+ ])) : le("", !0)
1606
+ ];
1607
+ }),
1608
+ _: 1
1609
+ })
1610
+ ], 512)
1611
+ ]),
1612
+ R(k(St), {
1613
+ modelValue: V.value,
1614
+ "onUpdate:modelValue": c[2] || (c[2] = (o) => V.value = o),
1615
+ title: "换肤设置",
1616
+ direction: "rtl",
1617
+ size: "320px"
1618
+ }, {
1619
+ default: X(() => [
1620
+ s("div", wo, [
1621
+ s("div", yo, [
1622
+ c[11] || (c[11] = s("div", { class: "settings-title" }, "布局模式", -1)),
1623
+ s("div", ko, [
1624
+ (y(), E(me, null, we(Ne, (o) => s("div", {
1625
+ key: o.value,
1626
+ class: ye(["layout-option", { "is-active": Oe.value === o.value }]),
1627
+ onClick: (l) => S(o.value)
1628
+ }, [
1629
+ s("div", xo, [
1630
+ o.value === "sidebar" ? (y(), E("div", Co, [...c[8] || (c[8] = [
1631
+ s("div", { class: "preview-aside" }, null, -1),
1632
+ s("div", { class: "preview-main" }, [
1633
+ s("div", { class: "preview-header" }),
1634
+ s("div", { class: "preview-content" })
1635
+ ], -1)
1636
+ ])])) : o.value === "top" ? (y(), E("div", No, [...c[9] || (c[9] = [
1637
+ s("div", { class: "preview-header-full" }, null, -1),
1638
+ s("div", { class: "preview-content-full" }, null, -1)
1639
+ ])])) : (y(), E("div", So, [...c[10] || (c[10] = [
1640
+ s("div", { class: "preview-header-mix" }, [
1641
+ s("div", { class: "preview-mix-left" })
1642
+ ], -1),
1643
+ s("div", { class: "preview-mix-body" }, [
1644
+ s("div", { class: "preview-mix-aside" }),
1645
+ s("div", { class: "preview-mix-content" })
1646
+ ], -1)
1647
+ ])]))
1648
+ ]),
1649
+ s("span", Eo, G(o.label), 1)
1650
+ ], 10, bo)), 64))
1651
+ ])
1652
+ ]),
1653
+ s("div", $o, [
1654
+ c[12] || (c[12] = s("div", { class: "settings-title" }, "主题色", -1)),
1655
+ s("div", Mo, [
1656
+ (y(), E(me, null, we(Ue, (o) => s("div", {
1657
+ key: o.value,
1658
+ class: ye(["color-option", { "is-active": k(_).primaryColor === o.value }]),
1659
+ style: Ye({ backgroundColor: o.value }),
1660
+ title: o.label,
1661
+ onClick: (l) => Be(o.value)
1662
+ }, [
1663
+ k(_).primaryColor === o.value ? (y(), ie(k(ee), {
1664
+ key: 0,
1665
+ name: "check",
1666
+ size: 12,
1667
+ color: "#fff"
1668
+ })) : le("", !0)
1669
+ ], 14, Lo)), 64))
1670
+ ])
1671
+ ]),
1672
+ s("div", Io, [
1673
+ c[17] || (c[17] = s("div", { class: "settings-title" }, "功能设置", -1)),
1674
+ s("div", Ao, [
1675
+ s("div", To, [
1676
+ c[14] || (c[14] = s("span", null, "灰色模式", -1)),
1677
+ s("div", {
1678
+ class: ye(["switch-wrapper", { "is-checked": I.value }]),
1679
+ onClick: be
1680
+ }, [...c[13] || (c[13] = [
1681
+ s("span", { class: "switch-core" }, null, -1)
1682
+ ])], 2)
1683
+ ]),
1684
+ s("div", Oo, [
1685
+ c[16] || (c[16] = s("span", null, "暗黑模式", -1)),
1686
+ s("div", {
1687
+ class: ye(["switch-wrapper", { "is-checked": k(_).isDark }]),
1688
+ onClick: Te
1689
+ }, [...c[15] || (c[15] = [
1690
+ s("span", { class: "switch-core" }, null, -1)
1691
+ ])], 2)
1692
+ ])
1693
+ ])
1694
+ ])
1695
+ ])
1696
+ ]),
1697
+ _: 1
1698
+ }, 8, ["modelValue"])
1699
+ ]);
1700
+ };
1701
+ }
1702
+ }), Bo = /* @__PURE__ */ $e(Uo, [["__scopeId", "data-v-da5e391c"]]), Po = { class: "mix-top-menu" }, Ro = { class: "mix-top-menu__logo" }, zo = ["src"], Do = { class: "mix-top-menu__logo-text" }, Fo = { class: "mix-top-menu__menu-content" }, Vo = {
1703
+ key: 0,
1704
+ class: "mix-top-menu__menu-icon"
1705
+ }, jo = {
1706
+ key: 1,
1707
+ class: "mix-top-menu__menu-char"
1708
+ }, qo = { class: "mix-top-menu__menu-text" }, Go = { class: "mix-top-menu__actions" }, Ko = {
1709
+ key: 0,
1710
+ class: "mix-top-menu__search-dropdown"
1711
+ }, Ho = {
1712
+ key: 0,
1713
+ class: "mix-top-menu__search-results"
1714
+ }, Wo = ["onClick"], Xo = {
1715
+ key: 0,
1716
+ class: "mix-top-menu__search-icon-item"
1717
+ }, Yo = {
1718
+ key: 1,
1719
+ class: "mix-top-menu__search-char"
1720
+ }, Jo = { class: "mix-top-menu__search-item-title" }, Zo = {
1721
+ key: 1,
1722
+ class: "mix-top-menu__search-item-parent"
1723
+ }, Qo = {
1724
+ key: 1,
1725
+ class: "mix-top-menu__search-empty"
1726
+ }, er = ["title"], tr = { class: "mix-top-menu__avatar" }, sr = { class: "mix-top-menu__user-name" }, nr = {
1727
+ key: 0,
1728
+ class: "mix-top-menu__dropdown"
1729
+ }, or = { class: "mix-top-menu__dropdown-header" }, rr = { class: "mix-top-menu__dropdown-avatar" }, ar = { class: "mix-top-menu__dropdown-info" }, lr = { class: "mix-top-menu__dropdown-name" }, ir = { class: "mix-top-menu__dropdown-role" }, cr = { class: "mix-top-menu__dropdown-menu" }, ur = { class: "settings-drawer" }, dr = { class: "settings-section" }, fr = { class: "settings-layout-options" }, pr = ["onClick"], mr = { class: "layout-option__preview" }, hr = {
1730
+ key: 0,
1731
+ class: "layout-preview-sidebar"
1732
+ }, vr = {
1733
+ key: 1,
1734
+ class: "layout-preview-top"
1735
+ }, gr = {
1736
+ key: 2,
1737
+ class: "layout-preview-mix"
1738
+ }, _r = { class: "layout-option__label" }, wr = { class: "settings-section" }, yr = { class: "settings-color-options" }, kr = ["title", "onClick"], br = { class: "settings-section" }, xr = { class: "settings-switch-list" }, Cr = { class: "settings-switch-item" }, Nr = { class: "settings-switch-item" }, Sr = /* @__PURE__ */ Ae({
1739
+ __name: "MixTopMenu",
1740
+ props: {
1741
+ logoSrc: { default: "/vite.svg" }
1742
+ },
1743
+ setup(n) {
1744
+ const d = n, h = qe(), p = ze(), v = Pe(), _ = De(), N = Ee(), g = Ze(), L = P(""), w = (o, l = "") => {
1745
+ const i = [];
1746
+ return o.forEach((a) => {
1747
+ a.children && a.children.length > 0 ? i.push(...w(a.children, a.menuName)) : i.push({ ...a, parentTitle: l, title: a.menuName, path: a.menuUrl });
1748
+ }), i;
1749
+ }, x = j(() => H.value.trim() ? w(v.menuList).filter(
1750
+ (l) => l.title.toLowerCase().includes(H.value.toLowerCase())
1751
+ ) : []), M = j(() => {
1752
+ const o = v.menuList.find((l) => l.menuUrl === L.value);
1753
+ return (o == null ? void 0 : o.children) || [];
1754
+ }), C = j(() => v.menuList.find((o) => !!(h.path === o.menuUrl || o.children && o.children.some((l) => h.path.startsWith(l.menuUrl) || h.path === l.menuUrl)))), K = () => {
1755
+ C.value ? L.value = C.value.menuUrl : v.menuList.length > 0 && (L.value = v.menuList[0].menuUrl);
1756
+ }, J = (o) => {
1757
+ L.value = o;
1758
+ const l = v.menuList.find((i) => i.menuUrl === o);
1759
+ if (l)
1760
+ if (l.children && l.children.length > 0) {
1761
+ const i = l.children[0].menuUrl;
1762
+ h.path !== i && p.push(i);
1763
+ } else
1764
+ h.path !== o && p.push(o);
1765
+ }, T = j(() => _.isDark ? "#1d1e1f" : "#fff"), O = j(() => _.isDark ? "#cfd3dc" : "#303133"), V = j(() => "#409eff"), I = P(!1), Y = P(null), Z = P(!1), Q = P(!1), A = P(!1), B = P(!1), H = P(""), te = P(null);
1766
+ Xe(() => h.path, () => {
1767
+ K(), _.setMixSubMenus(M.value);
1768
+ }), Xe(() => v.menuList, (o) => {
1769
+ o && o.length > 0 && (K(), _.setMixSubMenus(M.value));
1770
+ }, { immediate: !0 });
1771
+ const $ = /* @__PURE__ */ new Set([
1772
+ "arrow-up",
1773
+ "arrow-down",
1774
+ "arrow-left",
1775
+ "arrow-right",
1776
+ "caret-down",
1777
+ "caret-right",
1778
+ "plus",
1779
+ "minus",
1780
+ "close",
1781
+ "check",
1782
+ "edit",
1783
+ "delete",
1784
+ "copy",
1785
+ "download",
1786
+ "upload",
1787
+ "refresh",
1788
+ "search",
1789
+ "filter",
1790
+ "more",
1791
+ "setting",
1792
+ "share",
1793
+ "loading",
1794
+ "info",
1795
+ "success",
1796
+ "warning",
1797
+ "error",
1798
+ "question",
1799
+ "user",
1800
+ "user-add",
1801
+ "user-group",
1802
+ "logout",
1803
+ "login",
1804
+ "file",
1805
+ "folder",
1806
+ "folder-open",
1807
+ "document",
1808
+ "image",
1809
+ "video",
1810
+ "music",
1811
+ "camera",
1812
+ "mail",
1813
+ "phone",
1814
+ "chat",
1815
+ "bell",
1816
+ "message",
1817
+ "eye",
1818
+ "eye-off",
1819
+ "calendar",
1820
+ "clock",
1821
+ "history",
1822
+ "timer",
1823
+ "location",
1824
+ "map",
1825
+ "globe",
1826
+ "star",
1827
+ "heart",
1828
+ "thumb-up",
1829
+ "link",
1830
+ "external-link",
1831
+ "lock",
1832
+ "unlock",
1833
+ "key",
1834
+ "home",
1835
+ "menu",
1836
+ "menu-fold",
1837
+ "menu-unfold",
1838
+ "sidebar-fold",
1839
+ "sidebar-expand",
1840
+ "sidebar-left",
1841
+ "dashboard",
1842
+ "chart",
1843
+ "chart-pie",
1844
+ "chart-line",
1845
+ "report",
1846
+ "analytics",
1847
+ "system",
1848
+ "permission",
1849
+ "role",
1850
+ "user-manage",
1851
+ "log",
1852
+ "notification",
1853
+ "app",
1854
+ "list",
1855
+ "grid",
1856
+ "fullscreen",
1857
+ "fullscreen-exit",
1858
+ "zoom-in",
1859
+ "zoom-out",
1860
+ "print",
1861
+ "bookmark",
1862
+ "tag",
1863
+ "code",
1864
+ "terminal",
1865
+ "database",
1866
+ "server",
1867
+ "cloud",
1868
+ "gift",
1869
+ "moon",
1870
+ "sun",
1871
+ "theme",
1872
+ "skin"
1873
+ ]), re = (o) => {
1874
+ if (!o || o === "") return "";
1875
+ if (o.startsWith("tineco-icon-")) {
1876
+ const i = o.replace("tineco-icon-", "");
1877
+ return {
1878
+ home: "home",
1879
+ dashboard: "dashboard",
1880
+ system: "system",
1881
+ user: "user",
1882
+ role: "role",
1883
+ menu: "list",
1884
+ setting: "setting",
1885
+ file: "file",
1886
+ folder: "folder",
1887
+ chart: "chart",
1888
+ report: "report",
1889
+ analytics: "analytics"
1890
+ }[i] || i;
1891
+ }
1892
+ return {
1893
+ dashboard: "dashboard",
1894
+ system: "system",
1895
+ user: "user",
1896
+ role: "role",
1897
+ menu: "list",
1898
+ setting: "setting",
1899
+ home: "home",
1900
+ chart: "chart",
1901
+ report: "report",
1902
+ analytics: "analytics",
1903
+ permission: "permission",
1904
+ log: "log",
1905
+ notification: "notification",
1906
+ app: "app",
1907
+ list: "list",
1908
+ grid: "grid"
1909
+ }[o] || o;
1910
+ }, se = (o) => o ? o.charAt(0) : "", z = (o) => $.has(o), ce = () => {
1911
+ _.toggleTheme(), Q.value = !1;
1912
+ }, ue = () => {
1913
+ document.fullscreenElement ? document.exitFullscreen() : document.documentElement.requestFullscreen();
1914
+ }, ke = () => {
1915
+ Z.value = !!document.fullscreenElement;
1916
+ }, ve = () => {
1917
+ I.value = !I.value;
1918
+ }, ge = () => {
1919
+ I.value = !1;
1920
+ }, _e = () => {
1921
+ B.value = !1, H.value = "";
1922
+ }, be = (o) => {
1923
+ p.push(o), _e();
1924
+ }, Te = () => {
1925
+ Q.value = !0;
1926
+ }, Ne = (o) => {
1927
+ A.value = o;
1928
+ const l = document.documentElement;
1929
+ o ? l.classList.add("grey-mode") : l.classList.remove("grey-mode");
1930
+ }, Oe = () => {
1931
+ Ne(!A.value), Q.value = !1;
1932
+ }, S = () => {
1933
+ _.toggleTheme(), Q.value = !1;
1934
+ }, Ue = [
1935
+ { value: "sidebar", label: "左侧菜单", icon: "sidebar-left" },
1936
+ { value: "top", label: "顶部菜单", icon: "menu" },
1937
+ { value: "mix", label: "混合菜单", icon: "grid" }
1938
+ ], Be = j(() => _.layout), Me = (o) => {
1939
+ _.setLayout(o), Q.value = !1;
1940
+ }, W = [
1941
+ { value: "#409eff", label: "默认蓝" },
1942
+ { value: "#1890ff", label: "科技蓝" },
1943
+ { value: "#52c41a", label: "极光绿" },
1944
+ { value: "#faad14", label: "日落橙" },
1945
+ { value: "#f5222d", label: "薄暮红" },
1946
+ { value: "#722ed1", label: "酱紫" }
1947
+ ], U = (o) => {
1948
+ _.setPrimaryColor(o), Q.value = !1;
1949
+ }, e = () => {
1950
+ ge(), p.push("/profile");
1951
+ }, t = () => {
1952
+ ge(), p.push("/change-password");
1953
+ }, r = () => {
1954
+ ge(), g.logout(), N.clearUserInfo(), v.clearMenu(), p.push("/login");
1955
+ }, c = (o) => {
1956
+ Y.value && !Y.value.contains(o.target) && ge(), te.value && !te.value.contains(o.target) && _e();
1957
+ }, u = (o) => {
1958
+ o.key === "Escape" && (_e(), ge());
1959
+ };
1960
+ return wt(() => {
1961
+ document.addEventListener("click", c), document.addEventListener("fullscreenchange", ke), document.addEventListener("keydown", u), A.value = document.documentElement.classList.contains("grey-mode"), K();
1962
+ }), yt(() => {
1963
+ document.removeEventListener("click", c), document.removeEventListener("fullscreenchange", ke), document.removeEventListener("keydown", u);
1964
+ }), (o, l) => {
1965
+ var i;
1966
+ return y(), E("div", Po, [
1967
+ s("div", Ro, [
1968
+ s("img", {
1969
+ src: d.logoSrc,
1970
+ alt: "Logo",
1971
+ class: "mix-top-menu__logo-img"
1972
+ }, null, 8, zo),
1973
+ s("span", Do, G(k(_).appName), 1)
1974
+ ]),
1975
+ R(k(Nt), {
1976
+ "model-value": L.value,
1977
+ mode: "horizontal",
1978
+ "background-color": T.value,
1979
+ "text-color": O.value,
1980
+ "active-text-color": V.value,
1981
+ class: "mix-top-menu__menu",
1982
+ onSelect: J
1983
+ }, {
1984
+ default: X(() => [
1985
+ (y(!0), E(me, null, we(k(v).menuList, (a) => (y(), ie(k(He), {
1986
+ key: a.menuUrl,
1987
+ index: a.menuUrl
1988
+ }, {
1989
+ default: X(() => [
1990
+ s("span", Fo, [
1991
+ a.menuName !== "首页" ? (y(), E("span", Vo, [
1992
+ z(re(a.icon)) ? (y(), ie(k(ee), {
1993
+ key: 0,
1994
+ name: re(a.icon),
1995
+ size: 16
1996
+ }, null, 8, ["name"])) : (y(), E("span", jo, G(se(a.menuName)), 1))
1997
+ ])) : le("", !0),
1998
+ s("span", qo, G(a.menuName), 1)
1999
+ ])
2000
+ ]),
2001
+ _: 2
2002
+ }, 1032, ["index"]))), 128))
2003
+ ]),
2004
+ _: 1
2005
+ }, 8, ["model-value", "background-color", "text-color", "active-text-color"]),
2006
+ s("div", Go, [
2007
+ s("div", {
2008
+ class: "mix-top-menu__search",
2009
+ ref_key: "searchRef",
2010
+ ref: te
2011
+ }, [
2012
+ R(k(ee), {
2013
+ name: "search",
2014
+ size: 14,
2015
+ class: "mix-top-menu__search-icon"
2016
+ }),
2017
+ lt(s("input", {
2018
+ "onUpdate:modelValue": l[0] || (l[0] = (a) => H.value = a),
2019
+ type: "text",
2020
+ class: "mix-top-menu__search-input",
2021
+ placeholder: "搜索菜单...",
2022
+ onFocus: l[1] || (l[1] = (a) => B.value = !0)
2023
+ }, null, 544), [
2024
+ [kt, H.value]
2025
+ ]),
2026
+ R(Ve, { name: "search-dropdown" }, {
2027
+ default: X(() => [
2028
+ B.value && (x.value.length > 0 || H.value) ? (y(), E("div", Ko, [
2029
+ x.value.length > 0 ? (y(), E("div", Ho, [
2030
+ (y(!0), E(me, null, we(x.value, (a) => (y(), E("div", {
2031
+ key: a.path,
2032
+ class: "mix-top-menu__search-item",
2033
+ onClick: (m) => be(a.path)
2034
+ }, [
2035
+ a.title !== "首页" ? (y(), E("span", Xo, [
2036
+ z(re(a.icon)) ? (y(), ie(k(ee), {
2037
+ key: 0,
2038
+ name: re(a.icon),
2039
+ size: 16
2040
+ }, null, 8, ["name"])) : (y(), E("span", Yo, G(se(a.title)), 1))
2041
+ ])) : le("", !0),
2042
+ s("span", Jo, G(a.title), 1),
2043
+ a.parentTitle ? (y(), E("span", Zo, G(a.parentTitle), 1)) : le("", !0)
2044
+ ], 8, Wo))), 128))
2045
+ ])) : (y(), E("div", Qo, " 未找到匹配的菜单 "))
2046
+ ])) : le("", !0)
2047
+ ]),
2048
+ _: 1
2049
+ })
2050
+ ], 512),
2051
+ s("div", {
2052
+ class: "mix-top-menu__action",
2053
+ onClick: ue,
2054
+ title: Z.value ? "退出全屏" : "全屏"
2055
+ }, [
2056
+ R(k(ee), {
2057
+ name: Z.value ? "fullscreen-exit" : "fullscreen",
2058
+ size: 16
2059
+ }, null, 8, ["name"])
2060
+ ], 8, er),
2061
+ s("div", {
2062
+ class: "mix-top-menu__action",
2063
+ onClick: Te,
2064
+ title: "换肤设置"
2065
+ }, [
2066
+ R(k(ee), {
2067
+ name: "skin",
2068
+ size: 16
2069
+ })
2070
+ ]),
2071
+ s("div", {
2072
+ class: "mix-top-menu__action",
2073
+ onClick: ce,
2074
+ title: "切换主题"
2075
+ }, [
2076
+ R(k(ee), {
2077
+ name: k(_).isDark ? "sun" : "moon",
2078
+ size: 16
2079
+ }, null, 8, ["name"])
2080
+ ]),
2081
+ s("div", {
2082
+ class: "mix-top-menu__user",
2083
+ ref_key: "dropdownRef",
2084
+ ref: Y
2085
+ }, [
2086
+ s("div", {
2087
+ class: "mix-top-menu__user-trigger",
2088
+ onClick: it(ve, ["stop"])
2089
+ }, [
2090
+ s("div", tr, [
2091
+ s("span", null, G(((i = k(N).userName) == null ? void 0 : i.charAt(0)) || "U"), 1)
2092
+ ]),
2093
+ s("span", sr, G(k(N).userName), 1),
2094
+ s("span", {
2095
+ class: ye(["mix-top-menu__user-arrow", { "is-active": I.value }])
2096
+ }, "▼", 2)
2097
+ ]),
2098
+ R(Ve, { name: "dropdown" }, {
2099
+ default: X(() => {
2100
+ var a;
2101
+ return [
2102
+ I.value ? (y(), E("div", nr, [
2103
+ s("div", or, [
2104
+ s("div", rr, [
2105
+ s("span", null, G(((a = k(N).userName) == null ? void 0 : a.charAt(0)) || "U"), 1)
2106
+ ]),
2107
+ s("div", ar, [
2108
+ s("div", lr, G(k(N).userName), 1),
2109
+ s("div", ir, G(k(N).departmentName), 1)
2110
+ ])
2111
+ ]),
2112
+ l[7] || (l[7] = s("div", { class: "mix-top-menu__dropdown-divider" }, null, -1)),
2113
+ s("div", cr, [
2114
+ s("div", {
2115
+ class: "mix-top-menu__dropdown-item",
2116
+ onClick: e
2117
+ }, [
2118
+ R(k(ee), {
2119
+ name: "user",
2120
+ size: 16
2121
+ }),
2122
+ l[3] || (l[3] = s("span", null, "个人信息", -1))
2123
+ ]),
2124
+ s("div", {
2125
+ class: "mix-top-menu__dropdown-item",
2126
+ onClick: t
2127
+ }, [
2128
+ R(k(ee), {
2129
+ name: "lock",
2130
+ size: 16
2131
+ }),
2132
+ l[4] || (l[4] = s("span", null, "修改密码", -1))
2133
+ ]),
2134
+ l[6] || (l[6] = s("div", { class: "mix-top-menu__dropdown-divider" }, null, -1)),
2135
+ s("div", {
2136
+ class: "mix-top-menu__dropdown-item mix-top-menu__dropdown-item--danger",
2137
+ onClick: r
2138
+ }, [
2139
+ R(k(ee), {
2140
+ name: "logout",
2141
+ size: 16
2142
+ }),
2143
+ l[5] || (l[5] = s("span", null, "退出登录", -1))
2144
+ ])
2145
+ ])
2146
+ ])) : le("", !0)
2147
+ ];
2148
+ }),
2149
+ _: 1
2150
+ })
2151
+ ], 512)
2152
+ ]),
2153
+ R(k(St), {
2154
+ modelValue: Q.value,
2155
+ "onUpdate:modelValue": l[2] || (l[2] = (a) => Q.value = a),
2156
+ title: "换肤设置",
2157
+ direction: "rtl",
2158
+ size: "320px"
2159
+ }, {
2160
+ default: X(() => [
2161
+ s("div", ur, [
2162
+ s("div", dr, [
2163
+ l[11] || (l[11] = s("div", { class: "settings-title" }, "布局模式", -1)),
2164
+ s("div", fr, [
2165
+ (y(), E(me, null, we(Ue, (a) => s("div", {
2166
+ key: a.value,
2167
+ class: ye(["layout-option", { "is-active": Be.value === a.value }]),
2168
+ onClick: (m) => Me(a.value)
2169
+ }, [
2170
+ s("div", mr, [
2171
+ a.value === "sidebar" ? (y(), E("div", hr, [...l[8] || (l[8] = [
2172
+ s("div", { class: "preview-aside" }, null, -1),
2173
+ s("div", { class: "preview-main" }, [
2174
+ s("div", { class: "preview-header" }),
2175
+ s("div", { class: "preview-content" })
2176
+ ], -1)
2177
+ ])])) : a.value === "top" ? (y(), E("div", vr, [...l[9] || (l[9] = [
2178
+ s("div", { class: "preview-header-full" }, null, -1),
2179
+ s("div", { class: "preview-content-full" }, null, -1)
2180
+ ])])) : (y(), E("div", gr, [...l[10] || (l[10] = [
2181
+ s("div", { class: "preview-header-mix" }, [
2182
+ s("div", { class: "preview-mix-left" })
2183
+ ], -1),
2184
+ s("div", { class: "preview-mix-body" }, [
2185
+ s("div", { class: "preview-mix-aside" }),
2186
+ s("div", { class: "preview-mix-content" })
2187
+ ], -1)
2188
+ ])]))
2189
+ ]),
2190
+ s("span", _r, G(a.label), 1)
2191
+ ], 10, pr)), 64))
2192
+ ])
2193
+ ]),
2194
+ s("div", wr, [
2195
+ l[12] || (l[12] = s("div", { class: "settings-title" }, "主题色", -1)),
2196
+ s("div", yr, [
2197
+ (y(), E(me, null, we(W, (a) => s("div", {
2198
+ key: a.value,
2199
+ class: ye(["color-option", { "is-active": k(_).primaryColor === a.value }]),
2200
+ style: Ye({ backgroundColor: a.value }),
2201
+ title: a.label,
2202
+ onClick: (m) => U(a.value)
2203
+ }, [
2204
+ k(_).primaryColor === a.value ? (y(), ie(k(ee), {
2205
+ key: 0,
2206
+ name: "check",
2207
+ size: 12,
2208
+ color: "#fff"
2209
+ })) : le("", !0)
2210
+ ], 14, kr)), 64))
2211
+ ])
2212
+ ]),
2213
+ s("div", br, [
2214
+ l[17] || (l[17] = s("div", { class: "settings-title" }, "功能设置", -1)),
2215
+ s("div", xr, [
2216
+ s("div", Cr, [
2217
+ l[14] || (l[14] = s("span", null, "灰色模式", -1)),
2218
+ s("div", {
2219
+ class: ye(["switch-wrapper", { "is-checked": A.value }]),
2220
+ onClick: Oe
2221
+ }, [...l[13] || (l[13] = [
2222
+ s("span", { class: "switch-core" }, null, -1)
2223
+ ])], 2)
2224
+ ]),
2225
+ s("div", Nr, [
2226
+ l[16] || (l[16] = s("span", null, "暗黑模式", -1)),
2227
+ s("div", {
2228
+ class: ye(["switch-wrapper", { "is-checked": k(_).isDark }]),
2229
+ onClick: S
2230
+ }, [...l[15] || (l[15] = [
2231
+ s("span", { class: "switch-core" }, null, -1)
2232
+ ])], 2)
2233
+ ])
2234
+ ])
2235
+ ])
2236
+ ])
2237
+ ]),
2238
+ _: 1
2239
+ }, 8, ["modelValue"])
2240
+ ]);
2241
+ };
2242
+ }
2243
+ }), Er = /* @__PURE__ */ $e(Sr, [["__scopeId", "data-v-18f26903"]]), $r = {
2244
+ key: 0,
2245
+ class: "layout layout--sidebar"
2246
+ }, Mr = { class: "layout__main" }, Lr = { class: "layout__header" }, Ir = { class: "layout__content" }, Ar = {
2247
+ key: 1,
2248
+ class: "layout layout--top"
2249
+ }, Tr = { class: "layout__top-menu" }, Or = { class: "layout__main" }, Ur = { class: "layout__content" }, Br = {
2250
+ key: 2,
2251
+ class: "layout layout--mix"
2252
+ }, Pr = { class: "layout__mix-top-menu" }, Rr = { class: "layout__mix-body" }, zr = { class: "layout__content" }, Dr = /* @__PURE__ */ Ae({
2253
+ __name: "index",
2254
+ props: {
2255
+ logoSrc: { default: "/vite.svg" }
2256
+ },
2257
+ setup(n) {
2258
+ const d = n, h = De(), p = Pe(), v = j(
2259
+ () => h.isCollapsed ? "64px" : "210px"
2260
+ ), _ = j(() => h.layout), N = j(() => _.value === "mix"), g = j(() => _.value === "sidebar" ? p.menuList : _.value === "mix" ? h.mixSubMenus : []), L = j(() => N.value ? g.value.length > 0 : !1);
2261
+ return (w, x) => {
2262
+ const M = Pt("router-view");
2263
+ return y(), E(me, null, [
2264
+ _.value === "sidebar" ? (y(), E("div", $r, [
2265
+ s("aside", {
2266
+ class: "layout__aside",
2267
+ style: Ye({ width: v.value })
2268
+ }, [
2269
+ R(Bt, {
2270
+ "menu-list": g.value,
2271
+ "show-logo": !0,
2272
+ "show-user": !0,
2273
+ "logo-src": d.logoSrc
2274
+ }, null, 8, ["menu-list", "logo-src"])
2275
+ ], 4),
2276
+ s("div", Mr, [
2277
+ s("header", Lr, [
2278
+ R($n)
2279
+ ]),
2280
+ s("main", Ir, [
2281
+ R(M)
2282
+ ])
2283
+ ])
2284
+ ])) : le("", !0),
2285
+ _.value === "top" ? (y(), E("div", Ar, [
2286
+ s("div", Tr, [
2287
+ R(Bo, {
2288
+ "logo-src": d.logoSrc
2289
+ }, null, 8, ["logo-src"])
2290
+ ]),
2291
+ s("div", Or, [
2292
+ s("main", Ur, [
2293
+ R(M)
2294
+ ])
2295
+ ])
2296
+ ])) : le("", !0),
2297
+ _.value === "mix" ? (y(), E("div", Br, [
2298
+ s("div", Pr, [
2299
+ R(Er, {
2300
+ "logo-src": d.logoSrc
2301
+ }, null, 8, ["logo-src"])
2302
+ ]),
2303
+ s("div", Rr, [
2304
+ L.value ? (y(), E("aside", {
2305
+ key: 0,
2306
+ class: "layout__aside",
2307
+ style: Ye({ width: v.value })
2308
+ }, [
2309
+ R(Bt, {
2310
+ "menu-list": g.value,
2311
+ "show-logo": !1,
2312
+ "show-user": !1
2313
+ }, null, 8, ["menu-list"])
2314
+ ], 4)) : le("", !0),
2315
+ s("main", zr, [
2316
+ R(M)
2317
+ ])
2318
+ ])
2319
+ ])) : le("", !0)
2320
+ ], 64);
2321
+ };
2322
+ }
2323
+ }), jt = /* @__PURE__ */ $e(Dr, [["__scopeId", "data-v-3317ef3c"]]), Fr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2324
+ __proto__: null,
2325
+ default: jt
2326
+ }, Symbol.toStringTag, { value: "Module" })), Vr = { class: "tabs-wrapper" }, jr = { class: "tab-label" }, qr = ["onClick"], Gr = /* @__PURE__ */ Ae({
2327
+ __name: "Tabs",
2328
+ setup(n) {
2329
+ const d = qe(), h = ze(), p = j(() => {
2330
+ const g = [];
2331
+ return d.matched.forEach((L) => {
2332
+ var w;
2333
+ (w = L.meta) != null && w.affix && g.push({
2334
+ name: L.name,
2335
+ title: L.meta.title,
2336
+ path: L.path,
2337
+ affix: !0
2338
+ });
2339
+ }), g;
2340
+ }), v = j(() => d.path), _ = (g) => {
2341
+ h.push(g);
2342
+ }, N = (g) => {
2343
+ const L = p.value.find((w) => w.path === g);
2344
+ if (!(L != null && L.affix) && g === v.value) {
2345
+ const w = p.value.findIndex((M) => M.path === g), x = p.value[w - 1] || p.value[w + 1];
2346
+ x && h.push(x.path);
2347
+ }
2348
+ };
2349
+ return (g, L) => (y(), E("div", Vr, [
2350
+ R(k(ns), {
2351
+ modelValue: v.value,
2352
+ "onUpdate:modelValue": L[0] || (L[0] = (w) => v.value = w),
2353
+ type: "card",
2354
+ onTabClick: _
2355
+ }, {
2356
+ default: X(() => [
2357
+ (y(!0), E(me, null, we(p.value, (w) => (y(), ie(k(os), {
2358
+ key: w.path,
2359
+ name: w.path,
2360
+ label: w.title,
2361
+ closable: !w.affix
2362
+ }, {
2363
+ label: X(() => [
2364
+ s("span", jr, [
2365
+ Fe(G(w.title) + " ", 1),
2366
+ w.affix ? le("", !0) : (y(), E("span", {
2367
+ key: 0,
2368
+ class: "tab-close",
2369
+ onClick: it((x) => N(w.path), ["stop"])
2370
+ }, " ✕ ", 8, qr))
2371
+ ])
2372
+ ]),
2373
+ _: 2
2374
+ }, 1032, ["name", "label", "closable"]))), 128))
2375
+ ]),
2376
+ _: 1
2377
+ }, 8, ["modelValue"])
2378
+ ]));
2379
+ }
2380
+ }), Za = /* @__PURE__ */ $e(Gr, [["__scopeId", "data-v-9156d8cd"]]), Kr = {}, Hr = { class: "footer" };
2381
+ function Wr(n, d) {
2382
+ return y(), E("div", Hr, [...d[0] || (d[0] = [
2383
+ s("span", null, "Copyright © 2024 Xto Demo. All Rights Reserved.", -1)
2384
+ ])]);
2385
+ }
2386
+ const Qa = /* @__PURE__ */ $e(Kr, [["render", Wr], ["__scopeId", "data-v-4852826a"]]);
2387
+ var Xr = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
2388
+ function Yr(n) {
2389
+ return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
2390
+ }
2391
+ var dt = { exports: {} }, qt = { exports: {} }, Gt = { exports: {} };
2392
+ (function(n) {
2393
+ (function(d) {
2394
+ var h, p = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, v = Math.ceil, _ = Math.floor, N = "[BigNumber Error] ", g = N + "Number primitive has more than 15 significant digits: ", L = 1e14, w = 14, x = 9007199254740991, M = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13], C = 1e7, K = 1e9;
2395
+ function J(A) {
2396
+ var B, H, te, $ = S.prototype = { constructor: S, toString: null, valueOf: null }, re = new S(1), se = 20, z = 4, ce = -7, ue = 21, ke = -1e7, ve = 1e7, ge = !1, _e = 1, be = 0, Te = {
2397
+ prefix: "",
2398
+ groupSize: 3,
2399
+ secondaryGroupSize: 0,
2400
+ groupSeparator: ",",
2401
+ decimalSeparator: ".",
2402
+ fractionGroupSize: 0,
2403
+ fractionGroupSeparator: " ",
2404
+ // non-breaking space
2405
+ suffix: ""
2406
+ }, Ne = "0123456789abcdefghijklmnopqrstuvwxyz", Oe = !0;
2407
+ function S(e, t) {
2408
+ var r, c, u, o, l, i, a, m, f = this;
2409
+ if (!(f instanceof S)) return new S(e, t);
2410
+ if (t == null) {
2411
+ if (e && e._isBigNumber === !0) {
2412
+ f.s = e.s, !e.c || e.e > ve ? f.c = f.e = null : e.e < ke ? f.c = [f.e = 0] : (f.e = e.e, f.c = e.c.slice());
2413
+ return;
2414
+ }
2415
+ if ((i = typeof e == "number") && e * 0 == 0) {
2416
+ if (f.s = 1 / e < 0 ? (e = -e, -1) : 1, e === ~~e) {
2417
+ for (o = 0, l = e; l >= 10; l /= 10, o++) ;
2418
+ o > ve ? f.c = f.e = null : (f.e = o, f.c = [e]);
2419
+ return;
2420
+ }
2421
+ m = String(e);
2422
+ } else {
2423
+ if (!p.test(m = String(e))) return te(f, m, i);
2424
+ f.s = m.charCodeAt(0) == 45 ? (m = m.slice(1), -1) : 1;
2425
+ }
2426
+ (o = m.indexOf(".")) > -1 && (m = m.replace(".", "")), (l = m.search(/e/i)) > 0 ? (o < 0 && (o = l), o += +m.slice(l + 1), m = m.substring(0, l)) : o < 0 && (o = m.length);
2427
+ } else {
2428
+ if (I(t, 2, Ne.length, "Base"), t == 10 && Oe)
2429
+ return f = new S(e), W(f, se + f.e + 1, z);
2430
+ if (m = String(e), i = typeof e == "number") {
2431
+ if (e * 0 != 0) return te(f, m, i, t);
2432
+ if (f.s = 1 / e < 0 ? (m = m.slice(1), -1) : 1, S.DEBUG && m.replace(/^0\.0*|\./, "").length > 15)
2433
+ throw Error(g + e);
2434
+ } else
2435
+ f.s = m.charCodeAt(0) === 45 ? (m = m.slice(1), -1) : 1;
2436
+ for (r = Ne.slice(0, t), o = l = 0, a = m.length; l < a; l++)
2437
+ if (r.indexOf(c = m.charAt(l)) < 0) {
2438
+ if (c == ".") {
2439
+ if (l > o) {
2440
+ o = a;
2441
+ continue;
2442
+ }
2443
+ } else if (!u && (m == m.toUpperCase() && (m = m.toLowerCase()) || m == m.toLowerCase() && (m = m.toUpperCase()))) {
2444
+ u = !0, l = -1, o = 0;
2445
+ continue;
2446
+ }
2447
+ return te(f, String(e), i, t);
2448
+ }
2449
+ i = !1, m = H(m, t, 10, f.s), (o = m.indexOf(".")) > -1 ? m = m.replace(".", "") : o = m.length;
2450
+ }
2451
+ for (l = 0; m.charCodeAt(l) === 48; l++) ;
2452
+ for (a = m.length; m.charCodeAt(--a) === 48; ) ;
2453
+ if (m = m.slice(l, ++a)) {
2454
+ if (a -= l, i && S.DEBUG && a > 15 && (e > x || e !== _(e)))
2455
+ throw Error(g + f.s * e);
2456
+ if ((o = o - l - 1) > ve)
2457
+ f.c = f.e = null;
2458
+ else if (o < ke)
2459
+ f.c = [f.e = 0];
2460
+ else {
2461
+ if (f.e = o, f.c = [], l = (o + 1) % w, o < 0 && (l += w), l < a) {
2462
+ for (l && f.c.push(+m.slice(0, l)), a -= w; l < a; )
2463
+ f.c.push(+m.slice(l, l += w));
2464
+ l = w - (m = m.slice(l)).length;
2465
+ } else
2466
+ l -= a;
2467
+ for (; l--; m += "0") ;
2468
+ f.c.push(+m);
2469
+ }
2470
+ } else
2471
+ f.c = [f.e = 0];
2472
+ }
2473
+ S.clone = J, S.ROUND_UP = 0, S.ROUND_DOWN = 1, S.ROUND_CEIL = 2, S.ROUND_FLOOR = 3, S.ROUND_HALF_UP = 4, S.ROUND_HALF_DOWN = 5, S.ROUND_HALF_EVEN = 6, S.ROUND_HALF_CEIL = 7, S.ROUND_HALF_FLOOR = 8, S.EUCLID = 9, S.config = S.set = function(e) {
2474
+ var t, r;
2475
+ if (e != null)
2476
+ if (typeof e == "object") {
2477
+ if (e.hasOwnProperty(t = "DECIMAL_PLACES") && (r = e[t], I(r, 0, K, t), se = r), e.hasOwnProperty(t = "ROUNDING_MODE") && (r = e[t], I(r, 0, 8, t), z = r), e.hasOwnProperty(t = "EXPONENTIAL_AT") && (r = e[t], r && r.pop ? (I(r[0], -K, 0, t), I(r[1], 0, K, t), ce = r[0], ue = r[1]) : (I(r, -K, K, t), ce = -(ue = r < 0 ? -r : r))), e.hasOwnProperty(t = "RANGE"))
2478
+ if (r = e[t], r && r.pop)
2479
+ I(r[0], -K, -1, t), I(r[1], 1, K, t), ke = r[0], ve = r[1];
2480
+ else if (I(r, -K, K, t), r)
2481
+ ke = -(ve = r < 0 ? -r : r);
2482
+ else
2483
+ throw Error(N + t + " cannot be zero: " + r);
2484
+ if (e.hasOwnProperty(t = "CRYPTO"))
2485
+ if (r = e[t], r === !!r)
2486
+ if (r)
2487
+ if (typeof crypto < "u" && crypto && (crypto.getRandomValues || crypto.randomBytes))
2488
+ ge = r;
2489
+ else
2490
+ throw ge = !r, Error(N + "crypto unavailable");
2491
+ else
2492
+ ge = r;
2493
+ else
2494
+ throw Error(N + t + " not true or false: " + r);
2495
+ if (e.hasOwnProperty(t = "MODULO_MODE") && (r = e[t], I(r, 0, 9, t), _e = r), e.hasOwnProperty(t = "POW_PRECISION") && (r = e[t], I(r, 0, K, t), be = r), e.hasOwnProperty(t = "FORMAT"))
2496
+ if (r = e[t], typeof r == "object") Te = r;
2497
+ else throw Error(N + t + " not an object: " + r);
2498
+ if (e.hasOwnProperty(t = "ALPHABET"))
2499
+ if (r = e[t], typeof r == "string" && !/^.?$|[+\-.\s]|(.).*\1/.test(r))
2500
+ Oe = r.slice(0, 10) == "0123456789", Ne = r;
2501
+ else
2502
+ throw Error(N + t + " invalid: " + r);
2503
+ } else
2504
+ throw Error(N + "Object expected: " + e);
2505
+ return {
2506
+ DECIMAL_PLACES: se,
2507
+ ROUNDING_MODE: z,
2508
+ EXPONENTIAL_AT: [ce, ue],
2509
+ RANGE: [ke, ve],
2510
+ CRYPTO: ge,
2511
+ MODULO_MODE: _e,
2512
+ POW_PRECISION: be,
2513
+ FORMAT: Te,
2514
+ ALPHABET: Ne
2515
+ };
2516
+ }, S.isBigNumber = function(e) {
2517
+ if (!e || e._isBigNumber !== !0) return !1;
2518
+ if (!S.DEBUG) return !0;
2519
+ var t, r, c = e.c, u = e.e, o = e.s;
2520
+ e: if ({}.toString.call(c) == "[object Array]") {
2521
+ if ((o === 1 || o === -1) && u >= -K && u <= K && u === _(u)) {
2522
+ if (c[0] === 0) {
2523
+ if (u === 0 && c.length === 1) return !0;
2524
+ break e;
2525
+ }
2526
+ if (t = (u + 1) % w, t < 1 && (t += w), String(c[0]).length == t) {
2527
+ for (t = 0; t < c.length; t++)
2528
+ if (r = c[t], r < 0 || r >= L || r !== _(r)) break e;
2529
+ if (r !== 0) return !0;
2530
+ }
2531
+ }
2532
+ } else if (c === null && u === null && (o === null || o === 1 || o === -1))
2533
+ return !0;
2534
+ throw Error(N + "Invalid BigNumber: " + e);
2535
+ }, S.maximum = S.max = function() {
2536
+ return Be(arguments, -1);
2537
+ }, S.minimum = S.min = function() {
2538
+ return Be(arguments, 1);
2539
+ }, S.random = function() {
2540
+ var e = 9007199254740992, t = Math.random() * e & 2097151 ? function() {
2541
+ return _(Math.random() * e);
2542
+ } : function() {
2543
+ return (Math.random() * 1073741824 | 0) * 8388608 + (Math.random() * 8388608 | 0);
2544
+ };
2545
+ return function(r) {
2546
+ var c, u, o, l, i, a = 0, m = [], f = new S(re);
2547
+ if (r == null ? r = se : I(r, 0, K), l = v(r / w), ge)
2548
+ if (crypto.getRandomValues) {
2549
+ for (c = crypto.getRandomValues(new Uint32Array(l *= 2)); a < l; )
2550
+ i = c[a] * 131072 + (c[a + 1] >>> 11), i >= 9e15 ? (u = crypto.getRandomValues(new Uint32Array(2)), c[a] = u[0], c[a + 1] = u[1]) : (m.push(i % 1e14), a += 2);
2551
+ a = l / 2;
2552
+ } else if (crypto.randomBytes) {
2553
+ for (c = crypto.randomBytes(l *= 7); a < l; )
2554
+ i = (c[a] & 31) * 281474976710656 + c[a + 1] * 1099511627776 + c[a + 2] * 4294967296 + c[a + 3] * 16777216 + (c[a + 4] << 16) + (c[a + 5] << 8) + c[a + 6], i >= 9e15 ? crypto.randomBytes(7).copy(c, a) : (m.push(i % 1e14), a += 7);
2555
+ a = l / 7;
2556
+ } else
2557
+ throw ge = !1, Error(N + "crypto unavailable");
2558
+ if (!ge)
2559
+ for (; a < l; )
2560
+ i = t(), i < 9e15 && (m[a++] = i % 1e14);
2561
+ for (l = m[--a], r %= w, l && r && (i = M[w - r], m[a] = _(l / i) * i); m[a] === 0; m.pop(), a--) ;
2562
+ if (a < 0)
2563
+ m = [o = 0];
2564
+ else {
2565
+ for (o = -1; m[0] === 0; m.splice(0, 1), o -= w) ;
2566
+ for (a = 1, i = m[0]; i >= 10; i /= 10, a++) ;
2567
+ a < w && (o -= w - a);
2568
+ }
2569
+ return f.e = o, f.c = m, f;
2570
+ };
2571
+ }(), S.sum = function() {
2572
+ for (var e = 1, t = arguments, r = new S(t[0]); e < t.length; ) r = r.plus(t[e++]);
2573
+ return r;
2574
+ }, H = /* @__PURE__ */ function() {
2575
+ var e = "0123456789";
2576
+ function t(r, c, u, o) {
2577
+ for (var l, i = [0], a, m = 0, f = r.length; m < f; ) {
2578
+ for (a = i.length; a--; i[a] *= c) ;
2579
+ for (i[0] += o.indexOf(r.charAt(m++)), l = 0; l < i.length; l++)
2580
+ i[l] > u - 1 && (i[l + 1] == null && (i[l + 1] = 0), i[l + 1] += i[l] / u | 0, i[l] %= u);
2581
+ }
2582
+ return i.reverse();
2583
+ }
2584
+ return function(r, c, u, o, l) {
2585
+ var i, a, m, f, b, D, F, oe, fe = r.indexOf("."), he = se, ne = z;
2586
+ for (fe >= 0 && (f = be, be = 0, r = r.replace(".", ""), oe = new S(c), D = oe.pow(r.length - fe), be = f, oe.c = t(
2587
+ Q(O(D.c), D.e, "0"),
2588
+ 10,
2589
+ u,
2590
+ e
2591
+ ), oe.e = oe.c.length), F = t(r, c, u, l ? (i = Ne, e) : (i = e, Ne)), m = f = F.length; F[--f] == 0; F.pop()) ;
2592
+ if (!F[0]) return i.charAt(0);
2593
+ if (fe < 0 ? --m : (D.c = F, D.e = m, D.s = o, D = B(D, oe, he, ne, u), F = D.c, b = D.r, m = D.e), a = m + he + 1, fe = F[a], f = u / 2, b = b || a < 0 || F[a + 1] != null, b = ne < 4 ? (fe != null || b) && (ne == 0 || ne == (D.s < 0 ? 3 : 2)) : fe > f || fe == f && (ne == 4 || b || ne == 6 && F[a - 1] & 1 || ne == (D.s < 0 ? 8 : 7)), a < 1 || !F[0])
2594
+ r = b ? Q(i.charAt(1), -he, i.charAt(0)) : i.charAt(0);
2595
+ else {
2596
+ if (F.length = a, b)
2597
+ for (--u; ++F[--a] > u; )
2598
+ F[a] = 0, a || (++m, F = [1].concat(F));
2599
+ for (f = F.length; !F[--f]; ) ;
2600
+ for (fe = 0, r = ""; fe <= f; r += i.charAt(F[fe++])) ;
2601
+ r = Q(r, m, i.charAt(0));
2602
+ }
2603
+ return r;
2604
+ };
2605
+ }(), B = /* @__PURE__ */ function() {
2606
+ function e(c, u, o) {
2607
+ var l, i, a, m, f = 0, b = c.length, D = u % C, F = u / C | 0;
2608
+ for (c = c.slice(); b--; )
2609
+ a = c[b] % C, m = c[b] / C | 0, l = F * a + m * D, i = D * a + l % C * C + f, f = (i / o | 0) + (l / C | 0) + F * m, c[b] = i % o;
2610
+ return f && (c = [f].concat(c)), c;
2611
+ }
2612
+ function t(c, u, o, l) {
2613
+ var i, a;
2614
+ if (o != l)
2615
+ a = o > l ? 1 : -1;
2616
+ else
2617
+ for (i = a = 0; i < o; i++)
2618
+ if (c[i] != u[i]) {
2619
+ a = c[i] > u[i] ? 1 : -1;
2620
+ break;
2621
+ }
2622
+ return a;
2623
+ }
2624
+ function r(c, u, o, l) {
2625
+ for (var i = 0; o--; )
2626
+ c[o] -= i, i = c[o] < u[o] ? 1 : 0, c[o] = i * l + c[o] - u[o];
2627
+ for (; !c[0] && c.length > 1; c.splice(0, 1)) ;
2628
+ }
2629
+ return function(c, u, o, l, i) {
2630
+ var a, m, f, b, D, F, oe, fe, he, ne, ae, xe, Qe, ft, pt, Le, Ge, Se = c.s == u.s ? 1 : -1, Ce = c.c, pe = u.c;
2631
+ if (!Ce || !Ce[0] || !pe || !pe[0])
2632
+ return new S(
2633
+ // Return NaN if either NaN, or both Infinity or 0.
2634
+ !c.s || !u.s || (Ce ? pe && Ce[0] == pe[0] : !pe) ? NaN : (
2635
+ // Return ±0 if x is ±0 or y is ±Infinity, or return ±Infinity as y is ±0.
2636
+ Ce && Ce[0] == 0 || !pe ? Se * 0 : Se / 0
2637
+ )
2638
+ );
2639
+ for (fe = new S(Se), he = fe.c = [], m = c.e - u.e, Se = o + m + 1, i || (i = L, m = T(c.e / w) - T(u.e / w), Se = Se / w | 0), f = 0; pe[f] == (Ce[f] || 0); f++) ;
2640
+ if (pe[f] > (Ce[f] || 0) && m--, Se < 0)
2641
+ he.push(1), b = !0;
2642
+ else {
2643
+ for (ft = Ce.length, Le = pe.length, f = 0, Se += 2, D = _(i / (pe[0] + 1)), D > 1 && (pe = e(pe, D, i), Ce = e(Ce, D, i), Le = pe.length, ft = Ce.length), Qe = Le, ne = Ce.slice(0, Le), ae = ne.length; ae < Le; ne[ae++] = 0) ;
2644
+ Ge = pe.slice(), Ge = [0].concat(Ge), pt = pe[0], pe[1] >= i / 2 && pt++;
2645
+ do {
2646
+ if (D = 0, a = t(pe, ne, Le, ae), a < 0) {
2647
+ if (xe = ne[0], Le != ae && (xe = xe * i + (ne[1] || 0)), D = _(xe / pt), D > 1)
2648
+ for (D >= i && (D = i - 1), F = e(pe, D, i), oe = F.length, ae = ne.length; t(F, ne, oe, ae) == 1; )
2649
+ D--, r(F, Le < oe ? Ge : pe, oe, i), oe = F.length, a = 1;
2650
+ else
2651
+ D == 0 && (a = D = 1), F = pe.slice(), oe = F.length;
2652
+ if (oe < ae && (F = [0].concat(F)), r(ne, F, ae, i), ae = ne.length, a == -1)
2653
+ for (; t(pe, ne, Le, ae) < 1; )
2654
+ D++, r(ne, Le < ae ? Ge : pe, ae, i), ae = ne.length;
2655
+ } else a === 0 && (D++, ne = [0]);
2656
+ he[f++] = D, ne[0] ? ne[ae++] = Ce[Qe] || 0 : (ne = [Ce[Qe]], ae = 1);
2657
+ } while ((Qe++ < ft || ne[0] != null) && Se--);
2658
+ b = ne[0] != null, he[0] || he.splice(0, 1);
2659
+ }
2660
+ if (i == L) {
2661
+ for (f = 1, Se = he[0]; Se >= 10; Se /= 10, f++) ;
2662
+ W(fe, o + (fe.e = f + m * w - 1) + 1, l, b);
2663
+ } else
2664
+ fe.e = m, fe.r = +b;
2665
+ return fe;
2666
+ };
2667
+ }();
2668
+ function Ue(e, t, r, c) {
2669
+ var u, o, l, i, a;
2670
+ if (r == null ? r = z : I(r, 0, 8), !e.c) return e.toString();
2671
+ if (u = e.c[0], l = e.e, t == null)
2672
+ a = O(e.c), a = c == 1 || c == 2 && (l <= ce || l >= ue) ? Z(a, l) : Q(a, l, "0");
2673
+ else if (e = W(new S(e), t, r), o = e.e, a = O(e.c), i = a.length, c == 1 || c == 2 && (t <= o || o <= ce)) {
2674
+ for (; i < t; a += "0", i++) ;
2675
+ a = Z(a, o);
2676
+ } else if (t -= l + (c === 2 && o > l), a = Q(a, o, "0"), o + 1 > i) {
2677
+ if (--t > 0) for (a += "."; t--; a += "0") ;
2678
+ } else if (t += o - i, t > 0)
2679
+ for (o + 1 == i && (a += "."); t--; a += "0") ;
2680
+ return e.s < 0 && u ? "-" + a : a;
2681
+ }
2682
+ function Be(e, t) {
2683
+ for (var r, c, u = 1, o = new S(e[0]); u < e.length; u++)
2684
+ c = new S(e[u]), (!c.s || (r = V(o, c)) === t || r === 0 && o.s === t) && (o = c);
2685
+ return o;
2686
+ }
2687
+ function Me(e, t, r) {
2688
+ for (var c = 1, u = t.length; !t[--u]; t.pop()) ;
2689
+ for (u = t[0]; u >= 10; u /= 10, c++) ;
2690
+ return (r = c + r * w - 1) > ve ? e.c = e.e = null : r < ke ? e.c = [e.e = 0] : (e.e = r, e.c = t), e;
2691
+ }
2692
+ te = /* @__PURE__ */ function() {
2693
+ var e = /^(-?)0([xbo])(?=\w[\w.]*$)/i, t = /^([^.]+)\.$/, r = /^\.([^.]+)$/, c = /^-?(Infinity|NaN)$/, u = /^\s*\+(?=[\w.])|^\s+|\s+$/g;
2694
+ return function(o, l, i, a) {
2695
+ var m, f = i ? l : l.replace(u, "");
2696
+ if (c.test(f))
2697
+ o.s = isNaN(f) ? null : f < 0 ? -1 : 1;
2698
+ else {
2699
+ if (!i && (f = f.replace(e, function(b, D, F) {
2700
+ return m = (F = F.toLowerCase()) == "x" ? 16 : F == "b" ? 2 : 8, !a || a == m ? D : b;
2701
+ }), a && (m = a, f = f.replace(t, "$1").replace(r, "0.$1")), l != f))
2702
+ return new S(f, m);
2703
+ if (S.DEBUG)
2704
+ throw Error(N + "Not a" + (a ? " base " + a : "") + " number: " + l);
2705
+ o.s = null;
2706
+ }
2707
+ o.c = o.e = null;
2708
+ };
2709
+ }();
2710
+ function W(e, t, r, c) {
2711
+ var u, o, l, i, a, m, f, b = e.c, D = M;
2712
+ if (b) {
2713
+ e: {
2714
+ for (u = 1, i = b[0]; i >= 10; i /= 10, u++) ;
2715
+ if (o = t - u, o < 0)
2716
+ o += w, l = t, a = b[m = 0], f = _(a / D[u - l - 1] % 10);
2717
+ else if (m = v((o + 1) / w), m >= b.length)
2718
+ if (c) {
2719
+ for (; b.length <= m; b.push(0)) ;
2720
+ a = f = 0, u = 1, o %= w, l = o - w + 1;
2721
+ } else
2722
+ break e;
2723
+ else {
2724
+ for (a = i = b[m], u = 1; i >= 10; i /= 10, u++) ;
2725
+ o %= w, l = o - w + u, f = l < 0 ? 0 : _(a / D[u - l - 1] % 10);
2726
+ }
2727
+ if (c = c || t < 0 || // Are there any non-zero digits after the rounding digit?
2728
+ // The expression n % pows10[d - j - 1] returns all digits of n to the right
2729
+ // of the digit at j, e.g. if n is 908714 and j is 2, the expression gives 714.
2730
+ b[m + 1] != null || (l < 0 ? a : a % D[u - l - 1]), c = r < 4 ? (f || c) && (r == 0 || r == (e.s < 0 ? 3 : 2)) : f > 5 || f == 5 && (r == 4 || c || r == 6 && // Check whether the digit to the left of the rounding digit is odd.
2731
+ (o > 0 ? l > 0 ? a / D[u - l] : 0 : b[m - 1]) % 10 & 1 || r == (e.s < 0 ? 8 : 7)), t < 1 || !b[0])
2732
+ return b.length = 0, c ? (t -= e.e + 1, b[0] = D[(w - t % w) % w], e.e = -t || 0) : b[0] = e.e = 0, e;
2733
+ if (o == 0 ? (b.length = m, i = 1, m--) : (b.length = m + 1, i = D[w - o], b[m] = l > 0 ? _(a / D[u - l] % D[l]) * i : 0), c)
2734
+ for (; ; )
2735
+ if (m == 0) {
2736
+ for (o = 1, l = b[0]; l >= 10; l /= 10, o++) ;
2737
+ for (l = b[0] += i, i = 1; l >= 10; l /= 10, i++) ;
2738
+ o != i && (e.e++, b[0] == L && (b[0] = 1));
2739
+ break;
2740
+ } else {
2741
+ if (b[m] += i, b[m] != L) break;
2742
+ b[m--] = 0, i = 1;
2743
+ }
2744
+ for (o = b.length; b[--o] === 0; b.pop()) ;
2745
+ }
2746
+ e.e > ve ? e.c = e.e = null : e.e < ke && (e.c = [e.e = 0]);
2747
+ }
2748
+ return e;
2749
+ }
2750
+ function U(e) {
2751
+ var t, r = e.e;
2752
+ return r === null ? e.toString() : (t = O(e.c), t = r <= ce || r >= ue ? Z(t, r) : Q(t, r, "0"), e.s < 0 ? "-" + t : t);
2753
+ }
2754
+ return $.absoluteValue = $.abs = function() {
2755
+ var e = new S(this);
2756
+ return e.s < 0 && (e.s = 1), e;
2757
+ }, $.comparedTo = function(e, t) {
2758
+ return V(this, new S(e, t));
2759
+ }, $.decimalPlaces = $.dp = function(e, t) {
2760
+ var r, c, u, o = this;
2761
+ if (e != null)
2762
+ return I(e, 0, K), t == null ? t = z : I(t, 0, 8), W(new S(o), e + o.e + 1, t);
2763
+ if (!(r = o.c)) return null;
2764
+ if (c = ((u = r.length - 1) - T(this.e / w)) * w, u = r[u]) for (; u % 10 == 0; u /= 10, c--) ;
2765
+ return c < 0 && (c = 0), c;
2766
+ }, $.dividedBy = $.div = function(e, t) {
2767
+ return B(this, new S(e, t), se, z);
2768
+ }, $.dividedToIntegerBy = $.idiv = function(e, t) {
2769
+ return B(this, new S(e, t), 0, 1);
2770
+ }, $.exponentiatedBy = $.pow = function(e, t) {
2771
+ var r, c, u, o, l, i, a, m, f, b = this;
2772
+ if (e = new S(e), e.c && !e.isInteger())
2773
+ throw Error(N + "Exponent not an integer: " + U(e));
2774
+ if (t != null && (t = new S(t)), i = e.e > 14, !b.c || !b.c[0] || b.c[0] == 1 && !b.e && b.c.length == 1 || !e.c || !e.c[0])
2775
+ return f = new S(Math.pow(+U(b), i ? e.s * (2 - Y(e)) : +U(e))), t ? f.mod(t) : f;
2776
+ if (a = e.s < 0, t) {
2777
+ if (t.c ? !t.c[0] : !t.s) return new S(NaN);
2778
+ c = !a && b.isInteger() && t.isInteger(), c && (b = b.mod(t));
2779
+ } else {
2780
+ if (e.e > 9 && (b.e > 0 || b.e < -1 || (b.e == 0 ? b.c[0] > 1 || i && b.c[1] >= 24e7 : b.c[0] < 8e13 || i && b.c[0] <= 9999975e7)))
2781
+ return o = b.s < 0 && Y(e) ? -0 : 0, b.e > -1 && (o = 1 / o), new S(a ? 1 / o : o);
2782
+ be && (o = v(be / w + 2));
2783
+ }
2784
+ for (i ? (r = new S(0.5), a && (e.s = 1), m = Y(e)) : (u = Math.abs(+U(e)), m = u % 2), f = new S(re); ; ) {
2785
+ if (m) {
2786
+ if (f = f.times(b), !f.c) break;
2787
+ o ? f.c.length > o && (f.c.length = o) : c && (f = f.mod(t));
2788
+ }
2789
+ if (u) {
2790
+ if (u = _(u / 2), u === 0) break;
2791
+ m = u % 2;
2792
+ } else if (e = e.times(r), W(e, e.e + 1, 1), e.e > 14)
2793
+ m = Y(e);
2794
+ else {
2795
+ if (u = +U(e), u === 0) break;
2796
+ m = u % 2;
2797
+ }
2798
+ b = b.times(b), o ? b.c && b.c.length > o && (b.c.length = o) : c && (b = b.mod(t));
2799
+ }
2800
+ return c ? f : (a && (f = re.div(f)), t ? f.mod(t) : o ? W(f, be, z, l) : f);
2801
+ }, $.integerValue = function(e) {
2802
+ var t = new S(this);
2803
+ return e == null ? e = z : I(e, 0, 8), W(t, t.e + 1, e);
2804
+ }, $.isEqualTo = $.eq = function(e, t) {
2805
+ return V(this, new S(e, t)) === 0;
2806
+ }, $.isFinite = function() {
2807
+ return !!this.c;
2808
+ }, $.isGreaterThan = $.gt = function(e, t) {
2809
+ return V(this, new S(e, t)) > 0;
2810
+ }, $.isGreaterThanOrEqualTo = $.gte = function(e, t) {
2811
+ return (t = V(this, new S(e, t))) === 1 || t === 0;
2812
+ }, $.isInteger = function() {
2813
+ return !!this.c && T(this.e / w) > this.c.length - 2;
2814
+ }, $.isLessThan = $.lt = function(e, t) {
2815
+ return V(this, new S(e, t)) < 0;
2816
+ }, $.isLessThanOrEqualTo = $.lte = function(e, t) {
2817
+ return (t = V(this, new S(e, t))) === -1 || t === 0;
2818
+ }, $.isNaN = function() {
2819
+ return !this.s;
2820
+ }, $.isNegative = function() {
2821
+ return this.s < 0;
2822
+ }, $.isPositive = function() {
2823
+ return this.s > 0;
2824
+ }, $.isZero = function() {
2825
+ return !!this.c && this.c[0] == 0;
2826
+ }, $.minus = function(e, t) {
2827
+ var r, c, u, o, l = this, i = l.s;
2828
+ if (e = new S(e, t), t = e.s, !i || !t) return new S(NaN);
2829
+ if (i != t)
2830
+ return e.s = -t, l.plus(e);
2831
+ var a = l.e / w, m = e.e / w, f = l.c, b = e.c;
2832
+ if (!a || !m) {
2833
+ if (!f || !b) return f ? (e.s = -t, e) : new S(b ? l : NaN);
2834
+ if (!f[0] || !b[0])
2835
+ return b[0] ? (e.s = -t, e) : new S(f[0] ? l : (
2836
+ // IEEE 754 (2008) 6.3: n - n = -0 when rounding to -Infinity
2837
+ z == 3 ? -0 : 0
2838
+ ));
2839
+ }
2840
+ if (a = T(a), m = T(m), f = f.slice(), i = a - m) {
2841
+ for ((o = i < 0) ? (i = -i, u = f) : (m = a, u = b), u.reverse(), t = i; t--; u.push(0)) ;
2842
+ u.reverse();
2843
+ } else
2844
+ for (c = (o = (i = f.length) < (t = b.length)) ? i : t, i = t = 0; t < c; t++)
2845
+ if (f[t] != b[t]) {
2846
+ o = f[t] < b[t];
2847
+ break;
2848
+ }
2849
+ if (o && (u = f, f = b, b = u, e.s = -e.s), t = (c = b.length) - (r = f.length), t > 0) for (; t--; f[r++] = 0) ;
2850
+ for (t = L - 1; c > i; ) {
2851
+ if (f[--c] < b[c]) {
2852
+ for (r = c; r && !f[--r]; f[r] = t) ;
2853
+ --f[r], f[c] += L;
2854
+ }
2855
+ f[c] -= b[c];
2856
+ }
2857
+ for (; f[0] == 0; f.splice(0, 1), --m) ;
2858
+ return f[0] ? Me(e, f, m) : (e.s = z == 3 ? -1 : 1, e.c = [e.e = 0], e);
2859
+ }, $.modulo = $.mod = function(e, t) {
2860
+ var r, c, u = this;
2861
+ return e = new S(e, t), !u.c || !e.s || e.c && !e.c[0] ? new S(NaN) : !e.c || u.c && !u.c[0] ? new S(u) : (_e == 9 ? (c = e.s, e.s = 1, r = B(u, e, 0, 3), e.s = c, r.s *= c) : r = B(u, e, 0, _e), e = u.minus(r.times(e)), !e.c[0] && _e == 1 && (e.s = u.s), e);
2862
+ }, $.multipliedBy = $.times = function(e, t) {
2863
+ var r, c, u, o, l, i, a, m, f, b, D, F, oe, fe, he, ne = this, ae = ne.c, xe = (e = new S(e, t)).c;
2864
+ if (!ae || !xe || !ae[0] || !xe[0])
2865
+ return !ne.s || !e.s || ae && !ae[0] && !xe || xe && !xe[0] && !ae ? e.c = e.e = e.s = null : (e.s *= ne.s, !ae || !xe ? e.c = e.e = null : (e.c = [0], e.e = 0)), e;
2866
+ for (c = T(ne.e / w) + T(e.e / w), e.s *= ne.s, a = ae.length, b = xe.length, a < b && (oe = ae, ae = xe, xe = oe, u = a, a = b, b = u), u = a + b, oe = []; u--; oe.push(0)) ;
2867
+ for (fe = L, he = C, u = b; --u >= 0; ) {
2868
+ for (r = 0, D = xe[u] % he, F = xe[u] / he | 0, l = a, o = u + l; o > u; )
2869
+ m = ae[--l] % he, f = ae[l] / he | 0, i = F * m + f * D, m = D * m + i % he * he + oe[o] + r, r = (m / fe | 0) + (i / he | 0) + F * f, oe[o--] = m % fe;
2870
+ oe[o] = r;
2871
+ }
2872
+ return r ? ++c : oe.splice(0, 1), Me(e, oe, c);
2873
+ }, $.negated = function() {
2874
+ var e = new S(this);
2875
+ return e.s = -e.s || null, e;
2876
+ }, $.plus = function(e, t) {
2877
+ var r, c = this, u = c.s;
2878
+ if (e = new S(e, t), t = e.s, !u || !t) return new S(NaN);
2879
+ if (u != t)
2880
+ return e.s = -t, c.minus(e);
2881
+ var o = c.e / w, l = e.e / w, i = c.c, a = e.c;
2882
+ if (!o || !l) {
2883
+ if (!i || !a) return new S(u / 0);
2884
+ if (!i[0] || !a[0]) return a[0] ? e : new S(i[0] ? c : u * 0);
2885
+ }
2886
+ if (o = T(o), l = T(l), i = i.slice(), u = o - l) {
2887
+ for (u > 0 ? (l = o, r = a) : (u = -u, r = i), r.reverse(); u--; r.push(0)) ;
2888
+ r.reverse();
2889
+ }
2890
+ for (u = i.length, t = a.length, u - t < 0 && (r = a, a = i, i = r, t = u), u = 0; t; )
2891
+ u = (i[--t] = i[t] + a[t] + u) / L | 0, i[t] = L === i[t] ? 0 : i[t] % L;
2892
+ return u && (i = [u].concat(i), ++l), Me(e, i, l);
2893
+ }, $.precision = $.sd = function(e, t) {
2894
+ var r, c, u, o = this;
2895
+ if (e != null && e !== !!e)
2896
+ return I(e, 1, K), t == null ? t = z : I(t, 0, 8), W(new S(o), e, t);
2897
+ if (!(r = o.c)) return null;
2898
+ if (u = r.length - 1, c = u * w + 1, u = r[u]) {
2899
+ for (; u % 10 == 0; u /= 10, c--) ;
2900
+ for (u = r[0]; u >= 10; u /= 10, c++) ;
2901
+ }
2902
+ return e && o.e + 1 > c && (c = o.e + 1), c;
2903
+ }, $.shiftedBy = function(e) {
2904
+ return I(e, -x, x), this.times("1e" + e);
2905
+ }, $.squareRoot = $.sqrt = function() {
2906
+ var e, t, r, c, u, o = this, l = o.c, i = o.s, a = o.e, m = se + 4, f = new S("0.5");
2907
+ if (i !== 1 || !l || !l[0])
2908
+ return new S(!i || i < 0 && (!l || l[0]) ? NaN : l ? o : 1 / 0);
2909
+ if (i = Math.sqrt(+U(o)), i == 0 || i == 1 / 0 ? (t = O(l), (t.length + a) % 2 == 0 && (t += "0"), i = Math.sqrt(+t), a = T((a + 1) / 2) - (a < 0 || a % 2), i == 1 / 0 ? t = "5e" + a : (t = i.toExponential(), t = t.slice(0, t.indexOf("e") + 1) + a), r = new S(t)) : r = new S(i + ""), r.c[0]) {
2910
+ for (a = r.e, i = a + m, i < 3 && (i = 0); ; )
2911
+ if (u = r, r = f.times(u.plus(B(o, u, m, 1))), O(u.c).slice(0, i) === (t = O(r.c)).slice(0, i))
2912
+ if (r.e < a && --i, t = t.slice(i - 3, i + 1), t == "9999" || !c && t == "4999") {
2913
+ if (!c && (W(u, u.e + se + 2, 0), u.times(u).eq(o))) {
2914
+ r = u;
2915
+ break;
2916
+ }
2917
+ m += 4, i += 4, c = 1;
2918
+ } else {
2919
+ (!+t || !+t.slice(1) && t.charAt(0) == "5") && (W(r, r.e + se + 2, 1), e = !r.times(r).eq(o));
2920
+ break;
2921
+ }
2922
+ }
2923
+ return W(r, r.e + se + 1, z, e);
2924
+ }, $.toExponential = function(e, t) {
2925
+ return e != null && (I(e, 0, K), e++), Ue(this, e, t, 1);
2926
+ }, $.toFixed = function(e, t) {
2927
+ return e != null && (I(e, 0, K), e = e + this.e + 1), Ue(this, e, t);
2928
+ }, $.toFormat = function(e, t, r) {
2929
+ var c, u = this;
2930
+ if (r == null)
2931
+ e != null && t && typeof t == "object" ? (r = t, t = null) : e && typeof e == "object" ? (r = e, e = t = null) : r = Te;
2932
+ else if (typeof r != "object")
2933
+ throw Error(N + "Argument not an object: " + r);
2934
+ if (c = u.toFixed(e, t), u.c) {
2935
+ var o, l = c.split("."), i = +r.groupSize, a = +r.secondaryGroupSize, m = r.groupSeparator || "", f = l[0], b = l[1], D = u.s < 0, F = D ? f.slice(1) : f, oe = F.length;
2936
+ if (a && (o = i, i = a, a = o, oe -= o), i > 0 && oe > 0) {
2937
+ for (o = oe % i || i, f = F.substr(0, o); o < oe; o += i) f += m + F.substr(o, i);
2938
+ a > 0 && (f += m + F.slice(o)), D && (f = "-" + f);
2939
+ }
2940
+ c = b ? f + (r.decimalSeparator || "") + ((a = +r.fractionGroupSize) ? b.replace(
2941
+ new RegExp("\\d{" + a + "}\\B", "g"),
2942
+ "$&" + (r.fractionGroupSeparator || "")
2943
+ ) : b) : f;
2944
+ }
2945
+ return (r.prefix || "") + c + (r.suffix || "");
2946
+ }, $.toFraction = function(e) {
2947
+ var t, r, c, u, o, l, i, a, m, f, b, D, F = this, oe = F.c;
2948
+ if (e != null && (i = new S(e), !i.isInteger() && (i.c || i.s !== 1) || i.lt(re)))
2949
+ throw Error(N + "Argument " + (i.isInteger() ? "out of range: " : "not an integer: ") + U(i));
2950
+ if (!oe) return new S(F);
2951
+ for (t = new S(re), m = r = new S(re), c = a = new S(re), D = O(oe), o = t.e = D.length - F.e - 1, t.c[0] = M[(l = o % w) < 0 ? w + l : l], e = !e || i.comparedTo(t) > 0 ? o > 0 ? t : m : i, l = ve, ve = 1 / 0, i = new S(D), a.c[0] = 0; f = B(i, t, 0, 1), u = r.plus(f.times(c)), u.comparedTo(e) != 1; )
2952
+ r = c, c = u, m = a.plus(f.times(u = m)), a = u, t = i.minus(f.times(u = t)), i = u;
2953
+ return u = B(e.minus(r), c, 0, 1), a = a.plus(u.times(m)), r = r.plus(u.times(c)), a.s = m.s = F.s, o = o * 2, b = B(m, c, o, z).minus(F).abs().comparedTo(
2954
+ B(a, r, o, z).minus(F).abs()
2955
+ ) < 1 ? [m, c] : [a, r], ve = l, b;
2956
+ }, $.toNumber = function() {
2957
+ return +U(this);
2958
+ }, $.toPrecision = function(e, t) {
2959
+ return e != null && I(e, 1, K), Ue(this, e, t, 2);
2960
+ }, $.toString = function(e) {
2961
+ var t, r = this, c = r.s, u = r.e;
2962
+ return u === null ? c ? (t = "Infinity", c < 0 && (t = "-" + t)) : t = "NaN" : (e == null ? t = u <= ce || u >= ue ? Z(O(r.c), u) : Q(O(r.c), u, "0") : e === 10 && Oe ? (r = W(new S(r), se + u + 1, z), t = Q(O(r.c), r.e, "0")) : (I(e, 2, Ne.length, "Base"), t = H(Q(O(r.c), u, "0"), 10, e, c, !0)), c < 0 && r.c[0] && (t = "-" + t)), t;
2963
+ }, $.valueOf = $.toJSON = function() {
2964
+ return U(this);
2965
+ }, $._isBigNumber = !0, A != null && S.set(A), S;
2966
+ }
2967
+ function T(A) {
2968
+ var B = A | 0;
2969
+ return A > 0 || A === B ? B : B - 1;
2970
+ }
2971
+ function O(A) {
2972
+ for (var B, H, te = 1, $ = A.length, re = A[0] + ""; te < $; ) {
2973
+ for (B = A[te++] + "", H = w - B.length; H--; B = "0" + B) ;
2974
+ re += B;
2975
+ }
2976
+ for ($ = re.length; re.charCodeAt(--$) === 48; ) ;
2977
+ return re.slice(0, $ + 1 || 1);
2978
+ }
2979
+ function V(A, B) {
2980
+ var H, te, $ = A.c, re = B.c, se = A.s, z = B.s, ce = A.e, ue = B.e;
2981
+ if (!se || !z) return null;
2982
+ if (H = $ && !$[0], te = re && !re[0], H || te) return H ? te ? 0 : -z : se;
2983
+ if (se != z) return se;
2984
+ if (H = se < 0, te = ce == ue, !$ || !re) return te ? 0 : !$ ^ H ? 1 : -1;
2985
+ if (!te) return ce > ue ^ H ? 1 : -1;
2986
+ for (z = (ce = $.length) < (ue = re.length) ? ce : ue, se = 0; se < z; se++) if ($[se] != re[se]) return $[se] > re[se] ^ H ? 1 : -1;
2987
+ return ce == ue ? 0 : ce > ue ^ H ? 1 : -1;
2988
+ }
2989
+ function I(A, B, H, te) {
2990
+ if (A < B || A > H || A !== _(A))
2991
+ throw Error(N + (te || "Argument") + (typeof A == "number" ? A < B || A > H ? " out of range: " : " not an integer: " : " not a primitive number: ") + String(A));
2992
+ }
2993
+ function Y(A) {
2994
+ var B = A.c.length - 1;
2995
+ return T(A.e / w) == B && A.c[B] % 2 != 0;
2996
+ }
2997
+ function Z(A, B) {
2998
+ return (A.length > 1 ? A.charAt(0) + "." + A.slice(1) : A) + (B < 0 ? "e" : "e+") + B;
2999
+ }
3000
+ function Q(A, B, H) {
3001
+ var te, $;
3002
+ if (B < 0) {
3003
+ for ($ = H + "."; ++B; $ += H) ;
3004
+ A = $ + A;
3005
+ } else if (te = A.length, ++B > te) {
3006
+ for ($ = H, B -= te; --B; $ += H) ;
3007
+ A += $;
3008
+ } else B < te && (A = A.slice(0, B) + "." + A.slice(B));
3009
+ return A;
3010
+ }
3011
+ h = J(), h.default = h.BigNumber = h, n.exports ? n.exports = h : (d || (d = typeof self < "u" && self ? self : window), d.BigNumber = h);
3012
+ })(Xr);
3013
+ })(Gt);
3014
+ var Kt = Gt.exports;
3015
+ (function(n) {
3016
+ var d = Kt, h = n.exports;
3017
+ (function() {
3018
+ var p = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, v, _, N = {
3019
+ // table of character substitutions
3020
+ "\b": "\\b",
3021
+ " ": "\\t",
3022
+ "\n": "\\n",
3023
+ "\f": "\\f",
3024
+ "\r": "\\r",
3025
+ '"': '\\"',
3026
+ "\\": "\\\\"
3027
+ }, g;
3028
+ function L(x) {
3029
+ return p.lastIndex = 0, p.test(x) ? '"' + x.replace(p, function(M) {
3030
+ var C = N[M];
3031
+ return typeof C == "string" ? C : "\\u" + ("0000" + M.charCodeAt(0).toString(16)).slice(-4);
3032
+ }) + '"' : '"' + x + '"';
3033
+ }
3034
+ function w(x, M) {
3035
+ var C, K, J, T, O = v, V, I = M[x], Y = I != null && (I instanceof d || d.isBigNumber(I));
3036
+ switch (I && typeof I == "object" && typeof I.toJSON == "function" && (I = I.toJSON(x)), typeof g == "function" && (I = g.call(M, x, I)), typeof I) {
3037
+ case "string":
3038
+ return Y ? I : L(I);
3039
+ case "number":
3040
+ return isFinite(I) ? String(I) : "null";
3041
+ case "boolean":
3042
+ case "null":
3043
+ case "bigint":
3044
+ return String(I);
3045
+ case "object":
3046
+ if (!I)
3047
+ return "null";
3048
+ if (v += _, V = [], Object.prototype.toString.apply(I) === "[object Array]") {
3049
+ for (T = I.length, C = 0; C < T; C += 1)
3050
+ V[C] = w(C, I) || "null";
3051
+ return J = V.length === 0 ? "[]" : v ? `[
3052
+ ` + v + V.join(`,
3053
+ ` + v) + `
3054
+ ` + O + "]" : "[" + V.join(",") + "]", v = O, J;
3055
+ }
3056
+ if (g && typeof g == "object")
3057
+ for (T = g.length, C = 0; C < T; C += 1)
3058
+ typeof g[C] == "string" && (K = g[C], J = w(K, I), J && V.push(L(K) + (v ? ": " : ":") + J));
3059
+ else
3060
+ Object.keys(I).forEach(function(Z) {
3061
+ var Q = w(Z, I);
3062
+ Q && V.push(L(Z) + (v ? ": " : ":") + Q);
3063
+ });
3064
+ return J = V.length === 0 ? "{}" : v ? `{
3065
+ ` + v + V.join(`,
3066
+ ` + v) + `
3067
+ ` + O + "}" : "{" + V.join(",") + "}", v = O, J;
3068
+ }
3069
+ }
3070
+ typeof h.stringify != "function" && (h.stringify = function(x, M, C) {
3071
+ var K;
3072
+ if (v = "", _ = "", typeof C == "number")
3073
+ for (K = 0; K < C; K += 1)
3074
+ _ += " ";
3075
+ else typeof C == "string" && (_ = C);
3076
+ if (g = M, M && typeof M != "function" && (typeof M != "object" || typeof M.length != "number"))
3077
+ throw new Error("JSON.stringify");
3078
+ return w("", { "": x });
3079
+ });
3080
+ })();
3081
+ })(qt);
3082
+ var Jr = qt.exports, st = null;
3083
+ const Zr = /(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])/, Qr = /(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)/;
3084
+ var ea = function(n) {
3085
+ var d = {
3086
+ strict: !1,
3087
+ // not being strict means do not generate syntax errors for "duplicate key"
3088
+ storeAsString: !1,
3089
+ // toggles whether the values should be stored as BigNumber (default) or a string
3090
+ alwaysParseAsBig: !1,
3091
+ // toggles whether all numbers should be Big
3092
+ useNativeBigInt: !1,
3093
+ // toggles whether to use native BigInt instead of bignumber.js
3094
+ protoAction: "error",
3095
+ constructorAction: "error"
3096
+ };
3097
+ if (n != null) {
3098
+ if (n.strict === !0 && (d.strict = !0), n.storeAsString === !0 && (d.storeAsString = !0), d.alwaysParseAsBig = n.alwaysParseAsBig === !0 ? n.alwaysParseAsBig : !1, d.useNativeBigInt = n.useNativeBigInt === !0 ? n.useNativeBigInt : !1, typeof n.constructorAction < "u")
3099
+ if (n.constructorAction === "error" || n.constructorAction === "ignore" || n.constructorAction === "preserve")
3100
+ d.constructorAction = n.constructorAction;
3101
+ else
3102
+ throw new Error(
3103
+ `Incorrect value for constructorAction option, must be "error", "ignore" or undefined but passed ${n.constructorAction}`
3104
+ );
3105
+ if (typeof n.protoAction < "u")
3106
+ if (n.protoAction === "error" || n.protoAction === "ignore" || n.protoAction === "preserve")
3107
+ d.protoAction = n.protoAction;
3108
+ else
3109
+ throw new Error(
3110
+ `Incorrect value for protoAction option, must be "error", "ignore" or undefined but passed ${n.protoAction}`
3111
+ );
3112
+ }
3113
+ var h, p, v = {
3114
+ '"': '"',
3115
+ "\\": "\\",
3116
+ "/": "/",
3117
+ b: "\b",
3118
+ f: "\f",
3119
+ n: `
3120
+ `,
3121
+ r: "\r",
3122
+ t: " "
3123
+ }, _, N = function(T) {
3124
+ throw {
3125
+ name: "SyntaxError",
3126
+ message: T,
3127
+ at: h,
3128
+ text: _
3129
+ };
3130
+ }, g = function(T) {
3131
+ return T && T !== p && N("Expected '" + T + "' instead of '" + p + "'"), p = _.charAt(h), h += 1, p;
3132
+ }, L = function() {
3133
+ var T, O = "";
3134
+ for (p === "-" && (O = "-", g("-")); p >= "0" && p <= "9"; )
3135
+ O += p, g();
3136
+ if (p === ".")
3137
+ for (O += "."; g() && p >= "0" && p <= "9"; )
3138
+ O += p;
3139
+ if (p === "e" || p === "E")
3140
+ for (O += p, g(), (p === "-" || p === "+") && (O += p, g()); p >= "0" && p <= "9"; )
3141
+ O += p, g();
3142
+ if (T = +O, !isFinite(T))
3143
+ N("Bad number");
3144
+ else
3145
+ return st == null && (st = Kt), O.length > 15 ? d.storeAsString ? O : d.useNativeBigInt ? BigInt(O) : new st(O) : d.alwaysParseAsBig ? d.useNativeBigInt ? BigInt(T) : new st(T) : T;
3146
+ }, w = function() {
3147
+ var T, O, V = "", I;
3148
+ if (p === '"')
3149
+ for (var Y = h; g(); ) {
3150
+ if (p === '"')
3151
+ return h - 1 > Y && (V += _.substring(Y, h - 1)), g(), V;
3152
+ if (p === "\\") {
3153
+ if (h - 1 > Y && (V += _.substring(Y, h - 1)), g(), p === "u") {
3154
+ for (I = 0, O = 0; O < 4 && (T = parseInt(g(), 16), !!isFinite(T)); O += 1)
3155
+ I = I * 16 + T;
3156
+ V += String.fromCharCode(I);
3157
+ } else if (typeof v[p] == "string")
3158
+ V += v[p];
3159
+ else
3160
+ break;
3161
+ Y = h;
3162
+ }
3163
+ }
3164
+ N("Bad string");
3165
+ }, x = function() {
3166
+ for (; p && p <= " "; )
3167
+ g();
3168
+ }, M = function() {
3169
+ switch (p) {
3170
+ case "t":
3171
+ return g("t"), g("r"), g("u"), g("e"), !0;
3172
+ case "f":
3173
+ return g("f"), g("a"), g("l"), g("s"), g("e"), !1;
3174
+ case "n":
3175
+ return g("n"), g("u"), g("l"), g("l"), null;
3176
+ }
3177
+ N("Unexpected '" + p + "'");
3178
+ }, C, K = function() {
3179
+ var T = [];
3180
+ if (p === "[") {
3181
+ if (g("["), x(), p === "]")
3182
+ return g("]"), T;
3183
+ for (; p; ) {
3184
+ if (T.push(C()), x(), p === "]")
3185
+ return g("]"), T;
3186
+ g(","), x();
3187
+ }
3188
+ }
3189
+ N("Bad array");
3190
+ }, J = function() {
3191
+ var T, O = /* @__PURE__ */ Object.create(null);
3192
+ if (p === "{") {
3193
+ if (g("{"), x(), p === "}")
3194
+ return g("}"), O;
3195
+ for (; p; ) {
3196
+ if (T = w(), x(), g(":"), d.strict === !0 && Object.hasOwnProperty.call(O, T) && N('Duplicate key "' + T + '"'), Zr.test(T) === !0 ? d.protoAction === "error" ? N("Object contains forbidden prototype property") : d.protoAction === "ignore" ? C() : O[T] = C() : Qr.test(T) === !0 ? d.constructorAction === "error" ? N("Object contains forbidden constructor property") : d.constructorAction === "ignore" ? C() : O[T] = C() : O[T] = C(), x(), p === "}")
3197
+ return g("}"), O;
3198
+ g(","), x();
3199
+ }
3200
+ }
3201
+ N("Bad object");
3202
+ };
3203
+ return C = function() {
3204
+ switch (x(), p) {
3205
+ case "{":
3206
+ return J();
3207
+ case "[":
3208
+ return K();
3209
+ case '"':
3210
+ return w();
3211
+ case "-":
3212
+ return L();
3213
+ default:
3214
+ return p >= "0" && p <= "9" ? L() : M();
3215
+ }
3216
+ }, function(T, O) {
3217
+ var V;
3218
+ return _ = T + "", h = 0, p = " ", V = C(), x(), p && N("Syntax error"), typeof O == "function" ? function I(Y, Z) {
3219
+ var Q, A = Y[Z];
3220
+ return A && typeof A == "object" && Object.keys(A).forEach(function(B) {
3221
+ Q = I(A, B), Q !== void 0 ? A[B] = Q : delete A[B];
3222
+ }), O.call(Y, Z, A);
3223
+ }({ "": V }, "") : V;
3224
+ };
3225
+ }, ta = ea, Ht = Jr.stringify, Wt = ta;
3226
+ dt.exports = function(n) {
3227
+ return {
3228
+ parse: Wt(n),
3229
+ stringify: Ht
3230
+ };
3231
+ };
3232
+ dt.exports.parse = Wt();
3233
+ dt.exports.stringify = Ht;
3234
+ var sa = dt.exports;
3235
+ const na = /* @__PURE__ */ Yr(sa), oa = na({ storeAsString: !0 });
3236
+ let Xt;
3237
+ function el(n) {
3238
+ Xt = n, Re && (Re.defaults.baseURL = n);
3239
+ }
3240
+ const ra = () => {
3241
+ const n = ls.create({
3242
+ timeout: 3e4,
3243
+ headers: {
3244
+ "Content-Type": "application/json"
3245
+ },
3246
+ // 使用 json-bigint 解析响应数据,避免大整数精度丢失
3247
+ transformResponse: [
3248
+ (d) => {
3249
+ if (typeof d == "string")
3250
+ try {
3251
+ return oa.parse(d);
3252
+ } catch {
3253
+ return d;
3254
+ }
3255
+ return d;
3256
+ }
3257
+ ]
3258
+ });
3259
+ return n.interceptors.request.use(
3260
+ (d) => {
3261
+ const h = Xt || void 0;
3262
+ h && !d.baseURL && (d.baseURL = h);
3263
+ const p = ut(), v = vs() || "Bearer";
3264
+ return p && (d.headers.Authorization = `${v} ${p}`), d;
3265
+ },
3266
+ (d) => Promise.reject(d)
3267
+ ), n.interceptors.response.use(
3268
+ (d) => {
3269
+ const { data: h } = d;
3270
+ return h.code === 200 || h.code === 0 ? h.data : h.code === 9121 ? (Ie.error("登录已过期,请重新登录"), We(), window.location.href = "/login", Promise.reject(new Error(h.message || "EXPIRED OR INVALID TOKEN"))) : (Ie.error(h.message || "请求失败"), Promise.reject(new Error(h.message || "请求失败")));
3271
+ },
3272
+ (d) => {
3273
+ var p;
3274
+ const { response: h } = d;
3275
+ if (h) {
3276
+ const { data: v } = h;
3277
+ if ((v == null ? void 0 : v.code) === 9121)
3278
+ return Ie.error("登录已过期,请重新登录"), We(), window.location.href = "/login", Promise.reject(d);
3279
+ switch (h.status) {
3280
+ case 401:
3281
+ Ie.error("登录已过期,请重新登录"), We(), window.location.href = "/login";
3282
+ break;
3283
+ case 403:
3284
+ Ie.error("没有权限访问");
3285
+ break;
3286
+ case 404:
3287
+ Ie.error("请求资源不存在");
3288
+ break;
3289
+ case 500:
3290
+ Ie.error("服务器错误");
3291
+ break;
3292
+ default:
3293
+ Ie.error(((p = h.data) == null ? void 0 : p.message) || "请求失败");
3294
+ }
3295
+ } else
3296
+ Ie.error("网络连接失败");
3297
+ return Promise.reject(d);
3298
+ }
3299
+ ), n;
3300
+ }, Re = ra(), de = {
3301
+ get(n, d) {
3302
+ return Re.get(n, d);
3303
+ },
3304
+ post(n, d, h) {
3305
+ return Re.post(n, d, h);
3306
+ },
3307
+ put(n, d, h) {
3308
+ return Re.put(n, d, h);
3309
+ },
3310
+ patch(n, d, h) {
3311
+ return Re.patch(n, d, h);
3312
+ },
3313
+ delete(n, d) {
3314
+ return Re.delete(n, d);
3315
+ },
3316
+ // 文件下载 - 返回 Blob 对象
3317
+ download(n, d) {
3318
+ return Re.get(n, { ...d, responseType: "blob" });
3319
+ }
3320
+ };
3321
+ function aa(n) {
3322
+ return de.post("/user/v1.0/login/by-domain", n);
3323
+ }
3324
+ function tl() {
3325
+ return de.put("/user/v1.0/user/logout");
3326
+ }
3327
+ function la() {
3328
+ return de.get("/user/v1.0/user/get-me");
3329
+ }
3330
+ function sl(n) {
3331
+ return de.post("/user/v1.0/refresh", { refreshToken: n });
3332
+ }
3333
+ const ia = { class: "login-page" }, ca = { class: "login-form-section" }, ua = { class: "form-container" }, da = { class: "input-wrapper" }, fa = { class: "input-wrapper" }, pa = { class: "form-options" }, ma = { key: 0 }, ha = { key: 1 }, va = /* @__PURE__ */ Ae({
3334
+ __name: "index",
3335
+ setup(n) {
3336
+ const d = ze(), h = qe(), p = P(!1), v = P(!1), _ = bt({
3337
+ uid: "",
3338
+ password: ""
3339
+ }), N = {
3340
+ uid: [
3341
+ { required: !0, message: "请输入用户名", trigger: "blur" }
3342
+ ],
3343
+ password: [
3344
+ { required: !0, message: "请输入密码", trigger: "blur" },
3345
+ { min: 6, message: "密码长度至少6位", trigger: "blur" }
3346
+ ]
3347
+ }, g = P(), L = async () => {
3348
+ var w;
3349
+ try {
3350
+ await ((w = g.value) == null ? void 0 : w.validate()), p.value = !0;
3351
+ const x = await aa({
3352
+ appId: ct(),
3353
+ clientId: Rt(),
3354
+ uid: _.uid,
3355
+ password: _.password,
3356
+ code: !0
3357
+ });
3358
+ Ft(x), Ie.success("登录成功");
3359
+ const M = h.query.redirect || "/";
3360
+ d.push(M);
3361
+ } catch (x) {
3362
+ console.error("登录失败:", x);
3363
+ } finally {
3364
+ p.value = !1;
3365
+ }
3366
+ };
3367
+ return (w, x) => (y(), E("div", ia, [
3368
+ x[10] || (x[10] = nt('<div class="login-brand" data-v-15fc7de5><div class="brand-content" data-v-15fc7de5><div class="brand-logo" data-v-15fc7de5><div class="logo-icon" data-v-15fc7de5><svg viewBox="0 0 48 48" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-15fc7de5><rect width="48" height="48" rx="12" fill="currentColor" data-v-15fc7de5></rect><path d="M14 24L20 30L34 16" stroke="white" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" data-v-15fc7de5></path></svg></div><span class="logo-text" data-v-15fc7de5>XTO</span></div><div class="brand-slogan" data-v-15fc7de5><h1 data-v-15fc7de5>企业级后台管理解决方案</h1><p data-v-15fc7de5>开箱即用的中后台前端/设计解决方案</p></div><div class="brand-features" data-v-15fc7de5><div class="feature-item" data-v-15fc7de5><div class="feature-icon" data-v-15fc7de5><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" data-v-15fc7de5><path d="M13 2L3 14h9l-1 8 10-12h-9l1-8z" data-v-15fc7de5></path></svg></div><div class="feature-text" data-v-15fc7de5><h4 data-v-15fc7de5>高性能</h4><p data-v-15fc7de5>极致的渲染性能与响应速度</p></div></div><div class="feature-item" data-v-15fc7de5><div class="feature-icon" data-v-15fc7de5><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" data-v-15fc7de5><rect x="3" y="3" width="18" height="18" rx="2" data-v-15fc7de5></rect><path d="M9 9h6M9 12h6M9 15h4" data-v-15fc7de5></path></svg></div><div class="feature-text" data-v-15fc7de5><h4 data-v-15fc7de5>丰富组件</h4><p data-v-15fc7de5>60+ 高质量业务组件</p></div></div><div class="feature-item" data-v-15fc7de5><div class="feature-icon" data-v-15fc7de5><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" data-v-15fc7de5><circle cx="12" cy="12" r="10" data-v-15fc7de5></circle><path d="M12 6v6l4 2" data-v-15fc7de5></path></svg></div><div class="feature-text" data-v-15fc7de5><h4 data-v-15fc7de5>持续更新</h4><p data-v-15fc7de5>活跃的社区与快速迭代</p></div></div></div><div class="brand-decoration" data-v-15fc7de5><div class="decoration-line" data-v-15fc7de5></div><div class="decoration-dots" data-v-15fc7de5><span data-v-15fc7de5></span><span data-v-15fc7de5></span><span data-v-15fc7de5></span></div></div></div><div class="brand-bg" data-v-15fc7de5><div class="bg-grid" data-v-15fc7de5></div><div class="bg-glow" data-v-15fc7de5></div><div class="bg-pattern" data-v-15fc7de5></div></div></div>', 1)),
3369
+ s("div", ca, [
3370
+ s("div", ua, [
3371
+ x[7] || (x[7] = s("div", { class: "form-header" }, [
3372
+ s("h2", null, "欢迎登录"),
3373
+ s("p", null, "请输入您的账户信息")
3374
+ ], -1)),
3375
+ R(k(rs), {
3376
+ ref_key: "formRef",
3377
+ ref: g,
3378
+ model: _,
3379
+ rules: N,
3380
+ class: "login-form",
3381
+ "label-width": "0"
3382
+ }, {
3383
+ default: X(() => [
3384
+ R(k(mt), { prop: "uid" }, {
3385
+ default: X(() => [
3386
+ s("div", da, [
3387
+ x[3] || (x[3] = s("label", { class: "input-label" }, "用户名", -1)),
3388
+ R(k(Ot), {
3389
+ modelValue: _.uid,
3390
+ "onUpdate:modelValue": x[0] || (x[0] = (M) => _.uid = M),
3391
+ placeholder: "请输入用户名",
3392
+ size: "large"
3393
+ }, {
3394
+ prefix: X(() => [
3395
+ R(k(ee), {
3396
+ name: "user",
3397
+ size: 18
3398
+ })
3399
+ ]),
3400
+ _: 1
3401
+ }, 8, ["modelValue"])
3402
+ ])
3403
+ ]),
3404
+ _: 1
3405
+ }),
3406
+ R(k(mt), { prop: "password" }, {
3407
+ default: X(() => [
3408
+ s("div", fa, [
3409
+ x[4] || (x[4] = s("label", { class: "input-label" }, "密码", -1)),
3410
+ R(k(Ot), {
3411
+ modelValue: _.password,
3412
+ "onUpdate:modelValue": x[1] || (x[1] = (M) => _.password = M),
3413
+ type: "password",
3414
+ placeholder: "请输入密码",
3415
+ size: "large",
3416
+ "show-password": "",
3417
+ onKeyup: ts(L, ["enter"])
3418
+ }, {
3419
+ prefix: X(() => [
3420
+ R(k(ee), {
3421
+ name: "lock",
3422
+ size: 18
3423
+ })
3424
+ ]),
3425
+ _: 1
3426
+ }, 8, ["modelValue"])
3427
+ ])
3428
+ ]),
3429
+ _: 1
3430
+ }),
3431
+ s("div", pa, [
3432
+ R(k(as), {
3433
+ modelValue: v.value,
3434
+ "onUpdate:modelValue": x[2] || (x[2] = (M) => v.value = M)
3435
+ }, {
3436
+ default: X(() => [...x[5] || (x[5] = [
3437
+ Fe("记住我", -1)
3438
+ ])]),
3439
+ _: 1
3440
+ }, 8, ["modelValue"]),
3441
+ x[6] || (x[6] = s("a", {
3442
+ href: "#",
3443
+ class: "forgot-link"
3444
+ }, "忘记密码?", -1))
3445
+ ]),
3446
+ R(k(mt), null, {
3447
+ default: X(() => [
3448
+ R(k(je), {
3449
+ type: "primary",
3450
+ size: "large",
3451
+ loading: p.value,
3452
+ class: "login-btn",
3453
+ onClick: L
3454
+ }, {
3455
+ default: X(() => [
3456
+ p.value ? (y(), E("span", ha, "登录中...")) : (y(), E("span", ma, "登 录"))
3457
+ ]),
3458
+ _: 1
3459
+ }, 8, ["loading"])
3460
+ ]),
3461
+ _: 1
3462
+ })
3463
+ ]),
3464
+ _: 1
3465
+ }, 8, ["model"]),
3466
+ x[8] || (x[8] = nt('<div class="form-footer" data-v-15fc7de5><p data-v-15fc7de5>其他登录方式</p><div class="social-login" data-v-15fc7de5><button class="social-btn" title="企业微信" data-v-15fc7de5><svg viewBox="0 0 24 24" fill="currentColor" data-v-15fc7de5><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm-1 17.93c-3.95-.49-7-3.85-7-7.93 0-.62.08-1.21.21-1.79L9 15v1c0 1.1.9 2 2 2v1.93zm6.9-2.54c-.26-.81-1-1.39-1.9-1.39h-1v-3c0-.55-.45-1-1-1H8v-2h2c.55 0 1-.45 1-1V7h2c1.1 0 2-.9 2-2v-.41c2.93 1.19 5 4.06 5 7.41 0 2.08-.8 3.97-2.1 5.39z" data-v-15fc7de5></path></svg></button><button class="social-btn" title="钉钉" data-v-15fc7de5><svg viewBox="0 0 24 24" fill="currentColor" data-v-15fc7de5><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm4.64 6.8c-.15 1.58-.8 5.42-1.13 7.19-.14.75-.42 1-.68 1.03-.58.05-1.02-.38-1.58-.75-.88-.58-1.38-.94-2.23-1.5-.99-.65-.35-1.01.22-1.59.15-.15 2.71-2.48 2.76-2.69a.2.2 0 00-.05-.18c-.06-.05-.14-.03-.21-.02-.09.02-1.49.95-4.22 2.79-.4.27-.76.41-1.08.4-.36-.01-1.04-.2-1.55-.37-.63-.2-1.12-.31-1.08-.66.02-.18.27-.36.74-.55 2.92-1.27 4.86-2.11 5.83-2.51 2.78-1.16 3.35-1.36 3.73-1.36.08 0 .27.02.39.12.1.08.13.19.14.27-.01.06.01.24 0 .38z" data-v-15fc7de5></path></svg></button><button class="social-btn" title="飞书" data-v-15fc7de5><svg viewBox="0 0 24 24" fill="currentColor" data-v-15fc7de5><path d="M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z" data-v-15fc7de5></path></svg></button></div></div>', 1))
3467
+ ]),
3468
+ x[9] || (x[9] = s("div", { class: "copyright" }, [
3469
+ s("p", null, "© 2024 XTO Team. All rights reserved.")
3470
+ ], -1))
3471
+ ])
3472
+ ]));
3473
+ }
3474
+ }), ga = /* @__PURE__ */ $e(va, [["__scopeId", "data-v-15fc7de5"]]), _a = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3475
+ __proto__: null,
3476
+ default: ga
3477
+ }, Symbol.toStringTag, { value: "Module" })), wa = { class: "error-page" }, ya = { class: "error-container" }, ka = { class: "error-content" }, ba = { class: "error-actions" }, xa = /* @__PURE__ */ Ae({
3478
+ __name: "404",
3479
+ setup(n) {
3480
+ const d = ze(), h = () => {
3481
+ d.push("/");
3482
+ };
3483
+ return (p, v) => (y(), E("div", wa, [
3484
+ s("div", ya, [
3485
+ v[7] || (v[7] = s("div", { class: "error-bg" }, [
3486
+ s("div", { class: "bg-circle circle-1" }),
3487
+ s("div", { class: "bg-circle circle-2" }),
3488
+ s("div", { class: "bg-circle circle-3" })
3489
+ ], -1)),
3490
+ s("div", ka, [
3491
+ v[5] || (v[5] = nt('<div class="error-code" data-v-3a9e61ae><span class="code-digit" data-v-3a9e61ae>4</span><span class="code-zero" data-v-3a9e61ae><span class="zero-inner" data-v-3a9e61ae>0</span></span><span class="code-digit" data-v-3a9e61ae>4</span></div><div class="error-illustration" data-v-3a9e61ae><svg viewBox="0 0 200 120" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-3a9e61ae><rect x="40" y="20" width="120" height="80" rx="8" fill="var(--color-fill)" stroke="var(--color-border)" stroke-width="2" data-v-3a9e61ae></rect><rect x="50" y="30" width="100" height="60" rx="4" fill="var(--bg-color)" data-v-3a9e61ae></rect><line x1="60" y1="45" x2="140" y2="45" stroke="var(--color-border-light)" stroke-width="2" data-v-3a9e61ae></line><line x1="60" y1="55" x2="120" y2="55" stroke="var(--color-border-light)" stroke-width="2" data-v-3a9e61ae></line><line x1="60" y1="65" x2="100" y2="65" stroke="var(--color-border-light)" stroke-width="2" data-v-3a9e61ae></line><text x="100" y="75" text-anchor="middle" fill="var(--color-primary)" font-size="24" font-weight="600" data-v-3a9e61ae>?</text><circle cx="150" cy="35" r="12" stroke="var(--color-primary)" stroke-width="2" fill="none" data-v-3a9e61ae></circle><line x1="158" y1="43" x2="168" y2="53" stroke="var(--color-primary)" stroke-width="2" stroke-linecap="round" data-v-3a9e61ae></line></svg></div><h1 class="error-title" data-v-3a9e61ae>页面不存在</h1><p class="error-desc" data-v-3a9e61ae>抱歉,您访问的页面不存在或已被删除</p>', 4)),
3492
+ s("div", ba, [
3493
+ R(k(je), {
3494
+ type: "primary",
3495
+ size: "large",
3496
+ onClick: h
3497
+ }, {
3498
+ icon: X(() => [...v[1] || (v[1] = [
3499
+ s("svg", {
3500
+ viewBox: "0 0 24 24",
3501
+ fill: "none",
3502
+ stroke: "currentColor",
3503
+ "stroke-width": "2"
3504
+ }, [
3505
+ s("path", { d: "M3 9l9-7 9 7v11a2 2 0 01-2 2H5a2 2 0 01-2-2V9z" }),
3506
+ s("polyline", { points: "9,22 9,12 15,12 15,22" })
3507
+ ], -1)
3508
+ ])]),
3509
+ default: X(() => [
3510
+ v[2] || (v[2] = Fe(" 返回首页 ", -1))
3511
+ ]),
3512
+ _: 1
3513
+ }),
3514
+ R(k(je), {
3515
+ size: "large",
3516
+ onClick: v[0] || (v[0] = (_) => k(d).go(-1))
3517
+ }, {
3518
+ icon: X(() => [...v[3] || (v[3] = [
3519
+ s("svg", {
3520
+ viewBox: "0 0 24 24",
3521
+ fill: "none",
3522
+ stroke: "currentColor",
3523
+ "stroke-width": "2"
3524
+ }, [
3525
+ s("path", { d: "M19 12H5M12 19l-7-7 7-7" })
3526
+ ], -1)
3527
+ ])]),
3528
+ default: X(() => [
3529
+ v[4] || (v[4] = Fe(" 返回上一页 ", -1))
3530
+ ]),
3531
+ _: 1
3532
+ })
3533
+ ]),
3534
+ v[6] || (v[6] = s("div", { class: "error-tip" }, [
3535
+ s("p", null, "您可以尝试:"),
3536
+ s("ul", null, [
3537
+ s("li", null, "检查您输入的网址是否正确"),
3538
+ s("li", null, "返回首页重新浏览"),
3539
+ s("li", null, "联系管理员反馈问题")
3540
+ ])
3541
+ ], -1))
3542
+ ])
3543
+ ])
3544
+ ]));
3545
+ }
3546
+ }), Ca = /* @__PURE__ */ $e(xa, [["__scopeId", "data-v-3a9e61ae"]]), Yt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3547
+ __proto__: null,
3548
+ default: Ca
3549
+ }, Symbol.toStringTag, { value: "Module" })), Na = { class: "error-page" }, Sa = { class: "error-container" }, Ea = { class: "error-content" }, $a = { class: "error-actions" }, Ma = /* @__PURE__ */ Ae({
3550
+ __name: "403",
3551
+ setup(n) {
3552
+ const d = ze(), h = () => {
3553
+ d.push("/");
3554
+ };
3555
+ return (p, v) => (y(), E("div", Na, [
3556
+ s("div", Sa, [
3557
+ v[7] || (v[7] = s("div", { class: "error-bg" }, [
3558
+ s("div", { class: "bg-circle circle-1" }),
3559
+ s("div", { class: "bg-circle circle-2" }),
3560
+ s("div", { class: "bg-circle circle-3" })
3561
+ ], -1)),
3562
+ s("div", Ea, [
3563
+ v[5] || (v[5] = nt('<div class="error-code" data-v-c733ebac><span class="code-digit" data-v-c733ebac>4</span><span class="code-zero warning" data-v-c733ebac><span class="zero-inner" data-v-c733ebac>0</span></span><span class="code-digit" data-v-c733ebac>3</span></div><div class="error-illustration" data-v-c733ebac><svg viewBox="0 0 200 120" fill="none" xmlns="http://www.w3.org/2000/svg" data-v-c733ebac><path d="M100 15 L150 35 L150 70 C150 95 100 110 100 110 C100 110 50 95 50 70 L50 35 Z" fill="var(--color-warning-lighter)" stroke="var(--color-warning)" stroke-width="2" data-v-c733ebac></path><rect x="85" y="55" width="30" height="25" rx="4" fill="var(--color-warning)" data-v-c733ebac></rect><path d="M92 55 V48 A8 8 0 0 1 108 48 V55" fill="none" stroke="var(--color-warning)" stroke-width="3" data-v-c733ebac></path><circle cx="100" cy="67" r="6" fill="none" stroke="#fff" stroke-width="2" data-v-c733ebac></circle><line x1="96" y1="63" x2="104" y2="71" stroke="#fff" stroke-width="2" data-v-c733ebac></line></svg></div><h1 class="error-title" data-v-c733ebac>无访问权限</h1><p class="error-desc" data-v-c733ebac>抱歉,您没有权限访问此页面,请联系管理员获取权限</p>', 4)),
3564
+ s("div", $a, [
3565
+ R(k(je), {
3566
+ type: "primary",
3567
+ size: "large",
3568
+ onClick: h
3569
+ }, {
3570
+ icon: X(() => [...v[1] || (v[1] = [
3571
+ s("svg", {
3572
+ viewBox: "0 0 24 24",
3573
+ fill: "none",
3574
+ stroke: "currentColor",
3575
+ "stroke-width": "2"
3576
+ }, [
3577
+ s("path", { d: "M3 9l9-7 9 7v11a2 2 0 01-2 2H5a2 2 0 01-2-2V9z" }),
3578
+ s("polyline", { points: "9,22 9,12 15,12 15,22" })
3579
+ ], -1)
3580
+ ])]),
3581
+ default: X(() => [
3582
+ v[2] || (v[2] = Fe(" 返回首页 ", -1))
3583
+ ]),
3584
+ _: 1
3585
+ }),
3586
+ R(k(je), {
3587
+ size: "large",
3588
+ onClick: v[0] || (v[0] = (_) => k(d).go(-1))
3589
+ }, {
3590
+ icon: X(() => [...v[3] || (v[3] = [
3591
+ s("svg", {
3592
+ viewBox: "0 0 24 24",
3593
+ fill: "none",
3594
+ stroke: "currentColor",
3595
+ "stroke-width": "2"
3596
+ }, [
3597
+ s("path", { d: "M19 12H5M12 19l-7-7 7-7" })
3598
+ ], -1)
3599
+ ])]),
3600
+ default: X(() => [
3601
+ v[4] || (v[4] = Fe(" 返回上一页 ", -1))
3602
+ ]),
3603
+ _: 1
3604
+ })
3605
+ ]),
3606
+ v[6] || (v[6] = s("div", { class: "error-tip" }, [
3607
+ s("p", null, "可能的原因:"),
3608
+ s("ul", null, [
3609
+ s("li", null, "您的账号权限不足"),
3610
+ s("li", null, "该页面需要特定角色才能访问"),
3611
+ s("li", null, "您的登录状态已过期")
3612
+ ])
3613
+ ], -1))
3614
+ ])
3615
+ ])
3616
+ ]));
3617
+ }
3618
+ }), nl = /* @__PURE__ */ $e(Ma, [["__scopeId", "data-v-c733ebac"]]);
3619
+ function ol() {
3620
+ const n = De(), d = Ee(), h = Ze(), p = j(() => d.userName || ""), v = j(() => d.userInfo), _ = j(() => n.appName), N = j(() => h.isLoggedIn), g = j(() => n.isDark), L = j(() => n.theme), w = j(() => n.isCollapsed), x = j(() => n.layout);
3621
+ return {
3622
+ userName: p,
3623
+ userInfo: v,
3624
+ appName: _,
3625
+ isLoggedIn: N,
3626
+ isDark: g,
3627
+ theme: L,
3628
+ isCollapsed: w,
3629
+ layout: x,
3630
+ toggleTheme: () => {
3631
+ n.toggleTheme();
3632
+ },
3633
+ toggleCollapse: () => {
3634
+ n.toggleCollapse();
3635
+ }
3636
+ };
3637
+ }
3638
+ function rl() {
3639
+ const n = Ee();
3640
+ return {
3641
+ isLoggedIn: j(() => n.isLoggedIn)
3642
+ };
3643
+ }
3644
+ function al(n, d = {}) {
3645
+ const { rules: h, onSubmit: p } = d, v = P(), _ = bt({ ...n }), N = P(!1), g = P(!1), L = P(!1), w = () => {
3646
+ C(), L.value = !1, g.value = !0;
3647
+ }, x = (J) => {
3648
+ Object.assign(_, J), L.value = !0, g.value = !0;
3649
+ }, M = () => {
3650
+ g.value = !1, C();
3651
+ }, C = () => {
3652
+ var J;
3653
+ Object.keys(n).forEach((T) => {
3654
+ _[T] = n[T];
3655
+ }), (J = v.value) == null || J.resetFields();
3656
+ };
3657
+ return {
3658
+ formRef: v,
3659
+ formData: _,
3660
+ rules: h,
3661
+ loading: N,
3662
+ visible: g,
3663
+ isEdit: L,
3664
+ openAdd: w,
3665
+ openEdit: x,
3666
+ close: M,
3667
+ resetForm: C,
3668
+ handleSubmit: async () => {
3669
+ var J;
3670
+ try {
3671
+ await ((J = v.value) == null ? void 0 : J.validate()), N.value = !0, await (p == null ? void 0 : p(_)), M();
3672
+ } catch (T) {
3673
+ console.error(T);
3674
+ } finally {
3675
+ N.value = !1;
3676
+ }
3677
+ }
3678
+ };
3679
+ }
3680
+ function ll(n) {
3681
+ const { fetchData: d, defaultPageSize: h = 10 } = n, p = P(!1), v = P([]), _ = P(0), N = P(1), g = P(h), L = bt({}), w = async () => {
3682
+ p.value = !0;
3683
+ try {
3684
+ const O = {
3685
+ ...L,
3686
+ page: N.value,
3687
+ pageSize: g.value
3688
+ }, V = await d(O);
3689
+ v.value = V.list, _.value = V.total;
3690
+ } catch (O) {
3691
+ console.error(O);
3692
+ } finally {
3693
+ p.value = !1;
3694
+ }
3695
+ }, x = () => {
3696
+ N.value = 1, w();
3697
+ }, M = () => {
3698
+ Object.keys(L).forEach((O) => {
3699
+ L[O] = void 0;
3700
+ }), N.value = 1, w();
3701
+ }, C = (O) => {
3702
+ N.value = O, w();
3703
+ }, K = (O) => {
3704
+ g.value = O, N.value = 1, w();
3705
+ }, J = () => {
3706
+ w();
3707
+ }, T = j(() => ({
3708
+ current: N.value,
3709
+ pageSize: g.value,
3710
+ total: _.value
3711
+ }));
3712
+ return {
3713
+ loading: p,
3714
+ data: v,
3715
+ total: _,
3716
+ currentPage: N,
3717
+ pageSize: g,
3718
+ searchParams: L,
3719
+ pagination: T,
3720
+ getData: w,
3721
+ handleSearch: x,
3722
+ handleReset: M,
3723
+ handlePageChange: C,
3724
+ handleSizeChange: K,
3725
+ refresh: J
3726
+ };
3727
+ }
3728
+ const Tt = Je("locale", () => {
3729
+ const n = q.get("locale") || "zh-CN", d = is(n), h = P(n), p = cs(), { t: v, messages: _, setLocale: N, mergeMessages: g } = us(), L = j(() => {
3730
+ const C = p.find((K) => K.code === h.value);
3731
+ return (C == null ? void 0 : C.name) || h.value;
3732
+ });
3733
+ return {
3734
+ locale: h,
3735
+ localeName: L,
3736
+ locales: p,
3737
+ messages: _,
3738
+ t: v,
3739
+ changeLocale: (C) => {
3740
+ h.value = C, N(C), q.set("locale", C), d.setLocale(C);
3741
+ },
3742
+ addMessages: (C) => {
3743
+ g(C);
3744
+ },
3745
+ initLocale: () => {
3746
+ N(n);
3747
+ },
3748
+ provider: d
3749
+ };
3750
+ }), La = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3751
+ __proto__: null,
3752
+ useLocaleStore: Tt
3753
+ }, Symbol.toStringTag, { value: "Module" }));
3754
+ function il() {
3755
+ const n = Tt();
3756
+ return {
3757
+ /** 当前语言代码 */
3758
+ locale: n.locale,
3759
+ /** 当前语言名称 */
3760
+ localeName: n.localeName,
3761
+ /** 支持的语言列表 */
3762
+ locales: n.locales,
3763
+ /** 翻译函数 */
3764
+ t: n.t,
3765
+ /** 当前语言包 */
3766
+ messages: n.messages,
3767
+ /** 切换语言 */
3768
+ setLocale: n.changeLocale,
3769
+ /** 添加自定义翻译 */
3770
+ addMessages: n.addMessages
3771
+ };
3772
+ }
3773
+ function cl() {
3774
+ return Tt().t;
3775
+ }
3776
+ function ul(n) {
3777
+ const d = Ee(), h = Pe();
3778
+ return d.isLoggedIn ? h.hasPermission(n) : !1;
3779
+ }
3780
+ function dl(n) {
3781
+ return Ee().isLoggedIn;
3782
+ }
3783
+ function fl() {
3784
+ return !0;
3785
+ }
3786
+ const Jt = [
3787
+ {
3788
+ path: "/login",
3789
+ name: "Login",
3790
+ component: () => Promise.resolve().then(() => _a),
3791
+ meta: {
3792
+ title: "登录",
3793
+ hidden: !0
3794
+ }
3795
+ }
3796
+ ], Zt = {
3797
+ path: "/",
3798
+ name: "Layout",
3799
+ component: () => Promise.resolve().then(() => Fr),
3800
+ redirect: "/dashboard",
3801
+ children: [
3802
+ {
3803
+ path: "/dashboard",
3804
+ name: "Dashboard",
3805
+ component: () => import("./index-WPRGF_GX.js"),
3806
+ meta: {
3807
+ title: "仪表盘",
3808
+ icon: "dashboard",
3809
+ keepAlive: !0,
3810
+ affix: !0
3811
+ }
3812
+ },
3813
+ {
3814
+ path: "/system/user",
3815
+ name: "SystemUser",
3816
+ component: () => import("./index-BfXnrw05.js"),
3817
+ meta: {
3818
+ title: "用户管理",
3819
+ icon: "user",
3820
+ keepAlive: !0
3821
+ }
3822
+ },
3823
+ {
3824
+ path: "/system/role",
3825
+ name: "SystemRole",
3826
+ component: () => import("./index-DjXyzwL0.js"),
3827
+ meta: {
3828
+ title: "角色管理",
3829
+ icon: "role",
3830
+ keepAlive: !0
3831
+ }
3832
+ },
3833
+ {
3834
+ path: "/system/menu",
3835
+ name: "SystemMenu",
3836
+ component: () => import("./index-CvQgEgUM.js"),
3837
+ meta: {
3838
+ title: "菜单管理",
3839
+ icon: "menu",
3840
+ keepAlive: !0
3841
+ }
3842
+ },
3843
+ // catch-all 路由:让 404 在 Layout 内部渲染,保持左侧菜单显示
3844
+ {
3845
+ path: "/:pathMatch(.*)*",
3846
+ name: "CatchAll",
3847
+ component: () => Promise.resolve().then(() => Yt),
3848
+ meta: {
3849
+ title: "404",
3850
+ hidden: !0
3851
+ }
3852
+ }
3853
+ ]
3854
+ }, pl = [
3855
+ {
3856
+ path: "/dashboard",
3857
+ name: "Dashboard",
3858
+ component: () => import("./index-WPRGF_GX.js"),
3859
+ meta: {
3860
+ title: "仪表盘",
3861
+ icon: "dashboard",
3862
+ keepAlive: !0,
3863
+ affix: !0
3864
+ }
3865
+ },
3866
+ {
3867
+ path: "/system",
3868
+ name: "System",
3869
+ redirect: "/system/user",
3870
+ meta: {
3871
+ title: "系统管理",
3872
+ icon: "setting"
3873
+ },
3874
+ children: [
3875
+ {
3876
+ path: "user",
3877
+ name: "SystemUser",
3878
+ component: () => import("./index-BfXnrw05.js"),
3879
+ meta: {
3880
+ title: "用户管理",
3881
+ icon: "user",
3882
+ keepAlive: !0
3883
+ }
3884
+ },
3885
+ {
3886
+ path: "role",
3887
+ name: "SystemRole",
3888
+ component: () => import("./index-DjXyzwL0.js"),
3889
+ meta: {
3890
+ title: "角色管理",
3891
+ icon: "role",
3892
+ keepAlive: !0
3893
+ }
3894
+ },
3895
+ {
3896
+ path: "menu",
3897
+ name: "SystemMenu",
3898
+ component: () => import("./index-CvQgEgUM.js"),
3899
+ meta: {
3900
+ title: "菜单管理",
3901
+ icon: "menu",
3902
+ keepAlive: !0
3903
+ }
3904
+ }
3905
+ ]
3906
+ }
3907
+ ], Ia = [
3908
+ {
3909
+ menuCode: "dashboard",
3910
+ menuName: "仪表盘",
3911
+ menuUrl: "/dashboard",
3912
+ icon: "dashboard",
3913
+ closable: !0,
3914
+ isDefault: !0,
3915
+ isOut: !1
3916
+ },
3917
+ {
3918
+ menuCode: "system",
3919
+ menuName: "系统管理",
3920
+ menuUrl: "/system",
3921
+ icon: "setting",
3922
+ closable: !1,
3923
+ isDefault: !1,
3924
+ isOut: !1,
3925
+ children: [
3926
+ {
3927
+ menuCode: "system_user",
3928
+ menuName: "用户管理",
3929
+ menuUrl: "/system/user",
3930
+ icon: "user",
3931
+ closable: !0,
3932
+ isDefault: !1,
3933
+ isOut: !1
3934
+ },
3935
+ {
3936
+ menuCode: "system_role",
3937
+ menuName: "角色管理",
3938
+ menuUrl: "/system/role",
3939
+ icon: "role",
3940
+ closable: !0,
3941
+ isDefault: !1,
3942
+ isOut: !1
3943
+ },
3944
+ {
3945
+ menuCode: "system_menu",
3946
+ menuName: "菜单管理",
3947
+ menuUrl: "/system/menu",
3948
+ icon: "menu",
3949
+ closable: !0,
3950
+ isDefault: !1,
3951
+ isOut: !1
3952
+ }
3953
+ ]
3954
+ }
3955
+ ], Qt = xt({
3956
+ history: Ct(),
3957
+ routes: [...Jt, Zt],
3958
+ scrollBehavior: () => ({ left: 0, top: 0 })
3959
+ }), Aa = ["/login"];
3960
+ Qt.beforeEach(async (n, d, h) => {
3961
+ const p = De();
3962
+ if (p.initTheme(), Vt())
3963
+ if (n.path === "/login")
3964
+ h({ path: "/" });
3965
+ else {
3966
+ const v = Ee();
3967
+ v.isLoggedIn || (v.setUserInfo({
3968
+ appId: ct(),
3969
+ userId: "1",
3970
+ userName: "管理员",
3971
+ departmentName: "技术部",
3972
+ email: "admin@example.com",
3973
+ mobilePhone: "13800138000",
3974
+ positionName: "管理员",
3975
+ avatar: ""
3976
+ }), Pe().setMenuList(Ia)), n.name && n.meta.keepAlive && p.addCachedView(n.name), h();
3977
+ }
3978
+ else
3979
+ Aa.includes(n.path) ? h() : h("/login");
3980
+ });
3981
+ function ml() {
3982
+ const n = xt({
3983
+ history: Ct(),
3984
+ routes: [...Jt, Zt]
3985
+ });
3986
+ Qt.matcher = n.matcher;
3987
+ }
3988
+ function hl(n, d = {}) {
3989
+ const h = d.indexPath || "/dashboard", p = d.logoSrc || "/vite.svg", v = {
3990
+ path: "/:pathMatch(.*)*",
3991
+ name: "CatchAll",
3992
+ component: () => Promise.resolve().then(() => Yt),
3993
+ meta: {
3994
+ title: "404"
3995
+ }
3996
+ };
3997
+ return {
3998
+ path: "/",
3999
+ name: "Layout",
4000
+ component: () => ss(jt, { logoSrc: p }),
4001
+ redirect: h,
4002
+ children: [...n, v]
4003
+ };
4004
+ }
4005
+ function vl(n, d = {}) {
4006
+ return xt({
4007
+ history: Ct(d.base),
4008
+ routes: n,
4009
+ scrollBehavior: () => ({ left: 0, top: 0 })
4010
+ });
4011
+ }
4012
+ function gl(n) {
4013
+ return de.get("/role/list", { params: n });
4014
+ }
4015
+ function _l(n) {
4016
+ return de.get(`/role/${n}`);
4017
+ }
4018
+ function wl(n) {
4019
+ return de.post("/role", n);
4020
+ }
4021
+ function yl(n, d) {
4022
+ return de.put(`/role/${n}`, d);
4023
+ }
4024
+ function kl(n) {
4025
+ return de.delete(`/role/${n}`);
4026
+ }
4027
+ function bl(n, d) {
4028
+ return de.patch(`/role/${n}/status`, { status: d });
4029
+ }
4030
+ function xl() {
4031
+ return de.get("/user/v1.0/menu/list");
4032
+ }
4033
+ function Ta(n) {
4034
+ const d = n || ct();
4035
+ return de.get(`/user/v1.0/menu/get-menu?appId=${d}`);
4036
+ }
4037
+ function Cl(n) {
4038
+ return de.post("/menu", n);
4039
+ }
4040
+ function Nl(n, d) {
4041
+ return de.put(`/menu/${n}`, d);
4042
+ }
4043
+ function Sl(n) {
4044
+ return de.delete(`/menu/${n}`);
4045
+ }
4046
+ const Oa = ["/login", "/404", "/403"];
4047
+ function El(n, d = {}) {
4048
+ const h = d.whiteList || Oa, p = d.loginPath || "/login", v = d.homePath || "/";
4049
+ n.beforeEach(async (_, N, g) => {
4050
+ const L = De(), w = Ee(), x = Pe();
4051
+ if (L.initTheme(), ut())
4052
+ if (_.path === p)
4053
+ g({ path: v });
4054
+ else if (w.isLoggedIn)
4055
+ _.name && _.meta.keepAlive && L.addCachedView(_.name), g();
4056
+ else
4057
+ try {
4058
+ if (d.fetchUserInfo) {
4059
+ const C = await d.fetchUserInfo();
4060
+ w.setUserInfo(C);
4061
+ } else {
4062
+ const C = await la();
4063
+ w.setUserInfo(C);
4064
+ }
4065
+ if (d.fetchMenu) {
4066
+ const C = await d.fetchMenu();
4067
+ x.setMenuList(C);
4068
+ } else {
4069
+ const C = await Ta(d.appId);
4070
+ x.setMenuList(C);
4071
+ }
4072
+ d.onLoginSuccess && d.onLoginSuccess(), _.name && _.meta.keepAlive && L.addCachedView(_.name), g({ ..._, replace: !0 });
4073
+ } catch (C) {
4074
+ console.error("获取用户信息失败:", C), w.clearUserInfo(), x.clearMenu(), We(), g({ path: p, query: { redirect: _.fullPath } });
4075
+ }
4076
+ else
4077
+ h.includes(_.path) ? g() : g({ path: p, query: { redirect: _.fullPath } });
4078
+ }), n.afterEach(() => {
4079
+ });
4080
+ }
4081
+ function $l(n) {
4082
+ return de.get("/user/list", { params: n });
4083
+ }
4084
+ function Ml(n) {
4085
+ return de.get(`/user/${n}`);
4086
+ }
4087
+ function Ll(n) {
4088
+ return de.post("/user", n);
4089
+ }
4090
+ function Il(n, d) {
4091
+ return de.put(`/user/${n}`, d);
4092
+ }
4093
+ function Al(n) {
4094
+ return de.delete(`/user/${n}`);
4095
+ }
4096
+ function Tl(n) {
4097
+ return de.post("/user/batch-delete", { ids: n });
4098
+ }
4099
+ function Ol(n, d) {
4100
+ return de.patch(`/user/${n}/status`, { status: d });
4101
+ }
4102
+ function Ul(n) {
4103
+ return de.post(`/user/${n}/reset-password`);
4104
+ }
4105
+ var Ua = /* @__PURE__ */ ((n) => (n[n.ENABLED = 1] = "ENABLED", n[n.DISABLED = 0] = "DISABLED", n))(Ua || {}), Ba = /* @__PURE__ */ ((n) => (n[n.UNKNOWN = 0] = "UNKNOWN", n[n.MALE = 1] = "MALE", n[n.FEMALE = 2] = "FEMALE", n))(Ba || {}), Pa = /* @__PURE__ */ ((n) => (n[n.DIRECTORY = 0] = "DIRECTORY", n[n.MENU = 1] = "MENU", n[n.BUTTON = 2] = "BUTTON", n))(Pa || {});
4106
+ const Bl = {
4107
+ 1: "启用",
4108
+ 0: "禁用"
4109
+ }, Pl = {
4110
+ 0: "未知",
4111
+ 1: "男",
4112
+ 2: "女"
4113
+ }, Rl = {
4114
+ 0: "目录",
4115
+ 1: "菜单",
4116
+ 2: "按钮"
4117
+ }, zl = [
4118
+ {
4119
+ label: "启用",
4120
+ value: 1
4121
+ /* ENABLED */
4122
+ },
4123
+ {
4124
+ label: "禁用",
4125
+ value: 0
4126
+ /* DISABLED */
4127
+ }
4128
+ ], Dl = [
4129
+ {
4130
+ label: "未知",
4131
+ value: 0
4132
+ /* UNKNOWN */
4133
+ },
4134
+ {
4135
+ label: "男",
4136
+ value: 1
4137
+ /* MALE */
4138
+ },
4139
+ {
4140
+ label: "女",
4141
+ value: 2
4142
+ /* FEMALE */
4143
+ }
4144
+ ], Fl = [
4145
+ {
4146
+ label: "目录",
4147
+ value: 0
4148
+ /* DIRECTORY */
4149
+ },
4150
+ {
4151
+ label: "菜单",
4152
+ value: 1
4153
+ /* MENU */
4154
+ },
4155
+ {
4156
+ label: "按钮",
4157
+ value: 2
4158
+ /* BUTTON */
4159
+ }
4160
+ ], Vl = {
4161
+ mounted(n, d) {
4162
+ var N, g;
4163
+ const h = Ee(), p = Pe();
4164
+ if (!h.isLoggedIn) {
4165
+ (N = n.parentNode) == null || N.removeChild(n);
4166
+ return;
4167
+ }
4168
+ const v = d.value, _ = Array.isArray(v) ? v : [v];
4169
+ p.hasPermission(_) || (g = n.parentNode) == null || g.removeChild(n);
4170
+ }
4171
+ };
4172
+ function jl(n) {
4173
+ return ds({
4174
+ appId: n.appId,
4175
+ clientId: n.clientId,
4176
+ apiBaseUrl: n.apiBaseUrl
4177
+ }), n.locale && Promise.resolve().then(() => La).then(({ useLocaleStore: d }) => {
4178
+ d().changeLocale(n.locale);
4179
+ }), {
4180
+ config: {
4181
+ appName: n.appName || "XTO App",
4182
+ appId: ct(),
4183
+ clientId: Rt(),
4184
+ apiBaseUrl: fs(),
4185
+ indexPath: n.indexPath || "/dashboard",
4186
+ loginPath: n.loginPath || "/login",
4187
+ locale: n.locale || "zh-CN"
4188
+ }
4189
+ };
4190
+ }
4191
+ export {
4192
+ fl as $,
4193
+ Rt as A,
4194
+ Ja as B,
4195
+ xl as C,
4196
+ Ta as D,
4197
+ Ya as E,
4198
+ Qa as F,
4199
+ Ba as G,
4200
+ $n as H,
4201
+ Xa as I,
4202
+ _l as J,
4203
+ gl as K,
4204
+ jt as L,
4205
+ Pa as M,
4206
+ ut as N,
4207
+ ws as O,
4208
+ vs as P,
4209
+ Ml as Q,
4210
+ la as R,
4211
+ Ua as S,
4212
+ Za as T,
4213
+ $l as U,
4214
+ ul as V,
4215
+ dl as W,
4216
+ Vt as X,
4217
+ de as Y,
4218
+ ds as Z,
4219
+ $e as _,
4220
+ zl as a,
4221
+ xs as a0,
4222
+ Zt as a1,
4223
+ q as a2,
4224
+ et as a3,
4225
+ aa as a4,
4226
+ tl as a5,
4227
+ Ia as a6,
4228
+ Vl as a7,
4229
+ sl as a8,
4230
+ Ul as a9,
4231
+ Pe as aA,
4232
+ ll as aB,
4233
+ Ee as aC,
4234
+ ml as aa,
4235
+ Qt as ab,
4236
+ Wa as ac,
4237
+ tt as ad,
4238
+ el as ae,
4239
+ bs as af,
4240
+ ks as ag,
4241
+ _s as ah,
4242
+ hs as ai,
4243
+ ys as aj,
4244
+ Ft as ak,
4245
+ gs as al,
4246
+ El as am,
4247
+ Jt as an,
4248
+ Nl as ao,
4249
+ yl as ap,
4250
+ bl as aq,
4251
+ Il as ar,
4252
+ Ol as as,
4253
+ ol as at,
4254
+ De as au,
4255
+ rl as av,
4256
+ Ze as aw,
4257
+ al as ax,
4258
+ il as ay,
4259
+ Tt as az,
4260
+ Fl as b,
4261
+ nl as c,
4262
+ Dl as d,
4263
+ Pl as e,
4264
+ Rl as f,
4265
+ Ca as g,
4266
+ Bt as h,
4267
+ ga as i,
4268
+ Bl as j,
4269
+ Ha as k,
4270
+ Tl as l,
4271
+ We as m,
4272
+ hl as n,
4273
+ Cl as o,
4274
+ wl as p,
4275
+ vl as q,
4276
+ cl as r,
4277
+ Ll as s,
4278
+ jl as t,
4279
+ pl as u,
4280
+ Sl as v,
4281
+ kl as w,
4282
+ Al as x,
4283
+ fs as y,
4284
+ ct as z
4285
+ };