@huyooo/ui 2.0.12 → 2.1.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.
@@ -1,20 +1,20 @@
1
- import { defineComponent as C, computed as R, openBlock as n, createElementBlock as S, normalizeStyle as H, normalizeClass as ye, renderSlot as Q, createBlock as z, unref as e, createCommentVNode as A, ref as I, watch as ne, createElementVNode as k, createVNode as i, withCtx as p, createTextVNode as T, watchEffect as re, Fragment as F, renderList as ue, useModel as Ue, toDisplayString as B, mergeModels as $e, useSlots as Re, onMounted as M, onUnmounted as de, Teleport as Te } from "vue";
2
- import { useRouter as be, useRoute as qe } from "vue-router";
1
+ import { defineComponent as V, computed as $, openBlock as o, createElementBlock as S, normalizeStyle as G, normalizeClass as ye, renderSlot as Z, createBlock as z, unref as e, createCommentVNode as I, createElementVNode as _, ref as A, createVNode as i, withCtx as c, createTextVNode as q, watchEffect as re, Fragment as D, renderList as ue, useModel as Ue, watch as be, toDisplayString as M, mergeModels as $e, useSlots as Re, onMounted as H, onUnmounted as de, Teleport as Te } from "vue";
2
+ import { useRouter as we, useRoute as qe } from "vue-router";
3
3
  /* empty css */
4
4
  /* empty css */
5
5
  import "./userMenuModal-D-nDaYqM.js";
6
- import { Form as D, FormItem as P, Input as V, Button as O, Link as J, Tabs as ce, TabPane as pe, Checkbox as Oe, Modal as xe, Message as le, List as Be, ListItem as ie, ListItemMeta as ae, Avatar as ee, Alert as ve, Spin as Le, Empty as Fe } from "@arco-design/web-vue";
7
- import { a as L, u as G } from "./useAuthkitAuth-cHrJMM8E.js";
8
- import { g as x, u as we } from "./apiClients-Ctcq8NZs.js";
9
- import { u as N } from "./useAuthkitAppsAuthPageInfo-DZ1p-P3Q.js";
10
- import { o as ge, j as Me, k as he, l as _e, u as De, m as Ee, n as K, i as ke, p as He, S as j, q as W, r as Se, s as ze, t as oe, v as Ge, w as Ne, b as je } from "./AuthkitAppSetting-Dgxd5GMR.js";
6
+ import { Message as ae, Form as E, FormItem as P, Input as C, Button as L, Link as Y, Tabs as ce, TabPane as pe, Checkbox as Oe, Modal as xe, List as Le, ListItem as oe, ListItemMeta as le, Avatar as te, Alert as ve, Spin as Be, Empty as Me } from "@arco-design/web-vue";
7
+ import { a as F, u as N } from "./useAuthkitAuth-cHrJMM8E.js";
8
+ import { g as B, u as _e } from "./apiClients-Ctcq8NZs.js";
9
+ import { u as j } from "./useAuthkitAppsAuthPageInfo-DZ1p-P3Q.js";
10
+ import { o as ge, j as Fe, k as he, l as ke, u as De, m as He, n as X, p as Ee, i as Se, S as W, q as K, r as ze, s as Ie, t as ne, v as Ge, w as Ne, b as je } from "./AuthkitAppSetting-1FsF45E3.js";
11
11
  import { _ as U } from "./_plugin-vue_export-helper-CHgC5LLL.js";
12
12
  /* empty css */
13
13
  import "./index-Cn6LcfZO.js";
14
14
  /* empty css */
15
- import { u as Ie, L as We, i as Ke } from "./useLegalDocs-C4qk5CTb.js";
15
+ import { u as Ae, L as We, i as Ke } from "./useLegalDocs-C4qk5CTb.js";
16
16
  import { u as me } from "./runtime-Dp7MgwhI.js";
17
- import { u as Ae } from "./useAuthkitUsersProfile-8FzLTfUJ.js";
17
+ import { u as Pe } from "./useAuthkitUsersProfile-8FzLTfUJ.js";
18
18
  /* empty css */
19
19
  /* empty css */
20
20
  import "./CustomTable-HDwqEcmB.js";
@@ -24,7 +24,7 @@ import { f as Xe } from "./fetchAuthPageAboutUs-DV7ArpNZ.js";
24
24
  const Ye = ["title", "aria-label", "disabled"], Ze = {
25
25
  key: 0,
26
26
  class: "OAuthItem__spinner"
27
- }, et = /* @__PURE__ */ C({
27
+ }, et = /* @__PURE__ */ V({
28
28
  __name: "AuthkitOauthItem",
29
29
  props: {
30
30
  size: {
@@ -48,36 +48,36 @@ const Ye = ["title", "aria-label", "disabled"], Ze = {
48
48
  default: !1
49
49
  }
50
50
  },
51
- setup(w) {
52
- const r = w, u = R(() => ({
51
+ setup(b) {
52
+ const u = b, n = $(() => ({
53
53
  width: `${he}px`,
54
54
  height: `${he}px`,
55
- padding: `${Me}px`,
55
+ padding: `${Fe}px`,
56
56
  "--oauth-icon-size": `${ge}px`
57
57
  }));
58
- return (o, h) => (n(), S("button", {
58
+ return (r, h) => (o(), S("button", {
59
59
  class: ye(["OAuthItem", {
60
- "OAuthItem--loading": r.loading
60
+ "OAuthItem--loading": u.loading
61
61
  }]),
62
62
  type: "button",
63
- title: r.label,
64
- "aria-label": r.label,
65
- disabled: r.disabled || r.loading,
66
- style: H(u.value)
67
- }, [r.loading ? (n(), S("span", Ze)) : Q(o.$slots, "icon", {
63
+ title: u.label,
64
+ "aria-label": u.label,
65
+ disabled: u.disabled || u.loading,
66
+ style: G(n.value)
67
+ }, [u.loading ? (o(), S("span", Ze)) : Z(r.$slots, "icon", {
68
68
  key: 1
69
- }, () => [r.icon ? (n(), z(_e, {
69
+ }, () => [u.icon ? (o(), z(ke, {
70
70
  key: 0,
71
- icon: r.icon,
71
+ icon: u.icon,
72
72
  size: e(ge)
73
- }, null, 8, ["icon", "size"])) : A("", !0)], !0)], 14, Ye));
73
+ }, null, 8, ["icon", "size"])) : I("", !0)], !0)], 14, Ye));
74
74
  }
75
- }), Z = /* @__PURE__ */ U(et, [["__scopeId", "data-v-e00c1d80"]]), tt = {
75
+ }), Q = /* @__PURE__ */ U(et, [["__scopeId", "data-v-e00c1d80"]]), tt = {
76
76
  class: "OAuthList"
77
77
  }, st = {
78
78
  key: 0,
79
79
  class: "OAuthDivider"
80
- }, it = /* @__PURE__ */ C({
80
+ }, it = /* @__PURE__ */ V({
81
81
  __name: "AuthkitOauthList",
82
82
  props: {
83
83
  size: {
@@ -86,95 +86,90 @@ const Ye = ["title", "aria-label", "disabled"], Ze = {
86
86
  }
87
87
  },
88
88
  emits: ["passkeySubmit"],
89
- setup(w, {
90
- emit: r
89
+ setup(b, {
90
+ emit: u
91
91
  }) {
92
- const u = r, {
93
- appsData: o
94
- } = N(), {
95
- loginWithPasskey: h
92
+ const {
93
+ appsData: n
94
+ } = j(), {
95
+ githubAuth: r,
96
+ googleAuth: h,
97
+ microsoftAuth: g,
98
+ wechatAuth: a
99
+ } = Se(), {
100
+ loading: s,
101
+ supported: d,
102
+ loginWithPasskey: v,
103
+ formatError: t,
104
+ getPasskeyEnvironmentIssue: p
96
105
  } = De(), {
97
- githubAuth: g,
98
- googleAuth: a,
99
- microsoftAuth: s,
100
- wechatAuth: d
101
- } = ke(), {
102
- acceptedTerms: f,
103
- ensureTermsAcceptedForSignIn: t
104
- } = L();
105
- function c(y) {
106
- t() && y({
107
- acceptedTerms: f.value ? !0 : void 0
106
+ acceptedTerms: l,
107
+ ensureTermsAcceptedForSignIn: w
108
+ } = F(), m = u;
109
+ function f(R) {
110
+ w() && R({
111
+ acceptedTerms: l.value ? !0 : void 0
108
112
  });
109
113
  }
110
- const l = w, _ = R(() => {
111
- const y = o.value.oauth;
112
- return y.google.enabled || y.microsoft.enabled || y.github.enabled || y.wechat.enabled;
113
- }), m = I(!1);
114
- async function b() {
115
- const y = He();
116
- if (y) {
117
- console.info(`[Passkey] ${y}`);
118
- return;
119
- }
120
- try {
121
- const v = await h(void 0, {
122
- useBrowserAutofill: !0,
123
- beforeVerify: t
124
- });
125
- if (!v)
126
- return;
127
- u("passkeySubmit", v);
128
- } catch (v) {
129
- if (v instanceof Error && (v.name === "AbortError" || v.name === "NotAllowedError")) {
130
- console.info(`[Passkey] ${v.message}`);
131
- return;
114
+ async function y() {
115
+ if (w())
116
+ try {
117
+ const R = await v();
118
+ R && m("passkeySubmit", R);
119
+ } catch (R) {
120
+ ae.error(t(R));
132
121
  }
133
- console.warn("[Passkey] 条件式登录初始化失败", v);
134
- }
135
122
  }
136
- return ne(() => o.value.authMethods.login.passkey, (y) => {
137
- !y || m.value || (m.value = !0, b());
138
- }, {
139
- immediate: !0
140
- }), (y, v) => (n(), S("div", tt, [_.value ? (n(), S("div", st, [...v[4] || (v[4] = [k("span", null, "其他登录方式", -1)])])) : A("", !0), k("div", {
123
+ const k = b, T = $(() => {
124
+ const R = n.value.oauth;
125
+ return R.google.enabled || R.microsoft.enabled || R.github.enabled || R.wechat.enabled || n.value.authMethods.login.passkey;
126
+ }), x = $(() => d ? "Passkey" : p() || "Passkey 不可用");
127
+ return (R, O) => (o(), S("div", tt, [T.value ? (o(), S("div", st, [...O[4] || (O[4] = [_("span", null, "其他登录方式", -1)])])) : I("", !0), _("div", {
141
128
  class: "OAuthIcons",
142
- style: H({
143
- gap: `${e(Ee)}px`
129
+ style: G({
130
+ gap: `${e(He)}px`
144
131
  })
145
- }, [e(o).oauth.google.enabled ? (n(), z(Z, {
132
+ }, [e(n).oauth.google.enabled ? (o(), z(Q, {
146
133
  key: 0,
147
- icon: e(K).google,
134
+ icon: e(X).google,
148
135
  label: "Google",
149
- size: l.size,
150
- onClick: v[0] || (v[0] = ($) => c(e(a)))
151
- }, null, 8, ["icon", "size"])) : A("", !0), e(o).oauth.github.enabled ? (n(), z(Z, {
136
+ size: k.size,
137
+ onClick: O[0] || (O[0] = (J) => f(e(h)))
138
+ }, null, 8, ["icon", "size"])) : I("", !0), e(n).oauth.github.enabled ? (o(), z(Q, {
152
139
  key: 1,
153
- icon: e(K).github,
140
+ icon: e(X).github,
154
141
  label: "Github",
155
- size: l.size,
156
- onClick: v[1] || (v[1] = ($) => c(e(g)))
157
- }, null, 8, ["icon", "size"])) : A("", !0), e(o).oauth.microsoft.enabled ? (n(), z(Z, {
142
+ size: k.size,
143
+ onClick: O[1] || (O[1] = (J) => f(e(r)))
144
+ }, null, 8, ["icon", "size"])) : I("", !0), e(n).oauth.microsoft.enabled ? (o(), z(Q, {
158
145
  key: 2,
159
- icon: e(K).microsoft,
146
+ icon: e(X).microsoft,
160
147
  label: "Microsoft",
161
- size: l.size,
162
- onClick: v[2] || (v[2] = ($) => c(e(s)))
163
- }, null, 8, ["icon", "size"])) : A("", !0), e(o).oauth.wechat.enabled ? (n(), z(Z, {
148
+ size: k.size,
149
+ onClick: O[2] || (O[2] = (J) => f(e(g)))
150
+ }, null, 8, ["icon", "size"])) : I("", !0), e(n).oauth.wechat.enabled ? (o(), z(Q, {
164
151
  key: 3,
165
- icon: e(K).wechat,
152
+ icon: e(X).wechat,
166
153
  label: "微信",
167
- size: l.size,
168
- onClick: v[3] || (v[3] = ($) => c(e(d)))
169
- }, null, 8, ["icon", "size"])) : A("", !0)], 4)]));
154
+ size: k.size,
155
+ onClick: O[3] || (O[3] = (J) => f(e(a)))
156
+ }, null, 8, ["icon", "size"])) : I("", !0), e(n).authMethods.login.passkey ? (o(), z(Q, {
157
+ key: 4,
158
+ icon: e(Ee),
159
+ label: x.value,
160
+ size: k.size,
161
+ loading: e(s),
162
+ disabled: !e(d),
163
+ onClick: y
164
+ }, null, 8, ["icon", "label", "size", "loading", "disabled"])) : I("", !0)], 4)]));
170
165
  }
171
- }), at = /* @__PURE__ */ U(it, [["__scopeId", "data-v-b0f3f609"]]), ot = {
166
+ }), at = /* @__PURE__ */ U(it, [["__scopeId", "data-v-0473306e"]]), ot = {
172
167
  class: "content"
173
168
  }, lt = {
174
169
  class: "sendVerifyCodeItem"
175
170
  }, nt = {
176
171
  class: "handle"
177
- }, rt = /* @__PURE__ */ C({
172
+ }, rt = /* @__PURE__ */ V({
178
173
  __name: "AuthkitPasswordUpdateAndVerify",
179
174
  props: {
180
175
  size: {
@@ -188,10 +183,10 @@ const Ye = ["title", "aria-label", "disabled"], Ze = {
188
183
  }
189
184
  },
190
185
  emits: ["signIn", "submit"],
191
- setup(w, {
192
- emit: r
186
+ setup(b, {
187
+ emit: u
193
188
  }) {
194
- const u = r, o = w, h = I(), g = I(!1), a = I(), s = I({
189
+ const n = u, r = b, h = A(), g = A(!1), a = A(), s = A({
195
190
  email: void 0,
196
191
  userToken: void 0,
197
192
  emailVerifyId: void 0,
@@ -201,26 +196,26 @@ const Ye = ["title", "aria-label", "disabled"], Ze = {
201
196
  async function d() {
202
197
  if (!await a.value.validateField(["email"])) {
203
198
  g.value = !0;
204
- const c = await x().auth.verify.email.retry.post({
199
+ const p = await B().auth.verify.email.retry.post({
205
200
  email: s.value.email,
206
201
  purpose: "resetPassword"
207
202
  });
208
- g.value = !1, c.data && (s.value.emailVerifyId = c.data.emailVerifyId), W(h.value, c);
203
+ g.value = !1, p.data && (s.value.emailVerifyId = p.data.emailVerifyId), K(h.value, p);
209
204
  }
210
205
  }
211
- async function f() {
206
+ async function v() {
212
207
  a.value.validate().then((t) => {
213
- t || u("submit", s.value);
208
+ t || n("submit", s.value);
214
209
  });
215
210
  }
216
- return (t, c) => (n(), S("div", ot, [i(e(D), {
211
+ return (t, p) => (o(), S("div", ot, [i(e(E), {
217
212
  ref_key: "formRef",
218
213
  ref: a,
219
214
  model: s.value,
220
- size: o.size,
215
+ size: r.size,
221
216
  "auto-label-width": ""
222
217
  }, {
223
- default: p(() => [i(e(P), {
218
+ default: c(() => [i(e(P), {
224
219
  field: "email",
225
220
  label: "邮箱",
226
221
  "hide-label": "",
@@ -232,9 +227,9 @@ const Ye = ["title", "aria-label", "disabled"], Ze = {
232
227
  message: "请输入有效的邮箱"
233
228
  }]
234
229
  }, {
235
- default: p(() => [i(e(V), {
230
+ default: c(() => [i(e(C), {
236
231
  modelValue: s.value.email,
237
- "onUpdate:modelValue": c[0] || (c[0] = (l) => s.value.email = l),
232
+ "onUpdate:modelValue": p[0] || (p[0] = (l) => s.value.email = l),
238
233
  placeholder: "请输入邮箱"
239
234
  }, null, 8, ["modelValue"])]),
240
235
  _: 1
@@ -247,14 +242,14 @@ const Ye = ["title", "aria-label", "disabled"], Ze = {
247
242
  message: "请输入验证码"
248
243
  }]
249
244
  }, {
250
- default: p(() => [k("div", lt, [i(e(V), {
245
+ default: c(() => [_("div", lt, [i(e(C), {
251
246
  modelValue: s.value.userToken,
252
- "onUpdate:modelValue": c[1] || (c[1] = (l) => s.value.userToken = l),
247
+ "onUpdate:modelValue": p[1] || (p[1] = (l) => s.value.userToken = l),
253
248
  placeholder: "请输入验证码"
254
- }, null, 8, ["modelValue"]), i(j, {
249
+ }, null, 8, ["modelValue"]), i(W, {
255
250
  ref_key: "SendVerifyCodeRef",
256
251
  ref: h,
257
- size: o.size,
252
+ size: r.size,
258
253
  loading: g.value,
259
254
  style: {
260
255
  "margin-left": "10px"
@@ -274,9 +269,9 @@ const Ye = ["title", "aria-label", "disabled"], Ze = {
274
269
  message: "密码不能少于10字符"
275
270
  }]
276
271
  }, {
277
- default: p(() => [i(e(V), {
272
+ default: c(() => [i(e(C), {
278
273
  modelValue: s.value.password,
279
- "onUpdate:modelValue": c[2] || (c[2] = (l) => s.value.password = l),
274
+ "onUpdate:modelValue": p[2] || (p[2] = (l) => s.value.password = l),
280
275
  placeholder: "请输入密码",
281
276
  type: "password",
282
277
  autocomplete: ""
@@ -293,27 +288,27 @@ const Ye = ["title", "aria-label", "disabled"], Ze = {
293
288
  minLength: 10,
294
289
  message: "确认密码不能少于10字符"
295
290
  }, {
296
- validator: (l, _) => {
297
- l !== s.value.password ? _("两次密码输入不一致,请重新输入") : _();
291
+ validator: (l, w) => {
292
+ l !== s.value.password ? w("两次密码输入不一致,请重新输入") : w();
298
293
  }
299
294
  }]
300
295
  }, {
301
- default: p(() => [i(e(V), {
296
+ default: c(() => [i(e(C), {
302
297
  modelValue: s.value.confirmPassword,
303
- "onUpdate:modelValue": c[3] || (c[3] = (l) => s.value.confirmPassword = l),
298
+ "onUpdate:modelValue": p[3] || (p[3] = (l) => s.value.confirmPassword = l),
304
299
  placeholder: "请输入确认密码密码",
305
300
  type: "password",
306
301
  autocomplete: ""
307
302
  }, null, 8, ["modelValue"])]),
308
303
  _: 1
309
- }, 8, ["rules"]), k("div", nt, [i(e(O), {
304
+ }, 8, ["rules"]), _("div", nt, [i(e(L), {
310
305
  type: "primary",
311
- loading: o.loading,
306
+ loading: r.loading,
312
307
  long: "",
313
- size: o.size,
314
- onClick: f
308
+ size: r.size,
309
+ onClick: v
315
310
  }, {
316
- default: p(() => [...c[4] || (c[4] = [T(" 提交 ", -1)])]),
311
+ default: c(() => [...p[4] || (p[4] = [q(" 提交 ", -1)])]),
317
312
  _: 1
318
313
  }, 8, ["loading", "size"])])]),
319
314
  _: 1
@@ -323,7 +318,7 @@ const Ye = ["title", "aria-label", "disabled"], Ze = {
323
318
  class: "content"
324
319
  }, ct = {
325
320
  class: "sendVerifyCodeItem"
326
- }, pt = /* @__PURE__ */ C({
321
+ }, pt = /* @__PURE__ */ V({
327
322
  __name: "AuthkitPhonePasswordUpdateAndVerify",
328
323
  props: {
329
324
  size: {
@@ -337,10 +332,10 @@ const Ye = ["title", "aria-label", "disabled"], Ze = {
337
332
  }
338
333
  },
339
334
  emits: ["submit"],
340
- setup(w, {
341
- emit: r
335
+ setup(b, {
336
+ emit: u
342
337
  }) {
343
- const u = r, o = w, h = I(), g = I(!1), a = I(), s = I({
338
+ const n = u, r = b, h = A(), g = A(!1), a = A(), s = A({
344
339
  phone: void 0,
345
340
  code: void 0,
346
341
  password: void 0,
@@ -352,27 +347,27 @@ const Ye = ["title", "aria-label", "disabled"], Ze = {
352
347
  minLength: 10,
353
348
  message: "确认密码不能少于10字符"
354
349
  }, {
355
- validator: (c, l) => {
356
- if (c !== s.value.password) {
350
+ validator: (p, l) => {
351
+ if (p !== s.value.password) {
357
352
  l("两次密码输入不一致,请重新输入");
358
353
  return;
359
354
  }
360
355
  l();
361
356
  }
362
357
  }];
363
- async function f() {
358
+ async function v() {
364
359
  if (!await a.value.validateField(["phone"])) {
365
360
  g.value = !0;
366
- const l = await x().auth.verify.sms.send.post({
361
+ const l = await B().auth.verify.sms.send.post({
367
362
  phone: s.value.phone,
368
363
  purpose: "resetPassword"
369
364
  });
370
- g.value = !1, W(h.value, l);
365
+ g.value = !1, K(h.value, l);
371
366
  }
372
367
  }
373
368
  async function t() {
374
- a.value.validate().then((c) => {
375
- c || u("submit", {
369
+ a.value.validate().then((p) => {
370
+ p || n("submit", {
376
371
  method: "phone",
377
372
  phone: s.value.phone,
378
373
  code: s.value.code,
@@ -380,14 +375,14 @@ const Ye = ["title", "aria-label", "disabled"], Ze = {
380
375
  });
381
376
  });
382
377
  }
383
- return (c, l) => (n(), S("div", dt, [i(e(D), {
378
+ return (p, l) => (o(), S("div", dt, [i(e(E), {
384
379
  ref_key: "formRef",
385
380
  ref: a,
386
381
  model: s.value,
387
- size: o.size,
382
+ size: r.size,
388
383
  "auto-label-width": ""
389
384
  }, {
390
- default: p(() => [i(e(P), {
385
+ default: c(() => [i(e(P), {
391
386
  field: "phone",
392
387
  label: "手机号",
393
388
  "hide-label": "",
@@ -399,9 +394,9 @@ const Ye = ["title", "aria-label", "disabled"], Ze = {
399
394
  message: "请输入有效的手机号"
400
395
  }]
401
396
  }, {
402
- default: p(() => [i(e(V), {
397
+ default: c(() => [i(e(C), {
403
398
  modelValue: s.value.phone,
404
- "onUpdate:modelValue": l[0] || (l[0] = (_) => s.value.phone = _),
399
+ "onUpdate:modelValue": l[0] || (l[0] = (w) => s.value.phone = w),
405
400
  placeholder: "请输入手机号",
406
401
  autocomplete: "tel",
407
402
  type: "tel"
@@ -416,20 +411,20 @@ const Ye = ["title", "aria-label", "disabled"], Ze = {
416
411
  message: "请输入验证码"
417
412
  }]
418
413
  }, {
419
- default: p(() => [k("div", ct, [i(e(V), {
414
+ default: c(() => [_("div", ct, [i(e(C), {
420
415
  modelValue: s.value.code,
421
- "onUpdate:modelValue": l[1] || (l[1] = (_) => s.value.code = _),
416
+ "onUpdate:modelValue": l[1] || (l[1] = (w) => s.value.code = w),
422
417
  placeholder: "请输入验证码",
423
418
  autocomplete: "one-time-code"
424
- }, null, 8, ["modelValue"]), i(j, {
419
+ }, null, 8, ["modelValue"]), i(W, {
425
420
  ref_key: "SendVerifyCodeRef",
426
421
  ref: h,
427
- size: o.size,
422
+ size: r.size,
428
423
  loading: g.value,
429
424
  style: {
430
425
  "margin-left": "10px"
431
426
  },
432
- onSend: f
427
+ onSend: v
433
428
  }, null, 8, ["size", "loading"])])]),
434
429
  _: 1
435
430
  }), i(e(P), {
@@ -444,9 +439,9 @@ const Ye = ["title", "aria-label", "disabled"], Ze = {
444
439
  message: "密码不能少于10字符"
445
440
  }]
446
441
  }, {
447
- default: p(() => [i(e(V), {
442
+ default: c(() => [i(e(C), {
448
443
  modelValue: s.value.password,
449
- "onUpdate:modelValue": l[2] || (l[2] = (_) => s.value.password = _),
444
+ "onUpdate:modelValue": l[2] || (l[2] = (w) => s.value.password = w),
450
445
  placeholder: "请输入密码",
451
446
  type: "password",
452
447
  autocomplete: "new-password"
@@ -458,22 +453,22 @@ const Ye = ["title", "aria-label", "disabled"], Ze = {
458
453
  "hide-label": "",
459
454
  rules: d
460
455
  }, {
461
- default: p(() => [i(e(V), {
456
+ default: c(() => [i(e(C), {
462
457
  modelValue: s.value.confirmPassword,
463
- "onUpdate:modelValue": l[3] || (l[3] = (_) => s.value.confirmPassword = _),
458
+ "onUpdate:modelValue": l[3] || (l[3] = (w) => s.value.confirmPassword = w),
464
459
  placeholder: "请输入确认密码",
465
460
  type: "password",
466
461
  autocomplete: "new-password"
467
462
  }, null, 8, ["modelValue"])]),
468
463
  _: 1
469
- }), i(e(O), {
464
+ }), i(e(L), {
470
465
  type: "primary",
471
- loading: o.loading,
466
+ loading: r.loading,
472
467
  long: "",
473
- size: o.size,
468
+ size: r.size,
474
469
  onClick: t
475
470
  }, {
476
- default: p(() => [...l[4] || (l[4] = [T(" 提交 ", -1)])]),
471
+ default: c(() => [...l[4] || (l[4] = [q(" 提交 ", -1)])]),
477
472
  _: 1
478
473
  }, 8, ["loading", "size"])]),
479
474
  _: 1
@@ -481,23 +476,23 @@ const Ye = ["title", "aria-label", "disabled"], Ze = {
481
476
  }
482
477
  }), mt = /* @__PURE__ */ U(pt, [["__scopeId", "data-v-a01a994e"]]), ft = {
483
478
  class: "SwitchSignIn"
484
- }, vt = /* @__PURE__ */ C({
479
+ }, vt = /* @__PURE__ */ V({
485
480
  __name: "AuthkitSwitchSignIn",
486
481
  emits: ["switchSignIn"],
487
- setup(w, {
488
- emit: r
482
+ setup(b, {
483
+ emit: u
489
484
  }) {
490
- const u = r;
491
- function o() {
492
- u("switchSignIn");
485
+ const n = u;
486
+ function r() {
487
+ n("switchSignIn");
493
488
  }
494
- return (h, g) => (n(), S("div", ft, [k("span", null, [g[1] || (g[1] = k("span", null, "已经有账号?", -1)), i(e(J), {
489
+ return (h, g) => (o(), S("div", ft, [_("span", null, [g[1] || (g[1] = _("span", null, "已经有账号?", -1)), i(e(Y), {
495
490
  style: {
496
491
  padding: "0px"
497
492
  },
498
- onClick: o
493
+ onClick: r
499
494
  }, {
500
- default: p(() => [...g[0] || (g[0] = [T("去登录", -1)])]),
495
+ default: c(() => [...g[0] || (g[0] = [q("去登录", -1)])]),
501
496
  _: 1
502
497
  })])]));
503
498
  }
@@ -509,7 +504,7 @@ const Ye = ["title", "aria-label", "disabled"], Ze = {
509
504
  }, yt = {
510
505
  key: 3,
511
506
  class: "empty"
512
- }, bt = /* @__PURE__ */ C({
507
+ }, bt = /* @__PURE__ */ V({
513
508
  __name: "AuthkitResetPassword",
514
509
  props: {
515
510
  size: {
@@ -524,12 +519,12 @@ const Ye = ["title", "aria-label", "disabled"], Ze = {
524
519
  }
525
520
  },
526
521
  emits: ["switchSignIn", "submit"],
527
- setup(w, {
528
- emit: r
522
+ setup(b, {
523
+ emit: u
529
524
  }) {
530
- const u = r, o = w, {
525
+ const n = u, r = b, {
531
526
  appsData: h
532
- } = N(), g = R(() => h.value.authMethods), a = R(() => {
527
+ } = j(), g = $(() => h.value.authMethods), a = $(() => {
533
528
  const t = [];
534
529
  return g.value.login.emailPassword && t.push({
535
530
  key: "email",
@@ -538,57 +533,57 @@ const Ye = ["title", "aria-label", "disabled"], Ze = {
538
533
  key: "phone",
539
534
  title: "手机号找回"
540
535
  }), t;
541
- }), s = I("email");
536
+ }), s = A("email");
542
537
  re(() => {
543
538
  var t;
544
- a.value.some((c) => c.key === s.value) || (s.value = ((t = a.value[0]) == null ? void 0 : t.key) || "email");
539
+ a.value.some((p) => p.key === s.value) || (s.value = ((t = a.value[0]) == null ? void 0 : t.key) || "email");
545
540
  });
546
541
  function d() {
547
- u("switchSignIn");
542
+ n("switchSignIn");
548
543
  }
549
- async function f(t) {
550
- u("submit", {
544
+ async function v(t) {
545
+ n("submit", {
551
546
  method: s.value,
552
547
  ...t
553
548
  });
554
549
  }
555
- return (t, c) => (n(), S("div", gt, [a.value.length > 1 ? (n(), S("div", ht, [i(e(ce), {
550
+ return (t, p) => (o(), S("div", gt, [a.value.length > 1 ? (o(), S("div", ht, [i(e(ce), {
556
551
  "active-key": s.value,
557
- "onUpdate:activeKey": c[0] || (c[0] = (l) => s.value = l)
552
+ "onUpdate:activeKey": p[0] || (p[0] = (l) => s.value = l)
558
553
  }, {
559
- default: p(() => [(n(!0), S(F, null, ue(a.value, (l) => (n(), z(e(pe), {
554
+ default: c(() => [(o(!0), S(D, null, ue(a.value, (l) => (o(), z(e(pe), {
560
555
  key: l.key,
561
556
  title: l.title
562
557
  }, null, 8, ["title"]))), 128))]),
563
558
  _: 1
564
- }, 8, ["active-key"])])) : A("", !0), s.value === "email" && g.value.login.emailPassword ? (n(), z(ut, {
559
+ }, 8, ["active-key"])])) : I("", !0), s.value === "email" && g.value.login.emailPassword ? (o(), z(ut, {
565
560
  key: 1,
566
- loading: w.loading,
567
- size: o.size,
568
- onSubmit: f
569
- }, null, 8, ["loading", "size"])) : s.value === "phone" && g.value.login.phonePassword ? (n(), z(mt, {
561
+ loading: b.loading,
562
+ size: r.size,
563
+ onSubmit: v
564
+ }, null, 8, ["loading", "size"])) : s.value === "phone" && g.value.login.phonePassword ? (o(), z(mt, {
570
565
  key: 2,
571
- loading: w.loading,
572
- size: o.size,
573
- onSubmit: f
574
- }, null, 8, ["loading", "size"])) : (n(), S("div", yt, "当前应用未开放找回密码")), i(fe, {
566
+ loading: b.loading,
567
+ size: r.size,
568
+ onSubmit: v
569
+ }, null, 8, ["loading", "size"])) : (o(), S("div", yt, "当前应用未开放找回密码")), i(fe, {
575
570
  onSwitchSignIn: d
576
571
  })]));
577
572
  }
578
573
  }), wt = /* @__PURE__ */ U(bt, [["__scopeId", "data-v-90d789bb"]]);
579
- let te = null, se = null;
580
- function _t(w) {
581
- te = w.onPrivacyPolicy ?? null, se = w.onUserServiceAgreement ?? null;
574
+ let se = null, ie = null;
575
+ function _t(b) {
576
+ se = b.onPrivacyPolicy ?? null, ie = b.onUserServiceAgreement ?? null;
582
577
  }
583
578
  function kt() {
584
- te == null || te();
579
+ se == null || se();
585
580
  }
586
581
  function St() {
587
- se == null || se();
582
+ ie == null || ie();
588
583
  }
589
584
  const zt = {
590
585
  key: 2
591
- }, It = /* @__PURE__ */ C({
586
+ }, It = /* @__PURE__ */ V({
592
587
  __name: "AuthkitServiceAgreementAndPrivacyProtection",
593
588
  props: /* @__PURE__ */ $e({
594
589
  currentView: {}
@@ -600,78 +595,78 @@ const zt = {
600
595
  acceptedTermsModifiers: {}
601
596
  }),
602
597
  emits: ["update:acceptedTerms"],
603
- setup(w) {
598
+ setup(b) {
604
599
  const {
605
- config: r
606
- } = me(), u = w, o = Ue(w, "acceptedTerms"), {
600
+ config: u
601
+ } = me(), n = b, r = Ue(b, "acceptedTerms"), {
607
602
  getLink: h,
608
603
  openLegalDoc: g
609
- } = Ie(), {
604
+ } = Ae(), {
610
605
  termsShaking: a,
611
606
  requiresAcceptanceForSignUp: s,
612
607
  requiresAcceptanceForOAuth: d,
613
- syncAcceptedTerms: f
614
- } = L();
615
- ne(o, (v) => {
616
- f(v);
608
+ syncAcceptedTerms: v
609
+ } = F();
610
+ be(r, (k) => {
611
+ v(k);
617
612
  });
618
- const t = R(() => {
619
- const v = h("userServiceAgreement");
620
- return v != null && v.configured ? v : void 0;
621
- }), c = R(() => {
622
- const v = h("privacyPolicy");
623
- return v != null && v.configured ? v : void 0;
624
- }), l = R(() => !!(t.value || c.value)), _ = R(() => u.currentView === "signUp" ? s() : u.currentView === "signIn" ? d() : !1), m = R(() => l.value && _.value);
625
- function b() {
626
- if (r.legalDocsMode === "builtin") {
613
+ const t = $(() => {
614
+ const k = h("userServiceAgreement");
615
+ return k != null && k.configured ? k : void 0;
616
+ }), p = $(() => {
617
+ const k = h("privacyPolicy");
618
+ return k != null && k.configured ? k : void 0;
619
+ }), l = $(() => !!(t.value || p.value)), w = $(() => n.currentView === "signUp" ? s() : n.currentView === "signIn" ? d() : !1), m = $(() => l.value && w.value);
620
+ function f() {
621
+ if (u.legalDocsMode === "builtin") {
627
622
  g("userServiceAgreement");
628
623
  return;
629
624
  }
630
625
  St();
631
626
  }
632
627
  function y() {
633
- if (r.legalDocsMode === "builtin") {
628
+ if (u.legalDocsMode === "builtin") {
634
629
  g("privacyPolicy");
635
630
  return;
636
631
  }
637
632
  kt();
638
633
  }
639
- return (v, $) => m.value ? (n(), S("div", {
634
+ return (k, T) => m.value ? (o(), S("div", {
640
635
  key: 0,
641
636
  class: ye(["ServiceAgreementAndPrivacyProtection", {
642
637
  "terms-shake": e(a)
643
638
  }])
644
- }, [l.value ? (n(), S(F, {
639
+ }, [l.value ? (o(), S(D, {
645
640
  key: 0
646
- }, [_.value ? (n(), z(e(Oe), {
641
+ }, [w.value ? (o(), z(e(Oe), {
647
642
  key: 0,
648
- modelValue: o.value,
649
- "onUpdate:modelValue": $[0] || ($[0] = (q) => o.value = q),
643
+ modelValue: r.value,
644
+ "onUpdate:modelValue": T[0] || (T[0] = (x) => r.value = x),
650
645
  class: "terms-checkbox"
651
646
  }, {
652
- default: p(() => [...$[1] || ($[1] = [k("span", {
647
+ default: c(() => [...T[1] || (T[1] = [_("span", {
653
648
  class: "terms-text"
654
649
  }, "我已阅读并同意", -1)])]),
655
650
  _: 1
656
- }, 8, ["modelValue"])) : A("", !0), t.value ? (n(), z(e(J), {
651
+ }, 8, ["modelValue"])) : I("", !0), t.value ? (o(), z(e(Y), {
657
652
  key: 1,
658
- onClick: b
653
+ onClick: f
659
654
  }, {
660
- default: p(() => [T(B(t.value.label), 1)]),
655
+ default: c(() => [q(M(t.value.label), 1)]),
661
656
  _: 1
662
- })) : A("", !0), t.value && c.value ? (n(), S("span", zt, "和")) : A("", !0), c.value ? (n(), z(e(J), {
657
+ })) : I("", !0), t.value && p.value ? (o(), S("span", zt, "和")) : I("", !0), p.value ? (o(), z(e(Y), {
663
658
  key: 3,
664
659
  onClick: y
665
660
  }, {
666
- default: p(() => [T(B(c.value.label), 1)]),
661
+ default: c(() => [q(M(p.value.label), 1)]),
667
662
  _: 1
668
- })) : A("", !0)], 64)) : A("", !0)], 2)) : A("", !0);
663
+ })) : I("", !0)], 64)) : I("", !0)], 2)) : I("", !0);
669
664
  }
670
- }), X = /* @__PURE__ */ U(It, [["__scopeId", "data-v-a0c2f361"]]), At = {
665
+ }), ee = /* @__PURE__ */ U(It, [["__scopeId", "data-v-a0c2f361"]]), At = {
671
666
  class: "content"
672
667
  }, Pt = {
673
668
  class: "handle"
674
- }, Vt = /* @__PURE__ */ C({
669
+ }, Vt = /* @__PURE__ */ V({
675
670
  __name: "AuthkitPasswordAuth",
676
671
  props: {
677
672
  size: {
@@ -689,32 +684,32 @@ const zt = {
689
684
  }
690
685
  },
691
686
  emits: ["submit"],
692
- setup(w, {
693
- emit: r
687
+ setup(b, {
688
+ emit: u
694
689
  }) {
695
- const u = r, {
696
- useTermsFormField: o
697
- } = L(), {
690
+ const n = u, {
691
+ useTermsFormField: r
692
+ } = F(), {
698
693
  showTermsField: h,
699
694
  termsRules: g
700
- } = o("signIn"), a = w, s = I(), d = I({
695
+ } = r("signIn"), a = b, s = A(), d = A({
701
696
  identifier: void 0,
702
697
  password: void 0,
703
698
  acceptedTerms: !1
704
699
  });
705
- async function f() {
700
+ async function v() {
706
701
  s.value.validate().then((t) => {
707
- t || u("submit", d.value);
702
+ t || n("submit", d.value);
708
703
  });
709
704
  }
710
- return (t, c) => (n(), S("div", At, [i(e(D), {
705
+ return (t, p) => (o(), S("div", At, [i(e(E), {
711
706
  ref_key: "formRef",
712
707
  ref: s,
713
708
  model: d.value,
714
709
  size: a.size,
715
710
  "auto-label-width": ""
716
711
  }, {
717
- default: p(() => [i(e(P), {
712
+ default: c(() => [i(e(P), {
718
713
  field: "identifier",
719
714
  label: "邮箱或手机号",
720
715
  "hide-label": "",
@@ -723,11 +718,11 @@ const zt = {
723
718
  message: "请输入邮箱或手机号"
724
719
  }]
725
720
  }, {
726
- default: p(() => [i(e(V), {
721
+ default: c(() => [i(e(C), {
727
722
  modelValue: d.value.identifier,
728
- "onUpdate:modelValue": c[0] || (c[0] = (l) => d.value.identifier = l),
723
+ "onUpdate:modelValue": p[0] || (p[0] = (l) => d.value.identifier = l),
729
724
  placeholder: a.allowPhone ? "请输入邮箱或手机号" : "请输入邮箱",
730
- autocomplete: "username webauthn"
725
+ autocomplete: "username"
731
726
  }, null, 8, ["modelValue", "placeholder"])]),
732
727
  _: 1
733
728
  }), i(e(P), {
@@ -739,40 +734,40 @@ const zt = {
739
734
  message: "请输入密码"
740
735
  }]
741
736
  }, {
742
- default: p(() => [i(e(V), {
737
+ default: c(() => [i(e(C), {
743
738
  modelValue: d.value.password,
744
- "onUpdate:modelValue": c[1] || (c[1] = (l) => d.value.password = l),
739
+ "onUpdate:modelValue": p[1] || (p[1] = (l) => d.value.password = l),
745
740
  placeholder: "请输入密码",
746
741
  type: "password",
747
742
  autocomplete: "current-password"
748
743
  }, null, 8, ["modelValue"])]),
749
744
  _: 1
750
- }), k("div", Pt, [i(e(O), {
745
+ }), _("div", Pt, [i(e(L), {
751
746
  type: "primary",
752
747
  loading: a.loading,
753
748
  long: "",
754
749
  size: a.size,
755
- onClick: f
750
+ onClick: v
756
751
  }, {
757
- default: p(() => [...c[3] || (c[3] = [T(" 登录 ", -1)])]),
752
+ default: c(() => [...p[3] || (p[3] = [q(" 登录 ", -1)])]),
758
753
  _: 1
759
- }, 8, ["loading", "size"]), e(h) ? (n(), z(e(P), {
754
+ }, 8, ["loading", "size"]), e(h) ? (o(), z(e(P), {
760
755
  key: 0,
761
756
  field: "acceptedTerms",
762
757
  "hide-label": "",
763
758
  rules: e(g)
764
759
  }, {
765
- default: p(() => [i(X, {
760
+ default: c(() => [i(ee, {
766
761
  "accepted-terms": d.value.acceptedTerms,
767
- "onUpdate:acceptedTerms": c[2] || (c[2] = (l) => d.value.acceptedTerms = l),
762
+ "onUpdate:acceptedTerms": p[2] || (p[2] = (l) => d.value.acceptedTerms = l),
768
763
  "current-view": "signIn"
769
764
  }, null, 8, ["accepted-terms"])]),
770
765
  _: 1
771
- }, 8, ["rules"])) : A("", !0)])]),
766
+ }, 8, ["rules"])) : I("", !0)])]),
772
767
  _: 1
773
768
  }, 8, ["model", "size"])]));
774
769
  }
775
- }), Ct = /* @__PURE__ */ U(Vt, [["__scopeId", "data-v-1e935b15"]]), Ut = {
770
+ }), Ct = /* @__PURE__ */ U(Vt, [["__scopeId", "data-v-bed304e1"]]), Ut = {
776
771
  class: "SignInPhone"
777
772
  }, $t = {
778
773
  class: "content"
@@ -780,7 +775,7 @@ const zt = {
780
775
  class: "sendVerifyCodeItem"
781
776
  }, Tt = {
782
777
  class: "handle"
783
- }, qt = /* @__PURE__ */ C({
778
+ }, qt = /* @__PURE__ */ V({
784
779
  __name: "AuthkitSignInPhone",
785
780
  props: {
786
781
  size: {
@@ -794,46 +789,46 @@ const zt = {
794
789
  }
795
790
  },
796
791
  emits: ["submit"],
797
- setup(w, {
798
- emit: r
792
+ setup(b, {
793
+ emit: u
799
794
  }) {
800
- const u = r, {
801
- useTermsFormField: o
802
- } = L(), {
795
+ const n = u, {
796
+ useTermsFormField: r
797
+ } = F(), {
803
798
  showTermsField: h,
804
799
  termsRules: g
805
- } = o("signIn"), a = w, s = I(), d = I(!1), f = I(), t = I({
800
+ } = r("signIn"), a = b, s = A(), d = A(!1), v = A(), t = A({
806
801
  phone: void 0,
807
802
  code: void 0,
808
803
  acceptedTerms: !1
809
804
  });
810
- async function c() {
811
- if (!await f.value.validateField(["phone"])) {
805
+ async function p() {
806
+ if (!await v.value.validateField(["phone"])) {
812
807
  d.value = !0;
813
- const m = await x().auth.verify.sms.send.post({
808
+ const m = await B().auth.verify.sms.send.post({
814
809
  phone: t.value.phone,
815
810
  purpose: "signIn"
816
811
  });
817
- d.value = !1, W(s.value, m);
812
+ d.value = !1, K(s.value, m);
818
813
  }
819
814
  }
820
815
  async function l() {
821
- f.value.validate().then((_) => {
822
- _ || u("submit", {
816
+ v.value.validate().then((w) => {
817
+ w || n("submit", {
823
818
  identifier: t.value.phone,
824
819
  code: t.value.code,
825
820
  method: "code"
826
821
  });
827
822
  });
828
823
  }
829
- return (_, m) => (n(), S("div", Ut, [k("div", $t, [i(e(D), {
824
+ return (w, m) => (o(), S("div", Ut, [_("div", $t, [i(e(E), {
830
825
  ref_key: "formRef",
831
- ref: f,
826
+ ref: v,
832
827
  model: t.value,
833
828
  size: a.size,
834
829
  "auto-label-width": ""
835
830
  }, {
836
- default: p(() => [i(e(P), {
831
+ default: c(() => [i(e(P), {
837
832
  field: "phone",
838
833
  label: "手机号",
839
834
  "hide-label": "",
@@ -845,11 +840,11 @@ const zt = {
845
840
  message: "请输入有效的手机号"
846
841
  }]
847
842
  }, {
848
- default: p(() => [i(e(V), {
843
+ default: c(() => [i(e(C), {
849
844
  modelValue: t.value.phone,
850
- "onUpdate:modelValue": m[0] || (m[0] = (b) => t.value.phone = b),
845
+ "onUpdate:modelValue": m[0] || (m[0] = (f) => t.value.phone = f),
851
846
  placeholder: "请输入手机号",
852
- autocomplete: "username webauthn",
847
+ autocomplete: "username",
853
848
  type: "tel"
854
849
  }, null, 8, ["modelValue"])]),
855
850
  _: 1
@@ -862,12 +857,12 @@ const zt = {
862
857
  message: "请输入验证码"
863
858
  }]
864
859
  }, {
865
- default: p(() => [k("div", Rt, [i(e(V), {
860
+ default: c(() => [_("div", Rt, [i(e(C), {
866
861
  modelValue: t.value.code,
867
- "onUpdate:modelValue": m[1] || (m[1] = (b) => t.value.code = b),
862
+ "onUpdate:modelValue": m[1] || (m[1] = (f) => t.value.code = f),
868
863
  placeholder: "请输入验证码",
869
864
  autocomplete: "one-time-code"
870
- }, null, 8, ["modelValue"]), i(j, {
865
+ }, null, 8, ["modelValue"]), i(W, {
871
866
  ref_key: "SendVerifyCodeRef",
872
867
  ref: s,
873
868
  size: a.size,
@@ -875,41 +870,41 @@ const zt = {
875
870
  style: {
876
871
  "margin-left": "10px"
877
872
  },
878
- onSend: c
873
+ onSend: p
879
874
  }, null, 8, ["size", "loading"])])]),
880
875
  _: 1
881
- }), k("div", Tt, [i(e(O), {
876
+ }), _("div", Tt, [i(e(L), {
882
877
  type: "primary",
883
878
  loading: a.loading,
884
879
  long: "",
885
880
  size: a.size,
886
881
  onClick: l
887
882
  }, {
888
- default: p(() => [...m[3] || (m[3] = [T(" 登录 ", -1)])]),
883
+ default: c(() => [...m[3] || (m[3] = [q(" 登录 ", -1)])]),
889
884
  _: 1
890
- }, 8, ["loading", "size"]), e(h) ? (n(), z(e(P), {
885
+ }, 8, ["loading", "size"]), e(h) ? (o(), z(e(P), {
891
886
  key: 0,
892
887
  field: "acceptedTerms",
893
888
  "hide-label": "",
894
889
  rules: e(g)
895
890
  }, {
896
- default: p(() => [i(X, {
891
+ default: c(() => [i(ee, {
897
892
  "accepted-terms": t.value.acceptedTerms,
898
- "onUpdate:acceptedTerms": m[2] || (m[2] = (b) => t.value.acceptedTerms = b),
893
+ "onUpdate:acceptedTerms": m[2] || (m[2] = (f) => t.value.acceptedTerms = f),
899
894
  "current-view": "signIn"
900
895
  }, null, 8, ["accepted-terms"])]),
901
896
  _: 1
902
- }, 8, ["rules"])) : A("", !0)])]),
897
+ }, 8, ["rules"])) : I("", !0)])]),
903
898
  _: 1
904
899
  }, 8, ["model", "size"])])]));
905
900
  }
906
- }), Ot = /* @__PURE__ */ U(qt, [["__scopeId", "data-v-fa7bbccf"]]), xt = {
901
+ }), Ot = /* @__PURE__ */ U(qt, [["__scopeId", "data-v-e2a3fef3"]]), xt = {
907
902
  class: "SignInEmailCode"
908
- }, Bt = {
909
- class: "sendVerifyCodeItem"
910
903
  }, Lt = {
904
+ class: "sendVerifyCodeItem"
905
+ }, Bt = {
911
906
  class: "handle"
912
- }, Ft = /* @__PURE__ */ C({
907
+ }, Mt = /* @__PURE__ */ V({
913
908
  __name: "AuthkitSignInEmailCode",
914
909
  props: {
915
910
  size: {
@@ -923,34 +918,34 @@ const zt = {
923
918
  }
924
919
  },
925
920
  emits: ["submit"],
926
- setup(w, {
927
- emit: r
921
+ setup(b, {
922
+ emit: u
928
923
  }) {
929
- const u = r, {
930
- useTermsFormField: o
931
- } = L(), {
924
+ const n = u, {
925
+ useTermsFormField: r
926
+ } = F(), {
932
927
  showTermsField: h,
933
928
  termsRules: g
934
- } = o("signIn"), a = w, s = I(), d = I(!1), f = I(), t = I({
929
+ } = r("signIn"), a = b, s = A(), d = A(!1), v = A(), t = A({
935
930
  email: void 0,
936
931
  code: void 0,
937
932
  emailVerifyId: "",
938
933
  acceptedTerms: !1
939
934
  });
940
- async function c() {
935
+ async function p() {
941
936
  var m;
942
- if (!await f.value.validateField(["email"])) {
937
+ if (!await v.value.validateField(["email"])) {
943
938
  d.value = !0;
944
- const b = await x().auth.verify.email.retry.post({
939
+ const f = await B().auth.verify.email.retry.post({
945
940
  email: t.value.email,
946
941
  purpose: "signIn"
947
942
  });
948
- d.value = !1, (m = b.data) != null && m.emailVerifyId && (t.value.emailVerifyId = b.data.emailVerifyId), W(s.value, b);
943
+ d.value = !1, (m = f.data) != null && m.emailVerifyId && (t.value.emailVerifyId = f.data.emailVerifyId), K(s.value, f);
949
944
  }
950
945
  }
951
946
  async function l() {
952
- f.value.validate().then((_) => {
953
- _ || u("submit", {
947
+ v.value.validate().then((w) => {
948
+ w || n("submit", {
954
949
  identifier: t.value.email,
955
950
  code: t.value.code,
956
951
  emailVerifyId: t.value.emailVerifyId,
@@ -958,14 +953,14 @@ const zt = {
958
953
  });
959
954
  });
960
955
  }
961
- return (_, m) => (n(), S("div", xt, [i(e(D), {
956
+ return (w, m) => (o(), S("div", xt, [i(e(E), {
962
957
  ref_key: "formRef",
963
- ref: f,
958
+ ref: v,
964
959
  model: t.value,
965
960
  size: a.size,
966
961
  "auto-label-width": ""
967
962
  }, {
968
- default: p(() => [i(e(P), {
963
+ default: c(() => [i(e(P), {
969
964
  field: "email",
970
965
  "hide-label": "",
971
966
  rules: [{
@@ -976,11 +971,11 @@ const zt = {
976
971
  message: "请输入有效的邮箱"
977
972
  }]
978
973
  }, {
979
- default: p(() => [i(e(V), {
974
+ default: c(() => [i(e(C), {
980
975
  modelValue: t.value.email,
981
- "onUpdate:modelValue": m[0] || (m[0] = (b) => t.value.email = b),
976
+ "onUpdate:modelValue": m[0] || (m[0] = (f) => t.value.email = f),
982
977
  placeholder: "请输入邮箱",
983
- autocomplete: "username webauthn"
978
+ autocomplete: "username"
984
979
  }, null, 8, ["modelValue"])]),
985
980
  _: 1
986
981
  }), i(e(P), {
@@ -991,12 +986,12 @@ const zt = {
991
986
  message: "请输入验证码"
992
987
  }]
993
988
  }, {
994
- default: p(() => [k("div", Bt, [i(e(V), {
989
+ default: c(() => [_("div", Lt, [i(e(C), {
995
990
  modelValue: t.value.code,
996
- "onUpdate:modelValue": m[1] || (m[1] = (b) => t.value.code = b),
991
+ "onUpdate:modelValue": m[1] || (m[1] = (f) => t.value.code = f),
997
992
  placeholder: "请输入验证码",
998
993
  autocomplete: "one-time-code"
999
- }, null, 8, ["modelValue"]), i(j, {
994
+ }, null, 8, ["modelValue"]), i(W, {
1000
995
  ref_key: "SendVerifyCodeRef",
1001
996
  ref: s,
1002
997
  size: a.size,
@@ -1004,39 +999,39 @@ const zt = {
1004
999
  style: {
1005
1000
  "margin-left": "10px"
1006
1001
  },
1007
- onSend: c
1002
+ onSend: p
1008
1003
  }, null, 8, ["size", "loading"])])]),
1009
1004
  _: 1
1010
- }), k("div", Lt, [i(e(O), {
1005
+ }), _("div", Bt, [i(e(L), {
1011
1006
  type: "primary",
1012
1007
  loading: a.loading,
1013
1008
  long: "",
1014
1009
  size: a.size,
1015
1010
  onClick: l
1016
1011
  }, {
1017
- default: p(() => [...m[3] || (m[3] = [T(" 登录 ", -1)])]),
1012
+ default: c(() => [...m[3] || (m[3] = [q(" 登录 ", -1)])]),
1018
1013
  _: 1
1019
- }, 8, ["loading", "size"]), e(h) ? (n(), z(e(P), {
1014
+ }, 8, ["loading", "size"]), e(h) ? (o(), z(e(P), {
1020
1015
  key: 0,
1021
1016
  field: "acceptedTerms",
1022
1017
  "hide-label": "",
1023
1018
  rules: e(g)
1024
1019
  }, {
1025
- default: p(() => [i(X, {
1020
+ default: c(() => [i(ee, {
1026
1021
  "accepted-terms": t.value.acceptedTerms,
1027
- "onUpdate:acceptedTerms": m[2] || (m[2] = (b) => t.value.acceptedTerms = b),
1022
+ "onUpdate:acceptedTerms": m[2] || (m[2] = (f) => t.value.acceptedTerms = f),
1028
1023
  "current-view": "signIn"
1029
1024
  }, null, 8, ["accepted-terms"])]),
1030
1025
  _: 1
1031
- }, 8, ["rules"])) : A("", !0)])]),
1026
+ }, 8, ["rules"])) : I("", !0)])]),
1032
1027
  _: 1
1033
1028
  }, 8, ["model", "size"])]));
1034
1029
  }
1035
- }), Mt = /* @__PURE__ */ U(Ft, [["__scopeId", "data-v-2f4189ae"]]), Dt = {
1030
+ }), Ft = /* @__PURE__ */ U(Mt, [["__scopeId", "data-v-00a65922"]]), Dt = {
1036
1031
  class: "SwitchSignUpOrResetPassword"
1037
- }, Et = {
1032
+ }, Ht = {
1038
1033
  key: 0
1039
- }, Ht = /* @__PURE__ */ C({
1034
+ }, Et = /* @__PURE__ */ V({
1040
1035
  __name: "AuthkitSwitchSignUpOrResetPassword",
1041
1036
  props: {
1042
1037
  showSignUp: {
@@ -1049,41 +1044,41 @@ const zt = {
1049
1044
  }
1050
1045
  },
1051
1046
  emits: ["switchSignUp", "switchResetPassword"],
1052
- setup(w, {
1053
- emit: r
1047
+ setup(b, {
1048
+ emit: u
1054
1049
  }) {
1055
- const u = w, o = r;
1050
+ const n = b, r = u;
1056
1051
  function h() {
1057
- o("switchSignUp");
1052
+ r("switchSignUp");
1058
1053
  }
1059
1054
  function g() {
1060
- o("switchResetPassword");
1055
+ r("switchResetPassword");
1061
1056
  }
1062
- return (a, s) => (n(), S("div", Dt, [u.showSignUp ? (n(), S("span", Et, [s[1] || (s[1] = k("span", null, " 还没有账户?", -1)), i(e(J), {
1057
+ return (a, s) => (o(), S("div", Dt, [n.showSignUp ? (o(), S("span", Ht, [s[1] || (s[1] = _("span", null, " 还没有账户?", -1)), i(e(Y), {
1063
1058
  style: {
1064
1059
  padding: "0px"
1065
1060
  },
1066
1061
  onClick: h
1067
1062
  }, {
1068
- default: p(() => [...s[0] || (s[0] = [T("去注册?", -1)])]),
1063
+ default: c(() => [...s[0] || (s[0] = [q("去注册?", -1)])]),
1069
1064
  _: 1
1070
- })])) : A("", !0), u.showResetPassword ? (n(), z(e(J), {
1065
+ })])) : I("", !0), n.showResetPassword ? (o(), z(e(Y), {
1071
1066
  key: 1,
1072
1067
  style: {
1073
1068
  padding: "0px"
1074
1069
  },
1075
1070
  onClick: g
1076
1071
  }, {
1077
- default: p(() => [...s[2] || (s[2] = [T(" 忘记密码? ", -1)])]),
1072
+ default: c(() => [...s[2] || (s[2] = [q(" 忘记密码? ", -1)])]),
1078
1073
  _: 1
1079
- })) : A("", !0)]));
1074
+ })) : I("", !0)]));
1080
1075
  }
1081
- }), Gt = /* @__PURE__ */ U(Ht, [["__scopeId", "data-v-6ca7b1f2"]]), Nt = {
1076
+ }), Gt = /* @__PURE__ */ U(Et, [["__scopeId", "data-v-6ca7b1f2"]]), Nt = {
1082
1077
  class: "SignIn"
1083
1078
  }, jt = {
1084
1079
  key: 0,
1085
1080
  class: "tabsContainer"
1086
- }, Wt = /* @__PURE__ */ C({
1081
+ }, Wt = /* @__PURE__ */ V({
1087
1082
  __name: "AuthkitSignIn",
1088
1083
  props: {
1089
1084
  size: {
@@ -1097,90 +1092,83 @@ const zt = {
1097
1092
  }
1098
1093
  },
1099
1094
  emits: ["submit", "switchSignUp", "switchResetPassword"],
1100
- setup(w, {
1101
- emit: r
1095
+ setup(b, {
1096
+ emit: u
1102
1097
  }) {
1103
- const u = r, o = w, h = Re(), g = R(() => !!h.OAuth), {
1098
+ const n = u, r = b, h = Re(), g = $(() => !!h.OAuth), {
1104
1099
  appsData: a
1105
- } = N(), {
1100
+ } = j(), {
1106
1101
  signUpAuthEnabled: s
1107
- } = L(), d = R(() => a.value.authMethods), f = R(() => s.value && (d.value.signUp.email || d.value.signUp.phone)), t = R(() => d.value.login.emailPassword || d.value.login.phonePassword), c = R(() => {
1108
- const v = [];
1109
- return (d.value.login.emailPassword || d.value.login.phonePassword) && v.push({
1102
+ } = F(), d = $(() => a.value.authMethods), v = $(() => s.value && (d.value.signUp.email || d.value.signUp.phone)), t = $(() => d.value.login.emailPassword || d.value.login.phonePassword), p = $(() => {
1103
+ const y = [];
1104
+ return (d.value.login.emailPassword || d.value.login.phonePassword) && y.push({
1110
1105
  key: "password",
1111
1106
  title: "密码登录"
1112
- }), d.value.login.phoneCode && v.push({
1107
+ }), d.value.login.phoneCode && y.push({
1113
1108
  key: "phoneCode",
1114
1109
  title: "手机验证码登录"
1115
- }), d.value.login.emailCode && v.push({
1110
+ }), d.value.login.emailCode && y.push({
1116
1111
  key: "emailCode",
1117
1112
  title: "邮箱验证码登录"
1118
- }), v;
1119
- }), l = I("password"), _ = I("");
1113
+ }), y;
1114
+ }), l = A("password");
1120
1115
  re(() => {
1121
- var v;
1122
- c.value.some(($) => $.key === l.value) || (l.value = ((v = c.value[0]) == null ? void 0 : v.key) || "password");
1116
+ var y;
1117
+ p.value.some((k) => k.key === l.value) || (l.value = ((y = p.value[0]) == null ? void 0 : y.key) || "password");
1123
1118
  });
1124
- function m() {
1125
- u("switchSignUp");
1119
+ function w() {
1120
+ n("switchSignUp");
1126
1121
  }
1127
- function b() {
1128
- u("switchResetPassword");
1122
+ function m() {
1123
+ n("switchResetPassword");
1129
1124
  }
1130
- async function y(v) {
1131
- u("submit", {
1125
+ async function f(y) {
1126
+ n("submit", {
1132
1127
  method: l.value === "password" ? "password" : "code",
1133
- ...v
1128
+ ...y
1134
1129
  });
1135
1130
  }
1136
- return (v, $) => (n(), S("div", Nt, [c.value.length > 1 ? (n(), S("div", jt, [i(e(ce), {
1131
+ return (y, k) => (o(), S("div", Nt, [p.value.length > 1 ? (o(), S("div", jt, [i(e(ce), {
1137
1132
  "active-key": l.value,
1138
- "onUpdate:activeKey": $[0] || ($[0] = (q) => l.value = q)
1133
+ "onUpdate:activeKey": k[0] || (k[0] = (T) => l.value = T)
1139
1134
  }, {
1140
- default: p(() => [(n(!0), S(F, null, ue(c.value, (q) => (n(), z(e(pe), {
1141
- key: q.key,
1142
- title: q.title
1135
+ default: c(() => [(o(!0), S(D, null, ue(p.value, (T) => (o(), z(e(pe), {
1136
+ key: T.key,
1137
+ title: T.title
1143
1138
  }, null, 8, ["title"]))), 128))]),
1144
1139
  _: 1
1145
- }, 8, ["active-key"])])) : A("", !0), l.value === "password" && (d.value.login.emailPassword || d.value.login.phonePassword) ? (n(), z(Ct, {
1140
+ }, 8, ["active-key"])])) : I("", !0), l.value === "password" && (d.value.login.emailPassword || d.value.login.phonePassword) ? (o(), z(Ct, {
1146
1141
  key: 1,
1147
- loading: o.loading,
1148
- size: o.size,
1142
+ loading: r.loading,
1143
+ size: r.size,
1149
1144
  "allow-phone": d.value.login.phonePassword,
1150
- onSubmit: y
1151
- }, null, 8, ["loading", "size", "allow-phone"])) : l.value === "phoneCode" ? (n(), z(Ot, {
1145
+ onSubmit: f
1146
+ }, null, 8, ["loading", "size", "allow-phone"])) : l.value === "phoneCode" ? (o(), z(Ot, {
1152
1147
  key: 2,
1153
- loading: o.loading,
1154
- size: o.size,
1155
- onSubmit: y
1156
- }, null, 8, ["loading", "size"])) : l.value === "emailCode" ? (n(), z(Mt, {
1148
+ loading: r.loading,
1149
+ size: r.size,
1150
+ onSubmit: f
1151
+ }, null, 8, ["loading", "size"])) : l.value === "emailCode" ? (o(), z(Ft, {
1157
1152
  key: 3,
1158
- loading: o.loading,
1159
- size: o.size,
1160
- onSubmit: y
1161
- }, null, 8, ["loading", "size"])) : d.value.login.passkey ? (n(), z(e(V), {
1162
- key: 4,
1163
- modelValue: _.value,
1164
- "onUpdate:modelValue": $[1] || ($[1] = (q) => _.value = q),
1165
- size: o.size,
1166
- autocomplete: "username webauthn",
1167
- placeholder: "请选择已绑定的通行密钥"
1168
- }, null, 8, ["modelValue", "size"])) : A("", !0), g.value ? Q(v.$slots, "OAuth", {
1169
- key: 5
1170
- }, void 0, !0) : A("", !0), i(Gt, {
1171
- "show-sign-up": f.value,
1153
+ loading: r.loading,
1154
+ size: r.size,
1155
+ onSubmit: f
1156
+ }, null, 8, ["loading", "size"])) : I("", !0), g.value ? Z(y.$slots, "OAuth", {
1157
+ key: 4
1158
+ }, void 0, !0) : I("", !0), i(Gt, {
1159
+ "show-sign-up": v.value,
1172
1160
  "show-reset-password": t.value,
1173
- onSwitchSignUp: m,
1174
- onSwitchResetPassword: b
1161
+ onSwitchSignUp: w,
1162
+ onSwitchResetPassword: m
1175
1163
  }, null, 8, ["show-sign-up", "show-reset-password"])]));
1176
1164
  }
1177
- }), Kt = /* @__PURE__ */ U(Wt, [["__scopeId", "data-v-c3eb10b3"]]), Jt = {
1165
+ }), Kt = /* @__PURE__ */ U(Wt, [["__scopeId", "data-v-fc20af9d"]]), Jt = {
1178
1166
  class: "content"
1179
1167
  }, Qt = {
1180
1168
  class: "sendVerifyCodeItem"
1181
1169
  }, Xt = {
1182
1170
  class: "handle"
1183
- }, Yt = /* @__PURE__ */ C({
1171
+ }, Yt = /* @__PURE__ */ V({
1184
1172
  __name: "AuthkitEmailUpdate",
1185
1173
  props: {
1186
1174
  size: {
@@ -1198,15 +1186,15 @@ const zt = {
1198
1186
  }
1199
1187
  },
1200
1188
  emits: ["submit"],
1201
- setup(w, {
1202
- emit: r
1189
+ setup(b, {
1190
+ emit: u
1203
1191
  }) {
1204
- const u = r, {
1205
- useTermsFormField: o
1206
- } = L(), {
1192
+ const n = u, {
1193
+ useTermsFormField: r
1194
+ } = F(), {
1207
1195
  showTermsField: h,
1208
1196
  termsRules: g
1209
- } = o("signUp"), a = w, s = I(), d = I(!1), f = I(), t = I({
1197
+ } = r("signUp"), a = b, s = A(), d = A(!1), v = A(), t = A({
1210
1198
  email: void 0,
1211
1199
  userToken: void 0,
1212
1200
  emailVerifyId: void 0,
@@ -1215,33 +1203,33 @@ const zt = {
1215
1203
  inviteCode: void 0,
1216
1204
  acceptedTerms: !1
1217
1205
  });
1218
- M(() => {
1219
- const _ = Se();
1220
- _ && (t.value.inviteCode = _);
1206
+ H(() => {
1207
+ const w = ze();
1208
+ w && (t.value.inviteCode = w);
1221
1209
  });
1222
- async function c() {
1223
- if (!await f.value.validateField(["email"])) {
1210
+ async function p() {
1211
+ if (!await v.value.validateField(["email"])) {
1224
1212
  d.value = !0;
1225
- const m = await x().auth.verify.email.retry.post({
1213
+ const m = await B().auth.verify.email.retry.post({
1226
1214
  email: t.value.email,
1227
1215
  purpose: a.purpose
1228
1216
  });
1229
- d.value = !1, m.data && (t.value.emailVerifyId = m.data.emailVerifyId), W(s.value, m);
1217
+ d.value = !1, m.data && (t.value.emailVerifyId = m.data.emailVerifyId), K(s.value, m);
1230
1218
  }
1231
1219
  }
1232
1220
  async function l() {
1233
- f.value.validate().then((_) => {
1234
- _ || u("submit", t.value);
1221
+ v.value.validate().then((w) => {
1222
+ w || n("submit", t.value);
1235
1223
  });
1236
1224
  }
1237
- return (_, m) => (n(), S("div", Jt, [i(e(D), {
1225
+ return (w, m) => (o(), S("div", Jt, [i(e(E), {
1238
1226
  ref_key: "formRef",
1239
- ref: f,
1227
+ ref: v,
1240
1228
  model: t.value,
1241
1229
  size: a.size,
1242
1230
  "auto-label-width": ""
1243
1231
  }, {
1244
- default: p(() => [i(e(P), {
1232
+ default: c(() => [i(e(P), {
1245
1233
  field: "email",
1246
1234
  label: "邮箱",
1247
1235
  "hide-label": "",
@@ -1253,9 +1241,9 @@ const zt = {
1253
1241
  message: "请输入有效的邮箱"
1254
1242
  }]
1255
1243
  }, {
1256
- default: p(() => [i(e(V), {
1244
+ default: c(() => [i(e(C), {
1257
1245
  modelValue: t.value.email,
1258
- "onUpdate:modelValue": m[0] || (m[0] = (b) => t.value.email = b),
1246
+ "onUpdate:modelValue": m[0] || (m[0] = (f) => t.value.email = f),
1259
1247
  placeholder: "请输入邮箱",
1260
1248
  autocomplete: "email username",
1261
1249
  type: "email"
@@ -1270,12 +1258,12 @@ const zt = {
1270
1258
  message: "请输入验证码"
1271
1259
  }]
1272
1260
  }, {
1273
- default: p(() => [k("div", Qt, [i(e(V), {
1261
+ default: c(() => [_("div", Qt, [i(e(C), {
1274
1262
  modelValue: t.value.userToken,
1275
- "onUpdate:modelValue": m[1] || (m[1] = (b) => t.value.userToken = b),
1263
+ "onUpdate:modelValue": m[1] || (m[1] = (f) => t.value.userToken = f),
1276
1264
  placeholder: "请输入验证码",
1277
1265
  autocomplete: "one-time-code"
1278
- }, null, 8, ["modelValue"]), i(j, {
1266
+ }, null, 8, ["modelValue"]), i(W, {
1279
1267
  ref_key: "SendVerifyCodeRef",
1280
1268
  ref: s,
1281
1269
  size: a.size,
@@ -1283,7 +1271,7 @@ const zt = {
1283
1271
  style: {
1284
1272
  "margin-left": "10px"
1285
1273
  },
1286
- onSend: c
1274
+ onSend: p
1287
1275
  }, null, 8, ["size", "loading"])])]),
1288
1276
  _: 1
1289
1277
  }), i(e(P), {
@@ -1298,9 +1286,9 @@ const zt = {
1298
1286
  message: "密码不能少于10字符"
1299
1287
  }]
1300
1288
  }, {
1301
- default: p(() => [i(e(V), {
1289
+ default: c(() => [i(e(C), {
1302
1290
  modelValue: t.value.password,
1303
- "onUpdate:modelValue": m[2] || (m[2] = (b) => t.value.password = b),
1291
+ "onUpdate:modelValue": m[2] || (m[2] = (f) => t.value.password = f),
1304
1292
  placeholder: "请输入密码",
1305
1293
  type: "password",
1306
1294
  autocomplete: "new-password"
@@ -1317,14 +1305,14 @@ const zt = {
1317
1305
  minLength: 10,
1318
1306
  message: "确认密码不能少于10字符"
1319
1307
  }, {
1320
- validator: (b, y) => {
1321
- b !== t.value.password ? y("两次密码输入不一致,请重新输入") : y();
1308
+ validator: (f, y) => {
1309
+ f !== t.value.password ? y("两次密码输入不一致,请重新输入") : y();
1322
1310
  }
1323
1311
  }]
1324
1312
  }, {
1325
- default: p(() => [i(e(V), {
1313
+ default: c(() => [i(e(C), {
1326
1314
  modelValue: t.value.confirmPassword,
1327
- "onUpdate:modelValue": m[3] || (m[3] = (b) => t.value.confirmPassword = b),
1315
+ "onUpdate:modelValue": m[3] || (m[3] = (f) => t.value.confirmPassword = f),
1328
1316
  placeholder: "请输入确认密码密码",
1329
1317
  type: "password",
1330
1318
  autocomplete: "new-password"
@@ -1338,35 +1326,35 @@ const zt = {
1338
1326
  required: !1
1339
1327
  }]
1340
1328
  }, {
1341
- default: p(() => [i(e(V), {
1329
+ default: c(() => [i(e(C), {
1342
1330
  modelValue: t.value.inviteCode,
1343
- "onUpdate:modelValue": m[4] || (m[4] = (b) => t.value.inviteCode = b),
1331
+ "onUpdate:modelValue": m[4] || (m[4] = (f) => t.value.inviteCode = f),
1344
1332
  placeholder: "邀请码(可选)",
1345
1333
  autocomplete: "off"
1346
1334
  }, null, 8, ["modelValue"])]),
1347
1335
  _: 1
1348
- }), k("div", Xt, [i(e(O), {
1336
+ }), _("div", Xt, [i(e(L), {
1349
1337
  type: "primary",
1350
1338
  loading: a.loading,
1351
1339
  long: "",
1352
1340
  size: a.size,
1353
1341
  onClick: l
1354
1342
  }, {
1355
- default: p(() => [...m[6] || (m[6] = [T(" 提交 ", -1)])]),
1343
+ default: c(() => [...m[6] || (m[6] = [q(" 提交 ", -1)])]),
1356
1344
  _: 1
1357
- }, 8, ["loading", "size"]), e(h) ? (n(), z(e(P), {
1345
+ }, 8, ["loading", "size"]), e(h) ? (o(), z(e(P), {
1358
1346
  key: 0,
1359
1347
  field: "acceptedTerms",
1360
1348
  "hide-label": "",
1361
1349
  rules: e(g)
1362
1350
  }, {
1363
- default: p(() => [i(X, {
1351
+ default: c(() => [i(ee, {
1364
1352
  "accepted-terms": t.value.acceptedTerms,
1365
- "onUpdate:acceptedTerms": m[5] || (m[5] = (b) => t.value.acceptedTerms = b),
1353
+ "onUpdate:acceptedTerms": m[5] || (m[5] = (f) => t.value.acceptedTerms = f),
1366
1354
  "current-view": "signUp"
1367
1355
  }, null, 8, ["accepted-terms"])]),
1368
1356
  _: 1
1369
- }, 8, ["rules"])) : A("", !0)])]),
1357
+ }, 8, ["rules"])) : I("", !0)])]),
1370
1358
  _: 1
1371
1359
  }, 8, ["model", "size"])]));
1372
1360
  }
@@ -1378,7 +1366,7 @@ const zt = {
1378
1366
  class: "sendVerifyCodeItem"
1379
1367
  }, is = {
1380
1368
  class: "handle"
1381
- }, as = /* @__PURE__ */ C({
1369
+ }, as = /* @__PURE__ */ V({
1382
1370
  __name: "AuthkitSignUpPhone",
1383
1371
  props: {
1384
1372
  size: {
@@ -1397,15 +1385,15 @@ const zt = {
1397
1385
  }
1398
1386
  },
1399
1387
  emits: ["switchSignIn", "submit"],
1400
- setup(w, {
1401
- emit: r
1388
+ setup(b, {
1389
+ emit: u
1402
1390
  }) {
1403
- const u = r, {
1404
- useTermsFormField: o
1405
- } = L(), {
1391
+ const n = u, {
1392
+ useTermsFormField: r
1393
+ } = F(), {
1406
1394
  showTermsField: h,
1407
1395
  termsRules: g
1408
- } = o("signUp"), a = w, s = I(), d = I(!1), f = I(), t = I({
1396
+ } = r("signUp"), a = b, s = A(), d = A(!1), v = A(), t = A({
1409
1397
  phone: void 0,
1410
1398
  code: void 0,
1411
1399
  password: void 0,
@@ -1413,34 +1401,34 @@ const zt = {
1413
1401
  inviteCode: void 0,
1414
1402
  acceptedTerms: !1
1415
1403
  });
1416
- M(() => {
1417
- const b = Se();
1418
- b && (t.value.inviteCode = b);
1404
+ H(() => {
1405
+ const f = ze();
1406
+ f && (t.value.inviteCode = f);
1419
1407
  });
1420
- const c = [{
1408
+ const p = [{
1421
1409
  required: !0,
1422
1410
  message: "请输入确认密码"
1423
1411
  }, {
1424
- validator: (b, y) => {
1425
- t.value.password && b !== t.value.password ? y("两次密码输入不一致") : y();
1412
+ validator: (f, y) => {
1413
+ t.value.password && f !== t.value.password ? y("两次密码输入不一致") : y();
1426
1414
  }
1427
1415
  }];
1428
1416
  function l() {
1429
- u("switchSignIn");
1417
+ n("switchSignIn");
1430
1418
  }
1431
- async function _() {
1432
- if (!await f.value.validateField(["phone"])) {
1419
+ async function w() {
1420
+ if (!await v.value.validateField(["phone"])) {
1433
1421
  d.value = !0;
1434
- const y = await x().auth.verify.sms.send.post({
1422
+ const y = await B().auth.verify.sms.send.post({
1435
1423
  phone: t.value.phone,
1436
1424
  purpose: "signUp"
1437
1425
  });
1438
- d.value = !1, W(s.value, y);
1426
+ d.value = !1, K(s.value, y);
1439
1427
  }
1440
1428
  }
1441
1429
  async function m() {
1442
- f.value.validate().then((b) => {
1443
- b || u("submit", {
1430
+ v.value.validate().then((f) => {
1431
+ f || n("submit", {
1444
1432
  type: "phone",
1445
1433
  phone: t.value.phone,
1446
1434
  code: t.value.code,
@@ -1449,14 +1437,14 @@ const zt = {
1449
1437
  });
1450
1438
  });
1451
1439
  }
1452
- return (b, y) => (n(), S("div", es, [k("div", ts, [i(e(D), {
1440
+ return (f, y) => (o(), S("div", es, [_("div", ts, [i(e(E), {
1453
1441
  ref_key: "formRef",
1454
- ref: f,
1442
+ ref: v,
1455
1443
  model: t.value,
1456
1444
  size: a.size,
1457
1445
  "auto-label-width": ""
1458
1446
  }, {
1459
- default: p(() => [i(e(P), {
1447
+ default: c(() => [i(e(P), {
1460
1448
  field: "phone",
1461
1449
  label: "手机号",
1462
1450
  "hide-label": "",
@@ -1468,9 +1456,9 @@ const zt = {
1468
1456
  message: "请输入有效的手机号"
1469
1457
  }]
1470
1458
  }, {
1471
- default: p(() => [i(e(V), {
1459
+ default: c(() => [i(e(C), {
1472
1460
  modelValue: t.value.phone,
1473
- "onUpdate:modelValue": y[0] || (y[0] = (v) => t.value.phone = v),
1461
+ "onUpdate:modelValue": y[0] || (y[0] = (k) => t.value.phone = k),
1474
1462
  placeholder: "请输入手机号",
1475
1463
  autocomplete: "tel",
1476
1464
  type: "tel"
@@ -1485,12 +1473,12 @@ const zt = {
1485
1473
  message: "请输入验证码"
1486
1474
  }]
1487
1475
  }, {
1488
- default: p(() => [k("div", ss, [i(e(V), {
1476
+ default: c(() => [_("div", ss, [i(e(C), {
1489
1477
  modelValue: t.value.code,
1490
- "onUpdate:modelValue": y[1] || (y[1] = (v) => t.value.code = v),
1478
+ "onUpdate:modelValue": y[1] || (y[1] = (k) => t.value.code = k),
1491
1479
  placeholder: "请输入验证码",
1492
1480
  autocomplete: "one-time-code"
1493
- }, null, 8, ["modelValue"]), i(j, {
1481
+ }, null, 8, ["modelValue"]), i(W, {
1494
1482
  ref_key: "SendVerifyCodeRef",
1495
1483
  ref: s,
1496
1484
  size: a.size,
@@ -1498,10 +1486,10 @@ const zt = {
1498
1486
  style: {
1499
1487
  "margin-left": "10px"
1500
1488
  },
1501
- onSend: _
1489
+ onSend: w
1502
1490
  }, null, 8, ["size", "loading"])])]),
1503
1491
  _: 1
1504
- }), a.requirePassword ? (n(), z(e(P), {
1492
+ }), a.requirePassword ? (o(), z(e(P), {
1505
1493
  key: 0,
1506
1494
  field: "password",
1507
1495
  label: "密码",
@@ -1514,30 +1502,30 @@ const zt = {
1514
1502
  message: "密码不能少于10字符"
1515
1503
  }]
1516
1504
  }, {
1517
- default: p(() => [i(e(V), {
1505
+ default: c(() => [i(e(C), {
1518
1506
  modelValue: t.value.password,
1519
- "onUpdate:modelValue": y[2] || (y[2] = (v) => t.value.password = v),
1507
+ "onUpdate:modelValue": y[2] || (y[2] = (k) => t.value.password = k),
1520
1508
  placeholder: "请输入密码(可选)",
1521
1509
  type: "password",
1522
1510
  autocomplete: "new-password"
1523
1511
  }, null, 8, ["modelValue"])]),
1524
1512
  _: 1
1525
- }, 8, ["rules"])) : A("", !0), a.requirePassword && t.value.password ? (n(), z(e(P), {
1513
+ }, 8, ["rules"])) : I("", !0), a.requirePassword && t.value.password ? (o(), z(e(P), {
1526
1514
  key: 1,
1527
1515
  field: "confirmPassword",
1528
1516
  label: "确认密码",
1529
1517
  "hide-label": "",
1530
- rules: c
1518
+ rules: p
1531
1519
  }, {
1532
- default: p(() => [i(e(V), {
1520
+ default: c(() => [i(e(C), {
1533
1521
  modelValue: t.value.confirmPassword,
1534
- "onUpdate:modelValue": y[3] || (y[3] = (v) => t.value.confirmPassword = v),
1522
+ "onUpdate:modelValue": y[3] || (y[3] = (k) => t.value.confirmPassword = k),
1535
1523
  placeholder: "请输入确认密码",
1536
1524
  type: "password",
1537
1525
  autocomplete: "new-password"
1538
1526
  }, null, 8, ["modelValue"])]),
1539
1527
  _: 1
1540
- })) : A("", !0), i(e(P), {
1528
+ })) : I("", !0), i(e(P), {
1541
1529
  field: "inviteCode",
1542
1530
  label: "邀请码",
1543
1531
  "hide-label": "",
@@ -1545,35 +1533,35 @@ const zt = {
1545
1533
  required: !1
1546
1534
  }]
1547
1535
  }, {
1548
- default: p(() => [i(e(V), {
1536
+ default: c(() => [i(e(C), {
1549
1537
  modelValue: t.value.inviteCode,
1550
- "onUpdate:modelValue": y[4] || (y[4] = (v) => t.value.inviteCode = v),
1538
+ "onUpdate:modelValue": y[4] || (y[4] = (k) => t.value.inviteCode = k),
1551
1539
  placeholder: "邀请码(可选)",
1552
1540
  autocomplete: "off"
1553
1541
  }, null, 8, ["modelValue"])]),
1554
1542
  _: 1
1555
- }), k("div", is, [i(e(O), {
1543
+ }), _("div", is, [i(e(L), {
1556
1544
  type: "primary",
1557
1545
  loading: a.loading,
1558
1546
  long: "",
1559
1547
  size: a.size,
1560
1548
  onClick: m
1561
1549
  }, {
1562
- default: p(() => [...y[6] || (y[6] = [T(" 注册 ", -1)])]),
1550
+ default: c(() => [...y[6] || (y[6] = [q(" 注册 ", -1)])]),
1563
1551
  _: 1
1564
- }, 8, ["loading", "size"]), e(h) ? (n(), z(e(P), {
1552
+ }, 8, ["loading", "size"]), e(h) ? (o(), z(e(P), {
1565
1553
  key: 0,
1566
1554
  field: "acceptedTerms",
1567
1555
  "hide-label": "",
1568
1556
  rules: e(g)
1569
1557
  }, {
1570
- default: p(() => [i(X, {
1558
+ default: c(() => [i(ee, {
1571
1559
  "accepted-terms": t.value.acceptedTerms,
1572
- "onUpdate:acceptedTerms": y[5] || (y[5] = (v) => t.value.acceptedTerms = v),
1560
+ "onUpdate:acceptedTerms": y[5] || (y[5] = (k) => t.value.acceptedTerms = k),
1573
1561
  "current-view": "signUp"
1574
1562
  }, null, 8, ["accepted-terms"])]),
1575
1563
  _: 1
1576
- }, 8, ["rules"])) : A("", !0)])]),
1564
+ }, 8, ["rules"])) : I("", !0)])]),
1577
1565
  _: 1
1578
1566
  }, 8, ["model", "size"])]), i(fe, {
1579
1567
  onSwitchSignIn: l
@@ -1593,7 +1581,7 @@ const zt = {
1593
1581
  }, ds = {
1594
1582
  key: 2,
1595
1583
  class: "empty"
1596
- }, cs = /* @__PURE__ */ C({
1584
+ }, cs = /* @__PURE__ */ V({
1597
1585
  __name: "AuthkitSignUp",
1598
1586
  props: {
1599
1587
  size: {
@@ -1607,15 +1595,15 @@ const zt = {
1607
1595
  }
1608
1596
  },
1609
1597
  emits: ["switchSignIn", "submit"],
1610
- setup(w, {
1611
- emit: r
1598
+ setup(b, {
1599
+ emit: u
1612
1600
  }) {
1613
- const u = r, o = w, {
1601
+ const n = u, r = b, {
1614
1602
  appsData: h
1615
- } = N(), {
1603
+ } = j(), {
1616
1604
  registrationBlocked: g,
1617
1605
  signUpAuthEnabled: a
1618
- } = L(), s = R(() => h.value.authMethods), d = R(() => {
1606
+ } = F(), s = $(() => h.value.authMethods), d = $(() => {
1619
1607
  const l = [];
1620
1608
  return s.value.signUp.email && l.push({
1621
1609
  key: "email",
@@ -1624,48 +1612,48 @@ const zt = {
1624
1612
  key: "phone",
1625
1613
  title: "手机号注册"
1626
1614
  }), l;
1627
- }), f = I("email");
1615
+ }), v = A("email");
1628
1616
  re(() => {
1629
1617
  var l;
1630
- d.value.some((_) => _.key === f.value) || (f.value = ((l = d.value[0]) == null ? void 0 : l.key) || "email");
1618
+ d.value.some((w) => w.key === v.value) || (v.value = ((l = d.value[0]) == null ? void 0 : l.key) || "email");
1631
1619
  });
1632
1620
  function t() {
1633
- u("switchSignIn");
1621
+ n("switchSignIn");
1634
1622
  }
1635
- async function c(l) {
1636
- u("submit", {
1637
- type: f.value,
1623
+ async function p(l) {
1624
+ n("submit", {
1625
+ type: v.value,
1638
1626
  ...l
1639
1627
  });
1640
1628
  }
1641
- return (l, _) => (n(), S("div", ls, [d.value.length > 1 ? (n(), S("div", ns, [i(e(ce), {
1642
- "active-key": f.value,
1643
- "onUpdate:activeKey": _[0] || (_[0] = (m) => f.value = m)
1629
+ return (l, w) => (o(), S("div", ls, [d.value.length > 1 ? (o(), S("div", ns, [i(e(ce), {
1630
+ "active-key": v.value,
1631
+ "onUpdate:activeKey": w[0] || (w[0] = (m) => v.value = m)
1644
1632
  }, {
1645
- default: p(() => [(n(!0), S(F, null, ue(d.value, (m) => (n(), z(e(pe), {
1633
+ default: c(() => [(o(!0), S(D, null, ue(d.value, (m) => (o(), z(e(pe), {
1646
1634
  key: m.key,
1647
1635
  title: m.title
1648
1636
  }, null, 8, ["title"]))), 128))]),
1649
1637
  _: 1
1650
- }, 8, ["active-key"])])) : A("", !0), e(a) ? e(g) ? (n(), S("div", us, " 管理员尚未配置用户协议或隐私政策,暂无法注册。 ")) : (n(), S(F, {
1638
+ }, 8, ["active-key"])])) : I("", !0), e(a) ? e(g) ? (o(), S("div", us, " 管理员尚未配置用户协议或隐私政策,暂无法注册。 ")) : (o(), S(D, {
1651
1639
  key: 3
1652
- }, [f.value === "email" && s.value.signUp.email ? (n(), z(Zt, {
1640
+ }, [v.value === "email" && s.value.signUp.email ? (o(), z(Zt, {
1653
1641
  key: 0,
1654
- size: o.size,
1655
- loading: w.loading,
1656
- onSubmit: c
1657
- }, null, 8, ["size", "loading"])) : f.value === "phone" && s.value.signUp.phone ? (n(), z(os, {
1642
+ size: r.size,
1643
+ loading: b.loading,
1644
+ onSubmit: p
1645
+ }, null, 8, ["size", "loading"])) : v.value === "phone" && s.value.signUp.phone ? (o(), z(os, {
1658
1646
  key: 1,
1659
- size: o.size,
1660
- loading: w.loading,
1661
- onSubmit: c,
1647
+ size: r.size,
1648
+ loading: b.loading,
1649
+ onSubmit: p,
1662
1650
  onSwitchSignIn: t
1663
- }, null, 8, ["size", "loading"])) : (n(), S("div", ds, " 当前应用未开放用户注册 ")), f.value === "email" ? (n(), z(fe, {
1651
+ }, null, 8, ["size", "loading"])) : (o(), S("div", ds, " 当前应用未开放用户注册 ")), v.value === "email" ? (o(), z(fe, {
1664
1652
  key: 3,
1665
1653
  onSwitchSignIn: t
1666
- })) : A("", !0)], 64)) : (n(), S("div", rs, " 系统已停止用户注册 "))]));
1654
+ })) : I("", !0)], 64)) : (o(), S("div", rs, " 系统已停止用户注册 "))]));
1667
1655
  }
1668
- }), ps = /* @__PURE__ */ U(cs, [["__scopeId", "data-v-b211d5ef"]]), ms = ["src"], fs = /* @__PURE__ */ C({
1656
+ }), ps = /* @__PURE__ */ U(cs, [["__scopeId", "data-v-b211d5ef"]]), ms = ["src"], fs = /* @__PURE__ */ V({
1669
1657
  __name: "AuthkitAuthTitle",
1670
1658
  props: {
1671
1659
  size: {
@@ -1684,32 +1672,32 @@ const zt = {
1684
1672
  default: 60
1685
1673
  }
1686
1674
  },
1687
- setup(w) {
1688
- const r = w, u = `${r.size}px`, o = `${r.fontSize}px`, h = `${r.lineHeight}px`, {
1675
+ setup(b) {
1676
+ const u = b, n = `${u.size}px`, r = `${u.fontSize}px`, h = `${u.lineHeight}px`, {
1689
1677
  currentView: g
1690
- } = G(), {
1678
+ } = N(), {
1691
1679
  appsData: a
1692
- } = N(), s = R(() => g.value === "signIn" ? `${a.value.name}登录` : g.value === "signUp" ? `${a.value.name}账号注册` : g.value === "resetPassword" ? `${a.value.name}密码重置` : "");
1693
- return (d, f) => (n(), S("div", {
1680
+ } = j(), s = $(() => g.value === "signIn" ? `${a.value.name}登录` : g.value === "signUp" ? `${a.value.name}账号注册` : g.value === "resetPassword" ? `${a.value.name}密码重置` : "");
1681
+ return (d, v) => (o(), S("div", {
1694
1682
  class: "Title",
1695
- style: H({
1696
- fontSize: o,
1683
+ style: G({
1684
+ fontSize: r,
1697
1685
  lineHeight: h
1698
1686
  })
1699
- }, [e(a).applicationLogoUrl ? (n(), S("img", {
1687
+ }, [e(a).applicationLogoUrl ? (o(), S("img", {
1700
1688
  key: 0,
1701
1689
  src: e(a).applicationLogoUrl,
1702
1690
  srcset: "",
1703
- style: H({
1704
- width: u
1691
+ style: G({
1692
+ width: n
1705
1693
  })
1706
- }, null, 12, ms)) : A("", !0), k("span", null, B(s.value), 1), Q(d.$slots, "default", {}, void 0, !0)], 4));
1694
+ }, null, 12, ms)) : I("", !0), _("span", null, M(s.value), 1), Z(d.$slots, "default", {}, void 0, !0)], 4));
1707
1695
  }
1708
- }), Pe = /* @__PURE__ */ U(fs, [["__scopeId", "data-v-8ebe7939"]]), vs = {
1696
+ }), Ve = /* @__PURE__ */ U(fs, [["__scopeId", "data-v-8ebe7939"]]), vs = {
1709
1697
  class: "Auth"
1710
1698
  }, gs = {
1711
1699
  class: "body"
1712
- }, hs = /* @__PURE__ */ C({
1700
+ }, hs = /* @__PURE__ */ V({
1713
1701
  __name: "AuthkitAuth",
1714
1702
  props: {
1715
1703
  size: {
@@ -1721,52 +1709,52 @@ const zt = {
1721
1709
  default: () => !0
1722
1710
  }
1723
1711
  },
1724
- setup(w) {
1725
- const r = w, {
1726
- signInSubmit: u,
1727
- passkeySignInSubmit: o,
1712
+ setup(b) {
1713
+ const u = b, {
1714
+ signInSubmit: n,
1715
+ passkeySignInSubmit: r,
1728
1716
  signUpSubmit: h,
1729
1717
  resetPasswordSubmit: g,
1730
1718
  currentView: a,
1731
1719
  authSignInLoading: s,
1732
1720
  authSignUpLoading: d,
1733
- resetPasswordLoading: f,
1721
+ resetPasswordLoading: v,
1734
1722
  switchSignUp: t,
1735
- switchResetPassword: c,
1723
+ switchResetPassword: p,
1736
1724
  switchSignIn: l
1737
- } = G();
1738
- return (_, m) => (n(), S("div", vs, [w.showTitle ? (n(), z(Pe, {
1725
+ } = N();
1726
+ return (w, m) => (o(), S("div", vs, [b.showTitle ? (o(), z(Ve, {
1739
1727
  key: 0,
1740
1728
  size: 32,
1741
1729
  "font-size": 20
1742
- })) : A("", !0), k("div", gs, [e(a) === "signIn" ? (n(), z(Kt, {
1730
+ })) : I("", !0), _("div", gs, [e(a) === "signIn" ? (o(), z(Kt, {
1743
1731
  key: 0,
1744
- size: r.size,
1732
+ size: u.size,
1745
1733
  loading: e(s),
1746
1734
  onSwitchSignUp: e(t),
1747
- onSwitchResetPassword: e(c),
1748
- onSubmit: m[0] || (m[0] = (b) => e(u)(b))
1735
+ onSwitchResetPassword: e(p),
1736
+ onSubmit: m[0] || (m[0] = (f) => e(n)(f))
1749
1737
  }, {
1750
- OAuth: p(() => [i(at, {
1751
- size: r.size,
1752
- onPasskeySubmit: e(o)
1738
+ OAuth: c(() => [i(at, {
1739
+ size: u.size,
1740
+ onPasskeySubmit: e(r)
1753
1741
  }, null, 8, ["size", "onPasskeySubmit"])]),
1754
1742
  _: 1
1755
- }, 8, ["size", "loading", "onSwitchSignUp", "onSwitchResetPassword"])) : e(a) === "signUp" ? (n(), z(ps, {
1743
+ }, 8, ["size", "loading", "onSwitchSignUp", "onSwitchResetPassword"])) : e(a) === "signUp" ? (o(), z(ps, {
1756
1744
  key: 1,
1757
- size: r.size,
1745
+ size: u.size,
1758
1746
  loading: e(d),
1759
1747
  onSwitchSignIn: e(l),
1760
- onSubmit: m[1] || (m[1] = (b) => e(h)(b))
1761
- }, null, 8, ["size", "loading", "onSwitchSignIn"])) : e(a) === "resetPassword" ? (n(), z(wt, {
1748
+ onSubmit: m[1] || (m[1] = (f) => e(h)(f))
1749
+ }, null, 8, ["size", "loading", "onSwitchSignIn"])) : e(a) === "resetPassword" ? (o(), z(wt, {
1762
1750
  key: 2,
1763
- size: r.size,
1764
- loading: e(f),
1751
+ size: u.size,
1752
+ loading: e(v),
1765
1753
  onSwitchSignIn: e(l),
1766
- onSubmit: m[2] || (m[2] = (b) => e(g)(b))
1767
- }, null, 8, ["size", "loading", "onSwitchSignIn"])) : A("", !0)])]));
1754
+ onSubmit: m[2] || (m[2] = (f) => e(g)(f))
1755
+ }, null, 8, ["size", "loading", "onSwitchSignIn"])) : I("", !0)])]));
1768
1756
  }
1769
- }), ys = /* @__PURE__ */ U(hs, [["__scopeId", "data-v-60874d88"]]), bs = /* @__PURE__ */ C({
1757
+ }), ys = /* @__PURE__ */ U(hs, [["__scopeId", "data-v-41b6adcc"]]), bs = /* @__PURE__ */ V({
1770
1758
  __name: "AuthkitAuthModal",
1771
1759
  props: {
1772
1760
  size: {
@@ -1774,28 +1762,28 @@ const zt = {
1774
1762
  }
1775
1763
  },
1776
1764
  emits: ["close"],
1777
- setup(w, {
1778
- emit: r
1765
+ setup(b, {
1766
+ emit: u
1779
1767
  }) {
1780
- const u = r, {
1781
- onSignIn: o,
1768
+ const n = u, {
1769
+ onSignIn: r,
1782
1770
  switchSignIn: h
1783
- } = G(), {
1771
+ } = N(), {
1784
1772
  close: g
1785
- } = we();
1773
+ } = _e();
1786
1774
  let a = null;
1787
- M(() => {
1788
- a = o(() => g());
1775
+ H(() => {
1776
+ a = r(() => g());
1789
1777
  }), de(() => {
1790
1778
  a == null || a(), a = null;
1791
1779
  });
1792
- function s(f) {
1793
- f || d();
1780
+ function s(v) {
1781
+ v || d();
1794
1782
  }
1795
1783
  function d() {
1796
- h(), g(), u("close");
1784
+ h(), g(), n("close");
1797
1785
  }
1798
- return (f, t) => (n(), z(e(xe), {
1786
+ return (v, t) => (o(), z(e(xe), {
1799
1787
  visible: !0,
1800
1788
  footer: !1,
1801
1789
  "mask-closable": !1,
@@ -1805,52 +1793,52 @@ const zt = {
1805
1793
  "onUpdate:visible": s,
1806
1794
  onClose: d
1807
1795
  }, {
1808
- title: p(() => [i(Pe)]),
1809
- default: p(() => [i(ys, {
1796
+ title: c(() => [i(Ve)]),
1797
+ default: c(() => [i(ys, {
1810
1798
  "show-title": !1,
1811
- size: w.size
1799
+ size: b.size
1812
1800
  }, null, 8, ["size"])]),
1813
1801
  _: 1
1814
1802
  }));
1815
1803
  }
1816
1804
  }), ws = /* @__PURE__ */ U(bs, [["__scopeId", "data-v-19a4d5d0"]]);
1817
- function Ve(w, r = {}) {
1805
+ function Ce(b, u = {}) {
1818
1806
  const {
1819
- bindIdentityRedirect: u = "",
1820
- closePopupOnBindSuccess: o = !0,
1807
+ bindIdentityRedirect: n = "",
1808
+ closePopupOnBindSuccess: r = !0,
1821
1809
  restoreRedirectAfterSignIn: h = !0,
1822
1810
  defaultRedirect: g = ""
1823
- } = r, a = I(!1), {
1811
+ } = u, a = A(!1), {
1824
1812
  completeSignIn: s
1825
- } = G();
1813
+ } = N();
1826
1814
  async function d() {
1827
1815
  if (typeof window > "u")
1828
1816
  return !1;
1829
- const f = new URL(window.location.href);
1830
- if (!ze(f))
1817
+ const v = new URL(window.location.href);
1818
+ if (!Ie(v))
1831
1819
  return !1;
1832
- const t = f.searchParams.get("error");
1820
+ const t = v.searchParams.get("error");
1833
1821
  if (t)
1834
- return window.history.replaceState({}, "", oe(f)), le.error(t), !0;
1835
- if (f.searchParams.get("bindSuccess") === "true") {
1836
- const l = f.searchParams.get("provider");
1837
- return window.history.replaceState({}, "", oe(f)), le.success(l ? `${l} 绑定成功` : "绑定成功"), o && window.opener && setTimeout(() => window.close(), 800), !0;
1822
+ return window.history.replaceState({}, "", ne(v)), ae.error(t), !0;
1823
+ if (v.searchParams.get("bindSuccess") === "true") {
1824
+ const l = v.searchParams.get("provider");
1825
+ return window.history.replaceState({}, "", ne(v)), ae.success(l ? `${l} 绑定成功` : "绑定成功"), r && window.opener && setTimeout(() => window.close(), 800), !0;
1838
1826
  }
1839
- const c = f.searchParams.get("token");
1840
- if (!c)
1827
+ const p = v.searchParams.get("token");
1828
+ if (!p)
1841
1829
  return !1;
1842
1830
  a.value = !0;
1843
1831
  try {
1844
- const l = f.searchParams.get("userId"), _ = f.searchParams.get("appId"), m = f.searchParams.get("needBindIdentity") === "true";
1845
- if (window.history.replaceState({}, "", oe(f)), s({
1846
- jwtToken: c,
1832
+ const l = v.searchParams.get("userId"), w = v.searchParams.get("appId"), m = v.searchParams.get("needBindIdentity") === "true";
1833
+ if (window.history.replaceState({}, "", ne(v)), s({
1834
+ jwtToken: p,
1847
1835
  userId: l,
1848
- appId: _,
1836
+ appId: w,
1849
1837
  needBindIdentity: m
1850
- }), m && u)
1851
- return await w.replace(u), !0;
1838
+ }), m && n)
1839
+ return await b.replace(n), !0;
1852
1840
  const y = Ge(h) || g;
1853
- return y && await w.replace(y), !0;
1841
+ return y && await b.replace(y), !0;
1854
1842
  } finally {
1855
1843
  a.value = !1;
1856
1844
  }
@@ -1865,7 +1853,7 @@ const _s = {
1865
1853
  class: "AuthkitOAuthCallbackOverlay",
1866
1854
  "aria-live": "polite",
1867
1855
  "aria-busy": "true"
1868
- }, ks = /* @__PURE__ */ C({
1856
+ }, ks = /* @__PURE__ */ V({
1869
1857
  __name: "AuthkitOAuthCallbackProvider",
1870
1858
  props: {
1871
1859
  bindIdentityRedirect: {
@@ -1880,28 +1868,28 @@ const _s = {
1880
1868
  default: !0
1881
1869
  }
1882
1870
  },
1883
- setup(w) {
1884
- const r = w, u = be(), {
1885
- processing: o,
1871
+ setup(b) {
1872
+ const u = b, n = we(), {
1873
+ processing: r,
1886
1874
  handleOAuthCallback: h
1887
- } = Ve(u, {
1888
- bindIdentityRedirect: r.bindIdentityRedirect,
1889
- closePopupOnBindSuccess: r.closePopupOnBindSuccess,
1890
- restoreRedirectAfterSignIn: r.restoreRedirectAfterSignIn
1875
+ } = Ce(n, {
1876
+ bindIdentityRedirect: u.bindIdentityRedirect,
1877
+ closePopupOnBindSuccess: u.closePopupOnBindSuccess,
1878
+ restoreRedirectAfterSignIn: u.restoreRedirectAfterSignIn
1891
1879
  });
1892
- return M(() => {
1880
+ return H(() => {
1893
1881
  h();
1894
- }), (g, a) => (n(), z(Te, {
1882
+ }), (g, a) => (o(), z(Te, {
1895
1883
  to: "body"
1896
- }, [e(o) ? (n(), S("div", _s, [...a[0] || (a[0] = [k("div", {
1884
+ }, [e(r) ? (o(), S("div", _s, [...a[0] || (a[0] = [_("div", {
1897
1885
  class: "AuthkitOAuthCallbackOverlay__panel"
1898
- }, [k("div", {
1886
+ }, [_("div", {
1899
1887
  class: "AuthkitOAuthCallbackOverlay__spinner"
1900
- }), k("p", {
1888
+ }), _("p", {
1901
1889
  class: "AuthkitOAuthCallbackOverlay__text"
1902
- }, "正在登录...")], -1)])])) : A("", !0)]));
1890
+ }, "正在登录...")], -1)])])) : I("", !0)]));
1903
1891
  }
1904
- }), Ss = /* @__PURE__ */ U(ks, [["__scopeId", "data-v-7162b776"]]), vi = /* @__PURE__ */ C({
1892
+ }), Ss = /* @__PURE__ */ U(ks, [["__scopeId", "data-v-7162b776"]]), vi = /* @__PURE__ */ V({
1905
1893
  __name: "AuthkitProvider",
1906
1894
  props: {
1907
1895
  handleOAuthCallback: {
@@ -1936,83 +1924,83 @@ const _s = {
1936
1924
  }
1937
1925
  },
1938
1926
  emits: ["toPrivacyPolicy", "toUserServiceAgreement"],
1939
- setup(w, {
1940
- emit: r
1927
+ setup(b, {
1928
+ emit: u
1941
1929
  }) {
1942
1930
  const {
1943
- config: u
1944
- } = me(), o = w, h = r, g = qe(), {
1931
+ config: n
1932
+ } = me(), r = b, h = u, g = qe(), {
1945
1933
  openLegalDoc: a
1946
- } = Ie({
1934
+ } = Ae({
1947
1935
  route: g
1948
1936
  }), {
1949
1937
  isOpen: s
1950
- } = we(), {
1938
+ } = _e(), {
1951
1939
  restoreSession: d,
1952
- onSignIn: f,
1940
+ onSignIn: v,
1953
1941
  onSignOut: t
1954
- } = G(), {
1955
- fetchUserProfile: c,
1942
+ } = N(), {
1943
+ fetchUserProfile: p,
1956
1944
  clearUserProfile: l,
1957
- markAuthSessionBootstrapped: _
1958
- } = Ae(), {
1945
+ markAuthSessionBootstrapped: w
1946
+ } = Pe(), {
1959
1947
  appsAuthPageInfoApi: m
1960
- } = N(), b = f(() => {
1961
- c();
1948
+ } = j(), f = v(() => {
1949
+ p();
1962
1950
  }), y = t(() => {
1963
1951
  l();
1964
1952
  });
1965
- function v() {
1966
- if (u.legalDocsMode === "builtin") {
1953
+ function k() {
1954
+ if (n.legalDocsMode === "builtin") {
1967
1955
  a("privacyPolicy");
1968
1956
  return;
1969
1957
  }
1970
1958
  h("toPrivacyPolicy");
1971
1959
  }
1972
- function $() {
1973
- if (u.legalDocsMode === "builtin") {
1960
+ function T() {
1961
+ if (n.legalDocsMode === "builtin") {
1974
1962
  a("userServiceAgreement");
1975
1963
  return;
1976
1964
  }
1977
1965
  h("toUserServiceAgreement");
1978
1966
  }
1979
- let q = null;
1980
- async function E() {
1967
+ let x = null;
1968
+ async function R() {
1981
1969
  try {
1982
- if (o.fetchAppInfo && m(), o.restoreSession && d()) {
1983
- await c();
1970
+ if (r.fetchAppInfo && m(), r.restoreSession && d()) {
1971
+ await p();
1984
1972
  return;
1985
1973
  }
1986
1974
  l();
1987
1975
  } finally {
1988
- _();
1976
+ w();
1989
1977
  }
1990
1978
  }
1991
- function Y() {
1992
- return q || (q = E()), q;
1979
+ function O() {
1980
+ return x || (x = R()), x;
1993
1981
  }
1994
- return typeof window < "u" && Y(), M(() => {
1982
+ return typeof window < "u" && O(), H(() => {
1995
1983
  _t({
1996
- onPrivacyPolicy: v,
1997
- onUserServiceAgreement: $
1984
+ onPrivacyPolicy: k,
1985
+ onUserServiceAgreement: T
1998
1986
  });
1999
1987
  }), de(() => {
2000
- b(), y();
2001
- }), (Ce, Ns) => (n(), S(F, null, [Q(Ce.$slots, "default"), o.handleOAuthCallback ? (n(), z(Ss, {
1988
+ f(), y();
1989
+ }), (J, Ns) => (o(), S(D, null, [Z(J.$slots, "default"), r.handleOAuthCallback ? (o(), z(Ss, {
2002
1990
  key: 0,
2003
- "bind-identity-redirect": o.bindIdentityRedirect,
2004
- "close-popup-on-bind-success": o.closePopupOnBindSuccess,
2005
- "restore-redirect-after-sign-in": o.restoreRedirectAfterSignIn
2006
- }, null, 8, ["bind-identity-redirect", "close-popup-on-bind-success", "restore-redirect-after-sign-in"])) : A("", !0), o.showAuthModal && e(s) ? (n(), z(ws, {
1991
+ "bind-identity-redirect": r.bindIdentityRedirect,
1992
+ "close-popup-on-bind-success": r.closePopupOnBindSuccess,
1993
+ "restore-redirect-after-sign-in": r.restoreRedirectAfterSignIn
1994
+ }, null, 8, ["bind-identity-redirect", "close-popup-on-bind-success", "restore-redirect-after-sign-in"])) : I("", !0), r.showAuthModal && e(s) ? (o(), z(ws, {
2007
1995
  key: 1,
2008
- size: o.authModalSize
2009
- }, null, 8, ["size"])) : A("", !0)], 64));
1996
+ size: r.authModalSize
1997
+ }, null, 8, ["size"])) : I("", !0)], 64));
2010
1998
  }
2011
1999
  }), zs = {
2012
2000
  class: "header"
2013
2001
  }, Is = ["href"], As = {
2014
2002
  class: "container"
2015
- }, Ps = /* @__PURE__ */ C({
2003
+ }, Ps = /* @__PURE__ */ V({
2016
2004
  __name: "AuthkitAuthContainer",
2017
2005
  props: {
2018
2006
  applicationLogoUrl: {
@@ -2054,24 +2042,24 @@ const _s = {
2054
2042
  default: "color"
2055
2043
  }
2056
2044
  },
2057
- setup(w) {
2058
- const r = w, u = R(() => r.backgroundType === "color" ? {
2059
- backgroundColor: r.backgroundColor
2045
+ setup(b) {
2046
+ const u = b, n = $(() => u.backgroundType === "color" ? {
2047
+ backgroundColor: u.backgroundColor
2060
2048
  } : {
2061
- backgroundImage: `url(${r.backgroundImage})`
2049
+ backgroundImage: `url(${u.backgroundImage})`
2062
2050
  });
2063
- return (o, h) => (n(), S("div", {
2051
+ return (r, h) => (o(), S("div", {
2064
2052
  class: "auth",
2065
- style: H(u.value)
2066
- }, [k("div", zs, [r.name ? (n(), S("a", {
2053
+ style: G(n.value)
2054
+ }, [_("div", zs, [u.name ? (o(), S("a", {
2067
2055
  key: 0,
2068
- href: r.appHomePage,
2056
+ href: u.appHomePage,
2069
2057
  target: "_self",
2070
2058
  class: "link",
2071
- style: H({
2072
- color: r.linkColor
2059
+ style: G({
2060
+ color: u.linkColor
2073
2061
  })
2074
- }, " 返回主页 ", 12, Is)) : A("", !0)]), k("div", As, [Q(o.$slots, "default", {}, void 0, !0)])], 4));
2062
+ }, " 返回主页 ", 12, Is)) : I("", !0)]), _("div", As, [Z(r.$slots, "default", {}, void 0, !0)])], 4));
2075
2063
  }
2076
2064
  }), gi = /* @__PURE__ */ U(Ps, [["__scopeId", "data-v-0e13d3ff"]]), Vs = {
2077
2065
  class: "box"
@@ -2086,7 +2074,7 @@ const _s = {
2086
2074
  "font-weight": "bold",
2087
2075
  "font-size": "12px"
2088
2076
  }
2089
- }, Ts = /* @__PURE__ */ C({
2077
+ }, Ts = /* @__PURE__ */ V({
2090
2078
  __name: "AuthkitAuthorize",
2091
2079
  props: {
2092
2080
  size: {
@@ -2134,8 +2122,8 @@ const _s = {
2134
2122
  default: () => ""
2135
2123
  }
2136
2124
  },
2137
- setup(w) {
2138
- const r = I(!1), u = w, o = I({
2125
+ setup(b) {
2126
+ const u = A(!1), n = b, r = A({
2139
2127
  name: "",
2140
2128
  homePageUrl: "",
2141
2129
  createAt: "",
@@ -2145,8 +2133,8 @@ const _s = {
2145
2133
  const {
2146
2134
  data: a,
2147
2135
  error: s
2148
- } = await x().auth.apps.authPageInfo.post({});
2149
- s || !a || (o.value = {
2136
+ } = await B().auth.apps.authPageInfo.post({});
2137
+ s || !a || (r.value = {
2150
2138
  name: a.name,
2151
2139
  homePageUrl: a.homePageUrl || "",
2152
2140
  createAt: "",
@@ -2155,50 +2143,50 @@ const _s = {
2155
2143
  }
2156
2144
  h();
2157
2145
  async function g() {
2158
- r.value = !0;
2146
+ u.value = !0;
2159
2147
  const {
2160
2148
  data: a,
2161
2149
  error: s
2162
- } = await x().auth.oauth2.authorize.post({
2163
- client_id: u.clientId,
2164
- response_type: u.responseType,
2165
- scope: u.scope,
2166
- state: u.state,
2167
- redirect_uri: u.redirectUri
2150
+ } = await B().auth.oauth2.authorize.post({
2151
+ client_id: n.clientId,
2152
+ response_type: n.responseType,
2153
+ scope: n.scope,
2154
+ state: n.state,
2155
+ redirect_uri: n.redirectUri
2168
2156
  });
2169
- if (r.value = !1, s || !a)
2157
+ if (u.value = !1, s || !a)
2170
2158
  return;
2171
2159
  const d = a;
2172
2160
  window.location.href = d.authorizeUrl;
2173
2161
  }
2174
- return (a, s) => (n(), S("div", Vs, [k("div", Cs, B(`授权 ${o.value.name}`), 1), k("div", Us, [i(e(Be), null, {
2175
- default: p(() => [i(e(ie), null, {
2176
- default: p(() => {
2162
+ return (a, s) => (o(), S("div", Vs, [_("div", Cs, M(`授权 ${r.value.name}`), 1), _("div", Us, [i(e(Le), null, {
2163
+ default: c(() => [i(e(oe), null, {
2164
+ default: c(() => {
2177
2165
  var d;
2178
- return [i(e(ae), {
2179
- title: o.value.name,
2180
- description: `想要使用您的${(d = u.userInfo) == null ? void 0 : d.nickname}账户`
2166
+ return [i(e(le), {
2167
+ title: r.value.name,
2168
+ description: `想要使用您的${(d = n.userInfo) == null ? void 0 : d.nickname}账户`
2181
2169
  }, {
2182
- avatar: p(() => {
2183
- var f;
2184
- return [i(e(ee), {
2170
+ avatar: c(() => {
2171
+ var v;
2172
+ return [i(e(te), {
2185
2173
  shape: "square",
2186
- "image-url": (f = u.userInfo) == null ? void 0 : f.avatar
2174
+ "image-url": (v = n.userInfo) == null ? void 0 : v.avatar
2187
2175
  }, null, 8, ["image-url"])];
2188
2176
  }),
2189
2177
  _: 1
2190
2178
  }, 8, ["title", "description"])];
2191
2179
  }),
2192
2180
  _: 1
2193
- }), i(e(ie), null, {
2194
- default: p(() => [i(e(ae), {
2181
+ }), i(e(oe), null, {
2182
+ default: c(() => [i(e(le), {
2195
2183
  title: "公开信息",
2196
2184
  description: "头像、昵称"
2197
2185
  }, {
2198
- avatar: p(() => [i(e(ee), {
2186
+ avatar: c(() => [i(e(te), {
2199
2187
  shape: "square"
2200
2188
  }, {
2201
- default: p(() => [...s[0] || (s[0] = [k("img", {
2189
+ default: c(() => [...s[0] || (s[0] = [_("img", {
2202
2190
  alt: "avatar",
2203
2191
  src: "https://p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/3ee5f13fb09879ecb5185e440cef6eb9.png~tplv-uwbnlip3yd-webp.webp"
2204
2192
  }, null, -1)])]),
@@ -2207,15 +2195,15 @@ const _s = {
2207
2195
  _: 1
2208
2196
  })]),
2209
2197
  _: 1
2210
- }), i(e(ie), null, {
2211
- default: p(() => [i(e(ae), {
2198
+ }), i(e(oe), null, {
2199
+ default: c(() => [i(e(le), {
2212
2200
  title: "个人用户数据",
2213
2201
  description: "电子邮件地址"
2214
2202
  }, {
2215
- avatar: p(() => [i(e(ee), {
2203
+ avatar: c(() => [i(e(te), {
2216
2204
  shape: "square"
2217
2205
  }, {
2218
- default: p(() => [...s[1] || (s[1] = [k("img", {
2206
+ default: c(() => [...s[1] || (s[1] = [_("img", {
2219
2207
  alt: "avatar",
2220
2208
  src: "https://p1-arco.byteimg.com/tos-cn-i-uwbnlip3yd/3ee5f13fb09879ecb5185e440cef6eb9.png~tplv-uwbnlip3yd-webp.webp"
2221
2209
  }, null, -1)])]),
@@ -2226,17 +2214,17 @@ const _s = {
2226
2214
  _: 1
2227
2215
  })]),
2228
2216
  _: 1
2229
- }), i(e(O), {
2217
+ }), i(e(L), {
2230
2218
  type: "primary",
2231
- size: u.size,
2232
- loading: r.value,
2219
+ size: n.size,
2220
+ loading: u.value,
2233
2221
  onClick: g
2234
2222
  }, {
2235
- default: p(() => [...s[2] || (s[2] = [T(" 授权 ", -1)])]),
2223
+ default: c(() => [...s[2] || (s[2] = [q(" 授权 ", -1)])]),
2236
2224
  _: 1
2237
- }, 8, ["size", "loading"]), k("div", $s, [s[3] || (s[3] = k("div", {
2225
+ }, 8, ["size", "loading"]), _("div", $s, [s[3] || (s[3] = _("div", {
2238
2226
  class: "redirect-hint"
2239
- }, "授权后将跳转至", -1)), k("div", Rs, B(o.value.authorizationCallback), 1)])])]));
2227
+ }, "授权后将跳转至", -1)), _("div", Rs, M(r.value.authorizationCallback), 1)])])]));
2240
2228
  }
2241
2229
  }), hi = /* @__PURE__ */ U(Ts, [["__scopeId", "data-v-6c1792d3"]]), qs = {
2242
2230
  class: "oauth-callback"
@@ -2246,10 +2234,10 @@ const _s = {
2246
2234
  }, xs = {
2247
2235
  key: 1,
2248
2236
  class: "callback-error"
2249
- }, Bs = {
2237
+ }, Ls = {
2250
2238
  key: 2,
2251
2239
  class: "callback-success"
2252
- }, Ls = /* @__PURE__ */ C({
2240
+ }, Bs = /* @__PURE__ */ V({
2253
2241
  __name: "AuthkitOauthCallback",
2254
2242
  props: {
2255
2243
  defaultRedirect: {},
@@ -2257,62 +2245,62 @@ const _s = {
2257
2245
  bindIdentityRedirect: {}
2258
2246
  },
2259
2247
  emits: ["success", "error", "needBindIdentity"],
2260
- setup(w, {
2261
- emit: r
2248
+ setup(b, {
2249
+ emit: u
2262
2250
  }) {
2263
- const u = w, o = r, h = I("登录成功,正在跳转..."), g = I(""), {
2251
+ const n = b, r = u, h = A("登录成功,正在跳转..."), g = A(""), {
2264
2252
  restoreSession: a
2265
- } = G(), s = be(), {
2253
+ } = N(), s = we(), {
2266
2254
  processing: d,
2267
- handleOAuthCallback: f
2268
- } = Ve(s, {
2269
- bindIdentityRedirect: u.bindIdentityRedirect,
2270
- defaultRedirect: u.defaultRedirect
2255
+ handleOAuthCallback: v
2256
+ } = Ce(s, {
2257
+ bindIdentityRedirect: n.bindIdentityRedirect,
2258
+ defaultRedirect: n.defaultRedirect
2271
2259
  });
2272
2260
  async function t() {
2273
2261
  const l = new URL(window.location.href);
2274
- if (!ze(l)) {
2262
+ if (!Ie(l)) {
2275
2263
  if (a()) {
2276
- await s.replace(u.defaultRedirect || "/");
2264
+ await s.replace(n.defaultRedirect || "/");
2277
2265
  return;
2278
2266
  }
2279
2267
  g.value = "无效的访问";
2280
2268
  return;
2281
2269
  }
2282
- const _ = l.searchParams.get("error");
2283
- if (_) {
2284
- g.value = _, o("error", _), await f();
2270
+ const w = l.searchParams.get("error");
2271
+ if (w) {
2272
+ g.value = w, r("error", w), await v();
2285
2273
  return;
2286
2274
  }
2287
- await f() || (g.value = "登录失败:未收到认证令牌", o("error", g.value));
2275
+ await v() || (g.value = "登录失败:未收到认证令牌", r("error", g.value));
2288
2276
  }
2289
- function c() {
2290
- s.replace(u.defaultRedirect || "/");
2277
+ function p() {
2278
+ s.replace(n.defaultRedirect || "/");
2291
2279
  }
2292
- return M(() => {
2280
+ return H(() => {
2293
2281
  t();
2294
- }), (l, _) => (n(), S("div", qs, [e(d) ? (n(), S("div", Os, [_[0] || (_[0] = k("div", {
2282
+ }), (l, w) => (o(), S("div", qs, [e(d) ? (o(), S("div", Os, [w[0] || (w[0] = _("div", {
2295
2283
  class: "spinner"
2296
- }, null, -1)), k("p", null, B(u.loadingText ?? "正在登录..."), 1)])) : g.value ? (n(), S("div", xs, [_[1] || (_[1] = k("div", {
2284
+ }, null, -1)), _("p", null, M(n.loadingText ?? "正在登录..."), 1)])) : g.value ? (o(), S("div", xs, [w[1] || (w[1] = _("div", {
2297
2285
  class: "error-icon"
2298
- }, "✕", -1)), _[2] || (_[2] = k("h2", null, "登录失败", -1)), k("p", null, B(g.value), 1), k("button", {
2286
+ }, "✕", -1)), w[2] || (w[2] = _("h2", null, "登录失败", -1)), _("p", null, M(g.value), 1), _("button", {
2299
2287
  class: "retry-btn",
2300
2288
  type: "button",
2301
- onClick: c
2302
- }, "返回重试")])) : (n(), S("div", Bs, [_[3] || (_[3] = k("div", {
2289
+ onClick: p
2290
+ }, "返回重试")])) : (o(), S("div", Ls, [w[3] || (w[3] = _("div", {
2303
2291
  class: "success-icon"
2304
- }, "✓", -1)), k("p", null, B(h.value), 1)]))]));
2292
+ }, "✓", -1)), _("p", null, M(h.value), 1)]))]));
2305
2293
  }
2306
- }), yi = /* @__PURE__ */ U(Ls, [["__scopeId", "data-v-98babf68"]]), Fs = {
2294
+ }), yi = /* @__PURE__ */ U(Bs, [["__scopeId", "data-v-98babf68"]]), Ms = {
2307
2295
  class: "oauth-binding-account"
2308
- }, Ms = {
2296
+ }, Fs = {
2309
2297
  key: 1,
2310
2298
  class: "oauth-binding-account__icon"
2311
2299
  }, Ds = {
2312
2300
  class: "oauth-binding-account__info"
2313
- }, Es = {
2301
+ }, Hs = {
2314
2302
  class: "oauth-binding-account__name"
2315
- }, Hs = /* @__PURE__ */ C({
2303
+ }, Es = /* @__PURE__ */ V({
2316
2304
  __name: "AuthkitGithubBinding",
2317
2305
  props: {
2318
2306
  size: {
@@ -2320,153 +2308,153 @@ const _s = {
2320
2308
  required: !0
2321
2309
  }
2322
2310
  },
2323
- setup(w) {
2311
+ setup(b) {
2324
2312
  const {
2325
- config: r
2313
+ config: u
2326
2314
  } = me(), {
2327
- userProfile: u,
2328
- fetchUserProfile: o
2329
- } = Ae(), h = I("hidden"), g = I(!1);
2315
+ userProfile: n,
2316
+ fetchUserProfile: r
2317
+ } = Pe(), h = A("hidden"), g = A(!1);
2330
2318
  let a;
2331
- const s = w, d = R(() => {
2332
- var b, y, v;
2333
- return ((y = (b = u.value) == null ? void 0 : b.github) == null ? void 0 : y.avatar_url) || ((v = u.value) == null ? void 0 : v.avatar) || "";
2319
+ const s = b, d = $(() => {
2320
+ var f, y, k;
2321
+ return ((y = (f = n.value) == null ? void 0 : f.github) == null ? void 0 : y.avatar_url) || ((k = n.value) == null ? void 0 : k.avatar) || "";
2334
2322
  }), {
2335
- buildBindOauthRedirectUri: f
2336
- } = ke();
2337
- function t(b) {
2338
- h.value = b;
2339
- }
2340
- async function c() {
2341
- const b = r.appId;
2342
- if (!b) {
2323
+ buildBindOauthRedirectUri: v
2324
+ } = Se();
2325
+ function t(f) {
2326
+ h.value = f;
2327
+ }
2328
+ async function p() {
2329
+ const f = u.appId;
2330
+ if (!f) {
2343
2331
  console.error("GitHub OAuth 失败: appId 未配置");
2344
2332
  return;
2345
2333
  }
2346
2334
  const {
2347
2335
  data: y,
2348
- error: v
2349
- } = await x().auth.oauth.github.login.get({
2350
- appId: b,
2336
+ error: k
2337
+ } = await B().auth.oauth.github.login.get({
2338
+ appId: f,
2351
2339
  mode: "bind",
2352
- redirectUri: f()
2340
+ redirectUri: v()
2353
2341
  });
2354
- v || !y || (g.value = !0, window.open(y.redirectUri, "_blank"));
2342
+ k || !y || (g.value = !0, window.open(y.redirectUri, "_blank"));
2355
2343
  }
2356
2344
  async function l() {
2357
2345
  const {
2358
- error: b
2359
- } = await x().auth.users.unbind.oauth.post({
2346
+ error: f
2347
+ } = await B().auth.users.unbind.oauth.post({
2360
2348
  provider: "github"
2361
2349
  });
2362
- b || (le.success("解绑成功"), h.value = "hidden", o());
2350
+ f || (ae.success("解绑成功"), h.value = "hidden", r());
2363
2351
  }
2364
- function _() {
2365
- h.value === "bind" && (h.value = "hidden", c()), h.value === "unbind" && l();
2352
+ function w() {
2353
+ h.value === "bind" && (h.value = "hidden", p()), h.value === "unbind" && l();
2366
2354
  }
2367
2355
  function m() {
2368
- g.value && o();
2356
+ g.value && r();
2369
2357
  }
2370
- return M(() => {
2371
- u.value || o(), a = setInterval(m, 1e3);
2358
+ return H(() => {
2359
+ n.value || r(), a = setInterval(m, 1e3);
2372
2360
  }), de(() => {
2373
2361
  a && clearInterval(a);
2374
- }), (b, y) => {
2375
- var v, $, q;
2376
- return n(), S(F, null, [!((v = e(u)) != null && v.github) && h.value === "hidden" ? (n(), z(e(ve), {
2362
+ }), (f, y) => {
2363
+ var k, T, x;
2364
+ return o(), S(D, null, [!((k = e(n)) != null && k.github) && h.value === "hidden" ? (o(), z(e(ve), {
2377
2365
  key: 0,
2378
2366
  title: "绑定GitHub"
2379
2367
  }, {
2380
- action: p(() => [i(e(O), {
2368
+ action: c(() => [i(e(L), {
2381
2369
  size: s.size,
2382
2370
  type: "primary",
2383
- onClick: y[0] || (y[0] = (E) => t("bind"))
2371
+ onClick: y[0] || (y[0] = (R) => t("bind"))
2384
2372
  }, {
2385
- default: p(() => [...y[2] || (y[2] = [T(" 绑定GitHub ", -1)])]),
2373
+ default: c(() => [...y[2] || (y[2] = [q(" 绑定GitHub ", -1)])]),
2386
2374
  _: 1
2387
2375
  }, 8, ["size"])]),
2388
- default: p(() => [y[3] || (y[3] = T(" 您还未绑定GitHub账号,请点击绑定。 ", -1))]),
2376
+ default: c(() => [y[3] || (y[3] = q(" 您还未绑定GitHub账号,请点击绑定。 ", -1))]),
2389
2377
  _: 1
2390
- })) : A("", !0), ($ = e(u)) != null && $.github && h.value === "hidden" ? (n(), z(e(ve), {
2378
+ })) : I("", !0), (T = e(n)) != null && T.github && h.value === "hidden" ? (o(), z(e(ve), {
2391
2379
  key: 1,
2392
2380
  title: "解绑GitHub"
2393
2381
  }, {
2394
- action: p(() => [i(e(O), {
2382
+ action: c(() => [i(e(L), {
2395
2383
  size: s.size,
2396
2384
  type: "primary",
2397
- onClick: y[1] || (y[1] = (E) => t("unbind"))
2385
+ onClick: y[1] || (y[1] = (R) => t("unbind"))
2398
2386
  }, {
2399
- default: p(() => [...y[5] || (y[5] = [T(" 解绑GitHub ", -1)])]),
2387
+ default: c(() => [...y[5] || (y[5] = [q(" 解绑GitHub ", -1)])]),
2400
2388
  _: 1
2401
2389
  }, 8, ["size"])]),
2402
- default: p(() => {
2403
- var E, Y;
2404
- return [k("div", Fs, [d.value ? (n(), z(e(ee), {
2390
+ default: c(() => {
2391
+ var R, O;
2392
+ return [_("div", Ms, [d.value ? (o(), z(e(te), {
2405
2393
  key: 0,
2406
2394
  class: "oauth-binding-account__avatar",
2407
2395
  "image-url": d.value,
2408
2396
  size: 42
2409
- }, null, 8, ["image-url"])) : (n(), S("div", Ms, [i(_e, {
2410
- icon: e(K).github,
2397
+ }, null, 8, ["image-url"])) : (o(), S("div", Fs, [i(ke, {
2398
+ icon: e(X).github,
2411
2399
  size: e(Ne),
2412
2400
  alt: "GitHub"
2413
- }, null, 8, ["icon", "size"])])), k("div", Ds, [y[4] || (y[4] = k("div", {
2401
+ }, null, 8, ["icon", "size"])])), _("div", Ds, [y[4] || (y[4] = _("div", {
2414
2402
  class: "oauth-binding-account__provider"
2415
- }, "GitHub", -1)), k("div", Es, B(((Y = (E = e(u)) == null ? void 0 : E.github) == null ? void 0 : Y.login) || "GitHub"), 1)])])];
2403
+ }, "GitHub", -1)), _("div", Hs, M(((O = (R = e(n)) == null ? void 0 : R.github) == null ? void 0 : O.login) || "GitHub"), 1)])])];
2416
2404
  }),
2417
2405
  _: 1
2418
- })) : A("", !0), h.value === "bind" || h.value === "unbind" ? (n(), z(je, {
2406
+ })) : I("", !0), h.value === "bind" || h.value === "unbind" ? (o(), z(je, {
2419
2407
  key: 2,
2420
2408
  size: s.size,
2421
- email: (q = e(u)) == null ? void 0 : q.email,
2422
- onNext: _
2423
- }, null, 8, ["size", "email"])) : A("", !0)], 64);
2409
+ email: (x = e(n)) == null ? void 0 : x.email,
2410
+ onNext: w
2411
+ }, null, 8, ["size", "email"])) : I("", !0)], 64);
2424
2412
  };
2425
2413
  }
2426
- }), bi = /* @__PURE__ */ U(Hs, [["__scopeId", "data-v-1cfa8892"]]), Gs = /* @__PURE__ */ C({
2414
+ }), bi = /* @__PURE__ */ U(Es, [["__scopeId", "data-v-1cfa8892"]]), Gs = /* @__PURE__ */ V({
2427
2415
  __name: "LegalDocViewer",
2428
2416
  props: {
2429
2417
  type: {},
2430
2418
  appId: {}
2431
2419
  },
2432
- setup(w) {
2433
- const r = w, u = R(() => We[r.type] ?? ""), o = I(!1), h = I(null);
2420
+ setup(b) {
2421
+ const u = b, n = $(() => We[u.type] ?? ""), r = A(!1), h = A(null);
2434
2422
  async function g() {
2435
- if (!r.type || !r.appId) {
2423
+ if (!u.type || !u.appId) {
2436
2424
  h.value = null;
2437
2425
  return;
2438
2426
  }
2439
- o.value = !0;
2440
- const a = await Xe(r.appId);
2441
- if (o.value = !1, !a) {
2427
+ r.value = !0;
2428
+ const a = await Xe(u.appId);
2429
+ if (r.value = !1, !a) {
2442
2430
  h.value = null;
2443
2431
  return;
2444
2432
  }
2445
- const s = a[r.type];
2433
+ const s = a[u.type];
2446
2434
  h.value = Ke(s) ? s : null;
2447
2435
  }
2448
- return ne(() => [r.type, r.appId], () => {
2436
+ return be(() => [u.type, u.appId], () => {
2449
2437
  g();
2450
2438
  }, {
2451
2439
  immediate: !0
2452
- }), (a, s) => o.value ? (n(), z(e(Le), {
2440
+ }), (a, s) => r.value ? (o(), z(e(Be), {
2453
2441
  key: 0,
2454
- loading: o.value,
2442
+ loading: r.value,
2455
2443
  class: "legal-doc-viewer-loading"
2456
- }, null, 8, ["loading"])) : h.value ? (n(), z(e(Je), {
2444
+ }, null, 8, ["loading"])) : h.value ? (o(), z(e(Je), {
2457
2445
  key: 2,
2458
2446
  modelValue: h.value,
2459
2447
  "onUpdate:modelValue": s[1] || (s[1] = (d) => h.value = d),
2460
2448
  editable: !1
2461
2449
  }, {
2462
- title: p(() => [i(e(Qe), {
2463
- modelValue: u.value,
2464
- "onUpdate:modelValue": s[0] || (s[0] = (d) => u.value = d),
2450
+ title: c(() => [i(e(Qe), {
2451
+ modelValue: n.value,
2452
+ "onUpdate:modelValue": s[0] || (s[0] = (d) => n.value = d),
2465
2453
  editable: !1,
2466
2454
  class: "legal-doc-viewer-title"
2467
2455
  }, null, 8, ["modelValue"])]),
2468
2456
  _: 1
2469
- }, 8, ["modelValue"])) : (n(), z(e(Fe), {
2457
+ }, 8, ["modelValue"])) : (o(), z(e(Me), {
2470
2458
  key: 1,
2471
2459
  description: "暂无内容"
2472
2460
  }));
@@ -2476,14 +2464,14 @@ export {
2476
2464
  ys as A,
2477
2465
  Zt as E,
2478
2466
  wi as L,
2479
- Z as O,
2467
+ Q as O,
2480
2468
  Ct as P,
2481
2469
  wt as R,
2482
- X as S,
2470
+ ee as S,
2483
2471
  vi as _,
2484
2472
  gi as a,
2485
2473
  ws as b,
2486
- Pe as c,
2474
+ Ve as c,
2487
2475
  hi as d,
2488
2476
  bi as e,
2489
2477
  Ss as f,