@choubo/kerthus-web-admin-shell 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/README.md +51 -2
  2. package/dist/agent/AgentApprovalCard.vue.d.ts +34 -0
  3. package/dist/agent/AgentAttachmentList.vue.d.ts +42 -0
  4. package/dist/agent/AgentComposer.vue.d.ts +120 -0
  5. package/dist/agent/AgentModelSelect.vue.d.ts +53 -0
  6. package/dist/agent/types.d.ts +21 -0
  7. package/dist/application/AdminAppSwitcher.vue.d.ts +69 -0
  8. package/dist/application/AdminFullscreenButton.vue.d.ts +34 -0
  9. package/dist/application/AdminNotificationCenter.vue.d.ts +63 -0
  10. package/dist/application/AdminUserMenu.vue.d.ts +33 -0
  11. package/dist/application/AppDarkModeToggle.vue.d.ts +35 -0
  12. package/dist/application/AppLocalePicker.vue.d.ts +39 -0
  13. package/dist/application/AppLogo.vue.d.ts +35 -0
  14. package/dist/application/AppProvider.vue.d.ts +45 -0
  15. package/dist/application/AppSearch.vue.d.ts +2 -0
  16. package/dist/application/useAppContext.d.ts +9 -0
  17. package/dist/index.d.ts +50 -0
  18. package/dist/index.js +2631 -0
  19. package/dist/layout/AdminLayout.vue.d.ts +146 -0
  20. package/dist/locales/index.d.ts +62 -0
  21. package/dist/locales/legacy-messages.d.ts +367 -0
  22. package/dist/menu/AdminMenuNode.d.ts +17 -0
  23. package/dist/menu/BasicMenu.vue.d.ts +65 -0
  24. package/dist/menu/SimpleMenu.vue.d.ts +55 -0
  25. package/dist/menu/SimpleMenuTag.vue.d.ts +38 -0
  26. package/dist/menu/paths.d.ts +3 -0
  27. package/dist/menu/runtime.d.ts +8 -0
  28. package/dist/menu/types.d.ts +39 -0
  29. package/dist/pages/AdminAboutView.vue.d.ts +66 -0
  30. package/dist/pages/AdminBreadcrumb.vue.d.ts +23 -0
  31. package/dist/pages/AdminErrorLogView.vue.d.ts +77 -0
  32. package/dist/pages/AdminExceptionView.vue.d.ts +25 -0
  33. package/dist/pages/AdminIframeView.vue.d.ts +51 -0
  34. package/dist/pages/AdminLockView.vue.d.ts +64 -0
  35. package/dist/pages/AdminLoginView.vue.d.ts +77 -0
  36. package/dist/pages/AdminPasswordForm.vue.d.ts +96 -0
  37. package/dist/pages/AdminProfileForm.vue.d.ts +94 -0
  38. package/dist/pages/AdminProfileTabs.vue.d.ts +55 -0
  39. package/dist/pages/AdminSecuritySettings.vue.d.ts +41 -0
  40. package/dist/settings/AdminSettingsDrawer.vue.d.ts +56 -0
  41. package/dist/settings/SettingsPanel.vue.d.ts +21 -0
  42. package/dist/settings/types.d.ts +38 -0
  43. package/dist/style.css +1 -0
  44. package/dist/tabs/AdminTabs.vue.d.ts +47 -0
  45. package/dist/tabs/actions.d.ts +4 -0
  46. package/dist/tabs/types.d.ts +16 -0
  47. package/package.json +37 -4
package/dist/index.js ADDED
@@ -0,0 +1,2631 @@
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 = {
6
+ "en-US": {
7
+ navigation: "Navigation",
8
+ closeNavigation: "Close navigation",
9
+ username: "Username",
10
+ password: "Password",
11
+ signIn: "Sign in",
12
+ signingIn: "Signing in",
13
+ unlock: "Unlock",
14
+ switchAccount: "Switch account",
15
+ attachments: "Attachments",
16
+ attachFiles: "Attach files",
17
+ approvalMode: "Approval mode",
18
+ model: "Model",
19
+ send: "Send",
20
+ stop: "Stop",
21
+ notifications: "Notifications",
22
+ noNotifications: "No notifications",
23
+ markAllRead: "Mark all as read",
24
+ profileSettings: "Profile settings",
25
+ errorLog: "Error log",
26
+ clear: "Clear",
27
+ details: "Details",
28
+ noErrors: "No errors",
29
+ version: "Version",
30
+ builtAt: "Built at",
31
+ dependencies: "Dependencies",
32
+ approve: "Approve",
33
+ reject: "Reject"
34
+ },
35
+ "zh-CN": {
36
+ navigation: "导航",
37
+ closeNavigation: "关闭导航",
38
+ username: "账号",
39
+ password: "密码",
40
+ signIn: "登录",
41
+ signingIn: "正在登录",
42
+ unlock: "解锁",
43
+ switchAccount: "切换账号",
44
+ attachments: "附件",
45
+ attachFiles: "添加附件",
46
+ approvalMode: "审批模式",
47
+ model: "模型",
48
+ send: "发送",
49
+ stop: "停止",
50
+ notifications: "通知",
51
+ noNotifications: "暂无通知",
52
+ markAllRead: "全部标为已读",
53
+ profileSettings: "个人设置",
54
+ errorLog: "错误日志",
55
+ clear: "清除",
56
+ details: "详情",
57
+ noErrors: "暂无错误",
58
+ version: "版本",
59
+ builtAt: "构建时间",
60
+ dependencies: "依赖",
61
+ approve: "批准",
62
+ reject: "拒绝"
63
+ }
64
+ };
65
+ function Wn(e, c) {
66
+ return (e === "zh-CN" ? ne["zh-CN"] : ne["en-US"])[c];
67
+ }
68
+ const On = {
69
+ "en-US": {
70
+ layout: {
71
+ footer: {
72
+ onlinePreview: "Preview",
73
+ onlineDocument: "Document"
74
+ },
75
+ header: {
76
+ dropdownItemDoc: "Document",
77
+ dropdownItemLoginOut: "Log Out",
78
+ tooltipErrorLog: "Error log",
79
+ tooltipLock: "Lock screen",
80
+ tooltipNotify: "Notification",
81
+ tooltipEntryFull: "Full Screen",
82
+ tooltipExitFull: "Exit Full Screen",
83
+ lockScreenPassword: "Lock screen password",
84
+ lockScreen: "Lock screen",
85
+ lockScreenBtn: "Locking",
86
+ home: "Home"
87
+ },
88
+ multipleTab: {
89
+ reload: "Refresh current",
90
+ close: "Close current",
91
+ closeLeft: "Close Left",
92
+ closeRight: "Close Right",
93
+ closeOther: "Close Other",
94
+ closeAll: "Close All"
95
+ },
96
+ setting: {
97
+ contentModeFull: "Full",
98
+ contentModeFixed: "Fixed width",
99
+ topMenuAlignLeft: "Left",
100
+ topMenuAlignRight: "Center",
101
+ topMenuAlignCenter: "Right",
102
+ menuTriggerNone: "Not Show",
103
+ menuTriggerBottom: "Bottom",
104
+ menuTriggerTop: "Top",
105
+ menuTypeSidebar: "Left menu mode",
106
+ menuTypeMixSidebar: "Left menu mixed mode",
107
+ menuTypeMix: "Top Menu Mix mode",
108
+ menuTypeTopMenu: "Top menu mode",
109
+ on: "On",
110
+ off: "Off",
111
+ minute: "Minute",
112
+ operatingTitle: "Successful!",
113
+ resetSuccess: "Successfully reset!",
114
+ copyBtn: "Copy",
115
+ clearBtn: "Clear cache and to the login page",
116
+ drawerTitle: "Configuration",
117
+ darkMode: "Dark mode",
118
+ navMode: "Navigation mode",
119
+ interfaceFunction: "Interface function",
120
+ interfaceDisplay: "Interface display",
121
+ animation: "Animation",
122
+ splitMenu: "Split menu",
123
+ closeMixSidebarOnChange: "Switch page to close menu",
124
+ sysTheme: "System theme",
125
+ headerTheme: "Header theme",
126
+ sidebarTheme: "Menu theme",
127
+ menuDrag: "Drag Sidebar",
128
+ menuSearch: "Menu search",
129
+ menuAccordion: "Sidebar accordion",
130
+ menuCollapse: "Collapse menu",
131
+ collapseMenuDisplayName: "Collapse menu display name",
132
+ topMenuLayout: "Top menu layout",
133
+ menuCollapseButton: "Menu collapse button",
134
+ contentMode: "Content area width",
135
+ expandedMenuWidth: "Expanded menu width",
136
+ breadcrumb: "Breadcrumbs",
137
+ breadcrumbIcon: "Breadcrumbs Icon",
138
+ tabs: "Tabs",
139
+ tabDetail: "Tab Detail",
140
+ tabsQuickBtn: "Tabs quick button",
141
+ tabsRedoBtn: "Tabs redo button",
142
+ tabsFoldBtn: "Tabs flod button",
143
+ sidebar: "Sidebar",
144
+ header: "Header",
145
+ footer: "Footer",
146
+ fullContent: "Full content",
147
+ grayMode: "Gray mode",
148
+ colorWeak: "Color Weak Mode",
149
+ progress: "Progress",
150
+ switchLoading: "Switch Loading",
151
+ switchAnimation: "Switch animation",
152
+ animationType: "Animation type",
153
+ autoScreenLock: "Auto screen lock",
154
+ notAutoScreenLock: "Not auto lock",
155
+ fixedHeader: "Fixed header",
156
+ fixedSideBar: "Fixed Sidebar",
157
+ mixSidebarTrigger: "Mixed menu Trigger",
158
+ triggerHover: "Hover",
159
+ triggerClick: "Click",
160
+ mixSidebarFixed: "Fixed expanded menu"
161
+ }
162
+ },
163
+ sys: {
164
+ api: {
165
+ operationSuccess: "Operation Success",
166
+ operationFailed: "Operation failed",
167
+ errorTip: "Error Tip",
168
+ successTip: "Success Tip",
169
+ errorMessage: "The operation failed, the system is abnormal!",
170
+ timeoutMessage: "Login timed out, please log in again!",
171
+ apiTimeoutMessage: "The interface request timed out, please refresh the page and try again!",
172
+ apiRequestFailed: "The interface request failed, please try again later!",
173
+ networkException: "network anomaly",
174
+ networkExceptionMsg: "Please check if your network connection is normal! The network is abnormal",
175
+ errMsg401: "The user does not have permission (token, user name, password error)!",
176
+ errMsg403: "The user is authorized, but access is forbidden!",
177
+ errMsg404: "Network request error, the resource was not found!",
178
+ errMsg405: "Network request error, request method not allowed!",
179
+ errMsg408: "Network request timed out!",
180
+ errMsg500: "Server error, please contact the administrator!",
181
+ errMsg501: "The network is not implemented!",
182
+ errMsg502: "Network Error!",
183
+ errMsg503: "The service is unavailable, the server is temporarily overloaded or maintained!",
184
+ errMsg504: "Network timeout!",
185
+ errMsg505: "The http version does not support the request!"
186
+ },
187
+ app: {
188
+ logoutTip: "Reminder",
189
+ logoutMessage: "Confirm to exit the system?",
190
+ menuLoading: "Menu loading..."
191
+ },
192
+ errorLog: {
193
+ tableTitle: "Error log list",
194
+ tableColumnType: "Type",
195
+ tableColumnDate: "Time",
196
+ tableColumnFile: "File",
197
+ tableColumnMsg: "Error message",
198
+ tableColumnStackMsg: "Stack info",
199
+ tableActionDesc: "Details",
200
+ modalTitle: "Error details",
201
+ clearErrorStore: "Clear Logs"
202
+ },
203
+ exception: {
204
+ backLogin: "Back Login",
205
+ backHome: "Back Home",
206
+ subTitle403: "Sorry, you don't have access to this page.",
207
+ subTitle404: "Sorry, the page you visited does not exist.",
208
+ subTitle500: "Sorry, the server is reporting an error.",
209
+ noDataTitle: "No data on the current page.",
210
+ networkErrorTitle: "Network Error",
211
+ networkErrorSubTitle: "Sorry,Your network connection has been disconnected, please check your network!"
212
+ },
213
+ lock: {
214
+ unlock: "Click to unlock",
215
+ alert: "Lock screen password error",
216
+ backToLogin: "Back to login",
217
+ entry: "Enter the system",
218
+ placeholder: "Please enter the lock screen password or user password"
219
+ },
220
+ login: {
221
+ backSignIn: "Back sign in",
222
+ mobileSignInFormTitle: "Mobile sign in",
223
+ qrSignInFormTitle: "Qr code sign in",
224
+ signInFormTitle: "Sign in",
225
+ signUpFormTitle: "Sign up",
226
+ forgetFormTitle: "Reset password",
227
+ policy: "I agree to the xxx Privacy Policy",
228
+ scanSign: "scanning the code to complete the login",
229
+ loginButton: "Sign in",
230
+ registerButton: "Sign up",
231
+ rememberMe: "Remember me",
232
+ forgetPassword: "Forget Password?",
233
+ otherSignIn: "Sign in with",
234
+ loginSuccessTitle: "Login successful",
235
+ loginSuccessDesc: "Welcome back",
236
+ accountPlaceholder: "Please input username",
237
+ passwordPlaceholder: "Please input password",
238
+ smsPlaceholder: "Please input sms code",
239
+ mobilePlaceholder: "Please input mobile",
240
+ policyPlaceholder: "Register after checking",
241
+ diffPwd: "The two passwords are inconsistent",
242
+ userName: "Username",
243
+ password: "Password",
244
+ confirmPassword: "Confirm Password",
245
+ email: "Email",
246
+ smsCode: "SMS code",
247
+ mobile: "Mobile"
248
+ }
249
+ }
250
+ },
251
+ "zh-CN": {
252
+ layout: {
253
+ footer: {
254
+ onlinePreview: "在线预览",
255
+ onlineDocument: "在线文档"
256
+ },
257
+ header: {
258
+ dropdownItemDoc: "文档",
259
+ dropdownItemLoginOut: "退出系统",
260
+ tooltipErrorLog: "错误日志",
261
+ userCenter: "用户中心",
262
+ tooltipLock: "锁定屏幕",
263
+ tooltipNotify: "消息通知",
264
+ tooltipEntryFull: "全屏",
265
+ tooltipExitFull: "退出全屏",
266
+ lockScreenPassword: "锁屏密码",
267
+ lockScreen: "锁定屏幕",
268
+ lockScreenBtn: "锁定",
269
+ home: "首页"
270
+ },
271
+ multipleTab: {
272
+ reload: "重新加载",
273
+ close: "关闭标签页",
274
+ closeLeft: "关闭左侧标签页",
275
+ closeRight: "关闭右侧标签页",
276
+ closeOther: "关闭其它标签页",
277
+ closeAll: "关闭全部标签页"
278
+ },
279
+ setting: {
280
+ contentModeFull: "流式",
281
+ contentModeFixed: "定宽",
282
+ topMenuAlignLeft: "居左",
283
+ topMenuAlignRight: "居中",
284
+ topMenuAlignCenter: "居右",
285
+ menuTriggerNone: "不显示",
286
+ menuTriggerBottom: "底部",
287
+ menuTriggerTop: "顶部",
288
+ menuTypeSidebar: "左侧菜单模式",
289
+ menuTypeMixSidebar: "左侧菜单混合模式",
290
+ menuTypeMix: "顶部菜单混合模式",
291
+ menuTypeTopMenu: "顶部菜单模式",
292
+ on: "开",
293
+ off: "关",
294
+ minute: "分钟",
295
+ operatingTitle: "操作成功",
296
+ resetSuccess: "重置成功!",
297
+ copyBtn: "拷贝",
298
+ clearBtn: "清空缓存并返回登录页",
299
+ drawerTitle: "项目配置",
300
+ darkMode: "主题",
301
+ navMode: "导航栏模式",
302
+ interfaceFunction: "界面功能",
303
+ interfaceDisplay: "界面显示",
304
+ animation: "动画",
305
+ splitMenu: "分割菜单",
306
+ closeMixSidebarOnChange: "切换页面关闭菜单",
307
+ sysTheme: "系统主题",
308
+ headerTheme: "顶栏主题",
309
+ sidebarTheme: "菜单主题",
310
+ menuDrag: "侧边菜单拖拽",
311
+ menuSearch: "菜单搜索",
312
+ menuAccordion: "侧边菜单手风琴模式",
313
+ menuCollapse: "折叠菜单",
314
+ collapseMenuDisplayName: "折叠菜单显示名称",
315
+ topMenuLayout: "顶部菜单布局",
316
+ menuCollapseButton: "菜单折叠按钮",
317
+ contentMode: "内容区域宽度",
318
+ expandedMenuWidth: "菜单展开宽度",
319
+ breadcrumb: "面包屑",
320
+ breadcrumbIcon: "面包屑图标",
321
+ tabs: "标签页",
322
+ tabDetail: "标签详情页",
323
+ tabsQuickBtn: "标签页快捷按钮",
324
+ tabsRedoBtn: "标签页刷新按钮",
325
+ tabsFoldBtn: "标签页折叠按钮",
326
+ sidebar: "左侧菜单",
327
+ header: "顶栏",
328
+ footer: "页脚",
329
+ fullContent: "全屏内容",
330
+ grayMode: "灰色模式",
331
+ colorWeak: "色弱模式",
332
+ progress: "顶部进度条",
333
+ switchLoading: "切换loading",
334
+ switchAnimation: "切换动画",
335
+ animationType: "动画类型",
336
+ autoScreenLock: "自动锁屏",
337
+ notAutoScreenLock: "不自动锁屏",
338
+ fixedHeader: "固定header",
339
+ fixedSideBar: "固定Sidebar",
340
+ mixSidebarTrigger: "混合菜单触发方式",
341
+ triggerHover: "悬停",
342
+ triggerClick: "点击",
343
+ mixSidebarFixed: "固定展开菜单"
344
+ }
345
+ },
346
+ sys: {
347
+ api: {
348
+ operationSuccess: "操作成功",
349
+ operationFailed: "操作失败",
350
+ errorTip: "错误提示",
351
+ successTip: "成功提示",
352
+ errorMessage: "操作失败,系统异常!",
353
+ timeoutMessage: "登录超时,请重新登录!",
354
+ apiTimeoutMessage: "接口请求超时,请刷新页面重试!",
355
+ apiRequestFailed: "请求出错,请稍候重试",
356
+ networkException: "网络异常",
357
+ networkExceptionMsg: "网络异常,请检查您的网络连接是否正常!",
358
+ errMsg401: "用户没有权限(令牌、用户名、密码错误)!",
359
+ errMsg403: "用户得到授权,但是访问是被禁止的。!",
360
+ errMsg404: "网络请求错误,未找到该资源!",
361
+ errMsg405: "网络请求错误,请求方法未允许!",
362
+ errMsg408: "网络请求超时!",
363
+ errMsg500: "服务器错误,请联系管理员!",
364
+ errMsg501: "网络未实现!",
365
+ errMsg502: "网络错误!",
366
+ errMsg503: "服务不可用,服务器暂时过载或维护!",
367
+ errMsg504: "网络超时!",
368
+ errMsg505: "http版本不支持该请求!"
369
+ },
370
+ app: {
371
+ logoutTip: "温馨提醒",
372
+ logoutMessage: "是否确认退出系统?",
373
+ menuLoading: "菜单加载中..."
374
+ },
375
+ errorLog: {
376
+ tableTitle: "错误日志列表",
377
+ tableColumnType: "类型",
378
+ tableColumnDate: "时间",
379
+ tableColumnFile: "文件",
380
+ tableColumnMsg: "错误信息",
381
+ tableColumnStackMsg: "stack信息",
382
+ tableActionDesc: "详情",
383
+ modalTitle: "错误详情",
384
+ clearErrorStore: "清除日志"
385
+ },
386
+ exception: {
387
+ backLogin: "返回登录",
388
+ backHome: "返回首页",
389
+ subTitle403: "抱歉,您无权访问此页面。",
390
+ subTitle404: "抱歉,您访问的页面不存在。",
391
+ subTitle500: "抱歉,服务器报告错误。",
392
+ noDataTitle: "当前页无数据",
393
+ networkErrorTitle: "网络错误",
394
+ networkErrorSubTitle: "抱歉,您的网络连接已断开,请检查您的网络!"
395
+ },
396
+ lock: {
397
+ unlock: "点击解锁",
398
+ alert: "锁屏密码错误",
399
+ backToLogin: "返回登录",
400
+ entry: "进入系统",
401
+ placeholder: "请输入锁屏密码或者用户密码"
402
+ },
403
+ login: {
404
+ backSignIn: "返回",
405
+ signInFormTitle: "登录",
406
+ mobileSignInFormTitle: "手机登录",
407
+ qrSignInFormTitle: "二维码登录",
408
+ signUpFormTitle: "注册",
409
+ forgetFormTitle: "重置密码",
410
+ policy: "我同意xxx隐私政策",
411
+ scanSign: '扫码后点击"确认",即可完成登录',
412
+ loginButton: "登录",
413
+ registerButton: "注册",
414
+ rememberMe: "记住我",
415
+ forgetPassword: "忘记密码?",
416
+ otherSignIn: "其他登录方式",
417
+ loginSuccessTitle: "登录成功",
418
+ loginSuccessDesc: "欢迎回来",
419
+ accountPlaceholder: "请输入账号",
420
+ passwordPlaceholder: "请输入密码",
421
+ smsPlaceholder: "请输入验证码",
422
+ mobilePlaceholder: "请输入手机号码",
423
+ policyPlaceholder: "勾选后才能注册",
424
+ diffPwd: "两次输入密码不一致",
425
+ userName: "账号",
426
+ password: "密码",
427
+ confirmPassword: "确认密码",
428
+ email: "邮箱",
429
+ smsCode: "短信验证码",
430
+ mobile: "手机号码"
431
+ }
432
+ }
433
+ }
434
+ }, de = Symbol("admin-menu");
435
+ function Hn(e) {
436
+ return {
437
+ install(c) {
438
+ c.provide(de, e);
439
+ }
440
+ };
441
+ }
442
+ function ce() {
443
+ const e = le(de);
444
+ if (!e)
445
+ throw new Error("Admin menu port is not installed");
446
+ return e;
447
+ }
448
+ function ee(e, c) {
449
+ for (const t of e) {
450
+ if (t.path === c)
451
+ return [t.path];
452
+ const i = ee(t.children ?? [], c);
453
+ if (i.length)
454
+ return [t.path, ...i];
455
+ }
456
+ return [];
457
+ }
458
+ const ue = k({
459
+ name: "AdminMenuNode",
460
+ props: {
461
+ item: { type: Object, required: !0 }
462
+ },
463
+ setup(e) {
464
+ const { ports: c } = q();
465
+ return () => {
466
+ var r, n;
467
+ const t = e.item;
468
+ if ((r = t.meta) != null && r.hideMenu)
469
+ return null;
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,
474
+ c.locale.translate(t.name),
475
+ (u = t.tag) != null && u.content || (b = t.tag) != null && b.dot ? O("span", {
476
+ class: ["dsea-simple-menu-tag", `dsea-simple-menu-tag--${t.tag.type ?? "error"}`, {
477
+ "dsea-simple-menu-tag--dot": t.tag.dot
478
+ }]
479
+ }, t.tag.dot ? "" : t.tag.content) : null
480
+ ]);
481
+ }, l = (n = t.meta) != null && n.hideChildrenInMenu ? [] : t.children ?? [];
482
+ return l.length ? O(Z.SubMenu, {
483
+ key: t.path,
484
+ popupClassName: "app-top-menu-popup",
485
+ disabled: t.disabled
486
+ }, {
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 });
490
+ };
491
+ }
492
+ }), te = /* @__PURE__ */ k({
493
+ __name: "BasicMenu",
494
+ props: {
495
+ items: { default: () => [] },
496
+ mode: { default: "inline" },
497
+ theme: { default: "dark" },
498
+ type: {},
499
+ inlineIndent: { default: 20 },
500
+ mixSider: { type: Boolean },
501
+ isHorizontal: { type: Boolean },
502
+ accordion: { type: Boolean, default: !0 },
503
+ collapse: { type: Boolean },
504
+ beforeClickFn: {}
505
+ },
506
+ emits: ["menuClick"],
507
+ setup(e, { emit: c }) {
508
+ const t = e, i = c, l = ce(), r = I(() => t.collapse ?? l.settings.collapsed.value), n = oe({
509
+ defaultSelectedKeys: [],
510
+ selectedKeys: [],
511
+ openKeys: [],
512
+ 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
+ return [
516
+ "dsea-basic-menu",
517
+ `justify-${t.isHorizontal && l.settings.split.value ? "start" : l.settings.topMenuAlign.value}`,
518
+ {
519
+ "dsea-basic-menu__second": !t.isHorizontal && l.settings.split.value,
520
+ "dsea-basic-menu__sidebar-hor": T
521
+ }
522
+ ];
523
+ });
524
+ let g = !1, v = 0;
525
+ async function m(T) {
526
+ var C, E;
527
+ if (T.name === l.redirectRouteName)
528
+ return;
529
+ if (g) {
530
+ g = !1;
531
+ return;
532
+ }
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)
537
+ return;
538
+ n.selectedKeys = [R || _[0] || f];
539
+ } else
540
+ n.selectedKeys = _.length ? _ : [f];
541
+ L(f);
542
+ }
543
+ function L(T) {
544
+ if (t.mode === "horizontal")
545
+ return;
546
+ const f = ee(t.items, T);
547
+ n.openKeys = t.accordion ? f : [.../* @__PURE__ */ new Set([...n.openKeys, ...f])];
548
+ }
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;
553
+ return;
554
+ }
555
+ if (r.value) {
556
+ n.collapsedOpenKeys = f;
557
+ return;
558
+ }
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,
573
+ mode: e.mode,
574
+ openKeys: u.value,
575
+ inlineIndent: e.inlineIndent,
576
+ theme: e.theme,
577
+ inlineCollapsed: e.mode === "inline" && !e.mixSider && r.value,
578
+ class: N(b.value),
579
+ subMenuOpenDelay: 0.2,
580
+ onOpenChange: F,
581
+ onClick: D
582
+ }, {
583
+ default: j(() => [
584
+ (a(!0), o(x, null, M(e.items, (h) => (a(), P(y(ue), {
585
+ key: h.path,
586
+ item: h
587
+ }, null, 8, ["item"]))), 128))
588
+ ]),
589
+ _: 1
590
+ }, 8, ["selectedKeys", "defaultSelectedKeys", "mode", "openKeys", "inlineIndent", "theme", "inlineCollapsed", "class"]));
591
+ }
592
+ });
593
+ const jn = /* @__PURE__ */ k({
594
+ __name: "SimpleMenu",
595
+ props: {
596
+ items: { default: () => [] },
597
+ collapse: { type: Boolean },
598
+ mixSider: { type: Boolean },
599
+ theme: { default: "light" },
600
+ accordion: { type: Boolean, default: !0 },
601
+ collapsedShowTitle: { type: Boolean },
602
+ isSplitMenu: { type: Boolean },
603
+ beforeClickFn: {}
604
+ },
605
+ emits: ["menuClick"],
606
+ setup(e, { emit: c }) {
607
+ const t = e, i = c;
608
+ async function l(r) {
609
+ return /^https?:\/\//i.test(r) ? (window.open(r, "_blank", "noopener,noreferrer"), !1) : t.beforeClickFn ? t.beforeClickFn(r) : !0;
610
+ }
611
+ return (r, n) => (a(), P(te, {
612
+ class: "dsea-simple-menu",
613
+ items: e.items,
614
+ mode: "inline",
615
+ theme: e.theme,
616
+ collapse: e.collapse,
617
+ mixSider: e.mixSider,
618
+ accordion: e.accordion,
619
+ beforeClickFn: l,
620
+ onMenuClick: n[0] || (n[0] = (u) => i("menuClick", u))
621
+ }, null, 8, ["items", "theme", "collapse", "mixSider", "accordion"]));
622
+ }
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({
643
+ __name: "AppLogo",
644
+ props: {
645
+ theme: {},
646
+ showTitle: { type: Boolean, default: !0 },
647
+ alwaysShowTitle: { type: Boolean },
648
+ collapsedShowTitle: { type: Boolean }
649
+ },
650
+ 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);
654
+ });
655
+ function l() {
656
+ c.navigation.go(c.navigation.getHome());
657
+ }
658
+ return (r, n) => (a(), o("div", {
659
+ class: N(["dsea-app-logo anticon", [e.theme, { "collapsed-show-title": e.collapsedShowTitle }]]),
660
+ onClick: l
661
+ }, [
662
+ i.value ? (a(), o("img", {
663
+ key: 0,
664
+ src: i.value,
665
+ alt: t.value
666
+ }, null, 8, $e)) : p("", !0),
667
+ e.showTitle ? (a(), o("div", {
668
+ 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)
671
+ ], 2));
672
+ }
673
+ });
674
+ const A = (e, c) => {
675
+ const t = e.__vccOpts || e;
676
+ for (const [i, l] of c)
677
+ t[i] = l;
678
+ return t;
679
+ }, Ce = /* @__PURE__ */ A(Le, [["__scopeId", "data-v-f9695ead"]]), Se = { class: "dsea-app-locale-picker" }, xe = { key: 0 }, Gn = /* @__PURE__ */ k({
680
+ __name: "AppLocalePicker",
681
+ props: {
682
+ locales: {},
683
+ locale: {},
684
+ showText: { type: Boolean, default: !0 },
685
+ reload: { type: Boolean }
686
+ },
687
+ 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) ?? "";
691
+ });
692
+ U(() => c.locale, (n) => {
693
+ n && (i.value = n);
694
+ });
695
+ async function r(n) {
696
+ n.event !== i.value && (await t.locale.setLocale(n.event), i.value = n.event, c.reload && location.reload());
697
+ }
698
+ return (n, u) => (a(), P(y(re), {
699
+ placement: "bottom",
700
+ trigger: ["click"],
701
+ dropMenuList: e.locales,
702
+ selectedKeys: [i.value],
703
+ overlayClassName: "app-locale-picker-overlay",
704
+ onMenuEvent: r
705
+ }, {
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
+ ])
711
+ ]),
712
+ _: 1
713
+ }, 8, ["dropMenuList", "selectedKeys"]));
714
+ }
715
+ });
716
+ const Ae = ["aria-label"], Me = /* @__PURE__ */ k({
717
+ __name: "AppDarkModeToggle",
718
+ props: {
719
+ darkMode: { type: Boolean },
720
+ visible: { type: Boolean, default: !0 }
721
+ },
722
+ emits: ["update:darkMode"],
723
+ setup(e, { emit: c }) {
724
+ const t = c;
725
+ return (i, l) => e.visible ? (a(), o("button", {
726
+ key: 0,
727
+ type: "button",
728
+ class: N(["dsea-dark-switch", { "dsea-dark-switch--dark": e.darkMode }]),
729
+ "aria-label": e.darkMode ? "Switch to light mode" : "Switch to dark mode",
730
+ onClick: l[0] || (l[0] = (r) => t("update:darkMode", !e.darkMode))
731
+ }, [
732
+ l[1] || (l[1] = s("span", { class: "dsea-dark-switch-inner" }, null, -1)),
733
+ $(y(w), {
734
+ icon: "lucide:sun",
735
+ size: 14
736
+ }),
737
+ $(y(w), {
738
+ icon: "lucide:moon",
739
+ size: 14
740
+ })
741
+ ], 10, Ae)) : p("", !0);
742
+ }
743
+ });
744
+ const Xn = /* @__PURE__ */ A(Me, [["__scopeId", "data-v-bc7f2cad"]]), Te = ["aria-label", "title", "aria-pressed"], Be = /* @__PURE__ */ k({
745
+ __name: "AdminFullscreenButton",
746
+ props: {
747
+ enterLabel: { default: "Enter fullscreen" },
748
+ exitLabel: { default: "Exit fullscreen" }
749
+ },
750
+ setup(e) {
751
+ const c = S(!1);
752
+ function t() {
753
+ c.value = !!document.fullscreenElement;
754
+ }
755
+ async function i() {
756
+ document.fullscreenElement ? await document.exitFullscreen() : await document.documentElement.requestFullscreen(), t();
757
+ }
758
+ return Y(() => {
759
+ t(), document.addEventListener("fullscreenchange", t);
760
+ }), Q(() => document.removeEventListener("fullscreenchange", t)), (l, r) => (a(), o("button", {
761
+ type: "button",
762
+ class: "dsea-icon-command",
763
+ "aria-label": c.value ? e.exitLabel : e.enterLabel,
764
+ title: c.value ? e.exitLabel : e.enterLabel,
765
+ "aria-pressed": c.value,
766
+ onClick: i
767
+ }, [
768
+ $(y(w), {
769
+ icon: c.value ? "lucide:minimize" : "lucide:maximize",
770
+ size: 18
771
+ }, null, 8, ["icon"])
772
+ ], 8, Te));
773
+ }
774
+ });
775
+ const Yn = /* @__PURE__ */ A(Be, [["__scopeId", "data-v-1787f599"]]);
776
+ function X(e) {
777
+ if (typeof e != "string")
778
+ return "";
779
+ const c = e.trim();
780
+ if (!/^https?:\/\/[^/]/i.test(c) || /^https?:\/\/[^/?#]*@/i.test(c) || /[\s\\\u0000-\u001f\u007f]/.test(c))
781
+ return "";
782
+ try {
783
+ const t = new URL(c);
784
+ return !["http:", "https:"].includes(t.protocol) || !t.hostname || t.username || t.password ? "" : c;
785
+ } catch {
786
+ return "";
787
+ }
788
+ }
789
+ const Pe = ["aria-label", "title"], Ie = { class: "dsea-app-switcher__panel" }, Ee = {
790
+ key: 0,
791
+ role: "status"
792
+ }, Fe = {
793
+ key: 1,
794
+ role: "alert"
795
+ }, 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({
796
+ __name: "AdminAppSwitcher",
797
+ props: {
798
+ apps: {},
799
+ currentId: {},
800
+ loading: { type: Boolean },
801
+ error: {},
802
+ label: { default: "Applications" },
803
+ emptyLabel: { default: "No applications" },
804
+ loadingLabel: { default: "Loading applications" },
805
+ invalidUrlLabel: { default: "Invalid application URL" },
806
+ confirmSwitch: {}
807
+ },
808
+ emits: ["open", "switch", "error"],
809
+ setup(e, { emit: c }) {
810
+ const t = e, i = c, l = S(), r = S();
811
+ function n() {
812
+ l.value && (l.value.open = !1);
813
+ }
814
+ function u(g) {
815
+ g.target.open && i("open");
816
+ }
817
+ async function b(g) {
818
+ var v;
819
+ if (!(r.value || g.id === t.currentId)) {
820
+ r.value = g.id;
821
+ try {
822
+ if (await ((v = t.confirmSwitch) == null ? void 0 : v.call(t, g)) === !1)
823
+ return;
824
+ i("switch", g), n();
825
+ } catch (m) {
826
+ i("error", m);
827
+ } finally {
828
+ r.value = void 0;
829
+ }
830
+ }
831
+ }
832
+ return (g, v) => (a(), o("details", {
833
+ ref_key: "menu",
834
+ ref: l,
835
+ class: "dsea-app-switcher",
836
+ onToggle: u,
837
+ onKeydown: J(n, ["esc"])
838
+ }, [
839
+ s("summary", {
840
+ "aria-label": e.label,
841
+ title: e.label
842
+ }, [
843
+ $(y(w), {
844
+ icon: "lucide:layout-grid",
845
+ size: 18
846
+ })
847
+ ], 8, Pe),
848
+ s("div", Ie, [
849
+ 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, [
850
+ (a(!0), o(x, null, M(e.apps, (m) => (a(), o("li", {
851
+ key: m.id
852
+ }, [
853
+ m.url && y(X)(m.url) ? (a(), o("a", {
854
+ key: 0,
855
+ href: y(X)(m.url),
856
+ target: "_blank",
857
+ rel: "noopener noreferrer",
858
+ referrerpolicy: "no-referrer",
859
+ onClick: n
860
+ }, [
861
+ m.icon ? (a(), o("img", {
862
+ key: 0,
863
+ src: m.icon,
864
+ alt: ""
865
+ }, null, 8, Ke)) : p("", !0),
866
+ s("span", null, [
867
+ z(d(m.name), 1),
868
+ m.description ? (a(), o("small", Ve, d(m.description), 1)) : p("", !0)
869
+ ]),
870
+ $(y(w), {
871
+ icon: "lucide:external-link",
872
+ size: 14
873
+ })
874
+ ], 8, De)) : m.url ? (a(), o("button", {
875
+ key: 1,
876
+ type: "button",
877
+ disabled: "",
878
+ title: e.invalidUrlLabel
879
+ }, [
880
+ s("span", null, [
881
+ z(d(m.name), 1),
882
+ s("small", null, d(e.invalidUrlLabel), 1)
883
+ ])
884
+ ], 8, Re)) : (a(), o("button", {
885
+ key: 2,
886
+ type: "button",
887
+ disabled: m.id === e.currentId || r.value === m.id,
888
+ "aria-current": m.id === e.currentId ? "page" : void 0,
889
+ onClick: (L) => b(m)
890
+ }, [
891
+ m.icon ? (a(), o("img", {
892
+ key: 0,
893
+ src: m.icon,
894
+ alt: ""
895
+ }, null, 8, qe)) : p("", !0),
896
+ s("span", null, [
897
+ z(d(m.name), 1),
898
+ m.description ? (a(), o("small", We, d(m.description), 1)) : p("", !0)
899
+ ]),
900
+ m.id === e.currentId ? (a(), P(y(w), {
901
+ key: 1,
902
+ icon: "lucide:check",
903
+ size: 16
904
+ })) : p("", !0)
905
+ ], 8, Ue))
906
+ ]))), 128))
907
+ ])) : (a(), o("p", Ne, d(e.emptyLabel), 1))
908
+ ])
909
+ ], 544));
910
+ }
911
+ });
912
+ const Jn = /* @__PURE__ */ A(Oe, [["__scopeId", "data-v-29d987c2"]]), me = Symbol("app-provider");
913
+ function be(e) {
914
+ return ve(me, e), e;
915
+ }
916
+ function Zn() {
917
+ const e = le(me);
918
+ if (!e)
919
+ throw new Error("AppProvider is missing");
920
+ return e;
921
+ }
922
+ const el = /* @__PURE__ */ k({
923
+ __name: "AppProvider",
924
+ props: {
925
+ prefixCls: { default: "dsea" },
926
+ mobileBreakpoint: { default: 992 },
927
+ onMobileChange: {}
928
+ },
929
+ setup(e) {
930
+ const c = e, t = S(!1);
931
+ be({ prefixCls: pe(c, "prefixCls"), isMobile: t });
932
+ function i() {
933
+ var r;
934
+ const l = window.innerWidth < c.mobileBreakpoint;
935
+ l !== t.value && (t.value = l, (r = c.onMobileChange) == null || r.call(c, l));
936
+ }
937
+ return Y(() => {
938
+ i(), window.addEventListener("resize", i);
939
+ }), Q(() => window.removeEventListener("resize", i)), (l, r) => B(l.$slots, "default");
940
+ }
941
+ }), 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 = {
942
+ key: 1,
943
+ class: "dsea-app-search-empty"
944
+ }, Ze = /* @__PURE__ */ k({
945
+ __name: "AppSearch",
946
+ setup(e) {
947
+ 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();
948
+ function v(f, h = "") {
949
+ return f.flatMap((_) => {
950
+ var G, ae;
951
+ if ((G = _.meta) != null && G.hideMenu)
952
+ return [];
953
+ const C = i(_.name), E = h ? `${h} > ${C}` : C, R = (ae = _.meta) != null && ae.hideChildrenInMenu ? [] : _.children ?? [];
954
+ return R.length ? v(R, E) : [{ label: E, path: _.path, icon: _.icon }];
955
+ });
956
+ }
957
+ function m(f, h) {
958
+ const _ = f.toLocaleLowerCase();
959
+ let C = 0;
960
+ for (const E of h.toLocaleLowerCase()) {
961
+ if (C = _.indexOf(E, C), C < 0)
962
+ return !1;
963
+ C += 1;
964
+ }
965
+ return !0;
966
+ }
967
+ const L = I(() => {
968
+ const f = r.value.trim();
969
+ return f ? v(n.value).filter((h) => m(h.label, f)) : [];
970
+ });
971
+ U(L, () => {
972
+ u.value = 0;
973
+ });
974
+ async function F() {
975
+ var f, h;
976
+ 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());
977
+ }
978
+ function D() {
979
+ l.value = !1, r.value = "";
980
+ }
981
+ function W(f) {
982
+ D(), c.navigation.go(f.path);
983
+ }
984
+ function T(f) {
985
+ var h, _;
986
+ if (l.value)
987
+ if (f.key === "Escape")
988
+ D();
989
+ else if (f.key === "ArrowDown" || f.key === "ArrowUp") {
990
+ if (f.preventDefault(), !L.value.length)
991
+ return;
992
+ const C = f.key === "ArrowDown" ? 1 : -1;
993
+ 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" });
994
+ } else
995
+ f.key === "Enter" && L.value[u.value] && (f.preventDefault(), W(L.value[u.value]));
996
+ }
997
+ return Y(() => window.addEventListener("keydown", T)), Q(() => window.removeEventListener("keydown", T)), (f, h) => (a(), o(x, null, [
998
+ s("button", {
999
+ type: "button",
1000
+ class: "dsea-app-search-trigger",
1001
+ "aria-label": i("common.searchText"),
1002
+ onClick: F
1003
+ }, [
1004
+ $(y(w), {
1005
+ icon: "ant-design:search-outlined",
1006
+ size: 18
1007
+ })
1008
+ ], 8, He),
1009
+ (a(), P(ge, { to: "body" }, [
1010
+ l.value ? (a(), o("div", {
1011
+ key: 0,
1012
+ class: "dsea-app-search-backdrop",
1013
+ onClick: H(D, ["self"])
1014
+ }, [
1015
+ s("section", {
1016
+ class: "dsea-app-search-modal",
1017
+ role: "dialog",
1018
+ "aria-modal": "true",
1019
+ "aria-label": i("common.searchText")
1020
+ }, [
1021
+ s("div", Qe, [
1022
+ $(y(w), {
1023
+ icon: "ant-design:search-outlined",
1024
+ size: 18
1025
+ }),
1026
+ K(s("input", {
1027
+ ref_key: "inputEl",
1028
+ ref: b,
1029
+ "onUpdate:modelValue": h[0] || (h[0] = (_) => r.value = _),
1030
+ type: "search",
1031
+ placeholder: i("common.searchText"),
1032
+ "aria-label": i("common.searchText")
1033
+ }, null, 8, Ge), [
1034
+ [V, r.value]
1035
+ ]),
1036
+ s("button", {
1037
+ type: "button",
1038
+ class: "dsea-app-search-close",
1039
+ "aria-label": i("common.cancelText"),
1040
+ onClick: D
1041
+ }, [
1042
+ $(y(w), {
1043
+ icon: "lucide:x",
1044
+ size: 18
1045
+ })
1046
+ ], 8, Xe)
1047
+ ]),
1048
+ L.value.length ? (a(), o("ul", {
1049
+ key: 0,
1050
+ ref_key: "resultList",
1051
+ ref: g,
1052
+ class: "dsea-app-search-results",
1053
+ role: "listbox"
1054
+ }, [
1055
+ (a(!0), o(x, null, M(L.value, (_, C) => (a(), o("li", {
1056
+ key: _.path,
1057
+ "data-index": C,
1058
+ role: "option",
1059
+ "aria-selected": C === u.value,
1060
+ class: N({ active: C === u.value }),
1061
+ onMouseenter: (E) => u.value = C,
1062
+ onClick: (E) => W(_)
1063
+ }, [
1064
+ _.icon ? (a(), P(y(w), {
1065
+ key: 0,
1066
+ icon: _.icon,
1067
+ size: 18
1068
+ }, null, 8, ["icon"])) : p("", !0),
1069
+ s("span", null, d(_.label), 1),
1070
+ C === u.value ? (a(), P(y(w), {
1071
+ key: 1,
1072
+ icon: "ant-design:enter-outlined",
1073
+ size: 16
1074
+ })) : p("", !0)
1075
+ ], 42, Ye))), 128))
1076
+ ], 512)) : r.value.trim() ? (a(), o("div", Je, d(i("component.app.searchNotData")), 1)) : p("", !0)
1077
+ ], 8, je)
1078
+ ])) : p("", !0)
1079
+ ]))
1080
+ ], 64));
1081
+ }
1082
+ });
1083
+ const tl = /* @__PURE__ */ A(Ze, [["__scopeId", "data-v-2b474f9e"]]), et = ["aria-label"], tt = ["src", "alt"], at = {
1084
+ key: 1,
1085
+ class: "dsea-user-menu__initial"
1086
+ }, nt = { class: "dsea-user-menu__name" }, lt = { role: "menu" }, ot = ["onClick"], st = /* @__PURE__ */ k({
1087
+ __name: "AdminUserMenu",
1088
+ props: {
1089
+ name: {},
1090
+ avatar: {},
1091
+ label: {},
1092
+ items: {}
1093
+ },
1094
+ emits: ["select"],
1095
+ setup(e, { emit: c }) {
1096
+ const t = c, i = S();
1097
+ function l(n) {
1098
+ n.currentTarget.open = !1;
1099
+ }
1100
+ function r(n) {
1101
+ t("select", n), i.value && (i.value.open = !1);
1102
+ }
1103
+ return (n, u) => (a(), o("details", {
1104
+ ref_key: "menu",
1105
+ ref: i,
1106
+ class: "dsea-user-menu",
1107
+ onKeydown: J(l, ["esc"])
1108
+ }, [
1109
+ s("summary", { "aria-label": e.label }, [
1110
+ e.avatar ? (a(), o("img", {
1111
+ key: 0,
1112
+ src: e.avatar,
1113
+ alt: e.name
1114
+ }, null, 8, tt)) : (a(), o("span", at, d(e.name.slice(0, 1).toUpperCase()), 1)),
1115
+ s("span", nt, d(e.name), 1),
1116
+ $(y(w), {
1117
+ icon: "lucide:chevron-down",
1118
+ size: 14
1119
+ })
1120
+ ], 8, et),
1121
+ s("ul", lt, [
1122
+ (a(!0), o(x, null, M(e.items, (b) => (a(), o("li", {
1123
+ key: b.key,
1124
+ role: "none"
1125
+ }, [
1126
+ s("button", {
1127
+ type: "button",
1128
+ role: "menuitem",
1129
+ onClick: (g) => r(b.key)
1130
+ }, [
1131
+ b.icon ? (a(), P(y(w), {
1132
+ key: 0,
1133
+ icon: b.icon,
1134
+ size: 16
1135
+ }, null, 8, ["icon"])) : p("", !0),
1136
+ z(" " + d(b.label), 1)
1137
+ ], 8, ot)
1138
+ ]))), 128))
1139
+ ])
1140
+ ], 544));
1141
+ }
1142
+ });
1143
+ const al = /* @__PURE__ */ A(st, [["__scopeId", "data-v-d193d9f3"]]), it = ["aria-label"], rt = {
1144
+ key: 0,
1145
+ class: "dsea-notifications__count"
1146
+ }, dt = ["aria-label"], ct = {
1147
+ class: "dsea-notifications__tabs",
1148
+ role: "tablist"
1149
+ }, ut = ["aria-selected", "onClick"], mt = { key: 0 }, bt = ["onClick"], vt = { key: 0 }, pt = { key: 1 }, gt = {
1150
+ key: 1,
1151
+ class: "dsea-notifications__empty"
1152
+ }, ht = /* @__PURE__ */ k({
1153
+ __name: "AdminNotificationCenter",
1154
+ props: {
1155
+ items: {},
1156
+ categories: {},
1157
+ label: { default: "Notifications" },
1158
+ emptyLabel: { default: "No notifications" },
1159
+ markAllLabel: { default: "Mark all as read" }
1160
+ },
1161
+ emits: ["open", "markAllRead"],
1162
+ setup(e, { emit: c }) {
1163
+ var b;
1164
+ const t = e, i = c, l = S(((b = t.categories[0]) == null ? void 0 : b.key) ?? "");
1165
+ U(() => t.categories, (g) => {
1166
+ var v;
1167
+ g.some((m) => m.key === l.value) || (l.value = ((v = g[0]) == null ? void 0 : v.key) ?? "");
1168
+ });
1169
+ const r = I(() => t.items.filter((g) => !g.read).length), n = I(() => t.items.filter((g) => g.category === l.value));
1170
+ function u(g) {
1171
+ g.currentTarget.open = !1;
1172
+ }
1173
+ return (g, v) => (a(), o("details", {
1174
+ class: "dsea-notifications",
1175
+ onKeydown: J(u, ["esc"])
1176
+ }, [
1177
+ s("summary", { "aria-label": e.label }, [
1178
+ $(y(w), {
1179
+ icon: "lucide:bell",
1180
+ size: 18
1181
+ }),
1182
+ r.value ? (a(), o("span", rt, d(r.value > 99 ? "99+" : r.value), 1)) : p("", !0)
1183
+ ], 8, it),
1184
+ s("section", {
1185
+ class: "dsea-notifications__panel",
1186
+ "aria-label": e.label
1187
+ }, [
1188
+ s("header", null, d(e.label), 1),
1189
+ s("div", ct, [
1190
+ (a(!0), o(x, null, M(e.categories, (m) => (a(), o("button", {
1191
+ key: m.key,
1192
+ type: "button",
1193
+ role: "tab",
1194
+ "aria-selected": l.value === m.key,
1195
+ onClick: (L) => l.value = m.key
1196
+ }, d(m.label), 9, ut))), 128))
1197
+ ]),
1198
+ n.value.length ? (a(), o("ul", mt, [
1199
+ (a(!0), o(x, null, M(n.value, (m) => (a(), o("li", {
1200
+ key: m.id,
1201
+ class: N({ "is-read": m.read })
1202
+ }, [
1203
+ s("button", {
1204
+ type: "button",
1205
+ onClick: (L) => i("open", m)
1206
+ }, [
1207
+ s("strong", null, d(m.title), 1),
1208
+ m.description ? (a(), o("span", vt, d(m.description), 1)) : p("", !0),
1209
+ m.time ? (a(), o("small", pt, d(m.time), 1)) : p("", !0)
1210
+ ], 8, bt)
1211
+ ], 2))), 128))
1212
+ ])) : (a(), o("p", gt, d(e.emptyLabel), 1)),
1213
+ r.value ? (a(), o("button", {
1214
+ key: 2,
1215
+ type: "button",
1216
+ class: "dsea-notifications__mark",
1217
+ onClick: v[0] || (v[0] = (m) => i("markAllRead"))
1218
+ }, d(e.markAllLabel), 1)) : p("", !0)
1219
+ ], 8, dt)
1220
+ ], 32));
1221
+ }
1222
+ });
1223
+ const nl = /* @__PURE__ */ A(ht, [["__scopeId", "data-v-c5c5a82f"]]), ft = ["aria-hidden", "inert"], yt = { class: "dsea-admin-layout__brand" }, kt = ["aria-label"], _t = {
1224
+ key: 0,
1225
+ class: "dsea-admin-layout__sidebar-footer"
1226
+ }, wt = ["aria-label", "aria-valuenow", "aria-valuemin", "aria-valuemax"], $t = ["aria-label"], Lt = { class: "dsea-admin-layout__main" }, Ct = {
1227
+ key: 0,
1228
+ class: "dsea-admin-layout__header"
1229
+ }, St = ["aria-label", "aria-expanded"], xt = ["aria-label"], At = { class: "dsea-admin-layout__header-actions" }, Mt = {
1230
+ key: 1,
1231
+ class: "dsea-admin-layout__tabs"
1232
+ }, Tt = { class: "dsea-admin-layout__content" }, Bt = {
1233
+ key: 2,
1234
+ class: "dsea-admin-layout__footer"
1235
+ }, ll = /* @__PURE__ */ k({
1236
+ __name: "AdminLayout",
1237
+ props: {
1238
+ menus: { default: () => [] },
1239
+ topMenus: { default: () => [] },
1240
+ mode: { default: "sidebar" },
1241
+ collapsed: { type: Boolean, default: !1 },
1242
+ showSidebar: { type: Boolean, default: !0 },
1243
+ fullContent: { type: Boolean, default: !1 },
1244
+ resizableSidebar: { type: Boolean, default: !1 },
1245
+ minSidebarWidth: { default: 160 },
1246
+ maxSidebarWidth: { default: 420 },
1247
+ sidebarWidth: { default: 232 },
1248
+ collapsedWidth: { default: 64 },
1249
+ headerHeight: { default: 48 },
1250
+ mobileBreakpoint: { default: 992 },
1251
+ menuTheme: { default: "dark" },
1252
+ topMenuTheme: { default: "light" },
1253
+ topNavigationLabel: { default: "Top navigation" },
1254
+ navigationLabel: { default: "Navigation" },
1255
+ closeNavigationLabel: { default: "Close navigation" },
1256
+ resizeLabel: { default: "Resize sidebar" }
1257
+ },
1258
+ emits: ["update:collapsed", "menuClick", "update:sidebarWidth"],
1259
+ setup(e, { emit: c }) {
1260
+ const t = e, i = c, { ports: l } = q(), r = S(!1), n = S(!1), u = I(() => t.showSidebar && t.mode !== "top" && !t.fullContent);
1261
+ let b;
1262
+ function g(h) {
1263
+ return Math.min(t.maxSidebarWidth, Math.max(t.minSidebarWidth, h));
1264
+ }
1265
+ function v(h) {
1266
+ if (h.button !== 0)
1267
+ return;
1268
+ b == null || b();
1269
+ const _ = h.clientX, C = t.sidebarWidth, E = (G) => i("update:sidebarWidth", g(C + G.clientX - _)), R = () => b == null ? void 0 : b();
1270
+ window.addEventListener("pointermove", E), window.addEventListener("pointerup", R), window.addEventListener("pointercancel", R), b = () => {
1271
+ window.removeEventListener("pointermove", E), window.removeEventListener("pointerup", R), window.removeEventListener("pointercancel", R), b = void 0;
1272
+ };
1273
+ }
1274
+ function m(h) {
1275
+ h.key !== "ArrowLeft" && h.key !== "ArrowRight" || (h.preventDefault(), i("update:sidebarWidth", g(t.sidebarWidth + (h.key === "ArrowRight" ? 10 : -10))));
1276
+ }
1277
+ be({ prefixCls: S("dsea"), isMobile: r });
1278
+ const L = I(() => ({
1279
+ "--dsea-sidebar-width": `${t.sidebarWidth}px`,
1280
+ "--dsea-collapsed-width": `${t.collapsedWidth}px`,
1281
+ "--dsea-header-height": `${t.headerHeight}px`
1282
+ }));
1283
+ function F() {
1284
+ const h = window.innerWidth < t.mobileBreakpoint;
1285
+ h !== r.value && (r.value = h, n.value = !1);
1286
+ }
1287
+ function D() {
1288
+ n.value = !1;
1289
+ }
1290
+ function W() {
1291
+ r.value ? n.value = !n.value : i("update:collapsed", !t.collapsed);
1292
+ }
1293
+ function T(h) {
1294
+ i("menuClick", h), D(), l.navigation.go(h);
1295
+ }
1296
+ function f(h) {
1297
+ h.key === "Escape" && n.value && D();
1298
+ }
1299
+ return U(() => t.mobileBreakpoint, F), U(() => t.fullContent, () => {
1300
+ n.value = !1;
1301
+ }), Y(() => {
1302
+ F(), window.addEventListener("resize", F), window.addEventListener("keydown", f);
1303
+ }), Q(() => {
1304
+ b == null || b(), window.removeEventListener("resize", F), window.removeEventListener("keydown", f);
1305
+ }), (h, _) => (a(), o("div", {
1306
+ class: N(["dsea-admin-layout", { "dsea-admin-layout--mobile": r.value, "dsea-admin-layout--collapsed": e.collapsed, "dsea-admin-layout--no-sidebar": !u.value }]),
1307
+ style: ie(L.value)
1308
+ }, [
1309
+ u.value ? (a(), o("aside", {
1310
+ key: 0,
1311
+ class: N(["dsea-admin-layout__sidebar", { "dsea-admin-layout__sidebar--open": n.value }]),
1312
+ "aria-hidden": r.value && !n.value,
1313
+ inert: r.value && !n.value
1314
+ }, [
1315
+ s("div", yt, [
1316
+ B(h.$slots, "brand", {}, () => [
1317
+ $(Ce, {
1318
+ "show-title": !e.collapsed || r.value
1319
+ }, null, 8, ["show-title"])
1320
+ ])
1321
+ ]),
1322
+ s("nav", {
1323
+ class: "dsea-admin-layout__navigation",
1324
+ "aria-label": e.navigationLabel
1325
+ }, [
1326
+ B(h.$slots, "navigation", {}, () => [
1327
+ $(te, {
1328
+ items: e.menus,
1329
+ collapse: e.collapsed && !r.value,
1330
+ theme: e.menuTheme,
1331
+ onMenuClick: T
1332
+ }, null, 8, ["items", "collapse", "theme"])
1333
+ ])
1334
+ ], 8, kt),
1335
+ h.$slots.sidebarFooter ? (a(), o("div", _t, [
1336
+ B(h.$slots, "sidebarFooter")
1337
+ ])) : p("", !0),
1338
+ e.resizableSidebar && !r.value && !e.collapsed ? (a(), o("div", {
1339
+ key: 1,
1340
+ class: "dsea-admin-layout__resize",
1341
+ role: "separator",
1342
+ tabindex: "0",
1343
+ "aria-orientation": "vertical",
1344
+ "aria-label": e.resizeLabel,
1345
+ "aria-valuenow": e.sidebarWidth,
1346
+ "aria-valuemin": e.minSidebarWidth,
1347
+ "aria-valuemax": e.maxSidebarWidth,
1348
+ onPointerdown: v,
1349
+ onKeydown: m
1350
+ }, null, 40, wt)) : p("", !0)
1351
+ ], 10, ft)) : p("", !0),
1352
+ u.value && r.value && n.value ? (a(), o("button", {
1353
+ key: 1,
1354
+ type: "button",
1355
+ class: "dsea-admin-layout__scrim",
1356
+ "aria-label": e.closeNavigationLabel,
1357
+ onClick: D
1358
+ }, null, 8, $t)) : p("", !0),
1359
+ s("div", Lt, [
1360
+ e.fullContent ? p("", !0) : (a(), o("header", Ct, [
1361
+ u.value ? (a(), o("button", {
1362
+ key: 0,
1363
+ type: "button",
1364
+ class: "dsea-admin-layout__toggle",
1365
+ "aria-label": e.navigationLabel,
1366
+ "aria-expanded": r.value ? n.value : !e.collapsed,
1367
+ onClick: W
1368
+ }, [
1369
+ $(y(w), {
1370
+ icon: r.value && n.value ? "lucide:x" : "lucide:menu",
1371
+ size: 20
1372
+ }, null, 8, ["icon"])
1373
+ ], 8, St)) : p("", !0),
1374
+ B(h.$slots, "header"),
1375
+ e.mode !== "sidebar" ? (a(), o("nav", {
1376
+ key: 1,
1377
+ class: "dsea-admin-layout__top-navigation",
1378
+ "aria-label": e.topNavigationLabel
1379
+ }, [
1380
+ B(h.$slots, "topNavigation", {}, () => [
1381
+ $(te, {
1382
+ items: e.mode === "top" ? e.menus : e.topMenus,
1383
+ mode: "horizontal",
1384
+ type: "top",
1385
+ theme: e.topMenuTheme,
1386
+ onMenuClick: T
1387
+ }, null, 8, ["items", "theme"])
1388
+ ])
1389
+ ], 8, xt)) : p("", !0),
1390
+ s("div", At, [
1391
+ B(h.$slots, "headerActions")
1392
+ ])
1393
+ ])),
1394
+ !e.fullContent && h.$slots.tabs ? (a(), o("div", Mt, [
1395
+ B(h.$slots, "tabs")
1396
+ ])) : p("", !0),
1397
+ s("main", Tt, [
1398
+ B(h.$slots, "default")
1399
+ ]),
1400
+ !e.fullContent && h.$slots.footer ? (a(), o("footer", Bt, [
1401
+ B(h.$slots, "footer")
1402
+ ])) : p("", !0)
1403
+ ])
1404
+ ], 6));
1405
+ }
1406
+ });
1407
+ const Pt = ["aria-label"], It = {
1408
+ key: 0,
1409
+ class: "dsea-breadcrumb__separator",
1410
+ "aria-hidden": "true"
1411
+ }, Et = ["onClick"], Ft = ["aria-current"], Nt = /* @__PURE__ */ k({
1412
+ __name: "AdminBreadcrumb",
1413
+ props: {
1414
+ items: {},
1415
+ label: {}
1416
+ },
1417
+ setup(e) {
1418
+ const { ports: c } = q();
1419
+ function t(i) {
1420
+ c.navigation.go(i);
1421
+ }
1422
+ return (i, l) => e.items.length ? (a(), o("nav", {
1423
+ key: 0,
1424
+ class: "dsea-breadcrumb",
1425
+ "aria-label": e.label
1426
+ }, [
1427
+ s("ol", null, [
1428
+ (a(!0), o(x, null, M(e.items, (r, n) => (a(), o("li", {
1429
+ key: r.path || n
1430
+ }, [
1431
+ n ? (a(), o("span", It, "/")) : p("", !0),
1432
+ r.path && n < e.items.length - 1 ? (a(), o("button", {
1433
+ key: 1,
1434
+ type: "button",
1435
+ onClick: (u) => t(r.path)
1436
+ }, d(r.title), 9, Et)) : (a(), o("span", {
1437
+ key: 2,
1438
+ "aria-current": n === e.items.length - 1 ? "page" : void 0
1439
+ }, d(r.title), 9, Ft))
1440
+ ]))), 128))
1441
+ ])
1442
+ ], 8, Pt)) : p("", !0);
1443
+ }
1444
+ });
1445
+ const ol = /* @__PURE__ */ A(Nt, [["__scopeId", "data-v-49bfd66c"]]), zt = { class: "dsea-iframe-view" }, Dt = ["src", "title", "loading", "referrerpolicy"], Kt = /* @__PURE__ */ k({
1446
+ __name: "AdminIframeView",
1447
+ props: {
1448
+ src: {},
1449
+ title: {},
1450
+ loading: { default: "eager" },
1451
+ referrerPolicy: { default: "strict-origin-when-cross-origin" }
1452
+ },
1453
+ emits: ["load"],
1454
+ setup(e, { emit: c }) {
1455
+ const t = e, i = c, l = I(() => {
1456
+ var n;
1457
+ const r = ((n = t.src) == null ? void 0 : n.trim()) ?? "";
1458
+ return X(r) || (r.startsWith("/") && !r.startsWith("//") && !/[\\\s\u0000-\u001f]/.test(r) ? r : "");
1459
+ });
1460
+ return (r, n) => (a(), o("div", zt, [
1461
+ l.value ? (a(), o("iframe", {
1462
+ key: l.value,
1463
+ src: l.value,
1464
+ title: e.title,
1465
+ loading: e.loading,
1466
+ referrerpolicy: e.referrerPolicy,
1467
+ onLoad: n[0] || (n[0] = (u) => i("load"))
1468
+ }, null, 40, Dt)) : B(r.$slots, "invalid", {}, void 0, !0, 1)
1469
+ ]));
1470
+ }
1471
+ });
1472
+ const sl = /* @__PURE__ */ A(Kt, [["__scopeId", "data-v-b964cc57"]]), Vt = { class: "dsea-login-view" }, Rt = { class: "dsea-login-view__identity" }, Ut = {
1473
+ key: 0,
1474
+ class: "dsea-login-view__subtitle"
1475
+ }, qt = ["for"], Wt = ["id", "disabled"], Ot = ["for"], Ht = ["id", "disabled"], jt = {
1476
+ key: 1,
1477
+ class: "dsea-login-view__error",
1478
+ role: "alert"
1479
+ }, Qt = ["disabled"], Gt = {
1480
+ key: 2,
1481
+ class: "dsea-login-view__footer"
1482
+ }, Xt = /* @__PURE__ */ k({
1483
+ __name: "AdminLoginView",
1484
+ props: {
1485
+ title: {},
1486
+ subtitle: {},
1487
+ usernameLabel: { default: "Username" },
1488
+ passwordLabel: { default: "Password" },
1489
+ submitLabel: { default: "Sign in" },
1490
+ loadingLabel: { default: "Signing in" },
1491
+ loading: { type: Boolean },
1492
+ error: {},
1493
+ formId: { default: "admin-login" }
1494
+ },
1495
+ emits: ["submit"],
1496
+ setup(e, { emit: c }) {
1497
+ const t = c, i = S(""), l = S("");
1498
+ function r() {
1499
+ t("submit", { username: i.value, password: l.value });
1500
+ }
1501
+ return (n, u) => (a(), o("main", Vt, [
1502
+ s("form", {
1503
+ class: "dsea-login-view__form",
1504
+ onSubmit: H(r, ["prevent"])
1505
+ }, [
1506
+ s("div", Rt, [
1507
+ B(n.$slots, "brand", {}, void 0, !0)
1508
+ ]),
1509
+ s("h1", null, d(e.title), 1),
1510
+ e.subtitle ? (a(), o("p", Ut, d(e.subtitle), 1)) : p("", !0),
1511
+ s("label", {
1512
+ for: `${e.formId}-username`
1513
+ }, d(e.usernameLabel), 9, qt),
1514
+ K(s("input", {
1515
+ id: `${e.formId}-username`,
1516
+ "onUpdate:modelValue": u[0] || (u[0] = (b) => i.value = b),
1517
+ type: "text",
1518
+ name: "username",
1519
+ autocomplete: "username",
1520
+ required: "",
1521
+ disabled: e.loading
1522
+ }, null, 8, Wt), [
1523
+ [
1524
+ V,
1525
+ i.value,
1526
+ void 0,
1527
+ { trim: !0 }
1528
+ ]
1529
+ ]),
1530
+ s("label", {
1531
+ for: `${e.formId}-password`
1532
+ }, d(e.passwordLabel), 9, Ot),
1533
+ K(s("input", {
1534
+ id: `${e.formId}-password`,
1535
+ "onUpdate:modelValue": u[1] || (u[1] = (b) => l.value = b),
1536
+ type: "password",
1537
+ name: "password",
1538
+ autocomplete: "current-password",
1539
+ required: "",
1540
+ disabled: e.loading
1541
+ }, null, 8, Ht), [
1542
+ [V, l.value]
1543
+ ]),
1544
+ e.error ? (a(), o("p", jt, d(e.error), 1)) : p("", !0),
1545
+ s("button", {
1546
+ type: "submit",
1547
+ disabled: e.loading
1548
+ }, d(e.loading ? e.loadingLabel : e.submitLabel), 9, Qt),
1549
+ n.$slots.footer ? (a(), o("div", Gt, [
1550
+ B(n.$slots, "footer", {}, void 0, !0)
1551
+ ])) : p("", !0)
1552
+ ], 32)
1553
+ ]));
1554
+ }
1555
+ });
1556
+ const il = /* @__PURE__ */ A(Xt, [["__scopeId", "data-v-65bdd32a"]]), Yt = { class: "dsea-lock-view" }, Jt = { key: 0 }, Zt = ["for"], ea = ["id", "disabled"], ta = {
1557
+ key: 1,
1558
+ class: "dsea-lock-view__error",
1559
+ role: "alert"
1560
+ }, aa = ["disabled"], na = /* @__PURE__ */ k({
1561
+ __name: "AdminLockView",
1562
+ props: {
1563
+ title: {},
1564
+ identity: {},
1565
+ passwordLabel: { default: "Password" },
1566
+ unlockLabel: { default: "Unlock" },
1567
+ switchLabel: {},
1568
+ loading: { type: Boolean },
1569
+ error: {},
1570
+ formId: { default: "admin-lock" }
1571
+ },
1572
+ emits: ["unlock", "switchAccount"],
1573
+ setup(e, { emit: c }) {
1574
+ const t = c, i = S("");
1575
+ function l() {
1576
+ t("unlock", i.value);
1577
+ }
1578
+ return (r, n) => (a(), o("main", Yt, [
1579
+ s("form", {
1580
+ class: "dsea-lock-view__form",
1581
+ onSubmit: H(l, ["prevent"])
1582
+ }, [
1583
+ B(r.$slots, "avatar", {}, void 0, !0),
1584
+ s("h1", null, d(e.title), 1),
1585
+ e.identity ? (a(), o("p", Jt, d(e.identity), 1)) : p("", !0),
1586
+ s("label", {
1587
+ for: `${e.formId}-password`
1588
+ }, d(e.passwordLabel), 9, Zt),
1589
+ K(s("input", {
1590
+ id: `${e.formId}-password`,
1591
+ "onUpdate:modelValue": n[0] || (n[0] = (u) => i.value = u),
1592
+ type: "password",
1593
+ autocomplete: "current-password",
1594
+ required: "",
1595
+ disabled: e.loading
1596
+ }, null, 8, ea), [
1597
+ [V, i.value]
1598
+ ]),
1599
+ e.error ? (a(), o("p", ta, d(e.error), 1)) : p("", !0),
1600
+ s("button", {
1601
+ type: "submit",
1602
+ disabled: e.loading
1603
+ }, d(e.unlockLabel), 9, aa),
1604
+ e.switchLabel ? (a(), o("button", {
1605
+ key: 2,
1606
+ type: "button",
1607
+ class: "dsea-lock-view__switch",
1608
+ onClick: n[1] || (n[1] = (u) => t("switchAccount"))
1609
+ }, d(e.switchLabel), 1)) : p("", !0)
1610
+ ], 32)
1611
+ ]));
1612
+ }
1613
+ });
1614
+ 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 = {
1615
+ key: 0,
1616
+ class: "dsea-exception-view__description"
1617
+ }, ra = /* @__PURE__ */ k({
1618
+ __name: "AdminExceptionView",
1619
+ props: {
1620
+ status: {},
1621
+ title: {},
1622
+ description: {},
1623
+ actionLabel: {}
1624
+ },
1625
+ emits: ["action"],
1626
+ setup(e, { emit: c }) {
1627
+ const t = c;
1628
+ return (i, l) => (a(), o("main", la, [
1629
+ s("div", oa, [
1630
+ s("p", sa, d(e.status), 1),
1631
+ s("h1", null, d(e.title), 1),
1632
+ e.description ? (a(), o("p", ia, d(e.description), 1)) : p("", !0),
1633
+ e.actionLabel ? (a(), o("button", {
1634
+ key: 1,
1635
+ type: "button",
1636
+ onClick: l[0] || (l[0] = (r) => t("action"))
1637
+ }, d(e.actionLabel), 1)) : p("", !0)
1638
+ ])
1639
+ ]));
1640
+ }
1641
+ });
1642
+ const dl = /* @__PURE__ */ A(ra, [["__scopeId", "data-v-b9e53f59"]]), da = { class: "dsea-profile-tabs" }, ca = {
1643
+ key: 0,
1644
+ class: "dsea-profile-tabs__notice",
1645
+ role: "status"
1646
+ }, ua = { class: "dsea-profile-tabs__body" }, ma = ["aria-label"], ba = ["aria-current", "onClick"], va = ["aria-label"], pa = /* @__PURE__ */ k({
1647
+ __name: "AdminProfileTabs",
1648
+ props: {
1649
+ tabs: {},
1650
+ activeKey: {},
1651
+ label: { default: "Profile settings" },
1652
+ notice: {}
1653
+ },
1654
+ emits: ["update:activeKey"],
1655
+ setup(e, { emit: c }) {
1656
+ const t = e, i = c, l = I(() => t.tabs.find((r) => r.key === t.activeKey));
1657
+ return (r, n) => {
1658
+ var u;
1659
+ return a(), o("div", da, [
1660
+ e.notice ? (a(), o("p", ca, d(e.notice), 1)) : p("", !0),
1661
+ s("div", ua, [
1662
+ s("nav", { "aria-label": e.label }, [
1663
+ (a(!0), o(x, null, M(e.tabs, (b) => (a(), o("button", {
1664
+ key: b.key,
1665
+ type: "button",
1666
+ "aria-current": b.key === e.activeKey ? "page" : void 0,
1667
+ onClick: (g) => i("update:activeKey", b.key)
1668
+ }, d(b.label), 9, ba))), 128))
1669
+ ], 8, ma),
1670
+ s("section", {
1671
+ "aria-label": (u = l.value) == null ? void 0 : u.label
1672
+ }, [
1673
+ l.value ? (a(), P(he(l.value.component), { key: 0 })) : B(r.$slots, "default", {}, void 0, !0, 1)
1674
+ ], 8, va)
1675
+ ])
1676
+ ]);
1677
+ };
1678
+ }
1679
+ });
1680
+ const cl = /* @__PURE__ */ A(pa, [["__scopeId", "data-v-55c2076e"]]), ga = { key: 0 }, ha = ["value"], fa = { key: 1 }, ya = {
1681
+ key: 2,
1682
+ class: "dsea-profile-form__avatar"
1683
+ }, ka = {
1684
+ key: 3,
1685
+ role: "alert"
1686
+ }, _a = ["disabled"], wa = /* @__PURE__ */ k({
1687
+ __name: "AdminProfileForm",
1688
+ props: {
1689
+ name: {},
1690
+ email: {},
1691
+ phone: {},
1692
+ requireCurrentPassword: { type: Boolean },
1693
+ saving: { type: Boolean },
1694
+ error: {},
1695
+ labels: { default: () => ({ name: "Name", email: "Email", phone: "Phone", currentPassword: "Current password", save: "Save changes", saving: "Saving" }) }
1696
+ },
1697
+ emits: ["submit"],
1698
+ setup(e, { emit: c }) {
1699
+ const t = e, i = c, l = oe({ name: t.name, email: t.email, currentPassword: "" });
1700
+ U(() => [t.name, t.email], () => {
1701
+ l.name = t.name, l.email = t.email;
1702
+ });
1703
+ function r() {
1704
+ t.saving || (i("submit", {
1705
+ name: l.name.trim(),
1706
+ email: l.email.trim(),
1707
+ ...t.requireCurrentPassword ? { currentPassword: l.currentPassword } : {}
1708
+ }), l.currentPassword = "");
1709
+ }
1710
+ return (n, u) => (a(), o("form", {
1711
+ class: "dsea-profile-form",
1712
+ onSubmit: H(r, ["prevent"])
1713
+ }, [
1714
+ s("label", null, [
1715
+ z(d(e.labels.name), 1),
1716
+ K(s("input", {
1717
+ "onUpdate:modelValue": u[0] || (u[0] = (b) => l.name = b),
1718
+ type: "text",
1719
+ required: "",
1720
+ maxlength: "100",
1721
+ autocomplete: "name"
1722
+ }, null, 512), [
1723
+ [
1724
+ V,
1725
+ l.name,
1726
+ void 0,
1727
+ { trim: !0 }
1728
+ ]
1729
+ ])
1730
+ ]),
1731
+ s("label", null, [
1732
+ z(d(e.labels.email), 1),
1733
+ K(s("input", {
1734
+ "onUpdate:modelValue": u[1] || (u[1] = (b) => l.email = b),
1735
+ type: "email",
1736
+ autocomplete: "email"
1737
+ }, null, 512), [
1738
+ [
1739
+ V,
1740
+ l.email,
1741
+ void 0,
1742
+ { trim: !0 }
1743
+ ]
1744
+ ])
1745
+ ]),
1746
+ e.phone !== void 0 ? (a(), o("label", ga, [
1747
+ z(d(e.labels.phone), 1),
1748
+ s("input", {
1749
+ value: e.phone,
1750
+ type: "tel",
1751
+ disabled: "",
1752
+ autocomplete: "tel"
1753
+ }, null, 8, ha)
1754
+ ])) : p("", !0),
1755
+ e.requireCurrentPassword ? (a(), o("label", fa, [
1756
+ z(d(e.labels.currentPassword), 1),
1757
+ K(s("input", {
1758
+ "onUpdate:modelValue": u[2] || (u[2] = (b) => l.currentPassword = b),
1759
+ type: "password",
1760
+ required: "",
1761
+ autocomplete: "current-password"
1762
+ }, null, 512), [
1763
+ [V, l.currentPassword]
1764
+ ])
1765
+ ])) : p("", !0),
1766
+ n.$slots.avatar ? (a(), o("div", ya, [
1767
+ B(n.$slots, "avatar", {}, void 0, !0)
1768
+ ])) : p("", !0),
1769
+ e.error ? (a(), o("p", ka, d(e.error), 1)) : p("", !0),
1770
+ s("button", {
1771
+ type: "submit",
1772
+ disabled: e.saving
1773
+ }, d(e.saving ? e.labels.saving : e.labels.save), 9, _a)
1774
+ ], 32));
1775
+ }
1776
+ });
1777
+ const ul = /* @__PURE__ */ A(wa, [["__scopeId", "data-v-4dc61808"]]), $a = {
1778
+ key: 0,
1779
+ role: "alert"
1780
+ }, La = ["disabled"], Ca = /* @__PURE__ */ k({
1781
+ __name: "AdminPasswordForm",
1782
+ props: {
1783
+ minBytes: { default: 10 },
1784
+ maxBytes: { default: 72 },
1785
+ saving: { type: Boolean },
1786
+ error: {},
1787
+ labels: { default: () => ({ current: "Current password", next: "New password", confirm: "Confirm password", save: "Change password", saving: "Saving", mismatch: "Passwords do not match", length: "Password length is invalid" }) }
1788
+ },
1789
+ emits: ["submit"],
1790
+ setup(e, { expose: c, emit: t }) {
1791
+ const i = e, l = t, r = S(""), n = S(""), u = S(""), b = S("");
1792
+ function g() {
1793
+ if (i.saving)
1794
+ return;
1795
+ const m = new TextEncoder().encode(n.value).length;
1796
+ if (m < i.minBytes || m > i.maxBytes) {
1797
+ b.value = i.labels.length;
1798
+ return;
1799
+ }
1800
+ if (n.value !== u.value) {
1801
+ b.value = i.labels.mismatch;
1802
+ return;
1803
+ }
1804
+ b.value = "", l("submit", { currentPassword: r.value, password: n.value });
1805
+ }
1806
+ function v() {
1807
+ r.value = "", n.value = "", u.value = "", b.value = "";
1808
+ }
1809
+ return c({ reset: v }), (m, L) => (a(), o("form", {
1810
+ class: "dsea-password-form",
1811
+ onSubmit: H(g, ["prevent"])
1812
+ }, [
1813
+ s("label", null, [
1814
+ z(d(e.labels.current), 1),
1815
+ K(s("input", {
1816
+ "onUpdate:modelValue": L[0] || (L[0] = (F) => r.value = F),
1817
+ type: "password",
1818
+ required: "",
1819
+ autocomplete: "current-password"
1820
+ }, null, 512), [
1821
+ [V, r.value]
1822
+ ])
1823
+ ]),
1824
+ s("label", null, [
1825
+ z(d(e.labels.next), 1),
1826
+ K(s("input", {
1827
+ "onUpdate:modelValue": L[1] || (L[1] = (F) => n.value = F),
1828
+ type: "password",
1829
+ required: "",
1830
+ autocomplete: "new-password"
1831
+ }, null, 512), [
1832
+ [V, n.value]
1833
+ ])
1834
+ ]),
1835
+ s("label", null, [
1836
+ z(d(e.labels.confirm), 1),
1837
+ K(s("input", {
1838
+ "onUpdate:modelValue": L[2] || (L[2] = (F) => u.value = F),
1839
+ type: "password",
1840
+ required: "",
1841
+ autocomplete: "new-password"
1842
+ }, null, 512), [
1843
+ [V, u.value]
1844
+ ])
1845
+ ]),
1846
+ b.value || e.error ? (a(), o("p", $a, d(b.value || e.error), 1)) : p("", !0),
1847
+ s("button", {
1848
+ type: "submit",
1849
+ disabled: e.saving
1850
+ }, d(e.saving ? e.labels.saving : e.labels.save), 9, La)
1851
+ ], 32));
1852
+ }
1853
+ });
1854
+ const ml = /* @__PURE__ */ A(Ca, [["__scopeId", "data-v-3eb63418"]]), Sa = ["aria-label"], xa = ["onClick"], Aa = /* @__PURE__ */ k({
1855
+ __name: "AdminSecuritySettings",
1856
+ props: {
1857
+ items: {},
1858
+ label: { default: "Security settings" }
1859
+ },
1860
+ emits: ["action"],
1861
+ setup(e, { emit: c }) {
1862
+ const t = c;
1863
+ return (i, l) => (a(), o("section", {
1864
+ class: "dsea-security-settings",
1865
+ "aria-label": e.label
1866
+ }, [
1867
+ (a(!0), o(x, null, M(e.items, (r) => (a(), o("div", {
1868
+ key: r.key,
1869
+ class: "dsea-security-settings__row"
1870
+ }, [
1871
+ s("div", null, [
1872
+ s("strong", null, d(r.title), 1),
1873
+ s("p", null, d(r.description), 1)
1874
+ ]),
1875
+ r.action ? (a(), o("button", {
1876
+ key: 0,
1877
+ type: "button",
1878
+ onClick: (n) => t("action", r.key)
1879
+ }, d(r.action), 9, xa)) : p("", !0)
1880
+ ]))), 128))
1881
+ ], 8, Sa));
1882
+ }
1883
+ });
1884
+ 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 = {
1885
+ colspan: "4",
1886
+ class: "dsea-error-log__empty"
1887
+ }, Da = ["aria-label"], Ka = ["aria-label"], Va = { key: 0 }, Ra = /* @__PURE__ */ k({
1888
+ __name: "AdminErrorLogView",
1889
+ props: {
1890
+ entries: {},
1891
+ title: { default: "Error log" },
1892
+ clearLabel: { default: "Clear" },
1893
+ timeLabel: { default: "Time" },
1894
+ messageLabel: { default: "Message" },
1895
+ sourceLabel: { default: "Source" },
1896
+ detailsLabel: { default: "Details" },
1897
+ closeLabel: { default: "Close" },
1898
+ emptyLabel: { default: "No errors" }
1899
+ },
1900
+ emits: ["clear"],
1901
+ setup(e, { emit: c }) {
1902
+ const t = c, i = S(null), l = S();
1903
+ return U(i, async (r) => {
1904
+ var n;
1905
+ r && (await se(), (n = l.value) == null || n.focus());
1906
+ }), (r, n) => (a(), o("section", {
1907
+ class: "dsea-error-log",
1908
+ "aria-label": e.title
1909
+ }, [
1910
+ s("header", null, [
1911
+ s("h1", null, d(e.title), 1),
1912
+ s("button", {
1913
+ type: "button",
1914
+ disabled: !e.entries.length,
1915
+ onClick: n[0] || (n[0] = (u) => t("clear"))
1916
+ }, d(e.clearLabel), 9, Ta)
1917
+ ]),
1918
+ s("div", Ba, [
1919
+ s("table", null, [
1920
+ s("thead", null, [
1921
+ s("tr", null, [
1922
+ s("th", Pa, d(e.timeLabel), 1),
1923
+ s("th", Ia, d(e.messageLabel), 1),
1924
+ s("th", Ea, d(e.sourceLabel), 1),
1925
+ n[4] || (n[4] = s("th", { scope: "col" }, null, -1))
1926
+ ])
1927
+ ]),
1928
+ s("tbody", null, [
1929
+ (a(!0), o(x, null, M(e.entries, (u) => (a(), o("tr", {
1930
+ key: u.id
1931
+ }, [
1932
+ s("td", null, d(u.time), 1),
1933
+ s("td", null, d(u.message), 1),
1934
+ s("td", null, d(u.source), 1),
1935
+ s("td", null, [
1936
+ s("button", {
1937
+ type: "button",
1938
+ onClick: (b) => i.value = u
1939
+ }, d(e.detailsLabel), 9, Fa)
1940
+ ])
1941
+ ]))), 128)),
1942
+ e.entries.length ? p("", !0) : (a(), o("tr", Na, [
1943
+ s("td", za, d(e.emptyLabel), 1)
1944
+ ]))
1945
+ ])
1946
+ ])
1947
+ ]),
1948
+ i.value ? (a(), o("div", {
1949
+ key: 0,
1950
+ class: "dsea-error-log__backdrop",
1951
+ onClick: n[3] || (n[3] = H((u) => i.value = null, ["self"]))
1952
+ }, [
1953
+ s("section", {
1954
+ ref_key: "dialog",
1955
+ ref: l,
1956
+ role: "dialog",
1957
+ "aria-modal": "true",
1958
+ "aria-label": e.detailsLabel,
1959
+ tabindex: "-1",
1960
+ class: "dsea-error-log__dialog",
1961
+ onKeydown: n[2] || (n[2] = J((u) => i.value = null, ["esc"]))
1962
+ }, [
1963
+ s("header", null, [
1964
+ s("h2", null, d(i.value.message), 1),
1965
+ s("button", {
1966
+ type: "button",
1967
+ "aria-label": e.closeLabel,
1968
+ onClick: n[1] || (n[1] = (u) => i.value = null)
1969
+ }, [
1970
+ $(y(w), {
1971
+ icon: "lucide:x",
1972
+ size: 18
1973
+ })
1974
+ ], 8, Ka)
1975
+ ]),
1976
+ s("dl", null, [
1977
+ s("dt", null, d(e.timeLabel), 1),
1978
+ s("dd", null, d(i.value.time), 1),
1979
+ s("dt", null, d(e.sourceLabel), 1),
1980
+ s("dd", null, d(i.value.source), 1)
1981
+ ]),
1982
+ i.value.details ? (a(), o("pre", Va, d(i.value.details), 1)) : p("", !0)
1983
+ ], 40, Da)
1984
+ ])) : p("", !0)
1985
+ ], 8, Ma));
1986
+ }
1987
+ });
1988
+ 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 = {
1989
+ key: 0,
1990
+ class: "dsea-about-view__dependencies"
1991
+ }, ja = /* @__PURE__ */ k({
1992
+ __name: "AdminAboutView",
1993
+ props: {
1994
+ title: {},
1995
+ description: {},
1996
+ version: {},
1997
+ builtAt: {},
1998
+ links: { default: () => [] },
1999
+ dependencies: { default: () => ({}) },
2000
+ versionLabel: { default: "Version" },
2001
+ builtAtLabel: { default: "Built at" },
2002
+ dependenciesLabel: { default: "Dependencies" }
2003
+ },
2004
+ setup(e) {
2005
+ const c = e, t = I(() => c.links.filter((l) => X(l.href))), i = I(() => Object.entries(c.dependencies).sort(([l], [r]) => l.localeCompare(r)));
2006
+ return (l, r) => (a(), o("section", Ua, [
2007
+ s("header", null, [
2008
+ s("h1", null, d(e.title), 1),
2009
+ e.description ? (a(), o("p", qa, d(e.description), 1)) : p("", !0)
2010
+ ]),
2011
+ s("dl", Wa, [
2012
+ s("dt", null, d(e.versionLabel), 1),
2013
+ s("dd", null, d(e.version), 1),
2014
+ e.builtAt ? (a(), o(x, { key: 0 }, [
2015
+ s("dt", null, d(e.builtAtLabel), 1),
2016
+ s("dd", null, d(e.builtAt), 1)
2017
+ ], 64)) : p("", !0),
2018
+ (a(!0), o(x, null, M(t.value, (n) => (a(), o(x, {
2019
+ key: n.label
2020
+ }, [
2021
+ s("dt", null, d(n.label), 1),
2022
+ s("dd", null, [
2023
+ s("a", {
2024
+ href: n.href,
2025
+ target: "_blank",
2026
+ rel: "noopener noreferrer"
2027
+ }, d(n.label), 9, Oa)
2028
+ ])
2029
+ ], 64))), 128))
2030
+ ]),
2031
+ i.value.length ? (a(), o("section", Ha, [
2032
+ s("h2", null, d(e.dependenciesLabel), 1),
2033
+ s("dl", null, [
2034
+ (a(!0), o(x, null, M(i.value, (n) => (a(), o(x, {
2035
+ key: n[0]
2036
+ }, [
2037
+ s("dt", null, d(n[0]), 1),
2038
+ s("dd", null, d(n[1]), 1)
2039
+ ], 64))), 128))
2040
+ ])
2041
+ ])) : p("", !0)
2042
+ ]));
2043
+ }
2044
+ });
2045
+ const pl = /* @__PURE__ */ A(ja, [["__scopeId", "data-v-c800d903"]]), Qa = ["aria-label"], Ga = ["title"], Xa = ["aria-label", "onClick"], Ya = /* @__PURE__ */ k({
2046
+ __name: "AgentAttachmentList",
2047
+ props: {
2048
+ attachments: {},
2049
+ label: { default: "Attachments" },
2050
+ removeLabel: { default: "Remove" }
2051
+ },
2052
+ emits: ["remove"],
2053
+ setup(e, { emit: c }) {
2054
+ const t = c;
2055
+ function i(l) {
2056
+ return l < 1024 ? `${l} B` : l < 1048576 ? `${(l / 1024).toFixed(1)} KB` : `${(l / 1048576).toFixed(1)} MB`;
2057
+ }
2058
+ return (l, r) => e.attachments.length ? (a(), o("ul", {
2059
+ key: 0,
2060
+ class: "dsea-agent-attachments",
2061
+ "aria-label": e.label
2062
+ }, [
2063
+ (a(!0), o(x, null, M(e.attachments, (n) => (a(), o("li", {
2064
+ key: n.id
2065
+ }, [
2066
+ $(y(w), {
2067
+ icon: n.status === "uploading" ? "lucide:loader-circle" : "lucide:paperclip",
2068
+ size: 14
2069
+ }, null, 8, ["icon"]),
2070
+ s("span", {
2071
+ class: "dsea-agent-attachments__name",
2072
+ title: n.name
2073
+ }, d(n.name), 9, Ga),
2074
+ s("small", null, d(i(n.size)), 1),
2075
+ n.status !== "uploading" ? (a(), o("button", {
2076
+ key: 0,
2077
+ type: "button",
2078
+ "aria-label": `${e.removeLabel}: ${n.name}`,
2079
+ onClick: (u) => t("remove", n.id)
2080
+ }, [
2081
+ $(y(w), {
2082
+ icon: "lucide:x",
2083
+ size: 14
2084
+ })
2085
+ ], 8, Xa)) : p("", !0)
2086
+ ]))), 128))
2087
+ ], 8, Qa)) : p("", !0);
2088
+ }
2089
+ });
2090
+ 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 = {
2091
+ value: "",
2092
+ disabled: ""
2093
+ }, nn = ["value"], ln = /* @__PURE__ */ k({
2094
+ __name: "AgentModelSelect",
2095
+ props: {
2096
+ model: {},
2097
+ models: {},
2098
+ disabled: { type: Boolean },
2099
+ loading: { type: Boolean },
2100
+ label: { default: "Model" },
2101
+ placeholder: { default: "Select model" },
2102
+ loadingLabel: { default: "Loading models" }
2103
+ },
2104
+ emits: ["update:model"],
2105
+ setup(e, { emit: c }) {
2106
+ const t = c;
2107
+ function i(l) {
2108
+ t("update:model", l.target.value);
2109
+ }
2110
+ return (l, r) => (a(), o("label", Za, [
2111
+ s("span", en, d(e.label), 1),
2112
+ s("select", {
2113
+ value: e.model,
2114
+ disabled: e.disabled || e.loading,
2115
+ onChange: i
2116
+ }, [
2117
+ s("option", an, d(e.loading ? e.loadingLabel : e.placeholder), 1),
2118
+ (a(!0), o(x, null, M(e.models, (n) => (a(), o("option", {
2119
+ key: n.id,
2120
+ value: n.id
2121
+ }, d(n.name) + d(n.provider ? ` · ${n.provider}` : ""), 9, nn))), 128))
2122
+ ], 40, tn)
2123
+ ]));
2124
+ }
2125
+ });
2126
+ 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({
2127
+ __name: "AgentComposer",
2128
+ props: {
2129
+ draft: {},
2130
+ loading: { type: Boolean },
2131
+ disabled: { type: Boolean },
2132
+ waitingApproval: { type: Boolean },
2133
+ model: {},
2134
+ models: { default: () => [] },
2135
+ modelsLoading: { type: Boolean },
2136
+ approvalMode: {},
2137
+ approvalModes: { default: () => [] },
2138
+ attachments: { default: () => [] },
2139
+ placeholder: { default: "Write a message" },
2140
+ waitingLabel: { default: "Review the pending request first" },
2141
+ attachLabel: { default: "Attach files" },
2142
+ attachmentsLabel: { default: "Attachments" },
2143
+ approvalLabel: { default: "Approval mode" },
2144
+ modelLabel: { default: "Model" },
2145
+ sendLabel: { default: "Send" },
2146
+ stopLabel: { default: "Stop" }
2147
+ },
2148
+ emits: ["update:draft", "update:model", "update:approvalMode", "files", "removeAttachment", "send", "stop"],
2149
+ setup(e, { emit: c }) {
2150
+ const t = e, i = c, l = S();
2151
+ function r(b) {
2152
+ i("update:draft", b.target.value);
2153
+ }
2154
+ function n(b) {
2155
+ b.key !== "Enter" || b.shiftKey || b.isComposing || (b.preventDefault(), !t.loading && t.draft.trim() && !t.disabled && !t.waitingApproval && i("send"));
2156
+ }
2157
+ function u(b) {
2158
+ const g = b.target, v = Array.from(g.files ?? []);
2159
+ v.length && i("files", v), g.value = "";
2160
+ }
2161
+ return (b, g) => (a(), o("div", sn, [
2162
+ $(Ja, {
2163
+ attachments: e.attachments,
2164
+ label: e.attachmentsLabel,
2165
+ onRemove: g[0] || (g[0] = (v) => i("removeAttachment", v))
2166
+ }, null, 8, ["attachments", "label"]),
2167
+ s("textarea", {
2168
+ value: e.draft,
2169
+ placeholder: e.waitingApproval ? e.waitingLabel : e.placeholder,
2170
+ disabled: e.disabled || e.waitingApproval,
2171
+ rows: "2",
2172
+ onInput: r,
2173
+ onKeydown: n
2174
+ }, null, 40, rn),
2175
+ s("div", dn, [
2176
+ s("input", {
2177
+ ref_key: "fileInput",
2178
+ ref: l,
2179
+ type: "file",
2180
+ multiple: "",
2181
+ class: "dsea-agent-composer__file-input",
2182
+ onChange: u
2183
+ }, null, 544),
2184
+ s("button", {
2185
+ type: "button",
2186
+ class: "dsea-agent-composer__icon",
2187
+ disabled: e.disabled || e.waitingApproval,
2188
+ "aria-label": e.attachLabel,
2189
+ title: e.attachLabel,
2190
+ onClick: g[1] || (g[1] = (v) => {
2191
+ var m;
2192
+ return (m = l.value) == null ? void 0 : m.click();
2193
+ })
2194
+ }, [
2195
+ $(y(w), {
2196
+ icon: "lucide:paperclip",
2197
+ size: 18
2198
+ })
2199
+ ], 8, cn),
2200
+ s("select", {
2201
+ value: e.approvalMode,
2202
+ "aria-label": e.approvalLabel,
2203
+ disabled: e.disabled || e.waitingApproval,
2204
+ onChange: g[2] || (g[2] = (v) => i("update:approvalMode", v.target.value))
2205
+ }, [
2206
+ (a(!0), o(x, null, M(e.approvalModes, (v) => (a(), o("option", {
2207
+ key: v.value,
2208
+ value: v.value
2209
+ }, d(v.label), 9, mn))), 128))
2210
+ ], 40, un),
2211
+ $(on, {
2212
+ model: e.model,
2213
+ models: e.models,
2214
+ loading: e.modelsLoading,
2215
+ disabled: e.disabled || e.loading || e.waitingApproval,
2216
+ label: e.modelLabel,
2217
+ "onUpdate:model": g[3] || (g[3] = (v) => i("update:model", v))
2218
+ }, null, 8, ["model", "models", "loading", "disabled", "label"]),
2219
+ s("button", {
2220
+ type: "button",
2221
+ class: "dsea-agent-composer__send",
2222
+ disabled: !e.loading && (!e.draft.trim() || e.disabled || e.waitingApproval),
2223
+ "aria-label": e.loading ? e.stopLabel : e.sendLabel,
2224
+ title: e.loading ? e.stopLabel : e.sendLabel,
2225
+ onClick: g[4] || (g[4] = (v) => i(e.loading ? "stop" : "send"))
2226
+ }, [
2227
+ $(y(w), {
2228
+ icon: e.loading ? "lucide:square" : "lucide:send",
2229
+ size: 18
2230
+ }, null, 8, ["icon"])
2231
+ ], 8, bn)
2232
+ ])
2233
+ ]));
2234
+ }
2235
+ });
2236
+ const gl = /* @__PURE__ */ A(vn, [["__scopeId", "data-v-f5f922c2"]]), pn = { key: 0 }, gn = { class: "dsea-agent-approval__status" }, hn = {
2237
+ key: 0,
2238
+ class: "dsea-agent-approval__tool"
2239
+ }, fn = { key: 1 }, yn = {
2240
+ key: 2,
2241
+ class: "dsea-agent-approval__meta"
2242
+ }, kn = {
2243
+ key: 3,
2244
+ class: "dsea-agent-approval__reason"
2245
+ }, _n = { key: 4 }, wn = ["disabled"], $n = ["disabled"], Ln = /* @__PURE__ */ k({
2246
+ __name: "AgentApprovalCard",
2247
+ props: {
2248
+ approval: {},
2249
+ busy: { type: Boolean },
2250
+ labels: {}
2251
+ },
2252
+ emits: ["resolve"],
2253
+ setup(e, { emit: c }) {
2254
+ const t = e, i = c, l = {
2255
+ status: {
2256
+ pending: "Approval needed",
2257
+ approved: "Approved",
2258
+ executing: "Executing",
2259
+ succeeded: "Completed",
2260
+ completed: "Completed",
2261
+ rejected: "Rejected",
2262
+ expired: "Expired",
2263
+ failed: "Failed"
2264
+ },
2265
+ risk: { read: "Read", write: "Write", export: "Export", delete: "Delete", permission: "Permission" },
2266
+ tool: "Tool",
2267
+ details: "Details",
2268
+ expires: "Expires",
2269
+ reject: "Reject",
2270
+ approve: "Approve"
2271
+ }, r = I(() => {
2272
+ var n, u;
2273
+ return {
2274
+ ...l,
2275
+ ...t.labels,
2276
+ status: { ...l.status, ...(n = t.labels) == null ? void 0 : n.status },
2277
+ risk: { ...l.risk, ...(u = t.labels) == null ? void 0 : u.risk }
2278
+ };
2279
+ });
2280
+ return (n, u) => (a(), o("article", {
2281
+ class: N(["dsea-agent-approval", `dsea-agent-approval--${e.approval.status}`])
2282
+ }, [
2283
+ s("header", null, [
2284
+ s("div", null, [
2285
+ s("h2", null, d(r.value.status[e.approval.status] || e.approval.status), 1),
2286
+ e.approval.summary ? (a(), o("p", pn, d(e.approval.summary), 1)) : p("", !0)
2287
+ ]),
2288
+ s("span", gn, d(r.value.risk[e.approval.riskLevel || "read"] || e.approval.riskLevel), 1)
2289
+ ]),
2290
+ e.approval.toolName ? (a(), o("p", hn, [
2291
+ z(d(r.value.tool) + ": ", 1),
2292
+ s("code", null, d(e.approval.toolName), 1)
2293
+ ])) : p("", !0),
2294
+ e.approval.details ? (a(), o("details", fn, [
2295
+ s("summary", null, d(r.value.details), 1),
2296
+ s("pre", null, d(e.approval.details), 1)
2297
+ ])) : p("", !0),
2298
+ e.approval.expiresAt ? (a(), o("p", yn, d(r.value.expires) + ": " + d(e.approval.expiresAt), 1)) : p("", !0),
2299
+ e.approval.reason ? (a(), o("p", kn, d(e.approval.reason), 1)) : p("", !0),
2300
+ e.approval.status === "pending" ? (a(), o("footer", _n, [
2301
+ s("button", {
2302
+ type: "button",
2303
+ disabled: e.busy,
2304
+ onClick: u[0] || (u[0] = (b) => i("resolve", "reject"))
2305
+ }, d(r.value.reject), 9, wn),
2306
+ s("button", {
2307
+ type: "button",
2308
+ class: "dsea-agent-approval__approve",
2309
+ disabled: e.busy,
2310
+ onClick: u[1] || (u[1] = (b) => i("resolve", "approve"))
2311
+ }, d(r.value.approve), 9, $n)
2312
+ ])) : p("", !0)
2313
+ ], 2));
2314
+ }
2315
+ });
2316
+ const hl = /* @__PURE__ */ A(Ln, [["__scopeId", "data-v-88695aee"]]), Cn = { class: "dsea-admin-tabs" }, Sn = {
2317
+ class: "dsea-admin-tabs__list",
2318
+ role: "tablist"
2319
+ }, xn = ["aria-selected", "onClick"], An = ["aria-label", "onClick"], Mn = {
2320
+ key: 0,
2321
+ class: "dsea-admin-tabs__tools"
2322
+ }, Tn = ["aria-label"], Bn = ["aria-label"], fl = /* @__PURE__ */ k({
2323
+ __name: "AdminTabs",
2324
+ props: {
2325
+ tabs: {},
2326
+ activeKey: {},
2327
+ labels: {},
2328
+ navigateOnSelect: { type: Boolean, default: !0 }
2329
+ },
2330
+ emits: ["select", "close", "refresh", "closeAction"],
2331
+ setup(e, { emit: c }) {
2332
+ const t = e, i = c, { ports: l } = q(), r = I(() => [
2333
+ { event: "left", text: t.labels.closeLeft },
2334
+ { event: "right", text: t.labels.closeRight },
2335
+ { event: "others", text: t.labels.closeOthers },
2336
+ { event: "all", text: t.labels.closeAll }
2337
+ ]);
2338
+ function n(g) {
2339
+ i("select", g), t.navigateOnSelect && l.navigation.go(g);
2340
+ }
2341
+ function u(g) {
2342
+ i("close", g);
2343
+ }
2344
+ function b(g) {
2345
+ g && i("closeAction", g.event, t.activeKey);
2346
+ }
2347
+ return (g, v) => (a(), o("div", Cn, [
2348
+ s("div", Sn, [
2349
+ (a(!0), o(x, null, M(e.tabs, (m) => (a(), o("div", {
2350
+ key: m.key,
2351
+ class: N(["dsea-admin-tabs__item", { "dsea-admin-tabs__item--active": m.key === e.activeKey }])
2352
+ }, [
2353
+ s("button", {
2354
+ type: "button",
2355
+ role: "tab",
2356
+ "aria-selected": m.key === e.activeKey,
2357
+ class: "dsea-admin-tabs__select",
2358
+ onClick: (L) => n(m.key)
2359
+ }, [
2360
+ m.icon ? (a(), P(y(w), {
2361
+ key: 0,
2362
+ icon: m.icon,
2363
+ size: 14
2364
+ }, null, 8, ["icon"])) : p("", !0),
2365
+ s("span", null, d(m.label), 1)
2366
+ ], 8, xn),
2367
+ m.affix ? p("", !0) : (a(), o("button", {
2368
+ key: 0,
2369
+ type: "button",
2370
+ class: "dsea-admin-tabs__close",
2371
+ "aria-label": `${e.labels.close}: ${m.label}`,
2372
+ onClick: (L) => u(m.key)
2373
+ }, [
2374
+ $(y(w), {
2375
+ icon: "lucide:x",
2376
+ size: 14
2377
+ })
2378
+ ], 8, An))
2379
+ ], 2))), 128))
2380
+ ]),
2381
+ e.tabs.length ? (a(), o("div", Mn, [
2382
+ s("button", {
2383
+ type: "button",
2384
+ "aria-label": e.labels.refresh,
2385
+ onClick: v[0] || (v[0] = (m) => i("refresh", e.activeKey))
2386
+ }, [
2387
+ $(y(w), {
2388
+ icon: "lucide:refresh-cw",
2389
+ size: 16
2390
+ })
2391
+ ], 8, Tn),
2392
+ $(y(re), {
2393
+ "drop-menu-list": r.value,
2394
+ trigger: ["click"],
2395
+ onMenuEvent: b
2396
+ }, {
2397
+ default: j(() => [
2398
+ s("button", {
2399
+ type: "button",
2400
+ "aria-label": e.labels.actions
2401
+ }, [
2402
+ $(y(w), {
2403
+ icon: "lucide:chevron-down",
2404
+ size: 16
2405
+ })
2406
+ ], 8, Bn)
2407
+ ]),
2408
+ _: 1
2409
+ }, 8, ["drop-menu-list"])
2410
+ ])) : p("", !0)
2411
+ ]));
2412
+ }
2413
+ });
2414
+ function yl(e, c, t) {
2415
+ const i = e.findIndex((l) => l.key === c);
2416
+ return i < 0 && t !== "all" ? [...e] : e.filter((l, r) => {
2417
+ if (l.affix)
2418
+ return !0;
2419
+ switch (t) {
2420
+ case "current":
2421
+ return l.key !== c;
2422
+ case "left":
2423
+ return r >= i;
2424
+ case "right":
2425
+ return r <= i;
2426
+ case "others":
2427
+ return l.key === c;
2428
+ case "all":
2429
+ return !1;
2430
+ }
2431
+ });
2432
+ }
2433
+ function kl(e, c) {
2434
+ var t;
2435
+ return e.some((i) => i.key === c) ? c : (t = e[e.length - 1]) == null ? void 0 : t.key;
2436
+ }
2437
+ 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({
2438
+ __name: "SettingsPanel",
2439
+ props: {
2440
+ sections: {}
2441
+ },
2442
+ emits: ["change"],
2443
+ setup(e, { emit: c }) {
2444
+ const t = c;
2445
+ function i(u, b) {
2446
+ t("change", u, b);
2447
+ }
2448
+ function l(u, b) {
2449
+ typeof b == "boolean" && i(u, b);
2450
+ }
2451
+ function r(u, b) {
2452
+ (typeof b == "string" || typeof b == "number") && i(u, b);
2453
+ }
2454
+ function n(u, b) {
2455
+ typeof b == "number" && Number.isFinite(b) && i(u, b);
2456
+ }
2457
+ return (u, b) => (a(), o("div", Pn, [
2458
+ (a(!0), o(x, null, M(e.sections, (g) => (a(), o("section", {
2459
+ key: g.title,
2460
+ class: "dsea-settings-panel__section"
2461
+ }, [
2462
+ s("h3", null, d(g.title), 1),
2463
+ (a(!0), o(x, null, M(g.items, (v) => (a(), o("div", {
2464
+ key: v.key,
2465
+ class: N(["dsea-settings-panel__row", { "dsea-settings-panel__row--stacked": v.type === "color" || v.type === "mode" }])
2466
+ }, [
2467
+ v.type === "switch" || v.type === "select" || v.type === "number" ? (a(), o("label", {
2468
+ key: 0,
2469
+ for: v.key
2470
+ }, d(v.label), 9, In)) : (a(), o("span", En, d(v.label), 1)),
2471
+ v.type === "switch" ? (a(), P(y(ye), {
2472
+ key: 2,
2473
+ id: v.key,
2474
+ checked: v.value,
2475
+ disabled: v.disabled,
2476
+ onChange: (m) => l(v.key, m)
2477
+ }, null, 8, ["id", "checked", "disabled", "onChange"])) : v.type === "select" ? (a(), P(y(ke), {
2478
+ key: 3,
2479
+ id: v.key,
2480
+ value: v.value,
2481
+ options: v.options,
2482
+ disabled: v.disabled,
2483
+ class: "dsea-settings-panel__select",
2484
+ onChange: (m) => r(v.key, m)
2485
+ }, null, 8, ["id", "value", "options", "disabled", "onChange"])) : v.type === "number" ? (a(), P(y(_e), {
2486
+ key: 4,
2487
+ id: v.key,
2488
+ value: v.value,
2489
+ min: v.min,
2490
+ max: v.max,
2491
+ step: v.step,
2492
+ disabled: v.disabled,
2493
+ class: "dsea-settings-panel__number",
2494
+ onChange: (m) => n(v.key, m)
2495
+ }, null, 8, ["id", "value", "min", "max", "step", "disabled", "onChange"])) : v.type === "color" ? (a(), o("div", {
2496
+ key: 5,
2497
+ class: "dsea-settings-panel__colors",
2498
+ role: "group",
2499
+ "aria-label": v.label
2500
+ }, [
2501
+ (a(!0), o(x, null, M(v.colors, (m) => (a(), o("button", {
2502
+ key: m,
2503
+ type: "button",
2504
+ class: N(["dsea-settings-panel__swatch", { "dsea-settings-panel__swatch--active": v.value === m }]),
2505
+ style: ie({ backgroundColor: m }),
2506
+ "aria-label": m,
2507
+ "aria-pressed": v.value === m,
2508
+ disabled: v.disabled,
2509
+ onClick: (L) => i(v.key, m)
2510
+ }, [
2511
+ v.value === m ? (a(), P(y(w), {
2512
+ key: 0,
2513
+ icon: "lucide:check",
2514
+ size: 14
2515
+ })) : p("", !0)
2516
+ ], 14, Nn))), 128))
2517
+ ], 8, Fn)) : v.type === "mode" ? (a(), o("div", {
2518
+ key: 6,
2519
+ class: "dsea-settings-panel__modes",
2520
+ role: "group",
2521
+ "aria-label": v.label
2522
+ }, [
2523
+ (a(!0), o(x, null, M(v.options, (m) => (a(), o("button", {
2524
+ key: m.value,
2525
+ type: "button",
2526
+ class: N({ active: v.value === m.value }),
2527
+ "aria-pressed": v.value === m.value,
2528
+ disabled: v.disabled,
2529
+ onClick: (L) => i(v.key, m.value)
2530
+ }, [
2531
+ m.icon ? (a(), P(y(w), {
2532
+ key: 0,
2533
+ icon: m.icon,
2534
+ size: 16
2535
+ }, null, 8, ["icon"])) : p("", !0),
2536
+ z(" " + d(m.label), 1)
2537
+ ], 10, Dn))), 128))
2538
+ ], 8, zn)) : p("", !0)
2539
+ ], 2))), 128))
2540
+ ]))), 128))
2541
+ ]));
2542
+ }
2543
+ });
2544
+ const _l = /* @__PURE__ */ k({
2545
+ __name: "AdminSettingsDrawer",
2546
+ props: {
2547
+ open: { type: Boolean },
2548
+ title: {},
2549
+ sections: {},
2550
+ width: { default: 340 },
2551
+ resetLabel: {}
2552
+ },
2553
+ emits: ["update:open", "change", "reset"],
2554
+ setup(e, { emit: c }) {
2555
+ const t = c;
2556
+ return (i, l) => (a(), P(y(we), {
2557
+ visible: e.open,
2558
+ title: e.title,
2559
+ placement: "right",
2560
+ width: e.width,
2561
+ onClose: l[2] || (l[2] = (r) => t("update:open", !1))
2562
+ }, fe({
2563
+ default: j(() => [
2564
+ $(Kn, {
2565
+ sections: e.sections,
2566
+ onChange: l[0] || (l[0] = (r, n) => t("change", r, n))
2567
+ }, null, 8, ["sections"])
2568
+ ]),
2569
+ _: 2
2570
+ }, [
2571
+ i.$slots.footer || e.resetLabel ? {
2572
+ name: "footer",
2573
+ fn: j(() => [
2574
+ B(i.$slots, "footer", {}, () => [
2575
+ s("button", {
2576
+ type: "button",
2577
+ class: "dsea-settings-drawer__reset",
2578
+ onClick: l[1] || (l[1] = (r) => t("reset"))
2579
+ }, d(e.resetLabel), 1)
2580
+ ])
2581
+ ]),
2582
+ key: "0"
2583
+ } : void 0
2584
+ ]), 1032, ["visible", "title", "width"]));
2585
+ }
2586
+ });
2587
+ export {
2588
+ pl as AdminAboutView,
2589
+ Jn as AdminAppSwitcher,
2590
+ ol as AdminBreadcrumb,
2591
+ vl as AdminErrorLogView,
2592
+ dl as AdminExceptionView,
2593
+ Yn as AdminFullscreenButton,
2594
+ sl as AdminIframeView,
2595
+ ll as AdminLayout,
2596
+ rl as AdminLockView,
2597
+ il as AdminLoginView,
2598
+ nl as AdminNotificationCenter,
2599
+ ml as AdminPasswordForm,
2600
+ ul as AdminProfileForm,
2601
+ cl as AdminProfileTabs,
2602
+ bl as AdminSecuritySettings,
2603
+ _l as AdminSettingsDrawer,
2604
+ fl as AdminTabs,
2605
+ al as AdminUserMenu,
2606
+ hl as AgentApprovalCard,
2607
+ Ja as AgentAttachmentList,
2608
+ gl as AgentComposer,
2609
+ on as AgentModelSelect,
2610
+ Xn as AppDarkModeToggle,
2611
+ Gn as AppLocalePicker,
2612
+ Ce as AppLogo,
2613
+ el as AppProvider,
2614
+ tl as AppSearch,
2615
+ te as BasicMenu,
2616
+ Kn as SettingsPanel,
2617
+ jn as SimpleMenu,
2618
+ Qn as SimpleMenuTag,
2619
+ de as adminMenuKey,
2620
+ ne as adminShellMessages,
2621
+ me as appProviderKey,
2622
+ yl as closeTabs,
2623
+ Hn as createAdminMenuPlugin,
2624
+ be as createAppProviderContext,
2625
+ Wn as getAdminShellMessage,
2626
+ ee as getAllParentPath,
2627
+ On as legacyAdminMessages,
2628
+ kl as nextActiveTab,
2629
+ ce as useAdminMenuPort,
2630
+ Zn as useAppProviderContext
2631
+ };