@soma-vertical-web/multi-lib 1.0.34 → 1.0.35

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 (71) hide show
  1. package/cms/ContentTypes/Search/SearchContent.d.ts +1 -1
  2. package/cms/Sections/ProductCarousel/request.d.ts +0 -4
  3. package/cms/index.d.ts +1 -1
  4. package/constants.d.ts +1 -0
  5. package/contexts/contexts/GlobalContext.d.ts +1 -1
  6. package/contexts/contexts/newsletter/Context.d.ts +1 -1
  7. package/contexts/contexts/plp/PLPInfiniteContext.d.ts +6 -0
  8. package/contexts/contexts/search/QueryFacets.d.ts +1 -1
  9. package/contexts/contexts/search/QueryProducts.d.ts +1 -1
  10. package/contexts/contexts/search/TopSearches.d.ts +1 -1
  11. package/contexts/hooks/useOperations.d.ts +1 -1
  12. package/contexts/index.d.ts +3 -3
  13. package/data/api/DitoIngest/authorization/index.d.ts +1 -0
  14. package/data/api/DitoIngest/ditoIngestService.d.ts +3 -0
  15. package/data/api/cms/content-type/index.d.ts +1 -1
  16. package/data/api/user/index.d.ts +2 -2
  17. package/data/helpers/plp/index.d.ts +1 -2
  18. package/data/index.d.ts +7 -6
  19. package/index-Cqk3VcE0.js +4 -0
  20. package/index-DctCSt6v.mjs +2695 -0
  21. package/index.js +16 -16
  22. package/index.mjs +6551 -6783
  23. package/index2.js +2 -2
  24. package/index2.mjs +752 -660
  25. package/layout/index.d.ts +9 -9
  26. package/layout/team-component/AddToCart/AddToCart.d.ts +1 -1
  27. package/layout/team-component/AddToCart/Composite/Card/Card.d.ts +1 -1
  28. package/layout/team-component/AddToCart/Composite/Card/Content.d.ts +1 -1
  29. package/layout/team-component/AddToCart/Composite/Card/StyleSize.d.ts +1 -1
  30. package/layout/team-component/Newsletter/index.d.ts +1 -1
  31. package/layout/template/MiniCart/Composite/Card/Card.d.ts +1 -1
  32. package/layout/template/MiniCart/Composite/Card/Composite/Sku.d.ts +1 -1
  33. package/layout/template/MiniCart/Composite/Card/Composite/Style.d.ts +1 -1
  34. package/layout/template/MiniCart/Composite/Card/index.d.ts +2 -2
  35. package/layout/template/MiniCart/Composite/Modal/Body/Body.d.ts +1 -1
  36. package/layout/template/MiniCart/MiniCart.d.ts +1 -1
  37. package/layout/template/MiniCart/index.d.ts +2 -2
  38. package/layout/template/PDC/Composite/Grid/Grid.d.ts +1 -1
  39. package/layout/template/PDC/Composite/InfiniteScroller/Filters/Filters.d.ts +1 -1
  40. package/layout/template/PDC/Composite/InfiniteScroller/InfiniteScroller.d.ts +1 -1
  41. package/layout/template/PDC/Composite/InfiniteScroller/Page/Page.d.ts +1 -1
  42. package/layout/template/PDC/Composite/Products/Products.d.ts +1 -1
  43. package/layout/template/PDC/PDC.d.ts +1 -1
  44. package/layout/template/PDC/index.d.ts +3 -3
  45. package/layout/template/PDP/Composite/Info/MainContent/Similars/index.d.ts +1 -1
  46. package/layout/template/QuickShop/Composite/Body.d.ts +1 -1
  47. package/layout/template/QuickShop/Composite/Similars.d.ts +1 -1
  48. package/layout/template/SearchModal/SearchModal.d.ts +1 -1
  49. package/layout/template/SearchResult/Composite/Products.d.ts +1 -1
  50. package/layout/template/SearchResult/SearchContent.d.ts +1 -1
  51. package/layout/template/SearchResult/SearchResult.d.ts +1 -1
  52. package/package.json +1 -1
  53. package/server.d.ts +2 -0
  54. package/types/cms/Sections/Newsletter/index.d.ts +4 -0
  55. package/types/cms/Sections/SectionZone/index.d.ts +0 -1
  56. package/types/contexts/contexts/global.d.ts +1 -0
  57. package/types/contexts/contexts/plp.d.ts +3 -4
  58. package/types/contexts/contexts/search.d.ts +2 -8
  59. package/types/contexts/hooks/index.d.ts +1 -3
  60. package/types/data/api/dito-ingest/index.d.ts +12 -1
  61. package/types/layout/team-components/AddToCart/index.d.ts +1 -5
  62. package/types/layout/team-components/HelpButton/index.d.ts +2 -4
  63. package/types/layout/team-components/Newsletter/index.d.ts +6 -0
  64. package/types/layout/team-components/ProductCard/index.d.ts +0 -1
  65. package/types/layout/team-components/ProductList/index.d.ts +1 -2
  66. package/types/layout/templates/MiniCart/index.d.ts +0 -2
  67. package/types/layout/templates/PDP/index.d.ts +0 -1
  68. package/types/layout/templates/PLP/index.d.ts +1 -8
  69. package/types/layout/templates/QuickShop/index.d.ts +1 -2
  70. package/types/layout/templates/SearchModal/index.d.ts +1 -2
  71. package/types/layout/templates/SearchResult/index.d.ts +0 -3
@@ -0,0 +1,2695 @@
1
+ import { decodeJwt as Jr } from "jose";
2
+ import * as U from "yup";
3
+ import { jsxs as At, Fragment as Zr, jsx as G } from "react/jsx-runtime";
4
+ import { Utils as en } from "@soma-vertical-web/core-components";
5
+ const tt = (t, e = !0) => Intl.NumberFormat("pt-BR", {
6
+ style: "currency",
7
+ currency: "BRL",
8
+ minimumFractionDigits: e ? 2 : 0
9
+ }).format(t), tn = ({ valueInCents: t, hasFree: e, freeTaxMessage: r }) => t === 0 ? e ? r : tt(0) : tt(t / 100), rn = (t, e) => {
10
+ const n = (t - e) * 100 / t;
11
+ return Math.floor(n);
12
+ }, Zt = (t, e) => {
13
+ const [r, n] = t.split(e);
14
+ return { name: r.trim(), size: n ? n.trim() : "" };
15
+ }, nn = (t, e) => {
16
+ if (!t)
17
+ return {};
18
+ const [r, n] = t.split(e);
19
+ return { color: r == null ? void 0 : r.trim(), size: n == null ? void 0 : n.trim() };
20
+ }, on = (t, e = "tamanho") => {
21
+ if (t.additionalProperty) {
22
+ const [r] = t.additionalProperty;
23
+ return r != null && r.name ? r.name.toLocaleLowerCase() === e ? r.value : t.name : "";
24
+ }
25
+ return t.name;
26
+ }, an = (t, e) => t.replace(e, "").trim(), ln = (t) => t.replace(/\//g, ""), cn = ({ items: t, NAME_SPLIT_SYMBOL: e }) => {
27
+ const r = {
28
+ price: 0,
29
+ listPrice: 0,
30
+ installments: {
31
+ count: 0,
32
+ value: 0
33
+ }
34
+ }, n = (i, l) => {
35
+ var u;
36
+ l && (l.sellerId = i.sellerId, l.sellerName = i.sellerName, l.available = !0, l.isSellerDefault = i.sellerDefault);
37
+ const {
38
+ Price: c,
39
+ ListPrice: f,
40
+ PaymentOptions: { installmentOptions: s }
41
+ } = i.commertialOffer;
42
+ r.price = c, r.listPrice = f;
43
+ const p = (u = s == null ? void 0 : s[0]) == null ? void 0 : u.installments;
44
+ if (p) {
45
+ const { count: y, value: d } = p[p.length - 1];
46
+ r.installments = {
47
+ count: y,
48
+ value: d / 100
49
+ };
50
+ }
51
+ };
52
+ let o = !0;
53
+ const a = t.reduce((i, l) => {
54
+ var s;
55
+ const c = {
56
+ name: l.name,
57
+ sku: l.itemId,
58
+ value: ((s = l.Tamanho) == null ? void 0 : s[0]) ?? Zt(l.nameComplete ?? l.name, e).size,
59
+ available: !1,
60
+ sellerId: "",
61
+ sellerName: "",
62
+ isSellerDefault: !1
63
+ }, f = l.sellers.filter((p) => (p.sellerDefault && p.commertialOffer.IsAvailable && (c.available = !0, n(p, c)), p.commertialOffer.IsAvailable));
64
+ return !c.isSellerDefault && f.length > 0 && (c.available = !0, n(f[0], {
65
+ ...c,
66
+ sellerId: f[0].sellerId,
67
+ sellerName: f[0].sellerName
68
+ })), c.available === !1 && (o = !1), i.push(c), i;
69
+ }, []);
70
+ return {
71
+ ...r,
72
+ sizes: a,
73
+ allSizesAvailable: o
74
+ };
75
+ }, sn = (t) => t ? !t.offers.offers.find(({ quantity: e = 0 }) => e > 0) : !1, un = (t, e) => {
76
+ const r = t.find(
77
+ (n) => n.availability.includes("InStock") && n.quantity && n.listPrice > 0 && n.seller.identifier === e
78
+ );
79
+ return r || t.find(
80
+ (n) => n.availability.includes("InStock") && n.quantity && n.listPrice > 0
81
+ );
82
+ }, fn = ({ images: t, TEXTURE_IMAGE: e }) => t.find((r) => e.includes(r.imageLabel)) ?? t[0], pn = (t, e) => {
83
+ const r = /\/ids\/(\d+)\//, n = t.match(r);
84
+ return n ? t.replace(
85
+ `/${n[1]}/`,
86
+ `/${n[1]}-${e.width}-${e.height}/`
87
+ ) : t;
88
+ }, dn = (t, e) => {
89
+ const r = /\/ids\/(\d+)-(\d+)-(\d+)\//, n = t.match(r);
90
+ return n ? t.replace(
91
+ `/${n[1]}-${n[2]}-${n[3]}/`,
92
+ `/${n[1]}-${e.width}-${e.height}/`
93
+ ) : t;
94
+ }, yn = ({
95
+ images: t,
96
+ label: e
97
+ }) => {
98
+ const r = t.filter(
99
+ (n) => n.keywords === e.first || n.keywords === e.second || n.alternateName === e.first || n.alternateName === e.second
100
+ );
101
+ return r.length === 0 ? t.slice(0, 2) : r;
102
+ }, vn = (t) => {
103
+ const [e, r] = t.split("/").map(Number);
104
+ if (Number.isNaN(e) || Number.isNaN(r))
105
+ throw new Error("[ERROR ASPECT RATIO IMAGE]: Invalid aspect ratio format");
106
+ return r / e;
107
+ }, mn = (t, e, r) => {
108
+ e && (t ? (e.getAttribute("src") || (e.src = r ?? ""), e.play()) : e.pause());
109
+ }, bl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
110
+ __proto__: null,
111
+ disableSKU: sn,
112
+ formatPriceToCurrency: tt,
113
+ freightParsePrice: tn,
114
+ getAspectRatio: vn,
115
+ getColorAndSizeFromSkuName: nn,
116
+ getDiscountPercent: rn,
117
+ getFirstImages: yn,
118
+ getProductNameWithoutSku: an,
119
+ getSKUName: on,
120
+ getSkuInfos: cn,
121
+ getThumbImage: fn,
122
+ getValidOffer: un,
123
+ removeSlashes: ln,
124
+ resizingImg: pn,
125
+ setVideoPlay: mn,
126
+ splitNameAndSizeFromFullName: Zt,
127
+ updatedResizedImg: dn
128
+ }, Symbol.toStringTag, { value: "Module" })), gn = {
129
+ attachment: "ATTACHMENT",
130
+ specification: "SPECIFICATION",
131
+ attribute: "ATTRIBUTE"
132
+ }, T = Promise.resolve(!1), hn = {
133
+ id: "",
134
+ isOpen: !1,
135
+ items: [],
136
+ loading: !1,
137
+ marketingData: null,
138
+ messages: [],
139
+ openTextField: {},
140
+ paymentData: null,
141
+ shippingData: null,
142
+ totalizers: [],
143
+ itemMetadata: [],
144
+ recentlyAddedProducts: [],
145
+ addCoupon: () => T,
146
+ addItem: () => T,
147
+ addSellerCode: () => T,
148
+ addMarketingData: () => T,
149
+ emptyCart: () => ({}),
150
+ removeItem: () => T,
151
+ setIsOpen: () => ({}),
152
+ shipping: () => T,
153
+ shippingUpdate: () => T,
154
+ toggleServiceToProduct: () => T,
155
+ updateItemQuantity: () => T,
156
+ insertProfileEmail: () => T,
157
+ setRecentlyAddedProducts: () => ({})
158
+ }, st = (t) => t === 0, er = (t, e) => {
159
+ if (!t || t.length === 0)
160
+ return [];
161
+ let r = "";
162
+ const n = [], o = t.match(/\d+/g) ?? [];
163
+ for (const a of o) {
164
+ const i = e[Number(a)];
165
+ i && (r += (r ? "/" : "") + i, n.push(r));
166
+ }
167
+ return n;
168
+ }, tr = (t, e) => {
169
+ const {
170
+ availability: r,
171
+ additionalInfo: { brandName: n },
172
+ bundleItems: o,
173
+ id: a,
174
+ uniqueId: i,
175
+ detailUrl: l,
176
+ ean: c,
177
+ imageUrl: f,
178
+ name: s,
179
+ listPrice: p,
180
+ quantity: u,
181
+ price: y,
182
+ priceDefinition: d,
183
+ productCategories: h,
184
+ productCategoryIds: E,
185
+ productId: O,
186
+ refId: P,
187
+ seller: m,
188
+ referenceId: R,
189
+ offerings: I,
190
+ productRefId: F,
191
+ skuName: C,
192
+ sellingPrice: j
193
+ } = t;
194
+ return {
195
+ availability: r,
196
+ bundleItems: o,
197
+ referenceId: R,
198
+ productRefId: F,
199
+ id: a,
200
+ ean: c,
201
+ uniqueId: i,
202
+ itemOffered: {
203
+ additionalProperty: [],
204
+ brand: {
205
+ name: n
206
+ },
207
+ categories: er(E, h),
208
+ categoriesIds: E,
209
+ gtin: P,
210
+ image: [
211
+ {
212
+ alternateName: (e == null ? void 0 : e.MAIN_IMAGE) ?? "1",
213
+ url: f
214
+ }
215
+ ],
216
+ name: s,
217
+ isVariationOf: {
218
+ name: s,
219
+ productGroupID: O
220
+ },
221
+ sku: a,
222
+ slug: l,
223
+ skuName: C
224
+ },
225
+ listPrice: p,
226
+ quantity: u,
227
+ offerings: I,
228
+ price: y,
229
+ priceDefinition: d,
230
+ sellingPrice: j,
231
+ seller: m
232
+ };
233
+ }, _n = (t, e) => {
234
+ const r = t.map((n) => ({
235
+ id: n.uniqueId,
236
+ quantity: n.quantity,
237
+ seller: n.seller
238
+ }));
239
+ return Array.isArray(e) ? [...r, ...e] : [...r, e];
240
+ }, En = (t, e) => {
241
+ const r = t.find((n) => n.id === e);
242
+ if (r) {
243
+ const n = t.map((o, a) => {
244
+ var i, l;
245
+ return {
246
+ id: ((i = o.itemOffered) == null ? void 0 : i.sku) ?? "",
247
+ index: a,
248
+ quantity: (r == null ? void 0 : r.id) === ((l = o.itemOffered) == null ? void 0 : l.sku) ? 0 : o.quantity,
249
+ seller: o.seller ?? ""
250
+ };
251
+ });
252
+ return {
253
+ updateItems: n,
254
+ filterItems: n.filter((o) => o.id !== e)
255
+ };
256
+ }
257
+ return { updateItems: [], filterItems: [] };
258
+ }, Sn = (t, e, r) => t.filter(
259
+ (n) => n.availability !== "withoutStock" && n.availability !== "https://schema.org/OutOfStock"
260
+ ).map(
261
+ (n, o) => {
262
+ var a, i;
263
+ return n.id === e ? {
264
+ id: n.id,
265
+ index: o,
266
+ quantity: r,
267
+ seller: n.seller,
268
+ sku: ((a = n.itemOffered) == null ? void 0 : a.sku) ?? ""
269
+ } : {
270
+ id: n.id,
271
+ index: o,
272
+ quantity: n.quantity,
273
+ seller: n.seller,
274
+ sku: ((i = n.itemOffered) == null ? void 0 : i.sku) ?? ""
275
+ };
276
+ }
277
+ ), An = (t, e) => t.filter((r) => r.availability !== "withoutStock").findIndex(({ id: r }) => r === e), bn = (t, e) => {
278
+ var r;
279
+ return Array.isArray(t) ? (((r = t == null ? void 0 : t.find((n) => {
280
+ var o;
281
+ return ((o = n == null ? void 0 : n.id) == null ? void 0 : o.toLowerCase()) === e;
282
+ })) == null ? void 0 : r.value) ?? 0) / 100 : 0;
283
+ }, On = (t) => {
284
+ const e = t.reduce((o, a) => {
285
+ const i = st(a.price) ? 0 : a.quantity;
286
+ return o + i;
287
+ }, 0), r = t.reduce(
288
+ (o, a) => o + a.price * a.quantity,
289
+ 0
290
+ ), n = t.reduce(
291
+ (o, a) => o + a.listPrice * a.quantity,
292
+ 0
293
+ );
294
+ return {
295
+ totalItems: e,
296
+ total: r,
297
+ subTotal: n
298
+ };
299
+ }, Pn = (t) => Array.isArray(t) ? t.filter((e) => e.availability !== "withoutStock").reduce((e, r) => e + (st(r == null ? void 0 : r.price) ? 0 : r.quantity), 0) : 0, ut = (t, e) => {
300
+ const { items: r, orderFormId: n, ...o } = t;
301
+ return {
302
+ ...o,
303
+ id: n,
304
+ items: Array.isArray(r) ? r.map((a) => tr(a, e)) : []
305
+ };
306
+ }, Rn = (t, e) => {
307
+ const r = t.find((n) => n.id === e);
308
+ return r ? r.availability === "unavailableItemFulfillment" : !1;
309
+ }, In = (t, e) => {
310
+ const r = t.sku, n = t.isVariantOf.hasVariant.find((o) => o.sku === r);
311
+ return n ? n.name.split(e)[1] : "--";
312
+ }, wn = (t, e, r = !1) => !t && e !== "" ? { code: 300, value: e, statusOk: r } : t === e ? { code: 200, value: e, statusOk: r } : { code: 400, value: e, statusOk: r }, Tn = (t, e) => {
313
+ const r = /* @__PURE__ */ new Set();
314
+ return [t, ...e].filter(
315
+ (n) => !r.has(n) && r.add(n),
316
+ r
317
+ );
318
+ }, Cn = (t, e) => e && Array.isArray(e) && e.find((n) => n.id === t) ? Promise.resolve(t) : Promise.resolve(!1), Nn = (t, e) => e ? Promise.resolve(t[e]) : Promise.resolve(!1), Dn = async (t) => {
319
+ try {
320
+ const e = await t();
321
+ if (typeof e != "boolean")
322
+ return e;
323
+ } catch (e) {
324
+ console.error(`[Error orderForm]: ${e}`);
325
+ }
326
+ return !1;
327
+ }, xn = (t, e) => {
328
+ if (e !== -1) {
329
+ const r = Number(t);
330
+ return r ? r + 1 : 1;
331
+ }
332
+ return t ?? 1;
333
+ }, $n = (t, e) => Array.isArray(t) ? t.filter(
334
+ (r) => e == null ? void 0 : e.some((n) => n.id === r.id)
335
+ ) : [], Mn = async (t, e) => t.then((r) => [...r ?? [], ...e ?? []]), Fn = async (t, e, r, n) => {
336
+ const { priority: o = "auto", body: a } = e;
337
+ return fetch(t, {
338
+ // priority,
339
+ headers: {
340
+ "Content-Type": "application/json"
341
+ },
342
+ priority: o,
343
+ method: "POST",
344
+ body: JSON.stringify(a)
345
+ }).then(async (i) => {
346
+ const l = await i.json();
347
+ return r ? l : ut(l, n);
348
+ });
349
+ }, Ln = (t, e, r) => ({
350
+ notifications: [
351
+ ...t.notifications,
352
+ { id: Date.now(), message: e, callback: r }
353
+ ]
354
+ }), Un = (t) => [...Array.isArray(t) ? t : [t], "faststore"], Gn = (t) => {
355
+ const e = t.get("utm_source") || V("utm_source"), r = t.get("utm_campaign") || V("utm_campaign"), n = t.get("utm_medium") || V("utm_medium"), o = t.get("utmi_cp") || V("utmi_cp"), a = t.get("utmi_pc") || V("utmi_pc"), i = t.get("utmi_p") || V("utmi_p");
356
+ return {
357
+ ...e && { utmSource: e },
358
+ ...n && { utmMedium: n },
359
+ ...r && { utmCampaign: r },
360
+ ...o && { utmiCampaign: o },
361
+ ...a && { utmiPart: a },
362
+ ...i && { utmipage: i }
363
+ };
364
+ }, V = (t) => {
365
+ if (!t || typeof window > "u")
366
+ return;
367
+ const e = window.location.href;
368
+ t = t.replace(/[[\]]/g, "\\$&");
369
+ const r = new RegExp("[?&]" + t + "(=([^&#]*)|&|#|$)"), n = r.exec(e);
370
+ return n ? n[2] ? decodeURIComponent(n[2].replace(/\+/g, " ")) : "" : null;
371
+ }, Bn = (t, e, r = "BR") => {
372
+ const n = e, o = {
373
+ country: r,
374
+ addressType: "",
375
+ postalCode: t || null,
376
+ city: "",
377
+ state: "",
378
+ street: "",
379
+ number: "",
380
+ neighborhood: "",
381
+ complement: "",
382
+ reference: "",
383
+ geoCoordinates: []
384
+ };
385
+ if (n) {
386
+ const a = typeof n == "object" && "latitude" in n ? n.latitude : null, i = typeof n == "object" && "longitude" in n ? n.longitude : null;
387
+ o.geoCoordinates = typeof a == "number" && typeof i == "number" ? { latitude: a, longitude: i } : null;
388
+ }
389
+ return [o];
390
+ }, Ol = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
391
+ __proto__: null,
392
+ VALUE_REFERENCES: gn,
393
+ addItemOrder: _n,
394
+ addNotification: Ln,
395
+ createItemOrder: tr,
396
+ createNewAddress: Bn,
397
+ fetchCartAPI: Fn,
398
+ findItemIndex: An,
399
+ findOptions: $n,
400
+ findTotalizerValue: bn,
401
+ getCategories: er,
402
+ getCode: wn,
403
+ getQuantity: xn,
404
+ getRemoveId: Cn,
405
+ getSize: In,
406
+ getTotalItems: Pn,
407
+ getTotalizer: On,
408
+ getUrlParameter: V,
409
+ getValue: Nn,
410
+ initialState: hn,
411
+ isGift: st,
412
+ marketingTagsBuilder: Un,
413
+ mergeOptionsPromise: Mn,
414
+ mountMarketingData: Gn,
415
+ orderFormValues: ut,
416
+ promiseDefault: T,
417
+ removeQuantity: En,
418
+ updateItemSellerExternal: Rn,
419
+ updateOrderFormPromise: Dn,
420
+ updateQuantity: Sn,
421
+ wishlistArray: Tn
422
+ }, Symbol.toStringTag, { value: "Module" })), rt = { baseUrl: "" }, Pl = (t) => {
423
+ rt.baseUrl || Object.defineProperty(rt, "baseUrl", {
424
+ value: `https://${t}.myvtex.com`,
425
+ writable: !1,
426
+ configurable: !1
427
+ });
428
+ }, rr = (t, e) => fetch(`${rt.baseUrl}${t}`, e), Rl = async (t, e, r = !1, n) => {
429
+ const { priority: o = "auto", body: a } = e, i = await rr(t, {
430
+ headers: { "Content-Type": "application/json" },
431
+ method: "POST",
432
+ body: JSON.stringify(a),
433
+ priority: o
434
+ });
435
+ if (!i.ok) {
436
+ const c = await i.json().catch(() => ({ message: "Unknown error" }));
437
+ throw new Error(c.message || `HTTP ${i.status}`);
438
+ }
439
+ const l = await i.json();
440
+ return r ? l : ut(l, n);
441
+ }, bt = "fuzzy", Ot = "operator", jn = (t) => ({
442
+ isDepartment: t != null && t.length ? t[0].key === "category-1" : !1
443
+ }), kn = (t, e) => {
444
+ const r = decodeURIComponent(e ?? "").slice(1).split("/");
445
+ return t.map((n) => {
446
+ if (n.key === "category-2" && n.__typename === "FacetBoolean") {
447
+ const o = n.values;
448
+ return {
449
+ ...n,
450
+ values: o.filter(
451
+ (a) => !r.find(
452
+ (i) => i.toLowerCase() === a.value || i.toLowerCase() === a.name.toLowerCase()
453
+ )
454
+ )
455
+ };
456
+ }
457
+ return n;
458
+ });
459
+ }, nr = (t, e) => e ? t === "category-1" : !1, Hn = (t) => t.key === "operator" && (t.value === "and" || t.value === "or"), Xn = (t) => t.type === "TEXT", Wn = (t) => t.key === "fuzzy" && (t.value === "0" || t.value === "1" || t.value === "auto"), qn = (t) => {
460
+ const { key: e, name: r, values: n } = t;
461
+ return {
462
+ __typename: "FacetBoolean",
463
+ key: e,
464
+ label: r,
465
+ values: n.slice().sort((o, a) => o.name.localeCompare(a.name))
466
+ };
467
+ }, Vn = ({ key: t, values: e }) => ({
468
+ __typename: "FacetRange",
469
+ key: t,
470
+ values: e
471
+ }), Il = (t, e, r) => {
472
+ if (!(t instanceof Object) || !("facets" in t))
473
+ return [];
474
+ const { facets: n = [] } = t, o = e != null && e.length ? e[0].key === "category-1" : !1;
475
+ return n.filter(
476
+ (i) => !r || !nr(i.key, o)
477
+ ).map(
478
+ (i) => Xn(i) ? qn(i) : Vn(i)
479
+ );
480
+ }, wl = (t, e) => {
481
+ const r = t.find(({ key: o }) => o === bt) ?? null, n = t.find(({ key: o }) => o === Ot) ?? null;
482
+ r && Wn(r) && e.append(bt, r.value), n && Hn(n) && e.append(Ot, n.value);
483
+ }, or = (t) => t.map((e) => {
484
+ const [r, n] = e.split("/");
485
+ return { key: r, value: n };
486
+ }), zn = (t, e) => {
487
+ const r = decodeURIComponent(e ?? "").slice(1).split("/"), n = t.filter(({ value: a }) => !r.includes(decodeURIComponent(a))).map((a) => ({
488
+ ...a,
489
+ value: decodeURIComponent(a.value)
490
+ })), { isDepartment: o } = jn(n);
491
+ return n == null ? void 0 : n.filter((a) => !nr(a.key, o));
492
+ }, Tl = (t) => t.getAll("facets").flatMap((e) => {
493
+ const [r, ...n] = e.split("/");
494
+ return !r || n.length === 0 ? [] : [
495
+ {
496
+ key: r,
497
+ value: n.join("/")
498
+ }
499
+ ];
500
+ }), Cl = (t) => {
501
+ const e = Jr(t ?? "");
502
+ return {
503
+ email: e.sub,
504
+ userId: e.userId
505
+ };
506
+ }, Kn = ({ pathname: t, searchParams: e }, r) => {
507
+ const n = e.get("sort") ?? "", o = e.get("query") ?? null, a = parseInt(e.get("page") ?? "1", 10);
508
+ return {
509
+ sort: n,
510
+ facets: or(r),
511
+ term: o,
512
+ base: o ? "" : t,
513
+ page: a
514
+ };
515
+ }, Yn = (t) => {
516
+ const e = new URLSearchParams();
517
+ return Object.entries(t).forEach(([r, n]) => {
518
+ Array.isArray(n) ? n.forEach((o) => e.append(r, o)) : n !== void 0 && e.append(r, n);
519
+ }), e;
520
+ }, Nl = (t, e, r = 24, n = 1, o) => {
521
+ const a = `/search?query=${e ?? ""}&count=${r}&page=${n}${o ? `&sort=${o.replace("_", ":")}` : ""}`;
522
+ t.push(a);
523
+ }, Qn = {
524
+ parseSearchState: Kn,
525
+ convertSearchParams: Yn,
526
+ filterNonRootFacets: zn,
527
+ selectedFacets: or,
528
+ filterNonCategorySelected: kn
529
+ }, Dl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
530
+ __proto__: null,
531
+ default: Qn
532
+ }, Symbol.toStringTag, { value: "Module" }));
533
+ var Pt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
534
+ function Jn(t) {
535
+ return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
536
+ }
537
+ function Zn(t) {
538
+ if (t.__esModule) return t;
539
+ var e = t.default;
540
+ if (typeof e == "function") {
541
+ var r = function n() {
542
+ return this instanceof n ? Reflect.construct(e, arguments, this.constructor) : e.apply(this, arguments);
543
+ };
544
+ r.prototype = e.prototype;
545
+ } else r = {};
546
+ return Object.defineProperty(r, "__esModule", { value: !0 }), Object.keys(t).forEach(function(n) {
547
+ var o = Object.getOwnPropertyDescriptor(t, n);
548
+ Object.defineProperty(r, n, o.get ? o : {
549
+ enumerable: !0,
550
+ get: function() {
551
+ return t[n];
552
+ }
553
+ });
554
+ }), r;
555
+ }
556
+ var eo = {};
557
+ (function(t) {
558
+ Object.defineProperty(t, "__esModule", {
559
+ value: !0
560
+ }), Object.defineProperty(t, "removeTrailingSlash", {
561
+ enumerable: !0,
562
+ get: function() {
563
+ return e;
564
+ }
565
+ });
566
+ function e(r) {
567
+ return r.replace(/\/$/, "") || "/";
568
+ }
569
+ })(eo);
570
+ var ft = {};
571
+ (function(t) {
572
+ Object.defineProperty(t, "__esModule", {
573
+ value: !0
574
+ }), Object.defineProperty(t, "parsePath", {
575
+ enumerable: !0,
576
+ get: function() {
577
+ return e;
578
+ }
579
+ });
580
+ function e(r) {
581
+ const n = r.indexOf("#"), o = r.indexOf("?"), a = o > -1 && (n < 0 || o < n);
582
+ return a || n > -1 ? {
583
+ pathname: r.substring(0, a ? o : n),
584
+ query: a ? r.substring(o, n > -1 ? n : void 0) : "",
585
+ hash: n > -1 ? r.slice(n) : ""
586
+ } : {
587
+ pathname: r,
588
+ query: "",
589
+ hash: ""
590
+ };
591
+ }
592
+ })(ft);
593
+ var ar = {};
594
+ (function(t) {
595
+ Object.defineProperty(t, "__esModule", {
596
+ value: !0
597
+ }), Object.defineProperty(t, "pathHasPrefix", {
598
+ enumerable: !0,
599
+ get: function() {
600
+ return r;
601
+ }
602
+ });
603
+ const e = ft;
604
+ function r(n, o) {
605
+ if (typeof n != "string")
606
+ return !1;
607
+ const { pathname: a } = (0, e.parsePath)(n);
608
+ return a === o || a.startsWith(o + "/");
609
+ }
610
+ })(ar);
611
+ var to = {};
612
+ (function(t) {
613
+ Object.defineProperty(t, "__esModule", {
614
+ value: !0
615
+ });
616
+ function e(Qr, Et) {
617
+ for (var St in Et) Object.defineProperty(Qr, St, {
618
+ enumerable: !0,
619
+ get: Et[St]
620
+ });
621
+ }
622
+ e(t, {
623
+ ACTION_SUFFIX: function() {
624
+ return c;
625
+ },
626
+ APP_DIR_ALIAS: function() {
627
+ return Q;
628
+ },
629
+ CACHE_ONE_YEAR: function() {
630
+ return R;
631
+ },
632
+ DOT_NEXT_ALIAS: function() {
633
+ return L;
634
+ },
635
+ ESLINT_DEFAULT_DIRS: function() {
636
+ return Vr;
637
+ },
638
+ GSP_NO_RETURNED_VALUE: function() {
639
+ return jr;
640
+ },
641
+ GSSP_COMPONENT_MEMBER_ERROR: function() {
642
+ return Xr;
643
+ },
644
+ GSSP_NO_RETURNED_VALUE: function() {
645
+ return kr;
646
+ },
647
+ INSTRUMENTATION_HOOK_FILENAME: function() {
648
+ return C;
649
+ },
650
+ MIDDLEWARE_FILENAME: function() {
651
+ return I;
652
+ },
653
+ MIDDLEWARE_LOCATION_REGEXP: function() {
654
+ return F;
655
+ },
656
+ NEXT_BODY_SUFFIX: function() {
657
+ return p;
658
+ },
659
+ NEXT_CACHE_IMPLICIT_TAG_ID: function() {
660
+ return m;
661
+ },
662
+ NEXT_CACHE_REVALIDATED_TAGS_HEADER: function() {
663
+ return d;
664
+ },
665
+ NEXT_CACHE_REVALIDATE_TAG_TOKEN_HEADER: function() {
666
+ return h;
667
+ },
668
+ NEXT_CACHE_SOFT_TAGS_HEADER: function() {
669
+ return y;
670
+ },
671
+ NEXT_CACHE_SOFT_TAG_MAX_LENGTH: function() {
672
+ return P;
673
+ },
674
+ NEXT_CACHE_TAGS_HEADER: function() {
675
+ return u;
676
+ },
677
+ NEXT_CACHE_TAG_MAX_ITEMS: function() {
678
+ return E;
679
+ },
680
+ NEXT_CACHE_TAG_MAX_LENGTH: function() {
681
+ return O;
682
+ },
683
+ NEXT_DATA_SUFFIX: function() {
684
+ return f;
685
+ },
686
+ NEXT_INTERCEPTION_MARKER_PREFIX: function() {
687
+ return n;
688
+ },
689
+ NEXT_META_SUFFIX: function() {
690
+ return s;
691
+ },
692
+ NEXT_QUERY_PARAM_PREFIX: function() {
693
+ return r;
694
+ },
695
+ NON_STANDARD_NODE_ENV: function() {
696
+ return Wr;
697
+ },
698
+ PAGES_DIR_ALIAS: function() {
699
+ return j;
700
+ },
701
+ PRERENDER_REVALIDATE_HEADER: function() {
702
+ return o;
703
+ },
704
+ PRERENDER_REVALIDATE_ONLY_GENERATED_HEADER: function() {
705
+ return a;
706
+ },
707
+ PUBLIC_DIR_MIDDLEWARE_CONFLICT: function() {
708
+ return ae;
709
+ },
710
+ ROOT_DIR_ALIAS: function() {
711
+ return N;
712
+ },
713
+ RSC_ACTION_CLIENT_WRAPPER_ALIAS: function() {
714
+ return q;
715
+ },
716
+ RSC_ACTION_ENCRYPTION_ALIAS: function() {
717
+ return w;
718
+ },
719
+ RSC_ACTION_PROXY_ALIAS: function() {
720
+ return D;
721
+ },
722
+ RSC_ACTION_VALIDATE_ALIAS: function() {
723
+ return b;
724
+ },
725
+ RSC_MOD_REF_PROXY_ALIAS: function() {
726
+ return k;
727
+ },
728
+ RSC_PREFETCH_SUFFIX: function() {
729
+ return i;
730
+ },
731
+ RSC_SUFFIX: function() {
732
+ return l;
733
+ },
734
+ SERVER_PROPS_EXPORT_ERROR: function() {
735
+ return Br;
736
+ },
737
+ SERVER_PROPS_GET_INIT_PROPS_CONFLICT: function() {
738
+ return ge;
739
+ },
740
+ SERVER_PROPS_SSG_CONFLICT: function() {
741
+ return ie;
742
+ },
743
+ SERVER_RUNTIME: function() {
744
+ return zr;
745
+ },
746
+ SSG_FALLBACK_EXPORT_ERROR: function() {
747
+ return qr;
748
+ },
749
+ SSG_GET_INITIAL_PROPS_CONFLICT: function() {
750
+ return Fe;
751
+ },
752
+ STATIC_STATUS_PAGE_GET_INITIAL_PROPS_ERROR: function() {
753
+ return Gr;
754
+ },
755
+ UNSTABLE_REVALIDATE_RENAME_ERROR: function() {
756
+ return Hr;
757
+ },
758
+ WEBPACK_LAYERS: function() {
759
+ return Kr;
760
+ },
761
+ WEBPACK_RESOURCE_QUERIES: function() {
762
+ return Yr;
763
+ }
764
+ });
765
+ const r = "nxtP", n = "nxtI", o = "x-prerender-revalidate", a = "x-prerender-revalidate-if-generated", i = ".prefetch.rsc", l = ".rsc", c = ".action", f = ".json", s = ".meta", p = ".body", u = "x-next-cache-tags", y = "x-next-cache-soft-tags", d = "x-next-revalidated-tags", h = "x-next-revalidate-tag-token", E = 128, O = 256, P = 1024, m = "_N_T_", R = 31536e3, I = "middleware", F = `(?:src/)?${I}`, C = "instrumentation", j = "private-next-pages", L = "private-dot-next", N = "private-next-root-dir", Q = "private-next-app-dir", k = "private-next-rsc-mod-ref-proxy", b = "private-next-rsc-action-validate", D = "private-next-rsc-server-reference", w = "private-next-rsc-action-encryption", q = "private-next-rsc-action-client-wrapper", ae = "You can not have a '_next' folder inside of your public folder. This conflicts with the internal '/_next' route. https://nextjs.org/docs/messages/public-next-folder-conflict", Fe = "You can not use getInitialProps with getStaticProps. To use SSG, please remove your getInitialProps", ge = "You can not use getInitialProps with getServerSideProps. Please remove getInitialProps.", ie = "You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps", Gr = "can not have getInitialProps/getServerSideProps, https://nextjs.org/docs/messages/404-get-initial-props", Br = "pages with `getServerSideProps` can not be exported. See more info here: https://nextjs.org/docs/messages/gssp-export", jr = "Your `getStaticProps` function did not return an object. Did you forget to add a `return`?", kr = "Your `getServerSideProps` function did not return an object. Did you forget to add a `return`?", Hr = "The `unstable_revalidate` property is available for general use.\nPlease use `revalidate` instead.", Xr = "can not be attached to a page's component and must be exported from the page. See more info here: https://nextjs.org/docs/messages/gssp-component-member", Wr = 'You are using a non-standard "NODE_ENV" value in your environment. This creates inconsistencies in the project and is strongly advised against. Read more: https://nextjs.org/docs/messages/non-standard-node-env', qr = "Pages with `fallback` enabled in `getStaticPaths` can not be exported. See more info here: https://nextjs.org/docs/messages/ssg-fallback-true-export", Vr = [
766
+ "app",
767
+ "pages",
768
+ "components",
769
+ "lib",
770
+ "src"
771
+ ], zr = {
772
+ edge: "edge",
773
+ experimentalEdge: "experimental-edge",
774
+ nodejs: "nodejs"
775
+ }, S = {
776
+ /**
777
+ * The layer for the shared code between the client and server bundles.
778
+ */
779
+ shared: "shared",
780
+ /**
781
+ * React Server Components layer (rsc).
782
+ */
783
+ reactServerComponents: "rsc",
784
+ /**
785
+ * Server Side Rendering layer for app (ssr).
786
+ */
787
+ serverSideRendering: "ssr",
788
+ /**
789
+ * The browser client bundle layer for actions.
790
+ */
791
+ actionBrowser: "action-browser",
792
+ /**
793
+ * The layer for the API routes.
794
+ */
795
+ api: "api",
796
+ /**
797
+ * The layer for the middleware code.
798
+ */
799
+ middleware: "middleware",
800
+ /**
801
+ * The layer for the instrumentation hooks.
802
+ */
803
+ instrument: "instrument",
804
+ /**
805
+ * The layer for assets on the edge.
806
+ */
807
+ edgeAsset: "edge-asset",
808
+ /**
809
+ * The browser client bundle layer for App directory.
810
+ */
811
+ appPagesBrowser: "app-pages-browser",
812
+ /**
813
+ * The server bundle layer for metadata routes.
814
+ */
815
+ appMetadataRoute: "app-metadata-route",
816
+ /**
817
+ * The layer for the server bundle for App Route handlers.
818
+ */
819
+ appRouteHandler: "app-route-handler"
820
+ }, Kr = {
821
+ ...S,
822
+ GROUP: {
823
+ serverOnly: [
824
+ S.reactServerComponents,
825
+ S.actionBrowser,
826
+ S.appMetadataRoute,
827
+ S.appRouteHandler,
828
+ S.instrument
829
+ ],
830
+ clientOnly: [
831
+ S.serverSideRendering,
832
+ S.appPagesBrowser
833
+ ],
834
+ nonClientServerTarget: [
835
+ // middleware and pages api
836
+ S.middleware,
837
+ S.api
838
+ ],
839
+ app: [
840
+ S.reactServerComponents,
841
+ S.actionBrowser,
842
+ S.appMetadataRoute,
843
+ S.appRouteHandler,
844
+ S.serverSideRendering,
845
+ S.appPagesBrowser,
846
+ S.shared,
847
+ S.instrument
848
+ ]
849
+ }
850
+ }, Yr = {
851
+ edgeSSREntry: "__next_edge_ssr_entry__",
852
+ metadata: "__next_metadata__",
853
+ metadataRoute: "__next_metadata_route__",
854
+ metadataImageMeta: "__next_metadata_image_meta__"
855
+ };
856
+ })(to);
857
+ var ro = {}, ir = {};
858
+ (function(t) {
859
+ Object.defineProperty(t, "__esModule", {
860
+ value: !0
861
+ }), Object.defineProperty(t, "addPathPrefix", {
862
+ enumerable: !0,
863
+ get: function() {
864
+ return r;
865
+ }
866
+ });
867
+ const e = ft;
868
+ function r(n, o) {
869
+ if (!n.startsWith("/") || !o)
870
+ return n;
871
+ const { pathname: a, query: i, hash: l } = (0, e.parsePath)(n);
872
+ return "" + o + a + i + l;
873
+ }
874
+ })(ir);
875
+ (function(t) {
876
+ Object.defineProperty(t, "__esModule", {
877
+ value: !0
878
+ }), Object.defineProperty(t, "addLocale", {
879
+ enumerable: !0,
880
+ get: function() {
881
+ return n;
882
+ }
883
+ });
884
+ const e = ir, r = ar;
885
+ function n(o, a, i, l) {
886
+ if (!a || a === i) return o;
887
+ const c = o.toLowerCase();
888
+ return !l && ((0, r.pathHasPrefix)(c, "/api") || (0, r.pathHasPrefix)(c, "/" + a.toLowerCase())) ? o : (0, e.addPathPrefix)(o, "/" + a);
889
+ }
890
+ })(ro);
891
+ var no = {};
892
+ (function(t) {
893
+ Object.defineProperty(t, "__esModule", {
894
+ value: !0
895
+ }), Object.defineProperty(t, "normalizeLocalePath", {
896
+ enumerable: !0,
897
+ get: function() {
898
+ return e;
899
+ }
900
+ });
901
+ function e(r, n) {
902
+ let o;
903
+ const a = r.split("/");
904
+ return (n || []).some((i) => a[1] && a[1].toLowerCase() === i.toLowerCase() ? (o = i, a.splice(1, 1), r = a.join("/") || "/", !0) : !1), {
905
+ pathname: r,
906
+ detectedLocale: o
907
+ };
908
+ }
909
+ })(no);
910
+ var oo = {};
911
+ (function(t) {
912
+ Object.defineProperty(t, "__esModule", {
913
+ value: !0
914
+ }), Object.defineProperty(t, "detectDomainLocale", {
915
+ enumerable: !0,
916
+ get: function() {
917
+ return e;
918
+ }
919
+ });
920
+ function e(r, n, o) {
921
+ if (r) {
922
+ o && (o = o.toLowerCase());
923
+ for (const l of r) {
924
+ var a, i;
925
+ const c = (a = l.domain) == null ? void 0 : a.split(":", 1)[0].toLowerCase();
926
+ if (n === c || o === l.defaultLocale.toLowerCase() || (i = l.locales) != null && i.some((f) => f.toLowerCase() === o))
927
+ return l;
928
+ }
929
+ }
930
+ }
931
+ })(oo);
932
+ const ao = (t = "") => t.charAt(0).toUpperCase() + t.slice(1), Rt = (t, e = " ") => !t || typeof t == "string" && t.length === 0 ? t : (Array.isArray(t) ? t : t.split("-")).map(ao).join(e), io = ({ canonical: t, seo: e, slug: r }) => {
933
+ const n = Array.isArray(r) ? r.join(", ") : r;
934
+ return {
935
+ id: 0,
936
+ Title: `${Array.isArray(r) ? r.map((a) => Rt(a)).join(",") : Rt(r)} - ${e.title}`,
937
+ MetaTagDescription: e.description,
938
+ name: n,
939
+ hasChildren: !1,
940
+ url: t,
941
+ children: []
942
+ };
943
+ }, lo = ({ canonical: t, category: e, previousImages: r, seo: n }) => ({
944
+ category: String(e == null ? void 0 : e.id),
945
+ title: (e == null ? void 0 : e.Title) ?? n.title,
946
+ description: (e == null ? void 0 : e.MetaTagDescription) ?? n.description,
947
+ alternates: { canonical: t },
948
+ openGraph: {
949
+ type: "website",
950
+ title: (e == null ? void 0 : e.Title) ?? n.title,
951
+ description: (e == null ? void 0 : e.MetaTagDescription) ?? n.description,
952
+ images: Array.isArray(r) ? [...r] : []
953
+ }
954
+ }), co = ({ items: t, parent: e, apiUrl: r, find: n }) => {
955
+ const o = t.find(
956
+ (i) => i.url.replace(r, "") === decodeURIComponent(e.toLowerCase())
957
+ );
958
+ return (o == null ? void 0 : o.children.find(
959
+ (i) => i.name.toLowerCase() === decodeURIComponent(String(n))
960
+ )) ?? o;
961
+ }, so = (t) => {
962
+ t instanceof Error ? (console.error(`[ERROR CATEGORY INFO]: ${t.message}`), console.error(t.stack)) : console.error("[ERROR CATEGORY INFO]: Unknown error", t);
963
+ }, uo = /* @__PURE__ */ new Set([
964
+ "brand",
965
+ "category",
966
+ "department",
967
+ "subcategory",
968
+ "collection",
969
+ "cluster"
970
+ ]), fo = (t) => typeof (t == null ? void 0 : t.pageType) == "string" && uo.has(t == null ? void 0 : t.pageType.toLowerCase()), po = (t) => ({
971
+ collection: t.Coleção,
972
+ categoryId: t.categoryId,
973
+ current_collection: t["Coleção Atual"],
974
+ items: t.items
975
+ }), yo = (t, e) => t.reduce((r, n) => {
976
+ if (n.items.filter(
977
+ (i) => i.sellers.find((l) => l.commertialOffer.IsAvailable)
978
+ ).length === 0 || (r == null ? void 0 : r.find((i) => (i == null ? void 0 : i.productId) === (n == null ? void 0 : n.productId))) !== void 0)
979
+ return r;
980
+ const a = n.items[0].images.find(
981
+ (i) => e.includes(i.imageLabel)
982
+ );
983
+ return r.push({
984
+ slug: `/${n.linkText}/p`,
985
+ productId: n == null ? void 0 : n.productId,
986
+ textureImage: (a == null ? void 0 : a.imageUrl) ?? "",
987
+ textureAlt: (a == null ? void 0 : a.imageText) ?? ""
988
+ }), r;
989
+ }, []), xl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
990
+ __proto__: null,
991
+ createEmptySeoCategory: io,
992
+ createSeoCategory: lo,
993
+ findCategory: co,
994
+ formattedSimilars: yo,
995
+ isCollectionPageType: fo,
996
+ notFindCategoryError: so,
997
+ responseAdapter: po
998
+ }, Symbol.toStringTag, { value: "Module" })), he = {
999
+ "responsive-mobile-flex": "_responsive-mobile-flex_1e0ai_1",
1000
+ "responsive-desktop-flex": "_responsive-desktop-flex_1e0ai_15",
1001
+ "responsive-mobile-block": "_responsive-mobile-block_1e0ai_30",
1002
+ "responsive-desktop-block": "_responsive-desktop-block_1e0ai_41"
1003
+ }, lr = async (t, e = {}) => {
1004
+ const { method: r = "GET", body: n, headers: o = {}, priority: a = "auto", cache: i = "default" } = e;
1005
+ return fetch(t, {
1006
+ method: r,
1007
+ headers: {
1008
+ ...o,
1009
+ Accept: "application/json",
1010
+ "Content-Type": "application/json"
1011
+ },
1012
+ priority: a,
1013
+ cache: i,
1014
+ ...n ? { body: JSON.stringify(n) } : {}
1015
+ // not body in get
1016
+ }).then((l) => l.json()).catch((l) => {
1017
+ console.error("[ERROR FETCH VTEX]", l);
1018
+ });
1019
+ }, le = /* @__PURE__ */ new Map();
1020
+ async function $l(t, e = {}) {
1021
+ var r;
1022
+ try {
1023
+ const { abort: n = !1 } = e, o = new AbortController();
1024
+ n && (le.has(t) && ((r = le.get(t)) == null || r.abort(), le.delete(t)), le.set(t, o));
1025
+ const a = lr(t, {
1026
+ ...e,
1027
+ ...n ? { signal: o.signal } : {}
1028
+ });
1029
+ return n && le.delete(t), a;
1030
+ } catch (n) {
1031
+ if (n.name === "AbortError") {
1032
+ console.log(`[REQUEST CANCELLED]: ${t}`);
1033
+ return;
1034
+ }
1035
+ throw console.error(`[ERROR API]: ${n.message}`), n;
1036
+ }
1037
+ }
1038
+ const vo = U.object({
1039
+ orderFormId: U.string().required(),
1040
+ coupon: U.string().nullable(),
1041
+ utmSource: U.string().optional(),
1042
+ utmMedium: U.string().optional(),
1043
+ utmCampaign: U.string().optional(),
1044
+ utmiCampaign: U.string().optional(),
1045
+ utmiPart: U.string().optional(),
1046
+ utmipage: U.string().optional()
1047
+ });
1048
+ async function mo({
1049
+ apiUrl: t,
1050
+ body: e
1051
+ }) {
1052
+ if (!e) {
1053
+ console.error("[ERROR FETCHING] Body is required");
1054
+ return;
1055
+ }
1056
+ await vo.validate(e);
1057
+ const { orderFormId: r, utmiPart: n, coupon: o, ...a } = e, i = `${t}/api/checkout/pub/orderForm/${r}/attachments/marketingData`;
1058
+ return lr(i, {
1059
+ method: "POST",
1060
+ body: {
1061
+ orderFormId: r,
1062
+ utmiPart: n ?? r,
1063
+ coupon: o ?? null,
1064
+ ...a
1065
+ }
1066
+ });
1067
+ }
1068
+ const Ml = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1069
+ __proto__: null,
1070
+ postMediaData: mo
1071
+ }, Symbol.toStringTag, { value: "Module" })), Fl = ({
1072
+ children: t,
1073
+ data: e,
1074
+ SectionZone: r,
1075
+ className: n
1076
+ }) => {
1077
+ var s, p;
1078
+ const o = ((s = e == null ? void 0 : e.filter((u) => {
1079
+ var y, d;
1080
+ return ((d = (y = u.config) == null ? void 0 : y.responsive) == null ? void 0 : d.deviceType) === "mobile";
1081
+ })[0]) == null ? void 0 : s.sections) || [], a = ((p = e == null ? void 0 : e.filter((u) => {
1082
+ var y, d;
1083
+ return ((d = (y = u.config) == null ? void 0 : y.responsive) == null ? void 0 : d.deviceType) === "desktop";
1084
+ })[0]) == null ? void 0 : p.sections) || [], i = o.slice(0, 1), l = o.slice(1, o.length), c = a.slice(0, 1), f = a.slice(1, a.length);
1085
+ return /* @__PURE__ */ At(Zr, { children: [
1086
+ /* @__PURE__ */ At("div", { className: n, children: [
1087
+ /* @__PURE__ */ G("div", { className: he["responsive-mobile-flex"], children: /* @__PURE__ */ G(r, { data: i ?? [] }) }),
1088
+ /* @__PURE__ */ G("div", { className: he["responsive-desktop-flex"], children: /* @__PURE__ */ G(r, { data: c ?? [] }) })
1089
+ ] }),
1090
+ t,
1091
+ /* @__PURE__ */ G("div", { className: he["responsive-mobile-flex"], children: /* @__PURE__ */ G(r, { data: l ?? [] }) }),
1092
+ /* @__PURE__ */ G("div", { className: he["responsive-desktop-flex"], children: /* @__PURE__ */ G(r, { data: f ?? [] }) }),
1093
+ /* @__PURE__ */ G(en.Divider, {})
1094
+ ] });
1095
+ };
1096
+ var oe = TypeError;
1097
+ const go = {}, ho = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1098
+ __proto__: null,
1099
+ default: go
1100
+ }, Symbol.toStringTag, { value: "Module" })), _o = /* @__PURE__ */ Zn(ho);
1101
+ var pt = typeof Map == "function" && Map.prototype, Le = Object.getOwnPropertyDescriptor && pt ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, Pe = pt && Le && typeof Le.get == "function" ? Le.get : null, It = pt && Map.prototype.forEach, dt = typeof Set == "function" && Set.prototype, Ue = Object.getOwnPropertyDescriptor && dt ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, Re = dt && Ue && typeof Ue.get == "function" ? Ue.get : null, wt = dt && Set.prototype.forEach, Eo = typeof WeakMap == "function" && WeakMap.prototype, se = Eo ? WeakMap.prototype.has : null, So = typeof WeakSet == "function" && WeakSet.prototype, ue = So ? WeakSet.prototype.has : null, Ao = typeof WeakRef == "function" && WeakRef.prototype, Tt = Ao ? WeakRef.prototype.deref : null, bo = Boolean.prototype.valueOf, Oo = Object.prototype.toString, Po = Function.prototype.toString, Ro = String.prototype.match, yt = String.prototype.slice, H = String.prototype.replace, Io = String.prototype.toUpperCase, Ct = String.prototype.toLowerCase, cr = RegExp.prototype.test, Nt = Array.prototype.concat, M = Array.prototype.join, wo = Array.prototype.slice, Dt = Math.floor, nt = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, Ge = Object.getOwnPropertySymbols, ot = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, re = typeof Symbol == "function" && typeof Symbol.iterator == "object", fe = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === re || !0) ? Symbol.toStringTag : null, sr = Object.prototype.propertyIsEnumerable, xt = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(t) {
1102
+ return t.__proto__;
1103
+ } : null);
1104
+ function $t(t, e) {
1105
+ if (t === 1 / 0 || t === -1 / 0 || t !== t || t && t > -1e3 && t < 1e3 || cr.call(/e/, e))
1106
+ return e;
1107
+ var r = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
1108
+ if (typeof t == "number") {
1109
+ var n = t < 0 ? -Dt(-t) : Dt(t);
1110
+ if (n !== t) {
1111
+ var o = String(n), a = yt.call(e, o.length + 1);
1112
+ return H.call(o, r, "$&_") + "." + H.call(H.call(a, /([0-9]{3})/g, "$&_"), /_$/, "");
1113
+ }
1114
+ }
1115
+ return H.call(e, r, "$&_");
1116
+ }
1117
+ var at = _o, Mt = at.custom, Ft = pr(Mt) ? Mt : null, ur = {
1118
+ __proto__: null,
1119
+ double: '"',
1120
+ single: "'"
1121
+ }, To = {
1122
+ __proto__: null,
1123
+ double: /(["\\])/g,
1124
+ single: /(['\\])/g
1125
+ }, Ce = function t(e, r, n, o) {
1126
+ var a = r || {};
1127
+ if (B(a, "quoteStyle") && !B(ur, a.quoteStyle))
1128
+ throw new TypeError('option "quoteStyle" must be "single" or "double"');
1129
+ if (B(a, "maxStringLength") && (typeof a.maxStringLength == "number" ? a.maxStringLength < 0 && a.maxStringLength !== 1 / 0 : a.maxStringLength !== null))
1130
+ throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
1131
+ var i = B(a, "customInspect") ? a.customInspect : !0;
1132
+ if (typeof i != "boolean" && i !== "symbol")
1133
+ throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");
1134
+ if (B(a, "indent") && a.indent !== null && a.indent !== " " && !(parseInt(a.indent, 10) === a.indent && a.indent > 0))
1135
+ throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
1136
+ if (B(a, "numericSeparator") && typeof a.numericSeparator != "boolean")
1137
+ throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
1138
+ var l = a.numericSeparator;
1139
+ if (typeof e > "u")
1140
+ return "undefined";
1141
+ if (e === null)
1142
+ return "null";
1143
+ if (typeof e == "boolean")
1144
+ return e ? "true" : "false";
1145
+ if (typeof e == "string")
1146
+ return yr(e, a);
1147
+ if (typeof e == "number") {
1148
+ if (e === 0)
1149
+ return 1 / 0 / e > 0 ? "0" : "-0";
1150
+ var c = String(e);
1151
+ return l ? $t(e, c) : c;
1152
+ }
1153
+ if (typeof e == "bigint") {
1154
+ var f = String(e) + "n";
1155
+ return l ? $t(e, f) : f;
1156
+ }
1157
+ var s = typeof a.depth > "u" ? 5 : a.depth;
1158
+ if (typeof n > "u" && (n = 0), n >= s && s > 0 && typeof e == "object")
1159
+ return it(e) ? "[Array]" : "[Object]";
1160
+ var p = Vo(a, n);
1161
+ if (typeof o > "u")
1162
+ o = [];
1163
+ else if (dr(o, e) >= 0)
1164
+ return "[Circular]";
1165
+ function u(b, D, w) {
1166
+ if (D && (o = wo.call(o), o.push(D)), w) {
1167
+ var q = {
1168
+ depth: a.depth
1169
+ };
1170
+ return B(a, "quoteStyle") && (q.quoteStyle = a.quoteStyle), t(b, q, n + 1, o);
1171
+ }
1172
+ return t(b, a, n + 1, o);
1173
+ }
1174
+ if (typeof e == "function" && !Lt(e)) {
1175
+ var y = Uo(e), d = _e(e, u);
1176
+ return "[Function" + (y ? ": " + y : " (anonymous)") + "]" + (d.length > 0 ? " { " + M.call(d, ", ") + " }" : "");
1177
+ }
1178
+ if (pr(e)) {
1179
+ var h = re ? H.call(String(e), /^(Symbol\(.*\))_[^)]*$/, "$1") : ot.call(e);
1180
+ return typeof e == "object" && !re ? ce(h) : h;
1181
+ }
1182
+ if (Xo(e)) {
1183
+ for (var E = "<" + Ct.call(String(e.nodeName)), O = e.attributes || [], P = 0; P < O.length; P++)
1184
+ E += " " + O[P].name + "=" + fr(Co(O[P].value), "double", a);
1185
+ return E += ">", e.childNodes && e.childNodes.length && (E += "..."), E += "</" + Ct.call(String(e.nodeName)) + ">", E;
1186
+ }
1187
+ if (it(e)) {
1188
+ if (e.length === 0)
1189
+ return "[]";
1190
+ var m = _e(e, u);
1191
+ return p && !qo(m) ? "[" + lt(m, p) + "]" : "[ " + M.call(m, ", ") + " ]";
1192
+ }
1193
+ if (Do(e)) {
1194
+ var R = _e(e, u);
1195
+ return !("cause" in Error.prototype) && "cause" in e && !sr.call(e, "cause") ? "{ [" + String(e) + "] " + M.call(Nt.call("[cause]: " + u(e.cause), R), ", ") + " }" : R.length === 0 ? "[" + String(e) + "]" : "{ [" + String(e) + "] " + M.call(R, ", ") + " }";
1196
+ }
1197
+ if (typeof e == "object" && i) {
1198
+ if (Ft && typeof e[Ft] == "function" && at)
1199
+ return at(e, { depth: s - n });
1200
+ if (i !== "symbol" && typeof e.inspect == "function")
1201
+ return e.inspect();
1202
+ }
1203
+ if (Go(e)) {
1204
+ var I = [];
1205
+ return It && It.call(e, function(b, D) {
1206
+ I.push(u(D, e, !0) + " => " + u(b, e));
1207
+ }), Ut("Map", Pe.call(e), I, p);
1208
+ }
1209
+ if (ko(e)) {
1210
+ var F = [];
1211
+ return wt && wt.call(e, function(b) {
1212
+ F.push(u(b, e));
1213
+ }), Ut("Set", Re.call(e), F, p);
1214
+ }
1215
+ if (Bo(e))
1216
+ return Be("WeakMap");
1217
+ if (Ho(e))
1218
+ return Be("WeakSet");
1219
+ if (jo(e))
1220
+ return Be("WeakRef");
1221
+ if ($o(e))
1222
+ return ce(u(Number(e)));
1223
+ if (Fo(e))
1224
+ return ce(u(nt.call(e)));
1225
+ if (Mo(e))
1226
+ return ce(bo.call(e));
1227
+ if (xo(e))
1228
+ return ce(u(String(e)));
1229
+ if (typeof window < "u" && e === window)
1230
+ return "{ [object Window] }";
1231
+ if (typeof globalThis < "u" && e === globalThis || typeof Pt < "u" && e === Pt)
1232
+ return "{ [object globalThis] }";
1233
+ if (!No(e) && !Lt(e)) {
1234
+ var C = _e(e, u), j = xt ? xt(e) === Object.prototype : e instanceof Object || e.constructor === Object, L = e instanceof Object ? "" : "null prototype", N = !j && fe && Object(e) === e && fe in e ? yt.call(W(e), 8, -1) : L ? "Object" : "", Q = j || typeof e.constructor != "function" ? "" : e.constructor.name ? e.constructor.name + " " : "", k = Q + (N || L ? "[" + M.call(Nt.call([], N || [], L || []), ": ") + "] " : "");
1235
+ return C.length === 0 ? k + "{}" : p ? k + "{" + lt(C, p) + "}" : k + "{ " + M.call(C, ", ") + " }";
1236
+ }
1237
+ return String(e);
1238
+ };
1239
+ function fr(t, e, r) {
1240
+ var n = r.quoteStyle || e, o = ur[n];
1241
+ return o + t + o;
1242
+ }
1243
+ function Co(t) {
1244
+ return H.call(String(t), /"/g, "&quot;");
1245
+ }
1246
+ function Y(t) {
1247
+ return !fe || !(typeof t == "object" && (fe in t || typeof t[fe] < "u"));
1248
+ }
1249
+ function it(t) {
1250
+ return W(t) === "[object Array]" && Y(t);
1251
+ }
1252
+ function No(t) {
1253
+ return W(t) === "[object Date]" && Y(t);
1254
+ }
1255
+ function Lt(t) {
1256
+ return W(t) === "[object RegExp]" && Y(t);
1257
+ }
1258
+ function Do(t) {
1259
+ return W(t) === "[object Error]" && Y(t);
1260
+ }
1261
+ function xo(t) {
1262
+ return W(t) === "[object String]" && Y(t);
1263
+ }
1264
+ function $o(t) {
1265
+ return W(t) === "[object Number]" && Y(t);
1266
+ }
1267
+ function Mo(t) {
1268
+ return W(t) === "[object Boolean]" && Y(t);
1269
+ }
1270
+ function pr(t) {
1271
+ if (re)
1272
+ return t && typeof t == "object" && t instanceof Symbol;
1273
+ if (typeof t == "symbol")
1274
+ return !0;
1275
+ if (!t || typeof t != "object" || !ot)
1276
+ return !1;
1277
+ try {
1278
+ return ot.call(t), !0;
1279
+ } catch {
1280
+ }
1281
+ return !1;
1282
+ }
1283
+ function Fo(t) {
1284
+ if (!t || typeof t != "object" || !nt)
1285
+ return !1;
1286
+ try {
1287
+ return nt.call(t), !0;
1288
+ } catch {
1289
+ }
1290
+ return !1;
1291
+ }
1292
+ var Lo = Object.prototype.hasOwnProperty || function(t) {
1293
+ return t in this;
1294
+ };
1295
+ function B(t, e) {
1296
+ return Lo.call(t, e);
1297
+ }
1298
+ function W(t) {
1299
+ return Oo.call(t);
1300
+ }
1301
+ function Uo(t) {
1302
+ if (t.name)
1303
+ return t.name;
1304
+ var e = Ro.call(Po.call(t), /^function\s*([\w$]+)/);
1305
+ return e ? e[1] : null;
1306
+ }
1307
+ function dr(t, e) {
1308
+ if (t.indexOf)
1309
+ return t.indexOf(e);
1310
+ for (var r = 0, n = t.length; r < n; r++)
1311
+ if (t[r] === e)
1312
+ return r;
1313
+ return -1;
1314
+ }
1315
+ function Go(t) {
1316
+ if (!Pe || !t || typeof t != "object")
1317
+ return !1;
1318
+ try {
1319
+ Pe.call(t);
1320
+ try {
1321
+ Re.call(t);
1322
+ } catch {
1323
+ return !0;
1324
+ }
1325
+ return t instanceof Map;
1326
+ } catch {
1327
+ }
1328
+ return !1;
1329
+ }
1330
+ function Bo(t) {
1331
+ if (!se || !t || typeof t != "object")
1332
+ return !1;
1333
+ try {
1334
+ se.call(t, se);
1335
+ try {
1336
+ ue.call(t, ue);
1337
+ } catch {
1338
+ return !0;
1339
+ }
1340
+ return t instanceof WeakMap;
1341
+ } catch {
1342
+ }
1343
+ return !1;
1344
+ }
1345
+ function jo(t) {
1346
+ if (!Tt || !t || typeof t != "object")
1347
+ return !1;
1348
+ try {
1349
+ return Tt.call(t), !0;
1350
+ } catch {
1351
+ }
1352
+ return !1;
1353
+ }
1354
+ function ko(t) {
1355
+ if (!Re || !t || typeof t != "object")
1356
+ return !1;
1357
+ try {
1358
+ Re.call(t);
1359
+ try {
1360
+ Pe.call(t);
1361
+ } catch {
1362
+ return !0;
1363
+ }
1364
+ return t instanceof Set;
1365
+ } catch {
1366
+ }
1367
+ return !1;
1368
+ }
1369
+ function Ho(t) {
1370
+ if (!ue || !t || typeof t != "object")
1371
+ return !1;
1372
+ try {
1373
+ ue.call(t, ue);
1374
+ try {
1375
+ se.call(t, se);
1376
+ } catch {
1377
+ return !0;
1378
+ }
1379
+ return t instanceof WeakSet;
1380
+ } catch {
1381
+ }
1382
+ return !1;
1383
+ }
1384
+ function Xo(t) {
1385
+ return !t || typeof t != "object" ? !1 : typeof HTMLElement < "u" && t instanceof HTMLElement ? !0 : typeof t.nodeName == "string" && typeof t.getAttribute == "function";
1386
+ }
1387
+ function yr(t, e) {
1388
+ if (t.length > e.maxStringLength) {
1389
+ var r = t.length - e.maxStringLength, n = "... " + r + " more character" + (r > 1 ? "s" : "");
1390
+ return yr(yt.call(t, 0, e.maxStringLength), e) + n;
1391
+ }
1392
+ var o = To[e.quoteStyle || "single"];
1393
+ o.lastIndex = 0;
1394
+ var a = H.call(H.call(t, o, "\\$1"), /[\x00-\x1f]/g, Wo);
1395
+ return fr(a, "single", e);
1396
+ }
1397
+ function Wo(t) {
1398
+ var e = t.charCodeAt(0), r = {
1399
+ 8: "b",
1400
+ 9: "t",
1401
+ 10: "n",
1402
+ 12: "f",
1403
+ 13: "r"
1404
+ }[e];
1405
+ return r ? "\\" + r : "\\x" + (e < 16 ? "0" : "") + Io.call(e.toString(16));
1406
+ }
1407
+ function ce(t) {
1408
+ return "Object(" + t + ")";
1409
+ }
1410
+ function Be(t) {
1411
+ return t + " { ? }";
1412
+ }
1413
+ function Ut(t, e, r, n) {
1414
+ var o = n ? lt(r, n) : M.call(r, ", ");
1415
+ return t + " (" + e + ") {" + o + "}";
1416
+ }
1417
+ function qo(t) {
1418
+ for (var e = 0; e < t.length; e++)
1419
+ if (dr(t[e], `
1420
+ `) >= 0)
1421
+ return !1;
1422
+ return !0;
1423
+ }
1424
+ function Vo(t, e) {
1425
+ var r;
1426
+ if (t.indent === " ")
1427
+ r = " ";
1428
+ else if (typeof t.indent == "number" && t.indent > 0)
1429
+ r = M.call(Array(t.indent + 1), " ");
1430
+ else
1431
+ return null;
1432
+ return {
1433
+ base: r,
1434
+ prev: M.call(Array(e + 1), r)
1435
+ };
1436
+ }
1437
+ function lt(t, e) {
1438
+ if (t.length === 0)
1439
+ return "";
1440
+ var r = `
1441
+ ` + e.prev + e.base;
1442
+ return r + M.call(t, "," + r) + `
1443
+ ` + e.prev;
1444
+ }
1445
+ function _e(t, e) {
1446
+ var r = it(t), n = [];
1447
+ if (r) {
1448
+ n.length = t.length;
1449
+ for (var o = 0; o < t.length; o++)
1450
+ n[o] = B(t, o) ? e(t[o], t) : "";
1451
+ }
1452
+ var a = typeof Ge == "function" ? Ge(t) : [], i;
1453
+ if (re) {
1454
+ i = {};
1455
+ for (var l = 0; l < a.length; l++)
1456
+ i["$" + a[l]] = a[l];
1457
+ }
1458
+ for (var c in t)
1459
+ B(t, c) && (r && String(Number(c)) === c && c < t.length || re && i["$" + c] instanceof Symbol || (cr.call(/[^\w$]/, c) ? n.push(e(c, t) + ": " + e(t[c], t)) : n.push(c + ": " + e(t[c], t))));
1460
+ if (typeof Ge == "function")
1461
+ for (var f = 0; f < a.length; f++)
1462
+ sr.call(t, a[f]) && n.push("[" + e(a[f]) + "]: " + e(t[a[f]], t));
1463
+ return n;
1464
+ }
1465
+ var zo = Ce, Ko = oe, Ne = function(t, e, r) {
1466
+ for (var n = t, o; (o = n.next) != null; n = o)
1467
+ if (o.key === e)
1468
+ return n.next = o.next, r || (o.next = /** @type {NonNullable<typeof list.next>} */
1469
+ t.next, t.next = o), o;
1470
+ }, Yo = function(t, e) {
1471
+ if (t) {
1472
+ var r = Ne(t, e);
1473
+ return r && r.value;
1474
+ }
1475
+ }, Qo = function(t, e, r) {
1476
+ var n = Ne(t, e);
1477
+ n ? n.value = r : t.next = /** @type {import('./list.d.ts').ListNode<typeof value, typeof key>} */
1478
+ {
1479
+ // eslint-disable-line no-param-reassign, no-extra-parens
1480
+ key: e,
1481
+ next: t.next,
1482
+ value: r
1483
+ };
1484
+ }, Jo = function(t, e) {
1485
+ return t ? !!Ne(t, e) : !1;
1486
+ }, Zo = function(t, e) {
1487
+ if (t)
1488
+ return Ne(t, e, !0);
1489
+ }, ea = function() {
1490
+ var e, r = {
1491
+ assert: function(n) {
1492
+ if (!r.has(n))
1493
+ throw new Ko("Side channel does not contain " + zo(n));
1494
+ },
1495
+ delete: function(n) {
1496
+ var o = e && e.next, a = Zo(e, n);
1497
+ return a && o && o === a && (e = void 0), !!a;
1498
+ },
1499
+ get: function(n) {
1500
+ return Yo(e, n);
1501
+ },
1502
+ has: function(n) {
1503
+ return Jo(e, n);
1504
+ },
1505
+ set: function(n, o) {
1506
+ e || (e = {
1507
+ next: void 0
1508
+ }), Qo(
1509
+ /** @type {NonNullable<typeof $o>} */
1510
+ e,
1511
+ n,
1512
+ o
1513
+ );
1514
+ }
1515
+ };
1516
+ return r;
1517
+ }, vr = Object, ta = Error, ra = EvalError, na = RangeError, oa = ReferenceError, aa = SyntaxError, ia = URIError, la = Math.abs, ca = Math.floor, sa = Math.max, ua = Math.min, fa = Math.pow, pa = Math.round, da = Number.isNaN || function(e) {
1518
+ return e !== e;
1519
+ }, ya = da, va = function(e) {
1520
+ return ya(e) || e === 0 ? e : e < 0 ? -1 : 1;
1521
+ }, ma = Object.getOwnPropertyDescriptor, Se = ma;
1522
+ if (Se)
1523
+ try {
1524
+ Se([], "length");
1525
+ } catch {
1526
+ Se = null;
1527
+ }
1528
+ var mr = Se, Ae = Object.defineProperty || !1;
1529
+ if (Ae)
1530
+ try {
1531
+ Ae({}, "a", { value: 1 });
1532
+ } catch {
1533
+ Ae = !1;
1534
+ }
1535
+ var ga = Ae, je, Gt;
1536
+ function ha() {
1537
+ return Gt || (Gt = 1, je = function() {
1538
+ if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
1539
+ return !1;
1540
+ if (typeof Symbol.iterator == "symbol")
1541
+ return !0;
1542
+ var e = {}, r = Symbol("test"), n = Object(r);
1543
+ if (typeof r == "string" || Object.prototype.toString.call(r) !== "[object Symbol]" || Object.prototype.toString.call(n) !== "[object Symbol]")
1544
+ return !1;
1545
+ var o = 42;
1546
+ e[r] = o;
1547
+ for (var a in e)
1548
+ return !1;
1549
+ if (typeof Object.keys == "function" && Object.keys(e).length !== 0 || typeof Object.getOwnPropertyNames == "function" && Object.getOwnPropertyNames(e).length !== 0)
1550
+ return !1;
1551
+ var i = Object.getOwnPropertySymbols(e);
1552
+ if (i.length !== 1 || i[0] !== r || !Object.prototype.propertyIsEnumerable.call(e, r))
1553
+ return !1;
1554
+ if (typeof Object.getOwnPropertyDescriptor == "function") {
1555
+ var l = (
1556
+ /** @type {PropertyDescriptor} */
1557
+ Object.getOwnPropertyDescriptor(e, r)
1558
+ );
1559
+ if (l.value !== o || l.enumerable !== !0)
1560
+ return !1;
1561
+ }
1562
+ return !0;
1563
+ }), je;
1564
+ }
1565
+ var ke, Bt;
1566
+ function _a() {
1567
+ if (Bt) return ke;
1568
+ Bt = 1;
1569
+ var t = typeof Symbol < "u" && Symbol, e = ha();
1570
+ return ke = function() {
1571
+ return typeof t != "function" || typeof Symbol != "function" || typeof t("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : e();
1572
+ }, ke;
1573
+ }
1574
+ var He, jt;
1575
+ function gr() {
1576
+ return jt || (jt = 1, He = typeof Reflect < "u" && Reflect.getPrototypeOf || null), He;
1577
+ }
1578
+ var Xe, kt;
1579
+ function hr() {
1580
+ if (kt) return Xe;
1581
+ kt = 1;
1582
+ var t = vr;
1583
+ return Xe = t.getPrototypeOf || null, Xe;
1584
+ }
1585
+ var Ea = "Function.prototype.bind called on incompatible ", Sa = Object.prototype.toString, Aa = Math.max, ba = "[object Function]", Ht = function(e, r) {
1586
+ for (var n = [], o = 0; o < e.length; o += 1)
1587
+ n[o] = e[o];
1588
+ for (var a = 0; a < r.length; a += 1)
1589
+ n[a + e.length] = r[a];
1590
+ return n;
1591
+ }, Oa = function(e, r) {
1592
+ for (var n = [], o = r, a = 0; o < e.length; o += 1, a += 1)
1593
+ n[a] = e[o];
1594
+ return n;
1595
+ }, Pa = function(t, e) {
1596
+ for (var r = "", n = 0; n < t.length; n += 1)
1597
+ r += t[n], n + 1 < t.length && (r += e);
1598
+ return r;
1599
+ }, Ra = function(e) {
1600
+ var r = this;
1601
+ if (typeof r != "function" || Sa.apply(r) !== ba)
1602
+ throw new TypeError(Ea + r);
1603
+ for (var n = Oa(arguments, 1), o, a = function() {
1604
+ if (this instanceof o) {
1605
+ var s = r.apply(
1606
+ this,
1607
+ Ht(n, arguments)
1608
+ );
1609
+ return Object(s) === s ? s : this;
1610
+ }
1611
+ return r.apply(
1612
+ e,
1613
+ Ht(n, arguments)
1614
+ );
1615
+ }, i = Aa(0, r.length - n.length), l = [], c = 0; c < i; c++)
1616
+ l[c] = "$" + c;
1617
+ if (o = Function("binder", "return function (" + Pa(l, ",") + "){ return binder.apply(this,arguments); }")(a), r.prototype) {
1618
+ var f = function() {
1619
+ };
1620
+ f.prototype = r.prototype, o.prototype = new f(), f.prototype = null;
1621
+ }
1622
+ return o;
1623
+ }, Ia = Ra, De = Function.prototype.bind || Ia, vt = Function.prototype.call, We, Xt;
1624
+ function _r() {
1625
+ return Xt || (Xt = 1, We = Function.prototype.apply), We;
1626
+ }
1627
+ var wa = typeof Reflect < "u" && Reflect && Reflect.apply, Ta = De, Ca = _r(), Na = vt, Da = wa, xa = Da || Ta.call(Na, Ca), $a = De, Ma = oe, Fa = vt, La = xa, Er = function(e) {
1628
+ if (e.length < 1 || typeof e[0] != "function")
1629
+ throw new Ma("a function is required");
1630
+ return La($a, Fa, e);
1631
+ }, qe, Wt;
1632
+ function Ua() {
1633
+ if (Wt) return qe;
1634
+ Wt = 1;
1635
+ var t = Er, e = mr, r;
1636
+ try {
1637
+ r = /** @type {{ __proto__?: typeof Array.prototype }} */
1638
+ [].__proto__ === Array.prototype;
1639
+ } catch (i) {
1640
+ if (!i || typeof i != "object" || !("code" in i) || i.code !== "ERR_PROTO_ACCESS")
1641
+ throw i;
1642
+ }
1643
+ var n = !!r && e && e(
1644
+ Object.prototype,
1645
+ /** @type {keyof typeof Object.prototype} */
1646
+ "__proto__"
1647
+ ), o = Object, a = o.getPrototypeOf;
1648
+ return qe = n && typeof n.get == "function" ? t([n.get]) : typeof a == "function" ? (
1649
+ /** @type {import('./get')} */
1650
+ function(l) {
1651
+ return a(l == null ? l : o(l));
1652
+ }
1653
+ ) : !1, qe;
1654
+ }
1655
+ var Ve, qt;
1656
+ function Ga() {
1657
+ if (qt) return Ve;
1658
+ qt = 1;
1659
+ var t = gr(), e = hr(), r = Ua();
1660
+ return Ve = t ? function(o) {
1661
+ return t(o);
1662
+ } : e ? function(o) {
1663
+ if (!o || typeof o != "object" && typeof o != "function")
1664
+ throw new TypeError("getProto: not an object");
1665
+ return e(o);
1666
+ } : r ? function(o) {
1667
+ return r(o);
1668
+ } : null, Ve;
1669
+ }
1670
+ var ze, Vt;
1671
+ function Ba() {
1672
+ if (Vt) return ze;
1673
+ Vt = 1;
1674
+ var t = Function.prototype.call, e = Object.prototype.hasOwnProperty, r = De;
1675
+ return ze = r.call(t, e), ze;
1676
+ }
1677
+ var v, ja = vr, ka = ta, Ha = ra, Xa = na, Wa = oa, ne = aa, te = oe, qa = ia, Va = la, za = ca, Ka = sa, Ya = ua, Qa = fa, Ja = pa, Za = va, Sr = Function, Ke = function(t) {
1678
+ try {
1679
+ return Sr('"use strict"; return (' + t + ").constructor;")();
1680
+ } catch {
1681
+ }
1682
+ }, de = mr, ei = ga, Ye = function() {
1683
+ throw new te();
1684
+ }, ti = de ? function() {
1685
+ try {
1686
+ return arguments.callee, Ye;
1687
+ } catch {
1688
+ try {
1689
+ return de(arguments, "callee").get;
1690
+ } catch {
1691
+ return Ye;
1692
+ }
1693
+ }
1694
+ }() : Ye, J = _a()(), A = Ga(), ri = hr(), ni = gr(), Ar = _r(), ye = vt, ee = {}, oi = typeof Uint8Array > "u" || !A ? v : A(Uint8Array), K = {
1695
+ __proto__: null,
1696
+ "%AggregateError%": typeof AggregateError > "u" ? v : AggregateError,
1697
+ "%Array%": Array,
1698
+ "%ArrayBuffer%": typeof ArrayBuffer > "u" ? v : ArrayBuffer,
1699
+ "%ArrayIteratorPrototype%": J && A ? A([][Symbol.iterator]()) : v,
1700
+ "%AsyncFromSyncIteratorPrototype%": v,
1701
+ "%AsyncFunction%": ee,
1702
+ "%AsyncGenerator%": ee,
1703
+ "%AsyncGeneratorFunction%": ee,
1704
+ "%AsyncIteratorPrototype%": ee,
1705
+ "%Atomics%": typeof Atomics > "u" ? v : Atomics,
1706
+ "%BigInt%": typeof BigInt > "u" ? v : BigInt,
1707
+ "%BigInt64Array%": typeof BigInt64Array > "u" ? v : BigInt64Array,
1708
+ "%BigUint64Array%": typeof BigUint64Array > "u" ? v : BigUint64Array,
1709
+ "%Boolean%": Boolean,
1710
+ "%DataView%": typeof DataView > "u" ? v : DataView,
1711
+ "%Date%": Date,
1712
+ "%decodeURI%": decodeURI,
1713
+ "%decodeURIComponent%": decodeURIComponent,
1714
+ "%encodeURI%": encodeURI,
1715
+ "%encodeURIComponent%": encodeURIComponent,
1716
+ "%Error%": ka,
1717
+ "%eval%": eval,
1718
+ // eslint-disable-line no-eval
1719
+ "%EvalError%": Ha,
1720
+ "%Float16Array%": typeof Float16Array > "u" ? v : Float16Array,
1721
+ "%Float32Array%": typeof Float32Array > "u" ? v : Float32Array,
1722
+ "%Float64Array%": typeof Float64Array > "u" ? v : Float64Array,
1723
+ "%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? v : FinalizationRegistry,
1724
+ "%Function%": Sr,
1725
+ "%GeneratorFunction%": ee,
1726
+ "%Int8Array%": typeof Int8Array > "u" ? v : Int8Array,
1727
+ "%Int16Array%": typeof Int16Array > "u" ? v : Int16Array,
1728
+ "%Int32Array%": typeof Int32Array > "u" ? v : Int32Array,
1729
+ "%isFinite%": isFinite,
1730
+ "%isNaN%": isNaN,
1731
+ "%IteratorPrototype%": J && A ? A(A([][Symbol.iterator]())) : v,
1732
+ "%JSON%": typeof JSON == "object" ? JSON : v,
1733
+ "%Map%": typeof Map > "u" ? v : Map,
1734
+ "%MapIteratorPrototype%": typeof Map > "u" || !J || !A ? v : A((/* @__PURE__ */ new Map())[Symbol.iterator]()),
1735
+ "%Math%": Math,
1736
+ "%Number%": Number,
1737
+ "%Object%": ja,
1738
+ "%Object.getOwnPropertyDescriptor%": de,
1739
+ "%parseFloat%": parseFloat,
1740
+ "%parseInt%": parseInt,
1741
+ "%Promise%": typeof Promise > "u" ? v : Promise,
1742
+ "%Proxy%": typeof Proxy > "u" ? v : Proxy,
1743
+ "%RangeError%": Xa,
1744
+ "%ReferenceError%": Wa,
1745
+ "%Reflect%": typeof Reflect > "u" ? v : Reflect,
1746
+ "%RegExp%": RegExp,
1747
+ "%Set%": typeof Set > "u" ? v : Set,
1748
+ "%SetIteratorPrototype%": typeof Set > "u" || !J || !A ? v : A((/* @__PURE__ */ new Set())[Symbol.iterator]()),
1749
+ "%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? v : SharedArrayBuffer,
1750
+ "%String%": String,
1751
+ "%StringIteratorPrototype%": J && A ? A(""[Symbol.iterator]()) : v,
1752
+ "%Symbol%": J ? Symbol : v,
1753
+ "%SyntaxError%": ne,
1754
+ "%ThrowTypeError%": ti,
1755
+ "%TypedArray%": oi,
1756
+ "%TypeError%": te,
1757
+ "%Uint8Array%": typeof Uint8Array > "u" ? v : Uint8Array,
1758
+ "%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? v : Uint8ClampedArray,
1759
+ "%Uint16Array%": typeof Uint16Array > "u" ? v : Uint16Array,
1760
+ "%Uint32Array%": typeof Uint32Array > "u" ? v : Uint32Array,
1761
+ "%URIError%": qa,
1762
+ "%WeakMap%": typeof WeakMap > "u" ? v : WeakMap,
1763
+ "%WeakRef%": typeof WeakRef > "u" ? v : WeakRef,
1764
+ "%WeakSet%": typeof WeakSet > "u" ? v : WeakSet,
1765
+ "%Function.prototype.call%": ye,
1766
+ "%Function.prototype.apply%": Ar,
1767
+ "%Object.defineProperty%": ei,
1768
+ "%Object.getPrototypeOf%": ri,
1769
+ "%Math.abs%": Va,
1770
+ "%Math.floor%": za,
1771
+ "%Math.max%": Ka,
1772
+ "%Math.min%": Ya,
1773
+ "%Math.pow%": Qa,
1774
+ "%Math.round%": Ja,
1775
+ "%Math.sign%": Za,
1776
+ "%Reflect.getPrototypeOf%": ni
1777
+ };
1778
+ if (A)
1779
+ try {
1780
+ null.error;
1781
+ } catch (t) {
1782
+ var ai = A(A(t));
1783
+ K["%Error.prototype%"] = ai;
1784
+ }
1785
+ var ii = function t(e) {
1786
+ var r;
1787
+ if (e === "%AsyncFunction%")
1788
+ r = Ke("async function () {}");
1789
+ else if (e === "%GeneratorFunction%")
1790
+ r = Ke("function* () {}");
1791
+ else if (e === "%AsyncGeneratorFunction%")
1792
+ r = Ke("async function* () {}");
1793
+ else if (e === "%AsyncGenerator%") {
1794
+ var n = t("%AsyncGeneratorFunction%");
1795
+ n && (r = n.prototype);
1796
+ } else if (e === "%AsyncIteratorPrototype%") {
1797
+ var o = t("%AsyncGenerator%");
1798
+ o && A && (r = A(o.prototype));
1799
+ }
1800
+ return K[e] = r, r;
1801
+ }, zt = {
1802
+ __proto__: null,
1803
+ "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
1804
+ "%ArrayPrototype%": ["Array", "prototype"],
1805
+ "%ArrayProto_entries%": ["Array", "prototype", "entries"],
1806
+ "%ArrayProto_forEach%": ["Array", "prototype", "forEach"],
1807
+ "%ArrayProto_keys%": ["Array", "prototype", "keys"],
1808
+ "%ArrayProto_values%": ["Array", "prototype", "values"],
1809
+ "%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"],
1810
+ "%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"],
1811
+ "%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"],
1812
+ "%BooleanPrototype%": ["Boolean", "prototype"],
1813
+ "%DataViewPrototype%": ["DataView", "prototype"],
1814
+ "%DatePrototype%": ["Date", "prototype"],
1815
+ "%ErrorPrototype%": ["Error", "prototype"],
1816
+ "%EvalErrorPrototype%": ["EvalError", "prototype"],
1817
+ "%Float32ArrayPrototype%": ["Float32Array", "prototype"],
1818
+ "%Float64ArrayPrototype%": ["Float64Array", "prototype"],
1819
+ "%FunctionPrototype%": ["Function", "prototype"],
1820
+ "%Generator%": ["GeneratorFunction", "prototype"],
1821
+ "%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"],
1822
+ "%Int8ArrayPrototype%": ["Int8Array", "prototype"],
1823
+ "%Int16ArrayPrototype%": ["Int16Array", "prototype"],
1824
+ "%Int32ArrayPrototype%": ["Int32Array", "prototype"],
1825
+ "%JSONParse%": ["JSON", "parse"],
1826
+ "%JSONStringify%": ["JSON", "stringify"],
1827
+ "%MapPrototype%": ["Map", "prototype"],
1828
+ "%NumberPrototype%": ["Number", "prototype"],
1829
+ "%ObjectPrototype%": ["Object", "prototype"],
1830
+ "%ObjProto_toString%": ["Object", "prototype", "toString"],
1831
+ "%ObjProto_valueOf%": ["Object", "prototype", "valueOf"],
1832
+ "%PromisePrototype%": ["Promise", "prototype"],
1833
+ "%PromiseProto_then%": ["Promise", "prototype", "then"],
1834
+ "%Promise_all%": ["Promise", "all"],
1835
+ "%Promise_reject%": ["Promise", "reject"],
1836
+ "%Promise_resolve%": ["Promise", "resolve"],
1837
+ "%RangeErrorPrototype%": ["RangeError", "prototype"],
1838
+ "%ReferenceErrorPrototype%": ["ReferenceError", "prototype"],
1839
+ "%RegExpPrototype%": ["RegExp", "prototype"],
1840
+ "%SetPrototype%": ["Set", "prototype"],
1841
+ "%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"],
1842
+ "%StringPrototype%": ["String", "prototype"],
1843
+ "%SymbolPrototype%": ["Symbol", "prototype"],
1844
+ "%SyntaxErrorPrototype%": ["SyntaxError", "prototype"],
1845
+ "%TypedArrayPrototype%": ["TypedArray", "prototype"],
1846
+ "%TypeErrorPrototype%": ["TypeError", "prototype"],
1847
+ "%Uint8ArrayPrototype%": ["Uint8Array", "prototype"],
1848
+ "%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"],
1849
+ "%Uint16ArrayPrototype%": ["Uint16Array", "prototype"],
1850
+ "%Uint32ArrayPrototype%": ["Uint32Array", "prototype"],
1851
+ "%URIErrorPrototype%": ["URIError", "prototype"],
1852
+ "%WeakMapPrototype%": ["WeakMap", "prototype"],
1853
+ "%WeakSetPrototype%": ["WeakSet", "prototype"]
1854
+ }, ve = De, Ie = Ba(), li = ve.call(ye, Array.prototype.concat), ci = ve.call(Ar, Array.prototype.splice), Kt = ve.call(ye, String.prototype.replace), we = ve.call(ye, String.prototype.slice), si = ve.call(ye, RegExp.prototype.exec), ui = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, fi = /\\(\\)?/g, pi = function(e) {
1855
+ var r = we(e, 0, 1), n = we(e, -1);
1856
+ if (r === "%" && n !== "%")
1857
+ throw new ne("invalid intrinsic syntax, expected closing `%`");
1858
+ if (n === "%" && r !== "%")
1859
+ throw new ne("invalid intrinsic syntax, expected opening `%`");
1860
+ var o = [];
1861
+ return Kt(e, ui, function(a, i, l, c) {
1862
+ o[o.length] = l ? Kt(c, fi, "$1") : i || a;
1863
+ }), o;
1864
+ }, di = function(e, r) {
1865
+ var n = e, o;
1866
+ if (Ie(zt, n) && (o = zt[n], n = "%" + o[0] + "%"), Ie(K, n)) {
1867
+ var a = K[n];
1868
+ if (a === ee && (a = ii(n)), typeof a > "u" && !r)
1869
+ throw new te("intrinsic " + e + " exists, but is not available. Please file an issue!");
1870
+ return {
1871
+ alias: o,
1872
+ name: n,
1873
+ value: a
1874
+ };
1875
+ }
1876
+ throw new ne("intrinsic " + e + " does not exist!");
1877
+ }, mt = function(e, r) {
1878
+ if (typeof e != "string" || e.length === 0)
1879
+ throw new te("intrinsic name must be a non-empty string");
1880
+ if (arguments.length > 1 && typeof r != "boolean")
1881
+ throw new te('"allowMissing" argument must be a boolean');
1882
+ if (si(/^%?[^%]*%?$/, e) === null)
1883
+ throw new ne("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
1884
+ var n = pi(e), o = n.length > 0 ? n[0] : "", a = di("%" + o + "%", r), i = a.name, l = a.value, c = !1, f = a.alias;
1885
+ f && (o = f[0], ci(n, li([0, 1], f)));
1886
+ for (var s = 1, p = !0; s < n.length; s += 1) {
1887
+ var u = n[s], y = we(u, 0, 1), d = we(u, -1);
1888
+ if ((y === '"' || y === "'" || y === "`" || d === '"' || d === "'" || d === "`") && y !== d)
1889
+ throw new ne("property names with quotes must have matching quotes");
1890
+ if ((u === "constructor" || !p) && (c = !0), o += "." + u, i = "%" + o + "%", Ie(K, i))
1891
+ l = K[i];
1892
+ else if (l != null) {
1893
+ if (!(u in l)) {
1894
+ if (!r)
1895
+ throw new te("base intrinsic for " + e + " exists, but the property is not available.");
1896
+ return;
1897
+ }
1898
+ if (de && s + 1 >= n.length) {
1899
+ var h = de(l, u);
1900
+ p = !!h, p && "get" in h && !("originalValue" in h.get) ? l = h.get : l = l[u];
1901
+ } else
1902
+ p = Ie(l, u), l = l[u];
1903
+ p && !c && (K[i] = l);
1904
+ }
1905
+ }
1906
+ return l;
1907
+ }, br = mt, Or = Er, yi = Or([br("%String.prototype.indexOf%")]), Pr = function(e, r) {
1908
+ var n = (
1909
+ /** @type {(this: unknown, ...args: unknown[]) => unknown} */
1910
+ br(e, !!r)
1911
+ );
1912
+ return typeof n == "function" && yi(e, ".prototype.") > -1 ? Or(
1913
+ /** @type {const} */
1914
+ [n]
1915
+ ) : n;
1916
+ }, vi = mt, me = Pr, mi = Ce, gi = oe, Yt = vi("%Map%", !0), hi = me("Map.prototype.get", !0), _i = me("Map.prototype.set", !0), Ei = me("Map.prototype.has", !0), Si = me("Map.prototype.delete", !0), Ai = me("Map.prototype.size", !0), Rr = !!Yt && /** @type {Exclude<import('.'), false>} */
1917
+ function() {
1918
+ var e, r = {
1919
+ assert: function(n) {
1920
+ if (!r.has(n))
1921
+ throw new gi("Side channel does not contain " + mi(n));
1922
+ },
1923
+ delete: function(n) {
1924
+ if (e) {
1925
+ var o = Si(e, n);
1926
+ return Ai(e) === 0 && (e = void 0), o;
1927
+ }
1928
+ return !1;
1929
+ },
1930
+ get: function(n) {
1931
+ if (e)
1932
+ return hi(e, n);
1933
+ },
1934
+ has: function(n) {
1935
+ return e ? Ei(e, n) : !1;
1936
+ },
1937
+ set: function(n, o) {
1938
+ e || (e = new Yt()), _i(e, n, o);
1939
+ }
1940
+ };
1941
+ return r;
1942
+ }, bi = mt, xe = Pr, Oi = Ce, Ee = Rr, Pi = oe, Z = bi("%WeakMap%", !0), Ri = xe("WeakMap.prototype.get", !0), Ii = xe("WeakMap.prototype.set", !0), wi = xe("WeakMap.prototype.has", !0), Ti = xe("WeakMap.prototype.delete", !0), Ci = Z ? (
1943
+ /** @type {Exclude<import('.'), false>} */
1944
+ function() {
1945
+ var e, r, n = {
1946
+ assert: function(o) {
1947
+ if (!n.has(o))
1948
+ throw new Pi("Side channel does not contain " + Oi(o));
1949
+ },
1950
+ delete: function(o) {
1951
+ if (Z && o && (typeof o == "object" || typeof o == "function")) {
1952
+ if (e)
1953
+ return Ti(e, o);
1954
+ } else if (Ee && r)
1955
+ return r.delete(o);
1956
+ return !1;
1957
+ },
1958
+ get: function(o) {
1959
+ return Z && o && (typeof o == "object" || typeof o == "function") && e ? Ri(e, o) : r && r.get(o);
1960
+ },
1961
+ has: function(o) {
1962
+ return Z && o && (typeof o == "object" || typeof o == "function") && e ? wi(e, o) : !!r && r.has(o);
1963
+ },
1964
+ set: function(o, a) {
1965
+ Z && o && (typeof o == "object" || typeof o == "function") ? (e || (e = new Z()), Ii(e, o, a)) : Ee && (r || (r = Ee()), r.set(o, a));
1966
+ }
1967
+ };
1968
+ return n;
1969
+ }
1970
+ ) : Ee, Ni = oe, Di = Ce, xi = ea, $i = Rr, Mi = Ci, Fi = Mi || $i || xi, Ir = function() {
1971
+ var e, r = {
1972
+ assert: function(n) {
1973
+ if (!r.has(n))
1974
+ throw new Ni("Side channel does not contain " + Di(n));
1975
+ },
1976
+ delete: function(n) {
1977
+ return !!e && e.delete(n);
1978
+ },
1979
+ get: function(n) {
1980
+ return e && e.get(n);
1981
+ },
1982
+ has: function(n) {
1983
+ return !!e && e.has(n);
1984
+ },
1985
+ set: function(n, o) {
1986
+ e || (e = Fi()), e.set(n, o);
1987
+ }
1988
+ };
1989
+ return r;
1990
+ }, Li = String.prototype.replace, Ui = /%20/g, Qe = {
1991
+ RFC1738: "RFC1738",
1992
+ RFC3986: "RFC3986"
1993
+ }, gt = {
1994
+ default: Qe.RFC3986,
1995
+ formatters: {
1996
+ RFC1738: function(t) {
1997
+ return Li.call(t, Ui, "+");
1998
+ },
1999
+ RFC3986: function(t) {
2000
+ return String(t);
2001
+ }
2002
+ },
2003
+ RFC1738: Qe.RFC1738,
2004
+ RFC3986: Qe.RFC3986
2005
+ }, Gi = gt, Bi = Ir, Je = Object.prototype.hasOwnProperty, z = Array.isArray, $e = Bi(), wr = function(e, r) {
2006
+ return $e.set(e, r), e;
2007
+ }, Te = function(e) {
2008
+ return $e.has(e);
2009
+ }, ct = function(e) {
2010
+ return $e.get(e);
2011
+ }, Tr = function(e, r) {
2012
+ $e.set(e, r);
2013
+ }, x = function() {
2014
+ for (var t = [], e = 0; e < 256; ++e)
2015
+ t.push("%" + ((e < 16 ? "0" : "") + e.toString(16)).toUpperCase());
2016
+ return t;
2017
+ }(), ji = function(e) {
2018
+ for (; e.length > 1; ) {
2019
+ var r = e.pop(), n = r.obj[r.prop];
2020
+ if (z(n)) {
2021
+ for (var o = [], a = 0; a < n.length; ++a)
2022
+ typeof n[a] < "u" && o.push(n[a]);
2023
+ r.obj[r.prop] = o;
2024
+ }
2025
+ }
2026
+ }, ht = function(e, r) {
2027
+ for (var n = r && r.plainObjects ? { __proto__: null } : {}, o = 0; o < e.length; ++o)
2028
+ typeof e[o] < "u" && (n[o] = e[o]);
2029
+ return n;
2030
+ }, ki = function t(e, r, n) {
2031
+ if (!r)
2032
+ return e;
2033
+ if (typeof r != "object" && typeof r != "function") {
2034
+ if (z(e))
2035
+ e.push(r);
2036
+ else if (e && typeof e == "object")
2037
+ if (Te(e)) {
2038
+ var o = ct(e) + 1;
2039
+ e[o] = r, Tr(e, o);
2040
+ } else (n && (n.plainObjects || n.allowPrototypes) || !Je.call(Object.prototype, r)) && (e[r] = !0);
2041
+ else
2042
+ return [e, r];
2043
+ return e;
2044
+ }
2045
+ if (!e || typeof e != "object") {
2046
+ if (Te(r)) {
2047
+ for (var a = Object.keys(r), i = n && n.plainObjects ? { __proto__: null, 0: e } : { 0: e }, l = 0; l < a.length; l++) {
2048
+ var c = parseInt(a[l], 10);
2049
+ i[c + 1] = r[a[l]];
2050
+ }
2051
+ return wr(i, ct(r) + 1);
2052
+ }
2053
+ return [e].concat(r);
2054
+ }
2055
+ var f = e;
2056
+ return z(e) && !z(r) && (f = ht(e, n)), z(e) && z(r) ? (r.forEach(function(s, p) {
2057
+ if (Je.call(e, p)) {
2058
+ var u = e[p];
2059
+ u && typeof u == "object" && s && typeof s == "object" ? e[p] = t(u, s, n) : e.push(s);
2060
+ } else
2061
+ e[p] = s;
2062
+ }), e) : Object.keys(r).reduce(function(s, p) {
2063
+ var u = r[p];
2064
+ return Je.call(s, p) ? s[p] = t(s[p], u, n) : s[p] = u, s;
2065
+ }, f);
2066
+ }, Hi = function(e, r) {
2067
+ return Object.keys(r).reduce(function(n, o) {
2068
+ return n[o] = r[o], n;
2069
+ }, e);
2070
+ }, Xi = function(t, e, r) {
2071
+ var n = t.replace(/\+/g, " ");
2072
+ if (r === "iso-8859-1")
2073
+ return n.replace(/%[0-9a-f]{2}/gi, unescape);
2074
+ try {
2075
+ return decodeURIComponent(n);
2076
+ } catch {
2077
+ return n;
2078
+ }
2079
+ }, Ze = 1024, Wi = function(e, r, n, o, a) {
2080
+ if (e.length === 0)
2081
+ return e;
2082
+ var i = e;
2083
+ if (typeof e == "symbol" ? i = Symbol.prototype.toString.call(e) : typeof e != "string" && (i = String(e)), n === "iso-8859-1")
2084
+ return escape(i).replace(/%u[0-9a-f]{4}/gi, function(y) {
2085
+ return "%26%23" + parseInt(y.slice(2), 16) + "%3B";
2086
+ });
2087
+ for (var l = "", c = 0; c < i.length; c += Ze) {
2088
+ for (var f = i.length >= Ze ? i.slice(c, c + Ze) : i, s = [], p = 0; p < f.length; ++p) {
2089
+ var u = f.charCodeAt(p);
2090
+ if (u === 45 || u === 46 || u === 95 || u === 126 || u >= 48 && u <= 57 || u >= 65 && u <= 90 || u >= 97 && u <= 122 || a === Gi.RFC1738 && (u === 40 || u === 41)) {
2091
+ s[s.length] = f.charAt(p);
2092
+ continue;
2093
+ }
2094
+ if (u < 128) {
2095
+ s[s.length] = x[u];
2096
+ continue;
2097
+ }
2098
+ if (u < 2048) {
2099
+ s[s.length] = x[192 | u >> 6] + x[128 | u & 63];
2100
+ continue;
2101
+ }
2102
+ if (u < 55296 || u >= 57344) {
2103
+ s[s.length] = x[224 | u >> 12] + x[128 | u >> 6 & 63] + x[128 | u & 63];
2104
+ continue;
2105
+ }
2106
+ p += 1, u = 65536 + ((u & 1023) << 10 | f.charCodeAt(p) & 1023), s[s.length] = x[240 | u >> 18] + x[128 | u >> 12 & 63] + x[128 | u >> 6 & 63] + x[128 | u & 63];
2107
+ }
2108
+ l += s.join("");
2109
+ }
2110
+ return l;
2111
+ }, qi = function(e) {
2112
+ for (var r = [{ obj: { o: e }, prop: "o" }], n = [], o = 0; o < r.length; ++o)
2113
+ for (var a = r[o], i = a.obj[a.prop], l = Object.keys(i), c = 0; c < l.length; ++c) {
2114
+ var f = l[c], s = i[f];
2115
+ typeof s == "object" && s !== null && n.indexOf(s) === -1 && (r.push({ obj: i, prop: f }), n.push(s));
2116
+ }
2117
+ return ji(r), e;
2118
+ }, Vi = function(e) {
2119
+ return Object.prototype.toString.call(e) === "[object RegExp]";
2120
+ }, zi = function(e) {
2121
+ return !e || typeof e != "object" ? !1 : !!(e.constructor && e.constructor.isBuffer && e.constructor.isBuffer(e));
2122
+ }, Ki = function(e, r, n, o) {
2123
+ if (Te(e)) {
2124
+ var a = ct(e) + 1;
2125
+ return e[a] = r, Tr(e, a), e;
2126
+ }
2127
+ var i = [].concat(e, r);
2128
+ return i.length > n ? wr(ht(i, { plainObjects: o }), i.length - 1) : i;
2129
+ }, Yi = function(e, r) {
2130
+ if (z(e)) {
2131
+ for (var n = [], o = 0; o < e.length; o += 1)
2132
+ n.push(r(e[o]));
2133
+ return n;
2134
+ }
2135
+ return r(e);
2136
+ }, Cr = {
2137
+ arrayToObject: ht,
2138
+ assign: Hi,
2139
+ combine: Ki,
2140
+ compact: qi,
2141
+ decode: Xi,
2142
+ encode: Wi,
2143
+ isBuffer: zi,
2144
+ isOverflow: Te,
2145
+ isRegExp: Vi,
2146
+ maybeMap: Yi,
2147
+ merge: ki
2148
+ }, Nr = Ir, be = Cr, pe = gt, Qi = Object.prototype.hasOwnProperty, Dr = {
2149
+ brackets: function(e) {
2150
+ return e + "[]";
2151
+ },
2152
+ comma: "comma",
2153
+ indices: function(e, r) {
2154
+ return e + "[" + r + "]";
2155
+ },
2156
+ repeat: function(e) {
2157
+ return e;
2158
+ }
2159
+ }, $ = Array.isArray, Ji = Array.prototype.push, xr = function(t, e) {
2160
+ Ji.apply(t, $(e) ? e : [e]);
2161
+ }, Zi = Date.prototype.toISOString, Qt = pe.default, _ = {
2162
+ addQueryPrefix: !1,
2163
+ allowDots: !1,
2164
+ allowEmptyArrays: !1,
2165
+ arrayFormat: "indices",
2166
+ charset: "utf-8",
2167
+ charsetSentinel: !1,
2168
+ commaRoundTrip: !1,
2169
+ delimiter: "&",
2170
+ encode: !0,
2171
+ encodeDotInKeys: !1,
2172
+ encoder: be.encode,
2173
+ encodeValuesOnly: !1,
2174
+ filter: void 0,
2175
+ format: Qt,
2176
+ formatter: pe.formatters[Qt],
2177
+ // deprecated
2178
+ indices: !1,
2179
+ serializeDate: function(e) {
2180
+ return Zi.call(e);
2181
+ },
2182
+ skipNulls: !1,
2183
+ strictNullHandling: !1
2184
+ }, el = function(e) {
2185
+ return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || typeof e == "symbol" || typeof e == "bigint";
2186
+ }, et = {}, tl = function t(e, r, n, o, a, i, l, c, f, s, p, u, y, d, h, E, O, P) {
2187
+ for (var m = e, R = P, I = 0, F = !1; (R = R.get(et)) !== void 0 && !F; ) {
2188
+ var C = R.get(e);
2189
+ if (I += 1, typeof C < "u") {
2190
+ if (C === I)
2191
+ throw new RangeError("Cyclic object value");
2192
+ F = !0;
2193
+ }
2194
+ typeof R.get(et) > "u" && (I = 0);
2195
+ }
2196
+ if (typeof s == "function" ? m = s(r, m) : m instanceof Date ? m = y(m) : n === "comma" && $(m) && (m = be.maybeMap(m, function(ie) {
2197
+ return ie instanceof Date ? y(ie) : ie;
2198
+ })), m === null) {
2199
+ if (i)
2200
+ return f && !E ? f(r, _.encoder, O, "key", d) : r;
2201
+ m = "";
2202
+ }
2203
+ if (el(m) || be.isBuffer(m)) {
2204
+ if (f) {
2205
+ var j = E ? r : f(r, _.encoder, O, "key", d);
2206
+ return [h(j) + "=" + h(f(m, _.encoder, O, "value", d))];
2207
+ }
2208
+ return [h(r) + "=" + h(String(m))];
2209
+ }
2210
+ var L = [];
2211
+ if (typeof m > "u")
2212
+ return L;
2213
+ var N;
2214
+ if (n === "comma" && $(m))
2215
+ E && f && (m = be.maybeMap(m, f)), N = [{ value: m.length > 0 ? m.join(",") || null : void 0 }];
2216
+ else if ($(s))
2217
+ N = s;
2218
+ else {
2219
+ var Q = Object.keys(m);
2220
+ N = p ? Q.sort(p) : Q;
2221
+ }
2222
+ var k = c ? String(r).replace(/\./g, "%2E") : String(r), b = o && $(m) && m.length === 1 ? k + "[]" : k;
2223
+ if (a && $(m) && m.length === 0)
2224
+ return b + "[]";
2225
+ for (var D = 0; D < N.length; ++D) {
2226
+ var w = N[D], q = typeof w == "object" && w && typeof w.value < "u" ? w.value : m[w];
2227
+ if (!(l && q === null)) {
2228
+ var ae = u && c ? String(w).replace(/\./g, "%2E") : String(w), Fe = $(m) ? typeof n == "function" ? n(b, ae) : b : b + (u ? "." + ae : "[" + ae + "]");
2229
+ P.set(e, I);
2230
+ var ge = Nr();
2231
+ ge.set(et, P), xr(L, t(
2232
+ q,
2233
+ Fe,
2234
+ n,
2235
+ o,
2236
+ a,
2237
+ i,
2238
+ l,
2239
+ c,
2240
+ n === "comma" && E && $(m) ? null : f,
2241
+ s,
2242
+ p,
2243
+ u,
2244
+ y,
2245
+ d,
2246
+ h,
2247
+ E,
2248
+ O,
2249
+ ge
2250
+ ));
2251
+ }
2252
+ }
2253
+ return L;
2254
+ }, rl = function(e) {
2255
+ if (!e)
2256
+ return _;
2257
+ if (typeof e.allowEmptyArrays < "u" && typeof e.allowEmptyArrays != "boolean")
2258
+ throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
2259
+ if (typeof e.encodeDotInKeys < "u" && typeof e.encodeDotInKeys != "boolean")
2260
+ throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");
2261
+ if (e.encoder !== null && typeof e.encoder < "u" && typeof e.encoder != "function")
2262
+ throw new TypeError("Encoder has to be a function.");
2263
+ var r = e.charset || _.charset;
2264
+ if (typeof e.charset < "u" && e.charset !== "utf-8" && e.charset !== "iso-8859-1")
2265
+ throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
2266
+ var n = pe.default;
2267
+ if (typeof e.format < "u") {
2268
+ if (!Qi.call(pe.formatters, e.format))
2269
+ throw new TypeError("Unknown format option provided.");
2270
+ n = e.format;
2271
+ }
2272
+ var o = pe.formatters[n], a = _.filter;
2273
+ (typeof e.filter == "function" || $(e.filter)) && (a = e.filter);
2274
+ var i;
2275
+ if (e.arrayFormat in Dr ? i = e.arrayFormat : "indices" in e ? i = e.indices ? "indices" : "repeat" : i = _.arrayFormat, "commaRoundTrip" in e && typeof e.commaRoundTrip != "boolean")
2276
+ throw new TypeError("`commaRoundTrip` must be a boolean, or absent");
2277
+ var l = typeof e.allowDots > "u" ? e.encodeDotInKeys === !0 ? !0 : _.allowDots : !!e.allowDots;
2278
+ return {
2279
+ addQueryPrefix: typeof e.addQueryPrefix == "boolean" ? e.addQueryPrefix : _.addQueryPrefix,
2280
+ allowDots: l,
2281
+ allowEmptyArrays: typeof e.allowEmptyArrays == "boolean" ? !!e.allowEmptyArrays : _.allowEmptyArrays,
2282
+ arrayFormat: i,
2283
+ charset: r,
2284
+ charsetSentinel: typeof e.charsetSentinel == "boolean" ? e.charsetSentinel : _.charsetSentinel,
2285
+ commaRoundTrip: !!e.commaRoundTrip,
2286
+ delimiter: typeof e.delimiter > "u" ? _.delimiter : e.delimiter,
2287
+ encode: typeof e.encode == "boolean" ? e.encode : _.encode,
2288
+ encodeDotInKeys: typeof e.encodeDotInKeys == "boolean" ? e.encodeDotInKeys : _.encodeDotInKeys,
2289
+ encoder: typeof e.encoder == "function" ? e.encoder : _.encoder,
2290
+ encodeValuesOnly: typeof e.encodeValuesOnly == "boolean" ? e.encodeValuesOnly : _.encodeValuesOnly,
2291
+ filter: a,
2292
+ format: n,
2293
+ formatter: o,
2294
+ serializeDate: typeof e.serializeDate == "function" ? e.serializeDate : _.serializeDate,
2295
+ skipNulls: typeof e.skipNulls == "boolean" ? e.skipNulls : _.skipNulls,
2296
+ sort: typeof e.sort == "function" ? e.sort : null,
2297
+ strictNullHandling: typeof e.strictNullHandling == "boolean" ? e.strictNullHandling : _.strictNullHandling
2298
+ };
2299
+ }, nl = function(t, e) {
2300
+ var r = t, n = rl(e), o, a;
2301
+ typeof n.filter == "function" ? (a = n.filter, r = a("", r)) : $(n.filter) && (a = n.filter, o = a);
2302
+ var i = [];
2303
+ if (typeof r != "object" || r === null)
2304
+ return "";
2305
+ var l = Dr[n.arrayFormat], c = l === "comma" && n.commaRoundTrip;
2306
+ o || (o = Object.keys(r)), n.sort && o.sort(n.sort);
2307
+ for (var f = Nr(), s = 0; s < o.length; ++s) {
2308
+ var p = o[s], u = r[p];
2309
+ n.skipNulls && u === null || xr(i, tl(
2310
+ u,
2311
+ p,
2312
+ l,
2313
+ c,
2314
+ n.allowEmptyArrays,
2315
+ n.strictNullHandling,
2316
+ n.skipNulls,
2317
+ n.encodeDotInKeys,
2318
+ n.encode ? n.encoder : null,
2319
+ n.filter,
2320
+ n.sort,
2321
+ n.allowDots,
2322
+ n.serializeDate,
2323
+ n.format,
2324
+ n.formatter,
2325
+ n.encodeValuesOnly,
2326
+ n.charset,
2327
+ f
2328
+ ));
2329
+ }
2330
+ var y = i.join(n.delimiter), d = n.addQueryPrefix === !0 ? "?" : "";
2331
+ return n.charsetSentinel && (n.charset === "iso-8859-1" ? d += "utf8=%26%2310003%3B&" : d += "utf8=%E2%9C%93&"), y.length > 0 ? d + y : "";
2332
+ }, X = Cr, Oe = Object.prototype.hasOwnProperty, Jt = Array.isArray, g = {
2333
+ allowDots: !1,
2334
+ allowEmptyArrays: !1,
2335
+ allowPrototypes: !1,
2336
+ allowSparse: !1,
2337
+ arrayLimit: 20,
2338
+ charset: "utf-8",
2339
+ charsetSentinel: !1,
2340
+ comma: !1,
2341
+ decodeDotInKeys: !1,
2342
+ decoder: X.decode,
2343
+ delimiter: "&",
2344
+ depth: 5,
2345
+ duplicates: "combine",
2346
+ ignoreQueryPrefix: !1,
2347
+ interpretNumericEntities: !1,
2348
+ parameterLimit: 1e3,
2349
+ parseArrays: !0,
2350
+ plainObjects: !1,
2351
+ strictDepth: !1,
2352
+ strictNullHandling: !1,
2353
+ throwOnLimitExceeded: !1
2354
+ }, ol = function(t) {
2355
+ return t.replace(/&#(\d+);/g, function(e, r) {
2356
+ return String.fromCharCode(parseInt(r, 10));
2357
+ });
2358
+ }, $r = function(t, e, r) {
2359
+ if (t && typeof t == "string" && e.comma && t.indexOf(",") > -1)
2360
+ return t.split(",");
2361
+ if (e.throwOnLimitExceeded && r >= e.arrayLimit)
2362
+ throw new RangeError("Array limit exceeded. Only " + e.arrayLimit + " element" + (e.arrayLimit === 1 ? "" : "s") + " allowed in an array.");
2363
+ return t;
2364
+ }, al = "utf8=%26%2310003%3B", il = "utf8=%E2%9C%93", ll = function(e, r) {
2365
+ var n = { __proto__: null }, o = r.ignoreQueryPrefix ? e.replace(/^\?/, "") : e;
2366
+ o = o.replace(/%5B/gi, "[").replace(/%5D/gi, "]");
2367
+ var a = r.parameterLimit === 1 / 0 ? void 0 : r.parameterLimit, i = o.split(
2368
+ r.delimiter,
2369
+ r.throwOnLimitExceeded ? a + 1 : a
2370
+ );
2371
+ if (r.throwOnLimitExceeded && i.length > a)
2372
+ throw new RangeError("Parameter limit exceeded. Only " + a + " parameter" + (a === 1 ? "" : "s") + " allowed.");
2373
+ var l = -1, c, f = r.charset;
2374
+ if (r.charsetSentinel)
2375
+ for (c = 0; c < i.length; ++c)
2376
+ i[c].indexOf("utf8=") === 0 && (i[c] === il ? f = "utf-8" : i[c] === al && (f = "iso-8859-1"), l = c, c = i.length);
2377
+ for (c = 0; c < i.length; ++c)
2378
+ if (c !== l) {
2379
+ var s = i[c], p = s.indexOf("]="), u = p === -1 ? s.indexOf("=") : p + 1, y, d;
2380
+ if (u === -1 ? (y = r.decoder(s, g.decoder, f, "key"), d = r.strictNullHandling ? null : "") : (y = r.decoder(s.slice(0, u), g.decoder, f, "key"), y !== null && (d = X.maybeMap(
2381
+ $r(
2382
+ s.slice(u + 1),
2383
+ r,
2384
+ Jt(n[y]) ? n[y].length : 0
2385
+ ),
2386
+ function(E) {
2387
+ return r.decoder(E, g.decoder, f, "value");
2388
+ }
2389
+ ))), d && r.interpretNumericEntities && f === "iso-8859-1" && (d = ol(String(d))), s.indexOf("[]=") > -1 && (d = Jt(d) ? [d] : d), y !== null) {
2390
+ var h = Oe.call(n, y);
2391
+ h && r.duplicates === "combine" ? n[y] = X.combine(
2392
+ n[y],
2393
+ d,
2394
+ r.arrayLimit,
2395
+ r.plainObjects
2396
+ ) : (!h || r.duplicates === "last") && (n[y] = d);
2397
+ }
2398
+ }
2399
+ return n;
2400
+ }, cl = function(t, e, r, n) {
2401
+ var o = 0;
2402
+ if (t.length > 0 && t[t.length - 1] === "[]") {
2403
+ var a = t.slice(0, -1).join("");
2404
+ o = Array.isArray(e) && e[a] ? e[a].length : 0;
2405
+ }
2406
+ for (var i = n ? e : $r(e, r, o), l = t.length - 1; l >= 0; --l) {
2407
+ var c, f = t[l];
2408
+ if (f === "[]" && r.parseArrays)
2409
+ X.isOverflow(i) ? c = i : c = r.allowEmptyArrays && (i === "" || r.strictNullHandling && i === null) ? [] : X.combine(
2410
+ [],
2411
+ i,
2412
+ r.arrayLimit,
2413
+ r.plainObjects
2414
+ );
2415
+ else {
2416
+ c = r.plainObjects ? { __proto__: null } : {};
2417
+ var s = f.charAt(0) === "[" && f.charAt(f.length - 1) === "]" ? f.slice(1, -1) : f, p = r.decodeDotInKeys ? s.replace(/%2E/g, ".") : s, u = parseInt(p, 10);
2418
+ !r.parseArrays && p === "" ? c = { 0: i } : !isNaN(u) && f !== p && String(u) === p && u >= 0 && r.parseArrays && u <= r.arrayLimit ? (c = [], c[u] = i) : p !== "__proto__" && (c[p] = i);
2419
+ }
2420
+ i = c;
2421
+ }
2422
+ return i;
2423
+ }, sl = function(e, r) {
2424
+ var n = r.allowDots ? e.replace(/\.([^.[]+)/g, "[$1]") : e;
2425
+ if (r.depth <= 0)
2426
+ return !r.plainObjects && Oe.call(Object.prototype, n) && !r.allowPrototypes ? void 0 : [n];
2427
+ var o = /(\[[^[\]]*])/, a = /(\[[^[\]]*])/g, i = o.exec(n), l = i ? n.slice(0, i.index) : n, c = [];
2428
+ if (l) {
2429
+ if (!r.plainObjects && Oe.call(Object.prototype, l) && !r.allowPrototypes)
2430
+ return;
2431
+ c.push(l);
2432
+ }
2433
+ for (var f = 0; (i = a.exec(n)) !== null && f < r.depth; ) {
2434
+ f += 1;
2435
+ var s = i[1].slice(1, -1);
2436
+ if (!r.plainObjects && Oe.call(Object.prototype, s) && !r.allowPrototypes)
2437
+ return;
2438
+ c.push(i[1]);
2439
+ }
2440
+ if (i) {
2441
+ if (r.strictDepth === !0)
2442
+ throw new RangeError("Input depth exceeded depth option of " + r.depth + " and strictDepth is true");
2443
+ c.push("[" + n.slice(i.index) + "]");
2444
+ }
2445
+ return c;
2446
+ }, ul = function(e, r, n, o) {
2447
+ if (e) {
2448
+ var a = sl(e, n);
2449
+ if (a)
2450
+ return cl(a, r, n, o);
2451
+ }
2452
+ }, fl = function(e) {
2453
+ if (!e)
2454
+ return g;
2455
+ if (typeof e.allowEmptyArrays < "u" && typeof e.allowEmptyArrays != "boolean")
2456
+ throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
2457
+ if (typeof e.decodeDotInKeys < "u" && typeof e.decodeDotInKeys != "boolean")
2458
+ throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");
2459
+ if (e.decoder !== null && typeof e.decoder < "u" && typeof e.decoder != "function")
2460
+ throw new TypeError("Decoder has to be a function.");
2461
+ if (typeof e.charset < "u" && e.charset !== "utf-8" && e.charset !== "iso-8859-1")
2462
+ throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
2463
+ if (typeof e.throwOnLimitExceeded < "u" && typeof e.throwOnLimitExceeded != "boolean")
2464
+ throw new TypeError("`throwOnLimitExceeded` option must be a boolean");
2465
+ var r = typeof e.charset > "u" ? g.charset : e.charset, n = typeof e.duplicates > "u" ? g.duplicates : e.duplicates;
2466
+ if (n !== "combine" && n !== "first" && n !== "last")
2467
+ throw new TypeError("The duplicates option must be either combine, first, or last");
2468
+ var o = typeof e.allowDots > "u" ? e.decodeDotInKeys === !0 ? !0 : g.allowDots : !!e.allowDots;
2469
+ return {
2470
+ allowDots: o,
2471
+ allowEmptyArrays: typeof e.allowEmptyArrays == "boolean" ? !!e.allowEmptyArrays : g.allowEmptyArrays,
2472
+ allowPrototypes: typeof e.allowPrototypes == "boolean" ? e.allowPrototypes : g.allowPrototypes,
2473
+ allowSparse: typeof e.allowSparse == "boolean" ? e.allowSparse : g.allowSparse,
2474
+ arrayLimit: typeof e.arrayLimit == "number" ? e.arrayLimit : g.arrayLimit,
2475
+ charset: r,
2476
+ charsetSentinel: typeof e.charsetSentinel == "boolean" ? e.charsetSentinel : g.charsetSentinel,
2477
+ comma: typeof e.comma == "boolean" ? e.comma : g.comma,
2478
+ decodeDotInKeys: typeof e.decodeDotInKeys == "boolean" ? e.decodeDotInKeys : g.decodeDotInKeys,
2479
+ decoder: typeof e.decoder == "function" ? e.decoder : g.decoder,
2480
+ delimiter: typeof e.delimiter == "string" || X.isRegExp(e.delimiter) ? e.delimiter : g.delimiter,
2481
+ // eslint-disable-next-line no-implicit-coercion, no-extra-parens
2482
+ depth: typeof e.depth == "number" || e.depth === !1 ? +e.depth : g.depth,
2483
+ duplicates: n,
2484
+ ignoreQueryPrefix: e.ignoreQueryPrefix === !0,
2485
+ interpretNumericEntities: typeof e.interpretNumericEntities == "boolean" ? e.interpretNumericEntities : g.interpretNumericEntities,
2486
+ parameterLimit: typeof e.parameterLimit == "number" ? e.parameterLimit : g.parameterLimit,
2487
+ parseArrays: e.parseArrays !== !1,
2488
+ plainObjects: typeof e.plainObjects == "boolean" ? e.plainObjects : g.plainObjects,
2489
+ strictDepth: typeof e.strictDepth == "boolean" ? !!e.strictDepth : g.strictDepth,
2490
+ strictNullHandling: typeof e.strictNullHandling == "boolean" ? e.strictNullHandling : g.strictNullHandling,
2491
+ throwOnLimitExceeded: typeof e.throwOnLimitExceeded == "boolean" ? e.throwOnLimitExceeded : !1
2492
+ };
2493
+ }, pl = function(t, e) {
2494
+ var r = fl(e);
2495
+ if (t === "" || t === null || typeof t > "u")
2496
+ return r.plainObjects ? { __proto__: null } : {};
2497
+ for (var n = typeof t == "string" ? ll(t, r) : t, o = r.plainObjects ? { __proto__: null } : {}, a = Object.keys(n), i = 0; i < a.length; ++i) {
2498
+ var l = a[i], c = ul(l, n[l], r, typeof t == "string");
2499
+ o = X.merge(o, c, r);
2500
+ }
2501
+ return r.allowSparse === !0 ? o : X.compact(o);
2502
+ }, dl = nl, yl = pl, vl = gt, ml = {
2503
+ formats: vl,
2504
+ parse: yl,
2505
+ stringify: dl
2506
+ };
2507
+ const gl = /* @__PURE__ */ Jn(ml);
2508
+ async function Me(t, e = {}, r) {
2509
+ const { cms: n = "cms" } = e;
2510
+ return fetch(`${t.href}?${gl.stringify(e)}`, {
2511
+ method: "GET",
2512
+ cache: r ? "no-store" : "default",
2513
+ headers: {
2514
+ Accept: "application/json",
2515
+ "Content-Type": "application/json",
2516
+ "strapi-encode-source-maps": n === "strapi" && r ? "true" : "false"
2517
+ // strapi
2518
+ }
2519
+ });
2520
+ }
2521
+ function _t(t, e) {
2522
+ return !(e != null && e.cms) || (e == null ? void 0 : e.cms) === "vtex" ? `https://${e == null ? void 0 : e.storeId}.myvtex.com/_v/cms/api/${e == null ? void 0 : e.name}/${t}` : String(
2523
+ new URL(`api/${t}`, process.env.NEXT_PUBLIC_API_URL)
2524
+ );
2525
+ }
2526
+ function Mr(t) {
2527
+ return Array.isArray(t) && t.length > 0 ? t[0] : Array.isArray(t) ? null : t;
2528
+ }
2529
+ async function Fr(t, e = [], r = {}) {
2530
+ var n;
2531
+ if ((r == null ? void 0 : r.contentType) === t) {
2532
+ const o = (r == null ? void 0 : r.previewMode) === "true", a = (r == null ? void 0 : r.documentId) ?? "", i = a && ((n = String(a)) != null && n.length) ? `/${r.documentId}` : "", l = new URL(_t(`${t}${i}`, r)), c = await Me(l, r, o);
2533
+ if (!c.ok)
2534
+ return console.error(`[Error fetching preview data]: ${t} - status: ${c.statusText}`), [];
2535
+ const f = await c.json(), s = e.findIndex((p) => p.documentId === f.id);
2536
+ return s !== -1 ? (e[s] = f, [...e]) : [f, ...e];
2537
+ }
2538
+ return e;
2539
+ }
2540
+ const Ll = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2541
+ __proto__: null,
2542
+ createUrl: _t,
2543
+ fetchCMS: Me,
2544
+ mergePreviewDocument: Fr,
2545
+ spreadStrapiData: Mr
2546
+ }, Symbol.toStringTag, { value: "Module" }));
2547
+ async function Lr(t, e = {}, r) {
2548
+ const n = !!(e != null && e.previewMode), o = await Me(t, e, n);
2549
+ if (!o.ok)
2550
+ return console.log(
2551
+ `Failed to fetch Strapi (url=${String(t)}, status=${o.status})`
2552
+ ), { status: 404, data: [], error: String(o.status) };
2553
+ const { data: a } = await o.json();
2554
+ return a ? {
2555
+ status: 200,
2556
+ data: r ? Mr(a) : a
2557
+ } : { status: 404, data: [], error: "No data found" };
2558
+ }
2559
+ async function Ur(t, e, r = {}) {
2560
+ const n = (r == null ? void 0 : r.previewId) ?? "", o = (r == null ? void 0 : r.previewMode) === "true", a = { ...r, versionId: n }, i = [];
2561
+ let l = 1, c = 0, f = !0;
2562
+ try {
2563
+ do {
2564
+ const s = await Me(e, { ...a, page: l }, o).then((p) => p.json()).catch((p) => (console.error("Error fetching VTEX CMS data:", p), console.error("Error URL:", e.toString()), null));
2565
+ l === 1 && (c = s.totalItems), Array.isArray(s == null ? void 0 : s.data) && i.push(...s.data), f = !!(s != null && s.hasNextPage), l++;
2566
+ } while (f && i.length < c);
2567
+ if (o && i.length > 0) {
2568
+ if (!t || !n)
2569
+ throw new Error(
2570
+ "contentType and previewId are required for preview mode in vtexCMSData"
2571
+ );
2572
+ const s = await Fr(
2573
+ t,
2574
+ i,
2575
+ a
2576
+ );
2577
+ return {
2578
+ status: s.length > 0 ? 200 : 404,
2579
+ data: s
2580
+ };
2581
+ }
2582
+ return {
2583
+ status: i.length ? 200 : 404,
2584
+ data: i
2585
+ };
2586
+ } catch (s) {
2587
+ return {
2588
+ status: 500,
2589
+ data: [],
2590
+ error: s instanceof Error ? s.message : String(s)
2591
+ };
2592
+ }
2593
+ }
2594
+ const Ul = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2595
+ __proto__: null,
2596
+ strapiCMSData: Lr,
2597
+ vtexCMSData: Ur
2598
+ }, Symbol.toStringTag, { value: "Module" }));
2599
+ async function hl({
2600
+ contentType: t,
2601
+ documentId: e,
2602
+ versionId: r,
2603
+ CMS_PROJECT_NAME: n
2604
+ }) {
2605
+ const o = e && e.length ? `/${e}` : "", a = r && r.length ? `?versionId=${r}` : "";
2606
+ return rr(
2607
+ `/cms/api/${n}/${t}${o}${a}`,
2608
+ { cache: "no-cache" }
2609
+ );
2610
+ }
2611
+ async function _l(t, e = {}, r) {
2612
+ const { cms: n = "vtex" } = e ?? {};
2613
+ try {
2614
+ const o = new URL(_t(t, e));
2615
+ return n !== "vtex" ? Lr(o, e, r) : Ur(t, o, e);
2616
+ } catch (o) {
2617
+ return console.error(`[Fetch ContentType Error CMS ${n}]`, o), r ? { status: 400, data: null } : { status: 200, data: [] };
2618
+ }
2619
+ }
2620
+ const Gl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2621
+ __proto__: null,
2622
+ fetchContentType: _l,
2623
+ getCMSContentType: hl
2624
+ }, Symbol.toStringTag, { value: "Module" }));
2625
+ export {
2626
+ zn as $,
2627
+ sn as A,
2628
+ Cl as B,
2629
+ Dl as C,
2630
+ bl as D,
2631
+ Ol as E,
2632
+ tt as F,
2633
+ dn as G,
2634
+ tn as H,
2635
+ un as I,
2636
+ ft as J,
2637
+ eo as K,
2638
+ ar as L,
2639
+ to as M,
2640
+ ro as N,
2641
+ no as O,
2642
+ oo as P,
2643
+ ir as Q,
2644
+ Jn as R,
2645
+ yo as S,
2646
+ rn as T,
2647
+ yn as U,
2648
+ mn as V,
2649
+ he as W,
2650
+ Un as X,
2651
+ an as Y,
2652
+ pn as Z,
2653
+ Tl as _,
2654
+ cn as a,
2655
+ kn as a0,
2656
+ Nl as a1,
2657
+ mo as a2,
2658
+ _l as a3,
2659
+ Fl as a4,
2660
+ lr as a5,
2661
+ wl as a6,
2662
+ $l as a7,
2663
+ Il as a8,
2664
+ Ml as a9,
2665
+ Gl as aa,
2666
+ Ll as ab,
2667
+ Ul as ac,
2668
+ Qn as ad,
2669
+ xl as ae,
2670
+ fn as b,
2671
+ _n as c,
2672
+ Sn as d,
2673
+ Cn as e,
2674
+ Ln as f,
2675
+ nn as g,
2676
+ $n as h,
2677
+ hn as i,
2678
+ Dn as j,
2679
+ Nn as k,
2680
+ T as l,
2681
+ Mn as m,
2682
+ Bn as n,
2683
+ Pl as o,
2684
+ Rl as p,
2685
+ Gn as q,
2686
+ En as r,
2687
+ Zt as s,
2688
+ wn as t,
2689
+ Rn as u,
2690
+ An as v,
2691
+ xn as w,
2692
+ or as x,
2693
+ rr as y,
2694
+ on as z
2695
+ };