@soma-vertical-web/multi-lib 1.0.4 → 1.0.6

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.
@@ -0,0 +1,1840 @@
1
+ import { jsxs as ct, Fragment as gr, jsx as $ } from "react/jsx-runtime";
2
+ import { Utils as hr } from "@soma-vertical-web/core-components";
3
+ const Ke = (t, e = !0) => Intl.NumberFormat("pt-BR", {
4
+ style: "currency",
5
+ currency: "BRL",
6
+ minimumFractionDigits: e ? 2 : 0
7
+ }).format(t), _r = ({ valueInCents: t, hasFree: e, freeTaxMessage: r }) => t === 0 ? e ? r : Ke(0) : Ke(t / 100), br = (t, e) => {
8
+ const n = (t - e) * 100 / t;
9
+ return Math.floor(n);
10
+ }, Bt = (t, e) => {
11
+ const [r, n] = t.split(e);
12
+ return { name: r.trim(), size: n ? n.trim() : "" };
13
+ }, Sr = (t, e) => {
14
+ if (!t)
15
+ return {};
16
+ const [r, n] = t.split(e);
17
+ return { color: r == null ? void 0 : r.trim(), size: n == null ? void 0 : n.trim() };
18
+ }, wr = (t, e = "tamanho") => {
19
+ if (t.additionalProperty) {
20
+ const [r] = t.additionalProperty;
21
+ return r != null && r.name ? r.name.toLocaleLowerCase() === e ? r.value : t.name : "";
22
+ }
23
+ return t.name;
24
+ }, xr = (t, e) => t.replace(e, "").trim(), Ar = (t) => t.replace(/\//g, ""), Or = ({ items: t, NAME_SPLIT_SYMBOL: e }) => {
25
+ const r = {
26
+ price: 0,
27
+ listPrice: 0,
28
+ installments: {
29
+ count: 0,
30
+ value: 0
31
+ }
32
+ }, n = (i, f) => {
33
+ var s;
34
+ f && (f.sellerId = i.sellerId, f.sellerName = i.sellerName, f.available = !0, f.isSellerDefault = i.sellerDefault);
35
+ const {
36
+ Price: l,
37
+ ListPrice: u,
38
+ PaymentOptions: { installmentOptions: c }
39
+ } = i.commertialOffer;
40
+ r.price = l, r.listPrice = u;
41
+ const p = (s = c == null ? void 0 : c[0]) == null ? void 0 : s.installments;
42
+ if (p) {
43
+ const { count: v, value: y } = p[p.length - 1];
44
+ r.installments = {
45
+ count: v,
46
+ value: y / 100
47
+ };
48
+ }
49
+ };
50
+ let o = !0;
51
+ const a = t.reduce((i, f) => {
52
+ var c;
53
+ const l = {
54
+ name: f.name,
55
+ sku: f.itemId,
56
+ value: ((c = f.Tamanho) == null ? void 0 : c[0]) ?? Bt(f.nameComplete ?? f.name, e).size,
57
+ available: !1,
58
+ sellerId: "",
59
+ sellerName: "",
60
+ isSellerDefault: !1
61
+ }, u = f.sellers.filter((p) => (p.sellerDefault && p.commertialOffer.IsAvailable && (l.available = !0, n(p, l)), p.commertialOffer.IsAvailable));
62
+ return !l.isSellerDefault && u.length > 0 && (l.available = !0, n(u[0], {
63
+ ...l,
64
+ sellerId: u[0].sellerId,
65
+ sellerName: u[0].sellerName
66
+ })), l.available === !1 && (o = !1), i.push(l), i;
67
+ }, []);
68
+ return {
69
+ ...r,
70
+ sizes: a,
71
+ allSizesAvailable: o
72
+ };
73
+ }, Er = (t) => t ? !t.offers.offers.find(({ quantity: e = 0 }) => e > 0) : !1, Pr = (t, e) => {
74
+ const r = t.find(
75
+ (n) => n.availability.includes("InStock") && n.quantity && n.listPrice > 0 && n.seller.identifier === e
76
+ );
77
+ return r || t.find(
78
+ (n) => n.availability.includes("InStock") && n.quantity && n.listPrice > 0
79
+ );
80
+ }, $r = ({ images: t, TEXTURE_IMAGE: e }) => t.find((r) => e.includes(r.imageLabel)) ?? t[0], Ir = (t, e) => {
81
+ const r = /\/ids\/(\d+)\//, n = t.match(r);
82
+ return n ? t.replace(
83
+ `/${n[1]}/`,
84
+ `/${n[1]}-${e.width}-${e.height}/`
85
+ ) : t;
86
+ }, Rr = (t, e) => {
87
+ const r = /\/ids\/(\d+)-(\d+)-(\d+)\//, n = t.match(r);
88
+ return n ? t.replace(
89
+ `/${n[1]}-${n[2]}-${n[3]}/`,
90
+ `/${n[1]}-${e.width}-${e.height}/`
91
+ ) : t;
92
+ }, kr = ({
93
+ images: t,
94
+ label: e
95
+ }) => {
96
+ const r = t.filter(
97
+ (n) => n.keywords === e.first || n.keywords === e.second || n.alternateName === e.first || n.alternateName === e.second
98
+ );
99
+ return r.length === 0 ? t.slice(0, 2) : r;
100
+ }, Dr = (t) => {
101
+ const [e, r] = t.split("/").map(Number);
102
+ if (Number.isNaN(e) || Number.isNaN(r))
103
+ throw new Error("[ERROR ASPECT RATIO IMAGE]: Invalid aspect ratio format");
104
+ return r / e;
105
+ }, Fr = (t, e, r) => {
106
+ e && (t ? (e.getAttribute("src") || (e.src = r ?? ""), e.play()) : e.pause());
107
+ }, si = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
108
+ __proto__: null,
109
+ disableSKU: Er,
110
+ formatPriceToCurrency: Ke,
111
+ freightParsePrice: _r,
112
+ getAspectRatio: Dr,
113
+ getColorAndSizeFromSkuName: Sr,
114
+ getDiscountPercent: br,
115
+ getFirstImages: kr,
116
+ getProductNameWithoutSku: xr,
117
+ getSKUName: wr,
118
+ getSkuInfos: Or,
119
+ getThumbImage: $r,
120
+ getValidOffer: Pr,
121
+ removeSlashes: Ar,
122
+ resizingImg: Ir,
123
+ setVideoPlay: Fr,
124
+ splitNameAndSizeFromFullName: Bt,
125
+ updatedResizedImg: Rr
126
+ }, Symbol.toStringTag, { value: "Module" })), ft = "fuzzy", ut = "operator", Tr = (t) => ({
127
+ isDepartment: t != null && t.length ? t[0].key === "category-1" : !1
128
+ }), pi = (t, e) => {
129
+ const r = decodeURIComponent(e ?? "").slice(1).split("/");
130
+ return t.map((n) => {
131
+ if (n.key === "category-2" && n.__typename === "FacetBoolean") {
132
+ const o = n.values;
133
+ return {
134
+ ...n,
135
+ values: o.filter(
136
+ (a) => !r.find(
137
+ (i) => i.toLowerCase() === a.value || i.toLowerCase() === a.name.toLowerCase()
138
+ )
139
+ )
140
+ };
141
+ }
142
+ return n;
143
+ });
144
+ }, Lt = (t, e) => e ? t === "category-1" : !1, Nr = (t) => t.key === "operator" && (t.value === "and" || t.value === "or"), Cr = (t) => t.type === "TEXT", Mr = (t) => t.key === "fuzzy" && (t.value === "0" || t.value === "1" || t.value === "auto"), jr = (t) => {
145
+ const { key: e, name: r, values: n } = t;
146
+ return {
147
+ __typename: "FacetBoolean",
148
+ key: e,
149
+ label: r,
150
+ values: n.slice().sort((o, a) => o.name.localeCompare(a.name))
151
+ };
152
+ }, Br = ({ key: t, values: e }) => ({
153
+ __typename: "FacetRange",
154
+ key: t,
155
+ values: e
156
+ }), yi = (t, e, r) => {
157
+ if (!(t instanceof Object) || !("facets" in t))
158
+ return [];
159
+ const { facets: n = [] } = t, o = e != null && e.length ? e[0].key === "category-1" : !1;
160
+ return n.filter(
161
+ (i) => !r || !Lt(i.key, o)
162
+ ).map(
163
+ (i) => Cr(i) ? jr(i) : Br(i)
164
+ );
165
+ }, di = (t, e) => {
166
+ const r = t.find(({ key: o }) => o === ft) ?? null, n = t.find(({ key: o }) => o === ut) ?? null;
167
+ r && Mr(r) && e.append(ft, r.value), n && Nr(n) && e.append(ut, n.value);
168
+ }, Lr = (t) => t.map((e) => {
169
+ const [r, n] = e.split("/");
170
+ return { key: r, value: n };
171
+ }), vi = (t, e) => {
172
+ const r = decodeURIComponent(e ?? "").slice(1).split("/"), n = t.filter(({ value: a }) => !r.includes(decodeURIComponent(a))).map((a) => ({
173
+ ...a,
174
+ value: decodeURIComponent(a.value)
175
+ })), { isDepartment: o } = Tr(n);
176
+ return n == null ? void 0 : n.filter((a) => !Lt(a.key, o));
177
+ }, mi = ({ pathname: t, searchParams: e }, r) => {
178
+ const n = e.get("sort") ?? "", o = e.get("query") ?? null, a = parseInt(e.get("page") ?? "1", 10);
179
+ return {
180
+ sort: n,
181
+ facets: Lr(r),
182
+ term: o,
183
+ base: o ? "" : t,
184
+ page: a
185
+ };
186
+ }, gi = (t) => {
187
+ const e = new URLSearchParams();
188
+ return Object.entries(t).forEach(([r, n]) => {
189
+ Array.isArray(n) ? n.forEach((o) => e.append(r, o)) : n !== void 0 && e.append(r, n);
190
+ }), e;
191
+ }, hi = (t, e, r = 24, n = 1, o) => {
192
+ const a = `/search?query=${e ?? ""}&count=${r}&page=${n}${o ? `&sort=${o.replace("_", ":")}` : ""}`;
193
+ t.push(a);
194
+ };
195
+ var st = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
196
+ function Ur(t) {
197
+ return t && t.__esModule && Object.prototype.hasOwnProperty.call(t, "default") ? t.default : t;
198
+ }
199
+ function Wr(t) {
200
+ if (t.__esModule) return t;
201
+ var e = t.default;
202
+ if (typeof e == "function") {
203
+ var r = function n() {
204
+ return this instanceof n ? Reflect.construct(e, arguments, this.constructor) : e.apply(this, arguments);
205
+ };
206
+ r.prototype = e.prototype;
207
+ } else r = {};
208
+ return Object.defineProperty(r, "__esModule", { value: !0 }), Object.keys(t).forEach(function(n) {
209
+ var o = Object.getOwnPropertyDescriptor(t, n);
210
+ Object.defineProperty(r, n, o.get ? o : {
211
+ enumerable: !0,
212
+ get: function() {
213
+ return t[n];
214
+ }
215
+ });
216
+ }), r;
217
+ }
218
+ const ue = {
219
+ "responsive-mobile-flex": "_responsive-mobile-flex_1e0ai_1",
220
+ "responsive-desktop-flex": "_responsive-desktop-flex_1e0ai_15",
221
+ "responsive-mobile-block": "_responsive-mobile-block_1e0ai_30",
222
+ "responsive-desktop-block": "_responsive-desktop-block_1e0ai_41"
223
+ }, qr = "_header_9xxjk_57", zr = "_actions_9xxjk_131", Gr = "_breadcrumb_9xxjk_142", Hr = "_credits_9xxjk_157", Kr = "_pdplinks_9xxjk_185", Vr = "_similars_9xxjk_212", Qr = "_sizes_9xxjk_251", Jr = "_measurementTable_9xxjk_267", Yr = "_measurementHead_9xxjk_280", Xr = "_measurementRows_9xxjk_285", Zr = "_measurementRowsTitle_9xxjk_302", en = "_measurementRowsText_9xxjk_314", tn = "_measurementImage_9xxjk_325", rn = "_measurementImageContainer_9xxjk_328", nn = "_measurementContent_9xxjk_337", on = "_measurementTitle_9xxjk_341", an = "_measurementClose_9xxjk_352", ln = "_productref_9xxjk_417", cn = "_slideOut_9xxjk_1", fn = "_slideIn_9xxjk_1", un = "_content_9xxjk_397", sn = "_pdp_9xxjk_185", pn = "_divider_9xxjk_575", _i = {
224
+ "bottom-navigation": "_bottom-navigation_9xxjk_1",
225
+ "bottom-navigation__credits-modifier": "_bottom-navigation__credits-modifier_9xxjk_18",
226
+ "bottom-navigation__header": "_bottom-navigation__header_9xxjk_21",
227
+ "bottom-navigation__header-content": "_bottom-navigation__header-content_9xxjk_26",
228
+ "golden-tag-content": "_golden-tag-content_9xxjk_45",
229
+ "bottom-navigation__price-and-promo": "_bottom-navigation__price-and-promo_9xxjk_48",
230
+ header: qr,
231
+ "golden-tag": "_golden-tag_9xxjk_45",
232
+ "golden-tag-video": "_golden-tag-video_9xxjk_86",
233
+ "golden-tag-content-text": "_golden-tag-content-text_9xxjk_105",
234
+ actions: zr,
235
+ "add-to-cart": "_add-to-cart_9xxjk_138",
236
+ breadcrumb: Gr,
237
+ "breadcrumb--active": "_breadcrumb--active_9xxjk_147",
238
+ credits: Hr,
239
+ "gallery-carousel-modifier": "_gallery-carousel-modifier_9xxjk_162",
240
+ pdplinks: Kr,
241
+ "links-wrapper": "_links-wrapper_9xxjk_195",
242
+ similars: Vr,
243
+ "similars-info": "_similars-info_9xxjk_224",
244
+ "toggle-style-modifier": "_toggle-style-modifier_9xxjk_233",
245
+ "accessibility-info": "_accessibility-info_9xxjk_237",
246
+ sizes: Qr,
247
+ "price-wrapper": "_price-wrapper_9xxjk_263",
248
+ measurementTable: Jr,
249
+ measurementHead: Yr,
250
+ measurementRows: Xr,
251
+ measurementRowsTitle: Zr,
252
+ measurementRowsText: en,
253
+ measurementImage: tn,
254
+ measurementImageContainer: rn,
255
+ measurementContent: nn,
256
+ measurementTitle: on,
257
+ measurementClose: an,
258
+ "tabs-root-modifier": "_tabs-root-modifier_9xxjk_358",
259
+ "tabs-list-modifier": "_tabs-list-modifier_9xxjk_376",
260
+ "tabs-item-modifier": "_tabs-item-modifier_9xxjk_393",
261
+ "content-wrapper": "_content-wrapper_9xxjk_397",
262
+ productref: ln,
263
+ "tabs-panel": "_tabs-panel_9xxjk_428",
264
+ "tabs-panel-exit": "_tabs-panel-exit_9xxjk_434",
265
+ slideOut: cn,
266
+ "tabs-panel-enter": "_tabs-panel-enter_9xxjk_438",
267
+ slideIn: fn,
268
+ content: un,
269
+ pdp: sn,
270
+ "pdp-main": "_pdp-main_9xxjk_496",
271
+ "pdp-main__gallery-wrapper": "_pdp-main__gallery-wrapper_9xxjk_501",
272
+ "pdp-main__info": "_pdp-main__info_9xxjk_518",
273
+ "pdp-main__info-main-content": "_pdp-main__info-main-content_9xxjk_533",
274
+ "pdp-main__info-subsection": "_pdp-main__info-subsection_9xxjk_533",
275
+ "subsection-product-info": "_subsection-product-info_9xxjk_544",
276
+ "subsection-similars": "_subsection-similars_9xxjk_547",
277
+ "subsection-sizes": "_subsection-sizes_9xxjk_550",
278
+ "subsection-actions": "_subsection-actions_9xxjk_553",
279
+ "pdp-main__info-secondary-content": "_pdp-main__info-secondary-content_9xxjk_557",
280
+ "sections-title": "_sections-title_9xxjk_563",
281
+ divider: pn,
282
+ "breadcrumbs-desktop": "_breadcrumbs-desktop_9xxjk_580",
283
+ "breadcrumbs-mobile": "_breadcrumbs-mobile_9xxjk_589"
284
+ }, bi = ({
285
+ children: t,
286
+ data: e,
287
+ SectionZone: r,
288
+ className: n
289
+ }) => {
290
+ var c, p;
291
+ const o = ((c = e == null ? void 0 : e.filter((s) => {
292
+ var v, y;
293
+ return ((y = (v = s.config) == null ? void 0 : v.responsive) == null ? void 0 : y.deviceType) === "mobile";
294
+ })[0]) == null ? void 0 : c.sections) || [], a = ((p = e == null ? void 0 : e.filter((s) => {
295
+ var v, y;
296
+ return ((y = (v = s.config) == null ? void 0 : v.responsive) == null ? void 0 : y.deviceType) === "desktop";
297
+ })[0]) == null ? void 0 : p.sections) || [], i = o.slice(0, 1), f = o.slice(1, o.length), l = a.slice(0, 1), u = a.slice(1, a.length);
298
+ return /* @__PURE__ */ ct(gr, { children: [
299
+ /* @__PURE__ */ ct("div", { className: n, children: [
300
+ /* @__PURE__ */ $("div", { className: ue["responsive-mobile-flex"], children: /* @__PURE__ */ $(r, { data: i ?? [] }) }),
301
+ /* @__PURE__ */ $("div", { className: ue["responsive-desktop-flex"], children: /* @__PURE__ */ $(r, { data: l ?? [] }) })
302
+ ] }),
303
+ t,
304
+ /* @__PURE__ */ $("div", { className: ue["responsive-mobile-flex"], children: /* @__PURE__ */ $(r, { data: f ?? [] }) }),
305
+ /* @__PURE__ */ $("div", { className: ue["responsive-desktop-flex"], children: /* @__PURE__ */ $(r, { data: u ?? [] }) }),
306
+ /* @__PURE__ */ $(hr.Divider, {})
307
+ ] });
308
+ };
309
+ var J = TypeError;
310
+ const yn = {}, dn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
311
+ __proto__: null,
312
+ default: yn
313
+ }, Symbol.toStringTag, { value: "Module" })), vn = /* @__PURE__ */ Wr(dn);
314
+ var et = typeof Map == "function" && Map.prototype, Pe = Object.getOwnPropertyDescriptor && et ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, me = et && Pe && typeof Pe.get == "function" ? Pe.get : null, pt = et && Map.prototype.forEach, tt = typeof Set == "function" && Set.prototype, $e = Object.getOwnPropertyDescriptor && tt ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, ge = tt && $e && typeof $e.get == "function" ? $e.get : null, yt = tt && Set.prototype.forEach, mn = typeof WeakMap == "function" && WeakMap.prototype, ee = mn ? WeakMap.prototype.has : null, gn = typeof WeakSet == "function" && WeakSet.prototype, te = gn ? WeakSet.prototype.has : null, hn = typeof WeakRef == "function" && WeakRef.prototype, dt = hn ? WeakRef.prototype.deref : null, _n = Boolean.prototype.valueOf, bn = Object.prototype.toString, Sn = Function.prototype.toString, wn = String.prototype.match, rt = String.prototype.slice, T = String.prototype.replace, xn = String.prototype.toUpperCase, vt = String.prototype.toLowerCase, Ut = RegExp.prototype.test, mt = Array.prototype.concat, E = Array.prototype.join, An = Array.prototype.slice, gt = Math.floor, Ve = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, Ie = Object.getOwnPropertySymbols, Qe = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, V = typeof Symbol == "function" && typeof Symbol.iterator == "object", re = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === V || !0) ? Symbol.toStringTag : null, Wt = Object.prototype.propertyIsEnumerable, ht = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(t) {
315
+ return t.__proto__;
316
+ } : null);
317
+ function _t(t, e) {
318
+ if (t === 1 / 0 || t === -1 / 0 || t !== t || t && t > -1e3 && t < 1e3 || Ut.call(/e/, e))
319
+ return e;
320
+ var r = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
321
+ if (typeof t == "number") {
322
+ var n = t < 0 ? -gt(-t) : gt(t);
323
+ if (n !== t) {
324
+ var o = String(n), a = rt.call(e, o.length + 1);
325
+ return T.call(o, r, "$&_") + "." + T.call(T.call(a, /([0-9]{3})/g, "$&_"), /_$/, "");
326
+ }
327
+ }
328
+ return T.call(e, r, "$&_");
329
+ }
330
+ var Je = vn, bt = Je.custom, St = Gt(bt) ? bt : null, qt = {
331
+ __proto__: null,
332
+ double: '"',
333
+ single: "'"
334
+ }, On = {
335
+ __proto__: null,
336
+ double: /(["\\])/g,
337
+ single: /(['\\])/g
338
+ }, be = function t(e, r, n, o) {
339
+ var a = r || {};
340
+ if (I(a, "quoteStyle") && !I(qt, a.quoteStyle))
341
+ throw new TypeError('option "quoteStyle" must be "single" or "double"');
342
+ if (I(a, "maxStringLength") && (typeof a.maxStringLength == "number" ? a.maxStringLength < 0 && a.maxStringLength !== 1 / 0 : a.maxStringLength !== null))
343
+ throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
344
+ var i = I(a, "customInspect") ? a.customInspect : !0;
345
+ if (typeof i != "boolean" && i !== "symbol")
346
+ throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");
347
+ if (I(a, "indent") && a.indent !== null && a.indent !== " " && !(parseInt(a.indent, 10) === a.indent && a.indent > 0))
348
+ throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
349
+ if (I(a, "numericSeparator") && typeof a.numericSeparator != "boolean")
350
+ throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
351
+ var f = a.numericSeparator;
352
+ if (typeof e > "u")
353
+ return "undefined";
354
+ if (e === null)
355
+ return "null";
356
+ if (typeof e == "boolean")
357
+ return e ? "true" : "false";
358
+ if (typeof e == "string")
359
+ return Kt(e, a);
360
+ if (typeof e == "number") {
361
+ if (e === 0)
362
+ return 1 / 0 / e > 0 ? "0" : "-0";
363
+ var l = String(e);
364
+ return f ? _t(e, l) : l;
365
+ }
366
+ if (typeof e == "bigint") {
367
+ var u = String(e) + "n";
368
+ return f ? _t(e, u) : u;
369
+ }
370
+ var c = typeof a.depth > "u" ? 5 : a.depth;
371
+ if (typeof n > "u" && (n = 0), n >= c && c > 0 && typeof e == "object")
372
+ return Ye(e) ? "[Array]" : "[Object]";
373
+ var p = qn(a, n);
374
+ if (typeof o > "u")
375
+ o = [];
376
+ else if (Ht(o, e) >= 0)
377
+ return "[Circular]";
378
+ function s(x, F, P) {
379
+ if (F && (o = An.call(o), o.push(F)), P) {
380
+ var X = {
381
+ depth: a.depth
382
+ };
383
+ return I(a, "quoteStyle") && (X.quoteStyle = a.quoteStyle), t(x, X, n + 1, o);
384
+ }
385
+ return t(x, a, n + 1, o);
386
+ }
387
+ if (typeof e == "function" && !wt(e)) {
388
+ var v = Tn(e), y = se(e, s);
389
+ return "[Function" + (v ? ": " + v : " (anonymous)") + "]" + (y.length > 0 ? " { " + E.call(y, ", ") + " }" : "");
390
+ }
391
+ if (Gt(e)) {
392
+ var h = V ? T.call(String(e), /^(Symbol\(.*\))_[^)]*$/, "$1") : Qe.call(e);
393
+ return typeof e == "object" && !V ? Z(h) : h;
394
+ }
395
+ if (Ln(e)) {
396
+ for (var S = "<" + vt.call(String(e.nodeName)), w = e.attributes || [], R = 0; R < w.length; R++)
397
+ S += " " + w[R].name + "=" + zt(En(w[R].value), "double", a);
398
+ return S += ">", e.childNodes && e.childNodes.length && (S += "..."), S += "</" + vt.call(String(e.nodeName)) + ">", S;
399
+ }
400
+ if (Ye(e)) {
401
+ if (e.length === 0)
402
+ return "[]";
403
+ var m = se(e, s);
404
+ return p && !Wn(m) ? "[" + Xe(m, p) + "]" : "[ " + E.call(m, ", ") + " ]";
405
+ }
406
+ if ($n(e)) {
407
+ var k = se(e, s);
408
+ return !("cause" in Error.prototype) && "cause" in e && !Wt.call(e, "cause") ? "{ [" + String(e) + "] " + E.call(mt.call("[cause]: " + s(e.cause), k), ", ") + " }" : k.length === 0 ? "[" + String(e) + "]" : "{ [" + String(e) + "] " + E.call(k, ", ") + " }";
409
+ }
410
+ if (typeof e == "object" && i) {
411
+ if (St && typeof e[St] == "function" && Je)
412
+ return Je(e, { depth: c - n });
413
+ if (i !== "symbol" && typeof e.inspect == "function")
414
+ return e.inspect();
415
+ }
416
+ if (Nn(e)) {
417
+ var C = [];
418
+ return pt && pt.call(e, function(x, F) {
419
+ C.push(s(F, e, !0) + " => " + s(x, e));
420
+ }), xt("Map", me.call(e), C, p);
421
+ }
422
+ if (jn(e)) {
423
+ var Y = [];
424
+ return yt && yt.call(e, function(x) {
425
+ Y.push(s(x, e));
426
+ }), xt("Set", ge.call(e), Y, p);
427
+ }
428
+ if (Cn(e))
429
+ return Re("WeakMap");
430
+ if (Bn(e))
431
+ return Re("WeakSet");
432
+ if (Mn(e))
433
+ return Re("WeakRef");
434
+ if (Rn(e))
435
+ return Z(s(Number(e)));
436
+ if (Dn(e))
437
+ return Z(s(Ve.call(e)));
438
+ if (kn(e))
439
+ return Z(_n.call(e));
440
+ if (In(e))
441
+ return Z(s(String(e)));
442
+ if (typeof window < "u" && e === window)
443
+ return "{ [object Window] }";
444
+ if (typeof globalThis < "u" && e === globalThis || typeof st < "u" && e === st)
445
+ return "{ [object globalThis] }";
446
+ if (!Pn(e) && !wt(e)) {
447
+ var W = se(e, s), ce = ht ? ht(e) === Object.prototype : e instanceof Object || e.constructor === Object, M = e instanceof Object ? "" : "null prototype", D = !ce && re && Object(e) === e && re in e ? rt.call(N(e), 8, -1) : M ? "Object" : "", fe = ce || typeof e.constructor != "function" ? "" : e.constructor.name ? e.constructor.name + " " : "", q = fe + (D || M ? "[" + E.call(mt.call([], D || [], M || []), ": ") + "] " : "");
448
+ return W.length === 0 ? q + "{}" : p ? q + "{" + Xe(W, p) + "}" : q + "{ " + E.call(W, ", ") + " }";
449
+ }
450
+ return String(e);
451
+ };
452
+ function zt(t, e, r) {
453
+ var n = r.quoteStyle || e, o = qt[n];
454
+ return o + t + o;
455
+ }
456
+ function En(t) {
457
+ return T.call(String(t), /"/g, "&quot;");
458
+ }
459
+ function U(t) {
460
+ return !re || !(typeof t == "object" && (re in t || typeof t[re] < "u"));
461
+ }
462
+ function Ye(t) {
463
+ return N(t) === "[object Array]" && U(t);
464
+ }
465
+ function Pn(t) {
466
+ return N(t) === "[object Date]" && U(t);
467
+ }
468
+ function wt(t) {
469
+ return N(t) === "[object RegExp]" && U(t);
470
+ }
471
+ function $n(t) {
472
+ return N(t) === "[object Error]" && U(t);
473
+ }
474
+ function In(t) {
475
+ return N(t) === "[object String]" && U(t);
476
+ }
477
+ function Rn(t) {
478
+ return N(t) === "[object Number]" && U(t);
479
+ }
480
+ function kn(t) {
481
+ return N(t) === "[object Boolean]" && U(t);
482
+ }
483
+ function Gt(t) {
484
+ if (V)
485
+ return t && typeof t == "object" && t instanceof Symbol;
486
+ if (typeof t == "symbol")
487
+ return !0;
488
+ if (!t || typeof t != "object" || !Qe)
489
+ return !1;
490
+ try {
491
+ return Qe.call(t), !0;
492
+ } catch {
493
+ }
494
+ return !1;
495
+ }
496
+ function Dn(t) {
497
+ if (!t || typeof t != "object" || !Ve)
498
+ return !1;
499
+ try {
500
+ return Ve.call(t), !0;
501
+ } catch {
502
+ }
503
+ return !1;
504
+ }
505
+ var Fn = Object.prototype.hasOwnProperty || function(t) {
506
+ return t in this;
507
+ };
508
+ function I(t, e) {
509
+ return Fn.call(t, e);
510
+ }
511
+ function N(t) {
512
+ return bn.call(t);
513
+ }
514
+ function Tn(t) {
515
+ if (t.name)
516
+ return t.name;
517
+ var e = wn.call(Sn.call(t), /^function\s*([\w$]+)/);
518
+ return e ? e[1] : null;
519
+ }
520
+ function Ht(t, e) {
521
+ if (t.indexOf)
522
+ return t.indexOf(e);
523
+ for (var r = 0, n = t.length; r < n; r++)
524
+ if (t[r] === e)
525
+ return r;
526
+ return -1;
527
+ }
528
+ function Nn(t) {
529
+ if (!me || !t || typeof t != "object")
530
+ return !1;
531
+ try {
532
+ me.call(t);
533
+ try {
534
+ ge.call(t);
535
+ } catch {
536
+ return !0;
537
+ }
538
+ return t instanceof Map;
539
+ } catch {
540
+ }
541
+ return !1;
542
+ }
543
+ function Cn(t) {
544
+ if (!ee || !t || typeof t != "object")
545
+ return !1;
546
+ try {
547
+ ee.call(t, ee);
548
+ try {
549
+ te.call(t, te);
550
+ } catch {
551
+ return !0;
552
+ }
553
+ return t instanceof WeakMap;
554
+ } catch {
555
+ }
556
+ return !1;
557
+ }
558
+ function Mn(t) {
559
+ if (!dt || !t || typeof t != "object")
560
+ return !1;
561
+ try {
562
+ return dt.call(t), !0;
563
+ } catch {
564
+ }
565
+ return !1;
566
+ }
567
+ function jn(t) {
568
+ if (!ge || !t || typeof t != "object")
569
+ return !1;
570
+ try {
571
+ ge.call(t);
572
+ try {
573
+ me.call(t);
574
+ } catch {
575
+ return !0;
576
+ }
577
+ return t instanceof Set;
578
+ } catch {
579
+ }
580
+ return !1;
581
+ }
582
+ function Bn(t) {
583
+ if (!te || !t || typeof t != "object")
584
+ return !1;
585
+ try {
586
+ te.call(t, te);
587
+ try {
588
+ ee.call(t, ee);
589
+ } catch {
590
+ return !0;
591
+ }
592
+ return t instanceof WeakSet;
593
+ } catch {
594
+ }
595
+ return !1;
596
+ }
597
+ function Ln(t) {
598
+ return !t || typeof t != "object" ? !1 : typeof HTMLElement < "u" && t instanceof HTMLElement ? !0 : typeof t.nodeName == "string" && typeof t.getAttribute == "function";
599
+ }
600
+ function Kt(t, e) {
601
+ if (t.length > e.maxStringLength) {
602
+ var r = t.length - e.maxStringLength, n = "... " + r + " more character" + (r > 1 ? "s" : "");
603
+ return Kt(rt.call(t, 0, e.maxStringLength), e) + n;
604
+ }
605
+ var o = On[e.quoteStyle || "single"];
606
+ o.lastIndex = 0;
607
+ var a = T.call(T.call(t, o, "\\$1"), /[\x00-\x1f]/g, Un);
608
+ return zt(a, "single", e);
609
+ }
610
+ function Un(t) {
611
+ var e = t.charCodeAt(0), r = {
612
+ 8: "b",
613
+ 9: "t",
614
+ 10: "n",
615
+ 12: "f",
616
+ 13: "r"
617
+ }[e];
618
+ return r ? "\\" + r : "\\x" + (e < 16 ? "0" : "") + xn.call(e.toString(16));
619
+ }
620
+ function Z(t) {
621
+ return "Object(" + t + ")";
622
+ }
623
+ function Re(t) {
624
+ return t + " { ? }";
625
+ }
626
+ function xt(t, e, r, n) {
627
+ var o = n ? Xe(r, n) : E.call(r, ", ");
628
+ return t + " (" + e + ") {" + o + "}";
629
+ }
630
+ function Wn(t) {
631
+ for (var e = 0; e < t.length; e++)
632
+ if (Ht(t[e], `
633
+ `) >= 0)
634
+ return !1;
635
+ return !0;
636
+ }
637
+ function qn(t, e) {
638
+ var r;
639
+ if (t.indent === " ")
640
+ r = " ";
641
+ else if (typeof t.indent == "number" && t.indent > 0)
642
+ r = E.call(Array(t.indent + 1), " ");
643
+ else
644
+ return null;
645
+ return {
646
+ base: r,
647
+ prev: E.call(Array(e + 1), r)
648
+ };
649
+ }
650
+ function Xe(t, e) {
651
+ if (t.length === 0)
652
+ return "";
653
+ var r = `
654
+ ` + e.prev + e.base;
655
+ return r + E.call(t, "," + r) + `
656
+ ` + e.prev;
657
+ }
658
+ function se(t, e) {
659
+ var r = Ye(t), n = [];
660
+ if (r) {
661
+ n.length = t.length;
662
+ for (var o = 0; o < t.length; o++)
663
+ n[o] = I(t, o) ? e(t[o], t) : "";
664
+ }
665
+ var a = typeof Ie == "function" ? Ie(t) : [], i;
666
+ if (V) {
667
+ i = {};
668
+ for (var f = 0; f < a.length; f++)
669
+ i["$" + a[f]] = a[f];
670
+ }
671
+ for (var l in t)
672
+ I(t, l) && (r && String(Number(l)) === l && l < t.length || V && i["$" + l] instanceof Symbol || (Ut.call(/[^\w$]/, l) ? n.push(e(l, t) + ": " + e(t[l], t)) : n.push(l + ": " + e(t[l], t))));
673
+ if (typeof Ie == "function")
674
+ for (var u = 0; u < a.length; u++)
675
+ Wt.call(t, a[u]) && n.push("[" + e(a[u]) + "]: " + e(t[a[u]], t));
676
+ return n;
677
+ }
678
+ var zn = be, Gn = J, Se = function(t, e, r) {
679
+ for (var n = t, o; (o = n.next) != null; n = o)
680
+ if (o.key === e)
681
+ return n.next = o.next, r || (o.next = /** @type {NonNullable<typeof list.next>} */
682
+ t.next, t.next = o), o;
683
+ }, Hn = function(t, e) {
684
+ if (t) {
685
+ var r = Se(t, e);
686
+ return r && r.value;
687
+ }
688
+ }, Kn = function(t, e, r) {
689
+ var n = Se(t, e);
690
+ n ? n.value = r : t.next = /** @type {import('./list.d.ts').ListNode<typeof value, typeof key>} */
691
+ {
692
+ // eslint-disable-line no-param-reassign, no-extra-parens
693
+ key: e,
694
+ next: t.next,
695
+ value: r
696
+ };
697
+ }, Vn = function(t, e) {
698
+ return t ? !!Se(t, e) : !1;
699
+ }, Qn = function(t, e) {
700
+ if (t)
701
+ return Se(t, e, !0);
702
+ }, Jn = function() {
703
+ var e, r = {
704
+ assert: function(n) {
705
+ if (!r.has(n))
706
+ throw new Gn("Side channel does not contain " + zn(n));
707
+ },
708
+ delete: function(n) {
709
+ var o = e && e.next, a = Qn(e, n);
710
+ return a && o && o === a && (e = void 0), !!a;
711
+ },
712
+ get: function(n) {
713
+ return Hn(e, n);
714
+ },
715
+ has: function(n) {
716
+ return Vn(e, n);
717
+ },
718
+ set: function(n, o) {
719
+ e || (e = {
720
+ next: void 0
721
+ }), Kn(
722
+ /** @type {NonNullable<typeof $o>} */
723
+ e,
724
+ n,
725
+ o
726
+ );
727
+ }
728
+ };
729
+ return r;
730
+ }, Vt = Object, Yn = Error, Xn = EvalError, Zn = RangeError, eo = ReferenceError, to = SyntaxError, ro = URIError, no = Math.abs, oo = Math.floor, ao = Math.max, io = Math.min, lo = Math.pow, co = Math.round, fo = Number.isNaN || function(e) {
731
+ return e !== e;
732
+ }, uo = fo, so = function(e) {
733
+ return uo(e) || e === 0 ? e : e < 0 ? -1 : 1;
734
+ }, po = Object.getOwnPropertyDescriptor, ye = po;
735
+ if (ye)
736
+ try {
737
+ ye([], "length");
738
+ } catch {
739
+ ye = null;
740
+ }
741
+ var Qt = ye, de = Object.defineProperty || !1;
742
+ if (de)
743
+ try {
744
+ de({}, "a", { value: 1 });
745
+ } catch {
746
+ de = !1;
747
+ }
748
+ var yo = de, ke, At;
749
+ function vo() {
750
+ return At || (At = 1, ke = function() {
751
+ if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
752
+ return !1;
753
+ if (typeof Symbol.iterator == "symbol")
754
+ return !0;
755
+ var e = {}, r = Symbol("test"), n = Object(r);
756
+ if (typeof r == "string" || Object.prototype.toString.call(r) !== "[object Symbol]" || Object.prototype.toString.call(n) !== "[object Symbol]")
757
+ return !1;
758
+ var o = 42;
759
+ e[r] = o;
760
+ for (var a in e)
761
+ return !1;
762
+ if (typeof Object.keys == "function" && Object.keys(e).length !== 0 || typeof Object.getOwnPropertyNames == "function" && Object.getOwnPropertyNames(e).length !== 0)
763
+ return !1;
764
+ var i = Object.getOwnPropertySymbols(e);
765
+ if (i.length !== 1 || i[0] !== r || !Object.prototype.propertyIsEnumerable.call(e, r))
766
+ return !1;
767
+ if (typeof Object.getOwnPropertyDescriptor == "function") {
768
+ var f = (
769
+ /** @type {PropertyDescriptor} */
770
+ Object.getOwnPropertyDescriptor(e, r)
771
+ );
772
+ if (f.value !== o || f.enumerable !== !0)
773
+ return !1;
774
+ }
775
+ return !0;
776
+ }), ke;
777
+ }
778
+ var De, Ot;
779
+ function mo() {
780
+ if (Ot) return De;
781
+ Ot = 1;
782
+ var t = typeof Symbol < "u" && Symbol, e = vo();
783
+ return De = function() {
784
+ return typeof t != "function" || typeof Symbol != "function" || typeof t("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : e();
785
+ }, De;
786
+ }
787
+ var Fe, Et;
788
+ function Jt() {
789
+ return Et || (Et = 1, Fe = typeof Reflect < "u" && Reflect.getPrototypeOf || null), Fe;
790
+ }
791
+ var Te, Pt;
792
+ function Yt() {
793
+ if (Pt) return Te;
794
+ Pt = 1;
795
+ var t = Vt;
796
+ return Te = t.getPrototypeOf || null, Te;
797
+ }
798
+ var Ne, $t;
799
+ function go() {
800
+ if ($t) return Ne;
801
+ $t = 1;
802
+ var t = "Function.prototype.bind called on incompatible ", e = Object.prototype.toString, r = Math.max, n = "[object Function]", o = function(l, u) {
803
+ for (var c = [], p = 0; p < l.length; p += 1)
804
+ c[p] = l[p];
805
+ for (var s = 0; s < u.length; s += 1)
806
+ c[s + l.length] = u[s];
807
+ return c;
808
+ }, a = function(l, u) {
809
+ for (var c = [], p = u, s = 0; p < l.length; p += 1, s += 1)
810
+ c[s] = l[p];
811
+ return c;
812
+ }, i = function(f, l) {
813
+ for (var u = "", c = 0; c < f.length; c += 1)
814
+ u += f[c], c + 1 < f.length && (u += l);
815
+ return u;
816
+ };
817
+ return Ne = function(l) {
818
+ var u = this;
819
+ if (typeof u != "function" || e.apply(u) !== n)
820
+ throw new TypeError(t + u);
821
+ for (var c = a(arguments, 1), p, s = function() {
822
+ if (this instanceof p) {
823
+ var w = u.apply(
824
+ this,
825
+ o(c, arguments)
826
+ );
827
+ return Object(w) === w ? w : this;
828
+ }
829
+ return u.apply(
830
+ l,
831
+ o(c, arguments)
832
+ );
833
+ }, v = r(0, u.length - c.length), y = [], h = 0; h < v; h++)
834
+ y[h] = "$" + h;
835
+ if (p = Function("binder", "return function (" + i(y, ",") + "){ return binder.apply(this,arguments); }")(s), u.prototype) {
836
+ var S = function() {
837
+ };
838
+ S.prototype = u.prototype, p.prototype = new S(), S.prototype = null;
839
+ }
840
+ return p;
841
+ }, Ne;
842
+ }
843
+ var Ce, It;
844
+ function we() {
845
+ if (It) return Ce;
846
+ It = 1;
847
+ var t = go();
848
+ return Ce = Function.prototype.bind || t, Ce;
849
+ }
850
+ var nt = Function.prototype.call, Me, Rt;
851
+ function Xt() {
852
+ return Rt || (Rt = 1, Me = Function.prototype.apply), Me;
853
+ }
854
+ var ho = typeof Reflect < "u" && Reflect && Reflect.apply, _o = we(), bo = Xt(), So = nt, wo = ho, xo = wo || _o.call(So, bo), Ao = we(), Oo = J, Eo = nt, Po = xo, Zt = function(e) {
855
+ if (e.length < 1 || typeof e[0] != "function")
856
+ throw new Oo("a function is required");
857
+ return Po(Ao, Eo, e);
858
+ }, je, kt;
859
+ function $o() {
860
+ if (kt) return je;
861
+ kt = 1;
862
+ var t = Zt, e = Qt, r;
863
+ try {
864
+ r = /** @type {{ __proto__?: typeof Array.prototype }} */
865
+ [].__proto__ === Array.prototype;
866
+ } catch (i) {
867
+ if (!i || typeof i != "object" || !("code" in i) || i.code !== "ERR_PROTO_ACCESS")
868
+ throw i;
869
+ }
870
+ var n = !!r && e && e(
871
+ Object.prototype,
872
+ /** @type {keyof typeof Object.prototype} */
873
+ "__proto__"
874
+ ), o = Object, a = o.getPrototypeOf;
875
+ return je = n && typeof n.get == "function" ? t([n.get]) : typeof a == "function" ? (
876
+ /** @type {import('./get')} */
877
+ function(f) {
878
+ return a(f == null ? f : o(f));
879
+ }
880
+ ) : !1, je;
881
+ }
882
+ var Be, Dt;
883
+ function Io() {
884
+ if (Dt) return Be;
885
+ Dt = 1;
886
+ var t = Jt(), e = Yt(), r = $o();
887
+ return Be = t ? function(o) {
888
+ return t(o);
889
+ } : e ? function(o) {
890
+ if (!o || typeof o != "object" && typeof o != "function")
891
+ throw new TypeError("getProto: not an object");
892
+ return e(o);
893
+ } : r ? function(o) {
894
+ return r(o);
895
+ } : null, Be;
896
+ }
897
+ var Le, Ft;
898
+ function Ro() {
899
+ if (Ft) return Le;
900
+ Ft = 1;
901
+ var t = Function.prototype.call, e = Object.prototype.hasOwnProperty, r = we();
902
+ return Le = r.call(t, e), Le;
903
+ }
904
+ var d, ko = Vt, Do = Yn, Fo = Xn, To = Zn, No = eo, Q = to, K = J, Co = ro, Mo = no, jo = oo, Bo = ao, Lo = io, Uo = lo, Wo = co, qo = so, er = Function, Ue = function(t) {
905
+ try {
906
+ return er('"use strict"; return (' + t + ").constructor;")();
907
+ } catch {
908
+ }
909
+ }, oe = Qt, zo = yo, We = function() {
910
+ throw new K();
911
+ }, Go = oe ? function() {
912
+ try {
913
+ return arguments.callee, We;
914
+ } catch {
915
+ try {
916
+ return oe(arguments, "callee").get;
917
+ } catch {
918
+ return We;
919
+ }
920
+ }
921
+ }() : We, z = mo()(), b = Io(), Ho = Yt(), Ko = Jt(), tr = Xt(), ae = nt, H = {}, Vo = typeof Uint8Array > "u" || !b ? d : b(Uint8Array), B = {
922
+ __proto__: null,
923
+ "%AggregateError%": typeof AggregateError > "u" ? d : AggregateError,
924
+ "%Array%": Array,
925
+ "%ArrayBuffer%": typeof ArrayBuffer > "u" ? d : ArrayBuffer,
926
+ "%ArrayIteratorPrototype%": z && b ? b([][Symbol.iterator]()) : d,
927
+ "%AsyncFromSyncIteratorPrototype%": d,
928
+ "%AsyncFunction%": H,
929
+ "%AsyncGenerator%": H,
930
+ "%AsyncGeneratorFunction%": H,
931
+ "%AsyncIteratorPrototype%": H,
932
+ "%Atomics%": typeof Atomics > "u" ? d : Atomics,
933
+ "%BigInt%": typeof BigInt > "u" ? d : BigInt,
934
+ "%BigInt64Array%": typeof BigInt64Array > "u" ? d : BigInt64Array,
935
+ "%BigUint64Array%": typeof BigUint64Array > "u" ? d : BigUint64Array,
936
+ "%Boolean%": Boolean,
937
+ "%DataView%": typeof DataView > "u" ? d : DataView,
938
+ "%Date%": Date,
939
+ "%decodeURI%": decodeURI,
940
+ "%decodeURIComponent%": decodeURIComponent,
941
+ "%encodeURI%": encodeURI,
942
+ "%encodeURIComponent%": encodeURIComponent,
943
+ "%Error%": Do,
944
+ "%eval%": eval,
945
+ // eslint-disable-line no-eval
946
+ "%EvalError%": Fo,
947
+ "%Float16Array%": typeof Float16Array > "u" ? d : Float16Array,
948
+ "%Float32Array%": typeof Float32Array > "u" ? d : Float32Array,
949
+ "%Float64Array%": typeof Float64Array > "u" ? d : Float64Array,
950
+ "%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? d : FinalizationRegistry,
951
+ "%Function%": er,
952
+ "%GeneratorFunction%": H,
953
+ "%Int8Array%": typeof Int8Array > "u" ? d : Int8Array,
954
+ "%Int16Array%": typeof Int16Array > "u" ? d : Int16Array,
955
+ "%Int32Array%": typeof Int32Array > "u" ? d : Int32Array,
956
+ "%isFinite%": isFinite,
957
+ "%isNaN%": isNaN,
958
+ "%IteratorPrototype%": z && b ? b(b([][Symbol.iterator]())) : d,
959
+ "%JSON%": typeof JSON == "object" ? JSON : d,
960
+ "%Map%": typeof Map > "u" ? d : Map,
961
+ "%MapIteratorPrototype%": typeof Map > "u" || !z || !b ? d : b((/* @__PURE__ */ new Map())[Symbol.iterator]()),
962
+ "%Math%": Math,
963
+ "%Number%": Number,
964
+ "%Object%": ko,
965
+ "%Object.getOwnPropertyDescriptor%": oe,
966
+ "%parseFloat%": parseFloat,
967
+ "%parseInt%": parseInt,
968
+ "%Promise%": typeof Promise > "u" ? d : Promise,
969
+ "%Proxy%": typeof Proxy > "u" ? d : Proxy,
970
+ "%RangeError%": To,
971
+ "%ReferenceError%": No,
972
+ "%Reflect%": typeof Reflect > "u" ? d : Reflect,
973
+ "%RegExp%": RegExp,
974
+ "%Set%": typeof Set > "u" ? d : Set,
975
+ "%SetIteratorPrototype%": typeof Set > "u" || !z || !b ? d : b((/* @__PURE__ */ new Set())[Symbol.iterator]()),
976
+ "%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? d : SharedArrayBuffer,
977
+ "%String%": String,
978
+ "%StringIteratorPrototype%": z && b ? b(""[Symbol.iterator]()) : d,
979
+ "%Symbol%": z ? Symbol : d,
980
+ "%SyntaxError%": Q,
981
+ "%ThrowTypeError%": Go,
982
+ "%TypedArray%": Vo,
983
+ "%TypeError%": K,
984
+ "%Uint8Array%": typeof Uint8Array > "u" ? d : Uint8Array,
985
+ "%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? d : Uint8ClampedArray,
986
+ "%Uint16Array%": typeof Uint16Array > "u" ? d : Uint16Array,
987
+ "%Uint32Array%": typeof Uint32Array > "u" ? d : Uint32Array,
988
+ "%URIError%": Co,
989
+ "%WeakMap%": typeof WeakMap > "u" ? d : WeakMap,
990
+ "%WeakRef%": typeof WeakRef > "u" ? d : WeakRef,
991
+ "%WeakSet%": typeof WeakSet > "u" ? d : WeakSet,
992
+ "%Function.prototype.call%": ae,
993
+ "%Function.prototype.apply%": tr,
994
+ "%Object.defineProperty%": zo,
995
+ "%Object.getPrototypeOf%": Ho,
996
+ "%Math.abs%": Mo,
997
+ "%Math.floor%": jo,
998
+ "%Math.max%": Bo,
999
+ "%Math.min%": Lo,
1000
+ "%Math.pow%": Uo,
1001
+ "%Math.round%": Wo,
1002
+ "%Math.sign%": qo,
1003
+ "%Reflect.getPrototypeOf%": Ko
1004
+ };
1005
+ if (b)
1006
+ try {
1007
+ null.error;
1008
+ } catch (t) {
1009
+ var Qo = b(b(t));
1010
+ B["%Error.prototype%"] = Qo;
1011
+ }
1012
+ var Jo = function t(e) {
1013
+ var r;
1014
+ if (e === "%AsyncFunction%")
1015
+ r = Ue("async function () {}");
1016
+ else if (e === "%GeneratorFunction%")
1017
+ r = Ue("function* () {}");
1018
+ else if (e === "%AsyncGeneratorFunction%")
1019
+ r = Ue("async function* () {}");
1020
+ else if (e === "%AsyncGenerator%") {
1021
+ var n = t("%AsyncGeneratorFunction%");
1022
+ n && (r = n.prototype);
1023
+ } else if (e === "%AsyncIteratorPrototype%") {
1024
+ var o = t("%AsyncGenerator%");
1025
+ o && b && (r = b(o.prototype));
1026
+ }
1027
+ return B[e] = r, r;
1028
+ }, Tt = {
1029
+ __proto__: null,
1030
+ "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
1031
+ "%ArrayPrototype%": ["Array", "prototype"],
1032
+ "%ArrayProto_entries%": ["Array", "prototype", "entries"],
1033
+ "%ArrayProto_forEach%": ["Array", "prototype", "forEach"],
1034
+ "%ArrayProto_keys%": ["Array", "prototype", "keys"],
1035
+ "%ArrayProto_values%": ["Array", "prototype", "values"],
1036
+ "%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"],
1037
+ "%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"],
1038
+ "%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"],
1039
+ "%BooleanPrototype%": ["Boolean", "prototype"],
1040
+ "%DataViewPrototype%": ["DataView", "prototype"],
1041
+ "%DatePrototype%": ["Date", "prototype"],
1042
+ "%ErrorPrototype%": ["Error", "prototype"],
1043
+ "%EvalErrorPrototype%": ["EvalError", "prototype"],
1044
+ "%Float32ArrayPrototype%": ["Float32Array", "prototype"],
1045
+ "%Float64ArrayPrototype%": ["Float64Array", "prototype"],
1046
+ "%FunctionPrototype%": ["Function", "prototype"],
1047
+ "%Generator%": ["GeneratorFunction", "prototype"],
1048
+ "%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"],
1049
+ "%Int8ArrayPrototype%": ["Int8Array", "prototype"],
1050
+ "%Int16ArrayPrototype%": ["Int16Array", "prototype"],
1051
+ "%Int32ArrayPrototype%": ["Int32Array", "prototype"],
1052
+ "%JSONParse%": ["JSON", "parse"],
1053
+ "%JSONStringify%": ["JSON", "stringify"],
1054
+ "%MapPrototype%": ["Map", "prototype"],
1055
+ "%NumberPrototype%": ["Number", "prototype"],
1056
+ "%ObjectPrototype%": ["Object", "prototype"],
1057
+ "%ObjProto_toString%": ["Object", "prototype", "toString"],
1058
+ "%ObjProto_valueOf%": ["Object", "prototype", "valueOf"],
1059
+ "%PromisePrototype%": ["Promise", "prototype"],
1060
+ "%PromiseProto_then%": ["Promise", "prototype", "then"],
1061
+ "%Promise_all%": ["Promise", "all"],
1062
+ "%Promise_reject%": ["Promise", "reject"],
1063
+ "%Promise_resolve%": ["Promise", "resolve"],
1064
+ "%RangeErrorPrototype%": ["RangeError", "prototype"],
1065
+ "%ReferenceErrorPrototype%": ["ReferenceError", "prototype"],
1066
+ "%RegExpPrototype%": ["RegExp", "prototype"],
1067
+ "%SetPrototype%": ["Set", "prototype"],
1068
+ "%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"],
1069
+ "%StringPrototype%": ["String", "prototype"],
1070
+ "%SymbolPrototype%": ["Symbol", "prototype"],
1071
+ "%SyntaxErrorPrototype%": ["SyntaxError", "prototype"],
1072
+ "%TypedArrayPrototype%": ["TypedArray", "prototype"],
1073
+ "%TypeErrorPrototype%": ["TypeError", "prototype"],
1074
+ "%Uint8ArrayPrototype%": ["Uint8Array", "prototype"],
1075
+ "%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"],
1076
+ "%Uint16ArrayPrototype%": ["Uint16Array", "prototype"],
1077
+ "%Uint32ArrayPrototype%": ["Uint32Array", "prototype"],
1078
+ "%URIErrorPrototype%": ["URIError", "prototype"],
1079
+ "%WeakMapPrototype%": ["WeakMap", "prototype"],
1080
+ "%WeakSetPrototype%": ["WeakSet", "prototype"]
1081
+ }, ie = we(), he = Ro(), Yo = ie.call(ae, Array.prototype.concat), Xo = ie.call(tr, Array.prototype.splice), Nt = ie.call(ae, String.prototype.replace), _e = ie.call(ae, String.prototype.slice), Zo = ie.call(ae, RegExp.prototype.exec), ea = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, ta = /\\(\\)?/g, ra = function(e) {
1082
+ var r = _e(e, 0, 1), n = _e(e, -1);
1083
+ if (r === "%" && n !== "%")
1084
+ throw new Q("invalid intrinsic syntax, expected closing `%`");
1085
+ if (n === "%" && r !== "%")
1086
+ throw new Q("invalid intrinsic syntax, expected opening `%`");
1087
+ var o = [];
1088
+ return Nt(e, ea, function(a, i, f, l) {
1089
+ o[o.length] = f ? Nt(l, ta, "$1") : i || a;
1090
+ }), o;
1091
+ }, na = function(e, r) {
1092
+ var n = e, o;
1093
+ if (he(Tt, n) && (o = Tt[n], n = "%" + o[0] + "%"), he(B, n)) {
1094
+ var a = B[n];
1095
+ if (a === H && (a = Jo(n)), typeof a > "u" && !r)
1096
+ throw new K("intrinsic " + e + " exists, but is not available. Please file an issue!");
1097
+ return {
1098
+ alias: o,
1099
+ name: n,
1100
+ value: a
1101
+ };
1102
+ }
1103
+ throw new Q("intrinsic " + e + " does not exist!");
1104
+ }, ot = function(e, r) {
1105
+ if (typeof e != "string" || e.length === 0)
1106
+ throw new K("intrinsic name must be a non-empty string");
1107
+ if (arguments.length > 1 && typeof r != "boolean")
1108
+ throw new K('"allowMissing" argument must be a boolean');
1109
+ if (Zo(/^%?[^%]*%?$/, e) === null)
1110
+ throw new Q("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
1111
+ var n = ra(e), o = n.length > 0 ? n[0] : "", a = na("%" + o + "%", r), i = a.name, f = a.value, l = !1, u = a.alias;
1112
+ u && (o = u[0], Xo(n, Yo([0, 1], u)));
1113
+ for (var c = 1, p = !0; c < n.length; c += 1) {
1114
+ var s = n[c], v = _e(s, 0, 1), y = _e(s, -1);
1115
+ if ((v === '"' || v === "'" || v === "`" || y === '"' || y === "'" || y === "`") && v !== y)
1116
+ throw new Q("property names with quotes must have matching quotes");
1117
+ if ((s === "constructor" || !p) && (l = !0), o += "." + s, i = "%" + o + "%", he(B, i))
1118
+ f = B[i];
1119
+ else if (f != null) {
1120
+ if (!(s in f)) {
1121
+ if (!r)
1122
+ throw new K("base intrinsic for " + e + " exists, but the property is not available.");
1123
+ return;
1124
+ }
1125
+ if (oe && c + 1 >= n.length) {
1126
+ var h = oe(f, s);
1127
+ p = !!h, p && "get" in h && !("originalValue" in h.get) ? f = h.get : f = f[s];
1128
+ } else
1129
+ p = he(f, s), f = f[s];
1130
+ p && !l && (B[i] = f);
1131
+ }
1132
+ }
1133
+ return f;
1134
+ }, rr = ot, nr = Zt, oa = nr([rr("%String.prototype.indexOf%")]), or = function(e, r) {
1135
+ var n = (
1136
+ /** @type {(this: unknown, ...args: unknown[]) => unknown} */
1137
+ rr(e, !!r)
1138
+ );
1139
+ return typeof n == "function" && oa(e, ".prototype.") > -1 ? nr(
1140
+ /** @type {const} */
1141
+ [n]
1142
+ ) : n;
1143
+ }, aa = ot, le = or, ia = be, la = J, Ct = aa("%Map%", !0), ca = le("Map.prototype.get", !0), fa = le("Map.prototype.set", !0), ua = le("Map.prototype.has", !0), sa = le("Map.prototype.delete", !0), pa = le("Map.prototype.size", !0), ar = !!Ct && /** @type {Exclude<import('.'), false>} */
1144
+ function() {
1145
+ var e, r = {
1146
+ assert: function(n) {
1147
+ if (!r.has(n))
1148
+ throw new la("Side channel does not contain " + ia(n));
1149
+ },
1150
+ delete: function(n) {
1151
+ if (e) {
1152
+ var o = sa(e, n);
1153
+ return pa(e) === 0 && (e = void 0), o;
1154
+ }
1155
+ return !1;
1156
+ },
1157
+ get: function(n) {
1158
+ if (e)
1159
+ return ca(e, n);
1160
+ },
1161
+ has: function(n) {
1162
+ return e ? ua(e, n) : !1;
1163
+ },
1164
+ set: function(n, o) {
1165
+ e || (e = new Ct()), fa(e, n, o);
1166
+ }
1167
+ };
1168
+ return r;
1169
+ }, ya = ot, xe = or, da = be, pe = ar, va = J, G = ya("%WeakMap%", !0), ma = xe("WeakMap.prototype.get", !0), ga = xe("WeakMap.prototype.set", !0), ha = xe("WeakMap.prototype.has", !0), _a = xe("WeakMap.prototype.delete", !0), ba = G ? (
1170
+ /** @type {Exclude<import('.'), false>} */
1171
+ function() {
1172
+ var e, r, n = {
1173
+ assert: function(o) {
1174
+ if (!n.has(o))
1175
+ throw new va("Side channel does not contain " + da(o));
1176
+ },
1177
+ delete: function(o) {
1178
+ if (G && o && (typeof o == "object" || typeof o == "function")) {
1179
+ if (e)
1180
+ return _a(e, o);
1181
+ } else if (pe && r)
1182
+ return r.delete(o);
1183
+ return !1;
1184
+ },
1185
+ get: function(o) {
1186
+ return G && o && (typeof o == "object" || typeof o == "function") && e ? ma(e, o) : r && r.get(o);
1187
+ },
1188
+ has: function(o) {
1189
+ return G && o && (typeof o == "object" || typeof o == "function") && e ? ha(e, o) : !!r && r.has(o);
1190
+ },
1191
+ set: function(o, a) {
1192
+ G && o && (typeof o == "object" || typeof o == "function") ? (e || (e = new G()), ga(e, o, a)) : pe && (r || (r = pe()), r.set(o, a));
1193
+ }
1194
+ };
1195
+ return n;
1196
+ }
1197
+ ) : pe, Sa = J, wa = be, xa = Jn, Aa = ar, Oa = ba, Ea = Oa || Aa || xa, Pa = function() {
1198
+ var e, r = {
1199
+ assert: function(n) {
1200
+ if (!r.has(n))
1201
+ throw new Sa("Side channel does not contain " + wa(n));
1202
+ },
1203
+ delete: function(n) {
1204
+ return !!e && e.delete(n);
1205
+ },
1206
+ get: function(n) {
1207
+ return e && e.get(n);
1208
+ },
1209
+ has: function(n) {
1210
+ return !!e && e.has(n);
1211
+ },
1212
+ set: function(n, o) {
1213
+ e || (e = Ea()), e.set(n, o);
1214
+ }
1215
+ };
1216
+ return r;
1217
+ }, $a = String.prototype.replace, Ia = /%20/g, qe = {
1218
+ RFC1738: "RFC1738",
1219
+ RFC3986: "RFC3986"
1220
+ }, at = {
1221
+ default: qe.RFC3986,
1222
+ formatters: {
1223
+ RFC1738: function(t) {
1224
+ return $a.call(t, Ia, "+");
1225
+ },
1226
+ RFC3986: function(t) {
1227
+ return String(t);
1228
+ }
1229
+ },
1230
+ RFC1738: qe.RFC1738,
1231
+ RFC3986: qe.RFC3986
1232
+ }, Ra = at, ze = Object.prototype.hasOwnProperty, j = Array.isArray, A = function() {
1233
+ for (var t = [], e = 0; e < 256; ++e)
1234
+ t.push("%" + ((e < 16 ? "0" : "") + e.toString(16)).toUpperCase());
1235
+ return t;
1236
+ }(), ka = function(e) {
1237
+ for (; e.length > 1; ) {
1238
+ var r = e.pop(), n = r.obj[r.prop];
1239
+ if (j(n)) {
1240
+ for (var o = [], a = 0; a < n.length; ++a)
1241
+ typeof n[a] < "u" && o.push(n[a]);
1242
+ r.obj[r.prop] = o;
1243
+ }
1244
+ }
1245
+ }, ir = function(e, r) {
1246
+ for (var n = r && r.plainObjects ? { __proto__: null } : {}, o = 0; o < e.length; ++o)
1247
+ typeof e[o] < "u" && (n[o] = e[o]);
1248
+ return n;
1249
+ }, Da = function t(e, r, n) {
1250
+ if (!r)
1251
+ return e;
1252
+ if (typeof r != "object" && typeof r != "function") {
1253
+ if (j(e))
1254
+ e.push(r);
1255
+ else if (e && typeof e == "object")
1256
+ (n && (n.plainObjects || n.allowPrototypes) || !ze.call(Object.prototype, r)) && (e[r] = !0);
1257
+ else
1258
+ return [e, r];
1259
+ return e;
1260
+ }
1261
+ if (!e || typeof e != "object")
1262
+ return [e].concat(r);
1263
+ var o = e;
1264
+ return j(e) && !j(r) && (o = ir(e, n)), j(e) && j(r) ? (r.forEach(function(a, i) {
1265
+ if (ze.call(e, i)) {
1266
+ var f = e[i];
1267
+ f && typeof f == "object" && a && typeof a == "object" ? e[i] = t(f, a, n) : e.push(a);
1268
+ } else
1269
+ e[i] = a;
1270
+ }), e) : Object.keys(r).reduce(function(a, i) {
1271
+ var f = r[i];
1272
+ return ze.call(a, i) ? a[i] = t(a[i], f, n) : a[i] = f, a;
1273
+ }, o);
1274
+ }, Fa = function(e, r) {
1275
+ return Object.keys(r).reduce(function(n, o) {
1276
+ return n[o] = r[o], n;
1277
+ }, e);
1278
+ }, Ta = function(t, e, r) {
1279
+ var n = t.replace(/\+/g, " ");
1280
+ if (r === "iso-8859-1")
1281
+ return n.replace(/%[0-9a-f]{2}/gi, unescape);
1282
+ try {
1283
+ return decodeURIComponent(n);
1284
+ } catch {
1285
+ return n;
1286
+ }
1287
+ }, Ge = 1024, Na = function(e, r, n, o, a) {
1288
+ if (e.length === 0)
1289
+ return e;
1290
+ var i = e;
1291
+ if (typeof e == "symbol" ? i = Symbol.prototype.toString.call(e) : typeof e != "string" && (i = String(e)), n === "iso-8859-1")
1292
+ return escape(i).replace(/%u[0-9a-f]{4}/gi, function(v) {
1293
+ return "%26%23" + parseInt(v.slice(2), 16) + "%3B";
1294
+ });
1295
+ for (var f = "", l = 0; l < i.length; l += Ge) {
1296
+ for (var u = i.length >= Ge ? i.slice(l, l + Ge) : i, c = [], p = 0; p < u.length; ++p) {
1297
+ var s = u.charCodeAt(p);
1298
+ if (s === 45 || s === 46 || s === 95 || s === 126 || s >= 48 && s <= 57 || s >= 65 && s <= 90 || s >= 97 && s <= 122 || a === Ra.RFC1738 && (s === 40 || s === 41)) {
1299
+ c[c.length] = u.charAt(p);
1300
+ continue;
1301
+ }
1302
+ if (s < 128) {
1303
+ c[c.length] = A[s];
1304
+ continue;
1305
+ }
1306
+ if (s < 2048) {
1307
+ c[c.length] = A[192 | s >> 6] + A[128 | s & 63];
1308
+ continue;
1309
+ }
1310
+ if (s < 55296 || s >= 57344) {
1311
+ c[c.length] = A[224 | s >> 12] + A[128 | s >> 6 & 63] + A[128 | s & 63];
1312
+ continue;
1313
+ }
1314
+ p += 1, s = 65536 + ((s & 1023) << 10 | u.charCodeAt(p) & 1023), c[c.length] = A[240 | s >> 18] + A[128 | s >> 12 & 63] + A[128 | s >> 6 & 63] + A[128 | s & 63];
1315
+ }
1316
+ f += c.join("");
1317
+ }
1318
+ return f;
1319
+ }, Ca = function(e) {
1320
+ for (var r = [{ obj: { o: e }, prop: "o" }], n = [], o = 0; o < r.length; ++o)
1321
+ for (var a = r[o], i = a.obj[a.prop], f = Object.keys(i), l = 0; l < f.length; ++l) {
1322
+ var u = f[l], c = i[u];
1323
+ typeof c == "object" && c !== null && n.indexOf(c) === -1 && (r.push({ obj: i, prop: u }), n.push(c));
1324
+ }
1325
+ return ka(r), e;
1326
+ }, Ma = function(e) {
1327
+ return Object.prototype.toString.call(e) === "[object RegExp]";
1328
+ }, ja = function(e) {
1329
+ return !e || typeof e != "object" ? !1 : !!(e.constructor && e.constructor.isBuffer && e.constructor.isBuffer(e));
1330
+ }, Ba = function(e, r) {
1331
+ return [].concat(e, r);
1332
+ }, La = function(e, r) {
1333
+ if (j(e)) {
1334
+ for (var n = [], o = 0; o < e.length; o += 1)
1335
+ n.push(r(e[o]));
1336
+ return n;
1337
+ }
1338
+ return r(e);
1339
+ }, lr = {
1340
+ arrayToObject: ir,
1341
+ assign: Fa,
1342
+ combine: Ba,
1343
+ compact: Ca,
1344
+ decode: Ta,
1345
+ encode: Na,
1346
+ isBuffer: ja,
1347
+ isRegExp: Ma,
1348
+ maybeMap: La,
1349
+ merge: Da
1350
+ }, cr = Pa, ve = lr, ne = at, Ua = Object.prototype.hasOwnProperty, fr = {
1351
+ brackets: function(e) {
1352
+ return e + "[]";
1353
+ },
1354
+ comma: "comma",
1355
+ indices: function(e, r) {
1356
+ return e + "[" + r + "]";
1357
+ },
1358
+ repeat: function(e) {
1359
+ return e;
1360
+ }
1361
+ }, O = Array.isArray, Wa = Array.prototype.push, ur = function(t, e) {
1362
+ Wa.apply(t, O(e) ? e : [e]);
1363
+ }, qa = Date.prototype.toISOString, Mt = ne.default, _ = {
1364
+ addQueryPrefix: !1,
1365
+ allowDots: !1,
1366
+ allowEmptyArrays: !1,
1367
+ arrayFormat: "indices",
1368
+ charset: "utf-8",
1369
+ charsetSentinel: !1,
1370
+ commaRoundTrip: !1,
1371
+ delimiter: "&",
1372
+ encode: !0,
1373
+ encodeDotInKeys: !1,
1374
+ encoder: ve.encode,
1375
+ encodeValuesOnly: !1,
1376
+ filter: void 0,
1377
+ format: Mt,
1378
+ formatter: ne.formatters[Mt],
1379
+ // deprecated
1380
+ indices: !1,
1381
+ serializeDate: function(e) {
1382
+ return qa.call(e);
1383
+ },
1384
+ skipNulls: !1,
1385
+ strictNullHandling: !1
1386
+ }, za = function(e) {
1387
+ return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || typeof e == "symbol" || typeof e == "bigint";
1388
+ }, He = {}, Ga = function t(e, r, n, o, a, i, f, l, u, c, p, s, v, y, h, S, w, R) {
1389
+ for (var m = e, k = R, C = 0, Y = !1; (k = k.get(He)) !== void 0 && !Y; ) {
1390
+ var W = k.get(e);
1391
+ if (C += 1, typeof W < "u") {
1392
+ if (W === C)
1393
+ throw new RangeError("Cyclic object value");
1394
+ Y = !0;
1395
+ }
1396
+ typeof k.get(He) > "u" && (C = 0);
1397
+ }
1398
+ if (typeof c == "function" ? m = c(r, m) : m instanceof Date ? m = v(m) : n === "comma" && O(m) && (m = ve.maybeMap(m, function(Ee) {
1399
+ return Ee instanceof Date ? v(Ee) : Ee;
1400
+ })), m === null) {
1401
+ if (i)
1402
+ return u && !S ? u(r, _.encoder, w, "key", y) : r;
1403
+ m = "";
1404
+ }
1405
+ if (za(m) || ve.isBuffer(m)) {
1406
+ if (u) {
1407
+ var ce = S ? r : u(r, _.encoder, w, "key", y);
1408
+ return [h(ce) + "=" + h(u(m, _.encoder, w, "value", y))];
1409
+ }
1410
+ return [h(r) + "=" + h(String(m))];
1411
+ }
1412
+ var M = [];
1413
+ if (typeof m > "u")
1414
+ return M;
1415
+ var D;
1416
+ if (n === "comma" && O(m))
1417
+ S && u && (m = ve.maybeMap(m, u)), D = [{ value: m.length > 0 ? m.join(",") || null : void 0 }];
1418
+ else if (O(c))
1419
+ D = c;
1420
+ else {
1421
+ var fe = Object.keys(m);
1422
+ D = p ? fe.sort(p) : fe;
1423
+ }
1424
+ var q = l ? String(r).replace(/\./g, "%2E") : String(r), x = o && O(m) && m.length === 1 ? q + "[]" : q;
1425
+ if (a && O(m) && m.length === 0)
1426
+ return x + "[]";
1427
+ for (var F = 0; F < D.length; ++F) {
1428
+ var P = D[F], X = typeof P == "object" && P && typeof P.value < "u" ? P.value : m[P];
1429
+ if (!(f && X === null)) {
1430
+ var Oe = s && l ? String(P).replace(/\./g, "%2E") : String(P), mr = O(m) ? typeof n == "function" ? n(x, Oe) : x : x + (s ? "." + Oe : "[" + Oe + "]");
1431
+ R.set(e, C);
1432
+ var lt = cr();
1433
+ lt.set(He, R), ur(M, t(
1434
+ X,
1435
+ mr,
1436
+ n,
1437
+ o,
1438
+ a,
1439
+ i,
1440
+ f,
1441
+ l,
1442
+ n === "comma" && S && O(m) ? null : u,
1443
+ c,
1444
+ p,
1445
+ s,
1446
+ v,
1447
+ y,
1448
+ h,
1449
+ S,
1450
+ w,
1451
+ lt
1452
+ ));
1453
+ }
1454
+ }
1455
+ return M;
1456
+ }, Ha = function(e) {
1457
+ if (!e)
1458
+ return _;
1459
+ if (typeof e.allowEmptyArrays < "u" && typeof e.allowEmptyArrays != "boolean")
1460
+ throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
1461
+ if (typeof e.encodeDotInKeys < "u" && typeof e.encodeDotInKeys != "boolean")
1462
+ throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");
1463
+ if (e.encoder !== null && typeof e.encoder < "u" && typeof e.encoder != "function")
1464
+ throw new TypeError("Encoder has to be a function.");
1465
+ var r = e.charset || _.charset;
1466
+ if (typeof e.charset < "u" && e.charset !== "utf-8" && e.charset !== "iso-8859-1")
1467
+ throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
1468
+ var n = ne.default;
1469
+ if (typeof e.format < "u") {
1470
+ if (!Ua.call(ne.formatters, e.format))
1471
+ throw new TypeError("Unknown format option provided.");
1472
+ n = e.format;
1473
+ }
1474
+ var o = ne.formatters[n], a = _.filter;
1475
+ (typeof e.filter == "function" || O(e.filter)) && (a = e.filter);
1476
+ var i;
1477
+ if (e.arrayFormat in fr ? i = e.arrayFormat : "indices" in e ? i = e.indices ? "indices" : "repeat" : i = _.arrayFormat, "commaRoundTrip" in e && typeof e.commaRoundTrip != "boolean")
1478
+ throw new TypeError("`commaRoundTrip` must be a boolean, or absent");
1479
+ var f = typeof e.allowDots > "u" ? e.encodeDotInKeys === !0 ? !0 : _.allowDots : !!e.allowDots;
1480
+ return {
1481
+ addQueryPrefix: typeof e.addQueryPrefix == "boolean" ? e.addQueryPrefix : _.addQueryPrefix,
1482
+ allowDots: f,
1483
+ allowEmptyArrays: typeof e.allowEmptyArrays == "boolean" ? !!e.allowEmptyArrays : _.allowEmptyArrays,
1484
+ arrayFormat: i,
1485
+ charset: r,
1486
+ charsetSentinel: typeof e.charsetSentinel == "boolean" ? e.charsetSentinel : _.charsetSentinel,
1487
+ commaRoundTrip: !!e.commaRoundTrip,
1488
+ delimiter: typeof e.delimiter > "u" ? _.delimiter : e.delimiter,
1489
+ encode: typeof e.encode == "boolean" ? e.encode : _.encode,
1490
+ encodeDotInKeys: typeof e.encodeDotInKeys == "boolean" ? e.encodeDotInKeys : _.encodeDotInKeys,
1491
+ encoder: typeof e.encoder == "function" ? e.encoder : _.encoder,
1492
+ encodeValuesOnly: typeof e.encodeValuesOnly == "boolean" ? e.encodeValuesOnly : _.encodeValuesOnly,
1493
+ filter: a,
1494
+ format: n,
1495
+ formatter: o,
1496
+ serializeDate: typeof e.serializeDate == "function" ? e.serializeDate : _.serializeDate,
1497
+ skipNulls: typeof e.skipNulls == "boolean" ? e.skipNulls : _.skipNulls,
1498
+ sort: typeof e.sort == "function" ? e.sort : null,
1499
+ strictNullHandling: typeof e.strictNullHandling == "boolean" ? e.strictNullHandling : _.strictNullHandling
1500
+ };
1501
+ }, Ka = function(t, e) {
1502
+ var r = t, n = Ha(e), o, a;
1503
+ typeof n.filter == "function" ? (a = n.filter, r = a("", r)) : O(n.filter) && (a = n.filter, o = a);
1504
+ var i = [];
1505
+ if (typeof r != "object" || r === null)
1506
+ return "";
1507
+ var f = fr[n.arrayFormat], l = f === "comma" && n.commaRoundTrip;
1508
+ o || (o = Object.keys(r)), n.sort && o.sort(n.sort);
1509
+ for (var u = cr(), c = 0; c < o.length; ++c) {
1510
+ var p = o[c], s = r[p];
1511
+ n.skipNulls && s === null || ur(i, Ga(
1512
+ s,
1513
+ p,
1514
+ f,
1515
+ l,
1516
+ n.allowEmptyArrays,
1517
+ n.strictNullHandling,
1518
+ n.skipNulls,
1519
+ n.encodeDotInKeys,
1520
+ n.encode ? n.encoder : null,
1521
+ n.filter,
1522
+ n.sort,
1523
+ n.allowDots,
1524
+ n.serializeDate,
1525
+ n.format,
1526
+ n.formatter,
1527
+ n.encodeValuesOnly,
1528
+ n.charset,
1529
+ u
1530
+ ));
1531
+ }
1532
+ var v = i.join(n.delimiter), y = n.addQueryPrefix === !0 ? "?" : "";
1533
+ return n.charsetSentinel && (n.charset === "iso-8859-1" ? y += "utf8=%26%2310003%3B&" : y += "utf8=%E2%9C%93&"), v.length > 0 ? y + v : "";
1534
+ }, L = lr, Ze = Object.prototype.hasOwnProperty, jt = Array.isArray, g = {
1535
+ allowDots: !1,
1536
+ allowEmptyArrays: !1,
1537
+ allowPrototypes: !1,
1538
+ allowSparse: !1,
1539
+ arrayLimit: 20,
1540
+ charset: "utf-8",
1541
+ charsetSentinel: !1,
1542
+ comma: !1,
1543
+ decodeDotInKeys: !1,
1544
+ decoder: L.decode,
1545
+ delimiter: "&",
1546
+ depth: 5,
1547
+ duplicates: "combine",
1548
+ ignoreQueryPrefix: !1,
1549
+ interpretNumericEntities: !1,
1550
+ parameterLimit: 1e3,
1551
+ parseArrays: !0,
1552
+ plainObjects: !1,
1553
+ strictDepth: !1,
1554
+ strictNullHandling: !1,
1555
+ throwOnLimitExceeded: !1
1556
+ }, Va = function(t) {
1557
+ return t.replace(/&#(\d+);/g, function(e, r) {
1558
+ return String.fromCharCode(parseInt(r, 10));
1559
+ });
1560
+ }, sr = function(t, e, r) {
1561
+ if (t && typeof t == "string" && e.comma && t.indexOf(",") > -1)
1562
+ return t.split(",");
1563
+ if (e.throwOnLimitExceeded && r >= e.arrayLimit)
1564
+ throw new RangeError("Array limit exceeded. Only " + e.arrayLimit + " element" + (e.arrayLimit === 1 ? "" : "s") + " allowed in an array.");
1565
+ return t;
1566
+ }, Qa = "utf8=%26%2310003%3B", Ja = "utf8=%E2%9C%93", Ya = function(e, r) {
1567
+ var n = { __proto__: null }, o = r.ignoreQueryPrefix ? e.replace(/^\?/, "") : e;
1568
+ o = o.replace(/%5B/gi, "[").replace(/%5D/gi, "]");
1569
+ var a = r.parameterLimit === 1 / 0 ? void 0 : r.parameterLimit, i = o.split(
1570
+ r.delimiter,
1571
+ r.throwOnLimitExceeded ? a + 1 : a
1572
+ );
1573
+ if (r.throwOnLimitExceeded && i.length > a)
1574
+ throw new RangeError("Parameter limit exceeded. Only " + a + " parameter" + (a === 1 ? "" : "s") + " allowed.");
1575
+ var f = -1, l, u = r.charset;
1576
+ if (r.charsetSentinel)
1577
+ for (l = 0; l < i.length; ++l)
1578
+ i[l].indexOf("utf8=") === 0 && (i[l] === Ja ? u = "utf-8" : i[l] === Qa && (u = "iso-8859-1"), f = l, l = i.length);
1579
+ for (l = 0; l < i.length; ++l)
1580
+ if (l !== f) {
1581
+ var c = i[l], p = c.indexOf("]="), s = p === -1 ? c.indexOf("=") : p + 1, v, y;
1582
+ s === -1 ? (v = r.decoder(c, g.decoder, u, "key"), y = r.strictNullHandling ? null : "") : (v = r.decoder(c.slice(0, s), g.decoder, u, "key"), y = L.maybeMap(
1583
+ sr(
1584
+ c.slice(s + 1),
1585
+ r,
1586
+ jt(n[v]) ? n[v].length : 0
1587
+ ),
1588
+ function(S) {
1589
+ return r.decoder(S, g.decoder, u, "value");
1590
+ }
1591
+ )), y && r.interpretNumericEntities && u === "iso-8859-1" && (y = Va(String(y))), c.indexOf("[]=") > -1 && (y = jt(y) ? [y] : y);
1592
+ var h = Ze.call(n, v);
1593
+ h && r.duplicates === "combine" ? n[v] = L.combine(n[v], y) : (!h || r.duplicates === "last") && (n[v] = y);
1594
+ }
1595
+ return n;
1596
+ }, Xa = function(t, e, r, n) {
1597
+ var o = 0;
1598
+ if (t.length > 0 && t[t.length - 1] === "[]") {
1599
+ var a = t.slice(0, -1).join("");
1600
+ o = Array.isArray(e) && e[a] ? e[a].length : 0;
1601
+ }
1602
+ for (var i = n ? e : sr(e, r, o), f = t.length - 1; f >= 0; --f) {
1603
+ var l, u = t[f];
1604
+ if (u === "[]" && r.parseArrays)
1605
+ l = r.allowEmptyArrays && (i === "" || r.strictNullHandling && i === null) ? [] : L.combine([], i);
1606
+ else {
1607
+ l = r.plainObjects ? { __proto__: null } : {};
1608
+ var c = u.charAt(0) === "[" && u.charAt(u.length - 1) === "]" ? u.slice(1, -1) : u, p = r.decodeDotInKeys ? c.replace(/%2E/g, ".") : c, s = parseInt(p, 10);
1609
+ !r.parseArrays && p === "" ? l = { 0: i } : !isNaN(s) && u !== p && String(s) === p && s >= 0 && r.parseArrays && s <= r.arrayLimit ? (l = [], l[s] = i) : p !== "__proto__" && (l[p] = i);
1610
+ }
1611
+ i = l;
1612
+ }
1613
+ return i;
1614
+ }, Za = function(e, r, n, o) {
1615
+ if (e) {
1616
+ var a = n.allowDots ? e.replace(/\.([^.[]+)/g, "[$1]") : e, i = /(\[[^[\]]*])/, f = /(\[[^[\]]*])/g, l = n.depth > 0 && i.exec(a), u = l ? a.slice(0, l.index) : a, c = [];
1617
+ if (u) {
1618
+ if (!n.plainObjects && Ze.call(Object.prototype, u) && !n.allowPrototypes)
1619
+ return;
1620
+ c.push(u);
1621
+ }
1622
+ for (var p = 0; n.depth > 0 && (l = f.exec(a)) !== null && p < n.depth; ) {
1623
+ if (p += 1, !n.plainObjects && Ze.call(Object.prototype, l[1].slice(1, -1)) && !n.allowPrototypes)
1624
+ return;
1625
+ c.push(l[1]);
1626
+ }
1627
+ if (l) {
1628
+ if (n.strictDepth === !0)
1629
+ throw new RangeError("Input depth exceeded depth option of " + n.depth + " and strictDepth is true");
1630
+ c.push("[" + a.slice(l.index) + "]");
1631
+ }
1632
+ return Xa(c, r, n, o);
1633
+ }
1634
+ }, ei = function(e) {
1635
+ if (!e)
1636
+ return g;
1637
+ if (typeof e.allowEmptyArrays < "u" && typeof e.allowEmptyArrays != "boolean")
1638
+ throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
1639
+ if (typeof e.decodeDotInKeys < "u" && typeof e.decodeDotInKeys != "boolean")
1640
+ throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");
1641
+ if (e.decoder !== null && typeof e.decoder < "u" && typeof e.decoder != "function")
1642
+ throw new TypeError("Decoder has to be a function.");
1643
+ if (typeof e.charset < "u" && e.charset !== "utf-8" && e.charset !== "iso-8859-1")
1644
+ throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
1645
+ if (typeof e.throwOnLimitExceeded < "u" && typeof e.throwOnLimitExceeded != "boolean")
1646
+ throw new TypeError("`throwOnLimitExceeded` option must be a boolean");
1647
+ var r = typeof e.charset > "u" ? g.charset : e.charset, n = typeof e.duplicates > "u" ? g.duplicates : e.duplicates;
1648
+ if (n !== "combine" && n !== "first" && n !== "last")
1649
+ throw new TypeError("The duplicates option must be either combine, first, or last");
1650
+ var o = typeof e.allowDots > "u" ? e.decodeDotInKeys === !0 ? !0 : g.allowDots : !!e.allowDots;
1651
+ return {
1652
+ allowDots: o,
1653
+ allowEmptyArrays: typeof e.allowEmptyArrays == "boolean" ? !!e.allowEmptyArrays : g.allowEmptyArrays,
1654
+ allowPrototypes: typeof e.allowPrototypes == "boolean" ? e.allowPrototypes : g.allowPrototypes,
1655
+ allowSparse: typeof e.allowSparse == "boolean" ? e.allowSparse : g.allowSparse,
1656
+ arrayLimit: typeof e.arrayLimit == "number" ? e.arrayLimit : g.arrayLimit,
1657
+ charset: r,
1658
+ charsetSentinel: typeof e.charsetSentinel == "boolean" ? e.charsetSentinel : g.charsetSentinel,
1659
+ comma: typeof e.comma == "boolean" ? e.comma : g.comma,
1660
+ decodeDotInKeys: typeof e.decodeDotInKeys == "boolean" ? e.decodeDotInKeys : g.decodeDotInKeys,
1661
+ decoder: typeof e.decoder == "function" ? e.decoder : g.decoder,
1662
+ delimiter: typeof e.delimiter == "string" || L.isRegExp(e.delimiter) ? e.delimiter : g.delimiter,
1663
+ // eslint-disable-next-line no-implicit-coercion, no-extra-parens
1664
+ depth: typeof e.depth == "number" || e.depth === !1 ? +e.depth : g.depth,
1665
+ duplicates: n,
1666
+ ignoreQueryPrefix: e.ignoreQueryPrefix === !0,
1667
+ interpretNumericEntities: typeof e.interpretNumericEntities == "boolean" ? e.interpretNumericEntities : g.interpretNumericEntities,
1668
+ parameterLimit: typeof e.parameterLimit == "number" ? e.parameterLimit : g.parameterLimit,
1669
+ parseArrays: e.parseArrays !== !1,
1670
+ plainObjects: typeof e.plainObjects == "boolean" ? e.plainObjects : g.plainObjects,
1671
+ strictDepth: typeof e.strictDepth == "boolean" ? !!e.strictDepth : g.strictDepth,
1672
+ strictNullHandling: typeof e.strictNullHandling == "boolean" ? e.strictNullHandling : g.strictNullHandling,
1673
+ throwOnLimitExceeded: typeof e.throwOnLimitExceeded == "boolean" ? e.throwOnLimitExceeded : !1
1674
+ };
1675
+ }, ti = function(t, e) {
1676
+ var r = ei(e);
1677
+ if (t === "" || t === null || typeof t > "u")
1678
+ return r.plainObjects ? { __proto__: null } : {};
1679
+ for (var n = typeof t == "string" ? Ya(t, r) : t, o = r.plainObjects ? { __proto__: null } : {}, a = Object.keys(n), i = 0; i < a.length; ++i) {
1680
+ var f = a[i], l = Za(f, n[f], r, typeof t == "string");
1681
+ o = L.merge(o, l, r);
1682
+ }
1683
+ return r.allowSparse === !0 ? o : L.compact(o);
1684
+ }, ri = Ka, ni = ti, oi = at, ai = {
1685
+ formats: oi,
1686
+ parse: ni,
1687
+ stringify: ri
1688
+ };
1689
+ const ii = /* @__PURE__ */ Ur(ai);
1690
+ async function Ae(t, e = {}, r) {
1691
+ const { cms: n = "cms" } = e;
1692
+ return fetch(`${t.href}?${ii.stringify(e)}`, {
1693
+ method: "GET",
1694
+ cache: r ? "no-store" : "default",
1695
+ headers: {
1696
+ Accept: "application/json",
1697
+ "Content-Type": "application/json",
1698
+ "strapi-encode-source-maps": n === "strapi" && r ? "true" : "false"
1699
+ // strapi
1700
+ }
1701
+ });
1702
+ }
1703
+ function it(t, e) {
1704
+ 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(
1705
+ new URL(`api/${t}`, process.env.NEXT_PUBLIC_API_URL)
1706
+ );
1707
+ }
1708
+ function pr(t) {
1709
+ return Array.isArray(t) && t.length > 0 ? t[0] : Array.isArray(t) ? null : t;
1710
+ }
1711
+ async function yr(t, e = [], r = {}) {
1712
+ var n;
1713
+ if ((r == null ? void 0 : r.contentType) === t) {
1714
+ 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}` : "", f = new URL(it(`${t}${i}`, r)), l = await Ae(f, r, o);
1715
+ if (!l.ok)
1716
+ return console.error(`[Error fetching preview data]: ${t} - status: ${l.statusText}`), [];
1717
+ const u = await l.json(), c = e.findIndex((p) => p.documentId === u.id);
1718
+ return c !== -1 ? (e[c] = u, [...e]) : [u, ...e];
1719
+ }
1720
+ return e;
1721
+ }
1722
+ const Si = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1723
+ __proto__: null,
1724
+ createUrl: it,
1725
+ fetchCMS: Ae,
1726
+ mergePreviewDocument: yr,
1727
+ spreadStrapiData: pr
1728
+ }, Symbol.toStringTag, { value: "Module" }));
1729
+ async function dr(t, e = {}, r) {
1730
+ const n = !!(e != null && e.previewMode), o = await Ae(t, e, n);
1731
+ if (!o.ok)
1732
+ return console.log(
1733
+ `Failed to fetch Strapi (url=${String(t)}, status=${o.status})`
1734
+ ), { status: 404, data: [], error: String(o.status) };
1735
+ const { data: a } = await o.json();
1736
+ return a ? {
1737
+ status: 200,
1738
+ data: r ? pr(a) : a
1739
+ } : { status: 404, data: [], error: "No data found" };
1740
+ }
1741
+ async function vr(t, e, r = {}) {
1742
+ const n = (r == null ? void 0 : r.previewId) ?? "", o = (r == null ? void 0 : r.previewMode) === "true", a = { ...r, versionId: n }, i = [];
1743
+ let f = 1, l = 0, u = !0;
1744
+ try {
1745
+ do {
1746
+ const c = await Ae(e, { ...a, page: f }, o).then((p) => p.json()).catch((p) => (console.error("Error fetching VTEX CMS data:", p), console.error("Error URL:", e.toString()), null));
1747
+ f === 1 && (l = c.totalItems), Array.isArray(c == null ? void 0 : c.data) && i.push(...c.data), u = !!(c != null && c.hasNextPage), f++;
1748
+ } while (u && i.length < l);
1749
+ if (o && i.length > 0) {
1750
+ if (!t || !n)
1751
+ throw new Error(
1752
+ "contentType and previewId are required for preview mode in vtexCMSData"
1753
+ );
1754
+ const c = await yr(
1755
+ t,
1756
+ i,
1757
+ a
1758
+ );
1759
+ return {
1760
+ status: c.length > 0 ? 200 : 404,
1761
+ data: c
1762
+ };
1763
+ }
1764
+ return {
1765
+ status: i.length ? 200 : 404,
1766
+ data: i
1767
+ };
1768
+ } catch (c) {
1769
+ return {
1770
+ status: 500,
1771
+ data: [],
1772
+ error: c instanceof Error ? c.message : String(c)
1773
+ };
1774
+ }
1775
+ }
1776
+ const wi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1777
+ __proto__: null,
1778
+ strapiCMSData: dr,
1779
+ vtexCMSData: vr
1780
+ }, Symbol.toStringTag, { value: "Module" }));
1781
+ async function li({
1782
+ contentType: t,
1783
+ documentId: e,
1784
+ versionId: r,
1785
+ storeId: n,
1786
+ CMS_PROJECT_NAME: o
1787
+ }) {
1788
+ const a = e && e.length ? `/${e}` : "", i = r && r.length ? `?versionId=${r}` : "";
1789
+ return fetch(
1790
+ `https://${n}.myvtex.com/_v/cms/api/${o}/${t}${a}${i}`,
1791
+ { cache: "no-cache" }
1792
+ );
1793
+ }
1794
+ async function ci(t, e = {}, r) {
1795
+ const { cms: n = "vtex" } = e ?? {};
1796
+ try {
1797
+ const o = new URL(it(t, e));
1798
+ return n !== "vtex" ? dr(o, e, r) : vr(t, o, e);
1799
+ } catch (o) {
1800
+ return console.error(`[Fetch ContentType Error CMS ${n}]`, o), r ? { status: 400, data: null } : { status: 200, data: [] };
1801
+ }
1802
+ }
1803
+ const xi = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1804
+ __proto__: null,
1805
+ fetchContentType: ci,
1806
+ getCMSContentType: li
1807
+ }, Symbol.toStringTag, { value: "Module" }));
1808
+ export {
1809
+ gi as A,
1810
+ xi as B,
1811
+ Si as C,
1812
+ wi as D,
1813
+ bi as S,
1814
+ Or as a,
1815
+ $r as b,
1816
+ wr as c,
1817
+ Er as d,
1818
+ si as e,
1819
+ Ke as f,
1820
+ Sr as g,
1821
+ _r as h,
1822
+ Pr as i,
1823
+ Ur as j,
1824
+ br as k,
1825
+ kr as l,
1826
+ Fr as m,
1827
+ xr as n,
1828
+ _i as o,
1829
+ mi as p,
1830
+ Ir as q,
1831
+ ue as r,
1832
+ Bt as s,
1833
+ vi as t,
1834
+ Rr as u,
1835
+ pi as v,
1836
+ hi as w,
1837
+ ci as x,
1838
+ di as y,
1839
+ yi as z
1840
+ };