@huyooo/ui 1.0.3 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (188) hide show
  1. package/dist/AuthkitAppSetting-BN8-xgNq.js +2674 -0
  2. package/dist/{Contact-M6iyuyNL.js → Contact-BWuVR9ho.js} +105 -113
  3. package/dist/CustomTable-BzGfaAVH.js +276 -0
  4. package/dist/FeedbackModal.vue_vue_type_script_setup_true_lang-B9BqGWm8.js +1480 -0
  5. package/dist/LandingPageDescription-BczWZHKy.js +12 -0
  6. package/dist/{LandingPageLinkGroup-DDNRivMt.js → LandingPageLinkGroup-BZJ48Yss.js} +87 -88
  7. package/dist/{LandingPageFAQ-CZJXvor9.js → LandingPageSectionHeader-3hiuw6G0.js} +44 -25
  8. package/dist/{LandingPageSectionTabs-Ce3_Rc2L.js → LandingPageSectionTabs-jRjkWlM-.js} +475 -375
  9. package/dist/LegalDocViewer-DM8FYBpf.js +2501 -0
  10. package/dist/Menu-uCexrsKP.js +199 -0
  11. package/dist/MessageHandle-mEkCsv9e.js +1173 -0
  12. package/dist/MessageList-Ce-_LNTk.js +244 -0
  13. package/dist/PaySubscriptions-CXkEjqr2.js +1326 -0
  14. package/dist/PricingPlans-CV97ck9p.js +427 -0
  15. package/dist/ReferrerReferees-DgygiIiE.js +237 -0
  16. package/dist/{Upload.vue_vue_type_script_setup_true_lang-B6NOZjK0.js → Upload.vue_vue_type_script_setup_true_lang-VGh2V4o0.js} +1 -1
  17. package/dist/UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-zgjpFVln.js +592 -0
  18. package/dist/WidthContainer-PeWkCK0p.js +721 -0
  19. package/dist/{apiClients-DrGX2iJy.js → apiClients-BcXOLuYu.js} +131 -98
  20. package/dist/authkit.d.ts +6 -2
  21. package/dist/authkit.js +53 -44
  22. package/dist/common/authProviderIcons.d.ts +12 -0
  23. package/dist/common/globalConfig.d.ts +5 -0
  24. package/dist/common/tableColumnWidths.d.ts +11 -0
  25. package/dist/common.js +3 -3
  26. package/dist/components/AuthProviderIcon.vue.d.ts +12 -0
  27. package/dist/components/Authkit/AppSetting/AuthkitEmailVerify.vue.d.ts +2 -2
  28. package/dist/components/Authkit/AppSetting/AuthkitOAuthBinding.vue.d.ts +2 -1
  29. package/dist/components/Authkit/AppSetting/AuthkitPasskeyBinding.vue.d.ts +14 -0
  30. package/dist/components/Authkit/AppSetting/AuthkitPasswordUpdate.vue.d.ts +11 -1
  31. package/dist/components/Authkit/AppSetting/AuthkitPersonalInformation.vue.d.ts +1 -3
  32. package/dist/components/Authkit/AppSetting/AuthkitPhoneVerify.vue.d.ts +13 -3
  33. package/dist/components/Authkit/Auth/AuthkitBindEmail.vue.d.ts +29 -2
  34. package/dist/components/Authkit/Auth/AuthkitBindPhone.vue.d.ts +2 -2
  35. package/dist/components/Authkit/Auth/AuthkitEmailUpdate.vue.d.ts +2 -2
  36. package/dist/components/Authkit/Auth/AuthkitOauthItem.vue.d.ts +37 -9
  37. package/dist/components/Authkit/Auth/AuthkitOauthList.vue.d.ts +7 -11
  38. package/dist/components/Authkit/Auth/AuthkitPasswordUpdateAndVerify.vue.d.ts +2 -2
  39. package/dist/components/Authkit/Auth/AuthkitPhonePasswordUpdateAndVerify.vue.d.ts +2 -2
  40. package/dist/components/Authkit/Auth/AuthkitServiceAgreementAndPrivacyProtection.vue.d.ts +11 -7
  41. package/dist/components/Authkit/Auth/AuthkitSignInEmailCode.vue.d.ts +2 -2
  42. package/dist/components/Authkit/Auth/AuthkitSignInPhone.vue.d.ts +3 -62
  43. package/dist/components/Authkit/Auth/AuthkitSignUpPhone.vue.d.ts +2 -2
  44. package/dist/components/Authkit/Auth/AuthkitSwitchSignUpOrResetPassword.vue.d.ts +9 -0
  45. package/dist/components/Authkit/AuthkitAuth.vue.d.ts +2 -8
  46. package/dist/components/Authkit/AuthkitAuthModal.vue.d.ts +0 -4
  47. package/dist/components/Authkit/AuthkitProvider.vue.d.ts +5 -2
  48. package/dist/components/Authkit/AuthkitSendVerifyCode.vue.d.ts +2 -1
  49. package/dist/components/CustomTable.vue.d.ts +27 -1
  50. package/dist/components/Ellipsis.vue.d.ts +2 -6
  51. package/dist/components/Feedback/FeedbackList.vue.d.ts +4 -1
  52. package/dist/components/Gradientbackground.vue.d.ts +2 -2
  53. package/dist/components/HeaderMenus.vue.d.ts +4 -1
  54. package/dist/components/InfiniteLoading.vue.d.ts +1 -1
  55. package/dist/components/LandingPage/LandingPageButton.vue.d.ts +2 -2
  56. package/dist/components/LandingPage/LandingPageContainer.vue.d.ts +2 -2
  57. package/dist/components/LandingPage/LandingPageFeaturePanels.vue.d.ts +19 -0
  58. package/dist/components/LandingPage/LandingPageHero.vue.d.ts +9 -0
  59. package/dist/components/LandingPage/LandingPagePageContent.vue.d.ts +2 -2
  60. package/dist/components/LandingPage/LandingPageSectionHeader.vue.d.ts +1 -14
  61. package/dist/components/LandingPage/LandingPageSections.vue.d.ts +1 -1
  62. package/dist/components/LegalDoc/LegalDocViewer.vue.d.ts +7 -0
  63. package/dist/components/Menu.vue.d.ts +2 -1
  64. package/dist/components/MenuItem.vue.d.ts +3 -1
  65. package/dist/components/Message/MessageAppMessage.vue.d.ts +12 -2
  66. package/dist/components/Message/MessageDetails.vue.d.ts +9 -161
  67. package/dist/components/Message/MessageHandle.vue.d.ts +16 -4
  68. package/dist/components/Message/MessageList.vue.d.ts +4 -3
  69. package/dist/components/Message/MessageNotificationDetails.vue.d.ts +13 -0
  70. package/dist/components/Message/messageBody/DescriptionsMessageBody.vue.d.ts +3 -0
  71. package/dist/components/Message/messageBody/JsonMessageBodyFallback.vue.d.ts +3 -0
  72. package/dist/components/Message/messageBody/TextMessageBody.vue.d.ts +3 -0
  73. package/dist/components/Message/messageBody/descriptionRows.d.ts +14 -0
  74. package/dist/components/Message/messageBody/descriptionsMessageBody.d.ts +32 -0
  75. package/dist/components/Message/messageBody/descriptionsValueRender.d.ts +4 -0
  76. package/dist/components/Message/messageBody/messageBodyRegistry.d.ts +9 -0
  77. package/dist/components/Message/messageBody/registerBuiltinMessageBodies.d.ts +2 -0
  78. package/dist/components/Message/messageBody/types.d.ts +7 -0
  79. package/dist/components/Referrer/ReferrerRefereeCell.vue.d.ts +7 -0
  80. package/dist/components/Referrer/ReferrerReferees.vue.d.ts +1 -0
  81. package/dist/components/UserMenu/UserAccountMenu.vue.d.ts +1 -16
  82. package/dist/components/UserMenu/UserMenuItem.vue.d.ts +4 -0
  83. package/dist/components/UserMenu/UserMenuModals.vue.d.ts +18 -4
  84. package/dist/components/UserMenu/parts/UserAvatar.vue.d.ts +6 -0
  85. package/dist/components/UserMenu/parts/UserBasicInformation.vue.d.ts +7 -2
  86. package/dist/composables/Authkit/fetchAuthPageAboutUs.d.ts +3 -0
  87. package/dist/composables/Authkit/resolveRoutePermission.d.ts +2 -0
  88. package/dist/composables/Authkit/useAuthkitAppsAuthPageInfo.d.ts +16 -0
  89. package/dist/composables/Authkit/useAuthkitAuth.d.ts +2 -0
  90. package/dist/composables/Authkit/useAuthkitPasskey.d.ts +10 -0
  91. package/dist/composables/Authkit/useLegalDocHostActions.d.ts +6 -0
  92. package/dist/composables/Authkit/useLegalDocs.d.ts +19 -0
  93. package/dist/composables/Authkit/useOauth.d.ts +17 -4
  94. package/dist/composables/Authkit/useRegistrationTerms.d.ts +24 -0
  95. package/dist/composables/Authkit/verifyCodeCooldown.d.ts +19 -0
  96. package/dist/composables/Billing/useBillingPlans.d.ts +0 -4
  97. package/dist/composables/Billing/useBillingStatusOptions.d.ts +2 -6
  98. package/dist/composables/Billing/useBillingSubscriptionSummary.d.ts +16 -0
  99. package/dist/composables/Billing/usePaidProductOptions.d.ts +5 -0
  100. package/dist/composables/Message/messageCenterBadgeCounts.d.ts +28 -0
  101. package/dist/composables/UserMenu/useUserMenuBadgeCounts.d.ts +9 -0
  102. package/dist/composables/useInfiniteList.d.ts +19 -0
  103. package/dist/composables/useMessageNotifications.d.ts +3 -6
  104. package/dist/composables.d.ts +4 -2
  105. package/dist/composables.js +50 -45
  106. package/dist/feedback.d.ts +1 -0
  107. package/dist/feedback.js +12 -11
  108. package/dist/fetchAuthPageAboutUs-dzTSwRsB.js +25 -0
  109. package/dist/{Clipboard-Bo7gdpR6.js → index-BkLvw1PU.js} +1 -1
  110. package/dist/landingPage.d.ts +1 -0
  111. package/dist/landingPage.js +41 -40
  112. package/dist/legalDocs/buildBuiltinUrl.d.ts +3 -0
  113. package/dist/{utils/legalLinks.d.ts → legalDocs/constants.d.ts} +0 -10
  114. package/dist/legalDocs/index.d.ts +7 -0
  115. package/dist/legalDocs/isConfigured.d.ts +7 -0
  116. package/dist/legalDocs/open.d.ts +3 -0
  117. package/dist/legalDocs/resolveAppId.d.ts +8 -0
  118. package/dist/legalDocs/resolveTarget.d.ts +4 -0
  119. package/dist/legalDocs/types.d.ts +12 -0
  120. package/dist/main.js +321 -308
  121. package/dist/message.d.ts +3 -0
  122. package/dist/message.js +301 -21
  123. package/dist/pay.d.ts +1 -1
  124. package/dist/pay.js +14 -17
  125. package/dist/privateCom.js +1 -1
  126. package/dist/referrer.js +1 -1
  127. package/dist/style.css +1 -1
  128. package/dist/types/api/auth.generated.d.ts +1385 -328
  129. package/dist/types/api/billing.generated.d.ts +907 -76
  130. package/dist/types/api/ones.generated.d.ts +131 -2
  131. package/dist/types/api.d.ts +1 -0
  132. package/dist/types/app.d.ts +10 -0
  133. package/dist/types/user.d.ts +1 -0
  134. package/dist/upload.js +2 -2
  135. package/dist/{useAuthkitAppsAuthPageInfo-C2yKgl8t.js → useAuthkitAppsAuthPageInfo-CNudJd04.js} +18 -17
  136. package/dist/useAuthkitAuth-3m0yW6uP.js +267 -0
  137. package/dist/{useAuthkitCreateAndUpdate-oo9517Gj.js → useAuthkitCreateAndUpdate-BsINsI-E.js} +1 -1
  138. package/dist/{useAuthkitUsersProfile-BZDk21c8.js → useAuthkitUsersProfile-DJlMsftY.js} +3 -3
  139. package/dist/useBillingStatusOptions-CfHQOFNw.js +71 -0
  140. package/dist/{useEnsureAuthenticated-BuIbxqsO.js → useEnsureAuthenticated-DNkCCy_Y.js} +2 -2
  141. package/dist/useLegalDocs-DQP_Yq6B.js +106 -0
  142. package/dist/{useMessageNotifications-D85_-mDq.js → useMessageNotifications-CAphguOm.js} +21 -24
  143. package/dist/useRoutePermission-CEiya9AM.js +218 -0
  144. package/dist/useSEO-CDWxbk8B.js +221 -0
  145. package/dist/useSubscriptionCheckout-d_M_rKRa.js +368 -0
  146. package/dist/{useUploadCos-BRKRzSy3.js → useUploadCos-C8BqFPkx.js} +1 -1
  147. package/dist/user.js +1 -1
  148. package/dist/userMenuModal-D-nDaYqM.js +66 -0
  149. package/dist/utils/apiMiddlewares.d.ts +5 -5
  150. package/dist/utils/apiResponse.d.ts +11 -0
  151. package/dist/utils/authProviderIcon.d.ts +3 -0
  152. package/dist/utils/authkit.d.ts +20 -7
  153. package/dist/utils/formatPoints.d.ts +8 -0
  154. package/dist/utils/messageNotificationContent.d.ts +4 -0
  155. package/dist/utils/messageTextLink.d.ts +9 -0
  156. package/dist/utils/passkeySupport.d.ts +8 -0
  157. package/dist/utils/pointsFlowTypes.d.ts +10 -0
  158. package/dist/utils/pointsHistoryDisplay.d.ts +8 -0
  159. package/dist/utils/refundStatusDisplay.d.ts +1 -0
  160. package/dist/utils/subscriptionDisplay.d.ts +7 -0
  161. package/dist/utils/userDisplay.d.ts +41 -0
  162. package/package.json +11 -3
  163. package/dist/AuthkitAppSetting-C-0uuLSg.js +0 -1921
  164. package/dist/AuthkitGithubBinding-C5zEy9zN.js +0 -2207
  165. package/dist/CustomTable-nsxN4Ja4.js +0 -276
  166. package/dist/FeedbackModal.vue_vue_type_script_setup_true_lang-M1NQ-rx-.js +0 -1396
  167. package/dist/LandingPageSectionHeader-D_74W4My.js +0 -69
  168. package/dist/Menu-Cy2ZPeaz.js +0 -170
  169. package/dist/MessageHandle-BG12aX0i.js +0 -924
  170. package/dist/MessageList-CrCF8mU6.js +0 -233
  171. package/dist/MessageNoticeNotificationsDetails.vue_vue_type_script_setup_true_lang-gsjL6yAe.js +0 -142
  172. package/dist/PaySubscriptions-lWnEioX5.js +0 -1241
  173. package/dist/PricingPlans-DFcjOMWS.js +0 -404
  174. package/dist/ReferrerReferees-Cn7KaO8z.js +0 -106
  175. package/dist/UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-P0X1Exyu.js +0 -520
  176. package/dist/WidthContainer-CF3qOLWW.js +0 -688
  177. package/dist/common/authPanelWidth.d.ts +0 -2
  178. package/dist/components/Feedback/FeedbackDetails.vue.d.ts +0 -178
  179. package/dist/composables/Authkit/useLegalLinks.d.ts +0 -34
  180. package/dist/index-D3Kp6R4z.js +0 -4
  181. package/dist/useAuthkitAuth-DmS-H7M2.js +0 -175
  182. package/dist/useBillingStatusOptions-B7xLU3fs.js +0 -145
  183. package/dist/useLegalLinks-Cwr45PBT.js +0 -60
  184. package/dist/useRoutePermission-CaWtjLRA.js +0 -212
  185. package/dist/useSEO-BSMQdBR9.js +0 -158
  186. package/dist/useSubscriptionCheckout-BRk5h9aC.js +0 -365
  187. package/dist/useTableHandle-BdujaiNX.js +0 -69
  188. /package/dist/components/{Feedback/FeedbackVideoPreview.vue.d.ts → VideoPreview.vue.d.ts} +0 -0
@@ -0,0 +1,1173 @@
1
+ import { defineComponent as $, computed as L, openBlock as d, createElementBlock as S, toDisplayString as D, createBlock as _, unref as m, ref as f, withCtx as v, createVNode as C, createCommentVNode as h, Fragment as Y, renderList as ne, normalizeClass as Z, watch as ee, createElementVNode as K, createTextVNode as z, resolveDynamicComponent as se, useModel as ie, isRef as le, mergeModels as G } from "vue";
2
+ /* empty css */
3
+ /* empty css */
4
+ import { U as oe } from "./userMenuModal-D-nDaYqM.js";
5
+ /* empty css */
6
+ import { M as j, a as V, u as re } from "./MessageList-Ce-_LNTk.js";
7
+ import { Descriptions as ue, Spin as te, Breadcrumb as q, BreadcrumbItem as R, Tag as U, Modal as ce } from "@arco-design/web-vue";
8
+ import { o as A } from "./apiClients-BcXOLuYu.js";
9
+ import { TiptapEditor as de, TiptapTitle as pe } from "@huyooo/vue-tiptap";
10
+ import { _ as O } from "./_plugin-vue_export-helper-CHgC5LLL.js";
11
+ import { Icon as fe } from "@iconify/vue";
12
+ import { u as ge } from "./useAuthkitCreateAndUpdate-BsINsI-E.js";
13
+ import { M as ve } from "./Menu-uCexrsKP.js";
14
+ function W(a, t, r) {
15
+ if (a == null || a === "")
16
+ return "—";
17
+ if (typeof a == "boolean") {
18
+ if (t && (r != null && r[t])) {
19
+ const [i, l] = r[t];
20
+ return a ? i : l;
21
+ }
22
+ return a ? "是" : "否";
23
+ }
24
+ if (Array.isArray(a))
25
+ return a.map((i) => W(i)).join("、") || "—";
26
+ if (typeof a == "object")
27
+ try {
28
+ return JSON.stringify(a, null, 2);
29
+ } catch {
30
+ return String(a);
31
+ }
32
+ return String(a);
33
+ }
34
+ function ye(a, t = {}) {
35
+ const r = new Set(t.hiddenKeys ?? []), i = t.fieldLabels ?? {}, l = [];
36
+ for (const [c, s] of Object.entries(a))
37
+ r.has(c) || c === t.nestedKey || l.push({
38
+ label: i[c] ?? c,
39
+ value: W(s, c, t.booleanLabels)
40
+ });
41
+ const o = t.nestedKey ? a[t.nestedKey] : void 0;
42
+ if (o && typeof o == "object" && !Array.isArray(o))
43
+ for (const [c, s] of Object.entries(o))
44
+ r.has(c) || l.push({
45
+ label: i[c] ?? c,
46
+ value: W(s, c, t.booleanLabels)
47
+ });
48
+ return l;
49
+ }
50
+ const me = {
51
+ class: "json-message-body-fallback"
52
+ }, _e = {
53
+ key: 0,
54
+ class: "json-message-body-fallback__text"
55
+ }, be = {
56
+ key: 2,
57
+ class: "json-message-body-fallback__raw"
58
+ }, he = /* @__PURE__ */ $({
59
+ __name: "JsonMessageBodyFallback",
60
+ props: {
61
+ data: {},
62
+ title: {},
63
+ description: {},
64
+ type: {}
65
+ },
66
+ setup(a) {
67
+ const t = a, r = L(() => typeof t.data.text == "string" && Object.keys(t.data).length === 1 ? t.data.text : ""), i = L(() => ye(t.data)), l = L(() => {
68
+ try {
69
+ return JSON.stringify(t.data, null, 2);
70
+ } catch {
71
+ return String(t.data);
72
+ }
73
+ });
74
+ return (o, c) => (d(), S("div", me, [r.value ? (d(), S("p", _e, D(r.value), 1)) : i.value.length > 0 ? (d(), _(m(ue), {
75
+ key: 1,
76
+ column: 1,
77
+ bordered: "",
78
+ size: "medium",
79
+ data: i.value
80
+ }, null, 8, ["data"])) : (d(), S("pre", be, D(l.value), 1))]));
81
+ }
82
+ }), Q = /* @__PURE__ */ O(he, [["__scopeId", "data-v-e61c87e4"]]), F = /* @__PURE__ */ new Map();
83
+ function _t(a, t) {
84
+ const r = a.trim();
85
+ r && F.set(r, t);
86
+ }
87
+ function bt(a) {
88
+ return F.has(a.trim());
89
+ }
90
+ function Ae(a) {
91
+ const t = a.trim();
92
+ return t ? F.get(t) ?? Q : Q;
93
+ }
94
+ function ht() {
95
+ return [...F.keys()];
96
+ }
97
+ const Ce = /* @__PURE__ */ $({
98
+ __name: "MessageDetails",
99
+ props: {
100
+ content: {
101
+ default: null
102
+ },
103
+ title: {},
104
+ loading: {
105
+ type: Boolean,
106
+ default: !1
107
+ }
108
+ },
109
+ emits: ["itemClick", "tableOfContentsUpdate", "update:title", "update:content"],
110
+ setup(a, {
111
+ emit: t
112
+ }) {
113
+ const r = f([]), i = a, l = f(!1), o = t, c = f();
114
+ function s(y) {
115
+ r.value = y, o("tableOfContentsUpdate", y);
116
+ }
117
+ return (y, g) => (d(), _(m(te), {
118
+ loading: i.loading,
119
+ tip: "文档加载中...",
120
+ class: "Spin",
121
+ dot: ""
122
+ }, {
123
+ default: v(() => [C(m(de), {
124
+ ref_key: "TiptapEditorRef",
125
+ ref: c,
126
+ "model-value": i.content,
127
+ editable: l.value,
128
+ "tiptap-editor-content-class": "tiptapEditorContentClass",
129
+ onTableOfContentsUpdate: s
130
+ }, {
131
+ title: v(() => [C(m(pe), {
132
+ "model-value": i.title,
133
+ editable: l.value
134
+ }, null, 8, ["model-value", "editable"])]),
135
+ _: 1
136
+ }, 8, ["model-value", "editable"]), h("", !0)]),
137
+ _: 1
138
+ }, 8, ["loading"]));
139
+ }
140
+ }), P = /* @__PURE__ */ O(Ce, [["__scopeId", "data-v-2149941c"]]), Se = /* @__PURE__ */ $({
141
+ __name: "MessageChangelogNotificationsDetails",
142
+ props: {
143
+ id: {
144
+ type: String,
145
+ required: !0
146
+ }
147
+ },
148
+ setup(a) {
149
+ const t = f(!1), r = f(null), i = f(""), l = a;
150
+ async function o() {
151
+ t.value = !0;
152
+ const {
153
+ data: c
154
+ } = await A.messageCenter.changelogNotifications.findOne.post({
155
+ id: l.id
156
+ });
157
+ t.value = !1, c && (r.value = c.content, i.value = c.title);
158
+ }
159
+ return o(), (c, s) => (d(), _(P, {
160
+ content: r.value,
161
+ title: i.value,
162
+ loading: t.value
163
+ }, null, 8, ["content", "title", "loading"]));
164
+ }
165
+ }), ke = {
166
+ style: {
167
+ display: "flex",
168
+ gap: "16px"
169
+ }
170
+ }, Ne = ["onClick"], we = /* @__PURE__ */ $({
171
+ __name: "MessageCustomTabs",
172
+ props: {
173
+ modelValue: {
174
+ type: String,
175
+ default: "1"
176
+ },
177
+ tabs: {
178
+ type: Array,
179
+ default: () => [{
180
+ label: "未读消息",
181
+ key: "1"
182
+ }, {
183
+ label: "已读消息",
184
+ key: "2"
185
+ }]
186
+ }
187
+ },
188
+ emits: ["update:modelValue", "change"],
189
+ setup(a, {
190
+ emit: t
191
+ }) {
192
+ const r = a, i = t;
193
+ function l(o) {
194
+ o !== r.modelValue && (i("update:modelValue", o), i("change", o));
195
+ }
196
+ return (o, c) => (d(), S("div", ke, [(d(!0), S(Y, null, ne(a.tabs, (s) => (d(), S("span", {
197
+ key: s.key,
198
+ class: Z(["custom-tab", [{
199
+ active: a.modelValue === s.key
200
+ }]]),
201
+ onClick: (y) => l(s.key)
202
+ }, D(s.label), 11, Ne))), 128))]));
203
+ }
204
+ }), Me = /* @__PURE__ */ O(we, [["__scopeId", "data-v-d7edaca7"]]), Te = {
205
+ class: "tabs"
206
+ }, ze = /* @__PURE__ */ $({
207
+ __name: "MessageTabs",
208
+ props: {
209
+ tabs: {
210
+ type: Array,
211
+ required: !0
212
+ },
213
+ messageList: {
214
+ type: Array,
215
+ required: !0
216
+ },
217
+ activeTab: {
218
+ type: String,
219
+ required: !0
220
+ }
221
+ },
222
+ emits: ["update:activeTab", "change", "readAll"],
223
+ setup(a, {
224
+ emit: t
225
+ }) {
226
+ const r = a, i = t, l = f(r.activeTab);
227
+ ee(() => r.activeTab, (s) => {
228
+ l.value = s;
229
+ });
230
+ function o(s) {
231
+ l.value = s, i("update:activeTab", s), i("change", s);
232
+ }
233
+ function c() {
234
+ r.messageList.length !== 0 && i("readAll");
235
+ }
236
+ return (s, y) => (d(), S("div", Te, [C(Me, {
237
+ modelValue: l.value,
238
+ "onUpdate:modelValue": y[0] || (y[0] = (g) => l.value = g),
239
+ tabs: a.tabs,
240
+ onChange: o
241
+ }, null, 8, ["modelValue", "tabs"]), l.value === "unread" ? (d(), S("div", {
242
+ key: 0,
243
+ class: Z(["readAll", {
244
+ disabled: a.messageList.length === 0
245
+ }]),
246
+ onClick: c
247
+ }, [C(m(fe), {
248
+ class: "icon",
249
+ icon: "icon-park-outline:clear"
250
+ }), y[1] || (y[1] = K("span", null, " 全部已读", -1))], 2)) : h("", !0)]));
251
+ }
252
+ }), J = /* @__PURE__ */ O(ze, [["__scopeId", "data-v-47f7fce5"]]), xe = {
253
+ class: "message-panel"
254
+ }, $e = {
255
+ class: "version-prefix"
256
+ }, Ie = {
257
+ key: 0,
258
+ class: "publish-time"
259
+ }, Le = {
260
+ key: 3,
261
+ class: "message-panel__detail"
262
+ }, De = /* @__PURE__ */ $({
263
+ __name: "MessageChangelogNotifications",
264
+ setup(a) {
265
+ const t = f(!0), r = f(""), i = f(!1), l = f(!1), o = f([]), c = f("unread"), s = f({
266
+ current: 1,
267
+ pageSize: 10,
268
+ total: 0
269
+ }), y = [{
270
+ label: "未读更新",
271
+ key: "unread"
272
+ }, {
273
+ label: "已读更新",
274
+ key: "read"
275
+ }], g = L(() => c.value === "read");
276
+ function x(n) {
277
+ return {
278
+ id: String(n.id),
279
+ title: String(n.title ?? ""),
280
+ description: String(n.description ?? ""),
281
+ createAt: String(n.createAt ?? ""),
282
+ updateAt: String(n.updateAt ?? ""),
283
+ version: String(n.version ?? ""),
284
+ changeType: String(n.changeType ?? "feature"),
285
+ publishedAt: n.publishedAt ? String(n.publishedAt) : null,
286
+ read: !!n.read,
287
+ readAt: n.readAt ? String(n.readAt) : null
288
+ };
289
+ }
290
+ async function k() {
291
+ var e;
292
+ i.value = !0;
293
+ const {
294
+ data: n
295
+ } = await A.messageCenter.changelogNotifications.own.post({
296
+ current: s.value.current,
297
+ pageSize: s.value.pageSize,
298
+ where: {
299
+ read: g.value
300
+ }
301
+ });
302
+ if (i.value = !1, !n)
303
+ return;
304
+ const u = n;
305
+ o.value = (u.items ?? []).map(x), s.value.total = u.count ?? 0, l.value = (((e = u.items) == null ? void 0 : e.length) ?? 0) < s.value.pageSize;
306
+ }
307
+ async function I() {
308
+ if (i.value || l.value)
309
+ return;
310
+ s.value.current += 1, i.value = !0;
311
+ const {
312
+ data: n
313
+ } = await A.messageCenter.changelogNotifications.own.post({
314
+ current: s.value.current,
315
+ pageSize: s.value.pageSize,
316
+ where: {
317
+ read: g.value
318
+ }
319
+ });
320
+ if (i.value = !1, !n)
321
+ return;
322
+ const e = (n.items ?? []).map(x);
323
+ o.value = [...o.value, ...e], l.value = e.length < s.value.pageSize;
324
+ }
325
+ function w() {
326
+ s.value.current = 1, l.value = !1, k();
327
+ }
328
+ async function B() {
329
+ o.value.length !== 0 && (await A.messageCenter.changelogNotifications.readAll.post({}), V(), k());
330
+ }
331
+ function N() {
332
+ t.value = !0, r.value = "";
333
+ }
334
+ async function M(n) {
335
+ r.value = n.id, t.value = !1, n.read || (await A.messageCenter.changelogNotifications.read.post({
336
+ changelogId: n.id
337
+ }), V(), g.value || (o.value = o.value.filter((u) => u.id !== n.id)));
338
+ }
339
+ function T(n) {
340
+ return {
341
+ feature: "green",
342
+ improvement: "blue",
343
+ fix: "orange",
344
+ security: "red",
345
+ breaking: "magenta"
346
+ }[n] || "blue";
347
+ }
348
+ function E(n) {
349
+ return {
350
+ feature: "新功能",
351
+ improvement: "优化",
352
+ fix: "修复",
353
+ security: "安全",
354
+ breaking: "重大变更"
355
+ }[n] || "更新";
356
+ }
357
+ return k(), (n, u) => (d(), S("div", xe, [t.value ? h("", !0) : (d(), _(m(q), {
358
+ key: 0,
359
+ class: "message-panel__breadcrumb"
360
+ }, {
361
+ default: v(() => [C(m(R), {
362
+ onClick: N
363
+ }, {
364
+ default: v(() => [...u[1] || (u[1] = [z("更新日志", -1)])]),
365
+ _: 1
366
+ }), C(m(R), null, {
367
+ default: v(() => [...u[2] || (u[2] = [z("详情", -1)])]),
368
+ _: 1
369
+ })]),
370
+ _: 1
371
+ })), t.value ? (d(), _(J, {
372
+ key: 1,
373
+ "active-tab": c.value,
374
+ "onUpdate:activeTab": u[0] || (u[0] = (e) => c.value = e),
375
+ tabs: y,
376
+ "message-list": o.value,
377
+ onChange: w,
378
+ onReadAll: B
379
+ }, null, 8, ["active-tab", "message-list"])) : h("", !0), t.value ? (d(), _(j, {
380
+ key: 2,
381
+ "message-list": o.value,
382
+ loading: i.value,
383
+ finished: l.value,
384
+ "show-read-status": !0,
385
+ "show-view-button": !1,
386
+ onItemClick: M,
387
+ onLoadMore: I
388
+ }, {
389
+ prefix: v(({
390
+ item: e
391
+ }) => [K("span", $e, D(e.version), 1)]),
392
+ tags: v(({
393
+ item: e
394
+ }) => [C(m(U), {
395
+ color: T(e.changeType),
396
+ size: "small"
397
+ }, {
398
+ default: v(() => [z(D(E(e.changeType)), 1)]),
399
+ _: 2
400
+ }, 1032, ["color"])]),
401
+ footer: v(({
402
+ item: e
403
+ }) => [e.publishedAt ? (d(), S("span", Ie, " 发布于 " + D(e.publishedAt), 1)) : h("", !0)]),
404
+ _: 1
405
+ }, 8, ["message-list", "loading", "finished"])) : (d(), S("div", Le, [C(Se, {
406
+ id: r.value
407
+ }, null, 8, ["id"])]))]));
408
+ }
409
+ }), Be = /* @__PURE__ */ O(De, [["__scopeId", "data-v-cb38ea42"]]), Oe = /* @__PURE__ */ $({
410
+ __name: "MessageEventNotificationsDetails",
411
+ props: {
412
+ id: {
413
+ type: String,
414
+ required: !0
415
+ }
416
+ },
417
+ setup(a) {
418
+ const t = f(!1), r = f(null), i = f(""), l = a;
419
+ async function o() {
420
+ t.value = !0;
421
+ const {
422
+ data: c
423
+ } = await A.messageCenter.eventNotifications.findOne.post({
424
+ id: l.id
425
+ });
426
+ t.value = !1, c && (r.value = c.content, i.value = c.title);
427
+ }
428
+ return o(), (c, s) => (d(), _(P, {
429
+ content: r.value,
430
+ title: i.value,
431
+ loading: t.value
432
+ }, null, 8, ["content", "title", "loading"]));
433
+ }
434
+ }), Re = {
435
+ class: "message-panel"
436
+ }, Ee = {
437
+ key: 0,
438
+ class: "time-range"
439
+ }, Ue = {
440
+ key: 3,
441
+ class: "message-panel__detail"
442
+ }, Ke = /* @__PURE__ */ $({
443
+ __name: "MessageEventNotifications",
444
+ setup(a) {
445
+ const t = f(!0), r = f(""), i = f(!1), l = f(!1), o = f([]), c = f("unread"), s = f({
446
+ current: 1,
447
+ pageSize: 10,
448
+ total: 0
449
+ }), y = [{
450
+ label: "未读活动",
451
+ key: "unread"
452
+ }, {
453
+ label: "已读活动",
454
+ key: "read"
455
+ }], g = L(() => c.value === "read");
456
+ function x(n) {
457
+ return {
458
+ id: String(n.id),
459
+ title: String(n.title ?? ""),
460
+ description: String(n.description ?? ""),
461
+ createAt: String(n.createAt ?? ""),
462
+ updateAt: String(n.updateAt ?? ""),
463
+ pinned: !!n.pinned,
464
+ status: String(n.status ?? ""),
465
+ displayStatus: String(n.displayStatus ?? ""),
466
+ startAt: n.startAt ? String(n.startAt) : null,
467
+ endAt: n.endAt ? String(n.endAt) : null,
468
+ read: !!n.read,
469
+ readAt: n.readAt ? String(n.readAt) : null
470
+ };
471
+ }
472
+ async function k() {
473
+ var e;
474
+ i.value = !0;
475
+ const {
476
+ data: n
477
+ } = await A.messageCenter.eventNotifications.own.post({
478
+ current: s.value.current,
479
+ pageSize: s.value.pageSize,
480
+ where: {
481
+ read: g.value
482
+ }
483
+ });
484
+ if (i.value = !1, !n)
485
+ return;
486
+ const u = n;
487
+ o.value = (u.items ?? []).map(x), s.value.total = u.count ?? 0, l.value = (((e = u.items) == null ? void 0 : e.length) ?? 0) < s.value.pageSize;
488
+ }
489
+ async function I() {
490
+ if (i.value || l.value)
491
+ return;
492
+ s.value.current += 1, i.value = !0;
493
+ const {
494
+ data: n
495
+ } = await A.messageCenter.eventNotifications.own.post({
496
+ current: s.value.current,
497
+ pageSize: s.value.pageSize,
498
+ where: {
499
+ read: g.value
500
+ }
501
+ });
502
+ if (i.value = !1, !n)
503
+ return;
504
+ const e = (n.items ?? []).map(x);
505
+ o.value = [...o.value, ...e], l.value = e.length < s.value.pageSize;
506
+ }
507
+ function w() {
508
+ s.value.current = 1, l.value = !1, k();
509
+ }
510
+ async function B() {
511
+ o.value.length !== 0 && (await A.messageCenter.eventNotifications.readAll.post({}), V(), k());
512
+ }
513
+ function N() {
514
+ t.value = !0, r.value = "";
515
+ }
516
+ async function M(n) {
517
+ r.value = n.id, t.value = !1, n.read || (await A.messageCenter.eventNotifications.read.post({
518
+ eventId: n.id
519
+ }), V(), g.value || (o.value = o.value.filter((u) => u.id !== n.id)));
520
+ }
521
+ function T(n) {
522
+ return {
523
+ upcoming: "blue",
524
+ ongoing: "green",
525
+ ended: "gray",
526
+ published: "arcoblue"
527
+ }[n] || "gray";
528
+ }
529
+ function E(n) {
530
+ return {
531
+ upcoming: "即将开始",
532
+ ongoing: "进行中",
533
+ ended: "已结束",
534
+ published: "已发布"
535
+ }[n] || "未知";
536
+ }
537
+ return k(), (n, u) => (d(), S("div", Re, [t.value ? h("", !0) : (d(), _(m(q), {
538
+ key: 0,
539
+ class: "message-panel__breadcrumb"
540
+ }, {
541
+ default: v(() => [C(m(R), {
542
+ onClick: N
543
+ }, {
544
+ default: v(() => [...u[1] || (u[1] = [z("活动通知", -1)])]),
545
+ _: 1
546
+ }), C(m(R), null, {
547
+ default: v(() => [...u[2] || (u[2] = [z("详情", -1)])]),
548
+ _: 1
549
+ })]),
550
+ _: 1
551
+ })), t.value ? (d(), _(J, {
552
+ key: 1,
553
+ "active-tab": c.value,
554
+ "onUpdate:activeTab": u[0] || (u[0] = (e) => c.value = e),
555
+ tabs: y,
556
+ "message-list": o.value,
557
+ onChange: w,
558
+ onReadAll: B
559
+ }, null, 8, ["active-tab", "message-list"])) : h("", !0), t.value ? (d(), _(j, {
560
+ key: 2,
561
+ "message-list": o.value,
562
+ loading: i.value,
563
+ finished: l.value,
564
+ "show-read-status": !0,
565
+ "show-view-button": !1,
566
+ onItemClick: M,
567
+ onLoadMore: I
568
+ }, {
569
+ tags: v(({
570
+ item: e
571
+ }) => [C(m(U), {
572
+ color: T(e.displayStatus),
573
+ size: "small"
574
+ }, {
575
+ default: v(() => [z(D(E(e.displayStatus)), 1)]),
576
+ _: 2
577
+ }, 1032, ["color"])]),
578
+ footer: v(({
579
+ item: e
580
+ }) => [e.startAt || e.endAt ? (d(), S("span", Ee, D(e.startAt || "无") + " ~ " + D(e.endAt || "无"), 1)) : h("", !0)]),
581
+ _: 1
582
+ }, 8, ["message-list", "loading", "finished"])) : (d(), S("div", Ue, [C(Oe, {
583
+ id: r.value
584
+ }, null, 8, ["id"])]))]));
585
+ }
586
+ }), Ve = /* @__PURE__ */ O(Ke, [["__scopeId", "data-v-755daae9"]]);
587
+ function X(a) {
588
+ return !!a && typeof a == "object" && !Array.isArray(a);
589
+ }
590
+ function je(a) {
591
+ return a.type === "doc" && Array.isArray(a.content);
592
+ }
593
+ function ae(a, t) {
594
+ if (X(a))
595
+ return je(a) ? H(t) : a;
596
+ if (typeof a == "string") {
597
+ const r = a.trim();
598
+ if (!r)
599
+ return H(t);
600
+ try {
601
+ const i = JSON.parse(r);
602
+ if (X(i))
603
+ return ae(i, t);
604
+ } catch {
605
+ return {
606
+ text: r
607
+ };
608
+ }
609
+ }
610
+ return H(t);
611
+ }
612
+ function H(a) {
613
+ const t = a == null ? void 0 : a.trim();
614
+ return t ? {
615
+ text: t
616
+ } : {};
617
+ }
618
+ const qe = {
619
+ class: "message-notification-detail"
620
+ }, Fe = {
621
+ class: "message-notification-detail__title"
622
+ }, Je = /* @__PURE__ */ $({
623
+ __name: "MessageNotificationDetails",
624
+ props: {
625
+ title: {},
626
+ type: {
627
+ default: ""
628
+ },
629
+ content: {},
630
+ description: {
631
+ default: ""
632
+ },
633
+ loading: {
634
+ type: Boolean,
635
+ default: !1
636
+ }
637
+ },
638
+ setup(a) {
639
+ const t = a, r = L(() => t.type.trim()), i = L(() => ae(t.content, t.description)), l = L(() => Ae(r.value));
640
+ return (o, c) => (d(), _(m(te), {
641
+ loading: a.loading,
642
+ tip: "加载中...",
643
+ class: "Spin",
644
+ dot: ""
645
+ }, {
646
+ default: v(() => [K("div", qe, [K("h1", Fe, D(a.title), 1), (d(), _(se(l.value), {
647
+ data: i.value,
648
+ title: a.title,
649
+ description: a.description,
650
+ type: r.value
651
+ }, null, 8, ["data", "title", "description", "type"]))])]),
652
+ _: 1
653
+ }, 8, ["loading"]));
654
+ }
655
+ }), He = /* @__PURE__ */ O(Je, [["__scopeId", "data-v-5772f5d1"]]), We = {
656
+ class: "message-panel"
657
+ }, Pe = {
658
+ key: 3,
659
+ class: "message-panel__detail"
660
+ }, Ge = /* @__PURE__ */ $({
661
+ __name: "MessageNotifications",
662
+ setup(a) {
663
+ const t = f(!0), r = f(""), i = f(!1), l = f({
664
+ title: "",
665
+ type: "",
666
+ description: "",
667
+ content: null
668
+ }), o = f(!1), c = f(!1), s = f([]), y = f("unread"), g = f({
669
+ current: 1,
670
+ pageSize: 10,
671
+ total: 0
672
+ }), x = [{
673
+ label: "未读消息",
674
+ key: "unread"
675
+ }, {
676
+ label: "已读消息",
677
+ key: "read"
678
+ }], k = L(() => y.value === "read");
679
+ function I(u) {
680
+ return {
681
+ read: u
682
+ };
683
+ }
684
+ async function w() {
685
+ o.value = !0;
686
+ const {
687
+ data: u
688
+ } = await A.messageCenter.messageNotifications.own.post({
689
+ current: g.value.current,
690
+ pageSize: g.value.pageSize,
691
+ where: I(k.value)
692
+ });
693
+ o.value = !1, u && (s.value = u.items.map((e) => ({
694
+ id: e.id,
695
+ title: e.title,
696
+ description: e.description,
697
+ createAt: e.createAt,
698
+ updateAt: e.updateAt,
699
+ priority: e.priority,
700
+ read: e.read ?? !1,
701
+ readAt: e.readAt ?? null
702
+ })), g.value.total = u.count, c.value = u.items.length < g.value.pageSize);
703
+ }
704
+ async function B() {
705
+ if (o.value || c.value) return;
706
+ g.value.current += 1, o.value = !0;
707
+ const {
708
+ data: u
709
+ } = await A.messageCenter.messageNotifications.own.post({
710
+ current: g.value.current,
711
+ pageSize: g.value.pageSize,
712
+ where: I(k.value)
713
+ });
714
+ if (o.value = !1, u) {
715
+ const e = u.items.map((p) => ({
716
+ id: p.id,
717
+ title: p.title,
718
+ description: p.description,
719
+ createAt: p.createAt,
720
+ updateAt: p.updateAt,
721
+ priority: p.priority,
722
+ read: p.read ?? !1,
723
+ readAt: p.readAt ?? null
724
+ }));
725
+ s.value = [...s.value, ...e], c.value = u.items.length < g.value.pageSize;
726
+ }
727
+ }
728
+ function N() {
729
+ g.value.current = 1, c.value = !1, w();
730
+ }
731
+ async function M() {
732
+ s.value.length !== 0 && (await A.messageCenter.messageNotifications.readAll.post({}), w());
733
+ }
734
+ function T() {
735
+ t.value = !0, r.value = "", l.value = {
736
+ title: "",
737
+ type: "",
738
+ description: "",
739
+ content: null
740
+ };
741
+ }
742
+ async function E(u) {
743
+ i.value = !0;
744
+ const {
745
+ data: e
746
+ } = await A.messageCenter.messageNotifications.findOne.post({
747
+ id: u
748
+ });
749
+ i.value = !1, e && (l.value = {
750
+ title: e.title,
751
+ type: e.type ?? "",
752
+ description: e.description ?? "",
753
+ content: e.content ?? null
754
+ });
755
+ }
756
+ async function n(u) {
757
+ r.value = u.id, t.value = !1, u.read || (await A.messageCenter.messageNotifications.read.post({
758
+ messageId: u.id
759
+ }), k.value || (s.value = s.value.filter((e) => e.id !== u.id))), E(u.id);
760
+ }
761
+ return w(), (u, e) => (d(), S("div", We, [t.value ? h("", !0) : (d(), _(m(q), {
762
+ key: 0,
763
+ class: "message-panel__breadcrumb"
764
+ }, {
765
+ default: v(() => [C(m(R), {
766
+ onClick: T
767
+ }, {
768
+ default: v(() => [...e[1] || (e[1] = [z("消息通知", -1)])]),
769
+ _: 1
770
+ }), C(m(R), null, {
771
+ default: v(() => [...e[2] || (e[2] = [z("详情", -1)])]),
772
+ _: 1
773
+ })]),
774
+ _: 1
775
+ })), t.value ? (d(), _(J, {
776
+ key: 1,
777
+ "active-tab": y.value,
778
+ "onUpdate:activeTab": e[0] || (e[0] = (p) => y.value = p),
779
+ tabs: x,
780
+ "message-list": s.value,
781
+ onChange: N,
782
+ onReadAll: M
783
+ }, null, 8, ["active-tab", "message-list"])) : h("", !0), t.value ? (d(), _(j, {
784
+ key: 2,
785
+ "message-list": s.value,
786
+ loading: o.value,
787
+ finished: c.value,
788
+ "show-read-status": !0,
789
+ "show-view-button": !1,
790
+ onItemClick: n,
791
+ onLoadMore: B
792
+ }, {
793
+ tags: v(({
794
+ item: p
795
+ }) => [p.priority === "urgent" ? (d(), _(m(U), {
796
+ key: 0,
797
+ color: "red",
798
+ size: "small"
799
+ }, {
800
+ default: v(() => [...e[3] || (e[3] = [z("紧急", -1)])]),
801
+ _: 1
802
+ })) : p.priority === "high" ? (d(), _(m(U), {
803
+ key: 1,
804
+ color: "orange",
805
+ size: "small"
806
+ }, {
807
+ default: v(() => [...e[4] || (e[4] = [z("高", -1)])]),
808
+ _: 1
809
+ })) : h("", !0)]),
810
+ _: 1
811
+ }, 8, ["message-list", "loading", "finished"])) : (d(), S("div", Pe, [C(He, {
812
+ title: l.value.title,
813
+ type: l.value.type,
814
+ content: l.value.content,
815
+ description: l.value.description,
816
+ loading: i.value
817
+ }, null, 8, ["title", "type", "content", "description", "loading"])]))]));
818
+ }
819
+ }), Qe = {
820
+ class: "message-panel"
821
+ }, Xe = {
822
+ key: 0,
823
+ class: "expire-time"
824
+ }, Ye = {
825
+ key: 3,
826
+ class: "message-panel__detail"
827
+ }, Ze = /* @__PURE__ */ $({
828
+ __name: "MessageNoticeNotifications",
829
+ setup(a) {
830
+ const t = f(!0), r = f(""), i = f(!1), l = f({
831
+ title: "",
832
+ content: null
833
+ }), o = f(!1), c = f(!1), s = f([]), y = f("unread"), g = f({
834
+ current: 1,
835
+ pageSize: 10,
836
+ total: 0
837
+ }), x = [{
838
+ label: "未读公告",
839
+ key: "unread"
840
+ }, {
841
+ label: "已读公告",
842
+ key: "read"
843
+ }], k = L(() => y.value === "read");
844
+ async function I() {
845
+ o.value = !0;
846
+ const {
847
+ data: e
848
+ } = await A.messageCenter.noticeNotifications.own.post({
849
+ current: g.value.current,
850
+ pageSize: g.value.pageSize,
851
+ where: {
852
+ read: k.value
853
+ }
854
+ });
855
+ o.value = !1, e && (s.value = e.items.map((p) => ({
856
+ id: p.id,
857
+ title: p.title,
858
+ description: p.description,
859
+ createAt: p.createAt,
860
+ updateAt: p.updateAt,
861
+ pinned: p.pinned,
862
+ priority: p.priority,
863
+ displayStatus: p.displayStatus,
864
+ expireAt: p.expireAt,
865
+ requireConfirm: p.requireConfirm,
866
+ read: p.read ?? !1,
867
+ readAt: p.readAt ?? null
868
+ })), g.value.total = e.count, c.value = e.items.length < g.value.pageSize);
869
+ }
870
+ async function w() {
871
+ if (o.value || c.value) return;
872
+ g.value.current += 1, o.value = !0;
873
+ const {
874
+ data: e
875
+ } = await A.messageCenter.noticeNotifications.own.post({
876
+ current: g.value.current,
877
+ pageSize: g.value.pageSize,
878
+ where: {
879
+ read: k.value
880
+ }
881
+ });
882
+ if (o.value = !1, e) {
883
+ const p = e.items.map((b) => ({
884
+ id: b.id,
885
+ title: b.title,
886
+ description: b.description,
887
+ createAt: b.createAt,
888
+ updateAt: b.updateAt,
889
+ pinned: b.pinned,
890
+ priority: b.priority,
891
+ displayStatus: b.displayStatus,
892
+ expireAt: b.expireAt,
893
+ requireConfirm: b.requireConfirm,
894
+ read: b.read ?? !1,
895
+ readAt: b.readAt ?? null
896
+ }));
897
+ s.value = [...s.value, ...p], c.value = e.items.length < g.value.pageSize;
898
+ }
899
+ }
900
+ function B() {
901
+ g.value.current = 1, c.value = !1, I();
902
+ }
903
+ async function N() {
904
+ s.value.length !== 0 && (await A.messageCenter.noticeNotifications.readAll.post({}), I());
905
+ }
906
+ function M() {
907
+ t.value = !0, r.value = "", l.value = {
908
+ title: "",
909
+ content: null
910
+ };
911
+ }
912
+ async function T(e) {
913
+ i.value = !0;
914
+ const {
915
+ data: p
916
+ } = await A.messageCenter.noticeNotifications.findOne.post({
917
+ id: e
918
+ });
919
+ i.value = !1, p && (l.value = {
920
+ title: p.title,
921
+ content: p.content
922
+ });
923
+ }
924
+ async function E(e) {
925
+ r.value = e.id, t.value = !1, e.read || (await A.messageCenter.noticeNotifications.read.post({
926
+ noticeId: e.id
927
+ }), k.value || (s.value = s.value.filter((p) => p.id !== e.id))), T(e.id);
928
+ }
929
+ function n(e) {
930
+ return {
931
+ published: "green",
932
+ expired: "gray"
933
+ }[e] || "gray";
934
+ }
935
+ function u(e) {
936
+ return {
937
+ published: "有效",
938
+ expired: "已过期"
939
+ }[e] || "未知";
940
+ }
941
+ return I(), (e, p) => (d(), S("div", Qe, [t.value ? h("", !0) : (d(), _(m(q), {
942
+ key: 0,
943
+ class: "message-panel__breadcrumb"
944
+ }, {
945
+ default: v(() => [C(m(R), {
946
+ onClick: M
947
+ }, {
948
+ default: v(() => [...p[1] || (p[1] = [z("公告通知", -1)])]),
949
+ _: 1
950
+ }), C(m(R), null, {
951
+ default: v(() => [...p[2] || (p[2] = [z("详情", -1)])]),
952
+ _: 1
953
+ })]),
954
+ _: 1
955
+ })), t.value ? (d(), _(J, {
956
+ key: 1,
957
+ "active-tab": y.value,
958
+ "onUpdate:activeTab": p[0] || (p[0] = (b) => y.value = b),
959
+ tabs: x,
960
+ "message-list": s.value,
961
+ onChange: B,
962
+ onReadAll: N
963
+ }, null, 8, ["active-tab", "message-list"])) : h("", !0), t.value ? (d(), _(j, {
964
+ key: 2,
965
+ "message-list": s.value,
966
+ loading: o.value,
967
+ finished: c.value,
968
+ "show-read-status": !0,
969
+ "show-view-button": !1,
970
+ onItemClick: E,
971
+ onLoadMore: w
972
+ }, {
973
+ tags: v(({
974
+ item: b
975
+ }) => [b.priority === "urgent" ? (d(), _(m(U), {
976
+ key: 0,
977
+ color: "red",
978
+ size: "small"
979
+ }, {
980
+ default: v(() => [...p[3] || (p[3] = [z("紧急", -1)])]),
981
+ _: 1
982
+ })) : b.priority === "important" ? (d(), _(m(U), {
983
+ key: 1,
984
+ color: "orange",
985
+ size: "small"
986
+ }, {
987
+ default: v(() => [...p[4] || (p[4] = [z("重要", -1)])]),
988
+ _: 1
989
+ })) : h("", !0), C(m(U), {
990
+ color: n(b.displayStatus),
991
+ size: "small"
992
+ }, {
993
+ default: v(() => [z(D(u(b.displayStatus)), 1)]),
994
+ _: 2
995
+ }, 1032, ["color"])]),
996
+ footer: v(({
997
+ item: b
998
+ }) => [b.expireAt ? (d(), S("span", Xe, D(b.displayStatus === "expired" ? "已过期" : `过期时间: ${b.expireAt}`), 1)) : h("", !0)]),
999
+ _: 1
1000
+ }, 8, ["message-list", "loading", "finished"])) : (d(), S("div", Ye, [C(P, {
1001
+ title: l.value.title,
1002
+ content: l.value.content,
1003
+ loading: i.value
1004
+ }, null, 8, ["title", "content", "loading"])]))]));
1005
+ }
1006
+ }), et = /* @__PURE__ */ O(Ze, [["__scopeId", "data-v-d16f47e2"]]), tt = {
1007
+ class: "user-menu-modal-content"
1008
+ }, at = {
1009
+ class: "left"
1010
+ }, nt = /* @__PURE__ */ $({
1011
+ __name: "MessageAppMessage",
1012
+ props: /* @__PURE__ */ G({
1013
+ title: {
1014
+ type: String,
1015
+ default: "消息中心"
1016
+ },
1017
+ menus: {
1018
+ type: Array,
1019
+ required: !0
1020
+ }
1021
+ }, {
1022
+ selectedKeys: {
1023
+ default: ["ChangelogNotifications"]
1024
+ },
1025
+ selectedKeysModifiers: {}
1026
+ }),
1027
+ emits: /* @__PURE__ */ G(["cancel", "change"], ["update:selectedKeys"]),
1028
+ setup(a, {
1029
+ expose: t,
1030
+ emit: r
1031
+ }) {
1032
+ const i = a, l = r, {
1033
+ counts: o,
1034
+ refreshMessageCenterBadgeCounts: c
1035
+ } = re(), s = L(() => {
1036
+ const N = o.value, M = {
1037
+ ChangelogNotifications: N.changelog,
1038
+ EventNotifications: N.event,
1039
+ MessageNotifications: N.message,
1040
+ NoticeNotifications: N.notice
1041
+ };
1042
+ return i.menus.map((T) => ({
1043
+ ...T,
1044
+ meta: {
1045
+ ...T.meta,
1046
+ badge: M[T.path] ?? 0
1047
+ }
1048
+ }));
1049
+ }), y = ie(a, "selectedKeys"), g = L(() => y.value.length !== 0 ? y.value[0] : "");
1050
+ function x() {
1051
+ l("cancel");
1052
+ }
1053
+ function k(N) {
1054
+ const M = N.path;
1055
+ y.value = [M], l("change", N);
1056
+ }
1057
+ const {
1058
+ changeType: I,
1059
+ show: w
1060
+ } = ge(l);
1061
+ function B(N) {
1062
+ w.value = N, I.value = "编辑", N && c();
1063
+ }
1064
+ return ee(y, () => {
1065
+ w.value && window.setTimeout(() => {
1066
+ c();
1067
+ }, 1500);
1068
+ }), t({
1069
+ setData: B
1070
+ }), (N, M) => (d(), _(m(ce), {
1071
+ visible: m(w),
1072
+ "onUpdate:visible": M[1] || (M[1] = (T) => le(w) ? w.value = T : null),
1073
+ loading: !1,
1074
+ "body-class": "AppMessagebodyClass",
1075
+ "mask-closable": !1,
1076
+ footer: !1,
1077
+ "hide-title": !1,
1078
+ title: i.title,
1079
+ width: m(oe),
1080
+ onCancel: x
1081
+ }, {
1082
+ default: v(() => [K("div", tt, [K("div", at, [C(ve, {
1083
+ "selected-keys": y.value,
1084
+ "onUpdate:selectedKeys": M[0] || (M[0] = (T) => y.value = T),
1085
+ menus: s.value,
1086
+ onChange: k
1087
+ }, null, 8, ["selected-keys", "menus"])]), m(w) ? (d(), S(Y, {
1088
+ key: 0
1089
+ }, [g.value === "ChangelogNotifications" ? (d(), _(Be, {
1090
+ key: 0
1091
+ })) : h("", !0), g.value === "EventNotifications" ? (d(), _(Ve, {
1092
+ key: 1
1093
+ })) : h("", !0), g.value === "MessageNotifications" ? (d(), _(Ge, {
1094
+ key: 2
1095
+ })) : h("", !0), g.value === "NoticeNotifications" ? (d(), _(et, {
1096
+ key: 3
1097
+ })) : h("", !0)], 64)) : h("", !0)])]),
1098
+ _: 1
1099
+ }, 8, ["visible", "title", "width"]));
1100
+ }
1101
+ }), st = /* @__PURE__ */ $({
1102
+ __name: "MessageHandle",
1103
+ setup(a, {
1104
+ expose: t
1105
+ }) {
1106
+ const r = f(["ChangelogNotifications"]), i = f(), l = f(Symbol("key"));
1107
+ function o() {
1108
+ i.value.setData(!0);
1109
+ }
1110
+ function c() {
1111
+ l.value = Symbol("key");
1112
+ }
1113
+ function s() {
1114
+ l.value = Symbol("key");
1115
+ }
1116
+ const y = f([{
1117
+ name: "功能变更",
1118
+ path: "ChangelogNotifications",
1119
+ meta: {
1120
+ icon: "mingcute:cube-3d-fill"
1121
+ }
1122
+ }, {
1123
+ name: "活动通知",
1124
+ path: "EventNotifications",
1125
+ meta: {
1126
+ icon: "mingcute:receive-money-fill"
1127
+ }
1128
+ }, {
1129
+ name: "消息通知",
1130
+ path: "MessageNotifications",
1131
+ meta: {
1132
+ icon: "mingcute:message-1-fill"
1133
+ }
1134
+ }, {
1135
+ name: "公告",
1136
+ path: "NoticeNotifications",
1137
+ meta: {
1138
+ icon: "mingcute:announcement-fill"
1139
+ }
1140
+ }]);
1141
+ return t({
1142
+ openNotification: o
1143
+ }), (g, x) => (d(), _(nt, {
1144
+ ref_key: "MessageNotificationsRef",
1145
+ ref: i,
1146
+ key: l.value,
1147
+ "selected-keys": r.value,
1148
+ "onUpdate:selectedKeys": x[0] || (x[0] = (k) => r.value = k),
1149
+ menus: y.value,
1150
+ title: "消息中心",
1151
+ onConfirm: s,
1152
+ onCancel: c
1153
+ }, null, 8, ["selected-keys", "menus"]));
1154
+ }
1155
+ }), At = /* @__PURE__ */ O(st, [["__scopeId", "data-v-2e2a72d0"]]);
1156
+ export {
1157
+ Be as C,
1158
+ P as D,
1159
+ Ve as E,
1160
+ At as M,
1161
+ et as N,
1162
+ nt as _,
1163
+ Se as a,
1164
+ Me as b,
1165
+ Oe as c,
1166
+ He as d,
1167
+ Ge as e,
1168
+ J as f,
1169
+ Ae as g,
1170
+ bt as h,
1171
+ ht as l,
1172
+ _t as r
1173
+ };