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