@yourgoods/ui-smart 0.46.6 → 0.46.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/{ProfileEmailDialog-Cwnt9uWm.js → ProfileEmailDialog-D7OoILE6.js} +98 -99
- package/dist/{ProfilePasswordDialog-BxLfRPXi.js → ProfilePasswordDialog-Hibce_6h.js} +1 -1
- package/dist/{ProfilePhoneDialog-BmTMMKvs.js → ProfilePhoneDialog-Cm_s-YCX.js} +80 -80
- package/dist/{index-DW7ADhQu.js → index-DgXqm9qe.js} +3 -3
- package/dist/index.js +1 -1
- package/dist/{useRateLimitToast-Ml1JyBMo.js → useRateLimitToast-gpF7vjbF.js} +1 -1
- package/package.json +1 -1
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { defineComponent as ie, ref as x, reactive as Z, watch as Y, computed as V, toRefs as ce, createElementBlock as I, openBlock as w, createElementVNode as B, createCommentVNode as D, toDisplayString as ee, createVNode as $, unref as u, isRef as te, withCtx as G, createTextVNode as ne, Fragment as
|
|
2
|
-
import { T as ve, c as $e, u as
|
|
3
|
-
import { C as R, _ as
|
|
4
|
-
import { PInput as J, IconMailMd as pe, PButton as se, IconEyeMd as Me, IconEyeClosedMd as be, PDialog as
|
|
5
|
-
const
|
|
1
|
+
import { defineComponent as ie, ref as x, reactive as Z, watch as Y, computed as V, toRefs as ce, createElementBlock as I, openBlock as w, createElementVNode as B, createCommentVNode as D, toDisplayString as ee, createVNode as $, unref as u, isRef as te, withCtx as G, createTextVNode as ne, Fragment as Ae, createBlock as _, resolveDynamicComponent as he, onMounted as Fe } from "vue";
|
|
2
|
+
import { T as ve, c as $e, u as Re, a as ze, P as Te, b as We } from "./useRateLimitToast-gpF7vjbF.js";
|
|
3
|
+
import { C as R, _ as He, B as _e, p as H, g as qe } from "./index-DgXqm9qe.js";
|
|
4
|
+
import { PInput as J, IconMailMd as pe, PButton as se, IconEyeMd as Me, IconEyeClosedMd as be, PDialog as je, PTopBar as Ge, IconCrossMd as Ye } from "@profeat/ui-kit";
|
|
5
|
+
const Je = { class: "dialogDefaultContainerInsideContent" }, Ke = { class: "dialogDefaultContainerTextHint" }, Qe = {
|
|
6
6
|
key: 0,
|
|
7
7
|
class: "input-wrapper"
|
|
8
|
-
},
|
|
8
|
+
}, Xe = {
|
|
9
9
|
key: 1,
|
|
10
10
|
class: "input-wrapper"
|
|
11
|
-
},
|
|
11
|
+
}, Ze = {
|
|
12
12
|
key: 2,
|
|
13
13
|
class: "input-wrapper"
|
|
14
|
-
},
|
|
14
|
+
}, et = { key: 3 }, tt = /* @__PURE__ */ ie({
|
|
15
15
|
__name: "AddNewEmailContent",
|
|
16
16
|
props: {
|
|
17
17
|
email: {},
|
|
@@ -45,7 +45,7 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
45
45
|
n.touched[p] = !0;
|
|
46
46
|
}, d = (p) => n.touched[p] = !1, r = () => {
|
|
47
47
|
e.value = "", d("email");
|
|
48
|
-
}, T = V(() => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(n.emailModel.trim())),
|
|
48
|
+
}, T = V(() => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(n.emailModel.trim())), O = V(() => !T.value || !!e.value), L = async () => {
|
|
49
49
|
var p;
|
|
50
50
|
try {
|
|
51
51
|
if (h("email"), !T.value) {
|
|
@@ -66,12 +66,11 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
66
66
|
console.error("Неизвестная ошибка при проверке доступности email:", a), e.value = "Это не похоже на e-mail";
|
|
67
67
|
}
|
|
68
68
|
};
|
|
69
|
-
let
|
|
69
|
+
let U = "";
|
|
70
70
|
const C = (p) => {
|
|
71
|
-
s("on-clear-code-error");
|
|
72
71
|
const a = p.target;
|
|
73
72
|
let i = a.value.replace(/\D/g, "");
|
|
74
|
-
i.length > 4 && (i = i.slice(0, 4)), a.value = i, n.codeModel = i, i.length === 4 && i !==
|
|
73
|
+
i.length <= 4 && s("on-clear-code-error"), i.length > 4 && (i = i.slice(0, 4)), a.value = i, n.codeModel = i, i.length === 4 && i !== U && (U = i, s("on-match-code", { email: n.emailModel, code: i }));
|
|
75
74
|
}, c = () => {
|
|
76
75
|
s("on-send-code-again", { email: n.emailModel });
|
|
77
76
|
}, b = V(() => {
|
|
@@ -81,12 +80,12 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
81
80
|
if (!T.value) return "Это не похоже на e-mail";
|
|
82
81
|
}
|
|
83
82
|
return v.emailError || "";
|
|
84
|
-
}), M = V(() => v.isNotMatchCode ? "Неверный код" : n.touched.code ?
|
|
83
|
+
}), M = V(() => v.isNotMatchCode ? "Неверный код" : n.touched.code ? A.value.trim() ? v.codeError ?? null : "Введите код" : ""), { emailModel: P, codeModel: A } = ce(n);
|
|
85
84
|
return (p, a) => {
|
|
86
85
|
const i = ve;
|
|
87
|
-
return w(), I("div",
|
|
88
|
-
B("div",
|
|
89
|
-
p.showEmail ? (w(), I("div",
|
|
86
|
+
return w(), I("div", Je, [
|
|
87
|
+
B("div", Ke, ee(m.value ? "Введите код подтверждения" : p.hintText), 1),
|
|
88
|
+
p.showEmail ? (w(), I("div", Qe, [
|
|
90
89
|
$(u(J), {
|
|
91
90
|
modelValue: u(P),
|
|
92
91
|
"onUpdate:modelValue": a[0] || (a[0] = (y) => te(P) ? P.value = y : null),
|
|
@@ -103,10 +102,10 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
103
102
|
onClick: a[2] || (a[2] = (y) => p.$emit("edit", "email"))
|
|
104
103
|
})
|
|
105
104
|
])) : D("", !0),
|
|
106
|
-
m.value ? D("", !0) : (w(), I("div",
|
|
105
|
+
m.value ? D("", !0) : (w(), I("div", Xe, [
|
|
107
106
|
$(u(se), {
|
|
108
107
|
style: { width: "100%" },
|
|
109
|
-
disabled:
|
|
108
|
+
disabled: O.value,
|
|
110
109
|
onClick: L
|
|
111
110
|
}, {
|
|
112
111
|
default: G(() => a[5] || (a[5] = [
|
|
@@ -116,10 +115,10 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
116
115
|
__: [5]
|
|
117
116
|
}, 8, ["disabled"])
|
|
118
117
|
])),
|
|
119
|
-
m.value ? (w(), I("div",
|
|
118
|
+
m.value ? (w(), I("div", Ze, [
|
|
120
119
|
$(u(J), {
|
|
121
|
-
modelValue: u(
|
|
122
|
-
"onUpdate:modelValue": a[3] || (a[3] = (y) => te(
|
|
120
|
+
modelValue: u(A),
|
|
121
|
+
"onUpdate:modelValue": a[3] || (a[3] = (y) => te(A) ? A.value = y : null),
|
|
123
122
|
size: "large",
|
|
124
123
|
"text-size": "medium",
|
|
125
124
|
label: "Код",
|
|
@@ -129,7 +128,7 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
129
128
|
onBlur: a[4] || (a[4] = (y) => h("code"))
|
|
130
129
|
}, null, 8, ["modelValue", "error"])
|
|
131
130
|
])) : D("", !0),
|
|
132
|
-
!p.loading && m.value ? (w(), I("div",
|
|
131
|
+
!p.loading && m.value ? (w(), I("div", et, [
|
|
133
132
|
$(i, {
|
|
134
133
|
loading: p.loading,
|
|
135
134
|
"rate-limit-text": p.rateLimitText,
|
|
@@ -140,10 +139,10 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
140
139
|
]);
|
|
141
140
|
};
|
|
142
141
|
}
|
|
143
|
-
}),
|
|
142
|
+
}), at = { class: "dialogDefaultContainer" }, lt = { class: "dialogDefaultContainerInsideContent" }, ot = { class: "input-wrapper" }, it = { class: "input-wrapper" }, nt = { style: { width: "100%", display: "flex" } }, st = {
|
|
144
143
|
key: 0,
|
|
145
144
|
class: "dialogDefaultContainer"
|
|
146
|
-
},
|
|
145
|
+
}, dt = { class: "dialogDefaultContainerInsideContent" }, rt = { style: { "margin-top": "12px" } }, Ve = 8, ut = /* @__PURE__ */ ie({
|
|
147
146
|
__name: "AddNewPasswordContent",
|
|
148
147
|
props: {
|
|
149
148
|
modelValue: { type: Boolean },
|
|
@@ -156,20 +155,20 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
156
155
|
const v = W, s = x(!1), m = x(""), e = x(""), n = Z({
|
|
157
156
|
newPassword: !1,
|
|
158
157
|
newPasswordConfirm: !1
|
|
159
|
-
}), h = x(R.NEW), d = x(!1), r = x(!1), T = V(() => d.value ? "text" : "password"),
|
|
158
|
+
}), h = x(R.NEW), d = x(!1), r = x(!1), T = V(() => d.value ? "text" : "password"), O = V(() => r.value ? "text" : "password"), L = () => {
|
|
160
159
|
d.value = !d.value;
|
|
161
|
-
},
|
|
160
|
+
}, U = () => {
|
|
162
161
|
r.value = !r.value;
|
|
163
162
|
}, C = V(() => n.newPassword ? m.value.trim() ? m.value.trim().length < Ve ? `Пароль слишком короткий. Введите хотя бы ${Ve} символов` : "" : "Введите пароль" : ""), c = V(() => n.newPasswordConfirm ? e.value.trim() ? e.value !== m.value ? "Пароли не совпадают" : "" : "Повторите пароль" : ""), b = V(() => !!(C.value || c.value)), M = V(() => s.value || !m.value.trim() || !e.value.trim() ? !0 : b.value), P = () => {
|
|
164
163
|
v("update:modelValue", !1), v("close");
|
|
165
|
-
},
|
|
164
|
+
}, A = async () => {
|
|
166
165
|
v("update-user", m.value);
|
|
167
166
|
};
|
|
168
|
-
return (p, a) => (w(), I(
|
|
169
|
-
B("div",
|
|
170
|
-
B("div",
|
|
167
|
+
return (p, a) => (w(), I(Ae, null, [
|
|
168
|
+
B("div", at, [
|
|
169
|
+
B("div", lt, [
|
|
171
170
|
a[7] || (a[7] = B("div", { class: "dialogDefaultContainerTextHint" }, ee("Установите новый пароль для защиты аккаунта. Пароль должен содержать не менее 8 символов."), -1)),
|
|
172
|
-
B("div",
|
|
171
|
+
B("div", ot, [
|
|
173
172
|
$(u(J), {
|
|
174
173
|
modelValue: m.value,
|
|
175
174
|
"onUpdate:modelValue": a[0] || (a[0] = (i) => m.value = i),
|
|
@@ -186,28 +185,28 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
186
185
|
onClick: L
|
|
187
186
|
}))
|
|
188
187
|
]),
|
|
189
|
-
B("div",
|
|
188
|
+
B("div", it, [
|
|
190
189
|
$(u(J), {
|
|
191
190
|
modelValue: e.value,
|
|
192
191
|
"onUpdate:modelValue": a[3] || (a[3] = (i) => e.value = i),
|
|
193
192
|
size: "large",
|
|
194
193
|
"text-size": "medium",
|
|
195
194
|
label: "Повторите новый пароль",
|
|
196
|
-
type:
|
|
195
|
+
type: O.value,
|
|
197
196
|
error: c.value,
|
|
198
197
|
onBlur: a[4] || (a[4] = () => n.newPasswordConfirm = !0),
|
|
199
198
|
onInput: a[5] || (a[5] = () => n.newPasswordConfirm = !0)
|
|
200
199
|
}, null, 8, ["modelValue", "type", "error"]),
|
|
201
200
|
(w(), _(he(r.value ? u(Me) : u(be)), {
|
|
202
201
|
class: "icon-locked",
|
|
203
|
-
onClick:
|
|
202
|
+
onClick: U
|
|
204
203
|
}))
|
|
205
204
|
]),
|
|
206
|
-
B("div",
|
|
205
|
+
B("div", nt, [
|
|
207
206
|
$(u(se), {
|
|
208
207
|
style: { width: "100%" },
|
|
209
208
|
disabled: M.value,
|
|
210
|
-
onClick:
|
|
209
|
+
onClick: A
|
|
211
210
|
}, {
|
|
212
211
|
default: G(() => a[6] || (a[6] = [
|
|
213
212
|
ne(ee("Сохранить"))
|
|
@@ -218,10 +217,10 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
218
217
|
])
|
|
219
218
|
])
|
|
220
219
|
]),
|
|
221
|
-
h.value === u(R).COMPLETED ? (w(), I("div",
|
|
222
|
-
B("div",
|
|
220
|
+
h.value === u(R).COMPLETED ? (w(), I("div", st, [
|
|
221
|
+
B("div", dt, [
|
|
223
222
|
a[9] || (a[9] = B("p", null, "Пароль успешно установлен", -1)),
|
|
224
|
-
B("div",
|
|
223
|
+
B("div", rt, [
|
|
225
224
|
$(u(se), {
|
|
226
225
|
style: { width: "100%" },
|
|
227
226
|
onClick: P
|
|
@@ -237,13 +236,13 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
237
236
|
])) : D("", !0)
|
|
238
237
|
], 64));
|
|
239
238
|
}
|
|
240
|
-
}),
|
|
239
|
+
}), mt = { class: "dialogDefaultContainerInsideContent" }, ct = { class: "dialogDefaultContainerTextHint" }, vt = {
|
|
241
240
|
key: 0,
|
|
242
241
|
class: "input-wrapper"
|
|
243
|
-
},
|
|
242
|
+
}, pt = {
|
|
244
243
|
key: 1,
|
|
245
244
|
class: "input-wrapper"
|
|
246
|
-
},
|
|
245
|
+
}, ft = /* @__PURE__ */ ie({
|
|
247
246
|
__name: "OldEmailContent",
|
|
248
247
|
props: {
|
|
249
248
|
email: {},
|
|
@@ -284,12 +283,12 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
284
283
|
b.length > 4 && (b = b.slice(0, 4)), T.value = b, c && c.value !== b && (c.value = b), b.length === 4 && b !== n.value && (n.value = b, s("on-match-code", { email: r.value, code: b }));
|
|
285
284
|
}, d = () => {
|
|
286
285
|
s("on-send-code-again", { email: r.value });
|
|
287
|
-
}, { emailModel: r, codeModel: T, touched:
|
|
286
|
+
}, { emailModel: r, codeModel: T, touched: O } = ce(m), L = V(() => O.value.email && !r.value.trim() ? "Введите e-mail" : v.emailError), U = V(() => v.isNotMatchCode ? "Неверный код" : O.value.code ? T.value.trim() ? v.codeError ?? null : "Введите код" : "");
|
|
288
287
|
return (C, c) => {
|
|
289
288
|
const b = ve;
|
|
290
|
-
return w(), I("div",
|
|
291
|
-
B("div",
|
|
292
|
-
C.showEmail ? (w(), I("div",
|
|
289
|
+
return w(), I("div", mt, [
|
|
290
|
+
B("div", ct, ee(C.hintText), 1),
|
|
291
|
+
C.showEmail ? (w(), I("div", vt, [
|
|
293
292
|
$(u(J), {
|
|
294
293
|
modelValue: u(r),
|
|
295
294
|
"onUpdate:modelValue": c[0] || (c[0] = (M) => te(r) ? r.value = M : null),
|
|
@@ -307,7 +306,7 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
307
306
|
onClick: c[3] || (c[3] = (M) => C.$emit("edit", "email"))
|
|
308
307
|
})
|
|
309
308
|
])) : D("", !0),
|
|
310
|
-
C.showCode ? (w(), I("div",
|
|
309
|
+
C.showCode ? (w(), I("div", pt, [
|
|
311
310
|
$(u(J), {
|
|
312
311
|
modelValue: u(T),
|
|
313
312
|
"onUpdate:modelValue": c[4] || (c[4] = (M) => te(T) ? T.value = M : null),
|
|
@@ -315,7 +314,7 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
315
314
|
"text-size": "medium",
|
|
316
315
|
label: "Код",
|
|
317
316
|
type: "text",
|
|
318
|
-
error:
|
|
317
|
+
error: U.value,
|
|
319
318
|
onInput: h,
|
|
320
319
|
onBlur: c[5] || (c[5] = (M) => e("code"))
|
|
321
320
|
}, null, 8, ["modelValue", "error"])
|
|
@@ -329,16 +328,16 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
329
328
|
]);
|
|
330
329
|
};
|
|
331
330
|
}
|
|
332
|
-
}),
|
|
331
|
+
}), Et = /* @__PURE__ */ He(ft, [["__scopeId", "data-v-5e561fbe"]]), wt = { class: "dialogDefaultContainerInsideContent" }, Ct = { class: "dialogDefaultContainerTextHint" }, yt = {
|
|
333
332
|
key: 0,
|
|
334
333
|
class: "input-wrapper"
|
|
335
|
-
},
|
|
334
|
+
}, gt = {
|
|
336
335
|
key: 1,
|
|
337
336
|
class: "input-wrapper"
|
|
338
|
-
},
|
|
337
|
+
}, ht = {
|
|
339
338
|
key: 2,
|
|
340
339
|
class: "input-wrapper"
|
|
341
|
-
},
|
|
340
|
+
}, Tt = { key: 3 }, Mt = /* @__PURE__ */ ie({
|
|
342
341
|
__name: "NewEmailContent",
|
|
343
342
|
props: {
|
|
344
343
|
email: {},
|
|
@@ -370,7 +369,7 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
370
369
|
);
|
|
371
370
|
const h = (a) => n.touched[a] = !0, d = (a) => n.touched[a] = !1, r = () => {
|
|
372
371
|
e.value = "", d("email");
|
|
373
|
-
}, T = V(() => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(n.emailModel.trim())),
|
|
372
|
+
}, T = V(() => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(n.emailModel.trim())), O = V(() => !T.value || !!e.value), L = async () => {
|
|
374
373
|
var a;
|
|
375
374
|
try {
|
|
376
375
|
if (h("email"), !T.value) {
|
|
@@ -387,15 +386,15 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
387
386
|
console.error("Неизвестная ошибка при проверке доступности email:", i), e.value = "Это не похоже на e-mail";
|
|
388
387
|
}
|
|
389
388
|
};
|
|
390
|
-
let
|
|
389
|
+
let U = "";
|
|
391
390
|
const C = (a) => {
|
|
392
391
|
s("on-clear-code-error");
|
|
393
392
|
const i = a.target;
|
|
394
393
|
let y = i.value.replace(/\D/g, "");
|
|
395
|
-
y.length > 4 && (y = y.slice(0, 4), i.value = y), n.codeModel = y, y.length === 4 && y !==
|
|
394
|
+
y.length > 4 && (y = y.slice(0, 4), i.value = y), n.codeModel = y, y.length === 4 && y !== U && (U = y, s("on-match-code", { email: n.emailModel, code: y }));
|
|
396
395
|
}, c = () => {
|
|
397
396
|
s("on-send-code-again", { email: n.emailModel });
|
|
398
|
-
}, { emailModel: b, codeModel: M, touched: P } = ce(n),
|
|
397
|
+
}, { emailModel: b, codeModel: M, touched: P } = ce(n), A = V(() => {
|
|
399
398
|
if (e.value) return e.value;
|
|
400
399
|
if (n.touched.email) {
|
|
401
400
|
if (!n.emailModel.trim()) return "Введите e-mail";
|
|
@@ -405,9 +404,9 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
405
404
|
}), p = V(() => v.isNotMatchCode ? "Неверный код" : P.value.code ? M.value.trim() ? v.codeError ?? null : "Введите код" : "");
|
|
406
405
|
return (a, i) => {
|
|
407
406
|
const y = ve;
|
|
408
|
-
return w(), I("div",
|
|
409
|
-
B("div",
|
|
410
|
-
a.showEmail ? (w(), I("div",
|
|
407
|
+
return w(), I("div", wt, [
|
|
408
|
+
B("div", Ct, ee(m.value ? "Введите код подтверждения" : a.hintText), 1),
|
|
409
|
+
a.showEmail ? (w(), I("div", yt, [
|
|
411
410
|
$(u(J), {
|
|
412
411
|
modelValue: u(b),
|
|
413
412
|
"onUpdate:modelValue": i[0] || (i[0] = (z) => te(b) ? b.value = z : null),
|
|
@@ -415,7 +414,7 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
415
414
|
"text-size": "medium",
|
|
416
415
|
label: "Почта",
|
|
417
416
|
type: "email",
|
|
418
|
-
error:
|
|
417
|
+
error: A.value,
|
|
419
418
|
onBlur: i[1] || (i[1] = (z) => h("email")),
|
|
420
419
|
onInput: r
|
|
421
420
|
}, null, 8, ["modelValue", "error"]),
|
|
@@ -424,10 +423,10 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
424
423
|
onClick: i[2] || (i[2] = (z) => a.$emit("edit", "email"))
|
|
425
424
|
})
|
|
426
425
|
])) : D("", !0),
|
|
427
|
-
m.value ? D("", !0) : (w(), I("div",
|
|
426
|
+
m.value ? D("", !0) : (w(), I("div", gt, [
|
|
428
427
|
$(u(se), {
|
|
429
428
|
style: { width: "100%" },
|
|
430
|
-
disabled:
|
|
429
|
+
disabled: O.value,
|
|
431
430
|
onClick: L
|
|
432
431
|
}, {
|
|
433
432
|
default: G(() => i[5] || (i[5] = [
|
|
@@ -437,7 +436,7 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
437
436
|
__: [5]
|
|
438
437
|
}, 8, ["disabled"])
|
|
439
438
|
])),
|
|
440
|
-
m.value ? (w(), I("div",
|
|
439
|
+
m.value ? (w(), I("div", ht, [
|
|
441
440
|
$(u(J), {
|
|
442
441
|
modelValue: u(M),
|
|
443
442
|
"onUpdate:modelValue": i[3] || (i[3] = (z) => te(M) ? M.value = z : null),
|
|
@@ -450,7 +449,7 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
450
449
|
onBlur: i[4] || (i[4] = (z) => h("code"))
|
|
451
450
|
}, null, 8, ["modelValue", "error"])
|
|
452
451
|
])) : D("", !0),
|
|
453
|
-
m.value ? (w(), I("div",
|
|
452
|
+
m.value ? (w(), I("div", Tt, [
|
|
454
453
|
$(y, {
|
|
455
454
|
loading: a.loading,
|
|
456
455
|
"rate-limit-text": a.rateLimitText,
|
|
@@ -461,10 +460,10 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
461
460
|
]);
|
|
462
461
|
};
|
|
463
462
|
}
|
|
464
|
-
}),
|
|
463
|
+
}), bt = { class: "text-center w-full" }, Vt = { class: "dialogTitle" }, xt = {
|
|
465
464
|
key: 0,
|
|
466
465
|
class: "dialogDefaultContainer"
|
|
467
|
-
},
|
|
466
|
+
}, $t = {
|
|
468
467
|
key: 1,
|
|
469
468
|
class: "dialogDefaultContainer"
|
|
470
469
|
}, xe = 3, Pt = /* @__PURE__ */ ie({
|
|
@@ -486,7 +485,7 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
486
485
|
code: "",
|
|
487
486
|
addEmail: "",
|
|
488
487
|
addCode: ""
|
|
489
|
-
}), n = Z({ email: !1, code: !1 }), h = x(R.OLD), d = x(null), r = x(!1), T = x(!1),
|
|
488
|
+
}), n = Z({ email: !1, code: !1 }), h = x(R.OLD), d = x(null), r = x(!1), T = x(!1), O = x(!1), L = x(_e.VERIFY_EMAIL), U = V(() => L.value === "password-flow"), C = V(() => p.value ? v.title : U.value ? "Добавление пароля" : "Добавление почты"), { startTimer: c, remainingSeconds: b, isAvailableForSendAgain: M, totalRateAttempts: P, currentRateAttempt: A } = ze(), { isEditFlow: p, getFlow: a } = Re(x(v.mode ?? "edit")), { showRateLimitToast: i } = We(s), y = V(() => n.email && !e.oldEmail.trim() ? "Введите e-mail" : ""), z = V(() => n.code && !e.code.trim() ? "Введите код" : ""), de = V(() => M.value ? "Повторить" : `${b.value}`), j = x(xe), ke = V(() => j.value === 0), Ie = (l) => new Promise((t) => setTimeout(t, l));
|
|
490
489
|
Y(
|
|
491
490
|
() => v.modelValue,
|
|
492
491
|
(l) => m.value = l
|
|
@@ -498,19 +497,19 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
498
497
|
var o;
|
|
499
498
|
try {
|
|
500
499
|
const E = (o = (await H("/users/profile/check-throttler", { method: "email", email: l, isInvite: t })).data) == null ? void 0 : o.data;
|
|
501
|
-
return E ? (await Ie(1e3), E.restTimeSec > 0 ? (c(E.restTimeSec), M.value = !1, P.value = E.attempts.total ?? P.value,
|
|
500
|
+
return E ? (await Ie(1e3), E.restTimeSec > 0 ? (c(E.restTimeSec), M.value = !1, P.value = E.attempts.total ?? P.value, A.value = (E.attempts.total ?? 0) - (E.attempts.available ?? 0), j.value = E.attempts.available ?? j.value) : M.value = !0, E) : null;
|
|
502
501
|
} catch {
|
|
503
502
|
return null;
|
|
504
503
|
}
|
|
505
504
|
}
|
|
506
505
|
async function ue(l = "email") {
|
|
507
506
|
var o;
|
|
508
|
-
return (
|
|
507
|
+
return (o = (await qe("/users/profile/session/get-edit-session", { params: { field: l } })).data) == null ? void 0 : o.data;
|
|
509
508
|
}
|
|
510
509
|
async function Se(l = "email") {
|
|
511
510
|
try {
|
|
512
511
|
const t = await ue(l);
|
|
513
|
-
d.value = (t == null ? void 0 : t.sessionId) ?? d.value, h.value = (t == null ? void 0 : t.step) ?? h.value, e.oldEmail = (t == null ? void 0 : t.oldValue) ?? e.oldEmail, t != null && t.sessionId || await we(l);
|
|
512
|
+
return d.value = (t == null ? void 0 : t.sessionId) ?? d.value, h.value = (t == null ? void 0 : t.step) ?? h.value, e.oldEmail = (t == null ? void 0 : t.oldValue) ?? e.oldEmail, t != null && t.sessionId || await we(l), t;
|
|
514
513
|
} catch {
|
|
515
514
|
await we(l);
|
|
516
515
|
}
|
|
@@ -519,7 +518,7 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
519
518
|
var t;
|
|
520
519
|
try {
|
|
521
520
|
const o = await H("/users/profile/session/create-if-not-exists", { field: l, oldValue: v.initialEmail }), f = ((t = o.data) == null ? void 0 : t.data) ?? o.data;
|
|
522
|
-
d.value = (f == null ? void 0 : f.sessionId) ?? d.value, h.value = (f == null ? void 0 : f.step) ?? h.value, e.oldEmail = (f == null ? void 0 : f.oldValue) ?? e.oldEmail, e.newEmail = (f == null ? void 0 : f.newValue) ?? e.newEmail;
|
|
521
|
+
return d.value = (f == null ? void 0 : f.sessionId) ?? d.value, h.value = (f == null ? void 0 : f.step) ?? h.value, e.oldEmail = (f == null ? void 0 : f.oldValue) ?? e.oldEmail, e.newEmail = (f == null ? void 0 : f.newValue) ?? e.newEmail, f;
|
|
523
522
|
} catch {
|
|
524
523
|
}
|
|
525
524
|
}
|
|
@@ -540,7 +539,7 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
540
539
|
);
|
|
541
540
|
if (E.status === 403 && ((o = E.data) != null && o.tooManyRequests)) {
|
|
542
541
|
const S = E.data.tooManyRequests;
|
|
543
|
-
return S.restTimeSec > 0 ? (c(S.restTimeSec), P.value = S.attempts.total ?? P.value,
|
|
542
|
+
return S.restTimeSec > 0 ? (c(S.restTimeSec), P.value = S.attempts.total ?? P.value, A.value = (S.attempts.total ?? 0) - (S.attempts.available ?? 0), j.value = S.attempts.available ?? j.value) : M.value = !0, E;
|
|
544
543
|
}
|
|
545
544
|
return E;
|
|
546
545
|
} catch (f) {
|
|
@@ -556,14 +555,14 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
556
555
|
r.value = !0;
|
|
557
556
|
const g = await ue();
|
|
558
557
|
if (d.value = (g == null ? void 0 : g.sessionId) ?? d.value, h.value = (g == null ? void 0 : g.step) ?? h.value, e.oldEmail = (g == null ? void 0 : g.oldValue) ?? e.oldEmail, e.newEmail = (g == null ? void 0 : g.newValue) ?? e.newEmail, !d.value) throw new Error("Нет sessionId для match");
|
|
559
|
-
const
|
|
558
|
+
const F = await H("/users/profile/change/email/match-code", {
|
|
560
559
|
email: t === R.NEW ? e.newEmail : e.oldEmail,
|
|
561
560
|
sessionId: d.value,
|
|
562
561
|
code: l,
|
|
563
562
|
step: t
|
|
564
|
-
}), Q = ((o =
|
|
565
|
-
if (
|
|
566
|
-
T.value = !0;
|
|
563
|
+
}), Q = ((o = F.data) == null ? void 0 : o.nextStep) ?? ((E = (f = F.data) == null ? void 0 : f.data) == null ? void 0 : E.nextStep) ?? null, Ue = ((N = (S = F.data) == null ? void 0 : S.data) == null ? void 0 : N.rateLimit) ?? ((le = F.data) == null ? void 0 : le.rateLimit) ?? null;
|
|
564
|
+
if (!(F.data.data.success ?? F.data.success)) {
|
|
565
|
+
i(Ue), T.value = !0;
|
|
567
566
|
return;
|
|
568
567
|
}
|
|
569
568
|
if (Q) {
|
|
@@ -573,11 +572,11 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
573
572
|
}
|
|
574
573
|
h.value === R.COMPLETED && (e.code = "", s("submit-email", { email: e.addEmail, code: l }), s("on-toast", { color: "success", text: "E-mail изменён" }), s("on-update-jwt", "email", "edit", e.newEmail), d.value = null, s("close"));
|
|
575
574
|
}
|
|
576
|
-
return
|
|
575
|
+
return F;
|
|
577
576
|
} catch (g) {
|
|
578
|
-
const
|
|
579
|
-
if (console.error("rate-limit debug error: ", g), Q === 429 &&
|
|
580
|
-
console.debug("rate-limit debug status and exists rateLimit: ",
|
|
577
|
+
const F = (k = (oe = g == null ? void 0 : g.response) == null ? void 0 : oe.data) == null ? void 0 : k.rateLimit, Q = (K = g == null ? void 0 : g.response) == null ? void 0 : K.data.statusCode;
|
|
578
|
+
if (console.error("rate-limit debug error: ", g), Q === 429 && F) {
|
|
579
|
+
console.debug("rate-limit debug status and exists rateLimit: ", F), i(F), T.value = !0;
|
|
581
580
|
return;
|
|
582
581
|
}
|
|
583
582
|
throw g;
|
|
@@ -619,7 +618,7 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
619
618
|
provider: v.provider
|
|
620
619
|
}), N = (f = S.data) == null ? void 0 : f.tooManyRequests;
|
|
621
620
|
if (S.status === 403 && N) {
|
|
622
|
-
N.restTimeSec > 0 ? (c(N.restTimeSec), P.value = N.attempts.total ?? P.value,
|
|
621
|
+
N.restTimeSec > 0 ? (c(N.restTimeSec), P.value = N.attempts.total ?? P.value, A.value = (N.attempts.total ?? 0) - (N.attempts.available ?? 0), j.value = N.attempts.available ?? xe) : M.value = !0;
|
|
623
622
|
return;
|
|
624
623
|
}
|
|
625
624
|
return S;
|
|
@@ -640,9 +639,9 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
640
639
|
code: e.addCode
|
|
641
640
|
}), K = ((l = k.data) == null ? void 0 : l.nextStep) ?? ((o = (t = k.data) == null ? void 0 : t.data) == null ? void 0 : o.nextStep);
|
|
642
641
|
L.value = K ?? L.value;
|
|
643
|
-
const g = ((E = (f = k.data) == null ? void 0 : f.data) == null ? void 0 : E.rateLimit) ?? ((S = k.data) == null ? void 0 : S.rateLimit) ?? null
|
|
644
|
-
if (
|
|
645
|
-
|
|
642
|
+
const g = ((E = (f = k.data) == null ? void 0 : f.data) == null ? void 0 : E.rateLimit) ?? ((S = k.data) == null ? void 0 : S.rateLimit) ?? null;
|
|
643
|
+
if (!(k.data.data.success ?? k.data.success)) {
|
|
644
|
+
i(g), O.value = !0;
|
|
646
645
|
return;
|
|
647
646
|
}
|
|
648
647
|
} catch (k) {
|
|
@@ -674,15 +673,15 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
674
673
|
r.value = !1;
|
|
675
674
|
}
|
|
676
675
|
};
|
|
677
|
-
return
|
|
676
|
+
return Fe(async () => {
|
|
678
677
|
r.value = !0;
|
|
679
678
|
const l = await a("email");
|
|
680
679
|
if (v.mode === "bind" && l === "bind") {
|
|
681
680
|
await me(), r.value = !1;
|
|
682
681
|
return;
|
|
683
682
|
}
|
|
684
|
-
await Se()
|
|
685
|
-
}), (l, t) => (w(), _(u(
|
|
683
|
+
(await Se()).step === "old" && e.oldEmail && await ae({ value: e.oldEmail }), r.value = !1;
|
|
684
|
+
}), (l, t) => (w(), _(u(je), {
|
|
686
685
|
modelValue: m.value,
|
|
687
686
|
"onUpdate:modelValue": [
|
|
688
687
|
t[18] || (t[18] = (o) => m.value = o),
|
|
@@ -694,18 +693,18 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
694
693
|
"onClick:outside": re
|
|
695
694
|
}, {
|
|
696
695
|
header: G(() => [
|
|
697
|
-
B("div",
|
|
698
|
-
$(u(
|
|
696
|
+
B("div", bt, [
|
|
697
|
+
$(u(Ge), {
|
|
699
698
|
"slot-left": !1,
|
|
700
699
|
size: "small",
|
|
701
700
|
borded: !0,
|
|
702
701
|
"no-padding": !1
|
|
703
702
|
}, {
|
|
704
703
|
title: G(() => [
|
|
705
|
-
B("span",
|
|
704
|
+
B("span", Vt, ee(C.value), 1)
|
|
706
705
|
]),
|
|
707
706
|
"right-button": G(() => [
|
|
708
|
-
$(u(
|
|
707
|
+
$(u(Ye), {
|
|
709
708
|
class: "cross",
|
|
710
709
|
onClick: re
|
|
711
710
|
})
|
|
@@ -716,9 +715,9 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
716
715
|
]),
|
|
717
716
|
default: G(() => [
|
|
718
717
|
B("div", null, [
|
|
719
|
-
u(p) ? (w(), I("div",
|
|
718
|
+
u(p) ? (w(), I("div", xt, [
|
|
720
719
|
r.value ? (w(), _(Te, { key: 0 })) : D("", !0),
|
|
721
|
-
h.value === u(R).OLD ? (w(), _(
|
|
720
|
+
h.value === u(R).OLD ? (w(), _(Et, {
|
|
722
721
|
key: 1,
|
|
723
722
|
email: e.oldEmail,
|
|
724
723
|
"onUpdate:email": t[0] || (t[0] = (o) => e.oldEmail = o),
|
|
@@ -737,7 +736,7 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
737
736
|
onSendCode: t[2] || (t[2] = (o) => ae({ value: e.oldEmail })),
|
|
738
737
|
onOnSendCodeAgain: t[3] || (t[3] = (o) => ae({ value: e.oldEmail })),
|
|
739
738
|
onOnClearCodeError: t[4] || (t[4] = (o) => T.value = !1)
|
|
740
|
-
}, null, 8, ["email", "code", "hint-text", "email-error", "code-error", "rate-limit-text", "is-final-limit", "is-not-match-code", "loading"])) : h.value === u(R).NEW ? (w(), _(
|
|
739
|
+
}, null, 8, ["email", "code", "hint-text", "email-error", "code-error", "rate-limit-text", "is-final-limit", "is-not-match-code", "loading"])) : h.value === u(R).NEW ? (w(), _(Mt, {
|
|
741
740
|
key: 2,
|
|
742
741
|
email: e.newEmail,
|
|
743
742
|
"onUpdate:email": t[5] || (t[5] = (o) => e.newEmail = o),
|
|
@@ -759,16 +758,16 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
759
758
|
onOnSendCodeAgain: t[9] || (t[9] = (o) => ae({ value: e.newEmail })),
|
|
760
759
|
onOnClearCodeError: t[10] || (t[10] = (o) => T.value = !1)
|
|
761
760
|
}, null, 8, ["email", "oldEmail", "code", "email-error", "code-error", "rate-limit-text", "is-final-limit", "is-not-match-code", "loading"])) : D("", !0)
|
|
762
|
-
])) : (w(), I("div",
|
|
761
|
+
])) : (w(), I("div", $t, [
|
|
763
762
|
r.value ? (w(), _(Te, { key: 0 })) : D("", !0),
|
|
764
|
-
|
|
763
|
+
U.value ? (w(), _(ut, {
|
|
765
764
|
key: 2,
|
|
766
765
|
"model-value": m.value,
|
|
767
766
|
"email-session-id": d.value,
|
|
768
767
|
"onUpdate:modelValue": t[17] || (t[17] = (o) => s("update:modelValue", o)),
|
|
769
768
|
onUpdateUser: Oe,
|
|
770
769
|
onClose: Be
|
|
771
|
-
}, null, 8, ["model-value", "email-session-id"])) : (w(), _(
|
|
770
|
+
}, null, 8, ["model-value", "email-session-id"])) : (w(), _(tt, {
|
|
772
771
|
key: 1,
|
|
773
772
|
email: e.addEmail,
|
|
774
773
|
"onUpdate:email": t[11] || (t[11] = (o) => e.addEmail = o),
|
|
@@ -779,13 +778,13 @@ const Ke = { class: "dialogDefaultContainerInsideContent" }, Qe = { class: "dial
|
|
|
779
778
|
"hint-text": u(p) ? l.hintText : "Чтобы продолжить, введите новый адрес вашей почты",
|
|
780
779
|
"rate-limit-text": de.value,
|
|
781
780
|
"is-final-limit": ke.value,
|
|
782
|
-
"is-not-match-code":
|
|
781
|
+
"is-not-match-code": O.value,
|
|
783
782
|
loading: r.value,
|
|
784
783
|
onOnSendCode: t[14] || (t[14] = (o) => ge({ value: e.addEmail, field: "email" })),
|
|
785
784
|
onOnSendCodeAgain: t[15] || (t[15] = (o) => ge({ value: e.addEmail, field: "email" })),
|
|
786
785
|
onOnMatchCode: De,
|
|
787
786
|
onOnMatchCodeError: Ne,
|
|
788
|
-
onOnClearCodeError: t[16] || (t[16] = (o) =>
|
|
787
|
+
onOnClearCodeError: t[16] || (t[16] = (o) => O.value = !1)
|
|
789
788
|
}, null, 8, ["email", "oldEmail", "code", "hint-text", "rate-limit-text", "is-final-limit", "is-not-match-code", "loading"]))
|
|
790
789
|
]))
|
|
791
790
|
])
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as ye, ref as a, reactive as _, computed as u, watch as Z, onMounted as Ce, createElementBlock as S, openBlock as g, Fragment as ge, createVNode as n, unref as o, withCtx as m, createCommentVNode as ee, createElementVNode as r, toDisplayString as V, createBlock as B, resolveDynamicComponent as $, createTextVNode as z } from "vue";
|
|
2
|
-
import { C as I, p as D, g as Ve } from "./index-
|
|
2
|
+
import { C as I, p as D, g as Ve } from "./index-DgXqm9qe.js";
|
|
3
3
|
import { PDialog as be, PInput as M, IconEyeMd as O, IconEyeClosedMd as U, PButton as F, PTopBar as Te, IconCrossMd as Ie, PTeleportContainer as xe } from "@profeat/ui-kit";
|
|
4
4
|
function ke(b) {
|
|
5
5
|
return { showPasswordRateLimitToast: (P) => {
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { createElementBlock as P, openBlock as p, createElementVNode as q, defineComponent as he, reactive as ve, watch as Z, ref as L, toRefs as Ce, computed as E, createCommentVNode as $, createVNode as T, toDisplayString as H, createBlock as G, createTextVNode as Y, unref as d, isRef as ne, withCtx as Q, onMounted as
|
|
2
|
-
import { T as we, c as Ne, a as
|
|
3
|
-
import { IconTelegramSm as Pe, PInput as ae, IconPhoneMd as
|
|
4
|
-
import { C as j, t as De, p as
|
|
5
|
-
const
|
|
1
|
+
import { createElementBlock as P, openBlock as p, createElementVNode as q, defineComponent as he, reactive as ve, watch as Z, ref as L, toRefs as Ce, computed as E, createCommentVNode as $, createVNode as T, toDisplayString as H, createBlock as G, createTextVNode as Y, unref as d, isRef as ne, withCtx as Q, onMounted as je, Fragment as qe } from "vue";
|
|
2
|
+
import { T as we, c as Ne, a as He, u as Ge, P as Oe, b as Je } from "./useRateLimitToast-gpF7vjbF.js";
|
|
3
|
+
import { IconTelegramSm as Pe, PInput as ae, IconPhoneMd as Ke, IconMailMd as ze, PButton as Fe, PDialog as Qe, PTopBar as Xe, IconCrossMd as Ye, PTeleportContainer as Ze } from "@profeat/ui-kit";
|
|
4
|
+
import { C as j, t as De, p as te, g as Ae } from "./index-DgXqm9qe.js";
|
|
5
|
+
const _e = {
|
|
6
6
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7
7
|
width: "12",
|
|
8
8
|
height: "16",
|
|
9
9
|
fill: "none"
|
|
10
10
|
};
|
|
11
|
-
function
|
|
12
|
-
return p(), P("svg",
|
|
11
|
+
function et(R, x) {
|
|
12
|
+
return p(), P("svg", _e, x[0] || (x[0] = [
|
|
13
13
|
q("path", {
|
|
14
14
|
fill: "#1C7EF1",
|
|
15
15
|
"fill-rule": "evenodd",
|
|
@@ -18,13 +18,13 @@ function tt(R, x) {
|
|
|
18
18
|
}, null, -1)
|
|
19
19
|
]));
|
|
20
20
|
}
|
|
21
|
-
const le = { render:
|
|
21
|
+
const le = { render: et }, tt = { class: "dialogDefaultContainerInsideContent" }, ot = { style: { display: "flex", width: "100%", gap: "4px", "align-items": "center", "justify-content": "center", "text-align": "center" } }, nt = { class: "dialogDefaultContainerTextHint" }, at = { class: "chip" }, lt = {
|
|
22
22
|
key: 0,
|
|
23
23
|
class: "input-wrapper"
|
|
24
|
-
},
|
|
24
|
+
}, st = {
|
|
25
25
|
key: 1,
|
|
26
26
|
class: "input-wrapper"
|
|
27
|
-
},
|
|
27
|
+
}, dt = /* @__PURE__ */ he({
|
|
28
28
|
__name: "OldPhoneContent",
|
|
29
29
|
props: {
|
|
30
30
|
phone: {},
|
|
@@ -67,10 +67,10 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
|
|
|
67
67
|
}, X = () => i("on-send-code-again", { phone: u.phoneModel }), J = () => {
|
|
68
68
|
console.debug("onSendCodeViaSms"), i("on-send-only-sms", { phone: u.phoneModel });
|
|
69
69
|
}, { phoneModel: e, codeModel: M, touched: C } = Ce(u), f = E(() => C.value.phone && !e.value.trim() ? "Введите телефон" : B.phoneError), O = E(() => B.isNotMatchCode ? "Неверный код" : C.value.code ? M.value.trim() ? B.codeError ?? null : "Введите код" : "");
|
|
70
|
-
return (v, m) => (p(), P("div",
|
|
71
|
-
q("div",
|
|
72
|
-
q("div",
|
|
73
|
-
q("div",
|
|
70
|
+
return (v, m) => (p(), P("div", tt, [
|
|
71
|
+
q("div", ot, [
|
|
72
|
+
q("div", nt, H(v.hintText), 1),
|
|
73
|
+
q("div", at, [
|
|
74
74
|
v.isTg ? (p(), G(d(Pe), { key: 0 })) : (p(), G(d(le), {
|
|
75
75
|
key: 1,
|
|
76
76
|
style: { "margin-left": "5px" }
|
|
@@ -78,7 +78,7 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
|
|
|
78
78
|
Y(" " + H(v.isTg ? "Telegram" : "СМС"), 1)
|
|
79
79
|
])
|
|
80
80
|
]),
|
|
81
|
-
v.showPhone ? (p(), P("div",
|
|
81
|
+
v.showPhone ? (p(), P("div", lt, [
|
|
82
82
|
T(d(ae), {
|
|
83
83
|
modelValue: d(e),
|
|
84
84
|
"onUpdate:modelValue": m[0] || (m[0] = (r) => ne(e) ? e.value = r : null),
|
|
@@ -91,12 +91,12 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
|
|
|
91
91
|
onBlur: m[1] || (m[1] = (r) => h("phone")),
|
|
92
92
|
onInput: m[2] || (m[2] = (r) => h("phone"))
|
|
93
93
|
}, null, 8, ["modelValue", "error"]),
|
|
94
|
-
T(d(
|
|
94
|
+
T(d(Ke), {
|
|
95
95
|
class: "icon-locked",
|
|
96
96
|
onClick: m[3] || (m[3] = (r) => v.$emit("edit", "phone"))
|
|
97
97
|
})
|
|
98
98
|
])) : $("", !0),
|
|
99
|
-
v.showCode ? (p(), P("div",
|
|
99
|
+
v.showCode ? (p(), P("div", st, [
|
|
100
100
|
T(d(ae), {
|
|
101
101
|
modelValue: d(M),
|
|
102
102
|
"onUpdate:modelValue": m[4] || (m[4] = (r) => ne(M) ? M.value = r : null),
|
|
@@ -138,19 +138,19 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
|
|
|
138
138
|
return `+${x}`;
|
|
139
139
|
}
|
|
140
140
|
return R.trim().startsWith("+") ? R.trim() : `+${x}`;
|
|
141
|
-
},
|
|
141
|
+
}, it = { class: "dialogDefaultContainerInsideContent" }, rt = { style: { display: "flex", width: "100%", gap: "4px", "align-items": "center", "justify-content": "center", "text-align": "center" } }, ut = { class: "dialogDefaultContainerTextHint" }, ct = {
|
|
142
142
|
key: 0,
|
|
143
143
|
class: "chip"
|
|
144
|
-
},
|
|
144
|
+
}, pt = {
|
|
145
145
|
key: 0,
|
|
146
146
|
class: "input-wrapper"
|
|
147
|
-
},
|
|
147
|
+
}, ht = {
|
|
148
148
|
key: 1,
|
|
149
149
|
class: "input-wrapper"
|
|
150
|
-
},
|
|
150
|
+
}, vt = {
|
|
151
151
|
key: 2,
|
|
152
152
|
class: "input-wrapper"
|
|
153
|
-
},
|
|
153
|
+
}, mt = { key: 3 }, ft = /* @__PURE__ */ he({
|
|
154
154
|
__name: "NewPhoneContent",
|
|
155
155
|
props: {
|
|
156
156
|
phone: {},
|
|
@@ -225,10 +225,10 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
|
|
|
225
225
|
}
|
|
226
226
|
return B.phoneError || "";
|
|
227
227
|
}), _ = E(() => B.isNotMatchCode ? "Неверный код" : se.value.code ? I.value.trim() ? B.codeError ?? null : "Введите код" : "");
|
|
228
|
-
return (o, n) => (p(), P("div",
|
|
229
|
-
q("div",
|
|
230
|
-
q("div",
|
|
231
|
-
u.value ? (p(), P("div",
|
|
228
|
+
return (o, n) => (p(), P("div", it, [
|
|
229
|
+
q("div", rt, [
|
|
230
|
+
q("div", ut, H(u.value ? "Чтобы продолжить, введите код подтверждения из" : o.hintText), 1),
|
|
231
|
+
u.value ? (p(), P("div", ct, [
|
|
232
232
|
o.isTg ? (p(), G(d(Pe), { key: 0 })) : (p(), G(d(le), {
|
|
233
233
|
key: 1,
|
|
234
234
|
style: { "margin-left": "5px" }
|
|
@@ -236,7 +236,7 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
|
|
|
236
236
|
Y(" " + H(o.isTg ? "Telegram" : "СМС"), 1)
|
|
237
237
|
])) : $("", !0)
|
|
238
238
|
]),
|
|
239
|
-
o.showPhone ? (p(), P("div",
|
|
239
|
+
o.showPhone ? (p(), P("div", pt, [
|
|
240
240
|
T(d(ae), {
|
|
241
241
|
modelValue: d(r),
|
|
242
242
|
"onUpdate:modelValue": n[0] || (n[0] = (s) => ne(r) ? r.value = s : null),
|
|
@@ -253,7 +253,7 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
|
|
|
253
253
|
onClick: n[2] || (n[2] = (s) => o.$emit("edit", "phone"))
|
|
254
254
|
})
|
|
255
255
|
])) : $("", !0),
|
|
256
|
-
u.value ? $("", !0) : (p(), P("div",
|
|
256
|
+
u.value ? $("", !0) : (p(), P("div", ht, [
|
|
257
257
|
T(d(Fe), {
|
|
258
258
|
style: { width: "100%" },
|
|
259
259
|
disabled: M.value,
|
|
@@ -266,7 +266,7 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
|
|
|
266
266
|
__: [5]
|
|
267
267
|
}, 8, ["disabled"])
|
|
268
268
|
])),
|
|
269
|
-
u.value ? (p(), P("div",
|
|
269
|
+
u.value ? (p(), P("div", vt, [
|
|
270
270
|
T(d(ae), {
|
|
271
271
|
modelValue: d(I),
|
|
272
272
|
"onUpdate:modelValue": n[3] || (n[3] = (s) => ne(I) ? I.value = s : null),
|
|
@@ -279,7 +279,7 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
|
|
|
279
279
|
onBlur: n[4] || (n[4] = (s) => F("code"))
|
|
280
280
|
}, null, 8, ["modelValue", "error"])
|
|
281
281
|
])) : $("", !0),
|
|
282
|
-
!o.loading && u.value ? (p(), P("div",
|
|
282
|
+
!o.loading && u.value ? (p(), P("div", mt, [
|
|
283
283
|
T(we, {
|
|
284
284
|
loading: o.loading,
|
|
285
285
|
"rate-limit-text": o.rateLimitText,
|
|
@@ -301,19 +301,19 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
|
|
|
301
301
|
])) : $("", !0)
|
|
302
302
|
]));
|
|
303
303
|
}
|
|
304
|
-
}),
|
|
304
|
+
}), gt = { class: "dialogDefaultContainerInsideContent" }, yt = { style: { display: "flex", width: "100%", gap: "4px", "align-items": "center", "justify-content": "center", "text-align": "center" } }, Ct = { class: "dialogDefaultContainerTextHint" }, wt = {
|
|
305
305
|
key: 0,
|
|
306
306
|
class: "chip"
|
|
307
|
-
},
|
|
307
|
+
}, Pt = {
|
|
308
308
|
key: 0,
|
|
309
309
|
class: "input-wrapper"
|
|
310
|
-
},
|
|
310
|
+
}, Tt = {
|
|
311
311
|
key: 1,
|
|
312
312
|
class: "input-wrapper"
|
|
313
|
-
},
|
|
313
|
+
}, St = {
|
|
314
314
|
key: 2,
|
|
315
315
|
class: "input-wrapper"
|
|
316
|
-
},
|
|
316
|
+
}, Mt = { key: 3 }, xt = /* @__PURE__ */ he({
|
|
317
317
|
__name: "AddNewPhoneContent",
|
|
318
318
|
props: {
|
|
319
319
|
phone: {},
|
|
@@ -385,10 +385,10 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
|
|
|
385
385
|
}
|
|
386
386
|
return B.phoneError || "";
|
|
387
387
|
}), _ = E(() => B.isNotMatchCode ? "Неверный код" : c.touched.code ? I.value.trim() ? B.codeError ?? null : "Введите код" : "");
|
|
388
|
-
return (o, n) => (p(), P("div",
|
|
389
|
-
q("div",
|
|
390
|
-
q("div",
|
|
391
|
-
u.value ? (p(), P("div",
|
|
388
|
+
return (o, n) => (p(), P("div", gt, [
|
|
389
|
+
q("div", yt, [
|
|
390
|
+
q("div", Ct, H(u.value ? "Чтобы продолжить, введите код подтверждения из" : o.hintText), 1),
|
|
391
|
+
u.value ? (p(), P("div", wt, [
|
|
392
392
|
o.isTg ? (p(), G(d(Pe), { key: 0 })) : (p(), G(d(le), {
|
|
393
393
|
key: 1,
|
|
394
394
|
style: { "margin-left": "5px" }
|
|
@@ -396,7 +396,7 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
|
|
|
396
396
|
Y(" " + H(o.isTg ? "Telegram" : "СМС"), 1)
|
|
397
397
|
])) : $("", !0)
|
|
398
398
|
]),
|
|
399
|
-
o.showPhone ? (p(), P("div",
|
|
399
|
+
o.showPhone ? (p(), P("div", Pt, [
|
|
400
400
|
T(d(ae), {
|
|
401
401
|
modelValue: d(r),
|
|
402
402
|
"onUpdate:modelValue": n[0] || (n[0] = (s) => ne(r) ? r.value = s : null),
|
|
@@ -413,7 +413,7 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
|
|
|
413
413
|
onClick: n[2] || (n[2] = (s) => o.$emit("edit", "phone"))
|
|
414
414
|
})
|
|
415
415
|
])) : $("", !0),
|
|
416
|
-
u.value ? $("", !0) : (p(), P("div",
|
|
416
|
+
u.value ? $("", !0) : (p(), P("div", Tt, [
|
|
417
417
|
T(d(Fe), {
|
|
418
418
|
style: { width: "100%" },
|
|
419
419
|
disabled: M.value,
|
|
@@ -426,7 +426,7 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
|
|
|
426
426
|
__: [5]
|
|
427
427
|
}, 8, ["disabled"])
|
|
428
428
|
])),
|
|
429
|
-
u.value ? (p(), P("div",
|
|
429
|
+
u.value ? (p(), P("div", St, [
|
|
430
430
|
T(d(ae), {
|
|
431
431
|
modelValue: d(I),
|
|
432
432
|
"onUpdate:modelValue": n[3] || (n[3] = (s) => ne(I) ? I.value = s : null),
|
|
@@ -439,7 +439,7 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
|
|
|
439
439
|
onBlur: n[4] || (n[4] = (s) => F("code"))
|
|
440
440
|
}, null, 8, ["modelValue", "error"])
|
|
441
441
|
])) : $("", !0),
|
|
442
|
-
u.value ? (p(), P("div",
|
|
442
|
+
u.value ? (p(), P("div", Mt, [
|
|
443
443
|
T(we, {
|
|
444
444
|
loading: o.loading,
|
|
445
445
|
"rate-limit-text": o.rateLimitText,
|
|
@@ -461,10 +461,10 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
|
|
|
461
461
|
])) : $("", !0)
|
|
462
462
|
]));
|
|
463
463
|
}
|
|
464
|
-
}),
|
|
464
|
+
}), bt = { class: "text-center w-full" }, kt = { class: "dialogTitle" }, Vt = {
|
|
465
465
|
key: 0,
|
|
466
466
|
class: "dialogDefaultContainer"
|
|
467
|
-
},
|
|
467
|
+
}, $t = { key: 3 }, Bt = {
|
|
468
468
|
key: 1,
|
|
469
469
|
class: "dialogDefaultContainer"
|
|
470
470
|
}, pe = 3, At = /* @__PURE__ */ he({
|
|
@@ -491,31 +491,31 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
|
|
|
491
491
|
code: "",
|
|
492
492
|
addPhone: "",
|
|
493
493
|
addCode: ""
|
|
494
|
-
}), M = L(j.OLD), C = L(null), f = L(!1), O = L(!1), v = L("tg"), m = E(() => v.value === "tg"), r = L(!1), { startTimer: I, remainingSeconds: se, isAvailableForSendAgain: W, totalRateAttempts: _, currentRateAttempt: o } =
|
|
494
|
+
}), M = L(j.OLD), C = L(null), f = L(!1), O = L(!1), v = L("tg"), m = E(() => v.value === "tg"), r = L(!1), { startTimer: I, remainingSeconds: se, isAvailableForSendAgain: W, totalRateAttempts: _, currentRateAttempt: o } = He(), { showRateLimitToast: n } = Je(u), { isEditFlow: s, getFlow: me } = Ge(L(i.mode)), de = E(() => W.value ? "Повторить" : `${se.value}`), ie = L(pe), re = E(() => ie.value === 0), Ue = (a) => new Promise((l) => setTimeout(l, a));
|
|
495
495
|
async function fe(a = "email") {
|
|
496
496
|
var t;
|
|
497
497
|
return (t = (await Ae("/users/profile/session/get-edit-session", { params: { field: a } })).data) == null ? void 0 : t.data;
|
|
498
498
|
}
|
|
499
499
|
async function Te(a = "phone") {
|
|
500
500
|
var b;
|
|
501
|
-
const t = (b = (await
|
|
501
|
+
const t = (b = (await te("/users/profile/session/create-if-not-exists", {
|
|
502
502
|
field: a,
|
|
503
503
|
oldValue: U(i.initialPhone)
|
|
504
504
|
})).data) == null ? void 0 : b.data;
|
|
505
|
-
C.value = (t == null ? void 0 : t.sessionId) ?? null, M.value = (t == null ? void 0 : t.step) ?? j.OLD, e.oldPhone = (t == null ? void 0 : t.oldValue) ?? "", e.newPhone = (t == null ? void 0 : t.newValue) ?? "";
|
|
505
|
+
return C.value = (t == null ? void 0 : t.sessionId) ?? null, M.value = (t == null ? void 0 : t.step) ?? j.OLD, e.oldPhone = (t == null ? void 0 : t.oldValue) ?? "", e.newPhone = (t == null ? void 0 : t.newValue) ?? "", t;
|
|
506
506
|
}
|
|
507
507
|
async function Re() {
|
|
508
508
|
try {
|
|
509
509
|
const a = await fe("phone");
|
|
510
|
-
C.value = a.sessionId, M.value = a.step, e.oldPhone = a.oldValue ?? "", a.sessionId
|
|
510
|
+
return C.value = a.sessionId, M.value = a.step, e.oldPhone = a.oldValue ?? "", a.sessionId ? a : await Te("phone");
|
|
511
511
|
} catch {
|
|
512
|
-
await Te("phone");
|
|
512
|
+
return await Te("phone");
|
|
513
513
|
}
|
|
514
514
|
}
|
|
515
515
|
async function Se(a, l = !1) {
|
|
516
516
|
var t;
|
|
517
517
|
try {
|
|
518
|
-
const b = await
|
|
518
|
+
const b = await te(
|
|
519
519
|
"/users/profile/check-throttler",
|
|
520
520
|
{
|
|
521
521
|
method: "sms",
|
|
@@ -539,7 +539,7 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
|
|
|
539
539
|
var b, w, D, A, N;
|
|
540
540
|
f.value = !0;
|
|
541
541
|
try {
|
|
542
|
-
const k = a ?? e.oldPhone, g = await
|
|
542
|
+
const k = a ?? e.oldPhone, g = await te(
|
|
543
543
|
"/users/profile/phone/contact/send-code",
|
|
544
544
|
{
|
|
545
545
|
sessionId: C.value,
|
|
@@ -576,22 +576,22 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
|
|
|
576
576
|
try {
|
|
577
577
|
const V = await fe("phone");
|
|
578
578
|
C.value = V.sessionId, M.value = V.step, e.oldPhone = V.oldValue ?? e.oldPhone, e.newPhone = V.newValue ?? e.newPhone;
|
|
579
|
-
const z = await
|
|
579
|
+
const z = await te("/users/profile/change/phone/match-code", {
|
|
580
580
|
phone: l === j.NEW ? U(e.newPhone) : U(e.oldPhone),
|
|
581
581
|
sessionId: C.value,
|
|
582
582
|
code: a,
|
|
583
583
|
step: l
|
|
584
|
-
}),
|
|
585
|
-
if (
|
|
586
|
-
O.value = !0;
|
|
584
|
+
}), oe = ((t = z.data) == null ? void 0 : t.nextStep) ?? ((w = (b = z.data) == null ? void 0 : b.data) == null ? void 0 : w.nextStep), ce = ((A = (D = z.data) == null ? void 0 : D.data) == null ? void 0 : A.rateLimit) ?? ((N = z.data) == null ? void 0 : N.rateLimit) ?? null;
|
|
585
|
+
if (!(((k = z.data) == null ? void 0 : k.data.success) ?? ((g = z.data) == null ? void 0 : g.success))) {
|
|
586
|
+
n(ce), O.value = !0;
|
|
587
587
|
return;
|
|
588
588
|
}
|
|
589
|
-
if (!
|
|
590
|
-
if (M.value =
|
|
589
|
+
if (!oe) return z;
|
|
590
|
+
if (M.value = oe, oe === j.NEW) {
|
|
591
591
|
const Le = await fe("phone");
|
|
592
592
|
e.oldPhone = Le.oldValue ?? e.oldPhone, e.newPhone = Le.newValue ?? e.newPhone, e.code = "";
|
|
593
593
|
}
|
|
594
|
-
return
|
|
594
|
+
return oe === j.COMPLETED && (e.code = "", u("update-phone-field", e.addPhone), u("submit-phone", { phone: e.oldPhone, code: a }), u("on-toast", { color: "success", text: "Номер телефона изменён" }), u("on-update-jwt", "phone", "edit", e.newPhone), C.value = null, u("close")), z;
|
|
595
595
|
} catch (V) {
|
|
596
596
|
const z = (K = (S = V == null ? void 0 : V.response) == null ? void 0 : S.data) == null ? void 0 : K.rateLimit;
|
|
597
597
|
if (((y = V == null ? void 0 : V.response) == null ? void 0 : y.status) === 429 && z) {
|
|
@@ -624,7 +624,7 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
|
|
|
624
624
|
f.value = !0;
|
|
625
625
|
try {
|
|
626
626
|
if (!C.value) {
|
|
627
|
-
const A = await
|
|
627
|
+
const A = await te("/users/profile/session/bind/create", {
|
|
628
628
|
field: l,
|
|
629
629
|
newValue: U(a || e.addPhone)
|
|
630
630
|
});
|
|
@@ -654,7 +654,7 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
|
|
|
654
654
|
try {
|
|
655
655
|
if (!C.value)
|
|
656
656
|
throw new Error("bind-сессия не найдена. создайте её через createBindSession.");
|
|
657
|
-
const N = a ?? e.addPhone, k = await
|
|
657
|
+
const N = a ?? e.addPhone, k = await te(
|
|
658
658
|
`/users/profile/bind/contact/send-code/${l}`,
|
|
659
659
|
{
|
|
660
660
|
sessionId: C.value,
|
|
@@ -687,13 +687,13 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
|
|
|
687
687
|
const ce = await $e("phone");
|
|
688
688
|
C.value = ce.sessionId, e.addPhone = ce.newValue ?? e.addPhone;
|
|
689
689
|
}
|
|
690
|
-
const y = await
|
|
690
|
+
const y = await te("/users/profile/bind/phone/match-code", {
|
|
691
691
|
phone: U(e.addPhone),
|
|
692
692
|
sessionId: C.value,
|
|
693
693
|
code: a
|
|
694
|
-
}), V = ((l = y.data) == null ? void 0 : l.nextStep) ?? ((b = (t = y.data) == null ? void 0 : t.data) == null ? void 0 : b.nextStep), z = ((D = (w = y.data) == null ? void 0 : w.data) == null ? void 0 : D.rateLimit) ?? ((A = y.data) == null ? void 0 : A.rateLimit) ?? null
|
|
695
|
-
if (
|
|
696
|
-
O.value = !0;
|
|
694
|
+
}), V = ((l = y.data) == null ? void 0 : l.nextStep) ?? ((b = (t = y.data) == null ? void 0 : t.data) == null ? void 0 : b.nextStep), z = ((D = (w = y.data) == null ? void 0 : w.data) == null ? void 0 : D.rateLimit) ?? ((A = y.data) == null ? void 0 : A.rateLimit) ?? null;
|
|
695
|
+
if (!(((N = y.data) == null ? void 0 : N.data.success) ?? ((k = y.data) == null ? void 0 : k.success))) {
|
|
696
|
+
n(z), O.value = !0;
|
|
697
697
|
return;
|
|
698
698
|
}
|
|
699
699
|
return V && V === j.COMPLETED && (e.code = "", u("update-phone-field", e.addPhone), u("submit-phone", { phone: e.addPhone, code: a }), u("on-update-jwt", "phone", "bind", e.addPhone), u("on-toast", { color: "success", text: "Номер телефона успешно привязан к аккаунту" }), C.value = null, u("close")), y;
|
|
@@ -709,14 +709,14 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
|
|
|
709
709
|
}
|
|
710
710
|
}, Ie = async () => {
|
|
711
711
|
};
|
|
712
|
-
return
|
|
712
|
+
return je(async () => {
|
|
713
713
|
f.value = !0;
|
|
714
714
|
const a = await me("phone");
|
|
715
715
|
if (i.mode === "bind" && a === "bind") {
|
|
716
716
|
await We(), f.value = !1;
|
|
717
717
|
return;
|
|
718
718
|
}
|
|
719
|
-
await Re()
|
|
719
|
+
(await Re()).step === "old" && await ee({}), f.value = !1;
|
|
720
720
|
}), x({
|
|
721
721
|
localVisible: h,
|
|
722
722
|
form: e,
|
|
@@ -735,8 +735,8 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
|
|
|
735
735
|
handleNewCodeError: Ve,
|
|
736
736
|
matchBindCode: Ee,
|
|
737
737
|
matchBindCodeError: Ie
|
|
738
|
-
}), (a, l) => (p(), P(
|
|
739
|
-
T(d(
|
|
738
|
+
}), (a, l) => (p(), P(qe, null, [
|
|
739
|
+
T(d(Qe), {
|
|
740
740
|
modelValue: h.value,
|
|
741
741
|
"onUpdate:modelValue": [
|
|
742
742
|
l[15] || (l[15] = (t) => h.value = t),
|
|
@@ -748,18 +748,18 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
|
|
|
748
748
|
"onClick:outside": ue
|
|
749
749
|
}, {
|
|
750
750
|
header: Q(() => [
|
|
751
|
-
q("div",
|
|
752
|
-
T(d(
|
|
751
|
+
q("div", bt, [
|
|
752
|
+
T(d(Xe), {
|
|
753
753
|
"slot-left": !1,
|
|
754
754
|
size: "small",
|
|
755
755
|
borded: !0,
|
|
756
756
|
"no-padding": !1
|
|
757
757
|
}, {
|
|
758
758
|
title: Q(() => [
|
|
759
|
-
q("span",
|
|
759
|
+
q("span", kt, H(d(s) ? X.value : "Добавление номера телефона"), 1)
|
|
760
760
|
]),
|
|
761
761
|
"right-button": Q(() => [
|
|
762
|
-
T(d(
|
|
762
|
+
T(d(Ye), {
|
|
763
763
|
class: "cross",
|
|
764
764
|
onClick: ue
|
|
765
765
|
})
|
|
@@ -769,9 +769,9 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
|
|
|
769
769
|
])
|
|
770
770
|
]),
|
|
771
771
|
default: Q(() => [
|
|
772
|
-
d(s) ? (p(), P("div",
|
|
772
|
+
d(s) ? (p(), P("div", Vt, [
|
|
773
773
|
f.value ? (p(), G(Oe, { key: 0 })) : $("", !0),
|
|
774
|
-
M.value === d(j).OLD ? (p(), G(
|
|
774
|
+
M.value === d(j).OLD ? (p(), G(dt, {
|
|
775
775
|
key: 1,
|
|
776
776
|
phone: e.oldPhone,
|
|
777
777
|
"onUpdate:phone": l[0] || (l[0] = (t) => e.oldPhone = t),
|
|
@@ -787,7 +787,7 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
|
|
|
787
787
|
onOnSendOnlySms: ge,
|
|
788
788
|
onOnMatchCode: xe,
|
|
789
789
|
onOnMatchCodeError: be
|
|
790
|
-
}, null, 8, ["phone", "code", "rate-limit-text", "is-final-limit", "is-not-match-code", "loading", "is-tg"])) : M.value === d(j).NEW ? (p(), G(
|
|
790
|
+
}, null, 8, ["phone", "code", "rate-limit-text", "is-final-limit", "is-not-match-code", "loading", "is-tg"])) : M.value === d(j).NEW ? (p(), G(ft, {
|
|
791
791
|
key: 2,
|
|
792
792
|
phone: e.newPhone,
|
|
793
793
|
"onUpdate:phone": l[4] || (l[4] = (t) => e.newPhone = t),
|
|
@@ -807,12 +807,12 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
|
|
|
807
807
|
onOnMatchCode: ke,
|
|
808
808
|
onOnMatchCodeError: Ve,
|
|
809
809
|
onOnClearCodeError: l[9] || (l[9] = (t) => O.value = !1)
|
|
810
|
-
}, null, 8, ["phone", "oldPhone", "code", "hint-text", "rate-limit-text", "is-final-limit", "is-not-match-code", "loading", "is-tg"])) : M.value === d(j).COMPLETED ? (p(), P("div",
|
|
810
|
+
}, null, 8, ["phone", "oldPhone", "code", "hint-text", "rate-limit-text", "is-final-limit", "is-not-match-code", "loading", "is-tg"])) : M.value === d(j).COMPLETED ? (p(), P("div", $t, [
|
|
811
811
|
q("p", null, H(F("Телефон успешно изменен")), 1)
|
|
812
812
|
])) : $("", !0)
|
|
813
|
-
])) : (p(), P("div",
|
|
813
|
+
])) : (p(), P("div", Bt, [
|
|
814
814
|
f.value ? (p(), G(Oe, { key: 0 })) : $("", !0),
|
|
815
|
-
T(
|
|
815
|
+
T(xt, {
|
|
816
816
|
phone: e.addPhone,
|
|
817
817
|
"onUpdate:phone": l[10] || (l[10] = (t) => e.addPhone = t),
|
|
818
818
|
oldPhone: e.oldPhone,
|
|
@@ -835,7 +835,7 @@ const le = { render: tt }, ot = { class: "dialogDefaultContainerInsideContent" }
|
|
|
835
835
|
]),
|
|
836
836
|
_: 1
|
|
837
837
|
}, 8, ["modelValue"]),
|
|
838
|
-
T(d(
|
|
838
|
+
T(d(Ze))
|
|
839
839
|
], 64));
|
|
840
840
|
}
|
|
841
841
|
});
|
|
@@ -216,9 +216,9 @@ const ra = {
|
|
|
216
216
|
emits: ["clean-input-errors", "on-update-jwt", "update-phone-field", "update-email-field", "on-password-error", "on-toast"],
|
|
217
217
|
setup(s, { emit: n }) {
|
|
218
218
|
const r = n, u = h(!0), { currentDialog: v, dialogPayload: p, closeDialog: U } = X(), l = {
|
|
219
|
-
email: q(() => import("./ProfileEmailDialog-
|
|
220
|
-
phone: q(() => import("./ProfilePhoneDialog-
|
|
221
|
-
password: q(() => import("./ProfilePasswordDialog-
|
|
219
|
+
email: q(() => import("./ProfileEmailDialog-D7OoILE6.js")),
|
|
220
|
+
phone: q(() => import("./ProfilePhoneDialog-Cm_s-YCX.js")),
|
|
221
|
+
password: q(() => import("./ProfilePasswordDialog-Hibce_6h.js"))
|
|
222
222
|
}, i = ({ email: y }) => {
|
|
223
223
|
r("update-email-field", y);
|
|
224
224
|
}, c = ({ phone: y }) => {
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".avatar-input[data-v-965c8738] .p-input-file .overlay{visibility:hidden}.avatar-input[data-v-965c8738] .p-input-file:hover .overlay{visibility:visible}.icon-locked{pointer-events:auto;position:absolute;right:1rem;top:1rem;color:#b6c7d6}.input-wrapper{position:relative;width:100%}.dialogTitle{z-index:10;width:100%;font-size:16px;font-weight:600;line-height:24px;text-align:center;color:#2b3238}.dialogDefaultContainer{display:flex;align-items:flex-start;flex-direction:column;width:100%;gap:32px;margin-top:16px;padding:10px 16px}.dialogDefaultContainerTextHint{font-weight:400;font-size:14px;line-height:20px;text-align:center;color:#1b1b1b}.dialogDefaultContainerRateLimitText{font-weight:600;font-size:14px;line-height:20px;color:#d0dbe4}.dialogDefaultContainerInsideContent{width:100%;display:flex;flex-direction:column;gap:24px}.dialogDefaultContainerRateLimitTextActive{color:#1c7ef1;cursor:pointer}.dialogDefaultContainerSendCodeBySmsText{color:#1c7ef1;cursor:pointer;font-size:14px;font-weight:600;display:flex;align-items:center;text-align:center}.chip{display:flex;align-items:center;justify-content:center;flex-direction:row;gap:4px;height:24px;font-size:12px;font-weight:600;color:#1b1b1b;padding:4px;line-height:16px;background-color:#b6d7ff4d;border-radius:4px;text-align:center;margin-left:5px}.cross{cursor:pointer;text-align:end}.finalLimitWrapper{display:flex;flex-direction:column;align-items:center;padding:12px 0;gap:12px;width:440px;min-height:94px;background:#e4606026;border-radius:8px}.finalLimitText{text-align:center;font-family:Inter,sans-serif;font-size:14px;line-height:20px;color:#5d7285}.finalLimitLink{font-family:Inter,sans-serif;font-weight:600;font-size:14px;line-height:20px;color:#1c7ef1;text-align:center;cursor:pointer;text-decoration:none}.finalLimitLink:hover{text-decoration:underline}.toastWrapper{position:fixed;bottom:1rem;right:1rem;z-index:9999}.toast{width:100%}.base-container{margin-top:1.5rem;display:flex;flex-direction:column;gap:1.25rem;width:490px;height:428px}.icon-disabled{pointer-events:none;position:absolute;right:1rem;top:1rem;color:#b6c7d6}.centered-overlay{position:absolute;left:50%;top:50%;z-index:1000;height:100%;width:100%;transform:translate(-50%,-50%)}.buttons-container{display:flex;flex-wrap:wrap;gap:12px;justify-content:flex-start}.buttons-container PButton{flex:1 1 100%}._loaderOverlay_cpu73_1[data-v-9e697525]{position:absolute;top:0;right:0;bottom:0;left:0;display:flex;justify-content:center;align-items:center;background:#ffffffb3;border-radius:16px;z-index:99}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
|
2
|
-
import { a as o } from "./index-
|
|
2
|
+
import { a as o } from "./index-DgXqm9qe.js";
|
|
3
3
|
export {
|
|
4
4
|
o as PEditUserContact
|
|
5
5
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ref as l, defineComponent as L, createElementBlock as f, openBlock as v, normalizeClass as r, createVNode as E, unref as F, computed as T, renderSlot as d, createCommentVNode as $, createElementVNode as o, toDisplayString as y, createTextVNode as p } from "vue";
|
|
2
2
|
import { PLoader as w } from "@profeat/ui-kit";
|
|
3
|
-
import { _ as g, g as R, p as h } from "./index-
|
|
3
|
+
import { _ as g, g as R, p as h } from "./index-DgXqm9qe.js";
|
|
4
4
|
function C(e) {
|
|
5
5
|
const t = Math.floor(e / 60), a = e % 60;
|
|
6
6
|
return `${String(t).padStart(2, "0")}:${String(a).padStart(2, "0")}`;
|