@huyooo/ui 1.0.7 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/dist/AuthkitAppSetting-rtYZcSAR.js +2677 -0
  2. package/dist/{Contact-BWuVR9ho.js → Contact-CcWf3UEZ.js} +9 -9
  3. package/dist/{CustomTable-BzGfaAVH.js → CustomTable-HDwqEcmB.js} +1 -1
  4. package/dist/FeedbackModal.vue_vue_type_script_setup_true_lang-DpOmbAg-.js +1491 -0
  5. package/dist/{LegalDocViewer-DM8FYBpf.js → LegalDocViewer-C0tsIbz9.js} +747 -748
  6. package/dist/MessageHandle-BUufez4S.js +1233 -0
  7. package/dist/{MessageList-Ce-_LNTk.js → MessageList-rttvPmxV.js} +4 -4
  8. package/dist/PaySubscriptions-p75aBnHm.js +1331 -0
  9. package/dist/{PricingPlans-CV97ck9p.js → PricingPlans-CQ0qk9Hb.js} +99 -105
  10. package/dist/{ReferrerReferees-DgygiIiE.js → ReferrerReferees-BU9IEQgz.js} +47 -46
  11. package/dist/Upload.vue_vue_type_script_setup_true_lang-bh0NFq9E.js +78 -0
  12. package/dist/{UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-0Td42Nb3.js → UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-DG4AuHiO.js} +64 -65
  13. package/dist/WidthContainer-DSE4QbW0.js +717 -0
  14. package/dist/api/billingSubscriptionApi.d.ts +4 -1
  15. package/dist/apiClients-Ctcq8NZs.js +245 -0
  16. package/dist/authkit.js +10 -10
  17. package/dist/common/globalConfig.d.ts +36 -18
  18. package/dist/common.js +2 -2
  19. package/dist/components/Authkit/Auth/AuthkitOauthCallback.vue.d.ts +2 -2
  20. package/dist/components/Authkit/AuthkitProvider.vue.d.ts +0 -5
  21. package/dist/components/Upload/Upload.vue.d.ts +6 -6
  22. package/dist/composables/Authkit/useAuthkitAuth.d.ts +3 -0
  23. package/dist/composables/Billing/usePaymentReturn.d.ts +1 -0
  24. package/dist/composables/uploadFeedbackAttachment.d.ts +2 -1
  25. package/dist/composables/useMessageList.d.ts +2 -1
  26. package/dist/composables.d.ts +2 -2
  27. package/dist/composables.js +46 -46
  28. package/dist/feedback.js +2 -2
  29. package/dist/{fetchAuthPageAboutUs-dzTSwRsB.js → fetchAuthPageAboutUs-DiCqMUX3.js} +4 -4
  30. package/dist/{index-BkLvw1PU.js → index-Cn6LcfZO.js} +1 -1
  31. package/dist/legalDocs/resolveAppId.d.ts +1 -1
  32. package/dist/main.d.ts +4 -3
  33. package/dist/main.js +464 -469
  34. package/dist/message.js +53 -52
  35. package/dist/pay.js +4 -4
  36. package/dist/privateCom.js +1 -1
  37. package/dist/referrer.js +1 -1
  38. package/dist/{useUploadCos-C8BqFPkx.js → runtime-BzCSCUNv.js} +2712 -2609
  39. package/dist/runtime.d.ts +18 -0
  40. package/dist/style.css +1 -1
  41. package/dist/types/api/auth.generated.d.ts +0 -10
  42. package/dist/upload/browserCosTransport.d.ts +25 -0
  43. package/dist/upload/browserUploadService.d.ts +20 -0
  44. package/dist/upload.d.ts +2 -1
  45. package/dist/upload.js +5 -4
  46. package/dist/{useAuthkitAppsAuthPageInfo-CNudJd04.js → useAuthkitAppsAuthPageInfo-DZ1p-P3Q.js} +18 -21
  47. package/dist/useAuthkitAuth-BPTZUSkM.js +272 -0
  48. package/dist/{useAuthkitCreateAndUpdate-BsINsI-E.js → useAuthkitCreateAndUpdate-Bbv7vZZn.js} +1 -1
  49. package/dist/useAuthkitUsersProfile-CW_exa7E.js +39 -0
  50. package/dist/useBillingStatusOptions-Br-iL77Z.js +61 -0
  51. package/dist/{useEnsureAuthenticated-DNkCCy_Y.js → useEnsureAuthenticated-CncOvj2H.js} +2 -2
  52. package/dist/{useLegalDocs-DQP_Yq6B.js → useLegalDocs-D44qU_q0.js} +25 -25
  53. package/dist/useMessageNotifications-D9uikt21.js +80 -0
  54. package/dist/{useRoutePermission-CEiya9AM.js → useRoutePermission-BrQX7NTq.js} +2 -2
  55. package/dist/{useSEO-CDWxbk8B.js → useSEO-_TNouXE_.js} +89 -86
  56. package/dist/useSubscriptionCheckout-BDDCRxSs.js +353 -0
  57. package/dist/user.js +1 -1
  58. package/dist/utils/apiClients.d.ts +20 -12
  59. package/dist/utils/apiMiddlewares.d.ts +9 -23
  60. package/package.json +1 -1
  61. package/dist/AuthkitAppSetting-BN8-xgNq.js +0 -2674
  62. package/dist/FeedbackModal.vue_vue_type_script_setup_true_lang-DrL_XBqf.js +0 -1481
  63. package/dist/MessageHandle-mEkCsv9e.js +0 -1173
  64. package/dist/PaySubscriptions-CXkEjqr2.js +0 -1326
  65. package/dist/Upload.vue_vue_type_script_setup_true_lang-VGh2V4o0.js +0 -76
  66. package/dist/WidthContainer-CFMQRsCy.js +0 -721
  67. package/dist/apiClients-BcXOLuYu.js +0 -272
  68. package/dist/composables/Upload/useUploadCos.d.ts +0 -12
  69. package/dist/useAuthkitAuth-3m0yW6uP.js +0 -267
  70. package/dist/useAuthkitUsersProfile-DJlMsftY.js +0 -40
  71. package/dist/useBillingStatusOptions-CfHQOFNw.js +0 -71
  72. package/dist/useMessageNotifications-CAphguOm.js +0 -75
  73. package/dist/useSubscriptionCheckout-d_M_rKRa.js +0 -368
  74. package/dist/utils/billingFetch.d.ts +0 -1
@@ -1,29 +1,30 @@
1
- import { defineComponent as A, computed as T, openBlock as l, createElementBlock as _, normalizeStyle as H, normalizeClass as he, renderSlot as Z, createBlock as S, unref as e, createCommentVNode as I, createElementVNode as k, toDisplayString as L, ref as z, createVNode as a, withCtx as f, createTextVNode as x, watchEffect as re, Fragment as F, renderList as ue, useModel as ze, watch as ye, mergeModels as Pe, useSlots as Ve, onMounted as D, onUnmounted as de } from "vue";
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
2
  import { useRoute as Ae } 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 E, FormItem as V, Input as U, Button as B, Link as Y, Tabs as ce, TabPane as pe, Checkbox as Ue, Modal as Ce, List as $e, ListItem as ne, ListItemMeta as le, Avatar as te, Alert as fe, Spin as Te, Empty as Re } from "@arco-design/web-vue";
7
- import { a as M, u as G } from "./useAuthkitAuth-3m0yW6uP.js";
8
- import { e as O, g as oe, u as we, s as qe } from "./apiClients-BcXOLuYu.js";
9
- import { u as N } from "./useAuthkitAppsAuthPageInfo-CNudJd04.js";
10
- import { o as ve, i as xe, j as ge, k as be, u as Le, l as Be, m as Oe, n as J, p as Me, h as _e, S as j, q as K, r as ke, s as Fe, b as De } from "./AuthkitAppSetting-BN8-xgNq.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";
7
+ import { a as M, u as N } from "./useAuthkitAuth-BPTZUSkM.js";
8
+ import { g as O, u as we } from "./apiClients-Ctcq8NZs.js";
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-rtYZcSAR.js";
11
11
  import { _ as C } from "./_plugin-vue_export-helper-CHgC5LLL.js";
12
12
  /* empty css */
13
- import "./index-BkLvw1PU.js";
13
+ import "./index-Cn6LcfZO.js";
14
14
  /* empty css */
15
- import { u as Se, L as Ee, i as He } from "./useLegalDocs-DQP_Yq6B.js";
16
- import { u as ie } from "./useAuthkitUsersProfile-DJlMsftY.js";
15
+ import { u as Se, L as De, i as Ee } from "./useLegalDocs-D44qU_q0.js";
16
+ import { u as pe } from "./runtime-BzCSCUNv.js";
17
+ import { u as oe } from "./useAuthkitUsersProfile-CW_exa7E.js";
17
18
  /* empty css */
18
19
  /* empty css */
19
- import "./CustomTable-BzGfaAVH.js";
20
+ import "./CustomTable-HDwqEcmB.js";
20
21
  /* empty css */
21
- import { TiptapEditor as Ge, TiptapTitle as Ne } from "@huyooo/vue-tiptap";
22
- import { f as je } from "./fetchAuthPageAboutUs-dzTSwRsB.js";
23
- const Ke = ["title", "aria-label", "disabled"], We = {
22
+ import { TiptapEditor as He, TiptapTitle as Ge } from "@huyooo/vue-tiptap";
23
+ import { f as Ne } from "./fetchAuthPageAboutUs-DiCqMUX3.js";
24
+ const je = ["title", "aria-label", "disabled"], Ke = {
24
25
  key: 0,
25
26
  class: "OAuthItem__spinner"
26
- }, Qe = /* @__PURE__ */ A({
27
+ }, We = /* @__PURE__ */ A({
27
28
  __name: "AuthkitOauthItem",
28
29
  props: {
29
30
  size: {
@@ -48,38 +49,38 @@ const Ke = ["title", "aria-label", "disabled"], We = {
48
49
  }
49
50
  },
50
51
  setup(b) {
51
- const d = b, r = T(() => ({
52
+ const r = b, c = R(() => ({
52
53
  width: `${ge}px`,
53
54
  height: `${ge}px`,
54
- padding: `${xe}px`,
55
+ padding: `${qe}px`,
55
56
  "--oauth-icon-size": `${ve}px`
56
57
  }));
57
- return (n, y) => (l(), _("button", {
58
+ return (n, v) => (l(), k("button", {
58
59
  class: he(["OAuthItem", {
59
- "OAuthItem--loading": d.loading
60
+ "OAuthItem--loading": r.loading
60
61
  }]),
61
62
  type: "button",
62
- title: d.label,
63
- "aria-label": d.label,
64
- disabled: d.disabled || d.loading,
65
- style: H(r.value)
66
- }, [d.loading ? (l(), _("span", We)) : Z(n.$slots, "icon", {
63
+ title: r.label,
64
+ "aria-label": r.label,
65
+ disabled: r.disabled || r.loading,
66
+ style: G(c.value)
67
+ }, [r.loading ? (l(), k("span", Ke)) : Z(n.$slots, "icon", {
67
68
  key: 1
68
- }, () => [d.icon ? (l(), S(be, {
69
+ }, () => [r.icon ? (l(), I(be, {
69
70
  key: 0,
70
- icon: d.icon,
71
+ icon: r.icon,
71
72
  size: e(ve)
72
- }, null, 8, ["icon", "size"])) : I("", !0)], !0)], 14, Ke));
73
+ }, null, 8, ["icon", "size"])) : z("", !0)], !0)], 14, je));
73
74
  }
74
- }), Q = /* @__PURE__ */ C(Qe, [["__scopeId", "data-v-e00c1d80"]]), Je = {
75
+ }), Q = /* @__PURE__ */ C(We, [["__scopeId", "data-v-e00c1d80"]]), Qe = {
75
76
  class: "OAuthList"
76
- }, Xe = {
77
+ }, Je = {
77
78
  key: 0,
78
79
  class: "OAuthDivider"
79
- }, Ye = {
80
+ }, Xe = {
80
81
  key: 1,
81
82
  class: "OAuthHint"
82
- }, Ze = /* @__PURE__ */ A({
83
+ }, Ye = /* @__PURE__ */ A({
83
84
  __name: "AuthkitOauthList",
84
85
  props: {
85
86
  size: {
@@ -89,32 +90,32 @@ const Ke = ["title", "aria-label", "disabled"], We = {
89
90
  },
90
91
  emits: ["passkeySubmit"],
91
92
  setup(b, {
92
- emit: d
93
+ emit: r
93
94
  }) {
94
- const r = d, {
95
+ const c = r, {
95
96
  appsData: n
96
- } = N(), {
97
- loading: y,
98
- supported: v,
97
+ } = j(), {
98
+ loading: v,
99
+ supported: h,
99
100
  loginWithPasskey: o,
100
101
  formatError: s
101
- } = Le(), {
102
- githubAuth: m,
103
- googleAuth: p,
102
+ } = xe(), {
103
+ githubAuth: d,
104
+ googleAuth: u,
104
105
  microsoftAuth: t,
105
106
  wechatAuth: g
106
107
  } = _e(), {
107
108
  acceptedTerms: i,
108
109
  ensureTermsAcceptedForSignIn: w
109
110
  } = M();
110
- function u($) {
111
+ function p($) {
111
112
  w() && $({
112
113
  acceptedTerms: i.value ? !0 : void 0
113
114
  });
114
115
  }
115
- const c = b, h = T(() => n.value.authMethods.login.passkey && Be() || ""), P = T(() => {
116
- const $ = n.value.oauth, R = $.google.enabled || $.microsoft.enabled || $.github.enabled || $.wechat.enabled, W = n.value.authMethods.login.passkey;
117
- return R || W;
116
+ const m = b, y = R(() => n.value.authMethods.login.passkey && Le() || ""), _ = R(() => {
117
+ const $ = n.value.oauth, T = $.google.enabled || $.microsoft.enabled || $.github.enabled || $.wechat.enabled, F = n.value.authMethods.login.passkey;
118
+ return T || F;
118
119
  });
119
120
  async function q() {
120
121
  if (w())
@@ -122,62 +123,62 @@ const Ke = ["title", "aria-label", "disabled"], We = {
122
123
  const $ = await o();
123
124
  if (!$)
124
125
  return;
125
- r("passkeySubmit", $);
126
+ c("passkeySubmit", $);
126
127
  } catch ($) {
127
- const R = s($);
128
+ const T = s($);
128
129
  if ($ instanceof Error && $.name === "NotAllowedError") {
129
- X.warning(R);
130
+ X.warning(T);
130
131
  return;
131
132
  }
132
- X.error(R);
133
+ X.error(T);
133
134
  }
134
135
  }
135
- return ($, R) => (l(), _("div", Je, [P.value ? (l(), _("div", Xe, [...R[4] || (R[4] = [k("span", null, "其他登录方式", -1)])])) : I("", !0), k("div", {
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
137
  class: "OAuthIcons",
137
- style: H({
138
- gap: `${e(Oe)}px`
138
+ style: G({
139
+ gap: `${e(Be)}px`
139
140
  })
140
- }, [e(n).oauth.google.enabled ? (l(), S(Q, {
141
+ }, [e(n).oauth.google.enabled ? (l(), I(Q, {
141
142
  key: 0,
142
143
  icon: e(J).google,
143
144
  label: "Google",
144
- size: c.size,
145
- onClick: R[0] || (R[0] = (W) => u(e(p)))
146
- }, null, 8, ["icon", "size"])) : I("", !0), e(n).oauth.github.enabled ? (l(), S(Q, {
145
+ size: m.size,
146
+ onClick: T[0] || (T[0] = (F) => p(e(u)))
147
+ }, null, 8, ["icon", "size"])) : z("", !0), e(n).oauth.github.enabled ? (l(), I(Q, {
147
148
  key: 1,
148
149
  icon: e(J).github,
149
150
  label: "Github",
150
- size: c.size,
151
- onClick: R[1] || (R[1] = (W) => u(e(m)))
152
- }, null, 8, ["icon", "size"])) : I("", !0), e(n).oauth.microsoft.enabled ? (l(), S(Q, {
151
+ size: m.size,
152
+ onClick: T[1] || (T[1] = (F) => p(e(d)))
153
+ }, null, 8, ["icon", "size"])) : z("", !0), e(n).oauth.microsoft.enabled ? (l(), I(Q, {
153
154
  key: 2,
154
155
  icon: e(J).microsoft,
155
156
  label: "Microsoft",
156
- size: c.size,
157
- onClick: R[2] || (R[2] = (W) => u(e(t)))
158
- }, null, 8, ["icon", "size"])) : I("", !0), e(n).oauth.wechat.enabled ? (l(), S(Q, {
157
+ size: m.size,
158
+ onClick: T[2] || (T[2] = (F) => p(e(t)))
159
+ }, null, 8, ["icon", "size"])) : z("", !0), e(n).oauth.wechat.enabled ? (l(), I(Q, {
159
160
  key: 3,
160
161
  icon: e(J).wechat,
161
162
  label: "微信",
162
- size: c.size,
163
- onClick: R[3] || (R[3] = (W) => u(e(g)))
164
- }, null, 8, ["icon", "size"])) : I("", !0), e(n).authMethods.login.passkey ? (l(), S(Q, {
163
+ size: m.size,
164
+ onClick: T[3] || (T[3] = (F) => p(e(g)))
165
+ }, null, 8, ["icon", "size"])) : z("", !0), e(n).authMethods.login.passkey ? (l(), I(Q, {
165
166
  key: 4,
166
- icon: e(Me),
167
+ icon: e(Oe),
167
168
  label: "Passkey",
168
- size: c.size,
169
- loading: e(y),
170
- disabled: !e(v),
169
+ size: m.size,
170
+ loading: e(v),
171
+ disabled: !e(h),
171
172
  onClick: q
172
- }, null, 8, ["icon", "size", "loading", "disabled"])) : I("", !0)], 4), h.value ? (l(), _("p", Ye, L(h.value), 1)) : I("", !0)]));
173
+ }, null, 8, ["icon", "size", "loading", "disabled"])) : z("", !0)], 4), y.value ? (l(), k("p", Xe, L(y.value), 1)) : z("", !0)]));
173
174
  }
174
- }), et = /* @__PURE__ */ C(Ze, [["__scopeId", "data-v-aa6a61de"]]), tt = {
175
+ }), Ze = /* @__PURE__ */ C(Ye, [["__scopeId", "data-v-aa6a61de"]]), et = {
175
176
  class: "content"
176
- }, st = {
177
+ }, tt = {
177
178
  class: "sendVerifyCodeItem"
178
- }, at = {
179
+ }, st = {
179
180
  class: "handle"
180
- }, ot = /* @__PURE__ */ A({
181
+ }, at = /* @__PURE__ */ A({
181
182
  __name: "AuthkitPasswordUpdateAndVerify",
182
183
  props: {
183
184
  size: {
@@ -192,31 +193,31 @@ const Ke = ["title", "aria-label", "disabled"], We = {
192
193
  },
193
194
  emits: ["signIn", "submit"],
194
195
  setup(b, {
195
- emit: d
196
+ emit: r
196
197
  }) {
197
- const r = d, n = b, y = z(), v = z(!1), o = z(), s = z({
198
+ const c = r, n = b, v = P(), h = P(!1), o = P(), s = P({
198
199
  email: void 0,
199
200
  userToken: void 0,
200
201
  emailVerifyId: void 0,
201
202
  password: void 0,
202
203
  confirmPassword: void 0
203
204
  });
204
- async function m() {
205
+ async function d() {
205
206
  if (!await o.value.validateField(["email"])) {
206
- v.value = !0;
207
- const g = await O.verify.email.retry.post({
207
+ h.value = !0;
208
+ const g = await O().auth.verify.email.retry.post({
208
209
  email: s.value.email,
209
210
  purpose: "resetPassword"
210
211
  });
211
- v.value = !1, g.data && (s.value.emailVerifyId = g.data.emailVerifyId), K(y.value, g);
212
+ h.value = !1, g.data && (s.value.emailVerifyId = g.data.emailVerifyId), W(v.value, g);
212
213
  }
213
214
  }
214
- async function p() {
215
+ async function u() {
215
216
  o.value.validate().then((t) => {
216
- t || r("submit", s.value);
217
+ t || c("submit", s.value);
217
218
  });
218
219
  }
219
- return (t, g) => (l(), _("div", tt, [a(e(E), {
220
+ return (t, g) => (l(), k("div", et, [a(e(H), {
220
221
  ref_key: "formRef",
221
222
  ref: o,
222
223
  model: s.value,
@@ -250,19 +251,19 @@ const Ke = ["title", "aria-label", "disabled"], We = {
250
251
  message: "请输入验证码"
251
252
  }]
252
253
  }, {
253
- default: f(() => [k("div", st, [a(e(U), {
254
+ default: f(() => [S("div", tt, [a(e(U), {
254
255
  modelValue: s.value.userToken,
255
256
  "onUpdate:modelValue": g[1] || (g[1] = (i) => s.value.userToken = i),
256
257
  placeholder: "请输入验证码"
257
- }, null, 8, ["modelValue"]), a(j, {
258
+ }, null, 8, ["modelValue"]), a(K, {
258
259
  ref_key: "SendVerifyCodeRef",
259
- ref: y,
260
+ ref: v,
260
261
  size: n.size,
261
- loading: v.value,
262
+ loading: h.value,
262
263
  style: {
263
264
  "margin-left": "10px"
264
265
  },
265
- onSend: m
266
+ onSend: d
266
267
  }, null, 8, ["size", "loading"])])]),
267
268
  _: 1
268
269
  }), a(e(V), {
@@ -309,12 +310,12 @@ const Ke = ["title", "aria-label", "disabled"], We = {
309
310
  autocomplete: ""
310
311
  }, null, 8, ["modelValue"])]),
311
312
  _: 1
312
- }, 8, ["rules"]), k("div", at, [a(e(B), {
313
+ }, 8, ["rules"]), S("div", st, [a(e(B), {
313
314
  type: "primary",
314
315
  loading: n.loading,
315
316
  long: "",
316
317
  size: n.size,
317
- onClick: p
318
+ onClick: u
318
319
  }, {
319
320
  default: f(() => [...g[4] || (g[4] = [x(" 提交 ", -1)])]),
320
321
  _: 1
@@ -322,11 +323,11 @@ const Ke = ["title", "aria-label", "disabled"], We = {
322
323
  _: 1
323
324
  }, 8, ["model", "size"])]));
324
325
  }
325
- }), it = /* @__PURE__ */ C(ot, [["__scopeId", "data-v-de0d4b53"]]), nt = {
326
+ }), ot = /* @__PURE__ */ C(at, [["__scopeId", "data-v-4091e418"]]), it = {
326
327
  class: "content"
327
- }, lt = {
328
+ }, nt = {
328
329
  class: "sendVerifyCodeItem"
329
- }, rt = /* @__PURE__ */ A({
330
+ }, lt = /* @__PURE__ */ A({
330
331
  __name: "AuthkitPhonePasswordUpdateAndVerify",
331
332
  props: {
332
333
  size: {
@@ -341,14 +342,14 @@ const Ke = ["title", "aria-label", "disabled"], We = {
341
342
  },
342
343
  emits: ["submit"],
343
344
  setup(b, {
344
- emit: d
345
+ emit: r
345
346
  }) {
346
- const r = d, n = b, y = z(), v = z(!1), o = z(), s = z({
347
+ const c = r, n = b, v = P(), h = P(!1), o = P(), s = P({
347
348
  phone: void 0,
348
349
  code: void 0,
349
350
  password: void 0,
350
351
  confirmPassword: void 0
351
- }), m = [{
352
+ }), d = [{
352
353
  required: !0,
353
354
  message: "请输入确认密码"
354
355
  }, {
@@ -363,19 +364,19 @@ const Ke = ["title", "aria-label", "disabled"], We = {
363
364
  i();
364
365
  }
365
366
  }];
366
- async function p() {
367
+ async function u() {
367
368
  if (!await o.value.validateField(["phone"])) {
368
- v.value = !0;
369
- const i = await O.verify.sms.send.post({
369
+ h.value = !0;
370
+ const i = await O().auth.verify.sms.send.post({
370
371
  phone: s.value.phone,
371
372
  purpose: "resetPassword"
372
373
  });
373
- v.value = !1, K(y.value, i);
374
+ h.value = !1, W(v.value, i);
374
375
  }
375
376
  }
376
377
  async function t() {
377
378
  o.value.validate().then((g) => {
378
- g || r("submit", {
379
+ g || c("submit", {
379
380
  method: "phone",
380
381
  phone: s.value.phone,
381
382
  code: s.value.code,
@@ -383,7 +384,7 @@ const Ke = ["title", "aria-label", "disabled"], We = {
383
384
  });
384
385
  });
385
386
  }
386
- return (g, i) => (l(), _("div", nt, [a(e(E), {
387
+ return (g, i) => (l(), k("div", it, [a(e(H), {
387
388
  ref_key: "formRef",
388
389
  ref: o,
389
390
  model: s.value,
@@ -419,20 +420,20 @@ const Ke = ["title", "aria-label", "disabled"], We = {
419
420
  message: "请输入验证码"
420
421
  }]
421
422
  }, {
422
- default: f(() => [k("div", lt, [a(e(U), {
423
+ default: f(() => [S("div", nt, [a(e(U), {
423
424
  modelValue: s.value.code,
424
425
  "onUpdate:modelValue": i[1] || (i[1] = (w) => s.value.code = w),
425
426
  placeholder: "请输入验证码",
426
427
  autocomplete: "one-time-code"
427
- }, null, 8, ["modelValue"]), a(j, {
428
+ }, null, 8, ["modelValue"]), a(K, {
428
429
  ref_key: "SendVerifyCodeRef",
429
- ref: y,
430
+ ref: v,
430
431
  size: n.size,
431
- loading: v.value,
432
+ loading: h.value,
432
433
  style: {
433
434
  "margin-left": "10px"
434
435
  },
435
- onSend: p
436
+ onSend: u
436
437
  }, null, 8, ["size", "loading"])])]),
437
438
  _: 1
438
439
  }), a(e(V), {
@@ -459,7 +460,7 @@ const Ke = ["title", "aria-label", "disabled"], We = {
459
460
  field: "confirmPassword",
460
461
  label: "确认密码",
461
462
  "hide-label": "",
462
- rules: m
463
+ rules: d
463
464
  }, {
464
465
  default: f(() => [a(e(U), {
465
466
  modelValue: s.value.confirmPassword,
@@ -482,37 +483,37 @@ const Ke = ["title", "aria-label", "disabled"], We = {
482
483
  _: 1
483
484
  }, 8, ["model", "size"])]));
484
485
  }
485
- }), ut = /* @__PURE__ */ C(rt, [["__scopeId", "data-v-1a06d499"]]), dt = {
486
+ }), rt = /* @__PURE__ */ C(lt, [["__scopeId", "data-v-a01a994e"]]), ut = {
486
487
  class: "SwitchSignIn"
487
- }, ct = /* @__PURE__ */ A({
488
+ }, dt = /* @__PURE__ */ A({
488
489
  __name: "AuthkitSwitchSignIn",
489
490
  emits: ["switchSignIn"],
490
491
  setup(b, {
491
- emit: d
492
+ emit: r
492
493
  }) {
493
- const r = d;
494
+ const c = r;
494
495
  function n() {
495
- r("switchSignIn");
496
+ c("switchSignIn");
496
497
  }
497
- return (y, v) => (l(), _("div", dt, [k("span", null, [v[1] || (v[1] = k("span", null, "已经有账号?", -1)), a(e(Y), {
498
+ return (v, h) => (l(), k("div", ut, [S("span", null, [h[1] || (h[1] = S("span", null, "已经有账号?", -1)), a(e(Y), {
498
499
  style: {
499
500
  padding: "0px"
500
501
  },
501
502
  onClick: n
502
503
  }, {
503
- default: f(() => [...v[0] || (v[0] = [x("去登陆", -1)])]),
504
+ default: f(() => [...h[0] || (h[0] = [x("去登陆", -1)])]),
504
505
  _: 1
505
506
  })])]));
506
507
  }
507
- }), me = /* @__PURE__ */ C(ct, [["__scopeId", "data-v-fc1d3903"]]), pt = {
508
+ }), me = /* @__PURE__ */ C(dt, [["__scopeId", "data-v-fc1d3903"]]), ct = {
508
509
  class: "ResetPassword"
509
- }, mt = {
510
+ }, pt = {
510
511
  key: 0,
511
512
  class: "tabsContainer"
512
- }, ft = {
513
+ }, mt = {
513
514
  key: 3,
514
515
  class: "empty"
515
- }, vt = /* @__PURE__ */ A({
516
+ }, ft = /* @__PURE__ */ A({
516
517
  __name: "AuthkitResetPassword",
517
518
  props: {
518
519
  size: {
@@ -528,70 +529,70 @@ const Ke = ["title", "aria-label", "disabled"], We = {
528
529
  },
529
530
  emits: ["switchSignIn", "submit"],
530
531
  setup(b, {
531
- emit: d
532
+ emit: r
532
533
  }) {
533
- const r = d, n = b, {
534
- appsData: y
535
- } = N(), v = T(() => y.value.authMethods), o = T(() => {
534
+ const c = r, n = b, {
535
+ appsData: v
536
+ } = j(), h = R(() => v.value.authMethods), o = R(() => {
536
537
  const t = [];
537
- return v.value.login.emailPassword && t.push({
538
+ return h.value.login.emailPassword && t.push({
538
539
  key: "email",
539
540
  title: "邮箱找回"
540
- }), v.value.login.phonePassword && t.push({
541
+ }), h.value.login.phonePassword && t.push({
541
542
  key: "phone",
542
543
  title: "手机号找回"
543
544
  }), t;
544
- }), s = z("email");
545
- re(() => {
545
+ }), s = P("email");
546
+ le(() => {
546
547
  var t;
547
548
  o.value.some((g) => g.key === s.value) || (s.value = ((t = o.value[0]) == null ? void 0 : t.key) || "email");
548
549
  });
549
- function m() {
550
- r("switchSignIn");
550
+ function d() {
551
+ c("switchSignIn");
551
552
  }
552
- async function p(t) {
553
- r("submit", {
553
+ async function u(t) {
554
+ c("submit", {
554
555
  method: s.value,
555
556
  ...t
556
557
  });
557
558
  }
558
- return (t, g) => (l(), _("div", pt, [o.value.length > 1 ? (l(), _("div", mt, [a(e(ce), {
559
+ return (t, g) => (l(), k("div", ct, [o.value.length > 1 ? (l(), k("div", pt, [a(e(de), {
559
560
  "active-key": s.value,
560
561
  "onUpdate:activeKey": g[0] || (g[0] = (i) => s.value = i)
561
562
  }, {
562
- default: f(() => [(l(!0), _(F, null, ue(o.value, (i) => (l(), S(e(pe), {
563
+ default: f(() => [(l(!0), k(D, null, re(o.value, (i) => (l(), I(e(ce), {
563
564
  key: i.key,
564
565
  title: i.title
565
566
  }, null, 8, ["title"]))), 128))]),
566
567
  _: 1
567
- }, 8, ["active-key"])])) : I("", !0), s.value === "email" && v.value.login.emailPassword ? (l(), S(it, {
568
+ }, 8, ["active-key"])])) : z("", !0), s.value === "email" && h.value.login.emailPassword ? (l(), I(ot, {
568
569
  key: 1,
569
570
  loading: b.loading,
570
571
  size: n.size,
571
- onSubmit: p
572
- }, null, 8, ["loading", "size"])) : s.value === "phone" && v.value.login.phonePassword ? (l(), S(ut, {
572
+ onSubmit: u
573
+ }, null, 8, ["loading", "size"])) : s.value === "phone" && h.value.login.phonePassword ? (l(), I(rt, {
573
574
  key: 2,
574
575
  loading: b.loading,
575
576
  size: n.size,
576
- onSubmit: p
577
- }, null, 8, ["loading", "size"])) : (l(), _("div", ft, "当前应用未开放找回密码")), a(me, {
578
- onSwitchSignIn: m
577
+ onSubmit: u
578
+ }, null, 8, ["loading", "size"])) : (l(), k("div", mt, "当前应用未开放找回密码")), a(me, {
579
+ onSwitchSignIn: d
579
580
  })]));
580
581
  }
581
- }), gt = /* @__PURE__ */ C(vt, [["__scopeId", "data-v-90d789bb"]]);
582
+ }), vt = /* @__PURE__ */ C(ft, [["__scopeId", "data-v-90d789bb"]]);
582
583
  let se = null, ae = null;
583
- function ht(b) {
584
+ function gt(b) {
584
585
  se = b.onPrivacyPolicy ?? null, ae = b.onUserServiceAgreement ?? null;
585
586
  }
586
- function yt() {
587
+ function ht() {
587
588
  se == null || se();
588
589
  }
589
- function wt() {
590
+ function yt() {
590
591
  ae == null || ae();
591
592
  }
592
- const bt = {
593
+ const wt = {
593
594
  key: 2
594
- }, _t = /* @__PURE__ */ A({
595
+ }, bt = /* @__PURE__ */ A({
595
596
  __name: "AuthkitServiceAgreementAndPrivacyProtection",
596
597
  props: /* @__PURE__ */ Pe({
597
598
  currentView: {}
@@ -604,75 +605,77 @@ const bt = {
604
605
  }),
605
606
  emits: ["update:acceptedTerms"],
606
607
  setup(b) {
607
- const d = b, r = ze(b, "acceptedTerms"), {
608
- getLink: n,
609
- openLegalDoc: y
608
+ const {
609
+ config: r
610
+ } = pe(), c = b, n = ze(b, "acceptedTerms"), {
611
+ getLink: v,
612
+ openLegalDoc: h
610
613
  } = Se(), {
611
- termsShaking: v,
612
- requiresAcceptanceForSignUp: o,
613
- requiresAcceptanceForOAuth: s,
614
- syncAcceptedTerms: m
614
+ termsShaking: o,
615
+ requiresAcceptanceForSignUp: s,
616
+ requiresAcceptanceForOAuth: d,
617
+ syncAcceptedTerms: u
615
618
  } = M();
616
- ye(r, (h) => {
617
- m(h);
619
+ ye(n, (_) => {
620
+ u(_);
618
621
  });
619
- const p = T(() => {
620
- const h = n("userServiceAgreement");
621
- return h != null && h.configured ? h : void 0;
622
- }), t = T(() => {
623
- const h = n("privacyPolicy");
624
- return h != null && h.configured ? h : void 0;
625
- }), g = T(() => !!(p.value || t.value)), i = T(() => d.currentView === "signUp" ? o() : d.currentView === "signIn" ? s() : !1), w = T(() => g.value && i.value);
626
- function u() {
627
- if (oe.legalDocsMode === "builtin") {
628
- y("userServiceAgreement");
622
+ const t = R(() => {
623
+ const _ = v("userServiceAgreement");
624
+ return _ != null && _.configured ? _ : void 0;
625
+ }), g = R(() => {
626
+ const _ = v("privacyPolicy");
627
+ return _ != null && _.configured ? _ : void 0;
628
+ }), i = R(() => !!(t.value || g.value)), w = R(() => c.currentView === "signUp" ? s() : c.currentView === "signIn" ? d() : !1), p = R(() => i.value && w.value);
629
+ function m() {
630
+ if (r.legalDocsMode === "builtin") {
631
+ h("userServiceAgreement");
629
632
  return;
630
633
  }
631
- wt();
634
+ yt();
632
635
  }
633
- function c() {
634
- if (oe.legalDocsMode === "builtin") {
635
- y("privacyPolicy");
636
+ function y() {
637
+ if (r.legalDocsMode === "builtin") {
638
+ h("privacyPolicy");
636
639
  return;
637
640
  }
638
- yt();
641
+ ht();
639
642
  }
640
- return (h, P) => w.value ? (l(), _("div", {
643
+ return (_, q) => p.value ? (l(), k("div", {
641
644
  key: 0,
642
645
  class: he(["ServiceAgreementAndPrivacyProtection", {
643
- "terms-shake": e(v)
646
+ "terms-shake": e(o)
644
647
  }])
645
- }, [g.value ? (l(), _(F, {
648
+ }, [i.value ? (l(), k(D, {
646
649
  key: 0
647
- }, [i.value ? (l(), S(e(Ue), {
650
+ }, [w.value ? (l(), I(e(Ue), {
648
651
  key: 0,
649
- modelValue: r.value,
650
- "onUpdate:modelValue": P[0] || (P[0] = (q) => r.value = q),
652
+ modelValue: n.value,
653
+ "onUpdate:modelValue": q[0] || (q[0] = ($) => n.value = $),
651
654
  class: "terms-checkbox"
652
655
  }, {
653
- default: f(() => [...P[1] || (P[1] = [k("span", {
656
+ default: f(() => [...q[1] || (q[1] = [S("span", {
654
657
  class: "terms-text"
655
658
  }, "我已阅读并同意", -1)])]),
656
659
  _: 1
657
- }, 8, ["modelValue"])) : I("", !0), p.value ? (l(), S(e(Y), {
660
+ }, 8, ["modelValue"])) : z("", !0), t.value ? (l(), I(e(Y), {
658
661
  key: 1,
659
- onClick: u
662
+ onClick: m
660
663
  }, {
661
- default: f(() => [x(L(p.value.label), 1)]),
664
+ default: f(() => [x(L(t.value.label), 1)]),
662
665
  _: 1
663
- })) : I("", !0), p.value && t.value ? (l(), _("span", bt, "和")) : I("", !0), t.value ? (l(), S(e(Y), {
666
+ })) : z("", !0), t.value && g.value ? (l(), k("span", wt, "和")) : z("", !0), g.value ? (l(), I(e(Y), {
664
667
  key: 3,
665
- onClick: c
668
+ onClick: y
666
669
  }, {
667
- default: f(() => [x(L(t.value.label), 1)]),
670
+ default: f(() => [x(L(g.value.label), 1)]),
668
671
  _: 1
669
- })) : I("", !0)], 64)) : I("", !0)], 2)) : I("", !0);
672
+ })) : z("", !0)], 64)) : z("", !0)], 2)) : z("", !0);
670
673
  }
671
- }), ee = /* @__PURE__ */ C(_t, [["__scopeId", "data-v-b288700a"]]), kt = {
674
+ }), ee = /* @__PURE__ */ C(bt, [["__scopeId", "data-v-a0c2f361"]]), _t = {
672
675
  class: "content"
673
- }, St = {
676
+ }, kt = {
674
677
  class: "handle"
675
- }, It = /* @__PURE__ */ A({
678
+ }, St = /* @__PURE__ */ A({
676
679
  __name: "AuthkitPasswordAuth",
677
680
  props: {
678
681
  size: {
@@ -691,27 +694,27 @@ const bt = {
691
694
  },
692
695
  emits: ["submit"],
693
696
  setup(b, {
694
- emit: d
697
+ emit: r
695
698
  }) {
696
- const r = d, {
699
+ const c = r, {
697
700
  useTermsFormField: n
698
701
  } = M(), {
699
- showTermsField: y,
700
- termsRules: v
701
- } = n("signIn"), o = b, s = z(), m = z({
702
+ showTermsField: v,
703
+ termsRules: h
704
+ } = n("signIn"), o = b, s = P(), d = P({
702
705
  identifier: void 0,
703
706
  password: void 0,
704
707
  acceptedTerms: !1
705
708
  });
706
- async function p() {
709
+ async function u() {
707
710
  s.value.validate().then((t) => {
708
- t || r("submit", m.value);
711
+ t || c("submit", d.value);
709
712
  });
710
713
  }
711
- return (t, g) => (l(), _("div", kt, [a(e(E), {
714
+ return (t, g) => (l(), k("div", _t, [a(e(H), {
712
715
  ref_key: "formRef",
713
716
  ref: s,
714
- model: m.value,
717
+ model: d.value,
715
718
  size: o.size,
716
719
  "auto-label-width": ""
717
720
  }, {
@@ -725,8 +728,8 @@ const bt = {
725
728
  }]
726
729
  }, {
727
730
  default: f(() => [a(e(U), {
728
- modelValue: m.value.identifier,
729
- "onUpdate:modelValue": g[0] || (g[0] = (i) => m.value.identifier = i),
731
+ modelValue: d.value.identifier,
732
+ "onUpdate:modelValue": g[0] || (g[0] = (i) => d.value.identifier = i),
730
733
  placeholder: o.allowPhone ? "请输入邮箱或手机号" : "请输入邮箱",
731
734
  autocomplete: "email username"
732
735
  }, null, 8, ["modelValue", "placeholder"])]),
@@ -741,47 +744,47 @@ const bt = {
741
744
  }]
742
745
  }, {
743
746
  default: f(() => [a(e(U), {
744
- modelValue: m.value.password,
745
- "onUpdate:modelValue": g[1] || (g[1] = (i) => m.value.password = i),
747
+ modelValue: d.value.password,
748
+ "onUpdate:modelValue": g[1] || (g[1] = (i) => d.value.password = i),
746
749
  placeholder: "请输入密码",
747
750
  type: "password",
748
751
  autocomplete: "current-password"
749
752
  }, null, 8, ["modelValue"])]),
750
753
  _: 1
751
- }), k("div", St, [a(e(B), {
754
+ }), S("div", kt, [a(e(B), {
752
755
  type: "primary",
753
756
  loading: o.loading,
754
757
  long: "",
755
758
  size: o.size,
756
- onClick: p
759
+ onClick: u
757
760
  }, {
758
761
  default: f(() => [...g[3] || (g[3] = [x(" 登录 ", -1)])]),
759
762
  _: 1
760
- }, 8, ["loading", "size"]), e(y) ? (l(), S(e(V), {
763
+ }, 8, ["loading", "size"]), e(v) ? (l(), I(e(V), {
761
764
  key: 0,
762
765
  field: "acceptedTerms",
763
766
  "hide-label": "",
764
- rules: e(v)
767
+ rules: e(h)
765
768
  }, {
766
769
  default: f(() => [a(ee, {
767
- "accepted-terms": m.value.acceptedTerms,
768
- "onUpdate:acceptedTerms": g[2] || (g[2] = (i) => m.value.acceptedTerms = i),
770
+ "accepted-terms": d.value.acceptedTerms,
771
+ "onUpdate:acceptedTerms": g[2] || (g[2] = (i) => d.value.acceptedTerms = i),
769
772
  "current-view": "signIn"
770
773
  }, null, 8, ["accepted-terms"])]),
771
774
  _: 1
772
- }, 8, ["rules"])) : I("", !0)])]),
775
+ }, 8, ["rules"])) : z("", !0)])]),
773
776
  _: 1
774
777
  }, 8, ["model", "size"])]));
775
778
  }
776
- }), zt = /* @__PURE__ */ C(It, [["__scopeId", "data-v-cca59a39"]]), Pt = {
779
+ }), It = /* @__PURE__ */ C(St, [["__scopeId", "data-v-cca59a39"]]), zt = {
777
780
  class: "SignInPhone"
778
- }, Vt = {
781
+ }, Pt = {
779
782
  class: "content"
780
- }, At = {
783
+ }, Vt = {
781
784
  class: "sendVerifyCodeItem"
782
- }, Ut = {
785
+ }, At = {
783
786
  class: "handle"
784
- }, Ct = /* @__PURE__ */ A({
787
+ }, Ut = /* @__PURE__ */ A({
785
788
  __name: "AuthkitSignInPhone",
786
789
  props: {
787
790
  size: {
@@ -796,40 +799,40 @@ const bt = {
796
799
  },
797
800
  emits: ["submit"],
798
801
  setup(b, {
799
- emit: d
802
+ emit: r
800
803
  }) {
801
- const r = d, {
804
+ const c = r, {
802
805
  useTermsFormField: n
803
806
  } = M(), {
804
- showTermsField: y,
805
- termsRules: v
806
- } = n("signIn"), o = b, s = z(), m = z(!1), p = z(), t = z({
807
+ showTermsField: v,
808
+ termsRules: h
809
+ } = n("signIn"), o = b, s = P(), d = P(!1), u = P(), t = P({
807
810
  phone: void 0,
808
811
  code: void 0,
809
812
  acceptedTerms: !1
810
813
  });
811
814
  async function g() {
812
- if (!await p.value.validateField(["phone"])) {
813
- m.value = !0;
814
- const u = await O.verify.sms.send.post({
815
+ if (!await u.value.validateField(["phone"])) {
816
+ d.value = !0;
817
+ const p = await O().auth.verify.sms.send.post({
815
818
  phone: t.value.phone,
816
819
  purpose: "signIn"
817
820
  });
818
- m.value = !1, K(s.value, u);
821
+ d.value = !1, W(s.value, p);
819
822
  }
820
823
  }
821
824
  async function i() {
822
- p.value.validate().then((w) => {
823
- w || r("submit", {
825
+ u.value.validate().then((w) => {
826
+ w || c("submit", {
824
827
  identifier: t.value.phone,
825
828
  code: t.value.code,
826
829
  method: "code"
827
830
  });
828
831
  });
829
832
  }
830
- return (w, u) => (l(), _("div", Pt, [k("div", Vt, [a(e(E), {
833
+ return (w, p) => (l(), k("div", zt, [S("div", Pt, [a(e(H), {
831
834
  ref_key: "formRef",
832
- ref: p,
835
+ ref: u,
833
836
  model: t.value,
834
837
  size: o.size,
835
838
  "auto-label-width": ""
@@ -848,7 +851,7 @@ const bt = {
848
851
  }, {
849
852
  default: f(() => [a(e(U), {
850
853
  modelValue: t.value.phone,
851
- "onUpdate:modelValue": u[0] || (u[0] = (c) => t.value.phone = c),
854
+ "onUpdate:modelValue": p[0] || (p[0] = (m) => t.value.phone = m),
852
855
  placeholder: "请输入手机号",
853
856
  autocomplete: "tel",
854
857
  type: "tel"
@@ -863,54 +866,54 @@ const bt = {
863
866
  message: "请输入验证码"
864
867
  }]
865
868
  }, {
866
- default: f(() => [k("div", At, [a(e(U), {
869
+ default: f(() => [S("div", Vt, [a(e(U), {
867
870
  modelValue: t.value.code,
868
- "onUpdate:modelValue": u[1] || (u[1] = (c) => t.value.code = c),
871
+ "onUpdate:modelValue": p[1] || (p[1] = (m) => t.value.code = m),
869
872
  placeholder: "请输入验证码",
870
873
  autocomplete: "one-time-code"
871
- }, null, 8, ["modelValue"]), a(j, {
874
+ }, null, 8, ["modelValue"]), a(K, {
872
875
  ref_key: "SendVerifyCodeRef",
873
876
  ref: s,
874
877
  size: o.size,
875
- loading: m.value,
878
+ loading: d.value,
876
879
  style: {
877
880
  "margin-left": "10px"
878
881
  },
879
882
  onSend: g
880
883
  }, null, 8, ["size", "loading"])])]),
881
884
  _: 1
882
- }), k("div", Ut, [a(e(B), {
885
+ }), S("div", At, [a(e(B), {
883
886
  type: "primary",
884
887
  loading: o.loading,
885
888
  long: "",
886
889
  size: o.size,
887
890
  onClick: i
888
891
  }, {
889
- default: f(() => [...u[3] || (u[3] = [x(" 登录 ", -1)])]),
892
+ default: f(() => [...p[3] || (p[3] = [x(" 登录 ", -1)])]),
890
893
  _: 1
891
- }, 8, ["loading", "size"]), e(y) ? (l(), S(e(V), {
894
+ }, 8, ["loading", "size"]), e(v) ? (l(), I(e(V), {
892
895
  key: 0,
893
896
  field: "acceptedTerms",
894
897
  "hide-label": "",
895
- rules: e(v)
898
+ rules: e(h)
896
899
  }, {
897
900
  default: f(() => [a(ee, {
898
901
  "accepted-terms": t.value.acceptedTerms,
899
- "onUpdate:acceptedTerms": u[2] || (u[2] = (c) => t.value.acceptedTerms = c),
902
+ "onUpdate:acceptedTerms": p[2] || (p[2] = (m) => t.value.acceptedTerms = m),
900
903
  "current-view": "signIn"
901
904
  }, null, 8, ["accepted-terms"])]),
902
905
  _: 1
903
- }, 8, ["rules"])) : I("", !0)])]),
906
+ }, 8, ["rules"])) : z("", !0)])]),
904
907
  _: 1
905
908
  }, 8, ["model", "size"])])]));
906
909
  }
907
- }), $t = /* @__PURE__ */ C(Ct, [["__scopeId", "data-v-a0df745a"]]), Tt = {
910
+ }), Ct = /* @__PURE__ */ C(Ut, [["__scopeId", "data-v-ef67e91c"]]), $t = {
908
911
  class: "SignInEmailCode"
909
- }, Rt = {
912
+ }, Tt = {
910
913
  class: "sendVerifyCodeItem"
911
- }, qt = {
914
+ }, Rt = {
912
915
  class: "handle"
913
- }, xt = /* @__PURE__ */ A({
916
+ }, qt = /* @__PURE__ */ A({
914
917
  __name: "AuthkitSignInEmailCode",
915
918
  props: {
916
919
  size: {
@@ -925,33 +928,33 @@ const bt = {
925
928
  },
926
929
  emits: ["submit"],
927
930
  setup(b, {
928
- emit: d
931
+ emit: r
929
932
  }) {
930
- const r = d, {
933
+ const c = r, {
931
934
  useTermsFormField: n
932
935
  } = M(), {
933
- showTermsField: y,
934
- termsRules: v
935
- } = n("signIn"), o = b, s = z(), m = z(!1), p = z(), t = z({
936
+ showTermsField: v,
937
+ termsRules: h
938
+ } = n("signIn"), o = b, s = P(), d = P(!1), u = P(), t = P({
936
939
  email: void 0,
937
940
  code: void 0,
938
941
  emailVerifyId: "",
939
942
  acceptedTerms: !1
940
943
  });
941
944
  async function g() {
942
- var u;
943
- if (!await p.value.validateField(["email"])) {
944
- m.value = !0;
945
- const c = await O.verify.email.retry.post({
945
+ var p;
946
+ if (!await u.value.validateField(["email"])) {
947
+ d.value = !0;
948
+ const m = await O().auth.verify.email.retry.post({
946
949
  email: t.value.email,
947
950
  purpose: "signIn"
948
951
  });
949
- m.value = !1, (u = c.data) != null && u.emailVerifyId && (t.value.emailVerifyId = c.data.emailVerifyId), K(s.value, c);
952
+ d.value = !1, (p = m.data) != null && p.emailVerifyId && (t.value.emailVerifyId = m.data.emailVerifyId), W(s.value, m);
950
953
  }
951
954
  }
952
955
  async function i() {
953
- p.value.validate().then((w) => {
954
- w || r("submit", {
956
+ u.value.validate().then((w) => {
957
+ w || c("submit", {
955
958
  identifier: t.value.email,
956
959
  code: t.value.code,
957
960
  emailVerifyId: t.value.emailVerifyId,
@@ -959,9 +962,9 @@ const bt = {
959
962
  });
960
963
  });
961
964
  }
962
- return (w, u) => (l(), _("div", Tt, [a(e(E), {
965
+ return (w, p) => (l(), k("div", $t, [a(e(H), {
963
966
  ref_key: "formRef",
964
- ref: p,
967
+ ref: u,
965
968
  model: t.value,
966
969
  size: o.size,
967
970
  "auto-label-width": ""
@@ -979,7 +982,7 @@ const bt = {
979
982
  }, {
980
983
  default: f(() => [a(e(U), {
981
984
  modelValue: t.value.email,
982
- "onUpdate:modelValue": u[0] || (u[0] = (c) => t.value.email = c),
985
+ "onUpdate:modelValue": p[0] || (p[0] = (m) => t.value.email = m),
983
986
  placeholder: "请输入邮箱",
984
987
  autocomplete: "email"
985
988
  }, null, 8, ["modelValue"])]),
@@ -992,52 +995,52 @@ const bt = {
992
995
  message: "请输入验证码"
993
996
  }]
994
997
  }, {
995
- default: f(() => [k("div", Rt, [a(e(U), {
998
+ default: f(() => [S("div", Tt, [a(e(U), {
996
999
  modelValue: t.value.code,
997
- "onUpdate:modelValue": u[1] || (u[1] = (c) => t.value.code = c),
1000
+ "onUpdate:modelValue": p[1] || (p[1] = (m) => t.value.code = m),
998
1001
  placeholder: "请输入验证码",
999
1002
  autocomplete: "one-time-code"
1000
- }, null, 8, ["modelValue"]), a(j, {
1003
+ }, null, 8, ["modelValue"]), a(K, {
1001
1004
  ref_key: "SendVerifyCodeRef",
1002
1005
  ref: s,
1003
1006
  size: o.size,
1004
- loading: m.value,
1007
+ loading: d.value,
1005
1008
  style: {
1006
1009
  "margin-left": "10px"
1007
1010
  },
1008
1011
  onSend: g
1009
1012
  }, null, 8, ["size", "loading"])])]),
1010
1013
  _: 1
1011
- }), k("div", qt, [a(e(B), {
1014
+ }), S("div", Rt, [a(e(B), {
1012
1015
  type: "primary",
1013
1016
  loading: o.loading,
1014
1017
  long: "",
1015
1018
  size: o.size,
1016
1019
  onClick: i
1017
1020
  }, {
1018
- default: f(() => [...u[3] || (u[3] = [x(" 登录 ", -1)])]),
1021
+ default: f(() => [...p[3] || (p[3] = [x(" 登录 ", -1)])]),
1019
1022
  _: 1
1020
- }, 8, ["loading", "size"]), e(y) ? (l(), S(e(V), {
1023
+ }, 8, ["loading", "size"]), e(v) ? (l(), I(e(V), {
1021
1024
  key: 0,
1022
1025
  field: "acceptedTerms",
1023
1026
  "hide-label": "",
1024
- rules: e(v)
1027
+ rules: e(h)
1025
1028
  }, {
1026
1029
  default: f(() => [a(ee, {
1027
1030
  "accepted-terms": t.value.acceptedTerms,
1028
- "onUpdate:acceptedTerms": u[2] || (u[2] = (c) => t.value.acceptedTerms = c),
1031
+ "onUpdate:acceptedTerms": p[2] || (p[2] = (m) => t.value.acceptedTerms = m),
1029
1032
  "current-view": "signIn"
1030
1033
  }, null, 8, ["accepted-terms"])]),
1031
1034
  _: 1
1032
- }, 8, ["rules"])) : I("", !0)])]),
1035
+ }, 8, ["rules"])) : z("", !0)])]),
1033
1036
  _: 1
1034
1037
  }, 8, ["model", "size"])]));
1035
1038
  }
1036
- }), Lt = /* @__PURE__ */ C(xt, [["__scopeId", "data-v-77c9b3b0"]]), Bt = {
1039
+ }), xt = /* @__PURE__ */ C(qt, [["__scopeId", "data-v-fee4702f"]]), Lt = {
1037
1040
  class: "SwitchSignUpOrResetPassword"
1038
- }, Ot = {
1041
+ }, Bt = {
1039
1042
  key: 0
1040
- }, Mt = /* @__PURE__ */ A({
1043
+ }, Ot = /* @__PURE__ */ A({
1041
1044
  __name: "AuthkitSwitchSignUpOrResetPassword",
1042
1045
  props: {
1043
1046
  showSignUp: {
@@ -1051,40 +1054,40 @@ const bt = {
1051
1054
  },
1052
1055
  emits: ["switchSignUp", "switchResetPassword"],
1053
1056
  setup(b, {
1054
- emit: d
1057
+ emit: r
1055
1058
  }) {
1056
- const r = b, n = d;
1057
- function y() {
1059
+ const c = b, n = r;
1060
+ function v() {
1058
1061
  n("switchSignUp");
1059
1062
  }
1060
- function v() {
1063
+ function h() {
1061
1064
  n("switchResetPassword");
1062
1065
  }
1063
- return (o, s) => (l(), _("div", Bt, [r.showSignUp ? (l(), _("span", Ot, [s[1] || (s[1] = k("span", null, " 还没有账户?", -1)), a(e(Y), {
1066
+ return (o, s) => (l(), k("div", Lt, [c.showSignUp ? (l(), k("span", Bt, [s[1] || (s[1] = S("span", null, " 还没有账户?", -1)), a(e(Y), {
1064
1067
  style: {
1065
1068
  padding: "0px"
1066
1069
  },
1067
- onClick: y
1070
+ onClick: v
1068
1071
  }, {
1069
1072
  default: f(() => [...s[0] || (s[0] = [x("去注册?", -1)])]),
1070
1073
  _: 1
1071
- })])) : I("", !0), r.showResetPassword ? (l(), S(e(Y), {
1074
+ })])) : z("", !0), c.showResetPassword ? (l(), I(e(Y), {
1072
1075
  key: 1,
1073
1076
  style: {
1074
1077
  padding: "0px"
1075
1078
  },
1076
- onClick: v
1079
+ onClick: h
1077
1080
  }, {
1078
1081
  default: f(() => [...s[2] || (s[2] = [x(" 忘记密码? ", -1)])]),
1079
1082
  _: 1
1080
- })) : I("", !0)]));
1083
+ })) : z("", !0)]));
1081
1084
  }
1082
- }), Ft = /* @__PURE__ */ C(Mt, [["__scopeId", "data-v-6ca7b1f2"]]), Dt = {
1085
+ }), Mt = /* @__PURE__ */ C(Ot, [["__scopeId", "data-v-6ca7b1f2"]]), Ft = {
1083
1086
  class: "SignIn"
1084
- }, Et = {
1087
+ }, Dt = {
1085
1088
  key: 0,
1086
1089
  class: "tabsContainer"
1087
- }, Ht = /* @__PURE__ */ A({
1090
+ }, Et = /* @__PURE__ */ A({
1088
1091
  __name: "AuthkitSignIn",
1089
1092
  props: {
1090
1093
  size: {
@@ -1099,82 +1102,82 @@ const bt = {
1099
1102
  },
1100
1103
  emits: ["submit", "switchSignUp", "switchResetPassword"],
1101
1104
  setup(b, {
1102
- emit: d
1105
+ emit: r
1103
1106
  }) {
1104
- const r = d, n = b, y = Ve(), v = T(() => !!y.OAuth), {
1107
+ const c = r, n = b, v = Ve(), h = R(() => !!v.OAuth), {
1105
1108
  appsData: o
1106
- } = N(), {
1109
+ } = j(), {
1107
1110
  signUpAuthEnabled: s
1108
- } = M(), m = T(() => o.value.authMethods), p = T(() => s.value && (m.value.signUp.email || m.value.signUp.phone)), t = T(() => m.value.login.emailPassword || m.value.login.phonePassword), g = T(() => {
1109
- const h = [];
1110
- return (m.value.login.emailPassword || m.value.login.phonePassword) && h.push({
1111
+ } = M(), d = R(() => o.value.authMethods), u = R(() => s.value && (d.value.signUp.email || d.value.signUp.phone)), t = R(() => d.value.login.emailPassword || d.value.login.phonePassword), g = R(() => {
1112
+ const y = [];
1113
+ return (d.value.login.emailPassword || d.value.login.phonePassword) && y.push({
1111
1114
  key: "password",
1112
- title: m.value.login.phonePassword ? "邮箱/手机号密码登录" : "邮箱密码登录"
1113
- }), m.value.login.phoneCode && h.push({
1115
+ title: d.value.login.phonePassword ? "邮箱/手机号密码登录" : "邮箱密码登录"
1116
+ }), d.value.login.phoneCode && y.push({
1114
1117
  key: "phoneCode",
1115
1118
  title: "手机验证码登录"
1116
- }), m.value.login.emailCode && h.push({
1119
+ }), d.value.login.emailCode && y.push({
1117
1120
  key: "emailCode",
1118
1121
  title: "邮箱验证码登录"
1119
- }), h;
1120
- }), i = z("password");
1121
- re(() => {
1122
- var h;
1123
- g.value.some((P) => P.key === i.value) || (i.value = ((h = g.value[0]) == null ? void 0 : h.key) || "password");
1122
+ }), y;
1123
+ }), i = P("password");
1124
+ le(() => {
1125
+ var y;
1126
+ g.value.some((_) => _.key === i.value) || (i.value = ((y = g.value[0]) == null ? void 0 : y.key) || "password");
1124
1127
  });
1125
1128
  function w() {
1126
- r("switchSignUp");
1129
+ c("switchSignUp");
1127
1130
  }
1128
- function u() {
1129
- r("switchResetPassword");
1131
+ function p() {
1132
+ c("switchResetPassword");
1130
1133
  }
1131
- async function c(h) {
1132
- r("submit", {
1134
+ async function m(y) {
1135
+ c("submit", {
1133
1136
  method: i.value === "password" ? "password" : "code",
1134
- ...h
1137
+ ...y
1135
1138
  });
1136
1139
  }
1137
- return (h, P) => (l(), _("div", Dt, [g.value.length > 1 ? (l(), _("div", Et, [a(e(ce), {
1140
+ return (y, _) => (l(), k("div", Ft, [g.value.length > 1 ? (l(), k("div", Dt, [a(e(de), {
1138
1141
  "active-key": i.value,
1139
- "onUpdate:activeKey": P[0] || (P[0] = (q) => i.value = q)
1142
+ "onUpdate:activeKey": _[0] || (_[0] = (q) => i.value = q)
1140
1143
  }, {
1141
- default: f(() => [(l(!0), _(F, null, ue(g.value, (q) => (l(), S(e(pe), {
1144
+ default: f(() => [(l(!0), k(D, null, re(g.value, (q) => (l(), I(e(ce), {
1142
1145
  key: q.key,
1143
1146
  title: q.title
1144
1147
  }, null, 8, ["title"]))), 128))]),
1145
1148
  _: 1
1146
- }, 8, ["active-key"])])) : I("", !0), i.value === "password" && (m.value.login.emailPassword || m.value.login.phonePassword) ? (l(), S(zt, {
1149
+ }, 8, ["active-key"])])) : z("", !0), i.value === "password" && (d.value.login.emailPassword || d.value.login.phonePassword) ? (l(), I(It, {
1147
1150
  key: 1,
1148
1151
  loading: n.loading,
1149
1152
  size: n.size,
1150
- "allow-phone": m.value.login.phonePassword,
1151
- onSubmit: c
1152
- }, null, 8, ["loading", "size", "allow-phone"])) : i.value === "phoneCode" ? (l(), S($t, {
1153
+ "allow-phone": d.value.login.phonePassword,
1154
+ onSubmit: m
1155
+ }, null, 8, ["loading", "size", "allow-phone"])) : i.value === "phoneCode" ? (l(), I(Ct, {
1153
1156
  key: 2,
1154
1157
  loading: n.loading,
1155
1158
  size: n.size,
1156
- onSubmit: c
1157
- }, null, 8, ["loading", "size"])) : i.value === "emailCode" ? (l(), S(Lt, {
1159
+ onSubmit: m
1160
+ }, null, 8, ["loading", "size"])) : i.value === "emailCode" ? (l(), I(xt, {
1158
1161
  key: 3,
1159
1162
  loading: n.loading,
1160
1163
  size: n.size,
1161
- onSubmit: c
1162
- }, null, 8, ["loading", "size"])) : I("", !0), v.value ? Z(h.$slots, "OAuth", {
1164
+ onSubmit: m
1165
+ }, null, 8, ["loading", "size"])) : z("", !0), h.value ? Z(y.$slots, "OAuth", {
1163
1166
  key: 4
1164
- }, void 0, !0) : I("", !0), a(Ft, {
1165
- "show-sign-up": p.value,
1167
+ }, void 0, !0) : z("", !0), a(Mt, {
1168
+ "show-sign-up": u.value,
1166
1169
  "show-reset-password": t.value,
1167
1170
  onSwitchSignUp: w,
1168
- onSwitchResetPassword: u
1171
+ onSwitchResetPassword: p
1169
1172
  }, null, 8, ["show-sign-up", "show-reset-password"])]));
1170
1173
  }
1171
- }), Gt = /* @__PURE__ */ C(Ht, [["__scopeId", "data-v-9222d961"]]), Nt = {
1174
+ }), Ht = /* @__PURE__ */ C(Et, [["__scopeId", "data-v-9222d961"]]), Gt = {
1172
1175
  class: "content"
1173
- }, jt = {
1176
+ }, Nt = {
1174
1177
  class: "sendVerifyCodeItem"
1175
- }, Kt = {
1178
+ }, jt = {
1176
1179
  class: "handle"
1177
- }, Wt = /* @__PURE__ */ A({
1180
+ }, Kt = /* @__PURE__ */ A({
1178
1181
  __name: "AuthkitEmailUpdate",
1179
1182
  props: {
1180
1183
  size: {
@@ -1193,14 +1196,14 @@ const bt = {
1193
1196
  },
1194
1197
  emits: ["submit"],
1195
1198
  setup(b, {
1196
- emit: d
1199
+ emit: r
1197
1200
  }) {
1198
- const r = d, {
1201
+ const c = r, {
1199
1202
  useTermsFormField: n
1200
1203
  } = M(), {
1201
- showTermsField: y,
1202
- termsRules: v
1203
- } = n("signUp"), o = b, s = z(), m = z(!1), p = z(), t = z({
1204
+ showTermsField: v,
1205
+ termsRules: h
1206
+ } = n("signUp"), o = b, s = P(), d = P(!1), u = P(), t = P({
1204
1207
  email: void 0,
1205
1208
  userToken: void 0,
1206
1209
  emailVerifyId: void 0,
@@ -1209,28 +1212,28 @@ const bt = {
1209
1212
  inviteCode: void 0,
1210
1213
  acceptedTerms: !1
1211
1214
  });
1212
- D(() => {
1215
+ E(() => {
1213
1216
  const w = ke();
1214
1217
  w && (t.value.inviteCode = w);
1215
1218
  });
1216
1219
  async function g() {
1217
- if (!await p.value.validateField(["email"])) {
1218
- m.value = !0;
1219
- const u = await O.verify.email.retry.post({
1220
+ if (!await u.value.validateField(["email"])) {
1221
+ d.value = !0;
1222
+ const p = await O().auth.verify.email.retry.post({
1220
1223
  email: t.value.email,
1221
1224
  purpose: o.purpose
1222
1225
  });
1223
- m.value = !1, u.data && (t.value.emailVerifyId = u.data.emailVerifyId), K(s.value, u);
1226
+ d.value = !1, p.data && (t.value.emailVerifyId = p.data.emailVerifyId), W(s.value, p);
1224
1227
  }
1225
1228
  }
1226
1229
  async function i() {
1227
- p.value.validate().then((w) => {
1228
- w || r("submit", t.value);
1230
+ u.value.validate().then((w) => {
1231
+ w || c("submit", t.value);
1229
1232
  });
1230
1233
  }
1231
- return (w, u) => (l(), _("div", Nt, [a(e(E), {
1234
+ return (w, p) => (l(), k("div", Gt, [a(e(H), {
1232
1235
  ref_key: "formRef",
1233
- ref: p,
1236
+ ref: u,
1234
1237
  model: t.value,
1235
1238
  size: o.size,
1236
1239
  "auto-label-width": ""
@@ -1249,7 +1252,7 @@ const bt = {
1249
1252
  }, {
1250
1253
  default: f(() => [a(e(U), {
1251
1254
  modelValue: t.value.email,
1252
- "onUpdate:modelValue": u[0] || (u[0] = (c) => t.value.email = c),
1255
+ "onUpdate:modelValue": p[0] || (p[0] = (m) => t.value.email = m),
1253
1256
  placeholder: "请输入邮箱",
1254
1257
  autocomplete: "email username",
1255
1258
  type: "email"
@@ -1264,16 +1267,16 @@ const bt = {
1264
1267
  message: "请输入验证码"
1265
1268
  }]
1266
1269
  }, {
1267
- default: f(() => [k("div", jt, [a(e(U), {
1270
+ default: f(() => [S("div", Nt, [a(e(U), {
1268
1271
  modelValue: t.value.userToken,
1269
- "onUpdate:modelValue": u[1] || (u[1] = (c) => t.value.userToken = c),
1272
+ "onUpdate:modelValue": p[1] || (p[1] = (m) => t.value.userToken = m),
1270
1273
  placeholder: "请输入验证码",
1271
1274
  autocomplete: "one-time-code"
1272
- }, null, 8, ["modelValue"]), a(j, {
1275
+ }, null, 8, ["modelValue"]), a(K, {
1273
1276
  ref_key: "SendVerifyCodeRef",
1274
1277
  ref: s,
1275
1278
  size: o.size,
1276
- loading: m.value,
1279
+ loading: d.value,
1277
1280
  style: {
1278
1281
  "margin-left": "10px"
1279
1282
  },
@@ -1294,7 +1297,7 @@ const bt = {
1294
1297
  }, {
1295
1298
  default: f(() => [a(e(U), {
1296
1299
  modelValue: t.value.password,
1297
- "onUpdate:modelValue": u[2] || (u[2] = (c) => t.value.password = c),
1300
+ "onUpdate:modelValue": p[2] || (p[2] = (m) => t.value.password = m),
1298
1301
  placeholder: "请输入密码",
1299
1302
  type: "password",
1300
1303
  autocomplete: "new-password"
@@ -1311,14 +1314,14 @@ const bt = {
1311
1314
  minLength: 10,
1312
1315
  message: "确认密码不能少于10字符"
1313
1316
  }, {
1314
- validator: (c, h) => {
1315
- c !== t.value.password ? h("两次密码输入不一致,请重新输入") : h();
1317
+ validator: (m, y) => {
1318
+ m !== t.value.password ? y("两次密码输入不一致,请重新输入") : y();
1316
1319
  }
1317
1320
  }]
1318
1321
  }, {
1319
1322
  default: f(() => [a(e(U), {
1320
1323
  modelValue: t.value.confirmPassword,
1321
- "onUpdate:modelValue": u[3] || (u[3] = (c) => t.value.confirmPassword = c),
1324
+ "onUpdate:modelValue": p[3] || (p[3] = (m) => t.value.confirmPassword = m),
1322
1325
  placeholder: "请输入确认密码密码",
1323
1326
  type: "password",
1324
1327
  autocomplete: "new-password"
@@ -1334,45 +1337,45 @@ const bt = {
1334
1337
  }, {
1335
1338
  default: f(() => [a(e(U), {
1336
1339
  modelValue: t.value.inviteCode,
1337
- "onUpdate:modelValue": u[4] || (u[4] = (c) => t.value.inviteCode = c),
1340
+ "onUpdate:modelValue": p[4] || (p[4] = (m) => t.value.inviteCode = m),
1338
1341
  placeholder: "邀请码(可选)",
1339
1342
  autocomplete: "off"
1340
1343
  }, null, 8, ["modelValue"])]),
1341
1344
  _: 1
1342
- }), k("div", Kt, [a(e(B), {
1345
+ }), S("div", jt, [a(e(B), {
1343
1346
  type: "primary",
1344
1347
  loading: o.loading,
1345
1348
  long: "",
1346
1349
  size: o.size,
1347
1350
  onClick: i
1348
1351
  }, {
1349
- default: f(() => [...u[6] || (u[6] = [x(" 提交 ", -1)])]),
1352
+ default: f(() => [...p[6] || (p[6] = [x(" 提交 ", -1)])]),
1350
1353
  _: 1
1351
- }, 8, ["loading", "size"]), e(y) ? (l(), S(e(V), {
1354
+ }, 8, ["loading", "size"]), e(v) ? (l(), I(e(V), {
1352
1355
  key: 0,
1353
1356
  field: "acceptedTerms",
1354
1357
  "hide-label": "",
1355
- rules: e(v)
1358
+ rules: e(h)
1356
1359
  }, {
1357
1360
  default: f(() => [a(ee, {
1358
1361
  "accepted-terms": t.value.acceptedTerms,
1359
- "onUpdate:acceptedTerms": u[5] || (u[5] = (c) => t.value.acceptedTerms = c),
1362
+ "onUpdate:acceptedTerms": p[5] || (p[5] = (m) => t.value.acceptedTerms = m),
1360
1363
  "current-view": "signUp"
1361
1364
  }, null, 8, ["accepted-terms"])]),
1362
1365
  _: 1
1363
- }, 8, ["rules"])) : I("", !0)])]),
1366
+ }, 8, ["rules"])) : z("", !0)])]),
1364
1367
  _: 1
1365
1368
  }, 8, ["model", "size"])]));
1366
1369
  }
1367
- }), Qt = /* @__PURE__ */ C(Wt, [["__scopeId", "data-v-00bdf809"]]), Jt = {
1370
+ }), Wt = /* @__PURE__ */ C(Kt, [["__scopeId", "data-v-07ef9d49"]]), Qt = {
1368
1371
  class: "SignUpPhone"
1369
- }, Xt = {
1372
+ }, Jt = {
1370
1373
  class: "content"
1371
- }, Yt = {
1374
+ }, Xt = {
1372
1375
  class: "sendVerifyCodeItem"
1373
- }, Zt = {
1376
+ }, Yt = {
1374
1377
  class: "handle"
1375
- }, es = /* @__PURE__ */ A({
1378
+ }, Zt = /* @__PURE__ */ A({
1376
1379
  __name: "AuthkitSignUpPhone",
1377
1380
  props: {
1378
1381
  size: {
@@ -1392,14 +1395,14 @@ const bt = {
1392
1395
  },
1393
1396
  emits: ["switchSignIn", "submit"],
1394
1397
  setup(b, {
1395
- emit: d
1398
+ emit: r
1396
1399
  }) {
1397
- const r = d, {
1400
+ const c = r, {
1398
1401
  useTermsFormField: n
1399
1402
  } = M(), {
1400
- showTermsField: y,
1401
- termsRules: v
1402
- } = n("signUp"), o = b, s = z(), m = z(!1), p = z(), t = z({
1403
+ showTermsField: v,
1404
+ termsRules: h
1405
+ } = n("signUp"), o = b, s = P(), d = P(!1), u = P(), t = P({
1403
1406
  phone: void 0,
1404
1407
  code: void 0,
1405
1408
  password: void 0,
@@ -1407,34 +1410,34 @@ const bt = {
1407
1410
  inviteCode: void 0,
1408
1411
  acceptedTerms: !1
1409
1412
  });
1410
- D(() => {
1411
- const c = ke();
1412
- c && (t.value.inviteCode = c);
1413
+ E(() => {
1414
+ const m = ke();
1415
+ m && (t.value.inviteCode = m);
1413
1416
  });
1414
1417
  const g = [{
1415
1418
  required: !0,
1416
1419
  message: "请输入确认密码"
1417
1420
  }, {
1418
- validator: (c, h) => {
1419
- t.value.password && c !== t.value.password ? h("两次密码输入不一致") : h();
1421
+ validator: (m, y) => {
1422
+ t.value.password && m !== t.value.password ? y("两次密码输入不一致") : y();
1420
1423
  }
1421
1424
  }];
1422
1425
  function i() {
1423
- r("switchSignIn");
1426
+ c("switchSignIn");
1424
1427
  }
1425
1428
  async function w() {
1426
- if (!await p.value.validateField(["phone"])) {
1427
- m.value = !0;
1428
- const h = await O.verify.sms.send.post({
1429
+ if (!await u.value.validateField(["phone"])) {
1430
+ d.value = !0;
1431
+ const y = await O().auth.verify.sms.send.post({
1429
1432
  phone: t.value.phone,
1430
1433
  purpose: "signUp"
1431
1434
  });
1432
- m.value = !1, K(s.value, h);
1435
+ d.value = !1, W(s.value, y);
1433
1436
  }
1434
1437
  }
1435
- async function u() {
1436
- p.value.validate().then((c) => {
1437
- c || r("submit", {
1438
+ async function p() {
1439
+ u.value.validate().then((m) => {
1440
+ m || c("submit", {
1438
1441
  type: "phone",
1439
1442
  phone: t.value.phone,
1440
1443
  code: t.value.code,
@@ -1443,9 +1446,9 @@ const bt = {
1443
1446
  });
1444
1447
  });
1445
1448
  }
1446
- return (c, h) => (l(), _("div", Jt, [k("div", Xt, [a(e(E), {
1449
+ return (m, y) => (l(), k("div", Qt, [S("div", Jt, [a(e(H), {
1447
1450
  ref_key: "formRef",
1448
- ref: p,
1451
+ ref: u,
1449
1452
  model: t.value,
1450
1453
  size: o.size,
1451
1454
  "auto-label-width": ""
@@ -1464,7 +1467,7 @@ const bt = {
1464
1467
  }, {
1465
1468
  default: f(() => [a(e(U), {
1466
1469
  modelValue: t.value.phone,
1467
- "onUpdate:modelValue": h[0] || (h[0] = (P) => t.value.phone = P),
1470
+ "onUpdate:modelValue": y[0] || (y[0] = (_) => t.value.phone = _),
1468
1471
  placeholder: "请输入手机号",
1469
1472
  autocomplete: "tel",
1470
1473
  type: "tel"
@@ -1479,23 +1482,23 @@ const bt = {
1479
1482
  message: "请输入验证码"
1480
1483
  }]
1481
1484
  }, {
1482
- default: f(() => [k("div", Yt, [a(e(U), {
1485
+ default: f(() => [S("div", Xt, [a(e(U), {
1483
1486
  modelValue: t.value.code,
1484
- "onUpdate:modelValue": h[1] || (h[1] = (P) => t.value.code = P),
1487
+ "onUpdate:modelValue": y[1] || (y[1] = (_) => t.value.code = _),
1485
1488
  placeholder: "请输入验证码",
1486
1489
  autocomplete: "one-time-code"
1487
- }, null, 8, ["modelValue"]), a(j, {
1490
+ }, null, 8, ["modelValue"]), a(K, {
1488
1491
  ref_key: "SendVerifyCodeRef",
1489
1492
  ref: s,
1490
1493
  size: o.size,
1491
- loading: m.value,
1494
+ loading: d.value,
1492
1495
  style: {
1493
1496
  "margin-left": "10px"
1494
1497
  },
1495
1498
  onSend: w
1496
1499
  }, null, 8, ["size", "loading"])])]),
1497
1500
  _: 1
1498
- }), o.requirePassword ? (l(), S(e(V), {
1501
+ }), o.requirePassword ? (l(), I(e(V), {
1499
1502
  key: 0,
1500
1503
  field: "password",
1501
1504
  label: "密码",
@@ -1510,13 +1513,13 @@ const bt = {
1510
1513
  }, {
1511
1514
  default: f(() => [a(e(U), {
1512
1515
  modelValue: t.value.password,
1513
- "onUpdate:modelValue": h[2] || (h[2] = (P) => t.value.password = P),
1516
+ "onUpdate:modelValue": y[2] || (y[2] = (_) => t.value.password = _),
1514
1517
  placeholder: "请输入密码(可选)",
1515
1518
  type: "password",
1516
1519
  autocomplete: "new-password"
1517
1520
  }, null, 8, ["modelValue"])]),
1518
1521
  _: 1
1519
- }, 8, ["rules"])) : I("", !0), o.requirePassword && t.value.password ? (l(), S(e(V), {
1522
+ }, 8, ["rules"])) : z("", !0), o.requirePassword && t.value.password ? (l(), I(e(V), {
1520
1523
  key: 1,
1521
1524
  field: "confirmPassword",
1522
1525
  label: "确认密码",
@@ -1525,13 +1528,13 @@ const bt = {
1525
1528
  }, {
1526
1529
  default: f(() => [a(e(U), {
1527
1530
  modelValue: t.value.confirmPassword,
1528
- "onUpdate:modelValue": h[3] || (h[3] = (P) => t.value.confirmPassword = P),
1531
+ "onUpdate:modelValue": y[3] || (y[3] = (_) => t.value.confirmPassword = _),
1529
1532
  placeholder: "请输入确认密码",
1530
1533
  type: "password",
1531
1534
  autocomplete: "new-password"
1532
1535
  }, null, 8, ["modelValue"])]),
1533
1536
  _: 1
1534
- })) : I("", !0), a(e(V), {
1537
+ })) : z("", !0), a(e(V), {
1535
1538
  field: "inviteCode",
1536
1539
  label: "邀请码",
1537
1540
  "hide-label": "",
@@ -1541,53 +1544,53 @@ const bt = {
1541
1544
  }, {
1542
1545
  default: f(() => [a(e(U), {
1543
1546
  modelValue: t.value.inviteCode,
1544
- "onUpdate:modelValue": h[4] || (h[4] = (P) => t.value.inviteCode = P),
1547
+ "onUpdate:modelValue": y[4] || (y[4] = (_) => t.value.inviteCode = _),
1545
1548
  placeholder: "邀请码(可选)",
1546
1549
  autocomplete: "off"
1547
1550
  }, null, 8, ["modelValue"])]),
1548
1551
  _: 1
1549
- }), k("div", Zt, [a(e(B), {
1552
+ }), S("div", Yt, [a(e(B), {
1550
1553
  type: "primary",
1551
1554
  loading: o.loading,
1552
1555
  long: "",
1553
1556
  size: o.size,
1554
- onClick: u
1557
+ onClick: p
1555
1558
  }, {
1556
- default: f(() => [...h[6] || (h[6] = [x(" 注册 ", -1)])]),
1559
+ default: f(() => [...y[6] || (y[6] = [x(" 注册 ", -1)])]),
1557
1560
  _: 1
1558
- }, 8, ["loading", "size"]), e(y) ? (l(), S(e(V), {
1561
+ }, 8, ["loading", "size"]), e(v) ? (l(), I(e(V), {
1559
1562
  key: 0,
1560
1563
  field: "acceptedTerms",
1561
1564
  "hide-label": "",
1562
- rules: e(v)
1565
+ rules: e(h)
1563
1566
  }, {
1564
1567
  default: f(() => [a(ee, {
1565
1568
  "accepted-terms": t.value.acceptedTerms,
1566
- "onUpdate:acceptedTerms": h[5] || (h[5] = (P) => t.value.acceptedTerms = P),
1569
+ "onUpdate:acceptedTerms": y[5] || (y[5] = (_) => t.value.acceptedTerms = _),
1567
1570
  "current-view": "signUp"
1568
1571
  }, null, 8, ["accepted-terms"])]),
1569
1572
  _: 1
1570
- }, 8, ["rules"])) : I("", !0)])]),
1573
+ }, 8, ["rules"])) : z("", !0)])]),
1571
1574
  _: 1
1572
1575
  }, 8, ["model", "size"])]), a(me, {
1573
1576
  onSwitchSignIn: i
1574
1577
  })]));
1575
1578
  }
1576
- }), ts = /* @__PURE__ */ C(es, [["__scopeId", "data-v-5a25ffa9"]]), ss = {
1579
+ }), es = /* @__PURE__ */ C(Zt, [["__scopeId", "data-v-d0af58fd"]]), ts = {
1577
1580
  class: "SignUp"
1578
- }, as = {
1581
+ }, ss = {
1579
1582
  key: 0,
1580
1583
  class: "tabsContainer"
1581
- }, os = {
1584
+ }, as = {
1582
1585
  key: 1,
1583
1586
  class: "empty"
1584
- }, is = {
1587
+ }, os = {
1585
1588
  key: 2,
1586
1589
  class: "empty"
1587
- }, ns = {
1590
+ }, is = {
1588
1591
  key: 2,
1589
1592
  class: "empty"
1590
- }, ls = /* @__PURE__ */ A({
1593
+ }, ns = /* @__PURE__ */ A({
1591
1594
  __name: "AuthkitSignUp",
1592
1595
  props: {
1593
1596
  size: {
@@ -1602,14 +1605,14 @@ const bt = {
1602
1605
  },
1603
1606
  emits: ["switchSignIn", "submit"],
1604
1607
  setup(b, {
1605
- emit: d
1608
+ emit: r
1606
1609
  }) {
1607
- const r = d, n = b, {
1608
- appsData: y
1609
- } = N(), {
1610
- registrationBlocked: v,
1610
+ const c = r, n = b, {
1611
+ appsData: v
1612
+ } = j(), {
1613
+ registrationBlocked: h,
1611
1614
  signUpAuthEnabled: o
1612
- } = M(), s = T(() => y.value.authMethods), m = T(() => {
1615
+ } = M(), s = R(() => v.value.authMethods), d = R(() => {
1613
1616
  const i = [];
1614
1617
  return s.value.signUp.email && i.push({
1615
1618
  key: "email",
@@ -1618,48 +1621,48 @@ const bt = {
1618
1621
  key: "phone",
1619
1622
  title: "手机号注册"
1620
1623
  }), i;
1621
- }), p = z("email");
1622
- re(() => {
1624
+ }), u = P("email");
1625
+ le(() => {
1623
1626
  var i;
1624
- m.value.some((w) => w.key === p.value) || (p.value = ((i = m.value[0]) == null ? void 0 : i.key) || "email");
1627
+ d.value.some((w) => w.key === u.value) || (u.value = ((i = d.value[0]) == null ? void 0 : i.key) || "email");
1625
1628
  });
1626
1629
  function t() {
1627
- r("switchSignIn");
1630
+ c("switchSignIn");
1628
1631
  }
1629
1632
  async function g(i) {
1630
- r("submit", {
1631
- type: p.value,
1633
+ c("submit", {
1634
+ type: u.value,
1632
1635
  ...i
1633
1636
  });
1634
1637
  }
1635
- return (i, w) => (l(), _("div", ss, [m.value.length > 1 ? (l(), _("div", as, [a(e(ce), {
1636
- "active-key": p.value,
1637
- "onUpdate:activeKey": w[0] || (w[0] = (u) => p.value = u)
1638
+ return (i, w) => (l(), k("div", ts, [d.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
1641
  }, {
1639
- default: f(() => [(l(!0), _(F, null, ue(m.value, (u) => (l(), S(e(pe), {
1640
- key: u.key,
1641
- title: u.title
1642
+ default: f(() => [(l(!0), k(D, null, re(d.value, (p) => (l(), I(e(ce), {
1643
+ key: p.key,
1644
+ title: p.title
1642
1645
  }, null, 8, ["title"]))), 128))]),
1643
1646
  _: 1
1644
- }, 8, ["active-key"])])) : I("", !0), e(o) ? e(v) ? (l(), _("div", is, " 管理员尚未配置用户协议或隐私政策,暂无法注册。 ")) : (l(), _(F, {
1647
+ }, 8, ["active-key"])])) : z("", !0), e(o) ? e(h) ? (l(), k("div", os, " 管理员尚未配置用户协议或隐私政策,暂无法注册。 ")) : (l(), k(D, {
1645
1648
  key: 3
1646
- }, [p.value === "email" && s.value.signUp.email ? (l(), S(Qt, {
1649
+ }, [u.value === "email" && s.value.signUp.email ? (l(), I(Wt, {
1647
1650
  key: 0,
1648
1651
  size: n.size,
1649
1652
  loading: b.loading,
1650
1653
  onSubmit: g
1651
- }, null, 8, ["size", "loading"])) : p.value === "phone" && s.value.signUp.phone ? (l(), S(ts, {
1654
+ }, null, 8, ["size", "loading"])) : u.value === "phone" && s.value.signUp.phone ? (l(), I(es, {
1652
1655
  key: 1,
1653
1656
  size: n.size,
1654
1657
  loading: b.loading,
1655
1658
  onSubmit: g,
1656
1659
  onSwitchSignIn: t
1657
- }, null, 8, ["size", "loading"])) : (l(), _("div", ns, " 当前应用未开放用户注册 ")), p.value === "email" ? (l(), S(me, {
1660
+ }, null, 8, ["size", "loading"])) : (l(), k("div", is, " 当前应用未开放用户注册 ")), u.value === "email" ? (l(), I(me, {
1658
1661
  key: 3,
1659
1662
  onSwitchSignIn: t
1660
- })) : I("", !0)], 64)) : (l(), _("div", os, " 系统已停止用户注册 "))]));
1663
+ })) : z("", !0)], 64)) : (l(), k("div", as, " 系统已停止用户注册 "))]));
1661
1664
  }
1662
- }), rs = /* @__PURE__ */ C(ls, [["__scopeId", "data-v-b211d5ef"]]), us = ["src"], ds = /* @__PURE__ */ A({
1665
+ }), ls = /* @__PURE__ */ C(ns, [["__scopeId", "data-v-b211d5ef"]]), rs = ["src"], us = /* @__PURE__ */ A({
1663
1666
  __name: "AuthkitAuthTitle",
1664
1667
  props: {
1665
1668
  size: {
@@ -1679,31 +1682,31 @@ const bt = {
1679
1682
  }
1680
1683
  },
1681
1684
  setup(b) {
1682
- const d = b, r = `${d.size}px`, n = `${d.fontSize}px`, y = `${d.lineHeight}px`, {
1683
- currentView: v
1684
- } = G(), {
1685
+ const r = b, c = `${r.size}px`, n = `${r.fontSize}px`, v = `${r.lineHeight}px`, {
1686
+ currentView: h
1687
+ } = N(), {
1685
1688
  appsData: o
1686
- } = N(), s = T(() => v.value === "signIn" ? `${o.value.name}登录` : v.value === "signUp" ? `${o.value.name}账号注册` : v.value === "resetPassword" ? `${o.value.name}密码重置` : "");
1687
- return (m, p) => (l(), _("div", {
1689
+ } = j(), s = R(() => h.value === "signIn" ? `${o.value.name}登录` : h.value === "signUp" ? `${o.value.name}账号注册` : h.value === "resetPassword" ? `${o.value.name}密码重置` : "");
1690
+ return (d, u) => (l(), k("div", {
1688
1691
  class: "Title",
1689
- style: H({
1692
+ style: G({
1690
1693
  fontSize: n,
1691
- lineHeight: y
1694
+ lineHeight: v
1692
1695
  })
1693
- }, [e(o).applicationLogoUrl ? (l(), _("img", {
1696
+ }, [e(o).applicationLogoUrl ? (l(), k("img", {
1694
1697
  key: 0,
1695
1698
  src: e(o).applicationLogoUrl,
1696
1699
  srcset: "",
1697
- style: H({
1698
- width: r
1700
+ style: G({
1701
+ width: c
1699
1702
  })
1700
- }, null, 12, us)) : I("", !0), k("span", null, L(s.value), 1), Z(m.$slots, "default", {}, void 0, !0)], 4));
1703
+ }, null, 12, rs)) : z("", !0), S("span", null, L(s.value), 1), Z(d.$slots, "default", {}, void 0, !0)], 4));
1701
1704
  }
1702
- }), Ie = /* @__PURE__ */ C(ds, [["__scopeId", "data-v-8ebe7939"]]), cs = {
1705
+ }), Ie = /* @__PURE__ */ C(us, [["__scopeId", "data-v-8ebe7939"]]), ds = {
1703
1706
  class: "Auth"
1704
- }, ps = {
1707
+ }, cs = {
1705
1708
  class: "body"
1706
- }, ms = /* @__PURE__ */ A({
1709
+ }, ps = /* @__PURE__ */ A({
1707
1710
  __name: "AuthkitAuth",
1708
1711
  props: {
1709
1712
  size: {
@@ -1716,51 +1719,51 @@ const bt = {
1716
1719
  }
1717
1720
  },
1718
1721
  setup(b) {
1719
- const d = b, {
1720
- signInSubmit: r,
1722
+ const r = b, {
1723
+ signInSubmit: c,
1721
1724
  passkeySignInSubmit: n,
1722
- signUpSubmit: y,
1723
- resetPasswordSubmit: v,
1725
+ signUpSubmit: v,
1726
+ resetPasswordSubmit: h,
1724
1727
  currentView: o,
1725
1728
  authSignInLoading: s,
1726
- authSignUpLoading: m,
1727
- resetPasswordLoading: p,
1729
+ authSignUpLoading: d,
1730
+ resetPasswordLoading: u,
1728
1731
  switchSignUp: t,
1729
1732
  switchResetPassword: g,
1730
1733
  switchSignIn: i
1731
- } = G();
1732
- return (w, u) => (l(), _("div", cs, [b.showTitle ? (l(), S(Ie, {
1734
+ } = N();
1735
+ return (w, p) => (l(), k("div", ds, [b.showTitle ? (l(), I(Ie, {
1733
1736
  key: 0,
1734
1737
  size: 32,
1735
1738
  "font-size": 20
1736
- })) : I("", !0), k("div", ps, [e(o) === "signIn" ? (l(), S(Gt, {
1739
+ })) : z("", !0), S("div", cs, [e(o) === "signIn" ? (l(), I(Ht, {
1737
1740
  key: 0,
1738
- size: d.size,
1741
+ size: r.size,
1739
1742
  loading: e(s),
1740
1743
  onSwitchSignUp: e(t),
1741
1744
  onSwitchResetPassword: e(g),
1742
- onSubmit: u[0] || (u[0] = (c) => e(r)(c))
1745
+ onSubmit: p[0] || (p[0] = (m) => e(c)(m))
1743
1746
  }, {
1744
- OAuth: f(() => [a(et, {
1745
- size: d.size,
1747
+ OAuth: f(() => [a(Ze, {
1748
+ size: r.size,
1746
1749
  onPasskeySubmit: e(n)
1747
1750
  }, null, 8, ["size", "onPasskeySubmit"])]),
1748
1751
  _: 1
1749
- }, 8, ["size", "loading", "onSwitchSignUp", "onSwitchResetPassword"])) : e(o) === "signUp" ? (l(), S(rs, {
1752
+ }, 8, ["size", "loading", "onSwitchSignUp", "onSwitchResetPassword"])) : e(o) === "signUp" ? (l(), I(ls, {
1750
1753
  key: 1,
1751
- size: d.size,
1752
- loading: e(m),
1754
+ size: r.size,
1755
+ loading: e(d),
1753
1756
  onSwitchSignIn: e(i),
1754
- onSubmit: u[1] || (u[1] = (c) => e(y)(c))
1755
- }, null, 8, ["size", "loading", "onSwitchSignIn"])) : e(o) === "resetPassword" ? (l(), S(gt, {
1757
+ onSubmit: p[1] || (p[1] = (m) => e(v)(m))
1758
+ }, null, 8, ["size", "loading", "onSwitchSignIn"])) : e(o) === "resetPassword" ? (l(), I(vt, {
1756
1759
  key: 2,
1757
- size: d.size,
1758
- loading: e(p),
1760
+ size: r.size,
1761
+ loading: e(u),
1759
1762
  onSwitchSignIn: e(i),
1760
- onSubmit: u[2] || (u[2] = (c) => e(v)(c))
1761
- }, null, 8, ["size", "loading", "onSwitchSignIn"])) : I("", !0)])]));
1763
+ onSubmit: p[2] || (p[2] = (m) => e(h)(m))
1764
+ }, null, 8, ["size", "loading", "onSwitchSignIn"])) : z("", !0)])]));
1762
1765
  }
1763
- }), fs = /* @__PURE__ */ C(ms, [["__scopeId", "data-v-60874d88"]]), vs = /* @__PURE__ */ A({
1766
+ }), ms = /* @__PURE__ */ C(ps, [["__scopeId", "data-v-60874d88"]]), fs = /* @__PURE__ */ A({
1764
1767
  __name: "AuthkitAuthModal",
1765
1768
  props: {
1766
1769
  size: {
@@ -1769,27 +1772,27 @@ const bt = {
1769
1772
  },
1770
1773
  emits: ["close"],
1771
1774
  setup(b, {
1772
- emit: d
1775
+ emit: r
1773
1776
  }) {
1774
- const r = d, {
1777
+ const c = r, {
1775
1778
  onSignIn: n,
1776
- switchSignIn: y
1777
- } = G(), {
1778
- close: v
1779
+ switchSignIn: v
1780
+ } = N(), {
1781
+ close: h
1779
1782
  } = we();
1780
1783
  let o = null;
1781
- D(() => {
1782
- o = n(() => v());
1783
- }), de(() => {
1784
+ E(() => {
1785
+ o = n(() => h());
1786
+ }), ue(() => {
1784
1787
  o == null || o(), o = null;
1785
1788
  });
1786
- function s(p) {
1787
- p || m();
1789
+ function s(u) {
1790
+ u || d();
1788
1791
  }
1789
- function m() {
1790
- y(), v(), r("close");
1792
+ function d() {
1793
+ v(), h(), c("close");
1791
1794
  }
1792
- return (p, t) => (l(), S(e(Ce), {
1795
+ return (u, t) => (l(), I(e(Ce), {
1793
1796
  visible: !0,
1794
1797
  footer: !1,
1795
1798
  "mask-closable": !1,
@@ -1797,17 +1800,17 @@ const bt = {
1797
1800
  width: "auto",
1798
1801
  "modal-class": "SignInModalClass",
1799
1802
  "onUpdate:visible": s,
1800
- onClose: m
1803
+ onClose: d
1801
1804
  }, {
1802
1805
  title: f(() => [a(Ie)]),
1803
- default: f(() => [a(fs, {
1806
+ default: f(() => [a(ms, {
1804
1807
  "show-title": !1,
1805
1808
  size: b.size
1806
1809
  }, null, 8, ["size"])]),
1807
1810
  _: 1
1808
1811
  }));
1809
1812
  }
1810
- }), gs = /* @__PURE__ */ C(vs, [["__scopeId", "data-v-19a4d5d0"]]), hs = /* @__PURE__ */ A({
1813
+ }), vs = /* @__PURE__ */ C(fs, [["__scopeId", "data-v-19a4d5d0"]]), gs = /* @__PURE__ */ A({
1811
1814
  __name: "AuthkitOAuthCallbackProvider",
1812
1815
  props: {
1813
1816
  bindIdentityRedirect: {
@@ -1823,63 +1826,62 @@ const bt = {
1823
1826
  }
1824
1827
  },
1825
1828
  setup(b) {
1826
- const d = b, r = ["token", "userId", "appId", "error", "needBindIdentity", "bindSuccess", "provider"], {
1829
+ const r = b, c = ["token", "userId", "appId", "error", "needBindIdentity", "bindSuccess", "provider"], {
1827
1830
  completeSignIn: n
1828
- } = G(), {
1829
- fetchUserProfile: y
1830
- } = ie();
1831
- function v(p) {
1832
- return r.some((t) => p.searchParams.has(t));
1833
- }
1834
- function o(p) {
1835
- r.forEach((g) => p.searchParams.delete(g));
1836
- const t = `${p.pathname}${p.search}${p.hash}`;
1831
+ } = N(), {
1832
+ fetchUserProfile: v
1833
+ } = oe();
1834
+ function h(u) {
1835
+ return c.some((t) => u.searchParams.has(t));
1836
+ }
1837
+ function o(u) {
1838
+ c.forEach((g) => u.searchParams.delete(g));
1839
+ const t = `${u.pathname}${u.search}${u.hash}`;
1837
1840
  window.history.replaceState({}, "", t);
1838
1841
  }
1839
1842
  function s() {
1840
- if (!d.restoreRedirectAfterSignIn) return null;
1841
- const p = sessionStorage.getItem("auth_redirect");
1842
- if (sessionStorage.removeItem("auth_redirect"), !p) return null;
1843
+ if (!r.restoreRedirectAfterSignIn) return null;
1844
+ const u = sessionStorage.getItem("auth_redirect");
1845
+ if (sessionStorage.removeItem("auth_redirect"), !u) return null;
1843
1846
  const t = window.location.pathname + window.location.search + window.location.hash;
1844
- return p === t ? null : p;
1847
+ return u === t ? null : u;
1845
1848
  }
1846
- async function m() {
1849
+ async function d() {
1847
1850
  if (typeof window > "u") return;
1848
- const p = new URL(window.location.href);
1849
- if (!v(p)) return;
1850
- const t = p.searchParams.get("error");
1851
+ const u = new URL(window.location.href);
1852
+ if (!h(u)) return;
1853
+ const t = u.searchParams.get("error");
1851
1854
  if (t) {
1852
- o(p), X.error(t);
1855
+ o(u), X.error(t);
1853
1856
  return;
1854
1857
  }
1855
- if (p.searchParams.get("bindSuccess") === "true") {
1856
- const h = p.searchParams.get("provider");
1857
- o(p), await y(), X.success(h ? `${h} 绑定成功` : "绑定成功"), d.closePopupOnBindSuccess && window.opener && setTimeout(() => window.close(), 800);
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);
1858
1861
  return;
1859
1862
  }
1860
- const g = p.searchParams.get("token");
1863
+ const g = u.searchParams.get("token");
1861
1864
  if (!g) return;
1862
- const i = p.searchParams.get("userId"), w = p.searchParams.get("appId"), u = p.searchParams.get("needBindIdentity") === "true";
1863
- if (o(p), n({
1865
+ const i = u.searchParams.get("userId"), w = u.searchParams.get("appId"), p = u.searchParams.get("needBindIdentity") === "true";
1866
+ if (o(u), n({
1864
1867
  jwtToken: g,
1865
1868
  userId: i,
1866
1869
  appId: w,
1867
- needBindIdentity: u
1868
- }), await y(), u && d.bindIdentityRedirect) {
1869
- window.location.href = d.bindIdentityRedirect;
1870
+ needBindIdentity: p
1871
+ }), await v(), p && r.bindIdentityRedirect) {
1872
+ window.location.href = r.bindIdentityRedirect;
1870
1873
  return;
1871
1874
  }
1872
- const c = s();
1873
- c && (window.location.href = c);
1875
+ const m = s();
1876
+ m && (window.location.href = m);
1874
1877
  }
1875
- return D(() => {
1876
- m();
1877
- }), (p, t) => null;
1878
+ return E(() => {
1879
+ d();
1880
+ }), (u, t) => null;
1878
1881
  }
1879
1882
  }), la = /* @__PURE__ */ A({
1880
1883
  __name: "AuthkitProvider",
1881
1884
  props: {
1882
- config: {},
1883
1885
  handleOAuthCallback: {
1884
1886
  type: Boolean,
1885
1887
  default: !0
@@ -1909,76 +1911,70 @@ const bt = {
1909
1911
  restoreRedirectAfterSignIn: {
1910
1912
  type: Boolean,
1911
1913
  default: !0
1912
- },
1913
- legalDocsMode: {
1914
- default: "builtin"
1915
1914
  }
1916
1915
  },
1917
1916
  emits: ["toPrivacyPolicy", "toUserServiceAgreement"],
1918
1917
  setup(b, {
1919
- emit: d
1918
+ emit: r
1920
1919
  }) {
1921
- const r = b, n = d;
1922
- r.config ? qe({
1923
- ...r.config,
1924
- legalDocsMode: r.legalDocsMode
1925
- }) : oe.legalDocsMode = r.legalDocsMode;
1926
- const y = Ae(), {
1927
- openLegalDoc: v
1920
+ const {
1921
+ config: c
1922
+ } = pe(), n = b, v = r, h = Ae(), {
1923
+ openLegalDoc: o
1928
1924
  } = Se({
1929
- route: y
1925
+ route: h
1930
1926
  }), {
1931
- isOpen: o
1927
+ isOpen: s
1932
1928
  } = we(), {
1933
- restoreSession: s,
1934
- onSignIn: m,
1935
- onSignOut: p
1936
- } = G(), {
1937
- fetchUserProfile: t,
1938
- clearUserProfile: g
1939
- } = ie(), {
1940
- appsAuthPageInfoApi: i
1941
- } = N(), w = m(() => {
1942
- t();
1943
- }), u = p(() => {
1929
+ restoreSession: d,
1930
+ onSignIn: u,
1931
+ onSignOut: t
1932
+ } = N(), {
1933
+ fetchUserProfile: g,
1934
+ clearUserProfile: i
1935
+ } = oe(), {
1936
+ appsAuthPageInfoApi: w
1937
+ } = j(), p = u(() => {
1944
1938
  g();
1939
+ }), m = t(() => {
1940
+ i();
1945
1941
  });
1946
- function c() {
1947
- if (r.legalDocsMode === "builtin") {
1948
- v("privacyPolicy");
1942
+ function y() {
1943
+ if (c.legalDocsMode === "builtin") {
1944
+ o("privacyPolicy");
1949
1945
  return;
1950
1946
  }
1951
- n("toPrivacyPolicy");
1947
+ v("toPrivacyPolicy");
1952
1948
  }
1953
- function h() {
1954
- if (r.legalDocsMode === "builtin") {
1955
- v("userServiceAgreement");
1949
+ function _() {
1950
+ if (c.legalDocsMode === "builtin") {
1951
+ o("userServiceAgreement");
1956
1952
  return;
1957
1953
  }
1958
- n("toUserServiceAgreement");
1959
- }
1960
- return D(async () => {
1961
- ht({
1962
- onPrivacyPolicy: c,
1963
- onUserServiceAgreement: h
1964
- }), r.fetchAppInfo && await i(), r.restoreSession && s() ? t() : g();
1965
- }), de(() => {
1966
- w(), u();
1967
- }), (P, q) => (l(), _(F, null, [Z(P.$slots, "default"), r.handleOAuthCallback ? (l(), S(hs, {
1954
+ v("toUserServiceAgreement");
1955
+ }
1956
+ return E(async () => {
1957
+ gt({
1958
+ onPrivacyPolicy: y,
1959
+ onUserServiceAgreement: _
1960
+ }), n.fetchAppInfo && await w(), n.restoreSession && d() ? g() : i();
1961
+ }), ue(() => {
1962
+ p(), m();
1963
+ }), (q, $) => (l(), k(D, null, [Z(q.$slots, "default"), n.handleOAuthCallback ? (l(), I(gs, {
1968
1964
  key: 0,
1969
- "bind-identity-redirect": r.bindIdentityRedirect,
1970
- "close-popup-on-bind-success": r.closePopupOnBindSuccess,
1971
- "restore-redirect-after-sign-in": r.restoreRedirectAfterSignIn
1972
- }, null, 8, ["bind-identity-redirect", "close-popup-on-bind-success", "restore-redirect-after-sign-in"])) : I("", !0), r.showAuthModal && e(o) ? (l(), S(gs, {
1965
+ "bind-identity-redirect": n.bindIdentityRedirect,
1966
+ "close-popup-on-bind-success": n.closePopupOnBindSuccess,
1967
+ "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, {
1973
1969
  key: 1,
1974
- size: r.authModalSize
1975
- }, null, 8, ["size"])) : I("", !0)], 64));
1970
+ size: n.authModalSize
1971
+ }, null, 8, ["size"])) : z("", !0)], 64));
1976
1972
  }
1977
- }), ys = {
1973
+ }), hs = {
1978
1974
  class: "header"
1979
- }, ws = ["href"], bs = {
1975
+ }, ys = ["href"], ws = {
1980
1976
  class: "container"
1981
- }, _s = /* @__PURE__ */ A({
1977
+ }, bs = /* @__PURE__ */ A({
1982
1978
  __name: "AuthkitAuthContainer",
1983
1979
  props: {
1984
1980
  applicationLogoUrl: {
@@ -2021,38 +2017,38 @@ const bt = {
2021
2017
  }
2022
2018
  },
2023
2019
  setup(b) {
2024
- const d = b, r = T(() => d.backgroundType === "color" ? {
2025
- backgroundColor: d.backgroundColor
2020
+ const r = b, c = R(() => r.backgroundType === "color" ? {
2021
+ backgroundColor: r.backgroundColor
2026
2022
  } : {
2027
- backgroundImage: `url(${d.backgroundImage})`
2023
+ backgroundImage: `url(${r.backgroundImage})`
2028
2024
  });
2029
- return (n, y) => (l(), _("div", {
2025
+ return (n, v) => (l(), k("div", {
2030
2026
  class: "auth",
2031
- style: H(r.value)
2032
- }, [k("div", ys, [d.name ? (l(), _("a", {
2027
+ style: G(c.value)
2028
+ }, [S("div", hs, [r.name ? (l(), k("a", {
2033
2029
  key: 0,
2034
- href: d.appHomePage,
2030
+ href: r.appHomePage,
2035
2031
  target: "_self",
2036
2032
  class: "link",
2037
- style: H({
2038
- color: d.linkColor
2033
+ style: G({
2034
+ color: r.linkColor
2039
2035
  })
2040
- }, " 返回主页 ", 12, ws)) : I("", !0)]), k("div", bs, [Z(n.$slots, "default", {}, void 0, !0)])], 4));
2036
+ }, " 返回主页 ", 12, ys)) : z("", !0)]), S("div", ws, [Z(n.$slots, "default", {}, void 0, !0)])], 4));
2041
2037
  }
2042
- }), ra = /* @__PURE__ */ C(_s, [["__scopeId", "data-v-0e13d3ff"]]), ks = {
2038
+ }), ra = /* @__PURE__ */ C(bs, [["__scopeId", "data-v-0e13d3ff"]]), _s = {
2043
2039
  class: "box"
2044
- }, Ss = {
2040
+ }, ks = {
2045
2041
  class: "title"
2046
- }, Is = {
2042
+ }, Ss = {
2047
2043
  class: "content"
2048
- }, zs = {
2044
+ }, Is = {
2049
2045
  class: "redirect"
2050
- }, Ps = {
2046
+ }, zs = {
2051
2047
  style: {
2052
2048
  "font-weight": "bold",
2053
2049
  "font-size": "12px"
2054
2050
  }
2055
- }, Vs = /* @__PURE__ */ A({
2051
+ }, Ps = /* @__PURE__ */ A({
2056
2052
  __name: "AuthkitAuthorize",
2057
2053
  props: {
2058
2054
  size: {
@@ -2101,65 +2097,70 @@ const bt = {
2101
2097
  }
2102
2098
  },
2103
2099
  setup(b) {
2104
- const d = z(!1), r = b, n = z({
2100
+ const r = P(!1), c = b, n = P({
2105
2101
  name: "",
2106
2102
  homePageUrl: "",
2107
2103
  createAt: "",
2108
2104
  authorizationCallback: ""
2109
2105
  });
2110
- async function y() {
2106
+ async function v() {
2111
2107
  const {
2112
- data: o
2113
- } = await O.apps.authPageInfo.post({});
2114
- o && (n.value = {
2108
+ data: o,
2109
+ error: s
2110
+ } = await O().auth.apps.authPageInfo.post({});
2111
+ s || !o || (n.value = {
2115
2112
  name: o.name,
2116
2113
  homePageUrl: o.homePageUrl || "",
2117
2114
  createAt: "",
2118
2115
  authorizationCallback: o.authorizationCallback || ""
2119
2116
  });
2120
2117
  }
2121
- y();
2122
- async function v() {
2123
- d.value = !0;
2118
+ v();
2119
+ async function h() {
2120
+ r.value = !0;
2124
2121
  const {
2125
- data: o
2126
- } = await O.oauth2.authorize.post({
2127
- client_id: r.clientId,
2128
- response_type: r.responseType,
2129
- scope: r.scope,
2130
- state: r.state,
2131
- redirect_uri: r.redirectUri
2122
+ data: o,
2123
+ error: s
2124
+ } = await O().auth.oauth2.authorize.post({
2125
+ client_id: c.clientId,
2126
+ response_type: c.responseType,
2127
+ scope: c.scope,
2128
+ state: c.state,
2129
+ redirect_uri: c.redirectUri
2132
2130
  });
2133
- d.value = !1, o && (window.location = o.authorizeUrl);
2131
+ if (r.value = !1, s || !o)
2132
+ return;
2133
+ const d = o;
2134
+ window.location.href = d.authorizeUrl;
2134
2135
  }
2135
- return (o, s) => (l(), _("div", ks, [k("div", Ss, L(`授权 ${n.value.name}`), 1), k("div", Is, [a(e($e), null, {
2136
- default: f(() => [a(e(ne), null, {
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, {
2137
2138
  default: f(() => {
2138
- var m;
2139
- return [a(e(le), {
2139
+ var d;
2140
+ return [a(e(ne), {
2140
2141
  title: n.value.name,
2141
- description: `想要使用您的${(m = r.userInfo) == null ? void 0 : m.nickname}账户`
2142
+ description: `想要使用您的${(d = c.userInfo) == null ? void 0 : d.nickname}账户`
2142
2143
  }, {
2143
2144
  avatar: f(() => {
2144
- var p;
2145
+ var u;
2145
2146
  return [a(e(te), {
2146
2147
  shape: "square",
2147
- "image-url": (p = r.userInfo) == null ? void 0 : p.avatar
2148
+ "image-url": (u = c.userInfo) == null ? void 0 : u.avatar
2148
2149
  }, null, 8, ["image-url"])];
2149
2150
  }),
2150
2151
  _: 1
2151
2152
  }, 8, ["title", "description"])];
2152
2153
  }),
2153
2154
  _: 1
2154
- }), a(e(ne), null, {
2155
- default: f(() => [a(e(le), {
2155
+ }), a(e(ie), null, {
2156
+ default: f(() => [a(e(ne), {
2156
2157
  title: "公开信息",
2157
2158
  description: "头像、昵称"
2158
2159
  }, {
2159
2160
  avatar: f(() => [a(e(te), {
2160
2161
  shape: "square"
2161
2162
  }, {
2162
- default: f(() => [...s[0] || (s[0] = [k("img", {
2163
+ default: f(() => [...s[0] || (s[0] = [S("img", {
2163
2164
  alt: "avatar",
2164
2165
  src: "https://p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/3ee5f13fb09879ecb5185e440cef6eb9.png~tplv-uwbnlip3yd-webp.webp"
2165
2166
  }, null, -1)])]),
@@ -2168,15 +2169,15 @@ const bt = {
2168
2169
  _: 1
2169
2170
  })]),
2170
2171
  _: 1
2171
- }), a(e(ne), null, {
2172
- default: f(() => [a(e(le), {
2172
+ }), a(e(ie), null, {
2173
+ default: f(() => [a(e(ne), {
2173
2174
  title: "个人用户数据",
2174
2175
  description: "电子邮件地址"
2175
2176
  }, {
2176
2177
  avatar: f(() => [a(e(te), {
2177
2178
  shape: "square"
2178
2179
  }, {
2179
- default: f(() => [...s[1] || (s[1] = [k("img", {
2180
+ default: f(() => [...s[1] || (s[1] = [S("img", {
2180
2181
  alt: "avatar",
2181
2182
  src: "https://p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/3ee5f13fb09879ecb5185e440cef6eb9.png~tplv-uwbnlip3yd-webp.webp"
2182
2183
  }, null, -1)])]),
@@ -2189,28 +2190,28 @@ const bt = {
2189
2190
  _: 1
2190
2191
  }), a(e(B), {
2191
2192
  type: "primary",
2192
- size: r.size,
2193
- loading: d.value,
2194
- onClick: v
2193
+ size: c.size,
2194
+ loading: r.value,
2195
+ onClick: h
2195
2196
  }, {
2196
2197
  default: f(() => [...s[2] || (s[2] = [x(" 授权 ", -1)])]),
2197
2198
  _: 1
2198
- }, 8, ["size", "loading"]), k("div", zs, [s[3] || (s[3] = k("div", {
2199
+ }, 8, ["size", "loading"]), S("div", Is, [s[3] || (s[3] = S("div", {
2199
2200
  class: "redirect-hint"
2200
- }, "授权后将跳转至", -1)), k("div", Ps, L(n.value.authorizationCallback), 1)])])]));
2201
+ }, "授权后将跳转至", -1)), S("div", zs, L(n.value.authorizationCallback), 1)])])]));
2201
2202
  }
2202
- }), ua = /* @__PURE__ */ C(Vs, [["__scopeId", "data-v-8dae1f3a"]]), As = {
2203
+ }), ua = /* @__PURE__ */ C(Ps, [["__scopeId", "data-v-6c1792d3"]]), Vs = {
2203
2204
  class: "oauth-callback"
2204
- }, Us = {
2205
+ }, As = {
2205
2206
  key: 0,
2206
2207
  class: "callback-loading"
2207
- }, Cs = {
2208
+ }, Us = {
2208
2209
  key: 1,
2209
2210
  class: "callback-error"
2210
- }, $s = {
2211
+ }, Cs = {
2211
2212
  key: 2,
2212
2213
  class: "callback-success"
2213
- }, Ts = /* @__PURE__ */ A({
2214
+ }, $s = /* @__PURE__ */ A({
2214
2215
  __name: "AuthkitOauthCallback",
2215
2216
  props: {
2216
2217
  defaultRedirect: {},
@@ -2219,99 +2220,99 @@ const bt = {
2219
2220
  },
2220
2221
  emits: ["success", "error", "needBindIdentity"],
2221
2222
  setup(b, {
2222
- emit: d
2223
+ emit: r
2223
2224
  }) {
2224
- const r = b, n = d, y = z(!0), v = z(""), o = z("登录成功,正在跳转..."), {
2225
+ const c = b, n = r, v = P(!0), h = P(""), o = P("登录成功,正在跳转..."), {
2225
2226
  completeSignIn: s,
2226
- restoreSession: m
2227
- } = G(), {
2228
- fetchUserProfile: p
2229
- } = ie();
2227
+ restoreSession: d
2228
+ } = N(), {
2229
+ fetchUserProfile: u
2230
+ } = oe();
2230
2231
  async function t() {
2231
2232
  const i = new URLSearchParams(window.location.search), w = i.get("error");
2232
2233
  if (w) {
2233
- v.value = w, y.value = !1, n("error", v.value);
2234
+ h.value = w, v.value = !1, n("error", h.value);
2234
2235
  return;
2235
2236
  }
2236
2237
  if (i.get("bindSuccess") === "true") {
2237
- o.value = "绑定成功,可以关闭此页面", window.history.replaceState({}, "", window.location.pathname), y.value = !1, setTimeout(() => {
2238
+ o.value = "绑定成功,可以关闭此页面", window.history.replaceState({}, "", window.location.pathname), v.value = !1, setTimeout(() => {
2238
2239
  window.close();
2239
2240
  }, 800);
2240
2241
  return;
2241
2242
  }
2242
- const u = i.get("token"), c = i.get("userId"), h = i.get("appId"), P = i.get("needBindIdentity") === "true";
2243
- if (!u) {
2244
- v.value = "登录失败:未收到认证令牌", y.value = !1, n("error", v.value);
2243
+ const p = i.get("token"), m = i.get("userId"), y = i.get("appId"), _ = i.get("needBindIdentity") === "true";
2244
+ if (!p) {
2245
+ h.value = "登录失败:未收到认证令牌", v.value = !1, n("error", h.value);
2245
2246
  return;
2246
2247
  }
2247
2248
  try {
2248
2249
  s({
2249
- jwtToken: u,
2250
- userId: c,
2251
- appId: h,
2252
- needBindIdentity: P
2253
- }), await p();
2250
+ jwtToken: p,
2251
+ userId: m,
2252
+ appId: y,
2253
+ needBindIdentity: _
2254
+ }), await u();
2254
2255
  const q = window.location.pathname;
2255
- if (window.history.replaceState({}, "", q), P && (n("needBindIdentity", {
2256
- token: u,
2257
- userId: c || "",
2258
- appId: h || ""
2259
- }), r.bindIdentityRedirect)) {
2260
- y.value = !1, setTimeout(() => {
2261
- window.location.href = r.bindIdentityRedirect;
2256
+ if (window.history.replaceState({}, "", q), _ && (n("needBindIdentity", {
2257
+ token: p,
2258
+ userId: m || "",
2259
+ appId: y || ""
2260
+ }), c.bindIdentityRedirect)) {
2261
+ v.value = !1, setTimeout(() => {
2262
+ window.location.href = c.bindIdentityRedirect;
2262
2263
  }, 300);
2263
2264
  return;
2264
2265
  }
2265
2266
  n("success", {
2266
- token: u,
2267
- userId: c || "",
2268
- appId: h || "",
2269
- needBindIdentity: P
2267
+ token: p,
2268
+ userId: m || "",
2269
+ appId: y || "",
2270
+ needBindIdentity: _
2270
2271
  });
2271
2272
  const $ = sessionStorage.getItem("auth_redirect");
2272
2273
  sessionStorage.removeItem("auth_redirect");
2273
- const R = $ || r.defaultRedirect || "/";
2274
- y.value = !1, setTimeout(() => {
2275
- window.location.href = R;
2274
+ const T = $ || c.defaultRedirect || "/";
2275
+ v.value = !1, setTimeout(() => {
2276
+ window.location.href = T;
2276
2277
  }, 500);
2277
2278
  } catch (q) {
2278
- console.error("OAuth 回调处理失败:", q), v.value = "登录处理失败,请重试", y.value = !1, n("error", v.value);
2279
+ console.error("OAuth 回调处理失败:", q), h.value = "登录处理失败,请重试", v.value = !1, n("error", h.value);
2279
2280
  }
2280
2281
  }
2281
2282
  function g() {
2282
2283
  const i = sessionStorage.getItem("auth_redirect");
2283
- sessionStorage.removeItem("auth_redirect"), window.location.href = i || r.defaultRedirect || "/";
2284
+ sessionStorage.removeItem("auth_redirect"), window.location.href = i || c.defaultRedirect || "/";
2284
2285
  }
2285
- return D(() => {
2286
+ return E(() => {
2286
2287
  const i = new URLSearchParams(window.location.search);
2287
2288
  if (i.has("token") || i.has("error") || i.has("bindSuccess"))
2288
2289
  t();
2289
- else if (m()) {
2290
+ else if (d()) {
2290
2291
  const w = sessionStorage.getItem("auth_redirect");
2291
- sessionStorage.removeItem("auth_redirect"), window.location.href = w || r.defaultRedirect || "/";
2292
+ sessionStorage.removeItem("auth_redirect"), window.location.href = w || c.defaultRedirect || "/";
2292
2293
  } else
2293
- v.value = "无效的访问", y.value = !1;
2294
- }), (i, w) => (l(), _("div", As, [y.value ? (l(), _("div", Us, [w[0] || (w[0] = k("div", {
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", {
2295
2296
  class: "spinner"
2296
- }, null, -1)), k("p", null, L(b.loadingText), 1)])) : v.value ? (l(), _("div", Cs, [w[1] || (w[1] = k("div", {
2297
+ }, null, -1)), S("p", null, L(b.loadingText), 1)])) : h.value ? (l(), k("div", Us, [w[1] || (w[1] = S("div", {
2297
2298
  class: "error-icon"
2298
- }, "✕", -1)), w[2] || (w[2] = k("h2", null, "登录失败", -1)), k("p", null, L(v.value), 1), k("button", {
2299
+ }, "✕", -1)), w[2] || (w[2] = S("h2", null, "登录失败", -1)), S("p", null, L(h.value), 1), S("button", {
2299
2300
  class: "retry-btn",
2300
2301
  onClick: g
2301
- }, "返回重试")])) : (l(), _("div", $s, [w[3] || (w[3] = k("div", {
2302
+ }, "返回重试")])) : (l(), k("div", Cs, [w[3] || (w[3] = S("div", {
2302
2303
  class: "success-icon"
2303
- }, "✓", -1)), k("p", null, L(o.value), 1)]))]));
2304
+ }, "✓", -1)), S("p", null, L(o.value), 1)]))]));
2304
2305
  }
2305
- }), da = /* @__PURE__ */ C(Ts, [["__scopeId", "data-v-4b4b59a1"]]), Rs = {
2306
+ }), da = /* @__PURE__ */ C($s, [["__scopeId", "data-v-4b4b59a1"]]), Ts = {
2306
2307
  class: "oauth-binding-account"
2307
- }, qs = {
2308
+ }, Rs = {
2308
2309
  key: 1,
2309
2310
  class: "oauth-binding-account__icon"
2310
- }, xs = {
2311
+ }, qs = {
2311
2312
  class: "oauth-binding-account__info"
2312
- }, Ls = {
2313
+ }, xs = {
2313
2314
  class: "oauth-binding-account__name"
2314
- }, Bs = /* @__PURE__ */ A({
2315
+ }, Ls = /* @__PURE__ */ A({
2315
2316
  __name: "AuthkitGithubBinding",
2316
2317
  props: {
2317
2318
  size: {
@@ -2321,181 +2322,179 @@ const bt = {
2321
2322
  },
2322
2323
  setup(b) {
2323
2324
  const {
2324
- userProfile: d,
2325
- fetchUserProfile: r
2326
- } = ie(), n = z("hidden"), y = z(!1);
2327
- let v;
2328
- const o = b, s = T(() => {
2329
- var u, c, h;
2330
- return ((c = (u = d.value) == null ? void 0 : u.github) == null ? void 0 : c.avatar_url) || ((h = d.value) == null ? void 0 : h.avatar) || "";
2325
+ config: r
2326
+ } = pe(), {
2327
+ userProfile: c,
2328
+ fetchUserProfile: n
2329
+ } = oe(), v = P("hidden"), h = P(!1);
2330
+ let o;
2331
+ const s = b, d = R(() => {
2332
+ var m, y, _;
2333
+ return ((y = (m = c.value) == null ? void 0 : m.github) == null ? void 0 : y.avatar_url) || ((_ = c.value) == null ? void 0 : _.avatar) || "";
2331
2334
  }), {
2332
- getOauthCallbackUrl: m
2335
+ getOauthCallbackUrl: u
2333
2336
  } = _e();
2334
- function p(u) {
2335
- n.value = u;
2337
+ function t(m) {
2338
+ v.value = m;
2336
2339
  }
2337
- async function t() {
2338
- const u = oe.appId;
2339
- if (!u) {
2340
+ async function g() {
2341
+ const m = r.appId;
2342
+ if (!m) {
2340
2343
  console.error("GitHub OAuth 失败: appId 未配置");
2341
2344
  return;
2342
2345
  }
2343
2346
  const {
2344
- data: c
2345
- } = await O.oauth.github.login.get({
2346
- appId: u,
2347
+ data: y,
2348
+ error: _
2349
+ } = await O().auth.oauth.github.login.get({
2350
+ appId: m,
2347
2351
  mode: "bind",
2348
- redirectUri: m()
2352
+ redirectUri: u()
2349
2353
  });
2350
- if (c) {
2351
- const {
2352
- redirectUri: h
2353
- } = c;
2354
- y.value = !0, window.open(h, "_blank");
2355
- }
2354
+ _ || !y || (h.value = !0, window.open(y.redirectUri, "_blank"));
2356
2355
  }
2357
- async function g() {
2356
+ async function i() {
2358
2357
  const {
2359
- error: u
2360
- } = await O.users.unbind.oauth.post({
2358
+ error: m
2359
+ } = await O().auth.users.unbind.oauth.post({
2361
2360
  provider: "github"
2362
2361
  });
2363
- u || (X.success("解绑成功"), n.value = "hidden", r());
2364
- }
2365
- function i() {
2366
- n.value === "bind" && (n.value = "hidden", t()), n.value === "unbind" && g();
2362
+ m || (X.success("解绑成功"), v.value = "hidden", n());
2367
2363
  }
2368
2364
  function w() {
2369
- y.value && r();
2370
- }
2371
- return D(() => {
2372
- d.value || r(), v = setInterval(w, 1e3);
2373
- }), de(() => {
2374
- v && clearInterval(v);
2375
- }), (u, c) => {
2376
- var h, P, q;
2377
- return l(), _(F, null, [!((h = e(d)) != null && h.github) && n.value === "hidden" ? (l(), S(e(fe), {
2365
+ v.value === "bind" && (v.value = "hidden", g()), v.value === "unbind" && i();
2366
+ }
2367
+ function p() {
2368
+ h.value && n();
2369
+ }
2370
+ return E(() => {
2371
+ c.value || n(), o = setInterval(p, 1e3);
2372
+ }), ue(() => {
2373
+ o && clearInterval(o);
2374
+ }), (m, y) => {
2375
+ var _, q, $;
2376
+ return l(), k(D, null, [!((_ = e(c)) != null && _.github) && v.value === "hidden" ? (l(), I(e(fe), {
2378
2377
  key: 0,
2379
2378
  title: "绑定GitHub"
2380
2379
  }, {
2381
2380
  action: f(() => [a(e(B), {
2382
- size: o.size,
2381
+ size: s.size,
2383
2382
  type: "primary",
2384
- onClick: c[0] || (c[0] = ($) => p("bind"))
2383
+ onClick: y[0] || (y[0] = (T) => t("bind"))
2385
2384
  }, {
2386
- default: f(() => [...c[2] || (c[2] = [x(" 绑定GitHub ", -1)])]),
2385
+ default: f(() => [...y[2] || (y[2] = [x(" 绑定GitHub ", -1)])]),
2387
2386
  _: 1
2388
2387
  }, 8, ["size"])]),
2389
- default: f(() => [c[3] || (c[3] = x(" 您还未绑定GitHub账号,请点击绑定。 ", -1))]),
2388
+ default: f(() => [y[3] || (y[3] = x(" 您还未绑定GitHub账号,请点击绑定。 ", -1))]),
2390
2389
  _: 1
2391
- })) : I("", !0), (P = e(d)) != null && P.github && n.value === "hidden" ? (l(), S(e(fe), {
2390
+ })) : z("", !0), (q = e(c)) != null && q.github && v.value === "hidden" ? (l(), I(e(fe), {
2392
2391
  key: 1,
2393
2392
  title: "解绑GitHub"
2394
2393
  }, {
2395
2394
  action: f(() => [a(e(B), {
2396
- size: o.size,
2395
+ size: s.size,
2397
2396
  type: "primary",
2398
- onClick: c[1] || (c[1] = ($) => p("unbind"))
2397
+ onClick: y[1] || (y[1] = (T) => t("unbind"))
2399
2398
  }, {
2400
- default: f(() => [...c[5] || (c[5] = [x(" 解绑GitHub ", -1)])]),
2399
+ default: f(() => [...y[5] || (y[5] = [x(" 解绑GitHub ", -1)])]),
2401
2400
  _: 1
2402
2401
  }, 8, ["size"])]),
2403
2402
  default: f(() => {
2404
- var $, R;
2405
- return [k("div", Rs, [s.value ? (l(), S(e(te), {
2403
+ var T, F;
2404
+ return [S("div", Ts, [d.value ? (l(), I(e(te), {
2406
2405
  key: 0,
2407
2406
  class: "oauth-binding-account__avatar",
2408
- "image-url": s.value,
2407
+ "image-url": d.value,
2409
2408
  size: 42
2410
- }, null, 8, ["image-url"])) : (l(), _("div", qs, [a(be, {
2409
+ }, null, 8, ["image-url"])) : (l(), k("div", Rs, [a(be, {
2411
2410
  icon: e(J).github,
2412
- size: e(Fe),
2411
+ size: e(Me),
2413
2412
  alt: "GitHub"
2414
- }, null, 8, ["icon", "size"])])), k("div", xs, [c[4] || (c[4] = k("div", {
2413
+ }, null, 8, ["icon", "size"])])), S("div", qs, [y[4] || (y[4] = S("div", {
2415
2414
  class: "oauth-binding-account__provider"
2416
- }, "GitHub", -1)), k("div", Ls, L(((R = ($ = e(d)) == null ? void 0 : $.github) == null ? void 0 : R.login) || "GitHub"), 1)])])];
2415
+ }, "GitHub", -1)), S("div", xs, L(((F = (T = e(c)) == null ? void 0 : T.github) == null ? void 0 : F.login) || "GitHub"), 1)])])];
2417
2416
  }),
2418
2417
  _: 1
2419
- })) : I("", !0), n.value === "bind" || n.value === "unbind" ? (l(), S(De, {
2418
+ })) : z("", !0), v.value === "bind" || v.value === "unbind" ? (l(), I(Fe, {
2420
2419
  key: 2,
2421
- size: o.size,
2422
- email: (q = e(d)) == null ? void 0 : q.email,
2423
- onNext: i
2424
- }, null, 8, ["size", "email"])) : I("", !0)], 64);
2420
+ size: s.size,
2421
+ email: ($ = e(c)) == null ? void 0 : $.email,
2422
+ onNext: w
2423
+ }, null, 8, ["size", "email"])) : z("", !0)], 64);
2425
2424
  };
2426
2425
  }
2427
- }), ca = /* @__PURE__ */ C(Bs, [["__scopeId", "data-v-6c9b86d5"]]), Os = /* @__PURE__ */ A({
2426
+ }), ca = /* @__PURE__ */ C(Ls, [["__scopeId", "data-v-4f673706"]]), Bs = /* @__PURE__ */ A({
2428
2427
  __name: "LegalDocViewer",
2429
2428
  props: {
2430
2429
  type: {},
2431
2430
  appId: {}
2432
2431
  },
2433
2432
  setup(b) {
2434
- const d = b, r = T(() => Ee[d.type] ?? ""), n = z(!1), y = z(null);
2435
- async function v() {
2436
- if (!d.type || !d.appId) {
2437
- y.value = null;
2433
+ const r = b, c = R(() => De[r.type] ?? ""), n = P(!1), v = P(null);
2434
+ async function h() {
2435
+ if (!r.type || !r.appId) {
2436
+ v.value = null;
2438
2437
  return;
2439
2438
  }
2440
2439
  n.value = !0;
2441
- const o = await je(d.appId);
2440
+ const o = await Ne(r.appId);
2442
2441
  if (n.value = !1, !o) {
2443
- y.value = null;
2442
+ v.value = null;
2444
2443
  return;
2445
2444
  }
2446
- const s = o[d.type];
2447
- y.value = He(s) ? s : null;
2445
+ const s = o[r.type];
2446
+ v.value = Ee(s) ? s : null;
2448
2447
  }
2449
- return ye(() => [d.type, d.appId], () => {
2450
- v();
2448
+ return ye(() => [r.type, r.appId], () => {
2449
+ h();
2451
2450
  }, {
2452
2451
  immediate: !0
2453
- }), (o, s) => n.value ? (l(), S(e(Te), {
2452
+ }), (o, s) => n.value ? (l(), I(e(Te), {
2454
2453
  key: 0,
2455
2454
  loading: n.value,
2456
2455
  class: "legal-doc-viewer-loading"
2457
- }, null, 8, ["loading"])) : y.value ? (l(), S(e(Ge), {
2456
+ }, null, 8, ["loading"])) : v.value ? (l(), I(e(He), {
2458
2457
  key: 2,
2459
- modelValue: y.value,
2460
- "onUpdate:modelValue": s[1] || (s[1] = (m) => y.value = m),
2458
+ modelValue: v.value,
2459
+ "onUpdate:modelValue": s[1] || (s[1] = (d) => v.value = d),
2461
2460
  editable: !1
2462
2461
  }, {
2463
- title: f(() => [a(e(Ne), {
2464
- modelValue: r.value,
2465
- "onUpdate:modelValue": s[0] || (s[0] = (m) => r.value = m),
2462
+ title: f(() => [a(e(Ge), {
2463
+ modelValue: c.value,
2464
+ "onUpdate:modelValue": s[0] || (s[0] = (d) => c.value = d),
2466
2465
  editable: !1,
2467
2466
  class: "legal-doc-viewer-title"
2468
2467
  }, null, 8, ["modelValue"])]),
2469
2468
  _: 1
2470
- }, 8, ["modelValue"])) : (l(), S(e(Re), {
2469
+ }, 8, ["modelValue"])) : (l(), I(e(Re), {
2471
2470
  key: 1,
2472
2471
  description: "暂无内容"
2473
2472
  }));
2474
2473
  }
2475
- }), pa = /* @__PURE__ */ C(Os, [["__scopeId", "data-v-fe9a3621"]]);
2474
+ }), pa = /* @__PURE__ */ C(Bs, [["__scopeId", "data-v-fe9a3621"]]);
2476
2475
  export {
2477
- fs as A,
2478
- Qt as E,
2476
+ ms as A,
2477
+ Wt as E,
2479
2478
  pa as L,
2480
2479
  Q as O,
2481
- zt as P,
2482
- gt as R,
2480
+ It as P,
2481
+ vt as R,
2483
2482
  ee as S,
2484
- hs as _,
2483
+ gs as _,
2485
2484
  ra as a,
2486
- gs as b,
2485
+ vs as b,
2487
2486
  Ie as c,
2488
2487
  ua as d,
2489
2488
  ca as e,
2490
2489
  da as f,
2491
- et as g,
2492
- it as h,
2493
- ut as i,
2490
+ Ze as g,
2491
+ ot as h,
2492
+ rt as i,
2494
2493
  la as j,
2495
- Gt as k,
2496
- $t as l,
2497
- rs as m,
2498
- ts as n,
2494
+ Ht as k,
2495
+ Ct as l,
2496
+ ls as m,
2497
+ es as n,
2499
2498
  me as o,
2500
- Ft as p
2499
+ Mt as p
2501
2500
  };