@huyooo/ui 2.0.5 → 2.0.7

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.
@@ -1,30 +1,30 @@
1
- import { defineComponent as A, computed as R, openBlock as l, createElementBlock as k, normalizeStyle as G, normalizeClass as he, renderSlot as Z, createBlock as I, unref as e, createCommentVNode as z, createElementVNode as S, toDisplayString as L, ref as P, createVNode as a, withCtx as f, createTextVNode as x, watchEffect as le, Fragment as D, renderList as re, useModel as ze, watch as ye, mergeModels as Pe, useSlots as Ve, onMounted as E, onUnmounted as ue } from "vue";
2
- import { useRoute as Ae } from "vue-router";
1
+ import { defineComponent as A, computed as R, openBlock as l, createElementBlock as k, normalizeStyle as G, normalizeClass as ge, renderSlot as Z, createBlock as I, unref as e, createCommentVNode as z, createElementVNode as S, toDisplayString as L, ref as P, createVNode as a, withCtx as f, createTextVNode as x, watchEffect as ne, Fragment as D, renderList as le, useModel as Pe, watch as he, mergeModels as Ve, useSlots as Ae, onMounted as E, onUnmounted as re } from "vue";
2
+ import { useRouter as ye, useRoute as Ue } from "vue-router";
3
3
  /* empty css */
4
4
  /* empty css */
5
5
  import "./userMenuModal-D-nDaYqM.js";
6
- import { Message as X, Form as H, FormItem as V, Input as U, Button as B, Link as Y, Tabs as de, TabPane as ce, Checkbox as Ue, Modal as Ce, List as $e, ListItem as ie, ListItemMeta as ne, Avatar as te, Alert as fe, Spin as Te, Empty as Re } from "@arco-design/web-vue";
6
+ import { Message as X, Form as H, FormItem as V, Input as U, Button as B, Link as Y, Tabs as ue, TabPane as de, Checkbox as Ce, Modal as $e, List as Te, ListItem as oe, ListItemMeta as ie, Avatar as te, Alert as me, Spin as Re, Empty as qe } from "@arco-design/web-vue";
7
7
  import { a as M, u as N } from "./useAuthkitAuth-BPTZUSkM.js";
8
8
  import { g as O, u as we } from "./apiClients-Ctcq8NZs.js";
9
9
  import { u as j } from "./useAuthkitAppsAuthPageInfo-DZ1p-P3Q.js";
10
- import { o as ve, i as qe, j as ge, k as be, u as xe, l as Le, m as Be, n as J, p as Oe, h as _e, S as K, q as W, r as ke, s as Me, b as Fe } from "./AuthkitAppSetting-D_94iUEG.js";
10
+ import { o as fe, i as xe, j as ve, k as be, u as Le, l as Be, m as Oe, n as J, p as Me, h as _e, S as K, q as W, r as ke, s as Fe, b as De } from "./AuthkitAppSetting-CX4WTwNd.js";
11
11
  import { _ as C } from "./_plugin-vue_export-helper-CHgC5LLL.js";
12
12
  /* empty css */
13
13
  import "./index-Cn6LcfZO.js";
14
14
  /* empty css */
15
- import { u as Se, L as De, i as Ee } from "./useLegalDocs-BZlntAI7.js";
16
- import { u as pe } from "./runtime-qs4IasEB.js";
17
- import { u as oe } from "./useAuthkitUsersProfile-CW_exa7E.js";
15
+ import { u as Se, L as Ee, i as He } from "./useLegalDocs-BZlntAI7.js";
16
+ import { u as ce } from "./runtime-qs4IasEB.js";
17
+ import { u as Ie } from "./useAuthkitUsersProfile-BclJWOvR.js";
18
18
  /* empty css */
19
19
  /* empty css */
20
20
  import "./CustomTable-HDwqEcmB.js";
21
21
  /* empty css */
22
- import { TiptapEditor as He, TiptapTitle as Ge } from "@huyooo/vue-tiptap";
23
- import { f as Ne } from "./fetchAuthPageAboutUs-CP5a7jIo.js";
24
- const je = ["title", "aria-label", "disabled"], Ke = {
22
+ import { TiptapEditor as Ge, TiptapTitle as Ne } from "@huyooo/vue-tiptap";
23
+ import { f as je } from "./fetchAuthPageAboutUs-CP5a7jIo.js";
24
+ const Ke = ["title", "aria-label", "disabled"], We = {
25
25
  key: 0,
26
26
  class: "OAuthItem__spinner"
27
- }, We = /* @__PURE__ */ A({
27
+ }, Qe = /* @__PURE__ */ A({
28
28
  __name: "AuthkitOauthItem",
29
29
  props: {
30
30
  size: {
@@ -49,38 +49,38 @@ const je = ["title", "aria-label", "disabled"], Ke = {
49
49
  }
50
50
  },
51
51
  setup(b) {
52
- const r = b, d = R(() => ({
53
- width: `${ge}px`,
54
- height: `${ge}px`,
55
- padding: `${qe}px`,
56
- "--oauth-icon-size": `${ve}px`
52
+ const u = b, d = R(() => ({
53
+ width: `${ve}px`,
54
+ height: `${ve}px`,
55
+ padding: `${xe}px`,
56
+ "--oauth-icon-size": `${fe}px`
57
57
  }));
58
- return (n, v) => (l(), k("button", {
59
- class: he(["OAuthItem", {
60
- "OAuthItem--loading": r.loading
58
+ return (n, g) => (l(), k("button", {
59
+ class: ge(["OAuthItem", {
60
+ "OAuthItem--loading": u.loading
61
61
  }]),
62
62
  type: "button",
63
- title: r.label,
64
- "aria-label": r.label,
65
- disabled: r.disabled || r.loading,
63
+ title: u.label,
64
+ "aria-label": u.label,
65
+ disabled: u.disabled || u.loading,
66
66
  style: G(d.value)
67
- }, [r.loading ? (l(), k("span", Ke)) : Z(n.$slots, "icon", {
67
+ }, [u.loading ? (l(), k("span", We)) : Z(n.$slots, "icon", {
68
68
  key: 1
69
- }, () => [r.icon ? (l(), I(be, {
69
+ }, () => [u.icon ? (l(), I(be, {
70
70
  key: 0,
71
- icon: r.icon,
72
- size: e(ve)
73
- }, null, 8, ["icon", "size"])) : z("", !0)], !0)], 14, je));
71
+ icon: u.icon,
72
+ size: e(fe)
73
+ }, null, 8, ["icon", "size"])) : z("", !0)], !0)], 14, Ke));
74
74
  }
75
- }), Q = /* @__PURE__ */ C(We, [["__scopeId", "data-v-e00c1d80"]]), Qe = {
75
+ }), Q = /* @__PURE__ */ C(Qe, [["__scopeId", "data-v-e00c1d80"]]), Je = {
76
76
  class: "OAuthList"
77
- }, Je = {
77
+ }, Xe = {
78
78
  key: 0,
79
79
  class: "OAuthDivider"
80
- }, Xe = {
80
+ }, Ye = {
81
81
  key: 1,
82
82
  class: "OAuthHint"
83
- }, Ye = /* @__PURE__ */ A({
83
+ }, Ze = /* @__PURE__ */ A({
84
84
  __name: "AuthkitOauthList",
85
85
  props: {
86
86
  size: {
@@ -90,20 +90,20 @@ const je = ["title", "aria-label", "disabled"], Ke = {
90
90
  },
91
91
  emits: ["passkeySubmit"],
92
92
  setup(b, {
93
- emit: r
93
+ emit: u
94
94
  }) {
95
- const d = r, {
95
+ const d = u, {
96
96
  appsData: n
97
97
  } = j(), {
98
- loading: v,
98
+ loading: g,
99
99
  supported: h,
100
100
  loginWithPasskey: o,
101
101
  formatError: s
102
- } = xe(), {
102
+ } = Le(), {
103
103
  githubAuth: c,
104
- googleAuth: u,
104
+ googleAuth: r,
105
105
  microsoftAuth: t,
106
- wechatAuth: g
106
+ wechatAuth: v
107
107
  } = _e(), {
108
108
  acceptedTerms: i,
109
109
  ensureTermsAcceptedForSignIn: w
@@ -113,7 +113,7 @@ const je = ["title", "aria-label", "disabled"], Ke = {
113
113
  acceptedTerms: i.value ? !0 : void 0
114
114
  });
115
115
  }
116
- const m = b, y = R(() => n.value.authMethods.login.passkey && Le() || ""), _ = R(() => {
116
+ const m = b, y = R(() => n.value.authMethods.login.passkey && Be() || ""), _ = R(() => {
117
117
  const $ = n.value.oauth, T = $.google.enabled || $.microsoft.enabled || $.github.enabled || $.wechat.enabled, F = n.value.authMethods.login.passkey;
118
118
  return T || F;
119
119
  });
@@ -133,17 +133,17 @@ const je = ["title", "aria-label", "disabled"], Ke = {
133
133
  X.error(T);
134
134
  }
135
135
  }
136
- return ($, T) => (l(), k("div", Qe, [_.value ? (l(), k("div", Je, [...T[4] || (T[4] = [S("span", null, "其他登录方式", -1)])])) : z("", !0), S("div", {
136
+ return ($, T) => (l(), k("div", Je, [_.value ? (l(), k("div", Xe, [...T[4] || (T[4] = [S("span", null, "其他登录方式", -1)])])) : z("", !0), S("div", {
137
137
  class: "OAuthIcons",
138
138
  style: G({
139
- gap: `${e(Be)}px`
139
+ gap: `${e(Oe)}px`
140
140
  })
141
141
  }, [e(n).oauth.google.enabled ? (l(), I(Q, {
142
142
  key: 0,
143
143
  icon: e(J).google,
144
144
  label: "Google",
145
145
  size: m.size,
146
- onClick: T[0] || (T[0] = (F) => p(e(u)))
146
+ onClick: T[0] || (T[0] = (F) => p(e(r)))
147
147
  }, null, 8, ["icon", "size"])) : z("", !0), e(n).oauth.github.enabled ? (l(), I(Q, {
148
148
  key: 1,
149
149
  icon: e(J).github,
@@ -161,24 +161,24 @@ const je = ["title", "aria-label", "disabled"], Ke = {
161
161
  icon: e(J).wechat,
162
162
  label: "微信",
163
163
  size: m.size,
164
- onClick: T[3] || (T[3] = (F) => p(e(g)))
164
+ onClick: T[3] || (T[3] = (F) => p(e(v)))
165
165
  }, null, 8, ["icon", "size"])) : z("", !0), e(n).authMethods.login.passkey ? (l(), I(Q, {
166
166
  key: 4,
167
- icon: e(Oe),
167
+ icon: e(Me),
168
168
  label: "Passkey",
169
169
  size: m.size,
170
- loading: e(v),
170
+ loading: e(g),
171
171
  disabled: !e(h),
172
172
  onClick: q
173
- }, null, 8, ["icon", "size", "loading", "disabled"])) : z("", !0)], 4), y.value ? (l(), k("p", Xe, L(y.value), 1)) : z("", !0)]));
173
+ }, null, 8, ["icon", "size", "loading", "disabled"])) : z("", !0)], 4), y.value ? (l(), k("p", Ye, L(y.value), 1)) : z("", !0)]));
174
174
  }
175
- }), Ze = /* @__PURE__ */ C(Ye, [["__scopeId", "data-v-aa6a61de"]]), et = {
175
+ }), et = /* @__PURE__ */ C(Ze, [["__scopeId", "data-v-aa6a61de"]]), tt = {
176
176
  class: "content"
177
- }, tt = {
178
- class: "sendVerifyCodeItem"
179
177
  }, st = {
178
+ class: "sendVerifyCodeItem"
179
+ }, at = {
180
180
  class: "handle"
181
- }, at = /* @__PURE__ */ A({
181
+ }, ot = /* @__PURE__ */ A({
182
182
  __name: "AuthkitPasswordUpdateAndVerify",
183
183
  props: {
184
184
  size: {
@@ -193,9 +193,9 @@ const je = ["title", "aria-label", "disabled"], Ke = {
193
193
  },
194
194
  emits: ["signIn", "submit"],
195
195
  setup(b, {
196
- emit: r
196
+ emit: u
197
197
  }) {
198
- const d = r, n = b, v = P(), h = P(!1), o = P(), s = P({
198
+ const d = u, n = b, g = P(), h = P(!1), o = P(), s = P({
199
199
  email: void 0,
200
200
  userToken: void 0,
201
201
  emailVerifyId: void 0,
@@ -205,19 +205,19 @@ const je = ["title", "aria-label", "disabled"], Ke = {
205
205
  async function c() {
206
206
  if (!await o.value.validateField(["email"])) {
207
207
  h.value = !0;
208
- const g = await O().auth.verify.email.retry.post({
208
+ const v = await O().auth.verify.email.retry.post({
209
209
  email: s.value.email,
210
210
  purpose: "resetPassword"
211
211
  });
212
- h.value = !1, g.data && (s.value.emailVerifyId = g.data.emailVerifyId), W(v.value, g);
212
+ h.value = !1, v.data && (s.value.emailVerifyId = v.data.emailVerifyId), W(g.value, v);
213
213
  }
214
214
  }
215
- async function u() {
215
+ async function r() {
216
216
  o.value.validate().then((t) => {
217
217
  t || d("submit", s.value);
218
218
  });
219
219
  }
220
- return (t, g) => (l(), k("div", et, [a(e(H), {
220
+ return (t, v) => (l(), k("div", tt, [a(e(H), {
221
221
  ref_key: "formRef",
222
222
  ref: o,
223
223
  model: s.value,
@@ -238,7 +238,7 @@ const je = ["title", "aria-label", "disabled"], Ke = {
238
238
  }, {
239
239
  default: f(() => [a(e(U), {
240
240
  modelValue: s.value.email,
241
- "onUpdate:modelValue": g[0] || (g[0] = (i) => s.value.email = i),
241
+ "onUpdate:modelValue": v[0] || (v[0] = (i) => s.value.email = i),
242
242
  placeholder: "请输入邮箱"
243
243
  }, null, 8, ["modelValue"])]),
244
244
  _: 1
@@ -251,13 +251,13 @@ const je = ["title", "aria-label", "disabled"], Ke = {
251
251
  message: "请输入验证码"
252
252
  }]
253
253
  }, {
254
- default: f(() => [S("div", tt, [a(e(U), {
254
+ default: f(() => [S("div", st, [a(e(U), {
255
255
  modelValue: s.value.userToken,
256
- "onUpdate:modelValue": g[1] || (g[1] = (i) => s.value.userToken = i),
256
+ "onUpdate:modelValue": v[1] || (v[1] = (i) => s.value.userToken = i),
257
257
  placeholder: "请输入验证码"
258
258
  }, null, 8, ["modelValue"]), a(K, {
259
259
  ref_key: "SendVerifyCodeRef",
260
- ref: v,
260
+ ref: g,
261
261
  size: n.size,
262
262
  loading: h.value,
263
263
  style: {
@@ -280,7 +280,7 @@ const je = ["title", "aria-label", "disabled"], Ke = {
280
280
  }, {
281
281
  default: f(() => [a(e(U), {
282
282
  modelValue: s.value.password,
283
- "onUpdate:modelValue": g[2] || (g[2] = (i) => s.value.password = i),
283
+ "onUpdate:modelValue": v[2] || (v[2] = (i) => s.value.password = i),
284
284
  placeholder: "请输入密码",
285
285
  type: "password",
286
286
  autocomplete: ""
@@ -304,30 +304,30 @@ const je = ["title", "aria-label", "disabled"], Ke = {
304
304
  }, {
305
305
  default: f(() => [a(e(U), {
306
306
  modelValue: s.value.confirmPassword,
307
- "onUpdate:modelValue": g[3] || (g[3] = (i) => s.value.confirmPassword = i),
307
+ "onUpdate:modelValue": v[3] || (v[3] = (i) => s.value.confirmPassword = i),
308
308
  placeholder: "请输入确认密码密码",
309
309
  type: "password",
310
310
  autocomplete: ""
311
311
  }, null, 8, ["modelValue"])]),
312
312
  _: 1
313
- }, 8, ["rules"]), S("div", st, [a(e(B), {
313
+ }, 8, ["rules"]), S("div", at, [a(e(B), {
314
314
  type: "primary",
315
315
  loading: n.loading,
316
316
  long: "",
317
317
  size: n.size,
318
- onClick: u
318
+ onClick: r
319
319
  }, {
320
- default: f(() => [...g[4] || (g[4] = [x(" 提交 ", -1)])]),
320
+ default: f(() => [...v[4] || (v[4] = [x(" 提交 ", -1)])]),
321
321
  _: 1
322
322
  }, 8, ["loading", "size"])])]),
323
323
  _: 1
324
324
  }, 8, ["model", "size"])]));
325
325
  }
326
- }), ot = /* @__PURE__ */ C(at, [["__scopeId", "data-v-4091e418"]]), it = {
326
+ }), it = /* @__PURE__ */ C(ot, [["__scopeId", "data-v-4091e418"]]), nt = {
327
327
  class: "content"
328
- }, nt = {
328
+ }, lt = {
329
329
  class: "sendVerifyCodeItem"
330
- }, lt = /* @__PURE__ */ A({
330
+ }, rt = /* @__PURE__ */ A({
331
331
  __name: "AuthkitPhonePasswordUpdateAndVerify",
332
332
  props: {
333
333
  size: {
@@ -342,9 +342,9 @@ const je = ["title", "aria-label", "disabled"], Ke = {
342
342
  },
343
343
  emits: ["submit"],
344
344
  setup(b, {
345
- emit: r
345
+ emit: u
346
346
  }) {
347
- const d = r, n = b, v = P(), h = P(!1), o = P(), s = P({
347
+ const d = u, n = b, g = P(), h = P(!1), o = P(), s = P({
348
348
  phone: void 0,
349
349
  code: void 0,
350
350
  password: void 0,
@@ -356,27 +356,27 @@ const je = ["title", "aria-label", "disabled"], Ke = {
356
356
  minLength: 10,
357
357
  message: "确认密码不能少于10字符"
358
358
  }, {
359
- validator: (g, i) => {
360
- if (g !== s.value.password) {
359
+ validator: (v, i) => {
360
+ if (v !== s.value.password) {
361
361
  i("两次密码输入不一致,请重新输入");
362
362
  return;
363
363
  }
364
364
  i();
365
365
  }
366
366
  }];
367
- async function u() {
367
+ async function r() {
368
368
  if (!await o.value.validateField(["phone"])) {
369
369
  h.value = !0;
370
370
  const i = await O().auth.verify.sms.send.post({
371
371
  phone: s.value.phone,
372
372
  purpose: "resetPassword"
373
373
  });
374
- h.value = !1, W(v.value, i);
374
+ h.value = !1, W(g.value, i);
375
375
  }
376
376
  }
377
377
  async function t() {
378
- o.value.validate().then((g) => {
379
- g || d("submit", {
378
+ o.value.validate().then((v) => {
379
+ v || d("submit", {
380
380
  method: "phone",
381
381
  phone: s.value.phone,
382
382
  code: s.value.code,
@@ -384,7 +384,7 @@ const je = ["title", "aria-label", "disabled"], Ke = {
384
384
  });
385
385
  });
386
386
  }
387
- return (g, i) => (l(), k("div", it, [a(e(H), {
387
+ return (v, i) => (l(), k("div", nt, [a(e(H), {
388
388
  ref_key: "formRef",
389
389
  ref: o,
390
390
  model: s.value,
@@ -420,20 +420,20 @@ const je = ["title", "aria-label", "disabled"], Ke = {
420
420
  message: "请输入验证码"
421
421
  }]
422
422
  }, {
423
- default: f(() => [S("div", nt, [a(e(U), {
423
+ default: f(() => [S("div", lt, [a(e(U), {
424
424
  modelValue: s.value.code,
425
425
  "onUpdate:modelValue": i[1] || (i[1] = (w) => s.value.code = w),
426
426
  placeholder: "请输入验证码",
427
427
  autocomplete: "one-time-code"
428
428
  }, null, 8, ["modelValue"]), a(K, {
429
429
  ref_key: "SendVerifyCodeRef",
430
- ref: v,
430
+ ref: g,
431
431
  size: n.size,
432
432
  loading: h.value,
433
433
  style: {
434
434
  "margin-left": "10px"
435
435
  },
436
- onSend: u
436
+ onSend: r
437
437
  }, null, 8, ["size", "loading"])])]),
438
438
  _: 1
439
439
  }), a(e(V), {
@@ -483,19 +483,19 @@ const je = ["title", "aria-label", "disabled"], Ke = {
483
483
  _: 1
484
484
  }, 8, ["model", "size"])]));
485
485
  }
486
- }), rt = /* @__PURE__ */ C(lt, [["__scopeId", "data-v-a01a994e"]]), ut = {
486
+ }), ut = /* @__PURE__ */ C(rt, [["__scopeId", "data-v-a01a994e"]]), dt = {
487
487
  class: "SwitchSignIn"
488
- }, dt = /* @__PURE__ */ A({
488
+ }, ct = /* @__PURE__ */ A({
489
489
  __name: "AuthkitSwitchSignIn",
490
490
  emits: ["switchSignIn"],
491
491
  setup(b, {
492
- emit: r
492
+ emit: u
493
493
  }) {
494
- const d = r;
494
+ const d = u;
495
495
  function n() {
496
496
  d("switchSignIn");
497
497
  }
498
- return (v, h) => (l(), k("div", ut, [S("span", null, [h[1] || (h[1] = S("span", null, "已经有账号?", -1)), a(e(Y), {
498
+ return (g, h) => (l(), k("div", dt, [S("span", null, [h[1] || (h[1] = S("span", null, "已经有账号?", -1)), a(e(Y), {
499
499
  style: {
500
500
  padding: "0px"
501
501
  },
@@ -505,15 +505,15 @@ const je = ["title", "aria-label", "disabled"], Ke = {
505
505
  _: 1
506
506
  })])]));
507
507
  }
508
- }), me = /* @__PURE__ */ C(dt, [["__scopeId", "data-v-c09d6c18"]]), ct = {
508
+ }), pe = /* @__PURE__ */ C(ct, [["__scopeId", "data-v-c09d6c18"]]), pt = {
509
509
  class: "ResetPassword"
510
- }, pt = {
510
+ }, mt = {
511
511
  key: 0,
512
512
  class: "tabsContainer"
513
- }, mt = {
513
+ }, ft = {
514
514
  key: 3,
515
515
  class: "empty"
516
- }, ft = /* @__PURE__ */ A({
516
+ }, vt = /* @__PURE__ */ A({
517
517
  __name: "AuthkitResetPassword",
518
518
  props: {
519
519
  size: {
@@ -529,11 +529,11 @@ const je = ["title", "aria-label", "disabled"], Ke = {
529
529
  },
530
530
  emits: ["switchSignIn", "submit"],
531
531
  setup(b, {
532
- emit: r
532
+ emit: u
533
533
  }) {
534
- const d = r, n = b, {
535
- appsData: v
536
- } = j(), h = R(() => v.value.authMethods), o = R(() => {
534
+ const d = u, n = b, {
535
+ appsData: g
536
+ } = j(), h = R(() => g.value.authMethods), o = R(() => {
537
537
  const t = [];
538
538
  return h.value.login.emailPassword && t.push({
539
539
  key: "email",
@@ -543,58 +543,58 @@ const je = ["title", "aria-label", "disabled"], Ke = {
543
543
  title: "手机号找回"
544
544
  }), t;
545
545
  }), s = P("email");
546
- le(() => {
546
+ ne(() => {
547
547
  var t;
548
- o.value.some((g) => g.key === s.value) || (s.value = ((t = o.value[0]) == null ? void 0 : t.key) || "email");
548
+ o.value.some((v) => v.key === s.value) || (s.value = ((t = o.value[0]) == null ? void 0 : t.key) || "email");
549
549
  });
550
550
  function c() {
551
551
  d("switchSignIn");
552
552
  }
553
- async function u(t) {
553
+ async function r(t) {
554
554
  d("submit", {
555
555
  method: s.value,
556
556
  ...t
557
557
  });
558
558
  }
559
- return (t, g) => (l(), k("div", ct, [o.value.length > 1 ? (l(), k("div", pt, [a(e(de), {
559
+ return (t, v) => (l(), k("div", pt, [o.value.length > 1 ? (l(), k("div", mt, [a(e(ue), {
560
560
  "active-key": s.value,
561
- "onUpdate:activeKey": g[0] || (g[0] = (i) => s.value = i)
561
+ "onUpdate:activeKey": v[0] || (v[0] = (i) => s.value = i)
562
562
  }, {
563
- default: f(() => [(l(!0), k(D, null, re(o.value, (i) => (l(), I(e(ce), {
563
+ default: f(() => [(l(!0), k(D, null, le(o.value, (i) => (l(), I(e(de), {
564
564
  key: i.key,
565
565
  title: i.title
566
566
  }, null, 8, ["title"]))), 128))]),
567
567
  _: 1
568
- }, 8, ["active-key"])])) : z("", !0), s.value === "email" && h.value.login.emailPassword ? (l(), I(ot, {
568
+ }, 8, ["active-key"])])) : z("", !0), s.value === "email" && h.value.login.emailPassword ? (l(), I(it, {
569
569
  key: 1,
570
570
  loading: b.loading,
571
571
  size: n.size,
572
- onSubmit: u
573
- }, null, 8, ["loading", "size"])) : s.value === "phone" && h.value.login.phonePassword ? (l(), I(rt, {
572
+ onSubmit: r
573
+ }, null, 8, ["loading", "size"])) : s.value === "phone" && h.value.login.phonePassword ? (l(), I(ut, {
574
574
  key: 2,
575
575
  loading: b.loading,
576
576
  size: n.size,
577
- onSubmit: u
578
- }, null, 8, ["loading", "size"])) : (l(), k("div", mt, "当前应用未开放找回密码")), a(me, {
577
+ onSubmit: r
578
+ }, null, 8, ["loading", "size"])) : (l(), k("div", ft, "当前应用未开放找回密码")), a(pe, {
579
579
  onSwitchSignIn: c
580
580
  })]));
581
581
  }
582
- }), vt = /* @__PURE__ */ C(ft, [["__scopeId", "data-v-90d789bb"]]);
582
+ }), gt = /* @__PURE__ */ C(vt, [["__scopeId", "data-v-90d789bb"]]);
583
583
  let se = null, ae = null;
584
- function gt(b) {
584
+ function ht(b) {
585
585
  se = b.onPrivacyPolicy ?? null, ae = b.onUserServiceAgreement ?? null;
586
586
  }
587
- function ht() {
587
+ function yt() {
588
588
  se == null || se();
589
589
  }
590
- function yt() {
590
+ function wt() {
591
591
  ae == null || ae();
592
592
  }
593
- const wt = {
593
+ const bt = {
594
594
  key: 2
595
- }, bt = /* @__PURE__ */ A({
595
+ }, _t = /* @__PURE__ */ A({
596
596
  __name: "AuthkitServiceAgreementAndPrivacyProtection",
597
- props: /* @__PURE__ */ Pe({
597
+ props: /* @__PURE__ */ Ve({
598
598
  currentView: {}
599
599
  }, {
600
600
  acceptedTerms: {
@@ -606,48 +606,48 @@ const wt = {
606
606
  emits: ["update:acceptedTerms"],
607
607
  setup(b) {
608
608
  const {
609
- config: r
610
- } = pe(), d = b, n = ze(b, "acceptedTerms"), {
611
- getLink: v,
609
+ config: u
610
+ } = ce(), d = b, n = Pe(b, "acceptedTerms"), {
611
+ getLink: g,
612
612
  openLegalDoc: h
613
613
  } = Se(), {
614
614
  termsShaking: o,
615
615
  requiresAcceptanceForSignUp: s,
616
616
  requiresAcceptanceForOAuth: c,
617
- syncAcceptedTerms: u
617
+ syncAcceptedTerms: r
618
618
  } = M();
619
- ye(n, (_) => {
620
- u(_);
619
+ he(n, (_) => {
620
+ r(_);
621
621
  });
622
622
  const t = R(() => {
623
- const _ = v("userServiceAgreement");
623
+ const _ = g("userServiceAgreement");
624
624
  return _ != null && _.configured ? _ : void 0;
625
- }), g = R(() => {
626
- const _ = v("privacyPolicy");
625
+ }), v = R(() => {
626
+ const _ = g("privacyPolicy");
627
627
  return _ != null && _.configured ? _ : void 0;
628
- }), i = R(() => !!(t.value || g.value)), w = R(() => d.currentView === "signUp" ? s() : d.currentView === "signIn" ? c() : !1), p = R(() => i.value && w.value);
628
+ }), i = R(() => !!(t.value || v.value)), w = R(() => d.currentView === "signUp" ? s() : d.currentView === "signIn" ? c() : !1), p = R(() => i.value && w.value);
629
629
  function m() {
630
- if (r.legalDocsMode === "builtin") {
630
+ if (u.legalDocsMode === "builtin") {
631
631
  h("userServiceAgreement");
632
632
  return;
633
633
  }
634
- yt();
634
+ wt();
635
635
  }
636
636
  function y() {
637
- if (r.legalDocsMode === "builtin") {
637
+ if (u.legalDocsMode === "builtin") {
638
638
  h("privacyPolicy");
639
639
  return;
640
640
  }
641
- ht();
641
+ yt();
642
642
  }
643
643
  return (_, q) => p.value ? (l(), k("div", {
644
644
  key: 0,
645
- class: he(["ServiceAgreementAndPrivacyProtection", {
645
+ class: ge(["ServiceAgreementAndPrivacyProtection", {
646
646
  "terms-shake": e(o)
647
647
  }])
648
648
  }, [i.value ? (l(), k(D, {
649
649
  key: 0
650
- }, [w.value ? (l(), I(e(Ue), {
650
+ }, [w.value ? (l(), I(e(Ce), {
651
651
  key: 0,
652
652
  modelValue: n.value,
653
653
  "onUpdate:modelValue": q[0] || (q[0] = ($) => n.value = $),
@@ -663,19 +663,19 @@ const wt = {
663
663
  }, {
664
664
  default: f(() => [x(L(t.value.label), 1)]),
665
665
  _: 1
666
- })) : z("", !0), t.value && g.value ? (l(), k("span", wt, "和")) : z("", !0), g.value ? (l(), I(e(Y), {
666
+ })) : z("", !0), t.value && v.value ? (l(), k("span", bt, "和")) : z("", !0), v.value ? (l(), I(e(Y), {
667
667
  key: 3,
668
668
  onClick: y
669
669
  }, {
670
- default: f(() => [x(L(g.value.label), 1)]),
670
+ default: f(() => [x(L(v.value.label), 1)]),
671
671
  _: 1
672
672
  })) : z("", !0)], 64)) : z("", !0)], 2)) : z("", !0);
673
673
  }
674
- }), ee = /* @__PURE__ */ C(bt, [["__scopeId", "data-v-a0c2f361"]]), _t = {
674
+ }), ee = /* @__PURE__ */ C(_t, [["__scopeId", "data-v-a0c2f361"]]), kt = {
675
675
  class: "content"
676
- }, kt = {
676
+ }, St = {
677
677
  class: "handle"
678
- }, St = /* @__PURE__ */ A({
678
+ }, It = /* @__PURE__ */ A({
679
679
  __name: "AuthkitPasswordAuth",
680
680
  props: {
681
681
  size: {
@@ -694,24 +694,24 @@ const wt = {
694
694
  },
695
695
  emits: ["submit"],
696
696
  setup(b, {
697
- emit: r
697
+ emit: u
698
698
  }) {
699
- const d = r, {
699
+ const d = u, {
700
700
  useTermsFormField: n
701
701
  } = M(), {
702
- showTermsField: v,
702
+ showTermsField: g,
703
703
  termsRules: h
704
704
  } = n("signIn"), o = b, s = P(), c = P({
705
705
  identifier: void 0,
706
706
  password: void 0,
707
707
  acceptedTerms: !1
708
708
  });
709
- async function u() {
709
+ async function r() {
710
710
  s.value.validate().then((t) => {
711
711
  t || d("submit", c.value);
712
712
  });
713
713
  }
714
- return (t, g) => (l(), k("div", _t, [a(e(H), {
714
+ return (t, v) => (l(), k("div", kt, [a(e(H), {
715
715
  ref_key: "formRef",
716
716
  ref: s,
717
717
  model: c.value,
@@ -729,7 +729,7 @@ const wt = {
729
729
  }, {
730
730
  default: f(() => [a(e(U), {
731
731
  modelValue: c.value.identifier,
732
- "onUpdate:modelValue": g[0] || (g[0] = (i) => c.value.identifier = i),
732
+ "onUpdate:modelValue": v[0] || (v[0] = (i) => c.value.identifier = i),
733
733
  placeholder: o.allowPhone ? "请输入邮箱或手机号" : "请输入邮箱",
734
734
  autocomplete: "email username"
735
735
  }, null, 8, ["modelValue", "placeholder"])]),
@@ -745,22 +745,22 @@ const wt = {
745
745
  }, {
746
746
  default: f(() => [a(e(U), {
747
747
  modelValue: c.value.password,
748
- "onUpdate:modelValue": g[1] || (g[1] = (i) => c.value.password = i),
748
+ "onUpdate:modelValue": v[1] || (v[1] = (i) => c.value.password = i),
749
749
  placeholder: "请输入密码",
750
750
  type: "password",
751
751
  autocomplete: "current-password"
752
752
  }, null, 8, ["modelValue"])]),
753
753
  _: 1
754
- }), S("div", kt, [a(e(B), {
754
+ }), S("div", St, [a(e(B), {
755
755
  type: "primary",
756
756
  loading: o.loading,
757
757
  long: "",
758
758
  size: o.size,
759
- onClick: u
759
+ onClick: r
760
760
  }, {
761
- default: f(() => [...g[3] || (g[3] = [x(" 登录 ", -1)])]),
761
+ default: f(() => [...v[3] || (v[3] = [x(" 登录 ", -1)])]),
762
762
  _: 1
763
- }, 8, ["loading", "size"]), e(v) ? (l(), I(e(V), {
763
+ }, 8, ["loading", "size"]), e(g) ? (l(), I(e(V), {
764
764
  key: 0,
765
765
  field: "acceptedTerms",
766
766
  "hide-label": "",
@@ -768,7 +768,7 @@ const wt = {
768
768
  }, {
769
769
  default: f(() => [a(ee, {
770
770
  "accepted-terms": c.value.acceptedTerms,
771
- "onUpdate:acceptedTerms": g[2] || (g[2] = (i) => c.value.acceptedTerms = i),
771
+ "onUpdate:acceptedTerms": v[2] || (v[2] = (i) => c.value.acceptedTerms = i),
772
772
  "current-view": "signIn"
773
773
  }, null, 8, ["accepted-terms"])]),
774
774
  _: 1
@@ -776,15 +776,15 @@ const wt = {
776
776
  _: 1
777
777
  }, 8, ["model", "size"])]));
778
778
  }
779
- }), It = /* @__PURE__ */ C(St, [["__scopeId", "data-v-cca59a39"]]), zt = {
779
+ }), zt = /* @__PURE__ */ C(It, [["__scopeId", "data-v-cca59a39"]]), Pt = {
780
780
  class: "SignInPhone"
781
- }, Pt = {
782
- class: "content"
783
781
  }, Vt = {
784
- class: "sendVerifyCodeItem"
782
+ class: "content"
785
783
  }, At = {
784
+ class: "sendVerifyCodeItem"
785
+ }, Ut = {
786
786
  class: "handle"
787
- }, Ut = /* @__PURE__ */ A({
787
+ }, Ct = /* @__PURE__ */ A({
788
788
  __name: "AuthkitSignInPhone",
789
789
  props: {
790
790
  size: {
@@ -799,20 +799,20 @@ const wt = {
799
799
  },
800
800
  emits: ["submit"],
801
801
  setup(b, {
802
- emit: r
802
+ emit: u
803
803
  }) {
804
- const d = r, {
804
+ const d = u, {
805
805
  useTermsFormField: n
806
806
  } = M(), {
807
- showTermsField: v,
807
+ showTermsField: g,
808
808
  termsRules: h
809
- } = n("signIn"), o = b, s = P(), c = P(!1), u = P(), t = P({
809
+ } = n("signIn"), o = b, s = P(), c = P(!1), r = P(), t = P({
810
810
  phone: void 0,
811
811
  code: void 0,
812
812
  acceptedTerms: !1
813
813
  });
814
- async function g() {
815
- if (!await u.value.validateField(["phone"])) {
814
+ async function v() {
815
+ if (!await r.value.validateField(["phone"])) {
816
816
  c.value = !0;
817
817
  const p = await O().auth.verify.sms.send.post({
818
818
  phone: t.value.phone,
@@ -822,7 +822,7 @@ const wt = {
822
822
  }
823
823
  }
824
824
  async function i() {
825
- u.value.validate().then((w) => {
825
+ r.value.validate().then((w) => {
826
826
  w || d("submit", {
827
827
  identifier: t.value.phone,
828
828
  code: t.value.code,
@@ -830,9 +830,9 @@ const wt = {
830
830
  });
831
831
  });
832
832
  }
833
- return (w, p) => (l(), k("div", zt, [S("div", Pt, [a(e(H), {
833
+ return (w, p) => (l(), k("div", Pt, [S("div", Vt, [a(e(H), {
834
834
  ref_key: "formRef",
835
- ref: u,
835
+ ref: r,
836
836
  model: t.value,
837
837
  size: o.size,
838
838
  "auto-label-width": ""
@@ -866,7 +866,7 @@ const wt = {
866
866
  message: "请输入验证码"
867
867
  }]
868
868
  }, {
869
- default: f(() => [S("div", Vt, [a(e(U), {
869
+ default: f(() => [S("div", At, [a(e(U), {
870
870
  modelValue: t.value.code,
871
871
  "onUpdate:modelValue": p[1] || (p[1] = (m) => t.value.code = m),
872
872
  placeholder: "请输入验证码",
@@ -879,10 +879,10 @@ const wt = {
879
879
  style: {
880
880
  "margin-left": "10px"
881
881
  },
882
- onSend: g
882
+ onSend: v
883
883
  }, null, 8, ["size", "loading"])])]),
884
884
  _: 1
885
- }), S("div", At, [a(e(B), {
885
+ }), S("div", Ut, [a(e(B), {
886
886
  type: "primary",
887
887
  loading: o.loading,
888
888
  long: "",
@@ -891,7 +891,7 @@ const wt = {
891
891
  }, {
892
892
  default: f(() => [...p[3] || (p[3] = [x(" 登录 ", -1)])]),
893
893
  _: 1
894
- }, 8, ["loading", "size"]), e(v) ? (l(), I(e(V), {
894
+ }, 8, ["loading", "size"]), e(g) ? (l(), I(e(V), {
895
895
  key: 0,
896
896
  field: "acceptedTerms",
897
897
  "hide-label": "",
@@ -907,13 +907,13 @@ const wt = {
907
907
  _: 1
908
908
  }, 8, ["model", "size"])])]));
909
909
  }
910
- }), Ct = /* @__PURE__ */ C(Ut, [["__scopeId", "data-v-ef67e91c"]]), $t = {
910
+ }), $t = /* @__PURE__ */ C(Ct, [["__scopeId", "data-v-ef67e91c"]]), Tt = {
911
911
  class: "SignInEmailCode"
912
- }, Tt = {
913
- class: "sendVerifyCodeItem"
914
912
  }, Rt = {
913
+ class: "sendVerifyCodeItem"
914
+ }, qt = {
915
915
  class: "handle"
916
- }, qt = /* @__PURE__ */ A({
916
+ }, xt = /* @__PURE__ */ A({
917
917
  __name: "AuthkitSignInEmailCode",
918
918
  props: {
919
919
  size: {
@@ -928,22 +928,22 @@ const wt = {
928
928
  },
929
929
  emits: ["submit"],
930
930
  setup(b, {
931
- emit: r
931
+ emit: u
932
932
  }) {
933
- const d = r, {
933
+ const d = u, {
934
934
  useTermsFormField: n
935
935
  } = M(), {
936
- showTermsField: v,
936
+ showTermsField: g,
937
937
  termsRules: h
938
- } = n("signIn"), o = b, s = P(), c = P(!1), u = P(), t = P({
938
+ } = n("signIn"), o = b, s = P(), c = P(!1), r = P(), t = P({
939
939
  email: void 0,
940
940
  code: void 0,
941
941
  emailVerifyId: "",
942
942
  acceptedTerms: !1
943
943
  });
944
- async function g() {
944
+ async function v() {
945
945
  var p;
946
- if (!await u.value.validateField(["email"])) {
946
+ if (!await r.value.validateField(["email"])) {
947
947
  c.value = !0;
948
948
  const m = await O().auth.verify.email.retry.post({
949
949
  email: t.value.email,
@@ -953,7 +953,7 @@ const wt = {
953
953
  }
954
954
  }
955
955
  async function i() {
956
- u.value.validate().then((w) => {
956
+ r.value.validate().then((w) => {
957
957
  w || d("submit", {
958
958
  identifier: t.value.email,
959
959
  code: t.value.code,
@@ -962,9 +962,9 @@ const wt = {
962
962
  });
963
963
  });
964
964
  }
965
- return (w, p) => (l(), k("div", $t, [a(e(H), {
965
+ return (w, p) => (l(), k("div", Tt, [a(e(H), {
966
966
  ref_key: "formRef",
967
- ref: u,
967
+ ref: r,
968
968
  model: t.value,
969
969
  size: o.size,
970
970
  "auto-label-width": ""
@@ -995,7 +995,7 @@ const wt = {
995
995
  message: "请输入验证码"
996
996
  }]
997
997
  }, {
998
- default: f(() => [S("div", Tt, [a(e(U), {
998
+ default: f(() => [S("div", Rt, [a(e(U), {
999
999
  modelValue: t.value.code,
1000
1000
  "onUpdate:modelValue": p[1] || (p[1] = (m) => t.value.code = m),
1001
1001
  placeholder: "请输入验证码",
@@ -1008,10 +1008,10 @@ const wt = {
1008
1008
  style: {
1009
1009
  "margin-left": "10px"
1010
1010
  },
1011
- onSend: g
1011
+ onSend: v
1012
1012
  }, null, 8, ["size", "loading"])])]),
1013
1013
  _: 1
1014
- }), S("div", Rt, [a(e(B), {
1014
+ }), S("div", qt, [a(e(B), {
1015
1015
  type: "primary",
1016
1016
  loading: o.loading,
1017
1017
  long: "",
@@ -1020,7 +1020,7 @@ const wt = {
1020
1020
  }, {
1021
1021
  default: f(() => [...p[3] || (p[3] = [x(" 登录 ", -1)])]),
1022
1022
  _: 1
1023
- }, 8, ["loading", "size"]), e(v) ? (l(), I(e(V), {
1023
+ }, 8, ["loading", "size"]), e(g) ? (l(), I(e(V), {
1024
1024
  key: 0,
1025
1025
  field: "acceptedTerms",
1026
1026
  "hide-label": "",
@@ -1036,11 +1036,11 @@ const wt = {
1036
1036
  _: 1
1037
1037
  }, 8, ["model", "size"])]));
1038
1038
  }
1039
- }), xt = /* @__PURE__ */ C(qt, [["__scopeId", "data-v-fee4702f"]]), Lt = {
1039
+ }), Lt = /* @__PURE__ */ C(xt, [["__scopeId", "data-v-fee4702f"]]), Bt = {
1040
1040
  class: "SwitchSignUpOrResetPassword"
1041
- }, Bt = {
1041
+ }, Ot = {
1042
1042
  key: 0
1043
- }, Ot = /* @__PURE__ */ A({
1043
+ }, Mt = /* @__PURE__ */ A({
1044
1044
  __name: "AuthkitSwitchSignUpOrResetPassword",
1045
1045
  props: {
1046
1046
  showSignUp: {
@@ -1054,20 +1054,20 @@ const wt = {
1054
1054
  },
1055
1055
  emits: ["switchSignUp", "switchResetPassword"],
1056
1056
  setup(b, {
1057
- emit: r
1057
+ emit: u
1058
1058
  }) {
1059
- const d = b, n = r;
1060
- function v() {
1059
+ const d = b, n = u;
1060
+ function g() {
1061
1061
  n("switchSignUp");
1062
1062
  }
1063
1063
  function h() {
1064
1064
  n("switchResetPassword");
1065
1065
  }
1066
- return (o, s) => (l(), k("div", Lt, [d.showSignUp ? (l(), k("span", Bt, [s[1] || (s[1] = S("span", null, " 还没有账户?", -1)), a(e(Y), {
1066
+ return (o, s) => (l(), k("div", Bt, [d.showSignUp ? (l(), k("span", Ot, [s[1] || (s[1] = S("span", null, " 还没有账户?", -1)), a(e(Y), {
1067
1067
  style: {
1068
1068
  padding: "0px"
1069
1069
  },
1070
- onClick: v
1070
+ onClick: g
1071
1071
  }, {
1072
1072
  default: f(() => [...s[0] || (s[0] = [x("去注册?", -1)])]),
1073
1073
  _: 1
@@ -1082,12 +1082,12 @@ const wt = {
1082
1082
  _: 1
1083
1083
  })) : z("", !0)]));
1084
1084
  }
1085
- }), Mt = /* @__PURE__ */ C(Ot, [["__scopeId", "data-v-6ca7b1f2"]]), Ft = {
1085
+ }), Ft = /* @__PURE__ */ C(Mt, [["__scopeId", "data-v-6ca7b1f2"]]), Dt = {
1086
1086
  class: "SignIn"
1087
- }, Dt = {
1087
+ }, Et = {
1088
1088
  key: 0,
1089
1089
  class: "tabsContainer"
1090
- }, Et = /* @__PURE__ */ A({
1090
+ }, Ht = /* @__PURE__ */ A({
1091
1091
  __name: "AuthkitSignIn",
1092
1092
  props: {
1093
1093
  size: {
@@ -1102,13 +1102,13 @@ const wt = {
1102
1102
  },
1103
1103
  emits: ["submit", "switchSignUp", "switchResetPassword"],
1104
1104
  setup(b, {
1105
- emit: r
1105
+ emit: u
1106
1106
  }) {
1107
- const d = r, n = b, v = Ve(), h = R(() => !!v.OAuth), {
1107
+ const d = u, n = b, g = Ae(), h = R(() => !!g.OAuth), {
1108
1108
  appsData: o
1109
1109
  } = j(), {
1110
1110
  signUpAuthEnabled: s
1111
- } = M(), c = R(() => o.value.authMethods), u = R(() => s.value && (c.value.signUp.email || c.value.signUp.phone)), t = R(() => c.value.login.emailPassword || c.value.login.phonePassword), g = R(() => {
1111
+ } = M(), c = R(() => o.value.authMethods), r = R(() => s.value && (c.value.signUp.email || c.value.signUp.phone)), t = R(() => c.value.login.emailPassword || c.value.login.phonePassword), v = R(() => {
1112
1112
  const y = [];
1113
1113
  return (c.value.login.emailPassword || c.value.login.phonePassword) && y.push({
1114
1114
  key: "password",
@@ -1121,9 +1121,9 @@ const wt = {
1121
1121
  title: "邮箱验证码登录"
1122
1122
  }), y;
1123
1123
  }), i = P("password");
1124
- le(() => {
1124
+ ne(() => {
1125
1125
  var y;
1126
- g.value.some((_) => _.key === i.value) || (i.value = ((y = g.value[0]) == null ? void 0 : y.key) || "password");
1126
+ v.value.some((_) => _.key === i.value) || (i.value = ((y = v.value[0]) == null ? void 0 : y.key) || "password");
1127
1127
  });
1128
1128
  function w() {
1129
1129
  d("switchSignUp");
@@ -1137,47 +1137,47 @@ const wt = {
1137
1137
  ...y
1138
1138
  });
1139
1139
  }
1140
- return (y, _) => (l(), k("div", Ft, [g.value.length > 1 ? (l(), k("div", Dt, [a(e(de), {
1140
+ return (y, _) => (l(), k("div", Dt, [v.value.length > 1 ? (l(), k("div", Et, [a(e(ue), {
1141
1141
  "active-key": i.value,
1142
1142
  "onUpdate:activeKey": _[0] || (_[0] = (q) => i.value = q)
1143
1143
  }, {
1144
- default: f(() => [(l(!0), k(D, null, re(g.value, (q) => (l(), I(e(ce), {
1144
+ default: f(() => [(l(!0), k(D, null, le(v.value, (q) => (l(), I(e(de), {
1145
1145
  key: q.key,
1146
1146
  title: q.title
1147
1147
  }, null, 8, ["title"]))), 128))]),
1148
1148
  _: 1
1149
- }, 8, ["active-key"])])) : z("", !0), i.value === "password" && (c.value.login.emailPassword || c.value.login.phonePassword) ? (l(), I(It, {
1149
+ }, 8, ["active-key"])])) : z("", !0), i.value === "password" && (c.value.login.emailPassword || c.value.login.phonePassword) ? (l(), I(zt, {
1150
1150
  key: 1,
1151
1151
  loading: n.loading,
1152
1152
  size: n.size,
1153
1153
  "allow-phone": c.value.login.phonePassword,
1154
1154
  onSubmit: m
1155
- }, null, 8, ["loading", "size", "allow-phone"])) : i.value === "phoneCode" ? (l(), I(Ct, {
1155
+ }, null, 8, ["loading", "size", "allow-phone"])) : i.value === "phoneCode" ? (l(), I($t, {
1156
1156
  key: 2,
1157
1157
  loading: n.loading,
1158
1158
  size: n.size,
1159
1159
  onSubmit: m
1160
- }, null, 8, ["loading", "size"])) : i.value === "emailCode" ? (l(), I(xt, {
1160
+ }, null, 8, ["loading", "size"])) : i.value === "emailCode" ? (l(), I(Lt, {
1161
1161
  key: 3,
1162
1162
  loading: n.loading,
1163
1163
  size: n.size,
1164
1164
  onSubmit: m
1165
1165
  }, null, 8, ["loading", "size"])) : z("", !0), h.value ? Z(y.$slots, "OAuth", {
1166
1166
  key: 4
1167
- }, void 0, !0) : z("", !0), a(Mt, {
1168
- "show-sign-up": u.value,
1167
+ }, void 0, !0) : z("", !0), a(Ft, {
1168
+ "show-sign-up": r.value,
1169
1169
  "show-reset-password": t.value,
1170
1170
  onSwitchSignUp: w,
1171
1171
  onSwitchResetPassword: p
1172
1172
  }, null, 8, ["show-sign-up", "show-reset-password"])]));
1173
1173
  }
1174
- }), Ht = /* @__PURE__ */ C(Et, [["__scopeId", "data-v-a7aef80e"]]), Gt = {
1174
+ }), Gt = /* @__PURE__ */ C(Ht, [["__scopeId", "data-v-a7aef80e"]]), Nt = {
1175
1175
  class: "content"
1176
- }, Nt = {
1177
- class: "sendVerifyCodeItem"
1178
1176
  }, jt = {
1177
+ class: "sendVerifyCodeItem"
1178
+ }, Kt = {
1179
1179
  class: "handle"
1180
- }, Kt = /* @__PURE__ */ A({
1180
+ }, Wt = /* @__PURE__ */ A({
1181
1181
  __name: "AuthkitEmailUpdate",
1182
1182
  props: {
1183
1183
  size: {
@@ -1196,14 +1196,14 @@ const wt = {
1196
1196
  },
1197
1197
  emits: ["submit"],
1198
1198
  setup(b, {
1199
- emit: r
1199
+ emit: u
1200
1200
  }) {
1201
- const d = r, {
1201
+ const d = u, {
1202
1202
  useTermsFormField: n
1203
1203
  } = M(), {
1204
- showTermsField: v,
1204
+ showTermsField: g,
1205
1205
  termsRules: h
1206
- } = n("signUp"), o = b, s = P(), c = P(!1), u = P(), t = P({
1206
+ } = n("signUp"), o = b, s = P(), c = P(!1), r = P(), t = P({
1207
1207
  email: void 0,
1208
1208
  userToken: void 0,
1209
1209
  emailVerifyId: void 0,
@@ -1216,8 +1216,8 @@ const wt = {
1216
1216
  const w = ke();
1217
1217
  w && (t.value.inviteCode = w);
1218
1218
  });
1219
- async function g() {
1220
- if (!await u.value.validateField(["email"])) {
1219
+ async function v() {
1220
+ if (!await r.value.validateField(["email"])) {
1221
1221
  c.value = !0;
1222
1222
  const p = await O().auth.verify.email.retry.post({
1223
1223
  email: t.value.email,
@@ -1227,13 +1227,13 @@ const wt = {
1227
1227
  }
1228
1228
  }
1229
1229
  async function i() {
1230
- u.value.validate().then((w) => {
1230
+ r.value.validate().then((w) => {
1231
1231
  w || d("submit", t.value);
1232
1232
  });
1233
1233
  }
1234
- return (w, p) => (l(), k("div", Gt, [a(e(H), {
1234
+ return (w, p) => (l(), k("div", Nt, [a(e(H), {
1235
1235
  ref_key: "formRef",
1236
- ref: u,
1236
+ ref: r,
1237
1237
  model: t.value,
1238
1238
  size: o.size,
1239
1239
  "auto-label-width": ""
@@ -1267,7 +1267,7 @@ const wt = {
1267
1267
  message: "请输入验证码"
1268
1268
  }]
1269
1269
  }, {
1270
- default: f(() => [S("div", Nt, [a(e(U), {
1270
+ default: f(() => [S("div", jt, [a(e(U), {
1271
1271
  modelValue: t.value.userToken,
1272
1272
  "onUpdate:modelValue": p[1] || (p[1] = (m) => t.value.userToken = m),
1273
1273
  placeholder: "请输入验证码",
@@ -1280,7 +1280,7 @@ const wt = {
1280
1280
  style: {
1281
1281
  "margin-left": "10px"
1282
1282
  },
1283
- onSend: g
1283
+ onSend: v
1284
1284
  }, null, 8, ["size", "loading"])])]),
1285
1285
  _: 1
1286
1286
  }), a(e(V), {
@@ -1342,7 +1342,7 @@ const wt = {
1342
1342
  autocomplete: "off"
1343
1343
  }, null, 8, ["modelValue"])]),
1344
1344
  _: 1
1345
- }), S("div", jt, [a(e(B), {
1345
+ }), S("div", Kt, [a(e(B), {
1346
1346
  type: "primary",
1347
1347
  loading: o.loading,
1348
1348
  long: "",
@@ -1351,7 +1351,7 @@ const wt = {
1351
1351
  }, {
1352
1352
  default: f(() => [...p[6] || (p[6] = [x(" 提交 ", -1)])]),
1353
1353
  _: 1
1354
- }, 8, ["loading", "size"]), e(v) ? (l(), I(e(V), {
1354
+ }, 8, ["loading", "size"]), e(g) ? (l(), I(e(V), {
1355
1355
  key: 0,
1356
1356
  field: "acceptedTerms",
1357
1357
  "hide-label": "",
@@ -1367,15 +1367,15 @@ const wt = {
1367
1367
  _: 1
1368
1368
  }, 8, ["model", "size"])]));
1369
1369
  }
1370
- }), Wt = /* @__PURE__ */ C(Kt, [["__scopeId", "data-v-07ef9d49"]]), Qt = {
1370
+ }), Qt = /* @__PURE__ */ C(Wt, [["__scopeId", "data-v-07ef9d49"]]), Jt = {
1371
1371
  class: "SignUpPhone"
1372
- }, Jt = {
1373
- class: "content"
1374
1372
  }, Xt = {
1375
- class: "sendVerifyCodeItem"
1373
+ class: "content"
1376
1374
  }, Yt = {
1375
+ class: "sendVerifyCodeItem"
1376
+ }, Zt = {
1377
1377
  class: "handle"
1378
- }, Zt = /* @__PURE__ */ A({
1378
+ }, es = /* @__PURE__ */ A({
1379
1379
  __name: "AuthkitSignUpPhone",
1380
1380
  props: {
1381
1381
  size: {
@@ -1395,14 +1395,14 @@ const wt = {
1395
1395
  },
1396
1396
  emits: ["switchSignIn", "submit"],
1397
1397
  setup(b, {
1398
- emit: r
1398
+ emit: u
1399
1399
  }) {
1400
- const d = r, {
1400
+ const d = u, {
1401
1401
  useTermsFormField: n
1402
1402
  } = M(), {
1403
- showTermsField: v,
1403
+ showTermsField: g,
1404
1404
  termsRules: h
1405
- } = n("signUp"), o = b, s = P(), c = P(!1), u = P(), t = P({
1405
+ } = n("signUp"), o = b, s = P(), c = P(!1), r = P(), t = P({
1406
1406
  phone: void 0,
1407
1407
  code: void 0,
1408
1408
  password: void 0,
@@ -1414,7 +1414,7 @@ const wt = {
1414
1414
  const m = ke();
1415
1415
  m && (t.value.inviteCode = m);
1416
1416
  });
1417
- const g = [{
1417
+ const v = [{
1418
1418
  required: !0,
1419
1419
  message: "请输入确认密码"
1420
1420
  }, {
@@ -1426,7 +1426,7 @@ const wt = {
1426
1426
  d("switchSignIn");
1427
1427
  }
1428
1428
  async function w() {
1429
- if (!await u.value.validateField(["phone"])) {
1429
+ if (!await r.value.validateField(["phone"])) {
1430
1430
  c.value = !0;
1431
1431
  const y = await O().auth.verify.sms.send.post({
1432
1432
  phone: t.value.phone,
@@ -1436,7 +1436,7 @@ const wt = {
1436
1436
  }
1437
1437
  }
1438
1438
  async function p() {
1439
- u.value.validate().then((m) => {
1439
+ r.value.validate().then((m) => {
1440
1440
  m || d("submit", {
1441
1441
  type: "phone",
1442
1442
  phone: t.value.phone,
@@ -1446,9 +1446,9 @@ const wt = {
1446
1446
  });
1447
1447
  });
1448
1448
  }
1449
- return (m, y) => (l(), k("div", Qt, [S("div", Jt, [a(e(H), {
1449
+ return (m, y) => (l(), k("div", Jt, [S("div", Xt, [a(e(H), {
1450
1450
  ref_key: "formRef",
1451
- ref: u,
1451
+ ref: r,
1452
1452
  model: t.value,
1453
1453
  size: o.size,
1454
1454
  "auto-label-width": ""
@@ -1482,7 +1482,7 @@ const wt = {
1482
1482
  message: "请输入验证码"
1483
1483
  }]
1484
1484
  }, {
1485
- default: f(() => [S("div", Xt, [a(e(U), {
1485
+ default: f(() => [S("div", Yt, [a(e(U), {
1486
1486
  modelValue: t.value.code,
1487
1487
  "onUpdate:modelValue": y[1] || (y[1] = (_) => t.value.code = _),
1488
1488
  placeholder: "请输入验证码",
@@ -1524,7 +1524,7 @@ const wt = {
1524
1524
  field: "confirmPassword",
1525
1525
  label: "确认密码",
1526
1526
  "hide-label": "",
1527
- rules: g
1527
+ rules: v
1528
1528
  }, {
1529
1529
  default: f(() => [a(e(U), {
1530
1530
  modelValue: t.value.confirmPassword,
@@ -1549,7 +1549,7 @@ const wt = {
1549
1549
  autocomplete: "off"
1550
1550
  }, null, 8, ["modelValue"])]),
1551
1551
  _: 1
1552
- }), S("div", Yt, [a(e(B), {
1552
+ }), S("div", Zt, [a(e(B), {
1553
1553
  type: "primary",
1554
1554
  loading: o.loading,
1555
1555
  long: "",
@@ -1558,7 +1558,7 @@ const wt = {
1558
1558
  }, {
1559
1559
  default: f(() => [...y[6] || (y[6] = [x(" 注册 ", -1)])]),
1560
1560
  _: 1
1561
- }, 8, ["loading", "size"]), e(v) ? (l(), I(e(V), {
1561
+ }, 8, ["loading", "size"]), e(g) ? (l(), I(e(V), {
1562
1562
  key: 0,
1563
1563
  field: "acceptedTerms",
1564
1564
  "hide-label": "",
@@ -1572,25 +1572,25 @@ const wt = {
1572
1572
  _: 1
1573
1573
  }, 8, ["rules"])) : z("", !0)])]),
1574
1574
  _: 1
1575
- }, 8, ["model", "size"])]), a(me, {
1575
+ }, 8, ["model", "size"])]), a(pe, {
1576
1576
  onSwitchSignIn: i
1577
1577
  })]));
1578
1578
  }
1579
- }), es = /* @__PURE__ */ C(Zt, [["__scopeId", "data-v-d0af58fd"]]), ts = {
1579
+ }), ts = /* @__PURE__ */ C(es, [["__scopeId", "data-v-d0af58fd"]]), ss = {
1580
1580
  class: "SignUp"
1581
- }, ss = {
1581
+ }, as = {
1582
1582
  key: 0,
1583
1583
  class: "tabsContainer"
1584
- }, as = {
1584
+ }, os = {
1585
1585
  key: 1,
1586
1586
  class: "empty"
1587
- }, os = {
1587
+ }, is = {
1588
1588
  key: 2,
1589
1589
  class: "empty"
1590
- }, is = {
1590
+ }, ns = {
1591
1591
  key: 2,
1592
1592
  class: "empty"
1593
- }, ns = /* @__PURE__ */ A({
1593
+ }, ls = /* @__PURE__ */ A({
1594
1594
  __name: "AuthkitSignUp",
1595
1595
  props: {
1596
1596
  size: {
@@ -1605,14 +1605,14 @@ const wt = {
1605
1605
  },
1606
1606
  emits: ["switchSignIn", "submit"],
1607
1607
  setup(b, {
1608
- emit: r
1608
+ emit: u
1609
1609
  }) {
1610
- const d = r, n = b, {
1611
- appsData: v
1610
+ const d = u, n = b, {
1611
+ appsData: g
1612
1612
  } = j(), {
1613
1613
  registrationBlocked: h,
1614
1614
  signUpAuthEnabled: o
1615
- } = M(), s = R(() => v.value.authMethods), c = R(() => {
1615
+ } = M(), s = R(() => g.value.authMethods), c = R(() => {
1616
1616
  const i = [];
1617
1617
  return s.value.signUp.email && i.push({
1618
1618
  key: "email",
@@ -1621,48 +1621,48 @@ const wt = {
1621
1621
  key: "phone",
1622
1622
  title: "手机号注册"
1623
1623
  }), i;
1624
- }), u = P("email");
1625
- le(() => {
1624
+ }), r = P("email");
1625
+ ne(() => {
1626
1626
  var i;
1627
- c.value.some((w) => w.key === u.value) || (u.value = ((i = c.value[0]) == null ? void 0 : i.key) || "email");
1627
+ c.value.some((w) => w.key === r.value) || (r.value = ((i = c.value[0]) == null ? void 0 : i.key) || "email");
1628
1628
  });
1629
1629
  function t() {
1630
1630
  d("switchSignIn");
1631
1631
  }
1632
- async function g(i) {
1632
+ async function v(i) {
1633
1633
  d("submit", {
1634
- type: u.value,
1634
+ type: r.value,
1635
1635
  ...i
1636
1636
  });
1637
1637
  }
1638
- return (i, w) => (l(), k("div", ts, [c.value.length > 1 ? (l(), k("div", ss, [a(e(de), {
1639
- "active-key": u.value,
1640
- "onUpdate:activeKey": w[0] || (w[0] = (p) => u.value = p)
1638
+ return (i, w) => (l(), k("div", ss, [c.value.length > 1 ? (l(), k("div", as, [a(e(ue), {
1639
+ "active-key": r.value,
1640
+ "onUpdate:activeKey": w[0] || (w[0] = (p) => r.value = p)
1641
1641
  }, {
1642
- default: f(() => [(l(!0), k(D, null, re(c.value, (p) => (l(), I(e(ce), {
1642
+ default: f(() => [(l(!0), k(D, null, le(c.value, (p) => (l(), I(e(de), {
1643
1643
  key: p.key,
1644
1644
  title: p.title
1645
1645
  }, null, 8, ["title"]))), 128))]),
1646
1646
  _: 1
1647
- }, 8, ["active-key"])])) : z("", !0), e(o) ? e(h) ? (l(), k("div", os, " 管理员尚未配置用户协议或隐私政策,暂无法注册。 ")) : (l(), k(D, {
1647
+ }, 8, ["active-key"])])) : z("", !0), e(o) ? e(h) ? (l(), k("div", is, " 管理员尚未配置用户协议或隐私政策,暂无法注册。 ")) : (l(), k(D, {
1648
1648
  key: 3
1649
- }, [u.value === "email" && s.value.signUp.email ? (l(), I(Wt, {
1649
+ }, [r.value === "email" && s.value.signUp.email ? (l(), I(Qt, {
1650
1650
  key: 0,
1651
1651
  size: n.size,
1652
1652
  loading: b.loading,
1653
- onSubmit: g
1654
- }, null, 8, ["size", "loading"])) : u.value === "phone" && s.value.signUp.phone ? (l(), I(es, {
1653
+ onSubmit: v
1654
+ }, null, 8, ["size", "loading"])) : r.value === "phone" && s.value.signUp.phone ? (l(), I(ts, {
1655
1655
  key: 1,
1656
1656
  size: n.size,
1657
1657
  loading: b.loading,
1658
- onSubmit: g,
1658
+ onSubmit: v,
1659
1659
  onSwitchSignIn: t
1660
- }, null, 8, ["size", "loading"])) : (l(), k("div", is, " 当前应用未开放用户注册 ")), u.value === "email" ? (l(), I(me, {
1660
+ }, null, 8, ["size", "loading"])) : (l(), k("div", ns, " 当前应用未开放用户注册 ")), r.value === "email" ? (l(), I(pe, {
1661
1661
  key: 3,
1662
1662
  onSwitchSignIn: t
1663
- })) : z("", !0)], 64)) : (l(), k("div", as, " 系统已停止用户注册 "))]));
1663
+ })) : z("", !0)], 64)) : (l(), k("div", os, " 系统已停止用户注册 "))]));
1664
1664
  }
1665
- }), ls = /* @__PURE__ */ C(ns, [["__scopeId", "data-v-b211d5ef"]]), rs = ["src"], us = /* @__PURE__ */ A({
1665
+ }), rs = /* @__PURE__ */ C(ls, [["__scopeId", "data-v-b211d5ef"]]), us = ["src"], ds = /* @__PURE__ */ A({
1666
1666
  __name: "AuthkitAuthTitle",
1667
1667
  props: {
1668
1668
  size: {
@@ -1682,16 +1682,16 @@ const wt = {
1682
1682
  }
1683
1683
  },
1684
1684
  setup(b) {
1685
- const r = b, d = `${r.size}px`, n = `${r.fontSize}px`, v = `${r.lineHeight}px`, {
1685
+ const u = b, d = `${u.size}px`, n = `${u.fontSize}px`, g = `${u.lineHeight}px`, {
1686
1686
  currentView: h
1687
1687
  } = N(), {
1688
1688
  appsData: o
1689
1689
  } = j(), s = R(() => h.value === "signIn" ? `${o.value.name}登录` : h.value === "signUp" ? `${o.value.name}账号注册` : h.value === "resetPassword" ? `${o.value.name}密码重置` : "");
1690
- return (c, u) => (l(), k("div", {
1690
+ return (c, r) => (l(), k("div", {
1691
1691
  class: "Title",
1692
1692
  style: G({
1693
1693
  fontSize: n,
1694
- lineHeight: v
1694
+ lineHeight: g
1695
1695
  })
1696
1696
  }, [e(o).applicationLogoUrl ? (l(), k("img", {
1697
1697
  key: 0,
@@ -1700,13 +1700,13 @@ const wt = {
1700
1700
  style: G({
1701
1701
  width: d
1702
1702
  })
1703
- }, null, 12, rs)) : z("", !0), S("span", null, L(s.value), 1), Z(c.$slots, "default", {}, void 0, !0)], 4));
1703
+ }, null, 12, us)) : z("", !0), S("span", null, L(s.value), 1), Z(c.$slots, "default", {}, void 0, !0)], 4));
1704
1704
  }
1705
- }), Ie = /* @__PURE__ */ C(us, [["__scopeId", "data-v-8ebe7939"]]), ds = {
1705
+ }), ze = /* @__PURE__ */ C(ds, [["__scopeId", "data-v-8ebe7939"]]), cs = {
1706
1706
  class: "Auth"
1707
- }, cs = {
1707
+ }, ps = {
1708
1708
  class: "body"
1709
- }, ps = /* @__PURE__ */ A({
1709
+ }, ms = /* @__PURE__ */ A({
1710
1710
  __name: "AuthkitAuth",
1711
1711
  props: {
1712
1712
  size: {
@@ -1719,51 +1719,51 @@ const wt = {
1719
1719
  }
1720
1720
  },
1721
1721
  setup(b) {
1722
- const r = b, {
1722
+ const u = b, {
1723
1723
  signInSubmit: d,
1724
1724
  passkeySignInSubmit: n,
1725
- signUpSubmit: v,
1725
+ signUpSubmit: g,
1726
1726
  resetPasswordSubmit: h,
1727
1727
  currentView: o,
1728
1728
  authSignInLoading: s,
1729
1729
  authSignUpLoading: c,
1730
- resetPasswordLoading: u,
1730
+ resetPasswordLoading: r,
1731
1731
  switchSignUp: t,
1732
- switchResetPassword: g,
1732
+ switchResetPassword: v,
1733
1733
  switchSignIn: i
1734
1734
  } = N();
1735
- return (w, p) => (l(), k("div", ds, [b.showTitle ? (l(), I(Ie, {
1735
+ return (w, p) => (l(), k("div", cs, [b.showTitle ? (l(), I(ze, {
1736
1736
  key: 0,
1737
1737
  size: 32,
1738
1738
  "font-size": 20
1739
- })) : z("", !0), S("div", cs, [e(o) === "signIn" ? (l(), I(Ht, {
1739
+ })) : z("", !0), S("div", ps, [e(o) === "signIn" ? (l(), I(Gt, {
1740
1740
  key: 0,
1741
- size: r.size,
1741
+ size: u.size,
1742
1742
  loading: e(s),
1743
1743
  onSwitchSignUp: e(t),
1744
- onSwitchResetPassword: e(g),
1744
+ onSwitchResetPassword: e(v),
1745
1745
  onSubmit: p[0] || (p[0] = (m) => e(d)(m))
1746
1746
  }, {
1747
- OAuth: f(() => [a(Ze, {
1748
- size: r.size,
1747
+ OAuth: f(() => [a(et, {
1748
+ size: u.size,
1749
1749
  onPasskeySubmit: e(n)
1750
1750
  }, null, 8, ["size", "onPasskeySubmit"])]),
1751
1751
  _: 1
1752
- }, 8, ["size", "loading", "onSwitchSignUp", "onSwitchResetPassword"])) : e(o) === "signUp" ? (l(), I(ls, {
1752
+ }, 8, ["size", "loading", "onSwitchSignUp", "onSwitchResetPassword"])) : e(o) === "signUp" ? (l(), I(rs, {
1753
1753
  key: 1,
1754
- size: r.size,
1754
+ size: u.size,
1755
1755
  loading: e(c),
1756
1756
  onSwitchSignIn: e(i),
1757
- onSubmit: p[1] || (p[1] = (m) => e(v)(m))
1758
- }, null, 8, ["size", "loading", "onSwitchSignIn"])) : e(o) === "resetPassword" ? (l(), I(vt, {
1757
+ onSubmit: p[1] || (p[1] = (m) => e(g)(m))
1758
+ }, null, 8, ["size", "loading", "onSwitchSignIn"])) : e(o) === "resetPassword" ? (l(), I(gt, {
1759
1759
  key: 2,
1760
- size: r.size,
1761
- loading: e(u),
1760
+ size: u.size,
1761
+ loading: e(r),
1762
1762
  onSwitchSignIn: e(i),
1763
1763
  onSubmit: p[2] || (p[2] = (m) => e(h)(m))
1764
1764
  }, null, 8, ["size", "loading", "onSwitchSignIn"])) : z("", !0)])]));
1765
1765
  }
1766
- }), ms = /* @__PURE__ */ C(ps, [["__scopeId", "data-v-60874d88"]]), fs = /* @__PURE__ */ A({
1766
+ }), fs = /* @__PURE__ */ C(ms, [["__scopeId", "data-v-60874d88"]]), vs = /* @__PURE__ */ A({
1767
1767
  __name: "AuthkitAuthModal",
1768
1768
  props: {
1769
1769
  size: {
@@ -1772,27 +1772,27 @@ const wt = {
1772
1772
  },
1773
1773
  emits: ["close"],
1774
1774
  setup(b, {
1775
- emit: r
1775
+ emit: u
1776
1776
  }) {
1777
- const d = r, {
1777
+ const d = u, {
1778
1778
  onSignIn: n,
1779
- switchSignIn: v
1779
+ switchSignIn: g
1780
1780
  } = N(), {
1781
1781
  close: h
1782
1782
  } = we();
1783
1783
  let o = null;
1784
1784
  E(() => {
1785
1785
  o = n(() => h());
1786
- }), ue(() => {
1786
+ }), re(() => {
1787
1787
  o == null || o(), o = null;
1788
1788
  });
1789
- function s(u) {
1790
- u || c();
1789
+ function s(r) {
1790
+ r || c();
1791
1791
  }
1792
1792
  function c() {
1793
- v(), h(), d("close");
1793
+ g(), h(), d("close");
1794
1794
  }
1795
- return (u, t) => (l(), I(e(Ce), {
1795
+ return (r, t) => (l(), I(e($e), {
1796
1796
  visible: !0,
1797
1797
  footer: !1,
1798
1798
  "mask-closable": !1,
@@ -1802,15 +1802,15 @@ const wt = {
1802
1802
  "onUpdate:visible": s,
1803
1803
  onClose: c
1804
1804
  }, {
1805
- title: f(() => [a(Ie)]),
1806
- default: f(() => [a(ms, {
1805
+ title: f(() => [a(ze)]),
1806
+ default: f(() => [a(fs, {
1807
1807
  "show-title": !1,
1808
1808
  size: b.size
1809
1809
  }, null, 8, ["size"])]),
1810
1810
  _: 1
1811
1811
  }));
1812
1812
  }
1813
- }), vs = /* @__PURE__ */ C(fs, [["__scopeId", "data-v-19a4d5d0"]]), gs = /* @__PURE__ */ A({
1813
+ }), gs = /* @__PURE__ */ C(vs, [["__scopeId", "data-v-19a4d5d0"]]), hs = /* @__PURE__ */ A({
1814
1814
  __name: "AuthkitOAuthCallbackProvider",
1815
1815
  props: {
1816
1816
  bindIdentityRedirect: {
@@ -1826,60 +1826,58 @@ const wt = {
1826
1826
  }
1827
1827
  },
1828
1828
  setup(b) {
1829
- const r = b, d = ["token", "userId", "appId", "error", "needBindIdentity", "bindSuccess", "provider"], {
1829
+ const u = b, d = ["token", "userId", "appId", "error", "needBindIdentity", "bindSuccess", "provider"], {
1830
1830
  completeSignIn: n
1831
- } = N(), {
1832
- fetchUserProfile: v
1833
- } = oe();
1834
- function h(u) {
1835
- return d.some((t) => u.searchParams.has(t));
1836
- }
1837
- function o(u) {
1838
- d.forEach((g) => u.searchParams.delete(g));
1839
- const t = `${u.pathname}${u.search}${u.hash}`;
1831
+ } = N(), g = ye();
1832
+ function h(r) {
1833
+ return d.some((t) => r.searchParams.has(t));
1834
+ }
1835
+ function o(r) {
1836
+ d.forEach((v) => r.searchParams.delete(v));
1837
+ const t = `${r.pathname}${r.search}${r.hash}`;
1840
1838
  window.history.replaceState({}, "", t);
1841
1839
  }
1842
1840
  function s() {
1843
- if (!r.restoreRedirectAfterSignIn) return null;
1844
- const u = sessionStorage.getItem("auth_redirect");
1845
- if (sessionStorage.removeItem("auth_redirect"), !u) return null;
1841
+ if (!u.restoreRedirectAfterSignIn) return null;
1842
+ const r = sessionStorage.getItem("auth_redirect");
1843
+ if (sessionStorage.removeItem("auth_redirect"), !r) return null;
1846
1844
  const t = window.location.pathname + window.location.search + window.location.hash;
1847
- return u === t ? null : u;
1845
+ return r === t ? null : r;
1848
1846
  }
1849
1847
  async function c() {
1850
1848
  if (typeof window > "u") return;
1851
- const u = new URL(window.location.href);
1852
- if (!h(u)) return;
1853
- const t = u.searchParams.get("error");
1849
+ const r = new URL(window.location.href);
1850
+ if (!h(r)) return;
1851
+ const t = r.searchParams.get("error");
1854
1852
  if (t) {
1855
- o(u), X.error(t);
1853
+ o(r), X.error(t);
1856
1854
  return;
1857
1855
  }
1858
- if (u.searchParams.get("bindSuccess") === "true") {
1859
- const y = u.searchParams.get("provider");
1860
- o(u), await v(), X.success(y ? `${y} 绑定成功` : "绑定成功"), r.closePopupOnBindSuccess && window.opener && setTimeout(() => window.close(), 800);
1856
+ if (r.searchParams.get("bindSuccess") === "true") {
1857
+ const y = r.searchParams.get("provider");
1858
+ o(r), X.success(y ? `${y} 绑定成功` : "绑定成功"), u.closePopupOnBindSuccess && window.opener && setTimeout(() => window.close(), 800);
1861
1859
  return;
1862
1860
  }
1863
- const g = u.searchParams.get("token");
1864
- if (!g) return;
1865
- const i = u.searchParams.get("userId"), w = u.searchParams.get("appId"), p = u.searchParams.get("needBindIdentity") === "true";
1866
- if (o(u), n({
1867
- jwtToken: g,
1861
+ const v = r.searchParams.get("token");
1862
+ if (!v) return;
1863
+ const i = r.searchParams.get("userId"), w = r.searchParams.get("appId"), p = r.searchParams.get("needBindIdentity") === "true";
1864
+ if (o(r), n({
1865
+ jwtToken: v,
1868
1866
  userId: i,
1869
1867
  appId: w,
1870
1868
  needBindIdentity: p
1871
- }), await v(), p && r.bindIdentityRedirect) {
1872
- window.location.href = r.bindIdentityRedirect;
1869
+ }), p && u.bindIdentityRedirect) {
1870
+ await g.replace(u.bindIdentityRedirect);
1873
1871
  return;
1874
1872
  }
1875
1873
  const m = s();
1876
- m && (window.location.href = m);
1874
+ m && await g.replace(m);
1877
1875
  }
1878
1876
  return E(() => {
1879
1877
  c();
1880
- }), (u, t) => null;
1878
+ }), (r, t) => null;
1881
1879
  }
1882
- }), la = /* @__PURE__ */ A({
1880
+ }), ra = /* @__PURE__ */ A({
1883
1881
  __name: "AuthkitProvider",
1884
1882
  props: {
1885
1883
  handleOAuthCallback: {
@@ -1915,11 +1913,11 @@ const wt = {
1915
1913
  },
1916
1914
  emits: ["toPrivacyPolicy", "toUserServiceAgreement"],
1917
1915
  setup(b, {
1918
- emit: r
1916
+ emit: u
1919
1917
  }) {
1920
1918
  const {
1921
1919
  config: d
1922
- } = pe(), n = b, v = r, h = Ae(), {
1920
+ } = ce(), n = b, g = u, h = Ue(), {
1923
1921
  openLegalDoc: o
1924
1922
  } = Se({
1925
1923
  route: h
@@ -1927,15 +1925,15 @@ const wt = {
1927
1925
  isOpen: s
1928
1926
  } = we(), {
1929
1927
  restoreSession: c,
1930
- onSignIn: u,
1928
+ onSignIn: r,
1931
1929
  onSignOut: t
1932
1930
  } = N(), {
1933
- fetchUserProfile: g,
1931
+ fetchUserProfile: v,
1934
1932
  clearUserProfile: i
1935
- } = oe(), {
1933
+ } = Ie(), {
1936
1934
  appsAuthPageInfoApi: w
1937
- } = j(), p = u(() => {
1938
- g();
1935
+ } = j(), p = r(() => {
1936
+ v();
1939
1937
  }), m = t(() => {
1940
1938
  i();
1941
1939
  });
@@ -1944,37 +1942,37 @@ const wt = {
1944
1942
  o("privacyPolicy");
1945
1943
  return;
1946
1944
  }
1947
- v("toPrivacyPolicy");
1945
+ g("toPrivacyPolicy");
1948
1946
  }
1949
1947
  function _() {
1950
1948
  if (d.legalDocsMode === "builtin") {
1951
1949
  o("userServiceAgreement");
1952
1950
  return;
1953
1951
  }
1954
- v("toUserServiceAgreement");
1952
+ g("toUserServiceAgreement");
1955
1953
  }
1956
1954
  return E(async () => {
1957
- gt({
1955
+ ht({
1958
1956
  onPrivacyPolicy: y,
1959
1957
  onUserServiceAgreement: _
1960
- }), n.fetchAppInfo && await w(), n.restoreSession && c() ? g() : i();
1961
- }), ue(() => {
1958
+ }), n.fetchAppInfo && await w(), n.restoreSession && c() ? v() : i();
1959
+ }), re(() => {
1962
1960
  p(), m();
1963
- }), (q, $) => (l(), k(D, null, [Z(q.$slots, "default"), n.handleOAuthCallback ? (l(), I(gs, {
1961
+ }), (q, $) => (l(), k(D, null, [Z(q.$slots, "default"), n.handleOAuthCallback ? (l(), I(hs, {
1964
1962
  key: 0,
1965
1963
  "bind-identity-redirect": n.bindIdentityRedirect,
1966
1964
  "close-popup-on-bind-success": n.closePopupOnBindSuccess,
1967
1965
  "restore-redirect-after-sign-in": n.restoreRedirectAfterSignIn
1968
- }, null, 8, ["bind-identity-redirect", "close-popup-on-bind-success", "restore-redirect-after-sign-in"])) : z("", !0), n.showAuthModal && e(s) ? (l(), I(vs, {
1966
+ }, null, 8, ["bind-identity-redirect", "close-popup-on-bind-success", "restore-redirect-after-sign-in"])) : z("", !0), n.showAuthModal && e(s) ? (l(), I(gs, {
1969
1967
  key: 1,
1970
1968
  size: n.authModalSize
1971
1969
  }, null, 8, ["size"])) : z("", !0)], 64));
1972
1970
  }
1973
- }), hs = {
1971
+ }), ys = {
1974
1972
  class: "header"
1975
- }, ys = ["href"], ws = {
1973
+ }, ws = ["href"], bs = {
1976
1974
  class: "container"
1977
- }, bs = /* @__PURE__ */ A({
1975
+ }, _s = /* @__PURE__ */ A({
1978
1976
  __name: "AuthkitAuthContainer",
1979
1977
  props: {
1980
1978
  applicationLogoUrl: {
@@ -2017,38 +2015,38 @@ const wt = {
2017
2015
  }
2018
2016
  },
2019
2017
  setup(b) {
2020
- const r = b, d = R(() => r.backgroundType === "color" ? {
2021
- backgroundColor: r.backgroundColor
2018
+ const u = b, d = R(() => u.backgroundType === "color" ? {
2019
+ backgroundColor: u.backgroundColor
2022
2020
  } : {
2023
- backgroundImage: `url(${r.backgroundImage})`
2021
+ backgroundImage: `url(${u.backgroundImage})`
2024
2022
  });
2025
- return (n, v) => (l(), k("div", {
2023
+ return (n, g) => (l(), k("div", {
2026
2024
  class: "auth",
2027
2025
  style: G(d.value)
2028
- }, [S("div", hs, [r.name ? (l(), k("a", {
2026
+ }, [S("div", ys, [u.name ? (l(), k("a", {
2029
2027
  key: 0,
2030
- href: r.appHomePage,
2028
+ href: u.appHomePage,
2031
2029
  target: "_self",
2032
2030
  class: "link",
2033
2031
  style: G({
2034
- color: r.linkColor
2032
+ color: u.linkColor
2035
2033
  })
2036
- }, " 返回主页 ", 12, ys)) : z("", !0)]), S("div", ws, [Z(n.$slots, "default", {}, void 0, !0)])], 4));
2034
+ }, " 返回主页 ", 12, ws)) : z("", !0)]), S("div", bs, [Z(n.$slots, "default", {}, void 0, !0)])], 4));
2037
2035
  }
2038
- }), ra = /* @__PURE__ */ C(bs, [["__scopeId", "data-v-0e13d3ff"]]), _s = {
2036
+ }), ua = /* @__PURE__ */ C(_s, [["__scopeId", "data-v-0e13d3ff"]]), ks = {
2039
2037
  class: "box"
2040
- }, ks = {
2041
- class: "title"
2042
2038
  }, Ss = {
2043
- class: "content"
2039
+ class: "title"
2044
2040
  }, Is = {
2045
- class: "redirect"
2041
+ class: "content"
2046
2042
  }, zs = {
2043
+ class: "redirect"
2044
+ }, Ps = {
2047
2045
  style: {
2048
2046
  "font-weight": "bold",
2049
2047
  "font-size": "12px"
2050
2048
  }
2051
- }, Ps = /* @__PURE__ */ A({
2049
+ }, Vs = /* @__PURE__ */ A({
2052
2050
  __name: "AuthkitAuthorize",
2053
2051
  props: {
2054
2052
  size: {
@@ -2097,13 +2095,13 @@ const wt = {
2097
2095
  }
2098
2096
  },
2099
2097
  setup(b) {
2100
- const r = P(!1), d = b, n = P({
2098
+ const u = P(!1), d = b, n = P({
2101
2099
  name: "",
2102
2100
  homePageUrl: "",
2103
2101
  createAt: "",
2104
2102
  authorizationCallback: ""
2105
2103
  });
2106
- async function v() {
2104
+ async function g() {
2107
2105
  const {
2108
2106
  data: o,
2109
2107
  error: s
@@ -2115,9 +2113,9 @@ const wt = {
2115
2113
  authorizationCallback: o.authorizationCallback || ""
2116
2114
  });
2117
2115
  }
2118
- v();
2116
+ g();
2119
2117
  async function h() {
2120
- r.value = !0;
2118
+ u.value = !0;
2121
2119
  const {
2122
2120
  data: o,
2123
2121
  error: s
@@ -2128,32 +2126,32 @@ const wt = {
2128
2126
  state: d.state,
2129
2127
  redirect_uri: d.redirectUri
2130
2128
  });
2131
- if (r.value = !1, s || !o)
2129
+ if (u.value = !1, s || !o)
2132
2130
  return;
2133
2131
  const c = o;
2134
2132
  window.location.href = c.authorizeUrl;
2135
2133
  }
2136
- return (o, s) => (l(), k("div", _s, [S("div", ks, L(`授权 ${n.value.name}`), 1), S("div", Ss, [a(e($e), null, {
2137
- default: f(() => [a(e(ie), null, {
2134
+ return (o, s) => (l(), k("div", ks, [S("div", Ss, L(`授权 ${n.value.name}`), 1), S("div", Is, [a(e(Te), null, {
2135
+ default: f(() => [a(e(oe), null, {
2138
2136
  default: f(() => {
2139
2137
  var c;
2140
- return [a(e(ne), {
2138
+ return [a(e(ie), {
2141
2139
  title: n.value.name,
2142
2140
  description: `想要使用您的${(c = d.userInfo) == null ? void 0 : c.nickname}账户`
2143
2141
  }, {
2144
2142
  avatar: f(() => {
2145
- var u;
2143
+ var r;
2146
2144
  return [a(e(te), {
2147
2145
  shape: "square",
2148
- "image-url": (u = d.userInfo) == null ? void 0 : u.avatar
2146
+ "image-url": (r = d.userInfo) == null ? void 0 : r.avatar
2149
2147
  }, null, 8, ["image-url"])];
2150
2148
  }),
2151
2149
  _: 1
2152
2150
  }, 8, ["title", "description"])];
2153
2151
  }),
2154
2152
  _: 1
2155
- }), a(e(ie), null, {
2156
- default: f(() => [a(e(ne), {
2153
+ }), a(e(oe), null, {
2154
+ default: f(() => [a(e(ie), {
2157
2155
  title: "公开信息",
2158
2156
  description: "头像、昵称"
2159
2157
  }, {
@@ -2169,8 +2167,8 @@ const wt = {
2169
2167
  _: 1
2170
2168
  })]),
2171
2169
  _: 1
2172
- }), a(e(ie), null, {
2173
- default: f(() => [a(e(ne), {
2170
+ }), a(e(oe), null, {
2171
+ default: f(() => [a(e(ie), {
2174
2172
  title: "个人用户数据",
2175
2173
  description: "电子邮件地址"
2176
2174
  }, {
@@ -2191,27 +2189,27 @@ const wt = {
2191
2189
  }), a(e(B), {
2192
2190
  type: "primary",
2193
2191
  size: d.size,
2194
- loading: r.value,
2192
+ loading: u.value,
2195
2193
  onClick: h
2196
2194
  }, {
2197
2195
  default: f(() => [...s[2] || (s[2] = [x(" 授权 ", -1)])]),
2198
2196
  _: 1
2199
- }, 8, ["size", "loading"]), S("div", Is, [s[3] || (s[3] = S("div", {
2197
+ }, 8, ["size", "loading"]), S("div", zs, [s[3] || (s[3] = S("div", {
2200
2198
  class: "redirect-hint"
2201
- }, "授权后将跳转至", -1)), S("div", zs, L(n.value.authorizationCallback), 1)])])]));
2199
+ }, "授权后将跳转至", -1)), S("div", Ps, L(n.value.authorizationCallback), 1)])])]));
2202
2200
  }
2203
- }), ua = /* @__PURE__ */ C(Ps, [["__scopeId", "data-v-6c1792d3"]]), Vs = {
2201
+ }), da = /* @__PURE__ */ C(Vs, [["__scopeId", "data-v-6c1792d3"]]), As = {
2204
2202
  class: "oauth-callback"
2205
- }, As = {
2203
+ }, Us = {
2206
2204
  key: 0,
2207
2205
  class: "callback-loading"
2208
- }, Us = {
2206
+ }, Cs = {
2209
2207
  key: 1,
2210
2208
  class: "callback-error"
2211
- }, Cs = {
2209
+ }, $s = {
2212
2210
  key: 2,
2213
2211
  class: "callback-success"
2214
- }, $s = /* @__PURE__ */ A({
2212
+ }, Ts = /* @__PURE__ */ A({
2215
2213
  __name: "AuthkitOauthCallback",
2216
2214
  props: {
2217
2215
  defaultRedirect: {},
@@ -2220,29 +2218,27 @@ const wt = {
2220
2218
  },
2221
2219
  emits: ["success", "error", "needBindIdentity"],
2222
2220
  setup(b, {
2223
- emit: r
2221
+ emit: u
2224
2222
  }) {
2225
- const d = b, n = r, v = P(!0), h = P(""), o = P("登录成功,正在跳转..."), {
2223
+ const d = b, n = u, g = P(!0), h = P(""), o = P("登录成功,正在跳转..."), {
2226
2224
  completeSignIn: s,
2227
2225
  restoreSession: c
2228
- } = N(), {
2229
- fetchUserProfile: u
2230
- } = oe();
2226
+ } = N(), r = ye();
2231
2227
  async function t() {
2232
2228
  const i = new URLSearchParams(window.location.search), w = i.get("error");
2233
2229
  if (w) {
2234
- h.value = w, v.value = !1, n("error", h.value);
2230
+ h.value = w, g.value = !1, n("error", h.value);
2235
2231
  return;
2236
2232
  }
2237
2233
  if (i.get("bindSuccess") === "true") {
2238
- o.value = "绑定成功,可以关闭此页面", window.history.replaceState({}, "", window.location.pathname), v.value = !1, setTimeout(() => {
2234
+ o.value = "绑定成功,可以关闭此页面", window.history.replaceState({}, "", window.location.pathname), g.value = !1, setTimeout(() => {
2239
2235
  window.close();
2240
2236
  }, 800);
2241
2237
  return;
2242
2238
  }
2243
2239
  const p = i.get("token"), m = i.get("userId"), y = i.get("appId"), _ = i.get("needBindIdentity") === "true";
2244
2240
  if (!p) {
2245
- h.value = "登录失败:未收到认证令牌", v.value = !1, n("error", h.value);
2241
+ h.value = "登录失败:未收到认证令牌", g.value = !1, n("error", h.value);
2246
2242
  return;
2247
2243
  }
2248
2244
  try {
@@ -2251,16 +2247,14 @@ const wt = {
2251
2247
  userId: m,
2252
2248
  appId: y,
2253
2249
  needBindIdentity: _
2254
- }), await u();
2250
+ });
2255
2251
  const q = window.location.pathname;
2256
2252
  if (window.history.replaceState({}, "", q), _ && (n("needBindIdentity", {
2257
2253
  token: p,
2258
2254
  userId: m || "",
2259
2255
  appId: y || ""
2260
2256
  }), d.bindIdentityRedirect)) {
2261
- v.value = !1, setTimeout(() => {
2262
- window.location.href = d.bindIdentityRedirect;
2263
- }, 300);
2257
+ await r.replace(d.bindIdentityRedirect);
2264
2258
  return;
2265
2259
  }
2266
2260
  n("success", {
@@ -2272,16 +2266,14 @@ const wt = {
2272
2266
  const $ = sessionStorage.getItem("auth_redirect");
2273
2267
  sessionStorage.removeItem("auth_redirect");
2274
2268
  const T = $ || d.defaultRedirect || "/";
2275
- v.value = !1, setTimeout(() => {
2276
- window.location.href = T;
2277
- }, 500);
2269
+ await r.replace(T);
2278
2270
  } catch (q) {
2279
- console.error("OAuth 回调处理失败:", q), h.value = "登录处理失败,请重试", v.value = !1, n("error", h.value);
2271
+ console.error("OAuth 回调处理失败:", q), h.value = "登录处理失败,请重试", g.value = !1, n("error", h.value);
2280
2272
  }
2281
2273
  }
2282
- function g() {
2274
+ function v() {
2283
2275
  const i = sessionStorage.getItem("auth_redirect");
2284
- sessionStorage.removeItem("auth_redirect"), window.location.href = i || d.defaultRedirect || "/";
2276
+ sessionStorage.removeItem("auth_redirect"), r.replace(i || d.defaultRedirect || "/");
2285
2277
  }
2286
2278
  return E(() => {
2287
2279
  const i = new URLSearchParams(window.location.search);
@@ -2289,30 +2281,30 @@ const wt = {
2289
2281
  t();
2290
2282
  else if (c()) {
2291
2283
  const w = sessionStorage.getItem("auth_redirect");
2292
- sessionStorage.removeItem("auth_redirect"), window.location.href = w || d.defaultRedirect || "/";
2284
+ sessionStorage.removeItem("auth_redirect"), r.replace(w || d.defaultRedirect || "/");
2293
2285
  } else
2294
- h.value = "无效的访问", v.value = !1;
2295
- }), (i, w) => (l(), k("div", Vs, [v.value ? (l(), k("div", As, [w[0] || (w[0] = S("div", {
2286
+ h.value = "无效的访问", g.value = !1;
2287
+ }), (i, w) => (l(), k("div", As, [g.value ? (l(), k("div", Us, [w[0] || (w[0] = S("div", {
2296
2288
  class: "spinner"
2297
- }, null, -1)), S("p", null, L(b.loadingText), 1)])) : h.value ? (l(), k("div", Us, [w[1] || (w[1] = S("div", {
2289
+ }, null, -1)), S("p", null, L(b.loadingText), 1)])) : h.value ? (l(), k("div", Cs, [w[1] || (w[1] = S("div", {
2298
2290
  class: "error-icon"
2299
2291
  }, "✕", -1)), w[2] || (w[2] = S("h2", null, "登录失败", -1)), S("p", null, L(h.value), 1), S("button", {
2300
2292
  class: "retry-btn",
2301
- onClick: g
2302
- }, "返回重试")])) : (l(), k("div", Cs, [w[3] || (w[3] = S("div", {
2293
+ onClick: v
2294
+ }, "返回重试")])) : (l(), k("div", $s, [w[3] || (w[3] = S("div", {
2303
2295
  class: "success-icon"
2304
2296
  }, "✓", -1)), S("p", null, L(o.value), 1)]))]));
2305
2297
  }
2306
- }), da = /* @__PURE__ */ C($s, [["__scopeId", "data-v-4b4b59a1"]]), Ts = {
2298
+ }), ca = /* @__PURE__ */ C(Ts, [["__scopeId", "data-v-aa652ea3"]]), Rs = {
2307
2299
  class: "oauth-binding-account"
2308
- }, Rs = {
2300
+ }, qs = {
2309
2301
  key: 1,
2310
2302
  class: "oauth-binding-account__icon"
2311
- }, qs = {
2312
- class: "oauth-binding-account__info"
2313
2303
  }, xs = {
2304
+ class: "oauth-binding-account__info"
2305
+ }, Ls = {
2314
2306
  class: "oauth-binding-account__name"
2315
- }, Ls = /* @__PURE__ */ A({
2307
+ }, Bs = /* @__PURE__ */ A({
2316
2308
  __name: "AuthkitGithubBinding",
2317
2309
  props: {
2318
2310
  size: {
@@ -2322,23 +2314,23 @@ const wt = {
2322
2314
  },
2323
2315
  setup(b) {
2324
2316
  const {
2325
- config: r
2326
- } = pe(), {
2317
+ config: u
2318
+ } = ce(), {
2327
2319
  userProfile: d,
2328
2320
  fetchUserProfile: n
2329
- } = oe(), v = P("hidden"), h = P(!1);
2321
+ } = Ie(), g = P("hidden"), h = P(!1);
2330
2322
  let o;
2331
2323
  const s = b, c = R(() => {
2332
2324
  var m, y, _;
2333
2325
  return ((y = (m = d.value) == null ? void 0 : m.github) == null ? void 0 : y.avatar_url) || ((_ = d.value) == null ? void 0 : _.avatar) || "";
2334
2326
  }), {
2335
- getOauthCallbackUrl: u
2327
+ getOauthCallbackUrl: r
2336
2328
  } = _e();
2337
2329
  function t(m) {
2338
- v.value = m;
2330
+ g.value = m;
2339
2331
  }
2340
- async function g() {
2341
- const m = r.appId;
2332
+ async function v() {
2333
+ const m = u.appId;
2342
2334
  if (!m) {
2343
2335
  console.error("GitHub OAuth 失败: appId 未配置");
2344
2336
  return;
@@ -2349,7 +2341,7 @@ const wt = {
2349
2341
  } = await O().auth.oauth.github.login.get({
2350
2342
  appId: m,
2351
2343
  mode: "bind",
2352
- redirectUri: u()
2344
+ redirectUri: r()
2353
2345
  });
2354
2346
  _ || !y || (h.value = !0, window.open(y.redirectUri, "_blank"));
2355
2347
  }
@@ -2359,21 +2351,21 @@ const wt = {
2359
2351
  } = await O().auth.users.unbind.oauth.post({
2360
2352
  provider: "github"
2361
2353
  });
2362
- m || (X.success("解绑成功"), v.value = "hidden", n());
2354
+ m || (X.success("解绑成功"), g.value = "hidden", n());
2363
2355
  }
2364
2356
  function w() {
2365
- v.value === "bind" && (v.value = "hidden", g()), v.value === "unbind" && i();
2357
+ g.value === "bind" && (g.value = "hidden", v()), g.value === "unbind" && i();
2366
2358
  }
2367
2359
  function p() {
2368
2360
  h.value && n();
2369
2361
  }
2370
2362
  return E(() => {
2371
2363
  d.value || n(), o = setInterval(p, 1e3);
2372
- }), ue(() => {
2364
+ }), re(() => {
2373
2365
  o && clearInterval(o);
2374
2366
  }), (m, y) => {
2375
2367
  var _, q, $;
2376
- return l(), k(D, null, [!((_ = e(d)) != null && _.github) && v.value === "hidden" ? (l(), I(e(fe), {
2368
+ return l(), k(D, null, [!((_ = e(d)) != null && _.github) && g.value === "hidden" ? (l(), I(e(me), {
2377
2369
  key: 0,
2378
2370
  title: "绑定GitHub"
2379
2371
  }, {
@@ -2387,7 +2379,7 @@ const wt = {
2387
2379
  }, 8, ["size"])]),
2388
2380
  default: f(() => [y[3] || (y[3] = x(" 您还未绑定GitHub账号,请点击绑定。 ", -1))]),
2389
2381
  _: 1
2390
- })) : z("", !0), (q = e(d)) != null && q.github && v.value === "hidden" ? (l(), I(e(fe), {
2382
+ })) : z("", !0), (q = e(d)) != null && q.github && g.value === "hidden" ? (l(), I(e(me), {
2391
2383
  key: 1,
2392
2384
  title: "解绑GitHub"
2393
2385
  }, {
@@ -2401,21 +2393,21 @@ const wt = {
2401
2393
  }, 8, ["size"])]),
2402
2394
  default: f(() => {
2403
2395
  var T, F;
2404
- return [S("div", Ts, [c.value ? (l(), I(e(te), {
2396
+ return [S("div", Rs, [c.value ? (l(), I(e(te), {
2405
2397
  key: 0,
2406
2398
  class: "oauth-binding-account__avatar",
2407
2399
  "image-url": c.value,
2408
2400
  size: 42
2409
- }, null, 8, ["image-url"])) : (l(), k("div", Rs, [a(be, {
2401
+ }, null, 8, ["image-url"])) : (l(), k("div", qs, [a(be, {
2410
2402
  icon: e(J).github,
2411
- size: e(Me),
2403
+ size: e(Fe),
2412
2404
  alt: "GitHub"
2413
- }, null, 8, ["icon", "size"])])), S("div", qs, [y[4] || (y[4] = S("div", {
2405
+ }, null, 8, ["icon", "size"])])), S("div", xs, [y[4] || (y[4] = S("div", {
2414
2406
  class: "oauth-binding-account__provider"
2415
- }, "GitHub", -1)), S("div", xs, L(((F = (T = e(d)) == null ? void 0 : T.github) == null ? void 0 : F.login) || "GitHub"), 1)])])];
2407
+ }, "GitHub", -1)), S("div", Ls, L(((F = (T = e(d)) == null ? void 0 : T.github) == null ? void 0 : F.login) || "GitHub"), 1)])])];
2416
2408
  }),
2417
2409
  _: 1
2418
- })) : z("", !0), v.value === "bind" || v.value === "unbind" ? (l(), I(Fe, {
2410
+ })) : z("", !0), g.value === "bind" || g.value === "unbind" ? (l(), I(De, {
2419
2411
  key: 2,
2420
2412
  size: s.size,
2421
2413
  email: ($ = e(d)) == null ? void 0 : $.email,
@@ -2423,78 +2415,78 @@ const wt = {
2423
2415
  }, null, 8, ["size", "email"])) : z("", !0)], 64);
2424
2416
  };
2425
2417
  }
2426
- }), ca = /* @__PURE__ */ C(Ls, [["__scopeId", "data-v-4f673706"]]), Bs = /* @__PURE__ */ A({
2418
+ }), pa = /* @__PURE__ */ C(Bs, [["__scopeId", "data-v-4f673706"]]), Os = /* @__PURE__ */ A({
2427
2419
  __name: "LegalDocViewer",
2428
2420
  props: {
2429
2421
  type: {},
2430
2422
  appId: {}
2431
2423
  },
2432
2424
  setup(b) {
2433
- const r = b, d = R(() => De[r.type] ?? ""), n = P(!1), v = P(null);
2425
+ const u = b, d = R(() => Ee[u.type] ?? ""), n = P(!1), g = P(null);
2434
2426
  async function h() {
2435
- if (!r.type || !r.appId) {
2436
- v.value = null;
2427
+ if (!u.type || !u.appId) {
2428
+ g.value = null;
2437
2429
  return;
2438
2430
  }
2439
2431
  n.value = !0;
2440
- const o = await Ne(r.appId);
2432
+ const o = await je(u.appId);
2441
2433
  if (n.value = !1, !o) {
2442
- v.value = null;
2434
+ g.value = null;
2443
2435
  return;
2444
2436
  }
2445
- const s = o[r.type];
2446
- v.value = Ee(s) ? s : null;
2437
+ const s = o[u.type];
2438
+ g.value = He(s) ? s : null;
2447
2439
  }
2448
- return ye(() => [r.type, r.appId], () => {
2440
+ return he(() => [u.type, u.appId], () => {
2449
2441
  h();
2450
2442
  }, {
2451
2443
  immediate: !0
2452
- }), (o, s) => n.value ? (l(), I(e(Te), {
2444
+ }), (o, s) => n.value ? (l(), I(e(Re), {
2453
2445
  key: 0,
2454
2446
  loading: n.value,
2455
2447
  class: "legal-doc-viewer-loading"
2456
- }, null, 8, ["loading"])) : v.value ? (l(), I(e(He), {
2448
+ }, null, 8, ["loading"])) : g.value ? (l(), I(e(Ge), {
2457
2449
  key: 2,
2458
- modelValue: v.value,
2459
- "onUpdate:modelValue": s[1] || (s[1] = (c) => v.value = c),
2450
+ modelValue: g.value,
2451
+ "onUpdate:modelValue": s[1] || (s[1] = (c) => g.value = c),
2460
2452
  editable: !1
2461
2453
  }, {
2462
- title: f(() => [a(e(Ge), {
2454
+ title: f(() => [a(e(Ne), {
2463
2455
  modelValue: d.value,
2464
2456
  "onUpdate:modelValue": s[0] || (s[0] = (c) => d.value = c),
2465
2457
  editable: !1,
2466
2458
  class: "legal-doc-viewer-title"
2467
2459
  }, null, 8, ["modelValue"])]),
2468
2460
  _: 1
2469
- }, 8, ["modelValue"])) : (l(), I(e(Re), {
2461
+ }, 8, ["modelValue"])) : (l(), I(e(qe), {
2470
2462
  key: 1,
2471
2463
  description: "暂无内容"
2472
2464
  }));
2473
2465
  }
2474
- }), pa = /* @__PURE__ */ C(Bs, [["__scopeId", "data-v-fe9a3621"]]);
2466
+ }), ma = /* @__PURE__ */ C(Os, [["__scopeId", "data-v-fe9a3621"]]);
2475
2467
  export {
2476
- ms as A,
2477
- Wt as E,
2478
- pa as L,
2468
+ fs as A,
2469
+ Qt as E,
2470
+ ma as L,
2479
2471
  Q as O,
2480
- It as P,
2481
- vt as R,
2472
+ zt as P,
2473
+ gt as R,
2482
2474
  ee as S,
2483
- gs as _,
2484
- ra as a,
2485
- vs as b,
2486
- Ie as c,
2487
- ua as d,
2488
- ca as e,
2489
- da as f,
2490
- Ze as g,
2491
- ot as h,
2492
- rt as i,
2493
- la as j,
2494
- Ht as k,
2495
- Ct as l,
2496
- ls as m,
2497
- es as n,
2498
- me as o,
2499
- Mt as p
2475
+ hs as _,
2476
+ ua as a,
2477
+ gs as b,
2478
+ ze as c,
2479
+ da as d,
2480
+ pa as e,
2481
+ ca as f,
2482
+ et as g,
2483
+ it as h,
2484
+ ut as i,
2485
+ ra as j,
2486
+ Gt as k,
2487
+ $t as l,
2488
+ rs as m,
2489
+ ts as n,
2490
+ pe as o,
2491
+ Ft as p
2500
2492
  };