@snabcentr/common-lib 2.25.0 → 2.25.2

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,12 +1,12 @@
1
- var dt = Object.defineProperty;
2
- var $t = (i, r, e) => r in i ? dt(i, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[r] = e;
3
- var s = (i, r, e) => $t(i, typeof r != "symbol" ? r + "" : r, e);
1
+ var $t = Object.defineProperty;
2
+ var kt = (n, r, e) => r in n ? $t(n, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[r] = e;
3
+ var s = (n, r, e) => kt(n, typeof r != "symbol" ? r + "" : r, e);
4
4
  import { jwtDecode as Kr } from "jwt-decode";
5
- import { merge as Ne, isNil as m, isEmpty as J, noop as T, mapValues as Xr, isArray as z, every as kt, split as Ot, startsWith as Lt, endsWith as It, includes as xt, isString as D, isFunction as Ar, map as De, isObject as Qe, isDate as Ve, isError as _r, toLower as _t, isPlainObject as Nt, isUndefined as He, constant as qt, toUpper as Et, cloneDeep as Ut, forEach as Ft, round as Mt, omitBy as Zr } from "lodash-es";
5
+ import { merge as Ne, isNil as m, isEmpty as J, noop as T, mapValues as Xr, isArray as W, every as Ot, split as Lt, startsWith as Zr, endsWith as It, includes as xt, isString as R, isFunction as br, map as De, isObject as Ve, isDate as Je, isError as _r, toLower as _t, isPlainObject as Nt, isUndefined as He, constant as qt, toUpper as Et, cloneDeep as Ut, forEach as Ft, round as Mt, omitBy as et } from "lodash-es";
6
6
  import { objectToCamel as Sr, objectToSnake as Ht } from "ts-case-convert";
7
7
  import { defineStore as ne } from "pinia";
8
- import { ref as v, markRaw as Bt, computed as b } from "vue";
9
- import { isAfter as Nr, parseISO as C, startOfToday as qe, format as k, endOfMonth as x, addMonths as $, differenceInCalendarMonths as Wt, startOfMonth as E, getDate as qr, getDaysInMonth as zt, endOfDay as W, startOfDay as ge, setDate as jt, startOfWeek as ee, addWeeks as ar, differenceInCalendarDays as We, addDays as re, isValid as Gt, subDays as ze, addBusinessDays as Yt, startOfYear as ue, endOfYear as de, endOfWeek as $e, endOfTomorrow as Qt, startOfTomorrow as Vt, endOfYesterday as Jt, startOfYesterday as Kt, endOfToday as Xt, startOfQuarter as ke, endOfQuarter as Be, addYears as sr, addQuarters as ir, subYears as nr, subQuarters as or, subMonths as cr, subWeeks as Er, addSeconds as Zt } from "date-fns";
8
+ import { ref as w, markRaw as Bt, computed as A } from "vue";
9
+ import { isAfter as Nr, parseISO as C, startOfToday as qe, format as k, endOfMonth as x, addMonths as $, differenceInCalendarMonths as zt, startOfMonth as E, getDate as qr, getDaysInMonth as Wt, endOfDay as z, startOfDay as ge, setDate as jt, startOfWeek as ee, addWeeks as ar, differenceInCalendarDays as We, addDays as re, isValid as Gt, subDays as je, addBusinessDays as Yt, startOfYear as ue, endOfYear as de, endOfWeek as $e, endOfTomorrow as Qt, startOfTomorrow as Vt, endOfYesterday as Jt, startOfYesterday as Kt, endOfToday as Xt, startOfQuarter as ke, endOfQuarter as Be, addYears as ir, addQuarters as nr, subYears as or, subQuarters as cr, subMonths as lr, subWeeks as Er, addSeconds as Zt } from "date-fns";
10
10
  import es, { CanceledError as rs } from "axios";
11
11
  class Te {
12
12
  /**
@@ -111,7 +111,7 @@ class Te {
111
111
  return t.resourceAccess = e.resource_access, t;
112
112
  }
113
113
  }
114
- class et extends Te {
114
+ class rt extends Te {
115
115
  /**
116
116
  * Инициализирует экземпляр класса {@link DetailedJwtPayload}.
117
117
  *
@@ -151,8 +151,8 @@ class et extends Te {
151
151
  * @param jwtToken JWT-ключ доступа.
152
152
  */
153
153
  static getJwtPayload(e) {
154
- const t = Kr(e), n = new et(Sr(t));
155
- return n.resourceAccess = t.resource_access, n;
154
+ const t = Kr(e), i = new rt(Sr(t));
155
+ return i.resourceAccess = t.resource_access, i;
156
156
  }
157
157
  }
158
158
  class ts {
@@ -230,7 +230,7 @@ class is {
230
230
  * Дополнительные параметры.
231
231
  */
232
232
  s(this, "additionalParams");
233
- var e, t, n, o;
233
+ var e, t, i, o;
234
234
  this.dsn = (r == null ? void 0 : r.dsn) ?? "", this.environment = (r == null ? void 0 : r.environment) ?? "production", this.ignoreErrors = (r == null ? void 0 : r.ignoreErrors) ?? [
235
235
  /Network\s{1,3}Error/,
236
236
  /Request\s{1,3}aborted/,
@@ -239,7 +239,7 @@ class is {
239
239
  allowedTargets: ((e = r == null ? void 0 : r.trace) == null ? void 0 : e.allowedTargets) ?? [/^\//],
240
240
  sampleRate: ((t = r == null ? void 0 : r.trace) == null ? void 0 : t.sampleRate) ?? 0
241
241
  }, this.replay = {
242
- replaysOnErrorSampleRate: ((n = r == null ? void 0 : r.replay) == null ? void 0 : n.replaysOnErrorSampleRate) ?? 0,
242
+ replaysOnErrorSampleRate: ((i = r == null ? void 0 : r.replay) == null ? void 0 : i.replaysOnErrorSampleRate) ?? 0,
243
243
  replaysSessionSampleRate: ((o = r == null ? void 0 : r.replay) == null ? void 0 : o.replaysSessionSampleRate) ?? 0
244
244
  }, this.additionalParams = (r == null ? void 0 : r.additionalParams) ?? {};
245
245
  }
@@ -326,41 +326,41 @@ class os {
326
326
  * @inheritDoc
327
327
  */
328
328
  s(this, "dateFormats");
329
- var e, t, n;
329
+ var e, t, i;
330
330
  this.environment = (r == null ? void 0 : r.environment) ?? "production", this.devMode = (r == null ? void 0 : r.devMode) ?? {}, this.http = new ss(r == null ? void 0 : r.http), this.deviceTypeByResolution = new ts(r == null ? void 0 : r.deviceTypeByResolution), this.sentry = new is({
331
331
  environment: this.environment,
332
332
  ...r == null ? void 0 : r.sentry
333
333
  }), this.tableDefaultHeightCoefficient = (r == null ? void 0 : r.tableDefaultHeightCoefficient) ?? 0.7, this.urls = r == null ? void 0 : r.urls, this.websocket = r != null && r.websocket ? new ns(r.websocket) : void 0, this.dateFormats = {
334
334
  api: ((e = r == null ? void 0 : r.dateFormats) == null ? void 0 : e.api) ?? "yyyy-MM-dd HH:mm:ss",
335
335
  uiDate: ((t = r == null ? void 0 : r.dateFormats) == null ? void 0 : t.uiDate) ?? "dd.MM.yyyy",
336
- uiDateWithTime: ((n = r == null ? void 0 : r.dateFormats) == null ? void 0 : n.uiDateWithTime) ?? "dd.MM.yyyy HH:mm"
336
+ uiDateWithTime: ((i = r == null ? void 0 : r.dateFormats) == null ? void 0 : i.uiDateWithTime) ?? "dd.MM.yyyy HH:mm"
337
337
  };
338
338
  }
339
339
  }
340
340
  const O = ne("common.config", () => {
341
- const i = v(new os());
341
+ const n = w(new os());
342
342
  return {
343
343
  /**
344
344
  * Конфигурационные данные приложения.
345
345
  */
346
- config: i,
346
+ config: n,
347
347
  /**
348
348
  * Получает конфигурацию приложения.
349
349
  *
350
350
  * @returns Конфигурация приложения.
351
351
  */
352
- getConfig: () => i.value,
352
+ getConfig: () => n.value,
353
353
  /**
354
354
  * Устанавливает конфигурацию приложения.
355
355
  *
356
356
  * @param appConfig Конфигурация приложения.
357
357
  */
358
358
  setConfig: (t) => {
359
- i.value = Ne(i.value, t);
359
+ n.value = Ne(n.value, t);
360
360
  }
361
361
  };
362
362
  });
363
- class je {
363
+ class Ge {
364
364
  /**
365
365
  * Возвращает актуальные и не просроченные данные из хранилища.
366
366
  *
@@ -405,14 +405,14 @@ class je {
405
405
  try {
406
406
  if (m(e) || J(e))
407
407
  throw new Error("Data is empty");
408
- const n = JSON.stringify({
408
+ const i = JSON.stringify({
409
409
  availableFor: t,
410
410
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
411
411
  data: e
412
412
  });
413
- localStorage.setItem(r, n);
414
- } catch (n) {
415
- if (n instanceof DOMException && n.code === DOMException.QUOTA_EXCEEDED_ERR) {
413
+ localStorage.setItem(r, i);
414
+ } catch (i) {
415
+ if (i instanceof DOMException && i.code === DOMException.QUOTA_EXCEEDED_ERR) {
416
416
  this.clearOldData();
417
417
  try {
418
418
  const o = JSON.stringify({
@@ -451,9 +451,9 @@ class je {
451
451
  const t = localStorage.key(e);
452
452
  if (t)
453
453
  try {
454
- const n = localStorage.getItem(t);
455
- if (n) {
456
- const o = JSON.parse(n);
454
+ const i = localStorage.getItem(t);
455
+ if (i) {
456
+ const o = JSON.parse(i);
457
457
  o.availableFor && !Nr(C(o.availableFor) || qe(), /* @__PURE__ */ new Date()) && r.push(t);
458
458
  }
459
459
  } catch {
@@ -470,19 +470,19 @@ class je {
470
470
  }
471
471
  }
472
472
  }
473
- function Ur(i) {
473
+ function Ur(n) {
474
474
  try {
475
- const r = Te.getJwtPayload(i);
475
+ const r = Te.getJwtPayload(n);
476
476
  return new Date(r.exp * 1e3);
477
477
  } catch {
478
478
  return;
479
479
  }
480
480
  }
481
481
  const pe = ne("common.auth_state_private", () => {
482
- const i = v(
482
+ const n = w(
483
483
  (() => {
484
484
  var u;
485
- const o = je.getActualDataFromStorage(
485
+ const o = Ge.getActualDataFromStorage(
486
486
  "sc.token"
487
487
  /* JwtToken */
488
488
  );
@@ -491,9 +491,9 @@ const pe = ne("common.auth_state_private", () => {
491
491
  const c = (u = O().config.devMode) == null ? void 0 : u.initAuthBearerToken;
492
492
  return c ? Promise.resolve(c) : void 0;
493
493
  })()
494
- ), r = v(void 0), e = v(void 0), t = Bt(/* @__PURE__ */ new Map());
495
- function n() {
496
- e.value = void 0, m(i.value) || i.value.then((o) => {
494
+ ), r = w(void 0), e = w(void 0), t = Bt(/* @__PURE__ */ new Map());
495
+ function i() {
496
+ e.value = void 0, m(n.value) || n.value.then((o) => {
497
497
  const c = Te.getJwtPayload(o);
498
498
  e.value = c.exp * 1e3 > Date.now() ? Xr(c.resourceAccess, (u) => (u == null ? void 0 : u.roles) ?? []) : void 0;
499
499
  }).catch(T);
@@ -502,7 +502,7 @@ const pe = ne("common.auth_state_private", () => {
502
502
  /**
503
503
  * {@link Promise<string>} для получения jwt-ключа доступа к системам.
504
504
  */
505
- jwtToken: i,
505
+ jwtToken: n,
506
506
  /**
507
507
  * Функция для обновления jwt-ключа доступа к системам.
508
508
  */
@@ -518,15 +518,15 @@ const pe = ne("common.auth_state_private", () => {
518
518
  /**
519
519
  * Принудительно пересчитывает права доступа пользователя на основе текущего JWT токена.
520
520
  */
521
- recalculateUserPermissions: n
521
+ recalculateUserPermissions: i
522
522
  };
523
- }), lr = ne("common.auth_state", () => {
524
- const i = b(() => {
523
+ }), ze = ne("common.auth_state", () => {
524
+ const n = A(() => {
525
525
  const o = pe();
526
526
  if (m(o.jwtToken) && !m(o.jwtTokenUpdater)) {
527
527
  const c = o.jwtTokenUpdater();
528
528
  o.jwtToken = c, c.then((u) => {
529
- o.jwtToken = Promise.resolve(u), je.saveActualDataToStorage("sc.token", u, Ur(u)), o.recalculateUserPermissions();
529
+ o.jwtToken = Promise.resolve(u), Ge.saveActualDataToStorage("sc.token", u, Ur(u)), o.recalculateUserPermissions();
530
530
  }).catch(T);
531
531
  }
532
532
  return o.jwtToken;
@@ -536,31 +536,31 @@ const pe = ne("common.auth_state_private", () => {
536
536
  }
537
537
  function e(o) {
538
538
  const c = pe();
539
- c.jwtToken = Promise.resolve(o), je.saveActualDataToStorage("sc.token", o, Ur(o)), c.recalculateUserPermissions();
539
+ c.jwtToken = Promise.resolve(o), Ge.saveActualDataToStorage("sc.token", o, Ur(o)), c.recalculateUserPermissions();
540
540
  }
541
541
  function t() {
542
542
  const o = pe();
543
- o.jwtToken = void 0, o.userPermissions = void 0, je.saveActualDataToStorage("sc.token", void 0);
543
+ o.jwtToken = void 0, o.userPermissions = void 0, Ge.saveActualDataToStorage("sc.token", void 0);
544
544
  }
545
- function n(o) {
545
+ function i(o) {
546
546
  const c = pe();
547
547
  !m(c.jwtToken) && m(c.userPermissions) && c.jwtToken.then((g) => {
548
548
  const a = Te.getJwtPayload(g);
549
549
  c.userPermissions = a.exp * 1e3 > Date.now() ? Xr(a.resourceAccess, (P) => (P == null ? void 0 : P.roles) ?? []) : void 0;
550
550
  }).catch(T);
551
- const u = z(o) ? o.join(" && ") : o;
551
+ const u = W(o) ? o.join(" && ") : o;
552
552
  if (c.userPermissionsComputedRefs.has(u))
553
553
  return c.userPermissionsComputedRefs.get(u);
554
- const p = b(() => {
554
+ const p = A(() => {
555
555
  const g = (a) => {
556
556
  var le;
557
- const P = Ot(a, ".");
557
+ const P = Lt(a, ".");
558
558
  if (P.length < 2)
559
559
  return !1;
560
- const [Ae, Se] = P, ce = (le = pe().userPermissions) == null ? void 0 : le[Ae];
561
- return z(ce) && ce.includes(Se);
560
+ const [be, Se] = P, ce = (le = pe().userPermissions) == null ? void 0 : le[be];
561
+ return W(ce) && ce.includes(Se);
562
562
  };
563
- return z(o) ? kt(o, (a) => g(a)) : g(o);
563
+ return W(o) ? Ot(o, (a) => g(a)) : g(o);
564
564
  });
565
565
  return c.userPermissionsComputedRefs.set(u, p), p;
566
566
  }
@@ -568,7 +568,7 @@ const pe = ne("common.auth_state_private", () => {
568
568
  /**
569
569
  * {@link Promise<string>} для получения jwt-ключа доступа к системам.
570
570
  */
571
- jwtToken: i,
571
+ jwtToken: n,
572
572
  /**
573
573
  * Устанавливает механизм для обновления jwt-ключа доступа к системам.
574
574
  *
@@ -590,10 +590,10 @@ const pe = ne("common.auth_state_private", () => {
590
590
  *
591
591
  * @param name Проверяемое право доступа или их список. Должны быть представлены в виде значения: <РЕСУРС>.<РОЛЬ>.
592
592
  */
593
- hasUserPermission: n
593
+ hasUserPermission: i
594
594
  };
595
595
  });
596
- var Ge = /* @__PURE__ */ ((i) => (i.Image = "image", i.Video = "video", i))(Ge || {});
596
+ var Ye = /* @__PURE__ */ ((n) => (n.Image = "image", n.Video = "video", n))(Ye || {});
597
597
  class G {
598
598
  /**
599
599
  * Инициализирует экземпляр класса {@link Identity}.
@@ -619,7 +619,7 @@ class G {
619
619
  return typeof this.id == "number" ? this.id === -1 : typeof this.id == "string" ? this.id === "" : m(this.id);
620
620
  }
621
621
  }
622
- class wr extends G {
622
+ class vr extends G {
623
623
  /**
624
624
  * Инициализирует экземпляр класса {@link BlogPostMediaFile}.
625
625
  *
@@ -647,22 +647,22 @@ class wr extends G {
647
647
  * @inheritDoc
648
648
  */
649
649
  s(this, "urlWebp");
650
- this.mediaType = (e == null ? void 0 : e.mediaType) ?? Ge.Image, this.isCover = (e == null ? void 0 : e.isCover) ?? !1, this.isUnused = (e == null ? void 0 : e.isUnused) ?? !1, this.url = (e == null ? void 0 : e.url) ?? "", this.urlWebp = e == null ? void 0 : e.urlWebp;
650
+ this.mediaType = (e == null ? void 0 : e.mediaType) ?? Ye.Image, this.isCover = (e == null ? void 0 : e.isCover) ?? !1, this.isUnused = (e == null ? void 0 : e.isUnused) ?? !1, this.url = (e == null ? void 0 : e.url) ?? "", this.urlWebp = e == null ? void 0 : e.urlWebp;
651
651
  }
652
652
  /**
653
653
  * Возвращает признак того, что медиафайл является изображением.
654
654
  */
655
655
  isImage() {
656
- return this.mediaType === Ge.Image;
656
+ return this.mediaType === Ye.Image;
657
657
  }
658
658
  /**
659
659
  * Возвращает признак того, что медиафайл является видео.
660
660
  */
661
661
  isVideo() {
662
- return this.mediaType === Ge.Video;
662
+ return this.mediaType === Ye.Video;
663
663
  }
664
664
  }
665
- var Ye = /* @__PURE__ */ ((i) => (i.Draft = "draft", i.Published = "published", i.Scheduled = "scheduled", i))(Ye || {});
665
+ var Qe = /* @__PURE__ */ ((n) => (n.Draft = "draft", n.Published = "published", n.Scheduled = "scheduled", n))(Qe || {});
666
666
  class ae extends G {
667
667
  /**
668
668
  * Инициализирует экземпляр класса {@link BlogPostShortInfo}.
@@ -695,7 +695,7 @@ class ae extends G {
695
695
  * @param publishedAt Дата и время публикации статьи.
696
696
  */
697
697
  static resolvePublicationStatus(e) {
698
- return m(e) ? Ye.Draft : e.getTime() > Date.now() ? Ye.Scheduled : Ye.Published;
698
+ return m(e) ? Qe.Draft : e.getTime() > Date.now() ? Qe.Scheduled : Qe.Published;
699
699
  }
700
700
  /**
701
701
  * Возвращает описание ошибки символьного обозначения статьи либо пустую строку,
@@ -707,7 +707,7 @@ class ae extends G {
707
707
  * @param slug Символьное обозначение статьи.
708
708
  */
709
709
  static getSlugError(e) {
710
- return e ? /[^a-z0-9-]/.test(e) ? "Допустимы только строчные латинские буквы, цифры и дефис: пример «kak-vybrat-podokonnik»." : Lt(e, "-") || It(e, "-") ? "Обозначение не может начинаться или заканчиваться дефисом." : xt(e, "--") ? "Дефисы не могут идти подряд: разделяйте слова одним дефисом." : "" : "";
710
+ return e ? /[^a-z0-9-]/.test(e) ? "Допустимы только строчные латинские буквы, цифры и дефис: пример «kak-vybrat-podokonnik»." : Zr(e, "-") || It(e, "-") ? "Обозначение не может начинаться или заканчиваться дефисом." : xt(e, "--") ? "Дефисы не могут идти подряд: разделяйте слова одним дефисом." : "" : "";
711
711
  }
712
712
  /**
713
713
  * Преобразует значение даты, полученное из API, в объект {@link Date}.
@@ -715,7 +715,7 @@ class ae extends G {
715
715
  * @param value Значение даты.
716
716
  */
717
717
  static parseDate(e) {
718
- return m(e) ? null : D(e) ? C(e) : e;
718
+ return m(e) ? null : R(e) ? C(e) : e;
719
719
  }
720
720
  /**
721
721
  * Возвращает состояние публикации статьи.
@@ -740,7 +740,7 @@ class ur extends ae {
740
740
  * @inheritDoc
741
741
  */
742
742
  s(this, "media");
743
- this.content = (e == null ? void 0 : e.content) ?? "", this.media = ((e == null ? void 0 : e.media) ?? []).map((t) => new wr(t));
743
+ this.content = (e == null ? void 0 : e.content) ?? "", this.media = ((e == null ? void 0 : e.media) ?? []).map((t) => new vr(t));
744
744
  }
745
745
  /**
746
746
  * Возвращает данные статьи для отправки на портал.
@@ -781,11 +781,11 @@ class Fe {
781
781
  return Object.keys(this).forEach((e) => {
782
782
  const t = this[e];
783
783
  m(t) || // eslint-disable-next-line prettier/prettier,lodash/prefer-lodash-method
784
- D(t) && t.trim().length === 0 || Ar(t.isNewRec) && t.isNewRec() || (r[e] = t);
784
+ R(t) && t.trim().length === 0 || br(t.isNewRec) && t.isNewRec() || (r[e] = t);
785
785
  }), r;
786
786
  }
787
787
  }
788
- class A {
788
+ class b {
789
789
  /**
790
790
  * Инициализирует экземпляр класса {@link DatePeriod}.
791
791
  *
@@ -800,7 +800,7 @@ class A {
800
800
  * Окончание периода.
801
801
  */
802
802
  s(this, "to");
803
- this.from = D(r == null ? void 0 : r.from) ? C(r.from) : (r == null ? void 0 : r.from) ?? null, this.to = D(r == null ? void 0 : r.to) ? C(r.to) : (r == null ? void 0 : r.to) ?? null;
803
+ this.from = R(r == null ? void 0 : r.from) ? C(r.from) : (r == null ? void 0 : r.from) ?? null, this.to = R(r == null ? void 0 : r.to) ? C(r.to) : (r == null ? void 0 : r.to) ?? null;
804
804
  }
805
805
  }
806
806
  class Ks extends Fe {
@@ -839,7 +839,7 @@ class Ks extends Fe {
839
839
  * @inheritDoc
840
840
  */
841
841
  s(this, "createdAt");
842
- this.id = e == null ? void 0 : e.id, this.title = e == null ? void 0 : e.title, this.slug = e == null ? void 0 : e.slug, this.content = e == null ? void 0 : e.content, this.publicationStatus = e == null ? void 0 : e.publicationStatus, this.publishedAt = new A(e == null ? void 0 : e.publishedAt), this.createdAt = new A(e == null ? void 0 : e.createdAt);
842
+ this.id = e == null ? void 0 : e.id, this.title = e == null ? void 0 : e.title, this.slug = e == null ? void 0 : e.slug, this.content = e == null ? void 0 : e.content, this.publicationStatus = e == null ? void 0 : e.publicationStatus, this.publishedAt = new b(e == null ? void 0 : e.publishedAt), this.createdAt = new b(e == null ? void 0 : e.createdAt);
843
843
  }
844
844
  /**
845
845
  * Выполняет сброс указанного фильтра в значение по умолчанию.
@@ -873,12 +873,12 @@ class Ks extends Fe {
873
873
  * задачей по унификации.
874
874
  */
875
875
  asClearRaw() {
876
- var t, n, o, c;
876
+ var t, i, o, c;
877
877
  const e = super.asClearRaw();
878
- return !((t = e == null ? void 0 : e.publishedAt) != null && t.from) && !((n = e == null ? void 0 : e.publishedAt) != null && n.to) && delete e.publishedAt, !((o = e == null ? void 0 : e.createdAt) != null && o.from) && !((c = e == null ? void 0 : e.createdAt) != null && c.to) && delete e.createdAt, e;
878
+ return !((t = e == null ? void 0 : e.publishedAt) != null && t.from) && !((i = e == null ? void 0 : e.publishedAt) != null && i.to) && delete e.publishedAt, !((o = e == null ? void 0 : e.createdAt) != null && o.from) && !((c = e == null ? void 0 : e.createdAt) != null && c.to) && delete e.createdAt, e;
879
879
  }
880
880
  }
881
- var M = /* @__PURE__ */ ((i) => (i.BASE_URL_REQUEST_INTERCEPTOR = "baseUrlRequestInterceptor", i.DEFAULT_REQUEST_INTERCEPTOR = "defaultRequestInterceptor", i.AUTH_REQUEST_INTERCEPTOR = "authRequestInterceptor", i.DATA_CONVERTER_REQUEST_INTERCEPTOR = "dataConverterRequestInterceptor", i.CONVERT_HTTP_ERROR_RESPONSE_INTERCEPTOR = "convertHttpErrorResponseInterceptor", i.CANCELED_RESPONSE_INTERCEPTOR = "canceledResponseInterceptor", i.AUTH_ERRORS_RESPONSE_INTERCEPTOR = "authErrorsResponseInterceptor", i.DATA_CONVERTER_RESPONSE_INTERCEPTOR = "dataConverterResponseInterceptor", i))(M || {});
881
+ var M = /* @__PURE__ */ ((n) => (n.BASE_URL_REQUEST_INTERCEPTOR = "baseUrlRequestInterceptor", n.DEFAULT_REQUEST_INTERCEPTOR = "defaultRequestInterceptor", n.AUTH_REQUEST_INTERCEPTOR = "authRequestInterceptor", n.DATA_CONVERTER_REQUEST_INTERCEPTOR = "dataConverterRequestInterceptor", n.CONVERT_HTTP_ERROR_RESPONSE_INTERCEPTOR = "convertHttpErrorResponseInterceptor", n.CANCELED_RESPONSE_INTERCEPTOR = "canceledResponseInterceptor", n.AUTH_ERRORS_RESPONSE_INTERCEPTOR = "authErrorsResponseInterceptor", n.DATA_CONVERTER_RESPONSE_INTERCEPTOR = "dataConverterResponseInterceptor", n))(M || {});
882
882
  class _ {
883
883
  /**
884
884
  * Инициализирует экземпляр указанного класса.
@@ -906,12 +906,12 @@ class _ {
906
906
  * @throws TypeError Если вместо списка данных получены данные другого типа.
907
907
  */
908
908
  static instanceListInitializer(r, e) {
909
- if (!z(e))
909
+ if (!W(e))
910
910
  throw new TypeError(`Ожидался список данных для инициализации "${r.name}", получены данные типа "${typeof e}".`);
911
911
  return De(e, (t) => _.instanceInitializer(r, t));
912
912
  }
913
913
  }
914
- const w = class w {
914
+ const v = class v {
915
915
  /**
916
916
  * Инициализирует экземпляр класса {@link HttpRequester}.
917
917
  */
@@ -941,7 +941,7 @@ const w = class w {
941
941
  */
942
942
  // eslint-disable-next-line class-methods-use-this
943
943
  s(this, "authRequestInterceptor", async (r) => {
944
- const e = lr().jwtToken, t = m(e) ? void 0 : await e;
944
+ const e = ze().jwtToken, t = m(e) ? void 0 : await e;
945
945
  return t && r.headers.set("Authorization", `Bearer ${t}`), r;
946
946
  });
947
947
  /**
@@ -950,7 +950,7 @@ const w = class w {
950
950
  * @param request Данные запроса.
951
951
  */
952
952
  // eslint-disable-next-line class-methods-use-this
953
- s(this, "dataConverterRequestInterceptor", (r) => (r.method && (r.method === "get" && !m(r.params) && (r.params = w.toSnakeCaseData(r.params)), ["put", "patch", "post"].includes(_t(r.method)) && !m(r.data) && (r.data = w.toSnakeCaseData(r.data))), r));
953
+ s(this, "dataConverterRequestInterceptor", (r) => (r.method && (r.method === "get" && !m(r.params) && (r.params = v.toSnakeCaseData(r.params)), ["put", "patch", "post"].includes(_t(r.method)) && !m(r.data) && (r.data = v.toSnakeCaseData(r.data))), r));
954
954
  /**
955
955
  * Перехватчик ошибок ответов на запрос.
956
956
  *
@@ -964,7 +964,7 @@ const w = class w {
964
964
  return Promise.reject(r);
965
965
  e.__isRetryRequest = !0;
966
966
  try {
967
- await w.refreshAccessToken();
967
+ await v.isStaleUnauthorizedRequest(e) || await v.refreshAccessToken();
968
968
  } catch {
969
969
  return Promise.reject(r);
970
970
  }
@@ -990,7 +990,7 @@ const w = class w {
990
990
  * @param response Данные ответа на запрос.
991
991
  */
992
992
  // eslint-disable-next-line class-methods-use-this
993
- s(this, "dataConverterResponseInterceptor", (r) => (r.data = w.toCamelCaseData(r.data), r));
993
+ s(this, "dataConverterResponseInterceptor", (r) => (r.data = v.toCamelCaseData(r.data), r));
994
994
  this.httpClient = es.create({
995
995
  headers: {
996
996
  Accept: "application/json",
@@ -1003,14 +1003,14 @@ const w = class w {
1003
1003
  this.authRequestInterceptor,
1004
1004
  (r) => Promise.reject(r)
1005
1005
  ), this.interceptorIds.request[M.DEFAULT_REQUEST_INTERCEPTOR] = this.httpClient.interceptors.request.use(
1006
- (r) => w.applyDefaultRequestHook(r),
1006
+ (r) => v.applyDefaultRequestHook(r),
1007
1007
  (r) => Promise.reject(r)
1008
1008
  ), this.interceptorIds.request[M.BASE_URL_REQUEST_INTERCEPTOR] = this.httpClient.interceptors.request.use(
1009
1009
  this.setBaseUrlRequestInterceptor,
1010
1010
  (r) => Promise.reject(r)
1011
1011
  ), this.interceptorIds.response[M.CONVERT_HTTP_ERROR_RESPONSE_INTERCEPTOR] = this.httpClient.interceptors.response.use(
1012
1012
  (r) => r,
1013
- (r) => w.convertHttpErrorResponse(r)
1013
+ (r) => v.convertHttpErrorResponse(r)
1014
1014
  ), this.interceptorIds.response[M.CANCELED_RESPONSE_INTERCEPTOR] = this.httpClient.interceptors.response.use(
1015
1015
  (r) => r,
1016
1016
  this.canceledResponseInterceptor
@@ -1028,7 +1028,7 @@ const w = class w {
1028
1028
  * @param handler Ссылка на функцию-обработчик ошибок.
1029
1029
  */
1030
1030
  static setDefaultErrorsResponseHandler(r) {
1031
- w.defaultErrorsResponseHandler = r;
1031
+ v.defaultErrorsResponseHandler = r;
1032
1032
  }
1033
1033
  /**
1034
1034
  * Устанавливает базовый хук для запросов.
@@ -1036,7 +1036,7 @@ const w = class w {
1036
1036
  * @param hook Ссылка на функцию-хук.
1037
1037
  */
1038
1038
  static setDefaultRequestHook(r) {
1039
- w.defaultRequestHook = r;
1039
+ v.defaultRequestHook = r;
1040
1040
  }
1041
1041
  /**
1042
1042
  * Проверяет, что значение можно безопасно пропустить через конвертер ключей.
@@ -1046,7 +1046,7 @@ const w = class w {
1046
1046
  * @param value Проверяемое значение.
1047
1047
  */
1048
1048
  static canConvertCaseKeys(r) {
1049
- return Qe(r) ? !(r instanceof Blob || r instanceof FormData || r instanceof ArrayBuffer || Ve(r) || ArrayBuffer.isView(r)) : !1;
1049
+ return Ve(r) ? !(r instanceof Blob || r instanceof FormData || r instanceof ArrayBuffer || Je(r) || ArrayBuffer.isView(r)) : !1;
1050
1050
  }
1051
1051
  /**
1052
1052
  * Приводит ключи данных к camelCase, если значение является обычным объектом или массивом.
@@ -1054,7 +1054,7 @@ const w = class w {
1054
1054
  * @param data Исходные данные.
1055
1055
  */
1056
1056
  static toCamelCaseData(r) {
1057
- return w.canConvertCaseKeys(r) ? Sr(r) : r;
1057
+ return v.canConvertCaseKeys(r) ? Sr(r) : r;
1058
1058
  }
1059
1059
  /**
1060
1060
  * Приводит ключи данных к snake_case, если значение является обычным объектом или массивом.
@@ -1062,19 +1062,51 @@ const w = class w {
1062
1062
  * @param data Исходные данные.
1063
1063
  */
1064
1064
  static toSnakeCaseData(r) {
1065
- return w.canConvertCaseKeys(r) ? Ht(r) : r;
1065
+ return v.canConvertCaseKeys(r) ? Ht(r) : r;
1066
+ }
1067
+ /**
1068
+ * Возвращает токен доступа из заголовка Authorization исходного запроса.
1069
+ *
1070
+ * @param request Данные запроса.
1071
+ */
1072
+ static getRequestAccessToken(r) {
1073
+ const e = r.headers.get("Authorization"), t = R(e) ? e : void 0, i = "Bearer ";
1074
+ if (m(t) || !Zr(t, i))
1075
+ return;
1076
+ const o = t.slice(i.length);
1077
+ return o === "" ? void 0 : o;
1078
+ }
1079
+ /**
1080
+ * Проверяет, что 401 пришёл на токен, который уже заменён.
1081
+ *
1082
+ * Такой ответ нельзя считать поводом сбрасывать текущий токен: запрос ушёл со старым ключом, а в сторе уже лежит новый.
1083
+ *
1084
+ * @param request Данные запроса.
1085
+ */
1086
+ static async isStaleUnauthorizedRequest(r) {
1087
+ const e = v.getRequestAccessToken(r);
1088
+ if (m(e))
1089
+ return !1;
1090
+ const t = ze().jwtToken;
1091
+ if (m(t))
1092
+ return !1;
1093
+ try {
1094
+ return await t !== e;
1095
+ } catch {
1096
+ return !1;
1097
+ }
1066
1098
  }
1067
1099
  /**
1068
1100
  * Сбрасывает токен и запускает одно обновление на все параллельные ответы 401.
1069
1101
  */
1070
1102
  static refreshAccessToken() {
1071
- if (!m(w.tokenRefreshPromise))
1072
- return w.tokenRefreshPromise;
1073
- lr().invalidateJwtToken();
1074
- const e = lr().jwtToken ?? Promise.resolve();
1075
- return w.tokenRefreshPromise = e.finally(() => {
1076
- w.tokenRefreshPromise = void 0;
1077
- }), w.tokenRefreshPromise;
1103
+ if (!m(v.tokenRefreshPromise))
1104
+ return v.tokenRefreshPromise;
1105
+ ze().invalidateJwtToken();
1106
+ const e = ze().jwtToken ?? Promise.resolve();
1107
+ return v.tokenRefreshPromise = e.finally(() => {
1108
+ v.tokenRefreshPromise = void 0;
1109
+ }), v.tokenRefreshPromise;
1078
1110
  }
1079
1111
  /**
1080
1112
  * Вызывает базовый хук запроса.
@@ -1084,7 +1116,7 @@ const w = class w {
1084
1116
  * @param request Данные запроса.
1085
1117
  */
1086
1118
  static applyDefaultRequestHook(r) {
1087
- return m(w.defaultRequestHook) ? r : w.defaultRequestHook(r);
1119
+ return m(v.defaultRequestHook) ? r : v.defaultRequestHook(r);
1088
1120
  }
1089
1121
  /**
1090
1122
  * Возвращает экземпляр объекта текущего класса.
@@ -1092,7 +1124,7 @@ const w = class w {
1092
1124
  * @param type Тип данных, которыми оперирует метод.
1093
1125
  */
1094
1126
  static getInstance(r) {
1095
- return Object.prototype.hasOwnProperty.call(w.instances, r.name) || (w.instances[r.name] = _.simpleInstanceInitializer(r)), w.instances[r.name];
1127
+ return Object.prototype.hasOwnProperty.call(v.instances, r.name) || (v.instances[r.name] = _.simpleInstanceInitializer(r)), v.instances[r.name];
1096
1128
  }
1097
1129
  /**
1098
1130
  * Приводит данные об ошибке к форме ошибки HTTP запроса.
@@ -1103,7 +1135,7 @@ const w = class w {
1103
1135
  * @param error Данные об ошибке.
1104
1136
  */
1105
1137
  static toHttpResponseError(r) {
1106
- return Qe(r) && "status" in r ? r : {
1138
+ return Ve(r) && "status" in r ? r : {
1107
1139
  status: 0,
1108
1140
  statusText: "Invalid response data",
1109
1141
  message: _r(r) ? r.message : "Не удалось обработать данные ответа сервера.",
@@ -1117,15 +1149,16 @@ const w = class w {
1117
1149
  * @param error Данные об ошибке.
1118
1150
  */
1119
1151
  static convertHttpErrorResponse(r) {
1152
+ var e, t;
1120
1153
  if (m(r) || !m(r.request) || !m(r.response)) {
1121
- const e = m(r) ? {} : r == null ? void 0 : r.response, t = w.toCamelCaseData(e == null ? void 0 : e.data);
1154
+ const i = m(r) ? {} : r == null ? void 0 : r.response;
1122
1155
  return Promise.reject({
1123
- status: (e == null ? void 0 : e.status) ?? 0,
1124
- statusText: (e == null ? void 0 : e.statusText) ?? "Unknown",
1125
- message: (t == null ? void 0 : t.message) ?? "Unknown Error. Probably network error.",
1126
- errors: t == null ? void 0 : t.errors,
1127
- headers: (e == null ? void 0 : e.headers) ?? {},
1128
- data: t,
1156
+ status: (i == null ? void 0 : i.status) ?? 0,
1157
+ statusText: (i == null ? void 0 : i.statusText) ?? "Unknown",
1158
+ message: ((e = i == null ? void 0 : i.data) == null ? void 0 : e.message) ?? "Unknown Error. Probably network error.",
1159
+ errors: (t = i == null ? void 0 : i.data) == null ? void 0 : t.errors,
1160
+ headers: (i == null ? void 0 : i.headers) ?? {},
1161
+ data: i == null ? void 0 : i.data,
1129
1162
  rawError: r
1130
1163
  });
1131
1164
  }
@@ -1139,10 +1172,10 @@ const w = class w {
1139
1172
  * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
1140
1173
  * @param disableNotifications Признак необходимости отключить уведомления об ошибках.
1141
1174
  */
1142
- request(r, e = void 0, t = {}, n = !1) {
1175
+ request(r, e = void 0, t = {}, i = !1) {
1143
1176
  const o = this.httpClient.request(r).then((c) => e ? e(c) : c.data);
1144
1177
  return o.catch((c) => {
1145
- (c == null ? void 0 : c.name) !== "CanceledError" && w.defaultErrorsResponseHandler(w.toHttpResponseError(c), t, n);
1178
+ (c == null ? void 0 : c.name) !== "CanceledError" && v.defaultErrorsResponseHandler(v.toHttpResponseError(c), t, i);
1146
1179
  }), o;
1147
1180
  }
1148
1181
  /**
@@ -1154,8 +1187,8 @@ const w = class w {
1154
1187
  * @param disableNotifications Признак необходимости отключить уведомления об ошибках.
1155
1188
  * @param signal Сигнал отмены запроса.
1156
1189
  */
1157
- get(r, e = {}, t = void 0, n = !1, o = void 0) {
1158
- return this.request({ method: "GET", url: r, params: e, signal: o }, t, {}, n);
1190
+ get(r, e = {}, t = void 0, i = !1, o = void 0) {
1191
+ return this.request({ method: "GET", url: r, params: e, signal: o }, t, {}, i);
1159
1192
  }
1160
1193
  /**
1161
1194
  * Выполняет get-запрос и возвращает список экземпляров указанного класса.
@@ -1167,12 +1200,12 @@ const w = class w {
1167
1200
  * @param signal Сигнал отмены запроса.
1168
1201
  */
1169
1202
  // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
1170
- getTypedList(r, e, t = {}, n = !1, o = void 0) {
1203
+ getTypedList(r, e, t = {}, i = !1, o = void 0) {
1171
1204
  return this.get(
1172
1205
  e,
1173
1206
  t,
1174
1207
  (c) => _.instanceListInitializer(r, c.data),
1175
- n,
1208
+ i,
1176
1209
  o
1177
1210
  );
1178
1211
  }
@@ -1185,8 +1218,8 @@ const w = class w {
1185
1218
  * @param disableNotifications Признак необходимости отключить уведомления об ошибках.
1186
1219
  * @param signal Сигнал отмены запроса.
1187
1220
  */
1188
- getBlob(r, e = {}, t = void 0, n = !1, o = void 0) {
1189
- return this.request({ method: "GET", url: r, params: e, responseType: "blob", signal: o }, t, {}, n);
1221
+ getBlob(r, e = {}, t = void 0, i = !1, o = void 0) {
1222
+ return this.request({ method: "GET", url: r, params: e, responseType: "blob", signal: o }, t, {}, i);
1190
1223
  }
1191
1224
  /**
1192
1225
  * Выполняет patch-запрос с параметрами по умолчанию.
@@ -1198,8 +1231,8 @@ const w = class w {
1198
1231
  * @param disableNotifications Признак необходимости отключить уведомления об ошибках.
1199
1232
  * @param signal Сигнал отмены запроса.
1200
1233
  */
1201
- patch(r, e = {}, t = void 0, n = {}, o = !1, c = void 0) {
1202
- return this.request({ method: "PATCH", url: r, data: e, signal: c }, t, n, o);
1234
+ patch(r, e = {}, t = void 0, i = {}, o = !1, c = void 0) {
1235
+ return this.request({ method: "PATCH", url: r, data: e, signal: c }, t, i, o);
1203
1236
  }
1204
1237
  /**
1205
1238
  * Выполняет post-запрос с параметрами по умолчанию.
@@ -1211,8 +1244,8 @@ const w = class w {
1211
1244
  * @param disableNotifications Признак необходимости отключить уведомления об ошибках.
1212
1245
  * @param signal Сигнал отмены запроса.
1213
1246
  */
1214
- post(r, e = {}, t = void 0, n = {}, o = !1, c = void 0) {
1215
- return this.request({ method: "POST", url: r, data: e, signal: c }, t, n, o);
1247
+ post(r, e = {}, t = void 0, i = {}, o = !1, c = void 0) {
1248
+ return this.request({ method: "POST", url: r, data: e, signal: c }, t, i, o);
1216
1249
  }
1217
1250
  /**
1218
1251
  * Выполняет delete-запрос с параметрами по умолчанию.
@@ -1222,30 +1255,30 @@ const w = class w {
1222
1255
  * @param disableNotifications Признак необходимости отключить уведомления об ошибках.
1223
1256
  * @param signal Сигнал отмены запроса.
1224
1257
  */
1225
- delete(r, e = void 0, t = !1, n = void 0) {
1226
- return this.request({ method: "DELETE", url: r, signal: n }, e, {}, t);
1258
+ delete(r, e = void 0, t = !1, i = void 0) {
1259
+ return this.request({ method: "DELETE", url: r, signal: i }, e, {}, t);
1227
1260
  }
1228
1261
  };
1229
1262
  /**
1230
1263
  * Экземпляр объекта текущего класса.
1231
1264
  */
1232
1265
  // eslint-disable-next-line no-use-before-define
1233
- s(w, "instances", {}), /**
1266
+ s(v, "instances", {}), /**
1234
1267
  * Базовый обработчик ошибок выполнения запросов.
1235
1268
  *
1236
1269
  * @param error Данные об ошибке.
1237
1270
  * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
1238
1271
  * @param disableNotifications Признак необходимости отключить уведомления об ошибках.
1239
1272
  */
1240
- s(w, "defaultErrorsResponseHandler", T), /**
1273
+ s(v, "defaultErrorsResponseHandler", T), /**
1241
1274
  * Базовый хук для запросов.
1242
1275
  */
1243
- s(w, "defaultRequestHook"), /**
1276
+ s(v, "defaultRequestHook"), /**
1244
1277
  * Общий Promise обновления токена для параллельных ответов 401.
1245
1278
  */
1246
- s(w, "tokenRefreshPromise");
1247
- let h = w;
1248
- var dr = /* @__PURE__ */ ((i) => (i.BeginWith = "bw", i.Contains = "cn", i.Custom = "custom", i.EndsWith = "ew", i.Equals = "eq", i.GreaterOrEqual = "ge", i.GreaterThan = "gt", i.InList = "in", i.LessOrEqual = "le", i.LessThan = "lt", i.NotBeginWith = "bn", i.NotContains = "nc", i.NotEndsWith = "en", i.NotEqual = "ne", i.NotInList = "ni", i.NotNull = "nn", i.Null = "nu", i))(dr || {});
1279
+ s(v, "tokenRefreshPromise");
1280
+ let h = v;
1281
+ var dr = /* @__PURE__ */ ((n) => (n.BeginWith = "bw", n.Contains = "cn", n.Custom = "custom", n.EndsWith = "ew", n.Equals = "eq", n.GreaterOrEqual = "ge", n.GreaterThan = "gt", n.InList = "in", n.LessOrEqual = "le", n.LessThan = "lt", n.NotBeginWith = "bn", n.NotContains = "nc", n.NotEndsWith = "en", n.NotEqual = "ne", n.NotInList = "ni", n.NotNull = "nn", n.Null = "nu", n))(dr || {});
1249
1282
  class Fr {
1250
1283
  /**
1251
1284
  * Инициализирует экземпляр класса {@link FilterItem}.
@@ -1277,7 +1310,7 @@ class Fr {
1277
1310
  field: this.field,
1278
1311
  op: this.op
1279
1312
  };
1280
- if (Ve(this.value))
1313
+ if (Je(this.value))
1281
1314
  e.value = k(this.value, r);
1282
1315
  else if (Nt(this.value)) {
1283
1316
  const t = this.value;
@@ -1310,7 +1343,7 @@ class te {
1310
1343
  */
1311
1344
  s(this, "groups");
1312
1345
  var e, t;
1313
- this.groupOp = (r == null ? void 0 : r.groupOp) ?? "and", this.filters = ((e = r == null ? void 0 : r.filters) == null ? void 0 : e.map((n) => new Fr(n))) ?? [], this.groups = ((t = r == null ? void 0 : r.groups) == null ? void 0 : t.map((n) => new te(n))) ?? [];
1346
+ this.groupOp = (r == null ? void 0 : r.groupOp) ?? "and", this.filters = ((e = r == null ? void 0 : r.filters) == null ? void 0 : e.map((i) => new Fr(i))) ?? [], this.groups = ((t = r == null ? void 0 : r.groups) == null ? void 0 : t.map((i) => new te(i))) ?? [];
1314
1347
  }
1315
1348
  /**
1316
1349
  * Преобразует группу фильтров в примитивное представление для API.
@@ -1320,7 +1353,7 @@ class te {
1320
1353
  toPrimitive() {
1321
1354
  return {
1322
1355
  groupOp: this.groupOp,
1323
- filters: this.filters.map((r) => r instanceof Fr && Ar(r.toPrimitive) ? r.toPrimitive() : r),
1356
+ filters: this.filters.map((r) => r instanceof Fr && br(r.toPrimitive) ? r.toPrimitive() : r),
1324
1357
  groups: this.groups.map((r) => r instanceof te ? r.toPrimitive() : r)
1325
1358
  };
1326
1359
  }
@@ -1338,12 +1371,12 @@ class Y extends h {
1338
1371
  * @param disableDefaultNotificationErrorResponseHandler Признак отключения стандартного обработчика ошибок.
1339
1372
  * @param signal Сигнал отмены запроса.
1340
1373
  */
1341
- getPaginated(r, e, t, n, o, c, u, p = void 0) {
1374
+ getPaginated(r, e, t, i, o, c, u, p = void 0) {
1342
1375
  let g = {
1343
- page: (n == null ? void 0 : n.page) ?? 1,
1344
- perPage: (n == null ? void 0 : n.pageSize) ?? 10
1376
+ page: (i == null ? void 0 : i.page) ?? 1,
1377
+ perPage: (i == null ? void 0 : i.pageSize) ?? 10
1345
1378
  };
1346
- return e && (g.filters = JSON.stringify((e instanceof te ? e : new te(e)).toPrimitive())), J(t) || (g.sort = z(t) ? t : [t]), o && (g = { ...g, ...o }), this.get(r, g, c, u, p);
1379
+ return e && (g.filters = JSON.stringify((e instanceof te ? e : new te(e)).toPrimitive())), J(t) || (g.sort = W(t) ? t : [t]), o && (g = { ...g, ...o }), this.get(r, g, c, u, p);
1347
1380
  }
1348
1381
  /**
1349
1382
  * Получает пагинированный список экземпляров указанного класса.
@@ -1357,11 +1390,11 @@ class Y extends h {
1357
1390
  * @param disableDefaultNotificationErrorResponseHandler Признак отключения стандартного обработчика ошибок.
1358
1391
  * @param signal Сигнал отмены запроса.
1359
1392
  */
1360
- getTypedPaginated(r, e, t, n, o, c, u, p = void 0) {
1393
+ getTypedPaginated(r, e, t, i, o, c, u, p = void 0) {
1361
1394
  return this.getPaginated(
1362
1395
  e,
1363
1396
  t,
1364
- n,
1397
+ i,
1365
1398
  o,
1366
1399
  c,
1367
1400
  (g) => ({
@@ -1373,7 +1406,7 @@ class Y extends h {
1373
1406
  );
1374
1407
  }
1375
1408
  }
1376
- class vr extends Y {
1409
+ class wr extends Y {
1377
1410
  /**
1378
1411
  * Возвращает данные статьи блога, подготовленные для отправки на портал.
1379
1412
  *
@@ -1403,10 +1436,10 @@ class vr extends Y {
1403
1436
  * @see /doc/api/internal#/operations/api_internal_blog_get_list
1404
1437
  */
1405
1438
  getPostList(r, e, t) {
1406
- return this.getPaginated("/internal/blog", r, e, t, {}, (n) => ({
1407
- ...n.data,
1439
+ return this.getPaginated("/internal/blog", r, e, t, {}, (i) => ({
1440
+ ...i.data,
1408
1441
  // eslint-disable-next-line lodash/prefer-lodash-method
1409
- data: n.data.data.map((o) => new ae(o))
1442
+ data: i.data.data.map((o) => new ae(o))
1410
1443
  }));
1411
1444
  }
1412
1445
  /**
@@ -1430,7 +1463,7 @@ class vr extends Y {
1430
1463
  * @see /doc/api/internal#/operations/api_internal_blog_create
1431
1464
  */
1432
1465
  createPost(r, e = {}) {
1433
- return this.post("/internal/blog", vr.preparePostSaveData(r), (t) => new ur(t.data), e);
1466
+ return this.post("/internal/blog", wr.preparePostSaveData(r), (t) => new ur(t.data), e);
1434
1467
  }
1435
1468
  /**
1436
1469
  * Изменяет данные о статье блога.
@@ -1444,7 +1477,7 @@ class vr extends Y {
1444
1477
  * @see /doc/api/internal#/operations/api_internal_blog_update
1445
1478
  */
1446
1479
  updatePost(r, e, t = {}) {
1447
- return this.patch(`/internal/blog/${r}`, vr.preparePostSaveData(e), (n) => new ur(n.data), t);
1480
+ return this.patch(`/internal/blog/${r}`, wr.preparePostSaveData(e), (i) => new ur(i.data), t);
1448
1481
  }
1449
1482
  /**
1450
1483
  * Удаляет статью блога.
@@ -1469,17 +1502,17 @@ class vr extends Y {
1469
1502
  *
1470
1503
  * @see /doc/api/internal#/operations/api_internal_blog_upload_media
1471
1504
  */
1472
- uploadMedia(r, e, t, n, o = {}) {
1505
+ uploadMedia(r, e, t, i, o = {}) {
1473
1506
  return this.request(
1474
1507
  {
1475
1508
  method: "POST",
1476
1509
  url: `/internal/blog/${r}/media`,
1477
1510
  data: { file: e, isCover: t ?? !1 },
1478
1511
  onUploadProgress: (c) => {
1479
- n && n(c.total ? Math.round(c.loaded / c.total * 100) : 0);
1512
+ i && i(c.total ? Math.round(c.loaded / c.total * 100) : 0);
1480
1513
  }
1481
1514
  },
1482
- (c) => new wr(c.data),
1515
+ (c) => new vr(c.data),
1483
1516
  o
1484
1517
  );
1485
1518
  }
@@ -1495,12 +1528,12 @@ class vr extends Y {
1495
1528
  *
1496
1529
  * @see /doc/api/internal#/operations/api_internal_blog_update_media
1497
1530
  */
1498
- updateMedia(r, e, t, n = {}) {
1531
+ updateMedia(r, e, t, i = {}) {
1499
1532
  return this.patch(
1500
1533
  `/internal/blog/${r}/media/${e}`,
1501
1534
  { isCover: t },
1502
- (o) => new wr(o.data),
1503
- n
1535
+ (o) => new vr(o.data),
1536
+ i
1504
1537
  );
1505
1538
  }
1506
1539
  /**
@@ -1593,10 +1626,10 @@ class cs extends L {
1593
1626
  * Дата и время удаления.
1594
1627
  */
1595
1628
  s(this, "deletedAt");
1596
- this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.isLowPriceAllowed = (e == null ? void 0 : e.isLowPriceAllowed) ?? !1, this.publishedAt = D(e == null ? void 0 : e.publishedAt) ? C(e.publishedAt) : e == null ? void 0 : e.publishedAt, this.description = (e == null ? void 0 : e.description) ?? void 0, this.percent = (e == null ? void 0 : e.percent) ?? 0, this.owner = new N(e == null ? void 0 : e.owner), this.deletedAt = D(e == null ? void 0 : e.deletedAt) ? C(e.deletedAt) : e == null ? void 0 : e.deletedAt;
1629
+ this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.isLowPriceAllowed = (e == null ? void 0 : e.isLowPriceAllowed) ?? !1, this.publishedAt = R(e == null ? void 0 : e.publishedAt) ? C(e.publishedAt) : e == null ? void 0 : e.publishedAt, this.description = (e == null ? void 0 : e.description) ?? void 0, this.percent = (e == null ? void 0 : e.percent) ?? 0, this.owner = new N(e == null ? void 0 : e.owner), this.deletedAt = R(e == null ? void 0 : e.deletedAt) ? C(e.deletedAt) : e == null ? void 0 : e.deletedAt;
1597
1630
  }
1598
1631
  }
1599
- class rt extends L {
1632
+ class tt extends L {
1600
1633
  /**
1601
1634
  * Инициализирует экземпляр класса {@link UpdatableNamedIdentity}.
1602
1635
  *
@@ -1608,10 +1641,10 @@ class rt extends L {
1608
1641
  * Дата и время последнего изменения.
1609
1642
  */
1610
1643
  s(this, "updatedAt");
1611
- this.updatedAt = D(e == null ? void 0 : e.updatedAt) ? C(e.updatedAt) : e == null ? void 0 : e.updatedAt;
1644
+ this.updatedAt = R(e == null ? void 0 : e.updatedAt) ? C(e.updatedAt) : e == null ? void 0 : e.updatedAt;
1612
1645
  }
1613
1646
  }
1614
- class fe extends rt {
1647
+ class fe extends tt {
1615
1648
  /**
1616
1649
  * Инициализирует экземпляр класса {@link PriceTemplate}.
1617
1650
  *
@@ -1631,11 +1664,11 @@ class fe extends rt {
1631
1664
  * Данные о пользователе, создавшем шаблон прайс-листа.
1632
1665
  */
1633
1666
  s(this, "owner");
1634
- this.description = (e == null ? void 0 : e.description) ?? "", this.createdAt = D(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.owner = e != null && e.owner ? new N(e.owner) : void 0;
1667
+ this.description = (e == null ? void 0 : e.description) ?? "", this.createdAt = R(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.owner = e != null && e.owner ? new N(e.owner) : void 0;
1635
1668
  }
1636
1669
  }
1637
- var tt = /* @__PURE__ */ ((i) => (i.K0 = "k0", i.K1 = "k1", i.K2 = "k2", i.K3 = "k3", i.K4 = "k4", i.Retail = "retail", i))(tt || {});
1638
- class R extends L {
1670
+ var st = /* @__PURE__ */ ((n) => (n.K0 = "k0", n.K1 = "k1", n.K2 = "k2", n.K3 = "k3", n.K4 = "k4", n.Retail = "retail", n))(st || {});
1671
+ class D extends L {
1639
1672
  /**
1640
1673
  * Инициализирует экземпляр класса {@link Reference}.
1641
1674
  *
@@ -1654,14 +1687,14 @@ class R extends L {
1654
1687
  this.description = e == null ? void 0 : e.description, this.slug = e == null ? void 0 : e.slug;
1655
1688
  }
1656
1689
  }
1657
- class Pe extends R {
1690
+ class Pe extends D {
1658
1691
  /**
1659
1692
  * Возвращает значение справочника коэффициента розничной цены.
1660
1693
  */
1661
1694
  static getRetailPriceCoefficient() {
1662
1695
  const r = new Pe({
1663
1696
  id: -2,
1664
- slug: tt.Retail,
1697
+ slug: st.Retail,
1665
1698
  name: "Розн. цена",
1666
1699
  guid: ""
1667
1700
  });
@@ -1698,7 +1731,7 @@ class $r {
1698
1731
  this.coefficient = new Pe(r == null ? void 0 : r.coefficient), this.value = (r == null ? void 0 : r.value) ?? 0, this.cost = (r == null ? void 0 : r.cost) ?? 0, this.percent = (r == null ? void 0 : r.percent) ?? 0, this.readOnly = (r == null ? void 0 : r.readOnly) ?? !0;
1699
1732
  }
1700
1733
  }
1701
- class st {
1734
+ class it {
1702
1735
  /**
1703
1736
  * Инициализирует экземпляр класса {@link GeoCoordinates}.
1704
1737
  *
@@ -1716,9 +1749,9 @@ class st {
1716
1749
  this.lat = (r == null ? void 0 : r.lat) ?? 0, this.long = (r == null ? void 0 : r.long) ?? 0;
1717
1750
  }
1718
1751
  }
1719
- class K extends R {
1752
+ class K extends D {
1720
1753
  }
1721
- class Me extends R {
1754
+ class Me extends D {
1722
1755
  /**
1723
1756
  * Инициализирует экземпляр класса {@link Warehouse}.
1724
1757
  *
@@ -1747,7 +1780,7 @@ class Me extends R {
1747
1780
  * Координаты склада.
1748
1781
  */
1749
1782
  s(this, "coordinates");
1750
- this.address = (e == null ? void 0 : e.address) ?? "", this.isMain = (e == null ? void 0 : e.isMain) ?? !1, this.deliveryTypes = ((t = e == null ? void 0 : e.deliveryTypes) == null ? void 0 : t.map((n) => new K(n))) ?? [], this.regions = (e == null ? void 0 : e.regions) ?? [], this.coordinates = new st(e == null ? void 0 : e.coordinates);
1783
+ this.address = (e == null ? void 0 : e.address) ?? "", this.isMain = (e == null ? void 0 : e.isMain) ?? !1, this.deliveryTypes = ((t = e == null ? void 0 : e.deliveryTypes) == null ? void 0 : t.map((i) => new K(i))) ?? [], this.regions = (e == null ? void 0 : e.regions) ?? [], this.coordinates = new it(e == null ? void 0 : e.coordinates);
1751
1784
  }
1752
1785
  }
1753
1786
  class ls {
@@ -1837,7 +1870,7 @@ class Ee extends L {
1837
1870
  this.code = (e == null ? void 0 : e.code) ?? "";
1838
1871
  }
1839
1872
  }
1840
- class it extends Ee {
1873
+ class nt extends Ee {
1841
1874
  /**
1842
1875
  * Инициализирует экземпляр класса {@link CatalogableItem}.
1843
1876
  *
@@ -1856,7 +1889,7 @@ class it extends Ee {
1856
1889
  this.slug = (e == null ? void 0 : e.slug) ?? "";
1857
1890
  }
1858
1891
  }
1859
- class us extends it {
1892
+ class us extends nt {
1860
1893
  /**
1861
1894
  * Инициализирует экземпляр класса {@link HiddenCatalogableItem}.
1862
1895
  *
@@ -1894,7 +1927,7 @@ class ps {
1894
1927
  this.image = `${e ?? ""}${r.image}`, this.preview = `${e ?? ""}${r.preview}`, this.isDefault = r.isDefault;
1895
1928
  }
1896
1929
  }
1897
- class Cr extends it {
1930
+ class Rr extends nt {
1898
1931
  /**
1899
1932
  * Инициализирует экземпляр класса {@link PrimaryCatalogableItem}.
1900
1933
  *
@@ -1916,7 +1949,7 @@ class q extends us {
1916
1949
  * @param data Данные для первоначальной инициализации.
1917
1950
  */
1918
1951
  constructor(e) {
1919
- var n, o, c, u;
1952
+ var i, o, c, u;
1920
1953
  super(e);
1921
1954
  /**
1922
1955
  * Артикул производителя/поставщика.
@@ -1986,9 +2019,9 @@ class q extends us {
1986
2019
  * Список коэффициентов цен на продукт.
1987
2020
  */
1988
2021
  s(this, "priceCoefficients");
1989
- this.supplierSku = e == null ? void 0 : e.supplierSku, this.unit = e != null && e.unit ? new Mr(e.unit) : new Mr(), this.pack = e == null ? void 0 : e.pack, this.minCount = e == null ? void 0 : e.minCount, this.currency = e != null && e.currency ? new j(e.currency) : new j(), this.cost = (e == null ? void 0 : e.cost) ?? 0, this.costRub = (e == null ? void 0 : e.costRub) ?? 0, this.costDate = D(e == null ? void 0 : e.costDate) ? C(e.costDate) : e == null ? void 0 : e.costDate, this.onOrder = (e == null ? void 0 : e.onOrder) ?? !1, this.stockCount = ((n = e == null ? void 0 : e.stockCount) == null ? void 0 : n.map((p) => new ls(p))) ?? [], this.type = "product";
2022
+ this.supplierSku = e == null ? void 0 : e.supplierSku, this.unit = e != null && e.unit ? new Mr(e.unit) : new Mr(), this.pack = e == null ? void 0 : e.pack, this.minCount = e == null ? void 0 : e.minCount, this.currency = e != null && e.currency ? new j(e.currency) : new j(), this.cost = (e == null ? void 0 : e.cost) ?? 0, this.costRub = (e == null ? void 0 : e.costRub) ?? 0, this.costDate = R(e == null ? void 0 : e.costDate) ? C(e.costDate) : e == null ? void 0 : e.costDate, this.onOrder = (e == null ? void 0 : e.onOrder) ?? !1, this.stockCount = ((i = e == null ? void 0 : e.stockCount) == null ? void 0 : i.map((p) => new ls(p))) ?? [], this.type = "product";
1990
2023
  const t = (e == null ? void 0 : e.category) ?? ((o = e == null ? void 0 : e.categories) == null ? void 0 : o.find((p) => p.isPrimary));
1991
- t && (this.category = new Cr({ ...t, isPrimary: !0 }), this.categories = [this.category]), e != null && e.categories && (this.categories = e.categories.map((p) => new Cr(p))), this.images = ((c = e == null ? void 0 : e.images) == null ? void 0 : c.map((p) => new ps(p, O().config.http.mediaUrl))) ?? [], this.properties = (e == null ? void 0 : e.properties) ?? {}, this.retailCost = e == null ? void 0 : e.retailCost, this.retailCostRub = e == null ? void 0 : e.retailCostRub, this.priceCoefficients = ((u = e == null ? void 0 : e.priceCoefficients) == null ? void 0 : u.map((p) => new $r(p))) ?? [], e && "codeNumber" in e && !e.code && (this.code = e == null ? void 0 : e.codeNumber);
2024
+ t && (this.category = new Rr({ ...t, isPrimary: !0 }), this.categories = [this.category]), e != null && e.categories && (this.categories = e.categories.map((p) => new Rr(p))), this.images = ((c = e == null ? void 0 : e.images) == null ? void 0 : c.map((p) => new ps(p, O().config.http.mediaUrl))) ?? [], this.properties = (e == null ? void 0 : e.properties) ?? {}, this.retailCost = e == null ? void 0 : e.retailCost, this.retailCostRub = e == null ? void 0 : e.retailCostRub, this.priceCoefficients = ((u = e == null ? void 0 : e.priceCoefficients) == null ? void 0 : u.map((p) => new $r(p))) ?? [], e && "codeNumber" in e && !e.code && (this.code = e == null ? void 0 : e.codeNumber);
1992
2025
  }
1993
2026
  /**
1994
2027
  * Возвращает признак, что это измеряемый товар.
@@ -2009,7 +2042,7 @@ class q extends us {
2009
2042
  return this.retailCostRub ?? this.costRub;
2010
2043
  }
2011
2044
  }
2012
- var kr = /* @__PURE__ */ ((i) => (i.Discount = "discount", i.PriceTemplate = "price_template", i.ClientPrice = "client_price", i.Product = "product", i))(kr || {});
2045
+ var kr = /* @__PURE__ */ ((n) => (n.Discount = "discount", n.PriceTemplate = "price_template", n.ClientPrice = "client_price", n.Product = "product", n))(kr || {});
2013
2046
  class X extends q {
2014
2047
  /**
2015
2048
  * Инициализирует экземпляр класса {@link ClientProduct}.
@@ -2049,7 +2082,7 @@ class X extends q {
2049
2082
  this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.costSource = (e == null ? void 0 : e.costSource) ?? kr.Product, this.discount = e != null && e.discount ? new cs(e.discount) : void 0, this.priceTemplate = e != null && e.priceTemplate ? new fe(e.priceTemplate) : void 0, this.isPreviouslyOrdered = e == null ? void 0 : e.isPreviouslyOrdered, this.isRequired = e == null ? void 0 : e.isRequired, this.isFavorite = e == null ? void 0 : e.isFavorite;
2050
2083
  }
2051
2084
  }
2052
- class be extends Cr {
2085
+ class Ae extends Rr {
2053
2086
  /**
2054
2087
  * Инициализирует экземпляр класса {@link BaseCategory}.
2055
2088
  *
@@ -2073,10 +2106,10 @@ class be extends Cr {
2073
2106
  * Список коэффициентов пересчёта из валют в рубли в формате ключ значение.
2074
2107
  */
2075
2108
  s(this, "currencyRates");
2076
- this.isHidden = (e == null ? void 0 : e.isHidden) ?? !1, this.parentCategoryId = e == null ? void 0 : e.parentCategoryId, this.properties = e == null ? void 0 : e.properties, this.type = "category", this.currencyRates = e != null && e.currencyRates ? Object.fromEntries(Object.entries(e.currencyRates).map(([t, n]) => [Et(t), n])) : void 0;
2109
+ this.isHidden = (e == null ? void 0 : e.isHidden) ?? !1, this.parentCategoryId = e == null ? void 0 : e.parentCategoryId, this.properties = e == null ? void 0 : e.properties, this.type = "category", this.currencyRates = e != null && e.currencyRates ? Object.fromEntries(Object.entries(e.currencyRates).map(([t, i]) => [Et(t), i])) : void 0;
2077
2110
  }
2078
2111
  }
2079
- class nt extends G {
2112
+ class ot extends G {
2080
2113
  /**
2081
2114
  * Инициализирует экземпляр класса {@link OrderItemBase}.
2082
2115
  *
@@ -2152,10 +2185,10 @@ class nt extends G {
2152
2185
  * @inheritDoc
2153
2186
  */
2154
2187
  s(this, "replacementId");
2155
- this.product = new X(e.product), this.quantity = e.quantity ?? 0, this.marker = e.marker, this.category = e.category ?? new be(), this.currency = e.currency ? new j(e.currency) : void 0, this.height = e.height, this.length = e.length, this.width = e.width, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams && Ut(e.configuratorParams), this.isAdditionalSale = e.isAdditionalSale, this.creator = e.creator && new N(e.creator), this.isRemoved = e.isRemoved, this.ord = e.ord, this.onOrder = e.onOrder, this.originalId = e.originalId, this.replacementId = e.replacementId;
2188
+ this.product = new X(e.product), this.quantity = e.quantity ?? 0, this.marker = e.marker, this.category = e.category ?? new Ae(), this.currency = e.currency ? new j(e.currency) : void 0, this.height = e.height, this.length = e.length, this.width = e.width, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams && Ut(e.configuratorParams), this.isAdditionalSale = e.isAdditionalSale, this.creator = e.creator && new N(e.creator), this.isRemoved = e.isRemoved, this.ord = e.ord, this.onOrder = e.onOrder, this.originalId = e.originalId, this.replacementId = e.replacementId;
2156
2189
  }
2157
2190
  }
2158
- let Or = class extends nt {
2191
+ let Or = class extends ot {
2159
2192
  /**
2160
2193
  * Инициализирует экземпляр класса {@link OrderItem}.
2161
2194
  *
@@ -2199,7 +2232,7 @@ let Or = class extends nt {
2199
2232
  * @inheritDoc
2200
2233
  */
2201
2234
  s(this, "currency");
2202
- this.cost = e.cost, this.costOne = e.costOne, this.costOneRub = e.costOneRub, this.costRub = e.costRub, this.logicGroupId = e.logicGroupId, this.salesDirection = e.salesDirection, this.specificationImgUrl = e.specificationImgUrl, this.sawing = z(e.sawing) ? e.sawing : e.sawing ? [e.sawing] : void 0, this.currency = new j(e.currency);
2235
+ this.cost = e.cost, this.costOne = e.costOne, this.costOneRub = e.costOneRub, this.costRub = e.costRub, this.logicGroupId = e.logicGroupId, this.salesDirection = e.salesDirection, this.specificationImgUrl = e.specificationImgUrl, this.sawing = W(e.sawing) ? e.sawing : e.sawing ? [e.sawing] : void 0, this.currency = new j(e.currency);
2203
2236
  }
2204
2237
  };
2205
2238
  class Oe {
@@ -2271,7 +2304,7 @@ class Zs extends h {
2271
2304
  is_additional_sale: e.isAdditionalSale,
2272
2305
  ...e.configuratorParams
2273
2306
  },
2274
- (n) => new Oe(n.data),
2307
+ (i) => new Oe(i.data),
2275
2308
  t
2276
2309
  );
2277
2310
  }
@@ -2301,7 +2334,7 @@ class Zs extends h {
2301
2334
  is_additional_sale: e.isAdditionalSale,
2302
2335
  ...e.configuratorParams
2303
2336
  },
2304
- (n) => new Oe(n.data),
2337
+ (i) => new Oe(i.data),
2305
2338
  t
2306
2339
  );
2307
2340
  }
@@ -2338,15 +2371,15 @@ class Zs extends h {
2338
2371
  return this.get(`internal/clients/${r.id}/cart/add-products-from-csv/example`, {}, (e) => new Blob([e.data], { type: "text/csv" }));
2339
2372
  }
2340
2373
  }
2341
- var hs = /* @__PURE__ */ ((i) => (i.m2Cost = "m2Cost", i.percent = "percent", i.value = "value", i))(hs || {}), gs = /* @__PURE__ */ ((i) => (i.Unknown = "unknown", i.Bool = "bool", i.Integer = "integer", i.Float = "float", i.String = "string", i.Range = "range", i.Json = "json", i.Object = "object", i))(gs || {}), ot = /* @__PURE__ */ ((i) => (i.Checkbox = "checkbox", i.Range = "range", i.Toggle = "toggle", i))(ot || {});
2342
- class Q extends be {
2374
+ var hs = /* @__PURE__ */ ((n) => (n.m2Cost = "m2Cost", n.percent = "percent", n.value = "value", n))(hs || {}), gs = /* @__PURE__ */ ((n) => (n.Unknown = "unknown", n.Bool = "bool", n.Integer = "integer", n.Float = "float", n.String = "string", n.Range = "range", n.Json = "json", n.Object = "object", n))(gs || {}), ct = /* @__PURE__ */ ((n) => (n.Checkbox = "checkbox", n.Range = "range", n.Toggle = "toggle", n))(ct || {});
2375
+ class Q extends Ae {
2343
2376
  /**
2344
2377
  * Инициализирует экземпляр класса {@link Category}.
2345
2378
  *
2346
2379
  * @param data Данные для первоначальной инициализации.
2347
2380
  */
2348
2381
  constructor(e) {
2349
- var t, n;
2382
+ var t, i;
2350
2383
  super(e);
2351
2384
  /**
2352
2385
  * Данные о вложенных категориях.
@@ -2356,10 +2389,10 @@ class Q extends be {
2356
2389
  * Список продуктов категории.
2357
2390
  */
2358
2391
  s(this, "products");
2359
- this.categories = (t = e == null ? void 0 : e.categories) == null ? void 0 : t.map((o) => new Q(o)), this.products = (n = e == null ? void 0 : e.products) == null ? void 0 : n.map((o) => new q(o));
2392
+ this.categories = (t = e == null ? void 0 : e.categories) == null ? void 0 : t.map((o) => new Q(o)), this.products = (i = e == null ? void 0 : e.products) == null ? void 0 : i.map((o) => new q(o));
2360
2393
  }
2361
2394
  }
2362
- class ct {
2395
+ class lt {
2363
2396
  /**
2364
2397
  * Инициализирует экземпляр класса {@link ContactLinks}.
2365
2398
  *
@@ -2377,7 +2410,7 @@ class ct {
2377
2410
  this.phone = /^\d+$/.test(r.phone ?? "") ? `+${r.phone}` : r.phone, this.email = r.email;
2378
2411
  }
2379
2412
  }
2380
- class U extends R {
2413
+ class U extends D {
2381
2414
  }
2382
2415
  class Lr extends L {
2383
2416
  /**
@@ -2407,12 +2440,12 @@ class Lr extends L {
2407
2440
  * @inheritDoc
2408
2441
  */
2409
2442
  s(this, "isRegionalDirector");
2410
- this.salesDirection = e != null && e.salesDirection ? new U(e.salesDirection) : new U(), this.photo = e == null ? void 0 : e.photo, this.contacts = e != null && e.contacts ? new ct(e.contacts) : void 0, this.isDefault = (e == null ? void 0 : e.isDefault) ?? !1, this.isRegionalDirector = (e == null ? void 0 : e.isRegionalDirector) ?? !1;
2443
+ this.salesDirection = e != null && e.salesDirection ? new U(e.salesDirection) : new U(), this.photo = e == null ? void 0 : e.photo, this.contacts = e != null && e.contacts ? new lt(e.contacts) : void 0, this.isDefault = (e == null ? void 0 : e.isDefault) ?? !1, this.isRegionalDirector = (e == null ? void 0 : e.isRegionalDirector) ?? !1;
2411
2444
  }
2412
2445
  }
2413
- class Ir extends R {
2446
+ class Ir extends D {
2414
2447
  }
2415
- class lt extends L {
2448
+ class ut extends L {
2416
2449
  /**
2417
2450
  * Инициализирует экземпляр класса {@link IUserPricingRole}.
2418
2451
  *
@@ -2435,7 +2468,7 @@ class lt extends L {
2435
2468
  this.description = e.description, this.canChangeLowCost = e.canChangeLowCost, this.parentRoleId = e.parentRoleId;
2436
2469
  }
2437
2470
  }
2438
- class Xe extends L {
2471
+ class Ze extends L {
2439
2472
  /**
2440
2473
  * Инициализирует экземпляр класса {@link UserRegionShortInfo}.
2441
2474
  *
@@ -2457,7 +2490,7 @@ class Z extends Lr {
2457
2490
  * @param data Данные для первоначальной инициализации.
2458
2491
  */
2459
2492
  constructor(e) {
2460
- var t, n, o;
2493
+ var t, i, o;
2461
2494
  super(e);
2462
2495
  /**
2463
2496
  * Признак активности учетной записи менеджера.
@@ -2507,10 +2540,10 @@ class Z extends Lr {
2507
2540
  * Дата и время последнего входа в систему.
2508
2541
  */
2509
2542
  s(this, "lastLoginAt");
2510
- this.isActive = (e == null ? void 0 : e.isActive) ?? !1, this.isSupervisor = (e == null ? void 0 : e.isSupervisor) ?? !1, this.canDoReclamations = (e == null ? void 0 : e.canDoReclamations) ?? !1, this.createdAt = D(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : e == null ? void 0 : e.createdAt, this.supervisorId = e == null ? void 0 : e.supervisorId, this.pricingRole = e != null && e.pricingRole ? new lt(e.pricingRole) : void 0, this.curatedDirections = ((t = e == null ? void 0 : e.curatedDirections) == null ? void 0 : t.map((c) => new Ir(c))) ?? [], this.showAllCosts = e == null ? void 0 : e.showAllCosts, this.authAsOperator = e == null ? void 0 : e.authAsOperator, this.managerRegions = (n = e == null ? void 0 : e.managerRegions) == null ? void 0 : n.map((c) => new Xe(c)), this.managers = (o = e == null ? void 0 : e.managers) == null ? void 0 : o.map((c) => new Z(c)), this.lastLoginAt = D(e == null ? void 0 : e.lastLoginAt) ? C(e.lastLoginAt) : e == null ? void 0 : e.lastLoginAt;
2543
+ this.isActive = (e == null ? void 0 : e.isActive) ?? !1, this.isSupervisor = (e == null ? void 0 : e.isSupervisor) ?? !1, this.canDoReclamations = (e == null ? void 0 : e.canDoReclamations) ?? !1, this.createdAt = R(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : e == null ? void 0 : e.createdAt, this.supervisorId = e == null ? void 0 : e.supervisorId, this.pricingRole = e != null && e.pricingRole ? new ut(e.pricingRole) : void 0, this.curatedDirections = ((t = e == null ? void 0 : e.curatedDirections) == null ? void 0 : t.map((c) => new Ir(c))) ?? [], this.showAllCosts = e == null ? void 0 : e.showAllCosts, this.authAsOperator = e == null ? void 0 : e.authAsOperator, this.managerRegions = (i = e == null ? void 0 : e.managerRegions) == null ? void 0 : i.map((c) => new Ze(c)), this.managers = (o = e == null ? void 0 : e.managers) == null ? void 0 : o.map((c) => new Z(c)), this.lastLoginAt = R(e == null ? void 0 : e.lastLoginAt) ? C(e.lastLoginAt) : e == null ? void 0 : e.lastLoginAt;
2511
2544
  }
2512
2545
  }
2513
- class fs extends be {
2546
+ class fs extends Ae {
2514
2547
  /**
2515
2548
  * Инициализирует экземпляр класса {@link BaseClientCategory}.
2516
2549
  *
@@ -2541,14 +2574,14 @@ class fs extends be {
2541
2574
  this.isDisabled = (e == null ? void 0 : e.isDisabled) ?? !1, this.isRequired = (e == null ? void 0 : e.isRequired) ?? !1, this.isFavorite = (e == null ? void 0 : e.isFavorite) ?? !1, this.hidingComment = e == null ? void 0 : e.hidingComment, this.manager = e != null && e.manager ? new Z(e.manager) : void 0;
2542
2575
  }
2543
2576
  }
2544
- class Je extends fs {
2577
+ class Ke extends fs {
2545
2578
  /**
2546
2579
  * Инициализирует экземпляр класса {@link ClientCategory}.
2547
2580
  *
2548
2581
  * @param data Данные для первоначальной инициализации.
2549
2582
  */
2550
2583
  constructor(e) {
2551
- var t, n;
2584
+ var t, i;
2552
2585
  super(e);
2553
2586
  /**
2554
2587
  * Данные о вложенных категориях.
@@ -2558,10 +2591,10 @@ class Je extends fs {
2558
2591
  * Список продуктов категории.
2559
2592
  */
2560
2593
  s(this, "products");
2561
- this.categories = (t = e == null ? void 0 : e.categories) == null ? void 0 : t.map((o) => new Je(o)), this.products = (n = e == null ? void 0 : e.products) == null ? void 0 : n.map((o) => new X(o));
2594
+ this.categories = (t = e == null ? void 0 : e.categories) == null ? void 0 : t.map((o) => new Ke(o)), this.products = (i = e == null ? void 0 : e.products) == null ? void 0 : i.map((o) => new X(o));
2562
2595
  }
2563
2596
  }
2564
- class ut {
2597
+ class pt {
2565
2598
  /**
2566
2599
  * Инициализирует экземпляр класса {@link PriceTemplateICatalogableItem}.
2567
2600
  *
@@ -2579,7 +2612,7 @@ class ut {
2579
2612
  this.priceCoefficient = (r == null ? void 0 : r.priceCoefficient) && new Pe(r.priceCoefficient), this.increasePercent = r == null ? void 0 : r.increasePercent;
2580
2613
  }
2581
2614
  }
2582
- class pr extends ut {
2615
+ class pr extends pt {
2583
2616
  /**
2584
2617
  * Инициализирует экземпляр класса {@link PriceTemplateProduct}.
2585
2618
  *
@@ -2591,7 +2624,7 @@ class pr extends ut {
2591
2624
  * Базовые данные о продукте.
2592
2625
  */
2593
2626
  s(this, "productCategory");
2594
- this.productCategory = new be(e == null ? void 0 : e.productCategory);
2627
+ this.productCategory = new Ae(e == null ? void 0 : e.productCategory);
2595
2628
  }
2596
2629
  }
2597
2630
  class xr extends L {
@@ -2614,12 +2647,12 @@ class xr extends L {
2614
2647
  * @inheritDoc
2615
2648
  */
2616
2649
  s(this, "curatedDirection");
2617
- this.photo = e.photo, this.contacts = new ct(e.contacts), this.curatedDirection = new Ir(e.curatedDirection);
2650
+ this.photo = e.photo, this.contacts = new lt(e.contacts), this.curatedDirection = new Ir(e.curatedDirection);
2618
2651
  }
2619
2652
  }
2620
- class we extends R {
2653
+ class ve extends D {
2621
2654
  }
2622
- class ve extends R {
2655
+ class we extends D {
2623
2656
  /**
2624
2657
  * Инициализирует экземпляр класса {@link Region}.
2625
2658
  *
@@ -2630,11 +2663,11 @@ class ve extends R {
2630
2663
  /**
2631
2664
  * Данные о стране, в которой расположен регион.
2632
2665
  */
2633
- s(this, "country", new we());
2634
- e && (this.country = new we(e.country));
2666
+ s(this, "country", new ve());
2667
+ e && (this.country = new ve(e.country));
2635
2668
  }
2636
2669
  }
2637
- class Ce extends R {
2670
+ class Re extends D {
2638
2671
  /**
2639
2672
  * Инициализирует экземпляр класса {@link CityWithRegionAndCountry}.
2640
2673
  *
@@ -2645,11 +2678,11 @@ class Ce extends R {
2645
2678
  /**
2646
2679
  * Данные о регионе, в котором расположен город.
2647
2680
  */
2648
- s(this, "region", new ve());
2649
- e && (this.region = new ve(e.region));
2681
+ s(this, "region", new we());
2682
+ e && (this.region = new we(e.region));
2650
2683
  }
2651
2684
  }
2652
- class pt extends L {
2685
+ class ht extends L {
2653
2686
  /**
2654
2687
  * Инициализирует экземпляр класса {@link UserCommonInfo}.
2655
2688
  *
@@ -2685,10 +2718,10 @@ class pt extends L {
2685
2718
  * Признак активности учетной записи пользователя.
2686
2719
  */
2687
2720
  s(this, "isActive");
2688
- this.phone = /^\d+$/.test((e == null ? void 0 : e.phone) ?? "") ? `+${e == null ? void 0 : e.phone}` : (e == null ? void 0 : e.phone) ?? "", this.email = (e == null ? void 0 : e.email) ?? "", this.getNews = (e == null ? void 0 : e.getNews) ?? !1, this.salesDirection = e != null && e.salesDirection ? new U(e.salesDirection) : void 0, this.createdAt = D(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : e == null ? void 0 : e.createdAt, this.lastLoginAt = D(e == null ? void 0 : e.lastLoginAt) ? C(e.lastLoginAt) : e == null ? void 0 : e.lastLoginAt, this.isActive = (e == null ? void 0 : e.isActive) ?? !1;
2721
+ this.phone = /^\d+$/.test((e == null ? void 0 : e.phone) ?? "") ? `+${e == null ? void 0 : e.phone}` : (e == null ? void 0 : e.phone) ?? "", this.email = (e == null ? void 0 : e.email) ?? "", this.getNews = (e == null ? void 0 : e.getNews) ?? !1, this.salesDirection = e != null && e.salesDirection ? new U(e.salesDirection) : void 0, this.createdAt = R(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : e == null ? void 0 : e.createdAt, this.lastLoginAt = R(e == null ? void 0 : e.lastLoginAt) ? C(e.lastLoginAt) : e == null ? void 0 : e.lastLoginAt, this.isActive = (e == null ? void 0 : e.isActive) ?? !1;
2689
2722
  }
2690
2723
  }
2691
- class oe extends pt {
2724
+ class oe extends ht {
2692
2725
  /**
2693
2726
  * Инициализирует экземпляр класса {@link Client}.
2694
2727
  *
@@ -2696,7 +2729,7 @@ class oe extends pt {
2696
2729
  */
2697
2730
  // eslint-disable-next-line sonarjs/cognitive-complexity
2698
2731
  constructor(e) {
2699
- var t, n;
2732
+ var t, i;
2700
2733
  super(e);
2701
2734
  /**
2702
2735
  * Направление продаж.
@@ -2734,7 +2767,7 @@ class oe extends pt {
2734
2767
  * @inheritDoc
2735
2768
  */
2736
2769
  s(this, "curators");
2737
- this.salesDirection = new U(e == null ? void 0 : e.salesDirection), this.debt = (e == null ? void 0 : e.debt) ?? 0, this.alternativeName = (e == null ? void 0 : e.alternativeName) ?? "", this.city = new Ce(e == null ? void 0 : e.city), this.comment = e == null ? void 0 : e.comment, this.isPhoneApproved = (e == null ? void 0 : e.isPhoneApproved) ?? !1, this.isEmailApproved = (e == null ? void 0 : e.isEmailApproved) ?? !1, this.managers = ((t = e == null ? void 0 : e.managers) == null ? void 0 : t.map((o) => new Lr(o))) ?? [], this.curators = ((n = e == null ? void 0 : e.curators) == null ? void 0 : n.map((o) => new xr(o))) ?? void 0;
2770
+ this.salesDirection = new U(e == null ? void 0 : e.salesDirection), this.debt = (e == null ? void 0 : e.debt) ?? 0, this.alternativeName = (e == null ? void 0 : e.alternativeName) ?? "", this.city = new Re(e == null ? void 0 : e.city), this.comment = e == null ? void 0 : e.comment, this.isPhoneApproved = (e == null ? void 0 : e.isPhoneApproved) ?? !1, this.isEmailApproved = (e == null ? void 0 : e.isEmailApproved) ?? !1, this.managers = ((t = e == null ? void 0 : e.managers) == null ? void 0 : t.map((o) => new Lr(o))) ?? [], this.curators = ((i = e == null ? void 0 : e.curators) == null ? void 0 : i.map((o) => new xr(o))) ?? void 0;
2738
2771
  }
2739
2772
  }
2740
2773
  class Le extends G {
@@ -2761,10 +2794,10 @@ class Le extends G {
2761
2794
  * Данные шаблона прайс-листа.
2762
2795
  */
2763
2796
  s(this, "priceTemplate");
2764
- this.createdAt = D(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.deletedAt = D(e == null ? void 0 : e.deletedAt) ? C(e.deletedAt) : e == null ? void 0 : e.deletedAt, this.client = new oe(e == null ? void 0 : e.client), this.priceTemplate = new fe(e == null ? void 0 : e.priceTemplate);
2797
+ this.createdAt = R(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.deletedAt = R(e == null ? void 0 : e.deletedAt) ? C(e.deletedAt) : e == null ? void 0 : e.deletedAt, this.client = new oe(e == null ? void 0 : e.client), this.priceTemplate = new fe(e == null ? void 0 : e.priceTemplate);
2765
2798
  }
2766
2799
  }
2767
- class hr extends ut {
2800
+ class hr extends pt {
2768
2801
  /**
2769
2802
  * Инициализирует экземпляр класса {@link PriceTemplateProduct}.
2770
2803
  *
@@ -2779,7 +2812,7 @@ class hr extends ut {
2779
2812
  this.product = new q(e == null ? void 0 : e.product);
2780
2813
  }
2781
2814
  }
2782
- class ht extends R {
2815
+ class gt extends D {
2783
2816
  }
2784
2817
  class me extends L {
2785
2818
  /**
@@ -2805,7 +2838,7 @@ class me extends L {
2805
2838
  * Признак того, что по свойству может производиться фильтрация в каталоге.
2806
2839
  */
2807
2840
  s(this, "isFilterable");
2808
- this.type = new ht(e == null ? void 0 : e.type), this.description = (e == null ? void 0 : e.description) ?? "", this.metadata = e == null ? void 0 : e.metadata, this.isFilterable = e == null ? void 0 : e.isFilterable;
2841
+ this.type = new gt(e == null ? void 0 : e.type), this.description = (e == null ? void 0 : e.description) ?? "", this.metadata = e == null ? void 0 : e.metadata, this.isFilterable = e == null ? void 0 : e.isFilterable;
2809
2842
  }
2810
2843
  }
2811
2844
  class he {
@@ -2853,12 +2886,12 @@ class ei {
2853
2886
  /**
2854
2887
  * Период создания.
2855
2888
  */
2856
- s(this, "createdAt", new A());
2889
+ s(this, "createdAt", new b());
2857
2890
  /**
2858
2891
  * Период изменения.
2859
2892
  */
2860
- s(this, "updatedAt", new A());
2861
- this.id = r == null ? void 0 : r.id, this.name = r == null ? void 0 : r.name, this.description = r == null ? void 0 : r.description, this.ownerName = r == null ? void 0 : r.ownerName, this.createdAt = new A(r == null ? void 0 : r.createdAt), this.updatedAt = new A(r == null ? void 0 : r.updatedAt);
2893
+ s(this, "updatedAt", new b());
2894
+ this.id = r == null ? void 0 : r.id, this.name = r == null ? void 0 : r.name, this.description = r == null ? void 0 : r.description, this.ownerName = r == null ? void 0 : r.ownerName, this.createdAt = new b(r == null ? void 0 : r.createdAt), this.updatedAt = new b(r == null ? void 0 : r.updatedAt);
2862
2895
  }
2863
2896
  /**
2864
2897
  * Выполняет сброс указанного фильтра в значение по умолчанию.
@@ -2887,13 +2920,13 @@ class ei {
2887
2920
  * только актуальные данные.
2888
2921
  */
2889
2922
  asClearRaw() {
2890
- var e, t, n, o;
2923
+ var e, t, i, o;
2891
2924
  const r = {};
2892
2925
  return Object.keys(this).forEach((c) => {
2893
2926
  const u = this[c];
2894
2927
  // eslint-disable-next-line prettier/prettier
2895
- m(u) || D(u) && u.trim().length === 0 || Ar(u.isNewRec) && u.isNewRec() || (r[c] = u);
2896
- }), !((e = r == null ? void 0 : r.createdAt) != null && e.from) && !((t = r == null ? void 0 : r.createdAt) != null && t.to) && delete r.createdAt, !((n = r == null ? void 0 : r.updatedAt) != null && n.from) && !((o = r == null ? void 0 : r.updatedAt) != null && o.to) && delete r.updatedAt, r;
2928
+ m(u) || R(u) && u.trim().length === 0 || br(u.isNewRec) && u.isNewRec() || (r[c] = u);
2929
+ }), !((e = r == null ? void 0 : r.createdAt) != null && e.from) && !((t = r == null ? void 0 : r.createdAt) != null && t.to) && delete r.createdAt, !((i = r == null ? void 0 : r.updatedAt) != null && i.from) && !((o = r == null ? void 0 : r.updatedAt) != null && o.to) && delete r.updatedAt, r;
2897
2930
  }
2898
2931
  }
2899
2932
  class Ie extends L {
@@ -2950,7 +2983,7 @@ class Hr {
2950
2983
  * Минимальный коэффициент цены.
2951
2984
  */
2952
2985
  s(this, "minCoefficient");
2953
- this.role = new Ie(r == null ? void 0 : r.role), this.category = new be(r == null ? void 0 : r.category), this.minCoefficient = new Pe(r == null ? void 0 : r.minCoefficient);
2986
+ this.role = new Ie(r == null ? void 0 : r.role), this.category = new Ae(r == null ? void 0 : r.category), this.minCoefficient = new Pe(r == null ? void 0 : r.minCoefficient);
2954
2987
  }
2955
2988
  }
2956
2989
  class ms {
@@ -3005,7 +3038,7 @@ class Br {
3005
3038
  * @inheritDoc
3006
3039
  */
3007
3040
  s(this, "settings");
3008
- this.category = new be(r == null ? void 0 : r.category), this.property = new me(r == null ? void 0 : r.property), this.settings = new ms(r == null ? void 0 : r.settings);
3041
+ this.category = new Ae(r == null ? void 0 : r.category), this.property = new me(r == null ? void 0 : r.property), this.settings = new ms(r == null ? void 0 : r.settings);
3009
3042
  }
3010
3043
  }
3011
3044
  class ys {
@@ -3069,7 +3102,7 @@ class as {
3069
3102
  */
3070
3103
  s(this, "max");
3071
3104
  var e;
3072
- this.id = (r == null ? void 0 : r.id) ?? "", this.label = (r == null ? void 0 : r.label) ?? "", this.type = (r == null ? void 0 : r.type) ?? ot.Checkbox, this.ord = (r == null ? void 0 : r.ord) ?? 0, this.isMultiple = (r == null ? void 0 : r.isMultiple) ?? null, this.values = ((e = r == null ? void 0 : r.values) == null ? void 0 : e.map((t) => new ys(t))) ?? [], this.min = (r == null ? void 0 : r.min) ?? null, this.max = (r == null ? void 0 : r.max) ?? null;
3105
+ this.id = (r == null ? void 0 : r.id) ?? "", this.label = (r == null ? void 0 : r.label) ?? "", this.type = (r == null ? void 0 : r.type) ?? ct.Checkbox, this.ord = (r == null ? void 0 : r.ord) ?? 0, this.isMultiple = (r == null ? void 0 : r.isMultiple) ?? null, this.values = ((e = r == null ? void 0 : r.values) == null ? void 0 : e.map((t) => new ys(t))) ?? [], this.min = (r == null ? void 0 : r.min) ?? null, this.max = (r == null ? void 0 : r.max) ?? null;
3073
3106
  }
3074
3107
  }
3075
3108
  class ri extends h {
@@ -3098,9 +3131,9 @@ class ri extends h {
3098
3131
  * @see /doc/api/internal#/operations/api_internal_price_export
3099
3132
  */
3100
3133
  // eslint-disable-next-line class-methods-use-this
3101
- getPriceExportLink(r = "csv", e = !1, t = void 0, n = void 0) {
3134
+ getPriceExportLink(r = "csv", e = !1, t = void 0, i = void 0) {
3102
3135
  let c = `${O().config.http.portalApiUrl}/api/internal/price/export?format=${r}&show_hidden=${e}`;
3103
- return t && (c += `&category_id=${t}`), n && (c += `&client_id=${n}`), c;
3136
+ return t && (c += `&category_id=${t}`), i && (c += `&client_id=${i}`), c;
3104
3137
  }
3105
3138
  }
3106
3139
  class ti extends h {
@@ -3125,9 +3158,9 @@ class ti extends h {
3125
3158
  * @see /doc/api/internal#/operations/api_internal_client_price_category_update
3126
3159
  */
3127
3160
  updateCategoryPrices(r, e, t) {
3128
- var n;
3161
+ var i;
3129
3162
  return this.patch(`/internal/clients/${r}/price/categories/${e}`, {
3130
- price_coefficient_id: (n = t.coefficient) == null ? void 0 : n.id,
3163
+ price_coefficient_id: (i = t.coefficient) == null ? void 0 : i.id,
3131
3164
  increase_percent: t.value
3132
3165
  });
3133
3166
  }
@@ -3220,11 +3253,11 @@ class ti extends h {
3220
3253
  * @see /doc/api/internal#/operations/api_internal_client_price_products_update
3221
3254
  */
3222
3255
  updateProductPrice(r, e, t) {
3223
- var n;
3256
+ var i;
3224
3257
  return this.patch(
3225
3258
  `/internal/clients/${r}/price/products/${e}`,
3226
3259
  {
3227
- price_coefficient_id: (n = t.coefficient) == null ? void 0 : n.id,
3260
+ price_coefficient_id: (i = t.coefficient) == null ? void 0 : i.id,
3228
3261
  increase_percent: t.value
3229
3262
  },
3230
3263
  (o) => new X(o.data)
@@ -3333,12 +3366,12 @@ class si extends h {
3333
3366
  * @see /doc/api/internal#/operations/api_internal_client_price_template_attach
3334
3367
  */
3335
3368
  attachTemplate(r, e, t) {
3336
- const n = O().config.dateFormats.api;
3369
+ const i = O().config.dateFormats.api;
3337
3370
  return this.post(
3338
3371
  `/internal/clients/${r}/price/templates/${e}`,
3339
3372
  t && {
3340
- startAt: t.startAt && k(t.startAt, n),
3341
- endAt: t.endAt && k(t.endAt, n)
3373
+ startAt: t.startAt && k(t.startAt, i),
3374
+ endAt: t.endAt && k(t.endAt, i)
3342
3375
  },
3343
3376
  (o) => new Le(o.data),
3344
3377
  {},
@@ -3366,13 +3399,13 @@ class si extends h {
3366
3399
  *
3367
3400
  * @see /doc/api/internal#/operations/api_internal_client_price_template_change
3368
3401
  */
3369
- changeTemplate(r, e, t, n) {
3402
+ changeTemplate(r, e, t, i) {
3370
3403
  const o = O().config.dateFormats.api;
3371
3404
  return this.patch(
3372
3405
  `/internal/clients/${r}/price/templates/${e}/${t}`,
3373
- n && {
3374
- startAt: n.startAt && k(n.startAt, o),
3375
- endAt: n.endAt && k(n.endAt, o)
3406
+ i && {
3407
+ startAt: i.startAt && k(i.startAt, o),
3408
+ endAt: i.endAt && k(i.endAt, o)
3376
3409
  },
3377
3410
  (c) => new Le(c.data)
3378
3411
  );
@@ -3419,7 +3452,7 @@ class ii extends h {
3419
3452
  showHidden: e,
3420
3453
  withNestedCategories: t
3421
3454
  },
3422
- (n) => new Q(n.data)
3455
+ (i) => new Q(i.data)
3423
3456
  );
3424
3457
  }
3425
3458
  /**
@@ -3446,7 +3479,7 @@ class ii extends h {
3446
3479
  showHidden: t,
3447
3480
  withPriceCoefficients: e
3448
3481
  },
3449
- (n) => De(n.data, (o) => new q(o))
3482
+ (i) => De(i.data, (o) => new q(o))
3450
3483
  );
3451
3484
  }
3452
3485
  /**
@@ -3459,7 +3492,7 @@ class ii extends h {
3459
3492
  getCategoryProductsCoefficients(r) {
3460
3493
  return this.get(`/internal/catalog/categories/${r}/products/coefficients`, {}, (e) => {
3461
3494
  const { data: t } = e;
3462
- return Ft(t, (n) => n.map((o) => new $r(o))), t;
3495
+ return Ft(t, (i) => i.map((o) => new $r(o))), t;
3463
3496
  });
3464
3497
  }
3465
3498
  /**
@@ -3469,11 +3502,11 @@ class ii extends h {
3469
3502
  * @param limit Количество возвращаемых записей.
3470
3503
  */
3471
3504
  publicSimpleSearch(r, e = 10) {
3472
- return new Promise((t, n) => {
3505
+ return new Promise((t, i) => {
3473
3506
  this.get(`/public/catalog/search/simple?limit=${e}&term=${r}`).then((o) => {
3474
3507
  t(o.categories.map((c) => new Q(c)));
3475
3508
  }).catch((o) => {
3476
- n(o);
3509
+ i(o);
3477
3510
  });
3478
3511
  });
3479
3512
  }
@@ -3522,9 +3555,9 @@ class ni extends Y {
3522
3555
  * @see /doc/api/internal#/Каталог/api_internal_catalog_new_products_by_period_get
3523
3556
  */
3524
3557
  getNewProducts(r, e, t = !0) {
3525
- const n = O().config.dateFormats.api;
3558
+ const i = O().config.dateFormats.api;
3526
3559
  return this.getTypedPaginated(q, "/internal/catalog/products/new", void 0, void 0, e, {
3527
- period: { from: k(r, n) },
3560
+ period: { from: k(r, i) },
3528
3561
  withPriceCoefficients: t
3529
3562
  });
3530
3563
  }
@@ -3535,11 +3568,11 @@ class ni extends Y {
3535
3568
  * @param limit Количество возвращаемых записей.
3536
3569
  */
3537
3570
  publicSimpleSearch(r, e = 10) {
3538
- return new Promise((t, n) => {
3571
+ return new Promise((t, i) => {
3539
3572
  this.get(`/public/catalog/search/simple?limit=${e}&term=${r}`).then((o) => {
3540
3573
  t(o.products.map((c) => new q(c)));
3541
3574
  }).catch((o) => {
3542
- n(o);
3575
+ i(o);
3543
3576
  });
3544
3577
  });
3545
3578
  }
@@ -3554,7 +3587,7 @@ class oi extends h {
3554
3587
  * @see /doc/api/internal#/Каталог/api_internal_catalog_categories_get_list
3555
3588
  */
3556
3589
  getRootCategoriesList(r, e = !1) {
3557
- return this.getTypedList(Je, "/internal/catalog/categories", {
3590
+ return this.getTypedList(Ke, "/internal/catalog/categories", {
3558
3591
  clientId: r,
3559
3592
  showHidden: e
3560
3593
  });
@@ -3569,15 +3602,15 @@ class oi extends h {
3569
3602
  *
3570
3603
  * @see /doc/api/internal#/Каталог/api_internal_catalog_categories_get
3571
3604
  */
3572
- getCategoryData(r, e, t = !1, n = !1) {
3605
+ getCategoryData(r, e, t = !1, i = !1) {
3573
3606
  return this.get(
3574
3607
  `/internal/catalog/categories/${e}`,
3575
3608
  {
3576
3609
  clientId: r,
3577
3610
  showHidden: t,
3578
- withNestedCategories: n
3611
+ withNestedCategories: i
3579
3612
  },
3580
- (o) => new Je(o.data)
3613
+ (o) => new Ke(o.data)
3581
3614
  );
3582
3615
  }
3583
3616
  /**
@@ -3590,12 +3623,12 @@ class oi extends h {
3590
3623
  *
3591
3624
  * @see /doc/api/internal#/Каталог/api_internal_catalog_categories_products_get
3592
3625
  */
3593
- getCategoryProductsList(r, e, t = !0, n = !1) {
3626
+ getCategoryProductsList(r, e, t = !0, i = !1) {
3594
3627
  return this.get(
3595
3628
  `/internal/catalog/categories/${e}/products`,
3596
3629
  {
3597
3630
  client_id: r,
3598
- showHidden: n,
3631
+ showHidden: i,
3599
3632
  withPriceCoefficients: t
3600
3633
  },
3601
3634
  (o) => De(o.data, (c) => new X(c))
@@ -3619,7 +3652,7 @@ class ci extends Y {
3619
3652
  clientId: e,
3620
3653
  withPriceCoefficients: t
3621
3654
  },
3622
- (n) => new X(n.data)
3655
+ (i) => new X(i.data)
3623
3656
  );
3624
3657
  }
3625
3658
  /**
@@ -3632,12 +3665,12 @@ class ci extends Y {
3632
3665
  *
3633
3666
  * @see /doc/api/internal#/Каталог/api_internal_catalog_new_products_by_period_get
3634
3667
  */
3635
- getNewProducts(r, e, t, n = !0) {
3668
+ getNewProducts(r, e, t, i = !0) {
3636
3669
  const o = O().config.dateFormats.api;
3637
3670
  return this.getTypedPaginated(X, "/internal/catalog/products/new", void 0, void 0, t, {
3638
3671
  clientId: r,
3639
3672
  period: { from: k(e, o) },
3640
- withPriceCoefficients: n
3673
+ withPriceCoefficients: i
3641
3674
  });
3642
3675
  }
3643
3676
  }
@@ -3687,7 +3720,7 @@ class li extends Y {
3687
3720
  * @see /doc/api/internal#/operations/api_internal_catalog_price_template_update
3688
3721
  */
3689
3722
  updateTemplate(r, e, t = {}) {
3690
- return this.patch(`/internal/price/templates/${r}`, e, (n) => new fe(n.data), t);
3723
+ return this.patch(`/internal/price/templates/${r}`, e, (i) => new fe(i.data), t);
3691
3724
  }
3692
3725
  /**
3693
3726
  * Удаляет данные о шаблоне прайс-листа.
@@ -3730,11 +3763,11 @@ class li extends Y {
3730
3763
  * @see /doc/api/internal#/operations/api_internal_catalog_price_template_product_save
3731
3764
  */
3732
3765
  saveProductTemplatePrice(r, e, t) {
3733
- var n;
3766
+ var i;
3734
3767
  return this.post(
3735
3768
  `/internal/price/templates/${r}/products/${e}`,
3736
3769
  {
3737
- price_coefficient_id: (n = t.coefficient) == null ? void 0 : n.id,
3770
+ price_coefficient_id: (i = t.coefficient) == null ? void 0 : i.id,
3738
3771
  increase_percent: t.value
3739
3772
  },
3740
3773
  (o) => new hr(o.data)
@@ -3787,7 +3820,7 @@ class li extends Y {
3787
3820
  *
3788
3821
  * @see /doc/api/internal#/operations/api_internal_catalog_price_template_category_save
3789
3822
  */
3790
- saveCategoryTemplatePrice(r, e, t, n = !1) {
3823
+ saveCategoryTemplatePrice(r, e, t, i = !1) {
3791
3824
  var o;
3792
3825
  return this.request(
3793
3826
  {
@@ -3797,7 +3830,7 @@ class li extends Y {
3797
3830
  price_coefficient_id: (o = t.coefficient) == null ? void 0 : o.id,
3798
3831
  increase_percent: t.value
3799
3832
  },
3800
- params: n ? { recursively: !0 } : {}
3833
+ params: i ? { recursively: !0 } : {}
3801
3834
  },
3802
3835
  (c) => new pr(c.data)
3803
3836
  );
@@ -3933,7 +3966,7 @@ class pi extends Y {
3933
3966
  ...t,
3934
3967
  type: e
3935
3968
  },
3936
- (n) => new me(n.data)
3969
+ (i) => new me(i.data)
3937
3970
  );
3938
3971
  }
3939
3972
  /**
@@ -3953,11 +3986,11 @@ class pi extends Y {
3953
3986
  * @see /doc/api/internal#/operations/api_internal_catalog_properties_update
3954
3987
  */
3955
3988
  updateProperty(r, e) {
3956
- const { typeId: t, ...n } = e;
3989
+ const { typeId: t, ...i } = e;
3957
3990
  return this.patch(
3958
3991
  `/internal/catalog/properties/${r}`,
3959
3992
  {
3960
- ...n,
3993
+ ...i,
3961
3994
  type: t
3962
3995
  },
3963
3996
  (o) => new me(o.data)
@@ -4000,7 +4033,7 @@ class pi extends Y {
4000
4033
  * @see /doc/api/internal#/operations/api_internal_catalog_product_properties_update
4001
4034
  */
4002
4035
  updateProductProperty(r, e, t) {
4003
- return this.patch(`/internal/catalog/products/${r}/properties/${e}`, { value: t }, (n) => new he(n.data));
4036
+ return this.patch(`/internal/catalog/products/${r}/properties/${e}`, { value: t }, (i) => new he(i.data));
4004
4037
  }
4005
4038
  /**
4006
4039
  * Удаляет значение свойства продукта.
@@ -4146,7 +4179,7 @@ class pi extends Y {
4146
4179
  * @see /doc/api/internal#/operations/api_internal_catalog_category_properties_update
4147
4180
  */
4148
4181
  updateCategoryProperty(r, e, t) {
4149
- return this.patch(`/internal/catalog/categories/${r}/properties/${e}`, { value: t }, (n) => new he(n.data));
4182
+ return this.patch(`/internal/catalog/categories/${r}/properties/${e}`, { value: t }, (i) => new he(i.data));
4150
4183
  }
4151
4184
  /**
4152
4185
  * Удаляет значение свойства категории.
@@ -4285,7 +4318,7 @@ class pi extends Y {
4285
4318
  return this.get(
4286
4319
  `/internal/catalog/categories/${r}/filters`,
4287
4320
  { recursively: e },
4288
- (t) => t.data.map((n) => new as(n))
4321
+ (t) => t.data.map((i) => new as(i))
4289
4322
  );
4290
4323
  }
4291
4324
  /**
@@ -4309,7 +4342,7 @@ class pi extends Y {
4309
4342
  return this.patch(
4310
4343
  `/internal/catalog/categories/${r}/filter-settings/${e}`,
4311
4344
  t,
4312
- (n) => new Br(n.data)
4345
+ (i) => new Br(i.data)
4313
4346
  );
4314
4347
  }
4315
4348
  /**
@@ -4348,13 +4381,13 @@ class hi extends h {
4348
4381
  *
4349
4382
  * @see /doc/api/internal#/Каталог/api_internal_catalog_categories_get
4350
4383
  */
4351
- getCategoryData(r, e, t = !1, n = !1) {
4384
+ getCategoryData(r, e, t = !1, i = !1) {
4352
4385
  return this.get(
4353
4386
  `/internal/catalog/categories/${e}`,
4354
4387
  {
4355
4388
  priceTemplateId: r,
4356
4389
  showHidden: t,
4357
- withNestedCategories: n
4390
+ withNestedCategories: i
4358
4391
  },
4359
4392
  (o) => new Q(o.data)
4360
4393
  );
@@ -4369,50 +4402,50 @@ class hi extends h {
4369
4402
  *
4370
4403
  * @see /doc/api/internal#/Каталог/api_internal_catalog_categories_products_get
4371
4404
  */
4372
- getCategoryProductsList(r, e, t = !0, n = !1) {
4405
+ getCategoryProductsList(r, e, t = !0, i = !1) {
4373
4406
  return this.get(
4374
4407
  `/internal/catalog/categories/${e}/products`,
4375
4408
  {
4376
4409
  priceTemplateId: r,
4377
- showHidden: n,
4410
+ showHidden: i,
4378
4411
  withPriceCoefficients: t
4379
4412
  },
4380
4413
  (o) => De(o.data, (c) => new q(c))
4381
4414
  );
4382
4415
  }
4383
4416
  }
4384
- function Wr(i, r, e) {
4417
+ function zr(n, r, e) {
4385
4418
  let t;
4386
- return i.some((n) => {
4387
- if (n.type === e && n.id === r)
4388
- return t = n, !0;
4389
- if (n.type === "product")
4419
+ return n.some((i) => {
4420
+ if (i.type === e && i.id === r)
4421
+ return t = i, !0;
4422
+ if (i.type === "product")
4390
4423
  return !1;
4391
- const o = n;
4424
+ const o = i;
4392
4425
  if (o.products && o.products.length > 0) {
4393
- const c = Wr(o.products, r, e);
4426
+ const c = zr(o.products, r, e);
4394
4427
  if (c)
4395
4428
  return t = c, !0;
4396
4429
  }
4397
4430
  if (o.categories && o.categories.length > 0) {
4398
- const c = Wr(o.categories, r, e);
4431
+ const c = zr(o.categories, r, e);
4399
4432
  if (c)
4400
4433
  return t = c, !0;
4401
4434
  }
4402
4435
  return !1;
4403
4436
  }), t;
4404
4437
  }
4405
- function zr(i) {
4438
+ function Wr(n) {
4406
4439
  const r = [];
4407
- return i.forEach((e) => {
4440
+ return n.forEach((e) => {
4408
4441
  if (r.push(e), e.type === "category") {
4409
4442
  const t = e;
4410
- t.products && t.products.length > 0 && r.push(...zr(t.products)), t.categories && t.categories.length > 0 && r.push(...zr(t.categories));
4443
+ t.products && t.products.length > 0 && r.push(...Wr(t.products)), t.categories && t.categories.length > 0 && r.push(...Wr(t.categories));
4411
4444
  }
4412
4445
  }), r;
4413
4446
  }
4414
- var ws = /* @__PURE__ */ ((i) => (i.LastOrder = "last_order", i.Contacts = "contacts", i.PartnerGroups = "partner_groups", i.PreferredDeliveryType = "preferred_delivery_type", i.SalesDirection = "sales_direction", i.Managers = "managers", i.Curators = "curators", i))(ws || {}), V = /* @__PURE__ */ ((i) => (i.Person = "individual", i.Ic = "entrepreneur", i.UlR = "legal", i.UlNr = "non_resident_legal", i))(V || {});
4415
- class Rr extends G {
4447
+ var vs = /* @__PURE__ */ ((n) => (n.LastOrder = "last_order", n.Contacts = "contacts", n.PartnerGroups = "partner_groups", n.PreferredDeliveryType = "preferred_delivery_type", n.SalesDirection = "sales_direction", n.Managers = "managers", n.Curators = "curators", n))(vs || {}), V = /* @__PURE__ */ ((n) => (n.Person = "individual", n.Ic = "entrepreneur", n.UlR = "legal", n.UlNr = "non_resident_legal", n))(V || {});
4448
+ class Cr extends G {
4416
4449
  /**
4417
4450
  * Инициализирует экземпляр класса {@link BankAccount}.
4418
4451
  *
@@ -4494,10 +4527,10 @@ class se extends Dr {
4494
4527
  * Дата и время последнего удаления.
4495
4528
  */
4496
4529
  s(this, "deletedAt");
4497
- this.isPrimary = (e == null ? void 0 : e.isPrimary) ?? !1, this.position = e == null ? void 0 : e.position, this.notDisturb = (e == null ? void 0 : e.notDisturb) ?? !1, this.comment = e == null ? void 0 : e.comment, this.updatedAt = e == null ? void 0 : e.updatedAt, this.deletedAt = D(e == null ? void 0 : e.deletedAt) ? C(e.deletedAt) : e == null ? void 0 : e.deletedAt;
4530
+ this.isPrimary = (e == null ? void 0 : e.isPrimary) ?? !1, this.position = e == null ? void 0 : e.position, this.notDisturb = (e == null ? void 0 : e.notDisturb) ?? !1, this.comment = e == null ? void 0 : e.comment, this.updatedAt = e == null ? void 0 : e.updatedAt, this.deletedAt = R(e == null ? void 0 : e.deletedAt) ? C(e.deletedAt) : e == null ? void 0 : e.deletedAt;
4498
4531
  }
4499
4532
  }
4500
- class ie extends R {
4533
+ class ie extends D {
4501
4534
  /**
4502
4535
  * Возвращает сгенерированную запись-описание физического лица.
4503
4536
  */
@@ -4510,9 +4543,9 @@ class ie extends R {
4510
4543
  });
4511
4544
  }
4512
4545
  }
4513
- class Re extends R {
4546
+ class Ce extends D {
4514
4547
  }
4515
- class gt extends rt {
4548
+ class ft extends tt {
4516
4549
  /**
4517
4550
  * Инициализирует экземпляр класса {@link UpdatableNamedIdentity}.
4518
4551
  *
@@ -4524,10 +4557,10 @@ class gt extends rt {
4524
4557
  * Дата и время последнего удаления.
4525
4558
  */
4526
4559
  s(this, "deletedAt");
4527
- this.deletedAt = D(e == null ? void 0 : e.deletedAt) ? C(e.deletedAt) : e == null ? void 0 : e.deletedAt;
4560
+ this.deletedAt = R(e == null ? void 0 : e.deletedAt) ? C(e.deletedAt) : e == null ? void 0 : e.deletedAt;
4528
4561
  }
4529
4562
  }
4530
- class ft extends gt {
4563
+ class mt extends ft {
4531
4564
  /**
4532
4565
  * Инициализирует экземпляр класса {@link ContragentBase}.
4533
4566
  *
@@ -4543,7 +4576,7 @@ class ft extends gt {
4543
4576
  /**
4544
4577
  * Группа партнеров (направление деятельности).
4545
4578
  */
4546
- s(this, "partnerGroup", new Re());
4579
+ s(this, "partnerGroup", new Ce());
4547
4580
  /**
4548
4581
  * Список контактных лиц контрагента.
4549
4582
  */
@@ -4573,22 +4606,22 @@ class ft extends gt {
4573
4606
  */
4574
4607
  s(this, "updater");
4575
4608
  if (e) {
4576
- if (this.opf = new ie(e.opf), this.comment = e.comment, this.alternativeName = e.alternativeName, this.createdAt = D(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : e.createdAt, this.creator = e.creator ? new N(e.creator) : void 0, this.updater = e.updater ? new N(e.updater) : void 0, e.partnerGroup && (this.partnerGroup = new Re(e.partnerGroup)), e.contacts) {
4609
+ if (this.opf = new ie(e.opf), this.comment = e.comment, this.alternativeName = e.alternativeName, this.createdAt = R(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : e.createdAt, this.creator = e.creator ? new N(e.creator) : void 0, this.updater = e.updater ? new N(e.updater) : void 0, e.partnerGroup && (this.partnerGroup = new Ce(e.partnerGroup)), e.contacts) {
4577
4610
  const t = [];
4578
- e.contacts.forEach((n) => {
4579
- t.push(new se(n));
4611
+ e.contacts.forEach((i) => {
4612
+ t.push(new se(i));
4580
4613
  }), this.contacts = t;
4581
4614
  }
4582
4615
  if (e.bankAccounts) {
4583
4616
  const t = [];
4584
- e.bankAccounts.forEach((n) => {
4585
- t.push(new Rr(n));
4617
+ e.bankAccounts.forEach((i) => {
4618
+ t.push(new Cr(i));
4586
4619
  }), this.bankAccounts = t;
4587
4620
  }
4588
4621
  }
4589
4622
  }
4590
4623
  }
4591
- class vs extends ft {
4624
+ class ws extends mt {
4592
4625
  /**
4593
4626
  * Инициализирует экземпляр класса {@link ContragentPerson}.
4594
4627
  *
@@ -4598,7 +4631,7 @@ class vs extends ft {
4598
4631
  super(r);
4599
4632
  }
4600
4633
  }
4601
- class mt extends ft {
4634
+ class yt extends mt {
4602
4635
  /**
4603
4636
  * Инициализирует экземпляр класса {@link ContragentIc}.
4604
4637
  *
@@ -4614,6 +4647,10 @@ class mt extends ft {
4614
4647
  * Код ОКПО.
4615
4648
  */
4616
4649
  s(this, "okpo", "");
4650
+ /**
4651
+ * ОГРН (ОГРНИП для индивидуального предпринимателя).
4652
+ */
4653
+ s(this, "ogrn", "");
4617
4654
  /**
4618
4655
  * ФИО руководителя.
4619
4656
  */
@@ -4638,10 +4675,10 @@ class mt extends ft {
4638
4675
  * Фактический адрес.
4639
4676
  */
4640
4677
  s(this, "actualAddress", "");
4641
- e && (this.inn = e.inn ?? "", this.okpo = e.okpo ?? "", this.directorName = e.directorName ?? "", this.directorPosition = e.directorPosition ?? "", this.directorActsOn = e.directorActsOn ?? "", this.legalAddress = e.legalAddress ?? "", this.postalAddress = e.postalAddress ?? "", this.actualAddress = e.actualAddress ?? "");
4678
+ e && (this.inn = e.inn ?? "", this.okpo = e.okpo ?? "", this.ogrn = e.ogrn ?? "", this.directorName = e.directorName ?? "", this.directorPosition = e.directorPosition ?? "", this.directorActsOn = e.directorActsOn ?? "", this.legalAddress = e.legalAddress ?? "", this.postalAddress = e.postalAddress ?? "", this.actualAddress = e.actualAddress ?? "");
4642
4679
  }
4643
4680
  }
4644
- class yt extends mt {
4681
+ class at extends yt {
4645
4682
  /**
4646
4683
  * Инициализирует экземпляр класса {@link ContragentUlR}.
4647
4684
  *
@@ -4656,7 +4693,7 @@ class yt extends mt {
4656
4693
  e && (this.kpp = e.kpp ?? "");
4657
4694
  }
4658
4695
  }
4659
- class Cs extends yt {
4696
+ class Rs extends at {
4660
4697
  /**
4661
4698
  * Инициализирует экземпляр класса {@link ContragentUlNr}.
4662
4699
  *
@@ -4667,7 +4704,7 @@ class Cs extends yt {
4667
4704
  /**
4668
4705
  * Страна регистрации юридического лица нерезидента.
4669
4706
  */
4670
- s(this, "registrationCountry", new we());
4707
+ s(this, "registrationCountry", new ve());
4671
4708
  /**
4672
4709
  * Регистрационный номер юридического лица нерезидента.
4673
4710
  */
@@ -4676,10 +4713,10 @@ class Cs extends yt {
4676
4713
  * Налоговый номер юридического лица нерезидента.
4677
4714
  */
4678
4715
  s(this, "taxNumber", "");
4679
- e && (this.registrationCountry = new we(e.registrationCountry), this.registrationNumber = e.registrationNumber ?? "", this.taxNumber = e.taxNumber ?? "");
4716
+ e && (this.registrationCountry = new ve(e.registrationCountry), this.registrationNumber = e.registrationNumber ?? "", this.taxNumber = e.taxNumber ?? "");
4680
4717
  }
4681
4718
  }
4682
- class Ke {
4719
+ class Xe {
4683
4720
  /**
4684
4721
  * Инициализирует и возвращает экземпляр класса с данными о контрагенте.
4685
4722
  *
@@ -4688,17 +4725,17 @@ class Ke {
4688
4725
  static createInstance(r) {
4689
4726
  switch (r.opf.slug) {
4690
4727
  case V.Ic:
4691
- return new mt(r);
4692
- case V.UlR:
4693
4728
  return new yt(r);
4729
+ case V.UlR:
4730
+ return new at(r);
4694
4731
  case V.UlNr:
4695
- return new Cs(r);
4732
+ return new Rs(r);
4696
4733
  default:
4697
- return new vs(r);
4734
+ return new ws(r);
4698
4735
  }
4699
4736
  }
4700
4737
  }
4701
- class _e extends gt {
4738
+ class _e extends ft {
4702
4739
  /**
4703
4740
  * Инициализирует экземпляр класса {@link DeliveryAddress}.
4704
4741
  *
@@ -4735,12 +4772,12 @@ class _e extends gt {
4735
4772
  * Признак того, что указанный адрес является адресом транспортной компании.
4736
4773
  */
4737
4774
  s(this, "isTransportCompanyAddress");
4738
- this.address = (e == null ? void 0 : e.address) ?? "", this.coordinates = new st(e == null ? void 0 : e.coordinates), this.contacts = ((t = e == null ? void 0 : e.contacts) == null ? void 0 : t.map((n) => new se(n))) ?? [], this.comment = e == null ? void 0 : e.comment, this.operatingHours = e == null ? void 0 : e.operatingHours, this.isOneTime = e == null ? void 0 : e.isOneTime, this.isTransportCompanyAddress = e == null ? void 0 : e.isTransportCompanyAddress;
4775
+ this.address = (e == null ? void 0 : e.address) ?? "", this.coordinates = new it(e == null ? void 0 : e.coordinates), this.contacts = ((t = e == null ? void 0 : e.contacts) == null ? void 0 : t.map((i) => new se(i))) ?? [], this.comment = e == null ? void 0 : e.comment, this.operatingHours = e == null ? void 0 : e.operatingHours, this.isOneTime = e == null ? void 0 : e.isOneTime, this.isTransportCompanyAddress = e == null ? void 0 : e.isTransportCompanyAddress;
4739
4776
  }
4740
4777
  }
4741
- class at extends R {
4778
+ class vt extends D {
4742
4779
  }
4743
- class wt extends R {
4780
+ class wt extends D {
4744
4781
  }
4745
4782
  class jr extends oe {
4746
4783
  /**
@@ -4750,7 +4787,7 @@ class jr extends oe {
4750
4787
  */
4751
4788
  // eslint-disable-next-line sonarjs/cognitive-complexity
4752
4789
  constructor(e) {
4753
- var t, n, o, c;
4790
+ var t, i, o, c;
4754
4791
  super(e);
4755
4792
  /**
4756
4793
  * @inheritDoc
@@ -4792,7 +4829,7 @@ class jr extends oe {
4792
4829
  * @inheritDoc
4793
4830
  */
4794
4831
  s(this, "extraData");
4795
- this.contragents = ((t = e == null ? void 0 : e.contragents) == null ? void 0 : t.map((u) => Ke.createInstance(u))) ?? [], this.partnerGroups = ((n = e == null ? void 0 : e.partnerGroups) == null ? void 0 : n.map((u) => new Re(u))) ?? [], this.contacts = ((o = e == null ? void 0 : e.contacts) == null ? void 0 : o.map((u) => new se(u))) ?? [], this.deliveryAddresses = ((c = e == null ? void 0 : e.deliveryAddresses) == null ? void 0 : c.map((u) => new _e(u))) ?? [], this.channelPrimaryInterest = new at(e == null ? void 0 : e.channelPrimaryInterest), this.sourcePrimaryInterest = new wt(e == null ? void 0 : e.sourcePrimaryInterest), this.preferredDeliveryType = new K(e == null ? void 0 : e.preferredDeliveryType), this.primaryDemand = e == null ? void 0 : e.primaryDemand, this.preferredWarehouse = e != null && e.preferredWarehouse ? new Me(e.preferredWarehouse) : void 0, this.extraData = (e == null ? void 0 : e.extraData) ?? {};
4832
+ this.contragents = ((t = e == null ? void 0 : e.contragents) == null ? void 0 : t.map((u) => Xe.createInstance(u))) ?? [], this.partnerGroups = ((i = e == null ? void 0 : e.partnerGroups) == null ? void 0 : i.map((u) => new Ce(u))) ?? [], this.contacts = ((o = e == null ? void 0 : e.contacts) == null ? void 0 : o.map((u) => new se(u))) ?? [], this.deliveryAddresses = ((c = e == null ? void 0 : e.deliveryAddresses) == null ? void 0 : c.map((u) => new _e(u))) ?? [], this.channelPrimaryInterest = new vt(e == null ? void 0 : e.channelPrimaryInterest), this.sourcePrimaryInterest = new wt(e == null ? void 0 : e.sourcePrimaryInterest), this.preferredDeliveryType = new K(e == null ? void 0 : e.preferredDeliveryType), this.primaryDemand = e == null ? void 0 : e.primaryDemand, this.preferredWarehouse = e != null && e.preferredWarehouse ? new Me(e.preferredWarehouse) : void 0, this.extraData = (e == null ? void 0 : e.extraData) ?? {};
4796
4833
  }
4797
4834
  }
4798
4835
  class gi extends Fe {
@@ -4802,7 +4839,7 @@ class gi extends Fe {
4802
4839
  * @param data Данные для первоначальной инициализации.
4803
4840
  */
4804
4841
  constructor(e) {
4805
- var t, n, o, c, u, p, g, a;
4842
+ var t, i, o, c, u, p, g, a;
4806
4843
  super();
4807
4844
  /**
4808
4845
  * @inheritDoc
@@ -4851,11 +4888,11 @@ class gi extends Fe {
4851
4888
  /**
4852
4889
  * @inheritDoc
4853
4890
  */
4854
- s(this, "createdAt", new A());
4891
+ s(this, "createdAt", new b());
4855
4892
  /**
4856
4893
  * @inheritDoc
4857
4894
  */
4858
- s(this, "lastLoginDate", new A());
4895
+ s(this, "lastLoginDate", new b());
4859
4896
  /**
4860
4897
  * @inheritDoc
4861
4898
  */
@@ -4907,12 +4944,12 @@ class gi extends Fe {
4907
4944
  /**
4908
4945
  * @inheritDoc
4909
4946
  */
4910
- s(this, "noOrdersPeriod", new A());
4911
- this.id = e == null ? void 0 : e.id, this.guid = e == null ? void 0 : e.guid, this.name = e == null ? void 0 : e.name, this.alternativeName = e == null ? void 0 : e.alternativeName, this.searchTerm = e == null ? void 0 : e.searchTerm, this.cities = (t = e == null ? void 0 : e.cities) == null ? void 0 : t.map((P) => new Ce(P)), this.region = new ve(e == null ? void 0 : e.region), this.country = new we(e == null ? void 0 : e.country), this.phone = e == null ? void 0 : e.phone, this.email = e == null ? void 0 : e.email, this.isActive = e && Object.prototype.hasOwnProperty.call(e, "isActive") ? e == null ? void 0 : e.isActive : !0, this.createdAt = new A(e == null ? void 0 : e.createdAt), this.lastLoginDate = new A(e == null ? void 0 : e.lastLoginDate), this.lastLoginDateHasOrder = (e == null ? void 0 : e.lastLoginDateHasOrder) ?? void 0, this.managers = ((n = e == null ? void 0 : e.managers) == null ? void 0 : n.map((P) => new Z(P))) ?? [], this.includeSubordinateManagers = (e == null ? void 0 : e.includeSubordinateManagers) ?? !0, this.curators = ((o = e == null ? void 0 : e.curators) == null ? void 0 : o.map((P) => new xr(P))) ?? [], this.salesDirections = (c = e == null ? void 0 : e.salesDirections) == null ? void 0 : c.map((P) => new U(P)), this.contragentInn = e == null ? void 0 : e.contragentInn, this.contragentType = new ie(e == null ? void 0 : e.contragentType), this.preferredDeliveryType = e != null && e.preferredDeliveryType ? new K(e == null ? void 0 : e.preferredDeliveryType) : void 0, this.partnerGroups = (u = e == null ? void 0 : e.partnerGroups) == null ? void 0 : u.map((P) => new Re(P)), this.contact = new Dr(e == null ? void 0 : e.contact), this.lastOrder = {
4912
- createdAt: new A((p = e == null ? void 0 : e.lastOrder) == null ? void 0 : p.createdAt),
4947
+ s(this, "noOrdersPeriod", new b());
4948
+ this.id = e == null ? void 0 : e.id, this.guid = e == null ? void 0 : e.guid, this.name = e == null ? void 0 : e.name, this.alternativeName = e == null ? void 0 : e.alternativeName, this.searchTerm = e == null ? void 0 : e.searchTerm, this.cities = (t = e == null ? void 0 : e.cities) == null ? void 0 : t.map((P) => new Re(P)), this.region = new we(e == null ? void 0 : e.region), this.country = new ve(e == null ? void 0 : e.country), this.phone = e == null ? void 0 : e.phone, this.email = e == null ? void 0 : e.email, this.isActive = e && Object.prototype.hasOwnProperty.call(e, "isActive") ? e == null ? void 0 : e.isActive : !0, this.createdAt = new b(e == null ? void 0 : e.createdAt), this.lastLoginDate = new b(e == null ? void 0 : e.lastLoginDate), this.lastLoginDateHasOrder = (e == null ? void 0 : e.lastLoginDateHasOrder) ?? void 0, this.managers = ((i = e == null ? void 0 : e.managers) == null ? void 0 : i.map((P) => new Z(P))) ?? [], this.includeSubordinateManagers = (e == null ? void 0 : e.includeSubordinateManagers) ?? !0, this.curators = ((o = e == null ? void 0 : e.curators) == null ? void 0 : o.map((P) => new xr(P))) ?? [], this.salesDirections = (c = e == null ? void 0 : e.salesDirections) == null ? void 0 : c.map((P) => new U(P)), this.contragentInn = e == null ? void 0 : e.contragentInn, this.contragentType = new ie(e == null ? void 0 : e.contragentType), this.preferredDeliveryType = e != null && e.preferredDeliveryType ? new K(e == null ? void 0 : e.preferredDeliveryType) : void 0, this.partnerGroups = (u = e == null ? void 0 : e.partnerGroups) == null ? void 0 : u.map((P) => new Ce(P)), this.contact = new Dr(e == null ? void 0 : e.contact), this.lastOrder = {
4949
+ createdAt: new b((p = e == null ? void 0 : e.lastOrder) == null ? void 0 : p.createdAt),
4913
4950
  creator: (g = e == null ? void 0 : e.lastOrder) == null ? void 0 : g.creator,
4914
4951
  isApproved: (a = e == null ? void 0 : e.lastOrder) == null ? void 0 : a.isApproved
4915
- }, this.noOrdersPeriod = new A(e == null ? void 0 : e.noOrdersPeriod);
4952
+ }, this.noOrdersPeriod = new b(e == null ? void 0 : e.noOrdersPeriod);
4916
4953
  }
4917
4954
  /**
4918
4955
  * @inheritDoc
@@ -4923,7 +4960,7 @@ class gi extends Fe {
4923
4960
  this.cities = [];
4924
4961
  break;
4925
4962
  case "region":
4926
- this.region = new ve();
4963
+ this.region = new we();
4927
4964
  break;
4928
4965
  case "isActive":
4929
4966
  this.isActive = !0;
@@ -4971,12 +5008,12 @@ class gi extends Fe {
4971
5008
  * @inheritDoc
4972
5009
  */
4973
5010
  asClearRaw() {
4974
- var t, n, o, c, u, p;
5011
+ var t, i, o, c, u, p;
4975
5012
  const e = super.asClearRaw();
4976
- return !((t = e == null ? void 0 : e.createdAt) != null && t.from) && !((n = e == null ? void 0 : e.createdAt) != null && n.to) && delete e.createdAt, !((o = e == null ? void 0 : e.lastLoginDate) != null && o.from) && !((c = e == null ? void 0 : e.lastLoginDate) != null && c.to) && delete e.lastLoginDate, !((u = e == null ? void 0 : e.noOrdersPeriod) != null && u.from) && !((p = e == null ? void 0 : e.noOrdersPeriod) != null && p.to) && delete e.noOrdersPeriod, e;
5013
+ return !((t = e == null ? void 0 : e.createdAt) != null && t.from) && !((i = e == null ? void 0 : e.createdAt) != null && i.to) && delete e.createdAt, !((o = e == null ? void 0 : e.lastLoginDate) != null && o.from) && !((c = e == null ? void 0 : e.lastLoginDate) != null && c.to) && delete e.lastLoginDate, !((u = e == null ? void 0 : e.noOrdersPeriod) != null && u.from) && !((p = e == null ? void 0 : e.noOrdersPeriod) != null && p.to) && delete e.noOrdersPeriod, e;
4977
5014
  }
4978
5015
  }
4979
- class vt extends G {
5016
+ class Rt extends G {
4980
5017
  /**
4981
5018
  * Инициализирует экземпляр класса {@link OrderShortInfo}.
4982
5019
  *
@@ -4992,17 +5029,17 @@ class vt extends G {
4992
5029
  * @inheritDoc
4993
5030
  */
4994
5031
  s(this, "creator");
4995
- this.createdAt = D(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.creator = new N(e == null ? void 0 : e.creator);
5032
+ this.createdAt = R(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.creator = new N(e == null ? void 0 : e.creator);
4996
5033
  }
4997
5034
  }
4998
- class Rs extends L {
5035
+ class Cs extends L {
4999
5036
  /**
5000
5037
  * Инициализирует экземпляр класса {@link ClientAdditionalData}.
5001
5038
  *
5002
5039
  * @param data Данные для первоначальной инициализации.
5003
5040
  */
5004
5041
  constructor(e) {
5005
- var t, n, o, c;
5042
+ var t, i, o, c;
5006
5043
  super(e);
5007
5044
  /**
5008
5045
  * @inheritDoc
@@ -5032,7 +5069,7 @@ class Rs extends L {
5032
5069
  * @inheritDoc
5033
5070
  */
5034
5071
  s(this, "curators");
5035
- this.contacts = ((t = e.contacts) == null ? void 0 : t.map((u) => new se(u))) ?? void 0, this.lastOrder = e.lastOrder ? new vt(e.lastOrder) : void 0, this.partnerGroups = ((n = e.partnerGroups) == null ? void 0 : n.map((u) => new Re(u))) ?? void 0, this.preferredDeliveryType = e.preferredDeliveryType ? new K(e.preferredDeliveryType) : void 0, this.salesDirection = e.salesDirection ? new U(e.salesDirection) : void 0, this.managers = ((o = e.managers) == null ? void 0 : o.map((u) => new Lr(u))) ?? void 0, this.curators = ((c = e.curators) == null ? void 0 : c.map((u) => new xr(u))) ?? void 0;
5072
+ this.contacts = ((t = e.contacts) == null ? void 0 : t.map((u) => new se(u))) ?? void 0, this.lastOrder = e.lastOrder ? new Rt(e.lastOrder) : void 0, this.partnerGroups = ((i = e.partnerGroups) == null ? void 0 : i.map((u) => new Ce(u))) ?? void 0, this.preferredDeliveryType = e.preferredDeliveryType ? new K(e.preferredDeliveryType) : void 0, this.salesDirection = e.salesDirection ? new U(e.salesDirection) : void 0, this.managers = ((o = e.managers) == null ? void 0 : o.map((u) => new Lr(u))) ?? void 0, this.curators = ((c = e.curators) == null ? void 0 : c.map((u) => new xr(u))) ?? void 0;
5036
5073
  }
5037
5074
  }
5038
5075
  class gr extends G {
@@ -5089,7 +5126,7 @@ class H extends Y {
5089
5126
  return {
5090
5127
  name: r.name,
5091
5128
  alternative_name: r.alternativeName,
5092
- partner_groups: r.partnerGroups.map((n) => n.id),
5129
+ partner_groups: r.partnerGroups.map((i) => i.id),
5093
5130
  phone: r.phone,
5094
5131
  email: r.email,
5095
5132
  city_id: r.city.id,
@@ -5108,7 +5145,7 @@ class H extends Y {
5108
5145
  static transformContragentClientDataToRequest(r) {
5109
5146
  var c, u, p, g;
5110
5147
  let e;
5111
- const t = r, n = r, o = r;
5148
+ const t = r, i = r, o = r;
5112
5149
  switch (r.opf.slug) {
5113
5150
  case V.Ic:
5114
5151
  e = {
@@ -5119,6 +5156,7 @@ class H extends Y {
5119
5156
  comment: t.comment,
5120
5157
  inn: t.inn,
5121
5158
  okpo: t.okpo,
5159
+ ogrn: t.ogrn || void 0,
5122
5160
  director_name: t.directorName,
5123
5161
  director_position: t.directorPosition,
5124
5162
  director_acts_on: t.directorActsOn,
@@ -5129,20 +5167,21 @@ class H extends Y {
5129
5167
  break;
5130
5168
  case V.UlR:
5131
5169
  e = {
5132
- opf: n.opf.slug,
5133
- name: n.name,
5134
- alternative_name: n.alternativeName,
5135
- partner_group_id: (u = n.partnerGroup) == null ? void 0 : u.id,
5136
- comment: n.comment,
5137
- inn: n.inn,
5138
- kpp: n.kpp,
5139
- okpo: n.okpo,
5140
- director_name: n.directorName,
5141
- director_position: n.directorPosition,
5142
- director_acts_on: n.directorActsOn,
5143
- legal_address: n.legalAddress,
5144
- postal_address: n.postalAddress,
5145
- actual_address: n.actualAddress
5170
+ opf: i.opf.slug,
5171
+ name: i.name,
5172
+ alternative_name: i.alternativeName,
5173
+ partner_group_id: (u = i.partnerGroup) == null ? void 0 : u.id,
5174
+ comment: i.comment,
5175
+ inn: i.inn,
5176
+ kpp: i.kpp,
5177
+ okpo: i.okpo,
5178
+ ogrn: i.ogrn || void 0,
5179
+ director_name: i.directorName,
5180
+ director_position: i.directorPosition,
5181
+ director_acts_on: i.directorActsOn,
5182
+ legal_address: i.legalAddress,
5183
+ postal_address: i.postalAddress,
5184
+ actual_address: i.actualAddress
5146
5185
  };
5147
5186
  break;
5148
5187
  case V.UlNr:
@@ -5181,7 +5220,7 @@ class H extends Y {
5181
5220
  * @param deliveryAddress Данные об адресе доставки клиенту.
5182
5221
  */
5183
5222
  static transformClientDeliveryAddressToRequest(r) {
5184
- var t, n;
5223
+ var t, i;
5185
5224
  const e = {
5186
5225
  address: r.address,
5187
5226
  is_one_time: r.isOneTime ?? !1,
@@ -5190,7 +5229,7 @@ class H extends Y {
5190
5229
  };
5191
5230
  return r.coordinates && (e.coordinates = {
5192
5231
  lat: (t = r.coordinates) == null ? void 0 : t.lat,
5193
- long: (n = r.coordinates) == null ? void 0 : n.long
5232
+ long: (i = r.coordinates) == null ? void 0 : i.long
5194
5233
  }), r.operatingHours && (e.operating_hours = {
5195
5234
  from: r.operatingHours.from,
5196
5235
  to: r.operatingHours.to
@@ -5230,8 +5269,8 @@ class H extends Y {
5230
5269
  *
5231
5270
  * @see /doc/api/internal#/Клиенты/api_internal_client_get_list
5232
5271
  */
5233
- getClientsList(r, e, t, n, o = void 0) {
5234
- return this.getTypedPaginated(oe, "/internal/clients", r, e, t, n, void 0, o);
5272
+ getClientsList(r, e, t, i, o = void 0) {
5273
+ return this.getTypedPaginated(oe, "/internal/clients", r, e, t, i, void 0, o);
5235
5274
  }
5236
5275
  /**
5237
5276
  * Выполняет поиск клиентов по терму в строке.
@@ -5264,11 +5303,11 @@ class H extends Y {
5264
5303
  * @see /doc/api/internal#/Клиенты/api_internal_client_get_additional_data_for_clients_list
5265
5304
  */
5266
5305
  getAdditionalClientsData(r, e) {
5267
- const t = r.map((n) => n.id);
5306
+ const t = r.map((i) => i.id);
5268
5307
  return this.post(
5269
5308
  "/internal/clients/additional-data",
5270
5309
  { clients: t, requested_data_types: e },
5271
- (n) => _.instanceListInitializer(Rs, n.data)
5310
+ (i) => _.instanceListInitializer(Cs, i.data)
5272
5311
  );
5273
5312
  }
5274
5313
  /**
@@ -5322,7 +5361,7 @@ class H extends Y {
5322
5361
  * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
5323
5362
  * @see /doc/api/internal#/Клиенты/api_internal_client_change
5324
5363
  */
5325
- changeClientPassword(r, e, t, n = {}) {
5364
+ changeClientPassword(r, e, t, i = {}) {
5326
5365
  return this.patch(
5327
5366
  `/internal/clients/${r}`,
5328
5367
  {
@@ -5330,7 +5369,7 @@ class H extends Y {
5330
5369
  password_confirmation: t
5331
5370
  },
5332
5371
  void 0,
5333
- n
5372
+ i
5334
5373
  );
5335
5374
  }
5336
5375
  /**
@@ -5360,7 +5399,7 @@ class H extends Y {
5360
5399
  * @see /doc/api/internal#/Клиенты/api_internal_client_manager_attach
5361
5400
  */
5362
5401
  async attachClientToManagers(r, e) {
5363
- const t = e.map((n) => this.patch(`/internal/clients/${r}/managers/${n.id}/attach`, { is_primary: n.isDefault }));
5402
+ const t = e.map((i) => this.patch(`/internal/clients/${r}/managers/${i.id}/attach`, { is_primary: i.isDefault }));
5364
5403
  await Promise.all(t);
5365
5404
  }
5366
5405
  /**
@@ -5372,7 +5411,7 @@ class H extends Y {
5372
5411
  * @see /doc/api/internal#/Клиенты/api_internal_client_manager_detach
5373
5412
  */
5374
5413
  async detachClientFromManagers(r, e) {
5375
- const t = e.map((n) => this.patch(`/internal/clients/${r}/managers/${n.id}/detach`));
5414
+ const t = e.map((i) => this.patch(`/internal/clients/${r}/managers/${i.id}/detach`));
5376
5415
  await Promise.all(t);
5377
5416
  }
5378
5417
  /**
@@ -5428,7 +5467,7 @@ class H extends Y {
5428
5467
  return this.post(
5429
5468
  `/internal/clients/${r}/contragents`,
5430
5469
  H.transformContragentClientDataToRequest(e),
5431
- (n) => Ke.createInstance(n.data),
5470
+ (i) => Xe.createInstance(i.data),
5432
5471
  t
5433
5472
  );
5434
5473
  }
@@ -5444,7 +5483,7 @@ class H extends Y {
5444
5483
  return this.patch(
5445
5484
  `/internal/clients/${r}/contragents/${e.id}`,
5446
5485
  H.transformContragentClientDataToRequest(e),
5447
- (n) => Ke.createInstance(n.data),
5486
+ (i) => Xe.createInstance(i.data),
5448
5487
  t
5449
5488
  );
5450
5489
  }
@@ -5479,7 +5518,7 @@ class H extends Y {
5479
5518
  return this.post(
5480
5519
  `/internal/clients/${r}/delivery-addresses`,
5481
5520
  H.transformClientDeliveryAddressToRequest(e),
5482
- (n) => new _e(n.data),
5521
+ (i) => new _e(i.data),
5483
5522
  t
5484
5523
  );
5485
5524
  }
@@ -5495,7 +5534,7 @@ class H extends Y {
5495
5534
  return this.patch(
5496
5535
  `/internal/clients/${r}/delivery-addresses/${e.id}`,
5497
5536
  H.transformClientDeliveryAddressToRequest(e),
5498
- (n) => new _e(n.data),
5537
+ (i) => new _e(i.data),
5499
5538
  t
5500
5539
  );
5501
5540
  }
@@ -5518,12 +5557,12 @@ class H extends Y {
5518
5557
  * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
5519
5558
  * @see /doc/api/internal#/Банковские реквизиты/api_internal_client_contragent_bank_accounts_create
5520
5559
  */
5521
- createContragentBankAccount(r, e, t, n = {}) {
5560
+ createContragentBankAccount(r, e, t, i = {}) {
5522
5561
  return this.post(
5523
5562
  `/internal/clients/${r}/contragents/${e}/bank-accounts`,
5524
5563
  H.transformClientContragentBankAccountToRequest(t),
5525
- (o) => new Rr(o.data),
5526
- n
5564
+ (o) => new Cr(o.data),
5565
+ i
5527
5566
  );
5528
5567
  }
5529
5568
  /**
@@ -5535,12 +5574,12 @@ class H extends Y {
5535
5574
  * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
5536
5575
  * @see /doc/api/internal#/Адреса доставки/api_internal_client_delivery_address_update
5537
5576
  */
5538
- updateContragentBankAccount(r, e, t, n = {}) {
5577
+ updateContragentBankAccount(r, e, t, i = {}) {
5539
5578
  return this.patch(
5540
5579
  `/internal/clients/${r}/contragents/${e}/bank-accounts/${t.id}`,
5541
5580
  H.transformClientContragentBankAccountToRequest(t),
5542
- (o) => new Rr(o.data),
5543
- n
5581
+ (o) => new Cr(o.data),
5582
+ i
5544
5583
  );
5545
5584
  }
5546
5585
  /**
@@ -5595,7 +5634,7 @@ class H extends Y {
5595
5634
  comment: e.comment,
5596
5635
  not_disturb: e.notDisturb
5597
5636
  },
5598
- (n) => new se(n.data),
5637
+ (i) => new se(i.data),
5599
5638
  t
5600
5639
  );
5601
5640
  }
@@ -5628,7 +5667,7 @@ class H extends Y {
5628
5667
  * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
5629
5668
  * @see /doc/api/internal#/Контакты/api_internal_client_contact_create
5630
5669
  */
5631
- createContragentContact(r, e, t, n = {}) {
5670
+ createContragentContact(r, e, t, i = {}) {
5632
5671
  return this.createContact(
5633
5672
  r,
5634
5673
  t,
@@ -5641,7 +5680,7 @@ class H extends Y {
5641
5680
  }
5642
5681
  ]
5643
5682
  },
5644
- n
5683
+ i
5645
5684
  );
5646
5685
  }
5647
5686
  /**
@@ -5675,7 +5714,7 @@ class H extends Y {
5675
5714
  * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
5676
5715
  * @see /doc/api/internal#/Контакты/api_internal_client_contact_create
5677
5716
  */
5678
- createDeliveryAddressContact(r, e, t, n = {}) {
5717
+ createDeliveryAddressContact(r, e, t, i = {}) {
5679
5718
  return this.createContact(
5680
5719
  r,
5681
5720
  t,
@@ -5688,7 +5727,7 @@ class H extends Y {
5688
5727
  }
5689
5728
  ]
5690
5729
  },
5691
- n
5730
+ i
5692
5731
  );
5693
5732
  }
5694
5733
  /**
@@ -5724,7 +5763,7 @@ class H extends Y {
5724
5763
  * @param extraData Дополнительные данные
5725
5764
  * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
5726
5765
  */
5727
- createContact(r, e, t, n = {}) {
5766
+ createContact(r, e, t, i = {}) {
5728
5767
  var c, u;
5729
5768
  const o = {
5730
5769
  name: e.name,
@@ -5732,7 +5771,7 @@ class H extends Y {
5732
5771
  comment: e.comment,
5733
5772
  ...t
5734
5773
  };
5735
- return (c = e.phone) != null && c.length && (o.phone = e.phone), (u = e.email) != null && u.length && (o.email = e.email), this.post(`/internal/clients/${r}/contacts`, o, (p) => new se(p.data), n);
5774
+ return (c = e.phone) != null && c.length && (o.phone = e.phone), (u = e.email) != null && u.length && (o.email = e.email), this.post(`/internal/clients/${r}/contacts`, o, (p) => new se(p.data), i);
5736
5775
  }
5737
5776
  /**
5738
5777
  * Устанавливает признак основного контактного лица.
@@ -5769,8 +5808,8 @@ class fi extends h {
5769
5808
  */
5770
5809
  checkPhoneIsBusy(r) {
5771
5810
  return new Promise((e, t) => {
5772
- this.request({ method: "GET", url: "/public/user/verification/phone/check", params: { phone: r } }).then((n) => {
5773
- e(!!n.isBusy);
5811
+ this.request({ method: "GET", url: "/public/user/verification/phone/check", params: { phone: r } }).then((i) => {
5812
+ e(!!i.isBusy);
5774
5813
  }).catch(t);
5775
5814
  });
5776
5815
  }
@@ -5794,10 +5833,10 @@ class mi {
5794
5833
  * Текущая версия приложения.
5795
5834
  */
5796
5835
  s(this, "version");
5797
- this.date = D(r == null ? void 0 : r.date) ? C(r.date) : (r == null ? void 0 : r.date) ?? /* @__PURE__ */ new Date(), this.name = (r == null ? void 0 : r.name) ?? "", this.version = (r == null ? void 0 : r.version) ?? "0.0.0";
5836
+ this.date = R(r == null ? void 0 : r.date) ? C(r.date) : (r == null ? void 0 : r.date) ?? /* @__PURE__ */ new Date(), this.name = (r == null ? void 0 : r.name) ?? "", this.version = (r == null ? void 0 : r.version) ?? "0.0.0";
5798
5837
  }
5799
5838
  }
5800
- var Ts = /* @__PURE__ */ ((i) => (i.Kozyrek = "kozyrek", i.Mosquitto = "mosquitto", i.Strip = "strip", i.MetalForDoors = "metal_for_doors", i.Sandwich = "sandwich", i.SandwichM2 = "sandwich_m2", i))(Ts || {});
5839
+ var Ts = /* @__PURE__ */ ((n) => (n.Kozyrek = "kozyrek", n.Mosquitto = "mosquitto", n.Strip = "strip", n.MetalForDoors = "metal_for_doors", n.Sandwich = "sandwich", n.SandwichM2 = "sandwich_m2", n))(Ts || {});
5801
5840
  class yi extends h {
5802
5841
  /**
5803
5842
  * Возвращает настройки указанного конфигуратора для указанной категории.
@@ -5823,16 +5862,16 @@ class yi extends h {
5823
5862
  *
5824
5863
  * @see /doc/api/internal#/Каталог/api_internal_catalog_categories_configurator_products_get
5825
5864
  */
5826
- searchProduct(r, e, t, n = {}) {
5865
+ searchProduct(r, e, t, i = {}) {
5827
5866
  var o;
5828
5867
  return this.request(
5829
5868
  {
5830
5869
  method: "GET",
5831
5870
  url: `internal/catalog/categories/${r.id}/configurators/${(o = r.properties) == null ? void 0 : o.configurator}/product`,
5832
- params: { client_id: e, ...t }
5871
+ params: { params: t, client_id: e }
5833
5872
  },
5834
5873
  (c) => new q(c.data),
5835
- n
5874
+ i
5836
5875
  );
5837
5876
  }
5838
5877
  /**
@@ -5848,7 +5887,7 @@ class yi extends h {
5848
5887
  * @see /doc/api/internal#/Каталог/api_internal_catalog_categories_configurator_template_create
5849
5888
  */
5850
5889
  // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
5851
- createTemplate(r, e, t, n = {}) {
5890
+ createTemplate(r, e, t, i = {}) {
5852
5891
  var o;
5853
5892
  return this.post(
5854
5893
  `internal/catalog/categories/${r.id}/configurators/${(o = r.properties) == null ? void 0 : o.configurator}/template?client_id=${e}`,
@@ -5856,7 +5895,7 @@ class yi extends h {
5856
5895
  // eslint-disable-next-line lodash/prefer-noop, @typescript-eslint/no-empty-function
5857
5896
  () => {
5858
5897
  },
5859
- n
5898
+ i
5860
5899
  );
5861
5900
  }
5862
5901
  /**
@@ -5870,8 +5909,8 @@ class yi extends h {
5870
5909
  */
5871
5910
  // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
5872
5911
  removeTemplate(r, e, t) {
5873
- var n;
5874
- return this.delete(`internal/catalog/categories/${r.id}/configurators/${(n = r.properties) == null ? void 0 : n.configurator}/template/${t}?client_id=${e}`);
5912
+ var i;
5913
+ return this.delete(`internal/catalog/categories/${r.id}/configurators/${(i = r.properties) == null ? void 0 : i.configurator}/template/${t}?client_id=${e}`);
5875
5914
  }
5876
5915
  /**
5877
5916
  * Выполняет расчет, через указанный конфигуратор с переданными параметрами.
@@ -5883,8 +5922,8 @@ class yi extends h {
5883
5922
  * @see /doc/api/internal#/Каталог/api_public_catalog_categories_category_configurator_calculate
5884
5923
  */
5885
5924
  calculate(r, e, t) {
5886
- var n;
5887
- return this.get(`internal/catalog/categories/${r.id}/configurators/${(n = r.properties) == null ? void 0 : n.configurator}/calculate`, {
5925
+ var i;
5926
+ return this.get(`internal/catalog/categories/${r.id}/configurators/${(i = r.properties) == null ? void 0 : i.configurator}/calculate`, {
5888
5927
  client_id: e,
5889
5928
  ...t
5890
5929
  });
@@ -5939,7 +5978,7 @@ class ai extends Ps {
5939
5978
  this.itemCount = (e == null ? void 0 : e.itemCount) ?? 0, this.pageCount = (e == null ? void 0 : e.pageCount) ?? 1, this.pageSlot = (e == null ? void 0 : e.pageSlot) ?? 5, this.pageSizes = (e == null ? void 0 : e.pageSizes) ?? [25, 50, 100], this.showSizePicker = (e == null ? void 0 : e.showSizePicker) ?? !0;
5940
5979
  }
5941
5980
  }
5942
- class wi {
5981
+ class vi {
5943
5982
  /**
5944
5983
  * Инициализирует экземпляр класса {@link ISortRequestParams}.
5945
5984
  *
@@ -5974,8 +6013,8 @@ class y {
5974
6013
  * @param shift Смещение в декадах, может быть отрицательным.
5975
6014
  */
5976
6015
  static shiftDecadeInterval(r, e) {
5977
- const [t, n] = y.shiftedDecadeBounds(r, e);
5978
- return { from: t, to: n };
6016
+ const [t, i] = y.shiftedDecadeBounds(r, e);
6017
+ return { from: t, to: i };
5979
6018
  }
5980
6019
  /**
5981
6020
  * Возвращает начало полугодия, в которое попадает указанная дата.
@@ -6012,8 +6051,8 @@ class y {
6012
6051
  * @param date Опорная дата.
6013
6052
  */
6014
6053
  static intervalTillSameDate(r, e, t) {
6015
- const n = Wt(E(t), E(r)), o = E($(e, n)), c = Math.min(qr(t), zt(o));
6016
- return { from: ge(e), to: W(jt(o, c)) };
6054
+ const i = zt(E(t), E(r)), o = E($(e, i)), c = Math.min(qr(t), Wt(o));
6055
+ return { from: ge(e), to: z(jt(o, c)) };
6017
6056
  }
6018
6057
  /**
6019
6058
  * Возвращает интервал «сдвинутая неделя до такого же дня недели»; недели начинаются с понедельника.
@@ -6022,8 +6061,8 @@ class y {
6022
6061
  * @param shiftWeeks Смещение в неделях, может быть отрицательным.
6023
6062
  */
6024
6063
  static weekTillSameWeekday(r, e) {
6025
- const t = ee(ar(r, e), { weekStartsOn: 1 }), n = We(r, ee(r, { weekStartsOn: 1 }));
6026
- return { from: t, to: W(re(t, n)) };
6064
+ const t = ee(ar(r, e), { weekStartsOn: 1 }), i = We(r, ee(r, { weekStartsOn: 1 }));
6065
+ return { from: t, to: z(re(t, i)) };
6027
6066
  }
6028
6067
  /**
6029
6068
  * Возвращает интервал «сдвинутая декада до такого же номера дня»; если в целевой декаде дня с таким
@@ -6033,8 +6072,8 @@ class y {
6033
6072
  * @param shift Смещение в декадах, может быть отрицательным.
6034
6073
  */
6035
6074
  static decadeTillSameDayNumber(r, e) {
6036
- const [t] = y.shiftedDecadeBounds(r, 0), n = We(r, t) + 1, [o, c] = y.shiftedDecadeBounds(r, e), u = We(c, o) + 1;
6037
- return { from: o, to: W(re(o, Math.min(n, u) - 1)) };
6075
+ const [t] = y.shiftedDecadeBounds(r, 0), i = We(r, t) + 1, [o, c] = y.shiftedDecadeBounds(r, e), u = We(c, o) + 1;
6076
+ return { from: o, to: z(re(o, Math.min(i, u) - 1)) };
6038
6077
  }
6039
6078
  /**
6040
6079
  * Возвращает пару «начало и конец декады», отстоящей от декады указанной даты на заданное число декад.
@@ -6044,9 +6083,9 @@ class y {
6044
6083
  */
6045
6084
  static shiftedDecadeBounds(r, e) {
6046
6085
  const t = qr(r);
6047
- let n = 2;
6048
- t <= 10 ? n = 0 : t <= 20 && (n = 1);
6049
- const o = n + e, c = Math.floor(o / 3), u = (o % 3 + 3) % 3, p = E($(r, c)), g = re(p, u * 10), a = u === 2 ? x(p) : W(re(g, 9));
6086
+ let i = 2;
6087
+ t <= 10 ? i = 0 : t <= 20 && (i = 1);
6088
+ const o = i + e, c = Math.floor(o / 3), u = (o % 3 + 3) % 3, p = E($(r, c)), g = re(p, u * 10), a = u === 2 ? x(p) : z(re(g, 9));
6050
6089
  return [g, a];
6051
6090
  }
6052
6091
  }
@@ -6060,56 +6099,56 @@ class Tr {
6060
6099
  static parse(r) {
6061
6100
  if (m(r))
6062
6101
  return;
6063
- const e = D(r) ? C(r) : r;
6102
+ const e = R(r) ? C(r) : r;
6064
6103
  return Gt(e) ? e : void 0;
6065
6104
  }
6066
6105
  }
6067
- function vi(i) {
6068
- return k(ze(qe(), i), "yyyy-MM-dd");
6106
+ function wi(n) {
6107
+ return k(je(qe(), n), "yyyy-MM-dd");
6069
6108
  }
6070
- function bs(i, r) {
6071
- const e = [2, 0, 1, 1, 1, 2], t = Math.floor(Math.abs(i));
6109
+ function As(n, r) {
6110
+ const e = [2, 0, 1, 1, 1, 2], t = Math.floor(Math.abs(n));
6072
6111
  return r[t % 100 > 4 && t % 100 < 20 ? 2 : e[Math.min(t % 10, 5)]];
6073
6112
  }
6074
- function Ci(i) {
6075
- const r = C(i), e = We(qe(), r);
6113
+ function Ri(n) {
6114
+ const r = C(n), e = We(qe(), r);
6076
6115
  switch (!0) {
6077
6116
  case e === 0:
6078
6117
  return "Сегодня";
6079
6118
  case e === 1:
6080
6119
  return "Вчера";
6081
6120
  case e < 0:
6082
- return i;
6121
+ return n;
6083
6122
  default:
6084
- return `${e} ${bs(e, ["день", "дня", "дней"])} назад`;
6123
+ return `${e} ${As(e, ["день", "дня", "дней"])} назад`;
6085
6124
  }
6086
6125
  }
6087
- class Ri {
6126
+ class Ci {
6088
6127
  /**
6089
6128
  * Возвращает предустановленные диапазоны дат.
6090
6129
  *
6091
6130
  * @param year Год, от которого считаются годовые периоды (1/3/9 месяцев, кварталы, полугодия, год); по умолчанию текущий.
6092
6131
  */
6093
6132
  static defaultDateRanges(r) {
6094
- const e = Yt(/* @__PURE__ */ new Date(), 1), t = /* @__PURE__ */ new Date(), n = ue(r === void 0 ? t : new Date(r, 0, 1)), o = de(n);
6133
+ const e = Yt(/* @__PURE__ */ new Date(), 1), t = /* @__PURE__ */ new Date(), i = ue(r === void 0 ? t : new Date(r, 0, 1)), o = de(i);
6095
6134
  return {
6096
6135
  // 'Следующий рабочий день' - это значение по-умолчанию
6097
- nextWorkingDay: { label: "Следующий рабочий день", from: ge(e), to: W(e) },
6136
+ nextWorkingDay: { label: "Следующий рабочий день", from: ge(e), to: z(e) },
6098
6137
  today: { label: "Сегодня", from: qe(), to: Xt() },
6099
6138
  yesterday: { label: "Вчера", from: Kt(), to: Jt() },
6100
6139
  tomorrow: { label: "Завтра", from: Vt(), to: Qt() },
6101
6140
  currentWeek: { label: "Неделя", from: ee(t, { weekStartsOn: 1 }), to: $e(t, { weekStartsOn: 1 }) },
6102
6141
  currentMonth: { label: "Месяц", from: E(t), to: x(t) },
6103
- oneMonth: { label: "1 месяц", from: n, to: x(n) },
6104
- threeMonths: { label: "3 месяца", from: n, to: x($(n, 2)) },
6105
- nineMonths: { label: "9 месяцев", from: n, to: x($(n, 8)) },
6106
- firstQuarter: { label: "I квартал", from: n, to: x($(n, 2)) },
6107
- secondQuarter: { label: "II квартал", from: $(n, 3), to: x($(n, 5)) },
6108
- thirdQuarter: { label: "III квартал", from: $(n, 6), to: x($(n, 8)) },
6109
- fourthQuarter: { label: "IV квартал", from: $(n, 9), to: x($(n, 11)) },
6110
- firstHalfYear: { label: "I полугодие", from: n, to: x($(n, 5)) },
6111
- secondHalfYear: { label: "II полугодие", from: $(n, 6), to: o },
6112
- currentYear: { label: "12 месяцев", from: n, to: o }
6142
+ oneMonth: { label: "1 месяц", from: i, to: x(i) },
6143
+ threeMonths: { label: "3 месяца", from: i, to: x($(i, 2)) },
6144
+ nineMonths: { label: "9 месяцев", from: i, to: x($(i, 8)) },
6145
+ firstQuarter: { label: "I квартал", from: i, to: x($(i, 2)) },
6146
+ secondQuarter: { label: "II квартал", from: $(i, 3), to: x($(i, 5)) },
6147
+ thirdQuarter: { label: "III квартал", from: $(i, 6), to: x($(i, 8)) },
6148
+ fourthQuarter: { label: "IV квартал", from: $(i, 9), to: x($(i, 11)) },
6149
+ firstHalfYear: { label: "I полугодие", from: i, to: x($(i, 5)) },
6150
+ secondHalfYear: { label: "II полугодие", from: $(i, 6), to: o },
6151
+ currentYear: { label: "12 месяцев", from: i, to: o }
6113
6152
  };
6114
6153
  }
6115
6154
  /**
@@ -6120,23 +6159,23 @@ class Ri {
6120
6159
  * @param now Опорная дата «сейчас»; по умолчанию текущая.
6121
6160
  */
6122
6161
  static standardPeriods(r = /* @__PURE__ */ new Date()) {
6123
- const e = { weekStartsOn: 1 }, t = ge(r), n = W(r), o = y.decadeInterval(r), c = E(r), u = ke(r), p = y.startOfHalfYear(r), g = ue(r), a = y.addHalfYears(r, -1), P = y.addHalfYears(r, 1);
6162
+ const e = { weekStartsOn: 1 }, t = ge(r), i = z(r), o = y.decadeInterval(r), c = E(r), u = ke(r), p = y.startOfHalfYear(r), g = ue(r), a = y.addHalfYears(r, -1), P = y.addHalfYears(r, 1);
6124
6163
  return {
6125
- yesterday: { label: "Вчера", group: "day", from: ge(ze(r, 1)), to: W(ze(r, 1)) },
6126
- today: { label: "Сегодня", group: "day", from: t, to: n },
6127
- tomorrow: { label: "Завтра", group: "day", from: ge(re(r, 1)), to: W(re(r, 1)) },
6164
+ yesterday: { label: "Вчера", group: "day", from: ge(je(r, 1)), to: z(je(r, 1)) },
6165
+ today: { label: "Сегодня", group: "day", from: t, to: i },
6166
+ tomorrow: { label: "Завтра", group: "day", from: ge(re(r, 1)), to: z(re(r, 1)) },
6128
6167
  lastWeek: { label: "Прошлая неделя", group: "week", from: ee(Er(r, 1), e), to: $e(Er(r, 1), e) },
6129
6168
  thisWeek: { label: "Эта неделя", group: "week", from: ee(r, e), to: $e(r, e) },
6130
6169
  nextWeek: { label: "Следующая неделя", group: "week", from: ee(ar(r, 1), e), to: $e(ar(r, 1), e) },
6131
6170
  lastTenDays: { label: "Прошлая декада", group: "decade", ...y.shiftDecadeInterval(r, -1) },
6132
6171
  thisTenDays: { label: "Эта декада", group: "decade", ...o },
6133
6172
  nextTenDays: { label: "Следующая декада", group: "decade", ...y.shiftDecadeInterval(r, 1) },
6134
- lastMonth: { label: "Прошлый месяц", group: "month", from: E(cr(r, 1)), to: x(cr(r, 1)) },
6173
+ lastMonth: { label: "Прошлый месяц", group: "month", from: E(lr(r, 1)), to: x(lr(r, 1)) },
6135
6174
  thisMonth: { label: "Этот месяц", group: "month", from: c, to: x(r) },
6136
6175
  nextMonth: { label: "Следующий месяц", group: "month", from: E($(r, 1)), to: x($(r, 1)) },
6137
- lastQuarter: { label: "Прошлый квартал", group: "quarter", from: ke(or(r, 1)), to: Be(or(r, 1)) },
6176
+ lastQuarter: { label: "Прошлый квартал", group: "quarter", from: ke(cr(r, 1)), to: Be(cr(r, 1)) },
6138
6177
  thisQuarter: { label: "Этот квартал", group: "quarter", from: u, to: Be(r) },
6139
- nextQuarter: { label: "Следующий квартал", group: "quarter", from: ke(ir(r, 1)), to: Be(ir(r, 1)) },
6178
+ nextQuarter: { label: "Следующий квартал", group: "quarter", from: ke(nr(r, 1)), to: Be(nr(r, 1)) },
6140
6179
  lastHalfYear: {
6141
6180
  label: "Прошлое полугодие",
6142
6181
  group: "halfYear",
@@ -6145,15 +6184,15 @@ class Ri {
6145
6184
  },
6146
6185
  thisHalfYear: { label: "Это полугодие", group: "halfYear", from: p, to: y.endOfHalfYear(r) },
6147
6186
  nextHalfYear: { label: "Следующее полугодие", group: "halfYear", from: y.startOfHalfYear(P), to: y.endOfHalfYear(P) },
6148
- lastYear: { label: "Прошлый год", group: "year", from: ue(nr(r, 1)), to: de(nr(r, 1)) },
6187
+ lastYear: { label: "Прошлый год", group: "year", from: ue(or(r, 1)), to: de(or(r, 1)) },
6149
6188
  thisYear: { label: "Этот год", group: "year", from: g, to: de(r) },
6150
- nextYear: { label: "Следующий год", group: "year", from: ue(sr(r, 1)), to: de(sr(r, 1)) },
6151
- fromBeginningOfThisWeek: { label: "С начала этой недели", group: "other", section: "fromBeginning", from: ee(r, e), to: n },
6152
- fromBeginningOfThisTenDays: { label: "С начала этой декады", group: "other", section: "fromBeginning", from: o.from, to: n },
6153
- fromBeginningOfThisMonth: { label: "С начала этого месяца", group: "other", section: "fromBeginning", from: c, to: n },
6154
- fromBeginningOfThisQuarter: { label: "С начала этого квартала", group: "other", section: "fromBeginning", from: u, to: n },
6155
- fromBeginningOfThisHalfYear: { label: "С начала этого полугодия", group: "other", section: "fromBeginning", from: p, to: n },
6156
- fromBeginningOfThisYear: { label: "С начала этого года", group: "other", section: "fromBeginning", from: g, to: n },
6189
+ nextYear: { label: "Следующий год", group: "year", from: ue(ir(r, 1)), to: de(ir(r, 1)) },
6190
+ fromBeginningOfThisWeek: { label: "С начала этой недели", group: "other", section: "fromBeginning", from: ee(r, e), to: i },
6191
+ fromBeginningOfThisTenDays: { label: "С начала этой декады", group: "other", section: "fromBeginning", from: o.from, to: i },
6192
+ fromBeginningOfThisMonth: { label: "С начала этого месяца", group: "other", section: "fromBeginning", from: c, to: i },
6193
+ fromBeginningOfThisQuarter: { label: "С начала этого квартала", group: "other", section: "fromBeginning", from: u, to: i },
6194
+ fromBeginningOfThisHalfYear: { label: "С начала этого полугодия", group: "other", section: "fromBeginning", from: p, to: i },
6195
+ fromBeginningOfThisYear: { label: "С начала этого года", group: "other", section: "fromBeginning", from: g, to: i },
6157
6196
  tillEndOfThisWeek: { label: "До конца этой недели", group: "other", section: "tillEnd", from: t, to: $e(r, e) },
6158
6197
  tillEndOfThisTenDays: { label: "До конца этой декады", group: "other", section: "tillEnd", from: t, to: o.to },
6159
6198
  tillEndOfThisMonth: { label: "До конца этого месяца", group: "other", section: "tillEnd", from: t, to: x(r) },
@@ -6171,13 +6210,13 @@ class Ri {
6171
6210
  label: "Прошлый месяц, до такой же даты",
6172
6211
  group: "other",
6173
6212
  section: "lastTillSame",
6174
- ...y.intervalTillSameDate(c, E(cr(r, 1)), r)
6213
+ ...y.intervalTillSameDate(c, E(lr(r, 1)), r)
6175
6214
  },
6176
6215
  lastQuarterTillSameDate: {
6177
6216
  label: "Прошлый квартал, до такой же даты",
6178
6217
  group: "other",
6179
6218
  section: "lastTillSame",
6180
- ...y.intervalTillSameDate(u, ke(or(r, 1)), r)
6219
+ ...y.intervalTillSameDate(u, ke(cr(r, 1)), r)
6181
6220
  },
6182
6221
  lastHalfYearTillSameDate: {
6183
6222
  label: "Прошлое полугодие, до такой же даты",
@@ -6189,7 +6228,7 @@ class Ri {
6189
6228
  label: "Прошлый год, до такой же даты",
6190
6229
  group: "other",
6191
6230
  section: "lastTillSame",
6192
- ...y.intervalTillSameDate(g, ue(nr(r, 1)), r)
6231
+ ...y.intervalTillSameDate(g, ue(or(r, 1)), r)
6193
6232
  },
6194
6233
  nextWeekTillSameWeekDay: { label: "Следующая неделя, до такого же дня недели", group: "other", section: "nextTillSame", ...y.weekTillSameWeekday(r, 1) },
6195
6234
  nextTenDaysTillSameDayNumber: {
@@ -6208,7 +6247,7 @@ class Ri {
6208
6247
  label: "Следующий квартал, до такой же даты",
6209
6248
  group: "other",
6210
6249
  section: "nextTillSame",
6211
- ...y.intervalTillSameDate(u, ke(ir(r, 1)), r)
6250
+ ...y.intervalTillSameDate(u, ke(nr(r, 1)), r)
6212
6251
  },
6213
6252
  nextHalfYearTillSameDate: {
6214
6253
  label: "Следующее полугодие, до такой же даты",
@@ -6220,10 +6259,10 @@ class Ri {
6220
6259
  label: "Следующий год, до такой же даты",
6221
6260
  group: "other",
6222
6261
  section: "nextTillSame",
6223
- ...y.intervalTillSameDate(g, ue(sr(r, 1)), r)
6262
+ ...y.intervalTillSameDate(g, ue(ir(r, 1)), r)
6224
6263
  },
6225
- last7Days: { label: "Последние 7 дней", group: "other", section: "rollingDays", from: ge(ze(r, 6)), to: n },
6226
- next7Days: { label: "Следующие 7 дней", group: "other", section: "rollingDays", from: t, to: W(re(r, 6)) }
6264
+ last7Days: { label: "Последние 7 дней", group: "other", section: "rollingDays", from: ge(je(r, 6)), to: i },
6265
+ next7Days: { label: "Следующие 7 дней", group: "other", section: "rollingDays", from: t, to: z(re(r, 6)) }
6227
6266
  };
6228
6267
  }
6229
6268
  }
@@ -6243,8 +6282,8 @@ const Di = [
6243
6282
  { key: "nextTillSame", label: "Следующие, до такой же даты" },
6244
6283
  { key: "rollingDays", label: "7 дней" }
6245
6284
  ];
6246
- function Pi(i) {
6247
- const r = Mt(i * 100);
6285
+ function Pi(n) {
6286
+ const r = Mt(n * 100);
6248
6287
  return `${r >= 0 ? "+" : ""}${r}%`;
6249
6288
  }
6250
6289
  class Ct {
@@ -6271,8 +6310,8 @@ class Ct {
6271
6310
  * @param product Данные о товаре для которого необходимо вернуть кратность длины.
6272
6311
  */
6273
6312
  static getProductLengthMultiplicity(r) {
6274
- var e, t, n;
6275
- return ((e = r.properties) == null ? void 0 : e.lengthStep) != null ? r.properties.lengthStep : !((t = r.properties) != null && t.ignoreMinCountCheck) && ((n = r.properties) == null ? void 0 : n.minCount) != null ? r.properties.minCount : 0.01;
6313
+ var e, t, i;
6314
+ return ((e = r.properties) == null ? void 0 : e.lengthStep) != null ? r.properties.lengthStep : !((t = r.properties) != null && t.ignoreMinCountCheck) && ((i = r.properties) == null ? void 0 : i.minCount) != null ? r.properties.minCount : 0.01;
6276
6315
  }
6277
6316
  }
6278
6317
  const ye = class ye extends h {
@@ -6322,9 +6361,9 @@ const ye = class ye extends h {
6322
6361
  * @param signal Сигнал отмены запроса.
6323
6362
  */
6324
6363
  // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
6325
- getTypedDataArrayRequester(e, t, n = !1, o = {}, c = void 0) {
6326
- const u = t + (J(o) ? "" : ` >>> ${JSON.stringify(o)}`), p = n ? ye.getCachedResponse(u) : void 0;
6327
- return p ? Promise.resolve(p) : this.getTypedList(e, t, o, !1, c).then((g) => (n && g && this.cacheResponse(u, g), g));
6364
+ getTypedDataArrayRequester(e, t, i = !1, o = {}, c = void 0) {
6365
+ const u = t + (J(o) ? "" : ` >>> ${JSON.stringify(o)}`), p = i ? ye.getCachedResponse(u) : void 0;
6366
+ return p ? Promise.resolve(p) : this.getTypedList(e, t, o, !1, c).then((g) => (i && g && this.cacheResponse(u, g), g));
6328
6367
  }
6329
6368
  };
6330
6369
  /**
@@ -6332,7 +6371,7 @@ const ye = class ye extends h {
6332
6371
  */
6333
6372
  s(ye, "responseDataCache", /* @__PURE__ */ new Map());
6334
6373
  let Ue = ye;
6335
- class bi {
6374
+ class Ai {
6336
6375
  /**
6337
6376
  * Генерирует и возвращает данные-заглушку неопределённого менеджера.
6338
6377
  */
@@ -6348,7 +6387,7 @@ class bi {
6348
6387
  return r.id === 0 && r.guid === "-undefined-";
6349
6388
  }
6350
6389
  }
6351
- class Rt extends Ue {
6390
+ class Dt extends Ue {
6352
6391
  /**
6353
6392
  * Возвращает {@link Promise} для получения справочника списка менеджеров.
6354
6393
  */
@@ -6356,8 +6395,8 @@ class Rt extends Ue {
6356
6395
  const r = "/internal/managers", e = Ue.getCachedResponse(r);
6357
6396
  if (e)
6358
6397
  return e;
6359
- const t = await this.get(r), n = _.instanceListInitializer(Z, t.data);
6360
- return this.cacheResponse(r, n), n;
6398
+ const t = await this.get(r), i = _.instanceListInitializer(Z, t.data);
6399
+ return this.cacheResponse(r, i), i;
6361
6400
  }
6362
6401
  /**
6363
6402
  * Возвращает {@link Promise} для получения полных данных о менеджере с указанным идентификатором.
@@ -6370,8 +6409,8 @@ class Rt extends Ue {
6370
6409
  return this.get(`/internal/managers/${r}`, {}, (e) => new Z(e.data));
6371
6410
  }
6372
6411
  }
6373
- var xe = /* @__PURE__ */ ((i) => (i.Processing = "processing", i.Completed = "completed", i.Error = "error", i.NeedsActualization = "needs_actualization", i))(xe || {});
6374
- class As {
6412
+ var xe = /* @__PURE__ */ ((n) => (n.Processing = "processing", n.Completed = "completed", n.Error = "error", n.NeedsActualization = "needs_actualization", n))(xe || {});
6413
+ class bs {
6375
6414
  /**
6376
6415
  * Инициализирует экземпляр класса {@link OfferActualization}.
6377
6416
  *
@@ -6427,7 +6466,7 @@ class As {
6427
6466
  return this.status === xe.Completed && !this.isOutdatedAt(r);
6428
6467
  }
6429
6468
  }
6430
- class Dt extends G {
6469
+ class Tt extends G {
6431
6470
  /**
6432
6471
  * Инициализирует экземпляр класса {@link OfferShortInfo}.
6433
6472
  *
@@ -6463,7 +6502,7 @@ class Dt extends G {
6463
6502
  * @inheritDoc
6464
6503
  */
6465
6504
  s(this, "file");
6466
- this.name = e == null ? void 0 : e.name, this.createdAt = Tr.parse(e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.client = new oe(e == null ? void 0 : e.client), this.sum = e == null ? void 0 : e.sum, this.isProfstroy = e == null ? void 0 : e.isProfstroy, this.actualization = (e == null ? void 0 : e.actualization) && new As(e.actualization), this.file = e == null ? void 0 : e.file;
6505
+ this.name = e == null ? void 0 : e.name, this.createdAt = Tr.parse(e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.client = new oe(e == null ? void 0 : e.client), this.sum = e == null ? void 0 : e.sum, this.isProfstroy = e == null ? void 0 : e.isProfstroy, this.actualization = (e == null ? void 0 : e.actualization) && new bs(e.actualization), this.file = e == null ? void 0 : e.file;
6467
6506
  }
6468
6507
  }
6469
6508
  class Ss extends Or {
@@ -6505,7 +6544,7 @@ class Ss extends Or {
6505
6544
  return !this.isProductStub && !this.isIgnored && J(this.lineError);
6506
6545
  }
6507
6546
  }
6508
- class F extends Dt {
6547
+ class F extends Tt {
6509
6548
  /**
6510
6549
  * Инициализирует экземпляр класса {@link Offer}.
6511
6550
  *
@@ -6526,7 +6565,7 @@ class F extends Dt {
6526
6565
  );
6527
6566
  }
6528
6567
  }
6529
- class Ai extends Fe {
6568
+ class bi extends Fe {
6530
6569
  /**
6531
6570
  * Инициализирует экземпляр класса {@link OffersListFilters}.
6532
6571
  *
@@ -6549,8 +6588,8 @@ class Ai extends Fe {
6549
6588
  /**
6550
6589
  * @inheritDoc
6551
6590
  */
6552
- s(this, "createdAt", new A());
6553
- this.id = e == null ? void 0 : e.id, this.clientSearchTerm = e == null ? void 0 : e.clientSearchTerm, this.name = e == null ? void 0 : e.name, this.createdAt = new A(e == null ? void 0 : e.createdAt);
6591
+ s(this, "createdAt", new b());
6592
+ this.id = e == null ? void 0 : e.id, this.clientSearchTerm = e == null ? void 0 : e.clientSearchTerm, this.name = e == null ? void 0 : e.name, this.createdAt = new b(e == null ? void 0 : e.createdAt);
6554
6593
  }
6555
6594
  /**
6556
6595
  * @inheritDoc
@@ -6562,21 +6601,21 @@ class Ai extends Fe {
6562
6601
  * @inheritDoc
6563
6602
  */
6564
6603
  asClearRaw() {
6565
- var t, n;
6604
+ var t, i;
6566
6605
  const e = super.asClearRaw();
6567
- return !((t = e == null ? void 0 : e.createdAt) != null && t.from) && !((n = e == null ? void 0 : e.createdAt) != null && n.to) && delete e.createdAt, e;
6606
+ return !((t = e == null ? void 0 : e.createdAt) != null && t.from) && !((i = e == null ? void 0 : e.createdAt) != null && i.to) && delete e.createdAt, e;
6568
6607
  }
6569
6608
  }
6570
- class Ze extends R {
6609
+ class er extends D {
6571
6610
  }
6572
- class Tt extends vt {
6611
+ class Pt extends Rt {
6573
6612
  /**
6574
6613
  * Инициализирует экземпляр класса {@link OrderInfo}.
6575
6614
  *
6576
6615
  * @param data Данные для первоначальной инициализации.
6577
6616
  */
6578
6617
  constructor(e) {
6579
- var t, n, o, c, u, p, g, a;
6618
+ var t, i, o, c, u, p, g, a;
6580
6619
  super(e);
6581
6620
  /**
6582
6621
  * @inheritDoc
@@ -6632,17 +6671,17 @@ class Tt extends vt {
6632
6671
  s(this, "isLargeOrder");
6633
6672
  this.client = new oe(e == null ? void 0 : e.client), this.payment = {
6634
6673
  type: ((t = e == null ? void 0 : e.payment) == null ? void 0 : t.type) ?? -1,
6635
- status: ((n = e == null ? void 0 : e.payment) == null ? void 0 : n.status) ?? -1,
6674
+ status: ((i = e == null ? void 0 : e.payment) == null ? void 0 : i.status) ?? -1,
6636
6675
  onlinePaymentLink: (o = e == null ? void 0 : e.payment) == null ? void 0 : o.onlinePaymentLink
6637
6676
  }, this.delivery = {
6638
6677
  type: ((c = e == null ? void 0 : e.delivery) == null ? void 0 : c.type) ?? -1,
6639
- date: D((u = e == null ? void 0 : e.delivery) == null ? void 0 : u.date) ? C(e.delivery.date) : ((p = e == null ? void 0 : e.delivery) == null ? void 0 : p.date) ?? /* @__PURE__ */ new Date(),
6678
+ date: R((u = e == null ? void 0 : e.delivery) == null ? void 0 : u.date) ? C(e.delivery.date) : ((p = e == null ? void 0 : e.delivery) == null ? void 0 : p.date) ?? /* @__PURE__ */ new Date(),
6640
6679
  address: (g = e == null ? void 0 : e.delivery) != null && g.address ? new _e(e.delivery.address) : void 0,
6641
6680
  warehouse: (a = e == null ? void 0 : e.delivery) != null && a.warehouse ? new Me(e.delivery.warehouse) : void 0
6642
- }, this.attachedUser = e != null && e.attachedUser ? new N(e == null ? void 0 : e.attachedUser) : void 0, this.status = new Ze(e == null ? void 0 : e.status), this.statusDetail = e != null && e.statusDetail ? new R(e.statusDetail) : void 0, this.salesDirection = new U(e == null ? void 0 : e.salesDirection), this.attachedAt = D(e == null ? void 0 : e.attachedAt) ? C(e.attachedAt) : e == null ? void 0 : e.attachedAt, this.isOnOrder = (e == null ? void 0 : e.isOnOrder) ?? !1, this.isProfstroy = (e == null ? void 0 : e.isProfstroy) ?? !1, this.isNotInStock = (e == null ? void 0 : e.isNotInStock) ?? !1, this.sum = (e == null ? void 0 : e.sum) ?? 0, this.isLargeOrder = (e == null ? void 0 : e.isLargeOrder) ?? !1;
6681
+ }, this.attachedUser = e != null && e.attachedUser ? new N(e == null ? void 0 : e.attachedUser) : void 0, this.status = new er(e == null ? void 0 : e.status), this.statusDetail = e != null && e.statusDetail ? new D(e.statusDetail) : void 0, this.salesDirection = new U(e == null ? void 0 : e.salesDirection), this.attachedAt = R(e == null ? void 0 : e.attachedAt) ? C(e.attachedAt) : e == null ? void 0 : e.attachedAt, this.isOnOrder = (e == null ? void 0 : e.isOnOrder) ?? !1, this.isProfstroy = (e == null ? void 0 : e.isProfstroy) ?? !1, this.isNotInStock = (e == null ? void 0 : e.isNotInStock) ?? !1, this.sum = (e == null ? void 0 : e.sum) ?? 0, this.isLargeOrder = (e == null ? void 0 : e.isLargeOrder) ?? !1;
6643
6682
  }
6644
6683
  }
6645
- class ds extends nt {
6684
+ class ds extends ot {
6646
6685
  /**
6647
6686
  * Инициализирует экземпляр класса {@link OrderItem}.
6648
6687
  *
@@ -6699,10 +6738,10 @@ class ds extends nt {
6699
6738
  * Продукт, которым заменена текущая запись.
6700
6739
  */
6701
6740
  s(this, "replacement");
6702
- this.product = new X(e.product), this.currency = new j(e.currency), this.cost = e.cost, this.costOne = e.costOne, this.costOneRub = e.costOneRub, this.costRub = e.costRub, this.logicGroupId = e.logicGroupId, this.salesDirection = e.salesDirection, this.specificationImgUrl = e.specificationImgUrl, this.sawing = z(e.sawing) ? e.sawing : e.sawing ? [e.sawing] : void 0, t && (this.replacement = t, this.quantity !== t.quantity && this.changedFields.push("quantity"), this.length !== t.length && this.changedFields.push("length"));
6741
+ this.product = new X(e.product), this.currency = new j(e.currency), this.cost = e.cost, this.costOne = e.costOne, this.costOneRub = e.costOneRub, this.costRub = e.costRub, this.logicGroupId = e.logicGroupId, this.salesDirection = e.salesDirection, this.specificationImgUrl = e.specificationImgUrl, this.sawing = W(e.sawing) ? e.sawing : e.sawing ? [e.sawing] : void 0, t && (this.replacement = t, this.quantity !== t.quantity && this.changedFields.push("quantity"), this.length !== t.length && this.changedFields.push("length"));
6703
6742
  }
6704
6743
  }
6705
- class I extends Tt {
6744
+ class I extends Pt {
6706
6745
  /**
6707
6746
  * Инициализирует экземпляр класса {@link Order}.
6708
6747
  *
@@ -6767,11 +6806,11 @@ class I extends Tt {
6767
6806
  * @inheritDoc
6768
6807
  */
6769
6808
  s(this, "numberDoc");
6770
- this.products = (e.products ?? []).map((n) => {
6809
+ this.products = (e.products ?? []).map((i) => {
6771
6810
  var c;
6772
- const o = n.replacementId ? (c = e.products) == null ? void 0 : c.find((u) => u.id === n.replacementId) : void 0;
6773
- return new ds(n, o);
6774
- }), this.invoices = e.invoices ?? [], this.comment = e.comment, this.image = e.image, this.contragent = e.contragent ? Ke.createInstance(e.contragent) : void 0, this.barcode = e.barcode, this.orderSource = e.orderSource ? new R(e.orderSource) : void 0, this.isAllowProcessingWithoutPayment = e.isAllowProcessingWithoutPayment, this.nextStatuses = (t = e.nextStatuses) == null ? void 0 : t.map((n) => new Ze(n)), this.actions = e.actions, this.operatorsComment = e.operatorsComment, this.operatorsForWarehouseComment = e.operatorsForWarehouseComment, this.erpOrderUrl = e.erpOrderUrl, this.numberDoc = e.numberDoc;
6811
+ const o = i.replacementId ? (c = e.products) == null ? void 0 : c.find((u) => u.id === i.replacementId) : void 0;
6812
+ return new ds(i, o);
6813
+ }), this.invoices = e.invoices ?? [], this.comment = e.comment, this.image = e.image, this.contragent = e.contragent ? Xe.createInstance(e.contragent) : void 0, this.barcode = e.barcode, this.orderSource = e.orderSource ? new D(e.orderSource) : void 0, this.isAllowProcessingWithoutPayment = e.isAllowProcessingWithoutPayment, this.nextStatuses = (t = e.nextStatuses) == null ? void 0 : t.map((i) => new er(i)), this.actions = e.actions, this.operatorsComment = e.operatorsComment, this.operatorsForWarehouseComment = e.operatorsForWarehouseComment, this.erpOrderUrl = e.erpOrderUrl, this.numberDoc = e.numberDoc;
6775
6814
  }
6776
6815
  }
6777
6816
  class Si extends Y {
@@ -6785,8 +6824,8 @@ class Si extends Y {
6785
6824
  *
6786
6825
  * @see /doc/api/internal#/Заказы/api_internal_order_commercial_offer_get_list
6787
6826
  */
6788
- getOffers(r, e, t, n = void 0) {
6789
- return this.getTypedPaginated(Dt, "/internal/orders/offers", r, e, t, {}, void 0, n);
6827
+ getOffers(r, e, t, i = void 0) {
6828
+ return this.getTypedPaginated(Tt, "/internal/orders/offers", r, e, t, {}, void 0, i);
6790
6829
  }
6791
6830
  /**
6792
6831
  * Создаёт заказ-черновик из содержимого корзины клиента и возвращает данные созданной записи.
@@ -6805,7 +6844,7 @@ class Si extends Y {
6805
6844
  name: e,
6806
6845
  items: t != null && t.length ? t : void 0
6807
6846
  },
6808
- (n) => new F(n.data)
6847
+ (i) => new F(i.data)
6809
6848
  );
6810
6849
  }
6811
6850
  /**
@@ -6820,8 +6859,8 @@ class Si extends Y {
6820
6859
  *
6821
6860
  * @see /doc/api/internal#/Заказы/api_internal_order_commercial_offer_create_profstroy
6822
6861
  */
6823
- createProfstroyOffer(r, e, t, n = {}) {
6824
- return this.post(`/internal/orders/offers/${r}/profstroy`, { file: e, name: t }, (o) => new F(o.data), n);
6862
+ createProfstroyOffer(r, e, t, i = {}) {
6863
+ return this.post(`/internal/orders/offers/${r}/profstroy`, { file: e, name: t }, (o) => new F(o.data), i);
6825
6864
  }
6826
6865
  /**
6827
6866
  * Запускает актуализацию заказа-черновика, созданного из файла «Профстрой»: текущий состав записи
@@ -6889,7 +6928,7 @@ class Si extends Y {
6889
6928
  *
6890
6929
  * @see /doc/api/internal#/Заказы/api_internal_order_commercial_offer_create_order
6891
6930
  */
6892
- createOrderFromDraft(r, e, t, n = {}) {
6931
+ createOrderFromDraft(r, e, t, i = {}) {
6893
6932
  const o = O().config.dateFormats.api;
6894
6933
  return this.post(
6895
6934
  `/internal/orders/offers/${r}/create-order`,
@@ -6899,7 +6938,7 @@ class Si extends Y {
6899
6938
  items: t != null && t.length ? t : void 0
6900
6939
  },
6901
6940
  (c) => _.instanceListInitializer(I, c.data),
6902
- n
6941
+ i
6903
6942
  );
6904
6943
  }
6905
6944
  /**
@@ -6927,7 +6966,7 @@ class Si extends Y {
6927
6966
  is_additional_sale: e.isAdditionalSale,
6928
6967
  ...e.configuratorParams
6929
6968
  },
6930
- (n) => new F(n.data),
6969
+ (i) => new F(i.data),
6931
6970
  t
6932
6971
  );
6933
6972
  }
@@ -6942,7 +6981,7 @@ class Si extends Y {
6942
6981
  *
6943
6982
  * @see /doc/api/internal#/Заказы/api_internal_order_commercial_offer_product_modify
6944
6983
  */
6945
- patchOfferProduct(r, e, t, n = {}) {
6984
+ patchOfferProduct(r, e, t, i = {}) {
6946
6985
  return this.patch(
6947
6986
  `/internal/orders/offers/${r}/products/${e}`,
6948
6987
  {
@@ -6958,7 +6997,7 @@ class Si extends Y {
6958
6997
  ...t.configuratorParams
6959
6998
  },
6960
6999
  (o) => new F(o.data),
6961
- n
7000
+ i
6962
7001
  );
6963
7002
  }
6964
7003
  /**
@@ -7029,7 +7068,7 @@ class di {
7029
7068
  return !m(r) && r.isProfstroy === !0 && !m(r.actualization);
7030
7069
  }
7031
7070
  }
7032
- var $s = /* @__PURE__ */ ((i) => (i.View = "view", i.Share = "share", i.EditTags = "edit_tags", i.SaveOrderIgnoredProducts = "save_order_ignored_products", i.ChangeStatus = "change_status", i.ChangeProducts = "change_products", i.ChangeOrderParameters = "change_order_parameters", i.Recalculate = "recalculate", i.AttachOrder = "attach_order", i.DetachOrder = "detach_order", i.ChangeAttachedOperator = "change_attached_operator", i.SendOnlinePaymentLink = "send_online_payment_link", i.ConfirmOnlineFullPayment = "confirm_online_full_payment", i.MergeOrders = "merge_orders", i.GetHistory = "get_history", i.CloneOrder = "clone_order", i.DeleteAttachedFile = "delete_attached_file", i))($s || {});
7071
+ var $s = /* @__PURE__ */ ((n) => (n.View = "view", n.Share = "share", n.EditTags = "edit_tags", n.SaveOrderIgnoredProducts = "save_order_ignored_products", n.ChangeStatus = "change_status", n.ChangeProducts = "change_products", n.ChangeOrderParameters = "change_order_parameters", n.Recalculate = "recalculate", n.AttachOrder = "attach_order", n.DetachOrder = "detach_order", n.ChangeAttachedOperator = "change_attached_operator", n.SendOnlinePaymentLink = "send_online_payment_link", n.ConfirmOnlineFullPayment = "confirm_online_full_payment", n.MergeOrders = "merge_orders", n.GetHistory = "get_history", n.CloneOrder = "clone_order", n.DeleteAttachedFile = "delete_attached_file", n))($s || {});
7033
7072
  class $i {
7034
7073
  /**
7035
7074
  * Инициализирует экземпляр класса {@link OrderEditorData}.
@@ -7093,13 +7132,13 @@ class $i {
7093
7132
  * @inheritDoc
7094
7133
  */
7095
7134
  s(this, "isAdditionalSale");
7096
- var e, t, n;
7097
- this.paymentType = r == null ? void 0 : r.payment.type, this.deliveryType = r == null ? void 0 : r.delivery.type, this.contragentId = (e = r == null ? void 0 : r.contragent) == null ? void 0 : e.id, this.deliveryDate = r != null && r.delivery.date ? new Date(r.delivery.date) : void 0, this.addressId = (t = r == null ? void 0 : r.delivery.address) == null ? void 0 : t.id, this.warehouseId = (n = r == null ? void 0 : r.delivery.warehouse) == null ? void 0 : n.id, this.comment = r == null ? void 0 : r.comment, this.barcode = r == null ? void 0 : r.barcode, this.operatorsComment = r == null ? void 0 : r.operatorsComment, this.operatorsForWarehouseComment = r == null ? void 0 : r.operatorsForWarehouseComment, this.isAllowProcessingWithoutPayment = r == null ? void 0 : r.isAllowProcessingWithoutPayment;
7135
+ var e, t, i;
7136
+ this.paymentType = r == null ? void 0 : r.payment.type, this.deliveryType = r == null ? void 0 : r.delivery.type, this.contragentId = (e = r == null ? void 0 : r.contragent) == null ? void 0 : e.id, this.deliveryDate = r != null && r.delivery.date ? new Date(r.delivery.date) : void 0, this.addressId = (t = r == null ? void 0 : r.delivery.address) == null ? void 0 : t.id, this.warehouseId = (i = r == null ? void 0 : r.delivery.warehouse) == null ? void 0 : i.id, this.comment = r == null ? void 0 : r.comment, this.barcode = r == null ? void 0 : r.barcode, this.operatorsComment = r == null ? void 0 : r.operatorsComment, this.operatorsForWarehouseComment = r == null ? void 0 : r.operatorsForWarehouseComment, this.isAllowProcessingWithoutPayment = r == null ? void 0 : r.isAllowProcessingWithoutPayment;
7098
7137
  }
7099
7138
  }
7100
- class Pt extends R {
7139
+ class At extends D {
7101
7140
  }
7102
- class bt extends R {
7141
+ class bt extends D {
7103
7142
  }
7104
7143
  class ki extends Fe {
7105
7144
  /**
@@ -7108,7 +7147,7 @@ class ki extends Fe {
7108
7147
  * @param data Данные для первоначальной инициализации.
7109
7148
  */
7110
7149
  constructor(e) {
7111
- var t, n, o, c;
7150
+ var t, i, o, c;
7112
7151
  super();
7113
7152
  /**
7114
7153
  * @inheritDoc
@@ -7129,7 +7168,7 @@ class ki extends Fe {
7129
7168
  /**
7130
7169
  * @inheritDoc
7131
7170
  */
7132
- s(this, "createdAt", new A());
7171
+ s(this, "createdAt", new b());
7133
7172
  /**
7134
7173
  * @inheritDoc
7135
7174
  */
@@ -7137,7 +7176,7 @@ class ki extends Fe {
7137
7176
  /**
7138
7177
  * @inheritDoc
7139
7178
  */
7140
- s(this, "deliveryDate", new A());
7179
+ s(this, "deliveryDate", new b());
7141
7180
  /**
7142
7181
  * @inheritDoc
7143
7182
  */
@@ -7165,7 +7204,7 @@ class ki extends Fe {
7165
7204
  /**
7166
7205
  * @inheritDoc
7167
7206
  */
7168
- s(this, "attachedAt", new A());
7207
+ s(this, "attachedAt", new b());
7169
7208
  /**
7170
7209
  * @inheritDoc
7171
7210
  */
@@ -7202,7 +7241,7 @@ class ki extends Fe {
7202
7241
  * @inheritDoc
7203
7242
  */
7204
7243
  s(this, "onlyMyRegions");
7205
- this.attachedUsers = (t = e == null ? void 0 : e.attachedUsers) == null ? void 0 : t.map((u) => "isActive" in u ? new Z(u) : new Pt(u)), this.clientSearchTerm = e == null ? void 0 : e.clientSearchTerm, this.client = e != null && e.client ? new oe(e.client) : void 0, this.contragent = e == null ? void 0 : e.contragent, this.createdAt = new A(e == null ? void 0 : e.createdAt), this.creator = e != null && e.creator ? new N(e.creator) : void 0, this.deliveryDate = new A(e == null ? void 0 : e.deliveryDate), this.deliveryAddressSearch = e == null ? void 0 : e.deliveryAddressSearch, this.clientCities = (n = e == null ? void 0 : e.clientCities) == null ? void 0 : n.map((u) => new Ce(u)), this.id = e == null ? void 0 : e.id, this.isApproved = e == null ? void 0 : e.isApproved, this.isNotInStock = e == null ? void 0 : e.isNotInStock, this.isOnOrder = e == null ? void 0 : e.isOnOrder, this.isLargeOrder = e == null ? void 0 : e.isLargeOrder, this.attachedAt = new A(e == null ? void 0 : e.attachedAt), this.salesDirections = (o = e == null ? void 0 : e.salesDirections) == null ? void 0 : o.map((u) => new U(u)), this.status = e == null ? void 0 : e.status, this.statusDetail = e == null ? void 0 : e.statusDetail, this.deliveryType = e != null && e.deliveryType ? new K(e.deliveryType) : void 0, this.paymentType = e != null && e.paymentType ? new bt(e.paymentType) : void 0, this.warehouses = (c = e == null ? void 0 : e.warehouses) == null ? void 0 : c.map((u) => new Me(u)), this.isToProcess = e == null ? void 0 : e.isToProcess;
7244
+ this.attachedUsers = (t = e == null ? void 0 : e.attachedUsers) == null ? void 0 : t.map((u) => "isActive" in u ? new Z(u) : new At(u)), this.clientSearchTerm = e == null ? void 0 : e.clientSearchTerm, this.client = e != null && e.client ? new oe(e.client) : void 0, this.contragent = e == null ? void 0 : e.contragent, this.createdAt = new b(e == null ? void 0 : e.createdAt), this.creator = e != null && e.creator ? new N(e.creator) : void 0, this.deliveryDate = new b(e == null ? void 0 : e.deliveryDate), this.deliveryAddressSearch = e == null ? void 0 : e.deliveryAddressSearch, this.clientCities = (i = e == null ? void 0 : e.clientCities) == null ? void 0 : i.map((u) => new Re(u)), this.id = e == null ? void 0 : e.id, this.isApproved = e == null ? void 0 : e.isApproved, this.isNotInStock = e == null ? void 0 : e.isNotInStock, this.isOnOrder = e == null ? void 0 : e.isOnOrder, this.isLargeOrder = e == null ? void 0 : e.isLargeOrder, this.attachedAt = new b(e == null ? void 0 : e.attachedAt), this.salesDirections = (o = e == null ? void 0 : e.salesDirections) == null ? void 0 : o.map((u) => new U(u)), this.status = e == null ? void 0 : e.status, this.statusDetail = e == null ? void 0 : e.statusDetail, this.deliveryType = e != null && e.deliveryType ? new K(e.deliveryType) : void 0, this.paymentType = e != null && e.paymentType ? new bt(e.paymentType) : void 0, this.warehouses = (c = e == null ? void 0 : e.warehouses) == null ? void 0 : c.map((u) => new Me(u)), this.isToProcess = e == null ? void 0 : e.isToProcess;
7206
7245
  }
7207
7246
  /**
7208
7247
  * @inheritDoc
@@ -7248,9 +7287,9 @@ class ki extends Fe {
7248
7287
  * @inheritDoc
7249
7288
  */
7250
7289
  asClearRaw() {
7251
- var t, n, o, c, u, p;
7290
+ var t, i, o, c, u, p;
7252
7291
  const e = super.asClearRaw();
7253
- return !((t = e == null ? void 0 : e.createdAt) != null && t.from) && !((n = e == null ? void 0 : e.createdAt) != null && n.to) && delete e.createdAt, !((o = e == null ? void 0 : e.deliveryDate) != null && o.from) && !((c = e == null ? void 0 : e.deliveryDate) != null && c.to) && delete e.deliveryDate, !((u = e == null ? void 0 : e.attachedAt) != null && u.from) && !((p = e == null ? void 0 : e.attachedAt) != null && p.to) && delete e.attachedAt, e;
7292
+ return !((t = e == null ? void 0 : e.createdAt) != null && t.from) && !((i = e == null ? void 0 : e.createdAt) != null && i.to) && delete e.createdAt, !((o = e == null ? void 0 : e.deliveryDate) != null && o.from) && !((c = e == null ? void 0 : e.deliveryDate) != null && c.to) && delete e.deliveryDate, !((u = e == null ? void 0 : e.attachedAt) != null && u.from) && !((p = e == null ? void 0 : e.attachedAt) != null && p.to) && delete e.attachedAt, e;
7254
7293
  }
7255
7294
  }
7256
7295
  class ks {
@@ -7276,7 +7315,7 @@ class ks {
7276
7315
  * @inheritDoc
7277
7316
  */
7278
7317
  s(this, "createdAt");
7279
- this.user = new N(r == null ? void 0 : r.user), this.status = new Ze(r == null ? void 0 : r.status), this.statusDetail = r != null && r.statusDetail ? new R(r.statusDetail) : void 0, this.createdAt = D(r == null ? void 0 : r.createdAt) ? C(r.createdAt) : (r == null ? void 0 : r.createdAt) ?? /* @__PURE__ */ new Date();
7318
+ this.user = new N(r == null ? void 0 : r.user), this.status = new er(r == null ? void 0 : r.status), this.statusDetail = r != null && r.statusDetail ? new D(r.statusDetail) : void 0, this.createdAt = R(r == null ? void 0 : r.createdAt) ? C(r.createdAt) : (r == null ? void 0 : r.createdAt) ?? /* @__PURE__ */ new Date();
7280
7319
  }
7281
7320
  }
7282
7321
  class Oi extends Y {
@@ -7290,8 +7329,8 @@ class Oi extends Y {
7290
7329
  *
7291
7330
  * @see /doc/api/internal#/Заказы/api_internal_orders_get_list
7292
7331
  */
7293
- getOrders(r, e, t, n = void 0) {
7294
- return this.getTypedPaginated(Tt, "/internal/orders", r, e, t, {}, void 0, n);
7332
+ getOrders(r, e, t, i = void 0) {
7333
+ return this.getTypedPaginated(Pt, "/internal/orders", r, e, t, {}, void 0, i);
7295
7334
  }
7296
7335
  /**
7297
7336
  * Возвращает количество заказов, соответствующих указанным фильтрам.
@@ -7344,14 +7383,14 @@ class Oi extends Y {
7344
7383
  * в случае ошибок в запросах.
7345
7384
  * @see /doc/api/internal#/operations/api_internal_client_orders_create
7346
7385
  */
7347
- createClientOrder(r, e, t, n, o = {}) {
7386
+ createClientOrder(r, e, t, i, o = {}) {
7348
7387
  const c = O().config.dateFormats.api;
7349
7388
  return this.post(
7350
7389
  `/internal/clients/${r}/orders/${e}`,
7351
7390
  {
7352
7391
  ...t,
7353
7392
  deliveryDate: k(t.deliveryDate, c),
7354
- items: n != null && n.length ? n : void 0
7393
+ items: i != null && i.length ? i : void 0
7355
7394
  },
7356
7395
  (u) => _.instanceListInitializer(I, u.data),
7357
7396
  o
@@ -7420,12 +7459,12 @@ class Oi extends Y {
7420
7459
  * @see /doc/api/internal#/Заказы/api_internal_orders_update
7421
7460
  */
7422
7461
  updateOrder(r, e, t = {}) {
7423
- const n = O().config.dateFormats.api;
7462
+ const i = O().config.dateFormats.api;
7424
7463
  return this.patch(
7425
7464
  `/internal/orders/${r}`,
7426
7465
  {
7427
7466
  ...e,
7428
- deliveryDate: e.deliveryDate ? k(e.deliveryDate, n) : void 0
7467
+ deliveryDate: e.deliveryDate ? k(e.deliveryDate, i) : void 0
7429
7468
  },
7430
7469
  (o) => new I(o.data),
7431
7470
  t
@@ -7457,7 +7496,7 @@ class Oi extends Y {
7457
7496
  is_additional_sale: e.isAdditionalSale,
7458
7497
  ...e.configuratorParams
7459
7498
  },
7460
- (n) => new I(n.data),
7499
+ (i) => new I(i.data),
7461
7500
  t
7462
7501
  );
7463
7502
  }
@@ -7473,7 +7512,7 @@ class Oi extends Y {
7473
7512
  *
7474
7513
  * @see /doc/api/internal#/Заказы/api_internal_orders_status_change
7475
7514
  */
7476
- changeOrderStatus(r, e, t, n = {}) {
7515
+ changeOrderStatus(r, e, t, i = {}) {
7477
7516
  return this.patch(
7478
7517
  `/internal/orders/${r}/status`,
7479
7518
  {
@@ -7481,7 +7520,7 @@ class Oi extends Y {
7481
7520
  statusDetail: t
7482
7521
  },
7483
7522
  (o) => new I(o.data),
7484
- n
7523
+ i
7485
7524
  );
7486
7525
  }
7487
7526
  /**
@@ -7583,7 +7622,7 @@ class Oi extends Y {
7583
7622
  *
7584
7623
  * @see /doc/api/internal#/Заказы/api_internal_orders_product_update
7585
7624
  */
7586
- patchOrderProduct(r, e, t, n = {}) {
7625
+ patchOrderProduct(r, e, t, i = {}) {
7587
7626
  return this.patch(
7588
7627
  `/internal/orders/${r}/products/${e}`,
7589
7628
  {
@@ -7599,7 +7638,7 @@ class Oi extends Y {
7599
7638
  ...t.configuratorParams
7600
7639
  },
7601
7640
  (o) => new I(o.data),
7602
- n
7641
+ i
7603
7642
  );
7604
7643
  }
7605
7644
  /**
@@ -7632,7 +7671,7 @@ class Oi extends Y {
7632
7671
  *
7633
7672
  * @see /doc/api/internal#/operations/api_internal_orders_delivery_get_cost
7634
7673
  */
7635
- getDeliveryCost(r, e, t, n = void 0) {
7674
+ getDeliveryCost(r, e, t, i = void 0) {
7636
7675
  const o = O().config.dateFormats.api;
7637
7676
  return this.get(
7638
7677
  `/internal/orders/delivery/${r}/cost`,
@@ -7642,7 +7681,7 @@ class Oi extends Y {
7642
7681
  },
7643
7682
  (c) => c.data,
7644
7683
  void 0,
7645
- n
7684
+ i
7646
7685
  );
7647
7686
  }
7648
7687
  }
@@ -7677,22 +7716,22 @@ class fr {
7677
7716
  this.client = new oe(r == null ? void 0 : r.client), this.product = new q(r == null ? void 0 : r.product), this.cost = (r == null ? void 0 : r.cost) ?? 0, this.costCoefficient = (r == null ? void 0 : r.costCoefficient) ?? 0, this.source = (r == null ? void 0 : r.source) ?? kr.Product;
7678
7717
  }
7679
7718
  }
7680
- const mr = (i) => {
7681
- var r, e, t, n, o;
7682
- return i ? Zr(
7719
+ const mr = (n) => {
7720
+ var r, e, t, i, o;
7721
+ return n ? et(
7683
7722
  {
7684
- cities: (r = i.cities) == null ? void 0 : r.map((c) => c.id),
7685
- clients: (e = i.clients) == null ? void 0 : e.map((c) => c.id),
7686
- managers: (t = i.managers) == null ? void 0 : t.map((c) => c.id),
7687
- partnerGroups: (n = i.partnerGroups) == null ? void 0 : n.map((c) => c.id),
7688
- salesDirections: (o = i.salesDirections) == null ? void 0 : o.map((c) => c.id),
7689
- hideNotActive: i.hideNotActive
7723
+ cities: (r = n.cities) == null ? void 0 : r.map((c) => c.id),
7724
+ clients: (e = n.clients) == null ? void 0 : e.map((c) => c.id),
7725
+ managers: (t = n.managers) == null ? void 0 : t.map((c) => c.id),
7726
+ partnerGroups: (i = n.partnerGroups) == null ? void 0 : i.map((c) => c.id),
7727
+ salesDirections: (o = n.salesDirections) == null ? void 0 : o.map((c) => c.id),
7728
+ hideNotActive: n.hideNotActive
7690
7729
  },
7691
- (c) => m(c) || (z(c) || Qe(c)) && J(c)
7730
+ (c) => m(c) || (W(c) || Ve(c)) && J(c)
7692
7731
  ) : {};
7693
- }, Gr = (i) => {
7732
+ }, Gr = (n) => {
7694
7733
  const r = {};
7695
- return i.from && (i.from.coefficient || i.from.value) && (r.from = {}, i.from.coefficient && (r.from.priceCoefficientId = i.from.coefficient.id), i.from.value && (r.from.increasePercent = i.from.value)), i.to && (i.to.coefficient || i.to.value) && (r.to = {}, i.to.coefficient && (r.to.priceCoefficientId = i.to.coefficient.id), i.to.value && (r.to.increasePercent = i.to.value)), r;
7734
+ return n.from && (n.from.coefficient || n.from.value) && (r.from = {}, n.from.coefficient && (r.from.priceCoefficientId = n.from.coefficient.id), n.from.value && (r.from.increasePercent = n.from.value)), n.to && (n.to.coefficient || n.to.value) && (r.to = {}, n.to.coefficient && (r.to.priceCoefficientId = n.to.coefficient.id), n.to.value && (r.to.increasePercent = n.to.value)), r;
7696
7735
  };
7697
7736
  class Ii extends h {
7698
7737
  /**
@@ -7711,7 +7750,7 @@ class Ii extends h {
7711
7750
  ...Gr(e),
7712
7751
  filters: mr(t)
7713
7752
  },
7714
- (n) => _.instanceListInitializer(fr, n.data)
7753
+ (i) => _.instanceListInitializer(fr, i.data)
7715
7754
  );
7716
7755
  }
7717
7756
  /**
@@ -7730,7 +7769,7 @@ class Ii extends h {
7730
7769
  ...Gr(e),
7731
7770
  filters: mr(t)
7732
7771
  },
7733
- (n) => _.instanceListInitializer(fr, n.data)
7772
+ (i) => _.instanceListInitializer(fr, i.data)
7734
7773
  );
7735
7774
  }
7736
7775
  /**
@@ -7751,7 +7790,7 @@ class Ii extends h {
7751
7790
  ...e,
7752
7791
  filters: mr(t)
7753
7792
  },
7754
- (n) => _.instanceListInitializer(fr, n.data)
7793
+ (i) => _.instanceListInitializer(fr, i.data)
7755
7794
  );
7756
7795
  }
7757
7796
  }
@@ -7802,7 +7841,7 @@ class Os {
7802
7841
  * @inheritDoc
7803
7842
  */
7804
7843
  s(this, "currency");
7805
- this.cost = r.cost ?? 0, this.isLowCost = r.isLowCost ?? !1, this.isRetail = r.isRetail ?? !1, this.costDate = D(r.costDate) ? C(r.costDate) : r.costDate ?? /* @__PURE__ */ new Date(), this.discountName = r.discountName, this.priceTemplateName = r.priceTemplateName, this.product = r.product ? new Ee(r.product) : void 0, this.client = r.client ? new N(r.client) : void 0, this.executor = r.executor ? new N(r.executor) : void 0, this.currency = r.currency ? new j(r.currency) : void 0;
7844
+ this.cost = r.cost ?? 0, this.isLowCost = r.isLowCost ?? !1, this.isRetail = r.isRetail ?? !1, this.costDate = R(r.costDate) ? C(r.costDate) : r.costDate ?? /* @__PURE__ */ new Date(), this.discountName = r.discountName, this.priceTemplateName = r.priceTemplateName, this.product = r.product ? new Ee(r.product) : void 0, this.client = r.client ? new N(r.client) : void 0, this.executor = r.executor ? new N(r.executor) : void 0, this.currency = r.currency ? new j(r.currency) : void 0;
7806
7845
  }
7807
7846
  }
7808
7847
  class Ls extends Ee {
@@ -7830,16 +7869,16 @@ class xi extends h {
7830
7869
  */
7831
7870
  getProductPriceHistory(r) {
7832
7871
  var o, c, u, p, g;
7833
- const e = O().config.dateFormats.api, t = Zr(
7872
+ const e = O().config.dateFormats.api, t = et(
7834
7873
  Ne(r, {
7835
7874
  costDate: {
7836
- from: Ve((o = r.costDate) == null ? void 0 : o.from) ? k(r.costDate.from, e) : (c = r.costDate) == null ? void 0 : c.from,
7837
- to: Ve((u = r.costDate) == null ? void 0 : u.to) ? k(r.costDate.to, e) : (p = r.costDate) == null ? void 0 : p.to
7875
+ from: Je((o = r.costDate) == null ? void 0 : o.from) ? k(r.costDate.from, e) : (c = r.costDate) == null ? void 0 : c.from,
7876
+ to: Je((u = r.costDate) == null ? void 0 : u.to) ? k(r.costDate.to, e) : (p = r.costDate) == null ? void 0 : p.to
7838
7877
  }
7839
7878
  }),
7840
- (a) => m(a) || (z(a) || Qe(a)) && J(a)
7841
- ), n = ((g = r.product) == null ? void 0 : g[0]) ?? 0;
7842
- return delete t.product, this.get(`/internal/price/products/${n}/history`, t).then((a) => [
7879
+ (a) => m(a) || (W(a) || Ve(a)) && J(a)
7880
+ ), i = ((g = r.product) == null ? void 0 : g[0]) ?? 0;
7881
+ return delete t.product, this.get(`/internal/price/products/${i}/history`, t).then((a) => [
7843
7882
  new Ls(Ne(a[0], { history: a }))
7844
7883
  ]);
7845
7884
  }
@@ -7908,12 +7947,12 @@ class _i extends h {
7908
7947
  });
7909
7948
  }
7910
7949
  }
7911
- var Is = /* @__PURE__ */ ((i) => (i.New = "new", i.Processing = "processing", i.AwaitingSupplyProducts = "awaiting_supply_products", i.InvoiceIssued = "invoice_issued", i.ProcessingOnStock = "processing_on_stock", i.Finished = "finished", i.OrderUpdated = "order_updated", i.Canceled = "canceled", i.Error = "error", i))(Is || {}), xs = /* @__PURE__ */ ((i) => (i.CanceledBy1c = "canceled_by1c", i.CanceledByClient = "canceled_by_client", i.FinishedNotApproved = "finished_not_approved", i.ProcessingByPurchasingDepartment = "processing_by_purchasing_department", i.WillWaiting = "will_waiting", i))(xs || {});
7912
- class _s extends R {
7950
+ var Is = /* @__PURE__ */ ((n) => (n.New = "new", n.Processing = "processing", n.AwaitingSupplyProducts = "awaiting_supply_products", n.InvoiceIssued = "invoice_issued", n.ProcessingOnStock = "processing_on_stock", n.Finished = "finished", n.OrderUpdated = "order_updated", n.Canceled = "canceled", n.Error = "error", n))(Is || {}), xs = /* @__PURE__ */ ((n) => (n.CanceledBy1c = "canceled_by1c", n.CanceledByClient = "canceled_by_client", n.FinishedNotApproved = "finished_not_approved", n.ProcessingByPurchasingDepartment = "processing_by_purchasing_department", n.WillWaiting = "will_waiting", n))(xs || {});
7951
+ class _s extends D {
7913
7952
  }
7914
- class Ns extends R {
7953
+ class Ns extends D {
7915
7954
  }
7916
- class Qr extends R {
7955
+ class Qr extends D {
7917
7956
  /**
7918
7957
  * Инициализирует экземпляр класса {@link CityWithUserRegion}.
7919
7958
  *
@@ -7926,16 +7965,16 @@ class Qr extends R {
7926
7965
  * @inheritDoc
7927
7966
  */
7928
7967
  s(this, "userRegions");
7929
- this.userRegions = ((t = e == null ? void 0 : e.userRegions) == null ? void 0 : t.map((n) => new Xe(n))) ?? [];
7968
+ this.userRegions = ((t = e == null ? void 0 : e.userRegions) == null ? void 0 : t.map((i) => new Ze(i))) ?? [];
7930
7969
  }
7931
7970
  }
7932
- class qs extends R {
7971
+ class qs extends D {
7933
7972
  }
7934
- class Es extends R {
7973
+ class Es extends D {
7935
7974
  }
7936
- class Us extends R {
7975
+ class Us extends D {
7937
7976
  }
7938
- class Fs extends R {
7977
+ class Fs extends D {
7939
7978
  }
7940
7979
  class Ni {
7941
7980
  /**
@@ -7956,7 +7995,7 @@ class Ni {
7956
7995
  return r.id === 0 && r.slug === "-undefined-";
7957
7996
  }
7958
7997
  }
7959
- class At extends R {
7998
+ class St extends D {
7960
7999
  }
7961
8000
  const B = class B extends Ue {
7962
8001
  /**
@@ -7983,7 +8022,7 @@ const B = class B extends Ue {
7983
8022
  * первичного интереса.
7984
8023
  */
7985
8024
  getChannelPrimaryInterest() {
7986
- return this.getTypedDataArrayRequester(at, "/internal/references/channel-primary-interest", !0);
8025
+ return this.getTypedDataArrayRequester(vt, "/internal/references/channel-primary-interest", !0);
7987
8026
  }
7988
8027
  /**
7989
8028
  * Возвращает {@link Promise} для получения справочника должностей контактных лиц.
@@ -8008,7 +8047,7 @@ const B = class B extends Ue {
8008
8047
  * групп партнеров (направлений деятельности).
8009
8048
  */
8010
8049
  getPartnerGroup() {
8011
- return this.getTypedDataArrayRequester(Re, "/internal/references/partner-group", !0);
8050
+ return this.getTypedDataArrayRequester(Ce, "/internal/references/partner-group", !0);
8012
8051
  }
8013
8052
  /**
8014
8053
  * Возвращает {@link Promise} для получения справочника данных организационно-правовых форм.
@@ -8020,7 +8059,7 @@ const B = class B extends Ue {
8020
8059
  * Возвращает {@link Promise} для получения справочника операторов.
8021
8060
  */
8022
8061
  getOperators() {
8023
- return this.getTypedDataArrayRequester(Pt, "/internal/references/operator", !0);
8062
+ return this.getTypedDataArrayRequester(At, "/internal/references/operator", !0);
8024
8063
  }
8025
8064
  /**
8026
8065
  * Возвращает {@link Promise} для получения справочника данных статусов оплаты заказов.
@@ -8032,7 +8071,7 @@ const B = class B extends Ue {
8032
8071
  * Возвращает {@link Promise} для получения справочника данных статусов заказов.
8033
8072
  */
8034
8073
  getOrderStatuses() {
8035
- return this.getTypedDataArrayRequester(Ze, "/internal/references/order-status", !0);
8074
+ return this.getTypedDataArrayRequester(er, "/internal/references/order-status", !0);
8036
8075
  }
8037
8076
  /**
8038
8077
  * Возвращает {@link Promise} для получения справочника детализирующих статусов (подстатусов) заказов.
@@ -8050,7 +8089,7 @@ const B = class B extends Ue {
8050
8089
  * Возвращает {@link Promise} для получения справочника типов ресурсов.
8051
8090
  */
8052
8091
  getResourceTypes() {
8053
- return this.getTypedDataArrayRequester(At, "/internal/references/resource-type", !0);
8092
+ return this.getTypedDataArrayRequester(St, "/internal/references/resource-type", !0);
8054
8093
  }
8055
8094
  /**
8056
8095
  * Возвращает {@link Promise} для получения справочника данных направлений продаж.
@@ -8070,7 +8109,7 @@ const B = class B extends Ue {
8070
8109
  * @param term Терм поиска.
8071
8110
  */
8072
8111
  searchCity(r) {
8073
- return this.getTypedDataArrayRequester(Ce, `/internal/references/city-with-region-and-country/search?term=${r}`);
8112
+ return this.getTypedDataArrayRequester(Re, `/internal/references/city-with-region-and-country/search?term=${r}`);
8074
8113
  }
8075
8114
  /**
8076
8115
  * Выполняет поиск данных о регионах по терму в названии.
@@ -8078,7 +8117,7 @@ const B = class B extends Ue {
8078
8117
  * @param term Терм поиска.
8079
8118
  */
8080
8119
  searchRegion(r) {
8081
- return this.getTypedDataArrayRequester(ve, `/internal/references/region-with-country/search?term=${r}`);
8120
+ return this.getTypedDataArrayRequester(we, `/internal/references/region-with-country/search?term=${r}`);
8082
8121
  }
8083
8122
  /**
8084
8123
  * Возвращает {@link Promise} для получения справочника регионов указанной страны.
@@ -8088,7 +8127,7 @@ const B = class B extends Ue {
8088
8127
  * @param countryId Идентификатор страны.
8089
8128
  */
8090
8129
  getRegionsByCountry(r) {
8091
- return this.getTypedDataArrayRequester(ve, "/internal/references/region", !1, { params: { countryId: r } }).then(
8130
+ return this.getTypedDataArrayRequester(we, "/internal/references/region", !1, { params: { countryId: r } }).then(
8092
8131
  (e) => B.withoutUnknownLocation(e)
8093
8132
  );
8094
8133
  }
@@ -8125,12 +8164,12 @@ const B = class B extends Ue {
8125
8164
  */
8126
8165
  searchCityWithRegion(r, e, t = void 0) {
8127
8166
  return this.getTypedDataArrayRequester(
8128
- Ce,
8167
+ Re,
8129
8168
  "/internal/references/city-with-region/search",
8130
8169
  !1,
8131
8170
  { term: r, ...e ? { params: { countryId: e } } : {} },
8132
8171
  t
8133
- ).then((n) => B.withoutUnknownLocation(n));
8172
+ ).then((i) => B.withoutUnknownLocation(i));
8134
8173
  }
8135
8174
  /**
8136
8175
  * Выполняет поиск данных о городах по терму в названии с данными
@@ -8150,7 +8189,7 @@ const B = class B extends Ue {
8150
8189
  * @param term Терм поиска.
8151
8190
  */
8152
8191
  searchCountry(r) {
8153
- return this.getTypedDataArrayRequester(we, `/internal/references/country/search?term=${r}`);
8192
+ return this.getTypedDataArrayRequester(ve, `/internal/references/country/search?term=${r}`);
8154
8193
  }
8155
8194
  /**
8156
8195
  * Возвращает {@link Promise} для получения справочника типов доставки.
@@ -8168,7 +8207,7 @@ const B = class B extends Ue {
8168
8207
  * Возвращает {@link Promise} для получения справочника типов свойств.
8169
8208
  */
8170
8209
  getPropertyTypes() {
8171
- return this.getTypedDataArrayRequester(ht, "/internal/references/property-type", !0);
8210
+ return this.getTypedDataArrayRequester(gt, "/internal/references/property-type", !0);
8172
8211
  }
8173
8212
  /**
8174
8213
  * Возвращает {@link Promise} для получения справочника коэффициентов цен.
@@ -8190,12 +8229,12 @@ const B = class B extends Ue {
8190
8229
  s(B, "unknownLocationId", 1);
8191
8230
  let S = B;
8192
8231
  const d = ne("common.references_private", () => {
8193
- const i = v({}), r = v(void 0), e = v(void 0), t = v(void 0), n = v(void 0), o = v(void 0), c = v(void 0), u = v(void 0), p = v(void 0), g = v(void 0), a = v(void 0), P = v(void 0), Ae = v(void 0), Se = v(void 0), ce = v(void 0), le = v(void 0), er = v(void 0), rr = v(void 0), tr = v(void 0), l = v(void 0);
8232
+ const n = w({}), r = w(void 0), e = w(void 0), t = w(void 0), i = w(void 0), o = w(void 0), c = w(void 0), u = w(void 0), p = w(void 0), g = w(void 0), a = w(void 0), P = w(void 0), be = w(void 0), Se = w(void 0), ce = w(void 0), le = w(void 0), rr = w(void 0), tr = w(void 0), sr = w(void 0), l = w(void 0);
8194
8233
  return {
8195
8234
  /**
8196
8235
  * Список загружаемых/загруженных на данный момент значений.
8197
8236
  */
8198
- dataLoaderList: i,
8237
+ dataLoaderList: n,
8199
8238
  /**
8200
8239
  * Справочник каналов первичного интереса.
8201
8240
  */
@@ -8211,7 +8250,7 @@ const d = ne("common.references_private", () => {
8211
8250
  /**
8212
8251
  * Справочник типов доставки.
8213
8252
  */
8214
- deliveryTypeReference: n,
8253
+ deliveryTypeReference: i,
8215
8254
  /**
8216
8255
  * Список менеджеров.
8217
8256
  */
@@ -8243,7 +8282,7 @@ const d = ne("common.references_private", () => {
8243
8282
  /**
8244
8283
  * Справочник групп партнеров.
8245
8284
  */
8246
- partnerGroupReference: Ae,
8285
+ partnerGroupReference: be,
8247
8286
  /**
8248
8287
  * Справочник типов файлов продукктов/категорий.
8249
8288
  */
@@ -8259,112 +8298,112 @@ const d = ne("common.references_private", () => {
8259
8298
  /**
8260
8299
  * Справочник источников первичного интереса.
8261
8300
  */
8262
- sourcePrimaryInterestReference: er,
8301
+ sourcePrimaryInterestReference: rr,
8263
8302
  /**
8264
8303
  * Справочник складов.
8265
8304
  */
8266
- warehousesReference: rr,
8305
+ warehousesReference: tr,
8267
8306
  /**
8268
8307
  * Справочник типов свойств.
8269
8308
  */
8270
- propertyTypesReference: tr,
8309
+ propertyTypesReference: sr,
8271
8310
  /**
8272
8311
  * Справочник коэффициентов цен.
8273
8312
  */
8274
8313
  priceCoefficientsReference: l
8275
8314
  };
8276
8315
  }), qi = ne("common.references", () => {
8277
- const i = b(() => {
8316
+ const n = A(() => {
8278
8317
  const l = d();
8279
8318
  return !l.channelPrimaryInterestReference && !l.dataLoaderList.channelPrimaryInterestReference && (l.dataLoaderList.channelPrimaryInterestReference = !0, h.getInstance(S).getChannelPrimaryInterest().then((f) => {
8280
8319
  l.channelPrimaryInterestReference = f;
8281
8320
  }).catch(T)), l.channelPrimaryInterestReference;
8282
- }), r = b(() => {
8321
+ }), r = A(() => {
8283
8322
  const l = d();
8284
8323
  return !l.contactPositionsReference && !l.dataLoaderList.contactPositionsReference && (l.dataLoaderList.contactPositionsReference = !0, h.getInstance(S).getContactPositions().then((f) => {
8285
8324
  l.contactPositionsReference = f;
8286
8325
  }).catch(T)), l.contactPositionsReference;
8287
- }), e = b(() => {
8326
+ }), e = A(() => {
8288
8327
  const l = d();
8289
8328
  return !l.currencyReference && !l.dataLoaderList.currencyReference && (l.dataLoaderList.currencyReference = !0, h.getInstance(S).getCurrency().then((f) => {
8290
8329
  l.currencyReference = f;
8291
8330
  }).catch(T)), l.currencyReference;
8292
- }), t = b(() => {
8331
+ }), t = A(() => {
8293
8332
  const l = d();
8294
8333
  return !l.opfReference && !l.dataLoaderList.opfReference && (l.dataLoaderList.opfReference = !0, h.getInstance(S).getOpf().then((f) => {
8295
8334
  l.opfReference = f;
8296
8335
  }).catch(T)), l.opfReference;
8297
- }), n = b(() => {
8336
+ }), i = A(() => {
8298
8337
  const l = d();
8299
8338
  return !l.operatorReference && !l.dataLoaderList.operatorReference && (l.dataLoaderList.operatorReference = !0, h.getInstance(S).getOperators().then((f) => {
8300
8339
  l.operatorReference = f;
8301
8340
  }).catch(T)), l.operatorReference;
8302
- }), o = b(() => {
8341
+ }), o = A(() => {
8303
8342
  const l = d();
8304
8343
  return !l.orderPaymentStatusReference && !l.dataLoaderList.orderPaymentStatusReference && (l.dataLoaderList.orderPaymentStatusReference = !0, h.getInstance(S).getOrderPaymentStatuses().then((f) => {
8305
8344
  l.orderPaymentStatusReference = f;
8306
8345
  }).catch(T)), l.orderPaymentStatusReference;
8307
- }), c = b(() => {
8346
+ }), c = A(() => {
8308
8347
  const l = d();
8309
8348
  return !l.orderStatusReference && !l.dataLoaderList.orderStatusReference && (l.dataLoaderList.orderStatusReference = !0, h.getInstance(S).getOrderStatuses().then((f) => {
8310
8349
  l.orderStatusReference = f;
8311
8350
  }).catch(T)), l.orderStatusReference;
8312
- }), u = b(() => {
8351
+ }), u = A(() => {
8313
8352
  const l = d();
8314
8353
  return !l.orderStatusDetailReference && !l.dataLoaderList.orderStatusDetailReference && (l.dataLoaderList.orderStatusDetailReference = !0, h.getInstance(S).getOrderStatusDetails().then((f) => {
8315
8354
  l.orderStatusDetailReference = f;
8316
8355
  }).catch(T)), l.orderStatusDetailReference;
8317
- }), p = b(() => {
8356
+ }), p = A(() => {
8318
8357
  const l = d();
8319
8358
  return !l.paymentTypeReference && !l.dataLoaderList.paymentTypeReference && (l.dataLoaderList.paymentTypeReference = !0, h.getInstance(S).getPaymentTypes().then((f) => {
8320
8359
  l.paymentTypeReference = f;
8321
8360
  }).catch(T)), l.paymentTypeReference;
8322
- }), g = b(() => {
8361
+ }), g = A(() => {
8323
8362
  const l = d();
8324
8363
  return !l.partnerGroupReference && !l.dataLoaderList.partnerGroupReference && (l.dataLoaderList.partnerGroupReference = !0, h.getInstance(S).getPartnerGroup().then((f) => {
8325
8364
  l.partnerGroupReference = f;
8326
8365
  }).catch(T)), l.partnerGroupReference;
8327
- }), a = b(() => {
8366
+ }), a = A(() => {
8328
8367
  const l = d();
8329
8368
  return !l.productFileTypeReference && !l.dataLoaderList.productFileTypeReference && (l.dataLoaderList.productFileTypeReference = !0, h.getInstance(S).getProductFileType().then((f) => {
8330
8369
  l.productFileTypeReference = f;
8331
8370
  }).catch(T)), l.productFileTypeReference;
8332
- }), P = b(() => {
8371
+ }), P = A(() => {
8333
8372
  const l = d();
8334
8373
  return !l.resourceTypesReference && !l.dataLoaderList.resourceTypesReference && (l.dataLoaderList.resourceTypesReference = !0, h.getInstance(S).getResourceTypes().then((f) => {
8335
8374
  l.resourceTypesReference = f;
8336
8375
  }).catch(T)), l.resourceTypesReference;
8337
- }), Ae = b(() => {
8376
+ }), be = A(() => {
8338
8377
  const l = d();
8339
8378
  return !l.salesDirectionsReference && !l.dataLoaderList.salesDirectionsReference && (l.dataLoaderList.salesDirectionsReference = !0, h.getInstance(S).getSalesDirections().then((f) => {
8340
8379
  l.salesDirectionsReference = f;
8341
8380
  }).catch(T)), l.salesDirectionsReference;
8342
- }), Se = b(() => {
8381
+ }), Se = A(() => {
8343
8382
  const l = d();
8344
8383
  return !l.sourcePrimaryInterestReference && !l.dataLoaderList.sourcePrimaryInterestReference && (l.dataLoaderList.sourcePrimaryInterestReference = !0, h.getInstance(S).getSourcePrimaryInterest().then((f) => {
8345
8384
  l.sourcePrimaryInterestReference = f;
8346
8385
  }).catch(T)), l.sourcePrimaryInterestReference;
8347
- }), ce = b(() => {
8386
+ }), ce = A(() => {
8348
8387
  const l = d();
8349
8388
  return !l.deliveryTypeReference && !l.dataLoaderList.deliveryTypeReference && (l.dataLoaderList.deliveryTypeReference = !0, h.getInstance(S).getDeliveryTypes().then((f) => {
8350
8389
  l.deliveryTypeReference = f;
8351
8390
  }).catch(T)), l.deliveryTypeReference;
8352
- }), le = b(() => {
8391
+ }), le = A(() => {
8353
8392
  const l = d();
8354
- return !l.managersList && !l.dataLoaderList.managersList && (l.dataLoaderList.managersList = !0, h.getInstance(Rt).getManagers().then((f) => {
8393
+ return !l.managersList && !l.dataLoaderList.managersList && (l.dataLoaderList.managersList = !0, h.getInstance(Dt).getManagers().then((f) => {
8355
8394
  l.managersList = f;
8356
8395
  }).catch(T)), l.managersList;
8357
- }), er = b(() => {
8396
+ }), rr = A(() => {
8358
8397
  const l = d();
8359
8398
  return !l.warehousesReference && !l.dataLoaderList.warehousesReference && (l.dataLoaderList.warehousesReference = !0, h.getInstance(S).getWarehouses().then((f) => {
8360
8399
  l.warehousesReference = f;
8361
8400
  }).catch(T)), l.warehousesReference;
8362
- }), rr = b(() => {
8401
+ }), tr = A(() => {
8363
8402
  const l = d();
8364
8403
  return !l.propertyTypesReference && !l.dataLoaderList.propertyTypesReference && (l.dataLoaderList.propertyTypesReference = !0, h.getInstance(S).getPropertyTypes().then((f) => {
8365
8404
  l.propertyTypesReference = f;
8366
8405
  }).catch(T)), l.propertyTypesReference;
8367
- }), tr = b(() => {
8406
+ }), sr = A(() => {
8368
8407
  const l = d();
8369
8408
  return !l.priceCoefficientsReference && !l.dataLoaderList.priceCoefficientsReference && (l.dataLoaderList.priceCoefficientsReference = !0, h.getInstance(S).getPriceCoefficients().then((f) => {
8370
8409
  l.priceCoefficientsReference = f;
@@ -8374,7 +8413,7 @@ const d = ne("common.references_private", () => {
8374
8413
  /**
8375
8414
  * Справочник каналов первичного интереса.
8376
8415
  */
8377
- channelPrimaryInterestsReference: i,
8416
+ channelPrimaryInterestsReference: n,
8378
8417
  /**
8379
8418
  * Справочник должностей контактных лиц.
8380
8419
  */
@@ -8390,7 +8429,7 @@ const d = ne("common.references_private", () => {
8390
8429
  /**
8391
8430
  * Справочник операторов.
8392
8431
  */
8393
- operatorReference: n,
8432
+ operatorReference: i,
8394
8433
  /**
8395
8434
  * Справочник статусов оплаты заказа.
8396
8435
  */
@@ -8422,7 +8461,7 @@ const d = ne("common.references_private", () => {
8422
8461
  /**
8423
8462
  * Справочник направлений продаж.
8424
8463
  */
8425
- salesDirectionsReference: Ae,
8464
+ salesDirectionsReference: be,
8426
8465
  /**
8427
8466
  * Справочник каналов первичного интереса.
8428
8467
  */
@@ -8438,15 +8477,15 @@ const d = ne("common.references_private", () => {
8438
8477
  /**
8439
8478
  * Справочник складов.
8440
8479
  */
8441
- warehousesReference: er,
8480
+ warehousesReference: rr,
8442
8481
  /**
8443
8482
  * Справочник типов свойств.
8444
8483
  */
8445
- propertyTypesReference: rr,
8484
+ propertyTypesReference: tr,
8446
8485
  /**
8447
8486
  * Справочник коэффициентов цен.
8448
8487
  */
8449
- priceCoefficientsReference: tr
8488
+ priceCoefficientsReference: sr
8450
8489
  };
8451
8490
  });
8452
8491
  class Ms {
@@ -8507,7 +8546,7 @@ class Vr {
8507
8546
  */
8508
8547
  s(this, "tags");
8509
8548
  var e;
8510
- this.resourceType = new At(r == null ? void 0 : r.resourceType), this.resourceId = (r == null ? void 0 : r.resourceId) ?? "", this.h1 = r == null ? void 0 : r.h1, this.title = r == null ? void 0 : r.title, this.description = r == null ? void 0 : r.description, this.keywords = r == null ? void 0 : r.keywords, this.meta = ((e = r == null ? void 0 : r.meta) == null ? void 0 : e.map((t) => new Ms(t))) ?? [], this.tags = r == null ? void 0 : r.tags;
8549
+ this.resourceType = new St(r == null ? void 0 : r.resourceType), this.resourceId = (r == null ? void 0 : r.resourceId) ?? "", this.h1 = r == null ? void 0 : r.h1, this.title = r == null ? void 0 : r.title, this.description = r == null ? void 0 : r.description, this.keywords = r == null ? void 0 : r.keywords, this.meta = ((e = r == null ? void 0 : r.meta) == null ? void 0 : e.map((t) => new Ms(t))) ?? [], this.tags = r == null ? void 0 : r.tags;
8511
8550
  }
8512
8551
  }
8513
8552
  class Ei extends h {
@@ -8580,16 +8619,16 @@ class Ui extends h {
8580
8619
  */
8581
8620
  execSuggestionQuery(r, e) {
8582
8621
  return this.get(r, { query: e }).then((t) => {
8583
- const n = [...t];
8622
+ const i = [...t];
8584
8623
  let o = 1;
8585
- return n.forEach((c) => {
8624
+ return i.forEach((c) => {
8586
8625
  c.id = o++;
8587
- }), n;
8626
+ }), i;
8588
8627
  });
8589
8628
  }
8590
8629
  }
8591
- var St = /* @__PURE__ */ ((i) => (i.Admin = "admin", i.Manager = "manager", i.Operator = "operator", i.Client = "client", i.ExternalSeo = "external_seo", i.Guest = "guest", i))(St || {});
8592
- class Hs extends pt {
8630
+ var dt = /* @__PURE__ */ ((n) => (n.Admin = "admin", n.Manager = "manager", n.Operator = "operator", n.Client = "client", n.ExternalSeo = "external_seo", n.Guest = "guest", n))(dt || {});
8631
+ class Hs extends ht {
8593
8632
  /**
8594
8633
  * Инициализирует экземпляр класса {@link User}.
8595
8634
  *
@@ -8613,7 +8652,7 @@ class Hs extends pt {
8613
8652
  * Роль ценообразования текущего пользователя.
8614
8653
  */
8615
8654
  s(this, "pricingRole");
8616
- this.type = e == null ? void 0 : e.type, this.canDoReclamations = (e == null ? void 0 : e.canDoReclamations) ?? !1, this.photo = e == null ? void 0 : e.photo, this.pricingRole = e != null && e.pricingRole ? new lt(e.pricingRole) : void 0;
8655
+ this.type = e == null ? void 0 : e.type, this.canDoReclamations = (e == null ? void 0 : e.canDoReclamations) ?? !1, this.photo = e == null ? void 0 : e.photo, this.pricingRole = e != null && e.pricingRole ? new ut(e.pricingRole) : void 0;
8617
8656
  }
8618
8657
  }
8619
8658
  class Fi extends h {
@@ -8642,12 +8681,12 @@ class Bs extends h {
8642
8681
  }
8643
8682
  }
8644
8683
  const Pr = ne("common.user_state_private", () => {
8645
- const i = v({}), r = v(void 0), e = v(void 0);
8684
+ const n = w({}), r = w(void 0), e = w(void 0);
8646
8685
  return {
8647
8686
  /**
8648
8687
  * Список загружаемых/загруженных на данный момент значений.
8649
8688
  */
8650
- dataLoaderList: i,
8689
+ dataLoaderList: n,
8651
8690
  /**
8652
8691
  * Данные о текущем пользователе.
8653
8692
  */
@@ -8658,35 +8697,35 @@ const Pr = ne("common.user_state_private", () => {
8658
8697
  currentManager: e
8659
8698
  };
8660
8699
  });
8661
- function Jr(i) {
8700
+ function Jr(n) {
8662
8701
  const r = Pr();
8663
- (i == null ? void 0 : i.type) !== St.Manager || r.currentManager || r.dataLoaderList.currentManager || (r.dataLoaderList.currentManager = !0, h.getInstance(Rt).getManager(i.id).then((e) => {
8702
+ (n == null ? void 0 : n.type) !== dt.Manager || r.currentManager || r.dataLoaderList.currentManager || (r.dataLoaderList.currentManager = !0, h.getInstance(Dt).getManager(n.id).then((e) => {
8664
8703
  r.currentManager = e;
8665
8704
  }).catch(T).finally(() => {
8666
8705
  r.dataLoaderList.currentManager = !1;
8667
8706
  }));
8668
8707
  }
8669
8708
  const Mi = ne("common.user_state", () => {
8670
- const i = b(() => {
8709
+ const n = A(() => {
8671
8710
  const e = Pr();
8672
8711
  return !e.currentUser && !e.dataLoaderList.currentUser && (e.dataLoaderList.currentUser = !0, h.getInstance(Bs).getCurrentUser().then((t) => {
8673
8712
  e.currentUser = t, Jr(t);
8674
8713
  }).catch(T).finally(() => {
8675
8714
  e.dataLoaderList.currentUser = !1;
8676
8715
  })), e.currentUser;
8677
- }), r = b(() => (Jr(i.value), Pr().currentManager));
8716
+ }), r = A(() => (Jr(n.value), Pr().currentManager));
8678
8717
  return {
8679
8718
  /**
8680
8719
  * Данные о текущем пользователе.
8681
8720
  */
8682
- currentUser: i,
8721
+ currentUser: n,
8683
8722
  /**
8684
8723
  * Данные о текущем менеджере (если текущий пользователь является менеджером).
8685
8724
  */
8686
8725
  currentManager: r
8687
8726
  };
8688
8727
  });
8689
- class br {
8728
+ class Ar {
8690
8729
  /**
8691
8730
  * Инициализирует экземпляр класса {@link UserRegionEmployee}.
8692
8731
  *
@@ -8704,14 +8743,14 @@ class br {
8704
8743
  this.user = new N(r == null ? void 0 : r.user), this.salesDirection = new U(r == null ? void 0 : r.salesDirection);
8705
8744
  }
8706
8745
  }
8707
- class yr extends Xe {
8746
+ class yr extends Ze {
8708
8747
  /**
8709
8748
  * Инициализирует экземпляр класса {@link UserRegion}.
8710
8749
  *
8711
8750
  * @param data Данные для первоначальной инициализации.
8712
8751
  */
8713
8752
  constructor(e) {
8714
- var t, n;
8753
+ var t, i;
8715
8754
  super(e);
8716
8755
  /**
8717
8756
  * @inheritDoc
@@ -8721,7 +8760,7 @@ class yr extends Xe {
8721
8760
  * @inheritDoc
8722
8761
  */
8723
8762
  s(this, "users");
8724
- this.cities = ((t = e == null ? void 0 : e.cities) == null ? void 0 : t.map((o) => new Ce(o))) ?? [], this.users = ((n = e == null ? void 0 : e.users) == null ? void 0 : n.map((o) => new br(o))) ?? [];
8763
+ this.cities = ((t = e == null ? void 0 : e.cities) == null ? void 0 : t.map((o) => new Re(o))) ?? [], this.users = ((i = e == null ? void 0 : e.users) == null ? void 0 : i.map((o) => new Ar(o))) ?? [];
8725
8764
  }
8726
8765
  }
8727
8766
  class Hi extends Fe {
@@ -8771,7 +8810,7 @@ class Bi extends Y {
8771
8810
  * @see /doc/api/internal#/operations/api_internal_user_region_get_list
8772
8811
  */
8773
8812
  getRegionsList(r, e, t) {
8774
- return this.getTypedPaginated(Xe, "/internal/users/regions", r, e, t);
8813
+ return this.getTypedPaginated(Ze, "/internal/users/regions", r, e, t);
8775
8814
  }
8776
8815
  /**
8777
8816
  * Возвращает полные данные о регионе пользователей.
@@ -8808,7 +8847,7 @@ class Bi extends Y {
8808
8847
  * @see /doc/api/internal#/operations/api_internal_user_region_change
8809
8848
  */
8810
8849
  updateRegion(r, e, t = {}) {
8811
- return this.patch(`/internal/users/regions/${r}`, e, (n) => new yr(n.data), t);
8850
+ return this.patch(`/internal/users/regions/${r}`, e, (i) => new yr(i.data), t);
8812
8851
  }
8813
8852
  /**
8814
8853
  * Удаляет регион пользователей.
@@ -8828,7 +8867,7 @@ class Bi extends Y {
8828
8867
  * @see /doc/api/internal#/operations/api_internal_user_region_user_get_list
8829
8868
  */
8830
8869
  getRegionEmployees(r) {
8831
- return this.getTypedList(br, `/internal/users/regions/${r}/users`);
8870
+ return this.getTypedList(Ar, `/internal/users/regions/${r}/users`);
8832
8871
  }
8833
8872
  /**
8834
8873
  * Закрепляет сотрудника за регионом по указанному направлению продаж.
@@ -8840,7 +8879,7 @@ class Bi extends Y {
8840
8879
  * @see /doc/api/internal#/operations/api_internal_user_region_user_add
8841
8880
  */
8842
8881
  attachRegionEmployee(r, e, t) {
8843
- return this.post(`/internal/users/regions/${r}/users/${e}`, { salesDirectionId: t }, (n) => new br(n.data));
8882
+ return this.post(`/internal/users/regions/${r}/users/${e}`, { salesDirectionId: t }, (i) => new Ar(i.data));
8844
8883
  }
8845
8884
  /**
8846
8885
  * Открепляет сотрудника от региона по указанному направлению продаж.
@@ -8859,7 +8898,7 @@ class Bi extends Y {
8859
8898
  });
8860
8899
  }
8861
8900
  }
8862
- class Wi {
8901
+ class zi {
8863
8902
  /**
8864
8903
  * Инициализирует экземпляр класса {@link FieldValidationResultData}.
8865
8904
  *
@@ -8885,33 +8924,33 @@ class Wi {
8885
8924
  export {
8886
8925
  _s as AnyReference,
8887
8926
  os as AppBaseConfig,
8888
- Rr as BankAccount,
8927
+ Cr as BankAccount,
8889
8928
  Y as BasePaginationProvider,
8890
8929
  ur as BlogPost,
8891
- wr as BlogPostMediaFile,
8892
- Ge as BlogPostMediaTypeEnum,
8893
- Ye as BlogPostPublicationStatusEnum,
8930
+ vr as BlogPostMediaFile,
8931
+ Ye as BlogPostMediaTypeEnum,
8932
+ Qe as BlogPostPublicationStatusEnum,
8894
8933
  ae as BlogPostShortInfo,
8895
8934
  Ks as BlogPostsListFilters,
8896
- vr as BlogProvider,
8935
+ wr as BlogProvider,
8897
8936
  hs as CalculationTypeEnum,
8898
8937
  y as CalendarHelper,
8899
8938
  Oe as Cart,
8900
8939
  Zs as CartProvider,
8901
8940
  ri as CatalogProvider,
8902
- it as CatalogableItem,
8941
+ nt as CatalogableItem,
8903
8942
  Q as Category,
8904
8943
  as as CategoryFilter,
8905
8944
  Br as CategoryFilterSetting,
8906
8945
  ys as CategoryFilterValue,
8907
8946
  Hr as CategoryPricingRule,
8908
- at as ChannelPrimaryInterest,
8947
+ vt as ChannelPrimaryInterest,
8909
8948
  Ns as City,
8910
- Ce as CityWithRegionAndCountry,
8949
+ Re as CityWithRegionAndCountry,
8911
8950
  Qr as CityWithUserRegion,
8912
8951
  jr as Client,
8913
- Rs as ClientAdditionalData,
8914
- Je as ClientCategory,
8952
+ Cs as ClientAdditionalData,
8953
+ Ke as ClientCategory,
8915
8954
  H as ClientDataProvider,
8916
8955
  ti as ClientPriceProvider,
8917
8956
  si as ClientPriceTemplateProvider,
@@ -8919,43 +8958,43 @@ export {
8919
8958
  oi as ClientProductCategoryDataProvider,
8920
8959
  ci as ClientProductDataProvider,
8921
8960
  oe as ClientShortInfo,
8922
- ws as ClientsAdditionalDataRequestTypeEnum,
8961
+ vs as ClientsAdditionalDataRequestTypeEnum,
8923
8962
  gi as ClientsListFilters,
8924
8963
  Ee as CodedIdentity,
8925
8964
  yi as ConfiguratorProvider,
8926
8965
  Ts as ConfiguratorsEnum,
8927
8966
  Dr as Contact,
8928
- ct as ContactLinks,
8967
+ lt as ContactLinks,
8929
8968
  se as ContactPerson,
8930
8969
  Ds as ContactPersonRelated,
8931
8970
  qs as ContactPosition,
8932
8971
  gr as ContactRelation,
8933
- ft as ContragentBase,
8934
- Ke as ContragentFactory,
8935
- mt as ContragentIc,
8936
- vs as ContragentPerson,
8937
- Cs as ContragentUlNr,
8938
- yt as ContragentUlR,
8972
+ mt as ContragentBase,
8973
+ Xe as ContragentFactory,
8974
+ yt as ContragentIc,
8975
+ ws as ContragentPerson,
8976
+ Rs as ContragentUlNr,
8977
+ at as ContragentUlR,
8939
8978
  kr as CostSourceEnum,
8940
- we as Country,
8979
+ ve as Country,
8941
8980
  Ir as CuratedDirection,
8942
8981
  xr as Curator,
8943
8982
  j as Currency,
8944
8983
  Ui as DataSuggestionProvider,
8945
8984
  Tr as DateHelper,
8946
- Ri as DateTimeProvider,
8947
- gt as DeletableNamedIdentity,
8985
+ Ci as DateTimeProvider,
8986
+ ft as DeletableNamedIdentity,
8948
8987
  _e as DeliveryAddress,
8949
8988
  K as DeliveryType,
8950
- et as DetailedJwtPayload,
8989
+ rt as DetailedJwtPayload,
8951
8990
  ts as DeviceTypeResolutionConfig,
8952
8991
  cs as DiscountShortInfo,
8953
- Wi as FieldValidationResultData,
8992
+ zi as FieldValidationResultData,
8954
8993
  te as FilterGroup,
8955
8994
  Fr as FilterItem,
8956
8995
  dr as FilterOpEnum,
8957
8996
  ms as FilterSettings,
8958
- st as GeoCoordinates,
8997
+ it as GeoCoordinates,
8959
8998
  us as HiddenCatalogableItem,
8960
8999
  Ue as HttpCachedRequester,
8961
9000
  ss as HttpParamsConfig,
@@ -8966,29 +9005,29 @@ export {
8966
9005
  Te as JwtPayload,
8967
9006
  Z as Manager,
8968
9007
  Lr as ManagerCommon,
8969
- bi as ManagerDataFactory,
8970
- Rt as ManagerDataProvider,
9008
+ Ai as ManagerDataFactory,
9009
+ Dt as ManagerDataProvider,
8971
9010
  Ms as MetaTagItem,
8972
9011
  L as NamedIdentity,
8973
9012
  F as Offer,
8974
- As as OfferActualization,
9013
+ bs as OfferActualization,
8975
9014
  xe as OfferActualizationStatus,
8976
9015
  di as OfferHelper,
8977
- Dt as OfferShortInfo,
9016
+ Tt as OfferShortInfo,
8978
9017
  Si as OffersDataProvider,
8979
- Ai as OffersListFilters,
8980
- Pt as Operator,
9018
+ bi as OffersListFilters,
9019
+ At as Operator,
8981
9020
  ie as Opf,
8982
9021
  V as OpfEnum,
8983
9022
  I as Order,
8984
9023
  $s as OrderAction,
8985
9024
  $i as OrderEditorData,
8986
- Tt as OrderInfo,
9025
+ Pt as OrderInfo,
8987
9026
  ds as OrderItem,
8988
- nt as OrderItemBase,
9027
+ ot as OrderItemBase,
8989
9028
  Es as OrderPaymentStatus,
8990
- vt as OrderShortInfo,
8991
- Ze as OrderStatus,
9029
+ Rt as OrderShortInfo,
9030
+ er as OrderStatus,
8992
9031
  Us as OrderStatusDetail,
8993
9032
  xs as OrderStatusDetailEnum,
8994
9033
  Is as OrderStatusEnum,
@@ -8996,45 +9035,45 @@ export {
8996
9035
  Oi as OrdersDataProvider,
8997
9036
  ki as OrdersListFilters,
8998
9037
  Fe as PaginationFiltersBase,
8999
- Re as PartnerGroup,
9038
+ Ce as PartnerGroup,
9000
9039
  bt as PaymentType,
9001
- je as PreferencesStorageProvider,
9040
+ Ge as PreferencesStorageProvider,
9002
9041
  fr as PriceAnalyze,
9003
9042
  Ii as PriceAnalyzeProvider,
9004
9043
  Pe as PriceCoefficient,
9005
- tt as PriceCoefficientEnum,
9044
+ st as PriceCoefficientEnum,
9006
9045
  xi as PriceHistoryDataProvider,
9007
9046
  Os as PriceHistoryItem,
9008
9047
  fe as PriceTemplate,
9009
9048
  pr as PriceTemplateCategory,
9010
9049
  Le as PriceTemplateClient,
9011
- ut as PriceTemplateICatalogableItem,
9050
+ pt as PriceTemplateICatalogableItem,
9012
9051
  hr as PriceTemplateProduct,
9013
9052
  li as PriceTemplateProvider,
9014
9053
  Ie as PricingRole,
9015
9054
  ui as PricingRoleProvider,
9016
- Cr as PrimaryCatalogableItem,
9055
+ Rr as PrimaryCatalogableItem,
9017
9056
  q as Product,
9018
9057
  ii as ProductCategoryDataProvider,
9019
9058
  ni as ProductDataProvider,
9020
9059
  Fs as ProductFileType,
9021
- ot as ProductFilterTypeEnum,
9060
+ ct as ProductFilterTypeEnum,
9022
9061
  $r as ProductPriceCoefficient,
9023
9062
  Ls as ProductPriceHistory,
9024
9063
  Mr as ProductUnit,
9025
9064
  Ss as ProfstroyOfferItem,
9026
9065
  pi as PropertiesProvider,
9027
9066
  me as Property,
9028
- ht as PropertyType,
9067
+ gt as PropertyType,
9029
9068
  gs as PropertyTypeEnum,
9030
9069
  he as PropertyValue,
9031
9070
  _i as RecommendationsDataProvider,
9032
9071
  Yr as RecommendationsList,
9033
- R as Reference,
9072
+ D as Reference,
9034
9073
  Ni as ReferenceDataFactory,
9035
9074
  S as ReferenceDataProvider,
9036
- ve as Region,
9037
- At as ResourceType,
9075
+ we as Region,
9076
+ St as ResourceType,
9038
9077
  Di as STANDARD_PERIOD_GROUPS,
9039
9078
  Ti as STANDARD_PERIOD_SECTIONS,
9040
9079
  U as SalesDirection,
@@ -9045,36 +9084,36 @@ export {
9045
9084
  ls as StockCount,
9046
9085
  ai as TableDataPagination,
9047
9086
  Ps as TableDataPaginationRequestParams,
9048
- wi as TableDataSortRequestParams,
9087
+ vi as TableDataSortRequestParams,
9049
9088
  hi as TemplateProductCategoryDataProvider,
9050
9089
  ei as TemplatesListFilters,
9051
9090
  _ as TypedInstanceFactory,
9052
9091
  Ct as UnitsHelper,
9053
9092
  fi as UnknownClientDataProvider,
9054
- rt as UpdatableNamedIdentity,
9093
+ tt as UpdatableNamedIdentity,
9055
9094
  Hs as User,
9056
9095
  Fi as UserAuthDataProvider,
9057
- pt as UserCommonInfo,
9096
+ ht as UserCommonInfo,
9058
9097
  Bs as UserDataProvider,
9059
- lt as UserPricingRole,
9098
+ ut as UserPricingRole,
9060
9099
  yr as UserRegion,
9061
- br as UserRegionEmployee,
9100
+ Ar as UserRegionEmployee,
9062
9101
  Bi as UserRegionProvider,
9063
- Xe as UserRegionShortInfo,
9102
+ Ze as UserRegionShortInfo,
9064
9103
  Hi as UserRegionsListFilters,
9065
9104
  N as UserShortInfo,
9066
- St as UserTypeEnum,
9105
+ dt as UserTypeEnum,
9067
9106
  mi as VersionConfig,
9068
9107
  Me as Warehouse,
9069
9108
  ns as WebSocketConfig,
9070
9109
  Li as currentOrderInjectionKey,
9071
- vi as daysAgoIso,
9072
- Wr as findCatalogItemByIdRecursive,
9073
- zr as flattenCatalogItems,
9110
+ wi as daysAgoIso,
9111
+ zr as findCatalogItemByIdRecursive,
9112
+ Wr as flattenCatalogItems,
9074
9113
  Pi as formatPercentChange,
9075
- Ci as formatRelativeDate,
9076
- bs as pluralize,
9077
- lr as useAuthStateStore,
9114
+ Ri as formatRelativeDate,
9115
+ As as pluralize,
9116
+ ze as useAuthStateStore,
9078
9117
  O as useBaseConfigStateStore,
9079
9118
  qi as useReferencesStore,
9080
9119
  Mi as useUserStateStore