@robot-admin/layout 3.0.0 → 3.2.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.
package/dist/index.js CHANGED
@@ -1,2296 +1,3 @@
1
- import { Fragment as e, KeepAlive as t, Transition as n, computed as r, createBlock as i, createCommentVNode as a, createElementBlock as o, createElementVNode as s, createSlots as c, createTextVNode as l, createVNode as u, defineComponent as d, h as f, inject as p, mergeModels as m, nextTick as h, normalizeClass as g, normalizeStyle as _, onMounted as v, onUnmounted as y, openBlock as b, provide as x, ref as S, renderList as C, renderSlot as w, resolveComponent as T, resolveDynamicComponent as E, toDisplayString as D, toValue as O, unref as k, useModel as A, watch as j, withCtx as M, withKeys as N, withModifiers as P } from "vue";
2
- import { NButton as F, NColorPicker as I, NDrawer as L, NDrawerContent as R, NDropdown as z, NInput as B, NLayout as V, NLayoutContent as H, NLayoutSider as U, NMenu as ee, NRadioButton as W, NRadioGroup as te, NSlider as ne, NSwitch as G, NTabPane as re, NTabs as ie, useDialog as ae, useMessage as oe } from "naive-ui";
3
- import { useRoute as K, useRouter as q } from "vue-router";
4
- import { defineStore as se } from "pinia";
5
- //#region src/composables/useLayoutContext.ts
6
- var J = Symbol("layout-context"), ce = Symbol("layout-settings"), le = Symbol("menu-collapse"), ue = Symbol("drawer-handlers");
7
- function Y() {
8
- let e = p(J);
9
- if (!e) throw Error("[Layout] LayoutContext not provided. 请在上层组件中使用 provide(LAYOUT_CONTEXT_KEY, ...) 注入布局数据。");
10
- return e;
11
- }
12
- function de(e) {
13
- return x(J, e), e;
14
- }
15
- var X = {
16
- name: "Admin",
17
- subtitle: "",
18
- logoSrc: "",
19
- logoType: "image",
20
- logoSize: 36,
21
- homePath: "/home",
22
- copyright: ""
23
- };
24
- //#endregion
25
- //#region src/composables/useLayoutCache.ts
26
- function fe(e) {
27
- return typeof e.name == "string" && e.meta.keepAlive === !0;
28
- }
29
- function Z(e = {}) {
30
- let { maxCacheCount: t = 20, enableDevLog: n = !1, exposeToWindow: r = !1 } = e, i = K(), a = Number.isFinite(t) && t > 0 ? Math.floor(t) : 20, o = S([]), s = S(a), c = (e) => {
31
- e && !o.value.includes(e) && (o.value.push(e), o.value.length > s.value && o.value.shift(), n && console.debug(`[KeepAlive] ✅ 缓存: ${e} (${o.value.length}/${s.value})`));
32
- }, l = (e) => {
33
- let t = o.value.indexOf(e);
34
- t > -1 && (o.value.splice(t, 1), n && console.debug(`[KeepAlive] ❌ 移除: ${e}`));
35
- }, u = () => {
36
- o.value = [], n && console.debug("[KeepAlive] 🗑️ 清空所有缓存");
37
- }, d = () => o.value;
38
- return r && typeof window < "u" && (window.__clearCache__ = u, window.__removeCache__ = l, window.__getCachedViews__ = d, y(() => {
39
- window.__clearCache__ === u && delete window.__clearCache__, window.__removeCache__ === l && delete window.__removeCache__, window.__getCachedViews__ === d && delete window.__getCachedViews__;
40
- })), j(() => [i.name, i.meta.keepAlive], () => {
41
- fe(i) && c(i.name);
42
- }, { immediate: !0 }), {
43
- cachedViews: o,
44
- maxCacheCount: s,
45
- addCache: c,
46
- removeCache: l,
47
- clearAllCache: u
48
- };
49
- }
50
- //#endregion
51
- //#region src/components/layouts/SideLayout/index.vue
52
- var pe = /* @__PURE__ */ d({
53
- name: "SideLayout",
54
- __name: "index",
55
- props: { collapsed: {
56
- type: Boolean,
57
- default: !1
58
- } },
59
- emits: ["update:collapsed"],
60
- setup(e, { expose: a, emit: o }) {
61
- let s = e, c = o, l = Y(), { cachedViews: d, maxCacheCount: f } = Z(), p = S(s.collapsed);
62
- j(() => s.collapsed, (e) => {
63
- p.value = e;
64
- });
65
- let m = r(() => p.value), h = (e) => {
66
- p.value = e, c("update:collapsed", e);
67
- };
68
- return a({
69
- collapsed: m,
70
- toggleCollapse: () => {
71
- let e = !p.value;
72
- p.value = e, c("update:collapsed", e);
73
- }
74
- }), (e, r) => {
75
- let a = T("RouterView");
76
- return b(), i(k(V), { "has-sider": "" }, {
77
- default: M(() => [u(k(U), {
78
- bordered: "",
79
- "collapse-mode": "width",
80
- "collapsed-width": k(l).sidebarCollapsedWidth.value,
81
- width: k(l).sidebarWidth.value,
82
- "native-scrollbar": !1,
83
- collapsed: m.value,
84
- "onUpdate:collapsed": h,
85
- class: g([
86
- "layout-sider",
87
- "no-horizontal-scroll",
88
- k(l).isDark.value ? "dark-theme" : "light-theme"
89
- ])
90
- }, {
91
- default: M(() => [w(e.$slots, "logo"), w(e.$slots, "menu", { collapsed: m.value })]),
92
- _: 3
93
- }, 8, [
94
- "collapsed-width",
95
- "width",
96
- "collapsed",
97
- "class"
98
- ]), u(k(V), null, {
99
- default: M(() => [
100
- w(e.$slots, "header"),
101
- u(k(H), { class: "content-with-header p16px app-content" }, {
102
- default: M(() => [u(a, null, {
103
- default: M(({ Component: e, route: r }) => [u(n, {
104
- name: k(l).transitionName.value,
105
- mode: "out-in"
106
- }, {
107
- default: M(() => [(b(), i(t, {
108
- include: k(d),
109
- max: k(f)
110
- }, [(b(), i(E(e), { key: r.path }))], 1032, ["include", "max"]))]),
111
- _: 2
112
- }, 1032, ["name"])]),
113
- _: 1
114
- })]),
115
- _: 1
116
- }),
117
- w(e.$slots, "footer")
118
- ]),
119
- _: 3
120
- })]),
121
- _: 3
122
- });
123
- };
124
- }
125
- }), me = { class: "responsive-menu__visible" }, he = { class: "responsive-menu__more" }, ge = /* @__PURE__ */ d({
126
- name: "ResponsiveMenu",
127
- __name: "index",
128
- props: { data: {} },
129
- setup(e) {
130
- let t = e, n = K(), c = q(), l = Y(), d = r(() => t.data || []), p = r(() => n.path), m = l.isDark, g = {
131
- itemTextColor: "rgba(51, 65, 85, 0.85)",
132
- itemTextColorHover: "rgba(30, 64, 175, 0.95)",
133
- itemTextColorActive: "rgba(30, 64, 175, 1)",
134
- itemTextColorActiveHover: "rgba(30, 64, 175, 1)",
135
- itemTextColorChildActive: "rgba(30, 64, 175, 1)",
136
- itemIconColor: "rgba(51, 65, 85, 0.7)",
137
- itemIconColorHover: "rgba(30, 64, 175, 0.85)",
138
- itemIconColorActive: "rgba(30, 64, 175, 1)",
139
- itemIconColorActiveHover: "rgba(30, 64, 175, 1)",
140
- itemIconColorChildActive: "rgba(30, 64, 175, 1)",
141
- itemColorHover: "rgba(30, 64, 175, 0.06)",
142
- itemColorActive: "rgba(30, 64, 175, 0.1)",
143
- itemColorActiveHover: "rgba(30, 64, 175, 0.12)",
144
- itemColorActiveCollapsed: "rgba(30, 64, 175, 0.1)",
145
- arrowColor: "rgba(51, 65, 85, 0.6)",
146
- arrowColorHover: "rgba(30, 64, 175, 0.8)",
147
- arrowColorActive: "rgba(30, 64, 175, 1)",
148
- arrowColorChildActive: "rgba(30, 64, 175, 1)",
149
- itemHeight: "42px",
150
- itemPadding: "0 18px",
151
- itemBorderRadius: "10px",
152
- groupTextColor: "rgba(51, 65, 85, 0.65)"
153
- }, _ = {
154
- itemTextColor: "rgba(226, 232, 240, 0.85)",
155
- itemTextColorHover: "rgba(255, 255, 255, 0.95)",
156
- itemTextColorActive: "rgba(147, 197, 253, 1)",
157
- itemTextColorActiveHover: "rgba(147, 197, 253, 1)",
158
- itemTextColorChildActive: "rgba(147, 197, 253, 1)",
159
- itemIconColor: "rgba(226, 232, 240, 0.7)",
160
- itemIconColorHover: "rgba(255, 255, 255, 0.85)",
161
- itemIconColorActive: "rgba(147, 197, 253, 1)",
162
- itemIconColorActiveHover: "rgba(147, 197, 253, 1)",
163
- itemIconColorChildActive: "rgba(147, 197, 253, 1)",
164
- itemColorHover: "rgba(59, 130, 246, 0.1)",
165
- itemColorActive: "rgba(59, 130, 246, 0.15)",
166
- itemColorActiveHover: "rgba(59, 130, 246, 0.18)",
167
- itemColorActiveCollapsed: "rgba(59, 130, 246, 0.15)",
168
- arrowColor: "rgba(226, 232, 240, 0.5)",
169
- arrowColorHover: "rgba(255, 255, 255, 0.7)",
170
- arrowColorActive: "rgba(147, 197, 253, 1)",
171
- arrowColorChildActive: "rgba(147, 197, 253, 1)",
172
- itemHeight: "42px",
173
- itemPadding: "0 18px",
174
- itemBorderRadius: "10px",
175
- groupTextColor: "rgba(226, 232, 240, 0.6)"
176
- }, x = r(() => m.value ? _ : g), C = (e, t = 18) => l.iconComponent ? () => f(l.iconComponent, {
177
- name: e,
178
- size: t
179
- }) : () => f("i", {
180
- class: e,
181
- style: {
182
- fontSize: `${t}px`,
183
- display: "inline-flex",
184
- alignItems: "center"
185
- }
186
- }), w = (e) => ({
187
- key: e.path || "",
188
- label: e.meta?.title || e.name || "",
189
- icon: e.meta?.icon ? C(e.meta.icon, 18) : void 0,
190
- children: e.children?.length ? e.children.map(w) : void 0
191
- }), T = S(), E = S([]), D = S([]), O = r(() => E.value.map(w)), A = r(() => D.value.map((e) => ({
192
- key: e.path || "",
193
- label: e.meta?.title || e.name || "",
194
- icon: e.meta?.icon ? C(e.meta.icon, 16) : void 0,
195
- children: e.children?.length ? e.children.map((e) => ({
196
- key: e.path || "",
197
- label: e.meta?.title || e.name || "",
198
- icon: e.meta?.icon ? C(e.meta.icon, 16) : void 0
199
- })) : void 0
200
- }))), N = (e) => {
201
- e && c.push(e);
202
- }, P = (e) => {
203
- let t = e.meta?.title || e.name || "", n = 0;
204
- for (let e of t) {
205
- let t = e.charCodeAt(0);
206
- t >= 19968 && t <= 40959 || t >= 13312 && t <= 19903 || t >= 12288 && t <= 12351 || t >= 65280 && t <= 65519 || t >= 12352 && t <= 12447 || t >= 12448 && t <= 12543 ? n += 15 : n += 8;
207
- }
208
- let r = e.meta?.icon ? 26 : 0;
209
- return n + r + 36 + 8 + 8;
210
- }, I = (e) => {
211
- if (!d.value.length) return 0;
212
- let t = 0;
213
- for (let e of d.value) t += P(e);
214
- if (t + 15 <= e) return d.value.length;
215
- let n = 0, r = 0, i = e - 80 - 15;
216
- for (let e of d.value) {
217
- let t = P(e);
218
- if (n + t <= i) n += t, r++;
219
- else break;
220
- }
221
- return Math.max(r, 1);
222
- }, L = () => {
223
- if (!T.value || !d.value.length) return;
224
- let e = T.value.offsetWidth;
225
- if (e <= 0) return;
226
- let t = I(e);
227
- E.value = d.value.slice(0, t), D.value = d.value.slice(t);
228
- }, R = null, B = () => {
229
- R && clearTimeout(R), R = setTimeout(() => L(), 100);
230
- }, V = null;
231
- return v(() => {
232
- h(() => L()), T.value && typeof ResizeObserver < "u" ? (V = new ResizeObserver(() => B()), V.observe(T.value)) : typeof window < "u" && window.addEventListener("resize", B, { passive: !0 });
233
- }), y(() => {
234
- V?.disconnect(), typeof window < "u" && window.removeEventListener("resize", B), R && clearTimeout(R);
235
- }), j(() => t.data, () => h(() => L()), { deep: !0 }), (e, t) => (b(), o("div", {
236
- ref_key: "containerRef",
237
- ref: T,
238
- class: "responsive-menu"
239
- }, [s("div", me, [O.value.length > 0 ? (b(), i(k(ee), {
240
- key: 0,
241
- mode: "horizontal",
242
- value: p.value,
243
- options: O.value,
244
- "theme-overrides": x.value,
245
- "onUpdate:value": N
246
- }, null, 8, [
247
- "value",
248
- "options",
249
- "theme-overrides"
250
- ])) : a("", !0)]), D.value.length > 0 ? (b(), i(k(z), {
251
- key: 0,
252
- options: A.value,
253
- placement: "bottom-end",
254
- trigger: "hover",
255
- onSelect: N
256
- }, {
257
- default: M(() => [s("div", he, [u(k(F), {
258
- text: "",
259
- class: "responsive-menu__more-btn"
260
- }, {
261
- default: M(() => [...t[0] ||= [s("span", { class: "dots-icon" }, [
262
- s("span"),
263
- s("span"),
264
- s("span")
265
- ], -1)]]),
266
- _: 1
267
- })])]),
268
- _: 1
269
- }, 8, ["options"])) : a("", !0)], 512));
270
- }
271
- }), Q = (e, t) => {
272
- let n = e.__vccOpts || e;
273
- for (let [e, r] of t) n[e] = r;
274
- return n;
275
- }, _e = /* @__PURE__ */ Q(ge, [["__scopeId", "data-v-01fd38ee"]]), ve = { class: "top-layout-container" }, ye = { class: "navbar-left" }, be = { class: "logo-container" }, xe = [
276
- "src",
277
- "width",
278
- "height"
279
- ], Se = [
280
- "src",
281
- "width",
282
- "height",
283
- "alt"
284
- ], Ce = { class: "brand-name" }, we = { class: "brand-title" }, Te = { class: "brand-subtitle" }, Ee = { class: "navbar-center" }, De = { class: "page-content" }, Oe = /* @__PURE__ */ d({
285
- name: "TopLayout",
286
- __name: "index",
287
- setup(e) {
288
- let c = Y(), { cachedViews: l, maxCacheCount: d } = Z(), f = c.isDark, p = r(() => c.menus.value), m = r(() => c.showTagsView.value), h = r(() => c.tagsViewHeight.value), v = r(() => c.showFooter.value), y = r(() => c.transitionName.value), x = {
289
- ...X,
290
- ...c.brand
291
- };
292
- return (e, r) => {
293
- let c = T("RouterView");
294
- return b(), o("div", ve, [
295
- s("div", { class: g(["top-navbar", [k(f) ? "dark-theme" : "light-theme"]]) }, [
296
- s("div", ye, [w(e.$slots, "logo", {}, () => [
297
- s("div", be, [r[0] ||= s("div", { class: "logo-glow" }, null, -1), x.logoType === "video" && x.logoSrc ? (b(), o("video", {
298
- key: 0,
299
- src: x.logoSrc,
300
- width: x.logoSize || 36,
301
- height: x.logoSize || 36,
302
- autoplay: "",
303
- loop: "",
304
- muted: "",
305
- playsinline: "",
306
- class: "logo-video"
307
- }, " 您的浏览器不支持 video 标签。 ", 8, xe)) : x.logoSrc ? (b(), o("img", {
308
- key: 1,
309
- src: x.logoSrc,
310
- width: x.logoSize || 36,
311
- height: x.logoSize || 36,
312
- class: "logo-video",
313
- alt: x.name || "Logo"
314
- }, null, 8, Se)) : a("", !0)]),
315
- s("div", Ce, [s("span", we, D(x.name), 1), s("span", Te, D(x.subtitle), 1)]),
316
- r[1] ||= s("div", { class: "navbar-divider" }, null, -1)
317
- ])]),
318
- s("div", Ee, [w(e.$slots, "menu", {}, () => [u(_e, { data: p.value }, null, 8, ["data"])])]),
319
- w(e.$slots, "header-extra")
320
- ], 2),
321
- m.value ? (b(), o("div", {
322
- key: 0,
323
- class: "tags-view-container",
324
- style: _({ height: `${h.value}px` })
325
- }, [w(e.$slots, "tags-view")], 4)) : a("", !0),
326
- u(k(V), null, {
327
- default: M(() => [u(k(H), { class: "main-content" }, {
328
- default: M(() => [s("div", De, [u(c, null, {
329
- default: M(({ Component: e, route: r }) => [u(n, {
330
- name: y.value,
331
- mode: "out-in"
332
- }, {
333
- default: M(() => [(b(), i(t, {
334
- include: k(l),
335
- max: k(d)
336
- }, [(b(), i(E(e), { key: r.path }))], 1032, ["include", "max"]))]),
337
- _: 2
338
- }, 1032, ["name"])]),
339
- _: 1
340
- })])]),
341
- _: 1
342
- }), v.value ? w(e.$slots, "footer", {}, void 0, void 0, 0) : a("", !0)]),
343
- _: 3
344
- })
345
- ]);
346
- };
347
- }
348
- });
349
- //#endregion
350
- //#region src/composables/useMenuSplit.ts
351
- function ke(e, t) {
352
- if (!e) return !1;
353
- let n = e.split("/").filter(Boolean), r = t.split("/").filter(Boolean);
354
- return n.length === 0 ? r.length === 0 : n.every((e, t) => r[t] === e);
355
- }
356
- function Ae(e) {
357
- let { menus: t, floatingSecondMenu: n = !1 } = e, i = K(), a = q(), o = S(""), s = S(null), c = S(!1), l = r(() => s.value || f.value || null), u = (e) => ke(e, i.path), d = (e) => {
358
- for (let t of e) if (u(t.path) || t.children?.length && d(t.children)) return t;
359
- return null;
360
- }, f = r(() => t.value.find((e) => e.path === o.value)), p = r(() => f.value?.children || []), m = (e) => {
361
- e.disabled || (O(n) ? e.children && e.children.length > 0 ? c.value && o.value === e.path ? c.value = !1 : (o.value = e.path || "", c.value = !0) : (o.value = e.path || "", c.value = !1, e.path && a.push(e.path)) : (!e.children || e.children.length === 0) && e.path && a.push(e.path));
362
- }, h = (e) => {
363
- !e.disabled && e.path && a.push(e.path);
364
- }, g = () => {
365
- let e = t.value, r = d(e);
366
- r ? (o.value = r.path || "", O(n) && r.children?.length && (c.value = !0)) : e.length > 0 && !o.value && (o.value = e[0].path || "");
367
- };
368
- return j(() => i.path, () => g(), { immediate: !0 }), j(t, (e) => {
369
- e && e.length > 0 && g();
370
- }, { immediate: !0 }), v(() => g()), {
371
- activeFirstMenu: o,
372
- activeFirstMenuItem: f,
373
- currentSecondMenus: p,
374
- hoveredMenuItem: s,
375
- displayMenuItem: l,
376
- showSecondMenu: c,
377
- handleFirstMenuClick: m,
378
- handleSecondMenuClick: h,
379
- isMenuItemActive: u
380
- };
381
- }
382
- //#endregion
383
- //#region src/components/layouts/MixLayout/index.vue?vue&type=script&setup=true&lang.ts
384
- var je = { class: "mix-layout-container" }, Me = { class: "logo-container" }, Ne = [
385
- "src",
386
- "width",
387
- "height"
388
- ], Pe = [
389
- "src",
390
- "width",
391
- "height",
392
- "alt"
393
- ], Fe = { class: "first-menu-list" }, Ie = [
394
- "tabindex",
395
- "aria-disabled",
396
- "onClick",
397
- "onKeydown"
398
- ], Le = { class: "menu-item-content" }, Re = {
399
- key: 1,
400
- class: "menu-item-text"
401
- }, ze = { class: "menu-item-label" }, Be = { class: "second-menu-header" }, Ve = { class: "menu-title" }, He = { class: "second-menu-list" }, Ue = [
402
- "tabindex",
403
- "aria-disabled",
404
- "onClick",
405
- "onKeydown"
406
- ], We = { class: "menu-item-label" }, Ge = { class: "main-layout" }, Ke = /* @__PURE__ */ d({
407
- name: "MixLayout",
408
- __name: "index",
409
- setup(c) {
410
- let l = Y(), { cachedViews: p, maxCacheCount: m } = Z(), h = l.isDark, _ = r(() => l.menus.value), v = r(() => l.showFooter.value), y = r(() => l.transitionName.value), x = {
411
- ...X,
412
- ...l.brand
413
- }, S = Ae({
414
- menus: l.menus,
415
- floatingSecondMenu: r(() => !0)
416
- }), O = l.iconComponent ?? d({
417
- name: "LayoutIcon",
418
- props: {
419
- name: String,
420
- size: {
421
- type: Number,
422
- default: 18
423
- }
424
- },
425
- setup(e) {
426
- return () => f("i", {
427
- class: e.name,
428
- style: {
429
- fontSize: `${e.size}px`,
430
- display: "inline-flex",
431
- alignItems: "center",
432
- justifyContent: "center"
433
- }
434
- });
435
- }
436
- });
437
- return (r, c) => {
438
- let l = T("RouterView");
439
- return b(), o("div", je, [
440
- s("div", { class: g(["first-level-menu", [k(h) ? "dark-theme" : "light-theme"]]) }, [s("div", Me, [w(r.$slots, "logo", {}, () => [c[0] ||= s("div", { class: "logo-glow" }, null, -1), x.logoType === "video" && x.logoSrc ? (b(), o("video", {
441
- key: 0,
442
- src: x.logoSrc,
443
- width: x.logoSize || 40,
444
- height: x.logoSize || 40,
445
- autoplay: "",
446
- loop: "",
447
- muted: "",
448
- playsinline: "",
449
- class: "logo-video"
450
- }, " 您的浏览器不支持 video 标签。 ", 8, Ne)) : x.logoSrc ? (b(), o("img", {
451
- key: 1,
452
- src: x.logoSrc,
453
- width: x.logoSize || 40,
454
- height: x.logoSize || 40,
455
- class: "logo-video",
456
- alt: x.name || "Logo"
457
- }, null, 8, Pe)) : a("", !0)])]), s("div", Fe, [(b(!0), o(e, null, C(_.value, (e) => (b(), o("div", {
458
- key: e.path,
459
- class: g(["first-menu-item", { active: k(S).activeFirstMenu.value === e.path }]),
460
- role: "button",
461
- tabindex: e.disabled ? -1 : 0,
462
- "aria-disabled": e.disabled || void 0,
463
- onClick: (t) => k(S).handleFirstMenuClick(e),
464
- onKeydown: [N((t) => k(S).handleFirstMenuClick(e), ["enter"]), N(P((t) => k(S).handleFirstMenuClick(e), ["prevent"]), ["space"])]
465
- }, [s("div", Le, [e.meta?.icon ? (b(), i(E(k(O)), {
466
- key: 0,
467
- name: e.meta.icon,
468
- size: 22
469
- }, null, 8, ["name"])) : (b(), o("span", Re, D((e.meta?.title || "")[0]), 1))]), s("span", ze, D(e.meta?.title), 1)], 42, Ie))), 128))])], 2),
470
- u(n, { name: "slide-fade" }, {
471
- default: M(() => [k(S).showSecondMenu.value ? (b(), o("div", {
472
- key: 0,
473
- class: g(["second-level-menu-popup", [k(h) ? "dark-theme" : "light-theme"]])
474
- }, [s("div", Be, [k(S).displayMenuItem.value?.meta?.icon ? (b(), i(E(k(O)), {
475
- key: 0,
476
- name: k(S).displayMenuItem.value.meta.icon,
477
- size: 20
478
- }, null, 8, ["name"])) : a("", !0), s("span", Ve, D(k(S).displayMenuItem.value?.meta?.title), 1)]), s("div", He, [(b(!0), o(e, null, C(k(S).displayMenuItem.value?.children || [], (e) => (b(), o("div", {
479
- key: e.path,
480
- class: g(["second-menu-item", { active: k(S).isMenuItemActive(e.path) }]),
481
- role: "link",
482
- tabindex: e.disabled ? -1 : 0,
483
- "aria-disabled": e.disabled || void 0,
484
- onClick: (t) => k(S).handleSecondMenuClick(e),
485
- onKeydown: [N((t) => k(S).handleSecondMenuClick(e), ["enter"]), N(P((t) => k(S).handleSecondMenuClick(e), ["prevent"]), ["space"])]
486
- }, [e.meta?.icon ? (b(), i(E(k(O)), {
487
- key: 0,
488
- name: e.meta.icon,
489
- size: 16
490
- }, null, 8, ["name"])) : a("", !0), s("span", We, D(e.meta?.title), 1)], 42, Ue))), 128))])], 2)) : a("", !0)]),
491
- _: 1
492
- }),
493
- s("div", Ge, [w(r.$slots, "header"), u(k(V), null, {
494
- default: M(() => [u(k(H), { class: "content-with-header p16px app-content" }, {
495
- default: M(() => [u(l, null, {
496
- default: M(({ Component: e, route: r }) => [u(n, {
497
- name: y.value,
498
- mode: "out-in"
499
- }, {
500
- default: M(() => [(b(), i(t, {
501
- include: k(p),
502
- max: k(m)
503
- }, [(b(), i(E(e), { key: r.path }))], 1032, ["include", "max"]))]),
504
- _: 2
505
- }, 1032, ["name"])]),
506
- _: 1
507
- })]),
508
- _: 1
509
- }), v.value ? w(r.$slots, "footer", {}, void 0, void 0, 0) : a("", !0)]),
510
- _: 3
511
- })])
512
- ]);
513
- };
514
- }
515
- }), qe = { class: "mix-top-layout-container" }, Je = { class: "logo-container" }, Ye = [
516
- "src",
517
- "width",
518
- "height"
519
- ], Xe = [
520
- "src",
521
- "width",
522
- "height",
523
- "alt"
524
- ], Ze = { class: "first-menu-list" }, Qe = [
525
- "tabindex",
526
- "aria-disabled",
527
- "aria-current",
528
- "onClick",
529
- "onKeydown"
530
- ], $e = { class: "menu-item-content" }, et = {
531
- key: 1,
532
- class: "menu-item-text"
533
- }, tt = { class: "menu-item-label" }, nt = { class: "main-area" }, rt = { class: "navbar-left" }, it = { class: "brand-name" }, at = { class: "brand-title" }, ot = { class: "brand-subtitle" }, st = { class: "navbar-center" }, ct = { class: "page-content" }, lt = /* @__PURE__ */ d({
534
- name: "MixTopLayout",
535
- __name: "index",
536
- setup(c) {
537
- let l = Y(), { cachedViews: p, maxCacheCount: m } = Z(), h = l.isDark, v = r(() => l.menus.value), y = r(() => l.showTagsView.value), x = r(() => l.tagsViewHeight.value), S = r(() => l.showFooter.value), O = r(() => l.transitionName.value), A = {
538
- ...X,
539
- ...l.brand
540
- }, j = Ae({
541
- menus: l.menus,
542
- floatingSecondMenu: r(() => !1)
543
- }), F = l.iconComponent ?? d({
544
- name: "LayoutIcon",
545
- props: {
546
- name: String,
547
- size: {
548
- type: Number,
549
- default: 18
550
- }
551
- },
552
- setup(e) {
553
- return () => f("i", {
554
- class: e.name,
555
- style: {
556
- fontSize: `${e.size}px`,
557
- display: "inline-flex",
558
- alignItems: "center",
559
- justifyContent: "center"
560
- }
561
- });
562
- }
563
- });
564
- return (r, c) => {
565
- let l = T("RouterView");
566
- return b(), o("div", qe, [s("div", { class: g(["first-level-sidebar", [k(h) ? "dark-theme" : "light-theme"]]) }, [s("div", Je, [w(r.$slots, "logo", {}, () => [c[0] ||= s("div", { class: "logo-glow" }, null, -1), A.logoType === "video" && A.logoSrc ? (b(), o("video", {
567
- key: 0,
568
- src: A.logoSrc,
569
- width: A.logoSize || 40,
570
- height: A.logoSize || 40,
571
- autoplay: "",
572
- loop: "",
573
- muted: "",
574
- playsinline: "",
575
- class: "logo-video"
576
- }, " 您的浏览器不支持 video 标签。 ", 8, Ye)) : A.logoSrc ? (b(), o("img", {
577
- key: 1,
578
- src: A.logoSrc,
579
- width: A.logoSize || 40,
580
- height: A.logoSize || 40,
581
- class: "logo-video",
582
- alt: A.name || "Logo"
583
- }, null, 8, Xe)) : a("", !0)])]), s("div", Ze, [(b(!0), o(e, null, C(v.value, (e) => (b(), o("div", {
584
- key: e.path,
585
- class: g(["first-menu-item", { active: k(j).activeFirstMenu.value === e.path }]),
586
- role: "button",
587
- tabindex: e.disabled ? -1 : 0,
588
- "aria-disabled": e.disabled || void 0,
589
- "aria-current": k(j).activeFirstMenu.value === e.path ? "page" : void 0,
590
- onClick: (t) => k(j).handleFirstMenuClick(e),
591
- onKeydown: [N((t) => k(j).handleFirstMenuClick(e), ["enter"]), N(P((t) => k(j).handleFirstMenuClick(e), ["prevent"]), ["space"])]
592
- }, [s("div", $e, [e.meta?.icon ? (b(), i(E(k(F)), {
593
- key: 0,
594
- name: e.meta.icon,
595
- size: 22
596
- }, null, 8, ["name"])) : (b(), o("span", et, D((e.meta?.title || "")[0]), 1))]), s("span", tt, D(e.meta?.title), 1)], 42, Qe))), 128))])], 2), s("div", nt, [
597
- s("div", { class: g(["top-navbar", [k(h) ? "dark-theme" : "light-theme"]]) }, [
598
- s("div", rt, [w(r.$slots, "brand", {}, () => [s("div", it, [s("span", at, D(A.name), 1), s("span", ot, D(A.subtitle), 1)]), c[1] ||= s("div", { class: "navbar-divider" }, null, -1)])]),
599
- s("div", st, [w(r.$slots, "top-menu", {}, () => [k(j).currentSecondMenus.value.length > 0 ? (b(), i(_e, {
600
- key: 0,
601
- data: k(j).currentSecondMenus.value
602
- }, null, 8, ["data"])) : a("", !0)])]),
603
- w(r.$slots, "header-extra")
604
- ], 2),
605
- y.value ? (b(), o("div", {
606
- key: 0,
607
- class: "tags-view-container",
608
- style: _({ height: `${x.value}px` })
609
- }, [w(r.$slots, "tags-view")], 4)) : a("", !0),
610
- u(k(V), { class: "content-layout" }, {
611
- default: M(() => [u(k(H), { class: "main-content" }, {
612
- default: M(() => [s("div", ct, [u(l, null, {
613
- default: M(({ Component: e, route: r }) => [u(n, {
614
- name: O.value,
615
- mode: "out-in"
616
- }, {
617
- default: M(() => [(b(), i(t, {
618
- include: k(p),
619
- max: k(m)
620
- }, [(b(), i(E(e), { key: r.path }))], 1032, ["include", "max"]))]),
621
- _: 2
622
- }, 1032, ["name"])]),
623
- _: 1
624
- })])]),
625
- _: 1
626
- }), S.value ? w(r.$slots, "footer", {}, void 0, void 0, 0) : a("", !0)]),
627
- _: 3
628
- })
629
- ])]);
630
- };
631
- }
632
- }), ut = { class: "reverse-horizontal-mix-layout-container" }, dt = { class: "navbar-left" }, ft = { class: "logo-container" }, pt = [
633
- "src",
634
- "width",
635
- "height"
636
- ], mt = [
637
- "src",
638
- "width",
639
- "height",
640
- "alt"
641
- ], ht = { class: "brand-name" }, gt = { class: "brand-title" }, _t = { class: "brand-subtitle" }, vt = { class: "navbar-center" }, yt = { class: "main-area" }, bt = { class: "page-content" }, xt = ["aria-expanded", "onKeydown"], St = { class: "header-icon" }, Ct = { class: "header-title" }, wt = { class: "sidebar-menu-list" }, Tt = {
642
- key: 0,
643
- class: "menu-group"
644
- }, Et = { class: "group-title" }, Dt = [
645
- "tabindex",
646
- "aria-disabled",
647
- "aria-current",
648
- "onClick",
649
- "onKeydown"
650
- ], Ot = { class: "item-title" }, kt = [
651
- "tabindex",
652
- "aria-disabled",
653
- "aria-current",
654
- "onClick",
655
- "onKeydown"
656
- ], At = { class: "item-title" }, jt = /* @__PURE__ */ d({
657
- name: "ReverseHorizontalMixLayout",
658
- __name: "index",
659
- setup(c) {
660
- let l = Y(), { cachedViews: p, maxCacheCount: m } = Z(), h = l.isDark, v = r(() => l.menus.value), y = r(() => l.showTagsView.value), x = r(() => l.tagsViewHeight.value), O = r(() => l.showFooter.value), A = r(() => l.transitionName.value), j = {
661
- ...X,
662
- ...l.brand
663
- }, F = Ae({
664
- menus: l.menus,
665
- floatingSecondMenu: r(() => !1)
666
- }), I = S(!1), L = () => {
667
- I.value = !I.value;
668
- }, R = l.iconComponent ?? d({
669
- name: "LayoutIcon",
670
- props: {
671
- name: String,
672
- size: {
673
- type: Number,
674
- default: 18
675
- }
676
- },
677
- setup(e) {
678
- return () => f("i", {
679
- class: e.name,
680
- style: {
681
- fontSize: `${e.size}px`,
682
- display: "inline-flex",
683
- alignItems: "center",
684
- justifyContent: "center"
685
- }
686
- });
687
- }
688
- });
689
- return (r, c) => {
690
- let l = T("RouterView");
691
- return b(), o("div", ut, [
692
- s("div", { class: g(["top-navbar", [k(h) ? "dark-theme" : "light-theme"]]) }, [
693
- s("div", dt, [w(r.$slots, "logo", {}, () => [
694
- s("div", ft, [c[0] ||= s("div", { class: "logo-glow" }, null, -1), j.logoType === "video" && j.logoSrc ? (b(), o("video", {
695
- key: 0,
696
- src: j.logoSrc,
697
- width: j.logoSize || 36,
698
- height: j.logoSize || 36,
699
- autoplay: "",
700
- loop: "",
701
- muted: "",
702
- playsinline: "",
703
- class: "logo-video"
704
- }, " 您的浏览器不支持 video 标签。 ", 8, pt)) : j.logoSrc ? (b(), o("img", {
705
- key: 1,
706
- src: j.logoSrc,
707
- width: j.logoSize || 36,
708
- height: j.logoSize || 36,
709
- class: "logo-video",
710
- alt: j.name || "Logo"
711
- }, null, 8, mt)) : a("", !0)]),
712
- s("div", ht, [s("span", gt, D(j.name), 1), s("span", _t, D(j.subtitle), 1)]),
713
- c[1] ||= s("div", { class: "navbar-divider" }, null, -1)
714
- ])]),
715
- s("div", vt, [w(r.$slots, "top-menu", {}, () => [u(_e, { data: v.value }, null, 8, ["data"])])]),
716
- w(r.$slots, "header-extra")
717
- ], 2),
718
- y.value ? (b(), o("div", {
719
- key: 0,
720
- class: "tags-view-container",
721
- style: _({ height: `${x.value}px` })
722
- }, [w(r.$slots, "tags-view")], 4)) : a("", !0),
723
- s("div", yt, [
724
- u(k(V), { class: "content-layout" }, {
725
- default: M(() => [u(k(H), { class: "main-content" }, {
726
- default: M(() => [s("div", bt, [u(l, null, {
727
- default: M(({ Component: e, route: r }) => [u(n, {
728
- name: A.value,
729
- mode: "out-in"
730
- }, {
731
- default: M(() => [(b(), i(t, {
732
- include: k(p),
733
- max: k(m)
734
- }, [(b(), i(E(e), { key: r.path }))], 1032, ["include", "max"]))]),
735
- _: 2
736
- }, 1032, ["name"])]),
737
- _: 1
738
- })])]),
739
- _: 1
740
- }), O.value ? w(r.$slots, "footer", {}, void 0, void 0, 0) : a("", !0)]),
741
- _: 3
742
- }),
743
- k(F).currentSecondMenus.value.length > 0 ? (b(), o("div", {
744
- key: 0,
745
- class: g(["sidebar-toggle", [k(h) ? "dark-theme" : "light-theme", { active: !I.value }]]),
746
- onClick: L,
747
- role: "button",
748
- tabindex: "0",
749
- "aria-expanded": !I.value,
750
- onKeydown: [N(L, ["enter"]), N(P(L, ["prevent"]), ["space"])]
751
- }, [s("span", { class: g([
752
- "collapse-arrow",
753
- "toggle-icon",
754
- I.value ? "collapsed" : "expanded"
755
- ]) }, [...c[2] ||= [s("span", { class: "arrow-line" }, null, -1), s("span", { class: "arrow-line" }, null, -1)]], 2)], 42, xt)) : a("", !0),
756
- k(F).currentSecondMenus.value.length > 0 ? (b(), o("div", {
757
- key: 1,
758
- class: g(["right-sidebar-wrapper", { collapsed: I.value }])
759
- }, [s("div", { class: g(["right-sidebar", [k(h) ? "dark-theme" : "light-theme"]]) }, [s("div", { class: g(["sidebar-header", [k(h) ? "dark-theme" : "light-theme"]]) }, [s("div", St, [k(F).activeFirstMenuItem.value?.meta?.icon ? (b(), i(E(k(R)), {
760
- key: 0,
761
- name: k(F).activeFirstMenuItem.value.meta.icon,
762
- size: 20
763
- }, null, 8, ["name"])) : a("", !0)]), s("span", Ct, D(k(F).activeFirstMenuItem.value?.meta?.title || "菜单"), 1)], 2), s("div", wt, [(b(!0), o(e, null, C(k(F).currentSecondMenus.value, (t) => (b(), o(e, { key: t.path }, [t.children && t.children.length > 0 ? (b(), o("div", Tt, [s("div", Et, [t.meta?.icon ? (b(), i(E(k(R)), {
764
- key: 0,
765
- name: t.meta.icon,
766
- size: 16
767
- }, null, 8, ["name"])) : a("", !0), s("span", null, D(t.meta?.title), 1)]), (b(!0), o(e, null, C(t.children, (e) => (b(), o("div", {
768
- key: e.path,
769
- class: g(["menu-item sub-item", { active: k(F).isMenuItemActive(e.path) }]),
770
- role: "button",
771
- tabindex: e.disabled ? -1 : 0,
772
- "aria-disabled": e.disabled || void 0,
773
- "aria-current": k(F).isMenuItemActive(e.path) ? "page" : void 0,
774
- onClick: (t) => k(F).handleSecondMenuClick(e),
775
- onKeydown: [N((t) => k(F).handleSecondMenuClick(e), ["enter"]), N(P((t) => k(F).handleSecondMenuClick(e), ["prevent"]), ["space"])]
776
- }, [e.meta?.icon ? (b(), i(E(k(R)), {
777
- key: 0,
778
- name: e.meta.icon,
779
- size: 16
780
- }, null, 8, ["name"])) : a("", !0), s("span", Ot, D(e.meta?.title), 1)], 42, Dt))), 128))])) : (b(), o("div", {
781
- key: 1,
782
- class: g(["menu-item", { active: k(F).isMenuItemActive(t.path) }]),
783
- role: "button",
784
- tabindex: t.disabled ? -1 : 0,
785
- "aria-disabled": t.disabled || void 0,
786
- "aria-current": k(F).isMenuItemActive(t.path) ? "page" : void 0,
787
- onClick: (e) => k(F).handleSecondMenuClick(t),
788
- onKeydown: [N((e) => k(F).handleSecondMenuClick(t), ["enter"]), N(P((e) => k(F).handleSecondMenuClick(t), ["prevent"]), ["space"])]
789
- }, [t.meta?.icon ? (b(), i(E(k(R)), {
790
- key: 0,
791
- name: t.meta.icon,
792
- size: 18
793
- }, null, 8, ["name"])) : a("", !0), s("span", At, D(t.meta?.title), 1)], 42, kt))], 64))), 128))])], 2)], 2)) : a("", !0)
794
- ])
795
- ]);
796
- };
797
- }
798
- }), Mt = { class: "card-layout-container" }, Nt = { class: "navbar-left" }, Pt = { class: "logo-container" }, Ft = [
799
- "src",
800
- "width",
801
- "height"
802
- ], It = [
803
- "src",
804
- "width",
805
- "height",
806
- "alt"
807
- ], Lt = { class: "brand-name" }, Rt = { class: "brand-title" }, zt = { class: "brand-subtitle" }, Bt = { class: "drawer-content" }, Vt = { class: "menu-grid" }, Ht = [
808
- "tabindex",
809
- "aria-disabled",
810
- "onClick",
811
- "onKeydown"
812
- ], Ut = {
813
- key: 0,
814
- class: "category-items"
815
- }, Wt = [
816
- "tabindex",
817
- "aria-disabled",
818
- "onClick",
819
- "onKeydown"
820
- ], Gt = { class: "item-title" }, Kt = {
821
- key: 0,
822
- class: "submenu-items"
823
- }, qt = { class: "submenu-title" }, Jt = [
824
- "tabindex",
825
- "aria-disabled",
826
- "onClick",
827
- "onKeydown"
828
- ], Yt = { class: "item-title" }, Xt = { class: "main-content-area" }, Zt = { class: "page-content" }, Qt = /* @__PURE__ */ Q(/* @__PURE__ */ d({
829
- name: "CardLayout",
830
- __name: "index",
831
- setup(c) {
832
- let l = Y(), { cachedViews: p, maxCacheCount: m } = Z(), h = q(), v = l.isDark, x = r(() => l.menus.value), O = r(() => l.showTagsView.value), A = r(() => l.tagsViewHeight.value), j = r(() => l.showFooter.value), F = r(() => l.transitionName.value), I = {
833
- ...X,
834
- ...l.brand
835
- }, L = S(!1), R = S(null), z = () => {
836
- R.value && clearTimeout(R.value), R.value = setTimeout(() => {
837
- L.value = !1;
838
- }, 300);
839
- }, B = () => {
840
- R.value &&= (clearTimeout(R.value), null), L.value = !0;
841
- }, U = (e) => {
842
- !e.disabled && e.path && (h.push(e.path), L.value = !1);
843
- }, ee = l.iconComponent ?? d({
844
- name: "LayoutIcon",
845
- props: {
846
- name: String,
847
- size: {
848
- type: Number,
849
- default: 18
850
- }
851
- },
852
- setup(e) {
853
- return () => f("i", {
854
- class: e.name,
855
- style: {
856
- fontSize: `${e.size}px`,
857
- display: "inline-flex",
858
- alignItems: "center",
859
- justifyContent: "center"
860
- }
861
- });
862
- }
863
- });
864
- return y(() => {
865
- R.value && clearTimeout(R.value);
866
- }), (r, c) => {
867
- let l = T("RouterView");
868
- return b(), o("div", Mt, [
869
- s("div", { class: g(["top-navbar", [k(v) ? "dark-theme" : "light-theme"]]) }, [s("div", Nt, [s("div", {
870
- class: "hover-trigger-area",
871
- onMouseenter: B,
872
- onMouseleave: z
873
- }, [w(r.$slots, "menu-trigger", {}, () => [c[0] ||= s("div", { class: "menu-indicator" }, [s("span", { class: "hamburger-icon" }, [
874
- s("span"),
875
- s("span"),
876
- s("span")
877
- ])], -1)], !0)], 32), w(r.$slots, "logo", {}, () => [
878
- s("div", Pt, [c[1] ||= s("div", { class: "logo-glow" }, null, -1), I.logoType === "video" && I.logoSrc ? (b(), o("video", {
879
- key: 0,
880
- src: I.logoSrc,
881
- width: I.logoSize || 36,
882
- height: I.logoSize || 36,
883
- autoplay: "",
884
- loop: "",
885
- muted: "",
886
- playsinline: "",
887
- class: "logo-video"
888
- }, " 您的浏览器不支持 video 标签。 ", 8, Ft)) : I.logoSrc ? (b(), o("img", {
889
- key: 1,
890
- src: I.logoSrc,
891
- width: I.logoSize || 36,
892
- height: I.logoSize || 36,
893
- class: "logo-video",
894
- alt: I.name || "Logo"
895
- }, null, 8, It)) : a("", !0)]),
896
- s("div", Lt, [s("span", Rt, D(I.name), 1), s("span", zt, D(I.subtitle), 1)]),
897
- c[2] ||= s("div", { class: "navbar-divider" }, null, -1)
898
- ], !0)]), w(r.$slots, "header-extra", {}, void 0, !0)], 2),
899
- O.value ? (b(), o("div", {
900
- key: 0,
901
- class: "tags-view-container",
902
- style: _({ height: `${A.value}px` })
903
- }, [w(r.$slots, "tags-view", {}, void 0, !0)], 4)) : a("", !0),
904
- s("div", {
905
- class: g(["drawer-menu", [k(v) ? "dark-theme" : "light-theme", { visible: L.value }]]),
906
- onMouseenter: B,
907
- onMouseleave: z
908
- }, [w(r.$slots, "drawer-menu", {}, () => [c[3] ||= s("div", { class: "drawer-header" }, [s("div", { class: "drawer-title" }, [s("span", { class: "grid-icon" }, [
909
- s("span"),
910
- s("span"),
911
- s("span"),
912
- s("span")
913
- ]), s("span", null, "功能导航")])], -1), s("div", Bt, [s("div", Vt, [(b(!0), o(e, null, C(x.value, (t) => (b(), o("div", {
914
- key: t.path,
915
- class: "menu-category"
916
- }, [s("div", {
917
- class: "category-header",
918
- role: "link",
919
- tabindex: t.disabled ? -1 : 0,
920
- "aria-disabled": t.disabled || void 0,
921
- onClick: (e) => U(t),
922
- onKeydown: [N((e) => U(t), ["enter"]), N(P((e) => U(t), ["prevent"]), ["space"])]
923
- }, [t.meta?.icon ? (b(), i(E(k(ee)), {
924
- key: 0,
925
- name: t.meta.icon,
926
- size: 18
927
- }, null, 8, ["name"])) : a("", !0), s("span", null, D(t.meta?.title), 1)], 40, Ht), t.children && t.children.length > 0 ? (b(), o("div", Ut, [(b(!0), o(e, null, C(t.children, (e) => (b(), o("div", {
928
- key: e.path,
929
- class: "menu-item",
930
- role: "link",
931
- tabindex: e.disabled ? -1 : 0,
932
- "aria-disabled": e.disabled || void 0,
933
- onClick: (t) => U(e),
934
- onKeydown: [N((t) => U(e), ["enter"]), N(P((t) => U(e), ["prevent"]), ["space"])]
935
- }, [e.meta?.icon ? (b(), i(E(k(ee)), {
936
- key: 0,
937
- name: e.meta.icon,
938
- size: 16
939
- }, null, 8, ["name"])) : a("", !0), s("span", Gt, D(e.meta?.title), 1)], 40, Wt))), 128)), (b(!0), o(e, null, C(t.children, (t) => (b(), o(e, { key: "sub-" + t.path }, [t.children && t.children.length > 0 ? (b(), o("div", Kt, [s("div", qt, D(t.meta?.title), 1), (b(!0), o(e, null, C(t.children, (e) => (b(), o("div", {
940
- key: e.path,
941
- class: "menu-item submenu-item",
942
- role: "link",
943
- tabindex: e.disabled ? -1 : 0,
944
- "aria-disabled": e.disabled || void 0,
945
- onClick: (t) => U(e),
946
- onKeydown: [N((t) => U(e), ["enter"]), N(P((t) => U(e), ["prevent"]), ["space"])]
947
- }, [e.meta?.icon ? (b(), i(E(k(ee)), {
948
- key: 0,
949
- name: e.meta.icon,
950
- size: 14
951
- }, null, 8, ["name"])) : a("", !0), s("span", Yt, D(e.meta?.title), 1)], 40, Jt))), 128))])) : a("", !0)], 64))), 128))])) : a("", !0)]))), 128))])])], !0)], 34),
952
- s("div", Xt, [u(k(V), { class: "content-layout" }, {
953
- default: M(() => [u(k(H), { class: "main-content p16px app-content" }, {
954
- default: M(() => [s("div", Zt, [u(l, null, {
955
- default: M(({ Component: e, route: r }) => [u(n, {
956
- name: F.value,
957
- mode: "out-in"
958
- }, {
959
- default: M(() => [(b(), i(t, {
960
- include: k(p),
961
- max: k(m)
962
- }, [(b(), i(E(e), { key: r.path }))], 1032, ["include", "max"]))]),
963
- _: 2
964
- }, 1032, ["name"])]),
965
- _: 1
966
- })])]),
967
- _: 1
968
- }), j.value ? w(r.$slots, "footer", {}, void 0, !0, 0) : a("", !0)]),
969
- _: 3
970
- })])
971
- ]);
972
- };
973
- }
974
- }), [["__scopeId", "data-v-c5ad8728"]]), $t = {
975
- key: 6,
976
- class: "layout-coming-soon"
977
- }, en = /* @__PURE__ */ d({
978
- name: "C_LayoutContainer",
979
- __name: "index",
980
- setup(e) {
981
- let t = Y(), n = t.layoutMode, a = t.isDark, l = S(!1), u = r({
982
- get: () => t.collapsed?.value ?? l.value,
983
- set: (e) => {
984
- t.collapsed ? t.collapsed.value = e : l.value = e;
985
- }
986
- }), d = {
987
- isCollapsed: u,
988
- handleCollapsedChange: (e) => {
989
- u.value = e;
990
- }
991
- };
992
- return x(le, d), x("menuCollapse", d), (e, t) => (b(), o("div", { class: g(["layout-container", k(a) ? "dark-mode" : "light-mode"]) }, [k(n) === "side" ? (b(), i(pe, {
993
- key: 0,
994
- collapsed: u.value,
995
- "onUpdate:collapsed": t[0] ||= (e) => u.value = e
996
- }, c({
997
- menu: M(() => [w(e.$slots, "menu", { collapsed: u.value })]),
998
- header: M(() => [w(e.$slots, "header")]),
999
- footer: M(() => [w(e.$slots, "footer")]),
1000
- _: 2
1001
- }, [e.$slots.logo ? {
1002
- name: "logo",
1003
- fn: M(() => [w(e.$slots, "logo")]),
1004
- key: "0"
1005
- } : void 0]), 1032, ["collapsed"])) : k(n) === "top" ? (b(), i(Oe, { key: 1 }, c({ _: 2 }, [
1006
- e.$slots.logo ? {
1007
- name: "logo",
1008
- fn: M(() => [w(e.$slots, "logo")]),
1009
- key: "0"
1010
- } : void 0,
1011
- e.$slots["top-menu"] ? {
1012
- name: "menu",
1013
- fn: M(() => [w(e.$slots, "top-menu")]),
1014
- key: "1"
1015
- } : void 0,
1016
- e.$slots["header-extra"] ? {
1017
- name: "header-extra",
1018
- fn: M(() => [w(e.$slots, "header-extra")]),
1019
- key: "2"
1020
- } : void 0,
1021
- e.$slots["tags-view"] ? {
1022
- name: "tags-view",
1023
- fn: M(() => [w(e.$slots, "tags-view")]),
1024
- key: "3"
1025
- } : void 0,
1026
- e.$slots.footer ? {
1027
- name: "footer",
1028
- fn: M(() => [w(e.$slots, "footer")]),
1029
- key: "4"
1030
- } : void 0
1031
- ]), 1024)) : k(n) === "mix" ? (b(), i(Ke, { key: 2 }, c({
1032
- header: M(() => [w(e.$slots, "header")]),
1033
- _: 2
1034
- }, [e.$slots.logo ? {
1035
- name: "logo",
1036
- fn: M(() => [w(e.$slots, "logo")]),
1037
- key: "0"
1038
- } : void 0, e.$slots.footer ? {
1039
- name: "footer",
1040
- fn: M(() => [w(e.$slots, "footer")]),
1041
- key: "1"
1042
- } : void 0]), 1024)) : k(n) === "mix-top" ? (b(), i(lt, { key: 3 }, c({ _: 2 }, [
1043
- e.$slots.logo ? {
1044
- name: "logo",
1045
- fn: M(() => [w(e.$slots, "logo")]),
1046
- key: "0"
1047
- } : void 0,
1048
- e.$slots.brand ? {
1049
- name: "brand",
1050
- fn: M(() => [w(e.$slots, "brand")]),
1051
- key: "1"
1052
- } : void 0,
1053
- e.$slots["top-menu"] ? {
1054
- name: "top-menu",
1055
- fn: M(() => [w(e.$slots, "top-menu")]),
1056
- key: "2"
1057
- } : void 0,
1058
- e.$slots["header-extra"] ? {
1059
- name: "header-extra",
1060
- fn: M(() => [w(e.$slots, "header-extra")]),
1061
- key: "3"
1062
- } : void 0,
1063
- e.$slots["tags-view"] ? {
1064
- name: "tags-view",
1065
- fn: M(() => [w(e.$slots, "tags-view")]),
1066
- key: "4"
1067
- } : void 0,
1068
- e.$slots.footer ? {
1069
- name: "footer",
1070
- fn: M(() => [w(e.$slots, "footer")]),
1071
- key: "5"
1072
- } : void 0
1073
- ]), 1024)) : k(n) === "reverse-horizontal-mix" ? (b(), i(jt, { key: 4 }, c({ _: 2 }, [
1074
- e.$slots.logo ? {
1075
- name: "logo",
1076
- fn: M(() => [w(e.$slots, "logo")]),
1077
- key: "0"
1078
- } : void 0,
1079
- e.$slots["top-menu"] ? {
1080
- name: "top-menu",
1081
- fn: M(() => [w(e.$slots, "top-menu")]),
1082
- key: "1"
1083
- } : void 0,
1084
- e.$slots["header-extra"] ? {
1085
- name: "header-extra",
1086
- fn: M(() => [w(e.$slots, "header-extra")]),
1087
- key: "2"
1088
- } : void 0,
1089
- e.$slots["tags-view"] ? {
1090
- name: "tags-view",
1091
- fn: M(() => [w(e.$slots, "tags-view")]),
1092
- key: "3"
1093
- } : void 0,
1094
- e.$slots.footer ? {
1095
- name: "footer",
1096
- fn: M(() => [w(e.$slots, "footer")]),
1097
- key: "4"
1098
- } : void 0
1099
- ]), 1024)) : k(n) === "card-layout" ? (b(), i(Qt, { key: 5 }, c({ _: 2 }, [
1100
- e.$slots["menu-trigger"] ? {
1101
- name: "menu-trigger",
1102
- fn: M(() => [w(e.$slots, "menu-trigger")]),
1103
- key: "0"
1104
- } : void 0,
1105
- e.$slots.logo ? {
1106
- name: "logo",
1107
- fn: M(() => [w(e.$slots, "logo")]),
1108
- key: "1"
1109
- } : void 0,
1110
- e.$slots["header-extra"] ? {
1111
- name: "header-extra",
1112
- fn: M(() => [w(e.$slots, "header-extra")]),
1113
- key: "2"
1114
- } : void 0,
1115
- e.$slots["tags-view"] ? {
1116
- name: "tags-view",
1117
- fn: M(() => [w(e.$slots, "tags-view")]),
1118
- key: "3"
1119
- } : void 0,
1120
- e.$slots["drawer-menu"] ? {
1121
- name: "drawer-menu",
1122
- fn: M(() => [w(e.$slots, "drawer-menu")]),
1123
- key: "4"
1124
- } : void 0,
1125
- e.$slots.footer ? {
1126
- name: "footer",
1127
- fn: M(() => [w(e.$slots, "footer")]),
1128
- key: "5"
1129
- } : void 0
1130
- ]), 1024)) : (b(), o("div", $t, [...t[1] ||= [s("div", { class: "coming-soon-content" }, [s("div", { class: "coming-soon-icon" }, "🚧"), s("div", { class: "coming-soon-title" }, "布局开发中")], -1)]]))], 2));
1131
- }
1132
- }), tn = [
1133
- {
1134
- name: "拂晓蓝",
1135
- value: "#409eff"
1136
- },
1137
- {
1138
- name: "薄暮红",
1139
- value: "#f5222d"
1140
- },
1141
- {
1142
- name: "火山橙",
1143
- value: "#fa541c"
1144
- },
1145
- {
1146
- name: "日暮黄",
1147
- value: "#faad14"
1148
- },
1149
- {
1150
- name: "极光绿",
1151
- value: "#52c41a"
1152
- },
1153
- {
1154
- name: "明青",
1155
- value: "#13c2c2"
1156
- },
1157
- {
1158
- name: "极客蓝",
1159
- value: "#2f54eb"
1160
- },
1161
- {
1162
- name: "酱紫",
1163
- value: "#722ed1"
1164
- }
1165
- ], nn = [
1166
- {
1167
- name: "科技蓝",
1168
- icon: "💙",
1169
- primaryColor: "#409eff"
1170
- },
1171
- {
1172
- name: "清新绿",
1173
- icon: "💚",
1174
- primaryColor: "#52c41a"
1175
- },
1176
- {
1177
- name: "商务灰",
1178
- icon: "🖤",
1179
- primaryColor: "#595959"
1180
- },
1181
- {
1182
- name: "活力橙",
1183
- icon: "🧡",
1184
- primaryColor: "#fa8c16"
1185
- },
1186
- {
1187
- name: "优雅紫",
1188
- icon: "💜",
1189
- primaryColor: "#722ed1"
1190
- },
1191
- {
1192
- name: "经典红",
1193
- icon: "❤️",
1194
- primaryColor: "#f5222d"
1195
- }
1196
- ], rn = [
1197
- {
1198
- mode: "side",
1199
- label: "左侧菜单",
1200
- description: "经典的左侧导航布局",
1201
- icon: "i-mdi:page-layout-sidebar-left"
1202
- },
1203
- {
1204
- mode: "top",
1205
- label: "顶部菜单",
1206
- description: "顶部水平导航布局",
1207
- icon: "i-mdi:page-layout-header"
1208
- },
1209
- {
1210
- mode: "mix",
1211
- label: "混合菜单",
1212
- description: "顶部 + 侧边混合布局",
1213
- icon: "i-mdi:view-dashboard-outline"
1214
- },
1215
- {
1216
- mode: "mix-top",
1217
- label: "顶部混合",
1218
- description: "侧边优先的混合布局",
1219
- icon: "i-mdi:view-dashboard-variant-outline"
1220
- },
1221
- {
1222
- mode: "reverse-horizontal-mix",
1223
- label: "反转混合",
1224
- description: "反转的水平混合布局",
1225
- icon: "i-mdi:page-layout-header-footer"
1226
- },
1227
- {
1228
- mode: "card-layout",
1229
- label: "卡片布局",
1230
- description: "卡片式布局风格",
1231
- icon: "i-mdi:card-outline"
1232
- }
1233
- ], an = {
1234
- small: "4px",
1235
- medium: "6px",
1236
- large: "8px"
1237
- }, on = {
1238
- fade: "fade-transform",
1239
- slide: "fade-slide",
1240
- zoom: "fade-zoom",
1241
- none: ""
1242
- }, $ = {
1243
- themeMode: "light",
1244
- primaryColor: "#409eff",
1245
- borderRadius: "medium",
1246
- transitionType: "slide",
1247
- enableTransition: !0,
1248
- layoutMode: "side",
1249
- menuExpandMode: "inline",
1250
- collapsed: !1,
1251
- fixedHeader: !0,
1252
- showBreadcrumb: !0,
1253
- showBreadcrumbIcon: !0,
1254
- showTagsView: !0,
1255
- tagsViewHeight: 44,
1256
- tagsViewStyle: "default",
1257
- showFooter: !0,
1258
- sidebarWidth: 220,
1259
- sidebarCollapsedWidth: 64,
1260
- headerHeight: 56,
1261
- enableHotkeys: !0,
1262
- version: "3.0.0"
1263
- }, sn = tn.map((e) => e.value), cn = {
1264
- themeMode: new Set([
1265
- "light",
1266
- "dark",
1267
- "system"
1268
- ]),
1269
- borderRadius: new Set([
1270
- "small",
1271
- "medium",
1272
- "large"
1273
- ]),
1274
- transitionType: new Set([
1275
- "fade",
1276
- "slide",
1277
- "zoom",
1278
- "none"
1279
- ]),
1280
- layoutMode: new Set([
1281
- "side",
1282
- "top",
1283
- "mix",
1284
- "mix-top",
1285
- "reverse-horizontal-mix",
1286
- "card-layout"
1287
- ]),
1288
- menuExpandMode: new Set(["inline", "panel"]),
1289
- tagsViewStyle: new Set([
1290
- "default",
1291
- "card",
1292
- "smart"
1293
- ])
1294
- }, ln = new Set([
1295
- "enableTransition",
1296
- "collapsed",
1297
- "fixedHeader",
1298
- "showBreadcrumb",
1299
- "showBreadcrumbIcon",
1300
- "showTagsView",
1301
- "showFooter",
1302
- "enableHotkeys"
1303
- ]), un = {
1304
- tagsViewHeight: [24, 100],
1305
- sidebarWidth: [120, 480],
1306
- sidebarCollapsedWidth: [32, 160],
1307
- headerHeight: [32, 160]
1308
- }, dn = 1;
1309
- function fn(e) {
1310
- if (!e || typeof e != "object" || Array.isArray(e)) throw TypeError("settings 必须是对象");
1311
- let t = e, n = {}, r = (e, t) => {
1312
- n[e] = t;
1313
- };
1314
- for (let [e, n] of Object.entries(cn)) {
1315
- let i = t[e];
1316
- if (i !== void 0) {
1317
- if (typeof i != "string" || !n.has(i)) throw RangeError(`无效的设置项 ${e}: ${String(i)}`);
1318
- r(e, i);
1319
- }
1320
- }
1321
- for (let e of ln) {
1322
- let n = t[e];
1323
- if (n !== void 0) {
1324
- if (typeof n != "boolean") throw TypeError(`设置项 ${e} 必须是布尔值`);
1325
- r(e, n);
1326
- }
1327
- }
1328
- for (let [e, n] of Object.entries(un)) {
1329
- let i = t[e];
1330
- if (i !== void 0) {
1331
- if (typeof i != "number" || !Number.isFinite(i) || i < n[0] || i > n[1]) throw RangeError(`设置项 ${e} 超出允许范围`);
1332
- r(e, i);
1333
- }
1334
- }
1335
- if (t.primaryColor !== void 0) {
1336
- if (typeof t.primaryColor != "string" || !/^#[0-9a-fA-F]{6}$/.test(t.primaryColor)) throw RangeError("primaryColor 必须是 #rrggbb 格式");
1337
- n.primaryColor = t.primaryColor;
1338
- }
1339
- if (t.version !== void 0) {
1340
- if (typeof t.version != "string" || t.version.length > 50) throw TypeError("version 必须是长度不超过 50 的字符串");
1341
- n.version = t.version;
1342
- }
1343
- return n;
1344
- }
1345
- function pn(e) {
1346
- if (!e || typeof e != "object" || Array.isArray(e)) throw TypeError("配置文件根节点必须是对象");
1347
- let t = e, n = {};
1348
- if (t.schemaVersion !== void 0) {
1349
- if (typeof t.schemaVersion != "number" || !Number.isInteger(t.schemaVersion) || t.schemaVersion < 1 || t.schemaVersion > 1) throw RangeError("不支持的配置格式版本");
1350
- n.schemaVersion = t.schemaVersion;
1351
- }
1352
- t.settings !== void 0 && (n.settings = fn(t.settings));
1353
- for (let e of ["gray", "colorWeak"]) {
1354
- let r = t[e];
1355
- if (r !== void 0) {
1356
- if (typeof r != "boolean") throw TypeError(`${e} 必须是布尔值`);
1357
- n[e] = r;
1358
- }
1359
- }
1360
- if (t.watermark !== void 0) {
1361
- if (!t.watermark || typeof t.watermark != "object" || Array.isArray(t.watermark)) throw TypeError("watermark 必须是对象");
1362
- let e = t.watermark;
1363
- if (typeof e.enabled != "boolean" || typeof e.text != "string" || e.text.length > 200) throw TypeError("watermark 配置无效");
1364
- n.watermark = {
1365
- enabled: e.enabled,
1366
- text: e.text
1367
- };
1368
- }
1369
- return n;
1370
- }
1371
- function mn(e, t) {
1372
- if (typeof e != "string") return "#000000";
1373
- if (!Number.isFinite(t)) return e;
1374
- let n = Math.round(t), r = e.trim(), i = r.startsWith("#") ? r.slice(1) : r;
1375
- if (i.length === 3 && (i = i.split("").map((e) => e + e).join("")), !/^[0-9a-fA-F]{6}$/.test(i)) return e;
1376
- let a = parseInt(i, 16), o = Math.min(255, Math.max(0, (a >> 16) + n)), s = Math.min(255, Math.max(0, (a >> 8 & 255) + n)), c = Math.min(255, Math.max(0, (a & 255) + n));
1377
- return `#${(o << 16 | s << 8 | c).toString(16).padStart(6, "0")}`;
1378
- }
1379
- //#endregion
1380
- //#region src/stores/settings.ts
1381
- function hn(e = {}) {
1382
- let { id: t = "settings", defaults: n = {}, onThemeModeChange: i } = e;
1383
- if (typeof t != "string" || !t.trim()) throw RangeError("Settings store id 不能为空");
1384
- let a = {
1385
- ...$,
1386
- ...fn(n)
1387
- };
1388
- return se(t, () => {
1389
- let e = S(a.themeMode), t = S(a.primaryColor), n = S(a.borderRadius), o = S(a.transitionType), s = S(a.enableTransition), c = S(a.layoutMode), l = S(a.menuExpandMode), u = S(a.collapsed), d = S(a.fixedHeader), f = S(a.showBreadcrumb), p = S(a.showBreadcrumbIcon), m = S(a.showTagsView), h = S(a.tagsViewHeight), g = S(a.tagsViewStyle), _ = S(a.showFooter), v = S(a.sidebarWidth), y = S(a.sidebarCollapsedWidth), b = S(a.headerHeight), x = S(a.enableHotkeys), C = S(a.version), w = r(() => an[n.value]), T = r(() => s.value && o.value !== "none"), E = r(() => T.value ? on[o.value] : ""), D = r(() => ({
1390
- themeMode: e.value,
1391
- primaryColor: t.value,
1392
- borderRadius: n.value,
1393
- transitionType: o.value,
1394
- enableTransition: s.value,
1395
- layoutMode: c.value,
1396
- menuExpandMode: l.value,
1397
- collapsed: u.value,
1398
- fixedHeader: d.value,
1399
- showBreadcrumb: f.value,
1400
- showBreadcrumbIcon: p.value,
1401
- showTagsView: m.value,
1402
- tagsViewHeight: h.value,
1403
- tagsViewStyle: g.value,
1404
- showFooter: _.value,
1405
- sidebarWidth: v.value,
1406
- sidebarCollapsedWidth: y.value,
1407
- headerHeight: b.value,
1408
- enableHotkeys: x.value,
1409
- version: C.value
1410
- })), O = () => {
1411
- if (typeof document > "u") return;
1412
- let e = document.documentElement;
1413
- e.style.setProperty("--primary-color", t.value), e.style.setProperty("--primary-color-hover", mn(t.value, 10)), e.style.setProperty("--primary-color-pressed", mn(t.value, -10)), e.style.setProperty("--border-radius", w.value), e.style.setProperty("--sidebar-width", `${v.value}px`), e.style.setProperty("--sidebar-collapsed-width", `${y.value}px`), e.style.setProperty("--header-height", `${b.value}px`), e.style.setProperty("--tags-view-height", `${h.value}px`);
1414
- };
1415
- return j([
1416
- t,
1417
- w,
1418
- v,
1419
- y,
1420
- b,
1421
- h
1422
- ], () => {
1423
- O();
1424
- }, { immediate: !0 }), {
1425
- themeMode: e,
1426
- primaryColor: t,
1427
- borderRadius: n,
1428
- transitionType: o,
1429
- enableTransition: s,
1430
- layoutMode: c,
1431
- menuExpandMode: l,
1432
- collapsed: u,
1433
- fixedHeader: d,
1434
- showBreadcrumb: f,
1435
- showBreadcrumbIcon: p,
1436
- showTagsView: m,
1437
- tagsViewHeight: h,
1438
- tagsViewStyle: g,
1439
- showFooter: _,
1440
- sidebarWidth: v,
1441
- sidebarCollapsedWidth: y,
1442
- headerHeight: b,
1443
- enableHotkeys: x,
1444
- version: C,
1445
- borderRadiusValue: w,
1446
- transitionName: E,
1447
- shouldEnableTransition: T,
1448
- settingsState: D,
1449
- syncCSSVariables: O,
1450
- applyPreset: async (e) => {
1451
- t.value = e.primaryColor, e.settings && (e.settings.borderRadius && (n.value = e.settings.borderRadius), e.settings.transitionType && (o.value = e.settings.transitionType), e.settings.showBreadcrumb !== void 0 && (f.value = e.settings.showBreadcrumb), e.settings.showTagsView !== void 0 && (m.value = e.settings.showTagsView), e.settings.tagsViewStyle && (g.value = e.settings.tagsViewStyle));
1452
- },
1453
- resetSettings: () => {
1454
- e.value = a.themeMode, t.value = a.primaryColor, n.value = a.borderRadius, o.value = a.transitionType, s.value = a.enableTransition, c.value = a.layoutMode, l.value = a.menuExpandMode, u.value = a.collapsed, d.value = a.fixedHeader, f.value = a.showBreadcrumb, p.value = a.showBreadcrumbIcon, m.value = a.showTagsView, h.value = a.tagsViewHeight, g.value = a.tagsViewStyle, _.value = a.showFooter, v.value = a.sidebarWidth, y.value = a.sidebarCollapsedWidth, b.value = a.headerHeight, x.value = a.enableHotkeys, C.value = a.version;
1455
- },
1456
- updateThemeMode: async (t) => {
1457
- fn({ themeMode: t });
1458
- let n = e.value;
1459
- e.value = t;
1460
- try {
1461
- i && await i(t);
1462
- } catch (t) {
1463
- throw e.value = n, t;
1464
- }
1465
- },
1466
- toggleCollapse: () => {
1467
- u.value = !u.value;
1468
- }
1469
- };
1470
- });
1471
- }
1472
- var gn = hn(), _n = [
1473
- {
1474
- label: "左侧菜单(默认)",
1475
- value: "side",
1476
- disabled: !1,
1477
- svg: "\n <rect x=\"0\" y=\"0\" width=\"16\" height=\"48\" rx=\"1\" fill=\"currentColor\" fill-opacity=\"0.9\"/>\n <rect x=\"18\" y=\"0\" width=\"38\" height=\"10\" rx=\"1\" fill=\"currentColor\" fill-opacity=\"0.7\"/>\n <rect x=\"18\" y=\"12\" width=\"38\" height=\"34\" rx=\"1\" fill=\"currentColor\" fill-opacity=\"0.4\"/>\n "
1478
- },
1479
- {
1480
- label: "顶部菜单(清爽)",
1481
- value: "top",
1482
- disabled: !1,
1483
- svg: "\n <rect x=\"0\" y=\"0\" width=\"56\" height=\"10\" rx=\"1\" fill=\"currentColor\" fill-opacity=\"0.9\"/>\n <rect x=\"0\" y=\"12\" width=\"56\" height=\"8\" rx=\"1\" fill=\"currentColor\" fill-opacity=\"0.7\"/>\n <rect x=\"0\" y=\"22\" width=\"56\" height=\"24\" rx=\"1\" fill=\"currentColor\" fill-opacity=\"0.4\"/>\n "
1484
- },
1485
- {
1486
- label: "左侧混合(灵巧)",
1487
- value: "mix",
1488
- disabled: !1,
1489
- svg: "\n <rect x=\"0\" y=\"0\" width=\"8\" height=\"48\" rx=\"1\" fill=\"currentColor\" fill-opacity=\"0.9\"/>\n <rect x=\"10\" y=\"0\" width=\"14\" height=\"48\" rx=\"1\" fill=\"currentColor\" fill-opacity=\"0.7\"/>\n <rect x=\"26\" y=\"0\" width=\"30\" height=\"10\" rx=\"1\" fill=\"currentColor\" fill-opacity=\"0.6\"/>\n <rect x=\"26\" y=\"12\" width=\"30\" height=\"34\" rx=\"1\" fill=\"currentColor\" fill-opacity=\"0.4\"/>\n "
1490
- },
1491
- {
1492
- label: "顶部混合(侧优)",
1493
- value: "mix-top",
1494
- disabled: !1,
1495
- svg: "\n <rect x=\"0\" y=\"0\" width=\"8\" height=\"48\" rx=\"1\" fill=\"currentColor\" fill-opacity=\"0.9\"/>\n <rect x=\"10\" y=\"0\" width=\"46\" height=\"10\" rx=\"1\" fill=\"currentColor\" fill-opacity=\"0.7\"/>\n <rect x=\"10\" y=\"12\" width=\"46\" height=\"34\" rx=\"1\" fill=\"currentColor\" fill-opacity=\"0.4\"/>\n "
1496
- },
1497
- {
1498
- label: "反转混合(另类)",
1499
- value: "reverse-horizontal-mix",
1500
- disabled: !1,
1501
- svg: "\n <rect x=\"0\" y=\"0\" width=\"56\" height=\"10\" rx=\"1\" fill=\"currentColor\" fill-opacity=\"0.9\"/>\n <rect x=\"44\" y=\"12\" width=\"12\" height=\"34\" rx=\"1\" fill=\"currentColor\" fill-opacity=\"0.7\"/>\n <rect x=\"0\" y=\"12\" width=\"42\" height=\"34\" rx=\"1\" fill=\"currentColor\" fill-opacity=\"0.4\"/>\n "
1502
- },
1503
- {
1504
- label: "卡片网格(新颖)",
1505
- value: "card-layout",
1506
- disabled: !1,
1507
- svg: "\n <rect x=\"0\" y=\"0\" width=\"24\" height=\"20\" rx=\"2\" fill=\"currentColor\" fill-opacity=\"0.9\"/>\n <rect x=\"32\" y=\"0\" width=\"24\" height=\"20\" rx=\"2\" fill=\"currentColor\" fill-opacity=\"0.7\"/>\n <rect x=\"0\" y=\"24\" width=\"24\" height=\"20\" rx=\"2\" fill=\"currentColor\" fill-opacity=\"0.6\"/>\n <rect x=\"32\" y=\"24\" width=\"24\" height=\"20\" rx=\"2\" fill=\"currentColor\" fill-opacity=\"0.4\"/>\n "
1508
- }
1509
- ], vn = { class: "settings-section" }, yn = { class: "preset-grid" }, bn = [
1510
- "aria-pressed",
1511
- "onClick",
1512
- "onKeydown"
1513
- ], xn = { class: "preset-icon" }, Sn = { class: "preset-name" }, Cn = { class: "preset-color" }, wn = { class: "settings-section" }, Tn = { class: "settings-section" }, En = { class: "color-picker-wrapper" }, Dn = { class: "color-value" }, On = { class: "settings-section" }, kn = { class: "settings-section" }, An = { class: "flex items-center justify-between mb-2" }, jn = { class: "settings-section" }, Mn = { class: "settings-section" }, Nn = { class: "layout-grid" }, Pn = [
1514
- "tabindex",
1515
- "aria-disabled",
1516
- "aria-pressed",
1517
- "onClick",
1518
- "onKeydown"
1519
- ], Fn = { class: "layout-screenshot" }, In = {
1520
- class: "layout-svg",
1521
- viewBox: "0 0 56 48",
1522
- fill: "none",
1523
- xmlns: "http://www.w3.org/2000/svg"
1524
- }, Ln = ["innerHTML"], Rn = { class: "layout-label" }, zn = {
1525
- key: 0,
1526
- class: "badge-soon"
1527
- }, Bn = {
1528
- class: "settings-section menu-expand-section",
1529
- "data-menu-expand-mode": "built-in"
1530
- }, Vn = { class: "settings-section" }, Hn = { class: "setting-item" }, Un = { class: "setting-item" }, Wn = { class: "setting-item" }, Gn = { class: "setting-item" }, Kn = { class: "settings-section" }, qn = { class: "slider-item" }, Jn = { class: "slider-label" }, Yn = { class: "slider-value" }, Xn = { class: "slider-item" }, Zn = { class: "slider-label" }, Qn = { class: "slider-value" }, $n = { class: "settings-section" }, er = { class: "settings-section" }, tr = { class: "action-buttons-grid" }, nr = { class: "settings-section" }, rr = { class: "action-buttons-grid" }, ir = { class: "settings-section" }, ar = { class: "setting-item" }, or = { class: "setting-item" }, sr = { class: "settings-section" }, cr = { class: "setting-item" }, lr = {
1531
- key: 0,
1532
- class: "mt-2"
1533
- }, ur = { class: "settings-section" }, dr = { class: "system-info" }, fr = { class: "info-item" }, pr = { class: "info-value" }, mr = { class: "info-item" }, hr = { class: "info-value" }, gr = { class: "info-item" }, _r = { class: "info-value" }, vr = { class: "info-item" }, yr = { class: "info-value" }, br = { class: "info-item" }, xr = { class: "info-value" }, Sr = { class: "info-item" }, Cr = { class: "info-value" }, wr = /* @__PURE__ */ Q(/* @__PURE__ */ d({
1534
- __name: "index",
1535
- props: /* @__PURE__ */ m({
1536
- width: { default: 380 },
1537
- store: {},
1538
- actions: {},
1539
- maxImportBytes: { default: 1024 * 1024 }
1540
- }, {
1541
- show: {
1542
- type: Boolean,
1543
- default: !1
1544
- },
1545
- showModifiers: {}
1546
- }),
1547
- emits: ["update:show"],
1548
- setup(t) {
1549
- let n = t, c = oe(), d = ae(), f = p(ce, null), m = n.store ?? f ?? gn(), h = A(t, "show"), v = S("appearance"), x = typeof document < "u" && document.documentElement.classList.contains("gray-mode"), T = typeof document < "u" && document.documentElement.classList.contains("color-weak-mode"), E = S(x), O = S(T), z = S(!1), V = S("Robot Admin"), H = null, U = (e) => {
1550
- if (typeof document > "u") return;
1551
- H &&= (H.remove(), null);
1552
- let t = document.createElement("canvas"), n = t.getContext("2d");
1553
- if (!n) {
1554
- c.error("当前浏览器无法创建水印画布");
1555
- return;
1556
- }
1557
- t.width = 200, t.height = 150, n.font = "14px Microsoft JhengHei", n.fillStyle = "rgba(120, 120, 120, 0.15)", n.rotate(-20 * Math.PI / 180), n.fillText(e, 0, 80), H = document.createElement("div"), H.dataset.robotAdminLayoutWatermark = "true", H.style.cssText = `
1558
- position: fixed;
1559
- top: 0;
1560
- left: 0;
1561
- width: 100%;
1562
- height: 100%;
1563
- pointer-events: none;
1564
- background-image: url(${t.toDataURL()});
1565
- background-repeat: repeat;
1566
- z-index: 9999;
1567
- user-select: none;
1568
- `, document.body.appendChild(H);
1569
- }, ee = () => {
1570
- H &&= (H.remove(), null);
1571
- };
1572
- j(E, (e) => {
1573
- typeof document < "u" && document.documentElement.classList.toggle("gray-mode", e);
1574
- }), j(O, (e) => {
1575
- typeof document < "u" && document.documentElement.classList.toggle("color-weak-mode", e);
1576
- }), j(z, (e) => {
1577
- e ? U(V.value) : ee();
1578
- }), j(V, (e) => {
1579
- z.value && U(e);
1580
- });
1581
- let K = r(() => {
1582
- if (typeof navigator > "u" || typeof window > "u") return {
1583
- browser: "Unknown",
1584
- os: "Unknown",
1585
- resolution: "Unknown",
1586
- pixelRatio: "Unknown",
1587
- language: "Unknown",
1588
- timezone: "Unknown"
1589
- };
1590
- let e = navigator.userAgent, t = "Unknown", n = "Unknown";
1591
- return e.includes("Edg/") ? t = "Edge" : e.includes("Firefox") ? t = "Firefox" : e.includes("Chrome") ? t = "Chrome" : e.includes("Safari") && (t = "Safari"), e.includes("Windows") ? n = "Windows" : e.includes("Mac") ? n = "macOS" : e.includes("Android") ? n = "Android" : e.includes("iOS") ? n = "iOS" : e.includes("Linux") && (n = "Linux"), {
1592
- browser: t,
1593
- os: n,
1594
- resolution: `${window.screen.width} × ${window.screen.height}`,
1595
- pixelRatio: window.devicePixelRatio + "x",
1596
- language: navigator.language,
1597
- timezone: Intl.DateTimeFormat().resolvedOptions().timeZone
1598
- };
1599
- });
1600
- y(() => {
1601
- ee(), typeof document < "u" && (document.documentElement.classList.toggle("gray-mode", x), document.documentElement.classList.toggle("color-weak-mode", T));
1602
- });
1603
- let q = (e, t) => {
1604
- t || (m.layoutMode = e);
1605
- }, se = (e) => m.primaryColor === e.primaryColor, J = (e) => {
1606
- m.applyPreset(e), c.success(`已应用「${e.name}」主题方案`);
1607
- }, le = async (e) => {
1608
- try {
1609
- await m.updateThemeMode(e);
1610
- } catch {
1611
- c.error("主题模式切换失败");
1612
- }
1613
- }, ue = async () => {
1614
- try {
1615
- await m.updateThemeMode($.themeMode), m.primaryColor = $.primaryColor, m.borderRadius = $.borderRadius, m.transitionType = $.transitionType, m.enableTransition = $.enableTransition, c.success("已恢复外观默认设置");
1616
- } catch {
1617
- c.error("恢复外观默认设置失败");
1618
- }
1619
- }, Y = () => {
1620
- m.layoutMode = $.layoutMode, m.menuExpandMode = $.menuExpandMode, m.fixedHeader = $.fixedHeader, m.showBreadcrumb = $.showBreadcrumb, m.showBreadcrumbIcon = $.showBreadcrumbIcon, m.showTagsView = $.showTagsView, m.tagsViewHeight = $.tagsViewHeight, m.tagsViewStyle = $.tagsViewStyle, m.showFooter = $.showFooter, m.sidebarWidth = $.sidebarWidth, m.sidebarCollapsedWidth = $.sidebarCollapsedWidth, m.headerHeight = $.headerHeight, c.success("已恢复布局默认设置");
1621
- }, de = () => {
1622
- d.warning({
1623
- title: "确认重置",
1624
- content: "确定要恢复默认配置吗?此操作不可撤销。",
1625
- positiveText: "确认",
1626
- negativeText: "取消",
1627
- onPositiveClick: async () => {
1628
- let e = { ...m.settingsState };
1629
- try {
1630
- m.resetSettings(), await m.updateThemeMode(m.themeMode), c.success("已恢复默认配置");
1631
- } catch {
1632
- m.$patch(e), c.error("恢复默认配置失败");
1633
- }
1634
- }
1635
- });
1636
- }, X = () => {
1637
- d.warning({
1638
- title: "确认清除",
1639
- content: "确定要清除浏览器缓存吗?",
1640
- positiveText: "确认",
1641
- negativeText: "取消",
1642
- onPositiveClick: async () => {
1643
- if (!n.actions?.clearCache) {
1644
- c.warning("宿主应用未配置可安全清理的缓存");
1645
- return;
1646
- }
1647
- try {
1648
- await n.actions.clearCache(), c.success("缓存已清除");
1649
- } catch {
1650
- c.error("缓存清除失败");
1651
- }
1652
- }
1653
- });
1654
- }, fe = () => {
1655
- n.actions?.reloadPage ? n.actions.reloadPage() : typeof window < "u" && window.location.reload();
1656
- }, Z = () => {
1657
- let e = {
1658
- schemaVersion: 1,
1659
- settings: m.settingsState,
1660
- gray: E.value,
1661
- colorWeak: O.value,
1662
- watermark: {
1663
- enabled: z.value,
1664
- text: V.value
1665
- },
1666
- exportTime: (/* @__PURE__ */ new Date()).toISOString()
1667
- }, t = new Blob([JSON.stringify(e, null, 2)], { type: "application/json" }), n = URL.createObjectURL(t), r = document.createElement("a");
1668
- r.href = n, r.download = `robot-admin-config-${Date.now()}.json`, r.click(), URL.revokeObjectURL(n), c.success("配置已导出");
1669
- }, pe = () => {
1670
- if (typeof document > "u") return;
1671
- let e = document.createElement("input");
1672
- e.type = "file", e.accept = "application/json", e.onchange = async (e) => {
1673
- let t = e.target.files?.[0];
1674
- if (t) try {
1675
- if (t.size > n.maxImportBytes) throw RangeError("配置文件过大");
1676
- let e = await t.text(), r = pn(JSON.parse(e));
1677
- if (r.settings !== void 0) {
1678
- let { themeMode: e, ...t } = r.settings;
1679
- e !== void 0 && await m.updateThemeMode(e), m.$patch(t);
1680
- }
1681
- r.gray !== void 0 && (E.value = r.gray), r.colorWeak !== void 0 && (O.value = r.colorWeak), r.watermark !== void 0 && (z.value = r.watermark.enabled, V.value = r.watermark.text), c.success("配置已导入");
1682
- } catch {
1683
- c.error("配置文件格式错误");
1684
- }
1685
- }, e.click();
1686
- };
1687
- return (n, r) => (b(), i(k(L), {
1688
- show: h.value,
1689
- "onUpdate:show": r[16] ||= (e) => h.value = e,
1690
- width: t.width,
1691
- placement: "right",
1692
- "trap-focus": !0,
1693
- "block-scroll": !0
1694
- }, {
1695
- default: M(() => [u(k(R), {
1696
- title: "⚙️ 布局配置",
1697
- closable: ""
1698
- }, {
1699
- default: M(() => [u(k(ie), {
1700
- value: v.value,
1701
- "onUpdate:value": r[15] ||= (e) => v.value = e,
1702
- animated: "",
1703
- class: "settings-tabs"
1704
- }, {
1705
- default: M(() => [
1706
- u(k(re), {
1707
- name: "appearance",
1708
- tab: "🎨 外观"
1709
- }, {
1710
- default: M(() => [
1711
- w(n.$slots, "appearance-prepend", { settings: k(m) }, void 0, !0),
1712
- s("div", vn, [s("div", yn, [(b(!0), o(e, null, C(k(nn), (e) => (b(), o("div", {
1713
- key: e.name,
1714
- class: g(["preset-card", { active: se(e) }]),
1715
- role: "button",
1716
- tabindex: "0",
1717
- "aria-pressed": se(e),
1718
- onClick: (t) => J(e),
1719
- onKeydown: [N((t) => J(e), ["enter"]), N(P((t) => J(e), ["prevent"]), ["space"])]
1720
- }, [
1721
- s("div", xn, D(e.icon), 1),
1722
- s("div", Sn, D(e.name), 1),
1723
- s("div", Cn, [s("span", {
1724
- class: "color-dot",
1725
- style: _({ backgroundColor: e.primaryColor })
1726
- }, null, 4)])
1727
- ], 42, bn))), 128))])]),
1728
- s("div", wn, [r[20] ||= s("div", { class: "section-title" }, "主题模式", -1), u(k(te), {
1729
- value: k(m).themeMode,
1730
- class: "mode-group",
1731
- "onUpdate:value": le
1732
- }, {
1733
- default: M(() => [
1734
- u(k(W), { value: "light" }, {
1735
- default: M(() => [...r[17] ||= [s("span", { class: "i-mdi:white-balance-sunny mr-1" }, null, -1), l(" 浅色 ", -1)]]),
1736
- _: 1
1737
- }),
1738
- u(k(W), { value: "dark" }, {
1739
- default: M(() => [...r[18] ||= [s("span", { class: "i-mdi:moon-waning-crescent mr-1" }, null, -1), l(" 深色 ", -1)]]),
1740
- _: 1
1741
- }),
1742
- u(k(W), { value: "system" }, {
1743
- default: M(() => [...r[19] ||= [s("span", { class: "i-mdi:theme-light-dark mr-1" }, null, -1), l(" 自动 ", -1)]]),
1744
- _: 1
1745
- })
1746
- ]),
1747
- _: 1
1748
- }, 8, ["value"])]),
1749
- s("div", Tn, [r[21] ||= s("div", { class: "section-title" }, "主题色", -1), s("div", En, [u(k(I), {
1750
- value: k(m).primaryColor,
1751
- "onUpdate:value": r[0] ||= (e) => k(m).primaryColor = e,
1752
- "show-alpha": !1,
1753
- swatches: k(sn),
1754
- actions: ["confirm"]
1755
- }, null, 8, ["value", "swatches"]), s("span", Dn, D(k(m).primaryColor), 1)])]),
1756
- s("div", On, [r[25] ||= s("div", { class: "section-title" }, "圆角大小", -1), u(k(te), {
1757
- value: k(m).borderRadius,
1758
- "onUpdate:value": r[1] ||= (e) => k(m).borderRadius = e,
1759
- class: "radius-group"
1760
- }, {
1761
- default: M(() => [
1762
- u(k(W), { value: "small" }, {
1763
- default: M(() => [...r[22] ||= [l("小 (4px)", -1)]]),
1764
- _: 1
1765
- }),
1766
- u(k(W), { value: "medium" }, {
1767
- default: M(() => [...r[23] ||= [l("中 (6px)", -1)]]),
1768
- _: 1
1769
- }),
1770
- u(k(W), { value: "large" }, {
1771
- default: M(() => [...r[24] ||= [l("大 (8px)", -1)]]),
1772
- _: 1
1773
- })
1774
- ]),
1775
- _: 1
1776
- }, 8, ["value"])]),
1777
- s("div", kn, [
1778
- r[31] ||= s("div", { class: "section-title" }, "页面动画", -1),
1779
- s("div", An, [r[26] ||= s("span", { class: "text-sm" }, "启用动画", -1), u(k(G), {
1780
- value: k(m).enableTransition,
1781
- "onUpdate:value": r[2] ||= (e) => k(m).enableTransition = e
1782
- }, null, 8, ["value"])]),
1783
- u(k(te), {
1784
- value: k(m).transitionType,
1785
- "onUpdate:value": r[3] ||= (e) => k(m).transitionType = e,
1786
- disabled: !k(m).enableTransition,
1787
- class: "transition-group"
1788
- }, {
1789
- default: M(() => [
1790
- u(k(W), { value: "fade" }, {
1791
- default: M(() => [...r[27] ||= [l("淡入", -1)]]),
1792
- _: 1
1793
- }),
1794
- u(k(W), { value: "slide" }, {
1795
- default: M(() => [...r[28] ||= [l("滑动", -1)]]),
1796
- _: 1
1797
- }),
1798
- u(k(W), { value: "zoom" }, {
1799
- default: M(() => [...r[29] ||= [l("缩放", -1)]]),
1800
- _: 1
1801
- }),
1802
- u(k(W), { value: "none" }, {
1803
- default: M(() => [...r[30] ||= [l("无", -1)]]),
1804
- _: 1
1805
- })
1806
- ]),
1807
- _: 1
1808
- }, 8, ["value", "disabled"])
1809
- ]),
1810
- s("div", jn, [u(k(F), {
1811
- block: "",
1812
- secondary: "",
1813
- onClick: ue
1814
- }, {
1815
- icon: M(() => [...r[32] ||= [s("span", { class: "i-mdi:restore" }, null, -1)]]),
1816
- default: M(() => [r[33] ||= l(" 恢复外观默认设置 ", -1)]),
1817
- _: 1
1818
- })]),
1819
- w(n.$slots, "appearance-append", { settings: k(m) }, void 0, !0)
1820
- ]),
1821
- _: 3
1822
- }),
1823
- u(k(re), {
1824
- name: "layout",
1825
- tab: "📐 布局"
1826
- }, {
1827
- default: M(() => [
1828
- w(n.$slots, "layout-prepend", { settings: k(m) }, void 0, !0),
1829
- s("div", Mn, [r[34] ||= s("div", { class: "section-title" }, "布局模式", -1), s("div", Nn, [(b(!0), o(e, null, C(k(_n), (e) => (b(), o("div", {
1830
- key: e.value,
1831
- class: g(["layout-item", {
1832
- active: k(m).layoutMode === e.value,
1833
- disabled: e.disabled
1834
- }]),
1835
- role: "button",
1836
- tabindex: e.disabled ? -1 : 0,
1837
- "aria-disabled": e.disabled,
1838
- "aria-pressed": k(m).layoutMode === e.value,
1839
- onClick: P((t) => q(e.value, e.disabled), ["stop"]),
1840
- onKeydown: [N(P((t) => q(e.value, e.disabled), ["stop"]), ["enter"]), N(P((t) => q(e.value, e.disabled), ["stop", "prevent"]), ["space"])]
1841
- }, [s("div", Fn, [(b(), o("svg", In, [s("g", { innerHTML: e.svg }, null, 8, Ln)]))]), s("div", Rn, [l(D(e.label) + " ", 1), e.disabled ? (b(), o("span", zn, "敬请期待")) : a("", !0)])], 42, Pn))), 128))])]),
1842
- w(n.$slots, "layout-after-mode", { settings: k(m) }, void 0, !0),
1843
- s("div", Bn, [r[37] ||= s("div", { class: "section-title" }, "菜单展开方式", -1), u(k(te), {
1844
- value: k(m).menuExpandMode,
1845
- "onUpdate:value": r[4] ||= (e) => k(m).menuExpandMode = e,
1846
- class: "menu-expand-group"
1847
- }, {
1848
- default: M(() => [u(k(W), { value: "inline" }, {
1849
- default: M(() => [...r[35] ||= [l("传统展开", -1)]]),
1850
- _: 1
1851
- }), u(k(W), { value: "panel" }, {
1852
- default: M(() => [...r[36] ||= [l("右侧面板", -1)]]),
1853
- _: 1
1854
- })]),
1855
- _: 1
1856
- }, 8, ["value"])]),
1857
- s("div", Vn, [
1858
- r[42] ||= s("div", { class: "section-title" }, "界面元素", -1),
1859
- s("div", Hn, [r[38] ||= s("span", null, "显示面包屑", -1), u(k(G), {
1860
- value: k(m).showBreadcrumb,
1861
- "onUpdate:value": r[5] ||= (e) => k(m).showBreadcrumb = e
1862
- }, null, 8, ["value"])]),
1863
- s("div", Un, [r[39] ||= s("span", null, "显示面包屑图标", -1), u(k(G), {
1864
- value: k(m).showBreadcrumbIcon,
1865
- "onUpdate:value": r[6] ||= (e) => k(m).showBreadcrumbIcon = e,
1866
- disabled: !k(m).showBreadcrumb
1867
- }, null, 8, ["value", "disabled"])]),
1868
- s("div", Wn, [r[40] ||= s("span", null, "显示标签页", -1), u(k(G), {
1869
- value: k(m).showTagsView,
1870
- "onUpdate:value": r[7] ||= (e) => k(m).showTagsView = e
1871
- }, null, 8, ["value"])]),
1872
- s("div", Gn, [r[41] ||= s("span", null, "显示页脚", -1), u(k(G), {
1873
- value: k(m).showFooter,
1874
- "onUpdate:value": r[8] ||= (e) => k(m).showFooter = e
1875
- }, null, 8, ["value"])])
1876
- ]),
1877
- s("div", Kn, [
1878
- r[45] ||= s("div", { class: "section-title" }, "尺寸调整", -1),
1879
- s("div", qn, [s("div", Jn, [r[43] ||= s("span", null, "侧边栏宽度", -1), s("span", Yn, D(k(m).sidebarWidth) + "px", 1)]), u(k(ne), {
1880
- value: k(m).sidebarWidth,
1881
- "onUpdate:value": r[9] ||= (e) => k(m).sidebarWidth = e,
1882
- min: 180,
1883
- max: 280,
1884
- step: 10,
1885
- marks: {
1886
- 180: "180",
1887
- 220: "220",
1888
- 280: "280"
1889
- }
1890
- }, null, 8, ["value"])]),
1891
- s("div", Xn, [s("div", Zn, [r[44] ||= s("span", null, "头部高度", -1), s("span", Qn, D(k(m).headerHeight) + "px", 1)]), u(k(ne), {
1892
- value: k(m).headerHeight,
1893
- "onUpdate:value": r[10] ||= (e) => k(m).headerHeight = e,
1894
- min: 48,
1895
- max: 64,
1896
- step: 4,
1897
- marks: {
1898
- 48: "48",
1899
- 56: "56",
1900
- 64: "64"
1901
- }
1902
- }, null, 8, ["value"])])
1903
- ]),
1904
- s("div", $n, [u(k(F), {
1905
- block: "",
1906
- secondary: "",
1907
- onClick: Y
1908
- }, {
1909
- icon: M(() => [...r[46] ||= [s("span", { class: "i-mdi:restore" }, null, -1)]]),
1910
- default: M(() => [r[47] ||= l(" 恢复布局默认设置 ", -1)]),
1911
- _: 1
1912
- })]),
1913
- w(n.$slots, "layout-append", { settings: k(m) }, void 0, !0)
1914
- ]),
1915
- _: 3
1916
- }),
1917
- u(k(re), {
1918
- name: "features",
1919
- tab: "🔧 功能"
1920
- }, {
1921
- default: M(() => [
1922
- w(n.$slots, "features-prepend", { settings: k(m) }, void 0, !0),
1923
- s("div", er, [r[52] ||= s("div", { class: "section-title" }, "缓存管理", -1), s("div", tr, [u(k(F), {
1924
- secondary: "",
1925
- onClick: X
1926
- }, {
1927
- icon: M(() => [...r[48] ||= [s("span", { class: "i-mdi:delete-sweep" }, null, -1)]]),
1928
- default: M(() => [r[49] ||= l(" 清除缓存 ", -1)]),
1929
- _: 1
1930
- }), u(k(F), {
1931
- secondary: "",
1932
- onClick: fe
1933
- }, {
1934
- icon: M(() => [...r[50] ||= [s("span", { class: "i-mdi:refresh" }, null, -1)]]),
1935
- default: M(() => [r[51] ||= l(" 重新加载 ", -1)]),
1936
- _: 1
1937
- })])]),
1938
- s("div", nr, [
1939
- r[59] ||= s("div", { class: "section-title" }, "配置管理", -1),
1940
- s("div", rr, [u(k(F), {
1941
- secondary: "",
1942
- onClick: Z
1943
- }, {
1944
- icon: M(() => [...r[53] ||= [s("span", { class: "i-mdi:download" }, null, -1)]]),
1945
- default: M(() => [r[54] ||= l(" 导出配置 ", -1)]),
1946
- _: 1
1947
- }), u(k(F), {
1948
- secondary: "",
1949
- onClick: pe
1950
- }, {
1951
- icon: M(() => [...r[55] ||= [s("span", { class: "i-mdi:upload" }, null, -1)]]),
1952
- default: M(() => [r[56] ||= l(" 导入配置 ", -1)]),
1953
- _: 1
1954
- })]),
1955
- u(k(F), {
1956
- block: "",
1957
- type: "error",
1958
- secondary: "",
1959
- class: "mt-2",
1960
- onClick: de
1961
- }, {
1962
- icon: M(() => [...r[57] ||= [s("span", { class: "i-mdi:restore" }, null, -1)]]),
1963
- default: M(() => [r[58] ||= l(" 重置所有配置 ", -1)]),
1964
- _: 1
1965
- })
1966
- ]),
1967
- s("div", ir, [
1968
- r[62] ||= s("div", { class: "section-title" }, "系统模式", -1),
1969
- s("div", ar, [r[60] ||= s("div", { class: "setting-label" }, [s("span", null, "灰色模式"), s("span", { class: "setting-desc" }, "用于哀悼日场景")], -1), u(k(G), {
1970
- value: E.value,
1971
- "onUpdate:value": r[11] ||= (e) => E.value = e
1972
- }, null, 8, ["value"])]),
1973
- s("div", or, [r[61] ||= s("div", { class: "setting-label" }, [s("span", null, "色弱模式"), s("span", { class: "setting-desc" }, "提供无障碍访问支持")], -1), u(k(G), {
1974
- value: O.value,
1975
- "onUpdate:value": r[12] ||= (e) => O.value = e
1976
- }, null, 8, ["value"])])
1977
- ]),
1978
- s("div", sr, [
1979
- r[64] ||= s("div", { class: "section-title" }, "水印设置", -1),
1980
- s("div", cr, [r[63] ||= s("span", null, "启用水印", -1), u(k(G), {
1981
- value: z.value,
1982
- "onUpdate:value": r[13] ||= (e) => z.value = e
1983
- }, null, 8, ["value"])]),
1984
- z.value ? (b(), o("div", lr, [u(k(B), {
1985
- value: V.value,
1986
- "onUpdate:value": r[14] ||= (e) => V.value = e,
1987
- placeholder: "请输入水印内容",
1988
- size: "small"
1989
- }, null, 8, ["value"])])) : a("", !0)
1990
- ]),
1991
- s("div", ur, [r[71] ||= s("div", { class: "section-title" }, "系统信息", -1), s("div", dr, [
1992
- s("div", fr, [r[65] ||= s("span", { class: "info-label" }, "浏览器", -1), s("span", pr, D(K.value.browser), 1)]),
1993
- s("div", mr, [r[66] ||= s("span", { class: "info-label" }, "操作系统", -1), s("span", hr, D(K.value.os), 1)]),
1994
- s("div", gr, [r[67] ||= s("span", { class: "info-label" }, "屏幕分辨率", -1), s("span", _r, D(K.value.resolution), 1)]),
1995
- s("div", vr, [r[68] ||= s("span", { class: "info-label" }, "设备像素比", -1), s("span", yr, D(K.value.pixelRatio), 1)]),
1996
- s("div", br, [r[69] ||= s("span", { class: "info-label" }, "语言", -1), s("span", xr, D(K.value.language), 1)]),
1997
- s("div", Sr, [r[70] ||= s("span", { class: "info-label" }, "时区", -1), s("span", Cr, D(K.value.timezone), 1)])
1998
- ])]),
1999
- w(n.$slots, "features-append", { settings: k(m) }, void 0, !0)
2000
- ]),
2001
- _: 3
2002
- })
2003
- ]),
2004
- _: 3
2005
- }, 8, ["value"])]),
2006
- _: 3
2007
- })]),
2008
- _: 3
2009
- }, 8, ["show", "width"]));
2010
- }
2011
- }), [["__scopeId", "data-v-c78e9ba9"]]), Tr = { class: "brand-logo__icon" }, Er = [
2012
- "src",
2013
- "width",
2014
- "height"
2015
- ], Dr = [
2016
- "src",
2017
- "width",
2018
- "height"
2019
- ], Or = { class: "brand-logo__name" }, kr = { class: "brand-logo__title" }, Ar = {
2020
- key: 0,
2021
- class: "brand-logo__subtitle"
2022
- }, jr = {
2023
- key: 0,
2024
- class: "brand-logo__divider"
2025
- }, Mr = /* @__PURE__ */ Q(/* @__PURE__ */ d({
2026
- name: "BrandLogo",
2027
- __name: "index",
2028
- props: {
2029
- showName: {
2030
- type: Boolean,
2031
- default: !1
2032
- },
2033
- showDivider: {
2034
- type: Boolean,
2035
- default: !1
2036
- },
2037
- size: { default: 36 },
2038
- collapsed: {
2039
- type: Boolean,
2040
- default: !1
2041
- },
2042
- variant: { default: "horizontal" }
2043
- },
2044
- setup(t) {
2045
- let n = Y(), r = {
2046
- ...X,
2047
- ...n.brand
2048
- };
2049
- return (n, i) => (b(), o("div", { class: g(["brand-logo", {
2050
- "brand-logo--collapsed": t.collapsed,
2051
- "brand-logo--horizontal": t.variant === "horizontal"
2052
- }]) }, [s("div", Tr, [i[0] ||= s("div", { class: "brand-logo__glow" }, null, -1), r.logoType === "video" && r.logoSrc ? (b(), o("video", {
2053
- key: 0,
2054
- src: r.logoSrc,
2055
- width: t.size,
2056
- height: t.size,
2057
- autoplay: "",
2058
- loop: "",
2059
- muted: "",
2060
- playsinline: "",
2061
- class: "brand-logo__media"
2062
- }, null, 8, Er)) : r.logoSrc ? (b(), o("img", {
2063
- key: 1,
2064
- src: r.logoSrc,
2065
- width: t.size,
2066
- height: t.size,
2067
- class: "brand-logo__media",
2068
- alt: "Logo"
2069
- }, null, 8, Dr)) : a("", !0)]), t.showName && !t.collapsed ? (b(), o(e, { key: 0 }, [s("div", Or, [s("span", kr, D(r.name), 1), r.subtitle ? (b(), o("span", Ar, D(r.subtitle), 1)) : a("", !0)]), t.showDivider ? (b(), o("div", jr)) : a("", !0)], 64)) : a("", !0)], 2));
2070
- }
2071
- }), [["__scopeId", "data-v-fd1c2eec"]]), Nr = { class: "icon-menu" }, Pr = ["onClick"], Fr = { class: "icon-menu__icon" }, Ir = {
2072
- key: 1,
2073
- class: "icon-menu__fallback"
2074
- }, Lr = { class: "icon-menu__label" }, Rr = /* @__PURE__ */ Q(/* @__PURE__ */ d({
2075
- name: "IconMenu",
2076
- __name: "index",
2077
- props: {
2078
- menus: {},
2079
- active: {}
2080
- },
2081
- emits: ["click"],
2082
- setup(t, { emit: n }) {
2083
- let r = n, a = Y();
2084
- return (n, c) => (b(), o("div", Nr, [(b(!0), o(e, null, C(t.menus, (e) => (b(), o("div", {
2085
- key: e.path,
2086
- class: g(["icon-menu__item", { "icon-menu__item--active": t.active === e.path }]),
2087
- onClick: (t) => r("click", e)
2088
- }, [s("div", Fr, [k(a).iconComponent && e.meta?.icon ? (b(), i(E(k(a).iconComponent), {
2089
- key: 0,
2090
- name: e.meta.icon,
2091
- size: 20
2092
- }, null, 8, ["name"])) : (b(), o("span", Ir, D(e.meta?.title?.charAt(0) || "?"), 1))]), s("div", Lr, D(e.meta?.title), 1)], 10, Pr))), 128))]));
2093
- }
2094
- }), [["__scopeId", "data-v-f985d475"]]), zr = { class: "floating-menu__header" }, Br = { class: "floating-menu__brand" }, Vr = { class: "floating-menu__brand-title" }, Hr = { class: "floating-menu__brand-subtitle" }, Ur = { class: "floating-menu__list" }, Wr = {
2095
- key: 0,
2096
- class: "floating-menu__group"
2097
- }, Gr = { class: "floating-menu__group-title" }, Kr = ["onClick", "onKeydown"], qr = { class: "floating-menu__item-text" }, Jr = ["onClick", "onKeydown"], Yr = { class: "floating-menu__item-text" }, Xr = /* @__PURE__ */ Q(/* @__PURE__ */ d({
2098
- name: "FloatingMenu",
2099
- __name: "index",
2100
- props: {
2101
- show: { type: Boolean },
2102
- menuItem: {},
2103
- isActive: { type: Function }
2104
- },
2105
- emits: ["click"],
2106
- setup(t, { emit: r }) {
2107
- let c = r, l = Y(), u = {
2108
- ...X,
2109
- ...l.brand
2110
- };
2111
- return (r, d) => (b(), i(n, { name: "slide-fade" }, {
2112
- default: M(() => [t.show && t.menuItem ? (b(), o("div", {
2113
- key: 0,
2114
- class: g(["floating-menu", [k(l).isDark.value ? "dark-theme" : "light-theme"]]),
2115
- role: "navigation",
2116
- "aria-label": "二级功能导航"
2117
- }, [s("div", zr, [s("div", Br, [s("span", Vr, D(u.name), 1), s("span", Hr, D(u.subtitle), 1)])]), s("div", Ur, [(b(!0), o(e, null, C(t.menuItem.children, (n) => (b(), o(e, { key: n.path }, [n.children && n.children.length > 0 ? (b(), o("div", Wr, [s("div", Gr, [k(l).iconComponent && n.meta?.icon ? (b(), i(E(k(l).iconComponent), {
2118
- key: 0,
2119
- name: n.meta.icon,
2120
- size: 16
2121
- }, null, 8, ["name"])) : a("", !0), s("span", null, D(n.meta?.title), 1)]), (b(!0), o(e, null, C(n.children, (e) => (b(), o("div", {
2122
- key: e.path,
2123
- class: g(["floating-menu__item floating-menu__item--sub", { active: t.isActive?.(e.path) }]),
2124
- role: "link",
2125
- tabindex: "0",
2126
- onClick: (t) => c("click", e),
2127
- onKeydown: [N((t) => c("click", e), ["enter"]), N(P((t) => c("click", e), ["prevent"]), ["space"])]
2128
- }, [k(l).iconComponent && e.meta?.icon ? (b(), i(E(k(l).iconComponent), {
2129
- key: 0,
2130
- name: e.meta.icon,
2131
- size: 16
2132
- }, null, 8, ["name"])) : a("", !0), s("span", qr, D(e.meta?.title), 1)], 42, Kr))), 128))])) : (b(), o("div", {
2133
- key: 1,
2134
- class: g(["floating-menu__item", { active: t.isActive?.(n.path) }]),
2135
- role: "link",
2136
- tabindex: "0",
2137
- onClick: (e) => c("click", n),
2138
- onKeydown: [N((e) => c("click", n), ["enter"]), N(P((e) => c("click", n), ["prevent"]), ["space"])]
2139
- }, [k(l).iconComponent && n.meta?.icon ? (b(), i(E(k(l).iconComponent), {
2140
- key: 0,
2141
- name: n.meta.icon,
2142
- size: 18
2143
- }, null, 8, ["name"])) : a("", !0), s("span", Yr, D(n.meta?.title), 1)], 42, Jr))], 64))), 128))])], 2)) : a("", !0)]),
2144
- _: 1
2145
- }));
2146
- }
2147
- }), [["__scopeId", "data-v-3dc6f434"]]), Zr = { class: "side-menu__header" }, Qr = { class: "side-menu__header-icon" }, $r = { class: "side-menu__header-title" }, ei = { class: "side-menu__list" }, ti = {
2148
- key: 0,
2149
- class: "side-menu__group"
2150
- }, ni = { class: "side-menu__group-label" }, ri = ["onClick"], ii = { class: "side-menu__item-text" }, ai = ["onClick"], oi = { class: "side-menu__item-text" }, si = /* @__PURE__ */ Q(/* @__PURE__ */ d({
2151
- name: "SideMenu",
2152
- __name: "index",
2153
- props: {
2154
- menus: {},
2155
- activeItem: {},
2156
- isActive: { type: Function }
2157
- },
2158
- emits: ["click"],
2159
- setup(t, { emit: r }) {
2160
- let c = r, l = Y(), d = S(!1);
2161
- return (r, f) => t.menus.length > 0 ? (b(), o(e, { key: 0 }, [s("div", {
2162
- class: g(["side-menu-toggle", [k(l).isDark.value ? "dark-theme" : "light-theme", { active: !d.value }]]),
2163
- onClick: f[0] ||= (e) => d.value = !d.value
2164
- }, [s("i", { class: g(["toggle-icon", d.value ? "i-ri:side-bar-line" : "i-ri:arrow-right-s-line"]) }, null, 2)], 2), u(n, { name: "glass-slide" }, {
2165
- default: M(() => [d.value ? a("", !0) : (b(), o("div", {
2166
- key: 0,
2167
- class: g(["side-menu", [k(l).isDark.value ? "dark-theme" : "light-theme"]])
2168
- }, [s("div", Zr, [s("div", Qr, [k(l).iconComponent && t.activeItem?.meta?.icon ? (b(), i(E(k(l).iconComponent), {
2169
- key: 0,
2170
- name: t.activeItem.meta.icon,
2171
- size: 17
2172
- }, null, 8, ["name"])) : a("", !0)]), s("span", $r, D(t.activeItem?.meta?.title || "菜单"), 1)]), s("div", ei, [(b(!0), o(e, null, C(t.menus, (n) => (b(), o(e, { key: n.path }, [n.children && n.children.length > 0 ? (b(), o("div", ti, [s("div", ni, [k(l).iconComponent && n.meta?.icon ? (b(), i(E(k(l).iconComponent), {
2173
- key: 0,
2174
- name: n.meta.icon,
2175
- size: 14
2176
- }, null, 8, ["name"])) : a("", !0), s("span", null, D(n.meta?.title), 1)]), (b(!0), o(e, null, C(n.children, (e) => (b(), o("div", {
2177
- key: e.path,
2178
- class: g(["side-menu__item", { active: t.isActive?.(e.path) }]),
2179
- onClick: (t) => c("click", e)
2180
- }, [k(l).iconComponent && e.meta?.icon ? (b(), i(E(k(l).iconComponent), {
2181
- key: 0,
2182
- name: e.meta.icon,
2183
- size: 15
2184
- }, null, 8, ["name"])) : a("", !0), s("span", ii, D(e.meta?.title), 1)], 10, ri))), 128))])) : (b(), o("div", {
2185
- key: 1,
2186
- class: g(["side-menu__item", { active: t.isActive?.(n.path) }]),
2187
- onClick: (e) => c("click", n)
2188
- }, [k(l).iconComponent && n.meta?.icon ? (b(), i(E(k(l).iconComponent), {
2189
- key: 0,
2190
- name: n.meta.icon,
2191
- size: 16
2192
- }, null, 8, ["name"])) : a("", !0), s("span", oi, D(n.meta?.title), 1)], 10, ai))], 64))), 128))])], 2))]),
2193
- _: 1
2194
- })], 64)) : a("", !0);
2195
- }
2196
- }), [["__scopeId", "data-v-1909f229"]]), ci = ["aria-hidden"], li = { class: "drawer-menu__content" }, ui = { class: "drawer-menu__grid" }, di = ["onClick", "onKeydown"], fi = {
2197
- key: 0,
2198
- class: "drawer-menu__items"
2199
- }, pi = ["onClick", "onKeydown"], mi = { class: "drawer-menu__item-text" }, hi = {
2200
- key: 0,
2201
- class: "drawer-menu__sub-items"
2202
- }, gi = { class: "drawer-menu__sub-title" }, _i = ["onClick", "onKeydown"], vi = { class: "drawer-menu__item-text" }, yi = /* @__PURE__ */ Q(/* @__PURE__ */ d({
2203
- name: "DrawerMenu",
2204
- __name: "index",
2205
- props: {
2206
- menus: {},
2207
- show: { type: Boolean }
2208
- },
2209
- setup(t) {
2210
- let n = Y(), r = q(), c = p(ue, {
2211
- show: () => {},
2212
- startHide: () => {},
2213
- hide: () => {}
2214
- }), l = (e) => {
2215
- e.path && (r.push(e.path), c.hide());
2216
- };
2217
- return (r, u) => (b(), o("div", {
2218
- class: g(["drawer-menu", [k(n).isDark.value ? "dark-theme" : "light-theme", { visible: t.show }]]),
2219
- role: "navigation",
2220
- "aria-label": "功能导航",
2221
- "aria-hidden": !t.show,
2222
- onMouseenter: u[0] ||= (e) => k(c).show(),
2223
- onMouseleave: u[1] ||= (e) => k(c).startHide()
2224
- }, [u[2] ||= s("div", { class: "drawer-menu__header" }, [s("div", { class: "drawer-menu__title" }, [s("span", { class: "grid-icon" }, [
2225
- s("span"),
2226
- s("span"),
2227
- s("span"),
2228
- s("span")
2229
- ]), s("span", null, "功能导航")])], -1), s("div", li, [s("div", ui, [(b(!0), o(e, null, C(t.menus, (t) => (b(), o("div", {
2230
- key: t.path,
2231
- class: "drawer-menu__category"
2232
- }, [s("div", {
2233
- class: "drawer-menu__category-header",
2234
- role: "link",
2235
- tabindex: "0",
2236
- onClick: (e) => l(t),
2237
- onKeydown: [N((e) => l(t), ["enter"]), N(P((e) => l(t), ["prevent"]), ["space"])]
2238
- }, [k(n).iconComponent && t.meta?.icon ? (b(), i(E(k(n).iconComponent), {
2239
- key: 0,
2240
- name: t.meta.icon,
2241
- size: 18
2242
- }, null, 8, ["name"])) : a("", !0), s("span", null, D(t.meta?.title), 1)], 40, di), t.children && t.children.length > 0 ? (b(), o("div", fi, [(b(!0), o(e, null, C(t.children, (e) => (b(), o("div", {
2243
- key: e.path,
2244
- class: "drawer-menu__item",
2245
- role: "link",
2246
- tabindex: "0",
2247
- onClick: (t) => l(e),
2248
- onKeydown: [N((t) => l(e), ["enter"]), N(P((t) => l(e), ["prevent"]), ["space"])]
2249
- }, [k(n).iconComponent && e.meta?.icon ? (b(), i(E(k(n).iconComponent), {
2250
- key: 0,
2251
- name: e.meta.icon,
2252
- size: 16
2253
- }, null, 8, ["name"])) : a("", !0), s("span", mi, D(e.meta?.title), 1)], 40, pi))), 128)), (b(!0), o(e, null, C(t.children, (t) => (b(), o(e, { key: t.path }, [t.children && t.children.length > 0 ? (b(), o("div", hi, [s("div", gi, D(t.meta?.title), 1), (b(!0), o(e, null, C(t.children, (e) => (b(), o("div", {
2254
- key: e.path,
2255
- class: "drawer-menu__item drawer-menu__item--sub",
2256
- role: "link",
2257
- tabindex: "0",
2258
- onClick: (t) => l(e),
2259
- onKeydown: [N((t) => l(e), ["enter"]), N(P((t) => l(e), ["prevent"]), ["space"])]
2260
- }, [k(n).iconComponent && e.meta?.icon ? (b(), i(E(k(n).iconComponent), {
2261
- key: 0,
2262
- name: e.meta.icon,
2263
- size: 14
2264
- }, null, 8, ["name"])) : a("", !0), s("span", vi, D(e.meta?.title), 1)], 40, _i))), 128))])) : a("", !0)], 64))), 128))])) : a("", !0)]))), 128))])])], 42, ci));
2265
- }
2266
- }), [["__scopeId", "data-v-91d54a20"]]), bi = /* @__PURE__ */ Q(/* @__PURE__ */ d({
2267
- name: "MenuTrigger",
2268
- __name: "index",
2269
- props: { show: { type: Boolean } },
2270
- setup(e) {
2271
- let t = p(ue, {
2272
- show: () => {},
2273
- startHide: () => {},
2274
- hide: () => {}
2275
- });
2276
- return (e, n) => (b(), o("div", {
2277
- class: "menu-trigger",
2278
- onMouseenter: n[0] ||= (e) => k(t).show(),
2279
- onMouseleave: n[1] ||= (e) => k(t).startHide()
2280
- }, [...n[2] ||= [s("div", { class: "menu-trigger__indicator" }, [s("span", { class: "hamburger-icon" }, [
2281
- s("span"),
2282
- s("span"),
2283
- s("span")
2284
- ])], -1)]], 32));
2285
- }
2286
- }), [["__scopeId", "data-v-2c20af78"]]);
2287
- //#endregion
2288
- //#region src/setup.ts
2289
- function xi(e, t = {}) {
2290
- let n = hn(t), r = n();
2291
- return e.provide(ce, r), n;
2292
- }
2293
- //#endregion
2294
- export { an as BORDER_RADIUS_MAP, Mr as BrandLogo, sn as COLOR_SWATCHES, Qt as C_CardLayout, Qt as CardLayout, en as C_LayoutContainer, Ke as C_MixLayout, Ke as MixLayout, lt as C_MixTopLayout, lt as MixTopLayout, jt as C_ReverseHorizontalMixLayout, jt as ReverseHorizontalMixLayout, pe as C_SideLayout, pe as SideLayout, Oe as C_TopLayout, Oe as TopLayout, X as DEFAULT_BRAND_CONFIG, $ as DEFAULT_SETTINGS, ue as DRAWER_HANDLER_KEY, yi as DrawerMenu, Xr as FloatingMenu, Rr as IconMenu, J as LAYOUT_CONTEXT_KEY, rn as LAYOUT_MODES, ce as LAYOUT_SETTINGS_KEY, le as MENU_COLLAPSE_KEY, bi as MenuTrigger, tn as PRESET_COLORS, _e as ResponsiveMenu, dn as SETTINGS_CONFIG_SCHEMA_VERSION, wr as SettingsDrawer, si as SideMenu, nn as THEME_PRESETS, on as TRANSITION_MAP, mn as adjustColor, hn as createSettingsStore, de as provideLayoutContext, pn as sanitizeLayoutSettingsConfig, fn as sanitizeSettingsPatch, xi as setupLayout, fe as shouldCacheRoute, Z as useLayoutCache, Y as useLayoutContext, Ae as useMenuSplit, gn as useSettingsStore };
2295
-
2296
- //# sourceMappingURL=index.js.map
1
+ import { A as e, C as t, D as n, E as r, F as i, I as a, L as o, M as s, N as c, O as l, P as u, S as d, T as f, _ as p, a as m, b as h, c as g, d as _, f as v, g as y, h as b, i as x, j as S, k as C, l as w, m as T, n as E, o as D, p as O, r as k, s as A, t as j, u as M, v as N, w as P, x as F, y as I } from "./vue-BRQ1Fg0b.js";
2
+ import { _ as L, a as R, b as z, c as B, d as V, f as H, g as U, h as W, i as G, l as K, m as q, n as J, o as Y, p as X, r as Z, s as Q, t as $, u as ee, v as te, x as ne, y as re } from "./naive-Bd8pxcrF.js";
3
+ export { _ as BORDER_RADIUS_MAP, te as BrandLogo, v as COLOR_SWATCHES, $ as C_CardLayout, z as C_LayoutContainer, J as C_MixLayout, Z as C_MixTopLayout, G as C_ReverseHorizontalMixLayout, R as C_SideLayout, Y as C_TopLayout, Q as CardLayout, S as DEFAULT_BRAND_CONFIG, O as DEFAULT_SETTINGS, s as DRAWER_HANDLER_KEY, q as DrawerMenu, U as FloatingMenu, L as IconMenu, c as LAYOUT_CONTEXT_KEY, T as LAYOUT_MODES, u as LAYOUT_SETTINGS_KEY, j as LayoutActionUnavailableError, i as MENU_COLLAPSE_KEY, X as MenuTrigger, B as MixLayout, K as MixTopLayout, b as PRESET_COLORS, ne as ResponsiveMenu, ee as ReverseHorizontalMixLayout, N as SETTINGS_CONFIG_SCHEMA_VERSION, re as SettingsDrawer, V as SideLayout, W as SideMenu, y as THEME_PRESETS, p as TRANSITION_MAP, H as TopLayout, I as adjustColor, h as assertLayoutSettingsRelationships, w as bindLayoutCssVariables, r as calculateVisibleMenuCount, k as createLayoutContext, A as createSettingsStore, n as estimateMenuItemWidth, P as isPathSegmentPrefix, m as normalizeLayoutMenus, x as provideLayout, a as provideLayoutContext, F as sanitizeLayoutSettingsConfig, d as sanitizeSettingsPatch, D as setupLayout, C as shouldCacheRoute, e as useLayoutCache, o as useLayoutContext, M as useLayoutCssVariables, t as useLayoutIcon, f as useMenuSplit, l as useResponsiveMenu, E as useSettingsController, g as useSettingsStore };