@yourgoods/ui-smart 0.5.0 → 0.7.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.
@@ -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 Oe, createBlock as R, resolveDynamicComponent as Ce, onMounted as Ue } from "vue";
2
- import { T as de, c as Ve, _ as Ae, u as Fe, a as Re, P as ye, b as ze } from "./useRateLimitToast-CpNES7IA.js";
3
- import { C as D, B as We, p as F, g as He } from "./index-D0TK0qAd.js";
2
+ import { T as de, c as Ve, _ as Ae, u as Fe, a as Re, P as ye, b as ze } from "./useRateLimitToast-j3HiT6VK.js";
3
+ import { C as D, B as We, p as F, g as He } from "./index-DnFZJeDG.js";
4
4
  import { PInput as _, IconMailMd as re, PButton as le, IconEyeMd as ge, IconEyeClosedMd as he, PDialog as qe, PTopBar as je, IconCrossMd as _e } from "@profeat/ui-kit";
5
5
  const Ge = { class: "dialogDefaultContainerInsideContent" }, Ye = { 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-D0TK0qAd.js";
2
+ import { C as I, p as D, g as Ve } from "./index-DnFZJeDG.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 z, defineComponent as re, reactive as ue, watch as X, ref as O, toRefs as me, computed as A, createCommentVNode as $, createVNode as S, toDisplayString as q, createBlock as j, createTextVNode as Q, unref as r, isRef as ee, withCtx as J, onMounted as Ue, Fragment as qe } from "vue";
2
- import { T as fe, c as Oe, a as We, u as je, P as Ee, b as He } from "./useRateLimitToast-CpNES7IA.js";
3
- import { IconTelegramSm as ge, PInput as te, 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 U, t as Be, p as Z, g as Ie } from "./index-D0TK0qAd.js";
1
+ import { createElementBlock as T, openBlock as p, createElementVNode as F, defineComponent as re, reactive as ue, watch as Y, ref as O, toRefs as me, computed as A, createCommentVNode as $, createVNode as S, toDisplayString as W, createBlock as H, createTextVNode as X, unref as r, isRef as te, 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 Ee, b as He } from "./useRateLimitToast-j3HiT6VK.js";
3
+ import { IconTelegramSm as ge, PInput as oe, 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 Be, p as _, g as Ie } from "./index-DnFZJeDG.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(N, b) {
11
+ function Ze(z, b) {
12
12
  return p(), T("svg", Ye, b[0] || (b[0] = [
13
- z("path", {
13
+ F("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(N, b) {
18
18
  }, null, -1)
19
19
  ]));
20
20
  }
21
- const oe = { 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 = {
21
+ const ne = { 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 = {
@@ -42,16 +42,16 @@ const oe = { 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(N, { emit: b }) {
46
- const k = N, u = b, c = ue({
45
+ setup(z, { emit: b }) {
46
+ const k = z, u = b, c = ue({
47
47
  touched: { phone: !1, code: !1 },
48
48
  phoneModel: k.phone,
49
49
  codeModel: k.code
50
50
  });
51
- X(
51
+ Y(
52
52
  () => c.phoneModel,
53
53
  (i) => u("update:phone", i)
54
- ), X(
54
+ ), Y(
55
55
  () => c.codeModel,
56
56
  (i) => u("update:code", i)
57
57
  );
@@ -64,24 +64,24 @@ const oe = { render: Ze }, _e = { class: "dialogDefaultContainerInsideContent" }
64
64
  const h = i.target;
65
65
  let v = ((h == null ? void 0 : h.value) ?? "").replace(/\D/g, "");
66
66
  v.length > 4 && (v = v.slice(0, 4)), M.value = v, h && h.value !== v && (h.value = v), v.length === 4 && v !== f.value && (f.value = v, u("on-match-code", { phone: e.value, code: v }));
67
- }, W = () => u("on-send-code-again", { phone: c.phoneModel }), H = () => {
67
+ }, j = () => u("on-send-code-again", { phone: c.phoneModel }), G = () => {
68
68
  console.debug("onSendCodeViaSms"), u("on-send-only-sms", { phone: c.phoneModel });
69
69
  }, { phoneModel: e, codeModel: M, touched: C } = me(c), y = A(() => C.value.phone && !e.value.trim() ? "Введите телефон" : k.phoneError), x = A(() => k.isNotMatchCode ? "Неверный код" : C.value.code ? M.value.trim() ? k.codeError ?? null : "Введите код" : "");
70
70
  return (i, h) => (p(), T("div", _e, [
71
- z("div", et, [
72
- z("div", tt, q(i.hintText), 1),
73
- z("div", ot, [
74
- i.isTg ? (p(), j(r(ge), { key: 0 })) : (p(), j(r(oe), {
71
+ F("div", et, [
72
+ F("div", tt, W(i.hintText), 1),
73
+ F("div", ot, [
74
+ i.isTg ? (p(), H(r(ge), { key: 0 })) : (p(), H(r(ne), {
75
75
  key: 1,
76
76
  style: { "margin-left": "5px" }
77
77
  })),
78
- Q(" " + q(i.isTg ? "Telegram" : "СМС"), 1)
78
+ X(" " + W(i.isTg ? "Telegram" : "СМС"), 1)
79
79
  ])
80
80
  ]),
81
81
  i.showPhone ? (p(), T("div", nt, [
82
- S(r(te), {
82
+ S(r(oe), {
83
83
  modelValue: r(e),
84
- "onUpdate:modelValue": h[0] || (h[0] = (v) => ee(e) ? e.value = v : null),
84
+ "onUpdate:modelValue": h[0] || (h[0] = (v) => te(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
  ])) : $("", !0),
99
99
  i.showCode ? (p(), T("div", at, [
100
- S(r(te), {
100
+ S(r(oe), {
101
101
  modelValue: r(M),
102
- "onUpdate:modelValue": h[4] || (h[4] = (v) => ee(M) ? M.value = v : null),
102
+ "onUpdate:modelValue": h[4] || (h[4] = (v) => te(M) ? M.value = v : null),
103
103
  size: "large",
104
104
  "text-size": "medium",
105
105
  label: "Код",
@@ -113,23 +113,32 @@ 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": W
116
+ "on-send-again": j
117
117
  }, {
118
- extra: J(() => [
118
+ extra: K(() => [
119
119
  i.isTg ? (p(), T("span", {
120
120
  key: 0,
121
121
  class: "dialogDefaultContainerSendCodeBySmsText",
122
- onClick: H
122
+ onClick: G
123
123
  }, [
124
- Q(q(i.sendCodeBySmsText) + " ", 1),
125
- S(r(oe), { style: { "margin-left": "5px" } })
124
+ X(W(i.sendCodeBySmsText) + " ", 1),
125
+ S(r(ne), { style: { "margin-left": "5px" } })
126
126
  ])) : $("", !0)
127
127
  ]),
128
128
  _: 1
129
129
  }, 8, ["loading", "rate-limit-text", "is-final-limit"])
130
130
  ]));
131
131
  }
132
- }), st = { class: "dialogDefaultContainerInsideContent" }, it = { style: { display: "flex", width: "100%", gap: "4px", "align-items": "center", "justify-content": "center", "text-align": "center" } }, dt = { class: "dialogDefaultContainerTextHint" }, rt = {
132
+ }), N = (z) => {
133
+ const b = z.replace(/\D/g, "");
134
+ if (b.length >= 10 && b.length <= 15) {
135
+ if (b.startsWith("8"))
136
+ return `+7${b.slice(1)}`;
137
+ if (b.startsWith("7"))
138
+ return `+${b}`;
139
+ }
140
+ return z.trim().startsWith("+") ? z.trim() : `+${b}`;
141
+ }, st = { class: "dialogDefaultContainerInsideContent" }, it = { style: { display: "flex", width: "100%", gap: "4px", "align-items": "center", "justify-content": "center", "text-align": "center" } }, dt = { class: "dialogDefaultContainerTextHint" }, rt = {
133
142
  key: 0,
134
143
  class: "chip"
135
144
  }, ut = {
@@ -158,38 +167,38 @@ const oe = { render: Ze }, _e = { class: "dialogDefaultContainerInsideContent" }
158
167
  isTg: { type: Boolean }
159
168
  },
160
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"],
161
- setup(N, { emit: b }) {
162
- const k = N, u = b, c = O(!1), g = O(""), f = ue({
170
+ setup(z, { emit: b }) {
171
+ const k = z, u = b, c = O(!1), g = O(""), f = ue({
163
172
  touched: { phone: !1, code: !1 },
164
173
  phoneModel: "",
165
174
  codeModel: ""
166
175
  });
167
- X(
176
+ Y(
168
177
  () => f.phoneModel,
169
178
  (n) => {
170
179
  u("update:phone", n), g.value = "";
171
180
  }
172
- ), X(
181
+ ), Y(
173
182
  () => f.codeModel,
174
183
  (n) => u("update:code", n)
175
184
  );
176
- const B = (n) => f.touched[n] = !0, W = A(() => {
185
+ const B = (n) => f.touched[n] = !0, j = A(() => {
177
186
  const o = f.phoneModel.trim().replace(/[()\-\s]/g, "");
178
187
  return /^\+?\d{10,15}$/.test(o);
179
- }), H = async () => {
180
- var K;
181
- if (B("phone"), !W.value) {
188
+ }), G = async () => {
189
+ var Q;
190
+ if (B("phone"), !j.value) {
182
191
  g.value = "Это не похоже на номер телефона";
183
192
  return;
184
193
  }
185
194
  const {
186
195
  data: { data: n, success: o, message: s }
187
- } = await Oe(void 0, f.phoneModel);
196
+ } = await Oe(void 0, N(f.phoneModel));
188
197
  if (!o && typeof s == "string" && s.includes("Телефон должен быть в формате")) {
189
198
  g.value = "Это не похоже на номер телефона";
190
199
  return;
191
200
  }
192
- if (!(((K = n == null ? void 0 : n[0]) == null ? void 0 : K.available) ?? !1)) {
201
+ if (!(((Q = n == null ? void 0 : n[0]) == null ? void 0 : Q.available) ?? !1)) {
193
202
  g.value = "Такой номер уже используется";
194
203
  return;
195
204
  }
@@ -205,22 +214,22 @@ const oe = { render: Ze }, _e = { class: "dialogDefaultContainerInsideContent" }
205
214
  u("on-send-code-again", { phone: f.phoneModel });
206
215
  }, y = () => {
207
216
  console.debug("onSendCodeViaSms"), u("on-send-only-sms", { phone: f.phoneModel });
208
- }, { phoneModel: x, codeModel: i, touched: h } = me(f), v = A(() => g.value ? g.value : h.value.phone && !x.value.trim() ? "Это не похоже на номер телефона" : k.phoneError || ""), G = A(() => k.isNotMatchCode ? "Неверный код" : h.value.code ? i.value.trim() ? k.codeError ?? null : "Введите код" : "");
217
+ }, { phoneModel: x, codeModel: i, touched: h } = me(f), v = A(() => g.value ? g.value : h.value.phone && !x.value.trim() ? "Это не похоже на номер телефона" : k.phoneError || ""), J = A(() => k.isNotMatchCode ? "Неверный код" : h.value.code ? i.value.trim() ? k.codeError ?? null : "Введите код" : "");
209
218
  return (n, o) => (p(), T("div", st, [
210
- z("div", it, [
211
- z("div", dt, q(c.value ? "Чтобы продолжить, введите код подтверждения из" : n.hintText), 1),
219
+ F("div", it, [
220
+ F("div", dt, W(c.value ? "Чтобы продолжить, введите код подтверждения из" : n.hintText), 1),
212
221
  c.value ? (p(), T("div", rt, [
213
- n.isTg ? (p(), j(r(ge), { key: 0 })) : (p(), j(r(oe), {
222
+ n.isTg ? (p(), H(r(ge), { key: 0 })) : (p(), H(r(ne), {
214
223
  key: 1,
215
224
  style: { "margin-left": "5px" }
216
225
  })),
217
- Q(" " + q(n.isTg ? "Telegram" : "СМС"), 1)
226
+ X(" " + W(n.isTg ? "Telegram" : "СМС"), 1)
218
227
  ])) : $("", !0)
219
228
  ]),
220
229
  n.showPhone ? (p(), T("div", ut, [
221
- S(r(te), {
230
+ S(r(oe), {
222
231
  modelValue: r(x),
223
- "onUpdate:modelValue": o[0] || (o[0] = (s) => ee(x) ? x.value = s : null),
232
+ "onUpdate:modelValue": o[0] || (o[0] = (s) => te(x) ? x.value = s : null),
224
233
  size: "large",
225
234
  "text-size": "medium",
226
235
  label: "Телефон",
@@ -237,25 +246,25 @@ const oe = { render: Ze }, _e = { class: "dialogDefaultContainerInsideContent" }
237
246
  c.value ? $("", !0) : (p(), T("div", ct, [
238
247
  S(r(De), {
239
248
  style: { width: "100%" },
240
- disabled: !W.value,
241
- onClick: H
249
+ disabled: !j.value,
250
+ onClick: G
242
251
  }, {
243
- default: J(() => o[6] || (o[6] = [
244
- Q(" Отправить код ")
252
+ default: K(() => o[6] || (o[6] = [
253
+ X(" Отправить код ")
245
254
  ])),
246
255
  _: 1,
247
256
  __: [6]
248
257
  }, 8, ["disabled"])
249
258
  ])),
250
259
  c.value ? (p(), T("div", pt, [
251
- S(r(te), {
260
+ S(r(oe), {
252
261
  modelValue: r(i),
253
- "onUpdate:modelValue": o[4] || (o[4] = (s) => ee(i) ? i.value = s : null),
262
+ "onUpdate:modelValue": o[4] || (o[4] = (s) => te(i) ? i.value = s : null),
254
263
  size: "large",
255
264
  "text-size": "medium",
256
265
  label: "Код",
257
266
  type: "text",
258
- error: G.value,
267
+ error: J.value,
259
268
  onInput: M,
260
269
  onBlur: o[5] || (o[5] = (s) => B("code"))
261
270
  }, null, 8, ["modelValue", "error"])
@@ -267,14 +276,14 @@ const oe = { render: Ze }, _e = { class: "dialogDefaultContainerInsideContent" }
267
276
  "is-final-limit": n.isFinalLimit,
268
277
  "on-send-again": C
269
278
  }, {
270
- extra: J(() => [
279
+ extra: K(() => [
271
280
  n.isTg ? (p(), T("span", {
272
281
  key: 0,
273
282
  class: "dialogDefaultContainerSendCodeBySmsText",
274
283
  onClick: y
275
284
  }, [
276
- Q(q(n.sendCodeBySmsText) + " ", 1),
277
- S(r(oe), { style: { "margin-left": "5px" } })
285
+ X(W(n.sendCodeBySmsText) + " ", 1),
286
+ S(r(ne), { style: { "margin-left": "5px" } })
278
287
  ])) : $("", !0)
279
288
  ]),
280
289
  _: 1
@@ -308,38 +317,38 @@ const oe = { render: Ze }, _e = { class: "dialogDefaultContainerInsideContent" }
308
317
  isTg: { type: Boolean }
309
318
  },
310
319
  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"],
311
- setup(N, { emit: b }) {
312
- const k = N, u = b, c = O(!1), g = O(""), f = ue({
320
+ setup(z, { emit: b }) {
321
+ const k = z, u = b, c = O(!1), g = O(""), f = ue({
313
322
  touched: { phone: !1, code: !1 },
314
323
  phoneModel: "",
315
324
  codeModel: ""
316
325
  });
317
- X(
326
+ Y(
318
327
  () => f.phoneModel,
319
328
  (n) => {
320
329
  u("update:phone", n), g.value = "";
321
330
  }
322
- ), X(
331
+ ), Y(
323
332
  () => f.codeModel,
324
333
  (n) => u("update:code", n)
325
334
  );
326
- const B = (n) => f.touched[n] = !0, W = A(() => {
335
+ const B = (n) => f.touched[n] = !0, j = A(() => {
327
336
  const o = f.phoneModel.trim().replace(/[()\-\s]/g, "");
328
337
  return /^\+?\d{10,15}$/.test(o);
329
- }), H = async () => {
330
- var K;
331
- if (B("phone"), !W.value) {
338
+ }), G = async () => {
339
+ var Q;
340
+ if (B("phone"), !j.value) {
332
341
  g.value = "Это не похоже на номер телефона";
333
342
  return;
334
343
  }
335
344
  const {
336
345
  data: { data: n, success: o, message: s }
337
- } = await Oe(void 0, f.phoneModel);
346
+ } = await Oe(void 0, N(f.phoneModel));
338
347
  if (!o && typeof s == "string" && s.includes("Телефон должен быть в формате")) {
339
348
  g.value = "Это не похоже на номер телефона";
340
349
  return;
341
350
  }
342
- if (!(((K = n == null ? void 0 : n[0]) == null ? void 0 : K.available) ?? !1)) {
351
+ if (!(((Q = n == null ? void 0 : n[0]) == null ? void 0 : Q.available) ?? !1)) {
343
352
  g.value = "Такой номер уже используется";
344
353
  return;
345
354
  }
@@ -355,22 +364,22 @@ const oe = { render: Ze }, _e = { class: "dialogDefaultContainerInsideContent" }
355
364
  u("on-send-code-again", { phone: f.phoneModel });
356
365
  }, y = () => {
357
366
  console.debug("onSendCodeViaSms"), u("on-send-only-sms", { phone: f.phoneModel });
358
- }, { phoneModel: x, codeModel: i, touched: h } = me(f), v = A(() => g.value ? g.value : h.value.phone && !x.value.trim() ? "Это не похоже на номер телефона" : k.phoneError || ""), G = A(() => k.isNotMatchCode ? "Неверный код" : f.touched.code ? i.value.trim() ? k.codeError ?? null : "Введите код" : "");
367
+ }, { phoneModel: x, codeModel: i, touched: h } = me(f), v = A(() => g.value ? g.value : h.value.phone && !x.value.trim() ? "Это не похоже на номер телефона" : k.phoneError || ""), J = A(() => k.isNotMatchCode ? "Неверный код" : f.touched.code ? i.value.trim() ? k.codeError ?? null : "Введите код" : "");
359
368
  return (n, o) => (p(), T("div", mt, [
360
- z("div", ft, [
361
- z("div", gt, q(c.value ? "Чтобы продолжить, введите код подтверждения из" : n.hintText), 1),
362
- z("div", yt, [
363
- n.isTg ? (p(), j(r(ge), { key: 0 })) : (p(), j(r(oe), {
369
+ F("div", ft, [
370
+ F("div", gt, W(c.value ? "Чтобы продолжить, введите код подтверждения из" : n.hintText), 1),
371
+ F("div", yt, [
372
+ n.isTg ? (p(), H(r(ge), { key: 0 })) : (p(), H(r(ne), {
364
373
  key: 1,
365
374
  style: { "margin-left": "5px" }
366
375
  })),
367
- Q(" " + q(n.isTg ? "Telegram" : "СМС"), 1)
376
+ X(" " + W(n.isTg ? "Telegram" : "СМС"), 1)
368
377
  ])
369
378
  ]),
370
379
  n.showPhone ? (p(), T("div", Ct, [
371
- S(r(te), {
380
+ S(r(oe), {
372
381
  modelValue: r(x),
373
- "onUpdate:modelValue": o[0] || (o[0] = (s) => ee(x) ? x.value = s : null),
382
+ "onUpdate:modelValue": o[0] || (o[0] = (s) => te(x) ? x.value = s : null),
374
383
  size: "large",
375
384
  "text-size": "medium",
376
385
  label: "Телефон",
@@ -387,25 +396,25 @@ const oe = { render: Ze }, _e = { class: "dialogDefaultContainerInsideContent" }
387
396
  c.value ? $("", !0) : (p(), T("div", wt, [
388
397
  S(r(De), {
389
398
  style: { width: "100%" },
390
- disabled: !W.value,
391
- onClick: H
399
+ disabled: !j.value,
400
+ onClick: G
392
401
  }, {
393
- default: J(() => o[6] || (o[6] = [
394
- Q(" Отправить код ")
402
+ default: K(() => o[6] || (o[6] = [
403
+ X(" Отправить код ")
395
404
  ])),
396
405
  _: 1,
397
406
  __: [6]
398
407
  }, 8, ["disabled"])
399
408
  ])),
400
409
  c.value ? (p(), T("div", Pt, [
401
- S(r(te), {
410
+ S(r(oe), {
402
411
  modelValue: r(i),
403
- "onUpdate:modelValue": o[4] || (o[4] = (s) => ee(i) ? i.value = s : null),
412
+ "onUpdate:modelValue": o[4] || (o[4] = (s) => te(i) ? i.value = s : null),
404
413
  size: "large",
405
414
  "text-size": "medium",
406
415
  label: "Код",
407
416
  type: "text",
408
- error: G.value,
417
+ error: J.value,
409
418
  onInput: M,
410
419
  onBlur: o[5] || (o[5] = (s) => B("code"))
411
420
  }, null, 8, ["modelValue", "error"])
@@ -417,14 +426,14 @@ const oe = { render: Ze }, _e = { class: "dialogDefaultContainerInsideContent" }
417
426
  "is-final-limit": n.isFinalLimit,
418
427
  "on-send-again": C
419
428
  }, {
420
- extra: J(() => [
429
+ extra: K(() => [
421
430
  n.isTg ? (p(), T("span", {
422
431
  key: 0,
423
432
  class: "dialogDefaultContainerSendCodeBySmsText",
424
433
  onClick: y
425
434
  }, [
426
- Q(q(n.sendCodeBySmsText) + " ", 1),
427
- S(r(oe), { style: { "margin-left": "5px" } })
435
+ X(W(n.sendCodeBySmsText) + " ", 1),
436
+ S(r(ne), { style: { "margin-left": "5px" } })
428
437
  ])) : $("", !0)
429
438
  ]),
430
439
  _: 1
@@ -432,22 +441,13 @@ const oe = { render: Ze }, _e = { class: "dialogDefaultContainerInsideContent" }
432
441
  ])) : $("", !0)
433
442
  ]));
434
443
  }
435
- }), de = (N) => {
436
- const b = N.replace(/\D/g, "");
437
- if (b.length >= 10 && b.length <= 15) {
438
- if (b.startsWith("8"))
439
- return `+7${b.slice(1)}`;
440
- if (b.startsWith("7"))
441
- return `+${b}`;
442
- }
443
- return N.trim().startsWith("+") ? N.trim() : `+${b}`;
444
- }, Mt = { class: "text-center w-full" }, xt = { class: "dialogTitle" }, bt = {
444
+ }), Mt = { class: "text-center w-full" }, xt = { class: "dialogTitle" }, bt = {
445
445
  key: 0,
446
446
  class: "dialogDefaultContainer"
447
447
  }, Vt = { key: 3 }, kt = {
448
448
  key: 1,
449
449
  class: "dialogDefaultContainer"
450
- }, ae = 3, Ot = /* @__PURE__ */ re({
450
+ }, le = 3, Ot = /* @__PURE__ */ re({
451
451
  __name: "ProfilePhoneDialog",
452
452
  props: {
453
453
  modelValue: { type: Boolean },
@@ -459,30 +459,30 @@ const oe = { render: Ze }, _e = { class: "dialogDefaultContainerInsideContent" }
459
459
  mode: { default: void 0 }
460
460
  },
461
461
  emits: ["update:modelValue", "submit-phone", "edit", "close", "clean-input-errors", "on-update-jwt", "update-phone-field", "on-toast"],
462
- setup(N, { expose: b, emit: k }) {
463
- const u = N, c = k, g = O(u.modelValue);
464
- X(
462
+ setup(z, { expose: b, emit: k }) {
463
+ const u = z, c = k, g = O(u.modelValue);
464
+ Y(
465
465
  () => u.modelValue,
466
466
  (l) => g.value = l
467
- ), X(g, (l) => c("update:modelValue", l));
468
- const f = A(() => u.language ?? "ru"), B = (l) => Be[f.value] && Be[f.value][l] || (u.title ?? l), W = A(() => u.title ?? B("Смена номера телефона")), H = A(() => u.hintText ?? B("Чтобы продолжить, введите новый номер")), e = ue({
467
+ ), Y(g, (l) => c("update:modelValue", l));
468
+ const f = A(() => u.language ?? "ru"), B = (l) => Be[f.value] && Be[f.value][l] || (u.title ?? l), j = A(() => u.title ?? B("Смена номера телефона")), G = A(() => u.hintText ?? B("Чтобы продолжить, введите новый номер")), e = ue({
469
469
  oldPhone: u.initialPhone ?? "",
470
470
  newPhone: "",
471
471
  code: "",
472
472
  addPhone: "",
473
473
  addCode: ""
474
- }), M = O(U.OLD), C = O(null), y = O(!1), x = O(!1), i = O("tg"), h = A(() => i.value === "tg"), v = O(!1), { startTimer: G, remainingSeconds: n, isAvailableForSendAgain: o, totalRateAttempts: s, currentRateAttempt: _ } = We(), { showRateLimitToast: K } = He(c), { isEditFlow: ce, getFlow: Ae } = je(O(u.mode)), le = A(() => o.value ? "Повторить" : `${n.value}`), ne = O(ae), se = A(() => ne.value === 0), Ne = (l) => new Promise((a) => setTimeout(a, l));
474
+ }), M = O(q.OLD), C = O(null), y = O(!1), x = O(!1), i = O("tg"), h = A(() => i.value === "tg"), v = O(!1), { startTimer: J, remainingSeconds: n, isAvailableForSendAgain: o, totalRateAttempts: s, currentRateAttempt: ee } = We(), { showRateLimitToast: Q } = He(c), { isEditFlow: ce, getFlow: Ae } = je(O(u.mode)), se = A(() => o.value ? "Повторить" : `${n.value}`), ae = O(le), ie = A(() => ae.value === 0), Ne = (l) => new Promise((a) => setTimeout(a, l));
475
475
  async function pe(l = "email") {
476
476
  var t;
477
477
  return (t = (await Ie("/users/profile/session/get-edit-session", { params: { field: l } })).data) == null ? void 0 : t.data;
478
478
  }
479
479
  async function ye(l = "phone") {
480
480
  var V;
481
- const t = (V = (await Z("/users/profile/session/create-if-not-exists", {
481
+ const t = (V = (await _("/users/profile/session/create-if-not-exists", {
482
482
  field: l,
483
- oldValue: u.initialPhone
483
+ oldValue: N(u.initialPhone)
484
484
  })).data) == null ? void 0 : V.data;
485
- C.value = (t == null ? void 0 : t.sessionId) ?? null, M.value = (t == null ? void 0 : t.step) ?? U.OLD, e.oldPhone = (t == null ? void 0 : t.oldValue) ?? "", e.newPhone = (t == null ? void 0 : t.newValue) ?? "";
485
+ 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) ?? "";
486
486
  }
487
487
  async function ze() {
488
488
  try {
@@ -495,11 +495,11 @@ const oe = { render: Ze }, _e = { class: "dialogDefaultContainerInsideContent" }
495
495
  async function Ce(l, a = !1) {
496
496
  var t;
497
497
  try {
498
- const V = await Z(
498
+ const V = await _(
499
499
  "/users/profile/check-throttler",
500
500
  {
501
501
  method: "sms",
502
- phone: l,
502
+ phone: N(l),
503
503
  isInvite: a
504
504
  },
505
505
  {
@@ -510,22 +510,22 @@ const oe = { render: Ze }, _e = { class: "dialogDefaultContainerInsideContent" }
510
510
  );
511
511
  await Ne(1e3);
512
512
  const w = (t = V.data) == null ? void 0 : t.data;
513
- return w ? (w.restTimeSec > 0 ? (G(w.restTimeSec), o.value = !1, s.value = w.attempts.total, _.value = w.attempts.total - w.attempts.available, ne.value = w.attempts.available ?? ae) : o.value = !0, w) : null;
513
+ return w ? (w.restTimeSec > 0 ? (J(w.restTimeSec), o.value = !1, s.value = w.attempts.total, ee.value = w.attempts.total - w.attempts.available, ae.value = w.attempts.available ?? le) : o.value = !0, w) : null;
514
514
  } catch {
515
515
  return null;
516
516
  }
517
517
  }
518
- const he = async ({ phone: l }) => (v.value = !0, await Y({ value: l, isOnlySms: !0 })), Y = async ({ value: l, isOnlySms: a, offLoading: t } = {}) => {
519
- var V, w, L, D, F, E;
518
+ const he = async ({ phone: l }) => (v.value = !0, await Z({ value: l, isOnlySms: !0 })), Z = async ({ value: l, isOnlySms: a, offLoading: t } = {}) => {
519
+ var V, w, L, D, R, E;
520
520
  y.value = !0;
521
521
  try {
522
- const m = l ?? e.oldPhone, d = await Z(
522
+ const m = l ?? e.oldPhone, d = await _(
523
523
  "/users/profile/phone/contact/send-code",
524
524
  {
525
525
  sessionId: C.value,
526
- phone: de(m),
527
- value: de(m),
528
- oldValue: de(e.oldPhone),
526
+ phone: N(m),
527
+ value: N(m),
528
+ oldValue: N(e.oldPhone),
529
529
  provider: u.provider,
530
530
  isOnlySms: a ?? !1
531
531
  },
@@ -539,54 +539,54 @@ const oe = { render: Ze }, _e = { class: "dialogDefaultContainerInsideContent" }
539
539
  const P = (w = (V = d == null ? void 0 : d.data) == null ? void 0 : V.data) == null ? void 0 : w.deliveryType;
540
540
  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 && ((L = d.data) != null && L.tooManyRequests)) {
541
541
  console.debug("sendContactCode IN обработка 403 tooManyRequests", d);
542
- const I = (F = (D = d.data) == null ? void 0 : D.tooManyRequests) == null ? void 0 : F.type;
542
+ const I = (R = (D = d.data) == null ? void 0 : D.tooManyRequests) == null ? void 0 : R.type;
543
543
  i.value = I;
544
- const R = d.data.tooManyRequests;
545
- return R.restTimeSec > 0 ? (G(R.restTimeSec), s.value = R.attempts.total, _.value = R.attempts.total - R.attempts.available, ne.value = R.attempts.available ?? ae) : o.value = !0, d;
544
+ const U = d.data.tooManyRequests;
545
+ return U.restTimeSec > 0 ? (J(U.restTimeSec), s.value = U.attempts.total, ee.value = U.attempts.total - U.attempts.available, ae.value = U.attempts.available ?? le) : o.value = !0, d;
546
546
  }
547
547
  return console.debug("sendContactCode after обработка 403 tooManyRequests", d), await Ce(m), d;
548
548
  } catch (m) {
549
549
  const d = (E = m == null ? void 0 : m.data) == null ? void 0 : E.tooManyRequests;
550
550
  if ((m == null ? void 0 : m.status) === 403 && d) {
551
551
  const { restTimeSec: P, attempts: I } = d;
552
- return P > 0 ? (G(P), s.value = I.total, _.value = I.total - I.available, ne.value = I.available ?? ae) : o.value = !0, m;
552
+ return P > 0 ? (J(P), s.value = I.total, ee.value = I.total - I.available, ae.value = I.available ?? le) : o.value = !0, m;
553
553
  }
554
554
  throw m;
555
555
  } finally {
556
556
  y.value = !1, t && (y.value = !1);
557
557
  }
558
558
  }, we = async (l, a) => {
559
- var t, V, w, L, D, F, E, m;
559
+ var t, V, w, L, D, R, E, m;
560
560
  y.value = !0;
561
561
  try {
562
562
  const d = await pe("phone");
563
563
  C.value = d.sessionId, M.value = d.step, e.oldPhone = d.oldValue ?? e.oldPhone, e.newPhone = d.newValue ?? e.newPhone;
564
- const P = await Z("/users/profile/change/phone/match-code", {
565
- phone: a === U.NEW ? e.newPhone : e.oldPhone,
564
+ const P = await _("/users/profile/change/phone/match-code", {
565
+ phone: a === q.NEW ? N(e.newPhone) : N(e.oldPhone),
566
566
  sessionId: C.value,
567
567
  code: l,
568
568
  step: a
569
- }), I = ((t = P.data) == null ? void 0 : t.nextStep) ?? ((w = (V = P.data) == null ? void 0 : V.data) == null ? void 0 : w.nextStep), R = ((D = (L = P.data) == null ? void 0 : L.data) == null ? void 0 : D.rateLimit) ?? ((F = P.data) == null ? void 0 : F.rateLimit) ?? null, Re = ((E = P.data) == null ? void 0 : E.data.success) ?? ((m = P.data) == null ? void 0 : m.success);
570
- if (K(R), !Re) {
569
+ }), I = ((t = P.data) == null ? void 0 : t.nextStep) ?? ((w = (V = P.data) == null ? void 0 : V.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 = ((E = P.data) == null ? void 0 : E.data.success) ?? ((m = P.data) == null ? void 0 : m.success);
570
+ if (Q(U), !Re) {
571
571
  x.value = !0;
572
572
  return;
573
573
  }
574
574
  if (!I) return P;
575
- if (M.value = I, I === U.NEW) {
575
+ if (M.value = I, I === q.NEW) {
576
576
  const $e = await pe("phone");
577
577
  e.oldPhone = $e.oldValue ?? e.oldPhone, e.newPhone = $e.newValue ?? e.newPhone, e.code = "";
578
578
  }
579
- return I === U.COMPLETED && (e.code = "", c("update-phone-field", e.addPhone), c("submit-phone", { phone: e.oldPhone, code: l }), c("on-toast", { color: "success", text: "Номер телефона изменён" }), c("on-update-jwt", "phone", "edit", e.newPhone), C.value = null, c("close")), P;
579
+ return I === q.COMPLETED && (e.code = "", c("update-phone-field", e.addPhone), c("submit-phone", { phone: e.oldPhone, code: l }), c("on-toast", { color: "success", text: "Номер телефона изменён" }), c("on-update-jwt", "phone", "edit", e.newPhone), C.value = null, c("close")), P;
580
580
  } finally {
581
581
  y.value = !1;
582
582
  }
583
- }, Pe = ({ code: l }) => we(l, U.OLD);
583
+ }, Pe = ({ code: l }) => we(l, q.OLD);
584
584
  function Te(l) {
585
585
  }
586
- const Se = ({ code: l }) => we(l, U.NEW);
586
+ const Se = ({ code: l }) => we(l, q.NEW);
587
587
  function Me(l) {
588
588
  }
589
- const ie = () => {
589
+ const de = () => {
590
590
  c("close"), g.value = !1;
591
591
  };
592
592
  async function xe(l = "phone") {
@@ -602,9 +602,9 @@ const oe = { render: Ze }, _e = { class: "dialogDefaultContainerInsideContent" }
602
602
  y.value = !0;
603
603
  try {
604
604
  if (!C.value) {
605
- const D = await Z("/users/profile/session/bind/create", {
605
+ const D = await _("/users/profile/session/bind/create", {
606
606
  field: a,
607
- newValue: l ?? e.addPhone
607
+ newValue: N(l || e.addPhone)
608
608
  });
609
609
  if (C.value = ((w = (V = D.data) == null ? void 0 : V.data) == null ? void 0 : w.sessionId) ?? ((L = D.data) == null ? void 0 : L.sessionId) ?? null, !C.value)
610
610
  throw new Error("не удалось создать bind-сессию (sessionId отсутствует)");
@@ -632,11 +632,11 @@ const oe = { render: Ze }, _e = { class: "dialogDefaultContainerInsideContent" }
632
632
  try {
633
633
  if (!C.value)
634
634
  throw new Error("bind-сессия не найдена. создайте её через createBindSession.");
635
- const F = l ?? e.addPhone, E = await Z(
635
+ const R = l ?? e.addPhone, E = await _(
636
636
  `/users/profile/bind/contact/send-code/${a}`,
637
637
  {
638
638
  sessionId: C.value,
639
- phone: de(F),
639
+ phone: N(R),
640
640
  provider: u.provider,
641
641
  isOnlySms: t ?? !1
642
642
  },
@@ -650,31 +650,31 @@ const oe = { render: Ze }, _e = { class: "dialogDefaultContainerInsideContent" }
650
650
  const d = (D = E.data) == null ? void 0 : D.tooManyRequests;
651
651
  if (E.status === 403 && d) {
652
652
  const I = d == null ? void 0 : d.type;
653
- return i.value = I, d.restTimeSec > 0 ? (G(d.restTimeSec), s.value = d.attempts.total, _.value = d.attempts.total - d.attempts.available, ne.value = d.attempts.available ?? ae) : o.value = !0, E;
653
+ return i.value = I, d.restTimeSec > 0 ? (J(d.restTimeSec), s.value = d.attempts.total, ee.value = d.attempts.total - d.attempts.available, ae.value = d.attempts.available ?? le) : o.value = !0, E;
654
654
  }
655
- const P = await Ce(F);
656
- return P && P.restTimeSec > 0 ? (G(P.restTimeSec), o.value = !1) : o.value = !0, E;
655
+ const P = await Ce(R);
656
+ return P && P.restTimeSec > 0 ? (J(P.restTimeSec), o.value = !1) : o.value = !0, E;
657
657
  } finally {
658
658
  V && (y.value = !1);
659
659
  }
660
660
  }, Ve = async ({ code: l }) => {
661
- var a, t, V, w, L, D, F, E;
661
+ var a, t, V, w, L, D, R, E;
662
662
  y.value = !0;
663
663
  try {
664
664
  if (!C.value) {
665
- const R = await xe("phone");
666
- C.value = R.sessionId, e.addPhone = R.newValue ?? e.addPhone;
665
+ const U = await xe("phone");
666
+ C.value = U.sessionId, e.addPhone = U.newValue ?? e.addPhone;
667
667
  }
668
- const m = await Z("/users/profile/bind/phone/match-code", {
669
- phone: e.addPhone,
668
+ const m = await _("/users/profile/bind/phone/match-code", {
669
+ phone: N(e.addPhone),
670
670
  sessionId: C.value,
671
671
  code: l
672
- }), d = ((a = m.data) == null ? void 0 : a.nextStep) ?? ((V = (t = m.data) == null ? void 0 : t.data) == null ? void 0 : V.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 = ((F = m.data) == null ? void 0 : F.data.success) ?? ((E = m.data) == null ? void 0 : E.success);
673
- if (K(P), !I) {
672
+ }), d = ((a = m.data) == null ? void 0 : a.nextStep) ?? ((V = (t = m.data) == null ? void 0 : t.data) == null ? void 0 : V.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) ?? ((E = m.data) == null ? void 0 : E.success);
673
+ if (Q(P), !I) {
674
674
  x.value = !0;
675
675
  return;
676
676
  }
677
- return d && d === U.COMPLETED && (e.code = "", c("update-phone-field", e.addPhone), c("submit-phone", { phone: e.addPhone, code: l }), c("on-update-jwt", "phone", "bind", e.addPhone), c("on-toast", { color: "success", text: "Номер телефона успешно привязан к аккаунту" }), C.value = null, c("close")), m;
677
+ return d && d === q.COMPLETED && (e.code = "", c("update-phone-field", e.addPhone), c("submit-phone", { phone: e.addPhone, code: l }), c("on-update-jwt", "phone", "bind", e.addPhone), c("on-toast", { color: "success", text: "Номер телефона успешно привязан к аккаунту" }), C.value = null, c("close")), m;
678
678
  } finally {
679
679
  y.value = !1;
680
680
  }
@@ -687,18 +687,18 @@ const oe = { render: Ze }, _e = { class: "dialogDefaultContainerInsideContent" }
687
687
  await Fe(), y.value = !1;
688
688
  return;
689
689
  }
690
- await ze(), await Y({});
690
+ await ze(), await Z({});
691
691
  }), b({
692
692
  localVisible: g,
693
693
  form: e,
694
694
  currentStep: M,
695
695
  loading: y,
696
- rateLimitText: le,
697
- isAvailable: se,
698
- title: W,
699
- hintText: H,
700
- handleClose: ie,
701
- sendContactCode: Y,
696
+ rateLimitText: se,
697
+ isAvailable: ie,
698
+ title: j,
699
+ hintText: G,
700
+ handleClose: de,
701
+ sendContactCode: Z,
702
702
  sendBindContactCode: ve,
703
703
  handleOldCodeSuccess: Pe,
704
704
  handleOldCodeError: Te,
@@ -711,54 +711,54 @@ const oe = { render: Ze }, _e = { class: "dialogDefaultContainerInsideContent" }
711
711
  modelValue: g.value,
712
712
  "onUpdate:modelValue": [
713
713
  a[15] || (a[15] = (t) => g.value = t),
714
- ie
714
+ de
715
715
  ],
716
716
  width: "small",
717
717
  "auto-height": !0,
718
718
  "close-on-click-outside": !0,
719
- "onClick:outside": ie
719
+ "onClick:outside": de
720
720
  }, {
721
- header: J(() => [
722
- z("div", Mt, [
721
+ header: K(() => [
722
+ F("div", Mt, [
723
723
  S(r(Ke), {
724
724
  "slot-left": !1,
725
725
  size: "small",
726
726
  borded: !0,
727
727
  "no-padding": !1
728
728
  }, {
729
- title: J(() => [
730
- z("span", xt, q(r(ce) ? W.value : "Добавление номера телефона"), 1)
729
+ title: K(() => [
730
+ F("span", xt, W(r(ce) ? j.value : "Добавление номера телефона"), 1)
731
731
  ]),
732
- "right-button": J(() => [
732
+ "right-button": K(() => [
733
733
  S(r(Qe), {
734
734
  class: "cross",
735
- onClick: ie
735
+ onClick: de
736
736
  })
737
737
  ]),
738
738
  _: 1
739
739
  })
740
740
  ])
741
741
  ]),
742
- default: J(() => [
742
+ default: K(() => [
743
743
  r(ce) ? (p(), T("div", bt, [
744
- y.value ? (p(), j(Ee, { key: 0 })) : $("", !0),
745
- M.value === r(U).OLD ? (p(), j(lt, {
744
+ y.value ? (p(), H(Ee, { key: 0 })) : $("", !0),
745
+ M.value === r(q).OLD ? (p(), H(lt, {
746
746
  key: 1,
747
747
  phone: e.oldPhone,
748
748
  "onUpdate:phone": a[0] || (a[0] = (t) => e.oldPhone = t),
749
749
  code: e.code,
750
750
  "onUpdate:code": a[1] || (a[1] = (t) => e.code = t),
751
- "rate-limit-text": le.value,
752
- "is-final-limit": se.value,
751
+ "rate-limit-text": se.value,
752
+ "is-final-limit": ie.value,
753
753
  "is-not-match-code": x.value,
754
754
  loading: y.value,
755
755
  "is-tg": h.value,
756
- onOnSendCode: a[2] || (a[2] = (t) => Y({ value: e.oldPhone })),
757
- onOnSendCodeAgain: a[3] || (a[3] = (t) => Y({ value: e.oldPhone, isOnlySms: !h.value && v.value })),
756
+ onOnSendCode: a[2] || (a[2] = (t) => Z({ value: e.oldPhone })),
757
+ onOnSendCodeAgain: a[3] || (a[3] = (t) => Z({ value: e.oldPhone, isOnlySms: !h.value && v.value })),
758
758
  onOnSendOnlySms: he,
759
759
  onOnMatchCode: Pe,
760
760
  onOnMatchCodeError: Te
761
- }, null, 8, ["phone", "code", "rate-limit-text", "is-final-limit", "is-not-match-code", "loading", "is-tg"])) : M.value === r(U).NEW ? (p(), j(vt, {
761
+ }, null, 8, ["phone", "code", "rate-limit-text", "is-final-limit", "is-not-match-code", "loading", "is-tg"])) : M.value === r(q).NEW ? (p(), H(vt, {
762
762
  key: 2,
763
763
  phone: e.newPhone,
764
764
  "onUpdate:phone": a[4] || (a[4] = (t) => e.newPhone = t),
@@ -766,23 +766,23 @@ const oe = { render: Ze }, _e = { class: "dialogDefaultContainerInsideContent" }
766
766
  "onUpdate:oldPhone": a[5] || (a[5] = (t) => e.oldPhone = t),
767
767
  code: e.code,
768
768
  "onUpdate:code": a[6] || (a[6] = (t) => e.code = t),
769
- "hint-text": H.value,
770
- "rate-limit-text": le.value,
771
- "is-final-limit": se.value,
769
+ "hint-text": G.value,
770
+ "rate-limit-text": se.value,
771
+ "is-final-limit": ie.value,
772
772
  "is-not-match-code": x.value,
773
773
  loading: y.value,
774
774
  "is-tg": h.value,
775
- onOnSendCode: a[7] || (a[7] = (t) => Y({ value: e.newPhone })),
776
- onOnSendCodeAgain: a[8] || (a[8] = (t) => Y({ value: e.newPhone, isOnlySms: !h.value && v.value })),
775
+ onOnSendCode: a[7] || (a[7] = (t) => Z({ value: e.newPhone })),
776
+ onOnSendCodeAgain: a[8] || (a[8] = (t) => Z({ value: e.newPhone, isOnlySms: !h.value && v.value })),
777
777
  onOnSendOnlySms: he,
778
778
  onOnMatchCode: Se,
779
779
  onOnMatchCodeError: Me,
780
780
  onOnClearCodeError: a[9] || (a[9] = (t) => x.value = !1)
781
- }, null, 8, ["phone", "oldPhone", "code", "hint-text", "rate-limit-text", "is-final-limit", "is-not-match-code", "loading", "is-tg"])) : M.value === r(U).COMPLETED ? (p(), T("div", Vt, [
782
- z("p", null, q(B("Телефон успешно изменен")), 1)
781
+ }, null, 8, ["phone", "oldPhone", "code", "hint-text", "rate-limit-text", "is-final-limit", "is-not-match-code", "loading", "is-tg"])) : M.value === r(q).COMPLETED ? (p(), T("div", Vt, [
782
+ F("p", null, W(B("Телефон успешно изменен")), 1)
783
783
  ])) : $("", !0)
784
784
  ])) : (p(), T("div", kt, [
785
- y.value ? (p(), j(Ee, { key: 0 })) : $("", !0),
785
+ y.value ? (p(), H(Ee, { key: 0 })) : $("", !0),
786
786
  S(St, {
787
787
  phone: e.addPhone,
788
788
  "onUpdate:phone": a[10] || (a[10] = (t) => e.addPhone = t),
@@ -790,9 +790,9 @@ const oe = { render: Ze }, _e = { class: "dialogDefaultContainerInsideContent" }
790
790
  "onUpdate:oldPhone": a[11] || (a[11] = (t) => e.oldPhone = t),
791
791
  code: e.addCode,
792
792
  "onUpdate:code": a[12] || (a[12] = (t) => e.addCode = t),
793
- "hint-text": r(ce) ? H.value : "Чтобы продолжить, введите новый номер",
794
- "rate-limit-text": le.value,
795
- "is-final-limit": se.value,
793
+ "hint-text": r(ce) ? G.value : "Чтобы продолжить, введите новый номер",
794
+ "rate-limit-text": se.value,
795
+ "is-final-limit": ie.value,
796
796
  "is-not-match-code": x.value,
797
797
  loading: y.value,
798
798
  "is-tg": h.value,
@@ -213,9 +213,9 @@ const Ke = {
213
213
  emits: ["clean-input-errors", "on-update-jwt", "update-phone-field", "update-email-field", "on-password-error", "on-toast"],
214
214
  setup(d, { emit: r }) {
215
215
  const n = r, u = v(!0), { currentDialog: w, dialogPayload: c, closeDialog: B } = W(), l = {
216
- email: L(() => import("./ProfileEmailDialog-DZfdsLfO.js")),
217
- phone: L(() => import("./ProfilePhoneDialog-CarYpXMn.js")),
218
- password: L(() => import("./ProfilePasswordDialog-DLXWVm3l.js"))
216
+ email: L(() => import("./ProfileEmailDialog-DkfRVKNa.js")),
217
+ phone: L(() => import("./ProfilePhoneDialog-BlggQNOD.js")),
218
+ password: L(() => import("./ProfilePasswordDialog-BdYyzINt.js"))
219
219
  }, m = ({ 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(".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 { _ as r } from "./index-D0TK0qAd.js";
2
+ import { _ as r } from "./index-DnFZJeDG.js";
3
3
  export {
4
4
  r as PEditUserContact
5
5
  };
@@ -1,6 +1,6 @@
1
1
  import { ref as r, defineComponent as L, createElementBlock as f, openBlock as v, normalizeClass as l, 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 { g as R, p as h } from "./index-D0TK0qAd.js";
3
+ import { g as R, p as h } from "./index-DnFZJeDG.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")}`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yourgoods/ui-smart",
3
- "version": "0.5.0",
3
+ "version": "0.7.0",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.js",