halo-pc 1.0.26 → 1.0.27

Sign up to get free protection for your applications and to get access to all the features.
Files changed (114) hide show
  1. package/dist/{Article-BNacU3kR.js → Article-CTqryR4L.js} +18 -17
  2. package/dist/{ArticleFooter-Ya07aLYn.js → ArticleFooter-BumGH5nC.js} +1 -1
  3. package/dist/{Autocomplete-CyXE-g54.js → Autocomplete-BNx0bErM.js} +1 -1
  4. package/dist/{Autocomplete-Bud53PPx.js → Autocomplete-C9RS9-qw.js} +3 -3
  5. package/dist/{Autocomplete-CfE5ZKi2.js → Autocomplete-DIucpEpj.js} +3 -3
  6. package/dist/{CSharp-DQLgcbTQ.js → CSharp-Dt6H75E9.js} +1 -1
  7. package/dist/{Calender-YujFxcgS.js → Calender-DhKZyJri.js} +1 -1
  8. package/dist/{Callback-BaFg5U2u.js → Callback-D6G_933H.js} +1 -1
  9. package/dist/{Cascader-C1kyNib7.js → Cascader-C6t8Q18c.js} +1 -1
  10. package/dist/{Cascader-D5PO9zK9.js → Cascader-F_XWwXKY.js} +3 -3
  11. package/dist/{Checkbox-Dkqh7eR4.js → Checkbox-C-iEGB0k.js} +1 -1
  12. package/dist/{Checkbox-CUtyT8l7.js → Checkbox-ipHs0O-8.js} +1 -1
  13. package/dist/{Code-pe9JMCAj.js → Code-DKtqow6y.js} +4 -4
  14. package/dist/{Code-Dszcah6J.js → Code-JtSSnUWC.js} +1 -1
  15. package/dist/{Code-C160-nQS.js → Code-LeguA9RL.js} +1 -1
  16. package/dist/Code-Q_6THgGl.js +4 -0
  17. package/dist/{Code.vue_vue_type_style_index_0_lang-B1dEEN-z.js → Code.vue_vue_type_style_index_0_lang-DmeXbg91.js} +5 -5
  18. package/dist/{Column-C3j98RGT.js → Column-BeQwafyN.js} +16 -15
  19. package/dist/{Comment-DIrY0RiI.js → Comment-DIcCHP9F.js} +1 -1
  20. package/dist/{Compare-DKLN4wT4.js → Compare-DZVrBYEh.js} +4 -4
  21. package/dist/{Compare-5j7MYou6.js → Compare-Dzqm7kPE.js} +7 -7
  22. package/dist/{Copy-Go_1uhB5.js → Copy-iLieXx22.js} +1 -1
  23. package/dist/{Custom-C00oYEFm.js → Custom-BGtEDHlD.js} +1 -1
  24. package/dist/{DataExport-CFjE1loi.js → DataExport-DSz5371s.js} +1 -1
  25. package/dist/{DataExport.vue_vue_type_script_setup_true_lang-yTe6V3Dn.js → DataExport.vue_vue_type_script_setup_true_lang-DL9q81Ti.js} +5 -5
  26. package/dist/{DataImport-BQ0rieu8.js → DataImport-CX7G70a7.js} +1 -1
  27. package/dist/{DataImport.vue_vue_type_script_setup_true_lang-LYppKTfv.js → DataImport.vue_vue_type_script_setup_true_lang-BWS65Vp1.js} +10 -10
  28. package/dist/{Date-uHiOL-PD.js → Date-CNOCOcNz.js} +1 -1
  29. package/dist/{Date-C5WCVXDU.js → Date-ytWe2gz8.js} +1 -1
  30. package/dist/{DateRange-B-HjKQpJ.js → DateRange-CaIiObxN.js} +1 -1
  31. package/dist/{DateTime-D4Ck5hBj.js → DateTime-CH6J1GoP.js} +1 -1
  32. package/dist/{DateTime-BrsWm90_.js → DateTime-p6YgmtGd.js} +1 -1
  33. package/dist/{DateTimeRange-DjIp1SAX.js → DateTimeRange-DGobnXqs.js} +1 -1
  34. package/dist/{Daterange-DiZUFL_F.js → Daterange-BUSKAGlK.js} +1 -1
  35. package/dist/{Decimal-_6FobwTd.js → Decimal-BvyzJq1c.js} +1 -1
  36. package/dist/{Delete-C46eSfMC.js → Delete-BeFC0gjD.js} +12 -11
  37. package/dist/{Detail-BMbiENm0.js → Detail-DZJ0aUFr.js} +7 -6
  38. package/dist/{Dictionary-Dga6kbof.js → Dictionary-CsBiv-CI.js} +1 -1
  39. package/dist/{Email-PVk9gqfn.js → Email-Dwa6x3jW.js} +1 -1
  40. package/dist/{File-B9Q2QOa-.js → File-BEBElTSS.js} +24 -23
  41. package/dist/{Image-CzOq81lm.js → Image-DDK05SW7.js} +1 -1
  42. package/dist/{Index-DvfJmbPU.js → Index-BiF8qEWf.js} +1 -1
  43. package/dist/Index-Bpe7pY2Z.js +4 -0
  44. package/dist/{Index-Cq20wsZC.js → Index-CUYQxzNd.js} +53 -52
  45. package/dist/{Index-DJz-eVVd.js → Index-CuEyzMd0.js} +2 -2
  46. package/dist/Index-DMnL8F7Y.js +4 -0
  47. package/dist/Index-DNG25ox2.js +4 -0
  48. package/dist/{Index-BmVFh23J.js → Index-DPwdcUO4.js} +1 -1
  49. package/dist/Index-DqUNI6MV.js +4 -0
  50. package/dist/{Index.vue_vue_type_script_setup_true_lang-ExArYWR3.js → Index.vue_vue_type_script_setup_true_lang-Bp091zxs.js} +6 -5
  51. package/dist/{Index.vue_vue_type_script_setup_true_lang-BpU5b5wU.js → Index.vue_vue_type_script_setup_true_lang-hjy21YuL.js} +10 -9
  52. package/dist/{Install-CXj-qqao.js → Install-CxuoWpHC.js} +15 -14
  53. package/dist/{Int-BG6MD24t.js → Int-BFv18KXi.js} +1 -1
  54. package/dist/{Int-Dc7h_7Ga.js → Int-C0ijmdYS.js} +7 -7
  55. package/dist/{List-EDwPH8aL.js → List-CfQzWq_5.js} +10 -9
  56. package/dist/{Maintaince-BqvMHxH0.js → Maintaince-BzDEwQcU.js} +1 -1
  57. package/dist/{Markdown-CdP4Uf3M.js → Markdown-x1hASyA-.js} +1 -1
  58. package/dist/{Month-BUvqsSfA.js → Month-Bb0tgF-k.js} +1 -1
  59. package/dist/{Month-8mDUGsOp.js → Month-Bp_Pfi_b.js} +1 -1
  60. package/dist/{Month-ClGd6IhI.js → Month-CKkjwzza.js} +1 -1
  61. package/dist/{Normal-DUlWYlcs.js → Normal-CYmy5sN7.js} +60 -59
  62. package/dist/{Paging-D_ticCtb.js → Paging-DpoBp7x_.js} +19 -18
  63. package/dist/{PagingHeader-aZb0fGRv.js → PagingHeader-DWbFl1do.js} +1 -1
  64. package/dist/{PagingRow-_H7tCWDM.js → PagingRow-CR2N1vgm.js} +1 -1
  65. package/dist/{QueryApi-S0e3c6l0.js → QueryApi-VwISnk96.js} +1 -1
  66. package/dist/{Racebar-DESsxoi9.js → Racebar-BsgDK6Zf.js} +2 -2
  67. package/dist/{Radio-ChF3_bX0.js → Radio-B3Af-uZE.js} +1 -1
  68. package/dist/{Register-Du5lRabU.js → Register-Cwr3iIZm.js} +66 -65
  69. package/dist/{RichText-BJVvArGS.js → RichText-CNahMrfb.js} +3 -3
  70. package/dist/{SearchFooter-HjKH1gD5.js → SearchFooter-DiILcc_U.js} +1 -1
  71. package/dist/{SearchFooter.vue_vue_type_style_index_0_lang-CeQ2BcOI.js → SearchFooter.vue_vue_type_style_index_0_lang-BsIg4tbY.js} +1 -1
  72. package/dist/{SearchForm-C-o0Orkp.js → SearchForm-BOw_kHs2.js} +1 -1
  73. package/dist/{SearchForm.vue_vue_type_style_index_0_lang-BijR_gZY.js → SearchForm.vue_vue_type_style_index_0_lang-GMYFgf1H.js} +33 -32
  74. package/dist/{Select-DrybbaWb.js → Select-BdYG1KQE.js} +1 -1
  75. package/dist/{Select-DgKzH1gD.js → Select-BeNZqAP1.js} +15 -14
  76. package/dist/{Select-CYaWHcWs.js → Select-CqOE6uI8.js} +5 -5
  77. package/dist/{Single-B-253IzX.js → Single-DqCIZBIB.js} +48 -47
  78. package/dist/{Statistic-B7Tib1eh.js → Statistic-B9ZcUUk1.js} +19 -18
  79. package/dist/{Stock-BBcnzi6G.js → Stock-BiSr7zAF.js} +1 -1
  80. package/dist/{Stock-DuyZiPxv.js → Stock-BnBNtuo7.js} +1 -1
  81. package/dist/{Stock.vue_vue_type_style_index_0_lang-B6E5USSu.js → Stock.vue_vue_type_style_index_0_lang-CZPeF39q.js} +4 -4
  82. package/dist/{Switch-DP-_EUOK.js → Switch-BE4dQcja.js} +1 -1
  83. package/dist/{Table-hHG9kq1I.js → Table-CaH_zu8W.js} +38 -37
  84. package/dist/{Table-2jZ0ISz7.js → Table-e0uLPRLG.js} +48 -47
  85. package/dist/Text-5803XWI6.js +4 -0
  86. package/dist/{Text-RsldE1sr.js → Text-BAw88r5O.js} +4 -4
  87. package/dist/{Text-lak-4VnA.js → Text-BDAob4mp.js} +1 -1
  88. package/dist/{Text.vue_vue_type_style_index_0_lang-BP6k7KJG.js → Text.vue_vue_type_style_index_0_lang-D1JSHUmS.js} +8 -8
  89. package/dist/{TextLink-C-NU-oVe.js → TextLink-TYXcDAlo.js} +3 -3
  90. package/dist/{Textarea-QGa_EKSl.js → Textarea-CU5PjIoa.js} +1 -1
  91. package/dist/{Time-BgWPjGd1.js → Time-Dd-Trib4.js} +6 -6
  92. package/dist/{Timeline-CBWcOVdY.js → Timeline-D6LCIkQp.js} +12 -12
  93. package/dist/{Tree--dJKRJvG.js → Tree-BKmFZrK3.js} +4 -3
  94. package/dist/{Tree-B2fZE9Qf.js → Tree-D-v632h1.js} +47 -46
  95. package/dist/{TreeNode-CxTzNQo9.js → TreeNode-L_A5ZKy0.js} +1 -1
  96. package/dist/{Update-BqQGp_9h.js → Update-DRAFce7_.js} +7 -6
  97. package/dist/{UpdateChild-DejVqKrE.js → UpdateChild-DMC0FG4Z.js} +1 -1
  98. package/dist/{Upload-tlSQp2Qu.js → Upload-DJRh4a7g.js} +17 -16
  99. package/dist/{Upload-9z5VIixQ.js → Upload-Ozg_nOpI.js} +22 -21
  100. package/dist/{UploadApi-B2dxOS0T.js → UploadApi-DVx69g-F.js} +1 -1
  101. package/dist/{Year-CrN8Fl5U.js → Year-CpcMBvQ7.js} +1 -1
  102. package/dist/{Year-DNDyqe5X.js → Year-D7XGe2So.js} +1 -1
  103. package/dist/assets/halo-fe-B-NiIGas.js +12088 -0
  104. package/dist/main-DB_sVyZe.js +3620 -0
  105. package/dist/main.js +141 -140
  106. package/dist/style.css +1 -1
  107. package/package.json +2 -2
  108. package/dist/Code-DXkJ6x5_.js +0 -4
  109. package/dist/Index-CfDvQD94.js +0 -4
  110. package/dist/Index-DGiRkT-p.js +0 -4
  111. package/dist/Index-DyK_nYp9.js +0 -4
  112. package/dist/Index-z5MnS_Wq.js +0 -4
  113. package/dist/Text-C70dFJLS.js +0 -4
  114. package/dist/main-D3_7YhaK.js +0 -15700
@@ -0,0 +1,3620 @@
1
+ var Gt = Object.defineProperty;
2
+ var Qt = (_, t, o) => t in _ ? Gt(_, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : _[t] = o;
3
+ var G = (_, t, o) => Qt(_, typeof t != "symbol" ? t + "" : t, o);
4
+ import { m as Zt, d as ve, F as Z, U as De, J as Se, H as Le, s as el, P as Ie, I as $t, a as nt, t as tl, K as de, e as j, M as rt, Y as It, b as ll, u as Ue, o as Ze, E as Ne, c as ke, R as he, f as xe, l as Ce, T as et, g as We, W as dt, x as ol, v as tt, h as Tt, n as it, i as sl, D as Ge, j as Ct, k as ct, O as Te, w as Lt, p as $e, q as Vt, r as al, y as St, z as nl, A as rl, B as Rt } from "./assets/halo-fe-B-NiIGas.js";
5
+ import il, { ElMessage as Ke, ElMessageBox as Mt, ElNotification as st, ElDialog as ul } from "element-plus";
6
+ import { reactive as dl, defineComponent as Y, mergeModels as Re, toRefs as oe, useModel as Be, ref as x, resolveComponent as B, openBlock as u, createElementBlock as y, Fragment as K, createVNode as k, unref as e, withCtx as h, createBlock as z, createTextVNode as H, createCommentVNode as N, renderSlot as ee, Teleport as mt, createElementVNode as f, onMounted as fe, watch as _e, computed as ie, normalizeClass as ne, renderList as re, toDisplayString as M, defineAsyncComponent as Me, onBeforeUnmount as pt, isRef as be, resolveDynamicComponent as Ae, onUnmounted as lt, nextTick as at, normalizeStyle as we, useSlots as Et, onUpdated as vt, withModifiers as ze, createSlots as cl, TransitionGroup as ml, inject as Pt, provide as Ot, toRef as Ut } from "vue";
7
+ import { z as pl, E as vl, h as fl } from "./assets/element-plus-Dp3QGoBh.js";
8
+ import { createRouter as hl, createWebHistory as gl, useRoute as He, useRouter as _l } from "vue-router";
9
+ import { i as yl } from "./assets/intro.js-DxWjEdp_.js";
10
+ class bl extends Zt {
11
+ constructor() {
12
+ super(...arguments);
13
+ /**
14
+ * 显示全局成功消息
15
+ */
16
+ G(this, "success", (o) => {
17
+ Ke({ message: o, type: "success", showClose: !0, offset: 10, grouping: !0 });
18
+ });
19
+ /**
20
+ * 显示全局警告消息
21
+ */
22
+ G(this, "warning", (o) => {
23
+ Ke({ message: o, type: "warning", showClose: !0, duration: 5e3, offset: 10, grouping: !0 });
24
+ });
25
+ /**
26
+ * 显示全局信息消息
27
+ */
28
+ G(this, "info", (o) => {
29
+ Ke({ message: o, type: "info", showClose: !0, duration: 5e3, offset: 10, grouping: !0 });
30
+ });
31
+ /**
32
+ * 显示全局错误消息
33
+ */
34
+ G(this, "error", (o) => {
35
+ Ke({ message: o, type: "error", showClose: !0, duration: 5e3, offset: 10, grouping: !0 });
36
+ });
37
+ /**
38
+ * 显示全局错误消息
39
+ */
40
+ G(this, "confirm", (o, s, n = null) => Mt.confirm(s, o, n));
41
+ /**
42
+ * 显示警告框
43
+ */
44
+ G(this, "alert", (o, s, n = null) => Mt.alert(s, o, n));
45
+ /**
46
+ * 通知
47
+ */
48
+ G(this, "notify", (o, s, n) => {
49
+ if (n == "info")
50
+ return st.info({ title: o, message: s });
51
+ if (n == "success")
52
+ return st.success({ title: o, message: s });
53
+ if (n == "warning")
54
+ return st.warning({ title: o, message: s });
55
+ });
56
+ }
57
+ }
58
+ let wl = new bl(), kl = [
59
+ { path: "/install", component: () => import("./Install-CxuoWpHC.js") },
60
+ { path: "/login", component: () => import("./Index-CUYQxzNd.js") },
61
+ { path: "/register", component: () => import("./Register-Cwr3iIZm.js") },
62
+ { path: "/maintaince", component: () => import("./Maintaince-BzDEwQcU.js") },
63
+ { path: "/sso/callback", component: () => import("./Callback-D6G_933H.js") },
64
+ //优先匹配自定义路由,自定义路由匹配不到后,再使用框架页面
65
+ { path: "/:pathMatch(.*)*", component: () => import("./Index-DNG25ox2.js") }
66
+ ], xl = () => ({
67
+ /**
68
+ * 安装路由
69
+ */
70
+ install() {
71
+ me.addRoutes(kl), me.router.beforeEach(async (_, t, o) => _.path == "/install" ? o() : (await ve.init(), await Z.getSso() ? _.path == "/login" ? o({ path: "/" }) : Z.user ? o() : (De.reconnect = !0, await De.connect(), await Z.loadInfo(), await Z.loadMenus(), await Se.switchI18n(Le.sys.app.language), o({ ..._, replace: !0 })) : Z.menus != null ? o() : (await Z.getAnonymous(), await Z.loadMenus(), await Se.switchI18n(el.getLanguage()), o(_))));
72
+ }
73
+ });
74
+ class $l {
75
+ constructor() {
76
+ //#region 属性
77
+ /**
78
+ * Element UI语言包
79
+ */
80
+ G(this, "locale");
81
+ }
82
+ //#endregion
83
+ /**
84
+ * 初始化
85
+ */
86
+ async useGlobal(t) {
87
+ t.use(me.router), t.use(xl()), Ve.init(t), ul.props.closeOnClickModal = !1, t.use(il), t.config.errorHandler = (o, s) => {
88
+ let n = o.message, l = s.$el;
89
+ throw l && l.className && (n += ` 对应dom类: .${l.className}`), Ie.add("error", n, o.stack), o;
90
+ };
91
+ }
92
+ /**
93
+ * 注册自定义路由
94
+ */
95
+ useRoutes(t) {
96
+ me.addRoutes(t);
97
+ }
98
+ /**
99
+ * 注册自定义组件
100
+ */
101
+ useComponents(t, o, s, n) {
102
+ Ve.register(t, o, s, n);
103
+ }
104
+ //#region 多语言
105
+ /**
106
+ * 切换多语言
107
+ */
108
+ async switchI18n(t) {
109
+ debugger;
110
+ await Se.switchI18n(t), t == "zh" && (this.locale = pl), t == "en" && (this.locale = vl), t == "hu" && (this.locale = fl);
111
+ }
112
+ //#endregion
113
+ }
114
+ class Cl {
115
+ constructor() {
116
+ /**
117
+ * 目前系统中正在运行的首页组件
118
+ */
119
+ G(this, "pages", {});
120
+ /**
121
+ * 目前系统中注册的所有组件
122
+ */
123
+ G(this, "comps", []);
124
+ }
125
+ /**
126
+ * 初始化&注册全局组件
127
+ */
128
+ init(t) {
129
+ this.register(t, /* @__PURE__ */ Object.assign({ "../coms/controls/Autocomplete.vue": () => import("./Autocomplete-DIucpEpj.js"), "../coms/controls/Cascader.vue": () => import("./Cascader-F_XWwXKY.js"), "../coms/controls/Checkbox.vue": () => import("./Checkbox-ipHs0O-8.js"), "../coms/controls/Code.vue": () => import("./Code-LeguA9RL.js"), "../coms/controls/Color.vue": () => import("./Color-Da69pnQg.js"), "../coms/controls/Compare.vue": () => import("./Compare-DZVrBYEh.js"), "../coms/controls/Date.vue": () => import("./Date-CNOCOcNz.js"), "../coms/controls/DateRange.vue": () => import("./DateRange-CaIiObxN.js"), "../coms/controls/DateTime.vue": () => import("./DateTime-CH6J1GoP.js"), "../coms/controls/DateTimeRange.vue": () => import("./DateTimeRange-DGobnXqs.js"), "../coms/controls/Decimal.vue": () => import("./Decimal-C38-N54B.js"), "../coms/controls/Email.vue": () => import("./Email-Dwa6x3jW.js"), "../coms/controls/Image.vue": () => import("./Image-DDK05SW7.js"), "../coms/controls/Index.vue": () => import("./Index-Bpe7pY2Z.js"), "../coms/controls/Int.vue": () => import("./Int-C0ijmdYS.js"), "../coms/controls/Markdown.vue": () => import("./Markdown-BzMP3m7o.js"), "../coms/controls/Month.vue": () => import("./Month-CKkjwzza.js"), "../coms/controls/Password.vue": () => import("./Password-DuyYEgzR.js"), "../coms/controls/Progress.vue": () => import("./Progress-C3D821AQ.js"), "../coms/controls/Radio.vue": () => import("./Radio-DkcBKBvX.js"), "../coms/controls/Rate.vue": () => import("./Rate-B7jKTFKT.js"), "../coms/controls/RichText.vue": () => import("./RichText-CNahMrfb.js"), "../coms/controls/Select.vue": () => import("./Select-BeNZqAP1.js"), "../coms/controls/Switch.vue": () => import("./Switch-DhFaku5L.js"), "../coms/controls/Text.vue": () => import("./Text-BAw88r5O.js"), "../coms/controls/Textarea.vue": () => import("./Textarea-D9TgF9ig.js"), "../coms/controls/Time.vue": () => import("./Time-Dd-Trib4.js"), "../coms/controls/Upload.vue": () => import("./Upload-Ozg_nOpI.js"), "../coms/controls/Year.vue": () => import("./Year-D7XGe2So.js") }), "../../halo-pc/coms/controls/", "control"), this.register(t, /* @__PURE__ */ Object.assign({ "../coms/lists/Calender.vue": () => import("./Calender-DhKZyJri.js"), "../coms/lists/Racebar.vue": () => import("./Racebar-BsgDK6Zf.js"), "../coms/lists/Statistic.vue": () => import("./Statistic-B9ZcUUk1.js"), "../coms/lists/Stock.vue": () => import("./Stock-BiSr7zAF.js"), "../coms/lists/Timeline.vue": () => import("./Timeline-D6LCIkQp.js"), "../coms/lists/Tree.vue": () => import("./Tree-D-v632h1.js") }), "../../halo-pc/coms/lists/", "list"), this.register(t, /* @__PURE__ */ Object.assign({ "../coms/pagings/Article.vue": () => import("./Article-CTqryR4L.js"), "../coms/pagings/Code.vue": () => import("./Code-JtSSnUWC.js"), "../coms/pagings/DataExport.vue": () => import("./DataExport-DSz5371s.js"), "../coms/pagings/DataImport.vue": () => import("./DataImport-CX7G70a7.js"), "../coms/pagings/File.vue": () => import("./File-BEBElTSS.js"), "../coms/pagings/Index.vue": () => import("./Index-BiF8qEWf.js"), "../coms/pagings/SearchFooter.vue": () => import("./SearchFooter-DiILcc_U.js"), "../coms/pagings/SearchForm.vue": () => import("./SearchForm-BOw_kHs2.js"), "../coms/pagings/Table.vue": () => import("./Table-e0uLPRLG.js") }), "../../halo-pc/coms/pagings/", "paging"), this.register(t, /* @__PURE__ */ Object.assign({ "../coms/partials/ArticleFooter.vue": () => import("./ArticleFooter-BumGH5nC.js"), "../coms/partials/Detail.vue": () => import("./Detail-DZJ0aUFr.js"), "../coms/partials/PagingHeader.vue": () => import("./PagingHeader-DWbFl1do.js"), "../coms/partials/PagingRow.vue": () => import("./PagingRow-CR2N1vgm.js"), "../coms/partials/TreeNode.vue": () => import("./TreeNode-L_A5ZKy0.js"), "../coms/partials/Update.vue": () => import("./Update-DRAFce7_.js"), "../coms/partials/UpdateChild.vue": () => import("./UpdateChild-DMC0FG4Z.js") }), "../../halo-pc/coms/partials/", "partial"), this.register(t, /* @__PURE__ */ Object.assign({ "../coms/searches/Autocomplete.vue": () => import("./Autocomplete-C9RS9-qw.js"), "../coms/searches/Daterange.vue": () => import("./Daterange-BUSKAGlK.js"), "../coms/searches/Index.vue": () => import("./Index-DqUNI6MV.js"), "../coms/searches/Int.vue": () => import("./Int-BFv18KXi.js"), "../coms/searches/Month.vue": () => import("./Month-Bp_Pfi_b.js"), "../coms/searches/Select.vue": () => import("./Select-CqOE6uI8.js"), "../coms/searches/Text.vue": () => import("./Text-BDAob4mp.js") }), "../../halo-pc/coms/searches/", "search"), this.register(t, /* @__PURE__ */ Object.assign({ "../coms/singles/Code.vue": () => import("./Code-Q_6THgGl.js"), "../coms/singles/Comment.vue": () => import("./Comment-DIcCHP9F.js"), "../coms/singles/Index.vue": () => import("./Index-DPwdcUO4.js"), "../coms/singles/Normal.vue": () => import("./Normal-CYmy5sN7.js"), "../coms/singles/Statistic.vue": () => import("./Statistic-CTxHNeof.js"), "../coms/singles/Stock.vue": () => import("./Stock-BnBNtuo7.js"), "../coms/singles/Table.vue": () => import("./Table-CaH_zu8W.js"), "../coms/singles/Tree.vue": () => import("./Tree-BKmFZrK3.js"), "../coms/singles/Tree_Old.vue": () => import("./Tree_Old-h__WmqFA.js") }), "../../halo-pc/coms/singles/", "update"), this.register(t, /* @__PURE__ */ Object.assign({ "../coms/texts/Autocomplete.vue": () => import("./Autocomplete-BNx0bErM.js"), "../coms/texts/CSharp.vue": () => import("./CSharp-Dt6H75E9.js"), "../coms/texts/Cascader.vue": () => import("./Cascader-C6t8Q18c.js"), "../coms/texts/Checkbox.vue": () => import("./Checkbox-C-iEGB0k.js"), "../coms/texts/Code.vue": () => import("./Code-DKtqow6y.js"), "../coms/texts/Color.vue": () => import("./Color-CfXtJFUo.js"), "../coms/texts/Compare.vue": () => import("./Compare-Dzqm7kPE.js"), "../coms/texts/Copy.vue": () => import("./Copy-iLieXx22.js"), "../coms/texts/Date.vue": () => import("./Date-ytWe2gz8.js"), "../coms/texts/DateRange.vue": () => import("./DateRange-DrYK_l0Y.js"), "../coms/texts/DateTime.vue": () => import("./DateTime-p6YgmtGd.js"), "../coms/texts/Decimal.vue": () => import("./Decimal-BvyzJq1c.js"), "../coms/texts/Dictionary.vue": () => import("./Dictionary-CsBiv-CI.js"), "../coms/texts/Email.vue": () => import("./Email-BKW9GRcH.js"), "../coms/texts/Index.vue": () => import("./Index-CuEyzMd0.js"), "../coms/texts/Int.vue": () => import("./Int-B-t8edhd.js"), "../coms/texts/Markdown.vue": () => import("./Markdown-x1hASyA-.js"), "../coms/texts/Month.vue": () => import("./Month-Bb0tgF-k.js"), "../coms/texts/Password.vue": () => import("./Password-yHtlY-Qa.js"), "../coms/texts/Progress.vue": () => import("./Progress-CKVzMO-W.js"), "../coms/texts/Radio.vue": () => import("./Radio-B3Af-uZE.js"), "../coms/texts/Rate.vue": () => import("./Rate-BmC4gw_0.js"), "../coms/texts/RichText.vue": () => import("./RichText-Bk0Msyhl.js"), "../coms/texts/Select.vue": () => import("./Select-BdYG1KQE.js"), "../coms/texts/Switch.vue": () => import("./Switch-BE4dQcja.js"), "../coms/texts/Text.vue": () => import("./Text-5803XWI6.js"), "../coms/texts/TextLink.vue": () => import("./TextLink-TYXcDAlo.js"), "../coms/texts/Textarea.vue": () => import("./Textarea-CU5PjIoa.js"), "../coms/texts/Upload.vue": () => import("./Upload-DJRh4a7g.js"), "../coms/texts/Year.vue": () => import("./Year-CpcMBvQ7.js") }), "../../halo-pc/coms/texts/", "text"), this.register(t, /* @__PURE__ */ Object.assign({ "../coms/controls/Autocomplete.vue": () => import("./Autocomplete-DIucpEpj.js"), "../coms/controls/Cascader.vue": () => import("./Cascader-F_XWwXKY.js"), "../coms/controls/Checkbox.vue": () => import("./Checkbox-ipHs0O-8.js"), "../coms/controls/Code.vue": () => import("./Code-LeguA9RL.js"), "../coms/controls/Color.vue": () => import("./Color-Da69pnQg.js"), "../coms/controls/Compare.vue": () => import("./Compare-DZVrBYEh.js"), "../coms/controls/Date.vue": () => import("./Date-CNOCOcNz.js"), "../coms/controls/DateRange.vue": () => import("./DateRange-CaIiObxN.js"), "../coms/controls/DateTime.vue": () => import("./DateTime-CH6J1GoP.js"), "../coms/controls/DateTimeRange.vue": () => import("./DateTimeRange-DGobnXqs.js"), "../coms/controls/Decimal.vue": () => import("./Decimal-C38-N54B.js"), "../coms/controls/Email.vue": () => import("./Email-Dwa6x3jW.js"), "../coms/controls/Image.vue": () => import("./Image-DDK05SW7.js"), "../coms/controls/Index.vue": () => import("./Index-Bpe7pY2Z.js"), "../coms/controls/Int.vue": () => import("./Int-C0ijmdYS.js"), "../coms/controls/Markdown.vue": () => import("./Markdown-BzMP3m7o.js"), "../coms/controls/Month.vue": () => import("./Month-CKkjwzza.js"), "../coms/controls/Password.vue": () => import("./Password-DuyYEgzR.js"), "../coms/controls/Progress.vue": () => import("./Progress-C3D821AQ.js"), "../coms/controls/Radio.vue": () => import("./Radio-DkcBKBvX.js"), "../coms/controls/Rate.vue": () => import("./Rate-B7jKTFKT.js"), "../coms/controls/RichText.vue": () => import("./RichText-CNahMrfb.js"), "../coms/controls/Select.vue": () => import("./Select-BeNZqAP1.js"), "../coms/controls/Switch.vue": () => import("./Switch-DhFaku5L.js"), "../coms/controls/Text.vue": () => import("./Text-BAw88r5O.js"), "../coms/controls/Textarea.vue": () => import("./Textarea-D9TgF9ig.js"), "../coms/controls/Time.vue": () => import("./Time-Dd-Trib4.js"), "../coms/controls/Upload.vue": () => import("./Upload-Ozg_nOpI.js"), "../coms/controls/Year.vue": () => import("./Year-D7XGe2So.js") }), "../coms/controls/", "control"), this.register(t, /* @__PURE__ */ Object.assign({ "../coms/lists/Calender.vue": () => import("./Calender-DhKZyJri.js"), "../coms/lists/Racebar.vue": () => import("./Racebar-BsgDK6Zf.js"), "../coms/lists/Statistic.vue": () => import("./Statistic-B9ZcUUk1.js"), "../coms/lists/Stock.vue": () => import("./Stock-BiSr7zAF.js"), "../coms/lists/Timeline.vue": () => import("./Timeline-D6LCIkQp.js"), "../coms/lists/Tree.vue": () => import("./Tree-D-v632h1.js") }), "../coms/lists/", "list"), this.register(t, /* @__PURE__ */ Object.assign({ "../coms/pagings/Article.vue": () => import("./Article-CTqryR4L.js"), "../coms/pagings/Code.vue": () => import("./Code-JtSSnUWC.js"), "../coms/pagings/DataExport.vue": () => import("./DataExport-DSz5371s.js"), "../coms/pagings/DataImport.vue": () => import("./DataImport-CX7G70a7.js"), "../coms/pagings/File.vue": () => import("./File-BEBElTSS.js"), "../coms/pagings/Index.vue": () => import("./Index-BiF8qEWf.js"), "../coms/pagings/SearchFooter.vue": () => import("./SearchFooter-DiILcc_U.js"), "../coms/pagings/SearchForm.vue": () => import("./SearchForm-BOw_kHs2.js"), "../coms/pagings/Table.vue": () => import("./Table-e0uLPRLG.js") }), "../coms/pagings/", "paging"), this.register(t, /* @__PURE__ */ Object.assign({ "../coms/partials/ArticleFooter.vue": () => import("./ArticleFooter-BumGH5nC.js"), "../coms/partials/Detail.vue": () => import("./Detail-DZJ0aUFr.js"), "../coms/partials/PagingHeader.vue": () => import("./PagingHeader-DWbFl1do.js"), "../coms/partials/PagingRow.vue": () => import("./PagingRow-CR2N1vgm.js"), "../coms/partials/TreeNode.vue": () => import("./TreeNode-L_A5ZKy0.js"), "../coms/partials/Update.vue": () => import("./Update-DRAFce7_.js"), "../coms/partials/UpdateChild.vue": () => import("./UpdateChild-DMC0FG4Z.js") }), "../coms/partials/", "partial"), this.register(t, /* @__PURE__ */ Object.assign({ "../coms/searches/Autocomplete.vue": () => import("./Autocomplete-C9RS9-qw.js"), "../coms/searches/Daterange.vue": () => import("./Daterange-BUSKAGlK.js"), "../coms/searches/Index.vue": () => import("./Index-DqUNI6MV.js"), "../coms/searches/Int.vue": () => import("./Int-BFv18KXi.js"), "../coms/searches/Month.vue": () => import("./Month-Bp_Pfi_b.js"), "../coms/searches/Select.vue": () => import("./Select-CqOE6uI8.js"), "../coms/searches/Text.vue": () => import("./Text-BDAob4mp.js") }), "../coms/searches/", "search"), this.register(t, /* @__PURE__ */ Object.assign({ "../coms/singles/Code.vue": () => import("./Code-Q_6THgGl.js"), "../coms/singles/Comment.vue": () => import("./Comment-DIcCHP9F.js"), "../coms/singles/Index.vue": () => import("./Index-DPwdcUO4.js"), "../coms/singles/Normal.vue": () => import("./Normal-CYmy5sN7.js"), "../coms/singles/Statistic.vue": () => import("./Statistic-CTxHNeof.js"), "../coms/singles/Stock.vue": () => import("./Stock-BnBNtuo7.js"), "../coms/singles/Table.vue": () => import("./Table-CaH_zu8W.js"), "../coms/singles/Tree.vue": () => import("./Tree-BKmFZrK3.js"), "../coms/singles/Tree_Old.vue": () => import("./Tree_Old-h__WmqFA.js") }), "../coms/singles/", "update"), this.register(t, /* @__PURE__ */ Object.assign({ "../coms/texts/Autocomplete.vue": () => import("./Autocomplete-BNx0bErM.js"), "../coms/texts/CSharp.vue": () => import("./CSharp-Dt6H75E9.js"), "../coms/texts/Cascader.vue": () => import("./Cascader-C6t8Q18c.js"), "../coms/texts/Checkbox.vue": () => import("./Checkbox-C-iEGB0k.js"), "../coms/texts/Code.vue": () => import("./Code-DKtqow6y.js"), "../coms/texts/Color.vue": () => import("./Color-CfXtJFUo.js"), "../coms/texts/Compare.vue": () => import("./Compare-Dzqm7kPE.js"), "../coms/texts/Copy.vue": () => import("./Copy-iLieXx22.js"), "../coms/texts/Date.vue": () => import("./Date-ytWe2gz8.js"), "../coms/texts/DateRange.vue": () => import("./DateRange-DrYK_l0Y.js"), "../coms/texts/DateTime.vue": () => import("./DateTime-p6YgmtGd.js"), "../coms/texts/Decimal.vue": () => import("./Decimal-BvyzJq1c.js"), "../coms/texts/Dictionary.vue": () => import("./Dictionary-CsBiv-CI.js"), "../coms/texts/Email.vue": () => import("./Email-BKW9GRcH.js"), "../coms/texts/Index.vue": () => import("./Index-CuEyzMd0.js"), "../coms/texts/Int.vue": () => import("./Int-B-t8edhd.js"), "../coms/texts/Markdown.vue": () => import("./Markdown-x1hASyA-.js"), "../coms/texts/Month.vue": () => import("./Month-Bb0tgF-k.js"), "../coms/texts/Password.vue": () => import("./Password-yHtlY-Qa.js"), "../coms/texts/Progress.vue": () => import("./Progress-CKVzMO-W.js"), "../coms/texts/Radio.vue": () => import("./Radio-B3Af-uZE.js"), "../coms/texts/Rate.vue": () => import("./Rate-BmC4gw_0.js"), "../coms/texts/RichText.vue": () => import("./RichText-Bk0Msyhl.js"), "../coms/texts/Select.vue": () => import("./Select-BdYG1KQE.js"), "../coms/texts/Switch.vue": () => import("./Switch-BE4dQcja.js"), "../coms/texts/Text.vue": () => import("./Text-5803XWI6.js"), "../coms/texts/TextLink.vue": () => import("./TextLink-TYXcDAlo.js"), "../coms/texts/Textarea.vue": () => import("./Textarea-CU5PjIoa.js"), "../coms/texts/Upload.vue": () => import("./Upload-DJRh4a7g.js"), "../coms/texts/Year.vue": () => import("./Year-CpcMBvQ7.js") }), "../coms/texts/", "text");
130
+ }
131
+ /**
132
+ * 注册全局异步或同步组件
133
+ * 支持同步组件的目的:异步组件在执行到mounted内容仍没挂载,反而会执行到父组件mounted事件,导致父组件拿不到子组件实际高度
134
+ */
135
+ register(t, o, s, n) {
136
+ let l = $t.getComponents(o, s, n);
137
+ Object.keys(l).forEach((r) => {
138
+ this.comps.push(r), t.component(r, l[r]);
139
+ });
140
+ }
141
+ /**
142
+ * 根据路由获取组件
143
+ */
144
+ getComponent(t, o, s = null) {
145
+ let n = $t.getName(t, o), l = this.comps.find((a) => a == n || a == n + "-index");
146
+ return l || (s ? `${o}-${s}` : null);
147
+ }
148
+ /**
149
+ * 添加页面
150
+ */
151
+ addPage(t, o) {
152
+ this.pages[t] = o;
153
+ }
154
+ /**
155
+ * 删除页面
156
+ */
157
+ removePage(t) {
158
+ delete this.pages[t];
159
+ }
160
+ }
161
+ class Vl {
162
+ /**
163
+ * 获取控件的值,自动区分搜索控件和提交表单控件
164
+ */
165
+ getValue(t, o, s, n) {
166
+ var a;
167
+ return (a = t[s.name][o]) == null ? void 0 : a[n.name];
168
+ }
169
+ /**
170
+ * 设置表单控件的值
171
+ */
172
+ setValue(t, o, s, n, l) {
173
+ let a = o[s.name][n];
174
+ a && (a[l.name] = t);
175
+ }
176
+ /**
177
+ * 设置多行中某字段的值
178
+ */
179
+ setRowsValue(t, o, s, n) {
180
+ let l = o[s.name];
181
+ for (let a = 0; a < l.length; a++)
182
+ l[a][n.name] = t;
183
+ }
184
+ /**
185
+ * 把数组分成每行columns列的数组
186
+ */
187
+ splitRows(t, o) {
188
+ let s = [];
189
+ for (let n = 0; n < t.length; n += o)
190
+ s.push(t.slice(n, n + o));
191
+ return s;
192
+ }
193
+ //region 控件相关,需要封装成类库
194
+ /**
195
+ * 获取不同布局控件配置,用于对控件的展示类型进行重写,但是不影响字段配置
196
+ */
197
+ getConfig(t, o, s) {
198
+ return s == "Table" && t.control.type == "Code" ? { control: { type: "Textarea" } } : null;
199
+ }
200
+ /**
201
+ * 获取控件样式
202
+ */
203
+ getStyle(t, o, s) {
204
+ let n = this.getHeight(t, o, s);
205
+ return n ? `height: ${n}px;` : null;
206
+ }
207
+ /**
208
+ * 获取控件高度
209
+ */
210
+ getHeight(t, o, s) {
211
+ return s == "Normal" ? t.control.height : null;
212
+ }
213
+ //endregion
214
+ /**
215
+ * 转换值为指定类型
216
+ */
217
+ convert(t, o) {
218
+ return o == "String" ? nt.isNumber(t) ? t == null ? void 0 : t.toString() : t : o == "Int" ? parseFloat(t) : t;
219
+ }
220
+ }
221
+ class Sl {
222
+ constructor() {
223
+ /**
224
+ * 一行的总列数
225
+ */
226
+ G(this, "columns", 6);
227
+ G(this, "dialog", {
228
+ /**
229
+ * 弹出对话框的宽度
230
+ */
231
+ width: "50%"
232
+ });
233
+ }
234
+ setColumn(t) {
235
+ this.columns = t;
236
+ }
237
+ setDialogWidth(t) {
238
+ this.dialog.width = t;
239
+ }
240
+ }
241
+ class Rl {
242
+ constructor() {
243
+ //#region 字段配置
244
+ /**
245
+ * 保存字段配置
246
+ */
247
+ G(this, "setColumnWidth", async (t, o, s, n) => {
248
+ let l = await storage.getEntity("page");
249
+ l || (l = {}), l[t] || (l[t] = {}), l[t][o] || (l[t][o] = {}), l[t][o][s] || (l[t][o][s] = {}), l[t][o][s].columnWidth = n, l[t].lastSetTime = tl.formatSecondTime(/* @__PURE__ */ new Date()), await storage.saveEntity("page", l);
250
+ });
251
+ //#endregion
252
+ /**
253
+ * 获取抽屉宽度,得到的结果是相对于整个页面的宽度
254
+ */
255
+ G(this, "getDrawerWidth", (t) => t <= 690 ? "90%" : t <= 960 ? "80%" : t <= 1200 ? "70%" : t <= 1600 ? "60%" : "50%");
256
+ /**
257
+ * 把字符串转换成实际类型。场景1: query字符串转换
258
+ */
259
+ G(this, "convert", (t, o) => o == "Int" ? parseInt(t) : o == "Decimal" ? parseFloat(t) : t);
260
+ }
261
+ }
262
+ class Ml {
263
+ constructor() {
264
+ //#region 属性
265
+ /**
266
+ * store中存储单独路由的目的是,防止类中导出对象,在npm包被引用的场景下,路由实例被创建2次,进而导致跳转失效
267
+ */
268
+ G(this, "router");
269
+ }
270
+ //#endregion
271
+ //#region 开启
272
+ open(t) {
273
+ this.router = hl({
274
+ history: gl(t),
275
+ routes: [],
276
+ parseQuery(o) {
277
+ return de.deserializeQs(o);
278
+ },
279
+ stringifyQuery(o) {
280
+ return de.serialize(o);
281
+ }
282
+ });
283
+ }
284
+ //#endregion
285
+ /**
286
+ * 跳转到指定地址,并返回跳转后的地址,要使用vue-route路由跳转,否则刷新页面后,参数会被解码
287
+ */
288
+ to(t, o = !0) {
289
+ if (!t)
290
+ return null;
291
+ let s = de.getToUrl(t, o);
292
+ return this.router.push(s), s;
293
+ }
294
+ /**
295
+ * 跳转到后退地址
296
+ */
297
+ toBackUrl() {
298
+ let t = de.getBackUrl();
299
+ t && this.router.push(t);
300
+ }
301
+ /**
302
+ * 添加路由集合
303
+ */
304
+ addRoutes(t) {
305
+ t.forEach((o) => {
306
+ this.router.addRoute(o);
307
+ });
308
+ }
309
+ }
310
+ class Ul {
311
+ constructor() {
312
+ //#region 分割行
313
+ /**
314
+ * 把数组中的元素按照列数,分割成多行,并且计算好每列的列宽
315
+ */
316
+ G(this, "getLines", (t, o, s, n) => {
317
+ let l = [];
318
+ if (o == 0)
319
+ return l;
320
+ let a = [], r = 0;
321
+ for (let i = 0; i < t.length; i++) {
322
+ let p = t[i], c = Math.ceil(24 / o * n(p));
323
+ c > 24 && (c = 24), r += c, r <= 24 ? a.push({ data: s(p), span: c, index: i }) : (l.push(a), a = [], a.push({ data: s(p), span: c, index: i }), r = c), i == t.length - 1 && l.push(a);
324
+ }
325
+ return l;
326
+ });
327
+ //#endregion
328
+ /**
329
+ * 获取表的默认行数据
330
+ */
331
+ G(this, "getDefaultRow", (t) => {
332
+ let o = {};
333
+ for (let s = 0; s < t.show.length; s++) {
334
+ let n = t.show[s];
335
+ o[n.name] = n.default;
336
+ }
337
+ return o;
338
+ });
339
+ //#region 展开
340
+ /**
341
+ * 获取所有数据表的搜索字段信息
342
+ */
343
+ G(this, "expandSearch", (t) => {
344
+ let o = [];
345
+ for (let s = 0; s < t.length; s++) {
346
+ let n = t[s];
347
+ n.search.forEach((l) => {
348
+ l.table = n, o.push(l);
349
+ });
350
+ }
351
+ return o;
352
+ });
353
+ /**
354
+ * 展开数据和架构信息
355
+ */
356
+ G(this, "expandSet", (t, o) => {
357
+ if (!t)
358
+ return o;
359
+ for (let s = 0; s < t.length; s++) {
360
+ let n = t[s], l = o[n.name];
361
+ if (l)
362
+ for (let a = 0; a < l.length; a++) {
363
+ const r = l[a];
364
+ r[`Old_${n.key}`] = r[n.key];
365
+ }
366
+ }
367
+ return o;
368
+ });
369
+ /**
370
+ * 展开架构信息
371
+ */
372
+ G(this, "expandSchema", (t, o) => {
373
+ var s;
374
+ if (!t)
375
+ return t;
376
+ for (let n of t) {
377
+ for (let a of n.fields) {
378
+ let r = [];
379
+ if (a.control.required && r.push({ required: !0, message: `${a.label}不能为空`, trigger: "change" }), a.length && a.type == "String") {
380
+ let p = {
381
+ max: a.length,
382
+ message: `${a.label}不能超过${a.length}个字符`,
383
+ trigger: "change"
384
+ };
385
+ r.push(p);
386
+ }
387
+ a.rules = r;
388
+ let i = (s = a.control.tooltip) == null ? void 0 : s.fields;
389
+ if (i != null && i.length > 0) {
390
+ let p = o[n.name];
391
+ for (let c of p)
392
+ this.updateTooltipByFields(n.name, c, [a]);
393
+ }
394
+ }
395
+ if (n.show) {
396
+ let a = [];
397
+ for (let r of n.show) {
398
+ let i = r.name ?? r, p = n.fields.find((c) => c.name == i);
399
+ a.push(p);
400
+ }
401
+ n.show = a;
402
+ }
403
+ n.search = n.fields.filter((a) => a.search != null);
404
+ let l = n.key.name ?? n.key;
405
+ n.key = n.fields.find((a) => a.name == l);
406
+ }
407
+ return t;
408
+ });
409
+ //#endregion
410
+ /**
411
+ * 填充搜索条件中不存在的搜索条件表单
412
+ */
413
+ G(this, "getConditionForm", (t, o) => {
414
+ let s = {};
415
+ if (o && (s = It.decodeObj(o)), !t)
416
+ return s;
417
+ for (let n = 0; n < t.length; n++) {
418
+ let l = t[n];
419
+ s[l.name] || (s[l.name] = {});
420
+ for (let a = 0; a < l.search.length; a++) {
421
+ const r = l.search[a];
422
+ s[l.name][r.name] == null && (s[l.name][r.name] = null);
423
+ }
424
+ }
425
+ return s;
426
+ });
427
+ }
428
+ //#endregion
429
+ //#region 提示
430
+ /**
431
+ * 更新提示内容
432
+ */
433
+ async updateTooltip(t, o, s) {
434
+ let n = t.fields.filter((l) => {
435
+ var a, r;
436
+ return (r = (a = l.control.tooltip) == null ? void 0 : a.fields) == null ? void 0 : r.includes(s.name);
437
+ });
438
+ n == null || n.length == 0 || this.updateTooltipByFields(t.name, o, n);
439
+ }
440
+ /**
441
+ * 更新提示内容
442
+ */
443
+ updateTooltipByFields(t, o, s) {
444
+ if (s.length != 0)
445
+ for (let n of s) {
446
+ let l = n.control.tooltip, a = `${t}.${n.name}.tooltip`;
447
+ for (let p of l.fields)
448
+ a += `.${o[p]}`;
449
+ let r = j(a), i = rt.deserialize(r);
450
+ i == null ? (l.title = null, l.content = null) : (l.title = i.title, l.content = rt.serializeWithoutString(i.content));
451
+ }
452
+ }
453
+ //#endregion
454
+ //#region 验证
455
+ /**
456
+ * 获取验证规则
457
+ */
458
+ getRules(t, o, s, n) {
459
+ let l = [];
460
+ if (s.rules.length > 0 && l.push(...s.rules), t.length == 0)
461
+ return l;
462
+ let a = t.filter((r) => r.table == o.name && r.index == n && r.fields.indexOf(s.name) > -1);
463
+ if (a.length == 0)
464
+ return l;
465
+ for (let r = 0; r < a.length; r++) {
466
+ let p = {
467
+ message: `${a[r].message}`,
468
+ trigger: "change",
469
+ validator(c, g, v) {
470
+ v(new Error());
471
+ }
472
+ };
473
+ l.push(p);
474
+ }
475
+ return l;
476
+ }
477
+ }
478
+ class Dl {
479
+ constructor() {
480
+ /**
481
+ * 获取文件图标
482
+ */
483
+ G(this, "getFileIcon", (t) => `./default/images/files/${ll.getExtension(t).replace(".", "")}.png`);
484
+ }
485
+ }
486
+ class zl {
487
+ constructor() {
488
+ //#region 属性
489
+ /**
490
+ * 存储所有窗口
491
+ */
492
+ G(this, "windows", []);
493
+ }
494
+ //#endregion
495
+ /**
496
+ * 加载窗口
497
+ */
498
+ async loadWindows(t) {
499
+ let o = await t.getAsync("windows");
500
+ o && (this.windows = o);
501
+ }
502
+ /**
503
+ * 获取窗口状态
504
+ */
505
+ get(t) {
506
+ return this.windows.find((s) => s.id == t);
507
+ }
508
+ /**
509
+ * 保存窗口状态
510
+ */
511
+ async save(t, o, s) {
512
+ let n = this.windows.find((l) => l.id == t);
513
+ if (n) {
514
+ let l = this.windows.indexOf(n);
515
+ this.windows[l] = o;
516
+ } else
517
+ this.windows.push(o);
518
+ s && await s.saveAsync("windows", this.windows);
519
+ }
520
+ /**
521
+ * 删除窗口
522
+ */
523
+ remove(t) {
524
+ let o = this.windows.find((s) => s.id == t);
525
+ Ue.remove(this.windows, o);
526
+ }
527
+ }
528
+ let Il = async () => {
529
+ Bt = new Rl(), ut = dl(new $l()), Ve = new Cl(), Tl = new Vl(), Ll = new Sl(), me = new Ml(), El = new Ul(), Pl = new Dl(), Oe = new zl();
530
+ }, ut = {}, Ve = {}, Tl = {}, Ll = {}, Bt = {}, me = {}, El = {}, Pl = {}, Oe = {};
531
+ const Ol = {
532
+ key: 0,
533
+ class: "fa fa-copy"
534
+ }, Bl = {
535
+ key: 1,
536
+ class: "fa fa-plus"
537
+ }, Nl = {
538
+ key: 0,
539
+ class: "fa fa-edit btn-icon"
540
+ }, Wl = {
541
+ key: 1,
542
+ class: "fa fa-plus"
543
+ }, Al = /* @__PURE__ */ f("i", { class: "fa fa-eye" }, null, -1), Hl = /* @__PURE__ */ f("i", { class: "fa fa-copy" }, null, -1), jl = /* @__PURE__ */ f("i", { class: "fa fa-trash-alt" }, null, -1), Fl = /* @__PURE__ */ f("i", { class: "fa fa-list" }, null, -1), Dt = /* @__PURE__ */ Y({
544
+ __name: "Crud",
545
+ props: /* @__PURE__ */ Re({
546
+ module: {},
547
+ readonly: { type: Boolean },
548
+ size: {},
549
+ to: {}
550
+ }, {
551
+ modelValue: {},
552
+ modelModifiers: {}
553
+ }),
554
+ emits: /* @__PURE__ */ Re(["succeed"], ["update:modelValue"]),
555
+ setup(_, { emit: t }) {
556
+ let o = t, s = _, { readonly: n, module: l, size: a, to: r } = oe(s), i = Be(_, "modelValue"), p = x({ url: null, type: null, name: null, visible: !1 }), c = (U) => {
557
+ g(U);
558
+ }, g = (U) => {
559
+ p.value.url = U, p.value.visible = !0;
560
+ }, v = () => {
561
+ n.value ? i.value ? g(`/${l.value}/copy?id=${i.value}`) : g(`/${l.value}/insert`) : i.value ? g(`/${l.value}/update?id=${i.value}`) : g(`/${l.value}/insert`);
562
+ }, w = (U) => {
563
+ p.value.type = U.module.type, p.value.name = U.module.name;
564
+ }, T = async (U) => {
565
+ p.value.visible = !1, o("succeed", U, p.value.name);
566
+ };
567
+ return (U, A) => {
568
+ const S = B("el-dropdown-item"), P = B("el-dropdown-menu"), C = B("el-dropdown"), O = B("el-drawer");
569
+ return u(), y(K, null, [
570
+ k(C, {
571
+ "split-button": "",
572
+ size: e(a),
573
+ onCommand: e(c),
574
+ onClick: e(v)
575
+ }, {
576
+ dropdown: h(() => [
577
+ k(P, null, {
578
+ default: h(() => [
579
+ e(i) ? (u(), z(S, {
580
+ key: 0,
581
+ command: `/${e(l)}/detail?id=${e(i)}`
582
+ }, {
583
+ default: h(() => [
584
+ Al,
585
+ H("详情 ")
586
+ ]),
587
+ _: 1
588
+ }, 8, ["command"])) : N("", !0),
589
+ e(i) && !e(n) ? (u(), z(S, {
590
+ key: 1,
591
+ command: `/${e(l)}/copy?id=${e(i)}`
592
+ }, {
593
+ default: h(() => [
594
+ Hl,
595
+ H("复制 ")
596
+ ]),
597
+ _: 1
598
+ }, 8, ["command"])) : N("", !0),
599
+ e(i) && !e(n) ? (u(), z(S, {
600
+ key: 2,
601
+ command: `/${e(l)}/delete?id=${e(i)}`
602
+ }, {
603
+ default: h(() => [
604
+ jl,
605
+ H("删除 ")
606
+ ]),
607
+ _: 1
608
+ }, 8, ["command"])) : N("", !0),
609
+ k(S, {
610
+ command: `/${e(l)}/paging`
611
+ }, {
612
+ default: h(() => [
613
+ Fl,
614
+ H("列表")
615
+ ]),
616
+ _: 1
617
+ }, 8, ["command"]),
618
+ ee(U.$slots, "default")
619
+ ]),
620
+ _: 3
621
+ })
622
+ ]),
623
+ default: h(() => [
624
+ e(n) ? (u(), y(K, { key: 0 }, [
625
+ e(i) ? (u(), y("i", Ol)) : (u(), y("i", Bl))
626
+ ], 64)) : (u(), y(K, { key: 1 }, [
627
+ e(i) ? (u(), y("i", Nl)) : (u(), y("i", Wl))
628
+ ], 64))
629
+ ]),
630
+ _: 3
631
+ }, 8, ["size", "onCommand", "onClick"]),
632
+ (u(), z(mt, {
633
+ to: e(r),
634
+ disabled: !e(r)
635
+ }, [
636
+ k(O, {
637
+ title: e(Ze)(e(p).type, e(p).name),
638
+ size: "60%",
639
+ modelValue: e(p).visible,
640
+ "onUpdate:modelValue": A[0] || (A[0] = (W) => e(p).visible = W)
641
+ }, {
642
+ default: h(() => [
643
+ e(p).url ? (u(), z(e(Ee), {
644
+ key: 0,
645
+ ref: "pageRef",
646
+ url: e(p).url,
647
+ onLoaded: e(w),
648
+ onSucceed: e(T),
649
+ onClose: e(T)
650
+ }, null, 8, ["url", "onLoaded", "onSucceed", "onClose"])) : N("", !0)
651
+ ]),
652
+ _: 1
653
+ }, 8, ["title", "modelValue"])
654
+ ], 8, ["to", "disabled"]))
655
+ ], 64);
656
+ };
657
+ }
658
+ }), ql = /* @__PURE__ */ Y({
659
+ __name: "Form",
660
+ props: {
661
+ id: {},
662
+ store: {},
663
+ form: {}
664
+ },
665
+ emits: ["loaded"],
666
+ setup(_, { emit: t }) {
667
+ let o = t, s = _, { id: n, store: l, form: a } = oe(s), r;
668
+ return fe(async () => {
669
+ r = await Ne.provider.getDefault(l.value);
670
+ let i = await r.getAsync(n.value);
671
+ i && ke.mergeTo(a.value, i), o("loaded", a.value);
672
+ }), _e(() => a.value, (i, p) => {
673
+ r && r.saveAsync(n.value, a.value);
674
+ }, { deep: !0 }), (i, p) => ee(i.$slots, "default");
675
+ }
676
+ }), Yl = { class: "option-text" }, Xl = { class: "option-suffix" }, Kl = { class: "option-text" }, Jl = { class: "option-suffix" }, Gl = { class: "option-text" }, Ql = { class: "option-suffix" }, Zl = /* @__PURE__ */ Y({
677
+ __name: "Driver",
678
+ props: {
679
+ id: {},
680
+ readonly: { type: Boolean, default: !1 },
681
+ label: { type: Boolean, default: !0 },
682
+ class: {},
683
+ width: { default: 80 },
684
+ inline: { type: Boolean },
685
+ kind: {},
686
+ form: {}
687
+ },
688
+ emits: ["loaded", "change", "succeed"],
689
+ setup(_, { expose: t, emit: o }) {
690
+ let s = o, n = _, { id: l, form: a, inline: r, label: i, width: p, readonly: c, kind: g } = oe(n), v = x([]), w = x(), T = x(), U = async (X) => {
691
+ let L = xe.apps.find((F) => F.value == X);
692
+ await W(X, a.value.env), P(a.value.name), te(), s("change", "app", X, L);
693
+ }, A = async (X) => {
694
+ let L = xe.envs.find((F) => F.value == X);
695
+ await W(a.value.app, X), P(a.value.name), te(), s("change", "env", X, L);
696
+ }, S = (X) => {
697
+ P(X);
698
+ }, P = (X) => {
699
+ let L = v.value.find((F) => F.text == X);
700
+ if (L == null) {
701
+ a.value.id = null, a.value.name = null, a.value.type = null;
702
+ return;
703
+ }
704
+ a.value.id = L.value, a.value.type = L.suffix;
705
+ }, C = async (X) => {
706
+ xe.loadApps(!0).then(), await W(a.value.app, a.value.env), te();
707
+ }, O = (X, L) => {
708
+ if (!T.value)
709
+ return !1;
710
+ T.value.keyboard(X, L);
711
+ }, W = async (X, L) => {
712
+ if (!g.value)
713
+ return;
714
+ let F = {
715
+ conditions: [
716
+ { name: "App", value: X },
717
+ { name: "Env", value: L },
718
+ { name: "Kind", value: g.value }
719
+ ]
720
+ };
721
+ return et.post("/app/driver", F).then((ue) => {
722
+ v.value = ue.data;
723
+ });
724
+ }, te = () => {
725
+ s("loaded", xe.apps, xe.envs, v.value);
726
+ }, se = async () => {
727
+ await Promise.all([xe.loadApps(), xe.loadEnvs(), W(a.value.app, a.value.env)]), te();
728
+ };
729
+ fe(() => {
730
+ l.value || se();
731
+ });
732
+ let ae = ie(() => he.getClass(n.class, c.value ? "readonly" : null, r.value ? "inline" : null));
733
+ return _e(() => a.value.id, (X, L) => {
734
+ let F = v.value.find((ue) => ue.value == X);
735
+ s("change", "name", a.value.name, F);
736
+ }), t({ keyboard: O }), (X, L) => {
737
+ const F = B("el-option"), ue = B("el-select"), D = B("el-form-item"), m = B("el-form");
738
+ return u(), y(K, null, [
739
+ e(l) ? (u(), z(ql, {
740
+ key: 0,
741
+ store: "driver",
742
+ id: e(l),
743
+ form: e(a),
744
+ onLoaded: e(se)
745
+ }, null, 8, ["id", "form", "onLoaded"])) : N("", !0),
746
+ k(m, {
747
+ ref_key: "driverRef",
748
+ ref: w,
749
+ class: ne(["ha-driver", e(ae)]),
750
+ inline: e(r),
751
+ "label-width": e(r) ? null : e(p)
752
+ }, {
753
+ default: h(() => [
754
+ k(D, {
755
+ class: "app",
756
+ label: e(i) ? "应用" : null
757
+ }, {
758
+ default: h(() => [
759
+ k(ue, {
760
+ filterable: "",
761
+ clearable: "",
762
+ placeholder: "请选择应用",
763
+ onChange: e(U),
764
+ modelValue: e(a).app,
765
+ "onUpdate:modelValue": L[0] || (L[0] = (I) => e(a).app = I)
766
+ }, {
767
+ default: h(() => [
768
+ (u(!0), y(K, null, re(e(xe).apps, (I) => (u(), z(F, {
769
+ label: `${I.text}(${I.suffix})`,
770
+ value: I.value,
771
+ key: I.value
772
+ }, {
773
+ default: h(() => [
774
+ f("span", Yl, M(I.text), 1),
775
+ f("span", Xl, "(" + M(I.suffix) + ")", 1)
776
+ ]),
777
+ _: 2
778
+ }, 1032, ["label", "value"]))), 128))
779
+ ]),
780
+ _: 1
781
+ }, 8, ["onChange", "modelValue"]),
782
+ e(c) ? N("", !0) : (u(), z(Dt, {
783
+ key: 0,
784
+ module: "ctl_app",
785
+ onSucceed: e(C),
786
+ modelValue: e(a).app,
787
+ "onUpdate:modelValue": L[1] || (L[1] = (I) => e(a).app = I)
788
+ }, null, 8, ["onSucceed", "modelValue"]))
789
+ ]),
790
+ _: 1
791
+ }, 8, ["label"]),
792
+ k(D, {
793
+ class: "env",
794
+ label: e(i) ? "环境" : null
795
+ }, {
796
+ default: h(() => [
797
+ k(ue, {
798
+ clearable: "",
799
+ filterable: "",
800
+ placeholder: "请选择环境",
801
+ onChange: e(A),
802
+ modelValue: e(a).env,
803
+ "onUpdate:modelValue": L[2] || (L[2] = (I) => e(a).env = I)
804
+ }, {
805
+ default: h(() => [
806
+ (u(!0), y(K, null, re(e(xe).envs, (I) => (u(), z(F, {
807
+ value: I.value,
808
+ label: `${I.text}(${I.suffix})`,
809
+ key: I.value
810
+ }, {
811
+ default: h(() => [
812
+ f("span", Kl, M(I.text), 1),
813
+ f("span", Jl, "(" + M(I.suffix) + ")", 1)
814
+ ]),
815
+ _: 2
816
+ }, 1032, ["value", "label"]))), 128))
817
+ ]),
818
+ _: 1
819
+ }, 8, ["onChange", "modelValue"])
820
+ ]),
821
+ _: 1
822
+ }, 8, ["label"]),
823
+ e(g) ? (u(), z(D, {
824
+ key: 0,
825
+ class: "name",
826
+ label: e(i) ? e(Ce)("DriverKind", e(g)) : null
827
+ }, {
828
+ default: h(() => [
829
+ k(ue, {
830
+ clearable: "",
831
+ filterable: "",
832
+ placeholder: `请选择${e(Ce)("DriverKind", e(g))}`,
833
+ onChange: e(S),
834
+ modelValue: e(a).name,
835
+ "onUpdate:modelValue": L[3] || (L[3] = (I) => e(a).name = I)
836
+ }, {
837
+ default: h(() => [
838
+ (u(!0), y(K, null, re(e(v), (I) => (u(), z(F, {
839
+ value: I.text,
840
+ label: `${I.text}(${I.suffix})`,
841
+ key: I.value
842
+ }, {
843
+ default: h(() => [
844
+ ee(X.$slots, "driver", { option: I }, () => [
845
+ f("span", Gl, M(I.text), 1),
846
+ f("span", Ql, "(" + M(I.suffix) + ")", 1)
847
+ ])
848
+ ]),
849
+ _: 2
850
+ }, 1032, ["value", "label"]))), 128))
851
+ ]),
852
+ _: 3
853
+ }, 8, ["placeholder", "onChange", "modelValue"]),
854
+ e(c) ? N("", !0) : (u(), z(Dt, {
855
+ key: 0,
856
+ module: "ctl_driver",
857
+ onSucceed: e(C),
858
+ modelValue: e(a).id,
859
+ "onUpdate:modelValue": L[4] || (L[4] = (I) => e(a).id = I)
860
+ }, null, 8, ["onSucceed", "modelValue"]))
861
+ ]),
862
+ _: 3
863
+ }, 8, ["label"])) : N("", !0),
864
+ ee(X.$slots, "default")
865
+ ]),
866
+ _: 3
867
+ }, 8, ["class", "inline", "label-width"])
868
+ ], 64);
869
+ };
870
+ }
871
+ });
872
+ let eo = Me(() => import("./Column-BeQwafyN.js")), to = Me(() => import("./Custom-BGtEDHlD.js")), lo = Me(() => import("./Delete-BeFC0gjD.js")), oo = Me(() => import("./Index-DMnL8F7Y.js")), so = Me(() => import("./Paging-DpoBp7x_.js")), Je = Me(() => import("./Single-DqCIZBIB.js")), ao = Me(() => import("./List-CfQzWq_5.js"));
873
+ const no = {
874
+ components: {
875
+ CopyPage: Je,
876
+ ColumnPage: eo,
877
+ CustomPage: to,
878
+ DeletePage: lo,
879
+ DetailPage: Je,
880
+ IndexPage: oo,
881
+ InsertPage: Je,
882
+ PagingPage: so,
883
+ ListPage: ao,
884
+ UpdatePage: Je
885
+ }
886
+ }, Ee = /* @__PURE__ */ Y({
887
+ ...no,
888
+ __name: "Index",
889
+ props: {
890
+ url: {},
891
+ win: {}
892
+ },
893
+ emits: ["navigate", "loaded", "succeed", "close"],
894
+ setup(_, { expose: t, emit: o }) {
895
+ let s = o, n = _, { url: l, win: a } = oe(n), r = x(), i = x(), p = x(), c = x(!0), g = x(!0), v = x({ title: null, content: null }), w = x({ type: null, view: null }), T = new We(), U = "index-" + dt.getUniqueId(), A, S = () => {
896
+ var m;
897
+ if (g.value) {
898
+ O(l.value, !0);
899
+ return;
900
+ }
901
+ let D = (m = i.value) == null ? void 0 : m.refresh;
902
+ if (!D) {
903
+ tt.warning("请在子组件实现并暴露refresh方法来实现刷新功能");
904
+ return;
905
+ }
906
+ D();
907
+ }, P = (D) => {
908
+ var I;
909
+ let m = (I = i.value) == null ? void 0 : I.beforeClose;
910
+ m && m(D);
911
+ }, C = (D, m) => {
912
+ A = m, s("navigate", D);
913
+ }, O = (D, m = !1, I = null) => {
914
+ c.value = !0, g.value = m, v.value.title = null, v.value.content = null;
915
+ let ce = de.getUrl(D, { schema: "" });
916
+ et.get(ce).then((le) => {
917
+ p.value = le, g.value = !1, s("loaded", le.data), I && I(le);
918
+ }).catch((le) => {
919
+ throw v.value.title = le.message, v.value.content = le.stack, I && I(), le;
920
+ }).finally(() => {
921
+ c.value = !1;
922
+ });
923
+ }, W = (D, m) => {
924
+ me.toBackUrl(), s("succeed", D, m);
925
+ }, te = () => {
926
+ me.toBackUrl(), s("close");
927
+ }, se = (D) => {
928
+ c.value = !1, s("loaded", D);
929
+ }, ae = (D, m) => {
930
+ if (!i.value || !i.value.keyboard)
931
+ return !1;
932
+ i.value.keyboard(D, m);
933
+ }, X = (D) => {
934
+ if (!i.value || !i.value.handler)
935
+ return !1;
936
+ i.value.handler(D);
937
+ }, L = (D) => {
938
+ D[0].contentRect.width <= 650 ? r.value.classList.add("page--small") : r.value.classList.remove("page--small"), i.value && i.value.resize && i.value.resize(D[0]);
939
+ }, F = (D) => {
940
+ var le;
941
+ let m = Ve.getComponent(D, "view");
942
+ if (m) {
943
+ w.value.type = "custom", w.value.view = m, g.value = !1;
944
+ return;
945
+ }
946
+ let I = ["insert", "copy", "update", "detail", "paging", "list", "delete"], ce = (le = de.getLastSegment(D)) == null ? void 0 : le.toLowerCase();
947
+ if (I.includes(ce)) {
948
+ if (w.value.type = ce, !i.value) {
949
+ O(D, !0);
950
+ return;
951
+ }
952
+ if (!i.value.shouldLoad || !i.value.shouldLoad(D))
953
+ return;
954
+ let V = i.value.shouldSpin && i.value.shouldSpin(D);
955
+ O(D, V, A), A = null;
956
+ return;
957
+ }
958
+ w.value.type = "column", w.value.view = Ve.getComponent(D, "partial"), c.value = !1, g.value = !1;
959
+ };
960
+ F(l.value), fe(() => {
961
+ Ve.addPage(U, {}), T.resize(r.value, L);
962
+ }), pt(() => {
963
+ Ve.removePage(U), T.dispose();
964
+ });
965
+ let ue = ie(() => {
966
+ let D = de.getRoute(l.value);
967
+ return D.fullPath = l.value, D;
968
+ });
969
+ return _e(() => l.value, (D, m) => {
970
+ F(D);
971
+ }), t({ refresh: S, beforeClose: P, keyboard: ae, handler: X }), (D, m) => {
972
+ const I = B("custom-page"), ce = B("column-page");
973
+ return u(), y("div", {
974
+ ref_key: "rootRef",
975
+ ref: r,
976
+ class: "ha-page"
977
+ }, [
978
+ k(e(ol), {
979
+ modelValue: e(c),
980
+ "onUpdate:modelValue": m[0] || (m[0] = (le) => be(c) ? c.value = le : c = le)
981
+ }, null, 8, ["modelValue"]),
982
+ e(g) ? (u(), z(e(zo), {
983
+ key: 0,
984
+ title: e(v).title,
985
+ content: e(v).content,
986
+ onRetry: e(S)
987
+ }, null, 8, ["title", "content", "onRetry"])) : e(w).type == "custom" ? (u(), z(I, {
988
+ key: 1,
989
+ ref_key: "pageRef",
990
+ ref: i,
991
+ url: e(l),
992
+ win: e(a),
993
+ view: e(w).view,
994
+ onLoaded: e(se),
995
+ onNavigate: e(C)
996
+ }, null, 8, ["url", "win", "view", "onLoaded", "onNavigate"])) : e(w).type == "column" ? (u(), z(ce, {
997
+ key: 2,
998
+ ref_key: "pageRef",
999
+ ref: i,
1000
+ url: e(l),
1001
+ view: e(w).view,
1002
+ onLoaded: e(se),
1003
+ onNavigate: e(C)
1004
+ }, null, 8, ["url", "view", "onLoaded", "onNavigate"])) : (u(), z(Ae(`${e(w).type}-page`), {
1005
+ key: 3,
1006
+ ref_key: "pageRef",
1007
+ ref: i,
1008
+ url: e(l),
1009
+ base: e(p),
1010
+ route: e(ue),
1011
+ onNavigate: e(C),
1012
+ onLoad: e(O),
1013
+ onSucceed: e(W),
1014
+ onClose: e(te)
1015
+ }, null, 40, ["url", "base", "route", "onNavigate", "onLoad", "onSucceed", "onClose"]))
1016
+ ], 512);
1017
+ };
1018
+ }
1019
+ }), Oa = /* @__PURE__ */ Y({
1020
+ __name: "Drawer",
1021
+ props: /* @__PURE__ */ Re({
1022
+ to: {},
1023
+ url: {}
1024
+ }, {
1025
+ modelValue: { type: Boolean },
1026
+ modelModifiers: {}
1027
+ }),
1028
+ emits: /* @__PURE__ */ Re(["succeed", "navigate", "update:modelValue"], ["update:modelValue"]),
1029
+ setup(_, { emit: t }) {
1030
+ let o = t, s = _, { to: n, url: l } = oe(s), a = Be(_, "modelValue"), r = x({ type: null, name: null }), i = x(800), p = (v) => {
1031
+ r.value.type = v.module.type, r.value.name = v.module.name;
1032
+ }, c = (v) => {
1033
+ o("navigate", v);
1034
+ }, g = (v) => {
1035
+ o("update:modelValue", !1), o("succeed", v, r.value.name);
1036
+ };
1037
+ return (v, w) => {
1038
+ const T = B("el-drawer");
1039
+ return u(), z(mt, {
1040
+ to: e(n),
1041
+ disabled: !e(n)
1042
+ }, [
1043
+ k(T, {
1044
+ title: e(Ze)(e(r).type, e(r).name),
1045
+ size: e(Bt).getDrawerWidth(e(i)),
1046
+ modelValue: e(a),
1047
+ "onUpdate:modelValue": w[0] || (w[0] = (U) => be(a) ? a.value = U : a = U)
1048
+ }, {
1049
+ default: h(() => [
1050
+ e(l) ? (u(), z(e(Ee), {
1051
+ key: 0,
1052
+ ref: "pageRef",
1053
+ url: e(l),
1054
+ onLoaded: e(p),
1055
+ onNavigate: e(c),
1056
+ onSucceed: e(g),
1057
+ onClose: e(g)
1058
+ }, null, 8, ["url", "onLoaded", "onNavigate", "onSucceed", "onClose"])) : N("", !0)
1059
+ ]),
1060
+ _: 1
1061
+ }, 8, ["title", "size", "modelValue"])
1062
+ ], 8, ["to", "disabled"]);
1063
+ };
1064
+ }
1065
+ }), ro = {
1066
+ key: 0,
1067
+ class: "desktop-feedback"
1068
+ }, io = /* @__PURE__ */ f("i", { class: "fa fa-plus" }, null, -1), uo = /* @__PURE__ */ f("i", { class: "fa fa-list" }, null, -1), co = /* @__PURE__ */ Y({
1069
+ __name: "Feedback",
1070
+ props: {
1071
+ bottom: Number
1072
+ },
1073
+ setup(_, { expose: t }) {
1074
+ let o = x({ visible: !1, current: "add", type: null, name: null, url: null }), s = x(), n = _, { bottom: l } = oe(n), a = (c) => {
1075
+ o.value.url = c;
1076
+ }, r = () => {
1077
+ o.value.visible = !1;
1078
+ }, i = (c) => {
1079
+ o.value.type = c.module.type, o.value.name = c.module.name;
1080
+ };
1081
+ return t({ show: (c, g) => {
1082
+ o.value.current = c, o.value.url = g, o.value.visible = !0;
1083
+ } }), (c, g) => e(o).visible ? (u(), y("div", ro, [
1084
+ k(e(_t), {
1085
+ ref_key: "feedbackRef",
1086
+ ref: s,
1087
+ id: "feedback",
1088
+ title: e(Ze)(e(o).type, e(o).name),
1089
+ bottom: e(l),
1090
+ onClose: e(r),
1091
+ modelValue: e(o).visible,
1092
+ "onUpdate:modelValue": g[3] || (g[3] = (v) => e(o).visible = v)
1093
+ }, {
1094
+ side: h(() => [
1095
+ k(e(jt), {
1096
+ modelValue: e(o).current,
1097
+ "onUpdate:modelValue": g[2] || (g[2] = (v) => e(o).current = v)
1098
+ }, {
1099
+ default: h(() => [
1100
+ k(e(Qe), {
1101
+ name: "add",
1102
+ onClick: g[0] || (g[0] = (v) => e(a)("/ctl_feedback/insert"))
1103
+ }, {
1104
+ default: h(() => [
1105
+ io,
1106
+ H(" " + M(e(j)("feedback.create")), 1)
1107
+ ]),
1108
+ _: 1
1109
+ }),
1110
+ k(e(Qe), {
1111
+ name: "my",
1112
+ onClick: g[1] || (g[1] = (v) => e(a)("/ctl_feedback/paging"))
1113
+ }, {
1114
+ default: h(() => [
1115
+ uo,
1116
+ H(" " + M(e(j)("feedback.my_feedback")), 1)
1117
+ ]),
1118
+ _: 1
1119
+ })
1120
+ ]),
1121
+ _: 1
1122
+ }, 8, ["modelValue"])
1123
+ ]),
1124
+ default: h(() => [
1125
+ e(o).url ? (u(), z(e(Ee), {
1126
+ key: 0,
1127
+ url: e(o).url,
1128
+ onLoaded: e(i),
1129
+ onClose: e(r)
1130
+ }, null, 8, ["url", "onLoaded", "onClose"])) : N("", !0)
1131
+ ]),
1132
+ _: 1
1133
+ }, 8, ["title", "bottom", "onClose", "modelValue"])
1134
+ ])) : N("", !0);
1135
+ }
1136
+ }), mo = {
1137
+ key: 0,
1138
+ class: "ha-layout-switch"
1139
+ }, Ba = /* @__PURE__ */ Y({
1140
+ __name: "Switch",
1141
+ props: {
1142
+ table: { type: Object, required: !0 },
1143
+ layout: { type: Object, required: !0 }
1144
+ },
1145
+ emits: ["layout-change"],
1146
+ setup(_, { emit: t }) {
1147
+ let o = t, s = _, { table: n, layout: l } = oe(s), a = x(), r = (p) => {
1148
+ o("layout-change", p);
1149
+ };
1150
+ return (() => {
1151
+ a.value = l.value.type;
1152
+ })(), (p, c) => {
1153
+ const g = B("el-radio-button"), v = B("el-radio-group");
1154
+ return e(n).layouts.length > 1 ? (u(), y("div", mo, [
1155
+ k(v, {
1156
+ size: "small",
1157
+ onChange: e(r),
1158
+ modelValue: e(a),
1159
+ "onUpdate:modelValue": c[0] || (c[0] = (w) => be(a) ? a.value = w : a = w)
1160
+ }, {
1161
+ default: h(() => [
1162
+ (u(!0), y(K, null, re(e(n).layouts, ({ type: w }) => (u(), z(g, {
1163
+ type: "primary",
1164
+ value: w
1165
+ }, {
1166
+ default: h(() => [
1167
+ H(M(e(j)(`sys.table.layout.${w}`)), 1)
1168
+ ]),
1169
+ _: 2
1170
+ }, 1032, ["value"]))), 256))
1171
+ ]),
1172
+ _: 1
1173
+ }, 8, ["onChange", "modelValue"])
1174
+ ])) : N("", !0);
1175
+ };
1176
+ }
1177
+ }), po = { class: "welcome-tool" }, ft = /* @__PURE__ */ Y({
1178
+ __name: "Welcome",
1179
+ props: { bottom: Number },
1180
+ emits: [],
1181
+ setup(_, { emit: t }) {
1182
+ let o = _, { bottom: s } = oe(o), n = x({ width: 600, height: 400 }), l = [], a = x(), r = x({ visible: !0, never: !1, welcomed: !1 }), i = new Tt(), p = () => {
1183
+ let g = j("tips");
1184
+ if (g == null)
1185
+ return;
1186
+ l = Object.keys(g);
1187
+ let v = it.random(0, l.length);
1188
+ a.value = l[v], Ue.remove(l, v);
1189
+ }, c = () => {
1190
+ r.value.visible = !1, r.value.never && (r.value.welcomed = !0);
1191
+ };
1192
+ return fe(async () => {
1193
+ await i.open(r.value, "sys", "welcome"), r.value.welcomed || (r.value.visible = !0), p();
1194
+ }), (g, v) => {
1195
+ const w = B("el-alert"), T = B("el-checkbox"), U = B("el-button");
1196
+ return e(r).visible ? (u(), z(e(_t), {
1197
+ key: 0,
1198
+ id: "welcome",
1199
+ class: "ha-welcome",
1200
+ title: e(j)("sys.tips_title"),
1201
+ options: e(n),
1202
+ bottom: e(s),
1203
+ modelValue: e(r).visible,
1204
+ "onUpdate:modelValue": v[1] || (v[1] = (A) => e(r).visible = A)
1205
+ }, {
1206
+ footer: h(() => [
1207
+ k(T, {
1208
+ modelValue: e(r).never,
1209
+ "onUpdate:modelValue": v[0] || (v[0] = (A) => e(r).never = A)
1210
+ }, {
1211
+ default: h(() => [
1212
+ H("不再提示")
1213
+ ]),
1214
+ _: 1
1215
+ }, 8, ["modelValue"]),
1216
+ f("div", po, [
1217
+ e(l).length ? (u(), z(U, {
1218
+ key: 0,
1219
+ type: "primary",
1220
+ plain: "",
1221
+ onClick: e(p)
1222
+ }, {
1223
+ default: h(() => [
1224
+ H("下一条")
1225
+ ]),
1226
+ _: 1
1227
+ }, 8, ["onClick"])) : N("", !0),
1228
+ k(U, { onClick: e(c) }, {
1229
+ default: h(() => [
1230
+ H("关闭")
1231
+ ]),
1232
+ _: 1
1233
+ }, 8, ["onClick"])
1234
+ ])
1235
+ ]),
1236
+ default: h(() => [
1237
+ k(w, {
1238
+ title: e(j)("sys.welcome"),
1239
+ type: "info",
1240
+ style: { "margin-bottom": "10px" },
1241
+ "show-icon": ""
1242
+ }, null, 8, ["title"]),
1243
+ f("div", null, M(e(j)(`tips.${e(a)}`)), 1)
1244
+ ]),
1245
+ _: 1
1246
+ }, 8, ["title", "options", "bottom", "modelValue"])) : N("", !0);
1247
+ };
1248
+ }
1249
+ }), vo = { class: "ha-captcha" }, fo = { class: "image" }, ho = {
1250
+ class: "content",
1251
+ droppable: "true"
1252
+ }, go = ["src"], _o = ["src"], yo = /* @__PURE__ */ f("i", { class: "fa fa-arrow-right" }, null, -1), bo = [
1253
+ yo
1254
+ ], wo = /* @__PURE__ */ f("div", { class: "handle-text" }, "向右滑动填充拼图", -1), Na = /* @__PURE__ */ Y({
1255
+ __name: "Captcha",
1256
+ props: {
1257
+ content: String,
1258
+ jigsaw: String
1259
+ },
1260
+ emits: ["refresh", "validate"],
1261
+ setup(_, { emit: t }) {
1262
+ let o = t, s = x(!1), n = x(!1), l = x(!1), a = 0, r = 0, i = x(), p = x(), c = x(), g = (S) => {
1263
+ i.value.style.left = c.value.style.left = `${S}px`, p.value.style.width = `${S}px`, a = S;
1264
+ }, v = () => {
1265
+ o("refresh");
1266
+ }, w = (S) => {
1267
+ r = S.clientX - S.target.offsetLeft, s.value = !0;
1268
+ }, T = (S) => {
1269
+ if (s.value) {
1270
+ let C = S.clientX - r;
1271
+ C < 0 && (C = 0), C > 500 && (C = 500), g(C);
1272
+ }
1273
+ }, U = (S) => {
1274
+ s.value && (o("validate", a), s.value = !1);
1275
+ }, A = () => {
1276
+ c.value.addEventListener("mousedown", w), document.addEventListener("mousemove", T), document.addEventListener("mouseup", U);
1277
+ };
1278
+ return fe(() => {
1279
+ A();
1280
+ }), lt(() => {
1281
+ c.value.removeEventListener("mousedown", w), document.removeEventListener("mousemove", T), document.removeEventListener("mouseup", U);
1282
+ }), (S, P) => (u(), y("div", vo, [
1283
+ f("div", fo, [
1284
+ f("div", ho, [
1285
+ f("img", {
1286
+ src: _.content,
1287
+ alt: "验证码"
1288
+ }, null, 8, go)
1289
+ ]),
1290
+ f("div", {
1291
+ ref_key: "jigsawRef",
1292
+ ref: i,
1293
+ class: "jigsaw"
1294
+ }, [
1295
+ f("img", {
1296
+ src: _.jigsaw,
1297
+ alt: "拼图"
1298
+ }, null, 8, _o)
1299
+ ], 512),
1300
+ f("i", {
1301
+ class: "fa fa-refresh image-refresh",
1302
+ onClick: P[0] || (P[0] = //@ts-ignore
1303
+ (...C) => e(v) && e(v)(...C))
1304
+ })
1305
+ ]),
1306
+ f("div", {
1307
+ class: ne(["handle", { moving: e(s), error: e(n), validating: e(l) }])
1308
+ }, [
1309
+ f("div", {
1310
+ ref_key: "handlePackRef",
1311
+ ref: p,
1312
+ class: "handle-pack"
1313
+ }, null, 512),
1314
+ f("div", {
1315
+ ref_key: "arrowRef",
1316
+ ref: c,
1317
+ class: "handle-arrow"
1318
+ }, bo, 512),
1319
+ wo
1320
+ ], 2)
1321
+ ]));
1322
+ }
1323
+ }), ko = {
1324
+ id: "particles",
1325
+ class: "ha-particles"
1326
+ }, Wa = /* @__PURE__ */ Y({
1327
+ __name: "Particles",
1328
+ setup(_) {
1329
+ x();
1330
+ let t = x(), { app: o } = Le.sys, s = (n) => {
1331
+ if (!n)
1332
+ return;
1333
+ let l = "rgb(149,167,224)";
1334
+ n == "dark" && (l = "rgb(141,158,180)"), l = l.replace("rgb(", "").replace(")", ""), t.value = { color: l, pointColor: l, count: 88, zIndex: 1 };
1335
+ };
1336
+ return fe(() => {
1337
+ s(o.theme);
1338
+ }), _e(() => o.theme, (n, l) => {
1339
+ s(n);
1340
+ }), (n, l) => (u(), y("div", ko));
1341
+ }
1342
+ }), Aa = /* @__PURE__ */ Y({
1343
+ __name: "Table",
1344
+ props: /* @__PURE__ */ Re({
1345
+ data: {},
1346
+ interval: {},
1347
+ sort: {},
1348
+ autoHeight: { type: Boolean }
1349
+ }, {
1350
+ page: {},
1351
+ pageModifiers: {},
1352
+ size: {},
1353
+ sizeModifiers: {}
1354
+ }),
1355
+ emits: /* @__PURE__ */ Re(["row-click", "page-change", "size-change", "sort-change"], ["update:page", "update:size"]),
1356
+ setup(_, { expose: t, emit: o }) {
1357
+ let s = o, n = _, { data: l, interval: a, sort: r, autoHeight: i } = oe(n), p = Be(_, "page"), c = Be(_, "size"), g = x(["descending", "ascending", null]), v = x([]), w = null, T = x(l.value.length), U = x(), A = x(), S = x(), P = (D) => {
1358
+ s("row-click", D);
1359
+ }, C = (D) => {
1360
+ s("page-change", D), at(() => {
1361
+ L();
1362
+ });
1363
+ }, O = (D) => {
1364
+ s("size-change", D), at(() => {
1365
+ L();
1366
+ });
1367
+ }, W = ({ column: D, prop: m, order: I }) => {
1368
+ s("sort-change", { prop: m, order: I }), at(() => {
1369
+ L();
1370
+ });
1371
+ }, te = (D) => {
1372
+ U.value.setCurrentRow(D);
1373
+ }, se = () => {
1374
+ if (!i.value)
1375
+ return;
1376
+ let D = U.value.$el, m = D.parentElement, I = Ue.from(m.children), ce = he.filterStyle(I, (J) => J.position == "fixed" || J.position == "absolute"), le = [D, ...ce], V = Ue.except(I, le), b = he.getHeight(V), $ = he.getAvailableHeight(m) - b;
1377
+ S.value = `${$}px`;
1378
+ }, ae = (D) => {
1379
+ se();
1380
+ }, X = () => {
1381
+ let D;
1382
+ r.value && (r.value.order == "ascending" ? D = "asc" : r.value.order == "descending" ? D = "desc" : D = null);
1383
+ let m = Ue.orderBy(l.value, (ce) => {
1384
+ let le = rt.getValue(ce, r.value.prop);
1385
+ return it.getNumber(le);
1386
+ }, D);
1387
+ return it.filterPage(m, p.value, c.value);
1388
+ }, L = () => {
1389
+ v.value = X(), T.value = l.value.length;
1390
+ }, F = () => {
1391
+ w == null || w.interval(a.value, L);
1392
+ }, ue = () => {
1393
+ L(), w == null || w.dispose();
1394
+ };
1395
+ return fe(async () => {
1396
+ se(), L(), a.value == null ? _e(() => l.value, () => {
1397
+ L();
1398
+ }, { deep: !0 }) : w = await Ne.task.create("Memory");
1399
+ }), lt(() => {
1400
+ ue();
1401
+ }), t({ selectRow: te, resize: ae, update: L, start: F, stop: ue }), (D, m) => {
1402
+ const I = B("el-table"), ce = B("el-pagination");
1403
+ return u(), y(K, null, [
1404
+ k(I, {
1405
+ ref_key: "tableRef",
1406
+ ref: U,
1407
+ class: "ha-table",
1408
+ "show-overflow-tooltip": "",
1409
+ "highlight-current-row": "",
1410
+ border: "",
1411
+ size: "small",
1412
+ "max-height": e(S),
1413
+ data: e(v),
1414
+ "default-sort": e(r),
1415
+ onRowClick: e(P),
1416
+ onSortChange: e(W)
1417
+ }, {
1418
+ empty: h(() => [
1419
+ H("No Data")
1420
+ ]),
1421
+ default: h(() => [
1422
+ ee(D.$slots, "default", { sortOrders: e(g) }, () => [
1423
+ H(" 请添加列 ")
1424
+ ])
1425
+ ]),
1426
+ _: 3
1427
+ }, 8, ["max-height", "data", "default-sort", "onRowClick", "onSortChange"]),
1428
+ k(ce, {
1429
+ ref_key: "paginationRef",
1430
+ ref: A,
1431
+ layout: "total,prev,pager,next,jumper,sizes",
1432
+ total: e(T),
1433
+ "page-sizes": [10, 50, 500, 5e3, 5e4, 5e5],
1434
+ "current-page": e(p),
1435
+ "page-size": e(c),
1436
+ onCurrentChange: e(C),
1437
+ onSizeChange: e(O)
1438
+ }, null, 8, ["total", "current-page", "page-size", "onCurrentChange", "onSizeChange"])
1439
+ ], 64);
1440
+ };
1441
+ }
1442
+ }), xo = ["onMouseenter"], Ha = /* @__PURE__ */ Y({
1443
+ __name: "TableColumn",
1444
+ props: {
1445
+ prop: { type: String },
1446
+ label: { type: String },
1447
+ width: { type: Number }
1448
+ },
1449
+ setup(_) {
1450
+ let t = _, { prop: o, label: s, width: n } = oe(t), l = x(!1), a = (r, i) => {
1451
+ let p = r.target.children[0], c = he.getWidth(p) + 16, g = i.realWidth || i.width;
1452
+ l.value = c > g;
1453
+ };
1454
+ return (r, i) => {
1455
+ const p = B("el-tooltip"), c = B("el-table-column");
1456
+ return u(), z(c, {
1457
+ label: e(s),
1458
+ prop: e(o),
1459
+ width: e(n)
1460
+ }, {
1461
+ header: h((g) => [
1462
+ k(p, {
1463
+ placement: "top",
1464
+ content: e(s),
1465
+ disabled: !e(l)
1466
+ }, {
1467
+ default: h(() => [
1468
+ f("span", {
1469
+ onMouseenter: (v) => e(a)(v, g.column)
1470
+ }, [
1471
+ f("span", null, M(e(s)), 1)
1472
+ ], 40, xo)
1473
+ ]),
1474
+ _: 2
1475
+ }, 1032, ["content", "disabled"])
1476
+ ]),
1477
+ default: h((g) => [
1478
+ ee(r.$slots, "default", { scope: g }, () => [
1479
+ H(M(g.row[e(o)]), 1)
1480
+ ])
1481
+ ]),
1482
+ _: 3
1483
+ }, 8, ["label", "prop", "width"]);
1484
+ };
1485
+ }
1486
+ }), $o = {
1487
+ key: 0,
1488
+ class: "ha-spinner is-error"
1489
+ }, Co = { class: "spinner-title" }, Vo = {
1490
+ key: 0,
1491
+ class: "spinner-content"
1492
+ }, So = { class: "stack" }, Ro = {
1493
+ key: 1,
1494
+ class: "ha-spinner is-loading"
1495
+ }, Mo = { class: "spinner-loading" }, Uo = /* @__PURE__ */ f("div", { class: "spinner-dots" }, [
1496
+ /* @__PURE__ */ f("i"),
1497
+ /* @__PURE__ */ f("i"),
1498
+ /* @__PURE__ */ f("i"),
1499
+ /* @__PURE__ */ f("i")
1500
+ ], -1), Do = { class: "spinner-text" }, zo = /* @__PURE__ */ Y({
1501
+ __name: "Spinner",
1502
+ props: {
1503
+ title: { type: String },
1504
+ //错误标题
1505
+ content: { type: String }
1506
+ //错误消息
1507
+ },
1508
+ emits: ["retry"],
1509
+ setup(_, { emit: t }) {
1510
+ let o = t, s = _, { title: n, content: l } = oe(s), a = () => {
1511
+ o("retry");
1512
+ };
1513
+ return (r, i) => e(n) || e(l) ? (u(), y("div", $o, [
1514
+ f("div", Co, [
1515
+ H(M(e(n)), 1),
1516
+ f("a", {
1517
+ class: "retry",
1518
+ onClick: i[0] || (i[0] = //@ts-ignore
1519
+ (...p) => e(a) && e(a)(...p))
1520
+ }, M(e(j)("common.retry")), 1)
1521
+ ]),
1522
+ e(l) ? (u(), y("div", Vo, [
1523
+ f("div", So, M(e(l)), 1)
1524
+ ])) : N("", !0)
1525
+ ])) : (u(), y("div", Ro, [
1526
+ f("div", Mo, [
1527
+ Uo,
1528
+ f("div", Do, M(e(j)("common.loading")) + "...", 1)
1529
+ ])
1530
+ ]));
1531
+ }
1532
+ }), Io = { class: "ha-resizer" }, Nt = /* @__PURE__ */ Y({
1533
+ __name: "Resizer",
1534
+ props: {
1535
+ width: { type: Number, default: null }
1536
+ //默认无宽度
1537
+ },
1538
+ emits: ["resize"],
1539
+ setup(_, { emit: t }) {
1540
+ let o = t, s = _, { width: n } = oe(s), l = x(!1), a = null, r = null, i = (v) => {
1541
+ v.preventDefault(), l.value = !0, a = v, r = n.value, document.addEventListener("mousemove", p), document.addEventListener("mouseup", c);
1542
+ }, p = (v) => {
1543
+ let w = v.clientX - a.clientX, T = r + w;
1544
+ g(T);
1545
+ }, c = (v) => {
1546
+ l.value = !1, a = null, r = null, document.removeEventListener("mousemove", p), document.removeEventListener("mouseup", c);
1547
+ }, g = (v) => {
1548
+ o("resize", v);
1549
+ };
1550
+ return (v, w) => (u(), y("div", Io, [
1551
+ e(n) != null ? (u(), y("div", {
1552
+ key: 0,
1553
+ class: "resizer-left",
1554
+ style: we({ width: `${e(n)}px` })
1555
+ }, [
1556
+ ee(v.$slots, "left")
1557
+ ], 4)) : N("", !0),
1558
+ f("div", {
1559
+ class: "resizer-right",
1560
+ style: we({ width: `calc(100% - ${e(n) ?? 0}px)` })
1561
+ }, [
1562
+ ee(v.$slots, "default")
1563
+ ], 4),
1564
+ e(n) != null ? (u(), y("div", {
1565
+ key: 1,
1566
+ class: ne(["resizer-handle", { dragging: e(l) }]),
1567
+ onMousedown: w[0] || (w[0] = //@ts-ignore
1568
+ (...T) => e(i) && e(i)(...T)),
1569
+ style: we({ left: `${e(n)}px` })
1570
+ }, null, 38)) : N("", !0)
1571
+ ]));
1572
+ }
1573
+ }), To = { class: "text-popover" }, Lo = {
1574
+ key: 2,
1575
+ class: "control-operation"
1576
+ }, ja = /* @__PURE__ */ Y({
1577
+ __name: "Index",
1578
+ props: {
1579
+ schema: {},
1580
+ table: {},
1581
+ field: {},
1582
+ set: {},
1583
+ row: {},
1584
+ config: {}
1585
+ },
1586
+ emits: ["submit", "change"],
1587
+ setup(_, { emit: t }) {
1588
+ let o = Me(() => import("./Index-CuEyzMd0.js")), s = t, n = _, { schema: l, table: a, field: r, set: i, row: p, config: c } = oe(n), g = x(), v = () => {
1589
+ }, w = (S) => {
1590
+ s("submit", S);
1591
+ }, T = (S) => {
1592
+ s("change", S);
1593
+ }, U = ie(() => {
1594
+ var C, O;
1595
+ if ((O = (C = c == null ? void 0 : c.value) == null ? void 0 : C.control) != null && O.type)
1596
+ return c.value.control.type;
1597
+ let S = r.value.control;
1598
+ if (S.typeBy != null) {
1599
+ let W = p.value[S.typeBy];
1600
+ if (W != null)
1601
+ return W;
1602
+ }
1603
+ return S.type;
1604
+ }), A = ie(() => `control-${dt.getDashName(U.value)}`);
1605
+ return (S, P) => {
1606
+ const C = B("el-popover"), O = B("el-link");
1607
+ return u(), y(K, null, [
1608
+ e(r).control.textualize ? (u(), y(K, { key: 0 }, [
1609
+ e(r).control.popover ? (u(), z(C, {
1610
+ key: 0,
1611
+ trigger: "hover",
1612
+ placement: "top",
1613
+ width: e(r).control.popover.width
1614
+ }, {
1615
+ reference: h(() => [
1616
+ f("div", To, [
1617
+ k(e(o), {
1618
+ ref_key: "controlRef",
1619
+ ref: g,
1620
+ schema: e(l),
1621
+ table: e(a),
1622
+ field: e(r),
1623
+ set: e(i),
1624
+ row: e(p),
1625
+ config: e(c)
1626
+ }, null, 8, ["schema", "table", "field", "set", "row", "config"])
1627
+ ])
1628
+ ]),
1629
+ default: h(() => [
1630
+ k(e(o), {
1631
+ ref_key: "controlRef",
1632
+ ref: g,
1633
+ schema: e(l),
1634
+ table: e(a),
1635
+ field: e(r),
1636
+ set: e(i),
1637
+ row: e(p),
1638
+ config: e(c)
1639
+ }, null, 8, ["schema", "table", "field", "set", "row", "config"])
1640
+ ]),
1641
+ _: 1
1642
+ }, 8, ["width"])) : (u(), z(e(o), {
1643
+ key: 1,
1644
+ ref_key: "controlRef",
1645
+ ref: g,
1646
+ schema: e(l),
1647
+ table: e(a),
1648
+ field: e(r),
1649
+ set: e(i),
1650
+ row: e(p),
1651
+ config: e(c)
1652
+ }, null, 8, ["schema", "table", "field", "set", "row", "config"]))
1653
+ ], 64)) : (u(), z(Ae(e(A)), {
1654
+ key: 1,
1655
+ ref_key: "controlRef",
1656
+ ref: g,
1657
+ schema: e(l),
1658
+ table: e(a),
1659
+ field: e(r),
1660
+ set: e(i),
1661
+ row: e(p),
1662
+ onChange: e(T),
1663
+ onSubmit: e(w),
1664
+ onClear: e(v),
1665
+ modelValue: e(p)[e(r).name],
1666
+ "onUpdate:modelValue": P[0] || (P[0] = (W) => e(p)[e(r).name] = W)
1667
+ }, {
1668
+ default: h(() => [
1669
+ f("div", null, M(e(j)("common.unsupported_control", e(U))), 1)
1670
+ ]),
1671
+ _: 1
1672
+ }, 40, ["schema", "table", "field", "set", "row", "onChange", "onSubmit", "onClear", "modelValue"])),
1673
+ e(r).operation ? (u(), y("div", Lo, [
1674
+ k(O, {
1675
+ type: "primary",
1676
+ underline: !1
1677
+ }, {
1678
+ default: h(() => [
1679
+ H(M(e(r).operation.name), 1)
1680
+ ]),
1681
+ _: 1
1682
+ })
1683
+ ])) : N("", !0)
1684
+ ], 64);
1685
+ };
1686
+ }
1687
+ }), Eo = { class: "panel-header" }, Po = { class: "header-title" }, Oo = { class: "header-operation" }, Bo = {
1688
+ key: 0,
1689
+ class: "panel-container"
1690
+ }, No = {
1691
+ key: 0,
1692
+ class: "panel-content"
1693
+ }, Wo = {
1694
+ key: 1,
1695
+ class: "panel-footer"
1696
+ }, Fa = /* @__PURE__ */ Y({
1697
+ __name: "Panel",
1698
+ props: {
1699
+ title: { type: String },
1700
+ dark: { type: Boolean, default: !1 }
1701
+ },
1702
+ setup(_) {
1703
+ let t = Et(), o = x(!1), s = x(!1), n = x(!1), l = () => {
1704
+ t.default && (s.value = t.default()[0].children != "v-if"), o.value = (t.default || t["panel-footer"]) != null, n.value = t["panel-footer"] != null;
1705
+ };
1706
+ return l(), vt(() => {
1707
+ l();
1708
+ }), (a, r) => (u(), y("div", {
1709
+ class: ne(["ha-panel", { "panel-dark": _.dark }])
1710
+ }, [
1711
+ f("div", Eo, [
1712
+ f("div", Po, [
1713
+ ee(a.$slots, "title", {}, () => [
1714
+ H(M(_.title), 1)
1715
+ ])
1716
+ ]),
1717
+ f("div", Oo, [
1718
+ ee(a.$slots, "operation")
1719
+ ])
1720
+ ]),
1721
+ e(o) ? (u(), y("div", Bo, [
1722
+ e(s) ? (u(), y("div", No, [
1723
+ ee(a.$slots, "default")
1724
+ ])) : N("", !0),
1725
+ e(n) ? (u(), y("div", Wo, [
1726
+ ee(a.$slots, "panel-footer")
1727
+ ])) : N("", !0)
1728
+ ])) : N("", !0)
1729
+ ], 2));
1730
+ }
1731
+ }), Wt = (_, t) => {
1732
+ const o = _.__vccOpts || _;
1733
+ for (const [s, n] of t)
1734
+ o[s] = n;
1735
+ return o;
1736
+ }, Ao = {}, Ho = { class: "ha-group" };
1737
+ function jo(_, t) {
1738
+ return u(), y("div", Ho, [
1739
+ ee(_.$slots, "default")
1740
+ ]);
1741
+ }
1742
+ const qa = /* @__PURE__ */ Wt(Ao, [["render", jo]]), Fo = { class: "operation-left" }, qo = { class: "operation-right" }, Ya = /* @__PURE__ */ Y({
1743
+ __name: "Operation",
1744
+ props: {
1745
+ padding: {}
1746
+ },
1747
+ setup(_, { expose: t }) {
1748
+ let o = _, { padding: s } = oe(o), n = x();
1749
+ return vt(() => {
1750
+ }), fe(() => {
1751
+ }), t({ ref: n }), (l, a) => (u(), y("div", {
1752
+ ref_key: "operationRef",
1753
+ ref: n,
1754
+ class: "ha-operation",
1755
+ style: we({ padding: e(s) ? `${e(s)}px ${e(s) * 2}px` : null })
1756
+ }, [
1757
+ f("div", Fo, [
1758
+ ee(l.$slots, "left")
1759
+ ]),
1760
+ f("div", qo, [
1761
+ ee(l.$slots, "default")
1762
+ ])
1763
+ ], 4));
1764
+ }
1765
+ }), Yo = { class: "not-support" }, Xa = /* @__PURE__ */ Y({
1766
+ __name: "Index",
1767
+ props: {
1768
+ schema: {},
1769
+ table: {},
1770
+ field: {},
1771
+ searchData: {}
1772
+ },
1773
+ emits: ["change", "submit"],
1774
+ setup(_, { emit: t }) {
1775
+ let o = t, s = _, { schema: n, table: l, field: a, searchData: r } = oe(s), i = (c) => {
1776
+ o("change", c);
1777
+ }, p = () => {
1778
+ o("submit");
1779
+ };
1780
+ return (c, g) => (u(), z(Ae(`search-${e(a).search.control.toLowerCase()}`), {
1781
+ schema: e(n),
1782
+ table: e(l),
1783
+ field: e(a),
1784
+ "search-data": e(r),
1785
+ onChange: e(i),
1786
+ onSubmit: e(p),
1787
+ modelValue: e(r)[e(l).name][e(a).name],
1788
+ "onUpdate:modelValue": g[0] || (g[0] = (v) => e(r)[e(l).name][e(a).name] = v)
1789
+ }, {
1790
+ default: h(() => [
1791
+ f("div", Yo, M(e(j)("paging.not_implemented_search_control", e(a).search.control)), 1)
1792
+ ]),
1793
+ _: 1
1794
+ }, 40, ["schema", "table", "field", "search-data", "onChange", "onSubmit", "modelValue"]));
1795
+ }
1796
+ }), Xo = /* @__PURE__ */ f("i", { class: "far fa-bell" }, null, -1), Ko = {
1797
+ key: 0,
1798
+ class: "message-number"
1799
+ }, Jo = { class: "content" }, Go = { class: "title" }, Qo = {
1800
+ key: 0,
1801
+ class: "stack"
1802
+ }, Zo = { class: "time" }, es = ["onClick"], ts = /* @__PURE__ */ f("i", { class: "el-icon-close" }, null, -1), ls = [
1803
+ ts
1804
+ ], os = {
1805
+ key: 1,
1806
+ class: "empty"
1807
+ }, ss = /* @__PURE__ */ Y({
1808
+ __name: "Log",
1809
+ setup(_) {
1810
+ let t = x(!1), o = x("all"), s = x(1), n = x(10), l = () => {
1811
+ s.value = 1;
1812
+ }, a = (v) => {
1813
+ s.value = v;
1814
+ }, r = (v) => {
1815
+ t.value = v;
1816
+ }, i = async (v) => {
1817
+ Ie.remove(v);
1818
+ };
1819
+ ie(() => Math.ceil(g.value.length / n.value));
1820
+ let p = ie(() => {
1821
+ let v = (s.value - 1) * n.value, w = s.value * n.value;
1822
+ return g.value.filter((U, A) => A >= v && A < w);
1823
+ }), c = ie(() => Ie.logs.filter((v) => v.code != "Ok")), g = ie(() => {
1824
+ debugger;
1825
+ return o.value == "all" ? Ie.logs : o.value == "success" ? Ie.logs.filter((v) => v.code == "Ok") : Ie.logs.filter((v) => v.code != "Ok");
1826
+ });
1827
+ return (v, w) => {
1828
+ const T = B("el-radio"), U = B("el-radio-group"), A = B("el-form-item"), S = B("el-form"), P = B("el-scrollbar"), C = B("el-pagination"), O = B("el-drawer");
1829
+ return u(), y(K, null, [
1830
+ f("div", {
1831
+ class: "log-message",
1832
+ onClick: w[0] || (w[0] = (W) => be(t) ? t.value = !0 : t = !0)
1833
+ }, [
1834
+ Xo,
1835
+ e(c).length > 0 ? (u(), y("div", Ko, M(e(c).length), 1)) : N("", !0)
1836
+ ]),
1837
+ k(O, {
1838
+ class: "logs",
1839
+ size: "40%",
1840
+ "append-to-body": "",
1841
+ title: e(j)("common.log"),
1842
+ onShow: w[2] || (w[2] = (W) => e(r)(!0)),
1843
+ onHide: w[3] || (w[3] = (W) => e(r)(!1)),
1844
+ modelValue: e(t),
1845
+ "onUpdate:modelValue": w[4] || (w[4] = (W) => be(t) ? t.value = W : t = W)
1846
+ }, {
1847
+ default: h(() => [
1848
+ k(S, null, {
1849
+ default: h(() => [
1850
+ k(A, null, {
1851
+ default: h(() => [
1852
+ k(U, {
1853
+ onChange: e(l),
1854
+ modelValue: e(o),
1855
+ "onUpdate:modelValue": w[1] || (w[1] = (W) => be(o) ? o.value = W : o = W)
1856
+ }, {
1857
+ default: h(() => [
1858
+ k(T, { value: "all" }, {
1859
+ default: h(() => [
1860
+ H(M(e(j)("common.all")), 1)
1861
+ ]),
1862
+ _: 1
1863
+ }),
1864
+ k(T, { value: "success" }, {
1865
+ default: h(() => [
1866
+ H(M(e(j)("common.success")), 1)
1867
+ ]),
1868
+ _: 1
1869
+ }),
1870
+ k(T, { value: "error" }, {
1871
+ default: h(() => [
1872
+ H(M(e(j)("common.error")), 1)
1873
+ ]),
1874
+ _: 1
1875
+ })
1876
+ ]),
1877
+ _: 1
1878
+ }, 8, ["onChange", "modelValue"])
1879
+ ]),
1880
+ _: 1
1881
+ })
1882
+ ]),
1883
+ _: 1
1884
+ }),
1885
+ e(g).length > 0 ? (u(), z(P, {
1886
+ key: 0,
1887
+ style: { height: "calc(100% - 61px)" }
1888
+ }, {
1889
+ default: h(() => [
1890
+ (u(!0), y(K, null, re(e(p), (W, te) => (u(), y("div", {
1891
+ class: ne(["log", W.code == "Ok" ? "success" : "error"]),
1892
+ key: te
1893
+ }, [
1894
+ f("div", Jo, [
1895
+ f("div", Go, M(W.message), 1),
1896
+ W.code != "Ok" ? (u(), y("div", Qo, M(W.stack), 1)) : N("", !0),
1897
+ f("div", Zo, M(e(j)("common.time")) + ":" + M(W.time) + " " + M(e(j)("common.elapsed")) + ":" + M(W.elapsed) + "ms", 1)
1898
+ ]),
1899
+ f("div", {
1900
+ class: "operation",
1901
+ onClick: (se) => e(i)(te)
1902
+ }, ls, 8, es)
1903
+ ], 2))), 128))
1904
+ ]),
1905
+ _: 1
1906
+ })) : N("", !0),
1907
+ e(g).length == 0 ? (u(), y("div", os, M(e(j)("common.no_data")), 1)) : N("", !0),
1908
+ k(C, {
1909
+ size: "small",
1910
+ layout: "prev, pager, next, total",
1911
+ "page-size": e(n),
1912
+ total: e(g).length,
1913
+ onCurrentChange: e(a)
1914
+ }, null, 8, ["page-size", "total", "onCurrentChange"])
1915
+ ]),
1916
+ _: 1
1917
+ }, 8, ["title", "modelValue"])
1918
+ ], 64);
1919
+ };
1920
+ }
1921
+ }), as = ["innerHTML"], ns = /* @__PURE__ */ f("div", { class: "footer-left" }, null, -1), rs = { class: "footer-right" }, is = /* @__PURE__ */ Y({
1922
+ __name: "Setting",
1923
+ emits: ["close"],
1924
+ setup(_, { expose: t, emit: o }) {
1925
+ let s = x(!1), { app: n } = Le.sys, l = x({ function: "personal", ...n }), a = () => {
1926
+ s.value = !0;
1927
+ }, r = async () => {
1928
+ await Le.saveApp(l.value);
1929
+ let p = l.value.language;
1930
+ await Se.switchI18n(p), n.language = p, tt.success("设置成功"), s.value = !1;
1931
+ }, i = () => {
1932
+ s.value = !1;
1933
+ };
1934
+ return t({ show: a }), (p, c) => {
1935
+ const g = B("el-form-item"), v = B("el-form"), w = B("el-tab-pane"), T = B("el-radio-button"), U = B("el-radio-group"), A = B("el-tabs"), S = B("el-button"), P = B("el-dialog");
1936
+ return u(), z(P, {
1937
+ class: "setting",
1938
+ width: "750px",
1939
+ draggable: "",
1940
+ "append-to-body": "",
1941
+ "destroy-on-close": "",
1942
+ title: e(j)("common.setting"),
1943
+ modelValue: e(s),
1944
+ "onUpdate:modelValue": c[7] || (c[7] = (C) => be(s) ? s.value = C : s = C)
1945
+ }, {
1946
+ footer: h(() => [
1947
+ ns,
1948
+ f("div", rs, [
1949
+ k(S, {
1950
+ type: "primary",
1951
+ onClick: e(r)
1952
+ }, {
1953
+ default: h(() => [
1954
+ H(M(e(j)("common.confirm")), 1)
1955
+ ]),
1956
+ _: 1
1957
+ }, 8, ["onClick"]),
1958
+ k(S, { onClick: e(i) }, {
1959
+ default: h(() => [
1960
+ H(M(e(j)("common.cancel")), 1)
1961
+ ]),
1962
+ _: 1
1963
+ }, 8, ["onClick"])
1964
+ ])
1965
+ ]),
1966
+ default: h(() => [
1967
+ k(A, {
1968
+ "tab-position": "left",
1969
+ modelValue: e(l).function,
1970
+ "onUpdate:modelValue": c[6] || (c[6] = (C) => e(l).function = C)
1971
+ }, {
1972
+ default: h(() => [
1973
+ k(w, {
1974
+ name: "personal",
1975
+ label: e(j)("common.personal")
1976
+ }, {
1977
+ default: h(() => [
1978
+ k(v, { "label-width": 100 }, {
1979
+ default: h(() => [
1980
+ k(g, { label: "用户ID:" }, {
1981
+ default: h(() => [
1982
+ H(M(e(Z).user.userId), 1)
1983
+ ]),
1984
+ _: 1
1985
+ }),
1986
+ k(g, { label: "姓名:" }, {
1987
+ default: h(() => [
1988
+ H(M(e(Z).user.truename), 1)
1989
+ ]),
1990
+ _: 1
1991
+ }),
1992
+ k(g, { label: "调试权限:" }, {
1993
+ default: h(() => [
1994
+ H(M(e(Z).user.debugger), 1)
1995
+ ]),
1996
+ _: 1
1997
+ })
1998
+ ]),
1999
+ _: 1
2000
+ })
2001
+ ]),
2002
+ _: 1
2003
+ }, 8, ["label"]),
2004
+ k(w, {
2005
+ name: "common",
2006
+ label: e(j)("common.common")
2007
+ }, {
2008
+ default: h(() => [
2009
+ k(v, null, {
2010
+ default: h(() => [
2011
+ e(ve).layouts.length > 0 ? (u(), z(g, {
2012
+ key: 0,
2013
+ label: e(j)("common.layout")
2014
+ }, {
2015
+ default: h(() => [
2016
+ k(U, {
2017
+ modelValue: e(l).layout,
2018
+ "onUpdate:modelValue": c[0] || (c[0] = (C) => e(l).layout = C)
2019
+ }, {
2020
+ default: h(() => [
2021
+ (u(!0), y(K, null, re(e(ve).layouts, (C) => (u(), z(T, {
2022
+ value: C.value
2023
+ }, {
2024
+ default: h(() => [
2025
+ H(M(e(Ce)("Layouts", C.value)), 1)
2026
+ ]),
2027
+ _: 2
2028
+ }, 1032, ["value"]))), 256))
2029
+ ]),
2030
+ _: 1
2031
+ }, 8, ["modelValue"])
2032
+ ]),
2033
+ _: 1
2034
+ }, 8, ["label"])) : N("", !0),
2035
+ e(ve).themes.length > 0 ? (u(), z(g, {
2036
+ key: 1,
2037
+ label: e(j)("common.theme")
2038
+ }, {
2039
+ default: h(() => [
2040
+ k(U, {
2041
+ modelValue: e(l).theme,
2042
+ "onUpdate:modelValue": c[1] || (c[1] = (C) => e(l).theme = C)
2043
+ }, {
2044
+ default: h(() => [
2045
+ (u(!0), y(K, null, re(e(ve).themes, (C) => (u(), z(T, {
2046
+ value: C.value
2047
+ }, {
2048
+ default: h(() => [
2049
+ H(M(e(Ce)("Themes", C.value)), 1)
2050
+ ]),
2051
+ _: 2
2052
+ }, 1032, ["value"]))), 256))
2053
+ ]),
2054
+ _: 1
2055
+ }, 8, ["modelValue"])
2056
+ ]),
2057
+ _: 1
2058
+ }, 8, ["label"])) : N("", !0),
2059
+ e(ve).backgrounds.length > 0 ? (u(), z(g, {
2060
+ key: 2,
2061
+ label: e(j)("common.background")
2062
+ }, {
2063
+ default: h(() => [
2064
+ k(U, {
2065
+ modelValue: e(l).background,
2066
+ "onUpdate:modelValue": c[2] || (c[2] = (C) => e(l).background = C)
2067
+ }, {
2068
+ default: h(() => [
2069
+ (u(!0), y(K, null, re(e(ve).backgrounds, (C) => (u(), z(T, {
2070
+ value: C.value
2071
+ }, {
2072
+ default: h(() => [
2073
+ H(M(e(Ce)("Backgrounds", C.value)), 1)
2074
+ ]),
2075
+ _: 2
2076
+ }, 1032, ["value"]))), 256))
2077
+ ]),
2078
+ _: 1
2079
+ }, 8, ["modelValue"])
2080
+ ]),
2081
+ _: 1
2082
+ }, 8, ["label"])) : N("", !0),
2083
+ e(ve).locales.length > 0 ? (u(), z(g, {
2084
+ key: 3,
2085
+ label: e(j)("common.language")
2086
+ }, {
2087
+ default: h(() => [
2088
+ k(U, {
2089
+ modelValue: e(l).language,
2090
+ "onUpdate:modelValue": c[3] || (c[3] = (C) => e(l).language = C)
2091
+ }, {
2092
+ default: h(() => [
2093
+ (u(!0), y(K, null, re(e(ve).locales, (C) => (u(), z(T, {
2094
+ value: C.value
2095
+ }, {
2096
+ default: h(() => [
2097
+ H(M(e(Ce)("Locales", C.value)), 1)
2098
+ ]),
2099
+ _: 2
2100
+ }, 1032, ["value"]))), 256))
2101
+ ]),
2102
+ _: 1
2103
+ }, 8, ["modelValue"])
2104
+ ]),
2105
+ _: 1
2106
+ }, 8, ["label"])) : N("", !0),
2107
+ e(ve).fonts.length > 0 ? (u(), z(g, {
2108
+ key: 4,
2109
+ label: e(j)("common.font")
2110
+ }, {
2111
+ default: h(() => [
2112
+ k(U, {
2113
+ modelValue: e(l).font,
2114
+ "onUpdate:modelValue": c[4] || (c[4] = (C) => e(l).font = C)
2115
+ }, {
2116
+ default: h(() => [
2117
+ (u(!0), y(K, null, re(e(ve).fonts, (C) => (u(), z(T, {
2118
+ value: C.value
2119
+ }, {
2120
+ default: h(() => [
2121
+ H(M(e(Ce)("Fonts", C.value)), 1)
2122
+ ]),
2123
+ _: 2
2124
+ }, 1032, ["value"]))), 256))
2125
+ ]),
2126
+ _: 1
2127
+ }, 8, ["modelValue"])
2128
+ ]),
2129
+ _: 1
2130
+ }, 8, ["label"])) : N("", !0),
2131
+ e(ve).cdns.length > 0 ? (u(), z(g, {
2132
+ key: 5,
2133
+ label: e(j)("common.cdn")
2134
+ }, {
2135
+ default: h(() => [
2136
+ k(U, {
2137
+ modelValue: e(l).cdn,
2138
+ "onUpdate:modelValue": c[5] || (c[5] = (C) => e(l).cdn = C)
2139
+ }, {
2140
+ default: h(() => [
2141
+ (u(!0), y(K, null, re(e(ve).cdns, (C) => (u(), z(T, {
2142
+ value: C.value
2143
+ }, {
2144
+ default: h(() => [
2145
+ H(M(e(Ce)("Cdns", C.value)), 1)
2146
+ ]),
2147
+ _: 2
2148
+ }, 1032, ["value"]))), 256))
2149
+ ]),
2150
+ _: 1
2151
+ }, 8, ["modelValue"])
2152
+ ]),
2153
+ _: 1
2154
+ }, 8, ["label"])) : N("", !0)
2155
+ ]),
2156
+ _: 1
2157
+ })
2158
+ ]),
2159
+ _: 1
2160
+ }, 8, ["label"]),
2161
+ k(w, {
2162
+ name: "about",
2163
+ label: e(j)("common.about"),
2164
+ class: "setting-about"
2165
+ }, {
2166
+ default: h(() => [
2167
+ f("div", {
2168
+ innerHTML: e(j)("sys.description")
2169
+ }, null, 8, as),
2170
+ H(" " + M(e(j)("sys.version", e(ve).version)), 1)
2171
+ ]),
2172
+ _: 1
2173
+ }, 8, ["label"])
2174
+ ]),
2175
+ _: 1
2176
+ }, 8, ["modelValue"])
2177
+ ]),
2178
+ _: 1
2179
+ }, 8, ["title", "modelValue"]);
2180
+ };
2181
+ }
2182
+ }), us = /* @__PURE__ */ Y({
2183
+ __name: "Debugger",
2184
+ setup(_) {
2185
+ let t = x({ text: null, conditions: [] }), o = x([]), s = x({ id: "", secret: "" }), n = x({ env: ve.env, app: ve.app }), l = async () => et.post("/sys_user/options", t.value).then(({ data: p }) => {
2186
+ o.value = p;
2187
+ }), a = (p, c) => {
2188
+ p == "env" && (Z.env = c);
2189
+ }, r = (p) => {
2190
+ t.value.text = p, l();
2191
+ }, i = async (p) => {
2192
+ let c = await Z.getSso();
2193
+ c && (s.value.id = c.userId), (await Ne.sso.create("secret")).login(s.value).then((v) => {
2194
+ tt.success(v.message);
2195
+ });
2196
+ };
2197
+ return (p, c) => {
2198
+ const g = B("el-option"), v = B("el-select");
2199
+ return u(), y(K, null, [
2200
+ k(e(Zl), {
2201
+ id: "debugger",
2202
+ inline: "",
2203
+ readonly: "",
2204
+ form: e(n),
2205
+ onChange: e(a)
2206
+ }, null, 8, ["form", "onChange"]),
2207
+ e(Z).debugger ? (u(), z(v, {
2208
+ key: 0,
2209
+ filterable: "",
2210
+ remote: "",
2211
+ clearable: "",
2212
+ "remote-method": e(r),
2213
+ onFocus: e(l),
2214
+ onChange: e(i),
2215
+ modelValue: e(s).secret,
2216
+ "onUpdate:modelValue": c[0] || (c[0] = (w) => e(s).secret = w),
2217
+ style: { width: "150px" }
2218
+ }, {
2219
+ default: h(() => [
2220
+ (u(!0), y(K, null, re(e(o), (w) => (u(), z(g, {
2221
+ value: w.value,
2222
+ label: `${w.text}(${w.value})`
2223
+ }, {
2224
+ default: h(() => [
2225
+ H(M(w.text) + "(" + M(w.value) + ") ", 1)
2226
+ ]),
2227
+ _: 2
2228
+ }, 1032, ["value", "label"]))), 256))
2229
+ ]),
2230
+ _: 1
2231
+ }, 8, ["remote-method", "onFocus", "onChange", "modelValue"])) : N("", !0)
2232
+ ], 64);
2233
+ };
2234
+ }
2235
+ }), ds = { class: "header-right" }, cs = { class: "header-notice" }, ms = { key: 0 }, ps = {
2236
+ key: 0,
2237
+ class: "header-socket"
2238
+ }, vs = /* @__PURE__ */ f("i", { class: "fa fa-warning" }, null, -1), fs = { class: "avatar-wrapper" }, hs = /* @__PURE__ */ f("i", { class: "fa fa-cog" }, null, -1), gs = {
2239
+ key: 0,
2240
+ class: "user-name"
2241
+ }, _s = /* @__PURE__ */ f("i", { class: "fa fa-chevron-down" }, null, -1), ys = { class: "header-right-title" }, ht = /* @__PURE__ */ Y({
2242
+ __name: "HeaderRight",
2243
+ setup(_) {
2244
+ let t = x(), o = x(), s = He(), n = (i) => {
2245
+ o.value.style.animationPlayState = i;
2246
+ }, l = () => {
2247
+ let i = s.path;
2248
+ me.to(`/login?return_url=${i}`);
2249
+ }, a = () => {
2250
+ et.get("/app/cache/clear").then(({ message: i }) => {
2251
+ tt.success(i);
2252
+ });
2253
+ }, r = () => {
2254
+ Z.logout().then(() => {
2255
+ l();
2256
+ });
2257
+ };
2258
+ return (i, p) => {
2259
+ const c = B("el-dropdown-item"), g = B("el-dropdown-menu"), v = B("el-dropdown");
2260
+ return u(), y("div", ds, [
2261
+ f("div", cs, [
2262
+ e(sl)("sys.notice") ? (u(), y("div", ms, [
2263
+ f("div", {
2264
+ ref_key: "marqueeRef",
2265
+ ref: o,
2266
+ class: "header-marquee",
2267
+ onMouseover: p[0] || (p[0] = (w) => e(n)("paused")),
2268
+ onMouseout: p[1] || (p[1] = (w) => e(n)("running"))
2269
+ }, M(e(j)("sys.notice")), 545)
2270
+ ])) : N("", !0)
2271
+ ]),
2272
+ e(De).connected == !1 ? (u(), y("div", ps, [
2273
+ vs,
2274
+ H(" Socket连接已断开 ")
2275
+ ])) : N("", !0),
2276
+ e(Z).user ? (u(), z(us, { key: 1 })) : N("", !0),
2277
+ k(ss),
2278
+ k(is, {
2279
+ ref_key: "settingRef",
2280
+ ref: t
2281
+ }, null, 512),
2282
+ e(Z).user ? (u(), z(v, {
2283
+ key: 2,
2284
+ class: "avatar-container header-right-item",
2285
+ trigger: "click"
2286
+ }, {
2287
+ dropdown: h(() => [
2288
+ k(g, {
2289
+ class: ne({ "avatar-dropdown": !0 })
2290
+ }, {
2291
+ default: h(() => [
2292
+ k(c, {
2293
+ onClick: p[2] || (p[2] = (w) => e(t).show())
2294
+ }, {
2295
+ default: h(() => [
2296
+ H(M(e(j)("common.setting")), 1)
2297
+ ]),
2298
+ _: 1
2299
+ }),
2300
+ k(c, { onClick: e(a) }, {
2301
+ default: h(() => [
2302
+ H(M(e(j)("setting.clear_cache")), 1)
2303
+ ]),
2304
+ _: 1
2305
+ }, 8, ["onClick"]),
2306
+ k(c, { onClick: e(r) }, {
2307
+ default: h(() => [
2308
+ H(M(e(j)("common.logout")), 1)
2309
+ ]),
2310
+ _: 1
2311
+ }, 8, ["onClick"])
2312
+ ]),
2313
+ _: 1
2314
+ })
2315
+ ]),
2316
+ default: h(() => [
2317
+ f("div", fs, [
2318
+ hs,
2319
+ e(Z).user ? (u(), y("div", gs, M(e(Z).user.truename), 1)) : N("", !0),
2320
+ _s
2321
+ ])
2322
+ ]),
2323
+ _: 1
2324
+ })) : (u(), y("div", {
2325
+ key: 3,
2326
+ class: "header-right-item",
2327
+ onClick: p[3] || (p[3] = //@ts-ignore
2328
+ (...w) => e(l) && e(l)(...w))
2329
+ }, [
2330
+ f("div", ys, M(e(j)("common.login")), 1)
2331
+ ]))
2332
+ ]);
2333
+ };
2334
+ }
2335
+ }), bs = ["href"], ws = { class: "side-logo" }, ks = { class: "side-title" }, gt = /* @__PURE__ */ Y({
2336
+ __name: "Logo",
2337
+ emits: ["click"],
2338
+ setup(_, { emit: t }) {
2339
+ let o = t, s = (n) => {
2340
+ o("click", n), me.to(n, !1);
2341
+ };
2342
+ return (n, l) => {
2343
+ var a;
2344
+ return u(), y("a", {
2345
+ class: "logo",
2346
+ href: e(Ge).home,
2347
+ onClick: l[0] || (l[0] = ze((r) => e(s)(e(Ge).home), ["prevent"]))
2348
+ }, [
2349
+ f("div", ws, M((a = e(Ct)("title")) == null ? void 0 : a.substring(0, 1)), 1),
2350
+ f("div", ks, [
2351
+ (u(!0), y(K, null, re(e(Ct)("title"), (r, i) => (u(), y("div", {
2352
+ style: we({ animationDelay: i * 0.1 + "s" })
2353
+ }, M(r), 5))), 256))
2354
+ ])
2355
+ ], 8, bs);
2356
+ };
2357
+ }
2358
+ }), xs = { class: "desktop-tools nav-bar" }, $s = /* @__PURE__ */ f("div", { class: "header-middle" }, null, -1), Cs = {
2359
+ key: 0,
2360
+ class: "desktop-main"
2361
+ }, Vs = {
2362
+ key: 0,
2363
+ class: "desktop-icon"
2364
+ }, Ss = /* @__PURE__ */ f("i", { class: "fa fa-hourglass-empty" }, null, -1), Rs = { class: "title" }, Ms = ["href", "title", "onClick"], Us = { class: "title" }, Ds = { class: "desktop-tasks" }, zs = ["onClick"], Is = ["onClick"], Ts = { key: 1 }, Ls = ["onClick"], Es = {
2365
+ key: 1,
2366
+ class: "side-tab-suffix fa fa-chevron-right"
2367
+ }, Ps = /* @__PURE__ */ Y({
2368
+ __name: "Desktop",
2369
+ setup(_) {
2370
+ let t = x([]), o = x(), s = x(), n = new We(), l = new ct(), a = x({ height: 36 }), r = He(), i, { app: p } = Le.sys, c = (V, b) => {
2371
+ b.dialogRef = V;
2372
+ }, g = (V, b) => {
2373
+ b.pageRef = V;
2374
+ }, v = (V, b = null) => {
2375
+ if (!b)
2376
+ return;
2377
+ b.bodyUrl = V;
2378
+ let d = de.getM(V).m;
2379
+ if (!d)
2380
+ return;
2381
+ let $ = Te.getParentsById(d, "id", Z.menus, "children");
2382
+ $.length > 1 ? b.sideMenuId = $[1].id : b.sideMenuId = d, b.headerMenuId = d;
2383
+ }, w = (V, b, d, $) => {
2384
+ if ($) {
2385
+ F(V, b);
2386
+ return;
2387
+ }
2388
+ d.sideMenuId = b, d.headerMenuId = b;
2389
+ let J;
2390
+ b == d.sideMenu.id ? (J = d.sideMenu, d.headerMenu = null) : (J = d.sideMenu.children.find((pe) => pe.id == b), d.headerMenu = J), d.menu = J, d.bodyUrl = D(b), me.to(d.bodyUrl, !1);
2391
+ }, T = (V, b, d, $) => {
2392
+ if ($) {
2393
+ F(V, b);
2394
+ return;
2395
+ }
2396
+ d.headerMenuId = b;
2397
+ let J;
2398
+ b == d.headerMenu.id ? J = d.headerMenu : J = d.headerMenu.children.find((pe) => pe.id == b), d.menu = J, d.bodyUrl = D(b), me.to(d.bodyUrl, !1);
2399
+ }, U = (V) => {
2400
+ V.pageRef.refresh();
2401
+ }, A = (V) => {
2402
+ let b = It.encode({ Module: V.bodyUrl });
2403
+ s.value.show("add", "/ctl_feedback/insert?default=" + b);
2404
+ }, S = (V) => {
2405
+ for (let b = 0; b < t.value.length; b++) {
2406
+ let d = t.value[b];
2407
+ d != V && d.dialogRef.blur();
2408
+ }
2409
+ }, P = (V) => {
2410
+ let b = de.getM(V.bodyUrl), d = de.getUrl(V.bodyUrl, { m: `${b.m};min` });
2411
+ me.to(d, !1);
2412
+ }, C = (V) => {
2413
+ let b = de.getBackUrl();
2414
+ b && (V.bodyUrl = b, me.to(b, !1));
2415
+ }, O = (V) => {
2416
+ let b = de.getBackUrl();
2417
+ b && (V.bodyUrl = b, me.to(b, !1));
2418
+ }, W = (V) => {
2419
+ Ue.remove(t.value, V);
2420
+ }, te = (V) => {
2421
+ ae("ctrlS", V);
2422
+ }, se = (V) => {
2423
+ ae("ctrlEnter", V);
2424
+ }, ae = (V, b) => {
2425
+ let d = ue(t.value, ($) => $.dialogRef.options.state != "min");
2426
+ !d.pageRef || !d.pageRef.keyboard || d.pageRef.keyboard(V, b);
2427
+ }, X = (V) => {
2428
+ let b = JSON.parse(V.data), { win: d } = b, $ = t.value.find((J) => J.id == d);
2429
+ $ != null && $.pageRef.handler(b);
2430
+ }, L = (V) => {
2431
+ V.dialogRef.toggleShow();
2432
+ }, F = (V, b) => {
2433
+ V.preventDefault();
2434
+ let d = m(b);
2435
+ d.bodyUrl = D(b), t.value.push(d), me.to(d.bodyUrl, !1);
2436
+ }, ue = (V, b = null) => {
2437
+ let d = b ? V.filter(b) : V;
2438
+ return Ue.max(d, (J) => J.dialogRef.options.index);
2439
+ }, D = (V) => {
2440
+ let b = Te.getById(V, "id", Z.menus, "children");
2441
+ if (!b)
2442
+ return null;
2443
+ let d = { m: b.id };
2444
+ return le.value.max ? d.m += ";max" : le.value.min && (d.m += ";min"), de.getUrl(b.url, d);
2445
+ }, m = (V) => {
2446
+ if (!V)
2447
+ return null;
2448
+ let b = Te.getParentsById(V, "id", Z.menus, "children", !0);
2449
+ if (b.length == 0)
2450
+ return null;
2451
+ let d = {
2452
+ visible: !0,
2453
+ menu: null,
2454
+ //当前激活菜单
2455
+ sideMenu: null,
2456
+ //侧边菜单,目的:减少菜单变更导致的赋值过程
2457
+ headerMenu: null,
2458
+ //顶部菜单,1:减少循环侧边菜单导致头部页面数据冗余;2:减少赋值过程
2459
+ id: dt.getUniqueId(8),
2460
+ //防止前面元素被删除(如关闭先打开的窗口),导致所有窗口被重建而额外触发关闭事件
2461
+ sideMenuId: null,
2462
+ headerMenuId: null,
2463
+ options: {},
2464
+ //是否聚焦
2465
+ focus: null,
2466
+ //显示内容的url
2467
+ bodyUrl: null
2468
+ };
2469
+ return d.menu = b[b.length - 1], d.sideMenu = b[0], d.headerMenu = b[1], b.length == 1 ? (d.sideMenuId = b[0].id, d) : (d.sideMenuId = b[1].id, b.length == 2 ? (d.headerMenuId = b[1].id, d) : (d.headerMenuId = b[2].id, d));
2470
+ }, I = (V, b) => {
2471
+ if (!V)
2472
+ return;
2473
+ nt.isObject(V) ? (b.type = V.module.type, b.name = V.module.name, b.env = V.module.env, b.i18n_title = null) : nt.isString(V) && (b.i18n_title = V);
2474
+ let d = ce(b.i18n_title, b.type, b.type);
2475
+ Se.setTitle(d);
2476
+ }, ce = (V, b, d) => V ? j(V) : Ze(b, d);
2477
+ fe(async () => {
2478
+ l.ctrlS(document, te), l.ctrlEnter(document, se), i = await Ne.provider.getDefault("desktop"), De.subscribe(X);
2479
+ let V = await i.getAsync("taskbars");
2480
+ if (V)
2481
+ for (let b = 0; b < V.length; b++) {
2482
+ let d = V[b], $ = m(d.menu);
2483
+ $.id = d.id, $.bodyUrl = d.url, t.value.push($);
2484
+ }
2485
+ n.resize(o.value, (b) => {
2486
+ for (let d = 0; d < t.value.length; d++) {
2487
+ let $ = t.value[d].dialogRef;
2488
+ $.options.state == "max" ? ($.restore(), $.max()) : ($.options.state == "left" || $.options.state == "right") && $.affix();
2489
+ }
2490
+ });
2491
+ }), pt(() => {
2492
+ l.removeCtrlS(document), l.removeCtrlEnter(document), n.dispose(), De.unsubscribe();
2493
+ }), _e(() => p.language, (V, b) => {
2494
+ for (let d = 0; d < t.value.length; d++) {
2495
+ let $ = t.value[d], J = $.headerMenuId ?? $.sideMenuId, pe = Te.getParentsById(J, "id", Z.menus, "children", !0);
2496
+ $.sideMenu = pe[0], $.headerMenu = pe[1];
2497
+ }
2498
+ }), _e(() => t.value.find((V) => {
2499
+ var b;
2500
+ return ((b = V.dialogRef) == null ? void 0 : b.options.state) == "max";
2501
+ }) != null, (V, b) => {
2502
+ Lt.emit("maximize", V);
2503
+ }), _e(() => t.value, (V, b) => {
2504
+ let d = [];
2505
+ for (let $ = 0; $ < V.length; $++) {
2506
+ let J = V[$], pe = { id: J.id, menu: J.menu.id, url: J.bodyUrl };
2507
+ d.push(pe);
2508
+ }
2509
+ i && i.saveAsync("taskbars", d);
2510
+ }, { deep: !0 });
2511
+ let le = ie(() => de.getM(r.fullPath));
2512
+ return (V, b) => (u(), y("div", {
2513
+ ref_key: "appRef",
2514
+ ref: o,
2515
+ class: "app-wrapper"
2516
+ }, [
2517
+ f("div", xs, [
2518
+ $s,
2519
+ k(e(ht))
2520
+ ]),
2521
+ e(Z).menus ? (u(), y("div", Cs, [
2522
+ e(Z).menus.length == 0 ? (u(), y("a", Vs, [
2523
+ Ss,
2524
+ f("div", Rs, M(e(j)("common.no_permission")), 1)
2525
+ ])) : (u(!0), y(K, { key: 1 }, re(e(Z).menus, (d) => (u(), y("a", {
2526
+ href: e(de).getAnchor(d.url, { m: d.id }).href,
2527
+ class: "desktop-icon",
2528
+ title: e($e)(d.id),
2529
+ style: we(`color:${d.color}`),
2530
+ onClick: ($) => e(F)($, d.id)
2531
+ }, [
2532
+ f("i", {
2533
+ class: ne(d.icon)
2534
+ }, null, 2),
2535
+ f("div", Us, M(e($e)(d.id)), 1)
2536
+ ], 12, Ms))), 256))
2537
+ ])) : N("", !0),
2538
+ f("div", Ds, [
2539
+ k(e(gt), {
2540
+ onClick: b[0] || (b[0] = (d) => e(v)(d, e(t)[e(t).length - 1]))
2541
+ }),
2542
+ (u(!0), y(K, null, re(e(t), (d) => (u(), y("div", {
2543
+ class: ne(["desktop-task", { focus: d.options.focus }]),
2544
+ onClick: ($) => e(L)(d)
2545
+ }, [
2546
+ f("i", {
2547
+ class: ne(`icon ${d.menu.icon}`)
2548
+ }, null, 2),
2549
+ H(M(e(ce)(d.i18n_title, d.type, d.name)), 1)
2550
+ ], 10, zs))), 256))
2551
+ ]),
2552
+ (u(!0), y(K, null, re(e(t), (d) => (u(), z(e(_t), {
2553
+ ref_for: !0,
2554
+ ref: ($) => e(c)($, d),
2555
+ id: d.id,
2556
+ bottom: e(a).height,
2557
+ options: d.options,
2558
+ onMin: ($) => e(P)(d),
2559
+ onClose: ($) => e(W)(d),
2560
+ onFocus: ($) => e(S)(d),
2561
+ key: d.id,
2562
+ modelValue: d.visible,
2563
+ "onUpdate:modelValue": ($) => d.visible = $
2564
+ }, cl({
2565
+ shortcut: h(() => [
2566
+ f("i", {
2567
+ class: "shortcut-refresh fa fa-refresh",
2568
+ onClick: ($) => e(U)(d)
2569
+ }, null, 8, Is)
2570
+ ]),
2571
+ title: h(() => [
2572
+ d.menu.icon ? (u(), y("i", {
2573
+ key: 0,
2574
+ class: ne(`icon ${d.menu.icon}`)
2575
+ }, null, 2)) : N("", !0),
2576
+ H(" " + M(e(ce)(d.i18n_title, d.type, d.name)) + " ", 1),
2577
+ d.env ? (u(), y("span", Ts, "[" + M(d.env) + "]", 1)) : N("", !0)
2578
+ ]),
2579
+ toolbar: h(() => [
2580
+ f("i", {
2581
+ class: "toolbar-question",
2582
+ onClick: ($) => e(A)(d)
2583
+ }, null, 8, Ls)
2584
+ ]),
2585
+ default: h(() => [
2586
+ d.bodyUrl ? (u(), z(e(Ee), {
2587
+ key: 0,
2588
+ ref_for: !0,
2589
+ ref: ($) => e(g)($, d),
2590
+ win: d.id,
2591
+ url: d.bodyUrl,
2592
+ onNavigate: ($) => e(v)($, d),
2593
+ onLoaded: ($) => e(I)($, d),
2594
+ onSucceed: ($) => e(C)(d),
2595
+ onClose: ($) => e(O)(d)
2596
+ }, null, 8, ["win", "url", "onNavigate", "onLoaded", "onSucceed", "onClose"])) : N("", !0)
2597
+ ]),
2598
+ _: 2
2599
+ }, [
2600
+ d.sideMenu.children.length ? {
2601
+ name: "side",
2602
+ fn: h(() => [
2603
+ k(e(jt), {
2604
+ modelValue: d.sideMenuId,
2605
+ "onUpdate:modelValue": ($) => d.sideMenuId = $
2606
+ }, {
2607
+ default: h(() => [
2608
+ k(e(Qe), {
2609
+ name: d.sideMenu.id,
2610
+ url: d.sideMenu.url,
2611
+ title: e($e)(d.sideMenu.id),
2612
+ onClick: ($, J, pe) => e(w)($, d.sideMenu.id, d, pe)
2613
+ }, {
2614
+ default: h(() => [
2615
+ d.sideMenu.icon ? (u(), y("i", {
2616
+ key: 0,
2617
+ class: ne(`prefix ${d.sideMenu.icon}`)
2618
+ }, null, 2)) : N("", !0),
2619
+ H(" " + M(e($e)(d.sideMenu.id)), 1)
2620
+ ]),
2621
+ _: 2
2622
+ }, 1032, ["name", "url", "title", "onClick"]),
2623
+ (u(!0), y(K, null, re(d.sideMenu.children, ($) => (u(), z(e(Qe), {
2624
+ name: $.id,
2625
+ url: $.url,
2626
+ title: e($e)($.id),
2627
+ onClick: (J, pe, ye) => e(w)(J, $.id, d, ye)
2628
+ }, {
2629
+ default: h(() => [
2630
+ $.icon ? (u(), y("i", {
2631
+ key: 0,
2632
+ class: ne(`prefix ${$.icon}`)
2633
+ }, null, 2)) : N("", !0),
2634
+ H(" " + M(e($e)($.id)) + " ", 1),
2635
+ $.children.length ? (u(), y("i", Es)) : N("", !0)
2636
+ ]),
2637
+ _: 2
2638
+ }, 1032, ["name", "url", "title", "onClick"]))), 256))
2639
+ ]),
2640
+ _: 2
2641
+ }, 1032, ["modelValue", "onUpdate:modelValue"])
2642
+ ]),
2643
+ key: "0"
2644
+ } : void 0,
2645
+ d.headerMenu && d.headerMenu.children.length ? {
2646
+ name: "header",
2647
+ fn: h(() => [
2648
+ k(e(ma), {
2649
+ modelValue: d.headerMenuId,
2650
+ "onUpdate:modelValue": ($) => d.headerMenuId = $
2651
+ }, {
2652
+ default: h(() => [
2653
+ k(e(zt), {
2654
+ name: d.headerMenu.id,
2655
+ url: d.headerMenu.url,
2656
+ onClick: ($, J, pe) => e(T)($, d.headerMenu.id, d, pe)
2657
+ }, {
2658
+ default: h(() => [
2659
+ f("i", {
2660
+ class: ne(d.headerMenu.icon)
2661
+ }, null, 2),
2662
+ H(" " + M(e($e)(d.headerMenu.id)), 1)
2663
+ ]),
2664
+ _: 2
2665
+ }, 1032, ["name", "url", "onClick"]),
2666
+ (u(!0), y(K, null, re(d.headerMenu.children, ($) => (u(), z(e(zt), {
2667
+ name: $.id,
2668
+ url: $.url,
2669
+ onClick: (J, pe, ye) => e(T)(J, $.id, d, ye)
2670
+ }, {
2671
+ default: h(() => [
2672
+ f("i", {
2673
+ class: ne($.icon)
2674
+ }, null, 2),
2675
+ H(" " + M(e($e)($.id)), 1)
2676
+ ]),
2677
+ _: 2
2678
+ }, 1032, ["name", "url", "onClick"]))), 256))
2679
+ ]),
2680
+ _: 2
2681
+ }, 1032, ["modelValue", "onUpdate:modelValue"])
2682
+ ]),
2683
+ key: "1"
2684
+ } : void 0
2685
+ ]), 1032, ["id", "bottom", "options", "onMin", "onClose", "onFocus", "modelValue", "onUpdate:modelValue"]))), 128)),
2686
+ k(e(co), {
2687
+ ref_key: "feedbackRef",
2688
+ ref: s,
2689
+ bottom: e(a).height
2690
+ }, null, 8, ["bottom"]),
2691
+ k(e(ft), {
2692
+ bottom: e(a).height
2693
+ }, null, 8, ["bottom"])
2694
+ ], 512));
2695
+ }
2696
+ }), Os = {
2697
+ key: 0,
2698
+ class: "no-redirect"
2699
+ }, Bs = ["onClick"], Ns = /* @__PURE__ */ Y({
2700
+ __name: "Breadcrumb",
2701
+ setup(_) {
2702
+ let t = null, o = He();
2703
+ _l();
2704
+ let s = () => {
2705
+ let a = o.matched.filter((i) => i.meta && i.meta.title);
2706
+ const r = a[0];
2707
+ n(r), t = a.filter((i) => i.meta && i.meta.title && i.meta.breadcrumb !== !1);
2708
+ }, n = (a) => {
2709
+ const r = a && a.name;
2710
+ return r ? r.trim().toLocaleLowerCase() == "Dashboard".toLocaleLowerCase() : !1;
2711
+ }, l = (a) => {
2712
+ };
2713
+ return fe(() => {
2714
+ s();
2715
+ }), _e(o, (a) => {
2716
+ a.path.startsWith("/redirect/") || s();
2717
+ }), (a, r) => {
2718
+ const i = B("el-breadcrumb-item"), p = B("el-breadcrumb");
2719
+ return u(), z(p, { separator: "/" }, {
2720
+ default: h(() => [
2721
+ k(ml, { name: "breadcrumb" }, {
2722
+ default: h(() => [
2723
+ (u(!0), y(K, null, re(e(t), (c, g) => (u(), z(i, {
2724
+ key: c.path
2725
+ }, {
2726
+ default: h(() => [
2727
+ c.redirect == "noRedirect" || c == e(t)[e(t).length - 1] ? (u(), y("span", Os, M(c.meta.title), 1)) : (u(), y("a", {
2728
+ key: 1,
2729
+ onClick: ze((v) => e(l)(c), ["prevent"])
2730
+ }, M(c.meta.title), 9, Bs))
2731
+ ]),
2732
+ _: 2
2733
+ }, 1024))), 128))
2734
+ ]),
2735
+ _: 1
2736
+ })
2737
+ ]),
2738
+ _: 1
2739
+ });
2740
+ };
2741
+ }
2742
+ }), Ws = {
2743
+ key: 0,
2744
+ class: "fa fa-outdent"
2745
+ }, As = {
2746
+ key: 1,
2747
+ class: "fa fa-indent"
2748
+ }, Hs = /* @__PURE__ */ Y({
2749
+ __name: "Hamburger",
2750
+ props: {
2751
+ isActive: { type: Boolean, default: !1 }
2752
+ },
2753
+ emits: ["toggleClick"],
2754
+ setup(_, { emit: t }) {
2755
+ let o = t, s = () => {
2756
+ o("toggleClick");
2757
+ };
2758
+ return (n, l) => (u(), y("div", {
2759
+ class: "hamburger",
2760
+ onClick: l[0] || (l[0] = //@ts-ignore
2761
+ (...a) => e(s) && e(s)(...a))
2762
+ }, [
2763
+ _.isActive ? (u(), y("i", Ws)) : (u(), y("i", As))
2764
+ ]));
2765
+ }
2766
+ }), js = /* @__PURE__ */ f("i", { class: "fa fa-sync" }, null, -1), Fs = [
2767
+ js
2768
+ ], qs = /* @__PURE__ */ Y({
2769
+ __name: "Refresh",
2770
+ emits: ["refresh"],
2771
+ setup(_, { emit: t }) {
2772
+ let o = t, s = () => {
2773
+ o("refresh");
2774
+ };
2775
+ return (n, l) => (u(), y("div", {
2776
+ class: ne(["btn-refresh", { loading: !1 }]),
2777
+ onClick: l[0] || (l[0] = //@ts-ignore
2778
+ (...a) => e(s) && e(s)(...a))
2779
+ }, Fs));
2780
+ }
2781
+ }), Ys = { class: "header-left" }, Xs = { class: "header-middle" }, At = /* @__PURE__ */ Y({
2782
+ __name: "Index",
2783
+ props: {
2784
+ form: {}
2785
+ },
2786
+ emits: ["refresh"],
2787
+ setup(_, { emit: t }) {
2788
+ let o = t, s = _, { form: n } = oe(s), l, a = async () => {
2789
+ n.value.opened = !n.value.opened, n.value.opened ? n.value.width = l : (l = n.value.width, n.value.width = 78);
2790
+ };
2791
+ fe(async () => {
2792
+ yl().start();
2793
+ });
2794
+ let r = ie(() => Ve.getComponent("/", "header"));
2795
+ return (i, p) => (u(), y(K, null, [
2796
+ f("div", Ys, [
2797
+ k(Hs, {
2798
+ "is-active": e(n).opened,
2799
+ onToggleClick: e(a)
2800
+ }, null, 8, ["is-active", "onToggleClick"]),
2801
+ k(qs, {
2802
+ onRefresh: p[0] || (p[0] = (c) => e(o)("refresh"))
2803
+ }),
2804
+ k(Ns)
2805
+ ]),
2806
+ f("div", Xs, [
2807
+ (u(), z(Ae(e(r))))
2808
+ ]),
2809
+ k(ht)
2810
+ ], 64));
2811
+ }
2812
+ }), Ks = { class: "side-header" }, Js = /* @__PURE__ */ f("i", { class: "fa fa-search" }, null, -1), Gs = { class: "side-body" }, Qs = {
2813
+ key: 1,
2814
+ class: "ha-empty"
2815
+ }, Zs = ["innerHTML"], ea = { class: "main-container" }, ta = {
2816
+ key: 0,
2817
+ class: "nav-bar"
2818
+ }, la = {
2819
+ components: { HeaderIndex: At }
2820
+ }, oa = /* @__PURE__ */ Y({
2821
+ ...la,
2822
+ __name: "Side",
2823
+ setup(_) {
2824
+ let t = x(), o = He(), s = x(), n = x(), l = x(), a = new ct(), r = new Tt(), i = x({
2825
+ /**
2826
+ * 是否打开
2827
+ */
2828
+ opened: !0,
2829
+ /**
2830
+ * 侧边栏宽度
2831
+ */
2832
+ width: Ge.getSidebarWidth(),
2833
+ /**
2834
+ * 是否隐藏侧边导航栏和顶部导航栏
2835
+ */
2836
+ hideNav: !1
2837
+ }), p = () => {
2838
+ t.value.refresh();
2839
+ }, c = (O) => {
2840
+ t.value.beforeClose(O);
2841
+ }, g = (O) => {
2842
+ typeof O == "string" && Se.setI18nTitle(O);
2843
+ }, v = (O) => {
2844
+ me.to(O, !1);
2845
+ }, w = (O) => {
2846
+ U("ctrlS", O);
2847
+ }, T = (O) => {
2848
+ U("ctrlEnter", O);
2849
+ }, U = (O, W) => {
2850
+ if (!t.value || !t.value.keyboard)
2851
+ return !1;
2852
+ t.value.keyboard(O, W);
2853
+ }, A = (O) => {
2854
+ let W = JSON.parse(O.data);
2855
+ t.value.handler(W);
2856
+ }, S = async (O) => {
2857
+ i.value.width = O;
2858
+ }, P = () => {
2859
+ n.value = o.fullPath, l.value = o.query.m;
2860
+ };
2861
+ P(), fe(async () => {
2862
+ await r.open(i.value, "sys", "side"), i.value.hideNav = !!o.query.hide_nav, De.subscribe(A), Vt.bind(["beforeunload"], window, c), a.ctrlS(document, w), a.ctrlEnter(document, T);
2863
+ }), lt(() => {
2864
+ Vt.unbind(["beforeunload"], window, c), a.removeCtrlS(document), a.removeCtrlEnter(document);
2865
+ });
2866
+ let C = ie(() => Te.searchTree(s.value, Z.menus, "children", ["name", "url"]));
2867
+ return _e(() => o.fullPath, (O, W) => {
2868
+ P();
2869
+ }), (O, W) => {
2870
+ const te = B("el-input"), se = B("el-backtop");
2871
+ return u(), z(e(Nt), {
2872
+ class: "app-wrapper",
2873
+ width: e(i).width,
2874
+ onResize: e(S)
2875
+ }, {
2876
+ left: h(() => [
2877
+ f("div", {
2878
+ class: ne(["side-nav", { hide: !e(i).opened }])
2879
+ }, [
2880
+ f("div", Ks, [
2881
+ k(gt, { onClick: e(v) }, null, 8, ["onClick"]),
2882
+ k(te, {
2883
+ type: "text",
2884
+ clearable: "",
2885
+ placeholder: e(j)("common.search_menu"),
2886
+ modelValue: e(s),
2887
+ "onUpdate:modelValue": W[0] || (W[0] = (ae) => be(s) ? s.value = ae : s = ae)
2888
+ }, {
2889
+ prefix: h(() => [
2890
+ Js
2891
+ ]),
2892
+ _: 1
2893
+ }, 8, ["placeholder", "modelValue"])
2894
+ ]),
2895
+ f("div", Gs, [
2896
+ e(C).length ? (u(), z(e(Ht), {
2897
+ key: 0,
2898
+ menus: e(C),
2899
+ direction: "vertical",
2900
+ "expand-active": "",
2901
+ onClick: e(v),
2902
+ modelValue: e(l),
2903
+ "onUpdate:modelValue": W[1] || (W[1] = (ae) => be(l) ? l.value = ae : l = ae)
2904
+ }, null, 8, ["menus", "onClick", "modelValue"])) : (u(), y("div", Qs, M(e(j)("common.no_permission")), 1))
2905
+ ]),
2906
+ f("div", {
2907
+ class: "side-footer",
2908
+ innerHTML: e(j)("sys.powered_by")
2909
+ }, null, 8, Zs)
2910
+ ], 2)
2911
+ ]),
2912
+ default: h(() => [
2913
+ f("div", ea, [
2914
+ e(i).hideNav ? N("", !0) : (u(), y("div", ta, [
2915
+ k(At, {
2916
+ form: e(i),
2917
+ onRefresh: e(p)
2918
+ }, null, 8, ["form", "onRefresh"])
2919
+ ])),
2920
+ f("section", {
2921
+ class: "ha-main",
2922
+ style: we({ height: e(i).hideNav ? "100vh" : "calc(100vh - 49px)" })
2923
+ }, [
2924
+ k(e(Ee), {
2925
+ ref_key: "mainRef",
2926
+ ref: t,
2927
+ url: e(n),
2928
+ onLoaded: e(g),
2929
+ onNavigate: e(v)
2930
+ }, null, 8, ["url", "onLoaded", "onNavigate"]),
2931
+ k(se, { target: ".ha-main" })
2932
+ ], 4),
2933
+ k(e(ft))
2934
+ ])
2935
+ ]),
2936
+ _: 1
2937
+ }, 8, ["width", "onResize"]);
2938
+ };
2939
+ }
2940
+ }), sa = { class: "top-nav-header" }, aa = { class: "top-nav-menu" }, na = /* @__PURE__ */ f("div", { class: "header-middle" }, null, -1), ra = { class: "main-container" }, ia = { class: "ha-main" }, ua = /* @__PURE__ */ Y({
2941
+ __name: "Top",
2942
+ setup(_) {
2943
+ let t = x(), o = x(), s = x(), n = x(), l = He(), a = x(), r = new We(), i = new ct(), p = (S) => {
2944
+ typeof S == "string" && Se.setI18nTitle(S);
2945
+ }, c = (S) => {
2946
+ me.to(S, !1);
2947
+ }, g = (S) => {
2948
+ w("ctrlS", S);
2949
+ }, v = (S) => {
2950
+ w("ctrlEnter", S);
2951
+ }, w = (S, P) => {
2952
+ if (!t.value || !t.value.keyboard)
2953
+ return !1;
2954
+ t.value.keyboard(S, P);
2955
+ }, T = (S) => {
2956
+ let P = JSON.parse(S.data);
2957
+ t.value.handler(P);
2958
+ }, U = (S) => {
2959
+ var P;
2960
+ (P = n.value) == null || P.resize(S[0]);
2961
+ }, A = () => {
2962
+ o.value = l.fullPath, a.value = l.query.m;
2963
+ };
2964
+ return A(), fe(() => {
2965
+ r.resize(s.value, U), i.ctrlS(document, g), i.ctrlEnter(document, v), De.subscribe(T);
2966
+ }), pt(() => {
2967
+ i.removeCtrlS(document), i.removeCtrlEnter(document), r.dispose();
2968
+ }), _e(() => l.fullPath, (S, P) => {
2969
+ A();
2970
+ }), (S, P) => {
2971
+ const C = B("el-backtop");
2972
+ return u(), y("div", {
2973
+ ref_key: "appRef",
2974
+ ref: s,
2975
+ class: "app-wrapper"
2976
+ }, [
2977
+ f("div", sa, [
2978
+ f("div", aa, [
2979
+ k(gt, { onClick: e(c) }, null, 8, ["onClick"]),
2980
+ k(e(Ht), {
2981
+ ref_key: "menuRef",
2982
+ ref: n,
2983
+ menus: e(Z).menus,
2984
+ modelValue: e(a),
2985
+ "onUpdate:modelValue": P[0] || (P[0] = (O) => be(a) ? a.value = O : a = O),
2986
+ onClick: e(c)
2987
+ }, null, 8, ["menus", "modelValue", "onClick"]),
2988
+ na,
2989
+ k(ht)
2990
+ ])
2991
+ ]),
2992
+ f("div", ra, [
2993
+ f("section", ia, [
2994
+ k(e(Ee), {
2995
+ ref_key: "mainRef",
2996
+ ref: t,
2997
+ url: e(o),
2998
+ onLoaded: e(p),
2999
+ onNavigate: e(c)
3000
+ }, null, 8, ["url", "onLoaded", "onNavigate"]),
3001
+ k(C, { target: ".ha-main" })
3002
+ ]),
3003
+ k(e(ft))
3004
+ ])
3005
+ ], 512);
3006
+ };
3007
+ }
3008
+ }), da = {
3009
+ components: { DesktopLayout: Ps, SideLayout: oa, TopLayout: ua }
3010
+ }, Ka = /* @__PURE__ */ Y({
3011
+ ...da,
3012
+ __name: "Index",
3013
+ setup(_) {
3014
+ let { app: t } = Le.sys, o = () => {
3015
+ Se.setTitle(), Lt.emit("mounted", "主框架加载完毕事件");
3016
+ };
3017
+ return fe(() => {
3018
+ o();
3019
+ }), (s, n) => {
3020
+ const l = B("el-watermark");
3021
+ return u(), z(l, {
3022
+ class: "ha-watermark",
3023
+ "z-index": 99,
3024
+ content: e(ve).watermark
3025
+ }, {
3026
+ default: h(() => [
3027
+ (u(), z(Ae(`${e(t).layout}-layout`), null, {
3028
+ default: h(() => [
3029
+ H(" 未实现的布局方式:" + M(e(t).layout), 1)
3030
+ ]),
3031
+ _: 1
3032
+ }))
3033
+ ]),
3034
+ _: 1
3035
+ }, 8, ["content"]);
3036
+ };
3037
+ }
3038
+ }), ca = ["href", "target"], zt = /* @__PURE__ */ Y({
3039
+ __name: "HeaderTab",
3040
+ props: {
3041
+ name: String,
3042
+ url: String
3043
+ },
3044
+ emits: ["click"],
3045
+ setup(_, { emit: t }) {
3046
+ let o = t, s = _, { name: n, url: l } = oe(s), a = Pt("model"), r = (p, c, g) => {
3047
+ p.preventDefault(), g || (a.value = c), o("click", p, c, g);
3048
+ }, i = ie(() => de.getAnchor(l.value, { m: n.value }));
3049
+ return (p, c) => (u(), y("a", {
3050
+ class: ne(["ha-window-tab", { current: e(a) == e(n) }]),
3051
+ href: e(i).href,
3052
+ target: e(i).target,
3053
+ onClick: [
3054
+ c[0] || (c[0] = ze((g) => e(r)(g, e(n), !1), ["exact"])),
3055
+ c[1] || (c[1] = ze((g) => e(r)(g, e(n), !0), ["ctrl"]))
3056
+ ]
3057
+ }, [
3058
+ ee(p.$slots, "default")
3059
+ ], 10, ca));
3060
+ }
3061
+ }), ma = /* @__PURE__ */ Y({
3062
+ __name: "HeaderTabs",
3063
+ props: {
3064
+ modelValue: String
3065
+ },
3066
+ emits: ["update:modelValue"],
3067
+ setup(_, { emit: t }) {
3068
+ let o = t, s = _, { modelValue: n } = oe(s), l = ie({
3069
+ get() {
3070
+ return n.value;
3071
+ },
3072
+ set(a) {
3073
+ o("update:modelValue", a);
3074
+ }
3075
+ });
3076
+ return Ot("model", l), (a, r) => ee(a.$slots, "default");
3077
+ }
3078
+ }), pa = {}, va = { class: "ha-miss-component" }, fa = /* @__PURE__ */ f("div", { class: "miss-title" }, "404", -1), ha = { class: "miss-content" };
3079
+ function ga(_, t) {
3080
+ return u(), y("div", va, [
3081
+ fa,
3082
+ f("div", ha, [
3083
+ ee(_.$slots, "default")
3084
+ ])
3085
+ ]);
3086
+ }
3087
+ const Ja = /* @__PURE__ */ Wt(pa, [["render", ga]]), _a = ["href", "target"], ya = { class: "menu-text" }, ba = {
3088
+ key: 0,
3089
+ class: "arrow fa fa-chevron-down"
3090
+ }, wa = {
3091
+ key: 1,
3092
+ class: "arrow fa fa-chevron-right"
3093
+ }, ka = /* @__PURE__ */ Y({
3094
+ __name: "MenuItem",
3095
+ props: {
3096
+ menu: { type: Object, required: !0 },
3097
+ level: { type: Number, required: !0 },
3098
+ direction: { type: String },
3099
+ //顶层菜单方向
3100
+ opts: { type: Object },
3101
+ activeIds: { type: Array },
3102
+ modelValue: { type: String }
3103
+ },
3104
+ emits: ["click"],
3105
+ setup(_, { expose: t, emit: o }) {
3106
+ let s = o, n = _, { menu: l, level: a, direction: r, opts: i, activeIds: p, modelValue: c } = oe(n), g = x(), v = x(), w = x(), T = x(), U = x(!1), A = new We(), S = (L) => {
3107
+ U.value = !1, s("click", L);
3108
+ }, P = (L) => {
3109
+ U.value = !1, s("click", L);
3110
+ }, C = () => {
3111
+ O(g.value);
3112
+ }, O = (L) => {
3113
+ let F = he.getViewportStyle(L, ".menu-title", ".el-scrollbar__view", window.document.documentElement, se.value);
3114
+ T.value = F, w.value && w.value.update();
3115
+ }, W = (L) => {
3116
+ O(L.currentTarget), U.value = !0, A.dispose();
3117
+ }, te = (L) => {
3118
+ A.debounce(() => {
3119
+ U.value = !1;
3120
+ }, 100);
3121
+ }, se = ie(() => {
3122
+ let L;
3123
+ return a.value == 1 && r.value == "horizontal" ? L = "bottom" : L = "right", L;
3124
+ }), ae = ie(() => p.value.includes(l.value[i.value.id])), X = ie(() => de.getAnchor(l.value.url, { m: l.value[i.value.id] }));
3125
+ return t({ resize: C }), (L, F) => {
3126
+ const ue = B("menu-item", !0), D = B("el-scrollbar");
3127
+ return u(), y("div", {
3128
+ ref_key: "menuRef",
3129
+ ref: g,
3130
+ class: ne(["ha-menu", { active: e(ae), current: e(l)[e(i).id] == e(c), horizontal: e(a) == 1 && e(r) == "horizontal", vertical: e(a) > 1 || e(r) == "vertical", hovered: e(U) }]),
3131
+ onMouseover: F[2] || (F[2] = //@ts-ignore
3132
+ (...m) => e(W) && e(W)(...m)),
3133
+ onMouseout: F[3] || (F[3] = //@ts-ignore
3134
+ (...m) => e(te) && e(te)(...m))
3135
+ }, [
3136
+ f("a", {
3137
+ class: "menu-title",
3138
+ href: e(X).href,
3139
+ target: e(X).target,
3140
+ onClick: F[0] || (F[0] = ze((m) => e(S)(e(l)), ["prevent"])),
3141
+ style: we({ paddingLeft: e(a) * 20 + "px" })
3142
+ }, [
3143
+ f("i", {
3144
+ class: ne(["icon", e(l)[e(i).icon]])
3145
+ }, null, 2),
3146
+ f("span", ya, M(e($e)(e(l)[e(i).id])), 1),
3147
+ e(l)[e(i).children].length > 0 ? (u(), y(K, { key: 0 }, [
3148
+ e(se) == "bottom" ? (u(), y("i", ba)) : (u(), y("i", wa))
3149
+ ], 64)) : N("", !0)
3150
+ ], 12, _a),
3151
+ e(l)[e(i).children].length > 0 ? (u(), y("div", {
3152
+ key: 0,
3153
+ class: "menu-content",
3154
+ style: we(e(T))
3155
+ }, [
3156
+ k(D, {
3157
+ ref_key: "scrollerRef",
3158
+ ref: w
3159
+ }, {
3160
+ default: h(() => [
3161
+ (u(!0), y(K, null, re(e(l)[e(i).children], (m) => (u(), z(ue, {
3162
+ ref_for: !0,
3163
+ ref_key: "menusRef",
3164
+ ref: v,
3165
+ menu: m,
3166
+ level: e(a) + 1,
3167
+ opts: e(i),
3168
+ "active-ids": e(p),
3169
+ onClick: e(P),
3170
+ modelValue: e(c),
3171
+ "onUpdate:modelValue": F[1] || (F[1] = (I) => be(c) ? c.value = I : c = I),
3172
+ key: m[e(i).id]
3173
+ }, null, 8, ["menu", "level", "opts", "active-ids", "onClick", "modelValue"]))), 128))
3174
+ ]),
3175
+ _: 1
3176
+ }, 512)
3177
+ ], 4)) : N("", !0)
3178
+ ], 34);
3179
+ };
3180
+ }
3181
+ }), Ht = /* @__PURE__ */ Y({
3182
+ __name: "Menu",
3183
+ props: {
3184
+ menus: { type: Array, required: !0 },
3185
+ direction: { type: String, default: "horizontal" },
3186
+ //顶层菜单方向
3187
+ expandActive: { type: Boolean, default: !1 },
3188
+ //展开激活状态的菜单
3189
+ options: { type: Object },
3190
+ modelValue: { type: String }
3191
+ },
3192
+ emits: ["click", "update:modelValue"],
3193
+ setup(_, { expose: t, emit: o }) {
3194
+ let s = o, n = _, { menus: l, direction: a, options: r, modelValue: i } = oe(n), p = x(), c = (T) => {
3195
+ let U = T[v.value.id], A = de.getUrl(T[v.value.url], { m: U });
3196
+ s("update:modelValue", U), s("click", A);
3197
+ }, g = (T) => {
3198
+ }, v = ie(() => {
3199
+ var U, A, S, P, C;
3200
+ return {
3201
+ id: ((U = r.value) == null ? void 0 : U.id) || "id",
3202
+ title: ((A = r.value) == null ? void 0 : A.title) || "title",
3203
+ url: ((S = r.value) == null ? void 0 : S.url) || "url",
3204
+ icon: ((P = r.value) == null ? void 0 : P.icon) || "icon",
3205
+ children: ((C = r.value) == null ? void 0 : C.children) || "children"
3206
+ };
3207
+ }), w = ie(() => Te.getParentsById(i.value, v.value.id, l.value, v.value.children, !0).map((A) => A[v.value.id]));
3208
+ return t({ resize: g }), (T, U) => {
3209
+ const A = B("el-scrollbar");
3210
+ return u(), z(A, null, {
3211
+ default: h(() => [
3212
+ f("div", {
3213
+ class: ne(["ha-menus", e(a)])
3214
+ }, [
3215
+ (u(!0), y(K, null, re(e(l), (S) => (u(), z(ka, {
3216
+ ref_for: !0,
3217
+ ref_key: "menusRef",
3218
+ ref: p,
3219
+ menu: S,
3220
+ direction: e(a),
3221
+ level: 1,
3222
+ opts: e(v),
3223
+ "active-ids": e(w),
3224
+ onClick: e(c),
3225
+ modelValue: e(i),
3226
+ "onUpdate:modelValue": U[0] || (U[0] = (P) => be(i) ? i.value = P : i = P),
3227
+ key: S[e(v).id]
3228
+ }, null, 8, ["menu", "direction", "opts", "active-ids", "onClick", "modelValue"]))), 128))
3229
+ ], 2)
3230
+ ]),
3231
+ _: 1
3232
+ });
3233
+ };
3234
+ }
3235
+ }), xa = ["href", "target", "title"], Qe = /* @__PURE__ */ Y({
3236
+ __name: "SideTab",
3237
+ props: {
3238
+ name: String,
3239
+ url: String,
3240
+ title: String
3241
+ },
3242
+ emits: ["click"],
3243
+ setup(_, { emit: t }) {
3244
+ let o = t, s = _, { name: n, url: l, title: a } = oe(s), r = Pt("model"), i = (c, g, v) => {
3245
+ c.preventDefault(), v || (r.value = g), o("click", c, g, v);
3246
+ }, p = ie(() => de.getAnchor(l.value, { m: n.value }));
3247
+ return (c, g) => (u(), y("a", {
3248
+ class: ne(["ha-window-tab", { current: e(r) == e(n) }]),
3249
+ href: e(p).href,
3250
+ target: e(p).target,
3251
+ title: e(a),
3252
+ onClick: [
3253
+ g[0] || (g[0] = ze((v) => e(i)(v, e(n), !1), ["exact"])),
3254
+ g[1] || (g[1] = ze((v) => e(i)(v, e(n), !0), ["ctrl"]))
3255
+ ]
3256
+ }, [
3257
+ ee(c.$slots, "default")
3258
+ ], 10, xa));
3259
+ }
3260
+ }), jt = /* @__PURE__ */ Y({
3261
+ __name: "SideTabs",
3262
+ props: {
3263
+ modelValue: String
3264
+ },
3265
+ emits: ["update:modelValue"],
3266
+ setup(_, { emit: t }) {
3267
+ let o = t, s = _, { modelValue: n } = oe(s), l = ie({
3268
+ get() {
3269
+ return n.value;
3270
+ },
3271
+ set(a) {
3272
+ o("update:modelValue", a);
3273
+ }
3274
+ });
3275
+ return Ot("model", l), (a, r) => ee(a.$slots, "default");
3276
+ }
3277
+ }), $a = { class: "window-header" }, Ca = { class: "window-main" }, Va = { class: "window-main-body" }, Sa = {
3278
+ key: 1,
3279
+ class: "window-main-footer"
3280
+ }, Ra = { class: "window-resizer" }, _t = /* @__PURE__ */ Y({
3281
+ __name: "Window",
3282
+ props: /* @__PURE__ */ Re({
3283
+ id: {},
3284
+ title: {},
3285
+ class: {},
3286
+ bottom: { default: 0 },
3287
+ options: {}
3288
+ }, {
3289
+ modelValue: { type: Boolean },
3290
+ modelModifiers: {}
3291
+ }),
3292
+ emits: /* @__PURE__ */ Re(["focus", "blur", "min", "max", "close"], ["update:modelValue"]),
3293
+ setup(_, { expose: t, emit: o }) {
3294
+ let s = o, n = _, { id: l, title: a, bottom: r } = oe(n), i = x(), p = x(), c = x(), g = x(), v = x(), w = x(), T = x(), U = x(), A = x(), S = null, P = null, C = null, O = null, W = null, te = null, se = null, ae = null, X, L = Be(_, "modelValue"), F = x(!1), ue = new We(), m = ((R) => {
3295
+ let E;
3296
+ return R ? (E = Ut(n.options), _e(() => n.options, (Q, q) => {
3297
+ ke.mergeTo(m.value, Q);
3298
+ }, { deep: !0 })) : E = Ut({}), E;
3299
+ })(n.options), I = () => {
3300
+ let R = Et();
3301
+ v.value = R.shortcutSlot != null, w.value = R.title != null, T.value = R.side != null, U.value = R.header != null, A.value = R.footer != null;
3302
+ }, ce = () => {
3303
+ let R = he.getWidth(document.body), E = he.getHeight(document.body) - r.value;
3304
+ if (m.value.side == null && T.value && (m.value.side = 120), m.value.width == null) {
3305
+ let Q = 0.6;
3306
+ R < 800 ? Q = 0.96 : R < 1200 && (Q = 0.8), m.value.width = R * Q;
3307
+ }
3308
+ if (m.value.height == null) {
3309
+ let Q = 0.6;
3310
+ E < 800 ? Q = 0.96 : E < 1200 && (Q = 0.8), m.value.height = E * Q;
3311
+ }
3312
+ m.value.x == null && (m.value.x = (R - m.value.width) / 2), m.value.y == null && (m.value.y = (E - m.value.height) / 2);
3313
+ }, le = (R) => {
3314
+ if (m.value.state == "max") {
3315
+ Pe();
3316
+ return;
3317
+ }
3318
+ Fe();
3319
+ }, V = (R) => 0, b = (R, E, Q, q, ge) => {
3320
+ if (!q) {
3321
+ pe(R);
3322
+ return;
3323
+ }
3324
+ S = R, m.value.state == "max" ? (J(R, se), P = ke.copy(m.value)) : m.value.state == "left" || m.value.state == "right" ? (J(R, ae), P = ke.copy(m.value)) : (P = ke.copy(m.value), pe(R));
3325
+ }, d = () => {
3326
+ S = null, F.value && ($(), F.value = !1);
3327
+ }, $ = () => {
3328
+ let R = m.value.state;
3329
+ R == "left" ? (m.value.x = 0, m.value.y = 0, m.value.width = document.body.clientWidth / 2, m.value.height = document.body.clientHeight - r.value) : R == "right" && (m.value.x = document.body.clientWidth / 2, m.value.y = 0, m.value.width = document.body.clientWidth / 2, m.value.height = document.body.clientHeight - r.value);
3330
+ }, J = (R, E) => {
3331
+ let Q = he.getWidth(p.value), q = he.getWidth(c.value), ge = he.getWidth(g.value), Ye = i.value.getBoundingClientRect(), Xe = (R.x - Ye.x - Q) / q, Jt = (E.width - Q - ge) * Xe;
3332
+ m.value.width = E.width, m.value.height = E.height, m.value.x = R.x - Q - Jt, m.value.y = 0, m.value.state = null;
3333
+ }, pe = (R) => {
3334
+ let E = R.x - S.x, Q = R.y - S.y;
3335
+ m.value.x = P.x + E, m.value.y = P.y + Q, R.affix != null ? (ae = ke.copy(m.value), m.value.state = R.affix, F.value = !0) : (ae = null, m.value.state = null, F.value = !1);
3336
+ }, ye = (R, E) => {
3337
+ R.preventDefault(), W = E, Ft(), C = R, O = ke.copy(m.value);
3338
+ }, yt = (R) => {
3339
+ let E = W.split("-");
3340
+ for (let Q = 0; Q < E.length; Q++) {
3341
+ let q = E[Q];
3342
+ if (q == "left") {
3343
+ let ge = R.clientX - C.clientX;
3344
+ m.value.x = R.clientX, m.value.width = O.width - ge;
3345
+ }
3346
+ if (q == "top") {
3347
+ let ge = R.clientY - C.clientY;
3348
+ m.value.y = R.clientY, m.value.height = O.height - ge;
3349
+ }
3350
+ if (q == "right") {
3351
+ let ge = R.clientX - C.clientX;
3352
+ m.value.width = O.width + ge;
3353
+ }
3354
+ if (q == "bottom") {
3355
+ let ge = R.clientY - C.clientY;
3356
+ m.value.height = O.height + ge;
3357
+ }
3358
+ }
3359
+ }, bt = (R) => {
3360
+ C = null, O = null, qt();
3361
+ }, Ft = () => {
3362
+ document.addEventListener("mousemove", yt), document.addEventListener("mouseup", bt);
3363
+ }, qt = () => {
3364
+ document.removeEventListener("mousemove", yt), document.removeEventListener("mouseup", bt);
3365
+ }, Yt = (R) => {
3366
+ m.value.side = R;
3367
+ }, je = () => {
3368
+ te = ke.copy(m.value), m.value.state = "min", s("min", "min");
3369
+ }, Fe = () => {
3370
+ se = ke.copy(m.value);
3371
+ let R = he.getWidth(document.body), E = he.getHeight(document.body) - r.value;
3372
+ m.value.x = 0, m.value.y = 0, m.value.width = R, m.value.height = E, m.value.state = "max", s("max", "max");
3373
+ }, Pe = () => {
3374
+ let R = m.value.state == "min" ? te : se;
3375
+ R ? (m.value.x = R.x, m.value.y = R.y, m.value.width = R.width, m.value.height = R.height, m.value.state = R.state) : m.value.state = null, qe();
3376
+ }, wt = () => {
3377
+ L.value = !1, Oe.remove(l.value), s("close");
3378
+ }, kt = (R) => {
3379
+ ot(), s("focus");
3380
+ }, ot = () => {
3381
+ m.value.focus = !0, qe();
3382
+ }, Xt = () => {
3383
+ m.value.focus = !1;
3384
+ }, xt = () => he.getMaxIndex(".ha-window"), qe = () => {
3385
+ m.value.index = xt() + 1;
3386
+ }, Kt = () => {
3387
+ if (m.value.state == "min")
3388
+ Pe();
3389
+ else {
3390
+ let R = xt();
3391
+ m.value.index == R ? je() : qe();
3392
+ }
3393
+ m.value.focus = !0, s("focus");
3394
+ };
3395
+ return vt(() => {
3396
+ I();
3397
+ }), fe(async () => {
3398
+ I(), X = await Ne.provider.getDefault("desktop"), await Oe.loadWindows(X);
3399
+ let R = Oe.get(l.value);
3400
+ if (R) {
3401
+ let { current: q, min: ge, max: Ye, affix: Xe } = R;
3402
+ ke.mergeTo(m.value, q), ge && (te = ge), Ye && (se = Ye), Xe && (ae = Xe);
3403
+ }
3404
+ ce(), m.value.index == null && qe();
3405
+ let E = new al(0, 0, document.body.clientWidth, document.body.clientHeight - r.value), Q = { init: V, handler: b, end: d, range: E, affix: 10 };
3406
+ ue.drag(c.value, Q);
3407
+ }), lt(() => {
3408
+ ue.dispose();
3409
+ }), _e(() => m.value, async (R, E) => {
3410
+ let Q = { id: l.value, current: R, min: te, max: se, affix: ae };
3411
+ await Oe.save(l.value, Q, X);
3412
+ }, { deep: !0 }), t({ focus: ot, blur: Xt, min: je, max: Fe, restore: Pe, affix: $, toggleShow: Kt, options: m.value }), (R, E) => {
3413
+ const Q = B("el-scrollbar");
3414
+ return e(L) ? (u(), z(mt, {
3415
+ key: 0,
3416
+ to: "body"
3417
+ }, [
3418
+ f("div", {
3419
+ ref_key: "windowRef",
3420
+ ref: i,
3421
+ class: ne(["ha-window", [e(m).state, e(n).class, e(m).focus ? "focus" : ""]]),
3422
+ style: we({ left: e(m).x + "px", top: e(m).y + "px", width: e(m).width + "px", height: e(m).height + "px", zIndex: e(m).index }),
3423
+ onMousedown: E[13] || (E[13] = //@ts-ignore
3424
+ (...q) => e(kt) && e(kt)(...q))
3425
+ }, [
3426
+ f("div", $a, [
3427
+ f("div", {
3428
+ ref_key: "shortcutRef",
3429
+ ref: p,
3430
+ class: "header-shortcut"
3431
+ }, [
3432
+ ee(R.$slots, "shortcut")
3433
+ ], 512),
3434
+ f("div", {
3435
+ ref_key: "titleRef",
3436
+ ref: c,
3437
+ class: "header-title",
3438
+ onDblclick: E[0] || (E[0] = //@ts-ignore
3439
+ (...q) => e(le) && e(le)(...q))
3440
+ }, [
3441
+ e(w) ? ee(R.$slots, "title", { key: 0 }) : (u(), y(K, { key: 1 }, [
3442
+ H(M(e(a)), 1)
3443
+ ], 64))
3444
+ ], 544),
3445
+ f("div", {
3446
+ ref_key: "toolbarRef",
3447
+ ref: g,
3448
+ class: "header-toolbar"
3449
+ }, [
3450
+ ee(R.$slots, "toolbar"),
3451
+ f("i", {
3452
+ class: "toolbar-min",
3453
+ onClick: E[1] || (E[1] = //@ts-ignore
3454
+ (...q) => e(je) && e(je)(...q))
3455
+ }),
3456
+ e(m).state != "max" ? (u(), y("i", {
3457
+ key: 0,
3458
+ class: "toolbar-max",
3459
+ onClick: E[2] || (E[2] = //@ts-ignore
3460
+ (...q) => e(Fe) && e(Fe)(...q))
3461
+ })) : (u(), y("i", {
3462
+ key: 1,
3463
+ class: "toolbar-restore",
3464
+ onClick: E[3] || (E[3] = //@ts-ignore
3465
+ (...q) => e(Pe) && e(Pe)(...q))
3466
+ })),
3467
+ f("i", {
3468
+ class: "toolbar-close",
3469
+ onClick: E[4] || (E[4] = //@ts-ignore
3470
+ (...q) => e(wt) && e(wt)(...q))
3471
+ })
3472
+ ], 512)
3473
+ ]),
3474
+ k(e(Nt), {
3475
+ class: "window-body",
3476
+ width: e(m).side,
3477
+ onResize: e(Yt)
3478
+ }, {
3479
+ left: h(() => [
3480
+ e(T) ? (u(), z(Q, {
3481
+ key: 0,
3482
+ class: "window-side"
3483
+ }, {
3484
+ default: h(() => [
3485
+ ee(R.$slots, "side")
3486
+ ]),
3487
+ _: 3
3488
+ })) : N("", !0)
3489
+ ]),
3490
+ default: h(() => [
3491
+ f("div", Ca, [
3492
+ e(U) ? (u(), z(Q, {
3493
+ key: 0,
3494
+ class: "window-main-header",
3495
+ onClick: e(ot)
3496
+ }, {
3497
+ default: h(() => [
3498
+ ee(R.$slots, "header")
3499
+ ]),
3500
+ _: 3
3501
+ }, 8, ["onClick"])) : N("", !0),
3502
+ f("div", Va, [
3503
+ ee(R.$slots, "default")
3504
+ ]),
3505
+ e(A) ? (u(), y("div", Sa, [
3506
+ ee(R.$slots, "footer")
3507
+ ])) : N("", !0)
3508
+ ])
3509
+ ]),
3510
+ _: 3
3511
+ }, 8, ["width", "onResize"]),
3512
+ f("div", Ra, [
3513
+ f("div", {
3514
+ class: "left",
3515
+ onMousedown: E[5] || (E[5] = (q) => e(ye)(q, "left"))
3516
+ }, null, 32),
3517
+ f("div", {
3518
+ class: "top",
3519
+ onMousedown: E[6] || (E[6] = (q) => e(ye)(q, "top"))
3520
+ }, null, 32),
3521
+ f("div", {
3522
+ class: "right",
3523
+ onMousedown: E[7] || (E[7] = (q) => e(ye)(q, "right"))
3524
+ }, null, 32),
3525
+ f("div", {
3526
+ class: "bottom",
3527
+ onMousedown: E[8] || (E[8] = (q) => e(ye)(q, "bottom"))
3528
+ }, null, 32),
3529
+ f("div", {
3530
+ class: "left-top",
3531
+ onMousedown: E[9] || (E[9] = (q) => e(ye)(q, "left-top"))
3532
+ }, null, 32),
3533
+ f("div", {
3534
+ class: "top-right",
3535
+ onMousedown: E[10] || (E[10] = (q) => e(ye)(q, "top-right"))
3536
+ }, null, 32),
3537
+ f("div", {
3538
+ class: "right-bottom",
3539
+ onMousedown: E[11] || (E[11] = (q) => e(ye)(q, "right-bottom"))
3540
+ }, null, 32),
3541
+ f("div", {
3542
+ class: "bottom-left",
3543
+ onMousedown: E[12] || (E[12] = (q) => e(ye)(q, "bottom-left"))
3544
+ }, null, 32)
3545
+ ]),
3546
+ e(F) ? (u(), y("div", {
3547
+ key: 0,
3548
+ class: "window-widget",
3549
+ style: we({ height: `calc(100% - ${e(r)}px)` })
3550
+ }, null, 4)) : N("", !0)
3551
+ ], 38)
3552
+ ])) : N("", !0);
3553
+ };
3554
+ }
3555
+ });
3556
+ class Ga {
3557
+ constructor() {
3558
+ /**
3559
+ * 前端环境变量
3560
+ */
3561
+ G(this, "env");
3562
+ /**
3563
+ * 自定义路由
3564
+ */
3565
+ G(this, "routes");
3566
+ /**
3567
+ * 多语言配置
3568
+ */
3569
+ G(this, "lang");
3570
+ }
3571
+ }
3572
+ let Ma = async () => {
3573
+ await Rt.getElementPlus(), Rt.getFortAwesome(), await import("./assets/halo-fe-B-NiIGas.js").then((_) => _.aR), await Promise.resolve({ });
3574
+ }, Qa = async (_, t) => {
3575
+ St.useEnv(t.env);
3576
+ let o = new nl();
3577
+ o.baseUrl = Ge.api.url, o.messenger = wl, o.lang = t.lang, await rl(o), await Ma(), await Il(), me.open(St.env.base), await ut.useGlobal(_), ut.useRoutes(t.routes);
3578
+ };
3579
+ export {
3580
+ zo as A,
3581
+ zt as B,
3582
+ ma as C,
3583
+ Ht as D,
3584
+ Qe as E,
3585
+ jt as F,
3586
+ qa as G,
3587
+ Ja as H,
3588
+ _t as I,
3589
+ Il as J,
3590
+ Ll as K,
3591
+ Oe as L,
3592
+ Ga as M,
3593
+ Ee as _,
3594
+ ja as a,
3595
+ Wt as b,
3596
+ Ve as c,
3597
+ Ba as d,
3598
+ Tl as e,
3599
+ Xa as f,
3600
+ Nt as g,
3601
+ Fa as h,
3602
+ ut as i,
3603
+ Ya as j,
3604
+ Na as k,
3605
+ Ka as l,
3606
+ Qa as m,
3607
+ Dt as n,
3608
+ Zl as o,
3609
+ Bt as p,
3610
+ Oa as q,
3611
+ me as r,
3612
+ El as s,
3613
+ ql as t,
3614
+ Pl as u,
3615
+ co as v,
3616
+ ft as w,
3617
+ Wa as x,
3618
+ Aa as y,
3619
+ Ha as z
3620
+ };