@huyooo/ui 2.0.12 → 2.0.13

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