@choubo/kerthus-web-admin-shell 0.2.0 → 0.4.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,8 +1,8 @@
1
- import { inject as le, defineComponent as k, h as O, computed as I, reactive as oe, onUnmounted as Q, watch as U, openBlock as a, createBlock as P, unref as y, normalizeClass as N, withCtx as j, createElementBlock as o, Fragment as x, renderList as M, toDisplayString as d, createCommentVNode as p, ref as S, createElementVNode as s, createVNode as $, onMounted as Y, withKeys as J, createTextVNode as z, provide as ve, toRef as pe, renderSlot as B, Teleport as ge, withModifiers as H, withDirectives as K, vModelText as V, nextTick as se, normalizeStyle as ie, resolveDynamicComponent as he, createSlots as fe } from "vue";
2
- import { Menu as Z, Switch as ye, Select as ke, InputNumber as _e, Drawer as we } from "ant-design-vue";
3
- import { Icon as w, Dropdown as re } from "@choubo/kerthus-web-vue-ui";
4
- import { useFrontendRuntime as q } from "@choubo/kerthus-web-vue-runtime";
5
- const ne = {
1
+ import { inject as Ne, defineComponent as N, h as se, computed as T, reactive as Ie, onUnmounted as ie, watch as G, openBlock as n, createBlock as E, unref as h, normalizeClass as q, withCtx as ne, createElementBlock as l, Fragment as D, renderList as U, toDisplayString as m, createCommentVNode as v, ref as A, resolveComponent as ut, createElementVNode as u, createVNode as _, onMounted as ue, withKeys as pe, createTextVNode as Q, provide as dt, toRef as ct, renderSlot as B, Teleport as ze, withModifiers as ee, withDirectives as J, vModelText as Z, nextTick as De, normalizeStyle as fe, createSlots as mt, toRaw as gt, Transition as vt, resolveDynamicComponent as bt } from "vue";
2
+ import { Menu as xe, Switch as ht, Select as pt, InputNumber as ft, Drawer as yt } from "ant-design-vue";
3
+ import { Icon as L, Dropdown as Re } from "@choubo/kerthus-web-vue-ui";
4
+ import { useFrontendRuntime as te, useAutoLock as kt, applyAdminAppearance as wt } from "@choubo/kerthus-web-vue-runtime";
5
+ const Fe = {
6
6
  "en-US": {
7
7
  navigation: "Navigation",
8
8
  closeNavigation: "Close navigation",
@@ -62,10 +62,10 @@ const ne = {
62
62
  reject: "拒绝"
63
63
  }
64
64
  };
65
- function Wn(e, c) {
66
- return (e === "zh-CN" ? ne["zh-CN"] : ne["en-US"])[c];
65
+ function ji(e, c) {
66
+ return (e === "zh-CN" ? Fe["zh-CN"] : Fe["en-US"])[c];
67
67
  }
68
- const On = {
68
+ const Qi = {
69
69
  "en-US": {
70
70
  layout: {
71
71
  footer: {
@@ -431,65 +431,65 @@ const On = {
431
431
  }
432
432
  }
433
433
  }
434
- }, de = Symbol("admin-menu");
435
- function Hn(e) {
434
+ }, Ke = Symbol("admin-menu");
435
+ function Xi(e) {
436
436
  return {
437
437
  install(c) {
438
- c.provide(de, e);
438
+ c.provide(Ke, e);
439
439
  }
440
440
  };
441
441
  }
442
- function ce() {
443
- const e = le(de);
442
+ function _e() {
443
+ const e = Ne(Ke);
444
444
  if (!e)
445
445
  throw new Error("Admin menu port is not installed");
446
446
  return e;
447
447
  }
448
- function ee(e, c) {
448
+ function le(e, c) {
449
449
  for (const t of e) {
450
450
  if (t.path === c)
451
451
  return [t.path];
452
- const i = ee(t.children ?? [], c);
452
+ const i = le(t.children ?? [], c);
453
453
  if (i.length)
454
454
  return [t.path, ...i];
455
455
  }
456
456
  return [];
457
457
  }
458
- const ue = k({
458
+ const Oe = N({
459
459
  name: "AdminMenuNode",
460
460
  props: {
461
461
  item: { type: Object, required: !0 }
462
462
  },
463
463
  setup(e) {
464
- const { ports: c } = q();
464
+ const { ports: c } = te();
465
465
  return () => {
466
- var r, n;
466
+ var r, s;
467
467
  const t = e.item;
468
468
  if ((r = t.meta) != null && r.hideMenu)
469
469
  return null;
470
470
  const i = () => {
471
- var u, b;
472
- return O("span", { class: "dsea-basic-menu-item-content" }, [
473
- t.icon ? O(w, { icon: t.icon, size: 18, class: "dsea-basic-menu-item-content-wrapper__icon" }) : null,
471
+ var a, g;
472
+ return se("span", { class: "dsea-basic-menu-item-content" }, [
473
+ t.icon ? se(L, { icon: t.icon, size: 18, class: "dsea-basic-menu-item-content-wrapper__icon" }) : null,
474
474
  c.locale.translate(t.name),
475
- (u = t.tag) != null && u.content || (b = t.tag) != null && b.dot ? O("span", {
475
+ (a = t.tag) != null && a.content || (g = t.tag) != null && g.dot ? se("span", {
476
476
  class: ["dsea-simple-menu-tag", `dsea-simple-menu-tag--${t.tag.type ?? "error"}`, {
477
477
  "dsea-simple-menu-tag--dot": t.tag.dot
478
478
  }]
479
479
  }, t.tag.dot ? "" : t.tag.content) : null
480
480
  ]);
481
- }, l = (n = t.meta) != null && n.hideChildrenInMenu ? [] : t.children ?? [];
482
- return l.length ? O(Z.SubMenu, {
481
+ }, o = (s = t.meta) != null && s.hideChildrenInMenu ? [] : t.children ?? [];
482
+ return o.length ? se(xe.SubMenu, {
483
483
  key: t.path,
484
484
  popupClassName: "app-top-menu-popup",
485
485
  disabled: t.disabled
486
486
  }, {
487
487
  title: i,
488
- default: () => l.map((u) => O(ue, { key: u.path, item: u }))
489
- }) : O(Z.Item, { key: t.path, disabled: t.disabled }, { default: i });
488
+ default: () => o.map((a) => se(Oe, { key: a.path, item: a }))
489
+ }) : se(xe.Item, { key: t.path, disabled: t.disabled }, { default: i });
490
490
  };
491
491
  }
492
- }), te = /* @__PURE__ */ k({
492
+ }), he = /* @__PURE__ */ N({
493
493
  __name: "BasicMenu",
494
494
  props: {
495
495
  items: { default: () => [] },
@@ -501,96 +501,259 @@ const ue = k({
501
501
  isHorizontal: { type: Boolean },
502
502
  accordion: { type: Boolean, default: !0 },
503
503
  collapse: { type: Boolean },
504
+ split: { type: Boolean },
505
+ topMenuAlign: {},
504
506
  beforeClickFn: {}
505
507
  },
506
508
  emits: ["menuClick"],
507
509
  setup(e, { emit: c }) {
508
- const t = e, i = c, l = ce(), r = I(() => t.collapse ?? l.settings.collapsed.value), n = oe({
510
+ const t = e, i = c, o = _e(), r = T(() => t.collapse ?? o.settings.collapsed.value), s = T(() => t.split ?? o.settings.split.value), a = Ie({
509
511
  defaultSelectedKeys: [],
510
512
  selectedKeys: [],
511
513
  openKeys: [],
512
514
  collapsedOpenKeys: []
513
- }), u = I(() => r.value && !l.settings.mixSidebar.value ? n.collapsedOpenKeys : n.openKeys), b = I(() => {
514
- const T = t.type === "top" && t.mode === "horizontal" || t.isHorizontal && l.settings.split.value;
515
+ }), g = T(() => r.value && !o.settings.mixSidebar.value ? a.collapsedOpenKeys : a.openKeys), f = T(() => {
516
+ const $ = t.type === "top" && t.mode === "horizontal" || t.isHorizontal && s.value;
515
517
  return [
516
518
  "dsea-basic-menu",
517
- `justify-${t.isHorizontal && l.settings.split.value ? "start" : l.settings.topMenuAlign.value}`,
519
+ `justify-${t.isHorizontal && s.value ? "start" : t.topMenuAlign ?? o.settings.topMenuAlign.value}`,
518
520
  {
519
- "dsea-basic-menu__second": !t.isHorizontal && l.settings.split.value,
520
- "dsea-basic-menu__sidebar-hor": T
521
+ "dsea-basic-menu__second": !t.isHorizontal && s.value,
522
+ "dsea-basic-menu__sidebar-hor": $
521
523
  }
522
524
  ];
523
525
  });
524
- let g = !1, v = 0;
525
- async function m(T) {
526
- var C, E;
527
- if (T.name === l.redirectRouteName)
526
+ let b = !1, p = 0;
527
+ async function I($) {
528
+ var M, z;
529
+ if (o.redirectRouteName && $.name === o.redirectRouteName)
528
530
  return;
529
- if (g) {
530
- g = !1;
531
+ if (b) {
532
+ b = !1;
531
533
  return;
532
534
  }
533
- const f = ((C = T.meta) == null ? void 0 : C.currentActiveMenu) || T.path, h = ++v, _ = ee(t.items, f);
534
- if (t.isHorizontal && l.settings.split.value) {
535
- const R = await ((E = l.getCurrentParentPath) == null ? void 0 : E.call(l, f));
536
- if (h !== v)
535
+ const k = ((M = $.meta) == null ? void 0 : M.currentActiveMenu) || $.path, S = ++p, x = le(t.items, k);
536
+ if (t.isHorizontal && s.value) {
537
+ const X = await ((z = o.getCurrentParentPath) == null ? void 0 : z.call(o, k));
538
+ if (S !== p)
537
539
  return;
538
- n.selectedKeys = [R || _[0] || f];
540
+ a.selectedKeys = [X || x[0] || k];
539
541
  } else
540
- n.selectedKeys = _.length ? _ : [f];
541
- L(f);
542
+ a.selectedKeys = x.length ? x : [k];
543
+ H(k);
542
544
  }
543
- function L(T) {
545
+ function H($) {
544
546
  if (t.mode === "horizontal")
545
547
  return;
546
- const f = ee(t.items, T);
547
- n.openKeys = t.accordion ? f : [.../* @__PURE__ */ new Set([...n.openKeys, ...f])];
548
+ const k = le(t.items, $);
549
+ a.openKeys = t.accordion ? k : [.../* @__PURE__ */ new Set([...a.openKeys, ...k])];
548
550
  }
549
- function F(T) {
550
- const f = T.map(String);
551
- if (t.mode === "horizontal" || !t.accordion || l.settings.mixSidebar.value) {
552
- n.openKeys = f;
551
+ function V($) {
552
+ const k = $.map(String);
553
+ if (t.mode === "horizontal" || !t.accordion || o.settings.mixSidebar.value) {
554
+ a.openKeys = k;
553
555
  return;
554
556
  }
555
557
  if (r.value) {
556
- n.collapsedOpenKeys = f;
558
+ a.collapsedOpenKeys = k;
557
559
  return;
558
560
  }
559
- const h = t.items.filter((C) => {
560
- var E;
561
- return (E = C.children) == null ? void 0 : E.length;
562
- }).map((C) => C.path), _ = f.find((C) => !n.openKeys.includes(C));
563
- n.openKeys = _ && h.includes(_) ? [_] : f;
564
- }
565
- async function D(T) {
566
- const f = String(T.key);
567
- t.beforeClickFn && !await t.beforeClickFn(f) || (i("menuClick", f), g = !0, n.selectedKeys = [f]);
568
- }
569
- const W = l.onRouteChange(m);
570
- return Q(W), U(() => t.items, () => m(l.currentRoute.value)), m(l.currentRoute.value), (T, f) => (a(), P(y(Z), {
571
- selectedKeys: n.selectedKeys,
572
- defaultSelectedKeys: n.defaultSelectedKeys,
561
+ const S = t.items.filter((M) => {
562
+ var z;
563
+ return (z = M.children) == null ? void 0 : z.length;
564
+ }).map((M) => M.path), x = k.find((M) => !a.openKeys.includes(M));
565
+ a.openKeys = x && S.includes(x) ? [x] : k;
566
+ }
567
+ async function K($) {
568
+ const k = String($.key);
569
+ t.beforeClickFn && !await t.beforeClickFn(k) || (i("menuClick", k), b = !0, a.selectedKeys = [k]);
570
+ }
571
+ const O = o.onRouteChange(I);
572
+ return ie(O), G(() => t.items, () => I(o.currentRoute.value)), I(o.currentRoute.value), ($, k) => (n(), E(h(xe), {
573
+ selectedKeys: a.selectedKeys,
574
+ defaultSelectedKeys: a.defaultSelectedKeys,
573
575
  mode: e.mode,
574
- openKeys: u.value,
576
+ openKeys: g.value,
575
577
  inlineIndent: e.inlineIndent,
576
578
  theme: e.theme,
577
579
  inlineCollapsed: e.mode === "inline" && !e.mixSider && r.value,
578
- class: N(b.value),
580
+ class: q(f.value),
579
581
  subMenuOpenDelay: 0.2,
580
- onOpenChange: F,
581
- onClick: D
582
+ onOpenChange: V,
583
+ onClick: K
582
584
  }, {
583
- default: j(() => [
584
- (a(!0), o(x, null, M(e.items, (h) => (a(), P(y(ue), {
585
- key: h.path,
586
- item: h
585
+ default: ne(() => [
586
+ (n(!0), l(D, null, U(e.items, (S) => (n(), E(h(Oe), {
587
+ key: S.path,
588
+ item: S
587
589
  }, null, 8, ["item"]))), 128))
588
590
  ]),
589
591
  _: 1
590
592
  }, 8, ["selectedKeys", "defaultSelectedKeys", "mode", "openKeys", "inlineIndent", "theme", "inlineCollapsed", "class"]));
591
593
  }
592
594
  });
593
- const jn = /* @__PURE__ */ k({
595
+ const St = /* @__PURE__ */ N({
596
+ __name: "SimpleMenuTag",
597
+ props: {
598
+ item: {},
599
+ dot: { type: Boolean, default: !1 },
600
+ collapseParent: { type: Boolean, default: !1 }
601
+ },
602
+ setup(e) {
603
+ return (c, t) => {
604
+ var i, o;
605
+ return (i = e.item.tag) != null && i.content || (o = e.item.tag) != null && o.dot ? (n(), l("span", {
606
+ key: 0,
607
+ class: q(["dsea-simple-menu-tag", [`dsea-simple-menu-tag--${e.item.tag.type ?? "error"}`, {
608
+ "dsea-simple-menu-tag--dot": e.dot || e.item.tag.dot,
609
+ "dsea-simple-menu-tag--collapse": e.collapseParent
610
+ }]])
611
+ }, m(e.dot || e.item.tag.dot || e.collapseParent ? "" : e.item.tag.content), 3)) : v("", !0);
612
+ };
613
+ }
614
+ }), Ct = ["data-menu-path"], $t = ["disabled", "title", "aria-expanded"], xt = {
615
+ key: 1,
616
+ class: "dsea-classic-menu__name"
617
+ }, _t = {
618
+ key: 2,
619
+ class: "dsea-classic-menu__collapsed-name"
620
+ }, Lt = /* @__PURE__ */ N({
621
+ __name: "ClassicMenuNode",
622
+ props: {
623
+ item: {},
624
+ depth: {},
625
+ currentPath: {},
626
+ openKeys: {},
627
+ collapsed: { type: Boolean },
628
+ collapsedShowTitle: { type: Boolean },
629
+ translate: { type: Function }
630
+ },
631
+ emits: ["toggle", "select"],
632
+ setup(e, { emit: c }) {
633
+ const t = e, i = c, o = A(!1), r = T(() => {
634
+ var f, b;
635
+ return !((f = t.item.meta) != null && f.hideChildrenInMenu) && ((b = t.item.children) == null ? void 0 : b.some((p) => {
636
+ var I;
637
+ return !((I = p.meta) != null && I.hideMenu);
638
+ }));
639
+ }), s = T(() => !r.value && t.item.path === t.currentPath), a = T(() => t.openKeys.includes(t.item.path));
640
+ function g() {
641
+ i(r.value ? "toggle" : "select", t.item.path);
642
+ }
643
+ return (f, b) => {
644
+ var I, H, V;
645
+ const p = ut("ClassicMenuNode", !0);
646
+ return (I = e.item.meta) != null && I.hideMenu ? v("", !0) : (n(), l("li", {
647
+ key: 0,
648
+ class: q(["dsea-classic-menu__node", {
649
+ "is-active": s.value,
650
+ "is-open": a.value,
651
+ "has-children": r.value,
652
+ "is-root": e.depth === 0,
653
+ "is-collapsed": e.collapsed && e.depth === 0
654
+ }]),
655
+ "data-menu-path": e.item.path,
656
+ onMouseenter: b[2] || (b[2] = (K) => o.value = !0),
657
+ onMouseleave: b[3] || (b[3] = (K) => o.value = !1)
658
+ }, [
659
+ u("button", {
660
+ type: "button",
661
+ class: "dsea-classic-menu__entry",
662
+ disabled: e.item.disabled,
663
+ title: e.collapsed && e.depth === 0 ? e.translate(e.item.name) : void 0,
664
+ "aria-expanded": r.value ? a.value : void 0,
665
+ onClick: g
666
+ }, [
667
+ e.item.icon || (H = e.item.meta) != null && H.icon ? (n(), E(h(L), {
668
+ key: 0,
669
+ icon: e.item.icon || ((V = e.item.meta) == null ? void 0 : V.icon),
670
+ size: 16,
671
+ class: "dsea-classic-menu__icon"
672
+ }, null, 8, ["icon"])) : v("", !0),
673
+ !e.collapsed || e.depth > 0 ? (n(), l("span", xt, m(e.translate(e.item.name)), 1)) : e.collapsedShowTitle ? (n(), l("span", _t, m(e.translate(e.item.name)), 1)) : v("", !0),
674
+ _(St, {
675
+ item: e.item,
676
+ "collapse-parent": e.collapsed && e.depth === 0
677
+ }, null, 8, ["item", "collapse-parent"]),
678
+ r.value && (!e.collapsed || e.depth > 0) ? (n(), E(h(L), {
679
+ key: 3,
680
+ icon: "lucide:chevron-down",
681
+ size: 14,
682
+ class: "dsea-classic-menu__chevron"
683
+ })) : v("", !0)
684
+ ], 8, $t),
685
+ r.value ? (n(), l("ul", {
686
+ key: 0,
687
+ class: q(["dsea-classic-menu__children", { "is-flyout": e.collapsed && e.depth === 0, "is-visible": a.value || e.collapsed && e.depth === 0 && o.value }])
688
+ }, [
689
+ (n(!0), l(D, null, U(e.item.children, (K) => (n(), E(p, {
690
+ key: K.path,
691
+ item: K,
692
+ depth: e.depth + 1,
693
+ "current-path": e.currentPath,
694
+ "open-keys": e.openKeys,
695
+ collapsed: !1,
696
+ "collapsed-show-title": e.collapsedShowTitle,
697
+ translate: e.translate,
698
+ onToggle: b[0] || (b[0] = (O) => i("toggle", O)),
699
+ onSelect: b[1] || (b[1] = (O) => i("select", O))
700
+ }, null, 8, ["item", "depth", "current-path", "open-keys", "collapsed-show-title", "translate"]))), 128))
701
+ ], 2)) : v("", !0)
702
+ ], 42, Ct));
703
+ };
704
+ }
705
+ }), Mt = ["aria-label"], Tt = { class: "dsea-classic-menu__root" }, Ee = /* @__PURE__ */ N({
706
+ __name: "ClassicMenu",
707
+ props: {
708
+ items: {},
709
+ currentPath: {},
710
+ collapsed: { type: Boolean, default: !1 },
711
+ collapsedShowTitle: { type: Boolean, default: !1 },
712
+ accordion: { type: Boolean, default: !0 },
713
+ theme: { default: "dark" },
714
+ label: { default: "Navigation" }
715
+ },
716
+ emits: ["select"],
717
+ setup(e, { emit: c }) {
718
+ const t = e, i = c, { ports: o } = te(), r = A([]);
719
+ function s(f) {
720
+ return o.locale.translate(f);
721
+ }
722
+ G(() => [t.currentPath, t.items, t.collapsed], () => {
723
+ r.value = t.collapsed ? [] : le(t.items, t.currentPath).slice(0, -1);
724
+ }, { immediate: !0 });
725
+ function a(f) {
726
+ if (t.collapsed) {
727
+ r.value = r.value.includes(f) ? [] : [f];
728
+ return;
729
+ }
730
+ r.value.includes(f) ? r.value = r.value.filter((b) => b !== f) : r.value = t.accordion ? [...le(t.items, f).slice(0, -1), f] : [...r.value, f];
731
+ }
732
+ function g(f) {
733
+ i("select", f), t.collapsed && (r.value = []);
734
+ }
735
+ return (f, b) => (n(), l("nav", {
736
+ class: q(["dsea-classic-menu", [`dsea-classic-menu--${e.theme}`, { "is-collapsed": e.collapsed }]]),
737
+ "aria-label": e.label
738
+ }, [
739
+ u("ul", Tt, [
740
+ (n(!0), l(D, null, U(e.items, (p) => (n(), E(Lt, {
741
+ key: p.path,
742
+ item: p,
743
+ depth: 0,
744
+ "current-path": e.currentPath,
745
+ "open-keys": r.value,
746
+ collapsed: e.collapsed,
747
+ "collapsed-show-title": e.collapsedShowTitle,
748
+ translate: s,
749
+ onToggle: a,
750
+ onSelect: g
751
+ }, null, 8, ["item", "current-path", "open-keys", "collapsed", "collapsed-show-title"]))), 128))
752
+ ])
753
+ ], 10, Mt));
754
+ }
755
+ });
756
+ const Yi = /* @__PURE__ */ N({
594
757
  __name: "SimpleMenu",
595
758
  props: {
596
759
  items: { default: () => [] },
@@ -605,10 +768,10 @@ const jn = /* @__PURE__ */ k({
605
768
  emits: ["menuClick"],
606
769
  setup(e, { emit: c }) {
607
770
  const t = e, i = c;
608
- async function l(r) {
771
+ async function o(r) {
609
772
  return /^https?:\/\//i.test(r) ? (window.open(r, "_blank", "noopener,noreferrer"), !1) : t.beforeClickFn ? t.beforeClickFn(r) : !0;
610
773
  }
611
- return (r, n) => (a(), P(te, {
774
+ return (r, s) => (n(), E(he, {
612
775
  class: "dsea-simple-menu",
613
776
  items: e.items,
614
777
  mode: "inline",
@@ -616,30 +779,11 @@ const jn = /* @__PURE__ */ k({
616
779
  collapse: e.collapse,
617
780
  mixSider: e.mixSider,
618
781
  accordion: e.accordion,
619
- beforeClickFn: l,
620
- onMenuClick: n[0] || (n[0] = (u) => i("menuClick", u))
782
+ beforeClickFn: o,
783
+ onMenuClick: s[0] || (s[0] = (a) => i("menuClick", a))
621
784
  }, null, 8, ["items", "theme", "collapse", "mixSider", "accordion"]));
622
785
  }
623
- }), Qn = /* @__PURE__ */ k({
624
- __name: "SimpleMenuTag",
625
- props: {
626
- item: {},
627
- dot: { type: Boolean, default: !1 },
628
- collapseParent: { type: Boolean, default: !1 }
629
- },
630
- setup(e) {
631
- return (c, t) => {
632
- var i, l;
633
- return (i = e.item.tag) != null && i.content || (l = e.item.tag) != null && l.dot ? (a(), o("span", {
634
- key: 0,
635
- class: N(["dsea-simple-menu-tag", [`dsea-simple-menu-tag--${e.item.tag.type ?? "error"}`, {
636
- "dsea-simple-menu-tag--dot": e.dot || e.item.tag.dot,
637
- "dsea-simple-menu-tag--collapse": e.collapseParent
638
- }]])
639
- }, d(e.dot || e.item.tag.dot || e.collapseParent ? "" : e.item.tag.content), 3)) : p("", !0);
640
- };
641
- }
642
- }), $e = ["src", "alt"], Le = /* @__PURE__ */ k({
786
+ }), At = ["src", "alt"], Pt = /* @__PURE__ */ N({
643
787
  __name: "AppLogo",
644
788
  props: {
645
789
  theme: {},
@@ -648,35 +792,35 @@ const jn = /* @__PURE__ */ k({
648
792
  collapsedShowTitle: { type: Boolean }
649
793
  },
650
794
  setup(e) {
651
- const { ports: c } = q(), t = I(() => c.appConfig.getTitle()), i = I(() => {
652
- var r, n;
653
- return (n = (r = c.appConfig).getLogo) == null ? void 0 : n.call(r);
795
+ const { ports: c } = te(), t = T(() => c.appConfig.getTitle()), i = T(() => {
796
+ var r, s;
797
+ return (s = (r = c.appConfig).getLogo) == null ? void 0 : s.call(r);
654
798
  });
655
- function l() {
799
+ function o() {
656
800
  c.navigation.go(c.navigation.getHome());
657
801
  }
658
- return (r, n) => (a(), o("div", {
659
- class: N(["dsea-app-logo anticon", [e.theme, { "collapsed-show-title": e.collapsedShowTitle }]]),
660
- onClick: l
802
+ return (r, s) => (n(), l("div", {
803
+ class: q(["dsea-app-logo anticon", [e.theme, { "collapsed-show-title": e.collapsedShowTitle }]]),
804
+ onClick: o
661
805
  }, [
662
- i.value ? (a(), o("img", {
806
+ i.value ? (n(), l("img", {
663
807
  key: 0,
664
808
  src: i.value,
665
809
  alt: t.value
666
- }, null, 8, $e)) : p("", !0),
667
- e.showTitle ? (a(), o("div", {
810
+ }, null, 8, At)) : v("", !0),
811
+ e.showTitle ? (n(), l("div", {
668
812
  key: 1,
669
- class: N(["dsea-app-logo__title ml-2 truncate md:opacity-100", { "xs:opacity-0": !e.alwaysShowTitle }])
670
- }, d(t.value), 3)) : p("", !0)
813
+ class: q(["dsea-app-logo__title ml-2 truncate md:opacity-100", { "xs:opacity-0": !e.alwaysShowTitle }])
814
+ }, m(t.value), 3)) : v("", !0)
671
815
  ], 2));
672
816
  }
673
817
  });
674
- const A = (e, c) => {
818
+ const j = (e, c) => {
675
819
  const t = e.__vccOpts || e;
676
- for (const [i, l] of c)
677
- t[i] = l;
820
+ for (const [i, o] of c)
821
+ t[i] = o;
678
822
  return t;
679
- }, Ce = /* @__PURE__ */ A(Le, [["__scopeId", "data-v-f9695ead"]]), Se = { class: "dsea-app-locale-picker" }, xe = { key: 0 }, Gn = /* @__PURE__ */ k({
823
+ }, be = /* @__PURE__ */ j(Pt, [["__scopeId", "data-v-f9695ead"]]), Bt = ["title"], Ft = { key: 0 }, Et = /* @__PURE__ */ N({
680
824
  __name: "AppLocalePicker",
681
825
  props: {
682
826
  locales: {},
@@ -685,17 +829,17 @@ const A = (e, c) => {
685
829
  reload: { type: Boolean }
686
830
  },
687
831
  setup(e) {
688
- const c = e, { ports: t } = q(), i = S(c.locale ?? t.locale.getLocale()), l = I(() => {
689
- var n;
690
- return ((n = c.locales.find((u) => u.event === i.value)) == null ? void 0 : n.text) ?? "";
832
+ const c = e, { ports: t } = te(), i = A(c.locale ?? t.locale.getLocale()), o = T(() => {
833
+ var s;
834
+ return ((s = c.locales.find((a) => a.event === i.value)) == null ? void 0 : s.text) ?? "";
691
835
  });
692
- U(() => c.locale, (n) => {
693
- n && (i.value = n);
836
+ G(() => c.locale, (s) => {
837
+ s && (i.value = s);
694
838
  });
695
- async function r(n) {
696
- n.event !== i.value && (await t.locale.setLocale(n.event), i.value = n.event, c.reload && location.reload());
839
+ async function r(s) {
840
+ s.event !== i.value && (await t.locale.setLocale(s.event), i.value = s.event, c.reload && location.reload());
697
841
  }
698
- return (n, u) => (a(), P(y(re), {
842
+ return (s, a) => (n(), E(h(Re), {
699
843
  placement: "bottom",
700
844
  trigger: ["click"],
701
845
  dropMenuList: e.locales,
@@ -703,17 +847,20 @@ const A = (e, c) => {
703
847
  overlayClassName: "app-locale-picker-overlay",
704
848
  onMenuEvent: r
705
849
  }, {
706
- default: j(() => [
707
- s("span", Se, [
708
- $(y(w), { icon: "ion:language" }),
709
- e.showText ? (a(), o("span", xe, d(l.value), 1)) : p("", !0)
710
- ])
850
+ default: ne(() => [
851
+ u("span", {
852
+ class: "dsea-app-locale-picker",
853
+ title: o.value
854
+ }, [
855
+ _(h(L), { icon: "ion:language" }),
856
+ e.showText ? (n(), l("span", Ft, m(o.value), 1)) : v("", !0)
857
+ ], 8, Bt)
711
858
  ]),
712
859
  _: 1
713
860
  }, 8, ["dropMenuList", "selectedKeys"]));
714
861
  }
715
862
  });
716
- const Ae = ["aria-label"], Me = /* @__PURE__ */ k({
863
+ const Nt = ["aria-label"], It = /* @__PURE__ */ N({
717
864
  __name: "AppDarkModeToggle",
718
865
  props: {
719
866
  darkMode: { type: Boolean },
@@ -722,42 +869,44 @@ const Ae = ["aria-label"], Me = /* @__PURE__ */ k({
722
869
  emits: ["update:darkMode"],
723
870
  setup(e, { emit: c }) {
724
871
  const t = c;
725
- return (i, l) => e.visible ? (a(), o("button", {
872
+ return (i, o) => e.visible ? (n(), l("button", {
726
873
  key: 0,
727
874
  type: "button",
728
- class: N(["dsea-dark-switch", { "dsea-dark-switch--dark": e.darkMode }]),
875
+ class: q(["dsea-dark-switch", { "dsea-dark-switch--dark": e.darkMode }]),
729
876
  "aria-label": e.darkMode ? "Switch to light mode" : "Switch to dark mode",
730
- onClick: l[0] || (l[0] = (r) => t("update:darkMode", !e.darkMode))
877
+ onClick: o[0] || (o[0] = (r) => t("update:darkMode", !e.darkMode))
731
878
  }, [
732
- l[1] || (l[1] = s("span", { class: "dsea-dark-switch-inner" }, null, -1)),
733
- $(y(w), {
879
+ o[1] || (o[1] = u("span", { class: "dsea-dark-switch-inner" }, null, -1)),
880
+ _(h(L), {
734
881
  icon: "lucide:sun",
735
882
  size: 14
736
883
  }),
737
- $(y(w), {
884
+ _(h(L), {
738
885
  icon: "lucide:moon",
739
886
  size: 14
740
887
  })
741
- ], 10, Ae)) : p("", !0);
888
+ ], 10, Nt)) : v("", !0);
742
889
  }
743
890
  });
744
- const Xn = /* @__PURE__ */ A(Me, [["__scopeId", "data-v-bc7f2cad"]]), Te = ["aria-label", "title", "aria-pressed"], Be = /* @__PURE__ */ k({
891
+ const Gi = /* @__PURE__ */ j(It, [["__scopeId", "data-v-bc7f2cad"]]), zt = ["aria-label", "title", "aria-pressed"], Dt = /* @__PURE__ */ N({
745
892
  __name: "AdminFullscreenButton",
746
893
  props: {
747
894
  enterLabel: { default: "Enter fullscreen" },
748
- exitLabel: { default: "Exit fullscreen" }
895
+ exitLabel: { default: "Exit fullscreen" },
896
+ enterIcon: { default: "lucide:maximize" },
897
+ exitIcon: { default: "lucide:minimize" }
749
898
  },
750
899
  setup(e) {
751
- const c = S(!1);
900
+ const c = A(!1);
752
901
  function t() {
753
902
  c.value = !!document.fullscreenElement;
754
903
  }
755
904
  async function i() {
756
905
  document.fullscreenElement ? await document.exitFullscreen() : await document.documentElement.requestFullscreen(), t();
757
906
  }
758
- return Y(() => {
907
+ return ue(() => {
759
908
  t(), document.addEventListener("fullscreenchange", t);
760
- }), Q(() => document.removeEventListener("fullscreenchange", t)), (l, r) => (a(), o("button", {
909
+ }), ie(() => document.removeEventListener("fullscreenchange", t)), (o, r) => (n(), l("button", {
761
910
  type: "button",
762
911
  class: "dsea-icon-command",
763
912
  "aria-label": c.value ? e.exitLabel : e.enterLabel,
@@ -765,16 +914,16 @@ const Xn = /* @__PURE__ */ A(Me, [["__scopeId", "data-v-bc7f2cad"]]), Te = ["ari
765
914
  "aria-pressed": c.value,
766
915
  onClick: i
767
916
  }, [
768
- $(y(w), {
769
- icon: c.value ? "lucide:minimize" : "lucide:maximize",
917
+ _(h(L), {
918
+ icon: c.value ? e.exitIcon : e.enterIcon,
770
919
  size: 18
771
920
  }, null, 8, ["icon"])
772
- ], 8, Te));
921
+ ], 8, zt));
773
922
  }
774
923
  });
775
- const Yn = /* @__PURE__ */ A(Be, [["__scopeId", "data-v-1787f599"]]);
924
+ const Rt = /* @__PURE__ */ j(Dt, [["__scopeId", "data-v-cb009c46"]]);
776
925
  new TextEncoder().encode("kerthus-web-shared-auth-v2-key!!");
777
- function X(e) {
926
+ function re(e) {
778
927
  if (typeof e != "string")
779
928
  return "";
780
929
  const c = e.trim();
@@ -787,13 +936,13 @@ function X(e) {
787
936
  return "";
788
937
  }
789
938
  }
790
- const Pe = ["aria-label", "title"], Ie = { class: "dsea-app-switcher__panel" }, Ee = {
939
+ const Kt = ["aria-label", "title"], Ot = { class: "dsea-app-switcher__panel" }, Wt = {
791
940
  key: 0,
792
941
  role: "status"
793
- }, Fe = {
942
+ }, Vt = {
794
943
  key: 1,
795
944
  role: "alert"
796
- }, Ne = { key: 2 }, ze = { key: 3 }, De = ["href"], Ke = ["src"], Ve = { key: 0 }, Re = ["title"], Ue = ["disabled", "aria-current", "onClick"], qe = ["src"], We = { key: 0 }, Oe = /* @__PURE__ */ k({
945
+ }, qt = { key: 2 }, Ut = { key: 3 }, Ht = ["href"], jt = ["src"], Qt = { key: 0 }, Xt = ["title"], Yt = ["disabled", "aria-current", "onClick"], Gt = ["src"], Jt = { key: 0 }, Zt = /* @__PURE__ */ N({
797
946
  __name: "AdminAppSwitcher",
798
947
  props: {
799
948
  apps: {},
@@ -801,6 +950,7 @@ const Pe = ["aria-label", "title"], Ie = { class: "dsea-app-switcher__panel" },
801
950
  loading: { type: Boolean },
802
951
  error: {},
803
952
  label: { default: "Applications" },
953
+ icon: { default: "lucide:layout-grid" },
804
954
  emptyLabel: { default: "No applications" },
805
955
  loadingLabel: { default: "Loading applications" },
806
956
  invalidUrlLabel: { default: "Invalid application URL" },
@@ -808,119 +958,119 @@ const Pe = ["aria-label", "title"], Ie = { class: "dsea-app-switcher__panel" },
808
958
  },
809
959
  emits: ["open", "switch", "error"],
810
960
  setup(e, { emit: c }) {
811
- const t = e, i = c, l = S(), r = S();
812
- function n() {
813
- l.value && (l.value.open = !1);
961
+ const t = e, i = c, o = A(), r = A();
962
+ function s() {
963
+ o.value && (o.value.open = !1);
814
964
  }
815
- function u(g) {
816
- g.target.open && i("open");
965
+ function a(f) {
966
+ f.target.open && i("open");
817
967
  }
818
- async function b(g) {
819
- var v;
820
- if (!(r.value || g.id === t.currentId)) {
821
- r.value = g.id;
968
+ async function g(f) {
969
+ var b;
970
+ if (!(r.value || f.id === t.currentId)) {
971
+ r.value = f.id;
822
972
  try {
823
- if (await ((v = t.confirmSwitch) == null ? void 0 : v.call(t, g)) === !1)
973
+ if (await ((b = t.confirmSwitch) == null ? void 0 : b.call(t, f)) === !1)
824
974
  return;
825
- i("switch", g), n();
826
- } catch (m) {
827
- i("error", m);
975
+ i("switch", f), s();
976
+ } catch (p) {
977
+ i("error", p);
828
978
  } finally {
829
979
  r.value = void 0;
830
980
  }
831
981
  }
832
982
  }
833
- return (g, v) => (a(), o("details", {
983
+ return (f, b) => (n(), l("details", {
834
984
  ref_key: "menu",
835
- ref: l,
985
+ ref: o,
836
986
  class: "dsea-app-switcher",
837
- onToggle: u,
838
- onKeydown: J(n, ["esc"])
987
+ onToggle: a,
988
+ onKeydown: pe(s, ["esc"])
839
989
  }, [
840
- s("summary", {
990
+ u("summary", {
841
991
  "aria-label": e.label,
842
992
  title: e.label
843
993
  }, [
844
- $(y(w), {
845
- icon: "lucide:layout-grid",
994
+ _(h(L), {
995
+ icon: e.icon,
846
996
  size: 18
847
- })
848
- ], 8, Pe),
849
- s("div", Ie, [
850
- e.loading ? (a(), o("p", Ee, d(e.loadingLabel), 1)) : e.error ? (a(), o("p", Fe, d(e.error), 1)) : e.apps.length ? (a(), o("ul", ze, [
851
- (a(!0), o(x, null, M(e.apps, (m) => (a(), o("li", {
852
- key: m.id
997
+ }, null, 8, ["icon"])
998
+ ], 8, Kt),
999
+ u("div", Ot, [
1000
+ e.loading ? (n(), l("p", Wt, m(e.loadingLabel), 1)) : e.error ? (n(), l("p", Vt, m(e.error), 1)) : e.apps.length ? (n(), l("ul", Ut, [
1001
+ (n(!0), l(D, null, U(e.apps, (p) => (n(), l("li", {
1002
+ key: p.id
853
1003
  }, [
854
- m.url && y(X)(m.url) ? (a(), o("a", {
1004
+ p.url && h(re)(p.url) ? (n(), l("a", {
855
1005
  key: 0,
856
- href: y(X)(m.url),
1006
+ href: h(re)(p.url),
857
1007
  target: "_blank",
858
1008
  rel: "noopener noreferrer",
859
1009
  referrerpolicy: "no-referrer",
860
- onClick: n
1010
+ onClick: s
861
1011
  }, [
862
- m.icon ? (a(), o("img", {
1012
+ p.icon ? (n(), l("img", {
863
1013
  key: 0,
864
- src: m.icon,
1014
+ src: p.icon,
865
1015
  alt: ""
866
- }, null, 8, Ke)) : p("", !0),
867
- s("span", null, [
868
- z(d(m.name), 1),
869
- m.description ? (a(), o("small", Ve, d(m.description), 1)) : p("", !0)
1016
+ }, null, 8, jt)) : v("", !0),
1017
+ u("span", null, [
1018
+ Q(m(p.name), 1),
1019
+ p.description ? (n(), l("small", Qt, m(p.description), 1)) : v("", !0)
870
1020
  ]),
871
- $(y(w), {
1021
+ _(h(L), {
872
1022
  icon: "lucide:external-link",
873
1023
  size: 14
874
1024
  })
875
- ], 8, De)) : m.url ? (a(), o("button", {
1025
+ ], 8, Ht)) : p.url ? (n(), l("button", {
876
1026
  key: 1,
877
1027
  type: "button",
878
1028
  disabled: "",
879
1029
  title: e.invalidUrlLabel
880
1030
  }, [
881
- s("span", null, [
882
- z(d(m.name), 1),
883
- s("small", null, d(e.invalidUrlLabel), 1)
1031
+ u("span", null, [
1032
+ Q(m(p.name), 1),
1033
+ u("small", null, m(e.invalidUrlLabel), 1)
884
1034
  ])
885
- ], 8, Re)) : (a(), o("button", {
1035
+ ], 8, Xt)) : (n(), l("button", {
886
1036
  key: 2,
887
1037
  type: "button",
888
- disabled: m.id === e.currentId || r.value === m.id,
889
- "aria-current": m.id === e.currentId ? "page" : void 0,
890
- onClick: (L) => b(m)
1038
+ disabled: p.id === e.currentId || r.value === p.id,
1039
+ "aria-current": p.id === e.currentId ? "page" : void 0,
1040
+ onClick: (I) => g(p)
891
1041
  }, [
892
- m.icon ? (a(), o("img", {
1042
+ p.icon ? (n(), l("img", {
893
1043
  key: 0,
894
- src: m.icon,
1044
+ src: p.icon,
895
1045
  alt: ""
896
- }, null, 8, qe)) : p("", !0),
897
- s("span", null, [
898
- z(d(m.name), 1),
899
- m.description ? (a(), o("small", We, d(m.description), 1)) : p("", !0)
1046
+ }, null, 8, Gt)) : v("", !0),
1047
+ u("span", null, [
1048
+ Q(m(p.name), 1),
1049
+ p.description ? (n(), l("small", Jt, m(p.description), 1)) : v("", !0)
900
1050
  ]),
901
- m.id === e.currentId ? (a(), P(y(w), {
1051
+ p.id === e.currentId ? (n(), E(h(L), {
902
1052
  key: 1,
903
1053
  icon: "lucide:check",
904
1054
  size: 16
905
- })) : p("", !0)
906
- ], 8, Ue))
1055
+ })) : v("", !0)
1056
+ ], 8, Yt))
907
1057
  ]))), 128))
908
- ])) : (a(), o("p", Ne, d(e.emptyLabel), 1))
1058
+ ])) : (n(), l("p", qt, m(e.emptyLabel), 1))
909
1059
  ])
910
1060
  ], 544));
911
1061
  }
912
1062
  });
913
- const Jn = /* @__PURE__ */ A(Oe, [["__scopeId", "data-v-29d987c2"]]), me = Symbol("app-provider");
914
- function be(e) {
915
- return ve(me, e), e;
1063
+ const ea = /* @__PURE__ */ j(Zt, [["__scopeId", "data-v-966a5d72"]]), We = Symbol("app-provider");
1064
+ function Ve(e) {
1065
+ return dt(We, e), e;
916
1066
  }
917
- function Zn() {
918
- const e = le(me);
1067
+ function Ji() {
1068
+ const e = Ne(We);
919
1069
  if (!e)
920
1070
  throw new Error("AppProvider is missing");
921
1071
  return e;
922
1072
  }
923
- const el = /* @__PURE__ */ k({
1073
+ const Zi = /* @__PURE__ */ N({
924
1074
  __name: "AppProvider",
925
1075
  props: {
926
1076
  prefixCls: { default: "dsea" },
@@ -928,163 +1078,179 @@ const el = /* @__PURE__ */ k({
928
1078
  onMobileChange: {}
929
1079
  },
930
1080
  setup(e) {
931
- const c = e, t = S(!1);
932
- be({ prefixCls: pe(c, "prefixCls"), isMobile: t });
1081
+ const c = e, t = A(!1);
1082
+ Ve({ prefixCls: ct(c, "prefixCls"), isMobile: t });
933
1083
  function i() {
934
1084
  var r;
935
- const l = window.innerWidth < c.mobileBreakpoint;
936
- l !== t.value && (t.value = l, (r = c.onMobileChange) == null || r.call(c, l));
1085
+ const o = window.innerWidth < c.mobileBreakpoint;
1086
+ o !== t.value && (t.value = o, (r = c.onMobileChange) == null || r.call(c, o));
937
1087
  }
938
- return Y(() => {
1088
+ return ue(() => {
939
1089
  i(), window.addEventListener("resize", i);
940
- }), Q(() => window.removeEventListener("resize", i)), (l, r) => B(l.$slots, "default");
1090
+ }), ie(() => window.removeEventListener("resize", i)), (o, r) => B(o.$slots, "default");
941
1091
  }
942
- }), He = ["aria-label"], je = ["aria-label"], Qe = { class: "dsea-app-search-input-row" }, Ge = ["placeholder", "aria-label"], Xe = ["aria-label"], Ye = ["data-index", "aria-selected", "onMouseenter", "onClick"], Je = {
1092
+ }), ta = ["aria-label"], aa = ["aria-label"], na = { class: "dsea-app-search-input-row" }, la = ["placeholder", "aria-label"], ia = ["aria-label"], oa = ["data-index", "aria-selected", "onMouseenter", "onClick"], sa = {
943
1093
  key: 1,
944
1094
  class: "dsea-app-search-empty"
945
- }, Ze = /* @__PURE__ */ k({
1095
+ }, ra = {
1096
+ key: 2,
1097
+ class: "dsea-app-search-footer"
1098
+ }, ua = /* @__PURE__ */ N({
946
1099
  __name: "AppSearch",
1100
+ props: {
1101
+ menuItems: {},
1102
+ classic: { type: Boolean }
1103
+ },
947
1104
  setup(e) {
948
- const { ports: c } = q(), t = ce(), i = (f) => c.locale.translate(f), l = S(!1), r = S(""), n = S([]), u = S(0), b = S(), g = S();
949
- function v(f, h = "") {
950
- return f.flatMap((_) => {
951
- var G, ae;
952
- if ((G = _.meta) != null && G.hideMenu)
1105
+ const c = e, { ports: t } = te(), i = _e(), o = (S) => t.locale.translate(S), r = T(() => t.locale.getLocale().toLowerCase().startsWith("zh") ? { search: "确认", navigate: "切换", close: "关闭" } : { search: "Select", navigate: "Navigate", close: "Close" }), s = A(!1), a = A(""), g = A([]), f = A(0), b = A(), p = A();
1106
+ function I(S, x = "") {
1107
+ return S.flatMap((M) => {
1108
+ var me, ge;
1109
+ if ((me = M.meta) != null && me.hideMenu)
953
1110
  return [];
954
- const C = i(_.name), E = h ? `${h} > ${C}` : C, R = (ae = _.meta) != null && ae.hideChildrenInMenu ? [] : _.children ?? [];
955
- return R.length ? v(R, E) : [{ label: E, path: _.path, icon: _.icon }];
1111
+ const z = o(M.name), X = x ? `${x} > ${z}` : z, oe = (ge = M.meta) != null && ge.hideChildrenInMenu ? [] : M.children ?? [];
1112
+ return oe.length ? I(oe, X) : [{ label: X, path: M.path, icon: M.icon }];
956
1113
  });
957
1114
  }
958
- function m(f, h) {
959
- const _ = f.toLocaleLowerCase();
960
- let C = 0;
961
- for (const E of h.toLocaleLowerCase()) {
962
- if (C = _.indexOf(E, C), C < 0)
1115
+ function H(S, x) {
1116
+ const M = S.toLocaleLowerCase();
1117
+ let z = 0;
1118
+ for (const X of x.toLocaleLowerCase()) {
1119
+ if (z = M.indexOf(X, z), z < 0)
963
1120
  return !1;
964
- C += 1;
1121
+ z += 1;
965
1122
  }
966
1123
  return !0;
967
1124
  }
968
- const L = I(() => {
969
- const f = r.value.trim();
970
- return f ? v(n.value).filter((h) => m(h.label, f)) : [];
1125
+ const V = T(() => {
1126
+ const S = a.value.trim();
1127
+ return S ? I(g.value).filter((x) => H(x.label, S)) : [];
971
1128
  });
972
- U(L, () => {
973
- u.value = 0;
1129
+ G(V, () => {
1130
+ f.value = 0;
974
1131
  });
975
- async function F() {
976
- var f, h;
977
- l.value = !0, n.value = await ((f = t.getItems) == null ? void 0 : f.call(t)) ?? [], l.value && (await se(), (h = b.value) == null || h.focus());
978
- }
979
- function D() {
980
- l.value = !1, r.value = "";
981
- }
982
- function W(f) {
983
- D(), c.navigation.go(f.path);
984
- }
985
- function T(f) {
986
- var h, _;
987
- if (l.value)
988
- if (f.key === "Escape")
989
- D();
990
- else if (f.key === "ArrowDown" || f.key === "ArrowUp") {
991
- if (f.preventDefault(), !L.value.length)
1132
+ async function K() {
1133
+ var S, x;
1134
+ s.value = !0, g.value = c.menuItems ?? await ((S = i.getItems) == null ? void 0 : S.call(i)) ?? [], s.value && (await De(), (x = b.value) == null || x.focus());
1135
+ }
1136
+ function O() {
1137
+ s.value = !1, a.value = "";
1138
+ }
1139
+ function $(S) {
1140
+ O(), t.navigation.go(S.path);
1141
+ }
1142
+ function k(S) {
1143
+ var x, M;
1144
+ if (s.value)
1145
+ if (S.key === "Escape")
1146
+ O();
1147
+ else if (S.key === "ArrowDown" || S.key === "ArrowUp") {
1148
+ if (S.preventDefault(), !V.value.length)
992
1149
  return;
993
- const C = f.key === "ArrowDown" ? 1 : -1;
994
- u.value = (u.value + C + L.value.length) % L.value.length, (_ = (h = g.value) == null ? void 0 : h.querySelector(`[data-index="${u.value}"]`)) == null || _.scrollIntoView({ block: "nearest" });
1150
+ const z = S.key === "ArrowDown" ? 1 : -1;
1151
+ f.value = (f.value + z + V.value.length) % V.value.length, (M = (x = p.value) == null ? void 0 : x.querySelector(`[data-index="${f.value}"]`)) == null || M.scrollIntoView({ block: "nearest" });
995
1152
  } else
996
- f.key === "Enter" && L.value[u.value] && (f.preventDefault(), W(L.value[u.value]));
1153
+ S.key === "Enter" && V.value[f.value] && (S.preventDefault(), $(V.value[f.value]));
997
1154
  }
998
- return Y(() => window.addEventListener("keydown", T)), Q(() => window.removeEventListener("keydown", T)), (f, h) => (a(), o(x, null, [
999
- s("button", {
1155
+ return ue(() => window.addEventListener("keydown", k)), ie(() => window.removeEventListener("keydown", k)), (S, x) => (n(), l(D, null, [
1156
+ u("button", {
1000
1157
  type: "button",
1001
1158
  class: "dsea-app-search-trigger",
1002
- "aria-label": i("common.searchText"),
1003
- onClick: F
1159
+ "aria-label": o("common.searchText"),
1160
+ onClick: K
1004
1161
  }, [
1005
- $(y(w), {
1162
+ _(h(L), {
1006
1163
  icon: "ant-design:search-outlined",
1007
1164
  size: 18
1008
1165
  })
1009
- ], 8, He),
1010
- (a(), P(ge, { to: "body" }, [
1011
- l.value ? (a(), o("div", {
1166
+ ], 8, ta),
1167
+ (n(), E(ze, { to: "body" }, [
1168
+ s.value ? (n(), l("div", {
1012
1169
  key: 0,
1013
- class: "dsea-app-search-backdrop",
1014
- onClick: H(D, ["self"])
1170
+ class: q(["dsea-app-search-backdrop", { "is-classic": e.classic }]),
1171
+ onClick: ee(O, ["self"])
1015
1172
  }, [
1016
- s("section", {
1173
+ u("section", {
1017
1174
  class: "dsea-app-search-modal",
1018
1175
  role: "dialog",
1019
1176
  "aria-modal": "true",
1020
- "aria-label": i("common.searchText")
1177
+ "aria-label": o("common.searchText")
1021
1178
  }, [
1022
- s("div", Qe, [
1023
- $(y(w), {
1179
+ u("div", na, [
1180
+ _(h(L), {
1024
1181
  icon: "ant-design:search-outlined",
1025
1182
  size: 18
1026
1183
  }),
1027
- K(s("input", {
1184
+ J(u("input", {
1028
1185
  ref_key: "inputEl",
1029
1186
  ref: b,
1030
- "onUpdate:modelValue": h[0] || (h[0] = (_) => r.value = _),
1187
+ "onUpdate:modelValue": x[0] || (x[0] = (M) => a.value = M),
1031
1188
  type: "search",
1032
- placeholder: i("common.searchText"),
1033
- "aria-label": i("common.searchText")
1034
- }, null, 8, Ge), [
1035
- [V, r.value]
1189
+ placeholder: o("common.searchText"),
1190
+ "aria-label": o("common.searchText")
1191
+ }, null, 8, la), [
1192
+ [Z, a.value]
1036
1193
  ]),
1037
- s("button", {
1194
+ u("button", {
1038
1195
  type: "button",
1039
1196
  class: "dsea-app-search-close",
1040
- "aria-label": i("common.cancelText"),
1041
- onClick: D
1197
+ "aria-label": o("common.cancelText"),
1198
+ onClick: O
1042
1199
  }, [
1043
- $(y(w), {
1200
+ _(h(L), {
1044
1201
  icon: "lucide:x",
1045
1202
  size: 18
1046
1203
  })
1047
- ], 8, Xe)
1204
+ ], 8, ia)
1048
1205
  ]),
1049
- L.value.length ? (a(), o("ul", {
1206
+ V.value.length ? (n(), l("ul", {
1050
1207
  key: 0,
1051
1208
  ref_key: "resultList",
1052
- ref: g,
1209
+ ref: p,
1053
1210
  class: "dsea-app-search-results",
1054
1211
  role: "listbox"
1055
1212
  }, [
1056
- (a(!0), o(x, null, M(L.value, (_, C) => (a(), o("li", {
1057
- key: _.path,
1058
- "data-index": C,
1213
+ (n(!0), l(D, null, U(V.value, (M, z) => (n(), l("li", {
1214
+ key: M.path,
1215
+ "data-index": z,
1059
1216
  role: "option",
1060
- "aria-selected": C === u.value,
1061
- class: N({ active: C === u.value }),
1062
- onMouseenter: (E) => u.value = C,
1063
- onClick: (E) => W(_)
1217
+ "aria-selected": z === f.value,
1218
+ class: q({ active: z === f.value }),
1219
+ onMouseenter: (X) => f.value = z,
1220
+ onClick: (X) => $(M)
1064
1221
  }, [
1065
- _.icon ? (a(), P(y(w), {
1222
+ M.icon ? (n(), E(h(L), {
1066
1223
  key: 0,
1067
- icon: _.icon,
1224
+ icon: M.icon,
1068
1225
  size: 18
1069
- }, null, 8, ["icon"])) : p("", !0),
1070
- s("span", null, d(_.label), 1),
1071
- C === u.value ? (a(), P(y(w), {
1226
+ }, null, 8, ["icon"])) : v("", !0),
1227
+ u("span", null, m(M.label), 1),
1228
+ z === f.value ? (n(), E(h(L), {
1072
1229
  key: 1,
1073
1230
  icon: "ant-design:enter-outlined",
1074
1231
  size: 16
1075
- })) : p("", !0)
1076
- ], 42, Ye))), 128))
1077
- ], 512)) : r.value.trim() ? (a(), o("div", Je, d(i("component.app.searchNotData")), 1)) : p("", !0)
1078
- ], 8, je)
1079
- ])) : p("", !0)
1232
+ })) : v("", !0)
1233
+ ], 42, oa))), 128))
1234
+ ], 512)) : a.value.trim() || e.classic ? (n(), l("div", sa, m(o("component.app.searchNotData")), 1)) : v("", !0),
1235
+ e.classic ? (n(), l("div", ra, [
1236
+ x[1] || (x[1] = u("kbd", null, "Enter", -1)),
1237
+ u("span", null, m(r.value.search), 1),
1238
+ x[2] || (x[2] = u("kbd", null, "↑", -1)),
1239
+ x[3] || (x[3] = u("kbd", null, "↓", -1)),
1240
+ u("span", null, m(r.value.navigate), 1),
1241
+ x[4] || (x[4] = u("kbd", null, "Esc", -1)),
1242
+ u("span", null, m(r.value.close), 1)
1243
+ ])) : v("", !0)
1244
+ ], 8, aa)
1245
+ ], 2)) : v("", !0)
1080
1246
  ]))
1081
1247
  ], 64));
1082
1248
  }
1083
1249
  });
1084
- const tl = /* @__PURE__ */ A(Ze, [["__scopeId", "data-v-2b474f9e"]]), et = ["aria-label"], tt = ["src", "alt"], at = {
1250
+ const da = /* @__PURE__ */ j(ua, [["__scopeId", "data-v-d43f4620"]]), ca = ["aria-label", "title"], ma = ["src", "alt"], ga = {
1085
1251
  key: 1,
1086
1252
  class: "dsea-user-menu__initial"
1087
- }, nt = { class: "dsea-user-menu__name" }, lt = { role: "menu" }, ot = ["onClick"], st = /* @__PURE__ */ k({
1253
+ }, va = { class: "dsea-user-menu__name" }, ba = { role: "menu" }, ha = ["onClick"], pa = /* @__PURE__ */ N({
1088
1254
  __name: "AdminUserMenu",
1089
1255
  props: {
1090
1256
  name: {},
@@ -1094,146 +1260,155 @@ const tl = /* @__PURE__ */ A(Ze, [["__scopeId", "data-v-2b474f9e"]]), et = ["ari
1094
1260
  },
1095
1261
  emits: ["select"],
1096
1262
  setup(e, { emit: c }) {
1097
- const t = c, i = S();
1098
- function l(n) {
1099
- n.currentTarget.open = !1;
1263
+ const t = c, i = A();
1264
+ function o(s) {
1265
+ s.currentTarget.open = !1;
1100
1266
  }
1101
- function r(n) {
1102
- t("select", n), i.value && (i.value.open = !1);
1267
+ function r(s) {
1268
+ t("select", s), i.value && (i.value.open = !1);
1103
1269
  }
1104
- return (n, u) => (a(), o("details", {
1270
+ return (s, a) => (n(), l("details", {
1105
1271
  ref_key: "menu",
1106
1272
  ref: i,
1107
1273
  class: "dsea-user-menu",
1108
- onKeydown: J(l, ["esc"])
1274
+ onKeydown: pe(o, ["esc"])
1109
1275
  }, [
1110
- s("summary", { "aria-label": e.label }, [
1111
- e.avatar ? (a(), o("img", {
1276
+ u("summary", {
1277
+ "aria-label": e.label || e.name,
1278
+ title: e.label || e.name
1279
+ }, [
1280
+ e.avatar ? (n(), l("img", {
1112
1281
  key: 0,
1113
1282
  src: e.avatar,
1114
1283
  alt: e.name
1115
- }, null, 8, tt)) : (a(), o("span", at, d(e.name.slice(0, 1).toUpperCase()), 1)),
1116
- s("span", nt, d(e.name), 1),
1117
- $(y(w), {
1284
+ }, null, 8, ma)) : (n(), l("span", ga, m(e.name.slice(0, 1).toUpperCase()), 1)),
1285
+ u("span", va, m(e.name), 1),
1286
+ _(h(L), {
1118
1287
  icon: "lucide:chevron-down",
1119
1288
  size: 14
1120
1289
  })
1121
- ], 8, et),
1122
- s("ul", lt, [
1123
- (a(!0), o(x, null, M(e.items, (b) => (a(), o("li", {
1124
- key: b.key,
1125
- role: "none"
1290
+ ], 8, ca),
1291
+ u("ul", ba, [
1292
+ (n(!0), l(D, null, U(e.items, (g) => (n(), l("li", {
1293
+ key: g.key,
1294
+ role: "none",
1295
+ class: q({ "has-divider": g.dividerBefore })
1126
1296
  }, [
1127
- s("button", {
1297
+ u("button", {
1128
1298
  type: "button",
1129
1299
  role: "menuitem",
1130
- onClick: (g) => r(b.key)
1300
+ onClick: (f) => r(g.key)
1131
1301
  }, [
1132
- b.icon ? (a(), P(y(w), {
1302
+ g.icon ? (n(), E(h(L), {
1133
1303
  key: 0,
1134
- icon: b.icon,
1304
+ icon: g.icon,
1135
1305
  size: 16
1136
- }, null, 8, ["icon"])) : p("", !0),
1137
- z(" " + d(b.label), 1)
1138
- ], 8, ot)
1139
- ]))), 128))
1306
+ }, null, 8, ["icon"])) : v("", !0),
1307
+ Q(" " + m(g.label), 1)
1308
+ ], 8, ha)
1309
+ ], 2))), 128))
1140
1310
  ])
1141
1311
  ], 544));
1142
1312
  }
1143
1313
  });
1144
- const al = /* @__PURE__ */ A(st, [["__scopeId", "data-v-d193d9f3"]]), it = ["aria-label"], rt = {
1314
+ const fa = /* @__PURE__ */ j(pa, [["__scopeId", "data-v-b5b45cf6"]]), ya = ["aria-label", "title"], ka = {
1145
1315
  key: 0,
1146
1316
  class: "dsea-notifications__count"
1147
- }, dt = ["aria-label"], ct = {
1317
+ }, wa = ["aria-label"], Sa = { key: 0 }, Ca = {
1148
1318
  class: "dsea-notifications__tabs",
1149
1319
  role: "tablist"
1150
- }, ut = ["aria-selected", "onClick"], mt = { key: 0 }, bt = ["onClick"], vt = { key: 0 }, pt = { key: 1 }, gt = {
1151
- key: 1,
1320
+ }, $a = ["aria-selected", "onClick"], xa = { key: 1 }, _a = ["onClick"], La = { key: 0 }, Ma = { key: 1 }, Ta = {
1321
+ key: 2,
1152
1322
  class: "dsea-notifications__empty"
1153
- }, ht = /* @__PURE__ */ k({
1323
+ }, Aa = /* @__PURE__ */ N({
1154
1324
  __name: "AdminNotificationCenter",
1155
1325
  props: {
1156
1326
  items: {},
1157
1327
  categories: {},
1158
1328
  label: { default: "Notifications" },
1329
+ icon: { default: "lucide:bell" },
1330
+ classic: { type: Boolean, default: !1 },
1159
1331
  emptyLabel: { default: "No notifications" },
1160
1332
  markAllLabel: { default: "Mark all as read" }
1161
1333
  },
1162
1334
  emits: ["open", "markAllRead"],
1163
1335
  setup(e, { emit: c }) {
1164
- var b;
1165
- const t = e, i = c, l = S(((b = t.categories[0]) == null ? void 0 : b.key) ?? "");
1166
- U(() => t.categories, (g) => {
1167
- var v;
1168
- g.some((m) => m.key === l.value) || (l.value = ((v = g[0]) == null ? void 0 : v.key) ?? "");
1336
+ var g;
1337
+ const t = e, i = c, o = A(((g = t.categories[0]) == null ? void 0 : g.key) ?? "");
1338
+ G(() => t.categories, (f) => {
1339
+ var b;
1340
+ f.some((p) => p.key === o.value) || (o.value = ((b = f[0]) == null ? void 0 : b.key) ?? "");
1169
1341
  });
1170
- const r = I(() => t.items.filter((g) => !g.read).length), n = I(() => t.items.filter((g) => g.category === l.value));
1171
- function u(g) {
1172
- g.currentTarget.open = !1;
1342
+ const r = T(() => t.items.filter((f) => !f.read).length), s = T(() => t.items.filter((f) => f.category === o.value));
1343
+ function a(f) {
1344
+ f.currentTarget.open = !1;
1173
1345
  }
1174
- return (g, v) => (a(), o("details", {
1175
- class: "dsea-notifications",
1176
- onKeydown: J(u, ["esc"])
1346
+ return (f, b) => (n(), l("details", {
1347
+ class: q(["dsea-notifications", { "is-classic": e.classic }]),
1348
+ onKeydown: pe(a, ["esc"])
1177
1349
  }, [
1178
- s("summary", { "aria-label": e.label }, [
1179
- $(y(w), {
1180
- icon: "lucide:bell",
1350
+ u("summary", {
1351
+ "aria-label": e.label,
1352
+ title: e.label
1353
+ }, [
1354
+ _(h(L), {
1355
+ icon: e.icon,
1181
1356
  size: 18
1182
- }),
1183
- r.value ? (a(), o("span", rt, d(r.value > 99 ? "99+" : r.value), 1)) : p("", !0)
1184
- ], 8, it),
1185
- s("section", {
1357
+ }, null, 8, ["icon"]),
1358
+ r.value ? (n(), l("span", ka, m(r.value > 99 ? "99+" : r.value), 1)) : v("", !0)
1359
+ ], 8, ya),
1360
+ u("section", {
1186
1361
  class: "dsea-notifications__panel",
1187
1362
  "aria-label": e.label
1188
1363
  }, [
1189
- s("header", null, d(e.label), 1),
1190
- s("div", ct, [
1191
- (a(!0), o(x, null, M(e.categories, (m) => (a(), o("button", {
1192
- key: m.key,
1364
+ e.classic ? v("", !0) : (n(), l("header", Sa, m(e.label), 1)),
1365
+ u("div", Ca, [
1366
+ (n(!0), l(D, null, U(e.categories, (p) => (n(), l("button", {
1367
+ key: p.key,
1193
1368
  type: "button",
1194
1369
  role: "tab",
1195
- "aria-selected": l.value === m.key,
1196
- onClick: (L) => l.value = m.key
1197
- }, d(m.label), 9, ut))), 128))
1370
+ "aria-selected": o.value === p.key,
1371
+ onClick: (I) => o.value = p.key
1372
+ }, m(p.label), 9, $a))), 128))
1198
1373
  ]),
1199
- n.value.length ? (a(), o("ul", mt, [
1200
- (a(!0), o(x, null, M(n.value, (m) => (a(), o("li", {
1201
- key: m.id,
1202
- class: N({ "is-read": m.read })
1374
+ s.value.length ? (n(), l("ul", xa, [
1375
+ (n(!0), l(D, null, U(s.value, (p) => (n(), l("li", {
1376
+ key: p.id,
1377
+ class: q({ "is-read": p.read })
1203
1378
  }, [
1204
- s("button", {
1379
+ u("button", {
1205
1380
  type: "button",
1206
- onClick: (L) => i("open", m)
1381
+ onClick: (I) => i("open", p)
1207
1382
  }, [
1208
- s("strong", null, d(m.title), 1),
1209
- m.description ? (a(), o("span", vt, d(m.description), 1)) : p("", !0),
1210
- m.time ? (a(), o("small", pt, d(m.time), 1)) : p("", !0)
1211
- ], 8, bt)
1383
+ u("strong", null, m(p.title), 1),
1384
+ p.description ? (n(), l("span", La, m(p.description), 1)) : v("", !0),
1385
+ p.time ? (n(), l("small", Ma, m(p.time), 1)) : v("", !0)
1386
+ ], 8, _a)
1212
1387
  ], 2))), 128))
1213
- ])) : (a(), o("p", gt, d(e.emptyLabel), 1)),
1214
- r.value ? (a(), o("button", {
1215
- key: 2,
1388
+ ])) : (n(), l("p", Ta, m(e.emptyLabel), 1)),
1389
+ r.value ? (n(), l("button", {
1390
+ key: 3,
1216
1391
  type: "button",
1217
1392
  class: "dsea-notifications__mark",
1218
- onClick: v[0] || (v[0] = (m) => i("markAllRead"))
1219
- }, d(e.markAllLabel), 1)) : p("", !0)
1220
- ], 8, dt)
1221
- ], 32));
1393
+ onClick: b[0] || (b[0] = (p) => i("markAllRead"))
1394
+ }, m(e.markAllLabel), 1)) : v("", !0)
1395
+ ], 8, wa)
1396
+ ], 34));
1222
1397
  }
1223
1398
  });
1224
- const nl = /* @__PURE__ */ A(ht, [["__scopeId", "data-v-c5c5a82f"]]), ft = ["aria-hidden", "inert"], yt = { class: "dsea-admin-layout__brand" }, kt = ["aria-label"], _t = {
1399
+ const Pa = /* @__PURE__ */ j(Aa, [["__scopeId", "data-v-14b591ef"]]), Ba = ["aria-hidden", "inert"], Fa = { class: "dsea-admin-layout__brand" }, Ea = ["aria-label"], Na = {
1225
1400
  key: 0,
1226
1401
  class: "dsea-admin-layout__sidebar-footer"
1227
- }, wt = ["aria-label", "aria-valuenow", "aria-valuemin", "aria-valuemax"], $t = ["aria-label"], Lt = { class: "dsea-admin-layout__main" }, Ct = {
1402
+ }, Ia = ["aria-label", "aria-valuenow", "aria-valuemin", "aria-valuemax"], za = ["aria-label"], Da = { class: "dsea-admin-layout__main" }, Ra = {
1228
1403
  key: 0,
1229
1404
  class: "dsea-admin-layout__header"
1230
- }, St = ["aria-label", "aria-expanded"], xt = ["aria-label"], At = { class: "dsea-admin-layout__header-actions" }, Mt = {
1405
+ }, Ka = ["aria-label", "aria-expanded"], Oa = ["aria-label"], Wa = { class: "dsea-admin-layout__header-actions" }, Va = {
1231
1406
  key: 1,
1232
1407
  class: "dsea-admin-layout__tabs"
1233
- }, Tt = { class: "dsea-admin-layout__content" }, Bt = {
1408
+ }, qa = { class: "dsea-admin-layout__content" }, Ua = {
1234
1409
  key: 2,
1235
1410
  class: "dsea-admin-layout__footer"
1236
- }, ll = /* @__PURE__ */ k({
1411
+ }, eo = /* @__PURE__ */ N({
1237
1412
  __name: "AdminLayout",
1238
1413
  props: {
1239
1414
  menus: { default: () => [] },
@@ -1258,85 +1433,85 @@ const nl = /* @__PURE__ */ A(ht, [["__scopeId", "data-v-c5c5a82f"]]), ft = ["ari
1258
1433
  },
1259
1434
  emits: ["update:collapsed", "menuClick", "update:sidebarWidth"],
1260
1435
  setup(e, { emit: c }) {
1261
- const t = e, i = c, { ports: l } = q(), r = S(!1), n = S(!1), u = I(() => t.showSidebar && t.mode !== "top" && !t.fullContent);
1262
- let b;
1263
- function g(h) {
1264
- return Math.min(t.maxSidebarWidth, Math.max(t.minSidebarWidth, h));
1436
+ const t = e, i = c, { ports: o } = te(), r = A(!1), s = A(!1), a = T(() => t.showSidebar && t.mode !== "top" && !t.fullContent);
1437
+ let g;
1438
+ function f(k) {
1439
+ return Math.min(t.maxSidebarWidth, Math.max(t.minSidebarWidth, k));
1265
1440
  }
1266
- function v(h) {
1267
- if (h.button !== 0)
1441
+ function b(k) {
1442
+ if (k.button !== 0)
1268
1443
  return;
1269
- b == null || b();
1270
- const _ = h.clientX, C = t.sidebarWidth, E = (G) => i("update:sidebarWidth", g(C + G.clientX - _)), R = () => b == null ? void 0 : b();
1271
- window.addEventListener("pointermove", E), window.addEventListener("pointerup", R), window.addEventListener("pointercancel", R), b = () => {
1272
- window.removeEventListener("pointermove", E), window.removeEventListener("pointerup", R), window.removeEventListener("pointercancel", R), b = void 0;
1444
+ g == null || g();
1445
+ const S = k.clientX, x = t.sidebarWidth, M = (X) => i("update:sidebarWidth", f(x + X.clientX - S)), z = () => g == null ? void 0 : g();
1446
+ window.addEventListener("pointermove", M), window.addEventListener("pointerup", z), window.addEventListener("pointercancel", z), g = () => {
1447
+ window.removeEventListener("pointermove", M), window.removeEventListener("pointerup", z), window.removeEventListener("pointercancel", z), g = void 0;
1273
1448
  };
1274
1449
  }
1275
- function m(h) {
1276
- h.key !== "ArrowLeft" && h.key !== "ArrowRight" || (h.preventDefault(), i("update:sidebarWidth", g(t.sidebarWidth + (h.key === "ArrowRight" ? 10 : -10))));
1450
+ function p(k) {
1451
+ k.key !== "ArrowLeft" && k.key !== "ArrowRight" || (k.preventDefault(), i("update:sidebarWidth", f(t.sidebarWidth + (k.key === "ArrowRight" ? 10 : -10))));
1277
1452
  }
1278
- be({ prefixCls: S("dsea"), isMobile: r });
1279
- const L = I(() => ({
1453
+ Ve({ prefixCls: A("dsea"), isMobile: r });
1454
+ const I = T(() => ({
1280
1455
  "--dsea-sidebar-width": `${t.sidebarWidth}px`,
1281
1456
  "--dsea-collapsed-width": `${t.collapsedWidth}px`,
1282
1457
  "--dsea-header-height": `${t.headerHeight}px`
1283
1458
  }));
1284
- function F() {
1285
- const h = window.innerWidth < t.mobileBreakpoint;
1286
- h !== r.value && (r.value = h, n.value = !1);
1287
- }
1288
- function D() {
1289
- n.value = !1;
1290
- }
1291
- function W() {
1292
- r.value ? n.value = !n.value : i("update:collapsed", !t.collapsed);
1293
- }
1294
- function T(h) {
1295
- i("menuClick", h), D(), l.navigation.go(h);
1296
- }
1297
- function f(h) {
1298
- h.key === "Escape" && n.value && D();
1299
- }
1300
- return U(() => t.mobileBreakpoint, F), U(() => t.fullContent, () => {
1301
- n.value = !1;
1302
- }), Y(() => {
1303
- F(), window.addEventListener("resize", F), window.addEventListener("keydown", f);
1304
- }), Q(() => {
1305
- b == null || b(), window.removeEventListener("resize", F), window.removeEventListener("keydown", f);
1306
- }), (h, _) => (a(), o("div", {
1307
- class: N(["dsea-admin-layout", { "dsea-admin-layout--mobile": r.value, "dsea-admin-layout--collapsed": e.collapsed, "dsea-admin-layout--no-sidebar": !u.value }]),
1308
- style: ie(L.value)
1459
+ function H() {
1460
+ const k = window.innerWidth < t.mobileBreakpoint;
1461
+ k !== r.value && (r.value = k, s.value = !1);
1462
+ }
1463
+ function V() {
1464
+ s.value = !1;
1465
+ }
1466
+ function K() {
1467
+ r.value ? s.value = !s.value : i("update:collapsed", !t.collapsed);
1468
+ }
1469
+ function O(k) {
1470
+ i("menuClick", k), V(), o.navigation.go(k);
1471
+ }
1472
+ function $(k) {
1473
+ k.key === "Escape" && s.value && V();
1474
+ }
1475
+ return G(() => t.mobileBreakpoint, H), G(() => t.fullContent, () => {
1476
+ s.value = !1;
1477
+ }), ue(() => {
1478
+ H(), window.addEventListener("resize", H), window.addEventListener("keydown", $);
1479
+ }), ie(() => {
1480
+ g == null || g(), window.removeEventListener("resize", H), window.removeEventListener("keydown", $);
1481
+ }), (k, S) => (n(), l("div", {
1482
+ class: q(["dsea-admin-layout", { "dsea-admin-layout--mobile": r.value, "dsea-admin-layout--collapsed": e.collapsed, "dsea-admin-layout--no-sidebar": !a.value }]),
1483
+ style: fe(I.value)
1309
1484
  }, [
1310
- u.value ? (a(), o("aside", {
1485
+ a.value ? (n(), l("aside", {
1311
1486
  key: 0,
1312
- class: N(["dsea-admin-layout__sidebar", { "dsea-admin-layout__sidebar--open": n.value }]),
1313
- "aria-hidden": r.value && !n.value,
1314
- inert: r.value && !n.value
1487
+ class: q(["dsea-admin-layout__sidebar", { "dsea-admin-layout__sidebar--open": s.value }]),
1488
+ "aria-hidden": r.value && !s.value,
1489
+ inert: r.value && !s.value
1315
1490
  }, [
1316
- s("div", yt, [
1317
- B(h.$slots, "brand", {}, () => [
1318
- $(Ce, {
1491
+ u("div", Fa, [
1492
+ B(k.$slots, "brand", {}, () => [
1493
+ _(be, {
1319
1494
  "show-title": !e.collapsed || r.value
1320
1495
  }, null, 8, ["show-title"])
1321
1496
  ])
1322
1497
  ]),
1323
- s("nav", {
1498
+ u("nav", {
1324
1499
  class: "dsea-admin-layout__navigation",
1325
1500
  "aria-label": e.navigationLabel
1326
1501
  }, [
1327
- B(h.$slots, "navigation", {}, () => [
1328
- $(te, {
1502
+ B(k.$slots, "navigation", {}, () => [
1503
+ _(he, {
1329
1504
  items: e.menus,
1330
1505
  collapse: e.collapsed && !r.value,
1331
1506
  theme: e.menuTheme,
1332
- onMenuClick: T
1507
+ onMenuClick: O
1333
1508
  }, null, 8, ["items", "collapse", "theme"])
1334
1509
  ])
1335
- ], 8, kt),
1336
- h.$slots.sidebarFooter ? (a(), o("div", _t, [
1337
- B(h.$slots, "sidebarFooter")
1338
- ])) : p("", !0),
1339
- e.resizableSidebar && !r.value && !e.collapsed ? (a(), o("div", {
1510
+ ], 8, Ea),
1511
+ k.$slots.sidebarFooter ? (n(), l("div", Na, [
1512
+ B(k.$slots, "sidebarFooter")
1513
+ ])) : v("", !0),
1514
+ e.resizableSidebar && !r.value && !e.collapsed ? (n(), l("div", {
1340
1515
  key: 1,
1341
1516
  class: "dsea-admin-layout__resize",
1342
1517
  role: "separator",
@@ -1346,104 +1521,1548 @@ const nl = /* @__PURE__ */ A(ht, [["__scopeId", "data-v-c5c5a82f"]]), ft = ["ari
1346
1521
  "aria-valuenow": e.sidebarWidth,
1347
1522
  "aria-valuemin": e.minSidebarWidth,
1348
1523
  "aria-valuemax": e.maxSidebarWidth,
1349
- onPointerdown: v,
1350
- onKeydown: m
1351
- }, null, 40, wt)) : p("", !0)
1352
- ], 10, ft)) : p("", !0),
1353
- u.value && r.value && n.value ? (a(), o("button", {
1524
+ onPointerdown: b,
1525
+ onKeydown: p
1526
+ }, null, 40, Ia)) : v("", !0)
1527
+ ], 10, Ba)) : v("", !0),
1528
+ a.value && r.value && s.value ? (n(), l("button", {
1354
1529
  key: 1,
1355
1530
  type: "button",
1356
1531
  class: "dsea-admin-layout__scrim",
1357
1532
  "aria-label": e.closeNavigationLabel,
1358
- onClick: D
1359
- }, null, 8, $t)) : p("", !0),
1360
- s("div", Lt, [
1361
- e.fullContent ? p("", !0) : (a(), o("header", Ct, [
1362
- u.value ? (a(), o("button", {
1533
+ onClick: V
1534
+ }, null, 8, za)) : v("", !0),
1535
+ u("div", Da, [
1536
+ e.fullContent ? v("", !0) : (n(), l("header", Ra, [
1537
+ a.value ? (n(), l("button", {
1363
1538
  key: 0,
1364
1539
  type: "button",
1365
1540
  class: "dsea-admin-layout__toggle",
1366
1541
  "aria-label": e.navigationLabel,
1367
- "aria-expanded": r.value ? n.value : !e.collapsed,
1368
- onClick: W
1542
+ "aria-expanded": r.value ? s.value : !e.collapsed,
1543
+ onClick: K
1369
1544
  }, [
1370
- $(y(w), {
1371
- icon: r.value && n.value ? "lucide:x" : "lucide:menu",
1545
+ _(h(L), {
1546
+ icon: r.value && s.value ? "lucide:x" : "lucide:menu",
1372
1547
  size: 20
1373
1548
  }, null, 8, ["icon"])
1374
- ], 8, St)) : p("", !0),
1375
- B(h.$slots, "header"),
1376
- e.mode !== "sidebar" ? (a(), o("nav", {
1549
+ ], 8, Ka)) : v("", !0),
1550
+ B(k.$slots, "header"),
1551
+ e.mode !== "sidebar" ? (n(), l("nav", {
1377
1552
  key: 1,
1378
1553
  class: "dsea-admin-layout__top-navigation",
1379
1554
  "aria-label": e.topNavigationLabel
1380
1555
  }, [
1381
- B(h.$slots, "topNavigation", {}, () => [
1382
- $(te, {
1556
+ B(k.$slots, "topNavigation", {}, () => [
1557
+ _(he, {
1383
1558
  items: e.mode === "top" ? e.menus : e.topMenus,
1384
1559
  mode: "horizontal",
1385
1560
  type: "top",
1386
1561
  theme: e.topMenuTheme,
1387
- onMenuClick: T
1562
+ onMenuClick: O
1388
1563
  }, null, 8, ["items", "theme"])
1389
1564
  ])
1390
- ], 8, xt)) : p("", !0),
1391
- s("div", At, [
1392
- B(h.$slots, "headerActions")
1565
+ ], 8, Oa)) : v("", !0),
1566
+ u("div", Wa, [
1567
+ B(k.$slots, "headerActions")
1393
1568
  ])
1394
1569
  ])),
1395
- !e.fullContent && h.$slots.tabs ? (a(), o("div", Mt, [
1396
- B(h.$slots, "tabs")
1397
- ])) : p("", !0),
1398
- s("main", Tt, [
1399
- B(h.$slots, "default")
1570
+ !e.fullContent && k.$slots.tabs ? (n(), l("div", Va, [
1571
+ B(k.$slots, "tabs")
1572
+ ])) : v("", !0),
1573
+ u("main", qa, [
1574
+ B(k.$slots, "default")
1400
1575
  ]),
1401
- !e.fullContent && h.$slots.footer ? (a(), o("footer", Bt, [
1402
- B(h.$slots, "footer")
1403
- ])) : p("", !0)
1576
+ !e.fullContent && k.$slots.footer ? (n(), l("footer", Ua, [
1577
+ B(k.$slots, "footer")
1578
+ ])) : v("", !0)
1404
1579
  ])
1405
1580
  ], 6));
1406
1581
  }
1407
1582
  });
1408
- const Pt = ["aria-label"], It = {
1583
+ const Ha = ["aria-label"], ja = {
1409
1584
  key: 0,
1410
1585
  class: "dsea-breadcrumb__separator",
1411
1586
  "aria-hidden": "true"
1412
- }, Et = ["onClick"], Ft = ["aria-current"], Nt = /* @__PURE__ */ k({
1587
+ }, Qa = ["onClick"], Xa = ["aria-current"], Ya = /* @__PURE__ */ N({
1413
1588
  __name: "AdminBreadcrumb",
1414
1589
  props: {
1415
1590
  items: {},
1416
- label: {}
1591
+ label: {},
1592
+ showIcons: { type: Boolean }
1417
1593
  },
1418
1594
  setup(e) {
1419
- const { ports: c } = q();
1595
+ const { ports: c } = te();
1420
1596
  function t(i) {
1421
1597
  c.navigation.go(i);
1422
1598
  }
1423
- return (i, l) => e.items.length ? (a(), o("nav", {
1599
+ return (i, o) => e.items.length ? (n(), l("nav", {
1424
1600
  key: 0,
1425
1601
  class: "dsea-breadcrumb",
1426
1602
  "aria-label": e.label
1427
1603
  }, [
1428
- s("ol", null, [
1429
- (a(!0), o(x, null, M(e.items, (r, n) => (a(), o("li", {
1430
- key: r.path || n
1604
+ u("ol", null, [
1605
+ (n(!0), l(D, null, U(e.items, (r, s) => (n(), l("li", {
1606
+ key: r.path || s
1431
1607
  }, [
1432
- n ? (a(), o("span", It, "/")) : p("", !0),
1433
- r.path && n < e.items.length - 1 ? (a(), o("button", {
1608
+ s ? (n(), l("span", ja, "/")) : v("", !0),
1609
+ r.path && s < e.items.length - 1 ? (n(), l("button", {
1434
1610
  key: 1,
1435
1611
  type: "button",
1436
- onClick: (u) => t(r.path)
1437
- }, d(r.title), 9, Et)) : (a(), o("span", {
1612
+ onClick: (a) => t(r.path)
1613
+ }, [
1614
+ e.showIcons && r.icon ? (n(), E(h(L), {
1615
+ key: 0,
1616
+ icon: r.icon,
1617
+ size: 14
1618
+ }, null, 8, ["icon"])) : v("", !0),
1619
+ Q(" " + m(r.title), 1)
1620
+ ], 8, Qa)) : (n(), l("span", {
1438
1621
  key: 2,
1439
- "aria-current": n === e.items.length - 1 ? "page" : void 0
1440
- }, d(r.title), 9, Ft))
1622
+ "aria-current": s === e.items.length - 1 ? "page" : void 0
1623
+ }, [
1624
+ e.showIcons && r.icon ? (n(), E(h(L), {
1625
+ key: 0,
1626
+ icon: r.icon,
1627
+ size: 14
1628
+ }, null, 8, ["icon"])) : v("", !0),
1629
+ Q(" " + m(r.title), 1)
1630
+ ], 8, Xa))
1441
1631
  ]))), 128))
1442
1632
  ])
1443
- ], 8, Pt)) : p("", !0);
1633
+ ], 8, Ha)) : v("", !0);
1444
1634
  }
1445
1635
  });
1446
- const ol = /* @__PURE__ */ A(Nt, [["__scopeId", "data-v-49bfd66c"]]), zt = { class: "dsea-iframe-view" }, Dt = ["src", "title", "loading", "referrerpolicy"], Kt = /* @__PURE__ */ k({
1636
+ const Ga = /* @__PURE__ */ j(Ya, [["__scopeId", "data-v-d1e7aa11"]]), Ja = { class: "dsea-admin-tabs" }, Za = {
1637
+ class: "dsea-admin-tabs__list",
1638
+ role: "tablist"
1639
+ }, en = ["draggable", "onDragstart", "onDrop", "onContextmenu"], tn = ["aria-selected", "onClick"], an = ["aria-label", "onClick"], nn = {
1640
+ key: 0,
1641
+ class: "dsea-admin-tabs__tools"
1642
+ }, ln = ["aria-label"], on = ["aria-label"], sn = ["aria-label"], rn = ["disabled", "onClick"], un = /* @__PURE__ */ N({
1643
+ __name: "AdminTabs",
1644
+ props: {
1645
+ tabs: {},
1646
+ activeKey: {},
1647
+ labels: {},
1648
+ navigateOnSelect: { type: Boolean, default: !0 },
1649
+ showRedo: { type: Boolean, default: !0 },
1650
+ showQuick: { type: Boolean, default: !0 },
1651
+ showFold: { type: Boolean, default: !1 },
1652
+ folded: { type: Boolean, default: !1 },
1653
+ canDrag: { type: Boolean, default: !1 }
1654
+ },
1655
+ emits: ["select", "close", "refresh", "closeAction", "fold", "reorder"],
1656
+ setup(e, { emit: c }) {
1657
+ const t = e, i = c, { ports: o } = te(), r = A(""), s = A(null);
1658
+ function a($) {
1659
+ var M;
1660
+ const k = t.tabs.findIndex((z) => z.key === $), S = $ === t.activeKey, x = t.tabs.length <= 1;
1661
+ return [
1662
+ { event: "refresh", text: t.labels.refresh, disabled: !S },
1663
+ { event: "current", text: t.labels.close, disabled: x || !!((M = t.tabs[k]) != null && M.affix) },
1664
+ { event: "left", text: t.labels.closeLeft, disabled: !S || k <= 0 },
1665
+ { event: "right", text: t.labels.closeRight, disabled: !S || k >= t.tabs.length - 1 },
1666
+ { event: "others", text: t.labels.closeOthers, disabled: x || !S },
1667
+ { event: "all", text: t.labels.closeAll, disabled: x }
1668
+ ];
1669
+ }
1670
+ function g($) {
1671
+ s.value = null, i("select", $), t.navigateOnSelect && o.navigation.go($);
1672
+ }
1673
+ function f($) {
1674
+ i("close", $);
1675
+ }
1676
+ function b($) {
1677
+ $ && ($.event === "refresh" ? i("refresh", t.activeKey) : i("closeAction", $.event, t.activeKey));
1678
+ }
1679
+ function p($) {
1680
+ t.canDrag && $.dataTransfer && ($.dataTransfer.dropEffect = "move");
1681
+ }
1682
+ function I($) {
1683
+ if (!t.canDrag || !r.value || r.value === $)
1684
+ return;
1685
+ const k = t.tabs.map((M) => M.key), S = k.indexOf(r.value), x = k.indexOf($);
1686
+ S < 0 || x < 0 || (k.splice(x, 0, k.splice(S, 1)[0]), i("reorder", k), r.value = "");
1687
+ }
1688
+ function H($, k) {
1689
+ s.value = {
1690
+ key: $,
1691
+ x: Math.max(0, Math.min(k.clientX, window.innerWidth - 180)),
1692
+ y: Math.max(0, Math.min(k.clientY, window.innerHeight - 180))
1693
+ };
1694
+ }
1695
+ function V($) {
1696
+ s.value && ($ === "refresh" ? i("refresh", s.value.key) : i("closeAction", $, s.value.key), s.value = null);
1697
+ }
1698
+ function K($) {
1699
+ var k, S;
1700
+ (S = (k = $.target) == null ? void 0 : k.closest) != null && S.call(k, ".dsea-admin-tabs__context") || (s.value = null);
1701
+ }
1702
+ function O($) {
1703
+ $.key === "Escape" && (s.value = null);
1704
+ }
1705
+ return ue(() => {
1706
+ window.addEventListener("pointerdown", K), window.addEventListener("keydown", O), window.addEventListener("resize", K), window.addEventListener("scroll", K, !0);
1707
+ }), ie(() => {
1708
+ window.removeEventListener("pointerdown", K), window.removeEventListener("keydown", O), window.removeEventListener("resize", K), window.removeEventListener("scroll", K, !0);
1709
+ }), ($, k) => (n(), l(D, null, [
1710
+ u("div", Ja, [
1711
+ u("div", Za, [
1712
+ (n(!0), l(D, null, U(e.tabs, (S) => (n(), l("div", {
1713
+ key: S.key,
1714
+ class: q(["dsea-admin-tabs__item", { "dsea-admin-tabs__item--active": S.key === e.activeKey }]),
1715
+ draggable: e.canDrag,
1716
+ onDragstart: (x) => r.value = S.key,
1717
+ onDragend: k[0] || (k[0] = (x) => r.value = ""),
1718
+ onDragover: ee(p, ["prevent"]),
1719
+ onDrop: ee((x) => I(S.key), ["prevent"]),
1720
+ onContextmenu: ee((x) => H(S.key, x), ["prevent"])
1721
+ }, [
1722
+ u("button", {
1723
+ type: "button",
1724
+ role: "tab",
1725
+ "aria-selected": S.key === e.activeKey,
1726
+ class: "dsea-admin-tabs__select",
1727
+ onClick: (x) => g(S.key)
1728
+ }, [
1729
+ S.icon ? (n(), E(h(L), {
1730
+ key: 0,
1731
+ icon: S.icon,
1732
+ size: 14
1733
+ }, null, 8, ["icon"])) : v("", !0),
1734
+ u("span", null, m(S.label), 1)
1735
+ ], 8, tn),
1736
+ S.affix ? v("", !0) : (n(), l("button", {
1737
+ key: 0,
1738
+ type: "button",
1739
+ class: "dsea-admin-tabs__close",
1740
+ "aria-label": `${e.labels.close}: ${S.label}`,
1741
+ onClick: (x) => f(S.key)
1742
+ }, [
1743
+ _(h(L), {
1744
+ icon: "lucide:x",
1745
+ size: 14
1746
+ })
1747
+ ], 8, an))
1748
+ ], 42, en))), 128))
1749
+ ]),
1750
+ e.tabs.length ? (n(), l("div", nn, [
1751
+ e.showRedo ? (n(), l("button", {
1752
+ key: 0,
1753
+ type: "button",
1754
+ "aria-label": e.labels.refresh,
1755
+ onClick: k[1] || (k[1] = (S) => i("refresh", e.activeKey))
1756
+ }, [
1757
+ _(h(L), {
1758
+ icon: "lucide:refresh-cw",
1759
+ size: 16
1760
+ })
1761
+ ], 8, ln)) : v("", !0),
1762
+ e.showQuick ? (n(), E(h(Re), {
1763
+ key: 1,
1764
+ "drop-menu-list": a(e.activeKey),
1765
+ trigger: ["click"],
1766
+ onMenuEvent: b
1767
+ }, {
1768
+ default: ne(() => [
1769
+ u("button", {
1770
+ type: "button",
1771
+ "aria-label": e.labels.actions
1772
+ }, [
1773
+ _(h(L), {
1774
+ icon: "lucide:chevron-down",
1775
+ size: 16
1776
+ })
1777
+ ], 8, on)
1778
+ ]),
1779
+ _: 1
1780
+ }, 8, ["drop-menu-list"])) : v("", !0),
1781
+ e.showFold ? (n(), l("button", {
1782
+ key: 2,
1783
+ type: "button",
1784
+ "aria-label": e.labels.fold || "Toggle layout chrome",
1785
+ onClick: k[2] || (k[2] = (S) => i("fold"))
1786
+ }, [
1787
+ _(h(L), {
1788
+ icon: e.folded ? "lucide:minimize" : "lucide:maximize",
1789
+ size: 16
1790
+ }, null, 8, ["icon"])
1791
+ ], 8, sn)) : v("", !0)
1792
+ ])) : v("", !0)
1793
+ ]),
1794
+ (n(), E(ze, { to: "body" }, [
1795
+ s.value ? (n(), l("div", {
1796
+ key: 0,
1797
+ class: "dsea-admin-tabs__context",
1798
+ role: "menu",
1799
+ style: fe({ left: `${s.value.x}px`, top: `${s.value.y}px` })
1800
+ }, [
1801
+ (n(!0), l(D, null, U(a(s.value.key), (S) => (n(), l("button", {
1802
+ key: S.event,
1803
+ type: "button",
1804
+ role: "menuitem",
1805
+ disabled: S.disabled,
1806
+ onClick: (x) => V(S.event)
1807
+ }, m(S.text), 9, rn))), 128))
1808
+ ], 4)) : v("", !0)
1809
+ ]))
1810
+ ], 64));
1811
+ }
1812
+ });
1813
+ const dn = { class: "dsea-settings-panel" }, cn = ["for"], mn = { key: 1 }, gn = ["aria-label"], vn = ["aria-label", "aria-pressed", "disabled", "onClick"], bn = ["aria-label"], hn = ["aria-pressed", "disabled", "onClick"], pn = /* @__PURE__ */ N({
1814
+ __name: "SettingsPanel",
1815
+ props: {
1816
+ sections: {}
1817
+ },
1818
+ emits: ["change"],
1819
+ setup(e, { emit: c }) {
1820
+ const t = c;
1821
+ function i(a, g) {
1822
+ t("change", a, g);
1823
+ }
1824
+ function o(a, g) {
1825
+ typeof g == "boolean" && i(a, g);
1826
+ }
1827
+ function r(a, g) {
1828
+ (typeof g == "string" || typeof g == "number") && i(a, g);
1829
+ }
1830
+ function s(a, g) {
1831
+ typeof g == "number" && Number.isFinite(g) && i(a, g);
1832
+ }
1833
+ return (a, g) => (n(), l("div", dn, [
1834
+ (n(!0), l(D, null, U(e.sections, (f) => (n(), l("section", {
1835
+ key: f.title,
1836
+ class: "dsea-settings-panel__section"
1837
+ }, [
1838
+ u("h3", null, m(f.title), 1),
1839
+ (n(!0), l(D, null, U(f.items, (b) => (n(), l("div", {
1840
+ key: b.key,
1841
+ class: q(["dsea-settings-panel__row", { "dsea-settings-panel__row--stacked": b.type === "color" || b.type === "mode" }])
1842
+ }, [
1843
+ b.type === "switch" || b.type === "select" || b.type === "number" ? (n(), l("label", {
1844
+ key: 0,
1845
+ for: b.key
1846
+ }, m(b.label), 9, cn)) : (n(), l("span", mn, m(b.label), 1)),
1847
+ b.type === "switch" ? (n(), E(h(ht), {
1848
+ key: 2,
1849
+ id: b.key,
1850
+ checked: b.value,
1851
+ disabled: b.disabled,
1852
+ onChange: (p) => o(b.key, p)
1853
+ }, null, 8, ["id", "checked", "disabled", "onChange"])) : b.type === "select" ? (n(), E(h(pt), {
1854
+ key: 3,
1855
+ id: b.key,
1856
+ value: b.value,
1857
+ options: b.options,
1858
+ disabled: b.disabled,
1859
+ class: "dsea-settings-panel__select",
1860
+ onChange: (p) => r(b.key, p)
1861
+ }, null, 8, ["id", "value", "options", "disabled", "onChange"])) : b.type === "number" ? (n(), E(h(ft), {
1862
+ key: 4,
1863
+ id: b.key,
1864
+ value: b.value,
1865
+ min: b.min,
1866
+ max: b.max,
1867
+ step: b.step,
1868
+ disabled: b.disabled,
1869
+ class: "dsea-settings-panel__number",
1870
+ onChange: (p) => s(b.key, p)
1871
+ }, null, 8, ["id", "value", "min", "max", "step", "disabled", "onChange"])) : b.type === "color" ? (n(), l("div", {
1872
+ key: 5,
1873
+ class: "dsea-settings-panel__colors",
1874
+ role: "group",
1875
+ "aria-label": b.label
1876
+ }, [
1877
+ (n(!0), l(D, null, U(b.colors, (p) => (n(), l("button", {
1878
+ key: p,
1879
+ type: "button",
1880
+ class: q(["dsea-settings-panel__swatch", { "dsea-settings-panel__swatch--active": b.value === p }]),
1881
+ style: fe({ backgroundColor: p }),
1882
+ "aria-label": p,
1883
+ "aria-pressed": b.value === p,
1884
+ disabled: b.disabled,
1885
+ onClick: (I) => i(b.key, p)
1886
+ }, [
1887
+ b.value === p ? (n(), E(h(L), {
1888
+ key: 0,
1889
+ icon: "lucide:check",
1890
+ size: 14
1891
+ })) : v("", !0)
1892
+ ], 14, vn))), 128))
1893
+ ], 8, gn)) : b.type === "mode" ? (n(), l("div", {
1894
+ key: 6,
1895
+ class: "dsea-settings-panel__modes",
1896
+ role: "group",
1897
+ "aria-label": b.label
1898
+ }, [
1899
+ (n(!0), l(D, null, U(b.options, (p) => (n(), l("button", {
1900
+ key: p.value,
1901
+ type: "button",
1902
+ class: q({ active: b.value === p.value }),
1903
+ "aria-pressed": b.value === p.value,
1904
+ disabled: b.disabled,
1905
+ onClick: (I) => i(b.key, p.value)
1906
+ }, [
1907
+ p.icon ? (n(), E(h(L), {
1908
+ key: 0,
1909
+ icon: p.icon,
1910
+ size: 16
1911
+ }, null, 8, ["icon"])) : v("", !0),
1912
+ Q(" " + m(p.label), 1)
1913
+ ], 10, hn))), 128))
1914
+ ], 8, bn)) : v("", !0)
1915
+ ], 2))), 128))
1916
+ ]))), 128))
1917
+ ]));
1918
+ }
1919
+ });
1920
+ const fn = /* @__PURE__ */ N({
1921
+ __name: "AdminSettingsDrawer",
1922
+ props: {
1923
+ open: { type: Boolean },
1924
+ title: {},
1925
+ sections: {},
1926
+ width: { default: 340 },
1927
+ resetLabel: {}
1928
+ },
1929
+ emits: ["update:open", "change", "reset"],
1930
+ setup(e, { emit: c }) {
1931
+ const t = c;
1932
+ return (i, o) => (n(), E(h(yt), {
1933
+ visible: e.open,
1934
+ title: e.title,
1935
+ placement: "right",
1936
+ width: e.width,
1937
+ onClose: o[2] || (o[2] = (r) => t("update:open", !1))
1938
+ }, mt({
1939
+ default: ne(() => [
1940
+ _(pn, {
1941
+ sections: e.sections,
1942
+ onChange: o[0] || (o[0] = (r, s) => t("change", r, s))
1943
+ }, null, 8, ["sections"])
1944
+ ]),
1945
+ _: 2
1946
+ }, [
1947
+ i.$slots.footer || e.resetLabel ? {
1948
+ name: "footer",
1949
+ fn: ne(() => [
1950
+ B(i.$slots, "footer", {}, () => [
1951
+ u("button", {
1952
+ type: "button",
1953
+ class: "dsea-settings-drawer__reset",
1954
+ onClick: o[1] || (o[1] = (r) => t("reset"))
1955
+ }, m(e.resetLabel), 1)
1956
+ ])
1957
+ ]),
1958
+ key: "0"
1959
+ } : void 0
1960
+ ]), 1032, ["visible", "title", "width"]));
1961
+ }
1962
+ });
1963
+ const ae = {
1964
+ darkMode: "light",
1965
+ themeColor: "#0960bd",
1966
+ grayMode: !1,
1967
+ colorWeak: !1,
1968
+ fullContent: !1,
1969
+ contentMode: "full",
1970
+ showLogo: !0,
1971
+ showFooter: !1,
1972
+ showDarkModeToggle: !0,
1973
+ settingButtonPosition: "auto",
1974
+ useOpenBackTop: !0,
1975
+ lockTime: 0,
1976
+ showBreadCrumb: !0,
1977
+ showBreadCrumbIcon: !0,
1978
+ showSettingButton: !0,
1979
+ headerSetting: {
1980
+ show: !0,
1981
+ fixed: !0,
1982
+ theme: "light",
1983
+ bgColor: "#ffffff",
1984
+ showSearch: !0,
1985
+ showNotice: !0,
1986
+ showFullScreen: !0,
1987
+ useLockPage: !0,
1988
+ showDoc: !0
1989
+ },
1990
+ menuSetting: {
1991
+ type: "mix",
1992
+ mode: "inline",
1993
+ show: !0,
1994
+ hidden: !1,
1995
+ siderHidden: !1,
1996
+ fixed: !0,
1997
+ collapsed: !1,
1998
+ collapsedShowTitle: !1,
1999
+ menuWidth: 240,
2000
+ bgColor: "#212121",
2001
+ theme: "dark",
2002
+ split: !0,
2003
+ topMenuAlign: "center",
2004
+ trigger: "FOOTER",
2005
+ accordion: !0,
2006
+ canDrag: !1,
2007
+ mixSideTrigger: "click",
2008
+ mixSideFixed: !1,
2009
+ closeMixSidebarOnChange: !1
2010
+ },
2011
+ multiTabsSetting: {
2012
+ cache: !1,
2013
+ show: !0,
2014
+ canDrag: !0,
2015
+ showQuick: !0,
2016
+ showRedo: !0,
2017
+ showFold: !0
2018
+ },
2019
+ transitionSetting: {
2020
+ enable: !0,
2021
+ basicTransition: "fade-slide",
2022
+ openPageLoading: !0,
2023
+ openNProgress: !1
2024
+ }
2025
+ }, yn = ["sidebar", "top-menu", "mix", "mix-sidebar"], Ce = /^#[0-9a-f]{3}(?:[0-9a-f]{3})?$/i;
2026
+ function $e(e = {}) {
2027
+ const c = {
2028
+ ...ae,
2029
+ ...e,
2030
+ headerSetting: { ...ae.headerSetting, ...e.headerSetting },
2031
+ menuSetting: { ...ae.menuSetting, ...e.menuSetting },
2032
+ multiTabsSetting: { ...ae.multiTabsSetting, ...e.multiTabsSetting },
2033
+ transitionSetting: { ...ae.transitionSetting, ...e.transitionSetting }
2034
+ };
2035
+ return yn.includes(c.menuSetting.type) || (c.menuSetting.type = "mix"), c.menuSetting.type === "top-menu" ? c.menuSetting.mode = "horizontal" : c.menuSetting.mode = "inline", Number.isFinite(c.menuSetting.menuWidth) || (c.menuSetting.menuWidth = 240), c.menuSetting.menuWidth = Math.max(100, Math.min(600, c.menuSetting.menuWidth)), Number.isFinite(c.lockTime) || (c.lockTime = 0), c.lockTime = Math.max(0, Math.min(1440, c.lockTime)), Ce.test(c.themeColor) || (c.themeColor = ae.themeColor), Ce.test(c.headerSetting.bgColor) || (c.headerSetting.bgColor = ae.headerSetting.bgColor), Ce.test(c.menuSetting.bgColor) || (c.menuSetting.bgColor = ae.menuSetting.bgColor), c;
2036
+ }
2037
+ function kn(e, c = "admin-shell:classic-layout", t = {}) {
2038
+ const i = e == null ? void 0 : e.read(c), o = A($e({
2039
+ ...t,
2040
+ ...i,
2041
+ headerSetting: { ...t.headerSetting, ...i == null ? void 0 : i.headerSetting },
2042
+ menuSetting: { ...t.menuSetting, ...i == null ? void 0 : i.menuSetting },
2043
+ multiTabsSetting: { ...t.multiTabsSetting, ...i == null ? void 0 : i.multiTabsSetting },
2044
+ transitionSetting: { ...t.transitionSetting, ...i == null ? void 0 : i.transitionSetting }
2045
+ }));
2046
+ function r(a) {
2047
+ return o.value = $e({
2048
+ ...o.value,
2049
+ ...a,
2050
+ headerSetting: { ...o.value.headerSetting, ...a.headerSetting },
2051
+ menuSetting: { ...o.value.menuSetting, ...a.menuSetting },
2052
+ multiTabsSetting: { ...o.value.multiTabsSetting, ...a.multiTabsSetting },
2053
+ transitionSetting: { ...o.value.transitionSetting, ...a.transitionSetting }
2054
+ }), e == null || e.write(c, gt(o.value)), o.value;
2055
+ }
2056
+ function s() {
2057
+ return o.value = $e(t), e == null || e.remove(c), o.value;
2058
+ }
2059
+ return { settings: o, patch: r, reset: s };
2060
+ }
2061
+ function qe(e) {
2062
+ var c;
2063
+ if (!(e.disabled || (c = e.meta) != null && c.hideMenu)) {
2064
+ for (const t of e.children ?? []) {
2065
+ const i = qe(t);
2066
+ if (i)
2067
+ return i;
2068
+ }
2069
+ return e.path && !re(e.path) && !/[:*]/.test(e.path) ? e.path : void 0;
2070
+ }
2071
+ }
2072
+ function wn(e, c, t) {
2073
+ var f;
2074
+ const i = e.filter((b) => {
2075
+ var p;
2076
+ return !((p = b.meta) != null && p.hideMenu);
2077
+ }), o = le(i, c)[0] ?? ((f = i[0]) == null ? void 0 : f.path), r = i.find((b) => b.path === o), s = t.type === "mix" && t.split, a = t.type === "top-menu" || s ? i.map((b) => ({ ...b, children: [] })) : [], g = s ? (r == null ? void 0 : r.children) ?? [] : i;
2078
+ return { rootPath: o, root: r, top: a, sidebar: g, split: s };
2079
+ }
2080
+ const Sn = {
2081
+ key: 0,
2082
+ class: "dsea-classic-layout__header"
2083
+ }, Cn = { class: "dsea-classic-layout__header-left" }, $n = {
2084
+ key: 0,
2085
+ class: "dsea-classic-layout__header-brand"
2086
+ }, xn = ["aria-label", "aria-expanded"], _n = ["aria-label"], Ln = { class: "dsea-classic-layout__header-actions" }, Mn = ["aria-label", "title"], Tn = {
2087
+ key: 0,
2088
+ class: "dsea-classic-layout__badge"
2089
+ }, An = ["aria-label", "title"], Pn = ["aria-label", "title"], Bn = { class: "dsea-classic-layout__body" }, Fn = ["aria-hidden", "inert"], En = { class: "dsea-classic-layout__rail" }, Nn = {
2090
+ key: 0,
2091
+ class: "dsea-classic-layout__sidebar-brand"
2092
+ }, In = ["title", "onClick", "onMouseenter"], zn = { key: 1 }, Dn = ["aria-label"], Rn = { class: "dsea-classic-layout__mix-panel-header" }, Kn = ["aria-label", "aria-pressed"], On = ["aria-label", "aria-valuenow"], Wn = {
2093
+ key: 0,
2094
+ class: "dsea-classic-layout__sidebar-brand"
2095
+ }, Vn = ["aria-label"], qn = ["aria-label", "aria-valuenow"], Un = ["aria-label"], Hn = { class: "dsea-classic-layout__workspace" }, jn = {
2096
+ key: 0,
2097
+ class: "dsea-classic-layout__tabs"
2098
+ }, Qn = {
2099
+ key: 2,
2100
+ class: "dsea-classic-layout__page-loading",
2101
+ role: "status"
2102
+ }, Xn = {
2103
+ key: 1,
2104
+ class: "dsea-classic-layout__footer"
2105
+ }, Yn = ["aria-label", "title"], Gn = { class: "dsea-classic-layout__content dsea-classic-layout__content--full" }, Jn = ["aria-label", "title"], Zn = ["aria-label", "title"], el = {
2106
+ key: 4,
2107
+ class: "dsea-classic-layout__progress",
2108
+ role: "progressbar"
2109
+ }, tl = { class: "dsea-classic-layout__settings-footer" }, to = /* @__PURE__ */ N({
2110
+ __name: "ClassicAdminLayout",
2111
+ props: {
2112
+ menus: {},
2113
+ tabs: { default: () => [] },
2114
+ activeTab: { default: "" },
2115
+ breadcrumbs: { default: () => [] },
2116
+ headerPorts: {},
2117
+ initialSettings: { default: () => ({}) },
2118
+ settingsCache: {},
2119
+ settingsKey: { default: "admin-shell:classic-layout" },
2120
+ mobileBreakpoint: { default: 992 },
2121
+ tabLabels: {},
2122
+ contentKey: {},
2123
+ pageLoading: { type: Boolean },
2124
+ navigationProgress: { type: Boolean },
2125
+ locked: { type: Boolean },
2126
+ sessionTimedOut: { type: Boolean },
2127
+ showCopySettings: { type: Boolean },
2128
+ allowClearState: { type: Boolean }
2129
+ },
2130
+ emits: ["settingsChange", "menuClick", "tabSelect", "tabClose", "tabRefresh", "tabCloseAction", "tabReorder", "lock", "clearState", "settingsCopied", "settingsCopyError"],
2131
+ setup(e, { emit: c }) {
2132
+ var Be;
2133
+ const t = e, i = c, { ports: o } = te(), r = _e(), s = kn(t.settingsCache ?? o.cache, t.settingsKey, t.initialSettings), a = s.settings, g = A(!1), f = A(!1), b = A(!1), p = A(!1), I = A(((Be = r.currentRoute.value.meta) == null ? void 0 : Be.currentActiveMenu) || r.currentRoute.value.path), H = A(r.currentRoute.value.meta ?? {}), V = A(""), K = A(a.value.menuSetting.mixSideFixed), O = T(() => a.value.menuSetting.type), $ = T(() => wn(t.menus, I.value, a.value.menuSetting)), k = T(() => t.menus.find((d) => d.path === V.value)), S = T(() => {
2134
+ var d;
2135
+ return ((d = k.value) == null ? void 0 : d.children) ?? [];
2136
+ }), x = T(() => g.value ? t.menus : $.value.sidebar), M = T(() => a.value.menuSetting.show && !a.value.menuSetting.hidden && (g.value || O.value !== "top-menu" && (O.value !== "mix" || !$.value.split || $.value.sidebar.length > 0))), z = T(() => a.value.headerSetting.show && !a.value.fullContent), X = T(() => !a.value.headerSetting.show && !a.value.menuSetting.show), oe = T(() => a.value.darkMode === "dark" ? "dark" : a.value.menuSetting.theme), me = T(() => a.value.showSettingButton && z.value && a.value.settingButtonPosition !== "fixed"), ge = T(() => a.value.showSettingButton && (a.value.settingButtonPosition === "fixed" || a.value.settingButtonPosition === "auto" && !z.value)), Ue = T(() => [
2137
+ `dsea-classic-layout--${O.value}`,
2138
+ {
2139
+ "is-mobile": g.value,
2140
+ "is-collapsed": a.value.menuSetting.collapsed,
2141
+ "is-full-content": a.value.fullContent,
2142
+ "has-fixed-header": a.value.headerSetting.fixed,
2143
+ "has-sidebar": M.value,
2144
+ "has-header": z.value,
2145
+ "is-dark": a.value.darkMode === "dark",
2146
+ "is-dark-header": a.value.darkMode === "dark" || a.value.headerSetting.theme === "dark",
2147
+ "is-light-menu": oe.value === "light",
2148
+ "has-pinned-mix": O.value === "mix-sidebar" && a.value.menuSetting.mixSideFixed && K.value
2149
+ }
2150
+ ]), He = T(() => ({
2151
+ "--classic-header-height": z.value ? "48px" : "0px",
2152
+ "--classic-menu-width": `${a.value.menuSetting.menuWidth}px`,
2153
+ "--classic-side-width": `${a.value.menuSetting.collapsed ? a.value.menuSetting.collapsedShowTitle ? 80 : 48 : a.value.menuSetting.menuWidth}px`,
2154
+ "--classic-rail-width": `${a.value.menuSetting.collapsed ? 48 : 80}px`,
2155
+ "--classic-header-bg": a.value.darkMode === "dark" ? "#151515" : a.value.headerSetting.bgColor,
2156
+ "--classic-sider-bg": a.value.darkMode === "dark" ? "#212121" : a.value.menuSetting.bgColor,
2157
+ "--classic-primary": a.value.themeColor
2158
+ }));
2159
+ function ye(d) {
2160
+ return o.locale.translate(d);
2161
+ }
2162
+ function je(d, w) {
2163
+ const y = le(d, w);
2164
+ function C(F, P) {
2165
+ for (const W of F) {
2166
+ if (W.path === P)
2167
+ return W;
2168
+ const ce = C(W.children ?? [], P);
2169
+ if (ce)
2170
+ return ce;
2171
+ }
2172
+ }
2173
+ return y.map((F) => {
2174
+ var W, ce;
2175
+ const P = C(d, F);
2176
+ return {
2177
+ title: ye(((W = P == null ? void 0 : P.meta) == null ? void 0 : W.title) ?? (P == null ? void 0 : P.name) ?? F),
2178
+ path: F,
2179
+ icon: (P == null ? void 0 : P.icon) ?? ((ce = P == null ? void 0 : P.meta) == null ? void 0 : ce.icon)
2180
+ };
2181
+ });
2182
+ }
2183
+ const Qe = T(() => H.value.hideBreadcrumb ? [] : t.breadcrumbs.length ? t.breadcrumbs : je(t.menus, I.value)), R = T(() => o.locale.getLocale().toLowerCase().startsWith("zh") ? {
2184
+ navigation: "侧边导航",
2185
+ topNavigation: "顶部导航",
2186
+ toggleNavigation: "折叠导航",
2187
+ closeNavigation: "关闭导航",
2188
+ resizeNavigation: "调整导航宽度",
2189
+ pinNavigation: "固定菜单",
2190
+ breadcrumb: "面包屑",
2191
+ settings: "偏好设置",
2192
+ reset: "恢复默认",
2193
+ restoreLayout: "退出全屏内容",
2194
+ errors: "错误日志",
2195
+ help: "帮助中心",
2196
+ backTop: "回到顶部",
2197
+ apps: "应用切换",
2198
+ notifications: "通知",
2199
+ account: "用户菜单",
2200
+ enterFullscreen: "进入全屏",
2201
+ exitFullscreen: "退出全屏",
2202
+ copySettings: "复制配置",
2203
+ clearState: "清空缓存并重新登录"
2204
+ } : {
2205
+ navigation: "Navigation",
2206
+ topNavigation: "Top navigation",
2207
+ toggleNavigation: "Toggle navigation",
2208
+ closeNavigation: "Close navigation",
2209
+ resizeNavigation: "Resize navigation",
2210
+ pinNavigation: "Pin menu",
2211
+ breadcrumb: "Breadcrumb",
2212
+ settings: "Settings",
2213
+ reset: "Reset defaults",
2214
+ restoreLayout: "Restore layout",
2215
+ errors: "Error log",
2216
+ help: "Help",
2217
+ backTop: "Back to top",
2218
+ apps: "Applications",
2219
+ notifications: "Notifications",
2220
+ account: "Account menu",
2221
+ enterFullscreen: "Enter fullscreen",
2222
+ exitFullscreen: "Exit fullscreen",
2223
+ copySettings: "Copy settings",
2224
+ clearState: "Clear cache and sign in again"
2225
+ }), Xe = T(() => t.tabLabels ?? (o.locale.getLocale().toLowerCase().startsWith("zh") ? {
2226
+ refresh: "重新加载",
2227
+ actions: "标签操作",
2228
+ close: "关闭标签页",
2229
+ closeLeft: "关闭左侧标签页",
2230
+ closeRight: "关闭右侧标签页",
2231
+ closeOthers: "关闭其它标签页",
2232
+ closeAll: "关闭全部标签页",
2233
+ fold: "折叠界面"
2234
+ } : {
2235
+ refresh: "Refresh",
2236
+ actions: "Tab actions",
2237
+ close: "Close",
2238
+ closeLeft: "Close left",
2239
+ closeRight: "Close right",
2240
+ closeOthers: "Close others",
2241
+ closeAll: "Close all",
2242
+ fold: "Fold layout"
2243
+ })), Ye = T(() => {
2244
+ const d = a.value, w = o.locale.getLocale().toLowerCase().startsWith("zh"), y = (C, F) => w ? C : F;
2245
+ return [
2246
+ { title: y("导航栏模式", "Navigation mode"), items: [
2247
+ {
2248
+ key: "menuSetting.type",
2249
+ type: "mode",
2250
+ label: y("导航布局", "Navigation layout"),
2251
+ value: d.menuSetting.type,
2252
+ options: [
2253
+ { value: "sidebar", label: y("左侧", "Sidebar"), icon: "lucide:panel-left" },
2254
+ { value: "mix", label: y("混合", "Mixed"), icon: "lucide:panels-top-left" },
2255
+ { value: "top-menu", label: y("顶部", "Top"), icon: "lucide:panel-top" },
2256
+ { value: "mix-sidebar", label: y("双栏", "Rail"), icon: "lucide:panel-left-dashed" }
2257
+ ]
2258
+ }
2259
+ ] },
2260
+ { title: y("系统主题", "System theme"), items: [
2261
+ ...d.showDarkModeToggle ? [{ key: "darkMode", type: "switch", label: y("深色模式", "Dark mode"), value: d.darkMode === "dark" }] : [],
2262
+ {
2263
+ key: "themeColor",
2264
+ type: "color",
2265
+ label: y("主题色", "Primary color"),
2266
+ value: d.themeColor,
2267
+ colors: ["#0960bd", "#0084f4", "#009688", "#536dfe", "#ff5c93", "#ee4f12", "#0096c7", "#9c27b0", "#ff9800"]
2268
+ },
2269
+ {
2270
+ key: "headerSetting.bgColor",
2271
+ type: "color",
2272
+ label: y("顶栏颜色", "Header color"),
2273
+ value: d.headerSetting.bgColor,
2274
+ colors: ["#ffffff", "#151515", "#009688", "#5172dc", "#018ffb", "#409eff", "#e74c3c", "#24292e", "#394664", "#001529"]
2275
+ },
2276
+ {
2277
+ key: "menuSetting.bgColor",
2278
+ type: "color",
2279
+ label: y("侧栏颜色", "Sidebar color"),
2280
+ value: d.menuSetting.bgColor,
2281
+ colors: ["#001529", "#212121", "#273352", "#ffffff", "#191b24", "#304156", "#28333e", "#344058"]
2282
+ }
2283
+ ] },
2284
+ { title: y("界面功能", "Interface function"), items: [
2285
+ {
2286
+ key: "menuSetting.split",
2287
+ type: "switch",
2288
+ label: y("分割菜单", "Split menu"),
2289
+ value: d.menuSetting.split,
2290
+ disabled: d.menuSetting.type !== "mix"
2291
+ },
2292
+ {
2293
+ key: "menuSetting.mixSideFixed",
2294
+ type: "switch",
2295
+ label: y("固定双栏菜单", "Pin rail menu"),
2296
+ value: d.menuSetting.mixSideFixed,
2297
+ disabled: d.menuSetting.type !== "mix-sidebar"
2298
+ },
2299
+ {
2300
+ key: "menuSetting.closeMixSidebarOnChange",
2301
+ type: "switch",
2302
+ label: y("切换页面关闭双栏菜单", "Close rail on navigation"),
2303
+ value: d.menuSetting.closeMixSidebarOnChange,
2304
+ disabled: d.menuSetting.type !== "mix-sidebar"
2305
+ },
2306
+ { key: "menuSetting.collapsed", type: "switch", label: y("折叠侧栏", "Collapse sidebar"), value: d.menuSetting.collapsed },
2307
+ { key: "menuSetting.canDrag", type: "switch", label: y("拖拽侧栏宽度", "Resize sidebar"), value: d.menuSetting.canDrag },
2308
+ {
2309
+ key: "headerSetting.showSearch",
2310
+ type: "switch",
2311
+ label: y("菜单搜索", "Menu search"),
2312
+ value: d.headerSetting.showSearch,
2313
+ disabled: !d.headerSetting.show
2314
+ },
2315
+ { key: "menuSetting.accordion", type: "switch", label: y("手风琴菜单", "Accordion menu"), value: d.menuSetting.accordion },
2316
+ {
2317
+ key: "menuSetting.collapsedShowTitle",
2318
+ type: "switch",
2319
+ label: y("折叠时显示名称", "Show collapsed labels"),
2320
+ value: d.menuSetting.collapsedShowTitle,
2321
+ disabled: !d.menuSetting.collapsed || d.menuSetting.type === "mix-sidebar"
2322
+ },
2323
+ {
2324
+ key: "headerSetting.fixed",
2325
+ type: "switch",
2326
+ label: y("固定顶栏", "Fixed header"),
2327
+ value: d.headerSetting.fixed,
2328
+ disabled: !d.headerSetting.show
2329
+ },
2330
+ { key: "menuSetting.fixed", type: "switch", label: y("固定侧栏", "Fixed sidebar"), value: d.menuSetting.fixed },
2331
+ {
2332
+ key: "menuSetting.mixSideTrigger",
2333
+ type: "select",
2334
+ label: y("双栏触发", "Rail trigger"),
2335
+ value: d.menuSetting.mixSideTrigger,
2336
+ options: [{ value: "click", label: y("点击", "Click") }, { value: "hover", label: y("悬停", "Hover") }],
2337
+ disabled: d.menuSetting.type !== "mix-sidebar"
2338
+ },
2339
+ {
2340
+ key: "menuSetting.topMenuAlign",
2341
+ type: "select",
2342
+ label: y("顶部菜单对齐", "Top menu alignment"),
2343
+ value: d.menuSetting.topMenuAlign,
2344
+ options: [
2345
+ { value: "start", label: y("左", "Start") },
2346
+ { value: "center", label: y("中", "Center") },
2347
+ { value: "end", label: y("右", "End") }
2348
+ ],
2349
+ disabled: d.menuSetting.type !== "top-menu"
2350
+ },
2351
+ {
2352
+ key: "menuSetting.trigger",
2353
+ type: "select",
2354
+ label: y("侧栏折叠按钮", "Collapse trigger"),
2355
+ value: d.menuSetting.trigger,
2356
+ options: [
2357
+ { value: "NONE", label: y("隐藏", "None") },
2358
+ { value: "FOOTER", label: y("底部", "Footer") },
2359
+ { value: "HEADER", label: y("顶部", "Header") }
2360
+ ]
2361
+ },
2362
+ {
2363
+ key: "contentMode",
2364
+ type: "select",
2365
+ label: y("内容宽度", "Content width"),
2366
+ value: d.contentMode,
2367
+ options: [{ value: "full", label: y("流式", "Fluid") }, { value: "fixed", label: y("固定", "Fixed") }]
2368
+ },
2369
+ {
2370
+ key: "lockTime",
2371
+ type: "number",
2372
+ label: y("自动锁屏(分钟)", "Auto-lock minutes"),
2373
+ value: d.lockTime,
2374
+ min: 0,
2375
+ max: 1440,
2376
+ step: 1
2377
+ },
2378
+ {
2379
+ key: "menuSetting.menuWidth",
2380
+ type: "number",
2381
+ label: y("展开菜单宽度", "Sidebar width"),
2382
+ value: d.menuSetting.menuWidth,
2383
+ min: 100,
2384
+ max: 600,
2385
+ step: 10
2386
+ }
2387
+ ] },
2388
+ { title: y("界面显示", "Interface display"), items: [
2389
+ {
2390
+ key: "showBreadCrumb",
2391
+ type: "switch",
2392
+ label: y("面包屑", "Breadcrumb"),
2393
+ value: d.showBreadCrumb,
2394
+ disabled: !d.headerSetting.show
2395
+ },
2396
+ {
2397
+ key: "showBreadCrumbIcon",
2398
+ type: "switch",
2399
+ label: y("面包屑图标", "Breadcrumb icons"),
2400
+ value: d.showBreadCrumbIcon,
2401
+ disabled: !d.headerSetting.show || !d.showBreadCrumb
2402
+ },
2403
+ { key: "multiTabsSetting.show", type: "switch", label: y("显示标签页", "Show tabs"), value: d.multiTabsSetting.show },
2404
+ { key: "multiTabsSetting.showQuick", type: "switch", label: y("标签快捷操作", "Tab actions"), value: d.multiTabsSetting.showQuick },
2405
+ { key: "multiTabsSetting.showRedo", type: "switch", label: y("标签刷新", "Tab refresh"), value: d.multiTabsSetting.showRedo },
2406
+ { key: "multiTabsSetting.showFold", type: "switch", label: y("界面折叠", "Fold layout"), value: d.multiTabsSetting.showFold },
2407
+ { key: "multiTabsSetting.cache", type: "switch", label: y("缓存标签页", "Cache tabs"), value: d.multiTabsSetting.cache },
2408
+ {
2409
+ key: "menuSetting.show",
2410
+ type: "switch",
2411
+ label: y("显示侧栏", "Show sidebar"),
2412
+ value: d.menuSetting.show,
2413
+ disabled: d.menuSetting.type === "top-menu"
2414
+ },
2415
+ { key: "headerSetting.show", type: "switch", label: y("显示顶栏", "Show header"), value: d.headerSetting.show },
2416
+ { key: "showLogo", type: "switch", label: "Logo", value: d.showLogo },
2417
+ { key: "showFooter", type: "switch", label: y("页脚", "Footer"), value: d.showFooter },
2418
+ { key: "fullContent", type: "switch", label: y("全屏内容", "Full content"), value: d.fullContent },
2419
+ { key: "grayMode", type: "switch", label: y("灰度模式", "Grayscale"), value: d.grayMode },
2420
+ { key: "colorWeak", type: "switch", label: y("色弱模式", "Color assist"), value: d.colorWeak },
2421
+ { key: "useOpenBackTop", type: "switch", label: y("回到顶部", "Back to top"), value: d.useOpenBackTop },
2422
+ {
2423
+ key: "settingButtonPosition",
2424
+ type: "select",
2425
+ label: y("设置按钮位置", "Settings button position"),
2426
+ value: d.settingButtonPosition,
2427
+ options: [
2428
+ { value: "auto", label: y("自动", "Auto") },
2429
+ { value: "header", label: y("顶栏", "Header") },
2430
+ { value: "fixed", label: y("浮动", "Floating") }
2431
+ ]
2432
+ }
2433
+ ] },
2434
+ { title: y("动画", "Animation"), items: [
2435
+ {
2436
+ key: "transitionSetting.openNProgress",
2437
+ type: "switch",
2438
+ label: y("顶部进度条", "Progress bar"),
2439
+ value: d.transitionSetting.openNProgress
2440
+ },
2441
+ {
2442
+ key: "transitionSetting.openPageLoading",
2443
+ type: "switch",
2444
+ label: y("页面加载", "Page loading"),
2445
+ value: d.transitionSetting.openPageLoading
2446
+ },
2447
+ {
2448
+ key: "transitionSetting.enable",
2449
+ type: "switch",
2450
+ label: y("页面切换动画", "Route animation"),
2451
+ value: d.transitionSetting.enable
2452
+ },
2453
+ {
2454
+ key: "transitionSetting.basicTransition",
2455
+ type: "select",
2456
+ label: y("动画类型", "Animation type"),
2457
+ value: d.transitionSetting.basicTransition,
2458
+ disabled: !d.transitionSetting.enable,
2459
+ options: ["zoom-fade", "fade", "zoom-out", "fade-slide", "fade-bottom", "fade-scale"].map((C) => ({ value: C, label: C }))
2460
+ }
2461
+ ] }
2462
+ ];
2463
+ });
2464
+ function de(d, w) {
2465
+ if (d === "darkMode") {
2466
+ i("settingsChange", s.patch({ darkMode: w ? "dark" : "light" }));
2467
+ return;
2468
+ }
2469
+ const [y, C] = d.split(".");
2470
+ if (y === "menuSetting" || y === "headerSetting" || y === "multiTabsSetting" || y === "transitionSetting") {
2471
+ const F = { [y]: { [C]: w } };
2472
+ d === "menuSetting.type" && (F.menuSetting.collapsed = !1, F.menuSetting.show = !0, F.menuSetting.hidden = !1), d === "menuSetting.bgColor" && (F.menuSetting.theme = w === "#ffffff" ? "light" : "dark"), d === "headerSetting.bgColor" && (F.headerSetting.theme = it(String(w)) ? "dark" : "light"), i("settingsChange", s.patch(F));
2473
+ } else
2474
+ i("settingsChange", s.patch({ [d]: w }));
2475
+ d === "menuSetting.mixSideFixed" && (K.value = !!w);
2476
+ }
2477
+ function Ge() {
2478
+ i("settingsChange", s.reset());
2479
+ }
2480
+ async function Je() {
2481
+ try {
2482
+ await navigator.clipboard.writeText(JSON.stringify(a.value, null, 2)), i("settingsCopied");
2483
+ } catch (d) {
2484
+ i("settingsCopyError", d);
2485
+ }
2486
+ }
2487
+ function ke() {
2488
+ g.value ? f.value = !f.value : de("menuSetting.collapsed", !a.value.menuSetting.collapsed);
2489
+ }
2490
+ function Ze() {
2491
+ i("settingsChange", s.patch({ fullContent: !a.value.fullContent }));
2492
+ }
2493
+ function et() {
2494
+ const d = X.value;
2495
+ i("settingsChange", s.patch({
2496
+ headerSetting: { show: d },
2497
+ menuSetting: { show: d, hidden: !d }
2498
+ }));
2499
+ }
2500
+ function ve(d) {
2501
+ const w = re(d);
2502
+ if (w) {
2503
+ window.open(w, "_blank", "noopener,noreferrer");
2504
+ return;
2505
+ }
2506
+ i("menuClick", d), f.value = !1, a.value.menuSetting.closeMixSidebarOnChange && !a.value.menuSetting.mixSideFixed && (K.value = !1), o.navigation.go(d);
2507
+ }
2508
+ function tt(d) {
2509
+ var C;
2510
+ const w = t.menus.find((F) => F.path === d), y = (C = w == null ? void 0 : w.children) != null && C.length ? qe(w) : d;
2511
+ y && ve(y);
2512
+ }
2513
+ function at(d) {
2514
+ var w;
2515
+ if (!((w = d.children) != null && w.length))
2516
+ return ve(d.path);
2517
+ V.value === d.path && !a.value.menuSetting.mixSideFixed ? K.value = !K.value : K.value = !0, V.value = d.path;
2518
+ }
2519
+ function nt(d) {
2520
+ var w;
2521
+ a.value.menuSetting.mixSideTrigger === "hover" && ((w = d.children) != null && w.length) && (V.value = d.path, K.value = !0);
2522
+ }
2523
+ function lt() {
2524
+ O.value === "mix-sidebar" && !a.value.menuSetting.mixSideFixed && (K.value = !1);
2525
+ }
2526
+ function it(d) {
2527
+ const w = d.replace("#", ""), y = (w.length === 3 ? w.split("").map((C) => C + C) : w.match(/.{2}/g) ?? []).map((C) => parseInt(C, 16));
2528
+ return y.length === 3 && y[0] * 0.299 + y[1] * 0.587 + y[2] * 0.114 < 150;
2529
+ }
2530
+ function ot(d, w) {
2531
+ i("tabCloseAction", d, w);
2532
+ }
2533
+ kt({
2534
+ active: T(() => a.value.headerSetting.useLockPage && a.value.lockTime > 0),
2535
+ idleMs: T(() => a.value.lockTime * 6e4),
2536
+ lock: () => i("lock")
2537
+ });
2538
+ function we() {
2539
+ g.value = window.innerWidth < t.mobileBreakpoint, f.value = !1;
2540
+ }
2541
+ function Se() {
2542
+ p.value = window.scrollY > 200;
2543
+ }
2544
+ function st() {
2545
+ window.scrollTo({ top: 0, behavior: "smooth" });
2546
+ }
2547
+ function Le(d) {
2548
+ d.key === "Escape" && (f.value = !1, a.value.menuSetting.mixSideFixed || (K.value = !1));
2549
+ }
2550
+ function Me(d) {
2551
+ var w, y;
2552
+ O.value !== "mix-sidebar" || a.value.menuSetting.mixSideFixed || !K.value || (y = (w = d.target) == null ? void 0 : w.closest) != null && y.call(w, ".dsea-classic-layout__sidebar") || (K.value = !1);
2553
+ }
2554
+ let Y;
2555
+ function Te(d) {
2556
+ if (d.button !== 0)
2557
+ return;
2558
+ Y == null || Y();
2559
+ const w = d.clientX, y = a.value.menuSetting.menuWidth, C = (P) => de("menuSetting.menuWidth", y + P.clientX - w), F = () => Y == null ? void 0 : Y();
2560
+ window.addEventListener("pointermove", C), window.addEventListener("pointerup", F), window.addEventListener("pointercancel", F), Y = () => {
2561
+ window.removeEventListener("pointermove", C), window.removeEventListener("pointerup", F), window.removeEventListener("pointercancel", F), Y = void 0;
2562
+ };
2563
+ }
2564
+ function Ae(d) {
2565
+ d.key !== "ArrowLeft" && d.key !== "ArrowRight" || (d.preventDefault(), de("menuSetting.menuWidth", a.value.menuSetting.menuWidth + (d.key === "ArrowRight" ? 10 : -10)));
2566
+ }
2567
+ function Pe() {
2568
+ typeof document < "u" && wt({
2569
+ theme: a.value.darkMode,
2570
+ grayMode: a.value.grayMode,
2571
+ colorWeak: a.value.colorWeak,
2572
+ primaryColor: a.value.themeColor
2573
+ }, document.documentElement);
2574
+ }
2575
+ G(a, Pe, { deep: !0 }), G($, (d) => {
2576
+ d.rootPath && (V.value = d.rootPath);
2577
+ }, { immediate: !0 });
2578
+ const rt = r.onRouteChange((d) => {
2579
+ var w;
2580
+ I.value = ((w = d.meta) == null ? void 0 : w.currentActiveMenu) || d.path, H.value = d.meta ?? {}, a.value.menuSetting.closeMixSidebarOnChange && !a.value.menuSetting.mixSideFixed && (K.value = !1);
2581
+ });
2582
+ return ue(() => {
2583
+ we(), Se(), Pe(), window.addEventListener("resize", we), window.addEventListener("scroll", Se, { passive: !0 }), window.addEventListener("keydown", Le), document.addEventListener("pointerdown", Me);
2584
+ }), ie(() => {
2585
+ rt(), Y == null || Y(), window.removeEventListener("resize", we), window.removeEventListener("scroll", Se), window.removeEventListener("keydown", Le), document.removeEventListener("pointerdown", Me);
2586
+ }), (d, w) => {
2587
+ var y;
2588
+ return n(), l("div", {
2589
+ class: q(["dsea-classic-layout", Ue.value]),
2590
+ style: fe(He.value)
2591
+ }, [
2592
+ B(d.$slots, "agentHost"),
2593
+ h(a).fullContent ? (n(), l(D, { key: 1 }, [
2594
+ u("button", {
2595
+ type: "button",
2596
+ class: "dsea-classic-layout__restore",
2597
+ "aria-label": R.value.restoreLayout,
2598
+ title: R.value.restoreLayout,
2599
+ onClick: Ze
2600
+ }, [
2601
+ _(h(L), {
2602
+ icon: "lucide:minimize",
2603
+ size: 18
2604
+ })
2605
+ ], 8, Yn),
2606
+ u("main", Gn, [
2607
+ B(d.$slots, "default")
2608
+ ])
2609
+ ], 64)) : (n(), l(D, { key: 0 }, [
2610
+ h(a).headerSetting.show ? (n(), l("header", Sn, [
2611
+ u("div", Cn, [
2612
+ h(a).showLogo && (O.value === "mix" || O.value === "top-menu" || g.value) ? (n(), l("div", $n, [
2613
+ B(d.$slots, "brand", {
2614
+ location: "header",
2615
+ collapsed: !1
2616
+ }, () => [
2617
+ _(be)
2618
+ ])
2619
+ ])) : v("", !0),
2620
+ g.value || h(a).menuSetting.trigger === "HEADER" && M.value && O.value !== "mix-sidebar" ? (n(), l("button", {
2621
+ key: 1,
2622
+ type: "button",
2623
+ class: "dsea-classic-layout__icon-button",
2624
+ "aria-label": R.value.toggleNavigation,
2625
+ "aria-expanded": g.value ? f.value : !h(a).menuSetting.collapsed,
2626
+ onClick: ke
2627
+ }, [
2628
+ _(h(L), {
2629
+ icon: g.value && f.value ? "lucide:x" : "lucide:menu",
2630
+ size: 19
2631
+ }, null, 8, ["icon"])
2632
+ ], 8, xn)) : v("", !0),
2633
+ !g.value && h(a).showBreadCrumb && !$.value.split && O.value !== "top-menu" ? (n(), E(Ga, {
2634
+ key: 2,
2635
+ items: Qe.value,
2636
+ "show-icons": h(a).showBreadCrumbIcon,
2637
+ label: R.value.breadcrumb
2638
+ }, null, 8, ["items", "show-icons", "label"])) : v("", !0)
2639
+ ]),
2640
+ !g.value && $.value.top.length ? (n(), l("nav", {
2641
+ key: 0,
2642
+ class: "dsea-classic-layout__top-menu",
2643
+ "aria-label": R.value.topNavigation
2644
+ }, [
2645
+ _(he, {
2646
+ items: $.value.top,
2647
+ mode: "horizontal",
2648
+ type: "top",
2649
+ "is-horizontal": "",
2650
+ theme: h(a).headerSetting.theme,
2651
+ split: $.value.split,
2652
+ "top-menu-align": h(a).menuSetting.topMenuAlign,
2653
+ onMenuClick: tt
2654
+ }, null, 8, ["items", "theme", "split", "top-menu-align"])
2655
+ ], 8, _n)) : v("", !0),
2656
+ u("div", Ln, [
2657
+ B(d.$slots, "search", {}, () => [
2658
+ h(a).headerSetting.showSearch ? (n(), E(da, {
2659
+ key: 0,
2660
+ "menu-items": e.menus,
2661
+ classic: ""
2662
+ }, null, 8, ["menu-items"])) : v("", !0)
2663
+ ]),
2664
+ B(d.$slots, "errors", {}, () => {
2665
+ var C;
2666
+ return [
2667
+ (C = e.headerPorts) != null && C.errors && !g.value ? (n(), l("button", {
2668
+ key: 0,
2669
+ type: "button",
2670
+ class: "dsea-classic-layout__icon-button dsea-classic-layout__error",
2671
+ "aria-label": R.value.errors,
2672
+ title: R.value.errors,
2673
+ onClick: w[0] || (w[0] = (F) => {
2674
+ var P, W;
2675
+ return (W = (P = e.headerPorts.errors).onOpen) == null ? void 0 : W.call(P);
2676
+ })
2677
+ }, [
2678
+ _(h(L), {
2679
+ icon: "lucide:bug",
2680
+ size: 18
2681
+ }),
2682
+ e.headerPorts.errors.count ? (n(), l("span", Tn, m(e.headerPorts.errors.count > 99 ? "99+" : e.headerPorts.errors.count), 1)) : v("", !0)
2683
+ ], 8, Mn)) : v("", !0)
2684
+ ];
2685
+ }),
2686
+ B(d.$slots, "apps", {}, () => {
2687
+ var C;
2688
+ return [
2689
+ (C = e.headerPorts) != null && C.apps && !g.value ? (n(), E(ea, {
2690
+ key: 0,
2691
+ apps: e.headerPorts.apps.apps,
2692
+ label: R.value.apps,
2693
+ icon: "ant-design:appstore-outlined",
2694
+ "current-id": e.headerPorts.apps.currentId,
2695
+ loading: e.headerPorts.apps.loading,
2696
+ "confirm-switch": e.headerPorts.apps.confirmSwitch,
2697
+ onOpen: w[1] || (w[1] = (F) => {
2698
+ var P, W;
2699
+ return (W = (P = e.headerPorts.apps).onOpen) == null ? void 0 : W.call(P);
2700
+ }),
2701
+ onSwitch: w[2] || (w[2] = (F) => {
2702
+ var P, W;
2703
+ return (W = (P = e.headerPorts.apps).onSwitch) == null ? void 0 : W.call(P, F);
2704
+ })
2705
+ }, null, 8, ["apps", "label", "current-id", "loading", "confirm-switch"])) : v("", !0)
2706
+ ];
2707
+ }),
2708
+ B(d.$slots, "notifications", {}, () => {
2709
+ var C;
2710
+ return [
2711
+ (C = e.headerPorts) != null && C.notifications && h(a).headerSetting.showNotice && !g.value ? (n(), E(Pa, {
2712
+ key: 0,
2713
+ items: e.headerPorts.notifications.items,
2714
+ categories: e.headerPorts.notifications.categories,
2715
+ label: R.value.notifications,
2716
+ icon: "ant-design:bell-outlined",
2717
+ classic: "",
2718
+ onOpen: w[3] || (w[3] = (F) => {
2719
+ var P, W;
2720
+ return (W = (P = e.headerPorts.notifications).onOpen) == null ? void 0 : W.call(P, F);
2721
+ }),
2722
+ onMarkAllRead: w[4] || (w[4] = (F) => {
2723
+ var P, W;
2724
+ return (W = (P = e.headerPorts.notifications).onMarkAllRead) == null ? void 0 : W.call(P);
2725
+ })
2726
+ }, null, 8, ["items", "categories", "label"])) : v("", !0)
2727
+ ];
2728
+ }),
2729
+ B(d.$slots, "fullscreen", {}, () => [
2730
+ h(a).headerSetting.showFullScreen && !g.value ? (n(), E(Rt, {
2731
+ key: 0,
2732
+ "enter-label": R.value.enterFullscreen,
2733
+ "exit-label": R.value.exitFullscreen,
2734
+ "enter-icon": "ant-design:fullscreen-outlined",
2735
+ "exit-icon": "ant-design:fullscreen-exit-outlined"
2736
+ }, null, 8, ["enter-label", "exit-label"])) : v("", !0)
2737
+ ]),
2738
+ B(d.$slots, "locale", {}, () => {
2739
+ var C, F;
2740
+ return [
2741
+ (F = (C = e.headerPorts) == null ? void 0 : C.locales) != null && F.length ? (n(), E(Et, {
2742
+ key: 0,
2743
+ locales: e.headerPorts.locales,
2744
+ "show-text": !1,
2745
+ reload: ""
2746
+ }, null, 8, ["locales"])) : v("", !0)
2747
+ ];
2748
+ }),
2749
+ B(d.$slots, "help", {}, () => {
2750
+ var C;
2751
+ return [
2752
+ (C = e.headerPorts) != null && C.help ? (n(), l("button", {
2753
+ key: 0,
2754
+ type: "button",
2755
+ class: "dsea-classic-layout__icon-button dsea-classic-layout__help-button",
2756
+ "aria-label": e.headerPorts.help.label || R.value.help,
2757
+ title: e.headerPorts.help.label || R.value.help,
2758
+ onClick: w[5] || (w[5] = (F) => {
2759
+ var P, W;
2760
+ return (W = (P = e.headerPorts.help).onOpen) == null ? void 0 : W.call(P);
2761
+ })
2762
+ }, [
2763
+ _(h(L), {
2764
+ icon: "ant-design:question-circle-filled",
2765
+ size: 18
2766
+ })
2767
+ ], 8, An)) : v("", !0)
2768
+ ];
2769
+ }),
2770
+ B(d.$slots, "user", {}, () => {
2771
+ var C;
2772
+ return [
2773
+ (C = e.headerPorts) != null && C.user ? (n(), E(fa, {
2774
+ key: 0,
2775
+ name: e.headerPorts.user.name,
2776
+ label: R.value.account,
2777
+ avatar: e.headerPorts.user.avatar,
2778
+ items: e.headerPorts.user.items,
2779
+ onSelect: w[6] || (w[6] = (F) => {
2780
+ var P, W;
2781
+ return (W = (P = e.headerPorts.user).onSelect) == null ? void 0 : W.call(P, F);
2782
+ })
2783
+ }, null, 8, ["name", "label", "avatar", "items"])) : v("", !0)
2784
+ ];
2785
+ }),
2786
+ B(d.$slots, "headerActions"),
2787
+ me.value ? (n(), l("button", {
2788
+ key: 0,
2789
+ type: "button",
2790
+ class: "dsea-classic-layout__icon-button",
2791
+ "aria-label": R.value.settings,
2792
+ title: R.value.settings,
2793
+ onClick: w[7] || (w[7] = (C) => b.value = !0)
2794
+ }, [
2795
+ _(h(L), {
2796
+ icon: "ion:settings-outline",
2797
+ size: 18
2798
+ })
2799
+ ], 8, Pn)) : v("", !0)
2800
+ ])
2801
+ ])) : v("", !0),
2802
+ u("div", Bn, [
2803
+ M.value ? (n(), l("aside", {
2804
+ key: 0,
2805
+ class: q(["dsea-classic-layout__sidebar", { "is-open": f.value, "is-fixed": h(a).menuSetting.fixed }]),
2806
+ "aria-hidden": g.value && !f.value,
2807
+ inert: g.value && !f.value,
2808
+ onMouseleave: lt
2809
+ }, [
2810
+ O.value === "mix-sidebar" && !g.value ? (n(), l(D, { key: 0 }, [
2811
+ u("div", En, [
2812
+ h(a).showLogo ? (n(), l("div", Nn, [
2813
+ B(d.$slots, "railBrand", {
2814
+ location: "rail",
2815
+ collapsed: h(a).menuSetting.collapsed
2816
+ }, () => [
2817
+ _(be, { "show-title": !1 })
2818
+ ])
2819
+ ])) : v("", !0),
2820
+ (n(!0), l(D, null, U(e.menus, (C) => (n(), l("button", {
2821
+ key: C.path,
2822
+ type: "button",
2823
+ class: q(["dsea-classic-layout__module", { "is-active": C.path === V.value }]),
2824
+ title: C.name,
2825
+ onClick: (F) => at(C),
2826
+ onMouseenter: (F) => nt(C)
2827
+ }, [
2828
+ C.icon ? (n(), E(h(L), {
2829
+ key: 0,
2830
+ icon: C.icon,
2831
+ size: h(a).menuSetting.collapsed ? 16 : 20
2832
+ }, null, 8, ["icon", "size"])) : v("", !0),
2833
+ h(a).menuSetting.collapsed ? v("", !0) : (n(), l("span", zn, m(ye(C.name)), 1))
2834
+ ], 42, In))), 128)),
2835
+ u("button", {
2836
+ type: "button",
2837
+ class: "dsea-classic-layout__rail-trigger",
2838
+ "aria-label": R.value.toggleNavigation,
2839
+ onClick: ke
2840
+ }, [
2841
+ _(h(L), {
2842
+ icon: h(a).menuSetting.collapsed ? "lucide:panel-left-open" : "lucide:panel-left-close",
2843
+ size: 16
2844
+ }, null, 8, ["icon"])
2845
+ ], 8, Dn)
2846
+ ]),
2847
+ K.value && S.value.length ? (n(), l("div", {
2848
+ key: 0,
2849
+ class: q(["dsea-classic-layout__mix-panel", { "is-floating": !h(a).menuSetting.mixSideFixed }])
2850
+ }, [
2851
+ u("div", Rn, [
2852
+ u("span", null, m(ye(((y = k.value) == null ? void 0 : y.name) || "")), 1),
2853
+ u("button", {
2854
+ type: "button",
2855
+ "aria-label": R.value.pinNavigation,
2856
+ "aria-pressed": h(a).menuSetting.mixSideFixed,
2857
+ onClick: w[8] || (w[8] = (C) => de("menuSetting.mixSideFixed", !h(a).menuSetting.mixSideFixed))
2858
+ }, [
2859
+ _(h(L), {
2860
+ icon: h(a).menuSetting.mixSideFixed ? "lucide:pin-off" : "lucide:pin",
2861
+ size: 16
2862
+ }, null, 8, ["icon"])
2863
+ ], 8, Kn)
2864
+ ]),
2865
+ _(Ee, {
2866
+ items: S.value,
2867
+ "current-path": I.value,
2868
+ theme: oe.value,
2869
+ accordion: h(a).menuSetting.accordion,
2870
+ label: R.value.navigation,
2871
+ onSelect: ve
2872
+ }, null, 8, ["items", "current-path", "theme", "accordion", "label"]),
2873
+ h(a).menuSetting.canDrag ? (n(), l("div", {
2874
+ key: 0,
2875
+ class: "dsea-classic-layout__resize",
2876
+ role: "separator",
2877
+ tabindex: "0",
2878
+ "aria-orientation": "vertical",
2879
+ "aria-label": R.value.resizeNavigation,
2880
+ "aria-valuenow": h(a).menuSetting.menuWidth,
2881
+ "aria-valuemin": "100",
2882
+ "aria-valuemax": "600",
2883
+ onPointerdown: Te,
2884
+ onKeydown: Ae
2885
+ }, null, 40, On)) : v("", !0)
2886
+ ], 2)) : v("", !0)
2887
+ ], 64)) : (n(), l(D, { key: 1 }, [
2888
+ h(a).showLogo && (O.value === "sidebar" || g.value) ? (n(), l("div", Wn, [
2889
+ B(d.$slots, "brand", {
2890
+ location: "sidebar",
2891
+ collapsed: h(a).menuSetting.collapsed && !g.value
2892
+ }, () => [
2893
+ _(be, {
2894
+ "show-title": !h(a).menuSetting.collapsed || g.value
2895
+ }, null, 8, ["show-title"])
2896
+ ])
2897
+ ])) : v("", !0),
2898
+ u("div", {
2899
+ class: q(["dsea-classic-layout__side-menu", { "is-collapsed": h(a).menuSetting.collapsed && !g.value }])
2900
+ }, [
2901
+ B(d.$slots, "navigation", { items: x.value }, () => [
2902
+ _(Ee, {
2903
+ items: x.value,
2904
+ "current-path": I.value,
2905
+ collapsed: h(a).menuSetting.collapsed && !g.value,
2906
+ "collapsed-show-title": h(a).menuSetting.collapsedShowTitle,
2907
+ theme: oe.value,
2908
+ accordion: h(a).menuSetting.accordion,
2909
+ label: R.value.navigation,
2910
+ onSelect: ve
2911
+ }, null, 8, ["items", "current-path", "collapsed", "collapsed-show-title", "theme", "accordion", "label"])
2912
+ ])
2913
+ ], 2),
2914
+ h(a).menuSetting.trigger === "FOOTER" && !g.value ? (n(), l("button", {
2915
+ key: 1,
2916
+ type: "button",
2917
+ class: "dsea-classic-layout__sidebar-trigger",
2918
+ "aria-label": R.value.toggleNavigation,
2919
+ onClick: ke
2920
+ }, [
2921
+ _(h(L), {
2922
+ icon: h(a).menuSetting.collapsed ? "lucide:panel-left-open" : "lucide:panel-left-close",
2923
+ size: 16
2924
+ }, null, 8, ["icon"])
2925
+ ], 8, Vn)) : v("", !0)
2926
+ ], 64)),
2927
+ h(a).menuSetting.canDrag && !g.value && !h(a).menuSetting.collapsed && O.value !== "mix-sidebar" ? (n(), l("div", {
2928
+ key: 2,
2929
+ class: "dsea-classic-layout__resize",
2930
+ role: "separator",
2931
+ tabindex: "0",
2932
+ "aria-orientation": "vertical",
2933
+ "aria-label": R.value.resizeNavigation,
2934
+ "aria-valuenow": h(a).menuSetting.menuWidth,
2935
+ "aria-valuemin": "100",
2936
+ "aria-valuemax": "600",
2937
+ onPointerdown: Te,
2938
+ onKeydown: Ae
2939
+ }, null, 40, qn)) : v("", !0)
2940
+ ], 42, Fn)) : v("", !0),
2941
+ g.value && f.value && M.value ? (n(), l("button", {
2942
+ key: 1,
2943
+ type: "button",
2944
+ class: "dsea-classic-layout__scrim",
2945
+ "aria-label": R.value.closeNavigation,
2946
+ onClick: w[9] || (w[9] = (C) => f.value = !1)
2947
+ }, null, 8, Un)) : v("", !0),
2948
+ u("div", Hn, [
2949
+ h(a).multiTabsSetting.show ? (n(), l("div", jn, [
2950
+ B(d.$slots, "tabs", {}, () => [
2951
+ _(un, {
2952
+ tabs: e.tabs,
2953
+ "active-key": e.activeTab,
2954
+ labels: Xe.value,
2955
+ "show-quick": h(a).multiTabsSetting.showQuick,
2956
+ "show-redo": h(a).multiTabsSetting.showRedo,
2957
+ "show-fold": h(a).multiTabsSetting.showFold,
2958
+ folded: X.value,
2959
+ "can-drag": h(a).multiTabsSetting.canDrag,
2960
+ onSelect: w[10] || (w[10] = (C) => i("tabSelect", C)),
2961
+ onClose: w[11] || (w[11] = (C) => i("tabClose", C)),
2962
+ onRefresh: w[12] || (w[12] = (C) => i("tabRefresh", C)),
2963
+ onCloseAction: ot,
2964
+ onReorder: w[13] || (w[13] = (C) => i("tabReorder", C)),
2965
+ onFold: et
2966
+ }, null, 8, ["tabs", "active-key", "labels", "show-quick", "show-redo", "show-fold", "folded", "can-drag"])
2967
+ ])
2968
+ ])) : v("", !0),
2969
+ u("main", {
2970
+ class: q(["dsea-classic-layout__content", { "is-fixed": h(a).contentMode === "fixed" }])
2971
+ }, [
2972
+ e.contentKey && h(a).transitionSetting.enable ? (n(), E(vt, {
2973
+ key: 0,
2974
+ name: h(a).transitionSetting.basicTransition,
2975
+ mode: "out-in"
2976
+ }, {
2977
+ default: ne(() => [
2978
+ (n(), l("div", {
2979
+ key: e.contentKey,
2980
+ class: "dsea-classic-layout__route-content"
2981
+ }, [
2982
+ B(d.$slots, "default")
2983
+ ]))
2984
+ ]),
2985
+ _: 3
2986
+ }, 8, ["name"])) : B(d.$slots, "default", {}, void 0, void 0, 1),
2987
+ e.pageLoading && h(a).transitionSetting.openPageLoading ? (n(), l("div", Qn, [
2988
+ _(h(L), {
2989
+ icon: "lucide:loader-circle",
2990
+ size: 28
2991
+ })
2992
+ ])) : v("", !0)
2993
+ ], 2),
2994
+ h(a).showFooter && !H.value.hiddenFooter ? (n(), l("footer", Xn, [
2995
+ B(d.$slots, "footer", {}, () => [
2996
+ Q("© " + m((/* @__PURE__ */ new Date()).getFullYear()) + " " + m(h(o).appConfig.getTitle()), 1)
2997
+ ])
2998
+ ])) : v("", !0)
2999
+ ])
3000
+ ])
3001
+ ], 64)),
3002
+ ge.value ? (n(), l("button", {
3003
+ key: 2,
3004
+ type: "button",
3005
+ class: "dsea-classic-layout__floating-settings",
3006
+ "aria-label": R.value.settings,
3007
+ title: R.value.settings,
3008
+ onClick: w[14] || (w[14] = (C) => b.value = !0)
3009
+ }, [
3010
+ _(h(L), {
3011
+ icon: "lucide:settings",
3012
+ size: 18
3013
+ })
3014
+ ], 8, Jn)) : v("", !0),
3015
+ h(a).useOpenBackTop && p.value ? (n(), l("button", {
3016
+ key: 3,
3017
+ type: "button",
3018
+ class: "dsea-classic-layout__back-top",
3019
+ "aria-label": R.value.backTop,
3020
+ title: R.value.backTop,
3021
+ onClick: st
3022
+ }, [
3023
+ _(h(L), {
3024
+ icon: "lucide:arrow-up",
3025
+ size: 18
3026
+ })
3027
+ ], 8, Zn)) : v("", !0),
3028
+ e.navigationProgress && h(a).transitionSetting.openNProgress ? (n(), l("div", el)) : v("", !0),
3029
+ e.locked ? B(d.$slots, "lockScreen", {}, void 0, void 0, 5) : v("", !0),
3030
+ e.sessionTimedOut ? B(d.$slots, "sessionTimeout", {}, void 0, void 0, 6) : v("", !0),
3031
+ h(a).showSettingButton ? (n(), E(fn, {
3032
+ key: 7,
3033
+ open: b.value,
3034
+ "onUpdate:open": w[16] || (w[16] = (C) => b.value = C),
3035
+ class: "dsea-classic-settings",
3036
+ title: R.value.settings,
3037
+ sections: Ye.value,
3038
+ width: 330,
3039
+ onChange: de
3040
+ }, {
3041
+ footer: ne(() => [
3042
+ u("div", tl, [
3043
+ e.showCopySettings ? (n(), l("button", {
3044
+ key: 0,
3045
+ type: "button",
3046
+ onClick: Je
3047
+ }, m(R.value.copySettings), 1)) : v("", !0),
3048
+ u("button", {
3049
+ type: "button",
3050
+ onClick: Ge
3051
+ }, m(R.value.reset), 1),
3052
+ e.allowClearState ? (n(), l("button", {
3053
+ key: 1,
3054
+ type: "button",
3055
+ onClick: w[15] || (w[15] = (C) => i("clearState"))
3056
+ }, m(R.value.clearState), 1)) : v("", !0)
3057
+ ])
3058
+ ]),
3059
+ _: 1
3060
+ }, 8, ["open", "title", "sections"])) : v("", !0)
3061
+ ], 6);
3062
+ };
3063
+ }
3064
+ });
3065
+ const al = { class: "dsea-iframe-view" }, nl = ["src", "title", "loading", "referrerpolicy"], ll = /* @__PURE__ */ N({
1447
3066
  __name: "AdminIframeView",
1448
3067
  props: {
1449
3068
  src: {},
@@ -1453,34 +3072,34 @@ const ol = /* @__PURE__ */ A(Nt, [["__scopeId", "data-v-49bfd66c"]]), zt = { cla
1453
3072
  },
1454
3073
  emits: ["load"],
1455
3074
  setup(e, { emit: c }) {
1456
- const t = e, i = c, l = I(() => {
1457
- var n;
1458
- const r = ((n = t.src) == null ? void 0 : n.trim()) ?? "";
1459
- return X(r) || (r.startsWith("/") && !r.startsWith("//") && !/[\\\s\u0000-\u001f]/.test(r) ? r : "");
3075
+ const t = e, i = c, o = T(() => {
3076
+ var s;
3077
+ const r = ((s = t.src) == null ? void 0 : s.trim()) ?? "";
3078
+ return re(r) || (r.startsWith("/") && !r.startsWith("//") && !/[\\\s\u0000-\u001f]/.test(r) ? r : "");
1460
3079
  });
1461
- return (r, n) => (a(), o("div", zt, [
1462
- l.value ? (a(), o("iframe", {
1463
- key: l.value,
1464
- src: l.value,
3080
+ return (r, s) => (n(), l("div", al, [
3081
+ o.value ? (n(), l("iframe", {
3082
+ key: o.value,
3083
+ src: o.value,
1465
3084
  title: e.title,
1466
3085
  loading: e.loading,
1467
3086
  referrerpolicy: e.referrerPolicy,
1468
- onLoad: n[0] || (n[0] = (u) => i("load"))
1469
- }, null, 40, Dt)) : B(r.$slots, "invalid", {}, void 0, !0, 1)
3087
+ onLoad: s[0] || (s[0] = (a) => i("load"))
3088
+ }, null, 40, nl)) : B(r.$slots, "invalid", {}, void 0, !0, 1)
1470
3089
  ]));
1471
3090
  }
1472
3091
  });
1473
- const sl = /* @__PURE__ */ A(Kt, [["__scopeId", "data-v-b964cc57"]]), Vt = { class: "dsea-login-view" }, Rt = { class: "dsea-login-view__identity" }, Ut = {
3092
+ const ao = /* @__PURE__ */ j(ll, [["__scopeId", "data-v-b964cc57"]]), il = { class: "dsea-login-view" }, ol = { class: "dsea-login-view__identity" }, sl = {
1474
3093
  key: 0,
1475
3094
  class: "dsea-login-view__subtitle"
1476
- }, qt = ["for"], Wt = ["id", "disabled"], Ot = ["for"], Ht = ["id", "disabled"], jt = {
3095
+ }, rl = ["for"], ul = ["id", "disabled"], dl = ["for"], cl = ["id", "disabled"], ml = {
1477
3096
  key: 1,
1478
3097
  class: "dsea-login-view__error",
1479
3098
  role: "alert"
1480
- }, Qt = ["disabled"], Gt = {
3099
+ }, gl = ["disabled"], vl = {
1481
3100
  key: 2,
1482
3101
  class: "dsea-login-view__footer"
1483
- }, Xt = /* @__PURE__ */ k({
3102
+ }, bl = /* @__PURE__ */ N({
1484
3103
  __name: "AdminLoginView",
1485
3104
  props: {
1486
3105
  title: {},
@@ -1495,70 +3114,70 @@ const sl = /* @__PURE__ */ A(Kt, [["__scopeId", "data-v-b964cc57"]]), Vt = { cla
1495
3114
  },
1496
3115
  emits: ["submit"],
1497
3116
  setup(e, { emit: c }) {
1498
- const t = c, i = S(""), l = S("");
3117
+ const t = c, i = A(""), o = A("");
1499
3118
  function r() {
1500
- t("submit", { username: i.value, password: l.value });
3119
+ t("submit", { username: i.value, password: o.value });
1501
3120
  }
1502
- return (n, u) => (a(), o("main", Vt, [
1503
- s("form", {
3121
+ return (s, a) => (n(), l("main", il, [
3122
+ u("form", {
1504
3123
  class: "dsea-login-view__form",
1505
- onSubmit: H(r, ["prevent"])
3124
+ onSubmit: ee(r, ["prevent"])
1506
3125
  }, [
1507
- s("div", Rt, [
1508
- B(n.$slots, "brand", {}, void 0, !0)
3126
+ u("div", ol, [
3127
+ B(s.$slots, "brand", {}, void 0, !0)
1509
3128
  ]),
1510
- s("h1", null, d(e.title), 1),
1511
- e.subtitle ? (a(), o("p", Ut, d(e.subtitle), 1)) : p("", !0),
1512
- s("label", {
3129
+ u("h1", null, m(e.title), 1),
3130
+ e.subtitle ? (n(), l("p", sl, m(e.subtitle), 1)) : v("", !0),
3131
+ u("label", {
1513
3132
  for: `${e.formId}-username`
1514
- }, d(e.usernameLabel), 9, qt),
1515
- K(s("input", {
3133
+ }, m(e.usernameLabel), 9, rl),
3134
+ J(u("input", {
1516
3135
  id: `${e.formId}-username`,
1517
- "onUpdate:modelValue": u[0] || (u[0] = (b) => i.value = b),
3136
+ "onUpdate:modelValue": a[0] || (a[0] = (g) => i.value = g),
1518
3137
  type: "text",
1519
3138
  name: "username",
1520
3139
  autocomplete: "username",
1521
3140
  required: "",
1522
3141
  disabled: e.loading
1523
- }, null, 8, Wt), [
3142
+ }, null, 8, ul), [
1524
3143
  [
1525
- V,
3144
+ Z,
1526
3145
  i.value,
1527
3146
  void 0,
1528
3147
  { trim: !0 }
1529
3148
  ]
1530
3149
  ]),
1531
- s("label", {
3150
+ u("label", {
1532
3151
  for: `${e.formId}-password`
1533
- }, d(e.passwordLabel), 9, Ot),
1534
- K(s("input", {
3152
+ }, m(e.passwordLabel), 9, dl),
3153
+ J(u("input", {
1535
3154
  id: `${e.formId}-password`,
1536
- "onUpdate:modelValue": u[1] || (u[1] = (b) => l.value = b),
3155
+ "onUpdate:modelValue": a[1] || (a[1] = (g) => o.value = g),
1537
3156
  type: "password",
1538
3157
  name: "password",
1539
3158
  autocomplete: "current-password",
1540
3159
  required: "",
1541
3160
  disabled: e.loading
1542
- }, null, 8, Ht), [
1543
- [V, l.value]
3161
+ }, null, 8, cl), [
3162
+ [Z, o.value]
1544
3163
  ]),
1545
- e.error ? (a(), o("p", jt, d(e.error), 1)) : p("", !0),
1546
- s("button", {
3164
+ e.error ? (n(), l("p", ml, m(e.error), 1)) : v("", !0),
3165
+ u("button", {
1547
3166
  type: "submit",
1548
3167
  disabled: e.loading
1549
- }, d(e.loading ? e.loadingLabel : e.submitLabel), 9, Qt),
1550
- n.$slots.footer ? (a(), o("div", Gt, [
1551
- B(n.$slots, "footer", {}, void 0, !0)
1552
- ])) : p("", !0)
3168
+ }, m(e.loading ? e.loadingLabel : e.submitLabel), 9, gl),
3169
+ s.$slots.footer ? (n(), l("div", vl, [
3170
+ B(s.$slots, "footer", {}, void 0, !0)
3171
+ ])) : v("", !0)
1553
3172
  ], 32)
1554
3173
  ]));
1555
3174
  }
1556
3175
  });
1557
- const il = /* @__PURE__ */ A(Xt, [["__scopeId", "data-v-65bdd32a"]]), Yt = { class: "dsea-lock-view" }, Jt = { key: 0 }, Zt = ["for"], ea = ["id", "disabled"], ta = {
3176
+ const no = /* @__PURE__ */ j(bl, [["__scopeId", "data-v-65bdd32a"]]), hl = { class: "dsea-lock-view" }, pl = { key: 0 }, fl = ["for"], yl = ["id", "disabled"], kl = {
1558
3177
  key: 1,
1559
3178
  class: "dsea-lock-view__error",
1560
3179
  role: "alert"
1561
- }, aa = ["disabled"], na = /* @__PURE__ */ k({
3180
+ }, wl = ["disabled"], Sl = /* @__PURE__ */ N({
1562
3181
  __name: "AdminLockView",
1563
3182
  props: {
1564
3183
  title: {},
@@ -1572,50 +3191,50 @@ const il = /* @__PURE__ */ A(Xt, [["__scopeId", "data-v-65bdd32a"]]), Yt = { cla
1572
3191
  },
1573
3192
  emits: ["unlock", "switchAccount"],
1574
3193
  setup(e, { emit: c }) {
1575
- const t = c, i = S("");
1576
- function l() {
3194
+ const t = c, i = A("");
3195
+ function o() {
1577
3196
  t("unlock", i.value);
1578
3197
  }
1579
- return (r, n) => (a(), o("main", Yt, [
1580
- s("form", {
3198
+ return (r, s) => (n(), l("main", hl, [
3199
+ u("form", {
1581
3200
  class: "dsea-lock-view__form",
1582
- onSubmit: H(l, ["prevent"])
3201
+ onSubmit: ee(o, ["prevent"])
1583
3202
  }, [
1584
3203
  B(r.$slots, "avatar", {}, void 0, !0),
1585
- s("h1", null, d(e.title), 1),
1586
- e.identity ? (a(), o("p", Jt, d(e.identity), 1)) : p("", !0),
1587
- s("label", {
3204
+ u("h1", null, m(e.title), 1),
3205
+ e.identity ? (n(), l("p", pl, m(e.identity), 1)) : v("", !0),
3206
+ u("label", {
1588
3207
  for: `${e.formId}-password`
1589
- }, d(e.passwordLabel), 9, Zt),
1590
- K(s("input", {
3208
+ }, m(e.passwordLabel), 9, fl),
3209
+ J(u("input", {
1591
3210
  id: `${e.formId}-password`,
1592
- "onUpdate:modelValue": n[0] || (n[0] = (u) => i.value = u),
3211
+ "onUpdate:modelValue": s[0] || (s[0] = (a) => i.value = a),
1593
3212
  type: "password",
1594
3213
  autocomplete: "current-password",
1595
3214
  required: "",
1596
3215
  disabled: e.loading
1597
- }, null, 8, ea), [
1598
- [V, i.value]
3216
+ }, null, 8, yl), [
3217
+ [Z, i.value]
1599
3218
  ]),
1600
- e.error ? (a(), o("p", ta, d(e.error), 1)) : p("", !0),
1601
- s("button", {
3219
+ e.error ? (n(), l("p", kl, m(e.error), 1)) : v("", !0),
3220
+ u("button", {
1602
3221
  type: "submit",
1603
3222
  disabled: e.loading
1604
- }, d(e.unlockLabel), 9, aa),
1605
- e.switchLabel ? (a(), o("button", {
3223
+ }, m(e.unlockLabel), 9, wl),
3224
+ e.switchLabel ? (n(), l("button", {
1606
3225
  key: 2,
1607
3226
  type: "button",
1608
3227
  class: "dsea-lock-view__switch",
1609
- onClick: n[1] || (n[1] = (u) => t("switchAccount"))
1610
- }, d(e.switchLabel), 1)) : p("", !0)
3228
+ onClick: s[1] || (s[1] = (a) => t("switchAccount"))
3229
+ }, m(e.switchLabel), 1)) : v("", !0)
1611
3230
  ], 32)
1612
3231
  ]));
1613
3232
  }
1614
3233
  });
1615
- const rl = /* @__PURE__ */ A(na, [["__scopeId", "data-v-e70aeaca"]]), la = { class: "dsea-exception-view" }, oa = { class: "dsea-exception-view__content" }, sa = { class: "dsea-exception-view__status" }, ia = {
3234
+ const lo = /* @__PURE__ */ j(Sl, [["__scopeId", "data-v-e70aeaca"]]), Cl = { class: "dsea-exception-view" }, $l = { class: "dsea-exception-view__content" }, xl = { class: "dsea-exception-view__status" }, _l = {
1616
3235
  key: 0,
1617
3236
  class: "dsea-exception-view__description"
1618
- }, ra = /* @__PURE__ */ k({
3237
+ }, Ll = /* @__PURE__ */ N({
1619
3238
  __name: "AdminExceptionView",
1620
3239
  props: {
1621
3240
  status: {},
@@ -1626,25 +3245,25 @@ const rl = /* @__PURE__ */ A(na, [["__scopeId", "data-v-e70aeaca"]]), la = { cla
1626
3245
  emits: ["action"],
1627
3246
  setup(e, { emit: c }) {
1628
3247
  const t = c;
1629
- return (i, l) => (a(), o("main", la, [
1630
- s("div", oa, [
1631
- s("p", sa, d(e.status), 1),
1632
- s("h1", null, d(e.title), 1),
1633
- e.description ? (a(), o("p", ia, d(e.description), 1)) : p("", !0),
1634
- e.actionLabel ? (a(), o("button", {
3248
+ return (i, o) => (n(), l("main", Cl, [
3249
+ u("div", $l, [
3250
+ u("p", xl, m(e.status), 1),
3251
+ u("h1", null, m(e.title), 1),
3252
+ e.description ? (n(), l("p", _l, m(e.description), 1)) : v("", !0),
3253
+ e.actionLabel ? (n(), l("button", {
1635
3254
  key: 1,
1636
3255
  type: "button",
1637
- onClick: l[0] || (l[0] = (r) => t("action"))
1638
- }, d(e.actionLabel), 1)) : p("", !0)
3256
+ onClick: o[0] || (o[0] = (r) => t("action"))
3257
+ }, m(e.actionLabel), 1)) : v("", !0)
1639
3258
  ])
1640
3259
  ]));
1641
3260
  }
1642
3261
  });
1643
- const dl = /* @__PURE__ */ A(ra, [["__scopeId", "data-v-b9e53f59"]]), da = { class: "dsea-profile-tabs" }, ca = {
3262
+ const io = /* @__PURE__ */ j(Ll, [["__scopeId", "data-v-b9e53f59"]]), Ml = { class: "dsea-profile-tabs" }, Tl = {
1644
3263
  key: 0,
1645
3264
  class: "dsea-profile-tabs__notice",
1646
3265
  role: "status"
1647
- }, ua = { class: "dsea-profile-tabs__body" }, ma = ["aria-label"], ba = ["aria-current", "onClick"], va = ["aria-label"], pa = /* @__PURE__ */ k({
3266
+ }, Al = { class: "dsea-profile-tabs__body" }, Pl = ["aria-label"], Bl = ["aria-current", "onClick"], Fl = ["aria-label"], El = /* @__PURE__ */ N({
1648
3267
  __name: "AdminProfileTabs",
1649
3268
  props: {
1650
3269
  tabs: {},
@@ -1654,37 +3273,37 @@ const dl = /* @__PURE__ */ A(ra, [["__scopeId", "data-v-b9e53f59"]]), da = { cla
1654
3273
  },
1655
3274
  emits: ["update:activeKey"],
1656
3275
  setup(e, { emit: c }) {
1657
- const t = e, i = c, l = I(() => t.tabs.find((r) => r.key === t.activeKey));
1658
- return (r, n) => {
1659
- var u;
1660
- return a(), o("div", da, [
1661
- e.notice ? (a(), o("p", ca, d(e.notice), 1)) : p("", !0),
1662
- s("div", ua, [
1663
- s("nav", { "aria-label": e.label }, [
1664
- (a(!0), o(x, null, M(e.tabs, (b) => (a(), o("button", {
1665
- key: b.key,
3276
+ const t = e, i = c, o = T(() => t.tabs.find((r) => r.key === t.activeKey));
3277
+ return (r, s) => {
3278
+ var a;
3279
+ return n(), l("div", Ml, [
3280
+ e.notice ? (n(), l("p", Tl, m(e.notice), 1)) : v("", !0),
3281
+ u("div", Al, [
3282
+ u("nav", { "aria-label": e.label }, [
3283
+ (n(!0), l(D, null, U(e.tabs, (g) => (n(), l("button", {
3284
+ key: g.key,
1666
3285
  type: "button",
1667
- "aria-current": b.key === e.activeKey ? "page" : void 0,
1668
- onClick: (g) => i("update:activeKey", b.key)
1669
- }, d(b.label), 9, ba))), 128))
1670
- ], 8, ma),
1671
- s("section", {
1672
- "aria-label": (u = l.value) == null ? void 0 : u.label
3286
+ "aria-current": g.key === e.activeKey ? "page" : void 0,
3287
+ onClick: (f) => i("update:activeKey", g.key)
3288
+ }, m(g.label), 9, Bl))), 128))
3289
+ ], 8, Pl),
3290
+ u("section", {
3291
+ "aria-label": (a = o.value) == null ? void 0 : a.label
1673
3292
  }, [
1674
- l.value ? (a(), P(he(l.value.component), { key: 0 })) : B(r.$slots, "default", {}, void 0, !0, 1)
1675
- ], 8, va)
3293
+ o.value ? (n(), E(bt(o.value.component), { key: 0 })) : B(r.$slots, "default", {}, void 0, !0, 1)
3294
+ ], 8, Fl)
1676
3295
  ])
1677
3296
  ]);
1678
3297
  };
1679
3298
  }
1680
3299
  });
1681
- const cl = /* @__PURE__ */ A(pa, [["__scopeId", "data-v-55c2076e"]]), ga = { key: 0 }, ha = ["value"], fa = { key: 1 }, ya = {
3300
+ const oo = /* @__PURE__ */ j(El, [["__scopeId", "data-v-55c2076e"]]), Nl = { key: 0 }, Il = ["value"], zl = { key: 1 }, Dl = {
1682
3301
  key: 2,
1683
3302
  class: "dsea-profile-form__avatar"
1684
- }, ka = {
3303
+ }, Rl = {
1685
3304
  key: 3,
1686
3305
  role: "alert"
1687
- }, _a = ["disabled"], wa = /* @__PURE__ */ k({
3306
+ }, Kl = ["disabled"], Ol = /* @__PURE__ */ N({
1688
3307
  __name: "AdminProfileForm",
1689
3308
  props: {
1690
3309
  name: {},
@@ -1697,88 +3316,88 @@ const cl = /* @__PURE__ */ A(pa, [["__scopeId", "data-v-55c2076e"]]), ga = { key
1697
3316
  },
1698
3317
  emits: ["submit"],
1699
3318
  setup(e, { emit: c }) {
1700
- const t = e, i = c, l = oe({ name: t.name, email: t.email, currentPassword: "" });
1701
- U(() => [t.name, t.email], () => {
1702
- l.name = t.name, l.email = t.email;
3319
+ const t = e, i = c, o = Ie({ name: t.name, email: t.email, currentPassword: "" });
3320
+ G(() => [t.name, t.email], () => {
3321
+ o.name = t.name, o.email = t.email;
1703
3322
  });
1704
3323
  function r() {
1705
3324
  t.saving || (i("submit", {
1706
- name: l.name.trim(),
1707
- email: l.email.trim(),
1708
- ...t.requireCurrentPassword ? { currentPassword: l.currentPassword } : {}
1709
- }), l.currentPassword = "");
3325
+ name: o.name.trim(),
3326
+ email: o.email.trim(),
3327
+ ...t.requireCurrentPassword ? { currentPassword: o.currentPassword } : {}
3328
+ }), o.currentPassword = "");
1710
3329
  }
1711
- return (n, u) => (a(), o("form", {
3330
+ return (s, a) => (n(), l("form", {
1712
3331
  class: "dsea-profile-form",
1713
- onSubmit: H(r, ["prevent"])
3332
+ onSubmit: ee(r, ["prevent"])
1714
3333
  }, [
1715
- s("label", null, [
1716
- z(d(e.labels.name), 1),
1717
- K(s("input", {
1718
- "onUpdate:modelValue": u[0] || (u[0] = (b) => l.name = b),
3334
+ u("label", null, [
3335
+ Q(m(e.labels.name), 1),
3336
+ J(u("input", {
3337
+ "onUpdate:modelValue": a[0] || (a[0] = (g) => o.name = g),
1719
3338
  type: "text",
1720
3339
  required: "",
1721
3340
  maxlength: "100",
1722
3341
  autocomplete: "name"
1723
3342
  }, null, 512), [
1724
3343
  [
1725
- V,
1726
- l.name,
3344
+ Z,
3345
+ o.name,
1727
3346
  void 0,
1728
3347
  { trim: !0 }
1729
3348
  ]
1730
3349
  ])
1731
3350
  ]),
1732
- s("label", null, [
1733
- z(d(e.labels.email), 1),
1734
- K(s("input", {
1735
- "onUpdate:modelValue": u[1] || (u[1] = (b) => l.email = b),
3351
+ u("label", null, [
3352
+ Q(m(e.labels.email), 1),
3353
+ J(u("input", {
3354
+ "onUpdate:modelValue": a[1] || (a[1] = (g) => o.email = g),
1736
3355
  type: "email",
1737
3356
  autocomplete: "email"
1738
3357
  }, null, 512), [
1739
3358
  [
1740
- V,
1741
- l.email,
3359
+ Z,
3360
+ o.email,
1742
3361
  void 0,
1743
3362
  { trim: !0 }
1744
3363
  ]
1745
3364
  ])
1746
3365
  ]),
1747
- e.phone !== void 0 ? (a(), o("label", ga, [
1748
- z(d(e.labels.phone), 1),
1749
- s("input", {
3366
+ e.phone !== void 0 ? (n(), l("label", Nl, [
3367
+ Q(m(e.labels.phone), 1),
3368
+ u("input", {
1750
3369
  value: e.phone,
1751
3370
  type: "tel",
1752
3371
  disabled: "",
1753
3372
  autocomplete: "tel"
1754
- }, null, 8, ha)
1755
- ])) : p("", !0),
1756
- e.requireCurrentPassword ? (a(), o("label", fa, [
1757
- z(d(e.labels.currentPassword), 1),
1758
- K(s("input", {
1759
- "onUpdate:modelValue": u[2] || (u[2] = (b) => l.currentPassword = b),
3373
+ }, null, 8, Il)
3374
+ ])) : v("", !0),
3375
+ e.requireCurrentPassword ? (n(), l("label", zl, [
3376
+ Q(m(e.labels.currentPassword), 1),
3377
+ J(u("input", {
3378
+ "onUpdate:modelValue": a[2] || (a[2] = (g) => o.currentPassword = g),
1760
3379
  type: "password",
1761
3380
  required: "",
1762
3381
  autocomplete: "current-password"
1763
3382
  }, null, 512), [
1764
- [V, l.currentPassword]
3383
+ [Z, o.currentPassword]
1765
3384
  ])
1766
- ])) : p("", !0),
1767
- n.$slots.avatar ? (a(), o("div", ya, [
1768
- B(n.$slots, "avatar", {}, void 0, !0)
1769
- ])) : p("", !0),
1770
- e.error ? (a(), o("p", ka, d(e.error), 1)) : p("", !0),
1771
- s("button", {
3385
+ ])) : v("", !0),
3386
+ s.$slots.avatar ? (n(), l("div", Dl, [
3387
+ B(s.$slots, "avatar", {}, void 0, !0)
3388
+ ])) : v("", !0),
3389
+ e.error ? (n(), l("p", Rl, m(e.error), 1)) : v("", !0),
3390
+ u("button", {
1772
3391
  type: "submit",
1773
3392
  disabled: e.saving
1774
- }, d(e.saving ? e.labels.saving : e.labels.save), 9, _a)
3393
+ }, m(e.saving ? e.labels.saving : e.labels.save), 9, Kl)
1775
3394
  ], 32));
1776
3395
  }
1777
3396
  });
1778
- const ul = /* @__PURE__ */ A(wa, [["__scopeId", "data-v-4dc61808"]]), $a = {
3397
+ const so = /* @__PURE__ */ j(Ol, [["__scopeId", "data-v-4dc61808"]]), Wl = {
1779
3398
  key: 0,
1780
3399
  role: "alert"
1781
- }, La = ["disabled"], Ca = /* @__PURE__ */ k({
3400
+ }, Vl = ["disabled"], ql = /* @__PURE__ */ N({
1782
3401
  __name: "AdminPasswordForm",
1783
3402
  props: {
1784
3403
  minBytes: { default: 10 },
@@ -1789,70 +3408,70 @@ const ul = /* @__PURE__ */ A(wa, [["__scopeId", "data-v-4dc61808"]]), $a = {
1789
3408
  },
1790
3409
  emits: ["submit"],
1791
3410
  setup(e, { expose: c, emit: t }) {
1792
- const i = e, l = t, r = S(""), n = S(""), u = S(""), b = S("");
1793
- function g() {
3411
+ const i = e, o = t, r = A(""), s = A(""), a = A(""), g = A("");
3412
+ function f() {
1794
3413
  if (i.saving)
1795
3414
  return;
1796
- const m = new TextEncoder().encode(n.value).length;
1797
- if (m < i.minBytes || m > i.maxBytes) {
1798
- b.value = i.labels.length;
3415
+ const p = new TextEncoder().encode(s.value).length;
3416
+ if (p < i.minBytes || p > i.maxBytes) {
3417
+ g.value = i.labels.length;
1799
3418
  return;
1800
3419
  }
1801
- if (n.value !== u.value) {
1802
- b.value = i.labels.mismatch;
3420
+ if (s.value !== a.value) {
3421
+ g.value = i.labels.mismatch;
1803
3422
  return;
1804
3423
  }
1805
- b.value = "", l("submit", { currentPassword: r.value, password: n.value });
3424
+ g.value = "", o("submit", { currentPassword: r.value, password: s.value });
1806
3425
  }
1807
- function v() {
1808
- r.value = "", n.value = "", u.value = "", b.value = "";
3426
+ function b() {
3427
+ r.value = "", s.value = "", a.value = "", g.value = "";
1809
3428
  }
1810
- return c({ reset: v }), (m, L) => (a(), o("form", {
3429
+ return c({ reset: b }), (p, I) => (n(), l("form", {
1811
3430
  class: "dsea-password-form",
1812
- onSubmit: H(g, ["prevent"])
3431
+ onSubmit: ee(f, ["prevent"])
1813
3432
  }, [
1814
- s("label", null, [
1815
- z(d(e.labels.current), 1),
1816
- K(s("input", {
1817
- "onUpdate:modelValue": L[0] || (L[0] = (F) => r.value = F),
3433
+ u("label", null, [
3434
+ Q(m(e.labels.current), 1),
3435
+ J(u("input", {
3436
+ "onUpdate:modelValue": I[0] || (I[0] = (H) => r.value = H),
1818
3437
  type: "password",
1819
3438
  required: "",
1820
3439
  autocomplete: "current-password"
1821
3440
  }, null, 512), [
1822
- [V, r.value]
3441
+ [Z, r.value]
1823
3442
  ])
1824
3443
  ]),
1825
- s("label", null, [
1826
- z(d(e.labels.next), 1),
1827
- K(s("input", {
1828
- "onUpdate:modelValue": L[1] || (L[1] = (F) => n.value = F),
3444
+ u("label", null, [
3445
+ Q(m(e.labels.next), 1),
3446
+ J(u("input", {
3447
+ "onUpdate:modelValue": I[1] || (I[1] = (H) => s.value = H),
1829
3448
  type: "password",
1830
3449
  required: "",
1831
3450
  autocomplete: "new-password"
1832
3451
  }, null, 512), [
1833
- [V, n.value]
3452
+ [Z, s.value]
1834
3453
  ])
1835
3454
  ]),
1836
- s("label", null, [
1837
- z(d(e.labels.confirm), 1),
1838
- K(s("input", {
1839
- "onUpdate:modelValue": L[2] || (L[2] = (F) => u.value = F),
3455
+ u("label", null, [
3456
+ Q(m(e.labels.confirm), 1),
3457
+ J(u("input", {
3458
+ "onUpdate:modelValue": I[2] || (I[2] = (H) => a.value = H),
1840
3459
  type: "password",
1841
3460
  required: "",
1842
3461
  autocomplete: "new-password"
1843
3462
  }, null, 512), [
1844
- [V, u.value]
3463
+ [Z, a.value]
1845
3464
  ])
1846
3465
  ]),
1847
- b.value || e.error ? (a(), o("p", $a, d(b.value || e.error), 1)) : p("", !0),
1848
- s("button", {
3466
+ g.value || e.error ? (n(), l("p", Wl, m(g.value || e.error), 1)) : v("", !0),
3467
+ u("button", {
1849
3468
  type: "submit",
1850
3469
  disabled: e.saving
1851
- }, d(e.saving ? e.labels.saving : e.labels.save), 9, La)
3470
+ }, m(e.saving ? e.labels.saving : e.labels.save), 9, Vl)
1852
3471
  ], 32));
1853
3472
  }
1854
3473
  });
1855
- const ml = /* @__PURE__ */ A(Ca, [["__scopeId", "data-v-3eb63418"]]), Sa = ["aria-label"], xa = ["onClick"], Aa = /* @__PURE__ */ k({
3474
+ const ro = /* @__PURE__ */ j(ql, [["__scopeId", "data-v-3eb63418"]]), Ul = ["aria-label"], Hl = ["onClick"], jl = /* @__PURE__ */ N({
1856
3475
  __name: "AdminSecuritySettings",
1857
3476
  props: {
1858
3477
  items: {},
@@ -1861,31 +3480,31 @@ const ml = /* @__PURE__ */ A(Ca, [["__scopeId", "data-v-3eb63418"]]), Sa = ["ari
1861
3480
  emits: ["action"],
1862
3481
  setup(e, { emit: c }) {
1863
3482
  const t = c;
1864
- return (i, l) => (a(), o("section", {
3483
+ return (i, o) => (n(), l("section", {
1865
3484
  class: "dsea-security-settings",
1866
3485
  "aria-label": e.label
1867
3486
  }, [
1868
- (a(!0), o(x, null, M(e.items, (r) => (a(), o("div", {
3487
+ (n(!0), l(D, null, U(e.items, (r) => (n(), l("div", {
1869
3488
  key: r.key,
1870
3489
  class: "dsea-security-settings__row"
1871
3490
  }, [
1872
- s("div", null, [
1873
- s("strong", null, d(r.title), 1),
1874
- s("p", null, d(r.description), 1)
3491
+ u("div", null, [
3492
+ u("strong", null, m(r.title), 1),
3493
+ u("p", null, m(r.description), 1)
1875
3494
  ]),
1876
- r.action ? (a(), o("button", {
3495
+ r.action ? (n(), l("button", {
1877
3496
  key: 0,
1878
3497
  type: "button",
1879
- onClick: (n) => t("action", r.key)
1880
- }, d(r.action), 9, xa)) : p("", !0)
3498
+ onClick: (s) => t("action", r.key)
3499
+ }, m(r.action), 9, Hl)) : v("", !0)
1881
3500
  ]))), 128))
1882
- ], 8, Sa));
3501
+ ], 8, Ul));
1883
3502
  }
1884
3503
  });
1885
- const bl = /* @__PURE__ */ A(Aa, [["__scopeId", "data-v-9de763c2"]]), Ma = ["aria-label"], Ta = ["disabled"], Ba = { class: "dsea-error-log__table-wrap" }, Pa = { scope: "col" }, Ia = { scope: "col" }, Ea = { scope: "col" }, Fa = ["onClick"], Na = { key: 0 }, za = {
3504
+ const uo = /* @__PURE__ */ j(jl, [["__scopeId", "data-v-9de763c2"]]), Ql = ["aria-label"], Xl = ["disabled"], Yl = { class: "dsea-error-log__table-wrap" }, Gl = { scope: "col" }, Jl = { scope: "col" }, Zl = { scope: "col" }, ei = ["onClick"], ti = { key: 0 }, ai = {
1886
3505
  colspan: "4",
1887
3506
  class: "dsea-error-log__empty"
1888
- }, Da = ["aria-label"], Ka = ["aria-label"], Va = { key: 0 }, Ra = /* @__PURE__ */ k({
3507
+ }, ni = ["aria-label"], li = ["aria-label"], ii = { key: 0 }, oi = /* @__PURE__ */ N({
1889
3508
  __name: "AdminErrorLogView",
1890
3509
  props: {
1891
3510
  entries: {},
@@ -1900,96 +3519,96 @@ const bl = /* @__PURE__ */ A(Aa, [["__scopeId", "data-v-9de763c2"]]), Ma = ["ari
1900
3519
  },
1901
3520
  emits: ["clear"],
1902
3521
  setup(e, { emit: c }) {
1903
- const t = c, i = S(null), l = S();
1904
- return U(i, async (r) => {
1905
- var n;
1906
- r && (await se(), (n = l.value) == null || n.focus());
1907
- }), (r, n) => (a(), o("section", {
3522
+ const t = c, i = A(null), o = A();
3523
+ return G(i, async (r) => {
3524
+ var s;
3525
+ r && (await De(), (s = o.value) == null || s.focus());
3526
+ }), (r, s) => (n(), l("section", {
1908
3527
  class: "dsea-error-log",
1909
3528
  "aria-label": e.title
1910
3529
  }, [
1911
- s("header", null, [
1912
- s("h1", null, d(e.title), 1),
1913
- s("button", {
3530
+ u("header", null, [
3531
+ u("h1", null, m(e.title), 1),
3532
+ u("button", {
1914
3533
  type: "button",
1915
3534
  disabled: !e.entries.length,
1916
- onClick: n[0] || (n[0] = (u) => t("clear"))
1917
- }, d(e.clearLabel), 9, Ta)
3535
+ onClick: s[0] || (s[0] = (a) => t("clear"))
3536
+ }, m(e.clearLabel), 9, Xl)
1918
3537
  ]),
1919
- s("div", Ba, [
1920
- s("table", null, [
1921
- s("thead", null, [
1922
- s("tr", null, [
1923
- s("th", Pa, d(e.timeLabel), 1),
1924
- s("th", Ia, d(e.messageLabel), 1),
1925
- s("th", Ea, d(e.sourceLabel), 1),
1926
- n[4] || (n[4] = s("th", { scope: "col" }, null, -1))
3538
+ u("div", Yl, [
3539
+ u("table", null, [
3540
+ u("thead", null, [
3541
+ u("tr", null, [
3542
+ u("th", Gl, m(e.timeLabel), 1),
3543
+ u("th", Jl, m(e.messageLabel), 1),
3544
+ u("th", Zl, m(e.sourceLabel), 1),
3545
+ s[4] || (s[4] = u("th", { scope: "col" }, null, -1))
1927
3546
  ])
1928
3547
  ]),
1929
- s("tbody", null, [
1930
- (a(!0), o(x, null, M(e.entries, (u) => (a(), o("tr", {
1931
- key: u.id
3548
+ u("tbody", null, [
3549
+ (n(!0), l(D, null, U(e.entries, (a) => (n(), l("tr", {
3550
+ key: a.id
1932
3551
  }, [
1933
- s("td", null, d(u.time), 1),
1934
- s("td", null, d(u.message), 1),
1935
- s("td", null, d(u.source), 1),
1936
- s("td", null, [
1937
- s("button", {
3552
+ u("td", null, m(a.time), 1),
3553
+ u("td", null, m(a.message), 1),
3554
+ u("td", null, m(a.source), 1),
3555
+ u("td", null, [
3556
+ u("button", {
1938
3557
  type: "button",
1939
- onClick: (b) => i.value = u
1940
- }, d(e.detailsLabel), 9, Fa)
3558
+ onClick: (g) => i.value = a
3559
+ }, m(e.detailsLabel), 9, ei)
1941
3560
  ])
1942
3561
  ]))), 128)),
1943
- e.entries.length ? p("", !0) : (a(), o("tr", Na, [
1944
- s("td", za, d(e.emptyLabel), 1)
3562
+ e.entries.length ? v("", !0) : (n(), l("tr", ti, [
3563
+ u("td", ai, m(e.emptyLabel), 1)
1945
3564
  ]))
1946
3565
  ])
1947
3566
  ])
1948
3567
  ]),
1949
- i.value ? (a(), o("div", {
3568
+ i.value ? (n(), l("div", {
1950
3569
  key: 0,
1951
3570
  class: "dsea-error-log__backdrop",
1952
- onClick: n[3] || (n[3] = H((u) => i.value = null, ["self"]))
3571
+ onClick: s[3] || (s[3] = ee((a) => i.value = null, ["self"]))
1953
3572
  }, [
1954
- s("section", {
3573
+ u("section", {
1955
3574
  ref_key: "dialog",
1956
- ref: l,
3575
+ ref: o,
1957
3576
  role: "dialog",
1958
3577
  "aria-modal": "true",
1959
3578
  "aria-label": e.detailsLabel,
1960
3579
  tabindex: "-1",
1961
3580
  class: "dsea-error-log__dialog",
1962
- onKeydown: n[2] || (n[2] = J((u) => i.value = null, ["esc"]))
3581
+ onKeydown: s[2] || (s[2] = pe((a) => i.value = null, ["esc"]))
1963
3582
  }, [
1964
- s("header", null, [
1965
- s("h2", null, d(i.value.message), 1),
1966
- s("button", {
3583
+ u("header", null, [
3584
+ u("h2", null, m(i.value.message), 1),
3585
+ u("button", {
1967
3586
  type: "button",
1968
3587
  "aria-label": e.closeLabel,
1969
- onClick: n[1] || (n[1] = (u) => i.value = null)
3588
+ onClick: s[1] || (s[1] = (a) => i.value = null)
1970
3589
  }, [
1971
- $(y(w), {
3590
+ _(h(L), {
1972
3591
  icon: "lucide:x",
1973
3592
  size: 18
1974
3593
  })
1975
- ], 8, Ka)
3594
+ ], 8, li)
1976
3595
  ]),
1977
- s("dl", null, [
1978
- s("dt", null, d(e.timeLabel), 1),
1979
- s("dd", null, d(i.value.time), 1),
1980
- s("dt", null, d(e.sourceLabel), 1),
1981
- s("dd", null, d(i.value.source), 1)
3596
+ u("dl", null, [
3597
+ u("dt", null, m(e.timeLabel), 1),
3598
+ u("dd", null, m(i.value.time), 1),
3599
+ u("dt", null, m(e.sourceLabel), 1),
3600
+ u("dd", null, m(i.value.source), 1)
1982
3601
  ]),
1983
- i.value.details ? (a(), o("pre", Va, d(i.value.details), 1)) : p("", !0)
1984
- ], 40, Da)
1985
- ])) : p("", !0)
1986
- ], 8, Ma));
3602
+ i.value.details ? (n(), l("pre", ii, m(i.value.details), 1)) : v("", !0)
3603
+ ], 40, ni)
3604
+ ])) : v("", !0)
3605
+ ], 8, Ql));
1987
3606
  }
1988
3607
  });
1989
- const vl = /* @__PURE__ */ A(Ra, [["__scopeId", "data-v-c1b52346"]]), Ua = { class: "dsea-about-view" }, qa = { key: 0 }, Wa = { class: "dsea-about-view__info" }, Oa = ["href"], Ha = {
3608
+ const co = /* @__PURE__ */ j(oi, [["__scopeId", "data-v-c1b52346"]]), si = { class: "dsea-about-view" }, ri = { key: 0 }, ui = { class: "dsea-about-view__info" }, di = ["href"], ci = {
1990
3609
  key: 0,
1991
3610
  class: "dsea-about-view__dependencies"
1992
- }, ja = /* @__PURE__ */ k({
3611
+ }, mi = /* @__PURE__ */ N({
1993
3612
  __name: "AdminAboutView",
1994
3613
  props: {
1995
3614
  title: {},
@@ -2003,47 +3622,47 @@ const vl = /* @__PURE__ */ A(Ra, [["__scopeId", "data-v-c1b52346"]]), Ua = { cla
2003
3622
  dependenciesLabel: { default: "Dependencies" }
2004
3623
  },
2005
3624
  setup(e) {
2006
- const c = e, t = I(() => c.links.filter((l) => X(l.href))), i = I(() => Object.entries(c.dependencies).sort(([l], [r]) => l.localeCompare(r)));
2007
- return (l, r) => (a(), o("section", Ua, [
2008
- s("header", null, [
2009
- s("h1", null, d(e.title), 1),
2010
- e.description ? (a(), o("p", qa, d(e.description), 1)) : p("", !0)
3625
+ const c = e, t = T(() => c.links.filter((o) => re(o.href))), i = T(() => Object.entries(c.dependencies).sort(([o], [r]) => o.localeCompare(r)));
3626
+ return (o, r) => (n(), l("section", si, [
3627
+ u("header", null, [
3628
+ u("h1", null, m(e.title), 1),
3629
+ e.description ? (n(), l("p", ri, m(e.description), 1)) : v("", !0)
2011
3630
  ]),
2012
- s("dl", Wa, [
2013
- s("dt", null, d(e.versionLabel), 1),
2014
- s("dd", null, d(e.version), 1),
2015
- e.builtAt ? (a(), o(x, { key: 0 }, [
2016
- s("dt", null, d(e.builtAtLabel), 1),
2017
- s("dd", null, d(e.builtAt), 1)
2018
- ], 64)) : p("", !0),
2019
- (a(!0), o(x, null, M(t.value, (n) => (a(), o(x, {
2020
- key: n.label
3631
+ u("dl", ui, [
3632
+ u("dt", null, m(e.versionLabel), 1),
3633
+ u("dd", null, m(e.version), 1),
3634
+ e.builtAt ? (n(), l(D, { key: 0 }, [
3635
+ u("dt", null, m(e.builtAtLabel), 1),
3636
+ u("dd", null, m(e.builtAt), 1)
3637
+ ], 64)) : v("", !0),
3638
+ (n(!0), l(D, null, U(t.value, (s) => (n(), l(D, {
3639
+ key: s.label
2021
3640
  }, [
2022
- s("dt", null, d(n.label), 1),
2023
- s("dd", null, [
2024
- s("a", {
2025
- href: n.href,
3641
+ u("dt", null, m(s.label), 1),
3642
+ u("dd", null, [
3643
+ u("a", {
3644
+ href: s.href,
2026
3645
  target: "_blank",
2027
3646
  rel: "noopener noreferrer"
2028
- }, d(n.label), 9, Oa)
3647
+ }, m(s.label), 9, di)
2029
3648
  ])
2030
3649
  ], 64))), 128))
2031
3650
  ]),
2032
- i.value.length ? (a(), o("section", Ha, [
2033
- s("h2", null, d(e.dependenciesLabel), 1),
2034
- s("dl", null, [
2035
- (a(!0), o(x, null, M(i.value, (n) => (a(), o(x, {
2036
- key: n[0]
3651
+ i.value.length ? (n(), l("section", ci, [
3652
+ u("h2", null, m(e.dependenciesLabel), 1),
3653
+ u("dl", null, [
3654
+ (n(!0), l(D, null, U(i.value, (s) => (n(), l(D, {
3655
+ key: s[0]
2037
3656
  }, [
2038
- s("dt", null, d(n[0]), 1),
2039
- s("dd", null, d(n[1]), 1)
3657
+ u("dt", null, m(s[0]), 1),
3658
+ u("dd", null, m(s[1]), 1)
2040
3659
  ], 64))), 128))
2041
3660
  ])
2042
- ])) : p("", !0)
3661
+ ])) : v("", !0)
2043
3662
  ]));
2044
3663
  }
2045
3664
  });
2046
- const pl = /* @__PURE__ */ A(ja, [["__scopeId", "data-v-c800d903"]]), Qa = ["aria-label"], Ga = ["title"], Xa = ["aria-label", "onClick"], Ya = /* @__PURE__ */ k({
3665
+ const mo = /* @__PURE__ */ j(mi, [["__scopeId", "data-v-c800d903"]]), gi = ["aria-label"], vi = ["title"], bi = ["aria-label", "onClick"], hi = /* @__PURE__ */ N({
2047
3666
  __name: "AgentAttachmentList",
2048
3667
  props: {
2049
3668
  attachments: {},
@@ -2053,45 +3672,45 @@ const pl = /* @__PURE__ */ A(ja, [["__scopeId", "data-v-c800d903"]]), Qa = ["ari
2053
3672
  emits: ["remove"],
2054
3673
  setup(e, { emit: c }) {
2055
3674
  const t = c;
2056
- function i(l) {
2057
- return l < 1024 ? `${l} B` : l < 1048576 ? `${(l / 1024).toFixed(1)} KB` : `${(l / 1048576).toFixed(1)} MB`;
3675
+ function i(o) {
3676
+ return o < 1024 ? `${o} B` : o < 1048576 ? `${(o / 1024).toFixed(1)} KB` : `${(o / 1048576).toFixed(1)} MB`;
2058
3677
  }
2059
- return (l, r) => e.attachments.length ? (a(), o("ul", {
3678
+ return (o, r) => e.attachments.length ? (n(), l("ul", {
2060
3679
  key: 0,
2061
3680
  class: "dsea-agent-attachments",
2062
3681
  "aria-label": e.label
2063
3682
  }, [
2064
- (a(!0), o(x, null, M(e.attachments, (n) => (a(), o("li", {
2065
- key: n.id
3683
+ (n(!0), l(D, null, U(e.attachments, (s) => (n(), l("li", {
3684
+ key: s.id
2066
3685
  }, [
2067
- $(y(w), {
2068
- icon: n.status === "uploading" ? "lucide:loader-circle" : "lucide:paperclip",
3686
+ _(h(L), {
3687
+ icon: s.status === "uploading" ? "lucide:loader-circle" : "lucide:paperclip",
2069
3688
  size: 14
2070
3689
  }, null, 8, ["icon"]),
2071
- s("span", {
3690
+ u("span", {
2072
3691
  class: "dsea-agent-attachments__name",
2073
- title: n.name
2074
- }, d(n.name), 9, Ga),
2075
- s("small", null, d(i(n.size)), 1),
2076
- n.status !== "uploading" ? (a(), o("button", {
3692
+ title: s.name
3693
+ }, m(s.name), 9, vi),
3694
+ u("small", null, m(i(s.size)), 1),
3695
+ s.status !== "uploading" ? (n(), l("button", {
2077
3696
  key: 0,
2078
3697
  type: "button",
2079
- "aria-label": `${e.removeLabel}: ${n.name}`,
2080
- onClick: (u) => t("remove", n.id)
3698
+ "aria-label": `${e.removeLabel}: ${s.name}`,
3699
+ onClick: (a) => t("remove", s.id)
2081
3700
  }, [
2082
- $(y(w), {
3701
+ _(h(L), {
2083
3702
  icon: "lucide:x",
2084
3703
  size: 14
2085
3704
  })
2086
- ], 8, Xa)) : p("", !0)
3705
+ ], 8, bi)) : v("", !0)
2087
3706
  ]))), 128))
2088
- ], 8, Qa)) : p("", !0);
3707
+ ], 8, gi)) : v("", !0);
2089
3708
  }
2090
3709
  });
2091
- const Ja = /* @__PURE__ */ A(Ya, [["__scopeId", "data-v-23c5547e"]]), Za = { class: "dsea-agent-model-select" }, en = { class: "dsea-agent-model-select__label" }, tn = ["value", "disabled"], an = {
3710
+ const pi = /* @__PURE__ */ j(hi, [["__scopeId", "data-v-23c5547e"]]), fi = { class: "dsea-agent-model-select" }, yi = { class: "dsea-agent-model-select__label" }, ki = ["value", "disabled"], wi = {
2092
3711
  value: "",
2093
3712
  disabled: ""
2094
- }, nn = ["value"], ln = /* @__PURE__ */ k({
3713
+ }, Si = ["value"], Ci = /* @__PURE__ */ N({
2095
3714
  __name: "AgentModelSelect",
2096
3715
  props: {
2097
3716
  model: {},
@@ -2105,26 +3724,26 @@ const Ja = /* @__PURE__ */ A(Ya, [["__scopeId", "data-v-23c5547e"]]), Za = { cla
2105
3724
  emits: ["update:model"],
2106
3725
  setup(e, { emit: c }) {
2107
3726
  const t = c;
2108
- function i(l) {
2109
- t("update:model", l.target.value);
3727
+ function i(o) {
3728
+ t("update:model", o.target.value);
2110
3729
  }
2111
- return (l, r) => (a(), o("label", Za, [
2112
- s("span", en, d(e.label), 1),
2113
- s("select", {
3730
+ return (o, r) => (n(), l("label", fi, [
3731
+ u("span", yi, m(e.label), 1),
3732
+ u("select", {
2114
3733
  value: e.model,
2115
3734
  disabled: e.disabled || e.loading,
2116
3735
  onChange: i
2117
3736
  }, [
2118
- s("option", an, d(e.loading ? e.loadingLabel : e.placeholder), 1),
2119
- (a(!0), o(x, null, M(e.models, (n) => (a(), o("option", {
2120
- key: n.id,
2121
- value: n.id
2122
- }, d(n.name) + d(n.provider ? ` · ${n.provider}` : ""), 9, nn))), 128))
2123
- ], 40, tn)
3737
+ u("option", wi, m(e.loading ? e.loadingLabel : e.placeholder), 1),
3738
+ (n(!0), l(D, null, U(e.models, (s) => (n(), l("option", {
3739
+ key: s.id,
3740
+ value: s.id
3741
+ }, m(s.name) + m(s.provider ? ` · ${s.provider}` : ""), 9, Si))), 128))
3742
+ ], 40, ki)
2124
3743
  ]));
2125
3744
  }
2126
3745
  });
2127
- const on = /* @__PURE__ */ A(ln, [["__scopeId", "data-v-bd9414ff"]]), sn = { class: "dsea-agent-composer" }, rn = ["value", "placeholder", "disabled"], dn = { class: "dsea-agent-composer__toolbar" }, cn = ["disabled", "aria-label", "title"], un = ["value", "aria-label", "disabled"], mn = ["value"], bn = ["disabled", "aria-label", "title"], vn = /* @__PURE__ */ k({
3746
+ const $i = /* @__PURE__ */ j(Ci, [["__scopeId", "data-v-bd9414ff"]]), xi = { class: "dsea-agent-composer" }, _i = ["value", "placeholder", "disabled"], Li = { class: "dsea-agent-composer__toolbar" }, Mi = ["disabled", "aria-label", "title"], Ti = ["value", "aria-label", "disabled"], Ai = ["value"], Pi = ["disabled", "aria-label", "title"], Bi = /* @__PURE__ */ N({
2128
3747
  __name: "AgentComposer",
2129
3748
  props: {
2130
3749
  draft: {},
@@ -2148,102 +3767,102 @@ const on = /* @__PURE__ */ A(ln, [["__scopeId", "data-v-bd9414ff"]]), sn = { cla
2148
3767
  },
2149
3768
  emits: ["update:draft", "update:model", "update:approvalMode", "files", "removeAttachment", "send", "stop"],
2150
3769
  setup(e, { emit: c }) {
2151
- const t = e, i = c, l = S();
2152
- function r(b) {
2153
- i("update:draft", b.target.value);
3770
+ const t = e, i = c, o = A();
3771
+ function r(g) {
3772
+ i("update:draft", g.target.value);
2154
3773
  }
2155
- function n(b) {
2156
- b.key !== "Enter" || b.shiftKey || b.isComposing || (b.preventDefault(), !t.loading && t.draft.trim() && !t.disabled && !t.waitingApproval && i("send"));
3774
+ function s(g) {
3775
+ g.key !== "Enter" || g.shiftKey || g.isComposing || (g.preventDefault(), !t.loading && t.draft.trim() && !t.disabled && !t.waitingApproval && i("send"));
2157
3776
  }
2158
- function u(b) {
2159
- const g = b.target, v = Array.from(g.files ?? []);
2160
- v.length && i("files", v), g.value = "";
3777
+ function a(g) {
3778
+ const f = g.target, b = Array.from(f.files ?? []);
3779
+ b.length && i("files", b), f.value = "";
2161
3780
  }
2162
- return (b, g) => (a(), o("div", sn, [
2163
- $(Ja, {
3781
+ return (g, f) => (n(), l("div", xi, [
3782
+ _(pi, {
2164
3783
  attachments: e.attachments,
2165
3784
  label: e.attachmentsLabel,
2166
- onRemove: g[0] || (g[0] = (v) => i("removeAttachment", v))
3785
+ onRemove: f[0] || (f[0] = (b) => i("removeAttachment", b))
2167
3786
  }, null, 8, ["attachments", "label"]),
2168
- s("textarea", {
3787
+ u("textarea", {
2169
3788
  value: e.draft,
2170
3789
  placeholder: e.waitingApproval ? e.waitingLabel : e.placeholder,
2171
3790
  disabled: e.disabled || e.waitingApproval,
2172
3791
  rows: "2",
2173
3792
  onInput: r,
2174
- onKeydown: n
2175
- }, null, 40, rn),
2176
- s("div", dn, [
2177
- s("input", {
3793
+ onKeydown: s
3794
+ }, null, 40, _i),
3795
+ u("div", Li, [
3796
+ u("input", {
2178
3797
  ref_key: "fileInput",
2179
- ref: l,
3798
+ ref: o,
2180
3799
  type: "file",
2181
3800
  multiple: "",
2182
3801
  class: "dsea-agent-composer__file-input",
2183
- onChange: u
3802
+ onChange: a
2184
3803
  }, null, 544),
2185
- s("button", {
3804
+ u("button", {
2186
3805
  type: "button",
2187
3806
  class: "dsea-agent-composer__icon",
2188
3807
  disabled: e.disabled || e.waitingApproval,
2189
3808
  "aria-label": e.attachLabel,
2190
3809
  title: e.attachLabel,
2191
- onClick: g[1] || (g[1] = (v) => {
2192
- var m;
2193
- return (m = l.value) == null ? void 0 : m.click();
3810
+ onClick: f[1] || (f[1] = (b) => {
3811
+ var p;
3812
+ return (p = o.value) == null ? void 0 : p.click();
2194
3813
  })
2195
3814
  }, [
2196
- $(y(w), {
3815
+ _(h(L), {
2197
3816
  icon: "lucide:paperclip",
2198
3817
  size: 18
2199
3818
  })
2200
- ], 8, cn),
2201
- s("select", {
3819
+ ], 8, Mi),
3820
+ u("select", {
2202
3821
  value: e.approvalMode,
2203
3822
  "aria-label": e.approvalLabel,
2204
3823
  disabled: e.disabled || e.waitingApproval,
2205
- onChange: g[2] || (g[2] = (v) => i("update:approvalMode", v.target.value))
3824
+ onChange: f[2] || (f[2] = (b) => i("update:approvalMode", b.target.value))
2206
3825
  }, [
2207
- (a(!0), o(x, null, M(e.approvalModes, (v) => (a(), o("option", {
2208
- key: v.value,
2209
- value: v.value
2210
- }, d(v.label), 9, mn))), 128))
2211
- ], 40, un),
2212
- $(on, {
3826
+ (n(!0), l(D, null, U(e.approvalModes, (b) => (n(), l("option", {
3827
+ key: b.value,
3828
+ value: b.value
3829
+ }, m(b.label), 9, Ai))), 128))
3830
+ ], 40, Ti),
3831
+ _($i, {
2213
3832
  model: e.model,
2214
3833
  models: e.models,
2215
3834
  loading: e.modelsLoading,
2216
3835
  disabled: e.disabled || e.loading || e.waitingApproval,
2217
3836
  label: e.modelLabel,
2218
- "onUpdate:model": g[3] || (g[3] = (v) => i("update:model", v))
3837
+ "onUpdate:model": f[3] || (f[3] = (b) => i("update:model", b))
2219
3838
  }, null, 8, ["model", "models", "loading", "disabled", "label"]),
2220
- s("button", {
3839
+ u("button", {
2221
3840
  type: "button",
2222
3841
  class: "dsea-agent-composer__send",
2223
3842
  disabled: !e.loading && (!e.draft.trim() || e.disabled || e.waitingApproval),
2224
3843
  "aria-label": e.loading ? e.stopLabel : e.sendLabel,
2225
3844
  title: e.loading ? e.stopLabel : e.sendLabel,
2226
- onClick: g[4] || (g[4] = (v) => i(e.loading ? "stop" : "send"))
3845
+ onClick: f[4] || (f[4] = (b) => i(e.loading ? "stop" : "send"))
2227
3846
  }, [
2228
- $(y(w), {
3847
+ _(h(L), {
2229
3848
  icon: e.loading ? "lucide:square" : "lucide:send",
2230
3849
  size: 18
2231
3850
  }, null, 8, ["icon"])
2232
- ], 8, bn)
3851
+ ], 8, Pi)
2233
3852
  ])
2234
3853
  ]));
2235
3854
  }
2236
3855
  });
2237
- const gl = /* @__PURE__ */ A(vn, [["__scopeId", "data-v-f5f922c2"]]), pn = { key: 0 }, gn = { class: "dsea-agent-approval__status" }, hn = {
3856
+ const go = /* @__PURE__ */ j(Bi, [["__scopeId", "data-v-f5f922c2"]]), Fi = { key: 0 }, Ei = { class: "dsea-agent-approval__status" }, Ni = {
2238
3857
  key: 0,
2239
3858
  class: "dsea-agent-approval__tool"
2240
- }, fn = { key: 1 }, yn = {
3859
+ }, Ii = { key: 1 }, zi = {
2241
3860
  key: 2,
2242
3861
  class: "dsea-agent-approval__meta"
2243
- }, kn = {
3862
+ }, Di = {
2244
3863
  key: 3,
2245
3864
  class: "dsea-agent-approval__reason"
2246
- }, _n = { key: 4 }, wn = ["disabled"], $n = ["disabled"], Ln = /* @__PURE__ */ k({
3865
+ }, Ri = { key: 4 }, Ki = ["disabled"], Oi = ["disabled"], Wi = /* @__PURE__ */ N({
2247
3866
  __name: "AgentApprovalCard",
2248
3867
  props: {
2249
3868
  approval: {},
@@ -2252,7 +3871,7 @@ const gl = /* @__PURE__ */ A(vn, [["__scopeId", "data-v-f5f922c2"]]), pn = { key
2252
3871
  },
2253
3872
  emits: ["resolve"],
2254
3873
  setup(e, { emit: c }) {
2255
- const t = e, i = c, l = {
3874
+ const t = e, i = c, o = {
2256
3875
  status: {
2257
3876
  pending: "Approval needed",
2258
3877
  approved: "Approved",
@@ -2269,364 +3888,124 @@ const gl = /* @__PURE__ */ A(vn, [["__scopeId", "data-v-f5f922c2"]]), pn = { key
2269
3888
  expires: "Expires",
2270
3889
  reject: "Reject",
2271
3890
  approve: "Approve"
2272
- }, r = I(() => {
2273
- var n, u;
3891
+ }, r = T(() => {
3892
+ var s, a;
2274
3893
  return {
2275
- ...l,
3894
+ ...o,
2276
3895
  ...t.labels,
2277
- status: { ...l.status, ...(n = t.labels) == null ? void 0 : n.status },
2278
- risk: { ...l.risk, ...(u = t.labels) == null ? void 0 : u.risk }
3896
+ status: { ...o.status, ...(s = t.labels) == null ? void 0 : s.status },
3897
+ risk: { ...o.risk, ...(a = t.labels) == null ? void 0 : a.risk }
2279
3898
  };
2280
3899
  });
2281
- return (n, u) => (a(), o("article", {
2282
- class: N(["dsea-agent-approval", `dsea-agent-approval--${e.approval.status}`])
3900
+ return (s, a) => (n(), l("article", {
3901
+ class: q(["dsea-agent-approval", `dsea-agent-approval--${e.approval.status}`])
2283
3902
  }, [
2284
- s("header", null, [
2285
- s("div", null, [
2286
- s("h2", null, d(r.value.status[e.approval.status] || e.approval.status), 1),
2287
- e.approval.summary ? (a(), o("p", pn, d(e.approval.summary), 1)) : p("", !0)
3903
+ u("header", null, [
3904
+ u("div", null, [
3905
+ u("h2", null, m(r.value.status[e.approval.status] || e.approval.status), 1),
3906
+ e.approval.summary ? (n(), l("p", Fi, m(e.approval.summary), 1)) : v("", !0)
2288
3907
  ]),
2289
- s("span", gn, d(r.value.risk[e.approval.riskLevel || "read"] || e.approval.riskLevel), 1)
3908
+ u("span", Ei, m(r.value.risk[e.approval.riskLevel || "read"] || e.approval.riskLevel), 1)
2290
3909
  ]),
2291
- e.approval.toolName ? (a(), o("p", hn, [
2292
- z(d(r.value.tool) + ": ", 1),
2293
- s("code", null, d(e.approval.toolName), 1)
2294
- ])) : p("", !0),
2295
- e.approval.details ? (a(), o("details", fn, [
2296
- s("summary", null, d(r.value.details), 1),
2297
- s("pre", null, d(e.approval.details), 1)
2298
- ])) : p("", !0),
2299
- e.approval.expiresAt ? (a(), o("p", yn, d(r.value.expires) + ": " + d(e.approval.expiresAt), 1)) : p("", !0),
2300
- e.approval.reason ? (a(), o("p", kn, d(e.approval.reason), 1)) : p("", !0),
2301
- e.approval.status === "pending" ? (a(), o("footer", _n, [
2302
- s("button", {
3910
+ e.approval.toolName ? (n(), l("p", Ni, [
3911
+ Q(m(r.value.tool) + ": ", 1),
3912
+ u("code", null, m(e.approval.toolName), 1)
3913
+ ])) : v("", !0),
3914
+ e.approval.details ? (n(), l("details", Ii, [
3915
+ u("summary", null, m(r.value.details), 1),
3916
+ u("pre", null, m(e.approval.details), 1)
3917
+ ])) : v("", !0),
3918
+ e.approval.expiresAt ? (n(), l("p", zi, m(r.value.expires) + ": " + m(e.approval.expiresAt), 1)) : v("", !0),
3919
+ e.approval.reason ? (n(), l("p", Di, m(e.approval.reason), 1)) : v("", !0),
3920
+ e.approval.status === "pending" ? (n(), l("footer", Ri, [
3921
+ u("button", {
2303
3922
  type: "button",
2304
3923
  disabled: e.busy,
2305
- onClick: u[0] || (u[0] = (b) => i("resolve", "reject"))
2306
- }, d(r.value.reject), 9, wn),
2307
- s("button", {
3924
+ onClick: a[0] || (a[0] = (g) => i("resolve", "reject"))
3925
+ }, m(r.value.reject), 9, Ki),
3926
+ u("button", {
2308
3927
  type: "button",
2309
3928
  class: "dsea-agent-approval__approve",
2310
3929
  disabled: e.busy,
2311
- onClick: u[1] || (u[1] = (b) => i("resolve", "approve"))
2312
- }, d(r.value.approve), 9, $n)
2313
- ])) : p("", !0)
3930
+ onClick: a[1] || (a[1] = (g) => i("resolve", "approve"))
3931
+ }, m(r.value.approve), 9, Oi)
3932
+ ])) : v("", !0)
2314
3933
  ], 2));
2315
3934
  }
2316
3935
  });
2317
- const hl = /* @__PURE__ */ A(Ln, [["__scopeId", "data-v-88695aee"]]), Cn = { class: "dsea-admin-tabs" }, Sn = {
2318
- class: "dsea-admin-tabs__list",
2319
- role: "tablist"
2320
- }, xn = ["aria-selected", "onClick"], An = ["aria-label", "onClick"], Mn = {
2321
- key: 0,
2322
- class: "dsea-admin-tabs__tools"
2323
- }, Tn = ["aria-label"], Bn = ["aria-label"], fl = /* @__PURE__ */ k({
2324
- __name: "AdminTabs",
2325
- props: {
2326
- tabs: {},
2327
- activeKey: {},
2328
- labels: {},
2329
- navigateOnSelect: { type: Boolean, default: !0 }
2330
- },
2331
- emits: ["select", "close", "refresh", "closeAction"],
2332
- setup(e, { emit: c }) {
2333
- const t = e, i = c, { ports: l } = q(), r = I(() => [
2334
- { event: "left", text: t.labels.closeLeft },
2335
- { event: "right", text: t.labels.closeRight },
2336
- { event: "others", text: t.labels.closeOthers },
2337
- { event: "all", text: t.labels.closeAll }
2338
- ]);
2339
- function n(g) {
2340
- i("select", g), t.navigateOnSelect && l.navigation.go(g);
2341
- }
2342
- function u(g) {
2343
- i("close", g);
2344
- }
2345
- function b(g) {
2346
- g && i("closeAction", g.event, t.activeKey);
2347
- }
2348
- return (g, v) => (a(), o("div", Cn, [
2349
- s("div", Sn, [
2350
- (a(!0), o(x, null, M(e.tabs, (m) => (a(), o("div", {
2351
- key: m.key,
2352
- class: N(["dsea-admin-tabs__item", { "dsea-admin-tabs__item--active": m.key === e.activeKey }])
2353
- }, [
2354
- s("button", {
2355
- type: "button",
2356
- role: "tab",
2357
- "aria-selected": m.key === e.activeKey,
2358
- class: "dsea-admin-tabs__select",
2359
- onClick: (L) => n(m.key)
2360
- }, [
2361
- m.icon ? (a(), P(y(w), {
2362
- key: 0,
2363
- icon: m.icon,
2364
- size: 14
2365
- }, null, 8, ["icon"])) : p("", !0),
2366
- s("span", null, d(m.label), 1)
2367
- ], 8, xn),
2368
- m.affix ? p("", !0) : (a(), o("button", {
2369
- key: 0,
2370
- type: "button",
2371
- class: "dsea-admin-tabs__close",
2372
- "aria-label": `${e.labels.close}: ${m.label}`,
2373
- onClick: (L) => u(m.key)
2374
- }, [
2375
- $(y(w), {
2376
- icon: "lucide:x",
2377
- size: 14
2378
- })
2379
- ], 8, An))
2380
- ], 2))), 128))
2381
- ]),
2382
- e.tabs.length ? (a(), o("div", Mn, [
2383
- s("button", {
2384
- type: "button",
2385
- "aria-label": e.labels.refresh,
2386
- onClick: v[0] || (v[0] = (m) => i("refresh", e.activeKey))
2387
- }, [
2388
- $(y(w), {
2389
- icon: "lucide:refresh-cw",
2390
- size: 16
2391
- })
2392
- ], 8, Tn),
2393
- $(y(re), {
2394
- "drop-menu-list": r.value,
2395
- trigger: ["click"],
2396
- onMenuEvent: b
2397
- }, {
2398
- default: j(() => [
2399
- s("button", {
2400
- type: "button",
2401
- "aria-label": e.labels.actions
2402
- }, [
2403
- $(y(w), {
2404
- icon: "lucide:chevron-down",
2405
- size: 16
2406
- })
2407
- ], 8, Bn)
2408
- ]),
2409
- _: 1
2410
- }, 8, ["drop-menu-list"])
2411
- ])) : p("", !0)
2412
- ]));
2413
- }
2414
- });
2415
- function yl(e, c, t) {
2416
- const i = e.findIndex((l) => l.key === c);
2417
- return i < 0 && t !== "all" ? [...e] : e.filter((l, r) => {
2418
- if (l.affix)
3936
+ const vo = /* @__PURE__ */ j(Wi, [["__scopeId", "data-v-88695aee"]]);
3937
+ function bo(e, c, t) {
3938
+ const i = e.findIndex((o) => o.key === c);
3939
+ return i < 0 && t !== "all" ? [...e] : e.filter((o, r) => {
3940
+ if (o.affix)
2419
3941
  return !0;
2420
3942
  switch (t) {
2421
3943
  case "current":
2422
- return l.key !== c;
3944
+ return o.key !== c;
2423
3945
  case "left":
2424
3946
  return r >= i;
2425
3947
  case "right":
2426
3948
  return r <= i;
2427
3949
  case "others":
2428
- return l.key === c;
3950
+ return o.key === c;
2429
3951
  case "all":
2430
3952
  return !1;
2431
3953
  }
2432
3954
  });
2433
3955
  }
2434
- function kl(e, c) {
3956
+ function ho(e, c) {
2435
3957
  var t;
2436
3958
  return e.some((i) => i.key === c) ? c : (t = e[e.length - 1]) == null ? void 0 : t.key;
2437
3959
  }
2438
- const Pn = { class: "dsea-settings-panel" }, In = ["for"], En = { key: 1 }, Fn = ["aria-label"], Nn = ["aria-label", "aria-pressed", "disabled", "onClick"], zn = ["aria-label"], Dn = ["aria-pressed", "disabled", "onClick"], Kn = /* @__PURE__ */ k({
2439
- __name: "SettingsPanel",
2440
- props: {
2441
- sections: {}
2442
- },
2443
- emits: ["change"],
2444
- setup(e, { emit: c }) {
2445
- const t = c;
2446
- function i(u, b) {
2447
- t("change", u, b);
2448
- }
2449
- function l(u, b) {
2450
- typeof b == "boolean" && i(u, b);
2451
- }
2452
- function r(u, b) {
2453
- (typeof b == "string" || typeof b == "number") && i(u, b);
2454
- }
2455
- function n(u, b) {
2456
- typeof b == "number" && Number.isFinite(b) && i(u, b);
2457
- }
2458
- return (u, b) => (a(), o("div", Pn, [
2459
- (a(!0), o(x, null, M(e.sections, (g) => (a(), o("section", {
2460
- key: g.title,
2461
- class: "dsea-settings-panel__section"
2462
- }, [
2463
- s("h3", null, d(g.title), 1),
2464
- (a(!0), o(x, null, M(g.items, (v) => (a(), o("div", {
2465
- key: v.key,
2466
- class: N(["dsea-settings-panel__row", { "dsea-settings-panel__row--stacked": v.type === "color" || v.type === "mode" }])
2467
- }, [
2468
- v.type === "switch" || v.type === "select" || v.type === "number" ? (a(), o("label", {
2469
- key: 0,
2470
- for: v.key
2471
- }, d(v.label), 9, In)) : (a(), o("span", En, d(v.label), 1)),
2472
- v.type === "switch" ? (a(), P(y(ye), {
2473
- key: 2,
2474
- id: v.key,
2475
- checked: v.value,
2476
- disabled: v.disabled,
2477
- onChange: (m) => l(v.key, m)
2478
- }, null, 8, ["id", "checked", "disabled", "onChange"])) : v.type === "select" ? (a(), P(y(ke), {
2479
- key: 3,
2480
- id: v.key,
2481
- value: v.value,
2482
- options: v.options,
2483
- disabled: v.disabled,
2484
- class: "dsea-settings-panel__select",
2485
- onChange: (m) => r(v.key, m)
2486
- }, null, 8, ["id", "value", "options", "disabled", "onChange"])) : v.type === "number" ? (a(), P(y(_e), {
2487
- key: 4,
2488
- id: v.key,
2489
- value: v.value,
2490
- min: v.min,
2491
- max: v.max,
2492
- step: v.step,
2493
- disabled: v.disabled,
2494
- class: "dsea-settings-panel__number",
2495
- onChange: (m) => n(v.key, m)
2496
- }, null, 8, ["id", "value", "min", "max", "step", "disabled", "onChange"])) : v.type === "color" ? (a(), o("div", {
2497
- key: 5,
2498
- class: "dsea-settings-panel__colors",
2499
- role: "group",
2500
- "aria-label": v.label
2501
- }, [
2502
- (a(!0), o(x, null, M(v.colors, (m) => (a(), o("button", {
2503
- key: m,
2504
- type: "button",
2505
- class: N(["dsea-settings-panel__swatch", { "dsea-settings-panel__swatch--active": v.value === m }]),
2506
- style: ie({ backgroundColor: m }),
2507
- "aria-label": m,
2508
- "aria-pressed": v.value === m,
2509
- disabled: v.disabled,
2510
- onClick: (L) => i(v.key, m)
2511
- }, [
2512
- v.value === m ? (a(), P(y(w), {
2513
- key: 0,
2514
- icon: "lucide:check",
2515
- size: 14
2516
- })) : p("", !0)
2517
- ], 14, Nn))), 128))
2518
- ], 8, Fn)) : v.type === "mode" ? (a(), o("div", {
2519
- key: 6,
2520
- class: "dsea-settings-panel__modes",
2521
- role: "group",
2522
- "aria-label": v.label
2523
- }, [
2524
- (a(!0), o(x, null, M(v.options, (m) => (a(), o("button", {
2525
- key: m.value,
2526
- type: "button",
2527
- class: N({ active: v.value === m.value }),
2528
- "aria-pressed": v.value === m.value,
2529
- disabled: v.disabled,
2530
- onClick: (L) => i(v.key, m.value)
2531
- }, [
2532
- m.icon ? (a(), P(y(w), {
2533
- key: 0,
2534
- icon: m.icon,
2535
- size: 16
2536
- }, null, 8, ["icon"])) : p("", !0),
2537
- z(" " + d(m.label), 1)
2538
- ], 10, Dn))), 128))
2539
- ], 8, zn)) : p("", !0)
2540
- ], 2))), 128))
2541
- ]))), 128))
2542
- ]));
2543
- }
2544
- });
2545
- const _l = /* @__PURE__ */ k({
2546
- __name: "AdminSettingsDrawer",
2547
- props: {
2548
- open: { type: Boolean },
2549
- title: {},
2550
- sections: {},
2551
- width: { default: 340 },
2552
- resetLabel: {}
2553
- },
2554
- emits: ["update:open", "change", "reset"],
2555
- setup(e, { emit: c }) {
2556
- const t = c;
2557
- return (i, l) => (a(), P(y(we), {
2558
- visible: e.open,
2559
- title: e.title,
2560
- placement: "right",
2561
- width: e.width,
2562
- onClose: l[2] || (l[2] = (r) => t("update:open", !1))
2563
- }, fe({
2564
- default: j(() => [
2565
- $(Kn, {
2566
- sections: e.sections,
2567
- onChange: l[0] || (l[0] = (r, n) => t("change", r, n))
2568
- }, null, 8, ["sections"])
2569
- ]),
2570
- _: 2
2571
- }, [
2572
- i.$slots.footer || e.resetLabel ? {
2573
- name: "footer",
2574
- fn: j(() => [
2575
- B(i.$slots, "footer", {}, () => [
2576
- s("button", {
2577
- type: "button",
2578
- class: "dsea-settings-drawer__reset",
2579
- onClick: l[1] || (l[1] = (r) => t("reset"))
2580
- }, d(e.resetLabel), 1)
2581
- ])
2582
- ]),
2583
- key: "0"
2584
- } : void 0
2585
- ]), 1032, ["visible", "title", "width"]));
2586
- }
2587
- });
2588
3960
  export {
2589
- pl as AdminAboutView,
2590
- Jn as AdminAppSwitcher,
2591
- ol as AdminBreadcrumb,
2592
- vl as AdminErrorLogView,
2593
- dl as AdminExceptionView,
2594
- Yn as AdminFullscreenButton,
2595
- sl as AdminIframeView,
2596
- ll as AdminLayout,
2597
- rl as AdminLockView,
2598
- il as AdminLoginView,
2599
- nl as AdminNotificationCenter,
2600
- ml as AdminPasswordForm,
2601
- ul as AdminProfileForm,
2602
- cl as AdminProfileTabs,
2603
- bl as AdminSecuritySettings,
2604
- _l as AdminSettingsDrawer,
2605
- fl as AdminTabs,
2606
- al as AdminUserMenu,
2607
- hl as AgentApprovalCard,
2608
- Ja as AgentAttachmentList,
2609
- gl as AgentComposer,
2610
- on as AgentModelSelect,
2611
- Xn as AppDarkModeToggle,
2612
- Gn as AppLocalePicker,
2613
- Ce as AppLogo,
2614
- el as AppProvider,
2615
- tl as AppSearch,
2616
- te as BasicMenu,
2617
- Kn as SettingsPanel,
2618
- jn as SimpleMenu,
2619
- Qn as SimpleMenuTag,
2620
- de as adminMenuKey,
2621
- ne as adminShellMessages,
2622
- me as appProviderKey,
2623
- yl as closeTabs,
2624
- Hn as createAdminMenuPlugin,
2625
- be as createAppProviderContext,
2626
- Wn as getAdminShellMessage,
2627
- ee as getAllParentPath,
2628
- On as legacyAdminMessages,
2629
- kl as nextActiveTab,
2630
- ce as useAdminMenuPort,
2631
- Zn as useAppProviderContext
3961
+ mo as AdminAboutView,
3962
+ ea as AdminAppSwitcher,
3963
+ Ga as AdminBreadcrumb,
3964
+ co as AdminErrorLogView,
3965
+ io as AdminExceptionView,
3966
+ Rt as AdminFullscreenButton,
3967
+ ao as AdminIframeView,
3968
+ eo as AdminLayout,
3969
+ lo as AdminLockView,
3970
+ no as AdminLoginView,
3971
+ Pa as AdminNotificationCenter,
3972
+ ro as AdminPasswordForm,
3973
+ so as AdminProfileForm,
3974
+ oo as AdminProfileTabs,
3975
+ uo as AdminSecuritySettings,
3976
+ fn as AdminSettingsDrawer,
3977
+ un as AdminTabs,
3978
+ fa as AdminUserMenu,
3979
+ vo as AgentApprovalCard,
3980
+ pi as AgentAttachmentList,
3981
+ go as AgentComposer,
3982
+ $i as AgentModelSelect,
3983
+ Gi as AppDarkModeToggle,
3984
+ Et as AppLocalePicker,
3985
+ be as AppLogo,
3986
+ Zi as AppProvider,
3987
+ da as AppSearch,
3988
+ he as BasicMenu,
3989
+ to as ClassicAdminLayout,
3990
+ Ee as ClassicMenu,
3991
+ pn as SettingsPanel,
3992
+ Yi as SimpleMenu,
3993
+ St as SimpleMenuTag,
3994
+ Ke as adminMenuKey,
3995
+ Fe as adminShellMessages,
3996
+ We as appProviderKey,
3997
+ ae as classicLayoutDefaults,
3998
+ bo as closeTabs,
3999
+ Xi as createAdminMenuPlugin,
4000
+ Ve as createAppProviderContext,
4001
+ kn as createClassicLayoutSettingsController,
4002
+ qe as firstClassicPage,
4003
+ ji as getAdminShellMessage,
4004
+ le as getAllParentPath,
4005
+ Qi as legacyAdminMessages,
4006
+ ho as nextActiveTab,
4007
+ $e as normalizeClassicLayoutSettings,
4008
+ wn as resolveClassicNavigation,
4009
+ _e as useAdminMenuPort,
4010
+ Ji as useAppProviderContext
2632
4011
  };