@snabcentr/common-lib 2.0.4 → 2.0.6

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 ar = Object.defineProperty;
2
- var Rr = (n, r, e) => r in n ? ar(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 Oe, isUndefined as Ar, isNil as A, isEmpty as Y, noop as y, mapValues as tr, isArray as Q, every as Dr, split as $r, toUpper as Tr, constant as br, isString as w, cloneDeep as Sr, toLower as _r, isFunction as Ue, map as he, forEach as Ir, isDate as ke, omitBy as sr, isObject as ir } from "lodash-es";
6
- import { objectToCamel as qe, objectToSnake as Be } from "ts-case-convert";
7
- import { isAfter as ze, parseISO as C, startOfToday as Le, format as U, addSeconds as kr, addBusinessDays as Lr, endOfTomorrow as dr, startOfTomorrow as xr, endOfYesterday as Nr, startOfYesterday as Or, endOfToday as Ur, endOfDay as qr, startOfDay as Gr } from "date-fns";
1
+ var Ar = Object.defineProperty;
2
+ var Dr = (n, r, e) => r in n ? Ar(n, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[r] = e;
3
+ var t = (n, r, e) => Dr(n, typeof r != "symbol" ? r + "" : r, e);
4
+ import { jwtDecode as tr } from "jwt-decode";
5
+ import { merge as de, isUndefined as Tr, isNil as D, isEmpty as Y, noop as f, mapValues as sr, isArray as Q, every as $r, split as br, toUpper as Sr, constant as ar, isString as y, cloneDeep as Ir, toLower as xr, isFunction as Ue, map as he, forEach as Lr, isDate as ke, 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 w, startOfToday as _e, format as q, addSeconds as kr, addBusinessDays as _r, endOfTomorrow as Or, startOfTomorrow as qr, endOfYesterday as Nr, startOfYesterday as dr, endOfToday as Ur, endOfDay as Fr, startOfDay as Mr } from "date-fns";
8
8
  import { defineStore as te } from "pinia";
9
- import { ref as f, markRaw as Fr, computed as a } from "vue";
10
- import jr from "axios";
11
- class G {
9
+ import { ref as m, markRaw as jr, computed as P } from "vue";
10
+ import Gr from "axios";
11
+ class d {
12
12
  /**
13
13
  * Инициализирует экземпляр класса {@link JwtPayload}.
14
14
  *
@@ -99,7 +99,7 @@ class G {
99
99
  * @inheritDoc
100
100
  */
101
101
  t(this, "email", "");
102
- Oe(this, r);
102
+ de(this, r);
103
103
  }
104
104
  /**
105
105
  * Возвращает данные полезной нагрузки для указанного JWT-токена.
@@ -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(qe(e));
110
+ const e = tr(r), s = new d(Fe(e));
111
111
  return s.resourceAccess = e.resource_access, s;
112
112
  }
113
113
  }
114
- class Nt extends G {
114
+ class Nt extends d {
115
115
  /**
116
116
  * Инициализирует экземпляр класса {@link DetailedJwtPayload}.
117
117
  *
@@ -143,7 +143,7 @@ class Nt extends G {
143
143
  * @inheritDoc
144
144
  */
145
145
  t(this, "address");
146
- Oe(this, e);
146
+ de(this, e);
147
147
  }
148
148
  /**
149
149
  * Возвращает данные полезной нагрузки для указанного JWT-токена.
@@ -151,7 +151,7 @@ class Nt extends G {
151
151
  * @param jwtToken JWT-ключ доступа.
152
152
  */
153
153
  static getJwtPayload(e) {
154
- return new G(qe(rr(e)));
154
+ return new d(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 (Ar(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 D = J;
193
+ let T = J;
194
194
  class ye {
195
195
  /**
196
196
  * Возвращает актуальные и не просроченные данные из хранилища.
@@ -210,8 +210,8 @@ class ye {
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 (A(s.data) || Y(s.data))
213
+ if (!s.availableFor || ze(w(s.availableFor) || _e(), /* @__PURE__ */ new Date())) {
214
+ if (D(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 ye {
233
233
  static saveActualDataToStorage(r, e, s) {
234
234
  if (this.isLocalStorageAvailable())
235
235
  try {
236
- if (A(e) || Y(e))
236
+ if (D(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 ye {
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(w(o.availableFor) || _e(), /* @__PURE__ */ new Date()) && r.push(s);
288
288
  }
289
289
  } catch {
290
290
  r.push(s);
@@ -300,33 +300,33 @@ class ye {
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 = d.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 = f(
311
+ const H = te("__auth_state_private", () => {
312
+ const n = m(
313
313
  (() => {
314
- var p;
314
+ var u;
315
315
  const o = ye.getActualDataFromStorage(
316
316
  "sc.token"
317
317
  /* JwtToken */
318
318
  );
319
319
  if (o)
320
320
  return Promise.resolve(o);
321
- const c = (p = D.getConfig().devMode) == null ? void 0 : p.initAuthBearerToken;
321
+ const c = (u = T.getConfig().devMode) == null ? void 0 : u.initAuthBearerToken;
322
322
  return c ? Promise.resolve(c) : void 0;
323
323
  })()
324
- ), r = f(void 0), e = f(void 0), s = Fr(/* @__PURE__ */ new Map());
324
+ ), r = m(void 0), e = m(void 0), s = jr(/* @__PURE__ */ new Map());
325
325
  function i() {
326
- e.value = void 0, A(n.value) || n.value.then((o) => {
327
- const c = G.getJwtPayload(o);
328
- e.value = c.exp * 1e3 > Date.now() ? tr(c.resourceAccess, (p) => (p == null ? void 0 : p.roles) ?? []) : void 0;
329
- }).catch(y);
326
+ e.value = void 0, D(n.value) || n.value.then((o) => {
327
+ const c = d.getJwtPayload(o);
328
+ e.value = c.exp * 1e3 > Date.now() ? sr(c.resourceAccess, (u) => (u == null ? void 0 : u.roles) ?? []) : void 0;
329
+ }).catch(f);
330
330
  }
331
331
  return {
332
332
  /**
@@ -350,49 +350,49 @@ const B = te("__auth_state_private", () => {
350
350
  */
351
351
  recalculateUserPermissions: i
352
352
  };
353
- }), $e = te("__auth_state", () => {
354
- const n = a(() => {
355
- const o = B();
356
- if (A(o.jwtToken) && !A(o.jwtTokenUpdater)) {
353
+ }), be = te("__auth_state", () => {
354
+ const n = P(() => {
355
+ const o = H();
356
+ if (D(o.jwtToken) && !D(o.jwtTokenUpdater)) {
357
357
  const c = o.jwtTokenUpdater();
358
- o.jwtToken = c, c.then((p) => {
359
- o.jwtToken = Promise.resolve(p), ye.saveActualDataToStorage("sc.token", p, Ee(p)), o.recalculateUserPermissions();
360
- }).catch(y);
358
+ o.jwtToken = c, c.then((u) => {
359
+ o.jwtToken = Promise.resolve(u), ye.saveActualDataToStorage("sc.token", u, We(u)), o.recalculateUserPermissions();
360
+ }).catch(f);
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), ye.saveActualDataToStorage("sc.token", o, Ee(o)), c.recalculateUserPermissions();
368
+ const c = H();
369
+ c.jwtToken = Promise.resolve(o), ye.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, ye.saveActualDataToStorage("sc.token", void 0);
374
374
  }
375
375
  function i(o) {
376
- const c = B();
377
- !A(c.jwtToken) && A(c.userPermissions) && c.jwtToken.then((m) => {
378
- const v = G.getJwtPayload(m);
379
- c.userPermissions = v.exp * 1e3 > Date.now() ? tr(v.resourceAccess, ($) => ($ == null ? void 0 : $.roles) ?? []) : void 0;
380
- }).catch(y);
381
- const p = Q(o) ? o.join(" && ") : o;
382
- if (c.userPermissionsComputedRefs.has(p))
383
- return c.userPermissionsComputedRefs.get(p);
384
- const u = a(() => {
385
- const m = (v) => {
386
- var _;
387
- const $ = $r(v, ".");
388
- if ($.length < 2)
376
+ const c = H();
377
+ !D(c.jwtToken) && D(c.userPermissions) && c.jwtToken.then((v) => {
378
+ const R = d.getJwtPayload(v);
379
+ c.userPermissions = R.exp * 1e3 > Date.now() ? sr(R.resourceAccess, (S) => (S == null ? void 0 : S.roles) ?? []) : void 0;
380
+ }).catch(f);
381
+ const u = Q(o) ? o.join(" && ") : o;
382
+ if (c.userPermissionsComputedRefs.has(u))
383
+ return c.userPermissionsComputedRefs.get(u);
384
+ const p = P(() => {
385
+ const v = (R) => {
386
+ var B;
387
+ const S = br(R, ".");
388
+ if (S.length < 2)
389
389
  return !1;
390
- const [I, k] = $, S = (_ = B().userPermissions) == null ? void 0 : _[I];
391
- return Q(S) && S.includes(k);
390
+ const [_, O] = S, G = (B = H().userPermissions) == null ? void 0 : B[_];
391
+ return Q(G) && G.includes(O);
392
392
  };
393
- return Q(o) ? Dr(o, (v) => m(v)) : m(o);
393
+ return Q(o) ? $r(o, (R) => v(R)) : v(o);
394
394
  });
395
- return c.userPermissionsComputedRefs.set(p, u), u;
395
+ return c.userPermissionsComputedRefs.set(u, p), p;
396
396
  }
397
397
  return {
398
398
  /**
@@ -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, 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) ?? "";
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) ?? "";
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 === "" : A(this.id);
448
+ return typeof this.id == "number" ? this.id === -1 : typeof this.id == "string" ? this.id === "" : D(this.id);
449
449
  }
450
450
  }
451
- class b extends H {
451
+ class b extends j {
452
452
  /**
453
453
  * Инициализирует экземпляр класса {@link NamedIdentity}.
454
454
  *
@@ -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 de extends nr {
500
+ class Oe extends or {
501
501
  /**
502
502
  * Инициализирует экземпляр класса {@link PrimaryCatalogableItem}.
503
503
  *
@@ -512,7 +512,7 @@ class de extends nr {
512
512
  this.isPrimary = (e == null ? void 0 : e.isPrimary) ?? !1;
513
513
  }
514
514
  }
515
- class ge extends de {
515
+ class ge extends Oe {
516
516
  /**
517
517
  * Инициализирует экземпляр класса {@link BaseCategory}.
518
518
  *
@@ -536,11 +536,11 @@ class ge extends de {
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]) => [Sr(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 P 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 C extends b {
544
544
  /**
545
545
  * Инициализирует экземпляр класса {@link Reference}.
546
546
  *
@@ -559,15 +559,15 @@ class P 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 ae extends P {
562
+ class Re extends C {
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: ar(!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 ae(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 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;
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 P {
618
+ class X extends C {
619
619
  }
620
- class Re extends P {
620
+ class Ae extends C {
621
621
  /**
622
622
  * Инициализирует экземпляр класса {@link Warehouse}.
623
623
  *
@@ -646,10 +646,10 @@ class Re extends P {
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 Re(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,14 +705,14 @@ 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
  *
712
712
  * @param data Данные для первоначальной инициализации.
713
713
  */
714
714
  constructor(e) {
715
- var i, o, c, p;
715
+ var i, o, c, u;
716
716
  super(e);
717
717
  /**
718
718
  * Артикул производителя/поставщика.
@@ -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 = 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((u) => new Mr(u))) ?? [], this.currencySignature = (e == null ? void 0 : e.currencySignature) ?? "", this.type = "product";
794
- const s = (e == null ? void 0 : e.category) ?? ((o = e == null ? void 0 : e.categories) == null ? void 0 : o.find((u) => u.isPrimary));
795
- s && (this.category = new de({ ...s, isPrimary: !0 }), this.categories = [this.category]), e != null && e.categories && (this.categories = e.categories.map((u) => new de(u))), this.images = ((c = e == null ? void 0 : e.images) == null ? void 0 : c.map((u) => new Br(u, D.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 = ((p = e == null ? void 0 : e.priceCoefficients) == null ? void 0 : p.map((u) => new Ge(u))) ?? [], e && "codeNumber" in e && !e.code && (this.code = e == null ? void 0 : e.codeNumber);
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 = y(e == null ? void 0 : e.costDate) ? w(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
+ 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 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, 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 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 = D.getConfig().catalog) == null ? void 0 : s.products.units;
802
+ const e = (s = T.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 ge(), 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 ge(), 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 fe {
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 d = class d {
964
+ const a = class a {
965
965
  /**
966
966
  * Инициализирует экземпляр класса {@link HttpRequester}.
967
967
  */
@@ -973,7 +973,7 @@ const d = class d {
973
973
  /**
974
974
  * Базовый URL путь для выполнения запросов.
975
975
  */
976
- t(this, "baseUrl", `${D.getConfig().http.portalApiUrl}/api`);
976
+ t(this, "baseUrl", `${T.getConfig().http.portalApiUrl}/api`);
977
977
  /**
978
978
  * Обработчик ошибок выполнения запросов текущего экземпляра класса.
979
979
  *
@@ -981,7 +981,7 @@ const d = class d {
981
981
  * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
982
982
  * @param disableNotifications Признак необходимости отключить уведомления об ошибках.
983
983
  */
984
- t(this, "errorResponseHandler", y);
984
+ t(this, "errorResponseHandler", f);
985
985
  /**
986
986
  * Список идентификаторов обработчиков запросов для возможности отключить те или иные обработчики.
987
987
  */
@@ -1000,7 +1000,7 @@ const d = class d {
1000
1000
  // eslint-disable-next-line class-methods-use-this
1001
1001
  t(this, "authRequestInterceptor", async (r) => {
1002
1002
  let e;
1003
- return A($e().jwtToken) || (e = await $e().jwtToken), e && r.headers.set("Authorization", `Bearer ${e}`), r;
1003
+ return D(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 d = class d {
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(xr(r.method)) && r.data && (r.data = Ee(r.data))), r));
1012
1012
  /**
1013
1013
  * Перехватчик ошибок ответов на запрос.
1014
1014
  *
@@ -1017,7 +1017,7 @@ const d = class d {
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) : ($e().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 d = class d {
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 = qe(r.data)), r));
1029
- const r = D.getConfig().version;
1030
- this.errorResponseHandler = d.defaultErrorsResponseHandler, this.httpClient = jr.create({
1028
+ t(this, "dataConverterResponseInterceptor", (r) => (r.data && (r.data = Fe(r.data)), r));
1029
+ const r = T.getConfig().version;
1030
+ this.errorResponseHandler = a.defaultErrorsResponseHandler, this.httpClient = Gr.create({
1031
1031
  headers: {
1032
- "APP-VERSION": `${r.name} (${r.version}, ${U(r.date, D.getConfig().dateFormats.uiDate)})`,
1032
+ "APP-VERSION": `${r.name} (${r.version}, ${q(r.date, T.getConfig().dateFormats.uiDate)})`,
1033
1033
  Accept: "application/json",
1034
1034
  "Content-Type": "application/json"
1035
1035
  }
@@ -1038,7 +1038,7 @@ const d = class d {
1038
1038
  (e) => Promise.reject(e)
1039
1039
  ), this.interceptorIds.response.convertHttpErrorResponseInterceptor = this.httpClient.interceptors.response.use(
1040
1040
  (e) => e,
1041
- (e) => d.convertHttpErrorResponse(e)
1041
+ (e) => a.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 d = class d {
1050
1050
  * @param handler Ссылка на функцию-обработчик ошибок.
1051
1051
  */
1052
1052
  static setDefaultErrorsResponseHandler(r) {
1053
- d.defaultErrorsResponseHandler = r;
1053
+ a.defaultErrorsResponseHandler = r;
1054
1054
  }
1055
1055
  /**
1056
1056
  * Возвращает экземпляр объекта текущего класса.
@@ -1058,7 +1058,7 @@ const d = class d {
1058
1058
  * @param type Тип данных, которыми оперирует метод.
1059
1059
  */
1060
1060
  static getInstance(r) {
1061
- return Object.prototype.hasOwnProperty.call(d.instances, r.name) || (d.instances[r.name] = Fe.simpleInstanceInitializer(r)), d.instances[r.name];
1061
+ return Object.prototype.hasOwnProperty.call(a.instances, r.name) || (a.instances[r.name] = je.simpleInstanceInitializer(r)), a.instances[r.name];
1062
1062
  }
1063
1063
  /**
1064
1064
  * Конвертирует данные ошибки HTTP запроса в более упрощённую и часто используемую форму.
@@ -1067,7 +1067,7 @@ const d = class d {
1067
1067
  */
1068
1068
  static convertHttpErrorResponse(r) {
1069
1069
  var e, s;
1070
- if (!A(r.request) || !A(r.response)) {
1070
+ if (!D(r.request) || !D(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 d = class d {
1156
1156
  * Экземпляр объекта текущего класса.
1157
1157
  */
1158
1158
  // eslint-disable-next-line no-use-before-define
1159
- t(d, "instances", {}), /**
1159
+ t(a, "instances", {}), /**
1160
1160
  * Базовый обработчик ошибок выполнения запросов.
1161
1161
  *
1162
1162
  * @param error Данные об ошибке.
1163
1163
  * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
1164
1164
  * @param disableNotifications Признак необходимости отключить уведомления об ошибках.
1165
1165
  */
1166
- t(d, "defaultErrorsResponseHandler", y);
1167
- let h = d;
1168
- class Ot extends h {
1166
+ t(a, "defaultErrorsResponseHandler", f);
1167
+ let h = a;
1168
+ class dt 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 ge {
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 ge {
1284
1284
  /**
1285
1285
  * Инициализирует экземпляр класса {@link Category}.
1286
1286
  *
@@ -1297,10 +1297,10 @@ class E extends ge {
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 b {
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 = w(e == null ? void 0 : e.updatedAt) ? C(e.updatedAt) : e == null ? void 0 : e.updatedAt;
1315
+ this.updatedAt = y(e == null ? void 0 : e.updatedAt) ? w(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 = w(e == null ? void 0 : e.deletedAt) ? C(e.deletedAt) : e == null ? void 0 : e.deletedAt;
1330
+ this.deletedAt = y(e == null ? void 0 : e.deletedAt) ? w(e.deletedAt) : e == null ? void 0 : e.deletedAt;
1331
1331
  }
1332
1332
  }
1333
- class F extends b {
1333
+ class U extends b {
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 b {
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 = 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 F(e == null ? void 0 : e.owner), this.deletedAt = w(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 = y(e == null ? void 0 : e.publishedAt) ? w(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 = y(e == null ? void 0 : e.deletedAt) ? w(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 = w(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 = y(e == null ? void 0 : e.createdAt) ? w(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,7 +1460,7 @@ 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 P {
1463
+ class x extends C {
1464
1464
  }
1465
1465
  class ce extends b {
1466
1466
  /**
@@ -1490,10 +1490,10 @@ class ce extends b {
1490
1490
  * @inheritDoc
1491
1491
  */
1492
1492
  t(this, "isRegionalDirector");
1493
- this.salesDirection = e != null && e.salesDirection ? new N(e.salesDirection) : new N(), this.photo = e == null ? void 0 : e.photo, this.contacts = e != null && e.contacts ? new Qr(e.contacts) : void 0, this.isDefault = (e == null ? void 0 : e.isDefault) ?? !1, this.isRegionalDirector = (e == null ? void 0 : e.isRegionalDirector) ?? !1;
1493
+ this.salesDirection = e != null && e.salesDirection ? new x(e.salesDirection) : new x(), 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;
1494
1494
  }
1495
1495
  }
1496
- class Yr extends b {
1496
+ class Xr extends b {
1497
1497
  /**
1498
1498
  * Инициализирует экземпляр класса {@link IUserPricingRole}.
1499
1499
  *
@@ -1516,7 +1516,7 @@ class Yr extends b {
1516
1516
  this.description = e.description, this.canChangeLowCost = e.canChangeLowCost, this.parentRoleId = e.parentRoleId;
1517
1517
  }
1518
1518
  }
1519
- class Ae extends ce {
1519
+ class De extends ce {
1520
1520
  /**
1521
1521
  * Инициализирует экземпляр класса {@link Manager}.
1522
1522
  *
@@ -1548,10 +1548,10 @@ class Ae extends ce {
1548
1548
  * Данные роли ценообразования менеджера.
1549
1549
  */
1550
1550
  t(this, "pricingRole");
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 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;
1552
1552
  }
1553
1553
  }
1554
- class Xr extends ge {
1554
+ class Zr extends ge {
1555
1555
  /**
1556
1556
  * Инициализирует экземпляр класса {@link BaseClientCategory}.
1557
1557
  *
@@ -1579,10 +1579,10 @@ class Xr extends ge {
1579
1579
  * Данные о менеджере за которым закреплена категория.
1580
1580
  */
1581
1581
  t(this, "manager");
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 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 De(e.manager) : void 0;
1583
1583
  }
1584
1584
  }
1585
- class we extends Xr {
1585
+ class we extends Zr {
1586
1586
  /**
1587
1587
  * Инициализирует экземпляр класса {@link ClientCategory}.
1588
1588
  *
@@ -1617,10 +1617,10 @@ class pr {
1617
1617
  * Процент, который прибавляется к значению выбранного коэффициента.
1618
1618
  */
1619
1619
  t(this, "increasePercent");
1620
- this.priceCoefficient = (r == null ? void 0 : r.priceCoefficient) && new ae(r.priceCoefficient), this.increasePercent = r == null ? void 0 : r.increasePercent;
1620
+ this.priceCoefficient = (r == null ? void 0 : r.priceCoefficient) && new Re(r.priceCoefficient), this.increasePercent = r == null ? void 0 : r.increasePercent;
1621
1621
  }
1622
1622
  }
1623
- class Te extends pr {
1623
+ class Se extends pr {
1624
1624
  /**
1625
1625
  * Инициализирует экземпляр класса {@link PriceTemplateProduct}.
1626
1626
  *
@@ -1635,9 +1635,9 @@ class Te extends pr {
1635
1635
  this.productCategory = new ge(e == null ? void 0 : e.productCategory);
1636
1636
  }
1637
1637
  }
1638
- class ee extends P {
1638
+ class ee extends C {
1639
1639
  }
1640
- class le extends P {
1640
+ class le extends C {
1641
1641
  /**
1642
1642
  * Инициализирует экземпляр класса {@link Region}.
1643
1643
  *
@@ -1652,7 +1652,7 @@ class le extends P {
1652
1652
  e && (this.country = new ee(e.country));
1653
1653
  }
1654
1654
  }
1655
- class Me extends P {
1655
+ class Be extends C {
1656
1656
  /**
1657
1657
  * Инициализирует экземпляр класса {@link CityWithRegionAndCountry}.
1658
1658
  *
@@ -1667,7 +1667,7 @@ class Me extends P {
1667
1667
  e && (this.region = new le(e.region));
1668
1668
  }
1669
1669
  }
1670
- class ur extends b {
1670
+ class hr extends b {
1671
1671
  /**
1672
1672
  * Инициализирует экземпляр класса {@link UserCommonInfo}.
1673
1673
  *
@@ -1703,10 +1703,10 @@ class ur extends b {
1703
1703
  * Признак активности учетной записи пользователя.
1704
1704
  */
1705
1705
  t(this, "isActive");
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 N(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;
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 x(e.salesDirection) : void 0, this.createdAt = y(e == null ? void 0 : e.createdAt) ? w(e.createdAt) : e == null ? void 0 : e.createdAt, this.lastLoginAt = y(e == null ? void 0 : e.lastLoginAt) ? w(e.lastLoginAt) : e == null ? void 0 : e.lastLoginAt, this.isActive = (e == null ? void 0 : e.isActive) ?? !1;
1707
1707
  }
1708
1708
  }
1709
- class me extends ur {
1709
+ class me extends hr {
1710
1710
  /**
1711
1711
  * Инициализирует экземпляр класса {@link Client}.
1712
1712
  *
@@ -1748,10 +1748,10 @@ class me extends ur {
1748
1748
  * Список менеджеров клиента.
1749
1749
  */
1750
1750
  t(this, "managers");
1751
- 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 x(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))) ?? [];
1752
1752
  }
1753
1753
  }
1754
- class se extends H {
1754
+ class se extends j {
1755
1755
  /**
1756
1756
  * Инициализирует новый экземпляр класса.
1757
1757
  *
@@ -1775,10 +1775,10 @@ class se extends H {
1775
1775
  * Данные шаблона прайс-листа.
1776
1776
  */
1777
1777
  t(this, "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 me(e == null ? void 0 : e.client), this.priceTemplate = new W(e == null ? void 0 : e.priceTemplate);
1778
+ this.createdAt = y(e == null ? void 0 : e.createdAt) ? w(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.deletedAt = y(e == null ? void 0 : e.deletedAt) ? w(e.deletedAt) : e == null ? void 0 : e.deletedAt, this.client = new me(e == null ? void 0 : e.client), this.priceTemplate = new W(e == null ? void 0 : e.priceTemplate);
1779
1779
  }
1780
1780
  }
1781
- class be extends pr {
1781
+ class ae extends pr {
1782
1782
  /**
1783
1783
  * Инициализирует экземпляр класса {@link PriceTemplateProduct}.
1784
1784
  *
@@ -1790,10 +1790,10 @@ class be extends pr {
1790
1790
  * Базовые данные о продукте.
1791
1791
  */
1792
1792
  t(this, "product");
1793
- this.product = new x(e == null ? void 0 : e.product);
1793
+ this.product = new I(e == null ? void 0 : e.product);
1794
1794
  }
1795
1795
  }
1796
- class hr extends P {
1796
+ class gr extends C {
1797
1797
  }
1798
1798
  class ie extends b {
1799
1799
  /**
@@ -1815,10 +1815,10 @@ class ie extends b {
1815
1815
  * Дополнительные метаданные свойства.
1816
1816
  */
1817
1817
  t(this, "metadata");
1818
- 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;
1819
1819
  }
1820
1820
  }
1821
- class z {
1821
+ class E {
1822
1822
  /**
1823
1823
  * Инициализирует экземпляр класса {@link PropertyValue}.
1824
1824
  *
@@ -1837,7 +1837,7 @@ class z {
1837
1837
  this.property = new ie(r == null ? void 0 : r.property), this.value = (r == null ? void 0 : r.value) ?? "";
1838
1838
  }
1839
1839
  }
1840
- class O {
1840
+ class k {
1841
1841
  /**
1842
1842
  * Инициализирует экземпляр класса {@link DatePeriod}.
1843
1843
  *
@@ -1852,7 +1852,7 @@ class O {
1852
1852
  * Окончание периода.
1853
1853
  */
1854
1854
  t(this, "to");
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;
1855
+ this.from = y(r == null ? void 0 : r.from) ? w(r.from) : (r == null ? void 0 : r.from) ?? null, this.to = y(r == null ? void 0 : r.to) ? w(r.to) : (r == null ? void 0 : r.to) ?? null;
1856
1856
  }
1857
1857
  }
1858
1858
  class Ut {
@@ -1877,12 +1877,12 @@ class Ut {
1877
1877
  /**
1878
1878
  * Период создания.
1879
1879
  */
1880
- t(this, "createdAt", new O());
1880
+ t(this, "createdAt", new k());
1881
1881
  /**
1882
1882
  * Период изменения.
1883
1883
  */
1884
- t(this, "updatedAt", new O());
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 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);
1886
1886
  }
1887
1887
  /**
1888
1888
  * Выполняет сброс указанного фильтра в значение по умолчанию.
@@ -1913,9 +1913,9 @@ class Ut {
1913
1913
  var e, s, i, o;
1914
1914
  const r = {};
1915
1915
  return Object.keys(this).forEach((c) => {
1916
- const p = this[c];
1916
+ const u = this[c];
1917
1917
  // eslint-disable-next-line prettier/prettier
1918
- A(p) || w(p) && p.trim().length === 0 || Ue(p.isNewRec) && p.isNewRec() || (r[c] = p);
1918
+ D(u) || y(u) && u.trim().length === 0 || Ue(u.isNewRec) && u.isNewRec() || (r[c] = u);
1919
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;
1920
1920
  }
1921
1921
  }
@@ -1954,7 +1954,7 @@ class ne extends b {
1954
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;
1955
1955
  }
1956
1956
  }
1957
- class We {
1957
+ class Je {
1958
1958
  /**
1959
1959
  * Инициализирует экземпляр класса {@link PricingRoleCategoryRule}.
1960
1960
  *
@@ -1973,10 +1973,10 @@ class We {
1973
1973
  * Минимальный коэффициент цены.
1974
1974
  */
1975
1975
  t(this, "minCoefficient");
1976
- this.role = new ne(r == null ? void 0 : r.role), this.category = new ge(r == null ? void 0 : r.category), this.minCoefficient = new ae(r == null ? void 0 : r.minCoefficient);
1976
+ this.role = new ne(r == null ? void 0 : r.role), this.category = new ge(r == null ? void 0 : r.category), this.minCoefficient = new Re(r == null ? void 0 : r.minCoefficient);
1977
1977
  }
1978
1978
  }
1979
- class Zr {
1979
+ class et {
1980
1980
  /**
1981
1981
  * Инициализирует экземпляр класса {@link DeviceTypeResolutionConfig}.
1982
1982
  *
@@ -1998,7 +1998,7 @@ class Zr {
1998
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;
1999
1999
  }
2000
2000
  }
2001
- class et {
2001
+ class rt {
2002
2002
  /**
2003
2003
  * Инициализирует экземпляр класса {@link HttpParamsConfig}.
2004
2004
  *
@@ -2028,7 +2028,7 @@ class et {
2028
2028
  this.portalApiUrl = (r == null ? void 0 : r.portalApiUrl) ?? "", this.priceHistoryApiUrl = (r == null ? void 0 : r.priceHistoryApiUrl) ?? "", this.recommendationsApiUrl = (r == null ? void 0 : r.recommendationsApiUrl) ?? "", this.mediaUrl = (r == null ? void 0 : r.mediaUrl) ?? "", this.responseDataCacheTimeout = (r == null ? void 0 : r.responseDataCacheTimeout) ?? 3 * 60 * 60;
2029
2029
  }
2030
2030
  }
2031
- class rt {
2031
+ class tt {
2032
2032
  /**
2033
2033
  * Инициализирует экземпляр класса {@link SentryConfig}.
2034
2034
  *
@@ -2073,7 +2073,7 @@ class rt {
2073
2073
  }, this.additionalParams = (r == null ? void 0 : r.additionalParams) ?? {};
2074
2074
  }
2075
2075
  }
2076
- class tt {
2076
+ class st {
2077
2077
  /**
2078
2078
  * Инициализирует экземпляр класса {@link VersionConfig}.
2079
2079
  *
@@ -2092,10 +2092,10 @@ class tt {
2092
2092
  * Текущая версия приложения.
2093
2093
  */
2094
2094
  t(this, "version");
2095
- 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";
2095
+ this.date = y(r == null ? void 0 : r.date) ? w(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";
2096
2096
  }
2097
2097
  }
2098
- class st {
2098
+ class it {
2099
2099
  /**
2100
2100
  * Инициализирует экземпляр класса {@link WebSocketConfig}.
2101
2101
  *
@@ -2134,7 +2134,7 @@ class st {
2134
2134
  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"];
2135
2135
  }
2136
2136
  }
2137
- class qt {
2137
+ class Ft {
2138
2138
  /**
2139
2139
  * Инициализирует экземпляр класса {@link AppBaseConfig}.
2140
2140
  *
@@ -2178,17 +2178,17 @@ class qt {
2178
2178
  */
2179
2179
  t(this, "dateFormats");
2180
2180
  var e, s, i;
2181
- 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({
2181
+ 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({
2182
2182
  environment: this.environment,
2183
2183
  ...r == null ? void 0 : r.sentry
2184
- }), 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 = {
2184
+ }), 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 = {
2185
2185
  api: ((e = r == null ? void 0 : r.dateFormats) == null ? void 0 : e.api) ?? "yyyy-MM-dd HH:mm:ss",
2186
2186
  uiDate: ((s = r == null ? void 0 : r.dateFormats) == null ? void 0 : s.uiDate) ?? "dd.MM.yyyy",
2187
2187
  uiDateWithTime: ((i = r == null ? void 0 : r.dateFormats) == null ? void 0 : i.uiDateWithTime) ?? "dd.MM.yyyy HH:mm"
2188
2188
  };
2189
2189
  }
2190
2190
  }
2191
- class Gt extends h {
2191
+ class Mt extends h {
2192
2192
  /**
2193
2193
  * Возвращает данные о результатах поиска категорий и товаров.
2194
2194
  *
@@ -2215,11 +2215,11 @@ class Gt extends h {
2215
2215
  */
2216
2216
  // eslint-disable-next-line class-methods-use-this
2217
2217
  getPriceExportLink(r = "csv", e = !1, s = void 0, i = void 0) {
2218
- let c = `${D.getConfig().http.portalApiUrl}/api/internal/price/export?format=${r}&show_hidden=${e}`;
2218
+ let c = `${T.getConfig().http.portalApiUrl}/api/internal/price/export?format=${r}&show_hidden=${e}`;
2219
2219
  return s && (c += `&category_id=${s}`), i && (c += `&client_id=${i}`), c;
2220
2220
  }
2221
2221
  }
2222
- class Ft extends h {
2222
+ class jt extends h {
2223
2223
  /**
2224
2224
  * Импортирует цены клиента из CSV файла.
2225
2225
  *
@@ -2418,7 +2418,7 @@ class Ft extends h {
2418
2418
  return this.post(`/internal/clients/${r}/price/commercial-offer/send`, e);
2419
2419
  }
2420
2420
  }
2421
- class jt extends h {
2421
+ class Gt extends h {
2422
2422
  /**
2423
2423
  * Возвращает список шаблонов прайс-листа привязанных к клиенту.
2424
2424
  *
@@ -2453,12 +2453,12 @@ class jt extends h {
2453
2453
  * @see /doc/api/internal#/operations/api_internal_client_price_template_attach
2454
2454
  */
2455
2455
  attachTemplate(r, e, s) {
2456
- const i = D.getConfig().dateFormats.api;
2456
+ const i = T.getConfig().dateFormats.api;
2457
2457
  return this.post(
2458
2458
  `/internal/clients/${r}/price/templates/${e}`,
2459
2459
  s && {
2460
- startAt: s.startAt && U(s.startAt, i),
2461
- endAt: s.endAt && U(s.endAt, i)
2460
+ startAt: s.startAt && q(s.startAt, i),
2461
+ endAt: s.endAt && q(s.endAt, i)
2462
2462
  },
2463
2463
  (o) => new se(o.data),
2464
2464
  {},
@@ -2487,12 +2487,12 @@ class jt extends h {
2487
2487
  * @see /doc/api/internal#/operations/api_internal_client_price_template_change
2488
2488
  */
2489
2489
  changeTemplate(r, e, s, i) {
2490
- const o = D.getConfig().dateFormats.api;
2490
+ const o = T.getConfig().dateFormats.api;
2491
2491
  return this.patch(
2492
2492
  `/internal/clients/${r}/price/templates/${e}/${s}`,
2493
2493
  i && {
2494
- startAt: i.startAt && U(i.startAt, o),
2495
- endAt: i.endAt && U(i.endAt, o)
2494
+ startAt: i.startAt && q(i.startAt, o),
2495
+ endAt: i.endAt && q(i.endAt, o)
2496
2496
  },
2497
2497
  (c) => new se(c.data)
2498
2498
  );
@@ -2510,7 +2510,7 @@ class jt extends h {
2510
2510
  return this.delete(`/internal/clients/${r}/price/templates/${e}/${s}`);
2511
2511
  }
2512
2512
  }
2513
- class Mt extends h {
2513
+ class Bt extends h {
2514
2514
  /**
2515
2515
  * Возвращает список данных о корневых категориях.
2516
2516
  *
@@ -2524,7 +2524,7 @@ class Mt extends h {
2524
2524
  {
2525
2525
  showHidden: r
2526
2526
  },
2527
- (e) => e.data.map((s) => new E(s))
2527
+ (e) => e.data.map((s) => new z(s))
2528
2528
  );
2529
2529
  }
2530
2530
  /**
@@ -2543,7 +2543,7 @@ class Mt extends h {
2543
2543
  showHidden: e,
2544
2544
  withNestedCategories: s
2545
2545
  },
2546
- (i) => new E(i.data)
2546
+ (i) => new z(i.data)
2547
2547
  );
2548
2548
  }
2549
2549
  /**
@@ -2552,7 +2552,7 @@ class Mt extends h {
2552
2552
  * @param categoryID Идентификатор категории продуктов.
2553
2553
  */
2554
2554
  getPublicCategoryData(r) {
2555
- return this.get(`/public/catalog/categories/${r}`, {}, (e) => new E(e.data));
2555
+ return this.get(`/public/catalog/categories/${r}`, {}, (e) => new z(e.data));
2556
2556
  }
2557
2557
  /**
2558
2558
  * Возвращает список продуктов категории.
@@ -2570,7 +2570,7 @@ class Mt extends h {
2570
2570
  showHidden: s,
2571
2571
  withPriceCoefficients: e
2572
2572
  },
2573
- (i) => he(i.data, (o) => new x(o))
2573
+ (i) => he(i.data, (o) => new I(o))
2574
2574
  );
2575
2575
  }
2576
2576
  /**
@@ -2583,7 +2583,7 @@ class Mt extends h {
2583
2583
  getCategoryProductsCoefficients(r) {
2584
2584
  return this.get(`/internal/catalog/categories/${r}/products/coefficients`, {}, (e) => {
2585
2585
  const { data: s } = e;
2586
- return Ir(s, (i) => i.map((o) => new Ge(o))), s;
2586
+ return Lr(s, (i) => i.map((o) => new Me(o))), s;
2587
2587
  });
2588
2588
  }
2589
2589
  /**
@@ -2595,7 +2595,7 @@ class Mt extends h {
2595
2595
  publicSimpleSearch(r, e = 10) {
2596
2596
  return new Promise((s, i) => {
2597
2597
  this.get(`/public/catalog/search/simple?limit=${e}&term=${r}`).then((o) => {
2598
- s(o.categories.map((c) => new E(c)));
2598
+ s(o.categories.map((c) => new z(c)));
2599
2599
  }).catch((o) => {
2600
2600
  i(o);
2601
2601
  });
@@ -2612,7 +2612,7 @@ class Ht extends h {
2612
2612
  * @see /doc/api/internal#/Каталог/api_internal_catalog_products_get
2613
2613
  */
2614
2614
  getProductData(r, e = !1) {
2615
- return this.get(`/internal/catalog/products/${r}`, { withPriceCoefficients: e }, (s) => new x(s.data));
2615
+ return this.get(`/internal/catalog/products/${r}`, { withPriceCoefficients: e }, (s) => new I(s.data));
2616
2616
  }
2617
2617
  /**
2618
2618
  * Возвращает публичные данные об указанном продукте.
@@ -2620,7 +2620,7 @@ class Ht extends h {
2620
2620
  * @param productId Идентификатор продукта.
2621
2621
  */
2622
2622
  getPublicProductData(r) {
2623
- return this.get(`/public/catalog/products/${r}`, {}, (e) => new x(e.data));
2623
+ return this.get(`/public/catalog/products/${r}`, {}, (e) => new I(e.data));
2624
2624
  }
2625
2625
  /**
2626
2626
  * Возвращает данные о коэффициентах цен для указанного продукта.
@@ -2633,7 +2633,7 @@ class Ht extends h {
2633
2633
  return this.get(
2634
2634
  `/internal/catalog/products/${r}/coefficients`,
2635
2635
  {},
2636
- (e) => he(e.data, (s) => new Ge(s))
2636
+ (e) => he(e.data, (s) => new Me(s))
2637
2637
  );
2638
2638
  }
2639
2639
  /**
@@ -2645,14 +2645,14 @@ class Ht extends h {
2645
2645
  publicSimpleSearch(r, e = 10) {
2646
2646
  return new Promise((s, i) => {
2647
2647
  this.get(`/public/catalog/search/simple?limit=${e}&term=${r}`).then((o) => {
2648
- s(o.products.map((c) => new x(c)));
2648
+ s(o.products.map((c) => new I(c)));
2649
2649
  }).catch((o) => {
2650
2650
  i(o);
2651
2651
  });
2652
2652
  });
2653
2653
  }
2654
2654
  }
2655
- class Bt extends h {
2655
+ class Et extends h {
2656
2656
  /**
2657
2657
  * Возвращает список данных о корневых категориях указанного клиента.
2658
2658
  *
@@ -2736,7 +2736,7 @@ class zt extends h {
2736
2736
  }
2737
2737
  }
2738
2738
  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 || {});
2739
- class Je {
2739
+ class Ve {
2740
2740
  /**
2741
2741
  * Инициализирует экземпляр класса {@link FilterItem}.
2742
2742
  *
@@ -2767,10 +2767,10 @@ class Je {
2767
2767
  field: this.field,
2768
2768
  op: this.op
2769
2769
  };
2770
- return r.value = ke(this.value) ? U(this.value, D.getConfig().dateFormats.api) : this.value, r;
2770
+ return r.value = ke(this.value) ? q(this.value, T.getConfig().dateFormats.api) : this.value, r;
2771
2771
  }
2772
2772
  }
2773
- class pe {
2773
+ class ue {
2774
2774
  /**
2775
2775
  * Инициализирует экземпляр класса {@link FilterGroup}.
2776
2776
  *
@@ -2790,7 +2790,7 @@ class pe {
2790
2790
  */
2791
2791
  t(this, "groups");
2792
2792
  var e, s;
2793
- 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 pe(i))) ?? [];
2793
+ 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))) ?? [];
2794
2794
  }
2795
2795
  /**
2796
2796
  * Преобразует группу фильтров в примитивное представление для API.
@@ -2800,12 +2800,12 @@ class pe {
2800
2800
  toPrimitive() {
2801
2801
  return {
2802
2802
  groupOp: this.groupOp,
2803
- filters: this.filters.map((r) => r instanceof Je && Ue(r.toPrimitive) ? r.toPrimitive() : r),
2804
- groups: this.groups.map((r) => r instanceof pe ? r.toPrimitive() : r)
2803
+ filters: this.filters.map((r) => r instanceof Ve && Ue(r.toPrimitive) ? r.toPrimitive() : r),
2804
+ groups: this.groups.map((r) => r instanceof ue ? r.toPrimitive() : r)
2805
2805
  };
2806
2806
  }
2807
2807
  }
2808
- class De extends h {
2808
+ class Te extends h {
2809
2809
  /**
2810
2810
  * Получает пагинированный список данных.
2811
2811
  *
@@ -2817,15 +2817,15 @@ class De extends h {
2817
2817
  * @param successHandler Обработчик успешного выполнения запроса.
2818
2818
  * @param disableDefaultNotificationErrorResponseHandler Признак отключения стандартного обработчика ошибок.
2819
2819
  */
2820
- getPaginated(r, e, s, i, o, c, p) {
2821
- let u = {
2820
+ getPaginated(r, e, s, i, o, c, u) {
2821
+ let p = {
2822
2822
  page: (i == null ? void 0 : i.page) ?? 1,
2823
2823
  perPage: (i == null ? void 0 : i.pageSize) ?? 10
2824
2824
  };
2825
- return e && (u.filters = JSON.stringify((e instanceof pe ? e : new pe(e)).toPrimitive())), Y(s) || (u.sort = Q(s) ? s : [s]), o && (u = { ...u, ...o }), this.get(r, u, c, p);
2825
+ 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);
2826
2826
  }
2827
2827
  }
2828
- class Et extends De {
2828
+ class Wt extends Te {
2829
2829
  /**
2830
2830
  * Возвращает список шаблонов прайс-листа.
2831
2831
  *
@@ -2897,7 +2897,7 @@ class Et extends De {
2897
2897
  return this.get(
2898
2898
  `/internal/price/templates/${r}/products`,
2899
2899
  {},
2900
- (e) => e.data.map((s) => new be(s))
2900
+ (e) => e.data.map((s) => new ae(s))
2901
2901
  );
2902
2902
  }
2903
2903
  /**
@@ -2909,7 +2909,7 @@ class Et extends De {
2909
2909
  * @see /doc/api/internal#/operations/api_internal_catalog_price_template_product_get
2910
2910
  */
2911
2911
  getProductTemplatePrice(r, e) {
2912
- return this.get(`/internal/price/templates/${r}/products/${e}`, {}, (s) => new be(s.data));
2912
+ return this.get(`/internal/price/templates/${r}/products/${e}`, {}, (s) => new ae(s.data));
2913
2913
  }
2914
2914
  /**
2915
2915
  * Сохраняет цену на продукт в шаблоне прайс-листа.
@@ -2928,7 +2928,7 @@ class Et extends De {
2928
2928
  price_coefficient_id: (i = s.coefficient) == null ? void 0 : i.id,
2929
2929
  increase_percent: s.value
2930
2930
  },
2931
- (o) => new be(o.data)
2931
+ (o) => new ae(o.data)
2932
2932
  );
2933
2933
  }
2934
2934
  /**
@@ -2953,7 +2953,7 @@ class Et extends De {
2953
2953
  return this.get(
2954
2954
  `/internal/price/templates/${r}/categories`,
2955
2955
  {},
2956
- (e) => e.data.map((s) => new Te(s))
2956
+ (e) => e.data.map((s) => new Se(s))
2957
2957
  );
2958
2958
  }
2959
2959
  /**
@@ -2968,7 +2968,7 @@ class Et extends De {
2968
2968
  return this.get(
2969
2969
  `/internal/price/templates/${r}/categories/${e}`,
2970
2970
  {},
2971
- (s) => new Te(s.data)
2971
+ (s) => new Se(s.data)
2972
2972
  );
2973
2973
  }
2974
2974
  /**
@@ -2994,7 +2994,7 @@ class Et extends De {
2994
2994
  },
2995
2995
  params: i ? { recursively: !0 } : {}
2996
2996
  },
2997
- (c) => new Te(c.data)
2997
+ (c) => new Se(c.data)
2998
2998
  );
2999
2999
  }
3000
3000
  /**
@@ -3029,7 +3029,7 @@ class Et extends De {
3029
3029
  );
3030
3030
  }
3031
3031
  }
3032
- class Wt extends h {
3032
+ class Jt extends h {
3033
3033
  /**
3034
3034
  * Возвращает список ролей ценообразования.
3035
3035
  *
@@ -3090,7 +3090,7 @@ class Wt extends h {
3090
3090
  return this.get(
3091
3091
  `/internal/price/roles/rules/categories/${r}`,
3092
3092
  {},
3093
- (e) => e.data.map((s) => new We(s))
3093
+ (e) => e.data.map((s) => new Je(s))
3094
3094
  );
3095
3095
  }
3096
3096
  /**
@@ -3105,11 +3105,11 @@ class Wt extends h {
3105
3105
  return this.patch(
3106
3106
  `/internal/price/roles/rules/categories/${r}`,
3107
3107
  e,
3108
- (s) => s.data.map((i) => new We(i))
3108
+ (s) => s.data.map((i) => new Je(i))
3109
3109
  );
3110
3110
  }
3111
3111
  }
3112
- class Jt extends De {
3112
+ class Vt extends Te {
3113
3113
  /**
3114
3114
  * Возвращает пагинированный список свойств.
3115
3115
  *
@@ -3185,7 +3185,7 @@ class Jt extends De {
3185
3185
  * @see /doc/api/internal#/operations/api_internal_catalog_product_properties_get_list
3186
3186
  */
3187
3187
  getProductProperties(r) {
3188
- return this.get(`/internal/catalog/products/${r}/properties`, {}, (e) => e.data.map((s) => new z(s)));
3188
+ return this.get(`/internal/catalog/products/${r}/properties`, {}, (e) => e.data.map((s) => new E(s)));
3189
3189
  }
3190
3190
  /**
3191
3191
  * Возвращает значение свойства продукта.
@@ -3195,7 +3195,7 @@ class Jt extends De {
3195
3195
  * @see /doc/api/internal#/operations/api_internal_catalog_product_properties_get
3196
3196
  */
3197
3197
  getProductProperty(r, e) {
3198
- return this.get(`/internal/catalog/products/${r}/properties/${e}`, {}, (s) => new z(s.data));
3198
+ return this.get(`/internal/catalog/products/${r}/properties/${e}`, {}, (s) => new E(s.data));
3199
3199
  }
3200
3200
  /**
3201
3201
  * Обновляет значение свойства продукта.
@@ -3206,7 +3206,7 @@ class Jt extends De {
3206
3206
  * @see /doc/api/internal#/operations/api_internal_catalog_product_properties_update
3207
3207
  */
3208
3208
  updateProductProperty(r, e, s) {
3209
- return this.patch(`/internal/catalog/products/${r}/properties/${e}`, { value: s }, (i) => new z(i.data));
3209
+ return this.patch(`/internal/catalog/products/${r}/properties/${e}`, { value: s }, (i) => new E(i.data));
3210
3210
  }
3211
3211
  /**
3212
3212
  * Удаляет значение свойства продукта.
@@ -3331,7 +3331,7 @@ class Jt extends De {
3331
3331
  * @see /doc/api/internal#/operations/api_internal_catalog_category_properties_get_list
3332
3332
  */
3333
3333
  getCategoryProperties(r) {
3334
- return this.get(`/internal/catalog/categories/${r}/properties`, {}, (e) => e.data.map((s) => new z(s)));
3334
+ return this.get(`/internal/catalog/categories/${r}/properties`, {}, (e) => e.data.map((s) => new E(s)));
3335
3335
  }
3336
3336
  /**
3337
3337
  * Возвращает значение свойства категории.
@@ -3341,7 +3341,7 @@ class Jt extends De {
3341
3341
  * @see /doc/api/internal#/operations/api_internal_catalog_category_properties_get
3342
3342
  */
3343
3343
  getCategoryProperty(r, e) {
3344
- return this.get(`/internal/catalog/categories/${r}/properties/${e}`, {}, (s) => new z(s.data));
3344
+ return this.get(`/internal/catalog/categories/${r}/properties/${e}`, {}, (s) => new E(s.data));
3345
3345
  }
3346
3346
  /**
3347
3347
  * Обновляет значение свойства категории.
@@ -3352,7 +3352,7 @@ class Jt extends De {
3352
3352
  * @see /doc/api/internal#/operations/api_internal_catalog_category_properties_update
3353
3353
  */
3354
3354
  updateCategoryProperty(r, e, s) {
3355
- return this.patch(`/internal/catalog/categories/${r}/properties/${e}`, { value: s }, (i) => new z(i.data));
3355
+ return this.patch(`/internal/catalog/categories/${r}/properties/${e}`, { value: s }, (i) => new E(i.data));
3356
3356
  }
3357
3357
  /**
3358
3358
  * Удаляет значение свойства категории.
@@ -3481,7 +3481,7 @@ class Jt extends De {
3481
3481
  return this.post(`/internal/catalog/categories/${r}/image`, { image: e });
3482
3482
  }
3483
3483
  }
3484
- function Ve(n, r, e) {
3484
+ function Ke(n, r, e) {
3485
3485
  let s;
3486
3486
  return n.some((i) => {
3487
3487
  if (i.type === e && i.id === r)
@@ -3490,35 +3490,35 @@ function Ve(n, r, e) {
3490
3490
  return !1;
3491
3491
  const o = i;
3492
3492
  if (o.products && o.products.length > 0) {
3493
- const c = Ve(o.products, r, e);
3493
+ const c = Ke(o.products, r, e);
3494
3494
  if (c)
3495
3495
  return s = c, !0;
3496
3496
  }
3497
3497
  if (o.categories && o.categories.length > 0) {
3498
- const c = Ve(o.categories, r, e);
3498
+ const c = Ke(o.categories, r, e);
3499
3499
  if (c)
3500
3500
  return s = c, !0;
3501
3501
  }
3502
3502
  return !1;
3503
3503
  }), s;
3504
3504
  }
3505
- function Ke(n) {
3505
+ function Qe(n) {
3506
3506
  const r = [];
3507
3507
  return n.forEach((e) => {
3508
3508
  if (r.push(e), e.type === "category") {
3509
3509
  const s = e;
3510
- s.products && s.products.length > 0 && r.push(...Ke(s.products)), s.categories && s.categories.length > 0 && r.push(...Ke(s.categories));
3510
+ s.products && s.products.length > 0 && r.push(...Qe(s.products)), s.categories && s.categories.length > 0 && r.push(...Qe(s.categories));
3511
3511
  }
3512
3512
  }), r;
3513
3513
  }
3514
- 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 || {}), L = /* @__PURE__ */ ((n) => (n.Person = "individual", n.Ic = "entrepreneur", n.UlR = "legal", n.UlNr = "non_resident_legal", n))(L || {});
3515
- class nt extends P {
3514
+ 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 || {}), N = /* @__PURE__ */ ((n) => (n.Person = "individual", n.Ic = "entrepreneur", n.UlR = "legal", n.UlNr = "non_resident_legal", n))(N || {});
3515
+ class ot extends C {
3516
3516
  }
3517
- class gr extends P {
3517
+ class mr extends C {
3518
3518
  }
3519
- class Vt extends P {
3519
+ class Kt extends C {
3520
3520
  }
3521
- class ot extends P {
3521
+ class ct extends C {
3522
3522
  }
3523
3523
  class Ce extends b {
3524
3524
  /**
@@ -3539,34 +3539,34 @@ class Ce extends b {
3539
3539
  e && (this.signature = e.signature ?? "", this.symbol = e.symbol ?? "");
3540
3540
  }
3541
3541
  }
3542
- class j extends P {
3542
+ class F extends C {
3543
3543
  /**
3544
3544
  * Возвращает сгенерированную запись-описание физического лица.
3545
3545
  */
3546
3546
  static generatePersonItem() {
3547
- return new j({
3547
+ return new F({
3548
3548
  id: 1,
3549
3549
  guid: "",
3550
- slug: L.Person,
3550
+ slug: N.Person,
3551
3551
  name: ""
3552
3552
  });
3553
3553
  }
3554
3554
  }
3555
- class ct extends P {
3555
+ class lt extends C {
3556
3556
  }
3557
- class lt extends P {
3557
+ class ut extends C {
3558
3558
  }
3559
- class re extends P {
3559
+ class re extends C {
3560
3560
  }
3561
- class pt extends P {
3561
+ class pt extends C {
3562
3562
  }
3563
- class ut extends P {
3563
+ class ht extends C {
3564
3564
  }
3565
- class mr extends P {
3565
+ class fr extends C {
3566
3566
  }
3567
- class fr extends P {
3567
+ class yr extends C {
3568
3568
  }
3569
- class xe extends H {
3569
+ class qe extends j {
3570
3570
  /**
3571
3571
  * Инициализирует экземпляр класса {@link BankAccount}.
3572
3572
  *
@@ -3648,10 +3648,10 @@ class M extends Ne {
3648
3648
  * Дата и время последнего удаления.
3649
3649
  */
3650
3650
  t(this, "deletedAt");
3651
- 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;
3651
+ 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 = y(e == null ? void 0 : e.deletedAt) ? w(e.deletedAt) : e == null ? void 0 : e.deletedAt;
3652
3652
  }
3653
3653
  }
3654
- class yr extends b {
3654
+ class wr extends b {
3655
3655
  /**
3656
3656
  * Инициализирует экземпляр класса {@link ContragentBase}.
3657
3657
  *
@@ -3667,11 +3667,11 @@ class yr extends b {
3667
3667
  /**
3668
3668
  * Данные об организационно-правовой форме.
3669
3669
  */
3670
- t(this, "opf", j.generatePersonItem());
3670
+ t(this, "opf", F.generatePersonItem());
3671
3671
  /**
3672
3672
  * Направление продаж.
3673
3673
  */
3674
- t(this, "salesDirection", new N());
3674
+ t(this, "salesDirection", new x());
3675
3675
  /**
3676
3676
  * Группа партнеров (направление деятельности).
3677
3677
  */
@@ -3709,7 +3709,7 @@ class yr extends b {
3709
3709
  */
3710
3710
  t(this, "updater");
3711
3711
  if (e) {
3712
- if (this.opf = new j(e.opf), this.salesDirection = new N(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 F(e.creator) : void 0, this.updatedAt = w(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) {
3712
+ if (this.opf = new F(e.opf), this.salesDirection = new x(e.salesDirection), this.comment = e.comment, this.alternativeName = e.alternativeName, this.createdAt = y(e == null ? void 0 : e.createdAt) ? w(e.createdAt) : e.createdAt, this.creator = e.creator ? new U(e.creator) : void 0, this.updatedAt = y(e == null ? void 0 : e.updatedAt) ? w(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) {
3713
3713
  const s = [];
3714
3714
  e.contacts.forEach((i) => {
3715
3715
  s.push(new M(i));
@@ -3718,13 +3718,13 @@ class yr extends b {
3718
3718
  if (e.bankAccounts) {
3719
3719
  const s = [];
3720
3720
  e.bankAccounts.forEach((i) => {
3721
- s.push(new xe(i));
3721
+ s.push(new qe(i));
3722
3722
  }), this.bankAccounts = s;
3723
3723
  }
3724
3724
  }
3725
3725
  }
3726
3726
  }
3727
- class ht extends yr {
3727
+ class gt extends wr {
3728
3728
  /**
3729
3729
  * Инициализирует экземпляр класса {@link ContragentPerson}.
3730
3730
  *
@@ -3734,7 +3734,7 @@ class ht extends yr {
3734
3734
  super(r);
3735
3735
  }
3736
3736
  }
3737
- class wr extends yr {
3737
+ class Cr extends wr {
3738
3738
  /**
3739
3739
  * Инициализирует экземпляр класса {@link ContragentIc}.
3740
3740
  *
@@ -3777,7 +3777,7 @@ class wr extends yr {
3777
3777
  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 ?? "");
3778
3778
  }
3779
3779
  }
3780
- class Cr extends wr {
3780
+ class vr extends Cr {
3781
3781
  /**
3782
3782
  * Инициализирует экземпляр класса {@link ContragentUlR}.
3783
3783
  *
@@ -3792,7 +3792,7 @@ class Cr extends wr {
3792
3792
  e && (this.kpp = e.kpp ?? "");
3793
3793
  }
3794
3794
  }
3795
- class gt extends Cr {
3795
+ class mt extends vr {
3796
3796
  /**
3797
3797
  * Инициализирует экземпляр класса {@link ContragentUlNr}.
3798
3798
  *
@@ -3823,18 +3823,18 @@ class ve {
3823
3823
  */
3824
3824
  static createInstance(r) {
3825
3825
  switch (r.opf.slug) {
3826
- case L.Ic:
3827
- return new wr(r);
3828
- case L.UlR:
3826
+ case N.Ic:
3829
3827
  return new Cr(r);
3830
- case L.UlNr:
3831
- return new gt(r);
3828
+ case N.UlR:
3829
+ return new vr(r);
3830
+ case N.UlNr:
3831
+ return new mt(r);
3832
3832
  default:
3833
- return new ht(r);
3833
+ return new gt(r);
3834
3834
  }
3835
3835
  }
3836
3836
  }
3837
- class Se extends H {
3837
+ class Ie extends j {
3838
3838
  /**
3839
3839
  * Инициализирует экземпляр класса {@link ContactRelation}.
3840
3840
  *
@@ -3849,7 +3849,7 @@ class Se extends H {
3849
3849
  this.isPrimary = e.isPrimary;
3850
3850
  }
3851
3851
  }
3852
- class mt extends M {
3852
+ class ft extends M {
3853
3853
  /**
3854
3854
  * Инициализирует экземпляр класса {@link ContactPersonRelated}.
3855
3855
  *
@@ -3874,10 +3874,10 @@ class mt extends M {
3874
3874
  */
3875
3875
  addresses: []
3876
3876
  });
3877
- e.relations && (e.relations.addresses && (this.relations.addresses = e.relations.addresses.map((s) => new Se(s))), e.relations.clients && (this.relations.clients = e.relations.clients.map((s) => new Se(s))), e.relations.contragents && (this.relations.contragents = e.relations.contragents.map((s) => new Se(s))));
3877
+ e.relations && (e.relations.addresses && (this.relations.addresses = e.relations.addresses.map((s) => new Ie(s))), e.relations.clients && (this.relations.clients = e.relations.clients.map((s) => new Ie(s))), e.relations.contragents && (this.relations.contragents = e.relations.contragents.map((s) => new Ie(s))));
3878
3878
  }
3879
3879
  }
3880
- class Pe extends Vr {
3880
+ class Pe extends Kr {
3881
3881
  /**
3882
3882
  * Инициализирует экземпляр класса {@link DeliveryAddress}.
3883
3883
  *
@@ -3914,10 +3914,10 @@ class Pe extends Vr {
3914
3914
  * Признак того, что указанный адрес является адресом транспортной компании.
3915
3915
  */
3916
3916
  t(this, "isTransportCompanyAddress");
3917
- 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;
3917
+ 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;
3918
3918
  }
3919
3919
  }
3920
- class Qe extends me {
3920
+ class Ye extends me {
3921
3921
  /**
3922
3922
  * Инициализирует экземпляр класса {@link Client}.
3923
3923
  *
@@ -3928,53 +3928,57 @@ class Qe extends me {
3928
3928
  var s, i, o, c;
3929
3929
  super(e);
3930
3930
  /**
3931
- * Список контрагентов клиента.
3931
+ * @inheritDoc
3932
3932
  */
3933
3933
  t(this, "contragents");
3934
3934
  /**
3935
- * Список групп партнеров (направлений деятельности), к которым относится клиент.
3935
+ * @inheritDoc
3936
3936
  */
3937
3937
  t(this, "partnerGroups");
3938
3938
  /**
3939
- * Список контактов клиента.
3939
+ * @inheritDoc
3940
3940
  */
3941
3941
  t(this, "contacts");
3942
3942
  /**
3943
- * Список адресов доставки.
3943
+ * @inheritDoc
3944
3944
  */
3945
3945
  t(this, "deliveryAddresses");
3946
3946
  /**
3947
- * Канал первичного интереса.
3947
+ * @inheritDoc
3948
3948
  */
3949
3949
  t(this, "channelPrimaryInterest");
3950
3950
  /**
3951
- * Источник первичного интереса.
3951
+ * @inheritDoc
3952
3952
  */
3953
3953
  t(this, "sourcePrimaryInterest");
3954
3954
  /**
3955
- * Предпочтительный тип доставки.
3955
+ * @inheritDoc
3956
3956
  */
3957
3957
  t(this, "preferredDeliveryType");
3958
3958
  /**
3959
- * Первичный спрос.
3959
+ * @inheritDoc
3960
3960
  */
3961
3961
  t(this, "primaryDemand");
3962
3962
  /**
3963
- * Признак того, что клиента необходимо исключить из прозвонника.
3963
+ * @inheritDoc
3964
3964
  */
3965
3965
  t(this, "isExcludedFromMsCallsToClients");
3966
3966
  /**
3967
- * Предпочтительный склад для самовывоза.
3967
+ * @inheritDoc
3968
+ */
3969
+ t(this, "reasonExcludedFromMsCallsToClients");
3970
+ /**
3971
+ * @inheritDoc
3968
3972
  */
3969
3973
  t(this, "preferredWarehouse");
3970
3974
  /**
3971
- * Дополнительные данные о клиенте.
3975
+ * @inheritDoc
3972
3976
  */
3973
3977
  t(this, "extraData");
3974
- this.contragents = ((s = e == null ? void 0 : e.contragents) == null ? void 0 : s.map((p) => ve.createInstance(p))) ?? [], this.partnerGroups = ((i = e == null ? void 0 : e.partnerGroups) == null ? void 0 : i.map((p) => new re(p))) ?? [], this.contacts = ((o = e == null ? void 0 : e.contacts) == null ? void 0 : o.map((p) => new M(p))) ?? [], this.deliveryAddresses = ((c = e == null ? void 0 : e.deliveryAddresses) == null ? void 0 : c.map((p) => new Pe(p))) ?? [], 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 Re(e.preferredWarehouse) : void 0, this.extraData = (e == null ? void 0 : e.extraData) ?? {};
3978
+ 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) ?? {};
3975
3979
  }
3976
3980
  }
3977
- class Kt {
3981
+ class Qt {
3978
3982
  /**
3979
3983
  * Инициализирует экземпляр класса {@link ClientsListFilters}.
3980
3984
  *
@@ -3982,99 +3986,103 @@ class Kt {
3982
3986
  */
3983
3987
  constructor(r) {
3984
3988
  /**
3985
- * Идентификатор клиента.
3989
+ * @inheritDoc
3986
3990
  */
3987
3991
  t(this, "id");
3988
3992
  /**
3989
- * Название клиента.
3993
+ * @inheritDoc
3990
3994
  */
3991
3995
  t(this, "name");
3992
3996
  /**
3993
- * Альтернативное название клиента.
3997
+ * @inheritDoc
3994
3998
  */
3995
3999
  t(this, "alternativeName");
3996
4000
  /**
3997
- * Строка запроса для поиска клиентов.
4001
+ * @inheritDoc
3998
4002
  */
3999
4003
  t(this, "searchTerm");
4000
4004
  /**
4001
- * Данные о городах.
4005
+ * @inheritDoc
4002
4006
  */
4003
4007
  t(this, "cities");
4004
4008
  /**
4005
- * Данные о регионе.
4009
+ * @inheritDoc
4006
4010
  */
4007
4011
  t(this, "region");
4008
4012
  /**
4009
- * Данные о стране.
4013
+ * @inheritDoc
4010
4014
  */
4011
4015
  t(this, "country");
4012
4016
  /**
4013
- * Номер телефона.
4017
+ * @inheritDoc
4014
4018
  */
4015
4019
  t(this, "phone");
4016
4020
  /**
4017
- * Адрес электронной почты.
4021
+ * @inheritDoc
4018
4022
  */
4019
4023
  t(this, "email");
4020
4024
  /**
4021
- * Признак необходимости отображения скрытых/деактивированных клиентов.
4025
+ * @inheritDoc
4022
4026
  */
4023
4027
  t(this, "isActive");
4024
4028
  /**
4025
- * Период регистрации.
4029
+ * @inheritDoc
4026
4030
  */
4027
- t(this, "createdAt", new O());
4031
+ t(this, "createdAt", new k());
4028
4032
  /**
4029
- * Период последнего входа.
4033
+ * @inheritDoc
4030
4034
  */
4031
- t(this, "lastLoginDate", new O());
4035
+ t(this, "lastLoginDate", new k());
4032
4036
  /**
4033
- * Признак того, что в указанный период последнего входа, клиентом был сделан заказ.
4037
+ * @inheritDoc
4034
4038
  */
4035
4039
  t(this, "lastLoginDateHasOrder");
4036
4040
  /**
4037
- * Данные о менеджерах клиентов.
4041
+ * @inheritDoc
4038
4042
  */
4039
4043
  t(this, "managers");
4040
4044
  /**
4041
- * Признак того, что наличие менеджера у клиента является обязательным.
4045
+ * @inheritDoc
4042
4046
  */
4043
4047
  t(this, "isManagerRequired");
4044
4048
  /**
4045
- * Направления продаж.
4049
+ * @inheritDoc
4046
4050
  */
4047
4051
  t(this, "salesDirections");
4048
4052
  /**
4049
- * ИНН контрагента.
4053
+ * @inheritDoc
4050
4054
  */
4051
4055
  t(this, "contragentInn");
4052
4056
  /**
4053
- * Тип организационно-правовой формы контрагента.
4057
+ * @inheritDoc
4054
4058
  */
4055
4059
  t(this, "contragentType");
4056
4060
  /**
4057
- * Предпочитаемый тип доставки.
4061
+ * @inheritDoc
4058
4062
  */
4059
4063
  t(this, "preferredDeliveryType");
4060
4064
  /**
4061
- * Группы партнеров (направление деятельности).
4065
+ * @inheritDoc
4062
4066
  */
4063
4067
  t(this, "partnerGroups");
4064
4068
  /**
4065
- * Данные контактного лица.
4069
+ * @inheritDoc
4066
4070
  */
4067
4071
  t(this, "contact");
4068
4072
  /**
4069
- * Данные о параметрах поиска последнего заказа который сделал пользователь.
4073
+ * @inheritDoc
4070
4074
  */
4071
4075
  t(this, "lastOrder");
4072
- var e, s, i, o, c, p;
4073
- 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((u) => new Me(u)), 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((u) => new Ae(u)) : [], this.salesDirections = (s = r == null ? void 0 : r.salesDirections) == null ? void 0 : s.map((u) => new N(u)), 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((u) => new re(u)), this.contact = new Ne(r == null ? void 0 : r.contact), this.lastOrder = {
4074
- createdAt: new O((o = r == null ? void 0 : r.lastOrder) == null ? void 0 : o.createdAt),
4076
+ /**
4077
+ * @inheritDoc
4078
+ */
4079
+ t(this, "isExcludedFromMsCallsToClients");
4080
+ var e, s, i, o, c, u;
4081
+ 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 De(p)) : [], this.salesDirections = (s = r == null ? void 0 : r.salesDirections) == null ? void 0 : s.map((p) => new x(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 = {
4082
+ createdAt: new k((o = r == null ? void 0 : r.lastOrder) == null ? void 0 : o.createdAt),
4075
4083
  creator: (c = r == null ? void 0 : r.lastOrder) == null ? void 0 : c.creator,
4076
- isApproved: (p = r == null ? void 0 : r.lastOrder) == null ? void 0 : p.isApproved
4077
- };
4084
+ isApproved: (u = r == null ? void 0 : r.lastOrder) == null ? void 0 : u.isApproved
4085
+ }, this.isExcludedFromMsCallsToClients = r == null ? void 0 : r.isExcludedFromMsCallsToClients;
4078
4086
  }
4079
4087
  /**
4080
4088
  * Выполняет сброс указанного фильтра в значение по умолчанию.
@@ -4083,15 +4091,6 @@ class Kt {
4083
4091
  */
4084
4092
  resetFilterValue(r) {
4085
4093
  switch (r) {
4086
- case "id":
4087
- case "phone":
4088
- case "email":
4089
- case "name":
4090
- case "alternativeName":
4091
- case "searchTerm":
4092
- case "contragentInn":
4093
- this[r] = void 0;
4094
- break;
4095
4094
  case "cities":
4096
4095
  this.cities = [];
4097
4096
  break;
@@ -4107,9 +4106,6 @@ class Kt {
4107
4106
  case "lastLoginDate":
4108
4107
  this.lastLoginDate.from = null, this.lastLoginDate.to = null;
4109
4108
  break;
4110
- case "lastLoginDateHasOrder":
4111
- this.lastLoginDateHasOrder = void 0;
4112
- break;
4113
4109
  case "lastOrder":
4114
4110
  this.lastOrder = {};
4115
4111
  break;
@@ -4120,7 +4116,7 @@ class Kt {
4120
4116
  this.salesDirections = [];
4121
4117
  break;
4122
4118
  case "contragentType":
4123
- this.contragentType = new j();
4119
+ this.contragentType = new F();
4124
4120
  break;
4125
4121
  case "preferredDeliveryType":
4126
4122
  this.preferredDeliveryType = new X();
@@ -4131,6 +4127,9 @@ class Kt {
4131
4127
  case "contact":
4132
4128
  this.contact = new Ne();
4133
4129
  break;
4130
+ default:
4131
+ this[r] = void 0;
4132
+ break;
4134
4133
  }
4135
4134
  return this;
4136
4135
  }
@@ -4142,13 +4141,13 @@ class Kt {
4142
4141
  var e, s, i, o;
4143
4142
  const r = {};
4144
4143
  return Object.keys(this).forEach((c) => {
4145
- const p = this[c];
4144
+ const u = this[c];
4146
4145
  // eslint-disable-next-line prettier/prettier
4147
- A(p) || w(p) && p.trim().length === 0 || Ue(p.isNewRec) && p.isNewRec() || (r[c] = p);
4146
+ D(u) || y(u) && u.trim().length === 0 || Ue(u.isNewRec) && u.isNewRec() || (r[c] = u);
4148
4147
  }), !((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;
4149
4148
  }
4150
4149
  }
4151
- class vr extends H {
4150
+ class Pr extends j {
4152
4151
  /**
4153
4152
  * Инициализирует экземпляр класса {@link OrderShortInfo}.
4154
4153
  *
@@ -4168,10 +4167,10 @@ class vr extends H {
4168
4167
  * Признак того, что заказ подтвержден в 1С.
4169
4168
  */
4170
4169
  t(this, "isApproved1c");
4171
- this.createdAt = w(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;
4170
+ this.createdAt = y(e == null ? void 0 : e.createdAt) ? w(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;
4172
4171
  }
4173
4172
  }
4174
- class ft extends b {
4173
+ class yt extends b {
4175
4174
  /**
4176
4175
  * Инициализирует экземпляр класса {@link ClientAdditionalData}.
4177
4176
  *
@@ -4204,10 +4203,10 @@ class ft extends b {
4204
4203
  * Список менеджеров.
4205
4204
  */
4206
4205
  t(this, "managers");
4207
- (s = e.contacts) != null && s.length && (this.contacts = e.contacts.map((o) => new M(o))), e.lastOrder && (this.lastOrder = new vr(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)));
4206
+ (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 x(e.salesDirection)), e.managers && (this.managers = e.managers.map((o) => new ce(o)));
4208
4207
  }
4209
4208
  }
4210
- class yt {
4209
+ class wt {
4211
4210
  /**
4212
4211
  * Инициализирует экземпляр класса {@link DataTablePaginationRequestParams}.
4213
4212
  *
@@ -4225,7 +4224,7 @@ class yt {
4225
4224
  this.page = (r == null ? void 0 : r.page) ?? 1, this.pageSize = (r == null ? void 0 : r.pageSize) ?? 50;
4226
4225
  }
4227
4226
  }
4228
- class Qt extends yt {
4227
+ class Yt extends wt {
4229
4228
  /**
4230
4229
  * Инициализирует экземпляр класса {@link DataTablePagination}.
4231
4230
  *
@@ -4256,7 +4255,7 @@ class Qt extends yt {
4256
4255
  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;
4257
4256
  }
4258
4257
  }
4259
- class Yt {
4258
+ class Xt {
4260
4259
  /**
4261
4260
  * Инициализирует экземпляр класса {@link ISortRequestParams}.
4262
4261
  *
@@ -4274,7 +4273,144 @@ class Yt {
4274
4273
  this.field = (r == null ? void 0 : r.field) ?? "", this.direction = (r == null ? void 0 : r.direction) ?? "asc";
4275
4274
  }
4276
4275
  }
4277
- class Xt extends De {
4276
+ class L extends Te {
4277
+ /**
4278
+ * Преобразует данные о клиенте в данные требуемые для запроса.
4279
+ *
4280
+ * @param client Данные о клиенте.
4281
+ */
4282
+ static transformClientDataToRequest(r) {
4283
+ var s;
4284
+ const e = {
4285
+ name: r.name,
4286
+ alternative_name: r.alternativeName,
4287
+ partner_groups: r.partnerGroups.map((i) => i.id),
4288
+ phone: r.phone,
4289
+ email: r.email,
4290
+ city_id: r.city.id,
4291
+ get_news: r.getNews,
4292
+ channel_primary_interest_id: r.channelPrimaryInterest.id,
4293
+ source_primary_interest_id: r.sourcePrimaryInterest.id,
4294
+ primary_demand: r.primaryDemand,
4295
+ is_excluded_from_ms_calls_to_clients: r.isExcludedFromMsCallsToClients,
4296
+ preferred_warehouse_id: (s = r.preferredWarehouse) == null ? void 0 : s.id
4297
+ };
4298
+ return r.isExcludedFromMsCallsToClients && (e.reason_excluded_from_ms_calls_to_clients = r.reasonExcludedFromMsCallsToClients), e;
4299
+ }
4300
+ /**
4301
+ * Преобразует данные о контрагенте клиента в данные требуемые для запроса.
4302
+ *
4303
+ * @param contragent Данные о контрагенте клиента.
4304
+ */
4305
+ static transformContragentClientDataToRequest(r) {
4306
+ var c, u, p, v, R, S, _, O;
4307
+ let e;
4308
+ const s = r, i = r, o = r;
4309
+ switch (r.opf.slug) {
4310
+ case N.Ic:
4311
+ e = {
4312
+ opf: s.opf.slug,
4313
+ name: s.name,
4314
+ alternative_name: s.alternativeName,
4315
+ partner_group_id: (c = s.partnerGroup) == null ? void 0 : c.id,
4316
+ manager_id: (u = s.manager) == null ? void 0 : u.id,
4317
+ comment: s.comment,
4318
+ inn: s.inn,
4319
+ okpo: s.okpo,
4320
+ director_name: s.directorName,
4321
+ director_position: s.directorPosition,
4322
+ director_acts_on: s.directorActsOn,
4323
+ legal_address: s.legalAddress,
4324
+ postal_address: s.postalAddress,
4325
+ actual_address: s.actualAddress
4326
+ };
4327
+ break;
4328
+ case N.UlR:
4329
+ e = {
4330
+ opf: i.opf.slug,
4331
+ name: i.name,
4332
+ alternative_name: i.alternativeName,
4333
+ partner_group_id: (p = i.partnerGroup) == null ? void 0 : p.id,
4334
+ manager_id: (v = i.manager) == null ? void 0 : v.id,
4335
+ comment: i.comment,
4336
+ inn: i.inn,
4337
+ kpp: i.kpp,
4338
+ okpo: i.okpo,
4339
+ director_name: i.directorName,
4340
+ director_position: i.directorPosition,
4341
+ director_acts_on: i.directorActsOn,
4342
+ legal_address: i.legalAddress,
4343
+ postal_address: i.postalAddress,
4344
+ actual_address: i.actualAddress
4345
+ };
4346
+ break;
4347
+ case N.UlNr:
4348
+ e = {
4349
+ opf: o.opf.slug,
4350
+ name: o.name,
4351
+ alternative_name: o.alternativeName,
4352
+ partner_group_id: (R = o.partnerGroup) == null ? void 0 : R.id,
4353
+ manager_id: (S = o.manager) == null ? void 0 : S.id,
4354
+ comment: o.comment,
4355
+ director_name: o.directorName,
4356
+ director_position: o.directorPosition,
4357
+ director_acts_on: o.directorActsOn,
4358
+ legal_address: o.legalAddress,
4359
+ postal_address: o.postalAddress,
4360
+ actual_address: o.actualAddress,
4361
+ registration_country_id: o.registrationCountry.id,
4362
+ registration_number: o.registrationNumber,
4363
+ tax_number: o.taxNumber || void 0
4364
+ };
4365
+ break;
4366
+ default:
4367
+ e = {
4368
+ opf: r.opf.slug,
4369
+ name: r.name,
4370
+ alternative_name: r.alternativeName,
4371
+ partner_group_id: (_ = r.partnerGroup) == null ? void 0 : _.id,
4372
+ manager_id: (O = r.manager) == null ? void 0 : O.id,
4373
+ comment: r.comment
4374
+ };
4375
+ break;
4376
+ }
4377
+ return e;
4378
+ }
4379
+ /**
4380
+ * Преобразует данные об адресе доставки клиенту в данные требуемые для запроса.
4381
+ *
4382
+ * @param deliveryAddress Данные об адресе доставки клиенту.
4383
+ */
4384
+ static transformClientDeliveryAddressToRequest(r) {
4385
+ var s, i;
4386
+ const e = {
4387
+ address: r.address,
4388
+ is_one_time: r.isOneTime ?? !1,
4389
+ is_transport_company_address: r.isTransportCompanyAddress ?? !1,
4390
+ comment: r.comment ?? ""
4391
+ };
4392
+ return r.coordinates && (e.coordinates = {
4393
+ lat: (s = r.coordinates) == null ? void 0 : s.lat,
4394
+ long: (i = r.coordinates) == null ? void 0 : i.long
4395
+ }), r.operatingHours && (e.operating_hours = {
4396
+ from: r.operatingHours.from,
4397
+ to: r.operatingHours.to
4398
+ }), e;
4399
+ }
4400
+ /**
4401
+ * Преобразует данные о банковских реквизитах контрагента в данные требуемые для запроса.
4402
+ *
4403
+ * @param bankAccount Данные о банковских реквизитах контрагента.
4404
+ */
4405
+ static transformClientContragentBankAccountToRequest(r) {
4406
+ return {
4407
+ bank_name: r.bankName,
4408
+ bic: r.bic,
4409
+ account_number: r.accountNumber,
4410
+ correspondent_account: r.correspondentAccount,
4411
+ currency_id: r.currency.id
4412
+ };
4413
+ }
4278
4414
  /**
4279
4415
  * Возвращает данные об указанном клиенте.
4280
4416
  *
@@ -4282,7 +4418,7 @@ class Xt extends De {
4282
4418
  * @see /doc/api/internal#/Клиенты/api_internal_client_get_full_info
4283
4419
  */
4284
4420
  getClient(r) {
4285
- return this.get(`/internal/clients/${r}`, {}, (e) => new Qe(e.data));
4421
+ return this.get(`/internal/clients/${r}`, {}, (e) => new Ye(e.data));
4286
4422
  }
4287
4423
  /**
4288
4424
  * Возвращает данные о клиентах, удовлетворяющих указанным параметрам поиска.
@@ -4297,7 +4433,7 @@ class Xt extends De {
4297
4433
  getClientsList(r, e, s, i) {
4298
4434
  return this.getPaginated("/internal/clients", r, e, s, i, (o) => {
4299
4435
  const c = { ...o.data };
4300
- return c.data = c.data.map((p) => new me(p)), c;
4436
+ return c.data = c.data.map((u) => new me(u)), c;
4301
4437
  });
4302
4438
  }
4303
4439
  /**
@@ -4324,7 +4460,7 @@ class Xt extends De {
4324
4460
  const s = r.map((i) => i.id);
4325
4461
  return this.post("/internal/clients/additional-data", { clients: s, requested_data_types: e }, (i) => {
4326
4462
  let o = [];
4327
- return (i == null ? void 0 : i.data.length) > 0 && (o = i.data.map((c) => new ft(c))), o;
4463
+ return (i == null ? void 0 : i.data.length) > 0 && (o = i.data.map((c) => new yt(c))), o;
4328
4464
  });
4329
4465
  }
4330
4466
  /**
@@ -4336,70 +4472,42 @@ class Xt extends De {
4336
4472
  getAllClientContacts(r) {
4337
4473
  return this.get(`/internal/clients/${r}/contacts/all`, {}, (e) => {
4338
4474
  let s = [];
4339
- return (e == null ? void 0 : e.data.length) > 0 && (s = e.data.map((i) => new mt(i))), s;
4475
+ return (e == null ? void 0 : e.data.length) > 0 && (s = e.data.map((i) => new ft(i))), s;
4340
4476
  });
4341
4477
  }
4342
4478
  /**
4343
4479
  * Создаёт нового клиента на основе указанных данных.
4344
4480
  *
4345
4481
  * @param client Данные о клиенте.
4346
- * @param validationFieldResultData Список полей, для которых необходимо
4347
- * установить данные об ошибках валидации
4348
- * в случае ошибок в запросах.
4482
+ * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
4349
4483
  * @see /doc/api/internal#/Клиенты/api_internal_client_create
4350
4484
  */
4351
4485
  createClientCommonData(r, e = {}) {
4352
- var s;
4353
- return this.post(
4354
- "/internal/clients",
4355
- {
4356
- name: r.name,
4357
- alternative_name: r.alternativeName,
4358
- partner_groups: r.partnerGroups.map((i) => i.id),
4359
- phone: r.phone,
4360
- email: r.email,
4361
- city_id: r.city.id,
4362
- get_news: r.getNews,
4363
- channel_primary_interest_id: r.channelPrimaryInterest.id,
4364
- source_primary_interest_id: r.sourcePrimaryInterest.id,
4365
- primary_demand: r.primaryDemand,
4366
- is_excluded_from_ms_calls_to_clients: r.isExcludedFromMsCallsToClients,
4367
- preferred_warehouse_id: (s = r.preferredWarehouse) == null ? void 0 : s.id
4368
- },
4369
- (i) => new Qe(i.data),
4370
- e
4371
- );
4486
+ return this.post("/internal/clients", L.transformClientDataToRequest(r), (s) => new Ye(s.data), e);
4372
4487
  }
4373
4488
  /**
4374
4489
  * Обновляет данные указанного клиента.
4375
4490
  *
4376
4491
  * @param client Данные о клиенте.
4377
- * @param validationFieldResultData Список полей, для которых необходимо
4378
- * установить данные об ошибках валидации
4379
- * в случае ошибок в запросах.
4492
+ * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
4380
4493
  * @see /doc/api/internal#/Клиенты/api_internal_client_change
4381
4494
  */
4382
4495
  updateClientCommonData(r, e = {}) {
4383
- var s;
4384
- return this.patch(
4385
- `/internal/clients/${r.id}`,
4386
- {
4387
- name: r.name,
4388
- alternative_name: r.alternativeName,
4389
- partner_groups: r.partnerGroups.map((i) => i.id),
4390
- phone: r.phone,
4391
- email: r.email,
4392
- city_id: r.city.id,
4393
- get_news: r.getNews,
4394
- channel_primary_interest_id: r.channelPrimaryInterest.id,
4395
- source_primary_interest_id: r.sourcePrimaryInterest.id,
4396
- primary_demand: r.primaryDemand,
4397
- is_excluded_from_ms_calls_to_clients: r.isExcludedFromMsCallsToClients,
4398
- preferred_warehouse_id: (s = r.preferredWarehouse) == null ? void 0 : s.id
4399
- },
4400
- void 0,
4401
- e
4402
- );
4496
+ return this.patch(`/internal/clients/${r.id}`, L.transformClientDataToRequest(r), void 0, e);
4497
+ }
4498
+ /**
4499
+ * Обновляет данные "Не беспокоить" указанного клиента.
4500
+ *
4501
+ * @param client Данные о клиенте.
4502
+ * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
4503
+ * @see /doc/api/internal#/Клиенты/api_internal_client_change
4504
+ */
4505
+ updateClientNotDistribCommonData(r, e = {}) {
4506
+ const s = {
4507
+ get_news: r.getNews,
4508
+ is_excluded_from_ms_calls_to_clients: r.isExcludedFromMsCallsToClients
4509
+ };
4510
+ return r.isExcludedFromMsCallsToClients && (s.reason_excluded_from_ms_calls_to_clients = r.reasonExcludedFromMsCallsToClients), this.patch(`/internal/clients/${r.id}`, s, void 0, e);
4403
4511
  }
4404
4512
  /**
4405
4513
  * Изменяет пароль клиента.
@@ -4407,9 +4515,7 @@ class Xt extends De {
4407
4515
  * @param clientId Идентификатор клиента которому необходимо поменять пароль.
4408
4516
  * @param password Новый пароль.
4409
4517
  * @param passwordConfirm Пароль-подтверждение.
4410
- * @param validationFieldResultData Список полей, для которых необходимо
4411
- * установить данные об ошибках валидации
4412
- * в случае ошибок в запросах.
4518
+ * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
4413
4519
  * @see /doc/api/internal#/Клиенты/api_internal_client_change
4414
4520
  */
4415
4521
  changeClientPassword(r, e, s, i = {}) {
@@ -4470,87 +4576,14 @@ class Xt extends De {
4470
4576
  *
4471
4577
  * @param clientId Идентификатор клиента, к которому необходимо привязать контрагента.
4472
4578
  * @param contragent Данные о контрагенте клиента.
4473
- * @param validationFieldResultData Список полей, для которых необходимо
4474
- * установить данные об ошибках валидации
4475
- * в случае ошибок в запросах.
4579
+ * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
4476
4580
  * @see /doc/api/internal#/Контрагенты/api_internal_client_contragent_create
4477
4581
  */
4478
4582
  createContragentClientData(r, e, s = {}) {
4479
- var u, m, v, $, I, k, S, _;
4480
- let i;
4481
- const o = e, c = e, p = e;
4482
- switch (e.opf.slug) {
4483
- case L.Ic:
4484
- i = {
4485
- opf: o.opf.slug,
4486
- name: o.name,
4487
- alternative_name: o.alternativeName,
4488
- partner_group_id: (u = o.partnerGroup) == null ? void 0 : u.id,
4489
- manager_id: (m = o.manager) == null ? void 0 : m.id,
4490
- comment: o.comment,
4491
- inn: o.inn,
4492
- okpo: o.okpo,
4493
- director_name: o.directorName,
4494
- director_position: o.directorPosition,
4495
- director_acts_on: o.directorActsOn,
4496
- legal_address: o.legalAddress,
4497
- postal_address: o.postalAddress,
4498
- actual_address: o.actualAddress
4499
- };
4500
- break;
4501
- case L.UlR:
4502
- i = {
4503
- opf: c.opf.slug,
4504
- name: c.name,
4505
- alternative_name: c.alternativeName,
4506
- partner_group_id: (v = c.partnerGroup) == null ? void 0 : v.id,
4507
- manager_id: ($ = c.manager) == null ? void 0 : $.id,
4508
- comment: c.comment,
4509
- inn: c.inn,
4510
- kpp: c.kpp,
4511
- okpo: c.okpo,
4512
- director_name: c.directorName,
4513
- director_position: c.directorPosition,
4514
- director_acts_on: c.directorActsOn,
4515
- legal_address: c.legalAddress,
4516
- postal_address: c.postalAddress,
4517
- actual_address: c.actualAddress
4518
- };
4519
- break;
4520
- case L.UlNr:
4521
- i = {
4522
- opf: p.opf.slug,
4523
- name: p.name,
4524
- alternative_name: p.alternativeName,
4525
- partner_group_id: (I = p.partnerGroup) == null ? void 0 : I.id,
4526
- manager_id: (k = p.manager) == null ? void 0 : k.id,
4527
- comment: p.comment,
4528
- director_name: p.directorName,
4529
- director_position: p.directorPosition,
4530
- director_acts_on: p.directorActsOn,
4531
- legal_address: p.legalAddress,
4532
- postal_address: p.postalAddress,
4533
- actual_address: p.actualAddress,
4534
- registration_country_id: p.registrationCountry.id,
4535
- registration_number: p.registrationNumber,
4536
- tax_number: p.taxNumber || void 0
4537
- };
4538
- break;
4539
- default:
4540
- i = {
4541
- opf: e.opf.slug,
4542
- name: e.name,
4543
- alternative_name: e.alternativeName,
4544
- partner_group_id: (S = e.partnerGroup) == null ? void 0 : S.id,
4545
- manager_id: (_ = e.manager) == null ? void 0 : _.id,
4546
- comment: e.comment
4547
- };
4548
- break;
4549
- }
4550
4583
  return this.post(
4551
4584
  `/internal/clients/${r}/contragents`,
4552
- i,
4553
- (q) => ve.createInstance(q.data),
4585
+ L.transformContragentClientDataToRequest(e),
4586
+ (i) => ve.createInstance(i.data),
4554
4587
  s
4555
4588
  );
4556
4589
  }
@@ -4559,87 +4592,14 @@ class Xt extends De {
4559
4592
  *
4560
4593
  * @param clientId Идентификатор клиента, к которому привязан контрагент.
4561
4594
  * @param contragent Данные о контрагенте клиента.
4562
- * @param validationFieldResultData Список полей, для которых необходимо
4563
- * установить данные об ошибках валидации
4564
- * в случае ошибок в запросах.
4595
+ * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
4565
4596
  * @see /doc/api/internal#/Контрагенты/api_internal_client_contragent_update
4566
4597
  */
4567
4598
  updateContragentClientData(r, e, s = {}) {
4568
- var u, m, v, $, I, k, S, _;
4569
- let i;
4570
- const o = e, c = e, p = e;
4571
- switch (e.opf.slug) {
4572
- case L.Ic:
4573
- i = {
4574
- opf: o.opf.slug,
4575
- name: o.name,
4576
- alternative_name: o.alternativeName,
4577
- partner_group_id: (u = o.partnerGroup) == null ? void 0 : u.id,
4578
- manager_id: (m = o.manager) == null ? void 0 : m.id,
4579
- comment: o.comment,
4580
- inn: o.inn,
4581
- okpo: o.okpo,
4582
- director_name: o.directorName,
4583
- director_position: o.directorPosition,
4584
- director_acts_on: o.directorActsOn,
4585
- legal_address: o.legalAddress,
4586
- postal_address: o.postalAddress,
4587
- actual_address: o.actualAddress
4588
- };
4589
- break;
4590
- case L.UlR:
4591
- i = {
4592
- opf: c.opf.slug,
4593
- name: c.name,
4594
- alternative_name: c.alternativeName,
4595
- partner_group_id: (v = c.partnerGroup) == null ? void 0 : v.id,
4596
- manager_id: ($ = c.manager) == null ? void 0 : $.id,
4597
- comment: c.comment,
4598
- inn: c.inn,
4599
- kpp: c.kpp,
4600
- okpo: c.okpo,
4601
- director_name: c.directorName,
4602
- director_position: c.directorPosition,
4603
- director_acts_on: c.directorActsOn,
4604
- legal_address: c.legalAddress,
4605
- postal_address: c.postalAddress,
4606
- actual_address: c.actualAddress
4607
- };
4608
- break;
4609
- case L.UlNr:
4610
- i = {
4611
- opf: p.opf.slug,
4612
- name: p.name,
4613
- alternative_name: p.alternativeName,
4614
- partner_group_id: (I = p.partnerGroup) == null ? void 0 : I.id,
4615
- manager_id: (k = p.manager) == null ? void 0 : k.id,
4616
- comment: p.comment,
4617
- director_name: p.directorName,
4618
- director_position: p.directorPosition,
4619
- director_acts_on: p.directorActsOn,
4620
- legal_address: p.legalAddress,
4621
- postal_address: p.postalAddress,
4622
- actual_address: p.actualAddress,
4623
- registration_country_id: p.registrationCountry.id,
4624
- registration_number: p.registrationNumber,
4625
- tax_number: p.taxNumber || void 0
4626
- };
4627
- break;
4628
- default:
4629
- i = {
4630
- opf: e.opf.slug,
4631
- name: e.name,
4632
- alternative_name: e.alternativeName,
4633
- partner_group_id: (S = e.partnerGroup) == null ? void 0 : S.id,
4634
- manager_id: (_ = e.manager) == null ? void 0 : _.id,
4635
- comment: e.comment
4636
- };
4637
- break;
4638
- }
4639
4599
  return this.patch(
4640
4600
  `/internal/clients/${r}/contragents/${e.id}`,
4641
- i,
4642
- (q) => ve.createInstance(q.data),
4601
+ L.transformContragentClientDataToRequest(e),
4602
+ (i) => ve.createInstance(i.data),
4643
4603
  s
4644
4604
  );
4645
4605
  }
@@ -4658,55 +4618,30 @@ class Xt extends De {
4658
4618
  *
4659
4619
  * @param clientId Идентификатор клиента, к которому необходимо привязать адрес доставки.
4660
4620
  * @param deliveryAddress Данные об адресе доставки.
4661
- * @param validationFieldResultData Список полей, для которых необходимо
4662
- * установить данные об ошибках валидации
4663
- * в случае ошибок в запросах.
4621
+ * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
4664
4622
  * @see /doc/api/internal#/Адреса доставки/api_internal_client_delivery_address_create
4665
4623
  */
4666
4624
  createClientDeliveryAddress(r, e, s = {}) {
4667
- var o, c;
4668
- const i = {
4669
- address: e.address,
4670
- is_one_time: e.isOneTime ?? !1,
4671
- is_transport_company_address: e.isTransportCompanyAddress ?? !1,
4672
- comment: e.comment ?? ""
4673
- };
4674
- return e.coordinates && (i.coordinates = {
4675
- lat: (o = e.coordinates) == null ? void 0 : o.lat,
4676
- long: (c = e.coordinates) == null ? void 0 : c.long
4677
- }), e.operatingHours && (i.operating_hours = {
4678
- from: e.operatingHours.from,
4679
- to: e.operatingHours.to
4680
- }), this.post(`/internal/clients/${r}/delivery-addresses`, i, (p) => new Pe(p.data), s);
4625
+ return this.post(
4626
+ `/internal/clients/${r}/delivery-addresses`,
4627
+ L.transformClientDeliveryAddressToRequest(e),
4628
+ (i) => new Pe(i.data),
4629
+ s
4630
+ );
4681
4631
  }
4682
4632
  /**
4683
4633
  * Обновляет данные об адресе доставки клиента.
4684
4634
  *
4685
4635
  * @param clientId Идентификатор клиента, к которому привязан адрес доставки.
4686
4636
  * @param deliveryAddress Данные об адресе доставки.
4687
- * @param validationFieldResultData Список полей, для которых необходимо
4688
- * установить данные об ошибках валидации
4689
- * в случае ошибок в запросах.
4637
+ * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
4690
4638
  * @see /doc/api/internal#/Адреса доставки/api_internal_client_delivery_address_update
4691
4639
  */
4692
4640
  updateClientDeliveryAddress(r, e, s = {}) {
4693
- var o, c;
4694
- const i = {
4695
- address: e.address,
4696
- is_one_time: e.isOneTime ?? !1,
4697
- is_transport_company_address: e.isTransportCompanyAddress ?? !1,
4698
- comment: e.comment ?? ""
4699
- };
4700
- return e.operatingHours && (i.operating_hours = {
4701
- from: e.operatingHours.from,
4702
- to: e.operatingHours.to
4703
- }), e.coordinates && (i.coordinates = {
4704
- lat: (o = e.coordinates) == null ? void 0 : o.lat,
4705
- long: (c = e.coordinates) == null ? void 0 : c.long
4706
- }), this.patch(
4641
+ return this.patch(
4707
4642
  `/internal/clients/${r}/delivery-addresses/${e.id}`,
4708
- i,
4709
- (p) => new Pe(p.data),
4643
+ L.transformClientDeliveryAddressToRequest(e),
4644
+ (i) => new Pe(i.data),
4710
4645
  s
4711
4646
  );
4712
4647
  }
@@ -4724,25 +4659,16 @@ class Xt extends De {
4724
4659
  * Создаёт новую запись банковских реквизитов контрагента.
4725
4660
  *
4726
4661
  * @param clientId Идентификатор клиента, к которому необходимо привязать банковские реквизиты.
4727
- * @param contragentId Идентификатор контрагента, к которому необходимо
4728
- * привязать банковские реквизиты.
4662
+ * @param contragentId Идентификатор контрагента, к которому необходимо привязать банковские реквизиты.
4729
4663
  * @param bankAccount Данные банковских реквизитов.
4730
- * @param validationFieldResultData Список полей, для которых необходимо
4731
- * установить данные об ошибках валидации
4732
- * в случае ошибок в запросах.
4664
+ * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
4733
4665
  * @see /doc/api/internal#/Банковские реквизиты/api_internal_client_contragent_bank_accounts_create
4734
4666
  */
4735
4667
  createContragentBankAccount(r, e, s, i = {}) {
4736
4668
  return this.post(
4737
4669
  `/internal/clients/${r}/contragents/${e}/bank-accounts`,
4738
- {
4739
- bank_name: s.bankName,
4740
- bic: s.bic,
4741
- account_number: s.accountNumber,
4742
- correspondent_account: s.correspondentAccount,
4743
- currency_id: s.currency.id
4744
- },
4745
- (o) => new xe(o.data),
4670
+ L.transformClientContragentBankAccountToRequest(s),
4671
+ (o) => new qe(o.data),
4746
4672
  i
4747
4673
  );
4748
4674
  }
@@ -4750,25 +4676,16 @@ class Xt extends De {
4750
4676
  * Обновляет данные о банковских реквизитах контрагента.
4751
4677
  *
4752
4678
  * @param clientId Идентификатор клиента, к которому необходимо привязать банковские реквизиты.
4753
- * @param contragentId Идентификатор контрагента, к которому необходимо
4754
- * привязать банковские реквизиты.
4679
+ * @param contragentId Идентификатор контрагента, к которому необходимо привязать банковские реквизиты.
4755
4680
  * @param bankAccount Данные банковских реквизитов.
4756
- * @param validationFieldResultData Список полей, для которых необходимо
4757
- * установить данные об ошибках валидации
4758
- * в случае ошибок в запросах.
4681
+ * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
4759
4682
  * @see /doc/api/internal#/Адреса доставки/api_internal_client_delivery_address_update
4760
4683
  */
4761
4684
  updateContragentBankAccount(r, e, s, i = {}) {
4762
4685
  return this.patch(
4763
4686
  `/internal/clients/${r}/contragents/${e}/bank-accounts/${s.id}`,
4764
- {
4765
- bank_name: s.bankName,
4766
- bic: s.bic,
4767
- account_number: s.accountNumber,
4768
- correspondent_account: s.correspondentAccount,
4769
- currency_id: s.currency.id
4770
- },
4771
- (o) => new xe(o.data),
4687
+ L.transformClientContragentBankAccountToRequest(s),
4688
+ (o) => new qe(o.data),
4772
4689
  i
4773
4690
  );
4774
4691
  }
@@ -4776,8 +4693,7 @@ class Xt extends De {
4776
4693
  * Удаляет указанные банковские реквизиты контрагента.
4777
4694
  *
4778
4695
  * @param clientId Идентификатор клиента, к которому необходимо привязать банковские реквизиты.
4779
- * @param contragentId Идентификатор контрагента, к которому необходимо
4780
- * привязать банковские реквизиты.
4696
+ * @param contragentId Идентификатор контрагента, к которому необходимо привязать банковские реквизиты.
4781
4697
  * @param bankAccount Данные банковских реквизитов.
4782
4698
  * @see /doc/api/internal#/Банковские реквизиты/api_internal_client_contragent_bank_accounts_delete
4783
4699
  */
@@ -4789,9 +4705,7 @@ class Xt extends De {
4789
4705
  *
4790
4706
  * @param clientId Идентификатор клиента, к которому привязано контактное лицо.
4791
4707
  * @param contactPerson Данные о контактном лице.
4792
- * @param validationFieldResultData Список полей, для которых необходимо
4793
- * установить данные об ошибках валидации
4794
- * в случае ошибок в запросах.
4708
+ * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
4795
4709
  * @see /doc/api/internal#/Контакты/api_internal_client_contact_create
4796
4710
  */
4797
4711
  createClientContact(r, e, s = {}) {
@@ -4813,9 +4727,7 @@ class Xt extends De {
4813
4727
  *
4814
4728
  * @param clientId Идентификатор клиента, к которому привязано контактное лицо.
4815
4729
  * @param contactPerson Данные о контактном лице.
4816
- * @param validationFieldResultData Список полей, для которых необходимо
4817
- * установить данные об ошибках валидации
4818
- * в случае ошибок в запросах.
4730
+ * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
4819
4731
  * @see /doc/api/internal#/Контакты/api_internal_client_contact_change
4820
4732
  */
4821
4733
  updateClientContact(r, e, s = {}) {
@@ -4859,9 +4771,7 @@ class Xt extends De {
4859
4771
  * @param clientId Идентификатор клиента, к которому привязано контактное лицо.
4860
4772
  * @param contragentId Идентификатор контрагента, к которому привязано контактное лицо.
4861
4773
  * @param contactPerson Данные о контактном лице.
4862
- * @param validationFieldResultData Список полей, для которых необходимо
4863
- * установить данные об ошибках валидации
4864
- * в случае ошибок в запросах.
4774
+ * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
4865
4775
  * @see /doc/api/internal#/Контакты/api_internal_client_contact_create
4866
4776
  */
4867
4777
  createContragentContact(r, e, s, i = {}) {
@@ -4908,9 +4818,7 @@ class Xt extends De {
4908
4818
  * @param clientId Идентификатор клиента, к которому привязано контактное лицо.
4909
4819
  * @param deliveryAddressId Идентификатор контрагента, к которому привязано контактное лицо.
4910
4820
  * @param contactPerson Данные о контактном лице.
4911
- * @param validationFieldResultData Список полей, для которых необходимо
4912
- * установить данные об ошибках валидации
4913
- * в случае ошибок в запросах.
4821
+ * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
4914
4822
  * @see /doc/api/internal#/Контакты/api_internal_client_contact_create
4915
4823
  */
4916
4824
  createDeliveryAddressContact(r, e, s, i = {}) {
@@ -4960,19 +4868,17 @@ class Xt extends De {
4960
4868
  * @param clientId Идентификатор клиента, к которому привязано контактное лицо.
4961
4869
  * @param contactPerson Данные о контактном лице.
4962
4870
  * @param extraData Дополнительные данные
4963
- * @param validationFieldResultData Список полей, для которых необходимо
4964
- * установить данные об ошибках валидации
4965
- * в случае ошибок в запросах.
4871
+ * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
4966
4872
  */
4967
4873
  createContact(r, e, s, i = {}) {
4968
- var c, p;
4874
+ var c, u;
4969
4875
  const o = {
4970
4876
  name: e.name,
4971
4877
  position: e.position,
4972
4878
  comment: e.comment,
4973
4879
  ...s
4974
4880
  };
4975
- return (c = e.phone) != null && c.length && (o.phone = e.phone), (p = e.email) != null && p.length && (o.email = e.email), this.post(`/internal/clients/${r}/contacts`, o, (u) => new M(u.data), i);
4881
+ return (c = e.phone) != null && c.length && (o.phone = e.phone), (u = e.email) != null && u.length && (o.email = e.email), this.post(`/internal/clients/${r}/contacts`, o, (p) => new M(p.data), i);
4976
4882
  }
4977
4883
  /**
4978
4884
  * Устанавливает признак основного контактного лица.
@@ -5011,7 +4917,7 @@ const V = class V extends h {
5011
4917
  * Время кэширования данных ответов на запросы (секунд).
5012
4918
  */
5013
4919
  t(this, "responseDataCacheTimeout");
5014
- this.responseDataCacheTimeout = D.getConfig().http.responseDataCacheTimeout;
4920
+ this.responseDataCacheTimeout = T.getConfig().http.responseDataCacheTimeout;
5015
4921
  }
5016
4922
  /**
5017
4923
  * Возвращает кэшированные данные.
@@ -5048,10 +4954,10 @@ const V = class V extends h {
5048
4954
  */
5049
4955
  // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
5050
4956
  getTypedDataArrayRequester(e, s, i = !1, o = {}) {
5051
- const c = s + (Y(o) ? "" : ` >>> ${JSON.stringify(o)}`), p = i ? V.getCachedResponse(c) : void 0;
5052
- return p ? Promise.resolve(p) : this.get(s, o).then((u) => {
5053
- const m = u.map((v) => Fe.instanceInitializer(e, v));
5054
- return i && m && this.cacheResponse(s, m), m;
4957
+ const c = s + (Y(o) ? "" : ` >>> ${JSON.stringify(o)}`), u = i ? V.getCachedResponse(c) : void 0;
4958
+ return u ? Promise.resolve(u) : this.get(s, o).then((p) => {
4959
+ const v = p.map((R) => je.instanceInitializer(e, R));
4960
+ return i && v && this.cacheResponse(s, v), v;
5055
4961
  });
5056
4962
  }
5057
4963
  };
@@ -5059,7 +4965,7 @@ const V = class V extends h {
5059
4965
  * Кэш результатов запросов.
5060
4966
  */
5061
4967
  t(V, "responseDataCache", /* @__PURE__ */ new Map());
5062
- let ue = V;
4968
+ let pe = V;
5063
4969
  class Zt extends h {
5064
4970
  /**
5065
4971
  * Выполняет проверку занят ли указанный номер телефона.
@@ -5102,7 +5008,7 @@ class es extends h {
5102
5008
  const i = this.get(
5103
5009
  `internal/catalog/categories/${r.id}/configurators/${(o = r.properties) == null ? void 0 : o.configurator}/product`,
5104
5010
  { params: e },
5105
- (c) => new x(c.data)
5011
+ (c) => new I(c.data)
5106
5012
  );
5107
5013
  return i.catch((c) => {
5108
5014
  this.errorResponseHandler(c, s);
@@ -5150,13 +5056,13 @@ class rs {
5150
5056
  * Возвращает диапазон дат по умолчанию.
5151
5057
  */
5152
5058
  static defaultDateRanges() {
5153
- const r = Lr(/* @__PURE__ */ new Date(), 1);
5059
+ const r = _r(/* @__PURE__ */ new Date(), 1);
5154
5060
  return {
5155
5061
  // 'Следующий рабочий день' - это значение по-умолчанию
5156
- nextWorkingDay: { label: "Следующий рабочий день", from: Gr(r), to: qr(r) },
5157
- today: { label: "Сегодня", from: Le(), to: Ur() },
5158
- yesterday: { label: "Вчера", from: Or(), to: Nr() },
5159
- tomorrow: { label: "Завтра", from: xr(), to: dr() }
5062
+ nextWorkingDay: { label: "Следующий рабочий день", from: Mr(r), to: Fr(r) },
5063
+ today: { label: "Сегодня", from: _e(), to: Ur() },
5064
+ yesterday: { label: "Вчера", from: dr(), to: Nr() },
5065
+ tomorrow: { label: "Завтра", from: qr(), to: Or() }
5160
5066
  };
5161
5067
  }
5162
5068
  }
@@ -5200,13 +5106,13 @@ const K = class K {
5200
5106
  * Список единиц измерения линейной величины.
5201
5107
  */
5202
5108
  t(K, "linearValues", ["пог.м.", "м.", "м2"]);
5203
- let Ye = K;
5109
+ let Xe = K;
5204
5110
  class ts {
5205
5111
  /**
5206
5112
  * Генерирует и возвращает данные-заглушку неопределённого менеджера.
5207
5113
  */
5208
5114
  static generateUndefinedManagerInstance() {
5209
- return new Ae({ id: 0, name: "- Не назначен -", isActive: !0, guid: "-undefined-" });
5115
+ return new De({ id: 0, name: "- Не назначен -", isActive: !0, guid: "-undefined-" });
5210
5116
  }
5211
5117
  /**
5212
5118
  * Выполняет проверку, является ли указанная запись записью-заглушкой с данными о неопределённом менеджере.
@@ -5217,26 +5123,26 @@ class ts {
5217
5123
  return r.id === 0 && r.guid === "-undefined-";
5218
5124
  }
5219
5125
  }
5220
- class wt extends ue {
5126
+ class Ct extends pe {
5221
5127
  /**
5222
5128
  * Возвращает {@link Promise} для получения справочника списка менеджеров.
5223
5129
  */
5224
5130
  async getManagers() {
5225
- const r = "/internal/managers", e = ue.getCachedResponse(r);
5131
+ const r = "/internal/managers", e = pe.getCachedResponse(r);
5226
5132
  if (e)
5227
5133
  return e;
5228
- const i = (await this.get(r)).data.map((o) => Fe.instanceInitializer(Ae, o));
5134
+ const i = (await this.get(r)).data.map((o) => je.instanceInitializer(De, o));
5229
5135
  return this.cacheResponse(r, i), i;
5230
5136
  }
5231
5137
  }
5232
- class Pr extends vr {
5138
+ class Rr extends Pr {
5233
5139
  /**
5234
5140
  * Инициализирует экземпляр класса {@link OrderInfo}.
5235
5141
  *
5236
5142
  * @param data Данные для первоначальной инициализации.
5237
5143
  */
5238
5144
  constructor(e) {
5239
- var s, i, o, c, p, u, m, v;
5145
+ var s, i, o, c, u, p, v, R;
5240
5146
  super(e);
5241
5147
  /**
5242
5148
  * Краткие данные о клиенте.
@@ -5284,13 +5190,13 @@ class Pr extends vr {
5284
5190
  onlinePaymentLink: (o = e == null ? void 0 : e.payment) == null ? void 0 : o.onlinePaymentLink
5285
5191
  }, this.delivery = {
5286
5192
  type: ((c = e == null ? void 0 : e.delivery) == null ? void 0 : c.type) ?? -1,
5287
- date: w((p = e == null ? void 0 : e.delivery) == null ? void 0 : p.date) ? C(e.delivery.date) : ((u = e == null ? void 0 : e.delivery) == null ? void 0 : u.date) ?? /* @__PURE__ */ new Date(),
5288
- address: (m = e == null ? void 0 : e.delivery) != null && m.address ? new Pe(e.delivery.address) : void 0,
5289
- warehouse: (v = e == null ? void 0 : e.delivery) != null && v.warehouse ? new Re(e.delivery.warehouse) : void 0
5290
- }, 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 = 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;
5193
+ date: y((u = e == null ? void 0 : e.delivery) == null ? void 0 : u.date) ? w(e.delivery.date) : ((p = e == null ? void 0 : e.delivery) == null ? void 0 : p.date) ?? /* @__PURE__ */ new Date(),
5194
+ address: (v = e == null ? void 0 : e.delivery) != null && v.address ? new Pe(e.delivery.address) : void 0,
5195
+ warehouse: (R = e == null ? void 0 : e.delivery) != null && R.warehouse ? new Ae(e.delivery.warehouse) : void 0
5196
+ }, this.attachedUser = new U(e == null ? void 0 : e.attachedUser), this.status = (e == null ? void 0 : e.status) ?? 0, this.salesDirection = new x(e == null ? void 0 : e.salesDirection), this.pendingAt = y(e == null ? void 0 : e.pendingAt) ? w(e.pendingAt) : e == null ? void 0 : e.pendingAt, this.processedAt = y(e == null ? void 0 : e.processedAt) ? w(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;
5291
5197
  }
5292
5198
  }
5293
- class Ct extends H {
5199
+ class vt extends j {
5294
5200
  /**
5295
5201
  * Инициализирует экземпляр класса {@link OrderProduct}.
5296
5202
  *
@@ -5373,7 +5279,7 @@ class Ct extends H {
5373
5279
  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;
5374
5280
  }
5375
5281
  }
5376
- class vt extends Pr {
5282
+ class Pt extends Rr {
5377
5283
  /**
5378
5284
  * Инициализирует экземпляр класса {@link Order}.
5379
5285
  *
@@ -5413,10 +5319,10 @@ class vt extends Pr {
5413
5319
  * Признак, что разрешена передача заказа в работу без оплаты.
5414
5320
  */
5415
5321
  t(this, "isAllowProcessingWithoutPayment");
5416
- this.products = (e.products ?? []).map((s) => new Ct(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;
5322
+ 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 C(e.orderSource) : void 0, this.isAllowProcessingWithoutPayment = e.isAllowProcessingWithoutPayment;
5417
5323
  }
5418
5324
  }
5419
- class ss extends De {
5325
+ class ss extends Te {
5420
5326
  /**
5421
5327
  * Возвращает данные о заказах, удовлетворяющих указанным параметрам поиска.
5422
5328
  *
@@ -5429,7 +5335,7 @@ class ss extends De {
5429
5335
  getOrders(r, e, s) {
5430
5336
  return this.getPaginated("/internal/orders", r, e ? [e] : void 0, s, {}, (i) => {
5431
5337
  const o = { ...i.data };
5432
- return o.data = o.data.map((c) => new Pr(c)), o;
5338
+ return o.data = o.data.map((c) => new Rr(c)), o;
5433
5339
  });
5434
5340
  }
5435
5341
  /**
@@ -5447,10 +5353,10 @@ class ss extends De {
5447
5353
  * @param orderId Идентификатор заказа для которого необходимо вернуть данные.
5448
5354
  */
5449
5355
  getOrder(r) {
5450
- return this.get(`/internal/orders/${r}`, {}, (e) => new vt(e.data));
5356
+ return this.get(`/internal/orders/${r}`, {}, (e) => new Pt(e.data));
5451
5357
  }
5452
5358
  }
5453
- class _e {
5359
+ class xe {
5454
5360
  /**
5455
5361
  * Инициализирует экземпляр класса {@link PriceAnalyze}.
5456
5362
  *
@@ -5477,12 +5383,12 @@ class _e {
5477
5383
  * Источник клиентской цены.
5478
5384
  */
5479
5385
  t(this, "source");
5480
- this.client = new me(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;
5386
+ this.client = new me(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;
5481
5387
  }
5482
5388
  }
5483
- const Ie = (n) => {
5389
+ const Le = (n) => {
5484
5390
  var r, e, s, i, o;
5485
- return n ? sr(
5391
+ return n ? ir(
5486
5392
  {
5487
5393
  cities: (r = n.cities) == null ? void 0 : r.map((c) => c.id),
5488
5394
  clients: (e = n.clients) == null ? void 0 : e.map((c) => c.id),
@@ -5491,9 +5397,9 @@ const Ie = (n) => {
5491
5397
  salesDirections: (o = n.salesDirections) == null ? void 0 : o.map((c) => c.id),
5492
5398
  hideNotActive: n.hideNotActive
5493
5399
  },
5494
- (c) => A(c) || (Q(c) || ir(c)) && Y(c)
5400
+ (c) => D(c) || (Q(c) || nr(c)) && Y(c)
5495
5401
  ) : {};
5496
- }, Xe = (n) => {
5402
+ }, Ze = (n) => {
5497
5403
  const r = {};
5498
5404
  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;
5499
5405
  };
@@ -5511,10 +5417,10 @@ class is extends h {
5511
5417
  return this.get(
5512
5418
  `/internal/price/products/${r}/analyze`,
5513
5419
  {
5514
- ...Xe(e),
5515
- filters: Ie(s)
5420
+ ...Ze(e),
5421
+ filters: Le(s)
5516
5422
  },
5517
- (i) => i.data.map((o) => new _e(o))
5423
+ (i) => i.data.map((o) => new xe(o))
5518
5424
  );
5519
5425
  }
5520
5426
  /**
@@ -5530,10 +5436,10 @@ class is extends h {
5530
5436
  return this.get(
5531
5437
  `/internal/price/categories/${r}/analyze`,
5532
5438
  {
5533
- ...Xe(e),
5534
- filters: Ie(s)
5439
+ ...Ze(e),
5440
+ filters: Le(s)
5535
5441
  },
5536
- (i) => i.data.map((o) => new _e(o))
5442
+ (i) => i.data.map((o) => new xe(o))
5537
5443
  );
5538
5444
  }
5539
5445
  /**
@@ -5552,13 +5458,13 @@ class is extends h {
5552
5458
  `/internal/price/categories/${r}/analyze/square`,
5553
5459
  {
5554
5460
  ...e,
5555
- filters: Ie(s)
5461
+ filters: Le(s)
5556
5462
  },
5557
- (i) => i.data.map((o) => new _e(o))
5463
+ (i) => i.data.map((o) => new xe(o))
5558
5464
  );
5559
5465
  }
5560
5466
  }
5561
- class Pt {
5467
+ class Rt {
5562
5468
  /**
5563
5469
  * Инициализирует экземпляр класса {@link PriceHistoryItem}.
5564
5470
  *
@@ -5605,10 +5511,10 @@ class Pt {
5605
5511
  * @inheritDoc
5606
5512
  */
5607
5513
  t(this, "currency");
5608
- 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 F(r.client) : void 0, this.executor = r.executor ? new F(r.executor) : void 0, this.currency = r.currency ? new Ce(r.currency) : void 0;
5514
+ this.cost = r.cost ?? 0, this.isLowCost = r.isLowCost ?? !1, this.isRetail = r.isRetail ?? !1, this.costDate = y(r.costDate) ? w(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;
5609
5515
  }
5610
5516
  }
5611
- class at extends oe {
5517
+ class At extends oe {
5612
5518
  /**
5613
5519
  * Инициализирует экземпляр класса {@link ProductPriceHistory}.
5614
5520
  *
@@ -5620,7 +5526,7 @@ class at extends oe {
5620
5526
  * @inheritDoc
5621
5527
  */
5622
5528
  t(this, "history");
5623
- this.history = he(e.history, (s) => new Pt(s));
5529
+ this.history = he(e.history, (s) => new Rt(s));
5624
5530
  }
5625
5531
  }
5626
5532
  class ns extends h {
@@ -5628,7 +5534,7 @@ class ns extends h {
5628
5534
  * Инициализирует экземпляр класса {@link UserAuthDataProvider}.
5629
5535
  */
5630
5536
  constructor() {
5631
- super(), this.baseUrl = `${D.getConfig().http.priceHistoryApiUrl ?? ""}/api`;
5537
+ super(), this.baseUrl = `${T.getConfig().http.priceHistoryApiUrl ?? ""}/api`;
5632
5538
  }
5633
5539
  /**
5634
5540
  * Возвращает данные об истории изменения цен.
@@ -5638,20 +5544,20 @@ class ns extends h {
5638
5544
  * @see /docs/api#/operations/api_internal_price_history_get
5639
5545
  */
5640
5546
  getProductPriceHistory(r) {
5641
- var i, o, c, p;
5642
- const e = D.getConfig().dateFormats.api, s = sr(
5643
- Oe(r, {
5547
+ var i, o, c, u;
5548
+ const e = T.getConfig().dateFormats.api, s = ir(
5549
+ de(r, {
5644
5550
  costDate: {
5645
- from: ke((i = r.costDate) == null ? void 0 : i.from) ? U(r.costDate.from, e) : (o = r.costDate) == null ? void 0 : o.from,
5646
- to: ke((c = r.costDate) == null ? void 0 : c.to) ? U(r.costDate.to, e) : (p = r.costDate) == null ? void 0 : p.to
5551
+ from: ke((i = r.costDate) == null ? void 0 : i.from) ? q(r.costDate.from, e) : (o = r.costDate) == null ? void 0 : o.from,
5552
+ to: ke((c = r.costDate) == null ? void 0 : c.to) ? q(r.costDate.to, e) : (u = r.costDate) == null ? void 0 : u.to
5647
5553
  }
5648
5554
  }),
5649
- (u) => A(u) || (Q(u) || ir(u)) && Y(u)
5555
+ (p) => D(p) || (Q(p) || nr(p)) && Y(p)
5650
5556
  );
5651
- return this.get("/internal/history", s, (u) => he(u.data, (m) => new at(m)));
5557
+ return this.get("/internal/history", s, (p) => he(p.data, (v) => new At(v)));
5652
5558
  }
5653
5559
  }
5654
- class Ze {
5560
+ class er {
5655
5561
  /**
5656
5562
  * Инициализирует экземпляр класса {@link RecommendationsList}.
5657
5563
  *
@@ -5674,7 +5580,7 @@ class os extends h {
5674
5580
  * Инициализирует экземпляр класса {@link UserAuthDataProvider}.
5675
5581
  */
5676
5582
  constructor() {
5677
- super(), this.baseUrl = `${D.getConfig().http.recommendationsApiUrl ?? ""}/api`;
5583
+ super(), this.baseUrl = `${T.getConfig().http.recommendationsApiUrl ?? ""}/api`;
5678
5584
  }
5679
5585
  /**
5680
5586
  * Возвращает данные о рекомендациях указанной категории продуктов.
@@ -5683,7 +5589,7 @@ class os extends h {
5683
5589
  * @see /docs/api#/operations/api_internal_recommendations_product_category_get
5684
5590
  */
5685
5591
  getProductCategoryRecommendations(r) {
5686
- return this.get(`/internal/recommendations/categories/${r.id}`, {}, (e) => new Ze(e.data));
5592
+ return this.get(`/internal/recommendations/categories/${r.id}`, {}, (e) => new er(e.data));
5687
5593
  }
5688
5594
  /**
5689
5595
  * Возвращает данные о рекомендациях указанного продукта.
@@ -5692,7 +5598,7 @@ class os extends h {
5692
5598
  * @see /docs/api#/operations/api_internal_recommendations_product_get
5693
5599
  */
5694
5600
  getProductRecommendations(r) {
5695
- return this.get(`/internal/recommendations/products/${r.id}`, {}, (e) => new Ze(e.data));
5601
+ return this.get(`/internal/recommendations/products/${r.id}`, {}, (e) => new er(e.data));
5696
5602
  }
5697
5603
  /**
5698
5604
  * Выполняет сохранение данных о рекомендуемых категориях продуктов.
@@ -5721,7 +5627,7 @@ class os extends h {
5721
5627
  });
5722
5628
  }
5723
5629
  }
5724
- class T extends ue {
5630
+ class $ extends pe {
5725
5631
  /**
5726
5632
  * Возвращает {@link Promise} для получения данных указанного справочника.
5727
5633
  *
@@ -5730,20 +5636,20 @@ class T extends ue {
5730
5636
  * и использовать в случае аналогичных запросов.
5731
5637
  */
5732
5638
  getReference(r, e = !1) {
5733
- return this.getTypedDataArrayRequester(nt, `/internal/references/${r}`, e);
5639
+ return this.getTypedDataArrayRequester(ot, `/internal/references/${r}`, e);
5734
5640
  }
5735
5641
  /**
5736
5642
  * Возвращает {@link Promise} для получения справочника данных о канале
5737
5643
  * первичного интереса.
5738
5644
  */
5739
5645
  getChannelPrimaryInterest() {
5740
- return this.getTypedDataArrayRequester(gr, "/internal/references/channel-primary-interest", !0);
5646
+ return this.getTypedDataArrayRequester(mr, "/internal/references/channel-primary-interest", !0);
5741
5647
  }
5742
5648
  /**
5743
5649
  * Возвращает {@link Promise} для получения справочника должностей контактных лиц.
5744
5650
  */
5745
5651
  getContactPositions() {
5746
- return this.getTypedDataArrayRequester(ot, "/internal/references/contact-position", !0);
5652
+ return this.getTypedDataArrayRequester(ct, "/internal/references/contact-position", !0);
5747
5653
  }
5748
5654
  /**
5749
5655
  * Возвращает {@link Promise} для получения справочника списка валют.
@@ -5762,19 +5668,19 @@ class T extends ue {
5762
5668
  * Возвращает {@link Promise} для получения справочника данных организационно-правовых форм.
5763
5669
  */
5764
5670
  getOpf() {
5765
- return this.getTypedDataArrayRequester(j, "/public/references/opf", !0);
5671
+ return this.getTypedDataArrayRequester(F, "/public/references/opf", !0);
5766
5672
  }
5767
5673
  /**
5768
5674
  * Возвращает {@link Promise} для получения справочника данных статусов оплаты заказов.
5769
5675
  */
5770
5676
  getOrderPaymentStatuses() {
5771
- return this.getTypedDataArrayRequester(ct, "/public/references/order-payment-status", !0);
5677
+ return this.getTypedDataArrayRequester(lt, "/public/references/order-payment-status", !0);
5772
5678
  }
5773
5679
  /**
5774
5680
  * Возвращает {@link Promise} для получения справочника данных статусов заказов.
5775
5681
  */
5776
5682
  getOrderStatuses() {
5777
- return this.getTypedDataArrayRequester(lt, "/public/references/order-status", !0);
5683
+ return this.getTypedDataArrayRequester(ut, "/public/references/order-status", !0);
5778
5684
  }
5779
5685
  /**
5780
5686
  * Возвращает {@link Promise} для получения справочника данных типов оплаты заказов.
@@ -5786,19 +5692,19 @@ class T extends ue {
5786
5692
  * Возвращает {@link Promise} для получения справочника типов ресурсов.
5787
5693
  */
5788
5694
  getResourceTypes() {
5789
- return this.getTypedDataArrayRequester(mr, "/internal/references/resource-type", !0);
5695
+ return this.getTypedDataArrayRequester(fr, "/internal/references/resource-type", !0);
5790
5696
  }
5791
5697
  /**
5792
5698
  * Возвращает {@link Promise} для получения справочника данных направлений продаж.
5793
5699
  */
5794
5700
  getSalesDirections() {
5795
- return this.getTypedDataArrayRequester(N, "/public/references/sales-direction", !0);
5701
+ return this.getTypedDataArrayRequester(x, "/public/references/sales-direction", !0);
5796
5702
  }
5797
5703
  /**
5798
5704
  * Возвращает {@link Promise} для получения справочника данных об источнике первичного интереса.
5799
5705
  */
5800
5706
  getSourcePrimaryInterest() {
5801
- return this.getTypedDataArrayRequester(fr, "/internal/references/source-primary-interest", !0);
5707
+ return this.getTypedDataArrayRequester(yr, "/internal/references/source-primary-interest", !0);
5802
5708
  }
5803
5709
  /**
5804
5710
  * Выполняет поиск данных о городах по терму в названии.
@@ -5806,7 +5712,7 @@ class T extends ue {
5806
5712
  * @param term Терм поиска.
5807
5713
  */
5808
5714
  searchCity(r) {
5809
- return this.getTypedDataArrayRequester(Me, `/internal/references/city-with-region-and-country/search?term=${r}`);
5715
+ return this.getTypedDataArrayRequester(Be, `/internal/references/city-with-region-and-country/search?term=${r}`);
5810
5716
  }
5811
5717
  /**
5812
5718
  * Выполняет поиск данных о регионах по терму в названии.
@@ -5834,29 +5740,29 @@ class T extends ue {
5834
5740
  * Возвращает {@link Promise} для получения справочника складов.
5835
5741
  */
5836
5742
  getWarehouses() {
5837
- return this.getTypedDataArrayRequester(Re, "/public/references/warehouse", !0);
5743
+ return this.getTypedDataArrayRequester(Ae, "/public/references/warehouse", !0);
5838
5744
  }
5839
5745
  /**
5840
5746
  * Возвращает {@link Promise} для получения справочника типов свойств.
5841
5747
  */
5842
5748
  getPropertyTypes() {
5843
- return this.getTypedDataArrayRequester(hr, "/internal/references/property-type", !0);
5749
+ return this.getTypedDataArrayRequester(gr, "/internal/references/property-type", !0);
5844
5750
  }
5845
5751
  /**
5846
5752
  * Возвращает {@link Promise} для получения справочника коэффициентов цен.
5847
5753
  */
5848
5754
  getPriceCoefficients() {
5849
- return this.getTypedDataArrayRequester(ae, "/internal/references/price-coefficient", !0);
5755
+ return this.getTypedDataArrayRequester(Re, "/internal/references/price-coefficient", !0);
5850
5756
  }
5851
5757
  /**
5852
5758
  * Возвращает {@link Promise} для получения справочника типов файлов продуктов/категорий.
5853
5759
  */
5854
5760
  getProductFileType() {
5855
- return this.getTypedDataArrayRequester(ut, "/public/references/product-file-type", !0);
5761
+ return this.getTypedDataArrayRequester(ht, "/public/references/product-file-type", !0);
5856
5762
  }
5857
5763
  }
5858
- const R = te("__references_private", () => {
5859
- 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), p = f(void 0), u = f(void 0), m = f(void 0), v = f(void 0), $ = f(void 0), I = f(void 0), k = f(void 0), S = f(void 0), _ = f(void 0), q = f(void 0), l = f(void 0);
5764
+ const A = te("__references_private", () => {
5765
+ const n = m({}), r = m(void 0), e = m(void 0), s = m(void 0), i = m(void 0), o = m(void 0), c = m(void 0), u = m(void 0), p = m(void 0), v = m(void 0), R = m(void 0), S = m(void 0), _ = m(void 0), O = m(void 0), G = m(void 0), B = m(void 0), $e = m(void 0), l = m(void 0);
5860
5766
  return {
5861
5767
  /**
5862
5768
  * Список загружаемых/загруженных на данный момент значений.
@@ -5889,134 +5795,134 @@ const R = te("__references_private", () => {
5889
5795
  /**
5890
5796
  * Справочник статусов оплаты заказа.
5891
5797
  */
5892
- orderPaymentStatusReference: p,
5798
+ orderPaymentStatusReference: u,
5893
5799
  /**
5894
5800
  * Справочник статусов заказов.
5895
5801
  */
5896
- orderStatusReference: u,
5802
+ orderStatusReference: p,
5897
5803
  /**
5898
5804
  * Справочник типов оплаты заказов.
5899
5805
  */
5900
- paymentTypeReference: m,
5806
+ paymentTypeReference: v,
5901
5807
  /**
5902
5808
  * Справочник групп партнеров.
5903
5809
  */
5904
- partnerGroupReference: v,
5810
+ partnerGroupReference: R,
5905
5811
  /**
5906
5812
  * Справочник типов файлов продукктов/категорий.
5907
5813
  */
5908
- productFileTypeReference: $,
5814
+ productFileTypeReference: S,
5909
5815
  /**
5910
5816
  * Справочник типов ресурсов.
5911
5817
  */
5912
- resourceTypesReference: I,
5818
+ resourceTypesReference: _,
5913
5819
  /**
5914
5820
  * Справочник направлений продаж.
5915
5821
  */
5916
- salesDirectionsReference: k,
5822
+ salesDirectionsReference: O,
5917
5823
  /**
5918
5824
  * Справочник источников первичного интереса.
5919
5825
  */
5920
- sourcePrimaryInterestReference: S,
5826
+ sourcePrimaryInterestReference: G,
5921
5827
  /**
5922
5828
  * Справочник складов.
5923
5829
  */
5924
- warehousesReference: _,
5830
+ warehousesReference: B,
5925
5831
  /**
5926
5832
  * Справочник типов свойств.
5927
5833
  */
5928
- propertyTypesReference: q,
5834
+ propertyTypesReference: $e,
5929
5835
  /**
5930
5836
  * Справочник коэффициентов цен.
5931
5837
  */
5932
5838
  priceCoefficientsReference: l
5933
5839
  };
5934
5840
  }), cs = te("references", () => {
5935
- const n = a(() => {
5936
- const l = R();
5937
- return !l.channelPrimaryInterestReference && !l.dataLoaderList.channelPrimaryInterestReference && (l.dataLoaderList.channelPrimaryInterestReference = !0, h.getInstance(T).getChannelPrimaryInterest().then((g) => {
5841
+ const n = P(() => {
5842
+ const l = A();
5843
+ return !l.channelPrimaryInterestReference && !l.dataLoaderList.channelPrimaryInterestReference && (l.dataLoaderList.channelPrimaryInterestReference = !0, h.getInstance($).getChannelPrimaryInterest().then((g) => {
5938
5844
  l.channelPrimaryInterestReference = g;
5939
- }).catch(y)), l.channelPrimaryInterestReference;
5940
- }), r = a(() => {
5941
- const l = R();
5942
- return !l.contactPositionsReference && !l.dataLoaderList.contactPositionsReference && (l.dataLoaderList.contactPositionsReference = !0, h.getInstance(T).getContactPositions().then((g) => {
5845
+ }).catch(f)), l.channelPrimaryInterestReference;
5846
+ }), r = P(() => {
5847
+ const l = A();
5848
+ return !l.contactPositionsReference && !l.dataLoaderList.contactPositionsReference && (l.dataLoaderList.contactPositionsReference = !0, h.getInstance($).getContactPositions().then((g) => {
5943
5849
  l.contactPositionsReference = g;
5944
- }).catch(y)), l.contactPositionsReference;
5945
- }), e = a(() => {
5946
- const l = R();
5947
- return !l.currencyReference && !l.dataLoaderList.currencyReference && (l.dataLoaderList.currencyReference = !0, h.getInstance(T).getCurrency().then((g) => {
5850
+ }).catch(f)), l.contactPositionsReference;
5851
+ }), e = P(() => {
5852
+ const l = A();
5853
+ return !l.currencyReference && !l.dataLoaderList.currencyReference && (l.dataLoaderList.currencyReference = !0, h.getInstance($).getCurrency().then((g) => {
5948
5854
  l.currencyReference = g;
5949
- }).catch(y)), l.currencyReference;
5950
- }), s = a(() => {
5951
- const l = R();
5952
- return !l.opfReference && !l.dataLoaderList.opfReference && (l.dataLoaderList.opfReference = !0, h.getInstance(T).getOpf().then((g) => {
5855
+ }).catch(f)), l.currencyReference;
5856
+ }), s = P(() => {
5857
+ const l = A();
5858
+ return !l.opfReference && !l.dataLoaderList.opfReference && (l.dataLoaderList.opfReference = !0, h.getInstance($).getOpf().then((g) => {
5953
5859
  l.opfReference = g;
5954
- }).catch(y)), l.opfReference;
5955
- }), i = a(() => {
5956
- const l = R();
5957
- return !l.orderPaymentStatusReference && !l.dataLoaderList.orderPaymentStatusReference && (l.dataLoaderList.orderPaymentStatusReference = !0, h.getInstance(T).getOrderPaymentStatuses().then((g) => {
5860
+ }).catch(f)), l.opfReference;
5861
+ }), i = P(() => {
5862
+ const l = A();
5863
+ return !l.orderPaymentStatusReference && !l.dataLoaderList.orderPaymentStatusReference && (l.dataLoaderList.orderPaymentStatusReference = !0, h.getInstance($).getOrderPaymentStatuses().then((g) => {
5958
5864
  l.orderPaymentStatusReference = g;
5959
- }).catch(y)), l.orderPaymentStatusReference;
5960
- }), o = a(() => {
5961
- const l = R();
5962
- return !l.orderStatusReference && !l.dataLoaderList.orderStatusReference && (l.dataLoaderList.orderStatusReference = !0, h.getInstance(T).getOrderStatuses().then((g) => {
5865
+ }).catch(f)), l.orderPaymentStatusReference;
5866
+ }), o = P(() => {
5867
+ const l = A();
5868
+ return !l.orderStatusReference && !l.dataLoaderList.orderStatusReference && (l.dataLoaderList.orderStatusReference = !0, h.getInstance($).getOrderStatuses().then((g) => {
5963
5869
  l.orderStatusReference = g;
5964
- }).catch(y)), l.orderStatusReference;
5965
- }), c = a(() => {
5966
- const l = R();
5967
- return !l.paymentTypeReference && !l.dataLoaderList.paymentTypeReference && (l.dataLoaderList.paymentTypeReference = !0, h.getInstance(T).getPaymentTypes().then((g) => {
5870
+ }).catch(f)), l.orderStatusReference;
5871
+ }), c = P(() => {
5872
+ const l = A();
5873
+ return !l.paymentTypeReference && !l.dataLoaderList.paymentTypeReference && (l.dataLoaderList.paymentTypeReference = !0, h.getInstance($).getPaymentTypes().then((g) => {
5968
5874
  l.paymentTypeReference = g;
5969
- }).catch(y)), l.paymentTypeReference;
5970
- }), p = a(() => {
5971
- const l = R();
5972
- return !l.partnerGroupReference && !l.dataLoaderList.partnerGroupReference && (l.dataLoaderList.partnerGroupReference = !0, h.getInstance(T).getPartnerGroup().then((g) => {
5875
+ }).catch(f)), l.paymentTypeReference;
5876
+ }), u = P(() => {
5877
+ const l = A();
5878
+ return !l.partnerGroupReference && !l.dataLoaderList.partnerGroupReference && (l.dataLoaderList.partnerGroupReference = !0, h.getInstance($).getPartnerGroup().then((g) => {
5973
5879
  l.partnerGroupReference = g;
5974
- }).catch(y)), l.partnerGroupReference;
5975
- }), u = a(() => {
5976
- const l = R();
5977
- return !l.productFileTypeReference && !l.dataLoaderList.productFileTypeReference && (l.dataLoaderList.productFileTypeReference = !0, h.getInstance(T).getProductFileType().then((g) => {
5880
+ }).catch(f)), l.partnerGroupReference;
5881
+ }), p = P(() => {
5882
+ const l = A();
5883
+ return !l.productFileTypeReference && !l.dataLoaderList.productFileTypeReference && (l.dataLoaderList.productFileTypeReference = !0, h.getInstance($).getProductFileType().then((g) => {
5978
5884
  l.productFileTypeReference = g;
5979
- }).catch(y)), l.productFileTypeReference;
5980
- }), m = a(() => {
5981
- const l = R();
5982
- return !l.resourceTypesReference && !l.dataLoaderList.resourceTypesReference && (l.dataLoaderList.resourceTypesReference = !0, h.getInstance(T).getResourceTypes().then((g) => {
5885
+ }).catch(f)), l.productFileTypeReference;
5886
+ }), v = P(() => {
5887
+ const l = A();
5888
+ return !l.resourceTypesReference && !l.dataLoaderList.resourceTypesReference && (l.dataLoaderList.resourceTypesReference = !0, h.getInstance($).getResourceTypes().then((g) => {
5983
5889
  l.resourceTypesReference = g;
5984
- }).catch(y)), l.resourceTypesReference;
5985
- }), v = a(() => {
5986
- const l = R();
5987
- return !l.salesDirectionsReference && !l.dataLoaderList.salesDirectionsReference && (l.dataLoaderList.salesDirectionsReference = !0, h.getInstance(T).getSalesDirections().then((g) => {
5890
+ }).catch(f)), l.resourceTypesReference;
5891
+ }), R = P(() => {
5892
+ const l = A();
5893
+ return !l.salesDirectionsReference && !l.dataLoaderList.salesDirectionsReference && (l.dataLoaderList.salesDirectionsReference = !0, h.getInstance($).getSalesDirections().then((g) => {
5988
5894
  l.salesDirectionsReference = g;
5989
- }).catch(y)), l.salesDirectionsReference;
5990
- }), $ = a(() => {
5991
- const l = R();
5992
- return !l.sourcePrimaryInterestReference && !l.dataLoaderList.sourcePrimaryInterestReference && (l.dataLoaderList.sourcePrimaryInterestReference = !0, h.getInstance(T).getSourcePrimaryInterest().then((g) => {
5895
+ }).catch(f)), l.salesDirectionsReference;
5896
+ }), S = P(() => {
5897
+ const l = A();
5898
+ return !l.sourcePrimaryInterestReference && !l.dataLoaderList.sourcePrimaryInterestReference && (l.dataLoaderList.sourcePrimaryInterestReference = !0, h.getInstance($).getSourcePrimaryInterest().then((g) => {
5993
5899
  l.sourcePrimaryInterestReference = g;
5994
- }).catch(y)), l.sourcePrimaryInterestReference;
5995
- }), I = a(() => {
5996
- const l = R();
5997
- return !l.deliveryTypeReference && !l.dataLoaderList.deliveryTypeReference && (l.dataLoaderList.deliveryTypeReference = !0, h.getInstance(T).getDeliveryTypes().then((g) => {
5900
+ }).catch(f)), l.sourcePrimaryInterestReference;
5901
+ }), _ = P(() => {
5902
+ const l = A();
5903
+ return !l.deliveryTypeReference && !l.dataLoaderList.deliveryTypeReference && (l.dataLoaderList.deliveryTypeReference = !0, h.getInstance($).getDeliveryTypes().then((g) => {
5998
5904
  l.deliveryTypeReference = g;
5999
- }).catch(y)), l.deliveryTypeReference;
6000
- }), k = a(() => {
6001
- const l = R();
6002
- return !l.managersList && !l.dataLoaderList.managersList && (l.dataLoaderList.managersList = !0, h.getInstance(wt).getManagers().then((g) => {
5905
+ }).catch(f)), l.deliveryTypeReference;
5906
+ }), O = P(() => {
5907
+ const l = A();
5908
+ return !l.managersList && !l.dataLoaderList.managersList && (l.dataLoaderList.managersList = !0, h.getInstance(Ct).getManagers().then((g) => {
6003
5909
  l.managersList = g;
6004
- }).catch(y)), l.managersList;
6005
- }), S = a(() => {
6006
- const l = R();
6007
- return !l.warehousesReference && !l.dataLoaderList.warehousesReference && (l.dataLoaderList.warehousesReference = !0, h.getInstance(T).getWarehouses().then((g) => {
5910
+ }).catch(f)), l.managersList;
5911
+ }), G = P(() => {
5912
+ const l = A();
5913
+ return !l.warehousesReference && !l.dataLoaderList.warehousesReference && (l.dataLoaderList.warehousesReference = !0, h.getInstance($).getWarehouses().then((g) => {
6008
5914
  l.warehousesReference = g;
6009
- }).catch(y)), l.warehousesReference;
6010
- }), _ = a(() => {
6011
- const l = R();
6012
- return !l.propertyTypesReference && !l.dataLoaderList.propertyTypesReference && (l.dataLoaderList.propertyTypesReference = !0, h.getInstance(T).getPropertyTypes().then((g) => {
5915
+ }).catch(f)), l.warehousesReference;
5916
+ }), B = P(() => {
5917
+ const l = A();
5918
+ return !l.propertyTypesReference && !l.dataLoaderList.propertyTypesReference && (l.dataLoaderList.propertyTypesReference = !0, h.getInstance($).getPropertyTypes().then((g) => {
6013
5919
  l.propertyTypesReference = g;
6014
- }).catch(y)), l.propertyTypesReference;
6015
- }), q = a(() => {
6016
- const l = R();
6017
- return !l.priceCoefficientsReference && !l.dataLoaderList.priceCoefficientsReference && (l.dataLoaderList.priceCoefficientsReference = !0, h.getInstance(T).getPriceCoefficients().then((g) => {
5920
+ }).catch(f)), l.propertyTypesReference;
5921
+ }), $e = P(() => {
5922
+ const l = A();
5923
+ return !l.priceCoefficientsReference && !l.dataLoaderList.priceCoefficientsReference && (l.dataLoaderList.priceCoefficientsReference = !0, h.getInstance($).getPriceCoefficients().then((g) => {
6018
5924
  l.priceCoefficientsReference = g;
6019
- }).catch(y)), l.priceCoefficientsReference;
5925
+ }).catch(f)), l.priceCoefficientsReference;
6020
5926
  });
6021
5927
  return {
6022
5928
  /**
@@ -6050,46 +5956,46 @@ const R = te("__references_private", () => {
6050
5956
  /**
6051
5957
  * Справочник групп партнеров.
6052
5958
  */
6053
- partnerGroupsReference: p,
5959
+ partnerGroupsReference: u,
6054
5960
  /**
6055
5961
  * Справочник типов файлов продуктов/категорий.
6056
5962
  */
6057
- productFilesTypesReference: u,
5963
+ productFilesTypesReference: p,
6058
5964
  /**
6059
5965
  * Справочник типов ресурсов.
6060
5966
  */
6061
- resourceTypesReference: m,
5967
+ resourceTypesReference: v,
6062
5968
  /**
6063
5969
  * Справочник направлений продаж.
6064
5970
  */
6065
- salesDirectionsReference: v,
5971
+ salesDirectionsReference: R,
6066
5972
  /**
6067
5973
  * Справочник каналов первичного интереса.
6068
5974
  */
6069
- sourcePrimaryInterestsReference: $,
5975
+ sourcePrimaryInterestsReference: S,
6070
5976
  /**
6071
5977
  * Справочник типов доставки.
6072
5978
  */
6073
- deliveryTypeReference: I,
5979
+ deliveryTypeReference: _,
6074
5980
  /**
6075
5981
  * Список менеджеров.
6076
5982
  */
6077
- managersList: k,
5983
+ managersList: O,
6078
5984
  /**
6079
5985
  * Справочник складов.
6080
5986
  */
6081
- warehousesReference: S,
5987
+ warehousesReference: G,
6082
5988
  /**
6083
5989
  * Справочник типов свойств.
6084
5990
  */
6085
- propertyTypesReference: _,
5991
+ propertyTypesReference: B,
6086
5992
  /**
6087
5993
  * Справочник коэффициентов цен.
6088
5994
  */
6089
- priceCoefficientsReference: q
5995
+ priceCoefficientsReference: $e
6090
5996
  };
6091
5997
  });
6092
- class Rt {
5998
+ class Dt {
6093
5999
  /**
6094
6000
  * Инициализирует экземпляр класса {@link MetaTagItem}.
6095
6001
  *
@@ -6107,7 +6013,7 @@ class Rt {
6107
6013
  this.name = r.name, this.content = r.content;
6108
6014
  }
6109
6015
  }
6110
- class er {
6016
+ class rr {
6111
6017
  /**
6112
6018
  * Инициализирует экземпляр класса {@link Seo}.
6113
6019
  *
@@ -6143,7 +6049,7 @@ class er {
6143
6049
  */
6144
6050
  t(this, "meta");
6145
6051
  var e;
6146
- 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))) ?? [];
6052
+ 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 Dt(s))) ?? [];
6147
6053
  }
6148
6054
  }
6149
6055
  class ls extends h {
@@ -6154,7 +6060,7 @@ class ls extends h {
6154
6060
  * @param resourceId Идентификатор ресурса для которого необходимо получить SEO-данные.
6155
6061
  */
6156
6062
  getResourceSeoData(r, e) {
6157
- return this.get(`/internal/seo/${r.slug}/${e}`, {}, (s) => new er(s.data));
6063
+ return this.get(`/internal/seo/${r.slug}/${e}`, {}, (s) => new rr(s.data));
6158
6064
  }
6159
6065
  /**
6160
6066
  * Выполняет сохранение данных о SEO-параметрах для указанного ресурса.
@@ -6165,7 +6071,7 @@ class ls extends h {
6165
6071
  * в случае ошибок в запросах.
6166
6072
  */
6167
6073
  saveResourceSeoData(r, e = {}) {
6168
- return this.post(`/internal/seo/${r.resourceType.slug}/${r.resourceId}`, r, (s) => new er(s.data), e);
6074
+ return this.post(`/internal/seo/${r.resourceType.slug}/${r.resourceId}`, r, (s) => new rr(s.data), e);
6169
6075
  }
6170
6076
  /**
6171
6077
  * Возвращает {@link Promise} для удаления данных о SEO-параметрах указанного ресурса.
@@ -6177,7 +6083,7 @@ class ls extends h {
6177
6083
  return this.delete(`/internal/seo/${r.slug}/${e}`);
6178
6084
  }
6179
6085
  }
6180
- class ps extends h {
6086
+ class us extends h {
6181
6087
  /**
6182
6088
  * Возвращает подсказки по адресам.
6183
6089
  *
@@ -6224,8 +6130,8 @@ class ps extends h {
6224
6130
  });
6225
6131
  }
6226
6132
  }
6227
- var At = /* @__PURE__ */ ((n) => (n.Admin = "admin", n.Manager = "manager", n.Operator = "operator", n.Client = "client", n.Guest = "guest", n))(At || {});
6228
- class Dt extends ur {
6133
+ var Tt = /* @__PURE__ */ ((n) => (n.Admin = "admin", n.Manager = "manager", n.Operator = "operator", n.Client = "client", n.Guest = "guest", n))(Tt || {});
6134
+ class $t extends hr {
6229
6135
  /**
6230
6136
  * Инициализирует экземпляр класса {@link User}.
6231
6137
  *
@@ -6248,12 +6154,12 @@ class Dt extends ur {
6248
6154
  this.type = e == null ? void 0 : e.type, this.canDoReclamations = (e == null ? void 0 : e.canDoReclamations) ?? !1, this.photo = e == null ? void 0 : e.photo;
6249
6155
  }
6250
6156
  }
6251
- class us extends h {
6157
+ class ps extends h {
6252
6158
  /**
6253
6159
  * Инициализирует экземпляр класса {@link UserAuthDataProvider}.
6254
6160
  */
6255
6161
  constructor() {
6256
- super(), this.baseUrl = `${D.getConfig().http.portalApiUrl}/api`, this.interceptorIds.request.authRequestInterceptor && this.httpClient.interceptors.request.eject(this.interceptorIds.request.authRequestInterceptor);
6162
+ super(), this.baseUrl = `${T.getConfig().http.portalApiUrl}/api`, this.interceptorIds.request.authRequestInterceptor && this.httpClient.interceptors.request.eject(this.interceptorIds.request.authRequestInterceptor);
6257
6163
  }
6258
6164
  /**
6259
6165
  * Функция для получения обновленных токенов доступа.
@@ -6264,17 +6170,17 @@ class us extends h {
6264
6170
  return this.get("internal/users/current-tokens").then((r) => r.accessToken);
6265
6171
  }
6266
6172
  }
6267
- class $t extends h {
6173
+ class bt extends h {
6268
6174
  /**
6269
6175
  * Возвращает данные о текущем пользователе.
6270
6176
  */
6271
6177
  // eslint-disable-next-line class-methods-use-this
6272
6178
  getCurrentUser() {
6273
- return this.get("/internal/users/info", {}, (r) => new Dt(r.data));
6179
+ return this.get("/internal/users/info", {}, (r) => new $t(r.data));
6274
6180
  }
6275
6181
  }
6276
- const Tt = te("__user_state_private", () => {
6277
- const n = f({}), r = f(void 0);
6182
+ const St = te("__user_state_private", () => {
6183
+ const n = m({}), r = m(void 0);
6278
6184
  return {
6279
6185
  /**
6280
6186
  * Список загружаемых/загруженных на данный момент значений.
@@ -6289,11 +6195,11 @@ const Tt = te("__user_state_private", () => {
6289
6195
  /**
6290
6196
  * Данные о текущем пользователе.
6291
6197
  */
6292
- currentUser: a(() => {
6293
- const r = Tt();
6294
- return !r.currentUser && !r.dataLoaderList.currentUser && (r.dataLoaderList.currentUser = !0, h.getInstance($t).getCurrentUser().then((e) => {
6198
+ currentUser: P(() => {
6199
+ const r = St();
6200
+ return !r.currentUser && !r.dataLoaderList.currentUser && (r.dataLoaderList.currentUser = !0, h.getInstance(bt).getCurrentUser().then((e) => {
6295
6201
  r.currentUser = e;
6296
- }).catch(y).finally(() => {
6202
+ }).catch(f).finally(() => {
6297
6203
  r.dataLoaderList.currentUser = !1;
6298
6204
  })), r.currentUser;
6299
6205
  })
@@ -6322,149 +6228,149 @@ class gs {
6322
6228
  }
6323
6229
  }
6324
6230
  export {
6325
- nt as AnyReference,
6326
- qt as AppBaseConfig,
6327
- D as AppConfigProvider,
6328
- xe as BankAccount,
6329
- De as BasePaginationProvider,
6330
- Wr as CalculationTypeEnum,
6231
+ ot as AnyReference,
6232
+ Ft as AppBaseConfig,
6233
+ T as AppConfigProvider,
6234
+ qe as BankAccount,
6235
+ Te as BasePaginationProvider,
6236
+ Jr as CalculationTypeEnum,
6331
6237
  fe as Cart,
6332
- Er as CartItem,
6238
+ Wr as CartItem,
6333
6239
  zr as CartItemBase,
6334
- Ot as CartProvider,
6335
- Gt as CatalogProvider,
6336
- nr as CatalogableItem,
6337
- E as Category,
6338
- We as CategoryPricingRule,
6339
- gr as ChannelPrimaryInterest,
6340
- Vt as City,
6341
- Me as CityWithRegionAndCountry,
6342
- Qe as Client,
6343
- ft as ClientAdditionalData,
6240
+ dt as CartProvider,
6241
+ Mt as CatalogProvider,
6242
+ or as CatalogableItem,
6243
+ z as Category,
6244
+ Je as CategoryPricingRule,
6245
+ mr as ChannelPrimaryInterest,
6246
+ Kt as City,
6247
+ Be as CityWithRegionAndCountry,
6248
+ Ye as Client,
6249
+ yt as ClientAdditionalData,
6344
6250
  we as ClientCategory,
6345
- Xt as ClientDataProvider,
6346
- Ft as ClientPriceProvider,
6347
- jt as ClientPriceTemplateProvider,
6251
+ L as ClientDataProvider,
6252
+ jt as ClientPriceProvider,
6253
+ Gt as ClientPriceTemplateProvider,
6348
6254
  Z as ClientProduct,
6349
- Bt as ClientProductCategoryDataProvider,
6255
+ Et as ClientProductCategoryDataProvider,
6350
6256
  zt as ClientProductDataProvider,
6351
6257
  me as ClientShortInfo,
6352
- it as ClientsAdditionalDataRequestTypeEnum,
6353
- Kt as ClientsListFilters,
6258
+ nt as ClientsAdditionalDataRequestTypeEnum,
6259
+ Qt as ClientsListFilters,
6354
6260
  oe as CodedIdentity,
6355
6261
  es as ConfiguratorProvider,
6356
6262
  Ne as Contact,
6357
- Qr as ContactLinks,
6263
+ Yr as ContactLinks,
6358
6264
  M as ContactPerson,
6359
- mt as ContactPersonRelated,
6360
- ot as ContactPosition,
6361
- Se as ContactRelation,
6362
- yr as ContragentBase,
6265
+ ft as ContactPersonRelated,
6266
+ ct as ContactPosition,
6267
+ Ie as ContactRelation,
6268
+ wr as ContragentBase,
6363
6269
  ve as ContragentFactory,
6364
- wr as ContragentIc,
6365
- ht as ContragentPerson,
6366
- gt as ContragentUlNr,
6367
- Cr as ContragentUlR,
6368
- je as CostSourceEnum,
6270
+ Cr as ContragentIc,
6271
+ gt as ContragentPerson,
6272
+ mt as ContragentUlNr,
6273
+ vr as ContragentUlR,
6274
+ Ge as CostSourceEnum,
6369
6275
  ee as Country,
6370
6276
  Ce as Currency,
6371
- ps as DataSuggestionProvider,
6372
- Qt as DataTablePagination,
6373
- yt as DataTablePaginationRequestParams,
6374
- Yt as DataTableSortRequestParams,
6277
+ us as DataSuggestionProvider,
6278
+ Yt as DataTablePagination,
6279
+ wt as DataTablePaginationRequestParams,
6280
+ Xt as DataTableSortRequestParams,
6375
6281
  rs as DateTimeProvider,
6376
- Vr as DeletableNamedIdentity,
6282
+ Kr as DeletableNamedIdentity,
6377
6283
  Pe as DeliveryAddress,
6378
6284
  X as DeliveryType,
6379
6285
  Nt as DetailedJwtPayload,
6380
- Zr as DeviceTypeResolutionConfig,
6381
- Kr as DiscountShortInfo,
6286
+ et as DeviceTypeResolutionConfig,
6287
+ Qr as DiscountShortInfo,
6382
6288
  gs as FieldValidationResultData,
6383
- pe as FilterGroup,
6384
- Je as FilterItem,
6289
+ ue as FilterGroup,
6290
+ Ve as FilterItem,
6385
6291
  He as FilterOpEnum,
6386
- cr as GeoCoordinates,
6292
+ lr as GeoCoordinates,
6387
6293
  Hr as HiddenCatalogableItem,
6388
- ue as HttpCachedRequester,
6389
- et as HttpParamsConfig,
6294
+ pe as HttpCachedRequester,
6295
+ rt as HttpParamsConfig,
6390
6296
  h as HttpRequester,
6391
- H as Identity,
6392
- Br as Image,
6393
- G as JwtPayload,
6394
- Ae as Manager,
6297
+ j as Identity,
6298
+ Er as Image,
6299
+ d as JwtPayload,
6300
+ De as Manager,
6395
6301
  ce as ManagerCommon,
6396
6302
  ts as ManagerDataFactory,
6397
- wt as ManagerDataProvider,
6398
- Rt as MetaTagItem,
6303
+ Ct as ManagerDataProvider,
6304
+ Dt as MetaTagItem,
6399
6305
  b as NamedIdentity,
6400
- j as Opf,
6401
- L as OpfEnum,
6402
- vt as Order,
6403
- Pr as OrderInfo,
6404
- ct as OrderPaymentStatus,
6405
- Ct as OrderProduct,
6406
- vr as OrderShortInfo,
6407
- lt as OrderStatus,
6306
+ F as Opf,
6307
+ N as OpfEnum,
6308
+ Pt as Order,
6309
+ Rr as OrderInfo,
6310
+ lt as OrderPaymentStatus,
6311
+ vt as OrderProduct,
6312
+ Pr as OrderShortInfo,
6313
+ ut as OrderStatus,
6408
6314
  ss as OrdersDataProvider,
6409
6315
  re as PartnerGroup,
6410
6316
  pt as PaymentType,
6411
6317
  ye as PreferencesStorageProvider,
6412
- _e as PriceAnalyze,
6318
+ xe as PriceAnalyze,
6413
6319
  is as PriceAnalyzeProvider,
6414
- ae as PriceCoefficient,
6415
- or as PriceCoefficientEnum,
6320
+ Re as PriceCoefficient,
6321
+ cr as PriceCoefficientEnum,
6416
6322
  ns as PriceHistoryDataProvider,
6417
- Pt as PriceHistoryItem,
6323
+ Rt as PriceHistoryItem,
6418
6324
  W as PriceTemplate,
6419
- Te as PriceTemplateCategory,
6325
+ Se as PriceTemplateCategory,
6420
6326
  se as PriceTemplateClient,
6421
6327
  pr as PriceTemplateICatalogableItem,
6422
- be as PriceTemplateProduct,
6423
- Et as PriceTemplateProvider,
6328
+ ae as PriceTemplateProduct,
6329
+ Wt as PriceTemplateProvider,
6424
6330
  ne as PricingRole,
6425
- Wt as PricingRoleProvider,
6426
- de as PrimaryCatalogableItem,
6427
- x as Product,
6428
- Mt as ProductCategoryDataProvider,
6331
+ Jt as PricingRoleProvider,
6332
+ Oe as PrimaryCatalogableItem,
6333
+ I as Product,
6334
+ Bt as ProductCategoryDataProvider,
6429
6335
  Ht as ProductDataProvider,
6430
- ut as ProductFileType,
6431
- Ge as ProductPriceCoefficient,
6432
- at as ProductPriceHistory,
6433
- Jt as PropertiesProvider,
6336
+ ht as ProductFileType,
6337
+ Me as ProductPriceCoefficient,
6338
+ At as ProductPriceHistory,
6339
+ Vt as PropertiesProvider,
6434
6340
  ie as Property,
6435
- hr as PropertyType,
6436
- Jr as PropertyTypeEnum,
6437
- z as PropertyValue,
6341
+ gr as PropertyType,
6342
+ Vr as PropertyTypeEnum,
6343
+ E as PropertyValue,
6438
6344
  os as RecommendationsDataProvider,
6439
- Ze as RecommendationsList,
6440
- P as Reference,
6441
- T as ReferenceDataProvider,
6345
+ er as RecommendationsList,
6346
+ C as Reference,
6347
+ $ as ReferenceDataProvider,
6442
6348
  le as Region,
6443
- mr as ResourceType,
6444
- N as SalesDirection,
6445
- rt as SentryConfig,
6446
- er as Seo,
6349
+ fr as ResourceType,
6350
+ x as SalesDirection,
6351
+ tt as SentryConfig,
6352
+ rr as Seo,
6447
6353
  ls as SeoDataProvider,
6448
- fr as SourcePrimaryInterest,
6449
- Mr as StockCount,
6354
+ yr as SourcePrimaryInterest,
6355
+ Br as StockCount,
6450
6356
  Ut as TemplatesListFilters,
6451
- Fe as TypedInstanceFactory,
6452
- Ye as UnitsHelper,
6357
+ je as TypedInstanceFactory,
6358
+ Xe as UnitsHelper,
6453
6359
  Zt as UnknownClientDataProvider,
6454
- lr as UpdatableNamedIdentity,
6455
- Dt as User,
6456
- us as UserAuthDataProvider,
6457
- ur as UserCommonInfo,
6458
- $t as UserDataProvider,
6459
- Yr as UserPricingRole,
6460
- F as UserShortInfo,
6461
- At as UserTypeEnum,
6462
- tt as VersionConfig,
6463
- Re as Warehouse,
6464
- st as WebSocketConfig,
6465
- Ve as findCatalogItemByIdRecursive,
6466
- Ke as flattenCatalogItems,
6467
- $e as useAuthStateStore,
6360
+ ur as UpdatableNamedIdentity,
6361
+ $t as User,
6362
+ ps as UserAuthDataProvider,
6363
+ hr as UserCommonInfo,
6364
+ bt as UserDataProvider,
6365
+ Xr as UserPricingRole,
6366
+ U as UserShortInfo,
6367
+ Tt as UserTypeEnum,
6368
+ st as VersionConfig,
6369
+ Ae as Warehouse,
6370
+ it as WebSocketConfig,
6371
+ Ke as findCatalogItemByIdRecursive,
6372
+ Qe as flattenCatalogItems,
6373
+ be as useAuthStateStore,
6468
6374
  cs as useReferencesStore,
6469
6375
  hs as useUserStateStore
6470
6376
  };