jmash-core 0.0.139 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/dist/{401-DZpC9YTs.mjs → 401-mTulvsgZ.mjs} +3 -3
  2. package/dist/{404-C8f86iDp.mjs → 404-DxlWduSf.mjs} +3 -3
  3. package/dist/{BarChart-DDRpEgTd.mjs → BarChart-CtUdxB_0.mjs} +5 -5
  4. package/dist/{FunnelChart-BzoTNn36.mjs → FunnelChart-D6-3qMKT.mjs} +5 -5
  5. package/dist/{PieChart-vvePUqxP.mjs → PieChart-pHMdR-Hx.mjs} +1 -1
  6. package/dist/{PieChart.vue_vue_type_script_setup_true_lang-B4J5buH_.mjs → PieChart.vue_vue_type_script_setup_true_lang-zNUDoKtb.mjs} +6 -6
  7. package/dist/{RadarChart-RsjrWpKm.mjs → RadarChart-CclJ-0mQ.mjs} +1 -1
  8. package/dist/{RadarChart.vue_vue_type_script_setup_true_lang-CPbv9lgv.mjs → RadarChart.vue_vue_type_script_setup_true_lang-CkA5ajJ-.mjs} +6 -6
  9. package/dist/{index-DA53-ye2.mjs → index--_Po9Tig.mjs} +8536 -8435
  10. package/dist/index-C9nXRt5O.mjs +1630 -0
  11. package/dist/index-CfF_1UQn.mjs +38529 -0
  12. package/dist/{index-DJSD1vCB.mjs → index-DuxBd-8U.mjs} +8 -8
  13. package/dist/{index-uykKwY2Z.mjs → index-JBmY6Vt0.mjs} +2 -2
  14. package/dist/{index-DY1G0gQY.mjs → index-Mj1ROiut.mjs} +8 -8
  15. package/dist/{index-JbCMx997.mjs → index-pVhvMkbz.mjs} +4 -4
  16. package/dist/index.mjs +9 -9
  17. package/dist/{profile-39mdgGCy.mjs → profile-CGK99sh1.mjs} +22 -20
  18. package/dist/{runAs-DSDIc1wL.mjs → runAs-B8LJKe8Q.mjs} +1 -1
  19. package/dist/{runAs.vue_vue_type_script_setup_true_lang-CWaxRtUr.mjs → runAs.vue_vue_type_script_setup_true_lang-rKU04MVd.mjs} +13 -13
  20. package/dist/style.css +1 -1
  21. package/dist/{types-BS_5KYWk.mjs → types-BvEVzU5Z.mjs} +4 -4
  22. package/dist/{updatePwd-DC9_1R-9.mjs → updatePwd-BI8GFMwr.mjs} +1 -1
  23. package/dist/{updatePwd.vue_vue_type_script_setup_true_lang-DcC1PWmC.mjs → updatePwd.vue_vue_type_script_setup_true_lang-DJXNzQb4.mjs} +3 -3
  24. package/dts/src/components/JmashEditor/index.vue.d.ts +2 -2
  25. package/dts/src/hooks/table.d.ts +2 -2
  26. package/dts/src/index.d.ts +1 -1
  27. package/dts/src/settings.d.ts +7 -0
  28. package/dts/src/stores/modules/tagsView.d.ts +10 -1
  29. package/package.json +14 -20
  30. package/dist/index-D2Kgkz0x.mjs +0 -43105
  31. package/dist/index-DIoh7ua9.mjs +0 -1644
@@ -0,0 +1,1630 @@
1
+ import { u as Q, _ as ae, E as ze, S as Fe, a as we, b as Ue, c as te, D as _e, d as qe, f as He, e as We, g as de, h as Ke, i as q, j as Ve, r as Te, k as me, T as he, s as Xe, m as je, l as Ge, n as fe, o as Ye } from "./index-CfF_1UQn.mjs";
2
+ import { defineComponent as I, ref as U, resolveComponent as T, createBlock as S, openBlock as d, withCtx as h, createElementVNode as k, createVNode as p, createElementBlock as x, Fragment as X, renderList as le, unref as l, createTextVNode as B, toDisplayString as L, computed as R, createCommentVNode as $, isRef as ve, watch as ne, onBeforeMount as Je, TransitionGroup as Qe, withModifiers as ue, normalizeClass as W, Transition as Me, KeepAlive as Ze, resolveDynamicComponent as ye, getCurrentInstance as et, nextTick as $e, onMounted as Ee, withDirectives as tt, normalizeStyle as nt, vShow as ot, normalizeProps as it, guardReactiveProps as at, renderSlot as lt, watchEffect as st } from "vue";
3
+ import { useRoute as pe, useRouter as ke } from "vue-router";
4
+ import { _ as rt } from "./updatePwd.vue_vue_type_script_setup_true_lang-DJXNzQb4.mjs";
5
+ import { _ as ct } from "./runAs.vue_vue_type_script_setup_true_lang-rKU04MVd.mjs";
6
+ import { storeToRefs as ut } from "pinia";
7
+ const dt = /* @__PURE__ */ I({
8
+ __name: "index",
9
+ setup(i) {
10
+ const e = Q(), t = U([
11
+ { label: "默认", value: "default" },
12
+ { label: "大型", value: "large" },
13
+ { label: "小型", value: "small" }
14
+ ]);
15
+ function o(r) {
16
+ e.changeSize(r), ze.success("切换布局大小成功");
17
+ }
18
+ return (r, n) => {
19
+ const a = ae, s = T("el-dropdown-item"), c = T("el-dropdown-menu"), f = T("el-dropdown");
20
+ return d(), S(f, {
21
+ trigger: "click",
22
+ onCommand: o
23
+ }, {
24
+ dropdown: h(() => [
25
+ p(c, null, {
26
+ default: h(() => [
27
+ (d(!0), x(X, null, le(l(t), (m) => (d(), S(s, {
28
+ key: m.value,
29
+ disabled: l(e).size == m.value,
30
+ command: m.value
31
+ }, {
32
+ default: h(() => [
33
+ B(L(m.label), 1)
34
+ ]),
35
+ _: 2
36
+ }, 1032, ["disabled", "command"]))), 128))
37
+ ]),
38
+ _: 1
39
+ })
40
+ ]),
41
+ default: h(() => [
42
+ k("div", null, [
43
+ p(a, { "icon-class": "size" })
44
+ ])
45
+ ]),
46
+ _: 1
47
+ });
48
+ };
49
+ }
50
+ }), ft = { class: "flex" }, mt = { class: "flex-center h100% p10px" }, pt = ["src"], _t = { key: 0 }, vt = /* @__PURE__ */ I({
51
+ __name: "NavbarRight",
52
+ setup(i) {
53
+ const e = new Fe(), t = Q(), o = we(), r = Ue(), n = te();
54
+ pe();
55
+ const a = ke(), s = R(() => t.device === _e.MOBILE), c = U(!1), f = U(!1), { isFullscreen: m, toggle: u } = qe(), _ = R(() => He.imageUrl(r.user.avatar, 48, 48));
56
+ function g() {
57
+ f.value = !0;
58
+ }
59
+ function w() {
60
+ Ke.confirm("确定注销并退出系统吗?", "提示", {
61
+ confirmButtonText: "确定",
62
+ cancelButtonText: "取消",
63
+ type: "warning",
64
+ lockScroll: !1
65
+ }).then(() => {
66
+ r.logout().then(() => {
67
+ o.delAllViews();
68
+ }).then(() => {
69
+ a.push("/login");
70
+ });
71
+ });
72
+ }
73
+ function M(C) {
74
+ c.value = C;
75
+ }
76
+ return (C, V) => {
77
+ const O = ae, y = dt, Y = T("el-tooltip"), Z = We, ee = T("router-link"), F = T("el-dropdown-item"), se = T("el-dropdown-menu"), N = T("el-dropdown");
78
+ return d(), x("div", ft, [
79
+ l(s) ? $("", !0) : (d(), x(X, { key: 0 }, [
80
+ k("div", {
81
+ class: "setting-item",
82
+ onClick: V[0] || (V[0] = //@ts-ignore
83
+ (...A) => l(u) && l(u)(...A))
84
+ }, [
85
+ p(O, {
86
+ "icon-class": l(m) ? "fullscreen-exit" : "fullscreen"
87
+ }, null, 8, ["icon-class"])
88
+ ]),
89
+ p(Y, {
90
+ content: C.$t("sizeSelect.tooltip"),
91
+ effect: "dark",
92
+ placement: "bottom"
93
+ }, {
94
+ default: h(() => [
95
+ p(y, { class: "setting-item" })
96
+ ]),
97
+ _: 1
98
+ }, 8, ["content"]),
99
+ p(Z, { class: "setting-item" })
100
+ ], 64)),
101
+ p(N, {
102
+ class: "setting-item",
103
+ trigger: "click"
104
+ }, {
105
+ dropdown: h(() => [
106
+ p(se, null, {
107
+ default: h(() => [
108
+ p(F, null, {
109
+ default: h(() => [
110
+ p(ee, { to: "/" }, {
111
+ default: h(() => [
112
+ B(L(C.$t("navbar.Dashboard")), 1)
113
+ ]),
114
+ _: 1
115
+ })
116
+ ]),
117
+ _: 1
118
+ }),
119
+ p(F, null, {
120
+ default: h(() => [
121
+ p(ee, { to: "/my/profile" }, {
122
+ default: h(() => [
123
+ B(L(C.$t("navbar.profile")), 1)
124
+ ]),
125
+ _: 1
126
+ })
127
+ ]),
128
+ _: 1
129
+ }),
130
+ p(F, {
131
+ onClick: V[1] || (V[1] = (A) => c.value = !0)
132
+ }, {
133
+ default: h(() => [
134
+ B(L(C.$t("navbar.changePwd")), 1)
135
+ ]),
136
+ _: 1
137
+ }),
138
+ l(e).hasRole("tester") || l(e).userInfo().runAs ? (d(), x("div", _t, [
139
+ p(F, { onClick: g }, {
140
+ default: h(() => [
141
+ B(L(C.$t("navbar.runAs")), 1)
142
+ ]),
143
+ _: 1
144
+ })
145
+ ])) : $("", !0),
146
+ p(F, {
147
+ divided: "",
148
+ onClick: w
149
+ }, {
150
+ default: h(() => [
151
+ B(L(C.$t("navbar.logout")), 1)
152
+ ]),
153
+ _: 1
154
+ })
155
+ ]),
156
+ _: 1
157
+ })
158
+ ]),
159
+ default: h(() => [
160
+ k("div", mt, [
161
+ k("img", {
162
+ src: l(_),
163
+ class: "rounded-full mr-10px w24px w24px"
164
+ }, null, 8, pt),
165
+ k("span", null, L(l(r).user.nickName), 1)
166
+ ])
167
+ ]),
168
+ _: 1
169
+ }),
170
+ l(de).showSettings ? (d(), x("div", {
171
+ key: 1,
172
+ class: "setting-item",
173
+ onClick: V[2] || (V[2] = (A) => l(n).settingsVisible = !0)
174
+ }, [
175
+ p(O, { "icon-class": "setting" })
176
+ ])) : $("", !0),
177
+ l(c) ? (d(), S(rt, {
178
+ key: 2,
179
+ "pwd-visible": l(c),
180
+ onDialogActionChange: M
181
+ }, null, 8, ["pwd-visible"])) : $("", !0),
182
+ l(f) ? (d(), S(ct, {
183
+ key: 3,
184
+ modelValue: l(f),
185
+ "onUpdate:modelValue": V[3] || (V[3] = (A) => ve(f) ? f.value = A : null)
186
+ }, null, 8, ["modelValue"])) : $("", !0)
187
+ ]);
188
+ };
189
+ }
190
+ }), Le = /* @__PURE__ */ q(vt, [["__scopeId", "data-v-70f27c82"]]);
191
+ function gt(i) {
192
+ for (var e = [], t = 0; t < i.length; ) {
193
+ var o = i[t];
194
+ if (o === "*" || o === "+" || o === "?") {
195
+ e.push({ type: "MODIFIER", index: t, value: i[t++] });
196
+ continue;
197
+ }
198
+ if (o === "\\") {
199
+ e.push({ type: "ESCAPED_CHAR", index: t++, value: i[t++] });
200
+ continue;
201
+ }
202
+ if (o === "{") {
203
+ e.push({ type: "OPEN", index: t, value: i[t++] });
204
+ continue;
205
+ }
206
+ if (o === "}") {
207
+ e.push({ type: "CLOSE", index: t, value: i[t++] });
208
+ continue;
209
+ }
210
+ if (o === ":") {
211
+ for (var r = "", n = t + 1; n < i.length; ) {
212
+ var a = i.charCodeAt(n);
213
+ if (
214
+ // `0-9`
215
+ a >= 48 && a <= 57 || // `A-Z`
216
+ a >= 65 && a <= 90 || // `a-z`
217
+ a >= 97 && a <= 122 || // `_`
218
+ a === 95
219
+ ) {
220
+ r += i[n++];
221
+ continue;
222
+ }
223
+ break;
224
+ }
225
+ if (!r)
226
+ throw new TypeError("Missing parameter name at ".concat(t));
227
+ e.push({ type: "NAME", index: t, value: r }), t = n;
228
+ continue;
229
+ }
230
+ if (o === "(") {
231
+ var s = 1, c = "", n = t + 1;
232
+ if (i[n] === "?")
233
+ throw new TypeError('Pattern cannot start with "?" at '.concat(n));
234
+ for (; n < i.length; ) {
235
+ if (i[n] === "\\") {
236
+ c += i[n++] + i[n++];
237
+ continue;
238
+ }
239
+ if (i[n] === ")") {
240
+ if (s--, s === 0) {
241
+ n++;
242
+ break;
243
+ }
244
+ } else if (i[n] === "(" && (s++, i[n + 1] !== "?"))
245
+ throw new TypeError("Capturing groups are not allowed at ".concat(n));
246
+ c += i[n++];
247
+ }
248
+ if (s)
249
+ throw new TypeError("Unbalanced pattern at ".concat(t));
250
+ if (!c)
251
+ throw new TypeError("Missing pattern at ".concat(t));
252
+ e.push({ type: "PATTERN", index: t, value: c }), t = n;
253
+ continue;
254
+ }
255
+ e.push({ type: "CHAR", index: t, value: i[t++] });
256
+ }
257
+ return e.push({ type: "END", index: t, value: "" }), e;
258
+ }
259
+ function ht(i, e) {
260
+ e === void 0 && (e = {});
261
+ for (var t = gt(i), o = e.prefixes, r = o === void 0 ? "./" : o, n = e.delimiter, a = n === void 0 ? "/#?" : n, s = [], c = 0, f = 0, m = "", u = function(N) {
262
+ if (f < t.length && t[f].type === N)
263
+ return t[f++].value;
264
+ }, _ = function(N) {
265
+ var A = u(N);
266
+ if (A !== void 0)
267
+ return A;
268
+ var H = t[f], re = H.type, ce = H.index;
269
+ throw new TypeError("Unexpected ".concat(re, " at ").concat(ce, ", expected ").concat(N));
270
+ }, g = function() {
271
+ for (var N = "", A; A = u("CHAR") || u("ESCAPED_CHAR"); )
272
+ N += A;
273
+ return N;
274
+ }, w = function(N) {
275
+ for (var A = 0, H = a; A < H.length; A++) {
276
+ var re = H[A];
277
+ if (N.indexOf(re) > -1)
278
+ return !0;
279
+ }
280
+ return !1;
281
+ }, M = function(N) {
282
+ var A = s[s.length - 1], H = N || (A && typeof A == "string" ? A : "");
283
+ if (A && !H)
284
+ throw new TypeError('Must have text between two parameters, missing text after "'.concat(A.name, '"'));
285
+ return !H || w(H) ? "[^".concat(be(a), "]+?") : "(?:(?!".concat(be(H), ")[^").concat(be(a), "])+?");
286
+ }; f < t.length; ) {
287
+ var C = u("CHAR"), V = u("NAME"), O = u("PATTERN");
288
+ if (V || O) {
289
+ var y = C || "";
290
+ r.indexOf(y) === -1 && (m += y, y = ""), m && (s.push(m), m = ""), s.push({
291
+ name: V || c++,
292
+ prefix: y,
293
+ suffix: "",
294
+ pattern: O || M(y),
295
+ modifier: u("MODIFIER") || ""
296
+ });
297
+ continue;
298
+ }
299
+ var Y = C || u("ESCAPED_CHAR");
300
+ if (Y) {
301
+ m += Y;
302
+ continue;
303
+ }
304
+ m && (s.push(m), m = "");
305
+ var Z = u("OPEN");
306
+ if (Z) {
307
+ var y = g(), ee = u("NAME") || "", F = u("PATTERN") || "", se = g();
308
+ _("CLOSE"), s.push({
309
+ name: ee || (F ? c++ : ""),
310
+ pattern: ee && !F ? M(y) : F,
311
+ prefix: y,
312
+ suffix: se,
313
+ modifier: u("MODIFIER") || ""
314
+ });
315
+ continue;
316
+ }
317
+ _("END");
318
+ }
319
+ return s;
320
+ }
321
+ function bt(i, e) {
322
+ return xt(ht(i, e), e);
323
+ }
324
+ function xt(i, e) {
325
+ e === void 0 && (e = {});
326
+ var t = wt(e), o = e.encode, r = o === void 0 ? function(c) {
327
+ return c;
328
+ } : o, n = e.validate, a = n === void 0 ? !0 : n, s = i.map(function(c) {
329
+ if (typeof c == "object")
330
+ return new RegExp("^(?:".concat(c.pattern, ")$"), t);
331
+ });
332
+ return function(c) {
333
+ for (var f = "", m = 0; m < i.length; m++) {
334
+ var u = i[m];
335
+ if (typeof u == "string") {
336
+ f += u;
337
+ continue;
338
+ }
339
+ var _ = c ? c[u.name] : void 0, g = u.modifier === "?" || u.modifier === "*", w = u.modifier === "*" || u.modifier === "+";
340
+ if (Array.isArray(_)) {
341
+ if (!w)
342
+ throw new TypeError('Expected "'.concat(u.name, '" to not repeat, but got an array'));
343
+ if (_.length === 0) {
344
+ if (g)
345
+ continue;
346
+ throw new TypeError('Expected "'.concat(u.name, '" to not be empty'));
347
+ }
348
+ for (var M = 0; M < _.length; M++) {
349
+ var C = r(_[M], u);
350
+ if (a && !s[m].test(C))
351
+ throw new TypeError('Expected all "'.concat(u.name, '" to match "').concat(u.pattern, '", but got "').concat(C, '"'));
352
+ f += u.prefix + C + u.suffix;
353
+ }
354
+ continue;
355
+ }
356
+ if (typeof _ == "string" || typeof _ == "number") {
357
+ var C = r(String(_), u);
358
+ if (a && !s[m].test(C))
359
+ throw new TypeError('Expected "'.concat(u.name, '" to match "').concat(u.pattern, '", but got "').concat(C, '"'));
360
+ f += u.prefix + C + u.suffix;
361
+ continue;
362
+ }
363
+ if (!g) {
364
+ var V = w ? "an array" : "a string";
365
+ throw new TypeError('Expected "'.concat(u.name, '" to be ').concat(V));
366
+ }
367
+ }
368
+ return f;
369
+ };
370
+ }
371
+ function be(i) {
372
+ return i.replace(/([.+*?=^!:${}()[\]|/\\])/g, "\\$1");
373
+ }
374
+ function wt(i) {
375
+ return i && i.sensitive ? "" : "i";
376
+ }
377
+ function xe(i) {
378
+ var e, t;
379
+ return ge((e = i.name) == null ? void 0 : e.toString(), (t = i.meta) == null ? void 0 : t.title);
380
+ }
381
+ function yt(i) {
382
+ return ge(i.name, i.title);
383
+ }
384
+ function ge(i, e) {
385
+ let t = i && i != "" ? i : e;
386
+ return Ve.global.te("route." + t) ? Ve.global.t("route." + t) : e || i;
387
+ }
388
+ const kt = {
389
+ key: 0,
390
+ class: "color-gray-400"
391
+ }, St = ["onClick"], Ct = /* @__PURE__ */ I({
392
+ __name: "index",
393
+ setup(i) {
394
+ const e = pe(), t = (s) => {
395
+ const { params: c } = e;
396
+ return bt(s)(c);
397
+ }, o = U([]);
398
+ function r() {
399
+ let s = e.matched.filter(
400
+ (f) => f.meta && f.meta.title
401
+ );
402
+ const c = s[0];
403
+ n(c) || (s = [
404
+ { path: "/dashboard", meta: { title: "Dashboard" } }
405
+ ].concat(s)), o.value = s.filter((f) => f.meta && f.meta.title && f.meta.breadcrumb !== !1);
406
+ }
407
+ function n(s) {
408
+ const c = s && s.name;
409
+ return c ? c.toString().trim().toLocaleLowerCase() === "Dashboard".toLocaleLowerCase() : !1;
410
+ }
411
+ function a(s) {
412
+ const { redirect: c, path: f } = s;
413
+ if (c) {
414
+ Te.value.push(c).catch((m) => {
415
+ console.warn(m);
416
+ });
417
+ return;
418
+ }
419
+ Te.value.push(t(f)).catch((m) => {
420
+ console.warn(m);
421
+ });
422
+ }
423
+ return ne(
424
+ () => e.path,
425
+ (s) => {
426
+ s.startsWith("/redirect/") || r();
427
+ }
428
+ ), Je(() => {
429
+ r();
430
+ }), (s, c) => {
431
+ const f = T("el-breadcrumb-item"), m = T("el-breadcrumb");
432
+ return d(), S(m, { class: "flex-y-center" }, {
433
+ default: h(() => [
434
+ p(Qe, { "enter-active-class": "animate__animated animate__fadeInRight" }, {
435
+ default: h(() => [
436
+ (d(!0), x(X, null, le(l(o), (u, _) => (d(), S(f, {
437
+ key: u.path
438
+ }, {
439
+ default: h(() => [
440
+ u.redirect === "noredirect" || _ === l(o).length - 1 ? (d(), x("span", kt, L(l(xe)(u)), 1)) : (d(), x("a", {
441
+ key: 1,
442
+ onClick: ue((g) => a(u), ["prevent"])
443
+ }, L(l(xe)(u)), 9, St))
444
+ ]),
445
+ _: 2
446
+ }, 1024))), 128))
447
+ ]),
448
+ _: 1
449
+ })
450
+ ]),
451
+ _: 1
452
+ });
453
+ };
454
+ }
455
+ }), Vt = /* @__PURE__ */ q(Ct, [["__scopeId", "data-v-6109c28e"]]), Tt = /* @__PURE__ */ I({
456
+ __name: "index",
457
+ props: {
458
+ isActive: {
459
+ required: !0,
460
+ type: Boolean,
461
+ default: !1
462
+ }
463
+ },
464
+ emits: ["toggleClick"],
465
+ setup(i, { emit: e }) {
466
+ const t = e;
467
+ function o() {
468
+ t("toggleClick");
469
+ }
470
+ return (r, n) => {
471
+ const a = ae;
472
+ return d(), x("div", {
473
+ class: "px-[15px] flex items-center justify-center color-[var(--el-text-color-regular)]",
474
+ onClick: o
475
+ }, [
476
+ p(a, {
477
+ class: W(["hamburger", { "is-active": i.isActive }]),
478
+ "icon-class": "indent-decrease"
479
+ }, null, 8, ["class"])
480
+ ]);
481
+ };
482
+ }
483
+ }), Pe = /* @__PURE__ */ q(Tt, [["__scopeId", "data-v-42e37629"]]), $t = { class: "flex" }, At = /* @__PURE__ */ I({
484
+ __name: "NavbarLeft",
485
+ setup(i) {
486
+ const e = Q();
487
+ function t() {
488
+ e.toggleSidebar();
489
+ }
490
+ return (o, r) => {
491
+ const n = Pe, a = Vt;
492
+ return d(), x("div", $t, [
493
+ p(n, {
494
+ "is-active": l(e).sidebar.opened,
495
+ onToggleClick: t
496
+ }, null, 8, ["is-active"]),
497
+ p(a)
498
+ ]);
499
+ };
500
+ }
501
+ }), Mt = {}, Et = { class: "navbar-container" };
502
+ function Lt(i, e) {
503
+ const t = At, o = Le;
504
+ return d(), x("div", Et, [
505
+ p(t),
506
+ p(o)
507
+ ]);
508
+ }
509
+ const Pt = /* @__PURE__ */ q(Mt, [["render", Lt], ["__scopeId", "data-v-b1624593"]]);
510
+ var J = /* @__PURE__ */ ((i) => (i.LEFT = "left", i.TOP = "top", i.MIX = "mix", i))(J || {});
511
+ const It = { class: "flex flex-wrap justify-around w-full h-12" }, Rt = /* @__PURE__ */ I({
512
+ __name: "LayoutSelect",
513
+ props: {
514
+ modelValue: String
515
+ },
516
+ emits: ["update:modelValue"],
517
+ setup(i, { emit: e }) {
518
+ const t = e;
519
+ function o(r) {
520
+ t("update:modelValue", r);
521
+ }
522
+ return (r, n) => {
523
+ const a = T("el-tooltip");
524
+ return d(), x("div", It, [
525
+ p(a, {
526
+ content: "左侧模式",
527
+ placement: "bottom"
528
+ }, {
529
+ default: h(() => [
530
+ k("div", {
531
+ class: W(["layout-item left", { "is-active": i.modelValue === l(J).LEFT }]),
532
+ onClick: n[0] || (n[0] = (s) => o(l(J).LEFT))
533
+ }, n[3] || (n[3] = [
534
+ k("div", null, null, -1),
535
+ k("div", null, null, -1)
536
+ ]), 2)
537
+ ]),
538
+ _: 1
539
+ }),
540
+ p(a, {
541
+ content: "顶部模式",
542
+ placement: "bottom"
543
+ }, {
544
+ default: h(() => [
545
+ k("div", {
546
+ class: W(["layout-item top", { "is-active": i.modelValue === l(J).TOP }]),
547
+ onClick: n[1] || (n[1] = (s) => o(l(J).TOP))
548
+ }, n[4] || (n[4] = [
549
+ k("div", null, null, -1),
550
+ k("div", null, null, -1)
551
+ ]), 2)
552
+ ]),
553
+ _: 1
554
+ }),
555
+ p(a, {
556
+ content: "混合模式",
557
+ placement: "bottom"
558
+ }, {
559
+ default: h(() => [
560
+ k("div", {
561
+ class: W(["layout-item mix", { "is-active": i.modelValue === l(J).MIX }]),
562
+ onClick: n[2] || (n[2] = (s) => o(l(J).MIX))
563
+ }, n[5] || (n[5] = [
564
+ k("div", null, null, -1),
565
+ k("div", null, null, -1)
566
+ ]), 2)
567
+ ]),
568
+ _: 1
569
+ })
570
+ ]);
571
+ };
572
+ }
573
+ }), Dt = /* @__PURE__ */ q(Rt, [["__scopeId", "data-v-2bdf1403"]]), Bt = /* @__PURE__ */ I({
574
+ __name: "ThemeColorPicker",
575
+ props: {
576
+ modelValue: String
577
+ },
578
+ emits: ["update:modelValue"],
579
+ setup(i, { emit: e }) {
580
+ const t = i, o = e, r = [
581
+ "#409EFF",
582
+ "#ff4500",
583
+ "#ff8c00",
584
+ "#90ee90",
585
+ "#00ced1",
586
+ "#1e90ff",
587
+ "#c71585",
588
+ "rgba(255, 69, 0, 0.68)",
589
+ "rgb(255, 120, 0)",
590
+ "hsva(120, 40, 94)"
591
+ ], n = U(t.modelValue);
592
+ return ne(n, (a) => {
593
+ o("update:modelValue", a);
594
+ }), (a, s) => {
595
+ const c = T("el-color-picker");
596
+ return d(), S(c, {
597
+ modelValue: l(n),
598
+ "onUpdate:modelValue": s[0] || (s[0] = (f) => ve(n) ? n.value = f : null),
599
+ predefine: r,
600
+ "popper-class": "theme-picker-dropdown"
601
+ }, null, 8, ["modelValue"]);
602
+ };
603
+ }
604
+ }), Ot = /* @__PURE__ */ q(Bt, [["__scopeId", "data-v-92c1fd79"]]), Nt = { class: "flex-center" }, zt = { class: "settings-option" }, Ft = { class: "text-xs" }, Ut = { class: "settings-option" }, qt = { class: "text-xs" }, Ht = { class: "settings-option" }, Wt = { class: "text-xs" }, Kt = { class: "settings-option" }, Xt = { class: "text-xs" }, jt = { class: "settings-option" }, Gt = { class: "text-xs" }, Yt = /* @__PURE__ */ I({
605
+ __name: "index",
606
+ setup(i) {
607
+ const e = pe(), t = Q(), o = te(), r = me(), n = R({
608
+ get() {
609
+ return o.settingsVisible;
610
+ },
611
+ set() {
612
+ o.settingsVisible = !1;
613
+ }
614
+ });
615
+ function a(_) {
616
+ o.changeThemeColor(_);
617
+ }
618
+ const s = U(o.theme === he.DARK), c = (_) => {
619
+ s.value = _, o.changeTheme(s.value ? he.DARK : he.LIGHT);
620
+ };
621
+ function f(_) {
622
+ o.changeLayout(_), _ === J.MIX ? e.name && m(e.name) : _ === J.TOP && t.openSideBar();
623
+ }
624
+ function m(_) {
625
+ const g = u(r.routes, _);
626
+ t.activeTopMenu !== g.path && t.activeTopMenu(g.path);
627
+ }
628
+ function u(_, g) {
629
+ let w = {};
630
+ function M(V, O) {
631
+ if (w[V.name] = O, V.children)
632
+ for (let y = 0; y < V.children.length; y++)
633
+ M(V.children[y], V);
634
+ }
635
+ for (let V = 0; V < _.length; V++)
636
+ M(_[V], null);
637
+ let C = w[g];
638
+ for (; C; ) {
639
+ if (!w[C.name])
640
+ return C;
641
+ C = w[C.name];
642
+ }
643
+ return null;
644
+ }
645
+ return (_, g) => {
646
+ const w = T("el-divider"), M = T("el-switch"), C = Ot, V = Dt, O = T("el-drawer");
647
+ return d(), S(O, {
648
+ modelValue: l(n),
649
+ "onUpdate:modelValue": g[7] || (g[7] = (y) => ve(n) ? n.value = y : null),
650
+ size: "300",
651
+ title: _.$t("settings.project")
652
+ }, {
653
+ default: h(() => [
654
+ p(w, null, {
655
+ default: h(() => [
656
+ B(L(_.$t("settings.theme")), 1)
657
+ ]),
658
+ _: 1
659
+ }),
660
+ k("div", Nt, [
661
+ p(M, {
662
+ modelValue: l(s),
663
+ "onUpdate:modelValue": g[0] || (g[0] = (y) => ve(s) ? s.value = y : null),
664
+ "active-icon": l(je),
665
+ "inactive-icon": l(Xe),
666
+ onChange: c
667
+ }, null, 8, ["modelValue", "active-icon", "inactive-icon"])
668
+ ]),
669
+ p(w, null, {
670
+ default: h(() => [
671
+ B(L(_.$t("settings.interface")), 1)
672
+ ]),
673
+ _: 1
674
+ }),
675
+ k("div", zt, [
676
+ k("span", Ft, L(_.$t("settings.themeColor")), 1),
677
+ p(C, {
678
+ modelValue: l(o).themeColor,
679
+ "onUpdate:modelValue": [
680
+ g[1] || (g[1] = (y) => l(o).themeColor = y),
681
+ a
682
+ ]
683
+ }, null, 8, ["modelValue"])
684
+ ]),
685
+ k("div", Ut, [
686
+ k("span", qt, L(_.$t("settings.tagsView")), 1),
687
+ p(M, {
688
+ modelValue: l(o).tagsView,
689
+ "onUpdate:modelValue": g[2] || (g[2] = (y) => l(o).tagsView = y)
690
+ }, null, 8, ["modelValue"])
691
+ ]),
692
+ k("div", Ht, [
693
+ k("span", Wt, L(_.$t("settings.fixedHeader")), 1),
694
+ p(M, {
695
+ modelValue: l(o).fixedHeader,
696
+ "onUpdate:modelValue": g[3] || (g[3] = (y) => l(o).fixedHeader = y)
697
+ }, null, 8, ["modelValue"])
698
+ ]),
699
+ k("div", Kt, [
700
+ k("span", Xt, L(_.$t("settings.sidebarLogo")), 1),
701
+ p(M, {
702
+ modelValue: l(o).sidebarLogo,
703
+ "onUpdate:modelValue": g[4] || (g[4] = (y) => l(o).sidebarLogo = y)
704
+ }, null, 8, ["modelValue"])
705
+ ]),
706
+ k("div", jt, [
707
+ k("span", Gt, L(_.$t("settings.watermark")), 1),
708
+ p(M, {
709
+ modelValue: l(o).watermarkEnabled,
710
+ "onUpdate:modelValue": g[5] || (g[5] = (y) => l(o).watermarkEnabled = y)
711
+ }, null, 8, ["modelValue"])
712
+ ]),
713
+ p(w, null, {
714
+ default: h(() => [
715
+ B(L(_.$t("settings.navigation")), 1)
716
+ ]),
717
+ _: 1
718
+ }),
719
+ p(V, {
720
+ modelValue: l(o).layout,
721
+ "onUpdate:modelValue": [
722
+ g[6] || (g[6] = (y) => l(o).layout = y),
723
+ f
724
+ ]
725
+ }, null, 8, ["modelValue"])
726
+ ]),
727
+ _: 1
728
+ }, 8, ["modelValue", "title"]);
729
+ };
730
+ }
731
+ }), Jt = /* @__PURE__ */ q(Yt, [["__scopeId", "data-v-70f5bf10"]]), Qt = { class: "app-main" }, Zt = /* @__PURE__ */ I({
732
+ __name: "index",
733
+ setup(i) {
734
+ const e = R(() => we().cachedViews);
735
+ return (t, o) => {
736
+ const r = T("router-view");
737
+ return d(), x("section", Qt, [
738
+ p(r, null, {
739
+ default: h(({ Component: n, route: a }) => [
740
+ p(Me, {
741
+ "enter-active-class": "animate__animated animate__fadeIn",
742
+ mode: "out-in"
743
+ }, {
744
+ default: h(() => [
745
+ (d(), S(Ze, {
746
+ include: l(e),
747
+ max: 9
748
+ }, [
749
+ (d(), S(ye(n), {
750
+ key: a.path
751
+ }))
752
+ ], 1032, ["include"]))
753
+ ]),
754
+ _: 2
755
+ }, 1024)
756
+ ]),
757
+ _: 1
758
+ })
759
+ ]);
760
+ };
761
+ }
762
+ }), en = /* @__PURE__ */ q(Zt, [["__scopeId", "data-v-f32946ce"]]), tn = {
763
+ viewBox: "0 0 1024 1024",
764
+ width: "1.2em",
765
+ height: "1.2em"
766
+ };
767
+ function nn(i, e) {
768
+ return d(), x("svg", tn, e[0] || (e[0] = [
769
+ k("path", {
770
+ fill: "currentColor",
771
+ d: "M764.288 214.592L512 466.88L259.712 214.592a31.936 31.936 0 0 0-45.12 45.12L466.752 512L214.528 764.224a31.936 31.936 0 1 0 45.12 45.184L512 557.184l252.288 252.288a31.936 31.936 0 0 0 45.12-45.12L557.12 512.064l252.288-252.352a31.936 31.936 0 1 0-45.12-45.184z"
772
+ }, null, -1)
773
+ ]));
774
+ }
775
+ const on = { name: "ep-close", render: nn };
776
+ function G(i) {
777
+ if (typeof i != "string")
778
+ throw new TypeError("Path must be a string. Received " + JSON.stringify(i));
779
+ }
780
+ function Ae(i, e) {
781
+ for (var t = "", o = 0, r = -1, n = 0, a, s = 0; s <= i.length; ++s) {
782
+ if (s < i.length)
783
+ a = i.charCodeAt(s);
784
+ else {
785
+ if (a === 47)
786
+ break;
787
+ a = 47;
788
+ }
789
+ if (a === 47) {
790
+ if (!(r === s - 1 || n === 1)) if (r !== s - 1 && n === 2) {
791
+ if (t.length < 2 || o !== 2 || t.charCodeAt(t.length - 1) !== 46 || t.charCodeAt(t.length - 2) !== 46) {
792
+ if (t.length > 2) {
793
+ var c = t.lastIndexOf("/");
794
+ if (c !== t.length - 1) {
795
+ c === -1 ? (t = "", o = 0) : (t = t.slice(0, c), o = t.length - 1 - t.lastIndexOf("/")), r = s, n = 0;
796
+ continue;
797
+ }
798
+ } else if (t.length === 2 || t.length === 1) {
799
+ t = "", o = 0, r = s, n = 0;
800
+ continue;
801
+ }
802
+ }
803
+ e && (t.length > 0 ? t += "/.." : t = "..", o = 2);
804
+ } else
805
+ t.length > 0 ? t += "/" + i.slice(r + 1, s) : t = i.slice(r + 1, s), o = s - r - 1;
806
+ r = s, n = 0;
807
+ } else a === 46 && n !== -1 ? ++n : n = -1;
808
+ }
809
+ return t;
810
+ }
811
+ function an(i, e) {
812
+ var t = e.dir || e.root, o = e.base || (e.name || "") + (e.ext || "");
813
+ return t ? t === e.root ? t + o : t + i + o : o;
814
+ }
815
+ var oe = {
816
+ // path.resolve([from ...], to)
817
+ resolve: function() {
818
+ for (var e = "", t = !1, o, r = arguments.length - 1; r >= -1 && !t; r--) {
819
+ var n;
820
+ r >= 0 ? n = arguments[r] : (o === void 0 && (o = process.cwd()), n = o), G(n), n.length !== 0 && (e = n + "/" + e, t = n.charCodeAt(0) === 47);
821
+ }
822
+ return e = Ae(e, !t), t ? e.length > 0 ? "/" + e : "/" : e.length > 0 ? e : ".";
823
+ },
824
+ normalize: function(e) {
825
+ if (G(e), e.length === 0) return ".";
826
+ var t = e.charCodeAt(0) === 47, o = e.charCodeAt(e.length - 1) === 47;
827
+ return e = Ae(e, !t), e.length === 0 && !t && (e = "."), e.length > 0 && o && (e += "/"), t ? "/" + e : e;
828
+ },
829
+ isAbsolute: function(e) {
830
+ return G(e), e.length > 0 && e.charCodeAt(0) === 47;
831
+ },
832
+ join: function() {
833
+ if (arguments.length === 0)
834
+ return ".";
835
+ for (var e, t = 0; t < arguments.length; ++t) {
836
+ var o = arguments[t];
837
+ G(o), o.length > 0 && (e === void 0 ? e = o : e += "/" + o);
838
+ }
839
+ return e === void 0 ? "." : oe.normalize(e);
840
+ },
841
+ relative: function(e, t) {
842
+ if (G(e), G(t), e === t || (e = oe.resolve(e), t = oe.resolve(t), e === t)) return "";
843
+ for (var o = 1; o < e.length && e.charCodeAt(o) === 47; ++o)
844
+ ;
845
+ for (var r = e.length, n = r - o, a = 1; a < t.length && t.charCodeAt(a) === 47; ++a)
846
+ ;
847
+ for (var s = t.length, c = s - a, f = n < c ? n : c, m = -1, u = 0; u <= f; ++u) {
848
+ if (u === f) {
849
+ if (c > f) {
850
+ if (t.charCodeAt(a + u) === 47)
851
+ return t.slice(a + u + 1);
852
+ if (u === 0)
853
+ return t.slice(a + u);
854
+ } else n > f && (e.charCodeAt(o + u) === 47 ? m = u : u === 0 && (m = 0));
855
+ break;
856
+ }
857
+ var _ = e.charCodeAt(o + u), g = t.charCodeAt(a + u);
858
+ if (_ !== g)
859
+ break;
860
+ _ === 47 && (m = u);
861
+ }
862
+ var w = "";
863
+ for (u = o + m + 1; u <= r; ++u)
864
+ (u === r || e.charCodeAt(u) === 47) && (w.length === 0 ? w += ".." : w += "/..");
865
+ return w.length > 0 ? w + t.slice(a + m) : (a += m, t.charCodeAt(a) === 47 && ++a, t.slice(a));
866
+ },
867
+ _makeLong: function(e) {
868
+ return e;
869
+ },
870
+ dirname: function(e) {
871
+ if (G(e), e.length === 0) return ".";
872
+ for (var t = e.charCodeAt(0), o = t === 47, r = -1, n = !0, a = e.length - 1; a >= 1; --a)
873
+ if (t = e.charCodeAt(a), t === 47) {
874
+ if (!n) {
875
+ r = a;
876
+ break;
877
+ }
878
+ } else
879
+ n = !1;
880
+ return r === -1 ? o ? "/" : "." : o && r === 1 ? "//" : e.slice(0, r);
881
+ },
882
+ basename: function(e, t) {
883
+ if (t !== void 0 && typeof t != "string") throw new TypeError('"ext" argument must be a string');
884
+ G(e);
885
+ var o = 0, r = -1, n = !0, a;
886
+ if (t !== void 0 && t.length > 0 && t.length <= e.length) {
887
+ if (t.length === e.length && t === e) return "";
888
+ var s = t.length - 1, c = -1;
889
+ for (a = e.length - 1; a >= 0; --a) {
890
+ var f = e.charCodeAt(a);
891
+ if (f === 47) {
892
+ if (!n) {
893
+ o = a + 1;
894
+ break;
895
+ }
896
+ } else
897
+ c === -1 && (n = !1, c = a + 1), s >= 0 && (f === t.charCodeAt(s) ? --s === -1 && (r = a) : (s = -1, r = c));
898
+ }
899
+ return o === r ? r = c : r === -1 && (r = e.length), e.slice(o, r);
900
+ } else {
901
+ for (a = e.length - 1; a >= 0; --a)
902
+ if (e.charCodeAt(a) === 47) {
903
+ if (!n) {
904
+ o = a + 1;
905
+ break;
906
+ }
907
+ } else r === -1 && (n = !1, r = a + 1);
908
+ return r === -1 ? "" : e.slice(o, r);
909
+ }
910
+ },
911
+ extname: function(e) {
912
+ G(e);
913
+ for (var t = -1, o = 0, r = -1, n = !0, a = 0, s = e.length - 1; s >= 0; --s) {
914
+ var c = e.charCodeAt(s);
915
+ if (c === 47) {
916
+ if (!n) {
917
+ o = s + 1;
918
+ break;
919
+ }
920
+ continue;
921
+ }
922
+ r === -1 && (n = !1, r = s + 1), c === 46 ? t === -1 ? t = s : a !== 1 && (a = 1) : t !== -1 && (a = -1);
923
+ }
924
+ return t === -1 || r === -1 || // We saw a non-dot character immediately before the dot
925
+ a === 0 || // The (right-most) trimmed path component is exactly '..'
926
+ a === 1 && t === r - 1 && t === o + 1 ? "" : e.slice(t, r);
927
+ },
928
+ format: function(e) {
929
+ if (e === null || typeof e != "object")
930
+ throw new TypeError('The "pathObject" argument must be of type Object. Received type ' + typeof e);
931
+ return an("/", e);
932
+ },
933
+ parse: function(e) {
934
+ G(e);
935
+ var t = { root: "", dir: "", base: "", ext: "", name: "" };
936
+ if (e.length === 0) return t;
937
+ var o = e.charCodeAt(0), r = o === 47, n;
938
+ r ? (t.root = "/", n = 1) : n = 0;
939
+ for (var a = -1, s = 0, c = -1, f = !0, m = e.length - 1, u = 0; m >= n; --m) {
940
+ if (o = e.charCodeAt(m), o === 47) {
941
+ if (!f) {
942
+ s = m + 1;
943
+ break;
944
+ }
945
+ continue;
946
+ }
947
+ c === -1 && (f = !1, c = m + 1), o === 46 ? a === -1 ? a = m : u !== 1 && (u = 1) : a !== -1 && (u = -1);
948
+ }
949
+ return a === -1 || c === -1 || // We saw a non-dot character immediately before the dot
950
+ u === 0 || // The (right-most) trimmed path component is exactly '..'
951
+ u === 1 && a === c - 1 && a === s + 1 ? c !== -1 && (s === 0 && r ? t.base = t.name = e.slice(1, c) : t.base = t.name = e.slice(s, c)) : (s === 0 && r ? (t.name = e.slice(1, a), t.base = e.slice(1, c)) : (t.name = e.slice(s, a), t.base = e.slice(s, c)), t.ext = e.slice(a, c)), s > 0 ? t.dir = e.slice(0, s - 1) : r && (t.dir = "/"), t;
952
+ },
953
+ sep: "/",
954
+ delimiter: ":",
955
+ win32: null,
956
+ posix: null
957
+ };
958
+ oe.posix = oe;
959
+ var Ie = oe;
960
+ const Re = /* @__PURE__ */ Ge(Ie), ln = { class: "tags-container" }, sn = /* @__PURE__ */ I({
961
+ __name: "index",
962
+ setup(i) {
963
+ const { proxy: e } = et(), t = ke(), o = pe(), r = me(), n = we(), a = Q(), { visitedViews: s } = ut(n), c = te(), f = R(() => c.layout), m = U({
964
+ path: "",
965
+ query: "",
966
+ fullPath: "",
967
+ name: "",
968
+ title: "",
969
+ affix: !1,
970
+ keepAlive: !1
971
+ }), u = U([]), _ = U(0), g = U(0);
972
+ ne(
973
+ o,
974
+ () => {
975
+ V(), O();
976
+ },
977
+ {
978
+ immediate: !0
979
+ //初始化立即执行
980
+ }
981
+ );
982
+ const w = U(!1);
983
+ ne(w, (b) => {
984
+ b ? document.body.addEventListener("click", ce) : document.body.removeEventListener("click", ce);
985
+ });
986
+ function M(b, v = "/") {
987
+ let z = [];
988
+ return b.forEach((D) => {
989
+ var E, P, j, Se;
990
+ const K = Ie.resolve(v, D.path);
991
+ if ((E = D.meta) != null && E.affix && z.push({
992
+ path: K,
993
+ fullPath: K,
994
+ name: String(D.name),
995
+ title: ((P = D.meta) == null ? void 0 : P.title) || "no-name",
996
+ affix: (j = D.meta) == null ? void 0 : j.affix,
997
+ keepAlive: (Se = D.meta) == null ? void 0 : Se.keepAlive
998
+ }), D.children) {
999
+ const Ce = M(D.children, v + D.path);
1000
+ Ce.length >= 1 && (z = [...z, ...Ce]);
1001
+ }
1002
+ }), z;
1003
+ }
1004
+ function C() {
1005
+ const b = M(r.routes);
1006
+ u.value = b;
1007
+ for (const v of b)
1008
+ v.name && n.addVisitedView(v);
1009
+ }
1010
+ function V() {
1011
+ var b, v;
1012
+ o.meta.title && n.addView({
1013
+ name: o.name,
1014
+ title: o.meta.title,
1015
+ path: o.path,
1016
+ fullPath: o.fullPath,
1017
+ affix: (b = o.meta) == null ? void 0 : b.affix,
1018
+ keepAlive: (v = o.meta) == null ? void 0 : v.keepAlive,
1019
+ query: o.query
1020
+ });
1021
+ }
1022
+ function O() {
1023
+ $e(() => {
1024
+ var b, v;
1025
+ for (const z of s.value)
1026
+ z.path === o.path && z.fullPath !== o.fullPath && n.updateVisitedView({
1027
+ name: o.name,
1028
+ title: o.meta.title || "",
1029
+ path: o.path,
1030
+ fullPath: o.fullPath,
1031
+ affix: (b = o.meta) == null ? void 0 : b.affix,
1032
+ keepAlive: (v = o.meta) == null ? void 0 : v.keepAlive,
1033
+ query: o.query
1034
+ });
1035
+ });
1036
+ }
1037
+ function y(b) {
1038
+ return b == null ? void 0 : b.affix;
1039
+ }
1040
+ function Y() {
1041
+ return n.visitedViews.length <= 1 ? !1 : m.value.path === "/dashboard" || m.value.fullPath === n.visitedViews[1].fullPath;
1042
+ }
1043
+ function Z() {
1044
+ return n.visitedViews.length <= 1 ? !1 : m.value.fullPath === n.visitedViews[n.visitedViews.length - 1].fullPath;
1045
+ }
1046
+ function ee(b) {
1047
+ n.delCachedView(b);
1048
+ const { fullPath: v } = b;
1049
+ $e(() => {
1050
+ t.replace({ path: "/redirect" + v });
1051
+ });
1052
+ }
1053
+ function F(b) {
1054
+ n.delView(b).then((v) => {
1055
+ n.isActive(b) && n.toLastView(v.visitedViews, b);
1056
+ });
1057
+ }
1058
+ function se() {
1059
+ n.delLeftViews(m.value).then((b) => {
1060
+ b.visitedViews.find((v) => v.path === o.path) || n.toLastView(b.visitedViews);
1061
+ });
1062
+ }
1063
+ function N() {
1064
+ n.delRightViews(m.value).then((b) => {
1065
+ b.visitedViews.find((v) => v.path === o.path) || n.toLastView(b.visitedViews);
1066
+ });
1067
+ }
1068
+ function A() {
1069
+ t.push(m.value), n.delOtherViews(m.value).then(() => {
1070
+ O();
1071
+ });
1072
+ }
1073
+ function H(b) {
1074
+ n.delAllViews().then((v) => {
1075
+ n.toLastView(v.visitedViews, b);
1076
+ });
1077
+ }
1078
+ function re(b, v) {
1079
+ const D = e == null ? void 0 : e.$el.getBoundingClientRect().left, E = (e == null ? void 0 : e.$el.offsetWidth) - 105, P = v.clientX - D + 15;
1080
+ P > E ? _.value = E : _.value = P, f.value === "mix" ? g.value = v.clientY - 50 : g.value = v.clientY, w.value = !0, m.value = b;
1081
+ }
1082
+ function ce() {
1083
+ w.value = !1;
1084
+ }
1085
+ function Be() {
1086
+ ce();
1087
+ }
1088
+ function Oe(b, v) {
1089
+ let z = {};
1090
+ function D(E, P) {
1091
+ if (z[E.name] = P, E.children)
1092
+ for (let j = 0; j < E.children.length; j++)
1093
+ D(E.children[j], E);
1094
+ }
1095
+ for (let E = 0; E < b.length; E++)
1096
+ D(b[E], null);
1097
+ let K = z[v];
1098
+ for (; K; ) {
1099
+ if (!z[K.name])
1100
+ return K;
1101
+ K = z[K.name];
1102
+ }
1103
+ return null;
1104
+ }
1105
+ const Ne = (b) => {
1106
+ if (f.value !== "mix") return;
1107
+ const v = Oe(r.routes, b);
1108
+ a.activeTopMenu !== v.path && a.activeTopMenu(v.path);
1109
+ };
1110
+ return ne(
1111
+ () => o.name,
1112
+ (b) => {
1113
+ b && Ne(b);
1114
+ },
1115
+ {
1116
+ deep: !0
1117
+ }
1118
+ ), Ee(() => {
1119
+ C();
1120
+ }), (b, v) => {
1121
+ const z = on, D = T("router-link"), K = T("el-scrollbar"), E = ae;
1122
+ return d(), x("div", ln, [
1123
+ p(K, {
1124
+ class: "scroll-container",
1125
+ vertical: !1,
1126
+ onWheel: ue(Be, ["prevent"])
1127
+ }, {
1128
+ default: h(() => [
1129
+ (d(!0), x(X, null, le(l(s), (P) => (d(), S(D, {
1130
+ ref_for: !0,
1131
+ ref: "tagRef",
1132
+ key: P.fullPath,
1133
+ class: W("tags-item " + (l(n).isActive(P) ? "active" : "")),
1134
+ to: { path: P.path, query: P.query },
1135
+ onMouseup: ue((j) => y(P) ? "" : F(P), ["middle"]),
1136
+ onContextmenu: ue((j) => re(P, j), ["prevent"])
1137
+ }, {
1138
+ default: h(() => [
1139
+ B(L(l(yt)(P)) + " ", 1),
1140
+ y(P) ? $("", !0) : (d(), S(z, {
1141
+ key: 0,
1142
+ class: "close-icon",
1143
+ size: "12px",
1144
+ onClick: ue((j) => F(P), ["prevent", "stop"])
1145
+ }, null, 8, ["onClick"]))
1146
+ ]),
1147
+ _: 2
1148
+ }, 1032, ["class", "to", "onMouseup", "onContextmenu"]))), 128))
1149
+ ]),
1150
+ _: 1
1151
+ }),
1152
+ tt(k("ul", {
1153
+ class: "contextmenu",
1154
+ style: nt({ left: l(_) + "px", top: l(g) + "px" })
1155
+ }, [
1156
+ k("li", {
1157
+ onClick: v[0] || (v[0] = (P) => ee(l(m)))
1158
+ }, [
1159
+ p(E, { "icon-class": "refresh" }),
1160
+ v[3] || (v[3] = B(" 刷新 "))
1161
+ ]),
1162
+ y(l(m)) ? $("", !0) : (d(), x("li", {
1163
+ key: 0,
1164
+ onClick: v[1] || (v[1] = (P) => F(l(m)))
1165
+ }, [
1166
+ p(E, { "icon-class": "close" }),
1167
+ v[4] || (v[4] = B(" 关闭 "))
1168
+ ])),
1169
+ k("li", { onClick: A }, [
1170
+ p(E, { "icon-class": "close_other" }),
1171
+ v[5] || (v[5] = B(" 关闭其它 "))
1172
+ ]),
1173
+ Y() ? $("", !0) : (d(), x("li", {
1174
+ key: 1,
1175
+ onClick: se
1176
+ }, [
1177
+ p(E, { "icon-class": "close_left" }),
1178
+ v[6] || (v[6] = B(" 关闭左侧 "))
1179
+ ])),
1180
+ Z() ? $("", !0) : (d(), x("li", {
1181
+ key: 2,
1182
+ onClick: N
1183
+ }, [
1184
+ p(E, { "icon-class": "close_right" }),
1185
+ v[7] || (v[7] = B(" 关闭右侧 "))
1186
+ ])),
1187
+ k("li", {
1188
+ onClick: v[2] || (v[2] = (P) => H(l(m)))
1189
+ }, [
1190
+ p(E, { "icon-class": "close_all" }),
1191
+ v[8] || (v[8] = B(" 关闭所有 "))
1192
+ ])
1193
+ ], 4), [
1194
+ [ot, l(w)]
1195
+ ])
1196
+ ]);
1197
+ };
1198
+ }
1199
+ }), rn = /* @__PURE__ */ q(sn, [["__scopeId", "data-v-77bfe9a5"]]), cn = /* @__PURE__ */ I({
1200
+ name: "AppLink",
1201
+ inheritAttrs: !1,
1202
+ __name: "index",
1203
+ props: {
1204
+ to: {
1205
+ type: String,
1206
+ required: !0
1207
+ }
1208
+ },
1209
+ setup(i) {
1210
+ const e = i, t = R(() => fe(e.to)), o = R(() => t.value ? "a" : "router-link"), r = (n) => t.value ? { href: n, target: "_blank", rel: "noopener noreferrer" } : { to: n };
1211
+ return (n, a) => (d(), S(ye(l(o)), it(at(r(i.to))), {
1212
+ default: h(() => [
1213
+ lt(n.$slots, "default")
1214
+ ]),
1215
+ _: 3
1216
+ }, 16));
1217
+ }
1218
+ }), un = {
1219
+ key: 3,
1220
+ class: "ml-1"
1221
+ }, dn = /* @__PURE__ */ I({
1222
+ __name: "SidebarMenuItemTitle",
1223
+ props: {
1224
+ icon: {
1225
+ type: String,
1226
+ default: ""
1227
+ },
1228
+ name: {
1229
+ type: String,
1230
+ default: ""
1231
+ },
1232
+ title: {
1233
+ type: String,
1234
+ default: ""
1235
+ }
1236
+ },
1237
+ setup(i) {
1238
+ return (e, t) => {
1239
+ const o = T("el-icon"), r = ae;
1240
+ return d(), x(X, null, [
1241
+ i.icon && i.icon.startsWith("el-icon") ? (d(), S(o, {
1242
+ key: 0,
1243
+ class: "sub-el-icon"
1244
+ }, {
1245
+ default: h(() => [
1246
+ (d(), S(ye(i.icon.replace("el-icon-", ""))))
1247
+ ]),
1248
+ _: 1
1249
+ })) : i.icon ? (d(), S(r, {
1250
+ key: 1,
1251
+ "icon-class": i.icon
1252
+ }, null, 8, ["icon-class"])) : (d(), S(r, {
1253
+ key: 2,
1254
+ "icon-class": "menu"
1255
+ })),
1256
+ i.title ? (d(), x("span", un, L(l(ge)(i.name, i.title)), 1)) : $("", !0)
1257
+ ], 64);
1258
+ };
1259
+ }
1260
+ }), fn = /* @__PURE__ */ q(dn, [["__scopeId", "data-v-992a058f"]]), mn = { key: 0 }, pn = /* @__PURE__ */ I({
1261
+ name: "SidebarMenuItem",
1262
+ inheritAttrs: !1,
1263
+ __name: "SidebarMenuItem",
1264
+ props: {
1265
+ /**
1266
+ * 路由(eg:user)
1267
+ */
1268
+ item: {
1269
+ type: Object,
1270
+ required: !0
1271
+ },
1272
+ /**
1273
+ * 父层级完整路由路径(eg:/system)
1274
+ */
1275
+ basePath: {
1276
+ type: String,
1277
+ required: !0
1278
+ },
1279
+ isNest: {
1280
+ type: Boolean,
1281
+ default: !1
1282
+ }
1283
+ },
1284
+ setup(i) {
1285
+ const e = i, t = U();
1286
+ function o(n = [], a) {
1287
+ const s = n.filter((c) => {
1288
+ var f;
1289
+ return (f = c.meta) != null && f.hidden ? !1 : (c.meta.hidden = !1, t.value = c, !0);
1290
+ });
1291
+ return s.length === 1 ? !0 : s.length === 0 ? (t.value = { ...a, path: "", noShowingChildren: !0 }, !0) : !1;
1292
+ }
1293
+ function r(n) {
1294
+ return fe(n) ? n : fe(e.basePath) ? e.basePath : Re.resolve(e.basePath, n);
1295
+ }
1296
+ return (n, a) => {
1297
+ var _;
1298
+ const s = fn, c = T("el-menu-item"), f = cn, m = T("SidebarMenuItem", !0), u = T("el-sub-menu");
1299
+ return !i.item.meta || !i.item.meta.hidden ? (d(), x("div", mn, [
1300
+ o(i.item.children, i.item) && (!l(t).children || l(t).noShowingChildren) && !((_ = i.item.meta) != null && _.alwaysShow) ? (d(), x(X, { key: 0 }, [
1301
+ l(t).meta ? (d(), S(f, {
1302
+ key: 0,
1303
+ to: r(l(t).path)
1304
+ }, {
1305
+ default: h(() => [
1306
+ p(c, {
1307
+ index: r(l(t).path),
1308
+ class: W({ "submenu-title-noDropdown": !i.isNest })
1309
+ }, {
1310
+ default: h(() => [
1311
+ p(s, {
1312
+ icon: l(t).meta.icon || i.item.meta && i.item.meta.icon,
1313
+ title: l(t).meta.title,
1314
+ name: l(t).name
1315
+ }, null, 8, ["icon", "title", "name"])
1316
+ ]),
1317
+ _: 1
1318
+ }, 8, ["index", "class"])
1319
+ ]),
1320
+ _: 1
1321
+ }, 8, ["to"])) : $("", !0)
1322
+ ], 64)) : (d(), S(u, {
1323
+ key: 1,
1324
+ index: r(i.item.path),
1325
+ teleported: ""
1326
+ }, {
1327
+ title: h(() => [
1328
+ i.item.meta ? (d(), S(s, {
1329
+ key: 0,
1330
+ icon: i.item.meta && i.item.meta.icon,
1331
+ title: i.item.meta.title,
1332
+ name: i.item.name
1333
+ }, null, 8, ["icon", "title", "name"])) : $("", !0)
1334
+ ]),
1335
+ default: h(() => [
1336
+ (d(!0), x(X, null, le(i.item.children, (g) => (d(), S(m, {
1337
+ key: g.path,
1338
+ "is-nest": !0,
1339
+ item: g,
1340
+ "base-path": r(g.path)
1341
+ }, null, 8, ["item", "base-path"]))), 128))
1342
+ ]),
1343
+ _: 1
1344
+ }, 8, ["index"]))
1345
+ ])) : $("", !0);
1346
+ };
1347
+ }
1348
+ }), _n = "_dark_168i3_12", ie = {
1349
+ "sidebar-width": "210px",
1350
+ "navbar-height": "50px",
1351
+ "menu-background": "var(--menu-background)",
1352
+ "menu-text": "var(--menu-text)",
1353
+ "menu-active-text": "var(--menu-active-text)",
1354
+ "menu-hover": "var(--menu-hover)",
1355
+ dark: _n
1356
+ }, De = /* @__PURE__ */ I({
1357
+ __name: "SidebarMenu",
1358
+ props: {
1359
+ menuList: {
1360
+ required: !0,
1361
+ default: () => [],
1362
+ type: Array
1363
+ },
1364
+ basePath: {
1365
+ type: String,
1366
+ required: !0
1367
+ }
1368
+ },
1369
+ setup(i) {
1370
+ const e = te(), t = Q(), o = pe(), r = R(() => e.layout), n = i;
1371
+ function a(s) {
1372
+ return fe(s) ? s : fe(n.basePath) ? n.basePath : Re.resolve(n.basePath, s);
1373
+ }
1374
+ return (s, c) => {
1375
+ const f = pn, m = T("el-menu");
1376
+ return d(), S(m, {
1377
+ "default-active": l(o).path,
1378
+ collapse: !l(t).sidebar.opened,
1379
+ "background-color": l(ie)["menu-background"],
1380
+ "text-color": l(ie)["menu-text"],
1381
+ "active-text-color": l(ie)["menu-active-text"],
1382
+ "unique-opened": !1,
1383
+ "collapse-transition": !1,
1384
+ mode: l(r) === "top" ? "horizontal" : "vertical"
1385
+ }, {
1386
+ default: h(() => [
1387
+ (d(!0), x(X, null, le(i.menuList, (u) => (d(), S(f, {
1388
+ key: u.path,
1389
+ item: u,
1390
+ "base-path": a(u.path),
1391
+ "is-collapse": !l(t).sidebar.opened
1392
+ }, null, 8, ["item", "base-path", "is-collapse"]))), 128))
1393
+ ]),
1394
+ _: 1
1395
+ }, 8, ["default-active", "collapse", "background-color", "text-color", "active-text-color", "mode"]);
1396
+ };
1397
+ }
1398
+ }), vn = { key: 1 }, gn = {
1399
+ key: 0,
1400
+ class: "ml-1"
1401
+ }, hn = /* @__PURE__ */ I({
1402
+ __name: "SidebarMixTopMenu",
1403
+ setup(i) {
1404
+ const e = Q(), t = me(), o = ke(), r = R(() => e.activeTopMenuPath), n = U([]), a = (c) => {
1405
+ e.activeTopMenu(c), t.setMixLeftMenus(c);
1406
+ const f = t.mixLeftMenus;
1407
+ s(f);
1408
+ }, s = (c) => {
1409
+ if (c.length === 0) return;
1410
+ const [f] = c;
1411
+ f.children && f.children.length > 0 ? s(f.children) : f.name && o.push({
1412
+ name: f.name
1413
+ });
1414
+ };
1415
+ return Ee(() => {
1416
+ n.value = t.routes.filter(
1417
+ (c) => !c.meta || !c.meta.hidden
1418
+ );
1419
+ }), (c, f) => {
1420
+ const m = ae, u = T("el-menu-item"), _ = T("el-menu"), g = T("el-scrollbar");
1421
+ return d(), S(g, null, {
1422
+ default: h(() => [
1423
+ p(_, {
1424
+ mode: "horizontal",
1425
+ "default-active": l(r),
1426
+ "background-color": l(ie)["menu-background"],
1427
+ "text-color": l(ie)["menu-text"],
1428
+ "active-text-color": l(ie)["menu-active-text"],
1429
+ onSelect: a
1430
+ }, {
1431
+ default: h(() => [
1432
+ (d(!0), x(X, null, le(l(n), (w) => (d(), S(u, {
1433
+ key: w.path,
1434
+ index: w.path
1435
+ }, {
1436
+ title: h(() => [
1437
+ w.meta && w.meta.icon ? (d(), S(m, {
1438
+ key: 0,
1439
+ "icon-class": w.meta.icon
1440
+ }, null, 8, ["icon-class"])) : $("", !0),
1441
+ w.path === "/" ? (d(), x("span", vn, L(l(ge)("Dashboard", "首页")), 1)) : (d(), x(X, { key: 2 }, [
1442
+ w.meta && w.meta.title ? (d(), x("span", gn, L(l(xe)(w)), 1)) : $("", !0)
1443
+ ], 64))
1444
+ ]),
1445
+ _: 2
1446
+ }, 1032, ["index"]))), 128))
1447
+ ]),
1448
+ _: 1
1449
+ }, 8, ["default-active", "background-color", "text-color", "active-text-color"])
1450
+ ]),
1451
+ _: 1
1452
+ });
1453
+ };
1454
+ }
1455
+ }), bn = { class: "logo-container" }, xn = ["src"], wn = ["src"], yn = { class: "logo-title" }, kn = /* @__PURE__ */ I({
1456
+ __name: "SidebarLogo",
1457
+ props: {
1458
+ collapse: {
1459
+ type: Boolean,
1460
+ required: !0
1461
+ }
1462
+ },
1463
+ setup(i) {
1464
+ const e = te(), t = de.logo;
1465
+ return (o, r) => {
1466
+ const n = T("router-link");
1467
+ return d(), x("div", bn, [
1468
+ p(Me, { "enter-active-class": "animate__animated animate__fadeInLeft" }, {
1469
+ default: h(() => [
1470
+ i.collapse ? (d(), S(n, {
1471
+ key: 0,
1472
+ class: "wh-full flex-center",
1473
+ to: "/"
1474
+ }, {
1475
+ default: h(() => [
1476
+ l(e).sidebarLogo ? (d(), x("img", {
1477
+ key: 0,
1478
+ src: l(t),
1479
+ class: "logo-image"
1480
+ }, null, 8, xn)) : $("", !0)
1481
+ ]),
1482
+ _: 1
1483
+ })) : (d(), S(n, {
1484
+ key: 1,
1485
+ class: "wh-full flex-center",
1486
+ to: "/"
1487
+ }, {
1488
+ default: h(() => [
1489
+ l(e).sidebarLogo ? (d(), x("img", {
1490
+ key: 0,
1491
+ src: l(t),
1492
+ class: "logo-image"
1493
+ }, null, 8, wn)) : $("", !0),
1494
+ k("span", yn, L(l(de).title), 1)
1495
+ ]),
1496
+ _: 1
1497
+ }))
1498
+ ]),
1499
+ _: 1
1500
+ })
1501
+ ]);
1502
+ };
1503
+ }
1504
+ }), Sn = /* @__PURE__ */ q(kn, [["__scopeId", "data-v-210c85a9"]]), Cn = {
1505
+ key: 0,
1506
+ class: "flex w-full"
1507
+ }, Vn = /* @__PURE__ */ I({
1508
+ __name: "index",
1509
+ setup(i) {
1510
+ const e = Q(), t = te(), o = me(), r = R(() => t.sidebarLogo), n = R(() => t.layout);
1511
+ return (a, s) => {
1512
+ const c = Sn, f = hn, m = Le, u = De, _ = T("el-scrollbar");
1513
+ return d(), x("div", {
1514
+ class: W({ "has-logo": l(r) })
1515
+ }, [
1516
+ l(n) == "mix" ? (d(), x("div", Cn, [
1517
+ l(r) ? (d(), S(c, {
1518
+ key: 0,
1519
+ collapse: !l(e).sidebar.opened
1520
+ }, null, 8, ["collapse"])) : $("", !0),
1521
+ p(f, { class: "flex-1" }),
1522
+ p(m)
1523
+ ])) : (d(), x(X, { key: 1 }, [
1524
+ l(r) ? (d(), S(c, {
1525
+ key: 0,
1526
+ collapse: !l(e).sidebar.opened
1527
+ }, null, 8, ["collapse"])) : $("", !0),
1528
+ p(_, null, {
1529
+ default: h(() => [
1530
+ p(u, {
1531
+ "menu-list": l(o).routes,
1532
+ "base-path": ""
1533
+ }, null, 8, ["menu-list"])
1534
+ ]),
1535
+ _: 1
1536
+ }),
1537
+ l(n) === "top" ? (d(), S(m, { key: 1 })) : $("", !0)
1538
+ ], 64))
1539
+ ], 2);
1540
+ };
1541
+ }
1542
+ }), Tn = /* @__PURE__ */ q(Vn, [["__scopeId", "data-v-a6d3f8e9"]]), $n = {
1543
+ key: 1,
1544
+ class: "mix-container"
1545
+ }, An = { class: "mix-container__left" }, Mn = { class: "sidebar-toggle" }, En = 992, Ln = /* @__PURE__ */ I({
1546
+ __name: "index",
1547
+ setup(i) {
1548
+ const e = Q(), t = te(), o = me(), r = R(() => t.fixedHeader), n = R(() => t.tagsView), a = R(() => t.layout), s = R(() => e.activeTopMenuPath), c = R(() => o.mixLeftMenus);
1549
+ ne(
1550
+ () => s.value,
1551
+ (g) => {
1552
+ o.setMixLeftMenus(g);
1553
+ },
1554
+ {
1555
+ deep: !0,
1556
+ immediate: !0
1557
+ }
1558
+ );
1559
+ const f = R(() => ({
1560
+ hideSidebar: !e.sidebar.opened,
1561
+ openSidebar: e.sidebar.opened,
1562
+ mobile: e.device === _e.MOBILE,
1563
+ "layout-left": a.value === "left",
1564
+ "layout-top": a.value === "top",
1565
+ "layout-mix": a.value === "mix"
1566
+ })), m = Ye().width;
1567
+ st(() => {
1568
+ m.value < En ? (e.toggleDevice(_e.MOBILE), e.closeSideBar()) : (e.toggleDevice(_e.DESKTOP), m.value >= 1200 ? e.openSideBar() : e.closeSideBar());
1569
+ });
1570
+ function u() {
1571
+ e.closeSideBar();
1572
+ }
1573
+ function _() {
1574
+ e.toggleSidebar();
1575
+ }
1576
+ return (g, w) => {
1577
+ const M = Tn, C = De, V = Pe, O = rn, y = en, Y = Jt, Z = Pt;
1578
+ return d(), x("div", {
1579
+ class: W(["wh-full", l(f)])
1580
+ }, [
1581
+ l(f).mobile && l(f).openSidebar ? (d(), x("div", {
1582
+ key: 0,
1583
+ class: "wh-full fixed-lt z-999 bg-black bg-opacity-30",
1584
+ onClick: u
1585
+ })) : $("", !0),
1586
+ p(M, { class: "sidebar-container" }),
1587
+ l(a) === "mix" ? (d(), x("div", $n, [
1588
+ k("div", An, [
1589
+ p(C, {
1590
+ "menu-list": l(c),
1591
+ "base-path": l(s)
1592
+ }, null, 8, ["menu-list", "base-path"]),
1593
+ k("div", Mn, [
1594
+ p(V, {
1595
+ "is-active": l(e).sidebar.opened,
1596
+ onToggleClick: _
1597
+ }, null, 8, ["is-active"])
1598
+ ])
1599
+ ]),
1600
+ k("div", {
1601
+ class: W([{ hasTagsView: l(n) }, "main-container"])
1602
+ }, [
1603
+ k("div", {
1604
+ class: W({ "fixed-header": l(r) })
1605
+ }, [
1606
+ l(n) ? (d(), S(O, { key: 0 })) : $("", !0)
1607
+ ], 2),
1608
+ p(y),
1609
+ l(de).showSettings ? (d(), S(Y, { key: 0 })) : $("", !0)
1610
+ ], 2)
1611
+ ])) : (d(), x("div", {
1612
+ key: 2,
1613
+ class: W([{ hasTagsView: l(n) }, "main-container"])
1614
+ }, [
1615
+ k("div", {
1616
+ class: W({ "fixed-header": l(r) })
1617
+ }, [
1618
+ l(a) === "left" ? (d(), S(Z, { key: 0 })) : $("", !0),
1619
+ l(n) ? (d(), S(O, { key: 1 })) : $("", !0)
1620
+ ], 2),
1621
+ p(y),
1622
+ l(de).showSettings ? (d(), S(Y, { key: 0 })) : $("", !0)
1623
+ ], 2))
1624
+ ], 2);
1625
+ };
1626
+ }
1627
+ }), Nn = /* @__PURE__ */ q(Ln, [["__scopeId", "data-v-71891bc2"]]);
1628
+ export {
1629
+ Nn as default
1630
+ };