@huyooo/ui 2.0.6 → 2.0.8
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.
- package/dist/{AuthkitAppSetting-D_94iUEG.js → AuthkitAppSetting-eXw1JiyT.js} +787 -752
- package/dist/{Contact-CBGSJC2q.js → Contact-C5T90358.js} +2 -2
- package/dist/{FeedbackModal.vue_vue_type_script_setup_true_lang-CnvQjQFT.js → FeedbackModal.vue_vue_type_script_setup_true_lang-B3CA1z6v.js} +2 -2
- package/dist/LegalDocViewer-Dxl4FngI.js +2481 -0
- package/dist/{PaySubscriptions-BSkcUqHk.js → PaySubscriptions-Bv6LQ_Pf.js} +1 -1
- package/dist/{PricingPlans-CyFvgf18.js → PricingPlans-CQaXgOIR.js} +3 -3
- package/dist/{ReferrerReferees-BU9IEQgz.js → ReferrerReferees-D4VEC8QJ.js} +1 -1
- package/dist/{Upload.vue_vue_type_script_setup_true_lang-oa6LJgCY.js → Upload.vue_vue_type_script_setup_true_lang-CgZQOZYt.js} +1 -1
- package/dist/{UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-DqgwJ7r3.js → UserMenuInvitationsItem.vue_vue_type_script_setup_true_lang-BdibAudA.js} +204 -181
- package/dist/{WidthContainer-BIRNIRX5.js → WidthContainer-AZl-9MdF.js} +6 -6
- package/dist/authkit.d.ts +1 -0
- package/dist/authkit.js +51 -50
- package/dist/common/globalConfig.d.ts +0 -5
- package/dist/common.js +1 -1
- package/dist/components/Authkit/Auth/AuthkitOauthCallback.vue.d.ts +1 -3
- package/dist/components/UserMenu/parts/UserMenuAuthPlaceholder.vue.d.ts +7 -0
- package/dist/composables/Authkit/oauthCallback.d.ts +14 -0
- package/dist/composables/Authkit/useAuthkitUsersProfile.d.ts +2 -0
- package/dist/composables/Authkit/useOAuthCallbackHandler.d.ts +11 -0
- package/dist/composables/Authkit/useOauth.d.ts +3 -3
- package/dist/composables.js +8 -8
- package/dist/feedback.js +1 -1
- package/dist/{fetchAuthPageAboutUs-CP5a7jIo.js → fetchAuthPageAboutUs-DV7ArpNZ.js} +1 -1
- package/dist/main.js +194 -193
- package/dist/pay.js +3 -3
- package/dist/privateCom.js +1 -1
- package/dist/referrer.js +1 -1
- package/dist/{runtime-qs4IasEB.js → runtime-Dp7MgwhI.js} +115 -116
- package/dist/style.css +1 -1
- package/dist/upload.js +2 -2
- package/dist/{useAuthkitAuth-BPTZUSkM.js → useAuthkitAuth-cHrJMM8E.js} +48 -47
- package/dist/useAuthkitUsersProfile-CTd6PP-a.js +50 -0
- package/dist/{useEnsureAuthenticated-CncOvj2H.js → useEnsureAuthenticated-C8qS8DLL.js} +1 -1
- package/dist/{useLegalDocs-BZlntAI7.js → useLegalDocs-C4qk5CTb.js} +1 -1
- package/dist/{usePageSEO-DwhbUUjW.js → usePageSEO-Dl6_kBWP.js} +1 -1
- package/dist/{useRoutePermission-BrQX7NTq.js → useRoutePermission-B_g-WmDZ.js} +50 -42
- package/dist/{useSubscriptionCheckout-BDDCRxSs.js → useSubscriptionCheckout-CYU2Ke0y.js} +1 -1
- package/dist/user.js +1 -1
- package/package.json +1 -1
- package/dist/LegalDocViewer-DeDXQX3X.js +0 -2492
- package/dist/useAuthkitUsersProfile-CW_exa7E.js +0 -39
|
@@ -1,49 +1,49 @@
|
|
|
1
1
|
/* empty css */
|
|
2
2
|
/* empty css */
|
|
3
|
-
import { U as
|
|
4
|
-
import { defineComponent as
|
|
5
|
-
import { Avatar as
|
|
3
|
+
import { U as Be } from "./userMenuModal-D-nDaYqM.js";
|
|
4
|
+
import { defineComponent as J, ref as A, computed as $, openBlock as h, createElementBlock as M, createElementVNode as z, createVNode as p, unref as n, withCtx as o, createTextVNode as k, createCommentVNode as E, toDisplayString as U, createBlock as I, onUnmounted as Ae, withDirectives as qe, vShow as Le, onMounted as de, Fragment as ie, createSlots as Me, normalizeClass as Pe, renderList as Ke, watch as Ie } from "vue";
|
|
5
|
+
import { Avatar as Ee, Input as Q, Textarea as Fe, Button as T, Message as G, Form as le, FormItem as L, Alert as Y, Space as me, Popconfirm as He, Link as Ce, InputPassword as We, Result as Ge, Modal as Ye } from "@arco-design/web-vue";
|
|
6
6
|
/* empty css */
|
|
7
|
-
import { f as
|
|
8
|
-
import { C as
|
|
7
|
+
import { f as Je, g as O, b as je, h as Re } from "./apiClients-Ctcq8NZs.js";
|
|
8
|
+
import { C as Qe } from "./index-Cn6LcfZO.js";
|
|
9
9
|
/* empty css */
|
|
10
|
-
import { u as
|
|
11
|
-
import { u as
|
|
10
|
+
import { u as ne } from "./useAuthkitUsersProfile-CTd6PP-a.js";
|
|
11
|
+
import { u as Se, g as Xe } from "./runtime-Dp7MgwhI.js";
|
|
12
12
|
import { _ as X } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
13
13
|
/* empty css */
|
|
14
14
|
/* empty css */
|
|
15
|
-
import { C as
|
|
16
|
-
import { u as
|
|
17
|
-
import { Icon as
|
|
18
|
-
import { i as
|
|
19
|
-
import { u as
|
|
20
|
-
import { u as
|
|
21
|
-
const
|
|
15
|
+
import { C as Ze } from "./CustomTable-HDwqEcmB.js";
|
|
16
|
+
import { u as Ve } from "./useAuthkitAppsAuthPageInfo-DZ1p-P3Q.js";
|
|
17
|
+
import { Icon as et } from "@iconify/vue";
|
|
18
|
+
import { i as tt, M as it } from "./Menu-uCexrsKP.js";
|
|
19
|
+
import { u as nt } from "./useAuthkitAuth-cHrJMM8E.js";
|
|
20
|
+
import { u as at } from "./useAuthkitCreateAndUpdate-Bbv7vZZn.js";
|
|
21
|
+
const ot = {
|
|
22
22
|
class: "personal-information"
|
|
23
|
-
},
|
|
23
|
+
}, st = {
|
|
24
24
|
class: "profile-card"
|
|
25
|
-
},
|
|
25
|
+
}, lt = {
|
|
26
26
|
class: "profile-field profile-field--nickname"
|
|
27
|
-
},
|
|
27
|
+
}, rt = {
|
|
28
28
|
class: "nickname-field"
|
|
29
|
-
},
|
|
29
|
+
}, ut = ["disabled"], dt = {
|
|
30
30
|
class: "profile-field"
|
|
31
|
-
},
|
|
31
|
+
}, ct = {
|
|
32
32
|
key: 0,
|
|
33
33
|
class: "profile-actions"
|
|
34
|
-
},
|
|
34
|
+
}, ft = {
|
|
35
35
|
class: "profile-card profile-card--meta"
|
|
36
|
-
},
|
|
36
|
+
}, pt = {
|
|
37
37
|
class: "account-meta"
|
|
38
|
-
},
|
|
38
|
+
}, mt = {
|
|
39
39
|
class: "account-meta__row"
|
|
40
|
-
},
|
|
40
|
+
}, vt = {
|
|
41
41
|
class: "account-meta__row"
|
|
42
|
-
},
|
|
42
|
+
}, ht = {
|
|
43
43
|
class: "account-meta__row"
|
|
44
|
-
},
|
|
44
|
+
}, yt = {
|
|
45
45
|
class: "account-meta__row"
|
|
46
|
-
},
|
|
46
|
+
}, gt = 1e3, wt = /* @__PURE__ */ J({
|
|
47
47
|
__name: "AuthkitPersonalInformation",
|
|
48
48
|
props: {
|
|
49
49
|
size: {
|
|
@@ -52,15 +52,15 @@ const it = {
|
|
|
52
52
|
}
|
|
53
53
|
},
|
|
54
54
|
emits: ["submit"],
|
|
55
|
-
setup(
|
|
55
|
+
setup(e, {
|
|
56
56
|
emit: i
|
|
57
57
|
}) {
|
|
58
|
-
const
|
|
58
|
+
const a = i, {
|
|
59
59
|
fetchUserProfile: l
|
|
60
|
-
} =
|
|
60
|
+
} = ne(), {
|
|
61
61
|
config: s,
|
|
62
62
|
upload: d
|
|
63
|
-
} =
|
|
63
|
+
} = Se(), u = e, t = A({
|
|
64
64
|
id: void 0,
|
|
65
65
|
nickname: "",
|
|
66
66
|
description: "",
|
|
@@ -68,27 +68,27 @@ const it = {
|
|
|
68
68
|
avatarUrl: "",
|
|
69
69
|
email: "",
|
|
70
70
|
phone: ""
|
|
71
|
-
}), y =
|
|
71
|
+
}), y = A({
|
|
72
72
|
nickname: "",
|
|
73
73
|
description: ""
|
|
74
|
-
}), g =
|
|
74
|
+
}), g = A({
|
|
75
75
|
id: "",
|
|
76
76
|
createAt: "",
|
|
77
77
|
status: "",
|
|
78
78
|
loginIdentity: "-"
|
|
79
|
-
}), f =
|
|
79
|
+
}), f = A(!1), v = A(!1), r = $(() => t.value.nickname !== y.value.nickname || t.value.description !== y.value.description);
|
|
80
80
|
function m() {
|
|
81
81
|
y.value = {
|
|
82
|
-
nickname:
|
|
83
|
-
description:
|
|
82
|
+
nickname: t.value.nickname,
|
|
83
|
+
description: t.value.description
|
|
84
84
|
};
|
|
85
85
|
}
|
|
86
86
|
function S(V) {
|
|
87
|
-
|
|
87
|
+
t.value.id = V.id, t.value.nickname = V.nickname, t.value.description = V.description, t.value.avatar = V.avatar, t.value.avatarUrl = V.avatarUrl, t.value.email = V.email, t.value.phone = V.phone, g.value = {
|
|
88
88
|
id: V.id,
|
|
89
89
|
createAt: V.createAt || "-",
|
|
90
90
|
status: V.status || "",
|
|
91
|
-
loginIdentity:
|
|
91
|
+
loginIdentity: je(V)
|
|
92
92
|
}, m();
|
|
93
93
|
}
|
|
94
94
|
async function R() {
|
|
@@ -96,35 +96,35 @@ const it = {
|
|
|
96
96
|
const {
|
|
97
97
|
data: V,
|
|
98
98
|
error: w
|
|
99
|
-
} = await
|
|
99
|
+
} = await O().auth.users.profile.post({});
|
|
100
100
|
if (v.value = !1, w || !V)
|
|
101
101
|
return;
|
|
102
102
|
S(V);
|
|
103
103
|
}
|
|
104
104
|
function B() {
|
|
105
|
-
|
|
105
|
+
t.value.nickname = y.value.nickname, t.value.description = y.value.description;
|
|
106
106
|
}
|
|
107
107
|
async function K() {
|
|
108
|
-
if (!
|
|
108
|
+
if (!t.value.id)
|
|
109
109
|
return;
|
|
110
110
|
v.value = !0;
|
|
111
111
|
const V = {
|
|
112
|
-
id:
|
|
113
|
-
nickname:
|
|
114
|
-
description:
|
|
115
|
-
avatar:
|
|
112
|
+
id: t.value.id,
|
|
113
|
+
nickname: t.value.nickname,
|
|
114
|
+
description: t.value.description,
|
|
115
|
+
avatar: t.value.avatar
|
|
116
116
|
}, {
|
|
117
117
|
data: w,
|
|
118
118
|
error: q
|
|
119
|
-
} = await
|
|
120
|
-
v.value = !1, !q && w && (G.success("更新成功"),
|
|
119
|
+
} = await O().auth.users.update.baseInfo.post(V);
|
|
120
|
+
v.value = !1, !q && w && (G.success("更新成功"), t.value.avatarUrl = w.avatarUrl || t.value.avatarUrl, m(), await l(), a("submit"));
|
|
121
121
|
}
|
|
122
122
|
function j() {
|
|
123
123
|
const V = document.createElement("input");
|
|
124
124
|
V.type = "file", V.accept = "image/*", V.style.display = "none", document.body.append(V), V.addEventListener("change", async (w) => {
|
|
125
125
|
var D;
|
|
126
126
|
const _ = (D = w.target.files) == null ? void 0 : D[0];
|
|
127
|
-
if (!_ || !
|
|
127
|
+
if (!_ || !t.value.id) {
|
|
128
128
|
V.remove();
|
|
129
129
|
return;
|
|
130
130
|
}
|
|
@@ -140,55 +140,55 @@ const it = {
|
|
|
140
140
|
f.value = !1, G.error((N == null ? void 0 : N.message) || "头像上传失败"), V.remove();
|
|
141
141
|
return;
|
|
142
142
|
}
|
|
143
|
-
const F = await
|
|
144
|
-
id:
|
|
145
|
-
nickname:
|
|
146
|
-
description:
|
|
143
|
+
const F = await O().auth.users.update.baseInfo.post({
|
|
144
|
+
id: t.value.id,
|
|
145
|
+
nickname: t.value.nickname,
|
|
146
|
+
description: t.value.description,
|
|
147
147
|
avatar: P.key
|
|
148
148
|
});
|
|
149
|
-
f.value = !1, F.error || (G.success("头像已更新"), await R(), await l(),
|
|
149
|
+
f.value = !1, F.error || (G.success("头像已更新"), await R(), await l(), a("submit")), V.remove();
|
|
150
150
|
}), V.click();
|
|
151
151
|
}
|
|
152
|
-
return R(), (V, w) => (h(), M("div",
|
|
152
|
+
return R(), (V, w) => (h(), M("div", ot, [z("section", st, [w[6] || (w[6] = z("h3", {
|
|
153
153
|
class: "profile-card__title"
|
|
154
|
-
}, "个人资料", -1)),
|
|
154
|
+
}, "个人资料", -1)), z("div", lt, [w[2] || (w[2] = z("label", {
|
|
155
155
|
class: "profile-field__label"
|
|
156
|
-
}, "昵称", -1)),
|
|
156
|
+
}, "昵称", -1)), z("div", rt, [z("button", {
|
|
157
157
|
type: "button",
|
|
158
158
|
class: "nickname-field__avatar",
|
|
159
159
|
disabled: f.value,
|
|
160
160
|
title: "更换头像",
|
|
161
161
|
onClick: j
|
|
162
|
-
}, [p(
|
|
163
|
-
"image-url":
|
|
162
|
+
}, [p(n(Ee), {
|
|
163
|
+
"image-url": t.value.avatarUrl,
|
|
164
164
|
size: 28,
|
|
165
165
|
"object-fit": "cover"
|
|
166
|
-
}, null, 8, ["image-url"])], 8,
|
|
167
|
-
modelValue:
|
|
168
|
-
"onUpdate:modelValue": w[0] || (w[0] = (q) =>
|
|
166
|
+
}, null, 8, ["image-url"])], 8, ut), p(n(Q), {
|
|
167
|
+
modelValue: t.value.nickname,
|
|
168
|
+
"onUpdate:modelValue": w[0] || (w[0] = (q) => t.value.nickname = q),
|
|
169
169
|
class: "nickname-field__input",
|
|
170
170
|
size: u.size,
|
|
171
171
|
placeholder: "例如:小明"
|
|
172
|
-
}, null, 8, ["modelValue", "size"])])]),
|
|
172
|
+
}, null, 8, ["modelValue", "size"])])]), z("div", dt, [w[3] || (w[3] = z("label", {
|
|
173
173
|
class: "profile-field__label"
|
|
174
|
-
}, "个人简介", -1)), p(
|
|
175
|
-
modelValue:
|
|
176
|
-
"onUpdate:modelValue": w[1] || (w[1] = (q) =>
|
|
174
|
+
}, "个人简介", -1)), p(n(Fe), {
|
|
175
|
+
modelValue: t.value.description,
|
|
176
|
+
"onUpdate:modelValue": w[1] || (w[1] = (q) => t.value.description = q),
|
|
177
177
|
size: u.size,
|
|
178
178
|
placeholder: "介绍一下你自己",
|
|
179
|
-
"max-length":
|
|
179
|
+
"max-length": gt,
|
|
180
180
|
"show-word-limit": "",
|
|
181
181
|
"auto-size": {
|
|
182
182
|
minRows: 4,
|
|
183
183
|
maxRows: 8
|
|
184
184
|
}
|
|
185
|
-
}, null, 8, ["modelValue", "size"])]), r.value ? (h(), M("div",
|
|
185
|
+
}, null, 8, ["modelValue", "size"])]), r.value ? (h(), M("div", ct, [p(n(T), {
|
|
186
186
|
size: u.size,
|
|
187
187
|
onClick: B
|
|
188
188
|
}, {
|
|
189
189
|
default: o(() => [...w[4] || (w[4] = [k("取消", -1)])]),
|
|
190
190
|
_: 1
|
|
191
|
-
}, 8, ["size"]), p(
|
|
191
|
+
}, 8, ["size"]), p(n(T), {
|
|
192
192
|
type: "primary",
|
|
193
193
|
size: u.size,
|
|
194
194
|
loading: v.value,
|
|
@@ -196,15 +196,15 @@ const it = {
|
|
|
196
196
|
}, {
|
|
197
197
|
default: o(() => [...w[5] || (w[5] = [k(" 保存修改 ", -1)])]),
|
|
198
198
|
_: 1
|
|
199
|
-
}, 8, ["size", "loading"])])) :
|
|
199
|
+
}, 8, ["size", "loading"])])) : E("", !0)]), z("section", ft, [w[11] || (w[11] = z("h3", {
|
|
200
200
|
class: "profile-card__title"
|
|
201
|
-
}, "账号信息", -1)),
|
|
201
|
+
}, "账号信息", -1)), z("dl", pt, [z("div", mt, [w[7] || (w[7] = z("dt", null, "用户 ID", -1)), z("dd", null, [z("span", null, U(g.value.id || "-"), 1), g.value.id ? (h(), I(Qe, {
|
|
202
202
|
key: 0,
|
|
203
203
|
value: g.value.id,
|
|
204
204
|
message: "用户 ID 已复制"
|
|
205
|
-
}, null, 8, ["value"])) :
|
|
205
|
+
}, null, 8, ["value"])) : E("", !0)])]), z("div", vt, [w[8] || (w[8] = z("dt", null, "注册时间", -1)), z("dd", null, U(g.value.createAt || "-"), 1)]), z("div", ht, [w[9] || (w[9] = z("dt", null, "账号状态", -1)), z("dd", null, U(n(Je)(g.value.status)), 1)]), z("div", yt, [w[10] || (w[10] = z("dt", null, "登录标识", -1)), z("dd", null, U(g.value.loginIdentity), 1)])])])]));
|
|
206
206
|
}
|
|
207
|
-
}),
|
|
207
|
+
}), bt = /* @__PURE__ */ X(wt, [["__scopeId", "data-v-e03e688b"]]), _t = /* @__PURE__ */ J({
|
|
208
208
|
__name: "AuthkitSendVerifyCode",
|
|
209
209
|
props: {
|
|
210
210
|
size: {
|
|
@@ -218,36 +218,36 @@ const it = {
|
|
|
218
218
|
}
|
|
219
219
|
},
|
|
220
220
|
emits: ["send"],
|
|
221
|
-
setup(
|
|
221
|
+
setup(e, {
|
|
222
222
|
expose: i,
|
|
223
|
-
emit:
|
|
223
|
+
emit: a
|
|
224
224
|
}) {
|
|
225
|
-
const l =
|
|
225
|
+
const l = a, s = e, d = A(!1);
|
|
226
226
|
let u;
|
|
227
|
-
const
|
|
227
|
+
const t = A(0), y = $(() => t.value.toString().padStart(2, "0")), g = $(() => t.value > 0);
|
|
228
228
|
function f() {
|
|
229
229
|
u && (clearInterval(u), u = void 0);
|
|
230
230
|
}
|
|
231
231
|
function v() {
|
|
232
232
|
if (d.value) {
|
|
233
|
-
if (
|
|
233
|
+
if (t.value <= 0) {
|
|
234
234
|
f(), d.value = !1;
|
|
235
235
|
return;
|
|
236
236
|
}
|
|
237
|
-
|
|
237
|
+
t.value--, t.value <= 0 && (f(), d.value = !1);
|
|
238
238
|
}
|
|
239
239
|
}
|
|
240
240
|
function r() {
|
|
241
241
|
l("send");
|
|
242
242
|
}
|
|
243
243
|
function m(S) {
|
|
244
|
-
!Number.isFinite(S) || S <= 0 || (
|
|
244
|
+
!Number.isFinite(S) || S <= 0 || (t.value = Math.ceil(S), d.value = !0, f(), u = setInterval(v, 1e3));
|
|
245
245
|
}
|
|
246
246
|
return i({
|
|
247
247
|
startCountFn: m
|
|
248
|
-
}),
|
|
248
|
+
}), Ae(() => {
|
|
249
249
|
f();
|
|
250
|
-
}), (S, R) => (h(), I(
|
|
250
|
+
}), (S, R) => (h(), I(n(T), {
|
|
251
251
|
class: "OAuthItem",
|
|
252
252
|
type: "primary",
|
|
253
253
|
size: s.size,
|
|
@@ -255,36 +255,36 @@ const it = {
|
|
|
255
255
|
loading: s.loading,
|
|
256
256
|
onClick: r
|
|
257
257
|
}, {
|
|
258
|
-
default: o(() => [R[0] || (R[0] =
|
|
258
|
+
default: o(() => [R[0] || (R[0] = z("span", null, " 发送验证码", -1)), qe(z("span", {
|
|
259
259
|
class: "verify-code-timer"
|
|
260
|
-
}, U(`(${y.value})`), 513), [[
|
|
260
|
+
}, U(`(${y.value})`), 513), [[Le, g.value]])]),
|
|
261
261
|
_: 1
|
|
262
262
|
}, 8, ["size", "disabled", "loading"]));
|
|
263
263
|
}
|
|
264
|
-
}),
|
|
265
|
-
function
|
|
266
|
-
if (!
|
|
264
|
+
}), he = /* @__PURE__ */ X(_t, [["__scopeId", "data-v-63c6fb3a"]]);
|
|
265
|
+
function kt(e) {
|
|
266
|
+
if (!e)
|
|
267
267
|
return null;
|
|
268
|
-
const i =
|
|
268
|
+
const i = e.match(/请\s*(\d+)\s*秒后再试/);
|
|
269
269
|
if (!i)
|
|
270
270
|
return null;
|
|
271
|
-
const
|
|
272
|
-
return Number.isFinite(
|
|
271
|
+
const a = Number(i[1]);
|
|
272
|
+
return Number.isFinite(a) && a > 0 ? a : null;
|
|
273
273
|
}
|
|
274
|
-
function
|
|
275
|
-
var
|
|
276
|
-
const i = (
|
|
277
|
-
return typeof i == "number" && i > 0 ? i :
|
|
274
|
+
function ke(e) {
|
|
275
|
+
var a, l;
|
|
276
|
+
const i = (a = e.data) == null ? void 0 : a.cooldownSeconds;
|
|
277
|
+
return typeof i == "number" && i > 0 ? i : kt((l = e.error) == null ? void 0 : l.message);
|
|
278
278
|
}
|
|
279
|
-
function
|
|
280
|
-
const
|
|
281
|
-
|
|
279
|
+
function ye(e, i) {
|
|
280
|
+
const a = ke(i);
|
|
281
|
+
a && e && e.startCountFn(a);
|
|
282
282
|
}
|
|
283
|
-
const
|
|
283
|
+
const At = {
|
|
284
284
|
class: "sendVerifyCodeItem"
|
|
285
|
-
},
|
|
285
|
+
}, zt = {
|
|
286
286
|
class: "handle"
|
|
287
|
-
},
|
|
287
|
+
}, Pt = /* @__PURE__ */ J({
|
|
288
288
|
__name: "AuthkitEmailVerify",
|
|
289
289
|
props: {
|
|
290
290
|
email: {
|
|
@@ -298,43 +298,43 @@ const bt = {
|
|
|
298
298
|
}
|
|
299
299
|
},
|
|
300
300
|
emits: ["next"],
|
|
301
|
-
setup(
|
|
301
|
+
setup(e, {
|
|
302
302
|
emit: i
|
|
303
303
|
}) {
|
|
304
|
-
const
|
|
304
|
+
const a = i, l = e, s = $(() => Re(l.email)), d = A(), u = A(!1), t = A(!1), y = A(), g = A({
|
|
305
305
|
userToken: void 0,
|
|
306
306
|
emailVerifyId: void 0
|
|
307
307
|
});
|
|
308
308
|
async function f() {
|
|
309
309
|
u.value = !0;
|
|
310
|
-
const r = await
|
|
310
|
+
const r = await O().auth.verify.email.retry.post({
|
|
311
311
|
email: l.email,
|
|
312
312
|
purpose: "bindEmail"
|
|
313
313
|
});
|
|
314
|
-
u.value = !1, r.data && (g.value.emailVerifyId = r.data.emailVerifyId),
|
|
314
|
+
u.value = !1, r.data && (g.value.emailVerifyId = r.data.emailVerifyId), ye(d.value, r);
|
|
315
315
|
}
|
|
316
316
|
async function v() {
|
|
317
317
|
if (!await y.value.validate(["userToken"])) {
|
|
318
|
-
|
|
318
|
+
t.value = !0;
|
|
319
319
|
const {
|
|
320
320
|
error: m
|
|
321
|
-
} = await
|
|
321
|
+
} = await O().auth.verify.email.post({
|
|
322
322
|
email: l.email,
|
|
323
323
|
userToken: g.value.userToken,
|
|
324
324
|
emailVerifyId: g.value.emailVerifyId,
|
|
325
325
|
purpose: "bindEmail"
|
|
326
326
|
});
|
|
327
|
-
|
|
327
|
+
t.value = !1, m || a("next");
|
|
328
328
|
}
|
|
329
329
|
}
|
|
330
|
-
return (r, m) => (h(), I(
|
|
330
|
+
return (r, m) => (h(), I(n(le), {
|
|
331
331
|
ref_key: "formRef",
|
|
332
332
|
ref: y,
|
|
333
333
|
model: g.value,
|
|
334
334
|
"auto-label-width": "",
|
|
335
335
|
size: l.size
|
|
336
336
|
}, {
|
|
337
|
-
default: o(() => [p(
|
|
337
|
+
default: o(() => [p(n(L), {
|
|
338
338
|
field: "email",
|
|
339
339
|
label: "邮箱",
|
|
340
340
|
rules: [{
|
|
@@ -347,7 +347,7 @@ const bt = {
|
|
|
347
347
|
}, {
|
|
348
348
|
default: o(() => [k(U(s.value), 1)]),
|
|
349
349
|
_: 1
|
|
350
|
-
}), p(
|
|
350
|
+
}), p(n(L), {
|
|
351
351
|
field: "userToken",
|
|
352
352
|
label: "验证码",
|
|
353
353
|
"hide-label": "",
|
|
@@ -356,11 +356,11 @@ const bt = {
|
|
|
356
356
|
message: "请输入验证码"
|
|
357
357
|
}]
|
|
358
358
|
}, {
|
|
359
|
-
default: o(() => [
|
|
359
|
+
default: o(() => [z("div", At, [p(n(Q), {
|
|
360
360
|
modelValue: g.value.userToken,
|
|
361
361
|
"onUpdate:modelValue": m[0] || (m[0] = (S) => g.value.userToken = S),
|
|
362
362
|
placeholder: "请输入验证码"
|
|
363
|
-
}, null, 8, ["modelValue"]), p(
|
|
363
|
+
}, null, 8, ["modelValue"]), p(he, {
|
|
364
364
|
ref_key: "SendVerifyCodeRef",
|
|
365
365
|
ref: d,
|
|
366
366
|
size: l.size,
|
|
@@ -371,13 +371,13 @@ const bt = {
|
|
|
371
371
|
onSend: f
|
|
372
372
|
}, null, 8, ["size", "loading"])])]),
|
|
373
373
|
_: 1
|
|
374
|
-
}), p(
|
|
374
|
+
}), p(n(L), {
|
|
375
375
|
field: "",
|
|
376
376
|
label: "",
|
|
377
377
|
rules: []
|
|
378
378
|
}, {
|
|
379
|
-
default: o(() => [
|
|
380
|
-
loading:
|
|
379
|
+
default: o(() => [z("div", zt, [p(n(T), {
|
|
380
|
+
loading: t.value,
|
|
381
381
|
type: "primary",
|
|
382
382
|
onClick: v
|
|
383
383
|
}, {
|
|
@@ -389,11 +389,11 @@ const bt = {
|
|
|
389
389
|
_: 1
|
|
390
390
|
}, 8, ["model", "size"]));
|
|
391
391
|
}
|
|
392
|
-
}),
|
|
392
|
+
}), ge = /* @__PURE__ */ X(Pt, [["__scopeId", "data-v-0939d925"]]), It = {
|
|
393
393
|
class: "sendVerifyCodeItem"
|
|
394
|
-
},
|
|
394
|
+
}, Et = {
|
|
395
395
|
class: "handle"
|
|
396
|
-
},
|
|
396
|
+
}, Ct = /* @__PURE__ */ J({
|
|
397
397
|
__name: "AuthkitPhoneVerify",
|
|
398
398
|
props: {
|
|
399
399
|
phone: {
|
|
@@ -410,10 +410,10 @@ const bt = {
|
|
|
410
410
|
}
|
|
411
411
|
},
|
|
412
412
|
emits: ["next"],
|
|
413
|
-
setup(
|
|
413
|
+
setup(e, {
|
|
414
414
|
emit: i
|
|
415
415
|
}) {
|
|
416
|
-
const
|
|
416
|
+
const a = i, l = e, s = A(), d = A(!1), u = A(!1), t = A(), y = A({
|
|
417
417
|
code: void 0
|
|
418
418
|
}), g = $(() => {
|
|
419
419
|
const r = l.phone.trim();
|
|
@@ -421,39 +421,39 @@ const bt = {
|
|
|
421
421
|
});
|
|
422
422
|
async function f() {
|
|
423
423
|
d.value = !0;
|
|
424
|
-
const r = await
|
|
424
|
+
const r = await O().auth.verify.sms.send.post({
|
|
425
425
|
phone: l.phone,
|
|
426
426
|
purpose: l.purpose
|
|
427
427
|
});
|
|
428
|
-
d.value = !1,
|
|
428
|
+
d.value = !1, ye(s.value, r);
|
|
429
429
|
}
|
|
430
430
|
async function v() {
|
|
431
|
-
if (!await
|
|
431
|
+
if (!await t.value.validate(["code"])) {
|
|
432
432
|
u.value = !0;
|
|
433
433
|
const {
|
|
434
434
|
error: m
|
|
435
|
-
} = await
|
|
435
|
+
} = await O().auth.verify.sms.verify.post({
|
|
436
436
|
phone: l.phone,
|
|
437
437
|
code: y.value.code,
|
|
438
438
|
purpose: l.purpose
|
|
439
439
|
});
|
|
440
|
-
u.value = !1, m ||
|
|
440
|
+
u.value = !1, m || a("next");
|
|
441
441
|
}
|
|
442
442
|
}
|
|
443
|
-
return (r, m) => (h(), I(
|
|
443
|
+
return (r, m) => (h(), I(n(le), {
|
|
444
444
|
ref_key: "formRef",
|
|
445
|
-
ref:
|
|
445
|
+
ref: t,
|
|
446
446
|
model: y.value,
|
|
447
447
|
"auto-label-width": "",
|
|
448
448
|
size: l.size
|
|
449
449
|
}, {
|
|
450
|
-
default: o(() => [p(
|
|
450
|
+
default: o(() => [p(n(L), {
|
|
451
451
|
field: "phone",
|
|
452
452
|
label: "手机号"
|
|
453
453
|
}, {
|
|
454
454
|
default: o(() => [k(U(g.value), 1)]),
|
|
455
455
|
_: 1
|
|
456
|
-
}), p(
|
|
456
|
+
}), p(n(L), {
|
|
457
457
|
field: "code",
|
|
458
458
|
label: "验证码",
|
|
459
459
|
"hide-label": "",
|
|
@@ -462,11 +462,11 @@ const bt = {
|
|
|
462
462
|
message: "请输入验证码"
|
|
463
463
|
}]
|
|
464
464
|
}, {
|
|
465
|
-
default: o(() => [
|
|
465
|
+
default: o(() => [z("div", It, [p(n(Q), {
|
|
466
466
|
modelValue: y.value.code,
|
|
467
467
|
"onUpdate:modelValue": m[0] || (m[0] = (S) => y.value.code = S),
|
|
468
468
|
placeholder: "请输入验证码"
|
|
469
|
-
}, null, 8, ["modelValue"]), p(
|
|
469
|
+
}, null, 8, ["modelValue"]), p(he, {
|
|
470
470
|
ref_key: "sendVerifyCodeRef",
|
|
471
471
|
ref: s,
|
|
472
472
|
size: l.size,
|
|
@@ -477,12 +477,12 @@ const bt = {
|
|
|
477
477
|
onSend: f
|
|
478
478
|
}, null, 8, ["size", "loading"])])]),
|
|
479
479
|
_: 1
|
|
480
|
-
}), p(
|
|
480
|
+
}), p(n(L), {
|
|
481
481
|
field: "",
|
|
482
482
|
label: "",
|
|
483
483
|
rules: []
|
|
484
484
|
}, {
|
|
485
|
-
default: o(() => [
|
|
485
|
+
default: o(() => [z("div", Et, [p(n(T), {
|
|
486
486
|
loading: u.value,
|
|
487
487
|
type: "primary",
|
|
488
488
|
onClick: v
|
|
@@ -495,9 +495,9 @@ const bt = {
|
|
|
495
495
|
_: 1
|
|
496
496
|
}, 8, ["model", "size"]));
|
|
497
497
|
}
|
|
498
|
-
}),
|
|
498
|
+
}), we = /* @__PURE__ */ X(Ct, [["__scopeId", "data-v-d26a59d3"]]), Rt = {
|
|
499
499
|
class: "handle"
|
|
500
|
-
},
|
|
500
|
+
}, St = /* @__PURE__ */ J({
|
|
501
501
|
__name: "AuthkitPasswordUpdate",
|
|
502
502
|
props: {
|
|
503
503
|
size: {
|
|
@@ -510,14 +510,14 @@ const bt = {
|
|
|
510
510
|
}
|
|
511
511
|
},
|
|
512
512
|
emits: ["submit"],
|
|
513
|
-
setup(
|
|
513
|
+
setup(e, {
|
|
514
514
|
emit: i
|
|
515
515
|
}) {
|
|
516
|
-
const
|
|
516
|
+
const a = i, l = A(!1), s = A(), d = e, u = A({
|
|
517
517
|
oldPassword: "",
|
|
518
518
|
password: "",
|
|
519
519
|
confirmPassword: ""
|
|
520
|
-
}),
|
|
520
|
+
}), t = [{
|
|
521
521
|
required: !0,
|
|
522
522
|
message: "请输入确认密码"
|
|
523
523
|
}, {
|
|
@@ -538,18 +538,18 @@ const bt = {
|
|
|
538
538
|
password: u.value.password
|
|
539
539
|
}, {
|
|
540
540
|
error: v
|
|
541
|
-
} = await
|
|
542
|
-
l.value = !1, v ||
|
|
541
|
+
} = await O().auth.users.update.password.post(f);
|
|
542
|
+
l.value = !1, v || a("submit", f);
|
|
543
543
|
}
|
|
544
544
|
}
|
|
545
|
-
return (g, f) => (h(), I(
|
|
545
|
+
return (g, f) => (h(), I(n(le), {
|
|
546
546
|
ref_key: "formRef",
|
|
547
547
|
ref: s,
|
|
548
548
|
model: u.value,
|
|
549
549
|
"auto-label-width": "",
|
|
550
550
|
size: d.size
|
|
551
551
|
}, {
|
|
552
|
-
default: o(() => [d.requireOldPassword ? (h(), I(
|
|
552
|
+
default: o(() => [d.requireOldPassword ? (h(), I(n(L), {
|
|
553
553
|
key: 0,
|
|
554
554
|
field: "oldPassword",
|
|
555
555
|
label: "当前密码",
|
|
@@ -559,14 +559,14 @@ const bt = {
|
|
|
559
559
|
message: "请输入当前密码"
|
|
560
560
|
}]
|
|
561
561
|
}, {
|
|
562
|
-
default: o(() => [p(
|
|
562
|
+
default: o(() => [p(n(Q), {
|
|
563
563
|
modelValue: u.value.oldPassword,
|
|
564
564
|
"onUpdate:modelValue": f[0] || (f[0] = (v) => u.value.oldPassword = v),
|
|
565
565
|
placeholder: "请输入当前密码",
|
|
566
566
|
type: "password"
|
|
567
567
|
}, null, 8, ["modelValue"])]),
|
|
568
568
|
_: 1
|
|
569
|
-
})) :
|
|
569
|
+
})) : E("", !0), p(n(L), {
|
|
570
570
|
field: "password",
|
|
571
571
|
label: d.requireOldPassword ? "新密码" : "登录密码",
|
|
572
572
|
"hide-label": "",
|
|
@@ -578,32 +578,32 @@ const bt = {
|
|
|
578
578
|
message: "密码不能少于10字符"
|
|
579
579
|
}]
|
|
580
580
|
}, {
|
|
581
|
-
default: o(() => [p(
|
|
581
|
+
default: o(() => [p(n(Q), {
|
|
582
582
|
modelValue: u.value.password,
|
|
583
583
|
"onUpdate:modelValue": f[1] || (f[1] = (v) => u.value.password = v),
|
|
584
584
|
placeholder: d.requireOldPassword ? "请输入新密码" : "请输入登录密码",
|
|
585
585
|
type: "password"
|
|
586
586
|
}, null, 8, ["modelValue", "placeholder"])]),
|
|
587
587
|
_: 1
|
|
588
|
-
}, 8, ["label", "rules"]), p(
|
|
588
|
+
}, 8, ["label", "rules"]), p(n(L), {
|
|
589
589
|
field: "confirmPassword",
|
|
590
590
|
label: "确认密码",
|
|
591
591
|
"hide-label": "",
|
|
592
|
-
rules:
|
|
592
|
+
rules: t
|
|
593
593
|
}, {
|
|
594
|
-
default: o(() => [p(
|
|
594
|
+
default: o(() => [p(n(Q), {
|
|
595
595
|
modelValue: u.value.confirmPassword,
|
|
596
596
|
"onUpdate:modelValue": f[2] || (f[2] = (v) => u.value.confirmPassword = v),
|
|
597
597
|
placeholder: "请输入确认密码",
|
|
598
598
|
type: "password"
|
|
599
599
|
}, null, 8, ["modelValue"])]),
|
|
600
600
|
_: 1
|
|
601
|
-
}), p(
|
|
601
|
+
}), p(n(L), {
|
|
602
602
|
field: "",
|
|
603
603
|
label: "",
|
|
604
604
|
rules: []
|
|
605
605
|
}, {
|
|
606
|
-
default: o(() => [
|
|
606
|
+
default: o(() => [z("div", Rt, [p(n(T), {
|
|
607
607
|
type: "primary",
|
|
608
608
|
loading: l.value,
|
|
609
609
|
onClick: y
|
|
@@ -616,7 +616,7 @@ const bt = {
|
|
|
616
616
|
_: 1
|
|
617
617
|
}, 8, ["model", "size"]));
|
|
618
618
|
}
|
|
619
|
-
}),
|
|
619
|
+
}), Vt = /* @__PURE__ */ X(St, [["__scopeId", "data-v-627d759a"]]), $t = /* @__PURE__ */ J({
|
|
620
620
|
__name: "AuthkitSetPassword",
|
|
621
621
|
props: {
|
|
622
622
|
size: {
|
|
@@ -624,212 +624,212 @@ const bt = {
|
|
|
624
624
|
required: !0
|
|
625
625
|
}
|
|
626
626
|
},
|
|
627
|
-
setup(
|
|
627
|
+
setup(e) {
|
|
628
628
|
const {
|
|
629
629
|
userProfile: i,
|
|
630
|
-
fetchUserProfile:
|
|
630
|
+
fetchUserProfile: a,
|
|
631
631
|
isLoggedIn: l
|
|
632
|
-
} =
|
|
632
|
+
} = ne(), s = A("hidden"), d = e;
|
|
633
633
|
function u(g) {
|
|
634
634
|
s.value = g;
|
|
635
635
|
}
|
|
636
|
-
function
|
|
636
|
+
function t(g) {
|
|
637
637
|
var f;
|
|
638
|
-
G.success((f = i.value) != null && f.hasPassword ? "密码修改成功" : "密码设置成功"), s.value = "hidden",
|
|
638
|
+
G.success((f = i.value) != null && f.hasPassword ? "密码修改成功" : "密码设置成功"), s.value = "hidden", a();
|
|
639
639
|
}
|
|
640
640
|
function y() {
|
|
641
641
|
s.value = "update";
|
|
642
642
|
}
|
|
643
|
-
return
|
|
644
|
-
l.value && !i.value &&
|
|
643
|
+
return de(() => {
|
|
644
|
+
l.value && !i.value && a();
|
|
645
645
|
}), (g, f) => {
|
|
646
646
|
var v, r, m, S, R, B, K, j, V;
|
|
647
|
-
return h(), M(ie, null, [!((v =
|
|
647
|
+
return h(), M(ie, null, [!((v = n(i)) != null && v.email) && !((r = n(i)) != null && r.phone) ? (h(), I(n(Y), {
|
|
648
648
|
key: 0,
|
|
649
649
|
type: "info",
|
|
650
650
|
title: "先绑定账号"
|
|
651
651
|
}, {
|
|
652
652
|
default: o(() => [...f[1] || (f[1] = [k(" 请先绑定邮箱或手机号,再设置登录密码。 ", -1)])]),
|
|
653
653
|
_: 1
|
|
654
|
-
})) :
|
|
654
|
+
})) : E("", !0), ((m = n(i)) != null && m.email || (S = n(i)) != null && S.phone) && s.value === "hidden" ? (h(), I(n(Y), {
|
|
655
655
|
key: 1,
|
|
656
|
-
title: (R =
|
|
656
|
+
title: (R = n(i)) != null && R.hasPassword ? "更改密码" : "设置登录密码"
|
|
657
657
|
}, {
|
|
658
|
-
action: o(() => [p(
|
|
658
|
+
action: o(() => [p(n(T), {
|
|
659
659
|
size: d.size,
|
|
660
660
|
type: "primary",
|
|
661
661
|
onClick: f[0] || (f[0] = (w) => u("verify"))
|
|
662
662
|
}, {
|
|
663
663
|
default: o(() => {
|
|
664
664
|
var w;
|
|
665
|
-
return [k(U((w =
|
|
665
|
+
return [k(U((w = n(i)) != null && w.hasPassword ? "更改密码" : "设置密码"), 1)];
|
|
666
666
|
}),
|
|
667
667
|
_: 1
|
|
668
668
|
}, 8, ["size"])]),
|
|
669
669
|
default: o(() => {
|
|
670
670
|
var w;
|
|
671
|
-
return [k(U((w =
|
|
671
|
+
return [k(U((w = n(i)) != null && w.hasPassword ? "为了账户安全,修改密码前会先验证身份。" : "设置登录密码前会先验证身份。") + " ", 1)];
|
|
672
672
|
}),
|
|
673
673
|
_: 1
|
|
674
|
-
}, 8, ["title"])) :
|
|
674
|
+
}, 8, ["title"])) : E("", !0), s.value === "update" ? (h(), I(Vt, {
|
|
675
675
|
key: 2,
|
|
676
676
|
size: d.size,
|
|
677
|
-
"require-old-password": !!((B =
|
|
678
|
-
onSubmit:
|
|
679
|
-
}, null, 8, ["size", "require-old-password"])) :
|
|
677
|
+
"require-old-password": !!((B = n(i)) != null && B.hasPassword),
|
|
678
|
+
onSubmit: t
|
|
679
|
+
}, null, 8, ["size", "require-old-password"])) : E("", !0), s.value === "verify" && ((K = n(i)) != null && K.email) ? (h(), I(ge, {
|
|
680
680
|
key: 3,
|
|
681
681
|
size: d.size,
|
|
682
|
-
email:
|
|
682
|
+
email: n(i).email,
|
|
683
683
|
onNext: y
|
|
684
|
-
}, null, 8, ["size", "email"])) :
|
|
684
|
+
}, null, 8, ["size", "email"])) : E("", !0), s.value === "verify" && !((j = n(i)) != null && j.email) && ((V = n(i)) != null && V.phone) ? (h(), I(we, {
|
|
685
685
|
key: 4,
|
|
686
686
|
size: d.size,
|
|
687
|
-
phone:
|
|
687
|
+
phone: n(i).phone,
|
|
688
688
|
onNext: y
|
|
689
|
-
}, null, 8, ["size", "phone"])) :
|
|
689
|
+
}, null, 8, ["size", "phone"])) : E("", !0)], 64);
|
|
690
690
|
};
|
|
691
691
|
}
|
|
692
|
-
}),
|
|
692
|
+
}), fe = {
|
|
693
693
|
datetime: 180,
|
|
694
694
|
name: 240,
|
|
695
695
|
/** 单按钮操作列(移除等) */
|
|
696
696
|
actionsSingle: 100
|
|
697
697
|
};
|
|
698
|
-
function ee(
|
|
699
|
-
const i = new Uint8Array(
|
|
700
|
-
let
|
|
698
|
+
function ee(e) {
|
|
699
|
+
const i = new Uint8Array(e);
|
|
700
|
+
let a = "";
|
|
701
701
|
for (const s of i)
|
|
702
|
-
|
|
703
|
-
return btoa(
|
|
702
|
+
a += String.fromCharCode(s);
|
|
703
|
+
return btoa(a).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
|
|
704
704
|
}
|
|
705
|
-
function
|
|
706
|
-
const i =
|
|
707
|
-
for (let
|
|
708
|
-
u[
|
|
705
|
+
function ve(e) {
|
|
706
|
+
const i = e.replace(/-/g, "+").replace(/_/g, "/"), a = (4 - i.length % 4) % 4, l = i.padEnd(i.length + a, "="), s = atob(l), d = new ArrayBuffer(s.length), u = new Uint8Array(d);
|
|
707
|
+
for (let t = 0; t < s.length; t++)
|
|
708
|
+
u[t] = s.charCodeAt(t);
|
|
709
709
|
return d;
|
|
710
710
|
}
|
|
711
|
-
function
|
|
711
|
+
function be() {
|
|
712
712
|
return (window == null ? void 0 : window.PublicKeyCredential) !== void 0 && typeof window.PublicKeyCredential == "function";
|
|
713
713
|
}
|
|
714
|
-
function
|
|
714
|
+
function $e(e) {
|
|
715
715
|
const {
|
|
716
716
|
id: i
|
|
717
|
-
} =
|
|
717
|
+
} = e;
|
|
718
718
|
return {
|
|
719
|
-
...
|
|
720
|
-
id:
|
|
721
|
-
transports:
|
|
719
|
+
...e,
|
|
720
|
+
id: ve(i),
|
|
721
|
+
transports: e.transports
|
|
722
722
|
};
|
|
723
723
|
}
|
|
724
|
-
function
|
|
725
|
-
return
|
|
724
|
+
function Te(e) {
|
|
725
|
+
return e === "localhost" || /^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/i.test(e);
|
|
726
726
|
}
|
|
727
727
|
class W extends Error {
|
|
728
728
|
constructor({
|
|
729
729
|
message: i,
|
|
730
|
-
code:
|
|
730
|
+
code: a,
|
|
731
731
|
cause: l,
|
|
732
732
|
name: s
|
|
733
733
|
}) {
|
|
734
734
|
super(i, {
|
|
735
735
|
cause: l
|
|
736
|
-
}), this.name = s ?? l.name, this.code =
|
|
736
|
+
}), this.name = s ?? l.name, this.code = a;
|
|
737
737
|
}
|
|
738
738
|
}
|
|
739
|
-
function
|
|
740
|
-
error:
|
|
739
|
+
function Tt({
|
|
740
|
+
error: e,
|
|
741
741
|
options: i
|
|
742
742
|
}) {
|
|
743
743
|
var l, s, d;
|
|
744
744
|
const {
|
|
745
|
-
publicKey:
|
|
745
|
+
publicKey: a
|
|
746
746
|
} = i;
|
|
747
|
-
if (!
|
|
747
|
+
if (!a)
|
|
748
748
|
throw Error("options was missing required publicKey property");
|
|
749
|
-
if (
|
|
749
|
+
if (e.name === "AbortError") {
|
|
750
750
|
if (i.signal instanceof AbortSignal)
|
|
751
751
|
return new W({
|
|
752
752
|
message: "Registration ceremony was sent an abort signal",
|
|
753
753
|
code: "ERROR_CEREMONY_ABORTED",
|
|
754
|
-
cause:
|
|
754
|
+
cause: e
|
|
755
755
|
});
|
|
756
|
-
} else if (
|
|
757
|
-
if (((l =
|
|
756
|
+
} else if (e.name === "ConstraintError") {
|
|
757
|
+
if (((l = a.authenticatorSelection) == null ? void 0 : l.requireResidentKey) === !0)
|
|
758
758
|
return new W({
|
|
759
759
|
message: "Discoverable credentials were required but no available authenticator supported it",
|
|
760
760
|
code: "ERROR_AUTHENTICATOR_MISSING_DISCOVERABLE_CREDENTIAL_SUPPORT",
|
|
761
|
-
cause:
|
|
761
|
+
cause: e
|
|
762
762
|
});
|
|
763
|
-
if (i.mediation === "conditional" && ((s =
|
|
763
|
+
if (i.mediation === "conditional" && ((s = a.authenticatorSelection) == null ? void 0 : s.userVerification) === "required")
|
|
764
764
|
return new W({
|
|
765
765
|
message: "User verification was required during automatic registration but it could not be performed",
|
|
766
766
|
code: "ERROR_AUTO_REGISTER_USER_VERIFICATION_FAILURE",
|
|
767
|
-
cause:
|
|
767
|
+
cause: e
|
|
768
768
|
});
|
|
769
|
-
if (((d =
|
|
769
|
+
if (((d = a.authenticatorSelection) == null ? void 0 : d.userVerification) === "required")
|
|
770
770
|
return new W({
|
|
771
771
|
message: "User verification was required but no available authenticator supported it",
|
|
772
772
|
code: "ERROR_AUTHENTICATOR_MISSING_USER_VERIFICATION_SUPPORT",
|
|
773
|
-
cause:
|
|
773
|
+
cause: e
|
|
774
774
|
});
|
|
775
775
|
} else {
|
|
776
|
-
if (
|
|
776
|
+
if (e.name === "InvalidStateError")
|
|
777
777
|
return new W({
|
|
778
778
|
message: "The authenticator was previously registered",
|
|
779
779
|
code: "ERROR_AUTHENTICATOR_PREVIOUSLY_REGISTERED",
|
|
780
|
-
cause:
|
|
780
|
+
cause: e
|
|
781
781
|
});
|
|
782
|
-
if (
|
|
782
|
+
if (e.name === "NotAllowedError")
|
|
783
783
|
return new W({
|
|
784
|
-
message:
|
|
784
|
+
message: e.message,
|
|
785
785
|
code: "ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",
|
|
786
|
-
cause:
|
|
786
|
+
cause: e
|
|
787
787
|
});
|
|
788
|
-
if (
|
|
789
|
-
return
|
|
788
|
+
if (e.name === "NotSupportedError")
|
|
789
|
+
return a.pubKeyCredParams.filter((t) => t.type === "public-key").length === 0 ? new W({
|
|
790
790
|
message: 'No entry in pubKeyCredParams was of type "public-key"',
|
|
791
791
|
code: "ERROR_MALFORMED_PUBKEYCREDPARAMS",
|
|
792
|
-
cause:
|
|
792
|
+
cause: e
|
|
793
793
|
}) : new W({
|
|
794
794
|
message: "No available authenticator supported any of the specified pubKeyCredParams algorithms",
|
|
795
795
|
code: "ERROR_AUTHENTICATOR_NO_SUPPORTED_PUBKEYCREDPARAMS_ALG",
|
|
796
|
-
cause:
|
|
796
|
+
cause: e
|
|
797
797
|
});
|
|
798
|
-
if (
|
|
798
|
+
if (e.name === "SecurityError") {
|
|
799
799
|
const u = window.location.hostname;
|
|
800
|
-
if (
|
|
801
|
-
if (
|
|
800
|
+
if (Te(u)) {
|
|
801
|
+
if (a.rp.id !== u)
|
|
802
802
|
return new W({
|
|
803
|
-
message: `The RP ID "${
|
|
803
|
+
message: `The RP ID "${a.rp.id}" is invalid for this domain`,
|
|
804
804
|
code: "ERROR_INVALID_RP_ID",
|
|
805
|
-
cause:
|
|
805
|
+
cause: e
|
|
806
806
|
});
|
|
807
807
|
} else return new W({
|
|
808
808
|
message: `${window.location.hostname} is an invalid domain`,
|
|
809
809
|
code: "ERROR_INVALID_DOMAIN",
|
|
810
|
-
cause:
|
|
810
|
+
cause: e
|
|
811
811
|
});
|
|
812
|
-
} else if (
|
|
813
|
-
if (
|
|
812
|
+
} else if (e.name === "TypeError") {
|
|
813
|
+
if (a.user.id.byteLength < 1 || a.user.id.byteLength > 64)
|
|
814
814
|
return new W({
|
|
815
815
|
message: "User ID was not between 1 and 64 characters",
|
|
816
816
|
code: "ERROR_INVALID_USER_ID_LENGTH",
|
|
817
|
-
cause:
|
|
817
|
+
cause: e
|
|
818
818
|
});
|
|
819
|
-
} else if (
|
|
819
|
+
} else if (e.name === "UnknownError")
|
|
820
820
|
return new W({
|
|
821
821
|
message: "The authenticator was unable to process the specified options, or could not create a new credential",
|
|
822
822
|
code: "ERROR_AUTHENTICATOR_GENERAL_ERROR",
|
|
823
|
-
cause:
|
|
823
|
+
cause: e
|
|
824
824
|
});
|
|
825
825
|
}
|
|
826
|
-
return
|
|
826
|
+
return e;
|
|
827
827
|
}
|
|
828
|
-
class
|
|
828
|
+
class Ut {
|
|
829
829
|
createNewAbortSignal() {
|
|
830
830
|
if (this.controller) {
|
|
831
|
-
const
|
|
832
|
-
|
|
831
|
+
const a = new Error("Cancelling existing WebAuthn API call for new one");
|
|
832
|
+
a.name = "AbortError", this.controller.abort(a);
|
|
833
833
|
}
|
|
834
834
|
const i = new AbortController();
|
|
835
835
|
return this.controller = i, i.signal;
|
|
@@ -841,34 +841,34 @@ class Vt {
|
|
|
841
841
|
}
|
|
842
842
|
}
|
|
843
843
|
}
|
|
844
|
-
const
|
|
845
|
-
function
|
|
846
|
-
if (
|
|
847
|
-
return
|
|
844
|
+
const Ue = new Ut(), Ot = ["cross-platform", "platform"];
|
|
845
|
+
function Oe(e) {
|
|
846
|
+
if (e && !(Ot.indexOf(e) < 0))
|
|
847
|
+
return e;
|
|
848
848
|
}
|
|
849
|
-
async function
|
|
849
|
+
async function xt(e) {
|
|
850
850
|
var S;
|
|
851
851
|
const {
|
|
852
852
|
optionsJSON: i,
|
|
853
|
-
useAutoRegister:
|
|
854
|
-
} =
|
|
855
|
-
if (!
|
|
853
|
+
useAutoRegister: a = !1
|
|
854
|
+
} = e;
|
|
855
|
+
if (!be())
|
|
856
856
|
throw new Error("WebAuthn is not supported in this browser");
|
|
857
857
|
const l = {
|
|
858
858
|
...i,
|
|
859
|
-
challenge:
|
|
859
|
+
challenge: ve(i.challenge),
|
|
860
860
|
user: {
|
|
861
861
|
...i.user,
|
|
862
|
-
id:
|
|
862
|
+
id: ve(i.user.id)
|
|
863
863
|
},
|
|
864
|
-
excludeCredentials: (S = i.excludeCredentials) == null ? void 0 : S.map(
|
|
864
|
+
excludeCredentials: (S = i.excludeCredentials) == null ? void 0 : S.map($e)
|
|
865
865
|
}, s = {};
|
|
866
|
-
|
|
866
|
+
a && (s.mediation = "conditional"), s.publicKey = l, s.signal = Ue.createNewAbortSignal();
|
|
867
867
|
let d;
|
|
868
868
|
try {
|
|
869
869
|
d = await navigator.credentials.create(s);
|
|
870
870
|
} catch (R) {
|
|
871
|
-
throw
|
|
871
|
+
throw Tt({
|
|
872
872
|
error: R,
|
|
873
873
|
options: s
|
|
874
874
|
});
|
|
@@ -877,7 +877,7 @@ async function Tt(a) {
|
|
|
877
877
|
throw new Error("Registration was not completed");
|
|
878
878
|
const {
|
|
879
879
|
id: u,
|
|
880
|
-
rawId:
|
|
880
|
+
rawId: t,
|
|
881
881
|
response: y,
|
|
882
882
|
type: g
|
|
883
883
|
} = d;
|
|
@@ -888,7 +888,7 @@ async function Tt(a) {
|
|
|
888
888
|
try {
|
|
889
889
|
v = y.getPublicKeyAlgorithm();
|
|
890
890
|
} catch (R) {
|
|
891
|
-
|
|
891
|
+
_e("getPublicKeyAlgorithm()", R);
|
|
892
892
|
}
|
|
893
893
|
let r;
|
|
894
894
|
if (typeof y.getPublicKey == "function")
|
|
@@ -896,18 +896,18 @@ async function Tt(a) {
|
|
|
896
896
|
const R = y.getPublicKey();
|
|
897
897
|
R !== null && (r = ee(R));
|
|
898
898
|
} catch (R) {
|
|
899
|
-
|
|
899
|
+
_e("getPublicKey()", R);
|
|
900
900
|
}
|
|
901
901
|
let m;
|
|
902
902
|
if (typeof y.getAuthenticatorData == "function")
|
|
903
903
|
try {
|
|
904
904
|
m = ee(y.getAuthenticatorData());
|
|
905
905
|
} catch (R) {
|
|
906
|
-
|
|
906
|
+
_e("getAuthenticatorData()", R);
|
|
907
907
|
}
|
|
908
908
|
return {
|
|
909
909
|
id: u,
|
|
910
|
-
rawId: ee(
|
|
910
|
+
rawId: ee(t),
|
|
911
911
|
response: {
|
|
912
912
|
attestationObject: ee(y.attestationObject),
|
|
913
913
|
clientDataJSON: ee(y.clientDataJSON),
|
|
@@ -918,106 +918,106 @@ async function Tt(a) {
|
|
|
918
918
|
},
|
|
919
919
|
type: g,
|
|
920
920
|
clientExtensionResults: d.getClientExtensionResults(),
|
|
921
|
-
authenticatorAttachment:
|
|
921
|
+
authenticatorAttachment: Oe(d.authenticatorAttachment)
|
|
922
922
|
};
|
|
923
923
|
}
|
|
924
|
-
function
|
|
925
|
-
console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${
|
|
924
|
+
function _e(e, i) {
|
|
925
|
+
console.warn(`The browser extension that intercepted this WebAuthn API call incorrectly implemented ${e}. You should report this error to them.
|
|
926
926
|
`, i);
|
|
927
927
|
}
|
|
928
|
-
function
|
|
929
|
-
if (!
|
|
928
|
+
function Nt() {
|
|
929
|
+
if (!be())
|
|
930
930
|
return new Promise((i) => i(!1));
|
|
931
|
-
const
|
|
932
|
-
return
|
|
931
|
+
const e = window.PublicKeyCredential;
|
|
932
|
+
return e.isConditionalMediationAvailable === void 0 ? new Promise((i) => i(!1)) : e.isConditionalMediationAvailable();
|
|
933
933
|
}
|
|
934
|
-
function
|
|
935
|
-
error:
|
|
934
|
+
function Dt({
|
|
935
|
+
error: e,
|
|
936
936
|
options: i
|
|
937
937
|
}) {
|
|
938
938
|
const {
|
|
939
|
-
publicKey:
|
|
939
|
+
publicKey: a
|
|
940
940
|
} = i;
|
|
941
|
-
if (!
|
|
941
|
+
if (!a)
|
|
942
942
|
throw Error("options was missing required publicKey property");
|
|
943
|
-
if (
|
|
943
|
+
if (e.name === "AbortError") {
|
|
944
944
|
if (i.signal instanceof AbortSignal)
|
|
945
945
|
return new W({
|
|
946
946
|
message: "Authentication ceremony was sent an abort signal",
|
|
947
947
|
code: "ERROR_CEREMONY_ABORTED",
|
|
948
|
-
cause:
|
|
948
|
+
cause: e
|
|
949
949
|
});
|
|
950
950
|
} else {
|
|
951
|
-
if (
|
|
951
|
+
if (e.name === "NotAllowedError")
|
|
952
952
|
return new W({
|
|
953
|
-
message:
|
|
953
|
+
message: e.message,
|
|
954
954
|
code: "ERROR_PASSTHROUGH_SEE_CAUSE_PROPERTY",
|
|
955
|
-
cause:
|
|
955
|
+
cause: e
|
|
956
956
|
});
|
|
957
|
-
if (
|
|
957
|
+
if (e.name === "SecurityError") {
|
|
958
958
|
const l = window.location.hostname;
|
|
959
|
-
if (
|
|
960
|
-
if (
|
|
959
|
+
if (Te(l)) {
|
|
960
|
+
if (a.rpId !== l)
|
|
961
961
|
return new W({
|
|
962
|
-
message: `The RP ID "${
|
|
962
|
+
message: `The RP ID "${a.rpId}" is invalid for this domain`,
|
|
963
963
|
code: "ERROR_INVALID_RP_ID",
|
|
964
|
-
cause:
|
|
964
|
+
cause: e
|
|
965
965
|
});
|
|
966
966
|
} else return new W({
|
|
967
967
|
message: `${window.location.hostname} is an invalid domain`,
|
|
968
968
|
code: "ERROR_INVALID_DOMAIN",
|
|
969
|
-
cause:
|
|
969
|
+
cause: e
|
|
970
970
|
});
|
|
971
|
-
} else if (
|
|
971
|
+
} else if (e.name === "UnknownError")
|
|
972
972
|
return new W({
|
|
973
973
|
message: "The authenticator was unable to process the specified options, or could not create a new assertion signature",
|
|
974
974
|
code: "ERROR_AUTHENTICATOR_GENERAL_ERROR",
|
|
975
|
-
cause:
|
|
975
|
+
cause: e
|
|
976
976
|
});
|
|
977
977
|
}
|
|
978
|
-
return
|
|
978
|
+
return e;
|
|
979
979
|
}
|
|
980
|
-
async function
|
|
980
|
+
async function Bt(e) {
|
|
981
981
|
var m, S;
|
|
982
982
|
const {
|
|
983
983
|
optionsJSON: i,
|
|
984
|
-
useBrowserAutofill:
|
|
984
|
+
useBrowserAutofill: a = !1,
|
|
985
985
|
verifyBrowserAutofillInput: l = !0
|
|
986
|
-
} =
|
|
987
|
-
if (!
|
|
986
|
+
} = e;
|
|
987
|
+
if (!be())
|
|
988
988
|
throw new Error("WebAuthn is not supported in this browser");
|
|
989
989
|
let s;
|
|
990
|
-
((m = i.allowCredentials) == null ? void 0 : m.length) !== 0 && (s = (S = i.allowCredentials) == null ? void 0 : S.map(
|
|
990
|
+
((m = i.allowCredentials) == null ? void 0 : m.length) !== 0 && (s = (S = i.allowCredentials) == null ? void 0 : S.map($e));
|
|
991
991
|
const d = {
|
|
992
992
|
...i,
|
|
993
|
-
challenge:
|
|
993
|
+
challenge: ve(i.challenge),
|
|
994
994
|
allowCredentials: s
|
|
995
995
|
}, u = {};
|
|
996
|
-
if (
|
|
997
|
-
if (!await
|
|
996
|
+
if (a) {
|
|
997
|
+
if (!await Nt())
|
|
998
998
|
throw Error("Browser does not support WebAuthn autofill");
|
|
999
999
|
if (document.querySelectorAll("input[autocomplete$='webauthn']").length < 1 && l)
|
|
1000
1000
|
throw Error('No <input> with "webauthn" as the only or last value in its `autocomplete` attribute was detected');
|
|
1001
1001
|
u.mediation = "conditional", d.allowCredentials = [];
|
|
1002
1002
|
}
|
|
1003
|
-
u.publicKey = d, u.signal =
|
|
1004
|
-
let
|
|
1003
|
+
u.publicKey = d, u.signal = Ue.createNewAbortSignal();
|
|
1004
|
+
let t;
|
|
1005
1005
|
try {
|
|
1006
|
-
|
|
1006
|
+
t = await navigator.credentials.get(u);
|
|
1007
1007
|
} catch (R) {
|
|
1008
|
-
throw
|
|
1008
|
+
throw Dt({
|
|
1009
1009
|
error: R,
|
|
1010
1010
|
options: u
|
|
1011
1011
|
});
|
|
1012
1012
|
}
|
|
1013
|
-
if (!
|
|
1013
|
+
if (!t)
|
|
1014
1014
|
throw new Error("Authentication was not completed");
|
|
1015
1015
|
const {
|
|
1016
1016
|
id: y,
|
|
1017
1017
|
rawId: g,
|
|
1018
1018
|
response: f,
|
|
1019
1019
|
type: v
|
|
1020
|
-
} =
|
|
1020
|
+
} = t;
|
|
1021
1021
|
let r;
|
|
1022
1022
|
return f.userHandle && (r = ee(f.userHandle)), {
|
|
1023
1023
|
id: y,
|
|
@@ -1029,101 +1029,101 @@ async function Ot(a) {
|
|
|
1029
1029
|
userHandle: r
|
|
1030
1030
|
},
|
|
1031
1031
|
type: v,
|
|
1032
|
-
clientExtensionResults:
|
|
1033
|
-
authenticatorAttachment:
|
|
1032
|
+
clientExtensionResults: t.getClientExtensionResults(),
|
|
1033
|
+
authenticatorAttachment: Oe(t.authenticatorAttachment)
|
|
1034
1034
|
};
|
|
1035
1035
|
}
|
|
1036
|
-
function
|
|
1036
|
+
function qt() {
|
|
1037
1037
|
return se() === null;
|
|
1038
1038
|
}
|
|
1039
1039
|
function se() {
|
|
1040
|
-
return typeof window > "u" ? "非浏览器环境,无法使用 Passkey" : window.isSecureContext ?
|
|
1040
|
+
return typeof window > "u" ? "非浏览器环境,无法使用 Passkey" : window.isSecureContext ? be() ? null : "当前浏览器不支持 Passkey,请使用 Chrome / Safari / Edge" : "Passkey 需要在安全环境下使用(HTTPS,或 localhost)";
|
|
1041
1041
|
}
|
|
1042
|
-
function
|
|
1043
|
-
return
|
|
1042
|
+
function Lt(e) {
|
|
1043
|
+
return e instanceof Error ? e.name === "NotAllowedError" ? "已取消操作" : e.message.includes("WebAuthn is not supported") ? se() || "当前环境不支持 Passkey" : e.name === "NotSupportedError" ? "当前设备无可用认证器" : e.message || "Passkey 操作失败" : "Passkey 操作失败";
|
|
1044
1044
|
}
|
|
1045
|
-
function
|
|
1046
|
-
const
|
|
1047
|
-
return
|
|
1045
|
+
function Mt() {
|
|
1046
|
+
const e = navigator.userAgent;
|
|
1047
|
+
return e.includes("Chrome") ? "Chrome" : e.includes("Safari") ? "Safari" : e.includes("Firefox") ? "Firefox" : e.includes("Edge") ? "Edge" : "Browser";
|
|
1048
1048
|
}
|
|
1049
|
-
function
|
|
1050
|
-
return `${
|
|
1049
|
+
function Kt() {
|
|
1050
|
+
return `${Mt()} - ${(/* @__PURE__ */ new Date()).toLocaleDateString()}`;
|
|
1051
1051
|
}
|
|
1052
|
-
function
|
|
1053
|
-
const
|
|
1054
|
-
async function
|
|
1052
|
+
function Ft() {
|
|
1053
|
+
const e = A(!1), i = qt();
|
|
1054
|
+
async function a(d) {
|
|
1055
1055
|
const u = se();
|
|
1056
1056
|
if (u)
|
|
1057
1057
|
throw new Error(u);
|
|
1058
|
-
|
|
1058
|
+
e.value = !0;
|
|
1059
1059
|
try {
|
|
1060
1060
|
const {
|
|
1061
|
-
data:
|
|
1061
|
+
data: t,
|
|
1062
1062
|
error: y
|
|
1063
|
-
} = await
|
|
1063
|
+
} = await O().auth.passkey.auth.options.post({
|
|
1064
1064
|
email: (d == null ? void 0 : d.trim()) || void 0
|
|
1065
1065
|
});
|
|
1066
|
-
if (y || !
|
|
1066
|
+
if (y || !t)
|
|
1067
1067
|
return null;
|
|
1068
|
-
const g = await
|
|
1069
|
-
optionsJSON:
|
|
1068
|
+
const g = await Bt({
|
|
1069
|
+
optionsJSON: t
|
|
1070
1070
|
}), {
|
|
1071
1071
|
data: f,
|
|
1072
1072
|
error: v
|
|
1073
|
-
} = await
|
|
1073
|
+
} = await O().auth.passkey.auth.verify.post({
|
|
1074
1074
|
response: g
|
|
1075
1075
|
});
|
|
1076
1076
|
return v || !f ? null : f;
|
|
1077
1077
|
} finally {
|
|
1078
|
-
|
|
1078
|
+
e.value = !1;
|
|
1079
1079
|
}
|
|
1080
1080
|
}
|
|
1081
1081
|
async function l(d) {
|
|
1082
1082
|
const u = se();
|
|
1083
1083
|
if (u)
|
|
1084
1084
|
throw new Error(u);
|
|
1085
|
-
|
|
1085
|
+
e.value = !0;
|
|
1086
1086
|
try {
|
|
1087
1087
|
const {
|
|
1088
|
-
data:
|
|
1088
|
+
data: t,
|
|
1089
1089
|
error: y
|
|
1090
|
-
} = await
|
|
1091
|
-
if (y || !
|
|
1090
|
+
} = await O().auth.passkey.register.options.post();
|
|
1091
|
+
if (y || !t)
|
|
1092
1092
|
return !1;
|
|
1093
|
-
const g = await
|
|
1094
|
-
optionsJSON:
|
|
1093
|
+
const g = await xt({
|
|
1094
|
+
optionsJSON: t
|
|
1095
1095
|
}), {
|
|
1096
1096
|
error: f
|
|
1097
|
-
} = await
|
|
1097
|
+
} = await O().auth.passkey.register.verify.post({
|
|
1098
1098
|
response: g,
|
|
1099
|
-
name: (d == null ? void 0 : d.trim()) ||
|
|
1099
|
+
name: (d == null ? void 0 : d.trim()) || Kt()
|
|
1100
1100
|
});
|
|
1101
1101
|
return !f;
|
|
1102
1102
|
} finally {
|
|
1103
|
-
|
|
1103
|
+
e.value = !1;
|
|
1104
1104
|
}
|
|
1105
1105
|
}
|
|
1106
1106
|
function s(d) {
|
|
1107
|
-
return
|
|
1107
|
+
return Lt(d);
|
|
1108
1108
|
}
|
|
1109
1109
|
return {
|
|
1110
|
-
loading:
|
|
1110
|
+
loading: e,
|
|
1111
1111
|
supported: i,
|
|
1112
|
-
loginWithPasskey:
|
|
1112
|
+
loginWithPasskey: a,
|
|
1113
1113
|
registerPasskey: l,
|
|
1114
1114
|
formatError: s,
|
|
1115
1115
|
getPasskeyEnvironmentIssue: se
|
|
1116
1116
|
};
|
|
1117
1117
|
}
|
|
1118
|
-
const
|
|
1118
|
+
const Ht = {
|
|
1119
1119
|
class: "passkey-binding"
|
|
1120
|
-
},
|
|
1120
|
+
}, Wt = {
|
|
1121
1121
|
key: 0,
|
|
1122
1122
|
class: "passkey-binding__issue"
|
|
1123
|
-
},
|
|
1123
|
+
}, Gt = {
|
|
1124
1124
|
key: 4,
|
|
1125
1125
|
class: "passkey-binding__toolbar"
|
|
1126
|
-
},
|
|
1126
|
+
}, Yt = /* @__PURE__ */ J({
|
|
1127
1127
|
__name: "AuthkitPasskeyBinding",
|
|
1128
1128
|
props: {
|
|
1129
1129
|
size: {
|
|
@@ -1131,39 +1131,39 @@ const Mt = {
|
|
|
1131
1131
|
required: !0
|
|
1132
1132
|
}
|
|
1133
1133
|
},
|
|
1134
|
-
setup(
|
|
1135
|
-
const i =
|
|
1136
|
-
userProfile:
|
|
1137
|
-
} =
|
|
1138
|
-
registerPasskey:
|
|
1134
|
+
setup(e) {
|
|
1135
|
+
const i = e, {
|
|
1136
|
+
userProfile: a
|
|
1137
|
+
} = ne(), l = A(!1), s = A(!1), d = A([]), u = se(), {
|
|
1138
|
+
registerPasskey: t,
|
|
1139
1139
|
formatError: y
|
|
1140
|
-
} =
|
|
1140
|
+
} = Ft(), g = A(""), f = A(!1), v = A(), r = $(() => {
|
|
1141
1141
|
var _, P;
|
|
1142
|
-
return !!((_ =
|
|
1142
|
+
return !!((_ = a.value) != null && _.email || (P = a.value) != null && P.phone);
|
|
1143
1143
|
}), m = $(() => r.value && !v.value), S = [{
|
|
1144
1144
|
title: "通行密钥",
|
|
1145
1145
|
dataIndex: "name",
|
|
1146
|
-
minWidth:
|
|
1146
|
+
minWidth: fe.name,
|
|
1147
1147
|
ellipsis: !0,
|
|
1148
1148
|
tooltip: !0
|
|
1149
1149
|
}, {
|
|
1150
1150
|
title: "上次使用",
|
|
1151
1151
|
dataIndex: "lastUsedAt",
|
|
1152
1152
|
slotName: "lastUsedAt",
|
|
1153
|
-
minWidth:
|
|
1153
|
+
minWidth: fe.datetime,
|
|
1154
1154
|
ellipsis: !0,
|
|
1155
1155
|
tooltip: !0
|
|
1156
1156
|
}, {
|
|
1157
1157
|
title: "添加时间",
|
|
1158
1158
|
dataIndex: "createdAt",
|
|
1159
1159
|
slotName: "createdAt",
|
|
1160
|
-
minWidth:
|
|
1160
|
+
minWidth: fe.datetime,
|
|
1161
1161
|
ellipsis: !0,
|
|
1162
1162
|
tooltip: !0
|
|
1163
1163
|
}, {
|
|
1164
1164
|
title: "操作",
|
|
1165
1165
|
slotName: "actions",
|
|
1166
|
-
width:
|
|
1166
|
+
width: fe.actionsSingle,
|
|
1167
1167
|
fixed: "right",
|
|
1168
1168
|
cellClassName: "passkey-actions-cell"
|
|
1169
1169
|
}];
|
|
@@ -1172,7 +1172,7 @@ const Mt = {
|
|
|
1172
1172
|
const {
|
|
1173
1173
|
data: _,
|
|
1174
1174
|
error: P
|
|
1175
|
-
} = await
|
|
1175
|
+
} = await O().auth.passkey.list.post();
|
|
1176
1176
|
if (l.value = !1, P || !_) {
|
|
1177
1177
|
d.value = [];
|
|
1178
1178
|
return;
|
|
@@ -1182,7 +1182,7 @@ const Mt = {
|
|
|
1182
1182
|
async function B() {
|
|
1183
1183
|
s.value = !0;
|
|
1184
1184
|
try {
|
|
1185
|
-
if (!await
|
|
1185
|
+
if (!await t())
|
|
1186
1186
|
return;
|
|
1187
1187
|
G.success("Passkey 添加成功"), await R();
|
|
1188
1188
|
} catch (_) {
|
|
@@ -1197,11 +1197,11 @@ const Mt = {
|
|
|
1197
1197
|
q();
|
|
1198
1198
|
return;
|
|
1199
1199
|
}
|
|
1200
|
-
if ((P =
|
|
1200
|
+
if ((P = a.value) != null && P.email && ((N = a.value) != null && N.phone)) {
|
|
1201
1201
|
v.value = void 0;
|
|
1202
1202
|
return;
|
|
1203
1203
|
}
|
|
1204
|
-
v.value = (F =
|
|
1204
|
+
v.value = (F = a.value) != null && F.email ? "email" : "phone";
|
|
1205
1205
|
}
|
|
1206
1206
|
function j(_) {
|
|
1207
1207
|
v.value = _;
|
|
@@ -1217,16 +1217,16 @@ const Mt = {
|
|
|
1217
1217
|
return;
|
|
1218
1218
|
const {
|
|
1219
1219
|
error: _
|
|
1220
|
-
} = await
|
|
1220
|
+
} = await O().auth.passkey.delete.post({
|
|
1221
1221
|
credentialId: g.value
|
|
1222
1222
|
});
|
|
1223
1223
|
_ || (G.success("已移除"), await R()), w();
|
|
1224
1224
|
}
|
|
1225
|
-
return
|
|
1225
|
+
return de(() => {
|
|
1226
1226
|
R();
|
|
1227
1227
|
}), (_, P) => {
|
|
1228
1228
|
var N, F;
|
|
1229
|
-
return h(), M("div",
|
|
1229
|
+
return h(), M("div", Ht, [p(n(Y), {
|
|
1230
1230
|
type: "info",
|
|
1231
1231
|
style: {
|
|
1232
1232
|
"margin-bottom": "16px"
|
|
@@ -1234,35 +1234,35 @@ const Mt = {
|
|
|
1234
1234
|
}, {
|
|
1235
1235
|
default: o(() => [...P[2] || (P[2] = [k(" Passkey 使用设备生物识别(指纹 / 面容)登录,绑定后可在登录页一键验证身份。 ", -1)])]),
|
|
1236
1236
|
_: 1
|
|
1237
|
-
}),
|
|
1237
|
+
}), n(u) ? (h(), M("div", Wt, U(n(u)), 1)) : E("", !0), g.value && !f.value ? (h(), I(n(Y), {
|
|
1238
1238
|
key: 1,
|
|
1239
1239
|
type: "warning",
|
|
1240
1240
|
title: "移除前验证身份"
|
|
1241
|
-
},
|
|
1241
|
+
}, Me({
|
|
1242
1242
|
default: o(() => [P[6] || (P[6] = k(" 移除 Passkey 前请先完成身份验证。 ", -1))]),
|
|
1243
1243
|
_: 2
|
|
1244
1244
|
}, [m.value ? {
|
|
1245
1245
|
name: "action",
|
|
1246
|
-
fn: o(() => [p(
|
|
1246
|
+
fn: o(() => [p(n(me), null, {
|
|
1247
1247
|
default: o(() => {
|
|
1248
1248
|
var D, Z;
|
|
1249
|
-
return [(D =
|
|
1249
|
+
return [(D = n(a)) != null && D.email ? (h(), I(n(T), {
|
|
1250
1250
|
key: 0,
|
|
1251
1251
|
size: i.size,
|
|
1252
1252
|
type: "primary",
|
|
1253
|
-
onClick: P[0] || (P[0] = (
|
|
1253
|
+
onClick: P[0] || (P[0] = (ae) => j("email"))
|
|
1254
1254
|
}, {
|
|
1255
1255
|
default: o(() => [...P[3] || (P[3] = [k(" 邮箱验证 ", -1)])]),
|
|
1256
1256
|
_: 1
|
|
1257
|
-
}, 8, ["size"])) :
|
|
1257
|
+
}, 8, ["size"])) : E("", !0), (Z = n(a)) != null && Z.phone ? (h(), I(n(T), {
|
|
1258
1258
|
key: 1,
|
|
1259
1259
|
size: i.size,
|
|
1260
1260
|
type: "primary",
|
|
1261
|
-
onClick: P[1] || (P[1] = (
|
|
1261
|
+
onClick: P[1] || (P[1] = (ae) => j("phone"))
|
|
1262
1262
|
}, {
|
|
1263
1263
|
default: o(() => [...P[4] || (P[4] = [k(" 手机验证 ", -1)])]),
|
|
1264
1264
|
_: 1
|
|
1265
|
-
}, 8, ["size"])) :
|
|
1265
|
+
}, 8, ["size"])) : E("", !0), p(n(T), {
|
|
1266
1266
|
size: i.size,
|
|
1267
1267
|
onClick: w
|
|
1268
1268
|
}, {
|
|
@@ -1273,26 +1273,26 @@ const Mt = {
|
|
|
1273
1273
|
_: 1
|
|
1274
1274
|
})]),
|
|
1275
1275
|
key: "0"
|
|
1276
|
-
} : void 0]), 1024)) :
|
|
1276
|
+
} : void 0]), 1024)) : E("", !0), g.value && v.value === "email" && ((N = n(a)) != null && N.email) ? (h(), I(ge, {
|
|
1277
1277
|
key: 2,
|
|
1278
1278
|
size: i.size,
|
|
1279
|
-
email:
|
|
1279
|
+
email: n(a).email,
|
|
1280
1280
|
onNext: V
|
|
1281
|
-
}, null, 8, ["size", "email"])) :
|
|
1281
|
+
}, null, 8, ["size", "email"])) : E("", !0), g.value && v.value === "phone" && ((F = n(a)) != null && F.phone) ? (h(), I(we, {
|
|
1282
1282
|
key: 3,
|
|
1283
1283
|
size: i.size,
|
|
1284
|
-
phone:
|
|
1284
|
+
phone: n(a).phone,
|
|
1285
1285
|
onNext: V
|
|
1286
|
-
}, null, 8, ["size", "phone"])) :
|
|
1286
|
+
}, null, 8, ["size", "phone"])) : E("", !0), g.value ? E("", !0) : (h(), M("div", Gt, [p(n(T), {
|
|
1287
1287
|
type: "primary",
|
|
1288
1288
|
size: i.size,
|
|
1289
1289
|
loading: s.value,
|
|
1290
|
-
disabled: !!
|
|
1290
|
+
disabled: !!n(u),
|
|
1291
1291
|
onClick: B
|
|
1292
1292
|
}, {
|
|
1293
1293
|
default: o(() => [...P[7] || (P[7] = [k(" 添加 Passkey ", -1)])]),
|
|
1294
1294
|
_: 1
|
|
1295
|
-
}, 8, ["size", "loading", "disabled"])])), g.value ?
|
|
1295
|
+
}, 8, ["size", "loading", "disabled"])])), g.value ? E("", !0) : (h(), I(Ze, {
|
|
1296
1296
|
key: 5,
|
|
1297
1297
|
columns: S,
|
|
1298
1298
|
data: d.value,
|
|
@@ -1309,11 +1309,11 @@ const Mt = {
|
|
|
1309
1309
|
}) => [k(U(D.createdAt || "-"), 1)]),
|
|
1310
1310
|
actions: o(({
|
|
1311
1311
|
record: D
|
|
1312
|
-
}) => [p(
|
|
1312
|
+
}) => [p(n(He), {
|
|
1313
1313
|
content: "确定移除此 Passkey?移除后将无法使用该设备登录",
|
|
1314
1314
|
onOk: (Z) => K(D.credentialId)
|
|
1315
1315
|
}, {
|
|
1316
|
-
default: o(() => [p(
|
|
1316
|
+
default: o(() => [p(n(T), {
|
|
1317
1317
|
type: "text",
|
|
1318
1318
|
status: "danger",
|
|
1319
1319
|
size: i.size
|
|
@@ -1327,18 +1327,18 @@ const Mt = {
|
|
|
1327
1327
|
}, 8, ["data", "loading"]))]);
|
|
1328
1328
|
};
|
|
1329
1329
|
}
|
|
1330
|
-
}),
|
|
1330
|
+
}), Jt = /* @__PURE__ */ X(Yt, [["__scopeId", "data-v-08d3a331"]]), jt = {
|
|
1331
1331
|
class: "BindEmail"
|
|
1332
|
-
},
|
|
1332
|
+
}, Qt = {
|
|
1333
1333
|
class: "content"
|
|
1334
|
-
},
|
|
1334
|
+
}, Xt = {
|
|
1335
1335
|
class: "sendVerifyCodeItem"
|
|
1336
|
-
},
|
|
1336
|
+
}, Zt = {
|
|
1337
1337
|
class: "handle"
|
|
1338
|
-
},
|
|
1338
|
+
}, ei = {
|
|
1339
1339
|
key: 0,
|
|
1340
1340
|
class: "skip"
|
|
1341
|
-
},
|
|
1341
|
+
}, ti = /* @__PURE__ */ J({
|
|
1342
1342
|
__name: "AuthkitBindEmail",
|
|
1343
1343
|
props: {
|
|
1344
1344
|
size: {
|
|
@@ -1369,10 +1369,10 @@ const Mt = {
|
|
|
1369
1369
|
}
|
|
1370
1370
|
},
|
|
1371
1371
|
emits: ["submit", "skip"],
|
|
1372
|
-
setup(
|
|
1372
|
+
setup(e, {
|
|
1373
1373
|
emit: i
|
|
1374
1374
|
}) {
|
|
1375
|
-
const
|
|
1375
|
+
const a = i, l = e, s = A(), d = A(!1), u = A(), t = A({
|
|
1376
1376
|
email: void 0,
|
|
1377
1377
|
userToken: void 0,
|
|
1378
1378
|
emailVerifyId: void 0
|
|
@@ -1380,39 +1380,39 @@ const Mt = {
|
|
|
1380
1380
|
async function y() {
|
|
1381
1381
|
if (!await u.value.validateField(["email"])) {
|
|
1382
1382
|
d.value = !0;
|
|
1383
|
-
const r = await
|
|
1384
|
-
email:
|
|
1383
|
+
const r = await O().auth.verify.email.retry.post({
|
|
1384
|
+
email: t.value.email,
|
|
1385
1385
|
purpose: "bindEmail"
|
|
1386
1386
|
});
|
|
1387
|
-
d.value = !1, r.data && (
|
|
1387
|
+
d.value = !1, r.data && (t.value.emailVerifyId = r.data.emailVerifyId), ye(s.value, r);
|
|
1388
1388
|
}
|
|
1389
1389
|
}
|
|
1390
1390
|
async function g() {
|
|
1391
1391
|
u.value.validate().then((v) => {
|
|
1392
|
-
v ||
|
|
1393
|
-
email:
|
|
1394
|
-
userToken:
|
|
1395
|
-
emailVerifyId:
|
|
1392
|
+
v || a("submit", {
|
|
1393
|
+
email: t.value.email,
|
|
1394
|
+
userToken: t.value.userToken,
|
|
1395
|
+
emailVerifyId: t.value.emailVerifyId
|
|
1396
1396
|
});
|
|
1397
1397
|
});
|
|
1398
1398
|
}
|
|
1399
1399
|
function f() {
|
|
1400
|
-
|
|
1400
|
+
a("skip");
|
|
1401
1401
|
}
|
|
1402
|
-
return (v, r) => (h(), M("div",
|
|
1402
|
+
return (v, r) => (h(), M("div", jt, [p(n(Y), {
|
|
1403
1403
|
type: "info",
|
|
1404
1404
|
title: l.title
|
|
1405
1405
|
}, {
|
|
1406
1406
|
default: o(() => [k(U(l.subtitle), 1)]),
|
|
1407
1407
|
_: 1
|
|
1408
|
-
}, 8, ["title"]),
|
|
1408
|
+
}, 8, ["title"]), z("div", Qt, [p(n(le), {
|
|
1409
1409
|
ref_key: "formRef",
|
|
1410
1410
|
ref: u,
|
|
1411
|
-
model:
|
|
1411
|
+
model: t.value,
|
|
1412
1412
|
size: l.size,
|
|
1413
1413
|
"auto-label-width": ""
|
|
1414
1414
|
}, {
|
|
1415
|
-
default: o(() => [p(
|
|
1415
|
+
default: o(() => [p(n(L), {
|
|
1416
1416
|
field: "email",
|
|
1417
1417
|
label: "邮箱",
|
|
1418
1418
|
"hide-label": "",
|
|
@@ -1424,15 +1424,15 @@ const Mt = {
|
|
|
1424
1424
|
message: "请输入有效的邮箱"
|
|
1425
1425
|
}]
|
|
1426
1426
|
}, {
|
|
1427
|
-
default: o(() => [p(
|
|
1428
|
-
modelValue:
|
|
1429
|
-
"onUpdate:modelValue": r[0] || (r[0] = (m) =>
|
|
1427
|
+
default: o(() => [p(n(Q), {
|
|
1428
|
+
modelValue: t.value.email,
|
|
1429
|
+
"onUpdate:modelValue": r[0] || (r[0] = (m) => t.value.email = m),
|
|
1430
1430
|
placeholder: "请输入邮箱",
|
|
1431
1431
|
autocomplete: "email",
|
|
1432
1432
|
type: "email"
|
|
1433
1433
|
}, null, 8, ["modelValue"])]),
|
|
1434
1434
|
_: 1
|
|
1435
|
-
}), p(
|
|
1435
|
+
}), p(n(L), {
|
|
1436
1436
|
field: "userToken",
|
|
1437
1437
|
label: "验证码",
|
|
1438
1438
|
"hide-label": "",
|
|
@@ -1441,12 +1441,12 @@ const Mt = {
|
|
|
1441
1441
|
message: "请输入验证码"
|
|
1442
1442
|
}]
|
|
1443
1443
|
}, {
|
|
1444
|
-
default: o(() => [
|
|
1445
|
-
modelValue:
|
|
1446
|
-
"onUpdate:modelValue": r[1] || (r[1] = (m) =>
|
|
1444
|
+
default: o(() => [z("div", Xt, [p(n(Q), {
|
|
1445
|
+
modelValue: t.value.userToken,
|
|
1446
|
+
"onUpdate:modelValue": r[1] || (r[1] = (m) => t.value.userToken = m),
|
|
1447
1447
|
placeholder: "请输入验证码",
|
|
1448
1448
|
autocomplete: "one-time-code"
|
|
1449
|
-
}, null, 8, ["modelValue"]), p(
|
|
1449
|
+
}, null, 8, ["modelValue"]), p(he, {
|
|
1450
1450
|
ref_key: "SendVerifyCodeRef",
|
|
1451
1451
|
ref: s,
|
|
1452
1452
|
size: l.size,
|
|
@@ -1457,7 +1457,7 @@ const Mt = {
|
|
|
1457
1457
|
onSend: y
|
|
1458
1458
|
}, null, 8, ["size", "loading"])])]),
|
|
1459
1459
|
_: 1
|
|
1460
|
-
}),
|
|
1460
|
+
}), z("div", Zt, [p(n(T), {
|
|
1461
1461
|
type: "primary",
|
|
1462
1462
|
loading: l.loading,
|
|
1463
1463
|
long: "",
|
|
@@ -1468,14 +1468,14 @@ const Mt = {
|
|
|
1468
1468
|
_: 1
|
|
1469
1469
|
}, 8, ["loading", "size"])])]),
|
|
1470
1470
|
_: 1
|
|
1471
|
-
}, 8, ["model", "size"])]), l.showSkip ? (h(), M("div",
|
|
1471
|
+
}, 8, ["model", "size"])]), l.showSkip ? (h(), M("div", ei, [p(n(Ce), {
|
|
1472
1472
|
onClick: f
|
|
1473
1473
|
}, {
|
|
1474
1474
|
default: o(() => [...r[2] || (r[2] = [k("稍后绑定", -1)])]),
|
|
1475
1475
|
_: 1
|
|
1476
|
-
})])) :
|
|
1476
|
+
})])) : E("", !0)]));
|
|
1477
1477
|
}
|
|
1478
|
-
}),
|
|
1478
|
+
}), ii = /* @__PURE__ */ X(ti, [["__scopeId", "data-v-00ac3b6a"]]), ni = /* @__PURE__ */ J({
|
|
1479
1479
|
__name: "AuthkitEmailBinding",
|
|
1480
1480
|
props: {
|
|
1481
1481
|
size: {
|
|
@@ -1483,12 +1483,12 @@ const Mt = {
|
|
|
1483
1483
|
required: !0
|
|
1484
1484
|
}
|
|
1485
1485
|
},
|
|
1486
|
-
setup(
|
|
1486
|
+
setup(e) {
|
|
1487
1487
|
const {
|
|
1488
1488
|
userProfile: i,
|
|
1489
|
-
loading:
|
|
1489
|
+
loading: a,
|
|
1490
1490
|
fetchUserProfile: l
|
|
1491
|
-
} =
|
|
1491
|
+
} = ne(), s = A("hidden"), d = A(!1), u = e, t = $(() => {
|
|
1492
1492
|
var v;
|
|
1493
1493
|
return !!((v = i.value) != null && v.email) && d.value;
|
|
1494
1494
|
});
|
|
@@ -1496,32 +1496,32 @@ const Mt = {
|
|
|
1496
1496
|
s.value = v;
|
|
1497
1497
|
}
|
|
1498
1498
|
async function g(v) {
|
|
1499
|
-
|
|
1500
|
-
const r =
|
|
1499
|
+
a.value = !0;
|
|
1500
|
+
const r = t.value ? O().auth.users.update.myEmail.post({
|
|
1501
1501
|
email: v.email,
|
|
1502
1502
|
userToken: v.userToken,
|
|
1503
1503
|
emailVerifyId: v.emailVerifyId
|
|
1504
|
-
}) :
|
|
1504
|
+
}) : O().auth.auth.bind.email.post({
|
|
1505
1505
|
email: v.email,
|
|
1506
1506
|
userToken: v.userToken,
|
|
1507
1507
|
emailVerifyId: v.emailVerifyId
|
|
1508
1508
|
}), {
|
|
1509
1509
|
error: m
|
|
1510
1510
|
} = await r;
|
|
1511
|
-
|
|
1511
|
+
a.value = !1, m || (G.success(t.value ? "更改成功" : "绑定成功"), s.value = "hidden", d.value = !1, l());
|
|
1512
1512
|
}
|
|
1513
1513
|
function f() {
|
|
1514
1514
|
d.value = !0, s.value = "update";
|
|
1515
1515
|
}
|
|
1516
|
-
return
|
|
1516
|
+
return de(() => {
|
|
1517
1517
|
i.value || l();
|
|
1518
1518
|
}), (v, r) => {
|
|
1519
1519
|
var m, S, R;
|
|
1520
|
-
return h(), M(ie, null, [(m =
|
|
1520
|
+
return h(), M(ie, null, [(m = n(i)) != null && m.email && s.value === "hidden" ? (h(), I(n(Y), {
|
|
1521
1521
|
key: 0,
|
|
1522
1522
|
title: "更改邮箱"
|
|
1523
1523
|
}, {
|
|
1524
|
-
action: o(() => [p(
|
|
1524
|
+
action: o(() => [p(n(T), {
|
|
1525
1525
|
size: u.size,
|
|
1526
1526
|
type: "primary",
|
|
1527
1527
|
onClick: r[0] || (r[0] = (B) => y("verify"))
|
|
@@ -1529,42 +1529,42 @@ const Mt = {
|
|
|
1529
1529
|
default: o(() => [...r[1] || (r[1] = [k("更改邮箱", -1)])]),
|
|
1530
1530
|
_: 1
|
|
1531
1531
|
}, 8, ["size"])]),
|
|
1532
|
-
default: o(() => [k(U(`您绑定的邮箱为 ${
|
|
1532
|
+
default: o(() => [k(U(`您绑定的邮箱为 ${n(Re)(n(i).email)}`) + " ", 1)]),
|
|
1533
1533
|
_: 1
|
|
1534
|
-
})) :
|
|
1534
|
+
})) : E("", !0), !((S = n(i)) != null && S.email) || s.value === "update" ? (h(), I(ii, {
|
|
1535
1535
|
key: 1,
|
|
1536
|
-
loading:
|
|
1536
|
+
loading: n(a),
|
|
1537
1537
|
size: u.size,
|
|
1538
|
-
title:
|
|
1539
|
-
subtitle:
|
|
1540
|
-
"submit-text":
|
|
1538
|
+
title: t.value ? "更改邮箱" : "绑定邮箱",
|
|
1539
|
+
subtitle: t.value ? "请输入新的邮箱并完成验证" : "请绑定邮箱以完成账号设置,绑定后可使用邮箱登录",
|
|
1540
|
+
"submit-text": t.value ? "更改邮箱" : "绑定邮箱",
|
|
1541
1541
|
onSubmit: g
|
|
1542
|
-
}, null, 8, ["loading", "size", "title", "subtitle", "submit-text"])) :
|
|
1542
|
+
}, null, 8, ["loading", "size", "title", "subtitle", "submit-text"])) : E("", !0), s.value === "verify" ? (h(), I(ge, {
|
|
1543
1543
|
key: 2,
|
|
1544
1544
|
size: u.size,
|
|
1545
|
-
email: (R =
|
|
1545
|
+
email: (R = n(i)) == null ? void 0 : R.email,
|
|
1546
1546
|
onNext: f
|
|
1547
|
-
}, null, 8, ["size", "email"])) :
|
|
1547
|
+
}, null, 8, ["size", "email"])) : E("", !0)], 64);
|
|
1548
1548
|
};
|
|
1549
1549
|
}
|
|
1550
|
-
}),
|
|
1550
|
+
}), ai = {
|
|
1551
1551
|
class: "BindPhone"
|
|
1552
|
-
},
|
|
1552
|
+
}, oi = {
|
|
1553
1553
|
class: "header"
|
|
1554
|
-
},
|
|
1554
|
+
}, si = {
|
|
1555
1555
|
class: "title"
|
|
1556
|
-
},
|
|
1556
|
+
}, li = {
|
|
1557
1557
|
class: "subtitle"
|
|
1558
|
-
},
|
|
1558
|
+
}, ri = {
|
|
1559
1559
|
class: "content"
|
|
1560
|
-
},
|
|
1560
|
+
}, ui = {
|
|
1561
1561
|
class: "sendVerifyCodeItem"
|
|
1562
|
-
},
|
|
1562
|
+
}, di = {
|
|
1563
1563
|
class: "handle"
|
|
1564
|
-
},
|
|
1564
|
+
}, ci = {
|
|
1565
1565
|
key: 0,
|
|
1566
1566
|
class: "skip"
|
|
1567
|
-
},
|
|
1567
|
+
}, fi = /* @__PURE__ */ J({
|
|
1568
1568
|
__name: "AuthkitBindPhone",
|
|
1569
1569
|
props: {
|
|
1570
1570
|
size: {
|
|
@@ -1594,42 +1594,42 @@ const Mt = {
|
|
|
1594
1594
|
}
|
|
1595
1595
|
},
|
|
1596
1596
|
emits: ["submit", "skip"],
|
|
1597
|
-
setup(
|
|
1597
|
+
setup(e, {
|
|
1598
1598
|
emit: i
|
|
1599
1599
|
}) {
|
|
1600
|
-
const
|
|
1600
|
+
const a = i, l = e, s = A(), d = A(!1), u = A(), t = A({
|
|
1601
1601
|
phone: void 0,
|
|
1602
1602
|
code: void 0
|
|
1603
1603
|
});
|
|
1604
1604
|
async function y() {
|
|
1605
1605
|
if (!await u.value.validateField(["phone"])) {
|
|
1606
1606
|
d.value = !0;
|
|
1607
|
-
const r = await
|
|
1608
|
-
phone:
|
|
1607
|
+
const r = await O().auth.verify.sms.send.post({
|
|
1608
|
+
phone: t.value.phone,
|
|
1609
1609
|
purpose: "bindPhone"
|
|
1610
1610
|
});
|
|
1611
|
-
d.value = !1,
|
|
1611
|
+
d.value = !1, ye(s.value, r);
|
|
1612
1612
|
}
|
|
1613
1613
|
}
|
|
1614
1614
|
async function g() {
|
|
1615
1615
|
u.value.validate().then((v) => {
|
|
1616
|
-
v ||
|
|
1617
|
-
phone:
|
|
1618
|
-
code:
|
|
1616
|
+
v || a("submit", {
|
|
1617
|
+
phone: t.value.phone,
|
|
1618
|
+
code: t.value.code
|
|
1619
1619
|
});
|
|
1620
1620
|
});
|
|
1621
1621
|
}
|
|
1622
1622
|
function f() {
|
|
1623
|
-
|
|
1623
|
+
a("skip");
|
|
1624
1624
|
}
|
|
1625
|
-
return (v, r) => (h(), M("div",
|
|
1625
|
+
return (v, r) => (h(), M("div", ai, [z("div", oi, [z("h3", si, U(l.title), 1), z("p", li, U(l.subtitle), 1)]), z("div", ri, [p(n(le), {
|
|
1626
1626
|
ref_key: "formRef",
|
|
1627
1627
|
ref: u,
|
|
1628
|
-
model:
|
|
1628
|
+
model: t.value,
|
|
1629
1629
|
size: l.size,
|
|
1630
1630
|
"auto-label-width": ""
|
|
1631
1631
|
}, {
|
|
1632
|
-
default: o(() => [p(
|
|
1632
|
+
default: o(() => [p(n(L), {
|
|
1633
1633
|
field: "phone",
|
|
1634
1634
|
label: "手机号",
|
|
1635
1635
|
"hide-label": "",
|
|
@@ -1641,15 +1641,15 @@ const Mt = {
|
|
|
1641
1641
|
message: "请输入有效的手机号"
|
|
1642
1642
|
}]
|
|
1643
1643
|
}, {
|
|
1644
|
-
default: o(() => [p(
|
|
1645
|
-
modelValue:
|
|
1646
|
-
"onUpdate:modelValue": r[0] || (r[0] = (m) =>
|
|
1644
|
+
default: o(() => [p(n(Q), {
|
|
1645
|
+
modelValue: t.value.phone,
|
|
1646
|
+
"onUpdate:modelValue": r[0] || (r[0] = (m) => t.value.phone = m),
|
|
1647
1647
|
placeholder: "请输入手机号",
|
|
1648
1648
|
autocomplete: "tel",
|
|
1649
1649
|
type: "tel"
|
|
1650
1650
|
}, null, 8, ["modelValue"])]),
|
|
1651
1651
|
_: 1
|
|
1652
|
-
}), p(
|
|
1652
|
+
}), p(n(L), {
|
|
1653
1653
|
field: "code",
|
|
1654
1654
|
label: "验证码",
|
|
1655
1655
|
"hide-label": "",
|
|
@@ -1658,12 +1658,12 @@ const Mt = {
|
|
|
1658
1658
|
message: "请输入验证码"
|
|
1659
1659
|
}]
|
|
1660
1660
|
}, {
|
|
1661
|
-
default: o(() => [
|
|
1662
|
-
modelValue:
|
|
1663
|
-
"onUpdate:modelValue": r[1] || (r[1] = (m) =>
|
|
1661
|
+
default: o(() => [z("div", ui, [p(n(Q), {
|
|
1662
|
+
modelValue: t.value.code,
|
|
1663
|
+
"onUpdate:modelValue": r[1] || (r[1] = (m) => t.value.code = m),
|
|
1664
1664
|
placeholder: "请输入验证码",
|
|
1665
1665
|
autocomplete: "one-time-code"
|
|
1666
|
-
}, null, 8, ["modelValue"]), p(
|
|
1666
|
+
}, null, 8, ["modelValue"]), p(he, {
|
|
1667
1667
|
ref_key: "SendVerifyCodeRef",
|
|
1668
1668
|
ref: s,
|
|
1669
1669
|
size: l.size,
|
|
@@ -1674,7 +1674,7 @@ const Mt = {
|
|
|
1674
1674
|
onSend: y
|
|
1675
1675
|
}, null, 8, ["size", "loading"])])]),
|
|
1676
1676
|
_: 1
|
|
1677
|
-
}),
|
|
1677
|
+
}), z("div", di, [p(n(T), {
|
|
1678
1678
|
type: "primary",
|
|
1679
1679
|
loading: l.loading,
|
|
1680
1680
|
long: "",
|
|
@@ -1685,14 +1685,14 @@ const Mt = {
|
|
|
1685
1685
|
_: 1
|
|
1686
1686
|
}, 8, ["loading", "size"])])]),
|
|
1687
1687
|
_: 1
|
|
1688
|
-
}, 8, ["model", "size"])]), l.showSkip ? (h(), M("div",
|
|
1688
|
+
}, 8, ["model", "size"])]), l.showSkip ? (h(), M("div", ci, [p(n(Ce), {
|
|
1689
1689
|
onClick: f
|
|
1690
1690
|
}, {
|
|
1691
1691
|
default: o(() => [...r[2] || (r[2] = [k("稍后绑定", -1)])]),
|
|
1692
1692
|
_: 1
|
|
1693
|
-
})])) :
|
|
1693
|
+
})])) : E("", !0)]));
|
|
1694
1694
|
}
|
|
1695
|
-
}),
|
|
1695
|
+
}), pi = /* @__PURE__ */ X(fi, [["__scopeId", "data-v-1db8897d"]]), mi = /* @__PURE__ */ J({
|
|
1696
1696
|
__name: "AuthkitPhoneBinding",
|
|
1697
1697
|
props: {
|
|
1698
1698
|
size: {
|
|
@@ -1700,12 +1700,12 @@ const Mt = {
|
|
|
1700
1700
|
required: !0
|
|
1701
1701
|
}
|
|
1702
1702
|
},
|
|
1703
|
-
setup(
|
|
1703
|
+
setup(e) {
|
|
1704
1704
|
const {
|
|
1705
1705
|
userProfile: i,
|
|
1706
|
-
loading:
|
|
1706
|
+
loading: a,
|
|
1707
1707
|
fetchUserProfile: l
|
|
1708
|
-
} =
|
|
1708
|
+
} = ne(), s = A("hidden"), d = A(!1), u = e, t = $(() => {
|
|
1709
1709
|
var m;
|
|
1710
1710
|
const r = ((m = i.value) == null ? void 0 : m.phone) || "";
|
|
1711
1711
|
return r.length < 7 ? r : `${r.slice(0, 3)}****${r.slice(-4)}`;
|
|
@@ -1718,30 +1718,30 @@ const Mt = {
|
|
|
1718
1718
|
s.value = r, r === "update" && !((m = i.value) != null && m.phone) && (d.value = !1);
|
|
1719
1719
|
}
|
|
1720
1720
|
async function f(r) {
|
|
1721
|
-
|
|
1722
|
-
const m = y.value ?
|
|
1721
|
+
a.value = !0;
|
|
1722
|
+
const m = y.value ? O().auth.users.update.myPhone.post({
|
|
1723
1723
|
phone: r.phone,
|
|
1724
1724
|
code: r.code
|
|
1725
|
-
}) :
|
|
1725
|
+
}) : O().auth.auth.bind.phone.post({
|
|
1726
1726
|
phone: r.phone,
|
|
1727
1727
|
code: r.code
|
|
1728
1728
|
}), {
|
|
1729
1729
|
error: S
|
|
1730
1730
|
} = await m;
|
|
1731
|
-
|
|
1731
|
+
a.value = !1, S || (G.success(y.value ? "更改成功" : "绑定成功"), s.value = "hidden", d.value = !1, l());
|
|
1732
1732
|
}
|
|
1733
1733
|
function v() {
|
|
1734
1734
|
d.value = !0, s.value = "update";
|
|
1735
1735
|
}
|
|
1736
|
-
return
|
|
1736
|
+
return de(() => {
|
|
1737
1737
|
i.value || l();
|
|
1738
1738
|
}), (r, m) => {
|
|
1739
1739
|
var S, R, B;
|
|
1740
|
-
return h(), M(ie, null, [!((S =
|
|
1740
|
+
return h(), M(ie, null, [!((S = n(i)) != null && S.phone) && s.value === "hidden" ? (h(), I(n(Y), {
|
|
1741
1741
|
key: 0,
|
|
1742
1742
|
title: "绑定手机号"
|
|
1743
1743
|
}, {
|
|
1744
|
-
action: o(() => [p(
|
|
1744
|
+
action: o(() => [p(n(T), {
|
|
1745
1745
|
size: u.size,
|
|
1746
1746
|
type: "primary",
|
|
1747
1747
|
onClick: m[0] || (m[0] = (K) => g("update"))
|
|
@@ -1751,11 +1751,11 @@ const Mt = {
|
|
|
1751
1751
|
}, 8, ["size"])]),
|
|
1752
1752
|
default: o(() => [m[3] || (m[3] = k(" 您还未绑定手机号,请点击绑定手机号。 ", -1))]),
|
|
1753
1753
|
_: 1
|
|
1754
|
-
})) :
|
|
1754
|
+
})) : E("", !0), (R = n(i)) != null && R.phone && s.value === "hidden" ? (h(), I(n(Y), {
|
|
1755
1755
|
key: 1,
|
|
1756
1756
|
title: "已绑定手机号"
|
|
1757
1757
|
}, {
|
|
1758
|
-
action: o(() => [p(
|
|
1758
|
+
action: o(() => [p(n(T), {
|
|
1759
1759
|
size: u.size,
|
|
1760
1760
|
type: "primary",
|
|
1761
1761
|
onClick: m[1] || (m[1] = (K) => g("verify"))
|
|
@@ -1763,92 +1763,123 @@ const Mt = {
|
|
|
1763
1763
|
default: o(() => [...m[4] || (m[4] = [k("更改手机号", -1)])]),
|
|
1764
1764
|
_: 1
|
|
1765
1765
|
}, 8, ["size"])]),
|
|
1766
|
-
default: o(() => [k(U(`您绑定的手机号为 ${
|
|
1766
|
+
default: o(() => [k(U(`您绑定的手机号为 ${t.value}`) + " ", 1)]),
|
|
1767
1767
|
_: 1
|
|
1768
|
-
})) :
|
|
1768
|
+
})) : E("", !0), s.value === "update" ? (h(), I(pi, {
|
|
1769
1769
|
key: 2,
|
|
1770
|
-
loading:
|
|
1770
|
+
loading: n(a),
|
|
1771
1771
|
size: u.size,
|
|
1772
1772
|
title: y.value ? "更改手机号" : "绑定手机号",
|
|
1773
1773
|
subtitle: y.value ? "请输入新的手机号并完成短信验证" : "请绑定手机号以完成账号设置",
|
|
1774
1774
|
"submit-text": y.value ? "更改手机号" : "绑定手机号",
|
|
1775
1775
|
onSubmit: f
|
|
1776
|
-
}, null, 8, ["loading", "size", "title", "subtitle", "submit-text"])) :
|
|
1776
|
+
}, null, 8, ["loading", "size", "title", "subtitle", "submit-text"])) : E("", !0), s.value === "verify" ? (h(), I(we, {
|
|
1777
1777
|
key: 3,
|
|
1778
1778
|
size: u.size,
|
|
1779
|
-
phone: ((B =
|
|
1779
|
+
phone: ((B = n(i)) == null ? void 0 : B.phone) || "",
|
|
1780
1780
|
onNext: v
|
|
1781
|
-
}, null, 8, ["size", "phone"])) :
|
|
1781
|
+
}, null, 8, ["size", "phone"])) : E("", !0)], 64);
|
|
1782
1782
|
};
|
|
1783
1783
|
}
|
|
1784
1784
|
});
|
|
1785
|
-
function
|
|
1785
|
+
function vi() {
|
|
1786
1786
|
var i;
|
|
1787
1787
|
return typeof window > "u" ? "" : ((i = new URLSearchParams(window.location.search).get("inviteCode")) == null ? void 0 : i.trim()) || "";
|
|
1788
1788
|
}
|
|
1789
|
+
const ze = ["token", "refreshToken", "userId", "appId", "error", "needBindIdentity", "bindSuccess", "provider", "expiresIn"], ue = "auth_redirect";
|
|
1790
|
+
function hi(e) {
|
|
1791
|
+
return ze.some((i) => e.searchParams.has(i));
|
|
1792
|
+
}
|
|
1793
|
+
function gn(e) {
|
|
1794
|
+
return ze.forEach((i) => e.searchParams.delete(i)), `${e.pathname}${e.search}${e.hash}`;
|
|
1795
|
+
}
|
|
1789
1796
|
function xe() {
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1797
|
+
return new URL(window.location.href);
|
|
1798
|
+
}
|
|
1799
|
+
function Ne() {
|
|
1800
|
+
const e = xe();
|
|
1801
|
+
return ze.forEach((i) => e.searchParams.delete(i)), `${e.origin}${e.pathname}${e.search}${e.hash}`;
|
|
1802
|
+
}
|
|
1803
|
+
function yi() {
|
|
1804
|
+
return `${window.location.origin}/`;
|
|
1805
|
+
}
|
|
1806
|
+
function gi() {
|
|
1807
|
+
if (typeof window > "u")
|
|
1808
|
+
return;
|
|
1809
|
+
const e = xe();
|
|
1810
|
+
if (hi(e))
|
|
1811
|
+
return;
|
|
1812
|
+
const i = `${e.pathname}${e.search}${e.hash}`;
|
|
1813
|
+
sessionStorage.setItem(ue, i);
|
|
1814
|
+
}
|
|
1815
|
+
function wn(e) {
|
|
1816
|
+
if (!e || typeof window > "u")
|
|
1817
|
+
return null;
|
|
1818
|
+
const i = sessionStorage.getItem(ue);
|
|
1819
|
+
if (sessionStorage.removeItem(ue), !i)
|
|
1820
|
+
return null;
|
|
1821
|
+
const a = window.location.pathname + window.location.search + window.location.hash;
|
|
1822
|
+
return i === a ? null : i;
|
|
1794
1823
|
}
|
|
1795
|
-
function
|
|
1796
|
-
|
|
1797
|
-
|
|
1824
|
+
function bn(e = "/") {
|
|
1825
|
+
if (typeof window > "u")
|
|
1826
|
+
return e;
|
|
1827
|
+
const i = sessionStorage.getItem(ue);
|
|
1828
|
+
return sessionStorage.removeItem(ue), i || e;
|
|
1798
1829
|
}
|
|
1799
|
-
async function
|
|
1800
|
-
const
|
|
1801
|
-
if (!
|
|
1802
|
-
console.error(`${
|
|
1830
|
+
async function ce(e, i) {
|
|
1831
|
+
const a = Xe().config.appId;
|
|
1832
|
+
if (!a) {
|
|
1833
|
+
console.error(`${e} OAuth 失败: appId 未配置`);
|
|
1803
1834
|
return;
|
|
1804
1835
|
}
|
|
1805
|
-
|
|
1806
|
-
|
|
1836
|
+
gi();
|
|
1837
|
+
const l = Ne(), s = (i == null ? void 0 : i.inviteCode) || vi() || void 0, d = {
|
|
1838
|
+
appId: a,
|
|
1807
1839
|
inviteCode: s,
|
|
1808
1840
|
redirectUri: l,
|
|
1809
1841
|
acceptedTerms: (i == null ? void 0 : i.acceptedTerms) === !0 ? !0 : void 0
|
|
1810
|
-
}
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1815
|
-
microsoft: () => x().auth.oauth.microsoft.login.get(d),
|
|
1816
|
-
wechat: () => x().auth.oauth.wechat.login.get(d)
|
|
1842
|
+
}, u = {
|
|
1843
|
+
github: () => O().auth.oauth.github.login.get(d),
|
|
1844
|
+
google: () => O().auth.oauth.google.login.get(d),
|
|
1845
|
+
microsoft: () => O().auth.oauth.microsoft.login.get(d),
|
|
1846
|
+
wechat: () => O().auth.oauth.wechat.login.get(d)
|
|
1817
1847
|
}, {
|
|
1818
|
-
data:
|
|
1848
|
+
data: t,
|
|
1819
1849
|
error: y
|
|
1820
|
-
} = await u[
|
|
1850
|
+
} = await u[e]();
|
|
1821
1851
|
if (!y) {
|
|
1822
|
-
if (
|
|
1823
|
-
window.location.href =
|
|
1852
|
+
if (t != null && t.redirectUri) {
|
|
1853
|
+
window.location.href = t.redirectUri;
|
|
1824
1854
|
return;
|
|
1825
1855
|
}
|
|
1826
|
-
console.error(`${
|
|
1856
|
+
console.error(`${e} OAuth 重定向URL为空`);
|
|
1827
1857
|
}
|
|
1828
1858
|
}
|
|
1829
|
-
function
|
|
1830
|
-
|
|
1859
|
+
function wi(e) {
|
|
1860
|
+
ce("github", e);
|
|
1831
1861
|
}
|
|
1832
|
-
function
|
|
1833
|
-
|
|
1862
|
+
function bi(e) {
|
|
1863
|
+
ce("google", e);
|
|
1834
1864
|
}
|
|
1835
|
-
function
|
|
1836
|
-
|
|
1865
|
+
function _i(e) {
|
|
1866
|
+
ce("microsoft", e);
|
|
1837
1867
|
}
|
|
1838
|
-
function
|
|
1839
|
-
|
|
1868
|
+
function ki(e) {
|
|
1869
|
+
ce("wechat", e);
|
|
1840
1870
|
}
|
|
1841
|
-
function
|
|
1871
|
+
function Ai() {
|
|
1842
1872
|
return {
|
|
1843
|
-
githubAuth:
|
|
1844
|
-
googleAuth:
|
|
1845
|
-
microsoftAuth:
|
|
1846
|
-
wechatAuth:
|
|
1847
|
-
startOauth:
|
|
1848
|
-
|
|
1873
|
+
githubAuth: wi,
|
|
1874
|
+
googleAuth: bi,
|
|
1875
|
+
microsoftAuth: _i,
|
|
1876
|
+
wechatAuth: ki,
|
|
1877
|
+
startOauth: ce,
|
|
1878
|
+
buildLoginOauthRedirectUri: Ne,
|
|
1879
|
+
buildBindOauthRedirectUri: yi
|
|
1849
1880
|
};
|
|
1850
1881
|
}
|
|
1851
|
-
const
|
|
1882
|
+
const zi = ["src", "alt", "width", "height"], Pi = /* @__PURE__ */ J({
|
|
1852
1883
|
__name: "AuthProviderIcon",
|
|
1853
1884
|
props: {
|
|
1854
1885
|
icon: {},
|
|
@@ -1862,47 +1893,47 @@ const wi = ["src", "alt", "width", "height"], bi = /* @__PURE__ */ Y({
|
|
|
1862
1893
|
default: ""
|
|
1863
1894
|
}
|
|
1864
1895
|
},
|
|
1865
|
-
setup(
|
|
1866
|
-
const i =
|
|
1867
|
-
return (
|
|
1896
|
+
setup(e) {
|
|
1897
|
+
const i = e;
|
|
1898
|
+
return (a, l) => n(tt)(i.icon) ? (h(), I(n(et), {
|
|
1868
1899
|
key: 0,
|
|
1869
1900
|
icon: i.icon,
|
|
1870
1901
|
width: i.size,
|
|
1871
1902
|
height: i.size,
|
|
1872
|
-
class:
|
|
1903
|
+
class: Pe(i.class)
|
|
1873
1904
|
}, null, 8, ["icon", "width", "height", "class"])) : i.icon ? (h(), M("img", {
|
|
1874
1905
|
key: 1,
|
|
1875
1906
|
src: i.icon,
|
|
1876
1907
|
alt: i.alt,
|
|
1877
1908
|
width: i.size,
|
|
1878
1909
|
height: i.size,
|
|
1879
|
-
class:
|
|
1880
|
-
}, null, 10,
|
|
1910
|
+
class: Pe(["auth-provider-icon__image", i.class])
|
|
1911
|
+
}, null, 10, zi)) : E("", !0);
|
|
1881
1912
|
}
|
|
1882
|
-
}),
|
|
1913
|
+
}), Ii = /* @__PURE__ */ X(Pi, [["__scopeId", "data-v-1d09c1ef"]]), re = {
|
|
1883
1914
|
github: "selfhst:github",
|
|
1884
1915
|
google: "selfhst:google",
|
|
1885
1916
|
microsoft: "selfhst:microsoft",
|
|
1886
1917
|
wechat: "selfhst:wechat"
|
|
1887
|
-
},
|
|
1918
|
+
}, Ei = "selfhst:ksuite-kpaste", Ci = 32, Ri = 2, _n = Ci + Ri * 2, kn = 12, Si = 24, pe = {
|
|
1888
1919
|
github: "GitHub",
|
|
1889
1920
|
google: "Google",
|
|
1890
1921
|
microsoft: "Microsoft",
|
|
1891
1922
|
wechat: "微信"
|
|
1892
|
-
},
|
|
1923
|
+
}, Vi = {
|
|
1893
1924
|
class: "oauth-binding-account"
|
|
1894
|
-
},
|
|
1925
|
+
}, $i = {
|
|
1895
1926
|
key: 1,
|
|
1896
1927
|
class: "oauth-binding-account__icon"
|
|
1897
|
-
},
|
|
1928
|
+
}, Ti = {
|
|
1898
1929
|
class: "oauth-binding-account__info"
|
|
1899
|
-
},
|
|
1930
|
+
}, Ui = {
|
|
1900
1931
|
class: "oauth-binding-account__provider"
|
|
1901
|
-
},
|
|
1932
|
+
}, Oi = {
|
|
1902
1933
|
class: "oauth-binding-account__name"
|
|
1903
|
-
},
|
|
1934
|
+
}, xi = {
|
|
1904
1935
|
class: "oauth-binding-verify-actions"
|
|
1905
|
-
},
|
|
1936
|
+
}, Ni = /* @__PURE__ */ J({
|
|
1906
1937
|
__name: "AuthkitOAuthBinding",
|
|
1907
1938
|
props: {
|
|
1908
1939
|
provider: {
|
|
@@ -1918,28 +1949,28 @@ const wi = ["src", "alt", "width", "height"], bi = /* @__PURE__ */ Y({
|
|
|
1918
1949
|
required: !0
|
|
1919
1950
|
}
|
|
1920
1951
|
},
|
|
1921
|
-
setup(
|
|
1952
|
+
setup(e) {
|
|
1922
1953
|
const {
|
|
1923
1954
|
config: i
|
|
1924
|
-
} =
|
|
1955
|
+
} = Se(), a = e, {
|
|
1925
1956
|
userProfile: l,
|
|
1926
1957
|
fetchUserProfile: s
|
|
1927
|
-
} =
|
|
1958
|
+
} = ne(), {
|
|
1928
1959
|
appsData: d
|
|
1929
|
-
} =
|
|
1930
|
-
|
|
1931
|
-
} =
|
|
1960
|
+
} = Ve(), {
|
|
1961
|
+
buildBindOauthRedirectUri: u
|
|
1962
|
+
} = Ai(), t = A("hidden"), y = A(), g = A(!1);
|
|
1932
1963
|
let f;
|
|
1933
1964
|
const v = $(() => {
|
|
1934
1965
|
var c;
|
|
1935
|
-
return ((c = l.value) == null ? void 0 : c[
|
|
1966
|
+
return ((c = l.value) == null ? void 0 : c[a.provider]) || null;
|
|
1936
1967
|
}), r = $(() => {
|
|
1937
1968
|
const c = v.value;
|
|
1938
|
-
return c ? c.login || c.name || c.nickname || c.displayName || c.userPrincipalName || c.email || c.mail || c.openid ||
|
|
1969
|
+
return c ? c.login || c.name || c.nickname || c.displayName || c.userPrincipalName || c.email || c.mail || c.openid || a.label : "";
|
|
1939
1970
|
}), m = $(() => {
|
|
1940
1971
|
const c = v.value;
|
|
1941
1972
|
return (c == null ? void 0 : c.avatar_url) || (c == null ? void 0 : c.picture) || (c == null ? void 0 : c.headimgurl) || "";
|
|
1942
|
-
}), S = $(() => re[
|
|
1973
|
+
}), S = $(() => re[a.provider]), R = $(() => {
|
|
1943
1974
|
const c = d.value.authMethods;
|
|
1944
1975
|
return c.signUp.email || c.login.emailPassword || c.login.emailCode;
|
|
1945
1976
|
}), B = $(() => {
|
|
@@ -1954,28 +1985,28 @@ const wi = ["src", "alt", "width", "height"], bi = /* @__PURE__ */ Y({
|
|
|
1954
1985
|
}), V = $(() => {
|
|
1955
1986
|
const c = [];
|
|
1956
1987
|
return K.value && c.push("email"), j.value && c.push("phone"), c;
|
|
1957
|
-
}), w = $(() => R.value || B.value), q = $(() =>
|
|
1988
|
+
}), w = $(() => R.value || B.value), q = $(() => t.value !== "hidden" && V.value.length > 1 && !y.value), _ = $(() => {
|
|
1958
1989
|
var c;
|
|
1959
|
-
return
|
|
1990
|
+
return t.value !== "hidden" && y.value === "email" && !!((c = l.value) != null && c.email);
|
|
1960
1991
|
}), P = $(() => {
|
|
1961
1992
|
var c;
|
|
1962
|
-
return
|
|
1963
|
-
}), N = $(() =>
|
|
1993
|
+
return t.value !== "hidden" && y.value === "phone" && !!((c = l.value) != null && c.phone);
|
|
1994
|
+
}), N = $(() => t.value === "unbind" ? "解绑" : "绑定");
|
|
1964
1995
|
function F(c) {
|
|
1965
1996
|
if (c === "hidden") {
|
|
1966
|
-
|
|
1997
|
+
t.value = c, y.value = void 0;
|
|
1967
1998
|
return;
|
|
1968
1999
|
}
|
|
1969
2000
|
if (!w.value) {
|
|
1970
|
-
c === "bind" && Z(), c === "unbind" &&
|
|
2001
|
+
c === "bind" && Z(), c === "unbind" && ae();
|
|
1971
2002
|
return;
|
|
1972
2003
|
}
|
|
1973
|
-
const
|
|
1974
|
-
if (
|
|
2004
|
+
const C = V.value;
|
|
2005
|
+
if (C.length === 0) {
|
|
1975
2006
|
G.error("请先绑定应用已开启的邮箱或手机号后再操作第三方账号");
|
|
1976
2007
|
return;
|
|
1977
2008
|
}
|
|
1978
|
-
|
|
2009
|
+
t.value = c, y.value = C.length === 1 ? C[0] : void 0;
|
|
1979
2010
|
}
|
|
1980
2011
|
function D(c) {
|
|
1981
2012
|
y.value = c;
|
|
@@ -1983,142 +2014,142 @@ const wi = ["src", "alt", "width", "height"], bi = /* @__PURE__ */ Y({
|
|
|
1983
2014
|
async function Z() {
|
|
1984
2015
|
const c = i.appId;
|
|
1985
2016
|
if (!c) {
|
|
1986
|
-
console.error(`${
|
|
2017
|
+
console.error(`${a.label} OAuth 失败: appId 未配置`);
|
|
1987
2018
|
return;
|
|
1988
2019
|
}
|
|
1989
|
-
const
|
|
2020
|
+
const C = u(), H = O().auth, oe = {
|
|
1990
2021
|
github: () => H.oauth.github.login.get({
|
|
1991
2022
|
appId: c,
|
|
1992
2023
|
mode: "bind",
|
|
1993
|
-
redirectUri:
|
|
2024
|
+
redirectUri: C
|
|
1994
2025
|
}),
|
|
1995
2026
|
google: () => H.oauth.google.login.get({
|
|
1996
2027
|
appId: c,
|
|
1997
2028
|
mode: "bind",
|
|
1998
|
-
redirectUri:
|
|
2029
|
+
redirectUri: C
|
|
1999
2030
|
}),
|
|
2000
2031
|
microsoft: () => H.oauth.microsoft.login.get({
|
|
2001
2032
|
appId: c,
|
|
2002
2033
|
mode: "bind",
|
|
2003
|
-
redirectUri:
|
|
2034
|
+
redirectUri: C
|
|
2004
2035
|
}),
|
|
2005
2036
|
wechat: () => H.oauth.wechat.login.get({
|
|
2006
2037
|
appId: c,
|
|
2007
2038
|
mode: "bind",
|
|
2008
|
-
redirectUri:
|
|
2039
|
+
redirectUri: C
|
|
2009
2040
|
})
|
|
2010
2041
|
}, {
|
|
2011
2042
|
data: te,
|
|
2012
|
-
error:
|
|
2013
|
-
} = await oe[
|
|
2014
|
-
|
|
2043
|
+
error: De
|
|
2044
|
+
} = await oe[a.provider]();
|
|
2045
|
+
De || !(te != null && te.redirectUri) || (g.value = !0, window.open(te.redirectUri, "_blank"));
|
|
2015
2046
|
}
|
|
2016
|
-
async function
|
|
2047
|
+
async function ae() {
|
|
2017
2048
|
const {
|
|
2018
2049
|
error: c
|
|
2019
|
-
} = await
|
|
2020
|
-
provider:
|
|
2050
|
+
} = await O().auth.users.unbind.oauth.post({
|
|
2051
|
+
provider: a.provider
|
|
2021
2052
|
});
|
|
2022
|
-
c || (G.success("解绑成功"),
|
|
2053
|
+
c || (G.success("解绑成功"), t.value = "hidden", s());
|
|
2023
2054
|
}
|
|
2024
|
-
function
|
|
2025
|
-
|
|
2055
|
+
function x() {
|
|
2056
|
+
t.value === "bind" && (t.value = "hidden", Z()), t.value === "unbind" && ae();
|
|
2026
2057
|
}
|
|
2027
2058
|
function b() {
|
|
2028
2059
|
g.value && s();
|
|
2029
2060
|
}
|
|
2030
|
-
return
|
|
2061
|
+
return de(() => {
|
|
2031
2062
|
l.value || s(), f = setInterval(b, 1e3);
|
|
2032
|
-
}),
|
|
2063
|
+
}), Ae(() => {
|
|
2033
2064
|
f && clearInterval(f);
|
|
2034
|
-
}), (c,
|
|
2065
|
+
}), (c, C) => {
|
|
2035
2066
|
var H, oe;
|
|
2036
|
-
return h(), M(ie, null, [!v.value &&
|
|
2067
|
+
return h(), M(ie, null, [!v.value && t.value === "hidden" ? (h(), I(n(Y), {
|
|
2037
2068
|
key: 0,
|
|
2038
|
-
title: `绑定${
|
|
2069
|
+
title: `绑定${a.label}`
|
|
2039
2070
|
}, {
|
|
2040
|
-
action: o(() => [p(
|
|
2041
|
-
size:
|
|
2071
|
+
action: o(() => [p(n(T), {
|
|
2072
|
+
size: a.size,
|
|
2042
2073
|
type: "primary",
|
|
2043
|
-
onClick:
|
|
2074
|
+
onClick: C[0] || (C[0] = (te) => F("bind"))
|
|
2044
2075
|
}, {
|
|
2045
|
-
default: o(() => [k(" 绑定" + U(
|
|
2076
|
+
default: o(() => [k(" 绑定" + U(a.label), 1)]),
|
|
2046
2077
|
_: 1
|
|
2047
2078
|
}, 8, ["size"])]),
|
|
2048
|
-
default: o(() => [k(" 您还未绑定" + U(
|
|
2079
|
+
default: o(() => [k(" 您还未绑定" + U(a.label) + "账号,请点击绑定。 ", 1)]),
|
|
2049
2080
|
_: 1
|
|
2050
|
-
}, 8, ["title"])) :
|
|
2081
|
+
}, 8, ["title"])) : E("", !0), v.value && t.value === "hidden" ? (h(), I(n(Y), {
|
|
2051
2082
|
key: 1,
|
|
2052
|
-
title: `解绑${
|
|
2083
|
+
title: `解绑${a.label}`
|
|
2053
2084
|
}, {
|
|
2054
|
-
action: o(() => [p(
|
|
2055
|
-
size:
|
|
2085
|
+
action: o(() => [p(n(T), {
|
|
2086
|
+
size: a.size,
|
|
2056
2087
|
type: "primary",
|
|
2057
|
-
onClick:
|
|
2088
|
+
onClick: C[1] || (C[1] = (te) => F("unbind"))
|
|
2058
2089
|
}, {
|
|
2059
|
-
default: o(() => [k(" 解绑" + U(
|
|
2090
|
+
default: o(() => [k(" 解绑" + U(a.label), 1)]),
|
|
2060
2091
|
_: 1
|
|
2061
2092
|
}, 8, ["size"])]),
|
|
2062
|
-
default: o(() => [
|
|
2093
|
+
default: o(() => [z("div", Vi, [m.value ? (h(), I(n(Ee), {
|
|
2063
2094
|
key: 0,
|
|
2064
2095
|
class: "oauth-binding-account__avatar",
|
|
2065
2096
|
"image-url": m.value,
|
|
2066
2097
|
size: 42
|
|
2067
|
-
}, null, 8, ["image-url"])) : (h(), M("div",
|
|
2098
|
+
}, null, 8, ["image-url"])) : (h(), M("div", $i, [p(Ii, {
|
|
2068
2099
|
icon: S.value,
|
|
2069
|
-
size:
|
|
2070
|
-
alt:
|
|
2071
|
-
}, null, 8, ["icon", "size", "alt"])])),
|
|
2100
|
+
size: n(Si),
|
|
2101
|
+
alt: a.label
|
|
2102
|
+
}, null, 8, ["icon", "size", "alt"])])), z("div", Ti, [z("div", Ui, U(a.label), 1), z("div", Oi, U(r.value), 1)])])]),
|
|
2072
2103
|
_: 1
|
|
2073
|
-
}, 8, ["title"])) :
|
|
2104
|
+
}, 8, ["title"])) : E("", !0), q.value ? (h(), I(n(Y), {
|
|
2074
2105
|
key: 2,
|
|
2075
2106
|
title: `${N.value}前验证身份`
|
|
2076
2107
|
}, {
|
|
2077
|
-
action: o(() => [
|
|
2108
|
+
action: o(() => [z("div", xi, [K.value ? (h(), I(n(T), {
|
|
2078
2109
|
key: 0,
|
|
2079
|
-
size:
|
|
2110
|
+
size: a.size,
|
|
2080
2111
|
type: "primary",
|
|
2081
|
-
onClick:
|
|
2112
|
+
onClick: C[2] || (C[2] = (te) => D("email"))
|
|
2082
2113
|
}, {
|
|
2083
|
-
default: o(() => [...
|
|
2114
|
+
default: o(() => [...C[4] || (C[4] = [k(" 邮箱验证 ", -1)])]),
|
|
2084
2115
|
_: 1
|
|
2085
|
-
}, 8, ["size"])) :
|
|
2116
|
+
}, 8, ["size"])) : E("", !0), j.value ? (h(), I(n(T), {
|
|
2086
2117
|
key: 1,
|
|
2087
|
-
size:
|
|
2118
|
+
size: a.size,
|
|
2088
2119
|
type: "primary",
|
|
2089
|
-
onClick:
|
|
2120
|
+
onClick: C[3] || (C[3] = (te) => D("phone"))
|
|
2090
2121
|
}, {
|
|
2091
|
-
default: o(() => [...
|
|
2122
|
+
default: o(() => [...C[5] || (C[5] = [k(" 手机验证 ", -1)])]),
|
|
2092
2123
|
_: 1
|
|
2093
|
-
}, 8, ["size"])) :
|
|
2094
|
-
default: o(() => [
|
|
2124
|
+
}, 8, ["size"])) : E("", !0)])]),
|
|
2125
|
+
default: o(() => [C[6] || (C[6] = k(" 请选择一种已绑定的验证方式。 ", -1))]),
|
|
2095
2126
|
_: 1
|
|
2096
|
-
}, 8, ["title"])) :
|
|
2127
|
+
}, 8, ["title"])) : E("", !0), _.value ? (h(), I(ge, {
|
|
2097
2128
|
key: 3,
|
|
2098
|
-
size:
|
|
2099
|
-
email: (H =
|
|
2100
|
-
onNext:
|
|
2101
|
-
}, null, 8, ["size", "email"])) :
|
|
2129
|
+
size: a.size,
|
|
2130
|
+
email: (H = n(l)) == null ? void 0 : H.email,
|
|
2131
|
+
onNext: x
|
|
2132
|
+
}, null, 8, ["size", "email"])) : E("", !0), P.value ? (h(), I(we, {
|
|
2102
2133
|
key: 4,
|
|
2103
|
-
size:
|
|
2104
|
-
phone: ((oe =
|
|
2105
|
-
onNext:
|
|
2106
|
-
}, null, 8, ["size", "phone"])) :
|
|
2134
|
+
size: a.size,
|
|
2135
|
+
phone: ((oe = n(l)) == null ? void 0 : oe.phone) || "",
|
|
2136
|
+
onNext: x
|
|
2137
|
+
}, null, 8, ["size", "phone"])) : E("", !0)], 64);
|
|
2107
2138
|
};
|
|
2108
2139
|
}
|
|
2109
|
-
}),
|
|
2140
|
+
}), Di = /* @__PURE__ */ X(Ni, [["__scopeId", "data-v-6b13b949"]]), Bi = {
|
|
2110
2141
|
class: "dependency-list"
|
|
2111
|
-
},
|
|
2142
|
+
}, qi = {
|
|
2112
2143
|
class: "label"
|
|
2113
|
-
},
|
|
2144
|
+
}, Li = {
|
|
2114
2145
|
class: "count"
|
|
2115
|
-
},
|
|
2146
|
+
}, Mi = {
|
|
2116
2147
|
class: "action-bar"
|
|
2117
|
-
},
|
|
2148
|
+
}, Ki = {
|
|
2118
2149
|
class: "verify-code-row"
|
|
2119
|
-
},
|
|
2150
|
+
}, Fi = {
|
|
2120
2151
|
class: "verify-code-row"
|
|
2121
|
-
},
|
|
2152
|
+
}, Hi = /* @__PURE__ */ J({
|
|
2122
2153
|
__name: "AuthkitAccountDelete",
|
|
2123
2154
|
props: {
|
|
2124
2155
|
size: {
|
|
@@ -2127,91 +2158,91 @@ const wi = ["src", "alt", "width", "height"], bi = /* @__PURE__ */ Y({
|
|
|
2127
2158
|
}
|
|
2128
2159
|
},
|
|
2129
2160
|
emits: ["deleted"],
|
|
2130
|
-
setup(
|
|
2161
|
+
setup(e, {
|
|
2131
2162
|
emit: i
|
|
2132
2163
|
}) {
|
|
2133
|
-
const
|
|
2164
|
+
const a = e, l = i, {
|
|
2134
2165
|
userProfile: s,
|
|
2135
2166
|
clearUserProfile: d
|
|
2136
|
-
} =
|
|
2167
|
+
} = ne(), {
|
|
2137
2168
|
clearAuth: u
|
|
2138
|
-
} =
|
|
2169
|
+
} = nt(), t = A("check"), y = A(!1), g = A([]), f = A(!1), v = A(""), r = A(0);
|
|
2139
2170
|
let m = null;
|
|
2140
|
-
const S =
|
|
2141
|
-
var
|
|
2142
|
-
const
|
|
2143
|
-
if (!
|
|
2144
|
-
const [b, c] =
|
|
2145
|
-
return b.length <= 2 ?
|
|
2171
|
+
const S = A("email"), R = $(() => {
|
|
2172
|
+
var C;
|
|
2173
|
+
const x = ((C = s.value) == null ? void 0 : C.email) || "";
|
|
2174
|
+
if (!x) return "";
|
|
2175
|
+
const [b, c] = x.split("@");
|
|
2176
|
+
return b.length <= 2 ? x : `${b.slice(0, 2)}***@${c}`;
|
|
2146
2177
|
}), B = $(() => {
|
|
2147
2178
|
var b;
|
|
2148
|
-
const
|
|
2149
|
-
return
|
|
2150
|
-
}), K = $(() => S.value === "email" ? `为确保账号安全,我们将向您的邮箱 ${R.value} 发送验证码` : `为确保账号安全,我们将向您的手机号 ${B.value} 发送验证码`), j = $(() => S.value === "email" ? `验证码已发送至 ${R.value},注销后该账号将无法继续登录,请谨慎操作` : `验证码已发送至 ${B.value},注销后该账号将无法继续登录,请谨慎操作`), V =
|
|
2179
|
+
const x = ((b = s.value) == null ? void 0 : b.phone) || "";
|
|
2180
|
+
return x.length < 7 ? x : `${x.slice(0, 3)}****${x.slice(-4)}`;
|
|
2181
|
+
}), K = $(() => S.value === "email" ? `为确保账号安全,我们将向您的邮箱 ${R.value} 发送验证码` : `为确保账号安全,我们将向您的手机号 ${B.value} 发送验证码`), j = $(() => S.value === "email" ? `验证码已发送至 ${R.value},注销后该账号将无法继续登录,请谨慎操作` : `验证码已发送至 ${B.value},注销后该账号将无法继续登录,请谨慎操作`), V = A(), w = A({
|
|
2151
2182
|
userToken: "",
|
|
2152
2183
|
code: "",
|
|
2153
2184
|
password: "",
|
|
2154
2185
|
confirmText: ""
|
|
2155
|
-
}), q =
|
|
2156
|
-
function _(
|
|
2157
|
-
|
|
2186
|
+
}), q = A(!1);
|
|
2187
|
+
function _(x, b) {
|
|
2188
|
+
x !== "注销" ? b('请输入"注销"以确认操作') : b();
|
|
2158
2189
|
}
|
|
2159
2190
|
async function P() {
|
|
2160
|
-
var
|
|
2161
|
-
if (y.value = !0, y.value = !1, !((
|
|
2191
|
+
var x, b;
|
|
2192
|
+
if (y.value = !0, y.value = !1, !((x = s.value) != null && x.email) && !((b = s.value) != null && b.phone)) {
|
|
2162
2193
|
G.error("请先绑定邮箱或手机号后再注销账号");
|
|
2163
2194
|
return;
|
|
2164
2195
|
}
|
|
2165
2196
|
if (s.value.email && s.value.phone) {
|
|
2166
|
-
|
|
2197
|
+
t.value = "chooseMethod";
|
|
2167
2198
|
return;
|
|
2168
2199
|
}
|
|
2169
|
-
S.value = s.value.email ? "email" : "phone",
|
|
2200
|
+
S.value = s.value.email ? "email" : "phone", t.value = "sendCode";
|
|
2170
2201
|
}
|
|
2171
|
-
function N(
|
|
2172
|
-
S.value =
|
|
2202
|
+
function N(x) {
|
|
2203
|
+
S.value = x, t.value = "sendCode";
|
|
2173
2204
|
}
|
|
2174
2205
|
async function F() {
|
|
2175
|
-
var c,
|
|
2206
|
+
var c, C;
|
|
2176
2207
|
if (S.value === "email") {
|
|
2177
2208
|
if (!((c = s.value) != null && c.email)) {
|
|
2178
2209
|
G.error("请先绑定邮箱");
|
|
2179
2210
|
return;
|
|
2180
2211
|
}
|
|
2181
2212
|
f.value = !0;
|
|
2182
|
-
const H = await
|
|
2213
|
+
const H = await O().auth.verify.email.retry.post({
|
|
2183
2214
|
email: s.value.email,
|
|
2184
2215
|
purpose: "deleteAccount"
|
|
2185
2216
|
});
|
|
2186
2217
|
f.value = !1;
|
|
2187
|
-
const oe =
|
|
2188
|
-
H.data && (v.value = H.data.emailVerifyId, G.success("验证码已发送"),
|
|
2218
|
+
const oe = ke(H);
|
|
2219
|
+
H.data && (v.value = H.data.emailVerifyId, G.success("验证码已发送"), t.value = "confirm"), D(oe);
|
|
2189
2220
|
return;
|
|
2190
2221
|
}
|
|
2191
|
-
if (!((
|
|
2222
|
+
if (!((C = s.value) != null && C.phone)) {
|
|
2192
2223
|
G.error("请先绑定手机号");
|
|
2193
2224
|
return;
|
|
2194
2225
|
}
|
|
2195
2226
|
f.value = !0;
|
|
2196
|
-
const
|
|
2227
|
+
const x = await O().auth.verify.sms.send.post({
|
|
2197
2228
|
phone: s.value.phone,
|
|
2198
2229
|
purpose: "deleteAccount"
|
|
2199
2230
|
});
|
|
2200
2231
|
f.value = !1;
|
|
2201
|
-
const b =
|
|
2202
|
-
|
|
2232
|
+
const b = ke(x);
|
|
2233
|
+
x.error || (G.success("验证码已发送"), t.value = "confirm"), D(b);
|
|
2203
2234
|
}
|
|
2204
|
-
function D(
|
|
2205
|
-
!
|
|
2235
|
+
function D(x) {
|
|
2236
|
+
!x || x <= 0 || (r.value = Math.ceil(x), m && clearInterval(m), m = setInterval(() => {
|
|
2206
2237
|
r.value--, r.value <= 0 && m && (clearInterval(m), m = null);
|
|
2207
2238
|
}, 1e3));
|
|
2208
2239
|
}
|
|
2209
|
-
|
|
2240
|
+
Ae(() => {
|
|
2210
2241
|
m && (clearInterval(m), m = null);
|
|
2211
2242
|
});
|
|
2212
2243
|
async function Z() {
|
|
2213
|
-
var
|
|
2214
|
-
if (await ((
|
|
2244
|
+
var C, H;
|
|
2245
|
+
if (await ((C = V.value) == null ? void 0 : C.validate())) return;
|
|
2215
2246
|
q.value = !0;
|
|
2216
2247
|
const b = S.value === "email" ? {
|
|
2217
2248
|
method: "email",
|
|
@@ -2227,19 +2258,19 @@ const wi = ["src", "alt", "width", "height"], bi = /* @__PURE__ */ Y({
|
|
|
2227
2258
|
confirmText: w.value.confirmText
|
|
2228
2259
|
}, {
|
|
2229
2260
|
error: c
|
|
2230
|
-
} = await
|
|
2231
|
-
q.value = !1, c || (
|
|
2261
|
+
} = await O().auth.users.deleteAccount.post(b);
|
|
2262
|
+
q.value = !1, c || (t.value = "success", d(), u(), l("deleted"));
|
|
2232
2263
|
}
|
|
2233
|
-
function
|
|
2264
|
+
function ae() {
|
|
2234
2265
|
window.location.href = "/";
|
|
2235
2266
|
}
|
|
2236
|
-
return (
|
|
2267
|
+
return (x, b) => t.value === "check" ? (h(), I(n(Y), {
|
|
2237
2268
|
key: 0,
|
|
2238
2269
|
type: "warning",
|
|
2239
2270
|
title: "注销账号"
|
|
2240
2271
|
}, {
|
|
2241
|
-
action: o(() => [p(
|
|
2242
|
-
size:
|
|
2272
|
+
action: o(() => [p(n(T), {
|
|
2273
|
+
size: a.size,
|
|
2243
2274
|
type: "primary",
|
|
2244
2275
|
status: "danger",
|
|
2245
2276
|
loading: y.value,
|
|
@@ -2250,73 +2281,73 @@ const wi = ["src", "alt", "width", "height"], bi = /* @__PURE__ */ Y({
|
|
|
2250
2281
|
}, 8, ["size", "loading"])]),
|
|
2251
2282
|
default: o(() => [b[10] || (b[10] = k(" 注销账号后,登录凭据、第三方绑定和当前登录态会被清除;历史订单、用量、审计等业务记录会保留用于对账和安全追溯。 ", -1))]),
|
|
2252
2283
|
_: 1
|
|
2253
|
-
})) :
|
|
2284
|
+
})) : t.value === "dependencies" ? (h(), M(ie, {
|
|
2254
2285
|
key: 1
|
|
2255
|
-
}, [p(
|
|
2286
|
+
}, [p(n(Y), {
|
|
2256
2287
|
type: "error",
|
|
2257
2288
|
title: "无法注销账号"
|
|
2258
2289
|
}, {
|
|
2259
2290
|
default: o(() => [...b[11] || (b[11] = [k(" 您的账号下还有以下资源,请先处理后再注销: ", -1)])]),
|
|
2260
2291
|
_: 1
|
|
2261
|
-
}),
|
|
2292
|
+
}), z("div", Bi, [(h(!0), M(ie, null, Ke(g.value, (c) => (h(), M("div", {
|
|
2262
2293
|
key: c.type,
|
|
2263
2294
|
class: "dependency-item"
|
|
2264
|
-
}, [
|
|
2265
|
-
size:
|
|
2266
|
-
onClick: b[0] || (b[0] = (c) =>
|
|
2295
|
+
}, [z("span", qi, U(c.label), 1), z("span", Li, U(c.count) + " 个", 1)]))), 128))]), z("div", Mi, [p(n(T), {
|
|
2296
|
+
size: a.size,
|
|
2297
|
+
onClick: b[0] || (b[0] = (c) => t.value = "check")
|
|
2267
2298
|
}, {
|
|
2268
2299
|
default: o(() => [...b[12] || (b[12] = [k("返回", -1)])]),
|
|
2269
2300
|
_: 1
|
|
2270
|
-
}, 8, ["size"])])], 64)) :
|
|
2301
|
+
}, 8, ["size"])])], 64)) : t.value === "chooseMethod" ? (h(), I(n(Y), {
|
|
2271
2302
|
key: 2,
|
|
2272
2303
|
type: "normal",
|
|
2273
2304
|
title: "选择验证方式"
|
|
2274
2305
|
}, {
|
|
2275
|
-
action: o(() => [p(
|
|
2306
|
+
action: o(() => [p(n(me), null, {
|
|
2276
2307
|
default: o(() => {
|
|
2277
|
-
var c,
|
|
2278
|
-
return [p(
|
|
2279
|
-
size:
|
|
2280
|
-
onClick: b[1] || (b[1] = (H) =>
|
|
2308
|
+
var c, C;
|
|
2309
|
+
return [p(n(T), {
|
|
2310
|
+
size: a.size,
|
|
2311
|
+
onClick: b[1] || (b[1] = (H) => t.value = "check")
|
|
2281
2312
|
}, {
|
|
2282
2313
|
default: o(() => [...b[13] || (b[13] = [k("取消", -1)])]),
|
|
2283
2314
|
_: 1
|
|
2284
|
-
}, 8, ["size"]), (c =
|
|
2315
|
+
}, 8, ["size"]), (c = n(s)) != null && c.email ? (h(), I(n(T), {
|
|
2285
2316
|
key: 0,
|
|
2286
|
-
size:
|
|
2317
|
+
size: a.size,
|
|
2287
2318
|
type: "primary",
|
|
2288
2319
|
onClick: b[2] || (b[2] = (H) => N("email"))
|
|
2289
2320
|
}, {
|
|
2290
2321
|
default: o(() => [...b[14] || (b[14] = [k(" 邮箱验证 ", -1)])]),
|
|
2291
2322
|
_: 1
|
|
2292
|
-
}, 8, ["size"])) :
|
|
2323
|
+
}, 8, ["size"])) : E("", !0), (C = n(s)) != null && C.phone ? (h(), I(n(T), {
|
|
2293
2324
|
key: 1,
|
|
2294
|
-
size:
|
|
2325
|
+
size: a.size,
|
|
2295
2326
|
type: "primary",
|
|
2296
2327
|
onClick: b[3] || (b[3] = (H) => N("phone"))
|
|
2297
2328
|
}, {
|
|
2298
2329
|
default: o(() => [...b[15] || (b[15] = [k(" 手机验证 ", -1)])]),
|
|
2299
2330
|
_: 1
|
|
2300
|
-
}, 8, ["size"])) :
|
|
2331
|
+
}, 8, ["size"])) : E("", !0)];
|
|
2301
2332
|
}),
|
|
2302
2333
|
_: 1
|
|
2303
2334
|
})]),
|
|
2304
2335
|
default: o(() => [b[16] || (b[16] = k(" 请选择一种已绑定的身份验证方式。 ", -1))]),
|
|
2305
2336
|
_: 1
|
|
2306
|
-
})) :
|
|
2337
|
+
})) : t.value === "sendCode" ? (h(), I(n(Y), {
|
|
2307
2338
|
key: 3,
|
|
2308
2339
|
type: "normal",
|
|
2309
2340
|
title: "身份验证"
|
|
2310
2341
|
}, {
|
|
2311
|
-
action: o(() => [p(
|
|
2312
|
-
default: o(() => [p(
|
|
2313
|
-
size:
|
|
2314
|
-
onClick: b[4] || (b[4] = (c) =>
|
|
2342
|
+
action: o(() => [p(n(me), null, {
|
|
2343
|
+
default: o(() => [p(n(T), {
|
|
2344
|
+
size: a.size,
|
|
2345
|
+
onClick: b[4] || (b[4] = (c) => t.value = "check")
|
|
2315
2346
|
}, {
|
|
2316
2347
|
default: o(() => [...b[17] || (b[17] = [k("取消", -1)])]),
|
|
2317
2348
|
_: 1
|
|
2318
|
-
}, 8, ["size"]), p(
|
|
2319
|
-
size:
|
|
2349
|
+
}, 8, ["size"]), p(n(T), {
|
|
2350
|
+
size: a.size,
|
|
2320
2351
|
type: "primary",
|
|
2321
2352
|
loading: f.value,
|
|
2322
2353
|
onClick: F
|
|
@@ -2328,25 +2359,25 @@ const wi = ["src", "alt", "width", "height"], bi = /* @__PURE__ */ Y({
|
|
|
2328
2359
|
})]),
|
|
2329
2360
|
default: o(() => [k(U(K.value) + " ", 1)]),
|
|
2330
2361
|
_: 1
|
|
2331
|
-
})) :
|
|
2362
|
+
})) : t.value === "confirm" ? (h(), M(ie, {
|
|
2332
2363
|
key: 4
|
|
2333
|
-
}, [p(
|
|
2364
|
+
}, [p(n(Y), {
|
|
2334
2365
|
type: "warning",
|
|
2335
2366
|
title: "确认注销"
|
|
2336
2367
|
}, {
|
|
2337
2368
|
default: o(() => [k(U(j.value), 1)]),
|
|
2338
2369
|
_: 1
|
|
2339
|
-
}), p(
|
|
2370
|
+
}), p(n(le), {
|
|
2340
2371
|
ref_key: "formRef",
|
|
2341
2372
|
ref: V,
|
|
2342
2373
|
model: w.value,
|
|
2343
|
-
size:
|
|
2374
|
+
size: a.size,
|
|
2344
2375
|
class: "confirm-form",
|
|
2345
2376
|
layout: "vertical"
|
|
2346
2377
|
}, {
|
|
2347
2378
|
default: o(() => {
|
|
2348
2379
|
var c;
|
|
2349
|
-
return [S.value === "email" ? (h(), I(
|
|
2380
|
+
return [S.value === "email" ? (h(), I(n(L), {
|
|
2350
2381
|
key: 0,
|
|
2351
2382
|
field: "userToken",
|
|
2352
2383
|
label: "邮箱验证码",
|
|
@@ -2355,13 +2386,13 @@ const wi = ["src", "alt", "width", "height"], bi = /* @__PURE__ */ Y({
|
|
|
2355
2386
|
message: "请输入验证码"
|
|
2356
2387
|
}]
|
|
2357
2388
|
}, {
|
|
2358
|
-
default: o(() => [
|
|
2389
|
+
default: o(() => [z("div", Ki, [p(n(Q), {
|
|
2359
2390
|
modelValue: w.value.userToken,
|
|
2360
|
-
"onUpdate:modelValue": b[5] || (b[5] = (
|
|
2391
|
+
"onUpdate:modelValue": b[5] || (b[5] = (C) => w.value.userToken = C),
|
|
2361
2392
|
placeholder: "请输入6位验证码",
|
|
2362
2393
|
"max-length": 6,
|
|
2363
2394
|
"allow-clear": ""
|
|
2364
|
-
}, null, 8, ["modelValue"]), p(
|
|
2395
|
+
}, null, 8, ["modelValue"]), p(n(T), {
|
|
2365
2396
|
disabled: r.value > 0,
|
|
2366
2397
|
loading: f.value,
|
|
2367
2398
|
onClick: F
|
|
@@ -2370,7 +2401,7 @@ const wi = ["src", "alt", "width", "height"], bi = /* @__PURE__ */ Y({
|
|
|
2370
2401
|
_: 1
|
|
2371
2402
|
}, 8, ["disabled", "loading"])])]),
|
|
2372
2403
|
_: 1
|
|
2373
|
-
})) : (h(), I(
|
|
2404
|
+
})) : (h(), I(n(L), {
|
|
2374
2405
|
key: 1,
|
|
2375
2406
|
field: "code",
|
|
2376
2407
|
label: "短信验证码",
|
|
@@ -2379,12 +2410,12 @@ const wi = ["src", "alt", "width", "height"], bi = /* @__PURE__ */ Y({
|
|
|
2379
2410
|
message: "请输入验证码"
|
|
2380
2411
|
}]
|
|
2381
2412
|
}, {
|
|
2382
|
-
default: o(() => [
|
|
2413
|
+
default: o(() => [z("div", Fi, [p(n(Q), {
|
|
2383
2414
|
modelValue: w.value.code,
|
|
2384
|
-
"onUpdate:modelValue": b[6] || (b[6] = (
|
|
2415
|
+
"onUpdate:modelValue": b[6] || (b[6] = (C) => w.value.code = C),
|
|
2385
2416
|
placeholder: "请输入验证码",
|
|
2386
2417
|
"allow-clear": ""
|
|
2387
|
-
}, null, 8, ["modelValue"]), p(
|
|
2418
|
+
}, null, 8, ["modelValue"]), p(n(T), {
|
|
2388
2419
|
disabled: r.value > 0,
|
|
2389
2420
|
loading: f.value,
|
|
2390
2421
|
onClick: F
|
|
@@ -2393,7 +2424,7 @@ const wi = ["src", "alt", "width", "height"], bi = /* @__PURE__ */ Y({
|
|
|
2393
2424
|
_: 1
|
|
2394
2425
|
}, 8, ["disabled", "loading"])])]),
|
|
2395
2426
|
_: 1
|
|
2396
|
-
})), (c =
|
|
2427
|
+
})), (c = n(s)) != null && c.hasPassword ? (h(), I(n(L), {
|
|
2397
2428
|
key: 2,
|
|
2398
2429
|
field: "password",
|
|
2399
2430
|
label: "登录密码",
|
|
@@ -2402,14 +2433,14 @@ const wi = ["src", "alt", "width", "height"], bi = /* @__PURE__ */ Y({
|
|
|
2402
2433
|
message: "请输入密码"
|
|
2403
2434
|
}]
|
|
2404
2435
|
}, {
|
|
2405
|
-
default: o(() => [p(
|
|
2436
|
+
default: o(() => [p(n(We), {
|
|
2406
2437
|
modelValue: w.value.password,
|
|
2407
|
-
"onUpdate:modelValue": b[7] || (b[7] = (
|
|
2438
|
+
"onUpdate:modelValue": b[7] || (b[7] = (C) => w.value.password = C),
|
|
2408
2439
|
placeholder: "请输入您的登录密码",
|
|
2409
2440
|
"allow-clear": ""
|
|
2410
2441
|
}, null, 8, ["modelValue"])]),
|
|
2411
2442
|
_: 1
|
|
2412
|
-
})) :
|
|
2443
|
+
})) : E("", !0), p(n(L), {
|
|
2413
2444
|
field: "confirmText",
|
|
2414
2445
|
label: "请输入「注销」以确认",
|
|
2415
2446
|
rules: [{
|
|
@@ -2419,21 +2450,21 @@ const wi = ["src", "alt", "width", "height"], bi = /* @__PURE__ */ Y({
|
|
|
2419
2450
|
validator: _
|
|
2420
2451
|
}]
|
|
2421
2452
|
}, {
|
|
2422
|
-
default: o(() => [p(
|
|
2453
|
+
default: o(() => [p(n(Q), {
|
|
2423
2454
|
modelValue: w.value.confirmText,
|
|
2424
|
-
"onUpdate:modelValue": b[8] || (b[8] = (
|
|
2455
|
+
"onUpdate:modelValue": b[8] || (b[8] = (C) => w.value.confirmText = C),
|
|
2425
2456
|
placeholder: "注销",
|
|
2426
2457
|
"allow-clear": ""
|
|
2427
2458
|
}, null, 8, ["modelValue"])]),
|
|
2428
2459
|
_: 1
|
|
2429
|
-
}, 8, ["rules"]), p(
|
|
2430
|
-
default: o(() => [p(
|
|
2431
|
-
default: o(() => [p(
|
|
2432
|
-
onClick: b[9] || (b[9] = (
|
|
2460
|
+
}, 8, ["rules"]), p(n(L), null, {
|
|
2461
|
+
default: o(() => [p(n(me), null, {
|
|
2462
|
+
default: o(() => [p(n(T), {
|
|
2463
|
+
onClick: b[9] || (b[9] = (C) => t.value = "check")
|
|
2433
2464
|
}, {
|
|
2434
2465
|
default: o(() => [...b[18] || (b[18] = [k("取消", -1)])]),
|
|
2435
2466
|
_: 1
|
|
2436
|
-
}), p(
|
|
2467
|
+
}), p(n(T), {
|
|
2437
2468
|
type: "primary",
|
|
2438
2469
|
status: "danger",
|
|
2439
2470
|
loading: q.value,
|
|
@@ -2448,69 +2479,69 @@ const wi = ["src", "alt", "width", "height"], bi = /* @__PURE__ */ Y({
|
|
|
2448
2479
|
})];
|
|
2449
2480
|
}),
|
|
2450
2481
|
_: 1
|
|
2451
|
-
}, 8, ["model", "size"])], 64)) :
|
|
2482
|
+
}, 8, ["model", "size"])], 64)) : t.value === "success" ? (h(), I(n(Ge), {
|
|
2452
2483
|
key: 5,
|
|
2453
2484
|
status: "success",
|
|
2454
2485
|
title: "账号已注销"
|
|
2455
2486
|
}, {
|
|
2456
2487
|
subtitle: o(() => [...b[19] || (b[19] = [k(" 您的账号已成功注销,登录凭据和绑定身份已清除 ", -1)])]),
|
|
2457
|
-
extra: o(() => [p(
|
|
2488
|
+
extra: o(() => [p(n(T), {
|
|
2458
2489
|
type: "primary",
|
|
2459
|
-
onClick:
|
|
2490
|
+
onClick: ae
|
|
2460
2491
|
}, {
|
|
2461
2492
|
default: o(() => [...b[20] || (b[20] = [k("返回首页", -1)])]),
|
|
2462
2493
|
_: 1
|
|
2463
2494
|
})]),
|
|
2464
2495
|
_: 1
|
|
2465
|
-
})) :
|
|
2496
|
+
})) : E("", !0);
|
|
2466
2497
|
}
|
|
2467
|
-
}),
|
|
2498
|
+
}), Wi = /* @__PURE__ */ X(Hi, [["__scopeId", "data-v-90439767"]]), Gi = {
|
|
2468
2499
|
class: "content"
|
|
2469
|
-
},
|
|
2500
|
+
}, Yi = {
|
|
2470
2501
|
class: "left"
|
|
2471
|
-
},
|
|
2502
|
+
}, Ji = {
|
|
2472
2503
|
class: "right"
|
|
2473
|
-
},
|
|
2504
|
+
}, ji = /* @__PURE__ */ J({
|
|
2474
2505
|
__name: "AuthkitAppSetting",
|
|
2475
2506
|
emits: ["confirm", "cancel"],
|
|
2476
|
-
setup(
|
|
2507
|
+
setup(e, {
|
|
2477
2508
|
expose: i,
|
|
2478
|
-
emit:
|
|
2509
|
+
emit: a
|
|
2479
2510
|
}) {
|
|
2480
|
-
const l =
|
|
2511
|
+
const l = a;
|
|
2481
2512
|
function s() {
|
|
2482
|
-
w.value = !1,
|
|
2513
|
+
w.value = !1, t.value = ["PersonalInformation"], l("cancel");
|
|
2483
2514
|
}
|
|
2484
2515
|
function d() {
|
|
2485
2516
|
s();
|
|
2486
2517
|
}
|
|
2487
|
-
const u =
|
|
2518
|
+
const u = A("large"), t = A(["PersonalInformation"]), y = [{
|
|
2488
2519
|
provider: "github",
|
|
2489
|
-
name:
|
|
2520
|
+
name: pe.github,
|
|
2490
2521
|
meta: {
|
|
2491
2522
|
icon: re.github
|
|
2492
2523
|
}
|
|
2493
2524
|
}, {
|
|
2494
2525
|
provider: "google",
|
|
2495
|
-
name:
|
|
2526
|
+
name: pe.google,
|
|
2496
2527
|
meta: {
|
|
2497
2528
|
icon: re.google
|
|
2498
2529
|
}
|
|
2499
2530
|
}, {
|
|
2500
2531
|
provider: "microsoft",
|
|
2501
|
-
name:
|
|
2532
|
+
name: pe.microsoft,
|
|
2502
2533
|
meta: {
|
|
2503
2534
|
icon: re.microsoft
|
|
2504
2535
|
}
|
|
2505
2536
|
}, {
|
|
2506
2537
|
provider: "wechat",
|
|
2507
|
-
name:
|
|
2538
|
+
name: pe.wechat,
|
|
2508
2539
|
meta: {
|
|
2509
2540
|
icon: re.wechat
|
|
2510
2541
|
}
|
|
2511
2542
|
}], {
|
|
2512
2543
|
appsData: g
|
|
2513
|
-
} =
|
|
2544
|
+
} = Ve(), f = $(() => {
|
|
2514
2545
|
const _ = g.value.authMethods;
|
|
2515
2546
|
return _.signUp.email || _.login.emailPassword || _.login.emailCode;
|
|
2516
2547
|
}), v = $(() => {
|
|
@@ -2549,7 +2580,7 @@ const wi = ["src", "alt", "width", "height"], bi = /* @__PURE__ */ Y({
|
|
|
2549
2580
|
name: "Passkey",
|
|
2550
2581
|
path: "PasskeyBinding",
|
|
2551
2582
|
meta: {
|
|
2552
|
-
icon:
|
|
2583
|
+
icon: Ei
|
|
2553
2584
|
}
|
|
2554
2585
|
}), _.push({
|
|
2555
2586
|
name: "注销账号",
|
|
@@ -2581,98 +2612,102 @@ const wi = ["src", "alt", "width", "height"], bi = /* @__PURE__ */ Y({
|
|
|
2581
2612
|
},
|
|
2582
2613
|
children: R.value
|
|
2583
2614
|
}), P;
|
|
2584
|
-
}), K = $(() => R.value.find((_) => _.path ===
|
|
2615
|
+
}), K = $(() => R.value.find((_) => _.path === t.value[0]));
|
|
2585
2616
|
function j(_) {
|
|
2586
2617
|
const P = _.path;
|
|
2587
|
-
|
|
2618
|
+
t.value = [P];
|
|
2588
2619
|
}
|
|
2589
2620
|
const {
|
|
2590
2621
|
changeType: V,
|
|
2591
2622
|
show: w
|
|
2592
|
-
} =
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
}),
|
|
2596
|
-
const P =
|
|
2623
|
+
} = at(l);
|
|
2624
|
+
Ie(R, (_) => {
|
|
2625
|
+
t.value[0].startsWith("OAuthBinding:") && !_.some((P) => P.path === t.value[0]) && (t.value = ["PersonalInformation"]);
|
|
2626
|
+
}), Ie(B, (_) => {
|
|
2627
|
+
const P = t.value[0];
|
|
2597
2628
|
_.some((F) => {
|
|
2598
2629
|
var D;
|
|
2599
2630
|
return F.path === P || ((D = F.children) == null ? void 0 : D.some((Z) => Z.path === P));
|
|
2600
|
-
}) || (
|
|
2631
|
+
}) || (t.value = ["PersonalInformation"]);
|
|
2601
2632
|
});
|
|
2602
2633
|
function q(_, P) {
|
|
2603
2634
|
w.value = P, V.value = "编辑";
|
|
2604
2635
|
}
|
|
2605
2636
|
return i({
|
|
2606
2637
|
setData: q
|
|
2607
|
-
}), (_, P) =>
|
|
2638
|
+
}), (_, P) => n(w) ? (h(), I(n(Ye), {
|
|
2608
2639
|
key: 0,
|
|
2609
2640
|
visible: !0,
|
|
2610
2641
|
"body-class": "AppSettingbodyClass",
|
|
2611
2642
|
"mask-closable": !1,
|
|
2612
2643
|
footer: !1,
|
|
2613
|
-
width:
|
|
2644
|
+
width: n(Be),
|
|
2614
2645
|
onCancel: s
|
|
2615
2646
|
}, {
|
|
2616
2647
|
title: o(() => [...P[1] || (P[1] = [k(" 用户信息 ", -1)])]),
|
|
2617
|
-
default: o(() => [
|
|
2618
|
-
"selected-keys":
|
|
2619
|
-
"onUpdate:selectedKeys": P[0] || (P[0] = (N) =>
|
|
2648
|
+
default: o(() => [z("div", Gi, [z("div", Yi, [p(it, {
|
|
2649
|
+
"selected-keys": t.value,
|
|
2650
|
+
"onUpdate:selectedKeys": P[0] || (P[0] = (N) => t.value = N),
|
|
2620
2651
|
menus: B.value,
|
|
2621
2652
|
onChange: j
|
|
2622
|
-
}, null, 8, ["selected-keys", "menus"])]),
|
|
2653
|
+
}, null, 8, ["selected-keys", "menus"])]), z("div", Ji, [t.value[0] === "PersonalInformation" ? (h(), I(bt, {
|
|
2623
2654
|
key: 0,
|
|
2624
2655
|
size: u.value
|
|
2625
|
-
}, null, 8, ["size"])) :
|
|
2656
|
+
}, null, 8, ["size"])) : E("", !0), t.value[0] === "EmailBinding" ? (h(), I(ni, {
|
|
2626
2657
|
key: 1,
|
|
2627
2658
|
size: u.value
|
|
2628
|
-
}, null, 8, ["size"])) :
|
|
2659
|
+
}, null, 8, ["size"])) : E("", !0), t.value[0] === "PhoneBinding" ? (h(), I(mi, {
|
|
2629
2660
|
key: 2,
|
|
2630
2661
|
size: u.value
|
|
2631
|
-
}, null, 8, ["size"])) :
|
|
2662
|
+
}, null, 8, ["size"])) : E("", !0), t.value[0] === "SetPassword" ? (h(), I($t, {
|
|
2632
2663
|
key: 3,
|
|
2633
2664
|
size: u.value
|
|
2634
|
-
}, null, 8, ["size"])) :
|
|
2665
|
+
}, null, 8, ["size"])) : E("", !0), t.value[0] === "PasskeyBinding" ? (h(), I(Jt, {
|
|
2635
2666
|
key: 4,
|
|
2636
2667
|
size: u.value
|
|
2637
|
-
}, null, 8, ["size"])) :
|
|
2668
|
+
}, null, 8, ["size"])) : E("", !0), K.value ? (h(), I(Di, {
|
|
2638
2669
|
key: 5,
|
|
2639
2670
|
provider: K.value.provider,
|
|
2640
2671
|
label: K.value.name,
|
|
2641
2672
|
size: u.value
|
|
2642
|
-
}, null, 8, ["provider", "label", "size"])) :
|
|
2673
|
+
}, null, 8, ["provider", "label", "size"])) : E("", !0), t.value[0] === "AccountDelete" ? (h(), I(Wi, {
|
|
2643
2674
|
key: 6,
|
|
2644
2675
|
size: u.value,
|
|
2645
2676
|
onDeleted: d
|
|
2646
|
-
}, null, 8, ["size"])) :
|
|
2677
|
+
}, null, 8, ["size"])) : E("", !0)])])]),
|
|
2647
2678
|
_: 1
|
|
2648
|
-
}, 8, ["width"])) :
|
|
2679
|
+
}, 8, ["width"])) : E("", !0);
|
|
2649
2680
|
}
|
|
2650
|
-
}),
|
|
2681
|
+
}), An = /* @__PURE__ */ X(ji, [["__scopeId", "data-v-944e5438"]]);
|
|
2651
2682
|
export {
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2683
|
+
An as A,
|
|
2684
|
+
ii as B,
|
|
2685
|
+
Di as O,
|
|
2686
|
+
Jt as P,
|
|
2687
|
+
he as S,
|
|
2688
|
+
ni as _,
|
|
2689
|
+
pi as a,
|
|
2690
|
+
ge as b,
|
|
2691
|
+
Vt as c,
|
|
2692
|
+
bt as d,
|
|
2693
|
+
mi as e,
|
|
2694
|
+
we as f,
|
|
2695
|
+
$t as g,
|
|
2696
|
+
bn as h,
|
|
2666
2697
|
Ai as i,
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2698
|
+
Ri as j,
|
|
2699
|
+
_n as k,
|
|
2700
|
+
Ii as l,
|
|
2701
|
+
se as m,
|
|
2702
|
+
kn as n,
|
|
2703
|
+
Ci as o,
|
|
2704
|
+
re as p,
|
|
2705
|
+
Ei as q,
|
|
2706
|
+
ye as r,
|
|
2707
|
+
vi as s,
|
|
2708
|
+
hi as t,
|
|
2709
|
+
Ft as u,
|
|
2710
|
+
gn as v,
|
|
2711
|
+
wn as w,
|
|
2712
|
+
Si as x
|
|
2678
2713
|
};
|