@soma-vertical-web/multi-lib 1.0.8 → 1.0.10

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