@yourgoods/ui-smart 0.19.0 → 0.20.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-DwIN_6e8.js → ProfileEmailDialog-BRhT6nYd.js} +2 -2
- package/dist/{ProfilePasswordDialog-C3qY8CKQ.js → ProfilePasswordDialog-1E-HIVXQ.js} +1 -1
- package/dist/{ProfilePhoneDialog-CxZerKv-.js → ProfilePhoneDialog-f-M1JdM_.js} +311 -325
- package/dist/{index-B0KgO4OT.js → index-Rt4lWoBK.js} +3 -3
- package/dist/index.js +1 -1
- package/dist/{useRateLimitToast-D3bWwwOU.js → useRateLimitToast-B7w14HCE.js} +1 -1
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as Z, ref as M, reactive as J, watch as j, computed as V, toRefs as se, createElementBlock as k, openBlock as y, createElementVNode as S, createCommentVNode as P, toDisplayString as K, createVNode as b, unref as c, isRef as Q, withCtx as q, createTextVNode as te, Fragment as De, createBlock as R, resolveDynamicComponent as Ce, onMounted as Ue } from "vue";
|
|
2
|
-
import { T as de, c as Ve, u as Ae, a as Fe, P as ye, b as Re } from "./useRateLimitToast-
|
|
3
|
-
import { C as D, _ as ze, B as We, p as F, g as He } from "./index-
|
|
2
|
+
import { T as de, c as Ve, u as Ae, a as Fe, P as ye, b as Re } from "./useRateLimitToast-B7w14HCE.js";
|
|
3
|
+
import { C as D, _ as ze, B as We, p as F, g as He } from "./index-Rt4lWoBK.js";
|
|
4
4
|
import { PInput as G, IconMailMd as re, PButton as le, IconEyeMd as ge, IconEyeClosedMd as he, PDialog as qe, PTopBar as je, IconCrossMd as Ge } from "@profeat/ui-kit";
|
|
5
5
|
const Ye = { class: "dialogDefaultContainerInsideContent" }, _e = { class: "dialogDefaultContainerTextHint" }, Je = {
|
|
6
6
|
key: 0,
|
|
@@ -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-Rt4lWoBK.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,16 +1,16 @@
|
|
|
1
|
-
import { createElementBlock as T, openBlock as p, createElementVNode as
|
|
2
|
-
import { T as ge, c as Oe, a as qe, u as We, P as Be, b as
|
|
3
|
-
import { IconTelegramSm as ye, PInput as
|
|
4
|
-
import { C as
|
|
1
|
+
import { createElementBlock as T, openBlock as p, createElementVNode as U, defineComponent as ce, reactive as pe, watch as _, ref as L, toRefs as fe, computed as z, createCommentVNode as k, createVNode as S, toDisplayString as K, createBlock as G, createTextVNode as Z, unref as r, isRef as le, withCtx as X, onMounted as Ue, Fragment as je } from "vue";
|
|
2
|
+
import { T as ge, c as Oe, a as qe, u as We, P as Be, b as Ke } from "./useRateLimitToast-B7w14HCE.js";
|
|
3
|
+
import { IconTelegramSm as ye, PInput as se, IconPhoneMd as He, IconMailMd as De, PButton as Ae, PDialog as Ge, PTopBar as Je, IconCrossMd as Qe, PTeleportContainer as Xe } from "@profeat/ui-kit";
|
|
4
|
+
import { C as W, t as Ie, p as ne, g as Le } from "./index-Rt4lWoBK.js";
|
|
5
5
|
const Ye = {
|
|
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 Ze(
|
|
12
|
-
return p(), T("svg", Ye,
|
|
13
|
-
|
|
11
|
+
function Ze(R, V) {
|
|
12
|
+
return p(), T("svg", Ye, V[0] || (V[0] = [
|
|
13
|
+
U("path", {
|
|
14
14
|
fill: "#1C7EF1",
|
|
15
15
|
"fill-rule": "evenodd",
|
|
16
16
|
d: "M1 0a1 1 0 0 0-1 1v14a1 1 0 0 0 1 1h10a1 1 0 0 0 1-1V1a1 1 0 0 0-1-1zm1.5 2a.5.5 0 0 0-.5.5v9a.5.5 0 0 0 .5.5h7a.5.5 0 0 0 .5-.5v-9a.5.5 0 0 0-.5-.5zM6 13a1 1 0 1 0 0 2 1 1 0 0 0 0-2",
|
|
@@ -18,7 +18,7 @@ function Ze(z, b) {
|
|
|
18
18
|
}, null, -1)
|
|
19
19
|
]));
|
|
20
20
|
}
|
|
21
|
-
const
|
|
21
|
+
const ie = { render: Ze }, _e = { class: "dialogDefaultContainerInsideContent" }, eo = { style: { display: "flex", width: "100%", gap: "4px", "align-items": "center", "justify-content": "center", "text-align": "center" } }, oo = { class: "dialogDefaultContainerTextHint" }, to = { class: "chip" }, no = {
|
|
22
22
|
key: 0,
|
|
23
23
|
class: "input-wrapper"
|
|
24
24
|
}, ao = {
|
|
@@ -42,16 +42,16 @@ const de = { render: Ze }, _e = { class: "dialogDefaultContainerInsideContent" }
|
|
|
42
42
|
isTg: { type: Boolean }
|
|
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
|
-
setup(
|
|
46
|
-
const
|
|
45
|
+
setup(R, { emit: V }) {
|
|
46
|
+
const E = R, u = V, c = pe({
|
|
47
47
|
touched: { phone: !1, code: !1 },
|
|
48
|
-
phoneModel:
|
|
49
|
-
codeModel:
|
|
48
|
+
phoneModel: E.phone,
|
|
49
|
+
codeModel: E.code
|
|
50
50
|
});
|
|
51
|
-
|
|
51
|
+
_(
|
|
52
52
|
() => c.phoneModel,
|
|
53
53
|
(i) => u("update:phone", i)
|
|
54
|
-
),
|
|
54
|
+
), _(
|
|
55
55
|
() => c.codeModel,
|
|
56
56
|
(i) => u("update:code", i)
|
|
57
57
|
);
|
|
@@ -66,22 +66,22 @@ const de = { render: Ze }, _e = { class: "dialogDefaultContainerInsideContent" }
|
|
|
66
66
|
v.length > 4 && (v = v.slice(0, 4)), M.value = v, h && h.value !== v && (h.value = v), v.length === 4 && v !== g.value && (g.value = v, u("on-match-code", { phone: e.value, code: v }));
|
|
67
67
|
}, H = () => u("on-send-code-again", { phone: c.phoneModel }), J = () => {
|
|
68
68
|
console.debug("onSendCodeViaSms"), u("on-send-only-sms", { phone: c.phoneModel });
|
|
69
|
-
}, { phoneModel: e, codeModel: M, touched: C } = fe(c), y =
|
|
69
|
+
}, { phoneModel: e, codeModel: M, touched: C } = fe(c), y = z(() => C.value.phone && !e.value.trim() ? "Введите телефон" : E.phoneError), x = z(() => E.isNotMatchCode ? "Неверный код" : C.value.code ? M.value.trim() ? E.codeError ?? null : "Введите код" : "");
|
|
70
70
|
return (i, h) => (p(), T("div", _e, [
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
i.isTg ? (p(), G(r(ye), { key: 0 })) : (p(), G(r(
|
|
71
|
+
U("div", eo, [
|
|
72
|
+
U("div", oo, K(i.hintText), 1),
|
|
73
|
+
U("div", to, [
|
|
74
|
+
i.isTg ? (p(), G(r(ye), { key: 0 })) : (p(), G(r(ie), {
|
|
75
75
|
key: 1,
|
|
76
76
|
style: { "margin-left": "5px" }
|
|
77
77
|
})),
|
|
78
|
-
|
|
78
|
+
Z(" " + K(i.isTg ? "Telegram" : "СМС"), 1)
|
|
79
79
|
])
|
|
80
80
|
]),
|
|
81
81
|
i.showPhone ? (p(), T("div", no, [
|
|
82
|
-
S(r(
|
|
82
|
+
S(r(se), {
|
|
83
83
|
modelValue: r(e),
|
|
84
|
-
"onUpdate:modelValue": h[0] || (h[0] = (v) =>
|
|
84
|
+
"onUpdate:modelValue": h[0] || (h[0] = (v) => le(e) ? e.value = v : null),
|
|
85
85
|
size: "large",
|
|
86
86
|
"text-size": "medium",
|
|
87
87
|
label: "Телефон",
|
|
@@ -91,15 +91,15 @@ const de = { render: Ze }, _e = { class: "dialogDefaultContainerInsideContent" }
|
|
|
91
91
|
onBlur: h[1] || (h[1] = (v) => f("phone")),
|
|
92
92
|
onInput: h[2] || (h[2] = (v) => f("phone"))
|
|
93
93
|
}, null, 8, ["modelValue", "error"]),
|
|
94
|
-
S(r(
|
|
94
|
+
S(r(He), {
|
|
95
95
|
class: "icon-locked",
|
|
96
96
|
onClick: h[3] || (h[3] = (v) => i.$emit("edit", "phone"))
|
|
97
97
|
})
|
|
98
|
-
])) :
|
|
98
|
+
])) : k("", !0),
|
|
99
99
|
i.showCode ? (p(), T("div", ao, [
|
|
100
|
-
S(r(
|
|
100
|
+
S(r(se), {
|
|
101
101
|
modelValue: r(M),
|
|
102
|
-
"onUpdate:modelValue": h[4] || (h[4] = (v) =>
|
|
102
|
+
"onUpdate:modelValue": h[4] || (h[4] = (v) => le(M) ? M.value = v : null),
|
|
103
103
|
size: "large",
|
|
104
104
|
"text-size": "medium",
|
|
105
105
|
label: "Код",
|
|
@@ -108,36 +108,36 @@ const de = { render: Ze }, _e = { class: "dialogDefaultContainerInsideContent" }
|
|
|
108
108
|
onInput: B,
|
|
109
109
|
onBlur: h[5] || (h[5] = (v) => f("code"))
|
|
110
110
|
}, null, 8, ["modelValue", "error"])
|
|
111
|
-
])) :
|
|
111
|
+
])) : k("", !0),
|
|
112
112
|
S(ge, {
|
|
113
113
|
loading: i.loading,
|
|
114
114
|
"rate-limit-text": i.rateLimitText,
|
|
115
115
|
"is-final-limit": i.isFinalLimit,
|
|
116
116
|
"on-send-again": H
|
|
117
117
|
}, {
|
|
118
|
-
extra:
|
|
118
|
+
extra: X(() => [
|
|
119
119
|
i.isTg ? (p(), T("span", {
|
|
120
120
|
key: 0,
|
|
121
121
|
class: "dialogDefaultContainerSendCodeBySmsText",
|
|
122
122
|
onClick: J
|
|
123
123
|
}, [
|
|
124
|
-
|
|
125
|
-
S(r(
|
|
126
|
-
])) :
|
|
124
|
+
Z(K(i.sendCodeBySmsText) + " ", 1),
|
|
125
|
+
S(r(ie), { style: { "margin-left": "5px" } })
|
|
126
|
+
])) : k("", !0)
|
|
127
127
|
]),
|
|
128
128
|
_: 1
|
|
129
129
|
}, 8, ["loading", "rate-limit-text", "is-final-limit"])
|
|
130
130
|
]));
|
|
131
131
|
}
|
|
132
|
-
}),
|
|
133
|
-
const
|
|
134
|
-
if (
|
|
135
|
-
if (
|
|
136
|
-
return `+7${
|
|
137
|
-
if (
|
|
138
|
-
return `+${
|
|
132
|
+
}), F = (R) => {
|
|
133
|
+
const V = R.replace(/\D/g, "");
|
|
134
|
+
if (V.length >= 10 && V.length <= 15) {
|
|
135
|
+
if (V.startsWith("8"))
|
|
136
|
+
return `+7${V.slice(1)}`;
|
|
137
|
+
if (V.startsWith("7"))
|
|
138
|
+
return `+${V}`;
|
|
139
139
|
}
|
|
140
|
-
return
|
|
140
|
+
return R.trim().startsWith("+") ? R.trim() : `+${V}`;
|
|
141
141
|
}, so = { class: "dialogDefaultContainerInsideContent" }, io = { style: { display: "flex", width: "100%", gap: "4px", "align-items": "center", "justify-content": "center", "text-align": "center" } }, ro = { class: "dialogDefaultContainerTextHint" }, uo = {
|
|
142
142
|
key: 0,
|
|
143
143
|
class: "chip"
|
|
@@ -167,145 +167,138 @@ const de = { render: Ze }, _e = { class: "dialogDefaultContainerInsideContent" }
|
|
|
167
167
|
isTg: { type: Boolean }
|
|
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
|
-
setup(
|
|
171
|
-
const
|
|
170
|
+
setup(R, { emit: V }) {
|
|
171
|
+
const E = R, u = V, c = L(!1), f = L(""), g = pe({
|
|
172
172
|
touched: { phone: !1, code: !1 },
|
|
173
173
|
phoneModel: "",
|
|
174
174
|
codeModel: ""
|
|
175
175
|
});
|
|
176
|
-
|
|
176
|
+
_(
|
|
177
177
|
() => g.phoneModel,
|
|
178
|
-
(
|
|
179
|
-
u("update:phone",
|
|
178
|
+
(l) => {
|
|
179
|
+
u("update:phone", l), f.value = "";
|
|
180
180
|
}
|
|
181
|
-
),
|
|
181
|
+
), _(
|
|
182
182
|
() => g.codeModel,
|
|
183
|
-
(
|
|
183
|
+
(l) => u("update:code", l)
|
|
184
184
|
);
|
|
185
|
-
const B = (
|
|
186
|
-
const
|
|
187
|
-
return /^\+?\d{10,15}$/.test(
|
|
185
|
+
const B = (l) => g.touched[l] = !0, H = z(() => {
|
|
186
|
+
const n = g.phoneModel.trim().replace(/[()\-\s]/g, "");
|
|
187
|
+
return /^\+?\d{10,15}$/.test(n);
|
|
188
188
|
}), J = async () => {
|
|
189
|
-
var
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
return;
|
|
193
|
-
}
|
|
194
|
-
const {
|
|
195
|
-
data: { data: a, success: t, message: n }
|
|
196
|
-
} = await Oe(void 0, N(g.phoneModel));
|
|
197
|
-
if (!t && n) {
|
|
198
|
-
const X = Array.isArray(n) ? n.join(" ") : String(n), te = X.toLowerCase(), K = [
|
|
199
|
-
"телефон должен быть в формате",
|
|
200
|
-
// ищем самую уникальную часть фразы "must be a valid phone number"
|
|
201
|
-
"valid phone number"
|
|
202
|
-
], R = K.some(
|
|
203
|
-
(_) => te.includes(_)
|
|
204
|
-
);
|
|
205
|
-
if (console.debug("global debug this if: ", {
|
|
206
|
-
success: t,
|
|
207
|
-
message: n,
|
|
208
|
-
hasPhoneError: R,
|
|
209
|
-
phoneTakenError: f,
|
|
210
|
-
errorMessage: X,
|
|
211
|
-
lowerCaseError: te,
|
|
212
|
-
phoneValidationKeywords: K
|
|
213
|
-
}), R) {
|
|
189
|
+
var l, n;
|
|
190
|
+
try {
|
|
191
|
+
if (B("phone"), !H.value) {
|
|
214
192
|
f.value = "Это не похоже на номер телефона";
|
|
215
193
|
return;
|
|
216
194
|
}
|
|
195
|
+
const {
|
|
196
|
+
data: { data: o, success: O, message: D }
|
|
197
|
+
} = await Oe(void 0, F(g.phoneModel));
|
|
198
|
+
if (!(((l = o == null ? void 0 : o[0]) == null ? void 0 : l.available) ?? !1)) {
|
|
199
|
+
f.value = "Такой номер уже используется";
|
|
200
|
+
return;
|
|
201
|
+
}
|
|
202
|
+
f.value = "", u("on-send-code", { phone: g.phoneModel, prevPhone: E.oldPhone, offLoading: !0 }), c.value = !0;
|
|
203
|
+
} catch (o) {
|
|
204
|
+
const O = (n = o == null ? void 0 : o.response) == null ? void 0 : n.data, D = O == null ? void 0 : O.message;
|
|
205
|
+
if (D) {
|
|
206
|
+
const de = (Array.isArray(D) ? D.join(" ") : String(D)).toLowerCase();
|
|
207
|
+
if (["телефон должен быть в формате", "valid phone number"].some(
|
|
208
|
+
(Y) => de.includes(Y)
|
|
209
|
+
)) {
|
|
210
|
+
f.value = "Это не похоже на номер телефона";
|
|
211
|
+
return;
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
console.error("Неизвестная ошибка при проверке доступности телефона:", o), f.value = "Произошла ошибка сервера. Попробуйте позже.";
|
|
217
215
|
}
|
|
218
|
-
if (!(((Z = a == null ? void 0 : a[0]) == null ? void 0 : Z.available) ?? !1)) {
|
|
219
|
-
f.value = "Такой номер уже используется";
|
|
220
|
-
return;
|
|
221
|
-
}
|
|
222
|
-
f.value = "", u("on-send-code", { phone: g.phoneModel, prevPhone: k.oldPhone, offLoading: !0 }), c.value = !0;
|
|
223
216
|
};
|
|
224
217
|
let e = L("");
|
|
225
|
-
const M = (
|
|
218
|
+
const M = (l) => {
|
|
226
219
|
u("on-clear-code-error");
|
|
227
|
-
const
|
|
228
|
-
let
|
|
229
|
-
|
|
220
|
+
const n = l.target;
|
|
221
|
+
let o = ((n == null ? void 0 : n.value) ?? "").replace(/\D/g, "");
|
|
222
|
+
o.length > 4 && (o = o.slice(0, 4)), i.value = o, n && n.value !== o && (n.value = o), o.length === 4 && o !== e.value && (e.value = o, u("on-match-code", { phone: x.value, code: o }));
|
|
230
223
|
}, C = () => {
|
|
231
224
|
u("on-send-code-again", { phone: g.phoneModel });
|
|
232
225
|
}, y = () => {
|
|
233
226
|
console.debug("onSendCodeViaSms"), u("on-send-only-sms", { phone: g.phoneModel });
|
|
234
|
-
}, { phoneModel: x, codeModel: i, touched: h } = fe(g), v =
|
|
235
|
-
return (
|
|
236
|
-
|
|
237
|
-
|
|
227
|
+
}, { phoneModel: x, codeModel: i, touched: h } = fe(g), v = z(() => f.value ? f.value : h.value.phone && !x.value.trim() ? "Это не похоже на номер телефона" : E.phoneError || ""), Q = z(() => E.isNotMatchCode ? "Неверный код" : h.value.code ? i.value.trim() ? E.codeError ?? null : "Введите код" : "");
|
|
228
|
+
return (l, n) => (p(), T("div", so, [
|
|
229
|
+
U("div", io, [
|
|
230
|
+
U("div", ro, K(c.value ? "Чтобы продолжить, введите код подтверждения из" : l.hintText), 1),
|
|
238
231
|
c.value ? (p(), T("div", uo, [
|
|
239
|
-
|
|
232
|
+
l.isTg ? (p(), G(r(ye), { key: 0 })) : (p(), G(r(ie), {
|
|
240
233
|
key: 1,
|
|
241
234
|
style: { "margin-left": "5px" }
|
|
242
235
|
})),
|
|
243
|
-
|
|
244
|
-
])) :
|
|
236
|
+
Z(" " + K(l.isTg ? "Telegram" : "СМС"), 1)
|
|
237
|
+
])) : k("", !0)
|
|
245
238
|
]),
|
|
246
|
-
|
|
247
|
-
S(r(
|
|
239
|
+
l.showPhone ? (p(), T("div", co, [
|
|
240
|
+
S(r(se), {
|
|
248
241
|
modelValue: r(x),
|
|
249
|
-
"onUpdate:modelValue":
|
|
242
|
+
"onUpdate:modelValue": n[0] || (n[0] = (o) => le(x) ? x.value = o : null),
|
|
250
243
|
size: "large",
|
|
251
244
|
"text-size": "medium",
|
|
252
245
|
label: "Телефон",
|
|
253
246
|
type: "tel",
|
|
254
247
|
error: v.value,
|
|
255
|
-
onBlur:
|
|
256
|
-
onInput:
|
|
248
|
+
onBlur: n[1] || (n[1] = (o) => B("phone")),
|
|
249
|
+
onInput: n[2] || (n[2] = (o) => B("phone"))
|
|
257
250
|
}, null, 8, ["modelValue", "error"]),
|
|
258
251
|
S(r(De), {
|
|
259
252
|
class: "icon-locked",
|
|
260
|
-
onClick:
|
|
253
|
+
onClick: n[3] || (n[3] = (o) => l.$emit("edit", "phone"))
|
|
261
254
|
})
|
|
262
|
-
])) :
|
|
263
|
-
c.value ?
|
|
255
|
+
])) : k("", !0),
|
|
256
|
+
c.value ? k("", !0) : (p(), T("div", po, [
|
|
264
257
|
S(r(Ae), {
|
|
265
258
|
style: { width: "100%" },
|
|
266
259
|
disabled: !H.value,
|
|
267
260
|
onClick: J
|
|
268
261
|
}, {
|
|
269
|
-
default:
|
|
270
|
-
|
|
262
|
+
default: X(() => n[6] || (n[6] = [
|
|
263
|
+
Z(" Отправить код ")
|
|
271
264
|
])),
|
|
272
265
|
_: 1,
|
|
273
266
|
__: [6]
|
|
274
267
|
}, 8, ["disabled"])
|
|
275
268
|
])),
|
|
276
269
|
c.value ? (p(), T("div", ho, [
|
|
277
|
-
S(r(
|
|
270
|
+
S(r(se), {
|
|
278
271
|
modelValue: r(i),
|
|
279
|
-
"onUpdate:modelValue":
|
|
272
|
+
"onUpdate:modelValue": n[4] || (n[4] = (o) => le(i) ? i.value = o : null),
|
|
280
273
|
size: "large",
|
|
281
274
|
"text-size": "medium",
|
|
282
275
|
label: "Код",
|
|
283
276
|
type: "text",
|
|
284
277
|
error: Q.value,
|
|
285
278
|
onInput: M,
|
|
286
|
-
onBlur:
|
|
279
|
+
onBlur: n[5] || (n[5] = (o) => B("code"))
|
|
287
280
|
}, null, 8, ["modelValue", "error"])
|
|
288
|
-
])) :
|
|
289
|
-
!
|
|
281
|
+
])) : k("", !0),
|
|
282
|
+
!l.loading && c.value ? (p(), T("div", vo, [
|
|
290
283
|
S(ge, {
|
|
291
|
-
loading:
|
|
292
|
-
"rate-limit-text":
|
|
293
|
-
"is-final-limit":
|
|
284
|
+
loading: l.loading,
|
|
285
|
+
"rate-limit-text": l.rateLimitText,
|
|
286
|
+
"is-final-limit": l.isFinalLimit,
|
|
294
287
|
"on-send-again": C
|
|
295
288
|
}, {
|
|
296
|
-
extra:
|
|
297
|
-
|
|
289
|
+
extra: X(() => [
|
|
290
|
+
l.isTg ? (p(), T("span", {
|
|
298
291
|
key: 0,
|
|
299
292
|
class: "dialogDefaultContainerSendCodeBySmsText",
|
|
300
293
|
onClick: y
|
|
301
294
|
}, [
|
|
302
|
-
|
|
303
|
-
S(r(
|
|
304
|
-
])) :
|
|
295
|
+
Z(K(l.sendCodeBySmsText) + " ", 1),
|
|
296
|
+
S(r(ie), { style: { "margin-left": "5px" } })
|
|
297
|
+
])) : k("", !0)
|
|
305
298
|
]),
|
|
306
299
|
_: 1
|
|
307
300
|
}, 8, ["loading", "rate-limit-text", "is-final-limit"])
|
|
308
|
-
])) :
|
|
301
|
+
])) : k("", !0)
|
|
309
302
|
]));
|
|
310
303
|
}
|
|
311
304
|
}), fo = { class: "dialogDefaultContainerInsideContent" }, go = { style: { display: "flex", width: "100%", gap: "4px", "align-items": "center", "justify-content": "center", "text-align": "center" } }, yo = { class: "dialogDefaultContainerTextHint" }, Co = { class: "chip" }, wo = {
|
|
@@ -334,151 +327,144 @@ const de = { render: Ze }, _e = { class: "dialogDefaultContainerInsideContent" }
|
|
|
334
327
|
isTg: { type: Boolean }
|
|
335
328
|
},
|
|
336
329
|
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"],
|
|
337
|
-
setup(
|
|
338
|
-
const
|
|
330
|
+
setup(R, { emit: V }) {
|
|
331
|
+
const E = R, u = V, c = L(!1), f = L(""), g = pe({
|
|
339
332
|
touched: { phone: !1, code: !1 },
|
|
340
333
|
phoneModel: "",
|
|
341
334
|
codeModel: ""
|
|
342
335
|
});
|
|
343
|
-
|
|
336
|
+
_(
|
|
344
337
|
() => g.phoneModel,
|
|
345
|
-
(
|
|
346
|
-
u("update:phone",
|
|
338
|
+
(l) => {
|
|
339
|
+
u("update:phone", l), f.value = "";
|
|
347
340
|
}
|
|
348
|
-
),
|
|
341
|
+
), _(
|
|
349
342
|
() => g.codeModel,
|
|
350
|
-
(
|
|
343
|
+
(l) => u("update:code", l)
|
|
351
344
|
);
|
|
352
|
-
const B = (
|
|
353
|
-
const
|
|
354
|
-
return /^\+?\d{10,15}$/.test(
|
|
345
|
+
const B = (l) => g.touched[l] = !0, H = z(() => {
|
|
346
|
+
const n = g.phoneModel.trim().replace(/[()\-\s]/g, "");
|
|
347
|
+
return /^\+?\d{10,15}$/.test(n);
|
|
355
348
|
}), J = async () => {
|
|
356
|
-
var
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
return;
|
|
360
|
-
}
|
|
361
|
-
const {
|
|
362
|
-
data: { data: a, success: t, message: n }
|
|
363
|
-
} = await Oe(void 0, N(g.phoneModel));
|
|
364
|
-
if (!t && n) {
|
|
365
|
-
const X = Array.isArray(n) ? n.join(" ") : String(n), te = X.toLowerCase(), K = [
|
|
366
|
-
"телефон должен быть в формате",
|
|
367
|
-
// ищем самую уникальную часть фразы "must be a valid phone number"
|
|
368
|
-
"valid phone number"
|
|
369
|
-
], R = K.some(
|
|
370
|
-
(_) => te.includes(_)
|
|
371
|
-
);
|
|
372
|
-
if (console.debug("global debug this if: ", {
|
|
373
|
-
success: t,
|
|
374
|
-
message: n,
|
|
375
|
-
hasPhoneError: R,
|
|
376
|
-
phoneTakenError: f,
|
|
377
|
-
errorMessage: X,
|
|
378
|
-
lowerCaseError: te,
|
|
379
|
-
phoneValidationKeywords: K
|
|
380
|
-
}), R) {
|
|
349
|
+
var l, n;
|
|
350
|
+
try {
|
|
351
|
+
if (B("phone"), !H.value) {
|
|
381
352
|
f.value = "Это не похоже на номер телефона";
|
|
382
353
|
return;
|
|
383
354
|
}
|
|
355
|
+
const {
|
|
356
|
+
data: { data: o, success: O, message: D }
|
|
357
|
+
} = await Oe(void 0, F(g.phoneModel));
|
|
358
|
+
if (!(((l = o == null ? void 0 : o[0]) == null ? void 0 : l.available) ?? !1)) {
|
|
359
|
+
f.value = "Такой номер уже используется";
|
|
360
|
+
return;
|
|
361
|
+
}
|
|
362
|
+
f.value = "", u("on-send-code", { phone: g.phoneModel, prevPhone: E.oldPhone, offLoading: !0 }), c.value = !0;
|
|
363
|
+
} catch (o) {
|
|
364
|
+
const O = (n = o == null ? void 0 : o.response) == null ? void 0 : n.data, D = O == null ? void 0 : O.message;
|
|
365
|
+
if (D) {
|
|
366
|
+
const de = (Array.isArray(D) ? D.join(" ") : String(D)).toLowerCase();
|
|
367
|
+
if (["телефон должен быть в формате", "valid phone number"].some(
|
|
368
|
+
(Y) => de.includes(Y)
|
|
369
|
+
)) {
|
|
370
|
+
f.value = "Это не похоже на номер телефона";
|
|
371
|
+
return;
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
console.error("Неизвестная ошибка при проверке доступности телефона:", o), f.value = "Произошла ошибка сервера. Попробуйте позже.";
|
|
384
375
|
}
|
|
385
|
-
if (!(((Z = a == null ? void 0 : a[0]) == null ? void 0 : Z.available) ?? !1)) {
|
|
386
|
-
f.value = "Такой номер уже используется";
|
|
387
|
-
return;
|
|
388
|
-
}
|
|
389
|
-
f.value = "", u("on-send-code", { phone: g.phoneModel, prevPhone: k.oldPhone, offLoading: !0 }), c.value = !0;
|
|
390
376
|
};
|
|
391
377
|
let e = "";
|
|
392
|
-
const M = (
|
|
378
|
+
const M = (l) => {
|
|
393
379
|
u("on-clear-code-error");
|
|
394
|
-
const
|
|
395
|
-
let
|
|
396
|
-
|
|
380
|
+
const n = l.target;
|
|
381
|
+
let o = n.value.replace(/\D/g, "");
|
|
382
|
+
o.length > 4 && (o = o.slice(0, 4), n.value = o), g.codeModel = o, o.length === 4 && o !== e && (e = o, u("on-match-code", { phone: g.phoneModel, code: o }));
|
|
397
383
|
}, C = () => {
|
|
398
384
|
u("on-send-code-again", { phone: g.phoneModel });
|
|
399
385
|
}, y = () => {
|
|
400
386
|
console.debug("onSendCodeViaSms"), u("on-send-only-sms", { phone: g.phoneModel });
|
|
401
|
-
}, { phoneModel: x, codeModel: i, touched: h } = fe(g), v =
|
|
402
|
-
return (
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
387
|
+
}, { phoneModel: x, codeModel: i, touched: h } = fe(g), v = z(() => f.value ? f.value : h.value.phone && !x.value.trim() ? "Это не похоже на номер телефона" : E.phoneError || ""), Q = z(() => E.isNotMatchCode ? "Неверный код" : g.touched.code ? i.value.trim() ? E.codeError ?? null : "Введите код" : "");
|
|
388
|
+
return (l, n) => (p(), T("div", fo, [
|
|
389
|
+
U("div", go, [
|
|
390
|
+
U("div", yo, K(c.value ? "Чтобы продолжить, введите код подтверждения из" : l.hintText), 1),
|
|
391
|
+
U("div", Co, [
|
|
392
|
+
l.isTg ? (p(), G(r(ye), { key: 0 })) : (p(), G(r(ie), {
|
|
407
393
|
key: 1,
|
|
408
394
|
style: { "margin-left": "5px" }
|
|
409
395
|
})),
|
|
410
|
-
|
|
396
|
+
Z(" " + K(l.isTg ? "Telegram" : "СМС"), 1)
|
|
411
397
|
])
|
|
412
398
|
]),
|
|
413
|
-
|
|
414
|
-
S(r(
|
|
399
|
+
l.showPhone ? (p(), T("div", wo, [
|
|
400
|
+
S(r(se), {
|
|
415
401
|
modelValue: r(x),
|
|
416
|
-
"onUpdate:modelValue":
|
|
402
|
+
"onUpdate:modelValue": n[0] || (n[0] = (o) => le(x) ? x.value = o : null),
|
|
417
403
|
size: "large",
|
|
418
404
|
"text-size": "medium",
|
|
419
405
|
label: "Телефон",
|
|
420
406
|
type: "tel",
|
|
421
407
|
error: v.value,
|
|
422
|
-
onBlur:
|
|
423
|
-
onInput:
|
|
408
|
+
onBlur: n[1] || (n[1] = (o) => B("phone")),
|
|
409
|
+
onInput: n[2] || (n[2] = (o) => B("phone"))
|
|
424
410
|
}, null, 8, ["modelValue", "error"]),
|
|
425
411
|
S(r(De), {
|
|
426
412
|
class: "icon-locked",
|
|
427
|
-
onClick:
|
|
413
|
+
onClick: n[3] || (n[3] = (o) => l.$emit("edit", "phone"))
|
|
428
414
|
})
|
|
429
|
-
])) :
|
|
430
|
-
c.value ?
|
|
415
|
+
])) : k("", !0),
|
|
416
|
+
c.value ? k("", !0) : (p(), T("div", Po, [
|
|
431
417
|
S(r(Ae), {
|
|
432
418
|
style: { width: "100%" },
|
|
433
419
|
disabled: !H.value,
|
|
434
420
|
onClick: J
|
|
435
421
|
}, {
|
|
436
|
-
default:
|
|
437
|
-
|
|
422
|
+
default: X(() => n[6] || (n[6] = [
|
|
423
|
+
Z(" Отправить код ")
|
|
438
424
|
])),
|
|
439
425
|
_: 1,
|
|
440
426
|
__: [6]
|
|
441
427
|
}, 8, ["disabled"])
|
|
442
428
|
])),
|
|
443
429
|
c.value ? (p(), T("div", To, [
|
|
444
|
-
S(r(
|
|
430
|
+
S(r(se), {
|
|
445
431
|
modelValue: r(i),
|
|
446
|
-
"onUpdate:modelValue":
|
|
432
|
+
"onUpdate:modelValue": n[4] || (n[4] = (o) => le(i) ? i.value = o : null),
|
|
447
433
|
size: "large",
|
|
448
434
|
"text-size": "medium",
|
|
449
435
|
label: "Код",
|
|
450
436
|
type: "text",
|
|
451
437
|
error: Q.value,
|
|
452
438
|
onInput: M,
|
|
453
|
-
onBlur:
|
|
439
|
+
onBlur: n[5] || (n[5] = (o) => B("code"))
|
|
454
440
|
}, null, 8, ["modelValue", "error"])
|
|
455
|
-
])) :
|
|
441
|
+
])) : k("", !0),
|
|
456
442
|
c.value ? (p(), T("div", So, [
|
|
457
443
|
S(ge, {
|
|
458
|
-
loading:
|
|
459
|
-
"rate-limit-text":
|
|
460
|
-
"is-final-limit":
|
|
444
|
+
loading: l.loading,
|
|
445
|
+
"rate-limit-text": l.rateLimitText,
|
|
446
|
+
"is-final-limit": l.isFinalLimit,
|
|
461
447
|
"on-send-again": C
|
|
462
448
|
}, {
|
|
463
|
-
extra:
|
|
464
|
-
|
|
449
|
+
extra: X(() => [
|
|
450
|
+
l.isTg ? (p(), T("span", {
|
|
465
451
|
key: 0,
|
|
466
452
|
class: "dialogDefaultContainerSendCodeBySmsText",
|
|
467
453
|
onClick: y
|
|
468
454
|
}, [
|
|
469
|
-
|
|
470
|
-
S(r(
|
|
471
|
-
])) :
|
|
455
|
+
Z(K(l.sendCodeBySmsText) + " ", 1),
|
|
456
|
+
S(r(ie), { style: { "margin-left": "5px" } })
|
|
457
|
+
])) : k("", !0)
|
|
472
458
|
]),
|
|
473
459
|
_: 1
|
|
474
460
|
}, 8, ["loading", "rate-limit-text", "is-final-limit"])
|
|
475
|
-
])) :
|
|
461
|
+
])) : k("", !0)
|
|
476
462
|
]));
|
|
477
463
|
}
|
|
478
|
-
}), xo = { class: "text-center w-full" },
|
|
464
|
+
}), xo = { class: "text-center w-full" }, Vo = { class: "dialogTitle" }, bo = {
|
|
479
465
|
key: 0,
|
|
480
466
|
class: "dialogDefaultContainer"
|
|
481
|
-
},
|
|
467
|
+
}, Eo = { key: 3 }, ko = {
|
|
482
468
|
key: 1,
|
|
483
469
|
class: "dialogDefaultContainer"
|
|
484
470
|
}, re = 3, Oo = /* @__PURE__ */ ce({
|
|
@@ -493,30 +479,30 @@ const de = { render: Ze }, _e = { class: "dialogDefaultContainerInsideContent" }
|
|
|
493
479
|
mode: { default: void 0 }
|
|
494
480
|
},
|
|
495
481
|
emits: ["update:modelValue", "submit-phone", "edit", "close", "clean-input-errors", "on-update-jwt", "update-phone-field", "on-toast"],
|
|
496
|
-
setup(
|
|
497
|
-
const u =
|
|
498
|
-
|
|
482
|
+
setup(R, { expose: V, emit: E }) {
|
|
483
|
+
const u = R, c = E, f = L(u.modelValue);
|
|
484
|
+
_(
|
|
499
485
|
() => u.modelValue,
|
|
500
486
|
(s) => f.value = s
|
|
501
|
-
),
|
|
502
|
-
const g =
|
|
487
|
+
), _(f, (s) => c("update:modelValue", s));
|
|
488
|
+
const g = z(() => u.language ?? "ru"), B = (s) => Ie[g.value] && Ie[g.value][s] || (u.title ?? s), H = z(() => u.title ?? B("Смена номера телефона")), J = z(() => u.hintText ?? B("Чтобы продолжить, введите новый номер")), e = pe({
|
|
503
489
|
oldPhone: u.initialPhone ?? "",
|
|
504
490
|
newPhone: "",
|
|
505
491
|
code: "",
|
|
506
492
|
addPhone: "",
|
|
507
493
|
addCode: ""
|
|
508
|
-
}), M = L(
|
|
494
|
+
}), M = L(W.OLD), C = L(null), y = L(!1), x = L(!1), i = L("tg"), h = z(() => i.value === "tg"), v = L(!1), { startTimer: Q, remainingSeconds: l, isAvailableForSendAgain: n, totalRateAttempts: o, currentRateAttempt: O } = qe(), { showRateLimitToast: D } = Ke(c), { isEditFlow: ee, getFlow: de } = We(L(u.mode)), ae = z(() => n.value ? "Повторить" : `${l.value}`), oe = L(re), Y = z(() => oe.value === 0), Ne = (s) => new Promise((a) => setTimeout(a, s));
|
|
509
495
|
async function he(s = "email") {
|
|
510
|
-
var
|
|
511
|
-
return (
|
|
496
|
+
var t;
|
|
497
|
+
return (t = (await Le("/users/profile/session/get-edit-session", { params: { field: s } })).data) == null ? void 0 : t.data;
|
|
512
498
|
}
|
|
513
499
|
async function Ce(s = "phone") {
|
|
514
|
-
var
|
|
515
|
-
const
|
|
500
|
+
var b;
|
|
501
|
+
const t = (b = (await ne("/users/profile/session/create-if-not-exists", {
|
|
516
502
|
field: s,
|
|
517
|
-
oldValue:
|
|
518
|
-
})).data) == null ? void 0 :
|
|
519
|
-
C.value = (
|
|
503
|
+
oldValue: F(u.initialPhone)
|
|
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) ?? W.OLD, e.oldPhone = (t == null ? void 0 : t.oldValue) ?? "", e.newPhone = (t == null ? void 0 : t.newValue) ?? "";
|
|
520
506
|
}
|
|
521
507
|
async function ze() {
|
|
522
508
|
try {
|
|
@@ -526,15 +512,15 @@ const de = { render: Ze }, _e = { class: "dialogDefaultContainerInsideContent" }
|
|
|
526
512
|
await Ce("phone");
|
|
527
513
|
}
|
|
528
514
|
}
|
|
529
|
-
async function we(s,
|
|
530
|
-
var
|
|
515
|
+
async function we(s, a = !1) {
|
|
516
|
+
var t;
|
|
531
517
|
try {
|
|
532
|
-
const
|
|
518
|
+
const b = await ne(
|
|
533
519
|
"/users/profile/check-throttler",
|
|
534
520
|
{
|
|
535
521
|
method: "sms",
|
|
536
|
-
phone:
|
|
537
|
-
isInvite:
|
|
522
|
+
phone: F(s),
|
|
523
|
+
isInvite: a
|
|
538
524
|
},
|
|
539
525
|
{
|
|
540
526
|
headers: {
|
|
@@ -543,208 +529,208 @@ const de = { render: Ze }, _e = { class: "dialogDefaultContainerInsideContent" }
|
|
|
543
529
|
}
|
|
544
530
|
);
|
|
545
531
|
await Ne(1e3);
|
|
546
|
-
const w = (
|
|
547
|
-
return w ? (w.restTimeSec > 0 ? (Q(w.restTimeSec),
|
|
532
|
+
const w = (t = b.data) == null ? void 0 : t.data;
|
|
533
|
+
return w ? (w.restTimeSec > 0 ? (Q(w.restTimeSec), n.value = !1, o.value = w.attempts.total, O.value = w.attempts.total - w.attempts.available, oe.value = w.attempts.available ?? re) : n.value = !0, w) : null;
|
|
548
534
|
} catch {
|
|
549
535
|
return null;
|
|
550
536
|
}
|
|
551
537
|
}
|
|
552
|
-
const ve = async ({ phone: s }) => (v.value = !0, await
|
|
553
|
-
var
|
|
538
|
+
const ve = async ({ phone: s }) => (v.value = !0, await te({ value: s, isOnlySms: !0 })), te = async ({ value: s, isOnlySms: a, offLoading: t } = {}) => {
|
|
539
|
+
var b, w, A, N, j, $;
|
|
554
540
|
y.value = !0;
|
|
555
541
|
try {
|
|
556
|
-
const m = s ?? e.oldPhone, d = await
|
|
542
|
+
const m = s ?? e.oldPhone, d = await ne(
|
|
557
543
|
"/users/profile/phone/contact/send-code",
|
|
558
544
|
{
|
|
559
545
|
sessionId: C.value,
|
|
560
|
-
phone:
|
|
561
|
-
value:
|
|
562
|
-
oldValue:
|
|
546
|
+
phone: F(m),
|
|
547
|
+
value: F(m),
|
|
548
|
+
oldValue: F(e.oldPhone),
|
|
563
549
|
provider: u.provider,
|
|
564
|
-
isOnlySms:
|
|
550
|
+
isOnlySms: a ?? !1
|
|
565
551
|
},
|
|
566
552
|
{
|
|
567
553
|
headers: {
|
|
568
|
-
"x-only-sms":
|
|
554
|
+
"x-only-sms": a ?? !1
|
|
569
555
|
}
|
|
570
556
|
}
|
|
571
557
|
);
|
|
572
558
|
console.debug("response sendContactCode: ", d);
|
|
573
|
-
const P = (w = (
|
|
574
|
-
if ((P === "tg" || P === "sms") && (i.value = P, P === "tg" && (v.value = !1)), console.debug("sendContactCode before обработка 403 tooManyRequests", d), (d == null ? void 0 : d.status) === 403 && ((
|
|
559
|
+
const P = (w = (b = d == null ? void 0 : d.data) == null ? void 0 : b.data) == null ? void 0 : w.deliveryType;
|
|
560
|
+
if ((P === "tg" || P === "sms") && (i.value = P, P === "tg" && (v.value = !1)), console.debug("sendContactCode before обработка 403 tooManyRequests", d), (d == null ? void 0 : d.status) === 403 && ((A = d.data) != null && A.tooManyRequests)) {
|
|
575
561
|
console.debug("sendContactCode IN обработка 403 tooManyRequests", d);
|
|
576
|
-
const I = (
|
|
562
|
+
const I = (j = (N = d.data) == null ? void 0 : N.tooManyRequests) == null ? void 0 : j.type;
|
|
577
563
|
i.value = I;
|
|
578
|
-
const
|
|
579
|
-
return
|
|
564
|
+
const q = d.data.tooManyRequests;
|
|
565
|
+
return q.restTimeSec > 0 ? (Q(q.restTimeSec), o.value = q.attempts.total, O.value = q.attempts.total - q.attempts.available, oe.value = q.attempts.available ?? re) : n.value = !0, d;
|
|
580
566
|
}
|
|
581
567
|
return console.debug("sendContactCode after обработка 403 tooManyRequests", d), await we(m), d;
|
|
582
568
|
} catch (m) {
|
|
583
569
|
const d = ($ = m == null ? void 0 : m.data) == null ? void 0 : $.tooManyRequests;
|
|
584
570
|
if ((m == null ? void 0 : m.status) === 403 && d) {
|
|
585
571
|
const { restTimeSec: P, attempts: I } = d;
|
|
586
|
-
return P > 0 ? (Q(P),
|
|
572
|
+
return P > 0 ? (Q(P), o.value = I.total, O.value = I.total - I.available, oe.value = I.available ?? re) : n.value = !0, m;
|
|
587
573
|
}
|
|
588
574
|
throw m;
|
|
589
575
|
} finally {
|
|
590
|
-
y.value = !1,
|
|
576
|
+
y.value = !1, t && (y.value = !1);
|
|
591
577
|
}
|
|
592
|
-
}, Pe = async (s,
|
|
593
|
-
var
|
|
578
|
+
}, Pe = async (s, a) => {
|
|
579
|
+
var t, b, w, A, N, j, $, m;
|
|
594
580
|
y.value = !0;
|
|
595
581
|
try {
|
|
596
582
|
const d = await he("phone");
|
|
597
583
|
C.value = d.sessionId, M.value = d.step, e.oldPhone = d.oldValue ?? e.oldPhone, e.newPhone = d.newValue ?? e.newPhone;
|
|
598
|
-
const P = await
|
|
599
|
-
phone:
|
|
584
|
+
const P = await ne("/users/profile/change/phone/match-code", {
|
|
585
|
+
phone: a === W.NEW ? F(e.newPhone) : F(e.oldPhone),
|
|
600
586
|
sessionId: C.value,
|
|
601
587
|
code: s,
|
|
602
|
-
step:
|
|
603
|
-
}), I = ((
|
|
604
|
-
if (
|
|
588
|
+
step: a
|
|
589
|
+
}), I = ((t = P.data) == null ? void 0 : t.nextStep) ?? ((w = (b = P.data) == null ? void 0 : b.data) == null ? void 0 : w.nextStep), q = ((N = (A = P.data) == null ? void 0 : A.data) == null ? void 0 : N.rateLimit) ?? ((j = P.data) == null ? void 0 : j.rateLimit) ?? null, Re = (($ = P.data) == null ? void 0 : $.data.success) ?? ((m = P.data) == null ? void 0 : m.success);
|
|
590
|
+
if (D(q), !Re) {
|
|
605
591
|
x.value = !0;
|
|
606
592
|
return;
|
|
607
593
|
}
|
|
608
594
|
if (!I) return P;
|
|
609
|
-
if (M.value = I, I ===
|
|
595
|
+
if (M.value = I, I === W.NEW) {
|
|
610
596
|
const $e = await he("phone");
|
|
611
597
|
e.oldPhone = $e.oldValue ?? e.oldPhone, e.newPhone = $e.newValue ?? e.newPhone, e.code = "";
|
|
612
598
|
}
|
|
613
|
-
return I ===
|
|
599
|
+
return I === W.COMPLETED && (e.code = "", c("update-phone-field", e.addPhone), c("submit-phone", { phone: e.oldPhone, code: s }), c("on-toast", { color: "success", text: "Номер телефона изменён" }), c("on-update-jwt", "phone", "edit", e.newPhone), C.value = null, c("close")), P;
|
|
614
600
|
} finally {
|
|
615
601
|
y.value = !1;
|
|
616
602
|
}
|
|
617
|
-
}, Te = ({ code: s }) => Pe(s,
|
|
603
|
+
}, Te = ({ code: s }) => Pe(s, W.OLD);
|
|
618
604
|
function Se(s) {
|
|
619
605
|
}
|
|
620
|
-
const Me = ({ code: s }) => Pe(s,
|
|
606
|
+
const Me = ({ code: s }) => Pe(s, W.NEW);
|
|
621
607
|
function xe(s) {
|
|
622
608
|
}
|
|
623
609
|
const ue = () => {
|
|
624
610
|
c("close"), f.value = !1;
|
|
625
611
|
};
|
|
626
|
-
async function
|
|
627
|
-
var
|
|
628
|
-
return (
|
|
612
|
+
async function Ve(s = "phone") {
|
|
613
|
+
var t;
|
|
614
|
+
return (t = (await Le("/users/profile/session/get-bind-session", { params: { field: s } })).data) == null ? void 0 : t.data;
|
|
629
615
|
}
|
|
630
|
-
async function
|
|
616
|
+
async function be({
|
|
631
617
|
value: s,
|
|
632
|
-
field:
|
|
633
|
-
offLoading:
|
|
618
|
+
field: a = "phone",
|
|
619
|
+
offLoading: t = !0
|
|
634
620
|
}) {
|
|
635
|
-
var
|
|
621
|
+
var b, w, A;
|
|
636
622
|
y.value = !0;
|
|
637
623
|
try {
|
|
638
624
|
if (!C.value) {
|
|
639
|
-
const
|
|
640
|
-
field:
|
|
641
|
-
newValue:
|
|
625
|
+
const N = await ne("/users/profile/session/bind/create", {
|
|
626
|
+
field: a,
|
|
627
|
+
newValue: F(s || e.addPhone)
|
|
642
628
|
});
|
|
643
|
-
if (C.value = ((w = (
|
|
629
|
+
if (C.value = ((w = (b = N.data) == null ? void 0 : b.data) == null ? void 0 : w.sessionId) ?? ((A = N.data) == null ? void 0 : A.sessionId) ?? null, !C.value)
|
|
644
630
|
throw new Error("не удалось создать bind-сессию (sessionId отсутствует)");
|
|
645
631
|
}
|
|
646
632
|
} finally {
|
|
647
|
-
|
|
633
|
+
t && (y.value = !1);
|
|
648
634
|
}
|
|
649
635
|
}
|
|
650
636
|
async function Fe() {
|
|
651
637
|
try {
|
|
652
|
-
const s = await
|
|
653
|
-
C.value = s.sessionId, M.value = s.step, e.addPhone = s.newValue ?? "", s.sessionId || await
|
|
638
|
+
const s = await Ve("phone");
|
|
639
|
+
C.value = s.sessionId, M.value = s.step, e.addPhone = s.newValue ?? "", s.sessionId || await be({ field: "phone", value: e.addPhone });
|
|
654
640
|
} catch {
|
|
655
|
-
await
|
|
641
|
+
await be({ field: "phone", value: e.addPhone });
|
|
656
642
|
}
|
|
657
643
|
}
|
|
658
644
|
const me = async ({
|
|
659
645
|
value: s,
|
|
660
|
-
field:
|
|
661
|
-
isOnlySms:
|
|
662
|
-
offLoading:
|
|
646
|
+
field: a = "phone",
|
|
647
|
+
isOnlySms: t = !1,
|
|
648
|
+
offLoading: b = !0
|
|
663
649
|
} = {}) => {
|
|
664
|
-
var w,
|
|
650
|
+
var w, A, N;
|
|
665
651
|
y.value = !0;
|
|
666
652
|
try {
|
|
667
653
|
if (!C.value)
|
|
668
654
|
throw new Error("bind-сессия не найдена. создайте её через createBindSession.");
|
|
669
|
-
const
|
|
670
|
-
`/users/profile/bind/contact/send-code/${
|
|
655
|
+
const j = s ?? e.addPhone, $ = await ne(
|
|
656
|
+
`/users/profile/bind/contact/send-code/${a}`,
|
|
671
657
|
{
|
|
672
658
|
sessionId: C.value,
|
|
673
|
-
phone:
|
|
659
|
+
phone: F(j),
|
|
674
660
|
provider: u.provider,
|
|
675
|
-
isOnlySms:
|
|
661
|
+
isOnlySms: t ?? !1
|
|
676
662
|
},
|
|
677
663
|
{
|
|
678
664
|
headers: {
|
|
679
|
-
"x-only-sms":
|
|
665
|
+
"x-only-sms": t ?? !1
|
|
680
666
|
}
|
|
681
667
|
}
|
|
682
|
-
), m = (
|
|
668
|
+
), m = (A = (w = $ == null ? void 0 : $.data) == null ? void 0 : w.data) == null ? void 0 : A.deliveryType;
|
|
683
669
|
(m === "tg" || m === "sms") && (i.value = m, m === "tg" && (v.value = !1));
|
|
684
|
-
const d = (
|
|
670
|
+
const d = (N = $.data) == null ? void 0 : N.tooManyRequests;
|
|
685
671
|
if ($.status === 403 && d) {
|
|
686
672
|
const I = d == null ? void 0 : d.type;
|
|
687
|
-
return i.value = I, d.restTimeSec > 0 ? (Q(d.restTimeSec),
|
|
673
|
+
return i.value = I, d.restTimeSec > 0 ? (Q(d.restTimeSec), o.value = d.attempts.total, O.value = d.attempts.total - d.attempts.available, oe.value = d.attempts.available ?? re) : n.value = !0, $;
|
|
688
674
|
}
|
|
689
|
-
const P = await we(
|
|
690
|
-
return P && P.restTimeSec > 0 ? (Q(P.restTimeSec),
|
|
675
|
+
const P = await we(j);
|
|
676
|
+
return P && P.restTimeSec > 0 ? (Q(P.restTimeSec), n.value = !1) : n.value = !0, $;
|
|
691
677
|
} finally {
|
|
692
|
-
|
|
678
|
+
b && (y.value = !1);
|
|
693
679
|
}
|
|
694
|
-
},
|
|
695
|
-
var
|
|
680
|
+
}, Ee = async ({ code: s }) => {
|
|
681
|
+
var a, t, b, w, A, N, j, $;
|
|
696
682
|
y.value = !0;
|
|
697
683
|
try {
|
|
698
684
|
if (!C.value) {
|
|
699
|
-
const
|
|
700
|
-
C.value =
|
|
685
|
+
const q = await Ve("phone");
|
|
686
|
+
C.value = q.sessionId, e.addPhone = q.newValue ?? e.addPhone;
|
|
701
687
|
}
|
|
702
|
-
const m = await
|
|
703
|
-
phone:
|
|
688
|
+
const m = await ne("/users/profile/bind/phone/match-code", {
|
|
689
|
+
phone: F(e.addPhone),
|
|
704
690
|
sessionId: C.value,
|
|
705
691
|
code: s
|
|
706
|
-
}), d = ((
|
|
707
|
-
if (
|
|
692
|
+
}), d = ((a = m.data) == null ? void 0 : a.nextStep) ?? ((b = (t = m.data) == null ? void 0 : t.data) == null ? void 0 : b.nextStep), P = ((A = (w = m.data) == null ? void 0 : w.data) == null ? void 0 : A.rateLimit) ?? ((N = m.data) == null ? void 0 : N.rateLimit) ?? null, I = ((j = m.data) == null ? void 0 : j.data.success) ?? (($ = m.data) == null ? void 0 : $.success);
|
|
693
|
+
if (D(P), !I) {
|
|
708
694
|
x.value = !0;
|
|
709
695
|
return;
|
|
710
696
|
}
|
|
711
|
-
return d && d ===
|
|
697
|
+
return d && d === W.COMPLETED && (e.code = "", c("update-phone-field", e.addPhone), c("submit-phone", { phone: e.addPhone, code: s }), c("on-update-jwt", "phone", "bind", e.addPhone), c("on-toast", { color: "success", text: "Номер телефона успешно привязан к аккаунту" }), C.value = null, c("close")), m;
|
|
712
698
|
} finally {
|
|
713
699
|
y.value = !1;
|
|
714
700
|
}
|
|
715
|
-
},
|
|
701
|
+
}, ke = async () => {
|
|
716
702
|
};
|
|
717
703
|
return Ue(async () => {
|
|
718
704
|
y.value = !0;
|
|
719
|
-
const s = await
|
|
705
|
+
const s = await de("phone");
|
|
720
706
|
if (u.mode === "bind" && s === "bind") {
|
|
721
707
|
await Fe(), y.value = !1;
|
|
722
708
|
return;
|
|
723
709
|
}
|
|
724
|
-
await ze(), await
|
|
725
|
-
}),
|
|
710
|
+
await ze(), await te({});
|
|
711
|
+
}), V({
|
|
726
712
|
localVisible: f,
|
|
727
713
|
form: e,
|
|
728
714
|
currentStep: M,
|
|
729
715
|
loading: y,
|
|
730
|
-
rateLimitText:
|
|
731
|
-
isAvailable:
|
|
716
|
+
rateLimitText: ae,
|
|
717
|
+
isAvailable: Y,
|
|
732
718
|
title: H,
|
|
733
719
|
hintText: J,
|
|
734
720
|
handleClose: ue,
|
|
735
|
-
sendContactCode:
|
|
721
|
+
sendContactCode: te,
|
|
736
722
|
sendBindContactCode: me,
|
|
737
723
|
handleOldCodeSuccess: Te,
|
|
738
724
|
handleOldCodeError: Se,
|
|
739
725
|
handleNewCodeSuccess: Me,
|
|
740
726
|
handleNewCodeError: xe,
|
|
741
|
-
matchBindCode:
|
|
742
|
-
matchBindCodeError:
|
|
743
|
-
}), (s,
|
|
727
|
+
matchBindCode: Ee,
|
|
728
|
+
matchBindCodeError: ke
|
|
729
|
+
}), (s, a) => (p(), T(je, null, [
|
|
744
730
|
S(r(Ge), {
|
|
745
731
|
modelValue: f.value,
|
|
746
732
|
"onUpdate:modelValue": [
|
|
747
|
-
|
|
733
|
+
a[15] || (a[15] = (t) => f.value = t),
|
|
748
734
|
ue
|
|
749
735
|
],
|
|
750
736
|
width: "small",
|
|
@@ -752,18 +738,18 @@ const de = { render: Ze }, _e = { class: "dialogDefaultContainerInsideContent" }
|
|
|
752
738
|
"close-on-click-outside": !0,
|
|
753
739
|
"onClick:outside": ue
|
|
754
740
|
}, {
|
|
755
|
-
header:
|
|
756
|
-
|
|
741
|
+
header: X(() => [
|
|
742
|
+
U("div", xo, [
|
|
757
743
|
S(r(Je), {
|
|
758
744
|
"slot-left": !1,
|
|
759
745
|
size: "small",
|
|
760
746
|
borded: !0,
|
|
761
747
|
"no-padding": !1
|
|
762
748
|
}, {
|
|
763
|
-
title:
|
|
764
|
-
|
|
749
|
+
title: X(() => [
|
|
750
|
+
U("span", Vo, K(r(ee) ? H.value : "Добавление номера телефона"), 1)
|
|
765
751
|
]),
|
|
766
|
-
"right-button":
|
|
752
|
+
"right-button": X(() => [
|
|
767
753
|
S(r(Qe), {
|
|
768
754
|
class: "cross",
|
|
769
755
|
onClick: ue
|
|
@@ -773,68 +759,68 @@ const de = { render: Ze }, _e = { class: "dialogDefaultContainerInsideContent" }
|
|
|
773
759
|
})
|
|
774
760
|
])
|
|
775
761
|
]),
|
|
776
|
-
default:
|
|
777
|
-
r(
|
|
778
|
-
y.value ? (p(), G(Be, { key: 0 })) :
|
|
779
|
-
M.value === r(
|
|
762
|
+
default: X(() => [
|
|
763
|
+
r(ee) ? (p(), T("div", bo, [
|
|
764
|
+
y.value ? (p(), G(Be, { key: 0 })) : k("", !0),
|
|
765
|
+
M.value === r(W).OLD ? (p(), G(lo, {
|
|
780
766
|
key: 1,
|
|
781
767
|
phone: e.oldPhone,
|
|
782
|
-
"onUpdate:phone":
|
|
768
|
+
"onUpdate:phone": a[0] || (a[0] = (t) => e.oldPhone = t),
|
|
783
769
|
code: e.code,
|
|
784
|
-
"onUpdate:code":
|
|
785
|
-
"rate-limit-text":
|
|
786
|
-
"is-final-limit":
|
|
770
|
+
"onUpdate:code": a[1] || (a[1] = (t) => e.code = t),
|
|
771
|
+
"rate-limit-text": ae.value,
|
|
772
|
+
"is-final-limit": Y.value,
|
|
787
773
|
"is-not-match-code": x.value,
|
|
788
774
|
loading: y.value,
|
|
789
775
|
"is-tg": h.value,
|
|
790
|
-
onOnSendCode:
|
|
791
|
-
onOnSendCodeAgain:
|
|
776
|
+
onOnSendCode: a[2] || (a[2] = (t) => te({ value: e.oldPhone })),
|
|
777
|
+
onOnSendCodeAgain: a[3] || (a[3] = (t) => te({ value: e.oldPhone, isOnlySms: !h.value && v.value })),
|
|
792
778
|
onOnSendOnlySms: ve,
|
|
793
779
|
onOnMatchCode: Te,
|
|
794
780
|
onOnMatchCodeError: Se
|
|
795
|
-
}, null, 8, ["phone", "code", "rate-limit-text", "is-final-limit", "is-not-match-code", "loading", "is-tg"])) : M.value === r(
|
|
781
|
+
}, null, 8, ["phone", "code", "rate-limit-text", "is-final-limit", "is-not-match-code", "loading", "is-tg"])) : M.value === r(W).NEW ? (p(), G(mo, {
|
|
796
782
|
key: 2,
|
|
797
783
|
phone: e.newPhone,
|
|
798
|
-
"onUpdate:phone":
|
|
784
|
+
"onUpdate:phone": a[4] || (a[4] = (t) => e.newPhone = t),
|
|
799
785
|
oldPhone: e.oldPhone,
|
|
800
|
-
"onUpdate:oldPhone":
|
|
786
|
+
"onUpdate:oldPhone": a[5] || (a[5] = (t) => e.oldPhone = t),
|
|
801
787
|
code: e.code,
|
|
802
|
-
"onUpdate:code":
|
|
788
|
+
"onUpdate:code": a[6] || (a[6] = (t) => e.code = t),
|
|
803
789
|
"hint-text": J.value,
|
|
804
|
-
"rate-limit-text":
|
|
805
|
-
"is-final-limit":
|
|
790
|
+
"rate-limit-text": ae.value,
|
|
791
|
+
"is-final-limit": Y.value,
|
|
806
792
|
"is-not-match-code": x.value,
|
|
807
793
|
loading: y.value,
|
|
808
794
|
"is-tg": h.value,
|
|
809
|
-
onOnSendCode:
|
|
810
|
-
onOnSendCodeAgain:
|
|
795
|
+
onOnSendCode: a[7] || (a[7] = (t) => te({ value: e.newPhone })),
|
|
796
|
+
onOnSendCodeAgain: a[8] || (a[8] = (t) => te({ value: e.newPhone, isOnlySms: !h.value && v.value })),
|
|
811
797
|
onOnSendOnlySms: ve,
|
|
812
798
|
onOnMatchCode: Me,
|
|
813
799
|
onOnMatchCodeError: xe,
|
|
814
|
-
onOnClearCodeError:
|
|
815
|
-
}, null, 8, ["phone", "oldPhone", "code", "hint-text", "rate-limit-text", "is-final-limit", "is-not-match-code", "loading", "is-tg"])) : M.value === r(
|
|
816
|
-
|
|
817
|
-
])) :
|
|
818
|
-
])) : (p(), T("div",
|
|
819
|
-
y.value ? (p(), G(Be, { key: 0 })) :
|
|
800
|
+
onOnClearCodeError: a[9] || (a[9] = (t) => x.value = !1)
|
|
801
|
+
}, null, 8, ["phone", "oldPhone", "code", "hint-text", "rate-limit-text", "is-final-limit", "is-not-match-code", "loading", "is-tg"])) : M.value === r(W).COMPLETED ? (p(), T("div", Eo, [
|
|
802
|
+
U("p", null, K(B("Телефон успешно изменен")), 1)
|
|
803
|
+
])) : k("", !0)
|
|
804
|
+
])) : (p(), T("div", ko, [
|
|
805
|
+
y.value ? (p(), G(Be, { key: 0 })) : k("", !0),
|
|
820
806
|
S(Mo, {
|
|
821
807
|
phone: e.addPhone,
|
|
822
|
-
"onUpdate:phone":
|
|
808
|
+
"onUpdate:phone": a[10] || (a[10] = (t) => e.addPhone = t),
|
|
823
809
|
oldPhone: e.oldPhone,
|
|
824
|
-
"onUpdate:oldPhone":
|
|
810
|
+
"onUpdate:oldPhone": a[11] || (a[11] = (t) => e.oldPhone = t),
|
|
825
811
|
code: e.addCode,
|
|
826
|
-
"onUpdate:code":
|
|
827
|
-
"hint-text": r(
|
|
828
|
-
"rate-limit-text":
|
|
829
|
-
"is-final-limit":
|
|
812
|
+
"onUpdate:code": a[12] || (a[12] = (t) => e.addCode = t),
|
|
813
|
+
"hint-text": r(ee) ? J.value : "Чтобы продолжить, введите новый номер",
|
|
814
|
+
"rate-limit-text": ae.value,
|
|
815
|
+
"is-final-limit": Y.value,
|
|
830
816
|
"is-not-match-code": x.value,
|
|
831
817
|
loading: y.value,
|
|
832
818
|
"is-tg": h.value,
|
|
833
|
-
onOnSendCode:
|
|
834
|
-
onOnSendCodeAgain:
|
|
819
|
+
onOnSendCode: a[13] || (a[13] = (t) => me({ value: e.addPhone, field: "phone" })),
|
|
820
|
+
onOnSendCodeAgain: a[14] || (a[14] = (t) => me({ value: e.addPhone, field: "phone", isOnlySms: !h.value && v.value })),
|
|
835
821
|
onOnSendOnlySms: ve,
|
|
836
|
-
onOnMatchCode:
|
|
837
|
-
onOnMatchCodeError:
|
|
822
|
+
onOnMatchCode: Ee,
|
|
823
|
+
onOnMatchCodeError: ke
|
|
838
824
|
}, null, 8, ["phone", "oldPhone", "code", "hint-text", "rate-limit-text", "is-final-limit", "is-not-match-code", "loading", "is-tg"])
|
|
839
825
|
]))
|
|
840
826
|
]),
|
|
@@ -213,9 +213,9 @@ const Ze = {
|
|
|
213
213
|
emits: ["clean-input-errors", "on-update-jwt", "update-phone-field", "update-email-field", "on-password-error", "on-toast"],
|
|
214
214
|
setup(m, { emit: r }) {
|
|
215
215
|
const n = r, s = h(!0), { currentDialog: v, dialogPayload: g, closeDialog: U } = K(), l = {
|
|
216
|
-
email: G(() => import("./ProfileEmailDialog-
|
|
217
|
-
phone: G(() => import("./ProfilePhoneDialog-
|
|
218
|
-
password: G(() => import("./ProfilePasswordDialog-
|
|
216
|
+
email: G(() => import("./ProfileEmailDialog-BRhT6nYd.js")),
|
|
217
|
+
phone: G(() => import("./ProfilePhoneDialog-f-M1JdM_.js")),
|
|
218
|
+
password: G(() => import("./ProfilePasswordDialog-1E-HIVXQ.js"))
|
|
219
219
|
}, d = ({ email: y }) => {
|
|
220
220
|
n("update-email-field", y);
|
|
221
221
|
}, p = ({ 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-wrapper[data-v-0fcb1c3e] .p-avatar__overlay{opacity:0!important;transition:opacity .2s ease}.avatar-wrapper[data-v-0fcb1c3e]:hover .p-avatar__overlay{opacity:1!important}.avatar-wrapper[data-v-0fcb1c3e] .wide-img .overlay{opacity:0!important;transition:opacity .2s ease}.avatar-wrapper[data-v-0fcb1c3e]:hover .wide-img .overlay{opacity:1!important}.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-Rt4lWoBK.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 m, 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-Rt4lWoBK.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")}`;
|