@soma-vertical-web/multi-lib 1.0.20 → 1.0.22

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/cms/ContentTypes/LPLojas/LPLojaClientWrapper.d.ts +1 -1
  2. package/cms/ContentTypes/LPLojas/LPLojasContent.d.ts +1 -1
  3. package/cms/ContentTypes/LPLojas/helpers.d.ts +1 -7
  4. package/cms/ContentTypes/PolicyPage/PolicyPageContent.d.ts +3 -0
  5. package/cms/index.d.ts +1 -1
  6. package/cms/server.d.ts +2 -1
  7. package/contexts/contexts/Session.d.ts +1 -1
  8. package/contexts/contexts/lplojas/Context.d.ts +1 -1
  9. package/contexts/index.d.ts +3 -3
  10. package/data/api/checkout/order-form/shipping/update/index.d.ts +2 -2
  11. package/data/api/user/index.d.ts +3 -0
  12. package/index-BhiCzrut.mjs +2255 -0
  13. package/index-D61YFVi9.mjs +2261 -0
  14. package/index-DZ1MbO8M.js +4 -0
  15. package/index-DyKuIyRP.js +4 -0
  16. package/index.js +16 -16
  17. package/index.mjs +8267 -8056
  18. package/index2.js +8 -1
  19. package/index2.mjs +2266 -1114
  20. package/layout/index.d.ts +7 -3
  21. package/layout/template/LPLojas/Composite/Details/Details.d.ts +1 -1
  22. package/layout/template/LPLojas/Composite/Details/Item.d.ts +1 -1
  23. package/layout/template/LPLojas/Composite/Details/Vendor.d.ts +1 -1
  24. package/layout/template/LPLojas/Composite/DropDown/DropDown.d.ts +1 -1
  25. package/layout/template/LPLojas/Composite/Root.d.ts +1 -1
  26. package/layout/template/LPLojas/index.d.ts +3 -3
  27. package/layout/template/Politicas/Composite/Banner.d.ts +4 -0
  28. package/layout/template/Politicas/Composite/Container.d.ts +7 -0
  29. package/layout/template/Politicas/Composite/OneTrustPolicy.d.ts +14 -0
  30. package/layout/template/Politicas/Politicas.d.ts +10 -0
  31. package/layout/template/TrackingRouteWatcher/index.d.ts +5 -0
  32. package/package.json +1 -1
  33. package/server.d.ts +2 -0
  34. package/style.css +1 -1
  35. package/types/cms/ContentTypes/LPLojas/index.d.ts +22 -1
  36. package/types/cms/ContentTypes/PolicyPage/index.d.ts +17 -0
  37. package/types/contexts/contexts/session.d.ts +1 -0
  38. package/types/layout/templates/LPLojas/Details/index.d.ts +18 -0
  39. package/types/layout/templates/LPLojas/DropDown/index.d.ts +10 -0
  40. package/types/layout/templates/LPLojas/index.d.ts +18 -0
  41. package/types/layout/templates/Politicas/index.d.ts +27 -0
package/index2.mjs CHANGED
@@ -1,1177 +1,1205 @@
1
- import { jsx as b, jsxs as G, Fragment as B } from "react/jsx-runtime";
2
- import { x as S, r as k, S as se, y as oe, z as ie, a as ce, v as le, t as ue, A as de, p as me, B as pe, C as fe, D as ge, e as he, E as ye } from "./index-CpUjW-m9.mjs";
3
- import { Utils as j, helpers as D } from "@soma-vertical-web/core-components";
4
- import * as n from "yup";
5
- import be from "sanitize-html";
6
- const Ie = async ({
7
- children: t,
8
- ClientCartProvider: e,
9
- ...a
1
+ import { jsx as N, jsxs as me, Fragment as J } from "react/jsx-runtime";
2
+ import { F, z as se, S as _t, G as Rt, H as It, a as Pt, j as xt, m as St, r as Ct, q as kt, k as ze, n as Et, o as At, l as Ot, D as Tt, C as qt, I as Nt, p as jt, J as Ft, K as $t, L as Lt, e as Dt, M as Ut } from "./index-D61YFVi9.mjs";
3
+ import { Utils as le, helpers as ce } from "@soma-vertical-web/core-components";
4
+ import * as c from "yup";
5
+ import Ht from "sanitize-html";
6
+ import { decodeJwt as Mt } from "jose";
7
+ const Bt = async ({
8
+ children: e,
9
+ ClientCartProvider: t,
10
+ ...r
10
11
  }) => {
11
- const { data: r } = await S(
12
+ const { data: n } = await F(
12
13
  "mini_cart",
13
- a
14
+ r
14
15
  );
15
- return /* @__PURE__ */ b(e, { ...r ? Array.isArray(r) ? { data: r[0] } : { data: r } : {}, children: t });
16
- }, Re = ({
17
- slug: t,
18
- data: e,
19
- SectionZone: a,
20
- COMMON_PAGE_COLUMN_GAP: r,
21
- identifyWhoIsFirst: s
16
+ return /* @__PURE__ */ N(t, { ...n ? Array.isArray(n) ? { data: n[0] } : { data: n } : {}, children: e });
17
+ }, zt = ({
18
+ slug: e,
19
+ data: t,
20
+ SectionZone: r,
21
+ COMMON_PAGE_COLUMN_GAP: n,
22
+ identifyWhoIsFirst: a
22
23
  }) => {
23
- const o = e == null ? void 0 : e.find(
24
- (d) => {
25
- var R, f, p, y;
26
- return ((f = (R = d.config) == null ? void 0 : R.responsive) == null ? void 0 : f.deviceType) === "desktop" && ((y = (p = d.config) == null ? void 0 : p.seo) == null ? void 0 : y.slug) === t;
27
- }
28
- ), i = o == null ? void 0 : o.config.responsive.gapCustom, u = o == null ? void 0 : o.config.responsive.gapSections, c = e == null ? void 0 : e.find(
29
- (d) => {
30
- var R, f, p, y;
31
- return ((f = (R = d.config) == null ? void 0 : R.responsive) == null ? void 0 : f.deviceType) === "mobile" && ((y = (p = d.config) == null ? void 0 : p.seo) == null ? void 0 : y.slug) === t;
32
- }
33
- ), m = c == null ? void 0 : c.config.responsive.gapCustom, l = c == null ? void 0 : c.config.responsive.gapSections;
34
- return /* @__PURE__ */ G(B, { children: [
35
- /* @__PURE__ */ b(
36
- j.Column,
24
+ const o = t == null ? void 0 : t.find(
25
+ (u) => {
26
+ var w, v, y, _;
27
+ return ((v = (w = u.config) == null ? void 0 : w.responsive) == null ? void 0 : v.deviceType) === "desktop" && ((_ = (y = u.config) == null ? void 0 : y.seo) == null ? void 0 : _.slug) === e;
28
+ }
29
+ ), l = o == null ? void 0 : o.config.responsive.gapCustom, i = o == null ? void 0 : o.config.responsive.gapSections, d = t == null ? void 0 : t.find(
30
+ (u) => {
31
+ var w, v, y, _;
32
+ return ((v = (w = u.config) == null ? void 0 : w.responsive) == null ? void 0 : v.deviceType) === "mobile" && ((_ = (y = u.config) == null ? void 0 : y.seo) == null ? void 0 : _.slug) === e;
33
+ }
34
+ ), g = d == null ? void 0 : d.config.responsive.gapCustom, s = d == null ? void 0 : d.config.responsive.gapSections;
35
+ return /* @__PURE__ */ me(J, { children: [
36
+ /* @__PURE__ */ N(
37
+ le.Column,
37
38
  {
38
- gap: i && u ? u : r,
39
- className: D.classNameConcat(
40
- k["responsive-desktop-flex"],
39
+ gap: l && i ? i : n,
40
+ className: ce.classNameConcat(
41
+ se["responsive-desktop-flex"],
41
42
  "utils-column-modifier"
42
43
  ),
43
- children: /* @__PURE__ */ b(a, { data: (o == null ? void 0 : o.sections) ?? [], identifyWhoIsFirst: s })
44
+ children: /* @__PURE__ */ N(r, { data: (o == null ? void 0 : o.sections) ?? [], identifyWhoIsFirst: a })
44
45
  }
45
46
  ),
46
- /* @__PURE__ */ b(
47
- j.Column,
47
+ /* @__PURE__ */ N(
48
+ le.Column,
48
49
  {
49
- gap: m && l ? l : r,
50
- className: D.classNameConcat(
51
- k["responsive-mobile-flex"],
50
+ gap: g && s ? s : n,
51
+ className: ce.classNameConcat(
52
+ se["responsive-mobile-flex"],
52
53
  "utils-column-modifier"
53
54
  ),
54
- children: /* @__PURE__ */ b(a, { data: (c == null ? void 0 : c.sections) ?? [], identifyWhoIsFirst: s })
55
+ children: /* @__PURE__ */ N(r, { data: (d == null ? void 0 : d.sections) ?? [], identifyWhoIsFirst: a })
55
56
  }
56
57
  )
57
58
  ] });
58
- }, Ce = async ({
59
- slug: t,
60
- SectionZone: e,
61
- COMMON_PAGE_COLUMN_GAP: a,
62
- identifyWhoIsFirst: r = !1,
63
- ...s
59
+ }, Gt = async ({
60
+ slug: e,
61
+ SectionZone: t,
62
+ COMMON_PAGE_COLUMN_GAP: r,
63
+ identifyWhoIsFirst: n = !1,
64
+ ...a
64
65
  }) => {
65
- const { data: o } = await S(
66
+ const { data: o } = await F(
66
67
  "common_page",
67
- s
68
+ a
68
69
  );
69
- return !o || !Array.isArray(o) || o.length === 0 ? null : /* @__PURE__ */ b(
70
- Re,
70
+ return !o || !Array.isArray(o) || o.length === 0 ? null : /* @__PURE__ */ N(
71
+ zt,
71
72
  {
72
73
  data: o,
73
- slug: t,
74
- SectionZone: e,
75
- COMMON_PAGE_COLUMN_GAP: a,
76
- identifyWhoIsFirst: r
74
+ slug: e,
75
+ SectionZone: t,
76
+ COMMON_PAGE_COLUMN_GAP: r,
77
+ identifyWhoIsFirst: n
77
78
  }
78
79
  );
79
- }, ve = async ({
80
- children: t,
81
- ClientFlagsAndTagsProvider: e,
82
- ...a
80
+ }, Vt = async ({
81
+ children: e,
82
+ ClientFlagsAndTagsProvider: t,
83
+ ...r
83
84
  }) => {
84
- const { data: r } = await S(
85
+ const { data: n } = await F(
85
86
  "flags_and_tags",
86
- a
87
+ r
87
88
  );
88
- return !r || !Array.isArray(r) ? null : /* @__PURE__ */ b(e, { data: r[0], children: t });
89
- }, Se = async ({
90
- className: t,
91
- PAYMENT_FLAGS_DICTIONARY: e,
92
- PAYMENT_FLAGS: a,
93
- LEGAL_INFORMATION_TEXT: r,
94
- ICONS: s,
89
+ return !n || !Array.isArray(n) ? null : /* @__PURE__ */ N(t, { data: n[0], children: e });
90
+ }, Wt = async ({
91
+ className: e,
92
+ PAYMENT_FLAGS_DICTIONARY: t,
93
+ PAYMENT_FLAGS: r,
94
+ LEGAL_INFORMATION_TEXT: n,
95
+ ICONS: a,
95
96
  SectionZone: o,
96
- Footer: i,
97
- FooterSupport: u,
98
- hasFooterStamps: c,
99
- ...m
97
+ Footer: l,
98
+ FooterSupport: i,
99
+ hasFooterStamps: d,
100
+ ...g
100
101
  }) => {
101
- var f, p, y, I, T, q, O, g, E, C, F;
102
- const { data: l } = await S("footer", m), d = Array.isArray(l) && ((f = l[0]) == null ? void 0 : f.type) === "footer" ? l[0] : null, R = {
103
- ...(p = d == null ? void 0 : d.paymentInfo) == null ? void 0 : p.paymentInfo,
102
+ var v, y, _, p, b, m, h, f, E, q, I;
103
+ const { data: s } = await F("footer", g), u = Array.isArray(s) && ((v = s[0]) == null ? void 0 : v.type) === "footer" ? s[0] : null, w = {
104
+ ...(y = u == null ? void 0 : u.paymentInfo) == null ? void 0 : y.paymentInfo,
104
105
  acceptedFlags: Array.isArray(
105
- (y = d == null ? void 0 : d.paymentInfo) == null ? void 0 : y.paymentInfo.acceptedFlags
106
- ) ? (I = d == null ? void 0 : d.paymentInfo) == null ? void 0 : I.paymentInfo.acceptedFlags.filter((v) => !!e[v]).map(
107
- (v) => e[v]
106
+ (_ = u == null ? void 0 : u.paymentInfo) == null ? void 0 : _.paymentInfo.acceptedFlags
107
+ ) ? (p = u == null ? void 0 : u.paymentInfo) == null ? void 0 : p.paymentInfo.acceptedFlags.filter((R) => !!t[R]).map(
108
+ (R) => t[R]
108
109
  ) : []
109
110
  };
110
- return d ? /* @__PURE__ */ b(
111
- i,
111
+ return u ? /* @__PURE__ */ N(
112
+ l,
112
113
  {
113
- className: t,
114
- data: { ...d },
115
- socialInfo: (T = d.socialMedia) == null ? void 0 : T.socialMedia,
116
- socialMedias: (O = (q = d.socialMedia) == null ? void 0 : q.socialMedia) == null ? void 0 : O.medias,
117
- payments: R,
118
- hasFooterStamps: c,
114
+ className: e,
115
+ data: { ...u },
116
+ socialInfo: (b = u.socialMedia) == null ? void 0 : b.socialMedia,
117
+ socialMedias: (h = (m = u.socialMedia) == null ? void 0 : m.socialMedia) == null ? void 0 : h.medias,
118
+ payments: w,
119
+ hasFooterStamps: d,
119
120
  adornment: {
120
- ...(E = (g = d.supportInfo) == null ? void 0 : g.supportInfo) != null && E.content ? {
121
- bottom: /* @__PURE__ */ b(
122
- u,
121
+ ...(E = (f = u.supportInfo) == null ? void 0 : f.supportInfo) != null && E.content ? {
122
+ bottom: /* @__PURE__ */ N(
123
+ i,
123
124
  {
124
- content: (F = (C = d.supportInfo) == null ? void 0 : C.supportInfo) == null ? void 0 : F.content,
125
+ content: (I = (q = u.supportInfo) == null ? void 0 : q.supportInfo) == null ? void 0 : I.content,
125
126
  CONSTANTS: {
126
- ICONS: s,
127
- PAYMENT_FLAGS: a,
128
- PAYMENT_FLAGS_DICTIONARY: e
127
+ ICONS: a,
128
+ PAYMENT_FLAGS: r,
129
+ PAYMENT_FLAGS_DICTIONARY: t
129
130
  }
130
131
  }
131
132
  )
132
133
  } : {},
133
- ...d.sections.length ? { top: /* @__PURE__ */ b(o, { data: d.sections }) } : {}
134
+ ...u.sections.length ? { top: /* @__PURE__ */ N(o, { data: u.sections }) } : {}
134
135
  },
135
- LEGAL_INFORMATION_TEXT: r,
136
- ICONS: s
136
+ LEGAL_INFORMATION_TEXT: n,
137
+ ICONS: a
137
138
  }
138
139
  ) : null;
139
- }, Ee = async ({
140
- children: t,
141
- ClientHeaderProvider: e,
142
- ...a
140
+ }, Qt = async ({
141
+ children: e,
142
+ ClientHeaderProvider: t,
143
+ ...r
143
144
  }) => {
144
- var o, i, u, c, m, l;
145
- const { data: r } = await S(
145
+ var o, l, i, d, g, s;
146
+ const { data: n } = await F(
146
147
  "header",
147
- a
148
- ), s = Array.isArray(r) ? r[0] : void 0;
149
- return /* @__PURE__ */ b(
150
- e,
148
+ r
149
+ ), a = Array.isArray(n) ? n[0] : void 0;
150
+ return /* @__PURE__ */ N(
151
+ t,
151
152
  {
152
153
  headerData: {
153
- ...((o = s == null ? void 0 : s.layerConfig) == null ? void 0 : o.config) ?? {},
154
- subMenus: ((i = s == null ? void 0 : s.sections) == null ? void 0 : i.map((d) => d.data)) ?? [],
155
- categories: ((c = (u = s == null ? void 0 : s.categories) == null ? void 0 : u.categories) == null ? void 0 : c.items) ?? [],
156
- navigationLinks: ((l = (m = s == null ? void 0 : s.navigationLinks) == null ? void 0 : m.navigationLinks) == null ? void 0 : l.items) ?? []
154
+ ...((o = a == null ? void 0 : a.layerConfig) == null ? void 0 : o.config) ?? {},
155
+ subMenus: ((l = a == null ? void 0 : a.sections) == null ? void 0 : l.map((u) => u.data)) ?? [],
156
+ categories: ((d = (i = a == null ? void 0 : a.categories) == null ? void 0 : i.categories) == null ? void 0 : d.items) ?? [],
157
+ navigationLinks: ((s = (g = a == null ? void 0 : a.navigationLinks) == null ? void 0 : g.navigationLinks) == null ? void 0 : s.items) ?? []
157
158
  },
158
- children: t
159
+ children: e
159
160
  }
160
161
  );
161
- }, Fe = (t) => {
162
- var i, u;
163
- const e = (u = (i = t[0]) == null ? void 0 : i.items) == null ? void 0 : u.items;
164
- if ((e == null ? void 0 : e.items.length) === 0 || t.length === 0)
162
+ }, Xt = (e) => {
163
+ var l, i;
164
+ const t = (i = (l = e[0]) == null ? void 0 : l.items) == null ? void 0 : i.items;
165
+ if ((t == null ? void 0 : t.items.length) === 0 || e.length === 0)
165
166
  return {
166
167
  iconLabel: "",
167
168
  label: "",
168
169
  content: []
169
170
  };
170
- const a = 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
- 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
171
+ const r = t == null ? void 0 : t.iconLabel, n = t == null ? void 0 : t.label, a = t == null ? void 0 : t.helpButtonSize, o = t.items.map(
172
+ (d, g) => ({
173
+ type: d.type,
174
+ id: `${g.toString()}-${d.title.toLowerCase()}`,
175
+ title: d.title,
176
+ subtitle: d.subtitle,
177
+ description: d.description,
178
+ buttonLabel: d.buttonLabel,
179
+ buttonHref: d.buttonHref,
180
+ buttonMode: d.buttonMode,
181
+ buttonSize: d.buttonSize,
182
+ buttonIcon: d.buttonIcon
182
183
  })
183
184
  );
184
185
  return {
185
- iconLabel: a,
186
- label: r,
187
- helpButtonSize: s,
186
+ iconLabel: r,
187
+ label: n,
188
+ helpButtonSize: a,
188
189
  content: o
189
190
  };
190
- }, Te = async ({
191
- HelpButton: t,
192
- ICONS: e,
193
- className: a,
194
- ...r
191
+ }, Kt = async ({
192
+ HelpButton: e,
193
+ ICONS: t,
194
+ className: r,
195
+ ...n
195
196
  }) => {
196
- const { data: s } = await S(
197
+ const { data: a } = await F(
197
198
  "helpbutton",
198
- r
199
+ n
199
200
  );
200
- if (!s || !Array.isArray(s) || s.length === 0)
201
+ if (!a || !Array.isArray(a) || a.length === 0)
201
202
  return null;
202
- const o = Fe(s);
203
- return /* @__PURE__ */ b(
204
- t,
203
+ const o = Xt(a);
204
+ return /* @__PURE__ */ N(
205
+ e,
205
206
  {
206
207
  data: o,
207
- ICONS: e,
208
- className: a
208
+ ICONS: t,
209
+ className: r
209
210
  }
210
211
  );
211
- }, qe = async ({
212
- SectionZone: t,
213
- LPCadastro: e,
214
- ...a
212
+ }, Jt = async ({
213
+ SectionZone: e,
214
+ LPCadastro: t,
215
+ ...r
215
216
  }) => {
216
- var c;
217
- const { data: r } = await S(
217
+ var d;
218
+ const { data: n } = await F(
218
219
  "lp_cadastro",
219
- a
220
+ r
220
221
  );
221
- if (!r || !Array.isArray(r) || r.length === 0)
222
+ if (!n || !Array.isArray(n) || n.length === 0)
222
223
  return null;
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) || {}, u = s == null ? void 0 : s.sections;
224
- return /* @__PURE__ */ G(B, { children: [
225
- /* @__PURE__ */ b(e, { sections: o, content: i }),
226
- /* @__PURE__ */ b(t, { data: u })
224
+ const [a] = n, o = (a == null ? void 0 : a.sections) || [], l = ((d = a == null ? void 0 : a.content) == null ? void 0 : d.conteúdo) || {}, i = a == null ? void 0 : a.sections;
225
+ return /* @__PURE__ */ me(J, { children: [
226
+ /* @__PURE__ */ N(t, { sections: o, content: l }),
227
+ /* @__PURE__ */ N(e, { data: i })
227
228
  ] });
228
- }, Oe = async ({
229
- LPLOJAS_TEMPLATE_RETURN_BUTTON: t,
230
- ICONS: e,
231
- entity: a,
232
- showVendor: r,
233
- LPStoresClientWrapper: s,
229
+ }, Zt = async ({
230
+ LPLOJAS_TEMPLATE_RETURN_BUTTON: e,
231
+ ICONS: t,
232
+ entity: r,
233
+ showVendor: n,
234
+ LPStoresClientWrapper: a,
234
235
  ...o
235
236
  }) => {
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,
237
+ var g;
238
+ const { data: l } = await F("lp_lojas", o), d = (g = (Array.isArray(l) ? l : [])[0]) == null ? void 0 : g.config.config;
239
+ return /* @__PURE__ */ N(
240
+ a,
240
241
  {
241
- entity: a,
242
- content: c,
243
- data: i,
244
- showVendor: r,
245
- ICONS: e,
246
- LPLOJAS_TEMPLATE_RETURN_BUTTON: t
242
+ entity: r,
243
+ content: d,
244
+ data: l,
245
+ showVendor: n,
246
+ ICONS: t,
247
+ LPLOJAS_TEMPLATE_RETURN_BUTTON: e
247
248
  }
248
249
  );
249
- }, $e = async ({
250
- children: t,
251
- productId: e,
252
- COMMON_PAGE_COLUMN_GAP: a,
253
- SectionZone: r,
254
- PDPContentProvider: s,
250
+ }, Yt = async ({
251
+ children: e,
252
+ productId: t,
253
+ COMMON_PAGE_COLUMN_GAP: r,
254
+ SectionZone: n,
255
+ PDPContentProvider: a,
255
256
  ...o
256
257
  }) => {
257
- const { data: i } = await S(
258
+ const { data: l } = await F(
258
259
  "product_page",
259
260
  o
260
261
  );
261
- return !i || !Array.isArray(i) || i.length === 0 ? null : /* @__PURE__ */ b(
262
- s,
262
+ return !l || !Array.isArray(l) || l.length === 0 ? null : /* @__PURE__ */ N(
263
+ a,
263
264
  {
264
- data: i[0],
265
- productId: e,
266
- COMMON_PAGE_COLUMN_GAP: a,
267
- SectionZone: r,
268
- children: t
265
+ data: l[0],
266
+ productId: t,
267
+ COMMON_PAGE_COLUMN_GAP: r,
268
+ SectionZone: n,
269
+ children: e
269
270
  }
270
271
  );
271
- }, Pe = {
272
+ }, er = {
272
273
  "column-modifier": "_column-modifier_1tqap_1"
273
- }, Ae = async ({
274
- className: t,
275
- children: e,
276
- slug: a,
277
- SectionZone: r,
278
- COMMON_PAGE_COLUMN_GAP_PDC: s,
274
+ }, tr = async ({
275
+ className: e,
276
+ children: t,
277
+ slug: r,
278
+ SectionZone: n,
279
+ COMMON_PAGE_COLUMN_GAP_PDC: a,
279
280
  PLPContentProvider: o,
280
- ...i
281
+ ...l
281
282
  }) => {
282
- const { data: u } = await S(
283
+ const { data: i } = await F(
283
284
  "categories_page",
284
- i
285
+ l
285
286
  );
286
- if (!u || !Array.isArray(u))
287
+ if (!i || !Array.isArray(i))
287
288
  return null;
288
- const c = u.find(
289
- (f) => {
290
- var p, y, I;
291
- return ((p = f.config) == null ? void 0 : p.seo.slug) === a && ((I = (y = f.config) == null ? void 0 : y.responsive) == null ? void 0 : I.deviceType) === "desktop";
292
- }
293
- ), m = u.find(
294
- (f) => {
295
- var p, y, I;
296
- return ((p = f.config) == null ? void 0 : p.seo.slug) === a && ((I = (y = f.config) == null ? void 0 : y.responsive) == null ? void 0 : I.deviceType) === "mobile";
297
- }
298
- ), l = u.find(
299
- (f) => {
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";
302
- }
303
- ), d = u.find(
304
- (f) => {
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";
307
- }
308
- ), R = Array.isArray(t) ? t : [t];
309
- return /* @__PURE__ */ G(B, { children: [
310
- /* @__PURE__ */ b(
311
- j.Column,
289
+ const d = i.find(
290
+ (v) => {
291
+ var y, _, p;
292
+ return ((y = v.config) == null ? void 0 : y.seo.slug) === r && ((p = (_ = v.config) == null ? void 0 : _.responsive) == null ? void 0 : p.deviceType) === "desktop";
293
+ }
294
+ ), g = i.find(
295
+ (v) => {
296
+ var y, _, p;
297
+ return ((y = v.config) == null ? void 0 : y.seo.slug) === r && ((p = (_ = v.config) == null ? void 0 : _.responsive) == null ? void 0 : p.deviceType) === "mobile";
298
+ }
299
+ ), s = i.find(
300
+ (v) => {
301
+ var y, _, p;
302
+ return ((y = v.config) == null ? void 0 : y.seo.slug) === "default" && ((p = (_ = v.config) == null ? void 0 : _.responsive) == null ? void 0 : p.deviceType) === "desktop";
303
+ }
304
+ ), u = i.find(
305
+ (v) => {
306
+ var y, _, p;
307
+ return ((y = v.config) == null ? void 0 : y.seo.slug) === "default" && ((p = (_ = v.config) == null ? void 0 : _.responsive) == null ? void 0 : p.deviceType) === "mobile";
308
+ }
309
+ ), w = Array.isArray(e) ? e : [e];
310
+ return /* @__PURE__ */ me(J, { children: [
311
+ /* @__PURE__ */ N(
312
+ le.Column,
312
313
  {
313
- className: D.classNameConcat(
314
- k["responsive-desktop-flex"],
315
- [Pe["column-modifier"], ...R]
314
+ className: ce.classNameConcat(
315
+ se["responsive-desktop-flex"],
316
+ [er["column-modifier"], ...w]
316
317
  ),
317
318
  style: {
318
319
  minHeight: "100vh"
319
320
  },
320
- children: /* @__PURE__ */ b(
321
+ children: /* @__PURE__ */ N(
321
322
  o,
322
323
  {
323
- data: c ?? l,
324
+ data: d ?? s,
324
325
  device: "desktop",
325
- SectionZone: r,
326
- COMMON_PAGE_COLUMN_GAP_PDC: s,
327
- children: e
326
+ SectionZone: n,
327
+ COMMON_PAGE_COLUMN_GAP_PDC: a,
328
+ children: t
328
329
  }
329
330
  )
330
331
  }
331
332
  ),
332
- /* @__PURE__ */ b(j.Column, { className: D.classNameConcat(k["responsive-mobile-flex"], t), children: /* @__PURE__ */ b(
333
+ /* @__PURE__ */ N(le.Column, { className: ce.classNameConcat(se["responsive-mobile-flex"], e), children: /* @__PURE__ */ N(
333
334
  o,
334
335
  {
335
- data: m ?? d,
336
+ data: g ?? u,
336
337
  device: "mobile",
337
- SectionZone: r,
338
- COMMON_PAGE_COLUMN_GAP_PDC: s,
339
- children: e
338
+ SectionZone: n,
339
+ COMMON_PAGE_COLUMN_GAP_PDC: a,
340
+ children: t
340
341
  }
341
342
  ) })
342
343
  ] });
343
- }, we = async ({ slug: t, ...e }) => {
344
- var i, u, c;
345
- const { data: a } = await S(
344
+ }, rr = async ({ slug: e, ...t }) => {
345
+ var l, i, d;
346
+ const { data: r } = await F(
346
347
  "redirect_to_search",
347
- e
348
+ t
348
349
  );
349
- if (!a || !Array.isArray(a))
350
+ if (!r || !Array.isArray(r))
350
351
  return {
351
- slug: t,
352
+ slug: e,
352
353
  query: null,
353
354
  redirect: !1
354
355
  };
355
- const r = ((c = (u = (i = a[0]) == null ? void 0 : i.redirectToSearch) == null ? void 0 : u.redirectToSearch) == null ? void 0 : c.paths) ?? [];
356
- if (!!!r.length)
356
+ const n = ((d = (i = (l = r[0]) == null ? void 0 : l.redirectToSearch) == null ? void 0 : i.redirectToSearch) == null ? void 0 : d.paths) ?? [];
357
+ if (!!!n.length)
357
358
  return {
358
- slug: t,
359
+ slug: e,
359
360
  query: null,
360
361
  redirect: !1
361
362
  };
362
- const o = r.find(
363
- (m) => {
364
- var l, d;
365
- return ((l = m.path) == null ? void 0 : l.replace(/\//g, "-").toLowerCase()) === t.replace(/\//g, "-").toLowerCase() || ((d = m.path) == null ? void 0 : d.replace(/\//g, "-").toLowerCase()) === `/${t}`.replace(/\//g, "-").toLowerCase();
363
+ const o = n.find(
364
+ (g) => {
365
+ var s, u;
366
+ return ((s = g.path) == null ? void 0 : s.replace(/\//g, "-").toLowerCase()) === e.replace(/\//g, "-").toLowerCase() || ((u = g.path) == null ? void 0 : u.replace(/\//g, "-").toLowerCase()) === `/${e}`.replace(/\//g, "-").toLowerCase();
366
367
  }
367
368
  );
368
369
  return o ? {
369
- slug: t,
370
+ slug: e,
370
371
  query: o == null ? void 0 : o.searchQuery,
371
372
  redirect: !0,
372
373
  collectionId: o == null ? void 0 : o.collectionId,
373
374
  filters: o == null ? void 0 : o.filters,
374
375
  sort: o == null ? void 0 : o.sort
375
376
  } : {
376
- slug: t,
377
+ slug: e,
377
378
  query: null,
378
379
  redirect: !1,
379
380
  collectionId: null,
380
381
  filters: null,
381
382
  sort: null
382
383
  };
383
- }, Ne = async ({ slug: t, ...e }) => {
384
- var i, u, c;
385
- const { data: a } = await S(
384
+ }, nr = async ({ slug: e, ...t }) => {
385
+ var l, i, d;
386
+ const { data: r } = await F(
386
387
  "redirect_to_search",
387
- e
388
+ t
388
389
  );
389
- if (!a || !Array.isArray(a))
390
+ if (!r || !Array.isArray(r))
390
391
  return null;
391
- const r = ((c = (u = (i = a[0]) == null ? void 0 : i.redirectToSearch) == null ? void 0 : u.redirectToSearch) == null ? void 0 : c.paths) ?? [];
392
- if (!!!r.length)
392
+ const n = ((d = (i = (l = r[0]) == null ? void 0 : l.redirectToSearch) == null ? void 0 : i.redirectToSearch) == null ? void 0 : d.paths) ?? [];
393
+ if (!!!n.length)
393
394
  return null;
394
- const o = r.find(
395
- (m) => {
396
- var l, d;
397
- return ((l = m.path) == null ? void 0 : l.replace(/\//g, "-").toLowerCase()) === t.replace(/\//g, "-").toLowerCase() || ((d = m.path) == null ? void 0 : d.replace(/\//g, "-").toLowerCase()) === `/${t}`.replace(/\//g, "-").toLowerCase();
395
+ const o = n.find(
396
+ (g) => {
397
+ var s, u;
398
+ return ((s = g.path) == null ? void 0 : s.replace(/\//g, "-").toLowerCase()) === e.replace(/\//g, "-").toLowerCase() || ((u = g.path) == null ? void 0 : u.replace(/\//g, "-").toLowerCase()) === `/${e}`.replace(/\//g, "-").toLowerCase();
398
399
  }
399
400
  );
400
401
  return o ? {
401
- slug: t,
402
+ slug: e,
402
403
  title: o.pageTitle,
403
404
  description: o.pageDescription
404
405
  } : null;
405
- }, ke = async ({
406
- children: t,
407
- SectionZone: e,
408
- className: a,
409
- ...r
406
+ }, ar = async ({
407
+ slug: e,
408
+ Politicas: t,
409
+ SectionZone: r,
410
+ oneTrust: n,
411
+ ...a
410
412
  }) => {
411
- const { data: s } = await S(
413
+ const { data: o } = await F(
414
+ "policy_page",
415
+ a
416
+ ), { data: l } = await F(
417
+ "policy_tab",
418
+ a
419
+ ), i = Array.isArray(o) ? o : null, d = Array.isArray(l) ? l : null, g = i ? i[0].sections : null;
420
+ return !i || !d ? null : /* @__PURE__ */ me(J, { children: [
421
+ /* @__PURE__ */ N(
422
+ t,
423
+ {
424
+ slug: e,
425
+ pageData: i[0],
426
+ tabsData: d,
427
+ oneTrust: n
428
+ }
429
+ ),
430
+ g && /* @__PURE__ */ N(r, { data: g })
431
+ ] });
432
+ }, ir = async ({
433
+ children: e,
434
+ SectionZone: t,
435
+ className: r,
436
+ ...n
437
+ }) => {
438
+ const { data: a } = await F(
412
439
  "search_page",
413
- r
440
+ n
414
441
  );
415
- return Array.isArray(s) && s.length > 0 ? /* @__PURE__ */ b(
416
- se,
442
+ return Array.isArray(a) && a.length > 0 ? /* @__PURE__ */ N(
443
+ _t,
417
444
  {
418
- data: s,
419
- SectionZone: e,
420
- className: a,
421
- children: t
422
- }
423
- ) : /* @__PURE__ */ b(B, { children: "children" });
424
- }, je = async ({
425
- ClientTipbarContent: t,
426
- ...e
445
+ data: a,
446
+ SectionZone: t,
447
+ className: r,
448
+ children: e
449
+ }
450
+ ) : /* @__PURE__ */ N(J, { children: "children" });
451
+ }, or = async ({
452
+ ClientTipbarContent: e,
453
+ ...t
427
454
  }) => {
428
- const { data: a } = await S(
455
+ const { data: r } = await F(
429
456
  "tipbar",
430
- e
457
+ t
431
458
  );
432
- return /* @__PURE__ */ b(t, { data: a });
433
- }, De = {
434
- CommonPageContent: Ce,
435
- CartContent: Ie,
436
- FlagsAndTagsContent: ve,
437
- HeaderContent: Ee,
438
- TipbarContent: je,
439
- FooterContent: Se,
440
- PLPContent: Ae,
441
- PDPContent: $e,
442
- getRedirectData: we,
443
- getPLPSynteticMetaData: Ne,
444
- SearchPageContent: ke,
445
- HelpButtonContent: Te,
446
- LPCadastroContent: qe,
447
- LPLojasContent: Oe
448
- }, gr = { Components: De }, h = async (t, e = {}) => {
449
- const { method: a = "GET", body: r, headers: s = {}, priority: o = "auto", cache: i = "default" } = e;
450
- return fetch(t, {
451
- method: a,
459
+ return /* @__PURE__ */ N(e, { data: r });
460
+ }, sr = {
461
+ CommonPageContent: Gt,
462
+ CartContent: Bt,
463
+ FlagsAndTagsContent: Vt,
464
+ HeaderContent: Qt,
465
+ TipbarContent: or,
466
+ FooterContent: Wt,
467
+ PLPContent: tr,
468
+ PDPContent: Yt,
469
+ getRedirectData: rr,
470
+ getPLPSynteticMetaData: nr,
471
+ SearchPageContent: ir,
472
+ HelpButtonContent: Kt,
473
+ LPCadastroContent: Jt,
474
+ LPLojasContent: Zt,
475
+ PolicyPageContent: ar
476
+ }, la = { Components: sr }, O = async (e, t = {}) => {
477
+ const { method: r = "GET", body: n, headers: a = {}, priority: o = "auto", cache: l = "default" } = t;
478
+ return fetch(e, {
479
+ method: r,
452
480
  headers: {
453
- ...s,
481
+ ...a,
454
482
  Accept: "application/json",
455
483
  "Content-Type": "application/json"
456
484
  },
457
485
  priority: o,
458
- cache: i,
459
- ...r ? { body: JSON.stringify(r) } : {}
486
+ cache: l,
487
+ ...n ? { body: JSON.stringify(n) } : {}
460
488
  // not body in get
461
- }).then((u) => u.json()).catch((u) => {
462
- console.error("[ERROR FETCH VTEX]", u);
489
+ }).then((i) => i.json()).catch((i) => {
490
+ console.error("[ERROR FETCH VTEX]", i);
463
491
  });
464
- }, w = /* @__PURE__ */ new Map();
465
- async function _e(t, e = {}) {
466
- var a;
492
+ }, X = /* @__PURE__ */ new Map();
493
+ async function lr(e, t = {}) {
494
+ var r;
467
495
  try {
468
- const { abort: r = !1 } = e, s = new AbortController();
469
- r && (w.has(t) && ((a = w.get(t)) == null || a.abort(), w.delete(t)), w.set(t, s));
470
- const o = h(t, {
471
- ...e,
472
- ...r ? { signal: s.signal } : {}
496
+ const { abort: n = !1 } = t, a = new AbortController();
497
+ n && (X.has(e) && ((r = X.get(e)) == null || r.abort(), X.delete(e)), X.set(e, a));
498
+ const o = O(e, {
499
+ ...t,
500
+ ...n ? { signal: a.signal } : {}
473
501
  });
474
- return r && w.delete(t), o;
475
- } catch (r) {
476
- if (r.name === "AbortError") {
477
- console.log(`[REQUEST CANCELLED]: ${t}`);
502
+ return n && X.delete(e), o;
503
+ } catch (n) {
504
+ if (n.name === "AbortError") {
505
+ console.log(`[REQUEST CANCELLED]: ${e}`);
478
506
  return;
479
507
  }
480
- throw console.error(`[ERROR API]: ${r.message}`), r;
508
+ throw console.error(`[ERROR API]: ${n.message}`), n;
481
509
  }
482
510
  }
483
- const He = n.object({
484
- country: n.string().length(3, "Country code must be 3 characters long").required("Country is required"),
485
- postalCode: n.string().nullable()
511
+ const cr = c.object({
512
+ country: c.string().length(3, "Country code must be 3 characters long").required("Country is required"),
513
+ postalCode: c.string().nullable()
486
514
  });
487
- async function Be({ apiUrl: t, body: e, fetchOptions: a }) {
488
- if (!e) {
515
+ async function ur({ apiUrl: e, body: t, fetchOptions: r }) {
516
+ if (!t) {
489
517
  console.error("[ERROR FETCHING] Body is required");
490
518
  return;
491
519
  }
492
- await He.validate(e);
493
- const { country: r, postalCode: s } = e;
494
- return await h(
495
- `${t}/api/checkout/pub/postal-code/${r}/${s}`,
520
+ await cr.validate(t);
521
+ const { country: n, postalCode: a } = t;
522
+ return await O(
523
+ `${e}/api/checkout/pub/postal-code/${n}/${a}`,
496
524
  {
497
525
  method: "POST",
498
- body: e,
499
- ...a
526
+ body: t,
527
+ ...r
500
528
  }
501
529
  );
502
530
  }
503
- const Le = n.object({
504
- orderFormId: n.string().nullable(),
505
- sellerCode: n.string().nullable(),
506
- sellerName: n.string().nullable()
531
+ const dr = c.object({
532
+ orderFormId: c.string().nullable(),
533
+ sellerCode: c.string().nullable(),
534
+ sellerName: c.string().nullable()
507
535
  });
508
- async function z({
509
- apiUrl: t,
510
- body: e,
511
- fetchOptions: a
536
+ async function Ge({
537
+ apiUrl: e,
538
+ body: t,
539
+ fetchOptions: r
512
540
  }) {
513
- if (!e) {
541
+ if (!t) {
514
542
  console.error("[ERROR FETCHING] Body is required");
515
543
  return;
516
544
  }
517
- await Le.validate(e);
518
- const { orderFormId: r, sellerCode: s, sellerName: o } = e, i = s ? `${s.trim()} - ${o}` : null;
519
- return h(
520
- `${t}/api/checkout/pub/orderForm/${r}/attachments/openTextField`,
545
+ await dr.validate(t);
546
+ const { orderFormId: n, sellerCode: a, sellerName: o } = t, l = a ? `${a.trim()} - ${o}` : null;
547
+ return O(
548
+ `${e}/api/checkout/pub/orderForm/${n}/attachments/openTextField`,
521
549
  {
522
550
  method: "POST",
523
551
  body: {
524
- value: i
552
+ value: l
525
553
  },
526
- ...a
554
+ ...r
527
555
  }
528
556
  );
529
557
  }
530
- const Ge = n.object({
531
- orderFormId: n.string().nullable(),
532
- sellerCode: n.string().nullable(),
533
- marketingData: n.object()
558
+ const pr = c.object({
559
+ orderFormId: c.string().nullable(),
560
+ sellerCode: c.string().nullable(),
561
+ marketingData: c.object()
534
562
  });
535
- async function Q({
536
- apiUrl: t,
537
- body: e,
538
- extraData: a = {},
539
- fetchOptions: r
563
+ async function Ve({
564
+ apiUrl: e,
565
+ body: t,
566
+ extraData: r = {},
567
+ fetchOptions: n
540
568
  }) {
541
- if (!e) {
569
+ if (!t) {
542
570
  console.error("[ERROR FETCHING] Body is required");
543
571
  return;
544
572
  }
545
- await Ge.validate(e);
546
- const { orderFormId: s, sellerCode: o, marketingData: i } = e, u = o ? {
573
+ await pr.validate(t);
574
+ const { orderFormId: a, sellerCode: o, marketingData: l } = t, i = o ? {
547
575
  utmCampaign: o ? o.toUpperCase() : "",
548
- utmiCampaign: o ? `${a.VENDOR_CODE}` : "semcodigo"
576
+ utmiCampaign: o ? `${r.VENDOR_CODE}` : "semcodigo"
549
577
  } : {};
550
- return h(
551
- `${t}/api/checkout/pub/orderForm/${s}/attachments/marketingData`,
578
+ return O(
579
+ `${e}/api/checkout/pub/orderForm/${a}/attachments/marketingData`,
552
580
  {
553
581
  method: "POST",
554
582
  body: {
555
- ...i,
556
- ...u
583
+ ...l,
584
+ ...i
557
585
  },
558
- ...r
586
+ ...n
559
587
  }
560
588
  );
561
589
  }
562
- const Me = n.object({
563
- orderFormId: n.string().nullable(),
564
- sellerCode: n.string().nullable(),
565
- sellerName: n.string().nullable()
590
+ const mr = c.object({
591
+ orderFormId: c.string().nullable(),
592
+ sellerCode: c.string().nullable(),
593
+ sellerName: c.string().nullable()
566
594
  });
567
- async function Ue({ apiUrl: t, body: e, fetchOptions: a, extraData: r }) {
568
- if (!e) {
595
+ async function hr({ apiUrl: e, body: t, fetchOptions: r, extraData: n }) {
596
+ if (!t) {
569
597
  console.error("[ERROR FETCHING] Body is required");
570
598
  return;
571
599
  }
572
- await Me.validate(e);
573
- const s = await z({ apiUrl: t, body: e, fetchOptions: a });
574
- return Q({
575
- apiUrl: t,
600
+ await mr.validate(t);
601
+ const a = await Ge({ apiUrl: e, body: t, fetchOptions: r });
602
+ return Ve({
603
+ apiUrl: e,
576
604
  body: {
577
- ...e,
578
- marketingData: s == null ? void 0 : s.marketingData
605
+ ...t,
606
+ marketingData: a == null ? void 0 : a.marketingData
579
607
  },
580
- extraData: r,
581
- fetchOptions: a
608
+ extraData: n,
609
+ fetchOptions: r
582
610
  });
583
611
  }
584
- const Ve = n.object({
585
- orderFormId: n.string().nullable(),
586
- coupon: n.string().nullable()
612
+ const fr = c.object({
613
+ orderFormId: c.string().nullable(),
614
+ coupon: c.string().nullable()
587
615
  });
588
- async function xe({
589
- apiUrl: t,
590
- body: e,
591
- fetchOptions: a
616
+ async function gr({
617
+ apiUrl: e,
618
+ body: t,
619
+ fetchOptions: r
592
620
  }) {
593
- if (!e) {
621
+ if (!t) {
594
622
  console.error("[ERROR FETCHING] Body is required");
595
623
  return;
596
624
  }
597
- await Ve.validate(e);
598
- const { coupon: r = "", orderFormId: s } = e;
599
- return h(
600
- `${t}/api/checkout/pub/orderForm/${s}/coupons`,
625
+ await fr.validate(t);
626
+ const { coupon: n = "", orderFormId: a } = t;
627
+ return O(
628
+ `${e}/api/checkout/pub/orderForm/${a}/coupons`,
601
629
  {
602
630
  method: "POST",
603
- body: { text: r },
604
- ...a
631
+ body: { text: n },
632
+ ...r
605
633
  }
606
634
  );
607
635
  }
608
- const ze = n.object({
609
- appId: n.string().required("App ID is required"),
610
- orderFormId: n.string().nullable(),
611
- key: n.array().of(n.string())
636
+ const br = c.object({
637
+ appId: c.string().required("App ID is required"),
638
+ orderFormId: c.string().nullable(),
639
+ key: c.array().of(c.string())
612
640
  });
613
- async function Qe({
614
- apiUrl: t,
615
- body: e,
616
- fetchOptions: a
641
+ async function wr({
642
+ apiUrl: e,
643
+ body: t,
644
+ fetchOptions: r
617
645
  }) {
618
- if (!e) {
646
+ if (!t) {
619
647
  console.error("[ERROR FETCHING] Body is required");
620
648
  return;
621
649
  }
622
- await ze.validate(e);
623
- const { appId: r = "faststore", orderFormId: s, key: o } = e;
624
- return h(
625
- `${t}/api/checkout/pub/orderForm/${s}/customData/${r}/${o}`,
650
+ await br.validate(t);
651
+ const { appId: n = "faststore", orderFormId: a, key: o } = t;
652
+ return O(
653
+ `${e}/api/checkout/pub/orderForm/${a}/customData/${n}/${o}`,
626
654
  {
627
655
  method: "PUT",
628
- ...a
656
+ ...r
629
657
  }
630
658
  );
631
659
  }
632
- const Ke = n.object().shape({
633
- name: n.string().required("Attachment name is required"),
634
- content: n.object().nullable()
660
+ const vr = c.object().shape({
661
+ name: c.string().required("Attachment name is required"),
662
+ content: c.object().nullable()
635
663
  });
636
- var V;
637
- const Je = n.object().shape({
638
- attachments: (V = n.array().of(Ke)) == null ? void 0 : V.nullable(),
639
- id: n.string().required("ID of SKU is required"),
640
- index: n.number().integer().nullable(),
641
- quantity: n.number().integer().nullable(),
642
- seller: n.string().required("Seller is required"),
643
- price: n.number().integer()
644
- }), We = n.object({
645
- orderFormId: n.string().required("OrderFormId is required"),
646
- orderItems: n.array().of(Je)
664
+ var Me;
665
+ const yr = c.object().shape({
666
+ attachments: (Me = c.array().of(vr)) == null ? void 0 : Me.nullable(),
667
+ id: c.string().required("ID of SKU is required"),
668
+ index: c.number().integer().nullable(),
669
+ quantity: c.number().integer().nullable(),
670
+ seller: c.string().required("Seller is required"),
671
+ price: c.number().integer()
672
+ }), _r = c.object({
673
+ orderFormId: c.string().required("OrderFormId is required"),
674
+ orderItems: c.array().of(yr)
647
675
  });
648
- async function Xe({
649
- apiUrl: t,
650
- body: e,
651
- fetchOptions: a
676
+ async function Rr({
677
+ apiUrl: e,
678
+ body: t,
679
+ fetchOptions: r
652
680
  }) {
653
- if (!e) {
681
+ if (!t) {
654
682
  console.error("[ERROR FETCHING] Body is required");
655
683
  return;
656
684
  }
657
- await We.validate(e);
658
- const { orderFormId: r, orderItems: s } = e;
659
- return h(
660
- `${t}/api/checkout/pub/orderForm/${r}/items`,
685
+ await _r.validate(t);
686
+ const { orderFormId: n, orderItems: a } = t;
687
+ return O(
688
+ `${e}/api/checkout/pub/orderForm/${n}/items`,
661
689
  {
662
690
  method: "POST",
663
- body: { orderItems: s },
664
- ...a
691
+ body: { orderItems: a },
692
+ ...r
665
693
  }
666
694
  );
667
695
  }
668
- const Ye = n.object({
669
- orderFormId: n.string().nullable()
696
+ const Ir = c.object({
697
+ orderFormId: c.string().nullable()
670
698
  });
671
- async function Ze({
672
- apiUrl: t,
673
- body: e,
674
- fetchOptions: a
699
+ async function Pr({
700
+ apiUrl: e,
701
+ body: t,
702
+ fetchOptions: r
675
703
  }) {
676
- if (!e) {
704
+ if (!t) {
677
705
  console.error("[ERROR FETCHING] Body is required");
678
706
  return;
679
707
  }
680
- await Ye.validate(e);
681
- const { orderFormId: r } = e;
682
- return h(
683
- `${t}/api/checkout/pub/orderForm/${r}/items/removeAll`,
708
+ await Ir.validate(t);
709
+ const { orderFormId: n } = t;
710
+ return O(
711
+ `${e}/api/checkout/pub/orderForm/${n}/items/removeAll`,
684
712
  {
685
713
  method: "POST",
686
- ...a
714
+ ...r
687
715
  }
688
716
  );
689
717
  }
690
- const et = n.object().shape({
691
- name: n.string().required("Attachment name is required"),
692
- content: n.object().nullable()
718
+ const xr = c.object().shape({
719
+ name: c.string().required("Attachment name is required"),
720
+ content: c.object().nullable()
693
721
  });
694
- var x;
695
- const tt = n.object().shape({
696
- attachments: (x = n.array().of(et)) == null ? void 0 : x.nullable(),
697
- id: n.string().required("ID of SKU is required"),
698
- index: n.number().integer().nullable(),
699
- quantity: n.number().integer().nullable(),
700
- seller: n.string().required("Seller is required"),
701
- price: n.number().integer()
702
- }), rt = n.object({
703
- orderFormId: n.string().nullable(),
704
- orderItems: n.array().of(tt)
722
+ var Be;
723
+ const Sr = c.object().shape({
724
+ attachments: (Be = c.array().of(xr)) == null ? void 0 : Be.nullable(),
725
+ id: c.string().required("ID of SKU is required"),
726
+ index: c.number().integer().nullable(),
727
+ quantity: c.number().integer().nullable(),
728
+ seller: c.string().required("Seller is required"),
729
+ price: c.number().integer()
730
+ }), Cr = c.object({
731
+ orderFormId: c.string().nullable(),
732
+ orderItems: c.array().of(Sr)
705
733
  });
706
- async function at({
707
- apiUrl: t,
708
- body: e,
709
- fetchOptions: a
734
+ async function kr({
735
+ apiUrl: e,
736
+ body: t,
737
+ fetchOptions: r
710
738
  }) {
711
- if (!e) {
739
+ if (!t) {
712
740
  console.error("[ERROR FETCHING] Body is required");
713
741
  return;
714
742
  }
715
- await rt.validate(e);
716
- const { orderFormId: r, orderItems: s } = e;
717
- return h(
718
- `${t}/api/checkout/pub/orderForm/${r}/items/update`,
743
+ await Cr.validate(t);
744
+ const { orderFormId: n, orderItems: a } = t;
745
+ return O(
746
+ `${e}/api/checkout/pub/orderForm/${n}/items/update`,
719
747
  {
720
748
  method: "POST",
721
- body: { orderItems: s },
722
- ...a
749
+ body: { orderItems: a },
750
+ ...r
723
751
  }
724
752
  );
725
753
  }
726
- const nt = n.object({
727
- orderFormId: n.string().nullable()
754
+ const Er = c.object({
755
+ orderFormId: c.string().nullable()
728
756
  });
729
- async function st({
730
- apiUrl: t,
731
- body: e,
732
- fetchOptions: a
757
+ async function Ar({
758
+ apiUrl: e,
759
+ body: t,
760
+ fetchOptions: r
733
761
  }) {
734
- if (!e) {
762
+ if (!t) {
735
763
  console.error("[ERROR FETCHING] Body is required");
736
764
  return;
737
765
  }
738
- await nt.validate(e);
739
- const { orderFormId: r } = e;
740
- return h(
741
- `${t}/api/checkout/pub/orderForm/${r}/messages/clear`,
766
+ await Er.validate(t);
767
+ const { orderFormId: n } = t;
768
+ return O(
769
+ `${e}/api/checkout/pub/orderForm/${n}/messages/clear`,
742
770
  {
743
771
  method: "POST",
744
- ...a
772
+ ...r
745
773
  }
746
774
  );
747
775
  }
748
- const ot = n.object({
749
- id: n.string().nullable(),
776
+ const Or = c.object({
777
+ id: c.string().nullable(),
750
778
  // id offering
751
- itemIndex: n.number().nullable(),
752
- orderFormId: n.string().nullable(),
753
- remove: n.boolean().nullable()
779
+ itemIndex: c.number().nullable(),
780
+ orderFormId: c.string().nullable(),
781
+ remove: c.boolean().nullable()
754
782
  });
755
- async function it({ apiUrl: t, body: e, fetchOptions: a }) {
756
- if (!e) {
783
+ async function Tr({ apiUrl: e, body: t, fetchOptions: r }) {
784
+ if (!t) {
757
785
  console.error("[ERROR FETCHING] Body is required");
758
786
  return;
759
787
  }
760
- await ot.validate(e);
761
- const { itemIndex: r, orderFormId: s, id: o, remove: i } = e, u = i ? `/${o}/remove` : "", c = `${t}/api/checkout/pub/orderForm/${s}/items/${r}/offerings${u}`;
762
- return h(c, {
788
+ await Or.validate(t);
789
+ const { itemIndex: n, orderFormId: a, id: o, remove: l } = t, i = l ? `/${o}/remove` : "", d = `${e}/api/checkout/pub/orderForm/${a}/items/${n}/offerings${i}`;
790
+ return O(d, {
763
791
  method: "POST",
764
792
  body: { id: o },
765
- ...a
793
+ ...r
766
794
  });
767
795
  }
768
- const ct = n.object({
769
- orderFormId: n.string().nullable()
796
+ const qr = c.object({
797
+ orderFormId: c.string().nullable()
770
798
  });
771
- async function lt({
772
- apiUrl: t,
773
- body: e,
774
- fetchOptions: a,
775
- extraData: r
799
+ async function Nr({
800
+ apiUrl: e,
801
+ body: t,
802
+ fetchOptions: r,
803
+ extraData: n
776
804
  }) {
777
- var i;
778
- if (!e) {
805
+ var l;
806
+ if (!t) {
779
807
  console.error("[ERROR FETCHING] Body is required");
780
808
  return;
781
809
  }
782
- await ct.validate(e);
783
- const s = new URLSearchParams({
810
+ await qr.validate(t);
811
+ const a = new URLSearchParams({
784
812
  refreshOutdatedData: "true"
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", ...a });
813
+ }), o = t.orderFormId && ((l = n.orderFormPurchaseId) == null ? void 0 : l.value) !== t.orderFormId ? `${e}/api/checkout/pub/orderForm/${t.orderFormId}?${String(a)}` : `${e}/api/checkout/pub/orderForm`;
814
+ return O(o, { method: "GET", ...r });
787
815
  }
788
- const ut = n.object({
789
- orderFormId: n.string().nullable(),
790
- email: n.string().email().required(),
791
- firstName: n.string().required(),
792
- lastName: n.string().required(),
793
- documentType: n.string().required(),
794
- document: n.string().required(),
795
- phone: n.string().matches(/^\+\d{1,3}\d{10,11}$/)
816
+ const jr = c.object({
817
+ orderFormId: c.string().nullable(),
818
+ email: c.string().email().required(),
819
+ firstName: c.string().required(),
820
+ lastName: c.string().required(),
821
+ documentType: c.string().required(),
822
+ document: c.string().required(),
823
+ phone: c.string().matches(/^\+\d{1,3}\d{10,11}$/)
796
824
  });
797
- async function dt({
798
- apiUrl: t,
799
- body: e,
800
- fetchOptions: a
825
+ async function Fr({
826
+ apiUrl: e,
827
+ body: t,
828
+ fetchOptions: r
801
829
  }) {
802
- if (!e) {
830
+ if (!t) {
803
831
  console.error("[ERROR FETCHING] Body is required");
804
832
  return;
805
833
  }
806
- await ut.validate(e);
807
- const { orderFormId: r, ...s } = e;
808
- return h(
809
- `${t}/api/checkout/pub/orderForm/${r}/attachments/clientProfileData`,
834
+ await jr.validate(t);
835
+ const { orderFormId: n, ...a } = t;
836
+ return O(
837
+ `${e}/api/checkout/pub/orderForm/${n}/attachments/clientProfileData`,
810
838
  {
811
839
  method: "POST",
812
- body: { ...s },
813
- ...a
840
+ body: { ...a },
841
+ ...r
814
842
  }
815
843
  );
816
844
  }
817
- const mt = n.object({
818
- sellerCode: n.string().nullable()
845
+ const $r = c.object({
846
+ sellerCode: c.string().nullable()
819
847
  });
820
- async function pt({
821
- apiUrl: t,
822
- body: e,
823
- extraData: a,
824
- fetchOptions: r
848
+ async function Lr({
849
+ apiUrl: e,
850
+ body: t,
851
+ extraData: r,
852
+ fetchOptions: n
825
853
  }) {
826
- if (!e) {
854
+ if (!t) {
827
855
  console.error("[ERROR FETCHING] Body is required");
828
856
  return;
829
857
  }
830
- await mt.validate(e);
831
- const { sellerCode: s = "" } = e;
832
- return h(
833
- `${t}/api/dataentities/${a.ENTITIES}/search?_fields=${a.FIELDS}&${a.FILTER}=${s}`,
858
+ await $r.validate(t);
859
+ const { sellerCode: a = "" } = t;
860
+ return O(
861
+ `${e}/api/dataentities/${r.ENTITIES}/search?_fields=${r.FIELDS}&${r.FILTER}=${a}`,
834
862
  {
835
863
  method: "GET",
836
864
  headers: {
837
865
  Accept: "application/vnd.vtex.ds.v10+json"
838
866
  },
839
- ...r
867
+ ...n
840
868
  }
841
869
  );
842
870
  }
843
- const ft = n.object().shape({
844
- country: n.string().length(3, "Country code must be 3 characters long").required("Country is required"),
845
- orderFormId: n.string().nullable(),
846
- postalCode: n.string().nullable()
871
+ const Dr = c.object().shape({
872
+ country: c.string().length(3, "Country code must be 3 characters long").required("Country is required"),
873
+ orderFormId: c.string().nullable(),
874
+ postalCode: c.string().nullable()
847
875
  });
848
- async function gt({
849
- apiUrl: t,
850
- body: e,
851
- fetchOptions: a
876
+ async function Ur({
877
+ apiUrl: e,
878
+ body: t,
879
+ fetchOptions: r
852
880
  }) {
853
- if (!e) {
881
+ if (!t) {
854
882
  console.error("[ERROR FETCHING] Body is required");
855
883
  return;
856
884
  }
857
- await ft.validate(e);
858
- const { country: r, orderFormId: s, postalCode: o } = e, i = o ? {
885
+ await Dr.validate(t);
886
+ const { country: n, orderFormId: a, postalCode: o } = t, l = o ? {
859
887
  address: {
860
888
  addressType: "residential",
861
889
  postalCode: o,
862
- country: r
890
+ country: n
863
891
  }
864
892
  } : {
865
893
  logisticsInfo: [],
866
894
  clearAddressIfPostalCodeNotFound: !0
867
895
  };
868
- return h(
869
- `${t}/api/checkout/pub/orderForm/${s}/attachments/shippingData`,
896
+ return O(
897
+ `${e}/api/checkout/pub/orderForm/${a}/attachments/shippingData`,
870
898
  {
871
899
  method: "POST",
872
- body: i,
873
- ...a
900
+ body: l,
901
+ ...r
874
902
  }
875
903
  );
876
904
  }
877
- const ht = n.object().shape({
878
- orderFormId: n.string().nullable(),
879
- options: n.array().of(
880
- n.object().shape({
881
- itemIndex: n.number(),
882
- selectedDeliveryChannel: n.string(),
883
- selectedSla: n.string()
905
+ const Hr = c.object().shape({
906
+ orderFormId: c.string().nullable(),
907
+ options: c.array().of(
908
+ c.object().shape({
909
+ itemIndex: c.number(),
910
+ selectedDeliveryChannel: c.string(),
911
+ selectedSla: c.string()
884
912
  })
885
913
  ),
886
- selectedAddresses: n.array().of(
887
- n.object().shape({
888
- addressId: n.string().required(),
889
- addressType: n.string().required(),
890
- city: n.string().nullable(),
891
- complement: n.string().nullable(),
892
- country: n.string().required().length(3),
893
- geoCoordinates: n.array().of(n.number()).required().min(0),
894
- isDisposable: n.boolean().required(),
895
- neighborhood: n.string().nullable(),
896
- number: n.string().nullable(),
897
- postalCode: n.string().required(),
898
- receiverName: n.string().nullable(),
899
- reference: n.string().nullable(),
900
- state: n.string().nullable(),
901
- street: n.string().nullable()
914
+ selectedAddresses: c.array().of(
915
+ c.object().shape({
916
+ addressId: c.string().required(),
917
+ addressType: c.string().required(),
918
+ city: c.string().nullable(),
919
+ complement: c.string().nullable(),
920
+ country: c.string().required().length(3),
921
+ geoCoordinates: c.array().of(c.number()).required().min(0),
922
+ isDisposable: c.boolean().required(),
923
+ neighborhood: c.string().nullable(),
924
+ number: c.string().nullable(),
925
+ postalCode: c.string().required(),
926
+ receiverName: c.string().nullable(),
927
+ reference: c.string().nullable(),
928
+ state: c.string().nullable(),
929
+ street: c.string().nullable()
902
930
  })
903
931
  )
904
932
  });
905
- async function yt({ apiUrl: t, body: e, fetchOptions: a }) {
906
- if (!e) {
933
+ async function Mr({ apiUrl: e, body: t, fetchOptions: r }) {
934
+ if (!t) {
907
935
  console.error("[ERROR FETCHING] Body is required");
908
936
  return;
909
937
  }
910
- await ht.validate(e);
911
- const { orderFormId: r, options: s, selectedAddresses: o } = e;
912
- return h(
913
- `${t}/api/checkout/pub/orderForm/${r}/attachments/shippingData`,
938
+ await Hr.validate(t);
939
+ const { orderFormId: n, options: a, selectedAddresses: o } = t;
940
+ return O(
941
+ `${e}/api/checkout/pub/orderForm/${n}/attachments/shippingData`,
914
942
  {
915
943
  method: "POST",
916
944
  body: {
917
945
  selectedAddresses: o,
918
946
  clearAddressIfPostalCodeNotFound: !1,
919
- logisticsInfo: s
947
+ logisticsInfo: a
920
948
  },
921
- ...a
949
+ ...r
922
950
  }
923
951
  );
924
952
  }
925
- const bt = n.object({
926
- country: n.string().length(3, "Country code must be 3 characters long").required("Country is required"),
927
- postalCode: n.string().nullable(),
928
- geoCoordinates: n.object().shape({
929
- longitude: n.number().required(),
930
- latitude: n.number().required()
953
+ const Br = c.object({
954
+ country: c.string().length(3, "Country code must be 3 characters long").required("Country is required"),
955
+ postalCode: c.string().nullable(),
956
+ geoCoordinates: c.object().shape({
957
+ longitude: c.number().required(),
958
+ latitude: c.number().required()
931
959
  })
932
960
  });
933
- async function It({ apiUrl: t, body: e, fetchOptions: a }) {
934
- if (!e) {
961
+ async function zr({ apiUrl: e, body: t, fetchOptions: r }) {
962
+ if (!t) {
935
963
  console.error("[ERROR FETCHING] Body is required");
936
964
  return;
937
965
  }
938
- await bt.validate(e);
939
- const { country: r = "", geoCoordinates: s, postalCode: o = "" } = e, i = new URLSearchParams({ country: String(r) });
940
- return o ? i.append("postalCode", o) : i.append(
966
+ await Br.validate(t);
967
+ const { country: n = "", geoCoordinates: a, postalCode: o = "" } = t, l = new URLSearchParams({ country: String(n) });
968
+ return o ? l.append("postalCode", o) : l.append(
941
969
  "geoCoordinates",
942
- `${s == null ? void 0 : s.longitude};${s == null ? void 0 : s.latitude}`
943
- ), await h(
944
- `${t}/api/checkout/pub/regions/?${i.toString()}`,
970
+ `${a == null ? void 0 : a.longitude};${a == null ? void 0 : a.latitude}`
971
+ ), await O(
972
+ `${e}/api/checkout/pub/regions/?${l.toString()}`,
945
973
  {
946
974
  method: "GET",
947
- ...a
975
+ ...r
948
976
  }
949
977
  );
950
978
  }
951
- const Rt = n.object({
952
- id: n.string().required("ID of SKU is required"),
953
- quantity: n.number().integer().required("Quantity of item is required"),
954
- seller: n.string()
955
- }), Ct = n.object({
956
- items: n.array().of(Rt),
957
- country: n.string().length(3, "Country code must be 3 characters long").required("Country is required"),
958
- postalCode: n.string().nullable(),
959
- geoCoordinates: n.array().nullable().of(n.number()).length(2)
979
+ const Gr = c.object({
980
+ id: c.string().required("ID of SKU is required"),
981
+ quantity: c.number().integer().required("Quantity of item is required"),
982
+ seller: c.string()
983
+ }), Vr = c.object({
984
+ items: c.array().of(Gr),
985
+ country: c.string().length(3, "Country code must be 3 characters long").required("Country is required"),
986
+ postalCode: c.string().nullable(),
987
+ geoCoordinates: c.array().nullable().of(c.number()).length(2)
960
988
  });
961
- async function vt({ apiUrl: t, body: e, fetchOptions: a }) {
962
- if (!e) {
989
+ async function Wr({ apiUrl: e, body: t, fetchOptions: r }) {
990
+ if (!t) {
963
991
  console.error("[ERROR FETCHING] Body is required");
964
992
  return;
965
993
  }
966
- return await Ct.validate(e), h(
967
- `${t}/api/checkout/pub/orderForms/simulation`,
994
+ return await Vr.validate(t), O(
995
+ `${e}/api/checkout/pub/orderForms/simulation`,
968
996
  {
969
997
  method: "POST",
970
- body: e,
971
- ...a
998
+ body: t,
999
+ ...r
972
1000
  }
973
1001
  );
974
1002
  }
975
- const St = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1003
+ const Qr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
976
1004
  __proto__: null,
977
- getMasterDataSellerCode: pt,
978
- getOrderForm: lt,
979
- postOrderFormAddCoupon: xe,
980
- postOrderFormAttachClientProfileData: dt,
981
- postOrderFormAttachOrderFormData: Ue,
982
- postOrderFormAttachShippingData: gt,
983
- postOrderFormAttachmentsMarketingData: Q,
984
- postOrderFormAttachmentsOpenTextField: z,
985
- postOrderFormClearMessages: st,
986
- postOrderFormFreightSimulation: vt,
987
- postOrderFormItems: Xe,
988
- postOrderFormRegion: It,
989
- postOrderFormRemoveAllItems: Ze,
990
- postOrderFormUpdateItems: at,
991
- postOrderFormUpdateShippingData: yt,
992
- postOrderformAddress: Be,
993
- putOrderFormCustomData: Qe,
994
- updateOrderFormOffering: it
995
- }, Symbol.toStringTag, { value: "Module" })), Et = n.object({
996
- skuId: n.string()
1005
+ getMasterDataSellerCode: Lr,
1006
+ getOrderForm: Nr,
1007
+ postOrderFormAddCoupon: gr,
1008
+ postOrderFormAttachClientProfileData: Fr,
1009
+ postOrderFormAttachOrderFormData: hr,
1010
+ postOrderFormAttachShippingData: Ur,
1011
+ postOrderFormAttachmentsMarketingData: Ve,
1012
+ postOrderFormAttachmentsOpenTextField: Ge,
1013
+ postOrderFormClearMessages: Ar,
1014
+ postOrderFormFreightSimulation: Wr,
1015
+ postOrderFormItems: Rr,
1016
+ postOrderFormRegion: zr,
1017
+ postOrderFormRemoveAllItems: Pr,
1018
+ postOrderFormUpdateItems: kr,
1019
+ postOrderFormUpdateShippingData: Mr,
1020
+ postOrderformAddress: ur,
1021
+ putOrderFormCustomData: wr,
1022
+ updateOrderFormOffering: Tr
1023
+ }, Symbol.toStringTag, { value: "Module" })), Xr = c.object({
1024
+ skuId: c.string()
997
1025
  });
998
- async function Ft({ apiUrl: t, body: e, fetchOptions: a }) {
999
- if (!e) {
1026
+ async function Kr({ apiUrl: e, body: t, fetchOptions: r }) {
1027
+ if (!t) {
1000
1028
  console.error("[ERROR FETCHING] Body is required");
1001
1029
  return;
1002
1030
  }
1003
- await Et.validate(e);
1004
- const { skuId: r } = e;
1005
- return h(
1006
- `${t}/api/catalog/pvt/stockkeepingunitkit?parentSkuId=${r}`,
1031
+ await Xr.validate(t);
1032
+ const { skuId: n } = t;
1033
+ return O(
1034
+ `${e}/api/catalog/pvt/stockkeepingunitkit?parentSkuId=${n}`,
1007
1035
  {
1008
- ...a
1036
+ ...r
1009
1037
  }
1010
1038
  );
1011
1039
  }
1012
- const Tt = n.object({
1013
- ids: n.array().of(n.string().required("ID are required")).required("IDs are required")
1040
+ const Jr = c.object({
1041
+ ids: c.array().of(c.string().required("ID are required")).required("IDs are required")
1014
1042
  });
1015
- async function qt({ apiUrl: t, body: e, fetchOptions: a }) {
1016
- if (!e) {
1043
+ async function Zr({ apiUrl: e, body: t, fetchOptions: r }) {
1044
+ if (!t) {
1017
1045
  console.error("[ERROR FETCHING] Body is required");
1018
1046
  return;
1019
1047
  }
1020
- await Tt.validate(e);
1021
- const { ids: r } = e;
1022
- return h(
1023
- `${t}/api/catalog_system/pub/products/search?fq=${r.map((s) => `productId:${s}`).join("&fq=")}`,
1048
+ await Jr.validate(t);
1049
+ const { ids: n } = t;
1050
+ return O(
1051
+ `${e}/api/catalog_system/pub/products/search?fq=${n.map((a) => `productId:${a}`).join("&fq=")}`,
1024
1052
  {
1025
- ...a
1053
+ ...r
1026
1054
  }
1027
1055
  );
1028
1056
  }
1029
- const Ot = n.object({
1030
- productId: n.number().required("Product ID is required")
1057
+ const Yr = c.object({
1058
+ productId: c.number().required("Product ID is required")
1031
1059
  });
1032
- async function $t({ apiUrl: t, body: e, fetchOptions: a }) {
1033
- if (!e) {
1060
+ async function en({ apiUrl: e, body: t, fetchOptions: r }) {
1061
+ if (!t) {
1034
1062
  console.error("[ERROR FETCHING] Body is required");
1035
1063
  return;
1036
1064
  }
1037
- await Ot.validate(e);
1038
- const { productId: r } = e;
1039
- return h(
1040
- `${t}/api/catalog_system/pub/products/crossselling/similars/${r.toString()}`,
1065
+ await Yr.validate(t);
1066
+ const { productId: n } = t;
1067
+ return O(
1068
+ `${e}/api/catalog_system/pub/products/crossselling/similars/${n.toString()}`,
1041
1069
  {
1042
- ...a
1070
+ ...r
1043
1071
  }
1044
1072
  );
1045
1073
  }
1046
- const Pt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1074
+ const tn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1047
1075
  __proto__: null,
1048
- getCatalogKitProducts: Ft,
1049
- getCatalogProducts: qt,
1050
- getCatalogSimilars: $t
1051
- }, Symbol.toStringTag, { value: "Module" })), At = n.object({
1052
- query: n.string()
1076
+ getCatalogKitProducts: Kr,
1077
+ getCatalogProducts: Zr,
1078
+ getCatalogSimilars: en
1079
+ }, Symbol.toStringTag, { value: "Module" })), rn = c.object({
1080
+ query: c.string()
1053
1081
  });
1054
- async function wt({
1055
- apiUrl: t,
1056
- body: e,
1057
- fetchOptions: a
1082
+ async function nn({
1083
+ apiUrl: e,
1084
+ body: t,
1085
+ fetchOptions: r
1058
1086
  }) {
1059
- if (!e) {
1087
+ if (!t) {
1060
1088
  console.error("[ERROR FETCHING] Body is required");
1061
1089
  return;
1062
1090
  }
1063
- await At.validate(e);
1064
- const { query: r = "" } = e, s = new URLSearchParams({ query: r });
1065
- return h(
1066
- `${t}/api/io/_v/api/intelligent-search/autocomplete_suggestions?${s.toString()}`,
1091
+ await rn.validate(t);
1092
+ const { query: n = "" } = t, a = new URLSearchParams({ query: n });
1093
+ return O(
1094
+ `${e}/api/io/_v/api/intelligent-search/autocomplete_suggestions?${a.toString()}`,
1067
1095
  {
1068
- ...a
1096
+ ...r
1069
1097
  }
1070
1098
  );
1071
1099
  }
1072
- const Nt = (t, e) => be(t, e), kt = (t) => ({
1073
- ...t,
1074
- description: t.description ? Nt(t.description) : t.description
1075
- }), jt = ({
1076
- offer: t,
1077
- seller: e,
1078
- product: a
1100
+ const an = (e, t) => Ht(e, t), on = (e) => ({
1101
+ ...e,
1102
+ description: e.description ? an(e.description) : e.description
1103
+ }), sn = ({
1104
+ offer: e,
1105
+ seller: t,
1106
+ product: r
1079
1107
  }) => ({
1080
- ...t,
1081
- product: a,
1082
- seller: e
1083
- }), K = (t, e) => ({
1084
- ...t,
1085
- isVariantOf: kt(e)
1086
- }), Dt = (t) => t ? "https://schema.org/InStock" : "https://schema.org/OutOfStock", N = (t) => t.AvailableQuantity > 0, M = (t) => t.spotPrice ?? 0, _t = (t) => t.Price ?? 0, J = (t, e) => N(t) && !N(e) ? -1 : !N(t) && N(e) ? 1 : M(t) - M(e), Ht = (t, e) => {
1087
- let a = 0;
1088
- for (let r = 1; r < t.length; r++)
1089
- e(t[a], t[r]) > 0 && (a = r);
1090
- return t[a];
1091
- }, W = (t) => {
1092
- const e = t.flatMap(
1093
- (r) => r.sellers.map((s) => ({
1094
- offer: s.commertialOffer,
1095
- sku: r
1108
+ ...e,
1109
+ product: r,
1110
+ seller: t
1111
+ }), We = (e, t) => ({
1112
+ ...e,
1113
+ isVariantOf: on(t)
1114
+ }), ln = (e) => e ? "https://schema.org/InStock" : "https://schema.org/OutOfStock", oe = (e) => e.AvailableQuantity > 0, De = (e) => e.spotPrice ?? 0, cn = (e) => e.Price ?? 0, Qe = (e, t) => oe(e) && !oe(t) ? -1 : !oe(e) && oe(t) ? 1 : De(e) - De(t), un = (e, t) => {
1115
+ let r = 0;
1116
+ for (let n = 1; n < e.length; n++)
1117
+ t(e[r], e[n]) > 0 && (r = n);
1118
+ return e[r];
1119
+ }, Xe = (e) => {
1120
+ const t = e.flatMap(
1121
+ (n) => n.sellers.map((a) => ({
1122
+ offer: a.commertialOffer,
1123
+ sku: n
1096
1124
  }))
1097
- ), a = Ht(
1098
- e,
1099
- ({ offer: r }, { offer: s }) => J(r, s)
1125
+ ), r = un(
1126
+ t,
1127
+ ({ offer: n }, { offer: a }) => Qe(n, a)
1100
1128
  );
1101
- return a ? a.sku : t[0];
1102
- }, X = (t) => t.map(
1103
- ({ imageUrl: e, imageText: a, imageLabel: r }) => ({
1104
- alternateName: a ?? "",
1105
- url: e.replace("vteximg.com.br", "vtexassets.com"),
1106
- keywords: r
1129
+ return r ? r.sku : e[0];
1130
+ }, Ke = (e) => e.map(
1131
+ ({ imageUrl: t, imageText: r, imageLabel: n }) => ({
1132
+ alternateName: r ?? "",
1133
+ url: t.replace("vteximg.com.br", "vtexassets.com"),
1134
+ keywords: n
1107
1135
  })
1108
- ), _ = {
1136
+ ), ue = {
1109
1137
  attachment: "ATTACHMENT",
1110
1138
  specification: "SPECIFICATION",
1111
1139
  attribute: "ATTRIBUTE"
1112
- }, Bt = (t) => ({
1113
- name: t.name,
1114
- value: t.content,
1115
- valueReference: _.attachment
1116
- }), Lt = (t) => ({
1117
- propertyID: t.id,
1118
- name: t.name,
1119
- value: t.value,
1140
+ }, dn = (e) => ({
1141
+ name: e.name,
1142
+ value: e.content,
1143
+ valueReference: ue.attachment
1144
+ }), pn = (e) => ({
1145
+ propertyID: e.id,
1146
+ name: e.name,
1147
+ value: e.value,
1120
1148
  valueReference: {
1121
- valueReference: _.attribute,
1122
- visible: t.visible
1123
- }
1124
- }), H = (t, e, a) => {
1125
- const r = t.flatMap(({ name: i, values: u }) => u ? u.map((c) => ({
1126
- name: i,
1127
- value: c,
1128
- valueReference: _.specification
1149
+ valueReference: ue.attribute,
1150
+ visible: e.visible
1151
+ }
1152
+ }), de = (e, t, r) => {
1153
+ const n = e.flatMap(({ name: l, values: i }) => i ? i.map((d) => ({
1154
+ name: l,
1155
+ value: d,
1156
+ valueReference: ue.specification
1129
1157
  })) : {
1130
- name: i,
1158
+ name: l,
1131
1159
  value: "",
1132
- valueReference: _.specification
1133
- }), s = Array.isArray(a) ? a.map(Bt) : [], o = e ? e.map(Lt) : [];
1160
+ valueReference: ue.specification
1161
+ }), a = Array.isArray(r) ? r.map(dn) : [], o = t ? t.map(pn) : [];
1134
1162
  return [
1135
- ...r,
1136
- ...s,
1163
+ ...n,
1164
+ ...a,
1137
1165
  ...o
1138
1166
  ];
1139
- }, U = "ÁÄÂÀÃÅČÇĆĎÉĚËÈÊẼĔȆÍÌÎÏŇÑÓÖÒÔÕØŘŔŠŤÚŮÜÙÛÝŸŽáäâàãåčçćďéěëèêẽĕȇíìîïňñóöòôõøðřŕšťúůüùûýÿžþÞĐđ߯a", Gt = "AAAAAACCCDEEEEEEEEIIIINNOOOOOORRSTUUUUUYYZaaaaaacccdeeeeeeeeiiiinnooooooorrstuuuuuyyzbBDdBAa", Mt = (t) => {
1140
- let e = t.slice(0);
1141
- for (let a = 0; a < U.length; a++)
1142
- e = e.replace(
1143
- new RegExp(U.charAt(a), "g"),
1144
- Gt.charAt(a)
1167
+ }, Ue = "ÁÄÂÀÃÅČÇĆĎÉĚËÈÊẼĔȆÍÌÎÏŇÑÓÖÒÔÕØŘŔŠŤÚŮÜÙÛÝŸŽáäâàãåčçćďéěëèêẽĕȇíìîïňñóöòôõøðřŕšťúůüùûýÿžþÞĐđ߯a", mn = "AAAAAACCCDEEEEEEEEIIIINNOOOOOORRSTUUUUUYYZaaaaaacccdeeeeeeeeiiiinnooooooorrstuuuuuyyzbBDdBAa", hn = (e) => {
1168
+ let t = e.slice(0);
1169
+ for (let r = 0; r < Ue.length; r++)
1170
+ t = t.replace(
1171
+ new RegExp(Ue.charAt(r), "g"),
1172
+ mn.charAt(r)
1145
1173
  );
1146
- return e;
1147
- }, Ut = (t) => t.replace(/[·/_,:]/, "-"), Y = (t) => {
1148
- const a = t.replace(/,/g, "").replace(/[*+~.()'"!:@&\[\]`/ %$#?{}|><=_^]/g, "-");
1149
- return Ut(Mt(a)).toLowerCase();
1150
- }, Z = (t) => `/${t}/p`, ee = (t) => {
1151
- const e = Math.max(
1152
- ...t.map((r) => r.NumberOfInstallments)
1153
- ), a = t.find(
1154
- (r) => r.NumberOfInstallments === e
1174
+ return t;
1175
+ }, fn = (e) => e.replace(/[·/_,:]/, "-"), Je = (e) => {
1176
+ const r = e.replace(/,/g, "").replace(/[*+~.()'"!:@&\[\]`/ %$#?{}|><=_^]/g, "-");
1177
+ return fn(hn(r)).toLowerCase();
1178
+ }, Ze = (e) => `/${e}/p`, Ye = (e) => {
1179
+ const t = Math.max(
1180
+ ...e.map((n) => n.NumberOfInstallments)
1181
+ ), r = e.find(
1182
+ (n) => n.NumberOfInstallments === t
1155
1183
  );
1156
1184
  return {
1157
- count: (a == null ? void 0 : a.NumberOfInstallments) ?? 0,
1158
- value: (a == null ? void 0 : a.Value) ?? 0
1185
+ count: (r == null ? void 0 : r.NumberOfInstallments) ?? 0,
1186
+ value: (r == null ? void 0 : r.Value) ?? 0
1159
1187
  };
1160
- }, te = (t, e) => {
1161
- const a = {
1188
+ }, et = (e, t) => {
1189
+ const r = {
1162
1190
  price: 0,
1163
1191
  listPrice: 0,
1164
1192
  sellerDefault: !1
1165
- }, s = t.map(
1166
- (o) => jt({
1193
+ }, a = e.map(
1194
+ (o) => sn({
1167
1195
  offer: o.commertialOffer,
1168
1196
  seller: o,
1169
- product: e
1197
+ product: t
1170
1198
  })
1171
- ).sort(J).map((o) => (o.seller.sellerId === "1" && o.AvailableQuantity > 0 && (a.price = o.Price, a.listPrice = o.ListPrice, a.sellerDefault = !0), {
1199
+ ).sort(Qe).map((o) => (o.seller.sellerId === "1" && o.AvailableQuantity > 0 && (r.price = o.Price, r.listPrice = o.ListPrice, r.sellerDefault = !0), {
1172
1200
  availability: o.AvailableQuantity > 0,
1173
1201
  listPrice: o.ListPrice,
1174
- price: _t(o),
1202
+ price: cn(o),
1175
1203
  priceValidUntil: o.PriceValidUntil,
1176
1204
  priceCurrency: "BRL",
1177
1205
  installments: o.Installments,
@@ -1182,593 +1210,1717 @@ const Nt = (t, e) => be(t, e), kt = (t) => ({
1182
1210
  }
1183
1211
  }));
1184
1212
  return {
1185
- lowPrice: a.sellerDefault ? a.price : s[0].price,
1186
- highPrice: a.sellerDefault ? a.listPrice : s[0].listPrice,
1187
- offers: s
1213
+ lowPrice: r.sellerDefault ? r.price : a[0].price,
1214
+ highPrice: r.sellerDefault ? r.listPrice : a[0].listPrice,
1215
+ offers: a
1188
1216
  };
1189
- }, re = (t) => {
1190
- const { attributes: e, itemId: a, name: r, sellers: s, variations: o } = t;
1217
+ }, tt = (e) => {
1218
+ const { attributes: t, itemId: r, name: n, sellers: a, variations: o } = e;
1191
1219
  return {
1192
- additionalProperty: H(o, e, []),
1193
- name: r,
1220
+ additionalProperty: de(o, t, []),
1221
+ name: n,
1194
1222
  offers: {
1195
- offers: s == null ? void 0 : s.map(({ sellerId: i, commertialOffer: u }) => ({
1196
- availability: Dt(u.AvailableQuantity > 0),
1197
- listPrice: u.ListPrice,
1198
- price: u.Price,
1199
- quantity: u.AvailableQuantity,
1223
+ offers: a == null ? void 0 : a.map(({ sellerId: l, commertialOffer: i }) => ({
1224
+ availability: ln(i.AvailableQuantity > 0),
1225
+ listPrice: i.ListPrice,
1226
+ price: i.Price,
1227
+ quantity: i.AvailableQuantity,
1200
1228
  seller: {
1201
- identifier: i
1229
+ identifier: l
1202
1230
  }
1203
1231
  }))
1204
1232
  },
1205
- sku: a
1233
+ sku: r
1206
1234
  // slug: getSlug('', itemId), // getSlug('', itemId) que tipo de slug é esse?
1207
1235
  };
1208
- }, Vt = (t) => {
1209
- var v;
1236
+ }, gn = (e) => {
1237
+ var R;
1210
1238
  const {
1211
- attributes: e,
1212
- referenceId: a,
1213
- isVariantOf: r,
1214
- images: s,
1239
+ attributes: t,
1240
+ referenceId: r,
1241
+ isVariantOf: n,
1242
+ images: a,
1215
1243
  itemId: o,
1216
- name: i,
1217
- sellers: u,
1218
- videos: c,
1219
- variations: m
1220
- } = t, {
1221
- brand: l,
1222
- categories: d,
1223
- categoriesIds: R,
1224
- description: f,
1225
- linkText: p,
1226
- productClusters: y,
1227
- clusterHighlights: I,
1228
- productName: T,
1229
- properties: q,
1230
- productId: O,
1231
- productReference: g
1232
- } = r, E = d.slice().reverse(), C = te(u, t.isVariantOf), F = ee(C.offers[0].installments);
1244
+ name: l,
1245
+ sellers: i,
1246
+ videos: d,
1247
+ variations: g
1248
+ } = e, {
1249
+ brand: s,
1250
+ categories: u,
1251
+ categoriesIds: w,
1252
+ description: v,
1253
+ linkText: y,
1254
+ productClusters: _,
1255
+ clusterHighlights: p,
1256
+ productName: b,
1257
+ properties: m,
1258
+ productId: h,
1259
+ productReference: f
1260
+ } = n, E = u.slice().reverse(), q = et(i, e.isVariantOf), I = Ye(q.offers[0].installments);
1233
1261
  return {
1234
1262
  sku: o,
1235
- gtin: ((v = a == null ? void 0 : a[0]) == null ? void 0 : v.Value) ?? g ?? "",
1236
- name: T ?? i,
1237
- description: f,
1238
- releaseDate: r.releaseDate ?? "",
1239
- slug: p,
1240
- video: c[0],
1241
- categories: d,
1242
- categoriesIds: R,
1243
- id: O,
1244
- brand: { name: l, brandName: l },
1263
+ gtin: ((R = r == null ? void 0 : r[0]) == null ? void 0 : R.Value) ?? f ?? "",
1264
+ name: b ?? l,
1265
+ description: v,
1266
+ releaseDate: n.releaseDate ?? "",
1267
+ slug: y,
1268
+ video: d[0],
1269
+ categories: u,
1270
+ categoriesIds: w,
1271
+ id: h,
1272
+ brand: { name: s, brandName: s },
1245
1273
  seo: {
1246
- description: f,
1247
- title: T,
1248
- canonical: Z(p)
1274
+ description: v,
1275
+ title: b,
1276
+ canonical: Ze(y)
1249
1277
  },
1250
1278
  cluster: {
1251
- generals: y,
1252
- highlights: I
1279
+ generals: _,
1280
+ highlights: p
1253
1281
  },
1254
- properties: q,
1255
- availability: { status: C.offers[0].availability },
1282
+ properties: m,
1283
+ availability: { status: q.offers[0].availability },
1256
1284
  breadcrumbList: {
1257
1285
  itemListElement: [
1258
- ...E.map((P, A) => {
1259
- const $ = P.split("/"), L = $[$.length - 2], ne = $.map(Y).join("/");
1286
+ ...E.map((C, j) => {
1287
+ const $ = C.split("/"), D = $[$.length - 2], U = $.map(Je).join("/");
1260
1288
  return {
1261
- name: L,
1262
- item: ne,
1263
- position: A + 1
1289
+ name: D,
1290
+ item: U,
1291
+ position: j + 1
1264
1292
  };
1265
1293
  }),
1266
1294
  {
1267
- name: r.productName,
1268
- item: p,
1269
- position: d.length + 1
1295
+ name: n.productName,
1296
+ item: y,
1297
+ position: u.length + 1
1270
1298
  }
1271
1299
  ],
1272
- numberOfItems: d.length
1300
+ numberOfItems: u.length
1273
1301
  },
1274
- image: X(s),
1275
- offers: C,
1276
- additionalProperty: H(m, e, []),
1302
+ image: Ke(a),
1303
+ offers: q,
1304
+ additionalProperty: de(g, t, []),
1277
1305
  isVariantOf: {
1278
- productGroupID: r.productId,
1279
- hasVariant: r.items.map((P) => re(P))
1306
+ productGroupID: n.productId,
1307
+ hasVariant: n.items.map((C) => tt(C))
1280
1308
  },
1281
- installments: F
1309
+ installments: I
1282
1310
  };
1283
- }, xt = (t) => {
1284
- var F;
1311
+ }, bn = (e) => {
1312
+ var I;
1285
1313
  const {
1286
- attributes: e,
1287
- referenceId: a,
1288
- isVariantOf: r,
1289
- images: s,
1314
+ attributes: t,
1315
+ referenceId: r,
1316
+ isVariantOf: n,
1317
+ images: a,
1290
1318
  itemId: o,
1291
- name: i,
1292
- sellers: u,
1293
- Videos: c,
1294
- variations: m
1295
- } = t, {
1296
- brand: l,
1297
- categories: d,
1298
- categoriesIds: R,
1299
- description: f,
1300
- linkText: p,
1301
- productClusters: y,
1302
- productName: I,
1303
- Coleção: T,
1304
- "ID Coleção": q,
1305
- productId: O
1306
- } = r, g = d.slice().reverse(), E = te(u, t.isVariantOf), C = ee(E.offers[0].installments);
1319
+ name: l,
1320
+ sellers: i,
1321
+ Videos: d,
1322
+ variations: g
1323
+ } = e, {
1324
+ brand: s,
1325
+ categories: u,
1326
+ categoriesIds: w,
1327
+ description: v,
1328
+ linkText: y,
1329
+ productClusters: _,
1330
+ productName: p,
1331
+ Coleção: b,
1332
+ "ID Coleção": m,
1333
+ productId: h
1334
+ } = n, f = u.slice().reverse(), E = et(i, e.isVariantOf), q = Ye(E.offers[0].installments);
1307
1335
  return {
1308
1336
  sku: o,
1309
- gtin: ((F = a[0]) == null ? void 0 : F.Value) ?? "",
1310
- name: I ?? i,
1311
- description: f,
1312
- releaseDate: r.releaseDate ?? "",
1313
- slug: p,
1314
- video: c[0],
1315
- categories: d,
1316
- categoriesIds: R,
1317
- collection: T,
1318
- collectionId: q,
1319
- id: O,
1320
- brand: { name: l, brandName: l },
1337
+ gtin: ((I = r[0]) == null ? void 0 : I.Value) ?? "",
1338
+ name: p ?? l,
1339
+ description: v,
1340
+ releaseDate: n.releaseDate ?? "",
1341
+ slug: y,
1342
+ video: d[0],
1343
+ categories: u,
1344
+ categoriesIds: w,
1345
+ collection: b,
1346
+ collectionId: m,
1347
+ id: h,
1348
+ brand: { name: s, brandName: s },
1321
1349
  seo: {
1322
- description: f,
1323
- title: I,
1324
- canonical: Z(p)
1350
+ description: v,
1351
+ title: p,
1352
+ canonical: Ze(y)
1325
1353
  },
1326
1354
  cluster: {
1327
- generals: y,
1355
+ generals: _,
1328
1356
  highlights: []
1329
1357
  // TODO: add highlights
1330
1358
  },
1331
1359
  availability: { status: E.offers[0].availability },
1332
1360
  breadcrumbList: {
1333
1361
  itemListElement: [
1334
- ...g.map((v, P) => {
1335
- const A = v.split("/"), $ = A[A.length - 2], L = A.map(Y).join("/");
1362
+ ...f.map((R, C) => {
1363
+ const j = R.split("/"), $ = j[j.length - 2], D = j.map(Je).join("/");
1336
1364
  return {
1337
1365
  name: $,
1338
- item: L,
1339
- position: P + 1
1366
+ item: D,
1367
+ position: C + 1
1340
1368
  };
1341
1369
  }),
1342
1370
  {
1343
- name: r.productName,
1344
- item: p,
1345
- position: d.length + 1
1371
+ name: n.productName,
1372
+ item: y,
1373
+ position: u.length + 1
1346
1374
  }
1347
1375
  ],
1348
- numberOfItems: d.length
1376
+ numberOfItems: u.length
1349
1377
  },
1350
- image: X(s),
1378
+ image: Ke(a),
1351
1379
  offers: E,
1352
- additionalProperty: H(m, e, []),
1380
+ additionalProperty: de(g, t, []),
1353
1381
  isVariantOf: {
1354
- productGroupID: r.productId,
1355
- hasVariant: r.items.map((v) => {
1356
- const { variations: P } = v, A = P.map(($) => ({
1382
+ productGroupID: n.productId,
1383
+ hasVariant: n.items.map((R) => {
1384
+ const { variations: C } = R, j = C.map(($) => ({
1357
1385
  name: $,
1358
- values: v[$]
1386
+ values: R[$]
1359
1387
  }));
1360
1388
  return {
1361
- ...re(v),
1362
- additionalProperty: H(
1363
- A,
1364
- e,
1389
+ ...tt(R),
1390
+ additionalProperty: de(
1391
+ j,
1392
+ t,
1365
1393
  []
1366
1394
  )
1367
1395
  };
1368
1396
  })
1369
1397
  },
1370
- installments: C
1398
+ installments: q
1371
1399
  };
1372
- }, zt = n.array().of(n.object({
1373
- key: n.string().required(),
1374
- value: n.string().required()
1400
+ }, wn = c.array().of(c.object({
1401
+ key: c.string().required(),
1402
+ value: c.string().required()
1375
1403
  })).required("Facets are required");
1376
- async function Qt({ apiUrl: t, body: e, fetchOptions: a }) {
1377
- if (!e) {
1404
+ async function vn({ apiUrl: e, body: t, fetchOptions: r }) {
1405
+ if (!t) {
1378
1406
  console.error("[ERROR FETCHING] Body is required");
1379
1407
  return;
1380
1408
  }
1381
- await zt.validate(e);
1382
- const r = new URLSearchParams({}), s = e.map(({ key: i, value: u }) => `${i}/${u}`).join("/");
1383
- oe(e, r);
1384
- const o = `${t}/api/catalog_system/pub/products/crossselling/${s}`;
1385
- return h(o, {
1409
+ await wn.validate(t);
1410
+ const n = new URLSearchParams({}), a = t.map(({ key: l, value: i }) => `${l}/${i}`).join("/");
1411
+ Rt(t, n);
1412
+ const o = `${e}/api/catalog_system/pub/products/crossselling/${a}`;
1413
+ return O(o, {
1386
1414
  cache: "no-store",
1387
- ...a
1388
- }).then((i) => i.map((c) => {
1389
- const m = W(c.items);
1390
- return m && K(m, c);
1391
- }).filter((c) => !!c).map((c) => ({
1392
- node: xt(c)
1415
+ ...r
1416
+ }).then((l) => l.map((d) => {
1417
+ const g = Xe(d.items);
1418
+ return g && We(g, d);
1419
+ }).filter((d) => !!d).map((d) => ({
1420
+ node: bn(d)
1393
1421
  })));
1394
1422
  }
1395
- const ae = ({
1396
- apiUrl: t,
1397
- body: e,
1398
- fetchOptions: a,
1399
- extraData: r
1423
+ const rt = ({
1424
+ apiUrl: e,
1425
+ body: t,
1426
+ fetchOptions: r,
1427
+ extraData: n
1400
1428
  }) => {
1401
- if (!e) {
1429
+ if (!t) {
1402
1430
  console.error("[ERROR FETCHING] Body is required");
1403
1431
  return;
1404
1432
  }
1405
1433
  const {
1406
- query: s = "",
1434
+ query: a = "",
1407
1435
  page: o = 1,
1408
- count: i,
1409
- sort: u = "",
1410
- facets: c = [],
1411
- type: m,
1412
- hideUnavailableItems: l = !0,
1413
- locale: d = ""
1414
- } = e, R = new URLSearchParams({
1436
+ count: l,
1437
+ sort: i = "",
1438
+ facets: d = [],
1439
+ type: g,
1440
+ hideUnavailableItems: s = !0,
1441
+ locale: u = ""
1442
+ } = t, w = new URLSearchParams({
1415
1443
  page: o.toString(),
1416
- count: (i == null ? void 0 : i.toString()) ?? (r == null ? void 0 : r.ITEMS_PER_PAGE) ?? 24,
1417
- query: s,
1418
- sort: u,
1419
- locale: d
1444
+ count: (l == null ? void 0 : l.toString()) ?? (n == null ? void 0 : n.ITEMS_PER_PAGE) ?? 24,
1445
+ query: a,
1446
+ sort: i,
1447
+ locale: u
1420
1448
  });
1421
- l !== void 0 && R.append("hideUnavailableItems", l.toString());
1422
- const f = c.map((p) => `${p.key}/${p.value}`).join("/") ?? "";
1423
- return _e(
1424
- `${t}/api/io/_v/api/intelligent-search/${m}/${f}?${R.toString()}`,
1449
+ s !== void 0 && w.append("hideUnavailableItems", s.toString());
1450
+ const v = d.map((y) => `${y.key}/${y.value}`).join("/") ?? "";
1451
+ return lr(
1452
+ `${e}/api/io/_v/api/intelligent-search/${g}/${v}?${w.toString()}`,
1425
1453
  {
1426
1454
  headers: {
1427
1455
  Accept: "application/json",
1428
1456
  "content-type": "application/json"
1429
1457
  },
1430
- ...a
1458
+ ...r
1431
1459
  }
1432
1460
  );
1433
1461
  };
1434
- async function Kt({ body: t, extraData: e, ...a }) {
1435
- if (!t) {
1462
+ async function yn({ body: e, extraData: t, ...r }) {
1463
+ if (!e) {
1436
1464
  console.error("[ERROR FETCHING] Body is required");
1437
1465
  return;
1438
1466
  }
1439
- const r = await ae({
1467
+ const n = await rt({
1440
1468
  body: {
1441
- ...t,
1469
+ ...e,
1442
1470
  type: "product_search"
1443
1471
  },
1444
- extraData: e,
1445
- ...a
1446
- }), s = (r == null ? void 0 : r.products.map((u) => {
1447
- const c = W(u.items);
1448
- return c && K(c, u);
1449
- }).filter((u) => !!u)) ?? [], {
1472
+ extraData: t,
1473
+ ...r
1474
+ }), a = (n == null ? void 0 : n.products.map((i) => {
1475
+ const d = Xe(i.items);
1476
+ return d && We(d, i);
1477
+ }).filter((i) => !!i)) ?? [], {
1450
1478
  pagination: o,
1451
- recordsFiltered: i
1452
- } = r;
1479
+ recordsFiltered: l
1480
+ } = n;
1453
1481
  return {
1454
1482
  data: {
1455
1483
  pagination: {
1456
1484
  nextPage: o.after.length > 0,
1457
1485
  previousPage: o.before.length > 0,
1458
1486
  startCursor: "0",
1459
- endCursor: i.toString(),
1460
- count: i,
1487
+ endCursor: l.toString(),
1488
+ count: l,
1461
1489
  total: o.count
1462
1490
  },
1463
- products: s.map((u, c) => ({
1464
- node: Vt(u),
1465
- cursor: c.toString()
1491
+ products: a.map((i, d) => ({
1492
+ node: gn(i),
1493
+ cursor: d.toString()
1466
1494
  }))
1467
1495
  }
1468
1496
  };
1469
1497
  }
1470
- async function Jt({ body: t, extraData: e, ...a }) {
1471
- if (!t) {
1498
+ async function _n({ body: e, extraData: t, ...r }) {
1499
+ if (!e) {
1472
1500
  console.error("[ERROR FETCHING] Body is required");
1473
1501
  return;
1474
1502
  }
1475
- const r = await ae({
1503
+ const n = await rt({
1476
1504
  body: {
1477
- ...t,
1505
+ ...e,
1478
1506
  type: "facets"
1479
1507
  },
1480
- extraData: e,
1481
- ...a
1508
+ extraData: t,
1509
+ ...r
1482
1510
  });
1483
- return !r || !r.facets ? (console.error("[ERROR FETCHING] No facets found"), { data: { facets: [] } }) : {
1511
+ return !n || !n.facets ? (console.error("[ERROR FETCHING] No facets found"), { data: { facets: [] } }) : {
1484
1512
  data: {
1485
- ...r,
1486
- facets: ie(r, t == null ? void 0 : t.selectedFacets, (t == null ? void 0 : t.query) ?? "")
1513
+ ...n,
1514
+ facets: It(n, e == null ? void 0 : e.selectedFacets, (e == null ? void 0 : e.query) ?? "")
1487
1515
  }
1488
1516
  };
1489
1517
  }
1490
- const Wt = n.object({
1491
- query: n.string().optional(),
1492
- locale: n.string().optional()
1518
+ const Rn = c.object({
1519
+ query: c.string().optional(),
1520
+ locale: c.string().optional()
1493
1521
  });
1494
- async function Xt({ apiUrl: t, body: e, fetchOptions: a }) {
1495
- if (!e) {
1522
+ async function In({ apiUrl: e, body: t, fetchOptions: r }) {
1523
+ if (!t) {
1496
1524
  console.error("[ERROR FETCHING] Body is required");
1497
1525
  return;
1498
1526
  }
1499
- await Wt.validate(e);
1500
- const { query: r = "", locale: s = "default_locale" } = e, o = new URLSearchParams({ query: r, locale: s });
1501
- return h(
1502
- `${t}/api/io/_v/api/intelligent-search/search_suggestions?${o.toString()}`,
1527
+ await Rn.validate(t);
1528
+ const { query: n = "", locale: a = "default_locale" } = t, o = new URLSearchParams({ query: n, locale: a });
1529
+ return O(
1530
+ `${e}/api/io/_v/api/intelligent-search/search_suggestions?${o.toString()}`,
1503
1531
  {
1504
- ...a
1532
+ ...r
1505
1533
  }
1506
1534
  );
1507
1535
  }
1508
- async function Yt({ apiUrl: t }) {
1509
- return h(`${t}/api/io/_v/api/intelligent-search/top_searches`);
1536
+ async function Pn({ apiUrl: e }) {
1537
+ return O(`${e}/api/io/_v/api/intelligent-search/top_searches`);
1510
1538
  }
1511
- const Zt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1539
+ const xn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1512
1540
  __proto__: null,
1513
- getSearchAutoCompleteSuggestions: wt,
1514
- getSearchCrossellingProducts: Qt,
1515
- getSearchFacets: Jt,
1516
- getSearchProducts: Kt,
1517
- getSearchSuggestedTerms: Xt,
1518
- getSearchTopSearchs: Yt
1519
- }, Symbol.toStringTag, { value: "Module" })), er = n.object({
1520
- masterDataEntity: n.string().nonNullable(),
1521
- payload: n.object().shape({}).nullable()
1541
+ getSearchAutoCompleteSuggestions: nn,
1542
+ getSearchCrossellingProducts: vn,
1543
+ getSearchFacets: _n,
1544
+ getSearchProducts: yn,
1545
+ getSearchSuggestedTerms: In,
1546
+ getSearchTopSearchs: Pn
1547
+ }, Symbol.toStringTag, { value: "Module" })), Sn = c.object({
1548
+ masterDataEntity: c.string().nonNullable(),
1549
+ payload: c.object().shape({}).nullable()
1522
1550
  });
1523
- async function tr({
1524
- apiUrl: t,
1525
- body: e,
1526
- fetchOptions: a
1551
+ async function Cn({
1552
+ apiUrl: e,
1553
+ body: t,
1554
+ fetchOptions: r
1527
1555
  }) {
1528
- if (!e) {
1556
+ if (!t) {
1529
1557
  console.error("[ERROR FETCHING] Body is required");
1530
1558
  return;
1531
1559
  }
1532
- await er.validate(e);
1533
- const { masterDataEntity: r, payload: s } = e, o = `${t}/api/dataentities/${r}/documents`;
1534
- return h(o, {
1560
+ await Sn.validate(t);
1561
+ const { masterDataEntity: n, payload: a } = t, o = `${e}/api/dataentities/${n}/documents`;
1562
+ return O(o, {
1535
1563
  method: "POST",
1536
1564
  body: {
1537
- payload: s
1565
+ payload: a
1538
1566
  },
1539
- ...a
1567
+ ...r
1540
1568
  });
1541
1569
  }
1542
- const rr = n.object().shape({
1543
- _where: n.string().optional(),
1544
- _fields: n.string().optional(),
1545
- _sort: n.string().optional(),
1546
- _from: n.number().integer().min(0).optional(),
1547
- _to: n.number().integer().min(0).optional(),
1548
- _keyword: n.string().optional()
1549
- }), ar = n.object({
1550
- masterDataEntity: n.string().required(),
1551
- searchFields: rr,
1552
- headers: n.object().shape({
1553
- "REST-Range": n.string().notRequired()
1570
+ const kn = c.object().shape({
1571
+ _where: c.string().optional(),
1572
+ _fields: c.string().optional(),
1573
+ _sort: c.string().optional(),
1574
+ _from: c.number().integer().min(0).optional(),
1575
+ _to: c.number().integer().min(0).optional(),
1576
+ _keyword: c.string().optional()
1577
+ }), En = c.object({
1578
+ masterDataEntity: c.string().required(),
1579
+ searchFields: kn,
1580
+ headers: c.object().shape({
1581
+ "REST-Range": c.string().notRequired()
1554
1582
  })
1555
1583
  });
1556
- async function nr({
1557
- apiUrl: t,
1558
- body: e,
1559
- fetchOptions: a
1584
+ async function An({
1585
+ apiUrl: e,
1586
+ body: t,
1587
+ fetchOptions: r
1560
1588
  }) {
1561
- if (!e) {
1589
+ if (!t) {
1562
1590
  console.error("[ERROR FETCHING] Body is required");
1563
1591
  return;
1564
1592
  }
1565
- const r = new URLSearchParams();
1566
- await ar.validate(e);
1567
- const { masterDataEntity: s, searchFields: o, headers: i } = e;
1568
- o && Object.entries(o).forEach(([m, l]) => {
1569
- r.append(m, String(l));
1570
- }), "_fields" in o || r == null || r.append("_fields", "_all");
1571
- let u = [], c = null;
1593
+ const n = new URLSearchParams();
1594
+ await En.validate(t);
1595
+ const { masterDataEntity: a, searchFields: o, headers: l } = t;
1596
+ o && Object.entries(o).forEach(([g, s]) => {
1597
+ n.append(g, String(s));
1598
+ }), "_fields" in o || n == null || n.append("_fields", "_all");
1599
+ let i = [], d = null;
1572
1600
  do {
1573
- c && r.set("_scroll", c);
1574
- const m = await fetch(
1575
- `${t}/api/dataentities/${s}/search?${r.toString()}`,
1601
+ d && n.set("_scroll", d);
1602
+ const g = await fetch(
1603
+ `${e}/api/dataentities/${a}/search?${n.toString()}`,
1576
1604
  {
1577
1605
  method: "GET",
1578
1606
  headers: {
1579
- "REST-Range": (i == null ? void 0 : i["REST-Range"]) ?? "resources=0-100",
1580
- ...a == null ? void 0 : a.headers
1607
+ "REST-Range": (l == null ? void 0 : l["REST-Range"]) ?? "resources=0-100",
1608
+ ...r == null ? void 0 : r.headers
1581
1609
  },
1582
1610
  cache: "no-store"
1583
1611
  }
1584
1612
  );
1585
- if (!m.ok)
1613
+ if (!g.ok)
1586
1614
  throw new Error(
1587
- `[MasterData] ${m.status} - ${m.statusText}`
1615
+ `[MasterData] ${g.status} - ${g.statusText}`
1588
1616
  );
1589
- const l = await m.json();
1590
- u.push(...l), c = m.headers.get("x-vtex-md-scroll");
1591
- } while (c);
1592
- return u;
1617
+ const s = await g.json();
1618
+ i.push(...s), d = g.headers.get("x-vtex-md-scroll");
1619
+ } while (d);
1620
+ return i;
1593
1621
  }
1594
- const sr = n.object({
1595
- dataEntityName: n.string().required(),
1596
- id: n.string().required(),
1597
- fieldsToBeUpdated: n.object().shape({})
1622
+ const On = c.object({
1623
+ dataEntityName: c.string().required(),
1624
+ id: c.string().required(),
1625
+ fieldsToBeUpdated: c.object().shape({})
1598
1626
  });
1599
- async function or({
1600
- apiUrl: t,
1601
- body: e,
1602
- fetchOptions: a
1627
+ async function Tn({
1628
+ apiUrl: e,
1629
+ body: t,
1630
+ fetchOptions: r
1603
1631
  }) {
1604
- if (!e) {
1632
+ if (!t) {
1605
1633
  console.error("[ERROR FETCHING] Body is required");
1606
1634
  return;
1607
1635
  }
1608
- await sr.validate(e);
1609
- const { dataEntityName: r, id: s, fieldsToBeUpdated: o } = e, i = `${t}/api/dataentities/${r}/documents/${s}`;
1610
- return h(i, {
1636
+ await On.validate(t);
1637
+ const { dataEntityName: n, id: a, fieldsToBeUpdated: o } = t, l = `${e}/api/dataentities/${n}/documents/${a}`;
1638
+ return O(l, {
1611
1639
  body: {
1612
1640
  fieldsToBeUpdated: o
1613
1641
  },
1614
1642
  method: "PATCH",
1615
- ...a
1643
+ ...r
1616
1644
  });
1617
1645
  }
1618
- const ir = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1646
+ const qn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1619
1647
  __proto__: null,
1620
- getSearchMasterdata: nr,
1621
- patchUpdateMasterdata: or,
1622
- postMasterdata: tr
1648
+ getSearchMasterdata: An,
1649
+ patchUpdateMasterdata: Tn,
1650
+ postMasterdata: Cn
1623
1651
  }, Symbol.toStringTag, { value: "Module" }));
1624
- async function cr({ body: t, apiUrl: e, extraData: a, fetchOptions: r }) {
1625
- const { productIds: s } = t;
1626
- if (!s)
1652
+ async function Nn({ body: e, apiUrl: t, extraData: r, fetchOptions: n }) {
1653
+ const { productIds: a } = e;
1654
+ if (!a)
1627
1655
  return console.error("[ERROR FETCHING] productIds is required"), [];
1628
- const { NAME_SPLIT_SYMBOL: o } = a;
1656
+ const { NAME_SPLIT_SYMBOL: o } = r;
1629
1657
  if (!o)
1630
1658
  return console.error("[ERROR FETCHING] NAME_SPLIT_SYMBOL is required"), [];
1631
- const i = s.map((l) => typeof l == "string" || typeof l == "number" ? `productId:${l}` : "").join("&fq="), u = await h(
1632
- `${e}/api/catalog_system/pub/products/search?fq=${i}`,
1659
+ const l = a.map((s) => typeof s == "string" || typeof s == "number" ? `productId:${s}` : "").join("&fq="), i = await O(
1660
+ `${t}/api/catalog_system/pub/products/search?fq=${l}`,
1633
1661
  {
1634
- ...r
1662
+ ...n
1635
1663
  }
1636
- ), c = (l) => Object.keys(l).map((d) => ({ id: d, name: l[d] }));
1637
- return u.map((l, d) => {
1638
- var O;
1639
- const { installments: R, price: f, listPrice: p, sizes: y, allSizesAvailable: I } = ce({ items: l.items, NAME_SPLIT_SYMBOL: o }), T = I ? !0 : y.some((g) => g.available), q = l.items[0].sellers[0].commertialOffer;
1664
+ ), d = (s) => Object.keys(s).map((u) => ({ id: u, name: s[u] }));
1665
+ return i.map((s, u) => {
1666
+ var h;
1667
+ const { installments: w, price: v, listPrice: y, sizes: _, allSizesAvailable: p } = Pt({ items: s.items, NAME_SPLIT_SYMBOL: o }), b = p ? !0 : _.some((f) => f.available), m = s.items[0].sellers[0].commertialOffer;
1640
1668
  return {
1641
1669
  node: {
1642
- sku: l.items[0].itemId,
1643
- gtin: l.productReference,
1644
- name: l.productName,
1645
- description: l.description,
1646
- releaseDate: l.releaseDate,
1647
- slug: l.linkText,
1648
- categories: l.categories,
1649
- categoriesIds: l.categoriesIds,
1650
- id: l.items[0].itemId,
1670
+ sku: s.items[0].itemId,
1671
+ gtin: s.productReference,
1672
+ name: s.productName,
1673
+ description: s.description,
1674
+ releaseDate: s.releaseDate,
1675
+ slug: s.linkText,
1676
+ categories: s.categories,
1677
+ categoriesIds: s.categoriesIds,
1678
+ id: s.items[0].itemId,
1651
1679
  brand: {
1652
- name: l.brand,
1653
- brandName: l.brand
1680
+ name: s.brand,
1681
+ brandName: s.brand
1654
1682
  },
1655
1683
  seo: {
1656
- description: l.description,
1657
- title: l.productName,
1658
- canonical: `/${l.linkText}/p`
1684
+ description: s.description,
1685
+ title: s.productName,
1686
+ canonical: `/${s.linkText}/p`
1659
1687
  },
1660
1688
  cluster: {
1661
- generals: c(l.productClusters),
1662
- highlights: c(l.clusterHighlights)
1689
+ generals: d(s.productClusters),
1690
+ highlights: d(s.clusterHighlights)
1663
1691
  },
1664
1692
  availability: {
1665
- status: T
1693
+ status: b
1666
1694
  },
1667
- image: l.items[0].images.map(
1695
+ image: s.items[0].images.map(
1668
1696
  ({
1669
- imageLabel: g,
1697
+ imageLabel: f,
1670
1698
  imageUrl: E
1671
1699
  }) => ({
1672
- alternateName: g,
1700
+ alternateName: f,
1673
1701
  url: E,
1674
- keywords: g
1702
+ keywords: f
1675
1703
  })
1676
1704
  ),
1677
1705
  offers: {
1678
- lowPrice: f,
1679
- highPrice: p,
1706
+ lowPrice: v,
1707
+ highPrice: y,
1680
1708
  offers: [
1681
1709
  {
1682
- availability: T,
1683
- listPrice: p,
1684
- price: f,
1685
- priceValidUntil: q.PriceValidUntil,
1710
+ availability: b,
1711
+ listPrice: y,
1712
+ price: v,
1713
+ priceValidUntil: m.PriceValidUntil,
1686
1714
  priceCurrency: "BRL",
1687
- installments: q.Installments,
1688
- lowPrice: f,
1689
- quantity: q.AvailableQuantity,
1715
+ installments: m.Installments,
1716
+ lowPrice: v,
1717
+ quantity: m.AvailableQuantity,
1690
1718
  seller: {
1691
- identifier: l.items[0].sellers[0].sellerId
1719
+ identifier: s.items[0].sellers[0].sellerId
1692
1720
  }
1693
1721
  }
1694
1722
  ]
1695
1723
  },
1696
- additionalProperty: (O = l == null ? void 0 : l.skuSpecifications) == null ? void 0 : O.map((g) => ({
1697
- name: l == null ? void 0 : l.skuSpecifications[0].field.name,
1698
- value: g,
1724
+ additionalProperty: (h = s == null ? void 0 : s.skuSpecifications) == null ? void 0 : h.map((f) => ({
1725
+ name: s == null ? void 0 : s.skuSpecifications[0].field.name,
1726
+ value: f,
1699
1727
  valueReference: "SPECIFICATION"
1700
1728
  })),
1701
1729
  isVariantOf: {
1702
- productGroupID: l.productId,
1703
- hasVariant: l.items.map((g) => {
1730
+ productGroupID: s.productId,
1731
+ hasVariant: s.items.map((f) => {
1704
1732
  var E;
1705
1733
  return {
1706
- additionalProperty: g == null ? void 0 : g.variations.map(() => {
1707
- var C, F, v;
1734
+ additionalProperty: f == null ? void 0 : f.variations.map(() => {
1735
+ var q, I, R;
1708
1736
  return {
1709
- name: (C = g == null ? void 0 : g.variations) == null ? void 0 : C[0],
1710
- value: (v = g == null ? void 0 : g[(F = g == null ? void 0 : g.variations) == null ? void 0 : F[0]]) == null ? void 0 : v[0],
1737
+ name: (q = f == null ? void 0 : f.variations) == null ? void 0 : q[0],
1738
+ value: (R = f == null ? void 0 : f[(I = f == null ? void 0 : f.variations) == null ? void 0 : I[0]]) == null ? void 0 : R[0],
1711
1739
  valueReference: "SPECIFICATION"
1712
1740
  };
1713
1741
  }),
1714
- name: g.name,
1742
+ name: f.name,
1715
1743
  offers: {
1716
- offers: (E = g.sellers) == null ? void 0 : E.map(
1717
- ({ commertialOffer: C, sellerId: F }) => ({
1744
+ offers: (E = f.sellers) == null ? void 0 : E.map(
1745
+ ({ commertialOffer: q, sellerId: I }) => ({
1718
1746
  availability: "https://schema.org/InStock",
1719
- listPrice: C.ListPrice,
1720
- price: C.Price,
1721
- quantity: C.AvailableQuantity,
1747
+ listPrice: q.ListPrice,
1748
+ price: q.Price,
1749
+ quantity: q.AvailableQuantity,
1722
1750
  seller: {
1723
- identifier: F
1751
+ identifier: I
1724
1752
  }
1725
1753
  })
1726
1754
  )
1727
1755
  },
1728
- sku: g.itemId,
1729
- slug: `-${g.itemId}`
1756
+ sku: f.itemId,
1757
+ slug: `-${f.itemId}`
1730
1758
  };
1731
1759
  })
1732
1760
  },
1733
- installments: R
1761
+ installments: w
1734
1762
  },
1735
- cursor: d.toString()
1763
+ cursor: u.toString()
1764
+ };
1765
+ });
1766
+ }
1767
+ const jn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1768
+ __proto__: null,
1769
+ getWishlistProducts: Nn
1770
+ }, Symbol.toStringTag, { value: "Module" }));
1771
+ var Re = { exports: {} }, nt = {}, Pe = {}, at = {}, it = {};
1772
+ (function(e) {
1773
+ Object.defineProperty(e, "__esModule", {
1774
+ value: !0
1775
+ }), Object.defineProperty(e, "addPathSuffix", {
1776
+ enumerable: !0,
1777
+ get: function() {
1778
+ return r;
1779
+ }
1780
+ });
1781
+ const t = xt;
1782
+ function r(n, a) {
1783
+ if (!n.startsWith("/") || !a)
1784
+ return n;
1785
+ const { pathname: o, query: l, hash: i } = (0, t.parsePath)(n);
1786
+ return "" + o + a + l + i;
1787
+ }
1788
+ })(it);
1789
+ (function(e) {
1790
+ Object.defineProperty(e, "__esModule", {
1791
+ value: !0
1792
+ }), Object.defineProperty(e, "formatNextPathnameInfo", {
1793
+ enumerable: !0,
1794
+ get: function() {
1795
+ return o;
1796
+ }
1797
+ });
1798
+ const t = Ct, r = kt, n = it, a = St;
1799
+ function o(l) {
1800
+ let i = (0, a.addLocale)(l.pathname, l.locale, l.buildId ? void 0 : l.defaultLocale, l.ignorePrefix);
1801
+ return (l.buildId || !l.trailingSlash) && (i = (0, t.removeTrailingSlash)(i)), l.buildId && (i = (0, n.addPathSuffix)((0, r.addPathPrefix)(i, "/_next/data/" + l.buildId), l.pathname === "/" ? "index.json" : ".json")), i = (0, r.addPathPrefix)(i, l.basePath), !l.buildId && l.trailingSlash ? i.endsWith("/") ? i : (0, n.addPathSuffix)(i, "/") : (0, t.removeTrailingSlash)(i);
1802
+ }
1803
+ })(at);
1804
+ var ot = {};
1805
+ (function(e) {
1806
+ Object.defineProperty(e, "__esModule", {
1807
+ value: !0
1808
+ }), Object.defineProperty(e, "getHostname", {
1809
+ enumerable: !0,
1810
+ get: function() {
1811
+ return t;
1812
+ }
1813
+ });
1814
+ function t(r, n) {
1815
+ let a;
1816
+ if (n != null && n.host && !Array.isArray(n.host))
1817
+ a = n.host.toString().split(":", 1)[0];
1818
+ else if (r.hostname)
1819
+ a = r.hostname;
1820
+ else return;
1821
+ return a.toLowerCase();
1822
+ }
1823
+ })(ot);
1824
+ var st = {}, lt = {};
1825
+ (function(e) {
1826
+ Object.defineProperty(e, "__esModule", {
1827
+ value: !0
1828
+ }), Object.defineProperty(e, "removePathPrefix", {
1829
+ enumerable: !0,
1830
+ get: function() {
1831
+ return r;
1832
+ }
1833
+ });
1834
+ const t = ze;
1835
+ function r(n, a) {
1836
+ if (!(0, t.pathHasPrefix)(n, a))
1837
+ return n;
1838
+ const o = n.slice(a.length);
1839
+ return o.startsWith("/") ? o : "/" + o;
1840
+ }
1841
+ })(lt);
1842
+ (function(e) {
1843
+ Object.defineProperty(e, "__esModule", {
1844
+ value: !0
1845
+ }), Object.defineProperty(e, "getNextPathnameInfo", {
1846
+ enumerable: !0,
1847
+ get: function() {
1848
+ return a;
1849
+ }
1850
+ });
1851
+ const t = Et, r = lt, n = ze;
1852
+ function a(o, l) {
1853
+ var i;
1854
+ const { basePath: d, i18n: g, trailingSlash: s } = (i = l.nextConfig) != null ? i : {}, u = {
1855
+ pathname: o,
1856
+ trailingSlash: o !== "/" ? o.endsWith("/") : s
1857
+ };
1858
+ d && (0, n.pathHasPrefix)(u.pathname, d) && (u.pathname = (0, r.removePathPrefix)(u.pathname, d), u.basePath = d);
1859
+ let w = u.pathname;
1860
+ if (u.pathname.startsWith("/_next/data/") && u.pathname.endsWith(".json")) {
1861
+ const y = u.pathname.replace(/^\/_next\/data\//, "").replace(/\.json$/, "").split("/"), _ = y[0];
1862
+ u.buildId = _, w = y[1] !== "index" ? "/" + y.slice(1).join("/") : "/", l.parseData === !0 && (u.pathname = w);
1863
+ }
1864
+ if (g) {
1865
+ let y = l.i18nProvider ? l.i18nProvider.analyze(u.pathname) : (0, t.normalizeLocalePath)(u.pathname, g.locales);
1866
+ u.locale = y.detectedLocale;
1867
+ var v;
1868
+ u.pathname = (v = y.pathname) != null ? v : u.pathname, !y.detectedLocale && u.buildId && (y = l.i18nProvider ? l.i18nProvider.analyze(w) : (0, t.normalizeLocalePath)(w, g.locales), y.detectedLocale && (u.locale = y.detectedLocale));
1869
+ }
1870
+ return u;
1871
+ }
1872
+ })(st);
1873
+ (function(e) {
1874
+ Object.defineProperty(e, "__esModule", {
1875
+ value: !0
1876
+ }), Object.defineProperty(e, "NextURL", {
1877
+ enumerable: !0,
1878
+ get: function() {
1879
+ return d;
1880
+ }
1881
+ });
1882
+ const t = At, r = at, n = ot, a = st, o = /(?!^https?:\/\/)(127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}|\[::1\]|localhost)/;
1883
+ function l(g, s) {
1884
+ return new URL(String(g).replace(o, "localhost"), s && String(s).replace(o, "localhost"));
1885
+ }
1886
+ const i = Symbol("NextURLInternal");
1887
+ class d {
1888
+ constructor(s, u, w) {
1889
+ let v, y;
1890
+ typeof u == "object" && "pathname" in u || typeof u == "string" ? (v = u, y = w || {}) : y = w || u || {}, this[i] = {
1891
+ url: l(s, v ?? y.base),
1892
+ options: y,
1893
+ basePath: ""
1894
+ }, this.analyze();
1895
+ }
1896
+ analyze() {
1897
+ var s, u, w, v, y;
1898
+ const _ = (0, a.getNextPathnameInfo)(this[i].url.pathname, {
1899
+ nextConfig: this[i].options.nextConfig,
1900
+ parseData: !process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE,
1901
+ i18nProvider: this[i].options.i18nProvider
1902
+ }), p = (0, n.getHostname)(this[i].url, this[i].options.headers);
1903
+ this[i].domainLocale = this[i].options.i18nProvider ? this[i].options.i18nProvider.detectDomainLocale(p) : (0, t.detectDomainLocale)((u = this[i].options.nextConfig) == null || (s = u.i18n) == null ? void 0 : s.domains, p);
1904
+ const b = ((w = this[i].domainLocale) == null ? void 0 : w.defaultLocale) || ((y = this[i].options.nextConfig) == null || (v = y.i18n) == null ? void 0 : v.defaultLocale);
1905
+ this[i].url.pathname = _.pathname, this[i].defaultLocale = b, this[i].basePath = _.basePath ?? "", this[i].buildId = _.buildId, this[i].locale = _.locale ?? b, this[i].trailingSlash = _.trailingSlash;
1906
+ }
1907
+ formatPathname() {
1908
+ return (0, r.formatNextPathnameInfo)({
1909
+ basePath: this[i].basePath,
1910
+ buildId: this[i].buildId,
1911
+ defaultLocale: this[i].options.forceLocale ? void 0 : this[i].defaultLocale,
1912
+ locale: this[i].locale,
1913
+ pathname: this[i].url.pathname,
1914
+ trailingSlash: this[i].trailingSlash
1915
+ });
1916
+ }
1917
+ formatSearch() {
1918
+ return this[i].url.search;
1919
+ }
1920
+ get buildId() {
1921
+ return this[i].buildId;
1922
+ }
1923
+ set buildId(s) {
1924
+ this[i].buildId = s;
1925
+ }
1926
+ get locale() {
1927
+ return this[i].locale ?? "";
1928
+ }
1929
+ set locale(s) {
1930
+ var u, w;
1931
+ if (!this[i].locale || !(!((w = this[i].options.nextConfig) == null || (u = w.i18n) == null) && u.locales.includes(s)))
1932
+ throw new TypeError(`The NextURL configuration includes no locale "${s}"`);
1933
+ this[i].locale = s;
1934
+ }
1935
+ get defaultLocale() {
1936
+ return this[i].defaultLocale;
1937
+ }
1938
+ get domainLocale() {
1939
+ return this[i].domainLocale;
1940
+ }
1941
+ get searchParams() {
1942
+ return this[i].url.searchParams;
1943
+ }
1944
+ get host() {
1945
+ return this[i].url.host;
1946
+ }
1947
+ set host(s) {
1948
+ this[i].url.host = s;
1949
+ }
1950
+ get hostname() {
1951
+ return this[i].url.hostname;
1952
+ }
1953
+ set hostname(s) {
1954
+ this[i].url.hostname = s;
1955
+ }
1956
+ get port() {
1957
+ return this[i].url.port;
1958
+ }
1959
+ set port(s) {
1960
+ this[i].url.port = s;
1961
+ }
1962
+ get protocol() {
1963
+ return this[i].url.protocol;
1964
+ }
1965
+ set protocol(s) {
1966
+ this[i].url.protocol = s;
1967
+ }
1968
+ get href() {
1969
+ const s = this.formatPathname(), u = this.formatSearch();
1970
+ return `${this.protocol}//${this.host}${s}${u}${this.hash}`;
1971
+ }
1972
+ set href(s) {
1973
+ this[i].url = l(s), this.analyze();
1974
+ }
1975
+ get origin() {
1976
+ return this[i].url.origin;
1977
+ }
1978
+ get pathname() {
1979
+ return this[i].url.pathname;
1980
+ }
1981
+ set pathname(s) {
1982
+ this[i].url.pathname = s;
1983
+ }
1984
+ get hash() {
1985
+ return this[i].url.hash;
1986
+ }
1987
+ set hash(s) {
1988
+ this[i].url.hash = s;
1989
+ }
1990
+ get search() {
1991
+ return this[i].url.search;
1992
+ }
1993
+ set search(s) {
1994
+ this[i].url.search = s;
1995
+ }
1996
+ get password() {
1997
+ return this[i].url.password;
1998
+ }
1999
+ set password(s) {
2000
+ this[i].url.password = s;
2001
+ }
2002
+ get username() {
2003
+ return this[i].url.username;
2004
+ }
2005
+ set username(s) {
2006
+ this[i].url.username = s;
2007
+ }
2008
+ get basePath() {
2009
+ return this[i].basePath;
2010
+ }
2011
+ set basePath(s) {
2012
+ this[i].basePath = s.startsWith("/") ? s : `/${s}`;
2013
+ }
2014
+ toString() {
2015
+ return this.href;
2016
+ }
2017
+ toJSON() {
2018
+ return this.href;
2019
+ }
2020
+ [Symbol.for("edge-runtime.inspect.custom")]() {
2021
+ return {
2022
+ href: this.href,
2023
+ origin: this.origin,
2024
+ protocol: this.protocol,
2025
+ username: this.username,
2026
+ password: this.password,
2027
+ host: this.host,
2028
+ hostname: this.hostname,
2029
+ port: this.port,
2030
+ pathname: this.pathname,
2031
+ search: this.search,
2032
+ searchParams: this.searchParams,
2033
+ hash: this.hash
2034
+ };
2035
+ }
2036
+ clone() {
2037
+ return new d(String(this), this[i].options);
2038
+ }
2039
+ }
2040
+ })(Pe);
2041
+ var xe = {};
2042
+ (function(e) {
2043
+ Object.defineProperty(e, "__esModule", {
2044
+ value: !0
2045
+ });
2046
+ function t(d, g) {
2047
+ for (var s in g) Object.defineProperty(d, s, {
2048
+ enumerable: !0,
2049
+ get: g[s]
2050
+ });
2051
+ }
2052
+ t(e, {
2053
+ fromNodeOutgoingHttpHeaders: function() {
2054
+ return n;
2055
+ },
2056
+ normalizeNextQueryParam: function() {
2057
+ return i;
2058
+ },
2059
+ splitCookiesString: function() {
2060
+ return a;
2061
+ },
2062
+ toNodeOutgoingHttpHeaders: function() {
2063
+ return o;
2064
+ },
2065
+ validateURL: function() {
2066
+ return l;
2067
+ }
2068
+ });
2069
+ const r = Ot;
2070
+ function n(d) {
2071
+ const g = new Headers();
2072
+ for (let [s, u] of Object.entries(d)) {
2073
+ const w = Array.isArray(u) ? u : [
2074
+ u
2075
+ ];
2076
+ for (let v of w)
2077
+ typeof v > "u" || (typeof v == "number" && (v = v.toString()), g.append(s, v));
2078
+ }
2079
+ return g;
2080
+ }
2081
+ function a(d) {
2082
+ var g = [], s = 0, u, w, v, y, _;
2083
+ function p() {
2084
+ for (; s < d.length && /\s/.test(d.charAt(s)); )
2085
+ s += 1;
2086
+ return s < d.length;
2087
+ }
2088
+ function b() {
2089
+ return w = d.charAt(s), w !== "=" && w !== ";" && w !== ",";
2090
+ }
2091
+ for (; s < d.length; ) {
2092
+ for (u = s, _ = !1; p(); )
2093
+ if (w = d.charAt(s), w === ",") {
2094
+ for (v = s, s += 1, p(), y = s; s < d.length && b(); )
2095
+ s += 1;
2096
+ s < d.length && d.charAt(s) === "=" ? (_ = !0, s = y, g.push(d.substring(u, v)), u = s) : s = v + 1;
2097
+ } else
2098
+ s += 1;
2099
+ (!_ || s >= d.length) && g.push(d.substring(u, d.length));
2100
+ }
2101
+ return g;
2102
+ }
2103
+ function o(d) {
2104
+ const g = {}, s = [];
2105
+ if (d)
2106
+ for (const [u, w] of d.entries())
2107
+ u.toLowerCase() === "set-cookie" ? (s.push(...a(w)), g[u] = s.length === 1 ? s[0] : s) : g[u] = w;
2108
+ return g;
2109
+ }
2110
+ function l(d) {
2111
+ try {
2112
+ return String(new URL(String(d)));
2113
+ } catch (g) {
2114
+ throw new Error(`URL is malformed "${String(d)}". Please use only absolute URLs - https://nextjs.org/docs/messages/middleware-relative-urls`, {
2115
+ cause: g
2116
+ });
2117
+ }
2118
+ }
2119
+ function i(d, g) {
2120
+ const s = [
2121
+ r.NEXT_QUERY_PARAM_PREFIX,
2122
+ r.NEXT_INTERCEPTION_MARKER_PREFIX
2123
+ ];
2124
+ for (const u of s)
2125
+ if (d !== u && d.startsWith(u)) {
2126
+ const w = d.substring(u.length);
2127
+ g(w);
2128
+ }
2129
+ }
2130
+ })(xe);
2131
+ var ct = {};
2132
+ (function(e) {
2133
+ Object.defineProperty(e, "__esModule", {
2134
+ value: !0
2135
+ });
2136
+ function t(o, l) {
2137
+ for (var i in l) Object.defineProperty(o, i, {
2138
+ enumerable: !0,
2139
+ get: l[i]
2140
+ });
2141
+ }
2142
+ t(e, {
2143
+ PageSignatureError: function() {
2144
+ return r;
2145
+ },
2146
+ RemovedPageError: function() {
2147
+ return n;
2148
+ },
2149
+ RemovedUAError: function() {
2150
+ return a;
2151
+ }
2152
+ });
2153
+ class r extends Error {
2154
+ constructor({ page: l }) {
2155
+ super(`The middleware "${l}" accepts an async API directly with the form:
2156
+
2157
+ export function middleware(request, event) {
2158
+ return NextResponse.redirect('/new-location')
2159
+ }
2160
+
2161
+ Read more: https://nextjs.org/docs/messages/middleware-new-signature
2162
+ `);
2163
+ }
2164
+ }
2165
+ class n extends Error {
2166
+ constructor() {
2167
+ super("The request.page has been deprecated in favour of `URLPattern`.\n Read more: https://nextjs.org/docs/messages/middleware-request-page\n ");
2168
+ }
2169
+ }
2170
+ class a extends Error {
2171
+ constructor() {
2172
+ super("The request.ua has been removed in favour of `userAgent` function.\n Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent\n ");
2173
+ }
2174
+ }
2175
+ })(ct);
2176
+ var pe = {}, Se = Object.defineProperty, Fn = Object.getOwnPropertyDescriptor, $n = Object.getOwnPropertyNames, Ln = Object.prototype.hasOwnProperty, Dn = (e, t) => {
2177
+ for (var r in t)
2178
+ Se(e, r, { get: t[r], enumerable: !0 });
2179
+ }, Un = (e, t, r, n) => {
2180
+ if (t && typeof t == "object" || typeof t == "function")
2181
+ for (let a of $n(t))
2182
+ !Ln.call(e, a) && a !== r && Se(e, a, { get: () => t[a], enumerable: !(n = Fn(t, a)) || n.enumerable });
2183
+ return e;
2184
+ }, Hn = (e) => Un(Se({}, "__esModule", { value: !0 }), e), ut = {};
2185
+ Dn(ut, {
2186
+ RequestCookies: () => Xn,
2187
+ ResponseCookies: () => Kn,
2188
+ parseCookie: () => Ce,
2189
+ parseSetCookie: () => dt,
2190
+ stringifyCookie: () => K
2191
+ });
2192
+ var Mn = Hn(ut);
2193
+ function K(e) {
2194
+ var t;
2195
+ const r = [
2196
+ "path" in e && e.path && `Path=${e.path}`,
2197
+ "expires" in e && (e.expires || e.expires === 0) && `Expires=${(typeof e.expires == "number" ? new Date(e.expires) : e.expires).toUTCString()}`,
2198
+ "maxAge" in e && typeof e.maxAge == "number" && `Max-Age=${e.maxAge}`,
2199
+ "domain" in e && e.domain && `Domain=${e.domain}`,
2200
+ "secure" in e && e.secure && "Secure",
2201
+ "httpOnly" in e && e.httpOnly && "HttpOnly",
2202
+ "sameSite" in e && e.sameSite && `SameSite=${e.sameSite}`,
2203
+ "partitioned" in e && e.partitioned && "Partitioned",
2204
+ "priority" in e && e.priority && `Priority=${e.priority}`
2205
+ ].filter(Boolean), n = `${e.name}=${encodeURIComponent((t = e.value) != null ? t : "")}`;
2206
+ return r.length === 0 ? n : `${n}; ${r.join("; ")}`;
2207
+ }
2208
+ function Ce(e) {
2209
+ const t = /* @__PURE__ */ new Map();
2210
+ for (const r of e.split(/; */)) {
2211
+ if (!r)
2212
+ continue;
2213
+ const n = r.indexOf("=");
2214
+ if (n === -1) {
2215
+ t.set(r, "true");
2216
+ continue;
2217
+ }
2218
+ const [a, o] = [r.slice(0, n), r.slice(n + 1)];
2219
+ try {
2220
+ t.set(a, decodeURIComponent(o ?? "true"));
2221
+ } catch {
2222
+ }
2223
+ }
2224
+ return t;
2225
+ }
2226
+ function dt(e) {
2227
+ if (!e)
2228
+ return;
2229
+ const [[t, r], ...n] = Ce(e), {
2230
+ domain: a,
2231
+ expires: o,
2232
+ httponly: l,
2233
+ maxage: i,
2234
+ path: d,
2235
+ samesite: g,
2236
+ secure: s,
2237
+ partitioned: u,
2238
+ priority: w
2239
+ } = Object.fromEntries(
2240
+ n.map(([y, _]) => [y.toLowerCase(), _])
2241
+ ), v = {
2242
+ name: t,
2243
+ value: decodeURIComponent(r),
2244
+ domain: a,
2245
+ ...o && { expires: new Date(o) },
2246
+ ...l && { httpOnly: !0 },
2247
+ ...typeof i == "string" && { maxAge: Number(i) },
2248
+ path: d,
2249
+ ...g && { sameSite: Gn(g) },
2250
+ ...s && { secure: !0 },
2251
+ ...w && { priority: Wn(w) },
2252
+ ...u && { partitioned: !0 }
2253
+ };
2254
+ return Bn(v);
2255
+ }
2256
+ function Bn(e) {
2257
+ const t = {};
2258
+ for (const r in e)
2259
+ e[r] && (t[r] = e[r]);
2260
+ return t;
2261
+ }
2262
+ var zn = ["strict", "lax", "none"];
2263
+ function Gn(e) {
2264
+ return e = e.toLowerCase(), zn.includes(e) ? e : void 0;
2265
+ }
2266
+ var Vn = ["low", "medium", "high"];
2267
+ function Wn(e) {
2268
+ return e = e.toLowerCase(), Vn.includes(e) ? e : void 0;
2269
+ }
2270
+ function Qn(e) {
2271
+ if (!e)
2272
+ return [];
2273
+ var t = [], r = 0, n, a, o, l, i;
2274
+ function d() {
2275
+ for (; r < e.length && /\s/.test(e.charAt(r)); )
2276
+ r += 1;
2277
+ return r < e.length;
2278
+ }
2279
+ function g() {
2280
+ return a = e.charAt(r), a !== "=" && a !== ";" && a !== ",";
2281
+ }
2282
+ for (; r < e.length; ) {
2283
+ for (n = r, i = !1; d(); )
2284
+ if (a = e.charAt(r), a === ",") {
2285
+ for (o = r, r += 1, d(), l = r; r < e.length && g(); )
2286
+ r += 1;
2287
+ r < e.length && e.charAt(r) === "=" ? (i = !0, r = l, t.push(e.substring(n, o)), n = r) : r = o + 1;
2288
+ } else
2289
+ r += 1;
2290
+ (!i || r >= e.length) && t.push(e.substring(n, e.length));
2291
+ }
2292
+ return t;
2293
+ }
2294
+ var Xn = class {
2295
+ constructor(e) {
2296
+ this._parsed = /* @__PURE__ */ new Map(), this._headers = e;
2297
+ const t = e.get("cookie");
2298
+ if (t) {
2299
+ const r = Ce(t);
2300
+ for (const [n, a] of r)
2301
+ this._parsed.set(n, { name: n, value: a });
2302
+ }
2303
+ }
2304
+ [Symbol.iterator]() {
2305
+ return this._parsed[Symbol.iterator]();
2306
+ }
2307
+ /**
2308
+ * The amount of cookies received from the client
2309
+ */
2310
+ get size() {
2311
+ return this._parsed.size;
2312
+ }
2313
+ get(...e) {
2314
+ const t = typeof e[0] == "string" ? e[0] : e[0].name;
2315
+ return this._parsed.get(t);
2316
+ }
2317
+ getAll(...e) {
2318
+ var t;
2319
+ const r = Array.from(this._parsed);
2320
+ if (!e.length)
2321
+ return r.map(([a, o]) => o);
2322
+ const n = typeof e[0] == "string" ? e[0] : (t = e[0]) == null ? void 0 : t.name;
2323
+ return r.filter(([a]) => a === n).map(([a, o]) => o);
2324
+ }
2325
+ has(e) {
2326
+ return this._parsed.has(e);
2327
+ }
2328
+ set(...e) {
2329
+ const [t, r] = e.length === 1 ? [e[0].name, e[0].value] : e, n = this._parsed;
2330
+ return n.set(t, { name: t, value: r }), this._headers.set(
2331
+ "cookie",
2332
+ Array.from(n).map(([a, o]) => K(o)).join("; ")
2333
+ ), this;
2334
+ }
2335
+ /**
2336
+ * Delete the cookies matching the passed name or names in the request.
2337
+ */
2338
+ delete(e) {
2339
+ const t = this._parsed, r = Array.isArray(e) ? e.map((n) => t.delete(n)) : t.delete(e);
2340
+ return this._headers.set(
2341
+ "cookie",
2342
+ Array.from(t).map(([n, a]) => K(a)).join("; ")
2343
+ ), r;
2344
+ }
2345
+ /**
2346
+ * Delete all the cookies in the cookies in the request.
2347
+ */
2348
+ clear() {
2349
+ return this.delete(Array.from(this._parsed.keys())), this;
2350
+ }
2351
+ /**
2352
+ * Format the cookies in the request as a string for logging
2353
+ */
2354
+ [Symbol.for("edge-runtime.inspect.custom")]() {
2355
+ return `RequestCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`;
2356
+ }
2357
+ toString() {
2358
+ return [...this._parsed.values()].map((e) => `${e.name}=${encodeURIComponent(e.value)}`).join("; ");
2359
+ }
2360
+ }, Kn = class {
2361
+ constructor(e) {
2362
+ this._parsed = /* @__PURE__ */ new Map();
2363
+ var t, r, n;
2364
+ this._headers = e;
2365
+ const a = (n = (r = (t = e.getSetCookie) == null ? void 0 : t.call(e)) != null ? r : e.get("set-cookie")) != null ? n : [], o = Array.isArray(a) ? a : Qn(a);
2366
+ for (const l of o) {
2367
+ const i = dt(l);
2368
+ i && this._parsed.set(i.name, i);
2369
+ }
2370
+ }
2371
+ /**
2372
+ * {@link https://wicg.github.io/cookie-store/#CookieStore-get CookieStore#get} without the Promise.
2373
+ */
2374
+ get(...e) {
2375
+ const t = typeof e[0] == "string" ? e[0] : e[0].name;
2376
+ return this._parsed.get(t);
2377
+ }
2378
+ /**
2379
+ * {@link https://wicg.github.io/cookie-store/#CookieStore-getAll CookieStore#getAll} without the Promise.
2380
+ */
2381
+ getAll(...e) {
2382
+ var t;
2383
+ const r = Array.from(this._parsed.values());
2384
+ if (!e.length)
2385
+ return r;
2386
+ const n = typeof e[0] == "string" ? e[0] : (t = e[0]) == null ? void 0 : t.name;
2387
+ return r.filter((a) => a.name === n);
2388
+ }
2389
+ has(e) {
2390
+ return this._parsed.has(e);
2391
+ }
2392
+ /**
2393
+ * {@link https://wicg.github.io/cookie-store/#CookieStore-set CookieStore#set} without the Promise.
2394
+ */
2395
+ set(...e) {
2396
+ const [t, r, n] = e.length === 1 ? [e[0].name, e[0].value, e[0]] : e, a = this._parsed;
2397
+ return a.set(t, Zn({ name: t, value: r, ...n })), Jn(a, this._headers), this;
2398
+ }
2399
+ /**
2400
+ * {@link https://wicg.github.io/cookie-store/#CookieStore-delete CookieStore#delete} without the Promise.
2401
+ */
2402
+ delete(...e) {
2403
+ const [t, r, n] = typeof e[0] == "string" ? [e[0]] : [e[0].name, e[0].path, e[0].domain];
2404
+ return this.set({ name: t, path: r, domain: n, value: "", expires: /* @__PURE__ */ new Date(0) });
2405
+ }
2406
+ [Symbol.for("edge-runtime.inspect.custom")]() {
2407
+ return `ResponseCookies ${JSON.stringify(Object.fromEntries(this._parsed))}`;
2408
+ }
2409
+ toString() {
2410
+ return [...this._parsed.values()].map(K).join("; ");
2411
+ }
2412
+ };
2413
+ function Jn(e, t) {
2414
+ t.delete("set-cookie");
2415
+ for (const [, r] of e) {
2416
+ const n = K(r);
2417
+ t.append("set-cookie", n);
2418
+ }
2419
+ }
2420
+ function Zn(e = { name: "", value: "" }) {
2421
+ return typeof e.expires == "number" && (e.expires = new Date(e.expires)), e.maxAge && (e.expires = new Date(Date.now() + e.maxAge * 1e3)), (e.path === null || e.path === void 0) && (e.path = "/"), e;
2422
+ }
2423
+ (function(e) {
2424
+ Object.defineProperty(e, "__esModule", {
2425
+ value: !0
2426
+ });
2427
+ function t(n, a) {
2428
+ for (var o in a) Object.defineProperty(n, o, {
2429
+ enumerable: !0,
2430
+ get: a[o]
2431
+ });
2432
+ }
2433
+ t(e, {
2434
+ RequestCookies: function() {
2435
+ return r.RequestCookies;
2436
+ },
2437
+ ResponseCookies: function() {
2438
+ return r.ResponseCookies;
2439
+ },
2440
+ stringifyCookie: function() {
2441
+ return r.stringifyCookie;
2442
+ }
2443
+ });
2444
+ const r = Mn;
2445
+ })(pe);
2446
+ (function(e) {
2447
+ Object.defineProperty(e, "__esModule", {
2448
+ value: !0
2449
+ });
2450
+ function t(d, g) {
2451
+ for (var s in g) Object.defineProperty(d, s, {
2452
+ enumerable: !0,
2453
+ get: g[s]
2454
+ });
2455
+ }
2456
+ t(e, {
2457
+ INTERNALS: function() {
2458
+ return l;
2459
+ },
2460
+ NextRequest: function() {
2461
+ return i;
2462
+ }
2463
+ });
2464
+ const r = Pe, n = xe, a = ct, o = pe, l = Symbol("internal request");
2465
+ class i extends Request {
2466
+ constructor(g, s = {}) {
2467
+ const u = typeof g != "string" && "url" in g ? g.url : String(g);
2468
+ (0, n.validateURL)(u), g instanceof Request ? super(g, s) : super(u, s);
2469
+ const w = new r.NextURL(u, {
2470
+ headers: (0, n.toNodeOutgoingHttpHeaders)(this.headers),
2471
+ nextConfig: s.nextConfig
2472
+ });
2473
+ this[l] = {
2474
+ cookies: new o.RequestCookies(this.headers),
2475
+ geo: s.geo || {},
2476
+ ip: s.ip,
2477
+ nextUrl: w,
2478
+ url: process.env.__NEXT_NO_MIDDLEWARE_URL_NORMALIZE ? u : w.toString()
2479
+ };
2480
+ }
2481
+ [Symbol.for("edge-runtime.inspect.custom")]() {
2482
+ return {
2483
+ cookies: this.cookies,
2484
+ geo: this.geo,
2485
+ ip: this.ip,
2486
+ nextUrl: this.nextUrl,
2487
+ url: this.url,
2488
+ // rest of props come from Request
2489
+ bodyUsed: this.bodyUsed,
2490
+ cache: this.cache,
2491
+ credentials: this.credentials,
2492
+ destination: this.destination,
2493
+ headers: Object.fromEntries(this.headers),
2494
+ integrity: this.integrity,
2495
+ keepalive: this.keepalive,
2496
+ method: this.method,
2497
+ mode: this.mode,
2498
+ redirect: this.redirect,
2499
+ referrer: this.referrer,
2500
+ referrerPolicy: this.referrerPolicy,
2501
+ signal: this.signal
2502
+ };
2503
+ }
2504
+ get cookies() {
2505
+ return this[l].cookies;
2506
+ }
2507
+ get geo() {
2508
+ return this[l].geo;
2509
+ }
2510
+ get ip() {
2511
+ return this[l].ip;
2512
+ }
2513
+ get nextUrl() {
2514
+ return this[l].nextUrl;
2515
+ }
2516
+ /**
2517
+ * @deprecated
2518
+ * `page` has been deprecated in favour of `URLPattern`.
2519
+ * Read more: https://nextjs.org/docs/messages/middleware-request-page
2520
+ */
2521
+ get page() {
2522
+ throw new a.RemovedPageError();
2523
+ }
2524
+ /**
2525
+ * @deprecated
2526
+ * `ua` has been removed in favour of \`userAgent\` function.
2527
+ * Read more: https://nextjs.org/docs/messages/middleware-parse-user-agent
2528
+ */
2529
+ get ua() {
2530
+ throw new a.RemovedUAError();
2531
+ }
2532
+ get url() {
2533
+ return this[l].url;
2534
+ }
2535
+ }
2536
+ })(nt);
2537
+ var pt = {}, mt = {};
2538
+ (function(e) {
2539
+ Object.defineProperty(e, "__esModule", {
2540
+ value: !0
2541
+ }), Object.defineProperty(e, "ReflectAdapter", {
2542
+ enumerable: !0,
2543
+ get: function() {
2544
+ return t;
2545
+ }
2546
+ });
2547
+ class t {
2548
+ static get(n, a, o) {
2549
+ const l = Reflect.get(n, a, o);
2550
+ return typeof l == "function" ? l.bind(n) : l;
2551
+ }
2552
+ static set(n, a, o, l) {
2553
+ return Reflect.set(n, a, o, l);
2554
+ }
2555
+ static has(n, a) {
2556
+ return Reflect.has(n, a);
2557
+ }
2558
+ static deleteProperty(n, a) {
2559
+ return Reflect.deleteProperty(n, a);
2560
+ }
2561
+ }
2562
+ })(mt);
2563
+ (function(e) {
2564
+ Object.defineProperty(e, "__esModule", {
2565
+ value: !0
2566
+ }), Object.defineProperty(e, "NextResponse", {
2567
+ enumerable: !0,
2568
+ get: function() {
2569
+ return g;
2570
+ }
2571
+ });
2572
+ const t = pe, r = Pe, n = xe, a = mt, o = pe, l = Symbol("internal response"), i = /* @__PURE__ */ new Set([
2573
+ 301,
2574
+ 302,
2575
+ 303,
2576
+ 307,
2577
+ 308
2578
+ ]);
2579
+ function d(s, u) {
2580
+ var w;
2581
+ if (!(s == null || (w = s.request) == null) && w.headers) {
2582
+ if (!(s.request.headers instanceof Headers))
2583
+ throw new Error("request.headers must be an instance of Headers");
2584
+ const v = [];
2585
+ for (const [y, _] of s.request.headers)
2586
+ u.set("x-middleware-request-" + y, _), v.push(y);
2587
+ u.set("x-middleware-override-headers", v.join(","));
2588
+ }
2589
+ }
2590
+ class g extends Response {
2591
+ constructor(u, w = {}) {
2592
+ super(u, w);
2593
+ const v = this.headers, y = new o.ResponseCookies(v), _ = new Proxy(y, {
2594
+ get(p, b, m) {
2595
+ switch (b) {
2596
+ case "delete":
2597
+ case "set":
2598
+ return (...h) => {
2599
+ const f = Reflect.apply(p[b], p, h), E = new Headers(v);
2600
+ return f instanceof o.ResponseCookies && v.set("x-middleware-set-cookie", f.getAll().map((q) => (0, t.stringifyCookie)(q)).join(",")), d(w, E), f;
2601
+ };
2602
+ default:
2603
+ return a.ReflectAdapter.get(p, b, m);
2604
+ }
2605
+ }
2606
+ });
2607
+ this[l] = {
2608
+ cookies: _,
2609
+ url: w.url ? new r.NextURL(w.url, {
2610
+ headers: (0, n.toNodeOutgoingHttpHeaders)(v),
2611
+ nextConfig: w.nextConfig
2612
+ }) : void 0
2613
+ };
2614
+ }
2615
+ [Symbol.for("edge-runtime.inspect.custom")]() {
2616
+ return {
2617
+ cookies: this.cookies,
2618
+ url: this.url,
2619
+ // rest of props come from Response
2620
+ body: this.body,
2621
+ bodyUsed: this.bodyUsed,
2622
+ headers: Object.fromEntries(this.headers),
2623
+ ok: this.ok,
2624
+ redirected: this.redirected,
2625
+ status: this.status,
2626
+ statusText: this.statusText,
2627
+ type: this.type
2628
+ };
2629
+ }
2630
+ get cookies() {
2631
+ return this[l].cookies;
2632
+ }
2633
+ static json(u, w) {
2634
+ const v = Response.json(u, w);
2635
+ return new g(v.body, v);
2636
+ }
2637
+ static redirect(u, w) {
2638
+ const v = typeof w == "number" ? w : (w == null ? void 0 : w.status) ?? 307;
2639
+ if (!i.has(v))
2640
+ throw new RangeError('Failed to execute "redirect" on "response": Invalid status code');
2641
+ const y = typeof w == "object" ? w : {}, _ = new Headers(y == null ? void 0 : y.headers);
2642
+ return _.set("Location", (0, n.validateURL)(u)), new g(null, {
2643
+ ...y,
2644
+ headers: _,
2645
+ status: v
2646
+ });
2647
+ }
2648
+ static rewrite(u, w) {
2649
+ const v = new Headers(w == null ? void 0 : w.headers);
2650
+ return v.set("x-middleware-rewrite", (0, n.validateURL)(u)), d(w, v), new g(null, {
2651
+ ...w,
2652
+ headers: v
2653
+ });
2654
+ }
2655
+ static next(u) {
2656
+ const w = new Headers(u == null ? void 0 : u.headers);
2657
+ return w.set("x-middleware-next", "1"), d(u, w), new g(null, {
2658
+ ...u,
2659
+ headers: w
2660
+ });
2661
+ }
2662
+ }
2663
+ })(pt);
2664
+ var ht = {};
2665
+ (function(e) {
2666
+ Object.defineProperty(e, "__esModule", {
2667
+ value: !0
2668
+ }), Object.defineProperty(e, "ImageResponse", {
2669
+ enumerable: !0,
2670
+ get: function() {
2671
+ return t;
2672
+ }
2673
+ });
2674
+ function t() {
2675
+ throw new Error('ImageResponse moved from "next/server" to "next/og" since Next.js 14, please import from "next/og" instead');
2676
+ }
2677
+ })(ht);
2678
+ var Ie = {}, ft = { exports: {} };
2679
+ (() => {
2680
+ var e = { 226: function(a, o) {
2681
+ (function(l, i) {
2682
+ var d = "1.0.35", g = "", s = "?", u = "function", w = "undefined", v = "object", y = "string", _ = "major", p = "model", b = "name", m = "type", h = "vendor", f = "version", E = "architecture", q = "console", I = "mobile", R = "tablet", C = "smarttv", j = "wearable", $ = "embedded", D = 350, U = "Amazon", B = "Apple", Z = "ASUS", ke = "BlackBerry", G = "Browser", Y = "Chrome", bt = "Edge", ee = "Firefox", te = "Google", Ee = "Huawei", he = "LG", fe = "Microsoft", Ae = "Motorola", re = "Opera", ge = "Samsung", Oe = "Sharp", ne = "Sony", be = "Xiaomi", we = "Zebra", Te = "Facebook", qe = "Chromium OS", Ne = "Mac OS", wt = function(S, A) {
2683
+ var x = {};
2684
+ for (var T in S)
2685
+ A[T] && A[T].length % 2 === 0 ? x[T] = A[T].concat(S[T]) : x[T] = S[T];
2686
+ return x;
2687
+ }, ae = function(S) {
2688
+ for (var A = {}, x = 0; x < S.length; x++)
2689
+ A[S[x].toUpperCase()] = S[x];
2690
+ return A;
2691
+ }, je = function(S, A) {
2692
+ return typeof S === y ? W(A).indexOf(W(S)) !== -1 : !1;
2693
+ }, W = function(S) {
2694
+ return S.toLowerCase();
2695
+ }, vt = function(S) {
2696
+ return typeof S === y ? S.replace(/[^\d\.]/g, g).split(".")[0] : i;
2697
+ }, ve = function(S, A) {
2698
+ if (typeof S === y)
2699
+ return S = S.replace(/^\s\s*/, g), typeof A === w ? S : S.substring(0, D);
2700
+ }, Q = function(S, A) {
2701
+ for (var x = 0, T, z, H, k, P, M; x < A.length && !P; ) {
2702
+ var _e = A[x], Le = A[x + 1];
2703
+ for (T = z = 0; T < _e.length && !P && _e[T]; )
2704
+ if (P = _e[T++].exec(S), P)
2705
+ for (H = 0; H < Le.length; H++)
2706
+ M = P[++z], k = Le[H], typeof k === v && k.length > 0 ? k.length === 2 ? typeof k[1] == u ? this[k[0]] = k[1].call(this, M) : this[k[0]] = k[1] : k.length === 3 ? typeof k[1] === u && !(k[1].exec && k[1].test) ? this[k[0]] = M ? k[1].call(this, M, k[2]) : i : this[k[0]] = M ? M.replace(k[1], k[2]) : i : k.length === 4 && (this[k[0]] = M ? k[3].call(this, M.replace(k[1], k[2])) : i) : this[k] = M || i;
2707
+ x += 2;
2708
+ }
2709
+ }, ye = function(S, A) {
2710
+ for (var x in A)
2711
+ if (typeof A[x] === v && A[x].length > 0) {
2712
+ for (var T = 0; T < A[x].length; T++)
2713
+ if (je(A[x][T], S))
2714
+ return x === s ? i : x;
2715
+ } else if (je(A[x], S))
2716
+ return x === s ? i : x;
2717
+ return S;
2718
+ }, yt = { "1.0": "/8", 1.2: "/1", 1.3: "/3", "2.0": "/412", "2.0.2": "/416", "2.0.3": "/417", "2.0.4": "/419", "?": "/" }, Fe = { ME: "4.90", "NT 3.11": "NT3.51", "NT 4.0": "NT4.0", 2e3: "NT 5.0", XP: ["NT 5.1", "NT 5.2"], Vista: "NT 6.0", 7: "NT 6.1", 8: "NT 6.2", 8.1: "NT 6.3", 10: ["NT 6.4", "NT 10.0"], RT: "ARM" }, $e = { browser: [[/\b(?:crmo|crios)\/([\w\.]+)/i], [f, [b, "Chrome"]], [/edg(?:e|ios|a)?\/([\w\.]+)/i], [f, [b, "Edge"]], [/(opera mini)\/([-\w\.]+)/i, /(opera [mobiletab]{3,6})\b.+version\/([-\w\.]+)/i, /(opera)(?:.+version\/|[\/ ]+)([\w\.]+)/i], [b, f], [/opios[\/ ]+([\w\.]+)/i], [f, [b, re + " Mini"]], [/\bopr\/([\w\.]+)/i], [f, [b, re]], [/(kindle)\/([\w\.]+)/i, /(lunascape|maxthon|netfront|jasmine|blazer)[\/ ]?([\w\.]*)/i, /(avant |iemobile|slim)(?:browser)?[\/ ]?([\w\.]*)/i, /(ba?idubrowser)[\/ ]?([\w\.]+)/i, /(?:ms|\()(ie) ([\w\.]+)/i, /(flock|rockmelt|midori|epiphany|silk|skyfire|bolt|iron|vivaldi|iridium|phantomjs|bowser|quark|qupzilla|falkon|rekonq|puffin|brave|whale(?!.+naver)|qqbrowserlite|qq|duckduckgo)\/([-\w\.]+)/i, /(heytap|ovi)browser\/([\d\.]+)/i, /(weibo)__([\d\.]+)/i], [b, f], [/(?:\buc? ?browser|(?:juc.+)ucweb)[\/ ]?([\w\.]+)/i], [f, [b, "UC" + G]], [/microm.+\bqbcore\/([\w\.]+)/i, /\bqbcore\/([\w\.]+).+microm/i], [f, [b, "WeChat(Win) Desktop"]], [/micromessenger\/([\w\.]+)/i], [f, [b, "WeChat"]], [/konqueror\/([\w\.]+)/i], [f, [b, "Konqueror"]], [/trident.+rv[: ]([\w\.]{1,9})\b.+like gecko/i], [f, [b, "IE"]], [/ya(?:search)?browser\/([\w\.]+)/i], [f, [b, "Yandex"]], [/(avast|avg)\/([\w\.]+)/i], [[b, /(.+)/, "$1 Secure " + G], f], [/\bfocus\/([\w\.]+)/i], [f, [b, ee + " Focus"]], [/\bopt\/([\w\.]+)/i], [f, [b, re + " Touch"]], [/coc_coc\w+\/([\w\.]+)/i], [f, [b, "Coc Coc"]], [/dolfin\/([\w\.]+)/i], [f, [b, "Dolphin"]], [/coast\/([\w\.]+)/i], [f, [b, re + " Coast"]], [/miuibrowser\/([\w\.]+)/i], [f, [b, "MIUI " + G]], [/fxios\/([-\w\.]+)/i], [f, [b, ee]], [/\bqihu|(qi?ho?o?|360)browser/i], [[b, "360 " + G]], [/(oculus|samsung|sailfish|huawei)browser\/([\w\.]+)/i], [[b, /(.+)/, "$1 " + G], f], [/(comodo_dragon)\/([\w\.]+)/i], [[b, /_/g, " "], f], [/(electron)\/([\w\.]+) safari/i, /(tesla)(?: qtcarbrowser|\/(20\d\d\.[-\w\.]+))/i, /m?(qqbrowser|baiduboxapp|2345Explorer)[\/ ]?([\w\.]+)/i], [b, f], [/(metasr)[\/ ]?([\w\.]+)/i, /(lbbrowser)/i, /\[(linkedin)app\]/i], [b], [/((?:fban\/fbios|fb_iab\/fb4a)(?!.+fbav)|;fbav\/([\w\.]+);)/i], [[b, Te], f], [/(kakao(?:talk|story))[\/ ]([\w\.]+)/i, /(naver)\(.*?(\d+\.[\w\.]+).*\)/i, /safari (line)\/([\w\.]+)/i, /\b(line)\/([\w\.]+)\/iab/i, /(chromium|instagram)[\/ ]([-\w\.]+)/i], [b, f], [/\bgsa\/([\w\.]+) .*safari\//i], [f, [b, "GSA"]], [/musical_ly(?:.+app_?version\/|_)([\w\.]+)/i], [f, [b, "TikTok"]], [/headlesschrome(?:\/([\w\.]+)| )/i], [f, [b, Y + " Headless"]], [/ wv\).+(chrome)\/([\w\.]+)/i], [[b, Y + " WebView"], f], [/droid.+ version\/([\w\.]+)\b.+(?:mobile safari|safari)/i], [f, [b, "Android " + G]], [/(chrome|omniweb|arora|[tizenoka]{5} ?browser)\/v?([\w\.]+)/i], [b, f], [/version\/([\w\.\,]+) .*mobile\/\w+ (safari)/i], [f, [b, "Mobile Safari"]], [/version\/([\w(\.|\,)]+) .*(mobile ?safari|safari)/i], [f, b], [/webkit.+?(mobile ?safari|safari)(\/[\w\.]+)/i], [b, [f, ye, yt]], [/(webkit|khtml)\/([\w\.]+)/i], [b, f], [/(navigator|netscape\d?)\/([-\w\.]+)/i], [[b, "Netscape"], f], [/mobile vr; rv:([\w\.]+)\).+firefox/i], [f, [b, ee + " Reality"]], [/ekiohf.+(flow)\/([\w\.]+)/i, /(swiftfox)/i, /(icedragon|iceweasel|camino|chimera|fennec|maemo browser|minimo|conkeror|klar)[\/ ]?([\w\.\+]+)/i, /(seamonkey|k-meleon|icecat|iceape|firebird|phoenix|palemoon|basilisk|waterfox)\/([-\w\.]+)$/i, /(firefox)\/([\w\.]+)/i, /(mozilla)\/([\w\.]+) .+rv\:.+gecko\/\d+/i, /(polaris|lynx|dillo|icab|doris|amaya|w3m|netsurf|sleipnir|obigo|mosaic|(?:go|ice|up)[\. ]?browser)[-\/ ]?v?([\w\.]+)/i, /(links) \(([\w\.]+)/i, /panasonic;(viera)/i], [b, f], [/(cobalt)\/([\w\.]+)/i], [b, [f, /master.|lts./, ""]]], cpu: [[/(?:(amd|x(?:(?:86|64)[-_])?|wow|win)64)[;\)]/i], [[E, "amd64"]], [/(ia32(?=;))/i], [[E, W]], [/((?:i[346]|x)86)[;\)]/i], [[E, "ia32"]], [/\b(aarch64|arm(v?8e?l?|_?64))\b/i], [[E, "arm64"]], [/\b(arm(?:v[67])?ht?n?[fl]p?)\b/i], [[E, "armhf"]], [/windows (ce|mobile); ppc;/i], [[E, "arm"]], [/((?:ppc|powerpc)(?:64)?)(?: mac|;|\))/i], [[E, /ower/, g, W]], [/(sun4\w)[;\)]/i], [[E, "sparc"]], [/((?:avr32|ia64(?=;))|68k(?=\))|\barm(?=v(?:[1-7]|[5-7]1)l?|;|eabi)|(?=atmel )avr|(?:irix|mips|sparc)(?:64)?\b|pa-risc)/i], [[E, W]]], device: [[/\b(sch-i[89]0\d|shw-m380s|sm-[ptx]\w{2,4}|gt-[pn]\d{2,4}|sgh-t8[56]9|nexus 10)/i], [p, [h, ge], [m, R]], [/\b((?:s[cgp]h|gt|sm)-\w+|sc[g-]?[\d]+a?|galaxy nexus)/i, /samsung[- ]([-\w]+)/i, /sec-(sgh\w+)/i], [p, [h, ge], [m, I]], [/(?:\/|\()(ip(?:hone|od)[\w, ]*)(?:\/|;)/i], [p, [h, B], [m, I]], [/\((ipad);[-\w\),; ]+apple/i, /applecoremedia\/[\w\.]+ \((ipad)/i, /\b(ipad)\d\d?,\d\d?[;\]].+ios/i], [p, [h, B], [m, R]], [/(macintosh);/i], [p, [h, B]], [/\b(sh-?[altvz]?\d\d[a-ekm]?)/i], [p, [h, Oe], [m, I]], [/\b((?:ag[rs][23]?|bah2?|sht?|btv)-a?[lw]\d{2})\b(?!.+d\/s)/i], [p, [h, Ee], [m, R]], [/(?:huawei|honor)([-\w ]+)[;\)]/i, /\b(nexus 6p|\w{2,4}e?-[atu]?[ln][\dx][012359c][adn]?)\b(?!.+d\/s)/i], [p, [h, Ee], [m, I]], [/\b(poco[\w ]+)(?: bui|\))/i, /\b; (\w+) build\/hm\1/i, /\b(hm[-_ ]?note?[_ ]?(?:\d\w)?) bui/i, /\b(redmi[\-_ ]?(?:note|k)?[\w_ ]+)(?: bui|\))/i, /\b(mi[-_ ]?(?:a\d|one|one[_ ]plus|note lte|max|cc)?[_ ]?(?:\d?\w?)[_ ]?(?:plus|se|lite)?)(?: bui|\))/i], [[p, /_/g, " "], [h, be], [m, I]], [/\b(mi[-_ ]?(?:pad)(?:[\w_ ]+))(?: bui|\))/i], [[p, /_/g, " "], [h, be], [m, R]], [/; (\w+) bui.+ oppo/i, /\b(cph[12]\d{3}|p(?:af|c[al]|d\w|e[ar])[mt]\d0|x9007|a101op)\b/i], [p, [h, "OPPO"], [m, I]], [/vivo (\w+)(?: bui|\))/i, /\b(v[12]\d{3}\w?[at])(?: bui|;)/i], [p, [h, "Vivo"], [m, I]], [/\b(rmx[12]\d{3})(?: bui|;|\))/i], [p, [h, "Realme"], [m, I]], [/\b(milestone|droid(?:[2-4x]| (?:bionic|x2|pro|razr))?:?( 4g)?)\b[\w ]+build\//i, /\bmot(?:orola)?[- ](\w*)/i, /((?:moto[\w\(\) ]+|xt\d{3,4}|nexus 6)(?= bui|\)))/i], [p, [h, Ae], [m, I]], [/\b(mz60\d|xoom[2 ]{0,2}) build\//i], [p, [h, Ae], [m, R]], [/((?=lg)?[vl]k\-?\d{3}) bui| 3\.[-\w; ]{10}lg?-([06cv9]{3,4})/i], [p, [h, he], [m, R]], [/(lm(?:-?f100[nv]?|-[\w\.]+)(?= bui|\))|nexus [45])/i, /\blg[-e;\/ ]+((?!browser|netcast|android tv)\w+)/i, /\blg-?([\d\w]+) bui/i], [p, [h, he], [m, I]], [/(ideatab[-\w ]+)/i, /lenovo ?(s[56]000[-\w]+|tab(?:[\w ]+)|yt[-\d\w]{6}|tb[-\d\w]{6})/i], [p, [h, "Lenovo"], [m, R]], [/(?:maemo|nokia).*(n900|lumia \d+)/i, /nokia[-_ ]?([-\w\.]*)/i], [[p, /_/g, " "], [h, "Nokia"], [m, I]], [/(pixel c)\b/i], [p, [h, te], [m, R]], [/droid.+; (pixel[\daxl ]{0,6})(?: bui|\))/i], [p, [h, te], [m, I]], [/droid.+ (a?\d[0-2]{2}so|[c-g]\d{4}|so[-gl]\w+|xq-a\w[4-7][12])(?= bui|\).+chrome\/(?![1-6]{0,1}\d\.))/i], [p, [h, ne], [m, I]], [/sony tablet [ps]/i, /\b(?:sony)?sgp\w+(?: bui|\))/i], [[p, "Xperia Tablet"], [h, ne], [m, R]], [/ (kb2005|in20[12]5|be20[12][59])\b/i, /(?:one)?(?:plus)? (a\d0\d\d)(?: b|\))/i], [p, [h, "OnePlus"], [m, I]], [/(alexa)webm/i, /(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i, /(kf[a-z]+)( bui|\)).+silk\//i], [p, [h, U], [m, R]], [/((?:sd|kf)[0349hijorstuw]+)( bui|\)).+silk\//i], [[p, /(.+)/g, "Fire Phone $1"], [h, U], [m, I]], [/(playbook);[-\w\),; ]+(rim)/i], [p, h, [m, R]], [/\b((?:bb[a-f]|st[hv])100-\d)/i, /\(bb10; (\w+)/i], [p, [h, ke], [m, I]], [/(?:\b|asus_)(transfo[prime ]{4,10} \w+|eeepc|slider \w+|nexus 7|padfone|p00[cj])/i], [p, [h, Z], [m, R]], [/ (z[bes]6[027][012][km][ls]|zenfone \d\w?)\b/i], [p, [h, Z], [m, I]], [/(nexus 9)/i], [p, [h, "HTC"], [m, R]], [/(htc)[-;_ ]{1,2}([\w ]+(?=\)| bui)|\w+)/i, /(zte)[- ]([\w ]+?)(?: bui|\/|\))/i, /(alcatel|geeksphone|nexian|panasonic(?!(?:;|\.))|sony(?!-bra))[-_ ]?([-\w]*)/i], [h, [p, /_/g, " "], [m, I]], [/droid.+; ([ab][1-7]-?[0178a]\d\d?)/i], [p, [h, "Acer"], [m, R]], [/droid.+; (m[1-5] note) bui/i, /\bmz-([-\w]{2,})/i], [p, [h, "Meizu"], [m, I]], [/(blackberry|benq|palm(?=\-)|sonyericsson|acer|asus|dell|meizu|motorola|polytron)[-_ ]?([-\w]*)/i, /(hp) ([\w ]+\w)/i, /(asus)-?(\w+)/i, /(microsoft); (lumia[\w ]+)/i, /(lenovo)[-_ ]?([-\w]+)/i, /(jolla)/i, /(oppo) ?([\w ]+) bui/i], [h, p, [m, I]], [/(kobo)\s(ereader|touch)/i, /(archos) (gamepad2?)/i, /(hp).+(touchpad(?!.+tablet)|tablet)/i, /(kindle)\/([\w\.]+)/i, /(nook)[\w ]+build\/(\w+)/i, /(dell) (strea[kpr\d ]*[\dko])/i, /(le[- ]+pan)[- ]+(\w{1,9}) bui/i, /(trinity)[- ]*(t\d{3}) bui/i, /(gigaset)[- ]+(q\w{1,9}) bui/i, /(vodafone) ([\w ]+)(?:\)| bui)/i], [h, p, [m, R]], [/(surface duo)/i], [p, [h, fe], [m, R]], [/droid [\d\.]+; (fp\du?)(?: b|\))/i], [p, [h, "Fairphone"], [m, I]], [/(u304aa)/i], [p, [h, "AT&T"], [m, I]], [/\bsie-(\w*)/i], [p, [h, "Siemens"], [m, I]], [/\b(rct\w+) b/i], [p, [h, "RCA"], [m, R]], [/\b(venue[\d ]{2,7}) b/i], [p, [h, "Dell"], [m, R]], [/\b(q(?:mv|ta)\w+) b/i], [p, [h, "Verizon"], [m, R]], [/\b(?:barnes[& ]+noble |bn[rt])([\w\+ ]*) b/i], [p, [h, "Barnes & Noble"], [m, R]], [/\b(tm\d{3}\w+) b/i], [p, [h, "NuVision"], [m, R]], [/\b(k88) b/i], [p, [h, "ZTE"], [m, R]], [/\b(nx\d{3}j) b/i], [p, [h, "ZTE"], [m, I]], [/\b(gen\d{3}) b.+49h/i], [p, [h, "Swiss"], [m, I]], [/\b(zur\d{3}) b/i], [p, [h, "Swiss"], [m, R]], [/\b((zeki)?tb.*\b) b/i], [p, [h, "Zeki"], [m, R]], [/\b([yr]\d{2}) b/i, /\b(dragon[- ]+touch |dt)(\w{5}) b/i], [[h, "Dragon Touch"], p, [m, R]], [/\b(ns-?\w{0,9}) b/i], [p, [h, "Insignia"], [m, R]], [/\b((nxa|next)-?\w{0,9}) b/i], [p, [h, "NextBook"], [m, R]], [/\b(xtreme\_)?(v(1[045]|2[015]|[3469]0|7[05])) b/i], [[h, "Voice"], p, [m, I]], [/\b(lvtel\-)?(v1[12]) b/i], [[h, "LvTel"], p, [m, I]], [/\b(ph-1) /i], [p, [h, "Essential"], [m, I]], [/\b(v(100md|700na|7011|917g).*\b) b/i], [p, [h, "Envizen"], [m, R]], [/\b(trio[-\w\. ]+) b/i], [p, [h, "MachSpeed"], [m, R]], [/\btu_(1491) b/i], [p, [h, "Rotor"], [m, R]], [/(shield[\w ]+) b/i], [p, [h, "Nvidia"], [m, R]], [/(sprint) (\w+)/i], [h, p, [m, I]], [/(kin\.[onetw]{3})/i], [[p, /\./g, " "], [h, fe], [m, I]], [/droid.+; (cc6666?|et5[16]|mc[239][23]x?|vc8[03]x?)\)/i], [p, [h, we], [m, R]], [/droid.+; (ec30|ps20|tc[2-8]\d[kx])\)/i], [p, [h, we], [m, I]], [/smart-tv.+(samsung)/i], [h, [m, C]], [/hbbtv.+maple;(\d+)/i], [[p, /^/, "SmartTV"], [h, ge], [m, C]], [/(nux; netcast.+smarttv|lg (netcast\.tv-201\d|android tv))/i], [[h, he], [m, C]], [/(apple) ?tv/i], [h, [p, B + " TV"], [m, C]], [/crkey/i], [[p, Y + "cast"], [h, te], [m, C]], [/droid.+aft(\w)( bui|\))/i], [p, [h, U], [m, C]], [/\(dtv[\);].+(aquos)/i, /(aquos-tv[\w ]+)\)/i], [p, [h, Oe], [m, C]], [/(bravia[\w ]+)( bui|\))/i], [p, [h, ne], [m, C]], [/(mitv-\w{5}) bui/i], [p, [h, be], [m, C]], [/Hbbtv.*(technisat) (.*);/i], [h, p, [m, C]], [/\b(roku)[\dx]*[\)\/]((?:dvp-)?[\d\.]*)/i, /hbbtv\/\d+\.\d+\.\d+ +\([\w\+ ]*; *([\w\d][^;]*);([^;]*)/i], [[h, ve], [p, ve], [m, C]], [/\b(android tv|smart[- ]?tv|opera tv|tv; rv:)\b/i], [[m, C]], [/(ouya)/i, /(nintendo) ([wids3utch]+)/i], [h, p, [m, q]], [/droid.+; (shield) bui/i], [p, [h, "Nvidia"], [m, q]], [/(playstation [345portablevi]+)/i], [p, [h, ne], [m, q]], [/\b(xbox(?: one)?(?!; xbox))[\); ]/i], [p, [h, fe], [m, q]], [/((pebble))app/i], [h, p, [m, j]], [/(watch)(?: ?os[,\/]|\d,\d\/)[\d\.]+/i], [p, [h, B], [m, j]], [/droid.+; (glass) \d/i], [p, [h, te], [m, j]], [/droid.+; (wt63?0{2,3})\)/i], [p, [h, we], [m, j]], [/(quest( 2| pro)?)/i], [p, [h, Te], [m, j]], [/(tesla)(?: qtcarbrowser|\/[-\w\.]+)/i], [h, [m, $]], [/(aeobc)\b/i], [p, [h, U], [m, $]], [/droid .+?; ([^;]+?)(?: bui|\) applew).+? mobile safari/i], [p, [m, I]], [/droid .+?; ([^;]+?)(?: bui|\) applew).+?(?! mobile) safari/i], [p, [m, R]], [/\b((tablet|tab)[;\/]|focus\/\d(?!.+mobile))/i], [[m, R]], [/(phone|mobile(?:[;\/]| [ \w\/\.]*safari)|pda(?=.+windows ce))/i], [[m, I]], [/(android[-\w\. ]{0,9});.+buil/i], [p, [h, "Generic"]]], engine: [[/windows.+ edge\/([\w\.]+)/i], [f, [b, bt + "HTML"]], [/webkit\/537\.36.+chrome\/(?!27)([\w\.]+)/i], [f, [b, "Blink"]], [/(presto)\/([\w\.]+)/i, /(webkit|trident|netfront|netsurf|amaya|lynx|w3m|goanna)\/([\w\.]+)/i, /ekioh(flow)\/([\w\.]+)/i, /(khtml|tasman|links)[\/ ]\(?([\w\.]+)/i, /(icab)[\/ ]([23]\.[\d\.]+)/i, /\b(libweb)/i], [b, f], [/rv\:([\w\.]{1,9})\b.+(gecko)/i], [f, b]], os: [[/microsoft (windows) (vista|xp)/i], [b, f], [/(windows) nt 6\.2; (arm)/i, /(windows (?:phone(?: os)?|mobile))[\/ ]?([\d\.\w ]*)/i, /(windows)[\/ ]?([ntce\d\. ]+\w)(?!.+xbox)/i], [b, [f, ye, Fe]], [/(win(?=3|9|n)|win 9x )([nt\d\.]+)/i], [[b, "Windows"], [f, ye, Fe]], [/ip[honead]{2,4}\b(?:.*os ([\w]+) like mac|; opera)/i, /ios;fbsv\/([\d\.]+)/i, /cfnetwork\/.+darwin/i], [[f, /_/g, "."], [b, "iOS"]], [/(mac os x) ?([\w\. ]*)/i, /(macintosh|mac_powerpc\b)(?!.+haiku)/i], [[b, Ne], [f, /_/g, "."]], [/droid ([\w\.]+)\b.+(android[- ]x86|harmonyos)/i], [f, b], [/(android|webos|qnx|bada|rim tablet os|maemo|meego|sailfish)[-\/ ]?([\w\.]*)/i, /(blackberry)\w*\/([\w\.]*)/i, /(tizen|kaios)[\/ ]([\w\.]+)/i, /\((series40);/i], [b, f], [/\(bb(10);/i], [f, [b, ke]], [/(?:symbian ?os|symbos|s60(?=;)|series60)[-\/ ]?([\w\.]*)/i], [f, [b, "Symbian"]], [/mozilla\/[\d\.]+ \((?:mobile|tablet|tv|mobile; [\w ]+); rv:.+ gecko\/([\w\.]+)/i], [f, [b, ee + " OS"]], [/web0s;.+rt(tv)/i, /\b(?:hp)?wos(?:browser)?\/([\w\.]+)/i], [f, [b, "webOS"]], [/watch(?: ?os[,\/]|\d,\d\/)([\d\.]+)/i], [f, [b, "watchOS"]], [/crkey\/([\d\.]+)/i], [f, [b, Y + "cast"]], [/(cros) [\w]+(?:\)| ([\w\.]+)\b)/i], [[b, qe], f], [/panasonic;(viera)/i, /(netrange)mmh/i, /(nettv)\/(\d+\.[\w\.]+)/i, /(nintendo|playstation) ([wids345portablevuch]+)/i, /(xbox); +xbox ([^\);]+)/i, /\b(joli|palm)\b ?(?:os)?\/?([\w\.]*)/i, /(mint)[\/\(\) ]?(\w*)/i, /(mageia|vectorlinux)[; ]/i, /([kxln]?ubuntu|debian|suse|opensuse|gentoo|arch(?= linux)|slackware|fedora|mandriva|centos|pclinuxos|red ?hat|zenwalk|linpus|raspbian|plan 9|minix|risc os|contiki|deepin|manjaro|elementary os|sabayon|linspire)(?: gnu\/linux)?(?: enterprise)?(?:[- ]linux)?(?:-gnu)?[-\/ ]?(?!chrom|package)([-\w\.]*)/i, /(hurd|linux) ?([\w\.]*)/i, /(gnu) ?([\w\.]*)/i, /\b([-frentopcghs]{0,5}bsd|dragonfly)[\/ ]?(?!amd|[ix346]{1,2}86)([\w\.]*)/i, /(haiku) (\w+)/i], [b, f], [/(sunos) ?([\w\.\d]*)/i], [[b, "Solaris"], f], [/((?:open)?solaris)[-\/ ]?([\w\.]*)/i, /(aix) ((\d)(?=\.|\)| )[\w\.])*/i, /\b(beos|os\/2|amigaos|morphos|openvms|fuchsia|hp-ux|serenityos)/i, /(unix) ?([\w\.]*)/i], [b, f]] }, L = function(S, A) {
2719
+ if (typeof S === v && (A = S, S = i), !(this instanceof L))
2720
+ return new L(S, A).getResult();
2721
+ var x = typeof l !== w && l.navigator ? l.navigator : i, T = S || (x && x.userAgent ? x.userAgent : g), z = x && x.userAgentData ? x.userAgentData : i, H = A ? wt($e, A) : $e, k = x && x.userAgent == T;
2722
+ return this.getBrowser = function() {
2723
+ var P = {};
2724
+ return P[b] = i, P[f] = i, Q.call(P, T, H.browser), P[_] = vt(P[f]), k && x && x.brave && typeof x.brave.isBrave == u && (P[b] = "Brave"), P;
2725
+ }, this.getCPU = function() {
2726
+ var P = {};
2727
+ return P[E] = i, Q.call(P, T, H.cpu), P;
2728
+ }, this.getDevice = function() {
2729
+ var P = {};
2730
+ return P[h] = i, P[p] = i, P[m] = i, Q.call(P, T, H.device), k && !P[m] && z && z.mobile && (P[m] = I), k && P[p] == "Macintosh" && x && typeof x.standalone !== w && x.maxTouchPoints && x.maxTouchPoints > 2 && (P[p] = "iPad", P[m] = R), P;
2731
+ }, this.getEngine = function() {
2732
+ var P = {};
2733
+ return P[b] = i, P[f] = i, Q.call(P, T, H.engine), P;
2734
+ }, this.getOS = function() {
2735
+ var P = {};
2736
+ return P[b] = i, P[f] = i, Q.call(P, T, H.os), k && !P[b] && z && z.platform != "Unknown" && (P[b] = z.platform.replace(/chrome os/i, qe).replace(/macos/i, Ne)), P;
2737
+ }, this.getResult = function() {
2738
+ return { ua: this.getUA(), browser: this.getBrowser(), engine: this.getEngine(), os: this.getOS(), device: this.getDevice(), cpu: this.getCPU() };
2739
+ }, this.getUA = function() {
2740
+ return T;
2741
+ }, this.setUA = function(P) {
2742
+ return T = typeof P === y && P.length > D ? ve(P, D) : P, this;
2743
+ }, this.setUA(T), this;
2744
+ };
2745
+ L.VERSION = d, L.BROWSER = ae([b, f, _]), L.CPU = ae([E]), L.DEVICE = ae([p, h, m, q, I, C, R, j, $]), L.ENGINE = L.OS = ae([b, f]), typeof o !== w ? (a.exports && (o = a.exports = L), o.UAParser = L) : typeof l !== w && (l.UAParser = L);
2746
+ var V = typeof l !== w && (l.jQuery || l.Zepto);
2747
+ if (V && !V.ua) {
2748
+ var ie = new L();
2749
+ V.ua = ie.getResult(), V.ua.get = function() {
2750
+ return ie.getUA();
2751
+ }, V.ua.set = function(S) {
2752
+ ie.setUA(S);
2753
+ var A = ie.getResult();
2754
+ for (var x in A)
2755
+ V.ua[x] = A[x];
2756
+ };
2757
+ }
2758
+ })(typeof window == "object" ? window : this);
2759
+ } }, t = {};
2760
+ function r(a) {
2761
+ var o = t[a];
2762
+ if (o !== void 0)
2763
+ return o.exports;
2764
+ var l = t[a] = { exports: {} }, i = !0;
2765
+ try {
2766
+ e[a].call(l.exports, l, l.exports, r), i = !1;
2767
+ } finally {
2768
+ i && delete t[a];
2769
+ }
2770
+ return l.exports;
2771
+ }
2772
+ typeof r < "u" && (r.ab = __dirname + "/");
2773
+ var n = r(226);
2774
+ ft.exports = n;
2775
+ })();
2776
+ var Yn = ft.exports;
2777
+ (function(e) {
2778
+ Object.defineProperty(e, "__esModule", {
2779
+ value: !0
2780
+ });
2781
+ function t(i, d) {
2782
+ for (var g in d) Object.defineProperty(i, g, {
2783
+ enumerable: !0,
2784
+ get: d[g]
2785
+ });
2786
+ }
2787
+ t(e, {
2788
+ isBot: function() {
2789
+ return a;
2790
+ },
2791
+ userAgent: function() {
2792
+ return l;
2793
+ },
2794
+ userAgentFromString: function() {
2795
+ return o;
2796
+ }
2797
+ });
2798
+ const r = /* @__PURE__ */ n(Yn);
2799
+ function n(i) {
2800
+ return i && i.__esModule ? i : {
2801
+ default: i
2802
+ };
2803
+ }
2804
+ function a(i) {
2805
+ return /Googlebot|Mediapartners-Google|AdsBot-Google|googleweblight|Storebot-Google|Google-PageRenderer|Google-InspectionTool|Bingbot|BingPreview|Slurp|DuckDuckBot|baiduspider|yandex|sogou|LinkedInBot|bitlybot|tumblr|vkShare|quora link preview|facebookexternalhit|facebookcatalog|Twitterbot|applebot|redditbot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|ia_archiver/i.test(i);
2806
+ }
2807
+ function o(i) {
2808
+ return {
2809
+ ...(0, r.default)(i),
2810
+ isBot: i === void 0 ? !1 : a(i)
1736
2811
  };
2812
+ }
2813
+ function l({ headers: i }) {
2814
+ return o(i.get("user-agent") || void 0);
2815
+ }
2816
+ })(Ie);
2817
+ var gt = {};
2818
+ (function(e) {
2819
+ Object.defineProperty(e, "__esModule", {
2820
+ value: !0
2821
+ }), Object.defineProperty(e, "URLPattern", {
2822
+ enumerable: !0,
2823
+ get: function() {
2824
+ return t;
2825
+ }
1737
2826
  });
2827
+ const t = (
2828
+ // @ts-expect-error: URLPattern is not available in Node.js
2829
+ typeof URLPattern > "u" ? void 0 : URLPattern
2830
+ );
2831
+ })(gt);
2832
+ (function(e, t) {
2833
+ const r = {
2834
+ NextRequest: nt.NextRequest,
2835
+ NextResponse: pt.NextResponse,
2836
+ ImageResponse: ht.ImageResponse,
2837
+ userAgentFromString: Ie.userAgentFromString,
2838
+ userAgent: Ie.userAgent,
2839
+ URLPattern: gt.URLPattern
2840
+ };
2841
+ e.exports = r, t.NextRequest = r.NextRequest, t.NextResponse = r.NextResponse, t.ImageResponse = r.ImageResponse, t.userAgentFromString = r.userAgentFromString, t.userAgent = r.userAgent, t.URLPattern = r.URLPattern;
2842
+ })(Re, Re.exports);
2843
+ var He = Re.exports;
2844
+ async function ea({ apiUrl: e, extraData: t, fetchOptions: r }) {
2845
+ var I, R;
2846
+ const n = `${e}/api/dataentities`, a = `${e}/api/io/v1/extrato/get-total`, {
2847
+ MASTER_DATA_ENTITY: o,
2848
+ MASTER_DATA_FIELDS: l,
2849
+ AUTH_TOKEN_COOKIE: i,
2850
+ requestHeaders: d,
2851
+ cookies: g
2852
+ } = t, { address: s, client: u } = o, { address: w, client: v } = l, y = ((I = g == null ? void 0 : g.find((C) => (C == null ? void 0 : C.name) === i)) == null ? void 0 : I.value) || "";
2853
+ if (!y)
2854
+ return He.NextResponse.json(
2855
+ { error: "Token not found. Unauthorized" },
2856
+ { status: 200 }
2857
+ );
2858
+ const { sub: _, userId: p } = Mt(y), b = Object.fromEntries(
2859
+ Object.entries(d).map(([C, j]) => [C, String(j || "")])
2860
+ ), m = async (C, j, $ = !1) => {
2861
+ try {
2862
+ const U = await fetch(`${$ ? a : n}${C}`, {
2863
+ headers: {
2864
+ ...j,
2865
+ ...r == null ? void 0 : r.headers
2866
+ }
2867
+ }).then((Z) => Z.json()), B = Array.isArray(U) ? U[0] : U;
2868
+ return Array.isArray(B) ? B[0] : B;
2869
+ } catch (D) {
2870
+ return console.error(`Erro no fetch: ${C}`, D), null;
2871
+ }
2872
+ }, h = await m(
2873
+ `/${u}/search?email=${_}&_fields=${v.join(",")}`,
2874
+ b
2875
+ );
2876
+ if (!(h != null && h.id))
2877
+ return He.NextResponse.json({ sub: _ }, { status: 200 });
2878
+ const f = (R = h.document) == null ? void 0 : R.replace(/\D/g, ""), E = await m(
2879
+ `/${s}/search?userId=${h.id}&_fields=${w.join(
2880
+ ","
2881
+ )}&_sort=lastInteractionIn DESC`,
2882
+ { ...b, "REST-Range": "resources=0-1000" }
2883
+ ), q = f ? await m(
2884
+ `/${f}?user_code=${h.userId},${_}&per_page=1&page=1`,
2885
+ b,
2886
+ !0
2887
+ ) : null;
2888
+ return { ...h, ...E, userCredits: q, sub: _, userId: p };
1738
2889
  }
1739
- const lr = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2890
+ const ta = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1740
2891
  __proto__: null,
1741
- getWishlistProducts: cr
1742
- }, Symbol.toStringTag, { value: "Module" })), ur = {
1743
- parseSearchState: me,
1744
- convertSearchParams: de,
1745
- filterNonRootFacets: ue,
1746
- filterNonCategorySelected: le
1747
- }, hr = {
1748
- checkout: St,
1749
- catalog: Pt,
1750
- cms: pe,
1751
- search: Zt,
1752
- masterdata: ir,
2892
+ getUserData: ea
2893
+ }, Symbol.toStringTag, { value: "Module" })), ra = {
2894
+ parseSearchState: jt,
2895
+ convertSearchParams: Nt,
2896
+ filterNonRootFacets: qt,
2897
+ filterNonCategorySelected: Tt
2898
+ }, ca = {
2899
+ checkout: Qr,
2900
+ catalog: tn,
2901
+ cms: Ft,
2902
+ search: xn,
2903
+ masterdata: qn,
2904
+ user: ta,
1753
2905
  wishlist: {
1754
- ...lr
2906
+ ...jn
1755
2907
  }
1756
- }, yr = {
1757
- catalog: ye,
1758
- search: ur,
1759
- product: he,
2908
+ }, ua = {
2909
+ catalog: Ut,
2910
+ search: ra,
2911
+ product: Dt,
1760
2912
  cms: {
1761
- ...ge,
1762
- ...fe
2913
+ ...Lt,
2914
+ ...$t
1763
2915
  }
1764
- }, br = {
2916
+ }, da = {
1765
2917
  template: {
1766
2918
  pdp: {}
1767
2919
  }
1768
2920
  };
1769
2921
  export {
1770
- hr as serverAPIs,
1771
- gr as serverCMS,
1772
- br as serverComponents,
1773
- yr as serverHelpers
2922
+ ca as serverAPIs,
2923
+ la as serverCMS,
2924
+ da as serverComponents,
2925
+ ua as serverHelpers
1774
2926
  };