@snabcentr/common-lib 1.64.0 → 1.65.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,14 +1,14 @@
1
- var pr = Object.defineProperty;
2
- var hr = (n, r, e) => r in n ? pr(n, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[r] = e;
3
- var t = (n, r, e) => hr(n, typeof r != "symbol" ? r + "" : r, e);
4
- import { jwtDecode as We } from "jwt-decode";
5
- import { merge as Ve, isNil as U, toUpper as gr, constant as mr, isUndefined as fr, isString as m, cloneDeep as yr, noop as y, toLower as wr, isEmpty as Se, isFunction as Le, map as ce, forEach as Cr, isDate as vr, isArray as Ee, omitBy as Pr, isObject as Rr } from "lodash-es";
6
- import { objectToCamel as Ie, objectToSnake as qe } from "ts-case-convert";
7
- import { parseISO as f, format as B, addSeconds as Ar, isAfter as Dr, startOfToday as Je, addBusinessDays as $r, endOfTomorrow as br, startOfTomorrow as Tr, endOfYesterday as ar, startOfYesterday as _r, endOfToday as Sr, endOfDay as Lr, startOfDay as Ir } from "date-fns";
8
- import xr from "axios";
9
- import { defineStore as me } from "pinia";
1
+ var ur = Object.defineProperty;
2
+ var pr = (n, r, e) => r in n ? ur(n, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[r] = e;
3
+ var t = (n, r, e) => pr(n, typeof r != "symbol" ? r + "" : r, e);
4
+ import { jwtDecode as je } from "jwt-decode";
5
+ import { merge as We, isNil as U, toUpper as hr, constant as gr, isUndefined as mr, isString as f, cloneDeep as fr, noop as m, toLower as yr, isFunction as _e, isEmpty as Se, map as le, forEach as wr, isDate as Cr, isArray as Ee, omitBy as vr, isObject as Pr } from "lodash-es";
6
+ import { objectToCamel as Le, objectToSnake as Oe } from "ts-case-convert";
7
+ import { parseISO as y, format as z, isAfter as Rr, startOfToday as Ve, addSeconds as Ar, addBusinessDays as Dr, endOfTomorrow as $r, startOfTomorrow as ar, endOfYesterday as Tr, startOfYesterday as br, endOfToday as _r, endOfDay as Sr, startOfDay as Lr } from "date-fns";
8
+ import Ir from "axios";
9
+ import { defineStore as fe } from "pinia";
10
10
  import { ref as C, computed as v } from "vue";
11
- class le {
11
+ class ue {
12
12
  /**
13
13
  * Инициализирует экземпляр класса {@link JwtPayload}.
14
14
  *
@@ -99,7 +99,7 @@ class le {
99
99
  * @inheritDoc
100
100
  */
101
101
  t(this, "email", "");
102
- Ve(this, r);
102
+ We(this, r);
103
103
  }
104
104
  /**
105
105
  * Возвращает данные полезной нагрузки для указанного JWT-токена.
@@ -107,10 +107,10 @@ class le {
107
107
  * @param jwtToken JWT-ключ доступа.
108
108
  */
109
109
  static getJwtPayload(r) {
110
- return new le(Ie(We(r)));
110
+ return new ue(Le(je(r)));
111
111
  }
112
112
  }
113
- class Dt extends le {
113
+ class At extends ue {
114
114
  /**
115
115
  * Инициализирует экземпляр класса {@link DetailedJwtPayload}.
116
116
  *
@@ -142,7 +142,7 @@ class Dt extends le {
142
142
  * @inheritDoc
143
143
  */
144
144
  t(this, "address");
145
- Ve(this, e);
145
+ We(this, e);
146
146
  }
147
147
  /**
148
148
  * Возвращает данные полезной нагрузки для указанного JWT-токена.
@@ -150,10 +150,10 @@ class Dt extends le {
150
150
  * @param jwtToken JWT-ключ доступа.
151
151
  */
152
152
  static getJwtPayload(e) {
153
- return new le(Ie(We(e)));
153
+ return new ue(Le(je(e)));
154
154
  }
155
155
  }
156
- class H {
156
+ class B {
157
157
  /**
158
158
  * Инициализирует экземпляр класса {@link Identity}.
159
159
  *
@@ -178,7 +178,7 @@ class H {
178
178
  return typeof this.id == "number" ? this.id === -1 : typeof this.id == "string" ? this.id === "" : U(this.id);
179
179
  }
180
180
  }
181
- class $ extends H {
181
+ class a extends B {
182
182
  /**
183
183
  * Инициализирует экземпляр класса {@link NamedIdentity}.
184
184
  *
@@ -193,7 +193,7 @@ class $ extends H {
193
193
  this.name = (e == null ? void 0 : e.name) ?? "";
194
194
  }
195
195
  }
196
- class Ke extends $ {
196
+ class Je extends a {
197
197
  /**
198
198
  * Инициализирует экземпляр класса {@link CatalogableItem}.
199
199
  *
@@ -216,7 +216,7 @@ class Ke extends $ {
216
216
  this.slug = (e == null ? void 0 : e.slug) ?? "", this.code = (e == null ? void 0 : e.code) ?? "";
217
217
  }
218
218
  }
219
- class $e extends Ke {
219
+ class ae extends Je {
220
220
  /**
221
221
  * Инициализирует экземпляр класса {@link PrimaryCatalogableItem}.
222
222
  *
@@ -231,7 +231,7 @@ class $e extends Ke {
231
231
  this.isPrimary = (e == null ? void 0 : e.isPrimary) ?? !1;
232
232
  }
233
233
  }
234
- class ie extends $e {
234
+ class ne extends ae {
235
235
  /**
236
236
  * Инициализирует экземпляр класса {@link BaseCategory}.
237
237
  *
@@ -255,11 +255,11 @@ class ie extends $e {
255
255
  * Список коэффициентов пересчёта из валют в рубли в формате ключ значение.
256
256
  */
257
257
  t(this, "currencyRates");
258
- 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]) => [gr(s), i])) : void 0;
258
+ 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]) => [hr(s), i])) : void 0;
259
259
  }
260
260
  }
261
- var Qe = /* @__PURE__ */ ((n) => (n.K0 = "k0", n.K1 = "k1", n.K2 = "k2", n.K3 = "k3", n.K4 = "k4", n.Retail = "retail", n))(Qe || {});
262
- class w extends $ {
261
+ var Ke = /* @__PURE__ */ ((n) => (n.K0 = "k0", n.K1 = "k1", n.K2 = "k2", n.K3 = "k3", n.K4 = "k4", n.Retail = "retail", n))(Ke || {});
262
+ class w extends a {
263
263
  /**
264
264
  * Инициализирует экземпляр класса {@link Reference}.
265
265
  *
@@ -278,15 +278,15 @@ class w extends $ {
278
278
  this.description = e == null ? void 0 : e.description, this.slug = e == null ? void 0 : e.slug;
279
279
  }
280
280
  }
281
- class fe extends w {
281
+ class ye extends w {
282
282
  /**
283
283
  * Возвращает значение справочника коэффициента розничной цены.
284
284
  */
285
285
  static getRetailPriceCoefficient() {
286
- return { id: -2, slug: Qe.Retail, name: "Розн. цена", guid: "", isNewRec: mr(!0) };
286
+ return { id: -2, slug: Ke.Retail, name: "Розн. цена", guid: "", isNewRec: gr(!0) };
287
287
  }
288
288
  }
289
- class xe {
289
+ class Ie {
290
290
  /**
291
291
  * Инициализирует экземпляр класса {@link ProductPriceCoefficient}.
292
292
  *
@@ -313,10 +313,10 @@ class xe {
313
313
  * Признак того, что указанный коэффициент доступен текущему пользователю только для просмотра.
314
314
  */
315
315
  t(this, "readOnly");
316
- this.coefficient = new fe(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;
316
+ this.coefficient = new ye(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;
317
317
  }
318
318
  }
319
- class Ye {
319
+ class Qe {
320
320
  /**
321
321
  * Инициализирует экземпляр класса {@link GeoCoordinates}.
322
322
  *
@@ -336,7 +336,7 @@ class Ye {
336
336
  }
337
337
  class J extends w {
338
338
  }
339
- class ye extends w {
339
+ class we extends w {
340
340
  /**
341
341
  * Инициализирует экземпляр класса {@link Warehouse}.
342
342
  *
@@ -365,10 +365,10 @@ class ye extends w {
365
365
  * Координаты склада.
366
366
  */
367
367
  t(this, "coordinates");
368
- 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 J(i))) ?? [], this.regions = (e == null ? void 0 : e.regions) ?? [], this.coordinates = new Ye(e == null ? void 0 : e.coordinates);
368
+ 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 J(i))) ?? [], this.regions = (e == null ? void 0 : e.regions) ?? [], this.coordinates = new Qe(e == null ? void 0 : e.coordinates);
369
369
  }
370
370
  }
371
- class kr {
371
+ class xr {
372
372
  /**
373
373
  * Инициализирует экземпляр класса {@link StockCount}.
374
374
  *
@@ -383,7 +383,7 @@ class kr {
383
383
  * Количество остатков товара на складе.
384
384
  */
385
385
  t(this, "count");
386
- this.warehouse = new ye(r == null ? void 0 : r.warehouse), this.count = (r == null ? void 0 : r.count) ?? 0;
386
+ this.warehouse = new we(r == null ? void 0 : r.warehouse), this.count = (r == null ? void 0 : r.count) ?? 0;
387
387
  }
388
388
  }
389
389
  const W = class W {
@@ -400,7 +400,7 @@ const W = class W {
400
400
  */
401
401
  // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
402
402
  static getConfig() {
403
- if (fr(W.config))
403
+ if (mr(W.config))
404
404
  throw new Error("Config is undefined. Please set config by AppConfigProvider.init().");
405
405
  return W.config;
406
406
  }
@@ -422,8 +422,8 @@ const W = class W {
422
422
  * Конфигурация приложения.
423
423
  */
424
424
  t(W, "config");
425
- let b = W;
426
- class Nr extends Ke {
425
+ let $ = W;
426
+ class kr extends Je {
427
427
  /**
428
428
  * Инициализирует экземпляр класса {@link HiddenCatalogableItem}.
429
429
  *
@@ -461,7 +461,7 @@ class dr {
461
461
  this.image = `${e ?? ""}${r.image}`, this.preview = `${e ?? ""}${r.preview}`, this.isDefault = r.isDefault;
462
462
  }
463
463
  }
464
- class a extends Nr {
464
+ class b extends kr {
465
465
  /**
466
466
  * Инициализирует экземпляр класса {@link Product}.
467
467
  *
@@ -546,16 +546,16 @@ class a extends Nr {
546
546
  * Список коэффициентов цен на продукт.
547
547
  */
548
548
  t(this, "priceCoefficients");
549
- 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 = m(e == null ? void 0 : e.costDate) ? f(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 kr(p))) ?? [], this.currencySignature = (e == null ? void 0 : e.currencySignature) ?? "", this.type = "product";
549
+ 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 = f(e == null ? void 0 : e.costDate) ? y(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 xr(p))) ?? [], this.currencySignature = (e == null ? void 0 : e.currencySignature) ?? "", this.type = "product";
550
550
  const s = (e == null ? void 0 : e.category) ?? ((o = e == null ? void 0 : e.categories) == null ? void 0 : o.find((p) => p.isPrimary));
551
- s && (this.category = new $e({ ...s, isPrimary: !0 }), this.categories = [this.category]), e != null && e.categories && (this.categories = e.categories.map((p) => new $e(p))), this.images = ((c = e == null ? void 0 : e.images) == null ? void 0 : c.map((p) => new dr(p, b.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 xe(p))) ?? [], e && "codeNumber" in e && !e.code && (this.code = e == null ? void 0 : e.codeNumber);
551
+ s && (this.category = new ae({ ...s, isPrimary: !0 }), this.categories = [this.category]), e != null && e.categories && (this.categories = e.categories.map((p) => new ae(p))), this.images = ((c = e == null ? void 0 : e.images) == null ? void 0 : c.map((p) => new dr(p, $.getConfig().http.mediaUrl))) ?? [], this.properties = (e == null ? void 0 : e.properties) ?? {}, this.retailCost = e == null ? void 0 : e.retailCost, this.retailCostRub = e == null ? void 0 : e.retailCostRub, this.priceCoefficients = ((u = e == null ? void 0 : e.priceCoefficients) == null ? void 0 : u.map((p) => new Ie(p))) ?? [], e && "codeNumber" in e && !e.code && (this.code = e == null ? void 0 : e.codeNumber);
552
552
  }
553
553
  /**
554
554
  * Возвращает признак, что это измеряемый товар.
555
555
  */
556
556
  getIsMeasurable() {
557
557
  var s;
558
- const e = (s = b.getConfig().catalog) == null ? void 0 : s.products.units;
558
+ const e = (s = $.getConfig().catalog) == null ? void 0 : s.products.units;
559
559
  return [...(e == null ? void 0 : e.linear) ?? ["пог.м.", "м."], ...(e == null ? void 0 : e.square) ?? ["м2"]].includes(this.unit);
560
560
  }
561
561
  /**
@@ -571,7 +571,7 @@ class a extends Nr {
571
571
  return this.retailCostRub ?? this.costRub;
572
572
  }
573
573
  }
574
- class Or extends H {
574
+ class Nr extends B {
575
575
  /**
576
576
  * Инициализирует экземпляр класса {@link CartItemBase}.
577
577
  *
@@ -623,10 +623,10 @@ class Or extends H {
623
623
  * Признак того, что позиция является дополнительной продажей.
624
624
  */
625
625
  t(this, "isAdditionalSale");
626
- this.product = new a(e == null ? void 0 : e.product), this.quantity = e.quantity ?? 0, this.marker = e.marker, this.category = e.category ?? new ie(), this.height = e.height, this.length = e.length, this.width = e.width, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams && yr(e.configuratorParams), this.isAdditionalSale = e.isAdditionalSale;
626
+ this.product = new b(e == null ? void 0 : e.product), this.quantity = e.quantity ?? 0, this.marker = e.marker, this.category = e.category ?? new ne(), this.height = e.height, this.length = e.length, this.width = e.width, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams && fr(e.configuratorParams), this.isAdditionalSale = e.isAdditionalSale;
627
627
  }
628
628
  }
629
- class qr extends Or {
629
+ class Or extends Nr {
630
630
  /**
631
631
  * Инициализирует экземпляр класса {@link CartItem}.
632
632
  *
@@ -676,7 +676,7 @@ class qr extends Or {
676
676
  this.currency = e.currency, this.cost = e.cost, this.costOne = e.costOne, this.costOneRub = e.costOneRub, this.costRub = e.costRub, this.logicGroupId = e.logicGroupId, this.salesDirection = e.salesDirection, this.specificationImgUrl = e.specificationImgUrl, this.sawing = e.sawing;
677
677
  }
678
678
  }
679
- class oe {
679
+ class ce {
680
680
  /**
681
681
  * Инициализирует экземпляр класса {@link Cart}.
682
682
  *
@@ -695,10 +695,10 @@ class oe {
695
695
  * Список итоговых сумм по направлениям продаж.
696
696
  */
697
697
  t(this, "directionsSum");
698
- this.items = r.items.map((e) => new qr(e)), this.resultSum = r.resultSum, this.directionsSum = r.directionsSum;
698
+ this.items = r.items.map((e) => new Or(e)), this.resultSum = r.resultSum, this.directionsSum = r.directionsSum;
699
699
  }
700
700
  }
701
- class Ur {
701
+ class qr {
702
702
  /**
703
703
  * Инициализирует экземпляр класса {@link DeviceTypeResolutionConfig}.
704
704
  *
@@ -720,7 +720,7 @@ class Ur {
720
720
  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;
721
721
  }
722
722
  }
723
- class Gr {
723
+ class Ur {
724
724
  /**
725
725
  * Инициализирует экземпляр класса {@link HttpParamsConfig}.
726
726
  *
@@ -728,21 +728,21 @@ class Gr {
728
728
  */
729
729
  constructor(r) {
730
730
  /**
731
- * API URI для выполнения запросов.
731
+ * @inheritDoc
732
732
  */
733
- t(this, "apiUri");
733
+ t(this, "portalApiUrl");
734
734
  /**
735
- * URL медиа-сервера.
735
+ * @inheritDoc
736
736
  */
737
737
  t(this, "mediaUrl");
738
738
  /**
739
- * Время кэширования данных ответов на запросы (секунд).
739
+ * @inheritDoc
740
740
  */
741
741
  t(this, "responseDataCacheTimeout");
742
- this.apiUri = (r == null ? void 0 : r.apiUri) ?? "", this.mediaUrl = (r == null ? void 0 : r.mediaUrl) ?? "", this.responseDataCacheTimeout = (r == null ? void 0 : r.responseDataCacheTimeout) ?? 3 * 60 * 60;
742
+ this.portalApiUrl = (r == null ? void 0 : r.portalApiUrl) ?? "", this.mediaUrl = (r == null ? void 0 : r.mediaUrl) ?? "", this.responseDataCacheTimeout = (r == null ? void 0 : r.responseDataCacheTimeout) ?? 3 * 60 * 60;
743
743
  }
744
744
  }
745
- class Mr {
745
+ class Gr {
746
746
  /**
747
747
  * Инициализирует экземпляр класса {@link SentryConfig}.
748
748
  *
@@ -787,7 +787,7 @@ class Mr {
787
787
  }, this.additionalParams = (r == null ? void 0 : r.additionalParams) ?? {};
788
788
  }
789
789
  }
790
- class Fr {
790
+ class Mr {
791
791
  /**
792
792
  * Инициализирует экземпляр класса {@link VersionConfig}.
793
793
  *
@@ -806,10 +806,10 @@ class Fr {
806
806
  * Текущая версия приложения.
807
807
  */
808
808
  t(this, "version");
809
- this.date = m(r == null ? void 0 : r.date) ? f(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";
809
+ this.date = f(r == null ? void 0 : r.date) ? y(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";
810
810
  }
811
811
  }
812
- class $t {
812
+ class Dt {
813
813
  /**
814
814
  * Инициализирует экземпляр класса {@link AppBaseConfig}.
815
815
  *
@@ -849,17 +849,17 @@ class $t {
849
849
  */
850
850
  t(this, "dateFormats");
851
851
  var e, s, i;
852
- this.environment = (r == null ? void 0 : r.environment) ?? "production", this.devMode = (r == null ? void 0 : r.devMode) ?? {}, this.http = new Gr(r == null ? void 0 : r.http), this.deviceTypeByResolution = new Ur(r == null ? void 0 : r.deviceTypeByResolution), this.sentry = new Mr({
852
+ this.environment = (r == null ? void 0 : r.environment) ?? "production", this.devMode = (r == null ? void 0 : r.devMode) ?? {}, this.http = new Ur(r == null ? void 0 : r.http), this.deviceTypeByResolution = new qr(r == null ? void 0 : r.deviceTypeByResolution), this.sentry = new Gr({
853
853
  environment: this.environment,
854
854
  ...r == null ? void 0 : r.sentry
855
- }), this.urls = r == null ? void 0 : r.urls, this.version = new Fr(r == null ? void 0 : r.version), this.dateFormats = {
855
+ }), this.urls = r == null ? void 0 : r.urls, this.version = new Mr(r == null ? void 0 : r.version), this.dateFormats = {
856
856
  api: ((e = r == null ? void 0 : r.dateFormats) == null ? void 0 : e.api) ?? "yyyy-MM-dd HH:mm:ss",
857
857
  uiDate: ((s = r == null ? void 0 : r.dateFormats) == null ? void 0 : s.uiDate) ?? "dd.MM.yyyy",
858
858
  uiDateWithTime: ((i = r == null ? void 0 : r.dateFormats) == null ? void 0 : i.uiDateWithTime) ?? "dd.MM.yyyy HH:mm"
859
859
  };
860
860
  }
861
861
  }
862
- class ke {
862
+ class xe {
863
863
  /**
864
864
  * Инициализирует экземпляр указанного класса.
865
865
  *
@@ -881,10 +881,8 @@ class ke {
881
881
  const _ = class _ {
882
882
  /**
883
883
  * Инициализирует экземпляр класса {@link HttpRequester}.
884
- *
885
- * @param baseUrl Базовый URL для выполнения запросов.
886
884
  */
887
- constructor(r) {
885
+ constructor() {
888
886
  /**
889
887
  * Клиент для выполнения запросов данных.
890
888
  */
@@ -896,23 +894,78 @@ const _ = class _ {
896
894
  * - error Данные об ошибке.
897
895
  * - validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
898
896
  */
899
- t(this, "defaultInstanceNotificationErrorResponseHandler", y);
900
- const e = b.getConfig().version;
901
- this.defaultInstanceNotificationErrorResponseHandler = _.baseDefaultNotificationErrorResponseHandler, this.httpClient = xr.create({
897
+ t(this, "defaultInstanceNotificationErrorResponseHandler", m);
898
+ /**
899
+ * Возвращает базовый URL путь для выполнения запросов.
900
+ */
901
+ // eslint-disable-next-line class-methods-use-this
902
+ t(this, "getBaseUrl", () => `${$.getConfig().http.portalApiUrl}/api`);
903
+ /**
904
+ * Возвращает токен доступа к системе.
905
+ */
906
+ // eslint-disable-next-line class-methods-use-this
907
+ t(this, "getAccessToken", () => {
908
+ var s, i;
909
+ let r;
910
+ const e = $.getConfig();
911
+ return (s = e.devMode) != null && s.authBearerToken && (r = (i = e.devMode) == null ? void 0 : i.authBearerToken), Promise.resolve(r);
912
+ });
913
+ /**
914
+ * Функция обратного вызова для аннулирования токена доступа, если он приводит к ошибкам 401.
915
+ */
916
+ t(this, "invalidateAccessToken", m);
917
+ /**
918
+ * Функция обратного вызова для обработки ошибок запросов.
919
+ *
920
+ * @param error Данные об ошибке.
921
+ */
922
+ t(this, "requestErrorHandler", m);
923
+ /**
924
+ * Перехватчик запроса для установки заголовков аутентификации.
925
+ *
926
+ * @param request Данные запроса.
927
+ */
928
+ t(this, "authRequestInterceptor", async (r) => {
929
+ const e = await this.getAccessToken();
930
+ return e && r.headers.set("Authorization", `Bearer ${e}`), r;
931
+ });
932
+ /**
933
+ * Перехватчик запроса для преобразования данных запроса.
934
+ *
935
+ * @param request Данные запроса.
936
+ */
937
+ // eslint-disable-next-line class-methods-use-this
938
+ t(this, "dataConverterRequestInterceptor", (r) => (r.method && (r.method === "get" && r.params && (r.params = Oe(r.params)), ["put", "patch", "post"].includes(yr(r.method)) && r.data && (r.data = Oe(r.data))), r));
939
+ /**
940
+ * Перехватчик ошибок ответов на запрос.
941
+ *
942
+ * @param error Данные ошибки ответа на запрос.
943
+ */
944
+ t(this, "authErrorsResponseInterceptors", (r) => {
945
+ var s;
946
+ const e = r.rawError ? (s = r.rawError) == null ? void 0 : s.config : void 0;
947
+ return r.status === 401 ? !e || e.__isRetryRequest ? Promise.reject(r) : (this.invalidateAccessToken(), e.__isRetryRequest = !0, this.httpClient(e)) : (this.requestErrorHandler(r), Promise.reject(r));
948
+ });
949
+ /**
950
+ * Перехватчик ответа для преобразования данных ответа на запрос.
951
+ *
952
+ * @param response Данные ответа на запрос.
953
+ */
954
+ // eslint-disable-next-line class-methods-use-this
955
+ t(this, "dataConverterResponseInterceptor", (r) => (r.data && (r.data = Le(r.data)), r));
956
+ const r = $.getConfig().version;
957
+ this.defaultInstanceNotificationErrorResponseHandler = _.baseDefaultNotificationErrorResponseHandler, this.httpClient = Ir.create({
902
958
  // eslint-disable-next-line @typescript-eslint/restrict-template-expressions
903
- baseURL: r,
959
+ baseURL: this.getBaseUrl(),
904
960
  headers: {
905
- "APP-VERSION": `${e.name} (${e.version}, ${B(e.date, b.getConfig().dateFormats.uiDate)})`,
961
+ "APP-VERSION": `${r.name} (${r.version}, ${z(r.date, $.getConfig().dateFormats.uiDate)})`,
906
962
  Accept: "application/json",
907
963
  "Content-Type": "application/json"
908
964
  }
909
- }), this.httpClient.interceptors.request.use(
910
- (s) => (s.method && (s.method === "get" && s.params && (s.params = qe(s.params)), ["put", "patch", "post"].includes(wr(s.method)) && s.data && (s.data = qe(s.data))), s),
911
- (s) => Promise.reject(s)
912
- ), this.httpClient.interceptors.response.use(
913
- (s) => (s.data && (s.data = Ie(s.data)), s),
965
+ }), this.httpClient.interceptors.request.use(this.authRequestInterceptor, (e) => Promise.reject(e)), this.httpClient.interceptors.request.use(this.dataConverterRequestInterceptor, (e) => Promise.reject(e)), this.httpClient.interceptors.response.use((e) => e, this.authErrorsResponseInterceptors), this.httpClient.interceptors.response.use(
966
+ this.dataConverterResponseInterceptor,
914
967
  // Возвращаем изменённую структуру сообщения об ошибке.
915
- (s) => _.convertHttpErrorResponse(s)
968
+ (e) => _.convertHttpErrorResponse(e)
916
969
  );
917
970
  }
918
971
  /**
@@ -929,7 +982,7 @@ const _ = class _ {
929
982
  * @param type Тип данных, которыми оперирует метод.
930
983
  */
931
984
  static getInstance(r) {
932
- return Object.prototype.hasOwnProperty.call(_.instances, r.name) || (_.instances[r.name] = ke.simpleInstanceInitializer(r)), _.instances[r.name];
985
+ return Object.prototype.hasOwnProperty.call(_.instances, r.name) || (_.instances[r.name] = xe.simpleInstanceInitializer(r)), _.instances[r.name];
933
986
  }
934
987
  /**
935
988
  * Конвертирует данные ошибки HTTP запроса в более упрощённую и часто используемую форму.
@@ -1031,86 +1084,9 @@ t(_, "instances", {}), /**
1031
1084
  * - error Данные об ошибке.
1032
1085
  * - validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
1033
1086
  */
1034
- t(_, "baseDefaultNotificationErrorResponseHandler", y);
1035
- let be = _;
1036
- const V = class V extends be {
1037
- /**
1038
- * Инициализирует экземпляр класса {@link HttpBaseCachedRequester}.
1039
- *
1040
- * @param baseUrl Базовый URL для выполнения запросов.
1041
- */
1042
- constructor(e) {
1043
- super(e);
1044
- /**
1045
- * Время кэширования данных ответов на запросы (секунд).
1046
- */
1047
- t(this, "responseDataCacheTimeout");
1048
- const s = b.getConfig();
1049
- this.responseDataCacheTimeout = s.http.responseDataCacheTimeout;
1050
- }
1051
- /**
1052
- * Возвращает кэшированные данные.
1053
- * Если кэшированные данные отсутствуют, то вернет undefined.
1054
- *
1055
- * @param key Ключ запроса.
1056
- */
1057
- static getCachedResponse(e) {
1058
- const s = V.responseDataCache.get(e);
1059
- if (s && s.validTo > /* @__PURE__ */ new Date())
1060
- return s.val;
1061
- }
1062
- /**
1063
- * Сохраняет указанные данные из запроса в кэш результатов.
1064
- *
1065
- * @param url URL запроса.
1066
- * @param data Данные для кэширования.
1067
- */
1068
- cacheResponse(e, s) {
1069
- V.responseDataCache.set(e, {
1070
- validTo: Ar(/* @__PURE__ */ new Date(), this.responseDataCacheTimeout),
1071
- val: s
1072
- });
1073
- }
1074
- /**
1075
- * Возвращает {@link Promise} типизированного результата выполнения запроса.
1076
- *
1077
- * @param type Тип возвращаемых данных.
1078
- * @param url URL запроса для получения данных.
1079
- * @param useResponseDataCache Признак необходимости кэшировать данные ответов на запросы
1080
- * и использовать в случае аналогичных запросов.
1081
- * @param params Дополнительные параметры запроса.
1082
- */
1083
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
1084
- getTypedDataArrayRequester(e, s, i = !1, o = {}) {
1085
- const c = s + (Se(o) ? "" : ` >>> ${JSON.stringify(o)}`), u = i ? V.getCachedResponse(c) : void 0;
1086
- return u ? Promise.resolve(u) : this.get(s, o).then((p) => {
1087
- const R = p.map((D) => ke.instanceInitializer(e, D));
1088
- return i && R && this.cacheResponse(s, R), R;
1089
- });
1090
- }
1091
- };
1092
- /**
1093
- * Кэш результатов запросов.
1094
- */
1095
- t(V, "responseDataCache", /* @__PURE__ */ new Map());
1096
- let Te = V;
1097
- class h extends Te {
1098
- /**
1099
- * Инициализирует экземпляр класса {@link HttpRequester}.
1100
- */
1101
- constructor() {
1102
- var e;
1103
- const r = b.getConfig();
1104
- super(`${r.http.apiUri}/api`), (e = r.devMode) != null && e.authBearerToken && this.httpClient.interceptors.request.use(
1105
- (s) => {
1106
- var i;
1107
- return s.headers.set("Authorization", `Bearer ${(i = r.devMode) == null ? void 0 : i.authBearerToken}`), s;
1108
- },
1109
- (s) => Promise.reject(s)
1110
- );
1111
- }
1112
- }
1113
- class bt extends h {
1087
+ t(_, "baseDefaultNotificationErrorResponseHandler", m);
1088
+ let h = _;
1089
+ class $t extends h {
1114
1090
  /**
1115
1091
  * Возвращает содержимое корзины указанного клиента.
1116
1092
  *
@@ -1119,7 +1095,7 @@ class bt extends h {
1119
1095
  * @see /doc/api/internal#/Корзина/api_internal_client_cart_get
1120
1096
  */
1121
1097
  getCart(r) {
1122
- return this.get(`internal/clients/${r.id}/cart`, {}, (e) => new oe(e.data));
1098
+ return this.get(`internal/clients/${r.id}/cart`, {}, (e) => new ce(e.data));
1123
1099
  }
1124
1100
  /**
1125
1101
  * Удаляет всё содержимое корзины.
@@ -1157,7 +1133,7 @@ class bt extends h {
1157
1133
  isAdditionalSale: e.isAdditionalSale,
1158
1134
  ...e.configuratorParams
1159
1135
  },
1160
- (i) => new oe(i.data),
1136
+ (i) => new ce(i.data),
1161
1137
  s
1162
1138
  );
1163
1139
  }
@@ -1187,7 +1163,7 @@ class bt extends h {
1187
1163
  isAdditionalSale: e.isAdditionalSale,
1188
1164
  ...e.configuratorParams
1189
1165
  },
1190
- (i) => new oe(i.data),
1166
+ (i) => new ce(i.data),
1191
1167
  s
1192
1168
  );
1193
1169
  }
@@ -1210,11 +1186,11 @@ class bt extends h {
1210
1186
  * @see /doc/api/internal#/Корзина/api_internal_client_cart_add_products_from_csv
1211
1187
  */
1212
1188
  addCartItemFromCSV(r) {
1213
- return this.post(`internal/clients/${r.id}/cart/add-products-from-csv`, {}, (e) => new oe(e.data));
1189
+ return this.post(`internal/clients/${r.id}/cart/add-products-from-csv`, {}, (e) => new ce(e.data));
1214
1190
  }
1215
1191
  }
1216
- var Hr = /* @__PURE__ */ ((n) => (n.m2Cost = "m2Cost", n.percent = "percent", n.value = "value", n))(Hr || {}), Ne = /* @__PURE__ */ ((n) => (n.Discount = "discount", n.PriceTemplate = "price_template", n.ClientPrice = "client_price", n.Product = "product", n))(Ne || {}), zr = /* @__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))(zr || {});
1217
- class q extends ie {
1192
+ var Fr = /* @__PURE__ */ ((n) => (n.m2Cost = "m2Cost", n.percent = "percent", n.value = "value", n))(Fr || {}), ke = /* @__PURE__ */ ((n) => (n.Discount = "discount", n.PriceTemplate = "price_template", n.ClientPrice = "client_price", n.Product = "product", n))(ke || {}), Br = /* @__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))(Br || {});
1193
+ class q extends ne {
1218
1194
  /**
1219
1195
  * Инициализирует экземпляр класса {@link Category}.
1220
1196
  *
@@ -1231,10 +1207,10 @@ class q extends ie {
1231
1207
  * Список продуктов категории.
1232
1208
  */
1233
1209
  t(this, "products");
1234
- this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new q(o)), this.products = (i = e == null ? void 0 : e.products) == null ? void 0 : i.map((o) => new a(o));
1210
+ this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new q(o)), this.products = (i = e == null ? void 0 : e.products) == null ? void 0 : i.map((o) => new b(o));
1235
1211
  }
1236
1212
  }
1237
- class Xe extends $ {
1213
+ class Ye extends a {
1238
1214
  /**
1239
1215
  * Инициализирует экземпляр класса {@link UpdatableNamedIdentity}.
1240
1216
  *
@@ -1246,10 +1222,10 @@ class Xe extends $ {
1246
1222
  * Дата и время последнего изменения.
1247
1223
  */
1248
1224
  t(this, "updatedAt");
1249
- this.updatedAt = m(e == null ? void 0 : e.updatedAt) ? f(e.updatedAt) : e == null ? void 0 : e.updatedAt;
1225
+ this.updatedAt = f(e == null ? void 0 : e.updatedAt) ? y(e.updatedAt) : e == null ? void 0 : e.updatedAt;
1250
1226
  }
1251
1227
  }
1252
- class Br extends Xe {
1228
+ class Hr extends Ye {
1253
1229
  /**
1254
1230
  * Инициализирует экземпляр класса {@link UpdatableNamedIdentity}.
1255
1231
  *
@@ -1261,10 +1237,10 @@ class Br extends Xe {
1261
1237
  * Дата и время последнего удаления.
1262
1238
  */
1263
1239
  t(this, "deletedAt");
1264
- this.deletedAt = m(e == null ? void 0 : e.deletedAt) ? f(e.deletedAt) : e == null ? void 0 : e.deletedAt;
1240
+ this.deletedAt = f(e == null ? void 0 : e.deletedAt) ? y(e.deletedAt) : e == null ? void 0 : e.deletedAt;
1265
1241
  }
1266
1242
  }
1267
- class Tt {
1243
+ class at {
1268
1244
  /**
1269
1245
  * Возвращает актуальные и не просроченные данные из хранилища.
1270
1246
  *
@@ -1275,7 +1251,7 @@ class Tt {
1275
1251
  if (e)
1276
1252
  try {
1277
1253
  const s = JSON.parse(e);
1278
- if (Dr(f(s.availableFor) || Je(), /* @__PURE__ */ new Date()))
1254
+ if (Rr(y(s.availableFor) || Ve(), /* @__PURE__ */ new Date()))
1279
1255
  return s.data ?? {};
1280
1256
  } catch {
1281
1257
  localStorage.removeItem(r);
@@ -1298,7 +1274,7 @@ class Tt {
1298
1274
  );
1299
1275
  }
1300
1276
  }
1301
- class G extends $ {
1277
+ class G extends a {
1302
1278
  /**
1303
1279
  * Инициализирует экземпляр класса {@link UserShortInfo}.
1304
1280
  *
@@ -1313,7 +1289,7 @@ class G extends $ {
1313
1289
  this.type = e == null ? void 0 : e.type;
1314
1290
  }
1315
1291
  }
1316
- class jr extends $ {
1292
+ class zr extends a {
1317
1293
  /**
1318
1294
  * Инициализирует экземпляр класса {@link DiscountShortInfo}.
1319
1295
  *
@@ -1349,10 +1325,10 @@ class jr extends $ {
1349
1325
  * Дата и время удаления.
1350
1326
  */
1351
1327
  t(this, "deletedAt");
1352
- this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.isLowPriceAllowed = (e == null ? void 0 : e.isLowPriceAllowed) ?? !1, this.publishedAt = m(e == null ? void 0 : e.publishedAt) ? f(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 G(e == null ? void 0 : e.owner), this.deletedAt = m(e == null ? void 0 : e.deletedAt) ? f(e.deletedAt) : e == null ? void 0 : e.deletedAt;
1328
+ this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.isLowPriceAllowed = (e == null ? void 0 : e.isLowPriceAllowed) ?? !1, this.publishedAt = f(e == null ? void 0 : e.publishedAt) ? y(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 G(e == null ? void 0 : e.owner), this.deletedAt = f(e == null ? void 0 : e.deletedAt) ? y(e.deletedAt) : e == null ? void 0 : e.deletedAt;
1353
1329
  }
1354
1330
  }
1355
- class j extends Xe {
1331
+ class j extends Ye {
1356
1332
  /**
1357
1333
  * Инициализирует экземпляр класса {@link PriceTemplate}.
1358
1334
  *
@@ -1368,10 +1344,10 @@ class j extends Xe {
1368
1344
  * Дата и время создания шаблона.
1369
1345
  */
1370
1346
  t(this, "createdAt");
1371
- this.description = (e == null ? void 0 : e.description) ?? "", this.createdAt = m(e == null ? void 0 : e.createdAt) ? f(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date();
1347
+ this.description = (e == null ? void 0 : e.description) ?? "", this.createdAt = f(e == null ? void 0 : e.createdAt) ? y(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date();
1372
1348
  }
1373
1349
  }
1374
- class K extends a {
1350
+ class K extends b {
1375
1351
  /**
1376
1352
  * Инициализирует экземпляр класса {@link ClientProduct}.
1377
1353
  *
@@ -1407,10 +1383,10 @@ class K extends a {
1407
1383
  * Признак того, что указанный продукт входит в список избранных продуктов клиента.
1408
1384
  */
1409
1385
  t(this, "isFavorite");
1410
- this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.costSource = (e == null ? void 0 : e.costSource) ?? Ne.Product, this.discount = e != null && e.discount ? new jr(e.discount) : void 0, this.priceTemplate = e != null && e.priceTemplate ? new j(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;
1386
+ this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.costSource = (e == null ? void 0 : e.costSource) ?? ke.Product, this.discount = e != null && e.discount ? new zr(e.discount) : void 0, this.priceTemplate = e != null && e.priceTemplate ? new j(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;
1411
1387
  }
1412
1388
  }
1413
- class Wr {
1389
+ class jr {
1414
1390
  /**
1415
1391
  * Инициализирует экземпляр класса {@link ContactLinks}.
1416
1392
  *
@@ -1430,7 +1406,7 @@ class Wr {
1430
1406
  }
1431
1407
  class S extends w {
1432
1408
  }
1433
- class re extends $ {
1409
+ class re extends a {
1434
1410
  /**
1435
1411
  * Инициализирует экземпляр класса {@link ManagerCommon}.
1436
1412
  *
@@ -1454,10 +1430,10 @@ class re extends $ {
1454
1430
  * Признак того, что менеджер является основным для клиента.
1455
1431
  */
1456
1432
  t(this, "isDefault");
1457
- e && (this.salesDirection = new S(e.salesDirection), this.photo = e.photo, e.contacts && (this.contacts = new Wr(e.contacts)), e.isDefault !== void 0 && (this.isDefault = e.isDefault));
1433
+ e && (this.salesDirection = new S(e.salesDirection), this.photo = e.photo, e.contacts && (this.contacts = new jr(e.contacts)), e.isDefault !== void 0 && (this.isDefault = e.isDefault));
1458
1434
  }
1459
1435
  }
1460
- class we extends re {
1436
+ class Ce extends re {
1461
1437
  /**
1462
1438
  * Инициализирует экземпляр класса {@link Manager}.
1463
1439
  *
@@ -1488,7 +1464,7 @@ class we extends re {
1488
1464
  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;
1489
1465
  }
1490
1466
  }
1491
- class Vr extends ie {
1467
+ class Wr extends ne {
1492
1468
  /**
1493
1469
  * Инициализирует экземпляр класса {@link BaseClientCategory}.
1494
1470
  *
@@ -1516,10 +1492,10 @@ class Vr extends ie {
1516
1492
  * Данные о менеджере за которым закреплена категория.
1517
1493
  */
1518
1494
  t(this, "manager");
1519
- 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 we(e.manager) : void 0;
1495
+ 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 Ce(e.manager) : void 0;
1520
1496
  }
1521
1497
  }
1522
- class ue extends Vr {
1498
+ class pe extends Wr {
1523
1499
  /**
1524
1500
  * Инициализирует экземпляр класса {@link ClientCategory}.
1525
1501
  *
@@ -1536,10 +1512,10 @@ class ue extends Vr {
1536
1512
  * Список продуктов категории.
1537
1513
  */
1538
1514
  t(this, "products");
1539
- this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new ue(o)), this.products = (i = e == null ? void 0 : e.products) == null ? void 0 : i.map((o) => new K(o));
1515
+ this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new pe(o)), this.products = (i = e == null ? void 0 : e.products) == null ? void 0 : i.map((o) => new K(o));
1540
1516
  }
1541
1517
  }
1542
- class Ze {
1518
+ class Xe {
1543
1519
  /**
1544
1520
  * Инициализирует экземпляр класса {@link PriceTemplateICatalogableItem}.
1545
1521
  *
@@ -1554,10 +1530,10 @@ class Ze {
1554
1530
  * Процент, который прибавляется к значению выбранного коэффициента.
1555
1531
  */
1556
1532
  t(this, "increasePercent");
1557
- this.priceCoefficient = (r == null ? void 0 : r.priceCoefficient) && new fe(r.priceCoefficient), this.increasePercent = r == null ? void 0 : r.increasePercent;
1533
+ this.priceCoefficient = (r == null ? void 0 : r.priceCoefficient) && new ye(r.priceCoefficient), this.increasePercent = r == null ? void 0 : r.increasePercent;
1558
1534
  }
1559
1535
  }
1560
- class ve extends Ze {
1536
+ class Pe extends Xe {
1561
1537
  /**
1562
1538
  * Инициализирует экземпляр класса {@link PriceTemplateProduct}.
1563
1539
  *
@@ -1569,7 +1545,7 @@ class ve extends Ze {
1569
1545
  * Базовые данные о продукте.
1570
1546
  */
1571
1547
  t(this, "productCategory");
1572
- this.productCategory = new ie(e == null ? void 0 : e.productCategory);
1548
+ this.productCategory = new ne(e == null ? void 0 : e.productCategory);
1573
1549
  }
1574
1550
  }
1575
1551
  class Q extends w {
@@ -1604,7 +1580,7 @@ class de extends w {
1604
1580
  e && (this.region = new te(e.region));
1605
1581
  }
1606
1582
  }
1607
- class er extends $ {
1583
+ class Ze extends a {
1608
1584
  /**
1609
1585
  * Инициализирует экземпляр класса {@link UserCommonInfo}.
1610
1586
  *
@@ -1640,10 +1616,10 @@ class er extends $ {
1640
1616
  * Признак активности учетной записи пользователя.
1641
1617
  */
1642
1618
  t(this, "isActive");
1643
- 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 S(e.salesDirection) : void 0, this.createdAt = m(e == null ? void 0 : e.createdAt) ? f(e.createdAt) : e == null ? void 0 : e.createdAt, this.lastLoginAt = m(e == null ? void 0 : e.lastLoginAt) ? f(e.lastLoginAt) : e == null ? void 0 : e.lastLoginAt, this.isActive = (e == null ? void 0 : e.isActive) ?? !1;
1619
+ 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 S(e.salesDirection) : void 0, this.createdAt = f(e == null ? void 0 : e.createdAt) ? y(e.createdAt) : e == null ? void 0 : e.createdAt, this.lastLoginAt = f(e == null ? void 0 : e.lastLoginAt) ? y(e.lastLoginAt) : e == null ? void 0 : e.lastLoginAt, this.isActive = (e == null ? void 0 : e.isActive) ?? !1;
1644
1620
  }
1645
1621
  }
1646
- class ne extends er {
1622
+ class oe extends Ze {
1647
1623
  /**
1648
1624
  * Инициализирует экземпляр класса {@link Client}.
1649
1625
  *
@@ -1688,7 +1664,7 @@ class ne extends er {
1688
1664
  this.salesDirection = new S(e == null ? void 0 : e.salesDirection), this.debt = (e == null ? void 0 : e.debt) ?? 0, this.alternativeName = (e == null ? void 0 : e.alternativeName) ?? "", this.city = new de(e == null ? void 0 : e.city), this.comment = e == null ? void 0 : e.comment, this.isPhoneApproved = (e == null ? void 0 : e.isPhoneApproved) ?? !1, this.isEmailApproved = (e == null ? void 0 : e.isEmailApproved) ?? !1, this.managers = ((s = e == null ? void 0 : e.managers) == null ? void 0 : s.map((i) => new re(i))) ?? [];
1689
1665
  }
1690
1666
  }
1691
- class X extends H {
1667
+ class X extends B {
1692
1668
  /**
1693
1669
  * Инициализирует новый экземпляр класса.
1694
1670
  *
@@ -1712,10 +1688,10 @@ class X extends H {
1712
1688
  * Данные шаблона прайс-листа.
1713
1689
  */
1714
1690
  t(this, "priceTemplate");
1715
- this.createdAt = m(e == null ? void 0 : e.createdAt) ? f(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.deletedAt = m(e == null ? void 0 : e.deletedAt) ? f(e.deletedAt) : e == null ? void 0 : e.deletedAt, this.client = new ne(e == null ? void 0 : e.client), this.priceTemplate = new j(e == null ? void 0 : e.priceTemplate);
1691
+ this.createdAt = f(e == null ? void 0 : e.createdAt) ? y(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.deletedAt = f(e == null ? void 0 : e.deletedAt) ? y(e.deletedAt) : e == null ? void 0 : e.deletedAt, this.client = new oe(e == null ? void 0 : e.client), this.priceTemplate = new j(e == null ? void 0 : e.priceTemplate);
1716
1692
  }
1717
1693
  }
1718
- class Pe extends Ze {
1694
+ class Re extends Xe {
1719
1695
  /**
1720
1696
  * Инициализирует экземпляр класса {@link PriceTemplateProduct}.
1721
1697
  *
@@ -1727,12 +1703,12 @@ class Pe extends Ze {
1727
1703
  * Базовые данные о продукте.
1728
1704
  */
1729
1705
  t(this, "product");
1730
- this.product = new a(e == null ? void 0 : e.product);
1706
+ this.product = new b(e == null ? void 0 : e.product);
1731
1707
  }
1732
1708
  }
1733
- class rr extends w {
1709
+ class er extends w {
1734
1710
  }
1735
- class Z extends $ {
1711
+ class Z extends a {
1736
1712
  /**
1737
1713
  * Инициализирует экземпляр класса {@link Property}.
1738
1714
  *
@@ -1752,10 +1728,10 @@ class Z extends $ {
1752
1728
  * Дополнительные метаданные свойства.
1753
1729
  */
1754
1730
  t(this, "metadata");
1755
- this.type = new rr(e == null ? void 0 : e.type), this.description = (e == null ? void 0 : e.description) ?? "", this.metadata = e == null ? void 0 : e.metadata;
1731
+ this.type = new er(e == null ? void 0 : e.type), this.description = (e == null ? void 0 : e.description) ?? "", this.metadata = e == null ? void 0 : e.metadata;
1756
1732
  }
1757
1733
  }
1758
- class z {
1734
+ class H {
1759
1735
  /**
1760
1736
  * Инициализирует экземпляр класса {@link PropertyValue}.
1761
1737
  *
@@ -1774,7 +1750,7 @@ class z {
1774
1750
  this.property = new Z(r == null ? void 0 : r.property), this.value = (r == null ? void 0 : r.value) ?? "";
1775
1751
  }
1776
1752
  }
1777
- class d {
1753
+ class N {
1778
1754
  /**
1779
1755
  * Инициализирует экземпляр класса {@link DatePeriod}.
1780
1756
  *
@@ -1789,10 +1765,10 @@ class d {
1789
1765
  * Окончание периода.
1790
1766
  */
1791
1767
  t(this, "to");
1792
- this.from = m(r == null ? void 0 : r.from) ? f(r.from) : (r == null ? void 0 : r.from) ?? null, this.to = m(r == null ? void 0 : r.to) ? f(r.to) : (r == null ? void 0 : r.to) ?? null;
1768
+ this.from = f(r == null ? void 0 : r.from) ? y(r.from) : (r == null ? void 0 : r.from) ?? null, this.to = f(r == null ? void 0 : r.to) ? y(r.to) : (r == null ? void 0 : r.to) ?? null;
1793
1769
  }
1794
1770
  }
1795
- class at {
1771
+ class Tt {
1796
1772
  /**
1797
1773
  * Инициализирует экземпляр класса {@link TemplatesListFilters}.
1798
1774
  *
@@ -1814,12 +1790,12 @@ class at {
1814
1790
  /**
1815
1791
  * Период создания.
1816
1792
  */
1817
- t(this, "createdAt", new d());
1793
+ t(this, "createdAt", new N());
1818
1794
  /**
1819
1795
  * Период изменения.
1820
1796
  */
1821
- t(this, "updatedAt", new d());
1822
- 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 d(r == null ? void 0 : r.createdAt), this.updatedAt = new d(r == null ? void 0 : r.updatedAt);
1797
+ t(this, "updatedAt", new N());
1798
+ 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 N(r == null ? void 0 : r.createdAt), this.updatedAt = new N(r == null ? void 0 : r.updatedAt);
1823
1799
  }
1824
1800
  /**
1825
1801
  * Выполняет сброс указанного фильтра в значение по умолчанию.
@@ -1852,19 +1828,19 @@ class at {
1852
1828
  return Object.keys(this).forEach((c) => {
1853
1829
  const u = this[c];
1854
1830
  // eslint-disable-next-line prettier/prettier
1855
- U(u) || m(u) && u.trim().length === 0 || Le(u.isNewRec) && u.isNewRec() || (r[c] = u);
1831
+ U(u) || f(u) && u.trim().length === 0 || _e(u.isNewRec) && u.isNewRec() || (r[c] = u);
1856
1832
  }), !((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;
1857
1833
  }
1858
1834
  }
1859
1835
  class Er extends w {
1860
1836
  }
1861
- class tr extends w {
1837
+ class rr extends w {
1862
1838
  }
1863
- class _t extends w {
1839
+ class bt extends w {
1864
1840
  }
1865
- class Jr extends w {
1841
+ class Vr extends w {
1866
1842
  }
1867
- class pe extends $ {
1843
+ class he extends a {
1868
1844
  /**
1869
1845
  * Инициализирует экземпляр класса {@link Currency}.
1870
1846
  *
@@ -1897,21 +1873,80 @@ class M extends w {
1897
1873
  });
1898
1874
  }
1899
1875
  }
1900
- class Kr extends w {
1876
+ class Jr extends w {
1901
1877
  }
1902
- class Qr extends w {
1878
+ class Kr extends w {
1903
1879
  }
1904
1880
  class Y extends w {
1905
1881
  }
1882
+ class Qr extends w {
1883
+ }
1906
1884
  class Yr extends w {
1907
1885
  }
1908
- class Xr extends w {
1886
+ class tr extends w {
1909
1887
  }
1910
1888
  class sr extends w {
1911
1889
  }
1912
- class ir extends w {
1913
- }
1914
- class A extends h {
1890
+ const E = class E extends h {
1891
+ /**
1892
+ * Инициализирует экземпляр класса {@link HttpCachedRequester}.
1893
+ */
1894
+ constructor() {
1895
+ super();
1896
+ /**
1897
+ * Время кэширования данных ответов на запросы (секунд).
1898
+ */
1899
+ t(this, "responseDataCacheTimeout");
1900
+ this.responseDataCacheTimeout = $.getConfig().http.responseDataCacheTimeout;
1901
+ }
1902
+ /**
1903
+ * Возвращает кэшированные данные.
1904
+ * Если кэшированные данные отсутствуют, то вернет undefined.
1905
+ *
1906
+ * @param key Ключ запроса.
1907
+ */
1908
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
1909
+ static getCachedResponse(e) {
1910
+ const s = E.responseDataCache.get(e);
1911
+ if (s && s.validTo > /* @__PURE__ */ new Date())
1912
+ return s.val;
1913
+ }
1914
+ /**
1915
+ * Сохраняет указанные данные из запроса в кэш результатов.
1916
+ *
1917
+ * @param url URL запроса.
1918
+ * @param data Данные для кэширования.
1919
+ */
1920
+ cacheResponse(e, s) {
1921
+ E.responseDataCache.set(e, {
1922
+ validTo: Ar(/* @__PURE__ */ new Date(), this.responseDataCacheTimeout),
1923
+ val: s
1924
+ });
1925
+ }
1926
+ /**
1927
+ * Возвращает {@link Promise} типизированного результата выполнения запроса.
1928
+ *
1929
+ * @param type Тип возвращаемых данных.
1930
+ * @param url URL запроса для получения данных.
1931
+ * @param useResponseDataCache Признак необходимости кэшировать данные ответов на запросы
1932
+ * и использовать в случае аналогичных запросов.
1933
+ * @param params Дополнительные параметры запроса.
1934
+ */
1935
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
1936
+ getTypedDataArrayRequester(e, s, i = !1, o = {}) {
1937
+ const c = s + (Se(o) ? "" : ` >>> ${JSON.stringify(o)}`), u = i ? E.getCachedResponse(c) : void 0;
1938
+ return u ? Promise.resolve(u) : this.get(s, o).then((p) => {
1939
+ const R = p.map((D) => xe.instanceInitializer(e, D));
1940
+ return i && R && this.cacheResponse(s, R), R;
1941
+ });
1942
+ }
1943
+ };
1944
+ /**
1945
+ * Кэш результатов запросов.
1946
+ */
1947
+ t(E, "responseDataCache", /* @__PURE__ */ new Map());
1948
+ let se = E;
1949
+ class A extends se {
1915
1950
  /**
1916
1951
  * Возвращает {@link Promise} для получения данных указанного справочника.
1917
1952
  *
@@ -1927,19 +1962,19 @@ class A extends h {
1927
1962
  * первичного интереса.
1928
1963
  */
1929
1964
  getChannelPrimaryInterest() {
1930
- return this.getTypedDataArrayRequester(tr, "/internal/references/channel-primary-interest", !0);
1965
+ return this.getTypedDataArrayRequester(rr, "/internal/references/channel-primary-interest", !0);
1931
1966
  }
1932
1967
  /**
1933
1968
  * Возвращает {@link Promise} для получения справочника должностей контактных лиц.
1934
1969
  */
1935
1970
  getContactPositions() {
1936
- return this.getTypedDataArrayRequester(Jr, "/internal/references/contact-position", !0);
1971
+ return this.getTypedDataArrayRequester(Vr, "/internal/references/contact-position", !0);
1937
1972
  }
1938
1973
  /**
1939
1974
  * Возвращает {@link Promise} для получения справочника списка валют.
1940
1975
  */
1941
1976
  getCurrency() {
1942
- return this.getTypedDataArrayRequester(pe, "/public/references/currency", !0);
1977
+ return this.getTypedDataArrayRequester(he, "/public/references/currency", !0);
1943
1978
  }
1944
1979
  /**
1945
1980
  * Возвращает {@link Promise} для получения справочника данных
@@ -1958,25 +1993,25 @@ class A extends h {
1958
1993
  * Возвращает {@link Promise} для получения справочника данных статусов оплаты заказов.
1959
1994
  */
1960
1995
  getOrderPaymentStatuses() {
1961
- return this.getTypedDataArrayRequester(Kr, "/public/references/order-payment-status", !0);
1996
+ return this.getTypedDataArrayRequester(Jr, "/public/references/order-payment-status", !0);
1962
1997
  }
1963
1998
  /**
1964
1999
  * Возвращает {@link Promise} для получения справочника данных статусов заказов.
1965
2000
  */
1966
2001
  getOrderStatuses() {
1967
- return this.getTypedDataArrayRequester(Qr, "/public/references/order-status", !0);
2002
+ return this.getTypedDataArrayRequester(Kr, "/public/references/order-status", !0);
1968
2003
  }
1969
2004
  /**
1970
2005
  * Возвращает {@link Promise} для получения справочника данных типов оплаты заказов.
1971
2006
  */
1972
2007
  getPaymentTypes() {
1973
- return this.getTypedDataArrayRequester(Yr, "/public/references/payment-type", !0);
2008
+ return this.getTypedDataArrayRequester(Qr, "/public/references/payment-type", !0);
1974
2009
  }
1975
2010
  /**
1976
2011
  * Возвращает {@link Promise} для получения справочника типов ресурсов.
1977
2012
  */
1978
2013
  getResourceTypes() {
1979
- return this.getTypedDataArrayRequester(sr, "/internal/references/resource-type", !0);
2014
+ return this.getTypedDataArrayRequester(tr, "/internal/references/resource-type", !0);
1980
2015
  }
1981
2016
  /**
1982
2017
  * Возвращает {@link Promise} для получения справочника данных направлений продаж.
@@ -1988,7 +2023,7 @@ class A extends h {
1988
2023
  * Возвращает {@link Promise} для получения справочника данных об источнике первичного интереса.
1989
2024
  */
1990
2025
  getSourcePrimaryInterest() {
1991
- return this.getTypedDataArrayRequester(ir, "/internal/references/source-primary-interest", !0);
2026
+ return this.getTypedDataArrayRequester(sr, "/internal/references/source-primary-interest", !0);
1992
2027
  }
1993
2028
  /**
1994
2029
  * Выполняет поиск данных о городах по терму в названии.
@@ -2024,29 +2059,29 @@ class A extends h {
2024
2059
  * Возвращает {@link Promise} для получения справочника складов.
2025
2060
  */
2026
2061
  getWarehouses() {
2027
- return this.getTypedDataArrayRequester(ye, "/public/references/warehouse", !0);
2062
+ return this.getTypedDataArrayRequester(we, "/public/references/warehouse", !0);
2028
2063
  }
2029
2064
  /**
2030
2065
  * Возвращает {@link Promise} для получения справочника типов свойств.
2031
2066
  */
2032
2067
  getPropertyTypes() {
2033
- return this.getTypedDataArrayRequester(rr, "/internal/references/property-type", !0);
2068
+ return this.getTypedDataArrayRequester(er, "/internal/references/property-type", !0);
2034
2069
  }
2035
2070
  /**
2036
2071
  * Возвращает {@link Promise} для получения справочника коэффициентов цен.
2037
2072
  */
2038
2073
  getPriceCoefficients() {
2039
- return this.getTypedDataArrayRequester(fe, "/internal/references/price-coefficient", !0);
2074
+ return this.getTypedDataArrayRequester(ye, "/internal/references/price-coefficient", !0);
2040
2075
  }
2041
2076
  /**
2042
2077
  * Возвращает {@link Promise} для получения справочника типов файлов продуктов/категорий.
2043
2078
  */
2044
2079
  getProductFileType() {
2045
- return this.getTypedDataArrayRequester(Xr, "/public/references/product-file-type", !0);
2080
+ return this.getTypedDataArrayRequester(Yr, "/public/references/product-file-type", !0);
2046
2081
  }
2047
2082
  }
2048
- var Zr = /* @__PURE__ */ ((n) => (n.Admin = "admin", n.Manager = "manager", n.Operator = "operator", n.Client = "client", n.Guest = "guest", n))(Zr || {});
2049
- class et extends er {
2083
+ var Xr = /* @__PURE__ */ ((n) => (n.Admin = "admin", n.Manager = "manager", n.Operator = "operator", n.Client = "client", n.Guest = "guest", n))(Xr || {});
2084
+ class Zr extends Ze {
2050
2085
  /**
2051
2086
  * Инициализирует экземпляр класса {@link User}.
2052
2087
  *
@@ -2069,16 +2104,16 @@ class et extends er {
2069
2104
  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;
2070
2105
  }
2071
2106
  }
2072
- class rt extends h {
2107
+ class et extends h {
2073
2108
  /**
2074
2109
  * Возвращает данные о текущем пользователе.
2075
2110
  */
2076
2111
  // eslint-disable-next-line class-methods-use-this
2077
2112
  getCurrentUser() {
2078
- return this.get("/internal/users/info", {}, (r) => new et(r.data));
2113
+ return this.get("/internal/users/info", {}, (r) => new Zr(r.data));
2079
2114
  }
2080
2115
  }
2081
- class tt {
2116
+ class rt {
2082
2117
  /**
2083
2118
  * Инициализирует экземпляр класса {@link ProductPriceHistory}.
2084
2119
  *
@@ -2121,10 +2156,10 @@ class tt {
2121
2156
  * Данные о валюте.
2122
2157
  */
2123
2158
  t(this, "currency");
2124
- this.cost = r.cost, this.costDate = m(r.costDate) ? f(r.costDate) : r.costDate, this.isLowCost = r.isLowCost, this.isRetail = r.isRetail, this.discountName = r.discountName, this.priceTemplateName = r.priceTemplateName, this.client = r.client ? new G(r.client) : void 0, this.executor = r.executor ? new G(r.executor) : void 0, this.currency = r.currency ? new pe(r.currency) : void 0;
2159
+ this.cost = r.cost, this.costDate = f(r.costDate) ? y(r.costDate) : r.costDate, this.isLowCost = r.isLowCost, this.isRetail = r.isRetail, this.discountName = r.discountName, this.priceTemplateName = r.priceTemplateName, this.client = r.client ? new G(r.client) : void 0, this.executor = r.executor ? new G(r.executor) : void 0, this.currency = r.currency ? new he(r.currency) : void 0;
2125
2160
  }
2126
2161
  }
2127
- class Ue {
2162
+ class qe {
2128
2163
  /**
2129
2164
  * Инициализирует экземпляр класса {@link RecommendationsList}.
2130
2165
  *
@@ -2139,10 +2174,10 @@ class Ue {
2139
2174
  * Список рекомендованных категорий продуктов.
2140
2175
  */
2141
2176
  t(this, "productCategories", []);
2142
- r != null && r.products && (this.products = r.products.map((e) => new a(e))), r != null && r.productCategories && (this.productCategories = r.productCategories.map((e) => new q(e)));
2177
+ r != null && r.products && (this.products = r.products.map((e) => new b(e))), r != null && r.productCategories && (this.productCategories = r.productCategories.map((e) => new q(e)));
2143
2178
  }
2144
2179
  }
2145
- class ee extends $ {
2180
+ class ee extends a {
2146
2181
  /**
2147
2182
  * Инициализирует экземпляр класса {@link PricingRole}.
2148
2183
  *
@@ -2177,7 +2212,7 @@ class ee extends $ {
2177
2212
  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;
2178
2213
  }
2179
2214
  }
2180
- class Ge {
2215
+ class Ue {
2181
2216
  /**
2182
2217
  * Инициализирует экземпляр класса {@link PricingRoleCategoryRule}.
2183
2218
  *
@@ -2196,10 +2231,10 @@ class Ge {
2196
2231
  * Минимальный коэффициент цены.
2197
2232
  */
2198
2233
  t(this, "minCoefficient");
2199
- this.role = new ee(r == null ? void 0 : r.role), this.category = new ie(r == null ? void 0 : r.category), this.minCoefficient = new fe(r == null ? void 0 : r.minCoefficient);
2234
+ this.role = new ee(r == null ? void 0 : r.role), this.category = new ne(r == null ? void 0 : r.category), this.minCoefficient = new ye(r == null ? void 0 : r.minCoefficient);
2200
2235
  }
2201
2236
  }
2202
- class St extends h {
2237
+ class _t extends h {
2203
2238
  /**
2204
2239
  * Возвращает данные о результатах поиска категорий и товаров.
2205
2240
  *
@@ -2226,11 +2261,11 @@ class St extends h {
2226
2261
  */
2227
2262
  // eslint-disable-next-line class-methods-use-this
2228
2263
  getPriceExportLink(r = "csv", e = !1, s = void 0, i = void 0) {
2229
- let c = `${b.getConfig().http.apiUri}/api/internal/price/export?format=${r}&show_hidden=${e}`;
2264
+ let c = `${$.getConfig().http.portalApiUrl}/api/internal/price/export?format=${r}&show_hidden=${e}`;
2230
2265
  return s && (c += `&category_id=${s}`), i && (c += `&client_id=${i}`), c;
2231
2266
  }
2232
2267
  }
2233
- class Lt extends h {
2268
+ class St extends h {
2234
2269
  /**
2235
2270
  * Импортирует цены клиента из CSV файла.
2236
2271
  *
@@ -2429,7 +2464,7 @@ class Lt extends h {
2429
2464
  return this.post(`/internal/clients/${r}/price/commercial-offer/send`, e);
2430
2465
  }
2431
2466
  }
2432
- class It extends h {
2467
+ class Lt extends h {
2433
2468
  /**
2434
2469
  * Возвращает список шаблонов прайс-листа привязанных к клиенту.
2435
2470
  *
@@ -2464,12 +2499,12 @@ class It extends h {
2464
2499
  * @see /doc/api/internal#/operations/api_internal_client_price_template_attach
2465
2500
  */
2466
2501
  attachTemplate(r, e, s) {
2467
- const i = b.getConfig().dateFormats.api;
2502
+ const i = $.getConfig().dateFormats.api;
2468
2503
  return this.post(
2469
2504
  `/internal/clients/${r}/price/templates/${e}`,
2470
2505
  s && {
2471
- startAt: s.startAt && B(s.startAt, i),
2472
- endAt: s.endAt && B(s.endAt, i)
2506
+ startAt: s.startAt && z(s.startAt, i),
2507
+ endAt: s.endAt && z(s.endAt, i)
2473
2508
  },
2474
2509
  (o) => new X(o.data),
2475
2510
  {},
@@ -2498,12 +2533,12 @@ class It extends h {
2498
2533
  * @see /doc/api/internal#/operations/api_internal_client_price_template_change
2499
2534
  */
2500
2535
  changeTemplate(r, e, s, i) {
2501
- const o = b.getConfig().dateFormats.api;
2536
+ const o = $.getConfig().dateFormats.api;
2502
2537
  return this.patch(
2503
2538
  `/internal/clients/${r}/price/templates/${e}/${s}`,
2504
2539
  i && {
2505
- startAt: i.startAt && B(i.startAt, o),
2506
- endAt: i.endAt && B(i.endAt, o)
2540
+ startAt: i.startAt && z(i.startAt, o),
2541
+ endAt: i.endAt && z(i.endAt, o)
2507
2542
  },
2508
2543
  (c) => new X(c.data)
2509
2544
  );
@@ -2521,7 +2556,7 @@ class It extends h {
2521
2556
  return this.delete(`/internal/clients/${r}/price/templates/${e}/${s}`);
2522
2557
  }
2523
2558
  }
2524
- class xt extends h {
2559
+ class It extends h {
2525
2560
  /**
2526
2561
  * Возвращает список данных о корневых категориях.
2527
2562
  *
@@ -2581,7 +2616,7 @@ class xt extends h {
2581
2616
  showHidden: s,
2582
2617
  withPriceCoefficients: e
2583
2618
  },
2584
- (i) => ce(i.data, (o) => new a(o))
2619
+ (i) => le(i.data, (o) => new b(o))
2585
2620
  );
2586
2621
  }
2587
2622
  /**
@@ -2594,7 +2629,7 @@ class xt extends h {
2594
2629
  getCategoryProductsCoefficients(r) {
2595
2630
  return this.get(`/internal/catalog/categories/${r}/products/coefficients`, {}, (e) => {
2596
2631
  const { data: s } = e;
2597
- return Cr(s, (i) => i.map((o) => new xe(o))), s;
2632
+ return wr(s, (i) => i.map((o) => new Ie(o))), s;
2598
2633
  });
2599
2634
  }
2600
2635
  /**
@@ -2613,7 +2648,7 @@ class xt extends h {
2613
2648
  });
2614
2649
  }
2615
2650
  }
2616
- class kt extends h {
2651
+ class xt extends h {
2617
2652
  /**
2618
2653
  * Возвращает данные об указанном продукте.
2619
2654
  *
@@ -2623,7 +2658,7 @@ class kt extends h {
2623
2658
  * @see /doc/api/internal#/Каталог/api_internal_catalog_products_get
2624
2659
  */
2625
2660
  getProductData(r, e = !1) {
2626
- return this.get(`/internal/catalog/products/${r}`, { withPriceCoefficients: e }, (s) => new a(s.data));
2661
+ return this.get(`/internal/catalog/products/${r}`, { withPriceCoefficients: e }, (s) => new b(s.data));
2627
2662
  }
2628
2663
  /**
2629
2664
  * Возвращает публичные данные об указанном продукте.
@@ -2631,7 +2666,7 @@ class kt extends h {
2631
2666
  * @param productId Идентификатор продукта.
2632
2667
  */
2633
2668
  getPublicProductData(r) {
2634
- return this.get(`/public/catalog/products/${r}`, {}, (e) => new a(e.data));
2669
+ return this.get(`/public/catalog/products/${r}`, {}, (e) => new b(e.data));
2635
2670
  }
2636
2671
  /**
2637
2672
  * Возвращает данные о коэффициентах цен для указанного продукта.
@@ -2644,7 +2679,7 @@ class kt extends h {
2644
2679
  return this.get(
2645
2680
  `/internal/catalog/products/${r}/coefficients`,
2646
2681
  {},
2647
- (e) => ce(e.data, (s) => new xe(s))
2682
+ (e) => le(e.data, (s) => new Ie(s))
2648
2683
  );
2649
2684
  }
2650
2685
  /**
@@ -2657,7 +2692,7 @@ class kt extends h {
2657
2692
  */
2658
2693
  getProductPriceHistory(r, e) {
2659
2694
  const s = {};
2660
- return U(e) || (s.clientId = e), this.get(`/internal/price/products/${r}/history`, s, (i) => ce(i.data, (o) => new tt(o)));
2695
+ return U(e) || (s.clientId = e), this.get(`/internal/price/products/${r}/history`, s, (i) => le(i.data, (o) => new rt(o)));
2661
2696
  }
2662
2697
  /**
2663
2698
  * Выполняет публичный поиск данных о продуктах по терму.
@@ -2668,14 +2703,14 @@ class kt extends h {
2668
2703
  publicSimpleSearch(r, e = 10) {
2669
2704
  return new Promise((s, i) => {
2670
2705
  this.get(`/public/catalog/search/simple?limit=${e}&term=${r}`).then((o) => {
2671
- s(o.products.map((c) => new a(c)));
2706
+ s(o.products.map((c) => new b(c)));
2672
2707
  }).catch((o) => {
2673
2708
  i(o);
2674
2709
  });
2675
2710
  });
2676
2711
  }
2677
2712
  }
2678
- class Nt extends h {
2713
+ class kt extends h {
2679
2714
  /**
2680
2715
  * Возвращает список данных о корневых категориях указанного клиента.
2681
2716
  *
@@ -2691,7 +2726,7 @@ class Nt extends h {
2691
2726
  clientId: r,
2692
2727
  showHidden: e
2693
2728
  },
2694
- (s) => s.data.map((i) => new ue(i))
2729
+ (s) => s.data.map((i) => new pe(i))
2695
2730
  );
2696
2731
  }
2697
2732
  /**
@@ -2712,7 +2747,7 @@ class Nt extends h {
2712
2747
  showHidden: s,
2713
2748
  withNestedCategories: i
2714
2749
  },
2715
- (o) => new ue(o.data)
2750
+ (o) => new pe(o.data)
2716
2751
  );
2717
2752
  }
2718
2753
  /**
@@ -2733,7 +2768,7 @@ class Nt extends h {
2733
2768
  showHidden: i,
2734
2769
  withPriceCoefficients: s
2735
2770
  },
2736
- (o) => ce(o.data, (c) => new K(c))
2771
+ (o) => le(o.data, (c) => new K(c))
2737
2772
  );
2738
2773
  }
2739
2774
  }
@@ -2758,8 +2793,8 @@ class dt extends h {
2758
2793
  );
2759
2794
  }
2760
2795
  }
2761
- var Oe = /* @__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))(Oe || {});
2762
- class Me {
2796
+ var Ne = /* @__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))(Ne || {});
2797
+ class Ge {
2763
2798
  /**
2764
2799
  * Инициализирует экземпляр класса {@link FilterItem}.
2765
2800
  *
@@ -2778,7 +2813,7 @@ class Me {
2778
2813
  * Значение с которым сравнивается поле.
2779
2814
  */
2780
2815
  t(this, "value");
2781
- this.field = (r == null ? void 0 : r.field) ?? "", this.op = (r == null ? void 0 : r.op) ?? Oe.Equals, this.value = (r == null ? void 0 : r.value) ?? "";
2816
+ this.field = (r == null ? void 0 : r.field) ?? "", this.op = (r == null ? void 0 : r.op) ?? Ne.Equals, this.value = (r == null ? void 0 : r.value) ?? "";
2782
2817
  }
2783
2818
  /**
2784
2819
  * Преобразует фильтр в примитивное представление для API.
@@ -2790,10 +2825,10 @@ class Me {
2790
2825
  field: this.field,
2791
2826
  op: this.op
2792
2827
  };
2793
- return r.value = vr(this.value) ? B(this.value, b.getConfig().dateFormats.api) : this.value, r;
2828
+ return r.value = Cr(this.value) ? z(this.value, $.getConfig().dateFormats.api) : this.value, r;
2794
2829
  }
2795
2830
  }
2796
- class se {
2831
+ class ie {
2797
2832
  /**
2798
2833
  * Инициализирует экземпляр класса {@link FilterGroup}.
2799
2834
  *
@@ -2813,7 +2848,7 @@ class se {
2813
2848
  */
2814
2849
  t(this, "groups");
2815
2850
  var e, s;
2816
- 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 Me(i))) ?? [], this.groups = ((s = r == null ? void 0 : r.groups) == null ? void 0 : s.map((i) => new se(i))) ?? [];
2851
+ 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 Ge(i))) ?? [], this.groups = ((s = r == null ? void 0 : r.groups) == null ? void 0 : s.map((i) => new ie(i))) ?? [];
2817
2852
  }
2818
2853
  /**
2819
2854
  * Преобразует группу фильтров в примитивное представление для API.
@@ -2823,12 +2858,12 @@ class se {
2823
2858
  toPrimitive() {
2824
2859
  return {
2825
2860
  groupOp: this.groupOp,
2826
- filters: this.filters.map((r) => r instanceof Me && Le(r.toPrimitive) ? r.toPrimitive() : r),
2827
- groups: this.groups.map((r) => r instanceof se ? r.toPrimitive() : r)
2861
+ filters: this.filters.map((r) => r instanceof Ge && _e(r.toPrimitive) ? r.toPrimitive() : r),
2862
+ groups: this.groups.map((r) => r instanceof ie ? r.toPrimitive() : r)
2828
2863
  };
2829
2864
  }
2830
2865
  }
2831
- class Ce extends h {
2866
+ class ve extends h {
2832
2867
  /**
2833
2868
  * Получает пагинированный список данных.
2834
2869
  *
@@ -2845,10 +2880,10 @@ class Ce extends h {
2845
2880
  page: (i == null ? void 0 : i.page) ?? 1,
2846
2881
  perPage: (i == null ? void 0 : i.pageSize) ?? 10
2847
2882
  };
2848
- return e && (p.filters = JSON.stringify((e instanceof se ? e : new se(e)).toPrimitive())), Se(s) || (p.sort = Ee(s) ? s : [s]), o && (p = { ...p, ...o }), this.get(r, p, c, u);
2883
+ return e && (p.filters = JSON.stringify((e instanceof ie ? e : new ie(e)).toPrimitive())), Se(s) || (p.sort = Ee(s) ? s : [s]), o && (p = { ...p, ...o }), this.get(r, p, c, u);
2849
2884
  }
2850
2885
  }
2851
- class Ot extends Ce {
2886
+ class Nt extends ve {
2852
2887
  /**
2853
2888
  * Возвращает список шаблонов прайс-листа.
2854
2889
  *
@@ -2920,7 +2955,7 @@ class Ot extends Ce {
2920
2955
  return this.get(
2921
2956
  `/internal/price/templates/${r}/products`,
2922
2957
  {},
2923
- (e) => e.data.map((s) => new Pe(s))
2958
+ (e) => e.data.map((s) => new Re(s))
2924
2959
  );
2925
2960
  }
2926
2961
  /**
@@ -2932,7 +2967,7 @@ class Ot extends Ce {
2932
2967
  * @see /doc/api/internal#/operations/api_internal_catalog_price_template_product_get
2933
2968
  */
2934
2969
  getProductTemplatePrice(r, e) {
2935
- return this.get(`/internal/price/templates/${r}/products/${e}`, {}, (s) => new Pe(s.data));
2970
+ return this.get(`/internal/price/templates/${r}/products/${e}`, {}, (s) => new Re(s.data));
2936
2971
  }
2937
2972
  /**
2938
2973
  * Сохраняет цену на продукт в шаблоне прайс-листа.
@@ -2951,7 +2986,7 @@ class Ot extends Ce {
2951
2986
  price_coefficient_id: (i = s.coefficient) == null ? void 0 : i.id,
2952
2987
  increase_percent: s.value
2953
2988
  },
2954
- (o) => new Pe(o.data)
2989
+ (o) => new Re(o.data)
2955
2990
  );
2956
2991
  }
2957
2992
  /**
@@ -2976,7 +3011,7 @@ class Ot extends Ce {
2976
3011
  return this.get(
2977
3012
  `/internal/price/templates/${r}/categories`,
2978
3013
  {},
2979
- (e) => e.data.map((s) => new ve(s))
3014
+ (e) => e.data.map((s) => new Pe(s))
2980
3015
  );
2981
3016
  }
2982
3017
  /**
@@ -2991,7 +3026,7 @@ class Ot extends Ce {
2991
3026
  return this.get(
2992
3027
  `/internal/price/templates/${r}/categories/${e}`,
2993
3028
  {},
2994
- (s) => new ve(s.data)
3029
+ (s) => new Pe(s.data)
2995
3030
  );
2996
3031
  }
2997
3032
  /**
@@ -3017,7 +3052,7 @@ class Ot extends Ce {
3017
3052
  },
3018
3053
  params: i ? { recursively: !0 } : {}
3019
3054
  },
3020
- (c) => new ve(c.data)
3055
+ (c) => new Pe(c.data)
3021
3056
  );
3022
3057
  }
3023
3058
  /**
@@ -3052,7 +3087,7 @@ class Ot extends Ce {
3052
3087
  );
3053
3088
  }
3054
3089
  }
3055
- class qt extends h {
3090
+ class Ot extends h {
3056
3091
  /**
3057
3092
  * Возвращает список ролей ценообразования.
3058
3093
  *
@@ -3113,7 +3148,7 @@ class qt extends h {
3113
3148
  return this.get(
3114
3149
  `/internal/price/roles/rules/categories/${r}`,
3115
3150
  {},
3116
- (e) => e.data.map((s) => new Ge(s))
3151
+ (e) => e.data.map((s) => new Ue(s))
3117
3152
  );
3118
3153
  }
3119
3154
  /**
@@ -3128,11 +3163,11 @@ class qt extends h {
3128
3163
  return this.patch(
3129
3164
  `/internal/price/roles/rules/categories/${r}`,
3130
3165
  e,
3131
- (s) => s.data.map((i) => new Ge(i))
3166
+ (s) => s.data.map((i) => new Ue(i))
3132
3167
  );
3133
3168
  }
3134
3169
  }
3135
- class Ut extends Ce {
3170
+ class qt extends ve {
3136
3171
  /**
3137
3172
  * Возвращает пагинированный список свойств.
3138
3173
  *
@@ -3208,7 +3243,7 @@ class Ut extends Ce {
3208
3243
  * @see /doc/api/internal#/operations/api_internal_catalog_product_properties_get_list
3209
3244
  */
3210
3245
  getProductProperties(r) {
3211
- return this.get(`/internal/catalog/products/${r}/properties`, {}, (e) => e.data.map((s) => new z(s)));
3246
+ return this.get(`/internal/catalog/products/${r}/properties`, {}, (e) => e.data.map((s) => new H(s)));
3212
3247
  }
3213
3248
  /**
3214
3249
  * Возвращает значение свойства продукта.
@@ -3218,7 +3253,7 @@ class Ut extends Ce {
3218
3253
  * @see /doc/api/internal#/operations/api_internal_catalog_product_properties_get
3219
3254
  */
3220
3255
  getProductProperty(r, e) {
3221
- return this.get(`/internal/catalog/products/${r}/properties/${e}`, {}, (s) => new z(s.data));
3256
+ return this.get(`/internal/catalog/products/${r}/properties/${e}`, {}, (s) => new H(s.data));
3222
3257
  }
3223
3258
  /**
3224
3259
  * Обновляет значение свойства продукта.
@@ -3229,7 +3264,7 @@ class Ut extends Ce {
3229
3264
  * @see /doc/api/internal#/operations/api_internal_catalog_product_properties_update
3230
3265
  */
3231
3266
  updateProductProperty(r, e, s) {
3232
- return this.patch(`/internal/catalog/products/${r}/properties/${e}`, { value: s }, (i) => new z(i.data));
3267
+ return this.patch(`/internal/catalog/products/${r}/properties/${e}`, { value: s }, (i) => new H(i.data));
3233
3268
  }
3234
3269
  /**
3235
3270
  * Удаляет значение свойства продукта.
@@ -3354,7 +3389,7 @@ class Ut extends Ce {
3354
3389
  * @see /doc/api/internal#/operations/api_internal_catalog_category_properties_get_list
3355
3390
  */
3356
3391
  getCategoryProperties(r) {
3357
- return this.get(`/internal/catalog/categories/${r}/properties`, {}, (e) => e.data.map((s) => new z(s)));
3392
+ return this.get(`/internal/catalog/categories/${r}/properties`, {}, (e) => e.data.map((s) => new H(s)));
3358
3393
  }
3359
3394
  /**
3360
3395
  * Возвращает значение свойства категории.
@@ -3364,7 +3399,7 @@ class Ut extends Ce {
3364
3399
  * @see /doc/api/internal#/operations/api_internal_catalog_category_properties_get
3365
3400
  */
3366
3401
  getCategoryProperty(r, e) {
3367
- return this.get(`/internal/catalog/categories/${r}/properties/${e}`, {}, (s) => new z(s.data));
3402
+ return this.get(`/internal/catalog/categories/${r}/properties/${e}`, {}, (s) => new H(s.data));
3368
3403
  }
3369
3404
  /**
3370
3405
  * Обновляет значение свойства категории.
@@ -3375,7 +3410,7 @@ class Ut extends Ce {
3375
3410
  * @see /doc/api/internal#/operations/api_internal_catalog_category_properties_update
3376
3411
  */
3377
3412
  updateCategoryProperty(r, e, s) {
3378
- return this.patch(`/internal/catalog/categories/${r}/properties/${e}`, { value: s }, (i) => new z(i.data));
3413
+ return this.patch(`/internal/catalog/categories/${r}/properties/${e}`, { value: s }, (i) => new H(i.data));
3379
3414
  }
3380
3415
  /**
3381
3416
  * Удаляет значение свойства категории.
@@ -3504,14 +3539,14 @@ class Ut extends Ce {
3504
3539
  return this.post(`/internal/catalog/categories/${r}/image`, { image: e });
3505
3540
  }
3506
3541
  }
3507
- class Gt extends h {
3542
+ class Ut extends h {
3508
3543
  /**
3509
3544
  * Возвращает данные о рекомендациях указанной категории продуктов.
3510
3545
  *
3511
3546
  * @param productCategory Данные о категории продуктов, для которой необходимо получить рекомендации.
3512
3547
  */
3513
3548
  getProductCategoryRecommendations(r) {
3514
- return this.get(`/internal/catalog/recommendations/categories/${r.id}`, {}, (e) => new Ue(e.data));
3549
+ return this.get(`/internal/catalog/recommendations/categories/${r.id}`, {}, (e) => new qe(e.data));
3515
3550
  }
3516
3551
  /**
3517
3552
  * Возвращает данные о рекомендациях указанного продукта.
@@ -3519,7 +3554,7 @@ class Gt extends h {
3519
3554
  * @param product Данные о продукте, для которого необходимо получить рекомендации.
3520
3555
  */
3521
3556
  getProductRecommendations(r) {
3522
- return this.get(`/internal/catalog/recommendations/products/${r.id}`, {}, (e) => new Ue(e.data));
3557
+ return this.get(`/internal/catalog/recommendations/products/${r.id}`, {}, (e) => new qe(e.data));
3523
3558
  }
3524
3559
  /**
3525
3560
  * Выполняет сохранение данных о рекомендуемых категориях продуктов.
@@ -3546,7 +3581,7 @@ class Gt extends h {
3546
3581
  });
3547
3582
  }
3548
3583
  }
3549
- function Fe(n, r, e) {
3584
+ function Me(n, r, e) {
3550
3585
  let s;
3551
3586
  return n.some((i) => {
3552
3587
  if (i.type === e && i.id === r)
@@ -3555,20 +3590,20 @@ function Fe(n, r, e) {
3555
3590
  return !1;
3556
3591
  const o = i;
3557
3592
  if (o.products && o.products.length > 0) {
3558
- const c = Fe(o.products, r, e);
3593
+ const c = Me(o.products, r, e);
3559
3594
  if (c)
3560
3595
  return s = c, !0;
3561
3596
  }
3562
3597
  if (o.categories && o.categories.length > 0) {
3563
- const c = Fe(o.categories, r, e);
3598
+ const c = Me(o.categories, r, e);
3564
3599
  if (c)
3565
3600
  return s = c, !0;
3566
3601
  }
3567
3602
  return !1;
3568
3603
  }), s;
3569
3604
  }
3570
- var st = /* @__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))(st || {});
3571
- class ae extends H {
3605
+ var tt = /* @__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))(tt || {});
3606
+ class Te extends B {
3572
3607
  /**
3573
3608
  * Инициализирует экземпляр класса {@link BankAccount}.
3574
3609
  *
@@ -3595,11 +3630,11 @@ class ae extends H {
3595
3630
  /**
3596
3631
  * Данные о валюте.
3597
3632
  */
3598
- t(this, "currency", new pe());
3599
- e && (this.bankName = e.bankName ?? "", this.bic = e.bic ?? "", this.accountNumber = e.accountNumber ?? "", this.correspondentAccount = e.correspondentAccount ?? "", this.currency = new pe(e.currency));
3633
+ t(this, "currency", new he());
3634
+ e && (this.bankName = e.bankName ?? "", this.bic = e.bic ?? "", this.accountNumber = e.accountNumber ?? "", this.correspondentAccount = e.correspondentAccount ?? "", this.currency = new he(e.currency));
3600
3635
  }
3601
3636
  }
3602
- class _e extends $ {
3637
+ class be extends a {
3603
3638
  /**
3604
3639
  * Инициализирует экземпляр класса {@link Contact}.
3605
3640
  *
@@ -3618,7 +3653,7 @@ class _e extends $ {
3618
3653
  this.email = e == null ? void 0 : e.email, this.phone = /^\d+$/.test((e == null ? void 0 : e.phone) ?? "") ? `+${e == null ? void 0 : e.phone}` : e == null ? void 0 : e.phone;
3619
3654
  }
3620
3655
  }
3621
- class F extends _e {
3656
+ class F extends be {
3622
3657
  /**
3623
3658
  * Инициализирует экземпляр класса {@link ContactPerson}.
3624
3659
  *
@@ -3650,10 +3685,10 @@ class F extends _e {
3650
3685
  * Дата и время последнего удаления.
3651
3686
  */
3652
3687
  t(this, "deletedAt");
3653
- 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 = m(e == null ? void 0 : e.deletedAt) ? f(e.deletedAt) : e == null ? void 0 : e.deletedAt;
3688
+ 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 = f(e == null ? void 0 : e.deletedAt) ? y(e.deletedAt) : e == null ? void 0 : e.deletedAt;
3654
3689
  }
3655
3690
  }
3656
- class nr extends $ {
3691
+ class ir extends a {
3657
3692
  /**
3658
3693
  * Инициализирует экземпляр класса {@link ContragentBase}.
3659
3694
  *
@@ -3711,7 +3746,7 @@ class nr extends $ {
3711
3746
  */
3712
3747
  t(this, "updater");
3713
3748
  if (e) {
3714
- if (this.opf = new M(e.opf), this.salesDirection = new S(e.salesDirection), this.comment = e.comment, this.alternativeName = e.alternativeName, this.createdAt = m(e == null ? void 0 : e.createdAt) ? f(e.createdAt) : e.createdAt, this.creator = e.creator ? new G(e.creator) : void 0, this.updatedAt = m(e == null ? void 0 : e.updatedAt) ? f(e.updatedAt) : e.updatedAt, this.updater = e.updater ? new G(e.updater) : void 0, e.partnerGroup && (this.partnerGroup = new Y(e.partnerGroup)), e.manager && (this.manager = new re(e.manager)), e.contacts) {
3749
+ if (this.opf = new M(e.opf), this.salesDirection = new S(e.salesDirection), this.comment = e.comment, this.alternativeName = e.alternativeName, this.createdAt = f(e == null ? void 0 : e.createdAt) ? y(e.createdAt) : e.createdAt, this.creator = e.creator ? new G(e.creator) : void 0, this.updatedAt = f(e == null ? void 0 : e.updatedAt) ? y(e.updatedAt) : e.updatedAt, this.updater = e.updater ? new G(e.updater) : void 0, e.partnerGroup && (this.partnerGroup = new Y(e.partnerGroup)), e.manager && (this.manager = new re(e.manager)), e.contacts) {
3715
3750
  const s = [];
3716
3751
  e.contacts.forEach((i) => {
3717
3752
  s.push(new F(i));
@@ -3720,13 +3755,13 @@ class nr extends $ {
3720
3755
  if (e.bankAccounts) {
3721
3756
  const s = [];
3722
3757
  e.bankAccounts.forEach((i) => {
3723
- s.push(new ae(i));
3758
+ s.push(new Te(i));
3724
3759
  }), this.bankAccounts = s;
3725
3760
  }
3726
3761
  }
3727
3762
  }
3728
3763
  }
3729
- class it extends nr {
3764
+ class st extends ir {
3730
3765
  /**
3731
3766
  * Инициализирует экземпляр класса {@link ContragentPerson}.
3732
3767
  *
@@ -3736,7 +3771,7 @@ class it extends nr {
3736
3771
  super(r);
3737
3772
  }
3738
3773
  }
3739
- class or extends nr {
3774
+ class nr extends ir {
3740
3775
  /**
3741
3776
  * Инициализирует экземпляр класса {@link ContragentIc}.
3742
3777
  *
@@ -3779,7 +3814,7 @@ class or extends nr {
3779
3814
  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 ?? "");
3780
3815
  }
3781
3816
  }
3782
- class cr extends or {
3817
+ class or extends nr {
3783
3818
  /**
3784
3819
  * Инициализирует экземпляр класса {@link ContragentUlR}.
3785
3820
  *
@@ -3794,7 +3829,7 @@ class cr extends or {
3794
3829
  e && (this.kpp = e.kpp ?? "");
3795
3830
  }
3796
3831
  }
3797
- class nt extends cr {
3832
+ class it extends or {
3798
3833
  /**
3799
3834
  * Инициализирует экземпляр класса {@link ContragentUlNr}.
3800
3835
  *
@@ -3817,7 +3852,7 @@ class nt extends cr {
3817
3852
  e && (this.registrationCountry = new Q(e.registrationCountry), this.registrationNumber = e.registrationNumber ?? "", this.taxNumber = e.taxNumber ?? "");
3818
3853
  }
3819
3854
  }
3820
- class he {
3855
+ class ge {
3821
3856
  /**
3822
3857
  * Инициализирует и возвращает экземпляр класса с данными о контрагенте.
3823
3858
  *
@@ -3826,17 +3861,17 @@ class he {
3826
3861
  static createInstance(r) {
3827
3862
  switch (r.opf.slug) {
3828
3863
  case T.Ic:
3829
- return new or(r);
3864
+ return new nr(r);
3830
3865
  case T.UlR:
3831
- return new cr(r);
3866
+ return new or(r);
3832
3867
  case T.UlNr:
3833
- return new nt(r);
3834
- default:
3835
3868
  return new it(r);
3869
+ default:
3870
+ return new st(r);
3836
3871
  }
3837
3872
  }
3838
3873
  }
3839
- class Re extends H {
3874
+ class Ae extends B {
3840
3875
  /**
3841
3876
  * Инициализирует экземпляр класса {@link ContactRelation}.
3842
3877
  *
@@ -3851,7 +3886,7 @@ class Re extends H {
3851
3886
  this.isPrimary = e.isPrimary;
3852
3887
  }
3853
3888
  }
3854
- class ot extends F {
3889
+ class nt extends F {
3855
3890
  /**
3856
3891
  * Инициализирует экземпляр класса {@link ContactPersonRelated}.
3857
3892
  *
@@ -3876,10 +3911,10 @@ class ot extends F {
3876
3911
  */
3877
3912
  addresses: []
3878
3913
  });
3879
- e.relations && (e.relations.addresses && (this.relations.addresses = e.relations.addresses.map((s) => new Re(s))), e.relations.clients && (this.relations.clients = e.relations.clients.map((s) => new Re(s))), e.relations.contragents && (this.relations.contragents = e.relations.contragents.map((s) => new Re(s))));
3914
+ e.relations && (e.relations.addresses && (this.relations.addresses = e.relations.addresses.map((s) => new Ae(s))), e.relations.clients && (this.relations.clients = e.relations.clients.map((s) => new Ae(s))), e.relations.contragents && (this.relations.contragents = e.relations.contragents.map((s) => new Ae(s))));
3880
3915
  }
3881
3916
  }
3882
- class ge extends Br {
3917
+ class me extends Hr {
3883
3918
  /**
3884
3919
  * Инициализирует экземпляр класса {@link DeliveryAddress}.
3885
3920
  *
@@ -3916,10 +3951,10 @@ class ge extends Br {
3916
3951
  * Признак того, что указанный адрес является адресом транспортной компании.
3917
3952
  */
3918
3953
  t(this, "isTransportCompanyAddress");
3919
- this.address = (e == null ? void 0 : e.address) ?? "", this.coordinates = new Ye(e == null ? void 0 : e.coordinates), this.contacts = ((s = e == null ? void 0 : e.contacts) == null ? void 0 : s.map((i) => new F(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;
3954
+ this.address = (e == null ? void 0 : e.address) ?? "", this.coordinates = new Qe(e == null ? void 0 : e.coordinates), this.contacts = ((s = e == null ? void 0 : e.contacts) == null ? void 0 : s.map((i) => new F(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;
3920
3955
  }
3921
3956
  }
3922
- class He extends ne {
3957
+ class Fe extends oe {
3923
3958
  /**
3924
3959
  * Инициализирует экземпляр класса {@link Client}.
3925
3960
  *
@@ -3973,10 +4008,10 @@ class He extends ne {
3973
4008
  * Дополнительные данные о клиенте.
3974
4009
  */
3975
4010
  t(this, "extraData");
3976
- this.contragents = ((s = e == null ? void 0 : e.contragents) == null ? void 0 : s.map((u) => he.createInstance(u))) ?? [], this.partnerGroups = ((i = e == null ? void 0 : e.partnerGroups) == null ? void 0 : i.map((u) => new Y(u))) ?? [], this.contacts = ((o = e == null ? void 0 : e.contacts) == null ? void 0 : o.map((u) => new F(u))) ?? [], this.deliveryAddresses = ((c = e == null ? void 0 : e.deliveryAddresses) == null ? void 0 : c.map((u) => new ge(u))) ?? [], this.channelPrimaryInterest = new tr(e == null ? void 0 : e.channelPrimaryInterest), this.sourcePrimaryInterest = new ir(e == null ? void 0 : e.sourcePrimaryInterest), this.preferredDeliveryType = new J(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 ye(e.preferredWarehouse) : void 0, this.extraData = (e == null ? void 0 : e.extraData) ?? {};
4011
+ this.contragents = ((s = e == null ? void 0 : e.contragents) == null ? void 0 : s.map((u) => ge.createInstance(u))) ?? [], this.partnerGroups = ((i = e == null ? void 0 : e.partnerGroups) == null ? void 0 : i.map((u) => new Y(u))) ?? [], this.contacts = ((o = e == null ? void 0 : e.contacts) == null ? void 0 : o.map((u) => new F(u))) ?? [], this.deliveryAddresses = ((c = e == null ? void 0 : e.deliveryAddresses) == null ? void 0 : c.map((u) => new me(u))) ?? [], this.channelPrimaryInterest = new rr(e == null ? void 0 : e.channelPrimaryInterest), this.sourcePrimaryInterest = new sr(e == null ? void 0 : e.sourcePrimaryInterest), this.preferredDeliveryType = new J(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 we(e.preferredWarehouse) : void 0, this.extraData = (e == null ? void 0 : e.extraData) ?? {};
3977
4012
  }
3978
4013
  }
3979
- class Mt {
4014
+ class Gt {
3980
4015
  /**
3981
4016
  * Инициализирует экземпляр класса {@link ClientsListFilters}.
3982
4017
  *
@@ -4026,11 +4061,11 @@ class Mt {
4026
4061
  /**
4027
4062
  * Период регистрации.
4028
4063
  */
4029
- t(this, "createdAt", new d());
4064
+ t(this, "createdAt", new N());
4030
4065
  /**
4031
4066
  * Период последнего входа.
4032
4067
  */
4033
- t(this, "lastLoginDate", new d());
4068
+ t(this, "lastLoginDate", new N());
4034
4069
  /**
4035
4070
  * Признак того, что в указанный период последнего входа, клиентом был сделан заказ.
4036
4071
  */
@@ -4068,8 +4103,8 @@ class Mt {
4068
4103
  */
4069
4104
  t(this, "lastOrder");
4070
4105
  var e, s, i, o, c, u;
4071
- 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 de(p)), this.region = new te(r == null ? void 0 : r.region), this.country = new Q(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 d(r == null ? void 0 : r.createdAt), this.lastLoginDate = new d(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 we(p)) : [], this.salesDirections = (s = r == null ? void 0 : r.salesDirections) == null ? void 0 : s.map((p) => new S(p)), this.contragentInn = r == null ? void 0 : r.contragentInn, this.contragentType = new M(r == null ? void 0 : r.contragentType), this.preferredDeliveryType = new J(r == null ? void 0 : r.preferredDeliveryType), this.partnerGroups = (i = r == null ? void 0 : r.partnerGroups) == null ? void 0 : i.map((p) => new Y(p)), this.contact = new _e(r == null ? void 0 : r.contact), this.lastOrder = {
4072
- createdAt: new d((o = r == null ? void 0 : r.lastOrder) == null ? void 0 : o.createdAt),
4106
+ 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 de(p)), this.region = new te(r == null ? void 0 : r.region), this.country = new Q(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 N(r == null ? void 0 : r.createdAt), this.lastLoginDate = new N(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 Ce(p)) : [], this.salesDirections = (s = r == null ? void 0 : r.salesDirections) == null ? void 0 : s.map((p) => new S(p)), this.contragentInn = r == null ? void 0 : r.contragentInn, this.contragentType = new M(r == null ? void 0 : r.contragentType), this.preferredDeliveryType = new J(r == null ? void 0 : r.preferredDeliveryType), this.partnerGroups = (i = r == null ? void 0 : r.partnerGroups) == null ? void 0 : i.map((p) => new Y(p)), this.contact = new be(r == null ? void 0 : r.contact), this.lastOrder = {
4107
+ createdAt: new N((o = r == null ? void 0 : r.lastOrder) == null ? void 0 : o.createdAt),
4073
4108
  creator: (c = r == null ? void 0 : r.lastOrder) == null ? void 0 : c.creator,
4074
4109
  isApproved: (u = r == null ? void 0 : r.lastOrder) == null ? void 0 : u.isApproved
4075
4110
  };
@@ -4127,7 +4162,7 @@ class Mt {
4127
4162
  this.partnerGroups = [];
4128
4163
  break;
4129
4164
  case "contact":
4130
- this.contact = new _e();
4165
+ this.contact = new be();
4131
4166
  break;
4132
4167
  }
4133
4168
  return this;
@@ -4142,11 +4177,11 @@ class Mt {
4142
4177
  return Object.keys(this).forEach((c) => {
4143
4178
  const u = this[c];
4144
4179
  // eslint-disable-next-line prettier/prettier
4145
- U(u) || m(u) && u.trim().length === 0 || Le(u.isNewRec) && u.isNewRec() || (r[c] = u);
4180
+ U(u) || f(u) && u.trim().length === 0 || _e(u.isNewRec) && u.isNewRec() || (r[c] = u);
4146
4181
  }), !((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;
4147
4182
  }
4148
4183
  }
4149
- class lr extends H {
4184
+ class cr extends B {
4150
4185
  /**
4151
4186
  * Инициализирует экземпляр класса {@link OrderShortInfo}.
4152
4187
  *
@@ -4166,10 +4201,10 @@ class lr extends H {
4166
4201
  * Признак того, что заказ подтвержден в 1С.
4167
4202
  */
4168
4203
  t(this, "isApproved1c");
4169
- this.createdAt = m(e == null ? void 0 : e.createdAt) ? f(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.creator = new G(e == null ? void 0 : e.creator), this.isApproved1c = (e == null ? void 0 : e.isApproved1c) ?? !1;
4204
+ this.createdAt = f(e == null ? void 0 : e.createdAt) ? y(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.creator = new G(e == null ? void 0 : e.creator), this.isApproved1c = (e == null ? void 0 : e.isApproved1c) ?? !1;
4170
4205
  }
4171
4206
  }
4172
- class ct extends $ {
4207
+ class ot extends a {
4173
4208
  /**
4174
4209
  * Инициализирует экземпляр класса {@link ClientAdditionalData}.
4175
4210
  *
@@ -4202,10 +4237,10 @@ class ct extends $ {
4202
4237
  * Список менеджеров.
4203
4238
  */
4204
4239
  t(this, "managers");
4205
- (s = e.contacts) != null && s.length && (this.contacts = e.contacts.map((o) => new F(o))), e.lastOrder && (this.lastOrder = new lr(e.lastOrder)), (i = e.partnerGroups) != null && i.length && (this.partnerGroups = e.partnerGroups.map((o) => new Y(o))), e.preferredDeliveryType && (this.preferredDeliveryType = new J(e.preferredDeliveryType)), e.salesDirection && (this.salesDirection = new S(e.salesDirection)), e.managers && (this.managers = e.managers.map((o) => new re(o)));
4240
+ (s = e.contacts) != null && s.length && (this.contacts = e.contacts.map((o) => new F(o))), e.lastOrder && (this.lastOrder = new cr(e.lastOrder)), (i = e.partnerGroups) != null && i.length && (this.partnerGroups = e.partnerGroups.map((o) => new Y(o))), e.preferredDeliveryType && (this.preferredDeliveryType = new J(e.preferredDeliveryType)), e.salesDirection && (this.salesDirection = new S(e.salesDirection)), e.managers && (this.managers = e.managers.map((o) => new re(o)));
4206
4241
  }
4207
4242
  }
4208
- class lt {
4243
+ class ct {
4209
4244
  /**
4210
4245
  * Инициализирует экземпляр класса {@link DataTablePaginationRequestParams}.
4211
4246
  *
@@ -4223,7 +4258,7 @@ class lt {
4223
4258
  this.page = (r == null ? void 0 : r.page) ?? 1, this.pageSize = (r == null ? void 0 : r.pageSize) ?? 50;
4224
4259
  }
4225
4260
  }
4226
- class Ft extends lt {
4261
+ class Mt extends ct {
4227
4262
  /**
4228
4263
  * Инициализирует экземпляр класса {@link DataTablePagination}.
4229
4264
  *
@@ -4254,7 +4289,7 @@ class Ft extends lt {
4254
4289
  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;
4255
4290
  }
4256
4291
  }
4257
- class Ht {
4292
+ class Ft {
4258
4293
  /**
4259
4294
  * Инициализирует экземпляр класса {@link ISortRequestParams}.
4260
4295
  *
@@ -4272,7 +4307,7 @@ class Ht {
4272
4307
  this.field = (r == null ? void 0 : r.field) ?? "", this.direction = (r == null ? void 0 : r.direction) ?? "asc";
4273
4308
  }
4274
4309
  }
4275
- class zt extends Ce {
4310
+ class Bt extends ve {
4276
4311
  /**
4277
4312
  * Возвращает данные об указанном клиенте.
4278
4313
  *
@@ -4280,7 +4315,7 @@ class zt extends Ce {
4280
4315
  * @see /doc/api/internal#/Клиенты/api_internal_client_get_full_info
4281
4316
  */
4282
4317
  getClient(r) {
4283
- return this.get(`/internal/clients/${r}`, {}, (e) => new He(e.data));
4318
+ return this.get(`/internal/clients/${r}`, {}, (e) => new Fe(e.data));
4284
4319
  }
4285
4320
  /**
4286
4321
  * Возвращает данные о клиентах, удовлетворяющих указанным параметрам поиска.
@@ -4295,7 +4330,7 @@ class zt extends Ce {
4295
4330
  getClientsList(r, e, s, i) {
4296
4331
  return this.getPaginated("/internal/clients", r, e, s, i, (o) => {
4297
4332
  const c = { ...o.data };
4298
- return c.data = c.data.map((u) => new ne(u)), c;
4333
+ return c.data = c.data.map((u) => new oe(u)), c;
4299
4334
  });
4300
4335
  }
4301
4336
  /**
@@ -4308,7 +4343,7 @@ class zt extends Ce {
4308
4343
  return this.getClientsList({
4309
4344
  groupOp: "and",
4310
4345
  groups: [],
4311
- filters: [{ field: "phone", op: Oe.Contains, value: r }]
4346
+ filters: [{ field: "phone", op: Ne.Contains, value: r }]
4312
4347
  });
4313
4348
  }
4314
4349
  /**
@@ -4322,7 +4357,7 @@ class zt extends Ce {
4322
4357
  const s = r.map((i) => i.id);
4323
4358
  return this.post("/internal/clients/additional-data", { clients: s, requested_data_types: e }, (i) => {
4324
4359
  let o = [];
4325
- return (i == null ? void 0 : i.data.length) > 0 && (o = i.data.map((c) => new ct(c))), o;
4360
+ return (i == null ? void 0 : i.data.length) > 0 && (o = i.data.map((c) => new ot(c))), o;
4326
4361
  });
4327
4362
  }
4328
4363
  /**
@@ -4334,7 +4369,7 @@ class zt extends Ce {
4334
4369
  getAllClientContacts(r) {
4335
4370
  return this.get(`/internal/clients/${r}/contacts/all`, {}, (e) => {
4336
4371
  let s = [];
4337
- return (e == null ? void 0 : e.data.length) > 0 && (s = e.data.map((i) => new ot(i))), s;
4372
+ return (e == null ? void 0 : e.data.length) > 0 && (s = e.data.map((i) => new nt(i))), s;
4338
4373
  });
4339
4374
  }
4340
4375
  /**
@@ -4364,7 +4399,7 @@ class zt extends Ce {
4364
4399
  is_excluded_from_ms_calls_to_clients: r.isExcludedFromMsCallsToClients,
4365
4400
  preferred_warehouse_id: (s = r.preferredWarehouse) == null ? void 0 : s.id
4366
4401
  },
4367
- (i) => new He(i.data),
4402
+ (i) => new Fe(i.data),
4368
4403
  e
4369
4404
  );
4370
4405
  }
@@ -4474,7 +4509,7 @@ class zt extends Ce {
4474
4509
  * @see /doc/api/internal#/Контрагенты/api_internal_client_contragent_create
4475
4510
  */
4476
4511
  createContragentClientData(r, e, s = {}) {
4477
- var p, R, D, L, I, x, k, N;
4512
+ var p, R, D, L, I, x, k, d;
4478
4513
  let i;
4479
4514
  const o = e, c = e, u = e;
4480
4515
  switch (e.opf.slug) {
@@ -4540,7 +4575,7 @@ class zt extends Ce {
4540
4575
  name: e.name,
4541
4576
  alternative_name: e.alternativeName,
4542
4577
  partner_group_id: (k = e.partnerGroup) == null ? void 0 : k.id,
4543
- manager_id: (N = e.manager) == null ? void 0 : N.id,
4578
+ manager_id: (d = e.manager) == null ? void 0 : d.id,
4544
4579
  comment: e.comment
4545
4580
  };
4546
4581
  break;
@@ -4548,7 +4583,7 @@ class zt extends Ce {
4548
4583
  return this.post(
4549
4584
  `/internal/clients/${r}/contragents`,
4550
4585
  i,
4551
- (O) => he.createInstance(O.data),
4586
+ (O) => ge.createInstance(O.data),
4552
4587
  s
4553
4588
  );
4554
4589
  }
@@ -4563,7 +4598,7 @@ class zt extends Ce {
4563
4598
  * @see /doc/api/internal#/Контрагенты/api_internal_client_contragent_update
4564
4599
  */
4565
4600
  updateContragentClientData(r, e, s = {}) {
4566
- var p, R, D, L, I, x, k, N;
4601
+ var p, R, D, L, I, x, k, d;
4567
4602
  let i;
4568
4603
  const o = e, c = e, u = e;
4569
4604
  switch (e.opf.slug) {
@@ -4629,7 +4664,7 @@ class zt extends Ce {
4629
4664
  name: e.name,
4630
4665
  alternative_name: e.alternativeName,
4631
4666
  partner_group_id: (k = e.partnerGroup) == null ? void 0 : k.id,
4632
- manager_id: (N = e.manager) == null ? void 0 : N.id,
4667
+ manager_id: (d = e.manager) == null ? void 0 : d.id,
4633
4668
  comment: e.comment
4634
4669
  };
4635
4670
  break;
@@ -4637,7 +4672,7 @@ class zt extends Ce {
4637
4672
  return this.patch(
4638
4673
  `/internal/clients/${r}/contragents/${e.id}`,
4639
4674
  i,
4640
- (O) => he.createInstance(O.data),
4675
+ (O) => ge.createInstance(O.data),
4641
4676
  s
4642
4677
  );
4643
4678
  }
@@ -4675,7 +4710,7 @@ class zt extends Ce {
4675
4710
  }), e.operatingHours && (i.operating_hours = {
4676
4711
  from: e.operatingHours.from,
4677
4712
  to: e.operatingHours.to
4678
- }), this.post(`/internal/clients/${r}/delivery-addresses`, i, (u) => new ge(u.data), s);
4713
+ }), this.post(`/internal/clients/${r}/delivery-addresses`, i, (u) => new me(u.data), s);
4679
4714
  }
4680
4715
  /**
4681
4716
  * Обновляет данные об адресе доставки клиента.
@@ -4704,7 +4739,7 @@ class zt extends Ce {
4704
4739
  }), this.patch(
4705
4740
  `/internal/clients/${r}/delivery-addresses/${e.id}`,
4706
4741
  i,
4707
- (u) => new ge(u.data),
4742
+ (u) => new me(u.data),
4708
4743
  s
4709
4744
  );
4710
4745
  }
@@ -4740,7 +4775,7 @@ class zt extends Ce {
4740
4775
  correspondent_account: s.correspondentAccount,
4741
4776
  currency_id: s.currency.id
4742
4777
  },
4743
- (o) => new ae(o.data),
4778
+ (o) => new Te(o.data),
4744
4779
  i
4745
4780
  );
4746
4781
  }
@@ -4766,7 +4801,7 @@ class zt extends Ce {
4766
4801
  correspondent_account: s.correspondentAccount,
4767
4802
  currency_id: s.currency.id
4768
4803
  },
4769
- (o) => new ae(o.data),
4804
+ (o) => new Te(o.data),
4770
4805
  i
4771
4806
  );
4772
4807
  }
@@ -4999,7 +5034,7 @@ class zt extends Ce {
4999
5034
  return this.get(`/internal/clients/${r.id}/verification/email?email=${r.email}`);
5000
5035
  }
5001
5036
  }
5002
- class Bt extends h {
5037
+ class Ht extends h {
5003
5038
  /**
5004
5039
  * Выполняет проверку занят ли указанный номер телефона.
5005
5040
  *
@@ -5013,7 +5048,7 @@ class Bt extends h {
5013
5048
  });
5014
5049
  }
5015
5050
  }
5016
- class jt extends h {
5051
+ class zt extends h {
5017
5052
  /**
5018
5053
  * Возвращает настройки указанного конфигуратора для указанной категории.
5019
5054
  *
@@ -5041,7 +5076,7 @@ class jt extends h {
5041
5076
  const i = this.get(
5042
5077
  `internal/catalog/categories/${r.id}/configurators/${(o = r.properties) == null ? void 0 : o.editor}/product`,
5043
5078
  { params: e },
5044
- (c) => new a(c.data)
5079
+ (c) => new b(c.data)
5045
5080
  );
5046
5081
  return i.catch((c) => {
5047
5082
  this.defaultInstanceNotificationErrorResponseHandler(c, s);
@@ -5084,29 +5119,29 @@ class jt extends h {
5084
5119
  return this.delete(`internal/catalog/categories/${r.id}/configurators/${(s = r.properties) == null ? void 0 : s.editor}/template/${e}`);
5085
5120
  }
5086
5121
  }
5087
- class Wt {
5122
+ class jt {
5088
5123
  /**
5089
5124
  * Возвращает диапазон дат по умолчанию.
5090
5125
  */
5091
5126
  static defaultDateRanges() {
5092
- const r = $r(/* @__PURE__ */ new Date(), 1);
5127
+ const r = Dr(/* @__PURE__ */ new Date(), 1);
5093
5128
  return {
5094
5129
  // 'Следующий рабочий день' - это значение по-умолчанию
5095
- nextWorkingDay: { label: "Следующий рабочий день", from: Ir(r), to: Lr(r) },
5096
- today: { label: "Сегодня", from: Je(), to: Sr() },
5097
- yesterday: { label: "Вчера", from: _r(), to: ar() },
5098
- tomorrow: { label: "Завтра", from: Tr(), to: br() }
5130
+ nextWorkingDay: { label: "Следующий рабочий день", from: Lr(r), to: Sr(r) },
5131
+ today: { label: "Сегодня", from: Ve(), to: _r() },
5132
+ yesterday: { label: "Вчера", from: br(), to: Tr() },
5133
+ tomorrow: { label: "Завтра", from: ar(), to: $r() }
5099
5134
  };
5100
5135
  }
5101
5136
  }
5102
- const E = class E {
5137
+ const V = class V {
5103
5138
  /**
5104
5139
  * Устанавливает список единиц измерения линейной величины.
5105
5140
  *
5106
5141
  * @param linearValues Список единиц измерения линейной величины.
5107
5142
  */
5108
5143
  static setLinearValues(r) {
5109
- E.linearValues = r;
5144
+ V.linearValues = r;
5110
5145
  }
5111
5146
  /**
5112
5147
  * Возвращает признак, что указанный товар имеет линейную единицу измерения.
@@ -5114,7 +5149,7 @@ const E = class E {
5114
5149
  * @param product Данные о товаре для которого нужно проверить линейность его единицы измерения.
5115
5150
  */
5116
5151
  static productIsMeasurable(r) {
5117
- return E.linearValues.includes(r.unit);
5152
+ return V.linearValues.includes(r.unit);
5118
5153
  }
5119
5154
  /**
5120
5155
  * Возвращает кратность количества для указанного товара.
@@ -5123,7 +5158,7 @@ const E = class E {
5123
5158
  */
5124
5159
  static getProductMultiplicity(r) {
5125
5160
  var e, s;
5126
- return !((e = r.properties) != null && e.ignoreMinCountCheck) && ((s = r.properties) != null && s.minCount) && !E.productIsMeasurable(r) ? r.properties.minCount : 1;
5161
+ return !((e = r.properties) != null && e.ignoreMinCountCheck) && ((s = r.properties) != null && s.minCount) && !V.productIsMeasurable(r) ? r.properties.minCount : 1;
5127
5162
  }
5128
5163
  /**
5129
5164
  * Возвращает кратность длины для указанного товара.
@@ -5138,14 +5173,14 @@ const E = class E {
5138
5173
  /**
5139
5174
  * Список единиц измерения линейной величины.
5140
5175
  */
5141
- t(E, "linearValues", ["пог.м.", "м.", "м2"]);
5142
- let ze = E;
5143
- class Vt {
5176
+ t(V, "linearValues", ["пог.м.", "м.", "м2"]);
5177
+ let Be = V;
5178
+ class Wt {
5144
5179
  /**
5145
5180
  * Генерирует и возвращает данные-заглушку неопределённого менеджера.
5146
5181
  */
5147
5182
  static generateUndefinedManagerInstance() {
5148
- return new we({ id: 0, name: "- Не назначен -", isActive: !0, guid: "-undefined-" });
5183
+ return new Ce({ id: 0, name: "- Не назначен -", isActive: !0, guid: "-undefined-" });
5149
5184
  }
5150
5185
  /**
5151
5186
  * Выполняет проверку, является ли указанная запись записью-заглушкой с данными о неопределённом менеджере.
@@ -5156,19 +5191,19 @@ class Vt {
5156
5191
  return r.id === 0 && r.guid === "-undefined-";
5157
5192
  }
5158
5193
  }
5159
- class ut extends h {
5194
+ class lt extends se {
5160
5195
  /**
5161
5196
  * Возвращает {@link Promise} для получения справочника списка менеджеров.
5162
5197
  */
5163
- getManagers() {
5164
- const r = "/internal/managers", e = h.getCachedResponse(r);
5165
- return e ? Promise.resolve(e) : this.get(r).then((s) => {
5166
- const i = s.data.map((o) => ke.instanceInitializer(we, o));
5167
- return i && this.cacheResponse(r, i), i;
5168
- });
5198
+ async getManagers() {
5199
+ const r = "/internal/managers", e = se.getCachedResponse(r);
5200
+ if (e)
5201
+ return e;
5202
+ const i = (await this.get(r)).data.map((o) => xe.instanceInitializer(Ce, o));
5203
+ return this.cacheResponse(r, i), i;
5169
5204
  }
5170
5205
  }
5171
- class ur extends lr {
5206
+ class lr extends cr {
5172
5207
  /**
5173
5208
  * Инициализирует экземпляр класса {@link OrderInfo}.
5174
5209
  *
@@ -5217,19 +5252,19 @@ class ur extends lr {
5217
5252
  * Признак того, что заказ создан из товаров, которые имеют признак "Нет в наличии".
5218
5253
  */
5219
5254
  t(this, "isNotInStock");
5220
- this.client = new ne(e == null ? void 0 : e.client), this.payment = {
5255
+ this.client = new oe(e == null ? void 0 : e.client), this.payment = {
5221
5256
  type: ((s = e == null ? void 0 : e.payment) == null ? void 0 : s.type) ?? -1,
5222
5257
  status: ((i = e == null ? void 0 : e.payment) == null ? void 0 : i.status) ?? -1,
5223
5258
  onlinePaymentLink: (o = e == null ? void 0 : e.payment) == null ? void 0 : o.onlinePaymentLink
5224
5259
  }, this.delivery = {
5225
5260
  type: ((c = e == null ? void 0 : e.delivery) == null ? void 0 : c.type) ?? -1,
5226
- date: m((u = e == null ? void 0 : e.delivery) == null ? void 0 : u.date) ? f(e.delivery.date) : ((p = e == null ? void 0 : e.delivery) == null ? void 0 : p.date) ?? /* @__PURE__ */ new Date(),
5227
- address: (R = e == null ? void 0 : e.delivery) != null && R.address ? new ge(e.delivery.address) : void 0,
5228
- warehouse: (D = e == null ? void 0 : e.delivery) != null && D.warehouse ? new ye(e.delivery.warehouse) : void 0
5229
- }, this.attachedUser = new G(e == null ? void 0 : e.attachedUser), this.status = (e == null ? void 0 : e.status) ?? 0, this.salesDirection = new S(e == null ? void 0 : e.salesDirection), this.pendingAt = m(e == null ? void 0 : e.pendingAt) ? f(e.pendingAt) : e == null ? void 0 : e.pendingAt, this.processedAt = m(e == null ? void 0 : e.processedAt) ? f(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;
5261
+ date: f((u = e == null ? void 0 : e.delivery) == null ? void 0 : u.date) ? y(e.delivery.date) : ((p = e == null ? void 0 : e.delivery) == null ? void 0 : p.date) ?? /* @__PURE__ */ new Date(),
5262
+ address: (R = e == null ? void 0 : e.delivery) != null && R.address ? new me(e.delivery.address) : void 0,
5263
+ warehouse: (D = e == null ? void 0 : e.delivery) != null && D.warehouse ? new we(e.delivery.warehouse) : void 0
5264
+ }, this.attachedUser = new G(e == null ? void 0 : e.attachedUser), this.status = (e == null ? void 0 : e.status) ?? 0, this.salesDirection = new S(e == null ? void 0 : e.salesDirection), this.pendingAt = f(e == null ? void 0 : e.pendingAt) ? y(e.pendingAt) : e == null ? void 0 : e.pendingAt, this.processedAt = f(e == null ? void 0 : e.processedAt) ? y(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;
5230
5265
  }
5231
5266
  }
5232
- class pt extends H {
5267
+ class ut extends B {
5233
5268
  /**
5234
5269
  * Инициализирует экземпляр класса {@link OrderProduct}.
5235
5270
  *
@@ -5312,7 +5347,7 @@ class pt extends H {
5312
5347
  this.product = new K(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;
5313
5348
  }
5314
5349
  }
5315
- class ht extends ur {
5350
+ class pt extends lr {
5316
5351
  /**
5317
5352
  * Инициализирует экземпляр класса {@link Order}.
5318
5353
  *
@@ -5352,10 +5387,10 @@ class ht extends ur {
5352
5387
  * Признак, что разрешена передача заказа в работу без оплаты.
5353
5388
  */
5354
5389
  t(this, "isAllowProcessingWithoutPayment");
5355
- this.products = (e.products ?? []).map((s) => new pt(s)), this.invoices = e.invoices ?? [], this.comment = e.comment, this.image = e.image, this.contragent = e.contragent ? he.createInstance(e.contragent) : void 0, this.barcode = e.barcode, this.orderSource = e.orderSource ? new w(e.orderSource) : void 0, this.isAllowProcessingWithoutPayment = e.isAllowProcessingWithoutPayment;
5390
+ this.products = (e.products ?? []).map((s) => new ut(s)), this.invoices = e.invoices ?? [], this.comment = e.comment, this.image = e.image, this.contragent = e.contragent ? ge.createInstance(e.contragent) : void 0, this.barcode = e.barcode, this.orderSource = e.orderSource ? new w(e.orderSource) : void 0, this.isAllowProcessingWithoutPayment = e.isAllowProcessingWithoutPayment;
5356
5391
  }
5357
5392
  }
5358
- class Et extends Ce {
5393
+ class Et extends ve {
5359
5394
  /**
5360
5395
  * Возвращает данные о заказах, удовлетворяющих указанным параметрам поиска.
5361
5396
  *
@@ -5368,7 +5403,7 @@ class Et extends Ce {
5368
5403
  getOrders(r, e, s) {
5369
5404
  return this.getPaginated("/internal/orders", r, e ? [e] : void 0, s, {}, (i) => {
5370
5405
  const o = { ...i.data };
5371
- return o.data = o.data.map((c) => new ur(c)), o;
5406
+ return o.data = o.data.map((c) => new lr(c)), o;
5372
5407
  });
5373
5408
  }
5374
5409
  /**
@@ -5386,10 +5421,10 @@ class Et extends Ce {
5386
5421
  * @param orderId Идентификатор заказа для которого необходимо вернуть данные.
5387
5422
  */
5388
5423
  getOrder(r) {
5389
- return this.get(`/internal/orders/${r}`, {}, (e) => new ht(e.data));
5424
+ return this.get(`/internal/orders/${r}`, {}, (e) => new pt(e.data));
5390
5425
  }
5391
5426
  }
5392
- class Ae {
5427
+ class De {
5393
5428
  /**
5394
5429
  * Инициализирует экземпляр класса {@link PriceAnalyze}.
5395
5430
  *
@@ -5416,12 +5451,12 @@ class Ae {
5416
5451
  * Источник клиентской цены.
5417
5452
  */
5418
5453
  t(this, "source");
5419
- this.client = new ne(r == null ? void 0 : r.client), this.product = new a(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) ?? Ne.Product;
5454
+ this.client = new oe(r == null ? void 0 : r.client), this.product = new b(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) ?? ke.Product;
5420
5455
  }
5421
5456
  }
5422
- const De = (n) => {
5457
+ const $e = (n) => {
5423
5458
  var r, e, s, i, o;
5424
- return n ? Pr(
5459
+ return n ? vr(
5425
5460
  {
5426
5461
  cities: (r = n.cities) == null ? void 0 : r.map((c) => c.id),
5427
5462
  clients: (e = n.clients) == null ? void 0 : e.map((c) => c.id),
@@ -5430,13 +5465,13 @@ const De = (n) => {
5430
5465
  salesDirections: (o = n.salesDirections) == null ? void 0 : o.map((c) => c.id),
5431
5466
  hideNotActive: n.hideNotActive
5432
5467
  },
5433
- (c) => U(c) || (Ee(c) || Rr(c)) && Se(c)
5468
+ (c) => U(c) || (Ee(c) || Pr(c)) && Se(c)
5434
5469
  ) : {};
5435
- }, Be = (n) => {
5470
+ }, He = (n) => {
5436
5471
  const r = {};
5437
5472
  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;
5438
5473
  };
5439
- class Jt extends h {
5474
+ class Vt extends h {
5440
5475
  /**
5441
5476
  * Возвращает список клиентских цен на продукты в указанном диапазоне цены.
5442
5477
  *
@@ -5450,10 +5485,10 @@ class Jt extends h {
5450
5485
  return this.get(
5451
5486
  `/internal/price/products/${r}/analyze`,
5452
5487
  {
5453
- ...Be(e),
5454
- filters: De(s)
5488
+ ...He(e),
5489
+ filters: $e(s)
5455
5490
  },
5456
- (i) => i.data.map((o) => new Ae(o))
5491
+ (i) => i.data.map((o) => new De(o))
5457
5492
  );
5458
5493
  }
5459
5494
  /**
@@ -5469,10 +5504,10 @@ class Jt extends h {
5469
5504
  return this.get(
5470
5505
  `/internal/price/categories/${r}/analyze`,
5471
5506
  {
5472
- ...Be(e),
5473
- filters: De(s)
5507
+ ...He(e),
5508
+ filters: $e(s)
5474
5509
  },
5475
- (i) => i.data.map((o) => new Ae(o))
5510
+ (i) => i.data.map((o) => new De(o))
5476
5511
  );
5477
5512
  }
5478
5513
  /**
@@ -5491,13 +5526,13 @@ class Jt extends h {
5491
5526
  `/internal/price/categories/${r}/analyze/square`,
5492
5527
  {
5493
5528
  ...e,
5494
- filters: De(s)
5529
+ filters: $e(s)
5495
5530
  },
5496
- (i) => i.data.map((o) => new Ae(o))
5531
+ (i) => i.data.map((o) => new De(o))
5497
5532
  );
5498
5533
  }
5499
5534
  }
5500
- class gt {
5535
+ class ht {
5501
5536
  /**
5502
5537
  * Инициализирует экземпляр класса {@link MetaTagItem}.
5503
5538
  *
@@ -5515,7 +5550,7 @@ class gt {
5515
5550
  this.name = r.name, this.content = r.content;
5516
5551
  }
5517
5552
  }
5518
- class je {
5553
+ class ze {
5519
5554
  /**
5520
5555
  * Инициализирует экземпляр класса {@link Seo}.
5521
5556
  *
@@ -5551,10 +5586,10 @@ class je {
5551
5586
  */
5552
5587
  t(this, "meta");
5553
5588
  var e;
5554
- this.resourceType = new sr(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 gt(s))) ?? [];
5589
+ this.resourceType = new tr(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 ht(s))) ?? [];
5555
5590
  }
5556
5591
  }
5557
- class Kt extends h {
5592
+ class Jt extends h {
5558
5593
  /**
5559
5594
  * Возвращает {@link Promise} для получения данных о SEO-параметрах указанного ресурса.
5560
5595
  *
@@ -5562,7 +5597,7 @@ class Kt extends h {
5562
5597
  * @param resourceId Идентификатор ресурса для которого необходимо получить SEO-данные.
5563
5598
  */
5564
5599
  getResourceSeoData(r, e) {
5565
- return this.get(`/internal/seo/${r.slug}/${e}`, {}, (s) => new je(s.data));
5600
+ return this.get(`/internal/seo/${r.slug}/${e}`, {}, (s) => new ze(s.data));
5566
5601
  }
5567
5602
  /**
5568
5603
  * Выполняет сохранение данных о SEO-параметрах для указанного ресурса.
@@ -5573,7 +5608,7 @@ class Kt extends h {
5573
5608
  * в случае ошибок в запросах.
5574
5609
  */
5575
5610
  saveResourceSeoData(r, e = {}) {
5576
- return this.post(`/internal/seo/${r.resourceType.slug}/${r.resourceId}`, r, (s) => new je(s.data), e);
5611
+ return this.post(`/internal/seo/${r.resourceType.slug}/${r.resourceId}`, r, (s) => new ze(s.data), e);
5577
5612
  }
5578
5613
  /**
5579
5614
  * Возвращает {@link Promise} для удаления данных о SEO-параметрах указанного ресурса.
@@ -5585,8 +5620,8 @@ class Kt extends h {
5585
5620
  return this.delete(`/internal/seo/${r.slug}/${e}`);
5586
5621
  }
5587
5622
  }
5588
- const P = me("__references_private", () => {
5589
- const n = C({}), r = C(void 0), e = C(void 0), s = C(void 0), i = C(void 0), o = C(void 0), c = C(void 0), u = C(void 0), p = C(void 0), R = C(void 0), D = C(void 0), L = C(void 0), I = C(void 0), x = C(void 0), k = C(void 0), N = C(void 0), O = C(void 0), l = C(void 0);
5623
+ const P = fe("__references_private", () => {
5624
+ const n = C({}), r = C(void 0), e = C(void 0), s = C(void 0), i = C(void 0), o = C(void 0), c = C(void 0), u = C(void 0), p = C(void 0), R = C(void 0), D = C(void 0), L = C(void 0), I = C(void 0), x = C(void 0), k = C(void 0), d = C(void 0), O = C(void 0), l = C(void 0);
5590
5625
  return {
5591
5626
  /**
5592
5627
  * Список загружаемых/загруженных на данный момент значений.
@@ -5651,7 +5686,7 @@ const P = me("__references_private", () => {
5651
5686
  /**
5652
5687
  * Справочник складов.
5653
5688
  */
5654
- warehousesReference: N,
5689
+ warehousesReference: d,
5655
5690
  /**
5656
5691
  * Справочник типов свойств.
5657
5692
  */
@@ -5661,92 +5696,92 @@ const P = me("__references_private", () => {
5661
5696
  */
5662
5697
  priceCoefficientsReference: l
5663
5698
  };
5664
- }), Qt = me("references", () => {
5699
+ }), Kt = fe("references", () => {
5665
5700
  const n = v(() => {
5666
5701
  const l = P();
5667
5702
  return !l.channelPrimaryInterestReference && !l.dataLoaderList.channelPrimaryInterestReference && (l.dataLoaderList.channelPrimaryInterestReference = !0, h.getInstance(A).getChannelPrimaryInterest().then((g) => {
5668
5703
  l.channelPrimaryInterestReference = g;
5669
- }).catch(y)), l.channelPrimaryInterestReference;
5704
+ }).catch(m)), l.channelPrimaryInterestReference;
5670
5705
  }), r = v(() => {
5671
5706
  const l = P();
5672
5707
  return !l.contactPositionsReference && !l.dataLoaderList.contactPositionsReference && (l.dataLoaderList.contactPositionsReference = !0, h.getInstance(A).getContactPositions().then((g) => {
5673
5708
  l.contactPositionsReference = g;
5674
- }).catch(y)), l.contactPositionsReference;
5709
+ }).catch(m)), l.contactPositionsReference;
5675
5710
  }), e = v(() => {
5676
5711
  const l = P();
5677
5712
  return !l.currencyReference && !l.dataLoaderList.currencyReference && (l.dataLoaderList.currencyReference = !0, h.getInstance(A).getCurrency().then((g) => {
5678
5713
  l.currencyReference = g;
5679
- }).catch(y)), l.currencyReference;
5714
+ }).catch(m)), l.currencyReference;
5680
5715
  }), s = v(() => {
5681
5716
  const l = P();
5682
5717
  return !l.opfReference && !l.dataLoaderList.opfReference && (l.dataLoaderList.opfReference = !0, h.getInstance(A).getOpf().then((g) => {
5683
5718
  l.opfReference = g;
5684
- }).catch(y)), l.opfReference;
5719
+ }).catch(m)), l.opfReference;
5685
5720
  }), i = v(() => {
5686
5721
  const l = P();
5687
5722
  return !l.orderPaymentStatusReference && !l.dataLoaderList.orderPaymentStatusReference && (l.dataLoaderList.orderPaymentStatusReference = !0, h.getInstance(A).getOrderPaymentStatuses().then((g) => {
5688
5723
  l.orderPaymentStatusReference = g;
5689
- }).catch(y)), l.orderPaymentStatusReference;
5724
+ }).catch(m)), l.orderPaymentStatusReference;
5690
5725
  }), o = v(() => {
5691
5726
  const l = P();
5692
5727
  return !l.orderStatusReference && !l.dataLoaderList.orderStatusReference && (l.dataLoaderList.orderStatusReference = !0, h.getInstance(A).getOrderStatuses().then((g) => {
5693
5728
  l.orderStatusReference = g;
5694
- }).catch(y)), l.orderStatusReference;
5729
+ }).catch(m)), l.orderStatusReference;
5695
5730
  }), c = v(() => {
5696
5731
  const l = P();
5697
5732
  return !l.paymentTypeReference && !l.dataLoaderList.paymentTypeReference && (l.dataLoaderList.paymentTypeReference = !0, h.getInstance(A).getPaymentTypes().then((g) => {
5698
5733
  l.paymentTypeReference = g;
5699
- }).catch(y)), l.paymentTypeReference;
5734
+ }).catch(m)), l.paymentTypeReference;
5700
5735
  }), u = v(() => {
5701
5736
  const l = P();
5702
5737
  return !l.partnerGroupReference && !l.dataLoaderList.partnerGroupReference && (l.dataLoaderList.partnerGroupReference = !0, h.getInstance(A).getPartnerGroup().then((g) => {
5703
5738
  l.partnerGroupReference = g;
5704
- }).catch(y)), l.partnerGroupReference;
5739
+ }).catch(m)), l.partnerGroupReference;
5705
5740
  }), p = v(() => {
5706
5741
  const l = P();
5707
5742
  return !l.productFileTypeReference && !l.dataLoaderList.productFileTypeReference && (l.dataLoaderList.productFileTypeReference = !0, h.getInstance(A).getProductFileType().then((g) => {
5708
5743
  l.productFileTypeReference = g;
5709
- }).catch(y)), l.productFileTypeReference;
5744
+ }).catch(m)), l.productFileTypeReference;
5710
5745
  }), R = v(() => {
5711
5746
  const l = P();
5712
5747
  return !l.resourceTypesReference && !l.dataLoaderList.resourceTypesReference && (l.dataLoaderList.resourceTypesReference = !0, h.getInstance(A).getResourceTypes().then((g) => {
5713
5748
  l.resourceTypesReference = g;
5714
- }).catch(y)), l.resourceTypesReference;
5749
+ }).catch(m)), l.resourceTypesReference;
5715
5750
  }), D = v(() => {
5716
5751
  const l = P();
5717
5752
  return !l.salesDirectionsReference && !l.dataLoaderList.salesDirectionsReference && (l.dataLoaderList.salesDirectionsReference = !0, h.getInstance(A).getSalesDirections().then((g) => {
5718
5753
  l.salesDirectionsReference = g;
5719
- }).catch(y)), l.salesDirectionsReference;
5754
+ }).catch(m)), l.salesDirectionsReference;
5720
5755
  }), L = v(() => {
5721
5756
  const l = P();
5722
5757
  return !l.sourcePrimaryInterestReference && !l.dataLoaderList.sourcePrimaryInterestReference && (l.dataLoaderList.sourcePrimaryInterestReference = !0, h.getInstance(A).getSourcePrimaryInterest().then((g) => {
5723
5758
  l.sourcePrimaryInterestReference = g;
5724
- }).catch(y)), l.sourcePrimaryInterestReference;
5759
+ }).catch(m)), l.sourcePrimaryInterestReference;
5725
5760
  }), I = v(() => {
5726
5761
  const l = P();
5727
5762
  return !l.deliveryTypeReference && !l.dataLoaderList.deliveryTypeReference && (l.dataLoaderList.deliveryTypeReference = !0, h.getInstance(A).getDeliveryTypes().then((g) => {
5728
5763
  l.deliveryTypeReference = g;
5729
- }).catch(y)), l.deliveryTypeReference;
5764
+ }).catch(m)), l.deliveryTypeReference;
5730
5765
  }), x = v(() => {
5731
5766
  const l = P();
5732
- return !l.managersList && !l.dataLoaderList.managersList && (l.dataLoaderList.managersList = !0, h.getInstance(ut).getManagers().then((g) => {
5767
+ return !l.managersList && !l.dataLoaderList.managersList && (l.dataLoaderList.managersList = !0, h.getInstance(lt).getManagers().then((g) => {
5733
5768
  l.managersList = g;
5734
- }).catch(y)), l.managersList;
5769
+ }).catch(m)), l.managersList;
5735
5770
  }), k = v(() => {
5736
5771
  const l = P();
5737
5772
  return !l.warehousesReference && !l.dataLoaderList.warehousesReference && (l.dataLoaderList.warehousesReference = !0, h.getInstance(A).getWarehouses().then((g) => {
5738
5773
  l.warehousesReference = g;
5739
- }).catch(y)), l.warehousesReference;
5740
- }), N = v(() => {
5774
+ }).catch(m)), l.warehousesReference;
5775
+ }), d = v(() => {
5741
5776
  const l = P();
5742
5777
  return !l.propertyTypesReference && !l.dataLoaderList.propertyTypesReference && (l.dataLoaderList.propertyTypesReference = !0, h.getInstance(A).getPropertyTypes().then((g) => {
5743
5778
  l.propertyTypesReference = g;
5744
- }).catch(y)), l.propertyTypesReference;
5779
+ }).catch(m)), l.propertyTypesReference;
5745
5780
  }), O = v(() => {
5746
5781
  const l = P();
5747
5782
  return !l.priceCoefficientsReference && !l.dataLoaderList.priceCoefficientsReference && (l.dataLoaderList.priceCoefficientsReference = !0, h.getInstance(A).getPriceCoefficients().then((g) => {
5748
5783
  l.priceCoefficientsReference = g;
5749
- }).catch(y)), l.priceCoefficientsReference;
5784
+ }).catch(m)), l.priceCoefficientsReference;
5750
5785
  });
5751
5786
  return {
5752
5787
  /**
@@ -5812,13 +5847,13 @@ const P = me("__references_private", () => {
5812
5847
  /**
5813
5848
  * Справочник типов свойств.
5814
5849
  */
5815
- propertyTypesReference: N,
5850
+ propertyTypesReference: d,
5816
5851
  /**
5817
5852
  * Справочник коэффициентов цен.
5818
5853
  */
5819
5854
  priceCoefficientsReference: O
5820
5855
  };
5821
- }), mt = me("__user_state_private", () => {
5856
+ }), gt = fe("__user_state_private", () => {
5822
5857
  const n = C({}), r = C(void 0);
5823
5858
  return {
5824
5859
  /**
@@ -5830,18 +5865,18 @@ const P = me("__references_private", () => {
5830
5865
  */
5831
5866
  currentUser: r
5832
5867
  };
5833
- }), Yt = me("user_state", () => ({
5868
+ }), Qt = fe("user_state", () => ({
5834
5869
  /**
5835
5870
  * Данные о текущем пользователе.
5836
5871
  */
5837
5872
  currentUser: v(() => {
5838
- const r = mt();
5839
- return !r.currentUser && !r.dataLoaderList.currentUser && (r.dataLoaderList.currentUser = !0, h.getInstance(rt).getCurrentUser().then((e) => {
5873
+ const r = gt();
5874
+ return !r.currentUser && !r.dataLoaderList.currentUser && (r.dataLoaderList.currentUser = !0, h.getInstance(et).getCurrentUser().then((e) => {
5840
5875
  r.currentUser = e;
5841
- }).catch(y).finally(y)), r.currentUser;
5876
+ }).catch(m).finally(m)), r.currentUser;
5842
5877
  })
5843
5878
  }));
5844
- class Xt extends h {
5879
+ class Yt extends h {
5845
5880
  /**
5846
5881
  * Возвращает подсказки по адресам.
5847
5882
  *
@@ -5888,7 +5923,7 @@ class Xt extends h {
5888
5923
  });
5889
5924
  }
5890
5925
  }
5891
- class Zt {
5926
+ class Xt {
5892
5927
  /**
5893
5928
  * Инициализирует экземпляр класса {@link FieldValidationResultData}.
5894
5929
  *
@@ -5913,142 +5948,141 @@ class Zt {
5913
5948
  }
5914
5949
  export {
5915
5950
  Er as AnyReference,
5916
- $t as AppBaseConfig,
5917
- b as AppConfigProvider,
5918
- ae as BankAccount,
5919
- Ce as BasePaginationProvider,
5920
- Hr as CalculationTypeEnum,
5921
- oe as Cart,
5922
- qr as CartItem,
5923
- Or as CartItemBase,
5924
- bt as CartProvider,
5925
- St as CatalogProvider,
5926
- Ke as CatalogableItem,
5951
+ Dt as AppBaseConfig,
5952
+ $ as AppConfigProvider,
5953
+ Te as BankAccount,
5954
+ ve as BasePaginationProvider,
5955
+ Fr as CalculationTypeEnum,
5956
+ ce as Cart,
5957
+ Or as CartItem,
5958
+ Nr as CartItemBase,
5959
+ $t as CartProvider,
5960
+ _t as CatalogProvider,
5961
+ Je as CatalogableItem,
5927
5962
  q as Category,
5928
- Ge as CategoryPricingRule,
5929
- tr as ChannelPrimaryInterest,
5930
- _t as City,
5963
+ Ue as CategoryPricingRule,
5964
+ rr as ChannelPrimaryInterest,
5965
+ bt as City,
5931
5966
  de as CityWithRegionAndCountry,
5932
- He as Client,
5933
- ct as ClientAdditionalData,
5934
- ue as ClientCategory,
5935
- zt as ClientDataProvider,
5936
- Lt as ClientPriceProvider,
5937
- It as ClientPriceTemplateProvider,
5967
+ Fe as Client,
5968
+ ot as ClientAdditionalData,
5969
+ pe as ClientCategory,
5970
+ Bt as ClientDataProvider,
5971
+ St as ClientPriceProvider,
5972
+ Lt as ClientPriceTemplateProvider,
5938
5973
  K as ClientProduct,
5939
- Nt as ClientProductCategoryDataProvider,
5974
+ kt as ClientProductCategoryDataProvider,
5940
5975
  dt as ClientProductDataProvider,
5941
- ne as ClientShortInfo,
5942
- st as ClientsAdditionalDataRequestTypeEnum,
5943
- Mt as ClientsListFilters,
5944
- jt as ConfiguratorProvider,
5945
- _e as Contact,
5946
- Wr as ContactLinks,
5976
+ oe as ClientShortInfo,
5977
+ tt as ClientsAdditionalDataRequestTypeEnum,
5978
+ Gt as ClientsListFilters,
5979
+ zt as ConfiguratorProvider,
5980
+ be as Contact,
5981
+ jr as ContactLinks,
5947
5982
  F as ContactPerson,
5948
- ot as ContactPersonRelated,
5949
- Jr as ContactPosition,
5950
- Re as ContactRelation,
5951
- nr as ContragentBase,
5952
- he as ContragentFactory,
5953
- or as ContragentIc,
5954
- it as ContragentPerson,
5955
- nt as ContragentUlNr,
5956
- cr as ContragentUlR,
5957
- Ne as CostSourceEnum,
5983
+ nt as ContactPersonRelated,
5984
+ Vr as ContactPosition,
5985
+ Ae as ContactRelation,
5986
+ ir as ContragentBase,
5987
+ ge as ContragentFactory,
5988
+ nr as ContragentIc,
5989
+ st as ContragentPerson,
5990
+ it as ContragentUlNr,
5991
+ or as ContragentUlR,
5992
+ ke as CostSourceEnum,
5958
5993
  Q as Country,
5959
- pe as Currency,
5960
- Xt as DataSuggestionProvider,
5961
- Ft as DataTablePagination,
5962
- lt as DataTablePaginationRequestParams,
5963
- Ht as DataTableSortRequestParams,
5964
- Wt as DateTimeProvider,
5965
- Br as DeletableNamedIdentity,
5966
- ge as DeliveryAddress,
5994
+ he as Currency,
5995
+ Yt as DataSuggestionProvider,
5996
+ Mt as DataTablePagination,
5997
+ ct as DataTablePaginationRequestParams,
5998
+ Ft as DataTableSortRequestParams,
5999
+ jt as DateTimeProvider,
6000
+ Hr as DeletableNamedIdentity,
6001
+ me as DeliveryAddress,
5967
6002
  J as DeliveryType,
5968
- Dt as DetailedJwtPayload,
5969
- Ur as DeviceTypeResolutionConfig,
5970
- jr as DiscountShortInfo,
5971
- Zt as FieldValidationResultData,
5972
- se as FilterGroup,
5973
- Me as FilterItem,
5974
- Oe as FilterOpEnum,
5975
- Ye as GeoCoordinates,
5976
- Nr as HiddenCatalogableItem,
5977
- Te as HttpBaseCachedRequester,
5978
- be as HttpBaseRequester,
5979
- Gr as HttpParamsConfig,
6003
+ At as DetailedJwtPayload,
6004
+ qr as DeviceTypeResolutionConfig,
6005
+ zr as DiscountShortInfo,
6006
+ Xt as FieldValidationResultData,
6007
+ ie as FilterGroup,
6008
+ Ge as FilterItem,
6009
+ Ne as FilterOpEnum,
6010
+ Qe as GeoCoordinates,
6011
+ kr as HiddenCatalogableItem,
6012
+ se as HttpCachedRequester,
6013
+ Ur as HttpParamsConfig,
5980
6014
  h as HttpRequester,
5981
- H as Identity,
6015
+ B as Identity,
5982
6016
  dr as Image,
5983
- le as JwtPayload,
5984
- we as Manager,
6017
+ ue as JwtPayload,
6018
+ Ce as Manager,
5985
6019
  re as ManagerCommon,
5986
- Vt as ManagerDataFactory,
5987
- ut as ManagerDataProvider,
5988
- gt as MetaTagItem,
5989
- $ as NamedIdentity,
6020
+ Wt as ManagerDataFactory,
6021
+ lt as ManagerDataProvider,
6022
+ ht as MetaTagItem,
6023
+ a as NamedIdentity,
5990
6024
  M as Opf,
5991
6025
  T as OpfEnum,
5992
- ht as Order,
5993
- ur as OrderInfo,
5994
- Kr as OrderPaymentStatus,
5995
- pt as OrderProduct,
5996
- lr as OrderShortInfo,
5997
- Qr as OrderStatus,
6026
+ pt as Order,
6027
+ lr as OrderInfo,
6028
+ Jr as OrderPaymentStatus,
6029
+ ut as OrderProduct,
6030
+ cr as OrderShortInfo,
6031
+ Kr as OrderStatus,
5998
6032
  Et as OrdersDataProvider,
5999
6033
  Y as PartnerGroup,
6000
- Yr as PaymentType,
6001
- Tt as PreferencesStorageProvider,
6002
- Ae as PriceAnalyze,
6003
- Jt as PriceAnalyzeProvider,
6004
- fe as PriceCoefficient,
6005
- Qe as PriceCoefficientEnum,
6034
+ Qr as PaymentType,
6035
+ at as PreferencesStorageProvider,
6036
+ De as PriceAnalyze,
6037
+ Vt as PriceAnalyzeProvider,
6038
+ ye as PriceCoefficient,
6039
+ Ke as PriceCoefficientEnum,
6006
6040
  j as PriceTemplate,
6007
- ve as PriceTemplateCategory,
6041
+ Pe as PriceTemplateCategory,
6008
6042
  X as PriceTemplateClient,
6009
- Ze as PriceTemplateICatalogableItem,
6010
- Pe as PriceTemplateProduct,
6011
- Ot as PriceTemplateProvider,
6043
+ Xe as PriceTemplateICatalogableItem,
6044
+ Re as PriceTemplateProduct,
6045
+ Nt as PriceTemplateProvider,
6012
6046
  ee as PricingRole,
6013
- qt as PricingRoleProvider,
6014
- $e as PrimaryCatalogableItem,
6015
- a as Product,
6016
- xt as ProductCategoryDataProvider,
6017
- kt as ProductDataProvider,
6018
- Xr as ProductFileType,
6019
- xe as ProductPriceCoefficient,
6020
- tt as ProductPriceHistory,
6021
- Ut as PropertiesProvider,
6047
+ Ot as PricingRoleProvider,
6048
+ ae as PrimaryCatalogableItem,
6049
+ b as Product,
6050
+ It as ProductCategoryDataProvider,
6051
+ xt as ProductDataProvider,
6052
+ Yr as ProductFileType,
6053
+ Ie as ProductPriceCoefficient,
6054
+ rt as ProductPriceHistory,
6055
+ qt as PropertiesProvider,
6022
6056
  Z as Property,
6023
- rr as PropertyType,
6024
- zr as PropertyTypeEnum,
6025
- z as PropertyValue,
6026
- Gt as RecommendationsDataProvider,
6027
- Ue as RecommendationsList,
6057
+ er as PropertyType,
6058
+ Br as PropertyTypeEnum,
6059
+ H as PropertyValue,
6060
+ Ut as RecommendationsDataProvider,
6061
+ qe as RecommendationsList,
6028
6062
  w as Reference,
6029
6063
  A as ReferenceDataProvider,
6030
6064
  te as Region,
6031
- sr as ResourceType,
6065
+ tr as ResourceType,
6032
6066
  S as SalesDirection,
6033
- Mr as SentryConfig,
6034
- je as Seo,
6035
- Kt as SeoDataProvider,
6036
- ir as SourcePrimaryInterest,
6037
- kr as StockCount,
6038
- at as TemplatesListFilters,
6039
- ke as TypedInstanceFactory,
6040
- ze as UnitsHelper,
6041
- Bt as UnknownClientDataProvider,
6042
- Xe as UpdatableNamedIdentity,
6043
- et as User,
6044
- er as UserCommonInfo,
6045
- rt as UserDataProvider,
6067
+ Gr as SentryConfig,
6068
+ ze as Seo,
6069
+ Jt as SeoDataProvider,
6070
+ sr as SourcePrimaryInterest,
6071
+ xr as StockCount,
6072
+ Tt as TemplatesListFilters,
6073
+ xe as TypedInstanceFactory,
6074
+ Be as UnitsHelper,
6075
+ Ht as UnknownClientDataProvider,
6076
+ Ye as UpdatableNamedIdentity,
6077
+ Zr as User,
6078
+ Ze as UserCommonInfo,
6079
+ et as UserDataProvider,
6046
6080
  G as UserShortInfo,
6047
- Zr as UserTypeEnum,
6048
- Fr as VersionConfig,
6049
- ye as Warehouse,
6050
- Fe as findCatalogItemByIdRecursive,
6051
- Qt as useReferencesStore,
6052
- Yt as useUserStateStore
6081
+ Xr as UserTypeEnum,
6082
+ Mr as VersionConfig,
6083
+ we as Warehouse,
6084
+ Me as findCatalogItemByIdRecursive,
6085
+ Kt as useReferencesStore,
6086
+ Qt as useUserStateStore
6053
6087
  };
6054
6088
  //# sourceMappingURL=sc-common-lib.js.map