@snabcentr/common-lib 2.7.1 → 2.7.3

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.
@@ -2,11 +2,11 @@ var kr = Object.defineProperty;
2
2
  var Lr = (i, r, e) => r in i ? kr(i, r, { enumerable: !0, configurable: !0, writable: !0, value: e }) : i[r] = e;
3
3
  var t = (i, r, e) => Lr(i, typeof r != "symbol" ? r + "" : r, e);
4
4
  import { jwtDecode as nr } from "jwt-decode";
5
- import { merge as pe, isNil as A, isEmpty as X, noop as v, mapValues as or, isArray as H, every as _r, split as xr, isString as C, constant as Or, toUpper as qr, cloneDeep as Nr, toLower as Ur, isFunction as Fe, map as fe, forEach as Fr, isDate as xe, omitBy as cr, isObject as lr } from "lodash-es";
5
+ import { merge as pe, isNil as A, isEmpty as X, noop as v, mapValues as or, isArray as H, every as _r, split as xr, isString as a, constant as Or, toUpper as qr, cloneDeep as Nr, toLower as Ur, isFunction as Fe, map as fe, forEach as Fr, isDate as xe, omitBy as cr, isObject as lr } from "lodash-es";
6
6
  import { objectToCamel as He, objectToSnake as Ee } from "ts-case-convert";
7
7
  import { defineStore as W } from "pinia";
8
8
  import { ref as y, markRaw as Hr, computed as P } from "vue";
9
- import { isAfter as Ve, parseISO as a, startOfToday as Oe, format as k, addSeconds as jr, addBusinessDays as Gr, endOfTomorrow as Mr, startOfTomorrow as Br, endOfYesterday as zr, startOfYesterday as Wr, endOfToday as Jr, endOfDay as Er, startOfDay as Vr } from "date-fns";
9
+ import { isAfter as Ve, parseISO as C, startOfToday as Oe, format as k, addSeconds as jr, addBusinessDays as Gr, endOfTomorrow as Mr, startOfTomorrow as Br, endOfYesterday as zr, startOfYesterday as Wr, endOfToday as Jr, endOfDay as Er, startOfDay as Vr } from "date-fns";
10
10
  import Kr, { CanceledError as Qr } from "axios";
11
11
  class j {
12
12
  /**
@@ -111,7 +111,7 @@ class j {
111
111
  return s.resourceAccess = e.resource_access, s;
112
112
  }
113
113
  }
114
- class Bt extends j {
114
+ class zt extends j {
115
115
  /**
116
116
  * Инициализирует экземпляр класса {@link DetailedJwtPayload}.
117
117
  *
@@ -378,7 +378,7 @@ class ve {
378
378
  if (e)
379
379
  try {
380
380
  const s = JSON.parse(e);
381
- if (!s.availableFor || Ve(a(s.availableFor) || Oe(), /* @__PURE__ */ new Date())) {
381
+ if (!s.availableFor || Ve(C(s.availableFor) || Oe(), /* @__PURE__ */ new Date())) {
382
382
  if (A(s.data) || X(s.data))
383
383
  throw new Error("Data is empty");
384
384
  return s.data;
@@ -452,7 +452,7 @@ class ve {
452
452
  const n = localStorage.getItem(s);
453
453
  if (n) {
454
454
  const o = JSON.parse(n);
455
- o.availableFor && !Ve(a(o.availableFor) || Oe(), /* @__PURE__ */ new Date()) && r.push(s);
455
+ o.availableFor && !Ve(C(o.availableFor) || Oe(), /* @__PURE__ */ new Date()) && r.push(s);
456
456
  }
457
457
  } catch {
458
458
  r.push(s);
@@ -677,7 +677,7 @@ class ur extends b {
677
677
  * Дата и время последнего изменения.
678
678
  */
679
679
  t(this, "updatedAt");
680
- this.updatedAt = C(e == null ? void 0 : e.updatedAt) ? a(e.updatedAt) : e == null ? void 0 : e.updatedAt;
680
+ this.updatedAt = a(e == null ? void 0 : e.updatedAt) ? C(e.updatedAt) : e == null ? void 0 : e.updatedAt;
681
681
  }
682
682
  }
683
683
  class tt extends ur {
@@ -692,7 +692,7 @@ class tt extends ur {
692
692
  * Дата и время последнего удаления.
693
693
  */
694
694
  t(this, "deletedAt");
695
- this.deletedAt = C(e == null ? void 0 : e.deletedAt) ? a(e.deletedAt) : e == null ? void 0 : e.deletedAt;
695
+ this.deletedAt = a(e == null ? void 0 : e.deletedAt) ? C(e.deletedAt) : e == null ? void 0 : e.deletedAt;
696
696
  }
697
697
  }
698
698
  class st {
@@ -837,7 +837,7 @@ class nt extends b {
837
837
  * Дата и время удаления.
838
838
  */
839
839
  t(this, "deletedAt");
840
- 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 _(e == null ? void 0 : e.owner), this.deletedAt = C(e == null ? void 0 : e.deletedAt) ? a(e.deletedAt) : e == null ? void 0 : e.deletedAt;
840
+ this.costCoefficient = (e == null ? void 0 : e.costCoefficient) ?? 0, this.isLowPriceAllowed = (e == null ? void 0 : e.isLowPriceAllowed) ?? !1, this.publishedAt = a(e == null ? void 0 : e.publishedAt) ? C(e.publishedAt) : e == null ? void 0 : e.publishedAt, this.description = (e == null ? void 0 : e.description) ?? void 0, this.percent = (e == null ? void 0 : e.percent) ?? 0, this.owner = new _(e == null ? void 0 : e.owner), this.deletedAt = a(e == null ? void 0 : e.deletedAt) ? C(e.deletedAt) : e == null ? void 0 : e.deletedAt;
841
841
  }
842
842
  }
843
843
  class Q extends ur {
@@ -856,7 +856,7 @@ class Q extends ur {
856
856
  * Дата и время создания шаблона.
857
857
  */
858
858
  t(this, "createdAt");
859
- 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();
859
+ this.description = (e == null ? void 0 : e.description) ?? "", this.createdAt = a(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date();
860
860
  }
861
861
  }
862
862
  var hr = /* @__PURE__ */ ((i) => (i.K0 = "k0", i.K1 = "k1", i.K2 = "k2", i.K3 = "k3", i.K4 = "k4", i.Retail = "retail", i))(hr || {});
@@ -1099,7 +1099,7 @@ class L extends it {
1099
1099
  * Список коэффициентов цен на продукт.
1100
1100
  */
1101
1101
  t(this, "priceCoefficients");
1102
- this.supplierSku = e == null ? void 0 : e.supplierSku, this.unit = e != null && e.unit ? new Qe(e.unit) : new Qe(), this.pack = e == null ? void 0 : e.pack, this.minCount = e == null ? void 0 : e.minCount, this.currency = e != null && e.currency ? new O(e.currency) : new O(), 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 = ((n = e == null ? void 0 : e.stockCount) == null ? void 0 : n.map((h) => new ot(h))) ?? [], this.type = "product";
1102
+ this.supplierSku = e == null ? void 0 : e.supplierSku, this.unit = e != null && e.unit ? new Qe(e.unit) : new Qe(), this.pack = e == null ? void 0 : e.pack, this.minCount = e == null ? void 0 : e.minCount, this.currency = e != null && e.currency ? new O(e.currency) : new O(), this.cost = (e == null ? void 0 : e.cost) ?? 0, this.costRub = (e == null ? void 0 : e.costRub) ?? 0, this.costDate = a(e == null ? void 0 : e.costDate) ? C(e.costDate) : e == null ? void 0 : e.costDate, this.onOrder = (e == null ? void 0 : e.onOrder) ?? !1, this.stockCount = ((n = e == null ? void 0 : e.stockCount) == null ? void 0 : n.map((h) => new ot(h))) ?? [], this.type = "product";
1103
1103
  const s = (e == null ? void 0 : e.category) ?? ((o = e == null ? void 0 : e.categories) == null ? void 0 : o.find((h) => h.isPrimary));
1104
1104
  s && (this.category = new qe({ ...s, isPrimary: !0 }), this.categories = [this.category]), e != null && e.categories && (this.categories = e.categories.map((h) => new qe(h))), this.images = ((c = e == null ? void 0 : e.images) == null ? void 0 : c.map((h) => new st(h, d().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((h) => new Ge(h))) ?? [], e && "codeNumber" in e && !e.code && (this.code = e == null ? void 0 : e.codeNumber);
1105
1105
  }
@@ -1606,7 +1606,7 @@ t(R, "requestHooks", []), /**
1606
1606
  */
1607
1607
  t(R, "responseHooks", []);
1608
1608
  let p = R;
1609
- class Wt extends p {
1609
+ class Jt extends p {
1610
1610
  /**
1611
1611
  * Возвращает содержимое корзины указанного клиента.
1612
1612
  *
@@ -1888,7 +1888,7 @@ class ht extends we {
1888
1888
  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;
1889
1889
  }
1890
1890
  }
1891
- class Ce extends ht {
1891
+ class ae extends ht {
1892
1892
  /**
1893
1893
  * Инициализирует экземпляр класса {@link ClientCategory}.
1894
1894
  *
@@ -1905,7 +1905,7 @@ class Ce extends ht {
1905
1905
  * Список продуктов категории.
1906
1906
  */
1907
1907
  t(this, "products");
1908
- this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new Ce(o)), this.products = (n = e == null ? void 0 : e.products) == null ? void 0 : n.map((o) => new G(o));
1908
+ this.categories = (s = e == null ? void 0 : e.categories) == null ? void 0 : s.map((o) => new ae(o)), this.products = (n = e == null ? void 0 : e.products) == null ? void 0 : n.map((o) => new G(o));
1909
1909
  }
1910
1910
  }
1911
1911
  class yr {
@@ -2032,7 +2032,7 @@ class wr extends b {
2032
2032
  * Признак активности учетной записи пользователя.
2033
2033
  */
2034
2034
  t(this, "isActive");
2035
- 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 q(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;
2035
+ 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 q(e.salesDirection) : void 0, this.createdAt = a(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : e == null ? void 0 : e.createdAt, this.lastLoginAt = a(e == null ? void 0 : e.lastLoginAt) ? C(e.lastLoginAt) : e == null ? void 0 : e.lastLoginAt, this.isActive = (e == null ? void 0 : e.isActive) ?? !1;
2036
2036
  }
2037
2037
  }
2038
2038
  class te extends wr {
@@ -2108,7 +2108,7 @@ class oe extends re {
2108
2108
  * Данные шаблона прайс-листа.
2109
2109
  */
2110
2110
  t(this, "priceTemplate");
2111
- 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 te(e == null ? void 0 : e.client), this.priceTemplate = new Q(e == null ? void 0 : e.priceTemplate);
2111
+ this.createdAt = a(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.deletedAt = a(e == null ? void 0 : e.deletedAt) ? C(e.deletedAt) : e == null ? void 0 : e.deletedAt, this.client = new te(e == null ? void 0 : e.client), this.priceTemplate = new Q(e == null ? void 0 : e.priceTemplate);
2112
2112
  }
2113
2113
  }
2114
2114
  class Ie extends yr {
@@ -2185,10 +2185,10 @@ class S {
2185
2185
  * Окончание периода.
2186
2186
  */
2187
2187
  t(this, "to");
2188
- 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;
2188
+ this.from = a(r == null ? void 0 : r.from) ? C(r.from) : (r == null ? void 0 : r.from) ?? null, this.to = a(r == null ? void 0 : r.to) ? C(r.to) : (r == null ? void 0 : r.to) ?? null;
2189
2189
  }
2190
2190
  }
2191
- class Jt {
2191
+ class Et {
2192
2192
  /**
2193
2193
  * Инициализирует экземпляр класса {@link TemplatesListFilters}.
2194
2194
  *
@@ -2248,7 +2248,7 @@ class Jt {
2248
2248
  return Object.keys(this).forEach((c) => {
2249
2249
  const u = this[c];
2250
2250
  // eslint-disable-next-line prettier/prettier
2251
- A(u) || C(u) && u.trim().length === 0 || Fe(u.isNewRec) && u.isNewRec() || (r[c] = u);
2251
+ A(u) || a(u) && u.trim().length === 0 || Fe(u.isNewRec) && u.isNewRec() || (r[c] = u);
2252
2252
  }), !((e = r == null ? void 0 : r.createdAt) != null && e.from) && !((s = r == null ? void 0 : r.createdAt) != null && s.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;
2253
2253
  }
2254
2254
  }
@@ -2309,7 +2309,7 @@ class Ye {
2309
2309
  this.role = new le(r == null ? void 0 : r.role), this.category = new we(r == null ? void 0 : r.category), this.minCoefficient = new Re(r == null ? void 0 : r.minCoefficient);
2310
2310
  }
2311
2311
  }
2312
- class Et extends p {
2312
+ class Vt extends p {
2313
2313
  /**
2314
2314
  * Возвращает данные о результатах поиска категорий и товаров.
2315
2315
  *
@@ -2340,7 +2340,7 @@ class Et extends p {
2340
2340
  return s && (c += `&category_id=${s}`), n && (c += `&client_id=${n}`), c;
2341
2341
  }
2342
2342
  }
2343
- class Vt extends p {
2343
+ class Kt extends p {
2344
2344
  /**
2345
2345
  * Импортирует цены клиента из CSV файла.
2346
2346
  *
@@ -2539,7 +2539,7 @@ class Vt extends p {
2539
2539
  return this.post(`/internal/clients/${r}/price/commercial-offer/send`, e);
2540
2540
  }
2541
2541
  }
2542
- class Kt extends p {
2542
+ class Qt extends p {
2543
2543
  /**
2544
2544
  * Возвращает список шаблонов прайс-листа привязанных к клиенту.
2545
2545
  *
@@ -2631,7 +2631,7 @@ class Kt extends p {
2631
2631
  return this.delete(`/internal/clients/${r}/price/templates/${e}/${s}`);
2632
2632
  }
2633
2633
  }
2634
- class Qt extends p {
2634
+ class Yt extends p {
2635
2635
  /**
2636
2636
  * Возвращает список данных о корневых категориях.
2637
2637
  *
@@ -2723,7 +2723,7 @@ class Qt extends p {
2723
2723
  });
2724
2724
  }
2725
2725
  }
2726
- class Yt extends p {
2726
+ class Xt extends p {
2727
2727
  /**
2728
2728
  * Возвращает данные об указанном продукте.
2729
2729
  *
@@ -2773,7 +2773,7 @@ class Yt extends p {
2773
2773
  });
2774
2774
  }
2775
2775
  }
2776
- class Xt extends p {
2776
+ class Zt extends p {
2777
2777
  /**
2778
2778
  * Возвращает список данных о корневых категориях указанного клиента.
2779
2779
  *
@@ -2789,7 +2789,7 @@ class Xt extends p {
2789
2789
  clientId: r,
2790
2790
  showHidden: e
2791
2791
  },
2792
- (s) => s.data.map((n) => new Ce(n))
2792
+ (s) => s.data.map((n) => new ae(n))
2793
2793
  );
2794
2794
  }
2795
2795
  /**
@@ -2810,7 +2810,7 @@ class Xt extends p {
2810
2810
  showHidden: s,
2811
2811
  withNestedCategories: n
2812
2812
  },
2813
- (o) => new Ce(o.data)
2813
+ (o) => new ae(o.data)
2814
2814
  );
2815
2815
  }
2816
2816
  /**
@@ -2835,7 +2835,7 @@ class Xt extends p {
2835
2835
  );
2836
2836
  }
2837
2837
  }
2838
- class Zt extends p {
2838
+ class es extends p {
2839
2839
  /**
2840
2840
  * Возвращает данные об указанном продукте для указанного клиента.
2841
2841
  *
@@ -2947,7 +2947,7 @@ class Ae extends p {
2947
2947
  return e && (m.filters = JSON.stringify((e instanceof M ? e : new M(e)).toPrimitive())), X(s) || (m.sort = H(s) ? s : [s]), o && (m = { ...m, ...o }), this.get(r, m, c, u, h);
2948
2948
  }
2949
2949
  }
2950
- class es extends Ae {
2950
+ class rs extends Ae {
2951
2951
  /**
2952
2952
  * Возвращает список шаблонов прайс-листа.
2953
2953
  *
@@ -3151,7 +3151,7 @@ class es extends Ae {
3151
3151
  );
3152
3152
  }
3153
3153
  }
3154
- class rs extends p {
3154
+ class ts extends p {
3155
3155
  /**
3156
3156
  * Возвращает список ролей ценообразования.
3157
3157
  *
@@ -3231,7 +3231,7 @@ class rs extends p {
3231
3231
  );
3232
3232
  }
3233
3233
  }
3234
- class ts extends Ae {
3234
+ class ss extends Ae {
3235
3235
  /**
3236
3236
  * Возвращает пагинированный список свойств.
3237
3237
  *
@@ -3603,7 +3603,7 @@ class ts extends Ae {
3603
3603
  return this.post(`/internal/catalog/categories/${r}/image`, { image: e });
3604
3604
  }
3605
3605
  }
3606
- class ss extends p {
3606
+ class is extends p {
3607
3607
  /**
3608
3608
  * Возвращает список данных о корневых категориях указанного шаблона прайс-листа.
3609
3609
  *
@@ -3698,9 +3698,9 @@ function er(i) {
3698
3698
  var gt = /* @__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))(gt || {}), U = /* @__PURE__ */ ((i) => (i.Person = "individual", i.Ic = "entrepreneur", i.UlR = "legal", i.UlNr = "non_resident_legal", i))(U || {});
3699
3699
  class mt extends w {
3700
3700
  }
3701
- class Cr extends w {
3701
+ class ar extends w {
3702
3702
  }
3703
- class is extends w {
3703
+ class ns extends w {
3704
3704
  }
3705
3705
  class ft extends w {
3706
3706
  }
@@ -3717,7 +3717,7 @@ class B extends w {
3717
3717
  });
3718
3718
  }
3719
3719
  }
3720
- class ar extends w {
3720
+ class Cr extends w {
3721
3721
  }
3722
3722
  class yt extends w {
3723
3723
  }
@@ -3729,7 +3729,7 @@ class Rr extends w {
3729
3729
  }
3730
3730
  class wt extends w {
3731
3731
  }
3732
- class ns {
3732
+ class os {
3733
3733
  /**
3734
3734
  * Генерирует и возвращает данные-заглушку неопределённой записи справочника.
3735
3735
  *
@@ -3834,7 +3834,7 @@ class z extends Ue {
3834
3834
  * Дата и время последнего удаления.
3835
3835
  */
3836
3836
  t(this, "deletedAt");
3837
- 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;
3837
+ 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 = a(e == null ? void 0 : e.deletedAt) ? C(e.deletedAt) : e == null ? void 0 : e.deletedAt;
3838
3838
  }
3839
3839
  }
3840
3840
  class Ar extends b {
@@ -3887,7 +3887,7 @@ class Ar extends b {
3887
3887
  */
3888
3888
  t(this, "updater");
3889
3889
  if (e) {
3890
- if (this.opf = new B(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 _(e.creator) : void 0, this.updatedAt = C(e == null ? void 0 : e.updatedAt) ? a(e.updatedAt) : e.updatedAt, this.updater = e.updater ? new _(e.updater) : void 0, e.partnerGroup && (this.partnerGroup = new ee(e.partnerGroup)), e.contacts) {
3890
+ if (this.opf = new B(e.opf), this.comment = e.comment, this.alternativeName = e.alternativeName, this.createdAt = a(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : e.createdAt, this.creator = e.creator ? new _(e.creator) : void 0, this.updatedAt = a(e == null ? void 0 : e.updatedAt) ? C(e.updatedAt) : e.updatedAt, this.updater = e.updater ? new _(e.updater) : void 0, e.partnerGroup && (this.partnerGroup = new ee(e.partnerGroup)), e.contacts) {
3891
3891
  const s = [];
3892
3892
  e.contacts.forEach((n) => {
3893
3893
  s.push(new z(n));
@@ -3970,7 +3970,7 @@ class Tr extends $r {
3970
3970
  e && (this.kpp = e.kpp ?? "");
3971
3971
  }
3972
3972
  }
3973
- class Ct extends Tr {
3973
+ class at extends Tr {
3974
3974
  /**
3975
3975
  * Инициализирует экземпляр класса {@link ContragentUlNr}.
3976
3976
  *
@@ -3993,7 +3993,7 @@ class Ct extends Tr {
3993
3993
  e && (this.registrationCountry = new Z(e.registrationCountry), this.registrationNumber = e.registrationNumber ?? "", this.taxNumber = e.taxNumber ?? "");
3994
3994
  }
3995
3995
  }
3996
- class ae {
3996
+ class Ce {
3997
3997
  /**
3998
3998
  * Инициализирует и возвращает экземпляр класса с данными о контрагенте.
3999
3999
  *
@@ -4006,7 +4006,7 @@ class ae {
4006
4006
  case U.UlR:
4007
4007
  return new Tr(r);
4008
4008
  case U.UlNr:
4009
- return new Ct(r);
4009
+ return new at(r);
4010
4010
  default:
4011
4011
  return new vt(r);
4012
4012
  }
@@ -4027,7 +4027,7 @@ class ke extends re {
4027
4027
  this.isPrimary = e.isPrimary;
4028
4028
  }
4029
4029
  }
4030
- class at extends z {
4030
+ class Ct extends z {
4031
4031
  /**
4032
4032
  * Инициализирует экземпляр класса {@link ContactPersonRelated}.
4033
4033
  *
@@ -4145,7 +4145,7 @@ class rr extends te {
4145
4145
  * @inheritDoc
4146
4146
  */
4147
4147
  t(this, "extraData");
4148
- this.contragents = ((s = e == null ? void 0 : e.contragents) == null ? void 0 : s.map((u) => ae.createInstance(u))) ?? [], this.partnerGroups = ((n = e == null ? void 0 : e.partnerGroups) == null ? void 0 : n.map((u) => new ee(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 ue(u))) ?? [], this.channelPrimaryInterest = new Cr(e == null ? void 0 : e.channelPrimaryInterest), this.sourcePrimaryInterest = new Dr(e == null ? void 0 : e.sourcePrimaryInterest), this.preferredDeliveryType = new F(e == null ? void 0 : e.preferredDeliveryType), this.primaryDemand = e == null ? void 0 : e.primaryDemand, this.preferredWarehouse = e != null && e.preferredWarehouse ? new ye(e.preferredWarehouse) : void 0, this.extraData = (e == null ? void 0 : e.extraData) ?? {};
4148
+ this.contragents = ((s = e == null ? void 0 : e.contragents) == null ? void 0 : s.map((u) => Ce.createInstance(u))) ?? [], this.partnerGroups = ((n = e == null ? void 0 : e.partnerGroups) == null ? void 0 : n.map((u) => new ee(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 ue(u))) ?? [], this.channelPrimaryInterest = new ar(e == null ? void 0 : e.channelPrimaryInterest), this.sourcePrimaryInterest = new Dr(e == null ? void 0 : e.sourcePrimaryInterest), this.preferredDeliveryType = new F(e == null ? void 0 : e.preferredDeliveryType), this.primaryDemand = e == null ? void 0 : e.primaryDemand, this.preferredWarehouse = e != null && e.preferredWarehouse ? new ye(e.preferredWarehouse) : void 0, this.extraData = (e == null ? void 0 : e.extraData) ?? {};
4149
4149
  }
4150
4150
  }
4151
4151
  class br {
@@ -4158,11 +4158,11 @@ class br {
4158
4158
  return Object.keys(this).forEach((e) => {
4159
4159
  const s = this[e];
4160
4160
  A(s) || // eslint-disable-next-line prettier/prettier,lodash/prefer-lodash-method
4161
- C(s) && s.trim().length === 0 || Fe(s.isNewRec) && s.isNewRec() || (r[e] = s);
4161
+ a(s) && s.trim().length === 0 || Fe(s.isNewRec) && s.isNewRec() || (r[e] = s);
4162
4162
  }), r;
4163
4163
  }
4164
4164
  }
4165
- class os extends br {
4165
+ class cs extends br {
4166
4166
  /**
4167
4167
  * Инициализирует экземпляр класса {@link ClientsListFilters}.
4168
4168
  *
@@ -4344,7 +4344,7 @@ class Sr extends re {
4344
4344
  * @inheritDoc
4345
4345
  */
4346
4346
  t(this, "creator");
4347
- this.createdAt = C(e == null ? void 0 : e.createdAt) ? a(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.creator = new _(e == null ? void 0 : e.creator);
4347
+ this.createdAt = a(e == null ? void 0 : e.createdAt) ? C(e.createdAt) : (e == null ? void 0 : e.createdAt) ?? /* @__PURE__ */ new Date(), this.creator = new _(e == null ? void 0 : e.creator);
4348
4348
  }
4349
4349
  }
4350
4350
  class Rt extends b {
@@ -4405,7 +4405,7 @@ class Pt {
4405
4405
  this.page = (r == null ? void 0 : r.page) ?? 1, this.pageSize = (r == null ? void 0 : r.pageSize) ?? 50;
4406
4406
  }
4407
4407
  }
4408
- class cs extends Pt {
4408
+ class ls extends Pt {
4409
4409
  /**
4410
4410
  * Инициализирует экземпляр класса {@link DataTablePagination}.
4411
4411
  *
@@ -4436,7 +4436,7 @@ class cs extends Pt {
4436
4436
  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;
4437
4437
  }
4438
4438
  }
4439
- class ls {
4439
+ class us {
4440
4440
  /**
4441
4441
  * Инициализирует экземпляр класса {@link ISortRequestParams}.
4442
4442
  *
@@ -4667,7 +4667,7 @@ class x extends Ae {
4667
4667
  getAllClientContacts(r) {
4668
4668
  return this.get(`/internal/clients/${r}/contacts/all`, {}, (e) => {
4669
4669
  let s = [];
4670
- return (e == null ? void 0 : e.data.length) > 0 && (s = e.data.map((n) => new at(n))), s;
4670
+ return (e == null ? void 0 : e.data.length) > 0 && (s = e.data.map((n) => new Ct(n))), s;
4671
4671
  });
4672
4672
  }
4673
4673
  /**
@@ -4818,7 +4818,7 @@ class x extends Ae {
4818
4818
  return this.post(
4819
4819
  `/internal/clients/${r}/contragents`,
4820
4820
  x.transformContragentClientDataToRequest(e),
4821
- (n) => ae.createInstance(n.data),
4821
+ (n) => Ce.createInstance(n.data),
4822
4822
  s
4823
4823
  );
4824
4824
  }
@@ -4834,7 +4834,7 @@ class x extends Ae {
4834
4834
  return this.patch(
4835
4835
  `/internal/clients/${r}/contragents/${e.id}`,
4836
4836
  x.transformContragentClientDataToRequest(e),
4837
- (n) => ae.createInstance(n.data),
4837
+ (n) => Ce.createInstance(n.data),
4838
4838
  s
4839
4839
  );
4840
4840
  }
@@ -5214,7 +5214,7 @@ const Y = class Y extends p {
5214
5214
  */
5215
5215
  t(Y, "responseDataCache", /* @__PURE__ */ new Map());
5216
5216
  let me = Y;
5217
- class us extends p {
5217
+ class ps extends p {
5218
5218
  /**
5219
5219
  * Выполняет проверку занят ли указанный номер телефона.
5220
5220
  *
@@ -5228,7 +5228,7 @@ class us extends p {
5228
5228
  });
5229
5229
  }
5230
5230
  }
5231
- class ps {
5231
+ class hs {
5232
5232
  /**
5233
5233
  * Инициализирует экземпляр класса {@link VersionConfig}.
5234
5234
  *
@@ -5247,11 +5247,11 @@ class ps {
5247
5247
  * Текущая версия приложения.
5248
5248
  */
5249
5249
  t(this, "version");
5250
- 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";
5250
+ this.date = a(r == null ? void 0 : r.date) ? C(r.date) : (r == null ? void 0 : r.date) ?? /* @__PURE__ */ new Date(), this.name = (r == null ? void 0 : r.name) ?? "", this.version = (r == null ? void 0 : r.version) ?? "0.0.0";
5251
5251
  }
5252
5252
  }
5253
5253
  var Dt = /* @__PURE__ */ ((i) => (i.Kozyrek = "kozyrek", i.Mosquitto = "mosquitto", i.Strip = "strip", i.MetalForDoors = "metal_for_doors", i.Sandwich = "sandwich", i.SandwichM2 = "sandwich_m2", i))(Dt || {});
5254
- class hs extends p {
5254
+ class gs extends p {
5255
5255
  /**
5256
5256
  * Возвращает настройки указанного конфигуратора для указанной категории.
5257
5257
  *
@@ -5342,7 +5342,7 @@ class hs extends p {
5342
5342
  });
5343
5343
  }
5344
5344
  }
5345
- class gs {
5345
+ class ms {
5346
5346
  /**
5347
5347
  * Возвращает диапазон дат по умолчанию.
5348
5348
  */
@@ -5385,11 +5385,11 @@ class dr {
5385
5385
  return (e = r.properties) != null && e.lengthStep ? r.properties.lengthStep : !((s = r.properties) != null && s.ignoreMinCountCheck) && ((n = r.properties) != null && n.minCount) ? r.properties.minCount : 0.01;
5386
5386
  }
5387
5387
  }
5388
- function ms(i, r) {
5388
+ function fs(i, r) {
5389
5389
  const e = [2, 0, 1, 1, 1, 2];
5390
5390
  return r[i % 100 > 4 && i % 100 < 20 ? 2 : e[Math.min(i % 10, 5)]];
5391
5391
  }
5392
- class fs {
5392
+ class ys {
5393
5393
  /**
5394
5394
  * Генерирует и возвращает данные-заглушку неопределённого менеджера.
5395
5395
  */
@@ -5418,7 +5418,7 @@ class At extends me {
5418
5418
  }
5419
5419
  }
5420
5420
  var $t = /* @__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))($t || {});
5421
- class ys {
5421
+ class ws {
5422
5422
  /**
5423
5423
  * Инициализирует экземпляр класса {@link OrderEditorData}.
5424
5424
  *
@@ -5548,13 +5548,13 @@ class Ir extends Sr {
5548
5548
  onlinePaymentLink: (o = e == null ? void 0 : e.payment) == null ? void 0 : o.onlinePaymentLink
5549
5549
  }, this.delivery = {
5550
5550
  type: ((c = e == null ? void 0 : e.delivery) == null ? void 0 : c.type) ?? -1,
5551
- date: C((u = e == null ? void 0 : e.delivery) == null ? void 0 : u.date) ? a(e.delivery.date) : ((h = e == null ? void 0 : e.delivery) == null ? void 0 : h.date) ?? /* @__PURE__ */ new Date(),
5551
+ date: a((u = e == null ? void 0 : e.delivery) == null ? void 0 : u.date) ? C(e.delivery.date) : ((h = e == null ? void 0 : e.delivery) == null ? void 0 : h.date) ?? /* @__PURE__ */ new Date(),
5552
5552
  address: (m = e == null ? void 0 : e.delivery) != null && m.address ? new ue(e.delivery.address) : void 0,
5553
5553
  warehouse: (f = e == null ? void 0 : e.delivery) != null && f.warehouse ? new ye(e.delivery.warehouse) : void 0
5554
- }, this.attachedUser = e != null && e.attachedUser ? new _(e == null ? void 0 : e.attachedUser) : void 0, this.status = new $e(e == null ? void 0 : e.status), this.statusDetail = e != null && e.statusDetail ? new w(e.statusDetail) : void 0, this.salesDirection = new q(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;
5554
+ }, this.attachedUser = e != null && e.attachedUser ? new _(e == null ? void 0 : e.attachedUser) : void 0, this.status = new $e(e == null ? void 0 : e.status), this.statusDetail = e != null && e.statusDetail ? new w(e.statusDetail) : void 0, this.salesDirection = new q(e == null ? void 0 : e.salesDirection), this.attachedAt = a(e == null ? void 0 : e.attachedAt) ? C(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;
5555
5555
  }
5556
5556
  }
5557
- var Tt = /* @__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))(Tt || {});
5557
+ var Tt = /* @__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))(Tt || {}), bt = /* @__PURE__ */ ((i) => (i.WillWaiting = "will_waiting", i))(bt || {});
5558
5558
  class T extends me {
5559
5559
  /**
5560
5560
  * Возвращает {@link Promise} для получения данных указанного справочника.
@@ -5571,7 +5571,7 @@ class T extends me {
5571
5571
  * первичного интереса.
5572
5572
  */
5573
5573
  getChannelPrimaryInterest() {
5574
- return this.getTypedDataArrayRequester(Cr, "/internal/references/channel-primary-interest", !0);
5574
+ return this.getTypedDataArrayRequester(ar, "/internal/references/channel-primary-interest", !0);
5575
5575
  }
5576
5576
  /**
5577
5577
  * Возвращает {@link Promise} для получения справочника должностей контактных лиц.
@@ -5608,7 +5608,7 @@ class T extends me {
5608
5608
  * Возвращает {@link Promise} для получения справочника операторов.
5609
5609
  */
5610
5610
  getOperators() {
5611
- return this.getTypedDataArrayRequester(ar, "/internal/references/operator", !0);
5611
+ return this.getTypedDataArrayRequester(Cr, "/internal/references/operator", !0);
5612
5612
  }
5613
5613
  /**
5614
5614
  * Возвращает {@link Promise} для получения справочника данных статусов оплаты заказов.
@@ -5781,7 +5781,7 @@ const $ = W("common.references_private", () => {
5781
5781
  */
5782
5782
  priceCoefficientsReference: l
5783
5783
  };
5784
- }), ws = W("common.references", () => {
5784
+ }), vs = W("common.references", () => {
5785
5785
  const i = P(() => {
5786
5786
  const l = $();
5787
5787
  return !l.channelPrimaryInterestReference && !l.dataLoaderList.channelPrimaryInterestReference && (l.dataLoaderList.channelPrimaryInterestReference = !0, p.getInstance(T).getChannelPrimaryInterest().then((g) => {
@@ -5948,7 +5948,7 @@ const $ = W("common.references_private", () => {
5948
5948
  priceCoefficientsReference: be
5949
5949
  };
5950
5950
  });
5951
- class vs extends br {
5951
+ class as extends br {
5952
5952
  /**
5953
5953
  * Инициализирует экземпляр класса {@link OrdersListFilters}.
5954
5954
  *
@@ -6049,7 +6049,7 @@ class vs extends br {
6049
6049
  * @inheritDoc
6050
6050
  */
6051
6051
  t(this, "onlyMyRegions");
6052
- this.attachedOperators = (s = e == null ? void 0 : e.attachedOperators) == null ? void 0 : s.map((u) => new ar(u)), this.clientSearchTerm = e == null ? void 0 : e.clientSearchTerm, this.client = e != null && e.client ? new te(e.client) : void 0, this.contragent = e == null ? void 0 : e.contragent, this.createdAt = new S(e == null ? void 0 : e.createdAt), this.creator = e != null && e.creator ? new _(e.creator) : void 0, this.deliveryDate = new S(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 De(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 S(e == null ? void 0 : e.attachedAt), this.salesDirections = (o = e == null ? void 0 : e.salesDirections) == null ? void 0 : o.map((u) => new q(u)), this.status = e == null ? void 0 : e.status, this.statusDetail = e == null ? void 0 : e.statusDetail, this.deliveryType = e != null && e.deliveryType ? new F(e.deliveryType) : void 0, this.paymentType = e != null && e.paymentType ? new Rr(e.paymentType) : void 0, this.warehouses = (c = e == null ? void 0 : e.warehouses) == null ? void 0 : c.map((u) => new ye(u)), this.isToProcess = e == null ? void 0 : e.isToProcess;
6052
+ this.attachedOperators = (s = e == null ? void 0 : e.attachedOperators) == null ? void 0 : s.map((u) => new Cr(u)), this.clientSearchTerm = e == null ? void 0 : e.clientSearchTerm, this.client = e != null && e.client ? new te(e.client) : void 0, this.contragent = e == null ? void 0 : e.contragent, this.createdAt = new S(e == null ? void 0 : e.createdAt), this.creator = e != null && e.creator ? new _(e.creator) : void 0, this.deliveryDate = new S(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 De(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 S(e == null ? void 0 : e.attachedAt), this.salesDirections = (o = e == null ? void 0 : e.salesDirections) == null ? void 0 : o.map((u) => new q(u)), this.status = e == null ? void 0 : e.status, this.statusDetail = e == null ? void 0 : e.statusDetail, this.deliveryType = e != null && e.deliveryType ? new F(e.deliveryType) : void 0, this.paymentType = e != null && e.paymentType ? new Rr(e.paymentType) : void 0, this.warehouses = (c = e == null ? void 0 : e.warehouses) == null ? void 0 : c.map((u) => new ye(u)), this.isToProcess = e == null ? void 0 : e.isToProcess;
6053
6053
  }
6054
6054
  /**
6055
6055
  * @inheritDoc
@@ -6098,12 +6098,12 @@ class vs extends br {
6098
6098
  return !((s = e == null ? void 0 : e.createdAt) != null && s.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) && !((h = e == null ? void 0 : e.attachedAt) != null && h.to) && delete e.attachedAt, e;
6099
6099
  }
6100
6100
  }
6101
- class bt extends mr {
6101
+ class St extends mr {
6102
6102
  /**
6103
6103
  * Инициализирует экземпляр класса {@link OrderItem}.
6104
6104
  *
6105
6105
  * @param data Данные для первоначальной инициализации.
6106
- * @param replacement Позиция-заменитель, соответствующая {@link replacementId}.
6106
+ * @param replacement Продукт, которым заменена текущая запись.
6107
6107
  */
6108
6108
  constructor(e, s) {
6109
6109
  super(e);
@@ -6151,7 +6151,11 @@ class bt extends mr {
6151
6151
  * Список названий полей, значения которых отличаются между текущей позицией и позицией-заменителем.
6152
6152
  */
6153
6153
  t(this, "changedFields", []);
6154
- this.product = new G(e.product), this.currency = new O(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, s && (this.quantity !== s.quantity && this.changedFields.push("quantity"), this.length !== s.length && this.changedFields.push("length"));
6154
+ /**
6155
+ * Продукт, которым заменена текущая запись.
6156
+ */
6157
+ t(this, "replacement");
6158
+ this.product = new G(e.product), this.currency = new O(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, s && (this.replacement = s, this.quantity !== s.quantity && this.changedFields.push("quantity"), this.length !== s.length && this.changedFields.push("length"));
6155
6159
  }
6156
6160
  }
6157
6161
  class I extends Ir {
@@ -6218,11 +6222,11 @@ class I extends Ir {
6218
6222
  this.products = (e.products ?? []).map((n) => {
6219
6223
  var c;
6220
6224
  const o = n.replacementId ? (c = e.products) == null ? void 0 : c.find((u) => u.id === n.replacementId) : void 0;
6221
- return new bt(n, o);
6222
- }), this.invoices = e.invoices ?? [], this.comment = e.comment, this.image = e.image, this.contragent = e.contragent ? ae.createInstance(e.contragent) : void 0, this.barcode = e.barcode, this.orderSource = e.orderSource ? new w(e.orderSource) : void 0, this.isAllowProcessingWithoutPayment = e.isAllowProcessingWithoutPayment, this.nextStatuses = (s = e.nextStatuses) == null ? void 0 : s.map((n) => new $e(n)), this.actions = e.actions, this.operatorsComment = e.operatorsComment, this.operatorsForWarehouseComment = e.operatorsForWarehouseComment, this.erpOrderUrl = e.erpOrderUrl;
6225
+ return new St(n, o);
6226
+ }), this.invoices = e.invoices ?? [], this.comment = e.comment, this.image = e.image, this.contragent = e.contragent ? Ce.createInstance(e.contragent) : void 0, this.barcode = e.barcode, this.orderSource = e.orderSource ? new w(e.orderSource) : void 0, this.isAllowProcessingWithoutPayment = e.isAllowProcessingWithoutPayment, this.nextStatuses = (s = e.nextStatuses) == null ? void 0 : s.map((n) => new $e(n)), this.actions = e.actions, this.operatorsComment = e.operatorsComment, this.operatorsForWarehouseComment = e.operatorsForWarehouseComment, this.erpOrderUrl = e.erpOrderUrl;
6223
6227
  }
6224
6228
  }
6225
- class St {
6229
+ class dt {
6226
6230
  /**
6227
6231
  * Инициализирует экземпляр класса {@link OrderStatusHistoryInfo}.
6228
6232
  *
@@ -6245,7 +6249,7 @@ class St {
6245
6249
  * @inheritDoc
6246
6250
  */
6247
6251
  t(this, "createdAt");
6248
- this.user = new _(r == null ? void 0 : r.user), this.status = new $e(r == null ? void 0 : r.status), this.statusDetail = r != null && r.statusDetail ? new w(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();
6252
+ this.user = new _(r == null ? void 0 : r.user), this.status = new $e(r == null ? void 0 : r.status), this.statusDetail = r != null && r.statusDetail ? new w(r.statusDetail) : void 0, this.createdAt = a(r == null ? void 0 : r.createdAt) ? C(r.createdAt) : (r == null ? void 0 : r.createdAt) ?? /* @__PURE__ */ new Date();
6249
6253
  }
6250
6254
  }
6251
6255
  class Cs extends Ae {
@@ -6429,6 +6433,18 @@ class Cs extends Ae {
6429
6433
  n
6430
6434
  );
6431
6435
  }
6436
+ /**
6437
+ * Изменяет только детализирующий статус (подстатус) заказа без смены основного
6438
+ * статуса и возвращает обновлённые данные заказа.
6439
+ *
6440
+ * @param orderId Идентификатор заказа.
6441
+ * @param statusDetail Slug детализирующего статуса заказа.
6442
+ *
6443
+ * @see /doc/api/internal#/Заказы/api_internal_orders_status_change
6444
+ */
6445
+ changeOrderStatusDetail(r, e) {
6446
+ return this.patch(`/internal/orders/${r}/status`, { statusDetail: e }, (s) => new I(s.data));
6447
+ }
6432
6448
  /**
6433
6449
  * Возвращает историю изменения статусов заказа.
6434
6450
  *
@@ -6440,7 +6456,7 @@ class Cs extends Ae {
6440
6456
  return this.get(
6441
6457
  `/internal/orders/${r}/history`,
6442
6458
  {},
6443
- (e) => e.data.map((s) => new St(s))
6459
+ (e) => e.data.map((s) => new dt(s))
6444
6460
  );
6445
6461
  }
6446
6462
  /**
@@ -6596,7 +6612,7 @@ const _e = (i) => {
6596
6612
  const r = {};
6597
6613
  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;
6598
6614
  };
6599
- class as extends p {
6615
+ class Rs extends p {
6600
6616
  /**
6601
6617
  * Возвращает список клиентских цен на продукты в указанном диапазоне цены.
6602
6618
  *
@@ -6657,7 +6673,7 @@ class as extends p {
6657
6673
  );
6658
6674
  }
6659
6675
  }
6660
- class dt {
6676
+ class It {
6661
6677
  /**
6662
6678
  * Инициализирует экземпляр класса {@link PriceHistoryItem}.
6663
6679
  *
@@ -6704,10 +6720,10 @@ class dt {
6704
6720
  * @inheritDoc
6705
6721
  */
6706
6722
  t(this, "currency");
6707
- 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 he(r.product) : void 0, this.client = r.client ? new _(r.client) : void 0, this.executor = r.executor ? new _(r.executor) : void 0, this.currency = r.currency ? new O(r.currency) : void 0;
6723
+ this.cost = r.cost ?? 0, this.isLowCost = r.isLowCost ?? !1, this.isRetail = r.isRetail ?? !1, this.costDate = a(r.costDate) ? C(r.costDate) : r.costDate ?? /* @__PURE__ */ new Date(), this.discountName = r.discountName, this.priceTemplateName = r.priceTemplateName, this.product = r.product ? new he(r.product) : void 0, this.client = r.client ? new _(r.client) : void 0, this.executor = r.executor ? new _(r.executor) : void 0, this.currency = r.currency ? new O(r.currency) : void 0;
6708
6724
  }
6709
6725
  }
6710
- class It extends he {
6726
+ class kt extends he {
6711
6727
  /**
6712
6728
  * Инициализирует экземпляр класса {@link ProductPriceHistory}.
6713
6729
  *
@@ -6719,10 +6735,10 @@ class It extends he {
6719
6735
  * @inheritDoc
6720
6736
  */
6721
6737
  t(this, "history");
6722
- this.history = fe(e.history, (s) => new dt(s));
6738
+ this.history = fe(e.history, (s) => new It(s));
6723
6739
  }
6724
6740
  }
6725
- class Rs extends p {
6741
+ class Ps extends p {
6726
6742
  /**
6727
6743
  * Возвращает данные об истории изменения цен.
6728
6744
  *
@@ -6742,7 +6758,7 @@ class Rs extends p {
6742
6758
  (f) => A(f) || (H(f) || lr(f)) && X(f)
6743
6759
  ), n = ((m = r.product) == null ? void 0 : m[0]) ?? 0;
6744
6760
  return delete s.product, this.get(`/internal/price/products/${n}/history`, s).then((f) => [
6745
- new It(pe(f[0], { history: f }))
6761
+ new kt(pe(f[0], { history: f }))
6746
6762
  ]);
6747
6763
  }
6748
6764
  }
@@ -6764,7 +6780,7 @@ class sr {
6764
6780
  r != null && r.products && (this.products = r.products.map((e) => new he(e))), r != null && r.productCategories && (this.productCategories = r.productCategories.map((e) => new he(e)));
6765
6781
  }
6766
6782
  }
6767
- class Ps extends p {
6783
+ class Ds extends p {
6768
6784
  /**
6769
6785
  * Возвращает данные о рекомендациях указанной категории продуктов.
6770
6786
  *
@@ -6810,7 +6826,7 @@ class Ps extends p {
6810
6826
  });
6811
6827
  }
6812
6828
  }
6813
- class kt {
6829
+ class Lt {
6814
6830
  /**
6815
6831
  * Инициализирует экземпляр класса {@link MetaTagItem}.
6816
6832
  *
@@ -6868,10 +6884,10 @@ class ir {
6868
6884
  */
6869
6885
  t(this, "tags");
6870
6886
  var e;
6871
- this.resourceType = new Pr(r == null ? void 0 : r.resourceType), this.resourceId = (r == null ? void 0 : r.resourceId) ?? "", this.h1 = r == null ? void 0 : r.h1, this.title = r == null ? void 0 : r.title, this.description = r == null ? void 0 : r.description, this.keywords = r == null ? void 0 : r.keywords, this.meta = ((e = r == null ? void 0 : r.meta) == null ? void 0 : e.map((s) => new kt(s))) ?? [], this.tags = r == null ? void 0 : r.tags;
6887
+ this.resourceType = new Pr(r == null ? void 0 : r.resourceType), this.resourceId = (r == null ? void 0 : r.resourceId) ?? "", this.h1 = r == null ? void 0 : r.h1, this.title = r == null ? void 0 : r.title, this.description = r == null ? void 0 : r.description, this.keywords = r == null ? void 0 : r.keywords, this.meta = ((e = r == null ? void 0 : r.meta) == null ? void 0 : e.map((s) => new Lt(s))) ?? [], this.tags = r == null ? void 0 : r.tags;
6872
6888
  }
6873
6889
  }
6874
- class Ds extends p {
6890
+ class As extends p {
6875
6891
  /**
6876
6892
  * Возвращает {@link Promise} для получения данных о SEO-параметрах указанного ресурса.
6877
6893
  *
@@ -6902,7 +6918,7 @@ class Ds extends p {
6902
6918
  return this.delete(`/internal/seo/${r.slug}/${e}`);
6903
6919
  }
6904
6920
  }
6905
- class As extends p {
6921
+ class $s extends p {
6906
6922
  /**
6907
6923
  * Возвращает подсказки по адресам.
6908
6924
  *
@@ -6949,8 +6965,8 @@ class As extends p {
6949
6965
  });
6950
6966
  }
6951
6967
  }
6952
- var Lt = /* @__PURE__ */ ((i) => (i.Admin = "admin", i.Manager = "manager", i.Operator = "operator", i.Client = "client", i.Guest = "guest", i))(Lt || {});
6953
- class _t extends wr {
6968
+ var _t = /* @__PURE__ */ ((i) => (i.Admin = "admin", i.Manager = "manager", i.Operator = "operator", i.Client = "client", i.Guest = "guest", i))(_t || {});
6969
+ class xt extends wr {
6954
6970
  /**
6955
6971
  * Инициализирует экземпляр класса {@link User}.
6956
6972
  *
@@ -6973,7 +6989,7 @@ class _t extends wr {
6973
6989
  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;
6974
6990
  }
6975
6991
  }
6976
- class $s extends p {
6992
+ class Ts extends p {
6977
6993
  /**
6978
6994
  * Инициализирует экземпляр класса {@link UserAuthDataProvider}.
6979
6995
  */
@@ -6989,16 +7005,16 @@ class $s extends p {
6989
7005
  return this.get("internal/users/current-tokens").then((r) => r.accessToken);
6990
7006
  }
6991
7007
  }
6992
- class xt extends p {
7008
+ class Ot extends p {
6993
7009
  /**
6994
7010
  * Возвращает данные о текущем пользователе.
6995
7011
  */
6996
7012
  // eslint-disable-next-line class-methods-use-this
6997
7013
  getCurrentUser() {
6998
- return this.get("/internal/users/info", {}, (r) => new _t(r.data), !0);
7014
+ return this.get("/internal/users/info", {}, (r) => new xt(r.data), !0);
6999
7015
  }
7000
7016
  }
7001
- const Ot = W("common.user_state_private", () => {
7017
+ const qt = W("common.user_state_private", () => {
7002
7018
  const i = y({}), r = y(void 0);
7003
7019
  return {
7004
7020
  /**
@@ -7010,20 +7026,20 @@ const Ot = W("common.user_state_private", () => {
7010
7026
  */
7011
7027
  currentUser: r
7012
7028
  };
7013
- }), Ts = W("common.user_state", () => ({
7029
+ }), bs = W("common.user_state", () => ({
7014
7030
  /**
7015
7031
  * Данные о текущем пользователе.
7016
7032
  */
7017
7033
  currentUser: P(() => {
7018
- const r = Ot();
7019
- return !r.currentUser && !r.dataLoaderList.currentUser && (r.dataLoaderList.currentUser = !0, p.getInstance(xt).getCurrentUser().then((e) => {
7034
+ const r = qt();
7035
+ return !r.currentUser && !r.dataLoaderList.currentUser && (r.dataLoaderList.currentUser = !0, p.getInstance(Ot).getCurrentUser().then((e) => {
7020
7036
  r.currentUser = e;
7021
7037
  }).catch(v).finally(() => {
7022
7038
  r.dataLoaderList.currentUser = !1;
7023
7039
  })), r.currentUser;
7024
7040
  })
7025
7041
  }));
7026
- class bs {
7042
+ class Ss {
7027
7043
  /**
7028
7044
  * Инициализирует экземпляр класса {@link FieldValidationResultData}.
7029
7045
  *
@@ -7053,58 +7069,58 @@ export {
7053
7069
  Ae as BasePaginationProvider,
7054
7070
  lt as CalculationTypeEnum,
7055
7071
  ne as Cart,
7056
- Wt as CartProvider,
7057
- Et as CatalogProvider,
7072
+ Jt as CartProvider,
7073
+ Vt as CatalogProvider,
7058
7074
  pr as CatalogableItem,
7059
7075
  N as Category,
7060
7076
  Ye as CategoryPricingRule,
7061
- Cr as ChannelPrimaryInterest,
7062
- is as City,
7077
+ ar as ChannelPrimaryInterest,
7078
+ ns as City,
7063
7079
  De as CityWithRegionAndCountry,
7064
7080
  rr as Client,
7065
7081
  Rt as ClientAdditionalData,
7066
- Ce as ClientCategory,
7082
+ ae as ClientCategory,
7067
7083
  x as ClientDataProvider,
7068
- Vt as ClientPriceProvider,
7069
- Kt as ClientPriceTemplateProvider,
7084
+ Kt as ClientPriceProvider,
7085
+ Qt as ClientPriceTemplateProvider,
7070
7086
  G as ClientProduct,
7071
- Xt as ClientProductCategoryDataProvider,
7072
- Zt as ClientProductDataProvider,
7087
+ Zt as ClientProductCategoryDataProvider,
7088
+ es as ClientProductDataProvider,
7073
7089
  te as ClientShortInfo,
7074
7090
  gt as ClientsAdditionalDataRequestTypeEnum,
7075
- os as ClientsListFilters,
7091
+ cs as ClientsListFilters,
7076
7092
  he as CodedIdentity,
7077
- hs as ConfiguratorProvider,
7093
+ gs as ConfiguratorProvider,
7078
7094
  Dt as ConfiguratorsEnum,
7079
7095
  Ue as Contact,
7080
7096
  fr as ContactLinks,
7081
7097
  z as ContactPerson,
7082
- at as ContactPersonRelated,
7098
+ Ct as ContactPersonRelated,
7083
7099
  ft as ContactPosition,
7084
7100
  ke as ContactRelation,
7085
7101
  Ar as ContragentBase,
7086
- ae as ContragentFactory,
7102
+ Ce as ContragentFactory,
7087
7103
  $r as ContragentIc,
7088
7104
  vt as ContragentPerson,
7089
- Ct as ContragentUlNr,
7105
+ at as ContragentUlNr,
7090
7106
  Tr as ContragentUlR,
7091
7107
  Me as CostSourceEnum,
7092
7108
  Z as Country,
7093
7109
  ze as CuratedDirection,
7094
7110
  We as Curator,
7095
7111
  O as Currency,
7096
- As as DataSuggestionProvider,
7097
- cs as DataTablePagination,
7112
+ $s as DataSuggestionProvider,
7113
+ ls as DataTablePagination,
7098
7114
  Pt as DataTablePaginationRequestParams,
7099
- ls as DataTableSortRequestParams,
7100
- gs as DateTimeProvider,
7115
+ us as DataTableSortRequestParams,
7116
+ ms as DateTimeProvider,
7101
7117
  tt as DeletableNamedIdentity,
7102
7118
  ue as DeliveryAddress,
7103
7119
  F as DeliveryType,
7104
- Bt as DetailedJwtPayload,
7120
+ zt as DetailedJwtPayload,
7105
7121
  Yr as DeviceTypeResolutionConfig,
7106
7122
  nt as DiscountShortInfo,
7107
- bs as FieldValidationResultData,
7123
+ Ss as FieldValidationResultData,
7108
7124
  M as FilterGroup,
7109
7125
  Xe as FilterItem,
7110
7126
  Je as FilterOpEnum,
@@ -7118,91 +7134,92 @@ export {
7118
7134
  j as JwtPayload,
7119
7135
  Pe as Manager,
7120
7136
  Be as ManagerCommon,
7121
- fs as ManagerDataFactory,
7137
+ ys as ManagerDataFactory,
7122
7138
  At as ManagerDataProvider,
7123
- kt as MetaTagItem,
7139
+ Lt as MetaTagItem,
7124
7140
  b as NamedIdentity,
7125
- ar as Operator,
7141
+ Cr as Operator,
7126
7142
  B as Opf,
7127
7143
  U as OpfEnum,
7128
7144
  I as Order,
7129
7145
  $t as OrderAction,
7130
- ys as OrderEditorData,
7146
+ ws as OrderEditorData,
7131
7147
  Ir as OrderInfo,
7132
- bt as OrderItem,
7148
+ St as OrderItem,
7133
7149
  mr as OrderItemBase,
7134
7150
  yt as OrderPaymentStatus,
7135
7151
  Sr as OrderShortInfo,
7136
7152
  $e as OrderStatus,
7153
+ bt as OrderStatusDetailEnum,
7137
7154
  Tt as OrderStatusEnum,
7138
- St as OrderStatusHistoryInfo,
7155
+ dt as OrderStatusHistoryInfo,
7139
7156
  Cs as OrdersDataProvider,
7140
- vs as OrdersListFilters,
7157
+ as as OrdersListFilters,
7141
7158
  br as PaginationFiltersBase,
7142
7159
  ee as PartnerGroup,
7143
7160
  Rr as PaymentType,
7144
7161
  ve as PreferencesStorageProvider,
7145
7162
  Le as PriceAnalyze,
7146
- as as PriceAnalyzeProvider,
7163
+ Rs as PriceAnalyzeProvider,
7147
7164
  Re as PriceCoefficient,
7148
7165
  hr as PriceCoefficientEnum,
7149
- Rs as PriceHistoryDataProvider,
7150
- dt as PriceHistoryItem,
7166
+ Ps as PriceHistoryDataProvider,
7167
+ It as PriceHistoryItem,
7151
7168
  Q as PriceTemplate,
7152
7169
  de as PriceTemplateCategory,
7153
7170
  oe as PriceTemplateClient,
7154
7171
  yr as PriceTemplateICatalogableItem,
7155
7172
  Ie as PriceTemplateProduct,
7156
- es as PriceTemplateProvider,
7173
+ rs as PriceTemplateProvider,
7157
7174
  le as PricingRole,
7158
- rs as PricingRoleProvider,
7175
+ ts as PricingRoleProvider,
7159
7176
  qe as PrimaryCatalogableItem,
7160
7177
  L as Product,
7161
- Qt as ProductCategoryDataProvider,
7162
- Yt as ProductDataProvider,
7178
+ Yt as ProductCategoryDataProvider,
7179
+ Xt as ProductDataProvider,
7163
7180
  wt as ProductFileType,
7164
7181
  Ge as ProductPriceCoefficient,
7165
- It as ProductPriceHistory,
7182
+ kt as ProductPriceHistory,
7166
7183
  Qe as ProductUnit,
7167
- ts as PropertiesProvider,
7184
+ ss as PropertiesProvider,
7168
7185
  ce as Property,
7169
7186
  vr as PropertyType,
7170
7187
  ut as PropertyTypeEnum,
7171
7188
  K as PropertyValue,
7172
- Ps as RecommendationsDataProvider,
7189
+ Ds as RecommendationsDataProvider,
7173
7190
  sr as RecommendationsList,
7174
7191
  w as Reference,
7175
- ns as ReferenceDataFactory,
7192
+ os as ReferenceDataFactory,
7176
7193
  T as ReferenceDataProvider,
7177
7194
  ge as Region,
7178
7195
  Pr as ResourceType,
7179
7196
  q as SalesDirection,
7180
7197
  Zr as SentryConfig,
7181
7198
  ir as Seo,
7182
- Ds as SeoDataProvider,
7199
+ As as SeoDataProvider,
7183
7200
  Dr as SourcePrimaryInterest,
7184
7201
  ot as StockCount,
7185
- ss as TemplateProductCategoryDataProvider,
7186
- Jt as TemplatesListFilters,
7202
+ is as TemplateProductCategoryDataProvider,
7203
+ Et as TemplatesListFilters,
7187
7204
  je as TypedInstanceFactory,
7188
7205
  dr as UnitsHelper,
7189
- us as UnknownClientDataProvider,
7206
+ ps as UnknownClientDataProvider,
7190
7207
  ur as UpdatableNamedIdentity,
7191
- _t as User,
7192
- $s as UserAuthDataProvider,
7208
+ xt as User,
7209
+ Ts as UserAuthDataProvider,
7193
7210
  wr as UserCommonInfo,
7194
- xt as UserDataProvider,
7211
+ Ot as UserDataProvider,
7195
7212
  pt as UserPricingRole,
7196
7213
  _ as UserShortInfo,
7197
- Lt as UserTypeEnum,
7198
- ps as VersionConfig,
7214
+ _t as UserTypeEnum,
7215
+ hs as VersionConfig,
7199
7216
  ye as Warehouse,
7200
7217
  et as WebSocketConfig,
7201
7218
  Ze as findCatalogItemByIdRecursive,
7202
7219
  er as flattenCatalogItems,
7203
- ms as pluralize,
7220
+ fs as pluralize,
7204
7221
  Se as useAuthStateStore,
7205
7222
  d as useBaseConfigStateStore,
7206
- ws as useReferencesStore,
7207
- Ts as useUserStateStore
7223
+ vs as useReferencesStore,
7224
+ bs as useUserStateStore
7208
7225
  };