@snabcentr/common-lib 1.66.0 → 1.67.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/dist/manifest.json +1 -1
  2. package/dist/release_notes.tmp +2 -4
  3. package/dist/sc-common-lib.js +916 -866
  4. package/dist/sc-common-lib.js.map +1 -1
  5. package/dist/sc-common-lib.umd.cjs +1 -1
  6. package/dist/sc-common-lib.umd.cjs.map +1 -1
  7. package/dist/src/auth/index.d.ts +1 -0
  8. package/dist/src/auth/index.d.ts.map +1 -1
  9. package/dist/src/auth/states/auth-state-store.d.ts +50 -0
  10. package/dist/src/auth/states/auth-state-store.d.ts.map +1 -0
  11. package/dist/src/auth/states/index.d.ts +2 -0
  12. package/dist/src/auth/states/index.d.ts.map +1 -0
  13. package/dist/src/http/classes/http-requester.d.ts +4 -0
  14. package/dist/src/http/classes/http-requester.d.ts.map +1 -1
  15. package/dist/src/index.d.ts +0 -1
  16. package/dist/src/index.d.ts.map +1 -1
  17. package/dist/src/references/index.d.ts +1 -0
  18. package/dist/src/references/index.d.ts.map +1 -1
  19. package/dist/src/references/states/index.d.ts +2 -0
  20. package/dist/src/references/states/index.d.ts.map +1 -0
  21. package/dist/src/{states/references-store.d.ts → references/states/references-state-store.d.ts} +18 -18
  22. package/dist/src/references/states/references-state-store.d.ts.map +1 -0
  23. package/dist/src/user/index.d.ts +1 -0
  24. package/dist/src/user/index.d.ts.map +1 -1
  25. package/dist/src/user/providers/index.d.ts +1 -0
  26. package/dist/src/user/providers/index.d.ts.map +1 -1
  27. package/dist/src/user/providers/user-auth-data-provider.d.ts +17 -0
  28. package/dist/src/user/providers/user-auth-data-provider.d.ts.map +1 -0
  29. package/dist/src/user/providers/user-data-provider.d.ts.map +1 -1
  30. package/dist/src/user/states/index.d.ts +2 -0
  31. package/dist/src/user/states/index.d.ts.map +1 -0
  32. package/dist/src/user/states/user-state-store.d.ts +21 -0
  33. package/dist/src/user/states/user-state-store.d.ts.map +1 -0
  34. package/package.json +2 -1
  35. package/dist/src/states/index.d.ts +0 -3
  36. package/dist/src/states/index.d.ts.map +0 -1
  37. package/dist/src/states/references-store.d.ts.map +0 -1
  38. package/dist/src/states/user-state-store.d.ts +0 -45
  39. package/dist/src/states/user-state-store.d.ts.map +0 -1
@@ -2,13 +2,13 @@ var hr = Object.defineProperty;
2
2
  var gr = (n, r, e) => r in n ? hr(n, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[r] = e;
3
3
  var t = (n, r, e) => gr(n, typeof r != "symbol" ? r + "" : r, e);
4
4
  import { jwtDecode as Ve } from "jwt-decode";
5
- import { merge as Ee, isNil as U, toUpper as mr, constant as fr, isUndefined as yr, isString as m, cloneDeep as wr, noop as w, toLower as Cr, isFunction as Se, isEmpty as Le, map as ue, forEach as vr, isDate as Pr, isArray as Je, omitBy as Rr, isObject as Ar } from "lodash-es";
6
- import { objectToCamel as Ie, objectToSnake as qe } from "ts-case-convert";
7
- import { parseISO as f, format as z, isAfter as Dr, startOfToday as Ke, addSeconds as $r, addBusinessDays as ar, endOfTomorrow as Tr, startOfTomorrow as br, endOfYesterday as _r, startOfYesterday as Sr, endOfToday as Lr, endOfDay as Ir, startOfDay as xr } from "date-fns";
8
- import { defineStore as ye } from "pinia";
9
- import { ref as y, computed as v } from "vue";
10
- import kr from "axios";
11
- class pe {
5
+ import { merge as Ee, isUndefined as mr, isNil as T, noop as C, toUpper as fr, constant as yr, isString as m, cloneDeep as wr, toLower as Cr, isFunction as Ie, isEmpty as Le, map as pe, forEach as vr, isDate as Pr, isArray as Je, omitBy as Rr, isObject as Ar } from "lodash-es";
6
+ import { objectToCamel as ke, objectToSnake as Ue } from "ts-case-convert";
7
+ import { defineStore as X } from "pinia";
8
+ import { ref as f, computed as v } from "vue";
9
+ import { parseISO as y, format as z, isAfter as ar, startOfToday as Ke, addSeconds as Dr, addBusinessDays as $r, endOfTomorrow as Tr, startOfTomorrow as br, endOfYesterday as _r, startOfYesterday as Sr, endOfToday as Ir, endOfDay as Lr, startOfDay as kr } from "date-fns";
10
+ import dr from "axios";
11
+ class ue {
12
12
  /**
13
13
  * Инициализирует экземпляр класса {@link JwtPayload}.
14
14
  *
@@ -107,10 +107,10 @@ class pe {
107
107
  * @param jwtToken JWT-ключ доступа.
108
108
  */
109
109
  static getJwtPayload(r) {
110
- return new pe(Ie(Ve(r)));
110
+ return new ue(ke(Ve(r)));
111
111
  }
112
112
  }
113
- class Dt extends pe {
113
+ class Dt extends ue {
114
114
  /**
115
115
  * Инициализирует экземпляр класса {@link DetailedJwtPayload}.
116
116
  *
@@ -150,9 +150,93 @@ class Dt extends pe {
150
150
  * @param jwtToken JWT-ключ доступа.
151
151
  */
152
152
  static getJwtPayload(e) {
153
- return new pe(Ie(Ve(e)));
153
+ return new ue(ke(Ve(e)));
154
154
  }
155
155
  }
156
+ const W = class W {
157
+ /**
158
+ * Инициализирует и возвращает конфигурацию приложения.
159
+ *
160
+ * @param config Данные для первоначальной инициализации.
161
+ */
162
+ static init(r) {
163
+ W.config = r;
164
+ }
165
+ /**
166
+ * Возвращает текущую конфигурацию приложения.
167
+ */
168
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
169
+ static getConfig() {
170
+ if (mr(W.config))
171
+ throw new Error("Config is undefined. Please set config by AppConfigProvider.init().");
172
+ return W.config;
173
+ }
174
+ /**
175
+ * Выполняет загрузку конфигурации по указанному пути.
176
+ *
177
+ * @param path Путь к конфигурации.
178
+ */
179
+ static loadRemoteConfig(r = "/config.json") {
180
+ const e = fetch(r).then((s) => s.ok ? s.json() : (console.error(new Error(`Ошибка загрузки ${r}: ${s.statusText}`)), new Promise((i) => {
181
+ i({});
182
+ })));
183
+ return e.catch((s) => {
184
+ console.error(s);
185
+ }), e;
186
+ }
187
+ };
188
+ /**
189
+ * Конфигурация приложения.
190
+ */
191
+ t(W, "config");
192
+ let D = W;
193
+ const Pe = X("__auth_state_private", () => {
194
+ var e;
195
+ const n = f(Promise.resolve((e = D.getConfig().devMode) == null ? void 0 : e.initAuthBearerToken)), r = f(void 0);
196
+ return {
197
+ /**
198
+ * {@link Promise<string>} для получения ключа доступа к системам.
199
+ */
200
+ accessToken: n,
201
+ /**
202
+ * Функция для обновления ключа доступа к системам.
203
+ */
204
+ accessTokenUpdater: r
205
+ };
206
+ }), Re = X("__auth_state", () => {
207
+ const n = v(() => {
208
+ const s = Pe();
209
+ if (T(s.accessToken) && !T(s.accessTokenUpdater)) {
210
+ const i = s.accessTokenUpdater();
211
+ s.accessToken = i, i.then((o) => {
212
+ s.accessToken = Promise.resolve(o);
213
+ }).catch(C);
214
+ }
215
+ return s.accessToken;
216
+ });
217
+ function r(s) {
218
+ Pe().accessTokenUpdater = s;
219
+ }
220
+ function e() {
221
+ Pe().accessToken = void 0;
222
+ }
223
+ return {
224
+ /**
225
+ * {@link Promise<string>} для получения ключа доступа к системам.
226
+ */
227
+ accessToken: n,
228
+ /**
229
+ * Устанавливает механизм для обновления ключа доступа к системам.
230
+ *
231
+ * @param updater Механизм для обновления ключа доступа к системам.
232
+ */
233
+ setAccessTokenUpdater: r,
234
+ /**
235
+ * Выполняет очистку ключа доступа к системам.
236
+ */
237
+ invalidateAccessToken: e
238
+ };
239
+ });
156
240
  class B {
157
241
  /**
158
242
  * Инициализирует экземпляр класса {@link Identity}.
@@ -169,16 +253,16 @@ class B {
169
253
  * @inheritDoc
170
254
  */
171
255
  t(this, "guid");
172
- this.id = r == null ? void 0 : r.id, U(this.id) && (U(e) ? typeof (r == null ? void 0 : r.id) == "number" ? this.id = -1 : typeof (r == null ? void 0 : r.id) == "string" && (this.id = "") : this.id = e), this.guid = (r == null ? void 0 : r.guid) ?? "";
256
+ this.id = r == null ? void 0 : r.id, T(this.id) && (T(e) ? typeof (r == null ? void 0 : r.id) == "number" ? this.id = -1 : typeof (r == null ? void 0 : r.id) == "string" && (this.id = "") : this.id = e), this.guid = (r == null ? void 0 : r.guid) ?? "";
173
257
  }
174
258
  /**
175
259
  * Возвращает признак, что это новая запись.
176
260
  */
177
261
  isNewRec() {
178
- return typeof this.id == "number" ? this.id === -1 : typeof this.id == "string" ? this.id === "" : U(this.id);
262
+ return typeof this.id == "number" ? this.id === -1 : typeof this.id == "string" ? this.id === "" : T(this.id);
179
263
  }
180
264
  }
181
- class a extends B {
265
+ class $ extends B {
182
266
  /**
183
267
  * Инициализирует экземпляр класса {@link NamedIdentity}.
184
268
  *
@@ -193,7 +277,7 @@ class a extends B {
193
277
  this.name = (e == null ? void 0 : e.name) ?? "";
194
278
  }
195
279
  }
196
- class Qe extends a {
280
+ class Qe extends $ {
197
281
  /**
198
282
  * Инициализирует экземпляр класса {@link CatalogableItem}.
199
283
  *
@@ -216,7 +300,7 @@ class Qe extends a {
216
300
  this.slug = (e == null ? void 0 : e.slug) ?? "", this.code = (e == null ? void 0 : e.code) ?? "";
217
301
  }
218
302
  }
219
- class Te extends Qe {
303
+ class be extends Qe {
220
304
  /**
221
305
  * Инициализирует экземпляр класса {@link PrimaryCatalogableItem}.
222
306
  *
@@ -231,7 +315,7 @@ class Te extends Qe {
231
315
  this.isPrimary = (e == null ? void 0 : e.isPrimary) ?? !1;
232
316
  }
233
317
  }
234
- class ne extends Te {
318
+ class oe extends be {
235
319
  /**
236
320
  * Инициализирует экземпляр класса {@link BaseCategory}.
237
321
  *
@@ -255,11 +339,11 @@ class ne extends Te {
255
339
  * Список коэффициентов пересчёта из валют в рубли в формате ключ значение.
256
340
  */
257
341
  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]) => [mr(s), i])) : void 0;
342
+ 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]) => [fr(s), i])) : void 0;
259
343
  }
260
344
  }
261
345
  var Ye = /* @__PURE__ */ ((n) => (n.K0 = "k0", n.K1 = "k1", n.K2 = "k2", n.K3 = "k3", n.K4 = "k4", n.Retail = "retail", n))(Ye || {});
262
- class C extends a {
346
+ class w extends $ {
263
347
  /**
264
348
  * Инициализирует экземпляр класса {@link Reference}.
265
349
  *
@@ -278,15 +362,15 @@ class C extends a {
278
362
  this.description = e == null ? void 0 : e.description, this.slug = e == null ? void 0 : e.slug;
279
363
  }
280
364
  }
281
- class we extends C {
365
+ class ye extends w {
282
366
  /**
283
367
  * Возвращает значение справочника коэффициента розничной цены.
284
368
  */
285
369
  static getRetailPriceCoefficient() {
286
- return { id: -2, slug: Ye.Retail, name: "Розн. цена", guid: "", isNewRec: fr(!0) };
370
+ return { id: -2, slug: Ye.Retail, name: "Розн. цена", guid: "", isNewRec: yr(!0) };
287
371
  }
288
372
  }
289
- class xe {
373
+ class de {
290
374
  /**
291
375
  * Инициализирует экземпляр класса {@link ProductPriceCoefficient}.
292
376
  *
@@ -313,7 +397,7 @@ class xe {
313
397
  * Признак того, что указанный коэффициент доступен текущему пользователю только для просмотра.
314
398
  */
315
399
  t(this, "readOnly");
316
- this.coefficient = new we(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;
400
+ 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
401
  }
318
402
  }
319
403
  class Xe {
@@ -334,9 +418,9 @@ class Xe {
334
418
  this.lat = (r == null ? void 0 : r.lat) ?? 0, this.long = (r == null ? void 0 : r.long) ?? 0;
335
419
  }
336
420
  }
337
- class J extends C {
421
+ class J extends w {
338
422
  }
339
- class Ce extends C {
423
+ class we extends w {
340
424
  /**
341
425
  * Инициализирует экземпляр класса {@link Warehouse}.
342
426
  *
@@ -368,7 +452,7 @@ class Ce extends C {
368
452
  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 Xe(e == null ? void 0 : e.coordinates);
369
453
  }
370
454
  }
371
- class dr {
455
+ class xr {
372
456
  /**
373
457
  * Инициализирует экземпляр класса {@link StockCount}.
374
458
  *
@@ -383,46 +467,9 @@ class dr {
383
467
  * Количество остатков товара на складе.
384
468
  */
385
469
  t(this, "count");
386
- this.warehouse = new Ce(r == null ? void 0 : r.warehouse), this.count = (r == null ? void 0 : r.count) ?? 0;
470
+ this.warehouse = new we(r == null ? void 0 : r.warehouse), this.count = (r == null ? void 0 : r.count) ?? 0;
387
471
  }
388
472
  }
389
- const W = class W {
390
- /**
391
- * Инициализирует и возвращает конфигурацию приложения.
392
- *
393
- * @param config Данные для первоначальной инициализации.
394
- */
395
- static init(r) {
396
- W.config = r;
397
- }
398
- /**
399
- * Возвращает текущую конфигурацию приложения.
400
- */
401
- // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
402
- static getConfig() {
403
- if (yr(W.config))
404
- throw new Error("Config is undefined. Please set config by AppConfigProvider.init().");
405
- return W.config;
406
- }
407
- /**
408
- * Выполняет загрузку конфигурации по указанному пути.
409
- *
410
- * @param path Путь к конфигурации.
411
- */
412
- static loadRemoteConfig(r = "/config.json") {
413
- const e = fetch(r).then((s) => s.ok ? s.json() : (console.error(new Error(`Ошибка загрузки ${r}: ${s.statusText}`)), new Promise((i) => {
414
- i({});
415
- })));
416
- return e.catch((s) => {
417
- console.error(s);
418
- }), e;
419
- }
420
- };
421
- /**
422
- * Конфигурация приложения.
423
- */
424
- t(W, "config");
425
- let $ = W;
426
473
  class Nr extends Qe {
427
474
  /**
428
475
  * Инициализирует экземпляр класса {@link HiddenCatalogableItem}.
@@ -461,14 +508,14 @@ class Or {
461
508
  this.image = `${e ?? ""}${r.image}`, this.preview = `${e ?? ""}${r.preview}`, this.isDefault = r.isDefault;
462
509
  }
463
510
  }
464
- class b extends Nr {
511
+ class _ extends Nr {
465
512
  /**
466
513
  * Инициализирует экземпляр класса {@link Product}.
467
514
  *
468
515
  * @param data Данные для первоначальной инициализации.
469
516
  */
470
517
  constructor(e) {
471
- var i, o, c, u;
518
+ var i, o, c, p;
472
519
  super(e);
473
520
  /**
474
521
  * Артикул производителя/поставщика.
@@ -546,16 +593,16 @@ class b extends Nr {
546
593
  * Список коэффициентов цен на продукт.
547
594
  */
548
595
  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 dr(p))) ?? [], this.currencySignature = (e == null ? void 0 : e.currencySignature) ?? "", this.type = "product";
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 Te({ ...s, isPrimary: !0 }), this.categories = [this.category]), e != null && e.categories && (this.categories = e.categories.map((p) => new Te(p))), this.images = ((c = e == null ? void 0 : e.images) == null ? void 0 : c.map((p) => new Or(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 xe(p))) ?? [], e && "codeNumber" in e && !e.code && (this.code = e == null ? void 0 : e.codeNumber);
596
+ 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) ? 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((u) => new xr(u))) ?? [], this.currencySignature = (e == null ? void 0 : e.currencySignature) ?? "", this.type = "product";
597
+ const s = (e == null ? void 0 : e.category) ?? ((o = e == null ? void 0 : e.categories) == null ? void 0 : o.find((u) => u.isPrimary));
598
+ s && (this.category = new be({ ...s, isPrimary: !0 }), this.categories = [this.category]), e != null && e.categories && (this.categories = e.categories.map((u) => new be(u))), this.images = ((c = e == null ? void 0 : e.images) == null ? void 0 : c.map((u) => new Or(u, D.getConfig().http.mediaUrl))) ?? [], this.properties = (e == null ? void 0 : e.properties) ?? {}, this.retailCost = e == null ? void 0 : e.retailCost, this.retailCostRub = e == null ? void 0 : e.retailCostRub, this.priceCoefficients = ((p = e == null ? void 0 : e.priceCoefficients) == null ? void 0 : p.map((u) => new de(u))) ?? [], e && "codeNumber" in e && !e.code && (this.code = e == null ? void 0 : e.codeNumber);
552
599
  }
553
600
  /**
554
601
  * Возвращает признак, что это измеряемый товар.
555
602
  */
556
603
  getIsMeasurable() {
557
604
  var s;
558
- const e = (s = $.getConfig().catalog) == null ? void 0 : s.products.units;
605
+ const e = (s = D.getConfig().catalog) == null ? void 0 : s.products.units;
559
606
  return [...(e == null ? void 0 : e.linear) ?? ["пог.м.", "м."], ...(e == null ? void 0 : e.square) ?? ["м2"]].includes(this.unit);
560
607
  }
561
608
  /**
@@ -623,7 +670,7 @@ class qr extends B {
623
670
  * Признак того, что позиция является дополнительной продажей.
624
671
  */
625
672
  t(this, "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 && wr(e.configuratorParams), this.isAdditionalSale = e.isAdditionalSale;
673
+ this.product = new _(e == null ? void 0 : e.product), this.quantity = e.quantity ?? 0, this.marker = e.marker, this.category = e.category ?? new oe(), this.height = e.height, this.length = e.length, this.width = e.width, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams && wr(e.configuratorParams), this.isAdditionalSale = e.isAdditionalSale;
627
674
  }
628
675
  }
629
676
  class Ur extends qr {
@@ -676,7 +723,7 @@ class Ur extends qr {
676
723
  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
724
  }
678
725
  }
679
- class ce {
726
+ class le {
680
727
  /**
681
728
  * Инициализирует экземпляр класса {@link Cart}.
682
729
  *
@@ -698,128 +745,7 @@ class ce {
698
745
  this.items = r.items.map((e) => new Ur(e)), this.resultSum = r.resultSum, this.directionsSum = r.directionsSum;
699
746
  }
700
747
  }
701
- class S extends C {
702
- }
703
- class Ze extends a {
704
- /**
705
- * Инициализирует экземпляр класса {@link UserCommonInfo}.
706
- *
707
- * @param data Данные для первоначальной инициализации.
708
- */
709
- constructor(e) {
710
- super(e);
711
- /**
712
- * Номер телефона. В формате "79203436527" или "+79203436527".
713
- */
714
- t(this, "phone");
715
- /**
716
- * Адрес электронной почты.
717
- */
718
- t(this, "email");
719
- /**
720
- * Признак подписки на новости и информационные сообщения.
721
- */
722
- t(this, "getNews");
723
- /**
724
- * Направление продаж.
725
- */
726
- t(this, "salesDirection");
727
- /**
728
- * Дата и время регистрации пользователя.
729
- */
730
- t(this, "createdAt");
731
- /**
732
- * Дата и время последней аутентификации пользователя.
733
- */
734
- t(this, "lastLoginAt");
735
- /**
736
- * Признак активности учетной записи пользователя.
737
- */
738
- t(this, "isActive");
739
- 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;
740
- }
741
- }
742
- class Gr extends Ze {
743
- /**
744
- * Инициализирует экземпляр класса {@link User}.
745
- *
746
- * @param data Данные для первоначальной инициализации.
747
- */
748
- constructor(e) {
749
- super(e);
750
- /**
751
- * Тип пользователя.
752
- */
753
- t(this, "type");
754
- /**
755
- * Признак того, что менеджер может работать с рекламациями.
756
- */
757
- t(this, "canDoReclamations");
758
- /**
759
- * URI путь к фотографии пользователя.
760
- */
761
- t(this, "photo");
762
- 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;
763
- }
764
- }
765
- class Mr extends h {
766
- /**
767
- * Возвращает данные о текущем пользователе.
768
- */
769
- // eslint-disable-next-line class-methods-use-this
770
- getCurrentUser() {
771
- return this.get("/internal/users/info", {}, (r) => new Gr(r.data));
772
- }
773
- }
774
- const le = ye("__user_state_private", () => {
775
- var s;
776
- const n = y({}), r = y(Promise.resolve((s = $.getConfig().devMode) == null ? void 0 : s.initAuthBearerToken)), e = y(void 0);
777
- return {
778
- /**
779
- * Список загружаемых/загруженных на данный момент значений.
780
- */
781
- dataLoaderList: n,
782
- /**
783
- * {@link Promise<string>} для получения ключа доступа к системам.
784
- */
785
- accessTokenPromise: r,
786
- /**
787
- * Данные о текущем пользователе.
788
- */
789
- currentUser: e
790
- };
791
- }), Ue = ye("user_state", () => {
792
- const n = v({
793
- get() {
794
- return le().accessTokenPromise;
795
- },
796
- set(s) {
797
- le().accessTokenPromise = s;
798
- }
799
- }), r = () => {
800
- le().accessTokenPromise = void 0;
801
- }, e = v(() => {
802
- const s = le();
803
- return !s.currentUser && !s.dataLoaderList.currentUser && (s.dataLoaderList.currentUser = !0, h.getInstance(Mr).getCurrentUser().then((i) => {
804
- s.currentUser = i;
805
- }).catch(w).finally(w)), s.currentUser;
806
- });
807
- return {
808
- /**
809
- * {@link Promise<string>} для получения ключа доступа к системам.
810
- */
811
- accessTokenPromise: n,
812
- /**
813
- * Выполняет очистку ключа доступа к системам.
814
- */
815
- invalidateJwtAccessToken: r,
816
- /**
817
- * Данные о текущем пользователе.
818
- */
819
- currentUser: e
820
- };
821
- });
822
- class ke {
748
+ class xe {
823
749
  /**
824
750
  * Инициализирует экземпляр указанного класса.
825
751
  *
@@ -838,7 +764,7 @@ class ke {
838
764
  return new r(e);
839
765
  }
840
766
  }
841
- const _ = class _ {
767
+ const S = class S {
842
768
  /**
843
769
  * Инициализирует экземпляр класса {@link HttpRequester}.
844
770
  */
@@ -850,7 +776,7 @@ const _ = class _ {
850
776
  /**
851
777
  * Базовый URL путь для выполнения запросов.
852
778
  */
853
- t(this, "baseUrl", `${$.getConfig().http.portalApiUrl}/api`);
779
+ t(this, "baseUrl", `${D.getConfig().http.portalApiUrl}/api`);
854
780
  /**
855
781
  * Обработчик ошибок выполнения запросов текущего экземпляра класса.
856
782
  *
@@ -858,7 +784,11 @@ const _ = class _ {
858
784
  * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
859
785
  * @param disableNotifications Признак необходимости отключить уведомления об ошибках.
860
786
  */
861
- t(this, "errorResponseHandler", w);
787
+ t(this, "errorResponseHandler", C);
788
+ /**
789
+ * Список идентификаторов обработчиков запросов для возможности отключить те или иные обработчики.
790
+ */
791
+ t(this, "interceptorIds", { request: {}, response: {} });
862
792
  /**
863
793
  * Перехватчик запроса для установки URL для выполнения запросов.
864
794
  *
@@ -872,8 +802,8 @@ const _ = class _ {
872
802
  */
873
803
  // eslint-disable-next-line class-methods-use-this
874
804
  t(this, "authRequestInterceptor", async (r) => {
875
- const e = await Ue().accessTokenPromise;
876
- return e && r.headers.set("Authorization", `Bearer ${e}`), r;
805
+ let e;
806
+ return T(Re().accessToken) || (e = await Re().accessToken), e && r.headers.set("Authorization", `Bearer ${e}`), r;
877
807
  });
878
808
  /**
879
809
  * Перехватчик запроса для преобразования данных запроса.
@@ -881,7 +811,7 @@ const _ = class _ {
881
811
  * @param request Данные запроса.
882
812
  */
883
813
  // eslint-disable-next-line class-methods-use-this
884
- t(this, "dataConverterRequestInterceptor", (r) => (r.method && (r.method === "get" && r.params && (r.params = qe(r.params)), ["put", "patch", "post"].includes(Cr(r.method)) && r.data && (r.data = qe(r.data))), r));
814
+ t(this, "dataConverterRequestInterceptor", (r) => (r.method && (r.method === "get" && r.params && (r.params = Ue(r.params)), ["put", "patch", "post"].includes(Cr(r.method)) && r.data && (r.data = Ue(r.data))), r));
885
815
  /**
886
816
  * Перехватчик ошибок ответов на запрос.
887
817
  *
@@ -890,7 +820,7 @@ const _ = class _ {
890
820
  t(this, "authErrorsResponseInterceptors", (r) => {
891
821
  var s;
892
822
  const e = r.rawError ? (s = r.rawError) == null ? void 0 : s.config : void 0;
893
- return r.status === 401 ? !e || e.__isRetryRequest ? Promise.reject(r) : (Ue().invalidateJwtAccessToken(), e.__isRetryRequest = !0, this.httpClient(e)) : Promise.reject(r);
823
+ return r.status === 401 ? !e || e.__isRetryRequest ? Promise.reject(r) : (Re().invalidateAccessToken(), e.__isRetryRequest = !0, this.httpClient(e)) : Promise.reject(r);
894
824
  });
895
825
  /**
896
826
  * Перехватчик ответа для преобразования данных ответа на запрос.
@@ -898,18 +828,23 @@ const _ = class _ {
898
828
  * @param response Данные ответа на запрос.
899
829
  */
900
830
  // eslint-disable-next-line class-methods-use-this
901
- t(this, "dataConverterResponseInterceptor", (r) => (r.data && (r.data = Ie(r.data)), r));
902
- const r = $.getConfig().version;
903
- this.errorResponseHandler = _.defaultErrorsResponseHandler, this.httpClient = kr.create({
831
+ t(this, "dataConverterResponseInterceptor", (r) => (r.data && (r.data = ke(r.data)), r));
832
+ const r = D.getConfig().version;
833
+ this.errorResponseHandler = S.defaultErrorsResponseHandler, this.httpClient = dr.create({
904
834
  headers: {
905
- "APP-VERSION": `${r.name} (${r.version}, ${z(r.date, $.getConfig().dateFormats.uiDate)})`,
835
+ "APP-VERSION": `${r.name} (${r.version}, ${z(r.date, D.getConfig().dateFormats.uiDate)})`,
906
836
  Accept: "application/json",
907
837
  "Content-Type": "application/json"
908
838
  }
909
- }), this.httpClient.interceptors.request.use(this.setBaseUrlRequestInterceptor, (e) => Promise.reject(e)), 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(
839
+ }), this.interceptorIds.request.setBaseUrlRequestInterceptor = this.httpClient.interceptors.request.use(this.setBaseUrlRequestInterceptor, (e) => Promise.reject(e)), this.interceptorIds.request.authRequestInterceptor = this.httpClient.interceptors.request.use(this.authRequestInterceptor, (e) => Promise.reject(e)), this.interceptorIds.request.dataConverterRequestInterceptor = this.httpClient.interceptors.request.use(
840
+ this.dataConverterRequestInterceptor,
841
+ (e) => Promise.reject(e)
842
+ ), this.interceptorIds.response.convertHttpErrorResponseInterceptor = this.httpClient.interceptors.response.use(
843
+ (e) => e,
844
+ (e) => S.convertHttpErrorResponse(e)
845
+ ), this.interceptorIds.response.authErrorsResponseInterceptor = this.httpClient.interceptors.response.use((e) => e, this.authErrorsResponseInterceptors), this.interceptorIds.response.dataConverterResponseInterceptor = this.httpClient.interceptors.response.use(
910
846
  this.dataConverterResponseInterceptor,
911
- // Возвращаем изменённую структуру сообщения об ошибке.
912
- (e) => _.convertHttpErrorResponse(e)
847
+ (e) => Promise.reject(e)
913
848
  );
914
849
  }
915
850
  /**
@@ -918,7 +853,7 @@ const _ = class _ {
918
853
  * @param handler Ссылка на функцию-обработчик ошибок.
919
854
  */
920
855
  static setDefaultErrorsResponseHandler(r) {
921
- _.defaultErrorsResponseHandler = r;
856
+ S.defaultErrorsResponseHandler = r;
922
857
  }
923
858
  /**
924
859
  * Возвращает экземпляр объекта текущего класса.
@@ -926,7 +861,7 @@ const _ = class _ {
926
861
  * @param type Тип данных, которыми оперирует метод.
927
862
  */
928
863
  static getInstance(r) {
929
- return Object.prototype.hasOwnProperty.call(_.instances, r.name) || (_.instances[r.name] = ke.simpleInstanceInitializer(r)), _.instances[r.name];
864
+ return Object.prototype.hasOwnProperty.call(S.instances, r.name) || (S.instances[r.name] = xe.simpleInstanceInitializer(r)), S.instances[r.name];
930
865
  }
931
866
  /**
932
867
  * Конвертирует данные ошибки HTTP запроса в более упрощённую и часто используемую форму.
@@ -934,17 +869,20 @@ const _ = class _ {
934
869
  * @param error Данные об ошибке.
935
870
  */
936
871
  static convertHttpErrorResponse(r) {
937
- var s, i;
938
- const e = r == null ? void 0 : r.response;
939
- return Promise.reject({
940
- status: (e == null ? void 0 : e.status) ?? 0,
941
- statusText: (e == null ? void 0 : e.statusText) ?? "Unknown",
942
- message: ((s = e == null ? void 0 : e.data) == null ? void 0 : s.message) ?? "Unknown Error. Probably network error.",
943
- errors: (i = e == null ? void 0 : e.data) == null ? void 0 : i.errors,
944
- headers: (e == null ? void 0 : e.headers) ?? {},
945
- data: e == null ? void 0 : e.data,
946
- rawError: r
947
- });
872
+ var e, s;
873
+ if (!T(r.request) || !T(r.response)) {
874
+ const i = r == null ? void 0 : r.response;
875
+ return Promise.reject({
876
+ status: (i == null ? void 0 : i.status) ?? 0,
877
+ statusText: (i == null ? void 0 : i.statusText) ?? "Unknown",
878
+ message: ((e = i == null ? void 0 : i.data) == null ? void 0 : e.message) ?? "Unknown Error. Probably network error.",
879
+ errors: (s = i == null ? void 0 : i.data) == null ? void 0 : s.errors,
880
+ headers: (i == null ? void 0 : i.headers) ?? {},
881
+ data: i == null ? void 0 : i.data,
882
+ rawError: r
883
+ });
884
+ }
885
+ return Promise.reject(r);
948
886
  }
949
887
  /**
950
888
  * Выполняет запрос с указанными параметрами.
@@ -1021,15 +959,15 @@ const _ = class _ {
1021
959
  * Экземпляр объекта текущего класса.
1022
960
  */
1023
961
  // eslint-disable-next-line no-use-before-define
1024
- t(_, "instances", {}), /**
962
+ t(S, "instances", {}), /**
1025
963
  * Базовый обработчик ошибок выполнения запросов.
1026
964
  *
1027
965
  * @param error Данные об ошибке.
1028
966
  * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
1029
967
  * @param disableNotifications Признак необходимости отключить уведомления об ошибках.
1030
968
  */
1031
- t(_, "defaultErrorsResponseHandler", w);
1032
- let h = _;
969
+ t(S, "defaultErrorsResponseHandler", C);
970
+ let h = S;
1033
971
  class $t extends h {
1034
972
  /**
1035
973
  * Возвращает содержимое корзины указанного клиента.
@@ -1039,7 +977,7 @@ class $t extends h {
1039
977
  * @see /doc/api/internal#/Корзина/api_internal_client_cart_get
1040
978
  */
1041
979
  getCart(r) {
1042
- return this.get(`internal/clients/${r.id}/cart`, {}, (e) => new ce(e.data));
980
+ return this.get(`internal/clients/${r.id}/cart`, {}, (e) => new le(e.data));
1043
981
  }
1044
982
  /**
1045
983
  * Удаляет всё содержимое корзины.
@@ -1077,7 +1015,7 @@ class $t extends h {
1077
1015
  isAdditionalSale: e.isAdditionalSale,
1078
1016
  ...e.configuratorParams
1079
1017
  },
1080
- (i) => new ce(i.data),
1018
+ (i) => new le(i.data),
1081
1019
  s
1082
1020
  );
1083
1021
  }
@@ -1107,7 +1045,7 @@ class $t extends h {
1107
1045
  isAdditionalSale: e.isAdditionalSale,
1108
1046
  ...e.configuratorParams
1109
1047
  },
1110
- (i) => new ce(i.data),
1048
+ (i) => new le(i.data),
1111
1049
  s
1112
1050
  );
1113
1051
  }
@@ -1130,11 +1068,11 @@ class $t extends h {
1130
1068
  * @see /doc/api/internal#/Корзина/api_internal_client_cart_add_products_from_csv
1131
1069
  */
1132
1070
  addCartItemFromCSV(r) {
1133
- return this.post(`internal/clients/${r.id}/cart/add-products-from-csv`, {}, (e) => new ce(e.data));
1071
+ return this.post(`internal/clients/${r.id}/cart/add-products-from-csv`, {}, (e) => new le(e.data));
1134
1072
  }
1135
1073
  }
1136
- var Fr = /* @__PURE__ */ ((n) => (n.m2Cost = "m2Cost", n.percent = "percent", n.value = "value", n))(Fr || {}), de = /* @__PURE__ */ ((n) => (n.Discount = "discount", n.PriceTemplate = "price_template", n.ClientPrice = "client_price", n.Product = "product", n))(de || {}), 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 || {});
1137
- class q extends ne {
1074
+ var Gr = /* @__PURE__ */ ((n) => (n.m2Cost = "m2Cost", n.percent = "percent", n.value = "value", n))(Gr || {}), Ne = /* @__PURE__ */ ((n) => (n.Discount = "discount", n.PriceTemplate = "price_template", n.ClientPrice = "client_price", n.Product = "product", n))(Ne || {}), Mr = /* @__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))(Mr || {});
1075
+ class U extends oe {
1138
1076
  /**
1139
1077
  * Инициализирует экземпляр класса {@link Category}.
1140
1078
  *
@@ -1151,10 +1089,10 @@ class q extends ne {
1151
1089
  * Список продуктов категории.
1152
1090
  */
1153
1091
  t(this, "products");
1154
- 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));
1092
+ this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new U(o)), this.products = (i = e == null ? void 0 : e.products) == null ? void 0 : i.map((o) => new _(o));
1155
1093
  }
1156
1094
  }
1157
- class er extends a {
1095
+ class Ze extends $ {
1158
1096
  /**
1159
1097
  * Инициализирует экземпляр класса {@link UpdatableNamedIdentity}.
1160
1098
  *
@@ -1166,10 +1104,10 @@ class er extends a {
1166
1104
  * Дата и время последнего изменения.
1167
1105
  */
1168
1106
  t(this, "updatedAt");
1169
- this.updatedAt = m(e == null ? void 0 : e.updatedAt) ? f(e.updatedAt) : e == null ? void 0 : e.updatedAt;
1107
+ this.updatedAt = m(e == null ? void 0 : e.updatedAt) ? y(e.updatedAt) : e == null ? void 0 : e.updatedAt;
1170
1108
  }
1171
1109
  }
1172
- class Hr extends er {
1110
+ class Fr extends Ze {
1173
1111
  /**
1174
1112
  * Инициализирует экземпляр класса {@link UpdatableNamedIdentity}.
1175
1113
  *
@@ -1181,10 +1119,10 @@ class Hr extends er {
1181
1119
  * Дата и время последнего удаления.
1182
1120
  */
1183
1121
  t(this, "deletedAt");
1184
- this.deletedAt = m(e == null ? void 0 : e.deletedAt) ? f(e.deletedAt) : e == null ? void 0 : e.deletedAt;
1122
+ this.deletedAt = m(e == null ? void 0 : e.deletedAt) ? y(e.deletedAt) : e == null ? void 0 : e.deletedAt;
1185
1123
  }
1186
1124
  }
1187
- class at {
1125
+ class Tt {
1188
1126
  /**
1189
1127
  * Возвращает актуальные и не просроченные данные из хранилища.
1190
1128
  *
@@ -1195,7 +1133,7 @@ class at {
1195
1133
  if (e)
1196
1134
  try {
1197
1135
  const s = JSON.parse(e);
1198
- if (Dr(f(s.availableFor) || Ke(), /* @__PURE__ */ new Date()))
1136
+ if (ar(y(s.availableFor) || Ke(), /* @__PURE__ */ new Date()))
1199
1137
  return s.data ?? {};
1200
1138
  } catch {
1201
1139
  localStorage.removeItem(r);
@@ -1218,7 +1156,7 @@ class at {
1218
1156
  );
1219
1157
  }
1220
1158
  }
1221
- class G extends a {
1159
+ class G extends $ {
1222
1160
  /**
1223
1161
  * Инициализирует экземпляр класса {@link UserShortInfo}.
1224
1162
  *
@@ -1233,7 +1171,7 @@ class G extends a {
1233
1171
  this.type = e == null ? void 0 : e.type;
1234
1172
  }
1235
1173
  }
1236
- class zr extends a {
1174
+ class Br extends $ {
1237
1175
  /**
1238
1176
  * Инициализирует экземпляр класса {@link DiscountShortInfo}.
1239
1177
  *
@@ -1269,10 +1207,10 @@ class zr extends a {
1269
1207
  * Дата и время удаления.
1270
1208
  */
1271
1209
  t(this, "deletedAt");
1272
- 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;
1210
+ 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) ? 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 = m(e == null ? void 0 : e.deletedAt) ? y(e.deletedAt) : e == null ? void 0 : e.deletedAt;
1273
1211
  }
1274
1212
  }
1275
- class j extends er {
1213
+ class j extends Ze {
1276
1214
  /**
1277
1215
  * Инициализирует экземпляр класса {@link PriceTemplate}.
1278
1216
  *
@@ -1288,10 +1226,10 @@ class j extends er {
1288
1226
  * Дата и время создания шаблона.
1289
1227
  */
1290
1228
  t(this, "createdAt");
1291
- 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();
1229
+ this.description = (e == null ? void 0 : e.description) ?? "", this.createdAt = m(e == null ? void 0 : e.createdAt) ? y(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date();
1292
1230
  }
1293
1231
  }
1294
- class K extends b {
1232
+ class K extends _ {
1295
1233
  /**
1296
1234
  * Инициализирует экземпляр класса {@link ClientProduct}.
1297
1235
  *
@@ -1327,10 +1265,10 @@ class K extends b {
1327
1265
  * Признак того, что указанный продукт входит в список избранных продуктов клиента.
1328
1266
  */
1329
1267
  t(this, "isFavorite");
1330
- this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.costSource = (e == null ? void 0 : e.costSource) ?? de.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;
1268
+ 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 Br(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;
1331
1269
  }
1332
1270
  }
1333
- class jr {
1271
+ class Hr {
1334
1272
  /**
1335
1273
  * Инициализирует экземпляр класса {@link ContactLinks}.
1336
1274
  *
@@ -1348,7 +1286,9 @@ class jr {
1348
1286
  this.phone = /^\d+$/.test(r.phone ?? "") ? `+${r.phone}` : r.phone, this.email = r.email;
1349
1287
  }
1350
1288
  }
1351
- class re extends a {
1289
+ class I extends w {
1290
+ }
1291
+ class te extends $ {
1352
1292
  /**
1353
1293
  * Инициализирует экземпляр класса {@link ManagerCommon}.
1354
1294
  *
@@ -1359,7 +1299,7 @@ class re extends a {
1359
1299
  /**
1360
1300
  * Направление продаж.
1361
1301
  */
1362
- t(this, "salesDirection", new S());
1302
+ t(this, "salesDirection", new I());
1363
1303
  /**
1364
1304
  * URI путь к фотографии пользователя.
1365
1305
  */
@@ -1372,10 +1312,10 @@ class re extends a {
1372
1312
  * Признак того, что менеджер является основным для клиента.
1373
1313
  */
1374
1314
  t(this, "isDefault");
1375
- 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));
1315
+ e && (this.salesDirection = new I(e.salesDirection), this.photo = e.photo, e.contacts && (this.contacts = new Hr(e.contacts)), e.isDefault !== void 0 && (this.isDefault = e.isDefault));
1376
1316
  }
1377
1317
  }
1378
- class ve extends re {
1318
+ class Ce extends te {
1379
1319
  /**
1380
1320
  * Инициализирует экземпляр класса {@link Manager}.
1381
1321
  *
@@ -1406,7 +1346,7 @@ class ve extends re {
1406
1346
  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;
1407
1347
  }
1408
1348
  }
1409
- class Wr extends ne {
1349
+ class zr extends oe {
1410
1350
  /**
1411
1351
  * Инициализирует экземпляр класса {@link BaseClientCategory}.
1412
1352
  *
@@ -1434,10 +1374,10 @@ class Wr extends ne {
1434
1374
  * Данные о менеджере за которым закреплена категория.
1435
1375
  */
1436
1376
  t(this, "manager");
1437
- 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 ve(e.manager) : void 0;
1377
+ 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;
1438
1378
  }
1439
1379
  }
1440
- class he extends Wr {
1380
+ class he extends zr {
1441
1381
  /**
1442
1382
  * Инициализирует экземпляр класса {@link ClientCategory}.
1443
1383
  *
@@ -1457,7 +1397,7 @@ class he extends Wr {
1457
1397
  this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new he(o)), this.products = (i = e == null ? void 0 : e.products) == null ? void 0 : i.map((o) => new K(o));
1458
1398
  }
1459
1399
  }
1460
- class rr {
1400
+ class er {
1461
1401
  /**
1462
1402
  * Инициализирует экземпляр класса {@link PriceTemplateICatalogableItem}.
1463
1403
  *
@@ -1472,10 +1412,10 @@ class rr {
1472
1412
  * Процент, который прибавляется к значению выбранного коэффициента.
1473
1413
  */
1474
1414
  t(this, "increasePercent");
1475
- this.priceCoefficient = (r == null ? void 0 : r.priceCoefficient) && new we(r.priceCoefficient), this.increasePercent = r == null ? void 0 : r.increasePercent;
1415
+ this.priceCoefficient = (r == null ? void 0 : r.priceCoefficient) && new ye(r.priceCoefficient), this.increasePercent = r == null ? void 0 : r.increasePercent;
1476
1416
  }
1477
1417
  }
1478
- class Re extends rr {
1418
+ class Ae extends er {
1479
1419
  /**
1480
1420
  * Инициализирует экземпляр класса {@link PriceTemplateProduct}.
1481
1421
  *
@@ -1487,12 +1427,12 @@ class Re extends rr {
1487
1427
  * Базовые данные о продукте.
1488
1428
  */
1489
1429
  t(this, "productCategory");
1490
- this.productCategory = new ne(e == null ? void 0 : e.productCategory);
1430
+ this.productCategory = new oe(e == null ? void 0 : e.productCategory);
1491
1431
  }
1492
1432
  }
1493
- class Q extends C {
1433
+ class Q extends w {
1494
1434
  }
1495
- class te extends C {
1435
+ class se extends w {
1496
1436
  /**
1497
1437
  * Инициализирует экземпляр класса {@link Region}.
1498
1438
  *
@@ -1507,7 +1447,7 @@ class te extends C {
1507
1447
  e && (this.country = new Q(e.country));
1508
1448
  }
1509
1449
  }
1510
- class Ne extends C {
1450
+ class Oe extends w {
1511
1451
  /**
1512
1452
  * Инициализирует экземпляр класса {@link CityWithRegionAndCountry}.
1513
1453
  *
@@ -1518,11 +1458,50 @@ class Ne extends C {
1518
1458
  /**
1519
1459
  * Данные о регионе, в котором расположен город.
1520
1460
  */
1521
- t(this, "region", new te());
1522
- e && (this.region = new te(e.region));
1461
+ t(this, "region", new se());
1462
+ e && (this.region = new se(e.region));
1463
+ }
1464
+ }
1465
+ class rr extends $ {
1466
+ /**
1467
+ * Инициализирует экземпляр класса {@link UserCommonInfo}.
1468
+ *
1469
+ * @param data Данные для первоначальной инициализации.
1470
+ */
1471
+ constructor(e) {
1472
+ super(e);
1473
+ /**
1474
+ * Номер телефона. В формате "79203436527" или "+79203436527".
1475
+ */
1476
+ t(this, "phone");
1477
+ /**
1478
+ * Адрес электронной почты.
1479
+ */
1480
+ t(this, "email");
1481
+ /**
1482
+ * Признак подписки на новости и информационные сообщения.
1483
+ */
1484
+ t(this, "getNews");
1485
+ /**
1486
+ * Направление продаж.
1487
+ */
1488
+ t(this, "salesDirection");
1489
+ /**
1490
+ * Дата и время регистрации пользователя.
1491
+ */
1492
+ t(this, "createdAt");
1493
+ /**
1494
+ * Дата и время последней аутентификации пользователя.
1495
+ */
1496
+ t(this, "lastLoginAt");
1497
+ /**
1498
+ * Признак активности учетной записи пользователя.
1499
+ */
1500
+ t(this, "isActive");
1501
+ 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 I(e.salesDirection) : void 0, this.createdAt = m(e == null ? void 0 : e.createdAt) ? y(e.createdAt) : e == null ? void 0 : e.createdAt, this.lastLoginAt = m(e == null ? void 0 : e.lastLoginAt) ? y(e.lastLoginAt) : e == null ? void 0 : e.lastLoginAt, this.isActive = (e == null ? void 0 : e.isActive) ?? !1;
1523
1502
  }
1524
1503
  }
1525
- class oe extends Ze {
1504
+ class ce extends rr {
1526
1505
  /**
1527
1506
  * Инициализирует экземпляр класса {@link Client}.
1528
1507
  *
@@ -1564,10 +1543,10 @@ class oe extends Ze {
1564
1543
  * Список менеджеров клиента.
1565
1544
  */
1566
1545
  t(this, "managers");
1567
- 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 Ne(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))) ?? [];
1546
+ this.salesDirection = new I(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 Oe(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 te(i))) ?? [];
1568
1547
  }
1569
1548
  }
1570
- class X extends B {
1549
+ class Z extends B {
1571
1550
  /**
1572
1551
  * Инициализирует новый экземпляр класса.
1573
1552
  *
@@ -1591,10 +1570,10 @@ class X extends B {
1591
1570
  * Данные шаблона прайс-листа.
1592
1571
  */
1593
1572
  t(this, "priceTemplate");
1594
- 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 oe(e == null ? void 0 : e.client), this.priceTemplate = new j(e == null ? void 0 : e.priceTemplate);
1573
+ this.createdAt = m(e == null ? void 0 : e.createdAt) ? y(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.deletedAt = m(e == null ? void 0 : e.deletedAt) ? y(e.deletedAt) : e == null ? void 0 : e.deletedAt, this.client = new ce(e == null ? void 0 : e.client), this.priceTemplate = new j(e == null ? void 0 : e.priceTemplate);
1595
1574
  }
1596
1575
  }
1597
- class Ae extends rr {
1576
+ class ae extends er {
1598
1577
  /**
1599
1578
  * Инициализирует экземпляр класса {@link PriceTemplateProduct}.
1600
1579
  *
@@ -1606,12 +1585,12 @@ class Ae extends rr {
1606
1585
  * Базовые данные о продукте.
1607
1586
  */
1608
1587
  t(this, "product");
1609
- this.product = new b(e == null ? void 0 : e.product);
1588
+ this.product = new _(e == null ? void 0 : e.product);
1610
1589
  }
1611
1590
  }
1612
- class tr extends C {
1591
+ class tr extends w {
1613
1592
  }
1614
- class Z extends a {
1593
+ class ee extends $ {
1615
1594
  /**
1616
1595
  * Инициализирует экземпляр класса {@link Property}.
1617
1596
  *
@@ -1650,10 +1629,10 @@ class H {
1650
1629
  * Может быть строкой, числом, boolean, диапазоном или JSON объектом.
1651
1630
  */
1652
1631
  t(this, "value");
1653
- this.property = new Z(r == null ? void 0 : r.property), this.value = (r == null ? void 0 : r.value) ?? "";
1632
+ this.property = new ee(r == null ? void 0 : r.property), this.value = (r == null ? void 0 : r.value) ?? "";
1654
1633
  }
1655
1634
  }
1656
- class N {
1635
+ class O {
1657
1636
  /**
1658
1637
  * Инициализирует экземпляр класса {@link DatePeriod}.
1659
1638
  *
@@ -1668,10 +1647,10 @@ class N {
1668
1647
  * Окончание периода.
1669
1648
  */
1670
1649
  t(this, "to");
1671
- 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;
1650
+ this.from = m(r == null ? void 0 : r.from) ? y(r.from) : (r == null ? void 0 : r.from) ?? null, this.to = m(r == null ? void 0 : r.to) ? y(r.to) : (r == null ? void 0 : r.to) ?? null;
1672
1651
  }
1673
1652
  }
1674
- class Tt {
1653
+ class bt {
1675
1654
  /**
1676
1655
  * Инициализирует экземпляр класса {@link TemplatesListFilters}.
1677
1656
  *
@@ -1693,12 +1672,12 @@ class Tt {
1693
1672
  /**
1694
1673
  * Период создания.
1695
1674
  */
1696
- t(this, "createdAt", new N());
1675
+ t(this, "createdAt", new O());
1697
1676
  /**
1698
1677
  * Период изменения.
1699
1678
  */
1700
- t(this, "updatedAt", new N());
1701
- 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);
1679
+ t(this, "updatedAt", new O());
1680
+ this.id = r == null ? void 0 : r.id, this.name = r == null ? void 0 : r.name, this.description = r == null ? void 0 : r.description, this.createdAt = new O(r == null ? void 0 : r.createdAt), this.updatedAt = new O(r == null ? void 0 : r.updatedAt);
1702
1681
  }
1703
1682
  /**
1704
1683
  * Выполняет сброс указанного фильтра в значение по умолчанию.
@@ -1729,21 +1708,21 @@ class Tt {
1729
1708
  var e, s, i, o;
1730
1709
  const r = {};
1731
1710
  return Object.keys(this).forEach((c) => {
1732
- const u = this[c];
1711
+ const p = this[c];
1733
1712
  // eslint-disable-next-line prettier/prettier
1734
- U(u) || m(u) && u.trim().length === 0 || Se(u.isNewRec) && u.isNewRec() || (r[c] = u);
1713
+ T(p) || m(p) && p.trim().length === 0 || Ie(p.isNewRec) && p.isNewRec() || (r[c] = p);
1735
1714
  }), !((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;
1736
1715
  }
1737
1716
  }
1738
- class Vr extends C {
1717
+ class jr extends w {
1739
1718
  }
1740
- class sr extends C {
1719
+ class sr extends w {
1741
1720
  }
1742
- class bt extends C {
1721
+ class _t extends w {
1743
1722
  }
1744
- class Er extends C {
1723
+ class Wr extends w {
1745
1724
  }
1746
- class ge extends a {
1725
+ class ge extends $ {
1747
1726
  /**
1748
1727
  * Инициализирует экземпляр класса {@link Currency}.
1749
1728
  *
@@ -1762,8 +1741,8 @@ class ge extends a {
1762
1741
  e && (this.signature = e.signature ?? "", this.symbol = e.symbol ?? "");
1763
1742
  }
1764
1743
  }
1765
- var T = /* @__PURE__ */ ((n) => (n.Person = "individual", n.Ic = "entrepreneur", n.UlR = "legal", n.UlNr = "non_resident_legal", n))(T || {});
1766
- class M extends C {
1744
+ var b = /* @__PURE__ */ ((n) => (n.Person = "individual", n.Ic = "entrepreneur", n.UlR = "legal", n.UlNr = "non_resident_legal", n))(b || {});
1745
+ class M extends w {
1767
1746
  /**
1768
1747
  * Возвращает сгенерированную запись-описание физического лица.
1769
1748
  */
@@ -1771,24 +1750,24 @@ class M extends C {
1771
1750
  return new M({
1772
1751
  id: 1,
1773
1752
  guid: "",
1774
- slug: T.Person,
1753
+ slug: b.Person,
1775
1754
  name: ""
1776
1755
  });
1777
1756
  }
1778
1757
  }
1779
- class Jr extends C {
1758
+ class Vr extends w {
1780
1759
  }
1781
- class Kr extends C {
1760
+ class Er extends w {
1782
1761
  }
1783
- class Y extends C {
1762
+ class Y extends w {
1784
1763
  }
1785
- class Qr extends C {
1764
+ class Jr extends w {
1786
1765
  }
1787
- class Yr extends C {
1766
+ class Kr extends w {
1788
1767
  }
1789
- class ir extends C {
1768
+ class ir extends w {
1790
1769
  }
1791
- class nr extends C {
1770
+ class nr extends w {
1792
1771
  }
1793
1772
  const V = class V extends h {
1794
1773
  /**
@@ -1800,7 +1779,7 @@ const V = class V extends h {
1800
1779
  * Время кэширования данных ответов на запросы (секунд).
1801
1780
  */
1802
1781
  t(this, "responseDataCacheTimeout");
1803
- this.responseDataCacheTimeout = $.getConfig().http.responseDataCacheTimeout;
1782
+ this.responseDataCacheTimeout = D.getConfig().http.responseDataCacheTimeout;
1804
1783
  }
1805
1784
  /**
1806
1785
  * Возвращает кэшированные данные.
@@ -1822,7 +1801,7 @@ const V = class V extends h {
1822
1801
  */
1823
1802
  cacheResponse(e, s) {
1824
1803
  V.responseDataCache.set(e, {
1825
- validTo: $r(/* @__PURE__ */ new Date(), this.responseDataCacheTimeout),
1804
+ validTo: Dr(/* @__PURE__ */ new Date(), this.responseDataCacheTimeout),
1826
1805
  val: s
1827
1806
  });
1828
1807
  }
@@ -1837,9 +1816,9 @@ const V = class V extends h {
1837
1816
  */
1838
1817
  // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
1839
1818
  getTypedDataArrayRequester(e, s, i = !1, o = {}) {
1840
- const c = s + (Le(o) ? "" : ` >>> ${JSON.stringify(o)}`), u = i ? V.getCachedResponse(c) : void 0;
1841
- return u ? Promise.resolve(u) : this.get(s, o).then((p) => {
1842
- const R = p.map((D) => ke.instanceInitializer(e, D));
1819
+ const c = s + (Le(o) ? "" : ` >>> ${JSON.stringify(o)}`), p = i ? V.getCachedResponse(c) : void 0;
1820
+ return p ? Promise.resolve(p) : this.get(s, o).then((u) => {
1821
+ const R = u.map((a) => xe.instanceInitializer(e, a));
1843
1822
  return i && R && this.cacheResponse(s, R), R;
1844
1823
  });
1845
1824
  }
@@ -1848,8 +1827,8 @@ const V = class V extends h {
1848
1827
  * Кэш результатов запросов.
1849
1828
  */
1850
1829
  t(V, "responseDataCache", /* @__PURE__ */ new Map());
1851
- let se = V;
1852
- class A extends se {
1830
+ let ie = V;
1831
+ class A extends ie {
1853
1832
  /**
1854
1833
  * Возвращает {@link Promise} для получения данных указанного справочника.
1855
1834
  *
@@ -1858,7 +1837,7 @@ class A extends se {
1858
1837
  * и использовать в случае аналогичных запросов.
1859
1838
  */
1860
1839
  getReference(r, e = !1) {
1861
- return this.getTypedDataArrayRequester(Vr, `/internal/references/${r}`, e);
1840
+ return this.getTypedDataArrayRequester(jr, `/internal/references/${r}`, e);
1862
1841
  }
1863
1842
  /**
1864
1843
  * Возвращает {@link Promise} для получения справочника данных о канале
@@ -1871,7 +1850,7 @@ class A extends se {
1871
1850
  * Возвращает {@link Promise} для получения справочника должностей контактных лиц.
1872
1851
  */
1873
1852
  getContactPositions() {
1874
- return this.getTypedDataArrayRequester(Er, "/internal/references/contact-position", !0);
1853
+ return this.getTypedDataArrayRequester(Wr, "/internal/references/contact-position", !0);
1875
1854
  }
1876
1855
  /**
1877
1856
  * Возвращает {@link Promise} для получения справочника списка валют.
@@ -1896,19 +1875,19 @@ class A extends se {
1896
1875
  * Возвращает {@link Promise} для получения справочника данных статусов оплаты заказов.
1897
1876
  */
1898
1877
  getOrderPaymentStatuses() {
1899
- return this.getTypedDataArrayRequester(Jr, "/public/references/order-payment-status", !0);
1878
+ return this.getTypedDataArrayRequester(Vr, "/public/references/order-payment-status", !0);
1900
1879
  }
1901
1880
  /**
1902
1881
  * Возвращает {@link Promise} для получения справочника данных статусов заказов.
1903
1882
  */
1904
1883
  getOrderStatuses() {
1905
- return this.getTypedDataArrayRequester(Kr, "/public/references/order-status", !0);
1884
+ return this.getTypedDataArrayRequester(Er, "/public/references/order-status", !0);
1906
1885
  }
1907
1886
  /**
1908
1887
  * Возвращает {@link Promise} для получения справочника данных типов оплаты заказов.
1909
1888
  */
1910
1889
  getPaymentTypes() {
1911
- return this.getTypedDataArrayRequester(Qr, "/public/references/payment-type", !0);
1890
+ return this.getTypedDataArrayRequester(Jr, "/public/references/payment-type", !0);
1912
1891
  }
1913
1892
  /**
1914
1893
  * Возвращает {@link Promise} для получения справочника типов ресурсов.
@@ -1920,7 +1899,7 @@ class A extends se {
1920
1899
  * Возвращает {@link Promise} для получения справочника данных направлений продаж.
1921
1900
  */
1922
1901
  getSalesDirections() {
1923
- return this.getTypedDataArrayRequester(S, "/public/references/sales-direction", !0);
1902
+ return this.getTypedDataArrayRequester(I, "/public/references/sales-direction", !0);
1924
1903
  }
1925
1904
  /**
1926
1905
  * Возвращает {@link Promise} для получения справочника данных об источнике первичного интереса.
@@ -1934,7 +1913,7 @@ class A extends se {
1934
1913
  * @param term Терм поиска.
1935
1914
  */
1936
1915
  searchCity(r) {
1937
- return this.getTypedDataArrayRequester(Ne, `/internal/references/city-with-region-and-country/search?term=${r}`);
1916
+ return this.getTypedDataArrayRequester(Oe, `/internal/references/city-with-region-and-country/search?term=${r}`);
1938
1917
  }
1939
1918
  /**
1940
1919
  * Выполняет поиск данных о регионах по терму в названии.
@@ -1942,7 +1921,7 @@ class A extends se {
1942
1921
  * @param term Терм поиска.
1943
1922
  */
1944
1923
  searchRegion(r) {
1945
- return this.getTypedDataArrayRequester(te, `/internal/references/region-with-country/search?term=${r}`);
1924
+ return this.getTypedDataArrayRequester(se, `/internal/references/region-with-country/search?term=${r}`);
1946
1925
  }
1947
1926
  /**
1948
1927
  * Выполняет поиск данных о странах по терму в названии.
@@ -1959,32 +1938,347 @@ class A extends se {
1959
1938
  return this.getTypedDataArrayRequester(J, "/internal/references/delivery-type", !0);
1960
1939
  }
1961
1940
  /**
1962
- * Возвращает {@link Promise} для получения справочника складов.
1941
+ * Возвращает {@link Promise} для получения справочника складов.
1942
+ */
1943
+ getWarehouses() {
1944
+ return this.getTypedDataArrayRequester(we, "/public/references/warehouse", !0);
1945
+ }
1946
+ /**
1947
+ * Возвращает {@link Promise} для получения справочника типов свойств.
1948
+ */
1949
+ getPropertyTypes() {
1950
+ return this.getTypedDataArrayRequester(tr, "/internal/references/property-type", !0);
1951
+ }
1952
+ /**
1953
+ * Возвращает {@link Promise} для получения справочника коэффициентов цен.
1954
+ */
1955
+ getPriceCoefficients() {
1956
+ return this.getTypedDataArrayRequester(ye, "/internal/references/price-coefficient", !0);
1957
+ }
1958
+ /**
1959
+ * Возвращает {@link Promise} для получения справочника типов файлов продуктов/категорий.
1960
+ */
1961
+ getProductFileType() {
1962
+ return this.getTypedDataArrayRequester(Kr, "/public/references/product-file-type", !0);
1963
+ }
1964
+ }
1965
+ class Qr extends ie {
1966
+ /**
1967
+ * Возвращает {@link Promise} для получения справочника списка менеджеров.
1968
+ */
1969
+ async getManagers() {
1970
+ const r = "/internal/managers", e = ie.getCachedResponse(r);
1971
+ if (e)
1972
+ return e;
1973
+ const i = (await this.get(r)).data.map((o) => xe.instanceInitializer(Ce, o));
1974
+ return this.cacheResponse(r, i), i;
1975
+ }
1976
+ }
1977
+ const P = X("__references_private", () => {
1978
+ const n = f({}), r = f(void 0), e = f(void 0), s = f(void 0), i = f(void 0), o = f(void 0), c = f(void 0), p = f(void 0), u = f(void 0), R = f(void 0), a = f(void 0), L = f(void 0), k = f(void 0), d = f(void 0), x = f(void 0), N = f(void 0), q = f(void 0), l = f(void 0);
1979
+ return {
1980
+ /**
1981
+ * Список загружаемых/загруженных на данный момент значений.
1982
+ */
1983
+ dataLoaderList: n,
1984
+ /**
1985
+ * Справочник каналов первичного интереса.
1986
+ */
1987
+ channelPrimaryInterestReference: r,
1988
+ /**
1989
+ * Справочник должностей контактных лиц.
1990
+ */
1991
+ contactPositionsReference: e,
1992
+ /**
1993
+ * Справочник валют.
1994
+ */
1995
+ currencyReference: s,
1996
+ /**
1997
+ * Справочник типов доставки.
1998
+ */
1999
+ deliveryTypeReference: i,
2000
+ /**
2001
+ * Список менеджеров.
2002
+ */
2003
+ managersList: o,
2004
+ /**
2005
+ * Справочник организационно-правовых форм.
2006
+ */
2007
+ opfReference: c,
2008
+ /**
2009
+ * Справочник статусов оплаты заказа.
2010
+ */
2011
+ orderPaymentStatusReference: p,
2012
+ /**
2013
+ * Справочник статусов заказов.
2014
+ */
2015
+ orderStatusReference: u,
2016
+ /**
2017
+ * Справочник типов оплаты заказов.
2018
+ */
2019
+ paymentTypeReference: R,
2020
+ /**
2021
+ * Справочник групп партнеров.
2022
+ */
2023
+ partnerGroupReference: a,
2024
+ /**
2025
+ * Справочник типов файлов продукктов/категорий.
2026
+ */
2027
+ productFileTypeReference: L,
2028
+ /**
2029
+ * Справочник типов ресурсов.
2030
+ */
2031
+ resourceTypesReference: k,
2032
+ /**
2033
+ * Справочник направлений продаж.
2034
+ */
2035
+ salesDirectionsReference: d,
2036
+ /**
2037
+ * Справочник источников первичного интереса.
2038
+ */
2039
+ sourcePrimaryInterestReference: x,
2040
+ /**
2041
+ * Справочник складов.
2042
+ */
2043
+ warehousesReference: N,
2044
+ /**
2045
+ * Справочник типов свойств.
2046
+ */
2047
+ propertyTypesReference: q,
2048
+ /**
2049
+ * Справочник коэффициентов цен.
2050
+ */
2051
+ priceCoefficientsReference: l
2052
+ };
2053
+ }), St = X("references", () => {
2054
+ const n = v(() => {
2055
+ const l = P();
2056
+ return !l.channelPrimaryInterestReference && !l.dataLoaderList.channelPrimaryInterestReference && (l.dataLoaderList.channelPrimaryInterestReference = !0, h.getInstance(A).getChannelPrimaryInterest().then((g) => {
2057
+ l.channelPrimaryInterestReference = g;
2058
+ }).catch(C)), l.channelPrimaryInterestReference;
2059
+ }), r = v(() => {
2060
+ const l = P();
2061
+ return !l.contactPositionsReference && !l.dataLoaderList.contactPositionsReference && (l.dataLoaderList.contactPositionsReference = !0, h.getInstance(A).getContactPositions().then((g) => {
2062
+ l.contactPositionsReference = g;
2063
+ }).catch(C)), l.contactPositionsReference;
2064
+ }), e = v(() => {
2065
+ const l = P();
2066
+ return !l.currencyReference && !l.dataLoaderList.currencyReference && (l.dataLoaderList.currencyReference = !0, h.getInstance(A).getCurrency().then((g) => {
2067
+ l.currencyReference = g;
2068
+ }).catch(C)), l.currencyReference;
2069
+ }), s = v(() => {
2070
+ const l = P();
2071
+ return !l.opfReference && !l.dataLoaderList.opfReference && (l.dataLoaderList.opfReference = !0, h.getInstance(A).getOpf().then((g) => {
2072
+ l.opfReference = g;
2073
+ }).catch(C)), l.opfReference;
2074
+ }), i = v(() => {
2075
+ const l = P();
2076
+ return !l.orderPaymentStatusReference && !l.dataLoaderList.orderPaymentStatusReference && (l.dataLoaderList.orderPaymentStatusReference = !0, h.getInstance(A).getOrderPaymentStatuses().then((g) => {
2077
+ l.orderPaymentStatusReference = g;
2078
+ }).catch(C)), l.orderPaymentStatusReference;
2079
+ }), o = v(() => {
2080
+ const l = P();
2081
+ return !l.orderStatusReference && !l.dataLoaderList.orderStatusReference && (l.dataLoaderList.orderStatusReference = !0, h.getInstance(A).getOrderStatuses().then((g) => {
2082
+ l.orderStatusReference = g;
2083
+ }).catch(C)), l.orderStatusReference;
2084
+ }), c = v(() => {
2085
+ const l = P();
2086
+ return !l.paymentTypeReference && !l.dataLoaderList.paymentTypeReference && (l.dataLoaderList.paymentTypeReference = !0, h.getInstance(A).getPaymentTypes().then((g) => {
2087
+ l.paymentTypeReference = g;
2088
+ }).catch(C)), l.paymentTypeReference;
2089
+ }), p = v(() => {
2090
+ const l = P();
2091
+ return !l.partnerGroupReference && !l.dataLoaderList.partnerGroupReference && (l.dataLoaderList.partnerGroupReference = !0, h.getInstance(A).getPartnerGroup().then((g) => {
2092
+ l.partnerGroupReference = g;
2093
+ }).catch(C)), l.partnerGroupReference;
2094
+ }), u = v(() => {
2095
+ const l = P();
2096
+ return !l.productFileTypeReference && !l.dataLoaderList.productFileTypeReference && (l.dataLoaderList.productFileTypeReference = !0, h.getInstance(A).getProductFileType().then((g) => {
2097
+ l.productFileTypeReference = g;
2098
+ }).catch(C)), l.productFileTypeReference;
2099
+ }), R = v(() => {
2100
+ const l = P();
2101
+ return !l.resourceTypesReference && !l.dataLoaderList.resourceTypesReference && (l.dataLoaderList.resourceTypesReference = !0, h.getInstance(A).getResourceTypes().then((g) => {
2102
+ l.resourceTypesReference = g;
2103
+ }).catch(C)), l.resourceTypesReference;
2104
+ }), a = v(() => {
2105
+ const l = P();
2106
+ return !l.salesDirectionsReference && !l.dataLoaderList.salesDirectionsReference && (l.dataLoaderList.salesDirectionsReference = !0, h.getInstance(A).getSalesDirections().then((g) => {
2107
+ l.salesDirectionsReference = g;
2108
+ }).catch(C)), l.salesDirectionsReference;
2109
+ }), L = v(() => {
2110
+ const l = P();
2111
+ return !l.sourcePrimaryInterestReference && !l.dataLoaderList.sourcePrimaryInterestReference && (l.dataLoaderList.sourcePrimaryInterestReference = !0, h.getInstance(A).getSourcePrimaryInterest().then((g) => {
2112
+ l.sourcePrimaryInterestReference = g;
2113
+ }).catch(C)), l.sourcePrimaryInterestReference;
2114
+ }), k = v(() => {
2115
+ const l = P();
2116
+ return !l.deliveryTypeReference && !l.dataLoaderList.deliveryTypeReference && (l.dataLoaderList.deliveryTypeReference = !0, h.getInstance(A).getDeliveryTypes().then((g) => {
2117
+ l.deliveryTypeReference = g;
2118
+ }).catch(C)), l.deliveryTypeReference;
2119
+ }), d = v(() => {
2120
+ const l = P();
2121
+ return !l.managersList && !l.dataLoaderList.managersList && (l.dataLoaderList.managersList = !0, h.getInstance(Qr).getManagers().then((g) => {
2122
+ l.managersList = g;
2123
+ }).catch(C)), l.managersList;
2124
+ }), x = v(() => {
2125
+ const l = P();
2126
+ return !l.warehousesReference && !l.dataLoaderList.warehousesReference && (l.dataLoaderList.warehousesReference = !0, h.getInstance(A).getWarehouses().then((g) => {
2127
+ l.warehousesReference = g;
2128
+ }).catch(C)), l.warehousesReference;
2129
+ }), N = v(() => {
2130
+ const l = P();
2131
+ return !l.propertyTypesReference && !l.dataLoaderList.propertyTypesReference && (l.dataLoaderList.propertyTypesReference = !0, h.getInstance(A).getPropertyTypes().then((g) => {
2132
+ l.propertyTypesReference = g;
2133
+ }).catch(C)), l.propertyTypesReference;
2134
+ }), q = v(() => {
2135
+ const l = P();
2136
+ return !l.priceCoefficientsReference && !l.dataLoaderList.priceCoefficientsReference && (l.dataLoaderList.priceCoefficientsReference = !0, h.getInstance(A).getPriceCoefficients().then((g) => {
2137
+ l.priceCoefficientsReference = g;
2138
+ }).catch(C)), l.priceCoefficientsReference;
2139
+ });
2140
+ return {
2141
+ /**
2142
+ * Справочник каналов первичного интереса.
2143
+ */
2144
+ channelPrimaryInterestsReference: n,
2145
+ /**
2146
+ * Справочник должностей контактных лиц.
2147
+ */
2148
+ contactPositionsReference: r,
2149
+ /**
2150
+ * Справочник валют.
2151
+ */
2152
+ currencyReference: e,
2153
+ /**
2154
+ * Справочник организационно-правовых форм.
2155
+ */
2156
+ opfReference: s,
2157
+ /**
2158
+ * Справочник статусов оплаты заказа.
2159
+ */
2160
+ orderPaymentStatusReference: i,
2161
+ /**
2162
+ * Справочник статусов заказов.
2163
+ */
2164
+ orderStatusReference: o,
2165
+ /**
2166
+ * Справочник типов оплаты заказов.
2167
+ */
2168
+ paymentTypeReference: c,
2169
+ /**
2170
+ * Справочник групп партнеров.
2171
+ */
2172
+ partnerGroupsReference: p,
2173
+ /**
2174
+ * Справочник типов файлов продуктов/категорий.
2175
+ */
2176
+ productFilesTypesReference: u,
2177
+ /**
2178
+ * Справочник типов ресурсов.
2179
+ */
2180
+ resourceTypesReference: R,
2181
+ /**
2182
+ * Справочник направлений продаж.
2183
+ */
2184
+ salesDirectionsReference: a,
2185
+ /**
2186
+ * Справочник каналов первичного интереса.
2187
+ */
2188
+ sourcePrimaryInterestsReference: L,
2189
+ /**
2190
+ * Справочник типов доставки.
2191
+ */
2192
+ deliveryTypeReference: k,
2193
+ /**
2194
+ * Список менеджеров.
2195
+ */
2196
+ managersList: d,
2197
+ /**
2198
+ * Справочник складов.
2199
+ */
2200
+ warehousesReference: x,
2201
+ /**
2202
+ * Справочник типов свойств.
2203
+ */
2204
+ propertyTypesReference: N,
2205
+ /**
2206
+ * Справочник коэффициентов цен.
2207
+ */
2208
+ priceCoefficientsReference: q
2209
+ };
2210
+ });
2211
+ var Yr = /* @__PURE__ */ ((n) => (n.Admin = "admin", n.Manager = "manager", n.Operator = "operator", n.Client = "client", n.Guest = "guest", n))(Yr || {});
2212
+ class Xr extends rr {
2213
+ /**
2214
+ * Инициализирует экземпляр класса {@link User}.
2215
+ *
2216
+ * @param data Данные для первоначальной инициализации.
2217
+ */
2218
+ constructor(e) {
2219
+ super(e);
2220
+ /**
2221
+ * Тип пользователя.
2222
+ */
2223
+ t(this, "type");
2224
+ /**
2225
+ * Признак того, что менеджер может работать с рекламациями.
2226
+ */
2227
+ t(this, "canDoReclamations");
2228
+ /**
2229
+ * URI путь к фотографии пользователя.
2230
+ */
2231
+ t(this, "photo");
2232
+ 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;
2233
+ }
2234
+ }
2235
+ class It extends h {
2236
+ /**
2237
+ * Инициализирует экземпляр класса {@link UserAuthDataProvider}.
1963
2238
  */
1964
- getWarehouses() {
1965
- return this.getTypedDataArrayRequester(Ce, "/public/references/warehouse", !0);
2239
+ constructor() {
2240
+ super(), this.baseUrl = `${D.getConfig().http.portalApiUrl}/api`, this.interceptorIds.request.authRequestInterceptor && this.httpClient.interceptors.request.eject(this.interceptorIds.request.authRequestInterceptor);
1966
2241
  }
1967
2242
  /**
1968
- * Возвращает {@link Promise} для получения справочника типов свойств.
2243
+ * Функция для получения обновленных токенов доступа.
2244
+ *
2245
+ * @deprecated Данный механизм будет полностью удален при полном переходе на Vue приложение.
1969
2246
  */
1970
- getPropertyTypes() {
1971
- return this.getTypedDataArrayRequester(tr, "/internal/references/property-type", !0);
2247
+ getAccessToken() {
2248
+ return this.get("internal/users/current-tokens").then((r) => r.accessToken);
1972
2249
  }
2250
+ }
2251
+ class Zr extends h {
1973
2252
  /**
1974
- * Возвращает {@link Promise} для получения справочника коэффициентов цен.
2253
+ * Возвращает данные о текущем пользователе.
1975
2254
  */
1976
- getPriceCoefficients() {
1977
- return this.getTypedDataArrayRequester(we, "/internal/references/price-coefficient", !0);
2255
+ // eslint-disable-next-line class-methods-use-this
2256
+ getCurrentUser() {
2257
+ return this.get("/internal/users/info", {}, (r) => new Xr(r.data));
1978
2258
  }
2259
+ }
2260
+ const et = X("__user_state_private", () => {
2261
+ const n = f({}), r = f(void 0);
2262
+ return {
2263
+ /**
2264
+ * Список загружаемых/загруженных на данный момент значений.
2265
+ */
2266
+ dataLoaderList: n,
2267
+ /**
2268
+ * Данные о текущем пользователе.
2269
+ */
2270
+ currentUser: r
2271
+ };
2272
+ }), Lt = X("user_state", () => ({
1979
2273
  /**
1980
- * Возвращает {@link Promise} для получения справочника типов файлов продуктов/категорий.
2274
+ * Данные о текущем пользователе.
1981
2275
  */
1982
- getProductFileType() {
1983
- return this.getTypedDataArrayRequester(Yr, "/public/references/product-file-type", !0);
1984
- }
1985
- }
1986
- var Xr = /* @__PURE__ */ ((n) => (n.Admin = "admin", n.Manager = "manager", n.Operator = "operator", n.Client = "client", n.Guest = "guest", n))(Xr || {});
1987
- class Zr {
2276
+ currentUser: v(async () => {
2277
+ const r = et();
2278
+ return !r.currentUser && !r.dataLoaderList.currentUser && (r.dataLoaderList.currentUser = !0, r.currentUser = await h.getInstance(Zr).getCurrentUser()), r.currentUser;
2279
+ })
2280
+ }));
2281
+ class rt {
1988
2282
  /**
1989
2283
  * Инициализирует экземпляр класса {@link ProductPriceHistory}.
1990
2284
  *
@@ -2027,7 +2321,7 @@ class Zr {
2027
2321
  * Данные о валюте.
2028
2322
  */
2029
2323
  t(this, "currency");
2030
- 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 ge(r.currency) : void 0;
2324
+ this.cost = r.cost, this.costDate = m(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 ge(r.currency) : void 0;
2031
2325
  }
2032
2326
  }
2033
2327
  class Ge {
@@ -2045,10 +2339,10 @@ class Ge {
2045
2339
  * Список рекомендованных категорий продуктов.
2046
2340
  */
2047
2341
  t(this, "productCategories", []);
2048
- 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)));
2342
+ r != null && r.products && (this.products = r.products.map((e) => new _(e))), r != null && r.productCategories && (this.productCategories = r.productCategories.map((e) => new U(e)));
2049
2343
  }
2050
2344
  }
2051
- class ee extends a {
2345
+ class re extends $ {
2052
2346
  /**
2053
2347
  * Инициализирует экземпляр класса {@link PricingRole}.
2054
2348
  *
@@ -2102,10 +2396,10 @@ class Me {
2102
2396
  * Минимальный коэффициент цены.
2103
2397
  */
2104
2398
  t(this, "minCoefficient");
2105
- this.role = new ee(r == null ? void 0 : r.role), this.category = new ne(r == null ? void 0 : r.category), this.minCoefficient = new we(r == null ? void 0 : r.minCoefficient);
2399
+ this.role = new re(r == null ? void 0 : r.role), this.category = new oe(r == null ? void 0 : r.category), this.minCoefficient = new ye(r == null ? void 0 : r.minCoefficient);
2106
2400
  }
2107
2401
  }
2108
- class et {
2402
+ class tt {
2109
2403
  /**
2110
2404
  * Инициализирует экземпляр класса {@link DeviceTypeResolutionConfig}.
2111
2405
  *
@@ -2127,7 +2421,7 @@ class et {
2127
2421
  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;
2128
2422
  }
2129
2423
  }
2130
- class rt {
2424
+ class st {
2131
2425
  /**
2132
2426
  * Инициализирует экземпляр класса {@link HttpParamsConfig}.
2133
2427
  *
@@ -2149,7 +2443,7 @@ class rt {
2149
2443
  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;
2150
2444
  }
2151
2445
  }
2152
- class tt {
2446
+ class it {
2153
2447
  /**
2154
2448
  * Инициализирует экземпляр класса {@link SentryConfig}.
2155
2449
  *
@@ -2194,7 +2488,7 @@ class tt {
2194
2488
  }, this.additionalParams = (r == null ? void 0 : r.additionalParams) ?? {};
2195
2489
  }
2196
2490
  }
2197
- class st {
2491
+ class nt {
2198
2492
  /**
2199
2493
  * Инициализирует экземпляр класса {@link VersionConfig}.
2200
2494
  *
@@ -2213,10 +2507,10 @@ class st {
2213
2507
  * Текущая версия приложения.
2214
2508
  */
2215
2509
  t(this, "version");
2216
- 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";
2510
+ this.date = m(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";
2217
2511
  }
2218
2512
  }
2219
- class _t {
2513
+ class kt {
2220
2514
  /**
2221
2515
  * Инициализирует экземпляр класса {@link AppBaseConfig}.
2222
2516
  *
@@ -2256,17 +2550,17 @@ class _t {
2256
2550
  */
2257
2551
  t(this, "dateFormats");
2258
2552
  var e, s, i;
2259
- this.environment = (r == null ? void 0 : r.environment) ?? "production", this.devMode = (r == null ? void 0 : r.devMode) ?? {}, this.http = new rt(r == null ? void 0 : r.http), this.deviceTypeByResolution = new et(r == null ? void 0 : r.deviceTypeByResolution), this.sentry = new tt({
2553
+ this.environment = (r == null ? void 0 : r.environment) ?? "production", this.devMode = (r == null ? void 0 : r.devMode) ?? {}, this.http = new st(r == null ? void 0 : r.http), this.deviceTypeByResolution = new tt(r == null ? void 0 : r.deviceTypeByResolution), this.sentry = new it({
2260
2554
  environment: this.environment,
2261
2555
  ...r == null ? void 0 : r.sentry
2262
- }), this.urls = r == null ? void 0 : r.urls, this.version = new st(r == null ? void 0 : r.version), this.dateFormats = {
2556
+ }), this.urls = r == null ? void 0 : r.urls, this.version = new nt(r == null ? void 0 : r.version), this.dateFormats = {
2263
2557
  api: ((e = r == null ? void 0 : r.dateFormats) == null ? void 0 : e.api) ?? "yyyy-MM-dd HH:mm:ss",
2264
2558
  uiDate: ((s = r == null ? void 0 : r.dateFormats) == null ? void 0 : s.uiDate) ?? "dd.MM.yyyy",
2265
2559
  uiDateWithTime: ((i = r == null ? void 0 : r.dateFormats) == null ? void 0 : i.uiDateWithTime) ?? "dd.MM.yyyy HH:mm"
2266
2560
  };
2267
2561
  }
2268
2562
  }
2269
- class St extends h {
2563
+ class dt extends h {
2270
2564
  /**
2271
2565
  * Возвращает данные о результатах поиска категорий и товаров.
2272
2566
  *
@@ -2293,11 +2587,11 @@ class St extends h {
2293
2587
  */
2294
2588
  // eslint-disable-next-line class-methods-use-this
2295
2589
  getPriceExportLink(r = "csv", e = !1, s = void 0, i = void 0) {
2296
- let c = `${$.getConfig().http.portalApiUrl}/api/internal/price/export?format=${r}&show_hidden=${e}`;
2590
+ let c = `${D.getConfig().http.portalApiUrl}/api/internal/price/export?format=${r}&show_hidden=${e}`;
2297
2591
  return s && (c += `&category_id=${s}`), i && (c += `&client_id=${i}`), c;
2298
2592
  }
2299
2593
  }
2300
- class Lt extends h {
2594
+ class xt extends h {
2301
2595
  /**
2302
2596
  * Импортирует цены клиента из CSV файла.
2303
2597
  *
@@ -2496,7 +2790,7 @@ class Lt extends h {
2496
2790
  return this.post(`/internal/clients/${r}/price/commercial-offer/send`, e);
2497
2791
  }
2498
2792
  }
2499
- class It extends h {
2793
+ class Nt extends h {
2500
2794
  /**
2501
2795
  * Возвращает список шаблонов прайс-листа привязанных к клиенту.
2502
2796
  *
@@ -2508,7 +2802,7 @@ class It extends h {
2508
2802
  return this.get(
2509
2803
  `/internal/clients/${r}/price/templates`,
2510
2804
  {},
2511
- (e) => e.data.map((s) => new X(s))
2805
+ (e) => e.data.map((s) => new Z(s))
2512
2806
  );
2513
2807
  }
2514
2808
  /**
@@ -2519,7 +2813,7 @@ class It extends h {
2519
2813
  * @see /doc/api/internal#/operations/api_internal_client_price_template_get_active
2520
2814
  */
2521
2815
  getActiveTemplate(r) {
2522
- return this.get(`/internal/clients/${r}/price/templates/active`, {}, (e) => new X(e.data));
2816
+ return this.get(`/internal/clients/${r}/price/templates/active`, {}, (e) => new Z(e.data));
2523
2817
  }
2524
2818
  /**
2525
2819
  * Добавляет связь между клиентом и шаблоном прайс-листа.
@@ -2531,14 +2825,14 @@ class It extends h {
2531
2825
  * @see /doc/api/internal#/operations/api_internal_client_price_template_attach
2532
2826
  */
2533
2827
  attachTemplate(r, e, s) {
2534
- const i = $.getConfig().dateFormats.api;
2828
+ const i = D.getConfig().dateFormats.api;
2535
2829
  return this.post(
2536
2830
  `/internal/clients/${r}/price/templates/${e}`,
2537
2831
  s && {
2538
2832
  startAt: s.startAt && z(s.startAt, i),
2539
2833
  endAt: s.endAt && z(s.endAt, i)
2540
2834
  },
2541
- (o) => new X(o.data),
2835
+ (o) => new Z(o.data),
2542
2836
  {},
2543
2837
  !0
2544
2838
  );
@@ -2565,14 +2859,14 @@ class It extends h {
2565
2859
  * @see /doc/api/internal#/operations/api_internal_client_price_template_change
2566
2860
  */
2567
2861
  changeTemplate(r, e, s, i) {
2568
- const o = $.getConfig().dateFormats.api;
2862
+ const o = D.getConfig().dateFormats.api;
2569
2863
  return this.patch(
2570
2864
  `/internal/clients/${r}/price/templates/${e}/${s}`,
2571
2865
  i && {
2572
2866
  startAt: i.startAt && z(i.startAt, o),
2573
2867
  endAt: i.endAt && z(i.endAt, o)
2574
2868
  },
2575
- (c) => new X(c.data)
2869
+ (c) => new Z(c.data)
2576
2870
  );
2577
2871
  }
2578
2872
  /**
@@ -2588,7 +2882,7 @@ class It extends h {
2588
2882
  return this.delete(`/internal/clients/${r}/price/templates/${e}/${s}`);
2589
2883
  }
2590
2884
  }
2591
- class xt extends h {
2885
+ class Ot extends h {
2592
2886
  /**
2593
2887
  * Возвращает список данных о корневых категориях.
2594
2888
  *
@@ -2602,7 +2896,7 @@ class xt extends h {
2602
2896
  {
2603
2897
  showHidden: r
2604
2898
  },
2605
- (e) => e.data.map((s) => new q(s))
2899
+ (e) => e.data.map((s) => new U(s))
2606
2900
  );
2607
2901
  }
2608
2902
  /**
@@ -2621,7 +2915,7 @@ class xt extends h {
2621
2915
  showHidden: e,
2622
2916
  withNestedCategories: s
2623
2917
  },
2624
- (i) => new q(i.data)
2918
+ (i) => new U(i.data)
2625
2919
  );
2626
2920
  }
2627
2921
  /**
@@ -2630,7 +2924,7 @@ class xt extends h {
2630
2924
  * @param categoryID Идентификатор категории продуктов.
2631
2925
  */
2632
2926
  getPublicCategoryData(r) {
2633
- return this.get(`/public/catalog/categories/${r}`, {}, (e) => new q(e.data));
2927
+ return this.get(`/public/catalog/categories/${r}`, {}, (e) => new U(e.data));
2634
2928
  }
2635
2929
  /**
2636
2930
  * Возвращает список продуктов категории.
@@ -2648,7 +2942,7 @@ class xt extends h {
2648
2942
  showHidden: s,
2649
2943
  withPriceCoefficients: e
2650
2944
  },
2651
- (i) => ue(i.data, (o) => new b(o))
2945
+ (i) => pe(i.data, (o) => new _(o))
2652
2946
  );
2653
2947
  }
2654
2948
  /**
@@ -2661,7 +2955,7 @@ class xt extends h {
2661
2955
  getCategoryProductsCoefficients(r) {
2662
2956
  return this.get(`/internal/catalog/categories/${r}/products/coefficients`, {}, (e) => {
2663
2957
  const { data: s } = e;
2664
- return vr(s, (i) => i.map((o) => new xe(o))), s;
2958
+ return vr(s, (i) => i.map((o) => new de(o))), s;
2665
2959
  });
2666
2960
  }
2667
2961
  /**
@@ -2673,14 +2967,14 @@ class xt extends h {
2673
2967
  publicSimpleSearch(r, e = 10) {
2674
2968
  return new Promise((s, i) => {
2675
2969
  this.get(`/public/catalog/search/simple?limit=${e}&term=${r}`).then((o) => {
2676
- s(o.categories.map((c) => new q(c)));
2970
+ s(o.categories.map((c) => new U(c)));
2677
2971
  }).catch((o) => {
2678
2972
  i(o);
2679
2973
  });
2680
2974
  });
2681
2975
  }
2682
2976
  }
2683
- class kt extends h {
2977
+ class qt extends h {
2684
2978
  /**
2685
2979
  * Возвращает данные об указанном продукте.
2686
2980
  *
@@ -2690,7 +2984,7 @@ class kt extends h {
2690
2984
  * @see /doc/api/internal#/Каталог/api_internal_catalog_products_get
2691
2985
  */
2692
2986
  getProductData(r, e = !1) {
2693
- return this.get(`/internal/catalog/products/${r}`, { withPriceCoefficients: e }, (s) => new b(s.data));
2987
+ return this.get(`/internal/catalog/products/${r}`, { withPriceCoefficients: e }, (s) => new _(s.data));
2694
2988
  }
2695
2989
  /**
2696
2990
  * Возвращает публичные данные об указанном продукте.
@@ -2698,7 +2992,7 @@ class kt extends h {
2698
2992
  * @param productId Идентификатор продукта.
2699
2993
  */
2700
2994
  getPublicProductData(r) {
2701
- return this.get(`/public/catalog/products/${r}`, {}, (e) => new b(e.data));
2995
+ return this.get(`/public/catalog/products/${r}`, {}, (e) => new _(e.data));
2702
2996
  }
2703
2997
  /**
2704
2998
  * Возвращает данные о коэффициентах цен для указанного продукта.
@@ -2711,7 +3005,7 @@ class kt extends h {
2711
3005
  return this.get(
2712
3006
  `/internal/catalog/products/${r}/coefficients`,
2713
3007
  {},
2714
- (e) => ue(e.data, (s) => new xe(s))
3008
+ (e) => pe(e.data, (s) => new de(s))
2715
3009
  );
2716
3010
  }
2717
3011
  /**
@@ -2724,7 +3018,7 @@ class kt extends h {
2724
3018
  */
2725
3019
  getProductPriceHistory(r, e) {
2726
3020
  const s = {};
2727
- return U(e) || (s.clientId = e), this.get(`/internal/price/products/${r}/history`, s, (i) => ue(i.data, (o) => new Zr(o)));
3021
+ return T(e) || (s.clientId = e), this.get(`/internal/price/products/${r}/history`, s, (i) => pe(i.data, (o) => new rt(o)));
2728
3022
  }
2729
3023
  /**
2730
3024
  * Выполняет публичный поиск данных о продуктах по терму.
@@ -2735,14 +3029,14 @@ class kt extends h {
2735
3029
  publicSimpleSearch(r, e = 10) {
2736
3030
  return new Promise((s, i) => {
2737
3031
  this.get(`/public/catalog/search/simple?limit=${e}&term=${r}`).then((o) => {
2738
- s(o.products.map((c) => new b(c)));
3032
+ s(o.products.map((c) => new _(c)));
2739
3033
  }).catch((o) => {
2740
3034
  i(o);
2741
3035
  });
2742
3036
  });
2743
3037
  }
2744
3038
  }
2745
- class dt extends h {
3039
+ class Ut extends h {
2746
3040
  /**
2747
3041
  * Возвращает список данных о корневых категориях указанного клиента.
2748
3042
  *
@@ -2800,11 +3094,11 @@ class dt extends h {
2800
3094
  showHidden: i,
2801
3095
  withPriceCoefficients: s
2802
3096
  },
2803
- (o) => ue(o.data, (c) => new K(c))
3097
+ (o) => pe(o.data, (c) => new K(c))
2804
3098
  );
2805
3099
  }
2806
3100
  }
2807
- class Nt extends h {
3101
+ class Gt extends h {
2808
3102
  /**
2809
3103
  * Возвращает данные об указанном продукте для указанного клиента.
2810
3104
  *
@@ -2825,7 +3119,7 @@ class Nt extends h {
2825
3119
  );
2826
3120
  }
2827
3121
  }
2828
- 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 || {});
3122
+ var qe = /* @__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))(qe || {});
2829
3123
  class Fe {
2830
3124
  /**
2831
3125
  * Инициализирует экземпляр класса {@link FilterItem}.
@@ -2845,7 +3139,7 @@ class Fe {
2845
3139
  * Значение с которым сравнивается поле.
2846
3140
  */
2847
3141
  t(this, "value");
2848
- 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) ?? "";
3142
+ this.field = (r == null ? void 0 : r.field) ?? "", this.op = (r == null ? void 0 : r.op) ?? qe.Equals, this.value = (r == null ? void 0 : r.value) ?? "";
2849
3143
  }
2850
3144
  /**
2851
3145
  * Преобразует фильтр в примитивное представление для API.
@@ -2857,10 +3151,10 @@ class Fe {
2857
3151
  field: this.field,
2858
3152
  op: this.op
2859
3153
  };
2860
- return r.value = Pr(this.value) ? z(this.value, $.getConfig().dateFormats.api) : this.value, r;
3154
+ return r.value = Pr(this.value) ? z(this.value, D.getConfig().dateFormats.api) : this.value, r;
2861
3155
  }
2862
3156
  }
2863
- class ie {
3157
+ class ne {
2864
3158
  /**
2865
3159
  * Инициализирует экземпляр класса {@link FilterGroup}.
2866
3160
  *
@@ -2880,7 +3174,7 @@ class ie {
2880
3174
  */
2881
3175
  t(this, "groups");
2882
3176
  var e, s;
2883
- 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 Fe(i))) ?? [], this.groups = ((s = r == null ? void 0 : r.groups) == null ? void 0 : s.map((i) => new ie(i))) ?? [];
3177
+ 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 Fe(i))) ?? [], this.groups = ((s = r == null ? void 0 : r.groups) == null ? void 0 : s.map((i) => new ne(i))) ?? [];
2884
3178
  }
2885
3179
  /**
2886
3180
  * Преобразует группу фильтров в примитивное представление для API.
@@ -2890,12 +3184,12 @@ class ie {
2890
3184
  toPrimitive() {
2891
3185
  return {
2892
3186
  groupOp: this.groupOp,
2893
- filters: this.filters.map((r) => r instanceof Fe && Se(r.toPrimitive) ? r.toPrimitive() : r),
2894
- groups: this.groups.map((r) => r instanceof ie ? r.toPrimitive() : r)
3187
+ filters: this.filters.map((r) => r instanceof Fe && Ie(r.toPrimitive) ? r.toPrimitive() : r),
3188
+ groups: this.groups.map((r) => r instanceof ne ? r.toPrimitive() : r)
2895
3189
  };
2896
3190
  }
2897
3191
  }
2898
- class Pe extends h {
3192
+ class ve extends h {
2899
3193
  /**
2900
3194
  * Получает пагинированный список данных.
2901
3195
  *
@@ -2907,15 +3201,15 @@ class Pe extends h {
2907
3201
  * @param successHandler Обработчик успешного выполнения запроса.
2908
3202
  * @param disableDefaultNotificationErrorResponseHandler Признак отключения стандартного обработчика ошибок.
2909
3203
  */
2910
- getPaginated(r, e, s, i, o, c, u) {
2911
- let p = {
3204
+ getPaginated(r, e, s, i, o, c, p) {
3205
+ let u = {
2912
3206
  page: (i == null ? void 0 : i.page) ?? 1,
2913
3207
  perPage: (i == null ? void 0 : i.pageSize) ?? 10
2914
3208
  };
2915
- return e && (p.filters = JSON.stringify((e instanceof ie ? e : new ie(e)).toPrimitive())), Le(s) || (p.sort = Je(s) ? s : [s]), o && (p = { ...p, ...o }), this.get(r, p, c, u);
3209
+ return e && (u.filters = JSON.stringify((e instanceof ne ? e : new ne(e)).toPrimitive())), Le(s) || (u.sort = Je(s) ? s : [s]), o && (u = { ...u, ...o }), this.get(r, u, c, p);
2916
3210
  }
2917
3211
  }
2918
- class Ot extends Pe {
3212
+ class Mt extends ve {
2919
3213
  /**
2920
3214
  * Возвращает список шаблонов прайс-листа.
2921
3215
  *
@@ -2987,7 +3281,7 @@ class Ot extends Pe {
2987
3281
  return this.get(
2988
3282
  `/internal/price/templates/${r}/products`,
2989
3283
  {},
2990
- (e) => e.data.map((s) => new Ae(s))
3284
+ (e) => e.data.map((s) => new ae(s))
2991
3285
  );
2992
3286
  }
2993
3287
  /**
@@ -2999,7 +3293,7 @@ class Ot extends Pe {
2999
3293
  * @see /doc/api/internal#/operations/api_internal_catalog_price_template_product_get
3000
3294
  */
3001
3295
  getProductTemplatePrice(r, e) {
3002
- return this.get(`/internal/price/templates/${r}/products/${e}`, {}, (s) => new Ae(s.data));
3296
+ return this.get(`/internal/price/templates/${r}/products/${e}`, {}, (s) => new ae(s.data));
3003
3297
  }
3004
3298
  /**
3005
3299
  * Сохраняет цену на продукт в шаблоне прайс-листа.
@@ -3018,7 +3312,7 @@ class Ot extends Pe {
3018
3312
  price_coefficient_id: (i = s.coefficient) == null ? void 0 : i.id,
3019
3313
  increase_percent: s.value
3020
3314
  },
3021
- (o) => new Ae(o.data)
3315
+ (o) => new ae(o.data)
3022
3316
  );
3023
3317
  }
3024
3318
  /**
@@ -3043,7 +3337,7 @@ class Ot extends Pe {
3043
3337
  return this.get(
3044
3338
  `/internal/price/templates/${r}/categories`,
3045
3339
  {},
3046
- (e) => e.data.map((s) => new Re(s))
3340
+ (e) => e.data.map((s) => new Ae(s))
3047
3341
  );
3048
3342
  }
3049
3343
  /**
@@ -3058,7 +3352,7 @@ class Ot extends Pe {
3058
3352
  return this.get(
3059
3353
  `/internal/price/templates/${r}/categories/${e}`,
3060
3354
  {},
3061
- (s) => new Re(s.data)
3355
+ (s) => new Ae(s.data)
3062
3356
  );
3063
3357
  }
3064
3358
  /**
@@ -3084,7 +3378,7 @@ class Ot extends Pe {
3084
3378
  },
3085
3379
  params: i ? { recursively: !0 } : {}
3086
3380
  },
3087
- (c) => new Re(c.data)
3381
+ (c) => new Ae(c.data)
3088
3382
  );
3089
3383
  }
3090
3384
  /**
@@ -3115,18 +3409,18 @@ class Ot extends Pe {
3115
3409
  return this.get(
3116
3410
  `/internal/price/templates/${r}/clients`,
3117
3411
  {},
3118
- (e) => e.data.map((s) => new X(s))
3412
+ (e) => e.data.map((s) => new Z(s))
3119
3413
  );
3120
3414
  }
3121
3415
  }
3122
- class qt extends h {
3416
+ class Ft extends h {
3123
3417
  /**
3124
3418
  * Возвращает список ролей ценообразования.
3125
3419
  *
3126
3420
  * @see /doc/api/internal#/operations/api_internal_catalog_price_roles_get_list
3127
3421
  */
3128
3422
  getRoles() {
3129
- return this.get("/internal/price/roles", {}, (r) => r.data.map((e) => new ee(e)));
3423
+ return this.get("/internal/price/roles", {}, (r) => r.data.map((e) => new re(e)));
3130
3424
  }
3131
3425
  /**
3132
3426
  * Добавляет новую роль ценообразования.
@@ -3136,7 +3430,7 @@ class qt extends h {
3136
3430
  * @see /doc/api/internal#/operations/api_internal_catalog_price_roles_create
3137
3431
  */
3138
3432
  createRole(r) {
3139
- return this.post("/internal/price/roles", r, (e) => new ee(e.data));
3433
+ return this.post("/internal/price/roles", r, (e) => new re(e.data));
3140
3434
  }
3141
3435
  /**
3142
3436
  * Возвращает данные роли ценообразования.
@@ -3146,7 +3440,7 @@ class qt extends h {
3146
3440
  * @see /doc/api/internal#/operations/api_internal_catalog_price_roles_get
3147
3441
  */
3148
3442
  getRole(r) {
3149
- return this.get(`/internal/price/roles/${r}`, {}, (e) => new ee(e.data));
3443
+ return this.get(`/internal/price/roles/${r}`, {}, (e) => new re(e.data));
3150
3444
  }
3151
3445
  /**
3152
3446
  * Обновляет данные роли ценообразования.
@@ -3157,7 +3451,7 @@ class qt extends h {
3157
3451
  * @see /doc/api/internal#/operations/api_internal_catalog_price_roles_update
3158
3452
  */
3159
3453
  updateRole(r, e) {
3160
- return this.patch(`/internal/price/roles/${r}`, e, (s) => new ee(s.data));
3454
+ return this.patch(`/internal/price/roles/${r}`, e, (s) => new re(s.data));
3161
3455
  }
3162
3456
  /**
3163
3457
  * Удаляет роль ценообразования.
@@ -3199,7 +3493,7 @@ class qt extends h {
3199
3493
  );
3200
3494
  }
3201
3495
  }
3202
- class Ut extends Pe {
3496
+ class Bt extends ve {
3203
3497
  /**
3204
3498
  * Возвращает пагинированный список свойств.
3205
3499
  *
@@ -3212,7 +3506,7 @@ class Ut extends Pe {
3212
3506
  getProperties(r, e, s) {
3213
3507
  return this.getPaginated("/internal/catalog/properties", r, e, s, {}, (i) => {
3214
3508
  const o = { ...i.data };
3215
- return o.data = o.data.map((c) => new Z(c)), o;
3509
+ return o.data = o.data.map((c) => new ee(c)), o;
3216
3510
  });
3217
3511
  }
3218
3512
  /**
@@ -3229,7 +3523,7 @@ class Ut extends Pe {
3229
3523
  ...s,
3230
3524
  type: e
3231
3525
  },
3232
- (i) => new Z(i.data)
3526
+ (i) => new ee(i.data)
3233
3527
  );
3234
3528
  }
3235
3529
  /**
@@ -3239,7 +3533,7 @@ class Ut extends Pe {
3239
3533
  * @see /doc/api/internal#/operations/api_internal_catalog_properties_get
3240
3534
  */
3241
3535
  getProperty(r) {
3242
- return this.get(`/internal/catalog/properties/${r}`, {}, (e) => new Z(e.data));
3536
+ return this.get(`/internal/catalog/properties/${r}`, {}, (e) => new ee(e.data));
3243
3537
  }
3244
3538
  /**
3245
3539
  * Обновляет существующее свойство.
@@ -3256,7 +3550,7 @@ class Ut extends Pe {
3256
3550
  ...i,
3257
3551
  type: s
3258
3552
  },
3259
- (o) => new Z(o.data)
3553
+ (o) => new ee(o.data)
3260
3554
  );
3261
3555
  }
3262
3556
  /**
@@ -3571,7 +3865,7 @@ class Ut extends Pe {
3571
3865
  return this.post(`/internal/catalog/categories/${r}/image`, { image: e });
3572
3866
  }
3573
3867
  }
3574
- class Gt extends h {
3868
+ class Ht extends h {
3575
3869
  /**
3576
3870
  * Возвращает данные о рекомендациях указанной категории продуктов.
3577
3871
  *
@@ -3634,8 +3928,8 @@ function Be(n, r, e) {
3634
3928
  return !1;
3635
3929
  }), s;
3636
3930
  }
3637
- var it = /* @__PURE__ */ ((n) => (n.LastOrder = "last_order", n.Contacts = "contacts", n.PartnerGroups = "partner_groups", n.PreferredDeliveryType = "preferred_delivery_type", n.SalesDirection = "sales_direction", n.Managers = "managers", n))(it || {});
3638
- class be extends B {
3931
+ var ot = /* @__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))(ot || {});
3932
+ class _e extends B {
3639
3933
  /**
3640
3934
  * Инициализирует экземпляр класса {@link BankAccount}.
3641
3935
  *
@@ -3666,7 +3960,7 @@ class be extends B {
3666
3960
  e && (this.bankName = e.bankName ?? "", this.bic = e.bic ?? "", this.accountNumber = e.accountNumber ?? "", this.correspondentAccount = e.correspondentAccount ?? "", this.currency = new ge(e.currency));
3667
3961
  }
3668
3962
  }
3669
- class _e extends a {
3963
+ class Se extends $ {
3670
3964
  /**
3671
3965
  * Инициализирует экземпляр класса {@link Contact}.
3672
3966
  *
@@ -3685,7 +3979,7 @@ class _e extends a {
3685
3979
  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;
3686
3980
  }
3687
3981
  }
3688
- class F extends _e {
3982
+ class F extends Se {
3689
3983
  /**
3690
3984
  * Инициализирует экземпляр класса {@link ContactPerson}.
3691
3985
  *
@@ -3717,10 +4011,10 @@ class F extends _e {
3717
4011
  * Дата и время последнего удаления.
3718
4012
  */
3719
4013
  t(this, "deletedAt");
3720
- 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;
4014
+ 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) ? y(e.deletedAt) : e == null ? void 0 : e.deletedAt;
3721
4015
  }
3722
4016
  }
3723
- class or extends a {
4017
+ class or extends $ {
3724
4018
  /**
3725
4019
  * Инициализирует экземпляр класса {@link ContragentBase}.
3726
4020
  *
@@ -3732,7 +4026,7 @@ class or extends a {
3732
4026
  /**
3733
4027
  * Данные о менеджере.
3734
4028
  */
3735
- t(this, "manager", new re());
4029
+ t(this, "manager", new te());
3736
4030
  /**
3737
4031
  * Данные об организационно-правовой форме.
3738
4032
  */
@@ -3740,7 +4034,7 @@ class or extends a {
3740
4034
  /**
3741
4035
  * Направление продаж.
3742
4036
  */
3743
- t(this, "salesDirection", new S());
4037
+ t(this, "salesDirection", new I());
3744
4038
  /**
3745
4039
  * Группа партнеров (направление деятельности).
3746
4040
  */
@@ -3778,7 +4072,7 @@ class or extends a {
3778
4072
  */
3779
4073
  t(this, "updater");
3780
4074
  if (e) {
3781
- 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) {
4075
+ if (this.opf = new M(e.opf), this.salesDirection = new I(e.salesDirection), this.comment = e.comment, this.alternativeName = e.alternativeName, this.createdAt = m(e == null ? void 0 : e.createdAt) ? y(e.createdAt) : e.createdAt, this.creator = e.creator ? new G(e.creator) : void 0, this.updatedAt = m(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 te(e.manager)), e.contacts) {
3782
4076
  const s = [];
3783
4077
  e.contacts.forEach((i) => {
3784
4078
  s.push(new F(i));
@@ -3787,13 +4081,13 @@ class or extends a {
3787
4081
  if (e.bankAccounts) {
3788
4082
  const s = [];
3789
4083
  e.bankAccounts.forEach((i) => {
3790
- s.push(new be(i));
4084
+ s.push(new _e(i));
3791
4085
  }), this.bankAccounts = s;
3792
4086
  }
3793
4087
  }
3794
4088
  }
3795
4089
  }
3796
- class nt extends or {
4090
+ class ct extends or {
3797
4091
  /**
3798
4092
  * Инициализирует экземпляр класса {@link ContragentPerson}.
3799
4093
  *
@@ -3861,7 +4155,7 @@ class lr extends cr {
3861
4155
  e && (this.kpp = e.kpp ?? "");
3862
4156
  }
3863
4157
  }
3864
- class ot extends lr {
4158
+ class lt extends lr {
3865
4159
  /**
3866
4160
  * Инициализирует экземпляр класса {@link ContragentUlNr}.
3867
4161
  *
@@ -3892,14 +4186,14 @@ class me {
3892
4186
  */
3893
4187
  static createInstance(r) {
3894
4188
  switch (r.opf.slug) {
3895
- case T.Ic:
4189
+ case b.Ic:
3896
4190
  return new cr(r);
3897
- case T.UlR:
4191
+ case b.UlR:
3898
4192
  return new lr(r);
3899
- case T.UlNr:
3900
- return new ot(r);
4193
+ case b.UlNr:
4194
+ return new lt(r);
3901
4195
  default:
3902
- return new nt(r);
4196
+ return new ct(r);
3903
4197
  }
3904
4198
  }
3905
4199
  }
@@ -3918,7 +4212,7 @@ class De extends B {
3918
4212
  this.isPrimary = e.isPrimary;
3919
4213
  }
3920
4214
  }
3921
- class ct extends F {
4215
+ class pt extends F {
3922
4216
  /**
3923
4217
  * Инициализирует экземпляр класса {@link ContactPersonRelated}.
3924
4218
  *
@@ -3946,7 +4240,7 @@ class ct extends F {
3946
4240
  e.relations && (e.relations.addresses && (this.relations.addresses = e.relations.addresses.map((s) => new De(s))), e.relations.clients && (this.relations.clients = e.relations.clients.map((s) => new De(s))), e.relations.contragents && (this.relations.contragents = e.relations.contragents.map((s) => new De(s))));
3947
4241
  }
3948
4242
  }
3949
- class fe extends Hr {
4243
+ class fe extends Fr {
3950
4244
  /**
3951
4245
  * Инициализирует экземпляр класса {@link DeliveryAddress}.
3952
4246
  *
@@ -3986,7 +4280,7 @@ class fe extends Hr {
3986
4280
  this.address = (e == null ? void 0 : e.address) ?? "", this.coordinates = new Xe(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;
3987
4281
  }
3988
4282
  }
3989
- class He extends oe {
4283
+ class He extends ce {
3990
4284
  /**
3991
4285
  * Инициализирует экземпляр класса {@link Client}.
3992
4286
  *
@@ -4040,10 +4334,10 @@ class He extends oe {
4040
4334
  * Дополнительные данные о клиенте.
4041
4335
  */
4042
4336
  t(this, "extraData");
4043
- this.contragents = ((s = e == null ? void 0 : e.contragents) == null ? void 0 : s.map((u) => me.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 fe(u))) ?? [], this.channelPrimaryInterest = new sr(e == null ? void 0 : e.channelPrimaryInterest), this.sourcePrimaryInterest = new nr(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 Ce(e.preferredWarehouse) : void 0, this.extraData = (e == null ? void 0 : e.extraData) ?? {};
4337
+ this.contragents = ((s = e == null ? void 0 : e.contragents) == null ? void 0 : s.map((p) => me.createInstance(p))) ?? [], this.partnerGroups = ((i = e == null ? void 0 : e.partnerGroups) == null ? void 0 : i.map((p) => new Y(p))) ?? [], this.contacts = ((o = e == null ? void 0 : e.contacts) == null ? void 0 : o.map((p) => new F(p))) ?? [], this.deliveryAddresses = ((c = e == null ? void 0 : e.deliveryAddresses) == null ? void 0 : c.map((p) => new fe(p))) ?? [], this.channelPrimaryInterest = new sr(e == null ? void 0 : e.channelPrimaryInterest), this.sourcePrimaryInterest = new nr(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) ?? {};
4044
4338
  }
4045
4339
  }
4046
- class Mt {
4340
+ class zt {
4047
4341
  /**
4048
4342
  * Инициализирует экземпляр класса {@link ClientsListFilters}.
4049
4343
  *
@@ -4093,11 +4387,11 @@ class Mt {
4093
4387
  /**
4094
4388
  * Период регистрации.
4095
4389
  */
4096
- t(this, "createdAt", new N());
4390
+ t(this, "createdAt", new O());
4097
4391
  /**
4098
4392
  * Период последнего входа.
4099
4393
  */
4100
- t(this, "lastLoginDate", new N());
4394
+ t(this, "lastLoginDate", new O());
4101
4395
  /**
4102
4396
  * Признак того, что в указанный период последнего входа, клиентом был сделан заказ.
4103
4397
  */
@@ -4138,11 +4432,11 @@ class Mt {
4138
4432
  * Данные о параметрах поиска последнего заказа который сделал пользователь.
4139
4433
  */
4140
4434
  t(this, "lastOrder");
4141
- var e, s, i, o, c, u;
4142
- 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 Ne(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 ve(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 = {
4143
- createdAt: new N((o = r == null ? void 0 : r.lastOrder) == null ? void 0 : o.createdAt),
4435
+ var e, s, i, o, c, p;
4436
+ this.id = r == null ? void 0 : r.id, this.name = r == null ? void 0 : r.name, this.alternativeName = r == null ? void 0 : r.alternativeName, this.searchTerm = r == null ? void 0 : r.searchTerm, this.cities = (e = r == null ? void 0 : r.cities) == null ? void 0 : e.map((u) => new Oe(u)), this.region = new se(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 O(r == null ? void 0 : r.createdAt), this.lastLoginDate = new O(r == null ? void 0 : r.lastLoginDate), this.lastLoginDateHasOrder = (r == null ? void 0 : r.lastLoginDateHasOrder) ?? void 0, this.managers = r != null && r.managers && r.managers.length > 0 ? r.managers.map((u) => new Ce(u)) : [], this.salesDirections = (s = r == null ? void 0 : r.salesDirections) == null ? void 0 : s.map((u) => new I(u)), 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((u) => new Y(u)), this.contact = new Se(r == null ? void 0 : r.contact), this.lastOrder = {
4437
+ createdAt: new O((o = r == null ? void 0 : r.lastOrder) == null ? void 0 : o.createdAt),
4144
4438
  creator: (c = r == null ? void 0 : r.lastOrder) == null ? void 0 : c.creator,
4145
- isApproved: (u = r == null ? void 0 : r.lastOrder) == null ? void 0 : u.isApproved
4439
+ isApproved: (p = r == null ? void 0 : r.lastOrder) == null ? void 0 : p.isApproved
4146
4440
  };
4147
4441
  }
4148
4442
  /**
@@ -4165,7 +4459,7 @@ class Mt {
4165
4459
  this.cities = [];
4166
4460
  break;
4167
4461
  case "region":
4168
- this.region = new te();
4462
+ this.region = new se();
4169
4463
  break;
4170
4464
  case "isActive":
4171
4465
  this.isActive = !0;
@@ -4198,7 +4492,7 @@ class Mt {
4198
4492
  this.partnerGroups = [];
4199
4493
  break;
4200
4494
  case "contact":
4201
- this.contact = new _e();
4495
+ this.contact = new Se();
4202
4496
  break;
4203
4497
  }
4204
4498
  return this;
@@ -4211,13 +4505,13 @@ class Mt {
4211
4505
  var e, s, i, o;
4212
4506
  const r = {};
4213
4507
  return Object.keys(this).forEach((c) => {
4214
- const u = this[c];
4508
+ const p = this[c];
4215
4509
  // eslint-disable-next-line prettier/prettier
4216
- U(u) || m(u) && u.trim().length === 0 || Se(u.isNewRec) && u.isNewRec() || (r[c] = u);
4510
+ T(p) || m(p) && p.trim().length === 0 || Ie(p.isNewRec) && p.isNewRec() || (r[c] = p);
4217
4511
  }), !((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;
4218
4512
  }
4219
4513
  }
4220
- class ur extends B {
4514
+ class pr extends B {
4221
4515
  /**
4222
4516
  * Инициализирует экземпляр класса {@link OrderShortInfo}.
4223
4517
  *
@@ -4237,10 +4531,10 @@ class ur extends B {
4237
4531
  * Признак того, что заказ подтвержден в 1С.
4238
4532
  */
4239
4533
  t(this, "isApproved1c");
4240
- 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;
4534
+ this.createdAt = m(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;
4241
4535
  }
4242
4536
  }
4243
- class lt extends a {
4537
+ class ut extends $ {
4244
4538
  /**
4245
4539
  * Инициализирует экземпляр класса {@link ClientAdditionalData}.
4246
4540
  *
@@ -4273,10 +4567,10 @@ class lt extends a {
4273
4567
  * Список менеджеров.
4274
4568
  */
4275
4569
  t(this, "managers");
4276
- (s = e.contacts) != null && s.length && (this.contacts = e.contacts.map((o) => new F(o))), e.lastOrder && (this.lastOrder = new ur(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)));
4570
+ (s = e.contacts) != null && s.length && (this.contacts = e.contacts.map((o) => new F(o))), e.lastOrder && (this.lastOrder = new pr(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 I(e.salesDirection)), e.managers && (this.managers = e.managers.map((o) => new te(o)));
4277
4571
  }
4278
4572
  }
4279
- class ut {
4573
+ class ht {
4280
4574
  /**
4281
4575
  * Инициализирует экземпляр класса {@link DataTablePaginationRequestParams}.
4282
4576
  *
@@ -4294,7 +4588,7 @@ class ut {
4294
4588
  this.page = (r == null ? void 0 : r.page) ?? 1, this.pageSize = (r == null ? void 0 : r.pageSize) ?? 50;
4295
4589
  }
4296
4590
  }
4297
- class Ft extends ut {
4591
+ class jt extends ht {
4298
4592
  /**
4299
4593
  * Инициализирует экземпляр класса {@link DataTablePagination}.
4300
4594
  *
@@ -4325,7 +4619,7 @@ class Ft extends ut {
4325
4619
  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;
4326
4620
  }
4327
4621
  }
4328
- class Bt {
4622
+ class Wt {
4329
4623
  /**
4330
4624
  * Инициализирует экземпляр класса {@link ISortRequestParams}.
4331
4625
  *
@@ -4343,7 +4637,7 @@ class Bt {
4343
4637
  this.field = (r == null ? void 0 : r.field) ?? "", this.direction = (r == null ? void 0 : r.direction) ?? "asc";
4344
4638
  }
4345
4639
  }
4346
- class Ht extends Pe {
4640
+ class Vt extends ve {
4347
4641
  /**
4348
4642
  * Возвращает данные об указанном клиенте.
4349
4643
  *
@@ -4366,7 +4660,7 @@ class Ht extends Pe {
4366
4660
  getClientsList(r, e, s, i) {
4367
4661
  return this.getPaginated("/internal/clients", r, e, s, i, (o) => {
4368
4662
  const c = { ...o.data };
4369
- return c.data = c.data.map((u) => new oe(u)), c;
4663
+ return c.data = c.data.map((p) => new ce(p)), c;
4370
4664
  });
4371
4665
  }
4372
4666
  /**
@@ -4379,7 +4673,7 @@ class Ht extends Pe {
4379
4673
  return this.getClientsList({
4380
4674
  groupOp: "and",
4381
4675
  groups: [],
4382
- filters: [{ field: "phone", op: Oe.Contains, value: r }]
4676
+ filters: [{ field: "phone", op: qe.Contains, value: r }]
4383
4677
  });
4384
4678
  }
4385
4679
  /**
@@ -4393,7 +4687,7 @@ class Ht extends Pe {
4393
4687
  const s = r.map((i) => i.id);
4394
4688
  return this.post("/internal/clients/additional-data", { clients: s, requested_data_types: e }, (i) => {
4395
4689
  let o = [];
4396
- return (i == null ? void 0 : i.data.length) > 0 && (o = i.data.map((c) => new lt(c))), o;
4690
+ return (i == null ? void 0 : i.data.length) > 0 && (o = i.data.map((c) => new ut(c))), o;
4397
4691
  });
4398
4692
  }
4399
4693
  /**
@@ -4405,7 +4699,7 @@ class Ht extends Pe {
4405
4699
  getAllClientContacts(r) {
4406
4700
  return this.get(`/internal/clients/${r}/contacts/all`, {}, (e) => {
4407
4701
  let s = [];
4408
- return (e == null ? void 0 : e.data.length) > 0 && (s = e.data.map((i) => new ct(i))), s;
4702
+ return (e == null ? void 0 : e.data.length) > 0 && (s = e.data.map((i) => new pt(i))), s;
4409
4703
  });
4410
4704
  }
4411
4705
  /**
@@ -4545,16 +4839,16 @@ class Ht extends Pe {
4545
4839
  * @see /doc/api/internal#/Контрагенты/api_internal_client_contragent_create
4546
4840
  */
4547
4841
  createContragentClientData(r, e, s = {}) {
4548
- var p, R, D, L, I, x, k, d;
4842
+ var u, R, a, L, k, d, x, N;
4549
4843
  let i;
4550
- const o = e, c = e, u = e;
4844
+ const o = e, c = e, p = e;
4551
4845
  switch (e.opf.slug) {
4552
- case T.Ic:
4846
+ case b.Ic:
4553
4847
  i = {
4554
4848
  opf: o.opf.slug,
4555
4849
  name: o.name,
4556
4850
  alternative_name: o.alternativeName,
4557
- partner_group_id: (p = o.partnerGroup) == null ? void 0 : p.id,
4851
+ partner_group_id: (u = o.partnerGroup) == null ? void 0 : u.id,
4558
4852
  manager_id: (R = o.manager) == null ? void 0 : R.id,
4559
4853
  comment: o.comment,
4560
4854
  inn: o.inn,
@@ -4567,12 +4861,12 @@ class Ht extends Pe {
4567
4861
  actual_address: o.actualAddress
4568
4862
  };
4569
4863
  break;
4570
- case T.UlR:
4864
+ case b.UlR:
4571
4865
  i = {
4572
4866
  opf: c.opf.slug,
4573
4867
  name: c.name,
4574
4868
  alternative_name: c.alternativeName,
4575
- partner_group_id: (D = c.partnerGroup) == null ? void 0 : D.id,
4869
+ partner_group_id: (a = c.partnerGroup) == null ? void 0 : a.id,
4576
4870
  manager_id: (L = c.manager) == null ? void 0 : L.id,
4577
4871
  comment: c.comment,
4578
4872
  inn: c.inn,
@@ -4586,23 +4880,23 @@ class Ht extends Pe {
4586
4880
  actual_address: c.actualAddress
4587
4881
  };
4588
4882
  break;
4589
- case T.UlNr:
4883
+ case b.UlNr:
4590
4884
  i = {
4591
- opf: u.opf.slug,
4592
- name: u.name,
4593
- alternative_name: u.alternativeName,
4594
- partner_group_id: (I = u.partnerGroup) == null ? void 0 : I.id,
4595
- manager_id: (x = u.manager) == null ? void 0 : x.id,
4596
- comment: u.comment,
4597
- director_name: u.directorName,
4598
- director_position: u.directorPosition,
4599
- director_acts_on: u.directorActsOn,
4600
- legal_address: u.legalAddress,
4601
- postal_address: u.postalAddress,
4602
- actual_address: u.actualAddress,
4603
- registration_country_id: u.registrationCountry.id,
4604
- registration_number: u.registrationNumber,
4605
- tax_number: u.taxNumber || void 0
4885
+ opf: p.opf.slug,
4886
+ name: p.name,
4887
+ alternative_name: p.alternativeName,
4888
+ partner_group_id: (k = p.partnerGroup) == null ? void 0 : k.id,
4889
+ manager_id: (d = p.manager) == null ? void 0 : d.id,
4890
+ comment: p.comment,
4891
+ director_name: p.directorName,
4892
+ director_position: p.directorPosition,
4893
+ director_acts_on: p.directorActsOn,
4894
+ legal_address: p.legalAddress,
4895
+ postal_address: p.postalAddress,
4896
+ actual_address: p.actualAddress,
4897
+ registration_country_id: p.registrationCountry.id,
4898
+ registration_number: p.registrationNumber,
4899
+ tax_number: p.taxNumber || void 0
4606
4900
  };
4607
4901
  break;
4608
4902
  default:
@@ -4610,8 +4904,8 @@ class Ht extends Pe {
4610
4904
  opf: e.opf.slug,
4611
4905
  name: e.name,
4612
4906
  alternative_name: e.alternativeName,
4613
- partner_group_id: (k = e.partnerGroup) == null ? void 0 : k.id,
4614
- manager_id: (d = e.manager) == null ? void 0 : d.id,
4907
+ partner_group_id: (x = e.partnerGroup) == null ? void 0 : x.id,
4908
+ manager_id: (N = e.manager) == null ? void 0 : N.id,
4615
4909
  comment: e.comment
4616
4910
  };
4617
4911
  break;
@@ -4619,7 +4913,7 @@ class Ht extends Pe {
4619
4913
  return this.post(
4620
4914
  `/internal/clients/${r}/contragents`,
4621
4915
  i,
4622
- (O) => me.createInstance(O.data),
4916
+ (q) => me.createInstance(q.data),
4623
4917
  s
4624
4918
  );
4625
4919
  }
@@ -4634,16 +4928,16 @@ class Ht extends Pe {
4634
4928
  * @see /doc/api/internal#/Контрагенты/api_internal_client_contragent_update
4635
4929
  */
4636
4930
  updateContragentClientData(r, e, s = {}) {
4637
- var p, R, D, L, I, x, k, d;
4931
+ var u, R, a, L, k, d, x, N;
4638
4932
  let i;
4639
- const o = e, c = e, u = e;
4933
+ const o = e, c = e, p = e;
4640
4934
  switch (e.opf.slug) {
4641
- case T.Ic:
4935
+ case b.Ic:
4642
4936
  i = {
4643
4937
  opf: o.opf.slug,
4644
4938
  name: o.name,
4645
4939
  alternative_name: o.alternativeName,
4646
- partner_group_id: (p = o.partnerGroup) == null ? void 0 : p.id,
4940
+ partner_group_id: (u = o.partnerGroup) == null ? void 0 : u.id,
4647
4941
  manager_id: (R = o.manager) == null ? void 0 : R.id,
4648
4942
  comment: o.comment,
4649
4943
  inn: o.inn,
@@ -4656,12 +4950,12 @@ class Ht extends Pe {
4656
4950
  actual_address: o.actualAddress
4657
4951
  };
4658
4952
  break;
4659
- case T.UlR:
4953
+ case b.UlR:
4660
4954
  i = {
4661
4955
  opf: c.opf.slug,
4662
4956
  name: c.name,
4663
4957
  alternative_name: c.alternativeName,
4664
- partner_group_id: (D = c.partnerGroup) == null ? void 0 : D.id,
4958
+ partner_group_id: (a = c.partnerGroup) == null ? void 0 : a.id,
4665
4959
  manager_id: (L = c.manager) == null ? void 0 : L.id,
4666
4960
  comment: c.comment,
4667
4961
  inn: c.inn,
@@ -4675,23 +4969,23 @@ class Ht extends Pe {
4675
4969
  actual_address: c.actualAddress
4676
4970
  };
4677
4971
  break;
4678
- case T.UlNr:
4972
+ case b.UlNr:
4679
4973
  i = {
4680
- opf: u.opf.slug,
4681
- name: u.name,
4682
- alternative_name: u.alternativeName,
4683
- partner_group_id: (I = u.partnerGroup) == null ? void 0 : I.id,
4684
- manager_id: (x = u.manager) == null ? void 0 : x.id,
4685
- comment: u.comment,
4686
- director_name: u.directorName,
4687
- director_position: u.directorPosition,
4688
- director_acts_on: u.directorActsOn,
4689
- legal_address: u.legalAddress,
4690
- postal_address: u.postalAddress,
4691
- actual_address: u.actualAddress,
4692
- registration_country_id: u.registrationCountry.id,
4693
- registration_number: u.registrationNumber,
4694
- tax_number: u.taxNumber || void 0
4974
+ opf: p.opf.slug,
4975
+ name: p.name,
4976
+ alternative_name: p.alternativeName,
4977
+ partner_group_id: (k = p.partnerGroup) == null ? void 0 : k.id,
4978
+ manager_id: (d = p.manager) == null ? void 0 : d.id,
4979
+ comment: p.comment,
4980
+ director_name: p.directorName,
4981
+ director_position: p.directorPosition,
4982
+ director_acts_on: p.directorActsOn,
4983
+ legal_address: p.legalAddress,
4984
+ postal_address: p.postalAddress,
4985
+ actual_address: p.actualAddress,
4986
+ registration_country_id: p.registrationCountry.id,
4987
+ registration_number: p.registrationNumber,
4988
+ tax_number: p.taxNumber || void 0
4695
4989
  };
4696
4990
  break;
4697
4991
  default:
@@ -4699,8 +4993,8 @@ class Ht extends Pe {
4699
4993
  opf: e.opf.slug,
4700
4994
  name: e.name,
4701
4995
  alternative_name: e.alternativeName,
4702
- partner_group_id: (k = e.partnerGroup) == null ? void 0 : k.id,
4703
- manager_id: (d = e.manager) == null ? void 0 : d.id,
4996
+ partner_group_id: (x = e.partnerGroup) == null ? void 0 : x.id,
4997
+ manager_id: (N = e.manager) == null ? void 0 : N.id,
4704
4998
  comment: e.comment
4705
4999
  };
4706
5000
  break;
@@ -4708,7 +5002,7 @@ class Ht extends Pe {
4708
5002
  return this.patch(
4709
5003
  `/internal/clients/${r}/contragents/${e.id}`,
4710
5004
  i,
4711
- (O) => me.createInstance(O.data),
5005
+ (q) => me.createInstance(q.data),
4712
5006
  s
4713
5007
  );
4714
5008
  }
@@ -4746,7 +5040,7 @@ class Ht extends Pe {
4746
5040
  }), e.operatingHours && (i.operating_hours = {
4747
5041
  from: e.operatingHours.from,
4748
5042
  to: e.operatingHours.to
4749
- }), this.post(`/internal/clients/${r}/delivery-addresses`, i, (u) => new fe(u.data), s);
5043
+ }), this.post(`/internal/clients/${r}/delivery-addresses`, i, (p) => new fe(p.data), s);
4750
5044
  }
4751
5045
  /**
4752
5046
  * Обновляет данные об адресе доставки клиента.
@@ -4775,7 +5069,7 @@ class Ht extends Pe {
4775
5069
  }), this.patch(
4776
5070
  `/internal/clients/${r}/delivery-addresses/${e.id}`,
4777
5071
  i,
4778
- (u) => new fe(u.data),
5072
+ (p) => new fe(p.data),
4779
5073
  s
4780
5074
  );
4781
5075
  }
@@ -4811,7 +5105,7 @@ class Ht extends Pe {
4811
5105
  correspondent_account: s.correspondentAccount,
4812
5106
  currency_id: s.currency.id
4813
5107
  },
4814
- (o) => new be(o.data),
5108
+ (o) => new _e(o.data),
4815
5109
  i
4816
5110
  );
4817
5111
  }
@@ -4837,7 +5131,7 @@ class Ht extends Pe {
4837
5131
  correspondent_account: s.correspondentAccount,
4838
5132
  currency_id: s.currency.id
4839
5133
  },
4840
- (o) => new be(o.data),
5134
+ (o) => new _e(o.data),
4841
5135
  i
4842
5136
  );
4843
5137
  }
@@ -5034,14 +5328,14 @@ class Ht extends Pe {
5034
5328
  * в случае ошибок в запросах.
5035
5329
  */
5036
5330
  createContact(r, e, s, i = {}) {
5037
- var c, u;
5331
+ var c, p;
5038
5332
  const o = {
5039
5333
  name: e.name,
5040
5334
  position: e.position,
5041
5335
  comment: e.comment,
5042
5336
  ...s
5043
5337
  };
5044
- return (c = e.phone) != null && c.length && (o.phone = e.phone), (u = e.email) != null && u.length && (o.email = e.email), this.post(`/internal/clients/${r}/contacts`, o, (p) => new F(p.data), i);
5338
+ return (c = e.phone) != null && c.length && (o.phone = e.phone), (p = e.email) != null && p.length && (o.email = e.email), this.post(`/internal/clients/${r}/contacts`, o, (u) => new F(u.data), i);
5045
5339
  }
5046
5340
  /**
5047
5341
  * Устанавливает признак основного контактного лица.
@@ -5070,7 +5364,7 @@ class Ht extends Pe {
5070
5364
  return this.get(`/internal/clients/${r.id}/verification/email?email=${r.email}`);
5071
5365
  }
5072
5366
  }
5073
- class zt extends h {
5367
+ class Et extends h {
5074
5368
  /**
5075
5369
  * Выполняет проверку занят ли указанный номер телефона.
5076
5370
  *
@@ -5084,7 +5378,7 @@ class zt extends h {
5084
5378
  });
5085
5379
  }
5086
5380
  }
5087
- class jt extends h {
5381
+ class Jt extends h {
5088
5382
  /**
5089
5383
  * Возвращает настройки указанного конфигуратора для указанной категории.
5090
5384
  *
@@ -5112,7 +5406,7 @@ class jt extends h {
5112
5406
  const i = this.get(
5113
5407
  `internal/catalog/categories/${r.id}/configurators/${(o = r.properties) == null ? void 0 : o.editor}/product`,
5114
5408
  { params: e },
5115
- (c) => new b(c.data)
5409
+ (c) => new _(c.data)
5116
5410
  );
5117
5411
  return i.catch((c) => {
5118
5412
  this.errorResponseHandler(c, s);
@@ -5155,16 +5449,16 @@ class jt extends h {
5155
5449
  return this.delete(`internal/catalog/categories/${r.id}/configurators/${(s = r.properties) == null ? void 0 : s.editor}/template/${e}`);
5156
5450
  }
5157
5451
  }
5158
- class Wt {
5452
+ class Kt {
5159
5453
  /**
5160
5454
  * Возвращает диапазон дат по умолчанию.
5161
5455
  */
5162
5456
  static defaultDateRanges() {
5163
- const r = ar(/* @__PURE__ */ new Date(), 1);
5457
+ const r = $r(/* @__PURE__ */ new Date(), 1);
5164
5458
  return {
5165
5459
  // 'Следующий рабочий день' - это значение по-умолчанию
5166
- nextWorkingDay: { label: "Следующий рабочий день", from: xr(r), to: Ir(r) },
5167
- today: { label: "Сегодня", from: Ke(), to: Lr() },
5460
+ nextWorkingDay: { label: "Следующий рабочий день", from: kr(r), to: Lr(r) },
5461
+ today: { label: "Сегодня", from: Ke(), to: Ir() },
5168
5462
  yesterday: { label: "Вчера", from: Sr(), to: _r() },
5169
5463
  tomorrow: { label: "Завтра", from: br(), to: Tr() }
5170
5464
  };
@@ -5211,12 +5505,12 @@ const E = class E {
5211
5505
  */
5212
5506
  t(E, "linearValues", ["пог.м.", "м.", "м2"]);
5213
5507
  let ze = E;
5214
- class Vt {
5508
+ class Qt {
5215
5509
  /**
5216
5510
  * Генерирует и возвращает данные-заглушку неопределённого менеджера.
5217
5511
  */
5218
5512
  static generateUndefinedManagerInstance() {
5219
- return new ve({ id: 0, name: "- Не назначен -", isActive: !0, guid: "-undefined-" });
5513
+ return new Ce({ id: 0, name: "- Не назначен -", isActive: !0, guid: "-undefined-" });
5220
5514
  }
5221
5515
  /**
5222
5516
  * Выполняет проверку, является ли указанная запись записью-заглушкой с данными о неопределённом менеджере.
@@ -5227,26 +5521,14 @@ class Vt {
5227
5521
  return r.id === 0 && r.guid === "-undefined-";
5228
5522
  }
5229
5523
  }
5230
- class pt extends se {
5231
- /**
5232
- * Возвращает {@link Promise} для получения справочника списка менеджеров.
5233
- */
5234
- async getManagers() {
5235
- const r = "/internal/managers", e = se.getCachedResponse(r);
5236
- if (e)
5237
- return e;
5238
- const i = (await this.get(r)).data.map((o) => ke.instanceInitializer(ve, o));
5239
- return this.cacheResponse(r, i), i;
5240
- }
5241
- }
5242
- class pr extends ur {
5524
+ class ur extends pr {
5243
5525
  /**
5244
5526
  * Инициализирует экземпляр класса {@link OrderInfo}.
5245
5527
  *
5246
5528
  * @param data Данные для первоначальной инициализации.
5247
5529
  */
5248
5530
  constructor(e) {
5249
- var s, i, o, c, u, p, R, D;
5531
+ var s, i, o, c, p, u, R, a;
5250
5532
  super(e);
5251
5533
  /**
5252
5534
  * Краткие данные о клиенте.
@@ -5288,19 +5570,19 @@ class pr extends ur {
5288
5570
  * Признак того, что заказ создан из товаров, которые имеют признак "Нет в наличии".
5289
5571
  */
5290
5572
  t(this, "isNotInStock");
5291
- this.client = new oe(e == null ? void 0 : e.client), this.payment = {
5573
+ this.client = new ce(e == null ? void 0 : e.client), this.payment = {
5292
5574
  type: ((s = e == null ? void 0 : e.payment) == null ? void 0 : s.type) ?? -1,
5293
5575
  status: ((i = e == null ? void 0 : e.payment) == null ? void 0 : i.status) ?? -1,
5294
5576
  onlinePaymentLink: (o = e == null ? void 0 : e.payment) == null ? void 0 : o.onlinePaymentLink
5295
5577
  }, this.delivery = {
5296
5578
  type: ((c = e == null ? void 0 : e.delivery) == null ? void 0 : c.type) ?? -1,
5297
- 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(),
5579
+ date: m((p = e == null ? void 0 : e.delivery) == null ? void 0 : p.date) ? y(e.delivery.date) : ((u = e == null ? void 0 : e.delivery) == null ? void 0 : u.date) ?? /* @__PURE__ */ new Date(),
5298
5580
  address: (R = e == null ? void 0 : e.delivery) != null && R.address ? new fe(e.delivery.address) : void 0,
5299
- warehouse: (D = e == null ? void 0 : e.delivery) != null && D.warehouse ? new Ce(e.delivery.warehouse) : void 0
5300
- }, 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;
5581
+ warehouse: (a = e == null ? void 0 : e.delivery) != null && a.warehouse ? new we(e.delivery.warehouse) : void 0
5582
+ }, this.attachedUser = new G(e == null ? void 0 : e.attachedUser), this.status = (e == null ? void 0 : e.status) ?? 0, this.salesDirection = new I(e == null ? void 0 : e.salesDirection), this.pendingAt = m(e == null ? void 0 : e.pendingAt) ? y(e.pendingAt) : e == null ? void 0 : e.pendingAt, this.processedAt = m(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;
5301
5583
  }
5302
5584
  }
5303
- class ht extends B {
5585
+ class gt extends B {
5304
5586
  /**
5305
5587
  * Инициализирует экземпляр класса {@link OrderProduct}.
5306
5588
  *
@@ -5383,7 +5665,7 @@ class ht extends B {
5383
5665
  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;
5384
5666
  }
5385
5667
  }
5386
- class gt extends pr {
5668
+ class mt extends ur {
5387
5669
  /**
5388
5670
  * Инициализирует экземпляр класса {@link Order}.
5389
5671
  *
@@ -5423,10 +5705,10 @@ class gt extends pr {
5423
5705
  * Признак, что разрешена передача заказа в работу без оплаты.
5424
5706
  */
5425
5707
  t(this, "isAllowProcessingWithoutPayment");
5426
- this.products = (e.products ?? []).map((s) => new ht(s)), this.invoices = e.invoices ?? [], this.comment = e.comment, this.image = e.image, this.contragent = e.contragent ? me.createInstance(e.contragent) : void 0, this.barcode = e.barcode, this.orderSource = e.orderSource ? new C(e.orderSource) : void 0, this.isAllowProcessingWithoutPayment = e.isAllowProcessingWithoutPayment;
5708
+ this.products = (e.products ?? []).map((s) => new gt(s)), this.invoices = e.invoices ?? [], this.comment = e.comment, this.image = e.image, this.contragent = e.contragent ? me.createInstance(e.contragent) : void 0, this.barcode = e.barcode, this.orderSource = e.orderSource ? new w(e.orderSource) : void 0, this.isAllowProcessingWithoutPayment = e.isAllowProcessingWithoutPayment;
5427
5709
  }
5428
5710
  }
5429
- class Et extends Pe {
5711
+ class Yt extends ve {
5430
5712
  /**
5431
5713
  * Возвращает данные о заказах, удовлетворяющих указанным параметрам поиска.
5432
5714
  *
@@ -5439,7 +5721,7 @@ class Et extends Pe {
5439
5721
  getOrders(r, e, s) {
5440
5722
  return this.getPaginated("/internal/orders", r, e ? [e] : void 0, s, {}, (i) => {
5441
5723
  const o = { ...i.data };
5442
- return o.data = o.data.map((c) => new pr(c)), o;
5724
+ return o.data = o.data.map((c) => new ur(c)), o;
5443
5725
  });
5444
5726
  }
5445
5727
  /**
@@ -5457,7 +5739,7 @@ class Et extends Pe {
5457
5739
  * @param orderId Идентификатор заказа для которого необходимо вернуть данные.
5458
5740
  */
5459
5741
  getOrder(r) {
5460
- return this.get(`/internal/orders/${r}`, {}, (e) => new gt(e.data));
5742
+ return this.get(`/internal/orders/${r}`, {}, (e) => new mt(e.data));
5461
5743
  }
5462
5744
  }
5463
5745
  class $e {
@@ -5487,10 +5769,10 @@ class $e {
5487
5769
  * Источник клиентской цены.
5488
5770
  */
5489
5771
  t(this, "source");
5490
- 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) ?? de.Product;
5772
+ this.client = new ce(r == null ? void 0 : r.client), this.product = new _(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;
5491
5773
  }
5492
5774
  }
5493
- const ae = (n) => {
5775
+ const Te = (n) => {
5494
5776
  var r, e, s, i, o;
5495
5777
  return n ? Rr(
5496
5778
  {
@@ -5501,13 +5783,13 @@ const ae = (n) => {
5501
5783
  salesDirections: (o = n.salesDirections) == null ? void 0 : o.map((c) => c.id),
5502
5784
  hideNotActive: n.hideNotActive
5503
5785
  },
5504
- (c) => U(c) || (Je(c) || Ar(c)) && Le(c)
5786
+ (c) => T(c) || (Je(c) || Ar(c)) && Le(c)
5505
5787
  ) : {};
5506
5788
  }, je = (n) => {
5507
5789
  const r = {};
5508
5790
  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;
5509
5791
  };
5510
- class Jt extends h {
5792
+ class Xt extends h {
5511
5793
  /**
5512
5794
  * Возвращает список клиентских цен на продукты в указанном диапазоне цены.
5513
5795
  *
@@ -5522,7 +5804,7 @@ class Jt extends h {
5522
5804
  `/internal/price/products/${r}/analyze`,
5523
5805
  {
5524
5806
  ...je(e),
5525
- filters: ae(s)
5807
+ filters: Te(s)
5526
5808
  },
5527
5809
  (i) => i.data.map((o) => new $e(o))
5528
5810
  );
@@ -5541,7 +5823,7 @@ class Jt extends h {
5541
5823
  `/internal/price/categories/${r}/analyze`,
5542
5824
  {
5543
5825
  ...je(e),
5544
- filters: ae(s)
5826
+ filters: Te(s)
5545
5827
  },
5546
5828
  (i) => i.data.map((o) => new $e(o))
5547
5829
  );
@@ -5562,13 +5844,13 @@ class Jt extends h {
5562
5844
  `/internal/price/categories/${r}/analyze/square`,
5563
5845
  {
5564
5846
  ...e,
5565
- filters: ae(s)
5847
+ filters: Te(s)
5566
5848
  },
5567
5849
  (i) => i.data.map((o) => new $e(o))
5568
5850
  );
5569
5851
  }
5570
5852
  }
5571
- class mt {
5853
+ class ft {
5572
5854
  /**
5573
5855
  * Инициализирует экземпляр класса {@link MetaTagItem}.
5574
5856
  *
@@ -5622,10 +5904,10 @@ class We {
5622
5904
  */
5623
5905
  t(this, "meta");
5624
5906
  var e;
5625
- this.resourceType = new ir(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 mt(s))) ?? [];
5907
+ this.resourceType = new ir(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 ft(s))) ?? [];
5626
5908
  }
5627
5909
  }
5628
- class Kt extends h {
5910
+ class Zt extends h {
5629
5911
  /**
5630
5912
  * Возвращает {@link Promise} для получения данных о SEO-параметрах указанного ресурса.
5631
5913
  *
@@ -5656,241 +5938,7 @@ class Kt extends h {
5656
5938
  return this.delete(`/internal/seo/${r.slug}/${e}`);
5657
5939
  }
5658
5940
  }
5659
- const P = ye("__references_private", () => {
5660
- const n = y({}), r = y(void 0), e = y(void 0), s = y(void 0), i = y(void 0), o = y(void 0), c = y(void 0), u = y(void 0), p = y(void 0), R = y(void 0), D = y(void 0), L = y(void 0), I = y(void 0), x = y(void 0), k = y(void 0), d = y(void 0), O = y(void 0), l = y(void 0);
5661
- return {
5662
- /**
5663
- * Список загружаемых/загруженных на данный момент значений.
5664
- */
5665
- dataLoaderList: n,
5666
- /**
5667
- * Справочник каналов первичного интереса.
5668
- */
5669
- channelPrimaryInterestReference: r,
5670
- /**
5671
- * Справочник должностей контактных лиц.
5672
- */
5673
- contactPositionsReference: e,
5674
- /**
5675
- * Справочник валют.
5676
- */
5677
- currencyReference: s,
5678
- /**
5679
- * Справочник типов доставки.
5680
- */
5681
- deliveryTypeReference: i,
5682
- /**
5683
- * Список менеджеров.
5684
- */
5685
- managersList: o,
5686
- /**
5687
- * Справочник организационно-правовых форм.
5688
- */
5689
- opfReference: c,
5690
- /**
5691
- * Справочник статусов оплаты заказа.
5692
- */
5693
- orderPaymentStatusReference: u,
5694
- /**
5695
- * Справочник статусов заказов.
5696
- */
5697
- orderStatusReference: p,
5698
- /**
5699
- * Справочник типов оплаты заказов.
5700
- */
5701
- paymentTypeReference: R,
5702
- /**
5703
- * Справочник групп партнеров.
5704
- */
5705
- partnerGroupReference: D,
5706
- /**
5707
- * Справочник типов файлов продукктов/категорий.
5708
- */
5709
- productFileTypeReference: L,
5710
- /**
5711
- * Справочник типов ресурсов.
5712
- */
5713
- resourceTypesReference: I,
5714
- /**
5715
- * Справочник направлений продаж.
5716
- */
5717
- salesDirectionsReference: x,
5718
- /**
5719
- * Справочник источников первичного интереса.
5720
- */
5721
- sourcePrimaryInterestReference: k,
5722
- /**
5723
- * Справочник складов.
5724
- */
5725
- warehousesReference: d,
5726
- /**
5727
- * Справочник типов свойств.
5728
- */
5729
- propertyTypesReference: O,
5730
- /**
5731
- * Справочник коэффициентов цен.
5732
- */
5733
- priceCoefficientsReference: l
5734
- };
5735
- }), Qt = ye("references", () => {
5736
- const n = v(() => {
5737
- const l = P();
5738
- return !l.channelPrimaryInterestReference && !l.dataLoaderList.channelPrimaryInterestReference && (l.dataLoaderList.channelPrimaryInterestReference = !0, h.getInstance(A).getChannelPrimaryInterest().then((g) => {
5739
- l.channelPrimaryInterestReference = g;
5740
- }).catch(w)), l.channelPrimaryInterestReference;
5741
- }), r = v(() => {
5742
- const l = P();
5743
- return !l.contactPositionsReference && !l.dataLoaderList.contactPositionsReference && (l.dataLoaderList.contactPositionsReference = !0, h.getInstance(A).getContactPositions().then((g) => {
5744
- l.contactPositionsReference = g;
5745
- }).catch(w)), l.contactPositionsReference;
5746
- }), e = v(() => {
5747
- const l = P();
5748
- return !l.currencyReference && !l.dataLoaderList.currencyReference && (l.dataLoaderList.currencyReference = !0, h.getInstance(A).getCurrency().then((g) => {
5749
- l.currencyReference = g;
5750
- }).catch(w)), l.currencyReference;
5751
- }), s = v(() => {
5752
- const l = P();
5753
- return !l.opfReference && !l.dataLoaderList.opfReference && (l.dataLoaderList.opfReference = !0, h.getInstance(A).getOpf().then((g) => {
5754
- l.opfReference = g;
5755
- }).catch(w)), l.opfReference;
5756
- }), i = v(() => {
5757
- const l = P();
5758
- return !l.orderPaymentStatusReference && !l.dataLoaderList.orderPaymentStatusReference && (l.dataLoaderList.orderPaymentStatusReference = !0, h.getInstance(A).getOrderPaymentStatuses().then((g) => {
5759
- l.orderPaymentStatusReference = g;
5760
- }).catch(w)), l.orderPaymentStatusReference;
5761
- }), o = v(() => {
5762
- const l = P();
5763
- return !l.orderStatusReference && !l.dataLoaderList.orderStatusReference && (l.dataLoaderList.orderStatusReference = !0, h.getInstance(A).getOrderStatuses().then((g) => {
5764
- l.orderStatusReference = g;
5765
- }).catch(w)), l.orderStatusReference;
5766
- }), c = v(() => {
5767
- const l = P();
5768
- return !l.paymentTypeReference && !l.dataLoaderList.paymentTypeReference && (l.dataLoaderList.paymentTypeReference = !0, h.getInstance(A).getPaymentTypes().then((g) => {
5769
- l.paymentTypeReference = g;
5770
- }).catch(w)), l.paymentTypeReference;
5771
- }), u = v(() => {
5772
- const l = P();
5773
- return !l.partnerGroupReference && !l.dataLoaderList.partnerGroupReference && (l.dataLoaderList.partnerGroupReference = !0, h.getInstance(A).getPartnerGroup().then((g) => {
5774
- l.partnerGroupReference = g;
5775
- }).catch(w)), l.partnerGroupReference;
5776
- }), p = v(() => {
5777
- const l = P();
5778
- return !l.productFileTypeReference && !l.dataLoaderList.productFileTypeReference && (l.dataLoaderList.productFileTypeReference = !0, h.getInstance(A).getProductFileType().then((g) => {
5779
- l.productFileTypeReference = g;
5780
- }).catch(w)), l.productFileTypeReference;
5781
- }), R = v(() => {
5782
- const l = P();
5783
- return !l.resourceTypesReference && !l.dataLoaderList.resourceTypesReference && (l.dataLoaderList.resourceTypesReference = !0, h.getInstance(A).getResourceTypes().then((g) => {
5784
- l.resourceTypesReference = g;
5785
- }).catch(w)), l.resourceTypesReference;
5786
- }), D = v(() => {
5787
- const l = P();
5788
- return !l.salesDirectionsReference && !l.dataLoaderList.salesDirectionsReference && (l.dataLoaderList.salesDirectionsReference = !0, h.getInstance(A).getSalesDirections().then((g) => {
5789
- l.salesDirectionsReference = g;
5790
- }).catch(w)), l.salesDirectionsReference;
5791
- }), L = v(() => {
5792
- const l = P();
5793
- return !l.sourcePrimaryInterestReference && !l.dataLoaderList.sourcePrimaryInterestReference && (l.dataLoaderList.sourcePrimaryInterestReference = !0, h.getInstance(A).getSourcePrimaryInterest().then((g) => {
5794
- l.sourcePrimaryInterestReference = g;
5795
- }).catch(w)), l.sourcePrimaryInterestReference;
5796
- }), I = v(() => {
5797
- const l = P();
5798
- return !l.deliveryTypeReference && !l.dataLoaderList.deliveryTypeReference && (l.dataLoaderList.deliveryTypeReference = !0, h.getInstance(A).getDeliveryTypes().then((g) => {
5799
- l.deliveryTypeReference = g;
5800
- }).catch(w)), l.deliveryTypeReference;
5801
- }), x = v(() => {
5802
- const l = P();
5803
- return !l.managersList && !l.dataLoaderList.managersList && (l.dataLoaderList.managersList = !0, h.getInstance(pt).getManagers().then((g) => {
5804
- l.managersList = g;
5805
- }).catch(w)), l.managersList;
5806
- }), k = v(() => {
5807
- const l = P();
5808
- return !l.warehousesReference && !l.dataLoaderList.warehousesReference && (l.dataLoaderList.warehousesReference = !0, h.getInstance(A).getWarehouses().then((g) => {
5809
- l.warehousesReference = g;
5810
- }).catch(w)), l.warehousesReference;
5811
- }), d = v(() => {
5812
- const l = P();
5813
- return !l.propertyTypesReference && !l.dataLoaderList.propertyTypesReference && (l.dataLoaderList.propertyTypesReference = !0, h.getInstance(A).getPropertyTypes().then((g) => {
5814
- l.propertyTypesReference = g;
5815
- }).catch(w)), l.propertyTypesReference;
5816
- }), O = v(() => {
5817
- const l = P();
5818
- return !l.priceCoefficientsReference && !l.dataLoaderList.priceCoefficientsReference && (l.dataLoaderList.priceCoefficientsReference = !0, h.getInstance(A).getPriceCoefficients().then((g) => {
5819
- l.priceCoefficientsReference = g;
5820
- }).catch(w)), l.priceCoefficientsReference;
5821
- });
5822
- return {
5823
- /**
5824
- * Справочник каналов первичного интереса.
5825
- */
5826
- channelPrimaryInterestsReference: n,
5827
- /**
5828
- * Справочник должностей контактных лиц.
5829
- */
5830
- contactPositionsReference: r,
5831
- /**
5832
- * Справочник валют.
5833
- */
5834
- currencyReference: e,
5835
- /**
5836
- * Справочник организационно-правовых форм.
5837
- */
5838
- opfReference: s,
5839
- /**
5840
- * Справочник статусов оплаты заказа.
5841
- */
5842
- orderPaymentStatusReference: i,
5843
- /**
5844
- * Справочник статусов заказов.
5845
- */
5846
- orderStatusReference: o,
5847
- /**
5848
- * Справочник типов оплаты заказов.
5849
- */
5850
- paymentTypeReference: c,
5851
- /**
5852
- * Справочник групп партнеров.
5853
- */
5854
- partnerGroupsReference: u,
5855
- /**
5856
- * Справочник типов файлов продуктов/категорий.
5857
- */
5858
- productFilesTypesReference: p,
5859
- /**
5860
- * Справочник типов ресурсов.
5861
- */
5862
- resourceTypesReference: R,
5863
- /**
5864
- * Справочник направлений продаж.
5865
- */
5866
- salesDirectionsReference: D,
5867
- /**
5868
- * Справочник каналов первичного интереса.
5869
- */
5870
- sourcePrimaryInterestsReference: L,
5871
- /**
5872
- * Справочник типов доставки.
5873
- */
5874
- deliveryTypeReference: I,
5875
- /**
5876
- * Список менеджеров.
5877
- */
5878
- managersList: x,
5879
- /**
5880
- * Справочник складов.
5881
- */
5882
- warehousesReference: k,
5883
- /**
5884
- * Справочник типов свойств.
5885
- */
5886
- propertyTypesReference: d,
5887
- /**
5888
- * Справочник коэффициентов цен.
5889
- */
5890
- priceCoefficientsReference: O
5891
- };
5892
- });
5893
- class Yt extends h {
5941
+ class es extends h {
5894
5942
  /**
5895
5943
  * Возвращает подсказки по адресам.
5896
5944
  *
@@ -5937,7 +5985,7 @@ class Yt extends h {
5937
5985
  });
5938
5986
  }
5939
5987
  }
5940
- class Xt {
5988
+ class rs {
5941
5989
  /**
5942
5990
  * Инициализирует экземпляр класса {@link FieldValidationResultData}.
5943
5991
  *
@@ -5961,142 +6009,144 @@ class Xt {
5961
6009
  }
5962
6010
  }
5963
6011
  export {
5964
- Vr as AnyReference,
5965
- _t as AppBaseConfig,
5966
- $ as AppConfigProvider,
5967
- be as BankAccount,
5968
- Pe as BasePaginationProvider,
5969
- Fr as CalculationTypeEnum,
5970
- ce as Cart,
6012
+ jr as AnyReference,
6013
+ kt as AppBaseConfig,
6014
+ D as AppConfigProvider,
6015
+ _e as BankAccount,
6016
+ ve as BasePaginationProvider,
6017
+ Gr as CalculationTypeEnum,
6018
+ le as Cart,
5971
6019
  Ur as CartItem,
5972
6020
  qr as CartItemBase,
5973
6021
  $t as CartProvider,
5974
- St as CatalogProvider,
6022
+ dt as CatalogProvider,
5975
6023
  Qe as CatalogableItem,
5976
- q as Category,
6024
+ U as Category,
5977
6025
  Me as CategoryPricingRule,
5978
6026
  sr as ChannelPrimaryInterest,
5979
- bt as City,
5980
- Ne as CityWithRegionAndCountry,
6027
+ _t as City,
6028
+ Oe as CityWithRegionAndCountry,
5981
6029
  He as Client,
5982
- lt as ClientAdditionalData,
6030
+ ut as ClientAdditionalData,
5983
6031
  he as ClientCategory,
5984
- Ht as ClientDataProvider,
5985
- Lt as ClientPriceProvider,
5986
- It as ClientPriceTemplateProvider,
6032
+ Vt as ClientDataProvider,
6033
+ xt as ClientPriceProvider,
6034
+ Nt as ClientPriceTemplateProvider,
5987
6035
  K as ClientProduct,
5988
- dt as ClientProductCategoryDataProvider,
5989
- Nt as ClientProductDataProvider,
5990
- oe as ClientShortInfo,
5991
- it as ClientsAdditionalDataRequestTypeEnum,
5992
- Mt as ClientsListFilters,
5993
- jt as ConfiguratorProvider,
5994
- _e as Contact,
5995
- jr as ContactLinks,
6036
+ Ut as ClientProductCategoryDataProvider,
6037
+ Gt as ClientProductDataProvider,
6038
+ ce as ClientShortInfo,
6039
+ ot as ClientsAdditionalDataRequestTypeEnum,
6040
+ zt as ClientsListFilters,
6041
+ Jt as ConfiguratorProvider,
6042
+ Se as Contact,
6043
+ Hr as ContactLinks,
5996
6044
  F as ContactPerson,
5997
- ct as ContactPersonRelated,
5998
- Er as ContactPosition,
6045
+ pt as ContactPersonRelated,
6046
+ Wr as ContactPosition,
5999
6047
  De as ContactRelation,
6000
6048
  or as ContragentBase,
6001
6049
  me as ContragentFactory,
6002
6050
  cr as ContragentIc,
6003
- nt as ContragentPerson,
6004
- ot as ContragentUlNr,
6051
+ ct as ContragentPerson,
6052
+ lt as ContragentUlNr,
6005
6053
  lr as ContragentUlR,
6006
- de as CostSourceEnum,
6054
+ Ne as CostSourceEnum,
6007
6055
  Q as Country,
6008
6056
  ge as Currency,
6009
- Yt as DataSuggestionProvider,
6010
- Ft as DataTablePagination,
6011
- ut as DataTablePaginationRequestParams,
6012
- Bt as DataTableSortRequestParams,
6013
- Wt as DateTimeProvider,
6014
- Hr as DeletableNamedIdentity,
6057
+ es as DataSuggestionProvider,
6058
+ jt as DataTablePagination,
6059
+ ht as DataTablePaginationRequestParams,
6060
+ Wt as DataTableSortRequestParams,
6061
+ Kt as DateTimeProvider,
6062
+ Fr as DeletableNamedIdentity,
6015
6063
  fe as DeliveryAddress,
6016
6064
  J as DeliveryType,
6017
6065
  Dt as DetailedJwtPayload,
6018
- et as DeviceTypeResolutionConfig,
6019
- zr as DiscountShortInfo,
6020
- Xt as FieldValidationResultData,
6021
- ie as FilterGroup,
6066
+ tt as DeviceTypeResolutionConfig,
6067
+ Br as DiscountShortInfo,
6068
+ rs as FieldValidationResultData,
6069
+ ne as FilterGroup,
6022
6070
  Fe as FilterItem,
6023
- Oe as FilterOpEnum,
6071
+ qe as FilterOpEnum,
6024
6072
  Xe as GeoCoordinates,
6025
6073
  Nr as HiddenCatalogableItem,
6026
- se as HttpCachedRequester,
6027
- rt as HttpParamsConfig,
6074
+ ie as HttpCachedRequester,
6075
+ st as HttpParamsConfig,
6028
6076
  h as HttpRequester,
6029
6077
  B as Identity,
6030
6078
  Or as Image,
6031
- pe as JwtPayload,
6032
- ve as Manager,
6033
- re as ManagerCommon,
6034
- Vt as ManagerDataFactory,
6035
- pt as ManagerDataProvider,
6036
- mt as MetaTagItem,
6037
- a as NamedIdentity,
6079
+ ue as JwtPayload,
6080
+ Ce as Manager,
6081
+ te as ManagerCommon,
6082
+ Qt as ManagerDataFactory,
6083
+ Qr as ManagerDataProvider,
6084
+ ft as MetaTagItem,
6085
+ $ as NamedIdentity,
6038
6086
  M as Opf,
6039
- T as OpfEnum,
6040
- gt as Order,
6041
- pr as OrderInfo,
6042
- Jr as OrderPaymentStatus,
6043
- ht as OrderProduct,
6044
- ur as OrderShortInfo,
6045
- Kr as OrderStatus,
6046
- Et as OrdersDataProvider,
6087
+ b as OpfEnum,
6088
+ mt as Order,
6089
+ ur as OrderInfo,
6090
+ Vr as OrderPaymentStatus,
6091
+ gt as OrderProduct,
6092
+ pr as OrderShortInfo,
6093
+ Er as OrderStatus,
6094
+ Yt as OrdersDataProvider,
6047
6095
  Y as PartnerGroup,
6048
- Qr as PaymentType,
6049
- at as PreferencesStorageProvider,
6096
+ Jr as PaymentType,
6097
+ Tt as PreferencesStorageProvider,
6050
6098
  $e as PriceAnalyze,
6051
- Jt as PriceAnalyzeProvider,
6052
- we as PriceCoefficient,
6099
+ Xt as PriceAnalyzeProvider,
6100
+ ye as PriceCoefficient,
6053
6101
  Ye as PriceCoefficientEnum,
6054
6102
  j as PriceTemplate,
6055
- Re as PriceTemplateCategory,
6056
- X as PriceTemplateClient,
6057
- rr as PriceTemplateICatalogableItem,
6058
- Ae as PriceTemplateProduct,
6059
- Ot as PriceTemplateProvider,
6060
- ee as PricingRole,
6061
- qt as PricingRoleProvider,
6062
- Te as PrimaryCatalogableItem,
6063
- b as Product,
6064
- xt as ProductCategoryDataProvider,
6065
- kt as ProductDataProvider,
6066
- Yr as ProductFileType,
6067
- xe as ProductPriceCoefficient,
6068
- Zr as ProductPriceHistory,
6069
- Ut as PropertiesProvider,
6070
- Z as Property,
6103
+ Ae as PriceTemplateCategory,
6104
+ Z as PriceTemplateClient,
6105
+ er as PriceTemplateICatalogableItem,
6106
+ ae as PriceTemplateProduct,
6107
+ Mt as PriceTemplateProvider,
6108
+ re as PricingRole,
6109
+ Ft as PricingRoleProvider,
6110
+ be as PrimaryCatalogableItem,
6111
+ _ as Product,
6112
+ Ot as ProductCategoryDataProvider,
6113
+ qt as ProductDataProvider,
6114
+ Kr as ProductFileType,
6115
+ de as ProductPriceCoefficient,
6116
+ rt as ProductPriceHistory,
6117
+ Bt as PropertiesProvider,
6118
+ ee as Property,
6071
6119
  tr as PropertyType,
6072
- Br as PropertyTypeEnum,
6120
+ Mr as PropertyTypeEnum,
6073
6121
  H as PropertyValue,
6074
- Gt as RecommendationsDataProvider,
6122
+ Ht as RecommendationsDataProvider,
6075
6123
  Ge as RecommendationsList,
6076
- C as Reference,
6124
+ w as Reference,
6077
6125
  A as ReferenceDataProvider,
6078
- te as Region,
6126
+ se as Region,
6079
6127
  ir as ResourceType,
6080
- S as SalesDirection,
6081
- tt as SentryConfig,
6128
+ I as SalesDirection,
6129
+ it as SentryConfig,
6082
6130
  We as Seo,
6083
- Kt as SeoDataProvider,
6131
+ Zt as SeoDataProvider,
6084
6132
  nr as SourcePrimaryInterest,
6085
- dr as StockCount,
6086
- Tt as TemplatesListFilters,
6087
- ke as TypedInstanceFactory,
6133
+ xr as StockCount,
6134
+ bt as TemplatesListFilters,
6135
+ xe as TypedInstanceFactory,
6088
6136
  ze as UnitsHelper,
6089
- zt as UnknownClientDataProvider,
6090
- er as UpdatableNamedIdentity,
6091
- Gr as User,
6092
- Ze as UserCommonInfo,
6093
- Mr as UserDataProvider,
6137
+ Et as UnknownClientDataProvider,
6138
+ Ze as UpdatableNamedIdentity,
6139
+ Xr as User,
6140
+ It as UserAuthDataProvider,
6141
+ rr as UserCommonInfo,
6142
+ Zr as UserDataProvider,
6094
6143
  G as UserShortInfo,
6095
- Xr as UserTypeEnum,
6096
- st as VersionConfig,
6097
- Ce as Warehouse,
6144
+ Yr as UserTypeEnum,
6145
+ nt as VersionConfig,
6146
+ we as Warehouse,
6098
6147
  Be as findCatalogItemByIdRecursive,
6099
- Qt as useReferencesStore,
6100
- Ue as useUserStateStore
6148
+ Re as useAuthStateStore,
6149
+ St as useReferencesStore,
6150
+ Lt as useUserStateStore
6101
6151
  };
6102
6152
  //# sourceMappingURL=sc-common-lib.js.map