@huyooo/ui 0.5.54 → 0.5.56

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.
@@ -0,0 +1,2117 @@
1
+ /* empty css */
2
+ /* empty css */
3
+ /* empty css */
4
+ import { defineComponent as I, computed as N, createElementBlock as P, openBlock as g, normalizeStyle as ie, normalizeClass as we, createElementVNode as z, ref as _, createBlock as k, unref as e, withCtx as s, createVNode as i, createTextVNode as w, onMounted as K, onUnmounted as oe, withDirectives as ke, toDisplayString as R, vShow as be, Fragment as G, createCommentVNode as S, renderList as ze, isRef as re, useSlots as Se, renderSlot as ue } from "vue";
5
+ import { Form as F, FormItem as A, Avatar as de, Input as q, Textarea as Ae, Button as V, Message as D, Alert as O, Space as Y, InputPassword as Ie, Result as Ve, Modal as me, Divider as Pe, Link as H } from "@arco-design/web-vue";
6
+ /* empty css */
7
+ import { g as M, c as Z, h as ce, u as Ue } from "./auth-CDARHcht.js";
8
+ /* empty css */
9
+ import { u as Ce } from "./useUploadCos-DKh-eczm.js";
10
+ import { b as $e, c as ae, d as xe, a as J, e as qe, f as Te, u as Q, g as Re, h as Le } from "./useAuthkitUsersProfile-B_uMdnat.js";
11
+ import { _ as Be, g as Ee, i as Oe } from "./plugin-vue_export-helper-LjDO2Zua.js";
12
+ import { _ as $ } from "./_plugin-vue_export-helper-CHgC5LLL.js";
13
+ import { M as De } from "./Menu-BjWB9hre.js";
14
+ import { u as Ne } from "./useAuthkitCreateAndUpdate-Bsl_uyGQ.js";
15
+ import { u as le } from "./useAuthkitAppsAuthPageInfo-h9CL-MmH.js";
16
+ /* empty css */
17
+ import { Icon as Fe } from "@iconify/vue";
18
+ const Ge = I({
19
+ name: "IconCamera",
20
+ props: {
21
+ size: {
22
+ type: [Number, String]
23
+ },
24
+ strokeWidth: {
25
+ type: Number,
26
+ default: 4
27
+ },
28
+ strokeLinecap: {
29
+ type: String,
30
+ default: "butt",
31
+ validator: (r) => ["butt", "round", "square"].includes(r)
32
+ },
33
+ strokeLinejoin: {
34
+ type: String,
35
+ default: "miter",
36
+ validator: (r) => ["arcs", "bevel", "miter", "miter-clip", "round"].includes(r)
37
+ },
38
+ rotate: Number,
39
+ spin: Boolean
40
+ },
41
+ emits: {
42
+ click: (r) => !0
43
+ },
44
+ setup(r, {
45
+ emit: a
46
+ }) {
47
+ const u = Ee("icon"), n = N(() => [u, `${u}-camera`, {
48
+ [`${u}-spin`]: r.spin
49
+ }]), o = N(() => {
50
+ const t = {};
51
+ return r.size && (t.fontSize = Oe(r.size) ? `${r.size}px` : r.size), r.rotate && (t.transform = `rotate(${r.rotate}deg)`), t;
52
+ });
53
+ return {
54
+ cls: n,
55
+ innerStyle: o,
56
+ onClick: (t) => {
57
+ a("click", t);
58
+ }
59
+ };
60
+ }
61
+ }), He = ["stroke-width", "stroke-linecap", "stroke-linejoin"];
62
+ function Me(r, a, u, n, o, m) {
63
+ return g(), P("svg", {
64
+ viewBox: "0 0 48 48",
65
+ fill: "none",
66
+ xmlns: "http://www.w3.org/2000/svg",
67
+ stroke: "currentColor",
68
+ class: we(r.cls),
69
+ style: ie(r.innerStyle),
70
+ "stroke-width": r.strokeWidth,
71
+ "stroke-linecap": r.strokeLinecap,
72
+ "stroke-linejoin": r.strokeLinejoin,
73
+ onClick: a[0] || (a[0] = (...t) => r.onClick && r.onClick(...t))
74
+ }, a[1] || (a[1] = [z("path", {
75
+ d: "m33 12-1.862-3.724A.5.5 0 0 0 30.691 8H17.309a.5.5 0 0 0-.447.276L15 12m16 14a7 7 0 1 1-14 0 7 7 0 0 1 14 0ZM7 40h34a1 1 0 0 0 1-1V13a1 1 0 0 0-1-1H7a1 1 0 0 0-1 1v26a1 1 0 0 0 1 1Z"
76
+ }, null, -1)]), 14, He);
77
+ }
78
+ var ee = /* @__PURE__ */ Be(Ge, [["render", Me]]);
79
+ const je = Object.assign(ee, {
80
+ install: (r, a) => {
81
+ var u;
82
+ const n = (u = a == null ? void 0 : a.iconPrefix) != null ? u : "";
83
+ r.component(n + ee.name, ee);
84
+ }
85
+ }), We = {
86
+ class: "handle"
87
+ }, Ke = /* @__PURE__ */ I({
88
+ __name: "AuthkitPersonalInformation",
89
+ props: {
90
+ size: {
91
+ type: String,
92
+ required: !0
93
+ }
94
+ },
95
+ emits: ["submit"],
96
+ setup(r, {
97
+ emit: a
98
+ }) {
99
+ const u = a, n = r, o = _({
100
+ id: void 0,
101
+ nickname: "",
102
+ description: "",
103
+ avatar: "",
104
+ avatarUrl: ""
105
+ }), m = _(!1), t = _(), l = _(!1);
106
+ function y() {
107
+ l.value = !0, $e().then(({
108
+ data: d
109
+ }) => {
110
+ l.value = !1, o.value.id = d.id, o.value.nickname = d.nickname, o.value.description = d.description, o.value.avatar = d.avatar, o.value.avatarUrl = d.avatarUrl;
111
+ }).catch(() => {
112
+ l.value = !1;
113
+ });
114
+ }
115
+ function f() {
116
+ t.value.validate().then((d) => {
117
+ if (!d) {
118
+ l.value = !0;
119
+ const c = {
120
+ id: o.value.id,
121
+ nickname: o.value.nickname,
122
+ description: o.value.description,
123
+ avatar: o.value.avatar
124
+ };
125
+ ae(c).then(({
126
+ data: v
127
+ }) => {
128
+ l.value = !1, D.success("更新成功"), o.value.avatarUrl = v.avatarUrl, u("submit");
129
+ }).catch(() => {
130
+ l.value = !1;
131
+ });
132
+ }
133
+ });
134
+ }
135
+ y();
136
+ const p = () => {
137
+ const {
138
+ uploadFile: d
139
+ } = Ce(), c = document.createElement("input");
140
+ c.type = "file", c.accept = "image/*", c.style.display = "none", document.body.append(c), c.addEventListener("change", async (v) => {
141
+ var C;
142
+ const U = (C = v.target.files) == null ? void 0 : C[0];
143
+ if (U) {
144
+ m.value = !0;
145
+ try {
146
+ d({
147
+ bucketId: M.avatarBucketId,
148
+ file: U,
149
+ onFileFinish(T, B, E) {
150
+ m.value = !0;
151
+ const j = {
152
+ id: o.value.id,
153
+ nickname: o.value.nickname,
154
+ description: o.value.description,
155
+ avatar: E.Key
156
+ };
157
+ ae(j).then(() => {
158
+ m.value = !1, D.success("更新成功"), y(), u("submit");
159
+ }).catch(() => {
160
+ m.value = !1;
161
+ });
162
+ },
163
+ onError(T) {
164
+ console.error("上传图片失败"), m.value = !1;
165
+ }
166
+ });
167
+ } catch (T) {
168
+ console.error("上传图片失败", T), m.value = !1;
169
+ }
170
+ }
171
+ c.remove();
172
+ }), c.click();
173
+ };
174
+ return (d, c) => (g(), k(e(F), {
175
+ ref_key: "formRef",
176
+ ref: t,
177
+ model: o.value,
178
+ "auto-label-width": "",
179
+ size: n.size
180
+ }, {
181
+ default: s(() => [i(e(A), {
182
+ field: "avatar",
183
+ label: "头像",
184
+ rules: [{
185
+ required: !1,
186
+ message: "请上传头像"
187
+ }]
188
+ }, {
189
+ default: s(() => [i(e(de), {
190
+ "image-url": o.value.avatarUrl,
191
+ size: 42,
192
+ "object-fit": "cover",
193
+ "trigger-icon-style": {
194
+ color: "#3491FA"
195
+ },
196
+ onClick: p
197
+ }, {
198
+ "trigger-icon": s(() => [i(e(je))]),
199
+ _: 1
200
+ }, 8, ["image-url"])]),
201
+ _: 1
202
+ }), i(e(A), {
203
+ field: "nickname",
204
+ label: "昵称",
205
+ rules: [{
206
+ required: !1,
207
+ message: "请输入昵称"
208
+ }]
209
+ }, {
210
+ default: s(() => [i(e(q), {
211
+ modelValue: o.value.nickname,
212
+ "onUpdate:modelValue": c[0] || (c[0] = (v) => o.value.nickname = v),
213
+ placeholder: "请输入昵称"
214
+ }, null, 8, ["modelValue"])]),
215
+ _: 1
216
+ }), i(e(A), {
217
+ field: "description",
218
+ label: "简介",
219
+ rules: [{
220
+ required: !1,
221
+ message: "请输入描述"
222
+ }]
223
+ }, {
224
+ default: s(() => [i(e(Ae), {
225
+ modelValue: o.value.description,
226
+ "onUpdate:modelValue": c[1] || (c[1] = (v) => o.value.description = v),
227
+ placeholder: "请输入描述",
228
+ "allow-clear": "",
229
+ "auto-size": {
230
+ minRows: 5
231
+ }
232
+ }, null, 8, ["modelValue"])]),
233
+ _: 1
234
+ }), i(e(A), {
235
+ field: "",
236
+ label: "",
237
+ rules: []
238
+ }, {
239
+ default: s(() => [z("div", We, [i(e(V), {
240
+ type: "primary",
241
+ loading: l.value,
242
+ onClick: f
243
+ }, {
244
+ default: s(() => [...c[2] || (c[2] = [w(" 提交 ", -1)])]),
245
+ _: 1
246
+ }, 8, ["loading"])])]),
247
+ _: 1
248
+ })]),
249
+ _: 1
250
+ }, 8, ["model", "size"]));
251
+ }
252
+ }), Ze = /* @__PURE__ */ $(Ke, [["__scopeId", "data-v-c241b7f8"]]);
253
+ function Je(r) {
254
+ return Z({
255
+ url: `${M.authPrefixUrl}/restfulApi/verify/email`,
256
+ method: "post",
257
+ data: r
258
+ });
259
+ }
260
+ function X(r) {
261
+ return Z({
262
+ url: `${M.authPrefixUrl}/restfulApi/verify/email/retry`,
263
+ method: "post",
264
+ data: r
265
+ });
266
+ }
267
+ function Qe(r) {
268
+ return Z({
269
+ url: `${M.authPrefixUrl}/restfulApi/verify/password`,
270
+ method: "post",
271
+ data: r
272
+ });
273
+ }
274
+ const Xe = /* @__PURE__ */ I({
275
+ __name: "AuthkitSendVerifyCode",
276
+ props: {
277
+ size: {
278
+ type: String,
279
+ required: !0
280
+ },
281
+ loading: {
282
+ type: Boolean,
283
+ required: !0,
284
+ default: () => !1
285
+ }
286
+ },
287
+ emits: ["send"],
288
+ setup(r, {
289
+ expose: a,
290
+ emit: u
291
+ }) {
292
+ const n = u, o = r, m = _(!1);
293
+ let t;
294
+ const l = _(0), y = N(() => l.value.toString().padStart(2, "0")), f = N(() => l.value > 0), p = () => {
295
+ m.value && (l.value <= 0 ? (clearInterval(t), m.value = !1) : l.value--);
296
+ };
297
+ function d() {
298
+ n("send");
299
+ }
300
+ function c() {
301
+ l.value = 60, m.value = !0, t && clearInterval(t), t = setInterval(p, 1e3);
302
+ }
303
+ return K(() => {
304
+ }), a({
305
+ startCountFn: c
306
+ }), oe(() => {
307
+ t && clearInterval(t);
308
+ }), (v, b) => (g(), k(e(V), {
309
+ class: "OAuthItem",
310
+ type: "primary",
311
+ size: o.size,
312
+ disabled: f.value,
313
+ loading: o.loading,
314
+ onClick: d
315
+ }, {
316
+ default: s(() => [b[0] || (b[0] = z("span", null, " 发送验证码", -1)), ke(z("span", {
317
+ class: "verify-code-timer"
318
+ }, R(`(${y.value})`), 513), [[be, f.value]])]),
319
+ _: 1
320
+ }, 8, ["size", "disabled", "loading"]));
321
+ }
322
+ }), se = /* @__PURE__ */ $(Xe, [["__scopeId", "data-v-2883dc6d"]]), Ye = {
323
+ class: "sendVerifyCodeItem"
324
+ }, et = {
325
+ class: "handle"
326
+ }, tt = /* @__PURE__ */ I({
327
+ __name: "AuthkitEmailVerify",
328
+ props: {
329
+ email: {
330
+ type: String,
331
+ required: !0,
332
+ default: () => ""
333
+ },
334
+ size: {
335
+ type: String,
336
+ required: !0
337
+ }
338
+ },
339
+ emits: ["next"],
340
+ setup(r, {
341
+ emit: a
342
+ }) {
343
+ const u = a, n = r, o = N(() => ce(n.email)), m = _(), t = _(!1), l = _(!1), y = _(), f = _({
344
+ userToken: void 0,
345
+ emailVerifyId: void 0
346
+ });
347
+ async function p() {
348
+ t.value = !0, X({
349
+ email: n.email
350
+ }).then(({
351
+ data: c
352
+ }) => {
353
+ f.value.emailVerifyId = c.emailVerifyId, t.value = !1, m.value.startCountFn();
354
+ }).catch(() => {
355
+ t.value = !1;
356
+ });
357
+ }
358
+ async function d() {
359
+ y.value.validate(["userToken"]).then((c) => {
360
+ if (!c) {
361
+ l.value = !0;
362
+ const v = {
363
+ email: n.email,
364
+ userToken: f.value.userToken,
365
+ emailVerifyId: f.value.emailVerifyId
366
+ };
367
+ Je(v).then(() => {
368
+ l.value = !1, u("next");
369
+ }).catch(() => {
370
+ l.value = !1;
371
+ });
372
+ }
373
+ });
374
+ }
375
+ return (c, v) => (g(), k(e(F), {
376
+ ref_key: "formRef",
377
+ ref: y,
378
+ model: f.value,
379
+ "auto-label-width": "",
380
+ size: n.size
381
+ }, {
382
+ default: s(() => [i(e(A), {
383
+ field: "email",
384
+ label: "邮箱",
385
+ rules: [{
386
+ required: !1,
387
+ message: "请输入邮箱"
388
+ }, {
389
+ type: "email",
390
+ message: "请输入有效的邮箱"
391
+ }]
392
+ }, {
393
+ default: s(() => [w(R(o.value), 1)]),
394
+ _: 1
395
+ }), i(e(A), {
396
+ field: "userToken",
397
+ label: "验证码",
398
+ "hide-label": "",
399
+ rules: [{
400
+ required: !0,
401
+ message: "请输入验证码"
402
+ }]
403
+ }, {
404
+ default: s(() => [z("div", Ye, [i(e(q), {
405
+ modelValue: f.value.userToken,
406
+ "onUpdate:modelValue": v[0] || (v[0] = (b) => f.value.userToken = b),
407
+ placeholder: "请输入验证码"
408
+ }, null, 8, ["modelValue"]), i(se, {
409
+ ref_key: "SendVerifyCodeRef",
410
+ ref: m,
411
+ size: n.size,
412
+ loading: t.value,
413
+ style: {
414
+ "margin-left": "10px"
415
+ },
416
+ onSend: p
417
+ }, null, 8, ["size", "loading"])])]),
418
+ _: 1
419
+ }), i(e(A), {
420
+ field: "",
421
+ label: "",
422
+ rules: []
423
+ }, {
424
+ default: s(() => [z("div", et, [i(e(V), {
425
+ loading: l.value,
426
+ type: "primary",
427
+ onClick: d
428
+ }, {
429
+ default: s(() => [...v[1] || (v[1] = [w(" 提交 ", -1)])]),
430
+ _: 1
431
+ }, 8, ["loading"])])]),
432
+ _: 1
433
+ })]),
434
+ _: 1
435
+ }, 8, ["model", "size"]));
436
+ }
437
+ }), ne = /* @__PURE__ */ $(tt, [["__scopeId", "data-v-89ebb370"]]), it = {
438
+ class: "handle"
439
+ }, lt = /* @__PURE__ */ I({
440
+ __name: "AuthkitPasswordUpdate",
441
+ props: {
442
+ size: {
443
+ type: String,
444
+ required: !0
445
+ }
446
+ },
447
+ emits: ["submit"],
448
+ setup(r, {
449
+ emit: a
450
+ }) {
451
+ const u = a, n = _(!1), o = _(), m = r, t = _({
452
+ oldPassword: "",
453
+ password: "",
454
+ confirmPassword: ""
455
+ });
456
+ async function l() {
457
+ o.value.validate().then((y) => {
458
+ if (!y) {
459
+ const f = {
460
+ password: t.value.password
461
+ };
462
+ xe(f).then(() => {
463
+ n.value = !1, u("submit", f);
464
+ }).catch(() => {
465
+ n.value = !1;
466
+ });
467
+ }
468
+ });
469
+ }
470
+ return (y, f) => (g(), k(e(F), {
471
+ ref_key: "formRef",
472
+ ref: o,
473
+ model: t.value,
474
+ "auto-label-width": "",
475
+ size: m.size
476
+ }, {
477
+ default: s(() => [i(e(A), {
478
+ field: "oldPassword",
479
+ label: "当前密码",
480
+ "hide-label": "",
481
+ rules: [{
482
+ required: !0,
483
+ message: "请输入当前密码"
484
+ }]
485
+ }, {
486
+ default: s(() => [i(e(q), {
487
+ modelValue: t.value.oldPassword,
488
+ "onUpdate:modelValue": f[0] || (f[0] = (p) => t.value.oldPassword = p),
489
+ placeholder: "请输入当前密码",
490
+ type: "password"
491
+ }, null, 8, ["modelValue"])]),
492
+ _: 1
493
+ }), i(e(A), {
494
+ field: "password",
495
+ label: "新密码",
496
+ "hide-label": "",
497
+ rules: [{
498
+ required: !0,
499
+ message: "新密码请输入"
500
+ }, {
501
+ minLength: 10,
502
+ message: "新密码不能少于10字符"
503
+ }]
504
+ }, {
505
+ default: s(() => [i(e(q), {
506
+ modelValue: t.value.password,
507
+ "onUpdate:modelValue": f[1] || (f[1] = (p) => t.value.password = p),
508
+ placeholder: "请输入新密码",
509
+ type: "password"
510
+ }, null, 8, ["modelValue"])]),
511
+ _: 1
512
+ }), i(e(A), {
513
+ field: "confirmPassword",
514
+ label: "确认密码",
515
+ "hide-label": "",
516
+ rules: [{
517
+ required: !0,
518
+ message: "请输入确认密码"
519
+ }, {
520
+ minLength: 10,
521
+ message: "确认密码不能少于10字符"
522
+ }, {
523
+ validator: (p, d) => {
524
+ p !== t.value.password ? d("两次密码输入不一致,请重新输入") : d();
525
+ }
526
+ }]
527
+ }, {
528
+ default: s(() => [i(e(q), {
529
+ modelValue: t.value.confirmPassword,
530
+ "onUpdate:modelValue": f[2] || (f[2] = (p) => t.value.confirmPassword = p),
531
+ placeholder: "请输入确认密码密码",
532
+ type: "password"
533
+ }, null, 8, ["modelValue"])]),
534
+ _: 1
535
+ }, 8, ["rules"]), i(e(A), {
536
+ field: "",
537
+ label: "",
538
+ rules: []
539
+ }, {
540
+ default: s(() => [z("div", it, [i(e(V), {
541
+ type: "primary",
542
+ loading: n.value,
543
+ onClick: l
544
+ }, {
545
+ default: s(() => [...f[3] || (f[3] = [w(" 提交 ", -1)])]),
546
+ _: 1
547
+ }, 8, ["loading"])])]),
548
+ _: 1
549
+ })]),
550
+ _: 1
551
+ }, 8, ["model", "size"]));
552
+ }
553
+ }), st = /* @__PURE__ */ $(lt, [["__scopeId", "data-v-a9e25b03"]]), nt = /* @__PURE__ */ I({
554
+ __name: "AuthkitSetPassword",
555
+ props: {
556
+ size: {
557
+ type: String,
558
+ required: !0
559
+ }
560
+ },
561
+ setup(r) {
562
+ const {
563
+ userProfile: a,
564
+ loading: u,
565
+ fetchUserProfile: n,
566
+ isLoggedIn: o
567
+ } = J(), m = _("hidden"), t = r;
568
+ function l(p) {
569
+ m.value = p;
570
+ }
571
+ function y(p) {
572
+ D.success("密码修改成功"), m.value = "hidden", n();
573
+ }
574
+ function f() {
575
+ m.value = "update";
576
+ }
577
+ return K(() => {
578
+ o.value && !a.value && n();
579
+ }), (p, d) => {
580
+ var c, v, b, U;
581
+ return g(), P(G, null, [!((c = e(a)) != null && c.email) && !((v = e(a)) != null && v.phone) ? (g(), k(e(O), {
582
+ key: 0,
583
+ title: "去绑定邮箱"
584
+ }, {
585
+ action: s(() => [i(e(V), {
586
+ size: t.size,
587
+ type: "primary",
588
+ onClick: d[0] || (d[0] = (C) => l("update"))
589
+ }, {
590
+ default: s(() => [...d[2] || (d[2] = [w(" 去绑定邮箱 ", -1)])]),
591
+ _: 1
592
+ }, 8, ["size"])]),
593
+ default: s(() => [d[3] || (d[3] = w(" 请先去绑定邮箱或者手机号码,才能设置密码 ", -1))]),
594
+ _: 1
595
+ })) : S("", !0), (b = e(a)) != null && b.email && m.value === "hidden" ? (g(), k(e(O), {
596
+ key: 1,
597
+ title: "更改密码"
598
+ }, {
599
+ action: s(() => [i(e(V), {
600
+ size: t.size,
601
+ type: "primary",
602
+ onClick: d[1] || (d[1] = (C) => l("verify"))
603
+ }, {
604
+ default: s(() => [...d[4] || (d[4] = [w("更改密码", -1)])]),
605
+ _: 1
606
+ }, 8, ["size"])]),
607
+ default: s(() => [d[5] || (d[5] = w(" 为了账户安全修改密码前会先验证身份 ", -1))]),
608
+ _: 1
609
+ })) : S("", !0), m.value === "update" ? (g(), k(st, {
610
+ key: 2,
611
+ size: t.size,
612
+ loading: e(u),
613
+ onSubmit: y
614
+ }, null, 8, ["size", "loading"])) : S("", !0), m.value === "verify" ? (g(), k(ne, {
615
+ key: 3,
616
+ size: t.size,
617
+ email: (U = e(a)) == null ? void 0 : U.email,
618
+ onNext: f
619
+ }, null, 8, ["size", "email"])) : S("", !0)], 64);
620
+ };
621
+ }
622
+ }), at = {
623
+ class: "content"
624
+ }, ot = {
625
+ class: "sendVerifyCodeItem"
626
+ }, rt = {
627
+ class: "handle"
628
+ }, ut = /* @__PURE__ */ I({
629
+ __name: "AuthkitEmailUpdate",
630
+ props: {
631
+ size: {
632
+ type: String,
633
+ required: !0
634
+ },
635
+ loading: {
636
+ type: Boolean,
637
+ required: !0,
638
+ default: () => !0
639
+ }
640
+ },
641
+ emits: ["submit"],
642
+ setup(r, {
643
+ emit: a
644
+ }) {
645
+ const u = a, n = r, o = _(), m = _(!1), t = _(), l = _({
646
+ email: void 0,
647
+ userToken: void 0,
648
+ emailVerifyId: void 0,
649
+ password: void 0,
650
+ confirmPassword: void 0,
651
+ referrerId: void 0
652
+ });
653
+ async function y() {
654
+ t.value.validateField(["email"]).then((p) => {
655
+ p || (m.value = !0, X({
656
+ email: l.value.email
657
+ }).then(({
658
+ data: d
659
+ }) => {
660
+ l.value.emailVerifyId = d.emailVerifyId, m.value = !1, o.value.startCountFn();
661
+ }).catch(() => {
662
+ m.value = !1;
663
+ }));
664
+ });
665
+ }
666
+ async function f() {
667
+ t.value.validate().then((p) => {
668
+ p || u("submit", l.value);
669
+ });
670
+ }
671
+ return (p, d) => (g(), P("div", at, [i(e(F), {
672
+ ref_key: "formRef",
673
+ ref: t,
674
+ model: l.value,
675
+ size: n.size,
676
+ "auto-label-width": ""
677
+ }, {
678
+ default: s(() => [i(e(A), {
679
+ field: "email",
680
+ label: "邮箱",
681
+ "hide-label": "",
682
+ rules: [{
683
+ required: !0,
684
+ message: "请输入邮箱"
685
+ }, {
686
+ type: "email",
687
+ message: "请输入有效的邮箱"
688
+ }]
689
+ }, {
690
+ default: s(() => [i(e(q), {
691
+ modelValue: l.value.email,
692
+ "onUpdate:modelValue": d[0] || (d[0] = (c) => l.value.email = c),
693
+ placeholder: "请输入邮箱",
694
+ autocomplete: "email username",
695
+ type: "email"
696
+ }, null, 8, ["modelValue"])]),
697
+ _: 1
698
+ }), i(e(A), {
699
+ field: "userToken",
700
+ label: "验证码",
701
+ "hide-label": "",
702
+ rules: [{
703
+ required: !0,
704
+ message: "请输入验证码"
705
+ }]
706
+ }, {
707
+ default: s(() => [z("div", ot, [i(e(q), {
708
+ modelValue: l.value.userToken,
709
+ "onUpdate:modelValue": d[1] || (d[1] = (c) => l.value.userToken = c),
710
+ placeholder: "请输入验证码",
711
+ autocomplete: "one-time-code"
712
+ }, null, 8, ["modelValue"]), i(se, {
713
+ ref_key: "SendVerifyCodeRef",
714
+ ref: o,
715
+ size: n.size,
716
+ loading: m.value,
717
+ style: {
718
+ "margin-left": "10px"
719
+ },
720
+ onSend: y
721
+ }, null, 8, ["size", "loading"])])]),
722
+ _: 1
723
+ }), i(e(A), {
724
+ field: "password",
725
+ label: "密码",
726
+ "hide-label": "",
727
+ rules: [{
728
+ required: !0,
729
+ message: "密码请输入"
730
+ }, {
731
+ minLength: 10,
732
+ message: "密码不能少于10字符"
733
+ }]
734
+ }, {
735
+ default: s(() => [i(e(q), {
736
+ modelValue: l.value.password,
737
+ "onUpdate:modelValue": d[2] || (d[2] = (c) => l.value.password = c),
738
+ placeholder: "请输入密码",
739
+ type: "password",
740
+ autocomplete: "new-password"
741
+ }, null, 8, ["modelValue"])]),
742
+ _: 1
743
+ }), i(e(A), {
744
+ field: "confirmPassword",
745
+ label: "确认密码",
746
+ "hide-label": "",
747
+ rules: [{
748
+ required: !0,
749
+ message: "请输入确认密码"
750
+ }, {
751
+ minLength: 10,
752
+ message: "确认密码不能少于10字符"
753
+ }, {
754
+ validator: (c, v) => {
755
+ c !== l.value.password ? v("两次密码输入不一致,请重新输入") : v();
756
+ }
757
+ }]
758
+ }, {
759
+ default: s(() => [i(e(q), {
760
+ modelValue: l.value.confirmPassword,
761
+ "onUpdate:modelValue": d[3] || (d[3] = (c) => l.value.confirmPassword = c),
762
+ placeholder: "请输入确认密码密码",
763
+ type: "password",
764
+ autocomplete: "new-password"
765
+ }, null, 8, ["modelValue"])]),
766
+ _: 1
767
+ }, 8, ["rules"]), i(e(A), {
768
+ field: "referrerId",
769
+ label: "邀请人",
770
+ "hide-label": "",
771
+ rules: [{
772
+ required: !1,
773
+ message: "请输入邀请人ID"
774
+ }]
775
+ }, {
776
+ default: s(() => [i(e(q), {
777
+ modelValue: l.value.referrerId,
778
+ "onUpdate:modelValue": d[4] || (d[4] = (c) => l.value.referrerId = c),
779
+ placeholder: "邀请人ID(可选)",
780
+ autocomplete: "off"
781
+ }, null, 8, ["modelValue"])]),
782
+ _: 1
783
+ }), z("div", rt, [i(e(V), {
784
+ type: "primary",
785
+ loading: n.loading,
786
+ long: "",
787
+ size: n.size,
788
+ onClick: f
789
+ }, {
790
+ default: s(() => [...d[5] || (d[5] = [w(" 提交 ", -1)])]),
791
+ _: 1
792
+ }, 8, ["loading", "size"])])]),
793
+ _: 1
794
+ }, 8, ["model", "size"])]));
795
+ }
796
+ }), fe = /* @__PURE__ */ $(ut, [["__scopeId", "data-v-5b701953"]]), dt = /* @__PURE__ */ I({
797
+ __name: "AuthkitEmailBinding",
798
+ props: {
799
+ size: {
800
+ type: String,
801
+ required: !0
802
+ }
803
+ },
804
+ setup(r) {
805
+ const {
806
+ userProfile: a,
807
+ loading: u,
808
+ fetchUserProfile: n
809
+ } = J(), o = _("hidden"), m = r;
810
+ function t(f) {
811
+ o.value = f;
812
+ }
813
+ function l(f) {
814
+ u.value = !0;
815
+ const p = {
816
+ email: f.email,
817
+ userToken: f.userToken,
818
+ emailVerifyId: f.emailVerifyId
819
+ };
820
+ qe(p).then(() => {
821
+ u.value = !1, D.success("绑定成功"), o.value = "hidden", n();
822
+ }).catch(() => {
823
+ u.value = !1;
824
+ });
825
+ }
826
+ function y() {
827
+ o.value = "update";
828
+ }
829
+ return K(() => {
830
+ a.value || n();
831
+ }), (f, p) => {
832
+ var d, c, v;
833
+ return g(), P(G, null, [!((d = e(a)) != null && d.email) && o.value === "hidden" ? (g(), k(e(O), {
834
+ key: 0,
835
+ title: "绑定邮箱"
836
+ }, {
837
+ action: s(() => [i(e(V), {
838
+ size: m.size,
839
+ type: "primary",
840
+ onClick: p[0] || (p[0] = (b) => t("update"))
841
+ }, {
842
+ default: s(() => [...p[2] || (p[2] = [w(" 绑定邮箱 ", -1)])]),
843
+ _: 1
844
+ }, 8, ["size"])]),
845
+ default: s(() => [p[3] || (p[3] = w(" 您还未绑定邮箱,请点击绑定邮箱 ", -1))]),
846
+ _: 1
847
+ })) : S("", !0), (c = e(a)) != null && c.email && o.value === "hidden" ? (g(), k(e(O), {
848
+ key: 1,
849
+ title: "更改邮箱"
850
+ }, {
851
+ action: s(() => [i(e(V), {
852
+ size: m.size,
853
+ type: "primary",
854
+ onClick: p[1] || (p[1] = (b) => t("verify"))
855
+ }, {
856
+ default: s(() => [...p[4] || (p[4] = [w(" 更改邮箱 ", -1)])]),
857
+ _: 1
858
+ }, 8, ["size"])]),
859
+ default: s(() => {
860
+ var b;
861
+ return [w(R(`您绑定的邮箱为${e(ce)((b = e(a)) == null ? void 0 : b.email)}`) + " ", 1)];
862
+ }),
863
+ _: 1
864
+ })) : S("", !0), o.value === "update" ? (g(), k(fe, {
865
+ key: 2,
866
+ loading: e(u),
867
+ size: m.size,
868
+ onSubmit: l
869
+ }, null, 8, ["loading", "size"])) : S("", !0), o.value === "verify" ? (g(), k(ne, {
870
+ key: 3,
871
+ size: m.size,
872
+ email: (v = e(a)) == null ? void 0 : v.email,
873
+ onNext: y
874
+ }, null, 8, ["size", "email"])) : S("", !0)], 64);
875
+ };
876
+ }
877
+ }), mt = /* @__PURE__ */ $(dt, [["__scopeId", "data-v-b2663ea1"]]);
878
+ function pe() {
879
+ return Z({
880
+ url: `${M.authPrefixUrl}/restfulApi/OAuth/github/login`,
881
+ method: "get"
882
+ });
883
+ }
884
+ const ct = /* @__PURE__ */ I({
885
+ __name: "AuthkitGithubBinding",
886
+ props: {
887
+ size: {
888
+ type: String,
889
+ required: !0
890
+ }
891
+ },
892
+ setup(r) {
893
+ const {
894
+ userProfile: a,
895
+ fetchUserProfile: u
896
+ } = J(), n = _("hidden"), o = _(!1);
897
+ let m;
898
+ const t = r;
899
+ function l(c) {
900
+ n.value = c;
901
+ }
902
+ function y() {
903
+ pe().then(({
904
+ data: c
905
+ }) => {
906
+ const {
907
+ redirectUri: v
908
+ } = c;
909
+ o.value = !0, window.open(v, "_blank");
910
+ });
911
+ }
912
+ function f() {
913
+ Te().then(() => {
914
+ D.success("解绑成功"), n.value = "hidden", u();
915
+ });
916
+ }
917
+ function p() {
918
+ n.value === "bind" && (n.value = "hidden", y()), n.value === "unbind" && f();
919
+ }
920
+ function d() {
921
+ o.value && u();
922
+ }
923
+ return K(() => {
924
+ a.value || u(), m = setInterval(d, 1e3);
925
+ }), oe(() => {
926
+ m && clearInterval(m);
927
+ }), (c, v) => {
928
+ var b, U, C;
929
+ return g(), P(G, null, [!((b = e(a)) != null && b.github) && n.value === "hidden" ? (g(), k(e(O), {
930
+ key: 0,
931
+ title: "绑定GitHUb"
932
+ }, {
933
+ action: s(() => [i(e(V), {
934
+ size: t.size,
935
+ type: "primary",
936
+ onClick: v[0] || (v[0] = (T) => l("bind"))
937
+ }, {
938
+ default: s(() => [...v[2] || (v[2] = [w(" 绑定GitHUb ", -1)])]),
939
+ _: 1
940
+ }, 8, ["size"])]),
941
+ default: s(() => [v[3] || (v[3] = w(" 请尚未绑定GitHub,请点击绑定GitHUb ", -1))]),
942
+ _: 1
943
+ })) : S("", !0), (U = e(a)) != null && U.github && n.value === "hidden" ? (g(), k(e(O), {
944
+ key: 1,
945
+ title: "解绑GitHub"
946
+ }, {
947
+ action: s(() => [i(e(V), {
948
+ size: t.size,
949
+ type: "primary",
950
+ onClick: v[1] || (v[1] = (T) => l("unbind"))
951
+ }, {
952
+ default: s(() => [...v[4] || (v[4] = [w(" 解绑GitHUb ", -1)])]),
953
+ _: 1
954
+ }, 8, ["size"])]),
955
+ default: s(() => {
956
+ var T, B, E;
957
+ return [z("span", null, R(`您绑定的账号为 ${(B = (T = e(a)) == null ? void 0 : T.github) == null ? void 0 : B.login}`), 1), i(e(de), {
958
+ "image-url": (E = e(a)) == null ? void 0 : E.avatar,
959
+ size: 42
960
+ }, null, 8, ["image-url"])];
961
+ }),
962
+ _: 1
963
+ })) : S("", !0), n.value === "bind" || n.value === "unbind" ? (g(), k(ne, {
964
+ key: 2,
965
+ size: t.size,
966
+ email: (C = e(a)) == null ? void 0 : C.email,
967
+ onNext: p
968
+ }, null, 8, ["size", "email"])) : S("", !0)], 64);
969
+ };
970
+ }
971
+ }), ft = {
972
+ class: "dependency-list"
973
+ }, pt = {
974
+ class: "label"
975
+ }, vt = {
976
+ class: "count"
977
+ }, gt = {
978
+ class: "action-bar"
979
+ }, yt = /* @__PURE__ */ I({
980
+ __name: "AuthkitAccountDelete",
981
+ props: {
982
+ size: {
983
+ type: String,
984
+ required: !0
985
+ }
986
+ },
987
+ emits: ["deleted"],
988
+ setup(r, {
989
+ emit: a
990
+ }) {
991
+ const u = r, n = a, {
992
+ userProfile: o,
993
+ clearUserProfile: m
994
+ } = J(), {
995
+ clearAuth: t
996
+ } = Q(), l = _("check"), y = _(!1), f = _([]), p = _(!1), d = _(""), c = _(0);
997
+ let v = null;
998
+ const b = N(() => {
999
+ var W;
1000
+ const L = ((W = o.value) == null ? void 0 : W.email) || "";
1001
+ if (!L) return "";
1002
+ const [h, x] = L.split("@");
1003
+ return h.length <= 2 ? L : `${h.slice(0, 2)}***@${x}`;
1004
+ }), U = _(), C = _({
1005
+ userToken: "",
1006
+ password: "",
1007
+ confirmText: ""
1008
+ }), T = _(!1);
1009
+ function B(L, h) {
1010
+ L !== "注销" ? h('请输入"注销"以确认操作') : h();
1011
+ }
1012
+ async function E() {
1013
+ var L;
1014
+ y.value = !0;
1015
+ try {
1016
+ const h = await Re(), {
1017
+ hasDependencies: x,
1018
+ dependencies: W
1019
+ } = h.data;
1020
+ if (x)
1021
+ f.value = W, l.value = "dependencies";
1022
+ else {
1023
+ if (!((L = o.value) != null && L.email)) {
1024
+ D.error("账号未绑定邮箱,无法进行注销验证。请先绑定邮箱");
1025
+ return;
1026
+ }
1027
+ l.value = "sendCode";
1028
+ }
1029
+ } catch (h) {
1030
+ console.error("检查依赖失败:", h), D.error("检查失败,请稍后重试");
1031
+ } finally {
1032
+ y.value = !1;
1033
+ }
1034
+ }
1035
+ async function j() {
1036
+ var L;
1037
+ if (!((L = o.value) != null && L.email)) {
1038
+ D.error("请先绑定邮箱");
1039
+ return;
1040
+ }
1041
+ p.value = !0;
1042
+ try {
1043
+ const h = await X({
1044
+ email: o.value.email
1045
+ });
1046
+ d.value = h.data.emailVerifyId, D.success("验证码已发送"), l.value = "confirm", ye();
1047
+ } catch (h) {
1048
+ console.error("发送验证码失败:", h);
1049
+ } finally {
1050
+ p.value = !1;
1051
+ }
1052
+ }
1053
+ function ye() {
1054
+ c.value = 60, v && clearInterval(v), v = setInterval(() => {
1055
+ c.value--, c.value <= 0 && v && (clearInterval(v), v = null);
1056
+ }, 1e3);
1057
+ }
1058
+ async function he() {
1059
+ var h;
1060
+ if (!await ((h = U.value) == null ? void 0 : h.validate())) {
1061
+ T.value = !0;
1062
+ try {
1063
+ await Le({
1064
+ password: C.value.password,
1065
+ userToken: C.value.userToken,
1066
+ emailVerifyId: d.value,
1067
+ confirmText: C.value.confirmText
1068
+ }), l.value = "success", m(), t(), n("deleted");
1069
+ } catch (x) {
1070
+ console.error("注销失败:", x);
1071
+ } finally {
1072
+ T.value = !1;
1073
+ }
1074
+ }
1075
+ }
1076
+ function _e() {
1077
+ window.location.href = "/";
1078
+ }
1079
+ return (L, h) => l.value === "check" ? (g(), k(e(O), {
1080
+ key: 0,
1081
+ type: "warning",
1082
+ title: "注销账号"
1083
+ }, {
1084
+ action: s(() => [i(e(V), {
1085
+ size: u.size,
1086
+ type: "primary",
1087
+ status: "danger",
1088
+ loading: y.value,
1089
+ onClick: E
1090
+ }, {
1091
+ default: s(() => [w(R(y.value ? "检查中..." : "开始注销"), 1)]),
1092
+ _: 1
1093
+ }, 8, ["size", "loading"])]),
1094
+ default: s(() => [h[6] || (h[6] = w(" 注销账号后,您的所有数据将被永久删除,无法恢复。请确认您已备份重要数据。 ", -1))]),
1095
+ _: 1
1096
+ })) : l.value === "dependencies" ? (g(), P(G, {
1097
+ key: 1
1098
+ }, [i(e(O), {
1099
+ type: "error",
1100
+ title: "无法注销账号"
1101
+ }, {
1102
+ default: s(() => [...h[7] || (h[7] = [w(" 您的账号下还有以下资源,请先处理后再注销: ", -1)])]),
1103
+ _: 1
1104
+ }), z("div", ft, [(g(!0), P(G, null, ze(f.value, (x) => (g(), P("div", {
1105
+ key: x.type,
1106
+ class: "dependency-item"
1107
+ }, [z("span", pt, R(x.label), 1), z("span", vt, R(x.count) + " 个", 1)]))), 128))]), z("div", gt, [i(e(V), {
1108
+ size: u.size,
1109
+ onClick: h[0] || (h[0] = (x) => l.value = "check")
1110
+ }, {
1111
+ default: s(() => [...h[8] || (h[8] = [w("返回", -1)])]),
1112
+ _: 1
1113
+ }, 8, ["size"])])], 64)) : l.value === "sendCode" ? (g(), k(e(O), {
1114
+ key: 2,
1115
+ type: "normal",
1116
+ title: "身份验证"
1117
+ }, {
1118
+ action: s(() => [i(e(Y), null, {
1119
+ default: s(() => [i(e(V), {
1120
+ size: u.size,
1121
+ onClick: h[1] || (h[1] = (x) => l.value = "check")
1122
+ }, {
1123
+ default: s(() => [...h[9] || (h[9] = [w("取消", -1)])]),
1124
+ _: 1
1125
+ }, 8, ["size"]), i(e(V), {
1126
+ size: u.size,
1127
+ type: "primary",
1128
+ loading: p.value,
1129
+ onClick: j
1130
+ }, {
1131
+ default: s(() => [w(R(p.value ? "发送中..." : "发送验证码"), 1)]),
1132
+ _: 1
1133
+ }, 8, ["size", "loading"])]),
1134
+ _: 1
1135
+ })]),
1136
+ default: s(() => [w(" 为确保账号安全,我们将向您的邮箱 " + R(b.value) + " 发送验证码 ", 1)]),
1137
+ _: 1
1138
+ })) : l.value === "confirm" ? (g(), P(G, {
1139
+ key: 3
1140
+ }, [i(e(O), {
1141
+ type: "warning",
1142
+ title: "确认注销"
1143
+ }, {
1144
+ default: s(() => [w(" 验证码已发送至 " + R(b.value) + ",此操作不可逆,请谨慎操作 ", 1)]),
1145
+ _: 1
1146
+ }), i(e(F), {
1147
+ ref_key: "formRef",
1148
+ ref: U,
1149
+ model: C.value,
1150
+ size: u.size,
1151
+ class: "confirm-form",
1152
+ layout: "vertical"
1153
+ }, {
1154
+ default: s(() => [i(e(A), {
1155
+ field: "userToken",
1156
+ label: "邮箱验证码",
1157
+ rules: [{
1158
+ required: !0,
1159
+ message: "请输入验证码"
1160
+ }]
1161
+ }, {
1162
+ default: s(() => [i(e(Y), null, {
1163
+ default: s(() => [i(e(q), {
1164
+ modelValue: C.value.userToken,
1165
+ "onUpdate:modelValue": h[2] || (h[2] = (x) => C.value.userToken = x),
1166
+ placeholder: "请输入6位验证码",
1167
+ "max-length": 6,
1168
+ "allow-clear": "",
1169
+ style: {
1170
+ width: "180px"
1171
+ }
1172
+ }, null, 8, ["modelValue"]), i(e(V), {
1173
+ disabled: c.value > 0,
1174
+ loading: p.value,
1175
+ onClick: j
1176
+ }, {
1177
+ default: s(() => [w(R(c.value > 0 ? `${c.value}s 后重发` : "重新发送"), 1)]),
1178
+ _: 1
1179
+ }, 8, ["disabled", "loading"])]),
1180
+ _: 1
1181
+ })]),
1182
+ _: 1
1183
+ }), i(e(A), {
1184
+ field: "password",
1185
+ label: "登录密码",
1186
+ rules: [{
1187
+ required: !0,
1188
+ message: "请输入密码"
1189
+ }]
1190
+ }, {
1191
+ default: s(() => [i(e(Ie), {
1192
+ modelValue: C.value.password,
1193
+ "onUpdate:modelValue": h[3] || (h[3] = (x) => C.value.password = x),
1194
+ placeholder: "请输入您的登录密码",
1195
+ "allow-clear": ""
1196
+ }, null, 8, ["modelValue"])]),
1197
+ _: 1
1198
+ }), i(e(A), {
1199
+ field: "confirmText",
1200
+ label: "请输入「注销」以确认",
1201
+ rules: [{
1202
+ required: !0,
1203
+ message: "请输入确认文字"
1204
+ }, {
1205
+ validator: B
1206
+ }]
1207
+ }, {
1208
+ default: s(() => [i(e(q), {
1209
+ modelValue: C.value.confirmText,
1210
+ "onUpdate:modelValue": h[4] || (h[4] = (x) => C.value.confirmText = x),
1211
+ placeholder: "注销",
1212
+ "allow-clear": ""
1213
+ }, null, 8, ["modelValue"])]),
1214
+ _: 1
1215
+ }, 8, ["rules"]), i(e(A), null, {
1216
+ default: s(() => [i(e(Y), null, {
1217
+ default: s(() => [i(e(V), {
1218
+ onClick: h[5] || (h[5] = (x) => l.value = "check")
1219
+ }, {
1220
+ default: s(() => [...h[10] || (h[10] = [w("取消", -1)])]),
1221
+ _: 1
1222
+ }), i(e(V), {
1223
+ type: "primary",
1224
+ status: "danger",
1225
+ loading: T.value,
1226
+ onClick: he
1227
+ }, {
1228
+ default: s(() => [w(R(T.value ? "注销中..." : "确认注销"), 1)]),
1229
+ _: 1
1230
+ }, 8, ["loading"])]),
1231
+ _: 1
1232
+ })]),
1233
+ _: 1
1234
+ })]),
1235
+ _: 1
1236
+ }, 8, ["model", "size"])], 64)) : l.value === "success" ? (g(), k(e(Ve), {
1237
+ key: 4,
1238
+ status: "success",
1239
+ title: "账号已注销"
1240
+ }, {
1241
+ subtitle: s(() => [...h[11] || (h[11] = [w(" 您的账号已成功注销,感谢您的使用 ", -1)])]),
1242
+ extra: s(() => [i(e(V), {
1243
+ type: "primary",
1244
+ onClick: _e
1245
+ }, {
1246
+ default: s(() => [...h[12] || (h[12] = [w("返回首页", -1)])]),
1247
+ _: 1
1248
+ })]),
1249
+ _: 1
1250
+ })) : S("", !0);
1251
+ }
1252
+ }), ht = /* @__PURE__ */ $(yt, [["__scopeId", "data-v-15e302c7"]]), _t = {
1253
+ class: "content"
1254
+ }, wt = {
1255
+ class: "left"
1256
+ }, kt = {
1257
+ class: "right"
1258
+ }, bt = /* @__PURE__ */ I({
1259
+ __name: "AuthkitAppSetting",
1260
+ emits: ["confirm", "cancel"],
1261
+ setup(r, {
1262
+ expose: a,
1263
+ emit: u
1264
+ }) {
1265
+ const n = u;
1266
+ function o() {
1267
+ n("cancel");
1268
+ }
1269
+ function m() {
1270
+ d.value = !1, n("cancel");
1271
+ }
1272
+ const t = _("large"), l = _(["PersonalInformation"]), y = _([{
1273
+ name: "个人信息",
1274
+ path: "PersonalInformation",
1275
+ meta: {
1276
+ icon: "mingcute:user-edit-fill"
1277
+ },
1278
+ children: []
1279
+ }, {
1280
+ name: "账户管理",
1281
+ path: "AccountManage",
1282
+ meta: {
1283
+ icon: "mingcute:badge-fill"
1284
+ },
1285
+ children: [{
1286
+ name: "邮箱",
1287
+ path: "EmailBinding",
1288
+ meta: {
1289
+ icon: "ic:baseline-email"
1290
+ }
1291
+ }, {
1292
+ name: "密码",
1293
+ path: "SetPassword",
1294
+ meta: {
1295
+ icon: "mdi:password"
1296
+ }
1297
+ }, {
1298
+ name: "注销账号",
1299
+ path: "AccountDelete",
1300
+ meta: {
1301
+ icon: "mdi:account-remove"
1302
+ }
1303
+ }]
1304
+ }, {
1305
+ name: "第三方账户",
1306
+ path: "AccountBinding",
1307
+ meta: {
1308
+ icon: "mingcute:link-fill"
1309
+ },
1310
+ children: [
1311
+ {
1312
+ name: "GitHub",
1313
+ path: "GithubBinding",
1314
+ meta: {
1315
+ icon: "bi:github"
1316
+ }
1317
+ }
1318
+ // {
1319
+ // name: '微信',
1320
+ // icon: 'Menus/Space/Message/NoticeNotifications',
1321
+ // path: 'NoticeNotifications',
1322
+ // },
1323
+ ]
1324
+ }]);
1325
+ function f(v, b) {
1326
+ const U = v.path;
1327
+ console.log(U, b, "lokokoko"), l.value = [U];
1328
+ }
1329
+ const {
1330
+ changeType: p,
1331
+ show: d
1332
+ } = Ne(n);
1333
+ function c(v, b) {
1334
+ console.log(v), d.value = b, p.value = "编辑";
1335
+ }
1336
+ return a({
1337
+ setData: c
1338
+ }), (v, b) => (g(), k(e(me), {
1339
+ visible: e(d),
1340
+ "onUpdate:visible": b[1] || (b[1] = (U) => re(d) ? d.value = U : null),
1341
+ "unmount-on-close": "",
1342
+ "body-class": "AppSettingbodyClass",
1343
+ "mask-closable": !1,
1344
+ footer: !1,
1345
+ width: "700px",
1346
+ onCancel: o
1347
+ }, {
1348
+ title: s(() => [...b[2] || (b[2] = [w(" 系统设置 ", -1)])]),
1349
+ default: s(() => [z("div", _t, [z("div", wt, [i(De, {
1350
+ "selected-keys": l.value,
1351
+ "onUpdate:selectedKeys": b[0] || (b[0] = (U) => l.value = U),
1352
+ menus: y.value,
1353
+ onChange: f
1354
+ }, null, 8, ["selected-keys", "menus"])]), z("div", kt, [l.value[0] === "PersonalInformation" ? (g(), k(Ze, {
1355
+ key: 0,
1356
+ size: t.value
1357
+ }, null, 8, ["size"])) : S("", !0), l.value[0] === "EmailBinding" ? (g(), k(mt, {
1358
+ key: 1,
1359
+ size: t.value
1360
+ }, null, 8, ["size"])) : S("", !0), l.value[0] === "SetPassword" ? (g(), k(nt, {
1361
+ key: 2,
1362
+ size: t.value
1363
+ }, null, 8, ["size"])) : S("", !0), l.value[0] === "GithubBinding" ? (g(), k(ct, {
1364
+ key: 3,
1365
+ size: t.value
1366
+ }, null, 8, ["size"])) : S("", !0), l.value[0] === "AccountDelete" ? (g(), k(ht, {
1367
+ key: 4,
1368
+ size: t.value,
1369
+ onDeleted: m
1370
+ }, null, 8, ["size"])) : S("", !0)])])]),
1371
+ _: 1
1372
+ }, 8, ["visible"]));
1373
+ }
1374
+ }), Vi = /* @__PURE__ */ $(bt, [["__scopeId", "data-v-9f056370"]]);
1375
+ function zt() {
1376
+ pe().then(({
1377
+ data: r
1378
+ }) => {
1379
+ const {
1380
+ redirectUri: a
1381
+ } = r;
1382
+ a ? window.location.href = a : console.error("GitHub OAuth 重定向URL为空");
1383
+ }).catch((r) => {
1384
+ console.error("GitHub OAuth 授权失败:", r);
1385
+ });
1386
+ }
1387
+ function St() {
1388
+ }
1389
+ function At() {
1390
+ }
1391
+ function It() {
1392
+ return {
1393
+ githubAuth: zt,
1394
+ googleAuth: St,
1395
+ microsoftAuth: At
1396
+ };
1397
+ }
1398
+ const te = /* @__PURE__ */ I({
1399
+ __name: "AuthkitOAuthItem",
1400
+ props: {
1401
+ size: {
1402
+ type: String,
1403
+ required: !0
1404
+ },
1405
+ icon: {
1406
+ type: String,
1407
+ required: !0,
1408
+ default: () => ""
1409
+ },
1410
+ label: {
1411
+ type: String,
1412
+ required: !0,
1413
+ default: () => ""
1414
+ }
1415
+ },
1416
+ emits: [],
1417
+ setup(r, {
1418
+ emit: a
1419
+ }) {
1420
+ const u = r;
1421
+ return (n, o) => (g(), k(e(V), {
1422
+ class: "OAuthItem",
1423
+ type: "primary",
1424
+ size: u.size
1425
+ }, {
1426
+ icon: s(() => [i(e(Fe), {
1427
+ icon: u.icon
1428
+ }, null, 8, ["icon"])]),
1429
+ default: s(() => [z("span", null, R(u.label), 1)]),
1430
+ _: 1
1431
+ }, 8, ["size"]));
1432
+ }
1433
+ }), Vt = {
1434
+ class: "OAuthList"
1435
+ }, Pt = {
1436
+ class: "OAuthList"
1437
+ }, Ut = /* @__PURE__ */ I({
1438
+ __name: "AuthkitOAuthList",
1439
+ props: {
1440
+ size: {
1441
+ type: String,
1442
+ default: () => "large"
1443
+ },
1444
+ appId: {
1445
+ type: String,
1446
+ default: () => ""
1447
+ }
1448
+ },
1449
+ setup(r) {
1450
+ const {
1451
+ appsData: a
1452
+ } = le(), u = r, {
1453
+ githubAuth: n,
1454
+ googleAuth: o,
1455
+ microsoftAuth: m
1456
+ } = It(), t = N(() => !(!a.value.oauth.google.enabled && !a.value.oauth.microsoft.enabled && !a.value.oauth.github.enabled && !a.value.oauth.wechat.enabled));
1457
+ return (l, y) => (g(), P("div", Vt, [t.value ? (g(), k(e(Pe), {
1458
+ key: 0,
1459
+ orientation: "center"
1460
+ }, {
1461
+ default: s(() => [...y[0] || (y[0] = [w("OAuth登陆", -1)])]),
1462
+ _: 1
1463
+ })) : S("", !0), z("div", Pt, [e(a).oauth.github.enabled ? (g(), k(te, {
1464
+ key: 0,
1465
+ icon: "mdi:github",
1466
+ label: "Github",
1467
+ size: u.size,
1468
+ onClick: e(n)
1469
+ }, null, 8, ["size", "onClick"])) : S("", !0), e(a).oauth.google.enabled ? (g(), k(te, {
1470
+ key: 1,
1471
+ icon: "mdi:google",
1472
+ label: "Google",
1473
+ size: u.size,
1474
+ onClick: e(o)
1475
+ }, null, 8, ["size", "onClick"])) : S("", !0), e(a).oauth.microsoft.enabled ? (g(), k(te, {
1476
+ key: 2,
1477
+ icon: "mdi:microsoft",
1478
+ label: "Microsoft",
1479
+ size: u.size,
1480
+ onClick: e(m)
1481
+ }, null, 8, ["size", "onClick"])) : S("", !0)])]));
1482
+ }
1483
+ }), Ct = /* @__PURE__ */ $(Ut, [["__scopeId", "data-v-49ca3bca"]]), $t = {
1484
+ class: "content"
1485
+ }, xt = {
1486
+ class: "sendVerifyCodeItem"
1487
+ }, qt = {
1488
+ class: "handle"
1489
+ }, Tt = /* @__PURE__ */ I({
1490
+ __name: "AuthkitPasswordUpdateAndVerify",
1491
+ props: {
1492
+ size: {
1493
+ type: String,
1494
+ required: !0
1495
+ },
1496
+ loading: {
1497
+ type: Boolean,
1498
+ required: !0,
1499
+ default: () => !0
1500
+ }
1501
+ },
1502
+ emits: ["signIn", "submit"],
1503
+ setup(r, {
1504
+ emit: a
1505
+ }) {
1506
+ const u = a, n = r, o = _(), m = _(!1), t = _(), l = _({
1507
+ email: void 0,
1508
+ userToken: void 0,
1509
+ emailVerifyId: void 0,
1510
+ password: void 0,
1511
+ confirmPassword: void 0
1512
+ });
1513
+ async function y() {
1514
+ t.value.validateField(["email"]).then((p) => {
1515
+ p || (m.value = !0, X({
1516
+ email: l.value.email
1517
+ }).then(({
1518
+ data: d
1519
+ }) => {
1520
+ m.value = !1, l.value.emailVerifyId = d.emailVerifyId, o.value.startCountFn();
1521
+ }).catch(() => {
1522
+ m.value = !1;
1523
+ }));
1524
+ });
1525
+ }
1526
+ async function f() {
1527
+ t.value.validate().then((p) => {
1528
+ p || u("submit", l.value);
1529
+ });
1530
+ }
1531
+ return (p, d) => (g(), P("div", $t, [i(e(F), {
1532
+ ref_key: "formRef",
1533
+ ref: t,
1534
+ model: l.value,
1535
+ size: n.size,
1536
+ "auto-label-width": ""
1537
+ }, {
1538
+ default: s(() => [i(e(A), {
1539
+ field: "email",
1540
+ label: "邮箱",
1541
+ "hide-label": "",
1542
+ rules: [{
1543
+ required: !0,
1544
+ message: "请输入邮箱"
1545
+ }, {
1546
+ type: "email",
1547
+ message: "请输入有效的邮箱"
1548
+ }]
1549
+ }, {
1550
+ default: s(() => [i(e(q), {
1551
+ modelValue: l.value.email,
1552
+ "onUpdate:modelValue": d[0] || (d[0] = (c) => l.value.email = c),
1553
+ placeholder: "请输入邮箱"
1554
+ }, null, 8, ["modelValue"])]),
1555
+ _: 1
1556
+ }), i(e(A), {
1557
+ field: "userToken",
1558
+ label: "验证码",
1559
+ "hide-label": "",
1560
+ rules: [{
1561
+ required: !0,
1562
+ message: "请输入验证码"
1563
+ }]
1564
+ }, {
1565
+ default: s(() => [z("div", xt, [i(e(q), {
1566
+ modelValue: l.value.userToken,
1567
+ "onUpdate:modelValue": d[1] || (d[1] = (c) => l.value.userToken = c),
1568
+ placeholder: "请输入验证码"
1569
+ }, null, 8, ["modelValue"]), i(se, {
1570
+ ref_key: "SendVerifyCodeRef",
1571
+ ref: o,
1572
+ size: n.size,
1573
+ loading: m.value,
1574
+ style: {
1575
+ "margin-left": "10px"
1576
+ },
1577
+ onSend: y
1578
+ }, null, 8, ["size", "loading"])])]),
1579
+ _: 1
1580
+ }), i(e(A), {
1581
+ field: "password",
1582
+ label: "密码",
1583
+ "hide-label": "",
1584
+ rules: [{
1585
+ required: !0,
1586
+ message: "密码请输入"
1587
+ }, {
1588
+ minLength: 10,
1589
+ message: "密码不能少于10字符"
1590
+ }]
1591
+ }, {
1592
+ default: s(() => [i(e(q), {
1593
+ modelValue: l.value.password,
1594
+ "onUpdate:modelValue": d[2] || (d[2] = (c) => l.value.password = c),
1595
+ placeholder: "请输入密码",
1596
+ type: "password",
1597
+ autocomplete: ""
1598
+ }, null, 8, ["modelValue"])]),
1599
+ _: 1
1600
+ }), i(e(A), {
1601
+ field: "confirmPassword",
1602
+ label: "确认密码",
1603
+ "hide-label": "",
1604
+ rules: [{
1605
+ required: !0,
1606
+ message: "请输入确认密码"
1607
+ }, {
1608
+ minLength: 10,
1609
+ message: "确认密码不能少于10字符"
1610
+ }, {
1611
+ validator: (c, v) => {
1612
+ c !== l.value.password ? v("两次密码输入不一致,请重新输入") : v();
1613
+ }
1614
+ }]
1615
+ }, {
1616
+ default: s(() => [i(e(q), {
1617
+ modelValue: l.value.confirmPassword,
1618
+ "onUpdate:modelValue": d[3] || (d[3] = (c) => l.value.confirmPassword = c),
1619
+ placeholder: "请输入确认密码密码",
1620
+ type: "password",
1621
+ autocomplete: ""
1622
+ }, null, 8, ["modelValue"])]),
1623
+ _: 1
1624
+ }, 8, ["rules"]), z("div", qt, [i(e(V), {
1625
+ type: "primary",
1626
+ loading: n.loading,
1627
+ long: "",
1628
+ size: n.size,
1629
+ onClick: f
1630
+ }, {
1631
+ default: s(() => [...d[4] || (d[4] = [w(" 提交 ", -1)])]),
1632
+ _: 1
1633
+ }, 8, ["loading", "size"])])]),
1634
+ _: 1
1635
+ }, 8, ["model", "size"])]));
1636
+ }
1637
+ }), Rt = /* @__PURE__ */ $(Tt, [["__scopeId", "data-v-1c83f44a"]]), Lt = {
1638
+ class: "SwitchSignIn"
1639
+ }, Bt = /* @__PURE__ */ I({
1640
+ __name: "AuthkitSwitchSignIn",
1641
+ emits: ["switchSignIn"],
1642
+ setup(r, {
1643
+ emit: a
1644
+ }) {
1645
+ const u = a;
1646
+ function n() {
1647
+ u("switchSignIn");
1648
+ }
1649
+ return (o, m) => (g(), P("div", Lt, [z("span", null, [m[1] || (m[1] = z("span", null, "已经有账号?", -1)), i(e(H), {
1650
+ style: {
1651
+ padding: "0px"
1652
+ },
1653
+ onClick: n
1654
+ }, {
1655
+ default: s(() => [...m[0] || (m[0] = [w("去登陆", -1)])]),
1656
+ _: 1
1657
+ })])]));
1658
+ }
1659
+ }), ve = /* @__PURE__ */ $(Bt, [["__scopeId", "data-v-fc1d3903"]]), Et = {
1660
+ class: "ResetPassword"
1661
+ }, Ot = /* @__PURE__ */ I({
1662
+ __name: "AuthkitResetPassword",
1663
+ props: {
1664
+ size: {
1665
+ type: String,
1666
+ required: !0,
1667
+ default: () => "large"
1668
+ },
1669
+ loading: {
1670
+ type: Boolean,
1671
+ required: !0,
1672
+ default: () => !0
1673
+ }
1674
+ },
1675
+ emits: ["switchSignIn", "submit"],
1676
+ setup(r, {
1677
+ emit: a
1678
+ }) {
1679
+ const u = a, n = r;
1680
+ function o() {
1681
+ u("switchSignIn");
1682
+ }
1683
+ async function m(t) {
1684
+ u("submit", t);
1685
+ }
1686
+ return (t, l) => (g(), P("div", Et, [i(Rt, {
1687
+ loading: r.loading,
1688
+ size: n.size,
1689
+ onSubmit: m
1690
+ }, null, 8, ["loading", "size"]), i(ve, {
1691
+ onSwitchSignIn: o
1692
+ })]));
1693
+ }
1694
+ }), Dt = /* @__PURE__ */ $(Ot, [["__scopeId", "data-v-0622cbe3"]]), Nt = {
1695
+ class: "ServiceAgreementAndPrivacyProtection"
1696
+ }, Ft = /* @__PURE__ */ I({
1697
+ __name: "AuthkitServiceAgreementAndPrivacyProtection",
1698
+ emits: ["toUserServiceAgreement", "toPrivacyPolicy"],
1699
+ setup(r, {
1700
+ emit: a
1701
+ }) {
1702
+ const u = a;
1703
+ function n() {
1704
+ u("toUserServiceAgreement");
1705
+ }
1706
+ function o() {
1707
+ u("toPrivacyPolicy");
1708
+ }
1709
+ return (m, t) => (g(), P("div", Nt, [t[2] || (t[2] = z("span", null, " 注册登陆即表示同意", -1)), i(e(H), {
1710
+ onClick: n
1711
+ }, {
1712
+ default: s(() => [...t[0] || (t[0] = [w("用户服务协议", -1)])]),
1713
+ _: 1
1714
+ }), t[3] || (t[3] = z("span", null, " 和 ", -1)), i(e(H), {
1715
+ onClick: o
1716
+ }, {
1717
+ default: s(() => [...t[1] || (t[1] = [w("隐私协议", -1)])]),
1718
+ _: 1
1719
+ })]));
1720
+ }
1721
+ }), Gt = /* @__PURE__ */ $(Ft, [["__scopeId", "data-v-18e831ec"]]), Ht = {
1722
+ class: "content"
1723
+ }, Mt = {
1724
+ class: "handle"
1725
+ }, jt = /* @__PURE__ */ I({
1726
+ __name: "AuthkitPasswordAuth",
1727
+ props: {
1728
+ size: {
1729
+ type: String,
1730
+ required: !0
1731
+ },
1732
+ loading: {
1733
+ type: Boolean,
1734
+ required: !0,
1735
+ default: () => !0
1736
+ }
1737
+ },
1738
+ emits: ["submit"],
1739
+ setup(r, {
1740
+ emit: a
1741
+ }) {
1742
+ const u = a, n = r;
1743
+ async function o(y, f) {
1744
+ const p = await Qe({
1745
+ password: y
1746
+ });
1747
+ p || f("密码验证请求出错!");
1748
+ const {
1749
+ isValidate: d,
1750
+ message: c
1751
+ } = p.data;
1752
+ d || f(c), f();
1753
+ }
1754
+ const m = _(), t = _({
1755
+ email: void 0,
1756
+ password: void 0
1757
+ });
1758
+ async function l() {
1759
+ m.value.validate().then((y) => {
1760
+ y || u("submit", t.value);
1761
+ });
1762
+ }
1763
+ return (y, f) => (g(), P("div", Ht, [i(e(F), {
1764
+ ref_key: "formRef",
1765
+ ref: m,
1766
+ model: t.value,
1767
+ size: n.size,
1768
+ "auto-label-width": ""
1769
+ }, {
1770
+ default: s(() => [i(e(A), {
1771
+ field: "email",
1772
+ label: "邮箱",
1773
+ "hide-label": "",
1774
+ rules: [{
1775
+ required: !0,
1776
+ message: "请输入邮箱"
1777
+ }, {
1778
+ type: "email",
1779
+ message: "请输入有效的邮箱"
1780
+ }]
1781
+ }, {
1782
+ default: s(() => [i(e(q), {
1783
+ modelValue: t.value.email,
1784
+ "onUpdate:modelValue": f[0] || (f[0] = (p) => t.value.email = p),
1785
+ placeholder: "请输入邮箱",
1786
+ autocomplete: "email username",
1787
+ type: "email"
1788
+ }, null, 8, ["modelValue"])]),
1789
+ _: 1
1790
+ }), i(e(A), {
1791
+ field: "password",
1792
+ label: "密码",
1793
+ "hide-label": "",
1794
+ rules: [{
1795
+ required: !0,
1796
+ message: "请输入密码"
1797
+ }, {
1798
+ validator: o
1799
+ }]
1800
+ }, {
1801
+ default: s(() => [i(e(q), {
1802
+ modelValue: t.value.password,
1803
+ "onUpdate:modelValue": f[1] || (f[1] = (p) => t.value.password = p),
1804
+ placeholder: "请输入密码",
1805
+ type: "password",
1806
+ autocomplete: "current-password"
1807
+ }, null, 8, ["modelValue"])]),
1808
+ _: 1
1809
+ }, 8, ["rules"]), z("div", Mt, [i(e(V), {
1810
+ type: "primary",
1811
+ loading: n.loading,
1812
+ long: "",
1813
+ size: n.size,
1814
+ onClick: l
1815
+ }, {
1816
+ default: s(() => [...f[2] || (f[2] = [w(" 登陆 ", -1)])]),
1817
+ _: 1
1818
+ }, 8, ["loading", "size"])])]),
1819
+ _: 1
1820
+ }, 8, ["model", "size"])]));
1821
+ }
1822
+ }), Wt = /* @__PURE__ */ $(jt, [["__scopeId", "data-v-76d6bc26"]]), Kt = {
1823
+ class: "SwitchSignUpOrResetPassword"
1824
+ }, Zt = /* @__PURE__ */ I({
1825
+ __name: "AuthkitSwitchSignUpOrResetPassword",
1826
+ emits: ["switchSignUp", "switchResetPassword"],
1827
+ setup(r, {
1828
+ emit: a
1829
+ }) {
1830
+ const u = a;
1831
+ function n() {
1832
+ u("switchSignUp");
1833
+ }
1834
+ function o() {
1835
+ u("switchResetPassword");
1836
+ }
1837
+ return (m, t) => (g(), P("div", Kt, [z("span", null, [t[1] || (t[1] = z("span", null, " 还没有账户?", -1)), i(e(H), {
1838
+ style: {
1839
+ padding: "0px"
1840
+ },
1841
+ onClick: n
1842
+ }, {
1843
+ default: s(() => [...t[0] || (t[0] = [w("去注册?", -1)])]),
1844
+ _: 1
1845
+ })]), i(e(H), {
1846
+ style: {
1847
+ padding: "0px"
1848
+ },
1849
+ onClick: o
1850
+ }, {
1851
+ default: s(() => [...t[2] || (t[2] = [w(" 忘记密码?", -1)])]),
1852
+ _: 1
1853
+ })]));
1854
+ }
1855
+ }), Jt = /* @__PURE__ */ $(Zt, [["__scopeId", "data-v-14e3aab2"]]), Qt = {
1856
+ class: "SignIn"
1857
+ }, Xt = /* @__PURE__ */ I({
1858
+ __name: "AuthkitSignIn",
1859
+ props: {
1860
+ size: {
1861
+ type: String,
1862
+ required: !0
1863
+ },
1864
+ loading: {
1865
+ type: Boolean,
1866
+ required: !0,
1867
+ default: () => !0
1868
+ }
1869
+ },
1870
+ emits: ["submit", "switchSignUp", "switchResetPassword"],
1871
+ setup(r, {
1872
+ emit: a
1873
+ }) {
1874
+ const u = a, n = r, o = Se(), m = N(() => !!o.OAuth);
1875
+ function t() {
1876
+ u("switchSignUp");
1877
+ }
1878
+ function l() {
1879
+ u("switchResetPassword");
1880
+ }
1881
+ async function y(f) {
1882
+ u("submit", f);
1883
+ }
1884
+ return (f, p) => (g(), P("div", Qt, [S("", !0), i(Wt, {
1885
+ loading: n.loading,
1886
+ size: n.size,
1887
+ onSubmit: y
1888
+ }, null, 8, ["loading", "size"]), m.value ? ue(f.$slots, "OAuth", {
1889
+ key: 1
1890
+ }, void 0, !0) : S("", !0), i(Jt, {
1891
+ onSwitchSignUp: t,
1892
+ onSwitchResetPassword: l
1893
+ })]));
1894
+ }
1895
+ }), Yt = /* @__PURE__ */ $(Xt, [["__scopeId", "data-v-f52ce3b3"]]), ei = {
1896
+ class: "SignUp"
1897
+ }, ti = /* @__PURE__ */ I({
1898
+ __name: "AuthkitSignUp",
1899
+ props: {
1900
+ size: {
1901
+ type: String,
1902
+ required: !0
1903
+ },
1904
+ loading: {
1905
+ type: Boolean,
1906
+ required: !0,
1907
+ default: () => !0
1908
+ }
1909
+ },
1910
+ emits: ["switchSignIn", "submit"],
1911
+ setup(r, {
1912
+ emit: a
1913
+ }) {
1914
+ const u = a, n = r;
1915
+ function o() {
1916
+ u("switchSignIn");
1917
+ }
1918
+ async function m(t) {
1919
+ u("submit", t);
1920
+ }
1921
+ return (t, l) => (g(), P("div", ei, [i(fe, {
1922
+ size: n.size,
1923
+ loading: r.loading,
1924
+ onSubmit: m
1925
+ }, null, 8, ["size", "loading"]), i(ve, {
1926
+ onSwitchSignIn: o
1927
+ })]));
1928
+ }
1929
+ }), ii = /* @__PURE__ */ $(ti, [["__scopeId", "data-v-058bbbef"]]), li = ["src"], si = /* @__PURE__ */ I({
1930
+ __name: "AuthkitAuthTitle",
1931
+ props: {
1932
+ size: {
1933
+ type: [String, Number],
1934
+ required: !1,
1935
+ default: 30
1936
+ },
1937
+ fontSize: {
1938
+ type: Number,
1939
+ required: !1,
1940
+ default: 18
1941
+ },
1942
+ lineHeight: {
1943
+ type: Number,
1944
+ required: !1,
1945
+ default: 60
1946
+ }
1947
+ },
1948
+ setup(r) {
1949
+ const a = r, u = `${a.size}px`, n = `${a.fontSize}px`, o = `${a.lineHeight}px`, {
1950
+ currentView: m
1951
+ } = Q(), {
1952
+ appsData: t
1953
+ } = le(), l = N(() => m.value === "signIn" ? `${t.value.name}登录` : m.value === "signUp" ? `${t.value.name}账号注册` : m.value === "resetPassword" ? `${t.value.name}密码重置` : "");
1954
+ return (y, f) => (g(), P("div", {
1955
+ class: "Title",
1956
+ style: ie({
1957
+ fontSize: n,
1958
+ lineHeight: o
1959
+ })
1960
+ }, [e(t).applicationLogoUrl ? (g(), P("img", {
1961
+ key: 0,
1962
+ src: e(t).applicationLogoUrl,
1963
+ srcset: "",
1964
+ style: ie({
1965
+ width: u
1966
+ })
1967
+ }, null, 12, li)) : S("", !0), z("span", null, R(l.value), 1), ue(y.$slots, "default", {}, void 0, !0)], 4));
1968
+ }
1969
+ }), ge = /* @__PURE__ */ $(si, [["__scopeId", "data-v-5576db64"]]), ni = {
1970
+ class: "Auth"
1971
+ }, ai = {
1972
+ class: "body"
1973
+ }, oi = /* @__PURE__ */ I({
1974
+ __name: "AuthkitAuth",
1975
+ props: {
1976
+ size: {
1977
+ type: String,
1978
+ required: !0
1979
+ },
1980
+ showTitle: {
1981
+ type: Boolean,
1982
+ default: () => !0
1983
+ }
1984
+ },
1985
+ emits: ["toPrivacyPolicy", "toUserServiceAgreement"],
1986
+ setup(r, {
1987
+ emit: a
1988
+ }) {
1989
+ const u = r, n = a, {
1990
+ signInSubmit: o,
1991
+ signUpSubmit: m,
1992
+ resetPasswordSubmit: t,
1993
+ currentView: l,
1994
+ authSignInLoading: y,
1995
+ authSignUpLoading: f,
1996
+ resetPasswordLoading: p,
1997
+ switchSignUp: d,
1998
+ switchResetPassword: c,
1999
+ switchSignIn: v
2000
+ } = Q(), {
2001
+ appsAuthPageInfoApi: b
2002
+ } = le();
2003
+ function U() {
2004
+ n("toPrivacyPolicy");
2005
+ }
2006
+ function C() {
2007
+ n("toUserServiceAgreement");
2008
+ }
2009
+ return b(), (T, B) => (g(), P("div", ni, [r.showTitle ? (g(), k(ge, {
2010
+ key: 0,
2011
+ size: 32,
2012
+ "font-size": 20
2013
+ })) : S("", !0), z("div", ai, [e(l) === "signIn" ? (g(), k(Yt, {
2014
+ key: 0,
2015
+ size: u.size,
2016
+ loading: e(y),
2017
+ onSwitchSignUp: e(d),
2018
+ onSwitchResetPassword: e(c),
2019
+ onSubmit: B[0] || (B[0] = (E) => e(o)(E))
2020
+ }, {
2021
+ OAuth: s(() => [i(Ct, {
2022
+ size: u.size
2023
+ }, null, 8, ["size"])]),
2024
+ _: 1
2025
+ }, 8, ["size", "loading", "onSwitchSignUp", "onSwitchResetPassword"])) : e(l) === "signUp" ? (g(), k(ii, {
2026
+ key: 1,
2027
+ size: u.size,
2028
+ loading: e(f),
2029
+ onSwitchSignIn: e(v),
2030
+ onSubmit: B[1] || (B[1] = (E) => e(m)(E))
2031
+ }, null, 8, ["size", "loading", "onSwitchSignIn"])) : e(l) === "resetPassword" ? (g(), k(Dt, {
2032
+ key: 2,
2033
+ size: u.size,
2034
+ loading: e(p),
2035
+ onSwitchSignIn: e(v),
2036
+ onSubmit: B[2] || (B[2] = (E) => e(t)(E))
2037
+ }, null, 8, ["size", "loading", "onSwitchSignIn"])) : S("", !0), i(Gt, {
2038
+ onToPrivacyPolicy: U,
2039
+ onToUserServiceAgreement: C
2040
+ })])]));
2041
+ }
2042
+ }), ri = /* @__PURE__ */ $(oi, [["__scopeId", "data-v-186d2441"]]), ui = /* @__PURE__ */ I({
2043
+ __name: "AuthkitAuthModal",
2044
+ props: {
2045
+ size: {
2046
+ type: String,
2047
+ required: !0
2048
+ },
2049
+ appId: {
2050
+ type: String,
2051
+ default: () => ""
2052
+ }
2053
+ },
2054
+ emits: ["confirm", "close", "toPrivacyPolicy", "toUserServiceAgreement"],
2055
+ setup(r, {
2056
+ emit: a
2057
+ }) {
2058
+ const {
2059
+ addSignInCallback: u
2060
+ } = Q(), {
2061
+ show: n
2062
+ } = Ue(), o = r, m = a;
2063
+ function t(y) {
2064
+ y(!0);
2065
+ }
2066
+ function l() {
2067
+ n.value = !1, m("close");
2068
+ }
2069
+ return u(() => {
2070
+ n.value = !1;
2071
+ }), (y, f) => (g(), k(e(me), {
2072
+ visible: e(n),
2073
+ "onUpdate:visible": f[2] || (f[2] = (p) => re(n) ? n.value = p : null),
2074
+ footer: !1,
2075
+ "mask-closable": !1,
2076
+ "title-align": "center",
2077
+ "unmount-on-close": "",
2078
+ width: "auto",
2079
+ "modal-class": "SignInModalClass",
2080
+ onBeforeOk: t,
2081
+ onClose: l
2082
+ }, {
2083
+ title: s(() => [i(ge)]),
2084
+ default: s(() => [i(ri, {
2085
+ "show-title": !1,
2086
+ size: o.size,
2087
+ onToPrivacyPolicy: f[0] || (f[0] = (p) => m("toPrivacyPolicy")),
2088
+ onToUserServiceAgreement: f[1] || (f[1] = (p) => m("toUserServiceAgreement"))
2089
+ }, null, 8, ["size"])]),
2090
+ _: 1
2091
+ }, 8, ["visible"]));
2092
+ }
2093
+ }), Pi = /* @__PURE__ */ $(ui, [["__scopeId", "data-v-6fbefff8"]]);
2094
+ export {
2095
+ Vi as A,
2096
+ fe as E,
2097
+ Ct as O,
2098
+ Rt as P,
2099
+ Dt as R,
2100
+ se as S,
2101
+ te as _,
2102
+ ri as a,
2103
+ ge as b,
2104
+ Pi as c,
2105
+ Yt as d,
2106
+ ii as e,
2107
+ Wt as f,
2108
+ ve as g,
2109
+ Jt as h,
2110
+ Gt as i,
2111
+ Ze as j,
2112
+ ne as k,
2113
+ ct as l,
2114
+ nt as m,
2115
+ mt as n,
2116
+ st as o
2117
+ };