@shlinkio/shlink-frontend-kit 0.5.0 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,1571 +1,264 @@
1
- import { jsx as y, jsxs as P, Fragment as Be } from "react/jsx-runtime";
2
- import { faCircleNotch as nt, faSearch as at, faEllipsisV as ot, faSortAmountUp as it, faSortAmountDown as lt } from "@fortawesome/free-solid-svg-icons";
3
- import { FontAwesomeIcon as Pe } from "@fortawesome/react-fontawesome";
4
- import { Row as Fr, Card as Ke, CardHeader as ct, CardBody as ft, Dropdown as ut, DropdownToggle as Nr, DropdownMenu as _r, NavItem as st, NavLink as pt, Nav as yt, UncontrolledDropdown as dt, DropdownItem as Fe } from "reactstrap";
5
- import { useState as Ie, useCallback as oe, useRef as Se, useMemo as mt, Children as vt, isValidElement as gt } from "react";
6
- import { useLocation as ht, NavLink as bt } from "react-router-dom";
7
- function Dr(r) {
8
- var e, t, n = "";
9
- if (typeof r == "string" || typeof r == "number")
10
- n += r;
11
- else if (typeof r == "object")
12
- if (Array.isArray(r)) {
13
- var o = r.length;
14
- for (e = 0; e < o; e++)
15
- r[e] && (t = Dr(r[e])) && (n && (n += " "), n += t);
16
- } else
17
- for (t in r)
18
- r[t] && (n && (n += " "), n += t);
19
- return n;
20
- }
21
- function I() {
22
- for (var r, e, t = 0, n = "", o = arguments.length; t < o; t++)
23
- (r = arguments[t]) && (e = Dr(r)) && (n && (n += " "), n += e);
24
- return n;
25
- }
26
- const St = (r) => ({
1
+ import { jsx as o, jsxs as d, Fragment as C } from "react/jsx-runtime";
2
+ import { faCircleNotch as R, faSearch as F, faEllipsisV as E, faSortAmountUp as H, faSortAmountDown as M } from "@fortawesome/free-solid-svg-icons";
3
+ import { FontAwesomeIcon as b } from "@fortawesome/react-fontawesome";
4
+ import { clsx as m } from "clsx";
5
+ import { Row as v, Card as _, CardHeader as P, CardBody as $, Dropdown as G, DropdownToggle as T, DropdownMenu as O, NavItem as q, NavLink as Q, Nav as j, UncontrolledDropdown as U, DropdownItem as N } from "reactstrap";
6
+ import { useState as w, useCallback as p, useRef as g, useMemo as V, Children as Y, isValidElement as z } from "react";
7
+ import { useLocation as J, NavLink as X } from "react-router-dom";
8
+ import { v4 as Z } from "uuid";
9
+ import y from "qs";
10
+ const W = (e) => ({
27
11
  error: "border-danger",
28
12
  default: ""
29
- })[r], wt = (r) => ({
13
+ })[e], B = (e) => ({
30
14
  error: "text-danger",
31
15
  default: "text-muted"
32
- })[r], fo = ({ className: r, children: e, loading: t = !1, type: n = "default", fullWidth: o = !1 }) => {
33
- const a = I({
34
- "col-md-12": o,
35
- "col-md-10 offset-md-1": !o
16
+ })[e], ge = ({ className: e, children: r, loading: t = !1, type: n = "default", fullWidth: s = !1 }) => {
17
+ const c = m({
18
+ "col-md-12": s,
19
+ "col-md-10 offset-md-1": !s
36
20
  });
37
- return /* @__PURE__ */ y(Fr, { className: I("g-0", r), children: /* @__PURE__ */ y("div", { className: a, children: /* @__PURE__ */ y(Ke, { className: St(n), body: !0, children: /* @__PURE__ */ P("h3", { className: I("text-center mb-0", wt(n)), children: [
38
- t && /* @__PURE__ */ y(Pe, { icon: nt, spin: !0 }),
39
- t && /* @__PURE__ */ y("span", { className: "ms-2", children: e ?? "Loading..." }),
40
- !t && e
21
+ return /* @__PURE__ */ o(v, { className: m("g-0", e), children: /* @__PURE__ */ o("div", { className: c, children: /* @__PURE__ */ o(_, { className: W(n), body: !0, children: /* @__PURE__ */ d("h3", { className: m("text-center mb-0", B(n)), children: [
22
+ t && /* @__PURE__ */ o(b, { icon: R, spin: !0 }),
23
+ t && /* @__PURE__ */ o("span", { className: "ms-2", children: r ?? "Loading..." }),
24
+ !t && r
41
25
  ] }) }) }) });
42
- }, At = ({ title: r, children: e, bodyClassName: t, ...n }) => /* @__PURE__ */ P(Ke, { ...n, children: [
43
- r && /* @__PURE__ */ y(ct, { role: "heading", "aria-level": 4, children: r }),
44
- /* @__PURE__ */ y(ft, { className: t, children: e })
45
- ] }), uo = ({ children: r, type: e, className: t, small: n = !1 }) => /* @__PURE__ */ y(Fr, { className: t, children: /* @__PURE__ */ y("div", { className: I({ "col-md-10 offset-md-1": !n, "col-12": n }), children: /* @__PURE__ */ y(
46
- At,
26
+ }, K = ({ title: e, children: r, bodyClassName: t, ...n }) => /* @__PURE__ */ d(_, { ...n, children: [
27
+ e && /* @__PURE__ */ o(P, { role: "heading", "aria-level": 4, children: e }),
28
+ /* @__PURE__ */ o($, { className: t, children: r })
29
+ ] }), be = ({ children: e, type: r, className: t, small: n = !1 }) => /* @__PURE__ */ o(v, { className: t, children: /* @__PURE__ */ o("div", { className: m({ "col-md-10 offset-md-1": !n, "col-12": n }), children: /* @__PURE__ */ o(
30
+ K,
47
31
  {
48
32
  role: "document",
49
- className: I("text-center", {
50
- "bg-main": e === "success",
51
- "bg-danger": e === "error",
52
- "bg-warning": e === "warning",
53
- "text-white": e !== "warning"
33
+ className: m("text-center", {
34
+ "bg-main": r === "success",
35
+ "bg-danger": r === "error",
36
+ "bg-warning": r === "warning",
37
+ "text-white": r !== "warning"
54
38
  }),
55
- bodyClassName: I({ "p-2": n }),
56
- children: r
57
- }
58
- ) }) });
59
- let ye;
60
- const Ot = new Uint8Array(16);
61
- function Et() {
62
- if (!ye && (ye = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !ye))
63
- throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
64
- return ye(Ot);
65
- }
66
- const w = [];
67
- for (let r = 0; r < 256; ++r)
68
- w.push((r + 256).toString(16).slice(1));
69
- function Pt(r, e = 0) {
70
- return w[r[e + 0]] + w[r[e + 1]] + w[r[e + 2]] + w[r[e + 3]] + "-" + w[r[e + 4]] + w[r[e + 5]] + "-" + w[r[e + 6]] + w[r[e + 7]] + "-" + w[r[e + 8]] + w[r[e + 9]] + "-" + w[r[e + 10]] + w[r[e + 11]] + w[r[e + 12]] + w[r[e + 13]] + w[r[e + 14]] + w[r[e + 15]];
71
- }
72
- const It = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), nr = {
73
- randomUUID: It
74
- };
75
- function $t(r, e, t) {
76
- if (nr.randomUUID && !e && !r)
77
- return nr.randomUUID();
78
- r = r || {};
79
- const n = r.random || (r.rng || Et)();
80
- if (n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128, e) {
81
- t = t || 0;
82
- for (let o = 0; o < 16; ++o)
83
- e[t + o] = n[o];
84
- return e;
85
- }
86
- return Pt(n);
87
- }
88
- var xt = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
89
- function Ft(r) {
90
- return r && r.__esModule && Object.prototype.hasOwnProperty.call(r, "default") ? r.default : r;
91
- }
92
- function Nt(r) {
93
- if (r.__esModule)
94
- return r;
95
- var e = r.default;
96
- if (typeof e == "function") {
97
- var t = function n() {
98
- return this instanceof n ? Reflect.construct(e, arguments, this.constructor) : e.apply(this, arguments);
99
- };
100
- t.prototype = e.prototype;
101
- } else
102
- t = {};
103
- return Object.defineProperty(t, "__esModule", { value: !0 }), Object.keys(r).forEach(function(n) {
104
- var o = Object.getOwnPropertyDescriptor(r, n);
105
- Object.defineProperty(t, n, o.get ? o : {
106
- enumerable: !0,
107
- get: function() {
108
- return r[n];
109
- }
110
- });
111
- }), t;
112
- }
113
- var _t = Error, Dt = EvalError, Rt = RangeError, Tt = ReferenceError, Rr = SyntaxError, fe = TypeError, Ct = URIError, Mt = function() {
114
- if (typeof Symbol != "function" || typeof Object.getOwnPropertySymbols != "function")
115
- return !1;
116
- if (typeof Symbol.iterator == "symbol")
117
- return !0;
118
- var e = {}, t = Symbol("test"), n = Object(t);
119
- if (typeof t == "string" || Object.prototype.toString.call(t) !== "[object Symbol]" || Object.prototype.toString.call(n) !== "[object Symbol]")
120
- return !1;
121
- var o = 42;
122
- e[t] = o;
123
- for (t in e)
124
- return !1;
125
- if (typeof Object.keys == "function" && Object.keys(e).length !== 0 || typeof Object.getOwnPropertyNames == "function" && Object.getOwnPropertyNames(e).length !== 0)
126
- return !1;
127
- var a = Object.getOwnPropertySymbols(e);
128
- if (a.length !== 1 || a[0] !== t || !Object.prototype.propertyIsEnumerable.call(e, t))
129
- return !1;
130
- if (typeof Object.getOwnPropertyDescriptor == "function") {
131
- var i = Object.getOwnPropertyDescriptor(e, t);
132
- if (i.value !== o || i.enumerable !== !0)
133
- return !1;
134
- }
135
- return !0;
136
- }, ar = typeof Symbol < "u" && Symbol, kt = Mt, Ut = function() {
137
- return typeof ar != "function" || typeof Symbol != "function" || typeof ar("foo") != "symbol" || typeof Symbol("bar") != "symbol" ? !1 : kt();
138
- }, or = {
139
- foo: {}
140
- }, Lt = Object, Bt = function() {
141
- return { __proto__: or }.foo === or.foo && !({ __proto__: null } instanceof Lt);
142
- }, Wt = "Function.prototype.bind called on incompatible ", Gt = Object.prototype.toString, Ht = Math.max, Vt = "[object Function]", ir = function(e, t) {
143
- for (var n = [], o = 0; o < e.length; o += 1)
144
- n[o] = e[o];
145
- for (var a = 0; a < t.length; a += 1)
146
- n[a + e.length] = t[a];
147
- return n;
148
- }, qt = function(e, t) {
149
- for (var n = [], o = t || 0, a = 0; o < e.length; o += 1, a += 1)
150
- n[a] = e[o];
151
- return n;
152
- }, zt = function(r, e) {
153
- for (var t = "", n = 0; n < r.length; n += 1)
154
- t += r[n], n + 1 < r.length && (t += e);
155
- return t;
156
- }, Qt = function(e) {
157
- var t = this;
158
- if (typeof t != "function" || Gt.apply(t) !== Vt)
159
- throw new TypeError(Wt + t);
160
- for (var n = qt(arguments, 1), o, a = function() {
161
- if (this instanceof o) {
162
- var u = t.apply(
163
- this,
164
- ir(n, arguments)
165
- );
166
- return Object(u) === u ? u : this;
167
- }
168
- return t.apply(
169
- e,
170
- ir(n, arguments)
171
- );
172
- }, i = Ht(0, t.length - n.length), l = [], c = 0; c < i; c++)
173
- l[c] = "$" + c;
174
- if (o = Function("binder", "return function (" + zt(l, ",") + "){ return binder.apply(this,arguments); }")(a), t.prototype) {
175
- var f = function() {
176
- };
177
- f.prototype = t.prototype, o.prototype = new f(), f.prototype = null;
178
- }
179
- return o;
180
- }, Kt = Qt, je = Function.prototype.bind || Kt, jt = Function.prototype.call, Jt = Object.prototype.hasOwnProperty, Yt = je, Xt = Yt.call(jt, Jt), p, Zt = _t, en = Dt, rn = Rt, tn = Tt, Y = Rr, J = fe, nn = Ct, Tr = Function, Ne = function(r) {
181
- try {
182
- return Tr('"use strict"; return (' + r + ").constructor;")();
183
- } catch {
184
- }
185
- }, H = Object.getOwnPropertyDescriptor;
186
- if (H)
187
- try {
188
- H({}, "");
189
- } catch {
190
- H = null;
191
- }
192
- var _e = function() {
193
- throw new J();
194
- }, an = H ? function() {
195
- try {
196
- return arguments.callee, _e;
197
- } catch {
198
- try {
199
- return H(arguments, "callee").get;
200
- } catch {
201
- return _e;
202
- }
203
- }
204
- }() : _e, Q = Ut(), on = Bt(), S = Object.getPrototypeOf || (on ? function(r) {
205
- return r.__proto__;
206
- } : null), j = {}, ln = typeof Uint8Array > "u" || !S ? p : S(Uint8Array), V = {
207
- __proto__: null,
208
- "%AggregateError%": typeof AggregateError > "u" ? p : AggregateError,
209
- "%Array%": Array,
210
- "%ArrayBuffer%": typeof ArrayBuffer > "u" ? p : ArrayBuffer,
211
- "%ArrayIteratorPrototype%": Q && S ? S([][Symbol.iterator]()) : p,
212
- "%AsyncFromSyncIteratorPrototype%": p,
213
- "%AsyncFunction%": j,
214
- "%AsyncGenerator%": j,
215
- "%AsyncGeneratorFunction%": j,
216
- "%AsyncIteratorPrototype%": j,
217
- "%Atomics%": typeof Atomics > "u" ? p : Atomics,
218
- "%BigInt%": typeof BigInt > "u" ? p : BigInt,
219
- "%BigInt64Array%": typeof BigInt64Array > "u" ? p : BigInt64Array,
220
- "%BigUint64Array%": typeof BigUint64Array > "u" ? p : BigUint64Array,
221
- "%Boolean%": Boolean,
222
- "%DataView%": typeof DataView > "u" ? p : DataView,
223
- "%Date%": Date,
224
- "%decodeURI%": decodeURI,
225
- "%decodeURIComponent%": decodeURIComponent,
226
- "%encodeURI%": encodeURI,
227
- "%encodeURIComponent%": encodeURIComponent,
228
- "%Error%": Zt,
229
- "%eval%": eval,
230
- // eslint-disable-line no-eval
231
- "%EvalError%": en,
232
- "%Float32Array%": typeof Float32Array > "u" ? p : Float32Array,
233
- "%Float64Array%": typeof Float64Array > "u" ? p : Float64Array,
234
- "%FinalizationRegistry%": typeof FinalizationRegistry > "u" ? p : FinalizationRegistry,
235
- "%Function%": Tr,
236
- "%GeneratorFunction%": j,
237
- "%Int8Array%": typeof Int8Array > "u" ? p : Int8Array,
238
- "%Int16Array%": typeof Int16Array > "u" ? p : Int16Array,
239
- "%Int32Array%": typeof Int32Array > "u" ? p : Int32Array,
240
- "%isFinite%": isFinite,
241
- "%isNaN%": isNaN,
242
- "%IteratorPrototype%": Q && S ? S(S([][Symbol.iterator]())) : p,
243
- "%JSON%": typeof JSON == "object" ? JSON : p,
244
- "%Map%": typeof Map > "u" ? p : Map,
245
- "%MapIteratorPrototype%": typeof Map > "u" || !Q || !S ? p : S((/* @__PURE__ */ new Map())[Symbol.iterator]()),
246
- "%Math%": Math,
247
- "%Number%": Number,
248
- "%Object%": Object,
249
- "%parseFloat%": parseFloat,
250
- "%parseInt%": parseInt,
251
- "%Promise%": typeof Promise > "u" ? p : Promise,
252
- "%Proxy%": typeof Proxy > "u" ? p : Proxy,
253
- "%RangeError%": rn,
254
- "%ReferenceError%": tn,
255
- "%Reflect%": typeof Reflect > "u" ? p : Reflect,
256
- "%RegExp%": RegExp,
257
- "%Set%": typeof Set > "u" ? p : Set,
258
- "%SetIteratorPrototype%": typeof Set > "u" || !Q || !S ? p : S((/* @__PURE__ */ new Set())[Symbol.iterator]()),
259
- "%SharedArrayBuffer%": typeof SharedArrayBuffer > "u" ? p : SharedArrayBuffer,
260
- "%String%": String,
261
- "%StringIteratorPrototype%": Q && S ? S(""[Symbol.iterator]()) : p,
262
- "%Symbol%": Q ? Symbol : p,
263
- "%SyntaxError%": Y,
264
- "%ThrowTypeError%": an,
265
- "%TypedArray%": ln,
266
- "%TypeError%": J,
267
- "%Uint8Array%": typeof Uint8Array > "u" ? p : Uint8Array,
268
- "%Uint8ClampedArray%": typeof Uint8ClampedArray > "u" ? p : Uint8ClampedArray,
269
- "%Uint16Array%": typeof Uint16Array > "u" ? p : Uint16Array,
270
- "%Uint32Array%": typeof Uint32Array > "u" ? p : Uint32Array,
271
- "%URIError%": nn,
272
- "%WeakMap%": typeof WeakMap > "u" ? p : WeakMap,
273
- "%WeakRef%": typeof WeakRef > "u" ? p : WeakRef,
274
- "%WeakSet%": typeof WeakSet > "u" ? p : WeakSet
275
- };
276
- if (S)
277
- try {
278
- null.error;
279
- } catch (r) {
280
- var cn = S(S(r));
281
- V["%Error.prototype%"] = cn;
282
- }
283
- var fn = function r(e) {
284
- var t;
285
- if (e === "%AsyncFunction%")
286
- t = Ne("async function () {}");
287
- else if (e === "%GeneratorFunction%")
288
- t = Ne("function* () {}");
289
- else if (e === "%AsyncGeneratorFunction%")
290
- t = Ne("async function* () {}");
291
- else if (e === "%AsyncGenerator%") {
292
- var n = r("%AsyncGeneratorFunction%");
293
- n && (t = n.prototype);
294
- } else if (e === "%AsyncIteratorPrototype%") {
295
- var o = r("%AsyncGenerator%");
296
- o && S && (t = S(o.prototype));
297
- }
298
- return V[e] = t, t;
299
- }, lr = {
300
- __proto__: null,
301
- "%ArrayBufferPrototype%": ["ArrayBuffer", "prototype"],
302
- "%ArrayPrototype%": ["Array", "prototype"],
303
- "%ArrayProto_entries%": ["Array", "prototype", "entries"],
304
- "%ArrayProto_forEach%": ["Array", "prototype", "forEach"],
305
- "%ArrayProto_keys%": ["Array", "prototype", "keys"],
306
- "%ArrayProto_values%": ["Array", "prototype", "values"],
307
- "%AsyncFunctionPrototype%": ["AsyncFunction", "prototype"],
308
- "%AsyncGenerator%": ["AsyncGeneratorFunction", "prototype"],
309
- "%AsyncGeneratorPrototype%": ["AsyncGeneratorFunction", "prototype", "prototype"],
310
- "%BooleanPrototype%": ["Boolean", "prototype"],
311
- "%DataViewPrototype%": ["DataView", "prototype"],
312
- "%DatePrototype%": ["Date", "prototype"],
313
- "%ErrorPrototype%": ["Error", "prototype"],
314
- "%EvalErrorPrototype%": ["EvalError", "prototype"],
315
- "%Float32ArrayPrototype%": ["Float32Array", "prototype"],
316
- "%Float64ArrayPrototype%": ["Float64Array", "prototype"],
317
- "%FunctionPrototype%": ["Function", "prototype"],
318
- "%Generator%": ["GeneratorFunction", "prototype"],
319
- "%GeneratorPrototype%": ["GeneratorFunction", "prototype", "prototype"],
320
- "%Int8ArrayPrototype%": ["Int8Array", "prototype"],
321
- "%Int16ArrayPrototype%": ["Int16Array", "prototype"],
322
- "%Int32ArrayPrototype%": ["Int32Array", "prototype"],
323
- "%JSONParse%": ["JSON", "parse"],
324
- "%JSONStringify%": ["JSON", "stringify"],
325
- "%MapPrototype%": ["Map", "prototype"],
326
- "%NumberPrototype%": ["Number", "prototype"],
327
- "%ObjectPrototype%": ["Object", "prototype"],
328
- "%ObjProto_toString%": ["Object", "prototype", "toString"],
329
- "%ObjProto_valueOf%": ["Object", "prototype", "valueOf"],
330
- "%PromisePrototype%": ["Promise", "prototype"],
331
- "%PromiseProto_then%": ["Promise", "prototype", "then"],
332
- "%Promise_all%": ["Promise", "all"],
333
- "%Promise_reject%": ["Promise", "reject"],
334
- "%Promise_resolve%": ["Promise", "resolve"],
335
- "%RangeErrorPrototype%": ["RangeError", "prototype"],
336
- "%ReferenceErrorPrototype%": ["ReferenceError", "prototype"],
337
- "%RegExpPrototype%": ["RegExp", "prototype"],
338
- "%SetPrototype%": ["Set", "prototype"],
339
- "%SharedArrayBufferPrototype%": ["SharedArrayBuffer", "prototype"],
340
- "%StringPrototype%": ["String", "prototype"],
341
- "%SymbolPrototype%": ["Symbol", "prototype"],
342
- "%SyntaxErrorPrototype%": ["SyntaxError", "prototype"],
343
- "%TypedArrayPrototype%": ["TypedArray", "prototype"],
344
- "%TypeErrorPrototype%": ["TypeError", "prototype"],
345
- "%Uint8ArrayPrototype%": ["Uint8Array", "prototype"],
346
- "%Uint8ClampedArrayPrototype%": ["Uint8ClampedArray", "prototype"],
347
- "%Uint16ArrayPrototype%": ["Uint16Array", "prototype"],
348
- "%Uint32ArrayPrototype%": ["Uint32Array", "prototype"],
349
- "%URIErrorPrototype%": ["URIError", "prototype"],
350
- "%WeakMapPrototype%": ["WeakMap", "prototype"],
351
- "%WeakSetPrototype%": ["WeakSet", "prototype"]
352
- }, ue = je, we = Xt, un = ue.call(Function.call, Array.prototype.concat), sn = ue.call(Function.apply, Array.prototype.splice), cr = ue.call(Function.call, String.prototype.replace), Ae = ue.call(Function.call, String.prototype.slice), pn = ue.call(Function.call, RegExp.prototype.exec), yn = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, dn = /\\(\\)?/g, mn = function(e) {
353
- var t = Ae(e, 0, 1), n = Ae(e, -1);
354
- if (t === "%" && n !== "%")
355
- throw new Y("invalid intrinsic syntax, expected closing `%`");
356
- if (n === "%" && t !== "%")
357
- throw new Y("invalid intrinsic syntax, expected opening `%`");
358
- var o = [];
359
- return cr(e, yn, function(a, i, l, c) {
360
- o[o.length] = l ? cr(c, dn, "$1") : i || a;
361
- }), o;
362
- }, vn = function(e, t) {
363
- var n = e, o;
364
- if (we(lr, n) && (o = lr[n], n = "%" + o[0] + "%"), we(V, n)) {
365
- var a = V[n];
366
- if (a === j && (a = fn(n)), typeof a > "u" && !t)
367
- throw new J("intrinsic " + e + " exists, but is not available. Please file an issue!");
368
- return {
369
- alias: o,
370
- name: n,
371
- value: a
372
- };
373
- }
374
- throw new Y("intrinsic " + e + " does not exist!");
375
- }, ee = function(e, t) {
376
- if (typeof e != "string" || e.length === 0)
377
- throw new J("intrinsic name must be a non-empty string");
378
- if (arguments.length > 1 && typeof t != "boolean")
379
- throw new J('"allowMissing" argument must be a boolean');
380
- if (pn(/^%?[^%]*%?$/, e) === null)
381
- throw new Y("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
382
- var n = mn(e), o = n.length > 0 ? n[0] : "", a = vn("%" + o + "%", t), i = a.name, l = a.value, c = !1, f = a.alias;
383
- f && (o = f[0], sn(n, un([0, 1], f)));
384
- for (var u = 1, m = !0; u < n.length; u += 1) {
385
- var s = n[u], v = Ae(s, 0, 1), g = Ae(s, -1);
386
- if ((v === '"' || v === "'" || v === "`" || g === '"' || g === "'" || g === "`") && v !== g)
387
- throw new Y("property names with quotes must have matching quotes");
388
- if ((s === "constructor" || !m) && (c = !0), o += "." + s, i = "%" + o + "%", we(V, i))
389
- l = V[i];
390
- else if (l != null) {
391
- if (!(s in l)) {
392
- if (!t)
393
- throw new J("base intrinsic for " + e + " exists, but the property is not available.");
394
- return;
395
- }
396
- if (H && u + 1 >= n.length) {
397
- var A = H(l, s);
398
- m = !!A, m && "get" in A && !("originalValue" in A.get) ? l = A.get : l = l[s];
399
- } else
400
- m = we(l, s), l = l[s];
401
- m && !c && (V[i] = l);
402
- }
403
- }
404
- return l;
405
- }, Cr = { exports: {} }, De, fr;
406
- function Je() {
407
- if (fr)
408
- return De;
409
- fr = 1;
410
- var r = ee, e = r("%Object.defineProperty%", !0) || !1;
411
- if (e)
412
- try {
413
- e({}, "a", { value: 1 });
414
- } catch {
415
- e = !1;
416
- }
417
- return De = e, De;
418
- }
419
- var gn = ee, ge = gn("%Object.getOwnPropertyDescriptor%", !0);
420
- if (ge)
421
- try {
422
- ge([], "length");
423
- } catch {
424
- ge = null;
425
- }
426
- var Mr = ge, ur = Je(), hn = Rr, K = fe, sr = Mr, bn = function(e, t, n) {
427
- if (!e || typeof e != "object" && typeof e != "function")
428
- throw new K("`obj` must be an object or a function`");
429
- if (typeof t != "string" && typeof t != "symbol")
430
- throw new K("`property` must be a string or a symbol`");
431
- if (arguments.length > 3 && typeof arguments[3] != "boolean" && arguments[3] !== null)
432
- throw new K("`nonEnumerable`, if provided, must be a boolean or null");
433
- if (arguments.length > 4 && typeof arguments[4] != "boolean" && arguments[4] !== null)
434
- throw new K("`nonWritable`, if provided, must be a boolean or null");
435
- if (arguments.length > 5 && typeof arguments[5] != "boolean" && arguments[5] !== null)
436
- throw new K("`nonConfigurable`, if provided, must be a boolean or null");
437
- if (arguments.length > 6 && typeof arguments[6] != "boolean")
438
- throw new K("`loose`, if provided, must be a boolean");
439
- var o = arguments.length > 3 ? arguments[3] : null, a = arguments.length > 4 ? arguments[4] : null, i = arguments.length > 5 ? arguments[5] : null, l = arguments.length > 6 ? arguments[6] : !1, c = !!sr && sr(e, t);
440
- if (ur)
441
- ur(e, t, {
442
- configurable: i === null && c ? c.configurable : !i,
443
- enumerable: o === null && c ? c.enumerable : !o,
444
- value: n,
445
- writable: a === null && c ? c.writable : !a
446
- });
447
- else if (l || !o && !a && !i)
448
- e[t] = n;
449
- else
450
- throw new hn("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");
451
- }, We = Je(), kr = function() {
452
- return !!We;
453
- };
454
- kr.hasArrayLengthDefineBug = function() {
455
- if (!We)
456
- return null;
457
- try {
458
- return We([], "length", { value: 1 }).length !== 1;
459
- } catch {
460
- return !0;
461
- }
462
- };
463
- var Sn = kr, wn = ee, pr = bn, An = Sn(), yr = Mr, dr = fe, On = wn("%Math.floor%"), En = function(e, t) {
464
- if (typeof e != "function")
465
- throw new dr("`fn` is not a function");
466
- if (typeof t != "number" || t < 0 || t > 4294967295 || On(t) !== t)
467
- throw new dr("`length` must be a positive 32-bit integer");
468
- var n = arguments.length > 2 && !!arguments[2], o = !0, a = !0;
469
- if ("length" in e && yr) {
470
- var i = yr(e, "length");
471
- i && !i.configurable && (o = !1), i && !i.writable && (a = !1);
472
- }
473
- return (o || a || !n) && (An ? pr(
474
- /** @type {Parameters<define>[0]} */
475
- e,
476
- "length",
477
- t,
478
- !0,
479
- !0
480
- ) : pr(
481
- /** @type {Parameters<define>[0]} */
482
- e,
483
- "length",
484
- t
485
- )), e;
486
- };
487
- (function(r) {
488
- var e = je, t = ee, n = En, o = fe, a = t("%Function.prototype.apply%"), i = t("%Function.prototype.call%"), l = t("%Reflect.apply%", !0) || e.call(i, a), c = Je(), f = t("%Math.max%");
489
- r.exports = function(s) {
490
- if (typeof s != "function")
491
- throw new o("a function is required");
492
- var v = l(e, i, arguments);
493
- return n(
494
- v,
495
- 1 + f(0, s.length - (arguments.length - 1)),
496
- !0
497
- );
498
- };
499
- var u = function() {
500
- return l(e, a, arguments);
501
- };
502
- c ? c(r.exports, "apply", { value: u }) : r.exports.apply = u;
503
- })(Cr);
504
- var Pn = Cr.exports, Ur = ee, Lr = Pn, In = Lr(Ur("String.prototype.indexOf")), $n = function(e, t) {
505
- var n = Ur(e, !!t);
506
- return typeof n == "function" && In(e, ".prototype.") > -1 ? Lr(n) : n;
507
- };
508
- const xn = {}, Fn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
509
- __proto__: null,
510
- default: xn
511
- }, Symbol.toStringTag, { value: "Module" })), Nn = /* @__PURE__ */ Nt(Fn);
512
- var Ye = typeof Map == "function" && Map.prototype, Re = Object.getOwnPropertyDescriptor && Ye ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, Oe = Ye && Re && typeof Re.get == "function" ? Re.get : null, mr = Ye && Map.prototype.forEach, Xe = typeof Set == "function" && Set.prototype, Te = Object.getOwnPropertyDescriptor && Xe ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, Ee = Xe && Te && typeof Te.get == "function" ? Te.get : null, vr = Xe && Set.prototype.forEach, _n = typeof WeakMap == "function" && WeakMap.prototype, ie = _n ? WeakMap.prototype.has : null, Dn = typeof WeakSet == "function" && WeakSet.prototype, le = Dn ? WeakSet.prototype.has : null, Rn = typeof WeakRef == "function" && WeakRef.prototype, gr = Rn ? WeakRef.prototype.deref : null, Tn = Boolean.prototype.valueOf, Cn = Object.prototype.toString, Mn = Function.prototype.toString, kn = String.prototype.match, Ze = String.prototype.slice, U = String.prototype.replace, Un = String.prototype.toUpperCase, hr = String.prototype.toLowerCase, Br = RegExp.prototype.test, br = Array.prototype.concat, N = Array.prototype.join, Ln = Array.prototype.slice, Sr = Math.floor, Ge = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, Ce = Object.getOwnPropertySymbols, He = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, X = typeof Symbol == "function" && typeof Symbol.iterator == "object", O = typeof Symbol == "function" && Symbol.toStringTag && (typeof Symbol.toStringTag === X || "symbol") ? Symbol.toStringTag : null, Wr = Object.prototype.propertyIsEnumerable, wr = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(r) {
513
- return r.__proto__;
514
- } : null);
515
- function Ar(r, e) {
516
- if (r === 1 / 0 || r === -1 / 0 || r !== r || r && r > -1e3 && r < 1e3 || Br.call(/e/, e))
517
- return e;
518
- var t = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
519
- if (typeof r == "number") {
520
- var n = r < 0 ? -Sr(-r) : Sr(r);
521
- if (n !== r) {
522
- var o = String(n), a = Ze.call(e, o.length + 1);
523
- return U.call(o, t, "$&_") + "." + U.call(U.call(a, /([0-9]{3})/g, "$&_"), /_$/, "");
524
- }
525
- }
526
- return U.call(e, t, "$&_");
527
- }
528
- var Ve = Nn, Or = Ve.custom, Er = Hr(Or) ? Or : null, Bn = function r(e, t, n, o) {
529
- var a = t || {};
530
- if (k(a, "quoteStyle") && a.quoteStyle !== "single" && a.quoteStyle !== "double")
531
- throw new TypeError('option "quoteStyle" must be "single" or "double"');
532
- if (k(a, "maxStringLength") && (typeof a.maxStringLength == "number" ? a.maxStringLength < 0 && a.maxStringLength !== 1 / 0 : a.maxStringLength !== null))
533
- throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
534
- var i = k(a, "customInspect") ? a.customInspect : !0;
535
- if (typeof i != "boolean" && i !== "symbol")
536
- throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");
537
- if (k(a, "indent") && a.indent !== null && a.indent !== " " && !(parseInt(a.indent, 10) === a.indent && a.indent > 0))
538
- throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
539
- if (k(a, "numericSeparator") && typeof a.numericSeparator != "boolean")
540
- throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
541
- var l = a.numericSeparator;
542
- if (typeof e > "u")
543
- return "undefined";
544
- if (e === null)
545
- return "null";
546
- if (typeof e == "boolean")
547
- return e ? "true" : "false";
548
- if (typeof e == "string")
549
- return qr(e, a);
550
- if (typeof e == "number") {
551
- if (e === 0)
552
- return 1 / 0 / e > 0 ? "0" : "-0";
553
- var c = String(e);
554
- return l ? Ar(e, c) : c;
555
- }
556
- if (typeof e == "bigint") {
557
- var f = String(e) + "n";
558
- return l ? Ar(e, f) : f;
559
- }
560
- var u = typeof a.depth > "u" ? 5 : a.depth;
561
- if (typeof n > "u" && (n = 0), n >= u && u > 0 && typeof e == "object")
562
- return qe(e) ? "[Array]" : "[Object]";
563
- var m = aa(a, n);
564
- if (typeof o > "u")
565
- o = [];
566
- else if (Vr(o, e) >= 0)
567
- return "[Circular]";
568
- function s($, C, M) {
569
- if (C && (o = Ln.call(o), o.push(C)), M) {
570
- var ne = {
571
- depth: a.depth
572
- };
573
- return k(a, "quoteStyle") && (ne.quoteStyle = a.quoteStyle), r($, ne, n + 1, o);
574
- }
575
- return r($, a, n + 1, o);
576
- }
577
- if (typeof e == "function" && !Pr(e)) {
578
- var v = jn(e), g = de(e, s);
579
- return "[Function" + (v ? ": " + v : " (anonymous)") + "]" + (g.length > 0 ? " { " + N.call(g, ", ") + " }" : "");
580
- }
581
- if (Hr(e)) {
582
- var A = X ? U.call(String(e), /^(Symbol\(.*\))_[^)]*$/, "$1") : He.call(e);
583
- return typeof e == "object" && !X ? ae(A) : A;
584
- }
585
- if (ra(e)) {
586
- for (var E = "<" + hr.call(String(e.nodeName)), _ = e.attributes || [], D = 0; D < _.length; D++)
587
- E += " " + _[D].name + "=" + Gr(Wn(_[D].value), "double", a);
588
- return E += ">", e.childNodes && e.childNodes.length && (E += "..."), E += "</" + hr.call(String(e.nodeName)) + ">", E;
589
- }
590
- if (qe(e)) {
591
- if (e.length === 0)
592
- return "[]";
593
- var d = de(e, s);
594
- return m && !na(d) ? "[" + ze(d, m) + "]" : "[ " + N.call(d, ", ") + " ]";
595
- }
596
- if (Hn(e)) {
597
- var R = de(e, s);
598
- return !("cause" in Error.prototype) && "cause" in e && !Wr.call(e, "cause") ? "{ [" + String(e) + "] " + N.call(br.call("[cause]: " + s(e.cause), R), ", ") + " }" : R.length === 0 ? "[" + String(e) + "]" : "{ [" + String(e) + "] " + N.call(R, ", ") + " }";
599
- }
600
- if (typeof e == "object" && i) {
601
- if (Er && typeof e[Er] == "function" && Ve)
602
- return Ve(e, { depth: u - n });
603
- if (i !== "symbol" && typeof e.inspect == "function")
604
- return e.inspect();
605
- }
606
- if (Jn(e)) {
607
- var B = [];
608
- return mr && mr.call(e, function($, C) {
609
- B.push(s(C, e, !0) + " => " + s($, e));
610
- }), Ir("Map", Oe.call(e), B, m);
611
- }
612
- if (Zn(e)) {
613
- var te = [];
614
- return vr && vr.call(e, function($) {
615
- te.push(s($, e));
616
- }), Ir("Set", Ee.call(e), te, m);
617
- }
618
- if (Yn(e))
619
- return Me("WeakMap");
620
- if (ea(e))
621
- return Me("WeakSet");
622
- if (Xn(e))
623
- return Me("WeakRef");
624
- if (qn(e))
625
- return ae(s(Number(e)));
626
- if (Qn(e))
627
- return ae(s(Ge.call(e)));
628
- if (zn(e))
629
- return ae(Tn.call(e));
630
- if (Vn(e))
631
- return ae(s(String(e)));
632
- if (typeof window < "u" && e === window)
633
- return "{ [object Window] }";
634
- if (e === xt)
635
- return "{ [object globalThis] }";
636
- if (!Gn(e) && !Pr(e)) {
637
- var q = de(e, s), se = wr ? wr(e) === Object.prototype : e instanceof Object || e.constructor === Object, W = e instanceof Object ? "" : "null prototype", T = !se && O && Object(e) === e && O in e ? Ze.call(L(e), 8, -1) : W ? "Object" : "", pe = se || typeof e.constructor != "function" ? "" : e.constructor.name ? e.constructor.name + " " : "", z = pe + (T || W ? "[" + N.call(br.call([], T || [], W || []), ": ") + "] " : "");
638
- return q.length === 0 ? z + "{}" : m ? z + "{" + ze(q, m) + "}" : z + "{ " + N.call(q, ", ") + " }";
639
- }
640
- return String(e);
641
- };
642
- function Gr(r, e, t) {
643
- var n = (t.quoteStyle || e) === "double" ? '"' : "'";
644
- return n + r + n;
645
- }
646
- function Wn(r) {
647
- return U.call(String(r), /"/g, "&quot;");
648
- }
649
- function qe(r) {
650
- return L(r) === "[object Array]" && (!O || !(typeof r == "object" && O in r));
651
- }
652
- function Gn(r) {
653
- return L(r) === "[object Date]" && (!O || !(typeof r == "object" && O in r));
654
- }
655
- function Pr(r) {
656
- return L(r) === "[object RegExp]" && (!O || !(typeof r == "object" && O in r));
657
- }
658
- function Hn(r) {
659
- return L(r) === "[object Error]" && (!O || !(typeof r == "object" && O in r));
660
- }
661
- function Vn(r) {
662
- return L(r) === "[object String]" && (!O || !(typeof r == "object" && O in r));
663
- }
664
- function qn(r) {
665
- return L(r) === "[object Number]" && (!O || !(typeof r == "object" && O in r));
666
- }
667
- function zn(r) {
668
- return L(r) === "[object Boolean]" && (!O || !(typeof r == "object" && O in r));
669
- }
670
- function Hr(r) {
671
- if (X)
672
- return r && typeof r == "object" && r instanceof Symbol;
673
- if (typeof r == "symbol")
674
- return !0;
675
- if (!r || typeof r != "object" || !He)
676
- return !1;
677
- try {
678
- return He.call(r), !0;
679
- } catch {
680
- }
681
- return !1;
682
- }
683
- function Qn(r) {
684
- if (!r || typeof r != "object" || !Ge)
685
- return !1;
686
- try {
687
- return Ge.call(r), !0;
688
- } catch {
689
- }
690
- return !1;
691
- }
692
- var Kn = Object.prototype.hasOwnProperty || function(r) {
693
- return r in this;
694
- };
695
- function k(r, e) {
696
- return Kn.call(r, e);
697
- }
698
- function L(r) {
699
- return Cn.call(r);
700
- }
701
- function jn(r) {
702
- if (r.name)
703
- return r.name;
704
- var e = kn.call(Mn.call(r), /^function\s*([\w$]+)/);
705
- return e ? e[1] : null;
706
- }
707
- function Vr(r, e) {
708
- if (r.indexOf)
709
- return r.indexOf(e);
710
- for (var t = 0, n = r.length; t < n; t++)
711
- if (r[t] === e)
712
- return t;
713
- return -1;
714
- }
715
- function Jn(r) {
716
- if (!Oe || !r || typeof r != "object")
717
- return !1;
718
- try {
719
- Oe.call(r);
720
- try {
721
- Ee.call(r);
722
- } catch {
723
- return !0;
724
- }
725
- return r instanceof Map;
726
- } catch {
727
- }
728
- return !1;
729
- }
730
- function Yn(r) {
731
- if (!ie || !r || typeof r != "object")
732
- return !1;
733
- try {
734
- ie.call(r, ie);
735
- try {
736
- le.call(r, le);
737
- } catch {
738
- return !0;
739
- }
740
- return r instanceof WeakMap;
741
- } catch {
742
- }
743
- return !1;
744
- }
745
- function Xn(r) {
746
- if (!gr || !r || typeof r != "object")
747
- return !1;
748
- try {
749
- return gr.call(r), !0;
750
- } catch {
751
- }
752
- return !1;
753
- }
754
- function Zn(r) {
755
- if (!Ee || !r || typeof r != "object")
756
- return !1;
757
- try {
758
- Ee.call(r);
759
- try {
760
- Oe.call(r);
761
- } catch {
762
- return !0;
763
- }
764
- return r instanceof Set;
765
- } catch {
766
- }
767
- return !1;
768
- }
769
- function ea(r) {
770
- if (!le || !r || typeof r != "object")
771
- return !1;
772
- try {
773
- le.call(r, le);
774
- try {
775
- ie.call(r, ie);
776
- } catch {
777
- return !0;
778
- }
779
- return r instanceof WeakSet;
780
- } catch {
781
- }
782
- return !1;
783
- }
784
- function ra(r) {
785
- return !r || typeof r != "object" ? !1 : typeof HTMLElement < "u" && r instanceof HTMLElement ? !0 : typeof r.nodeName == "string" && typeof r.getAttribute == "function";
786
- }
787
- function qr(r, e) {
788
- if (r.length > e.maxStringLength) {
789
- var t = r.length - e.maxStringLength, n = "... " + t + " more character" + (t > 1 ? "s" : "");
790
- return qr(Ze.call(r, 0, e.maxStringLength), e) + n;
791
- }
792
- var o = U.call(U.call(r, /(['\\])/g, "\\$1"), /[\x00-\x1f]/g, ta);
793
- return Gr(o, "single", e);
794
- }
795
- function ta(r) {
796
- var e = r.charCodeAt(0), t = {
797
- 8: "b",
798
- 9: "t",
799
- 10: "n",
800
- 12: "f",
801
- 13: "r"
802
- }[e];
803
- return t ? "\\" + t : "\\x" + (e < 16 ? "0" : "") + Un.call(e.toString(16));
804
- }
805
- function ae(r) {
806
- return "Object(" + r + ")";
807
- }
808
- function Me(r) {
809
- return r + " { ? }";
810
- }
811
- function Ir(r, e, t, n) {
812
- var o = n ? ze(t, n) : N.call(t, ", ");
813
- return r + " (" + e + ") {" + o + "}";
814
- }
815
- function na(r) {
816
- for (var e = 0; e < r.length; e++)
817
- if (Vr(r[e], `
818
- `) >= 0)
819
- return !1;
820
- return !0;
821
- }
822
- function aa(r, e) {
823
- var t;
824
- if (r.indent === " ")
825
- t = " ";
826
- else if (typeof r.indent == "number" && r.indent > 0)
827
- t = N.call(Array(r.indent + 1), " ");
828
- else
829
- return null;
830
- return {
831
- base: t,
832
- prev: N.call(Array(e + 1), t)
833
- };
834
- }
835
- function ze(r, e) {
836
- if (r.length === 0)
837
- return "";
838
- var t = `
839
- ` + e.prev + e.base;
840
- return t + N.call(r, "," + t) + `
841
- ` + e.prev;
842
- }
843
- function de(r, e) {
844
- var t = qe(r), n = [];
845
- if (t) {
846
- n.length = r.length;
847
- for (var o = 0; o < r.length; o++)
848
- n[o] = k(r, o) ? e(r[o], r) : "";
849
- }
850
- var a = typeof Ce == "function" ? Ce(r) : [], i;
851
- if (X) {
852
- i = {};
853
- for (var l = 0; l < a.length; l++)
854
- i["$" + a[l]] = a[l];
855
- }
856
- for (var c in r)
857
- k(r, c) && (t && String(Number(c)) === c && c < r.length || X && i["$" + c] instanceof Symbol || (Br.call(/[^\w$]/, c) ? n.push(e(c, r) + ": " + e(r[c], r)) : n.push(c + ": " + e(r[c], r))));
858
- if (typeof Ce == "function")
859
- for (var f = 0; f < a.length; f++)
860
- Wr.call(r, a[f]) && n.push("[" + e(a[f]) + "]: " + e(r[a[f]], r));
861
- return n;
862
- }
863
- var zr = ee, re = $n, oa = Bn, ia = fe, me = zr("%WeakMap%", !0), ve = zr("%Map%", !0), la = re("WeakMap.prototype.get", !0), ca = re("WeakMap.prototype.set", !0), fa = re("WeakMap.prototype.has", !0), ua = re("Map.prototype.get", !0), sa = re("Map.prototype.set", !0), pa = re("Map.prototype.has", !0), er = function(r, e) {
864
- for (var t = r, n; (n = t.next) !== null; t = n)
865
- if (n.key === e)
866
- return t.next = n.next, n.next = /** @type {NonNullable<typeof list.next>} */
867
- r.next, r.next = n, n;
868
- }, ya = function(r, e) {
869
- var t = er(r, e);
870
- return t && t.value;
871
- }, da = function(r, e, t) {
872
- var n = er(r, e);
873
- n ? n.value = t : r.next = /** @type {import('.').ListNode<typeof value>} */
874
- {
875
- // eslint-disable-line no-param-reassign, no-extra-parens
876
- key: e,
877
- next: r.next,
878
- value: t
879
- };
880
- }, ma = function(r, e) {
881
- return !!er(r, e);
882
- }, va = function() {
883
- var e, t, n, o = {
884
- assert: function(a) {
885
- if (!o.has(a))
886
- throw new ia("Side channel does not contain " + oa(a));
887
- },
888
- get: function(a) {
889
- if (me && a && (typeof a == "object" || typeof a == "function")) {
890
- if (e)
891
- return la(e, a);
892
- } else if (ve) {
893
- if (t)
894
- return ua(t, a);
895
- } else if (n)
896
- return ya(n, a);
897
- },
898
- has: function(a) {
899
- if (me && a && (typeof a == "object" || typeof a == "function")) {
900
- if (e)
901
- return fa(e, a);
902
- } else if (ve) {
903
- if (t)
904
- return pa(t, a);
905
- } else if (n)
906
- return ma(n, a);
907
- return !1;
908
- },
909
- set: function(a, i) {
910
- me && a && (typeof a == "object" || typeof a == "function") ? (e || (e = new me()), ca(e, a, i)) : ve ? (t || (t = new ve()), sa(t, a, i)) : (n || (n = { key: {}, next: null }), da(n, a, i));
911
- }
912
- };
913
- return o;
914
- }, ga = String.prototype.replace, ha = /%20/g, ke = {
915
- RFC1738: "RFC1738",
916
- RFC3986: "RFC3986"
917
- }, rr = {
918
- default: ke.RFC3986,
919
- formatters: {
920
- RFC1738: function(r) {
921
- return ga.call(r, ha, "+");
922
- },
923
- RFC3986: function(r) {
924
- return String(r);
925
- }
926
- },
927
- RFC1738: ke.RFC1738,
928
- RFC3986: ke.RFC3986
929
- }, ba = rr, Ue = Object.prototype.hasOwnProperty, G = Array.isArray, x = function() {
930
- for (var r = [], e = 0; e < 256; ++e)
931
- r.push("%" + ((e < 16 ? "0" : "") + e.toString(16)).toUpperCase());
932
- return r;
933
- }(), Sa = function(e) {
934
- for (; e.length > 1; ) {
935
- var t = e.pop(), n = t.obj[t.prop];
936
- if (G(n)) {
937
- for (var o = [], a = 0; a < n.length; ++a)
938
- typeof n[a] < "u" && o.push(n[a]);
939
- t.obj[t.prop] = o;
940
- }
941
- }
942
- }, Qr = function(e, t) {
943
- for (var n = t && t.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, o = 0; o < e.length; ++o)
944
- typeof e[o] < "u" && (n[o] = e[o]);
945
- return n;
946
- }, wa = function r(e, t, n) {
947
- if (!t)
948
- return e;
949
- if (typeof t != "object") {
950
- if (G(e))
951
- e.push(t);
952
- else if (e && typeof e == "object")
953
- (n && (n.plainObjects || n.allowPrototypes) || !Ue.call(Object.prototype, t)) && (e[t] = !0);
954
- else
955
- return [e, t];
956
- return e;
957
- }
958
- if (!e || typeof e != "object")
959
- return [e].concat(t);
960
- var o = e;
961
- return G(e) && !G(t) && (o = Qr(e, n)), G(e) && G(t) ? (t.forEach(function(a, i) {
962
- if (Ue.call(e, i)) {
963
- var l = e[i];
964
- l && typeof l == "object" && a && typeof a == "object" ? e[i] = r(l, a, n) : e.push(a);
965
- } else
966
- e[i] = a;
967
- }), e) : Object.keys(t).reduce(function(a, i) {
968
- var l = t[i];
969
- return Ue.call(a, i) ? a[i] = r(a[i], l, n) : a[i] = l, a;
970
- }, o);
971
- }, Aa = function(e, t) {
972
- return Object.keys(t).reduce(function(n, o) {
973
- return n[o] = t[o], n;
974
- }, e);
975
- }, Oa = function(r, e, t) {
976
- var n = r.replace(/\+/g, " ");
977
- if (t === "iso-8859-1")
978
- return n.replace(/%[0-9a-f]{2}/gi, unescape);
979
- try {
980
- return decodeURIComponent(n);
981
- } catch {
982
- return n;
983
- }
984
- }, Ea = function(e, t, n, o, a) {
985
- if (e.length === 0)
986
- return e;
987
- var i = e;
988
- if (typeof e == "symbol" ? i = Symbol.prototype.toString.call(e) : typeof e != "string" && (i = String(e)), n === "iso-8859-1")
989
- return escape(i).replace(/%u[0-9a-f]{4}/gi, function(u) {
990
- return "%26%23" + parseInt(u.slice(2), 16) + "%3B";
991
- });
992
- for (var l = "", c = 0; c < i.length; ++c) {
993
- var f = i.charCodeAt(c);
994
- if (f === 45 || f === 46 || f === 95 || f === 126 || f >= 48 && f <= 57 || f >= 65 && f <= 90 || f >= 97 && f <= 122 || a === ba.RFC1738 && (f === 40 || f === 41)) {
995
- l += i.charAt(c);
996
- continue;
997
- }
998
- if (f < 128) {
999
- l = l + x[f];
1000
- continue;
1001
- }
1002
- if (f < 2048) {
1003
- l = l + (x[192 | f >> 6] + x[128 | f & 63]);
1004
- continue;
1005
- }
1006
- if (f < 55296 || f >= 57344) {
1007
- l = l + (x[224 | f >> 12] + x[128 | f >> 6 & 63] + x[128 | f & 63]);
1008
- continue;
1009
- }
1010
- c += 1, f = 65536 + ((f & 1023) << 10 | i.charCodeAt(c) & 1023), l += x[240 | f >> 18] + x[128 | f >> 12 & 63] + x[128 | f >> 6 & 63] + x[128 | f & 63];
1011
- }
1012
- return l;
1013
- }, Pa = function(e) {
1014
- for (var t = [{ obj: { o: e }, prop: "o" }], n = [], o = 0; o < t.length; ++o)
1015
- for (var a = t[o], i = a.obj[a.prop], l = Object.keys(i), c = 0; c < l.length; ++c) {
1016
- var f = l[c], u = i[f];
1017
- typeof u == "object" && u !== null && n.indexOf(u) === -1 && (t.push({ obj: i, prop: f }), n.push(u));
1018
- }
1019
- return Sa(t), e;
1020
- }, Ia = function(e) {
1021
- return Object.prototype.toString.call(e) === "[object RegExp]";
1022
- }, $a = function(e) {
1023
- return !e || typeof e != "object" ? !1 : !!(e.constructor && e.constructor.isBuffer && e.constructor.isBuffer(e));
1024
- }, xa = function(e, t) {
1025
- return [].concat(e, t);
1026
- }, Fa = function(e, t) {
1027
- if (G(e)) {
1028
- for (var n = [], o = 0; o < e.length; o += 1)
1029
- n.push(t(e[o]));
1030
- return n;
1031
- }
1032
- return t(e);
1033
- }, Kr = {
1034
- arrayToObject: Qr,
1035
- assign: Aa,
1036
- combine: xa,
1037
- compact: Pa,
1038
- decode: Oa,
1039
- encode: Ea,
1040
- isBuffer: $a,
1041
- isRegExp: Ia,
1042
- maybeMap: Fa,
1043
- merge: wa
1044
- }, jr = va, he = Kr, ce = rr, Na = Object.prototype.hasOwnProperty, Jr = {
1045
- brackets: function(e) {
1046
- return e + "[]";
1047
- },
1048
- comma: "comma",
1049
- indices: function(e, t) {
1050
- return e + "[" + t + "]";
1051
- },
1052
- repeat: function(e) {
1053
- return e;
1054
- }
1055
- }, F = Array.isArray, _a = Array.prototype.push, Yr = function(r, e) {
1056
- _a.apply(r, F(e) ? e : [e]);
1057
- }, Da = Date.prototype.toISOString, $r = ce.default, b = {
1058
- addQueryPrefix: !1,
1059
- allowDots: !1,
1060
- allowEmptyArrays: !1,
1061
- arrayFormat: "indices",
1062
- charset: "utf-8",
1063
- charsetSentinel: !1,
1064
- delimiter: "&",
1065
- encode: !0,
1066
- encodeDotInKeys: !1,
1067
- encoder: he.encode,
1068
- encodeValuesOnly: !1,
1069
- format: $r,
1070
- formatter: ce.formatters[$r],
1071
- // deprecated
1072
- indices: !1,
1073
- serializeDate: function(e) {
1074
- return Da.call(e);
1075
- },
1076
- skipNulls: !1,
1077
- strictNullHandling: !1
1078
- }, Ra = function(e) {
1079
- return typeof e == "string" || typeof e == "number" || typeof e == "boolean" || typeof e == "symbol" || typeof e == "bigint";
1080
- }, Le = {}, Ta = function r(e, t, n, o, a, i, l, c, f, u, m, s, v, g, A, E, _, D) {
1081
- for (var d = e, R = D, B = 0, te = !1; (R = R.get(Le)) !== void 0 && !te; ) {
1082
- var q = R.get(e);
1083
- if (B += 1, typeof q < "u") {
1084
- if (q === B)
1085
- throw new RangeError("Cyclic object value");
1086
- te = !0;
1087
- }
1088
- typeof R.get(Le) > "u" && (B = 0);
1089
- }
1090
- if (typeof u == "function" ? d = u(t, d) : d instanceof Date ? d = v(d) : n === "comma" && F(d) && (d = he.maybeMap(d, function(xe) {
1091
- return xe instanceof Date ? v(xe) : xe;
1092
- })), d === null) {
1093
- if (i)
1094
- return f && !E ? f(t, b.encoder, _, "key", g) : t;
1095
- d = "";
1096
- }
1097
- if (Ra(d) || he.isBuffer(d)) {
1098
- if (f) {
1099
- var se = E ? t : f(t, b.encoder, _, "key", g);
1100
- return [A(se) + "=" + A(f(d, b.encoder, _, "value", g))];
1101
- }
1102
- return [A(t) + "=" + A(String(d))];
1103
- }
1104
- var W = [];
1105
- if (typeof d > "u")
1106
- return W;
1107
- var T;
1108
- if (n === "comma" && F(d))
1109
- E && f && (d = he.maybeMap(d, f)), T = [{ value: d.length > 0 ? d.join(",") || null : void 0 }];
1110
- else if (F(u))
1111
- T = u;
1112
- else {
1113
- var pe = Object.keys(d);
1114
- T = m ? pe.sort(m) : pe;
1115
- }
1116
- var z = c ? t.replace(/\./g, "%2E") : t, $ = o && F(d) && d.length === 1 ? z + "[]" : z;
1117
- if (a && F(d) && d.length === 0)
1118
- return $ + "[]";
1119
- for (var C = 0; C < T.length; ++C) {
1120
- var M = T[C], ne = typeof M == "object" && typeof M.value < "u" ? M.value : d[M];
1121
- if (!(l && ne === null)) {
1122
- var $e = s && c ? M.replace(/\./g, "%2E") : M, tt = F(d) ? typeof n == "function" ? n($, $e) : $ : $ + (s ? "." + $e : "[" + $e + "]");
1123
- D.set(e, B);
1124
- var tr = jr();
1125
- tr.set(Le, D), Yr(W, r(
1126
- ne,
1127
- tt,
1128
- n,
1129
- o,
1130
- a,
1131
- i,
1132
- l,
1133
- c,
1134
- n === "comma" && E && F(d) ? null : f,
1135
- u,
1136
- m,
1137
- s,
1138
- v,
1139
- g,
1140
- A,
1141
- E,
1142
- _,
1143
- tr
1144
- ));
1145
- }
1146
- }
1147
- return W;
1148
- }, Ca = function(e) {
1149
- if (!e)
1150
- return b;
1151
- if (typeof e.allowEmptyArrays < "u" && typeof e.allowEmptyArrays != "boolean")
1152
- throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
1153
- if (typeof e.encodeDotInKeys < "u" && typeof e.encodeDotInKeys != "boolean")
1154
- throw new TypeError("`encodeDotInKeys` option can only be `true` or `false`, when provided");
1155
- if (e.encoder !== null && typeof e.encoder < "u" && typeof e.encoder != "function")
1156
- throw new TypeError("Encoder has to be a function.");
1157
- var t = e.charset || b.charset;
1158
- if (typeof e.charset < "u" && e.charset !== "utf-8" && e.charset !== "iso-8859-1")
1159
- throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
1160
- var n = ce.default;
1161
- if (typeof e.format < "u") {
1162
- if (!Na.call(ce.formatters, e.format))
1163
- throw new TypeError("Unknown format option provided.");
1164
- n = e.format;
1165
- }
1166
- var o = ce.formatters[n], a = b.filter;
1167
- (typeof e.filter == "function" || F(e.filter)) && (a = e.filter);
1168
- var i;
1169
- if (e.arrayFormat in Jr ? i = e.arrayFormat : "indices" in e ? i = e.indices ? "indices" : "repeat" : i = b.arrayFormat, "commaRoundTrip" in e && typeof e.commaRoundTrip != "boolean")
1170
- throw new TypeError("`commaRoundTrip` must be a boolean, or absent");
1171
- var l = typeof e.allowDots > "u" ? e.encodeDotInKeys === !0 ? !0 : b.allowDots : !!e.allowDots;
1172
- return {
1173
- addQueryPrefix: typeof e.addQueryPrefix == "boolean" ? e.addQueryPrefix : b.addQueryPrefix,
1174
- allowDots: l,
1175
- allowEmptyArrays: typeof e.allowEmptyArrays == "boolean" ? !!e.allowEmptyArrays : b.allowEmptyArrays,
1176
- arrayFormat: i,
1177
- charset: t,
1178
- charsetSentinel: typeof e.charsetSentinel == "boolean" ? e.charsetSentinel : b.charsetSentinel,
1179
- commaRoundTrip: e.commaRoundTrip,
1180
- delimiter: typeof e.delimiter > "u" ? b.delimiter : e.delimiter,
1181
- encode: typeof e.encode == "boolean" ? e.encode : b.encode,
1182
- encodeDotInKeys: typeof e.encodeDotInKeys == "boolean" ? e.encodeDotInKeys : b.encodeDotInKeys,
1183
- encoder: typeof e.encoder == "function" ? e.encoder : b.encoder,
1184
- encodeValuesOnly: typeof e.encodeValuesOnly == "boolean" ? e.encodeValuesOnly : b.encodeValuesOnly,
1185
- filter: a,
1186
- format: n,
1187
- formatter: o,
1188
- serializeDate: typeof e.serializeDate == "function" ? e.serializeDate : b.serializeDate,
1189
- skipNulls: typeof e.skipNulls == "boolean" ? e.skipNulls : b.skipNulls,
1190
- sort: typeof e.sort == "function" ? e.sort : null,
1191
- strictNullHandling: typeof e.strictNullHandling == "boolean" ? e.strictNullHandling : b.strictNullHandling
1192
- };
1193
- }, Ma = function(r, e) {
1194
- var t = r, n = Ca(e), o, a;
1195
- typeof n.filter == "function" ? (a = n.filter, t = a("", t)) : F(n.filter) && (a = n.filter, o = a);
1196
- var i = [];
1197
- if (typeof t != "object" || t === null)
1198
- return "";
1199
- var l = Jr[n.arrayFormat], c = l === "comma" && n.commaRoundTrip;
1200
- o || (o = Object.keys(t)), n.sort && o.sort(n.sort);
1201
- for (var f = jr(), u = 0; u < o.length; ++u) {
1202
- var m = o[u];
1203
- n.skipNulls && t[m] === null || Yr(i, Ta(
1204
- t[m],
1205
- m,
1206
- l,
1207
- c,
1208
- n.allowEmptyArrays,
1209
- n.strictNullHandling,
1210
- n.skipNulls,
1211
- n.encodeDotInKeys,
1212
- n.encode ? n.encoder : null,
1213
- n.filter,
1214
- n.sort,
1215
- n.allowDots,
1216
- n.serializeDate,
1217
- n.format,
1218
- n.formatter,
1219
- n.encodeValuesOnly,
1220
- n.charset,
1221
- f
1222
- ));
1223
- }
1224
- var s = i.join(n.delimiter), v = n.addQueryPrefix === !0 ? "?" : "";
1225
- return n.charsetSentinel && (n.charset === "iso-8859-1" ? v += "utf8=%26%2310003%3B&" : v += "utf8=%E2%9C%93&"), s.length > 0 ? v + s : "";
1226
- }, Z = Kr, Qe = Object.prototype.hasOwnProperty, ka = Array.isArray, h = {
1227
- allowDots: !1,
1228
- allowEmptyArrays: !1,
1229
- allowPrototypes: !1,
1230
- allowSparse: !1,
1231
- arrayLimit: 20,
1232
- charset: "utf-8",
1233
- charsetSentinel: !1,
1234
- comma: !1,
1235
- decodeDotInKeys: !0,
1236
- decoder: Z.decode,
1237
- delimiter: "&",
1238
- depth: 5,
1239
- duplicates: "combine",
1240
- ignoreQueryPrefix: !1,
1241
- interpretNumericEntities: !1,
1242
- parameterLimit: 1e3,
1243
- parseArrays: !0,
1244
- plainObjects: !1,
1245
- strictNullHandling: !1
1246
- }, Ua = function(r) {
1247
- return r.replace(/&#(\d+);/g, function(e, t) {
1248
- return String.fromCharCode(parseInt(t, 10));
1249
- });
1250
- }, Xr = function(r, e) {
1251
- return r && typeof r == "string" && e.comma && r.indexOf(",") > -1 ? r.split(",") : r;
1252
- }, La = "utf8=%26%2310003%3B", Ba = "utf8=%E2%9C%93", Wa = function(e, t) {
1253
- var n = { __proto__: null }, o = t.ignoreQueryPrefix ? e.replace(/^\?/, "") : e, a = t.parameterLimit === 1 / 0 ? void 0 : t.parameterLimit, i = o.split(t.delimiter, a), l = -1, c, f = t.charset;
1254
- if (t.charsetSentinel)
1255
- for (c = 0; c < i.length; ++c)
1256
- i[c].indexOf("utf8=") === 0 && (i[c] === Ba ? f = "utf-8" : i[c] === La && (f = "iso-8859-1"), l = c, c = i.length);
1257
- for (c = 0; c < i.length; ++c)
1258
- if (c !== l) {
1259
- var u = i[c], m = u.indexOf("]="), s = m === -1 ? u.indexOf("=") : m + 1, v, g;
1260
- s === -1 ? (v = t.decoder(u, h.decoder, f, "key"), g = t.strictNullHandling ? null : "") : (v = t.decoder(u.slice(0, s), h.decoder, f, "key"), g = Z.maybeMap(
1261
- Xr(u.slice(s + 1), t),
1262
- function(E) {
1263
- return t.decoder(E, h.decoder, f, "value");
1264
- }
1265
- )), g && t.interpretNumericEntities && f === "iso-8859-1" && (g = Ua(g)), u.indexOf("[]=") > -1 && (g = ka(g) ? [g] : g);
1266
- var A = Qe.call(n, v);
1267
- A && t.duplicates === "combine" ? n[v] = Z.combine(n[v], g) : (!A || t.duplicates === "last") && (n[v] = g);
1268
- }
1269
- return n;
1270
- }, Ga = function(r, e, t, n) {
1271
- for (var o = n ? e : Xr(e, t), a = r.length - 1; a >= 0; --a) {
1272
- var i, l = r[a];
1273
- if (l === "[]" && t.parseArrays)
1274
- i = t.allowEmptyArrays && o === "" ? [] : [].concat(o);
1275
- else {
1276
- i = t.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
1277
- var c = l.charAt(0) === "[" && l.charAt(l.length - 1) === "]" ? l.slice(1, -1) : l, f = t.decodeDotInKeys ? c.replace(/%2E/g, ".") : c, u = parseInt(f, 10);
1278
- !t.parseArrays && f === "" ? i = { 0: o } : !isNaN(u) && l !== f && String(u) === f && u >= 0 && t.parseArrays && u <= t.arrayLimit ? (i = [], i[u] = o) : f !== "__proto__" && (i[f] = o);
1279
- }
1280
- o = i;
1281
- }
1282
- return o;
1283
- }, Ha = function(e, t, n, o) {
1284
- if (e) {
1285
- var a = n.allowDots ? e.replace(/\.([^.[]+)/g, "[$1]") : e, i = /(\[[^[\]]*])/, l = /(\[[^[\]]*])/g, c = n.depth > 0 && i.exec(a), f = c ? a.slice(0, c.index) : a, u = [];
1286
- if (f) {
1287
- if (!n.plainObjects && Qe.call(Object.prototype, f) && !n.allowPrototypes)
1288
- return;
1289
- u.push(f);
1290
- }
1291
- for (var m = 0; n.depth > 0 && (c = l.exec(a)) !== null && m < n.depth; ) {
1292
- if (m += 1, !n.plainObjects && Qe.call(Object.prototype, c[1].slice(1, -1)) && !n.allowPrototypes)
1293
- return;
1294
- u.push(c[1]);
1295
- }
1296
- return c && u.push("[" + a.slice(c.index) + "]"), Ga(u, t, n, o);
1297
- }
1298
- }, Va = function(e) {
1299
- if (!e)
1300
- return h;
1301
- if (typeof e.allowEmptyArrays < "u" && typeof e.allowEmptyArrays != "boolean")
1302
- throw new TypeError("`allowEmptyArrays` option can only be `true` or `false`, when provided");
1303
- if (typeof e.decodeDotInKeys < "u" && typeof e.decodeDotInKeys != "boolean")
1304
- throw new TypeError("`decodeDotInKeys` option can only be `true` or `false`, when provided");
1305
- if (e.decoder !== null && typeof e.decoder < "u" && typeof e.decoder != "function")
1306
- throw new TypeError("Decoder has to be a function.");
1307
- if (typeof e.charset < "u" && e.charset !== "utf-8" && e.charset !== "iso-8859-1")
1308
- throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");
1309
- var t = typeof e.charset > "u" ? h.charset : e.charset, n = typeof e.duplicates > "u" ? h.duplicates : e.duplicates;
1310
- if (n !== "combine" && n !== "first" && n !== "last")
1311
- throw new TypeError("The duplicates option must be either combine, first, or last");
1312
- var o = typeof e.allowDots > "u" ? e.decodeDotInKeys === !0 ? !0 : h.allowDots : !!e.allowDots;
1313
- return {
1314
- allowDots: o,
1315
- allowEmptyArrays: typeof e.allowEmptyArrays == "boolean" ? !!e.allowEmptyArrays : h.allowEmptyArrays,
1316
- allowPrototypes: typeof e.allowPrototypes == "boolean" ? e.allowPrototypes : h.allowPrototypes,
1317
- allowSparse: typeof e.allowSparse == "boolean" ? e.allowSparse : h.allowSparse,
1318
- arrayLimit: typeof e.arrayLimit == "number" ? e.arrayLimit : h.arrayLimit,
1319
- charset: t,
1320
- charsetSentinel: typeof e.charsetSentinel == "boolean" ? e.charsetSentinel : h.charsetSentinel,
1321
- comma: typeof e.comma == "boolean" ? e.comma : h.comma,
1322
- decodeDotInKeys: typeof e.decodeDotInKeys == "boolean" ? e.decodeDotInKeys : h.decodeDotInKeys,
1323
- decoder: typeof e.decoder == "function" ? e.decoder : h.decoder,
1324
- delimiter: typeof e.delimiter == "string" || Z.isRegExp(e.delimiter) ? e.delimiter : h.delimiter,
1325
- // eslint-disable-next-line no-implicit-coercion, no-extra-parens
1326
- depth: typeof e.depth == "number" || e.depth === !1 ? +e.depth : h.depth,
1327
- duplicates: n,
1328
- ignoreQueryPrefix: e.ignoreQueryPrefix === !0,
1329
- interpretNumericEntities: typeof e.interpretNumericEntities == "boolean" ? e.interpretNumericEntities : h.interpretNumericEntities,
1330
- parameterLimit: typeof e.parameterLimit == "number" ? e.parameterLimit : h.parameterLimit,
1331
- parseArrays: e.parseArrays !== !1,
1332
- plainObjects: typeof e.plainObjects == "boolean" ? e.plainObjects : h.plainObjects,
1333
- strictNullHandling: typeof e.strictNullHandling == "boolean" ? e.strictNullHandling : h.strictNullHandling
1334
- };
1335
- }, qa = function(r, e) {
1336
- var t = Va(e);
1337
- if (r === "" || r === null || typeof r > "u")
1338
- return t.plainObjects ? /* @__PURE__ */ Object.create(null) : {};
1339
- for (var n = typeof r == "string" ? Wa(r, t) : r, o = t.plainObjects ? /* @__PURE__ */ Object.create(null) : {}, a = Object.keys(n), i = 0; i < a.length; ++i) {
1340
- var l = a[i], c = Ha(l, n[l], t, typeof r == "string");
1341
- o = Z.merge(o, c, t);
1342
- }
1343
- return t.allowSparse === !0 ? o : Z.compact(o);
1344
- }, za = Ma, Qa = qa, Ka = rr, ja = {
1345
- formats: Ka,
1346
- parse: Qa,
1347
- stringify: za
1348
- };
1349
- const Zr = /* @__PURE__ */ Ft(ja), Ja = (r) => Zr.parse(r, { ignoreQueryPrefix: !0 }), so = (r) => Zr.stringify(r, { arrayFormat: "brackets" }), Ya = (r = !1) => {
1350
- const [e, t] = Ie(r), n = oe(() => t((i) => !i), []), o = oe(() => t(!0), []), a = oe(() => t(!1), []);
1351
- return [e, n, o, a];
1352
- }, po = (r = !1, e = 2e3, t = window.setTimeout, n = window.clearTimeout) => {
1353
- const [o, a] = Ie(r), i = Se(r), l = Se(), c = oe(() => {
1354
- a(!i.current), l.current && n(l.current), l.current = t(() => a(i.current), e);
1355
- }, [n, e, t]);
1356
- return [o, c];
1357
- }, et = () => {
1358
- const { current: r } = Se(`dom-${$t()}`);
1359
- return r;
1360
- }, yo = () => Se(null), mo = () => {
1361
- const { search: r } = ht();
1362
- return mt(() => Ja(r), [r]);
1363
- }, rt = ({ checked: r = !1, onChange: e, className: t, children: n, type: o, inline: a = !1 }) => {
1364
- const i = et(), l = (u) => e == null ? void 0 : e(u.target.checked, u), c = {
1365
- "form-switch": o === "switch",
1366
- "form-checkbox": o === "checkbox"
1367
- }, f = a ? { display: "inline-block" } : {};
1368
- return /* @__PURE__ */ P("span", { className: I("form-check", c, t), style: f, children: [
1369
- /* @__PURE__ */ y("input", { type: "checkbox", className: "form-check-input", id: i, checked: r, onChange: l }),
1370
- /* @__PURE__ */ y("label", { className: "form-check-label", htmlFor: i, children: n })
39
+ bodyClassName: m({ "p-2": n }),
40
+ children: e
41
+ }
42
+ ) }) }), ee = (e) => y.parse(e, { ignoreQueryPrefix: !0 }), we = (e) => y.stringify(e, { arrayFormat: "brackets" }), re = (e = !1) => {
43
+ const [r, t] = w(e), n = p(() => t((l) => !l), []), s = p(() => t(!0), []), c = p(() => t(!1), []);
44
+ return [r, n, s, c];
45
+ }, Ne = (e = !1, r = 2e3, t = window.setTimeout, n = window.clearTimeout) => {
46
+ const [s, c] = w(e), l = g(e), a = g(), i = p(() => {
47
+ c(!l.current), a.current && n(a.current), a.current = t(() => c(l.current), r);
48
+ }, [n, r, t]);
49
+ return [s, i];
50
+ }, A = () => {
51
+ const { current: e } = g(`dom-${Z()}`);
52
+ return e;
53
+ }, Ce = () => g(null), _e = () => {
54
+ const { search: e } = J();
55
+ return V(() => ee(e), [e]);
56
+ }, S = ({ checked: e = !1, onChange: r, className: t, children: n, type: s, inline: c = !1 }) => {
57
+ const l = A(), a = (h) => r == null ? void 0 : r(h.target.checked, h), i = {
58
+ "form-switch": s === "switch",
59
+ "form-checkbox": s === "checkbox"
60
+ }, u = c ? { display: "inline-block" } : {};
61
+ return /* @__PURE__ */ d("span", { className: m("form-check", i, t), style: u, children: [
62
+ /* @__PURE__ */ o("input", { type: "checkbox", className: "form-check-input", id: l, checked: e, onChange: a }),
63
+ /* @__PURE__ */ o("label", { className: "form-check-label", htmlFor: l, children: n })
1371
64
  ] });
1372
- }, vo = (r) => /* @__PURE__ */ y(rt, { type: "checkbox", ...r }), go = (r) => /* @__PURE__ */ y(rt, { type: "switch", ...r }), Xa = ({ children: r, label: e, className: t = "", labelClassName: n = "", noMargin: o = !1, id: a }) => /* @__PURE__ */ P("div", { className: `${t} ${o ? "" : "mb-3"}`, children: [
1373
- /* @__PURE__ */ y("label", { className: `form-label ${n}`, htmlFor: a, children: e }),
1374
- r
1375
- ] }), ho = ({ children: r, value: e, onChange: t, type: n, required: o, placeholder: a, className: i, labelClassName: l }) => {
1376
- const c = et();
1377
- return /* @__PURE__ */ y(Xa, { label: /* @__PURE__ */ P(Be, { children: [
1378
- r,
65
+ }, ke = (e) => /* @__PURE__ */ o(S, { type: "checkbox", ...e }), ve = (e) => /* @__PURE__ */ o(S, { type: "switch", ...e }), te = ({ children: e, label: r, className: t = "", labelClassName: n = "", noMargin: s = !1, id: c }) => /* @__PURE__ */ d("div", { className: `${t} ${s ? "" : "mb-3"}`, children: [
66
+ /* @__PURE__ */ o("label", { className: `form-label ${n}`, htmlFor: c, children: r }),
67
+ e
68
+ ] }), Te = ({ children: e, value: r, onChange: t, type: n, required: s, placeholder: c, className: l, labelClassName: a }) => {
69
+ const i = A();
70
+ return /* @__PURE__ */ o(te, { label: /* @__PURE__ */ d(C, { children: [
71
+ e,
1379
72
  ":"
1380
- ] }), className: i, labelClassName: l, id: c, children: /* @__PURE__ */ y(
73
+ ] }), className: l, labelClassName: a, id: i, children: /* @__PURE__ */ o(
1381
74
  "input",
1382
75
  {
1383
- id: c,
76
+ id: i,
1384
77
  className: "form-control",
1385
78
  type: n ?? "text",
1386
- value: e,
1387
- required: o ?? !0,
1388
- placeholder: a,
1389
- onChange: (f) => t(f.target.value)
79
+ value: r,
80
+ required: s ?? !0,
81
+ placeholder: c,
82
+ onChange: (u) => t(u.target.value)
1390
83
  }
1391
84
  ) });
1392
- }, Za = 500;
1393
- let be;
1394
- const xr = () => {
1395
- be && clearTimeout(be), be = null;
1396
- }, bo = ({ onChange: r, className: e, large: t = !0, noBorder: n = !1, initialValue: o = "", setTimeout_: a = setTimeout }) => {
1397
- const [i, l] = Ie(o), c = (f, u = Za) => {
1398
- l(f), xr(), be = a(() => {
1399
- r(f), xr();
1400
- }, u);
85
+ }, ne = 500;
86
+ let f;
87
+ const k = () => {
88
+ f && clearTimeout(f), f = null;
89
+ }, Oe = ({ onChange: e, className: r, large: t = !0, noBorder: n = !1, initialValue: s = "", setTimeout_: c = setTimeout }) => {
90
+ const [l, a] = w(s), i = (u, h = ne) => {
91
+ a(u), k(), f = c(() => {
92
+ e(u), k();
93
+ }, h);
1401
94
  };
1402
- return /* @__PURE__ */ P("div", { className: I("search-field", e), children: [
1403
- /* @__PURE__ */ y(
95
+ return /* @__PURE__ */ d("div", { className: m("search-field", r), children: [
96
+ /* @__PURE__ */ o(
1404
97
  "input",
1405
98
  {
1406
99
  type: "text",
1407
- className: I("form-control search-field__input", {
100
+ className: m("form-control search-field__input", {
1408
101
  "form-control-lg": t,
1409
102
  "search-field__input--no-border": n
1410
103
  }),
1411
104
  placeholder: "Search...",
1412
- value: i,
1413
- onChange: (f) => c(f.target.value)
105
+ value: l,
106
+ onChange: (u) => i(u.target.value)
1414
107
  }
1415
108
  ),
1416
- /* @__PURE__ */ y(Pe, { icon: at, className: "search-field__icon" }),
1417
- /* @__PURE__ */ y(
109
+ /* @__PURE__ */ o(b, { icon: F, className: "search-field__icon" }),
110
+ /* @__PURE__ */ o(
1418
111
  "button",
1419
112
  {
1420
113
  "aria-label": "Clear search",
1421
114
  type: "button",
1422
115
  className: "close search-field__close btn-close",
1423
- hidden: i === "",
116
+ hidden: l === "",
1424
117
  id: "search-field__close",
1425
- onClick: () => c("", 0)
118
+ onClick: () => i("", 0)
1426
119
  }
1427
120
  )
1428
121
  ] });
1429
- }, eo = ({
1430
- text: r,
1431
- disabled: e = !1,
122
+ }, oe = ({
123
+ text: e,
124
+ disabled: r = !1,
1432
125
  className: t,
1433
126
  children: n,
1434
- dropdownClassName: o,
1435
- noCaret: a,
1436
- end: i = !1,
1437
- minWidth: l,
1438
- inline: c,
1439
- size: f,
1440
- ...u
127
+ dropdownClassName: s,
128
+ noCaret: c,
129
+ end: l = !1,
130
+ minWidth: a,
131
+ inline: i,
132
+ size: u,
133
+ ...h
1441
134
  }) => {
1442
- const [m, s] = Ya(), v = I("dropdown-btn__toggle", t, {
1443
- "btn-block": !c,
1444
- "dropdown-btn__toggle--with-caret": !a
1445
- }), g = { minWidth: l && `${l}px` };
1446
- return /* @__PURE__ */ P(ut, { isOpen: m, toggle: s, disabled: e, className: o, children: [
1447
- /* @__PURE__ */ y(Nr, { size: f, caret: !a, className: v, color: "primary", ...u, children: r }),
1448
- /* @__PURE__ */ y(_r, { className: "w-100", end: i, style: g, children: n })
135
+ const [x, L] = re(), D = m("dropdown-btn__toggle", t, {
136
+ "btn-block": !i,
137
+ "dropdown-btn__toggle--with-caret": !c
138
+ }), I = { minWidth: a && `${a}px` };
139
+ return /* @__PURE__ */ d(G, { isOpen: x, toggle: L, disabled: r, className: s, children: [
140
+ /* @__PURE__ */ o(T, { size: u, caret: !c, className: D, color: "primary", ...h, children: e }),
141
+ /* @__PURE__ */ o(O, { className: "w-100", end: l, style: I, children: n })
1449
142
  ] });
1450
- }, So = ({ children: r, minWidth: e, label: t = "Options" }) => /* @__PURE__ */ y(
1451
- eo,
143
+ }, ye = ({ children: e, minWidth: r, label: t = "Options" }) => /* @__PURE__ */ o(
144
+ oe,
1452
145
  {
1453
- text: /* @__PURE__ */ y(Pe, { className: "px-1", icon: ot }),
146
+ text: /* @__PURE__ */ o(b, { className: "px-1", icon: E }),
1454
147
  "aria-label": t,
1455
148
  size: "sm",
1456
- minWidth: e,
149
+ minWidth: r,
1457
150
  end: !0,
1458
151
  noCaret: !0,
1459
152
  inline: !0,
1460
- children: r
153
+ children: e
1461
154
  }
1462
- ), ro = ({ children: r, ...e }) => /* @__PURE__ */ y(st, { children: /* @__PURE__ */ y(pt, { className: "nav-pills__nav-link", tag: bt, ...e, children: r }) }), wo = ({ children: r, fill: e = !1, className: t = "" }) => /* @__PURE__ */ y(Ke, { className: `nav-pills__nav p-0 overflow-hidden ${t}`, body: !0, children: /* @__PURE__ */ y(yt, { pills: !0, fill: e, children: vt.map(r, (n) => {
1463
- if (!gt(n) || n.type !== ro)
155
+ ), se = ({ children: e, ...r }) => /* @__PURE__ */ o(q, { children: /* @__PURE__ */ o(Q, { className: "nav-pills__nav-link", tag: X, ...r, children: e }) }), Ae = ({ children: e, fill: r = !1, className: t = "" }) => /* @__PURE__ */ o(_, { className: `nav-pills__nav p-0 overflow-hidden ${t}`, body: !0, children: /* @__PURE__ */ o(j, { pills: !0, fill: r, children: Y.map(e, (n) => {
156
+ if (!z(n) || n.type !== se)
1464
157
  throw new Error("Only NavPillItem children are allowed inside NavPills.");
1465
158
  return n;
1466
- }) }) }), to = (r, e, t) => r !== e ? "ASC" : t ? {
159
+ }) }) }), ce = (e, r, t) => e !== r ? "ASC" : t ? {
1467
160
  ASC: "DESC",
1468
161
  DESC: void 0
1469
- }[t] : "ASC", Ao = (r, { field: e, dir: t }) => !e || !t ? r : r.sort((n, o) => {
1470
- const a = t === "ASC" ? 1 : -1, i = t === "ASC" ? -1 : 1;
1471
- return n[e] > o[e] ? a : i;
1472
- }), Oo = (r) => r.dir ? `${r.field}-${r.dir}` : void 0, Eo = (r) => {
1473
- const [e, t] = r.split("-");
1474
- return { field: e, dir: t };
1475
- }, Po = (r) => {
1476
- const [e, t] = Ie(r), n = oe((o, a) => t({ field: o, dir: a }), []);
1477
- return [e, n];
162
+ }[t] : "ASC", Se = (e, { field: r, dir: t }) => !r || !t ? e : e.sort((n, s) => {
163
+ const c = t === "ASC" ? 1 : -1, l = t === "ASC" ? -1 : 1;
164
+ return n[r] > s[r] ? c : l;
165
+ }), xe = (e) => e.dir ? `${e.field}-${e.dir}` : void 0, Le = (e) => {
166
+ const [r, t] = e.split("-");
167
+ return { field: r, dir: t };
168
+ }, De = (e) => {
169
+ const [r, t] = w(e), n = p((s, c) => t({ field: s, dir: c }), []);
170
+ return [r, n];
1478
171
  };
1479
- function Io({ items: r, order: e, onChange: t, isButton: n = !0, right: o = !1, prefixed: a = !0 }) {
1480
- const i = (l) => () => {
1481
- const c = to(l, e.field, e.dir);
1482
- t(c ? l : void 0, c);
172
+ function Ie({ items: e, order: r, onChange: t, isButton: n = !0, right: s = !1, prefixed: c = !0 }) {
173
+ const l = (a) => () => {
174
+ const i = ce(a, r.field, r.dir);
175
+ t(i ? a : void 0, i);
1483
176
  };
1484
- return /* @__PURE__ */ P(dt, { children: [
1485
- /* @__PURE__ */ P(
1486
- Nr,
177
+ return /* @__PURE__ */ d(U, { children: [
178
+ /* @__PURE__ */ d(
179
+ T,
1487
180
  {
1488
181
  caret: !0,
1489
182
  color: n ? "primary" : "link",
1490
- className: I({
183
+ className: m({
1491
184
  "dropdown-btn__toggle btn-block pe-4 overflow-hidden": n,
1492
185
  "btn-sm p-0": !n
1493
186
  }),
1494
187
  children: [
1495
- !n && /* @__PURE__ */ y(Be, { children: "Order by" }),
1496
- n && !e.field && /* @__PURE__ */ y("i", { children: "Order by..." }),
1497
- n && e.field && /* @__PURE__ */ P(Be, { children: [
1498
- a && "Order by: ",
1499
- r[e.field],
188
+ !n && /* @__PURE__ */ o(C, { children: "Order by" }),
189
+ n && !r.field && /* @__PURE__ */ o("i", { children: "Order by..." }),
190
+ n && r.field && /* @__PURE__ */ d(C, { children: [
191
+ c && "Order by: ",
192
+ e[r.field],
1500
193
  " - ",
1501
- /* @__PURE__ */ y("small", { children: e.dir ?? "DESC" })
194
+ /* @__PURE__ */ o("small", { children: r.dir ?? "DESC" })
1502
195
  ] })
1503
196
  ]
1504
197
  }
1505
198
  ),
1506
- /* @__PURE__ */ P(
1507
- _r,
199
+ /* @__PURE__ */ d(
200
+ O,
1508
201
  {
1509
- end: o,
1510
- className: I("w-100", { "ordering-dropdown__menu--link": !n }),
202
+ end: s,
203
+ className: m("w-100", { "ordering-dropdown__menu--link": !n }),
1511
204
  children: [
1512
- Object.entries(r).map(([l, c]) => /* @__PURE__ */ P(Fe, { active: e.field === l, onClick: i(l), children: [
1513
- c,
1514
- e.field === l && /* @__PURE__ */ y(
1515
- Pe,
205
+ Object.entries(e).map(([a, i]) => /* @__PURE__ */ d(N, { active: r.field === a, onClick: l(a), children: [
206
+ i,
207
+ r.field === a && /* @__PURE__ */ o(
208
+ b,
1516
209
  {
1517
- icon: e.dir === "ASC" ? it : lt,
210
+ icon: r.dir === "ASC" ? H : M,
1518
211
  className: "ordering-dropdown__sort-icon"
1519
212
  }
1520
213
  )
1521
- ] }, l)),
1522
- /* @__PURE__ */ y(Fe, { divider: !0 }),
1523
- /* @__PURE__ */ y(Fe, { disabled: !e.field, onClick: () => t(), children: /* @__PURE__ */ y("i", { children: "Clear selection" }) })
214
+ ] }, a)),
215
+ /* @__PURE__ */ o(N, { divider: !0 }),
216
+ /* @__PURE__ */ o(N, { disabled: !r.field, onClick: () => t(), children: /* @__PURE__ */ o("i", { children: "Clear selection" }) })
1524
217
  ]
1525
218
  }
1526
219
  )
1527
220
  ] });
1528
221
  }
1529
- const $o = "#4696e5", xo = "rgba(70, 150, 229, 0.4)", Fo = "#f77f28", No = "rgba(247, 127, 40, 0.4)", _o = "white", Do = "#161b22", Ro = (r) => {
1530
- var e;
1531
- return (e = document.querySelector("html")) == null ? void 0 : e.setAttribute("data-theme", r);
1532
- }, To = () => {
222
+ const Re = "#4696e5", Fe = "rgba(70, 150, 229, 0.4)", Ee = "#f77f28", He = "rgba(247, 127, 40, 0.4)", Me = "white", Pe = "#161b22", $e = (e) => {
1533
223
  var r;
1534
- return ((r = document.querySelector("html")) == null ? void 0 : r.getAttribute("data-theme")) === "dark";
1535
- }, Co = (r = window.matchMedia.bind(window)) => r("(prefers-color-scheme: dark)").matches ? "dark" : "light";
224
+ return (r = document.querySelector("html")) == null ? void 0 : r.setAttribute("data-theme", e);
225
+ }, Ge = () => {
226
+ var e;
227
+ return ((e = document.querySelector("html")) == null ? void 0 : e.getAttribute("data-theme")) === "dark";
228
+ }, qe = (e = window.matchMedia.bind(window)) => e("(prefers-color-scheme: dark)").matches ? "dark" : "light";
1536
229
  export {
1537
- vo as Checkbox,
1538
- eo as DropdownBtn,
1539
- Fo as HIGHLIGHTED_COLOR,
1540
- No as HIGHLIGHTED_COLOR_ALPHA,
1541
- ho as InputFormGroup,
1542
- Xa as LabeledFormGroup,
1543
- $o as MAIN_COLOR,
1544
- xo as MAIN_COLOR_ALPHA,
1545
- fo as Message,
1546
- ro as NavPillItem,
1547
- wo as NavPills,
1548
- Io as OrderingDropdown,
1549
- Do as PRIMARY_DARK_COLOR,
1550
- _o as PRIMARY_LIGHT_COLOR,
1551
- uo as Result,
1552
- So as RowDropdownBtn,
1553
- bo as SearchField,
1554
- At as SimpleCard,
1555
- go as ToggleSwitch,
1556
- Ro as changeThemeInMarkup,
1557
- to as determineOrderDir,
1558
- Co as getSystemPreferredTheme,
1559
- To as isDarkThemeEnabled,
1560
- Oo as orderToString,
1561
- Ja as parseQuery,
1562
- Ao as sortList,
1563
- Eo as stringToOrder,
1564
- so as stringifyQuery,
1565
- et as useDomId,
1566
- yo as useElementRef,
1567
- Po as useOrder,
1568
- mo as useParsedQuery,
1569
- po as useTimeoutToggle,
1570
- Ya as useToggle
230
+ ke as Checkbox,
231
+ oe as DropdownBtn,
232
+ Ee as HIGHLIGHTED_COLOR,
233
+ He as HIGHLIGHTED_COLOR_ALPHA,
234
+ Te as InputFormGroup,
235
+ te as LabeledFormGroup,
236
+ Re as MAIN_COLOR,
237
+ Fe as MAIN_COLOR_ALPHA,
238
+ ge as Message,
239
+ se as NavPillItem,
240
+ Ae as NavPills,
241
+ Ie as OrderingDropdown,
242
+ Pe as PRIMARY_DARK_COLOR,
243
+ Me as PRIMARY_LIGHT_COLOR,
244
+ be as Result,
245
+ ye as RowDropdownBtn,
246
+ Oe as SearchField,
247
+ K as SimpleCard,
248
+ ve as ToggleSwitch,
249
+ $e as changeThemeInMarkup,
250
+ ce as determineOrderDir,
251
+ qe as getSystemPreferredTheme,
252
+ Ge as isDarkThemeEnabled,
253
+ xe as orderToString,
254
+ ee as parseQuery,
255
+ Se as sortList,
256
+ Le as stringToOrder,
257
+ we as stringifyQuery,
258
+ A as useDomId,
259
+ Ce as useElementRef,
260
+ De as useOrder,
261
+ _e as useParsedQuery,
262
+ Ne as useTimeoutToggle,
263
+ re as useToggle
1571
264
  };