@yourgoods/ui-smart 0.32.0 → 0.34.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{ProfileEmailDialog-BCBd_O2U.js → ProfileEmailDialog-Bwwb2zxp.js} +150 -150
- package/dist/{ProfilePasswordDialog-BceSLpxy.js → ProfilePasswordDialog-77LP4o3-.js} +1 -1
- package/dist/{ProfilePhoneDialog-6A8CraBl.js → ProfilePhoneDialog-hWwNxuRs.js} +190 -190
- package/dist/components/PEditUserContact/PEditUserContact.vue.d.ts +2 -0
- package/dist/components/PEditUserContact/index.vue.d.ts +2 -0
- package/dist/components/PEditUserContact/types.d.ts +6 -0
- package/dist/{index-D8GpZOPw.js → index-BHTltQNr.js} +255 -217
- package/dist/index.js +2 -2
- package/dist/{useRateLimitToast-DGG5L4f3.js → useRateLimitToast-C2ZlFdsM.js} +1 -1
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { createElementBlock as T, openBlock as h, createElementVNode as F, defineComponent as
|
|
2
|
-
import { T as fe, c as Oe, a as We, u as je, P as Be, b as He } from "./useRateLimitToast-
|
|
3
|
-
import { IconTelegramSm as ge, PInput as
|
|
4
|
-
import { C as
|
|
1
|
+
import { createElementBlock as T, openBlock as h, createElementVNode as F, defineComponent as re, reactive as ue, watch as X, ref as O, toRefs as me, computed as B, createCommentVNode as k, createVNode as S, toDisplayString as W, createBlock as H, createTextVNode as Q, unref as u, isRef as _, withCtx as K, onMounted as Ue, Fragment as qe } from "vue";
|
|
2
|
+
import { T as fe, c as Oe, a as We, u as je, P as Be, b as He } from "./useRateLimitToast-C2ZlFdsM.js";
|
|
3
|
+
import { IconTelegramSm as ge, PInput as ee, IconPhoneMd as Ge, IconMailMd as Le, PButton as De, PDialog as Je, PTopBar as Ke, IconCrossMd as Qe, PTeleportContainer as Xe } from "@profeat/ui-kit";
|
|
4
|
+
import { C as q, t as Ee, p as Z, g as Ie } from "./index-BHTltQNr.js";
|
|
5
5
|
const Ye = {
|
|
6
6
|
xmlns: "http://www.w3.org/2000/svg",
|
|
7
7
|
width: "12",
|
|
@@ -18,13 +18,13 @@ function Ze(N, x) {
|
|
|
18
18
|
}, null, -1)
|
|
19
19
|
]));
|
|
20
20
|
}
|
|
21
|
-
const
|
|
21
|
+
const te = { render: Ze }, _e = { class: "dialogDefaultContainerInsideContent" }, et = { style: { display: "flex", width: "100%", gap: "4px", "align-items": "center", "justify-content": "center", "text-align": "center" } }, tt = { class: "dialogDefaultContainerTextHint" }, ot = { class: "chip" }, nt = {
|
|
22
22
|
key: 0,
|
|
23
23
|
class: "input-wrapper"
|
|
24
24
|
}, at = {
|
|
25
25
|
key: 1,
|
|
26
26
|
class: "input-wrapper"
|
|
27
|
-
}, lt = /* @__PURE__ */
|
|
27
|
+
}, lt = /* @__PURE__ */ re({
|
|
28
28
|
__name: "OldPhoneContent",
|
|
29
29
|
props: {
|
|
30
30
|
phone: {},
|
|
@@ -43,15 +43,15 @@ const oe = { render: Ze }, _e = { class: "dialogDefaultContainerInsideContent" }
|
|
|
43
43
|
},
|
|
44
44
|
emits: ["update:phone", "update:code", "edit", "on-match-code", "on-match-code-error", "on-send-code-again", "on-send-only-sms", "on-clear-code-error"],
|
|
45
45
|
setup(N, { emit: x }) {
|
|
46
|
-
const V = N, c = x, p =
|
|
46
|
+
const V = N, c = x, p = ue({
|
|
47
47
|
touched: { phone: !1, code: !1 },
|
|
48
48
|
phoneModel: V.phone,
|
|
49
49
|
codeModel: V.code
|
|
50
50
|
});
|
|
51
|
-
|
|
51
|
+
X(
|
|
52
52
|
() => p.phoneModel,
|
|
53
53
|
(i) => c("update:phone", i)
|
|
54
|
-
),
|
|
54
|
+
), X(
|
|
55
55
|
() => p.codeModel,
|
|
56
56
|
(i) => c("update:code", i)
|
|
57
57
|
);
|
|
@@ -64,24 +64,24 @@ const oe = { render: Ze }, _e = { class: "dialogDefaultContainerInsideContent" }
|
|
|
64
64
|
const d = i.target;
|
|
65
65
|
let v = ((d == null ? void 0 : d.value) ?? "").replace(/\D/g, "");
|
|
66
66
|
v.length > 4 && (v = v.slice(0, 4)), M.value = v, d && d.value !== v && (d.value = v), v.length === 4 && v !== g.value && (g.value = v, c("on-match-code", { phone: e.value, code: v }));
|
|
67
|
-
},
|
|
67
|
+
}, j = () => c("on-send-code-again", { phone: p.phoneModel }), G = () => {
|
|
68
68
|
console.debug("onSendCodeViaSms"), c("on-send-only-sms", { phone: p.phoneModel });
|
|
69
69
|
}, { phoneModel: e, codeModel: M, touched: C } = me(p), y = B(() => C.value.phone && !e.value.trim() ? "Введите телефон" : V.phoneError), z = B(() => V.isNotMatchCode ? "Неверный код" : C.value.code ? M.value.trim() ? V.codeError ?? null : "Введите код" : "");
|
|
70
70
|
return (i, d) => (h(), T("div", _e, [
|
|
71
71
|
F("div", et, [
|
|
72
|
-
F("div", tt,
|
|
72
|
+
F("div", tt, W(i.hintText), 1),
|
|
73
73
|
F("div", ot, [
|
|
74
|
-
i.isTg ? (h(),
|
|
74
|
+
i.isTg ? (h(), H(u(ge), { key: 0 })) : (h(), H(u(te), {
|
|
75
75
|
key: 1,
|
|
76
76
|
style: { "margin-left": "5px" }
|
|
77
77
|
})),
|
|
78
|
-
|
|
78
|
+
Q(" " + W(i.isTg ? "Telegram" : "СМС"), 1)
|
|
79
79
|
])
|
|
80
80
|
]),
|
|
81
81
|
i.showPhone ? (h(), T("div", nt, [
|
|
82
|
-
S(u(
|
|
82
|
+
S(u(ee), {
|
|
83
83
|
modelValue: u(e),
|
|
84
|
-
"onUpdate:modelValue": d[0] || (d[0] = (v) =>
|
|
84
|
+
"onUpdate:modelValue": d[0] || (d[0] = (v) => _(e) ? e.value = v : null),
|
|
85
85
|
size: "large",
|
|
86
86
|
"text-size": "medium",
|
|
87
87
|
label: "Телефон",
|
|
@@ -97,9 +97,9 @@ const oe = { render: Ze }, _e = { class: "dialogDefaultContainerInsideContent" }
|
|
|
97
97
|
})
|
|
98
98
|
])) : k("", !0),
|
|
99
99
|
i.showCode ? (h(), T("div", at, [
|
|
100
|
-
S(u(
|
|
100
|
+
S(u(ee), {
|
|
101
101
|
modelValue: u(M),
|
|
102
|
-
"onUpdate:modelValue": d[4] || (d[4] = (v) =>
|
|
102
|
+
"onUpdate:modelValue": d[4] || (d[4] = (v) => _(M) ? M.value = v : null),
|
|
103
103
|
size: "large",
|
|
104
104
|
"text-size": "medium",
|
|
105
105
|
label: "Код",
|
|
@@ -113,16 +113,16 @@ const oe = { render: Ze }, _e = { class: "dialogDefaultContainerInsideContent" }
|
|
|
113
113
|
loading: i.loading,
|
|
114
114
|
"rate-limit-text": i.rateLimitText,
|
|
115
115
|
"is-final-limit": i.isFinalLimit,
|
|
116
|
-
"on-send-again":
|
|
116
|
+
"on-send-again": j
|
|
117
117
|
}, {
|
|
118
|
-
extra:
|
|
118
|
+
extra: K(() => [
|
|
119
119
|
i.isTg ? (h(), T("span", {
|
|
120
120
|
key: 0,
|
|
121
121
|
class: "dialogDefaultContainerSendCodeBySmsText",
|
|
122
|
-
onClick:
|
|
122
|
+
onClick: G
|
|
123
123
|
}, [
|
|
124
|
-
|
|
125
|
-
S(u(
|
|
124
|
+
Q(W(i.sendCodeBySmsText) + " ", 1),
|
|
125
|
+
S(u(te), { style: { "margin-left": "5px" } })
|
|
126
126
|
])) : k("", !0)
|
|
127
127
|
]),
|
|
128
128
|
_: 1
|
|
@@ -150,7 +150,7 @@ const oe = { render: Ze }, _e = { class: "dialogDefaultContainerInsideContent" }
|
|
|
150
150
|
}, pt = {
|
|
151
151
|
key: 2,
|
|
152
152
|
class: "input-wrapper"
|
|
153
|
-
}, ht = { key: 3 }, vt = /* @__PURE__ */
|
|
153
|
+
}, ht = { key: 3 }, vt = /* @__PURE__ */ re({
|
|
154
154
|
__name: "NewPhoneContent",
|
|
155
155
|
props: {
|
|
156
156
|
phone: {},
|
|
@@ -168,106 +168,106 @@ const oe = { render: Ze }, _e = { class: "dialogDefaultContainerInsideContent" }
|
|
|
168
168
|
},
|
|
169
169
|
emits: ["update:phone", "update:code", "edit", "on-match-code", "on-match-code-error", "on-send-code", "on-send-code-again", "on-send-only-sms", "on-clear-code-error"],
|
|
170
170
|
setup(N, { emit: x }) {
|
|
171
|
-
const V = N, c = x, p = O(!1), f = O(""), g =
|
|
171
|
+
const V = N, c = x, p = O(!1), f = O(""), g = ue({
|
|
172
172
|
touched: { phone: !1, code: !1 },
|
|
173
173
|
phoneModel: "",
|
|
174
174
|
codeModel: ""
|
|
175
175
|
});
|
|
176
|
-
|
|
176
|
+
X(
|
|
177
177
|
() => g.phoneModel,
|
|
178
178
|
(o) => {
|
|
179
179
|
c("update:phone", o), f.value = "";
|
|
180
180
|
}
|
|
181
|
-
),
|
|
181
|
+
), X(
|
|
182
182
|
() => g.codeModel,
|
|
183
183
|
(o) => c("update:code", o)
|
|
184
184
|
);
|
|
185
|
-
const E = (o) => g.touched[o] = !0,
|
|
185
|
+
const E = (o) => g.touched[o] = !0, j = B(() => {
|
|
186
186
|
const n = g.phoneModel.trim().replace(/[()\-\s]/g, "");
|
|
187
187
|
return /^\+?\d{10,15}$/.test(n);
|
|
188
|
-
}),
|
|
189
|
-
var o
|
|
188
|
+
}), G = B(() => !j.value || !!f.value), e = async () => {
|
|
189
|
+
var o;
|
|
190
190
|
try {
|
|
191
|
-
if (E("phone"), !
|
|
191
|
+
if (E("phone"), !j.value) {
|
|
192
192
|
f.value = "Это не похоже на номер телефона";
|
|
193
193
|
return;
|
|
194
194
|
}
|
|
195
|
-
const
|
|
195
|
+
const n = await Oe(void 0, A(g.phoneModel)), { data: s } = n.data;
|
|
196
196
|
if (console.debug("result for checkAvailability: ", {
|
|
197
|
-
res:
|
|
198
|
-
data:
|
|
199
|
-
}), !(((
|
|
197
|
+
res: n,
|
|
198
|
+
data: s
|
|
199
|
+
}), !(((o = s.data[0]) == null ? void 0 : o.available) ?? !1)) {
|
|
200
200
|
f.value = "Такой номер уже используется";
|
|
201
201
|
return;
|
|
202
202
|
}
|
|
203
203
|
f.value = "", c("on-send-code", { phone: g.phoneModel, prevPhone: V.oldPhone, offLoading: !0 }), p.value = !0;
|
|
204
|
-
} catch (
|
|
205
|
-
console.error("Неизвестная ошибка при проверке доступности телефона:",
|
|
204
|
+
} catch (n) {
|
|
205
|
+
console.error("Неизвестная ошибка при проверке доступности телефона:", n), f.value = "Это не похоже на номер телефона";
|
|
206
206
|
}
|
|
207
207
|
};
|
|
208
208
|
let M = O("");
|
|
209
209
|
const C = (o) => {
|
|
210
210
|
c("on-clear-code-error");
|
|
211
211
|
const n = o.target;
|
|
212
|
-
let
|
|
213
|
-
|
|
212
|
+
let s = ((n == null ? void 0 : n.value) ?? "").replace(/\D/g, "");
|
|
213
|
+
s.length > 4 && (s = s.slice(0, 4)), d.value = s, n && n.value !== s && (n.value = s), s.length === 4 && s !== M.value && (M.value = s, c("on-match-code", { phone: i.value, code: s }));
|
|
214
214
|
}, y = () => {
|
|
215
215
|
c("on-send-code-again", { phone: g.phoneModel });
|
|
216
216
|
}, z = () => {
|
|
217
217
|
console.debug("onSendCodeViaSms"), c("on-send-only-sms", { phone: g.phoneModel });
|
|
218
|
-
}, { phoneModel: i, codeModel: d, touched: v } = me(g),
|
|
218
|
+
}, { phoneModel: i, codeModel: d, touched: v } = me(g), J = B(() => f.value ? f.value : v.value.phone && !i.value.trim() ? "Это не похоже на номер телефона" : V.phoneError || ""), oe = B(() => V.isNotMatchCode ? "Неверный код" : v.value.code ? d.value.trim() ? V.codeError ?? null : "Введите код" : "");
|
|
219
219
|
return (o, n) => (h(), T("div", st, [
|
|
220
220
|
F("div", it, [
|
|
221
|
-
F("div", dt,
|
|
221
|
+
F("div", dt, W(p.value ? "Чтобы продолжить, введите код подтверждения из" : o.hintText), 1),
|
|
222
222
|
p.value ? (h(), T("div", rt, [
|
|
223
|
-
o.isTg ? (h(),
|
|
223
|
+
o.isTg ? (h(), H(u(ge), { key: 0 })) : (h(), H(u(te), {
|
|
224
224
|
key: 1,
|
|
225
225
|
style: { "margin-left": "5px" }
|
|
226
226
|
})),
|
|
227
|
-
|
|
227
|
+
Q(" " + W(o.isTg ? "Telegram" : "СМС"), 1)
|
|
228
228
|
])) : k("", !0)
|
|
229
229
|
]),
|
|
230
230
|
o.showPhone ? (h(), T("div", ut, [
|
|
231
|
-
S(u(
|
|
231
|
+
S(u(ee), {
|
|
232
232
|
modelValue: u(i),
|
|
233
|
-
"onUpdate:modelValue": n[0] || (n[0] = (
|
|
233
|
+
"onUpdate:modelValue": n[0] || (n[0] = (s) => _(i) ? i.value = s : null),
|
|
234
234
|
size: "large",
|
|
235
235
|
"text-size": "medium",
|
|
236
236
|
label: "Телефон",
|
|
237
237
|
type: "tel",
|
|
238
|
-
error:
|
|
239
|
-
onBlur: n[1] || (n[1] = (
|
|
240
|
-
onInput: n[2] || (n[2] = (
|
|
238
|
+
error: J.value,
|
|
239
|
+
onBlur: n[1] || (n[1] = (s) => E("phone")),
|
|
240
|
+
onInput: n[2] || (n[2] = (s) => E("phone"))
|
|
241
241
|
}, null, 8, ["modelValue", "error"]),
|
|
242
242
|
S(u(Le), {
|
|
243
243
|
class: "icon-locked",
|
|
244
|
-
onClick: n[3] || (n[3] = (
|
|
244
|
+
onClick: n[3] || (n[3] = (s) => o.$emit("edit", "phone"))
|
|
245
245
|
})
|
|
246
246
|
])) : k("", !0),
|
|
247
247
|
p.value ? k("", !0) : (h(), T("div", ct, [
|
|
248
248
|
S(u(De), {
|
|
249
249
|
style: { width: "100%" },
|
|
250
|
-
disabled:
|
|
250
|
+
disabled: G.value,
|
|
251
251
|
onClick: e
|
|
252
252
|
}, {
|
|
253
|
-
default:
|
|
254
|
-
|
|
253
|
+
default: K(() => n[6] || (n[6] = [
|
|
254
|
+
Q(" Отправить код ")
|
|
255
255
|
])),
|
|
256
256
|
_: 1,
|
|
257
257
|
__: [6]
|
|
258
258
|
}, 8, ["disabled"])
|
|
259
259
|
])),
|
|
260
260
|
p.value ? (h(), T("div", pt, [
|
|
261
|
-
S(u(
|
|
261
|
+
S(u(ee), {
|
|
262
262
|
modelValue: u(d),
|
|
263
|
-
"onUpdate:modelValue": n[4] || (n[4] = (
|
|
263
|
+
"onUpdate:modelValue": n[4] || (n[4] = (s) => _(d) ? d.value = s : null),
|
|
264
264
|
size: "large",
|
|
265
265
|
"text-size": "medium",
|
|
266
266
|
label: "Код",
|
|
267
267
|
type: "text",
|
|
268
|
-
error:
|
|
268
|
+
error: oe.value,
|
|
269
269
|
onInput: C,
|
|
270
|
-
onBlur: n[5] || (n[5] = (
|
|
270
|
+
onBlur: n[5] || (n[5] = (s) => E("code"))
|
|
271
271
|
}, null, 8, ["modelValue", "error"])
|
|
272
272
|
])) : k("", !0),
|
|
273
273
|
!o.loading && p.value ? (h(), T("div", ht, [
|
|
@@ -277,14 +277,14 @@ const oe = { render: Ze }, _e = { class: "dialogDefaultContainerInsideContent" }
|
|
|
277
277
|
"is-final-limit": o.isFinalLimit,
|
|
278
278
|
"on-send-again": y
|
|
279
279
|
}, {
|
|
280
|
-
extra:
|
|
280
|
+
extra: K(() => [
|
|
281
281
|
o.isTg ? (h(), T("span", {
|
|
282
282
|
key: 0,
|
|
283
283
|
class: "dialogDefaultContainerSendCodeBySmsText",
|
|
284
284
|
onClick: z
|
|
285
285
|
}, [
|
|
286
|
-
|
|
287
|
-
S(u(
|
|
286
|
+
Q(W(o.sendCodeBySmsText) + " ", 1),
|
|
287
|
+
S(u(te), { style: { "margin-left": "5px" } })
|
|
288
288
|
])) : k("", !0)
|
|
289
289
|
]),
|
|
290
290
|
_: 1
|
|
@@ -301,7 +301,7 @@ const oe = { render: Ze }, _e = { class: "dialogDefaultContainerInsideContent" }
|
|
|
301
301
|
}, Pt = {
|
|
302
302
|
key: 2,
|
|
303
303
|
class: "input-wrapper"
|
|
304
|
-
}, Tt = { key: 3 }, St = /* @__PURE__ */
|
|
304
|
+
}, Tt = { key: 3 }, St = /* @__PURE__ */ re({
|
|
305
305
|
__name: "AddNewPhoneContent",
|
|
306
306
|
props: {
|
|
307
307
|
phone: {},
|
|
@@ -319,103 +319,103 @@ const oe = { render: Ze }, _e = { class: "dialogDefaultContainerInsideContent" }
|
|
|
319
319
|
},
|
|
320
320
|
emits: ["update:phone", "update:code", "edit", "on-match-code", "on-match-code-error", "on-send-code", "on-send-code-again", "on-send-only-sms", "on-clear-code-error"],
|
|
321
321
|
setup(N, { emit: x }) {
|
|
322
|
-
const V = N, c = x, p = O(!1), f = O(""), g =
|
|
322
|
+
const V = N, c = x, p = O(!1), f = O(""), g = ue({
|
|
323
323
|
touched: { phone: !1, code: !1 },
|
|
324
324
|
phoneModel: "",
|
|
325
325
|
codeModel: ""
|
|
326
326
|
});
|
|
327
|
-
|
|
327
|
+
X(
|
|
328
328
|
() => g.phoneModel,
|
|
329
329
|
(o) => {
|
|
330
330
|
c("update:phone", o), f.value = "";
|
|
331
331
|
}
|
|
332
|
-
),
|
|
332
|
+
), X(
|
|
333
333
|
() => g.codeModel,
|
|
334
334
|
(o) => c("update:code", o)
|
|
335
335
|
);
|
|
336
|
-
const E = (o) => g.touched[o] = !0,
|
|
336
|
+
const E = (o) => g.touched[o] = !0, j = B(() => {
|
|
337
337
|
const n = g.phoneModel.trim().replace(/[()\-\s]/g, "");
|
|
338
338
|
return /^\+?\d{10,15}$/.test(n);
|
|
339
|
-
}),
|
|
340
|
-
var o
|
|
339
|
+
}), G = B(() => !j.value || !!f.value), e = async () => {
|
|
340
|
+
var o;
|
|
341
341
|
try {
|
|
342
|
-
if (E("phone"), !
|
|
342
|
+
if (E("phone"), !j.value) {
|
|
343
343
|
f.value = "Это не похоже на номер телефона";
|
|
344
344
|
return;
|
|
345
345
|
}
|
|
346
|
-
const
|
|
347
|
-
if (!(((
|
|
346
|
+
const n = await Oe(void 0, A(g.phoneModel)), { data: s } = n.data;
|
|
347
|
+
if (!(((o = s.data[0]) == null ? void 0 : o.available) ?? !1)) {
|
|
348
348
|
f.value = "Такой номер уже используется";
|
|
349
349
|
return;
|
|
350
350
|
}
|
|
351
351
|
f.value = "", c("on-send-code", { phone: g.phoneModel, prevPhone: V.oldPhone, offLoading: !0 }), p.value = !0;
|
|
352
|
-
} catch (
|
|
353
|
-
console.error("Неизвестная ошибка при проверке доступности телефона:",
|
|
352
|
+
} catch (n) {
|
|
353
|
+
console.error("Неизвестная ошибка при проверке доступности телефона:", n), f.value = "Это не похоже на номер телефона";
|
|
354
354
|
}
|
|
355
355
|
};
|
|
356
356
|
let M = "";
|
|
357
357
|
const C = (o) => {
|
|
358
358
|
c("on-clear-code-error");
|
|
359
359
|
const n = o.target;
|
|
360
|
-
let
|
|
361
|
-
|
|
360
|
+
let s = n.value.replace(/\D/g, "");
|
|
361
|
+
s.length > 4 && (s = s.slice(0, 4), n.value = s), g.codeModel = s, s.length === 4 && s !== M && (M = s, c("on-match-code", { phone: g.phoneModel, code: s }));
|
|
362
362
|
}, y = () => {
|
|
363
363
|
c("on-send-code-again", { phone: g.phoneModel });
|
|
364
364
|
}, z = () => {
|
|
365
365
|
console.debug("onSendCodeViaSms"), c("on-send-only-sms", { phone: g.phoneModel });
|
|
366
|
-
}, { phoneModel: i, codeModel: d, touched: v } = me(g),
|
|
366
|
+
}, { phoneModel: i, codeModel: d, touched: v } = me(g), J = B(() => f.value ? f.value : v.value.phone && !i.value.trim() ? "Это не похоже на номер телефона" : V.phoneError || ""), oe = B(() => V.isNotMatchCode ? "Неверный код" : g.touched.code ? d.value.trim() ? V.codeError ?? null : "Введите код" : "");
|
|
367
367
|
return (o, n) => (h(), T("div", mt, [
|
|
368
368
|
F("div", ft, [
|
|
369
|
-
F("div", gt,
|
|
369
|
+
F("div", gt, W(p.value ? "Чтобы продолжить, введите код подтверждения из" : o.hintText), 1),
|
|
370
370
|
F("div", yt, [
|
|
371
|
-
o.isTg ? (h(),
|
|
371
|
+
o.isTg ? (h(), H(u(ge), { key: 0 })) : (h(), H(u(te), {
|
|
372
372
|
key: 1,
|
|
373
373
|
style: { "margin-left": "5px" }
|
|
374
374
|
})),
|
|
375
|
-
|
|
375
|
+
Q(" " + W(o.isTg ? "Telegram" : "СМС"), 1)
|
|
376
376
|
])
|
|
377
377
|
]),
|
|
378
378
|
o.showPhone ? (h(), T("div", Ct, [
|
|
379
|
-
S(u(
|
|
379
|
+
S(u(ee), {
|
|
380
380
|
modelValue: u(i),
|
|
381
|
-
"onUpdate:modelValue": n[0] || (n[0] = (
|
|
381
|
+
"onUpdate:modelValue": n[0] || (n[0] = (s) => _(i) ? i.value = s : null),
|
|
382
382
|
size: "large",
|
|
383
383
|
"text-size": "medium",
|
|
384
384
|
label: "Телефон",
|
|
385
385
|
type: "tel",
|
|
386
|
-
error:
|
|
387
|
-
onBlur: n[1] || (n[1] = (
|
|
388
|
-
onInput: n[2] || (n[2] = (
|
|
386
|
+
error: J.value,
|
|
387
|
+
onBlur: n[1] || (n[1] = (s) => E("phone")),
|
|
388
|
+
onInput: n[2] || (n[2] = (s) => E("phone"))
|
|
389
389
|
}, null, 8, ["modelValue", "error"]),
|
|
390
390
|
S(u(Le), {
|
|
391
391
|
class: "icon-locked",
|
|
392
|
-
onClick: n[3] || (n[3] = (
|
|
392
|
+
onClick: n[3] || (n[3] = (s) => o.$emit("edit", "phone"))
|
|
393
393
|
})
|
|
394
394
|
])) : k("", !0),
|
|
395
395
|
p.value ? k("", !0) : (h(), T("div", wt, [
|
|
396
396
|
S(u(De), {
|
|
397
397
|
style: { width: "100%" },
|
|
398
|
-
disabled:
|
|
398
|
+
disabled: G.value,
|
|
399
399
|
onClick: e
|
|
400
400
|
}, {
|
|
401
|
-
default:
|
|
402
|
-
|
|
401
|
+
default: K(() => n[6] || (n[6] = [
|
|
402
|
+
Q(" Отправить код ")
|
|
403
403
|
])),
|
|
404
404
|
_: 1,
|
|
405
405
|
__: [6]
|
|
406
406
|
}, 8, ["disabled"])
|
|
407
407
|
])),
|
|
408
408
|
p.value ? (h(), T("div", Pt, [
|
|
409
|
-
S(u(
|
|
409
|
+
S(u(ee), {
|
|
410
410
|
modelValue: u(d),
|
|
411
|
-
"onUpdate:modelValue": n[4] || (n[4] = (
|
|
411
|
+
"onUpdate:modelValue": n[4] || (n[4] = (s) => _(d) ? d.value = s : null),
|
|
412
412
|
size: "large",
|
|
413
413
|
"text-size": "medium",
|
|
414
414
|
label: "Код",
|
|
415
415
|
type: "text",
|
|
416
|
-
error:
|
|
416
|
+
error: oe.value,
|
|
417
417
|
onInput: C,
|
|
418
|
-
onBlur: n[5] || (n[5] = (
|
|
418
|
+
onBlur: n[5] || (n[5] = (s) => E("code"))
|
|
419
419
|
}, null, 8, ["modelValue", "error"])
|
|
420
420
|
])) : k("", !0),
|
|
421
421
|
p.value ? (h(), T("div", Tt, [
|
|
@@ -425,14 +425,14 @@ const oe = { render: Ze }, _e = { class: "dialogDefaultContainerInsideContent" }
|
|
|
425
425
|
"is-final-limit": o.isFinalLimit,
|
|
426
426
|
"on-send-again": y
|
|
427
427
|
}, {
|
|
428
|
-
extra:
|
|
428
|
+
extra: K(() => [
|
|
429
429
|
o.isTg ? (h(), T("span", {
|
|
430
430
|
key: 0,
|
|
431
431
|
class: "dialogDefaultContainerSendCodeBySmsText",
|
|
432
432
|
onClick: z
|
|
433
433
|
}, [
|
|
434
|
-
|
|
435
|
-
S(u(
|
|
434
|
+
Q(W(o.sendCodeBySmsText) + " ", 1),
|
|
435
|
+
S(u(te), { style: { "margin-left": "5px" } })
|
|
436
436
|
])) : k("", !0)
|
|
437
437
|
]),
|
|
438
438
|
_: 1
|
|
@@ -446,7 +446,7 @@ const oe = { render: Ze }, _e = { class: "dialogDefaultContainerInsideContent" }
|
|
|
446
446
|
}, Vt = { key: 3 }, kt = {
|
|
447
447
|
key: 1,
|
|
448
448
|
class: "dialogDefaultContainer"
|
|
449
|
-
},
|
|
449
|
+
}, ae = 3, Ot = /* @__PURE__ */ re({
|
|
450
450
|
__name: "ProfilePhoneDialog",
|
|
451
451
|
props: {
|
|
452
452
|
modelValue: { type: Boolean },
|
|
@@ -460,45 +460,45 @@ const oe = { render: Ze }, _e = { class: "dialogDefaultContainerInsideContent" }
|
|
|
460
460
|
emits: ["update:modelValue", "submit-phone", "edit", "close", "clean-input-errors", "on-update-jwt", "update-phone-field", "on-toast"],
|
|
461
461
|
setup(N, { expose: x, emit: V }) {
|
|
462
462
|
const c = N, p = V, f = O(c.modelValue);
|
|
463
|
-
|
|
463
|
+
X(
|
|
464
464
|
() => c.modelValue,
|
|
465
|
-
(
|
|
466
|
-
),
|
|
467
|
-
const g = B(() => c.language ?? "ru"), E = (
|
|
465
|
+
(l) => f.value = l
|
|
466
|
+
), X(f, (l) => p("update:modelValue", l));
|
|
467
|
+
const g = B(() => c.language ?? "ru"), E = (l) => Ee[g.value] && Ee[g.value][l] || (c.title ?? l), j = B(() => c.title ?? E("Смена номера телефона")), G = B(() => c.hintText ?? E("Чтобы продолжить, введите новый номер")), e = ue({
|
|
468
468
|
oldPhone: c.initialPhone ?? "",
|
|
469
469
|
newPhone: "",
|
|
470
470
|
code: "",
|
|
471
471
|
addPhone: "",
|
|
472
472
|
addCode: ""
|
|
473
|
-
}), M = O(
|
|
474
|
-
async function pe(
|
|
473
|
+
}), M = O(q.OLD), C = O(null), y = O(!1), z = O(!1), i = O("tg"), d = B(() => i.value === "tg"), v = O(!1), { startTimer: J, remainingSeconds: oe, isAvailableForSendAgain: o, totalRateAttempts: n, currentRateAttempt: s } = We(), { showRateLimitToast: le } = He(p), { isEditFlow: ce, getFlow: Ae } = je(O(c.mode)), se = B(() => o.value ? "Повторить" : `${oe.value}`), ne = O(ae), ie = B(() => ne.value === 0), Ne = (l) => new Promise((a) => setTimeout(a, l));
|
|
474
|
+
async function pe(l = "email") {
|
|
475
475
|
var t;
|
|
476
|
-
return (t = (await Ie("/users/profile/session/get-edit-session", { params: { field:
|
|
476
|
+
return (t = (await Ie("/users/profile/session/get-edit-session", { params: { field: l } })).data) == null ? void 0 : t.data;
|
|
477
477
|
}
|
|
478
|
-
async function ye(
|
|
478
|
+
async function ye(l = "phone") {
|
|
479
479
|
var b;
|
|
480
|
-
const t = (b = (await
|
|
481
|
-
field:
|
|
480
|
+
const t = (b = (await Z("/users/profile/session/create-if-not-exists", {
|
|
481
|
+
field: l,
|
|
482
482
|
oldValue: A(c.initialPhone)
|
|
483
483
|
})).data) == null ? void 0 : b.data;
|
|
484
|
-
C.value = (t == null ? void 0 : t.sessionId) ?? null, M.value = (t == null ? void 0 : t.step) ??
|
|
484
|
+
C.value = (t == null ? void 0 : t.sessionId) ?? null, M.value = (t == null ? void 0 : t.step) ?? q.OLD, e.oldPhone = (t == null ? void 0 : t.oldValue) ?? "", e.newPhone = (t == null ? void 0 : t.newValue) ?? "";
|
|
485
485
|
}
|
|
486
486
|
async function ze() {
|
|
487
487
|
try {
|
|
488
|
-
const
|
|
489
|
-
C.value =
|
|
488
|
+
const l = await pe("phone");
|
|
489
|
+
C.value = l.sessionId, M.value = l.step, e.oldPhone = l.oldValue ?? "", l.sessionId || await ye("phone");
|
|
490
490
|
} catch {
|
|
491
491
|
await ye("phone");
|
|
492
492
|
}
|
|
493
493
|
}
|
|
494
|
-
async function Ce(
|
|
494
|
+
async function Ce(l, a = !1) {
|
|
495
495
|
var t;
|
|
496
496
|
try {
|
|
497
|
-
const b = await
|
|
497
|
+
const b = await Z(
|
|
498
498
|
"/users/profile/check-throttler",
|
|
499
499
|
{
|
|
500
500
|
method: "sms",
|
|
501
|
-
phone: A(
|
|
501
|
+
phone: A(l),
|
|
502
502
|
isInvite: a
|
|
503
503
|
},
|
|
504
504
|
{
|
|
@@ -509,16 +509,16 @@ const oe = { render: Ze }, _e = { class: "dialogDefaultContainerInsideContent" }
|
|
|
509
509
|
);
|
|
510
510
|
await Ne(1e3);
|
|
511
511
|
const w = (t = b.data) == null ? void 0 : t.data;
|
|
512
|
-
return w ? (w.restTimeSec > 0 ? (
|
|
512
|
+
return w ? (w.restTimeSec > 0 ? (J(w.restTimeSec), o.value = !1, n.value = w.attempts.total, s.value = w.attempts.total - w.attempts.available, ne.value = w.attempts.available ?? ae) : o.value = !0, w) : null;
|
|
513
513
|
} catch {
|
|
514
514
|
return null;
|
|
515
515
|
}
|
|
516
516
|
}
|
|
517
|
-
const he = async ({ phone:
|
|
518
|
-
var b, w, L, D,
|
|
517
|
+
const he = async ({ phone: l }) => (v.value = !0, await Y({ value: l, isOnlySms: !0 })), Y = async ({ value: l, isOnlySms: a, offLoading: t } = {}) => {
|
|
518
|
+
var b, w, L, D, R, $;
|
|
519
519
|
y.value = !0;
|
|
520
520
|
try {
|
|
521
|
-
const m =
|
|
521
|
+
const m = l ?? e.oldPhone, r = await Z(
|
|
522
522
|
"/users/profile/phone/contact/send-code",
|
|
523
523
|
{
|
|
524
524
|
sessionId: C.value,
|
|
@@ -538,62 +538,62 @@ const oe = { render: Ze }, _e = { class: "dialogDefaultContainerInsideContent" }
|
|
|
538
538
|
const P = (w = (b = r == null ? void 0 : r.data) == null ? void 0 : b.data) == null ? void 0 : w.deliveryType;
|
|
539
539
|
if ((P === "tg" || P === "sms") && (i.value = P, P === "tg" && (v.value = !1)), console.debug("sendContactCode before обработка 403 tooManyRequests", r), (r == null ? void 0 : r.status) === 403 && ((L = r.data) != null && L.tooManyRequests)) {
|
|
540
540
|
console.debug("sendContactCode IN обработка 403 tooManyRequests", r);
|
|
541
|
-
const I = (
|
|
541
|
+
const I = (R = (D = r.data) == null ? void 0 : D.tooManyRequests) == null ? void 0 : R.type;
|
|
542
542
|
i.value = I;
|
|
543
|
-
const
|
|
544
|
-
return
|
|
543
|
+
const U = r.data.tooManyRequests;
|
|
544
|
+
return U.restTimeSec > 0 ? (J(U.restTimeSec), n.value = U.attempts.total, s.value = U.attempts.total - U.attempts.available, ne.value = U.attempts.available ?? ae) : o.value = !0, r;
|
|
545
545
|
}
|
|
546
546
|
return console.debug("sendContactCode after обработка 403 tooManyRequests", r), await Ce(m), r;
|
|
547
547
|
} catch (m) {
|
|
548
548
|
const r = ($ = m == null ? void 0 : m.data) == null ? void 0 : $.tooManyRequests;
|
|
549
549
|
if ((m == null ? void 0 : m.status) === 403 && r) {
|
|
550
550
|
const { restTimeSec: P, attempts: I } = r;
|
|
551
|
-
return P > 0 ? (
|
|
551
|
+
return P > 0 ? (J(P), n.value = I.total, s.value = I.total - I.available, ne.value = I.available ?? ae) : o.value = !0, m;
|
|
552
552
|
}
|
|
553
553
|
throw m;
|
|
554
554
|
} finally {
|
|
555
555
|
y.value = !1, t && (y.value = !1);
|
|
556
556
|
}
|
|
557
|
-
}, we = async (
|
|
558
|
-
var t, b, w, L, D,
|
|
557
|
+
}, we = async (l, a) => {
|
|
558
|
+
var t, b, w, L, D, R, $, m;
|
|
559
559
|
y.value = !0;
|
|
560
560
|
try {
|
|
561
561
|
const r = await pe("phone");
|
|
562
562
|
C.value = r.sessionId, M.value = r.step, e.oldPhone = r.oldValue ?? e.oldPhone, e.newPhone = r.newValue ?? e.newPhone;
|
|
563
|
-
const P = await
|
|
564
|
-
phone: a ===
|
|
563
|
+
const P = await Z("/users/profile/change/phone/match-code", {
|
|
564
|
+
phone: a === q.NEW ? A(e.newPhone) : A(e.oldPhone),
|
|
565
565
|
sessionId: C.value,
|
|
566
|
-
code:
|
|
566
|
+
code: l,
|
|
567
567
|
step: a
|
|
568
|
-
}), I = ((t = P.data) == null ? void 0 : t.nextStep) ?? ((w = (b = P.data) == null ? void 0 : b.data) == null ? void 0 : w.nextStep),
|
|
569
|
-
if (
|
|
568
|
+
}), I = ((t = P.data) == null ? void 0 : t.nextStep) ?? ((w = (b = P.data) == null ? void 0 : b.data) == null ? void 0 : w.nextStep), U = ((D = (L = P.data) == null ? void 0 : L.data) == null ? void 0 : D.rateLimit) ?? ((R = P.data) == null ? void 0 : R.rateLimit) ?? null, Re = (($ = P.data) == null ? void 0 : $.data.success) ?? ((m = P.data) == null ? void 0 : m.success);
|
|
569
|
+
if (le(U), !Re) {
|
|
570
570
|
z.value = !0;
|
|
571
571
|
return;
|
|
572
572
|
}
|
|
573
573
|
if (!I) return P;
|
|
574
|
-
if (M.value = I, I ===
|
|
574
|
+
if (M.value = I, I === q.NEW) {
|
|
575
575
|
const $e = await pe("phone");
|
|
576
576
|
e.oldPhone = $e.oldValue ?? e.oldPhone, e.newPhone = $e.newValue ?? e.newPhone, e.code = "";
|
|
577
577
|
}
|
|
578
|
-
return I ===
|
|
578
|
+
return I === q.COMPLETED && (e.code = "", p("update-phone-field", e.addPhone), p("submit-phone", { phone: e.oldPhone, code: l }), p("on-toast", { color: "success", text: "Номер телефона изменён" }), p("on-update-jwt", "phone", "edit", e.newPhone), C.value = null, p("close")), P;
|
|
579
579
|
} finally {
|
|
580
580
|
y.value = !1;
|
|
581
581
|
}
|
|
582
|
-
}, Pe = ({ code:
|
|
583
|
-
function Te(
|
|
582
|
+
}, Pe = ({ code: l }) => we(l, q.OLD);
|
|
583
|
+
function Te(l) {
|
|
584
584
|
}
|
|
585
|
-
const Se = ({ code:
|
|
586
|
-
function Me(
|
|
585
|
+
const Se = ({ code: l }) => we(l, q.NEW);
|
|
586
|
+
function Me(l) {
|
|
587
587
|
}
|
|
588
|
-
const
|
|
588
|
+
const de = () => {
|
|
589
589
|
p("close"), f.value = !1;
|
|
590
590
|
};
|
|
591
|
-
async function xe(
|
|
591
|
+
async function xe(l = "phone") {
|
|
592
592
|
var t;
|
|
593
|
-
return (t = (await Ie("/users/profile/session/get-bind-session", { params: { field:
|
|
593
|
+
return (t = (await Ie("/users/profile/session/get-bind-session", { params: { field: l } })).data) == null ? void 0 : t.data;
|
|
594
594
|
}
|
|
595
595
|
async function be({
|
|
596
|
-
value:
|
|
596
|
+
value: l,
|
|
597
597
|
field: a = "phone",
|
|
598
598
|
offLoading: t = !0
|
|
599
599
|
}) {
|
|
@@ -601,9 +601,9 @@ const oe = { render: Ze }, _e = { class: "dialogDefaultContainerInsideContent" }
|
|
|
601
601
|
y.value = !0;
|
|
602
602
|
try {
|
|
603
603
|
if (!C.value) {
|
|
604
|
-
const D = await
|
|
604
|
+
const D = await Z("/users/profile/session/bind/create", {
|
|
605
605
|
field: a,
|
|
606
|
-
newValue: A(
|
|
606
|
+
newValue: A(l || e.addPhone)
|
|
607
607
|
});
|
|
608
608
|
if (C.value = ((w = (b = D.data) == null ? void 0 : b.data) == null ? void 0 : w.sessionId) ?? ((L = D.data) == null ? void 0 : L.sessionId) ?? null, !C.value)
|
|
609
609
|
throw new Error("не удалось создать bind-сессию (sessionId отсутствует)");
|
|
@@ -614,14 +614,14 @@ const oe = { render: Ze }, _e = { class: "dialogDefaultContainerInsideContent" }
|
|
|
614
614
|
}
|
|
615
615
|
async function Fe() {
|
|
616
616
|
try {
|
|
617
|
-
const
|
|
618
|
-
C.value =
|
|
617
|
+
const l = await xe("phone");
|
|
618
|
+
C.value = l.sessionId, M.value = l.step, e.addPhone = l.newValue ?? "", l.sessionId || await be({ field: "phone", value: e.addPhone });
|
|
619
619
|
} catch {
|
|
620
620
|
await be({ field: "phone", value: e.addPhone });
|
|
621
621
|
}
|
|
622
622
|
}
|
|
623
623
|
const ve = async ({
|
|
624
|
-
value:
|
|
624
|
+
value: l,
|
|
625
625
|
field: a = "phone",
|
|
626
626
|
isOnlySms: t = !1,
|
|
627
627
|
offLoading: b = !0
|
|
@@ -631,11 +631,11 @@ const oe = { render: Ze }, _e = { class: "dialogDefaultContainerInsideContent" }
|
|
|
631
631
|
try {
|
|
632
632
|
if (!C.value)
|
|
633
633
|
throw new Error("bind-сессия не найдена. создайте её через createBindSession.");
|
|
634
|
-
const
|
|
634
|
+
const R = l ?? e.addPhone, $ = await Z(
|
|
635
635
|
`/users/profile/bind/contact/send-code/${a}`,
|
|
636
636
|
{
|
|
637
637
|
sessionId: C.value,
|
|
638
|
-
phone: A(
|
|
638
|
+
phone: A(R),
|
|
639
639
|
provider: c.provider,
|
|
640
640
|
isOnlySms: t ?? !1
|
|
641
641
|
},
|
|
@@ -649,31 +649,31 @@ const oe = { render: Ze }, _e = { class: "dialogDefaultContainerInsideContent" }
|
|
|
649
649
|
const r = (D = $.data) == null ? void 0 : D.tooManyRequests;
|
|
650
650
|
if ($.status === 403 && r) {
|
|
651
651
|
const I = r == null ? void 0 : r.type;
|
|
652
|
-
return i.value = I, r.restTimeSec > 0 ? (
|
|
652
|
+
return i.value = I, r.restTimeSec > 0 ? (J(r.restTimeSec), n.value = r.attempts.total, s.value = r.attempts.total - r.attempts.available, ne.value = r.attempts.available ?? ae) : o.value = !0, $;
|
|
653
653
|
}
|
|
654
|
-
const P = await Ce(
|
|
655
|
-
return P && P.restTimeSec > 0 ? (
|
|
654
|
+
const P = await Ce(R);
|
|
655
|
+
return P && P.restTimeSec > 0 ? (J(P.restTimeSec), o.value = !1) : o.value = !0, $;
|
|
656
656
|
} finally {
|
|
657
657
|
b && (y.value = !1);
|
|
658
658
|
}
|
|
659
|
-
}, Ve = async ({ code:
|
|
660
|
-
var a, t, b, w, L, D,
|
|
659
|
+
}, Ve = async ({ code: l }) => {
|
|
660
|
+
var a, t, b, w, L, D, R, $;
|
|
661
661
|
y.value = !0;
|
|
662
662
|
try {
|
|
663
663
|
if (!C.value) {
|
|
664
|
-
const
|
|
665
|
-
C.value =
|
|
664
|
+
const U = await xe("phone");
|
|
665
|
+
C.value = U.sessionId, e.addPhone = U.newValue ?? e.addPhone;
|
|
666
666
|
}
|
|
667
|
-
const m = await
|
|
667
|
+
const m = await Z("/users/profile/bind/phone/match-code", {
|
|
668
668
|
phone: A(e.addPhone),
|
|
669
669
|
sessionId: C.value,
|
|
670
|
-
code:
|
|
671
|
-
}), r = ((a = m.data) == null ? void 0 : a.nextStep) ?? ((b = (t = m.data) == null ? void 0 : t.data) == null ? void 0 : b.nextStep), P = ((L = (w = m.data) == null ? void 0 : w.data) == null ? void 0 : L.rateLimit) ?? ((D = m.data) == null ? void 0 : D.rateLimit) ?? null, I = ((
|
|
672
|
-
if (
|
|
670
|
+
code: l
|
|
671
|
+
}), r = ((a = m.data) == null ? void 0 : a.nextStep) ?? ((b = (t = m.data) == null ? void 0 : t.data) == null ? void 0 : b.nextStep), P = ((L = (w = m.data) == null ? void 0 : w.data) == null ? void 0 : L.rateLimit) ?? ((D = m.data) == null ? void 0 : D.rateLimit) ?? null, I = ((R = m.data) == null ? void 0 : R.data.success) ?? (($ = m.data) == null ? void 0 : $.success);
|
|
672
|
+
if (le(P), !I) {
|
|
673
673
|
z.value = !0;
|
|
674
674
|
return;
|
|
675
675
|
}
|
|
676
|
-
return r && r ===
|
|
676
|
+
return r && r === q.COMPLETED && (e.code = "", p("update-phone-field", e.addPhone), p("submit-phone", { phone: e.addPhone, code: l }), p("on-update-jwt", "phone", "bind", e.addPhone), p("on-toast", { color: "success", text: "Номер телефона успешно привязан к аккаунту" }), C.value = null, p("close")), m;
|
|
677
677
|
} finally {
|
|
678
678
|
y.value = !1;
|
|
679
679
|
}
|
|
@@ -681,23 +681,23 @@ const oe = { render: Ze }, _e = { class: "dialogDefaultContainerInsideContent" }
|
|
|
681
681
|
};
|
|
682
682
|
return Ue(async () => {
|
|
683
683
|
y.value = !0;
|
|
684
|
-
const
|
|
685
|
-
if (c.mode === "bind" &&
|
|
684
|
+
const l = await Ae("phone");
|
|
685
|
+
if (c.mode === "bind" && l === "bind") {
|
|
686
686
|
await Fe(), y.value = !1;
|
|
687
687
|
return;
|
|
688
688
|
}
|
|
689
|
-
await ze(), await
|
|
689
|
+
await ze(), await Y({});
|
|
690
690
|
}), x({
|
|
691
691
|
localVisible: f,
|
|
692
692
|
form: e,
|
|
693
693
|
currentStep: M,
|
|
694
694
|
loading: y,
|
|
695
|
-
rateLimitText:
|
|
696
|
-
isAvailable:
|
|
697
|
-
title:
|
|
698
|
-
hintText:
|
|
699
|
-
handleClose:
|
|
700
|
-
sendContactCode:
|
|
695
|
+
rateLimitText: se,
|
|
696
|
+
isAvailable: ie,
|
|
697
|
+
title: j,
|
|
698
|
+
hintText: G,
|
|
699
|
+
handleClose: de,
|
|
700
|
+
sendContactCode: Y,
|
|
701
701
|
sendBindContactCode: ve,
|
|
702
702
|
handleOldCodeSuccess: Pe,
|
|
703
703
|
handleOldCodeError: Te,
|
|
@@ -705,19 +705,19 @@ const oe = { render: Ze }, _e = { class: "dialogDefaultContainerInsideContent" }
|
|
|
705
705
|
handleNewCodeError: Me,
|
|
706
706
|
matchBindCode: Ve,
|
|
707
707
|
matchBindCodeError: ke
|
|
708
|
-
}), (
|
|
708
|
+
}), (l, a) => (h(), T(qe, null, [
|
|
709
709
|
S(u(Je), {
|
|
710
710
|
modelValue: f.value,
|
|
711
711
|
"onUpdate:modelValue": [
|
|
712
712
|
a[15] || (a[15] = (t) => f.value = t),
|
|
713
|
-
|
|
713
|
+
de
|
|
714
714
|
],
|
|
715
715
|
width: "small",
|
|
716
716
|
"auto-height": !0,
|
|
717
717
|
"close-on-click-outside": !0,
|
|
718
|
-
"onClick:outside":
|
|
718
|
+
"onClick:outside": de
|
|
719
719
|
}, {
|
|
720
|
-
header:
|
|
720
|
+
header: K(() => [
|
|
721
721
|
F("div", Mt, [
|
|
722
722
|
S(u(Ke), {
|
|
723
723
|
"slot-left": !1,
|
|
@@ -725,39 +725,39 @@ const oe = { render: Ze }, _e = { class: "dialogDefaultContainerInsideContent" }
|
|
|
725
725
|
borded: !0,
|
|
726
726
|
"no-padding": !1
|
|
727
727
|
}, {
|
|
728
|
-
title:
|
|
729
|
-
F("span", xt,
|
|
728
|
+
title: K(() => [
|
|
729
|
+
F("span", xt, W(u(ce) ? j.value : "Добавление номера телефона"), 1)
|
|
730
730
|
]),
|
|
731
|
-
"right-button":
|
|
731
|
+
"right-button": K(() => [
|
|
732
732
|
S(u(Qe), {
|
|
733
733
|
class: "cross",
|
|
734
|
-
onClick:
|
|
734
|
+
onClick: de
|
|
735
735
|
})
|
|
736
736
|
]),
|
|
737
737
|
_: 1
|
|
738
738
|
})
|
|
739
739
|
])
|
|
740
740
|
]),
|
|
741
|
-
default:
|
|
742
|
-
u(
|
|
743
|
-
y.value ? (h(),
|
|
744
|
-
M.value === u(
|
|
741
|
+
default: K(() => [
|
|
742
|
+
u(ce) ? (h(), T("div", bt, [
|
|
743
|
+
y.value ? (h(), H(Be, { key: 0 })) : k("", !0),
|
|
744
|
+
M.value === u(q).OLD ? (h(), H(lt, {
|
|
745
745
|
key: 1,
|
|
746
746
|
phone: e.oldPhone,
|
|
747
747
|
"onUpdate:phone": a[0] || (a[0] = (t) => e.oldPhone = t),
|
|
748
748
|
code: e.code,
|
|
749
749
|
"onUpdate:code": a[1] || (a[1] = (t) => e.code = t),
|
|
750
|
-
"rate-limit-text":
|
|
751
|
-
"is-final-limit":
|
|
750
|
+
"rate-limit-text": se.value,
|
|
751
|
+
"is-final-limit": ie.value,
|
|
752
752
|
"is-not-match-code": z.value,
|
|
753
753
|
loading: y.value,
|
|
754
754
|
"is-tg": d.value,
|
|
755
|
-
onOnSendCode: a[2] || (a[2] = (t) =>
|
|
756
|
-
onOnSendCodeAgain: a[3] || (a[3] = (t) =>
|
|
755
|
+
onOnSendCode: a[2] || (a[2] = (t) => Y({ value: e.oldPhone })),
|
|
756
|
+
onOnSendCodeAgain: a[3] || (a[3] = (t) => Y({ value: e.oldPhone, isOnlySms: !d.value && v.value })),
|
|
757
757
|
onOnSendOnlySms: he,
|
|
758
758
|
onOnMatchCode: Pe,
|
|
759
759
|
onOnMatchCodeError: Te
|
|
760
|
-
}, null, 8, ["phone", "code", "rate-limit-text", "is-final-limit", "is-not-match-code", "loading", "is-tg"])) : M.value === u(
|
|
760
|
+
}, null, 8, ["phone", "code", "rate-limit-text", "is-final-limit", "is-not-match-code", "loading", "is-tg"])) : M.value === u(q).NEW ? (h(), H(vt, {
|
|
761
761
|
key: 2,
|
|
762
762
|
phone: e.newPhone,
|
|
763
763
|
"onUpdate:phone": a[4] || (a[4] = (t) => e.newPhone = t),
|
|
@@ -765,23 +765,23 @@ const oe = { render: Ze }, _e = { class: "dialogDefaultContainerInsideContent" }
|
|
|
765
765
|
"onUpdate:oldPhone": a[5] || (a[5] = (t) => e.oldPhone = t),
|
|
766
766
|
code: e.code,
|
|
767
767
|
"onUpdate:code": a[6] || (a[6] = (t) => e.code = t),
|
|
768
|
-
"hint-text":
|
|
769
|
-
"rate-limit-text":
|
|
770
|
-
"is-final-limit":
|
|
768
|
+
"hint-text": G.value,
|
|
769
|
+
"rate-limit-text": se.value,
|
|
770
|
+
"is-final-limit": ie.value,
|
|
771
771
|
"is-not-match-code": z.value,
|
|
772
772
|
loading: y.value,
|
|
773
773
|
"is-tg": d.value,
|
|
774
|
-
onOnSendCode: a[7] || (a[7] = (t) =>
|
|
775
|
-
onOnSendCodeAgain: a[8] || (a[8] = (t) =>
|
|
774
|
+
onOnSendCode: a[7] || (a[7] = (t) => Y({ value: e.newPhone })),
|
|
775
|
+
onOnSendCodeAgain: a[8] || (a[8] = (t) => Y({ value: e.newPhone, isOnlySms: !d.value && v.value })),
|
|
776
776
|
onOnSendOnlySms: he,
|
|
777
777
|
onOnMatchCode: Se,
|
|
778
778
|
onOnMatchCodeError: Me,
|
|
779
779
|
onOnClearCodeError: a[9] || (a[9] = (t) => z.value = !1)
|
|
780
|
-
}, null, 8, ["phone", "oldPhone", "code", "hint-text", "rate-limit-text", "is-final-limit", "is-not-match-code", "loading", "is-tg"])) : M.value === u(
|
|
781
|
-
F("p", null,
|
|
780
|
+
}, null, 8, ["phone", "oldPhone", "code", "hint-text", "rate-limit-text", "is-final-limit", "is-not-match-code", "loading", "is-tg"])) : M.value === u(q).COMPLETED ? (h(), T("div", Vt, [
|
|
781
|
+
F("p", null, W(E("Телефон успешно изменен")), 1)
|
|
782
782
|
])) : k("", !0)
|
|
783
783
|
])) : (h(), T("div", kt, [
|
|
784
|
-
y.value ? (h(),
|
|
784
|
+
y.value ? (h(), H(Be, { key: 0 })) : k("", !0),
|
|
785
785
|
S(St, {
|
|
786
786
|
phone: e.addPhone,
|
|
787
787
|
"onUpdate:phone": a[10] || (a[10] = (t) => e.addPhone = t),
|
|
@@ -789,9 +789,9 @@ const oe = { render: Ze }, _e = { class: "dialogDefaultContainerInsideContent" }
|
|
|
789
789
|
"onUpdate:oldPhone": a[11] || (a[11] = (t) => e.oldPhone = t),
|
|
790
790
|
code: e.addCode,
|
|
791
791
|
"onUpdate:code": a[12] || (a[12] = (t) => e.addCode = t),
|
|
792
|
-
"hint-text": u(
|
|
793
|
-
"rate-limit-text":
|
|
794
|
-
"is-final-limit":
|
|
792
|
+
"hint-text": u(ce) ? G.value : "Чтобы продолжить, введите новый номер",
|
|
793
|
+
"rate-limit-text": se.value,
|
|
794
|
+
"is-final-limit": ie.value,
|
|
795
795
|
"is-not-match-code": z.value,
|
|
796
796
|
loading: y.value,
|
|
797
797
|
"is-tg": d.value,
|