@snabcentr/common-lib 2.16.1 → 2.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/dist/manifest.json +1 -1
  2. package/dist/release_notes.tmp +1 -1
  3. package/dist/sc-common-lib.js +973 -984
  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/classes/detailed-jwt-payload.d.ts.map +1 -1
  8. package/dist/src/catalog/providers/client-price-template-provider.d.ts.map +1 -1
  9. package/dist/src/catalog/providers/client-product-category-data-provider.d.ts.map +1 -1
  10. package/dist/src/catalog/providers/price-template-provider.d.ts.map +1 -1
  11. package/dist/src/catalog/providers/pricing-role-provider.d.ts.map +1 -1
  12. package/dist/src/catalog/providers/product-category-data-provider.d.ts.map +1 -1
  13. package/dist/src/catalog/providers/properties-provider.d.ts.map +1 -1
  14. package/dist/src/catalog/providers/template-product-category-data-provider.d.ts.map +1 -1
  15. package/dist/src/clients/providers/client-data-provider.d.ts.map +1 -1
  16. package/dist/src/http/classes/http-cached-requester.d.ts +4 -3
  17. package/dist/src/http/classes/http-cached-requester.d.ts.map +1 -1
  18. package/dist/src/http/classes/http-requester.d.ts +22 -2
  19. package/dist/src/http/classes/http-requester.d.ts.map +1 -1
  20. package/dist/src/http/types/http-request-params.d.ts +5 -0
  21. package/dist/src/http/types/http-request-params.d.ts.map +1 -0
  22. package/dist/src/http/types/index.d.ts +1 -0
  23. package/dist/src/http/types/index.d.ts.map +1 -1
  24. package/dist/src/i18n/helpers/pluralize.d.ts.map +1 -1
  25. package/dist/src/offers/providers/offers-data-provider.d.ts.map +1 -1
  26. package/dist/src/orders/classes/order-item.d.ts +1 -1
  27. package/dist/src/orders/classes/order-item.d.ts.map +1 -1
  28. package/dist/src/orders/classes/orders-list-filters.d.ts.map +1 -1
  29. package/dist/src/orders/providers/orders-data-provider.d.ts.map +1 -1
  30. package/dist/src/pagination/providers/base-pagination-provider.d.ts +13 -0
  31. package/dist/src/pagination/providers/base-pagination-provider.d.ts.map +1 -1
  32. package/dist/src/price-analyze/providers/price-analyze-provider.d.ts.map +1 -1
  33. package/dist/src/system/providers/preferences-storage-provider.d.ts.map +1 -1
  34. package/dist/src/system/providers/typed-instance-factory.d.ts +9 -0
  35. package/dist/src/system/providers/typed-instance-factory.d.ts.map +1 -1
  36. package/dist/src/table-data/classes/filter-item.d.ts.map +1 -1
  37. package/dist/src/user-regions/providers/user-region-provider.d.ts.map +1 -1
  38. package/package.json +14 -5
@@ -1,14 +1,14 @@
1
- var jr = Object.defineProperty;
2
- var Gr = (n, r, e) => r in n ? jr(n, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[r] = e;
3
- var s = (n, r, e) => Gr(n, typeof r != "symbol" ? r + "" : r, e);
4
- import { jwtDecode as yr } from "jwt-decode";
5
- import { merge as we, isNil as d, isEmpty as se, noop as v, mapValues as wr, isArray as B, every as Wr, split as zr, isString as C, constant as Jr, toUpper as Er, cloneDeep as Vr, toLower as Kr, isFunction as We, map as ae, forEach as Qr, isDate as Fe, isObject as ze, omitBy as vr } from "lodash-es";
6
- import { objectToCamel as Je, objectToSnake as rr } from "ts-case-convert";
7
- import { defineStore as J } from "pinia";
8
- import { ref as w, markRaw as Yr, computed as D } from "vue";
9
- import { isAfter as tr, parseISO as a, startOfToday as He, format as L, addBusinessDays as Xr, endOfTomorrow as Zr, startOfTomorrow as et, endOfYesterday as rt, startOfYesterday as tt, endOfToday as st, endOfDay as it, startOfDay as nt, addSeconds as ot } from "date-fns";
10
- import ct, { CanceledError as lt } from "axios";
11
- class M {
1
+ var zr = Object.defineProperty;
2
+ var Wr = (i, r, e) => r in i ? zr(i, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[r] = e;
3
+ var s = (i, r, e) => Wr(i, typeof r != "symbol" ? r + "" : r, e);
4
+ import { jwtDecode as wr } from "jwt-decode";
5
+ import { merge as Ce, isNil as d, isEmpty as se, noop as w, mapValues as vr, isArray as U, every as Er, split as Jr, isString as R, constant as Vr, toUpper as Kr, cloneDeep as Qr, map as le, isObject as We, isError as rr, toLower as Yr, isFunction as Ee, forEach as Xr, isDate as He, isPlainObject as Zr, omitBy as Cr } from "lodash-es";
6
+ import { objectToCamel as Je, objectToSnake as tr } from "ts-case-convert";
7
+ import { defineStore as E } from "pinia";
8
+ import { ref as y, markRaw as et, computed as D } from "vue";
9
+ import { isAfter as sr, parseISO as P, startOfToday as Me, format as k, addBusinessDays as rt, endOfTomorrow as tt, startOfTomorrow as st, endOfYesterday as it, startOfYesterday as nt, endOfToday as ot, endOfDay as ct, startOfDay as lt, addSeconds as ut } from "date-fns";
10
+ import pt, { CanceledError as ht } from "axios";
11
+ class ue {
12
12
  /**
13
13
  * Инициализирует экземпляр класса {@link JwtPayload}.
14
14
  *
@@ -99,7 +99,7 @@ class M {
99
99
  * @inheritDoc
100
100
  */
101
101
  s(this, "email", "");
102
- we(this, r);
102
+ Ce(this, r);
103
103
  }
104
104
  /**
105
105
  * Возвращает данные полезной нагрузки для указанного JWT-токена.
@@ -107,11 +107,11 @@ class M {
107
107
  * @param jwtToken JWT-ключ доступа.
108
108
  */
109
109
  static getJwtPayload(r) {
110
- const e = yr(r), t = new M(Je(e));
110
+ const e = wr(r), t = new ue(Je(e));
111
111
  return t.resourceAccess = e.resource_access, t;
112
112
  }
113
113
  }
114
- class ss extends M {
114
+ class Rr extends ue {
115
115
  /**
116
116
  * Инициализирует экземпляр класса {@link DetailedJwtPayload}.
117
117
  *
@@ -143,7 +143,7 @@ class ss extends M {
143
143
  * @inheritDoc
144
144
  */
145
145
  s(this, "address");
146
- we(this, e);
146
+ Ce(this, e);
147
147
  }
148
148
  /**
149
149
  * Возвращает данные полезной нагрузки для указанного JWT-токена.
@@ -151,10 +151,11 @@ class ss extends M {
151
151
  * @param jwtToken JWT-ключ доступа.
152
152
  */
153
153
  static getJwtPayload(e) {
154
- return new M(Je(yr(e)));
154
+ const t = wr(e), n = new Rr(Je(t));
155
+ return n.resourceAccess = t.resource_access, n;
155
156
  }
156
157
  }
157
- class ut {
158
+ class gt {
158
159
  /**
159
160
  * Инициализирует экземпляр класса {@link DeviceTypeResolutionConfig}.
160
161
  *
@@ -176,7 +177,7 @@ class ut {
176
177
  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;
177
178
  }
178
179
  }
179
- class pt {
180
+ class ft {
180
181
  /**
181
182
  * Инициализирует экземпляр класса {@link HttpParamsConfig}.
182
183
  *
@@ -198,7 +199,7 @@ class pt {
198
199
  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;
199
200
  }
200
201
  }
201
- class ht {
202
+ class mt {
202
203
  /**
203
204
  * Инициализирует экземпляр класса {@link SentryConfig}.
204
205
  *
@@ -229,7 +230,7 @@ class ht {
229
230
  * Дополнительные параметры.
230
231
  */
231
232
  s(this, "additionalParams");
232
- var e, t, i, o;
233
+ var e, t, n, o;
233
234
  this.dsn = (r == null ? void 0 : r.dsn) ?? "", this.environment = (r == null ? void 0 : r.environment) ?? "production", this.ignoreErrors = (r == null ? void 0 : r.ignoreErrors) ?? [
234
235
  /Network\s{1,3}Error/,
235
236
  /Request\s{1,3}aborted/,
@@ -238,12 +239,12 @@ class ht {
238
239
  allowedTargets: ((e = r == null ? void 0 : r.trace) == null ? void 0 : e.allowedTargets) ?? [/^\//],
239
240
  sampleRate: ((t = r == null ? void 0 : r.trace) == null ? void 0 : t.sampleRate) ?? 0
240
241
  }, this.replay = {
241
- replaysOnErrorSampleRate: ((i = r == null ? void 0 : r.replay) == null ? void 0 : i.replaysOnErrorSampleRate) ?? 0,
242
+ replaysOnErrorSampleRate: ((n = r == null ? void 0 : r.replay) == null ? void 0 : n.replaysOnErrorSampleRate) ?? 0,
242
243
  replaysSessionSampleRate: ((o = r == null ? void 0 : r.replay) == null ? void 0 : o.replaysSessionSampleRate) ?? 0
243
244
  }, this.additionalParams = (r == null ? void 0 : r.additionalParams) ?? {};
244
245
  }
245
246
  }
246
- class gt {
247
+ class yt {
247
248
  /**
248
249
  * Инициализирует экземпляр класса {@link WebSocketConfig}.
249
250
  *
@@ -282,7 +283,7 @@ class gt {
282
283
  this.broadcaster = r.broadcaster ?? "reverb", this.key = r.key ?? "", this.wsHost = r.wsHost ?? "", this.wsPort = r.wsPort ?? 8080, this.wssPort = r.wssPort ?? 8080, this.forceTLS = r.forceTLS ?? !1, this.enabledTransports = r.enabledTransports ?? ["wss"];
283
284
  }
284
285
  }
285
- class mt {
286
+ class wt {
286
287
  /**
287
288
  * Инициализирует экземпляр класса {@link AppBaseConfig}.
288
289
  *
@@ -325,41 +326,41 @@ class mt {
325
326
  * @inheritDoc
326
327
  */
327
328
  s(this, "dateFormats");
328
- var e, t, i;
329
- this.environment = (r == null ? void 0 : r.environment) ?? "production", this.devMode = (r == null ? void 0 : r.devMode) ?? {}, this.http = new pt(r == null ? void 0 : r.http), this.deviceTypeByResolution = new ut(r == null ? void 0 : r.deviceTypeByResolution), this.sentry = new ht({
329
+ var e, t, n;
330
+ this.environment = (r == null ? void 0 : r.environment) ?? "production", this.devMode = (r == null ? void 0 : r.devMode) ?? {}, this.http = new ft(r == null ? void 0 : r.http), this.deviceTypeByResolution = new gt(r == null ? void 0 : r.deviceTypeByResolution), this.sentry = new mt({
330
331
  environment: this.environment,
331
332
  ...r == null ? void 0 : r.sentry
332
- }), this.tableDefaultHeightCoefficient = (r == null ? void 0 : r.tableDefaultHeightCoefficient) ?? 0.7, this.urls = r == null ? void 0 : r.urls, this.websocket = r != null && r.websocket ? new gt(r.websocket) : void 0, this.dateFormats = {
333
+ }), this.tableDefaultHeightCoefficient = (r == null ? void 0 : r.tableDefaultHeightCoefficient) ?? 0.7, this.urls = r == null ? void 0 : r.urls, this.websocket = r != null && r.websocket ? new yt(r.websocket) : void 0, this.dateFormats = {
333
334
  api: ((e = r == null ? void 0 : r.dateFormats) == null ? void 0 : e.api) ?? "yyyy-MM-dd HH:mm:ss",
334
335
  uiDate: ((t = r == null ? void 0 : r.dateFormats) == null ? void 0 : t.uiDate) ?? "dd.MM.yyyy",
335
- uiDateWithTime: ((i = r == null ? void 0 : r.dateFormats) == null ? void 0 : i.uiDateWithTime) ?? "dd.MM.yyyy HH:mm"
336
+ uiDateWithTime: ((n = r == null ? void 0 : r.dateFormats) == null ? void 0 : n.uiDateWithTime) ?? "dd.MM.yyyy HH:mm"
336
337
  };
337
338
  }
338
339
  }
339
- const k = J("common.config", () => {
340
- const n = w(new mt());
340
+ const L = E("common.config", () => {
341
+ const i = y(new wt());
341
342
  return {
342
343
  /**
343
344
  * Конфигурационные данные приложения.
344
345
  */
345
- config: n,
346
+ config: i,
346
347
  /**
347
348
  * Получает конфигурацию приложения.
348
349
  *
349
350
  * @returns Конфигурация приложения.
350
351
  */
351
- getConfig: () => n.value,
352
+ getConfig: () => i.value,
352
353
  /**
353
354
  * Устанавливает конфигурацию приложения.
354
355
  *
355
356
  * @param appConfig Конфигурация приложения.
356
357
  */
357
358
  setConfig: (t) => {
358
- n.value = we(n.value, t);
359
+ i.value = Ce(i.value, t);
359
360
  }
360
361
  };
361
362
  });
362
- class De {
363
+ class Ae {
363
364
  /**
364
365
  * Возвращает актуальные и не просроченные данные из хранилища.
365
366
  *
@@ -378,11 +379,12 @@ class De {
378
379
  if (e)
379
380
  try {
380
381
  const t = JSON.parse(e);
381
- if (!t.availableFor || tr(a(t.availableFor) || He(), /* @__PURE__ */ new Date())) {
382
+ if (!t.availableFor || sr(P(t.availableFor) || Me(), /* @__PURE__ */ new Date())) {
382
383
  if (d(t.data) || se(t.data))
383
384
  throw new Error("Data is empty");
384
385
  return t.data;
385
386
  }
387
+ localStorage.removeItem(r);
386
388
  } catch {
387
389
  try {
388
390
  localStorage.removeItem(r);
@@ -403,14 +405,14 @@ class De {
403
405
  try {
404
406
  if (d(e) || se(e))
405
407
  throw new Error("Data is empty");
406
- const i = JSON.stringify({
408
+ const n = JSON.stringify({
407
409
  availableFor: t,
408
410
  // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
409
411
  data: e
410
412
  });
411
- localStorage.setItem(r, i);
412
- } catch (i) {
413
- if (i instanceof DOMException && i.code === DOMException.QUOTA_EXCEEDED_ERR) {
413
+ localStorage.setItem(r, n);
414
+ } catch (n) {
415
+ if (n instanceof DOMException && n.code === DOMException.QUOTA_EXCEEDED_ERR) {
414
416
  this.clearOldData();
415
417
  try {
416
418
  const o = JSON.stringify({
@@ -449,10 +451,10 @@ class De {
449
451
  const t = localStorage.key(e);
450
452
  if (t)
451
453
  try {
452
- const i = localStorage.getItem(t);
453
- if (i) {
454
- const o = JSON.parse(i);
455
- o.availableFor && !tr(a(o.availableFor) || He(), /* @__PURE__ */ new Date()) && r.push(t);
454
+ const n = localStorage.getItem(t);
455
+ if (n) {
456
+ const o = JSON.parse(n);
457
+ o.availableFor && !sr(P(o.availableFor) || Me(), /* @__PURE__ */ new Date()) && r.push(t);
456
458
  }
457
459
  } catch {
458
460
  r.push(t);
@@ -468,39 +470,39 @@ class De {
468
470
  }
469
471
  }
470
472
  }
471
- function sr(n) {
473
+ function ir(i) {
472
474
  try {
473
- const r = M.getJwtPayload(n);
475
+ const r = ue.getJwtPayload(i);
474
476
  return new Date(r.exp * 1e3);
475
477
  } catch {
476
478
  return;
477
479
  }
478
480
  }
479
- const Y = J("common.auth_state_private", () => {
480
- const n = w(
481
+ const Y = E("common.auth_state_private", () => {
482
+ const i = y(
481
483
  (() => {
482
484
  var u;
483
- const o = De.getActualDataFromStorage(
485
+ const o = Ae.getActualDataFromStorage(
484
486
  "sc.token"
485
487
  /* JwtToken */
486
488
  );
487
489
  if (o)
488
490
  return Promise.resolve(o);
489
- const c = (u = k().config.devMode) == null ? void 0 : u.initAuthBearerToken;
491
+ const c = (u = L().config.devMode) == null ? void 0 : u.initAuthBearerToken;
490
492
  return c ? Promise.resolve(c) : void 0;
491
493
  })()
492
- ), r = w(void 0), e = w(void 0), t = Yr(/* @__PURE__ */ new Map());
493
- function i() {
494
- e.value = void 0, d(n.value) || n.value.then((o) => {
495
- const c = M.getJwtPayload(o);
496
- e.value = c.exp * 1e3 > Date.now() ? wr(c.resourceAccess, (u) => (u == null ? void 0 : u.roles) ?? []) : void 0;
497
- }).catch(v);
494
+ ), r = y(void 0), e = y(void 0), t = et(/* @__PURE__ */ new Map());
495
+ function n() {
496
+ e.value = void 0, d(i.value) || i.value.then((o) => {
497
+ const c = ue.getJwtPayload(o);
498
+ e.value = c.exp * 1e3 > Date.now() ? vr(c.resourceAccess, (u) => (u == null ? void 0 : u.roles) ?? []) : void 0;
499
+ }).catch(w);
498
500
  }
499
501
  return {
500
502
  /**
501
503
  * {@link Promise<string>} для получения jwt-ключа доступа к системам.
502
504
  */
503
- jwtToken: n,
505
+ jwtToken: i,
504
506
  /**
505
507
  * Функция для обновления jwt-ключа доступа к системам.
506
508
  */
@@ -516,16 +518,16 @@ const Y = J("common.auth_state_private", () => {
516
518
  /**
517
519
  * Принудительно пересчитывает права доступа пользователя на основе текущего JWT токена.
518
520
  */
519
- recalculateUserPermissions: i
521
+ recalculateUserPermissions: n
520
522
  };
521
- }), Ie = J("common.auth_state", () => {
522
- const n = D(() => {
523
+ }), xe = E("common.auth_state", () => {
524
+ const i = D(() => {
523
525
  const o = Y();
524
526
  if (d(o.jwtToken) && !d(o.jwtTokenUpdater)) {
525
527
  const c = o.jwtTokenUpdater();
526
528
  o.jwtToken = c, c.then((u) => {
527
- o.jwtToken = Promise.resolve(u), De.saveActualDataToStorage("sc.token", u, sr(u)), o.recalculateUserPermissions();
528
- }).catch(v);
529
+ o.jwtToken = Promise.resolve(u), Ae.saveActualDataToStorage("sc.token", u, ir(u)), o.recalculateUserPermissions();
530
+ }).catch(w);
529
531
  }
530
532
  return o.jwtToken;
531
533
  });
@@ -534,31 +536,31 @@ const Y = J("common.auth_state_private", () => {
534
536
  }
535
537
  function e(o) {
536
538
  const c = Y();
537
- c.jwtToken = Promise.resolve(o), De.saveActualDataToStorage("sc.token", o, sr(o)), c.recalculateUserPermissions();
539
+ c.jwtToken = Promise.resolve(o), Ae.saveActualDataToStorage("sc.token", o, ir(o)), c.recalculateUserPermissions();
538
540
  }
539
541
  function t() {
540
542
  const o = Y();
541
- o.jwtToken = void 0, o.userPermissions = void 0, De.saveActualDataToStorage("sc.token", void 0);
543
+ o.jwtToken = void 0, o.userPermissions = void 0, Ae.saveActualDataToStorage("sc.token", void 0);
542
544
  }
543
- function i(o) {
545
+ function n(o) {
544
546
  const c = Y();
545
- !d(c.jwtToken) && d(c.userPermissions) && c.jwtToken.then((m) => {
546
- const f = M.getJwtPayload(m);
547
- c.userPermissions = f.exp * 1e3 > Date.now() ? wr(f.resourceAccess, (R) => (R == null ? void 0 : R.roles) ?? []) : void 0;
548
- }).catch(v);
549
- const u = B(o) ? o.join(" && ") : o;
547
+ !d(c.jwtToken) && d(c.userPermissions) && c.jwtToken.then((f) => {
548
+ const v = ue.getJwtPayload(f);
549
+ c.userPermissions = v.exp * 1e3 > Date.now() ? vr(v.resourceAccess, (a) => (a == null ? void 0 : a.roles) ?? []) : void 0;
550
+ }).catch(w);
551
+ const u = U(o) ? o.join(" && ") : o;
550
552
  if (c.userPermissionsComputedRefs.has(u))
551
553
  return c.userPermissionsComputedRefs.get(u);
552
554
  const p = D(() => {
553
- const m = (f) => {
555
+ const f = (v) => {
554
556
  var Q;
555
- const R = zr(f, ".");
556
- if (R.length < 2)
557
+ const a = Jr(v, ".");
558
+ if (a.length < 2)
557
559
  return !1;
558
- const [pe, he] = R, K = (Q = Y().userPermissions) == null ? void 0 : Q[pe];
559
- return B(K) && K.includes(he);
560
+ const [ge, fe] = a, K = (Q = Y().userPermissions) == null ? void 0 : Q[ge];
561
+ return U(K) && K.includes(fe);
560
562
  };
561
- return B(o) ? Wr(o, (f) => m(f)) : m(o);
563
+ return U(o) ? Er(o, (v) => f(v)) : f(o);
562
564
  });
563
565
  return c.userPermissionsComputedRefs.set(u, p), p;
564
566
  }
@@ -566,7 +568,7 @@ const Y = J("common.auth_state_private", () => {
566
568
  /**
567
569
  * {@link Promise<string>} для получения jwt-ключа доступа к системам.
568
570
  */
569
- jwtToken: n,
571
+ jwtToken: i,
570
572
  /**
571
573
  * Устанавливает механизм для обновления jwt-ключа доступа к системам.
572
574
  *
@@ -588,10 +590,10 @@ const Y = J("common.auth_state_private", () => {
588
590
  *
589
591
  * @param name Проверяемое право доступа или их список. Должны быть представлены в виде значения: <РЕСУРС>.<РОЛЬ>.
590
592
  */
591
- hasUserPermission: i
593
+ hasUserPermission: n
592
594
  };
593
595
  });
594
- class E {
596
+ class J {
595
597
  /**
596
598
  * Инициализирует экземпляр класса {@link Identity}.
597
599
  *
@@ -616,7 +618,7 @@ class E {
616
618
  return typeof this.id == "number" ? this.id === -1 : typeof this.id == "string" ? this.id === "" : d(this.id);
617
619
  }
618
620
  }
619
- class b extends E {
621
+ class b extends J {
620
622
  /**
621
623
  * Инициализирует экземпляр класса {@link NamedIdentity}.
622
624
  *
@@ -631,7 +633,7 @@ class b extends E {
631
633
  this.name = (e == null ? void 0 : e.name) ?? "";
632
634
  }
633
635
  }
634
- class I extends b {
636
+ class x extends b {
635
637
  /**
636
638
  * Инициализирует экземпляр класса {@link UserShortInfo}.
637
639
  *
@@ -650,7 +652,7 @@ class I extends b {
650
652
  this.type = e == null ? void 0 : e.type, this.isActive = (e == null ? void 0 : e.isActive) ?? !0;
651
653
  }
652
654
  }
653
- class ft extends b {
655
+ class vt extends b {
654
656
  /**
655
657
  * Инициализирует экземпляр класса {@link DiscountShortInfo}.
656
658
  *
@@ -686,10 +688,10 @@ class ft extends b {
686
688
  * Дата и время удаления.
687
689
  */
688
690
  s(this, "deletedAt");
689
- this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.isLowPriceAllowed = (e == null ? void 0 : e.isLowPriceAllowed) ?? !1, this.publishedAt = C(e == null ? void 0 : e.publishedAt) ? a(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 I(e == null ? void 0 : e.owner), this.deletedAt = C(e == null ? void 0 : e.deletedAt) ? a(e.deletedAt) : e == null ? void 0 : e.deletedAt;
691
+ this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.isLowPriceAllowed = (e == null ? void 0 : e.isLowPriceAllowed) ?? !1, this.publishedAt = R(e == null ? void 0 : e.publishedAt) ? P(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 x(e == null ? void 0 : e.owner), this.deletedAt = R(e == null ? void 0 : e.deletedAt) ? P(e.deletedAt) : e == null ? void 0 : e.deletedAt;
690
692
  }
691
693
  }
692
- class Cr extends b {
694
+ class Pr extends b {
693
695
  /**
694
696
  * Инициализирует экземпляр класса {@link UpdatableNamedIdentity}.
695
697
  *
@@ -701,10 +703,10 @@ class Cr extends b {
701
703
  * Дата и время последнего изменения.
702
704
  */
703
705
  s(this, "updatedAt");
704
- this.updatedAt = C(e == null ? void 0 : e.updatedAt) ? a(e.updatedAt) : e == null ? void 0 : e.updatedAt;
706
+ this.updatedAt = R(e == null ? void 0 : e.updatedAt) ? P(e.updatedAt) : e == null ? void 0 : e.updatedAt;
705
707
  }
706
708
  }
707
- class ee extends Cr {
709
+ class ee extends Pr {
708
710
  /**
709
711
  * Инициализирует экземпляр класса {@link PriceTemplate}.
710
712
  *
@@ -724,11 +726,11 @@ class ee extends Cr {
724
726
  * Данные о пользователе, создавшем шаблон прайс-листа.
725
727
  */
726
728
  s(this, "owner");
727
- this.description = (e == null ? void 0 : e.description) ?? "", this.createdAt = C(e == null ? void 0 : e.createdAt) ? a(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.owner = e != null && e.owner ? new I(e.owner) : void 0;
729
+ this.description = (e == null ? void 0 : e.description) ?? "", this.createdAt = R(e == null ? void 0 : e.createdAt) ? P(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.owner = e != null && e.owner ? new x(e.owner) : void 0;
728
730
  }
729
731
  }
730
- var ar = /* @__PURE__ */ ((n) => (n.K0 = "k0", n.K1 = "k1", n.K2 = "k2", n.K3 = "k3", n.K4 = "k4", n.Retail = "retail", n))(ar || {});
731
- class y extends b {
732
+ var Dr = /* @__PURE__ */ ((i) => (i.K0 = "k0", i.K1 = "k1", i.K2 = "k2", i.K3 = "k3", i.K4 = "k4", i.Retail = "retail", i))(Dr || {});
733
+ class m extends b {
732
734
  /**
733
735
  * Инициализирует экземпляр класса {@link Reference}.
734
736
  *
@@ -747,15 +749,15 @@ class y extends b {
747
749
  this.description = e == null ? void 0 : e.description, this.slug = e == null ? void 0 : e.slug;
748
750
  }
749
751
  }
750
- class Te extends y {
752
+ class de extends m {
751
753
  /**
752
754
  * Возвращает значение справочника коэффициента розничной цены.
753
755
  */
754
756
  static getRetailPriceCoefficient() {
755
- return { id: -2, slug: ar.Retail, name: "Розн. цена", guid: "", isNewRec: Jr(!0) };
757
+ return { id: -2, slug: Dr.Retail, name: "Розн. цена", guid: "", isNewRec: Vr(!0) };
756
758
  }
757
759
  }
758
- class Ee {
760
+ class Ve {
759
761
  /**
760
762
  * Инициализирует экземпляр класса {@link ProductPriceCoefficient}.
761
763
  *
@@ -782,10 +784,10 @@ class Ee {
782
784
  * Признак того, что указанный коэффициент доступен текущему пользователю только для просмотра.
783
785
  */
784
786
  s(this, "readOnly");
785
- this.coefficient = new Te(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;
787
+ this.coefficient = new de(r == null ? void 0 : r.coefficient), this.value = (r == null ? void 0 : r.value) ?? 0, this.cost = (r == null ? void 0 : r.cost) ?? 0, this.percent = (r == null ? void 0 : r.percent) ?? 0, this.readOnly = (r == null ? void 0 : r.readOnly) ?? !0;
786
788
  }
787
789
  }
788
- class Rr {
790
+ class ar {
789
791
  /**
790
792
  * Инициализирует экземпляр класса {@link GeoCoordinates}.
791
793
  *
@@ -803,9 +805,9 @@ class Rr {
803
805
  this.lat = (r == null ? void 0 : r.lat) ?? 0, this.long = (r == null ? void 0 : r.long) ?? 0;
804
806
  }
805
807
  }
806
- class H extends y {
808
+ class B extends m {
807
809
  }
808
- class Re extends y {
810
+ class De extends m {
809
811
  /**
810
812
  * Инициализирует экземпляр класса {@link Warehouse}.
811
813
  *
@@ -834,10 +836,10 @@ class Re extends y {
834
836
  * Координаты склада.
835
837
  */
836
838
  s(this, "coordinates");
837
- this.address = (e == null ? void 0 : e.address) ?? "", this.isMain = (e == null ? void 0 : e.isMain) ?? !1, this.deliveryTypes = ((t = e == null ? void 0 : e.deliveryTypes) == null ? void 0 : t.map((i) => new H(i))) ?? [], this.regions = (e == null ? void 0 : e.regions) ?? [], this.coordinates = new Rr(e == null ? void 0 : e.coordinates);
839
+ this.address = (e == null ? void 0 : e.address) ?? "", this.isMain = (e == null ? void 0 : e.isMain) ?? !1, this.deliveryTypes = ((t = e == null ? void 0 : e.deliveryTypes) == null ? void 0 : t.map((n) => new B(n))) ?? [], this.regions = (e == null ? void 0 : e.regions) ?? [], this.coordinates = new ar(e == null ? void 0 : e.coordinates);
838
840
  }
839
841
  }
840
- class yt {
842
+ class Ct {
841
843
  /**
842
844
  * Инициализирует экземпляр класса {@link StockCount}.
843
845
  *
@@ -852,10 +854,10 @@ class yt {
852
854
  * Количество остатков товара на складе.
853
855
  */
854
856
  s(this, "count");
855
- this.warehouse = new Re(r == null ? void 0 : r.warehouse), this.count = (r == null ? void 0 : r.count) ?? 0;
857
+ this.warehouse = new De(r == null ? void 0 : r.warehouse), this.count = (r == null ? void 0 : r.count) ?? 0;
856
858
  }
857
859
  }
858
- class N extends b {
860
+ class F extends b {
859
861
  /**
860
862
  * Инициализирует экземпляр класса {@link Currency}.
861
863
  *
@@ -882,7 +884,7 @@ class N extends b {
882
884
  e && (this.signature = e.signature ?? "", this.code = e.code, this.symbol = e.symbol ?? "", this.precision = e.precision);
883
885
  }
884
886
  }
885
- class ir extends b {
887
+ class nr extends b {
886
888
  /**
887
889
  * Инициализирует экземпляр класса {@link ProductUnit}.
888
890
  *
@@ -909,7 +911,7 @@ class ir extends b {
909
911
  e && (this.slug = e.slug ?? "", this.description = e.description, this.isSquare = e.isSquare ?? !1, this.isLinear = e.isLinear ?? !1);
910
912
  }
911
913
  }
912
- class ve extends b {
914
+ class Re extends b {
913
915
  /**
914
916
  * Инициализирует экземпляр класса {@link NamedIdentity}.
915
917
  *
@@ -924,7 +926,7 @@ class ve extends b {
924
926
  this.code = (e == null ? void 0 : e.code) ?? "";
925
927
  }
926
928
  }
927
- class Pr extends ve {
929
+ class Ar extends Re {
928
930
  /**
929
931
  * Инициализирует экземпляр класса {@link CatalogableItem}.
930
932
  *
@@ -943,7 +945,7 @@ class Pr extends ve {
943
945
  this.slug = (e == null ? void 0 : e.slug) ?? "";
944
946
  }
945
947
  }
946
- class wt extends Pr {
948
+ class Rt extends Ar {
947
949
  /**
948
950
  * Инициализирует экземпляр класса {@link HiddenCatalogableItem}.
949
951
  *
@@ -958,7 +960,7 @@ class wt extends Pr {
958
960
  this.isHidden = (e == null ? void 0 : e.isHidden) ?? !1;
959
961
  }
960
962
  }
961
- class vt {
963
+ class Pt {
962
964
  /**
963
965
  * Инициализирует экземпляр класса {@link Image}.
964
966
  *
@@ -981,7 +983,7 @@ class vt {
981
983
  this.image = `${e ?? ""}${r.image}`, this.preview = `${e ?? ""}${r.preview}`, this.isDefault = r.isDefault;
982
984
  }
983
985
  }
984
- class Be extends Pr {
986
+ class Be extends Ar {
985
987
  /**
986
988
  * Инициализирует экземпляр класса {@link PrimaryCatalogableItem}.
987
989
  *
@@ -996,14 +998,14 @@ class Be extends Pr {
996
998
  this.isPrimary = (e == null ? void 0 : e.isPrimary) ?? !1;
997
999
  }
998
1000
  }
999
- class _ extends wt {
1001
+ class O extends Rt {
1000
1002
  /**
1001
1003
  * Инициализирует экземпляр класса {@link Product}.
1002
1004
  *
1003
1005
  * @param data Данные для первоначальной инициализации.
1004
1006
  */
1005
1007
  constructor(e) {
1006
- var i, o, c, u;
1008
+ var n, o, c, u;
1007
1009
  super(e);
1008
1010
  /**
1009
1011
  * Артикул производителя/поставщика.
@@ -1073,9 +1075,9 @@ class _ extends wt {
1073
1075
  * Список коэффициентов цен на продукт.
1074
1076
  */
1075
1077
  s(this, "priceCoefficients");
1076
- this.supplierSku = e == null ? void 0 : e.supplierSku, this.unit = e != null && e.unit ? new ir(e.unit) : new ir(), this.pack = e == null ? void 0 : e.pack, this.minCount = e == null ? void 0 : e.minCount, this.currency = e != null && e.currency ? new N(e.currency) : new N(), this.cost = (e == null ? void 0 : e.cost) ?? 0, this.costRub = (e == null ? void 0 : e.costRub) ?? 0, this.costDate = C(e == null ? void 0 : e.costDate) ? a(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 yt(p))) ?? [], this.type = "product";
1078
+ this.supplierSku = e == null ? void 0 : e.supplierSku, this.unit = e != null && e.unit ? new nr(e.unit) : new nr(), this.pack = e == null ? void 0 : e.pack, this.minCount = e == null ? void 0 : e.minCount, this.currency = e != null && e.currency ? new F(e.currency) : new F(), this.cost = (e == null ? void 0 : e.cost) ?? 0, this.costRub = (e == null ? void 0 : e.costRub) ?? 0, this.costDate = R(e == null ? void 0 : e.costDate) ? P(e.costDate) : e == null ? void 0 : e.costDate, this.onOrder = (e == null ? void 0 : e.onOrder) ?? !1, this.stockCount = ((n = e == null ? void 0 : e.stockCount) == null ? void 0 : n.map((p) => new Ct(p))) ?? [], this.type = "product";
1077
1079
  const t = (e == null ? void 0 : e.category) ?? ((o = e == null ? void 0 : e.categories) == null ? void 0 : o.find((p) => p.isPrimary));
1078
- t && (this.category = new Be({ ...t, isPrimary: !0 }), this.categories = [this.category]), e != null && e.categories && (this.categories = e.categories.map((p) => new Be(p))), this.images = ((c = e == null ? void 0 : e.images) == null ? void 0 : c.map((p) => new vt(p, k().config.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 Ee(p))) ?? [], e && "codeNumber" in e && !e.code && (this.code = e == null ? void 0 : e.codeNumber);
1080
+ t && (this.category = new Be({ ...t, isPrimary: !0 }), this.categories = [this.category]), e != null && e.categories && (this.categories = e.categories.map((p) => new Be(p))), this.images = ((c = e == null ? void 0 : e.images) == null ? void 0 : c.map((p) => new Pt(p, L().config.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 Ve(p))) ?? [], e && "codeNumber" in e && !e.code && (this.code = e == null ? void 0 : e.codeNumber);
1079
1081
  }
1080
1082
  /**
1081
1083
  * Возвращает признак, что это измеряемый товар.
@@ -1096,8 +1098,8 @@ class _ extends wt {
1096
1098
  return this.retailCostRub ?? this.costRub;
1097
1099
  }
1098
1100
  }
1099
- var Ve = /* @__PURE__ */ ((n) => (n.Discount = "discount", n.PriceTemplate = "price_template", n.ClientPrice = "client_price", n.Product = "product", n))(Ve || {});
1100
- class j extends _ {
1101
+ var Ke = /* @__PURE__ */ ((i) => (i.Discount = "discount", i.PriceTemplate = "price_template", i.ClientPrice = "client_price", i.Product = "product", i))(Ke || {});
1102
+ class j extends O {
1101
1103
  /**
1102
1104
  * Инициализирует экземпляр класса {@link ClientProduct}.
1103
1105
  *
@@ -1133,10 +1135,10 @@ class j extends _ {
1133
1135
  * Признак того, что указанный продукт входит в список избранных продуктов клиента.
1134
1136
  */
1135
1137
  s(this, "isFavorite");
1136
- this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.costSource = (e == null ? void 0 : e.costSource) ?? Ve.Product, this.discount = e != null && e.discount ? new ft(e.discount) : void 0, this.priceTemplate = e != null && e.priceTemplate ? new ee(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;
1138
+ this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.costSource = (e == null ? void 0 : e.costSource) ?? Ke.Product, this.discount = e != null && e.discount ? new vt(e.discount) : void 0, this.priceTemplate = e != null && e.priceTemplate ? new ee(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;
1137
1139
  }
1138
1140
  }
1139
- class le extends Be {
1141
+ class pe extends Be {
1140
1142
  /**
1141
1143
  * Инициализирует экземпляр класса {@link BaseCategory}.
1142
1144
  *
@@ -1160,10 +1162,10 @@ class le extends Be {
1160
1162
  * Список коэффициентов пересчёта из валют в рубли в формате ключ значение.
1161
1163
  */
1162
1164
  s(this, "currencyRates");
1163
- 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(([t, i]) => [Er(t), i])) : void 0;
1165
+ 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(([t, n]) => [Kr(t), n])) : void 0;
1164
1166
  }
1165
1167
  }
1166
- class Dr extends E {
1168
+ class $r extends J {
1167
1169
  /**
1168
1170
  * Инициализирует экземпляр класса {@link OrderItemBase}.
1169
1171
  *
@@ -1239,10 +1241,10 @@ class Dr extends E {
1239
1241
  * @inheritDoc
1240
1242
  */
1241
1243
  s(this, "replacementId");
1242
- this.product = new j(e.product), this.quantity = e.quantity ?? 0, this.marker = e.marker, this.category = e.category ?? new le(), this.currency = e.currency ? new N(e.currency) : void 0, this.height = e.height, this.length = e.length, this.width = e.width, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams && Vr(e.configuratorParams), this.isAdditionalSale = e.isAdditionalSale, this.creator = e.creator && new I(e.creator), this.isRemoved = e.isRemoved, this.ord = e.ord, this.onOrder = e.onOrder, this.originalId = e.originalId, this.replacementId = e.replacementId;
1244
+ this.product = new j(e.product), this.quantity = e.quantity ?? 0, this.marker = e.marker, this.category = e.category ?? new pe(), this.currency = e.currency ? new F(e.currency) : void 0, this.height = e.height, this.length = e.length, this.width = e.width, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams && Qr(e.configuratorParams), this.isAdditionalSale = e.isAdditionalSale, this.creator = e.creator && new x(e.creator), this.isRemoved = e.isRemoved, this.ord = e.ord, this.onOrder = e.onOrder, this.originalId = e.originalId, this.replacementId = e.replacementId;
1243
1245
  }
1244
1246
  }
1245
- let Ar = class extends Dr {
1247
+ let Tr = class extends $r {
1246
1248
  /**
1247
1249
  * Инициализирует экземпляр класса {@link OrderItem}.
1248
1250
  *
@@ -1286,10 +1288,10 @@ let Ar = class extends Dr {
1286
1288
  * @inheritDoc
1287
1289
  */
1288
1290
  s(this, "currency");
1289
- 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 = B(e.sawing) ? e.sawing : e.sawing ? [e.sawing] : void 0, this.currency = new N(e.currency);
1291
+ 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 = U(e.sawing) ? e.sawing : e.sawing ? [e.sawing] : void 0, this.currency = new F(e.currency);
1290
1292
  }
1291
1293
  };
1292
- class ge {
1294
+ class me {
1293
1295
  /**
1294
1296
  * Инициализирует экземпляр класса {@link Cart}.
1295
1297
  *
@@ -1308,10 +1310,10 @@ class ge {
1308
1310
  * @inheritDoc
1309
1311
  */
1310
1312
  s(this, "directionsSum");
1311
- this.items = r.items.map((e) => new Ar(e)), this.resultSum = r.resultSum, this.directionsSum = r.directionsSum;
1313
+ this.items = r.items.map((e) => new Tr(e)), this.resultSum = r.resultSum, this.directionsSum = r.directionsSum;
1312
1314
  }
1313
1315
  }
1314
- class Ke {
1316
+ class I {
1315
1317
  /**
1316
1318
  * Инициализирует экземпляр указанного класса.
1317
1319
  *
@@ -1329,8 +1331,21 @@ class Ke {
1329
1331
  static instanceInitializer(r, e) {
1330
1332
  return new r(e);
1331
1333
  }
1334
+ /**
1335
+ * Инициализирует список экземпляров указанного класса.
1336
+ *
1337
+ * @param type Тип класса, на основе которого необходимо создать экземпляры (тип возвращаемых данных).
1338
+ * @param data Список начальных данных для инициализации (параметры конструктора).
1339
+ *
1340
+ * @throws TypeError Если вместо списка данных получены данные другого типа.
1341
+ */
1342
+ static instanceListInitializer(r, e) {
1343
+ if (!U(e))
1344
+ throw new TypeError(`Ожидался список данных для инициализации "${r.name}", получены данные типа "${typeof e}".`);
1345
+ return le(e, (t) => I.instanceInitializer(r, t));
1346
+ }
1332
1347
  }
1333
- const P = class P {
1348
+ const C = class C {
1334
1349
  /**
1335
1350
  * Инициализирует экземпляр класса {@link HttpRequester}.
1336
1351
  */
@@ -1342,7 +1357,7 @@ const P = class P {
1342
1357
  /**
1343
1358
  * Базовый URL путь для выполнения запросов.
1344
1359
  */
1345
- s(this, "baseUrl", `${k().config.http.portalApiUrl}/api`);
1360
+ s(this, "baseUrl", `${L().config.http.portalApiUrl}/api`);
1346
1361
  /**
1347
1362
  * Обработчик ошибок выполнения запросов текущего экземпляра класса.
1348
1363
  *
@@ -1350,7 +1365,7 @@ const P = class P {
1350
1365
  * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
1351
1366
  * @param disableNotifications Признак необходимости отключить уведомления об ошибках.
1352
1367
  */
1353
- s(this, "errorResponseHandler", v);
1368
+ s(this, "errorResponseHandler", w);
1354
1369
  /**
1355
1370
  * Список идентификаторов обработчиков запросов для возможности отключить те или иные обработчики.
1356
1371
  */
@@ -1369,7 +1384,7 @@ const P = class P {
1369
1384
  // eslint-disable-next-line class-methods-use-this
1370
1385
  s(this, "authRequestInterceptor", async (r) => {
1371
1386
  let e;
1372
- return d(Ie().jwtToken) || (e = await Ie().jwtToken), e && r.headers.set("Authorization", `Bearer ${e}`), r;
1387
+ return d(xe().jwtToken) || (e = await xe().jwtToken), e && r.headers.set("Authorization", `Bearer ${e}`), r;
1373
1388
  });
1374
1389
  /**
1375
1390
  * Перехватчик запроса для вызова пользовательских хуков.
@@ -1377,14 +1392,14 @@ const P = class P {
1377
1392
  * @param request Данные запроса.
1378
1393
  */
1379
1394
  // eslint-disable-next-line class-methods-use-this
1380
- s(this, "userRequestHooksInterceptor", async (r) => P.requestHooks.reduce(async (e, t) => t(await e), Promise.resolve(r)));
1395
+ s(this, "userRequestHooksInterceptor", async (r) => C.requestHooks.reduce(async (e, t) => t(await e), Promise.resolve(r)));
1381
1396
  /**
1382
1397
  * Перехватчик запроса для преобразования данных запроса.
1383
1398
  *
1384
1399
  * @param request Данные запроса.
1385
1400
  */
1386
1401
  // eslint-disable-next-line class-methods-use-this
1387
- s(this, "dataConverterRequestInterceptor", (r) => (r.method && (r.method === "get" && r.params && (r.params = rr(r.params)), ["put", "patch", "post"].includes(Kr(r.method)) && r.data && (r.data = rr(r.data))), r));
1402
+ s(this, "dataConverterRequestInterceptor", (r) => (r.method && (r.method === "get" && r.params && (r.params = tr(r.params)), ["put", "patch", "post"].includes(Yr(r.method)) && r.data && (r.data = tr(r.data))), r));
1388
1403
  /**
1389
1404
  * Перехватчик ошибок ответов на запрос.
1390
1405
  *
@@ -1393,7 +1408,7 @@ const P = class P {
1393
1408
  s(this, "authErrorsResponseInterceptors", (r) => {
1394
1409
  var t;
1395
1410
  const e = r.rawError ? (t = r.rawError) == null ? void 0 : t.config : void 0;
1396
- return r.status === 401 ? !e || e.__isRetryRequest ? Promise.reject(r) : (Ie().invalidateJwtToken(), e.__isRetryRequest = !0, this.httpClient(e)) : Promise.reject(r);
1411
+ return r.status === 401 ? !e || e.__isRetryRequest ? Promise.reject(r) : (xe().invalidateJwtToken(), e.__isRetryRequest = !0, this.httpClient(e)) : Promise.reject(r);
1397
1412
  });
1398
1413
  /**
1399
1414
  * Перехватчик ответа для приведения отмены запроса (AbortController) к единому виду.
@@ -1404,7 +1419,7 @@ const P = class P {
1404
1419
  s(this, "canceledResponseInterceptor", (r) => {
1405
1420
  const e = r.rawError ?? r;
1406
1421
  if (e.name === "CanceledError" || e.code === "ERR_CANCELED")
1407
- throw new lt("Request canceled");
1422
+ throw new ht("Request canceled");
1408
1423
  return Promise.reject(r);
1409
1424
  });
1410
1425
  /**
@@ -1413,7 +1428,7 @@ const P = class P {
1413
1428
  * @param response Данные ответа на запрос.
1414
1429
  */
1415
1430
  // eslint-disable-next-line class-methods-use-this
1416
- s(this, "userResponseHooksInterceptor", async (r) => P.responseHooks.reduce(async (e, t) => t(await e), Promise.resolve(r)));
1431
+ s(this, "userResponseHooksInterceptor", async (r) => C.responseHooks.reduce(async (e, t) => t(await e), Promise.resolve(r)));
1417
1432
  /**
1418
1433
  * Перехватчик ответа для преобразования данных ответа на запрос.
1419
1434
  *
@@ -1421,7 +1436,7 @@ const P = class P {
1421
1436
  */
1422
1437
  // eslint-disable-next-line class-methods-use-this
1423
1438
  s(this, "dataConverterResponseInterceptor", (r) => (r.data && (r.data = Je(r.data)), r));
1424
- this.errorResponseHandler = P.defaultErrorsResponseHandler, this.httpClient = ct.create({
1439
+ this.errorResponseHandler = C.defaultErrorsResponseHandler, this.httpClient = pt.create({
1425
1440
  headers: {
1426
1441
  Accept: "application/json",
1427
1442
  "Content-Type": "application/json"
@@ -1431,7 +1446,7 @@ const P = class P {
1431
1446
  (r) => Promise.reject(r)
1432
1447
  ), this.interceptorIds.response.convertHttpErrorResponseInterceptor = this.httpClient.interceptors.response.use(
1433
1448
  (r) => r,
1434
- (r) => P.convertHttpErrorResponse(r)
1449
+ (r) => C.convertHttpErrorResponse(r)
1435
1450
  ), this.interceptorIds.response.canceledResponseInterceptor = this.httpClient.interceptors.response.use((r) => r, this.canceledResponseInterceptor), this.interceptorIds.response.authErrorsResponseInterceptor = this.httpClient.interceptors.response.use((r) => r, this.authErrorsResponseInterceptors), this.interceptorIds.response.dataConverterResponseInterceptor = this.httpClient.interceptors.response.use(
1436
1451
  this.dataConverterResponseInterceptor,
1437
1452
  (r) => Promise.reject(r)
@@ -1443,7 +1458,7 @@ const P = class P {
1443
1458
  * @param handler Ссылка на функцию-обработчик ошибок.
1444
1459
  */
1445
1460
  static setDefaultErrorsResponseHandler(r) {
1446
- P.defaultErrorsResponseHandler = r;
1461
+ C.defaultErrorsResponseHandler = r;
1447
1462
  }
1448
1463
  /**
1449
1464
  * Регистрирует хук, который будет вызываться перед выполнением каждого HTTP запроса.
@@ -1451,7 +1466,7 @@ const P = class P {
1451
1466
  * @param hook Функция-хук для обработки запроса.
1452
1467
  */
1453
1468
  static addRequestHook(r) {
1454
- P.requestHooks.includes(r) || P.requestHooks.push(r);
1469
+ C.requestHooks.includes(r) || C.requestHooks.push(r);
1455
1470
  }
1456
1471
  /**
1457
1472
  * Удаляет зарегистрированный хук запроса.
@@ -1459,8 +1474,8 @@ const P = class P {
1459
1474
  * @param hook Функция-хук для удаления.
1460
1475
  */
1461
1476
  static removeRequestHook(r) {
1462
- const e = P.requestHooks.indexOf(r);
1463
- e !== -1 && P.requestHooks.splice(e, 1);
1477
+ const e = C.requestHooks.indexOf(r);
1478
+ e !== -1 && C.requestHooks.splice(e, 1);
1464
1479
  }
1465
1480
  /**
1466
1481
  * Регистрирует хук, который будет вызываться после получения ответа на каждый HTTP запрос.
@@ -1468,7 +1483,7 @@ const P = class P {
1468
1483
  * @param hook Функция-хук для обработки ответа.
1469
1484
  */
1470
1485
  static addResponseHook(r) {
1471
- P.responseHooks.includes(r) || P.responseHooks.push(r);
1486
+ C.responseHooks.includes(r) || C.responseHooks.push(r);
1472
1487
  }
1473
1488
  /**
1474
1489
  * Удаляет зарегистрированный хук ответа.
@@ -1476,8 +1491,8 @@ const P = class P {
1476
1491
  * @param hook Функция-хук для удаления.
1477
1492
  */
1478
1493
  static removeResponseHook(r) {
1479
- const e = P.responseHooks.indexOf(r);
1480
- e !== -1 && P.responseHooks.splice(e, 1);
1494
+ const e = C.responseHooks.indexOf(r);
1495
+ e !== -1 && C.responseHooks.splice(e, 1);
1481
1496
  }
1482
1497
  /**
1483
1498
  * Возвращает экземпляр объекта текущего класса.
@@ -1485,7 +1500,24 @@ const P = class P {
1485
1500
  * @param type Тип данных, которыми оперирует метод.
1486
1501
  */
1487
1502
  static getInstance(r) {
1488
- return Object.prototype.hasOwnProperty.call(P.instances, r.name) || (P.instances[r.name] = Ke.simpleInstanceInitializer(r)), P.instances[r.name];
1503
+ return Object.prototype.hasOwnProperty.call(C.instances, r.name) || (C.instances[r.name] = I.simpleInstanceInitializer(r)), C.instances[r.name];
1504
+ }
1505
+ /**
1506
+ * Приводит данные об ошибке к форме ошибки HTTP запроса.
1507
+ *
1508
+ * Ошибка обработки данных ответа не является ошибкой запроса, но пользователю о ней сообщить нужно,
1509
+ * поэтому она приводится к общему виду и обрабатывается обработчиком ошибок запросов.
1510
+ *
1511
+ * @param error Данные об ошибке.
1512
+ */
1513
+ static toHttpResponseError(r) {
1514
+ return We(r) && "status" in r ? r : {
1515
+ status: 0,
1516
+ statusText: "Invalid response data",
1517
+ message: rr(r) ? r.message : "Не удалось обработать данные ответа сервера.",
1518
+ headers: {},
1519
+ rawError: rr(r) ? r : new Error(String(r))
1520
+ };
1489
1521
  }
1490
1522
  /**
1491
1523
  * Конвертирует данные ошибки HTTP запроса в более упрощённую и часто используемую форму.
@@ -1495,14 +1527,14 @@ const P = class P {
1495
1527
  static convertHttpErrorResponse(r) {
1496
1528
  var e, t;
1497
1529
  if (d(r) || !d(r.request) || !d(r.response)) {
1498
- const i = d(r) ? {} : r == null ? void 0 : r.response;
1530
+ const n = d(r) ? {} : r == null ? void 0 : r.response;
1499
1531
  return Promise.reject({
1500
- status: (i == null ? void 0 : i.status) ?? 0,
1501
- statusText: (i == null ? void 0 : i.statusText) ?? "Unknown",
1502
- message: ((e = i == null ? void 0 : i.data) == null ? void 0 : e.message) ?? "Unknown Error. Probably network error.",
1503
- errors: (t = i == null ? void 0 : i.data) == null ? void 0 : t.errors,
1504
- headers: (i == null ? void 0 : i.headers) ?? {},
1505
- data: i == null ? void 0 : i.data,
1532
+ status: (n == null ? void 0 : n.status) ?? 0,
1533
+ statusText: (n == null ? void 0 : n.statusText) ?? "Unknown",
1534
+ message: ((e = n == null ? void 0 : n.data) == null ? void 0 : e.message) ?? "Unknown Error. Probably network error.",
1535
+ errors: (t = n == null ? void 0 : n.data) == null ? void 0 : t.errors,
1536
+ headers: (n == null ? void 0 : n.headers) ?? {},
1537
+ data: n == null ? void 0 : n.data,
1506
1538
  rawError: r
1507
1539
  });
1508
1540
  }
@@ -1516,10 +1548,10 @@ const P = class P {
1516
1548
  * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
1517
1549
  * @param disableNotifications Признак необходимости отключить уведомления об ошибках.
1518
1550
  */
1519
- request(r, e = void 0, t = {}, i = !1) {
1551
+ request(r, e = void 0, t = {}, n = !1) {
1520
1552
  const o = this.httpClient.request(r).then((c) => e ? e(c) : c.data);
1521
1553
  return o.catch((c) => {
1522
- (c == null ? void 0 : c.name) !== "CanceledError" && this.errorResponseHandler(c, t, i);
1554
+ (c == null ? void 0 : c.name) !== "CanceledError" && this.errorResponseHandler(C.toHttpResponseError(c), t, n);
1523
1555
  }), o;
1524
1556
  }
1525
1557
  /**
@@ -1531,8 +1563,27 @@ const P = class P {
1531
1563
  * @param disableNotifications Признак необходимости отключить уведомления об ошибках.
1532
1564
  * @param signal Сигнал отмены запроса.
1533
1565
  */
1534
- get(r, e = {}, t = void 0, i = !1, o = void 0) {
1535
- return this.request({ method: "GET", url: r, params: e, signal: o }, t, {}, i);
1566
+ get(r, e = {}, t = void 0, n = !1, o = void 0) {
1567
+ return this.request({ method: "GET", url: r, params: e, signal: o }, t, {}, n);
1568
+ }
1569
+ /**
1570
+ * Выполняет get-запрос и возвращает список экземпляров указанного класса.
1571
+ *
1572
+ * @param type Тип класса, экземплярами которого являются элементы возвращаемого списка.
1573
+ * @param url URL запроса.
1574
+ * @param params Параметры запроса.
1575
+ * @param disableNotifications Признак необходимости отключить уведомления об ошибках.
1576
+ * @param signal Сигнал отмены запроса.
1577
+ */
1578
+ // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
1579
+ getTypedList(r, e, t = {}, n = !1, o = void 0) {
1580
+ return this.get(
1581
+ e,
1582
+ t,
1583
+ (c) => I.instanceListInitializer(r, c.data),
1584
+ n,
1585
+ o
1586
+ );
1536
1587
  }
1537
1588
  /**
1538
1589
  * Выполняет get-запрос с параметрами по умолчанию и возвращает Blob.
@@ -1542,8 +1593,8 @@ const P = class P {
1542
1593
  * @param successHandler Функция обратного вызова для обработки данных при успешном выполнении запроса.
1543
1594
  * @param disableNotifications Признак необходимости отключить уведомления об ошибках.
1544
1595
  */
1545
- getBlob(r, e = {}, t = void 0, i = !1) {
1546
- return this.request({ method: "GET", url: r, params: e, responseType: "blob" }, t, {}, i);
1596
+ getBlob(r, e = {}, t = void 0, n = !1) {
1597
+ return this.request({ method: "GET", url: r, params: e, responseType: "blob" }, t, {}, n);
1547
1598
  }
1548
1599
  /**
1549
1600
  * Выполняет patch-запрос с параметрами по умолчанию.
@@ -1554,8 +1605,8 @@ const P = class P {
1554
1605
  * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
1555
1606
  * @param disableNotifications Признак необходимости отключить уведомления об ошибках.
1556
1607
  */
1557
- patch(r, e = {}, t = void 0, i = {}, o = !1) {
1558
- return this.request({ method: "PATCH", url: r, data: e }, t, i, o);
1608
+ patch(r, e = {}, t = void 0, n = {}, o = !1) {
1609
+ return this.request({ method: "PATCH", url: r, data: e }, t, n, o);
1559
1610
  }
1560
1611
  /**
1561
1612
  * Выполняет post-запрос с параметрами по умолчанию.
@@ -1566,8 +1617,8 @@ const P = class P {
1566
1617
  * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
1567
1618
  * @param disableNotifications Признак необходимости отключить уведомления об ошибках.
1568
1619
  */
1569
- post(r, e = {}, t = void 0, i = {}, o = !1) {
1570
- return this.request({ method: "POST", url: r, data: e }, t, i, o);
1620
+ post(r, e = {}, t = void 0, n = {}, o = !1) {
1621
+ return this.request({ method: "POST", url: r, data: e }, t, n, o);
1571
1622
  }
1572
1623
  /**
1573
1624
  * Выполняет delete-запрос с параметрами по умолчанию.
@@ -1584,22 +1635,22 @@ const P = class P {
1584
1635
  * Экземпляр объекта текущего класса.
1585
1636
  */
1586
1637
  // eslint-disable-next-line no-use-before-define
1587
- s(P, "instances", {}), /**
1638
+ s(C, "instances", {}), /**
1588
1639
  * Базовый обработчик ошибок выполнения запросов.
1589
1640
  *
1590
1641
  * @param error Данные об ошибке.
1591
1642
  * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
1592
1643
  * @param disableNotifications Признак необходимости отключить уведомления об ошибках.
1593
1644
  */
1594
- s(P, "defaultErrorsResponseHandler", v), /**
1645
+ s(C, "defaultErrorsResponseHandler", w), /**
1595
1646
  * Список зарегистрированных хуков для запросов.
1596
1647
  */
1597
- s(P, "requestHooks", []), /**
1648
+ s(C, "requestHooks", []), /**
1598
1649
  * Список зарегистрированных хуков для ответов.
1599
1650
  */
1600
- s(P, "responseHooks", []);
1601
- let h = P;
1602
- class ns extends h {
1651
+ s(C, "responseHooks", []);
1652
+ let h = C;
1653
+ class cs extends h {
1603
1654
  /**
1604
1655
  * Возвращает содержимое корзины указанного клиента.
1605
1656
  *
@@ -1608,7 +1659,7 @@ class ns extends h {
1608
1659
  * @see /doc/api/internal#/Корзина/api_internal_client_cart_get
1609
1660
  */
1610
1661
  getCart(r) {
1611
- return this.get(`internal/clients/${r.id}/cart`, {}, (e) => new ge(e.data));
1662
+ return this.get(`internal/clients/${r.id}/cart`, {}, (e) => new me(e.data));
1612
1663
  }
1613
1664
  /**
1614
1665
  * Удаляет всё содержимое корзины.
@@ -1646,7 +1697,7 @@ class ns extends h {
1646
1697
  is_additional_sale: e.isAdditionalSale,
1647
1698
  ...e.configuratorParams
1648
1699
  },
1649
- (i) => new ge(i.data),
1700
+ (n) => new me(n.data),
1650
1701
  t
1651
1702
  );
1652
1703
  }
@@ -1676,7 +1727,7 @@ class ns extends h {
1676
1727
  is_additional_sale: e.isAdditionalSale,
1677
1728
  ...e.configuratorParams
1678
1729
  },
1679
- (i) => new ge(i.data),
1730
+ (n) => new me(n.data),
1680
1731
  t
1681
1732
  );
1682
1733
  }
@@ -1689,7 +1740,7 @@ class ns extends h {
1689
1740
  * @see /doc/api/internal#/Корзина/api_internal_client_cart_delete_item
1690
1741
  */
1691
1742
  deleteCartItem(r, e) {
1692
- return this.delete(`internal/clients/${r.id}/cart/${e.id}`, (t) => new ge(t.data));
1743
+ return this.delete(`internal/clients/${r.id}/cart/${e.id}`, (t) => new me(t.data));
1693
1744
  }
1694
1745
  /**
1695
1746
  * Добавляет продукты в корзину из файла CSV.
@@ -1700,7 +1751,7 @@ class ns extends h {
1700
1751
  * @see /doc/api/internal#/Корзина/api_internal_client_cart_add_products_from_csv
1701
1752
  */
1702
1753
  addCartItemFromCSV(r, e) {
1703
- return this.post(`internal/clients/${r.id}/cart/add-products-from-csv`, e, (t) => new ge(t.data));
1754
+ return this.post(`internal/clients/${r.id}/cart/add-products-from-csv`, e, (t) => new me(t.data));
1704
1755
  }
1705
1756
  /**
1706
1757
  * Возвращает пример CSV файла для добавления продуктов в корзину.
@@ -1713,15 +1764,15 @@ class ns extends h {
1713
1764
  return this.get(`internal/clients/${r.id}/cart/add-products-from-csv/example`, {}, (e) => new Blob([e.data], { type: "text/csv" }));
1714
1765
  }
1715
1766
  }
1716
- var Ct = /* @__PURE__ */ ((n) => (n.m2Cost = "m2Cost", n.percent = "percent", n.value = "value", n))(Ct || {}), at = /* @__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))(at || {}), Rt = /* @__PURE__ */ ((n) => (n.Checkbox = "checkbox", n.Range = "range", n.Toggle = "toggle", n))(Rt || {});
1717
- class U extends le {
1767
+ var Dt = /* @__PURE__ */ ((i) => (i.m2Cost = "m2Cost", i.percent = "percent", i.value = "value", i))(Dt || {}), at = /* @__PURE__ */ ((i) => (i.Unknown = "unknown", i.Bool = "bool", i.Integer = "integer", i.Float = "float", i.String = "string", i.Range = "range", i.Json = "json", i.Object = "object", i))(at || {}), At = /* @__PURE__ */ ((i) => (i.Checkbox = "checkbox", i.Range = "range", i.Toggle = "toggle", i))(At || {});
1768
+ class H extends pe {
1718
1769
  /**
1719
1770
  * Инициализирует экземпляр класса {@link Category}.
1720
1771
  *
1721
1772
  * @param data Данные для первоначальной инициализации.
1722
1773
  */
1723
1774
  constructor(e) {
1724
- var t, i;
1775
+ var t, n;
1725
1776
  super(e);
1726
1777
  /**
1727
1778
  * Данные о вложенных категориях.
@@ -1731,10 +1782,10 @@ class U extends le {
1731
1782
  * Список продуктов категории.
1732
1783
  */
1733
1784
  s(this, "products");
1734
- this.categories = (t = e == null ? void 0 : e.categories) == null ? void 0 : t.map((o) => new U(o)), this.products = (i = e == null ? void 0 : e.products) == null ? void 0 : i.map((o) => new _(o));
1785
+ this.categories = (t = e == null ? void 0 : e.categories) == null ? void 0 : t.map((o) => new H(o)), this.products = (n = e == null ? void 0 : e.products) == null ? void 0 : n.map((o) => new O(o));
1735
1786
  }
1736
1787
  }
1737
- class $r {
1788
+ class dr {
1738
1789
  /**
1739
1790
  * Инициализирует экземпляр класса {@link ContactLinks}.
1740
1791
  *
@@ -1752,7 +1803,7 @@ class $r {
1752
1803
  this.phone = /^\d+$/.test(r.phone ?? "") ? `+${r.phone}` : r.phone, this.email = r.email;
1753
1804
  }
1754
1805
  }
1755
- class x extends y {
1806
+ class _ extends m {
1756
1807
  }
1757
1808
  class Qe extends b {
1758
1809
  /**
@@ -1782,12 +1833,12 @@ class Qe extends b {
1782
1833
  * @inheritDoc
1783
1834
  */
1784
1835
  s(this, "isRegionalDirector");
1785
- this.salesDirection = e != null && e.salesDirection ? new x(e.salesDirection) : new x(), this.photo = e == null ? void 0 : e.photo, this.contacts = e != null && e.contacts ? new $r(e.contacts) : void 0, this.isDefault = (e == null ? void 0 : e.isDefault) ?? !1, this.isRegionalDirector = (e == null ? void 0 : e.isRegionalDirector) ?? !1;
1836
+ this.salesDirection = e != null && e.salesDirection ? new _(e.salesDirection) : new _(), this.photo = e == null ? void 0 : e.photo, this.contacts = e != null && e.contacts ? new dr(e.contacts) : void 0, this.isDefault = (e == null ? void 0 : e.isDefault) ?? !1, this.isRegionalDirector = (e == null ? void 0 : e.isRegionalDirector) ?? !1;
1786
1837
  }
1787
1838
  }
1788
- class Ye extends y {
1839
+ class Ye extends m {
1789
1840
  }
1790
- class Tr extends b {
1841
+ class br extends b {
1791
1842
  /**
1792
1843
  * Инициализирует экземпляр класса {@link IUserPricingRole}.
1793
1844
  *
@@ -1810,7 +1861,7 @@ class Tr extends b {
1810
1861
  this.description = e.description, this.canChangeLowCost = e.canChangeLowCost, this.parentRoleId = e.parentRoleId;
1811
1862
  }
1812
1863
  }
1813
- class Pe extends Qe {
1864
+ class ae extends Qe {
1814
1865
  /**
1815
1866
  * Инициализирует экземпляр класса {@link Manager}.
1816
1867
  *
@@ -1847,10 +1898,10 @@ class Pe extends Qe {
1847
1898
  * Список направлений кураторства.
1848
1899
  */
1849
1900
  s(this, "curatedDirections");
1850
- this.isActive = (e == null ? void 0 : e.isActive) ?? !1, this.isSupervisor = (e == null ? void 0 : e.isSupervisor) ?? !1, this.canDoReclamations = (e == null ? void 0 : e.canDoReclamations) ?? !1, this.createdAt = e == null ? void 0 : e.createdAt, this.supervisorId = e == null ? void 0 : e.supervisorId, this.pricingRole = e != null && e.pricingRole ? new Tr(e.pricingRole) : void 0, this.curatedDirections = ((t = e == null ? void 0 : e.curatedDirections) == null ? void 0 : t.map((i) => new Ye(i))) ?? [];
1901
+ this.isActive = (e == null ? void 0 : e.isActive) ?? !1, this.isSupervisor = (e == null ? void 0 : e.isSupervisor) ?? !1, this.canDoReclamations = (e == null ? void 0 : e.canDoReclamations) ?? !1, this.createdAt = e == null ? void 0 : e.createdAt, this.supervisorId = e == null ? void 0 : e.supervisorId, this.pricingRole = e != null && e.pricingRole ? new br(e.pricingRole) : void 0, this.curatedDirections = ((t = e == null ? void 0 : e.curatedDirections) == null ? void 0 : t.map((n) => new Ye(n))) ?? [];
1851
1902
  }
1852
1903
  }
1853
- class Pt extends le {
1904
+ class $t extends pe {
1854
1905
  /**
1855
1906
  * Инициализирует экземпляр класса {@link BaseClientCategory}.
1856
1907
  *
@@ -1878,17 +1929,17 @@ class Pt extends le {
1878
1929
  * Данные о менеджере за которым закреплена категория.
1879
1930
  */
1880
1931
  s(this, "manager");
1881
- 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 Pe(e.manager) : void 0;
1932
+ this.isDisabled = (e == null ? void 0 : e.isDisabled) ?? !1, this.isRequired = (e == null ? void 0 : e.isRequired) ?? !1, this.isFavorite = (e == null ? void 0 : e.isFavorite) ?? !1, this.hidingComment = e == null ? void 0 : e.hidingComment, this.manager = e != null && e.manager ? new ae(e.manager) : void 0;
1882
1933
  }
1883
1934
  }
1884
- class Ae extends Pt {
1935
+ class $e extends $t {
1885
1936
  /**
1886
1937
  * Инициализирует экземпляр класса {@link ClientCategory}.
1887
1938
  *
1888
1939
  * @param data Данные для первоначальной инициализации.
1889
1940
  */
1890
1941
  constructor(e) {
1891
- var t, i;
1942
+ var t, n;
1892
1943
  super(e);
1893
1944
  /**
1894
1945
  * Данные о вложенных категориях.
@@ -1898,10 +1949,10 @@ class Ae extends Pt {
1898
1949
  * Список продуктов категории.
1899
1950
  */
1900
1951
  s(this, "products");
1901
- this.categories = (t = e == null ? void 0 : e.categories) == null ? void 0 : t.map((o) => new Ae(o)), this.products = (i = e == null ? void 0 : e.products) == null ? void 0 : i.map((o) => new j(o));
1952
+ this.categories = (t = e == null ? void 0 : e.categories) == null ? void 0 : t.map((o) => new $e(o)), this.products = (n = e == null ? void 0 : e.products) == null ? void 0 : n.map((o) => new j(o));
1902
1953
  }
1903
1954
  }
1904
- class dr {
1955
+ class Sr {
1905
1956
  /**
1906
1957
  * Инициализирует экземпляр класса {@link PriceTemplateICatalogableItem}.
1907
1958
  *
@@ -1916,10 +1967,10 @@ class dr {
1916
1967
  * Процент, который прибавляется к значению выбранного коэффициента.
1917
1968
  */
1918
1969
  s(this, "increasePercent");
1919
- this.priceCoefficient = (r == null ? void 0 : r.priceCoefficient) && new Te(r.priceCoefficient), this.increasePercent = r == null ? void 0 : r.increasePercent;
1970
+ this.priceCoefficient = (r == null ? void 0 : r.priceCoefficient) && new de(r.priceCoefficient), this.increasePercent = r == null ? void 0 : r.increasePercent;
1920
1971
  }
1921
1972
  }
1922
- class _e extends dr {
1973
+ class Oe extends Sr {
1923
1974
  /**
1924
1975
  * Инициализирует экземпляр класса {@link PriceTemplateProduct}.
1925
1976
  *
@@ -1931,7 +1982,7 @@ class _e extends dr {
1931
1982
  * Базовые данные о продукте.
1932
1983
  */
1933
1984
  s(this, "productCategory");
1934
- this.productCategory = new le(e == null ? void 0 : e.productCategory);
1985
+ this.productCategory = new pe(e == null ? void 0 : e.productCategory);
1935
1986
  }
1936
1987
  }
1937
1988
  class Xe extends b {
@@ -1954,12 +2005,12 @@ class Xe extends b {
1954
2005
  * @inheritDoc
1955
2006
  */
1956
2007
  s(this, "curatedDirection");
1957
- this.photo = e.photo, this.contacts = new $r(e.contacts), this.curatedDirection = new Ye(e.curatedDirection);
2008
+ this.photo = e.photo, this.contacts = new dr(e.contacts), this.curatedDirection = new Ye(e.curatedDirection);
1958
2009
  }
1959
2010
  }
1960
- class ie extends y {
2011
+ class ie extends m {
1961
2012
  }
1962
- class ne extends y {
2013
+ class ne extends m {
1963
2014
  /**
1964
2015
  * Инициализирует экземпляр класса {@link Region}.
1965
2016
  *
@@ -1974,7 +2025,7 @@ class ne extends y {
1974
2025
  e && (this.country = new ie(e.country));
1975
2026
  }
1976
2027
  }
1977
- class oe extends y {
2028
+ class oe extends m {
1978
2029
  /**
1979
2030
  * Инициализирует экземпляр класса {@link CityWithRegionAndCountry}.
1980
2031
  *
@@ -1989,7 +2040,7 @@ class oe extends y {
1989
2040
  e && (this.region = new ne(e.region));
1990
2041
  }
1991
2042
  }
1992
- class br extends b {
2043
+ class Lr extends b {
1993
2044
  /**
1994
2045
  * Инициализирует экземпляр класса {@link UserCommonInfo}.
1995
2046
  *
@@ -2025,10 +2076,10 @@ class br extends b {
2025
2076
  * Признак активности учетной записи пользователя.
2026
2077
  */
2027
2078
  s(this, "isActive");
2028
- this.phone = /^\d+$/.test((e == null ? void 0 : e.phone) ?? "") ? `+${e == null ? void 0 : e.phone}` : (e == null ? void 0 : e.phone) ?? "", this.email = (e == null ? void 0 : e.email) ?? "", this.getNews = (e == null ? void 0 : e.getNews) ?? !1, this.salesDirection = e != null && e.salesDirection ? new x(e.salesDirection) : void 0, this.createdAt = C(e == null ? void 0 : e.createdAt) ? a(e.createdAt) : e == null ? void 0 : e.createdAt, this.lastLoginAt = C(e == null ? void 0 : e.lastLoginAt) ? a(e.lastLoginAt) : e == null ? void 0 : e.lastLoginAt, this.isActive = (e == null ? void 0 : e.isActive) ?? !1;
2079
+ 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 _(e.salesDirection) : void 0, this.createdAt = R(e == null ? void 0 : e.createdAt) ? P(e.createdAt) : e == null ? void 0 : e.createdAt, this.lastLoginAt = R(e == null ? void 0 : e.lastLoginAt) ? P(e.lastLoginAt) : e == null ? void 0 : e.lastLoginAt, this.isActive = (e == null ? void 0 : e.isActive) ?? !1;
2029
2080
  }
2030
2081
  }
2031
- class V extends br {
2082
+ class V extends Lr {
2032
2083
  /**
2033
2084
  * Инициализирует экземпляр класса {@link Client}.
2034
2085
  *
@@ -2036,7 +2087,7 @@ class V extends br {
2036
2087
  */
2037
2088
  // eslint-disable-next-line sonarjs/cognitive-complexity
2038
2089
  constructor(e) {
2039
- var t, i;
2090
+ var t, n;
2040
2091
  super(e);
2041
2092
  /**
2042
2093
  * Направление продаж.
@@ -2074,10 +2125,10 @@ class V extends br {
2074
2125
  * @inheritDoc
2075
2126
  */
2076
2127
  s(this, "curators");
2077
- this.salesDirection = new x(e == null ? void 0 : e.salesDirection), this.debt = (e == null ? void 0 : e.debt) ?? 0, this.alternativeName = (e == null ? void 0 : e.alternativeName) ?? "", this.city = new 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 = ((t = e == null ? void 0 : e.managers) == null ? void 0 : t.map((o) => new Qe(o))) ?? [], this.curators = ((i = e == null ? void 0 : e.curators) == null ? void 0 : i.map((o) => new Xe(o))) ?? void 0;
2128
+ this.salesDirection = new _(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 = ((t = e == null ? void 0 : e.managers) == null ? void 0 : t.map((o) => new Qe(o))) ?? [], this.curators = ((n = e == null ? void 0 : e.curators) == null ? void 0 : n.map((o) => new Xe(o))) ?? void 0;
2078
2129
  }
2079
2130
  }
2080
- class me extends E {
2131
+ class ye extends J {
2081
2132
  /**
2082
2133
  * Инициализирует новый экземпляр класса.
2083
2134
  *
@@ -2101,10 +2152,10 @@ class me extends E {
2101
2152
  * Данные шаблона прайс-листа.
2102
2153
  */
2103
2154
  s(this, "priceTemplate");
2104
- this.createdAt = C(e == null ? void 0 : e.createdAt) ? a(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.deletedAt = C(e == null ? void 0 : e.deletedAt) ? a(e.deletedAt) : e == null ? void 0 : e.deletedAt, this.client = new V(e == null ? void 0 : e.client), this.priceTemplate = new ee(e == null ? void 0 : e.priceTemplate);
2155
+ this.createdAt = R(e == null ? void 0 : e.createdAt) ? P(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.deletedAt = R(e == null ? void 0 : e.deletedAt) ? P(e.deletedAt) : e == null ? void 0 : e.deletedAt, this.client = new V(e == null ? void 0 : e.client), this.priceTemplate = new ee(e == null ? void 0 : e.priceTemplate);
2105
2156
  }
2106
2157
  }
2107
- class xe extends dr {
2158
+ class _e extends Sr {
2108
2159
  /**
2109
2160
  * Инициализирует экземпляр класса {@link PriceTemplateProduct}.
2110
2161
  *
@@ -2116,10 +2167,10 @@ class xe extends dr {
2116
2167
  * Базовые данные о продукте.
2117
2168
  */
2118
2169
  s(this, "product");
2119
- this.product = new _(e == null ? void 0 : e.product);
2170
+ this.product = new O(e == null ? void 0 : e.product);
2120
2171
  }
2121
2172
  }
2122
- class Sr extends y {
2173
+ class kr extends m {
2123
2174
  }
2124
2175
  class re extends b {
2125
2176
  /**
@@ -2145,7 +2196,7 @@ class re extends b {
2145
2196
  * Признак того, что по свойству может производиться фильтрация в каталоге.
2146
2197
  */
2147
2198
  s(this, "isFilterable");
2148
- this.type = new Sr(e == null ? void 0 : e.type), this.description = (e == null ? void 0 : e.description) ?? "", this.metadata = e == null ? void 0 : e.metadata, this.isFilterable = e == null ? void 0 : e.isFilterable;
2199
+ this.type = new kr(e == null ? void 0 : e.type), this.description = (e == null ? void 0 : e.description) ?? "", this.metadata = e == null ? void 0 : e.metadata, this.isFilterable = e == null ? void 0 : e.isFilterable;
2149
2200
  }
2150
2201
  }
2151
2202
  class X {
@@ -2182,10 +2233,10 @@ class T {
2182
2233
  * Окончание периода.
2183
2234
  */
2184
2235
  s(this, "to");
2185
- this.from = C(r == null ? void 0 : r.from) ? a(r.from) : (r == null ? void 0 : r.from) ?? null, this.to = C(r == null ? void 0 : r.to) ? a(r.to) : (r == null ? void 0 : r.to) ?? null;
2236
+ this.from = R(r == null ? void 0 : r.from) ? P(r.from) : (r == null ? void 0 : r.from) ?? null, this.to = R(r == null ? void 0 : r.to) ? P(r.to) : (r == null ? void 0 : r.to) ?? null;
2186
2237
  }
2187
2238
  }
2188
- class os {
2239
+ class ls {
2189
2240
  /**
2190
2241
  * Инициализирует экземпляр класса {@link TemplatesListFilters}.
2191
2242
  *
@@ -2245,16 +2296,16 @@ class os {
2245
2296
  * только актуальные данные.
2246
2297
  */
2247
2298
  asClearRaw() {
2248
- var e, t, i, o;
2299
+ var e, t, n, o;
2249
2300
  const r = {};
2250
2301
  return Object.keys(this).forEach((c) => {
2251
2302
  const u = this[c];
2252
2303
  // eslint-disable-next-line prettier/prettier
2253
- d(u) || C(u) && u.trim().length === 0 || We(u.isNewRec) && u.isNewRec() || (r[c] = u);
2254
- }), !((e = r == null ? void 0 : r.createdAt) != null && e.from) && !((t = r == null ? void 0 : r.createdAt) != null && t.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;
2304
+ d(u) || R(u) && u.trim().length === 0 || Ee(u.isNewRec) && u.isNewRec() || (r[c] = u);
2305
+ }), !((e = r == null ? void 0 : r.createdAt) != null && e.from) && !((t = r == null ? void 0 : r.createdAt) != null && t.to) && delete r.createdAt, !((n = r == null ? void 0 : r.updatedAt) != null && n.from) && !((o = r == null ? void 0 : r.updatedAt) != null && o.to) && delete r.updatedAt, r;
2255
2306
  }
2256
2307
  }
2257
- class fe extends b {
2308
+ class we extends b {
2258
2309
  /**
2259
2310
  * Инициализирует экземпляр класса {@link PricingRole}.
2260
2311
  *
@@ -2289,7 +2340,7 @@ class fe extends b {
2289
2340
  this.description = e == null ? void 0 : e.description, this.canChangeLowCost = (e == null ? void 0 : e.canChangeLowCost) ?? !1, this.parentRoleId = e == null ? void 0 : e.parentRoleId;
2290
2341
  }
2291
2342
  }
2292
- class nr {
2343
+ class or {
2293
2344
  /**
2294
2345
  * Инициализирует экземпляр класса {@link PricingRoleCategoryRule}.
2295
2346
  *
@@ -2308,10 +2359,10 @@ class nr {
2308
2359
  * Минимальный коэффициент цены.
2309
2360
  */
2310
2361
  s(this, "minCoefficient");
2311
- this.role = new fe(r == null ? void 0 : r.role), this.category = new le(r == null ? void 0 : r.category), this.minCoefficient = new Te(r == null ? void 0 : r.minCoefficient);
2362
+ this.role = new we(r == null ? void 0 : r.role), this.category = new pe(r == null ? void 0 : r.category), this.minCoefficient = new de(r == null ? void 0 : r.minCoefficient);
2312
2363
  }
2313
2364
  }
2314
- class Dt {
2365
+ class Tt {
2315
2366
  /**
2316
2367
  * Инициализирует экземпляр класса {@link FilterSettings}.
2317
2368
  *
@@ -2344,7 +2395,7 @@ class Dt {
2344
2395
  this.isFake = (r == null ? void 0 : r.isFake) ?? !1, this.isHidden = (r == null ? void 0 : r.isHidden) ?? !1, this.isMultiple = (r == null ? void 0 : r.isMultiple) ?? null, this.type = (r == null ? void 0 : r.type) ?? null, this.ord = (r == null ? void 0 : r.ord) ?? 0;
2345
2396
  }
2346
2397
  }
2347
- class or {
2398
+ class cr {
2348
2399
  /**
2349
2400
  * Инициализирует экземпляр класса {@link CategoryFilterSetting}.
2350
2401
  *
@@ -2363,10 +2414,10 @@ class or {
2363
2414
  * @inheritDoc
2364
2415
  */
2365
2416
  s(this, "settings");
2366
- this.category = new le(r == null ? void 0 : r.category), this.property = new re(r == null ? void 0 : r.property), this.settings = new Dt(r == null ? void 0 : r.settings);
2417
+ this.category = new pe(r == null ? void 0 : r.category), this.property = new re(r == null ? void 0 : r.property), this.settings = new Tt(r == null ? void 0 : r.settings);
2367
2418
  }
2368
2419
  }
2369
- class cs extends h {
2420
+ class us extends h {
2370
2421
  /**
2371
2422
  * Возвращает данные о результатах поиска категорий и товаров.
2372
2423
  *
@@ -2392,12 +2443,12 @@ class cs extends h {
2392
2443
  * @see /doc/api/internal#/operations/api_internal_price_export
2393
2444
  */
2394
2445
  // eslint-disable-next-line class-methods-use-this
2395
- getPriceExportLink(r = "csv", e = !1, t = void 0, i = void 0) {
2396
- let c = `${k().config.http.portalApiUrl}/api/internal/price/export?format=${r}&show_hidden=${e}`;
2397
- return t && (c += `&category_id=${t}`), i && (c += `&client_id=${i}`), c;
2446
+ getPriceExportLink(r = "csv", e = !1, t = void 0, n = void 0) {
2447
+ let c = `${L().config.http.portalApiUrl}/api/internal/price/export?format=${r}&show_hidden=${e}`;
2448
+ return t && (c += `&category_id=${t}`), n && (c += `&client_id=${n}`), c;
2398
2449
  }
2399
2450
  }
2400
- class ls extends h {
2451
+ class ps extends h {
2401
2452
  /**
2402
2453
  * Импортирует цены клиента из CSV файла.
2403
2454
  *
@@ -2419,9 +2470,9 @@ class ls extends h {
2419
2470
  * @see /doc/api/internal#/operations/api_internal_client_price_category_update
2420
2471
  */
2421
2472
  updateCategoryPrices(r, e, t) {
2422
- var i;
2473
+ var n;
2423
2474
  return this.patch(`/internal/clients/${r}/price/categories/${e}`, {
2424
- price_coefficient_id: (i = t.coefficient) == null ? void 0 : i.id,
2475
+ price_coefficient_id: (n = t.coefficient) == null ? void 0 : n.id,
2425
2476
  increase_percent: t.value
2426
2477
  });
2427
2478
  }
@@ -2514,11 +2565,11 @@ class ls extends h {
2514
2565
  * @see /doc/api/internal#/operations/api_internal_client_price_products_update
2515
2566
  */
2516
2567
  updateProductPrice(r, e, t) {
2517
- var i;
2568
+ var n;
2518
2569
  return this.patch(
2519
2570
  `/internal/clients/${r}/price/products/${e}`,
2520
2571
  {
2521
- price_coefficient_id: (i = t.coefficient) == null ? void 0 : i.id,
2572
+ price_coefficient_id: (n = t.coefficient) == null ? void 0 : n.id,
2522
2573
  increase_percent: t.value
2523
2574
  },
2524
2575
  (o) => new j(o.data)
@@ -2596,7 +2647,7 @@ class ls extends h {
2596
2647
  return this.post(`/internal/clients/${r}/price/commercial-offer/send`, e);
2597
2648
  }
2598
2649
  }
2599
- class us extends h {
2650
+ class hs extends h {
2600
2651
  /**
2601
2652
  * Возвращает список шаблонов прайс-листа привязанных к клиенту.
2602
2653
  *
@@ -2605,11 +2656,7 @@ class us extends h {
2605
2656
  * @see /doc/api/internal#/operations/api_internal_client_price_template_get_list
2606
2657
  */
2607
2658
  getTemplateList(r) {
2608
- return this.get(
2609
- `/internal/clients/${r}/price/templates`,
2610
- {},
2611
- (e) => e.data.map((t) => new me(t))
2612
- );
2659
+ return this.getTypedList(ye, `/internal/clients/${r}/price/templates`);
2613
2660
  }
2614
2661
  /**
2615
2662
  * Возвращает действующий шаблон прайс листа привязанный к клиенту.
@@ -2619,7 +2666,7 @@ class us extends h {
2619
2666
  * @see /doc/api/internal#/operations/api_internal_client_price_template_get_active
2620
2667
  */
2621
2668
  getActiveTemplate(r) {
2622
- return this.get(`/internal/clients/${r}/price/templates/active`, {}, (e) => new me(e.data), !0);
2669
+ return this.get(`/internal/clients/${r}/price/templates/active`, {}, (e) => new ye(e.data), !0);
2623
2670
  }
2624
2671
  /**
2625
2672
  * Добавляет связь между клиентом и шаблоном прайс-листа.
@@ -2631,14 +2678,14 @@ class us extends h {
2631
2678
  * @see /doc/api/internal#/operations/api_internal_client_price_template_attach
2632
2679
  */
2633
2680
  attachTemplate(r, e, t) {
2634
- const i = k().config.dateFormats.api;
2681
+ const n = L().config.dateFormats.api;
2635
2682
  return this.post(
2636
2683
  `/internal/clients/${r}/price/templates/${e}`,
2637
2684
  t && {
2638
- startAt: t.startAt && L(t.startAt, i),
2639
- endAt: t.endAt && L(t.endAt, i)
2685
+ startAt: t.startAt && k(t.startAt, n),
2686
+ endAt: t.endAt && k(t.endAt, n)
2640
2687
  },
2641
- (o) => new me(o.data),
2688
+ (o) => new ye(o.data),
2642
2689
  {},
2643
2690
  !0
2644
2691
  );
@@ -2664,15 +2711,15 @@ class us extends h {
2664
2711
  *
2665
2712
  * @see /doc/api/internal#/operations/api_internal_client_price_template_change
2666
2713
  */
2667
- changeTemplate(r, e, t, i) {
2668
- const o = k().config.dateFormats.api;
2714
+ changeTemplate(r, e, t, n) {
2715
+ const o = L().config.dateFormats.api;
2669
2716
  return this.patch(
2670
2717
  `/internal/clients/${r}/price/templates/${e}/${t}`,
2671
- i && {
2672
- startAt: i.startAt && L(i.startAt, o),
2673
- endAt: i.endAt && L(i.endAt, o)
2718
+ n && {
2719
+ startAt: n.startAt && k(n.startAt, o),
2720
+ endAt: n.endAt && k(n.endAt, o)
2674
2721
  },
2675
- (c) => new me(c.data)
2722
+ (c) => new ye(c.data)
2676
2723
  );
2677
2724
  }
2678
2725
  /**
@@ -2688,7 +2735,7 @@ class us extends h {
2688
2735
  return this.delete(`/internal/clients/${r}/price/templates/${e}/${t}`);
2689
2736
  }
2690
2737
  }
2691
- class ps extends h {
2738
+ class gs extends h {
2692
2739
  /**
2693
2740
  * Возвращает список данных о корневых категориях.
2694
2741
  *
@@ -2697,13 +2744,9 @@ class ps extends h {
2697
2744
  * @see /doc/api/internal#/Каталог/api_internal_catalog_categories_get_list
2698
2745
  */
2699
2746
  getRootCategoriesList(r = !1) {
2700
- return this.get(
2701
- "/internal/catalog/categories",
2702
- {
2703
- showHidden: r
2704
- },
2705
- (e) => e.data.map((t) => new U(t))
2706
- );
2747
+ return this.getTypedList(H, "/internal/catalog/categories", {
2748
+ showHidden: r
2749
+ });
2707
2750
  }
2708
2751
  /**
2709
2752
  * Возвращает данные об указанной категории.
@@ -2721,7 +2764,7 @@ class ps extends h {
2721
2764
  showHidden: e,
2722
2765
  withNestedCategories: t
2723
2766
  },
2724
- (i) => new U(i.data)
2767
+ (n) => new H(n.data)
2725
2768
  );
2726
2769
  }
2727
2770
  /**
@@ -2730,7 +2773,7 @@ class ps extends h {
2730
2773
  * @param categoryID Идентификатор категории продуктов.
2731
2774
  */
2732
2775
  getPublicCategoryData(r) {
2733
- return this.get(`/public/catalog/categories/${r}`, {}, (e) => new U(e.data));
2776
+ return this.get(`/public/catalog/categories/${r}`, {}, (e) => new H(e.data));
2734
2777
  }
2735
2778
  /**
2736
2779
  * Возвращает список продуктов категории.
@@ -2748,7 +2791,7 @@ class ps extends h {
2748
2791
  showHidden: t,
2749
2792
  withPriceCoefficients: e
2750
2793
  },
2751
- (i) => ae(i.data, (o) => new _(o))
2794
+ (n) => le(n.data, (o) => new O(o))
2752
2795
  );
2753
2796
  }
2754
2797
  /**
@@ -2761,7 +2804,7 @@ class ps extends h {
2761
2804
  getCategoryProductsCoefficients(r) {
2762
2805
  return this.get(`/internal/catalog/categories/${r}/products/coefficients`, {}, (e) => {
2763
2806
  const { data: t } = e;
2764
- return Qr(t, (i) => i.map((o) => new Ee(o))), t;
2807
+ return Xr(t, (n) => n.map((o) => new Ve(o))), t;
2765
2808
  });
2766
2809
  }
2767
2810
  /**
@@ -2771,16 +2814,16 @@ class ps extends h {
2771
2814
  * @param limit Количество возвращаемых записей.
2772
2815
  */
2773
2816
  publicSimpleSearch(r, e = 10) {
2774
- return new Promise((t, i) => {
2817
+ return new Promise((t, n) => {
2775
2818
  this.get(`/public/catalog/search/simple?limit=${e}&term=${r}`).then((o) => {
2776
- t(o.categories.map((c) => new U(c)));
2819
+ t(o.categories.map((c) => new H(c)));
2777
2820
  }).catch((o) => {
2778
- i(o);
2821
+ n(o);
2779
2822
  });
2780
2823
  });
2781
2824
  }
2782
2825
  }
2783
- class hs extends h {
2826
+ class fs extends h {
2784
2827
  /**
2785
2828
  * Возвращает данные об указанном продукте.
2786
2829
  *
@@ -2790,7 +2833,7 @@ class hs extends h {
2790
2833
  * @see /doc/api/internal#/Каталог/api_internal_catalog_products_get
2791
2834
  */
2792
2835
  getProductData(r, e = !1) {
2793
- return this.get(`/internal/catalog/products/${r}`, { withPriceCoefficients: e }, (t) => new _(t.data));
2836
+ return this.get(`/internal/catalog/products/${r}`, { withPriceCoefficients: e }, (t) => new O(t.data));
2794
2837
  }
2795
2838
  /**
2796
2839
  * Возвращает публичные данные об указанном продукте.
@@ -2798,7 +2841,7 @@ class hs extends h {
2798
2841
  * @param productId Идентификатор продукта.
2799
2842
  */
2800
2843
  getPublicProductData(r) {
2801
- return this.get(`/public/catalog/products/${r}`, {}, (e) => new _(e.data));
2844
+ return this.get(`/public/catalog/products/${r}`, {}, (e) => new O(e.data));
2802
2845
  }
2803
2846
  /**
2804
2847
  * Возвращает данные о коэффициентах цен для указанного продукта.
@@ -2811,7 +2854,7 @@ class hs extends h {
2811
2854
  return this.get(
2812
2855
  `/internal/catalog/products/${r}/coefficients`,
2813
2856
  {},
2814
- (e) => ae(e.data, (t) => new Ee(t))
2857
+ (e) => le(e.data, (t) => new Ve(t))
2815
2858
  );
2816
2859
  }
2817
2860
  /**
@@ -2821,16 +2864,16 @@ class hs extends h {
2821
2864
  * @param limit Количество возвращаемых записей.
2822
2865
  */
2823
2866
  publicSimpleSearch(r, e = 10) {
2824
- return new Promise((t, i) => {
2867
+ return new Promise((t, n) => {
2825
2868
  this.get(`/public/catalog/search/simple?limit=${e}&term=${r}`).then((o) => {
2826
- t(o.products.map((c) => new _(c)));
2869
+ t(o.products.map((c) => new O(c)));
2827
2870
  }).catch((o) => {
2828
- i(o);
2871
+ n(o);
2829
2872
  });
2830
2873
  });
2831
2874
  }
2832
2875
  }
2833
- class gs extends h {
2876
+ class ms extends h {
2834
2877
  /**
2835
2878
  * Возвращает список данных о корневых категориях указанного клиента.
2836
2879
  *
@@ -2840,14 +2883,10 @@ class gs extends h {
2840
2883
  * @see /doc/api/internal#/Каталог/api_internal_catalog_categories_get_list
2841
2884
  */
2842
2885
  getRootCategoriesList(r, e = !1) {
2843
- return this.get(
2844
- "/internal/catalog/categories",
2845
- {
2846
- clientId: r,
2847
- showHidden: e
2848
- },
2849
- (t) => t.data.map((i) => new Ae(i))
2850
- );
2886
+ return this.getTypedList($e, "/internal/catalog/categories", {
2887
+ clientId: r,
2888
+ showHidden: e
2889
+ });
2851
2890
  }
2852
2891
  /**
2853
2892
  * Возвращает данные об указанной категории клиента.
@@ -2859,15 +2898,15 @@ class gs extends h {
2859
2898
  *
2860
2899
  * @see /doc/api/internal#/Каталог/api_internal_catalog_categories_get
2861
2900
  */
2862
- getCategoryData(r, e, t = !1, i = !1) {
2901
+ getCategoryData(r, e, t = !1, n = !1) {
2863
2902
  return this.get(
2864
2903
  `/internal/catalog/categories/${e}`,
2865
2904
  {
2866
2905
  clientId: r,
2867
2906
  showHidden: t,
2868
- withNestedCategories: i
2907
+ withNestedCategories: n
2869
2908
  },
2870
- (o) => new Ae(o.data)
2909
+ (o) => new $e(o.data)
2871
2910
  );
2872
2911
  }
2873
2912
  /**
@@ -2880,19 +2919,19 @@ class gs extends h {
2880
2919
  *
2881
2920
  * @see /doc/api/internal#/Каталог/api_internal_catalog_categories_products_get
2882
2921
  */
2883
- getCategoryProductsList(r, e, t = !0, i = !1) {
2922
+ getCategoryProductsList(r, e, t = !0, n = !1) {
2884
2923
  return this.get(
2885
2924
  `/internal/catalog/categories/${e}/products`,
2886
2925
  {
2887
2926
  client_id: r,
2888
- showHidden: i,
2927
+ showHidden: n,
2889
2928
  withPriceCoefficients: t
2890
2929
  },
2891
- (o) => ae(o.data, (c) => new j(c))
2930
+ (o) => le(o.data, (c) => new j(c))
2892
2931
  );
2893
2932
  }
2894
2933
  }
2895
- class ms extends h {
2934
+ class ys extends h {
2896
2935
  /**
2897
2936
  * Возвращает данные об указанном продукте для указанного клиента.
2898
2937
  *
@@ -2909,12 +2948,12 @@ class ms extends h {
2909
2948
  clientId: e,
2910
2949
  withPriceCoefficients: t
2911
2950
  },
2912
- (i) => new j(i.data)
2951
+ (n) => new j(n.data)
2913
2952
  );
2914
2953
  }
2915
2954
  }
2916
- var Ze = /* @__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))(Ze || {});
2917
- class cr {
2955
+ var Ze = /* @__PURE__ */ ((i) => (i.BeginWith = "bw", i.Contains = "cn", i.Custom = "custom", i.EndsWith = "ew", i.Equals = "eq", i.GreaterOrEqual = "ge", i.GreaterThan = "gt", i.InList = "in", i.LessOrEqual = "le", i.LessThan = "lt", i.NotBeginWith = "bn", i.NotContains = "nc", i.NotEndsWith = "en", i.NotEqual = "ne", i.NotInList = "ni", i.NotNull = "nn", i.Null = "nu", i))(Ze || {});
2956
+ class lr {
2918
2957
  /**
2919
2958
  * Инициализирует экземпляр класса {@link FilterItem}.
2920
2959
  *
@@ -2941,14 +2980,21 @@ class cr {
2941
2980
  * @returns Примитивное представление фильтра.
2942
2981
  */
2943
2982
  toPrimitive() {
2944
- const r = k().config.dateFormats.api, e = {
2983
+ const r = L().config.dateFormats.api, e = {
2945
2984
  field: this.field,
2946
2985
  op: this.op
2947
2986
  };
2948
- return Fe(this.value) ? e.value = L(this.value, r) : ze(this.value) ? e.value = {
2949
- from: this.value.from ? L(this.value.from, r) : null,
2950
- to: this.value.to ? L(this.value.to, r) : null
2951
- } : e.value = this.value, e;
2987
+ if (He(this.value))
2988
+ e.value = k(this.value, r);
2989
+ else if (Zr(this.value)) {
2990
+ const t = this.value;
2991
+ e.value = {
2992
+ from: t.from ? k(t.from, r) : null,
2993
+ to: t.to ? k(t.to, r) : null
2994
+ };
2995
+ } else
2996
+ e.value = this.value;
2997
+ return e;
2952
2998
  }
2953
2999
  }
2954
3000
  class G {
@@ -2971,7 +3017,7 @@ class G {
2971
3017
  */
2972
3018
  s(this, "groups");
2973
3019
  var e, t;
2974
- 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 cr(i))) ?? [], this.groups = ((t = r == null ? void 0 : r.groups) == null ? void 0 : t.map((i) => new G(i))) ?? [];
3020
+ this.groupOp = (r == null ? void 0 : r.groupOp) ?? "and", this.filters = ((e = r == null ? void 0 : r.filters) == null ? void 0 : e.map((n) => new lr(n))) ?? [], this.groups = ((t = r == null ? void 0 : r.groups) == null ? void 0 : t.map((n) => new G(n))) ?? [];
2975
3021
  }
2976
3022
  /**
2977
3023
  * Преобразует группу фильтров в примитивное представление для API.
@@ -2981,12 +3027,12 @@ class G {
2981
3027
  toPrimitive() {
2982
3028
  return {
2983
3029
  groupOp: this.groupOp,
2984
- filters: this.filters.map((r) => r instanceof cr && We(r.toPrimitive) ? r.toPrimitive() : r),
3030
+ filters: this.filters.map((r) => r instanceof lr && Ee(r.toPrimitive) ? r.toPrimitive() : r),
2985
3031
  groups: this.groups.map((r) => r instanceof G ? r.toPrimitive() : r)
2986
3032
  };
2987
3033
  }
2988
3034
  }
2989
- class ue extends h {
3035
+ class he extends h {
2990
3036
  /**
2991
3037
  * Получает пагинированный список данных.
2992
3038
  *
@@ -2999,15 +3045,42 @@ class ue extends h {
2999
3045
  * @param disableDefaultNotificationErrorResponseHandler Признак отключения стандартного обработчика ошибок.
3000
3046
  * @param signal Сигнал отмены запроса.
3001
3047
  */
3002
- getPaginated(r, e, t, i, o, c, u, p = void 0) {
3003
- let m = {
3004
- page: (i == null ? void 0 : i.page) ?? 1,
3005
- perPage: (i == null ? void 0 : i.pageSize) ?? 10
3048
+ getPaginated(r, e, t, n, o, c, u, p = void 0) {
3049
+ let f = {
3050
+ page: (n == null ? void 0 : n.page) ?? 1,
3051
+ perPage: (n == null ? void 0 : n.pageSize) ?? 10
3006
3052
  };
3007
- return e && (m.filters = JSON.stringify((e instanceof G ? e : new G(e)).toPrimitive())), se(t) || (m.sort = B(t) ? t : [t]), o && (m = { ...m, ...o }), this.get(r, m, c, u, p);
3053
+ return e && (f.filters = JSON.stringify((e instanceof G ? e : new G(e)).toPrimitive())), se(t) || (f.sort = U(t) ? t : [t]), o && (f = { ...f, ...o }), this.get(r, f, c, u, p);
3054
+ }
3055
+ /**
3056
+ * Получает пагинированный список экземпляров указанного класса.
3057
+ *
3058
+ * @param type Тип класса, экземплярами которого являются элементы возвращаемого списка.
3059
+ * @param url URL запроса.
3060
+ * @param filters Параметры фильтрации.
3061
+ * @param sortParams Параметры сортировки.
3062
+ * @param paginationParams Параметры пагинации.
3063
+ * @param extraParams Дополнительные параметры запроса.
3064
+ * @param disableDefaultNotificationErrorResponseHandler Признак отключения стандартного обработчика ошибок.
3065
+ * @param signal Сигнал отмены запроса.
3066
+ */
3067
+ getTypedPaginated(r, e, t, n, o, c, u, p = void 0) {
3068
+ return this.getPaginated(
3069
+ e,
3070
+ t,
3071
+ n,
3072
+ o,
3073
+ c,
3074
+ (f) => ({
3075
+ ...f.data,
3076
+ data: I.instanceListInitializer(r, f.data.data)
3077
+ }),
3078
+ u,
3079
+ p
3080
+ );
3008
3081
  }
3009
3082
  }
3010
- class fs extends ue {
3083
+ class ws extends he {
3011
3084
  /**
3012
3085
  * Возвращает список шаблонов прайс-листа.
3013
3086
  *
@@ -3018,10 +3091,7 @@ class fs extends ue {
3018
3091
  * @see /doc/api/internal#/operations/api_internal_catalog_price_template_get_list
3019
3092
  */
3020
3093
  getTemplateList(r, e, t) {
3021
- return this.getPaginated("/internal/price/templates", r, e, t, {}, (i) => {
3022
- const o = { ...i.data };
3023
- return o.data = o.data.map((c) => new ee(c)), o;
3024
- });
3094
+ return this.getTypedPaginated(ee, "/internal/price/templates", r, e, t);
3025
3095
  }
3026
3096
  /**
3027
3097
  * Создание нового шаблона прайс-листа.
@@ -3056,7 +3126,7 @@ class fs extends ue {
3056
3126
  * @see /doc/api/internal#/operations/api_internal_catalog_price_template_update
3057
3127
  */
3058
3128
  updateTemplate(r, e, t = {}) {
3059
- return this.patch(`/internal/price/templates/${r}`, e, (i) => new ee(i.data), t);
3129
+ return this.patch(`/internal/price/templates/${r}`, e, (n) => new ee(n.data), t);
3060
3130
  }
3061
3131
  /**
3062
3132
  * Удаляет данные о шаблоне прайс-листа.
@@ -3076,11 +3146,7 @@ class fs extends ue {
3076
3146
  * @see /doc/api/internal#/operations/api_internal_catalog_price_template_product_get_list
3077
3147
  */
3078
3148
  getProductTemplatePrices(r) {
3079
- return this.get(
3080
- `/internal/price/templates/${r}/products`,
3081
- {},
3082
- (e) => e.data.map((t) => new xe(t))
3083
- );
3149
+ return this.getTypedList(_e, `/internal/price/templates/${r}/products`);
3084
3150
  }
3085
3151
  /**
3086
3152
  * Возвращает данные о цене на продукт в шаблоне прайс-листа.
@@ -3091,7 +3157,7 @@ class fs extends ue {
3091
3157
  * @see /doc/api/internal#/operations/api_internal_catalog_price_template_product_get
3092
3158
  */
3093
3159
  getProductTemplatePrice(r, e) {
3094
- return this.get(`/internal/price/templates/${r}/products/${e}`, {}, (t) => new xe(t.data));
3160
+ return this.get(`/internal/price/templates/${r}/products/${e}`, {}, (t) => new _e(t.data));
3095
3161
  }
3096
3162
  /**
3097
3163
  * Сохраняет цену на продукт в шаблоне прайс-листа.
@@ -3103,14 +3169,14 @@ class fs extends ue {
3103
3169
  * @see /doc/api/internal#/operations/api_internal_catalog_price_template_product_save
3104
3170
  */
3105
3171
  saveProductTemplatePrice(r, e, t) {
3106
- var i;
3172
+ var n;
3107
3173
  return this.post(
3108
3174
  `/internal/price/templates/${r}/products/${e}`,
3109
3175
  {
3110
- price_coefficient_id: (i = t.coefficient) == null ? void 0 : i.id,
3176
+ price_coefficient_id: (n = t.coefficient) == null ? void 0 : n.id,
3111
3177
  increase_percent: t.value
3112
3178
  },
3113
- (o) => new xe(o.data)
3179
+ (o) => new _e(o.data)
3114
3180
  );
3115
3181
  }
3116
3182
  /**
@@ -3132,11 +3198,7 @@ class fs extends ue {
3132
3198
  * @see /doc/api/internal#/operations/api_internal_catalog_price_template_category_get_list
3133
3199
  */
3134
3200
  getCategoryTemplatePrices(r) {
3135
- return this.get(
3136
- `/internal/price/templates/${r}/categories`,
3137
- {},
3138
- (e) => e.data.map((t) => new _e(t))
3139
- );
3201
+ return this.getTypedList(Oe, `/internal/price/templates/${r}/categories`);
3140
3202
  }
3141
3203
  /**
3142
3204
  * Возвращает данные о цене на категорию продуктов в шаблоне прайс-листа.
@@ -3150,7 +3212,7 @@ class fs extends ue {
3150
3212
  return this.get(
3151
3213
  `/internal/price/templates/${r}/categories/${e}`,
3152
3214
  {},
3153
- (t) => new _e(t.data)
3215
+ (t) => new Oe(t.data)
3154
3216
  );
3155
3217
  }
3156
3218
  /**
@@ -3164,7 +3226,7 @@ class fs extends ue {
3164
3226
  *
3165
3227
  * @see /doc/api/internal#/operations/api_internal_catalog_price_template_category_save
3166
3228
  */
3167
- saveCategoryTemplatePrice(r, e, t, i = !1) {
3229
+ saveCategoryTemplatePrice(r, e, t, n = !1) {
3168
3230
  var o;
3169
3231
  return this.request(
3170
3232
  {
@@ -3174,9 +3236,9 @@ class fs extends ue {
3174
3236
  price_coefficient_id: (o = t.coefficient) == null ? void 0 : o.id,
3175
3237
  increase_percent: t.value
3176
3238
  },
3177
- params: i ? { recursively: !0 } : {}
3239
+ params: n ? { recursively: !0 } : {}
3178
3240
  },
3179
- (c) => new _e(c.data)
3241
+ (c) => new Oe(c.data)
3180
3242
  );
3181
3243
  }
3182
3244
  /**
@@ -3204,21 +3266,17 @@ class fs extends ue {
3204
3266
  * @see /doc/api/internal#/operations/api_internal_catalog_price_template_clients_get_list
3205
3267
  */
3206
3268
  getTemplateClients(r) {
3207
- return this.get(
3208
- `/internal/price/templates/${r}/clients`,
3209
- {},
3210
- (e) => e.data.map((t) => new me(t))
3211
- );
3269
+ return this.getTypedList(ye, `/internal/price/templates/${r}/clients`);
3212
3270
  }
3213
3271
  }
3214
- class ys extends h {
3272
+ class vs extends h {
3215
3273
  /**
3216
3274
  * Возвращает список ролей ценообразования.
3217
3275
  *
3218
3276
  * @see /doc/api/internal#/operations/api_internal_catalog_price_roles_get_list
3219
3277
  */
3220
3278
  getRoles() {
3221
- return this.get("/internal/price/roles", {}, (r) => r.data.map((e) => new fe(e)));
3279
+ return this.getTypedList(we, "/internal/price/roles");
3222
3280
  }
3223
3281
  /**
3224
3282
  * Добавляет новую роль ценообразования.
@@ -3228,7 +3286,7 @@ class ys extends h {
3228
3286
  * @see /doc/api/internal#/operations/api_internal_catalog_price_roles_create
3229
3287
  */
3230
3288
  createRole(r) {
3231
- return this.post("/internal/price/roles", r, (e) => new fe(e.data));
3289
+ return this.post("/internal/price/roles", r, (e) => new we(e.data));
3232
3290
  }
3233
3291
  /**
3234
3292
  * Возвращает данные роли ценообразования.
@@ -3238,7 +3296,7 @@ class ys extends h {
3238
3296
  * @see /doc/api/internal#/operations/api_internal_catalog_price_roles_get
3239
3297
  */
3240
3298
  getRole(r) {
3241
- return this.get(`/internal/price/roles/${r}`, {}, (e) => new fe(e.data));
3299
+ return this.get(`/internal/price/roles/${r}`, {}, (e) => new we(e.data));
3242
3300
  }
3243
3301
  /**
3244
3302
  * Обновляет данные роли ценообразования.
@@ -3249,7 +3307,7 @@ class ys extends h {
3249
3307
  * @see /doc/api/internal#/operations/api_internal_catalog_price_roles_update
3250
3308
  */
3251
3309
  updateRole(r, e) {
3252
- return this.patch(`/internal/price/roles/${r}`, e, (t) => new fe(t.data));
3310
+ return this.patch(`/internal/price/roles/${r}`, e, (t) => new we(t.data));
3253
3311
  }
3254
3312
  /**
3255
3313
  * Удаляет роль ценообразования.
@@ -3269,11 +3327,7 @@ class ys extends h {
3269
3327
  * @see /doc/api/internal#/operations/api_internal_catalog_price_roles_category_rules_get
3270
3328
  */
3271
3329
  getCategoryRules(r) {
3272
- return this.get(
3273
- `/internal/price/roles/rules/categories/${r}`,
3274
- {},
3275
- (e) => e.data.map((t) => new nr(t))
3276
- );
3330
+ return this.getTypedList(or, `/internal/price/roles/rules/categories/${r}`);
3277
3331
  }
3278
3332
  /**
3279
3333
  * Обновляет правила для роли ценообразования по указанной категории.
@@ -3287,11 +3341,11 @@ class ys extends h {
3287
3341
  return this.patch(
3288
3342
  `/internal/price/roles/rules/categories/${r}`,
3289
3343
  e,
3290
- (t) => t.data.map((i) => new nr(i))
3344
+ (t) => I.instanceListInitializer(or, t.data)
3291
3345
  );
3292
3346
  }
3293
3347
  }
3294
- class ws extends ue {
3348
+ class Cs extends he {
3295
3349
  /**
3296
3350
  * Возвращает пагинированный список свойств.
3297
3351
  *
@@ -3302,10 +3356,7 @@ class ws extends ue {
3302
3356
  * @see /doc/api/internal#/operations/api_internal_catalog_properties_get_list
3303
3357
  */
3304
3358
  getProperties(r, e, t) {
3305
- return this.getPaginated("/internal/catalog/properties", r, e, t, {}, (i) => {
3306
- const o = { ...i.data };
3307
- return o.data = o.data.map((c) => new re(c)), o;
3308
- });
3359
+ return this.getTypedPaginated(re, "/internal/catalog/properties", r, e, t);
3309
3360
  }
3310
3361
  /**
3311
3362
  * Создает новое свойство.
@@ -3321,7 +3372,7 @@ class ws extends ue {
3321
3372
  ...t,
3322
3373
  type: e
3323
3374
  },
3324
- (i) => new re(i.data)
3375
+ (n) => new re(n.data)
3325
3376
  );
3326
3377
  }
3327
3378
  /**
@@ -3341,11 +3392,11 @@ class ws extends ue {
3341
3392
  * @see /doc/api/internal#/operations/api_internal_catalog_properties_update
3342
3393
  */
3343
3394
  updateProperty(r, e) {
3344
- const { typeId: t, ...i } = e;
3395
+ const { typeId: t, ...n } = e;
3345
3396
  return this.patch(
3346
3397
  `/internal/catalog/properties/${r}`,
3347
3398
  {
3348
- ...i,
3399
+ ...n,
3349
3400
  type: t
3350
3401
  },
3351
3402
  (o) => new re(o.data)
@@ -3367,7 +3418,7 @@ class ws extends ue {
3367
3418
  * @see /doc/api/internal#/operations/api_internal_catalog_product_properties_get_list
3368
3419
  */
3369
3420
  getProductProperties(r) {
3370
- return this.get(`/internal/catalog/products/${r}/properties`, {}, (e) => e.data.map((t) => new X(t)));
3421
+ return this.getTypedList(X, `/internal/catalog/products/${r}/properties`);
3371
3422
  }
3372
3423
  /**
3373
3424
  * Возвращает значение свойства продукта.
@@ -3388,7 +3439,7 @@ class ws extends ue {
3388
3439
  * @see /doc/api/internal#/operations/api_internal_catalog_product_properties_update
3389
3440
  */
3390
3441
  updateProductProperty(r, e, t) {
3391
- return this.patch(`/internal/catalog/products/${r}/properties/${e}`, { value: t }, (i) => new X(i.data));
3442
+ return this.patch(`/internal/catalog/products/${r}/properties/${e}`, { value: t }, (n) => new X(n.data));
3392
3443
  }
3393
3444
  /**
3394
3445
  * Удаляет значение свойства продукта.
@@ -3513,7 +3564,7 @@ class ws extends ue {
3513
3564
  * @see /doc/api/internal#/operations/api_internal_catalog_category_properties_get_list
3514
3565
  */
3515
3566
  getCategoryProperties(r) {
3516
- return this.get(`/internal/catalog/categories/${r}/properties`, {}, (e) => e.data.map((t) => new X(t)));
3567
+ return this.getTypedList(X, `/internal/catalog/categories/${r}/properties`);
3517
3568
  }
3518
3569
  /**
3519
3570
  * Возвращает значение свойства категории.
@@ -3534,7 +3585,7 @@ class ws extends ue {
3534
3585
  * @see /doc/api/internal#/operations/api_internal_catalog_category_properties_update
3535
3586
  */
3536
3587
  updateCategoryProperty(r, e, t) {
3537
- return this.patch(`/internal/catalog/categories/${r}/properties/${e}`, { value: t }, (i) => new X(i.data));
3588
+ return this.patch(`/internal/catalog/categories/${r}/properties/${e}`, { value: t }, (n) => new X(n.data));
3538
3589
  }
3539
3590
  /**
3540
3591
  * Удаляет значение свойства категории.
@@ -3669,11 +3720,7 @@ class ws extends ue {
3669
3720
  * @see /doc/api/internal#/operations/api_internal_catalog_categories_filter_settings_get_list
3670
3721
  */
3671
3722
  getCategoryFilterSettings(r) {
3672
- return this.get(
3673
- `/internal/catalog/categories/${r}/filter-settings`,
3674
- {},
3675
- (e) => e.data.map((t) => new or(t))
3676
- );
3723
+ return this.getTypedList(cr, `/internal/catalog/categories/${r}/filter-settings`);
3677
3724
  }
3678
3725
  /**
3679
3726
  * Сохраняет настройки фильтра в категории.
@@ -3687,7 +3734,7 @@ class ws extends ue {
3687
3734
  return this.patch(
3688
3735
  `/internal/catalog/categories/${r}/filter-settings/${e}`,
3689
3736
  t,
3690
- (i) => new or(i.data)
3737
+ (n) => new cr(n.data)
3691
3738
  );
3692
3739
  }
3693
3740
  /**
@@ -3701,7 +3748,7 @@ class ws extends ue {
3701
3748
  return this.delete(`/internal/catalog/categories/${r}/filter-settings/${e}`);
3702
3749
  }
3703
3750
  }
3704
- class vs extends h {
3751
+ class Rs extends h {
3705
3752
  /**
3706
3753
  * Возвращает список данных о корневых категориях указанного шаблона прайс-листа.
3707
3754
  *
@@ -3711,14 +3758,10 @@ class vs extends h {
3711
3758
  * @see /doc/api/internal#/Каталог/api_internal_catalog_categories_get_list
3712
3759
  */
3713
3760
  getRootCategoriesList(r, e = !1) {
3714
- return this.get(
3715
- "/internal/catalog/categories",
3716
- {
3717
- priceTemplateId: r,
3718
- showHidden: e
3719
- },
3720
- (t) => t.data.map((i) => new U(i))
3721
- );
3761
+ return this.getTypedList(H, "/internal/catalog/categories", {
3762
+ priceTemplateId: r,
3763
+ showHidden: e
3764
+ });
3722
3765
  }
3723
3766
  /**
3724
3767
  * Возвращает данные об указанной категории шаблона прайс-листа.
@@ -3730,15 +3773,15 @@ class vs extends h {
3730
3773
  *
3731
3774
  * @see /doc/api/internal#/Каталог/api_internal_catalog_categories_get
3732
3775
  */
3733
- getCategoryData(r, e, t = !1, i = !1) {
3776
+ getCategoryData(r, e, t = !1, n = !1) {
3734
3777
  return this.get(
3735
3778
  `/internal/catalog/categories/${e}`,
3736
3779
  {
3737
3780
  priceTemplateId: r,
3738
3781
  showHidden: t,
3739
- withNestedCategories: i
3782
+ withNestedCategories: n
3740
3783
  },
3741
- (o) => new U(o.data)
3784
+ (o) => new H(o.data)
3742
3785
  );
3743
3786
  }
3744
3787
  /**
@@ -3751,50 +3794,50 @@ class vs extends h {
3751
3794
  *
3752
3795
  * @see /doc/api/internal#/Каталог/api_internal_catalog_categories_products_get
3753
3796
  */
3754
- getCategoryProductsList(r, e, t = !0, i = !1) {
3797
+ getCategoryProductsList(r, e, t = !0, n = !1) {
3755
3798
  return this.get(
3756
3799
  `/internal/catalog/categories/${e}/products`,
3757
3800
  {
3758
3801
  priceTemplateId: r,
3759
- showHidden: i,
3802
+ showHidden: n,
3760
3803
  withPriceCoefficients: t
3761
3804
  },
3762
- (o) => ae(o.data, (c) => new _(c))
3805
+ (o) => le(o.data, (c) => new O(c))
3763
3806
  );
3764
3807
  }
3765
3808
  }
3766
- function lr(n, r, e) {
3809
+ function ur(i, r, e) {
3767
3810
  let t;
3768
- return n.some((i) => {
3769
- if (i.type === e && i.id === r)
3770
- return t = i, !0;
3771
- if (i.type === "product")
3811
+ return i.some((n) => {
3812
+ if (n.type === e && n.id === r)
3813
+ return t = n, !0;
3814
+ if (n.type === "product")
3772
3815
  return !1;
3773
- const o = i;
3816
+ const o = n;
3774
3817
  if (o.products && o.products.length > 0) {
3775
- const c = lr(o.products, r, e);
3818
+ const c = ur(o.products, r, e);
3776
3819
  if (c)
3777
3820
  return t = c, !0;
3778
3821
  }
3779
3822
  if (o.categories && o.categories.length > 0) {
3780
- const c = lr(o.categories, r, e);
3823
+ const c = ur(o.categories, r, e);
3781
3824
  if (c)
3782
3825
  return t = c, !0;
3783
3826
  }
3784
3827
  return !1;
3785
3828
  }), t;
3786
3829
  }
3787
- function ur(n) {
3830
+ function pr(i) {
3788
3831
  const r = [];
3789
- return n.forEach((e) => {
3832
+ return i.forEach((e) => {
3790
3833
  if (r.push(e), e.type === "category") {
3791
3834
  const t = e;
3792
- t.products && t.products.length > 0 && r.push(...ur(t.products)), t.categories && t.categories.length > 0 && r.push(...ur(t.categories));
3835
+ t.products && t.products.length > 0 && r.push(...pr(t.products)), t.categories && t.categories.length > 0 && r.push(...pr(t.categories));
3793
3836
  }
3794
3837
  }), r;
3795
3838
  }
3796
- var At = /* @__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.Curators = "curators", n))(At || {}), F = /* @__PURE__ */ ((n) => (n.Person = "individual", n.Ic = "entrepreneur", n.UlR = "legal", n.UlNr = "non_resident_legal", n))(F || {});
3797
- class Me extends E {
3839
+ var dt = /* @__PURE__ */ ((i) => (i.LastOrder = "last_order", i.Contacts = "contacts", i.PartnerGroups = "partner_groups", i.PreferredDeliveryType = "preferred_delivery_type", i.SalesDirection = "sales_direction", i.Managers = "managers", i.Curators = "curators", i))(dt || {}), M = /* @__PURE__ */ ((i) => (i.Person = "individual", i.Ic = "entrepreneur", i.UlR = "legal", i.UlNr = "non_resident_legal", i))(M || {});
3840
+ class je extends J {
3798
3841
  /**
3799
3842
  * Инициализирует экземпляр класса {@link BankAccount}.
3800
3843
  *
@@ -3821,11 +3864,11 @@ class Me extends E {
3821
3864
  /**
3822
3865
  * Данные о валюте.
3823
3866
  */
3824
- s(this, "currency", new N());
3825
- e && (this.bankName = e.bankName ?? "", this.bic = e.bic ?? "", this.accountNumber = e.accountNumber ?? "", this.correspondentAccount = e.correspondentAccount ?? "", this.currency = new N(e.currency));
3867
+ s(this, "currency", new F());
3868
+ e && (this.bankName = e.bankName ?? "", this.bic = e.bic ?? "", this.accountNumber = e.accountNumber ?? "", this.correspondentAccount = e.correspondentAccount ?? "", this.currency = new F(e.currency));
3826
3869
  }
3827
3870
  }
3828
- class je extends b {
3871
+ class Ge extends b {
3829
3872
  /**
3830
3873
  * Инициализирует экземпляр класса {@link Contact}.
3831
3874
  *
@@ -3844,7 +3887,7 @@ class je extends b {
3844
3887
  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;
3845
3888
  }
3846
3889
  }
3847
- class W extends je {
3890
+ class z extends Ge {
3848
3891
  /**
3849
3892
  * Инициализирует экземпляр класса {@link ContactPerson}.
3850
3893
  *
@@ -3876,25 +3919,25 @@ class W extends je {
3876
3919
  * Дата и время последнего удаления.
3877
3920
  */
3878
3921
  s(this, "deletedAt");
3879
- 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 = C(e == null ? void 0 : e.deletedAt) ? a(e.deletedAt) : e == null ? void 0 : e.deletedAt;
3922
+ 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 = R(e == null ? void 0 : e.deletedAt) ? P(e.deletedAt) : e == null ? void 0 : e.deletedAt;
3880
3923
  }
3881
3924
  }
3882
- class z extends y {
3925
+ class W extends m {
3883
3926
  /**
3884
3927
  * Возвращает сгенерированную запись-описание физического лица.
3885
3928
  */
3886
3929
  static generatePersonItem() {
3887
- return new z({
3930
+ return new W({
3888
3931
  id: 1,
3889
3932
  guid: "",
3890
- slug: F.Person,
3933
+ slug: M.Person,
3891
3934
  name: ""
3892
3935
  });
3893
3936
  }
3894
3937
  }
3895
- class ce extends y {
3938
+ class ce extends m {
3896
3939
  }
3897
- class kr extends Cr {
3940
+ class Ir extends Pr {
3898
3941
  /**
3899
3942
  * Инициализирует экземпляр класса {@link UpdatableNamedIdentity}.
3900
3943
  *
@@ -3906,10 +3949,10 @@ class kr extends Cr {
3906
3949
  * Дата и время последнего удаления.
3907
3950
  */
3908
3951
  s(this, "deletedAt");
3909
- this.deletedAt = C(e == null ? void 0 : e.deletedAt) ? a(e.deletedAt) : e == null ? void 0 : e.deletedAt;
3952
+ this.deletedAt = R(e == null ? void 0 : e.deletedAt) ? P(e.deletedAt) : e == null ? void 0 : e.deletedAt;
3910
3953
  }
3911
3954
  }
3912
- class Lr extends kr {
3955
+ class xr extends Ir {
3913
3956
  /**
3914
3957
  * Инициализирует экземпляр класса {@link ContragentBase}.
3915
3958
  *
@@ -3921,7 +3964,7 @@ class Lr extends kr {
3921
3964
  /**
3922
3965
  * Данные об организационно-правовой форме.
3923
3966
  */
3924
- s(this, "opf", z.generatePersonItem());
3967
+ s(this, "opf", W.generatePersonItem());
3925
3968
  /**
3926
3969
  * Группа партнеров (направление деятельности).
3927
3970
  */
@@ -3955,22 +3998,22 @@ class Lr extends kr {
3955
3998
  */
3956
3999
  s(this, "updater");
3957
4000
  if (e) {
3958
- if (this.opf = new z(e.opf), this.comment = e.comment, this.alternativeName = e.alternativeName, this.createdAt = C(e == null ? void 0 : e.createdAt) ? a(e.createdAt) : e.createdAt, this.creator = e.creator ? new I(e.creator) : void 0, this.updater = e.updater ? new I(e.updater) : void 0, e.partnerGroup && (this.partnerGroup = new ce(e.partnerGroup)), e.contacts) {
4001
+ if (this.opf = new W(e.opf), this.comment = e.comment, this.alternativeName = e.alternativeName, this.createdAt = R(e == null ? void 0 : e.createdAt) ? P(e.createdAt) : e.createdAt, this.creator = e.creator ? new x(e.creator) : void 0, this.updater = e.updater ? new x(e.updater) : void 0, e.partnerGroup && (this.partnerGroup = new ce(e.partnerGroup)), e.contacts) {
3959
4002
  const t = [];
3960
- e.contacts.forEach((i) => {
3961
- t.push(new W(i));
4003
+ e.contacts.forEach((n) => {
4004
+ t.push(new z(n));
3962
4005
  }), this.contacts = t;
3963
4006
  }
3964
4007
  if (e.bankAccounts) {
3965
4008
  const t = [];
3966
- e.bankAccounts.forEach((i) => {
3967
- t.push(new Me(i));
4009
+ e.bankAccounts.forEach((n) => {
4010
+ t.push(new je(n));
3968
4011
  }), this.bankAccounts = t;
3969
4012
  }
3970
4013
  }
3971
4014
  }
3972
4015
  }
3973
- class $t extends Lr {
4016
+ class bt extends xr {
3974
4017
  /**
3975
4018
  * Инициализирует экземпляр класса {@link ContragentPerson}.
3976
4019
  *
@@ -3980,7 +4023,7 @@ class $t extends Lr {
3980
4023
  super(r);
3981
4024
  }
3982
4025
  }
3983
- class Ir extends Lr {
4026
+ class Or extends xr {
3984
4027
  /**
3985
4028
  * Инициализирует экземпляр класса {@link ContragentIc}.
3986
4029
  *
@@ -4023,7 +4066,7 @@ class Ir extends Lr {
4023
4066
  e && (this.inn = e.inn ?? "", this.okpo = e.okpo ?? "", this.directorName = e.directorName ?? "", this.directorPosition = e.directorPosition ?? "", this.directorActsOn = e.directorActsOn ?? "", this.legalAddress = e.legalAddress ?? "", this.postalAddress = e.postalAddress ?? "", this.actualAddress = e.actualAddress ?? "");
4024
4067
  }
4025
4068
  }
4026
- class _r extends Ir {
4069
+ class _r extends Or {
4027
4070
  /**
4028
4071
  * Инициализирует экземпляр класса {@link ContragentUlR}.
4029
4072
  *
@@ -4038,7 +4081,7 @@ class _r extends Ir {
4038
4081
  e && (this.kpp = e.kpp ?? "");
4039
4082
  }
4040
4083
  }
4041
- class Tt extends _r {
4084
+ class St extends _r {
4042
4085
  /**
4043
4086
  * Инициализирует экземпляр класса {@link ContragentUlNr}.
4044
4087
  *
@@ -4061,7 +4104,7 @@ class Tt extends _r {
4061
4104
  e && (this.registrationCountry = new ie(e.registrationCountry), this.registrationNumber = e.registrationNumber ?? "", this.taxNumber = e.taxNumber ?? "");
4062
4105
  }
4063
4106
  }
4064
- class $e {
4107
+ class Te {
4065
4108
  /**
4066
4109
  * Инициализирует и возвращает экземпляр класса с данными о контрагенте.
4067
4110
  *
@@ -4069,18 +4112,18 @@ class $e {
4069
4112
  */
4070
4113
  static createInstance(r) {
4071
4114
  switch (r.opf.slug) {
4072
- case F.Ic:
4073
- return new Ir(r);
4074
- case F.UlR:
4115
+ case M.Ic:
4116
+ return new Or(r);
4117
+ case M.UlR:
4075
4118
  return new _r(r);
4076
- case F.UlNr:
4077
- return new Tt(r);
4119
+ case M.UlNr:
4120
+ return new St(r);
4078
4121
  default:
4079
- return new $t(r);
4122
+ return new bt(r);
4080
4123
  }
4081
4124
  }
4082
4125
  }
4083
- class ye extends kr {
4126
+ class ve extends Ir {
4084
4127
  /**
4085
4128
  * Инициализирует экземпляр класса {@link DeliveryAddress}.
4086
4129
  *
@@ -4117,14 +4160,14 @@ class ye extends kr {
4117
4160
  * Признак того, что указанный адрес является адресом транспортной компании.
4118
4161
  */
4119
4162
  s(this, "isTransportCompanyAddress");
4120
- this.address = (e == null ? void 0 : e.address) ?? "", this.coordinates = new Rr(e == null ? void 0 : e.coordinates), this.contacts = ((t = e == null ? void 0 : e.contacts) == null ? void 0 : t.map((i) => new W(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;
4163
+ this.address = (e == null ? void 0 : e.address) ?? "", this.coordinates = new ar(e == null ? void 0 : e.coordinates), this.contacts = ((t = e == null ? void 0 : e.contacts) == null ? void 0 : t.map((n) => new z(n))) ?? [], 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;
4121
4164
  }
4122
4165
  }
4123
- class xr extends y {
4166
+ class qr extends m {
4124
4167
  }
4125
- class Or extends y {
4168
+ class Nr extends m {
4126
4169
  }
4127
- class pr extends V {
4170
+ class hr extends V {
4128
4171
  /**
4129
4172
  * Инициализирует экземпляр класса {@link Client}.
4130
4173
  *
@@ -4132,7 +4175,7 @@ class pr extends V {
4132
4175
  */
4133
4176
  // eslint-disable-next-line sonarjs/cognitive-complexity
4134
4177
  constructor(e) {
4135
- var t, i, o, c;
4178
+ var t, n, o, c;
4136
4179
  super(e);
4137
4180
  /**
4138
4181
  * @inheritDoc
@@ -4174,10 +4217,10 @@ class pr extends V {
4174
4217
  * @inheritDoc
4175
4218
  */
4176
4219
  s(this, "extraData");
4177
- this.contragents = ((t = e == null ? void 0 : e.contragents) == null ? void 0 : t.map((u) => $e.createInstance(u))) ?? [], this.partnerGroups = ((i = e == null ? void 0 : e.partnerGroups) == null ? void 0 : i.map((u) => new ce(u))) ?? [], this.contacts = ((o = e == null ? void 0 : e.contacts) == null ? void 0 : o.map((u) => new W(u))) ?? [], this.deliveryAddresses = ((c = e == null ? void 0 : e.deliveryAddresses) == null ? void 0 : c.map((u) => new ye(u))) ?? [], this.channelPrimaryInterest = new xr(e == null ? void 0 : e.channelPrimaryInterest), this.sourcePrimaryInterest = new Or(e == null ? void 0 : e.sourcePrimaryInterest), this.preferredDeliveryType = new H(e == null ? void 0 : e.preferredDeliveryType), this.primaryDemand = e == null ? void 0 : e.primaryDemand, this.preferredWarehouse = e != null && e.preferredWarehouse ? new Re(e.preferredWarehouse) : void 0, this.extraData = (e == null ? void 0 : e.extraData) ?? {};
4220
+ this.contragents = ((t = e == null ? void 0 : e.contragents) == null ? void 0 : t.map((u) => Te.createInstance(u))) ?? [], this.partnerGroups = ((n = e == null ? void 0 : e.partnerGroups) == null ? void 0 : n.map((u) => new ce(u))) ?? [], this.contacts = ((o = e == null ? void 0 : e.contacts) == null ? void 0 : o.map((u) => new z(u))) ?? [], this.deliveryAddresses = ((c = e == null ? void 0 : e.deliveryAddresses) == null ? void 0 : c.map((u) => new ve(u))) ?? [], this.channelPrimaryInterest = new qr(e == null ? void 0 : e.channelPrimaryInterest), this.sourcePrimaryInterest = new Nr(e == null ? void 0 : e.sourcePrimaryInterest), this.preferredDeliveryType = new B(e == null ? void 0 : e.preferredDeliveryType), this.primaryDemand = e == null ? void 0 : e.primaryDemand, this.preferredWarehouse = e != null && e.preferredWarehouse ? new De(e.preferredWarehouse) : void 0, this.extraData = (e == null ? void 0 : e.extraData) ?? {};
4178
4221
  }
4179
4222
  }
4180
- class de {
4223
+ class be {
4181
4224
  /**
4182
4225
  * Возвращает очищенное значение фильтров, содержащие
4183
4226
  * только актуальные данные.
@@ -4187,18 +4230,18 @@ class de {
4187
4230
  return Object.keys(this).forEach((e) => {
4188
4231
  const t = this[e];
4189
4232
  d(t) || // eslint-disable-next-line prettier/prettier,lodash/prefer-lodash-method
4190
- C(t) && t.trim().length === 0 || We(t.isNewRec) && t.isNewRec() || (r[e] = t);
4233
+ R(t) && t.trim().length === 0 || Ee(t.isNewRec) && t.isNewRec() || (r[e] = t);
4191
4234
  }), r;
4192
4235
  }
4193
4236
  }
4194
- class Cs extends de {
4237
+ class Ps extends be {
4195
4238
  /**
4196
4239
  * Инициализирует экземпляр класса {@link ClientsListFilters}.
4197
4240
  *
4198
4241
  * @param data Данные для первоначальной инициализации.
4199
4242
  */
4200
4243
  constructor(e) {
4201
- var t, i, o, c, u, p, m, f;
4244
+ var t, n, o, c, u, p, f, v;
4202
4245
  super();
4203
4246
  /**
4204
4247
  * @inheritDoc
@@ -4300,10 +4343,10 @@ class Cs extends de {
4300
4343
  * @inheritDoc
4301
4344
  */
4302
4345
  s(this, "noOrdersPeriod", new T());
4303
- this.id = e == null ? void 0 : e.id, this.name = e == null ? void 0 : e.name, this.alternativeName = e == null ? void 0 : e.alternativeName, this.searchTerm = e == null ? void 0 : e.searchTerm, this.cities = (t = e == null ? void 0 : e.cities) == null ? void 0 : t.map((R) => new oe(R)), this.region = new ne(e == null ? void 0 : e.region), this.country = new ie(e == null ? void 0 : e.country), this.phone = e == null ? void 0 : e.phone, this.email = e == null ? void 0 : e.email, this.isActive = e && Object.prototype.hasOwnProperty.call(e, "isActive") ? e == null ? void 0 : e.isActive : !0, this.createdAt = new T(e == null ? void 0 : e.createdAt), this.lastLoginDate = new T(e == null ? void 0 : e.lastLoginDate), this.lastLoginDateHasOrder = (e == null ? void 0 : e.lastLoginDateHasOrder) ?? void 0, this.managers = ((i = e == null ? void 0 : e.managers) == null ? void 0 : i.map((R) => new Pe(R))) ?? [], this.includeSubordinateManagers = (e == null ? void 0 : e.includeSubordinateManagers) ?? !0, this.curators = ((o = e == null ? void 0 : e.curators) == null ? void 0 : o.map((R) => new Xe(R))) ?? [], this.salesDirections = (c = e == null ? void 0 : e.salesDirections) == null ? void 0 : c.map((R) => new x(R)), this.contragentInn = e == null ? void 0 : e.contragentInn, this.contragentType = new z(e == null ? void 0 : e.contragentType), this.preferredDeliveryType = e != null && e.preferredDeliveryType ? new H(e == null ? void 0 : e.preferredDeliveryType) : void 0, this.partnerGroups = (u = e == null ? void 0 : e.partnerGroups) == null ? void 0 : u.map((R) => new ce(R)), this.contact = new je(e == null ? void 0 : e.contact), this.lastOrder = {
4346
+ this.id = e == null ? void 0 : e.id, this.name = e == null ? void 0 : e.name, this.alternativeName = e == null ? void 0 : e.alternativeName, this.searchTerm = e == null ? void 0 : e.searchTerm, this.cities = (t = e == null ? void 0 : e.cities) == null ? void 0 : t.map((a) => new oe(a)), this.region = new ne(e == null ? void 0 : e.region), this.country = new ie(e == null ? void 0 : e.country), this.phone = e == null ? void 0 : e.phone, this.email = e == null ? void 0 : e.email, this.isActive = e && Object.prototype.hasOwnProperty.call(e, "isActive") ? e == null ? void 0 : e.isActive : !0, this.createdAt = new T(e == null ? void 0 : e.createdAt), this.lastLoginDate = new T(e == null ? void 0 : e.lastLoginDate), this.lastLoginDateHasOrder = (e == null ? void 0 : e.lastLoginDateHasOrder) ?? void 0, this.managers = ((n = e == null ? void 0 : e.managers) == null ? void 0 : n.map((a) => new ae(a))) ?? [], this.includeSubordinateManagers = (e == null ? void 0 : e.includeSubordinateManagers) ?? !0, this.curators = ((o = e == null ? void 0 : e.curators) == null ? void 0 : o.map((a) => new Xe(a))) ?? [], this.salesDirections = (c = e == null ? void 0 : e.salesDirections) == null ? void 0 : c.map((a) => new _(a)), this.contragentInn = e == null ? void 0 : e.contragentInn, this.contragentType = new W(e == null ? void 0 : e.contragentType), this.preferredDeliveryType = e != null && e.preferredDeliveryType ? new B(e == null ? void 0 : e.preferredDeliveryType) : void 0, this.partnerGroups = (u = e == null ? void 0 : e.partnerGroups) == null ? void 0 : u.map((a) => new ce(a)), this.contact = new Ge(e == null ? void 0 : e.contact), this.lastOrder = {
4304
4347
  createdAt: new T((p = e == null ? void 0 : e.lastOrder) == null ? void 0 : p.createdAt),
4305
- creator: (m = e == null ? void 0 : e.lastOrder) == null ? void 0 : m.creator,
4306
- isApproved: (f = e == null ? void 0 : e.lastOrder) == null ? void 0 : f.isApproved
4348
+ creator: (f = e == null ? void 0 : e.lastOrder) == null ? void 0 : f.creator,
4349
+ isApproved: (v = e == null ? void 0 : e.lastOrder) == null ? void 0 : v.isApproved
4307
4350
  }, this.noOrdersPeriod = new T(e == null ? void 0 : e.noOrdersPeriod);
4308
4351
  }
4309
4352
  /**
@@ -4342,16 +4385,16 @@ class Cs extends de {
4342
4385
  this.salesDirections = [];
4343
4386
  break;
4344
4387
  case "contragentType":
4345
- this.contragentType = new z();
4388
+ this.contragentType = new W();
4346
4389
  break;
4347
4390
  case "preferredDeliveryType":
4348
- this.preferredDeliveryType = new H();
4391
+ this.preferredDeliveryType = new B();
4349
4392
  break;
4350
4393
  case "partnerGroups":
4351
4394
  this.partnerGroups = [];
4352
4395
  break;
4353
4396
  case "contact":
4354
- this.contact = new je();
4397
+ this.contact = new Ge();
4355
4398
  break;
4356
4399
  default:
4357
4400
  this[e] = void 0;
@@ -4363,12 +4406,12 @@ class Cs extends de {
4363
4406
  * @inheritDoc
4364
4407
  */
4365
4408
  asClearRaw() {
4366
- var t, i, o, c, u, p;
4409
+ var t, n, o, c, u, p;
4367
4410
  const e = super.asClearRaw();
4368
- return !((t = e == null ? void 0 : e.createdAt) != null && t.from) && !((i = e == null ? void 0 : e.createdAt) != null && i.to) && delete e.createdAt, !((o = e == null ? void 0 : e.lastLoginDate) != null && o.from) && !((c = e == null ? void 0 : e.lastLoginDate) != null && c.to) && delete e.lastLoginDate, !((u = e == null ? void 0 : e.noOrdersPeriod) != null && u.from) && !((p = e == null ? void 0 : e.noOrdersPeriod) != null && p.to) && delete e.noOrdersPeriod, e;
4411
+ return !((t = e == null ? void 0 : e.createdAt) != null && t.from) && !((n = e == null ? void 0 : e.createdAt) != null && n.to) && delete e.createdAt, !((o = e == null ? void 0 : e.lastLoginDate) != null && o.from) && !((c = e == null ? void 0 : e.lastLoginDate) != null && c.to) && delete e.lastLoginDate, !((u = e == null ? void 0 : e.noOrdersPeriod) != null && u.from) && !((p = e == null ? void 0 : e.noOrdersPeriod) != null && p.to) && delete e.noOrdersPeriod, e;
4369
4412
  }
4370
4413
  }
4371
- class qr extends E {
4414
+ class Ur extends J {
4372
4415
  /**
4373
4416
  * Инициализирует экземпляр класса {@link OrderShortInfo}.
4374
4417
  *
@@ -4384,17 +4427,17 @@ class qr extends E {
4384
4427
  * @inheritDoc
4385
4428
  */
4386
4429
  s(this, "creator");
4387
- this.createdAt = C(e == null ? void 0 : e.createdAt) ? a(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.creator = new I(e == null ? void 0 : e.creator);
4430
+ this.createdAt = R(e == null ? void 0 : e.createdAt) ? P(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.creator = new x(e == null ? void 0 : e.creator);
4388
4431
  }
4389
4432
  }
4390
- class dt extends b {
4433
+ class Lt extends b {
4391
4434
  /**
4392
4435
  * Инициализирует экземпляр класса {@link ClientAdditionalData}.
4393
4436
  *
4394
4437
  * @param data Данные для первоначальной инициализации.
4395
4438
  */
4396
4439
  constructor(e) {
4397
- var t, i, o, c;
4440
+ var t, n, o, c;
4398
4441
  super(e);
4399
4442
  /**
4400
4443
  * @inheritDoc
@@ -4424,10 +4467,10 @@ class dt extends b {
4424
4467
  * @inheritDoc
4425
4468
  */
4426
4469
  s(this, "curators");
4427
- this.contacts = ((t = e.contacts) == null ? void 0 : t.map((u) => new W(u))) ?? void 0, this.lastOrder = e.lastOrder ? new qr(e.lastOrder) : void 0, this.partnerGroups = ((i = e.partnerGroups) == null ? void 0 : i.map((u) => new ce(u))) ?? void 0, this.preferredDeliveryType = e.preferredDeliveryType ? new H(e.preferredDeliveryType) : void 0, this.salesDirection = e.salesDirection ? new x(e.salesDirection) : void 0, this.managers = ((o = e.managers) == null ? void 0 : o.map((u) => new Qe(u))) ?? void 0, this.curators = ((c = e.curators) == null ? void 0 : c.map((u) => new Xe(u))) ?? void 0;
4470
+ this.contacts = ((t = e.contacts) == null ? void 0 : t.map((u) => new z(u))) ?? void 0, this.lastOrder = e.lastOrder ? new Ur(e.lastOrder) : void 0, this.partnerGroups = ((n = e.partnerGroups) == null ? void 0 : n.map((u) => new ce(u))) ?? void 0, this.preferredDeliveryType = e.preferredDeliveryType ? new B(e.preferredDeliveryType) : void 0, this.salesDirection = e.salesDirection ? new _(e.salesDirection) : void 0, this.managers = ((o = e.managers) == null ? void 0 : o.map((u) => new Qe(u))) ?? void 0, this.curators = ((c = e.curators) == null ? void 0 : c.map((u) => new Xe(u))) ?? void 0;
4428
4471
  }
4429
4472
  }
4430
- class Oe extends E {
4473
+ class qe extends J {
4431
4474
  /**
4432
4475
  * Инициализирует экземпляр класса {@link ContactRelation}.
4433
4476
  *
@@ -4442,7 +4485,7 @@ class Oe extends E {
4442
4485
  this.isPrimary = e.isPrimary;
4443
4486
  }
4444
4487
  }
4445
- class bt extends W {
4488
+ class kt extends z {
4446
4489
  /**
4447
4490
  * Инициализирует экземпляр класса {@link ContactPersonRelated}.
4448
4491
  *
@@ -4467,10 +4510,10 @@ class bt extends W {
4467
4510
  */
4468
4511
  addresses: []
4469
4512
  });
4470
- e.relations && (e.relations.addresses && (this.relations.addresses = e.relations.addresses.map((t) => new Oe(t))), e.relations.clients && (this.relations.clients = e.relations.clients.map((t) => new Oe(t))), e.relations.contragents && (this.relations.contragents = e.relations.contragents.map((t) => new Oe(t))));
4513
+ e.relations && (e.relations.addresses && (this.relations.addresses = e.relations.addresses.map((t) => new qe(t))), e.relations.clients && (this.relations.clients = e.relations.clients.map((t) => new qe(t))), e.relations.contragents && (this.relations.contragents = e.relations.contragents.map((t) => new qe(t))));
4471
4514
  }
4472
4515
  }
4473
- class O extends ue {
4516
+ class q extends he {
4474
4517
  /**
4475
4518
  * Преобразует данные о клиенте в данные требуемые для запроса.
4476
4519
  *
@@ -4481,7 +4524,7 @@ class O extends ue {
4481
4524
  return {
4482
4525
  name: r.name,
4483
4526
  alternative_name: r.alternativeName,
4484
- partner_groups: r.partnerGroups.map((i) => i.id),
4527
+ partner_groups: r.partnerGroups.map((n) => n.id),
4485
4528
  phone: r.phone,
4486
4529
  email: r.email,
4487
4530
  city_id: r.city.id,
@@ -4498,11 +4541,11 @@ class O extends ue {
4498
4541
  * @param contragent Данные о контрагенте клиента.
4499
4542
  */
4500
4543
  static transformContragentClientDataToRequest(r) {
4501
- var c, u, p, m;
4544
+ var c, u, p, f;
4502
4545
  let e;
4503
- const t = r, i = r, o = r;
4546
+ const t = r, n = r, o = r;
4504
4547
  switch (r.opf.slug) {
4505
- case F.Ic:
4548
+ case M.Ic:
4506
4549
  e = {
4507
4550
  opf: t.opf.slug,
4508
4551
  name: t.name,
@@ -4519,25 +4562,25 @@ class O extends ue {
4519
4562
  actual_address: t.actualAddress
4520
4563
  };
4521
4564
  break;
4522
- case F.UlR:
4565
+ case M.UlR:
4523
4566
  e = {
4524
- opf: i.opf.slug,
4525
- name: i.name,
4526
- alternative_name: i.alternativeName,
4527
- partner_group_id: (u = i.partnerGroup) == null ? void 0 : u.id,
4528
- comment: i.comment,
4529
- inn: i.inn,
4530
- kpp: i.kpp,
4531
- okpo: i.okpo,
4532
- director_name: i.directorName,
4533
- director_position: i.directorPosition,
4534
- director_acts_on: i.directorActsOn,
4535
- legal_address: i.legalAddress,
4536
- postal_address: i.postalAddress,
4537
- actual_address: i.actualAddress
4567
+ opf: n.opf.slug,
4568
+ name: n.name,
4569
+ alternative_name: n.alternativeName,
4570
+ partner_group_id: (u = n.partnerGroup) == null ? void 0 : u.id,
4571
+ comment: n.comment,
4572
+ inn: n.inn,
4573
+ kpp: n.kpp,
4574
+ okpo: n.okpo,
4575
+ director_name: n.directorName,
4576
+ director_position: n.directorPosition,
4577
+ director_acts_on: n.directorActsOn,
4578
+ legal_address: n.legalAddress,
4579
+ postal_address: n.postalAddress,
4580
+ actual_address: n.actualAddress
4538
4581
  };
4539
4582
  break;
4540
- case F.UlNr:
4583
+ case M.UlNr:
4541
4584
  e = {
4542
4585
  opf: o.opf.slug,
4543
4586
  name: o.name,
@@ -4560,7 +4603,7 @@ class O extends ue {
4560
4603
  opf: r.opf.slug,
4561
4604
  name: r.name,
4562
4605
  alternative_name: r.alternativeName,
4563
- partner_group_id: (m = r.partnerGroup) == null ? void 0 : m.id,
4606
+ partner_group_id: (f = r.partnerGroup) == null ? void 0 : f.id,
4564
4607
  comment: r.comment
4565
4608
  };
4566
4609
  break;
@@ -4573,7 +4616,7 @@ class O extends ue {
4573
4616
  * @param deliveryAddress Данные об адресе доставки клиенту.
4574
4617
  */
4575
4618
  static transformClientDeliveryAddressToRequest(r) {
4576
- var t, i;
4619
+ var t, n;
4577
4620
  const e = {
4578
4621
  address: r.address,
4579
4622
  is_one_time: r.isOneTime ?? !1,
@@ -4582,7 +4625,7 @@ class O extends ue {
4582
4625
  };
4583
4626
  return r.coordinates && (e.coordinates = {
4584
4627
  lat: (t = r.coordinates) == null ? void 0 : t.lat,
4585
- long: (i = r.coordinates) == null ? void 0 : i.long
4628
+ long: (n = r.coordinates) == null ? void 0 : n.long
4586
4629
  }), r.operatingHours && (e.operating_hours = {
4587
4630
  from: r.operatingHours.from,
4588
4631
  to: r.operatingHours.to
@@ -4609,7 +4652,7 @@ class O extends ue {
4609
4652
  * @see /doc/api/internal#/Клиенты/api_internal_client_get_full_info
4610
4653
  */
4611
4654
  getClient(r) {
4612
- return this.get(`/internal/clients/${r}`, {}, (e) => new pr(e.data));
4655
+ return this.get(`/internal/clients/${r}`, {}, (e) => new hr(e.data));
4613
4656
  }
4614
4657
  /**
4615
4658
  * Возвращает данные о клиентах, удовлетворяющих указанным параметрам поиска.
@@ -4622,20 +4665,8 @@ class O extends ue {
4622
4665
  *
4623
4666
  * @see /doc/api/internal#/Клиенты/api_internal_client_get_list
4624
4667
  */
4625
- getClientsList(r, e, t, i, o = void 0) {
4626
- return this.getPaginated(
4627
- "/internal/clients",
4628
- r,
4629
- e,
4630
- t,
4631
- i,
4632
- (c) => {
4633
- const u = { ...c.data };
4634
- return u.data = u.data.map((p) => new V(p)), u;
4635
- },
4636
- void 0,
4637
- o
4638
- );
4668
+ getClientsList(r, e, t, n, o = void 0) {
4669
+ return this.getTypedPaginated(V, "/internal/clients", r, e, t, n, void 0, o);
4639
4670
  }
4640
4671
  /**
4641
4672
  * Выполняет поиск клиентов по терму в строке.
@@ -4668,11 +4699,12 @@ class O extends ue {
4668
4699
  * @see /doc/api/internal#/Клиенты/api_internal_client_get_additional_data_for_clients_list
4669
4700
  */
4670
4701
  getAdditionalClientsData(r, e) {
4671
- const t = r.map((i) => i.id);
4672
- return this.post("/internal/clients/additional-data", { clients: t, requested_data_types: e }, (i) => {
4673
- let o = [];
4674
- return (i == null ? void 0 : i.data.length) > 0 && (o = i.data.map((c) => new dt(c))), o;
4675
- });
4702
+ const t = r.map((n) => n.id);
4703
+ return this.post(
4704
+ "/internal/clients/additional-data",
4705
+ { clients: t, requested_data_types: e },
4706
+ (n) => I.instanceListInitializer(Lt, n.data)
4707
+ );
4676
4708
  }
4677
4709
  /**
4678
4710
  * Возвращает список всех контактных лиц указанного клиента.
@@ -4681,10 +4713,7 @@ class O extends ue {
4681
4713
  * @see /doc/api/internal#/Контакты/api_internal_client_contact_get_all_contact_list
4682
4714
  */
4683
4715
  getAllClientContacts(r) {
4684
- return this.get(`/internal/clients/${r}/contacts/all`, {}, (e) => {
4685
- let t = [];
4686
- return (e == null ? void 0 : e.data.length) > 0 && (t = e.data.map((i) => new bt(i))), t;
4687
- });
4716
+ return this.getTypedList(kt, `/internal/clients/${r}/contacts/all`);
4688
4717
  }
4689
4718
  /**
4690
4719
  * Создаёт нового клиента на основе указанных данных.
@@ -4694,7 +4723,7 @@ class O extends ue {
4694
4723
  * @see /doc/api/internal#/Клиенты/api_internal_client_create
4695
4724
  */
4696
4725
  createClientCommonData(r, e = {}) {
4697
- return this.post("/internal/clients", O.transformClientDataToRequest(r), (t) => new pr(t.data), e);
4726
+ return this.post("/internal/clients", q.transformClientDataToRequest(r), (t) => new hr(t.data), e);
4698
4727
  }
4699
4728
  /**
4700
4729
  * Обновляет данные указанного клиента.
@@ -4704,7 +4733,7 @@ class O extends ue {
4704
4733
  * @see /doc/api/internal#/Клиенты/api_internal_client_change
4705
4734
  */
4706
4735
  updateClientCommonData(r, e = {}) {
4707
- return this.patch(`/internal/clients/${r.id}`, O.transformClientDataToRequest(r), void 0, e);
4736
+ return this.patch(`/internal/clients/${r.id}`, q.transformClientDataToRequest(r), void 0, e);
4708
4737
  }
4709
4738
  /**
4710
4739
  * Обновляет данные "Не беспокоить" указанного клиента.
@@ -4728,7 +4757,7 @@ class O extends ue {
4728
4757
  * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
4729
4758
  * @see /doc/api/internal#/Клиенты/api_internal_client_change
4730
4759
  */
4731
- changeClientPassword(r, e, t, i = {}) {
4760
+ changeClientPassword(r, e, t, n = {}) {
4732
4761
  return this.patch(
4733
4762
  `/internal/clients/${r}`,
4734
4763
  {
@@ -4736,7 +4765,7 @@ class O extends ue {
4736
4765
  password_confirmation: t
4737
4766
  },
4738
4767
  void 0,
4739
- i
4768
+ n
4740
4769
  );
4741
4770
  }
4742
4771
  /**
@@ -4766,7 +4795,7 @@ class O extends ue {
4766
4795
  * @see /doc/api/internal#/Клиенты/api_internal_client_manager_attach
4767
4796
  */
4768
4797
  async attachClientToManagers(r, e) {
4769
- const t = e.map((i) => this.patch(`/internal/clients/${r}/managers/${i.id}/attach`, { is_primary: i.isDefault }));
4798
+ const t = e.map((n) => this.patch(`/internal/clients/${r}/managers/${n.id}/attach`, { is_primary: n.isDefault }));
4770
4799
  await Promise.all(t);
4771
4800
  }
4772
4801
  /**
@@ -4778,7 +4807,7 @@ class O extends ue {
4778
4807
  * @see /doc/api/internal#/Клиенты/api_internal_client_manager_detach
4779
4808
  */
4780
4809
  async detachClientFromManagers(r, e) {
4781
- const t = e.map((i) => this.patch(`/internal/clients/${r}/managers/${i.id}/detach`));
4810
+ const t = e.map((n) => this.patch(`/internal/clients/${r}/managers/${n.id}/detach`));
4782
4811
  await Promise.all(t);
4783
4812
  }
4784
4813
  /**
@@ -4833,8 +4862,8 @@ class O extends ue {
4833
4862
  createContragentClientData(r, e, t = {}) {
4834
4863
  return this.post(
4835
4864
  `/internal/clients/${r}/contragents`,
4836
- O.transformContragentClientDataToRequest(e),
4837
- (i) => $e.createInstance(i.data),
4865
+ q.transformContragentClientDataToRequest(e),
4866
+ (n) => Te.createInstance(n.data),
4838
4867
  t
4839
4868
  );
4840
4869
  }
@@ -4849,8 +4878,8 @@ class O extends ue {
4849
4878
  updateContragentClientData(r, e, t = {}) {
4850
4879
  return this.patch(
4851
4880
  `/internal/clients/${r}/contragents/${e.id}`,
4852
- O.transformContragentClientDataToRequest(e),
4853
- (i) => $e.createInstance(i.data),
4881
+ q.transformContragentClientDataToRequest(e),
4882
+ (n) => Te.createInstance(n.data),
4854
4883
  t
4855
4884
  );
4856
4885
  }
@@ -4871,11 +4900,7 @@ class O extends ue {
4871
4900
  * @see /doc/api/internal#/operations/api_internal_client_delivery_address_get_list
4872
4901
  */
4873
4902
  getClientDeliveryAddresses(r) {
4874
- return this.get(
4875
- `/internal/clients/${r}/delivery-addresses`,
4876
- {},
4877
- (e) => e.data.map((t) => new ye(t))
4878
- );
4903
+ return this.getTypedList(ve, `/internal/clients/${r}/delivery-addresses`);
4879
4904
  }
4880
4905
  /**
4881
4906
  * Создаёт новую запись об адресе доставки клиента.
@@ -4888,8 +4913,8 @@ class O extends ue {
4888
4913
  createClientDeliveryAddress(r, e, t = {}) {
4889
4914
  return this.post(
4890
4915
  `/internal/clients/${r}/delivery-addresses`,
4891
- O.transformClientDeliveryAddressToRequest(e),
4892
- (i) => new ye(i.data),
4916
+ q.transformClientDeliveryAddressToRequest(e),
4917
+ (n) => new ve(n.data),
4893
4918
  t
4894
4919
  );
4895
4920
  }
@@ -4904,8 +4929,8 @@ class O extends ue {
4904
4929
  updateClientDeliveryAddress(r, e, t = {}) {
4905
4930
  return this.patch(
4906
4931
  `/internal/clients/${r}/delivery-addresses/${e.id}`,
4907
- O.transformClientDeliveryAddressToRequest(e),
4908
- (i) => new ye(i.data),
4932
+ q.transformClientDeliveryAddressToRequest(e),
4933
+ (n) => new ve(n.data),
4909
4934
  t
4910
4935
  );
4911
4936
  }
@@ -4928,12 +4953,12 @@ class O extends ue {
4928
4953
  * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
4929
4954
  * @see /doc/api/internal#/Банковские реквизиты/api_internal_client_contragent_bank_accounts_create
4930
4955
  */
4931
- createContragentBankAccount(r, e, t, i = {}) {
4956
+ createContragentBankAccount(r, e, t, n = {}) {
4932
4957
  return this.post(
4933
4958
  `/internal/clients/${r}/contragents/${e}/bank-accounts`,
4934
- O.transformClientContragentBankAccountToRequest(t),
4935
- (o) => new Me(o.data),
4936
- i
4959
+ q.transformClientContragentBankAccountToRequest(t),
4960
+ (o) => new je(o.data),
4961
+ n
4937
4962
  );
4938
4963
  }
4939
4964
  /**
@@ -4945,12 +4970,12 @@ class O extends ue {
4945
4970
  * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
4946
4971
  * @see /doc/api/internal#/Адреса доставки/api_internal_client_delivery_address_update
4947
4972
  */
4948
- updateContragentBankAccount(r, e, t, i = {}) {
4973
+ updateContragentBankAccount(r, e, t, n = {}) {
4949
4974
  return this.patch(
4950
4975
  `/internal/clients/${r}/contragents/${e}/bank-accounts/${t.id}`,
4951
- O.transformClientContragentBankAccountToRequest(t),
4952
- (o) => new Me(o.data),
4953
- i
4976
+ q.transformClientContragentBankAccountToRequest(t),
4977
+ (o) => new je(o.data),
4978
+ n
4954
4979
  );
4955
4980
  }
4956
4981
  /**
@@ -5005,7 +5030,7 @@ class O extends ue {
5005
5030
  comment: e.comment,
5006
5031
  not_disturb: e.notDisturb
5007
5032
  },
5008
- (i) => new W(i.data),
5033
+ (n) => new z(n.data),
5009
5034
  t
5010
5035
  );
5011
5036
  }
@@ -5038,7 +5063,7 @@ class O extends ue {
5038
5063
  * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
5039
5064
  * @see /doc/api/internal#/Контакты/api_internal_client_contact_create
5040
5065
  */
5041
- createContragentContact(r, e, t, i = {}) {
5066
+ createContragentContact(r, e, t, n = {}) {
5042
5067
  return this.createContact(
5043
5068
  r,
5044
5069
  t,
@@ -5051,7 +5076,7 @@ class O extends ue {
5051
5076
  }
5052
5077
  ]
5053
5078
  },
5054
- i
5079
+ n
5055
5080
  );
5056
5081
  }
5057
5082
  /**
@@ -5085,7 +5110,7 @@ class O extends ue {
5085
5110
  * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
5086
5111
  * @see /doc/api/internal#/Контакты/api_internal_client_contact_create
5087
5112
  */
5088
- createDeliveryAddressContact(r, e, t, i = {}) {
5113
+ createDeliveryAddressContact(r, e, t, n = {}) {
5089
5114
  return this.createContact(
5090
5115
  r,
5091
5116
  t,
@@ -5098,7 +5123,7 @@ class O extends ue {
5098
5123
  }
5099
5124
  ]
5100
5125
  },
5101
- i
5126
+ n
5102
5127
  );
5103
5128
  }
5104
5129
  /**
@@ -5134,7 +5159,7 @@ class O extends ue {
5134
5159
  * @param extraData Дополнительные данные
5135
5160
  * @param validationFieldResultData Список полей, для которых необходимо установить данные об ошибках валидации в случае ошибок в запросах.
5136
5161
  */
5137
- createContact(r, e, t, i = {}) {
5162
+ createContact(r, e, t, n = {}) {
5138
5163
  var c, u;
5139
5164
  const o = {
5140
5165
  name: e.name,
@@ -5142,7 +5167,7 @@ class O extends ue {
5142
5167
  comment: e.comment,
5143
5168
  ...t
5144
5169
  };
5145
- 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 W(p.data), i);
5170
+ 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 z(p.data), n);
5146
5171
  }
5147
5172
  /**
5148
5173
  * Устанавливает признак основного контактного лица.
@@ -5171,7 +5196,7 @@ class O extends ue {
5171
5196
  return this.get(`/internal/clients/${r.id}/verification/email?email=${r.email}`);
5172
5197
  }
5173
5198
  }
5174
- class as extends h {
5199
+ class Ds extends h {
5175
5200
  /**
5176
5201
  * Выполняет проверку занят ли указанный номер телефона.
5177
5202
  *
@@ -5179,13 +5204,13 @@ class as extends h {
5179
5204
  */
5180
5205
  checkPhoneIsBusy(r) {
5181
5206
  return new Promise((e, t) => {
5182
- this.request({ method: "GET", url: "/public/user/verification/phone/check", params: { phone: r } }).then((i) => {
5183
- e(!!i.isBusy);
5207
+ this.request({ method: "GET", url: "/public/user/verification/phone/check", params: { phone: r } }).then((n) => {
5208
+ e(!!n.isBusy);
5184
5209
  }).catch(t);
5185
5210
  });
5186
5211
  }
5187
5212
  }
5188
- class Rs {
5213
+ class as {
5189
5214
  /**
5190
5215
  * Инициализирует экземпляр класса {@link VersionConfig}.
5191
5216
  *
@@ -5204,11 +5229,11 @@ class Rs {
5204
5229
  * Текущая версия приложения.
5205
5230
  */
5206
5231
  s(this, "version");
5207
- this.date = C(r == null ? void 0 : r.date) ? a(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";
5232
+ this.date = R(r == null ? void 0 : r.date) ? P(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";
5208
5233
  }
5209
5234
  }
5210
- var St = /* @__PURE__ */ ((n) => (n.Kozyrek = "kozyrek", n.Mosquitto = "mosquitto", n.Strip = "strip", n.MetalForDoors = "metal_for_doors", n.Sandwich = "sandwich", n.SandwichM2 = "sandwich_m2", n))(St || {});
5211
- class Ps extends h {
5235
+ var It = /* @__PURE__ */ ((i) => (i.Kozyrek = "kozyrek", i.Mosquitto = "mosquitto", i.Strip = "strip", i.MetalForDoors = "metal_for_doors", i.Sandwich = "sandwich", i.SandwichM2 = "sandwich_m2", i))(It || {});
5236
+ class As extends h {
5212
5237
  /**
5213
5238
  * Возвращает настройки указанного конфигуратора для указанной категории.
5214
5239
  *
@@ -5233,15 +5258,15 @@ class Ps extends h {
5233
5258
  *
5234
5259
  * @see /doc/api/internal#/Каталог/api_internal_catalog_categories_configurator_products_get
5235
5260
  */
5236
- searchProduct(r, e, t, i = {}) {
5261
+ searchProduct(r, e, t, n = {}) {
5237
5262
  var c;
5238
5263
  const o = this.get(
5239
5264
  `internal/catalog/categories/${r.id}/configurators/${(c = r.properties) == null ? void 0 : c.configurator}/product`,
5240
5265
  { params: t, client_id: e },
5241
- (u) => new _(u.data)
5266
+ (u) => new O(u.data)
5242
5267
  );
5243
5268
  return o.catch((u) => {
5244
- this.errorResponseHandler(u, i);
5269
+ this.errorResponseHandler(u, n);
5245
5270
  }), o;
5246
5271
  }
5247
5272
  /**
@@ -5257,7 +5282,7 @@ class Ps extends h {
5257
5282
  * @see /doc/api/internal#/Каталог/api_internal_catalog_categories_configurator_template_create
5258
5283
  */
5259
5284
  // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
5260
- createTemplate(r, e, t, i = {}) {
5285
+ createTemplate(r, e, t, n = {}) {
5261
5286
  var o;
5262
5287
  return this.post(
5263
5288
  `internal/catalog/categories/${r.id}/configurators/${(o = r.properties) == null ? void 0 : o.configurator}/template?client_id=${e}`,
@@ -5265,7 +5290,7 @@ class Ps extends h {
5265
5290
  // eslint-disable-next-line lodash/prefer-noop, @typescript-eslint/no-empty-function
5266
5291
  () => {
5267
5292
  },
5268
- i
5293
+ n
5269
5294
  );
5270
5295
  }
5271
5296
  /**
@@ -5279,8 +5304,8 @@ class Ps extends h {
5279
5304
  */
5280
5305
  // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
5281
5306
  removeTemplate(r, e, t) {
5282
- var i;
5283
- return this.delete(`internal/catalog/categories/${r.id}/configurators/${(i = r.properties) == null ? void 0 : i.configurator}/template/${t}?client_id=${e}`);
5307
+ var n;
5308
+ return this.delete(`internal/catalog/categories/${r.id}/configurators/${(n = r.properties) == null ? void 0 : n.configurator}/template/${t}?client_id=${e}`);
5284
5309
  }
5285
5310
  /**
5286
5311
  * Выполняет расчет, через указанный конфигуратор с переданными параметрами.
@@ -5292,14 +5317,14 @@ class Ps extends h {
5292
5317
  * @see /doc/api/internal#/Каталог/api_public_catalog_categories_category_configurator_calculate
5293
5318
  */
5294
5319
  calculate(r, e, t) {
5295
- var i;
5296
- return this.get(`internal/catalog/categories/${r.id}/configurators/${(i = r.properties) == null ? void 0 : i.configurator}/calculate`, {
5320
+ var n;
5321
+ return this.get(`internal/catalog/categories/${r.id}/configurators/${(n = r.properties) == null ? void 0 : n.configurator}/calculate`, {
5297
5322
  client_id: e,
5298
5323
  ...t
5299
5324
  });
5300
5325
  }
5301
5326
  }
5302
- class kt {
5327
+ class xt {
5303
5328
  /**
5304
5329
  * Инициализирует экземпляр класса {@link TableDataPaginationRequestParams}.
5305
5330
  *
@@ -5317,7 +5342,7 @@ class kt {
5317
5342
  this.page = (r == null ? void 0 : r.page) ?? 1, this.pageSize = (r == null ? void 0 : r.pageSize) ?? 50;
5318
5343
  }
5319
5344
  }
5320
- class Ds extends kt {
5345
+ class $s extends xt {
5321
5346
  /**
5322
5347
  * Инициализирует экземпляр класса {@link TableDataPagination}.
5323
5348
  *
@@ -5348,7 +5373,7 @@ class Ds extends kt {
5348
5373
  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;
5349
5374
  }
5350
5375
  }
5351
- class As {
5376
+ class Ts {
5352
5377
  /**
5353
5378
  * Инициализирует экземпляр класса {@link ISortRequestParams}.
5354
5379
  *
@@ -5366,22 +5391,22 @@ class As {
5366
5391
  this.field = (r == null ? void 0 : r.field) ?? "", this.direction = (r == null ? void 0 : r.direction) ?? "asc";
5367
5392
  }
5368
5393
  }
5369
- class $s {
5394
+ class ds {
5370
5395
  /**
5371
5396
  * Возвращает диапазон дат по умолчанию.
5372
5397
  */
5373
5398
  static defaultDateRanges() {
5374
- const r = Xr(/* @__PURE__ */ new Date(), 1);
5399
+ const r = rt(/* @__PURE__ */ new Date(), 1);
5375
5400
  return {
5376
5401
  // 'Следующий рабочий день' - это значение по-умолчанию
5377
- nextWorkingDay: { label: "Следующий рабочий день", from: nt(r), to: it(r) },
5378
- today: { label: "Сегодня", from: He(), to: st() },
5379
- yesterday: { label: "Вчера", from: tt(), to: rt() },
5380
- tomorrow: { label: "Завтра", from: et(), to: Zr() }
5402
+ nextWorkingDay: { label: "Следующий рабочий день", from: lt(r), to: ct(r) },
5403
+ today: { label: "Сегодня", from: Me(), to: ot() },
5404
+ yesterday: { label: "Вчера", from: nt(), to: it() },
5405
+ tomorrow: { label: "Завтра", from: st(), to: tt() }
5381
5406
  };
5382
5407
  }
5383
5408
  }
5384
- class Nr {
5409
+ class Fr {
5385
5410
  /**
5386
5411
  * Возвращает признак, что указанный товар имеет линейную единицу измерения.
5387
5412
  *
@@ -5397,7 +5422,7 @@ class Nr {
5397
5422
  */
5398
5423
  static getProductMultiplicity(r) {
5399
5424
  var e, t;
5400
- return !((e = r.properties) != null && e.ignoreMinCountCheck) && ((t = r.properties) != null && t.minCount) && !Nr.productIsMeasurable(r) ? r.properties.minCount : 1;
5425
+ return !((e = r.properties) != null && e.ignoreMinCountCheck) && ((t = r.properties) == null ? void 0 : t.minCount) != null && !Fr.productIsMeasurable(r) ? r.properties.minCount : 1;
5401
5426
  }
5402
5427
  /**
5403
5428
  * Возвращает кратность длины для указанного товара.
@@ -5405,8 +5430,8 @@ class Nr {
5405
5430
  * @param product Данные о товаре для которого необходимо вернуть кратность длины.
5406
5431
  */
5407
5432
  static getProductLengthMultiplicity(r) {
5408
- var e, t, i;
5409
- return (e = r.properties) != null && e.lengthStep ? r.properties.lengthStep : !((t = r.properties) != null && t.ignoreMinCountCheck) && ((i = r.properties) != null && i.minCount) ? r.properties.minCount : 0.01;
5433
+ var e, t, n;
5434
+ return ((e = r.properties) == null ? void 0 : e.lengthStep) != null ? r.properties.lengthStep : !((t = r.properties) != null && t.ignoreMinCountCheck) && ((n = r.properties) == null ? void 0 : n.minCount) != null ? r.properties.minCount : 0.01;
5410
5435
  }
5411
5436
  }
5412
5437
  const te = class te extends h {
@@ -5419,7 +5444,7 @@ const te = class te extends h {
5419
5444
  * Время кэширования данных ответов на запросы (секунд).
5420
5445
  */
5421
5446
  s(this, "responseDataCacheTimeout");
5422
- this.responseDataCacheTimeout = k().config.http.responseDataCacheTimeout;
5447
+ this.responseDataCacheTimeout = L().config.http.responseDataCacheTimeout;
5423
5448
  }
5424
5449
  /**
5425
5450
  * Возвращает кэшированные данные.
@@ -5436,12 +5461,12 @@ const te = class te extends h {
5436
5461
  /**
5437
5462
  * Сохраняет указанные данные из запроса в кэш результатов.
5438
5463
  *
5439
- * @param url URL запроса.
5464
+ * @param key Ключ кэша (URL запроса или URL с сериализованными params).
5440
5465
  * @param data Данные для кэширования.
5441
5466
  */
5442
5467
  cacheResponse(e, t) {
5443
5468
  te.responseDataCache.set(e, {
5444
- validTo: ot(/* @__PURE__ */ new Date(), this.responseDataCacheTimeout),
5469
+ validTo: ut(/* @__PURE__ */ new Date(), this.responseDataCacheTimeout),
5445
5470
  val: t
5446
5471
  });
5447
5472
  }
@@ -5456,29 +5481,26 @@ const te = class te extends h {
5456
5481
  * @param signal Сигнал отмены запроса.
5457
5482
  */
5458
5483
  // eslint-disable-next-line @typescript-eslint/no-unnecessary-type-parameters
5459
- getTypedDataArrayRequester(e, t, i = !1, o = {}, c = void 0) {
5460
- const u = t + (se(o) ? "" : ` >>> ${JSON.stringify(o)}`), p = i ? te.getCachedResponse(u) : void 0;
5461
- return p ? Promise.resolve(p) : this.get(t, o, void 0, !1, c).then((m) => {
5462
- const f = m.map((R) => Ke.instanceInitializer(e, R));
5463
- return i && f && this.cacheResponse(t, f), f;
5464
- });
5484
+ getTypedDataArrayRequester(e, t, n = !1, o = {}, c = void 0) {
5485
+ const u = t + (se(o) ? "" : ` >>> ${JSON.stringify(o)}`), p = n ? te.getCachedResponse(u) : void 0;
5486
+ return p ? Promise.resolve(p) : this.getTypedList(e, t, o, !1, c).then((f) => (n && f && this.cacheResponse(u, f), f));
5465
5487
  }
5466
5488
  };
5467
5489
  /**
5468
5490
  * Кэш результатов запросов.
5469
5491
  */
5470
5492
  s(te, "responseDataCache", /* @__PURE__ */ new Map());
5471
- let Ce = te;
5472
- function Ts(n, r) {
5473
- const e = [2, 0, 1, 1, 1, 2];
5474
- return r[n % 100 > 4 && n % 100 < 20 ? 2 : e[Math.min(n % 10, 5)]];
5493
+ let Pe = te;
5494
+ function bs(i, r) {
5495
+ const e = [2, 0, 1, 1, 1, 2], t = Math.floor(Math.abs(i));
5496
+ return r[t % 100 > 4 && t % 100 < 20 ? 2 : e[Math.min(t % 10, 5)]];
5475
5497
  }
5476
- class ds {
5498
+ class Ss {
5477
5499
  /**
5478
5500
  * Генерирует и возвращает данные-заглушку неопределённого менеджера.
5479
5501
  */
5480
5502
  static generateUndefinedManagerInstance() {
5481
- return new Pe({ id: 0, name: "- Не назначен -", isActive: !0, guid: "-undefined-" });
5503
+ return new ae({ id: 0, name: "- Не назначен -", isActive: !0, guid: "-undefined-" });
5482
5504
  }
5483
5505
  /**
5484
5506
  * Выполняет проверку, является ли указанная запись записью-заглушкой с данными о неопределённом менеджере.
@@ -5489,19 +5511,19 @@ class ds {
5489
5511
  return r.id === 0 && r.guid === "-undefined-";
5490
5512
  }
5491
5513
  }
5492
- class Lt extends Ce {
5514
+ class Ot extends Pe {
5493
5515
  /**
5494
5516
  * Возвращает {@link Promise} для получения справочника списка менеджеров.
5495
5517
  */
5496
5518
  async getManagers() {
5497
- const r = "/internal/managers", e = Ce.getCachedResponse(r);
5519
+ const r = "/internal/managers", e = Pe.getCachedResponse(r);
5498
5520
  if (e)
5499
5521
  return e;
5500
- const i = (await this.get(r)).data.map((o) => Ke.instanceInitializer(Pe, o));
5501
- return this.cacheResponse(r, i), i;
5522
+ const t = await this.get(r), n = I.instanceListInitializer(ae, t.data);
5523
+ return this.cacheResponse(r, n), n;
5502
5524
  }
5503
5525
  }
5504
- class Ur extends E {
5526
+ class Hr extends J {
5505
5527
  /**
5506
5528
  * Инициализирует экземпляр класса {@link OfferShortInfo}.
5507
5529
  *
@@ -5525,10 +5547,10 @@ class Ur extends E {
5525
5547
  * @inheritDoc
5526
5548
  */
5527
5549
  s(this, "sum");
5528
- this.name = e == null ? void 0 : e.name, this.createdAt = C(e == null ? void 0 : e.createdAt) ? a(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.client = new V(e == null ? void 0 : e.client), this.sum = e == null ? void 0 : e.sum;
5550
+ this.name = e == null ? void 0 : e.name, this.createdAt = R(e == null ? void 0 : e.createdAt) ? P(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.client = new V(e == null ? void 0 : e.client), this.sum = e == null ? void 0 : e.sum;
5529
5551
  }
5530
5552
  }
5531
- class Z extends Ur {
5553
+ class Z extends Hr {
5532
5554
  /**
5533
5555
  * Инициализирует экземпляр класса {@link Offer}.
5534
5556
  *
@@ -5544,10 +5566,10 @@ class Z extends Ur {
5544
5566
  * @inheritDoc
5545
5567
  */
5546
5568
  s(this, "products");
5547
- this.sum = e.sum ?? 0, this.products = (e.products ?? []).map((t) => new Ar(t));
5569
+ this.sum = e.sum ?? 0, this.products = (e.products ?? []).map((t) => new Tr(t));
5548
5570
  }
5549
5571
  }
5550
- class bs extends de {
5572
+ class Ls extends be {
5551
5573
  /**
5552
5574
  * Инициализирует экземпляр класса {@link OffersListFilters}.
5553
5575
  *
@@ -5583,21 +5605,21 @@ class bs extends de {
5583
5605
  * @inheritDoc
5584
5606
  */
5585
5607
  asClearRaw() {
5586
- var t, i;
5608
+ var t, n;
5587
5609
  const e = super.asClearRaw();
5588
- return !((t = e == null ? void 0 : e.createdAt) != null && t.from) && !((i = e == null ? void 0 : e.createdAt) != null && i.to) && delete e.createdAt, e;
5610
+ return !((t = e == null ? void 0 : e.createdAt) != null && t.from) && !((n = e == null ? void 0 : e.createdAt) != null && n.to) && delete e.createdAt, e;
5589
5611
  }
5590
5612
  }
5591
- class be extends y {
5613
+ class Se extends m {
5592
5614
  }
5593
- class Fr extends qr {
5615
+ class Mr extends Ur {
5594
5616
  /**
5595
5617
  * Инициализирует экземпляр класса {@link OrderInfo}.
5596
5618
  *
5597
5619
  * @param data Данные для первоначальной инициализации.
5598
5620
  */
5599
5621
  constructor(e) {
5600
- var t, i, o, c, u, p, m, f;
5622
+ var t, n, o, c, u, p, f, v;
5601
5623
  super(e);
5602
5624
  /**
5603
5625
  * @inheritDoc
@@ -5649,17 +5671,17 @@ class Fr extends qr {
5649
5671
  s(this, "isLargeOrder");
5650
5672
  this.client = new V(e == null ? void 0 : e.client), this.payment = {
5651
5673
  type: ((t = e == null ? void 0 : e.payment) == null ? void 0 : t.type) ?? -1,
5652
- status: ((i = e == null ? void 0 : e.payment) == null ? void 0 : i.status) ?? -1,
5674
+ status: ((n = e == null ? void 0 : e.payment) == null ? void 0 : n.status) ?? -1,
5653
5675
  onlinePaymentLink: (o = e == null ? void 0 : e.payment) == null ? void 0 : o.onlinePaymentLink
5654
5676
  }, this.delivery = {
5655
5677
  type: ((c = e == null ? void 0 : e.delivery) == null ? void 0 : c.type) ?? -1,
5656
- date: C((u = e == null ? void 0 : e.delivery) == null ? void 0 : u.date) ? a(e.delivery.date) : ((p = e == null ? void 0 : e.delivery) == null ? void 0 : p.date) ?? /* @__PURE__ */ new Date(),
5657
- address: (m = e == null ? void 0 : e.delivery) != null && m.address ? new ye(e.delivery.address) : void 0,
5658
- warehouse: (f = e == null ? void 0 : e.delivery) != null && f.warehouse ? new Re(e.delivery.warehouse) : void 0
5659
- }, this.attachedUser = e != null && e.attachedUser ? new I(e == null ? void 0 : e.attachedUser) : void 0, this.status = new be(e == null ? void 0 : e.status), this.statusDetail = e != null && e.statusDetail ? new y(e.statusDetail) : void 0, this.salesDirection = new x(e == null ? void 0 : e.salesDirection), this.attachedAt = C(e == null ? void 0 : e.attachedAt) ? a(e.attachedAt) : e == null ? void 0 : e.attachedAt, this.isOnOrder = (e == null ? void 0 : e.isOnOrder) ?? !1, this.isNotInStock = (e == null ? void 0 : e.isNotInStock) ?? !1, this.sum = (e == null ? void 0 : e.sum) ?? 0, this.isLargeOrder = (e == null ? void 0 : e.isLargeOrder) ?? !1;
5678
+ date: R((u = e == null ? void 0 : e.delivery) == null ? void 0 : u.date) ? P(e.delivery.date) : ((p = e == null ? void 0 : e.delivery) == null ? void 0 : p.date) ?? /* @__PURE__ */ new Date(),
5679
+ address: (f = e == null ? void 0 : e.delivery) != null && f.address ? new ve(e.delivery.address) : void 0,
5680
+ warehouse: (v = e == null ? void 0 : e.delivery) != null && v.warehouse ? new De(e.delivery.warehouse) : void 0
5681
+ }, this.attachedUser = e != null && e.attachedUser ? new x(e == null ? void 0 : e.attachedUser) : void 0, this.status = new Se(e == null ? void 0 : e.status), this.statusDetail = e != null && e.statusDetail ? new m(e.statusDetail) : void 0, this.salesDirection = new _(e == null ? void 0 : e.salesDirection), this.attachedAt = R(e == null ? void 0 : e.attachedAt) ? P(e.attachedAt) : e == null ? void 0 : e.attachedAt, this.isOnOrder = (e == null ? void 0 : e.isOnOrder) ?? !1, this.isNotInStock = (e == null ? void 0 : e.isNotInStock) ?? !1, this.sum = (e == null ? void 0 : e.sum) ?? 0, this.isLargeOrder = (e == null ? void 0 : e.isLargeOrder) ?? !1;
5660
5682
  }
5661
5683
  }
5662
- class It extends Dr {
5684
+ class _t extends $r {
5663
5685
  /**
5664
5686
  * Инициализирует экземпляр класса {@link OrderItem}.
5665
5687
  *
@@ -5716,10 +5738,10 @@ class It extends Dr {
5716
5738
  * Продукт, которым заменена текущая запись.
5717
5739
  */
5718
5740
  s(this, "replacement");
5719
- this.product = new j(e.product), this.currency = new N(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, t && (this.replacement = t, this.quantity !== t.quantity && this.changedFields.push("quantity"), this.length !== t.length && this.changedFields.push("length"));
5741
+ this.product = new j(e.product), this.currency = new F(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 = U(e.sawing) ? e.sawing : e.sawing ? [e.sawing] : void 0, t && (this.replacement = t, this.quantity !== t.quantity && this.changedFields.push("quantity"), this.length !== t.length && this.changedFields.push("length"));
5720
5742
  }
5721
5743
  }
5722
- class S extends Fr {
5744
+ class S extends Mr {
5723
5745
  /**
5724
5746
  * Инициализирует экземпляр класса {@link Order}.
5725
5747
  *
@@ -5780,14 +5802,14 @@ class S extends Fr {
5780
5802
  * @inheritDoc
5781
5803
  */
5782
5804
  s(this, "erpOrderUrl");
5783
- this.products = (e.products ?? []).map((i) => {
5805
+ this.products = (e.products ?? []).map((n) => {
5784
5806
  var c;
5785
- const o = i.replacementId ? (c = e.products) == null ? void 0 : c.find((u) => u.id === i.replacementId) : void 0;
5786
- return new It(i, o);
5787
- }), this.invoices = e.invoices ?? [], this.comment = e.comment, this.image = e.image, this.contragent = e.contragent ? $e.createInstance(e.contragent) : void 0, this.barcode = e.barcode, this.orderSource = e.orderSource ? new y(e.orderSource) : void 0, this.isAllowProcessingWithoutPayment = e.isAllowProcessingWithoutPayment, this.nextStatuses = (t = e.nextStatuses) == null ? void 0 : t.map((i) => new be(i)), this.actions = e.actions, this.operatorsComment = e.operatorsComment, this.operatorsForWarehouseComment = e.operatorsForWarehouseComment, this.erpOrderUrl = e.erpOrderUrl;
5807
+ const o = n.replacementId ? (c = e.products) == null ? void 0 : c.find((u) => u.id === n.replacementId) : void 0;
5808
+ return new _t(n, o);
5809
+ }), this.invoices = e.invoices ?? [], this.comment = e.comment, this.image = e.image, this.contragent = e.contragent ? Te.createInstance(e.contragent) : void 0, this.barcode = e.barcode, this.orderSource = e.orderSource ? new m(e.orderSource) : void 0, this.isAllowProcessingWithoutPayment = e.isAllowProcessingWithoutPayment, this.nextStatuses = (t = e.nextStatuses) == null ? void 0 : t.map((n) => new Se(n)), this.actions = e.actions, this.operatorsComment = e.operatorsComment, this.operatorsForWarehouseComment = e.operatorsForWarehouseComment, this.erpOrderUrl = e.erpOrderUrl;
5788
5810
  }
5789
5811
  }
5790
- class Ss extends ue {
5812
+ class ks extends he {
5791
5813
  /**
5792
5814
  * Возвращает список заказов-черновиков, удовлетворяющих указанным параметрам поиска.
5793
5815
  *
@@ -5798,20 +5820,8 @@ class Ss extends ue {
5798
5820
  *
5799
5821
  * @see /doc/api/internal#/Заказы/api_internal_order_commercial_offer_get_list
5800
5822
  */
5801
- getOffers(r, e, t, i = void 0) {
5802
- return this.getPaginated(
5803
- "/internal/orders/offers",
5804
- r,
5805
- e,
5806
- t,
5807
- {},
5808
- (o) => {
5809
- const c = { ...o.data };
5810
- return c.data = c.data.map((u) => new Ur(u)), c;
5811
- },
5812
- void 0,
5813
- i
5814
- );
5823
+ getOffers(r, e, t, n = void 0) {
5824
+ return this.getTypedPaginated(Hr, "/internal/orders/offers", r, e, t, {}, void 0, n);
5815
5825
  }
5816
5826
  /**
5817
5827
  * Создаёт заказ-черновик из содержимого корзины клиента и возвращает данные созданной записи.
@@ -5830,7 +5840,7 @@ class Ss extends ue {
5830
5840
  name: e,
5831
5841
  items: t != null && t.length ? t : void 0
5832
5842
  },
5833
- (i) => new Z(i.data)
5843
+ (n) => new Z(n.data)
5834
5844
  );
5835
5845
  }
5836
5846
  /**
@@ -5877,17 +5887,17 @@ class Ss extends ue {
5877
5887
  *
5878
5888
  * @see /doc/api/internal#/Заказы/api_internal_order_commercial_offer_create_order
5879
5889
  */
5880
- createOrderFromDraft(r, e, t, i = {}) {
5881
- const o = k().config.dateFormats.api;
5890
+ createOrderFromDraft(r, e, t, n = {}) {
5891
+ const o = L().config.dateFormats.api;
5882
5892
  return this.post(
5883
5893
  `/internal/orders/offers/${r}/create-order`,
5884
5894
  {
5885
5895
  ...e,
5886
- deliveryDate: e.deliveryDate ? L(e.deliveryDate, o) : void 0,
5896
+ deliveryDate: e.deliveryDate ? k(e.deliveryDate, o) : void 0,
5887
5897
  items: t != null && t.length ? t : void 0
5888
5898
  },
5889
- (c) => c.data.map((u) => new S(u)),
5890
- i
5899
+ (c) => I.instanceListInitializer(S, c.data),
5900
+ n
5891
5901
  );
5892
5902
  }
5893
5903
  /**
@@ -5915,7 +5925,7 @@ class Ss extends ue {
5915
5925
  is_additional_sale: e.isAdditionalSale,
5916
5926
  ...e.configuratorParams
5917
5927
  },
5918
- (i) => new Z(i.data),
5928
+ (n) => new Z(n.data),
5919
5929
  t
5920
5930
  );
5921
5931
  }
@@ -5930,7 +5940,7 @@ class Ss extends ue {
5930
5940
  *
5931
5941
  * @see /doc/api/internal#/Заказы/api_internal_order_commercial_offer_product_modify
5932
5942
  */
5933
- patchOfferProduct(r, e, t, i = {}) {
5943
+ patchOfferProduct(r, e, t, n = {}) {
5934
5944
  return this.patch(
5935
5945
  `/internal/orders/offers/${r}/products/${e}`,
5936
5946
  {
@@ -5945,7 +5955,7 @@ class Ss extends ue {
5945
5955
  ...t.configuratorParams
5946
5956
  },
5947
5957
  (o) => new Z(o.data),
5948
- i
5958
+ n
5949
5959
  );
5950
5960
  }
5951
5961
  /**
@@ -5997,8 +6007,8 @@ class Ss extends ue {
5997
6007
  return this.post(`/internal/orders/offers/${r}/send`, e);
5998
6008
  }
5999
6009
  }
6000
- var _t = /* @__PURE__ */ ((n) => (n.View = "view", n.Share = "share", n.EditTags = "edit_tags", n.SaveOrderIgnoredProducts = "save_order_ignored_products", n.ChangeStatus = "change_status", n.ChangeProducts = "change_products", n.ChangeOrderParameters = "change_order_parameters", n.Recalculate = "recalculate", n.AttachOrder = "attach_order", n.DetachOrder = "detach_order", n.ChangeAttachedOperator = "change_attached_operator", n.SendOnlinePaymentLink = "send_online_payment_link", n.ConfirmOnlineFullPayment = "confirm_online_full_payment", n.MergeOrders = "merge_orders", n.GetHistory = "get_history", n.CloneOrder = "clone_order", n.DeleteAttachedFile = "delete_attached_file", n))(_t || {});
6001
- class ks {
6010
+ var qt = /* @__PURE__ */ ((i) => (i.View = "view", i.Share = "share", i.EditTags = "edit_tags", i.SaveOrderIgnoredProducts = "save_order_ignored_products", i.ChangeStatus = "change_status", i.ChangeProducts = "change_products", i.ChangeOrderParameters = "change_order_parameters", i.Recalculate = "recalculate", i.AttachOrder = "attach_order", i.DetachOrder = "detach_order", i.ChangeAttachedOperator = "change_attached_operator", i.SendOnlinePaymentLink = "send_online_payment_link", i.ConfirmOnlineFullPayment = "confirm_online_full_payment", i.MergeOrders = "merge_orders", i.GetHistory = "get_history", i.CloneOrder = "clone_order", i.DeleteAttachedFile = "delete_attached_file", i))(qt || {});
6011
+ class Is {
6002
6012
  /**
6003
6013
  * Инициализирует экземпляр класса {@link OrderEditorData}.
6004
6014
  *
@@ -6061,22 +6071,22 @@ class ks {
6061
6071
  * @inheritDoc
6062
6072
  */
6063
6073
  s(this, "isAdditionalSale");
6064
- var e, t, i;
6065
- this.paymentType = r == null ? void 0 : r.payment.type, this.deliveryType = r == null ? void 0 : r.delivery.type, this.contragentId = (e = r == null ? void 0 : r.contragent) == null ? void 0 : e.id, this.deliveryDate = r != null && r.delivery.date ? new Date(r.delivery.date) : void 0, this.addressId = (t = r == null ? void 0 : r.delivery.address) == null ? void 0 : t.id, this.warehouseId = (i = r == null ? void 0 : r.delivery.warehouse) == null ? void 0 : i.id, this.comment = r == null ? void 0 : r.comment, this.barcode = r == null ? void 0 : r.barcode, this.operatorsComment = r == null ? void 0 : r.operatorsComment, this.operatorsForWarehouseComment = r == null ? void 0 : r.operatorsForWarehouseComment, this.isAllowProcessingWithoutPayment = r == null ? void 0 : r.isAllowProcessingWithoutPayment;
6074
+ var e, t, n;
6075
+ this.paymentType = r == null ? void 0 : r.payment.type, this.deliveryType = r == null ? void 0 : r.delivery.type, this.contragentId = (e = r == null ? void 0 : r.contragent) == null ? void 0 : e.id, this.deliveryDate = r != null && r.delivery.date ? new Date(r.delivery.date) : void 0, this.addressId = (t = r == null ? void 0 : r.delivery.address) == null ? void 0 : t.id, this.warehouseId = (n = r == null ? void 0 : r.delivery.warehouse) == null ? void 0 : n.id, this.comment = r == null ? void 0 : r.comment, this.barcode = r == null ? void 0 : r.barcode, this.operatorsComment = r == null ? void 0 : r.operatorsComment, this.operatorsForWarehouseComment = r == null ? void 0 : r.operatorsForWarehouseComment, this.isAllowProcessingWithoutPayment = r == null ? void 0 : r.isAllowProcessingWithoutPayment;
6066
6076
  }
6067
6077
  }
6068
- class Hr extends y {
6078
+ class Br extends m {
6069
6079
  }
6070
- class Br extends y {
6080
+ class jr extends m {
6071
6081
  }
6072
- class Ls extends de {
6082
+ class xs extends be {
6073
6083
  /**
6074
6084
  * Инициализирует экземпляр класса {@link OrdersListFilters}.
6075
6085
  *
6076
6086
  * @param data Данные для первоначальной инициализации.
6077
6087
  */
6078
6088
  constructor(e) {
6079
- var t, i, o, c;
6089
+ var t, n, o, c;
6080
6090
  super();
6081
6091
  /**
6082
6092
  * @inheritDoc
@@ -6170,7 +6180,7 @@ class Ls extends de {
6170
6180
  * @inheritDoc
6171
6181
  */
6172
6182
  s(this, "onlyMyRegions");
6173
- this.attachedUsers = (t = e == null ? void 0 : e.attachedUsers) == null ? void 0 : t.map((u) => "isActive" in u ? new Pe(u) : new Hr(u)), this.clientSearchTerm = e == null ? void 0 : e.clientSearchTerm, this.client = e != null && e.client ? new V(e.client) : void 0, this.contragent = e == null ? void 0 : e.contragent, this.createdAt = new T(e == null ? void 0 : e.createdAt), this.creator = e != null && e.creator ? new I(e.creator) : void 0, this.deliveryDate = new T(e == null ? void 0 : e.deliveryDate), this.deliveryAddressSearch = e == null ? void 0 : e.deliveryAddressSearch, this.clientCities = (i = e == null ? void 0 : e.clientCities) == null ? void 0 : i.map((u) => new oe(u)), this.id = e == null ? void 0 : e.id, this.isApproved = e == null ? void 0 : e.isApproved, this.isNotInStock = e == null ? void 0 : e.isNotInStock, this.isOnOrder = e == null ? void 0 : e.isOnOrder, this.isLargeOrder = e == null ? void 0 : e.isLargeOrder, this.attachedAt = new T(e == null ? void 0 : e.attachedAt), this.salesDirections = (o = e == null ? void 0 : e.salesDirections) == null ? void 0 : o.map((u) => new x(u)), this.status = e == null ? void 0 : e.status, this.statusDetail = e == null ? void 0 : e.statusDetail, this.deliveryType = e != null && e.deliveryType ? new H(e.deliveryType) : void 0, this.paymentType = e != null && e.paymentType ? new Br(e.paymentType) : void 0, this.warehouses = (c = e == null ? void 0 : e.warehouses) == null ? void 0 : c.map((u) => new Re(u)), this.isToProcess = e == null ? void 0 : e.isToProcess;
6183
+ this.attachedUsers = (t = e == null ? void 0 : e.attachedUsers) == null ? void 0 : t.map((u) => "isActive" in u ? new ae(u) : new Br(u)), this.clientSearchTerm = e == null ? void 0 : e.clientSearchTerm, this.client = e != null && e.client ? new V(e.client) : void 0, this.contragent = e == null ? void 0 : e.contragent, this.createdAt = new T(e == null ? void 0 : e.createdAt), this.creator = e != null && e.creator ? new x(e.creator) : void 0, this.deliveryDate = new T(e == null ? void 0 : e.deliveryDate), this.deliveryAddressSearch = e == null ? void 0 : e.deliveryAddressSearch, this.clientCities = (n = e == null ? void 0 : e.clientCities) == null ? void 0 : n.map((u) => new oe(u)), this.id = e == null ? void 0 : e.id, this.isApproved = e == null ? void 0 : e.isApproved, this.isNotInStock = e == null ? void 0 : e.isNotInStock, this.isOnOrder = e == null ? void 0 : e.isOnOrder, this.isLargeOrder = e == null ? void 0 : e.isLargeOrder, this.attachedAt = new T(e == null ? void 0 : e.attachedAt), this.salesDirections = (o = e == null ? void 0 : e.salesDirections) == null ? void 0 : o.map((u) => new _(u)), this.status = e == null ? void 0 : e.status, this.statusDetail = e == null ? void 0 : e.statusDetail, this.deliveryType = e != null && e.deliveryType ? new B(e.deliveryType) : void 0, this.paymentType = e != null && e.paymentType ? new jr(e.paymentType) : void 0, this.warehouses = (c = e == null ? void 0 : e.warehouses) == null ? void 0 : c.map((u) => new De(u)), this.isToProcess = e == null ? void 0 : e.isToProcess;
6174
6184
  }
6175
6185
  /**
6176
6186
  * @inheritDoc
@@ -6187,7 +6197,7 @@ class Ls extends de {
6187
6197
  this.deliveryDate.from = null, this.deliveryDate.to = null;
6188
6198
  break;
6189
6199
  case "deliveryType":
6190
- this.deliveryType = new H();
6200
+ this.deliveryType = new B();
6191
6201
  break;
6192
6202
  case "clientCities":
6193
6203
  this.clientCities = [];
@@ -6196,12 +6206,14 @@ class Ls extends de {
6196
6206
  this.attachedAt.from = null, this.attachedAt.to = null;
6197
6207
  break;
6198
6208
  case "salesDirection":
6209
+ case "salesDirections":
6199
6210
  this.salesDirections = [];
6200
6211
  break;
6201
6212
  case "status":
6202
6213
  this.status = [];
6203
6214
  break;
6204
6215
  case "warehouse":
6216
+ case "warehouses":
6205
6217
  this.warehouses = [];
6206
6218
  break;
6207
6219
  default:
@@ -6214,12 +6226,12 @@ class Ls extends de {
6214
6226
  * @inheritDoc
6215
6227
  */
6216
6228
  asClearRaw() {
6217
- var t, i, o, c, u, p;
6229
+ var t, n, o, c, u, p;
6218
6230
  const e = super.asClearRaw();
6219
- return !((t = e == null ? void 0 : e.createdAt) != null && t.from) && !((i = e == null ? void 0 : e.createdAt) != null && i.to) && delete e.createdAt, !((o = e == null ? void 0 : e.deliveryDate) != null && o.from) && !((c = e == null ? void 0 : e.deliveryDate) != null && c.to) && delete e.deliveryDate, !((u = e == null ? void 0 : e.attachedAt) != null && u.from) && !((p = e == null ? void 0 : e.attachedAt) != null && p.to) && delete e.attachedAt, e;
6231
+ return !((t = e == null ? void 0 : e.createdAt) != null && t.from) && !((n = e == null ? void 0 : e.createdAt) != null && n.to) && delete e.createdAt, !((o = e == null ? void 0 : e.deliveryDate) != null && o.from) && !((c = e == null ? void 0 : e.deliveryDate) != null && c.to) && delete e.deliveryDate, !((u = e == null ? void 0 : e.attachedAt) != null && u.from) && !((p = e == null ? void 0 : e.attachedAt) != null && p.to) && delete e.attachedAt, e;
6220
6232
  }
6221
6233
  }
6222
- class xt {
6234
+ class Nt {
6223
6235
  /**
6224
6236
  * Инициализирует экземпляр класса {@link OrderStatusHistoryInfo}.
6225
6237
  *
@@ -6242,10 +6254,10 @@ class xt {
6242
6254
  * @inheritDoc
6243
6255
  */
6244
6256
  s(this, "createdAt");
6245
- this.user = new I(r == null ? void 0 : r.user), this.status = new be(r == null ? void 0 : r.status), this.statusDetail = r != null && r.statusDetail ? new y(r.statusDetail) : void 0, this.createdAt = C(r == null ? void 0 : r.createdAt) ? a(r.createdAt) : (r == null ? void 0 : r.createdAt) ?? /* @__PURE__ */ new Date();
6257
+ this.user = new x(r == null ? void 0 : r.user), this.status = new Se(r == null ? void 0 : r.status), this.statusDetail = r != null && r.statusDetail ? new m(r.statusDetail) : void 0, this.createdAt = R(r == null ? void 0 : r.createdAt) ? P(r.createdAt) : (r == null ? void 0 : r.createdAt) ?? /* @__PURE__ */ new Date();
6246
6258
  }
6247
6259
  }
6248
- class Is extends ue {
6260
+ class Os extends he {
6249
6261
  /**
6250
6262
  * Возвращает данные о заказах, удовлетворяющих указанным параметрам поиска.
6251
6263
  *
@@ -6256,20 +6268,8 @@ class Is extends ue {
6256
6268
  *
6257
6269
  * @see /doc/api/internal#/Заказы/api_internal_orders_get_list
6258
6270
  */
6259
- getOrders(r, e, t, i = void 0) {
6260
- return this.getPaginated(
6261
- "/internal/orders",
6262
- r,
6263
- e,
6264
- t,
6265
- {},
6266
- (o) => {
6267
- const c = { ...o.data };
6268
- return c.data = c.data.map((u) => new Fr(u)), c;
6269
- },
6270
- void 0,
6271
- i
6272
- );
6271
+ getOrders(r, e, t, n = void 0) {
6272
+ return this.getTypedPaginated(Mr, "/internal/orders", r, e, t, {}, void 0, n);
6273
6273
  }
6274
6274
  /**
6275
6275
  * Возвращает количество заказов, соответствующих указанным фильтрам.
@@ -6322,16 +6322,16 @@ class Is extends ue {
6322
6322
  * в случае ошибок в запросах.
6323
6323
  * @see /doc/api/internal#/operations/api_internal_client_orders_create
6324
6324
  */
6325
- createClientOrder(r, e, t, i, o = {}) {
6326
- const c = k().config.dateFormats.api;
6325
+ createClientOrder(r, e, t, n, o = {}) {
6326
+ const c = L().config.dateFormats.api;
6327
6327
  return this.post(
6328
6328
  `/internal/clients/${r}/orders/${e}`,
6329
6329
  {
6330
6330
  ...t,
6331
- deliveryDate: L(t.deliveryDate, c),
6332
- items: i != null && i.length ? i : void 0
6331
+ deliveryDate: k(t.deliveryDate, c),
6332
+ items: n != null && n.length ? n : void 0
6333
6333
  },
6334
- (u) => u.data.map((p) => new S(p)),
6334
+ (u) => I.instanceListInitializer(S, u.data),
6335
6335
  o
6336
6336
  );
6337
6337
  }
@@ -6398,12 +6398,12 @@ class Is extends ue {
6398
6398
  * @see /doc/api/internal#/Заказы/api_internal_orders_update
6399
6399
  */
6400
6400
  updateOrder(r, e, t = {}) {
6401
- const i = k().config.dateFormats.api;
6401
+ const n = L().config.dateFormats.api;
6402
6402
  return this.patch(
6403
6403
  `/internal/orders/${r}`,
6404
6404
  {
6405
6405
  ...e,
6406
- deliveryDate: e.deliveryDate ? L(e.deliveryDate, i) : void 0
6406
+ deliveryDate: e.deliveryDate ? k(e.deliveryDate, n) : void 0
6407
6407
  },
6408
6408
  (o) => new S(o.data),
6409
6409
  t
@@ -6435,7 +6435,7 @@ class Is extends ue {
6435
6435
  is_additional_sale: e.isAdditionalSale,
6436
6436
  ...e.configuratorParams
6437
6437
  },
6438
- (i) => new S(i.data),
6438
+ (n) => new S(n.data),
6439
6439
  t
6440
6440
  );
6441
6441
  }
@@ -6451,7 +6451,7 @@ class Is extends ue {
6451
6451
  *
6452
6452
  * @see /doc/api/internal#/Заказы/api_internal_orders_status_change
6453
6453
  */
6454
- changeOrderStatus(r, e, t, i = {}) {
6454
+ changeOrderStatus(r, e, t, n = {}) {
6455
6455
  return this.patch(
6456
6456
  `/internal/orders/${r}/status`,
6457
6457
  {
@@ -6459,7 +6459,7 @@ class Is extends ue {
6459
6459
  statusDetail: t
6460
6460
  },
6461
6461
  (o) => new S(o.data),
6462
- i
6462
+ n
6463
6463
  );
6464
6464
  }
6465
6465
  /**
@@ -6482,11 +6482,7 @@ class Is extends ue {
6482
6482
  * @see /doc/api/internal#/Заказы/api_internal_orders_status_history_get
6483
6483
  */
6484
6484
  getOrderStatusHistory(r) {
6485
- return this.get(
6486
- `/internal/orders/${r}/history`,
6487
- {},
6488
- (e) => e.data.map((t) => new xt(t))
6489
- );
6485
+ return this.getTypedList(Nt, `/internal/orders/${r}/history`);
6490
6486
  }
6491
6487
  /**
6492
6488
  * Возвращает содержимое печатной формы заказа в формате HTML.
@@ -6565,7 +6561,7 @@ class Is extends ue {
6565
6561
  *
6566
6562
  * @see /doc/api/internal#/Заказы/api_internal_orders_product_update
6567
6563
  */
6568
- patchOrderProduct(r, e, t, i = {}) {
6564
+ patchOrderProduct(r, e, t, n = {}) {
6569
6565
  return this.patch(
6570
6566
  `/internal/orders/${r}/products/${e}`,
6571
6567
  {
@@ -6580,7 +6576,7 @@ class Is extends ue {
6580
6576
  ...t.configuratorParams
6581
6577
  },
6582
6578
  (o) => new S(o.data),
6583
- i
6579
+ n
6584
6580
  );
6585
6581
  }
6586
6582
  /**
@@ -6613,21 +6609,21 @@ class Is extends ue {
6613
6609
  *
6614
6610
  * @see /doc/api/internal#/operations/api_internal_orders_delivery_get_cost
6615
6611
  */
6616
- getDeliveryCost(r, e, t, i = void 0) {
6617
- const o = k().config.dateFormats.api;
6612
+ getDeliveryCost(r, e, t, n = void 0) {
6613
+ const o = L().config.dateFormats.api;
6618
6614
  return this.get(
6619
6615
  `/internal/orders/delivery/${r}/cost`,
6620
6616
  {
6621
- date: L(e, o),
6617
+ date: k(e, o),
6622
6618
  warehouse_id: t
6623
6619
  },
6624
6620
  (c) => c.data,
6625
6621
  void 0,
6626
- i
6622
+ n
6627
6623
  );
6628
6624
  }
6629
6625
  }
6630
- class qe {
6626
+ class Ne {
6631
6627
  /**
6632
6628
  * Инициализирует экземпляр класса {@link PriceAnalyze}.
6633
6629
  *
@@ -6654,25 +6650,25 @@ class qe {
6654
6650
  * Источник клиентской цены.
6655
6651
  */
6656
6652
  s(this, "source");
6657
- this.client = new V(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) ?? Ve.Product;
6653
+ this.client = new V(r == null ? void 0 : r.client), this.product = new O(r == null ? void 0 : r.product), this.cost = (r == null ? void 0 : r.cost) ?? 0, this.costCoefficient = (r == null ? void 0 : r.costCoefficient) ?? 0, this.source = (r == null ? void 0 : r.source) ?? Ke.Product;
6658
6654
  }
6659
6655
  }
6660
- const Ne = (n) => {
6661
- var r, e, t, i, o;
6662
- return n ? vr(
6656
+ const Ue = (i) => {
6657
+ var r, e, t, n, o;
6658
+ return i ? Cr(
6663
6659
  {
6664
- cities: (r = n.cities) == null ? void 0 : r.map((c) => c.id),
6665
- clients: (e = n.clients) == null ? void 0 : e.map((c) => c.id),
6666
- managers: (t = n.managers) == null ? void 0 : t.map((c) => c.id),
6667
- partnerGroups: (i = n.partnerGroups) == null ? void 0 : i.map((c) => c.id),
6668
- salesDirections: (o = n.salesDirections) == null ? void 0 : o.map((c) => c.id),
6669
- hideNotActive: n.hideNotActive
6660
+ cities: (r = i.cities) == null ? void 0 : r.map((c) => c.id),
6661
+ clients: (e = i.clients) == null ? void 0 : e.map((c) => c.id),
6662
+ managers: (t = i.managers) == null ? void 0 : t.map((c) => c.id),
6663
+ partnerGroups: (n = i.partnerGroups) == null ? void 0 : n.map((c) => c.id),
6664
+ salesDirections: (o = i.salesDirections) == null ? void 0 : o.map((c) => c.id),
6665
+ hideNotActive: i.hideNotActive
6670
6666
  },
6671
- (c) => d(c) || (B(c) || ze(c)) && se(c)
6667
+ (c) => d(c) || (U(c) || We(c)) && se(c)
6672
6668
  ) : {};
6673
- }, hr = (n) => {
6669
+ }, gr = (i) => {
6674
6670
  const r = {};
6675
- 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;
6671
+ return i.from && (i.from.coefficient || i.from.value) && (r.from = {}, i.from.coefficient && (r.from.priceCoefficientId = i.from.coefficient.id), i.from.value && (r.from.increasePercent = i.from.value)), i.to && (i.to.coefficient || i.to.value) && (r.to = {}, i.to.coefficient && (r.to.priceCoefficientId = i.to.coefficient.id), i.to.value && (r.to.increasePercent = i.to.value)), r;
6676
6672
  };
6677
6673
  class _s extends h {
6678
6674
  /**
@@ -6688,10 +6684,10 @@ class _s extends h {
6688
6684
  return this.get(
6689
6685
  `/internal/price/products/${r}/analyze`,
6690
6686
  {
6691
- ...hr(e),
6692
- filters: Ne(t)
6687
+ ...gr(e),
6688
+ filters: Ue(t)
6693
6689
  },
6694
- (i) => i.data.map((o) => new qe(o))
6690
+ (n) => I.instanceListInitializer(Ne, n.data)
6695
6691
  );
6696
6692
  }
6697
6693
  /**
@@ -6707,10 +6703,10 @@ class _s extends h {
6707
6703
  return this.get(
6708
6704
  `/internal/price/categories/${r}/analyze`,
6709
6705
  {
6710
- ...hr(e),
6711
- filters: Ne(t)
6706
+ ...gr(e),
6707
+ filters: Ue(t)
6712
6708
  },
6713
- (i) => i.data.map((o) => new qe(o))
6709
+ (n) => I.instanceListInitializer(Ne, n.data)
6714
6710
  );
6715
6711
  }
6716
6712
  /**
@@ -6729,13 +6725,13 @@ class _s extends h {
6729
6725
  `/internal/price/categories/${r}/analyze/square`,
6730
6726
  {
6731
6727
  ...e,
6732
- filters: Ne(t)
6728
+ filters: Ue(t)
6733
6729
  },
6734
- (i) => i.data.map((o) => new qe(o))
6730
+ (n) => I.instanceListInitializer(Ne, n.data)
6735
6731
  );
6736
6732
  }
6737
6733
  }
6738
- class Ot {
6734
+ class Ut {
6739
6735
  /**
6740
6736
  * Инициализирует экземпляр класса {@link PriceHistoryItem}.
6741
6737
  *
@@ -6782,10 +6778,10 @@ class Ot {
6782
6778
  * @inheritDoc
6783
6779
  */
6784
6780
  s(this, "currency");
6785
- this.cost = r.cost ?? 0, this.isLowCost = r.isLowCost ?? !1, this.isRetail = r.isRetail ?? !1, this.costDate = C(r.costDate) ? a(r.costDate) : r.costDate ?? /* @__PURE__ */ new Date(), this.discountName = r.discountName, this.priceTemplateName = r.priceTemplateName, this.product = r.product ? new ve(r.product) : void 0, this.client = r.client ? new I(r.client) : void 0, this.executor = r.executor ? new I(r.executor) : void 0, this.currency = r.currency ? new N(r.currency) : void 0;
6781
+ this.cost = r.cost ?? 0, this.isLowCost = r.isLowCost ?? !1, this.isRetail = r.isRetail ?? !1, this.costDate = R(r.costDate) ? P(r.costDate) : r.costDate ?? /* @__PURE__ */ new Date(), this.discountName = r.discountName, this.priceTemplateName = r.priceTemplateName, this.product = r.product ? new Re(r.product) : void 0, this.client = r.client ? new x(r.client) : void 0, this.executor = r.executor ? new x(r.executor) : void 0, this.currency = r.currency ? new F(r.currency) : void 0;
6786
6782
  }
6787
6783
  }
6788
- class qt extends ve {
6784
+ class Ft extends Re {
6789
6785
  /**
6790
6786
  * Инициализирует экземпляр класса {@link ProductPriceHistory}.
6791
6787
  *
@@ -6797,10 +6793,10 @@ class qt extends ve {
6797
6793
  * @inheritDoc
6798
6794
  */
6799
6795
  s(this, "history");
6800
- this.history = ae(e.history, (t) => new Ot(t));
6796
+ this.history = le(e.history, (t) => new Ut(t));
6801
6797
  }
6802
6798
  }
6803
- class xs extends h {
6799
+ class qs extends h {
6804
6800
  /**
6805
6801
  * Возвращает данные об истории изменения цен.
6806
6802
  *
@@ -6809,22 +6805,22 @@ class xs extends h {
6809
6805
  * @see /docs/api#/operations/api_internal_price_history_get
6810
6806
  */
6811
6807
  getProductPriceHistory(r) {
6812
- var o, c, u, p, m;
6813
- const e = k().config.dateFormats.api, t = vr(
6814
- we(r, {
6808
+ var o, c, u, p, f;
6809
+ const e = L().config.dateFormats.api, t = Cr(
6810
+ Ce(r, {
6815
6811
  costDate: {
6816
- from: Fe((o = r.costDate) == null ? void 0 : o.from) ? L(r.costDate.from, e) : (c = r.costDate) == null ? void 0 : c.from,
6817
- to: Fe((u = r.costDate) == null ? void 0 : u.to) ? L(r.costDate.to, e) : (p = r.costDate) == null ? void 0 : p.to
6812
+ from: He((o = r.costDate) == null ? void 0 : o.from) ? k(r.costDate.from, e) : (c = r.costDate) == null ? void 0 : c.from,
6813
+ to: He((u = r.costDate) == null ? void 0 : u.to) ? k(r.costDate.to, e) : (p = r.costDate) == null ? void 0 : p.to
6818
6814
  }
6819
6815
  }),
6820
- (f) => d(f) || (B(f) || ze(f)) && se(f)
6821
- ), i = ((m = r.product) == null ? void 0 : m[0]) ?? 0;
6822
- return delete t.product, this.get(`/internal/price/products/${i}/history`, t).then((f) => [
6823
- new qt(we(f[0], { history: f }))
6816
+ (v) => d(v) || (U(v) || We(v)) && se(v)
6817
+ ), n = ((f = r.product) == null ? void 0 : f[0]) ?? 0;
6818
+ return delete t.product, this.get(`/internal/price/products/${n}/history`, t).then((v) => [
6819
+ new Ft(Ce(v[0], { history: v }))
6824
6820
  ]);
6825
6821
  }
6826
6822
  }
6827
- class gr {
6823
+ class fr {
6828
6824
  /**
6829
6825
  * Инициализирует экземпляр класса {@link RecommendationsList}.
6830
6826
  *
@@ -6839,10 +6835,10 @@ class gr {
6839
6835
  * Список рекомендованных категорий продуктов.
6840
6836
  */
6841
6837
  s(this, "productCategories", []);
6842
- r != null && r.products && (this.products = r.products.map((e) => new ve(e))), r != null && r.productCategories && (this.productCategories = r.productCategories.map((e) => new ve(e)));
6838
+ r != null && r.products && (this.products = r.products.map((e) => new Re(e))), r != null && r.productCategories && (this.productCategories = r.productCategories.map((e) => new Re(e)));
6843
6839
  }
6844
6840
  }
6845
- class Os extends h {
6841
+ class Ns extends h {
6846
6842
  /**
6847
6843
  * Возвращает данные о рекомендациях указанной категории продуктов.
6848
6844
  *
@@ -6850,7 +6846,7 @@ class Os extends h {
6850
6846
  * @see /docs/api#/operations/api_internal_recommendations_product_category_get
6851
6847
  */
6852
6848
  getProductCategoryRecommendations(r) {
6853
- return this.get(`/internal/catalog/recommendations/categories/${r.id}`, {}, (e) => new gr(e.data));
6849
+ return this.get(`/internal/catalog/recommendations/categories/${r.id}`, {}, (e) => new fr(e.data));
6854
6850
  }
6855
6851
  /**
6856
6852
  * Возвращает данные о рекомендациях указанного продукта.
@@ -6859,7 +6855,7 @@ class Os extends h {
6859
6855
  * @see /docs/api#/operations/api_internal_recommendations_product_get
6860
6856
  */
6861
6857
  getProductRecommendations(r) {
6862
- return this.get(`/internal/catalog/recommendations/products/${r.id}`, {}, (e) => new gr(e.data));
6858
+ return this.get(`/internal/catalog/recommendations/products/${r.id}`, {}, (e) => new fr(e.data));
6863
6859
  }
6864
6860
  /**
6865
6861
  * Выполняет сохранение данных о рекомендуемых категориях продуктов.
@@ -6888,10 +6884,10 @@ class Os extends h {
6888
6884
  });
6889
6885
  }
6890
6886
  }
6891
- var Nt = /* @__PURE__ */ ((n) => (n.New = "new", n.Processing = "processing", n.AwaitingSupplyProducts = "awaiting_supply_products", n.InvoiceIssued = "invoice_issued", n.ProcessingOnStock = "processing_on_stock", n.Finished = "finished", n.OrderUpdated = "order_updated", n.Canceled = "canceled", n.Error = "error", n))(Nt || {}), Ut = /* @__PURE__ */ ((n) => (n.CanceledBy1c = "canceled_by1c", n.CanceledByClient = "canceled_by_client", n.FinishedNotApproved = "finished_not_approved", n.ProcessingByPurchasingDepartment = "processing_by_purchasing_department", n.WillWaiting = "will_waiting", n))(Ut || {});
6892
- class Ft extends y {
6887
+ var Ht = /* @__PURE__ */ ((i) => (i.New = "new", i.Processing = "processing", i.AwaitingSupplyProducts = "awaiting_supply_products", i.InvoiceIssued = "invoice_issued", i.ProcessingOnStock = "processing_on_stock", i.Finished = "finished", i.OrderUpdated = "order_updated", i.Canceled = "canceled", i.Error = "error", i))(Ht || {}), Mt = /* @__PURE__ */ ((i) => (i.CanceledBy1c = "canceled_by1c", i.CanceledByClient = "canceled_by_client", i.FinishedNotApproved = "finished_not_approved", i.ProcessingByPurchasingDepartment = "processing_by_purchasing_department", i.WillWaiting = "will_waiting", i))(Mt || {});
6888
+ class Bt extends m {
6893
6889
  }
6894
- class Ht extends y {
6890
+ class jt extends m {
6895
6891
  }
6896
6892
  class er extends b {
6897
6893
  /**
@@ -6908,7 +6904,7 @@ class er extends b {
6908
6904
  this.abbr = (e == null ? void 0 : e.abbr) ?? "";
6909
6905
  }
6910
6906
  }
6911
- class mr extends y {
6907
+ class mr extends m {
6912
6908
  /**
6913
6909
  * Инициализирует экземпляр класса {@link CityWithUserRegion}.
6914
6910
  *
@@ -6921,18 +6917,18 @@ class mr extends y {
6921
6917
  * @inheritDoc
6922
6918
  */
6923
6919
  s(this, "userRegions");
6924
- this.userRegions = ((t = e == null ? void 0 : e.userRegions) == null ? void 0 : t.map((i) => new er(i))) ?? [];
6920
+ this.userRegions = ((t = e == null ? void 0 : e.userRegions) == null ? void 0 : t.map((n) => new er(n))) ?? [];
6925
6921
  }
6926
6922
  }
6927
- class Bt extends y {
6923
+ class Gt extends m {
6928
6924
  }
6929
- class Mt extends y {
6925
+ class zt extends m {
6930
6926
  }
6931
- class jt extends y {
6927
+ class Wt extends m {
6932
6928
  }
6933
- class Gt extends y {
6929
+ class Et extends m {
6934
6930
  }
6935
- class qs {
6931
+ class Us {
6936
6932
  /**
6937
6933
  * Генерирует и возвращает данные-заглушку неопределённой записи справочника.
6938
6934
  *
@@ -6951,9 +6947,9 @@ class qs {
6951
6947
  return r.id === 0 && r.slug === "-undefined-";
6952
6948
  }
6953
6949
  }
6954
- class Mr extends y {
6950
+ class Gr extends m {
6955
6951
  }
6956
- const q = class q extends Ce {
6952
+ const N = class N extends Pe {
6957
6953
  /**
6958
6954
  * Исключает из списка записей справочника местоположений служебную запись
6959
6955
  * неизвестного региона или города.
@@ -6961,7 +6957,7 @@ const q = class q extends Ce {
6961
6957
  * @param locations Записи справочника местоположений.
6962
6958
  */
6963
6959
  static withoutUnknownLocation(r) {
6964
- return r.filter((e) => e.id !== q.unknownLocationId);
6960
+ return r.filter((e) => e.id !== N.unknownLocationId);
6965
6961
  }
6966
6962
  /**
6967
6963
  * Возвращает {@link Promise} для получения данных указанного справочника.
@@ -6971,20 +6967,20 @@ const q = class q extends Ce {
6971
6967
  * и использовать в случае аналогичных запросов.
6972
6968
  */
6973
6969
  getReference(r, e = !1) {
6974
- return this.getTypedDataArrayRequester(Ft, `/internal/references/${r}`, e);
6970
+ return this.getTypedDataArrayRequester(Bt, `/internal/references/${r}`, e);
6975
6971
  }
6976
6972
  /**
6977
6973
  * Возвращает {@link Promise} для получения справочника данных о канале
6978
6974
  * первичного интереса.
6979
6975
  */
6980
6976
  getChannelPrimaryInterest() {
6981
- return this.getTypedDataArrayRequester(xr, "/internal/references/channel-primary-interest", !0);
6977
+ return this.getTypedDataArrayRequester(qr, "/internal/references/channel-primary-interest", !0);
6982
6978
  }
6983
6979
  /**
6984
6980
  * Возвращает {@link Promise} для получения справочника должностей контактных лиц.
6985
6981
  */
6986
6982
  getContactPositions() {
6987
- return this.getTypedDataArrayRequester(Bt, "/internal/references/contact-position", !0);
6983
+ return this.getTypedDataArrayRequester(Gt, "/internal/references/contact-position", !0);
6988
6984
  }
6989
6985
  /**
6990
6986
  * Возвращает {@link Promise} для получения справочника списка направлений кураторства.
@@ -6996,7 +6992,7 @@ const q = class q extends Ce {
6996
6992
  * Возвращает {@link Promise} для получения справочника списка валют.
6997
6993
  */
6998
6994
  getCurrency() {
6999
- return this.getTypedDataArrayRequester(N, "/public/references/currency", !0);
6995
+ return this.getTypedDataArrayRequester(F, "/public/references/currency", !0);
7000
6996
  }
7001
6997
  /**
7002
6998
  * Возвращает {@link Promise} для получения справочника данных
@@ -7009,55 +7005,55 @@ const q = class q extends Ce {
7009
7005
  * Возвращает {@link Promise} для получения справочника данных организационно-правовых форм.
7010
7006
  */
7011
7007
  getOpf() {
7012
- return this.getTypedDataArrayRequester(z, "/public/references/opf", !0);
7008
+ return this.getTypedDataArrayRequester(W, "/public/references/opf", !0);
7013
7009
  }
7014
7010
  /**
7015
7011
  * Возвращает {@link Promise} для получения справочника операторов.
7016
7012
  */
7017
7013
  getOperators() {
7018
- return this.getTypedDataArrayRequester(Hr, "/internal/references/operator", !0);
7014
+ return this.getTypedDataArrayRequester(Br, "/internal/references/operator", !0);
7019
7015
  }
7020
7016
  /**
7021
7017
  * Возвращает {@link Promise} для получения справочника данных статусов оплаты заказов.
7022
7018
  */
7023
7019
  getOrderPaymentStatuses() {
7024
- return this.getTypedDataArrayRequester(Mt, "/public/references/order-payment-status", !0);
7020
+ return this.getTypedDataArrayRequester(zt, "/public/references/order-payment-status", !0);
7025
7021
  }
7026
7022
  /**
7027
7023
  * Возвращает {@link Promise} для получения справочника данных статусов заказов.
7028
7024
  */
7029
7025
  getOrderStatuses() {
7030
- return this.getTypedDataArrayRequester(be, "/internal/references/order-status", !0);
7026
+ return this.getTypedDataArrayRequester(Se, "/internal/references/order-status", !0);
7031
7027
  }
7032
7028
  /**
7033
7029
  * Возвращает {@link Promise} для получения справочника детализирующих статусов (подстатусов) заказов.
7034
7030
  */
7035
7031
  getOrderStatusDetails() {
7036
- return this.getTypedDataArrayRequester(jt, "/internal/references/order-status-detail", !0);
7032
+ return this.getTypedDataArrayRequester(Wt, "/internal/references/order-status-detail", !0);
7037
7033
  }
7038
7034
  /**
7039
7035
  * Возвращает {@link Promise} для получения справочника данных типов оплаты заказов.
7040
7036
  */
7041
7037
  getPaymentTypes() {
7042
- return this.getTypedDataArrayRequester(Br, "/public/references/payment-type", !0);
7038
+ return this.getTypedDataArrayRequester(jr, "/public/references/payment-type", !0);
7043
7039
  }
7044
7040
  /**
7045
7041
  * Возвращает {@link Promise} для получения справочника типов ресурсов.
7046
7042
  */
7047
7043
  getResourceTypes() {
7048
- return this.getTypedDataArrayRequester(Mr, "/internal/references/resource-type", !0);
7044
+ return this.getTypedDataArrayRequester(Gr, "/internal/references/resource-type", !0);
7049
7045
  }
7050
7046
  /**
7051
7047
  * Возвращает {@link Promise} для получения справочника данных направлений продаж.
7052
7048
  */
7053
7049
  getSalesDirections() {
7054
- return this.getTypedDataArrayRequester(x, "/public/references/sales-direction", !0);
7050
+ return this.getTypedDataArrayRequester(_, "/public/references/sales-direction", !0);
7055
7051
  }
7056
7052
  /**
7057
7053
  * Возвращает {@link Promise} для получения справочника данных об источнике первичного интереса.
7058
7054
  */
7059
7055
  getSourcePrimaryInterest() {
7060
- return this.getTypedDataArrayRequester(Or, "/internal/references/source-primary-interest", !0);
7056
+ return this.getTypedDataArrayRequester(Nr, "/internal/references/source-primary-interest", !0);
7061
7057
  }
7062
7058
  /**
7063
7059
  * Выполняет поиск данных о городах по терму в названии.
@@ -7084,7 +7080,7 @@ const q = class q extends Ce {
7084
7080
  */
7085
7081
  getRegionsByCountry(r) {
7086
7082
  return this.getTypedDataArrayRequester(ne, "/internal/references/region", !1, { params: { countryId: r } }).then(
7087
- (e) => q.withoutUnknownLocation(e)
7083
+ (e) => N.withoutUnknownLocation(e)
7088
7084
  );
7089
7085
  }
7090
7086
  /**
@@ -7095,8 +7091,8 @@ const q = class q extends Ce {
7095
7091
  * @param regionId Идентификатор региона.
7096
7092
  */
7097
7093
  getCitiesByRegion(r) {
7098
- return this.getTypedDataArrayRequester(Ht, "/internal/references/city", !1, { params: { regionId: r } }).then(
7099
- (e) => q.withoutUnknownLocation(e)
7094
+ return this.getTypedDataArrayRequester(jt, "/internal/references/city", !1, { params: { regionId: r } }).then(
7095
+ (e) => N.withoutUnknownLocation(e)
7100
7096
  );
7101
7097
  }
7102
7098
  /**
@@ -7107,7 +7103,7 @@ const q = class q extends Ce {
7107
7103
  */
7108
7104
  getCitiesWithUserRegionByRegion(r) {
7109
7105
  return this.getTypedDataArrayRequester(mr, "/internal/references/city-with-user-region", !1, { params: { regionId: r } }).then(
7110
- (e) => q.withoutUnknownLocation(e)
7106
+ (e) => N.withoutUnknownLocation(e)
7111
7107
  );
7112
7108
  }
7113
7109
  /**
@@ -7125,7 +7121,7 @@ const q = class q extends Ce {
7125
7121
  !1,
7126
7122
  { term: r, ...e ? { params: { countryId: e } } : {} },
7127
7123
  t
7128
- ).then((i) => q.withoutUnknownLocation(i));
7124
+ ).then((n) => N.withoutUnknownLocation(n));
7129
7125
  }
7130
7126
  /**
7131
7127
  * Выполняет поиск данных о городах по терму в названии с данными
@@ -7136,7 +7132,7 @@ const q = class q extends Ce {
7136
7132
  */
7137
7133
  searchCityWithUserRegion(r, e = void 0) {
7138
7134
  return this.getTypedDataArrayRequester(mr, "/internal/references/city-with-user-region/search", !1, { term: r }, e).then(
7139
- (t) => q.withoutUnknownLocation(t)
7135
+ (t) => N.withoutUnknownLocation(t)
7140
7136
  );
7141
7137
  }
7142
7138
  /**
@@ -7151,46 +7147,46 @@ const q = class q extends Ce {
7151
7147
  * Возвращает {@link Promise} для получения справочника типов доставки.
7152
7148
  */
7153
7149
  getDeliveryTypes() {
7154
- return this.getTypedDataArrayRequester(H, "/internal/references/delivery-type", !0);
7150
+ return this.getTypedDataArrayRequester(B, "/internal/references/delivery-type", !0);
7155
7151
  }
7156
7152
  /**
7157
7153
  * Возвращает {@link Promise} для получения справочника складов.
7158
7154
  */
7159
7155
  getWarehouses() {
7160
- return this.getTypedDataArrayRequester(Re, "/public/references/warehouse", !0);
7156
+ return this.getTypedDataArrayRequester(De, "/public/references/warehouse", !0);
7161
7157
  }
7162
7158
  /**
7163
7159
  * Возвращает {@link Promise} для получения справочника типов свойств.
7164
7160
  */
7165
7161
  getPropertyTypes() {
7166
- return this.getTypedDataArrayRequester(Sr, "/internal/references/property-type", !0);
7162
+ return this.getTypedDataArrayRequester(kr, "/internal/references/property-type", !0);
7167
7163
  }
7168
7164
  /**
7169
7165
  * Возвращает {@link Promise} для получения справочника коэффициентов цен.
7170
7166
  */
7171
7167
  getPriceCoefficients() {
7172
- return this.getTypedDataArrayRequester(Te, "/internal/references/price-coefficient", !0);
7168
+ return this.getTypedDataArrayRequester(de, "/internal/references/price-coefficient", !0);
7173
7169
  }
7174
7170
  /**
7175
7171
  * Возвращает {@link Promise} для получения справочника типов файлов продуктов/категорий.
7176
7172
  */
7177
7173
  getProductFileType() {
7178
- return this.getTypedDataArrayRequester(Gt, "/public/references/product-file-type", !0);
7174
+ return this.getTypedDataArrayRequester(Et, "/public/references/product-file-type", !0);
7179
7175
  }
7180
7176
  };
7181
7177
  /**
7182
7178
  * Идентификатор служебных записей справочников регионов и городов,
7183
7179
  * обозначающих неизвестное местоположение.
7184
7180
  */
7185
- s(q, "unknownLocationId", 1);
7186
- let A = q;
7187
- const $ = J("common.references_private", () => {
7188
- const n = w({}), r = w(void 0), e = w(void 0), t = w(void 0), i = w(void 0), o = w(void 0), c = w(void 0), u = w(void 0), p = w(void 0), m = w(void 0), f = w(void 0), R = w(void 0), pe = w(void 0), he = w(void 0), K = w(void 0), Q = w(void 0), Se = w(void 0), ke = w(void 0), Le = w(void 0), l = w(void 0);
7181
+ s(N, "unknownLocationId", 1);
7182
+ let A = N;
7183
+ const $ = E("common.references_private", () => {
7184
+ const i = y({}), r = y(void 0), e = y(void 0), t = y(void 0), n = y(void 0), o = y(void 0), c = y(void 0), u = y(void 0), p = y(void 0), f = y(void 0), v = y(void 0), a = y(void 0), ge = y(void 0), fe = y(void 0), K = y(void 0), Q = y(void 0), Le = y(void 0), ke = y(void 0), Ie = y(void 0), l = y(void 0);
7189
7185
  return {
7190
7186
  /**
7191
7187
  * Список загружаемых/загруженных на данный момент значений.
7192
7188
  */
7193
- dataLoaderList: n,
7189
+ dataLoaderList: i,
7194
7190
  /**
7195
7191
  * Справочник каналов первичного интереса.
7196
7192
  */
@@ -7206,7 +7202,7 @@ const $ = J("common.references_private", () => {
7206
7202
  /**
7207
7203
  * Справочник типов доставки.
7208
7204
  */
7209
- deliveryTypeReference: i,
7205
+ deliveryTypeReference: n,
7210
7206
  /**
7211
7207
  * Список менеджеров.
7212
7208
  */
@@ -7226,23 +7222,23 @@ const $ = J("common.references_private", () => {
7226
7222
  /**
7227
7223
  * Справочник статусов заказов.
7228
7224
  */
7229
- orderStatusReference: m,
7225
+ orderStatusReference: f,
7230
7226
  /**
7231
7227
  * Справочник детализирующих статусов (подстатусов) заказов.
7232
7228
  */
7233
- orderStatusDetailReference: f,
7229
+ orderStatusDetailReference: v,
7234
7230
  /**
7235
7231
  * Справочник типов оплаты заказов.
7236
7232
  */
7237
- paymentTypeReference: R,
7233
+ paymentTypeReference: a,
7238
7234
  /**
7239
7235
  * Справочник групп партнеров.
7240
7236
  */
7241
- partnerGroupReference: pe,
7237
+ partnerGroupReference: ge,
7242
7238
  /**
7243
7239
  * Справочник типов файлов продукктов/категорий.
7244
7240
  */
7245
- productFileTypeReference: he,
7241
+ productFileTypeReference: fe,
7246
7242
  /**
7247
7243
  * Справочник типов ресурсов.
7248
7244
  */
@@ -7254,7 +7250,7 @@ const $ = J("common.references_private", () => {
7254
7250
  /**
7255
7251
  * Справочник источников первичного интереса.
7256
7252
  */
7257
- sourcePrimaryInterestReference: Se,
7253
+ sourcePrimaryInterestReference: Le,
7258
7254
  /**
7259
7255
  * Справочник складов.
7260
7256
  */
@@ -7262,114 +7258,114 @@ const $ = J("common.references_private", () => {
7262
7258
  /**
7263
7259
  * Справочник типов свойств.
7264
7260
  */
7265
- propertyTypesReference: Le,
7261
+ propertyTypesReference: Ie,
7266
7262
  /**
7267
7263
  * Справочник коэффициентов цен.
7268
7264
  */
7269
7265
  priceCoefficientsReference: l
7270
7266
  };
7271
- }), Ns = J("common.references", () => {
7272
- const n = D(() => {
7267
+ }), Fs = E("common.references", () => {
7268
+ const i = D(() => {
7273
7269
  const l = $();
7274
7270
  return !l.channelPrimaryInterestReference && !l.dataLoaderList.channelPrimaryInterestReference && (l.dataLoaderList.channelPrimaryInterestReference = !0, h.getInstance(A).getChannelPrimaryInterest().then((g) => {
7275
7271
  l.channelPrimaryInterestReference = g;
7276
- }).catch(v)), l.channelPrimaryInterestReference;
7272
+ }).catch(w)), l.channelPrimaryInterestReference;
7277
7273
  }), r = D(() => {
7278
7274
  const l = $();
7279
7275
  return !l.contactPositionsReference && !l.dataLoaderList.contactPositionsReference && (l.dataLoaderList.contactPositionsReference = !0, h.getInstance(A).getContactPositions().then((g) => {
7280
7276
  l.contactPositionsReference = g;
7281
- }).catch(v)), l.contactPositionsReference;
7277
+ }).catch(w)), l.contactPositionsReference;
7282
7278
  }), e = D(() => {
7283
7279
  const l = $();
7284
7280
  return !l.currencyReference && !l.dataLoaderList.currencyReference && (l.dataLoaderList.currencyReference = !0, h.getInstance(A).getCurrency().then((g) => {
7285
7281
  l.currencyReference = g;
7286
- }).catch(v)), l.currencyReference;
7282
+ }).catch(w)), l.currencyReference;
7287
7283
  }), t = D(() => {
7288
7284
  const l = $();
7289
7285
  return !l.opfReference && !l.dataLoaderList.opfReference && (l.dataLoaderList.opfReference = !0, h.getInstance(A).getOpf().then((g) => {
7290
7286
  l.opfReference = g;
7291
- }).catch(v)), l.opfReference;
7292
- }), i = D(() => {
7287
+ }).catch(w)), l.opfReference;
7288
+ }), n = D(() => {
7293
7289
  const l = $();
7294
7290
  return !l.operatorReference && !l.dataLoaderList.operatorReference && (l.dataLoaderList.operatorReference = !0, h.getInstance(A).getOperators().then((g) => {
7295
7291
  l.operatorReference = g;
7296
- }).catch(v)), l.operatorReference;
7292
+ }).catch(w)), l.operatorReference;
7297
7293
  }), o = D(() => {
7298
7294
  const l = $();
7299
7295
  return !l.orderPaymentStatusReference && !l.dataLoaderList.orderPaymentStatusReference && (l.dataLoaderList.orderPaymentStatusReference = !0, h.getInstance(A).getOrderPaymentStatuses().then((g) => {
7300
7296
  l.orderPaymentStatusReference = g;
7301
- }).catch(v)), l.orderPaymentStatusReference;
7297
+ }).catch(w)), l.orderPaymentStatusReference;
7302
7298
  }), c = D(() => {
7303
7299
  const l = $();
7304
7300
  return !l.orderStatusReference && !l.dataLoaderList.orderStatusReference && (l.dataLoaderList.orderStatusReference = !0, h.getInstance(A).getOrderStatuses().then((g) => {
7305
7301
  l.orderStatusReference = g;
7306
- }).catch(v)), l.orderStatusReference;
7302
+ }).catch(w)), l.orderStatusReference;
7307
7303
  }), u = D(() => {
7308
7304
  const l = $();
7309
7305
  return !l.orderStatusDetailReference && !l.dataLoaderList.orderStatusDetailReference && (l.dataLoaderList.orderStatusDetailReference = !0, h.getInstance(A).getOrderStatusDetails().then((g) => {
7310
7306
  l.orderStatusDetailReference = g;
7311
- }).catch(v)), l.orderStatusDetailReference;
7307
+ }).catch(w)), l.orderStatusDetailReference;
7312
7308
  }), p = D(() => {
7313
7309
  const l = $();
7314
7310
  return !l.paymentTypeReference && !l.dataLoaderList.paymentTypeReference && (l.dataLoaderList.paymentTypeReference = !0, h.getInstance(A).getPaymentTypes().then((g) => {
7315
7311
  l.paymentTypeReference = g;
7316
- }).catch(v)), l.paymentTypeReference;
7317
- }), m = D(() => {
7312
+ }).catch(w)), l.paymentTypeReference;
7313
+ }), f = D(() => {
7318
7314
  const l = $();
7319
7315
  return !l.partnerGroupReference && !l.dataLoaderList.partnerGroupReference && (l.dataLoaderList.partnerGroupReference = !0, h.getInstance(A).getPartnerGroup().then((g) => {
7320
7316
  l.partnerGroupReference = g;
7321
- }).catch(v)), l.partnerGroupReference;
7322
- }), f = D(() => {
7317
+ }).catch(w)), l.partnerGroupReference;
7318
+ }), v = D(() => {
7323
7319
  const l = $();
7324
7320
  return !l.productFileTypeReference && !l.dataLoaderList.productFileTypeReference && (l.dataLoaderList.productFileTypeReference = !0, h.getInstance(A).getProductFileType().then((g) => {
7325
7321
  l.productFileTypeReference = g;
7326
- }).catch(v)), l.productFileTypeReference;
7327
- }), R = D(() => {
7322
+ }).catch(w)), l.productFileTypeReference;
7323
+ }), a = D(() => {
7328
7324
  const l = $();
7329
7325
  return !l.resourceTypesReference && !l.dataLoaderList.resourceTypesReference && (l.dataLoaderList.resourceTypesReference = !0, h.getInstance(A).getResourceTypes().then((g) => {
7330
7326
  l.resourceTypesReference = g;
7331
- }).catch(v)), l.resourceTypesReference;
7332
- }), pe = D(() => {
7327
+ }).catch(w)), l.resourceTypesReference;
7328
+ }), ge = D(() => {
7333
7329
  const l = $();
7334
7330
  return !l.salesDirectionsReference && !l.dataLoaderList.salesDirectionsReference && (l.dataLoaderList.salesDirectionsReference = !0, h.getInstance(A).getSalesDirections().then((g) => {
7335
7331
  l.salesDirectionsReference = g;
7336
- }).catch(v)), l.salesDirectionsReference;
7337
- }), he = D(() => {
7332
+ }).catch(w)), l.salesDirectionsReference;
7333
+ }), fe = D(() => {
7338
7334
  const l = $();
7339
7335
  return !l.sourcePrimaryInterestReference && !l.dataLoaderList.sourcePrimaryInterestReference && (l.dataLoaderList.sourcePrimaryInterestReference = !0, h.getInstance(A).getSourcePrimaryInterest().then((g) => {
7340
7336
  l.sourcePrimaryInterestReference = g;
7341
- }).catch(v)), l.sourcePrimaryInterestReference;
7337
+ }).catch(w)), l.sourcePrimaryInterestReference;
7342
7338
  }), K = D(() => {
7343
7339
  const l = $();
7344
7340
  return !l.deliveryTypeReference && !l.dataLoaderList.deliveryTypeReference && (l.dataLoaderList.deliveryTypeReference = !0, h.getInstance(A).getDeliveryTypes().then((g) => {
7345
7341
  l.deliveryTypeReference = g;
7346
- }).catch(v)), l.deliveryTypeReference;
7342
+ }).catch(w)), l.deliveryTypeReference;
7347
7343
  }), Q = D(() => {
7348
7344
  const l = $();
7349
- return !l.managersList && !l.dataLoaderList.managersList && (l.dataLoaderList.managersList = !0, h.getInstance(Lt).getManagers().then((g) => {
7345
+ return !l.managersList && !l.dataLoaderList.managersList && (l.dataLoaderList.managersList = !0, h.getInstance(Ot).getManagers().then((g) => {
7350
7346
  l.managersList = g;
7351
- }).catch(v)), l.managersList;
7352
- }), Se = D(() => {
7347
+ }).catch(w)), l.managersList;
7348
+ }), Le = D(() => {
7353
7349
  const l = $();
7354
7350
  return !l.warehousesReference && !l.dataLoaderList.warehousesReference && (l.dataLoaderList.warehousesReference = !0, h.getInstance(A).getWarehouses().then((g) => {
7355
7351
  l.warehousesReference = g;
7356
- }).catch(v)), l.warehousesReference;
7352
+ }).catch(w)), l.warehousesReference;
7357
7353
  }), ke = D(() => {
7358
7354
  const l = $();
7359
7355
  return !l.propertyTypesReference && !l.dataLoaderList.propertyTypesReference && (l.dataLoaderList.propertyTypesReference = !0, h.getInstance(A).getPropertyTypes().then((g) => {
7360
7356
  l.propertyTypesReference = g;
7361
- }).catch(v)), l.propertyTypesReference;
7362
- }), Le = D(() => {
7357
+ }).catch(w)), l.propertyTypesReference;
7358
+ }), Ie = D(() => {
7363
7359
  const l = $();
7364
7360
  return !l.priceCoefficientsReference && !l.dataLoaderList.priceCoefficientsReference && (l.dataLoaderList.priceCoefficientsReference = !0, h.getInstance(A).getPriceCoefficients().then((g) => {
7365
7361
  l.priceCoefficientsReference = g;
7366
- }).catch(v)), l.priceCoefficientsReference;
7362
+ }).catch(w)), l.priceCoefficientsReference;
7367
7363
  });
7368
7364
  return {
7369
7365
  /**
7370
7366
  * Справочник каналов первичного интереса.
7371
7367
  */
7372
- channelPrimaryInterestsReference: n,
7368
+ channelPrimaryInterestsReference: i,
7373
7369
  /**
7374
7370
  * Справочник должностей контактных лиц.
7375
7371
  */
@@ -7385,7 +7381,7 @@ const $ = J("common.references_private", () => {
7385
7381
  /**
7386
7382
  * Справочник операторов.
7387
7383
  */
7388
- operatorReference: i,
7384
+ operatorReference: n,
7389
7385
  /**
7390
7386
  * Справочник статусов оплаты заказа.
7391
7387
  */
@@ -7405,23 +7401,23 @@ const $ = J("common.references_private", () => {
7405
7401
  /**
7406
7402
  * Справочник групп партнеров.
7407
7403
  */
7408
- partnerGroupsReference: m,
7404
+ partnerGroupsReference: f,
7409
7405
  /**
7410
7406
  * Справочник типов файлов продуктов/категорий.
7411
7407
  */
7412
- productFilesTypesReference: f,
7408
+ productFilesTypesReference: v,
7413
7409
  /**
7414
7410
  * Справочник типов ресурсов.
7415
7411
  */
7416
- resourceTypesReference: R,
7412
+ resourceTypesReference: a,
7417
7413
  /**
7418
7414
  * Справочник направлений продаж.
7419
7415
  */
7420
- salesDirectionsReference: pe,
7416
+ salesDirectionsReference: ge,
7421
7417
  /**
7422
7418
  * Справочник каналов первичного интереса.
7423
7419
  */
7424
- sourcePrimaryInterestsReference: he,
7420
+ sourcePrimaryInterestsReference: fe,
7425
7421
  /**
7426
7422
  * Справочник типов доставки.
7427
7423
  */
@@ -7433,7 +7429,7 @@ const $ = J("common.references_private", () => {
7433
7429
  /**
7434
7430
  * Справочник складов.
7435
7431
  */
7436
- warehousesReference: Se,
7432
+ warehousesReference: Le,
7437
7433
  /**
7438
7434
  * Справочник типов свойств.
7439
7435
  */
@@ -7441,10 +7437,10 @@ const $ = J("common.references_private", () => {
7441
7437
  /**
7442
7438
  * Справочник коэффициентов цен.
7443
7439
  */
7444
- priceCoefficientsReference: Le
7440
+ priceCoefficientsReference: Ie
7445
7441
  };
7446
7442
  });
7447
- class Wt {
7443
+ class Jt {
7448
7444
  /**
7449
7445
  * Инициализирует экземпляр класса {@link MetaTagItem}.
7450
7446
  *
@@ -7462,7 +7458,7 @@ class Wt {
7462
7458
  this.name = r.name, this.content = r.content;
7463
7459
  }
7464
7460
  }
7465
- class fr {
7461
+ class yr {
7466
7462
  /**
7467
7463
  * Инициализирует экземпляр класса {@link Seo}.
7468
7464
  *
@@ -7502,10 +7498,10 @@ class fr {
7502
7498
  */
7503
7499
  s(this, "tags");
7504
7500
  var e;
7505
- this.resourceType = new Mr(r == null ? void 0 : r.resourceType), this.resourceId = (r == null ? void 0 : r.resourceId) ?? "", this.h1 = r == null ? void 0 : r.h1, this.title = r == null ? void 0 : r.title, this.description = r == null ? void 0 : r.description, this.keywords = r == null ? void 0 : r.keywords, this.meta = ((e = r == null ? void 0 : r.meta) == null ? void 0 : e.map((t) => new Wt(t))) ?? [], this.tags = r == null ? void 0 : r.tags;
7501
+ this.resourceType = new Gr(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((t) => new Jt(t))) ?? [], this.tags = r == null ? void 0 : r.tags;
7506
7502
  }
7507
7503
  }
7508
- class Us extends h {
7504
+ class Hs extends h {
7509
7505
  /**
7510
7506
  * Возвращает {@link Promise} для получения данных о SEO-параметрах указанного ресурса.
7511
7507
  *
@@ -7513,7 +7509,7 @@ class Us extends h {
7513
7509
  * @param resourceId Идентификатор ресурса для которого необходимо получить SEO-данные.
7514
7510
  */
7515
7511
  getResourceSeoData(r, e) {
7516
- return this.get(`/internal/seo/${r.slug}/${e}`, {}, (t) => new fr(t.data));
7512
+ return this.get(`/internal/seo/${r.slug}/${e}`, {}, (t) => new yr(t.data));
7517
7513
  }
7518
7514
  /**
7519
7515
  * Выполняет сохранение данных о SEO-параметрах для указанного ресурса.
@@ -7524,7 +7520,7 @@ class Us extends h {
7524
7520
  * в случае ошибок в запросах.
7525
7521
  */
7526
7522
  saveResourceSeoData(r, e = {}) {
7527
- return this.post(`/internal/seo/${r.resourceType.slug}/${r.resourceId}`, r, (t) => new fr(t.data), e);
7523
+ return this.post(`/internal/seo/${r.resourceType.slug}/${r.resourceId}`, r, (t) => new yr(t.data), e);
7528
7524
  }
7529
7525
  /**
7530
7526
  * Возвращает {@link Promise} для удаления данных о SEO-параметрах указанного ресурса.
@@ -7536,7 +7532,7 @@ class Us extends h {
7536
7532
  return this.delete(`/internal/seo/${r.slug}/${e}`);
7537
7533
  }
7538
7534
  }
7539
- class Fs extends h {
7535
+ class Ms extends h {
7540
7536
  /**
7541
7537
  * Возвращает подсказки по адресам.
7542
7538
  *
@@ -7575,16 +7571,16 @@ class Fs extends h {
7575
7571
  */
7576
7572
  execSuggestionQuery(r, e) {
7577
7573
  return this.get(r, { query: e }).then((t) => {
7578
- const i = [...t];
7574
+ const n = [...t];
7579
7575
  let o = 1;
7580
- return i.forEach((c) => {
7576
+ return n.forEach((c) => {
7581
7577
  c.id = o++;
7582
- }), i;
7578
+ }), n;
7583
7579
  });
7584
7580
  }
7585
7581
  }
7586
- var zt = /* @__PURE__ */ ((n) => (n.Admin = "admin", n.Manager = "manager", n.Operator = "operator", n.Client = "client", n.Guest = "guest", n))(zt || {});
7587
- class Jt extends br {
7582
+ var Vt = /* @__PURE__ */ ((i) => (i.Admin = "admin", i.Manager = "manager", i.Operator = "operator", i.Client = "client", i.Guest = "guest", i))(Vt || {});
7583
+ class Kt extends Lr {
7588
7584
  /**
7589
7585
  * Инициализирует экземпляр класса {@link User}.
7590
7586
  *
@@ -7608,15 +7604,15 @@ class Jt extends br {
7608
7604
  * Роль ценообразования текущего пользователя.
7609
7605
  */
7610
7606
  s(this, "pricingRole");
7611
- 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, this.pricingRole = e != null && e.pricingRole ? new Tr(e.pricingRole) : void 0;
7607
+ 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, this.pricingRole = e != null && e.pricingRole ? new br(e.pricingRole) : void 0;
7612
7608
  }
7613
7609
  }
7614
- class Hs extends h {
7610
+ class Bs extends h {
7615
7611
  /**
7616
7612
  * Инициализирует экземпляр класса {@link UserAuthDataProvider}.
7617
7613
  */
7618
7614
  constructor() {
7619
- super(), this.baseUrl = `${k().config.http.portalApiUrl}/api`, this.interceptorIds.request.authRequestInterceptor && this.httpClient.interceptors.request.eject(this.interceptorIds.request.authRequestInterceptor);
7615
+ super(), this.baseUrl = `${L().config.http.portalApiUrl}/api`, this.interceptorIds.request.authRequestInterceptor && this.httpClient.interceptors.request.eject(this.interceptorIds.request.authRequestInterceptor);
7620
7616
  }
7621
7617
  /**
7622
7618
  * Функция для получения обновленных токенов доступа.
@@ -7627,41 +7623,41 @@ class Hs extends h {
7627
7623
  return this.get("internal/users/current-tokens").then((r) => r.accessToken);
7628
7624
  }
7629
7625
  }
7630
- class Et extends h {
7626
+ class Qt extends h {
7631
7627
  /**
7632
7628
  * Возвращает данные о текущем пользователе.
7633
7629
  */
7634
7630
  // eslint-disable-next-line class-methods-use-this
7635
7631
  getCurrentUser() {
7636
- return this.get("/internal/users/info", {}, (r) => new Jt(r.data), !0);
7632
+ return this.get("/internal/users/info", {}, (r) => new Kt(r.data), !0);
7637
7633
  }
7638
7634
  }
7639
- const Vt = J("common.user_state_private", () => {
7640
- const n = w({}), r = w(void 0);
7635
+ const Yt = E("common.user_state_private", () => {
7636
+ const i = y({}), r = y(void 0);
7641
7637
  return {
7642
7638
  /**
7643
7639
  * Список загружаемых/загруженных на данный момент значений.
7644
7640
  */
7645
- dataLoaderList: n,
7641
+ dataLoaderList: i,
7646
7642
  /**
7647
7643
  * Данные о текущем пользователе.
7648
7644
  */
7649
7645
  currentUser: r
7650
7646
  };
7651
- }), Bs = J("common.user_state", () => ({
7647
+ }), js = E("common.user_state", () => ({
7652
7648
  /**
7653
7649
  * Данные о текущем пользователе.
7654
7650
  */
7655
7651
  currentUser: D(() => {
7656
- const r = Vt();
7657
- return !r.currentUser && !r.dataLoaderList.currentUser && (r.dataLoaderList.currentUser = !0, h.getInstance(Et).getCurrentUser().then((e) => {
7652
+ const r = Yt();
7653
+ return !r.currentUser && !r.dataLoaderList.currentUser && (r.dataLoaderList.currentUser = !0, h.getInstance(Qt).getCurrentUser().then((e) => {
7658
7654
  r.currentUser = e;
7659
- }).catch(v).finally(() => {
7655
+ }).catch(w).finally(() => {
7660
7656
  r.dataLoaderList.currentUser = !1;
7661
7657
  })), r.currentUser;
7662
7658
  })
7663
7659
  }));
7664
- class Ge {
7660
+ class ze {
7665
7661
  /**
7666
7662
  * Инициализирует экземпляр класса {@link UserRegionEmployee}.
7667
7663
  *
@@ -7676,17 +7672,17 @@ class Ge {
7676
7672
  * @inheritDoc
7677
7673
  */
7678
7674
  s(this, "salesDirection");
7679
- this.user = new I(r == null ? void 0 : r.user), this.salesDirection = new x(r == null ? void 0 : r.salesDirection);
7675
+ this.user = new x(r == null ? void 0 : r.user), this.salesDirection = new _(r == null ? void 0 : r.salesDirection);
7680
7676
  }
7681
7677
  }
7682
- class Ue extends er {
7678
+ class Fe extends er {
7683
7679
  /**
7684
7680
  * Инициализирует экземпляр класса {@link UserRegion}.
7685
7681
  *
7686
7682
  * @param data Данные для первоначальной инициализации.
7687
7683
  */
7688
7684
  constructor(e) {
7689
- var t, i;
7685
+ var t, n;
7690
7686
  super(e);
7691
7687
  /**
7692
7688
  * @inheritDoc
@@ -7696,10 +7692,10 @@ class Ue extends er {
7696
7692
  * @inheritDoc
7697
7693
  */
7698
7694
  s(this, "users");
7699
- this.cities = ((t = e == null ? void 0 : e.cities) == null ? void 0 : t.map((o) => new oe(o))) ?? [], this.users = ((i = e == null ? void 0 : e.users) == null ? void 0 : i.map((o) => new Ge(o))) ?? [];
7695
+ this.cities = ((t = e == null ? void 0 : e.cities) == null ? void 0 : t.map((o) => new oe(o))) ?? [], this.users = ((n = e == null ? void 0 : e.users) == null ? void 0 : n.map((o) => new ze(o))) ?? [];
7700
7696
  }
7701
7697
  }
7702
- class Ms extends de {
7698
+ class Gs extends be {
7703
7699
  /**
7704
7700
  * Инициализирует экземпляр класса {@link UserRegionsListFilters}.
7705
7701
  *
@@ -7735,7 +7731,7 @@ class Ms extends de {
7735
7731
  return this;
7736
7732
  }
7737
7733
  }
7738
- class js extends ue {
7734
+ class zs extends he {
7739
7735
  /**
7740
7736
  * Возвращает список регионов пользователей.
7741
7737
  *
@@ -7746,10 +7742,7 @@ class js extends ue {
7746
7742
  * @see /doc/api/internal#/operations/api_internal_user_region_get_list
7747
7743
  */
7748
7744
  getRegionsList(r, e, t) {
7749
- return this.getPaginated("/internal/users/regions", r, e, t, {}, (i) => {
7750
- const o = { ...i.data };
7751
- return o.data = o.data.map((c) => new er(c)), o;
7752
- });
7745
+ return this.getTypedPaginated(er, "/internal/users/regions", r, e, t);
7753
7746
  }
7754
7747
  /**
7755
7748
  * Возвращает полные данные о регионе пользователей.
@@ -7759,7 +7752,7 @@ class js extends ue {
7759
7752
  * @see /doc/api/internal#/operations/api_internal_user_region_get
7760
7753
  */
7761
7754
  getRegion(r) {
7762
- return this.get(`/internal/users/regions/${r}`, {}, (e) => new Ue(e.data));
7755
+ return this.get(`/internal/users/regions/${r}`, {}, (e) => new Fe(e.data));
7763
7756
  }
7764
7757
  /**
7765
7758
  * Создаёт новый регион пользователей.
@@ -7772,7 +7765,7 @@ class js extends ue {
7772
7765
  * @see /doc/api/internal#/operations/api_internal_user_region_create
7773
7766
  */
7774
7767
  createRegion(r, e = {}) {
7775
- return this.post("/internal/users/regions", r, (t) => new Ue(t.data), e);
7768
+ return this.post("/internal/users/regions", r, (t) => new Fe(t.data), e);
7776
7769
  }
7777
7770
  /**
7778
7771
  * Изменяет данные о регионе пользователей.
@@ -7786,7 +7779,7 @@ class js extends ue {
7786
7779
  * @see /doc/api/internal#/operations/api_internal_user_region_change
7787
7780
  */
7788
7781
  updateRegion(r, e, t = {}) {
7789
- return this.patch(`/internal/users/regions/${r}`, e, (i) => new Ue(i.data), t);
7782
+ return this.patch(`/internal/users/regions/${r}`, e, (n) => new Fe(n.data), t);
7790
7783
  }
7791
7784
  /**
7792
7785
  * Удаляет регион пользователей.
@@ -7806,11 +7799,7 @@ class js extends ue {
7806
7799
  * @see /doc/api/internal#/operations/api_internal_user_region_user_get_list
7807
7800
  */
7808
7801
  getRegionEmployees(r) {
7809
- return this.get(
7810
- `/internal/users/regions/${r}/users`,
7811
- {},
7812
- (e) => e.data.map((t) => new Ge(t))
7813
- );
7802
+ return this.getTypedList(ze, `/internal/users/regions/${r}/users`);
7814
7803
  }
7815
7804
  /**
7816
7805
  * Закрепляет сотрудника за регионом по указанному направлению продаж.
@@ -7822,7 +7811,7 @@ class js extends ue {
7822
7811
  * @see /doc/api/internal#/operations/api_internal_user_region_user_add
7823
7812
  */
7824
7813
  attachRegionEmployee(r, e, t) {
7825
- return this.post(`/internal/users/regions/${r}/users/${e}`, { salesDirectionId: t }, (i) => new Ge(i.data));
7814
+ return this.post(`/internal/users/regions/${r}/users/${e}`, { salesDirectionId: t }, (n) => new ze(n.data));
7826
7815
  }
7827
7816
  /**
7828
7817
  * Открепляет сотрудника от региона по указанному направлению продаж.
@@ -7841,7 +7830,7 @@ class js extends ue {
7841
7830
  });
7842
7831
  }
7843
7832
  }
7844
- class Gs {
7833
+ class Ws {
7845
7834
  /**
7846
7835
  * Инициализирует экземпляр класса {@link FieldValidationResultData}.
7847
7836
  *
@@ -7865,177 +7854,177 @@ class Gs {
7865
7854
  }
7866
7855
  }
7867
7856
  export {
7868
- Ft as AnyReference,
7869
- mt as AppBaseConfig,
7870
- Me as BankAccount,
7871
- ue as BasePaginationProvider,
7872
- Ct as CalculationTypeEnum,
7873
- ge as Cart,
7874
- ns as CartProvider,
7875
- cs as CatalogProvider,
7876
- Pr as CatalogableItem,
7877
- U as Category,
7878
- or as CategoryFilterSetting,
7879
- nr as CategoryPricingRule,
7880
- xr as ChannelPrimaryInterest,
7881
- Ht as City,
7857
+ Bt as AnyReference,
7858
+ wt as AppBaseConfig,
7859
+ je as BankAccount,
7860
+ he as BasePaginationProvider,
7861
+ Dt as CalculationTypeEnum,
7862
+ me as Cart,
7863
+ cs as CartProvider,
7864
+ us as CatalogProvider,
7865
+ Ar as CatalogableItem,
7866
+ H as Category,
7867
+ cr as CategoryFilterSetting,
7868
+ or as CategoryPricingRule,
7869
+ qr as ChannelPrimaryInterest,
7870
+ jt as City,
7882
7871
  oe as CityWithRegionAndCountry,
7883
7872
  mr as CityWithUserRegion,
7884
- pr as Client,
7885
- dt as ClientAdditionalData,
7886
- Ae as ClientCategory,
7887
- O as ClientDataProvider,
7888
- ls as ClientPriceProvider,
7889
- us as ClientPriceTemplateProvider,
7873
+ hr as Client,
7874
+ Lt as ClientAdditionalData,
7875
+ $e as ClientCategory,
7876
+ q as ClientDataProvider,
7877
+ ps as ClientPriceProvider,
7878
+ hs as ClientPriceTemplateProvider,
7890
7879
  j as ClientProduct,
7891
- gs as ClientProductCategoryDataProvider,
7892
- ms as ClientProductDataProvider,
7880
+ ms as ClientProductCategoryDataProvider,
7881
+ ys as ClientProductDataProvider,
7893
7882
  V as ClientShortInfo,
7894
- At as ClientsAdditionalDataRequestTypeEnum,
7895
- Cs as ClientsListFilters,
7896
- ve as CodedIdentity,
7897
- Ps as ConfiguratorProvider,
7898
- St as ConfiguratorsEnum,
7899
- je as Contact,
7900
- $r as ContactLinks,
7901
- W as ContactPerson,
7902
- bt as ContactPersonRelated,
7903
- Bt as ContactPosition,
7904
- Oe as ContactRelation,
7905
- Lr as ContragentBase,
7906
- $e as ContragentFactory,
7907
- Ir as ContragentIc,
7908
- $t as ContragentPerson,
7909
- Tt as ContragentUlNr,
7883
+ dt as ClientsAdditionalDataRequestTypeEnum,
7884
+ Ps as ClientsListFilters,
7885
+ Re as CodedIdentity,
7886
+ As as ConfiguratorProvider,
7887
+ It as ConfiguratorsEnum,
7888
+ Ge as Contact,
7889
+ dr as ContactLinks,
7890
+ z as ContactPerson,
7891
+ kt as ContactPersonRelated,
7892
+ Gt as ContactPosition,
7893
+ qe as ContactRelation,
7894
+ xr as ContragentBase,
7895
+ Te as ContragentFactory,
7896
+ Or as ContragentIc,
7897
+ bt as ContragentPerson,
7898
+ St as ContragentUlNr,
7910
7899
  _r as ContragentUlR,
7911
- Ve as CostSourceEnum,
7900
+ Ke as CostSourceEnum,
7912
7901
  ie as Country,
7913
7902
  Ye as CuratedDirection,
7914
7903
  Xe as Curator,
7915
- N as Currency,
7916
- Fs as DataSuggestionProvider,
7917
- $s as DateTimeProvider,
7918
- kr as DeletableNamedIdentity,
7919
- ye as DeliveryAddress,
7920
- H as DeliveryType,
7921
- ss as DetailedJwtPayload,
7922
- ut as DeviceTypeResolutionConfig,
7923
- ft as DiscountShortInfo,
7924
- Gs as FieldValidationResultData,
7904
+ F as Currency,
7905
+ Ms as DataSuggestionProvider,
7906
+ ds as DateTimeProvider,
7907
+ Ir as DeletableNamedIdentity,
7908
+ ve as DeliveryAddress,
7909
+ B as DeliveryType,
7910
+ Rr as DetailedJwtPayload,
7911
+ gt as DeviceTypeResolutionConfig,
7912
+ vt as DiscountShortInfo,
7913
+ Ws as FieldValidationResultData,
7925
7914
  G as FilterGroup,
7926
- cr as FilterItem,
7915
+ lr as FilterItem,
7927
7916
  Ze as FilterOpEnum,
7928
- Dt as FilterSettings,
7929
- Rr as GeoCoordinates,
7930
- wt as HiddenCatalogableItem,
7931
- Ce as HttpCachedRequester,
7932
- pt as HttpParamsConfig,
7917
+ Tt as FilterSettings,
7918
+ ar as GeoCoordinates,
7919
+ Rt as HiddenCatalogableItem,
7920
+ Pe as HttpCachedRequester,
7921
+ ft as HttpParamsConfig,
7933
7922
  h as HttpRequester,
7934
- E as Identity,
7935
- vt as Image,
7936
- M as JwtPayload,
7937
- Pe as Manager,
7923
+ J as Identity,
7924
+ Pt as Image,
7925
+ ue as JwtPayload,
7926
+ ae as Manager,
7938
7927
  Qe as ManagerCommon,
7939
- ds as ManagerDataFactory,
7940
- Lt as ManagerDataProvider,
7941
- Wt as MetaTagItem,
7928
+ Ss as ManagerDataFactory,
7929
+ Ot as ManagerDataProvider,
7930
+ Jt as MetaTagItem,
7942
7931
  b as NamedIdentity,
7943
7932
  Z as Offer,
7944
- Ur as OfferShortInfo,
7945
- Ss as OffersDataProvider,
7946
- bs as OffersListFilters,
7947
- Hr as Operator,
7948
- z as Opf,
7949
- F as OpfEnum,
7933
+ Hr as OfferShortInfo,
7934
+ ks as OffersDataProvider,
7935
+ Ls as OffersListFilters,
7936
+ Br as Operator,
7937
+ W as Opf,
7938
+ M as OpfEnum,
7950
7939
  S as Order,
7951
- _t as OrderAction,
7952
- ks as OrderEditorData,
7953
- Fr as OrderInfo,
7954
- It as OrderItem,
7955
- Dr as OrderItemBase,
7956
- Mt as OrderPaymentStatus,
7957
- qr as OrderShortInfo,
7958
- be as OrderStatus,
7959
- jt as OrderStatusDetail,
7960
- Ut as OrderStatusDetailEnum,
7961
- Nt as OrderStatusEnum,
7962
- xt as OrderStatusHistoryInfo,
7963
- Is as OrdersDataProvider,
7964
- Ls as OrdersListFilters,
7965
- de as PaginationFiltersBase,
7940
+ qt as OrderAction,
7941
+ Is as OrderEditorData,
7942
+ Mr as OrderInfo,
7943
+ _t as OrderItem,
7944
+ $r as OrderItemBase,
7945
+ zt as OrderPaymentStatus,
7946
+ Ur as OrderShortInfo,
7947
+ Se as OrderStatus,
7948
+ Wt as OrderStatusDetail,
7949
+ Mt as OrderStatusDetailEnum,
7950
+ Ht as OrderStatusEnum,
7951
+ Nt as OrderStatusHistoryInfo,
7952
+ Os as OrdersDataProvider,
7953
+ xs as OrdersListFilters,
7954
+ be as PaginationFiltersBase,
7966
7955
  ce as PartnerGroup,
7967
- Br as PaymentType,
7968
- De as PreferencesStorageProvider,
7969
- qe as PriceAnalyze,
7956
+ jr as PaymentType,
7957
+ Ae as PreferencesStorageProvider,
7958
+ Ne as PriceAnalyze,
7970
7959
  _s as PriceAnalyzeProvider,
7971
- Te as PriceCoefficient,
7972
- ar as PriceCoefficientEnum,
7973
- xs as PriceHistoryDataProvider,
7974
- Ot as PriceHistoryItem,
7960
+ de as PriceCoefficient,
7961
+ Dr as PriceCoefficientEnum,
7962
+ qs as PriceHistoryDataProvider,
7963
+ Ut as PriceHistoryItem,
7975
7964
  ee as PriceTemplate,
7976
- _e as PriceTemplateCategory,
7977
- me as PriceTemplateClient,
7978
- dr as PriceTemplateICatalogableItem,
7979
- xe as PriceTemplateProduct,
7980
- fs as PriceTemplateProvider,
7981
- fe as PricingRole,
7982
- ys as PricingRoleProvider,
7965
+ Oe as PriceTemplateCategory,
7966
+ ye as PriceTemplateClient,
7967
+ Sr as PriceTemplateICatalogableItem,
7968
+ _e as PriceTemplateProduct,
7969
+ ws as PriceTemplateProvider,
7970
+ we as PricingRole,
7971
+ vs as PricingRoleProvider,
7983
7972
  Be as PrimaryCatalogableItem,
7984
- _ as Product,
7985
- ps as ProductCategoryDataProvider,
7986
- hs as ProductDataProvider,
7987
- Gt as ProductFileType,
7988
- Rt as ProductFilterTypeEnum,
7989
- Ee as ProductPriceCoefficient,
7990
- qt as ProductPriceHistory,
7991
- ir as ProductUnit,
7992
- ws as PropertiesProvider,
7973
+ O as Product,
7974
+ gs as ProductCategoryDataProvider,
7975
+ fs as ProductDataProvider,
7976
+ Et as ProductFileType,
7977
+ At as ProductFilterTypeEnum,
7978
+ Ve as ProductPriceCoefficient,
7979
+ Ft as ProductPriceHistory,
7980
+ nr as ProductUnit,
7981
+ Cs as PropertiesProvider,
7993
7982
  re as Property,
7994
- Sr as PropertyType,
7983
+ kr as PropertyType,
7995
7984
  at as PropertyTypeEnum,
7996
7985
  X as PropertyValue,
7997
- Os as RecommendationsDataProvider,
7998
- gr as RecommendationsList,
7999
- y as Reference,
8000
- qs as ReferenceDataFactory,
7986
+ Ns as RecommendationsDataProvider,
7987
+ fr as RecommendationsList,
7988
+ m as Reference,
7989
+ Us as ReferenceDataFactory,
8001
7990
  A as ReferenceDataProvider,
8002
7991
  ne as Region,
8003
- Mr as ResourceType,
8004
- x as SalesDirection,
8005
- ht as SentryConfig,
8006
- fr as Seo,
8007
- Us as SeoDataProvider,
8008
- Or as SourcePrimaryInterest,
8009
- yt as StockCount,
8010
- Ds as TableDataPagination,
8011
- kt as TableDataPaginationRequestParams,
8012
- As as TableDataSortRequestParams,
8013
- vs as TemplateProductCategoryDataProvider,
8014
- os as TemplatesListFilters,
8015
- Ke as TypedInstanceFactory,
8016
- Nr as UnitsHelper,
8017
- as as UnknownClientDataProvider,
8018
- Cr as UpdatableNamedIdentity,
8019
- Jt as User,
8020
- Hs as UserAuthDataProvider,
8021
- br as UserCommonInfo,
8022
- Et as UserDataProvider,
8023
- Tr as UserPricingRole,
8024
- Ue as UserRegion,
8025
- Ge as UserRegionEmployee,
8026
- js as UserRegionProvider,
7992
+ Gr as ResourceType,
7993
+ _ as SalesDirection,
7994
+ mt as SentryConfig,
7995
+ yr as Seo,
7996
+ Hs as SeoDataProvider,
7997
+ Nr as SourcePrimaryInterest,
7998
+ Ct as StockCount,
7999
+ $s as TableDataPagination,
8000
+ xt as TableDataPaginationRequestParams,
8001
+ Ts as TableDataSortRequestParams,
8002
+ Rs as TemplateProductCategoryDataProvider,
8003
+ ls as TemplatesListFilters,
8004
+ I as TypedInstanceFactory,
8005
+ Fr as UnitsHelper,
8006
+ Ds as UnknownClientDataProvider,
8007
+ Pr as UpdatableNamedIdentity,
8008
+ Kt as User,
8009
+ Bs as UserAuthDataProvider,
8010
+ Lr as UserCommonInfo,
8011
+ Qt as UserDataProvider,
8012
+ br as UserPricingRole,
8013
+ Fe as UserRegion,
8014
+ ze as UserRegionEmployee,
8015
+ zs as UserRegionProvider,
8027
8016
  er as UserRegionShortInfo,
8028
- Ms as UserRegionsListFilters,
8029
- I as UserShortInfo,
8030
- zt as UserTypeEnum,
8031
- Rs as VersionConfig,
8032
- Re as Warehouse,
8033
- gt as WebSocketConfig,
8034
- lr as findCatalogItemByIdRecursive,
8035
- ur as flattenCatalogItems,
8036
- Ts as pluralize,
8037
- Ie as useAuthStateStore,
8038
- k as useBaseConfigStateStore,
8039
- Ns as useReferencesStore,
8040
- Bs as useUserStateStore
8017
+ Gs as UserRegionsListFilters,
8018
+ x as UserShortInfo,
8019
+ Vt as UserTypeEnum,
8020
+ as as VersionConfig,
8021
+ De as Warehouse,
8022
+ yt as WebSocketConfig,
8023
+ ur as findCatalogItemByIdRecursive,
8024
+ pr as flattenCatalogItems,
8025
+ bs as pluralize,
8026
+ xe as useAuthStateStore,
8027
+ L as useBaseConfigStateStore,
8028
+ Fs as useReferencesStore,
8029
+ js as useUserStateStore
8041
8030
  };