@snabcentr/common-lib 1.72.2 → 1.72.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,14 +1,14 @@
1
- var Pr = Object.defineProperty;
2
- var Rr = (n, r, e) => r in n ? Pr(n, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[r] = e;
3
- var t = (n, r, e) => Rr(n, typeof r != "symbol" ? r + "" : r, e);
4
- import { jwtDecode as rr } from "jwt-decode";
5
- import { merge as ye, isUndefined as Dr, isNil as D, isEmpty as Y, noop as w, mapValues as tr, isArray as Q, every as Ar, split as $r, toUpper as Tr, constant as br, isString as a, cloneDeep as Sr, toLower as _r, isFunction as qe, map as Pe, forEach as dr, isDate as ke, omitBy as sr, isObject as ir } from "lodash-es";
6
- import { objectToCamel as Ue, objectToSnake as Be } from "ts-case-convert";
7
- import { isAfter as ze, parseISO as C, startOfToday as Le, format as q, addSeconds as Ir, addBusinessDays as kr, endOfTomorrow as Lr, startOfTomorrow as xr, endOfYesterday as Nr, startOfYesterday as Or, endOfToday as qr, endOfDay as Ur, startOfDay as Gr } from "date-fns";
1
+ var Dr = Object.defineProperty;
2
+ var Ar = (n, r, e) => r in n ? Dr(n, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[r] = e;
3
+ var t = (n, r, e) => Ar(n, typeof r != "symbol" ? r + "" : r, e);
4
+ import { jwtDecode as tr } from "jwt-decode";
5
+ import { merge as ye, isUndefined as Tr, isNil as A, isEmpty as Y, noop as y, mapValues as sr, isArray as Q, every as $r, split as ar, toUpper as br, constant as Sr, isString as w, cloneDeep as Ir, toLower as Lr, isFunction as Ue, map as Re, forEach as xr, isDate as _e, omitBy as ir, isObject as nr } from "lodash-es";
6
+ import { objectToCamel as Fe, objectToSnake as Ee } from "ts-case-convert";
7
+ import { isAfter as ze, parseISO as C, startOfToday as de, format as O, addSeconds as kr, addBusinessDays as _r, endOfTomorrow as dr, startOfTomorrow as Or, endOfYesterday as qr, startOfYesterday as Nr, endOfToday as Ur, endOfDay as Fr, startOfDay as Mr } from "date-fns";
8
8
  import { defineStore as te } from "pinia";
9
- import { ref as y, markRaw as Fr, computed as P } from "vue";
10
- import jr from "axios";
11
- class G {
9
+ import { ref as f, markRaw as jr, computed as R } from "vue";
10
+ import Gr from "axios";
11
+ class N {
12
12
  /**
13
13
  * Инициализирует экземпляр класса {@link JwtPayload}.
14
14
  *
@@ -107,11 +107,11 @@ class G {
107
107
  * @param jwtToken JWT-ключ доступа.
108
108
  */
109
109
  static getJwtPayload(r) {
110
- const e = rr(r), s = new G(Ue(e));
110
+ const e = tr(r), s = new N(Fe(e));
111
111
  return s.resourceAccess = e.resource_access, s;
112
112
  }
113
113
  }
114
- class Nt extends G {
114
+ class qt extends N {
115
115
  /**
116
116
  * Инициализирует экземпляр класса {@link DetailedJwtPayload}.
117
117
  *
@@ -151,7 +151,7 @@ class Nt extends G {
151
151
  * @param jwtToken JWT-ключ доступа.
152
152
  */
153
153
  static getJwtPayload(e) {
154
- return new G(Ue(rr(e)));
154
+ return new N(Fe(tr(e)));
155
155
  }
156
156
  }
157
157
  const J = class J {
@@ -168,7 +168,7 @@ const J = class J {
168
168
  */
169
169
  // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
170
170
  static getConfig() {
171
- if (Dr(J.config))
171
+ if (Tr(J.config))
172
172
  throw new Error("Config is undefined. Please set config by AppConfigProvider.init().");
173
173
  return J.config;
174
174
  }
@@ -190,7 +190,7 @@ const J = class J {
190
190
  * Конфигурация приложения.
191
191
  */
192
192
  t(J, "config");
193
- let T = J;
193
+ let $ = J;
194
194
  class fe {
195
195
  /**
196
196
  * Возвращает актуальные и не просроченные данные из хранилища.
@@ -210,8 +210,8 @@ class fe {
210
210
  if (e)
211
211
  try {
212
212
  const s = JSON.parse(e);
213
- if (!s.availableFor || ze(C(s.availableFor) || Le(), /* @__PURE__ */ new Date())) {
214
- if (D(s.data) || Y(s.data))
213
+ if (!s.availableFor || ze(C(s.availableFor) || de(), /* @__PURE__ */ new Date())) {
214
+ if (A(s.data) || Y(s.data))
215
215
  throw new Error("Data is empty");
216
216
  return s.data;
217
217
  }
@@ -233,7 +233,7 @@ class fe {
233
233
  static saveActualDataToStorage(r, e, s) {
234
234
  if (this.isLocalStorageAvailable())
235
235
  try {
236
- if (D(e) || Y(e))
236
+ if (A(e) || Y(e))
237
237
  throw new Error("Data is empty");
238
238
  const i = JSON.stringify({
239
239
  availableFor: s,
@@ -284,7 +284,7 @@ class fe {
284
284
  const i = localStorage.getItem(s);
285
285
  if (i) {
286
286
  const o = JSON.parse(i);
287
- o.availableFor && !ze(C(o.availableFor) || Le(), /* @__PURE__ */ new Date()) && r.push(s);
287
+ o.availableFor && !ze(C(o.availableFor) || de(), /* @__PURE__ */ new Date()) && r.push(s);
288
288
  }
289
289
  } catch {
290
290
  r.push(s);
@@ -300,16 +300,16 @@ class fe {
300
300
  }
301
301
  }
302
302
  }
303
- function Ee(n) {
303
+ function We(n) {
304
304
  try {
305
- const r = G.getJwtPayload(n);
305
+ const r = N.getJwtPayload(n);
306
306
  return new Date(r.exp * 1e3);
307
307
  } catch {
308
308
  return;
309
309
  }
310
310
  }
311
- const B = te("__auth_state_private", () => {
312
- const n = y(
311
+ const H = te("__auth_state_private", () => {
312
+ const n = f(
313
313
  (() => {
314
314
  var u;
315
315
  const o = fe.getActualDataFromStorage(
@@ -318,15 +318,15 @@ const B = te("__auth_state_private", () => {
318
318
  );
319
319
  if (o)
320
320
  return Promise.resolve(o);
321
- const c = (u = T.getConfig().devMode) == null ? void 0 : u.initAuthBearerToken;
321
+ const c = (u = $.getConfig().devMode) == null ? void 0 : u.initAuthBearerToken;
322
322
  return c ? Promise.resolve(c) : void 0;
323
323
  })()
324
- ), r = y(void 0), e = y(void 0), s = Fr(/* @__PURE__ */ new Map());
324
+ ), r = f(void 0), e = f(void 0), s = jr(/* @__PURE__ */ new Map());
325
325
  function i() {
326
- e.value = void 0, D(n.value) || n.value.then((o) => {
327
- const c = G.getJwtPayload(o);
328
- e.value = c.exp * 1e3 > Date.now() ? tr(c.resourceAccess, (u) => (u == null ? void 0 : u.roles) ?? []) : void 0;
329
- }).catch(w);
326
+ e.value = void 0, A(n.value) || n.value.then((o) => {
327
+ const c = N.getJwtPayload(o);
328
+ e.value = c.exp * 1e3 > Date.now() ? sr(c.resourceAccess, (u) => (u == null ? void 0 : u.roles) ?? []) : void 0;
329
+ }).catch(y);
330
330
  }
331
331
  return {
332
332
  /**
@@ -350,47 +350,47 @@ const B = te("__auth_state_private", () => {
350
350
  */
351
351
  recalculateUserPermissions: i
352
352
  };
353
- }), Te = te("__auth_state", () => {
354
- const n = P(() => {
355
- const o = B();
356
- if (D(o.jwtToken) && !D(o.jwtTokenUpdater)) {
353
+ }), be = te("__auth_state", () => {
354
+ const n = R(() => {
355
+ const o = H();
356
+ if (A(o.jwtToken) && !A(o.jwtTokenUpdater)) {
357
357
  const c = o.jwtTokenUpdater();
358
358
  o.jwtToken = c, c.then((u) => {
359
- o.jwtToken = Promise.resolve(u), fe.saveActualDataToStorage("sc.token", u, Ee(u)), o.recalculateUserPermissions();
360
- }).catch(w);
359
+ o.jwtToken = Promise.resolve(u), fe.saveActualDataToStorage("sc.token", u, We(u)), o.recalculateUserPermissions();
360
+ }).catch(y);
361
361
  }
362
362
  return o.jwtToken;
363
363
  });
364
364
  function r(o) {
365
- B().jwtTokenUpdater = o;
365
+ H().jwtTokenUpdater = o;
366
366
  }
367
367
  function e(o) {
368
- const c = B();
369
- c.jwtToken = Promise.resolve(o), fe.saveActualDataToStorage("sc.token", o, Ee(o)), c.recalculateUserPermissions();
368
+ const c = H();
369
+ c.jwtToken = Promise.resolve(o), fe.saveActualDataToStorage("sc.token", o, We(o)), c.recalculateUserPermissions();
370
370
  }
371
371
  function s() {
372
- const o = B();
372
+ const o = H();
373
373
  o.jwtToken = void 0, o.userPermissions = void 0, fe.saveActualDataToStorage("sc.token", void 0);
374
374
  }
375
375
  function i(o) {
376
- const c = B();
377
- !D(c.jwtToken) && D(c.userPermissions) && c.jwtToken.then((f) => {
378
- const m = G.getJwtPayload(f);
379
- c.userPermissions = m.exp * 1e3 > Date.now() ? tr(m.resourceAccess, (A) => (A == null ? void 0 : A.roles) ?? []) : void 0;
380
- }).catch(w);
376
+ const c = H();
377
+ !A(c.jwtToken) && A(c.userPermissions) && c.jwtToken.then((v) => {
378
+ const m = N.getJwtPayload(v);
379
+ c.userPermissions = m.exp * 1e3 > Date.now() ? sr(m.resourceAccess, (b) => (b == null ? void 0 : b.roles) ?? []) : void 0;
380
+ }).catch(y);
381
381
  const u = Q(o) ? o.join(" && ") : o;
382
382
  if (c.userPermissionsComputedRefs.has(u))
383
383
  return c.userPermissionsComputedRefs.get(u);
384
- const p = P(() => {
385
- const f = (m) => {
386
- var _;
387
- const A = $r(m, ".");
388
- if (A.length < 2)
384
+ const p = R(() => {
385
+ const v = (m) => {
386
+ var B;
387
+ const b = ar(m, ".");
388
+ if (b.length < 2)
389
389
  return !1;
390
- const [d, I] = A, S = (_ = B().userPermissions) == null ? void 0 : _[d];
391
- return Q(S) && S.includes(I);
390
+ const [_, d] = b, G = (B = H().userPermissions) == null ? void 0 : B[_];
391
+ return Q(G) && G.includes(d);
392
392
  };
393
- return Q(o) ? Ar(o, (m) => f(m)) : f(o);
393
+ return Q(o) ? $r(o, (m) => v(m)) : v(o);
394
394
  });
395
395
  return c.userPermissionsComputedRefs.set(u, p), p;
396
396
  }
@@ -423,7 +423,7 @@ const B = te("__auth_state_private", () => {
423
423
  hasUserPermission: i
424
424
  };
425
425
  });
426
- class H {
426
+ class j {
427
427
  /**
428
428
  * Инициализирует экземпляр класса {@link Identity}.
429
429
  *
@@ -439,16 +439,16 @@ class H {
439
439
  * @inheritDoc
440
440
  */
441
441
  t(this, "guid");
442
- this.id = r == null ? void 0 : r.id, D(this.id) && (D(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) ?? "";
442
+ 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) ?? "";
443
443
  }
444
444
  /**
445
445
  * Возвращает признак, что это новая запись.
446
446
  */
447
447
  isNewRec() {
448
- return typeof this.id == "number" ? this.id === -1 : typeof this.id == "string" ? this.id === "" : D(this.id);
448
+ return typeof this.id == "number" ? this.id === -1 : typeof this.id == "string" ? this.id === "" : A(this.id);
449
449
  }
450
450
  }
451
- class b extends H {
451
+ class a extends j {
452
452
  /**
453
453
  * Инициализирует экземпляр класса {@link NamedIdentity}.
454
454
  *
@@ -463,7 +463,7 @@ class b extends H {
463
463
  this.name = (e == null ? void 0 : e.name) ?? "";
464
464
  }
465
465
  }
466
- class oe extends b {
466
+ class oe extends a {
467
467
  /**
468
468
  * Инициализирует экземпляр класса {@link NamedIdentity}.
469
469
  *
@@ -478,7 +478,7 @@ class oe extends b {
478
478
  this.code = (e == null ? void 0 : e.code) ?? "";
479
479
  }
480
480
  }
481
- class nr extends oe {
481
+ class or extends oe {
482
482
  /**
483
483
  * Инициализирует экземпляр класса {@link CatalogableItem}.
484
484
  *
@@ -497,7 +497,7 @@ class nr extends oe {
497
497
  this.slug = (e == null ? void 0 : e.slug) ?? "";
498
498
  }
499
499
  }
500
- class xe extends nr {
500
+ class Oe extends or {
501
501
  /**
502
502
  * Инициализирует экземпляр класса {@link PrimaryCatalogableItem}.
503
503
  *
@@ -512,7 +512,7 @@ class xe extends nr {
512
512
  this.isPrimary = (e == null ? void 0 : e.isPrimary) ?? !1;
513
513
  }
514
514
  }
515
- class he extends xe {
515
+ class he extends Oe {
516
516
  /**
517
517
  * Инициализирует экземпляр класса {@link BaseCategory}.
518
518
  *
@@ -536,11 +536,11 @@ class he extends xe {
536
536
  * Список коэффициентов пересчёта из валют в рубли в формате ключ значение.
537
537
  */
538
538
  t(this, "currencyRates");
539
- 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]) => [Tr(s), i])) : void 0;
539
+ 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]) => [br(s), i])) : void 0;
540
540
  }
541
541
  }
542
- var or = /* @__PURE__ */ ((n) => (n.K0 = "k0", n.K1 = "k1", n.K2 = "k2", n.K3 = "k3", n.K4 = "k4", n.Retail = "retail", n))(or || {});
543
- class v extends b {
542
+ var cr = /* @__PURE__ */ ((n) => (n.K0 = "k0", n.K1 = "k1", n.K2 = "k2", n.K3 = "k3", n.K4 = "k4", n.Retail = "retail", n))(cr || {});
543
+ class P extends a {
544
544
  /**
545
545
  * Инициализирует экземпляр класса {@link Reference}.
546
546
  *
@@ -559,15 +559,15 @@ class v extends b {
559
559
  this.description = e == null ? void 0 : e.description, this.slug = e == null ? void 0 : e.slug;
560
560
  }
561
561
  }
562
- class Re extends v {
562
+ class De extends P {
563
563
  /**
564
564
  * Возвращает значение справочника коэффициента розничной цены.
565
565
  */
566
566
  static getRetailPriceCoefficient() {
567
- return { id: -2, slug: or.Retail, name: "Розн. цена", guid: "", isNewRec: br(!0) };
567
+ return { id: -2, slug: cr.Retail, name: "Розн. цена", guid: "", isNewRec: Sr(!0) };
568
568
  }
569
569
  }
570
- class Ge {
570
+ class Me {
571
571
  /**
572
572
  * Инициализирует экземпляр класса {@link ProductPriceCoefficient}.
573
573
  *
@@ -594,10 +594,10 @@ class Ge {
594
594
  * Признак того, что указанный коэффициент доступен текущему пользователю только для просмотра.
595
595
  */
596
596
  t(this, "readOnly");
597
- 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;
597
+ this.coefficient = new De(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;
598
598
  }
599
599
  }
600
- class cr {
600
+ class lr {
601
601
  /**
602
602
  * Инициализирует экземпляр класса {@link GeoCoordinates}.
603
603
  *
@@ -615,9 +615,9 @@ class cr {
615
615
  this.lat = (r == null ? void 0 : r.lat) ?? 0, this.long = (r == null ? void 0 : r.long) ?? 0;
616
616
  }
617
617
  }
618
- class X extends v {
618
+ class X extends P {
619
619
  }
620
- class De extends v {
620
+ class Ae extends P {
621
621
  /**
622
622
  * Инициализирует экземпляр класса {@link Warehouse}.
623
623
  *
@@ -646,10 +646,10 @@ class De extends v {
646
646
  * Координаты склада.
647
647
  */
648
648
  t(this, "coordinates");
649
- 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 X(i))) ?? [], this.regions = (e == null ? void 0 : e.regions) ?? [], this.coordinates = new cr(e == null ? void 0 : e.coordinates);
649
+ 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 X(i))) ?? [], this.regions = (e == null ? void 0 : e.regions) ?? [], this.coordinates = new lr(e == null ? void 0 : e.coordinates);
650
650
  }
651
651
  }
652
- class Mr {
652
+ class Br {
653
653
  /**
654
654
  * Инициализирует экземпляр класса {@link StockCount}.
655
655
  *
@@ -664,10 +664,10 @@ class Mr {
664
664
  * Количество остатков товара на складе.
665
665
  */
666
666
  t(this, "count");
667
- this.warehouse = new De(r == null ? void 0 : r.warehouse), this.count = (r == null ? void 0 : r.count) ?? 0;
667
+ this.warehouse = new Ae(r == null ? void 0 : r.warehouse), this.count = (r == null ? void 0 : r.count) ?? 0;
668
668
  }
669
669
  }
670
- class Hr extends nr {
670
+ class Hr extends or {
671
671
  /**
672
672
  * Инициализирует экземпляр класса {@link HiddenCatalogableItem}.
673
673
  *
@@ -682,7 +682,7 @@ class Hr extends nr {
682
682
  this.isHidden = (e == null ? void 0 : e.isHidden) ?? !1;
683
683
  }
684
684
  }
685
- class Br {
685
+ class Er {
686
686
  /**
687
687
  * Инициализирует экземпляр класса {@link Image}.
688
688
  *
@@ -705,7 +705,7 @@ class Br {
705
705
  this.image = `${e ?? ""}${r.image}`, this.preview = `${e ?? ""}${r.preview}`, this.isDefault = r.isDefault;
706
706
  }
707
707
  }
708
- class x extends Hr {
708
+ class I extends Hr {
709
709
  /**
710
710
  * Инициализирует экземпляр класса {@link Product}.
711
711
  *
@@ -790,16 +790,16 @@ class x extends Hr {
790
790
  * Список коэффициентов цен на продукт.
791
791
  */
792
792
  t(this, "priceCoefficients");
793
- this.supplierSku = e == null ? void 0 : e.supplierSku, this.unit = (e == null ? void 0 : e.unit) ?? "", this.pack = e == null ? void 0 : e.pack, this.minCount = e == null ? void 0 : e.minCount, this.quantityUnit = e == null ? void 0 : e.quantityUnit, this.currency = (e == null ? void 0 : e.currency) ?? "", this.cost = (e == null ? void 0 : e.cost) ?? 0, this.costRub = (e == null ? void 0 : e.costRub) ?? 0, this.costDate = a(e == null ? void 0 : e.costDate) ? C(e.costDate) : e == null ? void 0 : e.costDate, this.onOrder = (e == null ? void 0 : e.onOrder) ?? !1, this.stockCount = ((i = e == null ? void 0 : e.stockCount) == null ? void 0 : i.map((p) => new Mr(p))) ?? [], this.currencySignature = (e == null ? void 0 : e.currencySignature) ?? "", this.type = "product";
793
+ this.supplierSku = e == null ? void 0 : e.supplierSku, this.unit = (e == null ? void 0 : e.unit) ?? "", this.pack = e == null ? void 0 : e.pack, this.minCount = e == null ? void 0 : e.minCount, this.quantityUnit = e == null ? void 0 : e.quantityUnit, this.currency = (e == null ? void 0 : e.currency) ?? "", this.cost = (e == null ? void 0 : e.cost) ?? 0, this.costRub = (e == null ? void 0 : e.costRub) ?? 0, this.costDate = w(e == null ? void 0 : e.costDate) ? C(e.costDate) : e == null ? void 0 : e.costDate, this.onOrder = (e == null ? void 0 : e.onOrder) ?? !1, this.stockCount = ((i = e == null ? void 0 : e.stockCount) == null ? void 0 : i.map((p) => new Br(p))) ?? [], this.currencySignature = (e == null ? void 0 : e.currencySignature) ?? "", this.type = "product";
794
794
  const s = (e == null ? void 0 : e.category) ?? ((o = e == null ? void 0 : e.categories) == null ? void 0 : o.find((p) => p.isPrimary));
795
- s && (this.category = new xe({ ...s, isPrimary: !0 }), this.categories = [this.category]), e != null && e.categories && (this.categories = e.categories.map((p) => new xe(p))), this.images = ((c = e == null ? void 0 : e.images) == null ? void 0 : c.map((p) => new Br(p, T.getConfig().http.mediaUrl))) ?? [], this.properties = (e == null ? void 0 : e.properties) ?? {}, this.retailCost = e == null ? void 0 : e.retailCost, this.retailCostRub = e == null ? void 0 : e.retailCostRub, this.priceCoefficients = ((u = e == null ? void 0 : e.priceCoefficients) == null ? void 0 : u.map((p) => new Ge(p))) ?? [], e && "codeNumber" in e && !e.code && (this.code = e == null ? void 0 : e.codeNumber);
795
+ s && (this.category = new Oe({ ...s, isPrimary: !0 }), this.categories = [this.category]), e != null && e.categories && (this.categories = e.categories.map((p) => new Oe(p))), this.images = ((c = e == null ? void 0 : e.images) == null ? void 0 : c.map((p) => new Er(p, $.getConfig().http.mediaUrl))) ?? [], this.properties = (e == null ? void 0 : e.properties) ?? {}, this.retailCost = e == null ? void 0 : e.retailCost, this.retailCostRub = e == null ? void 0 : e.retailCostRub, this.priceCoefficients = ((u = e == null ? void 0 : e.priceCoefficients) == null ? void 0 : u.map((p) => new Me(p))) ?? [], e && "codeNumber" in e && !e.code && (this.code = e == null ? void 0 : e.codeNumber);
796
796
  }
797
797
  /**
798
798
  * Возвращает признак, что это измеряемый товар.
799
799
  */
800
800
  getIsMeasurable() {
801
801
  var s;
802
- const e = (s = T.getConfig().catalog) == null ? void 0 : s.products.units;
802
+ const e = (s = $.getConfig().catalog) == null ? void 0 : s.products.units;
803
803
  return [...(e == null ? void 0 : e.linear) ?? ["пог.м.", "м."], ...(e == null ? void 0 : e.square) ?? ["м2"]].includes(this.unit);
804
804
  }
805
805
  /**
@@ -815,7 +815,7 @@ class x extends Hr {
815
815
  return this.retailCostRub ?? this.costRub;
816
816
  }
817
817
  }
818
- class zr extends H {
818
+ class zr extends j {
819
819
  /**
820
820
  * Инициализирует экземпляр класса {@link CartItemBase}.
821
821
  *
@@ -867,10 +867,10 @@ class zr extends H {
867
867
  * Признак того, что позиция является дополнительной продажей.
868
868
  */
869
869
  t(this, "isAdditionalSale");
870
- this.product = new x(e == null ? void 0 : e.product), this.quantity = e.quantity ?? 0, this.marker = e.marker, this.category = e.category ?? new he(), this.height = e.height, this.length = e.length, this.width = e.width, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams && Sr(e.configuratorParams), this.isAdditionalSale = e.isAdditionalSale;
870
+ this.product = new I(e == null ? void 0 : e.product), this.quantity = e.quantity ?? 0, this.marker = e.marker, this.category = e.category ?? new he(), this.height = e.height, this.length = e.length, this.width = e.width, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams && Ir(e.configuratorParams), this.isAdditionalSale = e.isAdditionalSale;
871
871
  }
872
872
  }
873
- class Er extends zr {
873
+ class Wr extends zr {
874
874
  /**
875
875
  * Инициализирует экземпляр класса {@link CartItem}.
876
876
  *
@@ -939,10 +939,10 @@ class me {
939
939
  * Список итоговых сумм по направлениям продаж.
940
940
  */
941
941
  t(this, "directionsSum");
942
- this.items = r.items.map((e) => new Er(e)), this.resultSum = r.resultSum, this.directionsSum = r.directionsSum;
942
+ this.items = r.items.map((e) => new Wr(e)), this.resultSum = r.resultSum, this.directionsSum = r.directionsSum;
943
943
  }
944
944
  }
945
- class Fe {
945
+ class je {
946
946
  /**
947
947
  * Инициализирует экземпляр указанного класса.
948
948
  *
@@ -961,7 +961,7 @@ class Fe {
961
961
  return new r(e);
962
962
  }
963
963
  }
964
- const L = class L {
964
+ const S = class S {
965
965
  /**
966
966
  * Инициализирует экземпляр класса {@link HttpRequester}.
967
967
  */
@@ -973,7 +973,7 @@ const L = class L {
973
973
  /**
974
974
  * Базовый URL путь для выполнения запросов.
975
975
  */
976
- t(this, "baseUrl", `${T.getConfig().http.portalApiUrl}/api`);
976
+ t(this, "baseUrl", `${$.getConfig().http.portalApiUrl}/api`);
977
977
  /**
978
978
  * Обработчик ошибок выполнения запросов текущего экземпляра класса.
979
979
  *
@@ -981,7 +981,7 @@ const L = class L {
981
981
  * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
982
982
  * @param disableNotifications Признак необходимости отключить уведомления об ошибках.
983
983
  */
984
- t(this, "errorResponseHandler", w);
984
+ t(this, "errorResponseHandler", y);
985
985
  /**
986
986
  * Список идентификаторов обработчиков запросов для возможности отключить те или иные обработчики.
987
987
  */
@@ -1000,7 +1000,7 @@ const L = class L {
1000
1000
  // eslint-disable-next-line class-methods-use-this
1001
1001
  t(this, "authRequestInterceptor", async (r) => {
1002
1002
  let e;
1003
- return D(Te().jwtToken) || (e = await Te().jwtToken), e && r.headers.set("Authorization", `Bearer ${e}`), r;
1003
+ return A(be().jwtToken) || (e = await be().jwtToken), e && r.headers.set("Authorization", `Bearer ${e}`), r;
1004
1004
  });
1005
1005
  /**
1006
1006
  * Перехватчик запроса для преобразования данных запроса.
@@ -1008,7 +1008,7 @@ const L = class L {
1008
1008
  * @param request Данные запроса.
1009
1009
  */
1010
1010
  // eslint-disable-next-line class-methods-use-this
1011
- t(this, "dataConverterRequestInterceptor", (r) => (r.method && (r.method === "get" && r.params && (r.params = Be(r.params)), ["put", "patch", "post"].includes(_r(r.method)) && r.data && (r.data = Be(r.data))), r));
1011
+ t(this, "dataConverterRequestInterceptor", (r) => (r.method && (r.method === "get" && r.params && (r.params = Ee(r.params)), ["put", "patch", "post"].includes(Lr(r.method)) && r.data && (r.data = Ee(r.data))), r));
1012
1012
  /**
1013
1013
  * Перехватчик ошибок ответов на запрос.
1014
1014
  *
@@ -1017,7 +1017,7 @@ const L = class L {
1017
1017
  t(this, "authErrorsResponseInterceptors", (r) => {
1018
1018
  var s;
1019
1019
  const e = r.rawError ? (s = r.rawError) == null ? void 0 : s.config : void 0;
1020
- return r.status === 401 ? !e || e.__isRetryRequest ? Promise.reject(r) : (Te().invalidateJwtToken(), e.__isRetryRequest = !0, this.httpClient(e)) : Promise.reject(r);
1020
+ return r.status === 401 ? !e || e.__isRetryRequest ? Promise.reject(r) : (be().invalidateJwtToken(), e.__isRetryRequest = !0, this.httpClient(e)) : Promise.reject(r);
1021
1021
  });
1022
1022
  /**
1023
1023
  * Перехватчик ответа для преобразования данных ответа на запрос.
@@ -1025,11 +1025,11 @@ const L = class L {
1025
1025
  * @param response Данные ответа на запрос.
1026
1026
  */
1027
1027
  // eslint-disable-next-line class-methods-use-this
1028
- t(this, "dataConverterResponseInterceptor", (r) => (r.data && (r.data = Ue(r.data)), r));
1029
- const r = T.getConfig().version;
1030
- this.errorResponseHandler = L.defaultErrorsResponseHandler, this.httpClient = jr.create({
1028
+ t(this, "dataConverterResponseInterceptor", (r) => (r.data && (r.data = Fe(r.data)), r));
1029
+ const r = $.getConfig().version;
1030
+ this.errorResponseHandler = S.defaultErrorsResponseHandler, this.httpClient = Gr.create({
1031
1031
  headers: {
1032
- "APP-VERSION": `${r.name} (${r.version}, ${q(r.date, T.getConfig().dateFormats.uiDate)})`,
1032
+ "APP-VERSION": `${r.name} (${r.version}, ${O(r.date, $.getConfig().dateFormats.uiDate)})`,
1033
1033
  Accept: "application/json",
1034
1034
  "Content-Type": "application/json"
1035
1035
  }
@@ -1038,7 +1038,7 @@ const L = class L {
1038
1038
  (e) => Promise.reject(e)
1039
1039
  ), this.interceptorIds.response.convertHttpErrorResponseInterceptor = this.httpClient.interceptors.response.use(
1040
1040
  (e) => e,
1041
- (e) => L.convertHttpErrorResponse(e)
1041
+ (e) => S.convertHttpErrorResponse(e)
1042
1042
  ), this.interceptorIds.response.authErrorsResponseInterceptor = this.httpClient.interceptors.response.use((e) => e, this.authErrorsResponseInterceptors), this.interceptorIds.response.dataConverterResponseInterceptor = this.httpClient.interceptors.response.use(
1043
1043
  this.dataConverterResponseInterceptor,
1044
1044
  (e) => Promise.reject(e)
@@ -1050,7 +1050,7 @@ const L = class L {
1050
1050
  * @param handler Ссылка на функцию-обработчик ошибок.
1051
1051
  */
1052
1052
  static setDefaultErrorsResponseHandler(r) {
1053
- L.defaultErrorsResponseHandler = r;
1053
+ S.defaultErrorsResponseHandler = r;
1054
1054
  }
1055
1055
  /**
1056
1056
  * Возвращает экземпляр объекта текущего класса.
@@ -1058,7 +1058,7 @@ const L = class L {
1058
1058
  * @param type Тип данных, которыми оперирует метод.
1059
1059
  */
1060
1060
  static getInstance(r) {
1061
- return Object.prototype.hasOwnProperty.call(L.instances, r.name) || (L.instances[r.name] = Fe.simpleInstanceInitializer(r)), L.instances[r.name];
1061
+ return Object.prototype.hasOwnProperty.call(S.instances, r.name) || (S.instances[r.name] = je.simpleInstanceInitializer(r)), S.instances[r.name];
1062
1062
  }
1063
1063
  /**
1064
1064
  * Конвертирует данные ошибки HTTP запроса в более упрощённую и часто используемую форму.
@@ -1067,7 +1067,7 @@ const L = class L {
1067
1067
  */
1068
1068
  static convertHttpErrorResponse(r) {
1069
1069
  var e, s;
1070
- if (!D(r.request) || !D(r.response)) {
1070
+ if (!A(r.request) || !A(r.response)) {
1071
1071
  const i = r == null ? void 0 : r.response;
1072
1072
  return Promise.reject({
1073
1073
  status: (i == null ? void 0 : i.status) ?? 0,
@@ -1156,16 +1156,16 @@ const L = class L {
1156
1156
  * Экземпляр объекта текущего класса.
1157
1157
  */
1158
1158
  // eslint-disable-next-line no-use-before-define
1159
- t(L, "instances", {}), /**
1159
+ t(S, "instances", {}), /**
1160
1160
  * Базовый обработчик ошибок выполнения запросов.
1161
1161
  *
1162
1162
  * @param error Данные об ошибке.
1163
1163
  * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
1164
1164
  * @param disableNotifications Признак необходимости отключить уведомления об ошибках.
1165
1165
  */
1166
- t(L, "defaultErrorsResponseHandler", w);
1167
- let h = L;
1168
- class Ot extends h {
1166
+ t(S, "defaultErrorsResponseHandler", y);
1167
+ let h = S;
1168
+ class Nt extends h {
1169
1169
  /**
1170
1170
  * Возвращает содержимое корзины указанного клиента.
1171
1171
  *
@@ -1279,8 +1279,8 @@ class Ot extends h {
1279
1279
  return this.get(`internal/clients/${r.id}/cart/add-products-from-csv/example`, {}, (e) => new Blob([e.data], { type: "text/csv" }));
1280
1280
  }
1281
1281
  }
1282
- var Wr = /* @__PURE__ */ ((n) => (n.m2Cost = "m2Cost", n.percent = "percent", n.value = "value", n))(Wr || {}), je = /* @__PURE__ */ ((n) => (n.Discount = "discount", n.PriceTemplate = "price_template", n.ClientPrice = "client_price", n.Product = "product", n))(je || {}), Jr = /* @__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))(Jr || {});
1283
- class E extends he {
1282
+ var Jr = /* @__PURE__ */ ((n) => (n.m2Cost = "m2Cost", n.percent = "percent", n.value = "value", n))(Jr || {}), Ge = /* @__PURE__ */ ((n) => (n.Discount = "discount", n.PriceTemplate = "price_template", n.ClientPrice = "client_price", n.Product = "product", n))(Ge || {}), Vr = /* @__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))(Vr || {});
1283
+ class z extends he {
1284
1284
  /**
1285
1285
  * Инициализирует экземпляр класса {@link Category}.
1286
1286
  *
@@ -1297,10 +1297,10 @@ class E extends he {
1297
1297
  * Список продуктов категории.
1298
1298
  */
1299
1299
  t(this, "products");
1300
- this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new E(o)), this.products = (i = e == null ? void 0 : e.products) == null ? void 0 : i.map((o) => new x(o));
1300
+ this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new z(o)), this.products = (i = e == null ? void 0 : e.products) == null ? void 0 : i.map((o) => new I(o));
1301
1301
  }
1302
1302
  }
1303
- class lr extends b {
1303
+ class ur extends a {
1304
1304
  /**
1305
1305
  * Инициализирует экземпляр класса {@link UpdatableNamedIdentity}.
1306
1306
  *
@@ -1312,10 +1312,10 @@ class lr extends b {
1312
1312
  * Дата и время последнего изменения.
1313
1313
  */
1314
1314
  t(this, "updatedAt");
1315
- this.updatedAt = a(e == null ? void 0 : e.updatedAt) ? C(e.updatedAt) : e == null ? void 0 : e.updatedAt;
1315
+ this.updatedAt = w(e == null ? void 0 : e.updatedAt) ? C(e.updatedAt) : e == null ? void 0 : e.updatedAt;
1316
1316
  }
1317
1317
  }
1318
- class Vr extends lr {
1318
+ class Kr extends ur {
1319
1319
  /**
1320
1320
  * Инициализирует экземпляр класса {@link UpdatableNamedIdentity}.
1321
1321
  *
@@ -1327,10 +1327,10 @@ class Vr extends lr {
1327
1327
  * Дата и время последнего удаления.
1328
1328
  */
1329
1329
  t(this, "deletedAt");
1330
- this.deletedAt = a(e == null ? void 0 : e.deletedAt) ? C(e.deletedAt) : e == null ? void 0 : e.deletedAt;
1330
+ this.deletedAt = w(e == null ? void 0 : e.deletedAt) ? C(e.deletedAt) : e == null ? void 0 : e.deletedAt;
1331
1331
  }
1332
1332
  }
1333
- class F extends b {
1333
+ class U extends a {
1334
1334
  /**
1335
1335
  * Инициализирует экземпляр класса {@link UserShortInfo}.
1336
1336
  *
@@ -1345,7 +1345,7 @@ class F extends b {
1345
1345
  this.type = e == null ? void 0 : e.type;
1346
1346
  }
1347
1347
  }
1348
- class Kr extends b {
1348
+ class Qr extends a {
1349
1349
  /**
1350
1350
  * Инициализирует экземпляр класса {@link DiscountShortInfo}.
1351
1351
  *
@@ -1381,10 +1381,10 @@ class Kr extends b {
1381
1381
  * Дата и время удаления.
1382
1382
  */
1383
1383
  t(this, "deletedAt");
1384
- this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.isLowPriceAllowed = (e == null ? void 0 : e.isLowPriceAllowed) ?? !1, this.publishedAt = a(e == null ? void 0 : e.publishedAt) ? C(e.publishedAt) : e == null ? void 0 : e.publishedAt, this.description = (e == null ? void 0 : e.description) ?? void 0, this.percent = (e == null ? void 0 : e.percent) ?? 0, this.owner = new F(e == null ? void 0 : e.owner), this.deletedAt = a(e == null ? void 0 : e.deletedAt) ? C(e.deletedAt) : e == null ? void 0 : e.deletedAt;
1384
+ this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.isLowPriceAllowed = (e == null ? void 0 : e.isLowPriceAllowed) ?? !1, this.publishedAt = w(e == null ? void 0 : e.publishedAt) ? C(e.publishedAt) : e == null ? void 0 : e.publishedAt, this.description = (e == null ? void 0 : e.description) ?? void 0, this.percent = (e == null ? void 0 : e.percent) ?? 0, this.owner = new U(e == null ? void 0 : e.owner), this.deletedAt = w(e == null ? void 0 : e.deletedAt) ? C(e.deletedAt) : e == null ? void 0 : e.deletedAt;
1385
1385
  }
1386
1386
  }
1387
- class W extends lr {
1387
+ class W extends ur {
1388
1388
  /**
1389
1389
  * Инициализирует экземпляр класса {@link PriceTemplate}.
1390
1390
  *
@@ -1400,10 +1400,10 @@ class W extends lr {
1400
1400
  * Дата и время создания шаблона.
1401
1401
  */
1402
1402
  t(this, "createdAt");
1403
- this.description = (e == null ? void 0 : e.description) ?? "", this.createdAt = a(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date();
1403
+ this.description = (e == null ? void 0 : e.description) ?? "", this.createdAt = w(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date();
1404
1404
  }
1405
1405
  }
1406
- class Z extends x {
1406
+ class Z extends I {
1407
1407
  /**
1408
1408
  * Инициализирует экземпляр класса {@link ClientProduct}.
1409
1409
  *
@@ -1439,10 +1439,10 @@ class Z extends x {
1439
1439
  * Признак того, что указанный продукт входит в список избранных продуктов клиента.
1440
1440
  */
1441
1441
  t(this, "isFavorite");
1442
- this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.costSource = (e == null ? void 0 : e.costSource) ?? je.Product, this.discount = e != null && e.discount ? new Kr(e.discount) : void 0, this.priceTemplate = e != null && e.priceTemplate ? new W(e.priceTemplate) : void 0, this.isPreviouslyOrdered = e == null ? void 0 : e.isPreviouslyOrdered, this.isRequired = e == null ? void 0 : e.isRequired, this.isFavorite = e == null ? void 0 : e.isFavorite;
1442
+ this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.costSource = (e == null ? void 0 : e.costSource) ?? Ge.Product, this.discount = e != null && e.discount ? new Qr(e.discount) : void 0, this.priceTemplate = e != null && e.priceTemplate ? new W(e.priceTemplate) : void 0, this.isPreviouslyOrdered = e == null ? void 0 : e.isPreviouslyOrdered, this.isRequired = e == null ? void 0 : e.isRequired, this.isFavorite = e == null ? void 0 : e.isFavorite;
1443
1443
  }
1444
1444
  }
1445
- class Qr {
1445
+ class Yr {
1446
1446
  /**
1447
1447
  * Инициализирует экземпляр класса {@link ContactLinks}.
1448
1448
  *
@@ -1460,9 +1460,9 @@ class Qr {
1460
1460
  this.phone = /^\d+$/.test(r.phone ?? "") ? `+${r.phone}` : r.phone, this.email = r.email;
1461
1461
  }
1462
1462
  }
1463
- class N extends v {
1463
+ class L extends P {
1464
1464
  }
1465
- class ce extends b {
1465
+ class ce extends a {
1466
1466
  /**
1467
1467
  * Инициализирует экземпляр класса {@link ManagerCommon}.
1468
1468
  *
@@ -1471,25 +1471,29 @@ class ce extends b {
1471
1471
  constructor(e) {
1472
1472
  super(e);
1473
1473
  /**
1474
- * Направление продаж.
1474
+ * @inheritDoc
1475
1475
  */
1476
- t(this, "salesDirection", new N());
1476
+ t(this, "salesDirection");
1477
1477
  /**
1478
- * URI путь к фотографии пользователя.
1478
+ * @inheritDoc
1479
1479
  */
1480
1480
  t(this, "photo");
1481
1481
  /**
1482
- * Контакты менеджера
1482
+ * @inheritDoc
1483
1483
  */
1484
1484
  t(this, "contacts");
1485
1485
  /**
1486
- * Признак того, что менеджер является основным для клиента.
1486
+ * @inheritDoc
1487
1487
  */
1488
1488
  t(this, "isDefault");
1489
- e && (this.salesDirection = new N(e.salesDirection), this.photo = e.photo, e.contacts && (this.contacts = new Qr(e.contacts)), e.isDefault !== void 0 && (this.isDefault = e.isDefault));
1489
+ /**
1490
+ * @inheritDoc
1491
+ */
1492
+ t(this, "isRegionalDirector");
1493
+ this.salesDirection = e != null && e.salesDirection ? new L(e.salesDirection) : new L(), this.photo = e == null ? void 0 : e.photo, this.contacts = e != null && e.contacts ? new Yr(e.contacts) : void 0, this.isDefault = (e == null ? void 0 : e.isDefault) ?? !1, this.isRegionalDirector = (e == null ? void 0 : e.isRegionalDirector) ?? !1;
1490
1494
  }
1491
1495
  }
1492
- class Yr extends b {
1496
+ class Xr extends a {
1493
1497
  /**
1494
1498
  * Инициализирует экземпляр класса {@link IUserPricingRole}.
1495
1499
  *
@@ -1512,7 +1516,7 @@ class Yr extends b {
1512
1516
  this.description = e.description, this.canChangeLowCost = e.canChangeLowCost, this.parentRoleId = e.parentRoleId;
1513
1517
  }
1514
1518
  }
1515
- class Ae extends ce {
1519
+ class Te extends ce {
1516
1520
  /**
1517
1521
  * Инициализирует экземпляр класса {@link Manager}.
1518
1522
  *
@@ -1544,10 +1548,10 @@ class Ae extends ce {
1544
1548
  * Данные роли ценообразования менеджера.
1545
1549
  */
1546
1550
  t(this, "pricingRole");
1547
- 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 Yr(e.pricingRole) : void 0;
1551
+ 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 Xr(e.pricingRole) : void 0;
1548
1552
  }
1549
1553
  }
1550
- class Xr extends he {
1554
+ class Zr extends he {
1551
1555
  /**
1552
1556
  * Инициализирует экземпляр класса {@link BaseClientCategory}.
1553
1557
  *
@@ -1575,10 +1579,10 @@ class Xr extends he {
1575
1579
  * Данные о менеджере за которым закреплена категория.
1576
1580
  */
1577
1581
  t(this, "manager");
1578
- 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 Ae(e.manager) : void 0;
1582
+ 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 Te(e.manager) : void 0;
1579
1583
  }
1580
1584
  }
1581
- class we extends Xr {
1585
+ class we extends Zr {
1582
1586
  /**
1583
1587
  * Инициализирует экземпляр класса {@link ClientCategory}.
1584
1588
  *
@@ -1598,7 +1602,7 @@ class we extends Xr {
1598
1602
  this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new we(o)), this.products = (i = e == null ? void 0 : e.products) == null ? void 0 : i.map((o) => new Z(o));
1599
1603
  }
1600
1604
  }
1601
- class ur {
1605
+ class pr {
1602
1606
  /**
1603
1607
  * Инициализирует экземпляр класса {@link PriceTemplateICatalogableItem}.
1604
1608
  *
@@ -1613,10 +1617,10 @@ class ur {
1613
1617
  * Процент, который прибавляется к значению выбранного коэффициента.
1614
1618
  */
1615
1619
  t(this, "increasePercent");
1616
- this.priceCoefficient = (r == null ? void 0 : r.priceCoefficient) && new Re(r.priceCoefficient), this.increasePercent = r == null ? void 0 : r.increasePercent;
1620
+ this.priceCoefficient = (r == null ? void 0 : r.priceCoefficient) && new De(r.priceCoefficient), this.increasePercent = r == null ? void 0 : r.increasePercent;
1617
1621
  }
1618
1622
  }
1619
- class be extends ur {
1623
+ class Se extends pr {
1620
1624
  /**
1621
1625
  * Инициализирует экземпляр класса {@link PriceTemplateProduct}.
1622
1626
  *
@@ -1631,9 +1635,9 @@ class be extends ur {
1631
1635
  this.productCategory = new he(e == null ? void 0 : e.productCategory);
1632
1636
  }
1633
1637
  }
1634
- class ee extends v {
1638
+ class ee extends P {
1635
1639
  }
1636
- class le extends v {
1640
+ class le extends P {
1637
1641
  /**
1638
1642
  * Инициализирует экземпляр класса {@link Region}.
1639
1643
  *
@@ -1648,7 +1652,7 @@ class le extends v {
1648
1652
  e && (this.country = new ee(e.country));
1649
1653
  }
1650
1654
  }
1651
- class Me extends v {
1655
+ class Be extends P {
1652
1656
  /**
1653
1657
  * Инициализирует экземпляр класса {@link CityWithRegionAndCountry}.
1654
1658
  *
@@ -1663,7 +1667,7 @@ class Me extends v {
1663
1667
  e && (this.region = new le(e.region));
1664
1668
  }
1665
1669
  }
1666
- class pr extends b {
1670
+ class hr extends a {
1667
1671
  /**
1668
1672
  * Инициализирует экземпляр класса {@link UserCommonInfo}.
1669
1673
  *
@@ -1699,10 +1703,10 @@ class pr extends b {
1699
1703
  * Признак активности учетной записи пользователя.
1700
1704
  */
1701
1705
  t(this, "isActive");
1702
- 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 N(e.salesDirection) : void 0, this.createdAt = a(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : e == null ? void 0 : e.createdAt, this.lastLoginAt = a(e == null ? void 0 : e.lastLoginAt) ? C(e.lastLoginAt) : e == null ? void 0 : e.lastLoginAt, this.isActive = (e == null ? void 0 : e.isActive) ?? !1;
1706
+ 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 L(e.salesDirection) : void 0, this.createdAt = w(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : e == null ? void 0 : e.createdAt, this.lastLoginAt = w(e == null ? void 0 : e.lastLoginAt) ? C(e.lastLoginAt) : e == null ? void 0 : e.lastLoginAt, this.isActive = (e == null ? void 0 : e.isActive) ?? !1;
1703
1707
  }
1704
1708
  }
1705
- class ge extends pr {
1709
+ class ge extends hr {
1706
1710
  /**
1707
1711
  * Инициализирует экземпляр класса {@link Client}.
1708
1712
  *
@@ -1744,10 +1748,10 @@ class ge extends pr {
1744
1748
  * Список менеджеров клиента.
1745
1749
  */
1746
1750
  t(this, "managers");
1747
- this.salesDirection = new N(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 Me(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((i) => new ce(i))) ?? [];
1751
+ this.salesDirection = new L(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 Be(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((i) => new ce(i))) ?? [];
1748
1752
  }
1749
1753
  }
1750
- class se extends H {
1754
+ class se extends j {
1751
1755
  /**
1752
1756
  * Инициализирует новый экземпляр класса.
1753
1757
  *
@@ -1771,10 +1775,10 @@ class se extends H {
1771
1775
  * Данные шаблона прайс-листа.
1772
1776
  */
1773
1777
  t(this, "priceTemplate");
1774
- this.createdAt = a(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.deletedAt = a(e == null ? void 0 : e.deletedAt) ? C(e.deletedAt) : e == null ? void 0 : e.deletedAt, this.client = new ge(e == null ? void 0 : e.client), this.priceTemplate = new W(e == null ? void 0 : e.priceTemplate);
1778
+ this.createdAt = w(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.deletedAt = w(e == null ? void 0 : e.deletedAt) ? C(e.deletedAt) : e == null ? void 0 : e.deletedAt, this.client = new ge(e == null ? void 0 : e.client), this.priceTemplate = new W(e == null ? void 0 : e.priceTemplate);
1775
1779
  }
1776
1780
  }
1777
- class Se extends ur {
1781
+ class Ie extends pr {
1778
1782
  /**
1779
1783
  * Инициализирует экземпляр класса {@link PriceTemplateProduct}.
1780
1784
  *
@@ -1786,12 +1790,12 @@ class Se extends ur {
1786
1790
  * Базовые данные о продукте.
1787
1791
  */
1788
1792
  t(this, "product");
1789
- this.product = new x(e == null ? void 0 : e.product);
1793
+ this.product = new I(e == null ? void 0 : e.product);
1790
1794
  }
1791
1795
  }
1792
- class hr extends v {
1796
+ class gr extends P {
1793
1797
  }
1794
- class ie extends b {
1798
+ class ie extends a {
1795
1799
  /**
1796
1800
  * Инициализирует экземпляр класса {@link Property}.
1797
1801
  *
@@ -1811,10 +1815,10 @@ class ie extends b {
1811
1815
  * Дополнительные метаданные свойства.
1812
1816
  */
1813
1817
  t(this, "metadata");
1814
- this.type = new hr(e == null ? void 0 : e.type), this.description = (e == null ? void 0 : e.description) ?? "", this.metadata = e == null ? void 0 : e.metadata;
1818
+ this.type = new gr(e == null ? void 0 : e.type), this.description = (e == null ? void 0 : e.description) ?? "", this.metadata = e == null ? void 0 : e.metadata;
1815
1819
  }
1816
1820
  }
1817
- class z {
1821
+ class E {
1818
1822
  /**
1819
1823
  * Инициализирует экземпляр класса {@link PropertyValue}.
1820
1824
  *
@@ -1833,7 +1837,7 @@ class z {
1833
1837
  this.property = new ie(r == null ? void 0 : r.property), this.value = (r == null ? void 0 : r.value) ?? "";
1834
1838
  }
1835
1839
  }
1836
- class O {
1840
+ class k {
1837
1841
  /**
1838
1842
  * Инициализирует экземпляр класса {@link DatePeriod}.
1839
1843
  *
@@ -1848,10 +1852,10 @@ class O {
1848
1852
  * Окончание периода.
1849
1853
  */
1850
1854
  t(this, "to");
1851
- this.from = a(r == null ? void 0 : r.from) ? C(r.from) : (r == null ? void 0 : r.from) ?? null, this.to = a(r == null ? void 0 : r.to) ? C(r.to) : (r == null ? void 0 : r.to) ?? null;
1855
+ this.from = w(r == null ? void 0 : r.from) ? C(r.from) : (r == null ? void 0 : r.from) ?? null, this.to = w(r == null ? void 0 : r.to) ? C(r.to) : (r == null ? void 0 : r.to) ?? null;
1852
1856
  }
1853
1857
  }
1854
- class qt {
1858
+ class Ut {
1855
1859
  /**
1856
1860
  * Инициализирует экземпляр класса {@link TemplatesListFilters}.
1857
1861
  *
@@ -1873,12 +1877,12 @@ class qt {
1873
1877
  /**
1874
1878
  * Период создания.
1875
1879
  */
1876
- t(this, "createdAt", new O());
1880
+ t(this, "createdAt", new k());
1877
1881
  /**
1878
1882
  * Период изменения.
1879
1883
  */
1880
- t(this, "updatedAt", new O());
1881
- this.id = r == null ? void 0 : r.id, this.name = r == null ? void 0 : r.name, this.description = r == null ? void 0 : r.description, this.createdAt = new O(r == null ? void 0 : r.createdAt), this.updatedAt = new O(r == null ? void 0 : r.updatedAt);
1884
+ t(this, "updatedAt", new k());
1885
+ this.id = r == null ? void 0 : r.id, this.name = r == null ? void 0 : r.name, this.description = r == null ? void 0 : r.description, this.createdAt = new k(r == null ? void 0 : r.createdAt), this.updatedAt = new k(r == null ? void 0 : r.updatedAt);
1882
1886
  }
1883
1887
  /**
1884
1888
  * Выполняет сброс указанного фильтра в значение по умолчанию.
@@ -1911,11 +1915,11 @@ class qt {
1911
1915
  return Object.keys(this).forEach((c) => {
1912
1916
  const u = this[c];
1913
1917
  // eslint-disable-next-line prettier/prettier
1914
- D(u) || a(u) && u.trim().length === 0 || qe(u.isNewRec) && u.isNewRec() || (r[c] = u);
1918
+ A(u) || w(u) && u.trim().length === 0 || Ue(u.isNewRec) && u.isNewRec() || (r[c] = u);
1915
1919
  }), !((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;
1916
1920
  }
1917
1921
  }
1918
- class ne extends b {
1922
+ class ne extends a {
1919
1923
  /**
1920
1924
  * Инициализирует экземпляр класса {@link PricingRole}.
1921
1925
  *
@@ -1950,7 +1954,7 @@ class ne extends b {
1950
1954
  this.description = e == null ? void 0 : e.description, this.canChangeLowCost = (e == null ? void 0 : e.canChangeLowCost) ?? !1, this.parentRoleId = e == null ? void 0 : e.parentRoleId;
1951
1955
  }
1952
1956
  }
1953
- class We {
1957
+ class Je {
1954
1958
  /**
1955
1959
  * Инициализирует экземпляр класса {@link PricingRoleCategoryRule}.
1956
1960
  *
@@ -1969,10 +1973,10 @@ class We {
1969
1973
  * Минимальный коэффициент цены.
1970
1974
  */
1971
1975
  t(this, "minCoefficient");
1972
- this.role = new ne(r == null ? void 0 : r.role), this.category = new he(r == null ? void 0 : r.category), this.minCoefficient = new Re(r == null ? void 0 : r.minCoefficient);
1976
+ this.role = new ne(r == null ? void 0 : r.role), this.category = new he(r == null ? void 0 : r.category), this.minCoefficient = new De(r == null ? void 0 : r.minCoefficient);
1973
1977
  }
1974
1978
  }
1975
- class Zr {
1979
+ class et {
1976
1980
  /**
1977
1981
  * Инициализирует экземпляр класса {@link DeviceTypeResolutionConfig}.
1978
1982
  *
@@ -1994,7 +1998,7 @@ class Zr {
1994
1998
  this.phone = (r == null ? void 0 : r.phone) ?? 360, this.tablet = (r == null ? void 0 : r.tablet) ?? 600, this.laptop = (r == null ? void 0 : r.laptop) ?? 1024;
1995
1999
  }
1996
2000
  }
1997
- class et {
2001
+ class rt {
1998
2002
  /**
1999
2003
  * Инициализирует экземпляр класса {@link HttpParamsConfig}.
2000
2004
  *
@@ -2016,7 +2020,7 @@ class et {
2016
2020
  this.portalApiUrl = (r == null ? void 0 : r.portalApiUrl) ?? "", this.mediaUrl = (r == null ? void 0 : r.mediaUrl) ?? "", this.responseDataCacheTimeout = (r == null ? void 0 : r.responseDataCacheTimeout) ?? 3 * 60 * 60;
2017
2021
  }
2018
2022
  }
2019
- class rt {
2023
+ class tt {
2020
2024
  /**
2021
2025
  * Инициализирует экземпляр класса {@link SentryConfig}.
2022
2026
  *
@@ -2061,7 +2065,7 @@ class rt {
2061
2065
  }, this.additionalParams = (r == null ? void 0 : r.additionalParams) ?? {};
2062
2066
  }
2063
2067
  }
2064
- class tt {
2068
+ class st {
2065
2069
  /**
2066
2070
  * Инициализирует экземпляр класса {@link VersionConfig}.
2067
2071
  *
@@ -2080,10 +2084,10 @@ class tt {
2080
2084
  * Текущая версия приложения.
2081
2085
  */
2082
2086
  t(this, "version");
2083
- this.date = a(r == null ? void 0 : r.date) ? C(r.date) : (r == null ? void 0 : r.date) ?? /* @__PURE__ */ new Date(), this.name = (r == null ? void 0 : r.name) ?? "", this.version = (r == null ? void 0 : r.version) ?? "0.0.0";
2087
+ this.date = w(r == null ? void 0 : r.date) ? C(r.date) : (r == null ? void 0 : r.date) ?? /* @__PURE__ */ new Date(), this.name = (r == null ? void 0 : r.name) ?? "", this.version = (r == null ? void 0 : r.version) ?? "0.0.0";
2084
2088
  }
2085
2089
  }
2086
- class st {
2090
+ class it {
2087
2091
  /**
2088
2092
  * Инициализирует экземпляр класса {@link WebSocketConfig}.
2089
2093
  *
@@ -2122,7 +2126,7 @@ class st {
2122
2126
  this.broadcaster = r.broadcaster ?? "reverb", this.key = r.key ?? "", this.wsHost = r.wsHost ?? "", this.wsPort = r.wsPort ?? 8080, this.wssPort = r.wssPort ?? 8080, this.forceTLS = r.forceTLS ?? !1, this.enabledTransports = r.enabledTransports ?? ["wss"];
2123
2127
  }
2124
2128
  }
2125
- class Ut {
2129
+ class Ft {
2126
2130
  /**
2127
2131
  * Инициализирует экземпляр класса {@link AppBaseConfig}.
2128
2132
  *
@@ -2166,17 +2170,17 @@ class Ut {
2166
2170
  */
2167
2171
  t(this, "dateFormats");
2168
2172
  var e, s, i;
2169
- this.environment = (r == null ? void 0 : r.environment) ?? "production", this.devMode = (r == null ? void 0 : r.devMode) ?? {}, this.http = new et(r == null ? void 0 : r.http), this.deviceTypeByResolution = new Zr(r == null ? void 0 : r.deviceTypeByResolution), this.sentry = new rt({
2173
+ this.environment = (r == null ? void 0 : r.environment) ?? "production", this.devMode = (r == null ? void 0 : r.devMode) ?? {}, this.http = new rt(r == null ? void 0 : r.http), this.deviceTypeByResolution = new et(r == null ? void 0 : r.deviceTypeByResolution), this.sentry = new tt({
2170
2174
  environment: this.environment,
2171
2175
  ...r == null ? void 0 : r.sentry
2172
- }), this.urls = r == null ? void 0 : r.urls, this.version = new tt(r == null ? void 0 : r.version), this.websocket = r != null && r.websocket ? new st(r.websocket) : void 0, this.dateFormats = {
2176
+ }), this.urls = r == null ? void 0 : r.urls, this.version = new st(r == null ? void 0 : r.version), this.websocket = r != null && r.websocket ? new it(r.websocket) : void 0, this.dateFormats = {
2173
2177
  api: ((e = r == null ? void 0 : r.dateFormats) == null ? void 0 : e.api) ?? "yyyy-MM-dd HH:mm:ss",
2174
2178
  uiDate: ((s = r == null ? void 0 : r.dateFormats) == null ? void 0 : s.uiDate) ?? "dd.MM.yyyy",
2175
2179
  uiDateWithTime: ((i = r == null ? void 0 : r.dateFormats) == null ? void 0 : i.uiDateWithTime) ?? "dd.MM.yyyy HH:mm"
2176
2180
  };
2177
2181
  }
2178
2182
  }
2179
- class Gt extends h {
2183
+ class Mt extends h {
2180
2184
  /**
2181
2185
  * Возвращает данные о результатах поиска категорий и товаров.
2182
2186
  *
@@ -2203,11 +2207,11 @@ class Gt extends h {
2203
2207
  */
2204
2208
  // eslint-disable-next-line class-methods-use-this
2205
2209
  getPriceExportLink(r = "csv", e = !1, s = void 0, i = void 0) {
2206
- let c = `${T.getConfig().http.portalApiUrl}/api/internal/price/export?format=${r}&show_hidden=${e}`;
2210
+ let c = `${$.getConfig().http.portalApiUrl}/api/internal/price/export?format=${r}&show_hidden=${e}`;
2207
2211
  return s && (c += `&category_id=${s}`), i && (c += `&client_id=${i}`), c;
2208
2212
  }
2209
2213
  }
2210
- class Ft extends h {
2214
+ class jt extends h {
2211
2215
  /**
2212
2216
  * Импортирует цены клиента из CSV файла.
2213
2217
  *
@@ -2406,7 +2410,7 @@ class Ft extends h {
2406
2410
  return this.post(`/internal/clients/${r}/price/commercial-offer/send`, e);
2407
2411
  }
2408
2412
  }
2409
- class jt extends h {
2413
+ class Gt extends h {
2410
2414
  /**
2411
2415
  * Возвращает список шаблонов прайс-листа привязанных к клиенту.
2412
2416
  *
@@ -2441,12 +2445,12 @@ class jt extends h {
2441
2445
  * @see /doc/api/internal#/operations/api_internal_client_price_template_attach
2442
2446
  */
2443
2447
  attachTemplate(r, e, s) {
2444
- const i = T.getConfig().dateFormats.api;
2448
+ const i = $.getConfig().dateFormats.api;
2445
2449
  return this.post(
2446
2450
  `/internal/clients/${r}/price/templates/${e}`,
2447
2451
  s && {
2448
- startAt: s.startAt && q(s.startAt, i),
2449
- endAt: s.endAt && q(s.endAt, i)
2452
+ startAt: s.startAt && O(s.startAt, i),
2453
+ endAt: s.endAt && O(s.endAt, i)
2450
2454
  },
2451
2455
  (o) => new se(o.data),
2452
2456
  {},
@@ -2475,12 +2479,12 @@ class jt extends h {
2475
2479
  * @see /doc/api/internal#/operations/api_internal_client_price_template_change
2476
2480
  */
2477
2481
  changeTemplate(r, e, s, i) {
2478
- const o = T.getConfig().dateFormats.api;
2482
+ const o = $.getConfig().dateFormats.api;
2479
2483
  return this.patch(
2480
2484
  `/internal/clients/${r}/price/templates/${e}/${s}`,
2481
2485
  i && {
2482
- startAt: i.startAt && q(i.startAt, o),
2483
- endAt: i.endAt && q(i.endAt, o)
2486
+ startAt: i.startAt && O(i.startAt, o),
2487
+ endAt: i.endAt && O(i.endAt, o)
2484
2488
  },
2485
2489
  (c) => new se(c.data)
2486
2490
  );
@@ -2498,7 +2502,7 @@ class jt extends h {
2498
2502
  return this.delete(`/internal/clients/${r}/price/templates/${e}/${s}`);
2499
2503
  }
2500
2504
  }
2501
- class Mt extends h {
2505
+ class Bt extends h {
2502
2506
  /**
2503
2507
  * Возвращает список данных о корневых категориях.
2504
2508
  *
@@ -2512,7 +2516,7 @@ class Mt extends h {
2512
2516
  {
2513
2517
  showHidden: r
2514
2518
  },
2515
- (e) => e.data.map((s) => new E(s))
2519
+ (e) => e.data.map((s) => new z(s))
2516
2520
  );
2517
2521
  }
2518
2522
  /**
@@ -2531,7 +2535,7 @@ class Mt extends h {
2531
2535
  showHidden: e,
2532
2536
  withNestedCategories: s
2533
2537
  },
2534
- (i) => new E(i.data)
2538
+ (i) => new z(i.data)
2535
2539
  );
2536
2540
  }
2537
2541
  /**
@@ -2540,7 +2544,7 @@ class Mt extends h {
2540
2544
  * @param categoryID Идентификатор категории продуктов.
2541
2545
  */
2542
2546
  getPublicCategoryData(r) {
2543
- return this.get(`/public/catalog/categories/${r}`, {}, (e) => new E(e.data));
2547
+ return this.get(`/public/catalog/categories/${r}`, {}, (e) => new z(e.data));
2544
2548
  }
2545
2549
  /**
2546
2550
  * Возвращает список продуктов категории.
@@ -2558,7 +2562,7 @@ class Mt extends h {
2558
2562
  showHidden: s,
2559
2563
  withPriceCoefficients: e
2560
2564
  },
2561
- (i) => Pe(i.data, (o) => new x(o))
2565
+ (i) => Re(i.data, (o) => new I(o))
2562
2566
  );
2563
2567
  }
2564
2568
  /**
@@ -2571,7 +2575,7 @@ class Mt extends h {
2571
2575
  getCategoryProductsCoefficients(r) {
2572
2576
  return this.get(`/internal/catalog/categories/${r}/products/coefficients`, {}, (e) => {
2573
2577
  const { data: s } = e;
2574
- return dr(s, (i) => i.map((o) => new Ge(o))), s;
2578
+ return xr(s, (i) => i.map((o) => new Me(o))), s;
2575
2579
  });
2576
2580
  }
2577
2581
  /**
@@ -2583,7 +2587,7 @@ class Mt extends h {
2583
2587
  publicSimpleSearch(r, e = 10) {
2584
2588
  return new Promise((s, i) => {
2585
2589
  this.get(`/public/catalog/search/simple?limit=${e}&term=${r}`).then((o) => {
2586
- s(o.categories.map((c) => new E(c)));
2590
+ s(o.categories.map((c) => new z(c)));
2587
2591
  }).catch((o) => {
2588
2592
  i(o);
2589
2593
  });
@@ -2600,7 +2604,7 @@ class Ht extends h {
2600
2604
  * @see /doc/api/internal#/Каталог/api_internal_catalog_products_get
2601
2605
  */
2602
2606
  getProductData(r, e = !1) {
2603
- return this.get(`/internal/catalog/products/${r}`, { withPriceCoefficients: e }, (s) => new x(s.data));
2607
+ return this.get(`/internal/catalog/products/${r}`, { withPriceCoefficients: e }, (s) => new I(s.data));
2604
2608
  }
2605
2609
  /**
2606
2610
  * Возвращает публичные данные об указанном продукте.
@@ -2608,7 +2612,7 @@ class Ht extends h {
2608
2612
  * @param productId Идентификатор продукта.
2609
2613
  */
2610
2614
  getPublicProductData(r) {
2611
- return this.get(`/public/catalog/products/${r}`, {}, (e) => new x(e.data));
2615
+ return this.get(`/public/catalog/products/${r}`, {}, (e) => new I(e.data));
2612
2616
  }
2613
2617
  /**
2614
2618
  * Возвращает данные о коэффициентах цен для указанного продукта.
@@ -2621,7 +2625,7 @@ class Ht extends h {
2621
2625
  return this.get(
2622
2626
  `/internal/catalog/products/${r}/coefficients`,
2623
2627
  {},
2624
- (e) => Pe(e.data, (s) => new Ge(s))
2628
+ (e) => Re(e.data, (s) => new Me(s))
2625
2629
  );
2626
2630
  }
2627
2631
  /**
@@ -2633,14 +2637,14 @@ class Ht extends h {
2633
2637
  publicSimpleSearch(r, e = 10) {
2634
2638
  return new Promise((s, i) => {
2635
2639
  this.get(`/public/catalog/search/simple?limit=${e}&term=${r}`).then((o) => {
2636
- s(o.products.map((c) => new x(c)));
2640
+ s(o.products.map((c) => new I(c)));
2637
2641
  }).catch((o) => {
2638
2642
  i(o);
2639
2643
  });
2640
2644
  });
2641
2645
  }
2642
2646
  }
2643
- class Bt extends h {
2647
+ class Et extends h {
2644
2648
  /**
2645
2649
  * Возвращает список данных о корневых категориях указанного клиента.
2646
2650
  *
@@ -2698,7 +2702,7 @@ class Bt extends h {
2698
2702
  showHidden: i,
2699
2703
  withPriceCoefficients: s
2700
2704
  },
2701
- (o) => Pe(o.data, (c) => new Z(c))
2705
+ (o) => Re(o.data, (c) => new Z(c))
2702
2706
  );
2703
2707
  }
2704
2708
  }
@@ -2724,7 +2728,7 @@ class zt extends h {
2724
2728
  }
2725
2729
  }
2726
2730
  var He = /* @__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))(He || {});
2727
- class Je {
2731
+ class Ve {
2728
2732
  /**
2729
2733
  * Инициализирует экземпляр класса {@link FilterItem}.
2730
2734
  *
@@ -2755,7 +2759,7 @@ class Je {
2755
2759
  field: this.field,
2756
2760
  op: this.op
2757
2761
  };
2758
- return r.value = ke(this.value) ? q(this.value, T.getConfig().dateFormats.api) : this.value, r;
2762
+ return r.value = _e(this.value) ? O(this.value, $.getConfig().dateFormats.api) : this.value, r;
2759
2763
  }
2760
2764
  }
2761
2765
  class ue {
@@ -2778,7 +2782,7 @@ class ue {
2778
2782
  */
2779
2783
  t(this, "groups");
2780
2784
  var e, s;
2781
- 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 Je(i))) ?? [], this.groups = ((s = r == null ? void 0 : r.groups) == null ? void 0 : s.map((i) => new ue(i))) ?? [];
2785
+ 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 Ve(i))) ?? [], this.groups = ((s = r == null ? void 0 : r.groups) == null ? void 0 : s.map((i) => new ue(i))) ?? [];
2782
2786
  }
2783
2787
  /**
2784
2788
  * Преобразует группу фильтров в примитивное представление для API.
@@ -2788,7 +2792,7 @@ class ue {
2788
2792
  toPrimitive() {
2789
2793
  return {
2790
2794
  groupOp: this.groupOp,
2791
- filters: this.filters.map((r) => r instanceof Je && qe(r.toPrimitive) ? r.toPrimitive() : r),
2795
+ filters: this.filters.map((r) => r instanceof Ve && Ue(r.toPrimitive) ? r.toPrimitive() : r),
2792
2796
  groups: this.groups.map((r) => r instanceof ue ? r.toPrimitive() : r)
2793
2797
  };
2794
2798
  }
@@ -2813,7 +2817,7 @@ class $e extends h {
2813
2817
  return e && (p.filters = JSON.stringify((e instanceof ue ? e : new ue(e)).toPrimitive())), Y(s) || (p.sort = Q(s) ? s : [s]), o && (p = { ...p, ...o }), this.get(r, p, c, u);
2814
2818
  }
2815
2819
  }
2816
- class Et extends $e {
2820
+ class Wt extends $e {
2817
2821
  /**
2818
2822
  * Возвращает список шаблонов прайс-листа.
2819
2823
  *
@@ -2885,7 +2889,7 @@ class Et extends $e {
2885
2889
  return this.get(
2886
2890
  `/internal/price/templates/${r}/products`,
2887
2891
  {},
2888
- (e) => e.data.map((s) => new Se(s))
2892
+ (e) => e.data.map((s) => new Ie(s))
2889
2893
  );
2890
2894
  }
2891
2895
  /**
@@ -2897,7 +2901,7 @@ class Et extends $e {
2897
2901
  * @see /doc/api/internal#/operations/api_internal_catalog_price_template_product_get
2898
2902
  */
2899
2903
  getProductTemplatePrice(r, e) {
2900
- return this.get(`/internal/price/templates/${r}/products/${e}`, {}, (s) => new Se(s.data));
2904
+ return this.get(`/internal/price/templates/${r}/products/${e}`, {}, (s) => new Ie(s.data));
2901
2905
  }
2902
2906
  /**
2903
2907
  * Сохраняет цену на продукт в шаблоне прайс-листа.
@@ -2916,7 +2920,7 @@ class Et extends $e {
2916
2920
  price_coefficient_id: (i = s.coefficient) == null ? void 0 : i.id,
2917
2921
  increase_percent: s.value
2918
2922
  },
2919
- (o) => new Se(o.data)
2923
+ (o) => new Ie(o.data)
2920
2924
  );
2921
2925
  }
2922
2926
  /**
@@ -2941,7 +2945,7 @@ class Et extends $e {
2941
2945
  return this.get(
2942
2946
  `/internal/price/templates/${r}/categories`,
2943
2947
  {},
2944
- (e) => e.data.map((s) => new be(s))
2948
+ (e) => e.data.map((s) => new Se(s))
2945
2949
  );
2946
2950
  }
2947
2951
  /**
@@ -2956,7 +2960,7 @@ class Et extends $e {
2956
2960
  return this.get(
2957
2961
  `/internal/price/templates/${r}/categories/${e}`,
2958
2962
  {},
2959
- (s) => new be(s.data)
2963
+ (s) => new Se(s.data)
2960
2964
  );
2961
2965
  }
2962
2966
  /**
@@ -2982,7 +2986,7 @@ class Et extends $e {
2982
2986
  },
2983
2987
  params: i ? { recursively: !0 } : {}
2984
2988
  },
2985
- (c) => new be(c.data)
2989
+ (c) => new Se(c.data)
2986
2990
  );
2987
2991
  }
2988
2992
  /**
@@ -3017,7 +3021,7 @@ class Et extends $e {
3017
3021
  );
3018
3022
  }
3019
3023
  }
3020
- class Wt extends h {
3024
+ class Jt extends h {
3021
3025
  /**
3022
3026
  * Возвращает список ролей ценообразования.
3023
3027
  *
@@ -3078,7 +3082,7 @@ class Wt extends h {
3078
3082
  return this.get(
3079
3083
  `/internal/price/roles/rules/categories/${r}`,
3080
3084
  {},
3081
- (e) => e.data.map((s) => new We(s))
3085
+ (e) => e.data.map((s) => new Je(s))
3082
3086
  );
3083
3087
  }
3084
3088
  /**
@@ -3093,11 +3097,11 @@ class Wt extends h {
3093
3097
  return this.patch(
3094
3098
  `/internal/price/roles/rules/categories/${r}`,
3095
3099
  e,
3096
- (s) => s.data.map((i) => new We(i))
3100
+ (s) => s.data.map((i) => new Je(i))
3097
3101
  );
3098
3102
  }
3099
3103
  }
3100
- class Jt extends $e {
3104
+ class Vt extends $e {
3101
3105
  /**
3102
3106
  * Возвращает пагинированный список свойств.
3103
3107
  *
@@ -3173,7 +3177,7 @@ class Jt extends $e {
3173
3177
  * @see /doc/api/internal#/operations/api_internal_catalog_product_properties_get_list
3174
3178
  */
3175
3179
  getProductProperties(r) {
3176
- return this.get(`/internal/catalog/products/${r}/properties`, {}, (e) => e.data.map((s) => new z(s)));
3180
+ return this.get(`/internal/catalog/products/${r}/properties`, {}, (e) => e.data.map((s) => new E(s)));
3177
3181
  }
3178
3182
  /**
3179
3183
  * Возвращает значение свойства продукта.
@@ -3183,7 +3187,7 @@ class Jt extends $e {
3183
3187
  * @see /doc/api/internal#/operations/api_internal_catalog_product_properties_get
3184
3188
  */
3185
3189
  getProductProperty(r, e) {
3186
- return this.get(`/internal/catalog/products/${r}/properties/${e}`, {}, (s) => new z(s.data));
3190
+ return this.get(`/internal/catalog/products/${r}/properties/${e}`, {}, (s) => new E(s.data));
3187
3191
  }
3188
3192
  /**
3189
3193
  * Обновляет значение свойства продукта.
@@ -3194,7 +3198,7 @@ class Jt extends $e {
3194
3198
  * @see /doc/api/internal#/operations/api_internal_catalog_product_properties_update
3195
3199
  */
3196
3200
  updateProductProperty(r, e, s) {
3197
- return this.patch(`/internal/catalog/products/${r}/properties/${e}`, { value: s }, (i) => new z(i.data));
3201
+ return this.patch(`/internal/catalog/products/${r}/properties/${e}`, { value: s }, (i) => new E(i.data));
3198
3202
  }
3199
3203
  /**
3200
3204
  * Удаляет значение свойства продукта.
@@ -3319,7 +3323,7 @@ class Jt extends $e {
3319
3323
  * @see /doc/api/internal#/operations/api_internal_catalog_category_properties_get_list
3320
3324
  */
3321
3325
  getCategoryProperties(r) {
3322
- return this.get(`/internal/catalog/categories/${r}/properties`, {}, (e) => e.data.map((s) => new z(s)));
3326
+ return this.get(`/internal/catalog/categories/${r}/properties`, {}, (e) => e.data.map((s) => new E(s)));
3323
3327
  }
3324
3328
  /**
3325
3329
  * Возвращает значение свойства категории.
@@ -3329,7 +3333,7 @@ class Jt extends $e {
3329
3333
  * @see /doc/api/internal#/operations/api_internal_catalog_category_properties_get
3330
3334
  */
3331
3335
  getCategoryProperty(r, e) {
3332
- return this.get(`/internal/catalog/categories/${r}/properties/${e}`, {}, (s) => new z(s.data));
3336
+ return this.get(`/internal/catalog/categories/${r}/properties/${e}`, {}, (s) => new E(s.data));
3333
3337
  }
3334
3338
  /**
3335
3339
  * Обновляет значение свойства категории.
@@ -3340,7 +3344,7 @@ class Jt extends $e {
3340
3344
  * @see /doc/api/internal#/operations/api_internal_catalog_category_properties_update
3341
3345
  */
3342
3346
  updateCategoryProperty(r, e, s) {
3343
- return this.patch(`/internal/catalog/categories/${r}/properties/${e}`, { value: s }, (i) => new z(i.data));
3347
+ return this.patch(`/internal/catalog/categories/${r}/properties/${e}`, { value: s }, (i) => new E(i.data));
3344
3348
  }
3345
3349
  /**
3346
3350
  * Удаляет значение свойства категории.
@@ -3469,7 +3473,7 @@ class Jt extends $e {
3469
3473
  return this.post(`/internal/catalog/categories/${r}/image`, { image: e });
3470
3474
  }
3471
3475
  }
3472
- function Ve(n, r, e) {
3476
+ function Ke(n, r, e) {
3473
3477
  let s;
3474
3478
  return n.some((i) => {
3475
3479
  if (i.type === e && i.id === r)
@@ -3478,37 +3482,37 @@ function Ve(n, r, e) {
3478
3482
  return !1;
3479
3483
  const o = i;
3480
3484
  if (o.products && o.products.length > 0) {
3481
- const c = Ve(o.products, r, e);
3485
+ const c = Ke(o.products, r, e);
3482
3486
  if (c)
3483
3487
  return s = c, !0;
3484
3488
  }
3485
3489
  if (o.categories && o.categories.length > 0) {
3486
- const c = Ve(o.categories, r, e);
3490
+ const c = Ke(o.categories, r, e);
3487
3491
  if (c)
3488
3492
  return s = c, !0;
3489
3493
  }
3490
3494
  return !1;
3491
3495
  }), s;
3492
3496
  }
3493
- function Ke(n) {
3497
+ function Qe(n) {
3494
3498
  const r = [];
3495
3499
  return n.forEach((e) => {
3496
3500
  if (r.push(e), e.type === "category") {
3497
3501
  const s = e;
3498
- s.products && s.products.length > 0 && r.push(...Ke(s.products)), s.categories && s.categories.length > 0 && r.push(...Ke(s.categories));
3502
+ s.products && s.products.length > 0 && r.push(...Qe(s.products)), s.categories && s.categories.length > 0 && r.push(...Qe(s.categories));
3499
3503
  }
3500
3504
  }), r;
3501
3505
  }
3502
- var it = /* @__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))(it || {}), k = /* @__PURE__ */ ((n) => (n.Person = "individual", n.Ic = "entrepreneur", n.UlR = "legal", n.UlNr = "non_resident_legal", n))(k || {});
3503
- class nt extends v {
3506
+ var nt = /* @__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))(nt || {}), q = /* @__PURE__ */ ((n) => (n.Person = "individual", n.Ic = "entrepreneur", n.UlR = "legal", n.UlNr = "non_resident_legal", n))(q || {});
3507
+ class ot extends P {
3504
3508
  }
3505
- class gr extends v {
3509
+ class mr extends P {
3506
3510
  }
3507
- class Vt extends v {
3511
+ class Kt extends P {
3508
3512
  }
3509
- class ot extends v {
3513
+ class ct extends P {
3510
3514
  }
3511
- class ae extends b {
3515
+ class Ce extends a {
3512
3516
  /**
3513
3517
  * Инициализирует экземпляр класса {@link Currency}.
3514
3518
  *
@@ -3527,34 +3531,34 @@ class ae extends b {
3527
3531
  e && (this.signature = e.signature ?? "", this.symbol = e.symbol ?? "");
3528
3532
  }
3529
3533
  }
3530
- class j extends v {
3534
+ class F extends P {
3531
3535
  /**
3532
3536
  * Возвращает сгенерированную запись-описание физического лица.
3533
3537
  */
3534
3538
  static generatePersonItem() {
3535
- return new j({
3539
+ return new F({
3536
3540
  id: 1,
3537
3541
  guid: "",
3538
- slug: k.Person,
3542
+ slug: q.Person,
3539
3543
  name: ""
3540
3544
  });
3541
3545
  }
3542
3546
  }
3543
- class ct extends v {
3547
+ class lt extends P {
3544
3548
  }
3545
- class lt extends v {
3549
+ class ut extends P {
3546
3550
  }
3547
- class re extends v {
3551
+ class re extends P {
3548
3552
  }
3549
- class ut extends v {
3553
+ class pt extends P {
3550
3554
  }
3551
- class pt extends v {
3555
+ class ht extends P {
3552
3556
  }
3553
- class mr extends v {
3557
+ class fr extends P {
3554
3558
  }
3555
- class fr extends v {
3559
+ class yr extends P {
3556
3560
  }
3557
- class Ne extends H {
3561
+ class qe extends j {
3558
3562
  /**
3559
3563
  * Инициализирует экземпляр класса {@link BankAccount}.
3560
3564
  *
@@ -3581,11 +3585,11 @@ class Ne extends H {
3581
3585
  /**
3582
3586
  * Данные о валюте.
3583
3587
  */
3584
- t(this, "currency", new ae());
3585
- e && (this.bankName = e.bankName ?? "", this.bic = e.bic ?? "", this.accountNumber = e.accountNumber ?? "", this.correspondentAccount = e.correspondentAccount ?? "", this.currency = new ae(e.currency));
3588
+ t(this, "currency", new Ce());
3589
+ e && (this.bankName = e.bankName ?? "", this.bic = e.bic ?? "", this.accountNumber = e.accountNumber ?? "", this.correspondentAccount = e.correspondentAccount ?? "", this.currency = new Ce(e.currency));
3586
3590
  }
3587
3591
  }
3588
- class Oe extends b {
3592
+ class Ne extends a {
3589
3593
  /**
3590
3594
  * Инициализирует экземпляр класса {@link Contact}.
3591
3595
  *
@@ -3604,7 +3608,7 @@ class Oe extends b {
3604
3608
  this.email = e == null ? void 0 : e.email, this.phone = /^\d+$/.test((e == null ? void 0 : e.phone) ?? "") ? `+${e == null ? void 0 : e.phone}` : e == null ? void 0 : e.phone;
3605
3609
  }
3606
3610
  }
3607
- class M extends Oe {
3611
+ class M extends Ne {
3608
3612
  /**
3609
3613
  * Инициализирует экземпляр класса {@link ContactPerson}.
3610
3614
  *
@@ -3636,10 +3640,10 @@ class M extends Oe {
3636
3640
  * Дата и время последнего удаления.
3637
3641
  */
3638
3642
  t(this, "deletedAt");
3639
- 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 = a(e == null ? void 0 : e.deletedAt) ? C(e.deletedAt) : e == null ? void 0 : e.deletedAt;
3643
+ 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 = w(e == null ? void 0 : e.deletedAt) ? C(e.deletedAt) : e == null ? void 0 : e.deletedAt;
3640
3644
  }
3641
3645
  }
3642
- class yr extends b {
3646
+ class wr extends a {
3643
3647
  /**
3644
3648
  * Инициализирует экземпляр класса {@link ContragentBase}.
3645
3649
  *
@@ -3655,11 +3659,11 @@ class yr extends b {
3655
3659
  /**
3656
3660
  * Данные об организационно-правовой форме.
3657
3661
  */
3658
- t(this, "opf", j.generatePersonItem());
3662
+ t(this, "opf", F.generatePersonItem());
3659
3663
  /**
3660
3664
  * Направление продаж.
3661
3665
  */
3662
- t(this, "salesDirection", new N());
3666
+ t(this, "salesDirection", new L());
3663
3667
  /**
3664
3668
  * Группа партнеров (направление деятельности).
3665
3669
  */
@@ -3697,7 +3701,7 @@ class yr extends b {
3697
3701
  */
3698
3702
  t(this, "updater");
3699
3703
  if (e) {
3700
- if (this.opf = new j(e.opf), this.salesDirection = new N(e.salesDirection), this.comment = e.comment, this.alternativeName = e.alternativeName, this.createdAt = a(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : e.createdAt, this.creator = e.creator ? new F(e.creator) : void 0, this.updatedAt = a(e == null ? void 0 : e.updatedAt) ? C(e.updatedAt) : e.updatedAt, this.updater = e.updater ? new F(e.updater) : void 0, e.partnerGroup && (this.partnerGroup = new re(e.partnerGroup)), e.manager && (this.manager = new ce(e.manager)), e.contacts) {
3704
+ if (this.opf = new F(e.opf), this.salesDirection = new L(e.salesDirection), this.comment = e.comment, this.alternativeName = e.alternativeName, this.createdAt = w(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : e.createdAt, this.creator = e.creator ? new U(e.creator) : void 0, this.updatedAt = w(e == null ? void 0 : e.updatedAt) ? C(e.updatedAt) : e.updatedAt, this.updater = e.updater ? new U(e.updater) : void 0, e.partnerGroup && (this.partnerGroup = new re(e.partnerGroup)), e.manager && (this.manager = new ce(e.manager)), e.contacts) {
3701
3705
  const s = [];
3702
3706
  e.contacts.forEach((i) => {
3703
3707
  s.push(new M(i));
@@ -3706,13 +3710,13 @@ class yr extends b {
3706
3710
  if (e.bankAccounts) {
3707
3711
  const s = [];
3708
3712
  e.bankAccounts.forEach((i) => {
3709
- s.push(new Ne(i));
3713
+ s.push(new qe(i));
3710
3714
  }), this.bankAccounts = s;
3711
3715
  }
3712
3716
  }
3713
3717
  }
3714
3718
  }
3715
- class ht extends yr {
3719
+ class gt extends wr {
3716
3720
  /**
3717
3721
  * Инициализирует экземпляр класса {@link ContragentPerson}.
3718
3722
  *
@@ -3722,7 +3726,7 @@ class ht extends yr {
3722
3726
  super(r);
3723
3727
  }
3724
3728
  }
3725
- class wr extends yr {
3729
+ class Cr extends wr {
3726
3730
  /**
3727
3731
  * Инициализирует экземпляр класса {@link ContragentIc}.
3728
3732
  *
@@ -3765,7 +3769,7 @@ class wr extends yr {
3765
3769
  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 ?? "");
3766
3770
  }
3767
3771
  }
3768
- class ar extends wr {
3772
+ class vr extends Cr {
3769
3773
  /**
3770
3774
  * Инициализирует экземпляр класса {@link ContragentUlR}.
3771
3775
  *
@@ -3780,7 +3784,7 @@ class ar extends wr {
3780
3784
  e && (this.kpp = e.kpp ?? "");
3781
3785
  }
3782
3786
  }
3783
- class gt extends ar {
3787
+ class mt extends vr {
3784
3788
  /**
3785
3789
  * Инициализирует экземпляр класса {@link ContragentUlNr}.
3786
3790
  *
@@ -3803,7 +3807,7 @@ class gt extends ar {
3803
3807
  e && (this.registrationCountry = new ee(e.registrationCountry), this.registrationNumber = e.registrationNumber ?? "", this.taxNumber = e.taxNumber ?? "");
3804
3808
  }
3805
3809
  }
3806
- class Ce {
3810
+ class ve {
3807
3811
  /**
3808
3812
  * Инициализирует и возвращает экземпляр класса с данными о контрагенте.
3809
3813
  *
@@ -3811,18 +3815,18 @@ class Ce {
3811
3815
  */
3812
3816
  static createInstance(r) {
3813
3817
  switch (r.opf.slug) {
3814
- case k.Ic:
3815
- return new wr(r);
3816
- case k.UlR:
3817
- return new ar(r);
3818
- case k.UlNr:
3819
- return new gt(r);
3818
+ case q.Ic:
3819
+ return new Cr(r);
3820
+ case q.UlR:
3821
+ return new vr(r);
3822
+ case q.UlNr:
3823
+ return new mt(r);
3820
3824
  default:
3821
- return new ht(r);
3825
+ return new gt(r);
3822
3826
  }
3823
3827
  }
3824
3828
  }
3825
- class _e extends H {
3829
+ class Le extends j {
3826
3830
  /**
3827
3831
  * Инициализирует экземпляр класса {@link ContactRelation}.
3828
3832
  *
@@ -3837,7 +3841,7 @@ class _e extends H {
3837
3841
  this.isPrimary = e.isPrimary;
3838
3842
  }
3839
3843
  }
3840
- class mt extends M {
3844
+ class ft extends M {
3841
3845
  /**
3842
3846
  * Инициализирует экземпляр класса {@link ContactPersonRelated}.
3843
3847
  *
@@ -3862,10 +3866,10 @@ class mt extends M {
3862
3866
  */
3863
3867
  addresses: []
3864
3868
  });
3865
- e.relations && (e.relations.addresses && (this.relations.addresses = e.relations.addresses.map((s) => new _e(s))), e.relations.clients && (this.relations.clients = e.relations.clients.map((s) => new _e(s))), e.relations.contragents && (this.relations.contragents = e.relations.contragents.map((s) => new _e(s))));
3869
+ 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))));
3866
3870
  }
3867
3871
  }
3868
- class ve extends Vr {
3872
+ class Pe extends Kr {
3869
3873
  /**
3870
3874
  * Инициализирует экземпляр класса {@link DeliveryAddress}.
3871
3875
  *
@@ -3902,10 +3906,10 @@ class ve extends Vr {
3902
3906
  * Признак того, что указанный адрес является адресом транспортной компании.
3903
3907
  */
3904
3908
  t(this, "isTransportCompanyAddress");
3905
- this.address = (e == null ? void 0 : e.address) ?? "", this.coordinates = new cr(e == null ? void 0 : e.coordinates), this.contacts = ((s = e == null ? void 0 : e.contacts) == null ? void 0 : s.map((i) => new M(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;
3909
+ this.address = (e == null ? void 0 : e.address) ?? "", this.coordinates = new lr(e == null ? void 0 : e.coordinates), this.contacts = ((s = e == null ? void 0 : e.contacts) == null ? void 0 : s.map((i) => new M(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;
3906
3910
  }
3907
3911
  }
3908
- class Qe extends ge {
3912
+ class Ye extends ge {
3909
3913
  /**
3910
3914
  * Инициализирует экземпляр класса {@link Client}.
3911
3915
  *
@@ -3916,53 +3920,57 @@ class Qe extends ge {
3916
3920
  var s, i, o, c;
3917
3921
  super(e);
3918
3922
  /**
3919
- * Список контрагентов клиента.
3923
+ * @inheritDoc
3920
3924
  */
3921
3925
  t(this, "contragents");
3922
3926
  /**
3923
- * Список групп партнеров (направлений деятельности), к которым относится клиент.
3927
+ * @inheritDoc
3924
3928
  */
3925
3929
  t(this, "partnerGroups");
3926
3930
  /**
3927
- * Список контактов клиента.
3931
+ * @inheritDoc
3928
3932
  */
3929
3933
  t(this, "contacts");
3930
3934
  /**
3931
- * Список адресов доставки.
3935
+ * @inheritDoc
3932
3936
  */
3933
3937
  t(this, "deliveryAddresses");
3934
3938
  /**
3935
- * Канал первичного интереса.
3939
+ * @inheritDoc
3936
3940
  */
3937
3941
  t(this, "channelPrimaryInterest");
3938
3942
  /**
3939
- * Источник первичного интереса.
3943
+ * @inheritDoc
3940
3944
  */
3941
3945
  t(this, "sourcePrimaryInterest");
3942
3946
  /**
3943
- * Предпочтительный тип доставки.
3947
+ * @inheritDoc
3944
3948
  */
3945
3949
  t(this, "preferredDeliveryType");
3946
3950
  /**
3947
- * Первичный спрос.
3951
+ * @inheritDoc
3948
3952
  */
3949
3953
  t(this, "primaryDemand");
3950
3954
  /**
3951
- * Признак того, что клиента необходимо исключить из прозвонника.
3955
+ * @inheritDoc
3952
3956
  */
3953
3957
  t(this, "isExcludedFromMsCallsToClients");
3954
3958
  /**
3955
- * Предпочтительный склад для самовывоза.
3959
+ * @inheritDoc
3960
+ */
3961
+ t(this, "reasonExcludedFromMsCallsToClients");
3962
+ /**
3963
+ * @inheritDoc
3956
3964
  */
3957
3965
  t(this, "preferredWarehouse");
3958
3966
  /**
3959
- * Дополнительные данные о клиенте.
3967
+ * @inheritDoc
3960
3968
  */
3961
3969
  t(this, "extraData");
3962
- 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 re(u))) ?? [], this.contacts = ((o = e == null ? void 0 : e.contacts) == null ? void 0 : o.map((u) => new M(u))) ?? [], this.deliveryAddresses = ((c = e == null ? void 0 : e.deliveryAddresses) == null ? void 0 : c.map((u) => new ve(u))) ?? [], this.channelPrimaryInterest = new gr(e == null ? void 0 : e.channelPrimaryInterest), this.sourcePrimaryInterest = new fr(e == null ? void 0 : e.sourcePrimaryInterest), this.preferredDeliveryType = new X(e == null ? void 0 : e.preferredDeliveryType), this.primaryDemand = e == null ? void 0 : e.primaryDemand, this.isExcludedFromMsCallsToClients = (e == null ? void 0 : e.isExcludedFromMsCallsToClients) ?? !1, this.preferredWarehouse = e != null && e.preferredWarehouse ? new De(e.preferredWarehouse) : void 0, this.extraData = (e == null ? void 0 : e.extraData) ?? {};
3970
+ this.contragents = ((s = e == null ? void 0 : e.contragents) == null ? void 0 : s.map((u) => ve.createInstance(u))) ?? [], this.partnerGroups = ((i = e == null ? void 0 : e.partnerGroups) == null ? void 0 : i.map((u) => new re(u))) ?? [], this.contacts = ((o = e == null ? void 0 : e.contacts) == null ? void 0 : o.map((u) => new M(u))) ?? [], this.deliveryAddresses = ((c = e == null ? void 0 : e.deliveryAddresses) == null ? void 0 : c.map((u) => new Pe(u))) ?? [], this.channelPrimaryInterest = new mr(e == null ? void 0 : e.channelPrimaryInterest), this.sourcePrimaryInterest = new yr(e == null ? void 0 : e.sourcePrimaryInterest), this.preferredDeliveryType = new X(e == null ? void 0 : e.preferredDeliveryType), this.primaryDemand = e == null ? void 0 : e.primaryDemand, this.isExcludedFromMsCallsToClients = (e == null ? void 0 : e.isExcludedFromMsCallsToClients) ?? !1, this.reasonExcludedFromMsCallsToClients = e == null ? void 0 : e.reasonExcludedFromMsCallsToClients, this.preferredWarehouse = e != null && e.preferredWarehouse ? new Ae(e.preferredWarehouse) : void 0, this.extraData = (e == null ? void 0 : e.extraData) ?? {};
3963
3971
  }
3964
3972
  }
3965
- class Kt {
3973
+ class Qt {
3966
3974
  /**
3967
3975
  * Инициализирует экземпляр класса {@link ClientsListFilters}.
3968
3976
  *
@@ -4012,11 +4020,11 @@ class Kt {
4012
4020
  /**
4013
4021
  * Период регистрации.
4014
4022
  */
4015
- t(this, "createdAt", new O());
4023
+ t(this, "createdAt", new k());
4016
4024
  /**
4017
4025
  * Период последнего входа.
4018
4026
  */
4019
- t(this, "lastLoginDate", new O());
4027
+ t(this, "lastLoginDate", new k());
4020
4028
  /**
4021
4029
  * Признак того, что в указанный период последнего входа, клиентом был сделан заказ.
4022
4030
  */
@@ -4058,8 +4066,8 @@ class Kt {
4058
4066
  */
4059
4067
  t(this, "lastOrder");
4060
4068
  var e, s, i, o, c, u;
4061
- this.id = r == null ? void 0 : r.id, this.name = r == null ? void 0 : r.name, this.alternativeName = r == null ? void 0 : r.alternativeName, this.searchTerm = r == null ? void 0 : r.searchTerm, this.cities = (e = r == null ? void 0 : r.cities) == null ? void 0 : e.map((p) => new Me(p)), this.region = new le(r == null ? void 0 : r.region), this.country = new ee(r == null ? void 0 : r.country), this.phone = r == null ? void 0 : r.phone, this.email = r == null ? void 0 : r.email, this.isActive = r && Object.prototype.hasOwnProperty.call(r, "isActive") ? r == null ? void 0 : r.isActive : !0, this.createdAt = new O(r == null ? void 0 : r.createdAt), this.lastLoginDate = new O(r == null ? void 0 : r.lastLoginDate), this.lastLoginDateHasOrder = (r == null ? void 0 : r.lastLoginDateHasOrder) ?? void 0, this.managers = r != null && r.managers && r.managers.length > 0 ? r.managers.map((p) => new Ae(p)) : [], this.salesDirections = (s = r == null ? void 0 : r.salesDirections) == null ? void 0 : s.map((p) => new N(p)), this.contragentInn = r == null ? void 0 : r.contragentInn, this.contragentType = new j(r == null ? void 0 : r.contragentType), this.preferredDeliveryType = new X(r == null ? void 0 : r.preferredDeliveryType), this.partnerGroups = (i = r == null ? void 0 : r.partnerGroups) == null ? void 0 : i.map((p) => new re(p)), this.contact = new Oe(r == null ? void 0 : r.contact), this.lastOrder = {
4062
- createdAt: new O((o = r == null ? void 0 : r.lastOrder) == null ? void 0 : o.createdAt),
4069
+ this.id = r == null ? void 0 : r.id, this.name = r == null ? void 0 : r.name, this.alternativeName = r == null ? void 0 : r.alternativeName, this.searchTerm = r == null ? void 0 : r.searchTerm, this.cities = (e = r == null ? void 0 : r.cities) == null ? void 0 : e.map((p) => new Be(p)), this.region = new le(r == null ? void 0 : r.region), this.country = new ee(r == null ? void 0 : r.country), this.phone = r == null ? void 0 : r.phone, this.email = r == null ? void 0 : r.email, this.isActive = r && Object.prototype.hasOwnProperty.call(r, "isActive") ? r == null ? void 0 : r.isActive : !0, this.createdAt = new k(r == null ? void 0 : r.createdAt), this.lastLoginDate = new k(r == null ? void 0 : r.lastLoginDate), this.lastLoginDateHasOrder = (r == null ? void 0 : r.lastLoginDateHasOrder) ?? void 0, this.managers = r != null && r.managers && r.managers.length > 0 ? r.managers.map((p) => new Te(p)) : [], this.salesDirections = (s = r == null ? void 0 : r.salesDirections) == null ? void 0 : s.map((p) => new L(p)), this.contragentInn = r == null ? void 0 : r.contragentInn, this.contragentType = new F(r == null ? void 0 : r.contragentType), this.preferredDeliveryType = new X(r == null ? void 0 : r.preferredDeliveryType), this.partnerGroups = (i = r == null ? void 0 : r.partnerGroups) == null ? void 0 : i.map((p) => new re(p)), this.contact = new Ne(r == null ? void 0 : r.contact), this.lastOrder = {
4070
+ createdAt: new k((o = r == null ? void 0 : r.lastOrder) == null ? void 0 : o.createdAt),
4063
4071
  creator: (c = r == null ? void 0 : r.lastOrder) == null ? void 0 : c.creator,
4064
4072
  isApproved: (u = r == null ? void 0 : r.lastOrder) == null ? void 0 : u.isApproved
4065
4073
  };
@@ -4108,7 +4116,7 @@ class Kt {
4108
4116
  this.salesDirections = [];
4109
4117
  break;
4110
4118
  case "contragentType":
4111
- this.contragentType = new j();
4119
+ this.contragentType = new F();
4112
4120
  break;
4113
4121
  case "preferredDeliveryType":
4114
4122
  this.preferredDeliveryType = new X();
@@ -4117,7 +4125,7 @@ class Kt {
4117
4125
  this.partnerGroups = [];
4118
4126
  break;
4119
4127
  case "contact":
4120
- this.contact = new Oe();
4128
+ this.contact = new Ne();
4121
4129
  break;
4122
4130
  }
4123
4131
  return this;
@@ -4132,11 +4140,11 @@ class Kt {
4132
4140
  return Object.keys(this).forEach((c) => {
4133
4141
  const u = this[c];
4134
4142
  // eslint-disable-next-line prettier/prettier
4135
- D(u) || a(u) && u.trim().length === 0 || qe(u.isNewRec) && u.isNewRec() || (r[c] = u);
4143
+ A(u) || w(u) && u.trim().length === 0 || Ue(u.isNewRec) && u.isNewRec() || (r[c] = u);
4136
4144
  }), !((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.lastLoginDate) != null && i.from) && !((o = r == null ? void 0 : r.lastLoginDate) != null && o.to) && delete r.lastLoginDate, r;
4137
4145
  }
4138
4146
  }
4139
- class Cr extends H {
4147
+ class Pr extends j {
4140
4148
  /**
4141
4149
  * Инициализирует экземпляр класса {@link OrderShortInfo}.
4142
4150
  *
@@ -4156,10 +4164,10 @@ class Cr extends H {
4156
4164
  * Признак того, что заказ подтвержден в 1С.
4157
4165
  */
4158
4166
  t(this, "isApproved1c");
4159
- this.createdAt = a(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.creator = new F(e == null ? void 0 : e.creator), this.isApproved1c = (e == null ? void 0 : e.isApproved1c) ?? !1;
4167
+ this.createdAt = w(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.creator = new U(e == null ? void 0 : e.creator), this.isApproved1c = (e == null ? void 0 : e.isApproved1c) ?? !1;
4160
4168
  }
4161
4169
  }
4162
- class ft extends b {
4170
+ class yt extends a {
4163
4171
  /**
4164
4172
  * Инициализирует экземпляр класса {@link ClientAdditionalData}.
4165
4173
  *
@@ -4192,10 +4200,10 @@ class ft extends b {
4192
4200
  * Список менеджеров.
4193
4201
  */
4194
4202
  t(this, "managers");
4195
- (s = e.contacts) != null && s.length && (this.contacts = e.contacts.map((o) => new M(o))), e.lastOrder && (this.lastOrder = new Cr(e.lastOrder)), (i = e.partnerGroups) != null && i.length && (this.partnerGroups = e.partnerGroups.map((o) => new re(o))), e.preferredDeliveryType && (this.preferredDeliveryType = new X(e.preferredDeliveryType)), e.salesDirection && (this.salesDirection = new N(e.salesDirection)), e.managers && (this.managers = e.managers.map((o) => new ce(o)));
4203
+ (s = e.contacts) != null && s.length && (this.contacts = e.contacts.map((o) => new M(o))), e.lastOrder && (this.lastOrder = new Pr(e.lastOrder)), (i = e.partnerGroups) != null && i.length && (this.partnerGroups = e.partnerGroups.map((o) => new re(o))), e.preferredDeliveryType && (this.preferredDeliveryType = new X(e.preferredDeliveryType)), e.salesDirection && (this.salesDirection = new L(e.salesDirection)), e.managers && (this.managers = e.managers.map((o) => new ce(o)));
4196
4204
  }
4197
4205
  }
4198
- class yt {
4206
+ class wt {
4199
4207
  /**
4200
4208
  * Инициализирует экземпляр класса {@link DataTablePaginationRequestParams}.
4201
4209
  *
@@ -4213,7 +4221,7 @@ class yt {
4213
4221
  this.page = (r == null ? void 0 : r.page) ?? 1, this.pageSize = (r == null ? void 0 : r.pageSize) ?? 50;
4214
4222
  }
4215
4223
  }
4216
- class Qt extends yt {
4224
+ class Yt extends wt {
4217
4225
  /**
4218
4226
  * Инициализирует экземпляр класса {@link DataTablePagination}.
4219
4227
  *
@@ -4244,7 +4252,7 @@ class Qt extends yt {
4244
4252
  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;
4245
4253
  }
4246
4254
  }
4247
- class Yt {
4255
+ class Xt {
4248
4256
  /**
4249
4257
  * Инициализирует экземпляр класса {@link ISortRequestParams}.
4250
4258
  *
@@ -4262,7 +4270,144 @@ class Yt {
4262
4270
  this.field = (r == null ? void 0 : r.field) ?? "", this.direction = (r == null ? void 0 : r.direction) ?? "asc";
4263
4271
  }
4264
4272
  }
4265
- class Xt extends $e {
4273
+ class x extends $e {
4274
+ /**
4275
+ * Преобразует данные о клиенте в данные требуемые для запроса.
4276
+ *
4277
+ * @param client Данные о клиенте.
4278
+ */
4279
+ static transformClientDataToRequest(r) {
4280
+ var s;
4281
+ const e = {
4282
+ name: r.name,
4283
+ alternative_name: r.alternativeName,
4284
+ partner_groups: r.partnerGroups.map((i) => i.id),
4285
+ phone: r.phone,
4286
+ email: r.email,
4287
+ city_id: r.city.id,
4288
+ get_news: r.getNews,
4289
+ channel_primary_interest_id: r.channelPrimaryInterest.id,
4290
+ source_primary_interest_id: r.sourcePrimaryInterest.id,
4291
+ primary_demand: r.primaryDemand,
4292
+ is_excluded_from_ms_calls_to_clients: r.isExcludedFromMsCallsToClients,
4293
+ preferred_warehouse_id: (s = r.preferredWarehouse) == null ? void 0 : s.id
4294
+ };
4295
+ return r.isExcludedFromMsCallsToClients && (e.reason_excluded_from_ms_calls_to_clients = r.reasonExcludedFromMsCallsToClients), e;
4296
+ }
4297
+ /**
4298
+ * Преобразует данные о контрагенте клиента в данные требуемые для запроса.
4299
+ *
4300
+ * @param contragent Данные о контрагенте клиента.
4301
+ */
4302
+ static transformContragentClientDataToRequest(r) {
4303
+ var c, u, p, v, m, b, _, d;
4304
+ let e;
4305
+ const s = r, i = r, o = r;
4306
+ switch (r.opf.slug) {
4307
+ case q.Ic:
4308
+ e = {
4309
+ opf: s.opf.slug,
4310
+ name: s.name,
4311
+ alternative_name: s.alternativeName,
4312
+ partner_group_id: (c = s.partnerGroup) == null ? void 0 : c.id,
4313
+ manager_id: (u = s.manager) == null ? void 0 : u.id,
4314
+ comment: s.comment,
4315
+ inn: s.inn,
4316
+ okpo: s.okpo,
4317
+ director_name: s.directorName,
4318
+ director_position: s.directorPosition,
4319
+ director_acts_on: s.directorActsOn,
4320
+ legal_address: s.legalAddress,
4321
+ postal_address: s.postalAddress,
4322
+ actual_address: s.actualAddress
4323
+ };
4324
+ break;
4325
+ case q.UlR:
4326
+ e = {
4327
+ opf: i.opf.slug,
4328
+ name: i.name,
4329
+ alternative_name: i.alternativeName,
4330
+ partner_group_id: (p = i.partnerGroup) == null ? void 0 : p.id,
4331
+ manager_id: (v = i.manager) == null ? void 0 : v.id,
4332
+ comment: i.comment,
4333
+ inn: i.inn,
4334
+ kpp: i.kpp,
4335
+ okpo: i.okpo,
4336
+ director_name: i.directorName,
4337
+ director_position: i.directorPosition,
4338
+ director_acts_on: i.directorActsOn,
4339
+ legal_address: i.legalAddress,
4340
+ postal_address: i.postalAddress,
4341
+ actual_address: i.actualAddress
4342
+ };
4343
+ break;
4344
+ case q.UlNr:
4345
+ e = {
4346
+ opf: o.opf.slug,
4347
+ name: o.name,
4348
+ alternative_name: o.alternativeName,
4349
+ partner_group_id: (m = o.partnerGroup) == null ? void 0 : m.id,
4350
+ manager_id: (b = o.manager) == null ? void 0 : b.id,
4351
+ comment: o.comment,
4352
+ director_name: o.directorName,
4353
+ director_position: o.directorPosition,
4354
+ director_acts_on: o.directorActsOn,
4355
+ legal_address: o.legalAddress,
4356
+ postal_address: o.postalAddress,
4357
+ actual_address: o.actualAddress,
4358
+ registration_country_id: o.registrationCountry.id,
4359
+ registration_number: o.registrationNumber,
4360
+ tax_number: o.taxNumber || void 0
4361
+ };
4362
+ break;
4363
+ default:
4364
+ e = {
4365
+ opf: r.opf.slug,
4366
+ name: r.name,
4367
+ alternative_name: r.alternativeName,
4368
+ partner_group_id: (_ = r.partnerGroup) == null ? void 0 : _.id,
4369
+ manager_id: (d = r.manager) == null ? void 0 : d.id,
4370
+ comment: r.comment
4371
+ };
4372
+ break;
4373
+ }
4374
+ return e;
4375
+ }
4376
+ /**
4377
+ * Преобразует данные об адресе доставки клиенту в данные требуемые для запроса.
4378
+ *
4379
+ * @param deliveryAddress Данные об адресе доставки клиенту.
4380
+ */
4381
+ static transformClientDeliveryAddressToRequest(r) {
4382
+ var s, i;
4383
+ const e = {
4384
+ address: r.address,
4385
+ is_one_time: r.isOneTime ?? !1,
4386
+ is_transport_company_address: r.isTransportCompanyAddress ?? !1,
4387
+ comment: r.comment ?? ""
4388
+ };
4389
+ return r.coordinates && (e.coordinates = {
4390
+ lat: (s = r.coordinates) == null ? void 0 : s.lat,
4391
+ long: (i = r.coordinates) == null ? void 0 : i.long
4392
+ }), r.operatingHours && (e.operating_hours = {
4393
+ from: r.operatingHours.from,
4394
+ to: r.operatingHours.to
4395
+ }), e;
4396
+ }
4397
+ /**
4398
+ * Преобразует данные о банковских реквизитах контрагента в данные требуемые для запроса.
4399
+ *
4400
+ * @param bankAccount Данные о банковских реквизитах контрагента.
4401
+ */
4402
+ static transformClientContragentBankAccountToRequest(r) {
4403
+ return {
4404
+ bank_name: r.bankName,
4405
+ bic: r.bic,
4406
+ account_number: r.accountNumber,
4407
+ correspondent_account: r.correspondentAccount,
4408
+ currency_id: r.currency.id
4409
+ };
4410
+ }
4266
4411
  /**
4267
4412
  * Возвращает данные об указанном клиенте.
4268
4413
  *
@@ -4270,7 +4415,7 @@ class Xt extends $e {
4270
4415
  * @see /doc/api/internal#/Клиенты/api_internal_client_get_full_info
4271
4416
  */
4272
4417
  getClient(r) {
4273
- return this.get(`/internal/clients/${r}`, {}, (e) => new Qe(e.data));
4418
+ return this.get(`/internal/clients/${r}`, {}, (e) => new Ye(e.data));
4274
4419
  }
4275
4420
  /**
4276
4421
  * Возвращает данные о клиентах, удовлетворяющих указанным параметрам поиска.
@@ -4312,7 +4457,7 @@ class Xt extends $e {
4312
4457
  const s = r.map((i) => i.id);
4313
4458
  return this.post("/internal/clients/additional-data", { clients: s, requested_data_types: e }, (i) => {
4314
4459
  let o = [];
4315
- return (i == null ? void 0 : i.data.length) > 0 && (o = i.data.map((c) => new ft(c))), o;
4460
+ return (i == null ? void 0 : i.data.length) > 0 && (o = i.data.map((c) => new yt(c))), o;
4316
4461
  });
4317
4462
  }
4318
4463
  /**
@@ -4324,70 +4469,42 @@ class Xt extends $e {
4324
4469
  getAllClientContacts(r) {
4325
4470
  return this.get(`/internal/clients/${r}/contacts/all`, {}, (e) => {
4326
4471
  let s = [];
4327
- return (e == null ? void 0 : e.data.length) > 0 && (s = e.data.map((i) => new mt(i))), s;
4472
+ return (e == null ? void 0 : e.data.length) > 0 && (s = e.data.map((i) => new ft(i))), s;
4328
4473
  });
4329
4474
  }
4330
4475
  /**
4331
4476
  * Создаёт нового клиента на основе указанных данных.
4332
4477
  *
4333
4478
  * @param client Данные о клиенте.
4334
- * @param validationFieldResultData Список полей, для которых необходимо
4335
- * установить данные об ошибках валидации
4336
- * в случае ошибок в запросах.
4479
+ * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
4337
4480
  * @see /doc/api/internal#/Клиенты/api_internal_client_create
4338
4481
  */
4339
4482
  createClientCommonData(r, e = {}) {
4340
- var s;
4341
- return this.post(
4342
- "/internal/clients",
4343
- {
4344
- name: r.name,
4345
- alternative_name: r.alternativeName,
4346
- partner_groups: r.partnerGroups.map((i) => i.id),
4347
- phone: r.phone,
4348
- email: r.email,
4349
- city_id: r.city.id,
4350
- get_news: r.getNews,
4351
- channel_primary_interest_id: r.channelPrimaryInterest.id,
4352
- source_primary_interest_id: r.sourcePrimaryInterest.id,
4353
- primary_demand: r.primaryDemand,
4354
- is_excluded_from_ms_calls_to_clients: r.isExcludedFromMsCallsToClients,
4355
- preferred_warehouse_id: (s = r.preferredWarehouse) == null ? void 0 : s.id
4356
- },
4357
- (i) => new Qe(i.data),
4358
- e
4359
- );
4483
+ return this.post("/internal/clients", x.transformClientDataToRequest(r), (s) => new Ye(s.data), e);
4360
4484
  }
4361
4485
  /**
4362
4486
  * Обновляет данные указанного клиента.
4363
4487
  *
4364
4488
  * @param client Данные о клиенте.
4365
- * @param validationFieldResultData Список полей, для которых необходимо
4366
- * установить данные об ошибках валидации
4367
- * в случае ошибок в запросах.
4489
+ * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
4368
4490
  * @see /doc/api/internal#/Клиенты/api_internal_client_change
4369
4491
  */
4370
4492
  updateClientCommonData(r, e = {}) {
4371
- var s;
4372
- return this.patch(
4373
- `/internal/clients/${r.id}`,
4374
- {
4375
- name: r.name,
4376
- alternative_name: r.alternativeName,
4377
- partner_groups: r.partnerGroups.map((i) => i.id),
4378
- phone: r.phone,
4379
- email: r.email,
4380
- city_id: r.city.id,
4381
- get_news: r.getNews,
4382
- channel_primary_interest_id: r.channelPrimaryInterest.id,
4383
- source_primary_interest_id: r.sourcePrimaryInterest.id,
4384
- primary_demand: r.primaryDemand,
4385
- is_excluded_from_ms_calls_to_clients: r.isExcludedFromMsCallsToClients,
4386
- preferred_warehouse_id: (s = r.preferredWarehouse) == null ? void 0 : s.id
4387
- },
4388
- void 0,
4389
- e
4390
- );
4493
+ return this.patch(`/internal/clients/${r.id}`, x.transformClientDataToRequest(r), void 0, e);
4494
+ }
4495
+ /**
4496
+ * Обновляет данные "Не беспокоить" указанного клиента.
4497
+ *
4498
+ * @param client Данные о клиенте.
4499
+ * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
4500
+ * @see /doc/api/internal#/Клиенты/api_internal_client_change
4501
+ */
4502
+ updateClientNotDistribCommonData(r, e = {}) {
4503
+ const s = {
4504
+ get_news: r.getNews,
4505
+ is_excluded_from_ms_calls_to_clients: r.isExcludedFromMsCallsToClients
4506
+ };
4507
+ return r.isExcludedFromMsCallsToClients && (s.reason_excluded_from_ms_calls_to_clients = r.reasonExcludedFromMsCallsToClients), this.patch(`/internal/clients/${r.id}`, s, void 0, e);
4391
4508
  }
4392
4509
  /**
4393
4510
  * Изменяет пароль клиента.
@@ -4395,9 +4512,7 @@ class Xt extends $e {
4395
4512
  * @param clientId Идентификатор клиента которому необходимо поменять пароль.
4396
4513
  * @param password Новый пароль.
4397
4514
  * @param passwordConfirm Пароль-подтверждение.
4398
- * @param validationFieldResultData Список полей, для которых необходимо
4399
- * установить данные об ошибках валидации
4400
- * в случае ошибок в запросах.
4515
+ * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
4401
4516
  * @see /doc/api/internal#/Клиенты/api_internal_client_change
4402
4517
  */
4403
4518
  changeClientPassword(r, e, s, i = {}) {
@@ -4458,87 +4573,14 @@ class Xt extends $e {
4458
4573
  *
4459
4574
  * @param clientId Идентификатор клиента, к которому необходимо привязать контрагента.
4460
4575
  * @param contragent Данные о контрагенте клиента.
4461
- * @param validationFieldResultData Список полей, для которых необходимо
4462
- * установить данные об ошибках валидации
4463
- * в случае ошибок в запросах.
4576
+ * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
4464
4577
  * @see /doc/api/internal#/Контрагенты/api_internal_client_contragent_create
4465
4578
  */
4466
4579
  createContragentClientData(r, e, s = {}) {
4467
- var p, f, m, A, d, I, S, _;
4468
- let i;
4469
- const o = e, c = e, u = e;
4470
- switch (e.opf.slug) {
4471
- case k.Ic:
4472
- i = {
4473
- opf: o.opf.slug,
4474
- name: o.name,
4475
- alternative_name: o.alternativeName,
4476
- partner_group_id: (p = o.partnerGroup) == null ? void 0 : p.id,
4477
- manager_id: (f = o.manager) == null ? void 0 : f.id,
4478
- comment: o.comment,
4479
- inn: o.inn,
4480
- okpo: o.okpo,
4481
- director_name: o.directorName,
4482
- director_position: o.directorPosition,
4483
- director_acts_on: o.directorActsOn,
4484
- legal_address: o.legalAddress,
4485
- postal_address: o.postalAddress,
4486
- actual_address: o.actualAddress
4487
- };
4488
- break;
4489
- case k.UlR:
4490
- i = {
4491
- opf: c.opf.slug,
4492
- name: c.name,
4493
- alternative_name: c.alternativeName,
4494
- partner_group_id: (m = c.partnerGroup) == null ? void 0 : m.id,
4495
- manager_id: (A = c.manager) == null ? void 0 : A.id,
4496
- comment: c.comment,
4497
- inn: c.inn,
4498
- kpp: c.kpp,
4499
- okpo: c.okpo,
4500
- director_name: c.directorName,
4501
- director_position: c.directorPosition,
4502
- director_acts_on: c.directorActsOn,
4503
- legal_address: c.legalAddress,
4504
- postal_address: c.postalAddress,
4505
- actual_address: c.actualAddress
4506
- };
4507
- break;
4508
- case k.UlNr:
4509
- i = {
4510
- opf: u.opf.slug,
4511
- name: u.name,
4512
- alternative_name: u.alternativeName,
4513
- partner_group_id: (d = u.partnerGroup) == null ? void 0 : d.id,
4514
- manager_id: (I = u.manager) == null ? void 0 : I.id,
4515
- comment: u.comment,
4516
- director_name: u.directorName,
4517
- director_position: u.directorPosition,
4518
- director_acts_on: u.directorActsOn,
4519
- legal_address: u.legalAddress,
4520
- postal_address: u.postalAddress,
4521
- actual_address: u.actualAddress,
4522
- registration_country_id: u.registrationCountry.id,
4523
- registration_number: u.registrationNumber,
4524
- tax_number: u.taxNumber || void 0
4525
- };
4526
- break;
4527
- default:
4528
- i = {
4529
- opf: e.opf.slug,
4530
- name: e.name,
4531
- alternative_name: e.alternativeName,
4532
- partner_group_id: (S = e.partnerGroup) == null ? void 0 : S.id,
4533
- manager_id: (_ = e.manager) == null ? void 0 : _.id,
4534
- comment: e.comment
4535
- };
4536
- break;
4537
- }
4538
4580
  return this.post(
4539
4581
  `/internal/clients/${r}/contragents`,
4540
- i,
4541
- (U) => Ce.createInstance(U.data),
4582
+ x.transformContragentClientDataToRequest(e),
4583
+ (i) => ve.createInstance(i.data),
4542
4584
  s
4543
4585
  );
4544
4586
  }
@@ -4547,87 +4589,14 @@ class Xt extends $e {
4547
4589
  *
4548
4590
  * @param clientId Идентификатор клиента, к которому привязан контрагент.
4549
4591
  * @param contragent Данные о контрагенте клиента.
4550
- * @param validationFieldResultData Список полей, для которых необходимо
4551
- * установить данные об ошибках валидации
4552
- * в случае ошибок в запросах.
4592
+ * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
4553
4593
  * @see /doc/api/internal#/Контрагенты/api_internal_client_contragent_update
4554
4594
  */
4555
4595
  updateContragentClientData(r, e, s = {}) {
4556
- var p, f, m, A, d, I, S, _;
4557
- let i;
4558
- const o = e, c = e, u = e;
4559
- switch (e.opf.slug) {
4560
- case k.Ic:
4561
- i = {
4562
- opf: o.opf.slug,
4563
- name: o.name,
4564
- alternative_name: o.alternativeName,
4565
- partner_group_id: (p = o.partnerGroup) == null ? void 0 : p.id,
4566
- manager_id: (f = o.manager) == null ? void 0 : f.id,
4567
- comment: o.comment,
4568
- inn: o.inn,
4569
- okpo: o.okpo,
4570
- director_name: o.directorName,
4571
- director_position: o.directorPosition,
4572
- director_acts_on: o.directorActsOn,
4573
- legal_address: o.legalAddress,
4574
- postal_address: o.postalAddress,
4575
- actual_address: o.actualAddress
4576
- };
4577
- break;
4578
- case k.UlR:
4579
- i = {
4580
- opf: c.opf.slug,
4581
- name: c.name,
4582
- alternative_name: c.alternativeName,
4583
- partner_group_id: (m = c.partnerGroup) == null ? void 0 : m.id,
4584
- manager_id: (A = c.manager) == null ? void 0 : A.id,
4585
- comment: c.comment,
4586
- inn: c.inn,
4587
- kpp: c.kpp,
4588
- okpo: c.okpo,
4589
- director_name: c.directorName,
4590
- director_position: c.directorPosition,
4591
- director_acts_on: c.directorActsOn,
4592
- legal_address: c.legalAddress,
4593
- postal_address: c.postalAddress,
4594
- actual_address: c.actualAddress
4595
- };
4596
- break;
4597
- case k.UlNr:
4598
- i = {
4599
- opf: u.opf.slug,
4600
- name: u.name,
4601
- alternative_name: u.alternativeName,
4602
- partner_group_id: (d = u.partnerGroup) == null ? void 0 : d.id,
4603
- manager_id: (I = u.manager) == null ? void 0 : I.id,
4604
- comment: u.comment,
4605
- director_name: u.directorName,
4606
- director_position: u.directorPosition,
4607
- director_acts_on: u.directorActsOn,
4608
- legal_address: u.legalAddress,
4609
- postal_address: u.postalAddress,
4610
- actual_address: u.actualAddress,
4611
- registration_country_id: u.registrationCountry.id,
4612
- registration_number: u.registrationNumber,
4613
- tax_number: u.taxNumber || void 0
4614
- };
4615
- break;
4616
- default:
4617
- i = {
4618
- opf: e.opf.slug,
4619
- name: e.name,
4620
- alternative_name: e.alternativeName,
4621
- partner_group_id: (S = e.partnerGroup) == null ? void 0 : S.id,
4622
- manager_id: (_ = e.manager) == null ? void 0 : _.id,
4623
- comment: e.comment
4624
- };
4625
- break;
4626
- }
4627
4596
  return this.patch(
4628
4597
  `/internal/clients/${r}/contragents/${e.id}`,
4629
- i,
4630
- (U) => Ce.createInstance(U.data),
4598
+ x.transformContragentClientDataToRequest(e),
4599
+ (i) => ve.createInstance(i.data),
4631
4600
  s
4632
4601
  );
4633
4602
  }
@@ -4646,55 +4615,30 @@ class Xt extends $e {
4646
4615
  *
4647
4616
  * @param clientId Идентификатор клиента, к которому необходимо привязать адрес доставки.
4648
4617
  * @param deliveryAddress Данные об адресе доставки.
4649
- * @param validationFieldResultData Список полей, для которых необходимо
4650
- * установить данные об ошибках валидации
4651
- * в случае ошибок в запросах.
4618
+ * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
4652
4619
  * @see /doc/api/internal#/Адреса доставки/api_internal_client_delivery_address_create
4653
4620
  */
4654
4621
  createClientDeliveryAddress(r, e, s = {}) {
4655
- var o, c;
4656
- const i = {
4657
- address: e.address,
4658
- is_one_time: e.isOneTime ?? !1,
4659
- is_transport_company_address: e.isTransportCompanyAddress ?? !1,
4660
- comment: e.comment ?? ""
4661
- };
4662
- return e.coordinates && (i.coordinates = {
4663
- lat: (o = e.coordinates) == null ? void 0 : o.lat,
4664
- long: (c = e.coordinates) == null ? void 0 : c.long
4665
- }), e.operatingHours && (i.operating_hours = {
4666
- from: e.operatingHours.from,
4667
- to: e.operatingHours.to
4668
- }), this.post(`/internal/clients/${r}/delivery-addresses`, i, (u) => new ve(u.data), s);
4622
+ return this.post(
4623
+ `/internal/clients/${r}/delivery-addresses`,
4624
+ x.transformClientDeliveryAddressToRequest(e),
4625
+ (i) => new Pe(i.data),
4626
+ s
4627
+ );
4669
4628
  }
4670
4629
  /**
4671
4630
  * Обновляет данные об адресе доставки клиента.
4672
4631
  *
4673
4632
  * @param clientId Идентификатор клиента, к которому привязан адрес доставки.
4674
4633
  * @param deliveryAddress Данные об адресе доставки.
4675
- * @param validationFieldResultData Список полей, для которых необходимо
4676
- * установить данные об ошибках валидации
4677
- * в случае ошибок в запросах.
4634
+ * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
4678
4635
  * @see /doc/api/internal#/Адреса доставки/api_internal_client_delivery_address_update
4679
4636
  */
4680
4637
  updateClientDeliveryAddress(r, e, s = {}) {
4681
- var o, c;
4682
- const i = {
4683
- address: e.address,
4684
- is_one_time: e.isOneTime ?? !1,
4685
- is_transport_company_address: e.isTransportCompanyAddress ?? !1,
4686
- comment: e.comment ?? ""
4687
- };
4688
- return e.operatingHours && (i.operating_hours = {
4689
- from: e.operatingHours.from,
4690
- to: e.operatingHours.to
4691
- }), e.coordinates && (i.coordinates = {
4692
- lat: (o = e.coordinates) == null ? void 0 : o.lat,
4693
- long: (c = e.coordinates) == null ? void 0 : c.long
4694
- }), this.patch(
4638
+ return this.patch(
4695
4639
  `/internal/clients/${r}/delivery-addresses/${e.id}`,
4696
- i,
4697
- (u) => new ve(u.data),
4640
+ x.transformClientDeliveryAddressToRequest(e),
4641
+ (i) => new Pe(i.data),
4698
4642
  s
4699
4643
  );
4700
4644
  }
@@ -4712,25 +4656,16 @@ class Xt extends $e {
4712
4656
  * Создаёт новую запись банковских реквизитов контрагента.
4713
4657
  *
4714
4658
  * @param clientId Идентификатор клиента, к которому необходимо привязать банковские реквизиты.
4715
- * @param contragentId Идентификатор контрагента, к которому необходимо
4716
- * привязать банковские реквизиты.
4659
+ * @param contragentId Идентификатор контрагента, к которому необходимо привязать банковские реквизиты.
4717
4660
  * @param bankAccount Данные банковских реквизитов.
4718
- * @param validationFieldResultData Список полей, для которых необходимо
4719
- * установить данные об ошибках валидации
4720
- * в случае ошибок в запросах.
4661
+ * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
4721
4662
  * @see /doc/api/internal#/Банковские реквизиты/api_internal_client_contragent_bank_accounts_create
4722
4663
  */
4723
4664
  createContragentBankAccount(r, e, s, i = {}) {
4724
4665
  return this.post(
4725
4666
  `/internal/clients/${r}/contragents/${e}/bank-accounts`,
4726
- {
4727
- bank_name: s.bankName,
4728
- bic: s.bic,
4729
- account_number: s.accountNumber,
4730
- correspondent_account: s.correspondentAccount,
4731
- currency_id: s.currency.id
4732
- },
4733
- (o) => new Ne(o.data),
4667
+ x.transformClientContragentBankAccountToRequest(s),
4668
+ (o) => new qe(o.data),
4734
4669
  i
4735
4670
  );
4736
4671
  }
@@ -4738,25 +4673,16 @@ class Xt extends $e {
4738
4673
  * Обновляет данные о банковских реквизитах контрагента.
4739
4674
  *
4740
4675
  * @param clientId Идентификатор клиента, к которому необходимо привязать банковские реквизиты.
4741
- * @param contragentId Идентификатор контрагента, к которому необходимо
4742
- * привязать банковские реквизиты.
4676
+ * @param contragentId Идентификатор контрагента, к которому необходимо привязать банковские реквизиты.
4743
4677
  * @param bankAccount Данные банковских реквизитов.
4744
- * @param validationFieldResultData Список полей, для которых необходимо
4745
- * установить данные об ошибках валидации
4746
- * в случае ошибок в запросах.
4678
+ * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
4747
4679
  * @see /doc/api/internal#/Адреса доставки/api_internal_client_delivery_address_update
4748
4680
  */
4749
4681
  updateContragentBankAccount(r, e, s, i = {}) {
4750
4682
  return this.patch(
4751
4683
  `/internal/clients/${r}/contragents/${e}/bank-accounts/${s.id}`,
4752
- {
4753
- bank_name: s.bankName,
4754
- bic: s.bic,
4755
- account_number: s.accountNumber,
4756
- correspondent_account: s.correspondentAccount,
4757
- currency_id: s.currency.id
4758
- },
4759
- (o) => new Ne(o.data),
4684
+ x.transformClientContragentBankAccountToRequest(s),
4685
+ (o) => new qe(o.data),
4760
4686
  i
4761
4687
  );
4762
4688
  }
@@ -4764,8 +4690,7 @@ class Xt extends $e {
4764
4690
  * Удаляет указанные банковские реквизиты контрагента.
4765
4691
  *
4766
4692
  * @param clientId Идентификатор клиента, к которому необходимо привязать банковские реквизиты.
4767
- * @param contragentId Идентификатор контрагента, к которому необходимо
4768
- * привязать банковские реквизиты.
4693
+ * @param contragentId Идентификатор контрагента, к которому необходимо привязать банковские реквизиты.
4769
4694
  * @param bankAccount Данные банковских реквизитов.
4770
4695
  * @see /doc/api/internal#/Банковские реквизиты/api_internal_client_contragent_bank_accounts_delete
4771
4696
  */
@@ -4777,9 +4702,7 @@ class Xt extends $e {
4777
4702
  *
4778
4703
  * @param clientId Идентификатор клиента, к которому привязано контактное лицо.
4779
4704
  * @param contactPerson Данные о контактном лице.
4780
- * @param validationFieldResultData Список полей, для которых необходимо
4781
- * установить данные об ошибках валидации
4782
- * в случае ошибок в запросах.
4705
+ * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
4783
4706
  * @see /doc/api/internal#/Контакты/api_internal_client_contact_create
4784
4707
  */
4785
4708
  createClientContact(r, e, s = {}) {
@@ -4801,9 +4724,7 @@ class Xt extends $e {
4801
4724
  *
4802
4725
  * @param clientId Идентификатор клиента, к которому привязано контактное лицо.
4803
4726
  * @param contactPerson Данные о контактном лице.
4804
- * @param validationFieldResultData Список полей, для которых необходимо
4805
- * установить данные об ошибках валидации
4806
- * в случае ошибок в запросах.
4727
+ * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
4807
4728
  * @see /doc/api/internal#/Контакты/api_internal_client_contact_change
4808
4729
  */
4809
4730
  updateClientContact(r, e, s = {}) {
@@ -4847,9 +4768,7 @@ class Xt extends $e {
4847
4768
  * @param clientId Идентификатор клиента, к которому привязано контактное лицо.
4848
4769
  * @param contragentId Идентификатор контрагента, к которому привязано контактное лицо.
4849
4770
  * @param contactPerson Данные о контактном лице.
4850
- * @param validationFieldResultData Список полей, для которых необходимо
4851
- * установить данные об ошибках валидации
4852
- * в случае ошибок в запросах.
4771
+ * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
4853
4772
  * @see /doc/api/internal#/Контакты/api_internal_client_contact_create
4854
4773
  */
4855
4774
  createContragentContact(r, e, s, i = {}) {
@@ -4896,9 +4815,7 @@ class Xt extends $e {
4896
4815
  * @param clientId Идентификатор клиента, к которому привязано контактное лицо.
4897
4816
  * @param deliveryAddressId Идентификатор контрагента, к которому привязано контактное лицо.
4898
4817
  * @param contactPerson Данные о контактном лице.
4899
- * @param validationFieldResultData Список полей, для которых необходимо
4900
- * установить данные об ошибках валидации
4901
- * в случае ошибок в запросах.
4818
+ * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
4902
4819
  * @see /doc/api/internal#/Контакты/api_internal_client_contact_create
4903
4820
  */
4904
4821
  createDeliveryAddressContact(r, e, s, i = {}) {
@@ -4948,9 +4865,7 @@ class Xt extends $e {
4948
4865
  * @param clientId Идентификатор клиента, к которому привязано контактное лицо.
4949
4866
  * @param contactPerson Данные о контактном лице.
4950
4867
  * @param extraData Дополнительные данные
4951
- * @param validationFieldResultData Список полей, для которых необходимо
4952
- * установить данные об ошибках валидации
4953
- * в случае ошибок в запросах.
4868
+ * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
4954
4869
  */
4955
4870
  createContact(r, e, s, i = {}) {
4956
4871
  var c, u;
@@ -4999,7 +4914,7 @@ const V = class V extends h {
4999
4914
  * Время кэширования данных ответов на запросы (секунд).
5000
4915
  */
5001
4916
  t(this, "responseDataCacheTimeout");
5002
- this.responseDataCacheTimeout = T.getConfig().http.responseDataCacheTimeout;
4917
+ this.responseDataCacheTimeout = $.getConfig().http.responseDataCacheTimeout;
5003
4918
  }
5004
4919
  /**
5005
4920
  * Возвращает кэшированные данные.
@@ -5021,7 +4936,7 @@ const V = class V extends h {
5021
4936
  */
5022
4937
  cacheResponse(e, s) {
5023
4938
  V.responseDataCache.set(e, {
5024
- validTo: Ir(/* @__PURE__ */ new Date(), this.responseDataCacheTimeout),
4939
+ validTo: kr(/* @__PURE__ */ new Date(), this.responseDataCacheTimeout),
5025
4940
  val: s
5026
4941
  });
5027
4942
  }
@@ -5038,8 +4953,8 @@ const V = class V extends h {
5038
4953
  getTypedDataArrayRequester(e, s, i = !1, o = {}) {
5039
4954
  const c = s + (Y(o) ? "" : ` >>> ${JSON.stringify(o)}`), u = i ? V.getCachedResponse(c) : void 0;
5040
4955
  return u ? Promise.resolve(u) : this.get(s, o).then((p) => {
5041
- const f = p.map((m) => Fe.instanceInitializer(e, m));
5042
- return i && f && this.cacheResponse(s, f), f;
4956
+ const v = p.map((m) => je.instanceInitializer(e, m));
4957
+ return i && v && this.cacheResponse(s, v), v;
5043
4958
  });
5044
4959
  }
5045
4960
  };
@@ -5090,7 +5005,7 @@ class es extends h {
5090
5005
  const i = this.get(
5091
5006
  `internal/catalog/categories/${r.id}/configurators/${(o = r.properties) == null ? void 0 : o.configurator}/product`,
5092
5007
  { params: e },
5093
- (c) => new x(c.data)
5008
+ (c) => new I(c.data)
5094
5009
  );
5095
5010
  return i.catch((c) => {
5096
5011
  this.errorResponseHandler(c, s);
@@ -5138,13 +5053,13 @@ class rs {
5138
5053
  * Возвращает диапазон дат по умолчанию.
5139
5054
  */
5140
5055
  static defaultDateRanges() {
5141
- const r = kr(/* @__PURE__ */ new Date(), 1);
5056
+ const r = _r(/* @__PURE__ */ new Date(), 1);
5142
5057
  return {
5143
5058
  // 'Следующий рабочий день' - это значение по-умолчанию
5144
- nextWorkingDay: { label: "Следующий рабочий день", from: Gr(r), to: Ur(r) },
5145
- today: { label: "Сегодня", from: Le(), to: qr() },
5146
- yesterday: { label: "Вчера", from: Or(), to: Nr() },
5147
- tomorrow: { label: "Завтра", from: xr(), to: Lr() }
5059
+ nextWorkingDay: { label: "Следующий рабочий день", from: Mr(r), to: Fr(r) },
5060
+ today: { label: "Сегодня", from: de(), to: Ur() },
5061
+ yesterday: { label: "Вчера", from: Nr(), to: qr() },
5062
+ tomorrow: { label: "Завтра", from: Or(), to: dr() }
5148
5063
  };
5149
5064
  }
5150
5065
  }
@@ -5188,13 +5103,13 @@ const K = class K {
5188
5103
  * Список единиц измерения линейной величины.
5189
5104
  */
5190
5105
  t(K, "linearValues", ["пог.м.", "м.", "м2"]);
5191
- let Ye = K;
5106
+ let Xe = K;
5192
5107
  class ts {
5193
5108
  /**
5194
5109
  * Генерирует и возвращает данные-заглушку неопределённого менеджера.
5195
5110
  */
5196
5111
  static generateUndefinedManagerInstance() {
5197
- return new Ae({ id: 0, name: "- Не назначен -", isActive: !0, guid: "-undefined-" });
5112
+ return new Te({ id: 0, name: "- Не назначен -", isActive: !0, guid: "-undefined-" });
5198
5113
  }
5199
5114
  /**
5200
5115
  * Выполняет проверку, является ли указанная запись записью-заглушкой с данными о неопределённом менеджере.
@@ -5205,7 +5120,7 @@ class ts {
5205
5120
  return r.id === 0 && r.guid === "-undefined-";
5206
5121
  }
5207
5122
  }
5208
- class wt extends pe {
5123
+ class Ct extends pe {
5209
5124
  /**
5210
5125
  * Возвращает {@link Promise} для получения справочника списка менеджеров.
5211
5126
  */
@@ -5213,18 +5128,18 @@ class wt extends pe {
5213
5128
  const r = "/internal/managers", e = pe.getCachedResponse(r);
5214
5129
  if (e)
5215
5130
  return e;
5216
- const i = (await this.get(r)).data.map((o) => Fe.instanceInitializer(Ae, o));
5131
+ const i = (await this.get(r)).data.map((o) => je.instanceInitializer(Te, o));
5217
5132
  return this.cacheResponse(r, i), i;
5218
5133
  }
5219
5134
  }
5220
- class vr extends Cr {
5135
+ class Rr extends Pr {
5221
5136
  /**
5222
5137
  * Инициализирует экземпляр класса {@link OrderInfo}.
5223
5138
  *
5224
5139
  * @param data Данные для первоначальной инициализации.
5225
5140
  */
5226
5141
  constructor(e) {
5227
- var s, i, o, c, u, p, f, m;
5142
+ var s, i, o, c, u, p, v, m;
5228
5143
  super(e);
5229
5144
  /**
5230
5145
  * Краткие данные о клиенте.
@@ -5272,13 +5187,13 @@ class vr extends Cr {
5272
5187
  onlinePaymentLink: (o = e == null ? void 0 : e.payment) == null ? void 0 : o.onlinePaymentLink
5273
5188
  }, this.delivery = {
5274
5189
  type: ((c = e == null ? void 0 : e.delivery) == null ? void 0 : c.type) ?? -1,
5275
- date: a((u = e == null ? void 0 : e.delivery) == null ? void 0 : u.date) ? C(e.delivery.date) : ((p = e == null ? void 0 : e.delivery) == null ? void 0 : p.date) ?? /* @__PURE__ */ new Date(),
5276
- address: (f = e == null ? void 0 : e.delivery) != null && f.address ? new ve(e.delivery.address) : void 0,
5277
- warehouse: (m = e == null ? void 0 : e.delivery) != null && m.warehouse ? new De(e.delivery.warehouse) : void 0
5278
- }, this.attachedUser = new F(e == null ? void 0 : e.attachedUser), this.status = (e == null ? void 0 : e.status) ?? 0, this.salesDirection = new N(e == null ? void 0 : e.salesDirection), this.pendingAt = a(e == null ? void 0 : e.pendingAt) ? C(e.pendingAt) : e == null ? void 0 : e.pendingAt, this.processedAt = a(e == null ? void 0 : e.processedAt) ? C(e.processedAt) : e == null ? void 0 : e.processedAt, this.isOnOrder = (e == null ? void 0 : e.isOnOrder) ?? !1, this.isNotInStock = (e == null ? void 0 : e.isNotInStock) ?? !1;
5190
+ date: w((u = e == null ? void 0 : e.delivery) == null ? void 0 : u.date) ? C(e.delivery.date) : ((p = e == null ? void 0 : e.delivery) == null ? void 0 : p.date) ?? /* @__PURE__ */ new Date(),
5191
+ address: (v = e == null ? void 0 : e.delivery) != null && v.address ? new Pe(e.delivery.address) : void 0,
5192
+ warehouse: (m = e == null ? void 0 : e.delivery) != null && m.warehouse ? new Ae(e.delivery.warehouse) : void 0
5193
+ }, this.attachedUser = new U(e == null ? void 0 : e.attachedUser), this.status = (e == null ? void 0 : e.status) ?? 0, this.salesDirection = new L(e == null ? void 0 : e.salesDirection), this.pendingAt = w(e == null ? void 0 : e.pendingAt) ? C(e.pendingAt) : e == null ? void 0 : e.pendingAt, this.processedAt = w(e == null ? void 0 : e.processedAt) ? C(e.processedAt) : e == null ? void 0 : e.processedAt, this.isOnOrder = (e == null ? void 0 : e.isOnOrder) ?? !1, this.isNotInStock = (e == null ? void 0 : e.isNotInStock) ?? !1;
5279
5194
  }
5280
5195
  }
5281
- class at extends H {
5196
+ class vt extends j {
5282
5197
  /**
5283
5198
  * Инициализирует экземпляр класса {@link OrderProduct}.
5284
5199
  *
@@ -5361,7 +5276,7 @@ class at extends H {
5361
5276
  this.product = new Z(e.product), this.quantity = e.quantity, this.currency = e.currency, this.costOne = e.costOne, this.costOneRub = e.costOneRub, this.cost = e.cost, this.costRub = e.costRub, this.marker = e.marker, this.height = e.height, this.length = e.length, this.width = e.width, this.logicGroupId = e.logicGroupId, this.salesDirection = e.salesDirection, this.specificationImgUrl = e.specificationImgUrl, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams, this.sawing = e.sawing;
5362
5277
  }
5363
5278
  }
5364
- class Ct extends vr {
5279
+ class Pt extends Rr {
5365
5280
  /**
5366
5281
  * Инициализирует экземпляр класса {@link Order}.
5367
5282
  *
@@ -5401,7 +5316,7 @@ class Ct extends vr {
5401
5316
  * Признак, что разрешена передача заказа в работу без оплаты.
5402
5317
  */
5403
5318
  t(this, "isAllowProcessingWithoutPayment");
5404
- this.products = (e.products ?? []).map((s) => new at(s)), 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 v(e.orderSource) : void 0, this.isAllowProcessingWithoutPayment = e.isAllowProcessingWithoutPayment;
5319
+ this.products = (e.products ?? []).map((s) => new vt(s)), this.invoices = e.invoices ?? [], this.comment = e.comment, this.image = e.image, this.contragent = e.contragent ? ve.createInstance(e.contragent) : void 0, this.barcode = e.barcode, this.orderSource = e.orderSource ? new P(e.orderSource) : void 0, this.isAllowProcessingWithoutPayment = e.isAllowProcessingWithoutPayment;
5405
5320
  }
5406
5321
  }
5407
5322
  class ss extends $e {
@@ -5417,7 +5332,7 @@ class ss extends $e {
5417
5332
  getOrders(r, e, s) {
5418
5333
  return this.getPaginated("/internal/orders", r, e ? [e] : void 0, s, {}, (i) => {
5419
5334
  const o = { ...i.data };
5420
- return o.data = o.data.map((c) => new vr(c)), o;
5335
+ return o.data = o.data.map((c) => new Rr(c)), o;
5421
5336
  });
5422
5337
  }
5423
5338
  /**
@@ -5435,10 +5350,10 @@ class ss extends $e {
5435
5350
  * @param orderId Идентификатор заказа для которого необходимо вернуть данные.
5436
5351
  */
5437
5352
  getOrder(r) {
5438
- return this.get(`/internal/orders/${r}`, {}, (e) => new Ct(e.data));
5353
+ return this.get(`/internal/orders/${r}`, {}, (e) => new Pt(e.data));
5439
5354
  }
5440
5355
  }
5441
- class de {
5356
+ class xe {
5442
5357
  /**
5443
5358
  * Инициализирует экземпляр класса {@link PriceAnalyze}.
5444
5359
  *
@@ -5465,12 +5380,12 @@ class de {
5465
5380
  * Источник клиентской цены.
5466
5381
  */
5467
5382
  t(this, "source");
5468
- this.client = new ge(r == null ? void 0 : r.client), this.product = new x(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) ?? je.Product;
5383
+ this.client = new ge(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) ?? Ge.Product;
5469
5384
  }
5470
5385
  }
5471
- const Ie = (n) => {
5386
+ const ke = (n) => {
5472
5387
  var r, e, s, i, o;
5473
- return n ? sr(
5388
+ return n ? ir(
5474
5389
  {
5475
5390
  cities: (r = n.cities) == null ? void 0 : r.map((c) => c.id),
5476
5391
  clients: (e = n.clients) == null ? void 0 : e.map((c) => c.id),
@@ -5479,9 +5394,9 @@ const Ie = (n) => {
5479
5394
  salesDirections: (o = n.salesDirections) == null ? void 0 : o.map((c) => c.id),
5480
5395
  hideNotActive: n.hideNotActive
5481
5396
  },
5482
- (c) => D(c) || (Q(c) || ir(c)) && Y(c)
5397
+ (c) => A(c) || (Q(c) || nr(c)) && Y(c)
5483
5398
  ) : {};
5484
- }, Xe = (n) => {
5399
+ }, Ze = (n) => {
5485
5400
  const r = {};
5486
5401
  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;
5487
5402
  };
@@ -5499,10 +5414,10 @@ class is extends h {
5499
5414
  return this.get(
5500
5415
  `/internal/price/products/${r}/analyze`,
5501
5416
  {
5502
- ...Xe(e),
5503
- filters: Ie(s)
5417
+ ...Ze(e),
5418
+ filters: ke(s)
5504
5419
  },
5505
- (i) => i.data.map((o) => new de(o))
5420
+ (i) => i.data.map((o) => new xe(o))
5506
5421
  );
5507
5422
  }
5508
5423
  /**
@@ -5518,10 +5433,10 @@ class is extends h {
5518
5433
  return this.get(
5519
5434
  `/internal/price/categories/${r}/analyze`,
5520
5435
  {
5521
- ...Xe(e),
5522
- filters: Ie(s)
5436
+ ...Ze(e),
5437
+ filters: ke(s)
5523
5438
  },
5524
- (i) => i.data.map((o) => new de(o))
5439
+ (i) => i.data.map((o) => new xe(o))
5525
5440
  );
5526
5441
  }
5527
5442
  /**
@@ -5540,13 +5455,13 @@ class is extends h {
5540
5455
  `/internal/price/categories/${r}/analyze/square`,
5541
5456
  {
5542
5457
  ...e,
5543
- filters: Ie(s)
5458
+ filters: ke(s)
5544
5459
  },
5545
- (i) => i.data.map((o) => new de(o))
5460
+ (i) => i.data.map((o) => new xe(o))
5546
5461
  );
5547
5462
  }
5548
5463
  }
5549
- class vt {
5464
+ class Rt {
5550
5465
  /**
5551
5466
  * Инициализирует экземпляр класса {@link PriceHistoryItem}.
5552
5467
  *
@@ -5593,10 +5508,10 @@ class vt {
5593
5508
  * @inheritDoc
5594
5509
  */
5595
5510
  t(this, "currency");
5596
- this.cost = r.cost ?? 0, this.isLowCost = r.isLowCost ?? !1, this.isRetail = r.isRetail ?? !1, this.costDate = a(r.costDate) ? C(r.costDate) : r.costDate ?? /* @__PURE__ */ new Date(), this.discountName = r.discountName, this.priceTemplateName = r.priceTemplateName, this.product = r.product ? new oe(r.product) : void 0, this.client = r.client ? new F(r.client) : void 0, this.executor = r.executor ? new F(r.executor) : void 0, this.currency = r.currency ? new ae(r.currency) : void 0;
5511
+ this.cost = r.cost ?? 0, this.isLowCost = r.isLowCost ?? !1, this.isRetail = r.isRetail ?? !1, this.costDate = w(r.costDate) ? C(r.costDate) : r.costDate ?? /* @__PURE__ */ new Date(), this.discountName = r.discountName, this.priceTemplateName = r.priceTemplateName, this.product = r.product ? new oe(r.product) : void 0, this.client = r.client ? new U(r.client) : void 0, this.executor = r.executor ? new U(r.executor) : void 0, this.currency = r.currency ? new Ce(r.currency) : void 0;
5597
5512
  }
5598
5513
  }
5599
- class Pt extends oe {
5514
+ class Dt extends oe {
5600
5515
  /**
5601
5516
  * Инициализирует экземпляр класса {@link ProductPriceHistory}.
5602
5517
  *
@@ -5608,7 +5523,7 @@ class Pt extends oe {
5608
5523
  * @inheritDoc
5609
5524
  */
5610
5525
  t(this, "history");
5611
- this.history = Pe(e.history, (s) => new vt(s));
5526
+ this.history = Re(e.history, (s) => new Rt(s));
5612
5527
  }
5613
5528
  }
5614
5529
  class ns extends h {
@@ -5620,22 +5535,22 @@ class ns extends h {
5620
5535
  * @see /docs/api#/operations/api_internal_price_history_get
5621
5536
  */
5622
5537
  getProductPriceHistory(r) {
5623
- var o, c, u, p, f;
5624
- const e = T.getConfig().dateFormats.api, s = sr(
5538
+ var o, c, u, p, v;
5539
+ const e = $.getConfig().dateFormats.api, s = ir(
5625
5540
  ye(r, {
5626
5541
  costDate: {
5627
- from: ke((o = r.costDate) == null ? void 0 : o.from) ? q(r.costDate.from, e) : (c = r.costDate) == null ? void 0 : c.from,
5628
- to: ke((u = r.costDate) == null ? void 0 : u.to) ? q(r.costDate.to, e) : (p = r.costDate) == null ? void 0 : p.to
5542
+ from: _e((o = r.costDate) == null ? void 0 : o.from) ? O(r.costDate.from, e) : (c = r.costDate) == null ? void 0 : c.from,
5543
+ to: _e((u = r.costDate) == null ? void 0 : u.to) ? O(r.costDate.to, e) : (p = r.costDate) == null ? void 0 : p.to
5629
5544
  }
5630
5545
  }),
5631
- (m) => D(m) || (Q(m) || ir(m)) && Y(m)
5632
- ), i = ((f = r.product) == null ? void 0 : f[0]) ?? 0;
5546
+ (m) => A(m) || (Q(m) || nr(m)) && Y(m)
5547
+ ), i = ((v = r.product) == null ? void 0 : v[0]) ?? 0;
5633
5548
  return delete s.product, this.get(`/internal/price/products/${i}/history`, s).then((m) => [
5634
- new Pt(ye(m[0], { history: m }))
5549
+ new Dt(ye(m[0], { history: m }))
5635
5550
  ]);
5636
5551
  }
5637
5552
  }
5638
- class Ze {
5553
+ class er {
5639
5554
  /**
5640
5555
  * Инициализирует экземпляр класса {@link RecommendationsList}.
5641
5556
  *
@@ -5661,7 +5576,7 @@ class os extends h {
5661
5576
  * @see /docs/api#/operations/api_internal_recommendations_product_category_get
5662
5577
  */
5663
5578
  getProductCategoryRecommendations(r) {
5664
- return this.get(`/internal/catalog/recommendations/categories/${r.id}`, {}, (e) => new Ze(e.data));
5579
+ return this.get(`/internal/catalog/recommendations/categories/${r.id}`, {}, (e) => new er(e.data));
5665
5580
  }
5666
5581
  /**
5667
5582
  * Возвращает данные о рекомендациях указанного продукта.
@@ -5670,7 +5585,7 @@ class os extends h {
5670
5585
  * @see /docs/api#/operations/api_internal_recommendations_product_get
5671
5586
  */
5672
5587
  getProductRecommendations(r) {
5673
- return this.get(`/internal/catalog/recommendations/products/${r.id}`, {}, (e) => new Ze(e.data));
5588
+ return this.get(`/internal/catalog/recommendations/products/${r.id}`, {}, (e) => new er(e.data));
5674
5589
  }
5675
5590
  /**
5676
5591
  * Выполняет сохранение данных о рекомендуемых категориях продуктов.
@@ -5699,7 +5614,7 @@ class os extends h {
5699
5614
  });
5700
5615
  }
5701
5616
  }
5702
- class $ extends pe {
5617
+ class T extends pe {
5703
5618
  /**
5704
5619
  * Возвращает {@link Promise} для получения данных указанного справочника.
5705
5620
  *
@@ -5708,26 +5623,26 @@ class $ extends pe {
5708
5623
  * и использовать в случае аналогичных запросов.
5709
5624
  */
5710
5625
  getReference(r, e = !1) {
5711
- return this.getTypedDataArrayRequester(nt, `/internal/references/${r}`, e);
5626
+ return this.getTypedDataArrayRequester(ot, `/internal/references/${r}`, e);
5712
5627
  }
5713
5628
  /**
5714
5629
  * Возвращает {@link Promise} для получения справочника данных о канале
5715
5630
  * первичного интереса.
5716
5631
  */
5717
5632
  getChannelPrimaryInterest() {
5718
- return this.getTypedDataArrayRequester(gr, "/internal/references/channel-primary-interest", !0);
5633
+ return this.getTypedDataArrayRequester(mr, "/internal/references/channel-primary-interest", !0);
5719
5634
  }
5720
5635
  /**
5721
5636
  * Возвращает {@link Promise} для получения справочника должностей контактных лиц.
5722
5637
  */
5723
5638
  getContactPositions() {
5724
- return this.getTypedDataArrayRequester(ot, "/internal/references/contact-position", !0);
5639
+ return this.getTypedDataArrayRequester(ct, "/internal/references/contact-position", !0);
5725
5640
  }
5726
5641
  /**
5727
5642
  * Возвращает {@link Promise} для получения справочника списка валют.
5728
5643
  */
5729
5644
  getCurrency() {
5730
- return this.getTypedDataArrayRequester(ae, "/public/references/currency", !0);
5645
+ return this.getTypedDataArrayRequester(Ce, "/public/references/currency", !0);
5731
5646
  }
5732
5647
  /**
5733
5648
  * Возвращает {@link Promise} для получения справочника данных
@@ -5740,43 +5655,43 @@ class $ extends pe {
5740
5655
  * Возвращает {@link Promise} для получения справочника данных организационно-правовых форм.
5741
5656
  */
5742
5657
  getOpf() {
5743
- return this.getTypedDataArrayRequester(j, "/public/references/opf", !0);
5658
+ return this.getTypedDataArrayRequester(F, "/public/references/opf", !0);
5744
5659
  }
5745
5660
  /**
5746
5661
  * Возвращает {@link Promise} для получения справочника данных статусов оплаты заказов.
5747
5662
  */
5748
5663
  getOrderPaymentStatuses() {
5749
- return this.getTypedDataArrayRequester(ct, "/public/references/order-payment-status", !0);
5664
+ return this.getTypedDataArrayRequester(lt, "/public/references/order-payment-status", !0);
5750
5665
  }
5751
5666
  /**
5752
5667
  * Возвращает {@link Promise} для получения справочника данных статусов заказов.
5753
5668
  */
5754
5669
  getOrderStatuses() {
5755
- return this.getTypedDataArrayRequester(lt, "/public/references/order-status", !0);
5670
+ return this.getTypedDataArrayRequester(ut, "/public/references/order-status", !0);
5756
5671
  }
5757
5672
  /**
5758
5673
  * Возвращает {@link Promise} для получения справочника данных типов оплаты заказов.
5759
5674
  */
5760
5675
  getPaymentTypes() {
5761
- return this.getTypedDataArrayRequester(ut, "/public/references/payment-type", !0);
5676
+ return this.getTypedDataArrayRequester(pt, "/public/references/payment-type", !0);
5762
5677
  }
5763
5678
  /**
5764
5679
  * Возвращает {@link Promise} для получения справочника типов ресурсов.
5765
5680
  */
5766
5681
  getResourceTypes() {
5767
- return this.getTypedDataArrayRequester(mr, "/internal/references/resource-type", !0);
5682
+ return this.getTypedDataArrayRequester(fr, "/internal/references/resource-type", !0);
5768
5683
  }
5769
5684
  /**
5770
5685
  * Возвращает {@link Promise} для получения справочника данных направлений продаж.
5771
5686
  */
5772
5687
  getSalesDirections() {
5773
- return this.getTypedDataArrayRequester(N, "/public/references/sales-direction", !0);
5688
+ return this.getTypedDataArrayRequester(L, "/public/references/sales-direction", !0);
5774
5689
  }
5775
5690
  /**
5776
5691
  * Возвращает {@link Promise} для получения справочника данных об источнике первичного интереса.
5777
5692
  */
5778
5693
  getSourcePrimaryInterest() {
5779
- return this.getTypedDataArrayRequester(fr, "/internal/references/source-primary-interest", !0);
5694
+ return this.getTypedDataArrayRequester(yr, "/internal/references/source-primary-interest", !0);
5780
5695
  }
5781
5696
  /**
5782
5697
  * Выполняет поиск данных о городах по терму в названии.
@@ -5784,7 +5699,7 @@ class $ extends pe {
5784
5699
  * @param term Терм поиска.
5785
5700
  */
5786
5701
  searchCity(r) {
5787
- return this.getTypedDataArrayRequester(Me, `/internal/references/city-with-region-and-country/search?term=${r}`);
5702
+ return this.getTypedDataArrayRequester(Be, `/internal/references/city-with-region-and-country/search?term=${r}`);
5788
5703
  }
5789
5704
  /**
5790
5705
  * Выполняет поиск данных о регионах по терму в названии.
@@ -5812,29 +5727,29 @@ class $ extends pe {
5812
5727
  * Возвращает {@link Promise} для получения справочника складов.
5813
5728
  */
5814
5729
  getWarehouses() {
5815
- return this.getTypedDataArrayRequester(De, "/public/references/warehouse", !0);
5730
+ return this.getTypedDataArrayRequester(Ae, "/public/references/warehouse", !0);
5816
5731
  }
5817
5732
  /**
5818
5733
  * Возвращает {@link Promise} для получения справочника типов свойств.
5819
5734
  */
5820
5735
  getPropertyTypes() {
5821
- return this.getTypedDataArrayRequester(hr, "/internal/references/property-type", !0);
5736
+ return this.getTypedDataArrayRequester(gr, "/internal/references/property-type", !0);
5822
5737
  }
5823
5738
  /**
5824
5739
  * Возвращает {@link Promise} для получения справочника коэффициентов цен.
5825
5740
  */
5826
5741
  getPriceCoefficients() {
5827
- return this.getTypedDataArrayRequester(Re, "/internal/references/price-coefficient", !0);
5742
+ return this.getTypedDataArrayRequester(De, "/internal/references/price-coefficient", !0);
5828
5743
  }
5829
5744
  /**
5830
5745
  * Возвращает {@link Promise} для получения справочника типов файлов продуктов/категорий.
5831
5746
  */
5832
5747
  getProductFileType() {
5833
- return this.getTypedDataArrayRequester(pt, "/public/references/product-file-type", !0);
5748
+ return this.getTypedDataArrayRequester(ht, "/public/references/product-file-type", !0);
5834
5749
  }
5835
5750
  }
5836
- const R = te("__references_private", () => {
5837
- 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), p = y(void 0), f = y(void 0), m = y(void 0), A = y(void 0), d = y(void 0), I = y(void 0), S = y(void 0), _ = y(void 0), U = y(void 0), l = y(void 0);
5751
+ const D = te("__references_private", () => {
5752
+ const n = f({}), r = f(void 0), e = f(void 0), s = f(void 0), i = f(void 0), o = f(void 0), c = f(void 0), u = f(void 0), p = f(void 0), v = f(void 0), m = f(void 0), b = f(void 0), _ = f(void 0), d = f(void 0), G = f(void 0), B = f(void 0), ae = f(void 0), l = f(void 0);
5838
5753
  return {
5839
5754
  /**
5840
5755
  * Список загружаемых/загруженных на данный момент значений.
@@ -5875,7 +5790,7 @@ const R = te("__references_private", () => {
5875
5790
  /**
5876
5791
  * Справочник типов оплаты заказов.
5877
5792
  */
5878
- paymentTypeReference: f,
5793
+ paymentTypeReference: v,
5879
5794
  /**
5880
5795
  * Справочник групп партнеров.
5881
5796
  */
@@ -5883,118 +5798,118 @@ const R = te("__references_private", () => {
5883
5798
  /**
5884
5799
  * Справочник типов файлов продукктов/категорий.
5885
5800
  */
5886
- productFileTypeReference: A,
5801
+ productFileTypeReference: b,
5887
5802
  /**
5888
5803
  * Справочник типов ресурсов.
5889
5804
  */
5890
- resourceTypesReference: d,
5805
+ resourceTypesReference: _,
5891
5806
  /**
5892
5807
  * Справочник направлений продаж.
5893
5808
  */
5894
- salesDirectionsReference: I,
5809
+ salesDirectionsReference: d,
5895
5810
  /**
5896
5811
  * Справочник источников первичного интереса.
5897
5812
  */
5898
- sourcePrimaryInterestReference: S,
5813
+ sourcePrimaryInterestReference: G,
5899
5814
  /**
5900
5815
  * Справочник складов.
5901
5816
  */
5902
- warehousesReference: _,
5817
+ warehousesReference: B,
5903
5818
  /**
5904
5819
  * Справочник типов свойств.
5905
5820
  */
5906
- propertyTypesReference: U,
5821
+ propertyTypesReference: ae,
5907
5822
  /**
5908
5823
  * Справочник коэффициентов цен.
5909
5824
  */
5910
5825
  priceCoefficientsReference: l
5911
5826
  };
5912
5827
  }), cs = te("references", () => {
5913
- const n = P(() => {
5914
- const l = R();
5915
- return !l.channelPrimaryInterestReference && !l.dataLoaderList.channelPrimaryInterestReference && (l.dataLoaderList.channelPrimaryInterestReference = !0, h.getInstance($).getChannelPrimaryInterest().then((g) => {
5828
+ const n = R(() => {
5829
+ const l = D();
5830
+ return !l.channelPrimaryInterestReference && !l.dataLoaderList.channelPrimaryInterestReference && (l.dataLoaderList.channelPrimaryInterestReference = !0, h.getInstance(T).getChannelPrimaryInterest().then((g) => {
5916
5831
  l.channelPrimaryInterestReference = g;
5917
- }).catch(w)), l.channelPrimaryInterestReference;
5918
- }), r = P(() => {
5919
- const l = R();
5920
- return !l.contactPositionsReference && !l.dataLoaderList.contactPositionsReference && (l.dataLoaderList.contactPositionsReference = !0, h.getInstance($).getContactPositions().then((g) => {
5832
+ }).catch(y)), l.channelPrimaryInterestReference;
5833
+ }), r = R(() => {
5834
+ const l = D();
5835
+ return !l.contactPositionsReference && !l.dataLoaderList.contactPositionsReference && (l.dataLoaderList.contactPositionsReference = !0, h.getInstance(T).getContactPositions().then((g) => {
5921
5836
  l.contactPositionsReference = g;
5922
- }).catch(w)), l.contactPositionsReference;
5923
- }), e = P(() => {
5924
- const l = R();
5925
- return !l.currencyReference && !l.dataLoaderList.currencyReference && (l.dataLoaderList.currencyReference = !0, h.getInstance($).getCurrency().then((g) => {
5837
+ }).catch(y)), l.contactPositionsReference;
5838
+ }), e = R(() => {
5839
+ const l = D();
5840
+ return !l.currencyReference && !l.dataLoaderList.currencyReference && (l.dataLoaderList.currencyReference = !0, h.getInstance(T).getCurrency().then((g) => {
5926
5841
  l.currencyReference = g;
5927
- }).catch(w)), l.currencyReference;
5928
- }), s = P(() => {
5929
- const l = R();
5930
- return !l.opfReference && !l.dataLoaderList.opfReference && (l.dataLoaderList.opfReference = !0, h.getInstance($).getOpf().then((g) => {
5842
+ }).catch(y)), l.currencyReference;
5843
+ }), s = R(() => {
5844
+ const l = D();
5845
+ return !l.opfReference && !l.dataLoaderList.opfReference && (l.dataLoaderList.opfReference = !0, h.getInstance(T).getOpf().then((g) => {
5931
5846
  l.opfReference = g;
5932
- }).catch(w)), l.opfReference;
5933
- }), i = P(() => {
5934
- const l = R();
5935
- return !l.orderPaymentStatusReference && !l.dataLoaderList.orderPaymentStatusReference && (l.dataLoaderList.orderPaymentStatusReference = !0, h.getInstance($).getOrderPaymentStatuses().then((g) => {
5847
+ }).catch(y)), l.opfReference;
5848
+ }), i = R(() => {
5849
+ const l = D();
5850
+ return !l.orderPaymentStatusReference && !l.dataLoaderList.orderPaymentStatusReference && (l.dataLoaderList.orderPaymentStatusReference = !0, h.getInstance(T).getOrderPaymentStatuses().then((g) => {
5936
5851
  l.orderPaymentStatusReference = g;
5937
- }).catch(w)), l.orderPaymentStatusReference;
5938
- }), o = P(() => {
5939
- const l = R();
5940
- return !l.orderStatusReference && !l.dataLoaderList.orderStatusReference && (l.dataLoaderList.orderStatusReference = !0, h.getInstance($).getOrderStatuses().then((g) => {
5852
+ }).catch(y)), l.orderPaymentStatusReference;
5853
+ }), o = R(() => {
5854
+ const l = D();
5855
+ return !l.orderStatusReference && !l.dataLoaderList.orderStatusReference && (l.dataLoaderList.orderStatusReference = !0, h.getInstance(T).getOrderStatuses().then((g) => {
5941
5856
  l.orderStatusReference = g;
5942
- }).catch(w)), l.orderStatusReference;
5943
- }), c = P(() => {
5944
- const l = R();
5945
- return !l.paymentTypeReference && !l.dataLoaderList.paymentTypeReference && (l.dataLoaderList.paymentTypeReference = !0, h.getInstance($).getPaymentTypes().then((g) => {
5857
+ }).catch(y)), l.orderStatusReference;
5858
+ }), c = R(() => {
5859
+ const l = D();
5860
+ return !l.paymentTypeReference && !l.dataLoaderList.paymentTypeReference && (l.dataLoaderList.paymentTypeReference = !0, h.getInstance(T).getPaymentTypes().then((g) => {
5946
5861
  l.paymentTypeReference = g;
5947
- }).catch(w)), l.paymentTypeReference;
5948
- }), u = P(() => {
5949
- const l = R();
5950
- return !l.partnerGroupReference && !l.dataLoaderList.partnerGroupReference && (l.dataLoaderList.partnerGroupReference = !0, h.getInstance($).getPartnerGroup().then((g) => {
5862
+ }).catch(y)), l.paymentTypeReference;
5863
+ }), u = R(() => {
5864
+ const l = D();
5865
+ return !l.partnerGroupReference && !l.dataLoaderList.partnerGroupReference && (l.dataLoaderList.partnerGroupReference = !0, h.getInstance(T).getPartnerGroup().then((g) => {
5951
5866
  l.partnerGroupReference = g;
5952
- }).catch(w)), l.partnerGroupReference;
5953
- }), p = P(() => {
5954
- const l = R();
5955
- return !l.productFileTypeReference && !l.dataLoaderList.productFileTypeReference && (l.dataLoaderList.productFileTypeReference = !0, h.getInstance($).getProductFileType().then((g) => {
5867
+ }).catch(y)), l.partnerGroupReference;
5868
+ }), p = R(() => {
5869
+ const l = D();
5870
+ return !l.productFileTypeReference && !l.dataLoaderList.productFileTypeReference && (l.dataLoaderList.productFileTypeReference = !0, h.getInstance(T).getProductFileType().then((g) => {
5956
5871
  l.productFileTypeReference = g;
5957
- }).catch(w)), l.productFileTypeReference;
5958
- }), f = P(() => {
5959
- const l = R();
5960
- return !l.resourceTypesReference && !l.dataLoaderList.resourceTypesReference && (l.dataLoaderList.resourceTypesReference = !0, h.getInstance($).getResourceTypes().then((g) => {
5872
+ }).catch(y)), l.productFileTypeReference;
5873
+ }), v = R(() => {
5874
+ const l = D();
5875
+ return !l.resourceTypesReference && !l.dataLoaderList.resourceTypesReference && (l.dataLoaderList.resourceTypesReference = !0, h.getInstance(T).getResourceTypes().then((g) => {
5961
5876
  l.resourceTypesReference = g;
5962
- }).catch(w)), l.resourceTypesReference;
5963
- }), m = P(() => {
5964
- const l = R();
5965
- return !l.salesDirectionsReference && !l.dataLoaderList.salesDirectionsReference && (l.dataLoaderList.salesDirectionsReference = !0, h.getInstance($).getSalesDirections().then((g) => {
5877
+ }).catch(y)), l.resourceTypesReference;
5878
+ }), m = R(() => {
5879
+ const l = D();
5880
+ return !l.salesDirectionsReference && !l.dataLoaderList.salesDirectionsReference && (l.dataLoaderList.salesDirectionsReference = !0, h.getInstance(T).getSalesDirections().then((g) => {
5966
5881
  l.salesDirectionsReference = g;
5967
- }).catch(w)), l.salesDirectionsReference;
5968
- }), A = P(() => {
5969
- const l = R();
5970
- return !l.sourcePrimaryInterestReference && !l.dataLoaderList.sourcePrimaryInterestReference && (l.dataLoaderList.sourcePrimaryInterestReference = !0, h.getInstance($).getSourcePrimaryInterest().then((g) => {
5882
+ }).catch(y)), l.salesDirectionsReference;
5883
+ }), b = R(() => {
5884
+ const l = D();
5885
+ return !l.sourcePrimaryInterestReference && !l.dataLoaderList.sourcePrimaryInterestReference && (l.dataLoaderList.sourcePrimaryInterestReference = !0, h.getInstance(T).getSourcePrimaryInterest().then((g) => {
5971
5886
  l.sourcePrimaryInterestReference = g;
5972
- }).catch(w)), l.sourcePrimaryInterestReference;
5973
- }), d = P(() => {
5974
- const l = R();
5975
- return !l.deliveryTypeReference && !l.dataLoaderList.deliveryTypeReference && (l.dataLoaderList.deliveryTypeReference = !0, h.getInstance($).getDeliveryTypes().then((g) => {
5887
+ }).catch(y)), l.sourcePrimaryInterestReference;
5888
+ }), _ = R(() => {
5889
+ const l = D();
5890
+ return !l.deliveryTypeReference && !l.dataLoaderList.deliveryTypeReference && (l.dataLoaderList.deliveryTypeReference = !0, h.getInstance(T).getDeliveryTypes().then((g) => {
5976
5891
  l.deliveryTypeReference = g;
5977
- }).catch(w)), l.deliveryTypeReference;
5978
- }), I = P(() => {
5979
- const l = R();
5980
- return !l.managersList && !l.dataLoaderList.managersList && (l.dataLoaderList.managersList = !0, h.getInstance(wt).getManagers().then((g) => {
5892
+ }).catch(y)), l.deliveryTypeReference;
5893
+ }), d = R(() => {
5894
+ const l = D();
5895
+ return !l.managersList && !l.dataLoaderList.managersList && (l.dataLoaderList.managersList = !0, h.getInstance(Ct).getManagers().then((g) => {
5981
5896
  l.managersList = g;
5982
- }).catch(w)), l.managersList;
5983
- }), S = P(() => {
5984
- const l = R();
5985
- return !l.warehousesReference && !l.dataLoaderList.warehousesReference && (l.dataLoaderList.warehousesReference = !0, h.getInstance($).getWarehouses().then((g) => {
5897
+ }).catch(y)), l.managersList;
5898
+ }), G = R(() => {
5899
+ const l = D();
5900
+ return !l.warehousesReference && !l.dataLoaderList.warehousesReference && (l.dataLoaderList.warehousesReference = !0, h.getInstance(T).getWarehouses().then((g) => {
5986
5901
  l.warehousesReference = g;
5987
- }).catch(w)), l.warehousesReference;
5988
- }), _ = P(() => {
5989
- const l = R();
5990
- return !l.propertyTypesReference && !l.dataLoaderList.propertyTypesReference && (l.dataLoaderList.propertyTypesReference = !0, h.getInstance($).getPropertyTypes().then((g) => {
5902
+ }).catch(y)), l.warehousesReference;
5903
+ }), B = R(() => {
5904
+ const l = D();
5905
+ return !l.propertyTypesReference && !l.dataLoaderList.propertyTypesReference && (l.dataLoaderList.propertyTypesReference = !0, h.getInstance(T).getPropertyTypes().then((g) => {
5991
5906
  l.propertyTypesReference = g;
5992
- }).catch(w)), l.propertyTypesReference;
5993
- }), U = P(() => {
5994
- const l = R();
5995
- return !l.priceCoefficientsReference && !l.dataLoaderList.priceCoefficientsReference && (l.dataLoaderList.priceCoefficientsReference = !0, h.getInstance($).getPriceCoefficients().then((g) => {
5907
+ }).catch(y)), l.propertyTypesReference;
5908
+ }), ae = R(() => {
5909
+ const l = D();
5910
+ return !l.priceCoefficientsReference && !l.dataLoaderList.priceCoefficientsReference && (l.dataLoaderList.priceCoefficientsReference = !0, h.getInstance(T).getPriceCoefficients().then((g) => {
5996
5911
  l.priceCoefficientsReference = g;
5997
- }).catch(w)), l.priceCoefficientsReference;
5912
+ }).catch(y)), l.priceCoefficientsReference;
5998
5913
  });
5999
5914
  return {
6000
5915
  /**
@@ -6036,7 +5951,7 @@ const R = te("__references_private", () => {
6036
5951
  /**
6037
5952
  * Справочник типов ресурсов.
6038
5953
  */
6039
- resourceTypesReference: f,
5954
+ resourceTypesReference: v,
6040
5955
  /**
6041
5956
  * Справочник направлений продаж.
6042
5957
  */
@@ -6044,30 +5959,30 @@ const R = te("__references_private", () => {
6044
5959
  /**
6045
5960
  * Справочник каналов первичного интереса.
6046
5961
  */
6047
- sourcePrimaryInterestsReference: A,
5962
+ sourcePrimaryInterestsReference: b,
6048
5963
  /**
6049
5964
  * Справочник типов доставки.
6050
5965
  */
6051
- deliveryTypeReference: d,
5966
+ deliveryTypeReference: _,
6052
5967
  /**
6053
5968
  * Список менеджеров.
6054
5969
  */
6055
- managersList: I,
5970
+ managersList: d,
6056
5971
  /**
6057
5972
  * Справочник складов.
6058
5973
  */
6059
- warehousesReference: S,
5974
+ warehousesReference: G,
6060
5975
  /**
6061
5976
  * Справочник типов свойств.
6062
5977
  */
6063
- propertyTypesReference: _,
5978
+ propertyTypesReference: B,
6064
5979
  /**
6065
5980
  * Справочник коэффициентов цен.
6066
5981
  */
6067
- priceCoefficientsReference: U
5982
+ priceCoefficientsReference: ae
6068
5983
  };
6069
5984
  });
6070
- class Rt {
5985
+ class At {
6071
5986
  /**
6072
5987
  * Инициализирует экземпляр класса {@link MetaTagItem}.
6073
5988
  *
@@ -6085,7 +6000,7 @@ class Rt {
6085
6000
  this.name = r.name, this.content = r.content;
6086
6001
  }
6087
6002
  }
6088
- class er {
6003
+ class rr {
6089
6004
  /**
6090
6005
  * Инициализирует экземпляр класса {@link Seo}.
6091
6006
  *
@@ -6121,7 +6036,7 @@ class er {
6121
6036
  */
6122
6037
  t(this, "meta");
6123
6038
  var e;
6124
- this.resourceType = new mr(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 Rt(s))) ?? [];
6039
+ this.resourceType = new fr(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 At(s))) ?? [];
6125
6040
  }
6126
6041
  }
6127
6042
  class ls extends h {
@@ -6132,7 +6047,7 @@ class ls extends h {
6132
6047
  * @param resourceId Идентификатор ресурса для которого необходимо получить SEO-данные.
6133
6048
  */
6134
6049
  getResourceSeoData(r, e) {
6135
- return this.get(`/internal/seo/${r.slug}/${e}`, {}, (s) => new er(s.data));
6050
+ return this.get(`/internal/seo/${r.slug}/${e}`, {}, (s) => new rr(s.data));
6136
6051
  }
6137
6052
  /**
6138
6053
  * Выполняет сохранение данных о SEO-параметрах для указанного ресурса.
@@ -6143,7 +6058,7 @@ class ls extends h {
6143
6058
  * в случае ошибок в запросах.
6144
6059
  */
6145
6060
  saveResourceSeoData(r, e = {}) {
6146
- return this.post(`/internal/seo/${r.resourceType.slug}/${r.resourceId}`, r, (s) => new er(s.data), e);
6061
+ return this.post(`/internal/seo/${r.resourceType.slug}/${r.resourceId}`, r, (s) => new rr(s.data), e);
6147
6062
  }
6148
6063
  /**
6149
6064
  * Возвращает {@link Promise} для удаления данных о SEO-параметрах указанного ресурса.
@@ -6202,8 +6117,8 @@ class us extends h {
6202
6117
  });
6203
6118
  }
6204
6119
  }
6205
- var Dt = /* @__PURE__ */ ((n) => (n.Admin = "admin", n.Manager = "manager", n.Operator = "operator", n.Client = "client", n.Guest = "guest", n))(Dt || {});
6206
- class At extends pr {
6120
+ var Tt = /* @__PURE__ */ ((n) => (n.Admin = "admin", n.Manager = "manager", n.Operator = "operator", n.Client = "client", n.Guest = "guest", n))(Tt || {});
6121
+ class $t extends hr {
6207
6122
  /**
6208
6123
  * Инициализирует экземпляр класса {@link User}.
6209
6124
  *
@@ -6231,7 +6146,7 @@ class ps extends h {
6231
6146
  * Инициализирует экземпляр класса {@link UserAuthDataProvider}.
6232
6147
  */
6233
6148
  constructor() {
6234
- super(), this.baseUrl = `${T.getConfig().http.portalApiUrl}/api`, this.interceptorIds.request.authRequestInterceptor && this.httpClient.interceptors.request.eject(this.interceptorIds.request.authRequestInterceptor);
6149
+ super(), this.baseUrl = `${$.getConfig().http.portalApiUrl}/api`, this.interceptorIds.request.authRequestInterceptor && this.httpClient.interceptors.request.eject(this.interceptorIds.request.authRequestInterceptor);
6235
6150
  }
6236
6151
  /**
6237
6152
  * Функция для получения обновленных токенов доступа.
@@ -6242,17 +6157,17 @@ class ps extends h {
6242
6157
  return this.get("internal/users/current-tokens").then((r) => r.accessToken);
6243
6158
  }
6244
6159
  }
6245
- class $t extends h {
6160
+ class at extends h {
6246
6161
  /**
6247
6162
  * Возвращает данные о текущем пользователе.
6248
6163
  */
6249
6164
  // eslint-disable-next-line class-methods-use-this
6250
6165
  getCurrentUser() {
6251
- return this.get("/internal/users/info", {}, (r) => new At(r.data));
6166
+ return this.get("/internal/users/info", {}, (r) => new $t(r.data));
6252
6167
  }
6253
6168
  }
6254
- const Tt = te("__user_state_private", () => {
6255
- const n = y({}), r = y(void 0);
6169
+ const bt = te("__user_state_private", () => {
6170
+ const n = f({}), r = f(void 0);
6256
6171
  return {
6257
6172
  /**
6258
6173
  * Список загружаемых/загруженных на данный момент значений.
@@ -6267,11 +6182,11 @@ const Tt = te("__user_state_private", () => {
6267
6182
  /**
6268
6183
  * Данные о текущем пользователе.
6269
6184
  */
6270
- currentUser: P(() => {
6271
- const r = Tt();
6272
- return !r.currentUser && !r.dataLoaderList.currentUser && (r.dataLoaderList.currentUser = !0, h.getInstance($t).getCurrentUser().then((e) => {
6185
+ currentUser: R(() => {
6186
+ const r = bt();
6187
+ return !r.currentUser && !r.dataLoaderList.currentUser && (r.dataLoaderList.currentUser = !0, h.getInstance(at).getCurrentUser().then((e) => {
6273
6188
  r.currentUser = e;
6274
- }).catch(w).finally(() => {
6189
+ }).catch(y).finally(() => {
6275
6190
  r.dataLoaderList.currentUser = !1;
6276
6191
  })), r.currentUser;
6277
6192
  })
@@ -6300,149 +6215,149 @@ class gs {
6300
6215
  }
6301
6216
  }
6302
6217
  export {
6303
- nt as AnyReference,
6304
- Ut as AppBaseConfig,
6305
- T as AppConfigProvider,
6306
- Ne as BankAccount,
6218
+ ot as AnyReference,
6219
+ Ft as AppBaseConfig,
6220
+ $ as AppConfigProvider,
6221
+ qe as BankAccount,
6307
6222
  $e as BasePaginationProvider,
6308
- Wr as CalculationTypeEnum,
6223
+ Jr as CalculationTypeEnum,
6309
6224
  me as Cart,
6310
- Er as CartItem,
6225
+ Wr as CartItem,
6311
6226
  zr as CartItemBase,
6312
- Ot as CartProvider,
6313
- Gt as CatalogProvider,
6314
- nr as CatalogableItem,
6315
- E as Category,
6316
- We as CategoryPricingRule,
6317
- gr as ChannelPrimaryInterest,
6318
- Vt as City,
6319
- Me as CityWithRegionAndCountry,
6320
- Qe as Client,
6321
- ft as ClientAdditionalData,
6227
+ Nt as CartProvider,
6228
+ Mt as CatalogProvider,
6229
+ or as CatalogableItem,
6230
+ z as Category,
6231
+ Je as CategoryPricingRule,
6232
+ mr as ChannelPrimaryInterest,
6233
+ Kt as City,
6234
+ Be as CityWithRegionAndCountry,
6235
+ Ye as Client,
6236
+ yt as ClientAdditionalData,
6322
6237
  we as ClientCategory,
6323
- Xt as ClientDataProvider,
6324
- Ft as ClientPriceProvider,
6325
- jt as ClientPriceTemplateProvider,
6238
+ x as ClientDataProvider,
6239
+ jt as ClientPriceProvider,
6240
+ Gt as ClientPriceTemplateProvider,
6326
6241
  Z as ClientProduct,
6327
- Bt as ClientProductCategoryDataProvider,
6242
+ Et as ClientProductCategoryDataProvider,
6328
6243
  zt as ClientProductDataProvider,
6329
6244
  ge as ClientShortInfo,
6330
- it as ClientsAdditionalDataRequestTypeEnum,
6331
- Kt as ClientsListFilters,
6245
+ nt as ClientsAdditionalDataRequestTypeEnum,
6246
+ Qt as ClientsListFilters,
6332
6247
  oe as CodedIdentity,
6333
6248
  es as ConfiguratorProvider,
6334
- Oe as Contact,
6335
- Qr as ContactLinks,
6249
+ Ne as Contact,
6250
+ Yr as ContactLinks,
6336
6251
  M as ContactPerson,
6337
- mt as ContactPersonRelated,
6338
- ot as ContactPosition,
6339
- _e as ContactRelation,
6340
- yr as ContragentBase,
6341
- Ce as ContragentFactory,
6342
- wr as ContragentIc,
6343
- ht as ContragentPerson,
6344
- gt as ContragentUlNr,
6345
- ar as ContragentUlR,
6346
- je as CostSourceEnum,
6252
+ ft as ContactPersonRelated,
6253
+ ct as ContactPosition,
6254
+ Le as ContactRelation,
6255
+ wr as ContragentBase,
6256
+ ve as ContragentFactory,
6257
+ Cr as ContragentIc,
6258
+ gt as ContragentPerson,
6259
+ mt as ContragentUlNr,
6260
+ vr as ContragentUlR,
6261
+ Ge as CostSourceEnum,
6347
6262
  ee as Country,
6348
- ae as Currency,
6263
+ Ce as Currency,
6349
6264
  us as DataSuggestionProvider,
6350
- Qt as DataTablePagination,
6351
- yt as DataTablePaginationRequestParams,
6352
- Yt as DataTableSortRequestParams,
6265
+ Yt as DataTablePagination,
6266
+ wt as DataTablePaginationRequestParams,
6267
+ Xt as DataTableSortRequestParams,
6353
6268
  rs as DateTimeProvider,
6354
- Vr as DeletableNamedIdentity,
6355
- ve as DeliveryAddress,
6269
+ Kr as DeletableNamedIdentity,
6270
+ Pe as DeliveryAddress,
6356
6271
  X as DeliveryType,
6357
- Nt as DetailedJwtPayload,
6358
- Zr as DeviceTypeResolutionConfig,
6359
- Kr as DiscountShortInfo,
6272
+ qt as DetailedJwtPayload,
6273
+ et as DeviceTypeResolutionConfig,
6274
+ Qr as DiscountShortInfo,
6360
6275
  gs as FieldValidationResultData,
6361
6276
  ue as FilterGroup,
6362
- Je as FilterItem,
6277
+ Ve as FilterItem,
6363
6278
  He as FilterOpEnum,
6364
- cr as GeoCoordinates,
6279
+ lr as GeoCoordinates,
6365
6280
  Hr as HiddenCatalogableItem,
6366
6281
  pe as HttpCachedRequester,
6367
- et as HttpParamsConfig,
6282
+ rt as HttpParamsConfig,
6368
6283
  h as HttpRequester,
6369
- H as Identity,
6370
- Br as Image,
6371
- G as JwtPayload,
6372
- Ae as Manager,
6284
+ j as Identity,
6285
+ Er as Image,
6286
+ N as JwtPayload,
6287
+ Te as Manager,
6373
6288
  ce as ManagerCommon,
6374
6289
  ts as ManagerDataFactory,
6375
- wt as ManagerDataProvider,
6376
- Rt as MetaTagItem,
6377
- b as NamedIdentity,
6378
- j as Opf,
6379
- k as OpfEnum,
6380
- Ct as Order,
6381
- vr as OrderInfo,
6382
- ct as OrderPaymentStatus,
6383
- at as OrderProduct,
6384
- Cr as OrderShortInfo,
6385
- lt as OrderStatus,
6290
+ Ct as ManagerDataProvider,
6291
+ At as MetaTagItem,
6292
+ a as NamedIdentity,
6293
+ F as Opf,
6294
+ q as OpfEnum,
6295
+ Pt as Order,
6296
+ Rr as OrderInfo,
6297
+ lt as OrderPaymentStatus,
6298
+ vt as OrderProduct,
6299
+ Pr as OrderShortInfo,
6300
+ ut as OrderStatus,
6386
6301
  ss as OrdersDataProvider,
6387
6302
  re as PartnerGroup,
6388
- ut as PaymentType,
6303
+ pt as PaymentType,
6389
6304
  fe as PreferencesStorageProvider,
6390
- de as PriceAnalyze,
6305
+ xe as PriceAnalyze,
6391
6306
  is as PriceAnalyzeProvider,
6392
- Re as PriceCoefficient,
6393
- or as PriceCoefficientEnum,
6307
+ De as PriceCoefficient,
6308
+ cr as PriceCoefficientEnum,
6394
6309
  ns as PriceHistoryDataProvider,
6395
- vt as PriceHistoryItem,
6310
+ Rt as PriceHistoryItem,
6396
6311
  W as PriceTemplate,
6397
- be as PriceTemplateCategory,
6312
+ Se as PriceTemplateCategory,
6398
6313
  se as PriceTemplateClient,
6399
- ur as PriceTemplateICatalogableItem,
6400
- Se as PriceTemplateProduct,
6401
- Et as PriceTemplateProvider,
6314
+ pr as PriceTemplateICatalogableItem,
6315
+ Ie as PriceTemplateProduct,
6316
+ Wt as PriceTemplateProvider,
6402
6317
  ne as PricingRole,
6403
- Wt as PricingRoleProvider,
6404
- xe as PrimaryCatalogableItem,
6405
- x as Product,
6406
- Mt as ProductCategoryDataProvider,
6318
+ Jt as PricingRoleProvider,
6319
+ Oe as PrimaryCatalogableItem,
6320
+ I as Product,
6321
+ Bt as ProductCategoryDataProvider,
6407
6322
  Ht as ProductDataProvider,
6408
- pt as ProductFileType,
6409
- Ge as ProductPriceCoefficient,
6410
- Pt as ProductPriceHistory,
6411
- Jt as PropertiesProvider,
6323
+ ht as ProductFileType,
6324
+ Me as ProductPriceCoefficient,
6325
+ Dt as ProductPriceHistory,
6326
+ Vt as PropertiesProvider,
6412
6327
  ie as Property,
6413
- hr as PropertyType,
6414
- Jr as PropertyTypeEnum,
6415
- z as PropertyValue,
6328
+ gr as PropertyType,
6329
+ Vr as PropertyTypeEnum,
6330
+ E as PropertyValue,
6416
6331
  os as RecommendationsDataProvider,
6417
- Ze as RecommendationsList,
6418
- v as Reference,
6419
- $ as ReferenceDataProvider,
6332
+ er as RecommendationsList,
6333
+ P as Reference,
6334
+ T as ReferenceDataProvider,
6420
6335
  le as Region,
6421
- mr as ResourceType,
6422
- N as SalesDirection,
6423
- rt as SentryConfig,
6424
- er as Seo,
6336
+ fr as ResourceType,
6337
+ L as SalesDirection,
6338
+ tt as SentryConfig,
6339
+ rr as Seo,
6425
6340
  ls as SeoDataProvider,
6426
- fr as SourcePrimaryInterest,
6427
- Mr as StockCount,
6428
- qt as TemplatesListFilters,
6429
- Fe as TypedInstanceFactory,
6430
- Ye as UnitsHelper,
6341
+ yr as SourcePrimaryInterest,
6342
+ Br as StockCount,
6343
+ Ut as TemplatesListFilters,
6344
+ je as TypedInstanceFactory,
6345
+ Xe as UnitsHelper,
6431
6346
  Zt as UnknownClientDataProvider,
6432
- lr as UpdatableNamedIdentity,
6433
- At as User,
6347
+ ur as UpdatableNamedIdentity,
6348
+ $t as User,
6434
6349
  ps as UserAuthDataProvider,
6435
- pr as UserCommonInfo,
6436
- $t as UserDataProvider,
6437
- Yr as UserPricingRole,
6438
- F as UserShortInfo,
6439
- Dt as UserTypeEnum,
6440
- tt as VersionConfig,
6441
- De as Warehouse,
6442
- st as WebSocketConfig,
6443
- Ve as findCatalogItemByIdRecursive,
6444
- Ke as flattenCatalogItems,
6445
- Te as useAuthStateStore,
6350
+ hr as UserCommonInfo,
6351
+ at as UserDataProvider,
6352
+ Xr as UserPricingRole,
6353
+ U as UserShortInfo,
6354
+ Tt as UserTypeEnum,
6355
+ st as VersionConfig,
6356
+ Ae as Warehouse,
6357
+ it as WebSocketConfig,
6358
+ Ke as findCatalogItemByIdRecursive,
6359
+ Qe as flattenCatalogItems,
6360
+ be as useAuthStateStore,
6446
6361
  cs as useReferencesStore,
6447
6362
  hs as useUserStateStore
6448
6363
  };