@snabcentr/common-lib 4.0.1 → 4.2.0-dev

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 (130) hide show
  1. package/dist/manifest.json +1 -1
  2. package/dist/sc-common-lib.js +664 -549
  3. package/dist/sc-common-lib.js.map +1 -1
  4. package/dist/sc-common-lib.umd.cjs +1 -1
  5. package/dist/sc-common-lib.umd.cjs.map +1 -1
  6. package/dist/src/blog/providers/blog-provider.d.ts +1 -5
  7. package/dist/src/blog/providers/blog-provider.d.ts.map +1 -1
  8. package/dist/src/catalog/providers/client-product-data-provider.d.ts +1 -3
  9. package/dist/src/catalog/providers/client-product-data-provider.d.ts.map +1 -1
  10. package/dist/src/catalog/providers/price-template-provider.d.ts +1 -5
  11. package/dist/src/catalog/providers/price-template-provider.d.ts.map +1 -1
  12. package/dist/src/catalog/providers/product-data-provider.d.ts +1 -3
  13. package/dist/src/catalog/providers/product-data-provider.d.ts.map +1 -1
  14. package/dist/src/catalog/providers/properties-provider.d.ts +1 -5
  15. package/dist/src/catalog/providers/properties-provider.d.ts.map +1 -1
  16. package/dist/src/clients/classes/client-base-info.d.ts +22 -0
  17. package/dist/src/clients/classes/client-base-info.d.ts.map +1 -0
  18. package/dist/src/clients/classes/index.d.ts +1 -0
  19. package/dist/src/clients/classes/index.d.ts.map +1 -1
  20. package/dist/src/clients/interfaces/i-client-base-info.d.ts +15 -0
  21. package/dist/src/clients/interfaces/i-client-base-info.d.ts.map +1 -0
  22. package/dist/src/clients/interfaces/index.d.ts +1 -0
  23. package/dist/src/clients/interfaces/index.d.ts.map +1 -1
  24. package/dist/src/clients/providers/client-data-provider.d.ts +1 -5
  25. package/dist/src/clients/providers/client-data-provider.d.ts.map +1 -1
  26. package/dist/src/discounts/classes/discount-client.d.ts +2 -16
  27. package/dist/src/discounts/classes/discount-client.d.ts.map +1 -1
  28. package/dist/src/discounts/interfaces/i-discount-client.d.ts +2 -10
  29. package/dist/src/discounts/interfaces/i-discount-client.d.ts.map +1 -1
  30. package/dist/src/discounts/providers/discount-provider.d.ts +1 -5
  31. package/dist/src/discounts/providers/discount-provider.d.ts.map +1 -1
  32. package/dist/src/faq/providers/faq-provider.d.ts +1 -3
  33. package/dist/src/faq/providers/faq-provider.d.ts.map +1 -1
  34. package/dist/src/index.d.ts +1 -0
  35. package/dist/src/index.d.ts.map +1 -1
  36. package/dist/src/managers/classes/index.d.ts +1 -0
  37. package/dist/src/managers/classes/index.d.ts.map +1 -1
  38. package/dist/src/managers/classes/managers-list-filters.d.ts +47 -0
  39. package/dist/src/managers/classes/managers-list-filters.d.ts.map +1 -0
  40. package/dist/src/managers/index.d.ts +1 -0
  41. package/dist/src/managers/index.d.ts.map +1 -1
  42. package/dist/src/managers/interfaces/i-manager-save-data.d.ts +18 -0
  43. package/dist/src/managers/interfaces/i-manager-save-data.d.ts.map +1 -0
  44. package/dist/src/managers/interfaces/i-managers-list-filters.d.ts +36 -0
  45. package/dist/src/managers/interfaces/i-managers-list-filters.d.ts.map +1 -0
  46. package/dist/src/managers/interfaces/index.d.ts +2 -0
  47. package/dist/src/managers/interfaces/index.d.ts.map +1 -1
  48. package/dist/src/managers/providers/index.d.ts +2 -0
  49. package/dist/src/managers/providers/index.d.ts.map +1 -0
  50. package/dist/src/managers/providers/manager-provider.d.ts +63 -0
  51. package/dist/src/managers/providers/manager-provider.d.ts.map +1 -0
  52. package/dist/src/offers/providers/offers-data-provider.d.ts +1 -5
  53. package/dist/src/offers/providers/offers-data-provider.d.ts.map +1 -1
  54. package/dist/src/orders/providers/orders-data-provider.d.ts +1 -5
  55. package/dist/src/orders/providers/orders-data-provider.d.ts.map +1 -1
  56. package/dist/src/pagination/index.d.ts +0 -1
  57. package/dist/src/pagination/index.d.ts.map +1 -1
  58. package/dist/src/reclamations/classes/index.d.ts +5 -0
  59. package/dist/src/reclamations/classes/index.d.ts.map +1 -0
  60. package/dist/src/reclamations/classes/reclamation-item.d.ts +39 -0
  61. package/dist/src/reclamations/classes/reclamation-item.d.ts.map +1 -0
  62. package/dist/src/reclamations/classes/reclamation-short-info.d.ts +55 -0
  63. package/dist/src/reclamations/classes/reclamation-short-info.d.ts.map +1 -0
  64. package/dist/src/reclamations/classes/reclamation.d.ts +26 -0
  65. package/dist/src/reclamations/classes/reclamation.d.ts.map +1 -0
  66. package/dist/src/reclamations/classes/reclamations-list-filters.d.ts +55 -0
  67. package/dist/src/reclamations/classes/reclamations-list-filters.d.ts.map +1 -0
  68. package/dist/src/reclamations/enums/index.d.ts +2 -0
  69. package/dist/src/reclamations/enums/index.d.ts.map +1 -0
  70. package/dist/src/reclamations/enums/reclamation-status-enum.d.ts +22 -0
  71. package/dist/src/reclamations/enums/reclamation-status-enum.d.ts.map +1 -0
  72. package/dist/src/reclamations/helpers/index.d.ts +2 -0
  73. package/dist/src/reclamations/helpers/index.d.ts.map +1 -0
  74. package/dist/src/reclamations/helpers/reclamation-status-helper.d.ts +23 -0
  75. package/dist/src/reclamations/helpers/reclamation-status-helper.d.ts.map +1 -0
  76. package/dist/src/reclamations/index.d.ts +6 -0
  77. package/dist/src/reclamations/index.d.ts.map +1 -0
  78. package/dist/src/reclamations/interfaces/i-reclamation-item.d.ts +25 -0
  79. package/dist/src/reclamations/interfaces/i-reclamation-item.d.ts.map +1 -0
  80. package/dist/src/reclamations/interfaces/i-reclamation-message-save-data.d.ts +20 -0
  81. package/dist/src/reclamations/interfaces/i-reclamation-message-save-data.d.ts.map +1 -0
  82. package/dist/src/reclamations/interfaces/i-reclamation-short-info.d.ts +29 -0
  83. package/dist/src/reclamations/interfaces/i-reclamation-short-info.d.ts.map +1 -0
  84. package/dist/src/reclamations/interfaces/i-reclamation.d.ts +12 -0
  85. package/dist/src/reclamations/interfaces/i-reclamation.d.ts.map +1 -0
  86. package/dist/src/reclamations/interfaces/i-reclamations-list-filters.d.ts +44 -0
  87. package/dist/src/reclamations/interfaces/i-reclamations-list-filters.d.ts.map +1 -0
  88. package/dist/src/reclamations/interfaces/i-reclamations-updates.d.ts +10 -0
  89. package/dist/src/reclamations/interfaces/i-reclamations-updates.d.ts.map +1 -0
  90. package/dist/src/reclamations/interfaces/index.d.ts +7 -0
  91. package/dist/src/reclamations/interfaces/index.d.ts.map +1 -0
  92. package/dist/src/reclamations/providers/index.d.ts +2 -0
  93. package/dist/src/reclamations/providers/index.d.ts.map +1 -0
  94. package/dist/src/reclamations/providers/reclamation-provider.d.ts +79 -0
  95. package/dist/src/reclamations/providers/reclamation-provider.d.ts.map +1 -0
  96. package/dist/src/table-data/classes/index.d.ts +0 -2
  97. package/dist/src/table-data/classes/index.d.ts.map +1 -1
  98. package/dist/src/table-data/classes/table-data-pagination-request-params.d.ts +1 -1
  99. package/dist/src/table-data/classes/table-data-pagination-request-params.d.ts.map +1 -1
  100. package/dist/src/table-data/classes/table-data-sort-request-params.d.ts +1 -1
  101. package/dist/src/table-data/classes/table-data-sort-request-params.d.ts.map +1 -1
  102. package/dist/src/table-data/index.d.ts +0 -1
  103. package/dist/src/table-data/index.d.ts.map +1 -1
  104. package/dist/src/table-data/interfaces/i-pagination.d.ts +1 -1
  105. package/dist/src/table-data/interfaces/i-pagination.d.ts.map +1 -1
  106. package/dist/src/table-data/interfaces/index.d.ts +0 -4
  107. package/dist/src/table-data/interfaces/index.d.ts.map +1 -1
  108. package/dist/src/user-regions/providers/user-region-provider.d.ts +1 -5
  109. package/dist/src/user-regions/providers/user-region-provider.d.ts.map +1 -1
  110. package/package.json +2 -2
  111. package/dist/src/pagination/providers/base-pagination-provider.d.ts +0 -37
  112. package/dist/src/pagination/providers/base-pagination-provider.d.ts.map +0 -1
  113. package/dist/src/pagination/providers/index.d.ts +0 -2
  114. package/dist/src/pagination/providers/index.d.ts.map +0 -1
  115. package/dist/src/table-data/classes/filter-group.d.ts +0 -32
  116. package/dist/src/table-data/classes/filter-group.d.ts.map +0 -1
  117. package/dist/src/table-data/classes/filter-item.d.ts +0 -33
  118. package/dist/src/table-data/classes/filter-item.d.ts.map +0 -1
  119. package/dist/src/table-data/enums/filter-op-enum.d.ts +0 -74
  120. package/dist/src/table-data/enums/filter-op-enum.d.ts.map +0 -1
  121. package/dist/src/table-data/enums/index.d.ts +0 -2
  122. package/dist/src/table-data/enums/index.d.ts.map +0 -1
  123. package/dist/src/table-data/interfaces/i-filter-group.d.ts +0 -19
  124. package/dist/src/table-data/interfaces/i-filter-group.d.ts.map +0 -1
  125. package/dist/src/table-data/interfaces/i-filter-item.d.ts +0 -20
  126. package/dist/src/table-data/interfaces/i-filter-item.d.ts.map +0 -1
  127. package/dist/src/table-data/interfaces/i-pagination-request-params.d.ts +0 -14
  128. package/dist/src/table-data/interfaces/i-pagination-request-params.d.ts.map +0 -1
  129. package/dist/src/table-data/interfaces/i-sort-request-params.d.ts +0 -14
  130. package/dist/src/table-data/interfaces/i-sort-request-params.d.ts.map +0 -1
@@ -1,41 +1,41 @@
1
- import { ChannelPrimaryInterest as e, CityWithRegionAndCountry as t, ContactLinks as n, Country as r, CuratedDirection as i, Currency as a, DateHelper as o, DeliveryType as s, FieldValidationResultData as c, GeoCoordinates as ee, HttpRequester as l, Identity as u, Manager as te, ManagerCommon as ne, NamedIdentity as d, Operator as re, Opf as ie, OpfEnum as f, OrderStatus as ae, PartnerGroup as p, PaymentType as oe, PriceCoefficient as se, PropertyType as ce, Reference as le, Region as ue, ResourceType as de, SalesDirection as m, SourcePrimaryInterest as fe, TypedInstanceFactory as h, UpdatableNamedIdentity as pe, UserCommonInfo as me, UserRegionShortInfo as he, Warehouse as ge, useBaseConfigStore as g } from "@snabcentr/common-core";
2
- import { addBusinessDays as _e, addDays as _, addMonths as v, addQuarters as ve, addWeeks as ye, addYears as be, differenceInCalendarDays as xe, differenceInCalendarMonths as Se, endOfDay as y, endOfMonth as b, endOfQuarter as Ce, endOfToday as we, endOfTomorrow as Te, endOfWeek as x, endOfYear as Ee, endOfYesterday as De, format as S, getDate as Oe, getDaysInMonth as ke, parseISO as C, setDate as Ae, startOfDay as w, startOfMonth as T, startOfQuarter as je, startOfToday as Me, startOfTomorrow as Ne, startOfWeek as E, startOfYear as D, startOfYesterday as Pe, subDays as Fe, subMonths as Ie, subQuarters as Le, subWeeks as Re, subYears as ze } from "date-fns";
3
- import { cloneDeep as Be, endsWith as Ve, forEach as He, includes as Ue, isArray as O, isDate as We, isEmpty as Ge, isFunction as Ke, isNil as k, isObject as qe, isPlainObject as Je, isString as A, isUndefined as Ye, map as j, merge as Xe, omitBy as Ze, round as Qe, some as $e, startsWith as et, toUpper as tt } from "lodash-es";
1
+ import { BasePaginationProvider as e, ChannelPrimaryInterest as t, CityWithRegionAndCountry as n, ContactLinks as r, Country as i, CuratedDirection as a, Currency as o, DateHelper as s, DeliveryType as c, FieldValidationResultData as ee, FilterGroup as l, FilterOpEnum as te, GeoCoordinates as ne, HttpRequester as u, Identity as d, Manager as f, ManagerCommon as re, ManagerDataProvider as ie, NamedIdentity as p, Operator as ae, Opf as oe, OpfEnum as m, OrderStatus as se, PartnerGroup as h, PaymentType as ce, PriceCoefficient as le, PropertyType as ue, Reference as de, Region as fe, ResourceType as pe, SalesDirection as g, SourcePrimaryInterest as me, TypedInstanceFactory as _, UpdatableNamedIdentity as he, UserCommonInfo as ge, UserRegionShortInfo as _e, Warehouse as ve, useBaseConfigStore as v } from "@snabcentr/common-core";
2
+ import { addBusinessDays as ye, addDays as y, addMonths as b, addQuarters as be, addWeeks as xe, addYears as Se, differenceInCalendarDays as Ce, differenceInCalendarMonths as we, endOfDay as x, endOfMonth as S, endOfQuarter as Te, endOfToday as Ee, endOfTomorrow as De, endOfWeek as Oe, endOfYear as ke, endOfYesterday as Ae, format as C, getDate as je, getDaysInMonth as Me, parseISO as w, setDate as Ne, startOfDay as T, startOfMonth as E, startOfQuarter as Pe, startOfToday as Fe, startOfTomorrow as Ie, startOfWeek as D, startOfYear as O, startOfYesterday as Le, subDays as Re, subMonths as ze, subQuarters as Be, subWeeks as Ve, subYears as He } from "date-fns";
3
+ import { cloneDeep as Ue, endsWith as We, forEach as Ge, includes as Ke, isArray as qe, isDate as Je, isEmpty as Ye, isFunction as Xe, isNil as k, isObject as Ze, isString as A, isUndefined as Qe, map as j, merge as $e, omitBy as et, round as tt, some as nt, startsWith as rt, toUpper as it } from "lodash-es";
4
4
  export * from "@snabcentr/common-core";
5
5
  //#region src/blog/enums/blog-post-media-type-enum.ts
6
- var nt = /* @__PURE__ */ function(e) {
6
+ var at = /* @__PURE__ */ function(e) {
7
7
  return e.Image = "image", e.Video = "video", e;
8
- }({}), rt = class extends u {
8
+ }({}), ot = class extends d {
9
9
  mediaType;
10
10
  isCover;
11
11
  isUnused;
12
12
  url;
13
13
  urlWebp;
14
14
  constructor(e) {
15
- super(e, ""), this.mediaType = e?.mediaType ?? nt.Image, this.isCover = e?.isCover ?? !1, this.isUnused = e?.isUnused ?? !1, this.url = e?.url ?? "", this.urlWebp = e?.urlWebp;
15
+ super(e, ""), this.mediaType = e?.mediaType ?? at.Image, this.isCover = e?.isCover ?? !1, this.isUnused = e?.isUnused ?? !1, this.url = e?.url ?? "", this.urlWebp = e?.urlWebp;
16
16
  }
17
17
  isImage() {
18
- return this.mediaType === nt.Image;
18
+ return this.mediaType === at.Image;
19
19
  }
20
20
  isVideo() {
21
- return this.mediaType === nt.Video;
21
+ return this.mediaType === at.Video;
22
22
  }
23
- }, it = /* @__PURE__ */ function(e) {
23
+ }, st = /* @__PURE__ */ function(e) {
24
24
  return e.Draft = "draft", e.Published = "published", e.Scheduled = "scheduled", e;
25
- }({}), M = class extends u {
25
+ }({}), M = class extends d {
26
26
  createdAt;
27
27
  constructor(e, t) {
28
- super(e, t), this.createdAt = o.parse(e?.createdAt) ?? /* @__PURE__ */ new Date();
28
+ super(e, t), this.createdAt = s.parse(e?.createdAt) ?? /* @__PURE__ */ new Date();
29
29
  }
30
- }, at = class e extends M {
30
+ }, ct = class e extends M {
31
31
  static resolvePublicationStatus(e) {
32
- return k(e) ? it.Draft : e.getTime() > Date.now() ? it.Scheduled : it.Published;
32
+ return k(e) ? st.Draft : e.getTime() > Date.now() ? st.Scheduled : st.Published;
33
33
  }
34
34
  static getSlugError(e) {
35
- return e ? /[^a-z0-9-]/.test(e) ? "Допустимы только строчные латинские буквы, цифры и дефис: пример «kak-vybrat-podokonnik»." : et(e, "-") || Ve(e, "-") ? "Обозначение не может начинаться или заканчиваться дефисом." : Ue(e, "--") ? "Дефисы не могут идти подряд: разделяйте слова одним дефисом." : "" : "";
35
+ return e ? /[^a-z0-9-]/.test(e) ? "Допустимы только строчные латинские буквы, цифры и дефис: пример «kak-vybrat-podokonnik»." : rt(e, "-") || We(e, "-") ? "Обозначение не может начинаться или заканчиваться дефисом." : Ke(e, "--") ? "Дефисы не могут идти подряд: разделяйте слова одним дефисом." : "" : "";
36
36
  }
37
37
  static parseDate(e) {
38
- return k(e) ? null : A(e) ? C(e) : e;
38
+ return k(e) ? null : A(e) ? w(e) : e;
39
39
  }
40
40
  slug;
41
41
  title;
@@ -46,11 +46,11 @@ var nt = /* @__PURE__ */ function(e) {
46
46
  getPublicationStatus() {
47
47
  return e.resolvePublicationStatus(this.publishedAt);
48
48
  }
49
- }, ot = class extends at {
49
+ }, lt = class extends ct {
50
50
  content;
51
51
  media;
52
52
  constructor(e) {
53
- super(e), this.content = e?.content ?? "", this.media = (e?.media ?? []).map((e) => new rt(e));
53
+ super(e), this.content = e?.content ?? "", this.media = (e?.media ?? []).map((e) => new ot(e));
54
54
  }
55
55
  toSaveData(e = !1) {
56
56
  return {
@@ -71,16 +71,16 @@ var nt = /* @__PURE__ */ function(e) {
71
71
  let e = {};
72
72
  return Object.keys(this).forEach((t) => {
73
73
  let n = this[t];
74
- k(n) || A(n) && n.trim().length === 0 || Ke(n.isNewRec) && n.isNewRec() || (e[t] = n);
74
+ k(n) || A(n) && n.trim().length === 0 || Xe(n.isNewRec) && n.isNewRec() || (e[t] = n);
75
75
  }), e;
76
76
  }
77
77
  }, P = class {
78
78
  from;
79
79
  to;
80
80
  constructor(e) {
81
- this.from = A(e?.from) ? C(e.from) : e?.from ?? null, this.to = A(e?.to) ? C(e.to) : e?.to ?? null;
81
+ this.from = A(e?.from) ? w(e.from) : e?.from ?? null, this.to = A(e?.to) ? w(e.to) : e?.to ?? null;
82
82
  }
83
- }, st = class extends N {
83
+ }, ut = class extends N {
84
84
  id;
85
85
  title;
86
86
  slug;
@@ -111,84 +111,29 @@ var nt = /* @__PURE__ */ function(e) {
111
111
  let e = super.asClearRaw();
112
112
  return !e?.publishedAt?.from && !e?.publishedAt?.to && delete e.publishedAt, !e?.createdAt?.from && !e?.createdAt?.to && delete e.createdAt, e;
113
113
  }
114
- }, ct = /* @__PURE__ */ function(e) {
115
- return e.BeginWith = "bw", e.Contains = "cn", e.Custom = "custom", e.EndsWith = "ew", e.Equals = "eq", e.GreaterOrEqual = "ge", e.GreaterThan = "gt", e.InList = "in", e.LessOrEqual = "le", e.LessThan = "lt", e.NotBeginWith = "bn", e.NotContains = "nc", e.NotEndsWith = "en", e.NotEqual = "ne", e.NotInList = "ni", e.NotNull = "nn", e.Null = "nu", e;
116
- }({}), lt = class {
117
- field;
118
- op;
119
- value;
120
- constructor(e) {
121
- this.field = e?.field ?? "", this.op = e?.op ?? ct.Equals, this.value = e?.value ?? "";
122
- }
123
- toPrimitive() {
124
- let e = g().config.dateFormats.api, t = {
125
- field: this.field,
126
- op: this.op
127
- };
128
- if (We(this.value)) t.value = S(this.value, e);
129
- else if (Je(this.value)) {
130
- let n = this.value;
131
- t.value = {
132
- from: n.from ? S(n.from, e) : null,
133
- to: n.to ? S(n.to, e) : null
134
- };
135
- } else t.value = this.value;
136
- return t;
137
- }
138
- }, ut = class e {
139
- groupOp;
140
- filters;
141
- groups;
142
- constructor(t) {
143
- this.groupOp = t?.groupOp ?? "and", this.filters = t?.filters?.map((e) => new lt(e)) ?? [], this.groups = t?.groups?.map((t) => new e(t)) ?? [];
144
- }
145
- toPrimitive() {
146
- return {
147
- groupOp: this.groupOp,
148
- filters: this.filters.map((e) => e instanceof lt && Ke(e.toPrimitive) ? e.toPrimitive() : e),
149
- groups: this.groups.map((t) => t instanceof e ? t.toPrimitive() : t)
150
- };
151
- }
152
- }, F = class extends l {
153
- getPaginated(e, t, n, r, i, a, o, s) {
154
- let c = {
155
- page: r?.page ?? 1,
156
- perPage: r?.pageSize ?? 10
157
- };
158
- return t && (c.filters = JSON.stringify((t instanceof ut ? t : new ut(t)).toPrimitive())), Ge(n) || (c.sort = O(n) ? n : [n]), i && (c = {
159
- ...c,
160
- ...i
161
- }), this.get(e, c, a, o, s);
162
- }
163
- getTypedPaginated(e, t, n, r, i, a, o, s) {
164
- return this.getPaginated(t, n, r, i, a, (t) => ({
165
- ...t.data,
166
- data: h.instanceListInitializer(e, t.data.data)
167
- }), o, s);
168
- }
169
- }, dt = class e extends F {
114
+ }, dt = class t extends e {
170
115
  static preparePostSaveData(e) {
171
116
  let t = {};
172
- if (Ye(e.title) || (t.title = e.title), Ye(e.slug) || (t.slug = e.slug), Ye(e.content) || (t.content = e.content), !Ye(e.publishedAt)) {
173
- let n = g().config.dateFormats.api;
174
- t.publishedAt = k(e.publishedAt) ? null : S(e.publishedAt, n);
117
+ if (Qe(e.title) || (t.title = e.title), Qe(e.slug) || (t.slug = e.slug), Qe(e.content) || (t.content = e.content), !Qe(e.publishedAt)) {
118
+ let n = v().config.dateFormats.api;
119
+ t.publishedAt = k(e.publishedAt) ? null : C(e.publishedAt, n);
175
120
  }
176
121
  return t;
177
122
  }
178
123
  getPostList(e, t, n) {
179
124
  return this.getPaginated("/internal/blog", e, t, n, {}, (e) => ({
180
125
  ...e.data,
181
- data: e.data.data.map((e) => new at(e))
126
+ data: e.data.data.map((e) => new ct(e))
182
127
  }));
183
128
  }
184
129
  getPost(e) {
185
- return this.get(`/internal/blog/${e}`, {}, (e) => new ot(e.data));
130
+ return this.get(`/internal/blog/${e}`, {}, (e) => new lt(e.data));
186
131
  }
187
- createPost(t, n = {}) {
188
- return this.post("/internal/blog", e.preparePostSaveData(t), (e) => new ot(e.data), n);
132
+ createPost(e, n = {}) {
133
+ return this.post("/internal/blog", t.preparePostSaveData(e), (e) => new lt(e.data), n);
189
134
  }
190
- updatePost(t, n, r = {}) {
191
- return this.patch(`/internal/blog/${t}`, e.preparePostSaveData(n), (e) => new ot(e.data), r);
135
+ updatePost(e, n, r = {}) {
136
+ return this.patch(`/internal/blog/${e}`, t.preparePostSaveData(n), (e) => new lt(e.data), r);
192
137
  }
193
138
  removePost(e) {
194
139
  return this.delete(`/internal/blog/${e}`);
@@ -204,20 +149,20 @@ var nt = /* @__PURE__ */ function(e) {
204
149
  onUploadProgress: (e) => {
205
150
  r && r(e.total ? Math.round(e.loaded / e.total * 100) : 0);
206
151
  }
207
- }, (e) => new rt(e.data), i);
152
+ }, (e) => new ot(e.data), i);
208
153
  }
209
154
  updateMedia(e, t, n, r = {}) {
210
- return this.patch(`/internal/blog/${e}/media/${t}`, { isCover: n }, (e) => new rt(e.data), r);
155
+ return this.patch(`/internal/blog/${e}/media/${t}`, { isCover: n }, (e) => new ot(e.data), r);
211
156
  }
212
157
  removeMedia(e, t) {
213
158
  return this.delete(`/internal/blog/${e}/media/${t}`);
214
159
  }
215
- }, ft = class extends pe {
160
+ }, ft = class extends he {
216
161
  deletedAt;
217
162
  constructor(e) {
218
- super(e), this.deletedAt = o.parse(e?.deletedAt);
163
+ super(e), this.deletedAt = s.parse(e?.deletedAt);
219
164
  }
220
- }, I = class extends d {
165
+ }, F = class extends p {
221
166
  type;
222
167
  isActive;
223
168
  constructor(e) {
@@ -231,13 +176,13 @@ var nt = /* @__PURE__ */ function(e) {
231
176
  percent;
232
177
  owner;
233
178
  constructor(e) {
234
- super(e), this.costCoefficient = e?.costCoefficient ?? 0, this.isLowPriceAllowed = e?.isLowPriceAllowed ?? !1, this.publishedAt = o.parse(e?.publishedAt), this.description = e?.description ?? void 0, this.percent = e?.percent ?? 0, this.owner = new I(e?.owner);
179
+ super(e), this.costCoefficient = e?.costCoefficient ?? 0, this.isLowPriceAllowed = e?.isLowPriceAllowed ?? !1, this.publishedAt = s.parse(e?.publishedAt), this.description = e?.description ?? void 0, this.percent = e?.percent ?? 0, this.owner = new F(e?.owner);
235
180
  }
236
- }, L = class extends pe {
181
+ }, I = class extends he {
237
182
  description;
238
183
  owner;
239
184
  constructor(e) {
240
- super(e), this.description = e?.description ?? "", this.owner = e?.owner ? new I(e.owner) : void 0;
185
+ super(e), this.description = e?.description ?? "", this.owner = e?.owner ? new F(e.owner) : void 0;
241
186
  }
242
187
  }, mt = class {
243
188
  coefficient;
@@ -246,15 +191,15 @@ var nt = /* @__PURE__ */ function(e) {
246
191
  percent;
247
192
  readOnly;
248
193
  constructor(e) {
249
- this.coefficient = new se(e?.coefficient), this.value = e?.value ?? 0, this.cost = e?.cost ?? 0, this.percent = e?.percent ?? 0, this.readOnly = e?.readOnly ?? !0;
194
+ this.coefficient = new le(e?.coefficient), this.value = e?.value ?? 0, this.cost = e?.cost ?? 0, this.percent = e?.percent ?? 0, this.readOnly = e?.readOnly ?? !0;
250
195
  }
251
196
  }, ht = class {
252
197
  warehouse;
253
198
  count;
254
199
  constructor(e) {
255
- this.warehouse = new ge(e?.warehouse), this.count = e?.count ?? 0;
200
+ this.warehouse = new ve(e?.warehouse), this.count = e?.count ?? 0;
256
201
  }
257
- }, gt = class extends d {
202
+ }, gt = class extends p {
258
203
  slug = "";
259
204
  description;
260
205
  isSquare = !1;
@@ -262,12 +207,12 @@ var nt = /* @__PURE__ */ function(e) {
262
207
  constructor(e) {
263
208
  super(e), e && (this.slug = e.slug ?? "", this.description = e.description, this.isSquare = e.isSquare ?? !1, this.isLinear = e.isLinear ?? !1);
264
209
  }
265
- }, R = class extends d {
210
+ }, L = class extends p {
266
211
  code = "";
267
212
  constructor(e) {
268
213
  super(e), this.code = e?.code ?? "";
269
214
  }
270
- }, _t = class extends R {
215
+ }, _t = class extends L {
271
216
  slug;
272
217
  type;
273
218
  constructor(e) {
@@ -290,7 +235,7 @@ var nt = /* @__PURE__ */ function(e) {
290
235
  constructor(e) {
291
236
  super(e), this.isPrimary = e?.isPrimary ?? !1;
292
237
  }
293
- }, z = class extends vt {
238
+ }, R = class extends vt {
294
239
  supplierSku;
295
240
  unit;
296
241
  pack;
@@ -309,12 +254,12 @@ var nt = /* @__PURE__ */ function(e) {
309
254
  retailCostRub;
310
255
  priceCoefficients;
311
256
  constructor(e) {
312
- super(e), this.supplierSku = e?.supplierSku, this.unit = e?.unit ? new gt(e.unit) : new gt(), this.pack = e?.pack, this.minCount = e?.minCount, this.currency = e?.currency ? new a(e.currency) : new a(), this.cost = e?.cost ?? 0, this.costRub = e?.costRub ?? 0, this.costDate = A(e?.costDate) ? C(e.costDate) : e?.costDate, this.onOrder = e?.onOrder ?? !1, this.stockCount = e?.stockCount?.map((e) => new ht(e)) ?? [], this.type = "product";
257
+ super(e), this.supplierSku = e?.supplierSku, this.unit = e?.unit ? new gt(e.unit) : new gt(), this.pack = e?.pack, this.minCount = e?.minCount, this.currency = e?.currency ? new o(e.currency) : new o(), this.cost = e?.cost ?? 0, this.costRub = e?.costRub ?? 0, this.costDate = A(e?.costDate) ? w(e.costDate) : e?.costDate, this.onOrder = e?.onOrder ?? !1, this.stockCount = e?.stockCount?.map((e) => new ht(e)) ?? [], this.type = "product";
313
258
  let t = e?.category ?? e?.categories?.find((e) => e.isPrimary);
314
259
  t && (this.category = new bt({
315
260
  ...t,
316
261
  isPrimary: !0
317
- }), this.categories = [this.category]), e?.categories && (this.categories = e.categories.map((e) => new bt(e))), this.images = e?.images?.map((e) => new yt(e, g().config.http.mediaUrl)) ?? [], this.properties = e?.properties ?? {}, this.retailCost = e?.retailCost, this.retailCostRub = e?.retailCostRub, this.priceCoefficients = e?.priceCoefficients?.map((e) => new mt(e)) ?? [], e && "codeNumber" in e && !e.code && (this.code = e?.codeNumber);
262
+ }), this.categories = [this.category]), e?.categories && (this.categories = e.categories.map((e) => new bt(e))), this.images = e?.images?.map((e) => new yt(e, v().config.http.mediaUrl)) ?? [], this.properties = e?.properties ?? {}, this.retailCost = e?.retailCost, this.retailCostRub = e?.retailCostRub, this.priceCoefficients = e?.priceCoefficients?.map((e) => new mt(e)) ?? [], e && "codeNumber" in e && !e.code && (this.code = e?.codeNumber);
318
263
  }
319
264
  getIsMeasurable() {
320
265
  return this.unit.isLinear || this.unit.isSquare;
@@ -327,7 +272,7 @@ var nt = /* @__PURE__ */ function(e) {
327
272
  }
328
273
  }, xt = /* @__PURE__ */ function(e) {
329
274
  return e.Discount = "discount", e.PriceTemplate = "price_template", e.ClientPrice = "client_price", e.Product = "product", e;
330
- }({}), B = class extends z {
275
+ }({}), z = class extends R {
331
276
  costCoefficient;
332
277
  costSource;
333
278
  discount;
@@ -338,17 +283,17 @@ var nt = /* @__PURE__ */ function(e) {
338
283
  isRequired;
339
284
  isFavorite;
340
285
  constructor(e) {
341
- super(e), this.costCoefficient = e?.costCoefficient ?? 0, this.costSource = e?.costSource ?? xt.Product, this.discount = e?.discount ? new pt(e.discount) : void 0, this.priceTemplate = e?.priceTemplate ? new L(e.priceTemplate) : void 0, this.priceCoefficient = e?.priceCoefficient ? new se(e.priceCoefficient) : void 0, this.increasePercent = e?.increasePercent, this.isPreviouslyOrdered = e?.isPreviouslyOrdered, this.isRequired = e?.isRequired, this.isFavorite = e?.isFavorite;
286
+ super(e), this.costCoefficient = e?.costCoefficient ?? 0, this.costSource = e?.costSource ?? xt.Product, this.discount = e?.discount ? new pt(e.discount) : void 0, this.priceTemplate = e?.priceTemplate ? new I(e.priceTemplate) : void 0, this.priceCoefficient = e?.priceCoefficient ? new le(e.priceCoefficient) : void 0, this.increasePercent = e?.increasePercent, this.isPreviouslyOrdered = e?.isPreviouslyOrdered, this.isRequired = e?.isRequired, this.isFavorite = e?.isFavorite;
342
287
  }
343
- }, V = class extends bt {
288
+ }, B = class extends bt {
344
289
  isHidden;
345
290
  parentCategoryId;
346
291
  properties;
347
292
  currencyRates;
348
293
  constructor(e) {
349
- super(e), this.isHidden = e?.isHidden ?? !1, this.parentCategoryId = e?.parentCategoryId, this.properties = e?.properties, this.type = "category", this.currencyRates = e?.currencyRates ? Object.fromEntries(Object.entries(e.currencyRates).map(([e, t]) => [tt(e), t])) : void 0;
294
+ super(e), this.isHidden = e?.isHidden ?? !1, this.parentCategoryId = e?.parentCategoryId, this.properties = e?.properties, this.type = "category", this.currencyRates = e?.currencyRates ? Object.fromEntries(Object.entries(e.currencyRates).map(([e, t]) => [it(e), t])) : void 0;
350
295
  }
351
- }, St = class extends u {
296
+ }, St = class extends d {
352
297
  category;
353
298
  product;
354
299
  quantity;
@@ -367,7 +312,7 @@ var nt = /* @__PURE__ */ function(e) {
367
312
  originalId;
368
313
  replacementId;
369
314
  constructor(e) {
370
- super(e), this.product = new B(e.product), this.quantity = e.quantity ?? 0, this.marker = e.marker, this.category = e.category ?? new V(), this.currency = e.currency ? new a(e.currency) : void 0, this.height = e.height, this.length = e.length, this.width = e.width, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams && Be(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;
315
+ super(e), this.product = new z(e.product), this.quantity = e.quantity ?? 0, this.marker = e.marker, this.category = e.category ?? new B(), this.currency = e.currency ? new o(e.currency) : void 0, this.height = e.height, this.length = e.length, this.width = e.width, this.configurator = e.configurator, this.configuratorParams = e.configuratorParams && Ue(e.configuratorParams), this.isAdditionalSale = e.isAdditionalSale, this.creator = e.creator && new F(e.creator), this.isRemoved = e.isRemoved, this.ord = e.ord, this.onOrder = e.onOrder, this.originalId = e.originalId, this.replacementId = e.replacementId;
371
316
  }
372
317
  }, Ct = class extends St {
373
318
  cost;
@@ -380,18 +325,18 @@ var nt = /* @__PURE__ */ function(e) {
380
325
  sawing;
381
326
  currency;
382
327
  constructor(e) {
383
- super(e), 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 = O(e.sawing) ? e.sawing : e.sawing ? [e.sawing] : void 0, this.currency = new a(e.currency);
328
+ super(e), 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 = qe(e.sawing) ? e.sawing : e.sawing ? [e.sawing] : void 0, this.currency = new o(e.currency);
384
329
  }
385
- }, H = class {
330
+ }, V = class {
386
331
  items;
387
332
  resultSum;
388
333
  directionsSum;
389
334
  constructor(e) {
390
335
  this.items = e.items.map((e) => new Ct(e)), this.resultSum = e.resultSum, this.directionsSum = e.directionsSum;
391
336
  }
392
- }, wt = class extends l {
337
+ }, wt = class extends u {
393
338
  getCart(e) {
394
- return this.get(`internal/clients/${e.id}/cart`, {}, (e) => new H(e.data));
339
+ return this.get(`internal/clients/${e.id}/cart`, {}, (e) => new V(e.data));
395
340
  }
396
341
  deleteCart(e) {
397
342
  return this.delete(`internal/clients/${e.id}/cart`);
@@ -408,7 +353,7 @@ var nt = /* @__PURE__ */ function(e) {
408
353
  marker: t.marker,
409
354
  is_additional_sale: t.isAdditionalSale,
410
355
  ...t.configuratorParams
411
- }, (e) => new H(e.data), n);
356
+ }, (e) => new V(e.data), n);
412
357
  }
413
358
  patchCartItem(e, t, n = {}) {
414
359
  return this.patch(`internal/clients/${e.id}/cart/${t.id}`, {
@@ -422,13 +367,13 @@ var nt = /* @__PURE__ */ function(e) {
422
367
  marker: t.marker,
423
368
  is_additional_sale: t.isAdditionalSale,
424
369
  ...t.configuratorParams
425
- }, (e) => new H(e.data), n);
370
+ }, (e) => new V(e.data), n);
426
371
  }
427
372
  deleteCartItem(e, t) {
428
- return this.delete(`internal/clients/${e.id}/cart/${t.id}`, (e) => new H(e.data));
373
+ return this.delete(`internal/clients/${e.id}/cart/${t.id}`, (e) => new V(e.data));
429
374
  }
430
375
  addCartItemFromCSV(e, t) {
431
- return this.post(`internal/clients/${e.id}/cart/add-products-from-csv`, t, (e) => new H(e.data));
376
+ return this.post(`internal/clients/${e.id}/cart/add-products-from-csv`, t, (e) => new V(e.data));
432
377
  }
433
378
  getCartItemFromCSVExample(e) {
434
379
  return this.get(`internal/clients/${e.id}/cart/add-products-from-csv/example`, {}, (e) => new Blob([e.data], { type: "text/csv" }));
@@ -437,32 +382,32 @@ var nt = /* @__PURE__ */ function(e) {
437
382
  return e.m2Cost = "m2Cost", e.percent = "percent", e.value = "value", e;
438
383
  }({}), Et = /* @__PURE__ */ function(e) {
439
384
  return e.Checkbox = "checkbox", e.Range = "range", e.Toggle = "toggle", e;
440
- }({}), U = class e extends V {
385
+ }({}), H = class e extends B {
441
386
  categories;
442
387
  products;
443
388
  constructor(t) {
444
- super(t), this.categories = t?.categories?.map((t) => new e(t)), this.products = t?.products?.map((e) => new z(e));
389
+ super(t), this.categories = t?.categories?.map((t) => new e(t)), this.products = t?.products?.map((e) => new R(e));
445
390
  }
446
- }, Dt = class extends V {
391
+ }, Dt = class extends B {
447
392
  isDisabled;
448
393
  isRequired;
449
394
  isFavorite;
450
395
  hidingComment;
451
396
  manager;
452
397
  constructor(e) {
453
- super(e), this.isDisabled = e?.isDisabled ?? !1, this.isRequired = e?.isRequired ?? !1, this.isFavorite = e?.isFavorite ?? !1, this.hidingComment = e?.hidingComment, this.manager = e?.manager ? new te(e.manager) : void 0;
398
+ super(e), this.isDisabled = e?.isDisabled ?? !1, this.isRequired = e?.isRequired ?? !1, this.isFavorite = e?.isFavorite ?? !1, this.hidingComment = e?.hidingComment, this.manager = e?.manager ? new f(e.manager) : void 0;
454
399
  }
455
400
  }, Ot = class e extends Dt {
456
401
  categories;
457
402
  products;
458
403
  constructor(t) {
459
- super(t), this.categories = t?.categories?.map((t) => new e(t)), this.products = t?.products?.map((e) => new B(e));
404
+ super(t), this.categories = t?.categories?.map((t) => new e(t)), this.products = t?.products?.map((e) => new z(e));
460
405
  }
461
406
  }, kt = class {
462
407
  priceCoefficient;
463
408
  increasePercent;
464
409
  constructor(e) {
465
- this.priceCoefficient = e?.priceCoefficient && new se(e.priceCoefficient), this.increasePercent = e?.increasePercent;
410
+ this.priceCoefficient = e?.priceCoefficient && new le(e.priceCoefficient), this.increasePercent = e?.increasePercent;
466
411
  }
467
412
  }, At = class extends kt {
468
413
  constructor(e) {
@@ -471,16 +416,16 @@ var nt = /* @__PURE__ */ function(e) {
471
416
  }, jt = class extends At {
472
417
  productCategory;
473
418
  constructor(e) {
474
- super(e), this.productCategory = new V(e?.productCategory);
419
+ super(e), this.productCategory = new B(e?.productCategory);
475
420
  }
476
- }, Mt = class extends d {
421
+ }, Mt = class extends p {
477
422
  photo;
478
423
  contacts;
479
424
  curatedDirection;
480
425
  constructor(e) {
481
- super(e), this.photo = e.photo, this.contacts = new n(e.contacts), this.curatedDirection = new i(e.curatedDirection);
426
+ super(e), this.photo = e.photo, this.contacts = new r(e.contacts), this.curatedDirection = new a(e.curatedDirection);
482
427
  }
483
- }, W = class extends me {
428
+ }, U = class extends ge {
484
429
  salesDirection;
485
430
  debt;
486
431
  alternativeName;
@@ -491,37 +436,37 @@ var nt = /* @__PURE__ */ function(e) {
491
436
  managers;
492
437
  curators;
493
438
  constructor(e) {
494
- super(e), this.salesDirection = new m(e?.salesDirection), this.debt = e?.debt ?? 0, this.alternativeName = e?.alternativeName ?? "", this.city = new t(e?.city), this.comment = e?.comment, this.isPhoneApproved = e?.isPhoneApproved ?? !1, this.isEmailApproved = e?.isEmailApproved ?? !1, this.managers = e?.managers?.map((e) => new ne(e)) ?? [], this.curators = e?.curators?.map((e) => new Mt(e)) ?? void 0;
439
+ super(e), this.salesDirection = new g(e?.salesDirection), this.debt = e?.debt ?? 0, this.alternativeName = e?.alternativeName ?? "", this.city = new n(e?.city), this.comment = e?.comment, this.isPhoneApproved = e?.isPhoneApproved ?? !1, this.isEmailApproved = e?.isEmailApproved ?? !1, this.managers = e?.managers?.map((e) => new re(e)) ?? [], this.curators = e?.curators?.map((e) => new Mt(e)) ?? void 0;
495
440
  }
496
441
  }, Nt = class extends M {
497
442
  deletedAt;
498
443
  constructor(e, t) {
499
- super(e, t), this.deletedAt = o.parse(e?.deletedAt);
444
+ super(e, t), this.deletedAt = s.parse(e?.deletedAt);
500
445
  }
501
- }, G = class extends Nt {
446
+ }, W = class extends Nt {
502
447
  client;
503
448
  priceTemplate;
504
449
  constructor(e) {
505
- super(e), this.client = new W(e?.client), this.priceTemplate = new L(e?.priceTemplate);
450
+ super(e), this.client = new U(e?.client), this.priceTemplate = new I(e?.priceTemplate);
506
451
  }
507
452
  }, Pt = class extends At {
508
453
  product;
509
454
  constructor(e) {
510
- super(e), this.product = new z(e?.product);
455
+ super(e), this.product = new R(e?.product);
511
456
  }
512
- }, K = class extends d {
457
+ }, G = class extends p {
513
458
  type;
514
459
  description;
515
460
  metadata;
516
461
  isFilterable;
517
462
  constructor(e) {
518
- super(e), this.type = new ce(e?.type), this.description = e?.description ?? "", this.metadata = e?.metadata, this.isFilterable = e?.isFilterable;
463
+ super(e), this.type = new ue(e?.type), this.description = e?.description ?? "", this.metadata = e?.metadata, this.isFilterable = e?.isFilterable;
519
464
  }
520
- }, q = class {
465
+ }, K = class {
521
466
  property;
522
467
  value;
523
468
  constructor(e) {
524
- this.property = new K(e?.property), this.value = e?.value ?? "";
469
+ this.property = new G(e?.property), this.value = e?.value ?? "";
525
470
  }
526
471
  }, Ft = class {
527
472
  id;
@@ -552,26 +497,26 @@ var nt = /* @__PURE__ */ function(e) {
552
497
  let e = {};
553
498
  return Object.keys(this).forEach((t) => {
554
499
  let n = this[t];
555
- k(n) || A(n) && n.trim().length === 0 || Ke(n.isNewRec) && n.isNewRec() || (e[t] = n);
500
+ k(n) || A(n) && n.trim().length === 0 || Xe(n.isNewRec) && n.isNewRec() || (e[t] = n);
556
501
  }), !e?.createdAt?.from && !e?.createdAt?.to && delete e.createdAt, !e?.updatedAt?.from && !e?.updatedAt?.to && delete e.updatedAt, e;
557
502
  }
558
503
  }, It = class extends kt {
559
504
  executor;
560
505
  createdAt;
561
506
  constructor(e) {
562
- super(e), this.executor = e?.executor ? new I(e.executor) : void 0, this.createdAt = o.parse(e?.createdAt);
507
+ super(e), this.executor = e?.executor ? new F(e.executor) : void 0, this.createdAt = s.parse(e?.createdAt);
563
508
  }
564
509
  }, Lt = class extends It {
565
510
  product;
566
511
  constructor(e) {
567
- super(e), this.product = new z(e?.product);
512
+ super(e), this.product = new R(e?.product);
568
513
  }
569
514
  }, Rt = class extends It {
570
515
  productCategory;
571
516
  constructor(e) {
572
- super(e), this.productCategory = new V(e?.productCategory);
517
+ super(e), this.productCategory = new B(e?.productCategory);
573
518
  }
574
- }, J = class extends d {
519
+ }, q = class extends p {
575
520
  description;
576
521
  canChangeLowCost;
577
522
  parentRoleId;
@@ -586,7 +531,7 @@ var nt = /* @__PURE__ */ function(e) {
586
531
  category;
587
532
  minCoefficient;
588
533
  constructor(e) {
589
- this.role = new J(e?.role), this.category = new V(e?.category), this.minCoefficient = new se(e?.minCoefficient);
534
+ this.role = new q(e?.role), this.category = new B(e?.category), this.minCoefficient = new le(e?.minCoefficient);
590
535
  }
591
536
  }, Bt = class {
592
537
  isFake;
@@ -602,7 +547,7 @@ var nt = /* @__PURE__ */ function(e) {
602
547
  property;
603
548
  settings;
604
549
  constructor(e) {
605
- this.category = new V(e?.category), this.property = new K(e?.property), this.settings = new Bt(e?.settings);
550
+ this.category = new B(e?.category), this.property = new G(e?.property), this.settings = new Bt(e?.settings);
606
551
  }
607
552
  }, Ht = class {
608
553
  id;
@@ -622,7 +567,7 @@ var nt = /* @__PURE__ */ function(e) {
622
567
  constructor(e) {
623
568
  this.id = e?.id ?? "", this.label = e?.label ?? "", this.type = e?.type ?? Et.Checkbox, this.ord = e?.ord ?? 0, this.isMultiple = e?.isMultiple ?? null, this.values = e?.values?.map((e) => new Ht(e)) ?? [], this.min = e?.min ?? null, this.max = e?.max ?? null;
624
569
  }
625
- }, Wt = class extends l {
570
+ }, Wt = class extends u {
626
571
  search(e, t = !1) {
627
572
  return this.get("/internal/catalog/search", {
628
573
  term: e,
@@ -630,10 +575,10 @@ var nt = /* @__PURE__ */ function(e) {
630
575
  });
631
576
  }
632
577
  getPriceExportLink(e = "csv", t = !1, n = void 0, r = void 0) {
633
- let i = `${g().config.http.portalApiUrl}/api/internal/price/export?format=${e}&show_hidden=${t}`;
578
+ let i = `${v().config.http.portalApiUrl}/api/internal/price/export?format=${e}&show_hidden=${t}`;
634
579
  return n && (i += `&category_id=${n}`), r && (i += `&client_id=${r}`), i;
635
580
  }
636
- }, Gt = class extends l {
581
+ }, Gt = class extends u {
637
582
  importPrices(e, t, n = !1) {
638
583
  return this.post(`/internal/clients/${e}/price/import`, t, void 0, {}, n);
639
584
  }
@@ -716,94 +661,94 @@ var nt = /* @__PURE__ */ function(e) {
716
661
  sendCommercialOffer(e, t) {
717
662
  return this.post(`/internal/clients/${e}/price/commercial-offer/send`, t);
718
663
  }
719
- }, Kt = class extends l {
664
+ }, Kt = class extends u {
720
665
  getTemplateList(e) {
721
- return this.getTypedList(G, `/internal/clients/${e}/price/templates`);
666
+ return this.getTypedList(W, `/internal/clients/${e}/price/templates`);
722
667
  }
723
668
  getActiveTemplate(e) {
724
- return this.get(`/internal/clients/${e}/price/templates/active`, {}, (e) => new G(e.data), !0);
669
+ return this.get(`/internal/clients/${e}/price/templates/active`, {}, (e) => new W(e.data), !0);
725
670
  }
726
671
  attachTemplate(e, t, n) {
727
- let r = g().config.dateFormats.api;
672
+ let r = v().config.dateFormats.api;
728
673
  return this.post(`/internal/clients/${e}/price/templates/${t}`, n && {
729
- startAt: n.startAt && S(n.startAt, r),
730
- endAt: n.endAt && S(n.endAt, r)
731
- }, (e) => new G(e.data), {}, !0);
674
+ startAt: n.startAt && C(n.startAt, r),
675
+ endAt: n.endAt && C(n.endAt, r)
676
+ }, (e) => new W(e.data), {}, !0);
732
677
  }
733
678
  applyTemplate(e, t) {
734
679
  return this.post(`/internal/clients/${e}/price/templates/${t}/apply`, {}, void 0, {}, !0);
735
680
  }
736
681
  changeTemplate(e, t, n, r) {
737
- let i = g().config.dateFormats.api;
682
+ let i = v().config.dateFormats.api;
738
683
  return this.patch(`/internal/clients/${e}/price/templates/${t}/${n}`, r && {
739
- startAt: r.startAt && S(r.startAt, i),
740
- endAt: r.endAt && S(r.endAt, i)
741
- }, (e) => new G(e.data));
684
+ startAt: r.startAt && C(r.startAt, i),
685
+ endAt: r.endAt && C(r.endAt, i)
686
+ }, (e) => new W(e.data));
742
687
  }
743
688
  detachTemplate(e, t, n) {
744
689
  return this.delete(`/internal/clients/${e}/price/templates/${t}/${n}`);
745
690
  }
746
- }, qt = class extends l {
691
+ }, qt = class extends u {
747
692
  getRootCategoriesList(e = !1) {
748
- return this.getTypedList(U, "/internal/catalog/categories", { showHidden: e });
693
+ return this.getTypedList(H, "/internal/catalog/categories", { showHidden: e });
749
694
  }
750
695
  getCategoryData(e, t = !1, n = !1) {
751
696
  return this.get(`/internal/catalog/categories/${e}`, {
752
697
  showHidden: t,
753
698
  withNestedCategories: n
754
- }, (e) => new U(e.data));
699
+ }, (e) => new H(e.data));
755
700
  }
756
701
  getPublicCategoryData(e) {
757
- return this.get(`/public/catalog/categories/${e}`, {}, (e) => new U(e.data));
702
+ return this.get(`/public/catalog/categories/${e}`, {}, (e) => new H(e.data));
758
703
  }
759
704
  getCategoryProductsList(e, t = !0, n = !1) {
760
705
  return this.get(`/internal/catalog/categories/${e}/products`, {
761
706
  showHidden: n,
762
707
  withPriceCoefficients: t
763
- }, (e) => j(e.data, (e) => new z(e)));
708
+ }, (e) => j(e.data, (e) => new R(e)));
764
709
  }
765
710
  getCategoryProductsCoefficients(e) {
766
711
  return this.get(`/internal/catalog/categories/${e}/products/coefficients`, {}, (e) => {
767
712
  let { data: t } = e;
768
- return He(t, (e) => e.map((e) => new mt(e))), t;
713
+ return Ge(t, (e) => e.map((e) => new mt(e))), t;
769
714
  });
770
715
  }
771
716
  publicSimpleSearch(e, t = 10) {
772
717
  return new Promise((n, r) => {
773
718
  this.get(`/public/catalog/search/simple?limit=${t}&term=${e}`).then((e) => {
774
- n(e.categories.map((e) => new U(e)));
719
+ n(e.categories.map((e) => new H(e)));
775
720
  }).catch((e) => {
776
721
  r(e);
777
722
  });
778
723
  });
779
724
  }
780
- }, Jt = class extends F {
725
+ }, Jt = class extends e {
781
726
  getProductData(e, t = !1) {
782
- return this.get(`/internal/catalog/products/${e}`, { withPriceCoefficients: t }, (e) => new z(e.data));
727
+ return this.get(`/internal/catalog/products/${e}`, { withPriceCoefficients: t }, (e) => new R(e.data));
783
728
  }
784
729
  getPublicProductData(e) {
785
- return this.get(`/public/catalog/products/${e}`, {}, (e) => new z(e.data));
730
+ return this.get(`/public/catalog/products/${e}`, {}, (e) => new R(e.data));
786
731
  }
787
732
  getProductPriceCoefficients(e) {
788
733
  return this.get(`/internal/catalog/products/${e}/coefficients`, {}, (e) => j(e.data, (e) => new mt(e)));
789
734
  }
790
735
  getNewProducts(e, t, n = !0) {
791
- let r = g().config.dateFormats.api;
792
- return this.getTypedPaginated(z, "/internal/catalog/products/new", void 0, void 0, t, {
793
- period: { from: S(e, r) },
736
+ let r = v().config.dateFormats.api;
737
+ return this.getTypedPaginated(R, "/internal/catalog/products/new", void 0, void 0, t, {
738
+ period: { from: C(e, r) },
794
739
  withPriceCoefficients: n
795
740
  });
796
741
  }
797
742
  publicSimpleSearch(e, t = 10) {
798
743
  return new Promise((n, r) => {
799
744
  this.get(`/public/catalog/search/simple?limit=${t}&term=${e}`).then((e) => {
800
- n(e.products.map((e) => new z(e)));
745
+ n(e.products.map((e) => new R(e)));
801
746
  }).catch((e) => {
802
747
  r(e);
803
748
  });
804
749
  });
805
750
  }
806
- }, Yt = class extends l {
751
+ }, Yt = class extends u {
807
752
  getRootCategoriesList(e, t = !1) {
808
753
  return this.getTypedList(Ot, "/internal/catalog/categories", {
809
754
  clientId: e,
@@ -822,35 +767,35 @@ var nt = /* @__PURE__ */ function(e) {
822
767
  client_id: e,
823
768
  showHidden: r,
824
769
  withPriceCoefficients: n
825
- }, (e) => j(e.data, (e) => new B(e)));
770
+ }, (e) => j(e.data, (e) => new z(e)));
826
771
  }
827
- }, Xt = class extends F {
772
+ }, Xt = class extends e {
828
773
  getProductData(e, t, n = !1) {
829
774
  return this.get(`/internal/catalog/products/${e}`, {
830
775
  clientId: t,
831
776
  withPriceCoefficients: n
832
- }, (e) => new B(e.data));
777
+ }, (e) => new z(e.data));
833
778
  }
834
779
  getNewProducts(e, t, n, r = !0) {
835
- let i = g().config.dateFormats.api;
836
- return this.getTypedPaginated(B, "/internal/catalog/products/new", void 0, void 0, n, {
780
+ let i = v().config.dateFormats.api;
781
+ return this.getTypedPaginated(z, "/internal/catalog/products/new", void 0, void 0, n, {
837
782
  clientId: e,
838
- period: { from: S(t, i) },
783
+ period: { from: C(t, i) },
839
784
  withPriceCoefficients: r
840
785
  });
841
786
  }
842
- }, Zt = class extends F {
787
+ }, Zt = class extends e {
843
788
  getTemplateList(e, t, n) {
844
- return this.getTypedPaginated(L, "/internal/price/templates", e, t, n);
789
+ return this.getTypedPaginated(I, "/internal/price/templates", e, t, n);
845
790
  }
846
791
  createTemplate(e, t = {}) {
847
- return this.post("/internal/price/templates", e, (e) => new L(e.data), t);
792
+ return this.post("/internal/price/templates", e, (e) => new I(e.data), t);
848
793
  }
849
794
  getTemplate(e) {
850
- return this.get(`/internal/price/templates/${e}`, {}, (e) => new L(e.data));
795
+ return this.get(`/internal/price/templates/${e}`, {}, (e) => new I(e.data));
851
796
  }
852
797
  updateTemplate(e, t, n = {}) {
853
- return this.patch(`/internal/price/templates/${e}`, t, (e) => new L(e.data), n);
798
+ return this.patch(`/internal/price/templates/${e}`, t, (e) => new I(e.data), n);
854
799
  }
855
800
  removeTemplate(e) {
856
801
  return this.delete(`/internal/price/templates/${e}`);
@@ -895,20 +840,20 @@ var nt = /* @__PURE__ */ function(e) {
895
840
  });
896
841
  }
897
842
  getTemplateClients(e) {
898
- return this.getTypedList(G, `/internal/price/templates/${e}/clients`);
843
+ return this.getTypedList(W, `/internal/price/templates/${e}/clients`);
899
844
  }
900
- }, Qt = class extends l {
845
+ }, Qt = class extends u {
901
846
  getRoles() {
902
- return this.getTypedList(J, "/internal/price/roles");
847
+ return this.getTypedList(q, "/internal/price/roles");
903
848
  }
904
849
  createRole(e) {
905
- return this.post("/internal/price/roles", e, (e) => new J(e.data));
850
+ return this.post("/internal/price/roles", e, (e) => new q(e.data));
906
851
  }
907
852
  getRole(e) {
908
- return this.get(`/internal/price/roles/${e}`, {}, (e) => new J(e.data));
853
+ return this.get(`/internal/price/roles/${e}`, {}, (e) => new q(e.data));
909
854
  }
910
855
  updateRole(e, t) {
911
- return this.patch(`/internal/price/roles/${e}`, t, (e) => new J(e.data));
856
+ return this.patch(`/internal/price/roles/${e}`, t, (e) => new q(e.data));
912
857
  }
913
858
  deleteRole(e) {
914
859
  return this.delete(`/internal/price/roles/${e}`);
@@ -917,40 +862,40 @@ var nt = /* @__PURE__ */ function(e) {
917
862
  return this.getTypedList(zt, `/internal/price/roles/rules/categories/${e}`);
918
863
  }
919
864
  updateCategoryRules(e, t) {
920
- return this.patch(`/internal/price/roles/rules/categories/${e}`, t, (e) => h.instanceListInitializer(zt, e.data));
865
+ return this.patch(`/internal/price/roles/rules/categories/${e}`, t, (e) => _.instanceListInitializer(zt, e.data));
921
866
  }
922
- }, $t = class extends F {
867
+ }, $t = class extends e {
923
868
  getProperties(e, t, n) {
924
- return this.getTypedPaginated(K, "/internal/catalog/properties", e, t, n);
869
+ return this.getTypedPaginated(G, "/internal/catalog/properties", e, t, n);
925
870
  }
926
871
  createProperty(e) {
927
872
  let { typeId: t, ...n } = e;
928
873
  return this.post("/internal/catalog/properties", {
929
874
  ...n,
930
875
  type: t
931
- }, (e) => new K(e.data));
876
+ }, (e) => new G(e.data));
932
877
  }
933
878
  getProperty(e) {
934
- return this.get(`/internal/catalog/properties/${e}`, {}, (e) => new K(e.data));
879
+ return this.get(`/internal/catalog/properties/${e}`, {}, (e) => new G(e.data));
935
880
  }
936
881
  updateProperty(e, t) {
937
882
  let { typeId: n, ...r } = t;
938
883
  return this.patch(`/internal/catalog/properties/${e}`, {
939
884
  ...r,
940
885
  type: n
941
- }, (e) => new K(e.data));
886
+ }, (e) => new G(e.data));
942
887
  }
943
888
  deleteProperty(e) {
944
889
  return this.delete(`/internal/catalog/properties/${e}`);
945
890
  }
946
891
  getProductProperties(e) {
947
- return this.getTypedList(q, `/internal/catalog/products/${e}/properties`);
892
+ return this.getTypedList(K, `/internal/catalog/products/${e}/properties`);
948
893
  }
949
894
  getProductProperty(e, t) {
950
- return this.get(`/internal/catalog/products/${e}/properties/${t}`, {}, (e) => new q(e.data));
895
+ return this.get(`/internal/catalog/products/${e}/properties/${t}`, {}, (e) => new K(e.data));
951
896
  }
952
897
  updateProductProperty(e, t, n) {
953
- return this.patch(`/internal/catalog/products/${e}/properties/${t}`, { value: n }, (e) => new q(e.data));
898
+ return this.patch(`/internal/catalog/products/${e}/properties/${t}`, { value: n }, (e) => new K(e.data));
954
899
  }
955
900
  deleteProductProperty(e, t) {
956
901
  return this.delete(`/internal/catalog/products/${e}/properties/${t}`);
@@ -989,13 +934,13 @@ var nt = /* @__PURE__ */ function(e) {
989
934
  return this.patch(`/internal/catalog/products/${e}/properties/slug`, { slug: t });
990
935
  }
991
936
  getCategoryProperties(e) {
992
- return this.getTypedList(q, `/internal/catalog/categories/${e}/properties`);
937
+ return this.getTypedList(K, `/internal/catalog/categories/${e}/properties`);
993
938
  }
994
939
  getCategoryProperty(e, t) {
995
- return this.get(`/internal/catalog/categories/${e}/properties/${t}`, {}, (e) => new q(e.data));
940
+ return this.get(`/internal/catalog/categories/${e}/properties/${t}`, {}, (e) => new K(e.data));
996
941
  }
997
942
  updateCategoryProperty(e, t, n) {
998
- return this.patch(`/internal/catalog/categories/${e}/properties/${t}`, { value: n }, (e) => new q(e.data));
943
+ return this.patch(`/internal/catalog/categories/${e}/properties/${t}`, { value: n }, (e) => new K(e.data));
999
944
  }
1000
945
  deleteCategoryProperty(e, t) {
1001
946
  return this.delete(`/internal/catalog/categories/${e}/properties/${t}`);
@@ -1048,9 +993,9 @@ var nt = /* @__PURE__ */ function(e) {
1048
993
  deleteCategoryFilterSetting(e, t) {
1049
994
  return this.delete(`/internal/catalog/categories/${e}/filter-settings/${t}`);
1050
995
  }
1051
- }, en = class extends l {
996
+ }, en = class extends u {
1052
997
  getRootCategoriesList(e, t = !1) {
1053
- return this.getTypedList(U, "/internal/catalog/categories", {
998
+ return this.getTypedList(H, "/internal/catalog/categories", {
1054
999
  priceTemplateId: e,
1055
1000
  showHidden: t
1056
1001
  });
@@ -1060,14 +1005,14 @@ var nt = /* @__PURE__ */ function(e) {
1060
1005
  priceTemplateId: e,
1061
1006
  showHidden: n,
1062
1007
  withNestedCategories: r
1063
- }, (e) => new U(e.data));
1008
+ }, (e) => new H(e.data));
1064
1009
  }
1065
1010
  getCategoryProductsList(e, t, n = !0, r = !1) {
1066
1011
  return this.get(`/internal/catalog/categories/${t}/products`, {
1067
1012
  priceTemplateId: e,
1068
1013
  showHidden: r,
1069
1014
  withPriceCoefficients: n
1070
- }, (e) => j(e.data, (e) => new z(e)));
1015
+ }, (e) => j(e.data, (e) => new R(e)));
1071
1016
  }
1072
1017
  };
1073
1018
  //#endregion
@@ -1104,14 +1049,14 @@ function nn(e) {
1104
1049
  //#region src/clients/enums/clients-additional-data-request-type-enum.ts
1105
1050
  var rn = /* @__PURE__ */ function(e) {
1106
1051
  return e.LastOrder = "last_order", e.Contacts = "contacts", e.PartnerGroups = "partner_groups", e.PreferredDeliveryType = "preferred_delivery_type", e.SalesDirection = "sales_direction", e.Managers = "managers", e.Curators = "curators", e;
1107
- }({}), an = class extends u {
1052
+ }({}), an = class extends d {
1108
1053
  bankName = "";
1109
1054
  bic = "";
1110
1055
  accountNumber = "";
1111
1056
  correspondentAccount = "";
1112
- currency = new a();
1057
+ currency = new o();
1113
1058
  constructor(e) {
1114
- super(e), e && (this.bankName = e.bankName ?? "", this.bic = e.bic ?? "", this.accountNumber = e.accountNumber ?? "", this.correspondentAccount = e.correspondentAccount ?? "", this.currency = new a(e.currency));
1059
+ super(e), e && (this.bankName = e.bankName ?? "", this.bic = e.bic ?? "", this.accountNumber = e.accountNumber ?? "", this.correspondentAccount = e.correspondentAccount ?? "", this.currency = new o(e.currency));
1115
1060
  }
1116
1061
  }, on = class extends ft {
1117
1062
  phone;
@@ -1119,7 +1064,7 @@ var rn = /* @__PURE__ */ function(e) {
1119
1064
  constructor(e) {
1120
1065
  super(e), this.email = e?.email, this.phone = /^\d+$/.test(e?.phone ?? "") ? `+${e?.phone}` : e?.phone;
1121
1066
  }
1122
- }, Y = class extends on {
1067
+ }, J = class extends on {
1123
1068
  isPrimary;
1124
1069
  position;
1125
1070
  notDisturb;
@@ -1128,8 +1073,8 @@ var rn = /* @__PURE__ */ function(e) {
1128
1073
  super(e), this.isPrimary = e?.isPrimary ?? !1, this.position = e?.position, this.notDisturb = e?.notDisturb ?? !1, this.comment = e?.comment;
1129
1074
  }
1130
1075
  }, sn = class extends ft {
1131
- opf = ie.generatePersonItem();
1132
- partnerGroup = new p();
1076
+ opf = oe.generatePersonItem();
1077
+ partnerGroup = new h();
1133
1078
  contacts = [];
1134
1079
  bankAccounts = [];
1135
1080
  comment;
@@ -1138,10 +1083,10 @@ var rn = /* @__PURE__ */ function(e) {
1138
1083
  updater;
1139
1084
  constructor(e) {
1140
1085
  if (super(e), e) {
1141
- if (this.opf = new ie(e.opf), this.comment = e.comment, this.alternativeName = e.alternativeName, 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 p(e.partnerGroup)), e.contacts) {
1086
+ if (this.opf = new oe(e.opf), this.comment = e.comment, this.alternativeName = e.alternativeName, this.creator = e.creator ? new F(e.creator) : void 0, this.updater = e.updater ? new F(e.updater) : void 0, e.partnerGroup && (this.partnerGroup = new h(e.partnerGroup)), e.contacts) {
1142
1087
  let t = [];
1143
1088
  e.contacts.forEach((e) => {
1144
- t.push(new Y(e));
1089
+ t.push(new J(e));
1145
1090
  }), this.contacts = t;
1146
1091
  }
1147
1092
  if (e.bankAccounts) {
@@ -1175,22 +1120,28 @@ var rn = /* @__PURE__ */ function(e) {
1175
1120
  super(e), e && (this.kpp = e.kpp ?? "");
1176
1121
  }
1177
1122
  }, dn = class extends un {
1178
- registrationCountry = new r();
1123
+ registrationCountry = new i();
1179
1124
  registrationNumber = "";
1180
1125
  taxNumber = "";
1181
1126
  constructor(e) {
1182
- super(e), e && (this.registrationCountry = new r(e.registrationCountry), this.registrationNumber = e.registrationNumber ?? "", this.taxNumber = e.taxNumber ?? "");
1127
+ super(e), e && (this.registrationCountry = new i(e.registrationCountry), this.registrationNumber = e.registrationNumber ?? "", this.taxNumber = e.taxNumber ?? "");
1183
1128
  }
1184
1129
  }, fn = class {
1185
1130
  static createInstance(e) {
1186
1131
  switch (e.opf.slug) {
1187
- case f.Ic: return new ln(e);
1188
- case f.UlR: return new un(e);
1189
- case f.UlNr: return new dn(e);
1132
+ case m.Ic: return new ln(e);
1133
+ case m.UlR: return new un(e);
1134
+ case m.UlNr: return new dn(e);
1190
1135
  default: return new cn(e);
1191
1136
  }
1192
1137
  }
1193
- }, X = class extends ft {
1138
+ }, pn = class extends p {
1139
+ city;
1140
+ isActive;
1141
+ constructor(e) {
1142
+ super(e), this.city = e?.city ? new n(e.city) : void 0, this.isActive = e?.isActive ?? !1;
1143
+ }
1144
+ }, Y = class extends ft {
1194
1145
  address = "";
1195
1146
  coordinates;
1196
1147
  contacts;
@@ -1199,9 +1150,9 @@ var rn = /* @__PURE__ */ function(e) {
1199
1150
  isOneTime;
1200
1151
  isTransportCompanyAddress;
1201
1152
  constructor(e) {
1202
- super(e), this.address = e?.address ?? "", this.coordinates = new ee(e?.coordinates), this.contacts = e?.contacts?.map((e) => new Y(e)) ?? [], this.comment = e?.comment, this.operatingHours = e?.operatingHours, this.isOneTime = e?.isOneTime, this.isTransportCompanyAddress = e?.isTransportCompanyAddress;
1153
+ super(e), this.address = e?.address ?? "", this.coordinates = new ne(e?.coordinates), this.contacts = e?.contacts?.map((e) => new J(e)) ?? [], this.comment = e?.comment, this.operatingHours = e?.operatingHours, this.isOneTime = e?.isOneTime, this.isTransportCompanyAddress = e?.isTransportCompanyAddress;
1203
1154
  }
1204
- }, pn = class extends W {
1155
+ }, mn = class extends U {
1205
1156
  contragents;
1206
1157
  partnerGroups;
1207
1158
  contacts;
@@ -1212,10 +1163,10 @@ var rn = /* @__PURE__ */ function(e) {
1212
1163
  primaryDemand;
1213
1164
  preferredWarehouse;
1214
1165
  extraData;
1215
- constructor(t) {
1216
- super(t), this.contragents = t?.contragents?.map((e) => fn.createInstance(e)) ?? [], this.partnerGroups = t?.partnerGroups?.map((e) => new p(e)) ?? [], this.contacts = t?.contacts?.map((e) => new Y(e)) ?? [], this.deliveryAddresses = t?.deliveryAddresses?.map((e) => new X(e)) ?? [], this.channelPrimaryInterest = new e(t?.channelPrimaryInterest), this.sourcePrimaryInterest = new fe(t?.sourcePrimaryInterest), this.preferredDeliveryType = new s(t?.preferredDeliveryType), this.primaryDemand = t?.primaryDemand, this.preferredWarehouse = t?.preferredWarehouse ? new ge(t.preferredWarehouse) : void 0, this.extraData = t?.extraData ?? {};
1166
+ constructor(e) {
1167
+ super(e), this.contragents = e?.contragents?.map((e) => fn.createInstance(e)) ?? [], this.partnerGroups = e?.partnerGroups?.map((e) => new h(e)) ?? [], this.contacts = e?.contacts?.map((e) => new J(e)) ?? [], this.deliveryAddresses = e?.deliveryAddresses?.map((e) => new Y(e)) ?? [], this.channelPrimaryInterest = new t(e?.channelPrimaryInterest), this.sourcePrimaryInterest = new me(e?.sourcePrimaryInterest), this.preferredDeliveryType = new c(e?.preferredDeliveryType), this.primaryDemand = e?.primaryDemand, this.preferredWarehouse = e?.preferredWarehouse ? new ve(e.preferredWarehouse) : void 0, this.extraData = e?.extraData ?? {};
1217
1168
  }
1218
- }, mn = class extends N {
1169
+ }, hn = class extends N {
1219
1170
  id;
1220
1171
  guid;
1221
1172
  name;
@@ -1243,7 +1194,7 @@ var rn = /* @__PURE__ */ function(e) {
1243
1194
  lastOrder;
1244
1195
  noOrdersPeriod = new P();
1245
1196
  constructor(e) {
1246
- super(), this.id = e?.id, this.guid = e?.guid, this.name = e?.name, this.alternativeName = e?.alternativeName, this.searchTerm = e?.searchTerm, this.cities = e?.cities?.map((e) => new t(e)), this.region = new ue(e?.region), this.country = new r(e?.country), this.phone = e?.phone, this.email = e?.email, this.isActive = e && Object.prototype.hasOwnProperty.call(e, "isActive") ? e?.isActive : !0, this.createdAt = new P(e?.createdAt), this.lastLoginDate = new P(e?.lastLoginDate), this.lastLoginDateHasOrder = e?.lastLoginDateHasOrder ?? void 0, this.managers = e?.managers?.map((e) => new te(e)) ?? [], this.includeSubordinateManagers = e?.includeSubordinateManagers ?? !0, this.curators = e?.curators?.map((e) => new Mt(e)) ?? [], this.salesDirections = e?.salesDirections?.map((e) => new m(e)), this.contragentInn = e?.contragentInn, this.contragentType = new ie(e?.contragentType), this.preferredDeliveryType = e?.preferredDeliveryType ? new s(e?.preferredDeliveryType) : void 0, this.partnerGroups = e?.partnerGroups?.map((e) => new p(e)), this.contact = new on(e?.contact), this.lastOrder = {
1197
+ super(), this.id = e?.id, this.guid = e?.guid, this.name = e?.name, this.alternativeName = e?.alternativeName, this.searchTerm = e?.searchTerm, this.cities = e?.cities?.map((e) => new n(e)), this.region = new fe(e?.region), this.country = new i(e?.country), this.phone = e?.phone, this.email = e?.email, this.isActive = e && Object.prototype.hasOwnProperty.call(e, "isActive") ? e?.isActive : !0, this.createdAt = new P(e?.createdAt), this.lastLoginDate = new P(e?.lastLoginDate), this.lastLoginDateHasOrder = e?.lastLoginDateHasOrder ?? void 0, this.managers = e?.managers?.map((e) => new f(e)) ?? [], this.includeSubordinateManagers = e?.includeSubordinateManagers ?? !0, this.curators = e?.curators?.map((e) => new Mt(e)) ?? [], this.salesDirections = e?.salesDirections?.map((e) => new g(e)), this.contragentInn = e?.contragentInn, this.contragentType = new oe(e?.contragentType), this.preferredDeliveryType = e?.preferredDeliveryType ? new c(e?.preferredDeliveryType) : void 0, this.partnerGroups = e?.partnerGroups?.map((e) => new h(e)), this.contact = new on(e?.contact), this.lastOrder = {
1247
1198
  createdAt: new P(e?.lastOrder?.createdAt),
1248
1199
  creator: e?.lastOrder?.creator,
1249
1200
  isApproved: e?.lastOrder?.isApproved
@@ -1255,7 +1206,7 @@ var rn = /* @__PURE__ */ function(e) {
1255
1206
  this.cities = [];
1256
1207
  break;
1257
1208
  case "region":
1258
- this.region = new ue();
1209
+ this.region = new fe();
1259
1210
  break;
1260
1211
  case "isActive":
1261
1212
  this.isActive = !0;
@@ -1282,10 +1233,10 @@ var rn = /* @__PURE__ */ function(e) {
1282
1233
  this.salesDirections = [];
1283
1234
  break;
1284
1235
  case "contragentType":
1285
- this.contragentType = new ie();
1236
+ this.contragentType = new oe();
1286
1237
  break;
1287
1238
  case "preferredDeliveryType":
1288
- this.preferredDeliveryType = new s();
1239
+ this.preferredDeliveryType = new c();
1289
1240
  break;
1290
1241
  case "partnerGroups":
1291
1242
  this.partnerGroups = [];
@@ -1301,12 +1252,12 @@ var rn = /* @__PURE__ */ function(e) {
1301
1252
  let e = super.asClearRaw();
1302
1253
  return !e?.createdAt?.from && !e?.createdAt?.to && delete e.createdAt, !e?.lastLoginDate?.from && !e?.lastLoginDate?.to && delete e.lastLoginDate, !e?.noOrdersPeriod?.from && !e?.noOrdersPeriod?.to && delete e.noOrdersPeriod, e;
1303
1254
  }
1304
- }, hn = class extends M {
1255
+ }, gn = class extends M {
1305
1256
  creator;
1306
1257
  constructor(e) {
1307
- super(e), this.creator = new I(e?.creator);
1258
+ super(e), this.creator = new F(e?.creator);
1308
1259
  }
1309
- }, gn = class extends d {
1260
+ }, _n = class extends p {
1310
1261
  contacts = [];
1311
1262
  preferredDeliveryType;
1312
1263
  partnerGroups = [];
@@ -1315,23 +1266,23 @@ var rn = /* @__PURE__ */ function(e) {
1315
1266
  managers;
1316
1267
  curators;
1317
1268
  constructor(e) {
1318
- super(e), this.contacts = e.contacts?.map((e) => new Y(e)) ?? void 0, this.lastOrder = e.lastOrder ? new hn(e.lastOrder) : void 0, this.partnerGroups = e.partnerGroups?.map((e) => new p(e)) ?? void 0, this.preferredDeliveryType = e.preferredDeliveryType ? new s(e.preferredDeliveryType) : void 0, this.salesDirection = e.salesDirection ? new m(e.salesDirection) : void 0, this.managers = e.managers?.map((e) => new ne(e)) ?? void 0, this.curators = e.curators?.map((e) => new Mt(e)) ?? void 0;
1269
+ super(e), this.contacts = e.contacts?.map((e) => new J(e)) ?? void 0, this.lastOrder = e.lastOrder ? new gn(e.lastOrder) : void 0, this.partnerGroups = e.partnerGroups?.map((e) => new h(e)) ?? void 0, this.preferredDeliveryType = e.preferredDeliveryType ? new c(e.preferredDeliveryType) : void 0, this.salesDirection = e.salesDirection ? new g(e.salesDirection) : void 0, this.managers = e.managers?.map((e) => new re(e)) ?? void 0, this.curators = e.curators?.map((e) => new Mt(e)) ?? void 0;
1319
1270
  }
1320
- }, _n = class extends u {
1271
+ }, vn = class extends d {
1321
1272
  isPrimary;
1322
1273
  constructor(e) {
1323
1274
  super(e), this.isPrimary = e.isPrimary;
1324
1275
  }
1325
- }, vn = class extends Y {
1276
+ }, yn = class extends J {
1326
1277
  relations = {
1327
1278
  clients: [],
1328
1279
  contragents: [],
1329
1280
  addresses: []
1330
1281
  };
1331
1282
  constructor(e) {
1332
- super(e), e.relations && (e.relations.addresses && (this.relations.addresses = e.relations.addresses.map((e) => new _n(e))), e.relations.clients && (this.relations.clients = e.relations.clients.map((e) => new _n(e))), e.relations.contragents && (this.relations.contragents = e.relations.contragents.map((e) => new _n(e))));
1283
+ super(e), e.relations && (e.relations.addresses && (this.relations.addresses = e.relations.addresses.map((e) => new vn(e))), e.relations.clients && (this.relations.clients = e.relations.clients.map((e) => new vn(e))), e.relations.contragents && (this.relations.contragents = e.relations.contragents.map((e) => new vn(e))));
1333
1284
  }
1334
- }, yn = class e extends F {
1285
+ }, bn = class t extends e {
1335
1286
  static transformClientDataToRequest(e) {
1336
1287
  return {
1337
1288
  name: e.name,
@@ -1350,7 +1301,7 @@ var rn = /* @__PURE__ */ function(e) {
1350
1301
  static transformContragentClientDataToRequest(e) {
1351
1302
  let t, n = e, r = e, i = e;
1352
1303
  switch (e.opf.slug) {
1353
- case f.Ic:
1304
+ case m.Ic:
1354
1305
  t = {
1355
1306
  opf: n.opf.slug,
1356
1307
  name: n.name,
@@ -1368,7 +1319,7 @@ var rn = /* @__PURE__ */ function(e) {
1368
1319
  actual_address: n.actualAddress
1369
1320
  };
1370
1321
  break;
1371
- case f.UlR:
1322
+ case m.UlR:
1372
1323
  t = {
1373
1324
  opf: r.opf.slug,
1374
1325
  name: r.name,
@@ -1387,7 +1338,7 @@ var rn = /* @__PURE__ */ function(e) {
1387
1338
  actual_address: r.actualAddress
1388
1339
  };
1389
1340
  break;
1390
- case f.UlNr:
1341
+ case m.UlNr:
1391
1342
  t = {
1392
1343
  opf: i.opf.slug,
1393
1344
  name: i.name,
@@ -1440,10 +1391,10 @@ var rn = /* @__PURE__ */ function(e) {
1440
1391
  };
1441
1392
  }
1442
1393
  getClient(e) {
1443
- return this.get(`/internal/clients/${e}`, {}, (e) => new pn(e.data));
1394
+ return this.get(`/internal/clients/${e}`, {}, (e) => new mn(e.data));
1444
1395
  }
1445
1396
  getClientsList(e, t, n, r, i) {
1446
- return this.getTypedPaginated(W, "/internal/clients", e, t, n, r, void 0, i);
1397
+ return this.getTypedPaginated(U, "/internal/clients", e, t, n, r, void 0, i);
1447
1398
  }
1448
1399
  searchClient(e) {
1449
1400
  return this.getClientsList(void 0, void 0, void 0, { searchTerm: e }).then((e) => e.data);
@@ -1454,7 +1405,7 @@ var rn = /* @__PURE__ */ function(e) {
1454
1405
  groups: [],
1455
1406
  filters: [{
1456
1407
  field: "phone",
1457
- op: ct.Contains,
1408
+ op: te.Contains,
1458
1409
  value: e
1459
1410
  }]
1460
1411
  });
@@ -1464,16 +1415,16 @@ var rn = /* @__PURE__ */ function(e) {
1464
1415
  return this.post("/internal/clients/additional-data", {
1465
1416
  clients: n,
1466
1417
  requested_data_types: t
1467
- }, (e) => h.instanceListInitializer(gn, e.data));
1418
+ }, (e) => _.instanceListInitializer(_n, e.data));
1468
1419
  }
1469
1420
  getAllClientContacts(e) {
1470
- return this.getTypedList(vn, `/internal/clients/${e}/contacts/all`);
1421
+ return this.getTypedList(yn, `/internal/clients/${e}/contacts/all`);
1471
1422
  }
1472
- createClientCommonData(t, n = {}) {
1473
- return this.post("/internal/clients", e.transformClientDataToRequest(t), (e) => new pn(e.data), n);
1423
+ createClientCommonData(e, n = {}) {
1424
+ return this.post("/internal/clients", t.transformClientDataToRequest(e), (e) => new mn(e.data), n);
1474
1425
  }
1475
- updateClientCommonData(t, n = {}) {
1476
- return this.patch(`/internal/clients/${t.id}`, e.transformClientDataToRequest(t), void 0, n);
1426
+ updateClientCommonData(e, n = {}) {
1427
+ return this.patch(`/internal/clients/${e.id}`, t.transformClientDataToRequest(e), void 0, n);
1477
1428
  }
1478
1429
  updateClientNotDistribCommonData(e, t = {}) {
1479
1430
  let n = { get_news: e.getNews };
@@ -1511,32 +1462,32 @@ var rn = /* @__PURE__ */ function(e) {
1511
1462
  curated_direction_id: e.curatedDirection.id
1512
1463
  })) });
1513
1464
  }
1514
- createContragentClientData(t, n, r = {}) {
1515
- return this.post(`/internal/clients/${t}/contragents`, e.transformContragentClientDataToRequest(n), (e) => fn.createInstance(e.data), r);
1465
+ createContragentClientData(e, n, r = {}) {
1466
+ return this.post(`/internal/clients/${e}/contragents`, t.transformContragentClientDataToRequest(n), (e) => fn.createInstance(e.data), r);
1516
1467
  }
1517
- updateContragentClientData(t, n, r = {}) {
1518
- return this.patch(`/internal/clients/${t}/contragents/${n.id}`, e.transformContragentClientDataToRequest(n), (e) => fn.createInstance(e.data), r);
1468
+ updateContragentClientData(e, n, r = {}) {
1469
+ return this.patch(`/internal/clients/${e}/contragents/${n.id}`, t.transformContragentClientDataToRequest(n), (e) => fn.createInstance(e.data), r);
1519
1470
  }
1520
1471
  deleteClientContragent(e, t) {
1521
1472
  return this.delete(`/internal/clients/${e}/contragents/${t.id}`);
1522
1473
  }
1523
1474
  getClientDeliveryAddresses(e) {
1524
- return this.getTypedList(X, `/internal/clients/${e}/delivery-addresses`);
1475
+ return this.getTypedList(Y, `/internal/clients/${e}/delivery-addresses`);
1525
1476
  }
1526
- createClientDeliveryAddress(t, n, r = {}) {
1527
- return this.post(`/internal/clients/${t}/delivery-addresses`, e.transformClientDeliveryAddressToRequest(n), (e) => new X(e.data), r);
1477
+ createClientDeliveryAddress(e, n, r = {}) {
1478
+ return this.post(`/internal/clients/${e}/delivery-addresses`, t.transformClientDeliveryAddressToRequest(n), (e) => new Y(e.data), r);
1528
1479
  }
1529
- updateClientDeliveryAddress(t, n, r = {}) {
1530
- return this.patch(`/internal/clients/${t}/delivery-addresses/${n.id}`, e.transformClientDeliveryAddressToRequest(n), (e) => new X(e.data), r);
1480
+ updateClientDeliveryAddress(e, n, r = {}) {
1481
+ return this.patch(`/internal/clients/${e}/delivery-addresses/${n.id}`, t.transformClientDeliveryAddressToRequest(n), (e) => new Y(e.data), r);
1531
1482
  }
1532
1483
  deleteClientDeliveryAddress(e, t) {
1533
1484
  return this.delete(`/internal/clients/${e}/delivery-addresses/${t.id}`);
1534
1485
  }
1535
- createContragentBankAccount(t, n, r, i = {}) {
1536
- return this.post(`/internal/clients/${t}/contragents/${n}/bank-accounts`, e.transformClientContragentBankAccountToRequest(r), (e) => new an(e.data), i);
1486
+ createContragentBankAccount(e, n, r, i = {}) {
1487
+ return this.post(`/internal/clients/${e}/contragents/${n}/bank-accounts`, t.transformClientContragentBankAccountToRequest(r), (e) => new an(e.data), i);
1537
1488
  }
1538
- updateContragentBankAccount(t, n, r, i = {}) {
1539
- return this.patch(`/internal/clients/${t}/contragents/${n}/bank-accounts/${r.id}`, e.transformClientContragentBankAccountToRequest(r), (e) => new an(e.data), i);
1489
+ updateContragentBankAccount(e, n, r, i = {}) {
1490
+ return this.patch(`/internal/clients/${e}/contragents/${n}/bank-accounts/${r.id}`, t.transformClientContragentBankAccountToRequest(r), (e) => new an(e.data), i);
1540
1491
  }
1541
1492
  deleteContragentBankAccount(e, t, n) {
1542
1493
  return this.delete(`/internal/clients/${e}/contragents/${t}/bank-accounts/${n.id}`);
@@ -1556,7 +1507,7 @@ var rn = /* @__PURE__ */ function(e) {
1556
1507
  email: t.email,
1557
1508
  comment: t.comment,
1558
1509
  not_disturb: t.notDisturb
1559
- }, (e) => new Y(e.data), n);
1510
+ }, (e) => new J(e.data), n);
1560
1511
  }
1561
1512
  setPrimaryClientContact(e, t) {
1562
1513
  return this.setPrimaryContact(`/internal/clients/${e}/contacts/${t.id}/primary`, t.isPrimary ?? !1);
@@ -1597,7 +1548,7 @@ var rn = /* @__PURE__ */ function(e) {
1597
1548
  comment: t.comment,
1598
1549
  ...n
1599
1550
  };
1600
- return t.phone?.length && (i.phone = t.phone), t.email?.length && (i.email = t.email), this.post(`/internal/clients/${e}/contacts`, i, (e) => new Y(e.data), r);
1551
+ return t.phone?.length && (i.phone = t.phone), t.email?.length && (i.email = t.email), this.post(`/internal/clients/${e}/contacts`, i, (e) => new J(e.data), r);
1601
1552
  }
1602
1553
  setPrimaryContact(e, t) {
1603
1554
  return this.patch(e, { is_primary: t });
@@ -1608,7 +1559,7 @@ var rn = /* @__PURE__ */ function(e) {
1608
1559
  sendClientEmailConfirmation(e) {
1609
1560
  return this.get(`/internal/clients/${e.id}/verification/email?email=${e.email}`);
1610
1561
  }
1611
- }, bn = class extends l {
1562
+ }, xn = class extends u {
1612
1563
  checkPhoneIsBusy(e) {
1613
1564
  return new Promise((t, n) => {
1614
1565
  this.request({
@@ -1620,16 +1571,16 @@ var rn = /* @__PURE__ */ function(e) {
1620
1571
  }).catch(n);
1621
1572
  });
1622
1573
  }
1623
- }, xn = class {
1574
+ }, Sn = class {
1624
1575
  date;
1625
1576
  name;
1626
1577
  version;
1627
1578
  constructor(e) {
1628
- this.date = A(e?.date) ? C(e.date) : e?.date ?? /* @__PURE__ */ new Date(), this.name = e?.name ?? "", this.version = e?.version ?? "0.0.0";
1579
+ this.date = A(e?.date) ? w(e.date) : e?.date ?? /* @__PURE__ */ new Date(), this.name = e?.name ?? "", this.version = e?.version ?? "0.0.0";
1629
1580
  }
1630
- }, Sn = /* @__PURE__ */ function(e) {
1581
+ }, Cn = /* @__PURE__ */ function(e) {
1631
1582
  return e.Kozyrek = "kozyrek", e.Mosquitto = "mosquitto", e.Strip = "strip", e.MetalForDoors = "metal_for_doors", e.Sandwich = "sandwich", e.SandwichM2 = "sandwich_m2", e;
1632
- }({}), Cn = class extends l {
1583
+ }({}), wn = class extends u {
1633
1584
  getConfiguratorSettings(e, t) {
1634
1585
  return this.get(`internal/catalog/categories/${e.id}/configurators/${e.properties?.configurator}/settings?client_id=${t}`);
1635
1586
  }
@@ -1641,7 +1592,7 @@ var rn = /* @__PURE__ */ function(e) {
1641
1592
  params: n,
1642
1593
  client_id: t
1643
1594
  }
1644
- }, (e) => new z(e.data), r);
1595
+ }, (e) => new R(e.data), r);
1645
1596
  }
1646
1597
  createTemplate(e, t, n, r = {}) {
1647
1598
  return this.post(`internal/catalog/categories/${e.id}/configurators/${e.properties?.configurator}/template?client_id=${t}`, { ...n }, () => {}, r);
@@ -1655,13 +1606,13 @@ var rn = /* @__PURE__ */ function(e) {
1655
1606
  ...n
1656
1607
  });
1657
1608
  }
1658
- }, wn = class {
1609
+ }, Tn = class {
1659
1610
  page = 1;
1660
1611
  pageSize = 50;
1661
1612
  constructor(e) {
1662
1613
  this.page = e?.page ?? 1, this.pageSize = e?.pageSize ?? 50;
1663
1614
  }
1664
- }, Tn = class extends wn {
1615
+ }, En = class extends Tn {
1665
1616
  itemCount = 0;
1666
1617
  pageCount = 1;
1667
1618
  pageSlot = 5;
@@ -1678,13 +1629,13 @@ var rn = /* @__PURE__ */ function(e) {
1678
1629
  100
1679
1630
  ], this.showSizePicker = e?.showSizePicker ?? !0;
1680
1631
  }
1681
- }, En = class {
1632
+ }, Dn = class {
1682
1633
  field;
1683
1634
  direction;
1684
1635
  constructor(e) {
1685
1636
  this.field = e?.field ?? "", this.direction = e?.direction ?? "asc";
1686
1637
  }
1687
- }, Z = class e {
1638
+ }, X = class e {
1688
1639
  static decadeInterval(t) {
1689
1640
  let [n, r] = e.shiftedDecadeBounds(t, 0);
1690
1641
  return {
@@ -1703,47 +1654,47 @@ var rn = /* @__PURE__ */ function(e) {
1703
1654
  return new Date(e.getFullYear(), e.getMonth() < 6 ? 0 : 6, 1);
1704
1655
  }
1705
1656
  static endOfHalfYear(e) {
1706
- return b(new Date(e.getFullYear(), e.getMonth() < 6 ? 5 : 11, 1));
1657
+ return S(new Date(e.getFullYear(), e.getMonth() < 6 ? 5 : 11, 1));
1707
1658
  }
1708
1659
  static addHalfYears(e, t) {
1709
- return v(e, t * 6);
1660
+ return b(e, t * 6);
1710
1661
  }
1711
1662
  static intervalTillSameDate(e, t, n) {
1712
- let r = Se(T(n), T(e)), i = T(v(t, r)), a = Math.min(Oe(n), ke(i));
1663
+ let r = we(E(n), E(e)), i = E(b(t, r)), a = Math.min(je(n), Me(i));
1713
1664
  return {
1714
- from: w(t),
1715
- to: y(Ae(i, a))
1665
+ from: T(t),
1666
+ to: x(Ne(i, a))
1716
1667
  };
1717
1668
  }
1718
1669
  static weekTillSameWeekday(e, t) {
1719
- let n = E(ye(e, t), { weekStartsOn: 1 }), r = xe(e, E(e, { weekStartsOn: 1 }));
1670
+ let n = D(xe(e, t), { weekStartsOn: 1 }), r = Ce(e, D(e, { weekStartsOn: 1 }));
1720
1671
  return {
1721
1672
  from: n,
1722
- to: y(_(n, r))
1673
+ to: x(y(n, r))
1723
1674
  };
1724
1675
  }
1725
1676
  static decadeTillSameDayNumber(t, n) {
1726
- let [r] = e.shiftedDecadeBounds(t, 0), i = xe(t, r) + 1, [a, o] = e.shiftedDecadeBounds(t, n), s = xe(o, a) + 1;
1677
+ let [r] = e.shiftedDecadeBounds(t, 0), i = Ce(t, r) + 1, [a, o] = e.shiftedDecadeBounds(t, n), s = Ce(o, a) + 1;
1727
1678
  return {
1728
1679
  from: a,
1729
- to: y(_(a, Math.min(i, s) - 1))
1680
+ to: x(y(a, Math.min(i, s) - 1))
1730
1681
  };
1731
1682
  }
1732
1683
  static shiftedDecadeBounds(e, t) {
1733
- let n = Oe(e), r = 2;
1684
+ let n = je(e), r = 2;
1734
1685
  n <= 10 ? r = 0 : n <= 20 && (r = 1);
1735
- let i = r + t, a = Math.floor(i / 3), o = (i % 3 + 3) % 3, s = T(v(e, a)), c = _(s, o * 10);
1736
- return [c, o === 2 ? b(s) : y(_(c, 9))];
1686
+ let i = r + t, a = Math.floor(i / 3), o = (i % 3 + 3) % 3, s = E(b(e, a)), c = y(s, o * 10);
1687
+ return [c, o === 2 ? S(s) : x(y(c, 9))];
1737
1688
  }
1738
1689
  };
1739
1690
  //#endregion
1740
1691
  //#region src/date-time/helpers/days-ago-iso.ts
1741
- function Dn(e) {
1742
- return S(Fe(Me(), e), "yyyy-MM-dd");
1692
+ function On(e) {
1693
+ return C(Re(Fe(), e), "yyyy-MM-dd");
1743
1694
  }
1744
1695
  //#endregion
1745
1696
  //#region src/i18n/helpers/pluralize.ts
1746
- function On(e, t) {
1697
+ function kn(e, t) {
1747
1698
  let n = [
1748
1699
  2,
1749
1700
  0,
@@ -1756,13 +1707,13 @@ function On(e, t) {
1756
1707
  }
1757
1708
  //#endregion
1758
1709
  //#region src/date-time/helpers/format-relative-date.ts
1759
- function kn(e) {
1760
- let t = C(e), n = xe(Me(), t);
1710
+ function An(e) {
1711
+ let t = w(e), n = Ce(Fe(), t);
1761
1712
  switch (!0) {
1762
1713
  case n === 0: return "Сегодня";
1763
1714
  case n === 1: return "Вчера";
1764
1715
  case n < 0: return e;
1765
- default: return `${n} ${On(n, [
1716
+ default: return `${n} ${kn(n, [
1766
1717
  "день",
1767
1718
  "дня",
1768
1719
  "дней"
@@ -1771,83 +1722,83 @@ function kn(e) {
1771
1722
  }
1772
1723
  //#endregion
1773
1724
  //#region src/date-time/providers/date-time-provider.ts
1774
- var An = class {
1725
+ var jn = class {
1775
1726
  static defaultDateRanges(e) {
1776
- let t = _e(/* @__PURE__ */ new Date(), 1), n = /* @__PURE__ */ new Date(), r = D(e === void 0 ? n : new Date(e, 0, 1)), i = Ee(r);
1727
+ let t = ye(/* @__PURE__ */ new Date(), 1), n = /* @__PURE__ */ new Date(), r = O(e === void 0 ? n : new Date(e, 0, 1)), i = ke(r);
1777
1728
  return {
1778
1729
  nextWorkingDay: {
1779
1730
  label: "Следующий рабочий день",
1780
- from: w(t),
1781
- to: y(t)
1731
+ from: T(t),
1732
+ to: x(t)
1782
1733
  },
1783
1734
  today: {
1784
1735
  label: "Сегодня",
1785
- from: Me(),
1786
- to: we()
1736
+ from: Fe(),
1737
+ to: Ee()
1787
1738
  },
1788
1739
  yesterday: {
1789
1740
  label: "Вчера",
1790
- from: Pe(),
1791
- to: De()
1741
+ from: Le(),
1742
+ to: Ae()
1792
1743
  },
1793
1744
  tomorrow: {
1794
1745
  label: "Завтра",
1795
- from: Ne(),
1796
- to: Te()
1746
+ from: Ie(),
1747
+ to: De()
1797
1748
  },
1798
1749
  currentWeek: {
1799
1750
  label: "Неделя",
1800
- from: E(n, { weekStartsOn: 1 }),
1801
- to: x(n, { weekStartsOn: 1 })
1751
+ from: D(n, { weekStartsOn: 1 }),
1752
+ to: Oe(n, { weekStartsOn: 1 })
1802
1753
  },
1803
1754
  currentMonth: {
1804
1755
  label: "Месяц",
1805
- from: T(n),
1806
- to: b(n)
1756
+ from: E(n),
1757
+ to: S(n)
1807
1758
  },
1808
1759
  oneMonth: {
1809
1760
  label: "1 месяц",
1810
1761
  from: r,
1811
- to: b(r)
1762
+ to: S(r)
1812
1763
  },
1813
1764
  threeMonths: {
1814
1765
  label: "3 месяца",
1815
1766
  from: r,
1816
- to: b(v(r, 2))
1767
+ to: S(b(r, 2))
1817
1768
  },
1818
1769
  nineMonths: {
1819
1770
  label: "9 месяцев",
1820
1771
  from: r,
1821
- to: b(v(r, 8))
1772
+ to: S(b(r, 8))
1822
1773
  },
1823
1774
  firstQuarter: {
1824
1775
  label: "I квартал",
1825
1776
  from: r,
1826
- to: b(v(r, 2))
1777
+ to: S(b(r, 2))
1827
1778
  },
1828
1779
  secondQuarter: {
1829
1780
  label: "II квартал",
1830
- from: v(r, 3),
1831
- to: b(v(r, 5))
1781
+ from: b(r, 3),
1782
+ to: S(b(r, 5))
1832
1783
  },
1833
1784
  thirdQuarter: {
1834
1785
  label: "III квартал",
1835
- from: v(r, 6),
1836
- to: b(v(r, 8))
1786
+ from: b(r, 6),
1787
+ to: S(b(r, 8))
1837
1788
  },
1838
1789
  fourthQuarter: {
1839
1790
  label: "IV квартал",
1840
- from: v(r, 9),
1841
- to: b(v(r, 11))
1791
+ from: b(r, 9),
1792
+ to: S(b(r, 11))
1842
1793
  },
1843
1794
  firstHalfYear: {
1844
1795
  label: "I полугодие",
1845
1796
  from: r,
1846
- to: b(v(r, 5))
1797
+ to: S(b(r, 5))
1847
1798
  },
1848
1799
  secondHalfYear: {
1849
1800
  label: "II полугодие",
1850
- from: v(r, 6),
1801
+ from: b(r, 6),
1851
1802
  to: i
1852
1803
  },
1853
1804
  currentYear: {
@@ -1858,13 +1809,13 @@ var An = class {
1858
1809
  };
1859
1810
  }
1860
1811
  static standardPeriods(e = /* @__PURE__ */ new Date()) {
1861
- let t = { weekStartsOn: 1 }, n = w(e), r = y(e), i = Z.decadeInterval(e), a = T(e), o = je(e), s = Z.startOfHalfYear(e), c = D(e), ee = Z.addHalfYears(e, -1), l = Z.addHalfYears(e, 1);
1812
+ let t = { weekStartsOn: 1 }, n = T(e), r = x(e), i = X.decadeInterval(e), a = E(e), o = Pe(e), s = X.startOfHalfYear(e), c = O(e), ee = X.addHalfYears(e, -1), l = X.addHalfYears(e, 1);
1862
1813
  return {
1863
1814
  yesterday: {
1864
1815
  label: "Вчера",
1865
1816
  group: "day",
1866
- from: w(Fe(e, 1)),
1867
- to: y(Fe(e, 1))
1817
+ from: T(Re(e, 1)),
1818
+ to: x(Re(e, 1))
1868
1819
  },
1869
1820
  today: {
1870
1821
  label: "Сегодня",
@@ -1875,31 +1826,31 @@ var An = class {
1875
1826
  tomorrow: {
1876
1827
  label: "Завтра",
1877
1828
  group: "day",
1878
- from: w(_(e, 1)),
1879
- to: y(_(e, 1))
1829
+ from: T(y(e, 1)),
1830
+ to: x(y(e, 1))
1880
1831
  },
1881
1832
  lastWeek: {
1882
1833
  label: "Прошлая неделя",
1883
1834
  group: "week",
1884
- from: E(Re(e, 1), t),
1885
- to: x(Re(e, 1), t)
1835
+ from: D(Ve(e, 1), t),
1836
+ to: Oe(Ve(e, 1), t)
1886
1837
  },
1887
1838
  thisWeek: {
1888
1839
  label: "Эта неделя",
1889
1840
  group: "week",
1890
- from: E(e, t),
1891
- to: x(e, t)
1841
+ from: D(e, t),
1842
+ to: Oe(e, t)
1892
1843
  },
1893
1844
  nextWeek: {
1894
1845
  label: "Следующая неделя",
1895
1846
  group: "week",
1896
- from: E(ye(e, 1), t),
1897
- to: x(ye(e, 1), t)
1847
+ from: D(xe(e, 1), t),
1848
+ to: Oe(xe(e, 1), t)
1898
1849
  },
1899
1850
  lastTenDays: {
1900
1851
  label: "Прошлая декада",
1901
1852
  group: "decade",
1902
- ...Z.shiftDecadeInterval(e, -1)
1853
+ ...X.shiftDecadeInterval(e, -1)
1903
1854
  },
1904
1855
  thisTenDays: {
1905
1856
  label: "Эта декада",
@@ -1909,85 +1860,85 @@ var An = class {
1909
1860
  nextTenDays: {
1910
1861
  label: "Следующая декада",
1911
1862
  group: "decade",
1912
- ...Z.shiftDecadeInterval(e, 1)
1863
+ ...X.shiftDecadeInterval(e, 1)
1913
1864
  },
1914
1865
  lastMonth: {
1915
1866
  label: "Прошлый месяц",
1916
1867
  group: "month",
1917
- from: T(Ie(e, 1)),
1918
- to: b(Ie(e, 1))
1868
+ from: E(ze(e, 1)),
1869
+ to: S(ze(e, 1))
1919
1870
  },
1920
1871
  thisMonth: {
1921
1872
  label: "Этот месяц",
1922
1873
  group: "month",
1923
1874
  from: a,
1924
- to: b(e)
1875
+ to: S(e)
1925
1876
  },
1926
1877
  nextMonth: {
1927
1878
  label: "Следующий месяц",
1928
1879
  group: "month",
1929
- from: T(v(e, 1)),
1930
- to: b(v(e, 1))
1880
+ from: E(b(e, 1)),
1881
+ to: S(b(e, 1))
1931
1882
  },
1932
1883
  lastQuarter: {
1933
1884
  label: "Прошлый квартал",
1934
1885
  group: "quarter",
1935
- from: je(Le(e, 1)),
1936
- to: Ce(Le(e, 1))
1886
+ from: Pe(Be(e, 1)),
1887
+ to: Te(Be(e, 1))
1937
1888
  },
1938
1889
  thisQuarter: {
1939
1890
  label: "Этот квартал",
1940
1891
  group: "quarter",
1941
1892
  from: o,
1942
- to: Ce(e)
1893
+ to: Te(e)
1943
1894
  },
1944
1895
  nextQuarter: {
1945
1896
  label: "Следующий квартал",
1946
1897
  group: "quarter",
1947
- from: je(ve(e, 1)),
1948
- to: Ce(ve(e, 1))
1898
+ from: Pe(be(e, 1)),
1899
+ to: Te(be(e, 1))
1949
1900
  },
1950
1901
  lastHalfYear: {
1951
1902
  label: "Прошлое полугодие",
1952
1903
  group: "halfYear",
1953
- from: Z.startOfHalfYear(ee),
1954
- to: Z.endOfHalfYear(ee)
1904
+ from: X.startOfHalfYear(ee),
1905
+ to: X.endOfHalfYear(ee)
1955
1906
  },
1956
1907
  thisHalfYear: {
1957
1908
  label: "Это полугодие",
1958
1909
  group: "halfYear",
1959
1910
  from: s,
1960
- to: Z.endOfHalfYear(e)
1911
+ to: X.endOfHalfYear(e)
1961
1912
  },
1962
1913
  nextHalfYear: {
1963
1914
  label: "Следующее полугодие",
1964
1915
  group: "halfYear",
1965
- from: Z.startOfHalfYear(l),
1966
- to: Z.endOfHalfYear(l)
1916
+ from: X.startOfHalfYear(l),
1917
+ to: X.endOfHalfYear(l)
1967
1918
  },
1968
1919
  lastYear: {
1969
1920
  label: "Прошлый год",
1970
1921
  group: "year",
1971
- from: D(ze(e, 1)),
1972
- to: Ee(ze(e, 1))
1922
+ from: O(He(e, 1)),
1923
+ to: ke(He(e, 1))
1973
1924
  },
1974
1925
  thisYear: {
1975
1926
  label: "Этот год",
1976
1927
  group: "year",
1977
1928
  from: c,
1978
- to: Ee(e)
1929
+ to: ke(e)
1979
1930
  },
1980
1931
  nextYear: {
1981
1932
  label: "Следующий год",
1982
1933
  group: "year",
1983
- from: D(be(e, 1)),
1984
- to: Ee(be(e, 1))
1934
+ from: O(Se(e, 1)),
1935
+ to: ke(Se(e, 1))
1985
1936
  },
1986
1937
  fromBeginningOfThisWeek: {
1987
1938
  label: "С начала этой недели",
1988
1939
  group: "other",
1989
1940
  section: "fromBeginning",
1990
- from: E(e, t),
1941
+ from: D(e, t),
1991
1942
  to: r
1992
1943
  },
1993
1944
  fromBeginningOfThisTenDays: {
@@ -2030,7 +1981,7 @@ var An = class {
2030
1981
  group: "other",
2031
1982
  section: "tillEnd",
2032
1983
  from: n,
2033
- to: x(e, t)
1984
+ to: Oe(e, t)
2034
1985
  },
2035
1986
  tillEndOfThisTenDays: {
2036
1987
  label: "До конца этой декады",
@@ -2044,106 +1995,106 @@ var An = class {
2044
1995
  group: "other",
2045
1996
  section: "tillEnd",
2046
1997
  from: n,
2047
- to: b(e)
1998
+ to: S(e)
2048
1999
  },
2049
2000
  tillEndOfThisQuarter: {
2050
2001
  label: "До конца этого квартала",
2051
2002
  group: "other",
2052
2003
  section: "tillEnd",
2053
2004
  from: n,
2054
- to: Ce(e)
2005
+ to: Te(e)
2055
2006
  },
2056
2007
  tillEndOfThisHalfYear: {
2057
2008
  label: "До конца этого полугодия",
2058
2009
  group: "other",
2059
2010
  section: "tillEnd",
2060
2011
  from: n,
2061
- to: Z.endOfHalfYear(e)
2012
+ to: X.endOfHalfYear(e)
2062
2013
  },
2063
2014
  tillEndOfThisYear: {
2064
2015
  label: "До конца этого года",
2065
2016
  group: "other",
2066
2017
  section: "tillEnd",
2067
2018
  from: n,
2068
- to: Ee(e)
2019
+ to: ke(e)
2069
2020
  },
2070
2021
  lastWeekTillSameWeekDay: {
2071
2022
  label: "Прошлая неделя, до такого же дня недели",
2072
2023
  group: "other",
2073
2024
  section: "lastTillSame",
2074
- ...Z.weekTillSameWeekday(e, -1)
2025
+ ...X.weekTillSameWeekday(e, -1)
2075
2026
  },
2076
2027
  lastTenDaysTillSameDayNumber: {
2077
2028
  label: "Прошлая декада, до такого же номера дня",
2078
2029
  group: "other",
2079
2030
  section: "lastTillSame",
2080
- ...Z.decadeTillSameDayNumber(e, -1)
2031
+ ...X.decadeTillSameDayNumber(e, -1)
2081
2032
  },
2082
2033
  lastMonthTillSameDate: {
2083
2034
  label: "Прошлый месяц, до такой же даты",
2084
2035
  group: "other",
2085
2036
  section: "lastTillSame",
2086
- ...Z.intervalTillSameDate(a, T(Ie(e, 1)), e)
2037
+ ...X.intervalTillSameDate(a, E(ze(e, 1)), e)
2087
2038
  },
2088
2039
  lastQuarterTillSameDate: {
2089
2040
  label: "Прошлый квартал, до такой же даты",
2090
2041
  group: "other",
2091
2042
  section: "lastTillSame",
2092
- ...Z.intervalTillSameDate(o, je(Le(e, 1)), e)
2043
+ ...X.intervalTillSameDate(o, Pe(Be(e, 1)), e)
2093
2044
  },
2094
2045
  lastHalfYearTillSameDate: {
2095
2046
  label: "Прошлое полугодие, до такой же даты",
2096
2047
  group: "other",
2097
2048
  section: "lastTillSame",
2098
- ...Z.intervalTillSameDate(s, Z.startOfHalfYear(ee), e)
2049
+ ...X.intervalTillSameDate(s, X.startOfHalfYear(ee), e)
2099
2050
  },
2100
2051
  lastYearTillSameDate: {
2101
2052
  label: "Прошлый год, до такой же даты",
2102
2053
  group: "other",
2103
2054
  section: "lastTillSame",
2104
- ...Z.intervalTillSameDate(c, D(ze(e, 1)), e)
2055
+ ...X.intervalTillSameDate(c, O(He(e, 1)), e)
2105
2056
  },
2106
2057
  nextWeekTillSameWeekDay: {
2107
2058
  label: "Следующая неделя, до такого же дня недели",
2108
2059
  group: "other",
2109
2060
  section: "nextTillSame",
2110
- ...Z.weekTillSameWeekday(e, 1)
2061
+ ...X.weekTillSameWeekday(e, 1)
2111
2062
  },
2112
2063
  nextTenDaysTillSameDayNumber: {
2113
2064
  label: "Следующая декада, до такого же номера дня",
2114
2065
  group: "other",
2115
2066
  section: "nextTillSame",
2116
- ...Z.decadeTillSameDayNumber(e, 1)
2067
+ ...X.decadeTillSameDayNumber(e, 1)
2117
2068
  },
2118
2069
  nextMonthTillSameDate: {
2119
2070
  label: "Следующий месяц, до такой же даты",
2120
2071
  group: "other",
2121
2072
  section: "nextTillSame",
2122
- ...Z.intervalTillSameDate(a, T(v(e, 1)), e)
2073
+ ...X.intervalTillSameDate(a, E(b(e, 1)), e)
2123
2074
  },
2124
2075
  nextQuarterTillSameDate: {
2125
2076
  label: "Следующий квартал, до такой же даты",
2126
2077
  group: "other",
2127
2078
  section: "nextTillSame",
2128
- ...Z.intervalTillSameDate(o, je(ve(e, 1)), e)
2079
+ ...X.intervalTillSameDate(o, Pe(be(e, 1)), e)
2129
2080
  },
2130
2081
  nextHalfYearTillSameDate: {
2131
2082
  label: "Следующее полугодие, до такой же даты",
2132
2083
  group: "other",
2133
2084
  section: "nextTillSame",
2134
- ...Z.intervalTillSameDate(s, Z.startOfHalfYear(l), e)
2085
+ ...X.intervalTillSameDate(s, X.startOfHalfYear(l), e)
2135
2086
  },
2136
2087
  nextYearTillSameDate: {
2137
2088
  label: "Следующий год, до такой же даты",
2138
2089
  group: "other",
2139
2090
  section: "nextTillSame",
2140
- ...Z.intervalTillSameDate(c, D(be(e, 1)), e)
2091
+ ...X.intervalTillSameDate(c, O(Se(e, 1)), e)
2141
2092
  },
2142
2093
  last7Days: {
2143
2094
  label: "Последние 7 дней",
2144
2095
  group: "other",
2145
2096
  section: "rollingDays",
2146
- from: w(Fe(e, 6)),
2097
+ from: T(Re(e, 6)),
2147
2098
  to: r
2148
2099
  },
2149
2100
  next7Days: {
@@ -2151,11 +2102,11 @@ var An = class {
2151
2102
  group: "other",
2152
2103
  section: "rollingDays",
2153
2104
  from: n,
2154
- to: y(_(e, 6))
2105
+ to: x(y(e, 6))
2155
2106
  }
2156
2107
  };
2157
2108
  }
2158
- }, jn = [
2109
+ }, Mn = [
2159
2110
  {
2160
2111
  key: "day",
2161
2112
  label: "День"
@@ -2188,7 +2139,7 @@ var An = class {
2188
2139
  key: "other",
2189
2140
  label: "Прочее"
2190
2141
  }
2191
- ], Mn = [
2142
+ ], Nn = [
2192
2143
  {
2193
2144
  key: "fromBeginning",
2194
2145
  label: "С начала периода"
@@ -2209,13 +2160,7 @@ var An = class {
2209
2160
  key: "rollingDays",
2210
2161
  label: "7 дней"
2211
2162
  }
2212
- ], Nn = class extends d {
2213
- city;
2214
- isActive;
2215
- constructor(e) {
2216
- super(e), this.city = e?.city ? new t(e.city) : void 0, this.isActive = e?.isActive ?? !1;
2217
- }
2218
- }, Pn = class {
2163
+ ], Pn = class extends pn {}, Fn = class {
2219
2164
  salesDirections;
2220
2165
  partnerGroups;
2221
2166
  managers;
@@ -2226,10 +2171,10 @@ var An = class {
2226
2171
  lastLoginDate;
2227
2172
  lastOrderDate;
2228
2173
  constructor(e) {
2229
- this.salesDirections = j(e?.salesDirections ?? [], (e) => new m(e)), this.partnerGroups = j(e?.partnerGroups ?? [], (e) => new p(e)), this.managers = j(e?.managers ?? [], (e) => new I(e)), this.additionalClients = j(e?.additionalClients ?? [], (e) => new Nn(e)), this.fixedClients = j(e?.fixedClients ?? [], (e) => new Nn(e)), this.regions = j(e?.regions ?? [], (e) => new ue(e)), this.cities = j(e?.cities ?? [], (e) => new t(e)), this.lastLoginDate = new P(e?.lastLoginDate), this.lastOrderDate = new P(e?.lastOrderDate);
2174
+ this.salesDirections = j(e?.salesDirections ?? [], (e) => new g(e)), this.partnerGroups = j(e?.partnerGroups ?? [], (e) => new h(e)), this.managers = j(e?.managers ?? [], (e) => new F(e)), this.additionalClients = j(e?.additionalClients ?? [], (e) => new Pn(e)), this.fixedClients = j(e?.fixedClients ?? [], (e) => new Pn(e)), this.regions = j(e?.regions ?? [], (e) => new fe(e)), this.cities = j(e?.cities ?? [], (e) => new n(e)), this.lastLoginDate = new P(e?.lastLoginDate), this.lastOrderDate = new P(e?.lastOrderDate);
2230
2175
  }
2231
2176
  hasClientConditions() {
2232
- return $e([
2177
+ return nt([
2233
2178
  this.salesDirections,
2234
2179
  this.partnerGroups,
2235
2180
  this.managers,
@@ -2237,12 +2182,12 @@ var An = class {
2237
2182
  this.fixedClients,
2238
2183
  this.regions,
2239
2184
  this.cities
2240
- ], (e) => !Ge(e)) || $e([this.lastLoginDate, this.lastOrderDate], (e) => !!e.from || !!e.to);
2185
+ ], (e) => !Ye(e)) || nt([this.lastLoginDate, this.lastOrderDate], (e) => !!e.from || !!e.to);
2241
2186
  }
2242
2187
  setPeriod(e, t) {
2243
2188
  return this[e] = new P({
2244
- from: t?.from ? w(t.from) : null,
2245
- to: t?.to ? y(t.to) : null
2189
+ from: t?.from ? T(t.from) : null,
2190
+ to: t?.to ? x(t.to) : null
2246
2191
  }), this;
2247
2192
  }
2248
2193
  toSaveData() {
@@ -2257,13 +2202,13 @@ var An = class {
2257
2202
  lastOrderDate: new P(this.lastOrderDate)
2258
2203
  };
2259
2204
  }
2260
- }, Fn = /* @__PURE__ */ function(e) {
2205
+ }, In = /* @__PURE__ */ function(e) {
2261
2206
  return e.Active = "active", e.Scheduled = "scheduled", e.Completed = "completed", e;
2262
- }({}), In = class {
2207
+ }({}), Ln = class {
2263
2208
  static resolve(e, t = /* @__PURE__ */ new Date()) {
2264
- return e.deletedAt && e.deletedAt.getTime() <= t.getTime() ? Fn.Completed : e.publishedAt && e.publishedAt.getTime() > t.getTime() ? Fn.Scheduled : Fn.Active;
2209
+ return e.deletedAt && e.deletedAt.getTime() <= t.getTime() ? In.Completed : e.publishedAt && e.publishedAt.getTime() > t.getTime() ? In.Scheduled : In.Active;
2265
2210
  }
2266
- }, Ln = class extends pt {
2211
+ }, Rn = class extends pt {
2267
2212
  conditions;
2268
2213
  products;
2269
2214
  productCategories;
@@ -2272,10 +2217,10 @@ var An = class {
2272
2217
  countDiscountedProducts;
2273
2218
  countDiscountedClients;
2274
2219
  constructor(e) {
2275
- super(e), this.conditions = new Pn(e?.conditions), this.products = j(e?.products ?? [], (e) => new z(e)), this.productCategories = j(e?.productCategories ?? [], (e) => new U(e)), this.countDiscountedPrices = e?.countDiscountedPrices ?? 0, this.expectedCountDiscountedPrices = e?.expectedCountDiscountedPrices ?? 0, this.countDiscountedProducts = e?.countDiscountedProducts ?? 0, this.countDiscountedClients = e?.countDiscountedClients ?? 0;
2220
+ super(e), this.conditions = new Fn(e?.conditions), this.products = j(e?.products ?? [], (e) => new R(e)), this.productCategories = j(e?.productCategories ?? [], (e) => new H(e)), this.countDiscountedPrices = e?.countDiscountedPrices ?? 0, this.expectedCountDiscountedPrices = e?.expectedCountDiscountedPrices ?? 0, this.countDiscountedProducts = e?.countDiscountedProducts ?? 0, this.countDiscountedClients = e?.countDiscountedClients ?? 0;
2276
2221
  }
2277
2222
  getState(e = /* @__PURE__ */ new Date()) {
2278
- return In.resolve(this, e);
2223
+ return Ln.resolve(this, e);
2279
2224
  }
2280
2225
  assignCounters(e) {
2281
2226
  this.countDiscountedPrices = e.countDiscountedPrices, this.expectedCountDiscountedPrices = e.expectedCountDiscountedPrices, this.countDiscountedProducts = e.countDiscountedProducts, this.countDiscountedClients = e.countDiscountedClients;
@@ -2296,7 +2241,7 @@ var An = class {
2296
2241
  conditions: this.conditions.toSaveData()
2297
2242
  };
2298
2243
  }
2299
- }, Rn = class {
2244
+ }, zn = class {
2300
2245
  client;
2301
2246
  additionalClientsCondition;
2302
2247
  fixedClientsCondition;
@@ -2306,12 +2251,12 @@ var An = class {
2306
2251
  regionsCondition;
2307
2252
  salesDirectionsCondition;
2308
2253
  constructor(e) {
2309
- this.client = new Nn(e?.client), this.additionalClientsCondition = e?.additionalClientsCondition ?? !1, this.fixedClientsCondition = e?.fixedClientsCondition ?? !1, this.partnerGroupsCondition = e?.partnerGroupsCondition ?? !1, this.managersCondition = e?.managersCondition ?? !1, this.citiesCondition = e?.citiesCondition ?? !1, this.regionsCondition = e?.regionsCondition ?? !1, this.salesDirectionsCondition = e?.salesDirectionsCondition ?? !1;
2254
+ this.client = new Pn(e?.client), this.additionalClientsCondition = e?.additionalClientsCondition ?? !1, this.fixedClientsCondition = e?.fixedClientsCondition ?? !1, this.partnerGroupsCondition = e?.partnerGroupsCondition ?? !1, this.managersCondition = e?.managersCondition ?? !1, this.citiesCondition = e?.citiesCondition ?? !1, this.regionsCondition = e?.regionsCondition ?? !1, this.salesDirectionsCondition = e?.salesDirectionsCondition ?? !1;
2310
2255
  }
2311
2256
  isEligible() {
2312
2257
  return this.additionalClientsCondition || this.fixedClientsCondition || this.partnerGroupsCondition || this.managersCondition || this.citiesCondition || this.regionsCondition || this.salesDirectionsCondition;
2313
2258
  }
2314
- }, zn = class extends N {
2259
+ }, Bn = class extends N {
2315
2260
  id;
2316
2261
  name;
2317
2262
  states;
@@ -2326,16 +2271,16 @@ var An = class {
2326
2271
  }
2327
2272
  return this;
2328
2273
  }
2329
- }, Bn = class e extends F {
2274
+ }, Vn = class t extends e {
2330
2275
  static prepareSaveData(e, t) {
2331
2276
  return {
2332
2277
  ...e,
2333
- publishedAt: o.toApiFormat(e.publishedAt),
2334
- deletedAt: o.toApiFormat(e.deletedAt),
2278
+ publishedAt: s.toApiFormat(e.publishedAt),
2279
+ deletedAt: s.toApiFormat(e.deletedAt),
2335
2280
  conditions: {
2336
2281
  ...e.conditions,
2337
- lastLoginDate: o.periodToApiFormat(e.conditions.lastLoginDate),
2338
- lastOrderDate: o.periodToApiFormat(e.conditions.lastOrderDate),
2282
+ lastLoginDate: s.periodToApiFormat(e.conditions.lastLoginDate),
2283
+ lastOrderDate: s.periodToApiFormat(e.conditions.lastOrderDate),
2339
2284
  updateFixedClients: t
2340
2285
  }
2341
2286
  };
@@ -2344,33 +2289,33 @@ var An = class {
2344
2289
  return this.getTypedPaginated(pt, "/internal/price/discounts", e, t, n, {}, void 0, r);
2345
2290
  }
2346
2291
  getDiscount(e) {
2347
- return this.get(`/internal/price/discounts/${e}`, {}, (e) => new Ln(e.data));
2292
+ return this.get(`/internal/price/discounts/${e}`, {}, (e) => new Rn(e.data));
2348
2293
  }
2349
- createDiscount(t, n, r = {}) {
2350
- return this.post("/internal/price/discounts", e.prepareSaveData(t, n), (e) => new Ln(e.data), r);
2294
+ createDiscount(e, n, r = {}) {
2295
+ return this.post("/internal/price/discounts", t.prepareSaveData(e, n), (e) => new Rn(e.data), r);
2351
2296
  }
2352
- updateDiscount(t, n, r, i = {}) {
2353
- return this.patch(`/internal/price/discounts/${t}`, e.prepareSaveData(n, r), (e) => new Ln(e.data), i);
2297
+ updateDiscount(e, n, r, i = {}) {
2298
+ return this.patch(`/internal/price/discounts/${e}`, t.prepareSaveData(n, r), (e) => new Rn(e.data), i);
2354
2299
  }
2355
2300
  removeDiscount(e) {
2356
2301
  return this.delete(`/internal/price/discounts/${e}`);
2357
2302
  }
2358
2303
  getEligibleClients(e) {
2359
- return this.getTypedList(Rn, `/internal/price/discounts/${e}/clients`);
2304
+ return this.getTypedList(zn, `/internal/price/discounts/${e}/clients`);
2360
2305
  }
2361
2306
  checkClient(e, t) {
2362
- return this.get(`/internal/price/discounts/${e}/clients/${t}/check`, {}, (e) => new Rn(e.data));
2307
+ return this.get(`/internal/price/discounts/${e}/clients/${t}/check`, {}, (e) => new zn(e.data));
2363
2308
  }
2364
- }, Vn = class extends d {
2309
+ }, Hn = class extends p {
2365
2310
  constructor(e) {
2366
2311
  super(e);
2367
2312
  }
2368
- }, Hn = class extends u {
2313
+ }, Un = class extends d {
2369
2314
  question;
2370
2315
  answer;
2371
2316
  groups;
2372
2317
  constructor(e) {
2373
- super(e, -1), this.question = e?.question ?? "", this.answer = e?.answer ?? "", this.groups = j(e?.groups ?? [], (e) => new Vn(e));
2318
+ super(e, -1), this.question = e?.question ?? "", this.answer = e?.answer ?? "", this.groups = j(e?.groups ?? [], (e) => new Hn(e));
2374
2319
  }
2375
2320
  toSaveData() {
2376
2321
  return {
@@ -2379,30 +2324,30 @@ var An = class {
2379
2324
  groups: j(this.groups, "id")
2380
2325
  };
2381
2326
  }
2382
- }, Un = class extends F {
2327
+ }, Wn = class extends e {
2383
2328
  getFaqList(e, t) {
2384
- return this.getTypedPaginated(Hn, "/internal/faq", void 0, void 0, t, k(e) ? {} : { group: e });
2329
+ return this.getTypedPaginated(Un, "/internal/faq", void 0, void 0, t, k(e) ? {} : { group: e });
2385
2330
  }
2386
2331
  getFaq(e) {
2387
- return this.get(`/internal/faq/${e}`, {}, (e) => new Hn(e.data));
2332
+ return this.get(`/internal/faq/${e}`, {}, (e) => new Un(e.data));
2388
2333
  }
2389
2334
  createFaq(e, t = {}) {
2390
- return this.post("/internal/faq", e, (e) => new Hn(e.data), t);
2335
+ return this.post("/internal/faq", e, (e) => new Un(e.data), t);
2391
2336
  }
2392
2337
  updateFaq(e, t, n = {}) {
2393
- return this.patch(`/internal/faq/${e}`, t, (e) => new Hn(e.data), n);
2338
+ return this.patch(`/internal/faq/${e}`, t, (e) => new Un(e.data), n);
2394
2339
  }
2395
2340
  removeFaq(e) {
2396
2341
  return this.delete(`/internal/faq/${e}`);
2397
2342
  }
2398
2343
  getGroupsList() {
2399
- return this.getTypedList(Vn, "/internal/faq/groups");
2344
+ return this.getTypedList(Hn, "/internal/faq/groups");
2400
2345
  }
2401
2346
  createGroup(e, t = {}) {
2402
- return this.post("/internal/faq/groups", e, (e) => new Vn(e.data), t);
2347
+ return this.post("/internal/faq/groups", e, (e) => new Hn(e.data), t);
2403
2348
  }
2404
2349
  updateGroup(e, t, n = {}) {
2405
- return this.patch(`/internal/faq/groups/${e}`, t, (e) => new Vn(e.data), n);
2350
+ return this.patch(`/internal/faq/groups/${e}`, t, (e) => new Hn(e.data), n);
2406
2351
  }
2407
2352
  removeGroup(e) {
2408
2353
  return this.delete(`/internal/faq/groups/${e}`);
@@ -2410,13 +2355,13 @@ var An = class {
2410
2355
  };
2411
2356
  //#endregion
2412
2357
  //#region src/helpers/format-percent-change.ts
2413
- function Wn(e) {
2414
- let t = Qe(e * 100);
2358
+ function Gn(e) {
2359
+ let t = tt(e * 100);
2415
2360
  return `${t >= 0 ? "+" : ""}${t}%`;
2416
2361
  }
2417
2362
  //#endregion
2418
2363
  //#region src/helpers/units-helper.ts
2419
- var Gn = class e {
2364
+ var Kn = class e {
2420
2365
  static productIsMeasurable(e) {
2421
2366
  return e.unit.isLinear || e.unit.isSquare;
2422
2367
  }
@@ -2426,9 +2371,9 @@ var Gn = class e {
2426
2371
  static getProductLengthMultiplicity(e) {
2427
2372
  return e.properties?.lengthStep == null ? !e.properties?.ignoreMinCountCheck && e.properties?.minCount != null ? e.properties.minCount : .01 : e.properties.lengthStep;
2428
2373
  }
2429
- }, Kn = class {
2374
+ }, qn = class {
2430
2375
  static generateUndefinedManagerInstance() {
2431
- return new te({
2376
+ return new f({
2432
2377
  id: 0,
2433
2378
  name: "- Не назначен -",
2434
2379
  isActive: !0,
@@ -2438,18 +2383,74 @@ var Gn = class e {
2438
2383
  static isUndefinedManagerInstance(e) {
2439
2384
  return e.id === 0 && e.guid === "-undefined-";
2440
2385
  }
2441
- }, qn = /* @__PURE__ */ function(e) {
2386
+ }, Jn = class extends N {
2387
+ name;
2388
+ phone;
2389
+ email;
2390
+ salesDirections;
2391
+ isActive;
2392
+ isSupervisor;
2393
+ canDoReclamations;
2394
+ constructor(e) {
2395
+ super(), this.name = e?.name, this.phone = e?.phone, this.email = e?.email, this.salesDirections = e?.salesDirections?.map((e) => new g(e)), this.isActive = e?.isActive, this.isSupervisor = e?.isSupervisor, this.canDoReclamations = e?.canDoReclamations;
2396
+ }
2397
+ resetFilterValue(e) {
2398
+ switch (e) {
2399
+ case "name":
2400
+ case "phone":
2401
+ case "email":
2402
+ case "salesDirections":
2403
+ case "isActive":
2404
+ case "isSupervisor":
2405
+ case "canDoReclamations": this[e] = void 0;
2406
+ }
2407
+ return this;
2408
+ }
2409
+ }, Yn = class e extends ie {
2410
+ static transformManagerDataToRequest(e) {
2411
+ return {
2412
+ name: e.name,
2413
+ phone: e.contacts?.phone ?? "",
2414
+ email: e.contacts?.email ?? "",
2415
+ password: e.password,
2416
+ isActive: e.isActive,
2417
+ isSupervisor: e.isSupervisor,
2418
+ canDoReclamations: e.canDoReclamations,
2419
+ authAsOperator: e.authAsOperator ?? !1,
2420
+ salesDirectionId: e.salesDirection.id,
2421
+ pricingRoleId: e.pricingRole?.id,
2422
+ showAllCosts: e.showAllCosts ?? !1,
2423
+ storeIds: j(e.stores, "id"),
2424
+ curatedDirectionIds: j(e.curatedDirections, "id"),
2425
+ managerRegionIds: j(e.managerRegions, "id"),
2426
+ managerIds: j(e.managers, "id"),
2427
+ photo: e.photoFile
2428
+ };
2429
+ }
2430
+ getManagersList(e, t, n, r) {
2431
+ return this.getTypedPaginated(f, "/internal/managers", e, t, n, {}, void 0, r);
2432
+ }
2433
+ createManager(t, n = {}) {
2434
+ return this.post("/internal/managers", e.transformManagerDataToRequest(t), (e) => new f(e.data), n);
2435
+ }
2436
+ updateManager(t, n = {}) {
2437
+ return this.patch(`/internal/managers/${t.id}`, e.transformManagerDataToRequest(t), (e) => new f(e.data), n);
2438
+ }
2439
+ getManagerRegionsList(e, t, n) {
2440
+ return this.getTypedPaginated(_e, "/internal/managers/regions", e, t, n);
2441
+ }
2442
+ }, Xn = /* @__PURE__ */ function(e) {
2442
2443
  return e.Processing = "processing", e.Completed = "completed", e.Error = "error", e.NeedsActualization = "needs_actualization", e;
2443
- }({}), Jn = class {
2444
+ }({}), Zn = class {
2444
2445
  status;
2445
2446
  actualizedAt;
2446
2447
  expiresAt;
2447
2448
  error;
2448
2449
  constructor(e) {
2449
- this.status = e?.status ?? qn.Processing, this.actualizedAt = o.parse(e?.actualizedAt), this.expiresAt = o.parse(e?.expiresAt), this.error = e?.error;
2450
+ this.status = e?.status ?? Xn.Processing, this.actualizedAt = s.parse(e?.actualizedAt), this.expiresAt = s.parse(e?.expiresAt), this.error = e?.error;
2450
2451
  }
2451
2452
  get isProcessing() {
2452
- return this.status === qn.Processing;
2453
+ return this.status === Xn.Processing;
2453
2454
  }
2454
2455
  get isOutdated() {
2455
2456
  return this.isOutdatedAt(/* @__PURE__ */ new Date());
@@ -2458,12 +2459,12 @@ var Gn = class e {
2458
2459
  return this.isOrderAllowedAt(/* @__PURE__ */ new Date());
2459
2460
  }
2460
2461
  isOutdatedAt(e) {
2461
- return this.status !== qn.Completed || k(this.actualizedAt) ? !0 : !k(this.expiresAt) && this.expiresAt.getTime() < e.getTime();
2462
+ return this.status !== Xn.Completed || k(this.actualizedAt) ? !0 : !k(this.expiresAt) && this.expiresAt.getTime() < e.getTime();
2462
2463
  }
2463
2464
  isOrderAllowedAt(e) {
2464
- return this.status === qn.Completed && !this.isOutdatedAt(e);
2465
+ return this.status === Xn.Completed && !this.isOutdatedAt(e);
2465
2466
  }
2466
- }, Yn = class extends M {
2467
+ }, Qn = class extends M {
2467
2468
  name;
2468
2469
  client;
2469
2470
  sum;
@@ -2471,9 +2472,9 @@ var Gn = class e {
2471
2472
  actualization;
2472
2473
  file;
2473
2474
  constructor(e) {
2474
- super(e), this.name = e?.name, this.client = new W(e?.client), this.sum = e?.sum, this.isProfstroy = e?.isProfstroy, this.actualization = e?.actualization && new Jn(e.actualization), this.file = e?.file;
2475
+ super(e), this.name = e?.name, this.client = new U(e?.client), this.sum = e?.sum, this.isProfstroy = e?.isProfstroy, this.actualization = e?.actualization && new Zn(e.actualization), this.file = e?.file;
2475
2476
  }
2476
- }, Xn = class extends Ct {
2477
+ }, $n = class extends Ct {
2477
2478
  groupName;
2478
2479
  supplierSku;
2479
2480
  isIgnored;
@@ -2485,15 +2486,15 @@ var Gn = class e {
2485
2486
  return k(this.product.id);
2486
2487
  }
2487
2488
  get isOrderable() {
2488
- return !this.isProductStub && !this.isIgnored && Ge(this.lineError);
2489
+ return !this.isProductStub && !this.isIgnored && Ye(this.lineError);
2489
2490
  }
2490
- }, Q = class extends Yn {
2491
+ }, Z = class extends Qn {
2491
2492
  sum;
2492
2493
  products;
2493
2494
  constructor(e) {
2494
- super(e), this.sum = e.sum ?? 0, this.products = (e.products ?? []).map((t) => e.isProfstroy ? new Xn(t) : new Ct(t));
2495
+ super(e), this.sum = e.sum ?? 0, this.products = (e.products ?? []).map((t) => e.isProfstroy ? new $n(t) : new Ct(t));
2495
2496
  }
2496
- }, Zn = class extends N {
2497
+ }, er = class extends N {
2497
2498
  id;
2498
2499
  clientSearchTerm;
2499
2500
  name;
@@ -2508,7 +2509,7 @@ var Gn = class e {
2508
2509
  let e = super.asClearRaw();
2509
2510
  return !e?.createdAt?.from && !e?.createdAt?.to && delete e.createdAt, e;
2510
2511
  }
2511
- }, Qn = class extends hn {
2512
+ }, tr = class extends gn {
2512
2513
  client;
2513
2514
  payment;
2514
2515
  delivery;
@@ -2523,20 +2524,20 @@ var Gn = class e {
2523
2524
  sum;
2524
2525
  isLargeOrder;
2525
2526
  constructor(e) {
2526
- super(e), this.client = new W(e?.client), this.payment = {
2527
+ super(e), this.client = new U(e?.client), this.payment = {
2527
2528
  type: e?.payment?.type ?? -1,
2528
2529
  status: e?.payment?.status ?? -1,
2529
2530
  onlinePaymentLink: e?.payment?.onlinePaymentLink
2530
2531
  }, this.delivery = {
2531
2532
  type: e?.delivery?.type ?? -1,
2532
- date: A(e?.delivery?.date) ? C(e.delivery.date) : e?.delivery?.date ?? /* @__PURE__ */ new Date(),
2533
- address: e?.delivery?.address ? new X(e.delivery.address) : void 0,
2534
- warehouse: e?.delivery?.warehouse ? new ge(e.delivery.warehouse) : void 0
2535
- }, this.attachedUser = e?.attachedUser ? new I(e?.attachedUser) : void 0, this.status = new ae(e?.status), this.statusDetail = e?.statusDetail ? new le(e.statusDetail) : void 0, this.salesDirection = new m(e?.salesDirection);
2533
+ date: A(e?.delivery?.date) ? w(e.delivery.date) : e?.delivery?.date ?? /* @__PURE__ */ new Date(),
2534
+ address: e?.delivery?.address ? new Y(e.delivery.address) : void 0,
2535
+ warehouse: e?.delivery?.warehouse ? new ve(e.delivery.warehouse) : void 0
2536
+ }, this.attachedUser = e?.attachedUser ? new F(e?.attachedUser) : void 0, this.status = new se(e?.status), this.statusDetail = e?.statusDetail ? new de(e.statusDetail) : void 0, this.salesDirection = new g(e?.salesDirection);
2536
2537
  let t = e?.attachedAt;
2537
- this.attachedAt = A(t) ? C(t) : e?.attachedAt, this.isOnOrder = e?.isOnOrder ?? !1, this.isProfstroy = e?.isProfstroy ?? !1, this.isNotInStock = e?.isNotInStock ?? !1, this.sum = e?.sum ?? 0, this.isLargeOrder = e?.isLargeOrder ?? !1;
2538
+ this.attachedAt = A(t) ? w(t) : e?.attachedAt, this.isOnOrder = e?.isOnOrder ?? !1, this.isProfstroy = e?.isProfstroy ?? !1, this.isNotInStock = e?.isNotInStock ?? !1, this.sum = e?.sum ?? 0, this.isLargeOrder = e?.isLargeOrder ?? !1;
2538
2539
  }
2539
- }, $n = class extends St {
2540
+ }, nr = class extends St {
2540
2541
  product;
2541
2542
  cost;
2542
2543
  costOne;
@@ -2550,9 +2551,9 @@ var Gn = class e {
2550
2551
  changedFields = [];
2551
2552
  replacement;
2552
2553
  constructor(e, t) {
2553
- super(e), this.product = new B(e.product), this.currency = new a(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 = O(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"));
2554
+ super(e), this.product = new z(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 = qe(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"));
2554
2555
  }
2555
- }, $ = class extends Qn {
2556
+ }, Q = class extends tr {
2556
2557
  products;
2557
2558
  invoices;
2558
2559
  comment;
@@ -2568,46 +2569,46 @@ var Gn = class e {
2568
2569
  erpOrderUrl;
2569
2570
  numberDoc;
2570
2571
  constructor(e) {
2571
- super(e), this.products = (e.products ?? []).map((t) => new $n(t, t.replacementId ? e.products?.find((e) => e.id === t.replacementId) : void 0)), this.invoices = e.invoices ?? [], this.comment = e.comment, this.image = e.image, this.contragent = e.contragent ? fn.createInstance(e.contragent) : void 0, this.barcode = e.barcode, this.orderSource = e.orderSource ? new le(e.orderSource) : void 0, this.isAllowProcessingWithoutPayment = e.isAllowProcessingWithoutPayment, this.nextStatuses = e.nextStatuses?.map((e) => new ae(e)), this.actions = e.actions, this.operatorsComment = e.operatorsComment, this.operatorsForWarehouseComment = e.operatorsForWarehouseComment, this.erpOrderUrl = e.erpOrderUrl, this.numberDoc = e.numberDoc;
2572
+ super(e), this.products = (e.products ?? []).map((t) => new nr(t, t.replacementId ? e.products?.find((e) => e.id === t.replacementId) : void 0)), this.invoices = e.invoices ?? [], this.comment = e.comment, this.image = e.image, this.contragent = e.contragent ? fn.createInstance(e.contragent) : void 0, this.barcode = e.barcode, this.orderSource = e.orderSource ? new de(e.orderSource) : void 0, this.isAllowProcessingWithoutPayment = e.isAllowProcessingWithoutPayment, this.nextStatuses = e.nextStatuses?.map((e) => new se(e)), this.actions = e.actions, this.operatorsComment = e.operatorsComment, this.operatorsForWarehouseComment = e.operatorsForWarehouseComment, this.erpOrderUrl = e.erpOrderUrl, this.numberDoc = e.numberDoc;
2572
2573
  }
2573
- }, er = class extends F {
2574
+ }, rr = class extends e {
2574
2575
  getOffers(e, t, n, r) {
2575
- return this.getTypedPaginated(Yn, "/internal/orders/offers", e, t, n, {}, void 0, r);
2576
+ return this.getTypedPaginated(Qn, "/internal/orders/offers", e, t, n, {}, void 0, r);
2576
2577
  }
2577
2578
  createOfferFromCart(e, t, n) {
2578
2579
  return this.post(`/internal/orders/offers/${e}`, {
2579
2580
  name: t,
2580
2581
  items: n?.length ? n : void 0
2581
- }, (e) => new Q(e.data));
2582
+ }, (e) => new Z(e.data));
2582
2583
  }
2583
2584
  createProfstroyOffer(e, t, n, r = {}) {
2584
2585
  return this.post(`/internal/orders/offers/${e}/profstroy`, {
2585
2586
  file: t,
2586
2587
  name: n
2587
- }, (e) => new Q(e.data), r);
2588
+ }, (e) => new Z(e.data), r);
2588
2589
  }
2589
2590
  actualizeProfstroyOffer(e) {
2590
- return this.post(`/internal/orders/offers/${e}/profstroy/actualize`, {}, (e) => new Q(e.data));
2591
+ return this.post(`/internal/orders/offers/${e}/profstroy/actualize`, {}, (e) => new Z(e.data));
2591
2592
  }
2592
2593
  reloadProfstroyOffer(e) {
2593
- return this.post(`/internal/orders/offers/${e}/profstroy/reload`, {}, (e) => new Q(e.data));
2594
+ return this.post(`/internal/orders/offers/${e}/profstroy/reload`, {}, (e) => new Z(e.data));
2594
2595
  }
2595
2596
  getOffer(e) {
2596
- return this.get(`/internal/orders/offers/${e}`, {}, (e) => new Q(e.data));
2597
+ return this.get(`/internal/orders/offers/${e}`, {}, (e) => new Z(e.data));
2597
2598
  }
2598
2599
  updateOffer(e, t) {
2599
- return this.patch(`/internal/orders/offers/${e}`, { name: t }, (e) => new Q(e.data));
2600
+ return this.patch(`/internal/orders/offers/${e}`, { name: t }, (e) => new Z(e.data));
2600
2601
  }
2601
2602
  deleteOffer(e) {
2602
2603
  return this.delete(`/internal/orders/offers/${e}`);
2603
2604
  }
2604
2605
  createOrderFromDraft(e, t, n, r = {}) {
2605
- let i = g().config.dateFormats.api;
2606
+ let i = v().config.dateFormats.api;
2606
2607
  return this.post(`/internal/orders/offers/${e}/create-order`, {
2607
2608
  ...t,
2608
- deliveryDate: t.deliveryDate ? S(t.deliveryDate, i) : void 0,
2609
+ deliveryDate: t.deliveryDate ? C(t.deliveryDate, i) : void 0,
2609
2610
  items: n?.length ? n : void 0
2610
- }, (e) => h.instanceListInitializer($, e.data), r);
2611
+ }, (e) => _.instanceListInitializer(Q, e.data), r);
2611
2612
  }
2612
2613
  addOfferProduct(e, t, n = {}) {
2613
2614
  return this.post(`/internal/orders/offers/${e}/products`, {
@@ -2621,7 +2622,7 @@ var Gn = class e {
2621
2622
  marker: t.marker,
2622
2623
  is_additional_sale: t.isAdditionalSale,
2623
2624
  ...t.configuratorParams
2624
- }, (e) => new Q(e.data), n);
2625
+ }, (e) => new Z(e.data), n);
2625
2626
  }
2626
2627
  patchOfferProduct(e, t, n, r = {}) {
2627
2628
  return this.patch(`/internal/orders/offers/${e}/products/${t}`, {
@@ -2635,10 +2636,10 @@ var Gn = class e {
2635
2636
  marker: n.marker,
2636
2637
  is_additional_sale: n.isAdditionalSale,
2637
2638
  ...n.configuratorParams
2638
- }, (e) => new Q(e.data), r);
2639
+ }, (e) => new Z(e.data), r);
2639
2640
  }
2640
2641
  deleteOfferProduct(e, t) {
2641
- return this.delete(`/internal/orders/offers/${e}/products/${t}`, (e) => new Q(e.data));
2642
+ return this.delete(`/internal/orders/offers/${e}/products/${t}`, (e) => new Z(e.data));
2642
2643
  }
2643
2644
  getOfferHtml(e, t) {
2644
2645
  return this.get(`/internal/orders/offers/${e}/view`, t ? { recipientText: t } : {}, (e) => new Blob([e.data], { type: "text/html" }));
@@ -2649,16 +2650,16 @@ var Gn = class e {
2649
2650
  sendOffer(e, t) {
2650
2651
  return this.post(`/internal/orders/offers/${e}/send`, t);
2651
2652
  }
2652
- }, tr = class {
2653
+ }, ir = class {
2653
2654
  static isProfstroy(e) {
2654
2655
  return !!e?.isProfstroy;
2655
2656
  }
2656
2657
  static isProfstroyOffer(e) {
2657
2658
  return !k(e) && e.isProfstroy === !0 && !k(e.actualization);
2658
2659
  }
2659
- }, nr = /* @__PURE__ */ function(e) {
2660
+ }, ar = /* @__PURE__ */ function(e) {
2660
2661
  return e.View = "view", e.Share = "share", e.EditTags = "edit_tags", e.SaveOrderIgnoredProducts = "save_order_ignored_products", e.ChangeStatus = "change_status", e.ChangeProducts = "change_products", e.ChangeOrderParameters = "change_order_parameters", e.Recalculate = "recalculate", e.AttachOrder = "attach_order", e.DetachOrder = "detach_order", e.ChangeAttachedOperator = "change_attached_operator", e.SendOnlinePaymentLink = "send_online_payment_link", e.ConfirmOnlineFullPayment = "confirm_online_full_payment", e.MergeOrders = "merge_orders", e.GetHistory = "get_history", e.CloneOrder = "clone_order", e.DeleteAttachedFile = "delete_attached_file", e;
2661
- }({}), rr = class {
2662
+ }({}), or = class {
2662
2663
  paymentType;
2663
2664
  deliveryType;
2664
2665
  contragentId;
@@ -2676,7 +2677,7 @@ var Gn = class e {
2676
2677
  constructor(e) {
2677
2678
  this.paymentType = e?.payment.type, this.deliveryType = e?.delivery.type, this.contragentId = e?.contragent?.id, this.deliveryDate = e?.delivery.date ? new Date(e.delivery.date) : void 0, this.addressId = e?.delivery.address?.id, this.warehouseId = e?.delivery.warehouse?.id, this.comment = e?.comment, this.barcode = e?.barcode, this.operatorsComment = e?.operatorsComment, this.operatorsForWarehouseComment = e?.operatorsForWarehouseComment, this.isAllowProcessingWithoutPayment = e?.isAllowProcessingWithoutPayment;
2678
2679
  }
2679
- }, ir = class extends N {
2680
+ }, sr = class extends N {
2680
2681
  attachedUsers;
2681
2682
  clientSearchTerm;
2682
2683
  client;
@@ -2701,7 +2702,7 @@ var Gn = class e {
2701
2702
  isToProcess;
2702
2703
  onlyMyRegions;
2703
2704
  constructor(e) {
2704
- super(), this.attachedUsers = e?.attachedUsers?.map((e) => "isActive" in e ? new te(e) : new re(e)), this.clientSearchTerm = e?.clientSearchTerm, this.client = e?.client ? new W(e.client) : void 0, this.contragent = e?.contragent, this.createdAt = new P(e?.createdAt), this.creator = e?.creator ? new I(e.creator) : void 0, this.deliveryDate = new P(e?.deliveryDate), this.deliveryAddressSearch = e?.deliveryAddressSearch, this.clientCities = e?.clientCities?.map((e) => new t(e)), this.id = e?.id, this.isApproved = e?.isApproved, this.isNotInStock = e?.isNotInStock, this.isOnOrder = e?.isOnOrder, this.isLargeOrder = e?.isLargeOrder, this.attachedAt = new P(e?.attachedAt), this.salesDirections = e?.salesDirections?.map((e) => new m(e)), this.status = e?.status, this.statusDetail = e?.statusDetail, this.deliveryType = e?.deliveryType ? new s(e.deliveryType) : void 0, this.paymentType = e?.paymentType ? new oe(e.paymentType) : void 0, this.warehouses = e?.warehouses?.map((e) => new ge(e)), this.isToProcess = e?.isToProcess;
2705
+ super(), this.attachedUsers = e?.attachedUsers?.map((e) => "isActive" in e ? new f(e) : new ae(e)), this.clientSearchTerm = e?.clientSearchTerm, this.client = e?.client ? new U(e.client) : void 0, this.contragent = e?.contragent, this.createdAt = new P(e?.createdAt), this.creator = e?.creator ? new F(e.creator) : void 0, this.deliveryDate = new P(e?.deliveryDate), this.deliveryAddressSearch = e?.deliveryAddressSearch, this.clientCities = e?.clientCities?.map((e) => new n(e)), this.id = e?.id, this.isApproved = e?.isApproved, this.isNotInStock = e?.isNotInStock, this.isOnOrder = e?.isOnOrder, this.isLargeOrder = e?.isLargeOrder, this.attachedAt = new P(e?.attachedAt), this.salesDirections = e?.salesDirections?.map((e) => new g(e)), this.status = e?.status, this.statusDetail = e?.statusDetail, this.deliveryType = e?.deliveryType ? new c(e.deliveryType) : void 0, this.paymentType = e?.paymentType ? new ce(e.paymentType) : void 0, this.warehouses = e?.warehouses?.map((e) => new ve(e)), this.isToProcess = e?.isToProcess;
2705
2706
  }
2706
2707
  resetFilterValue(e) {
2707
2708
  switch (e) {
@@ -2715,7 +2716,7 @@ var Gn = class e {
2715
2716
  this.deliveryDate.from = null, this.deliveryDate.to = null;
2716
2717
  break;
2717
2718
  case "deliveryType":
2718
- this.deliveryType = new s();
2719
+ this.deliveryType = new c();
2719
2720
  break;
2720
2721
  case "clientCities":
2721
2722
  this.clientCities = [];
@@ -2742,58 +2743,58 @@ var Gn = class e {
2742
2743
  let e = super.asClearRaw();
2743
2744
  return !e?.createdAt?.from && !e?.createdAt?.to && delete e.createdAt, !e?.deliveryDate?.from && !e?.deliveryDate?.to && delete e.deliveryDate, !e?.attachedAt?.from && !e?.attachedAt?.to && delete e.attachedAt, e;
2744
2745
  }
2745
- }, ar = class {
2746
+ }, cr = class {
2746
2747
  user;
2747
2748
  status;
2748
2749
  statusDetail;
2749
2750
  createdAt;
2750
2751
  constructor(e) {
2751
- this.user = new I(e?.user), this.status = new ae(e?.status), this.statusDetail = e?.statusDetail ? new le(e.statusDetail) : void 0;
2752
+ this.user = new F(e?.user), this.status = new se(e?.status), this.statusDetail = e?.statusDetail ? new de(e.statusDetail) : void 0;
2752
2753
  let t = e?.createdAt;
2753
- this.createdAt = A(t) ? C(t) : e?.createdAt ?? /* @__PURE__ */ new Date();
2754
+ this.createdAt = A(t) ? w(t) : e?.createdAt ?? /* @__PURE__ */ new Date();
2754
2755
  }
2755
- }, or = class extends F {
2756
+ }, lr = class extends e {
2756
2757
  getOrders(e, t, n, r) {
2757
- return this.getTypedPaginated(Qn, "/internal/orders", e, t, n, {}, void 0, r);
2758
+ return this.getTypedPaginated(tr, "/internal/orders", e, t, n, {}, void 0, r);
2758
2759
  }
2759
2760
  getOrdersCount(e, t) {
2760
- return this.get("/internal/orders/count", e ? { filters: JSON.stringify((e instanceof ut ? e : new ut(e)).toPrimitive()) } : {}, void 0, void 0, t).then((e) => e.count);
2761
+ return this.get("/internal/orders/count", e ? { filters: JSON.stringify((e instanceof l ? e : new l(e)).toPrimitive()) } : {}, void 0, void 0, t).then((e) => e.count);
2761
2762
  }
2762
2763
  getClientOrderStatistics(e, t) {
2763
2764
  return this.get(`/internal/clients/${e}/orders/statistics`, t ? { period: t } : {});
2764
2765
  }
2765
2766
  getOrder(e) {
2766
- return this.get(`/internal/orders/${e}`, {}, (e) => new $(e.data));
2767
+ return this.get(`/internal/orders/${e}`, {}, (e) => new Q(e.data));
2767
2768
  }
2768
2769
  createClientOrder(e, t, n, r = {}) {
2769
- let i = g().config.dateFormats.api;
2770
+ let i = v().config.dateFormats.api;
2770
2771
  return this.post(`/internal/clients/${e}/orders`, {
2771
2772
  ...t,
2772
- deliveryDate: S(t.deliveryDate, i),
2773
+ deliveryDate: C(t.deliveryDate, i),
2773
2774
  items: n?.length ? n : void 0
2774
- }, (e) => h.instanceListInitializer($, e.data), r);
2775
+ }, (e) => _.instanceListInitializer(Q, e.data), r);
2775
2776
  }
2776
2777
  attachOrder(e) {
2777
- return this.patch(`/internal/orders/${e}/attach`, {}, (e) => new $(e.data));
2778
+ return this.patch(`/internal/orders/${e}/attach`, {}, (e) => new Q(e.data));
2778
2779
  }
2779
2780
  detachOrder(e) {
2780
- return this.patch(`/internal/orders/${e}/detach`, {}, (e) => new $(e.data));
2781
+ return this.patch(`/internal/orders/${e}/detach`, {}, (e) => new Q(e.data));
2781
2782
  }
2782
2783
  mergeOrders(e, t) {
2783
- return this.patch(`/internal/orders/${e}/merge`, { ids: t }, (e) => new $(e.data));
2784
+ return this.patch(`/internal/orders/${e}/merge`, { ids: t }, (e) => new Q(e.data));
2784
2785
  }
2785
2786
  recalculateOrder(e) {
2786
- return this.patch(`/internal/orders/${e}/recalculate`, {}, (e) => new $(e.data));
2787
+ return this.patch(`/internal/orders/${e}/recalculate`, {}, (e) => new Q(e.data));
2787
2788
  }
2788
2789
  cloneOrder(e) {
2789
2790
  return this.get(`/internal/orders/${e}/clone`, {});
2790
2791
  }
2791
2792
  updateOrder(e, t, n = {}) {
2792
- let r = g().config.dateFormats.api;
2793
+ let r = v().config.dateFormats.api;
2793
2794
  return this.patch(`/internal/orders/${e}`, {
2794
2795
  ...t,
2795
- deliveryDate: t.deliveryDate ? S(t.deliveryDate, r) : void 0
2796
- }, (e) => new $(e.data), n);
2796
+ deliveryDate: t.deliveryDate ? C(t.deliveryDate, r) : void 0
2797
+ }, (e) => new Q(e.data), n);
2797
2798
  }
2798
2799
  addOrderProduct(e, t, n = {}) {
2799
2800
  return this.post(`/internal/orders/${e}/products`, {
@@ -2807,19 +2808,19 @@ var Gn = class e {
2807
2808
  marker: t.marker,
2808
2809
  is_additional_sale: t.isAdditionalSale,
2809
2810
  ...t.configuratorParams
2810
- }, (e) => new $(e.data), n);
2811
+ }, (e) => new Q(e.data), n);
2811
2812
  }
2812
2813
  changeOrderStatus(e, t, n, r = {}) {
2813
2814
  return this.patch(`/internal/orders/${e}/status`, {
2814
2815
  status: t,
2815
2816
  statusDetail: n
2816
- }, (e) => new $(e.data), r);
2817
+ }, (e) => new Q(e.data), r);
2817
2818
  }
2818
2819
  changeOrderStatusDetail(e, t) {
2819
- return this.patch(`/internal/orders/${e}/status`, { statusDetail: t }, (e) => new $(e.data));
2820
+ return this.patch(`/internal/orders/${e}/status`, { statusDetail: t }, (e) => new Q(e.data));
2820
2821
  }
2821
2822
  getOrderStatusHistory(e) {
2822
- return this.getTypedList(ar, `/internal/orders/${e}/history`);
2823
+ return this.getTypedList(cr, `/internal/orders/${e}/history`);
2823
2824
  }
2824
2825
  getOrderPrintHtml(e, t) {
2825
2826
  return this.get(`/internal/orders/${e}/print/view`, { ...t }, (e) => new Blob([e.data], { type: "text/html" }));
@@ -2831,13 +2832,13 @@ var Gn = class e {
2831
2832
  return this.post(`/internal/orders/${e}/print/send`, t);
2832
2833
  }
2833
2834
  changeAttachedOperator(e, t) {
2834
- return this.patch(`/internal/orders/${e}/change-attached-operator`, { operatorId: t }, (e) => new $(e.data));
2835
+ return this.patch(`/internal/orders/${e}/change-attached-operator`, { operatorId: t }, (e) => new Q(e.data));
2835
2836
  }
2836
2837
  deleteOrderAttachedFile(e) {
2837
- return this.delete(`/internal/orders/${e}/file/attached`, (e) => new $(e.data));
2838
+ return this.delete(`/internal/orders/${e}/file/attached`, (e) => new Q(e.data));
2838
2839
  }
2839
2840
  deleteOrderProduct(e, t) {
2840
- return this.delete(`/internal/orders/${e}/products/${t}`, (e) => new $(e.data));
2841
+ return this.delete(`/internal/orders/${e}/products/${t}`, (e) => new Q(e.data));
2841
2842
  }
2842
2843
  patchOrderProduct(e, t, n, r = {}) {
2843
2844
  return this.patch(`/internal/orders/${e}/products/${t}`, {
@@ -2851,7 +2852,7 @@ var Gn = class e {
2851
2852
  marker: n.marker,
2852
2853
  is_additional_sale: n.isAdditionalSale,
2853
2854
  ...n.configuratorParams
2854
- }, (e) => new $(e.data), r);
2855
+ }, (e) => new Q(e.data), r);
2855
2856
  }
2856
2857
  getDeliveryNearestDates(e, t) {
2857
2858
  return this.get(`/internal/orders/delivery/${e}/nearest-dates`, {}, (e) => e.data, void 0, t);
@@ -2860,51 +2861,51 @@ var Gn = class e {
2860
2861
  return this.get(`/internal/orders/self-delivery/${e}/nearest-dates`, {}, (e) => e.data, void 0, t);
2861
2862
  }
2862
2863
  getDeliveryCost(e, t, n, r) {
2863
- let i = g().config.dateFormats.api;
2864
+ let i = v().config.dateFormats.api;
2864
2865
  return this.get(`/internal/orders/delivery/${e}/cost`, {
2865
- date: S(t, i),
2866
+ date: C(t, i),
2866
2867
  warehouse_id: n
2867
2868
  }, (e) => e.data, void 0, r);
2868
2869
  }
2869
- }, sr = Symbol("currentOrder"), cr = class {
2870
+ }, ur = Symbol("currentOrder"), dr = class {
2870
2871
  client;
2871
2872
  product;
2872
2873
  cost;
2873
2874
  costCoefficient;
2874
2875
  source;
2875
2876
  constructor(e) {
2876
- this.client = new W(e?.client), this.product = new z(e?.product), this.cost = e?.cost ?? 0, this.costCoefficient = e?.costCoefficient ?? 0, this.source = e?.source ?? xt.Product;
2877
+ this.client = new U(e?.client), this.product = new R(e?.product), this.cost = e?.cost ?? 0, this.costCoefficient = e?.costCoefficient ?? 0, this.source = e?.source ?? xt.Product;
2877
2878
  }
2878
- }, lr = (e) => e ? Ze({
2879
+ }, fr = (e) => e ? et({
2879
2880
  cities: e.cities?.map((e) => e.id),
2880
2881
  clients: e.clients?.map((e) => e.id),
2881
2882
  managers: e.managers?.map((e) => e.id),
2882
2883
  partnerGroups: e.partnerGroups?.map((e) => e.id),
2883
2884
  salesDirections: e.salesDirections?.map((e) => e.id),
2884
2885
  hideNotActive: e.hideNotActive
2885
- }, (e) => k(e) || (O(e) || qe(e)) && Ge(e)) : {}, ur = (e) => {
2886
+ }, (e) => k(e) || (qe(e) || Ze(e)) && Ye(e)) : {}, pr = (e) => {
2886
2887
  let t = {};
2887
2888
  return e.from && (e.from.coefficient || e.from.value) && (t.from = {}, e.from.coefficient && (t.from.priceCoefficientId = e.from.coefficient.id), e.from.value && (t.from.increasePercent = e.from.value)), e.to && (e.to.coefficient || e.to.value) && (t.to = {}, e.to.coefficient && (t.to.priceCoefficientId = e.to.coefficient.id), e.to.value && (t.to.increasePercent = e.to.value)), t;
2888
- }, dr = class extends l {
2889
+ }, mr = class extends u {
2889
2890
  analyzeProductPrices(e, t, n) {
2890
2891
  return this.get(`/internal/price/products/${e}/analyze`, {
2891
- ...ur(t),
2892
- filters: lr(n)
2893
- }, (e) => h.instanceListInitializer(cr, e.data));
2892
+ ...pr(t),
2893
+ filters: fr(n)
2894
+ }, (e) => _.instanceListInitializer(dr, e.data));
2894
2895
  }
2895
2896
  analyzeCategoryPrices(e, t, n) {
2896
2897
  return this.get(`/internal/price/categories/${e}/analyze`, {
2897
- ...ur(t),
2898
- filters: lr(n)
2899
- }, (e) => h.instanceListInitializer(cr, e.data));
2898
+ ...pr(t),
2899
+ filters: fr(n)
2900
+ }, (e) => _.instanceListInitializer(dr, e.data));
2900
2901
  }
2901
2902
  analyzeCategoryPricesBySquare(e, t, n) {
2902
2903
  return this.get(`/internal/price/categories/${e}/analyze/square`, {
2903
2904
  ...t,
2904
- filters: lr(n)
2905
- }, (e) => h.instanceListInitializer(cr, e.data));
2905
+ filters: fr(n)
2906
+ }, (e) => _.instanceListInitializer(dr, e.data));
2906
2907
  }
2907
- }, fr = class {
2908
+ }, hr = class {
2908
2909
  cost;
2909
2910
  isLowCost;
2910
2911
  isRetail;
@@ -2916,33 +2917,147 @@ var Gn = class e {
2916
2917
  executor;
2917
2918
  currency;
2918
2919
  constructor(e) {
2919
- this.cost = e.cost ?? 0, this.isLowCost = e.isLowCost ?? !1, this.isRetail = e.isRetail ?? !1, this.costDate = A(e.costDate) ? C(e.costDate) : e.costDate ?? /* @__PURE__ */ new Date(), this.discountName = e.discountName, this.priceTemplateName = e.priceTemplateName, this.product = e.product ? new R(e.product) : void 0, this.client = e.client ? new I(e.client) : void 0, this.executor = e.executor ? new I(e.executor) : void 0, this.currency = e.currency ? new a(e.currency) : void 0;
2920
+ this.cost = e.cost ?? 0, this.isLowCost = e.isLowCost ?? !1, this.isRetail = e.isRetail ?? !1, this.costDate = A(e.costDate) ? w(e.costDate) : e.costDate ?? /* @__PURE__ */ new Date(), this.discountName = e.discountName, this.priceTemplateName = e.priceTemplateName, this.product = e.product ? new L(e.product) : void 0, this.client = e.client ? new F(e.client) : void 0, this.executor = e.executor ? new F(e.executor) : void 0, this.currency = e.currency ? new o(e.currency) : void 0;
2920
2921
  }
2921
- }, pr = class extends R {
2922
+ }, gr = class extends L {
2922
2923
  history;
2923
2924
  constructor(e) {
2924
- super(e), this.history = j(e.history, (e) => new fr(e));
2925
+ super(e), this.history = j(e.history, (e) => new hr(e));
2925
2926
  }
2926
- }, mr = class extends l {
2927
+ }, _r = class extends u {
2927
2928
  getProductPriceHistory(e) {
2928
- let t = g().config.dateFormats.api, n = Ze(Xe(e, { costDate: {
2929
- from: We(e.costDate?.from) ? S(e.costDate.from, t) : e.costDate?.from,
2930
- to: We(e.costDate?.to) ? S(e.costDate.to, t) : e.costDate?.to
2931
- } }), (e) => k(e) || (O(e) || qe(e)) && Ge(e)), r = e.product?.[0] ?? 0;
2932
- return delete n.product, this.get(`/internal/price/products/${r}/history`, n).then((e) => [new pr(Xe(e[0], { history: e }))]);
2929
+ let t = v().config.dateFormats.api, n = et($e(e, { costDate: {
2930
+ from: Je(e.costDate?.from) ? C(e.costDate.from, t) : e.costDate?.from,
2931
+ to: Je(e.costDate?.to) ? C(e.costDate.to, t) : e.costDate?.to
2932
+ } }), (e) => k(e) || (qe(e) || Ze(e)) && Ye(e)), r = e.product?.[0] ?? 0;
2933
+ return delete n.product, this.get(`/internal/price/products/${r}/history`, n).then((e) => [new gr($e(e[0], { history: e }))]);
2933
2934
  }
2934
- }, hr = class {
2935
+ }, vr = class {
2936
+ createdAt;
2937
+ creator;
2938
+ files;
2939
+ text;
2940
+ status;
2941
+ constructor(e) {
2942
+ this.createdAt = s.parse(e?.createdAt) ?? /* @__PURE__ */ new Date(), this.creator = k(e?.creator) ? void 0 : new F(e.creator), this.files = e?.files ?? [], this.text = e?.text ?? void 0, this.status = e?.status ?? void 0;
2943
+ }
2944
+ isStatusChanged() {
2945
+ return !k(this.status);
2946
+ }
2947
+ }, $ = /* @__PURE__ */ function(e) {
2948
+ return e[e.Initiated = 1] = "Initiated", e[e.InfoRequired = 2] = "InfoRequired", e[e.Pending = 3] = "Pending", e[e.Completed = 4] = "Completed", e;
2949
+ }({}), yr = class extends M {
2950
+ status;
2951
+ closedAt;
2952
+ isRead;
2953
+ isDeleted;
2954
+ client;
2955
+ constructor(e) {
2956
+ super(e), this.status = e?.status ?? $.Initiated, this.closedAt = s.parse(e?.closedAt), this.isRead = e?.isRead ?? !1, this.isDeleted = e?.isDeleted ?? !1, this.client = new pn(e?.client);
2957
+ }
2958
+ isClosed() {
2959
+ return this.status === $.Completed;
2960
+ }
2961
+ isDeletionPending() {
2962
+ return this.isDeleted && !this.isClosed();
2963
+ }
2964
+ canAddMessage() {
2965
+ return !this.isClosed();
2966
+ }
2967
+ getConsiderationDays(e = /* @__PURE__ */ new Date()) {
2968
+ return Math.max(Ce(this.closedAt ?? e, this.createdAt), 0);
2969
+ }
2970
+ }, br = class extends yr {
2971
+ items;
2972
+ constructor(e) {
2973
+ super(e), this.items = j(e?.items ?? [], (e) => new vr(e));
2974
+ }
2975
+ isClientMessage(e) {
2976
+ return e.creator?.id === this.client.id;
2977
+ }
2978
+ }, xr = class extends N {
2979
+ id;
2980
+ statuses;
2981
+ createdAt;
2982
+ closedAt;
2983
+ isRead;
2984
+ isDeleted;
2985
+ clientName;
2986
+ cityName;
2987
+ constructor(e) {
2988
+ super(), this.id = {
2989
+ from: e?.id?.from ?? null,
2990
+ to: e?.id?.to ?? null
2991
+ }, this.statuses = e?.statuses, this.createdAt = new P(e?.createdAt), this.closedAt = new P(e?.closedAt), this.isRead = e?.isRead, this.isDeleted = e?.isDeleted, this.clientName = e?.clientName, this.cityName = e?.cityName;
2992
+ }
2993
+ resetFilterValue(e) {
2994
+ switch (e) {
2995
+ case "isDeleted":
2996
+ this.isDeleted = !1;
2997
+ break;
2998
+ case "statuses":
2999
+ case "isRead":
3000
+ case "clientName":
3001
+ case "cityName":
3002
+ this[e] = void 0;
3003
+ break;
3004
+ case "id":
3005
+ this.id.from = null, this.id.to = null;
3006
+ break;
3007
+ case "createdAt":
3008
+ this.createdAt.from = null, this.createdAt.to = null;
3009
+ break;
3010
+ case "closedAt": this.closedAt.from = null, this.closedAt.to = null;
3011
+ }
3012
+ return this;
3013
+ }
3014
+ }, Sr = class e {
3015
+ static apiCodes = {
3016
+ [$.Initiated]: "initiated",
3017
+ [$.InfoRequired]: "info_required",
3018
+ [$.Pending]: "pending",
3019
+ [$.Completed]: "completed"
3020
+ };
3021
+ static toApiCode(t) {
3022
+ return e.apiCodes[t];
3023
+ }
3024
+ static toApiCodes(t) {
3025
+ return j(t, (t) => e.toApiCode(t));
3026
+ }
3027
+ }, Cr = class extends e {
3028
+ getReclamationsList(e, t, n, r, i = !1) {
3029
+ return this.getTypedPaginated(yr, "/internal/reclamations", e, t, n, {}, i, r);
3030
+ }
3031
+ getReclamation(e, t, n = !1) {
3032
+ return this.get(`/internal/reclamations/${e}`, {}, (e) => new br(e.data), n, t);
3033
+ }
3034
+ createMessage(e, t, n = {}) {
3035
+ return this.post(`/internal/reclamations/${e}/messages`, t, (e) => new br(e.data), n);
3036
+ }
3037
+ deleteReclamation(e) {
3038
+ return this.delete(`/internal/reclamations/${e}`);
3039
+ }
3040
+ restoreReclamation(e) {
3041
+ return this.post(`/internal/reclamations/${e}/restore`, {}, (e) => new br(e.data));
3042
+ }
3043
+ downloadReclamation(e, t = !1) {
3044
+ return this.getBlob(`/internal/reclamations/${e}/download`, {}, (e) => new Blob([e.request.response], { type: "application/pdf" }), t);
3045
+ }
3046
+ getUpdates(e, t = !1) {
3047
+ return this.get("/internal/reclamations/updates", {}, void 0, t, e);
3048
+ }
3049
+ }, wr = class {
2935
3050
  products = [];
2936
3051
  productCategories = [];
2937
3052
  constructor(e) {
2938
- e?.products && (this.products = e.products.map((e) => new R(e))), e?.productCategories && (this.productCategories = e.productCategories.map((e) => new R(e)));
3053
+ e?.products && (this.products = e.products.map((e) => new L(e))), e?.productCategories && (this.productCategories = e.productCategories.map((e) => new L(e)));
2939
3054
  }
2940
- }, gr = class extends l {
3055
+ }, Tr = class extends u {
2941
3056
  getProductCategoryRecommendations(e) {
2942
- return this.get(`/internal/catalog/recommendations/categories/${e.id}`, {}, (e) => new hr(e.data));
3057
+ return this.get(`/internal/catalog/recommendations/categories/${e.id}`, {}, (e) => new wr(e.data));
2943
3058
  }
2944
3059
  getProductRecommendations(e) {
2945
- return this.get(`/internal/catalog/recommendations/products/${e.id}`, {}, (e) => new hr(e.data));
3060
+ return this.get(`/internal/catalog/recommendations/products/${e.id}`, {}, (e) => new wr(e.data));
2946
3061
  }
2947
3062
  saveProductCategoryRecommendations(e, t) {
2948
3063
  return this.post(`/internal/catalog/recommendations/categories/${e.id}`, {
@@ -2956,7 +3071,7 @@ var Gn = class e {
2956
3071
  products: t.products.map((e) => e.id)
2957
3072
  });
2958
3073
  }
2959
- }, _r = class {
3074
+ }, Er = class {
2960
3075
  static generateUndefinedInstance(e, t = "- Не определён -") {
2961
3076
  return new e({
2962
3077
  id: 0,
@@ -2967,13 +3082,13 @@ var Gn = class e {
2967
3082
  static isUndefinedInstance(e) {
2968
3083
  return e.id === 0 && e.slug === "-undefined-";
2969
3084
  }
2970
- }, vr = class {
3085
+ }, Dr = class {
2971
3086
  name;
2972
3087
  content;
2973
3088
  constructor(e) {
2974
3089
  this.name = e.name, this.content = e.content;
2975
3090
  }
2976
- }, yr = class {
3091
+ }, Or = class {
2977
3092
  resourceType;
2978
3093
  resourceId;
2979
3094
  h1;
@@ -2983,42 +3098,42 @@ var Gn = class e {
2983
3098
  meta;
2984
3099
  tags;
2985
3100
  constructor(e) {
2986
- this.resourceType = new de(e?.resourceType), this.resourceId = e?.resourceId ?? "", this.h1 = e?.h1, this.title = e?.title, this.description = e?.description, this.keywords = e?.keywords, this.meta = e?.meta?.map((e) => new vr(e)) ?? [], this.tags = e?.tags;
3101
+ this.resourceType = new pe(e?.resourceType), this.resourceId = e?.resourceId ?? "", this.h1 = e?.h1, this.title = e?.title, this.description = e?.description, this.keywords = e?.keywords, this.meta = e?.meta?.map((e) => new Dr(e)) ?? [], this.tags = e?.tags;
2987
3102
  }
2988
- }, br = class extends l {
3103
+ }, kr = class extends u {
2989
3104
  getResourceSeoData(e, t) {
2990
- return this.get(`/internal/seo/${e.slug}/${t}`, {}, (e) => new yr(e.data));
3105
+ return this.get(`/internal/seo/${e.slug}/${t}`, {}, (e) => new Or(e.data));
2991
3106
  }
2992
3107
  saveResourceSeoData(e, t = {}) {
2993
- return this.post(`/internal/seo/${e.resourceType.slug}/${e.resourceId}`, e, (e) => new yr(e.data), t);
3108
+ return this.post(`/internal/seo/${e.resourceType.slug}/${e.resourceId}`, e, (e) => new Or(e.data), t);
2994
3109
  }
2995
3110
  deleteResourceSeoData(e, t) {
2996
3111
  return this.delete(`/internal/seo/${e.slug}/${t}`);
2997
3112
  }
2998
- }, xr = class extends u {
3113
+ }, Ar = class extends d {
2999
3114
  text;
3000
3115
  searchCount;
3001
3116
  lastSearchedAt;
3002
3117
  constructor(e) {
3003
- super(e), this.text = e?.text ?? "", this.searchCount = e?.searchCount ?? 0, this.lastSearchedAt = o.parse(e?.lastSearchedAt);
3118
+ super(e), this.text = e?.text ?? "", this.searchCount = e?.searchCount ?? 0, this.lastSearchedAt = s.parse(e?.lastSearchedAt);
3004
3119
  }
3005
- }, Sr = class extends l {
3120
+ }, jr = class extends u {
3006
3121
  getSearchProductsStatistics(e, t) {
3007
- return this.getTypedList(xr, "/internal/statistics/search/products", { date: o.periodToApiFormat(e) }, !1, t);
3122
+ return this.getTypedList(Ar, "/internal/statistics/search/products", { date: s.periodToApiFormat(e) }, !1, t);
3008
3123
  }
3009
3124
  removeSearchProductStatistic(e) {
3010
3125
  return this.delete(`/internal/statistics/search/products/${e}`);
3011
3126
  }
3012
- }, Cr = /* @__PURE__ */ function(e) {
3127
+ }, Mr = /* @__PURE__ */ function(e) {
3013
3128
  return e[e.Undetermined = 0] = "Undetermined", e[e.Complete = 1] = "Complete", e[e.Incomplete = 2] = "Incomplete", e;
3014
- }({}), wr = class e {
3129
+ }({}), Nr = class e {
3015
3130
  static isBlocked(e, t) {
3016
- return t && e === Cr.Incomplete;
3131
+ return t && e === Mr.Incomplete;
3017
3132
  }
3018
3133
  static getValidationResult(t, n) {
3019
- return e.isBlocked(t, n) ? new c("Проверьте адрес и выберите более точный вариант из подсказок", "error") : t === Cr.Incomplete || t === Cr.Undetermined ? new c("Проверьте правильность адреса", "warning") : void 0;
3134
+ return e.isBlocked(t, n) ? new ee("Проверьте адрес и выберите более точный вариант из подсказок", "error") : t === Mr.Incomplete || t === Mr.Undetermined ? new ee("Проверьте правильность адреса", "warning") : void 0;
3020
3135
  }
3021
- }, Tr = class extends l {
3136
+ }, Pr = class extends u {
3022
3137
  searchAddresses(e) {
3023
3138
  return this.execSuggestionQuery("/public/suggestions/address", e);
3024
3139
  }
@@ -3036,26 +3151,26 @@ var Gn = class e {
3036
3151
  }), t;
3037
3152
  });
3038
3153
  }
3039
- }, Er = class extends l {
3154
+ }, Fr = class extends u {
3040
3155
  constructor() {
3041
- super(), this.baseUrl = `${g().config.http.portalApiUrl}/api`, this.interceptorIds.request.authRequestInterceptor && this.httpClient.interceptors.request.eject(this.interceptorIds.request.authRequestInterceptor);
3156
+ super(), this.baseUrl = `${v().config.http.portalApiUrl}/api`, this.interceptorIds.request.authRequestInterceptor && this.httpClient.interceptors.request.eject(this.interceptorIds.request.authRequestInterceptor);
3042
3157
  }
3043
3158
  getAccessToken() {
3044
3159
  return this.get("internal/users/current-tokens").then((e) => e.accessToken);
3045
3160
  }
3046
- }, Dr = class {
3161
+ }, Ir = class {
3047
3162
  user;
3048
3163
  salesDirection;
3049
3164
  constructor(e) {
3050
- this.user = new I(e?.user), this.salesDirection = new m(e?.salesDirection);
3165
+ this.user = new F(e?.user), this.salesDirection = new g(e?.salesDirection);
3051
3166
  }
3052
- }, Or = class extends he {
3167
+ }, Lr = class extends _e {
3053
3168
  cities;
3054
3169
  users;
3055
3170
  constructor(e) {
3056
- super(e), this.cities = e?.cities?.map((e) => new t(e)) ?? [], this.users = e?.users?.map((e) => new Dr(e)) ?? [];
3171
+ super(e), this.cities = e?.cities?.map((e) => new n(e)) ?? [], this.users = e?.users?.map((e) => new Ir(e)) ?? [];
3057
3172
  }
3058
- }, kr = class extends N {
3173
+ }, Rr = class extends N {
3059
3174
  id;
3060
3175
  name;
3061
3176
  abbr;
@@ -3070,27 +3185,27 @@ var Gn = class e {
3070
3185
  }
3071
3186
  return this;
3072
3187
  }
3073
- }, Ar = class extends F {
3188
+ }, zr = class extends e {
3074
3189
  getRegionsList(e, t, n) {
3075
- return this.getTypedPaginated(he, "/internal/users/regions", e, t, n);
3190
+ return this.getTypedPaginated(_e, "/internal/users/regions", e, t, n);
3076
3191
  }
3077
3192
  getRegion(e) {
3078
- return this.get(`/internal/users/regions/${e}`, {}, (e) => new Or(e.data));
3193
+ return this.get(`/internal/users/regions/${e}`, {}, (e) => new Lr(e.data));
3079
3194
  }
3080
3195
  createRegion(e, t = {}) {
3081
- return this.post("/internal/users/regions", e, (e) => new Or(e.data), t);
3196
+ return this.post("/internal/users/regions", e, (e) => new Lr(e.data), t);
3082
3197
  }
3083
3198
  updateRegion(e, t, n = {}) {
3084
- return this.patch(`/internal/users/regions/${e}`, t, (e) => new Or(e.data), n);
3199
+ return this.patch(`/internal/users/regions/${e}`, t, (e) => new Lr(e.data), n);
3085
3200
  }
3086
3201
  removeRegion(e) {
3087
3202
  return this.delete(`/internal/users/regions/${e}`);
3088
3203
  }
3089
3204
  getRegionEmployees(e) {
3090
- return this.getTypedList(Dr, `/internal/users/regions/${e}/users`);
3205
+ return this.getTypedList(Ir, `/internal/users/regions/${e}/users`);
3091
3206
  }
3092
3207
  attachRegionEmployee(e, t, n) {
3093
- return this.post(`/internal/users/regions/${e}/users/${t}`, { salesDirectionId: n }, (e) => new Dr(e.data));
3208
+ return this.post(`/internal/users/regions/${e}/users/${t}`, { salesDirectionId: n }, (e) => new Ir(e.data));
3094
3209
  }
3095
3210
  detachRegionEmployee(e, t, n) {
3096
3211
  return this.request({
@@ -3101,4 +3216,4 @@ var Gn = class e {
3101
3216
  }
3102
3217
  };
3103
3218
  //#endregion
3104
- export { Cr as AddressQualityEnum, wr as AddressQualityHelper, an as BankAccount, F as BasePaginationProvider, ot as BlogPost, rt as BlogPostMediaFile, nt as BlogPostMediaTypeEnum, it as BlogPostPublicationStatusEnum, at as BlogPostShortInfo, st as BlogPostsListFilters, dt as BlogProvider, Tt as CalculationTypeEnum, Z as CalendarHelper, H as Cart, wt as CartProvider, Wt as CatalogProvider, _t as CatalogableItem, U as Category, Ut as CategoryFilter, Vt as CategoryFilterSetting, Ht as CategoryFilterValue, zt as CategoryPricingRule, pn as Client, gn as ClientAdditionalData, Ot as ClientCategory, yn as ClientDataProvider, It as ClientPriceCatalogableItem, Rt as ClientPriceCategory, Lt as ClientPriceProduct, Gt as ClientPriceProvider, Kt as ClientPriceTemplateProvider, B as ClientProduct, Yt as ClientProductCategoryDataProvider, Xt as ClientProductDataProvider, W as ClientShortInfo, rn as ClientsAdditionalDataRequestTypeEnum, mn as ClientsListFilters, R as CodedIdentity, Cn as ConfiguratorProvider, Sn as ConfiguratorsEnum, on as Contact, Y as ContactPerson, vn as ContactPersonRelated, _n as ContactRelation, sn as ContragentBase, fn as ContragentFactory, ln as ContragentIc, cn as ContragentPerson, dn as ContragentUlNr, un as ContragentUlR, xt as CostSourceEnum, M as CreatableIdentity, Mt as Curator, Tr as DataSuggestionProvider, An as DateTimeProvider, Nt as DeletableIdentity, ft as DeletableNamedIdentity, X as DeliveryAddress, Ln as Discount, Nn as DiscountClient, Rn as DiscountClientEligibility, Pn as DiscountConditions, Bn as DiscountProvider, pt as DiscountShortInfo, Fn as DiscountStateEnum, In as DiscountStateHelper, zn as DiscountsListFilters, Hn as Faq, Vn as FaqGroup, Un as FaqProvider, ut as FilterGroup, lt as FilterItem, ct as FilterOpEnum, Bt as FilterSettings, vt as HiddenCatalogableItem, yt as Image, Kn as ManagerDataFactory, vr as MetaTagItem, Q as Offer, Jn as OfferActualization, qn as OfferActualizationStatus, tr as OfferHelper, Yn as OfferShortInfo, er as OffersDataProvider, Zn as OffersListFilters, $ as Order, nr as OrderAction, rr as OrderEditorData, Qn as OrderInfo, $n as OrderItem, St as OrderItemBase, hn as OrderShortInfo, ar as OrderStatusHistoryInfo, or as OrdersDataProvider, ir as OrdersListFilters, N as PaginationFiltersBase, cr as PriceAnalyze, dr as PriceAnalyzeProvider, kt as PriceCatalogableItem, mr as PriceHistoryDataProvider, fr as PriceHistoryItem, L as PriceTemplate, jt as PriceTemplateCategory, G as PriceTemplateClient, At as PriceTemplateICatalogableItem, Pt as PriceTemplateProduct, Zt as PriceTemplateProvider, J as PricingRole, Qt as PricingRoleProvider, bt as PrimaryCatalogableItem, z as Product, qt as ProductCategoryDataProvider, Jt as ProductDataProvider, Et as ProductFilterTypeEnum, mt as ProductPriceCoefficient, pr as ProductPriceHistory, gt as ProductUnit, Xn as ProfstroyOfferItem, $t as PropertiesProvider, K as Property, q as PropertyValue, gr as RecommendationsDataProvider, hr as RecommendationsList, _r as ReferenceDataFactory, jn as STANDARD_PERIOD_GROUPS, Mn as STANDARD_PERIOD_SECTIONS, xr as SearchProductStatistic, yr as Seo, br as SeoDataProvider, Sr as StatisticsProvider, ht as StockCount, Tn as TableDataPagination, wn as TableDataPaginationRequestParams, En as TableDataSortRequestParams, en as TemplateProductCategoryDataProvider, Ft as TemplatesListFilters, Gn as UnitsHelper, bn as UnknownClientDataProvider, Er as UserAuthDataProvider, Or as UserRegion, Dr as UserRegionEmployee, Ar as UserRegionProvider, kr as UserRegionsListFilters, I as UserShortInfo, xn as VersionConfig, sr as currentOrderInjectionKey, Dn as daysAgoIso, tn as findCatalogItemByIdRecursive, nn as flattenCatalogItems, Wn as formatPercentChange, kn as formatRelativeDate, On as pluralize };
3219
+ export { Mr as AddressQualityEnum, Nr as AddressQualityHelper, an as BankAccount, lt as BlogPost, ot as BlogPostMediaFile, at as BlogPostMediaTypeEnum, st as BlogPostPublicationStatusEnum, ct as BlogPostShortInfo, ut as BlogPostsListFilters, dt as BlogProvider, Tt as CalculationTypeEnum, X as CalendarHelper, V as Cart, wt as CartProvider, Wt as CatalogProvider, _t as CatalogableItem, H as Category, Ut as CategoryFilter, Vt as CategoryFilterSetting, Ht as CategoryFilterValue, zt as CategoryPricingRule, mn as Client, _n as ClientAdditionalData, pn as ClientBaseInfo, Ot as ClientCategory, bn as ClientDataProvider, It as ClientPriceCatalogableItem, Rt as ClientPriceCategory, Lt as ClientPriceProduct, Gt as ClientPriceProvider, Kt as ClientPriceTemplateProvider, z as ClientProduct, Yt as ClientProductCategoryDataProvider, Xt as ClientProductDataProvider, U as ClientShortInfo, rn as ClientsAdditionalDataRequestTypeEnum, hn as ClientsListFilters, L as CodedIdentity, wn as ConfiguratorProvider, Cn as ConfiguratorsEnum, on as Contact, J as ContactPerson, yn as ContactPersonRelated, vn as ContactRelation, sn as ContragentBase, fn as ContragentFactory, ln as ContragentIc, cn as ContragentPerson, dn as ContragentUlNr, un as ContragentUlR, xt as CostSourceEnum, M as CreatableIdentity, Mt as Curator, Pr as DataSuggestionProvider, jn as DateTimeProvider, Nt as DeletableIdentity, ft as DeletableNamedIdentity, Y as DeliveryAddress, Rn as Discount, Pn as DiscountClient, zn as DiscountClientEligibility, Fn as DiscountConditions, Vn as DiscountProvider, pt as DiscountShortInfo, In as DiscountStateEnum, Ln as DiscountStateHelper, Bn as DiscountsListFilters, Un as Faq, Hn as FaqGroup, Wn as FaqProvider, Bt as FilterSettings, vt as HiddenCatalogableItem, yt as Image, qn as ManagerDataFactory, Yn as ManagerProvider, Jn as ManagersListFilters, Dr as MetaTagItem, Z as Offer, Zn as OfferActualization, Xn as OfferActualizationStatus, ir as OfferHelper, Qn as OfferShortInfo, rr as OffersDataProvider, er as OffersListFilters, Q as Order, ar as OrderAction, or as OrderEditorData, tr as OrderInfo, nr as OrderItem, St as OrderItemBase, gn as OrderShortInfo, cr as OrderStatusHistoryInfo, lr as OrdersDataProvider, sr as OrdersListFilters, N as PaginationFiltersBase, dr as PriceAnalyze, mr as PriceAnalyzeProvider, kt as PriceCatalogableItem, _r as PriceHistoryDataProvider, hr as PriceHistoryItem, I as PriceTemplate, jt as PriceTemplateCategory, W as PriceTemplateClient, At as PriceTemplateICatalogableItem, Pt as PriceTemplateProduct, Zt as PriceTemplateProvider, q as PricingRole, Qt as PricingRoleProvider, bt as PrimaryCatalogableItem, R as Product, qt as ProductCategoryDataProvider, Jt as ProductDataProvider, Et as ProductFilterTypeEnum, mt as ProductPriceCoefficient, gr as ProductPriceHistory, gt as ProductUnit, $n as ProfstroyOfferItem, $t as PropertiesProvider, G as Property, K as PropertyValue, br as Reclamation, vr as ReclamationItem, Cr as ReclamationProvider, yr as ReclamationShortInfo, $ as ReclamationStatusEnum, Sr as ReclamationStatusHelper, xr as ReclamationsListFilters, Tr as RecommendationsDataProvider, wr as RecommendationsList, Er as ReferenceDataFactory, Mn as STANDARD_PERIOD_GROUPS, Nn as STANDARD_PERIOD_SECTIONS, Ar as SearchProductStatistic, Or as Seo, kr as SeoDataProvider, jr as StatisticsProvider, ht as StockCount, En as TableDataPagination, Tn as TableDataPaginationRequestParams, Dn as TableDataSortRequestParams, en as TemplateProductCategoryDataProvider, Ft as TemplatesListFilters, Kn as UnitsHelper, xn as UnknownClientDataProvider, Fr as UserAuthDataProvider, Lr as UserRegion, Ir as UserRegionEmployee, zr as UserRegionProvider, Rr as UserRegionsListFilters, F as UserShortInfo, Sn as VersionConfig, ur as currentOrderInjectionKey, On as daysAgoIso, tn as findCatalogItemByIdRecursive, nn as flattenCatalogItems, Gn as formatPercentChange, An as formatRelativeDate, kn as pluralize };