@soma-vertical-web/multi-lib 0.0.69 → 0.0.71

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 (116) hide show
  1. package/cms/ContentTypes/LPCadastro/LPCadastroContent.d.ts +4 -0
  2. package/cms/server.d.ts +1 -0
  3. package/contexts/contexts/header/HeaderCategoryContext.d.ts +7 -0
  4. package/contexts/contexts/header/MenuMobileContext.d.ts +5 -4
  5. package/contexts/index.d.ts +2 -2
  6. package/index.js +16 -16
  7. package/index.mjs +5250 -5068
  8. package/index2.js +1 -1
  9. package/index2.mjs +452 -437
  10. package/layout/index.d.ts +14 -2
  11. package/layout/team-component/Form/Composite/Content.d.ts +4 -0
  12. package/layout/team-component/Form/Composite/FieldGroup.d.ts +7 -0
  13. package/layout/team-component/Form/Composite/FieldWrapper.d.ts +7 -0
  14. package/layout/team-component/Form/Composite/FormError.d.ts +4 -0
  15. package/layout/team-component/Form/Composite/Success.d.ts +4 -0
  16. package/layout/team-component/Form/Composite/index.d.ts +4 -0
  17. package/layout/team-component/Form/Form.d.ts +11 -0
  18. package/layout/team-component/Form/FormContext.d.ts +5 -0
  19. package/layout/team-component/Form/index.d.ts +1 -0
  20. package/layout/team-component/Header/Composite/HeaderDesktopWrapper.d.ts +5 -1
  21. package/layout/team-component/Header/Composite/HeaderMobileWrapper.d.ts +6 -1
  22. package/layout/team-component/Header/index.d.ts +1 -1
  23. package/layout/team-component/Menu/Composite/Mobile/Body/Body.d.ts +7 -0
  24. package/layout/team-component/Menu/Composite/Mobile/Body/Category/Banner.d.ts +7 -0
  25. package/layout/team-component/Menu/Composite/Mobile/Body/Category/Category.d.ts +7 -0
  26. package/layout/team-component/Menu/Composite/Mobile/Body/Category/List.d.ts +7 -0
  27. package/layout/team-component/Menu/Composite/Mobile/Body/Category/SubCategory.d.ts +7 -0
  28. package/layout/team-component/Menu/Composite/Mobile/Body/Category/Title.d.ts +7 -0
  29. package/layout/team-component/Menu/Composite/Mobile/Body/Category/index.d.ts +22 -0
  30. package/layout/team-component/Menu/Composite/Mobile/{Body/SubMenu/SubMenu.d.ts → Header/Header.d.ts} +2 -2
  31. package/layout/team-component/Menu/Composite/Mobile/MenuRoot.d.ts +4 -7
  32. package/layout/team-component/Menu/Composite/Mobile/Navigation/{NavigationBarItem.d.ts → BarItem.d.ts} +1 -1
  33. package/layout/team-component/Menu/MenuMobile.d.ts +7 -8
  34. package/layout/team-component/UserMenu/Composite/Menu.d.ts +1 -1
  35. package/layout/team-component/UserMenu/UserMenu.d.ts +1 -1
  36. package/layout/team-component/UserMenu/index.d.ts +3 -1
  37. package/layout/template/LPCadastro/index.d.ts +3 -0
  38. package/package.json +1 -1
  39. package/style.css +1 -1
  40. package/types/cms/ContentTypes/Header/index.d.ts +9 -1
  41. package/types/constants.d.ts +12 -14
  42. package/types/layout/team-components/Form/index.d.ts +16 -3
  43. package/types/layout/team-components/Header/index.d.ts +9 -1
  44. package/types/layout/team-components/Menu/Mobile/Body/Category/index.d.ts +23 -0
  45. package/types/layout/team-components/Menu/Mobile/Body/index.d.ts +3 -0
  46. package/types/layout/team-components/Menu/Mobile/index.d.ts +10 -1
  47. package/types/layout/team-components/UserMenu/index.d.ts +10 -7
  48. package/types/layout/templates/LPCadastro/index.d.ts +31 -0
  49. package/Footer-93X9fl_J.mjs +0 -7055
  50. package/Footer-BjB3blIh.mjs +0 -6956
  51. package/Footer-By1Gk2Ku.mjs +0 -7050
  52. package/Footer-COiI-tye.mjs +0 -7049
  53. package/Footer-CZqTxkCn.js +0 -41
  54. package/Footer-D3zDoa2N.mjs +0 -6961
  55. package/Footer-DfAuGt3s.js +0 -41
  56. package/Footer-TLfR7lta.js +0 -41
  57. package/Footer-okPVOqRy.js +0 -41
  58. package/Footer-rMb9FYog.js +0 -41
  59. package/SearchPageScreening-BIyp1dAW.mjs +0 -112
  60. package/SearchPageScreening-gO7dG13l.js +0 -1
  61. package/__vite-browser-external-B8mGO3z6.js +0 -1
  62. package/__vite-browser-external-BYRIRx8p.mjs +0 -8
  63. package/__vite-browser-external-C4n7rb1H.mjs +0 -85
  64. package/__vite-browser-external-Cjz79hOw.js +0 -1
  65. package/__vite-browser-external-CpdIDx9o.mjs +0 -79
  66. package/__vite-browser-external-DDWPeg5L.js +0 -1
  67. package/cms/ContentTypes/CommonPage/index.d.ts +0 -2
  68. package/cms/ContentTypes/FlagsAndTags/index.d.ts +0 -1
  69. package/cms/ContentTypes/PLP/PLPContentContext.d.ts +0 -4
  70. package/cms/ContentTypes/Search/SearchContentScreening.d.ts +0 -3
  71. package/cms/ContentTypes/index.d.ts +0 -6
  72. package/data/actions/masterDataServices.d.ts +0 -5
  73. package/data/api/user/index.d.ts +0 -3
  74. package/data/helpers/search/policy.d.ts +0 -3
  75. package/data/helpers/search/product/utils/index.d.ts +0 -8
  76. package/data/helpers/search/region.d.ts +0 -3
  77. package/index-ASRiF3PD.js +0 -1
  78. package/index-BJzBUeMp.js +0 -1
  79. package/index-BR5lPUsH.js +0 -1
  80. package/index-BRfMTuMz.mjs +0 -405
  81. package/index-BYY2x6mQ.js +0 -1
  82. package/index-Ba7fQCkk.js +0 -1
  83. package/index-BzNV29ol.mjs +0 -402
  84. package/index-C3QT-3iu.mjs +0 -355
  85. package/index-C5zOWvXN.js +0 -1
  86. package/index-CbOiLJQX.mjs +0 -403
  87. package/index-CiBRnp7U.js +0 -1
  88. package/index-CiMxj6Pg.mjs +0 -412
  89. package/index-CkcBCfzG.js +0 -1
  90. package/index-CuKKHhKx.mjs +0 -355
  91. package/index-D3ONVIla.mjs +0 -412
  92. package/index-DD12Nl4r.mjs +0 -412
  93. package/index-DJR4CcKO.mjs +0 -398
  94. package/index-DJeLEsRl.js +0 -1
  95. package/index-DKnolQoT.mjs +0 -412
  96. package/index-DYpuW0tu.mjs +0 -354
  97. package/index-D__YfUie.js +0 -1
  98. package/index-DfnS9D5I.mjs +0 -354
  99. package/index-Do5eAlCL.mjs +0 -219
  100. package/index-VkanwPXK.mjs +0 -221
  101. package/index-WV5Gjz3i.js +0 -1
  102. package/index-catAI5a3.mjs +0 -258
  103. package/index-drKDwA8_.js +0 -1
  104. package/layout/team-component/Menu/Composite/Mobile/Body/MenuBody.d.ts +0 -7
  105. package/layout/team-component/Menu/Composite/Mobile/Body/MenuCategories.d.ts +0 -7
  106. package/layout/team-component/Menu/Composite/Mobile/Body/MenuCategoriesWrapper.d.ts +0 -7
  107. package/layout/team-component/Menu/Composite/Mobile/Body/SubMenu/SubMenuItem.d.ts +0 -7
  108. package/layout/team-component/Menu/Composite/Mobile/Body/SubMenu/SubMenuSubCategory.d.ts +0 -7
  109. package/layout/team-component/Menu/Composite/Mobile/Header/MenuHeaderContainer.d.ts +0 -5
  110. package/layout/team-component/Menu/Composite/Mobile/Header/MenuHeaderNavLinks.d.ts +0 -7
  111. package/layout/team-component/Menu/Composite/Mobile/Header/MenuHeaderWrapper.d.ts +0 -7
  112. package/types/data/actions/index.d.ts +0 -27
  113. package/types/layout/team-components/PDCNavigation/intex.d.ts +0 -9
  114. package/types/layout/team-components/ProductList/Composite/Card/index.d.ts +0 -9
  115. package/types/utils.d.ts +0 -3
  116. /package/layout/team-component/Menu/Composite/Mobile/Navigation/{NavigationBar.d.ts → Bar.d.ts} +0 -0
package/index2.mjs CHANGED
@@ -1,7 +1,7 @@
1
- import { jsxs as j, Fragment as A, jsx as y } from "react/jsx-runtime";
2
- import { r as D, v as E, S as ce, w as le, x as ue, a as de, q as pe, o as me, y as fe, p as ge, m as G, z as he, e as be } from "./index-BBxYNFkz.mjs";
1
+ import { jsxs as k, Fragment as N, jsx as y } from "react/jsx-runtime";
2
+ import { r as D, v as S, S as ce, w as le, x as ue, a as de, q as pe, o as me, y as fe, p as ge, m as G, z as he, e as be } from "./index-BBxYNFkz.mjs";
3
3
  import { Utils as _, helpers as M } from "@soma-vertical-web/core-components";
4
- import * as a from "yup";
4
+ import * as o from "yup";
5
5
  import ye from "sanitize-html";
6
6
  const Ie = ({
7
7
  slug: t,
@@ -10,18 +10,18 @@ const Ie = ({
10
10
  COMMON_PAGE_COLUMN_GAP: r,
11
11
  identifyWhoIsFirst: s
12
12
  }) => {
13
- const o = e == null ? void 0 : e.find(
13
+ const a = e == null ? void 0 : e.find(
14
14
  (p) => {
15
15
  var h, f, m, R;
16
16
  return ((f = (h = p.config) == null ? void 0 : h.responsive) == null ? void 0 : f.deviceType) === "desktop" && ((R = (m = p.config) == null ? void 0 : m.seo) == null ? void 0 : R.slug) === t;
17
17
  }
18
- ), i = o == null ? void 0 : o.config.responsive.gapCustom, l = o == null ? void 0 : o.config.responsive.gapSections, c = e == null ? void 0 : e.find(
18
+ ), i = a == null ? void 0 : a.config.responsive.gapCustom, l = a == null ? void 0 : a.config.responsive.gapSections, c = e == null ? void 0 : e.find(
19
19
  (p) => {
20
20
  var h, f, m, R;
21
21
  return ((f = (h = p.config) == null ? void 0 : h.responsive) == null ? void 0 : f.deviceType) === "mobile" && ((R = (m = p.config) == null ? void 0 : m.seo) == null ? void 0 : R.slug) === t;
22
22
  }
23
23
  ), d = c == null ? void 0 : c.config.responsive.gapCustom, u = c == null ? void 0 : c.config.responsive.gapSections;
24
- return /* @__PURE__ */ j(A, { children: [
24
+ return /* @__PURE__ */ k(N, { children: [
25
25
  /* @__PURE__ */ y(
26
26
  _.Column,
27
27
  {
@@ -30,7 +30,7 @@ const Ie = ({
30
30
  D["responsive-desktop-flex"],
31
31
  "utils-column-modifier"
32
32
  ),
33
- children: /* @__PURE__ */ y(n, { data: (o == null ? void 0 : o.sections) ?? [], identifyWhoIsFirst: s })
33
+ children: /* @__PURE__ */ y(n, { data: (a == null ? void 0 : a.sections) ?? [], identifyWhoIsFirst: s })
34
34
  }
35
35
  ),
36
36
  /* @__PURE__ */ y(
@@ -52,14 +52,14 @@ const Ie = ({
52
52
  identifyWhoIsFirst: r = !1,
53
53
  ...s
54
54
  }) => {
55
- const { data: o } = await E({
55
+ const { data: a } = await S({
56
56
  contentType: "common_page",
57
57
  ...s
58
58
  });
59
59
  return /* @__PURE__ */ y(
60
60
  Ie,
61
61
  {
62
- data: o,
62
+ data: a,
63
63
  slug: t,
64
64
  SectionZone: e,
65
65
  COMMON_PAGE_COLUMN_GAP: n,
@@ -72,12 +72,12 @@ const Ie = ({
72
72
  LEGAL_INFORMATION_TEXT: n,
73
73
  SectionZone: r,
74
74
  ICONS: s,
75
- Footer: o,
75
+ Footer: a,
76
76
  FooterSupport: i,
77
77
  ...l
78
78
  }) => {
79
- var p, h, f, m, R, F, S, T, O, g, C;
80
- const { data: c } = await E({
79
+ var p, h, f, m, R, F, T, E, O, g, C;
80
+ const { data: c } = await S({
81
81
  contentType: "footer",
82
82
  ...l
83
83
  }), d = Array.isArray(c) && ((p = c[0]) == null ? void 0 : p.type) === "footer" ? c[0] : null, u = {
@@ -89,14 +89,14 @@ const Ie = ({
89
89
  ) : []
90
90
  };
91
91
  return d ? /* @__PURE__ */ y(
92
- o,
92
+ a,
93
93
  {
94
94
  data: { ...d },
95
95
  socialInfo: (R = d.socialMedia) == null ? void 0 : R.socialMedia,
96
- socialMedias: (S = (F = d.socialMedia) == null ? void 0 : F.socialMedia) == null ? void 0 : S.medias,
96
+ socialMedias: (T = (F = d.socialMedia) == null ? void 0 : F.socialMedia) == null ? void 0 : T.medias,
97
97
  payments: u,
98
98
  adornment: {
99
- ...(O = (T = d.supportInfo) == null ? void 0 : T.supportInfo) != null && O.content ? {
99
+ ...(O = (E = d.supportInfo) == null ? void 0 : E.supportInfo) != null && O.content ? {
100
100
  bottom: /* @__PURE__ */ y(
101
101
  i,
102
102
  {
@@ -114,17 +114,17 @@ const Ie = ({
114
114
  LEGAL_INFORMATION_TEXT: n,
115
115
  ICONS: s
116
116
  }
117
- ) : /* @__PURE__ */ y(A, {});
117
+ ) : /* @__PURE__ */ y(N, {});
118
118
  }, ve = async ({
119
119
  children: t,
120
120
  ClientHeaderProvider: e,
121
121
  ...n
122
122
  }) => {
123
- var o, i, l, c;
124
- const { data: r } = await E({
123
+ var a, i, l, c;
124
+ const { data: r } = await S({
125
125
  contentType: "header",
126
126
  ...n
127
- }), s = (o = r[0]) == null ? void 0 : o.sections.map((d) => d.data);
127
+ }), s = (a = r[0]) == null ? void 0 : a.sections.map((d) => d.data);
128
128
  return /* @__PURE__ */ y(
129
129
  e,
130
130
  {
@@ -146,7 +146,7 @@ const Ie = ({
146
146
  label: "",
147
147
  content: []
148
148
  };
149
- const n = e == null ? void 0 : e.iconLabel, r = e == null ? void 0 : e.label, s = e == null ? void 0 : e.helpButtonSize, o = e.items.map(
149
+ const n = e == null ? void 0 : e.iconLabel, r = e == null ? void 0 : e.label, s = e == null ? void 0 : e.helpButtonSize, a = e.items.map(
150
150
  (c, d) => ({
151
151
  type: c.type,
152
152
  id: `${d.toString()}-${c.title.toLowerCase()}`,
@@ -164,7 +164,7 @@ const Ie = ({
164
164
  iconLabel: n,
165
165
  label: r,
166
166
  helpButtonSize: s,
167
- content: o
167
+ content: a
168
168
  };
169
169
  }, Te = async ({
170
170
  HelpButton: t,
@@ -172,31 +172,45 @@ const Ie = ({
172
172
  className: n,
173
173
  ...r
174
174
  }) => {
175
- const { data: s } = await E({
175
+ const { data: s } = await S({
176
176
  contentType: "helpbutton",
177
177
  ...r
178
178
  });
179
- if (!s) return /* @__PURE__ */ y(A, {});
180
- const o = Se(s);
179
+ if (!s) return /* @__PURE__ */ y(N, {});
180
+ const a = Se(s);
181
181
  return /* @__PURE__ */ y(
182
182
  t,
183
183
  {
184
- data: o,
184
+ data: a,
185
185
  ICONS: e,
186
186
  className: n
187
187
  }
188
188
  );
189
189
  }, Ee = async ({
190
+ SectionZone: t,
191
+ LPCadastro: e,
192
+ ...n
193
+ }) => {
194
+ var c;
195
+ const { data: r } = await S({
196
+ contentType: "lp_cadastro",
197
+ ...n
198
+ }), [s] = r, a = (s == null ? void 0 : s.sections) || [], i = ((c = s == null ? void 0 : s.content) == null ? void 0 : c.conteúdo) || {}, l = s == null ? void 0 : s.sections;
199
+ return /* @__PURE__ */ k(N, { children: [
200
+ /* @__PURE__ */ y(e, { sections: a, content: i }),
201
+ /* @__PURE__ */ y(t, { data: l })
202
+ ] });
203
+ }, Fe = async ({
190
204
  children: t,
191
205
  productId: e,
192
206
  COMMON_PAGE_COLUMN_GAP: n,
193
207
  SectionZone: r,
194
208
  PDPContentProvider: s,
195
- ...o
209
+ ...a
196
210
  }) => {
197
- const { data: i } = await E({
211
+ const { data: i } = await S({
198
212
  contentType: "product_page",
199
- ...o
213
+ ...a
200
214
  });
201
215
  return /* @__PURE__ */ y(
202
216
  s,
@@ -208,19 +222,19 @@ const Ie = ({
208
222
  children: t
209
223
  }
210
224
  );
211
- }, Fe = {
225
+ }, Oe = {
212
226
  "column-modifier": "_column-modifier_1tqap_1"
213
- }, Oe = async ({
227
+ }, $e = async ({
214
228
  children: t,
215
229
  slug: e,
216
230
  SectionZone: n,
217
231
  COMMON_PAGE_COLUMN_GAP_PDC: r,
218
232
  PLPContentProvider: s,
219
- ...o
233
+ ...a
220
234
  }) => {
221
- const { data: i } = await E({
235
+ const { data: i } = await S({
222
236
  contentType: "categories_page",
223
- ...o
237
+ ...a
224
238
  }), l = i.find(
225
239
  (p) => {
226
240
  var h, f, m;
@@ -242,13 +256,13 @@ const Ie = ({
242
256
  return ((h = p.config) == null ? void 0 : h.seo.slug) === "default" && ((m = (f = p.config) == null ? void 0 : f.responsive) == null ? void 0 : m.deviceType) === "mobile";
243
257
  }
244
258
  );
245
- return /* @__PURE__ */ j(A, { children: [
259
+ return /* @__PURE__ */ k(N, { children: [
246
260
  /* @__PURE__ */ y(
247
261
  _.Column,
248
262
  {
249
263
  className: M.classNameConcat(
250
264
  D["responsive-desktop-flex"],
251
- Fe["column-modifier"]
265
+ Oe["column-modifier"]
252
266
  ),
253
267
  style: {
254
268
  minHeight: "100vh"
@@ -276,9 +290,9 @@ const Ie = ({
276
290
  }
277
291
  ) })
278
292
  ] });
279
- }, $e = async ({ slug: t, ...e }) => {
293
+ }, qe = async ({ slug: t, ...e }) => {
280
294
  var i, l, c;
281
- const { data: n } = await E({
295
+ const { data: n } = await S({
282
296
  contentType: "redirect_to_search",
283
297
  ...e
284
298
  }), r = ((c = (l = (i = n[0]) == null ? void 0 : i.redirectToSearch) == null ? void 0 : l.redirectToSearch) == null ? void 0 : c.paths) ?? [];
@@ -288,19 +302,19 @@ const Ie = ({
288
302
  query: null,
289
303
  redirect: !1
290
304
  };
291
- const o = r.find(
305
+ const a = r.find(
292
306
  (d) => {
293
307
  var u, p;
294
308
  return ((u = d.path) == null ? void 0 : u.replace(/\//g, "-").toLowerCase()) === t.replace(/\//g, "-").toLowerCase() || ((p = d.path) == null ? void 0 : p.replace(/\//g, "-").toLowerCase()) === `/${t}`.replace(/\//g, "-").toLowerCase();
295
309
  }
296
310
  );
297
- return o ? {
311
+ return a ? {
298
312
  slug: t,
299
- query: o == null ? void 0 : o.searchQuery,
313
+ query: a == null ? void 0 : a.searchQuery,
300
314
  redirect: !0,
301
- collectionId: o == null ? void 0 : o.collectionId,
302
- filters: o == null ? void 0 : o.filters,
303
- sort: o == null ? void 0 : o.sort
315
+ collectionId: a == null ? void 0 : a.collectionId,
316
+ filters: a == null ? void 0 : a.filters,
317
+ sort: a == null ? void 0 : a.sort
304
318
  } : {
305
319
  slug: t,
306
320
  query: null,
@@ -309,32 +323,32 @@ const Ie = ({
309
323
  filters: null,
310
324
  sort: null
311
325
  };
312
- }, qe = async ({ slug: t, ...e }) => {
326
+ }, Pe = async ({ slug: t, ...e }) => {
313
327
  var i, l, c;
314
- const { data: n } = await E({
328
+ const { data: n } = await S({
315
329
  contentType: "redirect_to_search",
316
330
  ...e
317
331
  }), r = ((c = (l = (i = n[0]) == null ? void 0 : i.redirectToSearch) == null ? void 0 : l.redirectToSearch) == null ? void 0 : c.paths) ?? [];
318
332
  if (!!!r.length)
319
333
  return null;
320
- const o = r.find(
334
+ const a = r.find(
321
335
  (d) => {
322
336
  var u, p;
323
337
  return ((u = d.path) == null ? void 0 : u.replace(/\//g, "-").toLowerCase()) === t.replace(/\//g, "-").toLowerCase() || ((p = d.path) == null ? void 0 : p.replace(/\//g, "-").toLowerCase()) === `/${t}`.replace(/\//g, "-").toLowerCase();
324
338
  }
325
339
  );
326
- return o ? {
340
+ return a ? {
327
341
  slug: t,
328
- title: o.pageTitle,
329
- description: o.pageDescription
342
+ title: a.pageTitle,
343
+ description: a.pageDescription
330
344
  } : null;
331
- }, Pe = async ({
345
+ }, we = async ({
332
346
  children: t,
333
347
  SectionZone: e,
334
348
  className: n,
335
349
  ...r
336
350
  }) => {
337
- const { data: s } = await E({
351
+ const { data: s } = await S({
338
352
  contentType: "search_page",
339
353
  ...r
340
354
  });
@@ -346,29 +360,30 @@ const Ie = ({
346
360
  className: n,
347
361
  children: t
348
362
  }
349
- ) : /* @__PURE__ */ y(A, { children: t });
350
- }, we = async ({
363
+ ) : /* @__PURE__ */ y(N, { children: t });
364
+ }, Ne = async ({
351
365
  ClientTipbarContent: t,
352
366
  ...e
353
367
  }) => {
354
- const { data: n } = await E({
368
+ const { data: n } = await S({
355
369
  contentType: "tipbar",
356
370
  ...e
357
371
  });
358
372
  return /* @__PURE__ */ y(t, { data: n });
359
- }, Ne = {
373
+ }, Ae = {
360
374
  CommonPageContent: Re,
361
375
  HeaderContent: ve,
362
- TipbarContent: we,
376
+ TipbarContent: Ne,
363
377
  FooterContent: Ce,
364
- PLPContent: Oe,
365
- PDPContent: Ee,
366
- getRedirectData: $e,
367
- getPLPSynteticMetaData: qe,
368
- SearchPageContent: Pe,
369
- HelpButtonContent: Te
370
- }, Cr = { Components: Ne }, b = async (t, e = {}) => {
371
- const { method: n = "GET", body: r, headers: s = {}, priority: o = "auto", cache: i = "default" } = e;
378
+ PLPContent: $e,
379
+ PDPContent: Fe,
380
+ getRedirectData: qe,
381
+ getPLPSynteticMetaData: Pe,
382
+ SearchPageContent: we,
383
+ HelpButtonContent: Te,
384
+ LPCadastroContent: Ee
385
+ }, vr = { Components: Ae }, b = async (t, e = {}) => {
386
+ const { method: n = "GET", body: r, headers: s = {}, priority: a = "auto", cache: i = "default" } = e;
372
387
  return fetch(t, {
373
388
  method: n,
374
389
  headers: {
@@ -376,24 +391,24 @@ const Ie = ({
376
391
  Accept: "application/json",
377
392
  "Content-Type": "application/json"
378
393
  },
379
- priority: o,
394
+ priority: a,
380
395
  cache: i,
381
396
  ...r ? { body: JSON.stringify(r) } : {}
382
397
  // not body in get
383
398
  }).then((l) => l.json()).catch((l) => {
384
399
  console.error("[ERROR FETCH VTEX]", l);
385
400
  });
386
- }, N = /* @__PURE__ */ new Map();
387
- async function Ae(t, e = {}) {
401
+ }, A = /* @__PURE__ */ new Map();
402
+ async function ke(t, e = {}) {
388
403
  var n;
389
404
  try {
390
405
  const { abort: r = !1 } = e, s = new AbortController();
391
- r && (N.has(t) && ((n = N.get(t)) == null || n.abort(), N.delete(t)), N.set(t, s));
392
- const o = b(t, {
406
+ r && (A.has(t) && ((n = A.get(t)) == null || n.abort(), A.delete(t)), A.set(t, s));
407
+ const a = b(t, {
393
408
  ...e,
394
409
  ...r ? { signal: s.signal } : {}
395
410
  });
396
- return r && N.delete(t), o;
411
+ return r && A.delete(t), a;
397
412
  } catch (r) {
398
413
  if (r.name === "AbortError") {
399
414
  console.log(`[REQUEST CANCELLED]: ${t}`);
@@ -402,16 +417,16 @@ async function Ae(t, e = {}) {
402
417
  throw console.error(`[ERROR API]: ${r.message}`), r;
403
418
  }
404
419
  }
405
- const ke = a.object({
406
- country: a.string().length(3, "Country code must be 3 characters long").required("Country is required"),
407
- postalCode: a.string().nullable()
420
+ const je = o.object({
421
+ country: o.string().length(3, "Country code must be 3 characters long").required("Country is required"),
422
+ postalCode: o.string().nullable()
408
423
  });
409
- async function je({ apiUrl: t, body: e, fetchOptions: n }) {
424
+ async function De({ apiUrl: t, body: e, fetchOptions: n }) {
410
425
  if (!e) {
411
426
  console.error("[ERROR FETCHING] Body is required");
412
427
  return;
413
428
  }
414
- await ke.validate(e);
429
+ await je.validate(e);
415
430
  const { country: r, postalCode: s } = e;
416
431
  return await b(
417
432
  `${t}/api/checkout/pub/postal-code/${r}/${s}`,
@@ -422,10 +437,10 @@ async function je({ apiUrl: t, body: e, fetchOptions: n }) {
422
437
  }
423
438
  );
424
439
  }
425
- const De = a.object({
426
- orderFormId: a.string().nullable(),
427
- sellerCode: a.string().nullable(),
428
- sellerName: a.string().nullable()
440
+ const _e = o.object({
441
+ orderFormId: o.string().nullable(),
442
+ sellerCode: o.string().nullable(),
443
+ sellerName: o.string().nullable()
429
444
  });
430
445
  async function K({
431
446
  apiUrl: t,
@@ -436,8 +451,8 @@ async function K({
436
451
  console.error("[ERROR FETCHING] Body is required");
437
452
  return;
438
453
  }
439
- await De.validate(e);
440
- const { orderFormId: r, sellerCode: s, sellerName: o } = e, i = s ? `${s.trim()} - ${o}` : null;
454
+ await _e.validate(e);
455
+ const { orderFormId: r, sellerCode: s, sellerName: a } = e, i = s ? `${s.trim()} - ${a}` : null;
441
456
  return b(
442
457
  `${t}/api/checkout/pub/orderForm/${r}/attachments/openTextField`,
443
458
  {
@@ -449,10 +464,10 @@ async function K({
449
464
  }
450
465
  );
451
466
  }
452
- const _e = a.object({
453
- orderFormId: a.string().nullable(),
454
- sellerCode: a.string().nullable(),
455
- marketingData: a.object()
467
+ const He = o.object({
468
+ orderFormId: o.string().nullable(),
469
+ sellerCode: o.string().nullable(),
470
+ marketingData: o.object()
456
471
  });
457
472
  async function J({
458
473
  apiUrl: t,
@@ -464,10 +479,10 @@ async function J({
464
479
  console.error("[ERROR FETCHING] Body is required");
465
480
  return;
466
481
  }
467
- await _e.validate(e);
468
- const { orderFormId: s, sellerCode: o, marketingData: i } = e, l = o ? {
469
- utmCampaign: o ? o.toUpperCase() : "",
470
- utmiCampaign: o ? `${n.VENDOR_CODE}` : "semcodigo"
482
+ await He.validate(e);
483
+ const { orderFormId: s, sellerCode: a, marketingData: i } = e, l = a ? {
484
+ utmCampaign: a ? a.toUpperCase() : "",
485
+ utmiCampaign: a ? `${n.VENDOR_CODE}` : "semcodigo"
471
486
  } : {};
472
487
  return b(
473
488
  `${t}/api/checkout/pub/orderForm/${s}/attachments/marketingData`,
@@ -481,17 +496,17 @@ async function J({
481
496
  }
482
497
  );
483
498
  }
484
- const He = a.object({
485
- orderFormId: a.string().nullable(),
486
- sellerCode: a.string().nullable(),
487
- sellerName: a.string().nullable()
499
+ const Le = o.object({
500
+ orderFormId: o.string().nullable(),
501
+ sellerCode: o.string().nullable(),
502
+ sellerName: o.string().nullable()
488
503
  });
489
504
  async function Be({ apiUrl: t, body: e, fetchOptions: n }) {
490
505
  if (!e) {
491
506
  console.error("[ERROR FETCHING] Body is required");
492
507
  return;
493
508
  }
494
- await He.validate(e);
509
+ await Le.validate(e);
495
510
  const r = await K({ apiUrl: t, body: e, fetchOptions: n });
496
511
  return J({
497
512
  apiUrl: t,
@@ -502,11 +517,11 @@ async function Be({ apiUrl: t, body: e, fetchOptions: n }) {
502
517
  fetchOptions: n
503
518
  });
504
519
  }
505
- const Le = a.object({
506
- orderFormId: a.string().nullable(),
507
- coupon: a.string().nullable()
520
+ const Ge = o.object({
521
+ orderFormId: o.string().nullable(),
522
+ coupon: o.string().nullable()
508
523
  });
509
- async function Ge({
524
+ async function Me({
510
525
  apiUrl: t,
511
526
  body: e,
512
527
  fetchOptions: n
@@ -515,7 +530,7 @@ async function Ge({
515
530
  console.error("[ERROR FETCHING] Body is required");
516
531
  return;
517
532
  }
518
- await Le.validate(e);
533
+ await Ge.validate(e);
519
534
  const { coupon: r = "", orderFormId: s } = e;
520
535
  return b(
521
536
  `${t}/api/checkout/pub/orderForm/${s}/coupons`,
@@ -526,12 +541,12 @@ async function Ge({
526
541
  }
527
542
  );
528
543
  }
529
- const Me = a.object({
530
- appId: a.string().required("App ID is required"),
531
- orderFormId: a.string().nullable(),
532
- key: a.array().of(a.string())
544
+ const Ue = o.object({
545
+ appId: o.string().required("App ID is required"),
546
+ orderFormId: o.string().nullable(),
547
+ key: o.array().of(o.string())
533
548
  });
534
- async function Ue({
549
+ async function Ve({
535
550
  apiUrl: t,
536
551
  body: e,
537
552
  fetchOptions: n
@@ -540,33 +555,33 @@ async function Ue({
540
555
  console.error("[ERROR FETCHING] Body is required");
541
556
  return;
542
557
  }
543
- await Me.validate(e);
544
- const { appId: r = "faststore", orderFormId: s, key: o } = e;
558
+ await Ue.validate(e);
559
+ const { appId: r = "faststore", orderFormId: s, key: a } = e;
545
560
  return b(
546
- `${t}/api/checkout/pub/orderForm/${s}/customData/${r}/${o}`,
561
+ `${t}/api/checkout/pub/orderForm/${s}/customData/${r}/${a}`,
547
562
  {
548
563
  method: "PUT",
549
564
  ...n
550
565
  }
551
566
  );
552
567
  }
553
- const Ve = a.object().shape({
554
- name: a.string().required("Attachment name is required"),
555
- content: a.object().nullable()
568
+ const ze = o.object().shape({
569
+ name: o.string().required("Attachment name is required"),
570
+ content: o.object().nullable()
556
571
  });
557
572
  var x;
558
- const ze = a.object().shape({
559
- attachments: (x = a.array().of(Ve)) == null ? void 0 : x.nullable(),
560
- id: a.string().required("ID of SKU is required"),
561
- index: a.number().integer().nullable(),
562
- quantity: a.number().integer().nullable(),
563
- seller: a.string().required("Seller is required"),
564
- price: a.number().integer()
565
- }), xe = a.object({
566
- orderFormId: a.string().required("OrderFormId is required"),
567
- orderItems: a.array().of(ze)
573
+ const xe = o.object().shape({
574
+ attachments: (x = o.array().of(ze)) == null ? void 0 : x.nullable(),
575
+ id: o.string().required("ID of SKU is required"),
576
+ index: o.number().integer().nullable(),
577
+ quantity: o.number().integer().nullable(),
578
+ seller: o.string().required("Seller is required"),
579
+ price: o.number().integer()
580
+ }), Qe = o.object({
581
+ orderFormId: o.string().required("OrderFormId is required"),
582
+ orderItems: o.array().of(xe)
568
583
  });
569
- async function Qe({
584
+ async function Ke({
570
585
  apiUrl: t,
571
586
  body: e,
572
587
  fetchOptions: n
@@ -575,7 +590,7 @@ async function Qe({
575
590
  console.error("[ERROR FETCHING] Body is required");
576
591
  return;
577
592
  }
578
- await xe.validate(e);
593
+ await Qe.validate(e);
579
594
  const { orderFormId: r, orderItems: s } = e;
580
595
  return b(
581
596
  `${t}/api/checkout/pub/orderForm/${r}/items`,
@@ -586,10 +601,10 @@ async function Qe({
586
601
  }
587
602
  );
588
603
  }
589
- const Ke = a.object({
590
- orderFormId: a.string().nullable()
604
+ const Je = o.object({
605
+ orderFormId: o.string().nullable()
591
606
  });
592
- async function Je({
607
+ async function Ye({
593
608
  apiUrl: t,
594
609
  body: e,
595
610
  fetchOptions: n
@@ -598,7 +613,7 @@ async function Je({
598
613
  console.error("[ERROR FETCHING] Body is required");
599
614
  return;
600
615
  }
601
- await Ke.validate(e);
616
+ await Je.validate(e);
602
617
  const { orderFormId: r } = e;
603
618
  return b(
604
619
  `${t}/api/checkout/pub/orderForm/${r}/items/removeAll`,
@@ -608,23 +623,23 @@ async function Je({
608
623
  }
609
624
  );
610
625
  }
611
- const Ye = a.object().shape({
612
- name: a.string().required("Attachment name is required"),
613
- content: a.object().nullable()
626
+ const We = o.object().shape({
627
+ name: o.string().required("Attachment name is required"),
628
+ content: o.object().nullable()
614
629
  });
615
630
  var Q;
616
- const We = a.object().shape({
617
- attachments: (Q = a.array().of(Ye)) == null ? void 0 : Q.nullable(),
618
- id: a.string().required("ID of SKU is required"),
619
- index: a.number().integer().nullable(),
620
- quantity: a.number().integer().nullable(),
621
- seller: a.string().required("Seller is required"),
622
- price: a.number().integer()
623
- }), Xe = a.object({
624
- orderFormId: a.string().nullable(),
625
- orderItems: a.array().of(We)
631
+ const Xe = o.object().shape({
632
+ attachments: (Q = o.array().of(We)) == null ? void 0 : Q.nullable(),
633
+ id: o.string().required("ID of SKU is required"),
634
+ index: o.number().integer().nullable(),
635
+ quantity: o.number().integer().nullable(),
636
+ seller: o.string().required("Seller is required"),
637
+ price: o.number().integer()
638
+ }), Ze = o.object({
639
+ orderFormId: o.string().nullable(),
640
+ orderItems: o.array().of(Xe)
626
641
  });
627
- async function Ze({
642
+ async function et({
628
643
  apiUrl: t,
629
644
  body: e,
630
645
  fetchOptions: n
@@ -633,7 +648,7 @@ async function Ze({
633
648
  console.error("[ERROR FETCHING] Body is required");
634
649
  return;
635
650
  }
636
- await Xe.validate(e);
651
+ await Ze.validate(e);
637
652
  const { orderFormId: r, orderItems: s } = e;
638
653
  return b(
639
654
  `${t}/api/checkout/pub/orderForm/${r}/items/update`,
@@ -644,10 +659,10 @@ async function Ze({
644
659
  }
645
660
  );
646
661
  }
647
- const et = a.object({
648
- orderFormId: a.string().nullable()
662
+ const tt = o.object({
663
+ orderFormId: o.string().nullable()
649
664
  });
650
- async function tt({
665
+ async function rt({
651
666
  apiUrl: t,
652
667
  body: e,
653
668
  fetchOptions: n
@@ -656,7 +671,7 @@ async function tt({
656
671
  console.error("[ERROR FETCHING] Body is required");
657
672
  return;
658
673
  }
659
- await et.validate(e);
674
+ await tt.validate(e);
660
675
  const { orderFormId: r } = e;
661
676
  return b(
662
677
  `${t}/api/checkout/pub/orderForm/${r}/messages/clear`,
@@ -666,30 +681,30 @@ async function tt({
666
681
  }
667
682
  );
668
683
  }
669
- const rt = a.object({
670
- id: a.string().nullable(),
684
+ const nt = o.object({
685
+ id: o.string().nullable(),
671
686
  // id offering
672
- itemIndex: a.number().nullable(),
673
- orderFormId: a.string().nullable(),
674
- remove: a.boolean().nullable()
687
+ itemIndex: o.number().nullable(),
688
+ orderFormId: o.string().nullable(),
689
+ remove: o.boolean().nullable()
675
690
  });
676
- async function nt({ apiUrl: t, body: e, fetchOptions: n }) {
691
+ async function ot({ apiUrl: t, body: e, fetchOptions: n }) {
677
692
  if (!e) {
678
693
  console.error("[ERROR FETCHING] Body is required");
679
694
  return;
680
695
  }
681
- await rt.validate(e);
682
- const { itemIndex: r, orderFormId: s, id: o, remove: i } = e, l = i ? `/${o}/remove` : "", c = `${t}/api/checkout/pub/orderForm/${s}/items/${r}/offerings${l}`;
696
+ await nt.validate(e);
697
+ const { itemIndex: r, orderFormId: s, id: a, remove: i } = e, l = i ? `/${a}/remove` : "", c = `${t}/api/checkout/pub/orderForm/${s}/items/${r}/offerings${l}`;
683
698
  return b(c, {
684
699
  method: "POST",
685
- body: { id: o },
700
+ body: { id: a },
686
701
  ...n
687
702
  });
688
703
  }
689
- const at = a.object({
690
- orderFormId: a.string().nullable()
704
+ const at = o.object({
705
+ orderFormId: o.string().nullable()
691
706
  });
692
- async function ot({
707
+ async function st({
693
708
  apiUrl: t,
694
709
  body: e,
695
710
  fetchOptions: n,
@@ -703,19 +718,19 @@ async function ot({
703
718
  await at.validate(e);
704
719
  const s = new URLSearchParams({
705
720
  refreshOutdatedData: "true"
706
- }), o = e.orderFormId && ((i = r.orderFormPurchaseId) == null ? void 0 : i.value) !== e.orderFormId ? `${t}/api/checkout/pub/orderForm/${e.orderFormId}?${String(s)}` : `${t}/api/checkout/pub/orderForm`;
707
- return b(o, { method: "GET", ...n });
721
+ }), a = e.orderFormId && ((i = r.orderFormPurchaseId) == null ? void 0 : i.value) !== e.orderFormId ? `${t}/api/checkout/pub/orderForm/${e.orderFormId}?${String(s)}` : `${t}/api/checkout/pub/orderForm`;
722
+ return b(a, { method: "GET", ...n });
708
723
  }
709
- const st = a.object({
710
- orderFormId: a.string().nullable(),
711
- email: a.string().email().required(),
712
- firstName: a.string().required(),
713
- lastName: a.string().required(),
714
- documentType: a.string().required(),
715
- document: a.string().required(),
716
- phone: a.string().matches(/^\+\d{1,3}\d{10,11}$/)
724
+ const it = o.object({
725
+ orderFormId: o.string().nullable(),
726
+ email: o.string().email().required(),
727
+ firstName: o.string().required(),
728
+ lastName: o.string().required(),
729
+ documentType: o.string().required(),
730
+ document: o.string().required(),
731
+ phone: o.string().matches(/^\+\d{1,3}\d{10,11}$/)
717
732
  });
718
- async function it({
733
+ async function ct({
719
734
  apiUrl: t,
720
735
  body: e,
721
736
  fetchOptions: n
@@ -724,7 +739,7 @@ async function it({
724
739
  console.error("[ERROR FETCHING] Body is required");
725
740
  return;
726
741
  }
727
- await st.validate(e);
742
+ await it.validate(e);
728
743
  const { orderFormId: r, ...s } = e;
729
744
  return b(
730
745
  `${t}/api/checkout/pub/orderForm/${r}/attachments/clientProfileData`,
@@ -735,10 +750,10 @@ async function it({
735
750
  }
736
751
  );
737
752
  }
738
- const ct = a.object({
739
- sellerCode: a.string().nullable()
753
+ const lt = o.object({
754
+ sellerCode: o.string().nullable()
740
755
  });
741
- async function lt({
756
+ async function ut({
742
757
  apiUrl: t,
743
758
  body: e,
744
759
  extraData: n,
@@ -748,7 +763,7 @@ async function lt({
748
763
  console.error("[ERROR FETCHING] Body is required");
749
764
  return;
750
765
  }
751
- await ct.validate(e);
766
+ await lt.validate(e);
752
767
  const { sellerCode: s = "" } = e;
753
768
  return b(
754
769
  `${t}/api/dataentities/${n.ENTITIES}/search?_fields=${n.FIELDS}&${n.FILTER}=${s}`,
@@ -761,12 +776,12 @@ async function lt({
761
776
  }
762
777
  );
763
778
  }
764
- const ut = a.object().shape({
765
- country: a.string().length(3, "Country code must be 3 characters long").required("Country is required"),
766
- orderFormId: a.string().nullable(),
767
- postalCode: a.string().nullable()
779
+ const dt = o.object().shape({
780
+ country: o.string().length(3, "Country code must be 3 characters long").required("Country is required"),
781
+ orderFormId: o.string().nullable(),
782
+ postalCode: o.string().nullable()
768
783
  });
769
- async function dt({
784
+ async function pt({
770
785
  apiUrl: t,
771
786
  body: e,
772
787
  fetchOptions: n
@@ -775,11 +790,11 @@ async function dt({
775
790
  console.error("[ERROR FETCHING] Body is required");
776
791
  return;
777
792
  }
778
- await ut.validate(e);
779
- const { country: r, orderFormId: s, postalCode: o } = e, i = o ? {
793
+ await dt.validate(e);
794
+ const { country: r, orderFormId: s, postalCode: a } = e, i = a ? {
780
795
  address: {
781
796
  addressType: "residential",
782
- postalCode: o,
797
+ postalCode: a,
783
798
  country: r
784
799
  }
785
800
  } : {
@@ -795,47 +810,47 @@ async function dt({
795
810
  }
796
811
  );
797
812
  }
798
- const pt = a.object().shape({
799
- orderFormId: a.string().nullable(),
800
- options: a.array().of(
801
- a.object().shape({
802
- itemIndex: a.number(),
803
- selectedDeliveryChannel: a.string(),
804
- selectedSla: a.string()
813
+ const mt = o.object().shape({
814
+ orderFormId: o.string().nullable(),
815
+ options: o.array().of(
816
+ o.object().shape({
817
+ itemIndex: o.number(),
818
+ selectedDeliveryChannel: o.string(),
819
+ selectedSla: o.string()
805
820
  })
806
821
  ),
807
- selectedAddresses: a.array().of(
808
- a.object().shape({
809
- addressId: a.string().required(),
810
- addressType: a.string().required(),
811
- city: a.string().nullable(),
812
- complement: a.string().nullable(),
813
- country: a.string().required().length(3),
814
- geoCoordinates: a.array().of(a.number()).required().min(0),
815
- isDisposable: a.boolean().required(),
816
- neighborhood: a.string().nullable(),
817
- number: a.string().nullable(),
818
- postalCode: a.string().required(),
819
- receiverName: a.string().nullable(),
820
- reference: a.string().nullable(),
821
- state: a.string().nullable(),
822
- street: a.string().nullable()
822
+ selectedAddresses: o.array().of(
823
+ o.object().shape({
824
+ addressId: o.string().required(),
825
+ addressType: o.string().required(),
826
+ city: o.string().nullable(),
827
+ complement: o.string().nullable(),
828
+ country: o.string().required().length(3),
829
+ geoCoordinates: o.array().of(o.number()).required().min(0),
830
+ isDisposable: o.boolean().required(),
831
+ neighborhood: o.string().nullable(),
832
+ number: o.string().nullable(),
833
+ postalCode: o.string().required(),
834
+ receiverName: o.string().nullable(),
835
+ reference: o.string().nullable(),
836
+ state: o.string().nullable(),
837
+ street: o.string().nullable()
823
838
  })
824
839
  )
825
840
  });
826
- async function mt({ apiUrl: t, body: e, fetchOptions: n }) {
841
+ async function ft({ apiUrl: t, body: e, fetchOptions: n }) {
827
842
  if (!e) {
828
843
  console.error("[ERROR FETCHING] Body is required");
829
844
  return;
830
845
  }
831
- await pt.validate(e);
832
- const { orderFormId: r, options: s, selectedAddresses: o } = e;
846
+ await mt.validate(e);
847
+ const { orderFormId: r, options: s, selectedAddresses: a } = e;
833
848
  return b(
834
849
  `${t}/api/checkout/pub/orderForm/${r}/attachments/shippingData`,
835
850
  {
836
851
  method: "POST",
837
852
  body: {
838
- selectedAddresses: o,
853
+ selectedAddresses: a,
839
854
  clearAddressIfPostalCodeNotFound: !1,
840
855
  logisticsInfo: s
841
856
  },
@@ -843,22 +858,22 @@ async function mt({ apiUrl: t, body: e, fetchOptions: n }) {
843
858
  }
844
859
  );
845
860
  }
846
- const ft = a.object({
847
- country: a.string().length(3, "Country code must be 3 characters long").required("Country is required"),
848
- postalCode: a.string().nullable(),
849
- geoCoordinates: a.object().shape({
850
- longitude: a.number().required(),
851
- latitude: a.number().required()
861
+ const gt = o.object({
862
+ country: o.string().length(3, "Country code must be 3 characters long").required("Country is required"),
863
+ postalCode: o.string().nullable(),
864
+ geoCoordinates: o.object().shape({
865
+ longitude: o.number().required(),
866
+ latitude: o.number().required()
852
867
  })
853
868
  });
854
- async function gt({ apiUrl: t, body: e, fetchOptions: n }) {
869
+ async function ht({ apiUrl: t, body: e, fetchOptions: n }) {
855
870
  if (!e) {
856
871
  console.error("[ERROR FETCHING] Body is required");
857
872
  return;
858
873
  }
859
- await ft.validate(e);
860
- const { country: r = "", geoCoordinates: s, postalCode: o = "" } = e, i = new URLSearchParams({ country: String(r) });
861
- return o ? i.append("postalCode", o) : i.append(
874
+ await gt.validate(e);
875
+ const { country: r = "", geoCoordinates: s, postalCode: a = "" } = e, i = new URLSearchParams({ country: String(r) });
876
+ return a ? i.append("postalCode", a) : i.append(
862
877
  "geoCoordinates",
863
878
  `${s == null ? void 0 : s.longitude};${s == null ? void 0 : s.latitude}`
864
879
  ), await b(
@@ -869,22 +884,22 @@ async function gt({ apiUrl: t, body: e, fetchOptions: n }) {
869
884
  }
870
885
  );
871
886
  }
872
- const ht = a.object({
873
- id: a.string().required("ID of SKU is required"),
874
- quantity: a.number().integer().required("Quantity of item is required"),
875
- seller: a.string()
876
- }), bt = a.object({
877
- items: a.array().of(ht),
878
- country: a.string().length(3, "Country code must be 3 characters long").required("Country is required"),
879
- postalCode: a.string().nullable(),
880
- geoCoordinates: a.array().nullable().of(a.number()).length(2)
887
+ const bt = o.object({
888
+ id: o.string().required("ID of SKU is required"),
889
+ quantity: o.number().integer().required("Quantity of item is required"),
890
+ seller: o.string()
891
+ }), yt = o.object({
892
+ items: o.array().of(bt),
893
+ country: o.string().length(3, "Country code must be 3 characters long").required("Country is required"),
894
+ postalCode: o.string().nullable(),
895
+ geoCoordinates: o.array().nullable().of(o.number()).length(2)
881
896
  });
882
- async function yt({ apiUrl: t, body: e, fetchOptions: n }) {
897
+ async function It({ apiUrl: t, body: e, fetchOptions: n }) {
883
898
  if (!e) {
884
899
  console.error("[ERROR FETCHING] Body is required");
885
900
  return;
886
901
  }
887
- return await bt.validate(e), b(
902
+ return await yt.validate(e), b(
888
903
  `${t}/api/checkout/pub/orderForms/simulation`,
889
904
  {
890
905
  method: "POST",
@@ -893,35 +908,35 @@ async function yt({ apiUrl: t, body: e, fetchOptions: n }) {
893
908
  }
894
909
  );
895
910
  }
896
- const It = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
911
+ const Rt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
897
912
  __proto__: null,
898
- getMasterDataSellerCode: lt,
899
- getOrderForm: ot,
900
- postOrderFormAddCoupon: Ge,
901
- postOrderFormAttachClientProfileData: it,
913
+ getMasterDataSellerCode: ut,
914
+ getOrderForm: st,
915
+ postOrderFormAddCoupon: Me,
916
+ postOrderFormAttachClientProfileData: ct,
902
917
  postOrderFormAttachOrderFormData: Be,
903
- postOrderFormAttachShippingData: dt,
918
+ postOrderFormAttachShippingData: pt,
904
919
  postOrderFormAttachmentsMarketingData: J,
905
920
  postOrderFormAttachmentsOpenTextField: K,
906
- postOrderFormClearMessages: tt,
907
- postOrderFormFreightSimulation: yt,
908
- postOrderFormItems: Qe,
909
- postOrderFormRegion: gt,
910
- postOrderFormRemoveAllItems: Je,
911
- postOrderFormUpdateItems: Ze,
912
- postOrderFormUpdateShippingData: mt,
913
- postOrderformAddress: je,
914
- putOrderFormCustomData: Ue,
915
- updateOrderFormOffering: nt
916
- }, Symbol.toStringTag, { value: "Module" })), Rt = a.object({
917
- skuId: a.string()
921
+ postOrderFormClearMessages: rt,
922
+ postOrderFormFreightSimulation: It,
923
+ postOrderFormItems: Ke,
924
+ postOrderFormRegion: ht,
925
+ postOrderFormRemoveAllItems: Ye,
926
+ postOrderFormUpdateItems: et,
927
+ postOrderFormUpdateShippingData: ft,
928
+ postOrderformAddress: De,
929
+ putOrderFormCustomData: Ve,
930
+ updateOrderFormOffering: ot
931
+ }, Symbol.toStringTag, { value: "Module" })), Ct = o.object({
932
+ skuId: o.string()
918
933
  });
919
- async function Ct({ apiUrl: t, body: e, fetchOptions: n }) {
934
+ async function vt({ apiUrl: t, body: e, fetchOptions: n }) {
920
935
  if (!e) {
921
936
  console.error("[ERROR FETCHING] Body is required");
922
937
  return;
923
938
  }
924
- await Rt.validate(e);
939
+ await Ct.validate(e);
925
940
  const { skuId: r } = e;
926
941
  return b(
927
942
  `${t}/api/catalog/pvt/stockkeepingunitkit?parentSkuId=${r}`,
@@ -930,15 +945,15 @@ async function Ct({ apiUrl: t, body: e, fetchOptions: n }) {
930
945
  }
931
946
  );
932
947
  }
933
- const vt = a.object({
934
- ids: a.array().of(a.string().required("ID are required")).required("IDs are required")
948
+ const St = o.object({
949
+ ids: o.array().of(o.string().required("ID are required")).required("IDs are required")
935
950
  });
936
- async function St({ apiUrl: t, body: e, fetchOptions: n }) {
951
+ async function Tt({ apiUrl: t, body: e, fetchOptions: n }) {
937
952
  if (!e) {
938
953
  console.error("[ERROR FETCHING] Body is required");
939
954
  return;
940
955
  }
941
- await vt.validate(e);
956
+ await St.validate(e);
942
957
  const { ids: r } = e;
943
958
  return b(
944
959
  `${t}/api/catalog_system/pub/products/search?fq=${r.map((s) => `productId:${s}`).join("&fq=")}`,
@@ -947,15 +962,15 @@ async function St({ apiUrl: t, body: e, fetchOptions: n }) {
947
962
  }
948
963
  );
949
964
  }
950
- const Tt = a.object({
951
- productId: a.number().required("Product ID is required")
965
+ const Et = o.object({
966
+ productId: o.number().required("Product ID is required")
952
967
  });
953
- async function Et({ apiUrl: t, body: e, fetchOptions: n }) {
968
+ async function Ft({ apiUrl: t, body: e, fetchOptions: n }) {
954
969
  if (!e) {
955
970
  console.error("[ERROR FETCHING] Body is required");
956
971
  return;
957
972
  }
958
- await Tt.validate(e);
973
+ await Et.validate(e);
959
974
  const { productId: r } = e;
960
975
  return b(
961
976
  `${t}/api/catalog_system/pub/products/crossselling/similars/${r.toString()}`,
@@ -964,20 +979,20 @@ async function Et({ apiUrl: t, body: e, fetchOptions: n }) {
964
979
  }
965
980
  );
966
981
  }
967
- const Ft = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
982
+ const Ot = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
968
983
  __proto__: null,
969
- getCatalogKitProducts: Ct,
970
- getCatalogProducts: St,
971
- getCatalogSimilars: Et
972
- }, Symbol.toStringTag, { value: "Module" })), Ot = a.object({
973
- query: a.string()
984
+ getCatalogKitProducts: vt,
985
+ getCatalogProducts: Tt,
986
+ getCatalogSimilars: Ft
987
+ }, Symbol.toStringTag, { value: "Module" })), $t = o.object({
988
+ query: o.string()
974
989
  });
975
- async function $t({ apiUrl: t, body: e, fetchOptions: n }) {
990
+ async function qt({ apiUrl: t, body: e, fetchOptions: n }) {
976
991
  if (!e) {
977
992
  console.error("[ERROR FETCHING] Body is required");
978
993
  return;
979
994
  }
980
- await Ot.validate(e);
995
+ await $t.validate(e);
981
996
  const { query: r = "" } = e, s = new URLSearchParams({ query: r });
982
997
  return b(
983
998
  `${t}/api/io/_v/api/intelligent-search/autocomplete_suggestions?${s.toString()}`,
@@ -986,10 +1001,10 @@ async function $t({ apiUrl: t, body: e, fetchOptions: n }) {
986
1001
  }
987
1002
  );
988
1003
  }
989
- const qt = (t, e) => ye(t, e), Pt = (t) => ({
1004
+ const Pt = (t, e) => ye(t, e), wt = (t) => ({
990
1005
  ...t,
991
- description: t.description ? qt(t.description) : t.description
992
- }), wt = ({
1006
+ description: t.description ? Pt(t.description) : t.description
1007
+ }), Nt = ({
993
1008
  offer: t,
994
1009
  seller: e,
995
1010
  product: n
@@ -999,8 +1014,8 @@ const qt = (t, e) => ye(t, e), Pt = (t) => ({
999
1014
  seller: e
1000
1015
  }), Y = (t, e) => ({
1001
1016
  ...t,
1002
- isVariantOf: Pt(e)
1003
- }), Nt = (t) => t ? "https://schema.org/InStock" : "https://schema.org/OutOfStock", k = (t) => t.AvailableQuantity > 0, U = (t) => t.spotPrice ?? 0, At = (t) => t.Price ?? 0, W = (t, e) => k(t) && !k(e) ? -1 : !k(t) && k(e) ? 1 : U(t) - U(e), kt = (t, e) => {
1017
+ isVariantOf: wt(e)
1018
+ }), At = (t) => t ? "https://schema.org/InStock" : "https://schema.org/OutOfStock", j = (t) => t.AvailableQuantity > 0, U = (t) => t.spotPrice ?? 0, kt = (t) => t.Price ?? 0, W = (t, e) => j(t) && !j(e) ? -1 : !j(t) && j(e) ? 1 : U(t) - U(e), jt = (t, e) => {
1004
1019
  let n = 0;
1005
1020
  for (let r = 1; r < t.length; r++)
1006
1021
  e(t[n], t[r]) > 0 && (n = r);
@@ -1011,7 +1026,7 @@ const qt = (t, e) => ye(t, e), Pt = (t) => ({
1011
1026
  offer: s.commertialOffer,
1012
1027
  sku: r
1013
1028
  }))
1014
- ), n = kt(
1029
+ ), n = jt(
1015
1030
  e,
1016
1031
  ({ offer: r }, { offer: s }) => W(r, s)
1017
1032
  );
@@ -1026,11 +1041,11 @@ const qt = (t, e) => ye(t, e), Pt = (t) => ({
1026
1041
  attachment: "ATTACHMENT",
1027
1042
  specification: "SPECIFICATION",
1028
1043
  attribute: "ATTRIBUTE"
1029
- }, jt = (t) => ({
1044
+ }, Dt = (t) => ({
1030
1045
  name: t.name,
1031
1046
  value: t.content,
1032
1047
  valueReference: H.attachment
1033
- }), Dt = (t) => ({
1048
+ }), _t = (t) => ({
1034
1049
  propertyID: t.id,
1035
1050
  name: t.name,
1036
1051
  value: t.value,
@@ -1038,7 +1053,7 @@ const qt = (t, e) => ye(t, e), Pt = (t) => ({
1038
1053
  valueReference: H.attribute,
1039
1054
  visible: t.visible
1040
1055
  }
1041
- }), B = (t, e, n) => {
1056
+ }), L = (t, e, n) => {
1042
1057
  const r = t.flatMap(({ name: i, values: l }) => l ? l.map((c) => ({
1043
1058
  name: i,
1044
1059
  value: c,
@@ -1047,23 +1062,23 @@ const qt = (t, e) => ye(t, e), Pt = (t) => ({
1047
1062
  name: i,
1048
1063
  value: "",
1049
1064
  valueReference: H.specification
1050
- }), s = Array.isArray(n) ? n.map(jt) : [], o = e ? e.map(Dt) : [];
1065
+ }), s = Array.isArray(n) ? n.map(Dt) : [], a = e ? e.map(_t) : [];
1051
1066
  return [
1052
1067
  ...r,
1053
1068
  ...s,
1054
- ...o
1069
+ ...a
1055
1070
  ];
1056
- }, V = "ÁÄÂÀÃÅČÇĆĎÉĚËÈÊẼĔȆÍÌÎÏŇÑÓÖÒÔÕØŘŔŠŤÚŮÜÙÛÝŸŽáäâàãåčçćďéěëèêẽĕȇíìîïňñóöòôõøðřŕšťúůüùûýÿžþÞĐđ߯a", _t = "AAAAAACCCDEEEEEEEEIIIINNOOOOOORRSTUUUUUYYZaaaaaacccdeeeeeeeeiiiinnooooooorrstuuuuuyyzbBDdBAa", Ht = (t) => {
1071
+ }, V = "ÁÄÂÀÃÅČÇĆĎÉĚËÈÊẼĔȆÍÌÎÏŇÑÓÖÒÔÕØŘŔŠŤÚŮÜÙÛÝŸŽáäâàãåčçćďéěëèêẽĕȇíìîïňñóöòôõøðřŕšťúůüùûýÿžþÞĐđ߯a", Ht = "AAAAAACCCDEEEEEEEEIIIINNOOOOOORRSTUUUUUYYZaaaaaacccdeeeeeeeeiiiinnooooooorrstuuuuuyyzbBDdBAa", Lt = (t) => {
1057
1072
  let e = t.slice(0);
1058
1073
  for (let n = 0; n < V.length; n++)
1059
1074
  e = e.replace(
1060
1075
  new RegExp(V.charAt(n), "g"),
1061
- _t.charAt(n)
1076
+ Ht.charAt(n)
1062
1077
  );
1063
1078
  return e;
1064
1079
  }, Bt = (t) => t.replace(/[·/_,:]/, "-"), ee = (t) => {
1065
1080
  const n = t.replace(/,/g, "").replace(/[*+~.()'"!:@&\[\]`/ %$#?{}|><=_^]/g, "-");
1066
- return Bt(Ht(n)).toLowerCase();
1081
+ return Bt(Lt(n)).toLowerCase();
1067
1082
  }, te = (t) => `/${t}/p`, re = (t) => {
1068
1083
  const e = Math.max(
1069
1084
  ...t.map((r) => r.NumberOfInstallments)
@@ -1080,22 +1095,22 @@ const qt = (t, e) => ye(t, e), Pt = (t) => ({
1080
1095
  listPrice: 0,
1081
1096
  sellerDefault: !1
1082
1097
  }, s = t.map(
1083
- (o) => wt({
1084
- offer: o.commertialOffer,
1085
- seller: o,
1098
+ (a) => Nt({
1099
+ offer: a.commertialOffer,
1100
+ seller: a,
1086
1101
  product: e
1087
1102
  })
1088
- ).sort(W).map((o) => (o.seller.sellerId === "1" && o.AvailableQuantity > 0 && (n.price = o.Price, n.listPrice = o.ListPrice, n.sellerDefault = !0), {
1089
- availability: o.AvailableQuantity > 0,
1090
- listPrice: o.ListPrice,
1091
- price: At(o),
1092
- priceValidUntil: o.PriceValidUntil,
1103
+ ).sort(W).map((a) => (a.seller.sellerId === "1" && a.AvailableQuantity > 0 && (n.price = a.Price, n.listPrice = a.ListPrice, n.sellerDefault = !0), {
1104
+ availability: a.AvailableQuantity > 0,
1105
+ listPrice: a.ListPrice,
1106
+ price: kt(a),
1107
+ priceValidUntil: a.PriceValidUntil,
1093
1108
  priceCurrency: "BRL",
1094
- installments: o.Installments,
1095
- lowPrice: o.spotPrice,
1096
- quantity: o.AvailableQuantity,
1109
+ installments: a.Installments,
1110
+ lowPrice: a.spotPrice,
1111
+ quantity: a.AvailableQuantity,
1097
1112
  seller: {
1098
- identifier: o.seller.sellerId
1113
+ identifier: a.seller.sellerId
1099
1114
  }
1100
1115
  }));
1101
1116
  return {
@@ -1103,14 +1118,14 @@ const qt = (t, e) => ye(t, e), Pt = (t) => ({
1103
1118
  highPrice: n.sellerDefault ? n.listPrice : s[0].listPrice,
1104
1119
  offers: s
1105
1120
  };
1106
- }, ae = (t) => {
1107
- const { attributes: e, itemId: n, name: r, sellers: s, variations: o } = t;
1121
+ }, oe = (t) => {
1122
+ const { attributes: e, itemId: n, name: r, sellers: s, variations: a } = t;
1108
1123
  return {
1109
- additionalProperty: B(o, e, []),
1124
+ additionalProperty: L(a, e, []),
1110
1125
  name: r,
1111
1126
  offers: {
1112
1127
  offers: s == null ? void 0 : s.map(({ sellerId: i, commertialOffer: l }) => ({
1113
- availability: Nt(l.AvailableQuantity > 0),
1128
+ availability: At(l.AvailableQuantity > 0),
1114
1129
  listPrice: l.ListPrice,
1115
1130
  price: l.Price,
1116
1131
  quantity: l.AvailableQuantity,
@@ -1122,14 +1137,14 @@ const qt = (t, e) => ye(t, e), Pt = (t) => ({
1122
1137
  sku: n
1123
1138
  // slug: getSlug('', itemId), // getSlug('', itemId) que tipo de slug é esse?
1124
1139
  };
1125
- }, Lt = (t) => {
1140
+ }, Gt = (t) => {
1126
1141
  var v;
1127
1142
  const {
1128
1143
  attributes: e,
1129
1144
  referenceId: n,
1130
1145
  isVariantOf: r,
1131
1146
  images: s,
1132
- itemId: o,
1147
+ itemId: a,
1133
1148
  name: i,
1134
1149
  sellers: l,
1135
1150
  videos: c,
@@ -1142,15 +1157,15 @@ const qt = (t, e) => ye(t, e), Pt = (t) => ({
1142
1157
  linkText: m,
1143
1158
  productClusters: R,
1144
1159
  clusterHighlights: F,
1145
- productName: S,
1146
- properties: T,
1160
+ productName: T,
1161
+ properties: E,
1147
1162
  productId: O,
1148
1163
  productReference: g
1149
1164
  } = r, C = p.slice().reverse(), I = ne(l, t.isVariantOf), $ = re(I.offers[0].installments);
1150
1165
  return {
1151
- sku: o,
1166
+ sku: a,
1152
1167
  gtin: ((v = n == null ? void 0 : n[0]) == null ? void 0 : v.Value) ?? g ?? "",
1153
- name: S ?? i,
1168
+ name: T ?? i,
1154
1169
  description: f,
1155
1170
  releaseDate: r.releaseDate ?? "",
1156
1171
  slug: m,
@@ -1161,21 +1176,21 @@ const qt = (t, e) => ye(t, e), Pt = (t) => ({
1161
1176
  brand: { name: u, brandName: u },
1162
1177
  seo: {
1163
1178
  description: f,
1164
- title: S,
1179
+ title: T,
1165
1180
  canonical: te(m)
1166
1181
  },
1167
1182
  cluster: {
1168
1183
  generals: R,
1169
1184
  highlights: F
1170
1185
  },
1171
- properties: T,
1186
+ properties: E,
1172
1187
  availability: { status: I.offers[0].availability },
1173
1188
  breadcrumbList: {
1174
1189
  itemListElement: [
1175
1190
  ...C.map((P, w) => {
1176
- const q = P.split("/"), L = q[q.length - 2], ie = q.map(ee).join("/");
1191
+ const q = P.split("/"), B = q[q.length - 2], ie = q.map(ee).join("/");
1177
1192
  return {
1178
- name: L,
1193
+ name: B,
1179
1194
  item: ie,
1180
1195
  position: w + 1
1181
1196
  };
@@ -1190,21 +1205,21 @@ const qt = (t, e) => ye(t, e), Pt = (t) => ({
1190
1205
  },
1191
1206
  image: Z(s),
1192
1207
  offers: I,
1193
- additionalProperty: B(d, e, []),
1208
+ additionalProperty: L(d, e, []),
1194
1209
  isVariantOf: {
1195
1210
  productGroupID: r.productId,
1196
- hasVariant: r.items.map((P) => ae(P))
1211
+ hasVariant: r.items.map((P) => oe(P))
1197
1212
  },
1198
1213
  installments: $
1199
1214
  };
1200
- }, Gt = (t) => {
1215
+ }, Mt = (t) => {
1201
1216
  var $;
1202
1217
  const {
1203
1218
  attributes: e,
1204
1219
  referenceId: n,
1205
1220
  isVariantOf: r,
1206
1221
  images: s,
1207
- itemId: o,
1222
+ itemId: a,
1208
1223
  name: i,
1209
1224
  sellers: l,
1210
1225
  Videos: c,
@@ -1217,12 +1232,12 @@ const qt = (t, e) => ye(t, e), Pt = (t) => ({
1217
1232
  linkText: m,
1218
1233
  productClusters: R,
1219
1234
  productName: F,
1220
- Coleção: S,
1221
- "ID Coleção": T,
1235
+ Coleção: T,
1236
+ "ID Coleção": E,
1222
1237
  productId: O
1223
1238
  } = r, g = p.slice().reverse(), C = ne(l, t.isVariantOf), I = re(C.offers[0].installments);
1224
1239
  return {
1225
- sku: o,
1240
+ sku: a,
1226
1241
  gtin: (($ = n[0]) == null ? void 0 : $.Value) ?? "",
1227
1242
  name: F ?? i,
1228
1243
  description: f,
@@ -1231,8 +1246,8 @@ const qt = (t, e) => ye(t, e), Pt = (t) => ({
1231
1246
  video: c[0],
1232
1247
  categories: p,
1233
1248
  categoriesIds: h,
1234
- collection: S,
1235
- collectionId: T,
1249
+ collection: T,
1250
+ collectionId: E,
1236
1251
  id: O,
1237
1252
  brand: { name: u, brandName: u },
1238
1253
  seo: {
@@ -1249,10 +1264,10 @@ const qt = (t, e) => ye(t, e), Pt = (t) => ({
1249
1264
  breadcrumbList: {
1250
1265
  itemListElement: [
1251
1266
  ...g.map((v, P) => {
1252
- const w = v.split("/"), q = w[w.length - 2], L = w.map(ee).join("/");
1267
+ const w = v.split("/"), q = w[w.length - 2], B = w.map(ee).join("/");
1253
1268
  return {
1254
1269
  name: q,
1255
- item: L,
1270
+ item: B,
1256
1271
  position: P + 1
1257
1272
  };
1258
1273
  }),
@@ -1266,7 +1281,7 @@ const qt = (t, e) => ye(t, e), Pt = (t) => ({
1266
1281
  },
1267
1282
  image: Z(s),
1268
1283
  offers: C,
1269
- additionalProperty: B(d, e, []),
1284
+ additionalProperty: L(d, e, []),
1270
1285
  isVariantOf: {
1271
1286
  productGroupID: r.productId,
1272
1287
  hasVariant: r.items.map((v) => {
@@ -1275,8 +1290,8 @@ const qt = (t, e) => ye(t, e), Pt = (t) => ({
1275
1290
  values: v[q]
1276
1291
  }));
1277
1292
  return {
1278
- ...ae(v),
1279
- additionalProperty: B(
1293
+ ...oe(v),
1294
+ additionalProperty: L(
1280
1295
  w,
1281
1296
  e,
1282
1297
  []
@@ -1286,30 +1301,30 @@ const qt = (t, e) => ye(t, e), Pt = (t) => ({
1286
1301
  },
1287
1302
  installments: I
1288
1303
  };
1289
- }, Mt = a.array().of(a.object({
1290
- key: a.string().required(),
1291
- value: a.string().required()
1304
+ }, Ut = o.array().of(o.object({
1305
+ key: o.string().required(),
1306
+ value: o.string().required()
1292
1307
  })).required("Facets are required");
1293
- async function Ut({ apiUrl: t, body: e, fetchOptions: n }) {
1308
+ async function Vt({ apiUrl: t, body: e, fetchOptions: n }) {
1294
1309
  if (!e) {
1295
1310
  console.error("[ERROR FETCHING] Body is required");
1296
1311
  return;
1297
1312
  }
1298
- await Mt.validate(e);
1313
+ await Ut.validate(e);
1299
1314
  const r = new URLSearchParams({}), s = e.map(({ key: i, value: l }) => `${i}/${l}`).join("/");
1300
1315
  le(e, r);
1301
- const o = `${t}/api/catalog_system/pub/products/crossselling/${s}`;
1302
- return b(o, {
1316
+ const a = `${t}/api/catalog_system/pub/products/crossselling/${s}`;
1317
+ return b(a, {
1303
1318
  cache: "no-store",
1304
1319
  ...n
1305
1320
  }).then((i) => i.map((c) => {
1306
1321
  const d = X(c.items);
1307
1322
  return d && Y(d, c);
1308
1323
  }).filter((c) => !!c).map((c) => ({
1309
- node: Gt(c)
1324
+ node: Mt(c)
1310
1325
  })));
1311
1326
  }
1312
- const oe = ({
1327
+ const ae = ({
1313
1328
  apiUrl: t,
1314
1329
  body: e,
1315
1330
  fetchOptions: n,
@@ -1321,7 +1336,7 @@ const oe = ({
1321
1336
  }
1322
1337
  const {
1323
1338
  query: s = "",
1324
- page: o = 1,
1339
+ page: a = 1,
1325
1340
  count: i,
1326
1341
  sort: l = "",
1327
1342
  facets: c = [],
@@ -1329,7 +1344,7 @@ const oe = ({
1329
1344
  hideUnavailableItems: u = !0,
1330
1345
  locale: p = ""
1331
1346
  } = e, h = new URLSearchParams({
1332
- page: o.toString(),
1347
+ page: a.toString(),
1333
1348
  count: (i == null ? void 0 : i.toString()) ?? (r == null ? void 0 : r.ITEMS_PER_PAGE) ?? 24,
1334
1349
  query: s,
1335
1350
  sort: l,
@@ -1337,7 +1352,7 @@ const oe = ({
1337
1352
  });
1338
1353
  u !== void 0 && h.append("hideUnavailableItems", u.toString());
1339
1354
  const f = c.map((m) => `${m.key}/${m.value}`).join("/") ?? "";
1340
- return Ae(
1355
+ return ke(
1341
1356
  `${t}/api/io/_v/api/intelligent-search/${d}/${f}?${h.toString()}`,
1342
1357
  {
1343
1358
  headers: {
@@ -1348,12 +1363,12 @@ const oe = ({
1348
1363
  }
1349
1364
  );
1350
1365
  };
1351
- async function Vt({ body: t, extraData: e, ...n }) {
1366
+ async function zt({ body: t, extraData: e, ...n }) {
1352
1367
  if (!t) {
1353
1368
  console.error("[ERROR FETCHING] Body is required");
1354
1369
  return;
1355
1370
  }
1356
- const r = await oe({
1371
+ const r = await ae({
1357
1372
  body: {
1358
1373
  ...t,
1359
1374
  type: "product_search"
@@ -1364,32 +1379,32 @@ async function Vt({ body: t, extraData: e, ...n }) {
1364
1379
  const c = X(l.items);
1365
1380
  return c && Y(c, l);
1366
1381
  }).filter((l) => !!l)) ?? [], {
1367
- pagination: o,
1382
+ pagination: a,
1368
1383
  recordsFiltered: i
1369
1384
  } = r;
1370
1385
  return {
1371
1386
  data: {
1372
1387
  pagination: {
1373
- nextPage: o.after.length > 0,
1374
- previousPage: o.before.length > 0,
1388
+ nextPage: a.after.length > 0,
1389
+ previousPage: a.before.length > 0,
1375
1390
  startCursor: "0",
1376
1391
  endCursor: i.toString(),
1377
1392
  count: i,
1378
- total: o.count
1393
+ total: a.count
1379
1394
  },
1380
1395
  products: s.map((l, c) => ({
1381
- node: Lt(l),
1396
+ node: Gt(l),
1382
1397
  cursor: c.toString()
1383
1398
  }))
1384
1399
  }
1385
1400
  };
1386
1401
  }
1387
- async function zt({ body: t, extraData: e, ...n }) {
1402
+ async function xt({ body: t, extraData: e, ...n }) {
1388
1403
  if (!t) {
1389
1404
  console.error("[ERROR FETCHING] Body is required");
1390
1405
  return;
1391
1406
  }
1392
- const r = await oe({
1407
+ const r = await ae({
1393
1408
  body: {
1394
1409
  ...t,
1395
1410
  type: "facets"
@@ -1404,40 +1419,40 @@ async function zt({ body: t, extraData: e, ...n }) {
1404
1419
  }
1405
1420
  };
1406
1421
  }
1407
- const xt = a.object({
1408
- query: a.string().optional(),
1409
- locale: a.string().optional()
1422
+ const Qt = o.object({
1423
+ query: o.string().optional(),
1424
+ locale: o.string().optional()
1410
1425
  });
1411
- async function Qt({ apiUrl: t, body: e, fetchOptions: n }) {
1426
+ async function Kt({ apiUrl: t, body: e, fetchOptions: n }) {
1412
1427
  if (!e) {
1413
1428
  console.error("[ERROR FETCHING] Body is required");
1414
1429
  return;
1415
1430
  }
1416
- await xt.validate(e);
1417
- const { query: r = "", locale: s = "default_locale" } = e, o = new URLSearchParams({ query: r, locale: s });
1431
+ await Qt.validate(e);
1432
+ const { query: r = "", locale: s = "default_locale" } = e, a = new URLSearchParams({ query: r, locale: s });
1418
1433
  return b(
1419
- `${t}/api/io/_v/api/intelligent-search/search_suggestions?${o.toString()}`,
1434
+ `${t}/api/io/_v/api/intelligent-search/search_suggestions?${a.toString()}`,
1420
1435
  {
1421
1436
  ...n
1422
1437
  }
1423
1438
  );
1424
1439
  }
1425
- async function Kt({ apiUrl: t }) {
1440
+ async function Jt({ apiUrl: t }) {
1426
1441
  return b(`${t}/api/io/_v/api/intelligent-search/top_searches`);
1427
1442
  }
1428
- const Jt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1443
+ const Yt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1429
1444
  __proto__: null,
1430
- getSearchAutoCompleteSuggestions: $t,
1431
- getSearchCrossellingProducts: Ut,
1432
- getSearchFacets: zt,
1433
- getSearchProducts: Vt,
1434
- getSearchSuggestedTerms: Qt,
1435
- getSearchTopSearchs: Kt
1436
- }, Symbol.toStringTag, { value: "Module" })), Yt = a.object({
1437
- masterDataEntity: a.string().nonNullable(),
1438
- payload: a.object().shape({}).nullable()
1445
+ getSearchAutoCompleteSuggestions: qt,
1446
+ getSearchCrossellingProducts: Vt,
1447
+ getSearchFacets: xt,
1448
+ getSearchProducts: zt,
1449
+ getSearchSuggestedTerms: Kt,
1450
+ getSearchTopSearchs: Jt
1451
+ }, Symbol.toStringTag, { value: "Module" })), Wt = o.object({
1452
+ masterDataEntity: o.string().nonNullable(),
1453
+ payload: o.object().shape({}).nullable()
1439
1454
  });
1440
- async function Wt({
1455
+ async function Xt({
1441
1456
  apiUrl: t,
1442
1457
  body: e,
1443
1458
  fetchOptions: n
@@ -1446,9 +1461,9 @@ async function Wt({
1446
1461
  console.error("[ERROR FETCHING] Body is required");
1447
1462
  return;
1448
1463
  }
1449
- await Yt.validate(e);
1450
- const { masterDataEntity: r, payload: s } = e, o = `${t}/api/dataentities/${r}/documents`;
1451
- return b(o, {
1464
+ await Wt.validate(e);
1465
+ const { masterDataEntity: r, payload: s } = e, a = `${t}/api/dataentities/${r}/documents`;
1466
+ return b(a, {
1452
1467
  method: "POST",
1453
1468
  body: {
1454
1469
  payload: s
@@ -1456,21 +1471,21 @@ async function Wt({
1456
1471
  ...n
1457
1472
  });
1458
1473
  }
1459
- const Xt = a.object().shape({
1460
- _where: a.string().optional(),
1461
- _fields: a.string().optional(),
1462
- _sort: a.string().optional(),
1463
- _from: a.number().integer().min(0).optional(),
1464
- _to: a.number().integer().min(0).optional(),
1465
- _keyword: a.string().optional()
1466
- }), Zt = a.object({
1467
- masterDataEntity: a.string().required(),
1468
- searchFields: Xt,
1469
- headers: a.object().shape({
1470
- "REST-Range": a.string().notRequired()
1474
+ const Zt = o.object().shape({
1475
+ _where: o.string().optional(),
1476
+ _fields: o.string().optional(),
1477
+ _sort: o.string().optional(),
1478
+ _from: o.number().integer().min(0).optional(),
1479
+ _to: o.number().integer().min(0).optional(),
1480
+ _keyword: o.string().optional()
1481
+ }), er = o.object({
1482
+ masterDataEntity: o.string().required(),
1483
+ searchFields: Zt,
1484
+ headers: o.object().shape({
1485
+ "REST-Range": o.string().notRequired()
1471
1486
  })
1472
1487
  });
1473
- async function er({
1488
+ async function tr({
1474
1489
  apiUrl: t,
1475
1490
  body: e,
1476
1491
  fetchOptions: n
@@ -1480,11 +1495,11 @@ async function er({
1480
1495
  return;
1481
1496
  }
1482
1497
  const r = new URLSearchParams();
1483
- await Zt.validate(e);
1484
- const { masterDataEntity: s, searchFields: o, headers: i } = e;
1485
- o && Object.entries(o).forEach(([c, d]) => {
1498
+ await er.validate(e);
1499
+ const { masterDataEntity: s, searchFields: a, headers: i } = e;
1500
+ a && Object.entries(a).forEach(([c, d]) => {
1486
1501
  r.append(c, String(d));
1487
- }), "_fields" in o || r == null || r.append("_fields", "_all");
1502
+ }), "_fields" in a || r == null || r.append("_fields", "_all");
1488
1503
  const l = `${t}/api/dataentities/${s}/search?${r.toString()}`;
1489
1504
  return b(l, {
1490
1505
  headers: {
@@ -1494,12 +1509,12 @@ async function er({
1494
1509
  ...n
1495
1510
  });
1496
1511
  }
1497
- const tr = a.object({
1498
- dataEntityName: a.string().required(),
1499
- id: a.string().required(),
1500
- fieldsToBeUpdated: a.object().shape({})
1512
+ const rr = o.object({
1513
+ dataEntityName: o.string().required(),
1514
+ id: o.string().required(),
1515
+ fieldsToBeUpdated: o.object().shape({})
1501
1516
  });
1502
- async function rr({
1517
+ async function nr({
1503
1518
  apiUrl: t,
1504
1519
  body: e,
1505
1520
  fetchOptions: n
@@ -1508,28 +1523,28 @@ async function rr({
1508
1523
  console.error("[ERROR FETCHING] Body is required");
1509
1524
  return;
1510
1525
  }
1511
- await tr.validate(e);
1512
- const { dataEntityName: r, id: s, fieldsToBeUpdated: o } = e, i = `${t}/api/dataentities/${r}/documents/${s}`;
1526
+ await rr.validate(e);
1527
+ const { dataEntityName: r, id: s, fieldsToBeUpdated: a } = e, i = `${t}/api/dataentities/${r}/documents/${s}`;
1513
1528
  return b(i, {
1514
1529
  body: {
1515
- fieldsToBeUpdated: o
1530
+ fieldsToBeUpdated: a
1516
1531
  },
1517
1532
  method: "PATCH",
1518
1533
  ...n
1519
1534
  });
1520
1535
  }
1521
- const nr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1536
+ const or = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1522
1537
  __proto__: null,
1523
- getSearchMasterdata: er,
1524
- patchUpdateMasterdata: rr,
1525
- postMasterdata: Wt
1538
+ getSearchMasterdata: tr,
1539
+ patchUpdateMasterdata: nr,
1540
+ postMasterdata: Xt
1526
1541
  }, Symbol.toStringTag, { value: "Module" }));
1527
1542
  async function ar({ body: t, apiUrl: e, extraData: n, fetchOptions: r }) {
1528
1543
  const { productIds: s } = t;
1529
1544
  if (!s)
1530
1545
  return console.error("[ERROR FETCHING] productIds is required"), [];
1531
- const { NAME_SPLIT_SYMBOL: o } = n;
1532
- if (!o)
1546
+ const { NAME_SPLIT_SYMBOL: a } = n;
1547
+ if (!a)
1533
1548
  return console.error("[ERROR FETCHING] NAME_SPLIT_SYMBOL is required"), [];
1534
1549
  const i = s.map((u) => typeof u == "string" || typeof u == "number" ? `productId:${u}` : "").join("&fq="), l = await b(
1535
1550
  `${e}/api/catalog_system/pub/products/search?fq=${i}`,
@@ -1539,7 +1554,7 @@ async function ar({ body: t, apiUrl: e, extraData: n, fetchOptions: r }) {
1539
1554
  ), c = (u) => Object.keys(u).map((p) => ({ id: p, name: u[p] }));
1540
1555
  return l.map((u, p) => {
1541
1556
  var O;
1542
- const { installments: h, price: f, listPrice: m, sizes: R, allSizesAvailable: F } = de({ items: u.items, NAME_SPLIT_SYMBOL: o }), S = F ? !0 : R.some((g) => g.available), T = u.items[0].sellers[0].commertialOffer;
1557
+ const { installments: h, price: f, listPrice: m, sizes: R, allSizesAvailable: F } = de({ items: u.items, NAME_SPLIT_SYMBOL: a }), T = F ? !0 : R.some((g) => g.available), E = u.items[0].sellers[0].commertialOffer;
1543
1558
  return {
1544
1559
  node: {
1545
1560
  sku: u.items[0].itemId,
@@ -1565,7 +1580,7 @@ async function ar({ body: t, apiUrl: e, extraData: n, fetchOptions: r }) {
1565
1580
  highlights: c(u.clusterHighlights)
1566
1581
  },
1567
1582
  availability: {
1568
- status: S
1583
+ status: T
1569
1584
  },
1570
1585
  image: u.items[0].images.map(
1571
1586
  ({
@@ -1582,14 +1597,14 @@ async function ar({ body: t, apiUrl: e, extraData: n, fetchOptions: r }) {
1582
1597
  highPrice: m,
1583
1598
  offers: [
1584
1599
  {
1585
- availability: S,
1600
+ availability: T,
1586
1601
  listPrice: m,
1587
1602
  price: f,
1588
- priceValidUntil: T.PriceValidUntil,
1603
+ priceValidUntil: E.PriceValidUntil,
1589
1604
  priceCurrency: "BRL",
1590
- installments: T.Installments,
1605
+ installments: E.Installments,
1591
1606
  lowPrice: f,
1592
- quantity: T.AvailableQuantity,
1607
+ quantity: E.AvailableQuantity,
1593
1608
  seller: {
1594
1609
  identifier: u.items[0].sellers[0].sellerId
1595
1610
  }
@@ -1639,21 +1654,21 @@ async function ar({ body: t, apiUrl: e, extraData: n, fetchOptions: r }) {
1639
1654
  };
1640
1655
  });
1641
1656
  }
1642
- const or = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1657
+ const sr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1643
1658
  __proto__: null,
1644
1659
  getWishlistProducts: ar
1645
- }, Symbol.toStringTag, { value: "Module" })), sr = (t = "") => t.charAt(0).toUpperCase() + t.slice(1), z = (t, e = " ") => !t || typeof t == "string" && t.length === 0 ? t : (Array.isArray(t) ? t : t.split("-")).map(sr).join(e), ir = ({ canonical: t, seo: e, slug: n }) => {
1660
+ }, Symbol.toStringTag, { value: "Module" })), ir = (t = "") => t.charAt(0).toUpperCase() + t.slice(1), z = (t, e = " ") => !t || typeof t == "string" && t.length === 0 ? t : (Array.isArray(t) ? t : t.split("-")).map(ir).join(e), cr = ({ canonical: t, seo: e, slug: n }) => {
1646
1661
  const r = Array.isArray(n) ? n.join(", ") : n;
1647
1662
  return {
1648
1663
  id: 0,
1649
- Title: `${Array.isArray(n) ? n.map((o) => z(o)).join(",") : z(n)} - ${e.title}`,
1664
+ Title: `${Array.isArray(n) ? n.map((a) => z(a)).join(",") : z(n)} - ${e.title}`,
1650
1665
  MetaTagDescription: e.description,
1651
1666
  name: r,
1652
1667
  hasChildren: !1,
1653
1668
  url: t,
1654
1669
  children: []
1655
1670
  };
1656
- }, cr = ({ canonical: t, category: e, previousImages: n, seo: r }) => ({
1671
+ }, lr = ({ canonical: t, category: e, previousImages: n, seo: r }) => ({
1657
1672
  category: String(e == null ? void 0 : e.id),
1658
1673
  title: (e == null ? void 0 : e.Title) ?? r.title,
1659
1674
  description: (e == null ? void 0 : e.MetaTagDescription) ?? r.description,
@@ -1664,23 +1679,23 @@ const or = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1664
1679
  description: (e == null ? void 0 : e.MetaTagDescription) ?? r.description,
1665
1680
  images: Array.isArray(n) ? [...n] : []
1666
1681
  }
1667
- }), lr = ({ items: t, parent: e, apiUrl: n, find: r }) => {
1682
+ }), ur = ({ items: t, parent: e, apiUrl: n, find: r }) => {
1668
1683
  const s = t.find(
1669
1684
  (i) => i.url.replace(n, "") === decodeURIComponent(e.toLowerCase())
1670
1685
  );
1671
1686
  return (s == null ? void 0 : s.children.find(
1672
1687
  (i) => i.name.toLowerCase() === decodeURIComponent(String(r))
1673
1688
  )) ?? s;
1674
- }, ur = (t) => {
1689
+ }, dr = (t) => {
1675
1690
  t instanceof Error ? (console.error(`[ERROR CATEGORY INFO]: ${t.message}`), console.error(t.stack)) : console.error("[ERROR CATEGORY INFO]: Unknown error", t);
1676
- }, dr = /* @__PURE__ */ new Set([
1691
+ }, pr = /* @__PURE__ */ new Set([
1677
1692
  "brand",
1678
1693
  "category",
1679
1694
  "department",
1680
1695
  "subcategory",
1681
1696
  "collection",
1682
1697
  "cluster"
1683
- ]), pr = (t) => typeof (t == null ? void 0 : t.pageType) == "string" && dr.has(t == null ? void 0 : t.pageType.toLowerCase()), mr = (t) => ({
1698
+ ]), mr = (t) => typeof (t == null ? void 0 : t.pageType) == "string" && pr.has(t == null ? void 0 : t.pageType.toLowerCase()), fr = (t) => ({
1684
1699
  collection: t.Coleção,
1685
1700
  categoryId: t.categoryId,
1686
1701
  current_collection: t["Coleção Atual"],
@@ -1690,61 +1705,61 @@ const or = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1690
1705
  (i) => i.sellers.find((l) => l.commertialOffer.IsAvailable)
1691
1706
  ).length === 0 || (n == null ? void 0 : n.find((i) => (i == null ? void 0 : i.productId) === (r == null ? void 0 : r.productId))) !== void 0)
1692
1707
  return n;
1693
- const o = r.items[0].images.find(
1708
+ const a = r.items[0].images.find(
1694
1709
  (i) => e.includes(i.imageLabel)
1695
1710
  );
1696
1711
  return n.push({
1697
1712
  slug: `/${r.linkText}/p`,
1698
1713
  productId: r == null ? void 0 : r.productId,
1699
- textureImage: (o == null ? void 0 : o.imageUrl) ?? "",
1700
- textureAlt: (o == null ? void 0 : o.imageText) ?? ""
1714
+ textureImage: (a == null ? void 0 : a.imageUrl) ?? "",
1715
+ textureAlt: (a == null ? void 0 : a.imageText) ?? ""
1701
1716
  }), n;
1702
- }, []), fr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1717
+ }, []), gr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1703
1718
  __proto__: null,
1704
- createEmptySeoCategory: ir,
1705
- createSeoCategory: cr,
1706
- findCategory: lr,
1719
+ createEmptySeoCategory: cr,
1720
+ createSeoCategory: lr,
1721
+ findCategory: ur,
1707
1722
  formattedSimilars: se,
1708
- isCollectionPageType: pr,
1709
- notFindCategoryError: ur,
1710
- responseAdapter: mr
1711
- }, Symbol.toStringTag, { value: "Module" })), gr = {
1723
+ isCollectionPageType: mr,
1724
+ notFindCategoryError: dr,
1725
+ responseAdapter: fr
1726
+ }, Symbol.toStringTag, { value: "Module" })), hr = {
1712
1727
  parseSearchState: ge,
1713
1728
  convertSearchParams: fe,
1714
1729
  filterNonRootFacets: me,
1715
1730
  filterNonCategorySelected: pe
1716
- }, hr = async ({ children: t, apiUrl: e, productId: n, ClientItems: r, PDP_INFO: s, TEXTURE_IMAGE: o, TOGGLE_STYLE_MODIFIER: i }) => {
1731
+ }, br = async ({ children: t, apiUrl: e, productId: n, ClientItems: r, PDP_INFO: s, TEXTURE_IMAGE: a, TOGGLE_STYLE_MODIFIER: i }) => {
1717
1732
  const l = await fetch(
1718
1733
  `${e}/api/catalog_system/pub/products/crossselling/similars/${n.toString()}`
1719
- ).then((d) => d.json()), c = se(l, o);
1720
- return /* @__PURE__ */ j("div", { className: G.similars, children: [
1721
- /* @__PURE__ */ j("div", { className: G["similars-info"], children: [
1734
+ ).then((d) => d.json()), c = se(l, a);
1735
+ return /* @__PURE__ */ k("div", { className: G.similars, children: [
1736
+ /* @__PURE__ */ k("div", { className: G["similars-info"], children: [
1722
1737
  /* @__PURE__ */ y("span", { className: G["sections-title"], children: s.product.color_title }),
1723
1738
  t
1724
1739
  ] }),
1725
1740
  /* @__PURE__ */ y(r, { productId: n, similars: c, TOGGLE_STYLE_MODIFIER: i })
1726
1741
  ] });
1727
- }, vr = {
1728
- checkout: It,
1729
- catalog: Ft,
1742
+ }, Sr = {
1743
+ checkout: Rt,
1744
+ catalog: Ot,
1730
1745
  cms: he,
1731
- search: Jt,
1732
- masterdata: nr,
1746
+ search: Yt,
1747
+ masterdata: or,
1733
1748
  wishlist: {
1734
- ...or
1749
+ ...sr
1735
1750
  }
1736
- }, Sr = {
1737
- catalog: fr,
1738
- search: gr,
1739
- product: be
1740
1751
  }, Tr = {
1752
+ catalog: gr,
1753
+ search: hr,
1754
+ product: be
1755
+ }, Er = {
1741
1756
  template: {
1742
- pdp: { PDPSimilars: hr }
1757
+ pdp: { PDPSimilars: br }
1743
1758
  }
1744
1759
  };
1745
1760
  export {
1746
- vr as serverAPIs,
1747
- Cr as serverCMS,
1748
- Tr as serverComponents,
1749
- Sr as serverHelpers
1761
+ Sr as serverAPIs,
1762
+ vr as serverCMS,
1763
+ Er as serverComponents,
1764
+ Tr as serverHelpers
1750
1765
  };