@gear-js/react-hooks
Version:
React hooks used across Gear applications
1,216 lines (1,215 loc) • 294 kB
JavaScript
import { jsx as ce, jsxs as vi, Fragment as gi } from "react/jsx-runtime";
import ie, { isValidElement as ze, cloneElement as Ve, Children as mi, useRef as Pe, createContext as Gr, useContext as Hr, useState as kt, useCallback as fe, useMemo as Ce, useEffect as st } from "react";
import Le, { createPortal as wi } from "react-dom";
import { GearApi as yi, getStateMetadata as xi } from "@gear-js/api";
import { ScProvider as Mi, WsProvider as bi, Keyring as Bn } from "@polkadot/api";
import { useQuery as Ai, useQueryClient as kr, useMutation as Cn } from "@tanstack/react-query";
import { Sails as Ei } from "sails-js";
var Pi = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, yr = Math.ceil, Yt = Math.floor, zt = "[BigNumber Error] ", ln = zt + "Number primitive has more than 15 significant digits: ", _t = 1e14, Y = 14, xr = 9007199254740991, Mr = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13], ue = 1e7, Ht = 1e9;
function Rn(e) {
var s, f, u, a = S.prototype = { constructor: S, toString: null, valueOf: null }, i = new S(1), p = 20, y = 4, E = -7, P = 21, T = -1e7, F = 1e7, U = !1, W = 1, I = 0, B = {
prefix: "",
groupSize: 3,
secondaryGroupSize: 0,
groupSeparator: ",",
decimalSeparator: ".",
fractionGroupSize: 0,
fractionGroupSeparator: " ",
// non-breaking space
suffix: ""
}, L = "0123456789abcdefghijklmnopqrstuvwxyz", q = !0;
function S(v, x) {
var M, A, b, l, t, r, o, c, h = this;
if (!(h instanceof S)) return new S(v, x);
if (x == null) {
if (v && v._isBigNumber === !0) {
h.s = v.s, !v.c || v.e > F ? h.c = h.e = null : v.e < T ? h.c = [h.e = 0] : (h.e = v.e, h.c = v.c.slice());
return;
}
if ((r = typeof v == "number") && v * 0 == 0) {
if (h.s = 1 / v < 0 ? (v = -v, -1) : 1, v === ~~v) {
for (l = 0, t = v; t >= 10; t /= 10, l++) ;
l > F ? h.c = h.e = null : (h.e = l, h.c = [v]);
return;
}
c = String(v);
} else {
if (!Pi.test(c = String(v))) return u(h, c, r);
h.s = c.charCodeAt(0) == 45 ? (c = c.slice(1), -1) : 1;
}
(l = c.indexOf(".")) > -1 && (c = c.replace(".", "")), (t = c.search(/e/i)) > 0 ? (l < 0 && (l = t), l += +c.slice(t + 1), c = c.substring(0, t)) : l < 0 && (l = c.length);
} else {
if (it(x, 2, L.length, "Base"), x == 10 && q)
return h = new S(v), Q(h, p + h.e + 1, y);
if (c = String(v), r = typeof v == "number") {
if (v * 0 != 0) return u(h, c, r, x);
if (h.s = 1 / v < 0 ? (c = c.slice(1), -1) : 1, S.DEBUG && c.replace(/^0\.0*|\./, "").length > 15)
throw Error(ln + v);
} else
h.s = c.charCodeAt(0) === 45 ? (c = c.slice(1), -1) : 1;
for (M = L.slice(0, x), l = t = 0, o = c.length; t < o; t++)
if (M.indexOf(A = c.charAt(t)) < 0) {
if (A == ".") {
if (t > l) {
l = o;
continue;
}
} else if (!b && (c == c.toUpperCase() && (c = c.toLowerCase()) || c == c.toLowerCase() && (c = c.toUpperCase()))) {
b = !0, t = -1, l = 0;
continue;
}
return u(h, String(v), r, x);
}
r = !1, c = f(c, x, 10, h.s), (l = c.indexOf(".")) > -1 ? c = c.replace(".", "") : l = c.length;
}
for (t = 0; c.charCodeAt(t) === 48; t++) ;
for (o = c.length; c.charCodeAt(--o) === 48; ) ;
if (c = c.slice(t, ++o)) {
if (o -= t, r && S.DEBUG && o > 15 && (v > xr || v !== Yt(v)))
throw Error(ln + h.s * v);
if ((l = l - t - 1) > F)
h.c = h.e = null;
else if (l < T)
h.c = [h.e = 0];
else {
if (h.e = l, h.c = [], t = (l + 1) % Y, l < 0 && (t += Y), t < o) {
for (t && h.c.push(+c.slice(0, t)), o -= Y; t < o; )
h.c.push(+c.slice(t, t += Y));
t = Y - (c = c.slice(t)).length;
} else
t -= o;
for (; t--; c += "0") ;
h.c.push(+c);
}
} else
h.c = [h.e = 0];
}
S.clone = Rn, S.ROUND_UP = 0, S.ROUND_DOWN = 1, S.ROUND_CEIL = 2, S.ROUND_FLOOR = 3, S.ROUND_HALF_UP = 4, S.ROUND_HALF_DOWN = 5, S.ROUND_HALF_EVEN = 6, S.ROUND_HALF_CEIL = 7, S.ROUND_HALF_FLOOR = 8, S.EUCLID = 9, S.config = S.set = function(v) {
var x, M;
if (v != null)
if (typeof v == "object") {
if (v.hasOwnProperty(x = "DECIMAL_PLACES") && (M = v[x], it(M, 0, Ht, x), p = M), v.hasOwnProperty(x = "ROUNDING_MODE") && (M = v[x], it(M, 0, 8, x), y = M), v.hasOwnProperty(x = "EXPONENTIAL_AT") && (M = v[x], M && M.pop ? (it(M[0], -Ht, 0, x), it(M[1], 0, Ht, x), E = M[0], P = M[1]) : (it(M, -Ht, Ht, x), E = -(P = M < 0 ? -M : M))), v.hasOwnProperty(x = "RANGE"))
if (M = v[x], M && M.pop)
it(M[0], -Ht, -1, x), it(M[1], 1, Ht, x), T = M[0], F = M[1];
else if (it(M, -Ht, Ht, x), M)
T = -(F = M < 0 ? -M : M);
else
throw Error(zt + x + " cannot be zero: " + M);
if (v.hasOwnProperty(x = "CRYPTO"))
if (M = v[x], M === !!M)
if (M)
if (typeof crypto < "u" && crypto && (crypto.getRandomValues || crypto.randomBytes))
U = M;
else
throw U = !M, Error(zt + "crypto unavailable");
else
U = M;
else
throw Error(zt + x + " not true or false: " + M);
if (v.hasOwnProperty(x = "MODULO_MODE") && (M = v[x], it(M, 0, 9, x), W = M), v.hasOwnProperty(x = "POW_PRECISION") && (M = v[x], it(M, 0, Ht, x), I = M), v.hasOwnProperty(x = "FORMAT"))
if (M = v[x], typeof M == "object") B = M;
else throw Error(zt + x + " not an object: " + M);
if (v.hasOwnProperty(x = "ALPHABET"))
if (M = v[x], typeof M == "string" && !/^.?$|[+\-.\s]|(.).*\1/.test(M))
q = M.slice(0, 10) == "0123456789", L = M;
else
throw Error(zt + x + " invalid: " + M);
} else
throw Error(zt + "Object expected: " + v);
return {
DECIMAL_PLACES: p,
ROUNDING_MODE: y,
EXPONENTIAL_AT: [E, P],
RANGE: [T, F],
CRYPTO: U,
MODULO_MODE: W,
POW_PRECISION: I,
FORMAT: B,
ALPHABET: L
};
}, S.isBigNumber = function(v) {
if (!v || v._isBigNumber !== !0) return !1;
if (!S.DEBUG) return !0;
var x, M, A = v.c, b = v.e, l = v.s;
t: if ({}.toString.call(A) == "[object Array]") {
if ((l === 1 || l === -1) && b >= -Ht && b <= Ht && b === Yt(b)) {
if (A[0] === 0) {
if (b === 0 && A.length === 1) return !0;
break t;
}
if (x = (b + 1) % Y, x < 1 && (x += Y), String(A[0]).length == x) {
for (x = 0; x < A.length; x++)
if (M = A[x], M < 0 || M >= _t || M !== Yt(M)) break t;
if (M !== 0) return !0;
}
}
} else if (A === null && b === null && (l === null || l === 1 || l === -1))
return !0;
throw Error(zt + "Invalid BigNumber: " + v);
}, S.maximum = S.max = function() {
return K(arguments, -1);
}, S.minimum = S.min = function() {
return K(arguments, 1);
}, S.random = (function() {
var v = 9007199254740992, x = Math.random() * v & 2097151 ? function() {
return Yt(Math.random() * v);
} : function() {
return (Math.random() * 1073741824 | 0) * 8388608 + (Math.random() * 8388608 | 0);
};
return function(M) {
var A, b, l, t, r, o = 0, c = [], h = new S(i);
if (M == null ? M = p : it(M, 0, Ht), t = yr(M / Y), U)
if (crypto.getRandomValues) {
for (A = crypto.getRandomValues(new Uint32Array(t *= 2)); o < t; )
r = A[o] * 131072 + (A[o + 1] >>> 11), r >= 9e15 ? (b = crypto.getRandomValues(new Uint32Array(2)), A[o] = b[0], A[o + 1] = b[1]) : (c.push(r % 1e14), o += 2);
o = t / 2;
} else if (crypto.randomBytes) {
for (A = crypto.randomBytes(t *= 7); o < t; )
r = (A[o] & 31) * 281474976710656 + A[o + 1] * 1099511627776 + A[o + 2] * 4294967296 + A[o + 3] * 16777216 + (A[o + 4] << 16) + (A[o + 5] << 8) + A[o + 6], r >= 9e15 ? crypto.randomBytes(7).copy(A, o) : (c.push(r % 1e14), o += 7);
o = t / 7;
} else
throw U = !1, Error(zt + "crypto unavailable");
if (!U)
for (; o < t; )
r = x(), r < 9e15 && (c[o++] = r % 1e14);
for (t = c[--o], M %= Y, t && M && (r = Mr[Y - M], c[o] = Yt(t / r) * r); c[o] === 0; c.pop(), o--) ;
if (o < 0)
c = [l = 0];
else {
for (l = -1; c[0] === 0; c.splice(0, 1), l -= Y) ;
for (o = 1, r = c[0]; r >= 10; r /= 10, o++) ;
o < Y && (l -= Y - o);
}
return h.e = l, h.c = c, h;
};
})(), S.sum = function() {
for (var v = 1, x = arguments, M = new S(x[0]); v < x.length; ) M = M.plus(x[v++]);
return M;
}, f = /* @__PURE__ */ (function() {
var v = "0123456789";
function x(M, A, b, l) {
for (var t, r = [0], o, c = 0, h = M.length; c < h; ) {
for (o = r.length; o--; r[o] *= A) ;
for (r[0] += l.indexOf(M.charAt(c++)), t = 0; t < r.length; t++)
r[t] > b - 1 && (r[t + 1] == null && (r[t + 1] = 0), r[t + 1] += r[t] / b | 0, r[t] %= b);
}
return r.reverse();
}
return function(M, A, b, l, t) {
var r, o, c, h, w, m, d, n, g = M.indexOf("."), D = p, O = y;
for (g >= 0 && (h = I, I = 0, M = M.replace(".", ""), n = new S(A), m = n.pow(M.length - g), I = h, n.c = x(
re(Xt(m.c), m.e, "0"),
10,
b,
v
), n.e = n.c.length), d = x(M, A, b, t ? (r = L, v) : (r = v, L)), c = h = d.length; d[--h] == 0; d.pop()) ;
if (!d[0]) return r.charAt(0);
if (g < 0 ? --c : (m.c = d, m.e = c, m.s = l, m = s(m, n, D, O, b), d = m.c, w = m.r, c = m.e), o = c + D + 1, g = d[o], h = b / 2, w = w || o < 0 || d[o + 1] != null, w = O < 4 ? (g != null || w) && (O == 0 || O == (m.s < 0 ? 3 : 2)) : g > h || g == h && (O == 4 || w || O == 6 && d[o - 1] & 1 || O == (m.s < 0 ? 8 : 7)), o < 1 || !d[0])
M = w ? re(r.charAt(1), -D, r.charAt(0)) : r.charAt(0);
else {
if (d.length = o, w)
for (--b; ++d[--o] > b; )
d[o] = 0, o || (++c, d = [1].concat(d));
for (h = d.length; !d[--h]; ) ;
for (g = 0, M = ""; g <= h; M += r.charAt(d[g++])) ;
M = re(M, c, r.charAt(0));
}
return M;
};
})(), s = /* @__PURE__ */ (function() {
function v(A, b, l) {
var t, r, o, c, h = 0, w = A.length, m = b % ue, d = b / ue | 0;
for (A = A.slice(); w--; )
o = A[w] % ue, c = A[w] / ue | 0, t = d * o + c * m, r = m * o + t % ue * ue + h, h = (r / l | 0) + (t / ue | 0) + d * c, A[w] = r % l;
return h && (A = [h].concat(A)), A;
}
function x(A, b, l, t) {
var r, o;
if (l != t)
o = l > t ? 1 : -1;
else
for (r = o = 0; r < l; r++)
if (A[r] != b[r]) {
o = A[r] > b[r] ? 1 : -1;
break;
}
return o;
}
function M(A, b, l, t) {
for (var r = 0; l--; )
A[l] -= r, r = A[l] < b[l] ? 1 : 0, A[l] = r * t + A[l] - b[l];
for (; !A[0] && A.length > 1; A.splice(0, 1)) ;
}
return function(A, b, l, t, r) {
var o, c, h, w, m, d, n, g, D, O, N, G, H, k, Z, z, C, rt = A.s == b.s ? 1 : -1, J = A.c, V = b.c;
if (!J || !J[0] || !V || !V[0])
return new S(
// Return NaN if either NaN, or both Infinity or 0.
!A.s || !b.s || (J ? V && J[0] == V[0] : !V) ? NaN : (
// Return ±0 if x is ±0 or y is ±Infinity, or return ±Infinity as y is ±0.
J && J[0] == 0 || !V ? rt * 0 : rt / 0
)
);
for (g = new S(rt), D = g.c = [], c = A.e - b.e, rt = l + c + 1, r || (r = _t, c = Qt(A.e / Y) - Qt(b.e / Y), rt = rt / Y | 0), h = 0; V[h] == (J[h] || 0); h++) ;
if (V[h] > (J[h] || 0) && c--, rt < 0)
D.push(1), w = !0;
else {
for (k = J.length, z = V.length, h = 0, rt += 2, m = Yt(r / (V[0] + 1)), m > 1 && (V = v(V, m, r), J = v(J, m, r), z = V.length, k = J.length), H = z, O = J.slice(0, z), N = O.length; N < z; O[N++] = 0) ;
C = V.slice(), C = [0].concat(C), Z = V[0], V[1] >= r / 2 && Z++;
do {
if (m = 0, o = x(V, O, z, N), o < 0) {
if (G = O[0], z != N && (G = G * r + (O[1] || 0)), m = Yt(G / Z), m > 1)
for (m >= r && (m = r - 1), d = v(V, m, r), n = d.length, N = O.length; x(d, O, n, N) == 1; )
m--, M(d, z < n ? C : V, n, r), n = d.length, o = 1;
else
m == 0 && (o = m = 1), d = V.slice(), n = d.length;
if (n < N && (d = [0].concat(d)), M(O, d, N, r), N = O.length, o == -1)
for (; x(V, O, z, N) < 1; )
m++, M(O, z < N ? C : V, N, r), N = O.length;
} else o === 0 && (m++, O = [0]);
D[h++] = m, O[0] ? O[N++] = J[H] || 0 : (O = [J[H]], N = 1);
} while ((H++ < k || O[0] != null) && rt--);
w = O[0] != null, D[0] || D.splice(0, 1);
}
if (r == _t) {
for (h = 1, rt = D[0]; rt >= 10; rt /= 10, h++) ;
Q(g, l + (g.e = h + c * Y - 1) + 1, t, w);
} else
g.e = c, g.r = +w;
return g;
};
})();
function j(v, x, M, A) {
var b, l, t, r, o;
if (M == null ? M = y : it(M, 0, 8), !v.c) return v.toString();
if (b = v.c[0], t = v.e, x == null)
o = Xt(v.c), o = A == 1 || A == 2 && (t <= E || t >= P) ? Ge(o, t) : re(o, t, "0");
else if (v = Q(new S(v), x, M), l = v.e, o = Xt(v.c), r = o.length, A == 1 || A == 2 && (x <= l || l <= E)) {
for (; r < x; o += "0", r++) ;
o = Ge(o, l);
} else if (x -= t + (A === 2 && l > t), o = re(o, l, "0"), l + 1 > r) {
if (--x > 0) for (o += "."; x--; o += "0") ;
} else if (x += l - r, x > 0)
for (l + 1 == r && (o += "."); x--; o += "0") ;
return v.s < 0 && b ? "-" + o : o;
}
function K(v, x) {
for (var M, A, b = 1, l = new S(v[0]); b < v.length; b++)
A = new S(v[b]), (!A.s || (M = le(l, A)) === x || M === 0 && l.s === x) && (l = A);
return l;
}
function R(v, x, M) {
for (var A = 1, b = x.length; !x[--b]; x.pop()) ;
for (b = x[0]; b >= 10; b /= 10, A++) ;
return (M = A + M * Y - 1) > F ? v.c = v.e = null : M < T ? v.c = [v.e = 0] : (v.e = M, v.c = x), v;
}
u = /* @__PURE__ */ (function() {
var v = /^(-?)0([xbo])(?=\w[\w.]*$)/i, x = /^([^.]+)\.$/, M = /^\.([^.]+)$/, A = /^-?(Infinity|NaN)$/, b = /^\s*\+(?=[\w.])|^\s+|\s+$/g;
return function(l, t, r, o) {
var c, h = r ? t : t.replace(b, "");
if (A.test(h))
l.s = isNaN(h) ? null : h < 0 ? -1 : 1;
else {
if (!r && (h = h.replace(v, function(w, m, d) {
return c = (d = d.toLowerCase()) == "x" ? 16 : d == "b" ? 2 : 8, !o || o == c ? m : w;
}), o && (c = o, h = h.replace(x, "$1").replace(M, "0.$1")), t != h))
return new S(h, c);
if (S.DEBUG)
throw Error(zt + "Not a" + (o ? " base " + o : "") + " number: " + t);
l.s = null;
}
l.c = l.e = null;
};
})();
function Q(v, x, M, A) {
var b, l, t, r, o, c, h, w = v.c, m = Mr;
if (w) {
t: {
for (b = 1, r = w[0]; r >= 10; r /= 10, b++) ;
if (l = x - b, l < 0)
l += Y, t = x, o = w[c = 0], h = Yt(o / m[b - t - 1] % 10);
else if (c = yr((l + 1) / Y), c >= w.length)
if (A) {
for (; w.length <= c; w.push(0)) ;
o = h = 0, b = 1, l %= Y, t = l - Y + 1;
} else
break t;
else {
for (o = r = w[c], b = 1; r >= 10; r /= 10, b++) ;
l %= Y, t = l - Y + b, h = t < 0 ? 0 : Yt(o / m[b - t - 1] % 10);
}
if (A = A || x < 0 || // Are there any non-zero digits after the rounding digit?
// The expression n % pows10[d - j - 1] returns all digits of n to the right
// of the digit at j, e.g. if n is 908714 and j is 2, the expression gives 714.
w[c + 1] != null || (t < 0 ? o : o % m[b - t - 1]), A = M < 4 ? (h || A) && (M == 0 || M == (v.s < 0 ? 3 : 2)) : h > 5 || h == 5 && (M == 4 || A || M == 6 && // Check whether the digit to the left of the rounding digit is odd.
(l > 0 ? t > 0 ? o / m[b - t] : 0 : w[c - 1]) % 10 & 1 || M == (v.s < 0 ? 8 : 7)), x < 1 || !w[0])
return w.length = 0, A ? (x -= v.e + 1, w[0] = m[(Y - x % Y) % Y], v.e = -x || 0) : w[0] = v.e = 0, v;
if (l == 0 ? (w.length = c, r = 1, c--) : (w.length = c + 1, r = m[Y - l], w[c] = t > 0 ? Yt(o / m[b - t] % m[t]) * r : 0), A)
for (; ; )
if (c == 0) {
for (l = 1, t = w[0]; t >= 10; t /= 10, l++) ;
for (t = w[0] += r, r = 1; t >= 10; t /= 10, r++) ;
l != r && (v.e++, w[0] == _t && (w[0] = 1));
break;
} else {
if (w[c] += r, w[c] != _t) break;
w[c--] = 0, r = 1;
}
for (l = w.length; w[--l] === 0; w.pop()) ;
}
v.e > F ? v.c = v.e = null : v.e < T && (v.c = [v.e = 0]);
}
return v;
}
function et(v) {
var x, M = v.e;
return M === null ? v.toString() : (x = Xt(v.c), x = M <= E || M >= P ? Ge(x, M) : re(x, M, "0"), v.s < 0 ? "-" + x : x);
}
return a.absoluteValue = a.abs = function() {
var v = new S(this);
return v.s < 0 && (v.s = 1), v;
}, a.comparedTo = function(v, x) {
return le(this, new S(v, x));
}, a.decimalPlaces = a.dp = function(v, x) {
var M, A, b, l = this;
if (v != null)
return it(v, 0, Ht), x == null ? x = y : it(x, 0, 8), Q(new S(l), v + l.e + 1, x);
if (!(M = l.c)) return null;
if (A = ((b = M.length - 1) - Qt(this.e / Y)) * Y, b = M[b]) for (; b % 10 == 0; b /= 10, A--) ;
return A < 0 && (A = 0), A;
}, a.dividedBy = a.div = function(v, x) {
return s(this, new S(v, x), p, y);
}, a.dividedToIntegerBy = a.idiv = function(v, x) {
return s(this, new S(v, x), 0, 1);
}, a.exponentiatedBy = a.pow = function(v, x) {
var M, A, b, l, t, r, o, c, h, w = this;
if (v = new S(v), v.c && !v.isInteger())
throw Error(zt + "Exponent not an integer: " + et(v));
if (x != null && (x = new S(x)), r = v.e > 14, !w.c || !w.c[0] || w.c[0] == 1 && !w.e && w.c.length == 1 || !v.c || !v.c[0])
return h = new S(Math.pow(+et(w), r ? v.s * (2 - We(v)) : +et(v))), x ? h.mod(x) : h;
if (o = v.s < 0, x) {
if (x.c ? !x.c[0] : !x.s) return new S(NaN);
A = !o && w.isInteger() && x.isInteger(), A && (w = w.mod(x));
} else {
if (v.e > 9 && (w.e > 0 || w.e < -1 || (w.e == 0 ? w.c[0] > 1 || r && w.c[1] >= 24e7 : w.c[0] < 8e13 || r && w.c[0] <= 9999975e7)))
return l = w.s < 0 && We(v) ? -0 : 0, w.e > -1 && (l = 1 / l), new S(o ? 1 / l : l);
I && (l = yr(I / Y + 2));
}
for (r ? (M = new S(0.5), o && (v.s = 1), c = We(v)) : (b = Math.abs(+et(v)), c = b % 2), h = new S(i); ; ) {
if (c) {
if (h = h.times(w), !h.c) break;
l ? h.c.length > l && (h.c.length = l) : A && (h = h.mod(x));
}
if (b) {
if (b = Yt(b / 2), b === 0) break;
c = b % 2;
} else if (v = v.times(M), Q(v, v.e + 1, 1), v.e > 14)
c = We(v);
else {
if (b = +et(v), b === 0) break;
c = b % 2;
}
w = w.times(w), l ? w.c && w.c.length > l && (w.c.length = l) : A && (w = w.mod(x));
}
return A ? h : (o && (h = i.div(h)), x ? h.mod(x) : l ? Q(h, I, y, t) : h);
}, a.integerValue = function(v) {
var x = new S(this);
return v == null ? v = y : it(v, 0, 8), Q(x, x.e + 1, v);
}, a.isEqualTo = a.eq = function(v, x) {
return le(this, new S(v, x)) === 0;
}, a.isFinite = function() {
return !!this.c;
}, a.isGreaterThan = a.gt = function(v, x) {
return le(this, new S(v, x)) > 0;
}, a.isGreaterThanOrEqualTo = a.gte = function(v, x) {
return (x = le(this, new S(v, x))) === 1 || x === 0;
}, a.isInteger = function() {
return !!this.c && Qt(this.e / Y) > this.c.length - 2;
}, a.isLessThan = a.lt = function(v, x) {
return le(this, new S(v, x)) < 0;
}, a.isLessThanOrEqualTo = a.lte = function(v, x) {
return (x = le(this, new S(v, x))) === -1 || x === 0;
}, a.isNaN = function() {
return !this.s;
}, a.isNegative = function() {
return this.s < 0;
}, a.isPositive = function() {
return this.s > 0;
}, a.isZero = function() {
return !!this.c && this.c[0] == 0;
}, a.minus = function(v, x) {
var M, A, b, l, t = this, r = t.s;
if (v = new S(v, x), x = v.s, !r || !x) return new S(NaN);
if (r != x)
return v.s = -x, t.plus(v);
var o = t.e / Y, c = v.e / Y, h = t.c, w = v.c;
if (!o || !c) {
if (!h || !w) return h ? (v.s = -x, v) : new S(w ? t : NaN);
if (!h[0] || !w[0])
return w[0] ? (v.s = -x, v) : new S(h[0] ? t : (
// IEEE 754 (2008) 6.3: n - n = -0 when rounding to -Infinity
y == 3 ? -0 : 0
));
}
if (o = Qt(o), c = Qt(c), h = h.slice(), r = o - c) {
for ((l = r < 0) ? (r = -r, b = h) : (c = o, b = w), b.reverse(), x = r; x--; b.push(0)) ;
b.reverse();
} else
for (A = (l = (r = h.length) < (x = w.length)) ? r : x, r = x = 0; x < A; x++)
if (h[x] != w[x]) {
l = h[x] < w[x];
break;
}
if (l && (b = h, h = w, w = b, v.s = -v.s), x = (A = w.length) - (M = h.length), x > 0) for (; x--; h[M++] = 0) ;
for (x = _t - 1; A > r; ) {
if (h[--A] < w[A]) {
for (M = A; M && !h[--M]; h[M] = x) ;
--h[M], h[A] += _t;
}
h[A] -= w[A];
}
for (; h[0] == 0; h.splice(0, 1), --c) ;
return h[0] ? R(v, h, c) : (v.s = y == 3 ? -1 : 1, v.c = [v.e = 0], v);
}, a.modulo = a.mod = function(v, x) {
var M, A, b = this;
return v = new S(v, x), !b.c || !v.s || v.c && !v.c[0] ? new S(NaN) : !v.c || b.c && !b.c[0] ? new S(b) : (W == 9 ? (A = v.s, v.s = 1, M = s(b, v, 0, 3), v.s = A, M.s *= A) : M = s(b, v, 0, W), v = b.minus(M.times(v)), !v.c[0] && W == 1 && (v.s = b.s), v);
}, a.multipliedBy = a.times = function(v, x) {
var M, A, b, l, t, r, o, c, h, w, m, d, n, g, D, O = this, N = O.c, G = (v = new S(v, x)).c;
if (!N || !G || !N[0] || !G[0])
return !O.s || !v.s || N && !N[0] && !G || G && !G[0] && !N ? v.c = v.e = v.s = null : (v.s *= O.s, !N || !G ? v.c = v.e = null : (v.c = [0], v.e = 0)), v;
for (A = Qt(O.e / Y) + Qt(v.e / Y), v.s *= O.s, o = N.length, w = G.length, o < w && (n = N, N = G, G = n, b = o, o = w, w = b), b = o + w, n = []; b--; n.push(0)) ;
for (g = _t, D = ue, b = w; --b >= 0; ) {
for (M = 0, m = G[b] % D, d = G[b] / D | 0, t = o, l = b + t; l > b; )
c = N[--t] % D, h = N[t] / D | 0, r = d * c + h * m, c = m * c + r % D * D + n[l] + M, M = (c / g | 0) + (r / D | 0) + d * h, n[l--] = c % g;
n[l] = M;
}
return M ? ++A : n.splice(0, 1), R(v, n, A);
}, a.negated = function() {
var v = new S(this);
return v.s = -v.s || null, v;
}, a.plus = function(v, x) {
var M, A = this, b = A.s;
if (v = new S(v, x), x = v.s, !b || !x) return new S(NaN);
if (b != x)
return v.s = -x, A.minus(v);
var l = A.e / Y, t = v.e / Y, r = A.c, o = v.c;
if (!l || !t) {
if (!r || !o) return new S(b / 0);
if (!r[0] || !o[0]) return o[0] ? v : new S(r[0] ? A : b * 0);
}
if (l = Qt(l), t = Qt(t), r = r.slice(), b = l - t) {
for (b > 0 ? (t = l, M = o) : (b = -b, M = r), M.reverse(); b--; M.push(0)) ;
M.reverse();
}
for (b = r.length, x = o.length, b - x < 0 && (M = o, o = r, r = M, x = b), b = 0; x; )
b = (r[--x] = r[x] + o[x] + b) / _t | 0, r[x] = _t === r[x] ? 0 : r[x] % _t;
return b && (r = [b].concat(r), ++t), R(v, r, t);
}, a.precision = a.sd = function(v, x) {
var M, A, b, l = this;
if (v != null && v !== !!v)
return it(v, 1, Ht), x == null ? x = y : it(x, 0, 8), Q(new S(l), v, x);
if (!(M = l.c)) return null;
if (b = M.length - 1, A = b * Y + 1, b = M[b]) {
for (; b % 10 == 0; b /= 10, A--) ;
for (b = M[0]; b >= 10; b /= 10, A++) ;
}
return v && l.e + 1 > A && (A = l.e + 1), A;
}, a.shiftedBy = function(v) {
return it(v, -xr, xr), this.times("1e" + v);
}, a.squareRoot = a.sqrt = function() {
var v, x, M, A, b, l = this, t = l.c, r = l.s, o = l.e, c = p + 4, h = new S("0.5");
if (r !== 1 || !t || !t[0])
return new S(!r || r < 0 && (!t || t[0]) ? NaN : t ? l : 1 / 0);
if (r = Math.sqrt(+et(l)), r == 0 || r == 1 / 0 ? (x = Xt(t), (x.length + o) % 2 == 0 && (x += "0"), r = Math.sqrt(+x), o = Qt((o + 1) / 2) - (o < 0 || o % 2), r == 1 / 0 ? x = "5e" + o : (x = r.toExponential(), x = x.slice(0, x.indexOf("e") + 1) + o), M = new S(x)) : M = new S(r + ""), M.c[0]) {
for (o = M.e, r = o + c, r < 3 && (r = 0); ; )
if (b = M, M = h.times(b.plus(s(l, b, c, 1))), Xt(b.c).slice(0, r) === (x = Xt(M.c)).slice(0, r))
if (M.e < o && --r, x = x.slice(r - 3, r + 1), x == "9999" || !A && x == "4999") {
if (!A && (Q(b, b.e + p + 2, 0), b.times(b).eq(l))) {
M = b;
break;
}
c += 4, r += 4, A = 1;
} else {
(!+x || !+x.slice(1) && x.charAt(0) == "5") && (Q(M, M.e + p + 2, 1), v = !M.times(M).eq(l));
break;
}
}
return Q(M, M.e + p + 1, y, v);
}, a.toExponential = function(v, x) {
return v != null && (it(v, 0, Ht), v++), j(this, v, x, 1);
}, a.toFixed = function(v, x) {
return v != null && (it(v, 0, Ht), v = v + this.e + 1), j(this, v, x);
}, a.toFormat = function(v, x, M) {
var A, b = this;
if (M == null)
v != null && x && typeof x == "object" ? (M = x, x = null) : v && typeof v == "object" ? (M = v, v = x = null) : M = B;
else if (typeof M != "object")
throw Error(zt + "Argument not an object: " + M);
if (A = b.toFixed(v, x), b.c) {
var l, t = A.split("."), r = +M.groupSize, o = +M.secondaryGroupSize, c = M.groupSeparator || "", h = t[0], w = t[1], m = b.s < 0, d = m ? h.slice(1) : h, n = d.length;
if (o && (l = r, r = o, o = l, n -= l), r > 0 && n > 0) {
for (l = n % r || r, h = d.substr(0, l); l < n; l += r) h += c + d.substr(l, r);
o > 0 && (h += c + d.slice(l)), m && (h = "-" + h);
}
A = w ? h + (M.decimalSeparator || "") + ((o = +M.fractionGroupSize) ? w.replace(
new RegExp("\\d{" + o + "}\\B", "g"),
"$&" + (M.fractionGroupSeparator || "")
) : w) : h;
}
return (M.prefix || "") + A + (M.suffix || "");
}, a.toFraction = function(v) {
var x, M, A, b, l, t, r, o, c, h, w, m, d = this, n = d.c;
if (v != null && (r = new S(v), !r.isInteger() && (r.c || r.s !== 1) || r.lt(i)))
throw Error(zt + "Argument " + (r.isInteger() ? "out of range: " : "not an integer: ") + et(r));
if (!n) return new S(d);
for (x = new S(i), c = M = new S(i), A = o = new S(i), m = Xt(n), l = x.e = m.length - d.e - 1, x.c[0] = Mr[(t = l % Y) < 0 ? Y + t : t], v = !v || r.comparedTo(x) > 0 ? l > 0 ? x : c : r, t = F, F = 1 / 0, r = new S(m), o.c[0] = 0; h = s(r, x, 0, 1), b = M.plus(h.times(A)), b.comparedTo(v) != 1; )
M = A, A = b, c = o.plus(h.times(b = c)), o = b, x = r.minus(h.times(b = x)), r = b;
return b = s(v.minus(M), A, 0, 1), o = o.plus(b.times(c)), M = M.plus(b.times(A)), o.s = c.s = d.s, l = l * 2, w = s(c, A, l, y).minus(d).abs().comparedTo(
s(o, M, l, y).minus(d).abs()
) < 1 ? [c, A] : [o, M], F = t, w;
}, a.toNumber = function() {
return +et(this);
}, a.toPrecision = function(v, x) {
return v != null && it(v, 1, Ht), j(this, v, x, 2);
}, a.toString = function(v) {
var x, M = this, A = M.s, b = M.e;
return b === null ? A ? (x = "Infinity", A < 0 && (x = "-" + x)) : x = "NaN" : (v == null ? x = b <= E || b >= P ? Ge(Xt(M.c), b) : re(Xt(M.c), b, "0") : v === 10 && q ? (M = Q(new S(M), p + b + 1, y), x = re(Xt(M.c), M.e, "0")) : (it(v, 2, L.length, "Base"), x = f(re(Xt(M.c), b, "0"), 10, v, A, !0)), A < 0 && M.c[0] && (x = "-" + x)), x;
}, a.valueOf = a.toJSON = function() {
return et(this);
}, a._isBigNumber = !0, a[Symbol.toStringTag] = "BigNumber", a[Symbol.for("nodejs.util.inspect.custom")] = a.valueOf, e != null && S.set(e), S;
}
function Qt(e) {
var s = e | 0;
return e > 0 || e === s ? s : s - 1;
}
function Xt(e) {
for (var s, f, u = 1, a = e.length, i = e[0] + ""; u < a; ) {
for (s = e[u++] + "", f = Y - s.length; f--; s = "0" + s) ;
i += s;
}
for (a = i.length; i.charCodeAt(--a) === 48; ) ;
return i.slice(0, a + 1 || 1);
}
function le(e, s) {
var f, u, a = e.c, i = s.c, p = e.s, y = s.s, E = e.e, P = s.e;
if (!p || !y) return null;
if (f = a && !a[0], u = i && !i[0], f || u) return f ? u ? 0 : -y : p;
if (p != y) return p;
if (f = p < 0, u = E == P, !a || !i) return u ? 0 : !a ^ f ? 1 : -1;
if (!u) return E > P ^ f ? 1 : -1;
for (y = (E = a.length) < (P = i.length) ? E : P, p = 0; p < y; p++) if (a[p] != i[p]) return a[p] > i[p] ^ f ? 1 : -1;
return E == P ? 0 : E > P ^ f ? 1 : -1;
}
function it(e, s, f, u) {
if (e < s || e > f || e !== Yt(e))
throw Error(zt + (u || "Argument") + (typeof e == "number" ? e < s || e > f ? " out of range: " : " not an integer: " : " not a primitive number: ") + String(e));
}
function We(e) {
var s = e.c.length - 1;
return Qt(e.e / Y) == s && e.c[s] % 2 != 0;
}
function Ge(e, s) {
return (e.length > 1 ? e.charAt(0) + "." + e.slice(1) : e) + (s < 0 ? "e" : "e+") + s;
}
function re(e, s, f) {
var u, a;
if (s < 0) {
for (a = f + "."; ++s; a += f) ;
e = a + e;
} else if (u = e.length, ++s > u) {
for (a = f, s -= u; --s; a += f) ;
e += a;
} else s < u && (e = e.slice(0, s) + "." + e.slice(s));
return e;
}
var de = Rn(), Re = /* @__PURE__ */ ((e) => (e.INFO = "info", e.ERROR = "error", e.LOADING = "loading", e.SUCCESS = "success", e))(Re || {});
const $e = {
style: { marginBottom: "10px" },
isClosed: !0,
timeout: 5e3
}, Si = {
...$e,
type: Re.INFO
}, De = {
...$e,
type: Re.ERROR
}, qr = {
...$e,
type: Re.SUCCESS
}, Ti = {
...$e,
type: Re.LOADING,
isClosed: !1,
timeout: 0
}, Fn = 137;
let Oi = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict", Ni = (e = 21) => {
let s = "", f = e | 0;
for (; f--; )
s += Oi[Math.random() * 64 | 0];
return s;
};
function Di(e) {
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
}
var In = { exports: {} }, ot = In.exports = {}, te, ee;
function Br() {
throw new Error("setTimeout has not been defined");
}
function Cr() {
throw new Error("clearTimeout has not been defined");
}
(function() {
try {
typeof setTimeout == "function" ? te = setTimeout : te = Br;
} catch {
te = Br;
}
try {
typeof clearTimeout == "function" ? ee = clearTimeout : ee = Cr;
} catch {
ee = Cr;
}
})();
function Un(e) {
if (te === setTimeout)
return setTimeout(e, 0);
if ((te === Br || !te) && setTimeout)
return te = setTimeout, setTimeout(e, 0);
try {
return te(e, 0);
} catch {
try {
return te.call(null, e, 0);
} catch {
return te.call(this, e, 0);
}
}
}
function Bi(e) {
if (ee === clearTimeout)
return clearTimeout(e);
if ((ee === Cr || !ee) && clearTimeout)
return ee = clearTimeout, clearTimeout(e);
try {
return ee(e);
} catch {
try {
return ee.call(null, e);
} catch {
return ee.call(this, e);
}
}
}
var se = [], Ae = !1, me, Xe = -1;
function Ci() {
!Ae || !me || (Ae = !1, me.length ? se = me.concat(se) : Xe = -1, se.length && Ln());
}
function Ln() {
if (!Ae) {
var e = Un(Ci);
Ae = !0;
for (var s = se.length; s; ) {
for (me = se, se = []; ++Xe < s; )
me && me[Xe].run();
Xe = -1, s = se.length;
}
me = null, Ae = !1, Bi(e);
}
}
ot.nextTick = function(e) {
var s = new Array(arguments.length - 1);
if (arguments.length > 1)
for (var f = 1; f < arguments.length; f++)
s[f - 1] = arguments[f];
se.push(new Wn(e, s)), se.length === 1 && !Ae && Un(Ln);
};
function Wn(e, s) {
this.fun = e, this.array = s;
}
Wn.prototype.run = function() {
this.fun.apply(null, this.array);
};
ot.title = "browser";
ot.browser = !0;
ot.env = {};
ot.argv = [];
ot.version = "";
ot.versions = {};
function oe() {
}
ot.on = oe;
ot.addListener = oe;
ot.once = oe;
ot.off = oe;
ot.removeListener = oe;
ot.removeAllListeners = oe;
ot.emit = oe;
ot.prependListener = oe;
ot.prependOnceListener = oe;
ot.listeners = function(e) {
return [];
};
ot.binding = function(e) {
throw new Error("process.binding is not supported");
};
ot.cwd = function() {
return "/";
};
ot.chdir = function(e) {
throw new Error("process.chdir is not supported");
};
ot.umask = function() {
return 0;
};
var Ri = In.exports;
const jt = /* @__PURE__ */ Di(Ri);
function Rr() {
return Rr = Object.assign ? Object.assign.bind() : function(e) {
for (var s = 1; s < arguments.length; s++) {
var f = arguments[s];
for (var u in f) ({}).hasOwnProperty.call(f, u) && (e[u] = f[u]);
}
return e;
}, Rr.apply(null, arguments);
}
function Gn(e, s) {
if (e == null) return {};
var f = {};
for (var u in e) if ({}.hasOwnProperty.call(e, u)) {
if (s.indexOf(u) !== -1) continue;
f[u] = e[u];
}
return f;
}
function Fr(e, s) {
return Fr = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(f, u) {
return f.__proto__ = u, f;
}, Fr(e, s);
}
function Hn(e, s) {
e.prototype = Object.create(s.prototype), e.prototype.constructor = e, Fr(e, s);
}
function kn(e) {
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
}
var He = { exports: {} }, ke = { exports: {} }, _ = {};
/** @license React v16.13.1
* react-is.production.min.js
*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
var hn;
function Fi() {
if (hn) return _;
hn = 1;
var e = typeof Symbol == "function" && Symbol.for, s = e ? Symbol.for("react.element") : 60103, f = e ? Symbol.for("react.portal") : 60106, u = e ? Symbol.for("react.fragment") : 60107, a = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, p = e ? Symbol.for("react.provider") : 60109, y = e ? Symbol.for("react.context") : 60110, E = e ? Symbol.for("react.async_mode") : 60111, P = e ? Symbol.for("react.concurrent_mode") : 60111, T = e ? Symbol.for("react.forward_ref") : 60112, F = e ? Symbol.for("react.suspense") : 60113, U = e ? Symbol.for("react.suspense_list") : 60120, W = e ? Symbol.for("react.memo") : 60115, I = e ? Symbol.for("react.lazy") : 60116, B = e ? Symbol.for("react.block") : 60121, L = e ? Symbol.for("react.fundamental") : 60117, q = e ? Symbol.for("react.responder") : 60118, S = e ? Symbol.for("react.scope") : 60119;
function j(R) {
if (typeof R == "object" && R !== null) {
var Q = R.$$typeof;
switch (Q) {
case s:
switch (R = R.type, R) {
case E:
case P:
case u:
case i:
case a:
case F:
return R;
default:
switch (R = R && R.$$typeof, R) {
case y:
case T:
case I:
case W:
case p:
return R;
default:
return Q;
}
}
case f:
return Q;
}
}
}
function K(R) {
return j(R) === P;
}
return _.AsyncMode = E, _.ConcurrentMode = P, _.ContextConsumer = y, _.ContextProvider = p, _.Element = s, _.ForwardRef = T, _.Fragment = u, _.Lazy = I, _.Memo = W, _.Portal = f, _.Profiler = i, _.StrictMode = a, _.Suspense = F, _.isAsyncMode = function(R) {
return K(R) || j(R) === E;
}, _.isConcurrentMode = K, _.isContextConsumer = function(R) {
return j(R) === y;
}, _.isContextProvider = function(R) {
return j(R) === p;
}, _.isElement = function(R) {
return typeof R == "object" && R !== null && R.$$typeof === s;
}, _.isForwardRef = function(R) {
return j(R) === T;
}, _.isFragment = function(R) {
return j(R) === u;
}, _.isLazy = function(R) {
return j(R) === I;
}, _.isMemo = function(R) {
return j(R) === W;
}, _.isPortal = function(R) {
return j(R) === f;
}, _.isProfiler = function(R) {
return j(R) === i;
}, _.isStrictMode = function(R) {
return j(R) === a;
}, _.isSuspense = function(R) {
return j(R) === F;
}, _.isValidElementType = function(R) {
return typeof R == "string" || typeof R == "function" || R === u || R === P || R === i || R === a || R === F || R === U || typeof R == "object" && R !== null && (R.$$typeof === I || R.$$typeof === W || R.$$typeof === p || R.$$typeof === y || R.$$typeof === T || R.$$typeof === L || R.$$typeof === q || R.$$typeof === S || R.$$typeof === B);
}, _.typeOf = j, _;
}
var $ = {}, dn;
function Ii() {
return dn || (dn = 1, jt.env.NODE_ENV !== "production" && (function() {
var e = typeof Symbol == "function" && Symbol.for, s = e ? Symbol.for("react.element") : 60103, f = e ? Symbol.for("react.portal") : 60106, u = e ? Symbol.for("react.fragment") : 60107, a = e ? Symbol.for("react.strict_mode") : 60108, i = e ? Symbol.for("react.profiler") : 60114, p = e ? Symbol.for("react.provider") : 60109, y = e ? Symbol.for("react.context") : 60110, E = e ? Symbol.for("react.async_mode") : 60111, P = e ? Symbol.for("react.concurrent_mode") : 60111, T = e ? Symbol.for("react.forward_ref") : 60112, F = e ? Symbol.for("react.suspense") : 60113, U = e ? Symbol.for("react.suspense_list") : 60120, W = e ? Symbol.for("react.memo") : 60115, I = e ? Symbol.for("react.lazy") : 60116, B = e ? Symbol.for("react.block") : 60121, L = e ? Symbol.for("react.fundamental") : 60117, q = e ? Symbol.for("react.responder") : 60118, S = e ? Symbol.for("react.scope") : 60119;
function j(C) {
return typeof C == "string" || typeof C == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill.
C === u || C === P || C === i || C === a || C === F || C === U || typeof C == "object" && C !== null && (C.$$typeof === I || C.$$typeof === W || C.$$typeof === p || C.$$typeof === y || C.$$typeof === T || C.$$typeof === L || C.$$typeof === q || C.$$typeof === S || C.$$typeof === B);
}
function K(C) {
if (typeof C == "object" && C !== null) {
var rt = C.$$typeof;
switch (rt) {
case s:
var J = C.type;
switch (J) {
case E:
case P:
case u:
case i:
case a:
case F:
return J;
default:
var V = J && J.$$typeof;
switch (V) {
case y:
case T:
case I:
case W:
case p:
return V;
default:
return rt;
}
}
case f:
return rt;
}
}
}
var R = E, Q = P, et = y, v = p, x = s, M = T, A = u, b = I, l = W, t = f, r = i, o = a, c = F, h = !1;
function w(C) {
return h || (h = !0, console.warn("The ReactIs.isAsyncMode() alias has been deprecated, and will be removed in React 17+. Update your code to use ReactIs.isConcurrentMode() instead. It has the exact same API.")), m(C) || K(C) === E;
}
function m(C) {
return K(C) === P;
}
function d(C) {
return K(C) === y;
}
function n(C) {
return K(C) === p;
}
function g(C) {
return typeof C == "object" && C !== null && C.$$typeof === s;
}
function D(C) {
return K(C) === T;
}
function O(C) {
return K(C) === u;
}
function N(C) {
return K(C) === I;
}
function G(C) {
return K(C) === W;
}
function H(C) {
return K(C) === f;
}
function k(C) {
return K(C) === i;
}
function Z(C) {
return K(C) === a;
}
function z(C) {
return K(C) === F;
}
$.AsyncMode = R, $.ConcurrentMode = Q, $.ContextConsumer = et, $.ContextProvider = v, $.Element = x, $.ForwardRef = M, $.Fragment = A, $.Lazy = b, $.Memo = l, $.Portal = t, $.Profiler = r, $.StrictMode = o, $.Suspense = c, $.isAsyncMode = w, $.isConcurrentMode = m, $.isContextConsumer = d, $.isContextProvider = n, $.isElement = g, $.isForwardRef = D, $.isFragment = O, $.isLazy = N, $.isMemo = G, $.isPortal = H, $.isProfiler = k, $.isStrictMode = Z, $.isSuspense = z, $.isValidElementType = j, $.typeOf = K;
})()), $;
}
var pn;
function qn() {
return pn || (pn = 1, jt.env.NODE_ENV === "production" ? ke.exports = Fi() : ke.exports = Ii()), ke.exports;
}
/*
object-assign
(c) Sindre Sorhus
@license MIT
*/
var br, vn;
function Ui() {
if (vn) return br;
vn = 1;
var e = Object.getOwnPropertySymbols, s = Object.prototype.hasOwnProperty, f = Object.prototype.propertyIsEnumerable;
function u(i) {
if (i == null)
throw new TypeError("Object.assign cannot be called with null or undefined");
return Object(i);
}
function a() {
try {
if (!Object.assign)
return !1;
var i = new String("abc");
if (i[5] = "de", Object.getOwnPropertyNames(i)[0] === "5")
return !1;
for (var p = {}, y = 0; y < 10; y++)
p["_" + String.fromCharCode(y)] = y;
var E = Object.getOwnPropertyNames(p).map(function(T) {
return p[T];
});
if (E.join("") !== "0123456789")
return !1;
var P = {};
return "abcdefghijklmnopqrst".split("").forEach(function(T) {
P[T] = T;
}), Object.keys(Object.assign({}, P)).join("") === "abcdefghijklmnopqrst";
} catch {
return !1;
}
}
return br = a() ? Object.assign : function(i, p) {
for (var y, E = u(i), P, T = 1; T < arguments.length; T++) {
y = Object(arguments[T]);
for (var F in y)
s.call(y, F) && (E[F] = y[F]);
if (e) {
P = e(y);
for (var U = 0; U < P.length; U++)
f.call(y, P[U]) && (E[P[U]] = y[P[U]]);
}
}
return E;
}, br;
}
var Ar, gn;
function jr() {
if (gn) return Ar;
gn = 1;
var e = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED";
return Ar = e, Ar;
}
var Er, mn;
function jn() {
return mn || (mn = 1, Er = Function.call.bind(Object.prototype.hasOwnProperty)), Er;
}
var Pr, wn;
function Li() {
if (wn) return Pr;
wn = 1;
var e = function() {
};
if (jt.env.NODE_ENV !== "production") {
var s = /* @__PURE__ */ jr(), f = {}, u = /* @__PURE__ */ jn();
e = function(i) {
var p = "Warning: " + i;
typeof console < "u" && console.error(p);
try {
throw new Error(p);
} catch {
}
};
}
function a(i, p, y, E, P) {
if (jt.env.NODE_ENV !== "production") {
for (var T in i)
if (u(i, T)) {
var F;
try {
if (typeof i[T] != "function") {
var U = Error(
(E || "React class") + ": " + y + " type `" + T + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof i[T] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`."
);
throw U.name = "Invariant Violation", U;
}
F = i[T](p, T, E, y, null, s);
} catch (I) {
F = I;
}
if (F && !(F instanceof Error) && e(
(E || "React class") + ": type specification of " + y + " `" + T + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof F + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)."
), F instanceof Error && !(F.message in f)) {
f[F.message] = !0;
var W = P ? P() : "";
e(
"Failed " + y + " type: " + F.message + (W ?? "")
);
}
}
}
}
return a.resetWarningCache = function() {
jt.env.NODE_ENV !== "production" && (f = {});
}, Pr = a, Pr;
}
var Sr, yn;
function Wi() {
if (yn) return Sr;
yn = 1;
var e = qn(), s = Ui(), f = /* @__PURE__ */ jr(), u = /* @__PURE__ */ jn(), a = /* @__PURE__ */ Li(), i = function() {
};
jt.env.NODE_ENV !== "production" && (i = function(y) {
var E = "Warning: " + y;
typeof console < "u" && console.error(E);
try {
throw new Error(E);
} catch {
}
});
function p() {
return null;
}
return Sr = function(y, E) {
var P = typeof Symbol == "function" && Symbol.iterator, T = "@@iterator";
function F(m) {
var d = m && (P && m[P] || m[T]);
if (typeof d == "function")
return d;
}
var U = "<<anonymous>>", W = {
array: q("array"),
bigint: q("bigint"),
bool: q("boolean"),
func: q("function"),
number: q("number"),
object: q("object"),
string: q("string"),
symbol: q("symbol"),
any: S(),
arrayOf: j,
element: K(),
elementType: R(),
instanceOf: Q,
node: M(),
objectOf: v,
oneOf: et,
oneOfType: x,
shape: b,
exact: l
};
function I(m, d) {
return m === d ? m !== 0 || 1 / m === 1 / d : m !== m && d !== d;
}
function B(m, d) {
this.message = m, this.data = d && typeof d == "object" ? d : {}, this.stack = "";
}
B.prototype = Error.prototype;
function L(m) {
if (jt.env.NODE_ENV !== "production")
var d = {}, n = 0;
function g(O, N, G, H, k, Z, z) {
if (H = H || U, Z = Z || G, z !== f) {
if (E) {
var C = new Error(
"Calling PropTypes validators directly is not supported by the `prop-types` package. Use `PropTypes.checkPropTypes()` to call them. Read more at http://fb.me/use-check-prop-types"
);
throw C.name = "Invariant Violation", C;
} else if (jt.env.NODE_ENV !== "production" && typeof console < "u") {
var rt = H + ":" + G;
!d[rt] && // Avoid spamming the console because they are often not actionable except for lib authors
n < 3 && (i(
"You are manually calling a React.PropTypes validation function for the `" + Z + "` prop on `" + H + "`. This is deprecated and will throw in the standalone `prop-types` package. You may be seeing this warning due to a third-party PropTypes library. See https://fb.me/react-warning-dont-call-proptypes for details."
), d[rt] = !0, n++);
}
}
return N[G] == null ? O ? N[G] === null ? new B("The " + k + " `" + Z + "` is marked as required " + ("in `" + H + "`, but its value is `null`.")) : new B("The " + k + " `" + Z + "` is marked as required in " + ("`" + H + "`, but its value is `undefined`.")) : null : m(N, G, H, k, Z);
}
var D = g.bind(null, !1);
return D.isRequired = g.bind(null, !0), D;
}
function q(m) {
function d(n, g, D, O, N, G) {
var H = n[g], k = o(H);
if (k !== m) {
var Z = c(H);
return new B(
"Invalid " + O + " `" + N + "` of type " + ("`" + Z + "` supplied to `" + D + "`, expected ") + ("`" + m + "`."),
{ expectedType: m }
);
}
return null;
}
return L(d);
}
function S() {
return L(p);
}
function j(m) {
function d(n, g, D, O, N) {
if (typeof m != "function")
return new B("Property `" + N + "` of component `" + D + "` has invalid PropType notation inside arrayOf.");
var G = n[g];
if (!Array.isArray(G)) {
var H = o(G);
return new B("Invalid " + O + " `" + N + "` of type " + ("`" + H + "` supplied to `" + D + "`, expected an array."));
}
for (var k = 0; k < G.length; k++) {
var Z = m(G, k, D, O, N + "[" + k + "]", f);
if (Z instanceof Error)
return Z;
}
return null;
}
return L(d);
}
function K() {
function m(d, n, g, D, O) {
var N = d[n];
if (!y(N)) {
var G = o(N);
return new B("Invalid " + D + " `" + O + "` of type " + ("`" + G + "` supplied to `" + g + "`, expected a single ReactElement."));
}
return null;
}
return L(m);
}
function R() {
function m(d, n, g, D, O) {
var N = d[n];
if (!e.isValidElementType(N)) {
var G = o(N);
return new B("Invalid " + D + " `" + O + "` of type " + ("`" + G + "` supplied to `" + g + "`, expected a single ReactElement type."));
}
return null;
}
return L(m);
}
function Q(m) {
function d(n, g, D, O, N) {
if (!(n[g] instanceof m)) {
var G = m.name || U, H = w(n[g]);
return new B("Invalid " + O + " `" + N + "` of type " + ("`" + H + "` supplied to `" + D + "`, expected ") + ("instance of `" + G + "`."));
}
return null;
}
return L(d);
}
function et(m) {
if (!Array.isArray(m))
return jt.env.NODE_ENV !== "production" && (arguments.length > 1 ? i(
"Invalid arguments supplied to oneOf, expected an array, got " + arguments.length + " arguments. A common mistake is to write oneOf(x, y, z) instead of oneOf([x, y, z])."
) : i("Invalid argument supplied to oneOf, expected an array.")), p;
function d(n, g, D, O, N) {