@yourgoods/ui-smart 0.46.0 → 0.46.3

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,11 +1,11 @@
1
- import { ref as h, shallowRef as Le, defineComponent as Q, defineAsyncComponent as J, watch as de, createBlock as I, createCommentVNode as b, unref as m, openBlock as y, resolveDynamicComponent as Me, mergeProps as Re, computed as T, reactive as _, onMounted as Ge, createElementBlock as k, Fragment as ce, createVNode as g, createElementVNode as Y, withCtx as D, toDisplayString as F, createTextVNode as W, Teleport as ue, Transition as je, withDirectives as qe, vShow as Je } from "vue";
1
+ import { ref as h, shallowRef as Oe, defineComponent as H, defineAsyncComponent as q, watch as ze, createBlock as I, createCommentVNode as b, unref as d, openBlock as w, resolveDynamicComponent as Me, mergeProps as Re, computed as T, reactive as J, onMounted as Ge, createElementBlock as k, Fragment as de, createVNode as g, createElementVNode as _, withCtx as F, toDisplayString as D, createTextVNode as Y, Teleport as ue, Transition as je, withDirectives as qe, vShow as Je } from "vue";
2
2
  import _e from "axios";
3
- import { PInputFileUploader as Ye, PInput as L, IconFilledEditMd as M, PButton as me, PImageCropper as We, PToast as Ke, PTeleportContainer as pe, PToastContainer as Ze } from "@profeat/ui-kit";
3
+ import { PInputFileUploader as Ye, PInput as O, IconFilledEditMd as z, PButton as me, PImageCropper as We, PToast as Ke, PTeleportContainer as ce, PToastContainer as Ze } from "@profeat/ui-kit";
4
4
  function He(s, n = 2) {
5
5
  if (s === 0)
6
6
  return "0 B";
7
- const r = 1024, i = ["B", "KB", "MB", "GB", "TB", "PB", "EB"], v = Math.floor(Math.log(s) / Math.log(r));
8
- return `${Number.parseFloat((s / r ** v).toFixed(n))} ${i[v]}`;
7
+ const r = 1024, u = ["B", "KB", "MB", "GB", "TB", "PB", "EB"], v = Math.floor(Math.log(s) / Math.log(r));
8
+ return `${Number.parseFloat((s / r ** v).toFixed(n))} ${u[v]}`;
9
9
  }
10
10
  const Qe = {
11
11
  "image/jpeg": "JPEG",
@@ -28,9 +28,9 @@ const Ca = {
28
28
  }, Pa = {
29
29
  VERIFY_EMAIL: "verify-email"
30
30
  };
31
- let Z = null;
31
+ let K = null;
32
32
  function ea(s, n) {
33
- Z = _e.create({
33
+ K = _e.create({
34
34
  baseURL: n,
35
35
  headers: {
36
36
  Authorization: `Bearer ${s}`,
@@ -40,38 +40,38 @@ function ea(s, n) {
40
40
  validateStatus: () => !0
41
41
  });
42
42
  }
43
- function X() {
44
- if (!Z)
43
+ function Q() {
44
+ if (!K)
45
45
  throw new Error("Axios instance not initialized. Call initAxios(token, baseUrl) first.");
46
- return Z;
46
+ return K;
47
47
  }
48
- async function H(s, n, r) {
49
- return X().post(s, n, r);
48
+ async function Z(s, n, r) {
49
+ return Q().post(s, n, r);
50
50
  }
51
51
  async function aa(s, n) {
52
- return X().get(s, n);
52
+ return Q().get(s, n);
53
53
  }
54
54
  async function ta(s, n) {
55
- return X().delete(s, n);
55
+ return Q().delete(s, n);
56
56
  }
57
57
  async function oa(s) {
58
- const n = await H("/users/profile/me", s);
58
+ const n = await Z("/users/profile/me", s);
59
59
  if (console.log("---res: ", n), n.status !== 200 && n.status !== 201 || !n.data)
60
60
  throw new Error("Ошибка при получении профиля пользователя");
61
61
  return n.data;
62
62
  }
63
- const R = h(null), K = Le(null);
64
- function ee() {
63
+ const M = h(null), W = Oe(null);
64
+ function X() {
65
65
  return {
66
- currentDialog: R,
67
- dialogPayload: K,
68
- openDialog: (i, v) => {
69
- R.value = i, K.value = v ?? null;
66
+ currentDialog: M,
67
+ dialogPayload: W,
68
+ openDialog: (u, v) => {
69
+ M.value = u, W.value = v ?? null;
70
70
  },
71
71
  closeDialog: () => {
72
- R.value = null, K.value = null;
72
+ M.value = null, W.value = null;
73
73
  },
74
- isDialogOpen: (i) => R.value === i
74
+ isDialogOpen: (u) => M.value === u
75
75
  };
76
76
  }
77
77
  const ra = {
@@ -207,7 +207,7 @@ const ra = {
207
207
  "Введите новый номер телефона": "Enter a new phone number",
208
208
  "Телефон успешно изменен": "Phone number successfully changed"
209
209
  }
210
- }, na = /* @__PURE__ */ Q({
210
+ }, na = /* @__PURE__ */ H({
211
211
  __name: "DialogManager",
212
212
  props: {
213
213
  language: {},
@@ -215,31 +215,31 @@ const ra = {
215
215
  },
216
216
  emits: ["clean-input-errors", "on-update-jwt", "update-phone-field", "update-email-field", "on-password-error", "on-toast"],
217
217
  setup(s, { emit: n }) {
218
- const r = n, i = h(!0), { currentDialog: v, dialogPayload: p, closeDialog: U } = ee(), l = {
219
- email: J(() => import("./ProfileEmailDialog-DbVB3QMM.js")),
220
- phone: J(() => import("./ProfilePhoneDialog-BNDUQGI1.js")),
221
- password: J(() => import("./ProfilePasswordDialog-Dz1pfiLP.js"))
222
- }, d = ({ email: E }) => {
223
- r("update-email-field", E);
224
- }, c = ({ phone: E }) => {
225
- r("update-phone-field", E);
218
+ const r = n, u = h(!0), { currentDialog: v, dialogPayload: p, closeDialog: U } = X(), l = {
219
+ email: q(() => import("./ProfileEmailDialog-CyEyVksj.js")),
220
+ phone: q(() => import("./ProfilePhoneDialog-DakDmdje.js")),
221
+ password: q(() => import("./ProfilePasswordDialog-9f1LPFRr.js"))
222
+ }, i = ({ email: y }) => {
223
+ r("update-email-field", y);
224
+ }, c = ({ phone: y }) => {
225
+ r("update-phone-field", y);
226
226
  };
227
- return de(v, (E) => {
228
- i.value = !!E;
229
- }), (E, u) => m(v) ? (y(), I(Me(l[m(v)]), Re({
227
+ return ze(v, (y) => {
228
+ u.value = !!y;
229
+ }), (y, m) => d(v) ? (w(), I(Me(l[d(v)]), Re({
230
230
  key: 0,
231
- modelValue: i.value,
232
- "onUpdate:modelValue": u[0] || (u[0] = (f) => i.value = f),
233
- language: E.language,
234
- provider: E.provider
235
- }, m(p), {
236
- onClose: m(U),
237
- onCleanInputErrors: u[1] || (u[1] = (f) => r("clean-input-errors")),
238
- onOnUpdateJwt: u[2] || (u[2] = (f, C, o) => r("on-update-jwt", f, C, o)),
239
- onSubmitEmail: d,
231
+ modelValue: u.value,
232
+ "onUpdate:modelValue": m[0] || (m[0] = (f) => u.value = f),
233
+ language: y.language,
234
+ provider: y.provider
235
+ }, d(p), {
236
+ onClose: d(U),
237
+ onCleanInputErrors: m[1] || (m[1] = (f) => r("clean-input-errors")),
238
+ onOnUpdateJwt: m[2] || (m[2] = (f, C, o) => r("on-update-jwt", f, C, o)),
239
+ onSubmitEmail: i,
240
240
  onSubmitPhone: c,
241
- onOnPasswordError: u[3] || (u[3] = (f, C) => r("on-password-error", f, C)),
242
- onOnToast: u[4] || (u[4] = (f) => r("on-toast", f))
241
+ onOnPasswordError: m[3] || (m[3] = (f, C) => r("on-password-error", f, C)),
242
+ onOnToast: m[4] || (m[4] = (f) => r("on-toast", f))
243
243
  }), null, 16, ["modelValue", "language", "provider", "onClose"])) : b("", !0);
244
244
  }
245
245
  }), sa = { class: "base-container" }, la = {
@@ -260,7 +260,7 @@ const ra = {
260
260
  }, pa = { class: "buttons-container" }, fa = {
261
261
  key: 0,
262
262
  class: "centered-overlay"
263
- }, ga = { class: "toastWrapper" }, va = /* @__PURE__ */ Q({
263
+ }, ga = { class: "toastWrapper" }, va = /* @__PURE__ */ H({
264
264
  __name: "PEditUserContact",
265
265
  props: {
266
266
  language: {},
@@ -274,7 +274,7 @@ const ra = {
274
274
  },
275
275
  emits: ["open-email-dialog", "open-phone-dialog", "open-password-dialog", "on-update-jwt", "on-password-error", "update-tokens"],
276
276
  setup(s, { emit: n }) {
277
- const r = s, i = n, v = T(() => r.language ?? "ru"), p = (e) => ra[v.value][e] || e, { openDialog: U } = ee(), l = _({ firstName: "", lastName: "" }), d = h({ firstName: "", lastName: "" }), c = _({ firstName: !1, lastName: !1, email: !1, phone: !1 }), E = h(""), u = h(""), f = h(""), C = h(!1), o = _({
277
+ const r = s, u = n, v = T(() => r.language ?? "ru"), p = (e) => ra[v.value][e] || e, { openDialog: U } = X(), l = J({ firstName: "", lastName: "" }), i = h({ firstName: "", lastName: "" }), c = J({ firstName: !1, lastName: !1, email: !1, phone: !1 }), y = h(""), m = h(""), f = h(""), C = h(!1), o = J({
278
278
  value: null,
279
279
  loading: !1,
280
280
  accept: ["image/png", "image/jpeg"],
@@ -282,49 +282,49 @@ const ra = {
282
282
  // 10 MB
283
283
  imageBinary: null,
284
284
  imageContent: ""
285
- }), S = h(""), A = h(!1), V = h(!1), G = h(!0), j = h(!0), ae = h(void 0), te = h(""), fe = T(() => re(l.firstName, c.firstName)), ge = T(() => re(l.lastName, c.lastName)), ve = T(() => c.email && !u.value.trim() ? "Введите e-mail" : ""), he = T(() => c.phone && !f.value.trim() ? "Введите номер телефона" : ""), B = (e) => r.fields.some((a) => a.key === e), oe = (e) => e && e.trim() ? "edit" : "bind", q = () => setTimeout(() => {
285
+ }), S = h(""), A = h(!1), R = h(!0), G = h(!0), ee = h(void 0), ae = h(""), pe = T(() => oe(l.firstName, c.firstName)), fe = T(() => oe(l.lastName, c.lastName)), ge = T(() => c.email && !m.value.trim() ? "Введите e-mail" : ""), ve = T(() => c.phone && !f.value.trim() ? "Введите номер телефона" : ""), B = (e) => r.fields.some((a) => a.key === e), te = (e) => e && e.trim() ? "edit" : "bind", j = () => setTimeout(() => {
286
286
  var e;
287
287
  return (e = document.activeElement) == null ? void 0 : e.blur();
288
- }, 0), we = T(() => !!(u.value && u.value.trim() !== "")), ye = T(() => o.imageContent ? p("Загрузить другое фото") : p("Загрузить фото")), re = (e, a) => {
288
+ }, 0), he = T(() => !!(m.value && m.value.trim() !== "")), we = T(() => o.imageContent ? p("Загрузить другое фото") : p("Загрузить фото")), oe = (e, a) => {
289
289
  if (!a) return "";
290
290
  const t = e.trim();
291
291
  return t ? t.length < 2 ? "Поле должно содержать минимум 2 символа" : "" : "Введите значение";
292
- }, Ee = (e) => U("email", { mode: e ? "edit" : "bind", initialEmail: e }), Ne = () => {
293
- q(), c.email = !1, j.value = !1, i("open-email-dialog", u.value, oe(u.value)), Ee(u.value);
294
- }, Ce = () => {
295
- q(), c.phone = !1, G.value = !1, i("open-phone-dialog", f.value, oe(f.value));
296
- }, Pe = async (e, a, t) => {
297
- e === "email" && t && (u.value = t), e === "phone" && t && (f.value = t), i("on-update-jwt");
298
- }, be = (e) => {
292
+ }, ye = (e) => U("email", { mode: e ? "edit" : "bind", initialEmail: e }), Ee = () => {
293
+ j(), c.email = !1, G.value = !1, u("open-email-dialog", m.value, te(m.value)), ye(m.value);
294
+ }, Ne = () => {
295
+ j(), c.phone = !1, R.value = !1, u("open-phone-dialog", f.value, te(f.value));
296
+ }, Ce = async (e, a, t) => {
297
+ e === "email" && t && (m.value = t), e === "phone" && t && (f.value = t), u("on-update-jwt");
298
+ }, Pe = (e) => {
299
299
  f.value = e;
300
- }, ke = (e) => {
301
- console.debug("emitUpdateEmailField, цепочка такая: profileEmailDialog -> DialogManager -> PEditUserContact", e), u.value = e;
302
- }, Te = (e, a) => {
303
- V.value = !0, i("on-password-error", e, a);
304
- }, Ue = () => {
305
- G.value = !1, j.value = !1;
300
+ }, be = (e) => {
301
+ console.debug("emitUpdateEmailField, цепочка такая: profileEmailDialog -> DialogManager -> PEditUserContact", e), m.value = e;
302
+ }, ke = (e, a) => {
303
+ A.value = !0, u("on-password-error", e, a);
304
+ }, Te = () => {
305
+ R.value = !1, G.value = !1;
306
+ }, V = (e) => {
307
+ A.value = !0, ee.value = e.color ?? "", ae.value = e.text ?? "";
306
308
  }, x = (e) => {
307
- V.value = !0, ae.value = e.color ?? "", te.value = e.text ?? "";
308
- }, $ = (e) => {
309
309
  if (c[e] = !0, e === "firstName" || e === "lastName") {
310
310
  const a = l[e];
311
311
  a.length > 40 && (l[e] = a.slice(0, 40), console.debug(`[Input Limit] Поле '${e}' достигло 40 символов. Ввод обрезан.`));
312
312
  }
313
- }, Be = (e) => {
314
- var O, z;
313
+ }, Ue = (e) => {
314
+ var $, L;
315
315
  if (S.value = "", !e) {
316
- ne();
316
+ re();
317
317
  return;
318
318
  }
319
- const a = ((O = e.fileBinary) == null ? void 0 : O.type) ?? "", t = ((z = e.fileBinary) == null ? void 0 : z.size) ?? 0, P = !["image/png", "image/jpeg"].includes(a), N = t > o.uploadLimit;
319
+ const a = (($ = e.fileBinary) == null ? void 0 : $.type) ?? "", t = ((L = e.fileBinary) == null ? void 0 : L.size) ?? 0, P = !["image/png", "image/jpeg"].includes(a), N = t > o.uploadLimit;
320
320
  if (P || N) {
321
- S.value = "Файл не подходит. Пожалуйста, загрузите PNG или JPEG размером до 10 МБ", ne();
321
+ S.value = "Файл не подходит. Пожалуйста, загрузите PNG или JPEG размером до 10 МБ", re();
322
322
  return;
323
323
  }
324
324
  o.value = e, o.imageBinary = e.fileBinary ?? null, o.imageContent = e.fileContent ?? "", C.value = !0;
325
- }, ne = () => {
325
+ }, re = () => {
326
326
  o.value = null, o.imageBinary = null, o.imageContent = "", C.value = !1;
327
- }, De = async () => {
327
+ }, Be = async () => {
328
328
  try {
329
329
  const a = (await ta("/users/profile/delete/avatar")).data;
330
330
  return (a == null ? void 0 : a.success) !== !0 ? (console.warn("Сервер не подтвердил успешное удаление аватара."), console.warn("Ответ сервера:", a), !1) : !0;
@@ -333,17 +333,17 @@ const ra = {
333
333
  }
334
334
  }, Fe = () => {
335
335
  o.value = null, o.imageBinary = null, o.imageContent = "", C.value = !1;
336
- }, se = async (e, a, t = "image/png") => {
336
+ }, ne = async (e, a, t = "image/png") => {
337
337
  if (!e) return null;
338
338
  const P = await (await fetch(e)).blob();
339
339
  return new File([P], a, { type: t });
340
- }, Ie = () => {
340
+ }, De = () => {
341
341
  o.value = null, o.imageBinary = null, o.imageContent = "", C.value = !1;
342
- }, Se = async (e) => {
342
+ }, Ie = async (e) => {
343
343
  C.value = !1;
344
344
  const a = o.imageContent;
345
345
  if (o.imageContent = e, !o.imageBinary) return;
346
- const t = await se(
346
+ const t = await ne(
347
347
  e,
348
348
  o.imageBinary.name,
349
349
  o.imageBinary.type || "image/png"
@@ -354,39 +354,39 @@ const ra = {
354
354
  }
355
355
  try {
356
356
  o.loading = !0;
357
- const w = new FormData();
358
- w.append("file", t), await H(`/users/profile/avatar/${E.value}`, w, { headers: { "Content-Type": void 0 } });
359
- } catch (w) {
360
- console.error(w), x({
357
+ const E = new FormData();
358
+ E.append("file", t), await Z(`/users/profile/avatar/${y.value}`, E, { headers: { "Content-Type": void 0 } });
359
+ } catch (E) {
360
+ console.error(E), V({
361
361
  color: "error",
362
362
  text: p("Не удалось сохранить изменения. Попробуйте позже")
363
363
  }), o.imageContent = a;
364
364
  } finally {
365
365
  o.loading = !1;
366
366
  }
367
- }, Ae = async (e) => {
368
- o.imageContent = e ?? "", o.imageBinary && (o.imageBinary = await se(
367
+ }, Se = async (e) => {
368
+ o.imageContent = e ?? "", o.imageBinary && (o.imageBinary = await ne(
369
369
  e ?? "",
370
370
  o.imageBinary.name,
371
371
  o.imageBinary.type || "image/png"
372
372
  ));
373
- }, le = h(!1), ie = async (e) => {
374
- var t, w;
373
+ }, se = h(!1), le = async (e) => {
374
+ var t, E;
375
375
  const a = (t = l[e]) == null ? void 0 : t.trim();
376
376
  if (a)
377
377
  try {
378
- le.value = !0;
379
- const N = (w = (await H("/users/profile/update-name", { [e]: a })).data) == null ? void 0 : w.data;
380
- N != null && N.user && (l.firstName = N.user.firstName ?? l.firstName, l.lastName = N.user.lastName ?? l.lastName, d.value = {
378
+ se.value = !0;
379
+ const N = (E = (await Z("/users/profile/update-name", { [e]: a })).data) == null ? void 0 : E.data;
380
+ N != null && N.user && (l.firstName = N.user.firstName ?? l.firstName, l.lastName = N.user.lastName ?? l.lastName, i.value = {
381
381
  firstName: l.firstName,
382
382
  lastName: l.lastName
383
383
  });
384
384
  } catch (P) {
385
385
  throw P;
386
386
  } finally {
387
- le.value = !1;
387
+ se.value = !1;
388
388
  }
389
- }, Ve = async () => {
389
+ }, Ae = async () => {
390
390
  var e;
391
391
  if (!r.accessToken)
392
392
  throw console.error("Access token не передан в props"), new Error("Access token is required");
@@ -399,29 +399,29 @@ const ra = {
399
399
  if (!t)
400
400
  throw console.error("Данные пользователя отсутствуют в ответе сервера"), new Error("User data is missing from the response");
401
401
  const {
402
- userId: w,
402
+ userId: E,
403
403
  privateFirstName: P,
404
404
  privateLastName: N,
405
- email: O,
406
- phoneNumber: z
405
+ email: $,
406
+ phoneNumber: L
407
407
  } = t;
408
- E.value = w ?? "", l.firstName = P ?? "", l.lastName = N ?? "", u.value = O ?? "", f.value = z ?? "", o.imageContent = await xe(), d.value = {
408
+ y.value = E ?? "", l.firstName = P ?? "", l.lastName = N ?? "", m.value = $ ?? "", f.value = L ?? "", o.imageContent = await Ve(), i.value = {
409
409
  firstName: P ?? "",
410
410
  lastName: N ?? ""
411
411
  };
412
412
  } catch (a) {
413
413
  console.error("Критическая ошибка при загрузке профиля:", a);
414
414
  }
415
- }, xe = async () => {
415
+ }, Ve = async () => {
416
416
  var e;
417
417
  try {
418
418
  const t = (e = (await aa("/users/profile/avatar")).data) == null ? void 0 : e.data;
419
- return t ? $e(t) : (console.warn("Метаданные аватара отсутствуют в ответе."), "");
419
+ return t ? xe(t) : (console.warn("Метаданные аватара отсутствуют в ответе."), "");
420
420
  } catch (a) {
421
421
  return console.error("Ошибка при загрузке метаданных аватара:", a), "";
422
422
  }
423
423
  };
424
- function $e(e) {
424
+ function xe(e) {
425
425
  if (!e)
426
426
  return "";
427
427
  try {
@@ -430,49 +430,46 @@ const ra = {
430
430
  return console.error("Ошибка при составлении URL аватара:", a), "";
431
431
  }
432
432
  }
433
- de(
434
- () => [l.firstName, l.lastName],
435
- ([e, a]) => {
436
- const t = e.trim(), w = a.trim(), P = t !== d.value.firstName.trim() || w !== d.value.lastName.trim(), N = t.length >= 2 && w.length >= 2;
437
- A.value = P && N;
438
- },
439
- { immediate: !0 }
440
- );
441
- const Oe = async () => {
442
- if (A.value)
433
+ const ie = T(() => {
434
+ if (!i.value.firstName && !i.value.lastName)
435
+ return !1;
436
+ const e = l.firstName.trim(), a = l.lastName.trim(), t = i.value.firstName.trim(), E = i.value.lastName.trim(), P = e !== t || a !== E, N = e.length >= 2 && a.length >= 2;
437
+ return P && N;
438
+ }), $e = async () => {
439
+ if (ie.value)
443
440
  try {
444
- await Promise.all([ie("firstName"), ie("lastName")]), A.value = !1, i("on-update-jwt"), x({ color: "success", text: "Изменения сохранены" });
441
+ await Promise.all([le("firstName"), le("lastName")]), u("on-update-jwt"), V({ color: "success", text: "Изменения сохранены" });
445
442
  } catch (e) {
446
- console.error(e), x({
443
+ console.error(e), V({
447
444
  color: "error",
448
445
  text: p("Не удалось сохранить изменения. Попробуйте позже")
449
446
  });
450
447
  }
451
- }, ze = () => {
452
- q(), i("open-password-dialog");
448
+ }, Le = () => {
449
+ j(), u("open-password-dialog");
453
450
  };
454
451
  return Ge(async () => {
455
452
  if (!r.accessToken) throw new Error("Access token не передан в props");
456
453
  if (!r.requestUrl) throw new Error("auth-backend url не передан в props");
457
- ea(r.accessToken, r.requestUrl), await Ve();
458
- }), (e, a) => (y(), k(ce, null, [
454
+ ea(r.accessToken, r.requestUrl), await Ae();
455
+ }), (e, a) => (w(), k(de, null, [
459
456
  g(na, {
460
457
  language: v.value,
461
458
  provider: e.provider,
462
- onCleanInputErrors: Ue,
463
- onOnUpdateJwt: Pe,
464
- onUpdatePhoneField: be,
465
- onUpdateEmailField: ke,
466
- onOnPasswordError: Te,
467
- onOnToast: x
459
+ onCleanInputErrors: Te,
460
+ onOnUpdateJwt: Ce,
461
+ onUpdatePhoneField: Pe,
462
+ onUpdateEmailField: be,
463
+ onOnPasswordError: ke,
464
+ onOnToast: V
468
465
  }, null, 8, ["language", "provider"]),
469
- Y("div", sa, [
470
- B("avatar") ? (y(), I(m(Ye), {
466
+ _("div", sa, [
467
+ B("avatar") ? (w(), I(d(Ye), {
471
468
  key: 0,
472
469
  modelValue: o.value,
473
470
  "onUpdate:modelValue": [
474
471
  a[0] || (a[0] = (t) => o.value = t),
475
- a[1] || (a[1] = (t) => Be(t))
472
+ a[1] || (a[1] = (t) => Ue(t))
476
473
  ],
477
474
  type: "img",
478
475
  class: "avatar-input",
@@ -481,60 +478,60 @@ const ra = {
481
478
  loading: o.loading,
482
479
  label: p("Загрузить фото"),
483
480
  "upload-limit": o.uploadLimit,
484
- onDelete: De,
481
+ onDelete: Be,
485
482
  "onChange:error": Fe
486
483
  }, {
487
- afterLoadLabel: D(() => [
488
- W(F(ye.value), 1)
484
+ afterLoadLabel: F(() => [
485
+ Y(D(we.value), 1)
489
486
  ]),
490
- subtext: D(() => [
491
- S.value ? (y(), k("span", la, F(S.value), 1)) : (y(), k("span", ia, F(`${p("Формат")} ${m(Xe)(o.accept).join(", ")} ${p("до")} ${m(He)(o.uploadLimit)}`), 1))
487
+ subtext: F(() => [
488
+ S.value ? (w(), k("span", la, D(S.value), 1)) : (w(), k("span", ia, D(`${p("Формат")} ${d(Xe)(o.accept).join(", ")} ${p("до")} ${d(He)(o.uploadLimit)}`), 1))
492
489
  ]),
493
490
  _: 1
494
491
  }, 8, ["modelValue", "src", "accept", "loading", "label", "upload-limit"])) : b("", !0),
495
- B("firstName") ? (y(), k("div", ua, [
496
- g(m(L), {
492
+ B("firstName") ? (w(), k("div", ua, [
493
+ g(d(O), {
497
494
  modelValue: l.firstName,
498
495
  "onUpdate:modelValue": a[2] || (a[2] = (t) => l.firstName = t),
499
496
  size: "large",
500
497
  label: p("Имя"),
501
- error: fe.value,
498
+ error: pe.value,
502
499
  onBlur: a[3] || (a[3] = (t) => c.firstName = !0),
503
- onInput: a[4] || (a[4] = (t) => $("firstName"))
500
+ onInput: a[4] || (a[4] = (t) => x("firstName"))
504
501
  }, null, 8, ["modelValue", "label", "error"]),
505
- g(m(M), { class: "icon-locked" })
502
+ g(d(z), { class: "icon-locked" })
506
503
  ])) : b("", !0),
507
- B("lastName") ? (y(), k("div", ma, [
508
- g(m(L), {
504
+ B("lastName") ? (w(), k("div", ma, [
505
+ g(d(O), {
509
506
  modelValue: l.lastName,
510
507
  "onUpdate:modelValue": a[5] || (a[5] = (t) => l.lastName = t),
511
508
  size: "large",
512
509
  label: p("Фамилия"),
513
- error: ge.value,
510
+ error: fe.value,
514
511
  onBlur: a[6] || (a[6] = (t) => c.lastName = !0),
515
- onInput: a[7] || (a[7] = (t) => $("lastName"))
512
+ onInput: a[7] || (a[7] = (t) => x("lastName"))
516
513
  }, null, 8, ["modelValue", "label", "error"]),
517
- g(m(M), { class: "icon-locked" })
514
+ g(d(z), { class: "icon-locked" })
518
515
  ])) : b("", !0),
519
- B("email") ? (y(), k("div", da, [
520
- g(m(L), {
521
- modelValue: u.value,
522
- "onUpdate:modelValue": a[8] || (a[8] = (t) => u.value = t),
516
+ B("email") ? (w(), k("div", da, [
517
+ g(d(O), {
518
+ modelValue: m.value,
519
+ "onUpdate:modelValue": a[8] || (a[8] = (t) => m.value = t),
523
520
  size: "large",
524
521
  "text-size": "medium",
525
522
  label: "E-mail",
526
523
  type: "email",
527
524
  readonly: "",
528
525
  style: { cursor: "pointer" },
529
- error: ve.value && j.value,
526
+ error: ge.value && G.value,
530
527
  onBlur: a[9] || (a[9] = (t) => c.email = !0),
531
- onInput: a[10] || (a[10] = (t) => $("email")),
532
- onClick: Ne
528
+ onInput: a[10] || (a[10] = (t) => x("email")),
529
+ onClick: Ee
533
530
  }, null, 8, ["modelValue", "error"]),
534
- g(m(M), { class: "icon-locked" })
531
+ g(d(z), { class: "icon-locked" })
535
532
  ])) : b("", !0),
536
- B("phone") ? (y(), k("div", ca, [
537
- g(m(L), {
533
+ B("phone") ? (w(), k("div", ca, [
534
+ g(d(O), {
538
535
  modelValue: f.value,
539
536
  "onUpdate:modelValue": a[11] || (a[11] = (t) => f.value = t),
540
537
  size: "large",
@@ -543,75 +540,75 @@ const ra = {
543
540
  type: "tel",
544
541
  readonly: "",
545
542
  style: { cursor: "pointer" },
546
- error: he.value && G.value,
543
+ error: ve.value && R.value,
547
544
  onBlur: a[12] || (a[12] = (t) => c.phone = !0),
548
- onInput: a[13] || (a[13] = (t) => $("phone")),
549
- onClick: Ce
545
+ onInput: a[13] || (a[13] = (t) => x("phone")),
546
+ onClick: Ne
550
547
  }, null, 8, ["modelValue", "label", "error"]),
551
- g(m(M), { class: "icon-locked" })
548
+ g(d(z), { class: "icon-locked" })
552
549
  ])) : b("", !0),
553
- Y("div", pa, [
554
- we.value ? (y(), I(m(me), {
550
+ _("div", pa, [
551
+ he.value ? (w(), I(d(me), {
555
552
  key: 0,
556
553
  color: "secondary",
557
- onClick: ze
554
+ onClick: Le
558
555
  }, {
559
- default: D(() => [
560
- W(F(p("Сменить пароль")), 1)
556
+ default: F(() => [
557
+ Y(D(p("Сменить пароль")), 1)
561
558
  ]),
562
559
  _: 1
563
560
  })) : b("", !0),
564
- g(m(me), {
565
- disabled: !A.value,
566
- onClick: Oe
561
+ g(d(me), {
562
+ disabled: !ie.value,
563
+ onClick: $e
567
564
  }, {
568
- default: D(() => [
569
- W(F(p("Сохранить")), 1)
565
+ default: F(() => [
566
+ Y(D(p("Сохранить")), 1)
570
567
  ]),
571
568
  _: 1
572
569
  }, 8, ["disabled"])
573
570
  ])
574
571
  ]),
575
- C.value ? (y(), I(ue, {
572
+ C.value ? (w(), I(ue, {
576
573
  key: 0,
577
574
  to: "body"
578
575
  }, [
579
- C.value ? (y(), k("div", fa, [
580
- g(m(We), {
576
+ C.value ? (w(), k("div", fa, [
577
+ g(d(We), {
581
578
  "circle-mode": !0,
582
579
  "model-value": o.imageContent,
583
- onClose: Ie,
584
- onSave: a[14] || (a[14] = (t) => Se(t)),
585
- "onUpdate:modelValue": a[15] || (a[15] = (t) => Ae(t))
580
+ onClose: De,
581
+ onSave: a[14] || (a[14] = (t) => Ie(t)),
582
+ "onUpdate:modelValue": a[15] || (a[15] = (t) => Se(t))
586
583
  }, null, 8, ["model-value"])
587
584
  ])) : b("", !0)
588
585
  ])) : b("", !0),
589
- (y(), I(ue, { to: "#toast-root" }, [
590
- Y("div", ga, [
586
+ (w(), I(ue, { to: "#toast-root" }, [
587
+ _("div", ga, [
591
588
  g(je, { name: "list" }, {
592
- default: D(() => [
593
- qe(g(m(Ke), {
589
+ default: F(() => [
590
+ qe(g(d(Ke), {
594
591
  class: "toast",
595
- color: ae.value,
596
- text: te.value,
597
- onClose: a[16] || (a[16] = (t) => V.value = !1)
592
+ color: ee.value,
593
+ text: ae.value,
594
+ onClose: a[16] || (a[16] = (t) => A.value = !1)
598
595
  }, null, 8, ["color", "text"]), [
599
- [Je, V.value]
596
+ [Je, A.value]
600
597
  ])
601
598
  ]),
602
599
  _: 1
603
600
  })
604
601
  ])
605
602
  ])),
606
- g(m(pe))
603
+ g(d(ce))
607
604
  ], 64));
608
605
  }
609
606
  }), ha = (s, n) => {
610
607
  const r = s.__vccOpts || s;
611
- for (const [i, v] of n)
612
- r[i] = v;
608
+ for (const [u, v] of n)
609
+ r[u] = v;
613
610
  return r;
614
- }, wa = /* @__PURE__ */ ha(va, [["__scopeId", "data-v-20e48116"]]), ba = /* @__PURE__ */ Q({
611
+ }, wa = /* @__PURE__ */ ha(va, [["__scopeId", "data-v-965c8738"]]), ba = /* @__PURE__ */ H({
615
612
  __name: "index",
616
613
  props: {
617
614
  throttlerPrefix: {},
@@ -625,32 +622,32 @@ const ra = {
625
622
  },
626
623
  emits: ["on-update-jwt", "update-tokens"],
627
624
  setup(s, { emit: n }) {
628
- const r = n, { openDialog: i } = ee(), v = (d, c) => {
629
- i("email", { initialEmail: d, mode: c });
630
- }, p = (d, c) => {
631
- i("phone", { initialPhone: d, mode: c });
625
+ const r = n, { openDialog: u } = X(), v = (i, c) => {
626
+ u("email", { initialEmail: i, mode: c });
627
+ }, p = (i, c) => {
628
+ u("phone", { initialPhone: i, mode: c });
632
629
  }, U = () => {
633
- i("password");
634
- }, l = (d, c, E) => {
635
- r("on-update-jwt", d, c, E);
630
+ u("password");
631
+ }, l = (i, c, y) => {
632
+ r("on-update-jwt", i, c, y);
636
633
  };
637
- return (d, c) => (y(), k(ce, null, [
638
- g(m(Ze)),
634
+ return (i, c) => (w(), k(de, null, [
635
+ g(d(Ze)),
639
636
  g(wa, {
640
- "throttler-prefix": d.throttlerPrefix,
641
- provider: d.provider,
642
- "request-url": d.requestUrl,
643
- language: d.language,
644
- fields: d.fields,
645
- "access-token": d.accessToken,
646
- "refresh-token": d.refreshToken,
647
- "aws-storage-url": d.awsStorageUrl,
637
+ "throttler-prefix": i.throttlerPrefix,
638
+ provider: i.provider,
639
+ "request-url": i.requestUrl,
640
+ language: i.language,
641
+ fields: i.fields,
642
+ "access-token": i.accessToken,
643
+ "refresh-token": i.refreshToken,
644
+ "aws-storage-url": i.awsStorageUrl,
648
645
  onOpenEmailDialog: v,
649
646
  onOpenPhoneDialog: p,
650
647
  onOpenPasswordDialog: U,
651
648
  onOnUpdateJwt: l
652
649
  }, null, 8, ["throttler-prefix", "provider", "request-url", "language", "fields", "access-token", "refresh-token", "aws-storage-url"]),
653
- g(m(pe))
650
+ g(d(ce))
654
651
  ], 64));
655
652
  }
656
653
  });
@@ -660,6 +657,6 @@ export {
660
657
  ha as _,
661
658
  ba as a,
662
659
  aa as g,
663
- H as p,
660
+ Z as p,
664
661
  ra as t
665
662
  };