@soma-vertical-web/multi-lib 1.0.15 → 1.0.17
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.
- package/cms/ContentTypes/LPLojas/LPLojaClientWrapper.d.ts +3 -0
- package/cms/ContentTypes/LPLojas/LPLojasContent.d.ts +3 -0
- package/cms/ContentTypes/LPLojas/helpers.d.ts +12 -0
- package/cms/ContentTypes/LPLojas/typing.d.ts +33 -0
- package/cms/index.d.ts +1 -0
- package/cms/server.d.ts +1 -0
- package/contexts/contexts/lplojas/Context.d.ts +6 -0
- package/contexts/index.d.ts +4 -0
- package/data/api/master-data/search/index.d.ts +1 -1
- package/index.js +13 -13
- package/index.mjs +3719 -3423
- package/index2.js +1 -1
- package/index2.mjs +386 -350
- package/layout/index.d.ts +34 -0
- package/layout/template/LPLojas/Composite/Content/Content.d.ts +12 -0
- package/layout/template/LPLojas/Composite/Content/index.d.ts +1 -0
- package/layout/template/LPLojas/Composite/Details/Details.d.ts +7 -0
- package/layout/template/LPLojas/Composite/Details/Item.d.ts +7 -0
- package/layout/template/LPLojas/Composite/Details/Vendor.d.ts +7 -0
- package/layout/template/LPLojas/Composite/Details/index.d.ts +1 -0
- package/layout/template/LPLojas/Composite/Details/interfaces.d.ts +18 -0
- package/layout/template/LPLojas/Composite/DropDown/DropDown.d.ts +7 -0
- package/layout/template/LPLojas/Composite/DropDown/index.d.ts +1 -0
- package/layout/template/LPLojas/Composite/DropDown/interfaces.d.ts +10 -0
- package/layout/template/LPLojas/Composite/ReturnButton/ReturnButton.d.ts +11 -0
- package/layout/template/LPLojas/Composite/ReturnButton/index.d.ts +1 -0
- package/layout/template/LPLojas/Composite/Root.d.ts +7 -0
- package/layout/template/LPLojas/Composite/Section/Section.d.ts +12 -0
- package/layout/template/LPLojas/Composite/Section/index.d.ts +1 -0
- package/layout/template/LPLojas/Composite/Select/Select.d.ts +10 -0
- package/layout/template/LPLojas/Composite/Select/index.d.ts +1 -0
- package/layout/template/LPLojas/Composite/Title/Title.d.ts +7 -0
- package/layout/template/LPLojas/Composite/Title/index.d.ts +1 -0
- package/layout/template/LPLojas/constant.d.ts +1 -0
- package/layout/template/LPLojas/index.d.ts +35 -0
- package/layout/template/LPLojas/interfaces.d.ts +18 -0
- package/package.json +1 -1
- package/style.css +1 -1
package/index2.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { jsx as b, jsxs as N, Fragment as
|
|
2
|
-
import { x as
|
|
1
|
+
import { jsx as b, jsxs as N, Fragment as B } from "react/jsx-runtime";
|
|
2
|
+
import { x as S, r as j, S as ce, y as le, z as ue, a as de, v as me, t as pe, A as fe, p as ge, o as M, B as he, C as ye, D as be, e as Ie } from "./index-ByhWQJ9Z.mjs";
|
|
3
3
|
import { Utils as D, helpers as _ } from "@soma-vertical-web/core-components";
|
|
4
4
|
import * as a from "yup";
|
|
5
5
|
import Ce from "sanitize-html";
|
|
@@ -8,7 +8,7 @@ const Re = async ({
|
|
|
8
8
|
ClientCartProvider: e,
|
|
9
9
|
...n
|
|
10
10
|
}) => {
|
|
11
|
-
const { data: r } = await
|
|
11
|
+
const { data: r } = await S(
|
|
12
12
|
"mini_cart",
|
|
13
13
|
n
|
|
14
14
|
);
|
|
@@ -22,20 +22,20 @@ const Re = async ({
|
|
|
22
22
|
}) => {
|
|
23
23
|
const o = e == null ? void 0 : e.find(
|
|
24
24
|
(d) => {
|
|
25
|
-
var C,
|
|
26
|
-
return ((
|
|
25
|
+
var C, f, p, y;
|
|
26
|
+
return ((f = (C = d.config) == null ? void 0 : C.responsive) == null ? void 0 : f.deviceType) === "desktop" && ((y = (p = d.config) == null ? void 0 : p.seo) == null ? void 0 : y.slug) === t;
|
|
27
27
|
}
|
|
28
|
-
), i = o == null ? void 0 : o.config.responsive.gapCustom,
|
|
28
|
+
), 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(
|
|
29
29
|
(d) => {
|
|
30
|
-
var C,
|
|
31
|
-
return ((
|
|
30
|
+
var C, f, p, y;
|
|
31
|
+
return ((f = (C = d.config) == null ? void 0 : C.responsive) == null ? void 0 : f.deviceType) === "mobile" && ((y = (p = d.config) == null ? void 0 : p.seo) == null ? void 0 : y.slug) === t;
|
|
32
32
|
}
|
|
33
|
-
),
|
|
34
|
-
return /* @__PURE__ */ N(
|
|
33
|
+
), m = c == null ? void 0 : c.config.responsive.gapCustom, u = c == null ? void 0 : c.config.responsive.gapSections;
|
|
34
|
+
return /* @__PURE__ */ N(B, { children: [
|
|
35
35
|
/* @__PURE__ */ b(
|
|
36
36
|
D.Column,
|
|
37
37
|
{
|
|
38
|
-
gap: i &&
|
|
38
|
+
gap: i && l ? l : r,
|
|
39
39
|
className: _.classNameConcat(
|
|
40
40
|
j["responsive-desktop-flex"],
|
|
41
41
|
"utils-column-modifier"
|
|
@@ -46,12 +46,12 @@ const Re = async ({
|
|
|
46
46
|
/* @__PURE__ */ b(
|
|
47
47
|
D.Column,
|
|
48
48
|
{
|
|
49
|
-
gap:
|
|
49
|
+
gap: m && u ? u : r,
|
|
50
50
|
className: _.classNameConcat(
|
|
51
51
|
j["responsive-mobile-flex"],
|
|
52
52
|
"utils-column-modifier"
|
|
53
53
|
),
|
|
54
|
-
children: /* @__PURE__ */ b(n, { data: (
|
|
54
|
+
children: /* @__PURE__ */ b(n, { data: (c == null ? void 0 : c.sections) ?? [], identifyWhoIsFirst: s })
|
|
55
55
|
}
|
|
56
56
|
)
|
|
57
57
|
] });
|
|
@@ -62,7 +62,7 @@ const Re = async ({
|
|
|
62
62
|
identifyWhoIsFirst: r = !1,
|
|
63
63
|
...s
|
|
64
64
|
}) => {
|
|
65
|
-
const { data: o } = await
|
|
65
|
+
const { data: o } = await S(
|
|
66
66
|
"common_page",
|
|
67
67
|
s
|
|
68
68
|
);
|
|
@@ -81,7 +81,7 @@ const Re = async ({
|
|
|
81
81
|
ClientFlagsAndTagsProvider: e,
|
|
82
82
|
...n
|
|
83
83
|
}) => {
|
|
84
|
-
const { data: r } = await
|
|
84
|
+
const { data: r } = await S(
|
|
85
85
|
"flags_and_tags",
|
|
86
86
|
n
|
|
87
87
|
);
|
|
@@ -94,12 +94,12 @@ const Re = async ({
|
|
|
94
94
|
ICONS: s,
|
|
95
95
|
SectionZone: o,
|
|
96
96
|
Footer: i,
|
|
97
|
-
FooterSupport:
|
|
98
|
-
hasFooterStamps:
|
|
99
|
-
...
|
|
97
|
+
FooterSupport: l,
|
|
98
|
+
hasFooterStamps: c,
|
|
99
|
+
...m
|
|
100
100
|
}) => {
|
|
101
|
-
var
|
|
102
|
-
const { data: u } = await
|
|
101
|
+
var f, p, y, I, F, O, $, g, E, R, T;
|
|
102
|
+
const { data: u } = await S("footer", m), d = Array.isArray(u) && ((f = u[0]) == null ? void 0 : f.type) === "footer" ? u[0] : null, C = {
|
|
103
103
|
...(p = d == null ? void 0 : d.paymentInfo) == null ? void 0 : p.paymentInfo,
|
|
104
104
|
acceptedFlags: Array.isArray(
|
|
105
105
|
(y = d == null ? void 0 : d.paymentInfo) == null ? void 0 : y.paymentInfo.acceptedFlags
|
|
@@ -115,11 +115,11 @@ const Re = async ({
|
|
|
115
115
|
socialInfo: (F = d.socialMedia) == null ? void 0 : F.socialMedia,
|
|
116
116
|
socialMedias: ($ = (O = d.socialMedia) == null ? void 0 : O.socialMedia) == null ? void 0 : $.medias,
|
|
117
117
|
payments: C,
|
|
118
|
-
hasFooterStamps:
|
|
118
|
+
hasFooterStamps: c,
|
|
119
119
|
adornment: {
|
|
120
|
-
...(
|
|
120
|
+
...(E = (g = d.supportInfo) == null ? void 0 : g.supportInfo) != null && E.content ? {
|
|
121
121
|
bottom: /* @__PURE__ */ b(
|
|
122
|
-
|
|
122
|
+
l,
|
|
123
123
|
{
|
|
124
124
|
content: (T = (R = d.supportInfo) == null ? void 0 : R.supportInfo) == null ? void 0 : T.content,
|
|
125
125
|
CONSTANTS: {
|
|
@@ -141,8 +141,8 @@ const Re = async ({
|
|
|
141
141
|
ClientHeaderProvider: e,
|
|
142
142
|
...n
|
|
143
143
|
}) => {
|
|
144
|
-
var o, i,
|
|
145
|
-
const { data: r } = await
|
|
144
|
+
var o, i, l, c, m, u;
|
|
145
|
+
const { data: r } = await S(
|
|
146
146
|
"header",
|
|
147
147
|
n
|
|
148
148
|
), s = Array.isArray(r) ? r[0] : void 0;
|
|
@@ -152,15 +152,15 @@ const Re = async ({
|
|
|
152
152
|
headerData: {
|
|
153
153
|
...((o = s == null ? void 0 : s.layerConfig) == null ? void 0 : o.config) ?? {},
|
|
154
154
|
subMenus: ((i = s == null ? void 0 : s.sections) == null ? void 0 : i.map((d) => d.data)) ?? [],
|
|
155
|
-
categories: ((
|
|
156
|
-
navigationLinks: ((u = (
|
|
155
|
+
categories: ((c = (l = s == null ? void 0 : s.categories) == null ? void 0 : l.categories) == null ? void 0 : c.items) ?? [],
|
|
156
|
+
navigationLinks: ((u = (m = s == null ? void 0 : s.navigationLinks) == null ? void 0 : m.navigationLinks) == null ? void 0 : u.items) ?? []
|
|
157
157
|
},
|
|
158
158
|
children: t
|
|
159
159
|
}
|
|
160
160
|
);
|
|
161
161
|
}, Oe = (t) => {
|
|
162
|
-
var i,
|
|
163
|
-
const e = (
|
|
162
|
+
var i, l;
|
|
163
|
+
const e = (l = (i = t[0]) == null ? void 0 : i.items) == null ? void 0 : l.items;
|
|
164
164
|
if ((e == null ? void 0 : e.items.length) === 0 || t.length === 0)
|
|
165
165
|
return {
|
|
166
166
|
iconLabel: "",
|
|
@@ -168,17 +168,17 @@ const Re = async ({
|
|
|
168
168
|
content: []
|
|
169
169
|
};
|
|
170
170
|
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(
|
|
171
|
-
(
|
|
172
|
-
type:
|
|
173
|
-
id: `${
|
|
174
|
-
title:
|
|
175
|
-
subtitle:
|
|
176
|
-
description:
|
|
177
|
-
buttonLabel:
|
|
178
|
-
buttonHref:
|
|
179
|
-
buttonMode:
|
|
180
|
-
buttonSize:
|
|
181
|
-
buttonIcon:
|
|
171
|
+
(c, m) => ({
|
|
172
|
+
type: c.type,
|
|
173
|
+
id: `${m.toString()}-${c.title.toLowerCase()}`,
|
|
174
|
+
title: c.title,
|
|
175
|
+
subtitle: c.subtitle,
|
|
176
|
+
description: c.description,
|
|
177
|
+
buttonLabel: c.buttonLabel,
|
|
178
|
+
buttonHref: c.buttonHref,
|
|
179
|
+
buttonMode: c.buttonMode,
|
|
180
|
+
buttonSize: c.buttonSize,
|
|
181
|
+
buttonIcon: c.buttonIcon
|
|
182
182
|
})
|
|
183
183
|
);
|
|
184
184
|
return {
|
|
@@ -193,7 +193,7 @@ const Re = async ({
|
|
|
193
193
|
className: n,
|
|
194
194
|
...r
|
|
195
195
|
}) => {
|
|
196
|
-
const { data: s } = await
|
|
196
|
+
const { data: s } = await S(
|
|
197
197
|
"helpbutton",
|
|
198
198
|
r
|
|
199
199
|
);
|
|
@@ -213,19 +213,40 @@ const Re = async ({
|
|
|
213
213
|
LPCadastro: e,
|
|
214
214
|
...n
|
|
215
215
|
}) => {
|
|
216
|
-
var
|
|
217
|
-
const { data: r } = await
|
|
216
|
+
var c;
|
|
217
|
+
const { data: r } = await S(
|
|
218
218
|
"lp_cadastro",
|
|
219
219
|
n
|
|
220
220
|
);
|
|
221
221
|
if (!r || !Array.isArray(r) || r.length === 0)
|
|
222
222
|
return null;
|
|
223
|
-
const [s] = r, o = (s == null ? void 0 : s.sections) || [], i = ((
|
|
224
|
-
return /* @__PURE__ */ N(
|
|
223
|
+
const [s] = r, o = (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;
|
|
224
|
+
return /* @__PURE__ */ N(B, { children: [
|
|
225
225
|
/* @__PURE__ */ b(e, { sections: o, content: i }),
|
|
226
|
-
/* @__PURE__ */ b(t, { data:
|
|
226
|
+
/* @__PURE__ */ b(t, { data: l })
|
|
227
227
|
] });
|
|
228
228
|
}, Ae = async ({
|
|
229
|
+
LPLOJAS_TEMPLATE_RETURN_BUTTON: t,
|
|
230
|
+
ICONS: e,
|
|
231
|
+
entity: n,
|
|
232
|
+
showVendor: r,
|
|
233
|
+
LPStoresClientWrapper: s,
|
|
234
|
+
...o
|
|
235
|
+
}) => {
|
|
236
|
+
var m;
|
|
237
|
+
const { data: i } = await S("lp_lojas", o), c = (m = (Array.isArray(i) ? i : [])[0]) == null ? void 0 : m.config.config;
|
|
238
|
+
return /* @__PURE__ */ b(
|
|
239
|
+
s,
|
|
240
|
+
{
|
|
241
|
+
entity: n,
|
|
242
|
+
content: c,
|
|
243
|
+
data: i,
|
|
244
|
+
showVendor: r,
|
|
245
|
+
ICONS: e,
|
|
246
|
+
LPLOJAS_TEMPLATE_RETURN_BUTTON: t
|
|
247
|
+
}
|
|
248
|
+
);
|
|
249
|
+
}, Pe = async ({
|
|
229
250
|
children: t,
|
|
230
251
|
productId: e,
|
|
231
252
|
COMMON_PAGE_COLUMN_GAP: n,
|
|
@@ -233,7 +254,7 @@ const Re = async ({
|
|
|
233
254
|
PDPContentProvider: s,
|
|
234
255
|
...o
|
|
235
256
|
}) => {
|
|
236
|
-
const { data: i } = await
|
|
257
|
+
const { data: i } = await S(
|
|
237
258
|
"product_page",
|
|
238
259
|
o
|
|
239
260
|
);
|
|
@@ -247,9 +268,9 @@ const Re = async ({
|
|
|
247
268
|
children: t
|
|
248
269
|
}
|
|
249
270
|
);
|
|
250
|
-
},
|
|
271
|
+
}, we = {
|
|
251
272
|
"column-modifier": "_column-modifier_1tqap_1"
|
|
252
|
-
},
|
|
273
|
+
}, Ne = async ({
|
|
253
274
|
className: t,
|
|
254
275
|
children: e,
|
|
255
276
|
slug: n,
|
|
@@ -258,40 +279,40 @@ const Re = async ({
|
|
|
258
279
|
PLPContentProvider: o,
|
|
259
280
|
...i
|
|
260
281
|
}) => {
|
|
261
|
-
const { data:
|
|
282
|
+
const { data: l } = await S(
|
|
262
283
|
"categories_page",
|
|
263
284
|
i
|
|
264
285
|
);
|
|
265
|
-
if (!
|
|
286
|
+
if (!l || !Array.isArray(l))
|
|
266
287
|
return null;
|
|
267
|
-
const
|
|
268
|
-
(
|
|
288
|
+
const c = l.find(
|
|
289
|
+
(f) => {
|
|
269
290
|
var p, y, I;
|
|
270
|
-
return ((p =
|
|
291
|
+
return ((p = f.config) == null ? void 0 : p.seo.slug) === n && ((I = (y = f.config) == null ? void 0 : y.responsive) == null ? void 0 : I.deviceType) === "desktop";
|
|
271
292
|
}
|
|
272
|
-
),
|
|
273
|
-
(
|
|
293
|
+
), m = l.find(
|
|
294
|
+
(f) => {
|
|
274
295
|
var p, y, I;
|
|
275
|
-
return ((p =
|
|
296
|
+
return ((p = f.config) == null ? void 0 : p.seo.slug) === n && ((I = (y = f.config) == null ? void 0 : y.responsive) == null ? void 0 : I.deviceType) === "mobile";
|
|
276
297
|
}
|
|
277
|
-
), u =
|
|
278
|
-
(
|
|
298
|
+
), u = l.find(
|
|
299
|
+
(f) => {
|
|
279
300
|
var p, y, I;
|
|
280
|
-
return ((p =
|
|
301
|
+
return ((p = f.config) == null ? void 0 : p.seo.slug) === "default" && ((I = (y = f.config) == null ? void 0 : y.responsive) == null ? void 0 : I.deviceType) === "desktop";
|
|
281
302
|
}
|
|
282
|
-
), d =
|
|
283
|
-
(
|
|
303
|
+
), d = l.find(
|
|
304
|
+
(f) => {
|
|
284
305
|
var p, y, I;
|
|
285
|
-
return ((p =
|
|
306
|
+
return ((p = f.config) == null ? void 0 : p.seo.slug) === "default" && ((I = (y = f.config) == null ? void 0 : y.responsive) == null ? void 0 : I.deviceType) === "mobile";
|
|
286
307
|
}
|
|
287
308
|
), C = Array.isArray(t) ? t : [t];
|
|
288
|
-
return /* @__PURE__ */ N(
|
|
309
|
+
return /* @__PURE__ */ N(B, { children: [
|
|
289
310
|
/* @__PURE__ */ b(
|
|
290
311
|
D.Column,
|
|
291
312
|
{
|
|
292
313
|
className: _.classNameConcat(
|
|
293
314
|
j["responsive-desktop-flex"],
|
|
294
|
-
[
|
|
315
|
+
[we["column-modifier"], ...C]
|
|
295
316
|
),
|
|
296
317
|
style: {
|
|
297
318
|
minHeight: "100vh"
|
|
@@ -299,7 +320,7 @@ const Re = async ({
|
|
|
299
320
|
children: /* @__PURE__ */ b(
|
|
300
321
|
o,
|
|
301
322
|
{
|
|
302
|
-
data:
|
|
323
|
+
data: c ?? u,
|
|
303
324
|
device: "desktop",
|
|
304
325
|
SectionZone: r,
|
|
305
326
|
COMMON_PAGE_COLUMN_GAP_PDC: s,
|
|
@@ -311,7 +332,7 @@ const Re = async ({
|
|
|
311
332
|
/* @__PURE__ */ b(D.Column, { className: _.classNameConcat(j["responsive-mobile-flex"], t), children: /* @__PURE__ */ b(
|
|
312
333
|
o,
|
|
313
334
|
{
|
|
314
|
-
data:
|
|
335
|
+
data: m ?? d,
|
|
315
336
|
device: "mobile",
|
|
316
337
|
SectionZone: r,
|
|
317
338
|
COMMON_PAGE_COLUMN_GAP_PDC: s,
|
|
@@ -319,9 +340,9 @@ const Re = async ({
|
|
|
319
340
|
}
|
|
320
341
|
) })
|
|
321
342
|
] });
|
|
322
|
-
},
|
|
323
|
-
var i,
|
|
324
|
-
const { data: n } = await
|
|
343
|
+
}, ke = async ({ slug: t, ...e }) => {
|
|
344
|
+
var i, l, c;
|
|
345
|
+
const { data: n } = await S(
|
|
325
346
|
"redirect_to_search",
|
|
326
347
|
e
|
|
327
348
|
);
|
|
@@ -331,7 +352,7 @@ const Re = async ({
|
|
|
331
352
|
query: null,
|
|
332
353
|
redirect: !1
|
|
333
354
|
};
|
|
334
|
-
const r = ((
|
|
355
|
+
const r = ((c = (l = (i = n[0]) == null ? void 0 : i.redirectToSearch) == null ? void 0 : l.redirectToSearch) == null ? void 0 : c.paths) ?? [];
|
|
335
356
|
if (!!!r.length)
|
|
336
357
|
return {
|
|
337
358
|
slug: t,
|
|
@@ -339,9 +360,9 @@ const Re = async ({
|
|
|
339
360
|
redirect: !1
|
|
340
361
|
};
|
|
341
362
|
const o = r.find(
|
|
342
|
-
(
|
|
363
|
+
(m) => {
|
|
343
364
|
var u, d;
|
|
344
|
-
return ((u =
|
|
365
|
+
return ((u = m.path) == null ? void 0 : u.replace(/\//g, "-").toLowerCase()) === t.replace(/\//g, "-").toLowerCase() || ((d = m.path) == null ? void 0 : d.replace(/\//g, "-").toLowerCase()) === `/${t}`.replace(/\//g, "-").toLowerCase();
|
|
345
366
|
}
|
|
346
367
|
);
|
|
347
368
|
return o ? {
|
|
@@ -359,21 +380,21 @@ const Re = async ({
|
|
|
359
380
|
filters: null,
|
|
360
381
|
sort: null
|
|
361
382
|
};
|
|
362
|
-
},
|
|
363
|
-
var i,
|
|
364
|
-
const { data: n } = await
|
|
383
|
+
}, je = async ({ slug: t, ...e }) => {
|
|
384
|
+
var i, l, c;
|
|
385
|
+
const { data: n } = await S(
|
|
365
386
|
"redirect_to_search",
|
|
366
387
|
e
|
|
367
388
|
);
|
|
368
389
|
if (!n || !Array.isArray(n))
|
|
369
390
|
return null;
|
|
370
|
-
const r = ((
|
|
391
|
+
const r = ((c = (l = (i = n[0]) == null ? void 0 : i.redirectToSearch) == null ? void 0 : l.redirectToSearch) == null ? void 0 : c.paths) ?? [];
|
|
371
392
|
if (!!!r.length)
|
|
372
393
|
return null;
|
|
373
394
|
const o = r.find(
|
|
374
|
-
(
|
|
395
|
+
(m) => {
|
|
375
396
|
var u, d;
|
|
376
|
-
return ((u =
|
|
397
|
+
return ((u = m.path) == null ? void 0 : u.replace(/\//g, "-").toLowerCase()) === t.replace(/\//g, "-").toLowerCase() || ((d = m.path) == null ? void 0 : d.replace(/\//g, "-").toLowerCase()) === `/${t}`.replace(/\//g, "-").toLowerCase();
|
|
377
398
|
}
|
|
378
399
|
);
|
|
379
400
|
return o ? {
|
|
@@ -381,13 +402,13 @@ const Re = async ({
|
|
|
381
402
|
title: o.pageTitle,
|
|
382
403
|
description: o.pageDescription
|
|
383
404
|
} : null;
|
|
384
|
-
},
|
|
405
|
+
}, De = async ({
|
|
385
406
|
children: t,
|
|
386
407
|
SectionZone: e,
|
|
387
408
|
className: n,
|
|
388
409
|
...r
|
|
389
410
|
}) => {
|
|
390
|
-
const { data: s } = await
|
|
411
|
+
const { data: s } = await S(
|
|
391
412
|
"search_page",
|
|
392
413
|
r
|
|
393
414
|
);
|
|
@@ -399,31 +420,32 @@ const Re = async ({
|
|
|
399
420
|
className: n,
|
|
400
421
|
children: t
|
|
401
422
|
}
|
|
402
|
-
) : /* @__PURE__ */ b(
|
|
403
|
-
},
|
|
423
|
+
) : /* @__PURE__ */ b(B, { children: "children" });
|
|
424
|
+
}, _e = async ({
|
|
404
425
|
ClientTipbarContent: t,
|
|
405
426
|
...e
|
|
406
427
|
}) => {
|
|
407
|
-
const { data: n } = await
|
|
428
|
+
const { data: n } = await S(
|
|
408
429
|
"tipbar",
|
|
409
430
|
e
|
|
410
431
|
);
|
|
411
432
|
return /* @__PURE__ */ b(t, { data: n });
|
|
412
|
-
},
|
|
433
|
+
}, He = {
|
|
413
434
|
CommonPageContent: Se,
|
|
414
435
|
CartContent: Re,
|
|
415
436
|
FlagsAndTagsContent: Ee,
|
|
416
437
|
HeaderContent: Fe,
|
|
417
|
-
TipbarContent:
|
|
438
|
+
TipbarContent: _e,
|
|
418
439
|
FooterContent: Te,
|
|
419
|
-
PLPContent:
|
|
420
|
-
PDPContent:
|
|
421
|
-
getRedirectData:
|
|
422
|
-
getPLPSynteticMetaData:
|
|
423
|
-
SearchPageContent:
|
|
440
|
+
PLPContent: Ne,
|
|
441
|
+
PDPContent: Pe,
|
|
442
|
+
getRedirectData: ke,
|
|
443
|
+
getPLPSynteticMetaData: je,
|
|
444
|
+
SearchPageContent: De,
|
|
424
445
|
HelpButtonContent: $e,
|
|
425
|
-
LPCadastroContent: qe
|
|
426
|
-
|
|
446
|
+
LPCadastroContent: qe,
|
|
447
|
+
LPLojasContent: Ae
|
|
448
|
+
}, Or = { Components: He }, h = async (t, e = {}) => {
|
|
427
449
|
const { method: n = "GET", body: r, headers: s = {}, priority: o = "auto", cache: i = "default" } = e;
|
|
428
450
|
return fetch(t, {
|
|
429
451
|
method: n,
|
|
@@ -436,11 +458,11 @@ const Re = async ({
|
|
|
436
458
|
cache: i,
|
|
437
459
|
...r ? { body: JSON.stringify(r) } : {}
|
|
438
460
|
// not body in get
|
|
439
|
-
}).then((
|
|
440
|
-
console.error("[ERROR FETCH VTEX]",
|
|
461
|
+
}).then((l) => l.json()).catch((l) => {
|
|
462
|
+
console.error("[ERROR FETCH VTEX]", l);
|
|
441
463
|
});
|
|
442
464
|
}, w = /* @__PURE__ */ new Map();
|
|
443
|
-
async function
|
|
465
|
+
async function Le(t, e = {}) {
|
|
444
466
|
var n;
|
|
445
467
|
try {
|
|
446
468
|
const { abort: r = !1 } = e, s = new AbortController();
|
|
@@ -462,7 +484,7 @@ const Be = a.object({
|
|
|
462
484
|
country: a.string().length(3, "Country code must be 3 characters long").required("Country is required"),
|
|
463
485
|
postalCode: a.string().nullable()
|
|
464
486
|
});
|
|
465
|
-
async function
|
|
487
|
+
async function Ge({ apiUrl: t, body: e, fetchOptions: n }) {
|
|
466
488
|
if (!e) {
|
|
467
489
|
console.error("[ERROR FETCHING] Body is required");
|
|
468
490
|
return;
|
|
@@ -478,7 +500,7 @@ async function Le({ apiUrl: t, body: e, fetchOptions: n }) {
|
|
|
478
500
|
}
|
|
479
501
|
);
|
|
480
502
|
}
|
|
481
|
-
const
|
|
503
|
+
const Me = a.object({
|
|
482
504
|
orderFormId: a.string().nullable(),
|
|
483
505
|
sellerCode: a.string().nullable(),
|
|
484
506
|
sellerName: a.string().nullable()
|
|
@@ -492,7 +514,7 @@ async function K({
|
|
|
492
514
|
console.error("[ERROR FETCHING] Body is required");
|
|
493
515
|
return;
|
|
494
516
|
}
|
|
495
|
-
await
|
|
517
|
+
await Me.validate(e);
|
|
496
518
|
const { orderFormId: r, sellerCode: s, sellerName: o } = e, i = s ? `${s.trim()} - ${o}` : null;
|
|
497
519
|
return h(
|
|
498
520
|
`${t}/api/checkout/pub/orderForm/${r}/attachments/openTextField`,
|
|
@@ -505,7 +527,7 @@ async function K({
|
|
|
505
527
|
}
|
|
506
528
|
);
|
|
507
529
|
}
|
|
508
|
-
const
|
|
530
|
+
const Ue = a.object({
|
|
509
531
|
orderFormId: a.string().nullable(),
|
|
510
532
|
sellerCode: a.string().nullable(),
|
|
511
533
|
marketingData: a.object()
|
|
@@ -520,8 +542,8 @@ async function J({
|
|
|
520
542
|
console.error("[ERROR FETCHING] Body is required");
|
|
521
543
|
return;
|
|
522
544
|
}
|
|
523
|
-
await
|
|
524
|
-
const { orderFormId: s, sellerCode: o, marketingData: i } = e,
|
|
545
|
+
await Ue.validate(e);
|
|
546
|
+
const { orderFormId: s, sellerCode: o, marketingData: i } = e, l = o ? {
|
|
525
547
|
utmCampaign: o ? o.toUpperCase() : "",
|
|
526
548
|
utmiCampaign: o ? `${n.VENDOR_CODE}` : "semcodigo"
|
|
527
549
|
} : {};
|
|
@@ -531,23 +553,23 @@ async function J({
|
|
|
531
553
|
method: "POST",
|
|
532
554
|
body: {
|
|
533
555
|
...i,
|
|
534
|
-
...
|
|
556
|
+
...l
|
|
535
557
|
},
|
|
536
558
|
...r
|
|
537
559
|
}
|
|
538
560
|
);
|
|
539
561
|
}
|
|
540
|
-
const
|
|
562
|
+
const Ve = a.object({
|
|
541
563
|
orderFormId: a.string().nullable(),
|
|
542
564
|
sellerCode: a.string().nullable(),
|
|
543
565
|
sellerName: a.string().nullable()
|
|
544
566
|
});
|
|
545
|
-
async function
|
|
567
|
+
async function ze({ apiUrl: t, body: e, fetchOptions: n, extraData: r }) {
|
|
546
568
|
if (!e) {
|
|
547
569
|
console.error("[ERROR FETCHING] Body is required");
|
|
548
570
|
return;
|
|
549
571
|
}
|
|
550
|
-
await
|
|
572
|
+
await Ve.validate(e);
|
|
551
573
|
const s = await K({ apiUrl: t, body: e, fetchOptions: n });
|
|
552
574
|
return J({
|
|
553
575
|
apiUrl: t,
|
|
@@ -559,11 +581,11 @@ async function Ve({ apiUrl: t, body: e, fetchOptions: n, extraData: r }) {
|
|
|
559
581
|
fetchOptions: n
|
|
560
582
|
});
|
|
561
583
|
}
|
|
562
|
-
const
|
|
584
|
+
const xe = a.object({
|
|
563
585
|
orderFormId: a.string().nullable(),
|
|
564
586
|
coupon: a.string().nullable()
|
|
565
587
|
});
|
|
566
|
-
async function
|
|
588
|
+
async function Qe({
|
|
567
589
|
apiUrl: t,
|
|
568
590
|
body: e,
|
|
569
591
|
fetchOptions: n
|
|
@@ -572,7 +594,7 @@ async function xe({
|
|
|
572
594
|
console.error("[ERROR FETCHING] Body is required");
|
|
573
595
|
return;
|
|
574
596
|
}
|
|
575
|
-
await
|
|
597
|
+
await xe.validate(e);
|
|
576
598
|
const { coupon: r = "", orderFormId: s } = e;
|
|
577
599
|
return h(
|
|
578
600
|
`${t}/api/checkout/pub/orderForm/${s}/coupons`,
|
|
@@ -583,12 +605,12 @@ async function xe({
|
|
|
583
605
|
}
|
|
584
606
|
);
|
|
585
607
|
}
|
|
586
|
-
const
|
|
608
|
+
const Ke = a.object({
|
|
587
609
|
appId: a.string().required("App ID is required"),
|
|
588
610
|
orderFormId: a.string().nullable(),
|
|
589
611
|
key: a.array().of(a.string())
|
|
590
612
|
});
|
|
591
|
-
async function
|
|
613
|
+
async function Je({
|
|
592
614
|
apiUrl: t,
|
|
593
615
|
body: e,
|
|
594
616
|
fetchOptions: n
|
|
@@ -597,7 +619,7 @@ async function Ke({
|
|
|
597
619
|
console.error("[ERROR FETCHING] Body is required");
|
|
598
620
|
return;
|
|
599
621
|
}
|
|
600
|
-
await
|
|
622
|
+
await Ke.validate(e);
|
|
601
623
|
const { appId: r = "faststore", orderFormId: s, key: o } = e;
|
|
602
624
|
return h(
|
|
603
625
|
`${t}/api/checkout/pub/orderForm/${s}/customData/${r}/${o}`,
|
|
@@ -607,23 +629,23 @@ async function Ke({
|
|
|
607
629
|
}
|
|
608
630
|
);
|
|
609
631
|
}
|
|
610
|
-
const
|
|
632
|
+
const Ye = a.object().shape({
|
|
611
633
|
name: a.string().required("Attachment name is required"),
|
|
612
634
|
content: a.object().nullable()
|
|
613
635
|
});
|
|
614
636
|
var x;
|
|
615
|
-
const
|
|
616
|
-
attachments: (x = a.array().of(
|
|
637
|
+
const We = a.object().shape({
|
|
638
|
+
attachments: (x = a.array().of(Ye)) == null ? void 0 : x.nullable(),
|
|
617
639
|
id: a.string().required("ID of SKU is required"),
|
|
618
640
|
index: a.number().integer().nullable(),
|
|
619
641
|
quantity: a.number().integer().nullable(),
|
|
620
642
|
seller: a.string().required("Seller is required"),
|
|
621
643
|
price: a.number().integer()
|
|
622
|
-
}),
|
|
644
|
+
}), Xe = a.object({
|
|
623
645
|
orderFormId: a.string().required("OrderFormId is required"),
|
|
624
|
-
orderItems: a.array().of(
|
|
646
|
+
orderItems: a.array().of(We)
|
|
625
647
|
});
|
|
626
|
-
async function
|
|
648
|
+
async function Ze({
|
|
627
649
|
apiUrl: t,
|
|
628
650
|
body: e,
|
|
629
651
|
fetchOptions: n
|
|
@@ -632,7 +654,7 @@ async function Xe({
|
|
|
632
654
|
console.error("[ERROR FETCHING] Body is required");
|
|
633
655
|
return;
|
|
634
656
|
}
|
|
635
|
-
await
|
|
657
|
+
await Xe.validate(e);
|
|
636
658
|
const { orderFormId: r, orderItems: s } = e;
|
|
637
659
|
return h(
|
|
638
660
|
`${t}/api/checkout/pub/orderForm/${r}/items`,
|
|
@@ -643,10 +665,10 @@ async function Xe({
|
|
|
643
665
|
}
|
|
644
666
|
);
|
|
645
667
|
}
|
|
646
|
-
const
|
|
668
|
+
const et = a.object({
|
|
647
669
|
orderFormId: a.string().nullable()
|
|
648
670
|
});
|
|
649
|
-
async function
|
|
671
|
+
async function tt({
|
|
650
672
|
apiUrl: t,
|
|
651
673
|
body: e,
|
|
652
674
|
fetchOptions: n
|
|
@@ -655,7 +677,7 @@ async function et({
|
|
|
655
677
|
console.error("[ERROR FETCHING] Body is required");
|
|
656
678
|
return;
|
|
657
679
|
}
|
|
658
|
-
await
|
|
680
|
+
await et.validate(e);
|
|
659
681
|
const { orderFormId: r } = e;
|
|
660
682
|
return h(
|
|
661
683
|
`${t}/api/checkout/pub/orderForm/${r}/items/removeAll`,
|
|
@@ -665,23 +687,23 @@ async function et({
|
|
|
665
687
|
}
|
|
666
688
|
);
|
|
667
689
|
}
|
|
668
|
-
const
|
|
690
|
+
const rt = a.object().shape({
|
|
669
691
|
name: a.string().required("Attachment name is required"),
|
|
670
692
|
content: a.object().nullable()
|
|
671
693
|
});
|
|
672
694
|
var Q;
|
|
673
|
-
const
|
|
674
|
-
attachments: (Q = a.array().of(
|
|
695
|
+
const nt = a.object().shape({
|
|
696
|
+
attachments: (Q = a.array().of(rt)) == null ? void 0 : Q.nullable(),
|
|
675
697
|
id: a.string().required("ID of SKU is required"),
|
|
676
698
|
index: a.number().integer().nullable(),
|
|
677
699
|
quantity: a.number().integer().nullable(),
|
|
678
700
|
seller: a.string().required("Seller is required"),
|
|
679
701
|
price: a.number().integer()
|
|
680
|
-
}),
|
|
702
|
+
}), at = a.object({
|
|
681
703
|
orderFormId: a.string().nullable(),
|
|
682
|
-
orderItems: a.array().of(
|
|
704
|
+
orderItems: a.array().of(nt)
|
|
683
705
|
});
|
|
684
|
-
async function
|
|
706
|
+
async function st({
|
|
685
707
|
apiUrl: t,
|
|
686
708
|
body: e,
|
|
687
709
|
fetchOptions: n
|
|
@@ -690,7 +712,7 @@ async function at({
|
|
|
690
712
|
console.error("[ERROR FETCHING] Body is required");
|
|
691
713
|
return;
|
|
692
714
|
}
|
|
693
|
-
await
|
|
715
|
+
await at.validate(e);
|
|
694
716
|
const { orderFormId: r, orderItems: s } = e;
|
|
695
717
|
return h(
|
|
696
718
|
`${t}/api/checkout/pub/orderForm/${r}/items/update`,
|
|
@@ -701,10 +723,10 @@ async function at({
|
|
|
701
723
|
}
|
|
702
724
|
);
|
|
703
725
|
}
|
|
704
|
-
const
|
|
726
|
+
const ot = a.object({
|
|
705
727
|
orderFormId: a.string().nullable()
|
|
706
728
|
});
|
|
707
|
-
async function
|
|
729
|
+
async function it({
|
|
708
730
|
apiUrl: t,
|
|
709
731
|
body: e,
|
|
710
732
|
fetchOptions: n
|
|
@@ -713,7 +735,7 @@ async function ot({
|
|
|
713
735
|
console.error("[ERROR FETCHING] Body is required");
|
|
714
736
|
return;
|
|
715
737
|
}
|
|
716
|
-
await
|
|
738
|
+
await ot.validate(e);
|
|
717
739
|
const { orderFormId: r } = e;
|
|
718
740
|
return h(
|
|
719
741
|
`${t}/api/checkout/pub/orderForm/${r}/messages/clear`,
|
|
@@ -723,30 +745,30 @@ async function ot({
|
|
|
723
745
|
}
|
|
724
746
|
);
|
|
725
747
|
}
|
|
726
|
-
const
|
|
748
|
+
const ct = a.object({
|
|
727
749
|
id: a.string().nullable(),
|
|
728
750
|
// id offering
|
|
729
751
|
itemIndex: a.number().nullable(),
|
|
730
752
|
orderFormId: a.string().nullable(),
|
|
731
753
|
remove: a.boolean().nullable()
|
|
732
754
|
});
|
|
733
|
-
async function
|
|
755
|
+
async function lt({ apiUrl: t, body: e, fetchOptions: n }) {
|
|
734
756
|
if (!e) {
|
|
735
757
|
console.error("[ERROR FETCHING] Body is required");
|
|
736
758
|
return;
|
|
737
759
|
}
|
|
738
|
-
await
|
|
739
|
-
const { itemIndex: r, orderFormId: s, id: o, remove: i } = e,
|
|
740
|
-
return h(
|
|
760
|
+
await ct.validate(e);
|
|
761
|
+
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}`;
|
|
762
|
+
return h(c, {
|
|
741
763
|
method: "POST",
|
|
742
764
|
body: { id: o },
|
|
743
765
|
...n
|
|
744
766
|
});
|
|
745
767
|
}
|
|
746
|
-
const
|
|
768
|
+
const ut = a.object({
|
|
747
769
|
orderFormId: a.string().nullable()
|
|
748
770
|
});
|
|
749
|
-
async function
|
|
771
|
+
async function dt({
|
|
750
772
|
apiUrl: t,
|
|
751
773
|
body: e,
|
|
752
774
|
fetchOptions: n,
|
|
@@ -757,13 +779,13 @@ async function ut({
|
|
|
757
779
|
console.error("[ERROR FETCHING] Body is required");
|
|
758
780
|
return;
|
|
759
781
|
}
|
|
760
|
-
await
|
|
782
|
+
await ut.validate(e);
|
|
761
783
|
const s = new URLSearchParams({
|
|
762
784
|
refreshOutdatedData: "true"
|
|
763
785
|
}), 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`;
|
|
764
786
|
return h(o, { method: "GET", ...n });
|
|
765
787
|
}
|
|
766
|
-
const
|
|
788
|
+
const mt = a.object({
|
|
767
789
|
orderFormId: a.string().nullable(),
|
|
768
790
|
email: a.string().email().required(),
|
|
769
791
|
firstName: a.string().required(),
|
|
@@ -781,7 +803,7 @@ async function pt({
|
|
|
781
803
|
console.error("[ERROR FETCHING] Body is required");
|
|
782
804
|
return;
|
|
783
805
|
}
|
|
784
|
-
await
|
|
806
|
+
await mt.validate(e);
|
|
785
807
|
const { orderFormId: r, ...s } = e;
|
|
786
808
|
return h(
|
|
787
809
|
`${t}/api/checkout/pub/orderForm/${r}/attachments/clientProfileData`,
|
|
@@ -792,10 +814,10 @@ async function pt({
|
|
|
792
814
|
}
|
|
793
815
|
);
|
|
794
816
|
}
|
|
795
|
-
const
|
|
817
|
+
const ft = a.object({
|
|
796
818
|
sellerCode: a.string().nullable()
|
|
797
819
|
});
|
|
798
|
-
async function
|
|
820
|
+
async function gt({
|
|
799
821
|
apiUrl: t,
|
|
800
822
|
body: e,
|
|
801
823
|
extraData: n,
|
|
@@ -805,7 +827,7 @@ async function ft({
|
|
|
805
827
|
console.error("[ERROR FETCHING] Body is required");
|
|
806
828
|
return;
|
|
807
829
|
}
|
|
808
|
-
await
|
|
830
|
+
await ft.validate(e);
|
|
809
831
|
const { sellerCode: s = "" } = e;
|
|
810
832
|
return h(
|
|
811
833
|
`${t}/api/dataentities/${n.ENTITIES}/search?_fields=${n.FIELDS}&${n.FILTER}=${s}`,
|
|
@@ -818,12 +840,12 @@ async function ft({
|
|
|
818
840
|
}
|
|
819
841
|
);
|
|
820
842
|
}
|
|
821
|
-
const
|
|
843
|
+
const ht = a.object().shape({
|
|
822
844
|
country: a.string().length(3, "Country code must be 3 characters long").required("Country is required"),
|
|
823
845
|
orderFormId: a.string().nullable(),
|
|
824
846
|
postalCode: a.string().nullable()
|
|
825
847
|
});
|
|
826
|
-
async function
|
|
848
|
+
async function yt({
|
|
827
849
|
apiUrl: t,
|
|
828
850
|
body: e,
|
|
829
851
|
fetchOptions: n
|
|
@@ -832,7 +854,7 @@ async function ht({
|
|
|
832
854
|
console.error("[ERROR FETCHING] Body is required");
|
|
833
855
|
return;
|
|
834
856
|
}
|
|
835
|
-
await
|
|
857
|
+
await ht.validate(e);
|
|
836
858
|
const { country: r, orderFormId: s, postalCode: o } = e, i = o ? {
|
|
837
859
|
address: {
|
|
838
860
|
addressType: "residential",
|
|
@@ -852,7 +874,7 @@ async function ht({
|
|
|
852
874
|
}
|
|
853
875
|
);
|
|
854
876
|
}
|
|
855
|
-
const
|
|
877
|
+
const bt = a.object().shape({
|
|
856
878
|
orderFormId: a.string().nullable(),
|
|
857
879
|
options: a.array().of(
|
|
858
880
|
a.object().shape({
|
|
@@ -880,12 +902,12 @@ const yt = a.object().shape({
|
|
|
880
902
|
})
|
|
881
903
|
)
|
|
882
904
|
});
|
|
883
|
-
async function
|
|
905
|
+
async function It({ apiUrl: t, body: e, fetchOptions: n }) {
|
|
884
906
|
if (!e) {
|
|
885
907
|
console.error("[ERROR FETCHING] Body is required");
|
|
886
908
|
return;
|
|
887
909
|
}
|
|
888
|
-
await
|
|
910
|
+
await bt.validate(e);
|
|
889
911
|
const { orderFormId: r, options: s, selectedAddresses: o } = e;
|
|
890
912
|
return h(
|
|
891
913
|
`${t}/api/checkout/pub/orderForm/${r}/attachments/shippingData`,
|
|
@@ -900,7 +922,7 @@ async function bt({ apiUrl: t, body: e, fetchOptions: n }) {
|
|
|
900
922
|
}
|
|
901
923
|
);
|
|
902
924
|
}
|
|
903
|
-
const
|
|
925
|
+
const Ct = a.object({
|
|
904
926
|
country: a.string().length(3, "Country code must be 3 characters long").required("Country is required"),
|
|
905
927
|
postalCode: a.string().nullable(),
|
|
906
928
|
geoCoordinates: a.object().shape({
|
|
@@ -908,12 +930,12 @@ const It = a.object({
|
|
|
908
930
|
latitude: a.number().required()
|
|
909
931
|
})
|
|
910
932
|
});
|
|
911
|
-
async function
|
|
933
|
+
async function Rt({ apiUrl: t, body: e, fetchOptions: n }) {
|
|
912
934
|
if (!e) {
|
|
913
935
|
console.error("[ERROR FETCHING] Body is required");
|
|
914
936
|
return;
|
|
915
937
|
}
|
|
916
|
-
await
|
|
938
|
+
await Ct.validate(e);
|
|
917
939
|
const { country: r = "", geoCoordinates: s, postalCode: o = "" } = e, i = new URLSearchParams({ country: String(r) });
|
|
918
940
|
return o ? i.append("postalCode", o) : i.append(
|
|
919
941
|
"geoCoordinates",
|
|
@@ -926,22 +948,22 @@ async function Ct({ apiUrl: t, body: e, fetchOptions: n }) {
|
|
|
926
948
|
}
|
|
927
949
|
);
|
|
928
950
|
}
|
|
929
|
-
const
|
|
951
|
+
const vt = a.object({
|
|
930
952
|
id: a.string().required("ID of SKU is required"),
|
|
931
953
|
quantity: a.number().integer().required("Quantity of item is required"),
|
|
932
954
|
seller: a.string()
|
|
933
|
-
}),
|
|
934
|
-
items: a.array().of(
|
|
955
|
+
}), St = a.object({
|
|
956
|
+
items: a.array().of(vt),
|
|
935
957
|
country: a.string().length(3, "Country code must be 3 characters long").required("Country is required"),
|
|
936
958
|
postalCode: a.string().nullable(),
|
|
937
959
|
geoCoordinates: a.array().nullable().of(a.number()).length(2)
|
|
938
960
|
});
|
|
939
|
-
async function
|
|
961
|
+
async function Et({ apiUrl: t, body: e, fetchOptions: n }) {
|
|
940
962
|
if (!e) {
|
|
941
963
|
console.error("[ERROR FETCHING] Body is required");
|
|
942
964
|
return;
|
|
943
965
|
}
|
|
944
|
-
return await
|
|
966
|
+
return await St.validate(e), h(
|
|
945
967
|
`${t}/api/checkout/pub/orderForms/simulation`,
|
|
946
968
|
{
|
|
947
969
|
method: "POST",
|
|
@@ -950,35 +972,35 @@ async function St({ apiUrl: t, body: e, fetchOptions: n }) {
|
|
|
950
972
|
}
|
|
951
973
|
);
|
|
952
974
|
}
|
|
953
|
-
const
|
|
975
|
+
const Tt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
954
976
|
__proto__: null,
|
|
955
|
-
getMasterDataSellerCode:
|
|
956
|
-
getOrderForm:
|
|
957
|
-
postOrderFormAddCoupon:
|
|
977
|
+
getMasterDataSellerCode: gt,
|
|
978
|
+
getOrderForm: dt,
|
|
979
|
+
postOrderFormAddCoupon: Qe,
|
|
958
980
|
postOrderFormAttachClientProfileData: pt,
|
|
959
|
-
postOrderFormAttachOrderFormData:
|
|
960
|
-
postOrderFormAttachShippingData:
|
|
981
|
+
postOrderFormAttachOrderFormData: ze,
|
|
982
|
+
postOrderFormAttachShippingData: yt,
|
|
961
983
|
postOrderFormAttachmentsMarketingData: J,
|
|
962
984
|
postOrderFormAttachmentsOpenTextField: K,
|
|
963
|
-
postOrderFormClearMessages:
|
|
964
|
-
postOrderFormFreightSimulation:
|
|
965
|
-
postOrderFormItems:
|
|
966
|
-
postOrderFormRegion:
|
|
967
|
-
postOrderFormRemoveAllItems:
|
|
968
|
-
postOrderFormUpdateItems:
|
|
969
|
-
postOrderFormUpdateShippingData:
|
|
970
|
-
postOrderformAddress:
|
|
971
|
-
putOrderFormCustomData:
|
|
972
|
-
updateOrderFormOffering:
|
|
973
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
985
|
+
postOrderFormClearMessages: it,
|
|
986
|
+
postOrderFormFreightSimulation: Et,
|
|
987
|
+
postOrderFormItems: Ze,
|
|
988
|
+
postOrderFormRegion: Rt,
|
|
989
|
+
postOrderFormRemoveAllItems: tt,
|
|
990
|
+
postOrderFormUpdateItems: st,
|
|
991
|
+
postOrderFormUpdateShippingData: It,
|
|
992
|
+
postOrderformAddress: Ge,
|
|
993
|
+
putOrderFormCustomData: Je,
|
|
994
|
+
updateOrderFormOffering: lt
|
|
995
|
+
}, Symbol.toStringTag, { value: "Module" })), Ft = a.object({
|
|
974
996
|
skuId: a.string()
|
|
975
997
|
});
|
|
976
|
-
async function
|
|
998
|
+
async function Ot({ apiUrl: t, body: e, fetchOptions: n }) {
|
|
977
999
|
if (!e) {
|
|
978
1000
|
console.error("[ERROR FETCHING] Body is required");
|
|
979
1001
|
return;
|
|
980
1002
|
}
|
|
981
|
-
await
|
|
1003
|
+
await Ft.validate(e);
|
|
982
1004
|
const { skuId: r } = e;
|
|
983
1005
|
return h(
|
|
984
1006
|
`${t}/api/catalog/pvt/stockkeepingunitkit?parentSkuId=${r}`,
|
|
@@ -987,15 +1009,15 @@ async function Ft({ apiUrl: t, body: e, fetchOptions: n }) {
|
|
|
987
1009
|
}
|
|
988
1010
|
);
|
|
989
1011
|
}
|
|
990
|
-
const
|
|
1012
|
+
const $t = a.object({
|
|
991
1013
|
ids: a.array().of(a.string().required("ID are required")).required("IDs are required")
|
|
992
1014
|
});
|
|
993
|
-
async function
|
|
1015
|
+
async function qt({ apiUrl: t, body: e, fetchOptions: n }) {
|
|
994
1016
|
if (!e) {
|
|
995
1017
|
console.error("[ERROR FETCHING] Body is required");
|
|
996
1018
|
return;
|
|
997
1019
|
}
|
|
998
|
-
await
|
|
1020
|
+
await $t.validate(e);
|
|
999
1021
|
const { ids: r } = e;
|
|
1000
1022
|
return h(
|
|
1001
1023
|
`${t}/api/catalog_system/pub/products/search?fq=${r.map((s) => `productId:${s}`).join("&fq=")}`,
|
|
@@ -1004,15 +1026,15 @@ async function $t({ apiUrl: t, body: e, fetchOptions: n }) {
|
|
|
1004
1026
|
}
|
|
1005
1027
|
);
|
|
1006
1028
|
}
|
|
1007
|
-
const
|
|
1029
|
+
const At = a.object({
|
|
1008
1030
|
productId: a.number().required("Product ID is required")
|
|
1009
1031
|
});
|
|
1010
|
-
async function
|
|
1032
|
+
async function Pt({ apiUrl: t, body: e, fetchOptions: n }) {
|
|
1011
1033
|
if (!e) {
|
|
1012
1034
|
console.error("[ERROR FETCHING] Body is required");
|
|
1013
1035
|
return;
|
|
1014
1036
|
}
|
|
1015
|
-
await
|
|
1037
|
+
await At.validate(e);
|
|
1016
1038
|
const { productId: r } = e;
|
|
1017
1039
|
return h(
|
|
1018
1040
|
`${t}/api/catalog_system/pub/products/crossselling/similars/${r.toString()}`,
|
|
@@ -1021,15 +1043,15 @@ async function At({ apiUrl: t, body: e, fetchOptions: n }) {
|
|
|
1021
1043
|
}
|
|
1022
1044
|
);
|
|
1023
1045
|
}
|
|
1024
|
-
const
|
|
1046
|
+
const wt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1025
1047
|
__proto__: null,
|
|
1026
|
-
getCatalogKitProducts:
|
|
1027
|
-
getCatalogProducts:
|
|
1028
|
-
getCatalogSimilars:
|
|
1029
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1048
|
+
getCatalogKitProducts: Ot,
|
|
1049
|
+
getCatalogProducts: qt,
|
|
1050
|
+
getCatalogSimilars: Pt
|
|
1051
|
+
}, Symbol.toStringTag, { value: "Module" })), Nt = a.object({
|
|
1030
1052
|
query: a.string()
|
|
1031
1053
|
});
|
|
1032
|
-
async function
|
|
1054
|
+
async function kt({
|
|
1033
1055
|
apiUrl: t,
|
|
1034
1056
|
body: e,
|
|
1035
1057
|
fetchOptions: n
|
|
@@ -1038,7 +1060,7 @@ async function Nt({
|
|
|
1038
1060
|
console.error("[ERROR FETCHING] Body is required");
|
|
1039
1061
|
return;
|
|
1040
1062
|
}
|
|
1041
|
-
await
|
|
1063
|
+
await Nt.validate(e);
|
|
1042
1064
|
const { query: r = "" } = e, s = new URLSearchParams({ query: r });
|
|
1043
1065
|
return h(
|
|
1044
1066
|
`${t}/api/io/_v/api/intelligent-search/autocomplete_suggestions?${s.toString()}`,
|
|
@@ -1047,10 +1069,10 @@ async function Nt({
|
|
|
1047
1069
|
}
|
|
1048
1070
|
);
|
|
1049
1071
|
}
|
|
1050
|
-
const
|
|
1072
|
+
const jt = (t, e) => Ce(t, e), Dt = (t) => ({
|
|
1051
1073
|
...t,
|
|
1052
|
-
description: t.description ?
|
|
1053
|
-
}),
|
|
1074
|
+
description: t.description ? jt(t.description) : t.description
|
|
1075
|
+
}), _t = ({
|
|
1054
1076
|
offer: t,
|
|
1055
1077
|
seller: e,
|
|
1056
1078
|
product: n
|
|
@@ -1060,8 +1082,8 @@ const kt = (t, e) => Ce(t, e), jt = (t) => ({
|
|
|
1060
1082
|
seller: e
|
|
1061
1083
|
}), Y = (t, e) => ({
|
|
1062
1084
|
...t,
|
|
1063
|
-
isVariantOf:
|
|
1064
|
-
}),
|
|
1085
|
+
isVariantOf: Dt(e)
|
|
1086
|
+
}), Ht = (t) => t ? "https://schema.org/InStock" : "https://schema.org/OutOfStock", k = (t) => t.AvailableQuantity > 0, U = (t) => t.spotPrice ?? 0, Lt = (t) => t.Price ?? 0, W = (t, e) => k(t) && !k(e) ? -1 : !k(t) && k(e) ? 1 : U(t) - U(e), Bt = (t, e) => {
|
|
1065
1087
|
let n = 0;
|
|
1066
1088
|
for (let r = 1; r < t.length; r++)
|
|
1067
1089
|
e(t[n], t[r]) > 0 && (n = r);
|
|
@@ -1087,11 +1109,11 @@ const kt = (t, e) => Ce(t, e), jt = (t) => ({
|
|
|
1087
1109
|
attachment: "ATTACHMENT",
|
|
1088
1110
|
specification: "SPECIFICATION",
|
|
1089
1111
|
attribute: "ATTRIBUTE"
|
|
1090
|
-
},
|
|
1112
|
+
}, Gt = (t) => ({
|
|
1091
1113
|
name: t.name,
|
|
1092
1114
|
value: t.content,
|
|
1093
1115
|
valueReference: H.attachment
|
|
1094
|
-
}),
|
|
1116
|
+
}), Mt = (t) => ({
|
|
1095
1117
|
propertyID: t.id,
|
|
1096
1118
|
name: t.name,
|
|
1097
1119
|
value: t.value,
|
|
@@ -1099,32 +1121,32 @@ const kt = (t, e) => Ce(t, e), jt = (t) => ({
|
|
|
1099
1121
|
valueReference: H.attribute,
|
|
1100
1122
|
visible: t.visible
|
|
1101
1123
|
}
|
|
1102
|
-
}),
|
|
1103
|
-
const r = t.flatMap(({ name: i, values:
|
|
1124
|
+
}), L = (t, e, n) => {
|
|
1125
|
+
const r = t.flatMap(({ name: i, values: l }) => l ? l.map((c) => ({
|
|
1104
1126
|
name: i,
|
|
1105
|
-
value:
|
|
1127
|
+
value: c,
|
|
1106
1128
|
valueReference: H.specification
|
|
1107
1129
|
})) : {
|
|
1108
1130
|
name: i,
|
|
1109
1131
|
value: "",
|
|
1110
1132
|
valueReference: H.specification
|
|
1111
|
-
}), s = Array.isArray(n) ? n.map(
|
|
1133
|
+
}), s = Array.isArray(n) ? n.map(Gt) : [], o = e ? e.map(Mt) : [];
|
|
1112
1134
|
return [
|
|
1113
1135
|
...r,
|
|
1114
1136
|
...s,
|
|
1115
1137
|
...o
|
|
1116
1138
|
];
|
|
1117
|
-
}, V = "ÁÄÂÀÃÅČÇĆĎÉĚËÈÊẼĔȆÍÌÎÏŇÑÓÖÒÔÕØŘŔŠŤÚŮÜÙÛÝŸŽáäâàãåčçćďéěëèêẽĕȇíìîïňñóöòôõøðřŕšťúůüùûýÿžþÞĐđ߯a",
|
|
1139
|
+
}, V = "ÁÄÂÀÃÅČÇĆĎÉĚËÈÊẼĔȆÍÌÎÏŇÑÓÖÒÔÕØŘŔŠŤÚŮÜÙÛÝŸŽáäâàãåčçćďéěëèêẽĕȇíìîïňñóöòôõøðřŕšťúůüùûýÿžþÞĐđ߯a", Ut = "AAAAAACCCDEEEEEEEEIIIINNOOOOOORRSTUUUUUYYZaaaaaacccdeeeeeeeeiiiinnooooooorrstuuuuuyyzbBDdBAa", Vt = (t) => {
|
|
1118
1140
|
let e = t.slice(0);
|
|
1119
1141
|
for (let n = 0; n < V.length; n++)
|
|
1120
1142
|
e = e.replace(
|
|
1121
1143
|
new RegExp(V.charAt(n), "g"),
|
|
1122
|
-
|
|
1144
|
+
Ut.charAt(n)
|
|
1123
1145
|
);
|
|
1124
1146
|
return e;
|
|
1125
|
-
},
|
|
1147
|
+
}, zt = (t) => t.replace(/[·/_,:]/, "-"), ee = (t) => {
|
|
1126
1148
|
const n = t.replace(/,/g, "").replace(/[*+~.()'"!:@&\[\]`/ %$#?{}|><=_^]/g, "-");
|
|
1127
|
-
return Vt(
|
|
1149
|
+
return zt(Vt(n)).toLowerCase();
|
|
1128
1150
|
}, te = (t) => `/${t}/p`, re = (t) => {
|
|
1129
1151
|
const e = Math.max(
|
|
1130
1152
|
...t.map((r) => r.NumberOfInstallments)
|
|
@@ -1141,7 +1163,7 @@ const kt = (t, e) => Ce(t, e), jt = (t) => ({
|
|
|
1141
1163
|
listPrice: 0,
|
|
1142
1164
|
sellerDefault: !1
|
|
1143
1165
|
}, s = t.map(
|
|
1144
|
-
(o) =>
|
|
1166
|
+
(o) => _t({
|
|
1145
1167
|
offer: o.commertialOffer,
|
|
1146
1168
|
seller: o,
|
|
1147
1169
|
product: e
|
|
@@ -1149,7 +1171,7 @@ const kt = (t, e) => Ce(t, e), jt = (t) => ({
|
|
|
1149
1171
|
).sort(W).map((o) => (o.seller.sellerId === "1" && o.AvailableQuantity > 0 && (n.price = o.Price, n.listPrice = o.ListPrice, n.sellerDefault = !0), {
|
|
1150
1172
|
availability: o.AvailableQuantity > 0,
|
|
1151
1173
|
listPrice: o.ListPrice,
|
|
1152
|
-
price:
|
|
1174
|
+
price: Lt(o),
|
|
1153
1175
|
priceValidUntil: o.PriceValidUntil,
|
|
1154
1176
|
priceCurrency: "BRL",
|
|
1155
1177
|
installments: o.Installments,
|
|
@@ -1167,14 +1189,14 @@ const kt = (t, e) => Ce(t, e), jt = (t) => ({
|
|
|
1167
1189
|
}, ae = (t) => {
|
|
1168
1190
|
const { attributes: e, itemId: n, name: r, sellers: s, variations: o } = t;
|
|
1169
1191
|
return {
|
|
1170
|
-
additionalProperty:
|
|
1192
|
+
additionalProperty: L(o, e, []),
|
|
1171
1193
|
name: r,
|
|
1172
1194
|
offers: {
|
|
1173
|
-
offers: s == null ? void 0 : s.map(({ sellerId: i, commertialOffer:
|
|
1174
|
-
availability:
|
|
1175
|
-
listPrice:
|
|
1176
|
-
price:
|
|
1177
|
-
quantity:
|
|
1195
|
+
offers: s == null ? void 0 : s.map(({ sellerId: i, commertialOffer: l }) => ({
|
|
1196
|
+
availability: Ht(l.AvailableQuantity > 0),
|
|
1197
|
+
listPrice: l.ListPrice,
|
|
1198
|
+
price: l.Price,
|
|
1199
|
+
quantity: l.AvailableQuantity,
|
|
1178
1200
|
seller: {
|
|
1179
1201
|
identifier: i
|
|
1180
1202
|
}
|
|
@@ -1183,7 +1205,7 @@ const kt = (t, e) => Ce(t, e), jt = (t) => ({
|
|
|
1183
1205
|
sku: n
|
|
1184
1206
|
// slug: getSlug('', itemId), // getSlug('', itemId) que tipo de slug é esse?
|
|
1185
1207
|
};
|
|
1186
|
-
},
|
|
1208
|
+
}, xt = (t) => {
|
|
1187
1209
|
var v;
|
|
1188
1210
|
const {
|
|
1189
1211
|
attributes: e,
|
|
@@ -1192,14 +1214,14 @@ const kt = (t, e) => Ce(t, e), jt = (t) => ({
|
|
|
1192
1214
|
images: s,
|
|
1193
1215
|
itemId: o,
|
|
1194
1216
|
name: i,
|
|
1195
|
-
sellers:
|
|
1196
|
-
videos:
|
|
1197
|
-
variations:
|
|
1217
|
+
sellers: l,
|
|
1218
|
+
videos: c,
|
|
1219
|
+
variations: m
|
|
1198
1220
|
} = t, {
|
|
1199
1221
|
brand: u,
|
|
1200
1222
|
categories: d,
|
|
1201
1223
|
categoriesIds: C,
|
|
1202
|
-
description:
|
|
1224
|
+
description: f,
|
|
1203
1225
|
linkText: p,
|
|
1204
1226
|
productClusters: y,
|
|
1205
1227
|
clusterHighlights: I,
|
|
@@ -1207,21 +1229,21 @@ const kt = (t, e) => Ce(t, e), jt = (t) => ({
|
|
|
1207
1229
|
properties: O,
|
|
1208
1230
|
productId: $,
|
|
1209
1231
|
productReference: g
|
|
1210
|
-
} = r,
|
|
1232
|
+
} = r, E = d.slice().reverse(), R = ne(l, t.isVariantOf), T = re(R.offers[0].installments);
|
|
1211
1233
|
return {
|
|
1212
1234
|
sku: o,
|
|
1213
1235
|
gtin: ((v = n == null ? void 0 : n[0]) == null ? void 0 : v.Value) ?? g ?? "",
|
|
1214
1236
|
name: F ?? i,
|
|
1215
|
-
description:
|
|
1237
|
+
description: f,
|
|
1216
1238
|
releaseDate: r.releaseDate ?? "",
|
|
1217
1239
|
slug: p,
|
|
1218
|
-
video:
|
|
1240
|
+
video: c[0],
|
|
1219
1241
|
categories: d,
|
|
1220
1242
|
categoriesIds: C,
|
|
1221
1243
|
id: $,
|
|
1222
1244
|
brand: { name: u, brandName: u },
|
|
1223
1245
|
seo: {
|
|
1224
|
-
description:
|
|
1246
|
+
description: f,
|
|
1225
1247
|
title: F,
|
|
1226
1248
|
canonical: te(p)
|
|
1227
1249
|
},
|
|
@@ -1233,7 +1255,7 @@ const kt = (t, e) => Ce(t, e), jt = (t) => ({
|
|
|
1233
1255
|
availability: { status: R.offers[0].availability },
|
|
1234
1256
|
breadcrumbList: {
|
|
1235
1257
|
itemListElement: [
|
|
1236
|
-
...
|
|
1258
|
+
...E.map((A, P) => {
|
|
1237
1259
|
const q = A.split("/"), G = q[q.length - 2], ie = q.map(ee).join("/");
|
|
1238
1260
|
return {
|
|
1239
1261
|
name: G,
|
|
@@ -1251,14 +1273,14 @@ const kt = (t, e) => Ce(t, e), jt = (t) => ({
|
|
|
1251
1273
|
},
|
|
1252
1274
|
image: Z(s),
|
|
1253
1275
|
offers: R,
|
|
1254
|
-
additionalProperty:
|
|
1276
|
+
additionalProperty: L(m, e, []),
|
|
1255
1277
|
isVariantOf: {
|
|
1256
1278
|
productGroupID: r.productId,
|
|
1257
1279
|
hasVariant: r.items.map((A) => ae(A))
|
|
1258
1280
|
},
|
|
1259
1281
|
installments: T
|
|
1260
1282
|
};
|
|
1261
|
-
},
|
|
1283
|
+
}, Qt = (t) => {
|
|
1262
1284
|
var T;
|
|
1263
1285
|
const {
|
|
1264
1286
|
attributes: e,
|
|
@@ -1267,29 +1289,29 @@ const kt = (t, e) => Ce(t, e), jt = (t) => ({
|
|
|
1267
1289
|
images: s,
|
|
1268
1290
|
itemId: o,
|
|
1269
1291
|
name: i,
|
|
1270
|
-
sellers:
|
|
1271
|
-
Videos:
|
|
1272
|
-
variations:
|
|
1292
|
+
sellers: l,
|
|
1293
|
+
Videos: c,
|
|
1294
|
+
variations: m
|
|
1273
1295
|
} = t, {
|
|
1274
1296
|
brand: u,
|
|
1275
1297
|
categories: d,
|
|
1276
1298
|
categoriesIds: C,
|
|
1277
|
-
description:
|
|
1299
|
+
description: f,
|
|
1278
1300
|
linkText: p,
|
|
1279
1301
|
productClusters: y,
|
|
1280
1302
|
productName: I,
|
|
1281
1303
|
Coleção: F,
|
|
1282
1304
|
"ID Coleção": O,
|
|
1283
1305
|
productId: $
|
|
1284
|
-
} = r, g = d.slice().reverse(),
|
|
1306
|
+
} = r, g = d.slice().reverse(), E = ne(l, t.isVariantOf), R = re(E.offers[0].installments);
|
|
1285
1307
|
return {
|
|
1286
1308
|
sku: o,
|
|
1287
1309
|
gtin: ((T = n[0]) == null ? void 0 : T.Value) ?? "",
|
|
1288
1310
|
name: I ?? i,
|
|
1289
|
-
description:
|
|
1311
|
+
description: f,
|
|
1290
1312
|
releaseDate: r.releaseDate ?? "",
|
|
1291
1313
|
slug: p,
|
|
1292
|
-
video:
|
|
1314
|
+
video: c[0],
|
|
1293
1315
|
categories: d,
|
|
1294
1316
|
categoriesIds: C,
|
|
1295
1317
|
collection: F,
|
|
@@ -1297,7 +1319,7 @@ const kt = (t, e) => Ce(t, e), jt = (t) => ({
|
|
|
1297
1319
|
id: $,
|
|
1298
1320
|
brand: { name: u, brandName: u },
|
|
1299
1321
|
seo: {
|
|
1300
|
-
description:
|
|
1322
|
+
description: f,
|
|
1301
1323
|
title: I,
|
|
1302
1324
|
canonical: te(p)
|
|
1303
1325
|
},
|
|
@@ -1306,7 +1328,7 @@ const kt = (t, e) => Ce(t, e), jt = (t) => ({
|
|
|
1306
1328
|
highlights: []
|
|
1307
1329
|
// TODO: add highlights
|
|
1308
1330
|
},
|
|
1309
|
-
availability: { status:
|
|
1331
|
+
availability: { status: E.offers[0].availability },
|
|
1310
1332
|
breadcrumbList: {
|
|
1311
1333
|
itemListElement: [
|
|
1312
1334
|
...g.map((v, A) => {
|
|
@@ -1326,8 +1348,8 @@ const kt = (t, e) => Ce(t, e), jt = (t) => ({
|
|
|
1326
1348
|
numberOfItems: d.length
|
|
1327
1349
|
},
|
|
1328
1350
|
image: Z(s),
|
|
1329
|
-
offers:
|
|
1330
|
-
additionalProperty:
|
|
1351
|
+
offers: E,
|
|
1352
|
+
additionalProperty: L(m, e, []),
|
|
1331
1353
|
isVariantOf: {
|
|
1332
1354
|
productGroupID: r.productId,
|
|
1333
1355
|
hasVariant: r.items.map((v) => {
|
|
@@ -1337,7 +1359,7 @@ const kt = (t, e) => Ce(t, e), jt = (t) => ({
|
|
|
1337
1359
|
}));
|
|
1338
1360
|
return {
|
|
1339
1361
|
...ae(v),
|
|
1340
|
-
additionalProperty:
|
|
1362
|
+
additionalProperty: L(
|
|
1341
1363
|
P,
|
|
1342
1364
|
e,
|
|
1343
1365
|
[]
|
|
@@ -1347,27 +1369,27 @@ const kt = (t, e) => Ce(t, e), jt = (t) => ({
|
|
|
1347
1369
|
},
|
|
1348
1370
|
installments: R
|
|
1349
1371
|
};
|
|
1350
|
-
},
|
|
1372
|
+
}, Kt = a.array().of(a.object({
|
|
1351
1373
|
key: a.string().required(),
|
|
1352
1374
|
value: a.string().required()
|
|
1353
1375
|
})).required("Facets are required");
|
|
1354
|
-
async function
|
|
1376
|
+
async function Jt({ apiUrl: t, body: e, fetchOptions: n }) {
|
|
1355
1377
|
if (!e) {
|
|
1356
1378
|
console.error("[ERROR FETCHING] Body is required");
|
|
1357
1379
|
return;
|
|
1358
1380
|
}
|
|
1359
|
-
await
|
|
1360
|
-
const r = new URLSearchParams({}), s = e.map(({ key: i, value:
|
|
1381
|
+
await Kt.validate(e);
|
|
1382
|
+
const r = new URLSearchParams({}), s = e.map(({ key: i, value: l }) => `${i}/${l}`).join("/");
|
|
1361
1383
|
le(e, r);
|
|
1362
1384
|
const o = `${t}/api/catalog_system/pub/products/crossselling/${s}`;
|
|
1363
1385
|
return h(o, {
|
|
1364
1386
|
cache: "no-store",
|
|
1365
1387
|
...n
|
|
1366
|
-
}).then((i) => i.map((
|
|
1367
|
-
const
|
|
1368
|
-
return
|
|
1369
|
-
}).filter((
|
|
1370
|
-
node:
|
|
1388
|
+
}).then((i) => i.map((c) => {
|
|
1389
|
+
const m = X(c.items);
|
|
1390
|
+
return m && Y(m, c);
|
|
1391
|
+
}).filter((c) => !!c).map((c) => ({
|
|
1392
|
+
node: Qt(c)
|
|
1371
1393
|
})));
|
|
1372
1394
|
}
|
|
1373
1395
|
const se = ({
|
|
@@ -1384,22 +1406,22 @@ const se = ({
|
|
|
1384
1406
|
query: s = "",
|
|
1385
1407
|
page: o = 1,
|
|
1386
1408
|
count: i,
|
|
1387
|
-
sort:
|
|
1388
|
-
facets:
|
|
1389
|
-
type:
|
|
1409
|
+
sort: l = "",
|
|
1410
|
+
facets: c = [],
|
|
1411
|
+
type: m,
|
|
1390
1412
|
hideUnavailableItems: u = !0,
|
|
1391
1413
|
locale: d = ""
|
|
1392
1414
|
} = e, C = new URLSearchParams({
|
|
1393
1415
|
page: o.toString(),
|
|
1394
1416
|
count: (i == null ? void 0 : i.toString()) ?? (r == null ? void 0 : r.ITEMS_PER_PAGE) ?? 24,
|
|
1395
1417
|
query: s,
|
|
1396
|
-
sort:
|
|
1418
|
+
sort: l,
|
|
1397
1419
|
locale: d
|
|
1398
1420
|
});
|
|
1399
1421
|
u !== void 0 && C.append("hideUnavailableItems", u.toString());
|
|
1400
|
-
const
|
|
1401
|
-
return
|
|
1402
|
-
`${t}/api/io/_v/api/intelligent-search/${
|
|
1422
|
+
const f = c.map((p) => `${p.key}/${p.value}`).join("/") ?? "";
|
|
1423
|
+
return Le(
|
|
1424
|
+
`${t}/api/io/_v/api/intelligent-search/${m}/${f}?${C.toString()}`,
|
|
1403
1425
|
{
|
|
1404
1426
|
headers: {
|
|
1405
1427
|
Accept: "application/json",
|
|
@@ -1409,7 +1431,7 @@ const se = ({
|
|
|
1409
1431
|
}
|
|
1410
1432
|
);
|
|
1411
1433
|
};
|
|
1412
|
-
async function
|
|
1434
|
+
async function Yt({ body: t, extraData: e, ...n }) {
|
|
1413
1435
|
if (!t) {
|
|
1414
1436
|
console.error("[ERROR FETCHING] Body is required");
|
|
1415
1437
|
return;
|
|
@@ -1421,10 +1443,10 @@ async function Jt({ body: t, extraData: e, ...n }) {
|
|
|
1421
1443
|
},
|
|
1422
1444
|
extraData: e,
|
|
1423
1445
|
...n
|
|
1424
|
-
}), s = (r == null ? void 0 : r.products.map((
|
|
1425
|
-
const
|
|
1426
|
-
return
|
|
1427
|
-
}).filter((
|
|
1446
|
+
}), s = (r == null ? void 0 : r.products.map((l) => {
|
|
1447
|
+
const c = X(l.items);
|
|
1448
|
+
return c && Y(c, l);
|
|
1449
|
+
}).filter((l) => !!l)) ?? [], {
|
|
1428
1450
|
pagination: o,
|
|
1429
1451
|
recordsFiltered: i
|
|
1430
1452
|
} = r;
|
|
@@ -1438,14 +1460,14 @@ async function Jt({ body: t, extraData: e, ...n }) {
|
|
|
1438
1460
|
count: i,
|
|
1439
1461
|
total: o.count
|
|
1440
1462
|
},
|
|
1441
|
-
products: s.map((
|
|
1442
|
-
node:
|
|
1443
|
-
cursor:
|
|
1463
|
+
products: s.map((l, c) => ({
|
|
1464
|
+
node: xt(l),
|
|
1465
|
+
cursor: c.toString()
|
|
1444
1466
|
}))
|
|
1445
1467
|
}
|
|
1446
1468
|
};
|
|
1447
1469
|
}
|
|
1448
|
-
async function
|
|
1470
|
+
async function Wt({ body: t, extraData: e, ...n }) {
|
|
1449
1471
|
if (!t) {
|
|
1450
1472
|
console.error("[ERROR FETCHING] Body is required");
|
|
1451
1473
|
return;
|
|
@@ -1465,16 +1487,16 @@ async function Yt({ body: t, extraData: e, ...n }) {
|
|
|
1465
1487
|
}
|
|
1466
1488
|
};
|
|
1467
1489
|
}
|
|
1468
|
-
const
|
|
1490
|
+
const Xt = a.object({
|
|
1469
1491
|
query: a.string().optional(),
|
|
1470
1492
|
locale: a.string().optional()
|
|
1471
1493
|
});
|
|
1472
|
-
async function
|
|
1494
|
+
async function Zt({ apiUrl: t, body: e, fetchOptions: n }) {
|
|
1473
1495
|
if (!e) {
|
|
1474
1496
|
console.error("[ERROR FETCHING] Body is required");
|
|
1475
1497
|
return;
|
|
1476
1498
|
}
|
|
1477
|
-
await
|
|
1499
|
+
await Xt.validate(e);
|
|
1478
1500
|
const { query: r = "", locale: s = "default_locale" } = e, o = new URLSearchParams({ query: r, locale: s });
|
|
1479
1501
|
return h(
|
|
1480
1502
|
`${t}/api/io/_v/api/intelligent-search/search_suggestions?${o.toString()}`,
|
|
@@ -1483,22 +1505,22 @@ async function Xt({ apiUrl: t, body: e, fetchOptions: n }) {
|
|
|
1483
1505
|
}
|
|
1484
1506
|
);
|
|
1485
1507
|
}
|
|
1486
|
-
async function
|
|
1508
|
+
async function er({ apiUrl: t }) {
|
|
1487
1509
|
return h(`${t}/api/io/_v/api/intelligent-search/top_searches`);
|
|
1488
1510
|
}
|
|
1489
|
-
const
|
|
1511
|
+
const tr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1490
1512
|
__proto__: null,
|
|
1491
|
-
getSearchAutoCompleteSuggestions:
|
|
1492
|
-
getSearchCrossellingProducts:
|
|
1493
|
-
getSearchFacets:
|
|
1494
|
-
getSearchProducts:
|
|
1495
|
-
getSearchSuggestedTerms:
|
|
1496
|
-
getSearchTopSearchs:
|
|
1497
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1513
|
+
getSearchAutoCompleteSuggestions: kt,
|
|
1514
|
+
getSearchCrossellingProducts: Jt,
|
|
1515
|
+
getSearchFacets: Wt,
|
|
1516
|
+
getSearchProducts: Yt,
|
|
1517
|
+
getSearchSuggestedTerms: Zt,
|
|
1518
|
+
getSearchTopSearchs: er
|
|
1519
|
+
}, Symbol.toStringTag, { value: "Module" })), rr = a.object({
|
|
1498
1520
|
masterDataEntity: a.string().nonNullable(),
|
|
1499
1521
|
payload: a.object().shape({}).nullable()
|
|
1500
1522
|
});
|
|
1501
|
-
async function
|
|
1523
|
+
async function nr({
|
|
1502
1524
|
apiUrl: t,
|
|
1503
1525
|
body: e,
|
|
1504
1526
|
fetchOptions: n
|
|
@@ -1507,7 +1529,7 @@ async function rr({
|
|
|
1507
1529
|
console.error("[ERROR FETCHING] Body is required");
|
|
1508
1530
|
return;
|
|
1509
1531
|
}
|
|
1510
|
-
await
|
|
1532
|
+
await rr.validate(e);
|
|
1511
1533
|
const { masterDataEntity: r, payload: s } = e, o = `${t}/api/dataentities/${r}/documents`;
|
|
1512
1534
|
return h(o, {
|
|
1513
1535
|
method: "POST",
|
|
@@ -1517,21 +1539,21 @@ async function rr({
|
|
|
1517
1539
|
...n
|
|
1518
1540
|
});
|
|
1519
1541
|
}
|
|
1520
|
-
const
|
|
1542
|
+
const ar = a.object().shape({
|
|
1521
1543
|
_where: a.string().optional(),
|
|
1522
1544
|
_fields: a.string().optional(),
|
|
1523
1545
|
_sort: a.string().optional(),
|
|
1524
1546
|
_from: a.number().integer().min(0).optional(),
|
|
1525
1547
|
_to: a.number().integer().min(0).optional(),
|
|
1526
1548
|
_keyword: a.string().optional()
|
|
1527
|
-
}),
|
|
1549
|
+
}), sr = a.object({
|
|
1528
1550
|
masterDataEntity: a.string().required(),
|
|
1529
|
-
searchFields:
|
|
1551
|
+
searchFields: ar,
|
|
1530
1552
|
headers: a.object().shape({
|
|
1531
1553
|
"REST-Range": a.string().notRequired()
|
|
1532
1554
|
})
|
|
1533
1555
|
});
|
|
1534
|
-
async function
|
|
1556
|
+
async function or({
|
|
1535
1557
|
apiUrl: t,
|
|
1536
1558
|
body: e,
|
|
1537
1559
|
fetchOptions: n
|
|
@@ -1541,26 +1563,40 @@ async function sr({
|
|
|
1541
1563
|
return;
|
|
1542
1564
|
}
|
|
1543
1565
|
const r = new URLSearchParams();
|
|
1544
|
-
await
|
|
1566
|
+
await sr.validate(e);
|
|
1545
1567
|
const { masterDataEntity: s, searchFields: o, headers: i } = e;
|
|
1546
|
-
o && Object.entries(o).forEach(([
|
|
1547
|
-
r.append(
|
|
1568
|
+
o && Object.entries(o).forEach(([m, u]) => {
|
|
1569
|
+
r.append(m, String(u));
|
|
1548
1570
|
}), "_fields" in o || r == null || r.append("_fields", "_all");
|
|
1549
|
-
|
|
1550
|
-
|
|
1551
|
-
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1556
|
-
|
|
1571
|
+
let l = [], c = null;
|
|
1572
|
+
do {
|
|
1573
|
+
c && r.set("_scroll", c);
|
|
1574
|
+
const m = await fetch(
|
|
1575
|
+
`${t}/api/dataentities/${s}/search?${r.toString()}`,
|
|
1576
|
+
{
|
|
1577
|
+
method: "GET",
|
|
1578
|
+
headers: {
|
|
1579
|
+
"REST-Range": (i == null ? void 0 : i["REST-Range"]) ?? "resources=0-100",
|
|
1580
|
+
...n == null ? void 0 : n.headers
|
|
1581
|
+
},
|
|
1582
|
+
cache: "no-store"
|
|
1583
|
+
}
|
|
1584
|
+
);
|
|
1585
|
+
if (!m.ok)
|
|
1586
|
+
throw new Error(
|
|
1587
|
+
`[MasterData] ${m.status} - ${m.statusText}`
|
|
1588
|
+
);
|
|
1589
|
+
const u = await m.json();
|
|
1590
|
+
l.push(...u), c = m.headers.get("x-vtex-md-scroll");
|
|
1591
|
+
} while (c);
|
|
1592
|
+
return l;
|
|
1557
1593
|
}
|
|
1558
|
-
const
|
|
1594
|
+
const ir = a.object({
|
|
1559
1595
|
dataEntityName: a.string().required(),
|
|
1560
1596
|
id: a.string().required(),
|
|
1561
1597
|
fieldsToBeUpdated: a.object().shape({})
|
|
1562
1598
|
});
|
|
1563
|
-
async function
|
|
1599
|
+
async function cr({
|
|
1564
1600
|
apiUrl: t,
|
|
1565
1601
|
body: e,
|
|
1566
1602
|
fetchOptions: n
|
|
@@ -1569,7 +1605,7 @@ async function ir({
|
|
|
1569
1605
|
console.error("[ERROR FETCHING] Body is required");
|
|
1570
1606
|
return;
|
|
1571
1607
|
}
|
|
1572
|
-
await
|
|
1608
|
+
await ir.validate(e);
|
|
1573
1609
|
const { dataEntityName: r, id: s, fieldsToBeUpdated: o } = e, i = `${t}/api/dataentities/${r}/documents/${s}`;
|
|
1574
1610
|
return h(i, {
|
|
1575
1611
|
body: {
|
|
@@ -1579,28 +1615,28 @@ async function ir({
|
|
|
1579
1615
|
...n
|
|
1580
1616
|
});
|
|
1581
1617
|
}
|
|
1582
|
-
const
|
|
1618
|
+
const lr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1583
1619
|
__proto__: null,
|
|
1584
|
-
getSearchMasterdata:
|
|
1585
|
-
patchUpdateMasterdata:
|
|
1586
|
-
postMasterdata:
|
|
1620
|
+
getSearchMasterdata: or,
|
|
1621
|
+
patchUpdateMasterdata: cr,
|
|
1622
|
+
postMasterdata: nr
|
|
1587
1623
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
1588
|
-
async function
|
|
1624
|
+
async function ur({ body: t, apiUrl: e, extraData: n, fetchOptions: r }) {
|
|
1589
1625
|
const { productIds: s } = t;
|
|
1590
1626
|
if (!s)
|
|
1591
1627
|
return console.error("[ERROR FETCHING] productIds is required"), [];
|
|
1592
1628
|
const { NAME_SPLIT_SYMBOL: o } = n;
|
|
1593
1629
|
if (!o)
|
|
1594
1630
|
return console.error("[ERROR FETCHING] NAME_SPLIT_SYMBOL is required"), [];
|
|
1595
|
-
const i = s.map((u) => typeof u == "string" || typeof u == "number" ? `productId:${u}` : "").join("&fq="),
|
|
1631
|
+
const i = s.map((u) => typeof u == "string" || typeof u == "number" ? `productId:${u}` : "").join("&fq="), l = await h(
|
|
1596
1632
|
`${e}/api/catalog_system/pub/products/search?fq=${i}`,
|
|
1597
1633
|
{
|
|
1598
1634
|
...r
|
|
1599
1635
|
}
|
|
1600
|
-
),
|
|
1601
|
-
return
|
|
1636
|
+
), c = (u) => Object.keys(u).map((d) => ({ id: d, name: u[d] }));
|
|
1637
|
+
return l.map((u, d) => {
|
|
1602
1638
|
var $;
|
|
1603
|
-
const { installments: C, price:
|
|
1639
|
+
const { installments: C, price: f, listPrice: p, sizes: y, allSizesAvailable: I } = de({ items: u.items, NAME_SPLIT_SYMBOL: o }), F = I ? !0 : y.some((g) => g.available), O = u.items[0].sellers[0].commertialOffer;
|
|
1604
1640
|
return {
|
|
1605
1641
|
node: {
|
|
1606
1642
|
sku: u.items[0].itemId,
|
|
@@ -1622,8 +1658,8 @@ async function lr({ body: t, apiUrl: e, extraData: n, fetchOptions: r }) {
|
|
|
1622
1658
|
canonical: `/${u.linkText}/p`
|
|
1623
1659
|
},
|
|
1624
1660
|
cluster: {
|
|
1625
|
-
generals:
|
|
1626
|
-
highlights:
|
|
1661
|
+
generals: c(u.productClusters),
|
|
1662
|
+
highlights: c(u.clusterHighlights)
|
|
1627
1663
|
},
|
|
1628
1664
|
availability: {
|
|
1629
1665
|
status: F
|
|
@@ -1631,25 +1667,25 @@ async function lr({ body: t, apiUrl: e, extraData: n, fetchOptions: r }) {
|
|
|
1631
1667
|
image: u.items[0].images.map(
|
|
1632
1668
|
({
|
|
1633
1669
|
imageLabel: g,
|
|
1634
|
-
imageUrl:
|
|
1670
|
+
imageUrl: E
|
|
1635
1671
|
}) => ({
|
|
1636
1672
|
alternateName: g,
|
|
1637
|
-
url:
|
|
1673
|
+
url: E,
|
|
1638
1674
|
keywords: g
|
|
1639
1675
|
})
|
|
1640
1676
|
),
|
|
1641
1677
|
offers: {
|
|
1642
|
-
lowPrice:
|
|
1678
|
+
lowPrice: f,
|
|
1643
1679
|
highPrice: p,
|
|
1644
1680
|
offers: [
|
|
1645
1681
|
{
|
|
1646
1682
|
availability: F,
|
|
1647
1683
|
listPrice: p,
|
|
1648
|
-
price:
|
|
1684
|
+
price: f,
|
|
1649
1685
|
priceValidUntil: O.PriceValidUntil,
|
|
1650
1686
|
priceCurrency: "BRL",
|
|
1651
1687
|
installments: O.Installments,
|
|
1652
|
-
lowPrice:
|
|
1688
|
+
lowPrice: f,
|
|
1653
1689
|
quantity: O.AvailableQuantity,
|
|
1654
1690
|
seller: {
|
|
1655
1691
|
identifier: u.items[0].sellers[0].sellerId
|
|
@@ -1665,7 +1701,7 @@ async function lr({ body: t, apiUrl: e, extraData: n, fetchOptions: r }) {
|
|
|
1665
1701
|
isVariantOf: {
|
|
1666
1702
|
productGroupID: u.productId,
|
|
1667
1703
|
hasVariant: u.items.map((g) => {
|
|
1668
|
-
var
|
|
1704
|
+
var E;
|
|
1669
1705
|
return {
|
|
1670
1706
|
additionalProperty: g == null ? void 0 : g.variations.map(() => {
|
|
1671
1707
|
var R, T, v;
|
|
@@ -1677,7 +1713,7 @@ async function lr({ body: t, apiUrl: e, extraData: n, fetchOptions: r }) {
|
|
|
1677
1713
|
}),
|
|
1678
1714
|
name: g.name,
|
|
1679
1715
|
offers: {
|
|
1680
|
-
offers: (
|
|
1716
|
+
offers: (E = g.sellers) == null ? void 0 : E.map(
|
|
1681
1717
|
({ commertialOffer: R, sellerId: T }) => ({
|
|
1682
1718
|
availability: "https://schema.org/InStock",
|
|
1683
1719
|
listPrice: R.ListPrice,
|
|
@@ -1700,10 +1736,10 @@ async function lr({ body: t, apiUrl: e, extraData: n, fetchOptions: r }) {
|
|
|
1700
1736
|
};
|
|
1701
1737
|
});
|
|
1702
1738
|
}
|
|
1703
|
-
const
|
|
1739
|
+
const dr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1704
1740
|
__proto__: null,
|
|
1705
|
-
getWishlistProducts:
|
|
1706
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1741
|
+
getWishlistProducts: ur
|
|
1742
|
+
}, Symbol.toStringTag, { value: "Module" })), mr = (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(mr).join(e), pr = ({ canonical: t, seo: e, slug: n }) => {
|
|
1707
1743
|
const r = Array.isArray(n) ? n.join(", ") : n;
|
|
1708
1744
|
return {
|
|
1709
1745
|
id: 0,
|
|
@@ -1714,7 +1750,7 @@ const ur = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1714
1750
|
url: t,
|
|
1715
1751
|
children: []
|
|
1716
1752
|
};
|
|
1717
|
-
},
|
|
1753
|
+
}, fr = ({ canonical: t, category: e, previousImages: n, seo: r }) => ({
|
|
1718
1754
|
category: String(e == null ? void 0 : e.id),
|
|
1719
1755
|
title: (e == null ? void 0 : e.Title) ?? r.title,
|
|
1720
1756
|
description: (e == null ? void 0 : e.MetaTagDescription) ?? r.description,
|
|
@@ -1725,30 +1761,30 @@ const ur = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1725
1761
|
description: (e == null ? void 0 : e.MetaTagDescription) ?? r.description,
|
|
1726
1762
|
images: Array.isArray(n) ? [...n] : []
|
|
1727
1763
|
}
|
|
1728
|
-
}),
|
|
1764
|
+
}), gr = ({ items: t, parent: e, apiUrl: n, find: r }) => {
|
|
1729
1765
|
const s = t.find(
|
|
1730
1766
|
(i) => i.url.replace(n, "") === decodeURIComponent(e.toLowerCase())
|
|
1731
1767
|
);
|
|
1732
1768
|
return (s == null ? void 0 : s.children.find(
|
|
1733
1769
|
(i) => i.name.toLowerCase() === decodeURIComponent(String(r))
|
|
1734
1770
|
)) ?? s;
|
|
1735
|
-
},
|
|
1771
|
+
}, hr = (t) => {
|
|
1736
1772
|
t instanceof Error ? (console.error(`[ERROR CATEGORY INFO]: ${t.message}`), console.error(t.stack)) : console.error("[ERROR CATEGORY INFO]: Unknown error", t);
|
|
1737
|
-
},
|
|
1773
|
+
}, yr = /* @__PURE__ */ new Set([
|
|
1738
1774
|
"brand",
|
|
1739
1775
|
"category",
|
|
1740
1776
|
"department",
|
|
1741
1777
|
"subcategory",
|
|
1742
1778
|
"collection",
|
|
1743
1779
|
"cluster"
|
|
1744
|
-
]),
|
|
1780
|
+
]), br = (t) => typeof (t == null ? void 0 : t.pageType) == "string" && yr.has(t == null ? void 0 : t.pageType.toLowerCase()), Ir = (t) => ({
|
|
1745
1781
|
collection: t.Coleção,
|
|
1746
1782
|
categoryId: t.categoryId,
|
|
1747
1783
|
current_collection: t["Coleção Atual"],
|
|
1748
1784
|
items: t.items
|
|
1749
1785
|
}), oe = (t, e) => t.reduce((n, r) => {
|
|
1750
1786
|
if (r.items.filter(
|
|
1751
|
-
(i) => i.sellers.find((
|
|
1787
|
+
(i) => i.sellers.find((l) => l.commertialOffer.IsAvailable)
|
|
1752
1788
|
).length === 0 || (n == null ? void 0 : n.find((i) => (i == null ? void 0 : i.productId) === (r == null ? void 0 : r.productId))) !== void 0)
|
|
1753
1789
|
return n;
|
|
1754
1790
|
const o = r.items[0].images.find(
|
|
@@ -1760,56 +1796,56 @@ const ur = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
1760
1796
|
textureImage: (o == null ? void 0 : o.imageUrl) ?? "",
|
|
1761
1797
|
textureAlt: (o == null ? void 0 : o.imageText) ?? ""
|
|
1762
1798
|
}), n;
|
|
1763
|
-
}, []),
|
|
1799
|
+
}, []), Cr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
1764
1800
|
__proto__: null,
|
|
1765
1801
|
createEmptySeoCategory: pr,
|
|
1766
|
-
createSeoCategory:
|
|
1767
|
-
findCategory:
|
|
1802
|
+
createSeoCategory: fr,
|
|
1803
|
+
findCategory: gr,
|
|
1768
1804
|
formattedSimilars: oe,
|
|
1769
|
-
isCollectionPageType:
|
|
1770
|
-
notFindCategoryError:
|
|
1771
|
-
responseAdapter:
|
|
1772
|
-
}, Symbol.toStringTag, { value: "Module" })),
|
|
1805
|
+
isCollectionPageType: br,
|
|
1806
|
+
notFindCategoryError: hr,
|
|
1807
|
+
responseAdapter: Ir
|
|
1808
|
+
}, Symbol.toStringTag, { value: "Module" })), Rr = {
|
|
1773
1809
|
parseSearchState: ge,
|
|
1774
1810
|
convertSearchParams: fe,
|
|
1775
|
-
filterNonRootFacets:
|
|
1776
|
-
filterNonCategorySelected:
|
|
1777
|
-
},
|
|
1778
|
-
const
|
|
1811
|
+
filterNonRootFacets: pe,
|
|
1812
|
+
filterNonCategorySelected: me
|
|
1813
|
+
}, vr = async ({ children: t, apiUrl: e, productId: n, ClientItems: r, PDP_INFO: s, TEXTURE_IMAGE: o, TOGGLE_STYLE_MODIFIER: i }) => {
|
|
1814
|
+
const l = await fetch(
|
|
1779
1815
|
`${e}/api/catalog_system/pub/products/crossselling/similars/${n.toString()}`
|
|
1780
|
-
).then((
|
|
1816
|
+
).then((m) => m.json()), c = oe(l, o);
|
|
1781
1817
|
return /* @__PURE__ */ N("div", { className: M.similars, children: [
|
|
1782
1818
|
/* @__PURE__ */ N("div", { className: M["similars-info"], children: [
|
|
1783
1819
|
/* @__PURE__ */ b("span", { className: M["sections-title"], children: s.product.color_title }),
|
|
1784
1820
|
t
|
|
1785
1821
|
] }),
|
|
1786
|
-
/* @__PURE__ */ b(r, { productId: n, similars:
|
|
1822
|
+
/* @__PURE__ */ b(r, { productId: n, similars: c, TOGGLE_STYLE_MODIFIER: i })
|
|
1787
1823
|
] });
|
|
1788
|
-
},
|
|
1789
|
-
checkout:
|
|
1790
|
-
catalog:
|
|
1824
|
+
}, $r = {
|
|
1825
|
+
checkout: Tt,
|
|
1826
|
+
catalog: wt,
|
|
1791
1827
|
cms: he,
|
|
1792
|
-
search:
|
|
1793
|
-
masterdata:
|
|
1828
|
+
search: tr,
|
|
1829
|
+
masterdata: lr,
|
|
1794
1830
|
wishlist: {
|
|
1795
|
-
...
|
|
1831
|
+
...dr
|
|
1796
1832
|
}
|
|
1797
|
-
},
|
|
1798
|
-
catalog:
|
|
1799
|
-
search:
|
|
1833
|
+
}, qr = {
|
|
1834
|
+
catalog: Cr,
|
|
1835
|
+
search: Rr,
|
|
1800
1836
|
product: Ie,
|
|
1801
1837
|
cms: {
|
|
1802
1838
|
...be,
|
|
1803
1839
|
...ye
|
|
1804
1840
|
}
|
|
1805
|
-
},
|
|
1841
|
+
}, Ar = {
|
|
1806
1842
|
template: {
|
|
1807
|
-
pdp: { PDPSimilars:
|
|
1843
|
+
pdp: { PDPSimilars: vr }
|
|
1808
1844
|
}
|
|
1809
1845
|
};
|
|
1810
1846
|
export {
|
|
1811
|
-
|
|
1812
|
-
|
|
1813
|
-
|
|
1814
|
-
|
|
1847
|
+
$r as serverAPIs,
|
|
1848
|
+
Or as serverCMS,
|
|
1849
|
+
Ar as serverComponents,
|
|
1850
|
+
qr as serverHelpers
|
|
1815
1851
|
};
|