@snabcentr/common-lib 2.0.4 → 2.0.5

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 ar, constant as Sr, isString as y, cloneDeep as Ir, toLower as Lr, isFunction as Ue, map as he, forEach as xr, 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
311
  const B = te("__auth_state_private", () => {
312
- const n = f(
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,14 +350,14 @@ const B = te("__auth_state_private", () => {
350
350
  */
351
351
  recalculateUserPermissions: i
352
352
  };
353
- }), $e = te("__auth_state", () => {
354
- const n = a(() => {
353
+ }), be = te("__auth_state", () => {
354
+ const n = P(() => {
355
355
  const o = B();
356
- if (A(o.jwtToken) && !A(o.jwtTokenUpdater)) {
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
  });
@@ -366,7 +366,7 @@ const B = te("__auth_state_private", () => {
366
366
  }
367
367
  function e(o) {
368
368
  const c = B();
369
- c.jwtToken = Promise.resolve(o), ye.saveActualDataToStorage("sc.token", o, Ee(o)), c.recalculateUserPermissions();
369
+ c.jwtToken = Promise.resolve(o), ye.saveActualDataToStorage("sc.token", o, We(o)), c.recalculateUserPermissions();
370
370
  }
371
371
  function s() {
372
372
  const o = B();
@@ -374,25 +374,25 @@ const B = te("__auth_state_private", () => {
374
374
  }
375
375
  function i(o) {
376
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)
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, (a) => (a == null ? void 0 : a.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 H;
387
+ const a = br(R, ".");
388
+ if (a.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] = a, G = (H = B().userPermissions) == null ? void 0 : H[_];
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]) => [ar(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: Sr(!0) };
568
568
  }
569
569
  }
570
- class Ge {
570
+ class Me {
571
571
  /**
572
572
  * Инициализирует экземпляр класса {@link ProductPriceCoefficient}.
573
573
  *
@@ -594,10 +594,10 @@ class Ge {
594
594
  * Признак того, что указанный коэффициент доступен текущему пользователю только для просмотра.
595
595
  */
596
596
  t(this, "readOnly");
597
- this.coefficient = new 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 Hr {
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 Br 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 Br {
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 Hr(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 S = class S {
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(Lr(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 = S.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) => S.convertHttpErrorResponse(e)
1042
1042
  ), this.interceptorIds.response.authErrorsResponseInterceptor = this.httpClient.interceptors.response.use((e) => e, this.authErrorsResponseInterceptors), this.interceptorIds.response.dataConverterResponseInterceptor = this.httpClient.interceptors.response.use(
1043
1043
  this.dataConverterResponseInterceptor,
1044
1044
  (e) => Promise.reject(e)
@@ -1050,7 +1050,7 @@ const d = class d {
1050
1050
  * @param handler Ссылка на функцию-обработчик ошибок.
1051
1051
  */
1052
1052
  static setDefaultErrorsResponseHandler(r) {
1053
- d.defaultErrorsResponseHandler = r;
1053
+ S.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(S.instances, r.name) || (S.instances[r.name] = je.simpleInstanceInitializer(r)), S.instances[r.name];
1062
1062
  }
1063
1063
  /**
1064
1064
  * Конвертирует данные ошибки HTTP запроса в более упрощённую и часто используемую форму.
@@ -1067,7 +1067,7 @@ const 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(S, "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(S, "defaultErrorsResponseHandler", f);
1167
+ let h = S;
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 L 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 L(e.salesDirection) : new L(), this.photo = e == null ? void 0 : e.photo, this.contacts = e != null && e.contacts ? new Yr(e.contacts) : void 0, this.isDefault = (e == null ? void 0 : e.isDefault) ?? !1, this.isRegionalDirector = (e == null ? void 0 : e.isRegionalDirector) ?? !1;
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 ae 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 He 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 L(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 L(e == null ? void 0 : e.salesDirection), this.debt = (e == null ? void 0 : e.debt) ?? 0, this.alternativeName = (e == null ? void 0 : e.alternativeName) ?? "", this.city = new He(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 Se 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 Ht 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 xr(s, (i) => i.map((o) => new Me(o))), s;
2587
2587
  });
2588
2588
  }
2589
2589
  /**
@@ -2595,14 +2595,14 @@ 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
  });
2602
2602
  });
2603
2603
  }
2604
2604
  }
2605
- class Ht extends h {
2605
+ class Bt extends h {
2606
2606
  /**
2607
2607
  * Возвращает данные об указанном продукте.
2608
2608
  *
@@ -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
  *
@@ -2735,8 +2735,8 @@ class zt extends h {
2735
2735
  );
2736
2736
  }
2737
2737
  }
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 {
2738
+ var Be = /* @__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))(Be || {});
2739
+ class Ve {
2740
2740
  /**
2741
2741
  * Инициализирует экземпляр класса {@link FilterItem}.
2742
2742
  *
@@ -2755,7 +2755,7 @@ class Je {
2755
2755
  * Значение с которым сравнивается поле.
2756
2756
  */
2757
2757
  t(this, "value");
2758
- this.field = (r == null ? void 0 : r.field) ?? "", this.op = (r == null ? void 0 : r.op) ?? He.Equals, this.value = (r == null ? void 0 : r.value) ?? "";
2758
+ this.field = (r == null ? void 0 : r.field) ?? "", this.op = (r == null ? void 0 : r.op) ?? Be.Equals, this.value = (r == null ? void 0 : r.value) ?? "";
2759
2759
  }
2760
2760
  /**
2761
2761
  * Преобразует фильтр в примитивное представление для API.
@@ -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 Se(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 Se(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 Se(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 ae(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 ae(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 ae(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 L());
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 L(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
  *
@@ -4024,11 +4028,11 @@ class Kt {
4024
4028
  /**
4025
4029
  * Период регистрации.
4026
4030
  */
4027
- t(this, "createdAt", new O());
4031
+ t(this, "createdAt", new k());
4028
4032
  /**
4029
4033
  * Период последнего входа.
4030
4034
  */
4031
- t(this, "lastLoginDate", new O());
4035
+ t(this, "lastLoginDate", new k());
4032
4036
  /**
4033
4037
  * Признак того, что в указанный период последнего входа, клиентом был сделан заказ.
4034
4038
  */
@@ -4069,11 +4073,11 @@ class Kt {
4069
4073
  * Данные о параметрах поиска последнего заказа который сделал пользователь.
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
+ var e, s, i, o, c, u;
4077
+ 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 He(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 L(p)), this.contragentInn = r == null ? void 0 : r.contragentInn, this.contragentType = new F(r == null ? void 0 : r.contragentType), this.preferredDeliveryType = new X(r == null ? void 0 : r.preferredDeliveryType), this.partnerGroups = (i = r == null ? void 0 : r.partnerGroups) == null ? void 0 : i.map((p) => new re(p)), this.contact = new Ne(r == null ? void 0 : r.contact), this.lastOrder = {
4078
+ createdAt: new k((o = r == null ? void 0 : r.lastOrder) == null ? void 0 : o.createdAt),
4075
4079
  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
4080
+ isApproved: (u = r == null ? void 0 : r.lastOrder) == null ? void 0 : u.isApproved
4077
4081
  };
4078
4082
  }
4079
4083
  /**
@@ -4120,7 +4124,7 @@ class Kt {
4120
4124
  this.salesDirections = [];
4121
4125
  break;
4122
4126
  case "contragentType":
4123
- this.contragentType = new j();
4127
+ this.contragentType = new F();
4124
4128
  break;
4125
4129
  case "preferredDeliveryType":
4126
4130
  this.preferredDeliveryType = new X();
@@ -4142,13 +4146,13 @@ class Kt {
4142
4146
  var e, s, i, o;
4143
4147
  const r = {};
4144
4148
  return Object.keys(this).forEach((c) => {
4145
- const p = this[c];
4149
+ const u = this[c];
4146
4150
  // eslint-disable-next-line prettier/prettier
4147
- A(p) || w(p) && p.trim().length === 0 || Ue(p.isNewRec) && p.isNewRec() || (r[c] = p);
4151
+ D(u) || y(u) && u.trim().length === 0 || Ue(u.isNewRec) && u.isNewRec() || (r[c] = u);
4148
4152
  }), !((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
4153
  }
4150
4154
  }
4151
- class vr extends H {
4155
+ class Pr extends j {
4152
4156
  /**
4153
4157
  * Инициализирует экземпляр класса {@link OrderShortInfo}.
4154
4158
  *
@@ -4168,10 +4172,10 @@ class vr extends H {
4168
4172
  * Признак того, что заказ подтвержден в 1С.
4169
4173
  */
4170
4174
  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;
4175
+ 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
4176
  }
4173
4177
  }
4174
- class ft extends b {
4178
+ class yt extends b {
4175
4179
  /**
4176
4180
  * Инициализирует экземпляр класса {@link ClientAdditionalData}.
4177
4181
  *
@@ -4204,10 +4208,10 @@ class ft extends b {
4204
4208
  * Список менеджеров.
4205
4209
  */
4206
4210
  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)));
4211
+ (s = e.contacts) != null && s.length && (this.contacts = e.contacts.map((o) => new M(o))), e.lastOrder && (this.lastOrder = new Pr(e.lastOrder)), (i = e.partnerGroups) != null && i.length && (this.partnerGroups = e.partnerGroups.map((o) => new re(o))), e.preferredDeliveryType && (this.preferredDeliveryType = new X(e.preferredDeliveryType)), e.salesDirection && (this.salesDirection = new L(e.salesDirection)), e.managers && (this.managers = e.managers.map((o) => new ce(o)));
4208
4212
  }
4209
4213
  }
4210
- class yt {
4214
+ class wt {
4211
4215
  /**
4212
4216
  * Инициализирует экземпляр класса {@link DataTablePaginationRequestParams}.
4213
4217
  *
@@ -4225,7 +4229,7 @@ class yt {
4225
4229
  this.page = (r == null ? void 0 : r.page) ?? 1, this.pageSize = (r == null ? void 0 : r.pageSize) ?? 50;
4226
4230
  }
4227
4231
  }
4228
- class Qt extends yt {
4232
+ class Yt extends wt {
4229
4233
  /**
4230
4234
  * Инициализирует экземпляр класса {@link DataTablePagination}.
4231
4235
  *
@@ -4256,7 +4260,7 @@ class Qt extends yt {
4256
4260
  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
4261
  }
4258
4262
  }
4259
- class Yt {
4263
+ class Xt {
4260
4264
  /**
4261
4265
  * Инициализирует экземпляр класса {@link ISortRequestParams}.
4262
4266
  *
@@ -4274,7 +4278,144 @@ class Yt {
4274
4278
  this.field = (r == null ? void 0 : r.field) ?? "", this.direction = (r == null ? void 0 : r.direction) ?? "asc";
4275
4279
  }
4276
4280
  }
4277
- class Xt extends De {
4281
+ class x extends Te {
4282
+ /**
4283
+ * Преобразует данные о клиенте в данные требуемые для запроса.
4284
+ *
4285
+ * @param client Данные о клиенте.
4286
+ */
4287
+ static transformClientDataToRequest(r) {
4288
+ var s;
4289
+ const e = {
4290
+ name: r.name,
4291
+ alternative_name: r.alternativeName,
4292
+ partner_groups: r.partnerGroups.map((i) => i.id),
4293
+ phone: r.phone,
4294
+ email: r.email,
4295
+ city_id: r.city.id,
4296
+ get_news: r.getNews,
4297
+ channel_primary_interest_id: r.channelPrimaryInterest.id,
4298
+ source_primary_interest_id: r.sourcePrimaryInterest.id,
4299
+ primary_demand: r.primaryDemand,
4300
+ is_excluded_from_ms_calls_to_clients: r.isExcludedFromMsCallsToClients,
4301
+ preferred_warehouse_id: (s = r.preferredWarehouse) == null ? void 0 : s.id
4302
+ };
4303
+ return r.isExcludedFromMsCallsToClients && (e.reason_excluded_from_ms_calls_to_clients = r.reasonExcludedFromMsCallsToClients), e;
4304
+ }
4305
+ /**
4306
+ * Преобразует данные о контрагенте клиента в данные требуемые для запроса.
4307
+ *
4308
+ * @param contragent Данные о контрагенте клиента.
4309
+ */
4310
+ static transformContragentClientDataToRequest(r) {
4311
+ var c, u, p, v, R, a, _, O;
4312
+ let e;
4313
+ const s = r, i = r, o = r;
4314
+ switch (r.opf.slug) {
4315
+ case N.Ic:
4316
+ e = {
4317
+ opf: s.opf.slug,
4318
+ name: s.name,
4319
+ alternative_name: s.alternativeName,
4320
+ partner_group_id: (c = s.partnerGroup) == null ? void 0 : c.id,
4321
+ manager_id: (u = s.manager) == null ? void 0 : u.id,
4322
+ comment: s.comment,
4323
+ inn: s.inn,
4324
+ okpo: s.okpo,
4325
+ director_name: s.directorName,
4326
+ director_position: s.directorPosition,
4327
+ director_acts_on: s.directorActsOn,
4328
+ legal_address: s.legalAddress,
4329
+ postal_address: s.postalAddress,
4330
+ actual_address: s.actualAddress
4331
+ };
4332
+ break;
4333
+ case N.UlR:
4334
+ e = {
4335
+ opf: i.opf.slug,
4336
+ name: i.name,
4337
+ alternative_name: i.alternativeName,
4338
+ partner_group_id: (p = i.partnerGroup) == null ? void 0 : p.id,
4339
+ manager_id: (v = i.manager) == null ? void 0 : v.id,
4340
+ comment: i.comment,
4341
+ inn: i.inn,
4342
+ kpp: i.kpp,
4343
+ okpo: i.okpo,
4344
+ director_name: i.directorName,
4345
+ director_position: i.directorPosition,
4346
+ director_acts_on: i.directorActsOn,
4347
+ legal_address: i.legalAddress,
4348
+ postal_address: i.postalAddress,
4349
+ actual_address: i.actualAddress
4350
+ };
4351
+ break;
4352
+ case N.UlNr:
4353
+ e = {
4354
+ opf: o.opf.slug,
4355
+ name: o.name,
4356
+ alternative_name: o.alternativeName,
4357
+ partner_group_id: (R = o.partnerGroup) == null ? void 0 : R.id,
4358
+ manager_id: (a = o.manager) == null ? void 0 : a.id,
4359
+ comment: o.comment,
4360
+ director_name: o.directorName,
4361
+ director_position: o.directorPosition,
4362
+ director_acts_on: o.directorActsOn,
4363
+ legal_address: o.legalAddress,
4364
+ postal_address: o.postalAddress,
4365
+ actual_address: o.actualAddress,
4366
+ registration_country_id: o.registrationCountry.id,
4367
+ registration_number: o.registrationNumber,
4368
+ tax_number: o.taxNumber || void 0
4369
+ };
4370
+ break;
4371
+ default:
4372
+ e = {
4373
+ opf: r.opf.slug,
4374
+ name: r.name,
4375
+ alternative_name: r.alternativeName,
4376
+ partner_group_id: (_ = r.partnerGroup) == null ? void 0 : _.id,
4377
+ manager_id: (O = r.manager) == null ? void 0 : O.id,
4378
+ comment: r.comment
4379
+ };
4380
+ break;
4381
+ }
4382
+ return e;
4383
+ }
4384
+ /**
4385
+ * Преобразует данные об адресе доставки клиенту в данные требуемые для запроса.
4386
+ *
4387
+ * @param deliveryAddress Данные об адресе доставки клиенту.
4388
+ */
4389
+ static transformClientDeliveryAddressToRequest(r) {
4390
+ var s, i;
4391
+ const e = {
4392
+ address: r.address,
4393
+ is_one_time: r.isOneTime ?? !1,
4394
+ is_transport_company_address: r.isTransportCompanyAddress ?? !1,
4395
+ comment: r.comment ?? ""
4396
+ };
4397
+ return r.coordinates && (e.coordinates = {
4398
+ lat: (s = r.coordinates) == null ? void 0 : s.lat,
4399
+ long: (i = r.coordinates) == null ? void 0 : i.long
4400
+ }), r.operatingHours && (e.operating_hours = {
4401
+ from: r.operatingHours.from,
4402
+ to: r.operatingHours.to
4403
+ }), e;
4404
+ }
4405
+ /**
4406
+ * Преобразует данные о банковских реквизитах контрагента в данные требуемые для запроса.
4407
+ *
4408
+ * @param bankAccount Данные о банковских реквизитах контрагента.
4409
+ */
4410
+ static transformClientContragentBankAccountToRequest(r) {
4411
+ return {
4412
+ bank_name: r.bankName,
4413
+ bic: r.bic,
4414
+ account_number: r.accountNumber,
4415
+ correspondent_account: r.correspondentAccount,
4416
+ currency_id: r.currency.id
4417
+ };
4418
+ }
4278
4419
  /**
4279
4420
  * Возвращает данные об указанном клиенте.
4280
4421
  *
@@ -4282,7 +4423,7 @@ class Xt extends De {
4282
4423
  * @see /doc/api/internal#/Клиенты/api_internal_client_get_full_info
4283
4424
  */
4284
4425
  getClient(r) {
4285
- return this.get(`/internal/clients/${r}`, {}, (e) => new Qe(e.data));
4426
+ return this.get(`/internal/clients/${r}`, {}, (e) => new Ye(e.data));
4286
4427
  }
4287
4428
  /**
4288
4429
  * Возвращает данные о клиентах, удовлетворяющих указанным параметрам поиска.
@@ -4297,7 +4438,7 @@ class Xt extends De {
4297
4438
  getClientsList(r, e, s, i) {
4298
4439
  return this.getPaginated("/internal/clients", r, e, s, i, (o) => {
4299
4440
  const c = { ...o.data };
4300
- return c.data = c.data.map((p) => new me(p)), c;
4441
+ return c.data = c.data.map((u) => new me(u)), c;
4301
4442
  });
4302
4443
  }
4303
4444
  /**
@@ -4310,7 +4451,7 @@ class Xt extends De {
4310
4451
  return this.getClientsList({
4311
4452
  groupOp: "and",
4312
4453
  groups: [],
4313
- filters: [{ field: "phone", op: He.Contains, value: r }]
4454
+ filters: [{ field: "phone", op: Be.Contains, value: r }]
4314
4455
  });
4315
4456
  }
4316
4457
  /**
@@ -4324,7 +4465,7 @@ class Xt extends De {
4324
4465
  const s = r.map((i) => i.id);
4325
4466
  return this.post("/internal/clients/additional-data", { clients: s, requested_data_types: e }, (i) => {
4326
4467
  let o = [];
4327
- return (i == null ? void 0 : i.data.length) > 0 && (o = i.data.map((c) => new ft(c))), o;
4468
+ return (i == null ? void 0 : i.data.length) > 0 && (o = i.data.map((c) => new yt(c))), o;
4328
4469
  });
4329
4470
  }
4330
4471
  /**
@@ -4336,70 +4477,42 @@ class Xt extends De {
4336
4477
  getAllClientContacts(r) {
4337
4478
  return this.get(`/internal/clients/${r}/contacts/all`, {}, (e) => {
4338
4479
  let s = [];
4339
- return (e == null ? void 0 : e.data.length) > 0 && (s = e.data.map((i) => new mt(i))), s;
4480
+ return (e == null ? void 0 : e.data.length) > 0 && (s = e.data.map((i) => new ft(i))), s;
4340
4481
  });
4341
4482
  }
4342
4483
  /**
4343
4484
  * Создаёт нового клиента на основе указанных данных.
4344
4485
  *
4345
4486
  * @param client Данные о клиенте.
4346
- * @param validationFieldResultData Список полей, для которых необходимо
4347
- * установить данные об ошибках валидации
4348
- * в случае ошибок в запросах.
4487
+ * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
4349
4488
  * @see /doc/api/internal#/Клиенты/api_internal_client_create
4350
4489
  */
4351
4490
  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
- );
4491
+ return this.post("/internal/clients", x.transformClientDataToRequest(r), (s) => new Ye(s.data), e);
4372
4492
  }
4373
4493
  /**
4374
4494
  * Обновляет данные указанного клиента.
4375
4495
  *
4376
4496
  * @param client Данные о клиенте.
4377
- * @param validationFieldResultData Список полей, для которых необходимо
4378
- * установить данные об ошибках валидации
4379
- * в случае ошибок в запросах.
4497
+ * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
4380
4498
  * @see /doc/api/internal#/Клиенты/api_internal_client_change
4381
4499
  */
4382
4500
  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
- );
4501
+ return this.patch(`/internal/clients/${r.id}`, x.transformClientDataToRequest(r), void 0, e);
4502
+ }
4503
+ /**
4504
+ * Обновляет данные "Не беспокоить" указанного клиента.
4505
+ *
4506
+ * @param client Данные о клиенте.
4507
+ * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
4508
+ * @see /doc/api/internal#/Клиенты/api_internal_client_change
4509
+ */
4510
+ updateClientNotDistribCommonData(r, e = {}) {
4511
+ const s = {
4512
+ get_news: r.getNews,
4513
+ is_excluded_from_ms_calls_to_clients: r.isExcludedFromMsCallsToClients
4514
+ };
4515
+ return r.isExcludedFromMsCallsToClients && (s.reason_excluded_from_ms_calls_to_clients = r.reasonExcludedFromMsCallsToClients), this.patch(`/internal/clients/${r.id}`, s, void 0, e);
4403
4516
  }
4404
4517
  /**
4405
4518
  * Изменяет пароль клиента.
@@ -4407,9 +4520,7 @@ class Xt extends De {
4407
4520
  * @param clientId Идентификатор клиента которому необходимо поменять пароль.
4408
4521
  * @param password Новый пароль.
4409
4522
  * @param passwordConfirm Пароль-подтверждение.
4410
- * @param validationFieldResultData Список полей, для которых необходимо
4411
- * установить данные об ошибках валидации
4412
- * в случае ошибок в запросах.
4523
+ * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
4413
4524
  * @see /doc/api/internal#/Клиенты/api_internal_client_change
4414
4525
  */
4415
4526
  changeClientPassword(r, e, s, i = {}) {
@@ -4470,87 +4581,14 @@ class Xt extends De {
4470
4581
  *
4471
4582
  * @param clientId Идентификатор клиента, к которому необходимо привязать контрагента.
4472
4583
  * @param contragent Данные о контрагенте клиента.
4473
- * @param validationFieldResultData Список полей, для которых необходимо
4474
- * установить данные об ошибках валидации
4475
- * в случае ошибок в запросах.
4584
+ * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
4476
4585
  * @see /doc/api/internal#/Контрагенты/api_internal_client_contragent_create
4477
4586
  */
4478
4587
  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
4588
  return this.post(
4551
4589
  `/internal/clients/${r}/contragents`,
4552
- i,
4553
- (q) => ve.createInstance(q.data),
4590
+ x.transformContragentClientDataToRequest(e),
4591
+ (i) => ve.createInstance(i.data),
4554
4592
  s
4555
4593
  );
4556
4594
  }
@@ -4559,87 +4597,14 @@ class Xt extends De {
4559
4597
  *
4560
4598
  * @param clientId Идентификатор клиента, к которому привязан контрагент.
4561
4599
  * @param contragent Данные о контрагенте клиента.
4562
- * @param validationFieldResultData Список полей, для которых необходимо
4563
- * установить данные об ошибках валидации
4564
- * в случае ошибок в запросах.
4600
+ * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
4565
4601
  * @see /doc/api/internal#/Контрагенты/api_internal_client_contragent_update
4566
4602
  */
4567
4603
  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
4604
  return this.patch(
4640
4605
  `/internal/clients/${r}/contragents/${e.id}`,
4641
- i,
4642
- (q) => ve.createInstance(q.data),
4606
+ x.transformContragentClientDataToRequest(e),
4607
+ (i) => ve.createInstance(i.data),
4643
4608
  s
4644
4609
  );
4645
4610
  }
@@ -4658,55 +4623,30 @@ class Xt extends De {
4658
4623
  *
4659
4624
  * @param clientId Идентификатор клиента, к которому необходимо привязать адрес доставки.
4660
4625
  * @param deliveryAddress Данные об адресе доставки.
4661
- * @param validationFieldResultData Список полей, для которых необходимо
4662
- * установить данные об ошибках валидации
4663
- * в случае ошибок в запросах.
4626
+ * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
4664
4627
  * @see /doc/api/internal#/Адреса доставки/api_internal_client_delivery_address_create
4665
4628
  */
4666
4629
  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);
4630
+ return this.post(
4631
+ `/internal/clients/${r}/delivery-addresses`,
4632
+ x.transformClientDeliveryAddressToRequest(e),
4633
+ (i) => new Pe(i.data),
4634
+ s
4635
+ );
4681
4636
  }
4682
4637
  /**
4683
4638
  * Обновляет данные об адресе доставки клиента.
4684
4639
  *
4685
4640
  * @param clientId Идентификатор клиента, к которому привязан адрес доставки.
4686
4641
  * @param deliveryAddress Данные об адресе доставки.
4687
- * @param validationFieldResultData Список полей, для которых необходимо
4688
- * установить данные об ошибках валидации
4689
- * в случае ошибок в запросах.
4642
+ * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
4690
4643
  * @see /doc/api/internal#/Адреса доставки/api_internal_client_delivery_address_update
4691
4644
  */
4692
4645
  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(
4646
+ return this.patch(
4707
4647
  `/internal/clients/${r}/delivery-addresses/${e.id}`,
4708
- i,
4709
- (p) => new Pe(p.data),
4648
+ x.transformClientDeliveryAddressToRequest(e),
4649
+ (i) => new Pe(i.data),
4710
4650
  s
4711
4651
  );
4712
4652
  }
@@ -4724,25 +4664,16 @@ class Xt extends De {
4724
4664
  * Создаёт новую запись банковских реквизитов контрагента.
4725
4665
  *
4726
4666
  * @param clientId Идентификатор клиента, к которому необходимо привязать банковские реквизиты.
4727
- * @param contragentId Идентификатор контрагента, к которому необходимо
4728
- * привязать банковские реквизиты.
4667
+ * @param contragentId Идентификатор контрагента, к которому необходимо привязать банковские реквизиты.
4729
4668
  * @param bankAccount Данные банковских реквизитов.
4730
- * @param validationFieldResultData Список полей, для которых необходимо
4731
- * установить данные об ошибках валидации
4732
- * в случае ошибок в запросах.
4669
+ * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
4733
4670
  * @see /doc/api/internal#/Банковские реквизиты/api_internal_client_contragent_bank_accounts_create
4734
4671
  */
4735
4672
  createContragentBankAccount(r, e, s, i = {}) {
4736
4673
  return this.post(
4737
4674
  `/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),
4675
+ x.transformClientContragentBankAccountToRequest(s),
4676
+ (o) => new qe(o.data),
4746
4677
  i
4747
4678
  );
4748
4679
  }
@@ -4750,25 +4681,16 @@ class Xt extends De {
4750
4681
  * Обновляет данные о банковских реквизитах контрагента.
4751
4682
  *
4752
4683
  * @param clientId Идентификатор клиента, к которому необходимо привязать банковские реквизиты.
4753
- * @param contragentId Идентификатор контрагента, к которому необходимо
4754
- * привязать банковские реквизиты.
4684
+ * @param contragentId Идентификатор контрагента, к которому необходимо привязать банковские реквизиты.
4755
4685
  * @param bankAccount Данные банковских реквизитов.
4756
- * @param validationFieldResultData Список полей, для которых необходимо
4757
- * установить данные об ошибках валидации
4758
- * в случае ошибок в запросах.
4686
+ * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
4759
4687
  * @see /doc/api/internal#/Адреса доставки/api_internal_client_delivery_address_update
4760
4688
  */
4761
4689
  updateContragentBankAccount(r, e, s, i = {}) {
4762
4690
  return this.patch(
4763
4691
  `/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),
4692
+ x.transformClientContragentBankAccountToRequest(s),
4693
+ (o) => new qe(o.data),
4772
4694
  i
4773
4695
  );
4774
4696
  }
@@ -4776,8 +4698,7 @@ class Xt extends De {
4776
4698
  * Удаляет указанные банковские реквизиты контрагента.
4777
4699
  *
4778
4700
  * @param clientId Идентификатор клиента, к которому необходимо привязать банковские реквизиты.
4779
- * @param contragentId Идентификатор контрагента, к которому необходимо
4780
- * привязать банковские реквизиты.
4701
+ * @param contragentId Идентификатор контрагента, к которому необходимо привязать банковские реквизиты.
4781
4702
  * @param bankAccount Данные банковских реквизитов.
4782
4703
  * @see /doc/api/internal#/Банковские реквизиты/api_internal_client_contragent_bank_accounts_delete
4783
4704
  */
@@ -4789,9 +4710,7 @@ class Xt extends De {
4789
4710
  *
4790
4711
  * @param clientId Идентификатор клиента, к которому привязано контактное лицо.
4791
4712
  * @param contactPerson Данные о контактном лице.
4792
- * @param validationFieldResultData Список полей, для которых необходимо
4793
- * установить данные об ошибках валидации
4794
- * в случае ошибок в запросах.
4713
+ * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
4795
4714
  * @see /doc/api/internal#/Контакты/api_internal_client_contact_create
4796
4715
  */
4797
4716
  createClientContact(r, e, s = {}) {
@@ -4813,9 +4732,7 @@ class Xt extends De {
4813
4732
  *
4814
4733
  * @param clientId Идентификатор клиента, к которому привязано контактное лицо.
4815
4734
  * @param contactPerson Данные о контактном лице.
4816
- * @param validationFieldResultData Список полей, для которых необходимо
4817
- * установить данные об ошибках валидации
4818
- * в случае ошибок в запросах.
4735
+ * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
4819
4736
  * @see /doc/api/internal#/Контакты/api_internal_client_contact_change
4820
4737
  */
4821
4738
  updateClientContact(r, e, s = {}) {
@@ -4859,9 +4776,7 @@ class Xt extends De {
4859
4776
  * @param clientId Идентификатор клиента, к которому привязано контактное лицо.
4860
4777
  * @param contragentId Идентификатор контрагента, к которому привязано контактное лицо.
4861
4778
  * @param contactPerson Данные о контактном лице.
4862
- * @param validationFieldResultData Список полей, для которых необходимо
4863
- * установить данные об ошибках валидации
4864
- * в случае ошибок в запросах.
4779
+ * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
4865
4780
  * @see /doc/api/internal#/Контакты/api_internal_client_contact_create
4866
4781
  */
4867
4782
  createContragentContact(r, e, s, i = {}) {
@@ -4908,9 +4823,7 @@ class Xt extends De {
4908
4823
  * @param clientId Идентификатор клиента, к которому привязано контактное лицо.
4909
4824
  * @param deliveryAddressId Идентификатор контрагента, к которому привязано контактное лицо.
4910
4825
  * @param contactPerson Данные о контактном лице.
4911
- * @param validationFieldResultData Список полей, для которых необходимо
4912
- * установить данные об ошибках валидации
4913
- * в случае ошибок в запросах.
4826
+ * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
4914
4827
  * @see /doc/api/internal#/Контакты/api_internal_client_contact_create
4915
4828
  */
4916
4829
  createDeliveryAddressContact(r, e, s, i = {}) {
@@ -4960,19 +4873,17 @@ class Xt extends De {
4960
4873
  * @param clientId Идентификатор клиента, к которому привязано контактное лицо.
4961
4874
  * @param contactPerson Данные о контактном лице.
4962
4875
  * @param extraData Дополнительные данные
4963
- * @param validationFieldResultData Список полей, для которых необходимо
4964
- * установить данные об ошибках валидации
4965
- * в случае ошибок в запросах.
4876
+ * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
4966
4877
  */
4967
4878
  createContact(r, e, s, i = {}) {
4968
- var c, p;
4879
+ var c, u;
4969
4880
  const o = {
4970
4881
  name: e.name,
4971
4882
  position: e.position,
4972
4883
  comment: e.comment,
4973
4884
  ...s
4974
4885
  };
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);
4886
+ 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
4887
  }
4977
4888
  /**
4978
4889
  * Устанавливает признак основного контактного лица.
@@ -5011,7 +4922,7 @@ const V = class V extends h {
5011
4922
  * Время кэширования данных ответов на запросы (секунд).
5012
4923
  */
5013
4924
  t(this, "responseDataCacheTimeout");
5014
- this.responseDataCacheTimeout = D.getConfig().http.responseDataCacheTimeout;
4925
+ this.responseDataCacheTimeout = T.getConfig().http.responseDataCacheTimeout;
5015
4926
  }
5016
4927
  /**
5017
4928
  * Возвращает кэшированные данные.
@@ -5048,10 +4959,10 @@ const V = class V extends h {
5048
4959
  */
5049
4960
  // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
5050
4961
  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;
4962
+ const c = s + (Y(o) ? "" : ` >>> ${JSON.stringify(o)}`), u = i ? V.getCachedResponse(c) : void 0;
4963
+ return u ? Promise.resolve(u) : this.get(s, o).then((p) => {
4964
+ const v = p.map((R) => je.instanceInitializer(e, R));
4965
+ return i && v && this.cacheResponse(s, v), v;
5055
4966
  });
5056
4967
  }
5057
4968
  };
@@ -5059,7 +4970,7 @@ const V = class V extends h {
5059
4970
  * Кэш результатов запросов.
5060
4971
  */
5061
4972
  t(V, "responseDataCache", /* @__PURE__ */ new Map());
5062
- let ue = V;
4973
+ let pe = V;
5063
4974
  class Zt extends h {
5064
4975
  /**
5065
4976
  * Выполняет проверку занят ли указанный номер телефона.
@@ -5102,7 +5013,7 @@ class es extends h {
5102
5013
  const i = this.get(
5103
5014
  `internal/catalog/categories/${r.id}/configurators/${(o = r.properties) == null ? void 0 : o.configurator}/product`,
5104
5015
  { params: e },
5105
- (c) => new x(c.data)
5016
+ (c) => new I(c.data)
5106
5017
  );
5107
5018
  return i.catch((c) => {
5108
5019
  this.errorResponseHandler(c, s);
@@ -5150,13 +5061,13 @@ class rs {
5150
5061
  * Возвращает диапазон дат по умолчанию.
5151
5062
  */
5152
5063
  static defaultDateRanges() {
5153
- const r = Lr(/* @__PURE__ */ new Date(), 1);
5064
+ const r = _r(/* @__PURE__ */ new Date(), 1);
5154
5065
  return {
5155
5066
  // 'Следующий рабочий день' - это значение по-умолчанию
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() }
5067
+ nextWorkingDay: { label: "Следующий рабочий день", from: Mr(r), to: Fr(r) },
5068
+ today: { label: "Сегодня", from: _e(), to: Ur() },
5069
+ yesterday: { label: "Вчера", from: dr(), to: Nr() },
5070
+ tomorrow: { label: "Завтра", from: qr(), to: Or() }
5160
5071
  };
5161
5072
  }
5162
5073
  }
@@ -5200,13 +5111,13 @@ const K = class K {
5200
5111
  * Список единиц измерения линейной величины.
5201
5112
  */
5202
5113
  t(K, "linearValues", ["пог.м.", "м.", "м2"]);
5203
- let Ye = K;
5114
+ let Xe = K;
5204
5115
  class ts {
5205
5116
  /**
5206
5117
  * Генерирует и возвращает данные-заглушку неопределённого менеджера.
5207
5118
  */
5208
5119
  static generateUndefinedManagerInstance() {
5209
- return new Ae({ id: 0, name: "- Не назначен -", isActive: !0, guid: "-undefined-" });
5120
+ return new De({ id: 0, name: "- Не назначен -", isActive: !0, guid: "-undefined-" });
5210
5121
  }
5211
5122
  /**
5212
5123
  * Выполняет проверку, является ли указанная запись записью-заглушкой с данными о неопределённом менеджере.
@@ -5217,26 +5128,26 @@ class ts {
5217
5128
  return r.id === 0 && r.guid === "-undefined-";
5218
5129
  }
5219
5130
  }
5220
- class wt extends ue {
5131
+ class Ct extends pe {
5221
5132
  /**
5222
5133
  * Возвращает {@link Promise} для получения справочника списка менеджеров.
5223
5134
  */
5224
5135
  async getManagers() {
5225
- const r = "/internal/managers", e = ue.getCachedResponse(r);
5136
+ const r = "/internal/managers", e = pe.getCachedResponse(r);
5226
5137
  if (e)
5227
5138
  return e;
5228
- const i = (await this.get(r)).data.map((o) => Fe.instanceInitializer(Ae, o));
5139
+ const i = (await this.get(r)).data.map((o) => je.instanceInitializer(De, o));
5229
5140
  return this.cacheResponse(r, i), i;
5230
5141
  }
5231
5142
  }
5232
- class Pr extends vr {
5143
+ class Rr extends Pr {
5233
5144
  /**
5234
5145
  * Инициализирует экземпляр класса {@link OrderInfo}.
5235
5146
  *
5236
5147
  * @param data Данные для первоначальной инициализации.
5237
5148
  */
5238
5149
  constructor(e) {
5239
- var s, i, o, c, p, u, m, v;
5150
+ var s, i, o, c, u, p, v, R;
5240
5151
  super(e);
5241
5152
  /**
5242
5153
  * Краткие данные о клиенте.
@@ -5284,13 +5195,13 @@ class Pr extends vr {
5284
5195
  onlinePaymentLink: (o = e == null ? void 0 : e.payment) == null ? void 0 : o.onlinePaymentLink
5285
5196
  }, this.delivery = {
5286
5197
  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;
5198
+ 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(),
5199
+ address: (v = e == null ? void 0 : e.delivery) != null && v.address ? new Pe(e.delivery.address) : void 0,
5200
+ warehouse: (R = e == null ? void 0 : e.delivery) != null && R.warehouse ? new Ae(e.delivery.warehouse) : void 0
5201
+ }, this.attachedUser = new U(e == null ? void 0 : e.attachedUser), this.status = (e == null ? void 0 : e.status) ?? 0, this.salesDirection = new L(e == null ? void 0 : e.salesDirection), this.pendingAt = 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
5202
  }
5292
5203
  }
5293
- class Ct extends H {
5204
+ class vt extends j {
5294
5205
  /**
5295
5206
  * Инициализирует экземпляр класса {@link OrderProduct}.
5296
5207
  *
@@ -5373,7 +5284,7 @@ class Ct extends H {
5373
5284
  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
5285
  }
5375
5286
  }
5376
- class vt extends Pr {
5287
+ class Pt extends Rr {
5377
5288
  /**
5378
5289
  * Инициализирует экземпляр класса {@link Order}.
5379
5290
  *
@@ -5413,10 +5324,10 @@ class vt extends Pr {
5413
5324
  * Признак, что разрешена передача заказа в работу без оплаты.
5414
5325
  */
5415
5326
  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;
5327
+ 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
5328
  }
5418
5329
  }
5419
- class ss extends De {
5330
+ class ss extends Te {
5420
5331
  /**
5421
5332
  * Возвращает данные о заказах, удовлетворяющих указанным параметрам поиска.
5422
5333
  *
@@ -5429,7 +5340,7 @@ class ss extends De {
5429
5340
  getOrders(r, e, s) {
5430
5341
  return this.getPaginated("/internal/orders", r, e ? [e] : void 0, s, {}, (i) => {
5431
5342
  const o = { ...i.data };
5432
- return o.data = o.data.map((c) => new Pr(c)), o;
5343
+ return o.data = o.data.map((c) => new Rr(c)), o;
5433
5344
  });
5434
5345
  }
5435
5346
  /**
@@ -5447,10 +5358,10 @@ class ss extends De {
5447
5358
  * @param orderId Идентификатор заказа для которого необходимо вернуть данные.
5448
5359
  */
5449
5360
  getOrder(r) {
5450
- return this.get(`/internal/orders/${r}`, {}, (e) => new vt(e.data));
5361
+ return this.get(`/internal/orders/${r}`, {}, (e) => new Pt(e.data));
5451
5362
  }
5452
5363
  }
5453
- class _e {
5364
+ class Le {
5454
5365
  /**
5455
5366
  * Инициализирует экземпляр класса {@link PriceAnalyze}.
5456
5367
  *
@@ -5477,12 +5388,12 @@ class _e {
5477
5388
  * Источник клиентской цены.
5478
5389
  */
5479
5390
  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;
5391
+ 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
5392
  }
5482
5393
  }
5483
- const Ie = (n) => {
5394
+ const xe = (n) => {
5484
5395
  var r, e, s, i, o;
5485
- return n ? sr(
5396
+ return n ? ir(
5486
5397
  {
5487
5398
  cities: (r = n.cities) == null ? void 0 : r.map((c) => c.id),
5488
5399
  clients: (e = n.clients) == null ? void 0 : e.map((c) => c.id),
@@ -5491,9 +5402,9 @@ const Ie = (n) => {
5491
5402
  salesDirections: (o = n.salesDirections) == null ? void 0 : o.map((c) => c.id),
5492
5403
  hideNotActive: n.hideNotActive
5493
5404
  },
5494
- (c) => A(c) || (Q(c) || ir(c)) && Y(c)
5405
+ (c) => D(c) || (Q(c) || nr(c)) && Y(c)
5495
5406
  ) : {};
5496
- }, Xe = (n) => {
5407
+ }, Ze = (n) => {
5497
5408
  const r = {};
5498
5409
  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
5410
  };
@@ -5511,10 +5422,10 @@ class is extends h {
5511
5422
  return this.get(
5512
5423
  `/internal/price/products/${r}/analyze`,
5513
5424
  {
5514
- ...Xe(e),
5515
- filters: Ie(s)
5425
+ ...Ze(e),
5426
+ filters: xe(s)
5516
5427
  },
5517
- (i) => i.data.map((o) => new _e(o))
5428
+ (i) => i.data.map((o) => new Le(o))
5518
5429
  );
5519
5430
  }
5520
5431
  /**
@@ -5530,10 +5441,10 @@ class is extends h {
5530
5441
  return this.get(
5531
5442
  `/internal/price/categories/${r}/analyze`,
5532
5443
  {
5533
- ...Xe(e),
5534
- filters: Ie(s)
5444
+ ...Ze(e),
5445
+ filters: xe(s)
5535
5446
  },
5536
- (i) => i.data.map((o) => new _e(o))
5447
+ (i) => i.data.map((o) => new Le(o))
5537
5448
  );
5538
5449
  }
5539
5450
  /**
@@ -5552,13 +5463,13 @@ class is extends h {
5552
5463
  `/internal/price/categories/${r}/analyze/square`,
5553
5464
  {
5554
5465
  ...e,
5555
- filters: Ie(s)
5466
+ filters: xe(s)
5556
5467
  },
5557
- (i) => i.data.map((o) => new _e(o))
5468
+ (i) => i.data.map((o) => new Le(o))
5558
5469
  );
5559
5470
  }
5560
5471
  }
5561
- class Pt {
5472
+ class Rt {
5562
5473
  /**
5563
5474
  * Инициализирует экземпляр класса {@link PriceHistoryItem}.
5564
5475
  *
@@ -5605,10 +5516,10 @@ class Pt {
5605
5516
  * @inheritDoc
5606
5517
  */
5607
5518
  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;
5519
+ 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
5520
  }
5610
5521
  }
5611
- class at extends oe {
5522
+ class At extends oe {
5612
5523
  /**
5613
5524
  * Инициализирует экземпляр класса {@link ProductPriceHistory}.
5614
5525
  *
@@ -5620,7 +5531,7 @@ class at extends oe {
5620
5531
  * @inheritDoc
5621
5532
  */
5622
5533
  t(this, "history");
5623
- this.history = he(e.history, (s) => new Pt(s));
5534
+ this.history = he(e.history, (s) => new Rt(s));
5624
5535
  }
5625
5536
  }
5626
5537
  class ns extends h {
@@ -5628,7 +5539,7 @@ class ns extends h {
5628
5539
  * Инициализирует экземпляр класса {@link UserAuthDataProvider}.
5629
5540
  */
5630
5541
  constructor() {
5631
- super(), this.baseUrl = `${D.getConfig().http.priceHistoryApiUrl ?? ""}/api`;
5542
+ super(), this.baseUrl = `${T.getConfig().http.priceHistoryApiUrl ?? ""}/api`;
5632
5543
  }
5633
5544
  /**
5634
5545
  * Возвращает данные об истории изменения цен.
@@ -5638,20 +5549,20 @@ class ns extends h {
5638
5549
  * @see /docs/api#/operations/api_internal_price_history_get
5639
5550
  */
5640
5551
  getProductPriceHistory(r) {
5641
- var i, o, c, p;
5642
- const e = D.getConfig().dateFormats.api, s = sr(
5643
- Oe(r, {
5552
+ var i, o, c, u;
5553
+ const e = T.getConfig().dateFormats.api, s = ir(
5554
+ de(r, {
5644
5555
  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
5556
+ from: ke((i = r.costDate) == null ? void 0 : i.from) ? q(r.costDate.from, e) : (o = r.costDate) == null ? void 0 : o.from,
5557
+ to: ke((c = r.costDate) == null ? void 0 : c.to) ? q(r.costDate.to, e) : (u = r.costDate) == null ? void 0 : u.to
5647
5558
  }
5648
5559
  }),
5649
- (u) => A(u) || (Q(u) || ir(u)) && Y(u)
5560
+ (p) => D(p) || (Q(p) || nr(p)) && Y(p)
5650
5561
  );
5651
- return this.get("/internal/history", s, (u) => he(u.data, (m) => new at(m)));
5562
+ return this.get("/internal/history", s, (p) => he(p.data, (v) => new At(v)));
5652
5563
  }
5653
5564
  }
5654
- class Ze {
5565
+ class er {
5655
5566
  /**
5656
5567
  * Инициализирует экземпляр класса {@link RecommendationsList}.
5657
5568
  *
@@ -5674,7 +5585,7 @@ class os extends h {
5674
5585
  * Инициализирует экземпляр класса {@link UserAuthDataProvider}.
5675
5586
  */
5676
5587
  constructor() {
5677
- super(), this.baseUrl = `${D.getConfig().http.recommendationsApiUrl ?? ""}/api`;
5588
+ super(), this.baseUrl = `${T.getConfig().http.recommendationsApiUrl ?? ""}/api`;
5678
5589
  }
5679
5590
  /**
5680
5591
  * Возвращает данные о рекомендациях указанной категории продуктов.
@@ -5683,7 +5594,7 @@ class os extends h {
5683
5594
  * @see /docs/api#/operations/api_internal_recommendations_product_category_get
5684
5595
  */
5685
5596
  getProductCategoryRecommendations(r) {
5686
- return this.get(`/internal/recommendations/categories/${r.id}`, {}, (e) => new Ze(e.data));
5597
+ return this.get(`/internal/recommendations/categories/${r.id}`, {}, (e) => new er(e.data));
5687
5598
  }
5688
5599
  /**
5689
5600
  * Возвращает данные о рекомендациях указанного продукта.
@@ -5692,7 +5603,7 @@ class os extends h {
5692
5603
  * @see /docs/api#/operations/api_internal_recommendations_product_get
5693
5604
  */
5694
5605
  getProductRecommendations(r) {
5695
- return this.get(`/internal/recommendations/products/${r.id}`, {}, (e) => new Ze(e.data));
5606
+ return this.get(`/internal/recommendations/products/${r.id}`, {}, (e) => new er(e.data));
5696
5607
  }
5697
5608
  /**
5698
5609
  * Выполняет сохранение данных о рекомендуемых категориях продуктов.
@@ -5721,7 +5632,7 @@ class os extends h {
5721
5632
  });
5722
5633
  }
5723
5634
  }
5724
- class T extends ue {
5635
+ class $ extends pe {
5725
5636
  /**
5726
5637
  * Возвращает {@link Promise} для получения данных указанного справочника.
5727
5638
  *
@@ -5730,20 +5641,20 @@ class T extends ue {
5730
5641
  * и использовать в случае аналогичных запросов.
5731
5642
  */
5732
5643
  getReference(r, e = !1) {
5733
- return this.getTypedDataArrayRequester(nt, `/internal/references/${r}`, e);
5644
+ return this.getTypedDataArrayRequester(ot, `/internal/references/${r}`, e);
5734
5645
  }
5735
5646
  /**
5736
5647
  * Возвращает {@link Promise} для получения справочника данных о канале
5737
5648
  * первичного интереса.
5738
5649
  */
5739
5650
  getChannelPrimaryInterest() {
5740
- return this.getTypedDataArrayRequester(gr, "/internal/references/channel-primary-interest", !0);
5651
+ return this.getTypedDataArrayRequester(mr, "/internal/references/channel-primary-interest", !0);
5741
5652
  }
5742
5653
  /**
5743
5654
  * Возвращает {@link Promise} для получения справочника должностей контактных лиц.
5744
5655
  */
5745
5656
  getContactPositions() {
5746
- return this.getTypedDataArrayRequester(ot, "/internal/references/contact-position", !0);
5657
+ return this.getTypedDataArrayRequester(ct, "/internal/references/contact-position", !0);
5747
5658
  }
5748
5659
  /**
5749
5660
  * Возвращает {@link Promise} для получения справочника списка валют.
@@ -5762,19 +5673,19 @@ class T extends ue {
5762
5673
  * Возвращает {@link Promise} для получения справочника данных организационно-правовых форм.
5763
5674
  */
5764
5675
  getOpf() {
5765
- return this.getTypedDataArrayRequester(j, "/public/references/opf", !0);
5676
+ return this.getTypedDataArrayRequester(F, "/public/references/opf", !0);
5766
5677
  }
5767
5678
  /**
5768
5679
  * Возвращает {@link Promise} для получения справочника данных статусов оплаты заказов.
5769
5680
  */
5770
5681
  getOrderPaymentStatuses() {
5771
- return this.getTypedDataArrayRequester(ct, "/public/references/order-payment-status", !0);
5682
+ return this.getTypedDataArrayRequester(lt, "/public/references/order-payment-status", !0);
5772
5683
  }
5773
5684
  /**
5774
5685
  * Возвращает {@link Promise} для получения справочника данных статусов заказов.
5775
5686
  */
5776
5687
  getOrderStatuses() {
5777
- return this.getTypedDataArrayRequester(lt, "/public/references/order-status", !0);
5688
+ return this.getTypedDataArrayRequester(ut, "/public/references/order-status", !0);
5778
5689
  }
5779
5690
  /**
5780
5691
  * Возвращает {@link Promise} для получения справочника данных типов оплаты заказов.
@@ -5786,19 +5697,19 @@ class T extends ue {
5786
5697
  * Возвращает {@link Promise} для получения справочника типов ресурсов.
5787
5698
  */
5788
5699
  getResourceTypes() {
5789
- return this.getTypedDataArrayRequester(mr, "/internal/references/resource-type", !0);
5700
+ return this.getTypedDataArrayRequester(fr, "/internal/references/resource-type", !0);
5790
5701
  }
5791
5702
  /**
5792
5703
  * Возвращает {@link Promise} для получения справочника данных направлений продаж.
5793
5704
  */
5794
5705
  getSalesDirections() {
5795
- return this.getTypedDataArrayRequester(N, "/public/references/sales-direction", !0);
5706
+ return this.getTypedDataArrayRequester(L, "/public/references/sales-direction", !0);
5796
5707
  }
5797
5708
  /**
5798
5709
  * Возвращает {@link Promise} для получения справочника данных об источнике первичного интереса.
5799
5710
  */
5800
5711
  getSourcePrimaryInterest() {
5801
- return this.getTypedDataArrayRequester(fr, "/internal/references/source-primary-interest", !0);
5712
+ return this.getTypedDataArrayRequester(yr, "/internal/references/source-primary-interest", !0);
5802
5713
  }
5803
5714
  /**
5804
5715
  * Выполняет поиск данных о городах по терму в названии.
@@ -5806,7 +5717,7 @@ class T extends ue {
5806
5717
  * @param term Терм поиска.
5807
5718
  */
5808
5719
  searchCity(r) {
5809
- return this.getTypedDataArrayRequester(Me, `/internal/references/city-with-region-and-country/search?term=${r}`);
5720
+ return this.getTypedDataArrayRequester(He, `/internal/references/city-with-region-and-country/search?term=${r}`);
5810
5721
  }
5811
5722
  /**
5812
5723
  * Выполняет поиск данных о регионах по терму в названии.
@@ -5834,29 +5745,29 @@ class T extends ue {
5834
5745
  * Возвращает {@link Promise} для получения справочника складов.
5835
5746
  */
5836
5747
  getWarehouses() {
5837
- return this.getTypedDataArrayRequester(Re, "/public/references/warehouse", !0);
5748
+ return this.getTypedDataArrayRequester(Ae, "/public/references/warehouse", !0);
5838
5749
  }
5839
5750
  /**
5840
5751
  * Возвращает {@link Promise} для получения справочника типов свойств.
5841
5752
  */
5842
5753
  getPropertyTypes() {
5843
- return this.getTypedDataArrayRequester(hr, "/internal/references/property-type", !0);
5754
+ return this.getTypedDataArrayRequester(gr, "/internal/references/property-type", !0);
5844
5755
  }
5845
5756
  /**
5846
5757
  * Возвращает {@link Promise} для получения справочника коэффициентов цен.
5847
5758
  */
5848
5759
  getPriceCoefficients() {
5849
- return this.getTypedDataArrayRequester(ae, "/internal/references/price-coefficient", !0);
5760
+ return this.getTypedDataArrayRequester(Re, "/internal/references/price-coefficient", !0);
5850
5761
  }
5851
5762
  /**
5852
5763
  * Возвращает {@link Promise} для получения справочника типов файлов продуктов/категорий.
5853
5764
  */
5854
5765
  getProductFileType() {
5855
- return this.getTypedDataArrayRequester(ut, "/public/references/product-file-type", !0);
5766
+ return this.getTypedDataArrayRequester(ht, "/public/references/product-file-type", !0);
5856
5767
  }
5857
5768
  }
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);
5769
+ const A = te("__references_private", () => {
5770
+ 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), a = m(void 0), _ = m(void 0), O = m(void 0), G = m(void 0), H = m(void 0), $e = m(void 0), l = m(void 0);
5860
5771
  return {
5861
5772
  /**
5862
5773
  * Список загружаемых/загруженных на данный момент значений.
@@ -5889,134 +5800,134 @@ const R = te("__references_private", () => {
5889
5800
  /**
5890
5801
  * Справочник статусов оплаты заказа.
5891
5802
  */
5892
- orderPaymentStatusReference: p,
5803
+ orderPaymentStatusReference: u,
5893
5804
  /**
5894
5805
  * Справочник статусов заказов.
5895
5806
  */
5896
- orderStatusReference: u,
5807
+ orderStatusReference: p,
5897
5808
  /**
5898
5809
  * Справочник типов оплаты заказов.
5899
5810
  */
5900
- paymentTypeReference: m,
5811
+ paymentTypeReference: v,
5901
5812
  /**
5902
5813
  * Справочник групп партнеров.
5903
5814
  */
5904
- partnerGroupReference: v,
5815
+ partnerGroupReference: R,
5905
5816
  /**
5906
5817
  * Справочник типов файлов продукктов/категорий.
5907
5818
  */
5908
- productFileTypeReference: $,
5819
+ productFileTypeReference: a,
5909
5820
  /**
5910
5821
  * Справочник типов ресурсов.
5911
5822
  */
5912
- resourceTypesReference: I,
5823
+ resourceTypesReference: _,
5913
5824
  /**
5914
5825
  * Справочник направлений продаж.
5915
5826
  */
5916
- salesDirectionsReference: k,
5827
+ salesDirectionsReference: O,
5917
5828
  /**
5918
5829
  * Справочник источников первичного интереса.
5919
5830
  */
5920
- sourcePrimaryInterestReference: S,
5831
+ sourcePrimaryInterestReference: G,
5921
5832
  /**
5922
5833
  * Справочник складов.
5923
5834
  */
5924
- warehousesReference: _,
5835
+ warehousesReference: H,
5925
5836
  /**
5926
5837
  * Справочник типов свойств.
5927
5838
  */
5928
- propertyTypesReference: q,
5839
+ propertyTypesReference: $e,
5929
5840
  /**
5930
5841
  * Справочник коэффициентов цен.
5931
5842
  */
5932
5843
  priceCoefficientsReference: l
5933
5844
  };
5934
5845
  }), 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) => {
5846
+ const n = P(() => {
5847
+ const l = A();
5848
+ return !l.channelPrimaryInterestReference && !l.dataLoaderList.channelPrimaryInterestReference && (l.dataLoaderList.channelPrimaryInterestReference = !0, h.getInstance($).getChannelPrimaryInterest().then((g) => {
5938
5849
  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) => {
5850
+ }).catch(f)), l.channelPrimaryInterestReference;
5851
+ }), r = P(() => {
5852
+ const l = A();
5853
+ return !l.contactPositionsReference && !l.dataLoaderList.contactPositionsReference && (l.dataLoaderList.contactPositionsReference = !0, h.getInstance($).getContactPositions().then((g) => {
5943
5854
  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) => {
5855
+ }).catch(f)), l.contactPositionsReference;
5856
+ }), e = P(() => {
5857
+ const l = A();
5858
+ return !l.currencyReference && !l.dataLoaderList.currencyReference && (l.dataLoaderList.currencyReference = !0, h.getInstance($).getCurrency().then((g) => {
5948
5859
  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) => {
5860
+ }).catch(f)), l.currencyReference;
5861
+ }), s = P(() => {
5862
+ const l = A();
5863
+ return !l.opfReference && !l.dataLoaderList.opfReference && (l.dataLoaderList.opfReference = !0, h.getInstance($).getOpf().then((g) => {
5953
5864
  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) => {
5865
+ }).catch(f)), l.opfReference;
5866
+ }), i = P(() => {
5867
+ const l = A();
5868
+ return !l.orderPaymentStatusReference && !l.dataLoaderList.orderPaymentStatusReference && (l.dataLoaderList.orderPaymentStatusReference = !0, h.getInstance($).getOrderPaymentStatuses().then((g) => {
5958
5869
  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) => {
5870
+ }).catch(f)), l.orderPaymentStatusReference;
5871
+ }), o = P(() => {
5872
+ const l = A();
5873
+ return !l.orderStatusReference && !l.dataLoaderList.orderStatusReference && (l.dataLoaderList.orderStatusReference = !0, h.getInstance($).getOrderStatuses().then((g) => {
5963
5874
  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) => {
5875
+ }).catch(f)), l.orderStatusReference;
5876
+ }), c = P(() => {
5877
+ const l = A();
5878
+ return !l.paymentTypeReference && !l.dataLoaderList.paymentTypeReference && (l.dataLoaderList.paymentTypeReference = !0, h.getInstance($).getPaymentTypes().then((g) => {
5968
5879
  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) => {
5880
+ }).catch(f)), l.paymentTypeReference;
5881
+ }), u = P(() => {
5882
+ const l = A();
5883
+ return !l.partnerGroupReference && !l.dataLoaderList.partnerGroupReference && (l.dataLoaderList.partnerGroupReference = !0, h.getInstance($).getPartnerGroup().then((g) => {
5973
5884
  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) => {
5885
+ }).catch(f)), l.partnerGroupReference;
5886
+ }), p = P(() => {
5887
+ const l = A();
5888
+ return !l.productFileTypeReference && !l.dataLoaderList.productFileTypeReference && (l.dataLoaderList.productFileTypeReference = !0, h.getInstance($).getProductFileType().then((g) => {
5978
5889
  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) => {
5890
+ }).catch(f)), l.productFileTypeReference;
5891
+ }), v = P(() => {
5892
+ const l = A();
5893
+ return !l.resourceTypesReference && !l.dataLoaderList.resourceTypesReference && (l.dataLoaderList.resourceTypesReference = !0, h.getInstance($).getResourceTypes().then((g) => {
5983
5894
  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) => {
5895
+ }).catch(f)), l.resourceTypesReference;
5896
+ }), R = P(() => {
5897
+ const l = A();
5898
+ return !l.salesDirectionsReference && !l.dataLoaderList.salesDirectionsReference && (l.dataLoaderList.salesDirectionsReference = !0, h.getInstance($).getSalesDirections().then((g) => {
5988
5899
  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) => {
5900
+ }).catch(f)), l.salesDirectionsReference;
5901
+ }), a = P(() => {
5902
+ const l = A();
5903
+ return !l.sourcePrimaryInterestReference && !l.dataLoaderList.sourcePrimaryInterestReference && (l.dataLoaderList.sourcePrimaryInterestReference = !0, h.getInstance($).getSourcePrimaryInterest().then((g) => {
5993
5904
  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) => {
5905
+ }).catch(f)), l.sourcePrimaryInterestReference;
5906
+ }), _ = P(() => {
5907
+ const l = A();
5908
+ return !l.deliveryTypeReference && !l.dataLoaderList.deliveryTypeReference && (l.dataLoaderList.deliveryTypeReference = !0, h.getInstance($).getDeliveryTypes().then((g) => {
5998
5909
  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) => {
5910
+ }).catch(f)), l.deliveryTypeReference;
5911
+ }), O = P(() => {
5912
+ const l = A();
5913
+ return !l.managersList && !l.dataLoaderList.managersList && (l.dataLoaderList.managersList = !0, h.getInstance(Ct).getManagers().then((g) => {
6003
5914
  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) => {
5915
+ }).catch(f)), l.managersList;
5916
+ }), G = P(() => {
5917
+ const l = A();
5918
+ return !l.warehousesReference && !l.dataLoaderList.warehousesReference && (l.dataLoaderList.warehousesReference = !0, h.getInstance($).getWarehouses().then((g) => {
6008
5919
  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) => {
5920
+ }).catch(f)), l.warehousesReference;
5921
+ }), H = P(() => {
5922
+ const l = A();
5923
+ return !l.propertyTypesReference && !l.dataLoaderList.propertyTypesReference && (l.dataLoaderList.propertyTypesReference = !0, h.getInstance($).getPropertyTypes().then((g) => {
6013
5924
  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) => {
5925
+ }).catch(f)), l.propertyTypesReference;
5926
+ }), $e = P(() => {
5927
+ const l = A();
5928
+ return !l.priceCoefficientsReference && !l.dataLoaderList.priceCoefficientsReference && (l.dataLoaderList.priceCoefficientsReference = !0, h.getInstance($).getPriceCoefficients().then((g) => {
6018
5929
  l.priceCoefficientsReference = g;
6019
- }).catch(y)), l.priceCoefficientsReference;
5930
+ }).catch(f)), l.priceCoefficientsReference;
6020
5931
  });
6021
5932
  return {
6022
5933
  /**
@@ -6050,46 +5961,46 @@ const R = te("__references_private", () => {
6050
5961
  /**
6051
5962
  * Справочник групп партнеров.
6052
5963
  */
6053
- partnerGroupsReference: p,
5964
+ partnerGroupsReference: u,
6054
5965
  /**
6055
5966
  * Справочник типов файлов продуктов/категорий.
6056
5967
  */
6057
- productFilesTypesReference: u,
5968
+ productFilesTypesReference: p,
6058
5969
  /**
6059
5970
  * Справочник типов ресурсов.
6060
5971
  */
6061
- resourceTypesReference: m,
5972
+ resourceTypesReference: v,
6062
5973
  /**
6063
5974
  * Справочник направлений продаж.
6064
5975
  */
6065
- salesDirectionsReference: v,
5976
+ salesDirectionsReference: R,
6066
5977
  /**
6067
5978
  * Справочник каналов первичного интереса.
6068
5979
  */
6069
- sourcePrimaryInterestsReference: $,
5980
+ sourcePrimaryInterestsReference: a,
6070
5981
  /**
6071
5982
  * Справочник типов доставки.
6072
5983
  */
6073
- deliveryTypeReference: I,
5984
+ deliveryTypeReference: _,
6074
5985
  /**
6075
5986
  * Список менеджеров.
6076
5987
  */
6077
- managersList: k,
5988
+ managersList: O,
6078
5989
  /**
6079
5990
  * Справочник складов.
6080
5991
  */
6081
- warehousesReference: S,
5992
+ warehousesReference: G,
6082
5993
  /**
6083
5994
  * Справочник типов свойств.
6084
5995
  */
6085
- propertyTypesReference: _,
5996
+ propertyTypesReference: H,
6086
5997
  /**
6087
5998
  * Справочник коэффициентов цен.
6088
5999
  */
6089
- priceCoefficientsReference: q
6000
+ priceCoefficientsReference: $e
6090
6001
  };
6091
6002
  });
6092
- class Rt {
6003
+ class Dt {
6093
6004
  /**
6094
6005
  * Инициализирует экземпляр класса {@link MetaTagItem}.
6095
6006
  *
@@ -6107,7 +6018,7 @@ class Rt {
6107
6018
  this.name = r.name, this.content = r.content;
6108
6019
  }
6109
6020
  }
6110
- class er {
6021
+ class rr {
6111
6022
  /**
6112
6023
  * Инициализирует экземпляр класса {@link Seo}.
6113
6024
  *
@@ -6143,7 +6054,7 @@ class er {
6143
6054
  */
6144
6055
  t(this, "meta");
6145
6056
  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))) ?? [];
6057
+ 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
6058
  }
6148
6059
  }
6149
6060
  class ls extends h {
@@ -6154,7 +6065,7 @@ class ls extends h {
6154
6065
  * @param resourceId Идентификатор ресурса для которого необходимо получить SEO-данные.
6155
6066
  */
6156
6067
  getResourceSeoData(r, e) {
6157
- return this.get(`/internal/seo/${r.slug}/${e}`, {}, (s) => new er(s.data));
6068
+ return this.get(`/internal/seo/${r.slug}/${e}`, {}, (s) => new rr(s.data));
6158
6069
  }
6159
6070
  /**
6160
6071
  * Выполняет сохранение данных о SEO-параметрах для указанного ресурса.
@@ -6165,7 +6076,7 @@ class ls extends h {
6165
6076
  * в случае ошибок в запросах.
6166
6077
  */
6167
6078
  saveResourceSeoData(r, e = {}) {
6168
- return this.post(`/internal/seo/${r.resourceType.slug}/${r.resourceId}`, r, (s) => new er(s.data), e);
6079
+ return this.post(`/internal/seo/${r.resourceType.slug}/${r.resourceId}`, r, (s) => new rr(s.data), e);
6169
6080
  }
6170
6081
  /**
6171
6082
  * Возвращает {@link Promise} для удаления данных о SEO-параметрах указанного ресурса.
@@ -6177,7 +6088,7 @@ class ls extends h {
6177
6088
  return this.delete(`/internal/seo/${r.slug}/${e}`);
6178
6089
  }
6179
6090
  }
6180
- class ps extends h {
6091
+ class us extends h {
6181
6092
  /**
6182
6093
  * Возвращает подсказки по адресам.
6183
6094
  *
@@ -6224,8 +6135,8 @@ class ps extends h {
6224
6135
  });
6225
6136
  }
6226
6137
  }
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 {
6138
+ var Tt = /* @__PURE__ */ ((n) => (n.Admin = "admin", n.Manager = "manager", n.Operator = "operator", n.Client = "client", n.Guest = "guest", n))(Tt || {});
6139
+ class $t extends hr {
6229
6140
  /**
6230
6141
  * Инициализирует экземпляр класса {@link User}.
6231
6142
  *
@@ -6248,12 +6159,12 @@ class Dt extends ur {
6248
6159
  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
6160
  }
6250
6161
  }
6251
- class us extends h {
6162
+ class ps extends h {
6252
6163
  /**
6253
6164
  * Инициализирует экземпляр класса {@link UserAuthDataProvider}.
6254
6165
  */
6255
6166
  constructor() {
6256
- super(), this.baseUrl = `${D.getConfig().http.portalApiUrl}/api`, this.interceptorIds.request.authRequestInterceptor && this.httpClient.interceptors.request.eject(this.interceptorIds.request.authRequestInterceptor);
6167
+ super(), this.baseUrl = `${T.getConfig().http.portalApiUrl}/api`, this.interceptorIds.request.authRequestInterceptor && this.httpClient.interceptors.request.eject(this.interceptorIds.request.authRequestInterceptor);
6257
6168
  }
6258
6169
  /**
6259
6170
  * Функция для получения обновленных токенов доступа.
@@ -6264,17 +6175,17 @@ class us extends h {
6264
6175
  return this.get("internal/users/current-tokens").then((r) => r.accessToken);
6265
6176
  }
6266
6177
  }
6267
- class $t extends h {
6178
+ class bt extends h {
6268
6179
  /**
6269
6180
  * Возвращает данные о текущем пользователе.
6270
6181
  */
6271
6182
  // eslint-disable-next-line class-methods-use-this
6272
6183
  getCurrentUser() {
6273
- return this.get("/internal/users/info", {}, (r) => new Dt(r.data));
6184
+ return this.get("/internal/users/info", {}, (r) => new $t(r.data));
6274
6185
  }
6275
6186
  }
6276
- const Tt = te("__user_state_private", () => {
6277
- const n = f({}), r = f(void 0);
6187
+ const at = te("__user_state_private", () => {
6188
+ const n = m({}), r = m(void 0);
6278
6189
  return {
6279
6190
  /**
6280
6191
  * Список загружаемых/загруженных на данный момент значений.
@@ -6289,11 +6200,11 @@ const Tt = te("__user_state_private", () => {
6289
6200
  /**
6290
6201
  * Данные о текущем пользователе.
6291
6202
  */
6292
- currentUser: a(() => {
6293
- const r = Tt();
6294
- return !r.currentUser && !r.dataLoaderList.currentUser && (r.dataLoaderList.currentUser = !0, h.getInstance($t).getCurrentUser().then((e) => {
6203
+ currentUser: P(() => {
6204
+ const r = at();
6205
+ return !r.currentUser && !r.dataLoaderList.currentUser && (r.dataLoaderList.currentUser = !0, h.getInstance(bt).getCurrentUser().then((e) => {
6295
6206
  r.currentUser = e;
6296
- }).catch(y).finally(() => {
6207
+ }).catch(f).finally(() => {
6297
6208
  r.dataLoaderList.currentUser = !1;
6298
6209
  })), r.currentUser;
6299
6210
  })
@@ -6322,149 +6233,149 @@ class gs {
6322
6233
  }
6323
6234
  }
6324
6235
  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,
6236
+ ot as AnyReference,
6237
+ Ft as AppBaseConfig,
6238
+ T as AppConfigProvider,
6239
+ qe as BankAccount,
6240
+ Te as BasePaginationProvider,
6241
+ Jr as CalculationTypeEnum,
6331
6242
  fe as Cart,
6332
- Er as CartItem,
6243
+ Wr as CartItem,
6333
6244
  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,
6245
+ dt as CartProvider,
6246
+ Mt as CatalogProvider,
6247
+ or as CatalogableItem,
6248
+ z as Category,
6249
+ Je as CategoryPricingRule,
6250
+ mr as ChannelPrimaryInterest,
6251
+ Kt as City,
6252
+ He as CityWithRegionAndCountry,
6253
+ Ye as Client,
6254
+ yt as ClientAdditionalData,
6344
6255
  we as ClientCategory,
6345
- Xt as ClientDataProvider,
6346
- Ft as ClientPriceProvider,
6347
- jt as ClientPriceTemplateProvider,
6256
+ x as ClientDataProvider,
6257
+ jt as ClientPriceProvider,
6258
+ Gt as ClientPriceTemplateProvider,
6348
6259
  Z as ClientProduct,
6349
- Bt as ClientProductCategoryDataProvider,
6260
+ Et as ClientProductCategoryDataProvider,
6350
6261
  zt as ClientProductDataProvider,
6351
6262
  me as ClientShortInfo,
6352
- it as ClientsAdditionalDataRequestTypeEnum,
6353
- Kt as ClientsListFilters,
6263
+ nt as ClientsAdditionalDataRequestTypeEnum,
6264
+ Qt as ClientsListFilters,
6354
6265
  oe as CodedIdentity,
6355
6266
  es as ConfiguratorProvider,
6356
6267
  Ne as Contact,
6357
- Qr as ContactLinks,
6268
+ Yr as ContactLinks,
6358
6269
  M as ContactPerson,
6359
- mt as ContactPersonRelated,
6360
- ot as ContactPosition,
6361
- Se as ContactRelation,
6362
- yr as ContragentBase,
6270
+ ft as ContactPersonRelated,
6271
+ ct as ContactPosition,
6272
+ Ie as ContactRelation,
6273
+ wr as ContragentBase,
6363
6274
  ve as ContragentFactory,
6364
- wr as ContragentIc,
6365
- ht as ContragentPerson,
6366
- gt as ContragentUlNr,
6367
- Cr as ContragentUlR,
6368
- je as CostSourceEnum,
6275
+ Cr as ContragentIc,
6276
+ gt as ContragentPerson,
6277
+ mt as ContragentUlNr,
6278
+ vr as ContragentUlR,
6279
+ Ge as CostSourceEnum,
6369
6280
  ee as Country,
6370
6281
  Ce as Currency,
6371
- ps as DataSuggestionProvider,
6372
- Qt as DataTablePagination,
6373
- yt as DataTablePaginationRequestParams,
6374
- Yt as DataTableSortRequestParams,
6282
+ us as DataSuggestionProvider,
6283
+ Yt as DataTablePagination,
6284
+ wt as DataTablePaginationRequestParams,
6285
+ Xt as DataTableSortRequestParams,
6375
6286
  rs as DateTimeProvider,
6376
- Vr as DeletableNamedIdentity,
6287
+ Kr as DeletableNamedIdentity,
6377
6288
  Pe as DeliveryAddress,
6378
6289
  X as DeliveryType,
6379
6290
  Nt as DetailedJwtPayload,
6380
- Zr as DeviceTypeResolutionConfig,
6381
- Kr as DiscountShortInfo,
6291
+ et as DeviceTypeResolutionConfig,
6292
+ Qr as DiscountShortInfo,
6382
6293
  gs as FieldValidationResultData,
6383
- pe as FilterGroup,
6384
- Je as FilterItem,
6385
- He as FilterOpEnum,
6386
- cr as GeoCoordinates,
6387
- Hr as HiddenCatalogableItem,
6388
- ue as HttpCachedRequester,
6389
- et as HttpParamsConfig,
6294
+ ue as FilterGroup,
6295
+ Ve as FilterItem,
6296
+ Be as FilterOpEnum,
6297
+ lr as GeoCoordinates,
6298
+ Br as HiddenCatalogableItem,
6299
+ pe as HttpCachedRequester,
6300
+ rt as HttpParamsConfig,
6390
6301
  h as HttpRequester,
6391
- H as Identity,
6392
- Br as Image,
6393
- G as JwtPayload,
6394
- Ae as Manager,
6302
+ j as Identity,
6303
+ Er as Image,
6304
+ d as JwtPayload,
6305
+ De as Manager,
6395
6306
  ce as ManagerCommon,
6396
6307
  ts as ManagerDataFactory,
6397
- wt as ManagerDataProvider,
6398
- Rt as MetaTagItem,
6308
+ Ct as ManagerDataProvider,
6309
+ Dt as MetaTagItem,
6399
6310
  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,
6311
+ F as Opf,
6312
+ N as OpfEnum,
6313
+ Pt as Order,
6314
+ Rr as OrderInfo,
6315
+ lt as OrderPaymentStatus,
6316
+ vt as OrderProduct,
6317
+ Pr as OrderShortInfo,
6318
+ ut as OrderStatus,
6408
6319
  ss as OrdersDataProvider,
6409
6320
  re as PartnerGroup,
6410
6321
  pt as PaymentType,
6411
6322
  ye as PreferencesStorageProvider,
6412
- _e as PriceAnalyze,
6323
+ Le as PriceAnalyze,
6413
6324
  is as PriceAnalyzeProvider,
6414
- ae as PriceCoefficient,
6415
- or as PriceCoefficientEnum,
6325
+ Re as PriceCoefficient,
6326
+ cr as PriceCoefficientEnum,
6416
6327
  ns as PriceHistoryDataProvider,
6417
- Pt as PriceHistoryItem,
6328
+ Rt as PriceHistoryItem,
6418
6329
  W as PriceTemplate,
6419
- Te as PriceTemplateCategory,
6330
+ ae as PriceTemplateCategory,
6420
6331
  se as PriceTemplateClient,
6421
6332
  pr as PriceTemplateICatalogableItem,
6422
- be as PriceTemplateProduct,
6423
- Et as PriceTemplateProvider,
6333
+ Se as PriceTemplateProduct,
6334
+ Wt as PriceTemplateProvider,
6424
6335
  ne as PricingRole,
6425
- Wt as PricingRoleProvider,
6426
- de as PrimaryCatalogableItem,
6427
- x as Product,
6428
- Mt as ProductCategoryDataProvider,
6429
- Ht as ProductDataProvider,
6430
- ut as ProductFileType,
6431
- Ge as ProductPriceCoefficient,
6432
- at as ProductPriceHistory,
6433
- Jt as PropertiesProvider,
6336
+ Jt as PricingRoleProvider,
6337
+ Oe as PrimaryCatalogableItem,
6338
+ I as Product,
6339
+ Ht as ProductCategoryDataProvider,
6340
+ Bt as ProductDataProvider,
6341
+ ht as ProductFileType,
6342
+ Me as ProductPriceCoefficient,
6343
+ At as ProductPriceHistory,
6344
+ Vt as PropertiesProvider,
6434
6345
  ie as Property,
6435
- hr as PropertyType,
6436
- Jr as PropertyTypeEnum,
6437
- z as PropertyValue,
6346
+ gr as PropertyType,
6347
+ Vr as PropertyTypeEnum,
6348
+ E as PropertyValue,
6438
6349
  os as RecommendationsDataProvider,
6439
- Ze as RecommendationsList,
6440
- P as Reference,
6441
- T as ReferenceDataProvider,
6350
+ er as RecommendationsList,
6351
+ C as Reference,
6352
+ $ as ReferenceDataProvider,
6442
6353
  le as Region,
6443
- mr as ResourceType,
6444
- N as SalesDirection,
6445
- rt as SentryConfig,
6446
- er as Seo,
6354
+ fr as ResourceType,
6355
+ L as SalesDirection,
6356
+ tt as SentryConfig,
6357
+ rr as Seo,
6447
6358
  ls as SeoDataProvider,
6448
- fr as SourcePrimaryInterest,
6449
- Mr as StockCount,
6359
+ yr as SourcePrimaryInterest,
6360
+ Hr as StockCount,
6450
6361
  Ut as TemplatesListFilters,
6451
- Fe as TypedInstanceFactory,
6452
- Ye as UnitsHelper,
6362
+ je as TypedInstanceFactory,
6363
+ Xe as UnitsHelper,
6453
6364
  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,
6365
+ ur as UpdatableNamedIdentity,
6366
+ $t as User,
6367
+ ps as UserAuthDataProvider,
6368
+ hr as UserCommonInfo,
6369
+ bt as UserDataProvider,
6370
+ Xr as UserPricingRole,
6371
+ U as UserShortInfo,
6372
+ Tt as UserTypeEnum,
6373
+ st as VersionConfig,
6374
+ Ae as Warehouse,
6375
+ it as WebSocketConfig,
6376
+ Ke as findCatalogItemByIdRecursive,
6377
+ Qe as flattenCatalogItems,
6378
+ be as useAuthStateStore,
6468
6379
  cs as useReferencesStore,
6469
6380
  hs as useUserStateStore
6470
6381
  };