@snabcentr/common-lib 2.3.0-dev → 2.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (29) hide show
  1. package/dist/manifest.json +1 -1
  2. package/dist/release_notes.tmp +2 -4
  3. package/dist/sc-common-lib.js +703 -572
  4. package/dist/sc-common-lib.js.map +1 -1
  5. package/dist/sc-common-lib.umd.cjs +1 -1
  6. package/dist/sc-common-lib.umd.cjs.map +1 -1
  7. package/dist/src/orders/classes/index.d.ts +1 -0
  8. package/dist/src/orders/classes/index.d.ts.map +1 -1
  9. package/dist/src/orders/classes/order-editor-data.d.ts +71 -0
  10. package/dist/src/orders/classes/order-editor-data.d.ts.map +1 -0
  11. package/dist/src/orders/classes/order.d.ts +5 -0
  12. package/dist/src/orders/classes/order.d.ts.map +1 -1
  13. package/dist/src/orders/enums/index.d.ts +2 -0
  14. package/dist/src/orders/enums/index.d.ts.map +1 -0
  15. package/dist/src/orders/enums/order-action.d.ts +70 -0
  16. package/dist/src/orders/enums/order-action.d.ts.map +1 -0
  17. package/dist/src/orders/index.d.ts +1 -0
  18. package/dist/src/orders/index.d.ts.map +1 -1
  19. package/dist/src/orders/interfaces/i-delivery-cost-info.d.ts +19 -0
  20. package/dist/src/orders/interfaces/i-delivery-cost-info.d.ts.map +1 -0
  21. package/dist/src/orders/interfaces/i-order-editor-data.d.ts +63 -0
  22. package/dist/src/orders/interfaces/i-order-editor-data.d.ts.map +1 -0
  23. package/dist/src/orders/interfaces/i-order.d.ts +5 -0
  24. package/dist/src/orders/interfaces/i-order.d.ts.map +1 -1
  25. package/dist/src/orders/interfaces/index.d.ts +2 -0
  26. package/dist/src/orders/interfaces/index.d.ts.map +1 -1
  27. package/dist/src/orders/providers/orders-data-provider.d.ts +42 -1
  28. package/dist/src/orders/providers/orders-data-provider.d.ts.map +1 -1
  29. package/package.json +1 -1
@@ -1,12 +1,12 @@
1
1
  var Lr = Object.defineProperty;
2
- var dr = (n, r, e) => r in n ? Lr(n, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[r] = e;
3
- var t = (n, r, e) => dr(n, typeof r != "symbol" ? r + "" : r, e);
2
+ var dr = (i, r, e) => r in i ? Lr(i, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[r] = e;
3
+ var t = (i, r, e) => dr(i, typeof r != "symbol" ? r + "" : r, e);
4
4
  import { jwtDecode as nr } from "jwt-decode";
5
- import { merge as le, isNil as $, isEmpty as X, noop as v, mapValues as or, isArray as F, every as xr, split as Or, isString as C, constant as _r, toUpper as qr, cloneDeep as Nr, toLower as Ur, isFunction as He, map as ge, forEach as Hr, isDate as Oe, omitBy as cr, isObject as lr } from "lodash-es";
5
+ import { merge as le, isNil as A, isEmpty as X, noop as v, mapValues as or, isArray as F, every as xr, split as _r, isString as C, constant as Or, toUpper as qr, cloneDeep as Nr, toLower as Ur, isFunction as He, map as ge, forEach as Hr, isDate as _e, omitBy as cr, isObject as lr } from "lodash-es";
6
6
  import { objectToCamel as Fe, objectToSnake as Ee } from "ts-case-convert";
7
7
  import { defineStore as W } from "pinia";
8
- import { ref as y, markRaw as Fr, computed as D } from "vue";
9
- import { isAfter as Ve, parseISO as R, startOfToday as _e, format as H, addSeconds as jr, addBusinessDays as Gr, endOfTomorrow as Mr, startOfTomorrow as Br, endOfYesterday as zr, startOfYesterday as Wr, endOfToday as Jr, endOfDay as Er, startOfDay as Vr } from "date-fns";
8
+ import { ref as y, markRaw as Fr, computed as P } from "vue";
9
+ import { isAfter as Ve, parseISO as a, startOfToday as Oe, format as q, addSeconds as jr, addBusinessDays as Gr, endOfTomorrow as Mr, startOfTomorrow as Br, endOfYesterday as zr, startOfYesterday as Wr, endOfToday as Jr, endOfDay as Er, startOfDay as Vr } from "date-fns";
10
10
  import Kr, { CanceledError as Qr } from "axios";
11
11
  class j {
12
12
  /**
@@ -111,7 +111,7 @@ class j {
111
111
  return s.resourceAccess = e.resource_access, s;
112
112
  }
113
113
  }
114
- class Mt extends j {
114
+ class Bt extends j {
115
115
  /**
116
116
  * Инициализирует экземпляр класса {@link DetailedJwtPayload}.
117
117
  *
@@ -229,7 +229,7 @@ class Zr {
229
229
  * Дополнительные параметры.
230
230
  */
231
231
  t(this, "additionalParams");
232
- var e, s, i, o;
232
+ var e, s, n, o;
233
233
  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) ?? [
234
234
  /Network\s{1,3}Error/,
235
235
  /Request\s{1,3}aborted/,
@@ -238,7 +238,7 @@ class Zr {
238
238
  allowedTargets: ((e = r == null ? void 0 : r.trace) == null ? void 0 : e.allowedTargets) ?? [/^\//],
239
239
  sampleRate: ((s = r == null ? void 0 : r.trace) == null ? void 0 : s.sampleRate) ?? 0
240
240
  }, this.replay = {
241
- replaysOnErrorSampleRate: ((i = r == null ? void 0 : r.replay) == null ? void 0 : i.replaysOnErrorSampleRate) ?? 0,
241
+ replaysOnErrorSampleRate: ((n = r == null ? void 0 : r.replay) == null ? void 0 : n.replaysOnErrorSampleRate) ?? 0,
242
242
  replaysSessionSampleRate: ((o = r == null ? void 0 : r.replay) == null ? void 0 : o.replaysSessionSampleRate) ?? 0
243
243
  }, this.additionalParams = (r == null ? void 0 : r.additionalParams) ?? {};
244
244
  }
@@ -325,37 +325,37 @@ class rt {
325
325
  * @inheritDoc
326
326
  */
327
327
  t(this, "dateFormats");
328
- var e, s, i;
328
+ var e, s, n;
329
329
  this.environment = (r == null ? void 0 : r.environment) ?? "production", this.devMode = (r == null ? void 0 : r.devMode) ?? {}, this.http = new Xr(r == null ? void 0 : r.http), this.deviceTypeByResolution = new Yr(r == null ? void 0 : r.deviceTypeByResolution), this.sentry = new Zr({
330
330
  environment: this.environment,
331
331
  ...r == null ? void 0 : r.sentry
332
332
  }), 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 et(r.websocket) : void 0, this.dateFormats = {
333
333
  api: ((e = r == null ? void 0 : r.dateFormats) == null ? void 0 : e.api) ?? "yyyy-MM-dd HH:mm:ss",
334
334
  uiDate: ((s = r == null ? void 0 : r.dateFormats) == null ? void 0 : s.uiDate) ?? "dd.MM.yyyy",
335
- uiDateWithTime: ((i = r == null ? void 0 : r.dateFormats) == null ? void 0 : i.uiDateWithTime) ?? "dd.MM.yyyy HH:mm"
335
+ uiDateWithTime: ((n = r == null ? void 0 : r.dateFormats) == null ? void 0 : n.uiDateWithTime) ?? "dd.MM.yyyy HH:mm"
336
336
  };
337
337
  }
338
338
  }
339
- const I = W("common.config", () => {
340
- const n = y(new rt());
339
+ const k = W("common.config", () => {
340
+ const i = y(new rt());
341
341
  return {
342
342
  /**
343
343
  * Конфигурационные данные приложения.
344
344
  */
345
- config: n,
345
+ config: i,
346
346
  /**
347
347
  * Получает конфигурацию приложения.
348
348
  *
349
349
  * @returns Конфигурация приложения.
350
350
  */
351
- getConfig: () => n.value,
351
+ getConfig: () => i.value,
352
352
  /**
353
353
  * Устанавливает конфигурацию приложения.
354
354
  *
355
355
  * @param appConfig Конфигурация приложения.
356
356
  */
357
357
  setConfig: (s) => {
358
- n.value = le(n.value, s);
358
+ i.value = le(i.value, s);
359
359
  }
360
360
  };
361
361
  });
@@ -378,8 +378,8 @@ class we {
378
378
  if (e)
379
379
  try {
380
380
  const s = JSON.parse(e);
381
- if (!s.availableFor || Ve(R(s.availableFor) || _e(), /* @__PURE__ */ new Date())) {
382
- if ($(s.data) || X(s.data))
381
+ if (!s.availableFor || Ve(a(s.availableFor) || Oe(), /* @__PURE__ */ new Date())) {
382
+ if (A(s.data) || X(s.data))
383
383
  throw new Error("Data is empty");
384
384
  return s.data;
385
385
  }
@@ -401,16 +401,16 @@ class we {
401
401
  static saveActualDataToStorage(r, e, s) {
402
402
  if (this.isLocalStorageAvailable())
403
403
  try {
404
- if ($(e) || X(e))
404
+ if (A(e) || X(e))
405
405
  throw new Error("Data is empty");
406
- const i = JSON.stringify({
406
+ const n = JSON.stringify({
407
407
  availableFor: s,
408
408
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
409
409
  data: e
410
410
  });
411
- localStorage.setItem(r, i);
412
- } catch (i) {
413
- if (i instanceof DOMException && i.code === DOMException.QUOTA_EXCEEDED_ERR) {
411
+ localStorage.setItem(r, n);
412
+ } catch (n) {
413
+ if (n instanceof DOMException && n.code === DOMException.QUOTA_EXCEEDED_ERR) {
414
414
  this.clearOldData();
415
415
  try {
416
416
  const o = JSON.stringify({
@@ -449,10 +449,10 @@ class we {
449
449
  const s = localStorage.key(e);
450
450
  if (s)
451
451
  try {
452
- const i = localStorage.getItem(s);
453
- if (i) {
454
- const o = JSON.parse(i);
455
- o.availableFor && !Ve(R(o.availableFor) || _e(), /* @__PURE__ */ new Date()) && r.push(s);
452
+ const n = localStorage.getItem(s);
453
+ if (n) {
454
+ const o = JSON.parse(n);
455
+ o.availableFor && !Ve(a(o.availableFor) || Oe(), /* @__PURE__ */ new Date()) && r.push(s);
456
456
  }
457
457
  } catch {
458
458
  r.push(s);
@@ -468,16 +468,16 @@ class we {
468
468
  }
469
469
  }
470
470
  }
471
- function Ke(n) {
471
+ function Ke(i) {
472
472
  try {
473
- const r = j.getJwtPayload(n);
473
+ const r = j.getJwtPayload(i);
474
474
  return new Date(r.exp * 1e3);
475
475
  } catch {
476
476
  return;
477
477
  }
478
478
  }
479
479
  const V = W("common.auth_state_private", () => {
480
- const n = y(
480
+ const i = y(
481
481
  (() => {
482
482
  var u;
483
483
  const o = we.getActualDataFromStorage(
@@ -486,12 +486,12 @@ const V = W("common.auth_state_private", () => {
486
486
  );
487
487
  if (o)
488
488
  return Promise.resolve(o);
489
- const c = (u = I().config.devMode) == null ? void 0 : u.initAuthBearerToken;
489
+ const c = (u = k().config.devMode) == null ? void 0 : u.initAuthBearerToken;
490
490
  return c ? Promise.resolve(c) : void 0;
491
491
  })()
492
492
  ), r = y(void 0), e = y(void 0), s = Fr(/* @__PURE__ */ new Map());
493
- function i() {
494
- e.value = void 0, $(n.value) || n.value.then((o) => {
493
+ function n() {
494
+ e.value = void 0, A(i.value) || i.value.then((o) => {
495
495
  const c = j.getJwtPayload(o);
496
496
  e.value = c.exp * 1e3 > Date.now() ? or(c.resourceAccess, (u) => (u == null ? void 0 : u.roles) ?? []) : void 0;
497
497
  }).catch(v);
@@ -500,7 +500,7 @@ const V = W("common.auth_state_private", () => {
500
500
  /**
501
501
  * {@link Promise<string>} для получения jwt-ключа доступа к системам.
502
502
  */
503
- jwtToken: n,
503
+ jwtToken: i,
504
504
  /**
505
505
  * Функция для обновления jwt-ключа доступа к системам.
506
506
  */
@@ -516,12 +516,12 @@ const V = W("common.auth_state_private", () => {
516
516
  /**
517
517
  * Принудительно пересчитывает права доступа пользователя на основе текущего JWT токена.
518
518
  */
519
- recalculateUserPermissions: i
519
+ recalculateUserPermissions: n
520
520
  };
521
521
  }), Se = W("common.auth_state", () => {
522
- const n = D(() => {
522
+ const i = P(() => {
523
523
  const o = V();
524
- if ($(o.jwtToken) && !$(o.jwtTokenUpdater)) {
524
+ if (A(o.jwtToken) && !A(o.jwtTokenUpdater)) {
525
525
  const c = o.jwtTokenUpdater();
526
526
  o.jwtToken = c, c.then((u) => {
527
527
  o.jwtToken = Promise.resolve(u), we.saveActualDataToStorage("sc.token", u, Ke(u)), o.recalculateUserPermissions();
@@ -540,22 +540,22 @@ const V = W("common.auth_state_private", () => {
540
540
  const o = V();
541
541
  o.jwtToken = void 0, o.userPermissions = void 0, we.saveActualDataToStorage("sc.token", void 0);
542
542
  }
543
- function i(o) {
543
+ function n(o) {
544
544
  const c = V();
545
- !$(c.jwtToken) && $(c.userPermissions) && c.jwtToken.then((m) => {
545
+ !A(c.jwtToken) && A(c.userPermissions) && c.jwtToken.then((m) => {
546
546
  const f = j.getJwtPayload(m);
547
- c.userPermissions = f.exp * 1e3 > Date.now() ? or(f.resourceAccess, (A) => (A == null ? void 0 : A.roles) ?? []) : void 0;
547
+ c.userPermissions = f.exp * 1e3 > Date.now() ? or(f.resourceAccess, (D) => (D == null ? void 0 : D.roles) ?? []) : void 0;
548
548
  }).catch(v);
549
549
  const u = F(o) ? o.join(" && ") : o;
550
550
  if (c.userPermissionsComputedRefs.has(u))
551
551
  return c.userPermissionsComputedRefs.get(u);
552
- const h = D(() => {
552
+ const h = P(() => {
553
553
  const m = (f) => {
554
554
  var E;
555
- const A = Or(f, ".");
556
- if (A.length < 2)
555
+ const D = _r(f, ".");
556
+ if (D.length < 2)
557
557
  return !1;
558
- const [se, ie] = A, J = (E = V().userPermissions) == null ? void 0 : E[se];
558
+ const [se, ie] = D, J = (E = V().userPermissions) == null ? void 0 : E[se];
559
559
  return F(J) && J.includes(ie);
560
560
  };
561
561
  return F(o) ? xr(o, (f) => m(f)) : m(o);
@@ -566,7 +566,7 @@ const V = W("common.auth_state_private", () => {
566
566
  /**
567
567
  * {@link Promise<string>} для получения jwt-ключа доступа к системам.
568
568
  */
569
- jwtToken: n,
569
+ jwtToken: i,
570
570
  /**
571
571
  * Устанавливает механизм для обновления jwt-ключа доступа к системам.
572
572
  *
@@ -588,7 +588,7 @@ const V = W("common.auth_state_private", () => {
588
588
  *
589
589
  * @param name Проверяемое право доступа или их список. Должны быть представлены в виде значения: <РЕСУРС>.<РОЛЬ>.
590
590
  */
591
- hasUserPermission: i
591
+ hasUserPermission: n
592
592
  };
593
593
  });
594
594
  class re {
@@ -607,13 +607,13 @@ class re {
607
607
  * @inheritDoc
608
608
  */
609
609
  t(this, "guid");
610
- this.id = r == null ? void 0 : r.id, $(this.id) && ($(e) ? typeof (r == null ? void 0 : r.id) == "number" ? this.id = -1 : typeof (r == null ? void 0 : r.id) == "string" && (this.id = "") : this.id = e), this.guid = (r == null ? void 0 : r.guid) ?? "";
610
+ this.id = r == null ? void 0 : r.id, A(this.id) && (A(e) ? typeof (r == null ? void 0 : r.id) == "number" ? this.id = -1 : typeof (r == null ? void 0 : r.id) == "string" && (this.id = "") : this.id = e), this.guid = (r == null ? void 0 : r.guid) ?? "";
611
611
  }
612
612
  /**
613
613
  * Возвращает признак, что это новая запись.
614
614
  */
615
615
  isNewRec() {
616
- return typeof this.id == "number" ? this.id === -1 : typeof this.id == "string" ? this.id === "" : $(this.id);
616
+ return typeof this.id == "number" ? this.id === -1 : typeof this.id == "string" ? this.id === "" : A(this.id);
617
617
  }
618
618
  }
619
619
  class b extends re {
@@ -677,7 +677,7 @@ class ur extends b {
677
677
  * Дата и время последнего изменения.
678
678
  */
679
679
  t(this, "updatedAt");
680
- this.updatedAt = C(e == null ? void 0 : e.updatedAt) ? R(e.updatedAt) : e == null ? void 0 : e.updatedAt;
680
+ this.updatedAt = C(e == null ? void 0 : e.updatedAt) ? a(e.updatedAt) : e == null ? void 0 : e.updatedAt;
681
681
  }
682
682
  }
683
683
  class tt extends ur {
@@ -692,7 +692,7 @@ class tt extends ur {
692
692
  * Дата и время последнего удаления.
693
693
  */
694
694
  t(this, "deletedAt");
695
- this.deletedAt = C(e == null ? void 0 : e.deletedAt) ? R(e.deletedAt) : e == null ? void 0 : e.deletedAt;
695
+ this.deletedAt = C(e == null ? void 0 : e.deletedAt) ? a(e.deletedAt) : e == null ? void 0 : e.deletedAt;
696
696
  }
697
697
  }
698
698
  class st {
@@ -837,7 +837,7 @@ class nt extends b {
837
837
  * Дата и время удаления.
838
838
  */
839
839
  t(this, "deletedAt");
840
- this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.isLowPriceAllowed = (e == null ? void 0 : e.isLowPriceAllowed) ?? !1, this.publishedAt = C(e == null ? void 0 : e.publishedAt) ? R(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 L(e == null ? void 0 : e.owner), this.deletedAt = C(e == null ? void 0 : e.deletedAt) ? R(e.deletedAt) : e == null ? void 0 : e.deletedAt;
840
+ this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.isLowPriceAllowed = (e == null ? void 0 : e.isLowPriceAllowed) ?? !1, this.publishedAt = C(e == null ? void 0 : e.publishedAt) ? a(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 L(e == null ? void 0 : e.owner), this.deletedAt = C(e == null ? void 0 : e.deletedAt) ? a(e.deletedAt) : e == null ? void 0 : e.deletedAt;
841
841
  }
842
842
  }
843
843
  class Q extends ur {
@@ -856,16 +856,16 @@ class Q extends ur {
856
856
  * Дата и время создания шаблона.
857
857
  */
858
858
  t(this, "createdAt");
859
- this.description = (e == null ? void 0 : e.description) ?? "", this.createdAt = C(e == null ? void 0 : e.createdAt) ? R(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date();
859
+ this.description = (e == null ? void 0 : e.description) ?? "", this.createdAt = C(e == null ? void 0 : e.createdAt) ? a(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date();
860
860
  }
861
861
  }
862
- var hr = /* @__PURE__ */ ((n) => (n.K0 = "k0", n.K1 = "k1", n.K2 = "k2", n.K3 = "k3", n.K4 = "k4", n.Retail = "retail", n))(hr || {});
863
- class Pe extends w {
862
+ var hr = /* @__PURE__ */ ((i) => (i.K0 = "k0", i.K1 = "k1", i.K2 = "k2", i.K3 = "k3", i.K4 = "k4", i.Retail = "retail", i))(hr || {});
863
+ class Re extends w {
864
864
  /**
865
865
  * Возвращает значение справочника коэффициента розничной цены.
866
866
  */
867
867
  static getRetailPriceCoefficient() {
868
- return { id: -2, slug: hr.Retail, name: "Розн. цена", guid: "", isNewRec: _r(!0) };
868
+ return { id: -2, slug: hr.Retail, name: "Розн. цена", guid: "", isNewRec: Or(!0) };
869
869
  }
870
870
  }
871
871
  class Ge {
@@ -895,7 +895,7 @@ class Ge {
895
895
  * Признак того, что указанный коэффициент доступен текущему пользователю только для просмотра.
896
896
  */
897
897
  t(this, "readOnly");
898
- 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;
898
+ this.coefficient = new Re(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;
899
899
  }
900
900
  }
901
901
  class gr {
@@ -916,7 +916,7 @@ class gr {
916
916
  this.lat = (r == null ? void 0 : r.lat) ?? 0, this.long = (r == null ? void 0 : r.long) ?? 0;
917
917
  }
918
918
  }
919
- class U extends w {
919
+ class H extends w {
920
920
  }
921
921
  class me extends w {
922
922
  /**
@@ -947,7 +947,7 @@ class me extends w {
947
947
  * Координаты склада.
948
948
  */
949
949
  t(this, "coordinates");
950
- this.address = (e == null ? void 0 : e.address) ?? "", this.isMain = (e == null ? void 0 : e.isMain) ?? !1, this.deliveryTypes = ((s = e == null ? void 0 : e.deliveryTypes) == null ? void 0 : s.map((i) => new U(i))) ?? [], this.regions = (e == null ? void 0 : e.regions) ?? [], this.coordinates = new gr(e == null ? void 0 : e.coordinates);
950
+ this.address = (e == null ? void 0 : e.address) ?? "", this.isMain = (e == null ? void 0 : e.isMain) ?? !1, this.deliveryTypes = ((s = e == null ? void 0 : e.deliveryTypes) == null ? void 0 : s.map((n) => new H(n))) ?? [], this.regions = (e == null ? void 0 : e.regions) ?? [], this.coordinates = new gr(e == null ? void 0 : e.coordinates);
951
951
  }
952
952
  }
953
953
  class ot {
@@ -968,7 +968,7 @@ class ot {
968
968
  this.warehouse = new me(r == null ? void 0 : r.warehouse), this.count = (r == null ? void 0 : r.count) ?? 0;
969
969
  }
970
970
  }
971
- class x extends b {
971
+ class _ extends b {
972
972
  /**
973
973
  * Инициализирует экземпляр класса {@link Currency}.
974
974
  *
@@ -1022,14 +1022,14 @@ class Qe extends b {
1022
1022
  e && (this.slug = e.slug ?? "", this.description = e.description, this.isSquare = e.isSquare ?? !1, this.isLinear = e.isLinear ?? !1);
1023
1023
  }
1024
1024
  }
1025
- class k extends it {
1025
+ class I extends it {
1026
1026
  /**
1027
1027
  * Инициализирует экземпляр класса {@link Product}.
1028
1028
  *
1029
1029
  * @param data Данные для первоначальной инициализации.
1030
1030
  */
1031
1031
  constructor(e) {
1032
- var i, o, c, u;
1032
+ var n, o, c, u;
1033
1033
  super(e);
1034
1034
  /**
1035
1035
  * Артикул производителя/поставщика.
@@ -1099,9 +1099,9 @@ class k extends it {
1099
1099
  * Список коэффициентов цен на продукт.
1100
1100
  */
1101
1101
  t(this, "priceCoefficients");
1102
- this.supplierSku = e == null ? void 0 : e.supplierSku, this.unit = e != null && e.unit ? new Qe(e.unit) : new Qe(), this.pack = e == null ? void 0 : e.pack, this.minCount = e == null ? void 0 : e.minCount, this.currency = e != null && e.currency ? new x(e.currency) : new x(), this.cost = (e == null ? void 0 : e.cost) ?? 0, this.costRub = (e == null ? void 0 : e.costRub) ?? 0, this.costDate = C(e == null ? void 0 : e.costDate) ? R(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((h) => new ot(h))) ?? [], this.type = "product";
1102
+ this.supplierSku = e == null ? void 0 : e.supplierSku, this.unit = e != null && e.unit ? new Qe(e.unit) : new Qe(), this.pack = e == null ? void 0 : e.pack, this.minCount = e == null ? void 0 : e.minCount, this.currency = e != null && e.currency ? new _(e.currency) : new _(), this.cost = (e == null ? void 0 : e.cost) ?? 0, this.costRub = (e == null ? void 0 : e.costRub) ?? 0, this.costDate = C(e == null ? void 0 : e.costDate) ? a(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((h) => new ot(h))) ?? [], this.type = "product";
1103
1103
  const s = (e == null ? void 0 : e.category) ?? ((o = e == null ? void 0 : e.categories) == null ? void 0 : o.find((h) => h.isPrimary));
1104
- s && (this.category = new qe({ ...s, isPrimary: !0 }), this.categories = [this.category]), e != null && e.categories && (this.categories = e.categories.map((h) => new qe(h))), this.images = ((c = e == null ? void 0 : e.images) == null ? void 0 : c.map((h) => new st(h, I().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((h) => new Ge(h))) ?? [], e && "codeNumber" in e && !e.code && (this.code = e == null ? void 0 : e.codeNumber);
1104
+ s && (this.category = new qe({ ...s, isPrimary: !0 }), this.categories = [this.category]), e != null && e.categories && (this.categories = e.categories.map((h) => new qe(h))), this.images = ((c = e == null ? void 0 : e.images) == null ? void 0 : c.map((h) => new st(h, k().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((h) => new Ge(h))) ?? [], e && "codeNumber" in e && !e.code && (this.code = e == null ? void 0 : e.codeNumber);
1105
1105
  }
1106
1106
  /**
1107
1107
  * Возвращает признак, что это измеряемый товар.
@@ -1122,8 +1122,8 @@ class k extends it {
1122
1122
  return this.retailCostRub ?? this.costRub;
1123
1123
  }
1124
1124
  }
1125
- var Me = /* @__PURE__ */ ((n) => (n.Discount = "discount", n.PriceTemplate = "price_template", n.ClientPrice = "client_price", n.Product = "product", n))(Me || {});
1126
- class G extends k {
1125
+ var Me = /* @__PURE__ */ ((i) => (i.Discount = "discount", i.PriceTemplate = "price_template", i.ClientPrice = "client_price", i.Product = "product", i))(Me || {});
1126
+ class G extends I {
1127
1127
  /**
1128
1128
  * Инициализирует экземпляр класса {@link ClientProduct}.
1129
1129
  *
@@ -1186,7 +1186,7 @@ class fe extends qe {
1186
1186
  * Список коэффициентов пересчёта из валют в рубли в формате ключ значение.
1187
1187
  */
1188
1188
  t(this, "currencyRates");
1189
- 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(([s, i]) => [qr(s), i])) : void 0;
1189
+ 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(([s, n]) => [qr(s), n])) : void 0;
1190
1190
  }
1191
1191
  }
1192
1192
  class mr extends re {
@@ -1261,7 +1261,7 @@ class mr extends re {
1261
1261
  * @inheritDoc
1262
1262
  */
1263
1263
  t(this, "originalId");
1264
- this.product = new G(e.product), this.quantity = e.quantity ?? 0, this.marker = e.marker, this.category = e.category ?? new fe(), this.currency = e.currency ? new x(e.currency) : void 0, this.height = e.height, this.length = e.length, this.width = e.width, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams && Nr(e.configuratorParams), this.isAdditionalSale = e.isAdditionalSale, this.creator = e.creator && new L(e.creator), this.isRemoved = e.isRemoved, this.ord = e.ord, this.onOrder = e.onOrder, this.originalId = e.originalId;
1264
+ this.product = new G(e.product), this.quantity = e.quantity ?? 0, this.marker = e.marker, this.category = e.category ?? new fe(), this.currency = e.currency ? new _(e.currency) : void 0, this.height = e.height, this.length = e.length, this.width = e.width, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams && Nr(e.configuratorParams), this.isAdditionalSale = e.isAdditionalSale, this.creator = e.creator && new L(e.creator), this.isRemoved = e.isRemoved, this.ord = e.ord, this.onOrder = e.onOrder, this.originalId = e.originalId;
1265
1265
  }
1266
1266
  }
1267
1267
  let ct = class extends mr {
@@ -1308,7 +1308,7 @@ let ct = class extends mr {
1308
1308
  * @inheritDoc
1309
1309
  */
1310
1310
  t(this, "currency");
1311
- 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 = F(e.sawing) ? e.sawing : e.sawing ? [e.sawing] : void 0, this.currency = new x(e.currency);
1311
+ 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 = F(e.sawing) ? e.sawing : e.sawing ? [e.sawing] : void 0, this.currency = new _(e.currency);
1312
1312
  }
1313
1313
  };
1314
1314
  class ye {
@@ -1333,7 +1333,7 @@ class ye {
1333
1333
  this.items = r.items.map((e) => new ct(e)), this.resultSum = r.resultSum, this.directionsSum = r.directionsSum;
1334
1334
  }
1335
1335
  }
1336
- const P = class P {
1336
+ const R = class R {
1337
1337
  /**
1338
1338
  * Инициализирует экземпляр класса {@link HttpRequester}.
1339
1339
  */
@@ -1345,7 +1345,7 @@ const P = class P {
1345
1345
  /**
1346
1346
  * Базовый URL путь для выполнения запросов.
1347
1347
  */
1348
- t(this, "baseUrl", `${I().config.http.portalApiUrl}/api`);
1348
+ t(this, "baseUrl", `${k().config.http.portalApiUrl}/api`);
1349
1349
  /**
1350
1350
  * Обработчик ошибок выполнения запросов текущего экземпляра класса.
1351
1351
  *
@@ -1372,7 +1372,7 @@ const P = class P {
1372
1372
  // eslint-disable-next-line class-methods-use-this
1373
1373
  t(this, "authRequestInterceptor", async (r) => {
1374
1374
  let e;
1375
- return $(Se().jwtToken) || (e = await Se().jwtToken), e && r.headers.set("Authorization", `Bearer ${e}`), r;
1375
+ return A(Se().jwtToken) || (e = await Se().jwtToken), e && r.headers.set("Authorization", `Bearer ${e}`), r;
1376
1376
  });
1377
1377
  /**
1378
1378
  * Перехватчик запроса для вызова пользовательских хуков.
@@ -1380,7 +1380,7 @@ const P = class P {
1380
1380
  * @param request Данные запроса.
1381
1381
  */
1382
1382
  // eslint-disable-next-line class-methods-use-this
1383
- t(this, "userRequestHooksInterceptor", async (r) => P.requestHooks.reduce(async (e, s) => s(await e), Promise.resolve(r)));
1383
+ t(this, "userRequestHooksInterceptor", async (r) => R.requestHooks.reduce(async (e, s) => s(await e), Promise.resolve(r)));
1384
1384
  /**
1385
1385
  * Перехватчик запроса для преобразования данных запроса.
1386
1386
  *
@@ -1416,7 +1416,7 @@ const P = class P {
1416
1416
  * @param response Данные ответа на запрос.
1417
1417
  */
1418
1418
  // eslint-disable-next-line class-methods-use-this
1419
- t(this, "userResponseHooksInterceptor", async (r) => P.responseHooks.reduce(async (e, s) => s(await e), Promise.resolve(r)));
1419
+ t(this, "userResponseHooksInterceptor", async (r) => R.responseHooks.reduce(async (e, s) => s(await e), Promise.resolve(r)));
1420
1420
  /**
1421
1421
  * Перехватчик ответа для преобразования данных ответа на запрос.
1422
1422
  *
@@ -1424,7 +1424,7 @@ const P = class P {
1424
1424
  */
1425
1425
  // eslint-disable-next-line class-methods-use-this
1426
1426
  t(this, "dataConverterResponseInterceptor", (r) => (r.data && (r.data = Fe(r.data)), r));
1427
- this.errorResponseHandler = P.defaultErrorsResponseHandler, this.httpClient = Kr.create({
1427
+ this.errorResponseHandler = R.defaultErrorsResponseHandler, this.httpClient = Kr.create({
1428
1428
  headers: {
1429
1429
  Accept: "application/json",
1430
1430
  "Content-Type": "application/json"
@@ -1434,7 +1434,7 @@ const P = class P {
1434
1434
  (r) => Promise.reject(r)
1435
1435
  ), this.interceptorIds.response.convertHttpErrorResponseInterceptor = this.httpClient.interceptors.response.use(
1436
1436
  (r) => r,
1437
- (r) => P.convertHttpErrorResponse(r)
1437
+ (r) => R.convertHttpErrorResponse(r)
1438
1438
  ), this.interceptorIds.response.canceledResponseInterceptor = this.httpClient.interceptors.response.use((r) => r, this.canceledResponseInterceptor), this.interceptorIds.response.authErrorsResponseInterceptor = this.httpClient.interceptors.response.use((r) => r, this.authErrorsResponseInterceptors), this.interceptorIds.response.dataConverterResponseInterceptor = this.httpClient.interceptors.response.use(
1439
1439
  this.dataConverterResponseInterceptor,
1440
1440
  (r) => Promise.reject(r)
@@ -1446,7 +1446,7 @@ const P = class P {
1446
1446
  * @param handler Ссылка на функцию-обработчик ошибок.
1447
1447
  */
1448
1448
  static setDefaultErrorsResponseHandler(r) {
1449
- P.defaultErrorsResponseHandler = r;
1449
+ R.defaultErrorsResponseHandler = r;
1450
1450
  }
1451
1451
  /**
1452
1452
  * Регистрирует хук, который будет вызываться перед выполнением каждого HTTP запроса.
@@ -1454,7 +1454,7 @@ const P = class P {
1454
1454
  * @param hook Функция-хук для обработки запроса.
1455
1455
  */
1456
1456
  static addRequestHook(r) {
1457
- P.requestHooks.includes(r) || P.requestHooks.push(r);
1457
+ R.requestHooks.includes(r) || R.requestHooks.push(r);
1458
1458
  }
1459
1459
  /**
1460
1460
  * Удаляет зарегистрированный хук запроса.
@@ -1462,8 +1462,8 @@ const P = class P {
1462
1462
  * @param hook Функция-хук для удаления.
1463
1463
  */
1464
1464
  static removeRequestHook(r) {
1465
- const e = P.requestHooks.indexOf(r);
1466
- e !== -1 && P.requestHooks.splice(e, 1);
1465
+ const e = R.requestHooks.indexOf(r);
1466
+ e !== -1 && R.requestHooks.splice(e, 1);
1467
1467
  }
1468
1468
  /**
1469
1469
  * Регистрирует хук, который будет вызываться после получения ответа на каждый HTTP запрос.
@@ -1471,7 +1471,7 @@ const P = class P {
1471
1471
  * @param hook Функция-хук для обработки ответа.
1472
1472
  */
1473
1473
  static addResponseHook(r) {
1474
- P.responseHooks.includes(r) || P.responseHooks.push(r);
1474
+ R.responseHooks.includes(r) || R.responseHooks.push(r);
1475
1475
  }
1476
1476
  /**
1477
1477
  * Удаляет зарегистрированный хук ответа.
@@ -1479,8 +1479,8 @@ const P = class P {
1479
1479
  * @param hook Функция-хук для удаления.
1480
1480
  */
1481
1481
  static removeResponseHook(r) {
1482
- const e = P.responseHooks.indexOf(r);
1483
- e !== -1 && P.responseHooks.splice(e, 1);
1482
+ const e = R.responseHooks.indexOf(r);
1483
+ e !== -1 && R.responseHooks.splice(e, 1);
1484
1484
  }
1485
1485
  /**
1486
1486
  * Возвращает экземпляр объекта текущего класса.
@@ -1488,7 +1488,7 @@ const P = class P {
1488
1488
  * @param type Тип данных, которыми оперирует метод.
1489
1489
  */
1490
1490
  static getInstance(r) {
1491
- return Object.prototype.hasOwnProperty.call(P.instances, r.name) || (P.instances[r.name] = je.simpleInstanceInitializer(r)), P.instances[r.name];
1491
+ return Object.prototype.hasOwnProperty.call(R.instances, r.name) || (R.instances[r.name] = je.simpleInstanceInitializer(r)), R.instances[r.name];
1492
1492
  }
1493
1493
  /**
1494
1494
  * Конвертирует данные ошибки HTTP запроса в более упрощённую и часто используемую форму.
@@ -1497,15 +1497,15 @@ const P = class P {
1497
1497
  */
1498
1498
  static convertHttpErrorResponse(r) {
1499
1499
  var e, s;
1500
- if ($(r) || !$(r.request) || !$(r.response)) {
1501
- const i = $(r) ? {} : r == null ? void 0 : r.response;
1500
+ if (A(r) || !A(r.request) || !A(r.response)) {
1501
+ const n = A(r) ? {} : r == null ? void 0 : r.response;
1502
1502
  return Promise.reject({
1503
- status: (i == null ? void 0 : i.status) ?? 0,
1504
- statusText: (i == null ? void 0 : i.statusText) ?? "Unknown",
1505
- message: ((e = i == null ? void 0 : i.data) == null ? void 0 : e.message) ?? "Unknown Error. Probably network error.",
1506
- errors: (s = i == null ? void 0 : i.data) == null ? void 0 : s.errors,
1507
- headers: (i == null ? void 0 : i.headers) ?? {},
1508
- data: i == null ? void 0 : i.data,
1503
+ status: (n == null ? void 0 : n.status) ?? 0,
1504
+ statusText: (n == null ? void 0 : n.statusText) ?? "Unknown",
1505
+ message: ((e = n == null ? void 0 : n.data) == null ? void 0 : e.message) ?? "Unknown Error. Probably network error.",
1506
+ errors: (s = n == null ? void 0 : n.data) == null ? void 0 : s.errors,
1507
+ headers: (n == null ? void 0 : n.headers) ?? {},
1508
+ data: n == null ? void 0 : n.data,
1509
1509
  rawError: r
1510
1510
  });
1511
1511
  }
@@ -1519,10 +1519,10 @@ const P = class P {
1519
1519
  * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
1520
1520
  * @param disableNotifications Признак необходимости отключить уведомления об ошибках.
1521
1521
  */
1522
- request(r, e = void 0, s = {}, i = !1) {
1522
+ request(r, e = void 0, s = {}, n = !1) {
1523
1523
  const o = this.httpClient.request(r).then((c) => e ? e(c) : c.data);
1524
1524
  return o.catch((c) => {
1525
- (c == null ? void 0 : c.name) !== "CanceledError" && this.errorResponseHandler(c, s, i);
1525
+ (c == null ? void 0 : c.name) !== "CanceledError" && this.errorResponseHandler(c, s, n);
1526
1526
  }), o;
1527
1527
  }
1528
1528
  /**
@@ -1534,8 +1534,8 @@ const P = class P {
1534
1534
  * @param disableNotifications Признак необходимости отключить уведомления об ошибках.
1535
1535
  * @param signal Сигнал отмены запроса.
1536
1536
  */
1537
- get(r, e = {}, s = void 0, i = !1, o = void 0) {
1538
- return this.request({ method: "GET", url: r, params: e, signal: o }, s, {}, i);
1537
+ get(r, e = {}, s = void 0, n = !1, o = void 0) {
1538
+ return this.request({ method: "GET", url: r, params: e, signal: o }, s, {}, n);
1539
1539
  }
1540
1540
  /**
1541
1541
  * Выполняет get-запрос с параметрами по умолчанию и возвращает Blob.
@@ -1545,8 +1545,8 @@ const P = class P {
1545
1545
  * @param successHandler Функция обратного вызова для обработки данных при успешном выполнении запроса.
1546
1546
  * @param disableNotifications Признак необходимости отключить уведомления об ошибках.
1547
1547
  */
1548
- getBlob(r, e = {}, s = void 0, i = !1) {
1549
- return this.request({ method: "GET", url: r, params: e, responseType: "blob" }, s, {}, i);
1548
+ getBlob(r, e = {}, s = void 0, n = !1) {
1549
+ return this.request({ method: "GET", url: r, params: e, responseType: "blob" }, s, {}, n);
1550
1550
  }
1551
1551
  /**
1552
1552
  * Выполняет patch-запрос с параметрами по умолчанию.
@@ -1557,8 +1557,8 @@ const P = class P {
1557
1557
  * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
1558
1558
  * @param disableNotifications Признак необходимости отключить уведомления об ошибках.
1559
1559
  */
1560
- patch(r, e = {}, s = void 0, i = {}, o = !1) {
1561
- return this.request({ method: "PATCH", url: r, data: e }, s, i, o);
1560
+ patch(r, e = {}, s = void 0, n = {}, o = !1) {
1561
+ return this.request({ method: "PATCH", url: r, data: e }, s, n, o);
1562
1562
  }
1563
1563
  /**
1564
1564
  * Выполняет post-запрос с параметрами по умолчанию.
@@ -1569,8 +1569,8 @@ const P = class P {
1569
1569
  * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
1570
1570
  * @param disableNotifications Признак необходимости отключить уведомления об ошибках.
1571
1571
  */
1572
- post(r, e = {}, s = void 0, i = {}, o = !1) {
1573
- return this.request({ method: "POST", url: r, data: e }, s, i, o);
1572
+ post(r, e = {}, s = void 0, n = {}, o = !1) {
1573
+ return this.request({ method: "POST", url: r, data: e }, s, n, o);
1574
1574
  }
1575
1575
  /**
1576
1576
  * Выполняет delete-запрос с параметрами по умолчанию.
@@ -1587,22 +1587,22 @@ const P = class P {
1587
1587
  * Экземпляр объекта текущего класса.
1588
1588
  */
1589
1589
  // eslint-disable-next-line no-use-before-define
1590
- t(P, "instances", {}), /**
1590
+ t(R, "instances", {}), /**
1591
1591
  * Базовый обработчик ошибок выполнения запросов.
1592
1592
  *
1593
1593
  * @param error Данные об ошибке.
1594
1594
  * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
1595
1595
  * @param disableNotifications Признак необходимости отключить уведомления об ошибках.
1596
1596
  */
1597
- t(P, "defaultErrorsResponseHandler", v), /**
1597
+ t(R, "defaultErrorsResponseHandler", v), /**
1598
1598
  * Список зарегистрированных хуков для запросов.
1599
1599
  */
1600
- t(P, "requestHooks", []), /**
1600
+ t(R, "requestHooks", []), /**
1601
1601
  * Список зарегистрированных хуков для ответов.
1602
1602
  */
1603
- t(P, "responseHooks", []);
1604
- let p = P;
1605
- class zt extends p {
1603
+ t(R, "responseHooks", []);
1604
+ let p = R;
1605
+ class Wt extends p {
1606
1606
  /**
1607
1607
  * Возвращает содержимое корзины указанного клиента.
1608
1608
  *
@@ -1649,7 +1649,7 @@ class zt extends p {
1649
1649
  is_additional_sale: e.isAdditionalSale,
1650
1650
  ...e.configuratorParams
1651
1651
  },
1652
- (i) => new ye(i.data),
1652
+ (n) => new ye(n.data),
1653
1653
  s
1654
1654
  );
1655
1655
  }
@@ -1679,7 +1679,7 @@ class zt extends p {
1679
1679
  is_additional_sale: e.isAdditionalSale,
1680
1680
  ...e.configuratorParams
1681
1681
  },
1682
- (i) => new ye(i.data),
1682
+ (n) => new ye(n.data),
1683
1683
  s
1684
1684
  );
1685
1685
  }
@@ -1716,15 +1716,15 @@ class zt extends p {
1716
1716
  return this.get(`internal/clients/${r.id}/cart/add-products-from-csv/example`, {}, (e) => new Blob([e.data], { type: "text/csv" }));
1717
1717
  }
1718
1718
  }
1719
- var lt = /* @__PURE__ */ ((n) => (n.m2Cost = "m2Cost", n.percent = "percent", n.value = "value", n))(lt || {}), ut = /* @__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))(ut || {});
1720
- class q extends fe {
1719
+ var lt = /* @__PURE__ */ ((i) => (i.m2Cost = "m2Cost", i.percent = "percent", i.value = "value", i))(lt || {}), ut = /* @__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))(ut || {});
1720
+ class N extends fe {
1721
1721
  /**
1722
1722
  * Инициализирует экземпляр класса {@link Category}.
1723
1723
  *
1724
1724
  * @param data Данные для первоначальной инициализации.
1725
1725
  */
1726
1726
  constructor(e) {
1727
- var s, i;
1727
+ var s, n;
1728
1728
  super(e);
1729
1729
  /**
1730
1730
  * Данные о вложенных категориях.
@@ -1734,7 +1734,7 @@ class q extends fe {
1734
1734
  * Список продуктов категории.
1735
1735
  */
1736
1736
  t(this, "products");
1737
- this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new q(o)), this.products = (i = e == null ? void 0 : e.products) == null ? void 0 : i.map((o) => new k(o));
1737
+ this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new N(o)), this.products = (n = e == null ? void 0 : e.products) == null ? void 0 : n.map((o) => new I(o));
1738
1738
  }
1739
1739
  }
1740
1740
  class fr {
@@ -1813,7 +1813,7 @@ class pt extends b {
1813
1813
  this.description = e.description, this.canChangeLowCost = e.canChangeLowCost, this.parentRoleId = e.parentRoleId;
1814
1814
  }
1815
1815
  }
1816
- class De extends Be {
1816
+ class Pe extends Be {
1817
1817
  /**
1818
1818
  * Инициализирует экземпляр класса {@link Manager}.
1819
1819
  *
@@ -1850,7 +1850,7 @@ class De extends Be {
1850
1850
  * Список направлений кураторства.
1851
1851
  */
1852
1852
  t(this, "curatedDirections");
1853
- 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 = e == null ? void 0 : e.createdAt, this.supervisorId = e == null ? void 0 : e.supervisorId, this.pricingRole = e != null && e.pricingRole ? new pt(e.pricingRole) : void 0, this.curatedDirections = ((s = e == null ? void 0 : e.curatedDirections) == null ? void 0 : s.map((i) => new ze(i))) ?? [];
1853
+ 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 = e == null ? void 0 : e.createdAt, this.supervisorId = e == null ? void 0 : e.supervisorId, this.pricingRole = e != null && e.pricingRole ? new pt(e.pricingRole) : void 0, this.curatedDirections = ((s = e == null ? void 0 : e.curatedDirections) == null ? void 0 : s.map((n) => new ze(n))) ?? [];
1854
1854
  }
1855
1855
  }
1856
1856
  class ht extends fe {
@@ -1881,7 +1881,7 @@ class ht extends fe {
1881
1881
  * Данные о менеджере за которым закреплена категория.
1882
1882
  */
1883
1883
  t(this, "manager");
1884
- 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 De(e.manager) : void 0;
1884
+ 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 Pe(e.manager) : void 0;
1885
1885
  }
1886
1886
  }
1887
1887
  class ve extends ht {
@@ -1891,7 +1891,7 @@ class ve extends ht {
1891
1891
  * @param data Данные для первоначальной инициализации.
1892
1892
  */
1893
1893
  constructor(e) {
1894
- var s, i;
1894
+ var s, n;
1895
1895
  super(e);
1896
1896
  /**
1897
1897
  * Данные о вложенных категориях.
@@ -1901,7 +1901,7 @@ class ve extends ht {
1901
1901
  * Список продуктов категории.
1902
1902
  */
1903
1903
  t(this, "products");
1904
- this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new ve(o)), this.products = (i = e == null ? void 0 : e.products) == null ? void 0 : i.map((o) => new G(o));
1904
+ this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new ve(o)), this.products = (n = e == null ? void 0 : e.products) == null ? void 0 : n.map((o) => new G(o));
1905
1905
  }
1906
1906
  }
1907
1907
  class yr {
@@ -1919,7 +1919,7 @@ class yr {
1919
1919
  * Процент, который прибавляется к значению выбранного коэффициента.
1920
1920
  */
1921
1921
  t(this, "increasePercent");
1922
- this.priceCoefficient = (r == null ? void 0 : r.priceCoefficient) && new Pe(r.priceCoefficient), this.increasePercent = r == null ? void 0 : r.increasePercent;
1922
+ this.priceCoefficient = (r == null ? void 0 : r.priceCoefficient) && new Re(r.priceCoefficient), this.increasePercent = r == null ? void 0 : r.increasePercent;
1923
1923
  }
1924
1924
  }
1925
1925
  class ke extends yr {
@@ -1977,7 +1977,7 @@ class pe extends w {
1977
1977
  e && (this.country = new Z(e.country));
1978
1978
  }
1979
1979
  }
1980
- class Ae extends w {
1980
+ class De extends w {
1981
1981
  /**
1982
1982
  * Инициализирует экземпляр класса {@link CityWithRegionAndCountry}.
1983
1983
  *
@@ -2028,7 +2028,7 @@ class wr extends b {
2028
2028
  * Признак активности учетной записи пользователя.
2029
2029
  */
2030
2030
  t(this, "isActive");
2031
- 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 O(e.salesDirection) : void 0, this.createdAt = C(e == null ? void 0 : e.createdAt) ? R(e.createdAt) : e == null ? void 0 : e.createdAt, this.lastLoginAt = C(e == null ? void 0 : e.lastLoginAt) ? R(e.lastLoginAt) : e == null ? void 0 : e.lastLoginAt, this.isActive = (e == null ? void 0 : e.isActive) ?? !1;
2031
+ 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 O(e.salesDirection) : void 0, this.createdAt = C(e == null ? void 0 : e.createdAt) ? a(e.createdAt) : e == null ? void 0 : e.createdAt, this.lastLoginAt = C(e == null ? void 0 : e.lastLoginAt) ? a(e.lastLoginAt) : e == null ? void 0 : e.lastLoginAt, this.isActive = (e == null ? void 0 : e.isActive) ?? !1;
2032
2032
  }
2033
2033
  }
2034
2034
  class te extends wr {
@@ -2039,7 +2039,7 @@ class te extends wr {
2039
2039
  */
2040
2040
  // eslint-disable-next-line sonarjs/cognitive-complexity
2041
2041
  constructor(e) {
2042
- var s, i;
2042
+ var s, n;
2043
2043
  super(e);
2044
2044
  /**
2045
2045
  * Направление продаж.
@@ -2077,7 +2077,7 @@ class te extends wr {
2077
2077
  * @inheritDoc
2078
2078
  */
2079
2079
  t(this, "curators");
2080
- this.salesDirection = new O(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 Ae(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 = ((s = e == null ? void 0 : e.managers) == null ? void 0 : s.map((o) => new Be(o))) ?? [], this.curators = ((i = e == null ? void 0 : e.curators) == null ? void 0 : i.map((o) => new We(o))) ?? void 0;
2080
+ this.salesDirection = new O(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 De(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 = ((s = e == null ? void 0 : e.managers) == null ? void 0 : s.map((o) => new Be(o))) ?? [], this.curators = ((n = e == null ? void 0 : e.curators) == null ? void 0 : n.map((o) => new We(o))) ?? void 0;
2081
2081
  }
2082
2082
  }
2083
2083
  class ne extends re {
@@ -2104,7 +2104,7 @@ class ne extends re {
2104
2104
  * Данные шаблона прайс-листа.
2105
2105
  */
2106
2106
  t(this, "priceTemplate");
2107
- this.createdAt = C(e == null ? void 0 : e.createdAt) ? R(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.deletedAt = C(e == null ? void 0 : e.deletedAt) ? R(e.deletedAt) : e == null ? void 0 : e.deletedAt, this.client = new te(e == null ? void 0 : e.client), this.priceTemplate = new Q(e == null ? void 0 : e.priceTemplate);
2107
+ this.createdAt = C(e == null ? void 0 : e.createdAt) ? a(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.deletedAt = C(e == null ? void 0 : e.deletedAt) ? a(e.deletedAt) : e == null ? void 0 : e.deletedAt, this.client = new te(e == null ? void 0 : e.client), this.priceTemplate = new Q(e == null ? void 0 : e.priceTemplate);
2108
2108
  }
2109
2109
  }
2110
2110
  class Ie extends yr {
@@ -2119,7 +2119,7 @@ class Ie extends yr {
2119
2119
  * Базовые данные о продукте.
2120
2120
  */
2121
2121
  t(this, "product");
2122
- this.product = new k(e == null ? void 0 : e.product);
2122
+ this.product = new I(e == null ? void 0 : e.product);
2123
2123
  }
2124
2124
  }
2125
2125
  class vr extends w {
@@ -2181,10 +2181,10 @@ class S {
2181
2181
  * Окончание периода.
2182
2182
  */
2183
2183
  t(this, "to");
2184
- this.from = C(r == null ? void 0 : r.from) ? R(r.from) : (r == null ? void 0 : r.from) ?? null, this.to = C(r == null ? void 0 : r.to) ? R(r.to) : (r == null ? void 0 : r.to) ?? null;
2184
+ this.from = C(r == null ? void 0 : r.from) ? a(r.from) : (r == null ? void 0 : r.from) ?? null, this.to = C(r == null ? void 0 : r.to) ? a(r.to) : (r == null ? void 0 : r.to) ?? null;
2185
2185
  }
2186
2186
  }
2187
- class Wt {
2187
+ class Jt {
2188
2188
  /**
2189
2189
  * Инициализирует экземпляр класса {@link TemplatesListFilters}.
2190
2190
  *
@@ -2239,13 +2239,13 @@ class Wt {
2239
2239
  * только актуальные данные.
2240
2240
  */
2241
2241
  asClearRaw() {
2242
- var e, s, i, o;
2242
+ var e, s, n, o;
2243
2243
  const r = {};
2244
2244
  return Object.keys(this).forEach((c) => {
2245
2245
  const u = this[c];
2246
2246
  // eslint-disable-next-line prettier/prettier
2247
- $(u) || C(u) && u.trim().length === 0 || He(u.isNewRec) && u.isNewRec() || (r[c] = u);
2248
- }), !((e = r == null ? void 0 : r.createdAt) != null && e.from) && !((s = r == null ? void 0 : r.createdAt) != null && s.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;
2247
+ A(u) || C(u) && u.trim().length === 0 || He(u.isNewRec) && u.isNewRec() || (r[c] = u);
2248
+ }), !((e = r == null ? void 0 : r.createdAt) != null && e.from) && !((s = r == null ? void 0 : r.createdAt) != null && s.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;
2249
2249
  }
2250
2250
  }
2251
2251
  class ce extends b {
@@ -2302,10 +2302,10 @@ class Ye {
2302
2302
  * Минимальный коэффициент цены.
2303
2303
  */
2304
2304
  t(this, "minCoefficient");
2305
- this.role = new ce(r == null ? void 0 : r.role), this.category = new fe(r == null ? void 0 : r.category), this.minCoefficient = new Pe(r == null ? void 0 : r.minCoefficient);
2305
+ this.role = new ce(r == null ? void 0 : r.role), this.category = new fe(r == null ? void 0 : r.category), this.minCoefficient = new Re(r == null ? void 0 : r.minCoefficient);
2306
2306
  }
2307
2307
  }
2308
- class Jt extends p {
2308
+ class Et extends p {
2309
2309
  /**
2310
2310
  * Возвращает данные о результатах поиска категорий и товаров.
2311
2311
  *
@@ -2331,12 +2331,12 @@ class Jt extends p {
2331
2331
  * @see /doc/api/internal#/operations/api_internal_price_export
2332
2332
  */
2333
2333
  // eslint-disable-next-line class-methods-use-this
2334
- getPriceExportLink(r = "csv", e = !1, s = void 0, i = void 0) {
2335
- let c = `${I().config.http.portalApiUrl}/api/internal/price/export?format=${r}&show_hidden=${e}`;
2336
- return s && (c += `&category_id=${s}`), i && (c += `&client_id=${i}`), c;
2334
+ getPriceExportLink(r = "csv", e = !1, s = void 0, n = void 0) {
2335
+ let c = `${k().config.http.portalApiUrl}/api/internal/price/export?format=${r}&show_hidden=${e}`;
2336
+ return s && (c += `&category_id=${s}`), n && (c += `&client_id=${n}`), c;
2337
2337
  }
2338
2338
  }
2339
- class Et extends p {
2339
+ class Vt extends p {
2340
2340
  /**
2341
2341
  * Импортирует цены клиента из CSV файла.
2342
2342
  *
@@ -2358,9 +2358,9 @@ class Et extends p {
2358
2358
  * @see /doc/api/internal#/operations/api_internal_client_price_category_update
2359
2359
  */
2360
2360
  updateCategoryPrices(r, e, s) {
2361
- var i;
2361
+ var n;
2362
2362
  return this.patch(`/internal/clients/${r}/price/categories/${e}`, {
2363
- price_coefficient_id: (i = s.coefficient) == null ? void 0 : i.id,
2363
+ price_coefficient_id: (n = s.coefficient) == null ? void 0 : n.id,
2364
2364
  increase_percent: s.value
2365
2365
  });
2366
2366
  }
@@ -2453,11 +2453,11 @@ class Et extends p {
2453
2453
  * @see /doc/api/internal#/operations/api_internal_client_price_products_update
2454
2454
  */
2455
2455
  updateProductPrice(r, e, s) {
2456
- var i;
2456
+ var n;
2457
2457
  return this.patch(
2458
2458
  `/internal/clients/${r}/price/products/${e}`,
2459
2459
  {
2460
- price_coefficient_id: (i = s.coefficient) == null ? void 0 : i.id,
2460
+ price_coefficient_id: (n = s.coefficient) == null ? void 0 : n.id,
2461
2461
  increase_percent: s.value
2462
2462
  },
2463
2463
  (o) => new G(o.data)
@@ -2535,7 +2535,7 @@ class Et extends p {
2535
2535
  return this.post(`/internal/clients/${r}/price/commercial-offer/send`, e);
2536
2536
  }
2537
2537
  }
2538
- class Vt extends p {
2538
+ class Kt extends p {
2539
2539
  /**
2540
2540
  * Возвращает список шаблонов прайс-листа привязанных к клиенту.
2541
2541
  *
@@ -2570,12 +2570,12 @@ class Vt extends p {
2570
2570
  * @see /doc/api/internal#/operations/api_internal_client_price_template_attach
2571
2571
  */
2572
2572
  attachTemplate(r, e, s) {
2573
- const i = I().config.dateFormats.api;
2573
+ const n = k().config.dateFormats.api;
2574
2574
  return this.post(
2575
2575
  `/internal/clients/${r}/price/templates/${e}`,
2576
2576
  s && {
2577
- startAt: s.startAt && H(s.startAt, i),
2578
- endAt: s.endAt && H(s.endAt, i)
2577
+ startAt: s.startAt && q(s.startAt, n),
2578
+ endAt: s.endAt && q(s.endAt, n)
2579
2579
  },
2580
2580
  (o) => new ne(o.data),
2581
2581
  {},
@@ -2603,13 +2603,13 @@ class Vt extends p {
2603
2603
  *
2604
2604
  * @see /doc/api/internal#/operations/api_internal_client_price_template_change
2605
2605
  */
2606
- changeTemplate(r, e, s, i) {
2607
- const o = I().config.dateFormats.api;
2606
+ changeTemplate(r, e, s, n) {
2607
+ const o = k().config.dateFormats.api;
2608
2608
  return this.patch(
2609
2609
  `/internal/clients/${r}/price/templates/${e}/${s}`,
2610
- i && {
2611
- startAt: i.startAt && H(i.startAt, o),
2612
- endAt: i.endAt && H(i.endAt, o)
2610
+ n && {
2611
+ startAt: n.startAt && q(n.startAt, o),
2612
+ endAt: n.endAt && q(n.endAt, o)
2613
2613
  },
2614
2614
  (c) => new ne(c.data)
2615
2615
  );
@@ -2627,7 +2627,7 @@ class Vt extends p {
2627
2627
  return this.delete(`/internal/clients/${r}/price/templates/${e}/${s}`);
2628
2628
  }
2629
2629
  }
2630
- class Kt extends p {
2630
+ class Qt extends p {
2631
2631
  /**
2632
2632
  * Возвращает список данных о корневых категориях.
2633
2633
  *
@@ -2641,7 +2641,7 @@ class Kt extends p {
2641
2641
  {
2642
2642
  showHidden: r
2643
2643
  },
2644
- (e) => e.data.map((s) => new q(s))
2644
+ (e) => e.data.map((s) => new N(s))
2645
2645
  );
2646
2646
  }
2647
2647
  /**
@@ -2660,7 +2660,7 @@ class Kt extends p {
2660
2660
  showHidden: e,
2661
2661
  withNestedCategories: s
2662
2662
  },
2663
- (i) => new q(i.data)
2663
+ (n) => new N(n.data)
2664
2664
  );
2665
2665
  }
2666
2666
  /**
@@ -2669,7 +2669,7 @@ class Kt extends p {
2669
2669
  * @param categoryID Идентификатор категории продуктов.
2670
2670
  */
2671
2671
  getPublicCategoryData(r) {
2672
- return this.get(`/public/catalog/categories/${r}`, {}, (e) => new q(e.data));
2672
+ return this.get(`/public/catalog/categories/${r}`, {}, (e) => new N(e.data));
2673
2673
  }
2674
2674
  /**
2675
2675
  * Возвращает список продуктов категории.
@@ -2687,7 +2687,7 @@ class Kt extends p {
2687
2687
  showHidden: s,
2688
2688
  withPriceCoefficients: e
2689
2689
  },
2690
- (i) => ge(i.data, (o) => new k(o))
2690
+ (n) => ge(n.data, (o) => new I(o))
2691
2691
  );
2692
2692
  }
2693
2693
  /**
@@ -2700,7 +2700,7 @@ class Kt extends p {
2700
2700
  getCategoryProductsCoefficients(r) {
2701
2701
  return this.get(`/internal/catalog/categories/${r}/products/coefficients`, {}, (e) => {
2702
2702
  const { data: s } = e;
2703
- return Hr(s, (i) => i.map((o) => new Ge(o))), s;
2703
+ return Hr(s, (n) => n.map((o) => new Ge(o))), s;
2704
2704
  });
2705
2705
  }
2706
2706
  /**
@@ -2710,16 +2710,16 @@ class Kt extends p {
2710
2710
  * @param limit Количество возвращаемых записей.
2711
2711
  */
2712
2712
  publicSimpleSearch(r, e = 10) {
2713
- return new Promise((s, i) => {
2713
+ return new Promise((s, n) => {
2714
2714
  this.get(`/public/catalog/search/simple?limit=${e}&term=${r}`).then((o) => {
2715
- s(o.categories.map((c) => new q(c)));
2715
+ s(o.categories.map((c) => new N(c)));
2716
2716
  }).catch((o) => {
2717
- i(o);
2717
+ n(o);
2718
2718
  });
2719
2719
  });
2720
2720
  }
2721
2721
  }
2722
- class Qt extends p {
2722
+ class Yt extends p {
2723
2723
  /**
2724
2724
  * Возвращает данные об указанном продукте.
2725
2725
  *
@@ -2729,7 +2729,7 @@ class Qt extends p {
2729
2729
  * @see /doc/api/internal#/Каталог/api_internal_catalog_products_get
2730
2730
  */
2731
2731
  getProductData(r, e = !1) {
2732
- return this.get(`/internal/catalog/products/${r}`, { withPriceCoefficients: e }, (s) => new k(s.data));
2732
+ return this.get(`/internal/catalog/products/${r}`, { withPriceCoefficients: e }, (s) => new I(s.data));
2733
2733
  }
2734
2734
  /**
2735
2735
  * Возвращает публичные данные об указанном продукте.
@@ -2737,7 +2737,7 @@ class Qt extends p {
2737
2737
  * @param productId Идентификатор продукта.
2738
2738
  */
2739
2739
  getPublicProductData(r) {
2740
- return this.get(`/public/catalog/products/${r}`, {}, (e) => new k(e.data));
2740
+ return this.get(`/public/catalog/products/${r}`, {}, (e) => new I(e.data));
2741
2741
  }
2742
2742
  /**
2743
2743
  * Возвращает данные о коэффициентах цен для указанного продукта.
@@ -2760,16 +2760,16 @@ class Qt extends p {
2760
2760
  * @param limit Количество возвращаемых записей.
2761
2761
  */
2762
2762
  publicSimpleSearch(r, e = 10) {
2763
- return new Promise((s, i) => {
2763
+ return new Promise((s, n) => {
2764
2764
  this.get(`/public/catalog/search/simple?limit=${e}&term=${r}`).then((o) => {
2765
- s(o.products.map((c) => new k(c)));
2765
+ s(o.products.map((c) => new I(c)));
2766
2766
  }).catch((o) => {
2767
- i(o);
2767
+ n(o);
2768
2768
  });
2769
2769
  });
2770
2770
  }
2771
2771
  }
2772
- class Yt extends p {
2772
+ class Xt extends p {
2773
2773
  /**
2774
2774
  * Возвращает список данных о корневых категориях указанного клиента.
2775
2775
  *
@@ -2785,7 +2785,7 @@ class Yt extends p {
2785
2785
  clientId: r,
2786
2786
  showHidden: e
2787
2787
  },
2788
- (s) => s.data.map((i) => new ve(i))
2788
+ (s) => s.data.map((n) => new ve(n))
2789
2789
  );
2790
2790
  }
2791
2791
  /**
@@ -2798,13 +2798,13 @@ class Yt extends p {
2798
2798
  *
2799
2799
  * @see /doc/api/internal#/Каталог/api_internal_catalog_categories_get
2800
2800
  */
2801
- getCategoryData(r, e, s = !1, i = !1) {
2801
+ getCategoryData(r, e, s = !1, n = !1) {
2802
2802
  return this.get(
2803
2803
  `/internal/catalog/categories/${e}`,
2804
2804
  {
2805
2805
  clientId: r,
2806
2806
  showHidden: s,
2807
- withNestedCategories: i
2807
+ withNestedCategories: n
2808
2808
  },
2809
2809
  (o) => new ve(o.data)
2810
2810
  );
@@ -2819,19 +2819,19 @@ class Yt extends p {
2819
2819
  *
2820
2820
  * @see /doc/api/internal#/Каталог/api_internal_catalog_categories_products_get
2821
2821
  */
2822
- getCategoryProductsList(r, e, s = !0, i = !1) {
2822
+ getCategoryProductsList(r, e, s = !0, n = !1) {
2823
2823
  return this.get(
2824
2824
  `/internal/catalog/categories/${e}/products`,
2825
2825
  {
2826
2826
  client_id: r,
2827
- showHidden: i,
2827
+ showHidden: n,
2828
2828
  withPriceCoefficients: s
2829
2829
  },
2830
2830
  (o) => ge(o.data, (c) => new G(c))
2831
2831
  );
2832
2832
  }
2833
2833
  }
2834
- class Xt extends p {
2834
+ class Zt extends p {
2835
2835
  /**
2836
2836
  * Возвращает данные об указанном продукте для указанного клиента.
2837
2837
  *
@@ -2848,11 +2848,11 @@ class Xt extends p {
2848
2848
  clientId: e,
2849
2849
  withPriceCoefficients: s
2850
2850
  },
2851
- (i) => new G(i.data)
2851
+ (n) => new G(n.data)
2852
2852
  );
2853
2853
  }
2854
2854
  }
2855
- var Je = /* @__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))(Je || {});
2855
+ var Je = /* @__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))(Je || {});
2856
2856
  class Xe {
2857
2857
  /**
2858
2858
  * Инициализирует экземпляр класса {@link FilterItem}.
@@ -2884,7 +2884,7 @@ class Xe {
2884
2884
  field: this.field,
2885
2885
  op: this.op
2886
2886
  };
2887
- return r.value = Oe(this.value) ? H(this.value, I().config.dateFormats.api) : this.value, r;
2887
+ return r.value = _e(this.value) ? q(this.value, k().config.dateFormats.api) : this.value, r;
2888
2888
  }
2889
2889
  }
2890
2890
  class M {
@@ -2907,7 +2907,7 @@ class M {
2907
2907
  */
2908
2908
  t(this, "groups");
2909
2909
  var e, s;
2910
- 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 Xe(i))) ?? [], this.groups = ((s = r == null ? void 0 : r.groups) == null ? void 0 : s.map((i) => new M(i))) ?? [];
2910
+ 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 Xe(n))) ?? [], this.groups = ((s = r == null ? void 0 : r.groups) == null ? void 0 : s.map((n) => new M(n))) ?? [];
2911
2911
  }
2912
2912
  /**
2913
2913
  * Преобразует группу фильтров в примитивное представление для API.
@@ -2922,7 +2922,7 @@ class M {
2922
2922
  };
2923
2923
  }
2924
2924
  }
2925
- class $e extends p {
2925
+ class Ae extends p {
2926
2926
  /**
2927
2927
  * Получает пагинированный список данных.
2928
2928
  *
@@ -2935,15 +2935,15 @@ class $e extends p {
2935
2935
  * @param disableDefaultNotificationErrorResponseHandler Признак отключения стандартного обработчика ошибок.
2936
2936
  * @param signal Сигнал отмены запроса.
2937
2937
  */
2938
- getPaginated(r, e, s, i, o, c, u, h = void 0) {
2938
+ getPaginated(r, e, s, n, o, c, u, h = void 0) {
2939
2939
  let m = {
2940
- page: (i == null ? void 0 : i.page) ?? 1,
2941
- perPage: (i == null ? void 0 : i.pageSize) ?? 10
2940
+ page: (n == null ? void 0 : n.page) ?? 1,
2941
+ perPage: (n == null ? void 0 : n.pageSize) ?? 10
2942
2942
  };
2943
2943
  return e && (m.filters = JSON.stringify((e instanceof M ? e : new M(e)).toPrimitive())), X(s) || (m.sort = F(s) ? s : [s]), o && (m = { ...m, ...o }), this.get(r, m, c, u, h);
2944
2944
  }
2945
2945
  }
2946
- class Zt extends $e {
2946
+ class es extends Ae {
2947
2947
  /**
2948
2948
  * Возвращает список шаблонов прайс-листа.
2949
2949
  *
@@ -2954,8 +2954,8 @@ class Zt extends $e {
2954
2954
  * @see /doc/api/internal#/operations/api_internal_catalog_price_template_get_list
2955
2955
  */
2956
2956
  getTemplateList(r, e, s) {
2957
- return this.getPaginated("/internal/price/templates", r, e, s, {}, (i) => {
2958
- const o = { ...i.data };
2957
+ return this.getPaginated("/internal/price/templates", r, e, s, {}, (n) => {
2958
+ const o = { ...n.data };
2959
2959
  return o.data = o.data.map((c) => new Q(c)), o;
2960
2960
  });
2961
2961
  }
@@ -2992,7 +2992,7 @@ class Zt extends $e {
2992
2992
  * @see /doc/api/internal#/operations/api_internal_catalog_price_template_update
2993
2993
  */
2994
2994
  updateTemplate(r, e, s = {}) {
2995
- return this.patch(`/internal/price/templates/${r}`, e, (i) => new Q(i.data), s);
2995
+ return this.patch(`/internal/price/templates/${r}`, e, (n) => new Q(n.data), s);
2996
2996
  }
2997
2997
  /**
2998
2998
  * Удаляет данные о шаблоне прайс-листа.
@@ -3039,11 +3039,11 @@ class Zt extends $e {
3039
3039
  * @see /doc/api/internal#/operations/api_internal_catalog_price_template_product_save
3040
3040
  */
3041
3041
  saveProductTemplatePrice(r, e, s) {
3042
- var i;
3042
+ var n;
3043
3043
  return this.post(
3044
3044
  `/internal/price/templates/${r}/products/${e}`,
3045
3045
  {
3046
- price_coefficient_id: (i = s.coefficient) == null ? void 0 : i.id,
3046
+ price_coefficient_id: (n = s.coefficient) == null ? void 0 : n.id,
3047
3047
  increase_percent: s.value
3048
3048
  },
3049
3049
  (o) => new Ie(o.data)
@@ -3100,7 +3100,7 @@ class Zt extends $e {
3100
3100
  *
3101
3101
  * @see /doc/api/internal#/operations/api_internal_catalog_price_template_category_save
3102
3102
  */
3103
- saveCategoryTemplatePrice(r, e, s, i = !1) {
3103
+ saveCategoryTemplatePrice(r, e, s, n = !1) {
3104
3104
  var o;
3105
3105
  return this.request(
3106
3106
  {
@@ -3110,7 +3110,7 @@ class Zt extends $e {
3110
3110
  price_coefficient_id: (o = s.coefficient) == null ? void 0 : o.id,
3111
3111
  increase_percent: s.value
3112
3112
  },
3113
- params: i ? { recursively: !0 } : {}
3113
+ params: n ? { recursively: !0 } : {}
3114
3114
  },
3115
3115
  (c) => new ke(c.data)
3116
3116
  );
@@ -3147,7 +3147,7 @@ class Zt extends $e {
3147
3147
  );
3148
3148
  }
3149
3149
  }
3150
- class es extends p {
3150
+ class rs extends p {
3151
3151
  /**
3152
3152
  * Возвращает список ролей ценообразования.
3153
3153
  *
@@ -3223,11 +3223,11 @@ class es extends p {
3223
3223
  return this.patch(
3224
3224
  `/internal/price/roles/rules/categories/${r}`,
3225
3225
  e,
3226
- (s) => s.data.map((i) => new Ye(i))
3226
+ (s) => s.data.map((n) => new Ye(n))
3227
3227
  );
3228
3228
  }
3229
3229
  }
3230
- class rs extends $e {
3230
+ class ts extends Ae {
3231
3231
  /**
3232
3232
  * Возвращает пагинированный список свойств.
3233
3233
  *
@@ -3238,8 +3238,8 @@ class rs extends $e {
3238
3238
  * @see /doc/api/internal#/operations/api_internal_catalog_properties_get_list
3239
3239
  */
3240
3240
  getProperties(r, e, s) {
3241
- return this.getPaginated("/internal/catalog/properties", r, e, s, {}, (i) => {
3242
- const o = { ...i.data };
3241
+ return this.getPaginated("/internal/catalog/properties", r, e, s, {}, (n) => {
3242
+ const o = { ...n.data };
3243
3243
  return o.data = o.data.map((c) => new oe(c)), o;
3244
3244
  });
3245
3245
  }
@@ -3257,7 +3257,7 @@ class rs extends $e {
3257
3257
  ...s,
3258
3258
  type: e
3259
3259
  },
3260
- (i) => new oe(i.data)
3260
+ (n) => new oe(n.data)
3261
3261
  );
3262
3262
  }
3263
3263
  /**
@@ -3277,11 +3277,11 @@ class rs extends $e {
3277
3277
  * @see /doc/api/internal#/operations/api_internal_catalog_properties_update
3278
3278
  */
3279
3279
  updateProperty(r, e) {
3280
- const { typeId: s, ...i } = e;
3280
+ const { typeId: s, ...n } = e;
3281
3281
  return this.patch(
3282
3282
  `/internal/catalog/properties/${r}`,
3283
3283
  {
3284
- ...i,
3284
+ ...n,
3285
3285
  type: s
3286
3286
  },
3287
3287
  (o) => new oe(o.data)
@@ -3324,7 +3324,7 @@ class rs extends $e {
3324
3324
  * @see /doc/api/internal#/operations/api_internal_catalog_product_properties_update
3325
3325
  */
3326
3326
  updateProductProperty(r, e, s) {
3327
- return this.patch(`/internal/catalog/products/${r}/properties/${e}`, { value: s }, (i) => new K(i.data));
3327
+ return this.patch(`/internal/catalog/products/${r}/properties/${e}`, { value: s }, (n) => new K(n.data));
3328
3328
  }
3329
3329
  /**
3330
3330
  * Удаляет значение свойства продукта.
@@ -3470,7 +3470,7 @@ class rs extends $e {
3470
3470
  * @see /doc/api/internal#/operations/api_internal_catalog_category_properties_update
3471
3471
  */
3472
3472
  updateCategoryProperty(r, e, s) {
3473
- return this.patch(`/internal/catalog/categories/${r}/properties/${e}`, { value: s }, (i) => new K(i.data));
3473
+ return this.patch(`/internal/catalog/categories/${r}/properties/${e}`, { value: s }, (n) => new K(n.data));
3474
3474
  }
3475
3475
  /**
3476
3476
  * Удаляет значение свойства категории.
@@ -3599,7 +3599,7 @@ class rs extends $e {
3599
3599
  return this.post(`/internal/catalog/categories/${r}/image`, { image: e });
3600
3600
  }
3601
3601
  }
3602
- class ts extends p {
3602
+ class ss extends p {
3603
3603
  /**
3604
3604
  * Возвращает список данных о корневых категориях указанного шаблона прайс-листа.
3605
3605
  *
@@ -3615,7 +3615,7 @@ class ts extends p {
3615
3615
  priceTemplateId: r,
3616
3616
  showHidden: e
3617
3617
  },
3618
- (s) => s.data.map((i) => new q(i))
3618
+ (s) => s.data.map((n) => new N(n))
3619
3619
  );
3620
3620
  }
3621
3621
  /**
@@ -3628,15 +3628,15 @@ class ts extends p {
3628
3628
  *
3629
3629
  * @see /doc/api/internal#/Каталог/api_internal_catalog_categories_get
3630
3630
  */
3631
- getCategoryData(r, e, s = !1, i = !1) {
3631
+ getCategoryData(r, e, s = !1, n = !1) {
3632
3632
  return this.get(
3633
3633
  `/internal/catalog/categories/${e}`,
3634
3634
  {
3635
3635
  priceTemplateId: r,
3636
3636
  showHidden: s,
3637
- withNestedCategories: i
3637
+ withNestedCategories: n
3638
3638
  },
3639
- (o) => new q(o.data)
3639
+ (o) => new N(o.data)
3640
3640
  );
3641
3641
  }
3642
3642
  /**
@@ -3649,26 +3649,26 @@ class ts extends p {
3649
3649
  *
3650
3650
  * @see /doc/api/internal#/Каталог/api_internal_catalog_categories_products_get
3651
3651
  */
3652
- getCategoryProductsList(r, e, s = !0, i = !1) {
3652
+ getCategoryProductsList(r, e, s = !0, n = !1) {
3653
3653
  return this.get(
3654
3654
  `/internal/catalog/categories/${e}/products`,
3655
3655
  {
3656
3656
  priceTemplateId: r,
3657
- showHidden: i,
3657
+ showHidden: n,
3658
3658
  withPriceCoefficients: s
3659
3659
  },
3660
- (o) => ge(o.data, (c) => new k(c))
3660
+ (o) => ge(o.data, (c) => new I(c))
3661
3661
  );
3662
3662
  }
3663
3663
  }
3664
- function Ze(n, r, e) {
3664
+ function Ze(i, r, e) {
3665
3665
  let s;
3666
- return n.some((i) => {
3667
- if (i.type === e && i.id === r)
3668
- return s = i, !0;
3669
- if (i.type === "product")
3666
+ return i.some((n) => {
3667
+ if (n.type === e && n.id === r)
3668
+ return s = n, !0;
3669
+ if (n.type === "product")
3670
3670
  return !1;
3671
- const o = i;
3671
+ const o = n;
3672
3672
  if (o.products && o.products.length > 0) {
3673
3673
  const c = Ze(o.products, r, e);
3674
3674
  if (c)
@@ -3682,21 +3682,21 @@ function Ze(n, r, e) {
3682
3682
  return !1;
3683
3683
  }), s;
3684
3684
  }
3685
- function er(n) {
3685
+ function er(i) {
3686
3686
  const r = [];
3687
- return n.forEach((e) => {
3687
+ return i.forEach((e) => {
3688
3688
  if (r.push(e), e.type === "category") {
3689
3689
  const s = e;
3690
3690
  s.products && s.products.length > 0 && r.push(...er(s.products)), s.categories && s.categories.length > 0 && r.push(...er(s.categories));
3691
3691
  }
3692
3692
  }), r;
3693
3693
  }
3694
- var gt = /* @__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))(gt || {}), N = /* @__PURE__ */ ((n) => (n.Person = "individual", n.Ic = "entrepreneur", n.UlR = "legal", n.UlNr = "non_resident_legal", n))(N || {});
3694
+ var gt = /* @__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))(gt || {}), U = /* @__PURE__ */ ((i) => (i.Person = "individual", i.Ic = "entrepreneur", i.UlR = "legal", i.UlNr = "non_resident_legal", i))(U || {});
3695
3695
  class mt extends w {
3696
3696
  }
3697
3697
  class Cr extends w {
3698
3698
  }
3699
- class ss extends w {
3699
+ class is extends w {
3700
3700
  }
3701
3701
  class ft extends w {
3702
3702
  }
@@ -3708,24 +3708,24 @@ class B extends w {
3708
3708
  return new B({
3709
3709
  id: 1,
3710
3710
  guid: "",
3711
- slug: N.Person,
3711
+ slug: U.Person,
3712
3712
  name: ""
3713
3713
  });
3714
3714
  }
3715
3715
  }
3716
- class Rr extends w {
3716
+ class ar extends w {
3717
3717
  }
3718
3718
  class yt extends w {
3719
3719
  }
3720
- class Te extends w {
3720
+ class $e extends w {
3721
3721
  }
3722
3722
  class ee extends w {
3723
3723
  }
3724
- class Pr extends w {
3724
+ class Rr extends w {
3725
3725
  }
3726
3726
  class wt extends w {
3727
3727
  }
3728
- class is {
3728
+ class ns {
3729
3729
  /**
3730
3730
  * Генерирует и возвращает данные-заглушку неопределённой записи справочника.
3731
3731
  *
@@ -3744,9 +3744,9 @@ class is {
3744
3744
  return r.id === 0 && r.slug === "-undefined-";
3745
3745
  }
3746
3746
  }
3747
- class Dr extends w {
3747
+ class Pr extends w {
3748
3748
  }
3749
- class Ar extends w {
3749
+ class Dr extends w {
3750
3750
  }
3751
3751
  class Ne extends re {
3752
3752
  /**
@@ -3775,8 +3775,8 @@ class Ne extends re {
3775
3775
  /**
3776
3776
  * Данные о валюте.
3777
3777
  */
3778
- t(this, "currency", new x());
3779
- e && (this.bankName = e.bankName ?? "", this.bic = e.bic ?? "", this.accountNumber = e.accountNumber ?? "", this.correspondentAccount = e.correspondentAccount ?? "", this.currency = new x(e.currency));
3778
+ t(this, "currency", new _());
3779
+ e && (this.bankName = e.bankName ?? "", this.bic = e.bic ?? "", this.accountNumber = e.accountNumber ?? "", this.correspondentAccount = e.correspondentAccount ?? "", this.currency = new _(e.currency));
3780
3780
  }
3781
3781
  }
3782
3782
  class Ue extends b {
@@ -3830,10 +3830,10 @@ class z extends Ue {
3830
3830
  * Дата и время последнего удаления.
3831
3831
  */
3832
3832
  t(this, "deletedAt");
3833
- 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 = C(e == null ? void 0 : e.deletedAt) ? R(e.deletedAt) : e == null ? void 0 : e.deletedAt;
3833
+ 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 = C(e == null ? void 0 : e.deletedAt) ? a(e.deletedAt) : e == null ? void 0 : e.deletedAt;
3834
3834
  }
3835
3835
  }
3836
- class $r extends b {
3836
+ class Ar extends b {
3837
3837
  /**
3838
3838
  * Инициализирует экземпляр класса {@link ContragentBase}.
3839
3839
  *
@@ -3883,22 +3883,22 @@ class $r extends b {
3883
3883
  */
3884
3884
  t(this, "updater");
3885
3885
  if (e) {
3886
- if (this.opf = new B(e.opf), this.comment = e.comment, this.alternativeName = e.alternativeName, this.createdAt = C(e == null ? void 0 : e.createdAt) ? R(e.createdAt) : e.createdAt, this.creator = e.creator ? new L(e.creator) : void 0, this.updatedAt = C(e == null ? void 0 : e.updatedAt) ? R(e.updatedAt) : e.updatedAt, this.updater = e.updater ? new L(e.updater) : void 0, e.partnerGroup && (this.partnerGroup = new ee(e.partnerGroup)), e.contacts) {
3886
+ if (this.opf = new B(e.opf), this.comment = e.comment, this.alternativeName = e.alternativeName, this.createdAt = C(e == null ? void 0 : e.createdAt) ? a(e.createdAt) : e.createdAt, this.creator = e.creator ? new L(e.creator) : void 0, this.updatedAt = C(e == null ? void 0 : e.updatedAt) ? a(e.updatedAt) : e.updatedAt, this.updater = e.updater ? new L(e.updater) : void 0, e.partnerGroup && (this.partnerGroup = new ee(e.partnerGroup)), e.contacts) {
3887
3887
  const s = [];
3888
- e.contacts.forEach((i) => {
3889
- s.push(new z(i));
3888
+ e.contacts.forEach((n) => {
3889
+ s.push(new z(n));
3890
3890
  }), this.contacts = s;
3891
3891
  }
3892
3892
  if (e.bankAccounts) {
3893
3893
  const s = [];
3894
- e.bankAccounts.forEach((i) => {
3895
- s.push(new Ne(i));
3894
+ e.bankAccounts.forEach((n) => {
3895
+ s.push(new Ne(n));
3896
3896
  }), this.bankAccounts = s;
3897
3897
  }
3898
3898
  }
3899
3899
  }
3900
3900
  }
3901
- class vt extends $r {
3901
+ class vt extends Ar {
3902
3902
  /**
3903
3903
  * Инициализирует экземпляр класса {@link ContragentPerson}.
3904
3904
  *
@@ -3908,7 +3908,7 @@ class vt extends $r {
3908
3908
  super(r);
3909
3909
  }
3910
3910
  }
3911
- class Tr extends $r {
3911
+ class $r extends Ar {
3912
3912
  /**
3913
3913
  * Инициализирует экземпляр класса {@link ContragentIc}.
3914
3914
  *
@@ -3951,7 +3951,7 @@ class Tr extends $r {
3951
3951
  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 ?? "");
3952
3952
  }
3953
3953
  }
3954
- class ar extends Tr {
3954
+ class Tr extends $r {
3955
3955
  /**
3956
3956
  * Инициализирует экземпляр класса {@link ContragentUlR}.
3957
3957
  *
@@ -3966,7 +3966,7 @@ class ar extends Tr {
3966
3966
  e && (this.kpp = e.kpp ?? "");
3967
3967
  }
3968
3968
  }
3969
- class Ct extends ar {
3969
+ class Ct extends Tr {
3970
3970
  /**
3971
3971
  * Инициализирует экземпляр класса {@link ContragentUlNr}.
3972
3972
  *
@@ -3997,11 +3997,11 @@ class Ce {
3997
3997
  */
3998
3998
  static createInstance(r) {
3999
3999
  switch (r.opf.slug) {
4000
- case N.Ic:
4000
+ case U.Ic:
4001
+ return new $r(r);
4002
+ case U.UlR:
4001
4003
  return new Tr(r);
4002
- case N.UlR:
4003
- return new ar(r);
4004
- case N.UlNr:
4004
+ case U.UlNr:
4005
4005
  return new Ct(r);
4006
4006
  default:
4007
4007
  return new vt(r);
@@ -4023,7 +4023,7 @@ class Le extends re {
4023
4023
  this.isPrimary = e.isPrimary;
4024
4024
  }
4025
4025
  }
4026
- class Rt extends z {
4026
+ class at extends z {
4027
4027
  /**
4028
4028
  * Инициализирует экземпляр класса {@link ContactPersonRelated}.
4029
4029
  *
@@ -4051,7 +4051,7 @@ class Rt extends z {
4051
4051
  e.relations && (e.relations.addresses && (this.relations.addresses = e.relations.addresses.map((s) => new Le(s))), e.relations.clients && (this.relations.clients = e.relations.clients.map((s) => new Le(s))), e.relations.contragents && (this.relations.contragents = e.relations.contragents.map((s) => new Le(s))));
4052
4052
  }
4053
4053
  }
4054
- class Re extends tt {
4054
+ class ae extends tt {
4055
4055
  /**
4056
4056
  * Инициализирует экземпляр класса {@link DeliveryAddress}.
4057
4057
  *
@@ -4088,7 +4088,7 @@ class Re extends tt {
4088
4088
  * Признак того, что указанный адрес является адресом транспортной компании.
4089
4089
  */
4090
4090
  t(this, "isTransportCompanyAddress");
4091
- this.address = (e == null ? void 0 : e.address) ?? "", this.coordinates = new gr(e == null ? void 0 : e.coordinates), this.contacts = ((s = e == null ? void 0 : e.contacts) == null ? void 0 : s.map((i) => new z(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;
4091
+ this.address = (e == null ? void 0 : e.address) ?? "", this.coordinates = new gr(e == null ? void 0 : e.coordinates), this.contacts = ((s = e == null ? void 0 : e.contacts) == null ? void 0 : s.map((n) => new z(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;
4092
4092
  }
4093
4093
  }
4094
4094
  class rr extends te {
@@ -4099,7 +4099,7 @@ class rr extends te {
4099
4099
  */
4100
4100
  // eslint-disable-next-line sonarjs/cognitive-complexity
4101
4101
  constructor(e) {
4102
- var s, i, o, c;
4102
+ var s, n, o, c;
4103
4103
  super(e);
4104
4104
  /**
4105
4105
  * @inheritDoc
@@ -4141,7 +4141,7 @@ class rr extends te {
4141
4141
  * @inheritDoc
4142
4142
  */
4143
4143
  t(this, "extraData");
4144
- this.contragents = ((s = e == null ? void 0 : e.contragents) == null ? void 0 : s.map((u) => Ce.createInstance(u))) ?? [], this.partnerGroups = ((i = e == null ? void 0 : e.partnerGroups) == null ? void 0 : i.map((u) => new ee(u))) ?? [], this.contacts = ((o = e == null ? void 0 : e.contacts) == null ? void 0 : o.map((u) => new z(u))) ?? [], this.deliveryAddresses = ((c = e == null ? void 0 : e.deliveryAddresses) == null ? void 0 : c.map((u) => new Re(u))) ?? [], this.channelPrimaryInterest = new Cr(e == null ? void 0 : e.channelPrimaryInterest), this.sourcePrimaryInterest = new Ar(e == null ? void 0 : e.sourcePrimaryInterest), this.preferredDeliveryType = new U(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) ?? {};
4144
+ this.contragents = ((s = e == null ? void 0 : e.contragents) == null ? void 0 : s.map((u) => Ce.createInstance(u))) ?? [], this.partnerGroups = ((n = e == null ? void 0 : e.partnerGroups) == null ? void 0 : n.map((u) => new ee(u))) ?? [], this.contacts = ((o = e == null ? void 0 : e.contacts) == null ? void 0 : o.map((u) => new z(u))) ?? [], this.deliveryAddresses = ((c = e == null ? void 0 : e.deliveryAddresses) == null ? void 0 : c.map((u) => new ae(u))) ?? [], this.channelPrimaryInterest = new Cr(e == null ? void 0 : e.channelPrimaryInterest), this.sourcePrimaryInterest = new Dr(e == null ? void 0 : e.sourcePrimaryInterest), this.preferredDeliveryType = new H(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) ?? {};
4145
4145
  }
4146
4146
  }
4147
4147
  class br {
@@ -4153,19 +4153,19 @@ class br {
4153
4153
  const r = {};
4154
4154
  return Object.keys(this).forEach((e) => {
4155
4155
  const s = this[e];
4156
- $(s) || // eslint-disable-next-line prettier/prettier,lodash/prefer-lodash-method
4156
+ A(s) || // eslint-disable-next-line prettier/prettier,lodash/prefer-lodash-method
4157
4157
  C(s) && s.trim().length === 0 || He(s.isNewRec) && s.isNewRec() || (r[e] = s);
4158
4158
  }), r;
4159
4159
  }
4160
4160
  }
4161
- class ns extends br {
4161
+ class os extends br {
4162
4162
  /**
4163
4163
  * Инициализирует экземпляр класса {@link ClientsListFilters}.
4164
4164
  *
4165
4165
  * @param data Данные для первоначальной инициализации.
4166
4166
  */
4167
4167
  constructor(e) {
4168
- var s, i, o, c, u, h, m, f;
4168
+ var s, n, o, c, u, h, m, f;
4169
4169
  super();
4170
4170
  /**
4171
4171
  * @inheritDoc
@@ -4259,7 +4259,7 @@ class ns extends br {
4259
4259
  * @inheritDoc
4260
4260
  */
4261
4261
  t(this, "lastOrder");
4262
- this.id = e == null ? void 0 : e.id, 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 = (s = e == null ? void 0 : e.cities) == null ? void 0 : s.map((A) => new Ae(A)), this.region = new pe(e == null ? void 0 : e.region), this.country = new Z(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 S(e == null ? void 0 : e.createdAt), this.lastLoginDate = new S(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((A) => new De(A))) ?? [], this.curators = ((o = e == null ? void 0 : e.curators) == null ? void 0 : o.map((A) => new We(A))) ?? [], this.salesDirections = (c = e == null ? void 0 : e.salesDirections) == null ? void 0 : c.map((A) => new O(A)), this.contragentInn = e == null ? void 0 : e.contragentInn, this.contragentType = new B(e == null ? void 0 : e.contragentType), this.preferredDeliveryType = e != null && e.preferredDeliveryType ? new U(e == null ? void 0 : e.preferredDeliveryType) : void 0, this.partnerGroups = (u = e == null ? void 0 : e.partnerGroups) == null ? void 0 : u.map((A) => new ee(A)), this.contact = new Ue(e == null ? void 0 : e.contact), this.lastOrder = {
4262
+ this.id = e == null ? void 0 : e.id, 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 = (s = e == null ? void 0 : e.cities) == null ? void 0 : s.map((D) => new De(D)), this.region = new pe(e == null ? void 0 : e.region), this.country = new Z(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 S(e == null ? void 0 : e.createdAt), this.lastLoginDate = new S(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((D) => new Pe(D))) ?? [], this.curators = ((o = e == null ? void 0 : e.curators) == null ? void 0 : o.map((D) => new We(D))) ?? [], this.salesDirections = (c = e == null ? void 0 : e.salesDirections) == null ? void 0 : c.map((D) => new O(D)), this.contragentInn = e == null ? void 0 : e.contragentInn, this.contragentType = new B(e == null ? void 0 : e.contragentType), this.preferredDeliveryType = e != null && e.preferredDeliveryType ? new H(e == null ? void 0 : e.preferredDeliveryType) : void 0, this.partnerGroups = (u = e == null ? void 0 : e.partnerGroups) == null ? void 0 : u.map((D) => new ee(D)), this.contact = new Ue(e == null ? void 0 : e.contact), this.lastOrder = {
4263
4263
  createdAt: new S((h = e == null ? void 0 : e.lastOrder) == null ? void 0 : h.createdAt),
4264
4264
  creator: (m = e == null ? void 0 : e.lastOrder) == null ? void 0 : m.creator,
4265
4265
  isApproved: (f = e == null ? void 0 : e.lastOrder) == null ? void 0 : f.isApproved
@@ -4301,7 +4301,7 @@ class ns extends br {
4301
4301
  this.contragentType = new B();
4302
4302
  break;
4303
4303
  case "preferredDeliveryType":
4304
- this.preferredDeliveryType = new U();
4304
+ this.preferredDeliveryType = new H();
4305
4305
  break;
4306
4306
  case "partnerGroups":
4307
4307
  this.partnerGroups = [];
@@ -4319,9 +4319,9 @@ class ns extends br {
4319
4319
  * @inheritDoc
4320
4320
  */
4321
4321
  asClearRaw() {
4322
- var s, i, o, c;
4322
+ var s, n, o, c;
4323
4323
  const e = super.asClearRaw();
4324
- return !((s = e == null ? void 0 : e.createdAt) != null && s.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, e;
4324
+ return !((s = e == null ? void 0 : e.createdAt) != null && s.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, e;
4325
4325
  }
4326
4326
  }
4327
4327
  class Sr extends re {
@@ -4340,17 +4340,17 @@ class Sr extends re {
4340
4340
  * @inheritDoc
4341
4341
  */
4342
4342
  t(this, "creator");
4343
- this.createdAt = C(e == null ? void 0 : e.createdAt) ? R(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.creator = new L(e == null ? void 0 : e.creator);
4343
+ this.createdAt = C(e == null ? void 0 : e.createdAt) ? a(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.creator = new L(e == null ? void 0 : e.creator);
4344
4344
  }
4345
4345
  }
4346
- class Pt extends b {
4346
+ class Rt extends b {
4347
4347
  /**
4348
4348
  * Инициализирует экземпляр класса {@link ClientAdditionalData}.
4349
4349
  *
4350
4350
  * @param data Данные для первоначальной инициализации.
4351
4351
  */
4352
4352
  constructor(e) {
4353
- var s, i, o, c;
4353
+ var s, n, o, c;
4354
4354
  super(e);
4355
4355
  /**
4356
4356
  * @inheritDoc
@@ -4380,10 +4380,10 @@ class Pt extends b {
4380
4380
  * @inheritDoc
4381
4381
  */
4382
4382
  t(this, "curators");
4383
- this.contacts = ((s = e.contacts) == null ? void 0 : s.map((u) => new z(u))) ?? void 0, this.lastOrder = e.lastOrder ? new Sr(e.lastOrder) : void 0, this.partnerGroups = ((i = e.partnerGroups) == null ? void 0 : i.map((u) => new ee(u))) ?? void 0, this.preferredDeliveryType = e.preferredDeliveryType ? new U(e.preferredDeliveryType) : void 0, this.salesDirection = e.salesDirection ? new O(e.salesDirection) : void 0, this.managers = ((o = e.managers) == null ? void 0 : o.map((u) => new Be(u))) ?? void 0, this.curators = ((c = e.curators) == null ? void 0 : c.map((u) => new We(u))) ?? void 0;
4383
+ this.contacts = ((s = e.contacts) == null ? void 0 : s.map((u) => new z(u))) ?? void 0, this.lastOrder = e.lastOrder ? new Sr(e.lastOrder) : void 0, this.partnerGroups = ((n = e.partnerGroups) == null ? void 0 : n.map((u) => new ee(u))) ?? void 0, this.preferredDeliveryType = e.preferredDeliveryType ? new H(e.preferredDeliveryType) : void 0, this.salesDirection = e.salesDirection ? new O(e.salesDirection) : void 0, this.managers = ((o = e.managers) == null ? void 0 : o.map((u) => new Be(u))) ?? void 0, this.curators = ((c = e.curators) == null ? void 0 : c.map((u) => new We(u))) ?? void 0;
4384
4384
  }
4385
4385
  }
4386
- class Dt {
4386
+ class Pt {
4387
4387
  /**
4388
4388
  * Инициализирует экземпляр класса {@link DataTablePaginationRequestParams}.
4389
4389
  *
@@ -4401,7 +4401,7 @@ class Dt {
4401
4401
  this.page = (r == null ? void 0 : r.page) ?? 1, this.pageSize = (r == null ? void 0 : r.pageSize) ?? 50;
4402
4402
  }
4403
4403
  }
4404
- class os extends Dt {
4404
+ class cs extends Pt {
4405
4405
  /**
4406
4406
  * Инициализирует экземпляр класса {@link DataTablePagination}.
4407
4407
  *
@@ -4432,7 +4432,7 @@ class os extends Dt {
4432
4432
  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;
4433
4433
  }
4434
4434
  }
4435
- class cs {
4435
+ class ls {
4436
4436
  /**
4437
4437
  * Инициализирует экземпляр класса {@link ISortRequestParams}.
4438
4438
  *
@@ -4450,7 +4450,7 @@ class cs {
4450
4450
  this.field = (r == null ? void 0 : r.field) ?? "", this.direction = (r == null ? void 0 : r.direction) ?? "asc";
4451
4451
  }
4452
4452
  }
4453
- class d extends $e {
4453
+ class x extends Ae {
4454
4454
  /**
4455
4455
  * Преобразует данные о клиенте в данные требуемые для запроса.
4456
4456
  *
@@ -4461,7 +4461,7 @@ class d extends $e {
4461
4461
  return {
4462
4462
  name: r.name,
4463
4463
  alternative_name: r.alternativeName,
4464
- partner_groups: r.partnerGroups.map((i) => i.id),
4464
+ partner_groups: r.partnerGroups.map((n) => n.id),
4465
4465
  phone: r.phone,
4466
4466
  email: r.email,
4467
4467
  city_id: r.city.id,
@@ -4480,9 +4480,9 @@ class d extends $e {
4480
4480
  static transformContragentClientDataToRequest(r) {
4481
4481
  var c, u, h, m;
4482
4482
  let e;
4483
- const s = r, i = r, o = r;
4483
+ const s = r, n = r, o = r;
4484
4484
  switch (r.opf.slug) {
4485
- case N.Ic:
4485
+ case U.Ic:
4486
4486
  e = {
4487
4487
  opf: s.opf.slug,
4488
4488
  name: s.name,
@@ -4499,25 +4499,25 @@ class d extends $e {
4499
4499
  actual_address: s.actualAddress
4500
4500
  };
4501
4501
  break;
4502
- case N.UlR:
4502
+ case U.UlR:
4503
4503
  e = {
4504
- opf: i.opf.slug,
4505
- name: i.name,
4506
- alternative_name: i.alternativeName,
4507
- partner_group_id: (u = i.partnerGroup) == null ? void 0 : u.id,
4508
- comment: i.comment,
4509
- inn: i.inn,
4510
- kpp: i.kpp,
4511
- okpo: i.okpo,
4512
- director_name: i.directorName,
4513
- director_position: i.directorPosition,
4514
- director_acts_on: i.directorActsOn,
4515
- legal_address: i.legalAddress,
4516
- postal_address: i.postalAddress,
4517
- actual_address: i.actualAddress
4504
+ opf: n.opf.slug,
4505
+ name: n.name,
4506
+ alternative_name: n.alternativeName,
4507
+ partner_group_id: (u = n.partnerGroup) == null ? void 0 : u.id,
4508
+ comment: n.comment,
4509
+ inn: n.inn,
4510
+ kpp: n.kpp,
4511
+ okpo: n.okpo,
4512
+ director_name: n.directorName,
4513
+ director_position: n.directorPosition,
4514
+ director_acts_on: n.directorActsOn,
4515
+ legal_address: n.legalAddress,
4516
+ postal_address: n.postalAddress,
4517
+ actual_address: n.actualAddress
4518
4518
  };
4519
4519
  break;
4520
- case N.UlNr:
4520
+ case U.UlNr:
4521
4521
  e = {
4522
4522
  opf: o.opf.slug,
4523
4523
  name: o.name,
@@ -4553,7 +4553,7 @@ class d extends $e {
4553
4553
  * @param deliveryAddress Данные об адресе доставки клиенту.
4554
4554
  */
4555
4555
  static transformClientDeliveryAddressToRequest(r) {
4556
- var s, i;
4556
+ var s, n;
4557
4557
  const e = {
4558
4558
  address: r.address,
4559
4559
  is_one_time: r.isOneTime ?? !1,
@@ -4562,7 +4562,7 @@ class d extends $e {
4562
4562
  };
4563
4563
  return r.coordinates && (e.coordinates = {
4564
4564
  lat: (s = r.coordinates) == null ? void 0 : s.lat,
4565
- long: (i = r.coordinates) == null ? void 0 : i.long
4565
+ long: (n = r.coordinates) == null ? void 0 : n.long
4566
4566
  }), r.operatingHours && (e.operating_hours = {
4567
4567
  from: r.operatingHours.from,
4568
4568
  to: r.operatingHours.to
@@ -4602,13 +4602,13 @@ class d extends $e {
4602
4602
  *
4603
4603
  * @see /doc/api/internal#/Клиенты/api_internal_client_get_list
4604
4604
  */
4605
- getClientsList(r, e, s, i, o = void 0) {
4605
+ getClientsList(r, e, s, n, o = void 0) {
4606
4606
  return this.getPaginated(
4607
4607
  "/internal/clients",
4608
4608
  r,
4609
4609
  e,
4610
4610
  s,
4611
- i,
4611
+ n,
4612
4612
  (c) => {
4613
4613
  const u = { ...c.data };
4614
4614
  return u.data = u.data.map((h) => new te(h)), u;
@@ -4648,10 +4648,10 @@ class d extends $e {
4648
4648
  * @see /doc/api/internal#/Клиенты/api_internal_client_get_additional_data_for_clients_list
4649
4649
  */
4650
4650
  getAdditionalClientsData(r, e) {
4651
- const s = r.map((i) => i.id);
4652
- return this.post("/internal/clients/additional-data", { clients: s, requested_data_types: e }, (i) => {
4651
+ const s = r.map((n) => n.id);
4652
+ return this.post("/internal/clients/additional-data", { clients: s, requested_data_types: e }, (n) => {
4653
4653
  let o = [];
4654
- return (i == null ? void 0 : i.data.length) > 0 && (o = i.data.map((c) => new Pt(c))), o;
4654
+ return (n == null ? void 0 : n.data.length) > 0 && (o = n.data.map((c) => new Rt(c))), o;
4655
4655
  });
4656
4656
  }
4657
4657
  /**
@@ -4663,7 +4663,7 @@ class d extends $e {
4663
4663
  getAllClientContacts(r) {
4664
4664
  return this.get(`/internal/clients/${r}/contacts/all`, {}, (e) => {
4665
4665
  let s = [];
4666
- return (e == null ? void 0 : e.data.length) > 0 && (s = e.data.map((i) => new Rt(i))), s;
4666
+ return (e == null ? void 0 : e.data.length) > 0 && (s = e.data.map((n) => new at(n))), s;
4667
4667
  });
4668
4668
  }
4669
4669
  /**
@@ -4674,7 +4674,7 @@ class d extends $e {
4674
4674
  * @see /doc/api/internal#/Клиенты/api_internal_client_create
4675
4675
  */
4676
4676
  createClientCommonData(r, e = {}) {
4677
- return this.post("/internal/clients", d.transformClientDataToRequest(r), (s) => new rr(s.data), e);
4677
+ return this.post("/internal/clients", x.transformClientDataToRequest(r), (s) => new rr(s.data), e);
4678
4678
  }
4679
4679
  /**
4680
4680
  * Обновляет данные указанного клиента.
@@ -4684,7 +4684,7 @@ class d extends $e {
4684
4684
  * @see /doc/api/internal#/Клиенты/api_internal_client_change
4685
4685
  */
4686
4686
  updateClientCommonData(r, e = {}) {
4687
- return this.patch(`/internal/clients/${r.id}`, d.transformClientDataToRequest(r), void 0, e);
4687
+ return this.patch(`/internal/clients/${r.id}`, x.transformClientDataToRequest(r), void 0, e);
4688
4688
  }
4689
4689
  /**
4690
4690
  * Обновляет данные "Не беспокоить" указанного клиента.
@@ -4708,7 +4708,7 @@ class d extends $e {
4708
4708
  * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
4709
4709
  * @see /doc/api/internal#/Клиенты/api_internal_client_change
4710
4710
  */
4711
- changeClientPassword(r, e, s, i = {}) {
4711
+ changeClientPassword(r, e, s, n = {}) {
4712
4712
  return this.patch(
4713
4713
  `/internal/clients/${r}`,
4714
4714
  {
@@ -4716,7 +4716,7 @@ class d extends $e {
4716
4716
  password_confirmation: s
4717
4717
  },
4718
4718
  void 0,
4719
- i
4719
+ n
4720
4720
  );
4721
4721
  }
4722
4722
  /**
@@ -4746,7 +4746,7 @@ class d extends $e {
4746
4746
  * @see /doc/api/internal#/Клиенты/api_internal_client_manager_attach
4747
4747
  */
4748
4748
  async attachClientToManagers(r, e) {
4749
- const s = e.map((i) => this.patch(`/internal/clients/${r}/managers/${i.id}/attach`, { is_primary: i.isDefault }));
4749
+ const s = e.map((n) => this.patch(`/internal/clients/${r}/managers/${n.id}/attach`, { is_primary: n.isDefault }));
4750
4750
  await Promise.all(s);
4751
4751
  }
4752
4752
  /**
@@ -4758,7 +4758,7 @@ class d extends $e {
4758
4758
  * @see /doc/api/internal#/Клиенты/api_internal_client_manager_detach
4759
4759
  */
4760
4760
  async detachClientFromManagers(r, e) {
4761
- const s = e.map((i) => this.patch(`/internal/clients/${r}/managers/${i.id}/detach`));
4761
+ const s = e.map((n) => this.patch(`/internal/clients/${r}/managers/${n.id}/detach`));
4762
4762
  await Promise.all(s);
4763
4763
  }
4764
4764
  /**
@@ -4813,8 +4813,8 @@ class d extends $e {
4813
4813
  createContragentClientData(r, e, s = {}) {
4814
4814
  return this.post(
4815
4815
  `/internal/clients/${r}/contragents`,
4816
- d.transformContragentClientDataToRequest(e),
4817
- (i) => Ce.createInstance(i.data),
4816
+ x.transformContragentClientDataToRequest(e),
4817
+ (n) => Ce.createInstance(n.data),
4818
4818
  s
4819
4819
  );
4820
4820
  }
@@ -4829,8 +4829,8 @@ class d extends $e {
4829
4829
  updateContragentClientData(r, e, s = {}) {
4830
4830
  return this.patch(
4831
4831
  `/internal/clients/${r}/contragents/${e.id}`,
4832
- d.transformContragentClientDataToRequest(e),
4833
- (i) => Ce.createInstance(i.data),
4832
+ x.transformContragentClientDataToRequest(e),
4833
+ (n) => Ce.createInstance(n.data),
4834
4834
  s
4835
4835
  );
4836
4836
  }
@@ -4855,8 +4855,8 @@ class d extends $e {
4855
4855
  createClientDeliveryAddress(r, e, s = {}) {
4856
4856
  return this.post(
4857
4857
  `/internal/clients/${r}/delivery-addresses`,
4858
- d.transformClientDeliveryAddressToRequest(e),
4859
- (i) => new Re(i.data),
4858
+ x.transformClientDeliveryAddressToRequest(e),
4859
+ (n) => new ae(n.data),
4860
4860
  s
4861
4861
  );
4862
4862
  }
@@ -4871,8 +4871,8 @@ class d extends $e {
4871
4871
  updateClientDeliveryAddress(r, e, s = {}) {
4872
4872
  return this.patch(
4873
4873
  `/internal/clients/${r}/delivery-addresses/${e.id}`,
4874
- d.transformClientDeliveryAddressToRequest(e),
4875
- (i) => new Re(i.data),
4874
+ x.transformClientDeliveryAddressToRequest(e),
4875
+ (n) => new ae(n.data),
4876
4876
  s
4877
4877
  );
4878
4878
  }
@@ -4895,12 +4895,12 @@ class d extends $e {
4895
4895
  * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
4896
4896
  * @see /doc/api/internal#/Банковские реквизиты/api_internal_client_contragent_bank_accounts_create
4897
4897
  */
4898
- createContragentBankAccount(r, e, s, i = {}) {
4898
+ createContragentBankAccount(r, e, s, n = {}) {
4899
4899
  return this.post(
4900
4900
  `/internal/clients/${r}/contragents/${e}/bank-accounts`,
4901
- d.transformClientContragentBankAccountToRequest(s),
4901
+ x.transformClientContragentBankAccountToRequest(s),
4902
4902
  (o) => new Ne(o.data),
4903
- i
4903
+ n
4904
4904
  );
4905
4905
  }
4906
4906
  /**
@@ -4912,12 +4912,12 @@ class d extends $e {
4912
4912
  * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
4913
4913
  * @see /doc/api/internal#/Адреса доставки/api_internal_client_delivery_address_update
4914
4914
  */
4915
- updateContragentBankAccount(r, e, s, i = {}) {
4915
+ updateContragentBankAccount(r, e, s, n = {}) {
4916
4916
  return this.patch(
4917
4917
  `/internal/clients/${r}/contragents/${e}/bank-accounts/${s.id}`,
4918
- d.transformClientContragentBankAccountToRequest(s),
4918
+ x.transformClientContragentBankAccountToRequest(s),
4919
4919
  (o) => new Ne(o.data),
4920
- i
4920
+ n
4921
4921
  );
4922
4922
  }
4923
4923
  /**
@@ -4972,7 +4972,7 @@ class d extends $e {
4972
4972
  comment: e.comment,
4973
4973
  not_disturb: e.notDisturb
4974
4974
  },
4975
- (i) => new z(i.data),
4975
+ (n) => new z(n.data),
4976
4976
  s
4977
4977
  );
4978
4978
  }
@@ -5005,7 +5005,7 @@ class d extends $e {
5005
5005
  * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
5006
5006
  * @see /doc/api/internal#/Контакты/api_internal_client_contact_create
5007
5007
  */
5008
- createContragentContact(r, e, s, i = {}) {
5008
+ createContragentContact(r, e, s, n = {}) {
5009
5009
  return this.createContact(
5010
5010
  r,
5011
5011
  s,
@@ -5018,7 +5018,7 @@ class d extends $e {
5018
5018
  }
5019
5019
  ]
5020
5020
  },
5021
- i
5021
+ n
5022
5022
  );
5023
5023
  }
5024
5024
  /**
@@ -5052,7 +5052,7 @@ class d extends $e {
5052
5052
  * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
5053
5053
  * @see /doc/api/internal#/Контакты/api_internal_client_contact_create
5054
5054
  */
5055
- createDeliveryAddressContact(r, e, s, i = {}) {
5055
+ createDeliveryAddressContact(r, e, s, n = {}) {
5056
5056
  return this.createContact(
5057
5057
  r,
5058
5058
  s,
@@ -5065,7 +5065,7 @@ class d extends $e {
5065
5065
  }
5066
5066
  ]
5067
5067
  },
5068
- i
5068
+ n
5069
5069
  );
5070
5070
  }
5071
5071
  /**
@@ -5101,7 +5101,7 @@ class d extends $e {
5101
5101
  * @param extraData Дополнительные данные
5102
5102
  * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
5103
5103
  */
5104
- createContact(r, e, s, i = {}) {
5104
+ createContact(r, e, s, n = {}) {
5105
5105
  var c, u;
5106
5106
  const o = {
5107
5107
  name: e.name,
@@ -5109,7 +5109,7 @@ class d extends $e {
5109
5109
  comment: e.comment,
5110
5110
  ...s
5111
5111
  };
5112
- 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, (h) => new z(h.data), i);
5112
+ 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, (h) => new z(h.data), n);
5113
5113
  }
5114
5114
  /**
5115
5115
  * Устанавливает признак основного контактного лица.
@@ -5148,7 +5148,7 @@ const Y = class Y extends p {
5148
5148
  * Время кэширования данных ответов на запросы (секунд).
5149
5149
  */
5150
5150
  t(this, "responseDataCacheTimeout");
5151
- this.responseDataCacheTimeout = I().config.http.responseDataCacheTimeout;
5151
+ this.responseDataCacheTimeout = k().config.http.responseDataCacheTimeout;
5152
5152
  }
5153
5153
  /**
5154
5154
  * Возвращает кэшированные данные.
@@ -5184,11 +5184,11 @@ const Y = class Y extends p {
5184
5184
  * @param params Дополнительные параметры запроса.
5185
5185
  */
5186
5186
  // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
5187
- getTypedDataArrayRequester(e, s, i = !1, o = {}) {
5188
- const c = s + (X(o) ? "" : ` >>> ${JSON.stringify(o)}`), u = i ? Y.getCachedResponse(c) : void 0;
5187
+ getTypedDataArrayRequester(e, s, n = !1, o = {}) {
5188
+ const c = s + (X(o) ? "" : ` >>> ${JSON.stringify(o)}`), u = n ? Y.getCachedResponse(c) : void 0;
5189
5189
  return u ? Promise.resolve(u) : this.get(s, o).then((h) => {
5190
5190
  const m = h.map((f) => je.instanceInitializer(e, f));
5191
- return i && m && this.cacheResponse(s, m), m;
5191
+ return n && m && this.cacheResponse(s, m), m;
5192
5192
  });
5193
5193
  }
5194
5194
  };
@@ -5197,7 +5197,7 @@ const Y = class Y extends p {
5197
5197
  */
5198
5198
  t(Y, "responseDataCache", /* @__PURE__ */ new Map());
5199
5199
  let he = Y;
5200
- class ls extends p {
5200
+ class us extends p {
5201
5201
  /**
5202
5202
  * Выполняет проверку занят ли указанный номер телефона.
5203
5203
  *
@@ -5205,13 +5205,13 @@ class ls extends p {
5205
5205
  */
5206
5206
  checkPhoneIsBusy(r) {
5207
5207
  return new Promise((e, s) => {
5208
- this.request({ method: "GET", url: "/public/user/verification/phone/check", params: { phone: r } }).then((i) => {
5209
- e(!!i.isBusy);
5208
+ this.request({ method: "GET", url: "/public/user/verification/phone/check", params: { phone: r } }).then((n) => {
5209
+ e(!!n.isBusy);
5210
5210
  }).catch(s);
5211
5211
  });
5212
5212
  }
5213
5213
  }
5214
- class us {
5214
+ class ps {
5215
5215
  /**
5216
5216
  * Инициализирует экземпляр класса {@link VersionConfig}.
5217
5217
  *
@@ -5230,11 +5230,11 @@ class us {
5230
5230
  * Текущая версия приложения.
5231
5231
  */
5232
5232
  t(this, "version");
5233
- this.date = C(r == null ? void 0 : r.date) ? R(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";
5233
+ this.date = C(r == null ? void 0 : r.date) ? a(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";
5234
5234
  }
5235
5235
  }
5236
- var At = /* @__PURE__ */ ((n) => (n.Kozyrek = "kozyrek", n.Mosquitto = "mosquitto", n.Strip = "strip", n.MetalForDoors = "metal_for_doors", n.Sandwich = "sandwich", n))(At || {});
5237
- class ps extends p {
5236
+ var Dt = /* @__PURE__ */ ((i) => (i.Kozyrek = "kozyrek", i.Mosquitto = "mosquitto", i.Strip = "strip", i.MetalForDoors = "metal_for_doors", i.Sandwich = "sandwich", i))(Dt || {});
5237
+ class hs extends p {
5238
5238
  /**
5239
5239
  * Возвращает настройки указанного конфигуратора для указанной категории.
5240
5240
  *
@@ -5259,15 +5259,15 @@ class ps extends p {
5259
5259
  *
5260
5260
  * @see /doc/api/internal#/Каталог/api_internal_catalog_categories_configurator_products_get
5261
5261
  */
5262
- searchProduct(r, e, s, i = {}) {
5262
+ searchProduct(r, e, s, n = {}) {
5263
5263
  var c;
5264
5264
  const o = this.get(
5265
5265
  `internal/catalog/categories/${r.id}/configurators/${(c = r.properties) == null ? void 0 : c.configurator}/product`,
5266
5266
  { params: s, client_id: e },
5267
- (u) => new k(u.data)
5267
+ (u) => new I(u.data)
5268
5268
  );
5269
5269
  return o.catch((u) => {
5270
- this.errorResponseHandler(u, i);
5270
+ this.errorResponseHandler(u, n);
5271
5271
  }), o;
5272
5272
  }
5273
5273
  /**
@@ -5283,7 +5283,7 @@ class ps extends p {
5283
5283
  * @see /doc/api/internal#/Каталог/api_internal_catalog_categories_configurator_template_create
5284
5284
  */
5285
5285
  // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
5286
- createTemplate(r, e, s, i = {}) {
5286
+ createTemplate(r, e, s, n = {}) {
5287
5287
  var o;
5288
5288
  return this.post(
5289
5289
  `internal/catalog/categories/${r.id}/configurators/${(o = r.properties) == null ? void 0 : o.configurator}/template?client_id=${e}`,
@@ -5291,7 +5291,7 @@ class ps extends p {
5291
5291
  // eslint-disable-next-line lodash/prefer-noop, @typescript-eslint/no-empty-function
5292
5292
  () => {
5293
5293
  },
5294
- i
5294
+ n
5295
5295
  );
5296
5296
  }
5297
5297
  /**
@@ -5305,8 +5305,8 @@ class ps extends p {
5305
5305
  */
5306
5306
  // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
5307
5307
  removeTemplate(r, e, s) {
5308
- var i;
5309
- return this.delete(`internal/catalog/categories/${r.id}/configurators/${(i = r.properties) == null ? void 0 : i.configurator}/template/${s}?client_id=${e}`);
5308
+ var n;
5309
+ return this.delete(`internal/catalog/categories/${r.id}/configurators/${(n = r.properties) == null ? void 0 : n.configurator}/template/${s}?client_id=${e}`);
5310
5310
  }
5311
5311
  /**
5312
5312
  * Выполняет расчет, через указанный конфигуратор с переданными параметрами.
@@ -5318,14 +5318,14 @@ class ps extends p {
5318
5318
  * @see /doc/api/internal#/Каталог/api_public_catalog_categories_category_configurator_calculate
5319
5319
  */
5320
5320
  calculate(r, e, s) {
5321
- var i;
5322
- return this.get(`internal/catalog/categories/${r.id}/configurators/${(i = r.properties) == null ? void 0 : i.configurator}/calculate`, {
5321
+ var n;
5322
+ return this.get(`internal/catalog/categories/${r.id}/configurators/${(n = r.properties) == null ? void 0 : n.configurator}/calculate`, {
5323
5323
  client_id: e,
5324
5324
  ...s
5325
5325
  });
5326
5326
  }
5327
5327
  }
5328
- class hs {
5328
+ class gs {
5329
5329
  /**
5330
5330
  * Возвращает диапазон дат по умолчанию.
5331
5331
  */
@@ -5334,7 +5334,7 @@ class hs {
5334
5334
  return {
5335
5335
  // 'Следующий рабочий день' - это значение по-умолчанию
5336
5336
  nextWorkingDay: { label: "Следующий рабочий день", from: Vr(r), to: Er(r) },
5337
- today: { label: "Сегодня", from: _e(), to: Jr() },
5337
+ today: { label: "Сегодня", from: Oe(), to: Jr() },
5338
5338
  yesterday: { label: "Вчера", from: Wr(), to: zr() },
5339
5339
  tomorrow: { label: "Завтра", from: Br(), to: Mr() }
5340
5340
  };
@@ -5364,20 +5364,20 @@ class kr {
5364
5364
  * @param product Данные о товаре для которого необходимо вернуть кратность длины.
5365
5365
  */
5366
5366
  static getProductLengthMultiplicity(r) {
5367
- var e, s, i;
5368
- return (e = r.properties) != null && e.lengthStep ? r.properties.lengthStep : !((s = r.properties) != null && s.ignoreMinCountCheck) && ((i = r.properties) != null && i.minCount) ? r.properties.minCount : 0.01;
5367
+ var e, s, n;
5368
+ return (e = r.properties) != null && e.lengthStep ? r.properties.lengthStep : !((s = r.properties) != null && s.ignoreMinCountCheck) && ((n = r.properties) != null && n.minCount) ? r.properties.minCount : 0.01;
5369
5369
  }
5370
5370
  }
5371
- function gs(n, r) {
5371
+ function ms(i, r) {
5372
5372
  const e = [2, 0, 1, 1, 1, 2];
5373
- return r[n % 100 > 4 && n % 100 < 20 ? 2 : e[Math.min(n % 10, 5)]];
5373
+ return r[i % 100 > 4 && i % 100 < 20 ? 2 : e[Math.min(i % 10, 5)]];
5374
5374
  }
5375
- class ms {
5375
+ class fs {
5376
5376
  /**
5377
5377
  * Генерирует и возвращает данные-заглушку неопределённого менеджера.
5378
5378
  */
5379
5379
  static generateUndefinedManagerInstance() {
5380
- return new De({ id: 0, name: "- Не назначен -", isActive: !0, guid: "-undefined-" });
5380
+ return new Pe({ id: 0, name: "- Не назначен -", isActive: !0, guid: "-undefined-" });
5381
5381
  }
5382
5382
  /**
5383
5383
  * Выполняет проверку, является ли указанная запись записью-заглушкой с данными о неопределённом менеджере.
@@ -5388,7 +5388,7 @@ class ms {
5388
5388
  return r.id === 0 && r.guid === "-undefined-";
5389
5389
  }
5390
5390
  }
5391
- class $t extends he {
5391
+ class At extends he {
5392
5392
  /**
5393
5393
  * Возвращает {@link Promise} для получения справочника списка менеджеров.
5394
5394
  */
@@ -5396,8 +5396,76 @@ class $t extends he {
5396
5396
  const r = "/internal/managers", e = he.getCachedResponse(r);
5397
5397
  if (e)
5398
5398
  return e;
5399
- const i = (await this.get(r)).data.map((o) => je.instanceInitializer(De, o));
5400
- return this.cacheResponse(r, i), i;
5399
+ const n = (await this.get(r)).data.map((o) => je.instanceInitializer(Pe, o));
5400
+ return this.cacheResponse(r, n), n;
5401
+ }
5402
+ }
5403
+ var $t = /* @__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.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))($t || {});
5404
+ class ys {
5405
+ /**
5406
+ * Инициализирует экземпляр класса {@link OrderEditorData}.
5407
+ *
5408
+ * @param order Данные заказа для первоначальной инициализации.
5409
+ */
5410
+ constructor(r) {
5411
+ /**
5412
+ * @inheritDoc
5413
+ */
5414
+ t(this, "paymentType");
5415
+ /**
5416
+ * @inheritDoc
5417
+ */
5418
+ t(this, "deliveryType");
5419
+ /**
5420
+ * @inheritDoc
5421
+ */
5422
+ t(this, "contragentId");
5423
+ /**
5424
+ * @inheritDoc
5425
+ */
5426
+ t(this, "deliveryDate");
5427
+ /**
5428
+ * @inheritDoc
5429
+ */
5430
+ t(this, "addressId");
5431
+ /**
5432
+ * @inheritDoc
5433
+ */
5434
+ t(this, "warehouseId");
5435
+ /**
5436
+ * @inheritDoc
5437
+ */
5438
+ t(this, "image");
5439
+ /**
5440
+ * @inheritDoc
5441
+ */
5442
+ t(this, "comment");
5443
+ /**
5444
+ * @inheritDoc
5445
+ */
5446
+ t(this, "barcode");
5447
+ /**
5448
+ * @inheritDoc
5449
+ */
5450
+ t(this, "operatorsComment");
5451
+ /**
5452
+ * @inheritDoc
5453
+ */
5454
+ t(this, "operatorsForWarehouseComment");
5455
+ /**
5456
+ * @inheritDoc
5457
+ */
5458
+ t(this, "additionalEmails");
5459
+ /**
5460
+ * @inheritDoc
5461
+ */
5462
+ t(this, "isAllowProcessingWithoutPayment");
5463
+ /**
5464
+ * @inheritDoc
5465
+ */
5466
+ t(this, "isAdditionalSale");
5467
+ var e, s, n;
5468
+ this.paymentType = (r == null ? void 0 : r.payment.type) ?? -1, this.deliveryType = (r == null ? void 0 : r.delivery.type) ?? -1, this.contragentId = ((e = r == null ? void 0 : r.contragent) == null ? void 0 : e.id) ?? -1, this.deliveryDate = r != null && r.delivery.date ? new Date(r.delivery.date) : /* @__PURE__ */ new Date(), this.addressId = (s = r == null ? void 0 : r.delivery.address) == null ? void 0 : s.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;
5401
5469
  }
5402
5470
  }
5403
5471
  class Ir extends Sr {
@@ -5407,7 +5475,7 @@ class Ir extends Sr {
5407
5475
  * @param data Данные для первоначальной инициализации.
5408
5476
  */
5409
5477
  constructor(e) {
5410
- var s, i, o, c, u, h, m, f;
5478
+ var s, n, o, c, u, h, m, f;
5411
5479
  super(e);
5412
5480
  /**
5413
5481
  * @inheritDoc
@@ -5459,18 +5527,18 @@ class Ir extends Sr {
5459
5527
  t(this, "isLargeOrder");
5460
5528
  this.client = new te(e == null ? void 0 : e.client), this.payment = {
5461
5529
  type: ((s = e == null ? void 0 : e.payment) == null ? void 0 : s.type) ?? -1,
5462
- status: ((i = e == null ? void 0 : e.payment) == null ? void 0 : i.status) ?? -1,
5530
+ status: ((n = e == null ? void 0 : e.payment) == null ? void 0 : n.status) ?? -1,
5463
5531
  onlinePaymentLink: (o = e == null ? void 0 : e.payment) == null ? void 0 : o.onlinePaymentLink
5464
5532
  }, this.delivery = {
5465
5533
  type: ((c = e == null ? void 0 : e.delivery) == null ? void 0 : c.type) ?? -1,
5466
- date: C((u = e == null ? void 0 : e.delivery) == null ? void 0 : u.date) ? R(e.delivery.date) : ((h = e == null ? void 0 : e.delivery) == null ? void 0 : h.date) ?? /* @__PURE__ */ new Date(),
5467
- address: (m = e == null ? void 0 : e.delivery) != null && m.address ? new Re(e.delivery.address) : void 0,
5534
+ date: C((u = e == null ? void 0 : e.delivery) == null ? void 0 : u.date) ? a(e.delivery.date) : ((h = e == null ? void 0 : e.delivery) == null ? void 0 : h.date) ?? /* @__PURE__ */ new Date(),
5535
+ address: (m = e == null ? void 0 : e.delivery) != null && m.address ? new ae(e.delivery.address) : void 0,
5468
5536
  warehouse: (f = e == null ? void 0 : e.delivery) != null && f.warehouse ? new me(e.delivery.warehouse) : void 0
5469
- }, this.attachedUser = e != null && e.attachedUser ? new L(e == null ? void 0 : e.attachedUser) : void 0, this.status = new Te(e == null ? void 0 : e.status), this.statusDetail = e != null && e.statusDetail ? new w(e.statusDetail) : void 0, this.salesDirection = new O(e == null ? void 0 : e.salesDirection), this.attachedAt = C(e == null ? void 0 : e.attachedAt) ? R(e.attachedAt) : e == null ? void 0 : e.attachedAt, this.isOnOrder = (e == null ? void 0 : e.isOnOrder) ?? !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;
5537
+ }, this.attachedUser = e != null && e.attachedUser ? new L(e == null ? void 0 : e.attachedUser) : void 0, this.status = new $e(e == null ? void 0 : e.status), this.statusDetail = e != null && e.statusDetail ? new w(e.statusDetail) : void 0, this.salesDirection = new O(e == null ? void 0 : e.salesDirection), this.attachedAt = C(e == null ? void 0 : e.attachedAt) ? a(e.attachedAt) : e == null ? void 0 : e.attachedAt, this.isOnOrder = (e == null ? void 0 : e.isOnOrder) ?? !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;
5470
5538
  }
5471
5539
  }
5472
- var Tt = /* @__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))(Tt || {});
5473
- class a extends he {
5540
+ var Tt = /* @__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))(Tt || {});
5541
+ class T extends he {
5474
5542
  /**
5475
5543
  * Возвращает {@link Promise} для получения данных указанного справочника.
5476
5544
  *
@@ -5504,7 +5572,7 @@ class a extends he {
5504
5572
  * Возвращает {@link Promise} для получения справочника списка валют.
5505
5573
  */
5506
5574
  getCurrency() {
5507
- return this.getTypedDataArrayRequester(x, "/public/references/currency", !0);
5575
+ return this.getTypedDataArrayRequester(_, "/public/references/currency", !0);
5508
5576
  }
5509
5577
  /**
5510
5578
  * Возвращает {@link Promise} для получения справочника данных
@@ -5523,7 +5591,7 @@ class a extends he {
5523
5591
  * Возвращает {@link Promise} для получения справочника операторов.
5524
5592
  */
5525
5593
  getOperators() {
5526
- return this.getTypedDataArrayRequester(Rr, "/internal/references/operator", !0);
5594
+ return this.getTypedDataArrayRequester(ar, "/internal/references/operator", !0);
5527
5595
  }
5528
5596
  /**
5529
5597
  * Возвращает {@link Promise} для получения справочника данных статусов оплаты заказов.
@@ -5535,19 +5603,19 @@ class a extends he {
5535
5603
  * Возвращает {@link Promise} для получения справочника данных статусов заказов.
5536
5604
  */
5537
5605
  getOrderStatuses() {
5538
- return this.getTypedDataArrayRequester(Te, "/internal/references/order-status", !0);
5606
+ return this.getTypedDataArrayRequester($e, "/internal/references/order-status", !0);
5539
5607
  }
5540
5608
  /**
5541
5609
  * Возвращает {@link Promise} для получения справочника данных типов оплаты заказов.
5542
5610
  */
5543
5611
  getPaymentTypes() {
5544
- return this.getTypedDataArrayRequester(Pr, "/public/references/payment-type", !0);
5612
+ return this.getTypedDataArrayRequester(Rr, "/public/references/payment-type", !0);
5545
5613
  }
5546
5614
  /**
5547
5615
  * Возвращает {@link Promise} для получения справочника типов ресурсов.
5548
5616
  */
5549
5617
  getResourceTypes() {
5550
- return this.getTypedDataArrayRequester(Dr, "/internal/references/resource-type", !0);
5618
+ return this.getTypedDataArrayRequester(Pr, "/internal/references/resource-type", !0);
5551
5619
  }
5552
5620
  /**
5553
5621
  * Возвращает {@link Promise} для получения справочника данных направлений продаж.
@@ -5559,7 +5627,7 @@ class a extends he {
5559
5627
  * Возвращает {@link Promise} для получения справочника данных об источнике первичного интереса.
5560
5628
  */
5561
5629
  getSourcePrimaryInterest() {
5562
- return this.getTypedDataArrayRequester(Ar, "/internal/references/source-primary-interest", !0);
5630
+ return this.getTypedDataArrayRequester(Dr, "/internal/references/source-primary-interest", !0);
5563
5631
  }
5564
5632
  /**
5565
5633
  * Выполняет поиск данных о городах по терму в названии.
@@ -5567,7 +5635,7 @@ class a extends he {
5567
5635
  * @param term Терм поиска.
5568
5636
  */
5569
5637
  searchCity(r) {
5570
- return this.getTypedDataArrayRequester(Ae, `/internal/references/city-with-region-and-country/search?term=${r}`);
5638
+ return this.getTypedDataArrayRequester(De, `/internal/references/city-with-region-and-country/search?term=${r}`);
5571
5639
  }
5572
5640
  /**
5573
5641
  * Выполняет поиск данных о регионах по терму в названии.
@@ -5589,7 +5657,7 @@ class a extends he {
5589
5657
  * Возвращает {@link Promise} для получения справочника типов доставки.
5590
5658
  */
5591
5659
  getDeliveryTypes() {
5592
- return this.getTypedDataArrayRequester(U, "/internal/references/delivery-type", !0);
5660
+ return this.getTypedDataArrayRequester(H, "/internal/references/delivery-type", !0);
5593
5661
  }
5594
5662
  /**
5595
5663
  * Возвращает {@link Promise} для получения справочника складов.
@@ -5607,7 +5675,7 @@ class a extends he {
5607
5675
  * Возвращает {@link Promise} для получения справочника коэффициентов цен.
5608
5676
  */
5609
5677
  getPriceCoefficients() {
5610
- return this.getTypedDataArrayRequester(Pe, "/internal/references/price-coefficient", !0);
5678
+ return this.getTypedDataArrayRequester(Re, "/internal/references/price-coefficient", !0);
5611
5679
  }
5612
5680
  /**
5613
5681
  * Возвращает {@link Promise} для получения справочника типов файлов продуктов/категорий.
@@ -5616,13 +5684,13 @@ class a extends he {
5616
5684
  return this.getTypedDataArrayRequester(wt, "/public/references/product-file-type", !0);
5617
5685
  }
5618
5686
  }
5619
- const T = W("common.references_private", () => {
5620
- const n = y({}), r = y(void 0), e = y(void 0), s = y(void 0), i = y(void 0), o = y(void 0), c = y(void 0), u = y(void 0), h = y(void 0), m = y(void 0), f = y(void 0), A = y(void 0), se = y(void 0), ie = y(void 0), J = y(void 0), E = y(void 0), ae = y(void 0), be = y(void 0), l = y(void 0);
5687
+ const $ = W("common.references_private", () => {
5688
+ const i = y({}), r = y(void 0), e = y(void 0), s = y(void 0), n = y(void 0), o = y(void 0), c = y(void 0), u = y(void 0), h = y(void 0), m = y(void 0), f = y(void 0), D = y(void 0), se = y(void 0), ie = y(void 0), J = y(void 0), E = y(void 0), Te = y(void 0), be = y(void 0), l = y(void 0);
5621
5689
  return {
5622
5690
  /**
5623
5691
  * Список загружаемых/загруженных на данный момент значений.
5624
5692
  */
5625
- dataLoaderList: n,
5693
+ dataLoaderList: i,
5626
5694
  /**
5627
5695
  * Справочник каналов первичного интереса.
5628
5696
  */
@@ -5638,7 +5706,7 @@ const T = W("common.references_private", () => {
5638
5706
  /**
5639
5707
  * Справочник типов доставки.
5640
5708
  */
5641
- deliveryTypeReference: i,
5709
+ deliveryTypeReference: n,
5642
5710
  /**
5643
5711
  * Список менеджеров.
5644
5712
  */
@@ -5666,7 +5734,7 @@ const T = W("common.references_private", () => {
5666
5734
  /**
5667
5735
  * Справочник групп партнеров.
5668
5736
  */
5669
- partnerGroupReference: A,
5737
+ partnerGroupReference: D,
5670
5738
  /**
5671
5739
  * Справочник типов файлов продукктов/категорий.
5672
5740
  */
@@ -5686,7 +5754,7 @@ const T = W("common.references_private", () => {
5686
5754
  /**
5687
5755
  * Справочник складов.
5688
5756
  */
5689
- warehousesReference: ae,
5757
+ warehousesReference: Te,
5690
5758
  /**
5691
5759
  * Справочник типов свойств.
5692
5760
  */
@@ -5696,95 +5764,95 @@ const T = W("common.references_private", () => {
5696
5764
  */
5697
5765
  priceCoefficientsReference: l
5698
5766
  };
5699
- }), fs = W("common.references", () => {
5700
- const n = D(() => {
5701
- const l = T();
5702
- return !l.channelPrimaryInterestReference && !l.dataLoaderList.channelPrimaryInterestReference && (l.dataLoaderList.channelPrimaryInterestReference = !0, p.getInstance(a).getChannelPrimaryInterest().then((g) => {
5767
+ }), ws = W("common.references", () => {
5768
+ const i = P(() => {
5769
+ const l = $();
5770
+ return !l.channelPrimaryInterestReference && !l.dataLoaderList.channelPrimaryInterestReference && (l.dataLoaderList.channelPrimaryInterestReference = !0, p.getInstance(T).getChannelPrimaryInterest().then((g) => {
5703
5771
  l.channelPrimaryInterestReference = g;
5704
5772
  }).catch(v)), l.channelPrimaryInterestReference;
5705
- }), r = D(() => {
5706
- const l = T();
5707
- return !l.contactPositionsReference && !l.dataLoaderList.contactPositionsReference && (l.dataLoaderList.contactPositionsReference = !0, p.getInstance(a).getContactPositions().then((g) => {
5773
+ }), r = P(() => {
5774
+ const l = $();
5775
+ return !l.contactPositionsReference && !l.dataLoaderList.contactPositionsReference && (l.dataLoaderList.contactPositionsReference = !0, p.getInstance(T).getContactPositions().then((g) => {
5708
5776
  l.contactPositionsReference = g;
5709
5777
  }).catch(v)), l.contactPositionsReference;
5710
- }), e = D(() => {
5711
- const l = T();
5712
- return !l.currencyReference && !l.dataLoaderList.currencyReference && (l.dataLoaderList.currencyReference = !0, p.getInstance(a).getCurrency().then((g) => {
5778
+ }), e = P(() => {
5779
+ const l = $();
5780
+ return !l.currencyReference && !l.dataLoaderList.currencyReference && (l.dataLoaderList.currencyReference = !0, p.getInstance(T).getCurrency().then((g) => {
5713
5781
  l.currencyReference = g;
5714
5782
  }).catch(v)), l.currencyReference;
5715
- }), s = D(() => {
5716
- const l = T();
5717
- return !l.opfReference && !l.dataLoaderList.opfReference && (l.dataLoaderList.opfReference = !0, p.getInstance(a).getOpf().then((g) => {
5783
+ }), s = P(() => {
5784
+ const l = $();
5785
+ return !l.opfReference && !l.dataLoaderList.opfReference && (l.dataLoaderList.opfReference = !0, p.getInstance(T).getOpf().then((g) => {
5718
5786
  l.opfReference = g;
5719
5787
  }).catch(v)), l.opfReference;
5720
- }), i = D(() => {
5721
- const l = T();
5722
- return !l.operatorReference && !l.dataLoaderList.operatorReference && (l.dataLoaderList.operatorReference = !0, p.getInstance(a).getOperators().then((g) => {
5788
+ }), n = P(() => {
5789
+ const l = $();
5790
+ return !l.operatorReference && !l.dataLoaderList.operatorReference && (l.dataLoaderList.operatorReference = !0, p.getInstance(T).getOperators().then((g) => {
5723
5791
  l.operatorReference = g;
5724
5792
  }).catch(v)), l.operatorReference;
5725
- }), o = D(() => {
5726
- const l = T();
5727
- return !l.orderPaymentStatusReference && !l.dataLoaderList.orderPaymentStatusReference && (l.dataLoaderList.orderPaymentStatusReference = !0, p.getInstance(a).getOrderPaymentStatuses().then((g) => {
5793
+ }), o = P(() => {
5794
+ const l = $();
5795
+ return !l.orderPaymentStatusReference && !l.dataLoaderList.orderPaymentStatusReference && (l.dataLoaderList.orderPaymentStatusReference = !0, p.getInstance(T).getOrderPaymentStatuses().then((g) => {
5728
5796
  l.orderPaymentStatusReference = g;
5729
5797
  }).catch(v)), l.orderPaymentStatusReference;
5730
- }), c = D(() => {
5731
- const l = T();
5732
- return !l.orderStatusReference && !l.dataLoaderList.orderStatusReference && (l.dataLoaderList.orderStatusReference = !0, p.getInstance(a).getOrderStatuses().then((g) => {
5798
+ }), c = P(() => {
5799
+ const l = $();
5800
+ return !l.orderStatusReference && !l.dataLoaderList.orderStatusReference && (l.dataLoaderList.orderStatusReference = !0, p.getInstance(T).getOrderStatuses().then((g) => {
5733
5801
  l.orderStatusReference = g;
5734
5802
  }).catch(v)), l.orderStatusReference;
5735
- }), u = D(() => {
5736
- const l = T();
5737
- return !l.paymentTypeReference && !l.dataLoaderList.paymentTypeReference && (l.dataLoaderList.paymentTypeReference = !0, p.getInstance(a).getPaymentTypes().then((g) => {
5803
+ }), u = P(() => {
5804
+ const l = $();
5805
+ return !l.paymentTypeReference && !l.dataLoaderList.paymentTypeReference && (l.dataLoaderList.paymentTypeReference = !0, p.getInstance(T).getPaymentTypes().then((g) => {
5738
5806
  l.paymentTypeReference = g;
5739
5807
  }).catch(v)), l.paymentTypeReference;
5740
- }), h = D(() => {
5741
- const l = T();
5742
- return !l.partnerGroupReference && !l.dataLoaderList.partnerGroupReference && (l.dataLoaderList.partnerGroupReference = !0, p.getInstance(a).getPartnerGroup().then((g) => {
5808
+ }), h = P(() => {
5809
+ const l = $();
5810
+ return !l.partnerGroupReference && !l.dataLoaderList.partnerGroupReference && (l.dataLoaderList.partnerGroupReference = !0, p.getInstance(T).getPartnerGroup().then((g) => {
5743
5811
  l.partnerGroupReference = g;
5744
5812
  }).catch(v)), l.partnerGroupReference;
5745
- }), m = D(() => {
5746
- const l = T();
5747
- return !l.productFileTypeReference && !l.dataLoaderList.productFileTypeReference && (l.dataLoaderList.productFileTypeReference = !0, p.getInstance(a).getProductFileType().then((g) => {
5813
+ }), m = P(() => {
5814
+ const l = $();
5815
+ return !l.productFileTypeReference && !l.dataLoaderList.productFileTypeReference && (l.dataLoaderList.productFileTypeReference = !0, p.getInstance(T).getProductFileType().then((g) => {
5748
5816
  l.productFileTypeReference = g;
5749
5817
  }).catch(v)), l.productFileTypeReference;
5750
- }), f = D(() => {
5751
- const l = T();
5752
- return !l.resourceTypesReference && !l.dataLoaderList.resourceTypesReference && (l.dataLoaderList.resourceTypesReference = !0, p.getInstance(a).getResourceTypes().then((g) => {
5818
+ }), f = P(() => {
5819
+ const l = $();
5820
+ return !l.resourceTypesReference && !l.dataLoaderList.resourceTypesReference && (l.dataLoaderList.resourceTypesReference = !0, p.getInstance(T).getResourceTypes().then((g) => {
5753
5821
  l.resourceTypesReference = g;
5754
5822
  }).catch(v)), l.resourceTypesReference;
5755
- }), A = D(() => {
5756
- const l = T();
5757
- return !l.salesDirectionsReference && !l.dataLoaderList.salesDirectionsReference && (l.dataLoaderList.salesDirectionsReference = !0, p.getInstance(a).getSalesDirections().then((g) => {
5823
+ }), D = P(() => {
5824
+ const l = $();
5825
+ return !l.salesDirectionsReference && !l.dataLoaderList.salesDirectionsReference && (l.dataLoaderList.salesDirectionsReference = !0, p.getInstance(T).getSalesDirections().then((g) => {
5758
5826
  l.salesDirectionsReference = g;
5759
5827
  }).catch(v)), l.salesDirectionsReference;
5760
- }), se = D(() => {
5761
- const l = T();
5762
- return !l.sourcePrimaryInterestReference && !l.dataLoaderList.sourcePrimaryInterestReference && (l.dataLoaderList.sourcePrimaryInterestReference = !0, p.getInstance(a).getSourcePrimaryInterest().then((g) => {
5828
+ }), se = P(() => {
5829
+ const l = $();
5830
+ return !l.sourcePrimaryInterestReference && !l.dataLoaderList.sourcePrimaryInterestReference && (l.dataLoaderList.sourcePrimaryInterestReference = !0, p.getInstance(T).getSourcePrimaryInterest().then((g) => {
5763
5831
  l.sourcePrimaryInterestReference = g;
5764
5832
  }).catch(v)), l.sourcePrimaryInterestReference;
5765
- }), ie = D(() => {
5766
- const l = T();
5767
- return !l.deliveryTypeReference && !l.dataLoaderList.deliveryTypeReference && (l.dataLoaderList.deliveryTypeReference = !0, p.getInstance(a).getDeliveryTypes().then((g) => {
5833
+ }), ie = P(() => {
5834
+ const l = $();
5835
+ return !l.deliveryTypeReference && !l.dataLoaderList.deliveryTypeReference && (l.dataLoaderList.deliveryTypeReference = !0, p.getInstance(T).getDeliveryTypes().then((g) => {
5768
5836
  l.deliveryTypeReference = g;
5769
5837
  }).catch(v)), l.deliveryTypeReference;
5770
- }), J = D(() => {
5771
- const l = T();
5772
- return !l.managersList && !l.dataLoaderList.managersList && (l.dataLoaderList.managersList = !0, p.getInstance($t).getManagers().then((g) => {
5838
+ }), J = P(() => {
5839
+ const l = $();
5840
+ return !l.managersList && !l.dataLoaderList.managersList && (l.dataLoaderList.managersList = !0, p.getInstance(At).getManagers().then((g) => {
5773
5841
  l.managersList = g;
5774
5842
  }).catch(v)), l.managersList;
5775
- }), E = D(() => {
5776
- const l = T();
5777
- return !l.warehousesReference && !l.dataLoaderList.warehousesReference && (l.dataLoaderList.warehousesReference = !0, p.getInstance(a).getWarehouses().then((g) => {
5843
+ }), E = P(() => {
5844
+ const l = $();
5845
+ return !l.warehousesReference && !l.dataLoaderList.warehousesReference && (l.dataLoaderList.warehousesReference = !0, p.getInstance(T).getWarehouses().then((g) => {
5778
5846
  l.warehousesReference = g;
5779
5847
  }).catch(v)), l.warehousesReference;
5780
- }), ae = D(() => {
5781
- const l = T();
5782
- return !l.propertyTypesReference && !l.dataLoaderList.propertyTypesReference && (l.dataLoaderList.propertyTypesReference = !0, p.getInstance(a).getPropertyTypes().then((g) => {
5848
+ }), Te = P(() => {
5849
+ const l = $();
5850
+ return !l.propertyTypesReference && !l.dataLoaderList.propertyTypesReference && (l.dataLoaderList.propertyTypesReference = !0, p.getInstance(T).getPropertyTypes().then((g) => {
5783
5851
  l.propertyTypesReference = g;
5784
5852
  }).catch(v)), l.propertyTypesReference;
5785
- }), be = D(() => {
5786
- const l = T();
5787
- return !l.priceCoefficientsReference && !l.dataLoaderList.priceCoefficientsReference && (l.dataLoaderList.priceCoefficientsReference = !0, p.getInstance(a).getPriceCoefficients().then((g) => {
5853
+ }), be = P(() => {
5854
+ const l = $();
5855
+ return !l.priceCoefficientsReference && !l.dataLoaderList.priceCoefficientsReference && (l.dataLoaderList.priceCoefficientsReference = !0, p.getInstance(T).getPriceCoefficients().then((g) => {
5788
5856
  l.priceCoefficientsReference = g;
5789
5857
  }).catch(v)), l.priceCoefficientsReference;
5790
5858
  });
@@ -5792,7 +5860,7 @@ const T = W("common.references_private", () => {
5792
5860
  /**
5793
5861
  * Справочник каналов первичного интереса.
5794
5862
  */
5795
- channelPrimaryInterestsReference: n,
5863
+ channelPrimaryInterestsReference: i,
5796
5864
  /**
5797
5865
  * Справочник должностей контактных лиц.
5798
5866
  */
@@ -5808,7 +5876,7 @@ const T = W("common.references_private", () => {
5808
5876
  /**
5809
5877
  * Справочник операторов.
5810
5878
  */
5811
- operatorReference: i,
5879
+ operatorReference: n,
5812
5880
  /**
5813
5881
  * Справочник статусов оплаты заказа.
5814
5882
  */
@@ -5836,7 +5904,7 @@ const T = W("common.references_private", () => {
5836
5904
  /**
5837
5905
  * Справочник направлений продаж.
5838
5906
  */
5839
- salesDirectionsReference: A,
5907
+ salesDirectionsReference: D,
5840
5908
  /**
5841
5909
  * Справочник каналов первичного интереса.
5842
5910
  */
@@ -5856,21 +5924,21 @@ const T = W("common.references_private", () => {
5856
5924
  /**
5857
5925
  * Справочник типов свойств.
5858
5926
  */
5859
- propertyTypesReference: ae,
5927
+ propertyTypesReference: Te,
5860
5928
  /**
5861
5929
  * Справочник коэффициентов цен.
5862
5930
  */
5863
5931
  priceCoefficientsReference: be
5864
5932
  };
5865
5933
  });
5866
- class ys extends br {
5934
+ class vs extends br {
5867
5935
  /**
5868
5936
  * Инициализирует экземпляр класса {@link OrdersListFilters}.
5869
5937
  *
5870
5938
  * @param data Данные для первоначальной инициализации.
5871
5939
  */
5872
5940
  constructor(e) {
5873
- var s, i, o, c;
5941
+ var s, n, o, c;
5874
5942
  super();
5875
5943
  /**
5876
5944
  * @inheritDoc
@@ -5964,7 +6032,7 @@ class ys extends br {
5964
6032
  * @inheritDoc
5965
6033
  */
5966
6034
  t(this, "onlyMyRegions");
5967
- this.attachedOperators = (s = e == null ? void 0 : e.attachedOperators) == null ? void 0 : s.map((u) => new Rr(u)), this.clientSearchTerm = e == null ? void 0 : e.clientSearchTerm, this.client = e != null && e.client ? new te(e.client) : void 0, this.contragent = e == null ? void 0 : e.contragent, this.createdAt = new S(e == null ? void 0 : e.createdAt), this.creator = e != null && e.creator ? new L(e.creator) : void 0, this.deliveryDate = new S(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 Ae(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 S(e == null ? void 0 : e.attachedAt), this.salesDirections = (o = e == null ? void 0 : e.salesDirections) == null ? void 0 : o.map((u) => new O(u)), this.status = e == null ? void 0 : e.status, this.statusDetail = e == null ? void 0 : e.statusDetail, this.deliveryType = e != null && e.deliveryType ? new U(e.deliveryType) : void 0, this.paymentType = e != null && e.paymentType ? new Pr(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;
6035
+ this.attachedOperators = (s = e == null ? void 0 : e.attachedOperators) == null ? void 0 : s.map((u) => new ar(u)), this.clientSearchTerm = e == null ? void 0 : e.clientSearchTerm, this.client = e != null && e.client ? new te(e.client) : void 0, this.contragent = e == null ? void 0 : e.contragent, this.createdAt = new S(e == null ? void 0 : e.createdAt), this.creator = e != null && e.creator ? new L(e.creator) : void 0, this.deliveryDate = new S(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 De(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 S(e == null ? void 0 : e.attachedAt), this.salesDirections = (o = e == null ? void 0 : e.salesDirections) == null ? void 0 : o.map((u) => new O(u)), this.status = e == null ? void 0 : e.status, this.statusDetail = e == null ? void 0 : e.statusDetail, this.deliveryType = e != null && e.deliveryType ? new H(e.deliveryType) : void 0, this.paymentType = e != null && e.paymentType ? new Rr(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;
5968
6036
  }
5969
6037
  /**
5970
6038
  * @inheritDoc
@@ -5981,7 +6049,7 @@ class ys extends br {
5981
6049
  this.deliveryDate.from = null, this.deliveryDate.to = null;
5982
6050
  break;
5983
6051
  case "deliveryType":
5984
- this.deliveryType = new U();
6052
+ this.deliveryType = new H();
5985
6053
  break;
5986
6054
  case "clientCities":
5987
6055
  this.clientCities = [];
@@ -6008,12 +6076,12 @@ class ys extends br {
6008
6076
  * @inheritDoc
6009
6077
  */
6010
6078
  asClearRaw() {
6011
- var s, i, o, c, u, h;
6079
+ var s, n, o, c, u, h;
6012
6080
  const e = super.asClearRaw();
6013
- return !((s = e == null ? void 0 : e.createdAt) != null && s.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) && !((h = e == null ? void 0 : e.attachedAt) != null && h.to) && delete e.attachedAt, e;
6081
+ return !((s = e == null ? void 0 : e.createdAt) != null && s.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) && !((h = e == null ? void 0 : e.attachedAt) != null && h.to) && delete e.attachedAt, e;
6014
6082
  }
6015
6083
  }
6016
- class at extends mr {
6084
+ class bt extends mr {
6017
6085
  /**
6018
6086
  * Инициализирует экземпляр класса {@link OrderItem}.
6019
6087
  *
@@ -6061,10 +6129,10 @@ class at extends mr {
6061
6129
  * @inheritDoc
6062
6130
  */
6063
6131
  t(this, "currency");
6064
- this.product = new G(e.product), this.currency = new x(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 = e.sawing;
6132
+ this.product = new G(e.product), this.currency = new _(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 = e.sawing;
6065
6133
  }
6066
6134
  }
6067
- class _ extends Ir {
6135
+ class d extends Ir {
6068
6136
  /**
6069
6137
  * Инициализирует экземпляр класса {@link Order}.
6070
6138
  *
@@ -6109,6 +6177,10 @@ class _ extends Ir {
6109
6177
  * @inheritDoc
6110
6178
  */
6111
6179
  t(this, "nextStatuses");
6180
+ /**
6181
+ * @inheritDoc
6182
+ */
6183
+ t(this, "actions");
6112
6184
  /**
6113
6185
  * @inheritDoc
6114
6186
  */
@@ -6117,10 +6189,10 @@ class _ extends Ir {
6117
6189
  * @inheritDoc
6118
6190
  */
6119
6191
  t(this, "operatorsForWarehouseComment");
6120
- this.products = (e.products ?? []).map((i) => new at(i)), this.invoices = e.invoices ?? [], this.comment = e.comment, this.image = e.image, this.contragent = e.contragent ? Ce.createInstance(e.contragent) : void 0, this.barcode = e.barcode, this.orderSource = e.orderSource ? new w(e.orderSource) : void 0, this.isAllowProcessingWithoutPayment = e.isAllowProcessingWithoutPayment, this.nextStatuses = (s = e.nextStatuses) == null ? void 0 : s.map((i) => new Te(i)), this.operatorsComment = e.operatorsComment, this.operatorsForWarehouseComment = e.operatorsForWarehouseComment;
6192
+ this.products = (e.products ?? []).map((n) => new bt(n)), this.invoices = e.invoices ?? [], this.comment = e.comment, this.image = e.image, this.contragent = e.contragent ? Ce.createInstance(e.contragent) : void 0, this.barcode = e.barcode, this.orderSource = e.orderSource ? new w(e.orderSource) : void 0, this.isAllowProcessingWithoutPayment = e.isAllowProcessingWithoutPayment, this.nextStatuses = (s = e.nextStatuses) == null ? void 0 : s.map((n) => new $e(n)), this.actions = e.actions, this.operatorsComment = e.operatorsComment, this.operatorsForWarehouseComment = e.operatorsForWarehouseComment;
6121
6193
  }
6122
6194
  }
6123
- class bt {
6195
+ class St {
6124
6196
  /**
6125
6197
  * Инициализирует экземпляр класса {@link OrderStatusHistoryInfo}.
6126
6198
  *
@@ -6143,10 +6215,10 @@ class bt {
6143
6215
  * @inheritDoc
6144
6216
  */
6145
6217
  t(this, "createdAt");
6146
- this.user = new L(r == null ? void 0 : r.user), this.status = new Te(r == null ? void 0 : r.status), this.statusDetail = r != null && r.statusDetail ? new w(r.statusDetail) : void 0, this.createdAt = C(r == null ? void 0 : r.createdAt) ? R(r.createdAt) : (r == null ? void 0 : r.createdAt) ?? /* @__PURE__ */ new Date();
6218
+ this.user = new L(r == null ? void 0 : r.user), this.status = new $e(r == null ? void 0 : r.status), this.statusDetail = r != null && r.statusDetail ? new w(r.statusDetail) : void 0, this.createdAt = C(r == null ? void 0 : r.createdAt) ? a(r.createdAt) : (r == null ? void 0 : r.createdAt) ?? /* @__PURE__ */ new Date();
6147
6219
  }
6148
6220
  }
6149
- class ws extends $e {
6221
+ class Cs extends Ae {
6150
6222
  /**
6151
6223
  * Возвращает данные о заказах, удовлетворяющих указанным параметрам поиска.
6152
6224
  *
@@ -6157,7 +6229,7 @@ class ws extends $e {
6157
6229
  *
6158
6230
  * @see /doc/api/internal#/Заказы/api_internal_orders_get_list
6159
6231
  */
6160
- getOrders(r, e, s, i = void 0) {
6232
+ getOrders(r, e, s, n = void 0) {
6161
6233
  return this.getPaginated(
6162
6234
  "/internal/orders",
6163
6235
  r,
@@ -6169,7 +6241,7 @@ class ws extends $e {
6169
6241
  return c.data = c.data.map((u) => new Ir(u)), c;
6170
6242
  },
6171
6243
  void 0,
6172
- i
6244
+ n
6173
6245
  );
6174
6246
  }
6175
6247
  /**
@@ -6206,7 +6278,21 @@ class ws extends $e {
6206
6278
  * @see /doc/api/internal#/Заказы/api_internal_orders_get
6207
6279
  */
6208
6280
  getOrder(r) {
6209
- return this.get(`/internal/orders/${r}`, {}, (e) => new _(e.data));
6281
+ return this.get(`/internal/orders/${r}`, {}, (e) => new d(e.data));
6282
+ }
6283
+ /**
6284
+ * Создаёт новый заказ клиента из содержимого корзины текущего пользователя.
6285
+ *
6286
+ * @param clientId Идентификатор клиента.
6287
+ * @param salesDirectionId Идентификатор направления продаж.
6288
+ * @param data Данные для создания заказа.
6289
+ * @param validationFieldResultData Список полей, для которых необходимо
6290
+ * установить данные об ошибках валидации
6291
+ * в случае ошибок в запросах.
6292
+ * @see /doc/api/internal#/operations/api_internal_client_orders_create
6293
+ */
6294
+ createClientOrder(r, e, s, n = {}) {
6295
+ return this.post(`/internal/clients/${r}/orders/${e}`, s, (o) => new d(o.data), n);
6210
6296
  }
6211
6297
  /**
6212
6298
  * Закрепляет указанный заказ за текущим оператором и возвращает полные данные заказа.
@@ -6216,7 +6302,7 @@ class ws extends $e {
6216
6302
  * @see /doc/api/internal#/Заказы/api_internal_orders_attach
6217
6303
  */
6218
6304
  attachOrder(r) {
6219
- return this.patch(`/internal/orders/${r}/attach`, {}, (e) => new _(e.data));
6305
+ return this.patch(`/internal/orders/${r}/attach`, {}, (e) => new d(e.data));
6220
6306
  }
6221
6307
  /**
6222
6308
  * Открепляет указанный заказ от оператора и возвращает полные данные заказа.
@@ -6226,7 +6312,7 @@ class ws extends $e {
6226
6312
  * @see /doc/api/internal#/Заказы/api_internal_orders_detach
6227
6313
  */
6228
6314
  detachOrder(r) {
6229
- return this.patch(`/internal/orders/${r}/detach`, {}, (e) => new _(e.data));
6315
+ return this.patch(`/internal/orders/${r}/detach`, {}, (e) => new d(e.data));
6230
6316
  }
6231
6317
  /**
6232
6318
  * Обновляет данные заказа без изменения состава товаров и возвращает обновлённые данные заказа.
@@ -6240,7 +6326,7 @@ class ws extends $e {
6240
6326
  * @see /doc/api/internal#/Заказы/api_internal_orders_update
6241
6327
  */
6242
6328
  updateOrder(r, e, s = {}) {
6243
- return this.patch(`/internal/orders/${r}`, e, (i) => new _(i.data), s);
6329
+ return this.patch(`/internal/orders/${r}`, e, (n) => new d(n.data), s);
6244
6330
  }
6245
6331
  /**
6246
6332
  * Добавляет продукт в заказ и возвращает обновлённые данные заказа.
@@ -6268,7 +6354,7 @@ class ws extends $e {
6268
6354
  is_additional_sale: e.isAdditionalSale,
6269
6355
  ...e.configuratorParams
6270
6356
  },
6271
- (i) => new _(i.data),
6357
+ (n) => new d(n.data),
6272
6358
  s
6273
6359
  );
6274
6360
  }
@@ -6284,15 +6370,15 @@ class ws extends $e {
6284
6370
  *
6285
6371
  * @see /doc/api/internal#/Заказы/api_internal_orders_status_change
6286
6372
  */
6287
- changeOrderStatus(r, e, s, i = {}) {
6373
+ changeOrderStatus(r, e, s, n = {}) {
6288
6374
  return this.patch(
6289
6375
  `/internal/orders/${r}/status`,
6290
6376
  {
6291
6377
  status: e,
6292
6378
  statusDetail: s
6293
6379
  },
6294
- (o) => new _(o.data),
6295
- i
6380
+ (o) => new d(o.data),
6381
+ n
6296
6382
  );
6297
6383
  }
6298
6384
  /**
@@ -6306,7 +6392,7 @@ class ws extends $e {
6306
6392
  return this.get(
6307
6393
  `/internal/orders/${r}/history`,
6308
6394
  {},
6309
- (e) => e.data.map((s) => new bt(s))
6395
+ (e) => e.data.map((s) => new St(s))
6310
6396
  );
6311
6397
  }
6312
6398
  /**
@@ -6317,7 +6403,7 @@ class ws extends $e {
6317
6403
  * @see /doc/api/internal#/Заказы/api_internal_orders_attached_file_delete
6318
6404
  */
6319
6405
  deleteOrderAttachedFile(r) {
6320
- return this.delete(`/internal/orders/${r}/file/attached`, (e) => new _(e.data));
6406
+ return this.delete(`/internal/orders/${r}/file/attached`, (e) => new d(e.data));
6321
6407
  }
6322
6408
  /**
6323
6409
  * Изменяет продукт заказа и возвращает обновлённые данные заказа.
@@ -6331,7 +6417,7 @@ class ws extends $e {
6331
6417
  *
6332
6418
  * @see /doc/api/internal#/Заказы/api_internal_orders_product_update
6333
6419
  */
6334
- patchOrderProduct(r, e, s, i = {}) {
6420
+ patchOrderProduct(r, e, s, n = {}) {
6335
6421
  return this.patch(
6336
6422
  `/internal/orders/${r}/products/${e}`,
6337
6423
  {
@@ -6345,8 +6431,51 @@ class ws extends $e {
6345
6431
  marker: s.marker,
6346
6432
  ...s.configuratorParams
6347
6433
  },
6348
- (o) => new _(o.data),
6349
- i
6434
+ (o) => new d(o.data),
6435
+ n
6436
+ );
6437
+ }
6438
+ /**
6439
+ * Возвращает список дат, в которые возможна доставка по указанному адресу.
6440
+ *
6441
+ * @param addressId Идентификатор адреса доставки клиента.
6442
+ * @param signal Сигнал отмены запроса.
6443
+ *
6444
+ * @see /doc/api/internal#/operations/api_internal_orders_delivery_get_nearest_dates
6445
+ */
6446
+ getDeliveryNearestDates(r, e = void 0) {
6447
+ return this.get(`/internal/orders/delivery/${r}/nearest-dates`, {}, (s) => s.data, void 0, e);
6448
+ }
6449
+ /**
6450
+ * Возвращает список доступных дат самовывоза для указанного склада.
6451
+ *
6452
+ * @param warehouseId Идентификатор склада.
6453
+ * @param signal Сигнал отмены запроса.
6454
+ */
6455
+ getSelfDeliveryNearestDates(r, e = void 0) {
6456
+ return this.get(`/internal/orders/self-delivery/${r}/nearest-dates`, {}, (s) => s.data, void 0, e);
6457
+ }
6458
+ /**
6459
+ * Возвращает информацию о стоимости доставки по указанному адресу.
6460
+ *
6461
+ * @param addressId Идентификатор адреса доставки клиента.
6462
+ * @param date Дата доставки.
6463
+ * @param warehouseId Идентификатор склада.
6464
+ * @param signal Сигнал отмены запроса.
6465
+ *
6466
+ * @see /doc/api/internal#/operations/api_internal_orders_delivery_get_cost
6467
+ */
6468
+ getDeliveryCost(r, e, s, n = void 0) {
6469
+ const o = k().config.dateFormats.api;
6470
+ return this.get(
6471
+ `/internal/orders/delivery/${r}/cost`,
6472
+ {
6473
+ date: q(e, o),
6474
+ warehouse_id: s
6475
+ },
6476
+ (c) => c.data,
6477
+ void 0,
6478
+ n
6350
6479
  );
6351
6480
  }
6352
6481
  }
@@ -6377,27 +6506,27 @@ class de {
6377
6506
  * Источник клиентской цены.
6378
6507
  */
6379
6508
  t(this, "source");
6380
- this.client = new te(r == null ? void 0 : r.client), this.product = new k(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) ?? Me.Product;
6509
+ this.client = new te(r == null ? void 0 : r.client), this.product = new I(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) ?? Me.Product;
6381
6510
  }
6382
6511
  }
6383
- const xe = (n) => {
6384
- var r, e, s, i, o;
6385
- return n ? cr(
6512
+ const xe = (i) => {
6513
+ var r, e, s, n, o;
6514
+ return i ? cr(
6386
6515
  {
6387
- cities: (r = n.cities) == null ? void 0 : r.map((c) => c.id),
6388
- clients: (e = n.clients) == null ? void 0 : e.map((c) => c.id),
6389
- managers: (s = n.managers) == null ? void 0 : s.map((c) => c.id),
6390
- partnerGroups: (i = n.partnerGroups) == null ? void 0 : i.map((c) => c.id),
6391
- salesDirections: (o = n.salesDirections) == null ? void 0 : o.map((c) => c.id),
6392
- hideNotActive: n.hideNotActive
6516
+ cities: (r = i.cities) == null ? void 0 : r.map((c) => c.id),
6517
+ clients: (e = i.clients) == null ? void 0 : e.map((c) => c.id),
6518
+ managers: (s = i.managers) == null ? void 0 : s.map((c) => c.id),
6519
+ partnerGroups: (n = i.partnerGroups) == null ? void 0 : n.map((c) => c.id),
6520
+ salesDirections: (o = i.salesDirections) == null ? void 0 : o.map((c) => c.id),
6521
+ hideNotActive: i.hideNotActive
6393
6522
  },
6394
- (c) => $(c) || (F(c) || lr(c)) && X(c)
6523
+ (c) => A(c) || (F(c) || lr(c)) && X(c)
6395
6524
  ) : {};
6396
- }, tr = (n) => {
6525
+ }, tr = (i) => {
6397
6526
  const r = {};
6398
- 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;
6527
+ 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;
6399
6528
  };
6400
- class vs extends p {
6529
+ class as extends p {
6401
6530
  /**
6402
6531
  * Возвращает список клиентских цен на продукты в указанном диапазоне цены.
6403
6532
  *
@@ -6414,7 +6543,7 @@ class vs extends p {
6414
6543
  ...tr(e),
6415
6544
  filters: xe(s)
6416
6545
  },
6417
- (i) => i.data.map((o) => new de(o))
6546
+ (n) => n.data.map((o) => new de(o))
6418
6547
  );
6419
6548
  }
6420
6549
  /**
@@ -6433,7 +6562,7 @@ class vs extends p {
6433
6562
  ...tr(e),
6434
6563
  filters: xe(s)
6435
6564
  },
6436
- (i) => i.data.map((o) => new de(o))
6565
+ (n) => n.data.map((o) => new de(o))
6437
6566
  );
6438
6567
  }
6439
6568
  /**
@@ -6454,11 +6583,11 @@ class vs extends p {
6454
6583
  ...e,
6455
6584
  filters: xe(s)
6456
6585
  },
6457
- (i) => i.data.map((o) => new de(o))
6586
+ (n) => n.data.map((o) => new de(o))
6458
6587
  );
6459
6588
  }
6460
6589
  }
6461
- class St {
6590
+ class kt {
6462
6591
  /**
6463
6592
  * Инициализирует экземпляр класса {@link PriceHistoryItem}.
6464
6593
  *
@@ -6505,10 +6634,10 @@ class St {
6505
6634
  * @inheritDoc
6506
6635
  */
6507
6636
  t(this, "currency");
6508
- this.cost = r.cost ?? 0, this.isLowCost = r.isLowCost ?? !1, this.isRetail = r.isRetail ?? !1, this.costDate = C(r.costDate) ? R(r.costDate) : r.costDate ?? /* @__PURE__ */ new Date(), this.discountName = r.discountName, this.priceTemplateName = r.priceTemplateName, this.product = r.product ? new ue(r.product) : void 0, this.client = r.client ? new L(r.client) : void 0, this.executor = r.executor ? new L(r.executor) : void 0, this.currency = r.currency ? new x(r.currency) : void 0;
6637
+ this.cost = r.cost ?? 0, this.isLowCost = r.isLowCost ?? !1, this.isRetail = r.isRetail ?? !1, this.costDate = C(r.costDate) ? a(r.costDate) : r.costDate ?? /* @__PURE__ */ new Date(), this.discountName = r.discountName, this.priceTemplateName = r.priceTemplateName, this.product = r.product ? new ue(r.product) : void 0, this.client = r.client ? new L(r.client) : void 0, this.executor = r.executor ? new L(r.executor) : void 0, this.currency = r.currency ? new _(r.currency) : void 0;
6509
6638
  }
6510
6639
  }
6511
- class kt extends ue {
6640
+ class It extends ue {
6512
6641
  /**
6513
6642
  * Инициализирует экземпляр класса {@link ProductPriceHistory}.
6514
6643
  *
@@ -6520,10 +6649,10 @@ class kt extends ue {
6520
6649
  * @inheritDoc
6521
6650
  */
6522
6651
  t(this, "history");
6523
- this.history = ge(e.history, (s) => new St(s));
6652
+ this.history = ge(e.history, (s) => new kt(s));
6524
6653
  }
6525
6654
  }
6526
- class Cs extends p {
6655
+ class Rs extends p {
6527
6656
  /**
6528
6657
  * Возвращает данные об истории изменения цен.
6529
6658
  *
@@ -6533,17 +6662,17 @@ class Cs extends p {
6533
6662
  */
6534
6663
  getProductPriceHistory(r) {
6535
6664
  var o, c, u, h, m;
6536
- const e = I().config.dateFormats.api, s = cr(
6665
+ const e = k().config.dateFormats.api, s = cr(
6537
6666
  le(r, {
6538
6667
  costDate: {
6539
- from: Oe((o = r.costDate) == null ? void 0 : o.from) ? H(r.costDate.from, e) : (c = r.costDate) == null ? void 0 : c.from,
6540
- to: Oe((u = r.costDate) == null ? void 0 : u.to) ? H(r.costDate.to, e) : (h = r.costDate) == null ? void 0 : h.to
6668
+ from: _e((o = r.costDate) == null ? void 0 : o.from) ? q(r.costDate.from, e) : (c = r.costDate) == null ? void 0 : c.from,
6669
+ to: _e((u = r.costDate) == null ? void 0 : u.to) ? q(r.costDate.to, e) : (h = r.costDate) == null ? void 0 : h.to
6541
6670
  }
6542
6671
  }),
6543
- (f) => $(f) || (F(f) || lr(f)) && X(f)
6544
- ), i = ((m = r.product) == null ? void 0 : m[0]) ?? 0;
6545
- return delete s.product, this.get(`/internal/price/products/${i}/history`, s).then((f) => [
6546
- new kt(le(f[0], { history: f }))
6672
+ (f) => A(f) || (F(f) || lr(f)) && X(f)
6673
+ ), n = ((m = r.product) == null ? void 0 : m[0]) ?? 0;
6674
+ return delete s.product, this.get(`/internal/price/products/${n}/history`, s).then((f) => [
6675
+ new It(le(f[0], { history: f }))
6547
6676
  ]);
6548
6677
  }
6549
6678
  }
@@ -6565,7 +6694,7 @@ class sr {
6565
6694
  r != null && r.products && (this.products = r.products.map((e) => new ue(e))), r != null && r.productCategories && (this.productCategories = r.productCategories.map((e) => new ue(e)));
6566
6695
  }
6567
6696
  }
6568
- class Rs extends p {
6697
+ class Ps extends p {
6569
6698
  /**
6570
6699
  * Возвращает данные о рекомендациях указанной категории продуктов.
6571
6700
  *
@@ -6611,7 +6740,7 @@ class Rs extends p {
6611
6740
  });
6612
6741
  }
6613
6742
  }
6614
- class It {
6743
+ class Lt {
6615
6744
  /**
6616
6745
  * Инициализирует экземпляр класса {@link MetaTagItem}.
6617
6746
  *
@@ -6669,10 +6798,10 @@ class ir {
6669
6798
  */
6670
6799
  t(this, "tags");
6671
6800
  var e;
6672
- this.resourceType = new Dr(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((s) => new It(s))) ?? [], this.tags = r == null ? void 0 : r.tags;
6801
+ this.resourceType = new Pr(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((s) => new Lt(s))) ?? [], this.tags = r == null ? void 0 : r.tags;
6673
6802
  }
6674
6803
  }
6675
- class Ps extends p {
6804
+ class Ds extends p {
6676
6805
  /**
6677
6806
  * Возвращает {@link Promise} для получения данных о SEO-параметрах указанного ресурса.
6678
6807
  *
@@ -6703,7 +6832,7 @@ class Ps extends p {
6703
6832
  return this.delete(`/internal/seo/${r.slug}/${e}`);
6704
6833
  }
6705
6834
  }
6706
- class Ds extends p {
6835
+ class As extends p {
6707
6836
  /**
6708
6837
  * Возвращает подсказки по адресам.
6709
6838
  *
@@ -6742,16 +6871,16 @@ class Ds extends p {
6742
6871
  */
6743
6872
  execSuggestionQuery(r, e) {
6744
6873
  return this.get(r, { query: e }).then((s) => {
6745
- const i = [...s];
6874
+ const n = [...s];
6746
6875
  let o = 1;
6747
- return i.forEach((c) => {
6876
+ return n.forEach((c) => {
6748
6877
  c.id = o++;
6749
- }), i;
6878
+ }), n;
6750
6879
  });
6751
6880
  }
6752
6881
  }
6753
- var Lt = /* @__PURE__ */ ((n) => (n.Admin = "admin", n.Manager = "manager", n.Operator = "operator", n.Client = "client", n.Guest = "guest", n))(Lt || {});
6754
- class dt extends wr {
6882
+ var dt = /* @__PURE__ */ ((i) => (i.Admin = "admin", i.Manager = "manager", i.Operator = "operator", i.Client = "client", i.Guest = "guest", i))(dt || {});
6883
+ class xt extends wr {
6755
6884
  /**
6756
6885
  * Инициализирует экземпляр класса {@link User}.
6757
6886
  *
@@ -6774,12 +6903,12 @@ class dt extends wr {
6774
6903
  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;
6775
6904
  }
6776
6905
  }
6777
- class As extends p {
6906
+ class $s extends p {
6778
6907
  /**
6779
6908
  * Инициализирует экземпляр класса {@link UserAuthDataProvider}.
6780
6909
  */
6781
6910
  constructor() {
6782
- super(), this.baseUrl = `${I().config.http.portalApiUrl}/api`, this.interceptorIds.request.authRequestInterceptor && this.httpClient.interceptors.request.eject(this.interceptorIds.request.authRequestInterceptor);
6911
+ super(), this.baseUrl = `${k().config.http.portalApiUrl}/api`, this.interceptorIds.request.authRequestInterceptor && this.httpClient.interceptors.request.eject(this.interceptorIds.request.authRequestInterceptor);
6783
6912
  }
6784
6913
  /**
6785
6914
  * Функция для получения обновленных токенов доступа.
@@ -6790,41 +6919,41 @@ class As extends p {
6790
6919
  return this.get("internal/users/current-tokens").then((r) => r.accessToken);
6791
6920
  }
6792
6921
  }
6793
- class xt extends p {
6922
+ class _t extends p {
6794
6923
  /**
6795
6924
  * Возвращает данные о текущем пользователе.
6796
6925
  */
6797
6926
  // eslint-disable-next-line class-methods-use-this
6798
6927
  getCurrentUser() {
6799
- return this.get("/internal/users/info", {}, (r) => new dt(r.data), !0);
6928
+ return this.get("/internal/users/info", {}, (r) => new xt(r.data), !0);
6800
6929
  }
6801
6930
  }
6802
6931
  const Ot = W("common.user_state_private", () => {
6803
- const n = y({}), r = y(void 0);
6932
+ const i = y({}), r = y(void 0);
6804
6933
  return {
6805
6934
  /**
6806
6935
  * Список загружаемых/загруженных на данный момент значений.
6807
6936
  */
6808
- dataLoaderList: n,
6937
+ dataLoaderList: i,
6809
6938
  /**
6810
6939
  * Данные о текущем пользователе.
6811
6940
  */
6812
6941
  currentUser: r
6813
6942
  };
6814
- }), $s = W("common.user_state", () => ({
6943
+ }), Ts = W("common.user_state", () => ({
6815
6944
  /**
6816
6945
  * Данные о текущем пользователе.
6817
6946
  */
6818
- currentUser: D(() => {
6947
+ currentUser: P(() => {
6819
6948
  const r = Ot();
6820
- return !r.currentUser && !r.dataLoaderList.currentUser && (r.dataLoaderList.currentUser = !0, p.getInstance(xt).getCurrentUser().then((e) => {
6949
+ return !r.currentUser && !r.dataLoaderList.currentUser && (r.dataLoaderList.currentUser = !0, p.getInstance(_t).getCurrentUser().then((e) => {
6821
6950
  r.currentUser = e;
6822
6951
  }).catch(v).finally(() => {
6823
6952
  r.dataLoaderList.currentUser = !1;
6824
6953
  })), r.currentUser;
6825
6954
  })
6826
6955
  }));
6827
- class Ts {
6956
+ class bs {
6828
6957
  /**
6829
6958
  * Инициализирует экземпляр класса {@link FieldValidationResultData}.
6830
6959
  *
@@ -6851,61 +6980,61 @@ export {
6851
6980
  mt as AnyReference,
6852
6981
  rt as AppBaseConfig,
6853
6982
  Ne as BankAccount,
6854
- $e as BasePaginationProvider,
6983
+ Ae as BasePaginationProvider,
6855
6984
  lt as CalculationTypeEnum,
6856
6985
  ye as Cart,
6857
- zt as CartProvider,
6858
- Jt as CatalogProvider,
6986
+ Wt as CartProvider,
6987
+ Et as CatalogProvider,
6859
6988
  pr as CatalogableItem,
6860
- q as Category,
6989
+ N as Category,
6861
6990
  Ye as CategoryPricingRule,
6862
6991
  Cr as ChannelPrimaryInterest,
6863
- ss as City,
6864
- Ae as CityWithRegionAndCountry,
6992
+ is as City,
6993
+ De as CityWithRegionAndCountry,
6865
6994
  rr as Client,
6866
- Pt as ClientAdditionalData,
6995
+ Rt as ClientAdditionalData,
6867
6996
  ve as ClientCategory,
6868
- d as ClientDataProvider,
6869
- Et as ClientPriceProvider,
6870
- Vt as ClientPriceTemplateProvider,
6997
+ x as ClientDataProvider,
6998
+ Vt as ClientPriceProvider,
6999
+ Kt as ClientPriceTemplateProvider,
6871
7000
  G as ClientProduct,
6872
- Yt as ClientProductCategoryDataProvider,
6873
- Xt as ClientProductDataProvider,
7001
+ Xt as ClientProductCategoryDataProvider,
7002
+ Zt as ClientProductDataProvider,
6874
7003
  te as ClientShortInfo,
6875
7004
  gt as ClientsAdditionalDataRequestTypeEnum,
6876
- ns as ClientsListFilters,
7005
+ os as ClientsListFilters,
6877
7006
  ue as CodedIdentity,
6878
- ps as ConfiguratorProvider,
6879
- At as ConfiguratorsEnum,
7007
+ hs as ConfiguratorProvider,
7008
+ Dt as ConfiguratorsEnum,
6880
7009
  Ue as Contact,
6881
7010
  fr as ContactLinks,
6882
7011
  z as ContactPerson,
6883
- Rt as ContactPersonRelated,
7012
+ at as ContactPersonRelated,
6884
7013
  ft as ContactPosition,
6885
7014
  Le as ContactRelation,
6886
- $r as ContragentBase,
7015
+ Ar as ContragentBase,
6887
7016
  Ce as ContragentFactory,
6888
- Tr as ContragentIc,
7017
+ $r as ContragentIc,
6889
7018
  vt as ContragentPerson,
6890
7019
  Ct as ContragentUlNr,
6891
- ar as ContragentUlR,
7020
+ Tr as ContragentUlR,
6892
7021
  Me as CostSourceEnum,
6893
7022
  Z as Country,
6894
7023
  ze as CuratedDirection,
6895
7024
  We as Curator,
6896
- x as Currency,
6897
- Ds as DataSuggestionProvider,
6898
- os as DataTablePagination,
6899
- Dt as DataTablePaginationRequestParams,
6900
- cs as DataTableSortRequestParams,
6901
- hs as DateTimeProvider,
7025
+ _ as Currency,
7026
+ As as DataSuggestionProvider,
7027
+ cs as DataTablePagination,
7028
+ Pt as DataTablePaginationRequestParams,
7029
+ ls as DataTableSortRequestParams,
7030
+ gs as DateTimeProvider,
6902
7031
  tt as DeletableNamedIdentity,
6903
- Re as DeliveryAddress,
6904
- U as DeliveryType,
6905
- Mt as DetailedJwtPayload,
7032
+ ae as DeliveryAddress,
7033
+ H as DeliveryType,
7034
+ Bt as DetailedJwtPayload,
6906
7035
  Yr as DeviceTypeResolutionConfig,
6907
7036
  nt as DiscountShortInfo,
6908
- Ts as FieldValidationResultData,
7037
+ bs as FieldValidationResultData,
6909
7038
  M as FilterGroup,
6910
7039
  Xe as FilterItem,
6911
7040
  Je as FilterOpEnum,
@@ -6917,91 +7046,93 @@ export {
6917
7046
  re as Identity,
6918
7047
  st as Image,
6919
7048
  j as JwtPayload,
6920
- De as Manager,
7049
+ Pe as Manager,
6921
7050
  Be as ManagerCommon,
6922
- ms as ManagerDataFactory,
6923
- $t as ManagerDataProvider,
6924
- It as MetaTagItem,
7051
+ fs as ManagerDataFactory,
7052
+ At as ManagerDataProvider,
7053
+ Lt as MetaTagItem,
6925
7054
  b as NamedIdentity,
6926
- Rr as Operator,
7055
+ ar as Operator,
6927
7056
  B as Opf,
6928
- N as OpfEnum,
6929
- _ as Order,
7057
+ U as OpfEnum,
7058
+ d as Order,
7059
+ $t as OrderAction,
7060
+ ys as OrderEditorData,
6930
7061
  Ir as OrderInfo,
6931
- at as OrderItem,
7062
+ bt as OrderItem,
6932
7063
  mr as OrderItemBase,
6933
7064
  yt as OrderPaymentStatus,
6934
7065
  Sr as OrderShortInfo,
6935
- Te as OrderStatus,
7066
+ $e as OrderStatus,
6936
7067
  Tt as OrderStatusEnum,
6937
- bt as OrderStatusHistoryInfo,
6938
- ws as OrdersDataProvider,
6939
- ys as OrdersListFilters,
7068
+ St as OrderStatusHistoryInfo,
7069
+ Cs as OrdersDataProvider,
7070
+ vs as OrdersListFilters,
6940
7071
  br as PaginationFiltersBase,
6941
7072
  ee as PartnerGroup,
6942
- Pr as PaymentType,
7073
+ Rr as PaymentType,
6943
7074
  we as PreferencesStorageProvider,
6944
7075
  de as PriceAnalyze,
6945
- vs as PriceAnalyzeProvider,
6946
- Pe as PriceCoefficient,
7076
+ as as PriceAnalyzeProvider,
7077
+ Re as PriceCoefficient,
6947
7078
  hr as PriceCoefficientEnum,
6948
- Cs as PriceHistoryDataProvider,
6949
- St as PriceHistoryItem,
7079
+ Rs as PriceHistoryDataProvider,
7080
+ kt as PriceHistoryItem,
6950
7081
  Q as PriceTemplate,
6951
7082
  ke as PriceTemplateCategory,
6952
7083
  ne as PriceTemplateClient,
6953
7084
  yr as PriceTemplateICatalogableItem,
6954
7085
  Ie as PriceTemplateProduct,
6955
- Zt as PriceTemplateProvider,
7086
+ es as PriceTemplateProvider,
6956
7087
  ce as PricingRole,
6957
- es as PricingRoleProvider,
7088
+ rs as PricingRoleProvider,
6958
7089
  qe as PrimaryCatalogableItem,
6959
- k as Product,
6960
- Kt as ProductCategoryDataProvider,
6961
- Qt as ProductDataProvider,
7090
+ I as Product,
7091
+ Qt as ProductCategoryDataProvider,
7092
+ Yt as ProductDataProvider,
6962
7093
  wt as ProductFileType,
6963
7094
  Ge as ProductPriceCoefficient,
6964
- kt as ProductPriceHistory,
7095
+ It as ProductPriceHistory,
6965
7096
  Qe as ProductUnit,
6966
- rs as PropertiesProvider,
7097
+ ts as PropertiesProvider,
6967
7098
  oe as Property,
6968
7099
  vr as PropertyType,
6969
7100
  ut as PropertyTypeEnum,
6970
7101
  K as PropertyValue,
6971
- Rs as RecommendationsDataProvider,
7102
+ Ps as RecommendationsDataProvider,
6972
7103
  sr as RecommendationsList,
6973
7104
  w as Reference,
6974
- is as ReferenceDataFactory,
6975
- a as ReferenceDataProvider,
7105
+ ns as ReferenceDataFactory,
7106
+ T as ReferenceDataProvider,
6976
7107
  pe as Region,
6977
- Dr as ResourceType,
7108
+ Pr as ResourceType,
6978
7109
  O as SalesDirection,
6979
7110
  Zr as SentryConfig,
6980
7111
  ir as Seo,
6981
- Ps as SeoDataProvider,
6982
- Ar as SourcePrimaryInterest,
7112
+ Ds as SeoDataProvider,
7113
+ Dr as SourcePrimaryInterest,
6983
7114
  ot as StockCount,
6984
- ts as TemplateProductCategoryDataProvider,
6985
- Wt as TemplatesListFilters,
7115
+ ss as TemplateProductCategoryDataProvider,
7116
+ Jt as TemplatesListFilters,
6986
7117
  je as TypedInstanceFactory,
6987
7118
  kr as UnitsHelper,
6988
- ls as UnknownClientDataProvider,
7119
+ us as UnknownClientDataProvider,
6989
7120
  ur as UpdatableNamedIdentity,
6990
- dt as User,
6991
- As as UserAuthDataProvider,
7121
+ xt as User,
7122
+ $s as UserAuthDataProvider,
6992
7123
  wr as UserCommonInfo,
6993
- xt as UserDataProvider,
7124
+ _t as UserDataProvider,
6994
7125
  pt as UserPricingRole,
6995
7126
  L as UserShortInfo,
6996
- Lt as UserTypeEnum,
6997
- us as VersionConfig,
7127
+ dt as UserTypeEnum,
7128
+ ps as VersionConfig,
6998
7129
  me as Warehouse,
6999
7130
  et as WebSocketConfig,
7000
7131
  Ze as findCatalogItemByIdRecursive,
7001
7132
  er as flattenCatalogItems,
7002
- gs as pluralize,
7133
+ ms as pluralize,
7003
7134
  Se as useAuthStateStore,
7004
- I as useBaseConfigStateStore,
7005
- fs as useReferencesStore,
7006
- $s as useUserStateStore
7135
+ k as useBaseConfigStateStore,
7136
+ ws as useReferencesStore,
7137
+ Ts as useUserStateStore
7007
7138
  };