@yourgoods/ui-smart 0.31.0 → 0.32.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,7 +1,7 @@
1
- import { defineComponent as te, ref as b, reactive as Q, watch as Y, computed as M, toRefs as de, createElementBlock as x, openBlock as w, createElementVNode as S, createCommentVNode as D, toDisplayString as X, createVNode as k, unref as u, isRef as Z, withCtx as G, createTextVNode as ae, Fragment as Oe, createBlock as H, resolveDynamicComponent as Ce, onMounted as Ue } from "vue";
2
- import { T as ue, c as Ve, u as Ae, a as Fe, P as ye, b as Re } from "./useRateLimitToast-BgatZ5Cx.js";
3
- import { C as A, _ as ze, B as We, p as W, g as He } from "./index-Cw7l0kGP.js";
4
- import { PInput as J, IconMailMd as me, PButton as oe, IconEyeMd as ge, IconEyeClosedMd as he, PDialog as _e, PTopBar as qe, IconCrossMd as je } from "@profeat/ui-kit";
1
+ import { defineComponent as te, ref as b, reactive as Q, watch as Y, computed as M, toRefs as re, createElementBlock as k, openBlock as w, createElementVNode as S, createCommentVNode as N, toDisplayString as X, createVNode as $, unref as u, isRef as Z, withCtx as G, createTextVNode as oe, Fragment as Oe, createBlock as H, resolveDynamicComponent as Ce, onMounted as Ue } from "vue";
2
+ import { T as ue, c as Ve, u as Ae, a as Fe, P as ye, b as Re } from "./useRateLimitToast-DGG5L4f3.js";
3
+ import { C as F, _ as ze, B as We, p as W, g as He } from "./index-D8GpZOPw.js";
4
+ import { PInput as J, IconMailMd as me, PButton as ie, IconEyeMd as ge, IconEyeClosedMd as he, PDialog as _e, PTopBar as qe, IconCrossMd as je } from "@profeat/ui-kit";
5
5
  const Ge = { class: "dialogDefaultContainerInsideContent" }, Ye = { class: "dialogDefaultContainerTextHint" }, Je = {
6
6
  key: 0,
7
7
  class: "input-wrapper"
@@ -27,127 +27,123 @@ const Ge = { class: "dialogDefaultContainerInsideContent" }, Ye = { class: "dial
27
27
  },
28
28
  emits: ["update:email", "update:code", "edit", "on-match-code", "on-match-code-error", "on-send-code", "on-send-code-again", "on-clear-code-error"],
29
29
  setup(_, { emit: R }) {
30
- const v = _, s = R, m = b(!1), e = b(""), n = Q({
30
+ const v = _, s = R, m = b(!1), e = b(""), i = Q({
31
31
  emailModel: v.email || "",
32
32
  codeModel: "",
33
33
  touched: { email: !1, code: !1 }
34
34
  });
35
35
  Y(
36
- () => n.emailModel,
36
+ () => i.emailModel,
37
37
  (p) => {
38
38
  s("update:email", p);
39
39
  }
40
40
  ), Y(
41
- () => n.codeModel,
41
+ () => i.codeModel,
42
42
  (p) => s("update:code", p)
43
43
  );
44
44
  const y = (p) => {
45
- n.touched[p] = !0;
46
- }, r = (p) => n.touched[p] = !1, d = () => {
47
- e.value = "", r("email");
48
- }, V = M(() => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(n.emailModel.trim())), N = M(() => !V.value || !!e.value), B = async () => {
49
- var p;
45
+ i.touched[p] = !0;
46
+ }, d = (p) => i.touched[p] = !1, r = () => {
47
+ e.value = "", d("email");
48
+ }, V = M(() => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(i.emailModel.trim())), O = M(() => !V.value || !!e.value), B = async () => {
49
+ var p, a;
50
50
  try {
51
51
  if (y("email"), !V.value) {
52
52
  e.value = "Это не похоже на e-mail";
53
53
  return;
54
54
  }
55
- const l = await Ve(n.emailModel), { data: i } = l.data;
56
- if (!(((p = i == null ? void 0 : i[0]) == null ? void 0 : p.available) ?? !1)) {
55
+ const n = await Ve(i.emailModel), { data: f } = n.data;
56
+ if (!(((a = (p = f == null ? void 0 : f.data) == null ? void 0 : p[0]) == null ? void 0 : a.available) ?? !1)) {
57
57
  e.value = "Такой email уже используется";
58
58
  return;
59
59
  }
60
- if (checkEmailFormatError(l)) {
61
- e.value = "Это не похоже на e-mail";
62
- return;
63
- }
64
60
  e.value = "", s("on-send-code", {
65
- email: n.emailModel,
61
+ email: i.emailModel,
66
62
  prevEmail: v.oldEmail,
67
63
  offLoading: !0
68
64
  }), m.value = !0;
69
- } catch (l) {
70
- console.error("Неизвестная ошибка при проверке доступности email:", l), e.value = "Это не похоже на e-mail";
65
+ } catch (n) {
66
+ console.error("Неизвестная ошибка при проверке доступности email:", n), e.value = "Это не похоже на e-mail";
71
67
  }
72
68
  };
73
- let O = "";
69
+ let U = "";
74
70
  const C = (p) => {
75
71
  s("on-clear-code-error");
76
- const l = p.target;
77
- let i = l.value.replace(/\D/g, "");
78
- i.length > 4 && (i = i.slice(0, 4)), l.value = i, n.codeModel = i, i.length === 4 && i !== O && (O = i, s("on-match-code", { email: n.emailModel, code: i }));
72
+ const a = p.target;
73
+ let n = a.value.replace(/\D/g, "");
74
+ n.length > 4 && (n = n.slice(0, 4)), a.value = n, i.codeModel = n, n.length === 4 && n !== U && (U = n, s("on-match-code", { email: i.emailModel, code: n }));
79
75
  }, c = () => {
80
- s("on-send-code-again", { email: n.emailModel });
76
+ s("on-send-code-again", { email: i.emailModel });
81
77
  }, T = M(() => {
82
78
  if (e.value) return e.value;
83
- if (n.touched.email) {
84
- if (!n.emailModel.trim()) return "Введите e-mail";
79
+ if (i.touched.email) {
80
+ if (!i.emailModel.trim()) return "Введите e-mail";
85
81
  if (!V.value) return "Это не похоже на e-mail";
86
82
  }
87
83
  return v.emailError || "";
88
- }), g = M(() => v.isNotMatchCode ? "Неверный код" : n.touched.code ? U.value.trim() ? v.codeError ?? null : "Введите код" : ""), { emailModel: L, codeModel: U } = de(n);
89
- return (p, l) => {
90
- const i = ue;
91
- return w(), x("div", Ge, [
84
+ }), g = M(() => v.isNotMatchCode ? "Неверный код" : i.touched.code ? A.value.trim() ? v.codeError ?? null : "Введите код" : ""), { emailModel: L, codeModel: A } = re(i);
85
+ return (p, a) => {
86
+ const n = ue;
87
+ return w(), k("div", Ge, [
92
88
  S("div", Ye, X(m.value ? "Введите код подтверждения" : p.hintText), 1),
93
- p.showEmail ? (w(), x("div", Je, [
94
- k(u(J), {
89
+ p.showEmail ? (w(), k("div", Je, [
90
+ $(u(J), {
95
91
  modelValue: u(L),
96
- "onUpdate:modelValue": l[0] || (l[0] = (E) => Z(L) ? L.value = E : null),
92
+ "onUpdate:modelValue": a[0] || (a[0] = (f) => Z(L) ? L.value = f : null),
97
93
  size: "large",
98
94
  "text-size": "medium",
99
95
  label: "Почта",
100
96
  type: "email",
101
97
  error: T.value,
102
- onBlur: l[1] || (l[1] = (E) => y("email")),
103
- onInput: d
98
+ onBlur: a[1] || (a[1] = (f) => y("email")),
99
+ onInput: r
104
100
  }, null, 8, ["modelValue", "error"]),
105
- k(u(me), {
101
+ $(u(me), {
106
102
  class: "icon-locked",
107
- onClick: l[2] || (l[2] = (E) => p.$emit("edit", "email"))
103
+ onClick: a[2] || (a[2] = (f) => p.$emit("edit", "email"))
108
104
  })
109
- ])) : D("", !0),
110
- m.value ? D("", !0) : (w(), x("div", Ke, [
111
- k(u(oe), {
105
+ ])) : N("", !0),
106
+ m.value ? N("", !0) : (w(), k("div", Ke, [
107
+ $(u(ie), {
112
108
  style: { width: "100%" },
113
- disabled: N.value,
109
+ disabled: O.value,
114
110
  onClick: B
115
111
  }, {
116
- default: G(() => l[5] || (l[5] = [
117
- ae(" Отправить код ")
112
+ default: G(() => a[5] || (a[5] = [
113
+ oe(" Отправить код ")
118
114
  ])),
119
115
  _: 1,
120
116
  __: [5]
121
117
  }, 8, ["disabled"])
122
118
  ])),
123
- m.value ? (w(), x("div", Qe, [
124
- k(u(J), {
125
- modelValue: u(U),
126
- "onUpdate:modelValue": l[3] || (l[3] = (E) => Z(U) ? U.value = E : null),
119
+ m.value ? (w(), k("div", Qe, [
120
+ $(u(J), {
121
+ modelValue: u(A),
122
+ "onUpdate:modelValue": a[3] || (a[3] = (f) => Z(A) ? A.value = f : null),
127
123
  size: "large",
128
124
  "text-size": "medium",
129
125
  label: "Код",
130
126
  type: "text",
131
127
  error: g.value,
132
128
  onInput: C,
133
- onBlur: l[4] || (l[4] = (E) => y("code"))
129
+ onBlur: a[4] || (a[4] = (f) => y("code"))
134
130
  }, null, 8, ["modelValue", "error"])
135
- ])) : D("", !0),
136
- !p.loading && m.value ? (w(), x("div", Xe, [
137
- k(i, {
131
+ ])) : N("", !0),
132
+ !p.loading && m.value ? (w(), k("div", Xe, [
133
+ $(n, {
138
134
  loading: p.loading,
139
135
  "rate-limit-text": p.rateLimitText,
140
136
  "is-final-limit": p.isFinalLimit,
141
137
  "on-send-again": c
142
138
  }, null, 8, ["loading", "rate-limit-text", "is-final-limit"])
143
- ])) : D("", !0)
139
+ ])) : N("", !0)
144
140
  ]);
145
141
  };
146
142
  }
147
- }), et = { class: "dialogDefaultContainer" }, tt = { class: "dialogDefaultContainerInsideContent" }, lt = { class: "input-wrapper" }, at = { class: "input-wrapper" }, ot = { style: { width: "100%", display: "flex" } }, it = {
143
+ }), et = { class: "dialogDefaultContainer" }, tt = { class: "dialogDefaultContainerInsideContent" }, at = { class: "input-wrapper" }, lt = { class: "input-wrapper" }, ot = { style: { width: "100%", display: "flex" } }, it = {
148
144
  key: 0,
149
145
  class: "dialogDefaultContainer"
150
- }, nt = { class: "dialogDefaultContainerInsideContent" }, st = { style: { "margin-top": "12px" } }, Te = 8, rt = /* @__PURE__ */ te({
146
+ }, nt = { class: "dialogDefaultContainerInsideContent" }, st = { style: { "margin-top": "12px" } }, Te = 8, dt = /* @__PURE__ */ te({
151
147
  __name: "AddNewPasswordContent",
152
148
  props: {
153
149
  modelValue: { type: Boolean },
@@ -157,64 +153,64 @@ const Ge = { class: "dialogDefaultContainerInsideContent" }, Ye = { class: "dial
157
153
  },
158
154
  emits: ["update:modelValue", "submit", "close", "update-user"],
159
155
  setup(_, { emit: R }) {
160
- const v = R, s = b(!1), m = b(""), e = b(""), n = Q({
156
+ const v = R, s = b(!1), m = b(""), e = b(""), i = Q({
161
157
  newPassword: !1,
162
158
  newPasswordConfirm: !1
163
- }), y = b(A.NEW), r = b(!1), d = b(!1), V = M(() => r.value ? "text" : "password"), N = M(() => d.value ? "text" : "password"), B = () => {
164
- r.value = !r.value;
165
- }, O = () => {
159
+ }), y = b(F.NEW), d = b(!1), r = b(!1), V = M(() => d.value ? "text" : "password"), O = M(() => r.value ? "text" : "password"), B = () => {
166
160
  d.value = !d.value;
167
- }, C = M(() => n.newPassword ? m.value.trim() ? m.value.trim().length < Te ? `Пароль слишком короткий. Введите хотя бы ${Te} символов` : "" : "Введите пароль" : ""), c = M(() => n.newPasswordConfirm ? e.value.trim() ? e.value !== m.value ? "Пароли не совпадают" : "" : "Повторите пароль" : ""), T = M(() => !!(C.value || c.value)), g = M(() => s.value || !m.value.trim() || !e.value.trim() ? !0 : T.value), L = () => {
161
+ }, U = () => {
162
+ r.value = !r.value;
163
+ }, C = M(() => i.newPassword ? m.value.trim() ? m.value.trim().length < Te ? `Пароль слишком короткий. Введите хотя бы ${Te} символов` : "" : "Введите пароль" : ""), c = M(() => i.newPasswordConfirm ? e.value.trim() ? e.value !== m.value ? "Пароли не совпадают" : "" : "Повторите пароль" : ""), T = M(() => !!(C.value || c.value)), g = M(() => s.value || !m.value.trim() || !e.value.trim() ? !0 : T.value), L = () => {
168
164
  v("update:modelValue", !1), v("close");
169
- }, U = async () => {
165
+ }, A = async () => {
170
166
  v("update-user", m.value);
171
167
  };
172
- return (p, l) => (w(), x(Oe, null, [
168
+ return (p, a) => (w(), k(Oe, null, [
173
169
  S("div", et, [
174
170
  S("div", tt, [
175
- l[7] || (l[7] = S("div", { class: "dialogDefaultContainerTextHint" }, X("Установите новый пароль для защиты аккаунта. Пароль должен содержать не менее 8 символов."), -1)),
176
- S("div", lt, [
177
- k(u(J), {
171
+ a[7] || (a[7] = S("div", { class: "dialogDefaultContainerTextHint" }, X("Установите новый пароль для защиты аккаунта. Пароль должен содержать не менее 8 символов."), -1)),
172
+ S("div", at, [
173
+ $(u(J), {
178
174
  modelValue: m.value,
179
- "onUpdate:modelValue": l[0] || (l[0] = (i) => m.value = i),
175
+ "onUpdate:modelValue": a[0] || (a[0] = (n) => m.value = n),
180
176
  size: "large",
181
177
  "text-size": "medium",
182
178
  label: "Новый пароль",
183
179
  type: V.value,
184
180
  error: C.value,
185
- onBlur: l[1] || (l[1] = () => n.newPassword = !0),
186
- onInput: l[2] || (l[2] = () => n.newPassword = !0)
181
+ onBlur: a[1] || (a[1] = () => i.newPassword = !0),
182
+ onInput: a[2] || (a[2] = () => i.newPassword = !0)
187
183
  }, null, 8, ["modelValue", "type", "error"]),
188
- (w(), H(Ce(r.value ? u(ge) : u(he)), {
184
+ (w(), H(Ce(d.value ? u(ge) : u(he)), {
189
185
  class: "icon-locked",
190
186
  onClick: B
191
187
  }))
192
188
  ]),
193
- S("div", at, [
194
- k(u(J), {
189
+ S("div", lt, [
190
+ $(u(J), {
195
191
  modelValue: e.value,
196
- "onUpdate:modelValue": l[3] || (l[3] = (i) => e.value = i),
192
+ "onUpdate:modelValue": a[3] || (a[3] = (n) => e.value = n),
197
193
  size: "large",
198
194
  "text-size": "medium",
199
195
  label: "Повторите новый пароль",
200
- type: N.value,
196
+ type: O.value,
201
197
  error: c.value,
202
- onBlur: l[4] || (l[4] = () => n.newPasswordConfirm = !0),
203
- onInput: l[5] || (l[5] = () => n.newPasswordConfirm = !0)
198
+ onBlur: a[4] || (a[4] = () => i.newPasswordConfirm = !0),
199
+ onInput: a[5] || (a[5] = () => i.newPasswordConfirm = !0)
204
200
  }, null, 8, ["modelValue", "type", "error"]),
205
- (w(), H(Ce(d.value ? u(ge) : u(he)), {
201
+ (w(), H(Ce(r.value ? u(ge) : u(he)), {
206
202
  class: "icon-locked",
207
- onClick: O
203
+ onClick: U
208
204
  }))
209
205
  ]),
210
206
  S("div", ot, [
211
- k(u(oe), {
207
+ $(u(ie), {
212
208
  style: { width: "100%" },
213
209
  disabled: g.value,
214
- onClick: U
210
+ onClick: A
215
211
  }, {
216
- default: G(() => l[6] || (l[6] = [
217
- ae(X("Сохранить"))
212
+ default: G(() => a[6] || (a[6] = [
213
+ oe(X("Сохранить"))
218
214
  ])),
219
215
  _: 1,
220
216
  __: [6]
@@ -222,26 +218,26 @@ const Ge = { class: "dialogDefaultContainerInsideContent" }, Ye = { class: "dial
222
218
  ])
223
219
  ])
224
220
  ]),
225
- y.value === u(A).COMPLETED ? (w(), x("div", it, [
221
+ y.value === u(F).COMPLETED ? (w(), k("div", it, [
226
222
  S("div", nt, [
227
- l[9] || (l[9] = S("p", null, "Пароль успешно установлен", -1)),
223
+ a[9] || (a[9] = S("p", null, "Пароль успешно установлен", -1)),
228
224
  S("div", st, [
229
- k(u(oe), {
225
+ $(u(ie), {
230
226
  style: { width: "100%" },
231
227
  onClick: L
232
228
  }, {
233
- default: G(() => l[8] || (l[8] = [
234
- ae("Закрыть")
229
+ default: G(() => a[8] || (a[8] = [
230
+ oe("Закрыть")
235
231
  ])),
236
232
  _: 1,
237
233
  __: [8]
238
234
  })
239
235
  ])
240
236
  ])
241
- ])) : D("", !0)
237
+ ])) : N("", !0)
242
238
  ], 64));
243
239
  }
244
- }), dt = { class: "dialogDefaultContainerInsideContent" }, ut = { class: "dialogDefaultContainerTextHint" }, mt = {
240
+ }), rt = { class: "dialogDefaultContainerInsideContent" }, ut = { class: "dialogDefaultContainerTextHint" }, mt = {
245
241
  key: 0,
246
242
  class: "input-wrapper"
247
243
  }, ct = {
@@ -281,22 +277,22 @@ const Ge = { class: "dialogDefaultContainerInsideContent" }, Ye = { class: "dial
281
277
  );
282
278
  const e = (C) => {
283
279
  m.touched[C] = !0;
284
- }, n = b(""), y = (C) => {
280
+ }, i = b(""), y = (C) => {
285
281
  s("on-clear-code-error");
286
282
  const c = C.target;
287
283
  let T = ((c == null ? void 0 : c.value) ?? "").replace(/\D/g, "");
288
- T.length > 4 && (T = T.slice(0, 4)), V.value = T, c && c.value !== T && (c.value = T), T.length === 4 && T !== n.value && (n.value = T, s("on-match-code", { email: d.value, code: T }));
289
- }, r = () => {
290
- s("on-send-code-again", { email: d.value });
291
- }, { emailModel: d, codeModel: V, touched: N } = de(m), B = M(() => N.value.email && !d.value.trim() ? "Введите e-mail" : v.emailError), O = M(() => v.isNotMatchCode ? "Неверный код" : N.value.code ? V.value.trim() ? v.codeError ?? null : "Введите код" : "");
284
+ T.length > 4 && (T = T.slice(0, 4)), V.value = T, c && c.value !== T && (c.value = T), T.length === 4 && T !== i.value && (i.value = T, s("on-match-code", { email: r.value, code: T }));
285
+ }, d = () => {
286
+ s("on-send-code-again", { email: r.value });
287
+ }, { emailModel: r, codeModel: V, touched: O } = re(m), B = M(() => O.value.email && !r.value.trim() ? "Введите e-mail" : v.emailError), U = M(() => v.isNotMatchCode ? "Неверный код" : O.value.code ? V.value.trim() ? v.codeError ?? null : "Введите код" : "");
292
288
  return (C, c) => {
293
289
  const T = ue;
294
- return w(), x("div", dt, [
290
+ return w(), k("div", rt, [
295
291
  S("div", ut, X(C.hintText), 1),
296
- C.showEmail ? (w(), x("div", mt, [
297
- k(u(J), {
298
- modelValue: u(d),
299
- "onUpdate:modelValue": c[0] || (c[0] = (g) => Z(d) ? d.value = g : null),
292
+ C.showEmail ? (w(), k("div", mt, [
293
+ $(u(J), {
294
+ modelValue: u(r),
295
+ "onUpdate:modelValue": c[0] || (c[0] = (g) => Z(r) ? r.value = g : null),
300
296
  size: "large",
301
297
  "text-size": "medium",
302
298
  label: "Почта",
@@ -306,29 +302,29 @@ const Ge = { class: "dialogDefaultContainerInsideContent" }, Ye = { class: "dial
306
302
  onBlur: c[1] || (c[1] = (g) => e("email")),
307
303
  onInput: c[2] || (c[2] = (g) => e("email"))
308
304
  }, null, 8, ["modelValue", "error"]),
309
- k(u(me), {
305
+ $(u(me), {
310
306
  class: "icon-locked",
311
307
  onClick: c[3] || (c[3] = (g) => C.$emit("edit", "email"))
312
308
  })
313
- ])) : D("", !0),
314
- C.showCode ? (w(), x("div", ct, [
315
- k(u(J), {
309
+ ])) : N("", !0),
310
+ C.showCode ? (w(), k("div", ct, [
311
+ $(u(J), {
316
312
  modelValue: u(V),
317
313
  "onUpdate:modelValue": c[4] || (c[4] = (g) => Z(V) ? V.value = g : null),
318
314
  size: "large",
319
315
  "text-size": "medium",
320
316
  label: "Код",
321
317
  type: "text",
322
- error: O.value,
318
+ error: U.value,
323
319
  onInput: y,
324
320
  onBlur: c[5] || (c[5] = (g) => e("code"))
325
321
  }, null, 8, ["modelValue", "error"])
326
- ])) : D("", !0),
327
- k(T, {
322
+ ])) : N("", !0),
323
+ $(T, {
328
324
  loading: C.loading,
329
325
  "rate-limit-text": C.rateLimitText,
330
326
  "is-final-limit": C.isFinalLimit,
331
- "on-send-again": r
327
+ "on-send-again": d
332
328
  }, null, 8, ["loading", "rate-limit-text", "is-final-limit"])
333
329
  ]);
334
330
  };
@@ -358,114 +354,110 @@ const Ge = { class: "dialogDefaultContainerInsideContent" }, Ye = { class: "dial
358
354
  },
359
355
  emits: ["update:email", "update:code", "edit", "on-match-code", "on-match-code-error", "on-send-code", "on-send-code-again", "on-clear-code-error"],
360
356
  setup(_, { emit: R }) {
361
- const v = _, s = R, m = b(!1), e = b(""), n = Q({
357
+ const v = _, s = R, m = b(!1), e = b(""), i = Q({
362
358
  touched: { email: !1, code: !1 },
363
359
  emailModel: "",
364
360
  codeModel: ""
365
361
  });
366
362
  Y(
367
- () => n.emailModel,
368
- (l) => {
369
- s("update:email", l);
363
+ () => i.emailModel,
364
+ (a) => {
365
+ s("update:email", a);
370
366
  }
371
367
  ), Y(
372
- () => n.codeModel,
373
- (l) => s("update:code", l)
368
+ () => i.codeModel,
369
+ (a) => s("update:code", a)
374
370
  );
375
- const y = (l) => n.touched[l] = !0, r = (l) => n.touched[l] = !1, d = () => {
376
- e.value = "", r("email");
377
- }, V = M(() => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(n.emailModel.trim())), N = M(() => !V.value || !!e.value), B = async () => {
378
- var l;
371
+ const y = (a) => i.touched[a] = !0, d = (a) => i.touched[a] = !1, r = () => {
372
+ e.value = "", d("email");
373
+ }, V = M(() => /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(i.emailModel.trim())), O = M(() => !V.value || !!e.value), B = async () => {
374
+ var a, n;
379
375
  try {
380
376
  if (y("email"), !V.value) {
381
377
  e.value = "Это не похоже на e-mail";
382
378
  return;
383
379
  }
384
- const i = await Ve(n.emailModel), { data: E } = i.data;
385
- if (!(((l = E == null ? void 0 : E[0]) == null ? void 0 : l.available) ?? !1)) {
380
+ const f = await Ve(i.emailModel), { data: P } = f.data;
381
+ if (!(((n = (a = P == null ? void 0 : P.data) == null ? void 0 : a[0]) == null ? void 0 : n.available) ?? !1)) {
386
382
  e.value = "Такой email уже используется";
387
383
  return;
388
384
  }
389
- if (checkEmailFormatError(i)) {
390
- e.value = "Это не похоже на e-mail";
391
- return;
392
- }
393
- e.value = "", s("on-send-code", { email: n.emailModel, prevEmail: v.oldEmail, offLoading: !0 }), m.value = !0;
394
- } catch (i) {
395
- console.error("Неизвестная ошибка при проверке доступности email:", i), e.value = "Это не похоже на e-mail";
385
+ e.value = "", s("on-send-code", { email: i.emailModel, prevEmail: v.oldEmail, offLoading: !0 }), m.value = !0;
386
+ } catch (f) {
387
+ console.error("Неизвестная ошибка при проверке доступности email:", f), e.value = "Это не похоже на e-mail";
396
388
  }
397
389
  };
398
- let O = "";
399
- const C = (l) => {
390
+ let U = "";
391
+ const C = (a) => {
400
392
  s("on-clear-code-error");
401
- const i = l.target;
402
- let E = i.value.replace(/\D/g, "");
403
- E.length > 4 && (E = E.slice(0, 4), i.value = E), n.codeModel = E, E.length === 4 && E !== O && (O = E, s("on-match-code", { email: n.emailModel, code: E }));
393
+ const n = a.target;
394
+ let f = n.value.replace(/\D/g, "");
395
+ f.length > 4 && (f = f.slice(0, 4), n.value = f), i.codeModel = f, f.length === 4 && f !== U && (U = f, s("on-match-code", { email: i.emailModel, code: f }));
404
396
  }, c = () => {
405
- s("on-send-code-again", { email: n.emailModel });
406
- }, { emailModel: T, codeModel: g, touched: L } = de(n), U = M(() => {
397
+ s("on-send-code-again", { email: i.emailModel });
398
+ }, { emailModel: T, codeModel: g, touched: L } = re(i), A = M(() => {
407
399
  if (e.value) return e.value;
408
- if (n.touched.email) {
409
- if (!n.emailModel.trim()) return "Введите e-mail";
400
+ if (i.touched.email) {
401
+ if (!i.emailModel.trim()) return "Введите e-mail";
410
402
  if (!V.value) return "Это не похоже на e-mail";
411
403
  }
412
404
  return v.emailError || "";
413
405
  }), p = M(() => v.isNotMatchCode ? "Неверный код" : L.value.code ? g.value.trim() ? v.codeError ?? null : "Введите код" : "");
414
- return (l, i) => {
415
- const E = ue;
416
- return w(), x("div", ft, [
417
- S("div", Et, X(m.value ? "Введите код подтверждения" : l.hintText), 1),
418
- l.showEmail ? (w(), x("div", wt, [
419
- k(u(J), {
406
+ return (a, n) => {
407
+ const f = ue;
408
+ return w(), k("div", ft, [
409
+ S("div", Et, X(m.value ? "Введите код подтверждения" : a.hintText), 1),
410
+ a.showEmail ? (w(), k("div", wt, [
411
+ $(u(J), {
420
412
  modelValue: u(T),
421
- "onUpdate:modelValue": i[0] || (i[0] = (F) => Z(T) ? T.value = F : null),
413
+ "onUpdate:modelValue": n[0] || (n[0] = (P) => Z(T) ? T.value = P : null),
422
414
  size: "large",
423
415
  "text-size": "medium",
424
416
  label: "Почта",
425
417
  type: "email",
426
- error: U.value,
427
- onBlur: i[1] || (i[1] = (F) => y("email")),
428
- onInput: d
418
+ error: A.value,
419
+ onBlur: n[1] || (n[1] = (P) => y("email")),
420
+ onInput: r
429
421
  }, null, 8, ["modelValue", "error"]),
430
- k(u(me), {
422
+ $(u(me), {
431
423
  class: "icon-locked",
432
- onClick: i[2] || (i[2] = (F) => l.$emit("edit", "email"))
424
+ onClick: n[2] || (n[2] = (P) => a.$emit("edit", "email"))
433
425
  })
434
- ])) : D("", !0),
435
- m.value ? D("", !0) : (w(), x("div", Ct, [
436
- k(u(oe), {
426
+ ])) : N("", !0),
427
+ m.value ? N("", !0) : (w(), k("div", Ct, [
428
+ $(u(ie), {
437
429
  style: { width: "100%" },
438
- disabled: N.value,
430
+ disabled: O.value,
439
431
  onClick: B
440
432
  }, {
441
- default: G(() => i[5] || (i[5] = [
442
- ae(" Отправить код ")
433
+ default: G(() => n[5] || (n[5] = [
434
+ oe(" Отправить код ")
443
435
  ])),
444
436
  _: 1,
445
437
  __: [5]
446
438
  }, 8, ["disabled"])
447
439
  ])),
448
- m.value ? (w(), x("div", yt, [
449
- k(u(J), {
440
+ m.value ? (w(), k("div", yt, [
441
+ $(u(J), {
450
442
  modelValue: u(g),
451
- "onUpdate:modelValue": i[3] || (i[3] = (F) => Z(g) ? g.value = F : null),
443
+ "onUpdate:modelValue": n[3] || (n[3] = (P) => Z(g) ? g.value = P : null),
452
444
  size: "large",
453
445
  "text-size": "medium",
454
446
  label: "Код",
455
447
  type: "text",
456
448
  error: p.value,
457
449
  onInput: C,
458
- onBlur: i[4] || (i[4] = (F) => y("code"))
450
+ onBlur: n[4] || (n[4] = (P) => y("code"))
459
451
  }, null, 8, ["modelValue", "error"])
460
- ])) : D("", !0),
461
- m.value ? (w(), x("div", gt, [
462
- k(E, {
463
- loading: l.loading,
464
- "rate-limit-text": l.rateLimitText,
465
- "is-final-limit": l.isFinalLimit,
452
+ ])) : N("", !0),
453
+ m.value ? (w(), k("div", gt, [
454
+ $(f, {
455
+ loading: a.loading,
456
+ "rate-limit-text": a.rateLimitText,
457
+ "is-final-limit": a.isFinalLimit,
466
458
  "on-send-again": c
467
459
  }, null, 8, ["loading", "rate-limit-text", "is-final-limit"])
468
- ])) : D("", !0)
460
+ ])) : N("", !0)
469
461
  ]);
470
462
  };
471
463
  }
@@ -494,53 +486,53 @@ const Ge = { class: "dialogDefaultContainerInsideContent" }, Ye = { class: "dial
494
486
  code: "",
495
487
  addEmail: "",
496
488
  addCode: ""
497
- }), n = Q({ email: !1, code: !1 }), y = b(A.OLD), r = b(null), d = b(!1), V = b(!1), N = b(!1), B = b(We.VERIFY_EMAIL), O = M(() => B.value === "password-flow"), C = M(() => p.value ? v.title : O.value ? "Добавление пароля" : "Добавление почты"), { startTimer: c, remainingSeconds: T, isAvailableForSendAgain: g, totalRateAttempts: L, currentRateAttempt: U } = Fe(), { isEditFlow: p, getFlow: l } = Ae(b(v.mode ?? "edit")), { showRateLimitToast: i } = Re(s), E = M(() => n.email && !e.oldEmail.trim() ? "Введите e-mail" : ""), F = M(() => n.code && !e.code.trim() ? "Введите код" : ""), ie = M(() => g.value ? "Повторить" : `${T.value}`), q = b(Me), be = M(() => q.value === 0), ke = (a) => new Promise((t) => setTimeout(t, a));
489
+ }), i = Q({ email: !1, code: !1 }), y = b(F.OLD), d = b(null), r = b(!1), V = b(!1), O = b(!1), B = b(We.VERIFY_EMAIL), U = M(() => B.value === "password-flow"), C = M(() => p.value ? v.title : U.value ? "Добавление пароля" : "Добавление почты"), { startTimer: c, remainingSeconds: T, isAvailableForSendAgain: g, totalRateAttempts: L, currentRateAttempt: A } = Fe(), { isEditFlow: p, getFlow: a } = Ae(b(v.mode ?? "edit")), { showRateLimitToast: n } = Re(s), f = M(() => i.email && !e.oldEmail.trim() ? "Введите e-mail" : ""), P = M(() => i.code && !e.code.trim() ? "Введите код" : ""), ae = M(() => g.value ? "Повторить" : `${T.value}`), q = b(Me), be = M(() => q.value === 0), $e = (l) => new Promise((t) => setTimeout(t, l));
498
490
  Y(
499
491
  () => v.modelValue,
500
- (a) => m.value = a
501
- ), Y(m, (a) => s("update:modelValue", a));
492
+ (l) => m.value = l
493
+ ), Y(m, (l) => s("update:modelValue", l));
502
494
  const ne = () => {
503
495
  s("close"), m.value = !1;
504
- }, ce = (a) => s("edit", a);
505
- async function ve(a, t = !1) {
496
+ }, ce = (l) => s("edit", l);
497
+ async function ve(l, t = !1) {
506
498
  var o;
507
499
  try {
508
- const h = (o = (await W("/users/profile/check-throttler", { method: "email", email: a, isInvite: t })).data) == null ? void 0 : o.data;
509
- return h ? (await ke(1e3), h.restTimeSec > 0 ? (c(h.restTimeSec), g.value = !1, L.value = h.attempts.total ?? L.value, U.value = (h.attempts.total ?? 0) - (h.attempts.available ?? 0), q.value = h.attempts.available ?? q.value) : g.value = !0, h) : null;
500
+ const h = (o = (await W("/users/profile/check-throttler", { method: "email", email: l, isInvite: t })).data) == null ? void 0 : o.data;
501
+ return h ? (await $e(1e3), h.restTimeSec > 0 ? (c(h.restTimeSec), g.value = !1, L.value = h.attempts.total ?? L.value, A.value = (h.attempts.total ?? 0) - (h.attempts.available ?? 0), q.value = h.attempts.available ?? q.value) : g.value = !0, h) : null;
510
502
  } catch {
511
503
  return null;
512
504
  }
513
505
  }
514
- async function se(a = "email") {
506
+ async function se(l = "email") {
515
507
  var o;
516
- return ((o = (await He("/users/profile/session/get-edit-session", { params: { field: a } })).data) == null ? void 0 : o.data) ?? null;
508
+ return ((o = (await He("/users/profile/session/get-edit-session", { params: { field: l } })).data) == null ? void 0 : o.data) ?? null;
517
509
  }
518
- async function $e(a = "email") {
510
+ async function xe(l = "email") {
519
511
  try {
520
- const t = await se(a);
521
- r.value = (t == null ? void 0 : t.sessionId) ?? r.value, y.value = (t == null ? void 0 : t.step) ?? y.value, e.oldEmail = (t == null ? void 0 : t.oldValue) ?? e.oldEmail, t != null && t.sessionId || await pe(a);
512
+ const t = await se(l);
513
+ d.value = (t == null ? void 0 : t.sessionId) ?? d.value, y.value = (t == null ? void 0 : t.step) ?? y.value, e.oldEmail = (t == null ? void 0 : t.oldValue) ?? e.oldEmail, t != null && t.sessionId || await pe(l);
522
514
  } catch {
523
- await pe(a);
515
+ await pe(l);
524
516
  }
525
517
  }
526
- async function pe(a = "email") {
518
+ async function pe(l = "email") {
527
519
  var t;
528
520
  try {
529
- const o = await W("/users/profile/session/create-if-not-exists", { field: a, oldValue: v.initialEmail }), f = ((t = o.data) == null ? void 0 : t.data) ?? o.data;
530
- r.value = (f == null ? void 0 : f.sessionId) ?? r.value, y.value = (f == null ? void 0 : f.step) ?? y.value, e.oldEmail = (f == null ? void 0 : f.oldValue) ?? e.oldEmail, e.newEmail = (f == null ? void 0 : f.newValue) ?? e.newEmail;
521
+ const o = await W("/users/profile/session/create-if-not-exists", { field: l, oldValue: v.initialEmail }), E = ((t = o.data) == null ? void 0 : t.data) ?? o.data;
522
+ d.value = (E == null ? void 0 : E.sessionId) ?? d.value, y.value = (E == null ? void 0 : E.step) ?? y.value, e.oldEmail = (E == null ? void 0 : E.oldValue) ?? e.oldEmail, e.newEmail = (E == null ? void 0 : E.newValue) ?? e.newEmail;
531
523
  } catch {
532
524
  }
533
525
  }
534
- async function ee({ value: a, offLoading: t = !0 }) {
526
+ async function ee({ value: l, offLoading: t = !0 }) {
535
527
  var o;
536
528
  try {
537
- d.value = !0;
538
- const f = a ?? e.addEmail, h = await W(
529
+ r.value = !0;
530
+ const E = l ?? e.addEmail, h = await W(
539
531
  "/users/profile/email/contact/send-code",
540
532
  {
541
- sessionId: r.value,
542
- email: f,
543
- value: f,
533
+ sessionId: d.value,
534
+ email: E,
535
+ value: E,
544
536
  oldValue: e.oldEmail,
545
537
  provider: v.provider
546
538
  }
@@ -548,136 +540,136 @@ const Ge = { class: "dialogDefaultContainerInsideContent" }, Ye = { class: "dial
548
540
  );
549
541
  if (h.status === 403 && ((o = h.data) != null && o.tooManyRequests)) {
550
542
  const I = h.data.tooManyRequests;
551
- return I.restTimeSec > 0 ? (c(I.restTimeSec), L.value = I.attempts.total ?? L.value, U.value = (I.attempts.total ?? 0) - (I.attempts.available ?? 0), q.value = I.attempts.available ?? q.value) : g.value = !0, h;
543
+ return I.restTimeSec > 0 ? (c(I.restTimeSec), L.value = I.attempts.total ?? L.value, A.value = (I.attempts.total ?? 0) - (I.attempts.available ?? 0), q.value = I.attempts.available ?? q.value) : g.value = !0, h;
552
544
  }
553
- return await ve(a ?? e.oldEmail), h;
554
- } catch (f) {
555
- throw console.error(f), f;
545
+ return await ve(l ?? e.oldEmail), h;
546
+ } catch (E) {
547
+ throw console.error(E), E;
556
548
  } finally {
557
- t && (d.value = !1);
549
+ t && (r.value = !1);
558
550
  }
559
551
  }
560
- const fe = async (a, t) => {
561
- var o, f, h, I, $, j;
562
- if (!e.oldEmail && t === A.OLD) throw new Error("oldEmail пустой — модель потерялась");
552
+ const fe = async (l, t) => {
553
+ var o, E, h, I, x, j;
554
+ if (!e.oldEmail && t === F.OLD) throw new Error("oldEmail пустой — модель потерялась");
563
555
  try {
564
- d.value = !0;
565
- const P = await se();
566
- if (r.value = (P == null ? void 0 : P.sessionId) ?? r.value, y.value = (P == null ? void 0 : P.step) ?? y.value, e.oldEmail = (P == null ? void 0 : P.oldValue) ?? e.oldEmail, e.newEmail = (P == null ? void 0 : P.newValue) ?? e.newEmail, !r.value) throw new Error("Нет sessionId для match");
556
+ r.value = !0;
557
+ const D = await se();
558
+ if (d.value = (D == null ? void 0 : D.sessionId) ?? d.value, y.value = (D == null ? void 0 : D.step) ?? y.value, e.oldEmail = (D == null ? void 0 : D.oldValue) ?? e.oldEmail, e.newEmail = (D == null ? void 0 : D.newValue) ?? e.newEmail, !d.value) throw new Error("Нет sessionId для match");
567
559
  const z = await W("/users/profile/change/email/match-code", {
568
- email: t === A.NEW ? e.newEmail : e.oldEmail,
569
- sessionId: r.value,
570
- code: a,
560
+ email: t === F.NEW ? e.newEmail : e.oldEmail,
561
+ sessionId: d.value,
562
+ code: l,
571
563
  step: t
572
- }), le = ((o = z.data) == null ? void 0 : o.nextStep) ?? ((h = (f = z.data) == null ? void 0 : f.data) == null ? void 0 : h.nextStep) ?? null, De = (($ = (I = z.data) == null ? void 0 : I.data) == null ? void 0 : $.rateLimit) ?? ((j = z.data) == null ? void 0 : j.rateLimit) ?? null, Ne = z.data.data.success ?? z.data.success;
573
- if (i(De), !Ne) {
564
+ }), le = ((o = z.data) == null ? void 0 : o.nextStep) ?? ((h = (E = z.data) == null ? void 0 : E.data) == null ? void 0 : h.nextStep) ?? null, De = ((x = (I = z.data) == null ? void 0 : I.data) == null ? void 0 : x.rateLimit) ?? ((j = z.data) == null ? void 0 : j.rateLimit) ?? null, Ne = z.data.data.success ?? z.data.success;
565
+ if (n(De), !Ne) {
574
566
  V.value = !0;
575
567
  return;
576
568
  }
577
569
  if (le) {
578
- if (y.value = le, y.value === A.NEW) {
570
+ if (y.value = le, y.value === F.NEW) {
579
571
  const K = await se();
580
572
  e.oldEmail = (K == null ? void 0 : K.oldValue) ?? e.oldEmail, e.newEmail = (K == null ? void 0 : K.newValue) ?? e.newEmail, e.code = "";
581
573
  }
582
- y.value === A.COMPLETED && (e.code = "", s("submit-email", { email: e.addEmail, code: a }), s("on-toast", { color: "success", text: "E-mail изменён" }), s("on-update-jwt", "email", "edit", e.newEmail), r.value = null, s("close"));
574
+ y.value === F.COMPLETED && (e.code = "", s("submit-email", { email: e.addEmail, code: l }), s("on-toast", { color: "success", text: "E-mail изменён" }), s("on-update-jwt", "email", "edit", e.newEmail), d.value = null, s("close"));
583
575
  }
584
576
  return z;
585
577
  } finally {
586
- d.value = !1;
578
+ r.value = !1;
587
579
  }
588
- }, xe = async () => {
580
+ }, ke = async () => {
589
581
  try {
590
- const a = await W("/users/profile/bind/email/cancel", {
591
- sessionId: r.value
582
+ const l = await W("/users/profile/bind/email/cancel", {
583
+ sessionId: d.value
592
584
  });
593
- if ((a.data.data ?? a.data).success) {
585
+ if ((l.data.data ?? l.data).success) {
594
586
  s("close");
595
587
  return;
596
588
  }
597
- } catch (a) {
598
- console.error(a);
589
+ } catch (l) {
590
+ console.error(l);
599
591
  }
600
592
  };
601
- async function Ie({ code: a }) {
602
- await fe(a, A.OLD);
593
+ async function Ie({ code: l }) {
594
+ await fe(l, F.OLD);
603
595
  }
604
- function Ee(a) {
596
+ function Ee(l) {
605
597
  }
606
- async function Se({ code: a }) {
607
- await fe(a, A.NEW);
598
+ async function Se({ code: l }) {
599
+ await fe(l, F.NEW);
608
600
  }
609
601
  const we = async ({
610
- value: a,
602
+ value: l,
611
603
  field: t = "email",
612
604
  offLoading: o = !0
613
605
  }) => {
614
- var f;
606
+ var E;
615
607
  try {
616
- if (d.value = !0, !r.value) throw new Error("Bind-сессия не найдена. Создайте её через createBindSession.");
617
- const h = a ?? e.addEmail, I = await W(`/users/profile/bind/contact/send-code/${t}`, {
618
- sessionId: r.value,
608
+ if (r.value = !0, !d.value) throw new Error("Bind-сессия не найдена. Создайте её через createBindSession.");
609
+ const h = l ?? e.addEmail, I = await W(`/users/profile/bind/contact/send-code/${t}`, {
610
+ sessionId: d.value,
619
611
  email: h,
620
612
  provider: v.provider
621
- }), $ = (f = I.data) == null ? void 0 : f.tooManyRequests;
622
- if (I.status === 403 && $) {
623
- $.restTimeSec > 0 ? (c($.restTimeSec), L.value = $.attempts.total ?? L.value, U.value = ($.attempts.total ?? 0) - ($.attempts.available ?? 0), q.value = $.attempts.available ?? Me) : g.value = !0;
613
+ }), x = (E = I.data) == null ? void 0 : E.tooManyRequests;
614
+ if (I.status === 403 && x) {
615
+ x.restTimeSec > 0 ? (c(x.restTimeSec), L.value = x.attempts.total ?? L.value, A.value = (x.attempts.total ?? 0) - (x.attempts.available ?? 0), q.value = x.attempts.available ?? Me) : g.value = !0;
624
616
  return;
625
617
  }
626
618
  const j = await ve(h);
627
619
  return j && j.restTimeSec > 0 ? c(j.restTimeSec) : g.value = !0, I;
628
620
  } finally {
629
- o && (d.value = !1);
621
+ o && (r.value = !1);
630
622
  }
631
623
  }, Be = async () => {
632
- var a, t, o, f, h, I;
624
+ var l, t, o, E, h, I;
633
625
  try {
634
- if (!r.value) {
635
- const le = await re();
636
- r.value = le.sessionId ?? r.value;
626
+ if (!d.value) {
627
+ const le = await de();
628
+ d.value = le.sessionId ?? d.value;
637
629
  }
638
- const $ = await W("/users/profile/bind/email/match-code", {
630
+ const x = await W("/users/profile/bind/email/match-code", {
639
631
  email: e.addEmail,
640
- sessionId: r.value,
632
+ sessionId: d.value,
641
633
  code: e.addCode
642
- }), j = ((a = $.data) == null ? void 0 : a.nextStep) ?? ((o = (t = $.data) == null ? void 0 : t.data) == null ? void 0 : o.nextStep);
634
+ }), j = ((l = x.data) == null ? void 0 : l.nextStep) ?? ((o = (t = x.data) == null ? void 0 : t.data) == null ? void 0 : o.nextStep);
643
635
  B.value = j ?? B.value;
644
- const P = ((h = (f = $.data) == null ? void 0 : f.data) == null ? void 0 : h.rateLimit) ?? ((I = $.data) == null ? void 0 : I.rateLimit) ?? null, z = $.data.data.success ?? $.data.success;
645
- if (i(P), !z) {
646
- N.value = !0;
636
+ const D = ((h = (E = x.data) == null ? void 0 : E.data) == null ? void 0 : h.rateLimit) ?? ((I = x.data) == null ? void 0 : I.rateLimit) ?? null, z = x.data.data.success ?? x.data.success;
637
+ if (n(D), !z) {
638
+ O.value = !0;
647
639
  return;
648
640
  }
649
641
  } catch {
650
642
  }
651
643
  }, Le = async () => {
652
- }, Pe = async (a) => {
653
- if (!r.value) {
654
- const t = await re();
655
- r.value = t.sessionId ?? r.value;
644
+ }, Pe = async (l) => {
645
+ if (!d.value) {
646
+ const t = await de();
647
+ d.value = t.sessionId ?? d.value;
656
648
  }
657
- d.value = !0;
649
+ r.value = !0;
658
650
  try {
659
- await W("/users/profile/bind/email/password/set", { sessionId: r.value, newPassword: a }), B.value = A.COMPLETED, s("on-toast", { color: "success", text: "E-mail успешно привязан к аккаунту" }), s("update-email-field", e.addEmail), s("submit-email", { email: e.addEmail, code: e.addCode }), s("on-update-jwt", "email", "bind", e.addEmail), s("close");
651
+ await W("/users/profile/bind/email/password/set", { sessionId: d.value, newPassword: l }), B.value = F.COMPLETED, s("on-toast", { color: "success", text: "E-mail успешно привязан к аккаунту" }), s("update-email-field", e.addEmail), s("submit-email", { email: e.addEmail, code: e.addCode }), s("on-update-jwt", "email", "bind", e.addEmail), s("close");
660
652
  } finally {
661
- d.value = !1;
653
+ r.value = !1;
662
654
  }
663
- }, re = async () => {
664
- d.value = !0;
655
+ }, de = async () => {
656
+ r.value = !0;
665
657
  try {
666
- const a = await W("/users/profile/bind/email/init", { email: "" }), t = a.data.data ?? a.data;
667
- return B.value = t.step ?? B.value, r.value = t.sessionId ?? r.value, t;
658
+ const l = await W("/users/profile/bind/email/init", { email: "" }), t = l.data.data ?? l.data;
659
+ return B.value = t.step ?? B.value, d.value = t.sessionId ?? d.value, t;
668
660
  } finally {
669
- d.value = !1;
661
+ r.value = !1;
670
662
  }
671
663
  };
672
664
  return Ue(async () => {
673
- d.value = !0;
674
- const a = await l("email");
675
- if (v.mode === "bind" && a === "bind") {
676
- await re(), d.value = !1;
665
+ r.value = !0;
666
+ const l = await a("email");
667
+ if (v.mode === "bind" && l === "bind") {
668
+ await de(), r.value = !1;
677
669
  return;
678
670
  }
679
- await $e(), e.oldEmail && await ee({ value: e.oldEmail }), d.value = !1;
680
- }), (a, t) => (w(), H(u(_e), {
671
+ await xe(), e.oldEmail && await ee({ value: e.oldEmail }), r.value = !1;
672
+ }), (l, t) => (w(), H(u(_e), {
681
673
  modelValue: m.value,
682
674
  "onUpdate:modelValue": [
683
675
  t[18] || (t[18] = (o) => m.value = o),
@@ -690,7 +682,7 @@ const Ge = { class: "dialogDefaultContainerInsideContent" }, Ye = { class: "dial
690
682
  }, {
691
683
  header: G(() => [
692
684
  S("div", Tt, [
693
- k(u(qe), {
685
+ $(u(qe), {
694
686
  "slot-left": !1,
695
687
  size: "small",
696
688
  borded: !0,
@@ -700,7 +692,7 @@ const Ge = { class: "dialogDefaultContainerInsideContent" }, Ye = { class: "dial
700
692
  S("span", Mt, X(C.value), 1)
701
693
  ]),
702
694
  "right-button": G(() => [
703
- k(u(je), {
695
+ $(u(je), {
704
696
  class: "cross",
705
697
  onClick: ne
706
698
  })
@@ -711,28 +703,28 @@ const Ge = { class: "dialogDefaultContainerInsideContent" }, Ye = { class: "dial
711
703
  ]),
712
704
  default: G(() => [
713
705
  S("div", null, [
714
- u(p) ? (w(), x("div", Vt, [
715
- d.value ? (w(), H(ye, { key: 0 })) : D("", !0),
716
- y.value === u(A).OLD ? (w(), H(pt, {
706
+ u(p) ? (w(), k("div", Vt, [
707
+ r.value ? (w(), H(ye, { key: 0 })) : N("", !0),
708
+ y.value === u(F).OLD ? (w(), H(pt, {
717
709
  key: 1,
718
710
  email: e.oldEmail,
719
711
  "onUpdate:email": t[0] || (t[0] = (o) => e.oldEmail = o),
720
712
  code: e.code,
721
713
  "onUpdate:code": t[1] || (t[1] = (o) => e.code = o),
722
- "hint-text": a.hintText,
723
- "email-error": E.value,
724
- "code-error": F.value,
725
- "rate-limit-text": ie.value,
714
+ "hint-text": l.hintText,
715
+ "email-error": f.value,
716
+ "code-error": P.value,
717
+ "rate-limit-text": ae.value,
726
718
  "is-final-limit": q.value === 0,
727
719
  "is-not-match-code": V.value,
728
- loading: d.value,
720
+ loading: r.value,
729
721
  onEdit: ce,
730
722
  onOnMatchCode: Ie,
731
723
  onOnMatchCodeError: Ee,
732
724
  onSendCode: t[2] || (t[2] = (o) => ee({ value: e.oldEmail })),
733
725
  onOnSendCodeAgain: t[3] || (t[3] = (o) => ee({ value: e.oldEmail })),
734
726
  onOnClearCodeError: t[4] || (t[4] = (o) => V.value = !1)
735
- }, null, 8, ["email", "code", "hint-text", "email-error", "code-error", "rate-limit-text", "is-final-limit", "is-not-match-code", "loading"])) : y.value === u(A).NEW ? (w(), H(ht, {
727
+ }, null, 8, ["email", "code", "hint-text", "email-error", "code-error", "rate-limit-text", "is-final-limit", "is-not-match-code", "loading"])) : y.value === u(F).NEW ? (w(), H(ht, {
736
728
  key: 2,
737
729
  email: e.newEmail,
738
730
  "onUpdate:email": t[5] || (t[5] = (o) => e.newEmail = o),
@@ -741,28 +733,28 @@ const Ge = { class: "dialogDefaultContainerInsideContent" }, Ye = { class: "dial
741
733
  code: e.code,
742
734
  "onUpdate:code": t[7] || (t[7] = (o) => e.code = o),
743
735
  "hint-text": "Введите новый адрес вашей почты",
744
- "email-error": E.value,
745
- "code-error": F.value,
746
- "rate-limit-text": ie.value,
736
+ "email-error": f.value,
737
+ "code-error": P.value,
738
+ "rate-limit-text": ae.value,
747
739
  "is-final-limit": q.value === 0,
748
740
  "is-not-match-code": V.value,
749
- loading: d.value,
741
+ loading: r.value,
750
742
  onEdit: ce,
751
743
  onOnMatchCode: Se,
752
744
  onOnMatchCodeError: Ee,
753
745
  onOnSendCode: t[8] || (t[8] = (o) => ee({ value: e.newEmail })),
754
746
  onOnSendCodeAgain: t[9] || (t[9] = (o) => ee({ value: e.newEmail })),
755
747
  onOnClearCodeError: t[10] || (t[10] = (o) => V.value = !1)
756
- }, null, 8, ["email", "oldEmail", "code", "email-error", "code-error", "rate-limit-text", "is-final-limit", "is-not-match-code", "loading"])) : D("", !0)
757
- ])) : (w(), x("div", bt, [
758
- d.value ? (w(), H(ye, { key: 0 })) : D("", !0),
759
- O.value ? (w(), H(rt, {
748
+ }, null, 8, ["email", "oldEmail", "code", "email-error", "code-error", "rate-limit-text", "is-final-limit", "is-not-match-code", "loading"])) : N("", !0)
749
+ ])) : (w(), k("div", bt, [
750
+ r.value ? (w(), H(ye, { key: 0 })) : N("", !0),
751
+ U.value ? (w(), H(dt, {
760
752
  key: 2,
761
753
  "model-value": m.value,
762
- "email-session-id": r.value,
754
+ "email-session-id": d.value,
763
755
  "onUpdate:modelValue": t[17] || (t[17] = (o) => s("update:modelValue", o)),
764
756
  onUpdateUser: Pe,
765
- onClose: xe
757
+ onClose: ke
766
758
  }, null, 8, ["model-value", "email-session-id"])) : (w(), H(Ze, {
767
759
  key: 1,
768
760
  email: e.addEmail,
@@ -771,16 +763,16 @@ const Ge = { class: "dialogDefaultContainerInsideContent" }, Ye = { class: "dial
771
763
  "onUpdate:oldEmail": t[12] || (t[12] = (o) => e.addEmail = o),
772
764
  code: e.addCode,
773
765
  "onUpdate:code": t[13] || (t[13] = (o) => e.addCode = o),
774
- "hint-text": u(p) ? a.hintText : "Чтобы продолжить, введите новый адрес вашей почты",
775
- "rate-limit-text": ie.value,
766
+ "hint-text": u(p) ? l.hintText : "Чтобы продолжить, введите новый адрес вашей почты",
767
+ "rate-limit-text": ae.value,
776
768
  "is-final-limit": be.value,
777
- "is-not-match-code": N.value,
778
- loading: d.value,
769
+ "is-not-match-code": O.value,
770
+ loading: r.value,
779
771
  onOnSendCode: t[14] || (t[14] = (o) => we({ value: e.addEmail, field: "email" })),
780
772
  onOnSendCodeAgain: t[15] || (t[15] = (o) => we({ value: e.addEmail, field: "email" })),
781
773
  onOnMatchCode: Be,
782
774
  onOnMatchCodeError: Le,
783
- onOnClearCodeError: t[16] || (t[16] = (o) => N.value = !1)
775
+ onOnClearCodeError: t[16] || (t[16] = (o) => O.value = !1)
784
776
  }, null, 8, ["email", "oldEmail", "code", "hint-text", "rate-limit-text", "is-final-limit", "is-not-match-code", "loading"]))
785
777
  ]))
786
778
  ])