@huyooo/ui 0.7.20 → 0.7.26

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 (64) hide show
  1. package/dist/{AuthkitAuthModal-DxxZlUbh.js → AuthkitAuthModal-C1Kgu1TA.js} +670 -685
  2. package/dist/{AuthkitSignInPhone-BfqNvheZ.js → AuthkitSignInPhone-BG7r63dN.js} +224 -232
  3. package/dist/{Clipboard-C_4QFg2W.js → Clipboard-8rWlOPTZ.js} +2 -2
  4. package/dist/{Contact-DJtDuS50.js → Contact-Bpl7sIjY.js} +2 -2
  5. package/dist/{FeedbackItem-CI-w_fOt.js → FeedbackItem-DMpvHrOD.js} +3 -3
  6. package/dist/{FeedbackModal-3k-cMuoY.js → FeedbackModal-DIhSPUPO.js} +329 -342
  7. package/dist/{MessageHandle-Pxxvhs-7.js → MessageHandle-WA95I84_.js} +212 -236
  8. package/dist/{MessageNoticeNotificationsDetails.vue_vue_type_script_setup_true_lang-BVvzvLUA.js → MessageNoticeNotificationsDetails.vue_vue_type_script_setup_true_lang-BRficqbp.js} +26 -28
  9. package/dist/{MessageNotifications-FkiOW4qU.js → MessageNotifications-DmgFNjH7.js} +1 -1
  10. package/dist/{PaySubscriptions-BHTKDYFN.js → PaySubscriptions-F5sNex0h.js} +50 -74
  11. package/dist/{ReferrerReferees-9wk0_tGC.js → ReferrerReferees-DMA8Tj5i.js} +30 -32
  12. package/dist/{Upload.vue_vue_type_script_setup_true_lang-RZzfS9p1.js → Upload.vue_vue_type_script_setup_true_lang-D7ZGc2ZS.js} +1 -1
  13. package/dist/{UserAccountMenu-CKGTR8GB.js → UserAccountMenu-CkUtqNxY.js} +7 -7
  14. package/dist/{WidthContainer-BC30d-AV.js → WidthContainer-DSQui1pX.js} +7 -7
  15. package/dist/api/Authkit/Users.d.ts +7 -7
  16. package/dist/api/Authkit/apps.d.ts +2 -2
  17. package/dist/api/Authkit/auth.d.ts +10 -10
  18. package/dist/api/Authkit/oauth.d.ts +3 -3
  19. package/dist/api/Authkit/verify.d.ts +18 -5
  20. package/dist/api/Buckets/Files.d.ts +7 -7
  21. package/dist/api/Buckets.d.ts +2 -2
  22. package/dist/api/Invoices.d.ts +6 -6
  23. package/dist/api/Message/ChangelogNotifications.d.ts +2 -31
  24. package/dist/api/Message/EventNotifications.d.ts +2 -35
  25. package/dist/api/Message/MessageNotifications.d.ts +5 -35
  26. package/dist/api/Message/NoticeNotifications.d.ts +5 -42
  27. package/dist/api/Messages.d.ts +2 -2
  28. package/dist/api/Orders.d.ts +9 -9
  29. package/dist/api/Products.d.ts +6 -6
  30. package/dist/api/Quotas.d.ts +6 -6
  31. package/dist/api/Referrer.d.ts +1 -1
  32. package/dist/api/Subscriptions.d.ts +7 -7
  33. package/dist/api/index.d.ts +8 -8
  34. package/dist/authkit.js +6 -6
  35. package/dist/common/globalConfig.d.ts +2 -2
  36. package/dist/common.js +1 -1
  37. package/dist/composables/Authkit/useAuthkitAppsAuthPageInfo.d.ts +1 -1
  38. package/dist/composables/Authkit/useAuthkitAuth.d.ts +3 -3
  39. package/dist/composables/useMessageNotifications.d.ts +3 -3
  40. package/dist/composables.js +9 -9
  41. package/dist/feedback.js +3 -3
  42. package/dist/index.js +24 -24
  43. package/dist/main.d.ts +1 -0
  44. package/dist/message.js +3 -3
  45. package/dist/pay.js +1 -1
  46. package/dist/privateCom.js +1 -1
  47. package/dist/referrer.js +1 -1
  48. package/dist/request-B4CMspsP.js +196 -0
  49. package/dist/style.css +1 -1
  50. package/dist/upload.js +2 -2
  51. package/dist/{useAuthkitAppsAuthPageInfo-AFq46sfo.js → useAuthkitAppsAuthPageInfo-CtsTqri7.js} +17 -19
  52. package/dist/{useAuthkitCreateAndUpdate-BZXteclG.js → useAuthkitCreateAndUpdate-BUyZbiBj.js} +1 -1
  53. package/dist/useAuthkitUsersProfile-B7wHZwe-.js +257 -0
  54. package/dist/{useDownloads-2DzDw0ic.js → useDownloads-Cl_-B4sP.js} +1 -1
  55. package/dist/useMessageNotifications-CP7gi893.js +78 -0
  56. package/dist/{useSEO-BmD-Tu3B.js → useSEO-C_4yDk7S.js} +2 -2
  57. package/dist/{useTableHandle-SmqaOxbN.js → useTableHandle-6ekhLVbK.js} +1 -1
  58. package/dist/{useUploadCos-8imaHXLO.js → useUploadCos-dYc8op7M.js} +10 -7
  59. package/dist/user.js +1 -1
  60. package/dist/utils/request.d.ts +25 -2
  61. package/package.json +1 -1
  62. package/dist/auth-CfexrvhT.js +0 -188
  63. package/dist/useAuthkitUsersProfile-B26kPQrp.js +0 -234
  64. package/dist/useMessageNotifications-DiF1CPlT.js +0 -84
@@ -1,18 +1,18 @@
1
1
  /* empty css */
2
2
  /* empty css */
3
3
  /* empty css */
4
- import { defineComponent as P, computed as F, createElementBlock as A, openBlock as g, normalizeStyle as le, normalizeClass as ze, createElementVNode as z, ref as w, createBlock as k, unref as e, withCtx as n, createVNode as i, createTextVNode as _, onMounted as Z, onUnmounted as re, withDirectives as Se, toDisplayString as T, vShow as Ie, Fragment as G, createCommentVNode as S, renderList as Pe, isRef as ue, useSlots as Ve, renderSlot as de } from "vue";
5
- import { Form as H, FormItem as I, Avatar as me, Input as x, Textarea as Ae, Button as V, Message as N, Alert as D, Space as ee, InputPassword as Ue, Result as $e, Modal as ce, Divider as Ce, Link as j } from "@arco-design/web-vue";
4
+ import { defineComponent as P, computed as N, createElementBlock as A, openBlock as g, normalizeStyle as se, normalizeClass as ze, createElementVNode as z, ref as w, createBlock as k, unref as e, withCtx as l, createVNode as i, createTextVNode as b, onMounted as Z, onUnmounted as ue, withDirectives as Se, toDisplayString as R, vShow as Ie, Fragment as G, createCommentVNode as S, renderList as Pe, isRef as de, useSlots as Ve, renderSlot as me } from "vue";
5
+ import { Form as H, FormItem as I, Avatar as ce, Input as x, Textarea as Ae, Button as V, Message as F, Alert as D, Space as te, InputPassword as Ue, Result as $e, Modal as fe, Divider as Ce, Link as j } from "@arco-design/web-vue";
6
6
  /* empty css */
7
- import { g as E, c as M, h as fe, u as xe } from "./auth-CfexrvhT.js";
7
+ import { g as E, c as M, h as pe, u as xe } from "./request-B4CMspsP.js";
8
8
  /* empty css */
9
- import { u as qe } from "./useUploadCos-8imaHXLO.js";
10
- import { b as Re, c as oe, d as Te, a as J, e as Le, f as Be, u as Q, g as Oe, h as Ee } from "./useAuthkitUsersProfile-B26kPQrp.js";
9
+ import { u as qe } from "./useUploadCos-dYc8op7M.js";
10
+ import { b as Te, c as re, d as Re, a as J, e as Le, f as Be, u as Q, g as Oe, h as Ee } from "./useAuthkitUsersProfile-B7wHZwe-.js";
11
11
  import { _ as De, g as Ne, i as Fe } from "./plugin-vue_export-helper-LjDO2Zua.js";
12
12
  import { _ as $ } from "./_plugin-vue_export-helper-CHgC5LLL.js";
13
13
  import { M as He } from "./Menu-H-LxepvQ.js";
14
- import { u as Me } from "./useAuthkitCreateAndUpdate-BZXteclG.js";
15
- import { u as ae } from "./useAuthkitAppsAuthPageInfo-AFq46sfo.js";
14
+ import { u as Me } from "./useAuthkitCreateAndUpdate-BUyZbiBj.js";
15
+ import { u as le } from "./useAuthkitAppsAuthPageInfo-CtsTqri7.js";
16
16
  import { Icon as Ge } from "@iconify/vue";
17
17
  const je = P({
18
18
  name: "IconCamera",
@@ -27,59 +27,59 @@ const je = P({
27
27
  strokeLinecap: {
28
28
  type: String,
29
29
  default: "butt",
30
- validator: (l) => ["butt", "round", "square"].includes(l)
30
+ validator: (a) => ["butt", "round", "square"].includes(a)
31
31
  },
32
32
  strokeLinejoin: {
33
33
  type: String,
34
34
  default: "miter",
35
- validator: (l) => ["arcs", "bevel", "miter", "miter-clip", "round"].includes(l)
35
+ validator: (a) => ["arcs", "bevel", "miter", "miter-clip", "round"].includes(a)
36
36
  },
37
37
  rotate: Number,
38
38
  spin: Boolean
39
39
  },
40
40
  emits: {
41
- click: (l) => !0
41
+ click: (a) => !0
42
42
  },
43
- setup(l, {
44
- emit: r
43
+ setup(a, {
44
+ emit: u
45
45
  }) {
46
- const u = Ne("icon"), s = F(() => [u, `${u}-camera`, {
47
- [`${u}-spin`]: l.spin
48
- }]), o = F(() => {
46
+ const d = Ne("icon"), n = N(() => [d, `${d}-camera`, {
47
+ [`${d}-spin`]: a.spin
48
+ }]), o = N(() => {
49
49
  const t = {};
50
- return l.size && (t.fontSize = Fe(l.size) ? `${l.size}px` : l.size), l.rotate && (t.transform = `rotate(${l.rotate}deg)`), t;
50
+ return a.size && (t.fontSize = Fe(a.size) ? `${a.size}px` : a.size), a.rotate && (t.transform = `rotate(${a.rotate}deg)`), t;
51
51
  });
52
52
  return {
53
- cls: s,
53
+ cls: n,
54
54
  innerStyle: o,
55
55
  onClick: (t) => {
56
- r("click", t);
56
+ u("click", t);
57
57
  }
58
58
  };
59
59
  }
60
60
  }), We = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
61
- function Ke(l, r, u, s, o, d) {
61
+ function Ke(a, u, d, n, o, m) {
62
62
  return g(), A("svg", {
63
63
  viewBox: "0 0 48 48",
64
64
  fill: "none",
65
65
  xmlns: "http://www.w3.org/2000/svg",
66
66
  stroke: "currentColor",
67
- class: ze(l.cls),
68
- style: le(l.innerStyle),
69
- "stroke-width": l.strokeWidth,
70
- "stroke-linecap": l.strokeLinecap,
71
- "stroke-linejoin": l.strokeLinejoin,
72
- onClick: r[0] || (r[0] = (...t) => l.onClick && l.onClick(...t))
73
- }, r[1] || (r[1] = [z("path", {
67
+ class: ze(a.cls),
68
+ style: se(a.innerStyle),
69
+ "stroke-width": a.strokeWidth,
70
+ "stroke-linecap": a.strokeLinecap,
71
+ "stroke-linejoin": a.strokeLinejoin,
72
+ onClick: u[0] || (u[0] = (...t) => a.onClick && a.onClick(...t))
73
+ }, u[1] || (u[1] = [z("path", {
74
74
  d: "m33 12-1.862-3.724A.5.5 0 0 0 30.691 8H17.309a.5.5 0 0 0-.447.276L15 12m16 14a7 7 0 1 1-14 0 7 7 0 0 1 14 0ZM7 40h34a1 1 0 0 0 1-1V13a1 1 0 0 0-1-1H7a1 1 0 0 0-1 1v26a1 1 0 0 0 1 1Z"
75
75
  }, null, -1)]), 14, We);
76
76
  }
77
- var te = /* @__PURE__ */ De(je, [["render", Ke]]);
78
- const Ze = Object.assign(te, {
79
- install: (l, r) => {
80
- var u;
81
- const s = (u = r == null ? void 0 : r.iconPrefix) != null ? u : "";
82
- l.component(s + te.name, te);
77
+ var ie = /* @__PURE__ */ De(je, [["render", Ke]]);
78
+ const Ze = Object.assign(ie, {
79
+ install: (a, u) => {
80
+ var d;
81
+ const n = (d = u == null ? void 0 : u.iconPrefix) != null ? d : "";
82
+ a.component(n + ie.name, ie);
83
83
  }
84
84
  }), Je = {
85
85
  class: "handle"
@@ -92,92 +92,86 @@ const Ze = Object.assign(te, {
92
92
  }
93
93
  },
94
94
  emits: ["submit"],
95
- setup(l, {
96
- emit: r
95
+ setup(a, {
96
+ emit: u
97
97
  }) {
98
- const u = r, s = l, o = w({
98
+ const d = u, n = a, o = w({
99
99
  id: void 0,
100
100
  nickname: "",
101
101
  description: "",
102
102
  avatar: "",
103
103
  avatarUrl: ""
104
- }), d = w(!1), t = w(), a = w(!1);
105
- function y() {
106
- a.value = !0, Re().then(({
107
- data: m
108
- }) => {
109
- a.value = !1, o.value.id = m.id, o.value.nickname = m.nickname, o.value.description = m.description, o.value.avatar = m.avatar, o.value.avatarUrl = m.avatarUrl;
110
- }).catch(() => {
111
- a.value = !1;
112
- });
104
+ }), m = w(!1), t = w(), s = w(!1);
105
+ async function y() {
106
+ s.value = !0;
107
+ const {
108
+ data: r
109
+ } = await Te();
110
+ s.value = !1, r && (o.value.id = r.id, o.value.nickname = r.nickname, o.value.description = r.description, o.value.avatar = r.avatar, o.value.avatarUrl = r.avatarUrl);
113
111
  }
114
- function c() {
115
- t.value.validate().then((m) => {
116
- if (!m) {
117
- a.value = !0;
118
- const f = {
119
- id: o.value.id,
120
- nickname: o.value.nickname,
121
- description: o.value.description,
122
- avatar: o.value.avatar
123
- };
124
- oe(f).then(({
125
- data: v
126
- }) => {
127
- a.value = !1, N.success("更新成功"), o.value.avatarUrl = v.avatarUrl, u("submit");
128
- }).catch(() => {
129
- a.value = !1;
130
- });
131
- }
132
- });
112
+ async function c() {
113
+ if (!await t.value.validate()) {
114
+ s.value = !0;
115
+ const f = {
116
+ id: o.value.id,
117
+ nickname: o.value.nickname,
118
+ description: o.value.description,
119
+ avatar: o.value.avatar
120
+ }, {
121
+ data: v,
122
+ error: _
123
+ } = await re(f);
124
+ s.value = !1, !_ && v && (F.success("更新成功"), o.value.avatarUrl = v.avatarUrl, d("submit"));
125
+ }
133
126
  }
134
127
  y();
135
128
  const p = () => {
136
129
  const {
137
- uploadFile: m
130
+ uploadFile: r
138
131
  } = qe(), f = document.createElement("input");
139
132
  f.type = "file", f.accept = "image/*", f.style.display = "none", document.body.append(f), f.addEventListener("change", async (v) => {
140
133
  var U;
141
134
  const q = (U = v.target.files) == null ? void 0 : U[0];
142
135
  if (q) {
143
- d.value = !0;
136
+ m.value = !0;
144
137
  try {
145
- m({
138
+ r({
146
139
  bucketId: E.avatarBucketId,
147
140
  file: q,
148
- onFileFinish(R, B, O) {
149
- d.value = !0;
141
+ onFileFinish(T, B, O) {
142
+ m.value = !0;
150
143
  const W = {
151
144
  id: o.value.id,
152
145
  nickname: o.value.nickname,
153
146
  description: o.value.description,
154
147
  avatar: O.Key
155
148
  };
156
- oe(W).then(() => {
157
- d.value = !1, N.success("更新成功"), y(), u("submit");
158
- }).catch(() => {
159
- d.value = !1;
160
- });
149
+ (async () => {
150
+ const {
151
+ error: ee
152
+ } = await re(W);
153
+ m.value = !1, ee || (F.success("更新成功"), y(), d("submit"));
154
+ })();
161
155
  },
162
- onError(R) {
163
- console.error("上传图片失败"), d.value = !1;
156
+ onError(T) {
157
+ console.error("上传图片失败"), m.value = !1;
164
158
  }
165
159
  });
166
- } catch (R) {
167
- console.error("上传图片失败", R), d.value = !1;
160
+ } catch (T) {
161
+ console.error("上传图片失败", T), m.value = !1;
168
162
  }
169
163
  }
170
164
  f.remove();
171
165
  }), f.click();
172
166
  };
173
- return (m, f) => (g(), k(e(H), {
167
+ return (r, f) => (g(), k(e(H), {
174
168
  ref_key: "formRef",
175
169
  ref: t,
176
170
  model: o.value,
177
171
  "auto-label-width": "",
178
- size: s.size
172
+ size: n.size
179
173
  }, {
180
- default: n(() => [i(e(I), {
174
+ default: l(() => [i(e(I), {
181
175
  field: "avatar",
182
176
  label: "头像",
183
177
  rules: [{
@@ -185,7 +179,7 @@ const Ze = Object.assign(te, {
185
179
  message: "请上传头像"
186
180
  }]
187
181
  }, {
188
- default: n(() => [i(e(me), {
182
+ default: l(() => [i(e(ce), {
189
183
  "image-url": o.value.avatarUrl,
190
184
  size: 42,
191
185
  "object-fit": "cover",
@@ -194,7 +188,7 @@ const Ze = Object.assign(te, {
194
188
  },
195
189
  onClick: p
196
190
  }, {
197
- "trigger-icon": n(() => [i(e(Ze))]),
191
+ "trigger-icon": l(() => [i(e(Ze))]),
198
192
  _: 1
199
193
  }, 8, ["image-url"])]),
200
194
  _: 1
@@ -206,7 +200,7 @@ const Ze = Object.assign(te, {
206
200
  message: "请输入昵称"
207
201
  }]
208
202
  }, {
209
- default: n(() => [i(e(x), {
203
+ default: l(() => [i(e(x), {
210
204
  modelValue: o.value.nickname,
211
205
  "onUpdate:modelValue": f[0] || (f[0] = (v) => o.value.nickname = v),
212
206
  placeholder: "请输入昵称"
@@ -220,7 +214,7 @@ const Ze = Object.assign(te, {
220
214
  message: "请输入描述"
221
215
  }]
222
216
  }, {
223
- default: n(() => [i(e(Ae), {
217
+ default: l(() => [i(e(Ae), {
224
218
  modelValue: o.value.description,
225
219
  "onUpdate:modelValue": f[1] || (f[1] = (v) => o.value.description = v),
226
220
  placeholder: "请输入描述",
@@ -235,12 +229,12 @@ const Ze = Object.assign(te, {
235
229
  label: "",
236
230
  rules: []
237
231
  }, {
238
- default: n(() => [z("div", Je, [i(e(V), {
232
+ default: l(() => [z("div", Je, [i(e(V), {
239
233
  type: "primary",
240
- loading: a.value,
234
+ loading: s.value,
241
235
  onClick: c
242
236
  }, {
243
- default: n(() => [...f[2] || (f[2] = [_(" 提交 ", -1)])]),
237
+ default: l(() => [...f[2] || (f[2] = [b(" 提交 ", -1)])]),
244
238
  _: 1
245
239
  }, 8, ["loading"])])]),
246
240
  _: 1
@@ -248,33 +242,33 @@ const Ze = Object.assign(te, {
248
242
  _: 1
249
243
  }, 8, ["model", "size"]));
250
244
  }
251
- }), Xe = /* @__PURE__ */ $(Qe, [["__scopeId", "data-v-c241b7f8"]]);
252
- function Ye(l) {
245
+ }), Xe = /* @__PURE__ */ $(Qe, [["__scopeId", "data-v-326c760a"]]);
246
+ function Ye(a) {
253
247
  return M({
254
248
  url: `${E.authPrefixUrl}/verify/email`,
255
249
  method: "post",
256
- data: l
250
+ data: a
257
251
  });
258
252
  }
259
- function X(l) {
253
+ function X(a) {
260
254
  return M({
261
255
  url: `${E.authPrefixUrl}/verify/email/retry`,
262
256
  method: "post",
263
- data: l
257
+ data: a
264
258
  });
265
259
  }
266
- function et(l) {
260
+ function et(a) {
267
261
  return M({
268
262
  url: `${E.authPrefixUrl}/verify/password`,
269
263
  method: "post",
270
- data: l
264
+ data: a
271
265
  });
272
266
  }
273
- function Ci(l) {
267
+ function Ci(a) {
274
268
  return M({
275
269
  url: `${E.authPrefixUrl}/verify/sms/send`,
276
270
  method: "post",
277
- data: l
271
+ data: a
278
272
  });
279
273
  }
280
274
  const tt = /* @__PURE__ */ P({
@@ -291,45 +285,45 @@ const tt = /* @__PURE__ */ P({
291
285
  }
292
286
  },
293
287
  emits: ["send"],
294
- setup(l, {
295
- expose: r,
296
- emit: u
288
+ setup(a, {
289
+ expose: u,
290
+ emit: d
297
291
  }) {
298
- const s = u, o = l, d = w(!1);
292
+ const n = d, o = a, m = w(!1);
299
293
  let t;
300
- const a = w(0), y = F(() => a.value.toString().padStart(2, "0")), c = F(() => a.value > 0), p = () => {
301
- d.value && (a.value <= 0 ? (clearInterval(t), d.value = !1) : a.value--);
294
+ const s = w(0), y = N(() => s.value.toString().padStart(2, "0")), c = N(() => s.value > 0), p = () => {
295
+ m.value && (s.value <= 0 ? (clearInterval(t), m.value = !1) : s.value--);
302
296
  };
303
- function m() {
304
- s("send");
297
+ function r() {
298
+ n("send");
305
299
  }
306
300
  function f() {
307
- a.value = 60, d.value = !0, t && clearInterval(t), t = setInterval(p, 1e3);
301
+ s.value = 60, m.value = !0, t && clearInterval(t), t = setInterval(p, 1e3);
308
302
  }
309
303
  return Z(() => {
310
- }), r({
304
+ }), u({
311
305
  startCountFn: f
312
- }), re(() => {
306
+ }), ue(() => {
313
307
  t && clearInterval(t);
314
- }), (v, b) => (g(), k(e(V), {
308
+ }), (v, _) => (g(), k(e(V), {
315
309
  class: "OAuthItem",
316
310
  type: "primary",
317
311
  size: o.size,
318
312
  disabled: c.value,
319
313
  loading: o.loading,
320
- onClick: m
314
+ onClick: r
321
315
  }, {
322
- default: n(() => [b[0] || (b[0] = z("span", null, " 发送验证码", -1)), Se(z("span", {
316
+ default: l(() => [_[0] || (_[0] = z("span", null, " 发送验证码", -1)), Se(z("span", {
323
317
  class: "verify-code-timer"
324
- }, T(`(${y.value})`), 513), [[Ie, c.value]])]),
318
+ }, R(`(${y.value})`), 513), [[Ie, c.value]])]),
325
319
  _: 1
326
320
  }, 8, ["size", "disabled", "loading"]));
327
321
  }
328
322
  }), ne = /* @__PURE__ */ $(tt, [["__scopeId", "data-v-2883dc6d"]]), it = {
329
323
  class: "sendVerifyCodeItem"
330
- }, lt = {
324
+ }, at = {
331
325
  class: "handle"
332
- }, at = /* @__PURE__ */ P({
326
+ }, st = /* @__PURE__ */ P({
333
327
  __name: "AuthkitEmailVerify",
334
328
  props: {
335
329
  email: {
@@ -343,49 +337,43 @@ const tt = /* @__PURE__ */ P({
343
337
  }
344
338
  },
345
339
  emits: ["next"],
346
- setup(l, {
347
- emit: r
340
+ setup(a, {
341
+ emit: u
348
342
  }) {
349
- const u = r, s = l, o = F(() => fe(s.email)), d = w(), t = w(!1), a = w(!1), y = w(), c = w({
343
+ const d = u, n = a, o = N(() => pe(n.email)), m = w(), t = w(!1), s = w(!1), y = w(), c = w({
350
344
  userToken: void 0,
351
345
  emailVerifyId: void 0
352
346
  });
353
347
  async function p() {
354
- t.value = !0, X({
355
- email: s.email
356
- }).then(({
348
+ t.value = !0;
349
+ const {
357
350
  data: f
358
- }) => {
359
- c.value.emailVerifyId = f.emailVerifyId, t.value = !1, d.value.startCountFn();
360
- }).catch(() => {
361
- t.value = !1;
362
- });
363
- }
364
- async function m() {
365
- y.value.validate(["userToken"]).then((f) => {
366
- if (!f) {
367
- a.value = !0;
368
- const v = {
369
- email: s.email,
370
- userToken: c.value.userToken,
371
- emailVerifyId: c.value.emailVerifyId
372
- };
373
- Ye(v).then(() => {
374
- a.value = !1, u("next");
375
- }).catch(() => {
376
- a.value = !1;
377
- });
378
- }
351
+ } = await X({
352
+ email: n.email
379
353
  });
354
+ t.value = !1, f && (c.value.emailVerifyId = f.emailVerifyId, m.value.startCountFn());
355
+ }
356
+ async function r() {
357
+ if (!await y.value.validate(["userToken"])) {
358
+ s.value = !0;
359
+ const v = {
360
+ email: n.email,
361
+ userToken: c.value.userToken,
362
+ emailVerifyId: c.value.emailVerifyId
363
+ }, {
364
+ error: _
365
+ } = await Ye(v);
366
+ s.value = !1, _ || d("next");
367
+ }
380
368
  }
381
369
  return (f, v) => (g(), k(e(H), {
382
370
  ref_key: "formRef",
383
371
  ref: y,
384
372
  model: c.value,
385
373
  "auto-label-width": "",
386
- size: s.size
374
+ size: n.size
387
375
  }, {
388
- default: n(() => [i(e(I), {
376
+ default: l(() => [i(e(I), {
389
377
  field: "email",
390
378
  label: "邮箱",
391
379
  rules: [{
@@ -396,7 +384,7 @@ const tt = /* @__PURE__ */ P({
396
384
  message: "请输入有效的邮箱"
397
385
  }]
398
386
  }, {
399
- default: n(() => [_(T(o.value), 1)]),
387
+ default: l(() => [b(R(o.value), 1)]),
400
388
  _: 1
401
389
  }), i(e(I), {
402
390
  field: "userToken",
@@ -407,14 +395,14 @@ const tt = /* @__PURE__ */ P({
407
395
  message: "请输入验证码"
408
396
  }]
409
397
  }, {
410
- default: n(() => [z("div", it, [i(e(x), {
398
+ default: l(() => [z("div", it, [i(e(x), {
411
399
  modelValue: c.value.userToken,
412
- "onUpdate:modelValue": v[0] || (v[0] = (b) => c.value.userToken = b),
400
+ "onUpdate:modelValue": v[0] || (v[0] = (_) => c.value.userToken = _),
413
401
  placeholder: "请输入验证码"
414
402
  }, null, 8, ["modelValue"]), i(ne, {
415
403
  ref_key: "SendVerifyCodeRef",
416
- ref: d,
417
- size: s.size,
404
+ ref: m,
405
+ size: n.size,
418
406
  loading: t.value,
419
407
  style: {
420
408
  "margin-left": "10px"
@@ -427,12 +415,12 @@ const tt = /* @__PURE__ */ P({
427
415
  label: "",
428
416
  rules: []
429
417
  }, {
430
- default: n(() => [z("div", lt, [i(e(V), {
431
- loading: a.value,
418
+ default: l(() => [z("div", at, [i(e(V), {
419
+ loading: s.value,
432
420
  type: "primary",
433
- onClick: m
421
+ onClick: r
434
422
  }, {
435
- default: n(() => [...v[1] || (v[1] = [_(" 提交 ", -1)])]),
423
+ default: l(() => [...v[1] || (v[1] = [b(" 提交 ", -1)])]),
436
424
  _: 1
437
425
  }, 8, ["loading"])])]),
438
426
  _: 1
@@ -440,9 +428,9 @@ const tt = /* @__PURE__ */ P({
440
428
  _: 1
441
429
  }, 8, ["model", "size"]));
442
430
  }
443
- }), se = /* @__PURE__ */ $(at, [["__scopeId", "data-v-89ebb370"]]), nt = {
431
+ }), oe = /* @__PURE__ */ $(st, [["__scopeId", "data-v-22ae34d3"]]), lt = {
444
432
  class: "handle"
445
- }, st = /* @__PURE__ */ P({
433
+ }, nt = /* @__PURE__ */ P({
446
434
  __name: "AuthkitPasswordUpdate",
447
435
  props: {
448
436
  size: {
@@ -451,36 +439,33 @@ const tt = /* @__PURE__ */ P({
451
439
  }
452
440
  },
453
441
  emits: ["submit"],
454
- setup(l, {
455
- emit: r
442
+ setup(a, {
443
+ emit: u
456
444
  }) {
457
- const u = r, s = w(!1), o = w(), d = l, t = w({
445
+ const d = u, n = w(!1), o = w(), m = a, t = w({
458
446
  oldPassword: "",
459
447
  password: "",
460
448
  confirmPassword: ""
461
449
  });
462
- async function a() {
463
- o.value.validate().then((y) => {
464
- if (!y) {
465
- const c = {
466
- password: t.value.password
467
- };
468
- Te(c).then(() => {
469
- s.value = !1, u("submit", c);
470
- }).catch(() => {
471
- s.value = !1;
472
- });
473
- }
474
- });
450
+ async function s() {
451
+ if (!await o.value.validate()) {
452
+ n.value = !0;
453
+ const c = {
454
+ password: t.value.password
455
+ }, {
456
+ error: p
457
+ } = await Re(c);
458
+ n.value = !1, p || d("submit", c);
459
+ }
475
460
  }
476
461
  return (y, c) => (g(), k(e(H), {
477
462
  ref_key: "formRef",
478
463
  ref: o,
479
464
  model: t.value,
480
465
  "auto-label-width": "",
481
- size: d.size
466
+ size: m.size
482
467
  }, {
483
- default: n(() => [i(e(I), {
468
+ default: l(() => [i(e(I), {
484
469
  field: "oldPassword",
485
470
  label: "当前密码",
486
471
  "hide-label": "",
@@ -489,7 +474,7 @@ const tt = /* @__PURE__ */ P({
489
474
  message: "请输入当前密码"
490
475
  }]
491
476
  }, {
492
- default: n(() => [i(e(x), {
477
+ default: l(() => [i(e(x), {
493
478
  modelValue: t.value.oldPassword,
494
479
  "onUpdate:modelValue": c[0] || (c[0] = (p) => t.value.oldPassword = p),
495
480
  placeholder: "请输入当前密码",
@@ -508,7 +493,7 @@ const tt = /* @__PURE__ */ P({
508
493
  message: "新密码不能少于10字符"
509
494
  }]
510
495
  }, {
511
- default: n(() => [i(e(x), {
496
+ default: l(() => [i(e(x), {
512
497
  modelValue: t.value.password,
513
498
  "onUpdate:modelValue": c[1] || (c[1] = (p) => t.value.password = p),
514
499
  placeholder: "请输入新密码",
@@ -526,12 +511,12 @@ const tt = /* @__PURE__ */ P({
526
511
  minLength: 10,
527
512
  message: "确认密码不能少于10字符"
528
513
  }, {
529
- validator: (p, m) => {
530
- p !== t.value.password ? m("两次密码输入不一致,请重新输入") : m();
514
+ validator: (p, r) => {
515
+ p !== t.value.password ? r("两次密码输入不一致,请重新输入") : r();
531
516
  }
532
517
  }]
533
518
  }, {
534
- default: n(() => [i(e(x), {
519
+ default: l(() => [i(e(x), {
535
520
  modelValue: t.value.confirmPassword,
536
521
  "onUpdate:modelValue": c[2] || (c[2] = (p) => t.value.confirmPassword = p),
537
522
  placeholder: "请输入确认密码密码",
@@ -543,12 +528,12 @@ const tt = /* @__PURE__ */ P({
543
528
  label: "",
544
529
  rules: []
545
530
  }, {
546
- default: n(() => [z("div", nt, [i(e(V), {
531
+ default: l(() => [z("div", lt, [i(e(V), {
547
532
  type: "primary",
548
- loading: s.value,
549
- onClick: a
533
+ loading: n.value,
534
+ onClick: s
550
535
  }, {
551
- default: n(() => [...c[3] || (c[3] = [_(" 提交 ", -1)])]),
536
+ default: l(() => [...c[3] || (c[3] = [b(" 提交 ", -1)])]),
552
537
  _: 1
553
538
  }, 8, ["loading"])])]),
554
539
  _: 1
@@ -556,7 +541,7 @@ const tt = /* @__PURE__ */ P({
556
541
  _: 1
557
542
  }, 8, ["model", "size"]));
558
543
  }
559
- }), ot = /* @__PURE__ */ $(st, [["__scopeId", "data-v-a9e25b03"]]), rt = /* @__PURE__ */ P({
544
+ }), ot = /* @__PURE__ */ $(nt, [["__scopeId", "data-v-a6e31e18"]]), rt = /* @__PURE__ */ P({
560
545
  __name: "AuthkitSetPassword",
561
546
  props: {
562
547
  size: {
@@ -564,63 +549,63 @@ const tt = /* @__PURE__ */ P({
564
549
  required: !0
565
550
  }
566
551
  },
567
- setup(l) {
552
+ setup(a) {
568
553
  const {
569
- userProfile: r,
570
- loading: u,
571
- fetchUserProfile: s,
554
+ userProfile: u,
555
+ loading: d,
556
+ fetchUserProfile: n,
572
557
  isLoggedIn: o
573
- } = J(), d = w("hidden"), t = l;
574
- function a(p) {
575
- d.value = p;
558
+ } = J(), m = w("hidden"), t = a;
559
+ function s(p) {
560
+ m.value = p;
576
561
  }
577
562
  function y(p) {
578
- N.success("密码修改成功"), d.value = "hidden", s();
563
+ F.success("密码修改成功"), m.value = "hidden", n();
579
564
  }
580
565
  function c() {
581
- d.value = "update";
566
+ m.value = "update";
582
567
  }
583
568
  return Z(() => {
584
- o.value && !r.value && s();
585
- }), (p, m) => {
586
- var f, v, b, q;
587
- return g(), A(G, null, [!((f = e(r)) != null && f.email) && !((v = e(r)) != null && v.phone) ? (g(), k(e(D), {
569
+ o.value && !u.value && n();
570
+ }), (p, r) => {
571
+ var f, v, _, q;
572
+ return g(), A(G, null, [!((f = e(u)) != null && f.email) && !((v = e(u)) != null && v.phone) ? (g(), k(e(D), {
588
573
  key: 0,
589
574
  title: "去绑定邮箱"
590
575
  }, {
591
- action: n(() => [i(e(V), {
576
+ action: l(() => [i(e(V), {
592
577
  size: t.size,
593
578
  type: "primary",
594
- onClick: m[0] || (m[0] = (U) => a("update"))
579
+ onClick: r[0] || (r[0] = (U) => s("update"))
595
580
  }, {
596
- default: n(() => [...m[2] || (m[2] = [_(" 去绑定邮箱 ", -1)])]),
581
+ default: l(() => [...r[2] || (r[2] = [b(" 去绑定邮箱 ", -1)])]),
597
582
  _: 1
598
583
  }, 8, ["size"])]),
599
- default: n(() => [m[3] || (m[3] = _(" 请先去绑定邮箱或者手机号码,才能设置密码 ", -1))]),
584
+ default: l(() => [r[3] || (r[3] = b(" 请先去绑定邮箱或者手机号码,才能设置密码 ", -1))]),
600
585
  _: 1
601
- })) : S("", !0), (b = e(r)) != null && b.email && d.value === "hidden" ? (g(), k(e(D), {
586
+ })) : S("", !0), (_ = e(u)) != null && _.email && m.value === "hidden" ? (g(), k(e(D), {
602
587
  key: 1,
603
588
  title: "更改密码"
604
589
  }, {
605
- action: n(() => [i(e(V), {
590
+ action: l(() => [i(e(V), {
606
591
  size: t.size,
607
592
  type: "primary",
608
- onClick: m[1] || (m[1] = (U) => a("verify"))
593
+ onClick: r[1] || (r[1] = (U) => s("verify"))
609
594
  }, {
610
- default: n(() => [...m[4] || (m[4] = [_("更改密码", -1)])]),
595
+ default: l(() => [...r[4] || (r[4] = [b("更改密码", -1)])]),
611
596
  _: 1
612
597
  }, 8, ["size"])]),
613
- default: n(() => [m[5] || (m[5] = _(" 为了账户安全修改密码前会先验证身份 ", -1))]),
598
+ default: l(() => [r[5] || (r[5] = b(" 为了账户安全修改密码前会先验证身份 ", -1))]),
614
599
  _: 1
615
- })) : S("", !0), d.value === "update" ? (g(), k(ot, {
600
+ })) : S("", !0), m.value === "update" ? (g(), k(ot, {
616
601
  key: 2,
617
602
  size: t.size,
618
- loading: e(u),
603
+ loading: e(d),
619
604
  onSubmit: y
620
- }, null, 8, ["size", "loading"])) : S("", !0), d.value === "verify" ? (g(), k(se, {
605
+ }, null, 8, ["size", "loading"])) : S("", !0), m.value === "verify" ? (g(), k(oe, {
621
606
  key: 3,
622
607
  size: t.size,
623
- email: (q = e(r)) == null ? void 0 : q.email,
608
+ email: (q = e(u)) == null ? void 0 : q.email,
624
609
  onNext: c
625
610
  }, null, 8, ["size", "email"])) : S("", !0)], 64);
626
611
  };
@@ -645,10 +630,10 @@ const tt = /* @__PURE__ */ P({
645
630
  }
646
631
  },
647
632
  emits: ["submit"],
648
- setup(l, {
649
- emit: r
633
+ setup(a, {
634
+ emit: u
650
635
  }) {
651
- const u = r, s = l, o = w(), d = w(!1), t = w(), a = w({
636
+ const d = u, n = a, o = w(), m = w(!1), t = w(), s = w({
652
637
  email: void 0,
653
638
  userToken: void 0,
654
639
  emailVerifyId: void 0,
@@ -657,31 +642,29 @@ const tt = /* @__PURE__ */ P({
657
642
  referrerId: void 0
658
643
  });
659
644
  async function y() {
660
- t.value.validateField(["email"]).then((p) => {
661
- p || (d.value = !0, X({
662
- email: a.value.email
663
- }).then(({
664
- data: m
665
- }) => {
666
- a.value.emailVerifyId = m.emailVerifyId, d.value = !1, o.value.startCountFn();
667
- }).catch(() => {
668
- d.value = !1;
669
- }));
670
- });
645
+ if (!await t.value.validateField(["email"])) {
646
+ m.value = !0;
647
+ const {
648
+ data: r
649
+ } = await X({
650
+ email: s.value.email
651
+ });
652
+ m.value = !1, r && (s.value.emailVerifyId = r.emailVerifyId, o.value.startCountFn());
653
+ }
671
654
  }
672
655
  async function c() {
673
656
  t.value.validate().then((p) => {
674
- p || u("submit", a.value);
657
+ p || d("submit", s.value);
675
658
  });
676
659
  }
677
- return (p, m) => (g(), A("div", ut, [i(e(H), {
660
+ return (p, r) => (g(), A("div", ut, [i(e(H), {
678
661
  ref_key: "formRef",
679
662
  ref: t,
680
- model: a.value,
681
- size: s.size,
663
+ model: s.value,
664
+ size: n.size,
682
665
  "auto-label-width": ""
683
666
  }, {
684
- default: n(() => [i(e(I), {
667
+ default: l(() => [i(e(I), {
685
668
  field: "email",
686
669
  label: "邮箱",
687
670
  "hide-label": "",
@@ -693,9 +676,9 @@ const tt = /* @__PURE__ */ P({
693
676
  message: "请输入有效的邮箱"
694
677
  }]
695
678
  }, {
696
- default: n(() => [i(e(x), {
697
- modelValue: a.value.email,
698
- "onUpdate:modelValue": m[0] || (m[0] = (f) => a.value.email = f),
679
+ default: l(() => [i(e(x), {
680
+ modelValue: s.value.email,
681
+ "onUpdate:modelValue": r[0] || (r[0] = (f) => s.value.email = f),
699
682
  placeholder: "请输入邮箱",
700
683
  autocomplete: "email username",
701
684
  type: "email"
@@ -710,16 +693,16 @@ const tt = /* @__PURE__ */ P({
710
693
  message: "请输入验证码"
711
694
  }]
712
695
  }, {
713
- default: n(() => [z("div", dt, [i(e(x), {
714
- modelValue: a.value.userToken,
715
- "onUpdate:modelValue": m[1] || (m[1] = (f) => a.value.userToken = f),
696
+ default: l(() => [z("div", dt, [i(e(x), {
697
+ modelValue: s.value.userToken,
698
+ "onUpdate:modelValue": r[1] || (r[1] = (f) => s.value.userToken = f),
716
699
  placeholder: "请输入验证码",
717
700
  autocomplete: "one-time-code"
718
701
  }, null, 8, ["modelValue"]), i(ne, {
719
702
  ref_key: "SendVerifyCodeRef",
720
703
  ref: o,
721
- size: s.size,
722
- loading: d.value,
704
+ size: n.size,
705
+ loading: m.value,
723
706
  style: {
724
707
  "margin-left": "10px"
725
708
  },
@@ -738,9 +721,9 @@ const tt = /* @__PURE__ */ P({
738
721
  message: "密码不能少于10字符"
739
722
  }]
740
723
  }, {
741
- default: n(() => [i(e(x), {
742
- modelValue: a.value.password,
743
- "onUpdate:modelValue": m[2] || (m[2] = (f) => a.value.password = f),
724
+ default: l(() => [i(e(x), {
725
+ modelValue: s.value.password,
726
+ "onUpdate:modelValue": r[2] || (r[2] = (f) => s.value.password = f),
744
727
  placeholder: "请输入密码",
745
728
  type: "password",
746
729
  autocomplete: "new-password"
@@ -758,13 +741,13 @@ const tt = /* @__PURE__ */ P({
758
741
  message: "确认密码不能少于10字符"
759
742
  }, {
760
743
  validator: (f, v) => {
761
- f !== a.value.password ? v("两次密码输入不一致,请重新输入") : v();
744
+ f !== s.value.password ? v("两次密码输入不一致,请重新输入") : v();
762
745
  }
763
746
  }]
764
747
  }, {
765
- default: n(() => [i(e(x), {
766
- modelValue: a.value.confirmPassword,
767
- "onUpdate:modelValue": m[3] || (m[3] = (f) => a.value.confirmPassword = f),
748
+ default: l(() => [i(e(x), {
749
+ modelValue: s.value.confirmPassword,
750
+ "onUpdate:modelValue": r[3] || (r[3] = (f) => s.value.confirmPassword = f),
768
751
  placeholder: "请输入确认密码密码",
769
752
  type: "password",
770
753
  autocomplete: "new-password"
@@ -779,27 +762,27 @@ const tt = /* @__PURE__ */ P({
779
762
  message: "请输入邀请人ID"
780
763
  }]
781
764
  }, {
782
- default: n(() => [i(e(x), {
783
- modelValue: a.value.referrerId,
784
- "onUpdate:modelValue": m[4] || (m[4] = (f) => a.value.referrerId = f),
765
+ default: l(() => [i(e(x), {
766
+ modelValue: s.value.referrerId,
767
+ "onUpdate:modelValue": r[4] || (r[4] = (f) => s.value.referrerId = f),
785
768
  placeholder: "邀请人ID(可选)",
786
769
  autocomplete: "off"
787
770
  }, null, 8, ["modelValue"])]),
788
771
  _: 1
789
772
  }), z("div", mt, [i(e(V), {
790
773
  type: "primary",
791
- loading: s.loading,
774
+ loading: n.loading,
792
775
  long: "",
793
- size: s.size,
776
+ size: n.size,
794
777
  onClick: c
795
778
  }, {
796
- default: n(() => [...m[5] || (m[5] = [_(" 提交 ", -1)])]),
779
+ default: l(() => [...r[5] || (r[5] = [b(" 提交 ", -1)])]),
797
780
  _: 1
798
781
  }, 8, ["loading", "size"])])]),
799
782
  _: 1
800
783
  }, 8, ["model", "size"])]));
801
784
  }
802
- }), pe = /* @__PURE__ */ $(ct, [["__scopeId", "data-v-5b701953"]]), ft = /* @__PURE__ */ P({
785
+ }), ve = /* @__PURE__ */ $(ct, [["__scopeId", "data-v-b04cb42d"]]), ft = /* @__PURE__ */ P({
803
786
  __name: "AuthkitEmailBinding",
804
787
  props: {
805
788
  size: {
@@ -807,99 +790,97 @@ const tt = /* @__PURE__ */ P({
807
790
  required: !0
808
791
  }
809
792
  },
810
- setup(l) {
793
+ setup(a) {
811
794
  const {
812
- userProfile: r,
813
- loading: u,
814
- fetchUserProfile: s
815
- } = J(), o = w("hidden"), d = l;
795
+ userProfile: u,
796
+ loading: d,
797
+ fetchUserProfile: n
798
+ } = J(), o = w("hidden"), m = a;
816
799
  function t(c) {
817
800
  o.value = c;
818
801
  }
819
- function a(c) {
820
- u.value = !0;
802
+ async function s(c) {
803
+ d.value = !0;
821
804
  const p = {
822
805
  email: c.email,
823
806
  userToken: c.userToken,
824
807
  emailVerifyId: c.emailVerifyId
825
- };
826
- Le(p).then(() => {
827
- u.value = !1, N.success("绑定成功"), o.value = "hidden", s();
828
- }).catch(() => {
829
- u.value = !1;
830
- });
808
+ }, {
809
+ error: r
810
+ } = await Le(p);
811
+ d.value = !1, r || (F.success("绑定成功"), o.value = "hidden", n());
831
812
  }
832
813
  function y() {
833
814
  o.value = "update";
834
815
  }
835
816
  return Z(() => {
836
- r.value || s();
817
+ u.value || n();
837
818
  }), (c, p) => {
838
- var m, f, v;
839
- return g(), A(G, null, [!((m = e(r)) != null && m.email) && o.value === "hidden" ? (g(), k(e(D), {
819
+ var r, f, v;
820
+ return g(), A(G, null, [!((r = e(u)) != null && r.email) && o.value === "hidden" ? (g(), k(e(D), {
840
821
  key: 0,
841
822
  title: "绑定邮箱"
842
823
  }, {
843
- action: n(() => [i(e(V), {
844
- size: d.size,
824
+ action: l(() => [i(e(V), {
825
+ size: m.size,
845
826
  type: "primary",
846
- onClick: p[0] || (p[0] = (b) => t("update"))
827
+ onClick: p[0] || (p[0] = (_) => t("update"))
847
828
  }, {
848
- default: n(() => [...p[2] || (p[2] = [_(" 绑定邮箱 ", -1)])]),
829
+ default: l(() => [...p[2] || (p[2] = [b(" 绑定邮箱 ", -1)])]),
849
830
  _: 1
850
831
  }, 8, ["size"])]),
851
- default: n(() => [p[3] || (p[3] = _(" 您还未绑定邮箱,请点击绑定邮箱 ", -1))]),
832
+ default: l(() => [p[3] || (p[3] = b(" 您还未绑定邮箱,请点击绑定邮箱 ", -1))]),
852
833
  _: 1
853
- })) : S("", !0), (f = e(r)) != null && f.email && o.value === "hidden" ? (g(), k(e(D), {
834
+ })) : S("", !0), (f = e(u)) != null && f.email && o.value === "hidden" ? (g(), k(e(D), {
854
835
  key: 1,
855
836
  title: "更改邮箱"
856
837
  }, {
857
- action: n(() => [i(e(V), {
858
- size: d.size,
838
+ action: l(() => [i(e(V), {
839
+ size: m.size,
859
840
  type: "primary",
860
- onClick: p[1] || (p[1] = (b) => t("verify"))
841
+ onClick: p[1] || (p[1] = (_) => t("verify"))
861
842
  }, {
862
- default: n(() => [...p[4] || (p[4] = [_(" 更改邮箱 ", -1)])]),
843
+ default: l(() => [...p[4] || (p[4] = [b(" 更改邮箱 ", -1)])]),
863
844
  _: 1
864
845
  }, 8, ["size"])]),
865
- default: n(() => {
866
- var b;
867
- return [_(T(`您绑定的邮箱为${e(fe)((b = e(r)) == null ? void 0 : b.email)}`) + " ", 1)];
846
+ default: l(() => {
847
+ var _;
848
+ return [b(R(`您绑定的邮箱为${e(pe)((_ = e(u)) == null ? void 0 : _.email)}`) + " ", 1)];
868
849
  }),
869
850
  _: 1
870
- })) : S("", !0), o.value === "update" ? (g(), k(pe, {
851
+ })) : S("", !0), o.value === "update" ? (g(), k(ve, {
871
852
  key: 2,
872
- loading: e(u),
873
- size: d.size,
874
- onSubmit: a
875
- }, null, 8, ["loading", "size"])) : S("", !0), o.value === "verify" ? (g(), k(se, {
853
+ loading: e(d),
854
+ size: m.size,
855
+ onSubmit: s
856
+ }, null, 8, ["loading", "size"])) : S("", !0), o.value === "verify" ? (g(), k(oe, {
876
857
  key: 3,
877
- size: d.size,
878
- email: (v = e(r)) == null ? void 0 : v.email,
858
+ size: m.size,
859
+ email: (v = e(u)) == null ? void 0 : v.email,
879
860
  onNext: y
880
861
  }, null, 8, ["size", "email"])) : S("", !0)], 64);
881
862
  };
882
863
  }
883
- }), pt = /* @__PURE__ */ $(ft, [["__scopeId", "data-v-b2663ea1"]]);
884
- function ve(l) {
864
+ }), pt = /* @__PURE__ */ $(ft, [["__scopeId", "data-v-7c19b7c9"]]);
865
+ function ge(a) {
885
866
  return M({
886
867
  url: `${E.authPrefixUrl}/oauth/github/login`,
887
868
  method: "get",
888
- params: l
869
+ params: a
889
870
  });
890
871
  }
891
- function vt(l) {
872
+ function vt(a) {
892
873
  return M({
893
874
  url: `${E.authPrefixUrl}/oauth/google/login`,
894
875
  method: "get",
895
- params: l
876
+ params: a
896
877
  });
897
878
  }
898
- function gt(l) {
879
+ function gt(a) {
899
880
  return M({
900
881
  url: `${E.authPrefixUrl}/oauth/microsoft/login`,
901
882
  method: "get",
902
- params: l
883
+ params: a
903
884
  });
904
885
  }
905
886
  const yt = /* @__PURE__ */ P({
@@ -910,88 +891,90 @@ const yt = /* @__PURE__ */ P({
910
891
  required: !0
911
892
  }
912
893
  },
913
- setup(l) {
894
+ setup(a) {
914
895
  const {
915
- userProfile: r,
916
- fetchUserProfile: u
917
- } = J(), s = w("hidden"), o = w(!1);
918
- let d;
919
- const t = l;
920
- function a(f) {
921
- s.value = f;
896
+ userProfile: u,
897
+ fetchUserProfile: d
898
+ } = J(), n = w("hidden"), o = w(!1);
899
+ let m;
900
+ const t = a;
901
+ function s(f) {
902
+ n.value = f;
922
903
  }
923
- function y() {
904
+ async function y() {
924
905
  const f = E.appId;
925
906
  if (!f) {
926
907
  console.error("GitHub OAuth 失败: appId 未配置");
927
908
  return;
928
909
  }
929
- ve({
930
- appId: f
931
- }).then(({
910
+ const {
932
911
  data: v
933
- }) => {
912
+ } = await ge({
913
+ appId: f
914
+ });
915
+ if (v) {
934
916
  const {
935
- redirectUri: b
917
+ redirectUri: _
936
918
  } = v;
937
- o.value = !0, window.open(b, "_blank");
938
- });
919
+ o.value = !0, window.open(_, "_blank");
920
+ }
939
921
  }
940
- function c() {
941
- Be().then(() => {
942
- N.success("解绑成功"), s.value = "hidden", u();
943
- });
922
+ async function c() {
923
+ const {
924
+ error: f
925
+ } = await Be();
926
+ f || (F.success("解绑成功"), n.value = "hidden", d());
944
927
  }
945
928
  function p() {
946
- s.value === "bind" && (s.value = "hidden", y()), s.value === "unbind" && c();
929
+ n.value === "bind" && (n.value = "hidden", y()), n.value === "unbind" && c();
947
930
  }
948
- function m() {
949
- o.value && u();
931
+ function r() {
932
+ o.value && d();
950
933
  }
951
934
  return Z(() => {
952
- r.value || u(), d = setInterval(m, 1e3);
953
- }), re(() => {
954
- d && clearInterval(d);
935
+ u.value || d(), m = setInterval(r, 1e3);
936
+ }), ue(() => {
937
+ m && clearInterval(m);
955
938
  }), (f, v) => {
956
- var b, q, U;
957
- return g(), A(G, null, [!((b = e(r)) != null && b.github) && s.value === "hidden" ? (g(), k(e(D), {
939
+ var _, q, U;
940
+ return g(), A(G, null, [!((_ = e(u)) != null && _.github) && n.value === "hidden" ? (g(), k(e(D), {
958
941
  key: 0,
959
942
  title: "绑定GitHUb"
960
943
  }, {
961
- action: n(() => [i(e(V), {
944
+ action: l(() => [i(e(V), {
962
945
  size: t.size,
963
946
  type: "primary",
964
- onClick: v[0] || (v[0] = (R) => a("bind"))
947
+ onClick: v[0] || (v[0] = (T) => s("bind"))
965
948
  }, {
966
- default: n(() => [...v[2] || (v[2] = [_(" 绑定GitHUb ", -1)])]),
949
+ default: l(() => [...v[2] || (v[2] = [b(" 绑定GitHUb ", -1)])]),
967
950
  _: 1
968
951
  }, 8, ["size"])]),
969
- default: n(() => [v[3] || (v[3] = _(" 请尚未绑定GitHub,请点击绑定GitHUb ", -1))]),
952
+ default: l(() => [v[3] || (v[3] = b(" 请尚未绑定GitHub,请点击绑定GitHUb ", -1))]),
970
953
  _: 1
971
- })) : S("", !0), (q = e(r)) != null && q.github && s.value === "hidden" ? (g(), k(e(D), {
954
+ })) : S("", !0), (q = e(u)) != null && q.github && n.value === "hidden" ? (g(), k(e(D), {
972
955
  key: 1,
973
956
  title: "解绑GitHub"
974
957
  }, {
975
- action: n(() => [i(e(V), {
958
+ action: l(() => [i(e(V), {
976
959
  size: t.size,
977
960
  type: "primary",
978
- onClick: v[1] || (v[1] = (R) => a("unbind"))
961
+ onClick: v[1] || (v[1] = (T) => s("unbind"))
979
962
  }, {
980
- default: n(() => [...v[4] || (v[4] = [_(" 解绑GitHUb ", -1)])]),
963
+ default: l(() => [...v[4] || (v[4] = [b(" 解绑GitHUb ", -1)])]),
981
964
  _: 1
982
965
  }, 8, ["size"])]),
983
- default: n(() => {
984
- var R, B, O;
985
- return [z("span", null, T(`您绑定的账号为 ${(B = (R = e(r)) == null ? void 0 : R.github) == null ? void 0 : B.login}`), 1), i(e(me), {
986
- "image-url": (O = e(r)) == null ? void 0 : O.avatar,
966
+ default: l(() => {
967
+ var T, B, O;
968
+ return [z("span", null, R(`您绑定的账号为 ${(B = (T = e(u)) == null ? void 0 : T.github) == null ? void 0 : B.login}`), 1), i(e(ce), {
969
+ "image-url": (O = e(u)) == null ? void 0 : O.avatar,
987
970
  size: 42
988
971
  }, null, 8, ["image-url"])];
989
972
  }),
990
973
  _: 1
991
- })) : S("", !0), s.value === "bind" || s.value === "unbind" ? (g(), k(se, {
974
+ })) : S("", !0), n.value === "bind" || n.value === "unbind" ? (g(), k(oe, {
992
975
  key: 2,
993
976
  size: t.size,
994
- email: (U = e(r)) == null ? void 0 : U.email,
977
+ email: (U = e(u)) == null ? void 0 : U.email,
995
978
  onNext: p
996
979
  }, null, 8, ["size", "email"])) : S("", !0)], 64);
997
980
  };
@@ -1013,17 +996,17 @@ const yt = /* @__PURE__ */ P({
1013
996
  }
1014
997
  },
1015
998
  emits: ["deleted"],
1016
- setup(l, {
1017
- emit: r
999
+ setup(a, {
1000
+ emit: u
1018
1001
  }) {
1019
- const u = l, s = r, {
1002
+ const d = a, n = u, {
1020
1003
  userProfile: o,
1021
- clearUserProfile: d
1004
+ clearUserProfile: m
1022
1005
  } = J(), {
1023
1006
  clearAuth: t
1024
- } = Q(), a = w("check"), y = w(!1), c = w([]), p = w(!1), m = w(""), f = w(0);
1007
+ } = Q(), s = w("check"), y = w(!1), c = w([]), p = w(!1), r = w(""), f = w(0);
1025
1008
  let v = null;
1026
- const b = F(() => {
1009
+ const _ = N(() => {
1027
1010
  var K;
1028
1011
  const L = ((K = o.value) == null ? void 0 : K.email) || "";
1029
1012
  if (!L) return "";
@@ -1033,153 +1016,144 @@ const yt = /* @__PURE__ */ P({
1033
1016
  userToken: "",
1034
1017
  password: "",
1035
1018
  confirmText: ""
1036
- }), R = w(!1);
1019
+ }), T = w(!1);
1037
1020
  function B(L, h) {
1038
1021
  L !== "注销" ? h('请输入"注销"以确认操作') : h();
1039
1022
  }
1040
1023
  async function O() {
1041
- var L;
1024
+ var h;
1042
1025
  y.value = !0;
1043
- try {
1044
- const h = await Oe(), {
1026
+ const {
1027
+ data: L
1028
+ } = await Oe();
1029
+ if (y.value = !1, L) {
1030
+ const {
1045
1031
  hasDependencies: C,
1046
1032
  dependencies: K
1047
- } = h.data;
1033
+ } = L;
1048
1034
  if (C)
1049
- c.value = K, a.value = "dependencies";
1035
+ c.value = K, s.value = "dependencies";
1050
1036
  else {
1051
- if (!((L = o.value) != null && L.email)) {
1052
- N.error("账号未绑定邮箱,无法进行注销验证。请先绑定邮箱");
1037
+ if (!((h = o.value) != null && h.email)) {
1038
+ F.error("账号未绑定邮箱,无法进行注销验证。请先绑定邮箱");
1053
1039
  return;
1054
1040
  }
1055
- a.value = "sendCode";
1041
+ s.value = "sendCode";
1056
1042
  }
1057
- } catch (h) {
1058
- console.error("检查依赖失败:", h), N.error("检查失败,请稍后重试");
1059
- } finally {
1060
- y.value = !1;
1061
1043
  }
1062
1044
  }
1063
1045
  async function W() {
1064
- var L;
1065
- if (!((L = o.value) != null && L.email)) {
1066
- N.error("请先绑定邮箱");
1046
+ var h;
1047
+ if (!((h = o.value) != null && h.email)) {
1048
+ F.error("请先绑定邮箱");
1067
1049
  return;
1068
1050
  }
1069
1051
  p.value = !0;
1070
- try {
1071
- const h = await X({
1072
- email: o.value.email
1073
- });
1074
- m.value = h.data.emailVerifyId, N.success("验证码已发送"), a.value = "confirm", _e();
1075
- } catch (h) {
1076
- console.error("发送验证码失败:", h);
1077
- } finally {
1078
- p.value = !1;
1079
- }
1052
+ const {
1053
+ data: L
1054
+ } = await X({
1055
+ email: o.value.email
1056
+ });
1057
+ p.value = !1, L && (r.value = L.emailVerifyId, F.success("验证码已发送"), s.value = "confirm", ee());
1080
1058
  }
1081
- function _e() {
1059
+ function ee() {
1082
1060
  f.value = 60, v && clearInterval(v), v = setInterval(() => {
1083
1061
  f.value--, f.value <= 0 && v && (clearInterval(v), v = null);
1084
1062
  }, 1e3);
1085
1063
  }
1086
1064
  async function be() {
1087
- var h;
1088
- if (!await ((h = q.value) == null ? void 0 : h.validate())) {
1089
- R.value = !0;
1090
- try {
1091
- await Ee({
1092
- password: U.value.password,
1093
- userToken: U.value.userToken,
1094
- emailVerifyId: m.value,
1095
- confirmText: U.value.confirmText
1096
- }), a.value = "success", d(), t(), s("deleted");
1097
- } catch (C) {
1098
- console.error("注销失败:", C);
1099
- } finally {
1100
- R.value = !1;
1101
- }
1102
- }
1065
+ var C;
1066
+ if (await ((C = q.value) == null ? void 0 : C.validate())) return;
1067
+ T.value = !0;
1068
+ const {
1069
+ error: h
1070
+ } = await Ee({
1071
+ password: U.value.password,
1072
+ userToken: U.value.userToken,
1073
+ emailVerifyId: r.value,
1074
+ confirmText: U.value.confirmText
1075
+ });
1076
+ T.value = !1, h || (s.value = "success", m(), t(), n("deleted"));
1103
1077
  }
1104
1078
  function ke() {
1105
1079
  window.location.href = "/";
1106
1080
  }
1107
- return (L, h) => a.value === "check" ? (g(), k(e(D), {
1081
+ return (L, h) => s.value === "check" ? (g(), k(e(D), {
1108
1082
  key: 0,
1109
1083
  type: "warning",
1110
1084
  title: "注销账号"
1111
1085
  }, {
1112
- action: n(() => [i(e(V), {
1113
- size: u.size,
1086
+ action: l(() => [i(e(V), {
1087
+ size: d.size,
1114
1088
  type: "primary",
1115
1089
  status: "danger",
1116
1090
  loading: y.value,
1117
1091
  onClick: O
1118
1092
  }, {
1119
- default: n(() => [_(T(y.value ? "检查中..." : "开始注销"), 1)]),
1093
+ default: l(() => [b(R(y.value ? "检查中..." : "开始注销"), 1)]),
1120
1094
  _: 1
1121
1095
  }, 8, ["size", "loading"])]),
1122
- default: n(() => [h[6] || (h[6] = _(" 注销账号后,您的所有数据将被永久删除,无法恢复。请确认您已备份重要数据。 ", -1))]),
1096
+ default: l(() => [h[6] || (h[6] = b(" 注销账号后,您的所有数据将被永久删除,无法恢复。请确认您已备份重要数据。 ", -1))]),
1123
1097
  _: 1
1124
- })) : a.value === "dependencies" ? (g(), A(G, {
1098
+ })) : s.value === "dependencies" ? (g(), A(G, {
1125
1099
  key: 1
1126
1100
  }, [i(e(D), {
1127
1101
  type: "error",
1128
1102
  title: "无法注销账号"
1129
1103
  }, {
1130
- default: n(() => [...h[7] || (h[7] = [_(" 您的账号下还有以下资源,请先处理后再注销: ", -1)])]),
1104
+ default: l(() => [...h[7] || (h[7] = [b(" 您的账号下还有以下资源,请先处理后再注销: ", -1)])]),
1131
1105
  _: 1
1132
1106
  }), z("div", ht, [(g(!0), A(G, null, Pe(c.value, (C) => (g(), A("div", {
1133
1107
  key: C.type,
1134
1108
  class: "dependency-item"
1135
- }, [z("span", wt, T(C.label), 1), z("span", _t, T(C.count) + " 个", 1)]))), 128))]), z("div", bt, [i(e(V), {
1136
- size: u.size,
1137
- onClick: h[0] || (h[0] = (C) => a.value = "check")
1109
+ }, [z("span", wt, R(C.label), 1), z("span", _t, R(C.count) + " 个", 1)]))), 128))]), z("div", bt, [i(e(V), {
1110
+ size: d.size,
1111
+ onClick: h[0] || (h[0] = (C) => s.value = "check")
1138
1112
  }, {
1139
- default: n(() => [...h[8] || (h[8] = [_("返回", -1)])]),
1113
+ default: l(() => [...h[8] || (h[8] = [b("返回", -1)])]),
1140
1114
  _: 1
1141
- }, 8, ["size"])])], 64)) : a.value === "sendCode" ? (g(), k(e(D), {
1115
+ }, 8, ["size"])])], 64)) : s.value === "sendCode" ? (g(), k(e(D), {
1142
1116
  key: 2,
1143
1117
  type: "normal",
1144
1118
  title: "身份验证"
1145
1119
  }, {
1146
- action: n(() => [i(e(ee), null, {
1147
- default: n(() => [i(e(V), {
1148
- size: u.size,
1149
- onClick: h[1] || (h[1] = (C) => a.value = "check")
1120
+ action: l(() => [i(e(te), null, {
1121
+ default: l(() => [i(e(V), {
1122
+ size: d.size,
1123
+ onClick: h[1] || (h[1] = (C) => s.value = "check")
1150
1124
  }, {
1151
- default: n(() => [...h[9] || (h[9] = [_("取消", -1)])]),
1125
+ default: l(() => [...h[9] || (h[9] = [b("取消", -1)])]),
1152
1126
  _: 1
1153
1127
  }, 8, ["size"]), i(e(V), {
1154
- size: u.size,
1128
+ size: d.size,
1155
1129
  type: "primary",
1156
1130
  loading: p.value,
1157
1131
  onClick: W
1158
1132
  }, {
1159
- default: n(() => [_(T(p.value ? "发送中..." : "发送验证码"), 1)]),
1133
+ default: l(() => [b(R(p.value ? "发送中..." : "发送验证码"), 1)]),
1160
1134
  _: 1
1161
1135
  }, 8, ["size", "loading"])]),
1162
1136
  _: 1
1163
1137
  })]),
1164
- default: n(() => [_(" 为确保账号安全,我们将向您的邮箱 " + T(b.value) + " 发送验证码 ", 1)]),
1138
+ default: l(() => [b(" 为确保账号安全,我们将向您的邮箱 " + R(_.value) + " 发送验证码 ", 1)]),
1165
1139
  _: 1
1166
- })) : a.value === "confirm" ? (g(), A(G, {
1140
+ })) : s.value === "confirm" ? (g(), A(G, {
1167
1141
  key: 3
1168
1142
  }, [i(e(D), {
1169
1143
  type: "warning",
1170
1144
  title: "确认注销"
1171
1145
  }, {
1172
- default: n(() => [_(" 验证码已发送至 " + T(b.value) + ",此操作不可逆,请谨慎操作 ", 1)]),
1146
+ default: l(() => [b(" 验证码已发送至 " + R(_.value) + ",此操作不可逆,请谨慎操作 ", 1)]),
1173
1147
  _: 1
1174
1148
  }), i(e(H), {
1175
1149
  ref_key: "formRef",
1176
1150
  ref: q,
1177
1151
  model: U.value,
1178
- size: u.size,
1152
+ size: d.size,
1179
1153
  class: "confirm-form",
1180
1154
  layout: "vertical"
1181
1155
  }, {
1182
- default: n(() => [i(e(I), {
1156
+ default: l(() => [i(e(I), {
1183
1157
  field: "userToken",
1184
1158
  label: "邮箱验证码",
1185
1159
  rules: [{
@@ -1187,8 +1161,8 @@ const yt = /* @__PURE__ */ P({
1187
1161
  message: "请输入验证码"
1188
1162
  }]
1189
1163
  }, {
1190
- default: n(() => [i(e(ee), null, {
1191
- default: n(() => [i(e(x), {
1164
+ default: l(() => [i(e(te), null, {
1165
+ default: l(() => [i(e(x), {
1192
1166
  modelValue: U.value.userToken,
1193
1167
  "onUpdate:modelValue": h[2] || (h[2] = (C) => U.value.userToken = C),
1194
1168
  placeholder: "请输入6位验证码",
@@ -1202,7 +1176,7 @@ const yt = /* @__PURE__ */ P({
1202
1176
  loading: p.value,
1203
1177
  onClick: W
1204
1178
  }, {
1205
- default: n(() => [_(T(f.value > 0 ? `${f.value}s 后重发` : "重新发送"), 1)]),
1179
+ default: l(() => [b(R(f.value > 0 ? `${f.value}s 后重发` : "重新发送"), 1)]),
1206
1180
  _: 1
1207
1181
  }, 8, ["disabled", "loading"])]),
1208
1182
  _: 1
@@ -1216,7 +1190,7 @@ const yt = /* @__PURE__ */ P({
1216
1190
  message: "请输入密码"
1217
1191
  }]
1218
1192
  }, {
1219
- default: n(() => [i(e(Ue), {
1193
+ default: l(() => [i(e(Ue), {
1220
1194
  modelValue: U.value.password,
1221
1195
  "onUpdate:modelValue": h[3] || (h[3] = (C) => U.value.password = C),
1222
1196
  placeholder: "请输入您的登录密码",
@@ -1233,7 +1207,7 @@ const yt = /* @__PURE__ */ P({
1233
1207
  validator: B
1234
1208
  }]
1235
1209
  }, {
1236
- default: n(() => [i(e(x), {
1210
+ default: l(() => [i(e(x), {
1237
1211
  modelValue: U.value.confirmText,
1238
1212
  "onUpdate:modelValue": h[4] || (h[4] = (C) => U.value.confirmText = C),
1239
1213
  placeholder: "注销",
@@ -1241,19 +1215,19 @@ const yt = /* @__PURE__ */ P({
1241
1215
  }, null, 8, ["modelValue"])]),
1242
1216
  _: 1
1243
1217
  }, 8, ["rules"]), i(e(I), null, {
1244
- default: n(() => [i(e(ee), null, {
1245
- default: n(() => [i(e(V), {
1246
- onClick: h[5] || (h[5] = (C) => a.value = "check")
1218
+ default: l(() => [i(e(te), null, {
1219
+ default: l(() => [i(e(V), {
1220
+ onClick: h[5] || (h[5] = (C) => s.value = "check")
1247
1221
  }, {
1248
- default: n(() => [...h[10] || (h[10] = [_("取消", -1)])]),
1222
+ default: l(() => [...h[10] || (h[10] = [b("取消", -1)])]),
1249
1223
  _: 1
1250
1224
  }), i(e(V), {
1251
1225
  type: "primary",
1252
1226
  status: "danger",
1253
- loading: R.value,
1227
+ loading: T.value,
1254
1228
  onClick: be
1255
1229
  }, {
1256
- default: n(() => [_(T(R.value ? "注销中..." : "确认注销"), 1)]),
1230
+ default: l(() => [b(R(T.value ? "注销中..." : "确认注销"), 1)]),
1257
1231
  _: 1
1258
1232
  }, 8, ["loading"])]),
1259
1233
  _: 1
@@ -1261,23 +1235,23 @@ const yt = /* @__PURE__ */ P({
1261
1235
  _: 1
1262
1236
  })]),
1263
1237
  _: 1
1264
- }, 8, ["model", "size"])], 64)) : a.value === "success" ? (g(), k(e($e), {
1238
+ }, 8, ["model", "size"])], 64)) : s.value === "success" ? (g(), k(e($e), {
1265
1239
  key: 4,
1266
1240
  status: "success",
1267
1241
  title: "账号已注销"
1268
1242
  }, {
1269
- subtitle: n(() => [...h[11] || (h[11] = [_(" 您的账号已成功注销,感谢您的使用 ", -1)])]),
1270
- extra: n(() => [i(e(V), {
1243
+ subtitle: l(() => [...h[11] || (h[11] = [b(" 您的账号已成功注销,感谢您的使用 ", -1)])]),
1244
+ extra: l(() => [i(e(V), {
1271
1245
  type: "primary",
1272
1246
  onClick: ke
1273
1247
  }, {
1274
- default: n(() => [...h[12] || (h[12] = [_("返回首页", -1)])]),
1248
+ default: l(() => [...h[12] || (h[12] = [b("返回首页", -1)])]),
1275
1249
  _: 1
1276
1250
  })]),
1277
1251
  _: 1
1278
1252
  })) : S("", !0);
1279
1253
  }
1280
- }), zt = /* @__PURE__ */ $(kt, [["__scopeId", "data-v-15e302c7"]]), St = {
1254
+ }), zt = /* @__PURE__ */ $(kt, [["__scopeId", "data-v-7ad4bf56"]]), St = {
1281
1255
  class: "content"
1282
1256
  }, It = {
1283
1257
  class: "left"
@@ -1286,18 +1260,18 @@ const yt = /* @__PURE__ */ P({
1286
1260
  }, Vt = /* @__PURE__ */ P({
1287
1261
  __name: "AuthkitAppSetting",
1288
1262
  emits: ["confirm", "cancel"],
1289
- setup(l, {
1290
- expose: r,
1291
- emit: u
1263
+ setup(a, {
1264
+ expose: u,
1265
+ emit: d
1292
1266
  }) {
1293
- const s = u;
1267
+ const n = d;
1294
1268
  function o() {
1295
- s("cancel");
1269
+ n("cancel");
1296
1270
  }
1297
- function d() {
1298
- m.value = !1, s("cancel");
1271
+ function m() {
1272
+ r.value = !1, n("cancel");
1299
1273
  }
1300
- const t = w("large"), a = w(["PersonalInformation"]), y = w([{
1274
+ const t = w("large"), s = w(["PersonalInformation"]), y = w([{
1301
1275
  name: "个人信息",
1302
1276
  path: "PersonalInformation",
1303
1277
  meta: {
@@ -1351,21 +1325,21 @@ const yt = /* @__PURE__ */ P({
1351
1325
  ]
1352
1326
  }]);
1353
1327
  function c(v) {
1354
- const b = v.path;
1355
- a.value = [b];
1328
+ const _ = v.path;
1329
+ s.value = [_];
1356
1330
  }
1357
1331
  const {
1358
1332
  changeType: p,
1359
- show: m
1360
- } = Me(s);
1361
- function f(v, b) {
1362
- console.log(v), m.value = b, p.value = "编辑";
1333
+ show: r
1334
+ } = Me(n);
1335
+ function f(v, _) {
1336
+ console.log(v), r.value = _, p.value = "编辑";
1363
1337
  }
1364
- return r({
1338
+ return u({
1365
1339
  setData: f
1366
- }), (v, b) => (g(), k(e(ce), {
1367
- visible: e(m),
1368
- "onUpdate:visible": b[1] || (b[1] = (q) => ue(m) ? m.value = q : null),
1340
+ }), (v, _) => (g(), k(e(fe), {
1341
+ visible: e(r),
1342
+ "onUpdate:visible": _[1] || (_[1] = (q) => de(r) ? r.value = q : null),
1369
1343
  "unmount-on-close": "",
1370
1344
  "body-class": "AppSettingbodyClass",
1371
1345
  "mask-closable": !1,
@@ -1373,91 +1347,91 @@ const yt = /* @__PURE__ */ P({
1373
1347
  width: "700px",
1374
1348
  onCancel: o
1375
1349
  }, {
1376
- title: n(() => [...b[2] || (b[2] = [_(" 系统设置 ", -1)])]),
1377
- default: n(() => [z("div", St, [z("div", It, [i(He, {
1378
- "selected-keys": a.value,
1379
- "onUpdate:selectedKeys": b[0] || (b[0] = (q) => a.value = q),
1350
+ title: l(() => [..._[2] || (_[2] = [b(" 系统设置 ", -1)])]),
1351
+ default: l(() => [z("div", St, [z("div", It, [i(He, {
1352
+ "selected-keys": s.value,
1353
+ "onUpdate:selectedKeys": _[0] || (_[0] = (q) => s.value = q),
1380
1354
  menus: y.value,
1381
1355
  onChange: c
1382
- }, null, 8, ["selected-keys", "menus"])]), z("div", Pt, [a.value[0] === "PersonalInformation" ? (g(), k(Xe, {
1356
+ }, null, 8, ["selected-keys", "menus"])]), z("div", Pt, [s.value[0] === "PersonalInformation" ? (g(), k(Xe, {
1383
1357
  key: 0,
1384
1358
  size: t.value
1385
- }, null, 8, ["size"])) : S("", !0), a.value[0] === "EmailBinding" ? (g(), k(pt, {
1359
+ }, null, 8, ["size"])) : S("", !0), s.value[0] === "EmailBinding" ? (g(), k(pt, {
1386
1360
  key: 1,
1387
1361
  size: t.value
1388
- }, null, 8, ["size"])) : S("", !0), a.value[0] === "SetPassword" ? (g(), k(rt, {
1362
+ }, null, 8, ["size"])) : S("", !0), s.value[0] === "SetPassword" ? (g(), k(rt, {
1389
1363
  key: 2,
1390
1364
  size: t.value
1391
- }, null, 8, ["size"])) : S("", !0), a.value[0] === "GithubBinding" ? (g(), k(yt, {
1365
+ }, null, 8, ["size"])) : S("", !0), s.value[0] === "GithubBinding" ? (g(), k(yt, {
1392
1366
  key: 3,
1393
1367
  size: t.value
1394
- }, null, 8, ["size"])) : S("", !0), a.value[0] === "AccountDelete" ? (g(), k(zt, {
1368
+ }, null, 8, ["size"])) : S("", !0), s.value[0] === "AccountDelete" ? (g(), k(zt, {
1395
1369
  key: 4,
1396
1370
  size: t.value,
1397
- onDeleted: d
1371
+ onDeleted: m
1398
1372
  }, null, 8, ["size"])) : S("", !0)])])]),
1399
1373
  _: 1
1400
1374
  }, 8, ["visible"]));
1401
1375
  }
1402
1376
  }), xi = /* @__PURE__ */ $(Vt, [["__scopeId", "data-v-55a8599d"]]);
1403
- function ge() {
1377
+ function ye() {
1404
1378
  return E.oauthCallbackUrl ? E.oauthCallbackUrl : `${window.location.origin}/auth/callback`;
1405
1379
  }
1406
1380
  function At() {
1407
- const l = window.location.pathname + window.location.search;
1408
- l.includes("/auth/callback") || sessionStorage.setItem("auth_redirect", l);
1381
+ const a = window.location.pathname + window.location.search;
1382
+ a.includes("/auth/callback") || sessionStorage.setItem("auth_redirect", a);
1409
1383
  }
1410
- async function Y(l, r) {
1411
- const u = E.appId;
1412
- if (!u) {
1413
- console.error(`${l} OAuth 失败: appId 未配置`);
1384
+ async function Y(a, u) {
1385
+ const d = E.appId;
1386
+ if (!d) {
1387
+ console.error(`${a} OAuth 失败: appId 未配置`);
1414
1388
  return;
1415
1389
  }
1416
- const s = ge(), o = {
1417
- appId: u,
1418
- referrerId: r == null ? void 0 : r.referrerId,
1419
- redirectUri: s
1390
+ const n = ye(), o = {
1391
+ appId: d,
1392
+ referrerId: u == null ? void 0 : u.referrerId,
1393
+ redirectUri: n
1420
1394
  };
1421
1395
  At();
1422
- const d = {
1423
- github: ve,
1396
+ const m = {
1397
+ github: ge,
1424
1398
  google: vt,
1425
1399
  microsoft: gt
1426
1400
  };
1427
1401
  try {
1428
1402
  const {
1429
1403
  data: t
1430
- } = await d[l](o);
1431
- t != null && t.redirectUri ? window.location.href = t.redirectUri : console.error(`${l} OAuth 重定向URL为空`);
1404
+ } = await m[a](o);
1405
+ t != null && t.redirectUri ? window.location.href = t.redirectUri : console.error(`${a} OAuth 重定向URL为空`);
1432
1406
  } catch (t) {
1433
- console.error(`${l} OAuth 授权失败:`, t);
1407
+ console.error(`${a} OAuth 授权失败:`, t);
1434
1408
  }
1435
1409
  }
1436
- function Ut(l) {
1410
+ function Ut(a) {
1437
1411
  Y("github", {
1438
- referrerId: l
1412
+ referrerId: a
1439
1413
  });
1440
1414
  }
1441
- function $t(l) {
1415
+ function $t(a) {
1442
1416
  Y("google", {
1443
- referrerId: l
1417
+ referrerId: a
1444
1418
  });
1445
1419
  }
1446
- function Ct(l) {
1420
+ function Ct(a) {
1447
1421
  Y("microsoft", {
1448
- referrerId: l
1422
+ referrerId: a
1449
1423
  });
1450
1424
  }
1451
- function ye() {
1425
+ function he() {
1452
1426
  return {
1453
1427
  githubAuth: Ut,
1454
1428
  googleAuth: $t,
1455
1429
  microsoftAuth: Ct,
1456
1430
  startOauth: Y,
1457
- getOauthCallbackUrl: ge
1431
+ getOauthCallbackUrl: ye
1458
1432
  };
1459
1433
  }
1460
- const qi = ye, ie = /* @__PURE__ */ P({
1434
+ const qi = he, ae = /* @__PURE__ */ P({
1461
1435
  __name: "AuthkitOauthItem",
1462
1436
  props: {
1463
1437
  size: {
@@ -1476,19 +1450,19 @@ const qi = ye, ie = /* @__PURE__ */ P({
1476
1450
  }
1477
1451
  },
1478
1452
  emits: [],
1479
- setup(l, {
1480
- emit: r
1453
+ setup(a, {
1454
+ emit: u
1481
1455
  }) {
1482
- const u = l;
1483
- return (s, o) => (g(), k(e(V), {
1456
+ const d = a;
1457
+ return (n, o) => (g(), k(e(V), {
1484
1458
  class: "OAuthItem",
1485
1459
  type: "primary",
1486
- size: u.size
1460
+ size: d.size
1487
1461
  }, {
1488
- icon: n(() => [i(e(Ge), {
1489
- icon: u.icon
1462
+ icon: l(() => [i(e(Ge), {
1463
+ icon: d.icon
1490
1464
  }, null, 8, ["icon"])]),
1491
- default: n(() => [z("span", null, T(u.label), 1)]),
1465
+ default: l(() => [z("span", null, R(d.label), 1)]),
1492
1466
  _: 1
1493
1467
  }, 8, ["size"]));
1494
1468
  }
@@ -1496,7 +1470,7 @@ const qi = ye, ie = /* @__PURE__ */ P({
1496
1470
  class: "OAuthList"
1497
1471
  }, qt = {
1498
1472
  class: "OAuthList"
1499
- }, Rt = /* @__PURE__ */ P({
1473
+ }, Tt = /* @__PURE__ */ P({
1500
1474
  __name: "AuthkitOauthList",
1501
1475
  props: {
1502
1476
  size: {
@@ -1508,41 +1482,41 @@ const qi = ye, ie = /* @__PURE__ */ P({
1508
1482
  default: () => ""
1509
1483
  }
1510
1484
  },
1511
- setup(l) {
1485
+ setup(a) {
1512
1486
  const {
1513
- appsData: r
1514
- } = ae(), u = l, {
1515
- githubAuth: s,
1487
+ appsData: u
1488
+ } = le(), d = a, {
1489
+ githubAuth: n,
1516
1490
  googleAuth: o,
1517
- microsoftAuth: d
1518
- } = ye(), t = F(() => !(!r.value.oauth.google.enabled && !r.value.oauth.microsoft.enabled && !r.value.oauth.github.enabled && !r.value.oauth.wechat.enabled));
1519
- return (a, y) => (g(), A("div", xt, [t.value ? (g(), k(e(Ce), {
1491
+ microsoftAuth: m
1492
+ } = he(), t = N(() => !(!u.value.oauth.google.enabled && !u.value.oauth.microsoft.enabled && !u.value.oauth.github.enabled && !u.value.oauth.wechat.enabled));
1493
+ return (s, y) => (g(), A("div", xt, [t.value ? (g(), k(e(Ce), {
1520
1494
  key: 0,
1521
1495
  orientation: "center"
1522
1496
  }, {
1523
- default: n(() => [...y[3] || (y[3] = [_("OAuth登陆", -1)])]),
1497
+ default: l(() => [...y[3] || (y[3] = [b("OAuth登陆", -1)])]),
1524
1498
  _: 1
1525
- })) : S("", !0), z("div", qt, [e(r).oauth.github.enabled ? (g(), k(ie, {
1499
+ })) : S("", !0), z("div", qt, [e(u).oauth.github.enabled ? (g(), k(ae, {
1526
1500
  key: 0,
1527
1501
  icon: "mdi:github",
1528
1502
  label: "Github",
1529
- size: u.size,
1530
- onClick: y[0] || (y[0] = (c) => e(s)())
1531
- }, null, 8, ["size"])) : S("", !0), e(r).oauth.google.enabled ? (g(), k(ie, {
1503
+ size: d.size,
1504
+ onClick: y[0] || (y[0] = (c) => e(n)())
1505
+ }, null, 8, ["size"])) : S("", !0), e(u).oauth.google.enabled ? (g(), k(ae, {
1532
1506
  key: 1,
1533
1507
  icon: "mdi:google",
1534
1508
  label: "Google",
1535
- size: u.size,
1509
+ size: d.size,
1536
1510
  onClick: y[1] || (y[1] = (c) => e(o)())
1537
- }, null, 8, ["size"])) : S("", !0), e(r).oauth.microsoft.enabled ? (g(), k(ie, {
1511
+ }, null, 8, ["size"])) : S("", !0), e(u).oauth.microsoft.enabled ? (g(), k(ae, {
1538
1512
  key: 2,
1539
1513
  icon: "mdi:microsoft",
1540
1514
  label: "Microsoft",
1541
- size: u.size,
1542
- onClick: y[2] || (y[2] = (c) => e(d)())
1515
+ size: d.size,
1516
+ onClick: y[2] || (y[2] = (c) => e(m)())
1543
1517
  }, null, 8, ["size"])) : S("", !0)])]));
1544
1518
  }
1545
- }), Tt = /* @__PURE__ */ $(Rt, [["__scopeId", "data-v-886fd902"]]), Lt = {
1519
+ }), Rt = /* @__PURE__ */ $(Tt, [["__scopeId", "data-v-886fd902"]]), Lt = {
1546
1520
  class: "content"
1547
1521
  }, Bt = {
1548
1522
  class: "sendVerifyCodeItem"
@@ -1562,10 +1536,10 @@ const qi = ye, ie = /* @__PURE__ */ P({
1562
1536
  }
1563
1537
  },
1564
1538
  emits: ["signIn", "submit"],
1565
- setup(l, {
1566
- emit: r
1539
+ setup(a, {
1540
+ emit: u
1567
1541
  }) {
1568
- const u = r, s = l, o = w(), d = w(!1), t = w(), a = w({
1542
+ const d = u, n = a, o = w(), m = w(!1), t = w(), s = w({
1569
1543
  email: void 0,
1570
1544
  userToken: void 0,
1571
1545
  emailVerifyId: void 0,
@@ -1573,31 +1547,29 @@ const qi = ye, ie = /* @__PURE__ */ P({
1573
1547
  confirmPassword: void 0
1574
1548
  });
1575
1549
  async function y() {
1576
- t.value.validateField(["email"]).then((p) => {
1577
- p || (d.value = !0, X({
1578
- email: a.value.email
1579
- }).then(({
1580
- data: m
1581
- }) => {
1582
- d.value = !1, a.value.emailVerifyId = m.emailVerifyId, o.value.startCountFn();
1583
- }).catch(() => {
1584
- d.value = !1;
1585
- }));
1586
- });
1550
+ if (!await t.value.validateField(["email"])) {
1551
+ m.value = !0;
1552
+ const {
1553
+ data: r
1554
+ } = await X({
1555
+ email: s.value.email
1556
+ });
1557
+ m.value = !1, r && (s.value.emailVerifyId = r.emailVerifyId, o.value.startCountFn());
1558
+ }
1587
1559
  }
1588
1560
  async function c() {
1589
1561
  t.value.validate().then((p) => {
1590
- p || u("submit", a.value);
1562
+ p || d("submit", s.value);
1591
1563
  });
1592
1564
  }
1593
- return (p, m) => (g(), A("div", Lt, [i(e(H), {
1565
+ return (p, r) => (g(), A("div", Lt, [i(e(H), {
1594
1566
  ref_key: "formRef",
1595
1567
  ref: t,
1596
- model: a.value,
1597
- size: s.size,
1568
+ model: s.value,
1569
+ size: n.size,
1598
1570
  "auto-label-width": ""
1599
1571
  }, {
1600
- default: n(() => [i(e(I), {
1572
+ default: l(() => [i(e(I), {
1601
1573
  field: "email",
1602
1574
  label: "邮箱",
1603
1575
  "hide-label": "",
@@ -1609,9 +1581,9 @@ const qi = ye, ie = /* @__PURE__ */ P({
1609
1581
  message: "请输入有效的邮箱"
1610
1582
  }]
1611
1583
  }, {
1612
- default: n(() => [i(e(x), {
1613
- modelValue: a.value.email,
1614
- "onUpdate:modelValue": m[0] || (m[0] = (f) => a.value.email = f),
1584
+ default: l(() => [i(e(x), {
1585
+ modelValue: s.value.email,
1586
+ "onUpdate:modelValue": r[0] || (r[0] = (f) => s.value.email = f),
1615
1587
  placeholder: "请输入邮箱"
1616
1588
  }, null, 8, ["modelValue"])]),
1617
1589
  _: 1
@@ -1624,15 +1596,15 @@ const qi = ye, ie = /* @__PURE__ */ P({
1624
1596
  message: "请输入验证码"
1625
1597
  }]
1626
1598
  }, {
1627
- default: n(() => [z("div", Bt, [i(e(x), {
1628
- modelValue: a.value.userToken,
1629
- "onUpdate:modelValue": m[1] || (m[1] = (f) => a.value.userToken = f),
1599
+ default: l(() => [z("div", Bt, [i(e(x), {
1600
+ modelValue: s.value.userToken,
1601
+ "onUpdate:modelValue": r[1] || (r[1] = (f) => s.value.userToken = f),
1630
1602
  placeholder: "请输入验证码"
1631
1603
  }, null, 8, ["modelValue"]), i(ne, {
1632
1604
  ref_key: "SendVerifyCodeRef",
1633
1605
  ref: o,
1634
- size: s.size,
1635
- loading: d.value,
1606
+ size: n.size,
1607
+ loading: m.value,
1636
1608
  style: {
1637
1609
  "margin-left": "10px"
1638
1610
  },
@@ -1651,9 +1623,9 @@ const qi = ye, ie = /* @__PURE__ */ P({
1651
1623
  message: "密码不能少于10字符"
1652
1624
  }]
1653
1625
  }, {
1654
- default: n(() => [i(e(x), {
1655
- modelValue: a.value.password,
1656
- "onUpdate:modelValue": m[2] || (m[2] = (f) => a.value.password = f),
1626
+ default: l(() => [i(e(x), {
1627
+ modelValue: s.value.password,
1628
+ "onUpdate:modelValue": r[2] || (r[2] = (f) => s.value.password = f),
1657
1629
  placeholder: "请输入密码",
1658
1630
  type: "password",
1659
1631
  autocomplete: ""
@@ -1671,13 +1643,13 @@ const qi = ye, ie = /* @__PURE__ */ P({
1671
1643
  message: "确认密码不能少于10字符"
1672
1644
  }, {
1673
1645
  validator: (f, v) => {
1674
- f !== a.value.password ? v("两次密码输入不一致,请重新输入") : v();
1646
+ f !== s.value.password ? v("两次密码输入不一致,请重新输入") : v();
1675
1647
  }
1676
1648
  }]
1677
1649
  }, {
1678
- default: n(() => [i(e(x), {
1679
- modelValue: a.value.confirmPassword,
1680
- "onUpdate:modelValue": m[3] || (m[3] = (f) => a.value.confirmPassword = f),
1650
+ default: l(() => [i(e(x), {
1651
+ modelValue: s.value.confirmPassword,
1652
+ "onUpdate:modelValue": r[3] || (r[3] = (f) => s.value.confirmPassword = f),
1681
1653
  placeholder: "请输入确认密码密码",
1682
1654
  type: "password",
1683
1655
  autocomplete: ""
@@ -1685,40 +1657,40 @@ const qi = ye, ie = /* @__PURE__ */ P({
1685
1657
  _: 1
1686
1658
  }, 8, ["rules"]), z("div", Ot, [i(e(V), {
1687
1659
  type: "primary",
1688
- loading: s.loading,
1660
+ loading: n.loading,
1689
1661
  long: "",
1690
- size: s.size,
1662
+ size: n.size,
1691
1663
  onClick: c
1692
1664
  }, {
1693
- default: n(() => [...m[4] || (m[4] = [_(" 提交 ", -1)])]),
1665
+ default: l(() => [...r[4] || (r[4] = [b(" 提交 ", -1)])]),
1694
1666
  _: 1
1695
1667
  }, 8, ["loading", "size"])])]),
1696
1668
  _: 1
1697
1669
  }, 8, ["model", "size"])]));
1698
1670
  }
1699
- }), Dt = /* @__PURE__ */ $(Et, [["__scopeId", "data-v-1c83f44a"]]), Nt = {
1671
+ }), Dt = /* @__PURE__ */ $(Et, [["__scopeId", "data-v-e26730ff"]]), Nt = {
1700
1672
  class: "SwitchSignIn"
1701
1673
  }, Ft = /* @__PURE__ */ P({
1702
1674
  __name: "AuthkitSwitchSignIn",
1703
1675
  emits: ["switchSignIn"],
1704
- setup(l, {
1705
- emit: r
1676
+ setup(a, {
1677
+ emit: u
1706
1678
  }) {
1707
- const u = r;
1708
- function s() {
1709
- u("switchSignIn");
1679
+ const d = u;
1680
+ function n() {
1681
+ d("switchSignIn");
1710
1682
  }
1711
- return (o, d) => (g(), A("div", Nt, [z("span", null, [d[1] || (d[1] = z("span", null, "已经有账号?", -1)), i(e(j), {
1683
+ return (o, m) => (g(), A("div", Nt, [z("span", null, [m[1] || (m[1] = z("span", null, "已经有账号?", -1)), i(e(j), {
1712
1684
  style: {
1713
1685
  padding: "0px"
1714
1686
  },
1715
- onClick: s
1687
+ onClick: n
1716
1688
  }, {
1717
- default: n(() => [...d[0] || (d[0] = [_("去登陆", -1)])]),
1689
+ default: l(() => [...m[0] || (m[0] = [b("去登陆", -1)])]),
1718
1690
  _: 1
1719
1691
  })])]));
1720
1692
  }
1721
- }), he = /* @__PURE__ */ $(Ft, [["__scopeId", "data-v-fc1d3903"]]), Ht = {
1693
+ }), we = /* @__PURE__ */ $(Ft, [["__scopeId", "data-v-fc1d3903"]]), Ht = {
1722
1694
  class: "ResetPassword"
1723
1695
  }, Mt = /* @__PURE__ */ P({
1724
1696
  __name: "AuthkitResetPassword",
@@ -1735,21 +1707,21 @@ const qi = ye, ie = /* @__PURE__ */ P({
1735
1707
  }
1736
1708
  },
1737
1709
  emits: ["switchSignIn", "submit"],
1738
- setup(l, {
1739
- emit: r
1710
+ setup(a, {
1711
+ emit: u
1740
1712
  }) {
1741
- const u = r, s = l;
1713
+ const d = u, n = a;
1742
1714
  function o() {
1743
- u("switchSignIn");
1715
+ d("switchSignIn");
1744
1716
  }
1745
- async function d(t) {
1746
- u("submit", t);
1717
+ async function m(t) {
1718
+ d("submit", t);
1747
1719
  }
1748
- return (t, a) => (g(), A("div", Ht, [i(Dt, {
1749
- loading: l.loading,
1750
- size: s.size,
1751
- onSubmit: d
1752
- }, null, 8, ["loading", "size"]), i(he, {
1720
+ return (t, s) => (g(), A("div", Ht, [i(Dt, {
1721
+ loading: a.loading,
1722
+ size: n.size,
1723
+ onSubmit: m
1724
+ }, null, 8, ["loading", "size"]), i(we, {
1753
1725
  onSwitchSignIn: o
1754
1726
  })]));
1755
1727
  }
@@ -1758,25 +1730,25 @@ const qi = ye, ie = /* @__PURE__ */ P({
1758
1730
  }, Wt = /* @__PURE__ */ P({
1759
1731
  __name: "AuthkitServiceAgreementAndPrivacyProtection",
1760
1732
  emits: ["toUserServiceAgreement", "toPrivacyPolicy"],
1761
- setup(l, {
1762
- emit: r
1733
+ setup(a, {
1734
+ emit: u
1763
1735
  }) {
1764
- const u = r;
1765
- function s() {
1766
- u("toUserServiceAgreement");
1736
+ const d = u;
1737
+ function n() {
1738
+ d("toUserServiceAgreement");
1767
1739
  }
1768
1740
  function o() {
1769
- u("toPrivacyPolicy");
1741
+ d("toPrivacyPolicy");
1770
1742
  }
1771
- return (d, t) => (g(), A("div", jt, [t[2] || (t[2] = z("span", null, " 注册登陆即表示同意", -1)), i(e(j), {
1772
- onClick: s
1743
+ return (m, t) => (g(), A("div", jt, [t[2] || (t[2] = z("span", null, " 注册登陆即表示同意", -1)), i(e(j), {
1744
+ onClick: n
1773
1745
  }, {
1774
- default: n(() => [...t[0] || (t[0] = [_("用户服务协议", -1)])]),
1746
+ default: l(() => [...t[0] || (t[0] = [b("用户服务协议", -1)])]),
1775
1747
  _: 1
1776
1748
  }), t[3] || (t[3] = z("span", null, " 和 ", -1)), i(e(j), {
1777
1749
  onClick: o
1778
1750
  }, {
1779
- default: n(() => [...t[1] || (t[1] = [_("隐私协议", -1)])]),
1751
+ default: l(() => [...t[1] || (t[1] = [b("隐私协议", -1)])]),
1780
1752
  _: 1
1781
1753
  })]));
1782
1754
  }
@@ -1798,38 +1770,51 @@ const qi = ye, ie = /* @__PURE__ */ P({
1798
1770
  }
1799
1771
  },
1800
1772
  emits: ["submit"],
1801
- setup(l, {
1802
- emit: r
1773
+ setup(a, {
1774
+ emit: u
1803
1775
  }) {
1804
- const u = r, s = l;
1776
+ const d = u, n = a;
1805
1777
  async function o(y, c) {
1806
- const p = await et({
1778
+ if (!y) {
1779
+ c("请输入密码");
1780
+ return;
1781
+ }
1782
+ const {
1783
+ data: p
1784
+ } = await et({
1807
1785
  password: y
1808
1786
  });
1809
- p || c("密码验证请求出错!");
1787
+ if (!p) {
1788
+ c("密码验证请求出错!");
1789
+ return;
1790
+ }
1810
1791
  const {
1811
- isValidate: m,
1792
+ isValidate: r,
1812
1793
  message: f
1813
- } = p.data;
1814
- m || c(f), c();
1794
+ } = p;
1795
+ if (!r) {
1796
+ c(f || "密码强度不足");
1797
+ return;
1798
+ }
1799
+ c();
1815
1800
  }
1816
- const d = w(), t = w({
1801
+ const m = w(), t = w({
1817
1802
  email: void 0,
1818
1803
  password: void 0
1819
1804
  });
1820
- async function a() {
1821
- d.value.validate().then((y) => {
1822
- y || u("submit", t.value);
1805
+ async function s() {
1806
+ m.value.validate().then((y) => {
1807
+ y || d("submit", t.value);
1823
1808
  });
1824
1809
  }
1825
1810
  return (y, c) => (g(), A("div", Zt, [i(e(H), {
1826
1811
  ref_key: "formRef",
1827
- ref: d,
1812
+ ref: m,
1828
1813
  model: t.value,
1829
- size: s.size,
1814
+ size: n.size,
1830
1815
  "auto-label-width": ""
1831
1816
  }, {
1832
- default: n(() => [i(e(I), {
1817
+ default: l(() => [i(e(I), {
1833
1818
  field: "email",
1834
1819
  label: "邮箱",
1835
1820
  "hide-label": "",
@@ -1841,7 +1826,7 @@ const qi = ye, ie = /* @__PURE__ */ P({
1841
1826
  message: "请输入有效的邮箱"
1842
1827
  }]
1843
1828
  }, {
1844
- default: n(() => [i(e(x), {
1829
+ default: l(() => [i(e(x), {
1845
1830
  modelValue: t.value.email,
1846
1831
  "onUpdate:modelValue": c[0] || (c[0] = (p) => t.value.email = p),
1847
1832
  placeholder: "请输入邮箱",
@@ -1860,7 +1845,7 @@ const qi = ye, ie = /* @__PURE__ */ P({
1860
1845
  validator: o
1861
1846
  }]
1862
1847
  }, {
1863
- default: n(() => [i(e(x), {
1848
+ default: l(() => [i(e(x), {
1864
1849
  modelValue: t.value.password,
1865
1850
  "onUpdate:modelValue": c[1] || (c[1] = (p) => t.value.password = p),
1866
1851
  placeholder: "请输入密码",
@@ -1870,39 +1855,39 @@ const qi = ye, ie = /* @__PURE__ */ P({
1870
1855
  _: 1
1871
1856
  }, 8, ["rules"]), z("div", Jt, [i(e(V), {
1872
1857
  type: "primary",
1873
- loading: s.loading,
1858
+ loading: n.loading,
1874
1859
  long: "",
1875
- size: s.size,
1876
- onClick: a
1860
+ size: n.size,
1861
+ onClick: s
1877
1862
  }, {
1878
- default: n(() => [...c[2] || (c[2] = [_(" 登陆 ", -1)])]),
1863
+ default: l(() => [...c[2] || (c[2] = [b(" 登陆 ", -1)])]),
1879
1864
  _: 1
1880
1865
  }, 8, ["loading", "size"])])]),
1881
1866
  _: 1
1882
1867
  }, 8, ["model", "size"])]));
1883
1868
  }
1884
- }), Xt = /* @__PURE__ */ $(Qt, [["__scopeId", "data-v-76d6bc26"]]), Yt = {
1869
+ }), Xt = /* @__PURE__ */ $(Qt, [["__scopeId", "data-v-7078c6f1"]]), Yt = {
1885
1870
  class: "SwitchSignUpOrResetPassword"
1886
1871
  }, ei = /* @__PURE__ */ P({
1887
1872
  __name: "AuthkitSwitchSignUpOrResetPassword",
1888
1873
  emits: ["switchSignUp", "switchResetPassword"],
1889
- setup(l, {
1890
- emit: r
1874
+ setup(a, {
1875
+ emit: u
1891
1876
  }) {
1892
- const u = r;
1893
- function s() {
1894
- u("switchSignUp");
1877
+ const d = u;
1878
+ function n() {
1879
+ d("switchSignUp");
1895
1880
  }
1896
1881
  function o() {
1897
- u("switchResetPassword");
1882
+ d("switchResetPassword");
1898
1883
  }
1899
- return (d, t) => (g(), A("div", Yt, [z("span", null, [t[1] || (t[1] = z("span", null, " 还没有账户?", -1)), i(e(j), {
1884
+ return (m, t) => (g(), A("div", Yt, [z("span", null, [t[1] || (t[1] = z("span", null, " 还没有账户?", -1)), i(e(j), {
1900
1885
  style: {
1901
1886
  padding: "0px"
1902
1887
  },
1903
- onClick: s
1888
+ onClick: n
1904
1889
  }, {
1905
- default: n(() => [...t[0] || (t[0] = [_("去注册?", -1)])]),
1890
+ default: l(() => [...t[0] || (t[0] = [b("去注册?", -1)])]),
1906
1891
  _: 1
1907
1892
  })]), i(e(j), {
1908
1893
  style: {
@@ -1910,13 +1895,13 @@ const qi = ye, ie = /* @__PURE__ */ P({
1910
1895
  },
1911
1896
  onClick: o
1912
1897
  }, {
1913
- default: n(() => [...t[2] || (t[2] = [_(" 忘记密码?", -1)])]),
1898
+ default: l(() => [...t[2] || (t[2] = [b(" 忘记密码?", -1)])]),
1914
1899
  _: 1
1915
1900
  })]));
1916
1901
  }
1917
1902
  }), ti = /* @__PURE__ */ $(ei, [["__scopeId", "data-v-14e3aab2"]]), ii = {
1918
1903
  class: "SignIn"
1919
- }, li = /* @__PURE__ */ P({
1904
+ }, ai = /* @__PURE__ */ P({
1920
1905
  __name: "AuthkitSignIn",
1921
1906
  props: {
1922
1907
  size: {
@@ -1930,33 +1915,33 @@ const qi = ye, ie = /* @__PURE__ */ P({
1930
1915
  }
1931
1916
  },
1932
1917
  emits: ["submit", "switchSignUp", "switchResetPassword"],
1933
- setup(l, {
1934
- emit: r
1918
+ setup(a, {
1919
+ emit: u
1935
1920
  }) {
1936
- const u = r, s = l, o = Ve(), d = F(() => !!o.OAuth);
1921
+ const d = u, n = a, o = Ve(), m = N(() => !!o.OAuth);
1937
1922
  function t() {
1938
- u("switchSignUp");
1923
+ d("switchSignUp");
1939
1924
  }
1940
- function a() {
1941
- u("switchResetPassword");
1925
+ function s() {
1926
+ d("switchResetPassword");
1942
1927
  }
1943
1928
  async function y(c) {
1944
- u("submit", c);
1929
+ d("submit", c);
1945
1930
  }
1946
1931
  return (c, p) => (g(), A("div", ii, [S("", !0), i(Xt, {
1947
- loading: s.loading,
1948
- size: s.size,
1932
+ loading: n.loading,
1933
+ size: n.size,
1949
1934
  onSubmit: y
1950
- }, null, 8, ["loading", "size"]), d.value ? de(c.$slots, "OAuth", {
1935
+ }, null, 8, ["loading", "size"]), m.value ? me(c.$slots, "OAuth", {
1951
1936
  key: 1
1952
1937
  }, void 0, !0) : S("", !0), i(ti, {
1953
1938
  onSwitchSignUp: t,
1954
- onSwitchResetPassword: a
1939
+ onSwitchResetPassword: s
1955
1940
  })]));
1956
1941
  }
1957
- }), ai = /* @__PURE__ */ $(li, [["__scopeId", "data-v-f52ce3b3"]]), ni = {
1942
+ }), si = /* @__PURE__ */ $(ai, [["__scopeId", "data-v-f52ce3b3"]]), li = {
1958
1943
  class: "SignUp"
1959
- }, si = /* @__PURE__ */ P({
1944
+ }, ni = /* @__PURE__ */ P({
1960
1945
  __name: "AuthkitSignUp",
1961
1946
  props: {
1962
1947
  size: {
@@ -1970,25 +1955,25 @@ const qi = ye, ie = /* @__PURE__ */ P({
1970
1955
  }
1971
1956
  },
1972
1957
  emits: ["switchSignIn", "submit"],
1973
- setup(l, {
1974
- emit: r
1958
+ setup(a, {
1959
+ emit: u
1975
1960
  }) {
1976
- const u = r, s = l;
1961
+ const d = u, n = a;
1977
1962
  function o() {
1978
- u("switchSignIn");
1963
+ d("switchSignIn");
1979
1964
  }
1980
- async function d(t) {
1981
- u("submit", t);
1965
+ async function m(t) {
1966
+ d("submit", t);
1982
1967
  }
1983
- return (t, a) => (g(), A("div", ni, [i(pe, {
1984
- size: s.size,
1985
- loading: l.loading,
1986
- onSubmit: d
1987
- }, null, 8, ["size", "loading"]), i(he, {
1968
+ return (t, s) => (g(), A("div", li, [i(ve, {
1969
+ size: n.size,
1970
+ loading: a.loading,
1971
+ onSubmit: m
1972
+ }, null, 8, ["size", "loading"]), i(we, {
1988
1973
  onSwitchSignIn: o
1989
1974
  })]));
1990
1975
  }
1991
- }), oi = /* @__PURE__ */ $(si, [["__scopeId", "data-v-058bbbef"]]), ri = ["src"], ui = /* @__PURE__ */ P({
1976
+ }), oi = /* @__PURE__ */ $(ni, [["__scopeId", "data-v-058bbbef"]]), ri = ["src"], ui = /* @__PURE__ */ P({
1992
1977
  __name: "AuthkitAuthTitle",
1993
1978
  props: {
1994
1979
  size: {
@@ -2007,28 +1992,28 @@ const qi = ye, ie = /* @__PURE__ */ P({
2007
1992
  default: 60
2008
1993
  }
2009
1994
  },
2010
- setup(l) {
2011
- const r = l, u = `${r.size}px`, s = `${r.fontSize}px`, o = `${r.lineHeight}px`, {
2012
- currentView: d
1995
+ setup(a) {
1996
+ const u = a, d = `${u.size}px`, n = `${u.fontSize}px`, o = `${u.lineHeight}px`, {
1997
+ currentView: m
2013
1998
  } = Q(), {
2014
1999
  appsData: t
2015
- } = ae(), a = F(() => d.value === "signIn" ? `${t.value.name}登录` : d.value === "signUp" ? `${t.value.name}账号注册` : d.value === "resetPassword" ? `${t.value.name}密码重置` : "");
2000
+ } = le(), s = N(() => m.value === "signIn" ? `${t.value.name}登录` : m.value === "signUp" ? `${t.value.name}账号注册` : m.value === "resetPassword" ? `${t.value.name}密码重置` : "");
2016
2001
  return (y, c) => (g(), A("div", {
2017
2002
  class: "Title",
2018
- style: le({
2019
- fontSize: s,
2003
+ style: se({
2004
+ fontSize: n,
2020
2005
  lineHeight: o
2021
2006
  })
2022
2007
  }, [e(t).applicationLogoUrl ? (g(), A("img", {
2023
2008
  key: 0,
2024
2009
  src: e(t).applicationLogoUrl,
2025
2010
  srcset: "",
2026
- style: le({
2027
- width: u
2011
+ style: se({
2012
+ width: d
2028
2013
  })
2029
- }, null, 12, ri)) : S("", !0), z("span", null, T(a.value), 1), de(y.$slots, "default", {}, void 0, !0)], 4));
2014
+ }, null, 12, ri)) : S("", !0), z("span", null, R(s.value), 1), me(y.$slots, "default", {}, void 0, !0)], 4));
2030
2015
  }
2031
- }), we = /* @__PURE__ */ $(ui, [["__scopeId", "data-v-5576db64"]]), di = {
2016
+ }), _e = /* @__PURE__ */ $(ui, [["__scopeId", "data-v-5576db64"]]), di = {
2032
2017
  class: "Auth"
2033
2018
  }, mi = {
2034
2019
  class: "body"
@@ -2045,54 +2030,54 @@ const qi = ye, ie = /* @__PURE__ */ P({
2045
2030
  }
2046
2031
  },
2047
2032
  emits: ["toPrivacyPolicy", "toUserServiceAgreement"],
2048
- setup(l, {
2049
- emit: r
2033
+ setup(a, {
2034
+ emit: u
2050
2035
  }) {
2051
- const u = l, s = r, {
2036
+ const d = a, n = u, {
2052
2037
  signInSubmit: o,
2053
- signUpSubmit: d,
2038
+ signUpSubmit: m,
2054
2039
  resetPasswordSubmit: t,
2055
- currentView: a,
2040
+ currentView: s,
2056
2041
  authSignInLoading: y,
2057
2042
  authSignUpLoading: c,
2058
2043
  resetPasswordLoading: p,
2059
- switchSignUp: m,
2044
+ switchSignUp: r,
2060
2045
  switchResetPassword: f,
2061
2046
  switchSignIn: v
2062
2047
  } = Q(), {
2063
- appsAuthPageInfoApi: b
2064
- } = ae();
2048
+ appsAuthPageInfoApi: _
2049
+ } = le();
2065
2050
  function q() {
2066
- s("toPrivacyPolicy");
2051
+ n("toPrivacyPolicy");
2067
2052
  }
2068
2053
  function U() {
2069
- s("toUserServiceAgreement");
2054
+ n("toUserServiceAgreement");
2070
2055
  }
2071
- return b(), (R, B) => (g(), A("div", di, [l.showTitle ? (g(), k(we, {
2056
+ return _(), (T, B) => (g(), A("div", di, [a.showTitle ? (g(), k(_e, {
2072
2057
  key: 0,
2073
2058
  size: 32,
2074
2059
  "font-size": 20
2075
- })) : S("", !0), z("div", mi, [e(a) === "signIn" ? (g(), k(ai, {
2060
+ })) : S("", !0), z("div", mi, [e(s) === "signIn" ? (g(), k(si, {
2076
2061
  key: 0,
2077
- size: u.size,
2062
+ size: d.size,
2078
2063
  loading: e(y),
2079
- onSwitchSignUp: e(m),
2064
+ onSwitchSignUp: e(r),
2080
2065
  onSwitchResetPassword: e(f),
2081
2066
  onSubmit: B[0] || (B[0] = (O) => e(o)(O))
2082
2067
  }, {
2083
- OAuth: n(() => [i(Tt, {
2084
- size: u.size
2068
+ OAuth: l(() => [i(Rt, {
2069
+ size: d.size
2085
2070
  }, null, 8, ["size"])]),
2086
2071
  _: 1
2087
- }, 8, ["size", "loading", "onSwitchSignUp", "onSwitchResetPassword"])) : e(a) === "signUp" ? (g(), k(oi, {
2072
+ }, 8, ["size", "loading", "onSwitchSignUp", "onSwitchResetPassword"])) : e(s) === "signUp" ? (g(), k(oi, {
2088
2073
  key: 1,
2089
- size: u.size,
2074
+ size: d.size,
2090
2075
  loading: e(c),
2091
2076
  onSwitchSignIn: e(v),
2092
- onSubmit: B[1] || (B[1] = (O) => e(d)(O))
2093
- }, null, 8, ["size", "loading", "onSwitchSignIn"])) : e(a) === "resetPassword" ? (g(), k(Gt, {
2077
+ onSubmit: B[1] || (B[1] = (O) => e(m)(O))
2078
+ }, null, 8, ["size", "loading", "onSwitchSignIn"])) : e(s) === "resetPassword" ? (g(), k(Gt, {
2094
2079
  key: 2,
2095
- size: u.size,
2080
+ size: d.size,
2096
2081
  loading: e(p),
2097
2082
  onSwitchSignIn: e(v),
2098
2083
  onSubmit: B[2] || (B[2] = (O) => e(t)(O))
@@ -2114,25 +2099,25 @@ const qi = ye, ie = /* @__PURE__ */ P({
2114
2099
  }
2115
2100
  },
2116
2101
  emits: ["confirm", "close", "toPrivacyPolicy", "toUserServiceAgreement"],
2117
- setup(l, {
2118
- emit: r
2102
+ setup(a, {
2103
+ emit: u
2119
2104
  }) {
2120
2105
  const {
2121
- addSignInCallback: u
2106
+ addSignInCallback: d
2122
2107
  } = Q(), {
2123
- show: s
2124
- } = xe(), o = l, d = r;
2108
+ show: n
2109
+ } = xe(), o = a, m = u;
2125
2110
  function t(y) {
2126
2111
  y(!0);
2127
2112
  }
2128
- function a() {
2129
- s.value = !1, d("close");
2113
+ function s() {
2114
+ n.value = !1, m("close");
2130
2115
  }
2131
- return u(() => {
2132
- s.value = !1;
2133
- }), (y, c) => (g(), k(e(ce), {
2134
- visible: e(s),
2135
- "onUpdate:visible": c[2] || (c[2] = (p) => ue(s) ? s.value = p : null),
2116
+ return d(() => {
2117
+ n.value = !1;
2118
+ }), (y, c) => (g(), k(e(fe), {
2119
+ visible: e(n),
2120
+ "onUpdate:visible": c[2] || (c[2] = (p) => de(n) ? n.value = p : null),
2136
2121
  footer: !1,
2137
2122
  "mask-closable": !1,
2138
2123
  "title-align": "center",
@@ -2140,44 +2125,44 @@ const qi = ye, ie = /* @__PURE__ */ P({
2140
2125
  width: "auto",
2141
2126
  "modal-class": "SignInModalClass",
2142
2127
  onBeforeOk: t,
2143
- onClose: a
2128
+ onClose: s
2144
2129
  }, {
2145
- title: n(() => [i(we)]),
2146
- default: n(() => [i(fi, {
2130
+ title: l(() => [i(_e)]),
2131
+ default: l(() => [i(fi, {
2147
2132
  "show-title": !1,
2148
2133
  size: o.size,
2149
- onToPrivacyPolicy: c[0] || (c[0] = (p) => d("toPrivacyPolicy")),
2150
- onToUserServiceAgreement: c[1] || (c[1] = (p) => d("toUserServiceAgreement"))
2134
+ onToPrivacyPolicy: c[0] || (c[0] = (p) => m("toPrivacyPolicy")),
2135
+ onToUserServiceAgreement: c[1] || (c[1] = (p) => m("toUserServiceAgreement"))
2151
2136
  }, null, 8, ["size"])]),
2152
2137
  _: 1
2153
2138
  }, 8, ["visible"]));
2154
2139
  }
2155
- }), Ri = /* @__PURE__ */ $(pi, [["__scopeId", "data-v-6fbefff8"]]);
2140
+ }), Ti = /* @__PURE__ */ $(pi, [["__scopeId", "data-v-6fbefff8"]]);
2156
2141
  export {
2157
2142
  xi as A,
2158
- pe as E,
2159
- Tt as O,
2143
+ ve as E,
2144
+ Rt as O,
2160
2145
  Dt as P,
2161
2146
  Gt as R,
2162
2147
  ne as S,
2163
- ie as _,
2148
+ ae as _,
2164
2149
  fi as a,
2165
- we as b,
2166
- Ri as c,
2167
- ai as d,
2150
+ _e as b,
2151
+ Ti as c,
2152
+ si as d,
2168
2153
  oi as e,
2169
2154
  Xt as f,
2170
- he as g,
2155
+ we as g,
2171
2156
  ti as h,
2172
2157
  Kt as i,
2173
2158
  Xe as j,
2174
- se as k,
2159
+ oe as k,
2175
2160
  yt as l,
2176
2161
  rt as m,
2177
2162
  pt as n,
2178
2163
  ot as o,
2179
2164
  qi as p,
2180
2165
  Ci as q,
2181
- ye as u,
2166
+ he as u,
2182
2167
  X as v
2183
2168
  };