UNPKG

@gear-js/react-hooks

Version:
1,216 lines 294 kB
import { jsx as ce, jsxs as vi, Fragment as mi } from "react/jsx-runtime"; import ie, { isValidElement as Xe, cloneElement as Ve, Children as gi, useRef as Te, createContext as Hr, useContext as Gr, useState as jt, useCallback as ue, useMemo as Be, useEffect as st } from "react"; import Le, { createPortal as wi } from "react-dom"; import { GearApi as yi, getStateMetadata as Mi } from "@gear-js/api"; import { ScProvider as xi, WsProvider as bi, Keyring as Nn } from "@polkadot/api"; import { useQuery as Ei, useQueryClient as jr, useMutation as Bn } from "@tanstack/react-query"; import { Sails as Ai } from "sails-js"; var Ti = /^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i, yr = Math.ceil, Jt = Math.floor, Xt = "[BigNumber Error] ", hn = Xt + "Number primitive has more than 15 significant digits: ", _t = 1e14, J = 14, Mr = 9007199254740991, xr = [1, 10, 100, 1e3, 1e4, 1e5, 1e6, 1e7, 1e8, 1e9, 1e10, 1e11, 1e12, 1e13], fe = 1e7, Gt = 1e9; function In(e) { var s, u, f, a = S.prototype = { constructor: S, toString: null, valueOf: null }, i = new S(1), p = 20, y = 4, A = -7, T = 21, O = -1e7, R = 1e7, k = !1, U = 1, F = 0, N = { prefix: "", groupSize: 3, secondaryGroupSize: 0, groupSeparator: ",", decimalSeparator: ".", fractionGroupSize: 0, fractionGroupSeparator: " ", // non-breaking space suffix: "" }, L = "0123456789abcdefghijklmnopqrstuvwxyz", j = !0; function S(v, M) { var x, E, b, h, t, r, o, c, l = this; if (!(l instanceof S)) return new S(v, M); if (M == null) { if (v && v._isBigNumber === !0) { l.s = v.s, !v.c || v.e > R ? l.c = l.e = null : v.e < O ? l.c = [l.e = 0] : (l.e = v.e, l.c = v.c.slice()); return; } if ((r = typeof v == "number") && v * 0 == 0) { if (l.s = 1 / v < 0 ? (v = -v, -1) : 1, v === ~~v) { for (h = 0, t = v; t >= 10; t /= 10, h++) ; h > R ? l.c = l.e = null : (l.e = h, l.c = [v]); return; } c = String(v); } else { if (!Ti.test(c = String(v))) return f(l, c, r); l.s = c.charCodeAt(0) == 45 ? (c = c.slice(1), -1) : 1; } (h = c.indexOf(".")) > -1 && (c = c.replace(".", "")), (t = c.search(/e/i)) > 0 ? (h < 0 && (h = t), h += +c.slice(t + 1), c = c.substring(0, t)) : h < 0 && (h = c.length); } else { if (it(M, 2, L.length, "Base"), M == 10 && j) return l = new S(v), K(l, p + l.e + 1, y); if (c = String(v), r = typeof v == "number") { if (v * 0 != 0) return f(l, c, r, M); if (l.s = 1 / v < 0 ? (c = c.slice(1), -1) : 1, S.DEBUG && c.replace(/^0\.0*|\./, "").length > 15) throw Error(hn + v); } else l.s = c.charCodeAt(0) === 45 ? (c = c.slice(1), -1) : 1; for (x = L.slice(0, M), h = t = 0, o = c.length; t < o; t++) if (x.indexOf(E = c.charAt(t)) < 0) { if (E == ".") { if (t > h) { h = o; continue; } } else if (!b && (c == c.toUpperCase() && (c = c.toLowerCase()) || c == c.toLowerCase() && (c = c.toUpperCase()))) { b = !0, t = -1, h = 0; continue; } return f(l, String(v), r, M); } r = !1, c = u(c, M, 10, l.s), (h = c.indexOf(".")) > -1 ? c = c.replace(".", "") : h = 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 > Mr || v !== Jt(v))) throw Error(hn + l.s * v); if ((h = h - t - 1) > R) l.c = l.e = null; else if (h < O) l.c = [l.e = 0]; else { if (l.e = h, l.c = [], t = (h + 1) % J, h < 0 && (t += J), t < o) { for (t && l.c.push(+c.slice(0, t)), o -= J; t < o; ) l.c.push(+c.slice(t, t += J)); t = J - (c = c.slice(t)).length; } else t -= o; for (; t--; c += "0") ; l.c.push(+c); } } else l.c = [l.e = 0]; } S.clone = In, 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 M, x; if (v != null) if (typeof v == "object") { if (v.hasOwnProperty(M = "DECIMAL_PLACES") && (x = v[M], it(x, 0, Gt, M), p = x), v.hasOwnProperty(M = "ROUNDING_MODE") && (x = v[M], it(x, 0, 8, M), y = x), v.hasOwnProperty(M = "EXPONENTIAL_AT") && (x = v[M], x && x.pop ? (it(x[0], -Gt, 0, M), it(x[1], 0, Gt, M), A = x[0], T = x[1]) : (it(x, -Gt, Gt, M), A = -(T = x < 0 ? -x : x))), v.hasOwnProperty(M = "RANGE")) if (x = v[M], x && x.pop) it(x[0], -Gt, -1, M), it(x[1], 1, Gt, M), O = x[0], R = x[1]; else if (it(x, -Gt, Gt, M), x) O = -(R = x < 0 ? -x : x); else throw Error(Xt + M + " cannot be zero: " + x); if (v.hasOwnProperty(M = "CRYPTO")) if (x = v[M], x === !!x) if (x) if (typeof crypto < "u" && crypto && (crypto.getRandomValues || crypto.randomBytes)) k = x; else throw k = !x, Error(Xt + "crypto unavailable"); else k = x; else throw Error(Xt + M + " not true or false: " + x); if (v.hasOwnProperty(M = "MODULO_MODE") && (x = v[M], it(x, 0, 9, M), U = x), v.hasOwnProperty(M = "POW_PRECISION") && (x = v[M], it(x, 0, Gt, M), F = x), v.hasOwnProperty(M = "FORMAT")) if (x = v[M], typeof x == "object") N = x; else throw Error(Xt + M + " not an object: " + x); if (v.hasOwnProperty(M = "ALPHABET")) if (x = v[M], typeof x == "string" && !/^.?$|[+\-.\s]|(.).*\1/.test(x)) j = x.slice(0, 10) == "0123456789", L = x; else throw Error(Xt + M + " invalid: " + x); } else throw Error(Xt + "Object expected: " + v); return { DECIMAL_PLACES: p, ROUNDING_MODE: y, EXPONENTIAL_AT: [A, T], RANGE: [O, R], CRYPTO: k, MODULO_MODE: U, POW_PRECISION: F, FORMAT: N, ALPHABET: L }; }, S.isBigNumber = function(v) { if (!v || v._isBigNumber !== !0) return !1; if (!S.DEBUG) return !0; var M, x, E = v.c, b = v.e, h = v.s; t: if ({}.toString.call(E) == "[object Array]") { if ((h === 1 || h === -1) && b >= -Gt && b <= Gt && b === Jt(b)) { if (E[0] === 0) { if (b === 0 && E.length === 1) return !0; break t; } if (M = (b + 1) % J, M < 1 && (M += J), String(E[0]).length == M) { for (M = 0; M < E.length; M++) if (x = E[M], x < 0 || x >= _t || x !== Jt(x)) break t; if (x !== 0) return !0; } } } else if (E === null && b === null && (h === null || h === 1 || h === -1)) return !0; throw Error(Xt + "Invalid BigNumber: " + v); }, S.maximum = S.max = function() { return q(arguments, -1); }, S.minimum = S.min = function() { return q(arguments, 1); }, S.random = function() { var v = 9007199254740992, M = Math.random() * v & 2097151 ? function() { return Jt(Math.random() * v); } : function() { return (Math.random() * 1073741824 | 0) * 8388608 + (Math.random() * 8388608 | 0); }; return function(x) { var E, b, h, t, r, o = 0, c = [], l = new S(i); if (x == null ? x = p : it(x, 0, Gt), t = yr(x / J), k) if (crypto.getRandomValues) { for (E = crypto.getRandomValues(new Uint32Array(t *= 2)); o < t; ) r = E[o] * 131072 + (E[o + 1] >>> 11), r >= 9e15 ? (b = crypto.getRandomValues(new Uint32Array(2)), E[o] = b[0], E[o + 1] = b[1]) : (c.push(r % 1e14), o += 2); o = t / 2; } else if (crypto.randomBytes) { for (E = crypto.randomBytes(t *= 7); o < t; ) r = (E[o] & 31) * 281474976710656 + E[o + 1] * 1099511627776 + E[o + 2] * 4294967296 + E[o + 3] * 16777216 + (E[o + 4] << 16) + (E[o + 5] << 8) + E[o + 6], r >= 9e15 ? crypto.randomBytes(7).copy(E, o) : (c.push(r % 1e14), o += 7); o = t / 7; } else throw k = !1, Error(Xt + "crypto unavailable"); if (!k) for (; o < t; ) r = M(), r < 9e15 && (c[o++] = r % 1e14); for (t = c[--o], x %= J, t && x && (r = xr[J - x], c[o] = Jt(t / r) * r); c[o] === 0; c.pop(), o--) ; if (o < 0) c = [h = 0]; else { for (h = -1; c[0] === 0; c.splice(0, 1), h -= J) ; for (o = 1, r = c[0]; r >= 10; r /= 10, o++) ; o < J && (h -= J - o); } return l.e = h, l.c = c, l; }; }(), S.sum = function() { for (var v = 1, M = arguments, x = new S(M[0]); v < M.length; ) x = x.plus(M[v++]); return x; }, u = /* @__PURE__ */ function() { var v = "0123456789"; function M(x, E, b, h) { for (var t, r = [0], o, c = 0, l = x.length; c < l; ) { for (o = r.length; o--; r[o] *= E) ; for (r[0] += h.indexOf(x.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(x, E, b, h, t) { var r, o, c, l, w, g, d, n, m = x.indexOf("."), P = p, D = y; for (m >= 0 && (l = F, F = 0, x = x.replace(".", ""), n = new S(E), g = n.pow(x.length - m), F = l, n.c = M( re(Wt(g.c), g.e, "0"), 10, b, v ), n.e = n.c.length), d = M(x, E, b, t ? (r = L, v) : (r = v, L)), c = l = d.length; d[--l] == 0; d.pop()) ; if (!d[0]) return r.charAt(0); if (m < 0 ? --c : (g.c = d, g.e = c, g.s = h, g = s(g, n, P, D, b), d = g.c, w = g.r, c = g.e), o = c + P + 1, m = d[o], l = b / 2, w = w || o < 0 || d[o + 1] != null, w = D < 4 ? (m != null || w) && (D == 0 || D == (g.s < 0 ? 3 : 2)) : m > l || m == l && (D == 4 || w || D == 6 && d[o - 1] & 1 || D == (g.s < 0 ? 8 : 7)), o < 1 || !d[0]) x = w ? re(r.charAt(1), -P, 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 (l = d.length; !d[--l]; ) ; for (m = 0, x = ""; m <= l; x += r.charAt(d[m++])) ; x = re(x, c, r.charAt(0)); } return x; }; }(), s = /* @__PURE__ */ function() { function v(E, b, h) { var t, r, o, c, l = 0, w = E.length, g = b % fe, d = b / fe | 0; for (E = E.slice(); w--; ) o = E[w] % fe, c = E[w] / fe | 0, t = d * o + c * g, r = g * o + t % fe * fe + l, l = (r / h | 0) + (t / fe | 0) + d * c, E[w] = r % h; return l && (E = [l].concat(E)), E; } function M(E, b, h, t) { var r, o; if (h != t) o = h > t ? 1 : -1; else for (r = o = 0; r < h; r++) if (E[r] != b[r]) { o = E[r] > b[r] ? 1 : -1; break; } return o; } function x(E, b, h, t) { for (var r = 0; h--; ) E[h] -= r, r = E[h] < b[h] ? 1 : 0, E[h] = r * t + E[h] - b[h]; for (; !E[0] && E.length > 1; E.splice(0, 1)) ; } return function(E, b, h, t, r) { var o, c, l, w, g, d, n, m, P, D, C, H, G, z, Q, Z, B, rt = E.s == b.s ? 1 : -1, Y = E.c, X = b.c; if (!Y || !Y[0] || !X || !X[0]) return new S( // Return NaN if either NaN, or both Infinity or 0. !E.s || !b.s || (Y ? X && Y[0] == X[0] : !X) ? NaN : ( // Return ±0 if x is ±0 or y is ±Infinity, or return ±Infinity as y is ±0. Y && Y[0] == 0 || !X ? rt * 0 : rt / 0 ) ); for (m = new S(rt), P = m.c = [], c = E.e - b.e, rt = h + c + 1, r || (r = _t, c = Yt(E.e / J) - Yt(b.e / J), rt = rt / J | 0), l = 0; X[l] == (Y[l] || 0); l++) ; if (X[l] > (Y[l] || 0) && c--, rt < 0) P.push(1), w = !0; else { for (z = Y.length, Z = X.length, l = 0, rt += 2, g = Jt(r / (X[0] + 1)), g > 1 && (X = v(X, g, r), Y = v(Y, g, r), Z = X.length, z = Y.length), G = Z, D = Y.slice(0, Z), C = D.length; C < Z; D[C++] = 0) ; B = X.slice(), B = [0].concat(B), Q = X[0], X[1] >= r / 2 && Q++; do { if (g = 0, o = M(X, D, Z, C), o < 0) { if (H = D[0], Z != C && (H = H * r + (D[1] || 0)), g = Jt(H / Q), g > 1) for (g >= r && (g = r - 1), d = v(X, g, r), n = d.length, C = D.length; M(d, D, n, C) == 1; ) g--, x(d, Z < n ? B : X, n, r), n = d.length, o = 1; else g == 0 && (o = g = 1), d = X.slice(), n = d.length; if (n < C && (d = [0].concat(d)), x(D, d, C, r), C = D.length, o == -1) for (; M(X, D, Z, C) < 1; ) g++, x(D, Z < C ? B : X, C, r), C = D.length; } else o === 0 && (g++, D = [0]); P[l++] = g, D[0] ? D[C++] = Y[G] || 0 : (D = [Y[G]], C = 1); } while ((G++ < z || D[0] != null) && rt--); w = D[0] != null, P[0] || P.splice(0, 1); } if (r == _t) { for (l = 1, rt = P[0]; rt >= 10; rt /= 10, l++) ; K(m, h + (m.e = l + c * J - 1) + 1, t, w); } else m.e = c, m.r = +w; return m; }; }(); function V(v, M, x, E) { var b, h, t, r, o; if (x == null ? x = y : it(x, 0, 8), !v.c) return v.toString(); if (b = v.c[0], t = v.e, M == null) o = Wt(v.c), o = E == 1 || E == 2 && (t <= A || t >= T) ? He(o, t) : re(o, t, "0"); else if (v = K(new S(v), M, x), h = v.e, o = Wt(v.c), r = o.length, E == 1 || E == 2 && (M <= h || h <= A)) { for (; r < M; o += "0", r++) ; o = He(o, h); } else if (M -= t + (E === 2 && h > t), o = re(o, h, "0"), h + 1 > r) { if (--M > 0) for (o += "."; M--; o += "0") ; } else if (M += h - r, M > 0) for (h + 1 == r && (o += "."); M--; o += "0") ; return v.s < 0 && b ? "-" + o : o; } function q(v, M) { for (var x, E, b = 1, h = new S(v[0]); b < v.length; b++) E = new S(v[b]), (!E.s || (x = he(h, E)) === M || x === 0 && h.s === M) && (h = E); return h; } function I(v, M, x) { for (var E = 1, b = M.length; !M[--b]; M.pop()) ; for (b = M[0]; b >= 10; b /= 10, E++) ; return (x = E + x * J - 1) > R ? v.c = v.e = null : x < O ? v.c = [v.e = 0] : (v.e = x, v.c = M), v; } f = /* @__PURE__ */ function() { var v = /^(-?)0([xbo])(?=\w[\w.]*$)/i, M = /^([^.]+)\.$/, x = /^\.([^.]+)$/, E = /^-?(Infinity|NaN)$/, b = /^\s*\+(?=[\w.])|^\s+|\s+$/g; return function(h, t, r, o) { var c, l = r ? t : t.replace(b, ""); if (E.test(l)) h.s = isNaN(l) ? null : l < 0 ? -1 : 1; else { if (!r && (l = l.replace(v, function(w, g, d) { return c = (d = d.toLowerCase()) == "x" ? 16 : d == "b" ? 2 : 8, !o || o == c ? g : w; }), o && (c = o, l = l.replace(M, "$1").replace(x, "0.$1")), t != l)) return new S(l, c); if (S.DEBUG) throw Error(Xt + "Not a" + (o ? " base " + o : "") + " number: " + t); h.s = null; } h.c = h.e = null; }; }(); function K(v, M, x, E) { var b, h, t, r, o, c, l, w = v.c, g = xr; if (w) { t: { for (b = 1, r = w[0]; r >= 10; r /= 10, b++) ; if (h = M - b, h < 0) h += J, t = M, o = w[c = 0], l = Jt(o / g[b - t - 1] % 10); else if (c = yr((h + 1) / J), c >= w.length) if (E) { for (; w.length <= c; w.push(0)) ; o = l = 0, b = 1, h %= J, t = h - J + 1; } else break t; else { for (o = r = w[c], b = 1; r >= 10; r /= 10, b++) ; h %= J, t = h - J + b, l = t < 0 ? 0 : Jt(o / g[b - t - 1] % 10); } if (E = E || M < 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 % g[b - t - 1]), E = x < 4 ? (l || E) && (x == 0 || x == (v.s < 0 ? 3 : 2)) : l > 5 || l == 5 && (x == 4 || E || x == 6 && // Check whether the digit to the left of the rounding digit is odd. (h > 0 ? t > 0 ? o / g[b - t] : 0 : w[c - 1]) % 10 & 1 || x == (v.s < 0 ? 8 : 7)), M < 1 || !w[0]) return w.length = 0, E ? (M -= v.e + 1, w[0] = g[(J - M % J) % J], v.e = -M || 0) : w[0] = v.e = 0, v; if (h == 0 ? (w.length = c, r = 1, c--) : (w.length = c + 1, r = g[J - h], w[c] = t > 0 ? Jt(o / g[b - t] % g[t]) * r : 0), E) for (; ; ) if (c == 0) { for (h = 1, t = w[0]; t >= 10; t /= 10, h++) ; for (t = w[0] += r, r = 1; t >= 10; t /= 10, r++) ; h != 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 (h = w.length; w[--h] === 0; w.pop()) ; } v.e > R ? v.c = v.e = null : v.e < O && (v.c = [v.e = 0]); } return v; } function et(v) { var M, x = v.e; return x === null ? v.toString() : (M = Wt(v.c), M = x <= A || x >= T ? He(M, x) : re(M, x, "0"), v.s < 0 ? "-" + M : M); } return a.absoluteValue = a.abs = function() { var v = new S(this); return v.s < 0 && (v.s = 1), v; }, a.comparedTo = function(v, M) { return he(this, new S(v, M)); }, a.decimalPlaces = a.dp = function(v, M) { var x, E, b, h = this; if (v != null) return it(v, 0, Gt), M == null ? M = y : it(M, 0, 8), K(new S(h), v + h.e + 1, M); if (!(x = h.c)) return null; if (E = ((b = x.length - 1) - Yt(this.e / J)) * J, b = x[b]) for (; b % 10 == 0; b /= 10, E--) ; return E < 0 && (E = 0), E; }, a.dividedBy = a.div = function(v, M) { return s(this, new S(v, M), p, y); }, a.dividedToIntegerBy = a.idiv = function(v, M) { return s(this, new S(v, M), 0, 1); }, a.exponentiatedBy = a.pow = function(v, M) { var x, E, b, h, t, r, o, c, l, w = this; if (v = new S(v), v.c && !v.isInteger()) throw Error(Xt + "Exponent not an integer: " + et(v)); if (M != null && (M = new S(M)), 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 l = new S(Math.pow(+et(w), r ? v.s * (2 - Ue(v)) : +et(v))), M ? l.mod(M) : l; if (o = v.s < 0, M) { if (M.c ? !M.c[0] : !M.s) return new S(NaN); E = !o && w.isInteger() && M.isInteger(), E && (w = w.mod(M)); } 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 h = w.s < 0 && Ue(v) ? -0 : 0, w.e > -1 && (h = 1 / h), new S(o ? 1 / h : h); F && (h = yr(F / J + 2)); } for (r ? (x = new S(0.5), o && (v.s = 1), c = Ue(v)) : (b = Math.abs(+et(v)), c = b % 2), l = new S(i); ; ) { if (c) { if (l = l.times(w), !l.c) break; h ? l.c.length > h && (l.c.length = h) : E && (l = l.mod(M)); } if (b) { if (b = Jt(b / 2), b === 0) break; c = b % 2; } else if (v = v.times(x), K(v, v.e + 1, 1), v.e > 14) c = Ue(v); else { if (b = +et(v), b === 0) break; c = b % 2; } w = w.times(w), h ? w.c && w.c.length > h && (w.c.length = h) : E && (w = w.mod(M)); } return E ? l : (o && (l = i.div(l)), M ? l.mod(M) : h ? K(l, F, y, t) : l); }, a.integerValue = function(v) { var M = new S(this); return v == null ? v = y : it(v, 0, 8), K(M, M.e + 1, v); }, a.isEqualTo = a.eq = function(v, M) { return he(this, new S(v, M)) === 0; }, a.isFinite = function() { return !!this.c; }, a.isGreaterThan = a.gt = function(v, M) { return he(this, new S(v, M)) > 0; }, a.isGreaterThanOrEqualTo = a.gte = function(v, M) { return (M = he(this, new S(v, M))) === 1 || M === 0; }, a.isInteger = function() { return !!this.c && Yt(this.e / J) > this.c.length - 2; }, a.isLessThan = a.lt = function(v, M) { return he(this, new S(v, M)) < 0; }, a.isLessThanOrEqualTo = a.lte = function(v, M) { return (M = he(this, new S(v, M))) === -1 || M === 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, M) { var x, E, b, h, t = this, r = t.s; if (v = new S(v, M), M = v.s, !r || !M) return new S(NaN); if (r != M) return v.s = -M, t.plus(v); var o = t.e / J, c = v.e / J, l = t.c, w = v.c; if (!o || !c) { if (!l || !w) return l ? (v.s = -M, v) : new S(w ? t : NaN); if (!l[0] || !w[0]) return w[0] ? (v.s = -M, v) : new S(l[0] ? t : ( // IEEE 754 (2008) 6.3: n - n = -0 when rounding to -Infinity y == 3 ? -0 : 0 )); } if (o = Yt(o), c = Yt(c), l = l.slice(), r = o - c) { for ((h = r < 0) ? (r = -r, b = l) : (c = o, b = w), b.reverse(), M = r; M--; b.push(0)) ; b.reverse(); } else for (E = (h = (r = l.length) < (M = w.length)) ? r : M, r = M = 0; M < E; M++) if (l[M] != w[M]) { h = l[M] < w[M]; break; } if (h && (b = l, l = w, w = b, v.s = -v.s), M = (E = w.length) - (x = l.length), M > 0) for (; M--; l[x++] = 0) ; for (M = _t - 1; E > r; ) { if (l[--E] < w[E]) { for (x = E; x && !l[--x]; l[x] = M) ; --l[x], l[E] += _t; } l[E] -= w[E]; } for (; l[0] == 0; l.splice(0, 1), --c) ; return l[0] ? I(v, l, c) : (v.s = y == 3 ? -1 : 1, v.c = [v.e = 0], v); }, a.modulo = a.mod = function(v, M) { var x, E, b = this; return v = new S(v, M), !b.c || !v.s || v.c && !v.c[0] ? new S(NaN) : !v.c || b.c && !b.c[0] ? new S(b) : (U == 9 ? (E = v.s, v.s = 1, x = s(b, v, 0, 3), v.s = E, x.s *= E) : x = s(b, v, 0, U), v = b.minus(x.times(v)), !v.c[0] && U == 1 && (v.s = b.s), v); }, a.multipliedBy = a.times = function(v, M) { var x, E, b, h, t, r, o, c, l, w, g, d, n, m, P, D = this, C = D.c, H = (v = new S(v, M)).c; if (!C || !H || !C[0] || !H[0]) return !D.s || !v.s || C && !C[0] && !H || H && !H[0] && !C ? v.c = v.e = v.s = null : (v.s *= D.s, !C || !H ? v.c = v.e = null : (v.c = [0], v.e = 0)), v; for (E = Yt(D.e / J) + Yt(v.e / J), v.s *= D.s, o = C.length, w = H.length, o < w && (n = C, C = H, H = n, b = o, o = w, w = b), b = o + w, n = []; b--; n.push(0)) ; for (m = _t, P = fe, b = w; --b >= 0; ) { for (x = 0, g = H[b] % P, d = H[b] / P | 0, t = o, h = b + t; h > b; ) c = C[--t] % P, l = C[t] / P | 0, r = d * c + l * g, c = g * c + r % P * P + n[h] + x, x = (c / m | 0) + (r / P | 0) + d * l, n[h--] = c % m; n[h] = x; } return x ? ++E : n.splice(0, 1), I(v, n, E); }, a.negated = function() { var v = new S(this); return v.s = -v.s || null, v; }, a.plus = function(v, M) { var x, E = this, b = E.s; if (v = new S(v, M), M = v.s, !b || !M) return new S(NaN); if (b != M) return v.s = -M, E.minus(v); var h = E.e / J, t = v.e / J, r = E.c, o = v.c; if (!h || !t) { if (!r || !o) return new S(b / 0); if (!r[0] || !o[0]) return o[0] ? v : new S(r[0] ? E : b * 0); } if (h = Yt(h), t = Yt(t), r = r.slice(), b = h - t) { for (b > 0 ? (t = h, x = o) : (b = -b, x = r), x.reverse(); b--; x.push(0)) ; x.reverse(); } for (b = r.length, M = o.length, b - M < 0 && (x = o, o = r, r = x, M = b), b = 0; M; ) b = (r[--M] = r[M] + o[M] + b) / _t | 0, r[M] = _t === r[M] ? 0 : r[M] % _t; return b && (r = [b].concat(r), ++t), I(v, r, t); }, a.precision = a.sd = function(v, M) { var x, E, b, h = this; if (v != null && v !== !!v) return it(v, 1, Gt), M == null ? M = y : it(M, 0, 8), K(new S(h), v, M); if (!(x = h.c)) return null; if (b = x.length - 1, E = b * J + 1, b = x[b]) { for (; b % 10 == 0; b /= 10, E--) ; for (b = x[0]; b >= 10; b /= 10, E++) ; } return v && h.e + 1 > E && (E = h.e + 1), E; }, a.shiftedBy = function(v) { return it(v, -Mr, Mr), this.times("1e" + v); }, a.squareRoot = a.sqrt = function() { var v, M, x, E, b, h = this, t = h.c, r = h.s, o = h.e, c = p + 4, l = new S("0.5"); if (r !== 1 || !t || !t[0]) return new S(!r || r < 0 && (!t || t[0]) ? NaN : t ? h : 1 / 0); if (r = Math.sqrt(+et(h)), r == 0 || r == 1 / 0 ? (M = Wt(t), (M.length + o) % 2 == 0 && (M += "0"), r = Math.sqrt(+M), o = Yt((o + 1) / 2) - (o < 0 || o % 2), r == 1 / 0 ? M = "5e" + o : (M = r.toExponential(), M = M.slice(0, M.indexOf("e") + 1) + o), x = new S(M)) : x = new S(r + ""), x.c[0]) { for (o = x.e, r = o + c, r < 3 && (r = 0); ; ) if (b = x, x = l.times(b.plus(s(h, b, c, 1))), Wt(b.c).slice(0, r) === (M = Wt(x.c)).slice(0, r)) if (x.e < o && --r, M = M.slice(r - 3, r + 1), M == "9999" || !E && M == "4999") { if (!E && (K(b, b.e + p + 2, 0), b.times(b).eq(h))) { x = b; break; } c += 4, r += 4, E = 1; } else { (!+M || !+M.slice(1) && M.charAt(0) == "5") && (K(x, x.e + p + 2, 1), v = !x.times(x).eq(h)); break; } } return K(x, x.e + p + 1, y, v); }, a.toExponential = function(v, M) { return v != null && (it(v, 0, Gt), v++), V(this, v, M, 1); }, a.toFixed = function(v, M) { return v != null && (it(v, 0, Gt), v = v + this.e + 1), V(this, v, M); }, a.toFormat = function(v, M, x) { var E, b = this; if (x == null) v != null && M && typeof M == "object" ? (x = M, M = null) : v && typeof v == "object" ? (x = v, v = M = null) : x = N; else if (typeof x != "object") throw Error(Xt + "Argument not an object: " + x); if (E = b.toFixed(v, M), b.c) { var h, t = E.split("."), r = +x.groupSize, o = +x.secondaryGroupSize, c = x.groupSeparator || "", l = t[0], w = t[1], g = b.s < 0, d = g ? l.slice(1) : l, n = d.length; if (o && (h = r, r = o, o = h, n -= h), r > 0 && n > 0) { for (h = n % r || r, l = d.substr(0, h); h < n; h += r) l += c + d.substr(h, r); o > 0 && (l += c + d.slice(h)), g && (l = "-" + l); } E = w ? l + (x.decimalSeparator || "") + ((o = +x.fractionGroupSize) ? w.replace( new RegExp("\\d{" + o + "}\\B", "g"), "$&" + (x.fractionGroupSeparator || "") ) : w) : l; } return (x.prefix || "") + E + (x.suffix || ""); }, a.toFraction = function(v) { var M, x, E, b, h, t, r, o, c, l, w, g, d = this, n = d.c; if (v != null && (r = new S(v), !r.isInteger() && (r.c || r.s !== 1) || r.lt(i))) throw Error(Xt + "Argument " + (r.isInteger() ? "out of range: " : "not an integer: ") + et(r)); if (!n) return new S(d); for (M = new S(i), c = x = new S(i), E = o = new S(i), g = Wt(n), h = M.e = g.length - d.e - 1, M.c[0] = xr[(t = h % J) < 0 ? J + t : t], v = !v || r.comparedTo(M) > 0 ? h > 0 ? M : c : r, t = R, R = 1 / 0, r = new S(g), o.c[0] = 0; l = s(r, M, 0, 1), b = x.plus(l.times(E)), b.comparedTo(v) != 1; ) x = E, E = b, c = o.plus(l.times(b = c)), o = b, M = r.minus(l.times(b = M)), r = b; return b = s(v.minus(x), E, 0, 1), o = o.plus(b.times(c)), x = x.plus(b.times(E)), o.s = c.s = d.s, h = h * 2, w = s(c, E, h, y).minus(d).abs().comparedTo( s(o, x, h, y).minus(d).abs() ) < 1 ? [c, E] : [o, x], R = t, w; }, a.toNumber = function() { return +et(this); }, a.toPrecision = function(v, M) { return v != null && it(v, 1, Gt), V(this, v, M, 2); }, a.toString = function(v) { var M, x = this, E = x.s, b = x.e; return b === null ? E ? (M = "Infinity", E < 0 && (M = "-" + M)) : M = "NaN" : (v == null ? M = b <= A || b >= T ? He(Wt(x.c), b) : re(Wt(x.c), b, "0") : v === 10 && j ? (x = K(new S(x), p + b + 1, y), M = re(Wt(x.c), x.e, "0")) : (it(v, 2, L.length, "Base"), M = u(re(Wt(x.c), b, "0"), 10, v, E, !0)), E < 0 && x.c[0] && (M = "-" + M)), M; }, 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 Yt(e) { var s = e | 0; return e > 0 || e === s ? s : s - 1; } function Wt(e) { for (var s, u, f = 1, a = e.length, i = e[0] + ""; f < a; ) { for (s = e[f++] + "", u = J - s.length; u--; s = "0" + s) ; i += s; } for (a = i.length; i.charCodeAt(--a) === 48; ) ; return i.slice(0, a + 1 || 1); } function he(e, s) { var u, f, a = e.c, i = s.c, p = e.s, y = s.s, A = e.e, T = s.e; if (!p || !y) return null; if (u = a && !a[0], f = i && !i[0], u || f) return u ? f ? 0 : -y : p; if (p != y) return p; if (u = p < 0, f = A == T, !a || !i) return f ? 0 : !a ^ u ? 1 : -1; if (!f) return A > T ^ u ? 1 : -1; for (y = (A = a.length) < (T = i.length) ? A : T, p = 0; p < y; p++) if (a[p] != i[p]) return a[p] > i[p] ^ u ? 1 : -1; return A == T ? 0 : A > T ^ u ? 1 : -1; } function it(e, s, u, f) { if (e < s || e > u || e !== Jt(e)) throw Error(Xt + (f || "Argument") + (typeof e == "number" ? e < s || e > u ? " out of range: " : " not an integer: " : " not a primitive number: ") + String(e)); } function Ue(e) { var s = e.c.length - 1; return Yt(e.e / J) == s && e.c[s] % 2 != 0; } function He(e, s) { return (e.length > 1 ? e.charAt(0) + "." + e.slice(1) : e) + (s < 0 ? "e" : "e+") + s; } function re(e, s, u) { var f, a; if (s < 0) { for (a = u + "."; ++s; a += u) ; e = a + e; } else if (f = e.length, ++s > f) { for (a = u, s -= f; --s; a += u) ; e += a; } else s < f && (e = e.slice(0, s) + "." + e.slice(s)); return e; } var de = In(), Ie = /* @__PURE__ */ ((e) => (e.INFO = "info", e.ERROR = "error", e.LOADING = "loading", e.SUCCESS = "success", e))(Ie || {}); const $e = { style: { marginBottom: "10px" }, isClosed: !0, timeout: 5e3 }, Oi = { ...$e, type: Ie.INFO }, Pe = { ...$e, type: Ie.ERROR }, zr = { ...$e, type: Ie.SUCCESS }, Si = { ...$e, type: Ie.LOADING, isClosed: !1, timeout: 0 }, Rn = 137; let Di = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict", Ci = (e = 21) => { let s = "", u = e | 0; for (; u--; ) s += Di[Math.random() * 64 | 0]; return s; }; function Pi(e) { return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e; } var Fn = { exports: {} }, ot = Fn.exports = {}, te, ee; function Nr() { throw new Error("setTimeout has not been defined"); } function Br() { throw new Error("clearTimeout has not been defined"); } (function() { try { typeof setTimeout == "function" ? te = setTimeout : te = Nr; } catch { te = Nr; } try { typeof clearTimeout == "function" ? ee = clearTimeout : ee = Br; } catch { ee = Br; } })(); function kn(e) { if (te === setTimeout) return setTimeout(e, 0); if ((te === Nr || !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 Ni(e) { if (ee === clearTimeout) return clearTimeout(e); if ((ee === Br || !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 = [], Ee = !1, ge, We = -1; function Bi() { !Ee || !ge || (Ee = !1, ge.length ? se = ge.concat(se) : We = -1, se.length && Ln()); } function Ln() { if (!Ee) { var e = kn(Bi); Ee = !0; for (var s = se.length; s; ) { for (ge = se, se = []; ++We < s; ) ge && ge[We].run(); We = -1, s = se.length; } ge = null, Ee = !1, Ni(e); } } ot.nextTick = function(e) { var s = new Array(arguments.length - 1); if (arguments.length > 1) for (var u = 1; u < arguments.length; u++) s[u - 1] = arguments[u]; se.push(new Un(e, s)), se.length === 1 && !Ee && kn(Ln); }; function Un(e, s) { this.fun = e, this.array = s; } Un.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 Ii = Fn.exports; const Zt = /* @__PURE__ */ Pi(Ii); function Ir() { return Ir = Object.assign ? Object.assign.bind() : function(e) { for (var s = 1; s < arguments.length; s++) { var u = arguments[s]; for (var f in u) ({}).hasOwnProperty.call(u, f) && (e[f] = u[f]); } return e; }, Ir.apply(null, arguments); } function Hn(e, s) { if (e == null) return {}; var u = {}; for (var f in e) if ({}.hasOwnProperty.call(e, f)) { if (s.indexOf(f) !== -1) continue; u[f] = e[f]; } return u; } function Rr(e, s) { return Rr = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function(u, f) { return u.__proto__ = f, u; }, Rr(e, s); } function Gn(e, s) { e.prototype = Object.create(s.prototype), e.prototype.constructor = e, Rr(e, s); } function jn(e) { return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e; } var Ge = { exports: {} }, je = { 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 ln; function Ri() { if (ln) return _; ln = 1; var e = typeof Symbol == "function" && Symbol.for, s = e ? Symbol.for("react.element") : 60103, u = e ? Symbol.for("react.portal") : 60106, f = 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, A = e ? Symbol.for("react.async_mode") : 60111, T = e ? Symbol.for("react.concurrent_mode") : 60111, O = e ? Symbol.for("react.forward_ref") : 60112, R = e ? Symbol.for("react.suspense") : 60113, k = e ? Symbol.for("react.suspense_list") : 60120, U = e ? Symbol.for("react.memo") : 60115, F = e ? Symbol.for("react.lazy") : 60116, N = e ? Symbol.for("react.block") : 60121, L = e ? Symbol.for("react.fundamental") : 60117, j = e ? Symbol.for("react.responder") : 60118, S = e ? Symbol.for("react.scope") : 60119; function V(I) { if (typeof I == "object" && I !== null) { var K = I.$$typeof; switch (K) { case s: switch (I = I.type, I) { case A: case T: case f: case i: case a: case R: return I; default: switch (I = I && I.$$typeof, I) { case y: case O: case F: case U: case p: return I; default: return K; } } case u: return K; } } } function q(I) { return V(I) === T; } return _.AsyncMode = A, _.ConcurrentMode = T, _.ContextConsumer = y, _.ContextProvider = p, _.Element = s, _.ForwardRef = O, _.Fragment = f, _.Lazy = F, _.Memo = U, _.Portal = u, _.Profiler = i, _.StrictMode = a, _.Suspense = R, _.isAsyncMode = function(I) { return q(I) || V(I) === A; }, _.isConcurrentMode = q, _.isContextConsumer = function(I) { return V(I) === y; }, _.isContextProvider = function(I) { return V(I) === p; }, _.isElement = function(I) { return typeof I == "object" && I !== null && I.$$typeof === s; }, _.isForwardRef = function(I) { return V(I) === O; }, _.isFragment = function(I) { return V(I) === f; }, _.isLazy = function(I) { return V(I) === F; }, _.isMemo = function(I) { return V(I) === U; }, _.isPortal = function(I) { return V(I) === u; }, _.isProfiler = function(I) { return V(I) === i; }, _.isStrictMode = function(I) { return V(I) === a; }, _.isSuspense = function(I) { return V(I) === R; }, _.isValidElementType = function(I) { return typeof I == "string" || typeof I == "function" || I === f || I === T || I === i || I === a || I === R || I === k || typeof I == "object" && I !== null && (I.$$typeof === F || I.$$typeof === U || I.$$typeof === p || I.$$typeof === y || I.$$typeof === O || I.$$typeof === L || I.$$typeof === j || I.$$typeof === S || I.$$typeof === N); }, _.typeOf = V, _; } var $ = {}, dn; function Fi() { return dn || (dn = 1, Zt.env.NODE_ENV !== "production" && function() { var e = typeof Symbol == "function" && Symbol.for, s = e ? Symbol.for("react.element") : 60103, u = e ? Symbol.for("react.portal") : 60106, f = 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, A = e ? Symbol.for("react.async_mode") : 60111, T = e ? Symbol.for("react.concurrent_mode") : 60111, O = e ? Symbol.for("react.forward_ref") : 60112, R = e ? Symbol.for("react.suspense") : 60113, k = e ? Symbol.for("react.suspense_list") : 60120, U = e ? Symbol.for("react.memo") : 60115, F = e ? Symbol.for("react.lazy") : 60116, N = e ? Symbol.for("react.block") : 60121, L = e ? Symbol.for("react.fundamental") : 60117, j = e ? Symbol.for("react.responder") : 60118, S = e ? Symbol.for("react.scope") : 60119; function V(B) { return typeof B == "string" || typeof B == "function" || // Note: its typeof might be other than 'symbol' or 'number' if it's a polyfill. B === f || B === T || B === i || B === a || B === R || B === k || typeof B == "object" && B !== null && (B.$$typeof === F || B.$$typeof === U || B.$$typeof === p || B.$$typeof === y || B.$$typeof === O || B.$$typeof === L || B.$$typeof === j || B.$$typeof === S || B.$$typeof === N); } function q(B) { if (typeof B == "object" && B !== null) { var rt = B.$$typeof; switch (rt) { case s: var Y = B.type; switch (Y) { case A: case T: case f: case i: case a: case R: return Y; default: var X = Y && Y.$$typeof; switch (X) { case y: case O: case F: case U: case p: return X; default: return rt; } } case u: return rt; } } } var I = A, K = T, et = y, v = p, M = s, x = O, E = f, b = F, h = U, t = u, r = i, o = a, c = R, l = !1; function w(B) { return l || (l = !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.")), g(B) || q(B) === A; } function g(B) { return q(B) === T; } function d(B) { return q(B) === y; } function n(B) { return q(B) === p; } function m(B) { return typeof B == "object" && B !== null && B.$$typeof === s; } function P(B) { return q(B) === O; } function D(B) { return q(B) === f; } function C(B) { return q(B) === F; } function H(B) { return q(B) === U; } function G(B) { return q(B) === u; } function z(B) { return q(B) === i; } function Q(B) { return q(B) === a; } function Z(B) { return q(B) === R; } $.AsyncMode = I, $.ConcurrentMode = K, $.ContextConsumer = et, $.ContextProvider = v, $.Element = M, $.ForwardRef = x, $.Fragment = E, $.Lazy = b, $.Memo = h, $.Portal = t, $.Profiler = r, $.StrictMode = o, $.Suspense = c, $.isAsyncMode = w, $.isConcurrentMode = g, $.isContextConsumer = d, $.isContextProvider = n, $.isElement = m, $.isForwardRef = P, $.isFragment = D, $.isLazy = C, $.isMemo = H, $.isPortal = G, $.isProfiler = z, $.isStrictMode = Q, $.isSuspense = Z, $.isValidElementType = V, $.typeOf = q; }()), $; } var pn; function zn() { return pn || (pn = 1, Zt.env.NODE_ENV === "production" ? je.exports = Ri() : je.exports = Fi()), je.exports; } /* object-assign (c) Sindre Sorhus @license MIT */ var br, vn; function ki() { if (vn) return br; vn = 1; var e = Object.getOwnPropertySymbols, s = Object.prototype.hasOwnProperty, u = Object.prototype.propertyIsEnumerable; function f(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 A = Object.getOwnPropertyNames(p).map(function(O) { return p[O]; }); if (A.join("") !== "0123456789") return !1; var T = {}; return "abcdefghijklmnopqrst".split("").forEach(function(O) { T[O] = O; }), Object.keys(Object.assign({}, T)).join("") === "abcdefghijklmnopqrst"; } catch { return !1; } } return br = a() ? Object.assign : function(i, p) { for (var y, A = f(i), T, O = 1; O < arguments.length; O++) { y = Object(arguments[O]); for (var R in y) s.call(y, R) && (A[R] = y[R]); if (e) { T = e(y); for (var k = 0; k < T.length; k++) u.call(y, T[k]) && (A[T[k]] = y[T[k]]); } } return A; }, br; } var Er, mn; function Zr() { if (mn) return Er; mn = 1; var e = "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"; return Er = e, Er; } var Ar, gn; function Zn() { return gn || (gn = 1, Ar = Function.call.bind(Object.prototype.hasOwnProperty)), Ar; } var Tr, wn; function Li() { if (wn) return Tr; wn = 1; var e = function() { }; if (Zt.env.NODE_ENV !== "production") { var s = /* @__PURE__ */ Zr(), u = {}, f = /* @__PURE__ */ Zn(); e = function(i) { var p = "Warning: " + i; typeof console < "u" && console.error(p); try { throw new Error(p); } catch { } }; } function a(i, p, y, A, T) { if (Zt.env.NODE_ENV !== "production") { for (var O in i) if (f(i, O)) { var R; try { if (typeof i[O] != "function") { var k = Error( (A || "React class") + ": " + y + " type `" + O + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof i[O] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`." ); throw k.name = "Invariant Violation", k; } R = i[O](p, O, A, y, null, s); } catch (F) { R = F; } if (R && !(R instanceof Error) && e( (A || "React class") + ": type specification of " + y + " `" + O + "` is invalid; the type checker function must return `null` or an `Error` but returned a " + typeof R + ". You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument)." ), R instanceof Error && !(R.message in u)) { u[R.message] = !0; var U = T ? T() : ""; e( "Failed " + y + " type: " + R.message + (U ?? "") ); } } } } return a.resetWarningCache = function() { Zt.env.NODE_ENV !== "production" && (u = {}); }, Tr = a, Tr; } var Or, yn; function Ui() { if (yn) return Or; yn = 1; var e = zn(), s = ki(), u = /* @__PURE__ */ Zr(), f = /* @__PURE__ */ Zn(), a = /* @__PURE__ */ Li(), i = function() { }; Zt.env.NODE_ENV !== "production" && (i = function(y) { var A = "Warning: " + y; typeof console < "u" && console.error(A); try { throw new Error(A); } catch { } }); function p() { return null; } return Or = function(y, A) { var T = typeof Symbol == "function" && Symbol.iterator, O = "@@iterator"; function R(g) { var d = g && (T && g[T] || g[O]); if (typeof d == "function") return d; } var k = "<<anonymous>>", U = { array: j("array"), bigint: j("bigint"), bool: j("boolean"), func: j("function"), number: j("number"), object: j("object"), string: j("string"), symbol: j("symbol"), any: S(), arrayOf: V, element: q(), elementType: I(), instanceOf: K, node: x(), objectOf: v, oneOf: et, oneOfType: M, shape: b, exact: h }; function F(g, d) { return g === d ? g !== 0 || 1 / g === 1 / d : g !== g && d !== d; } function N(g, d) { this.message = g, this.data = d && typeof d == "object" ? d : {}, this.stack = ""; } N.prototype = Error.prototype; function L(g) { if (Zt.env.NODE_ENV !== "production") var d = {}, n = 0; function m(D, C, H, G, z, Q, Z) { if (G = G || k, Q = Q || H, Z !== u) { if (A) { var B = 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 B.name = "Invariant Violation", B; } else if (Zt.env.NODE_ENV !== "production" && typeof console < "u") { var rt = G + ":" + H; !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 `" + Q + "` prop on `" + G + "`. 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 C[H] == null ? D ? C[H] === null ? new N("The " + z + " `" + Q + "` is marked as required " + ("in `" + G + "`, but its value is `null`.")) : new N("The " + z + " `" + Q + "` is marked as required in " + ("`" + G + "`, but its value is `undefined`.")) : null : g(C, H, G, z, Q); } var P = m.bind(null, !1); return P.isRequired = m.bind(null, !0), P; } function j(g) { function d(n, m, P, D, C, H) { var G = n[m], z = o(G); if (z !== g) { var Q = c(G); return new N( "Invalid " + D + " `" + C + "` of type " + ("`" + Q + "` supplied to `" + P + "`, expected ") + ("`" + g + "`."), { expectedType: g } ); } return null; } return L(d); } function S() { return L(p); } function V(g) { function d(n, m, P, D, C) { if (typeof g != "function") return new N("Property `" + C + "` of component `" + P + "` has invalid PropType notation inside arrayOf."); var H = n[m]; if (!Array.isArray(H)) { var G = o(H); return new N("Invalid " + D + " `" + C + "` of type " + ("`" + G + "` supplied to `" + P + "`, expected an array.")); } for (var z = 0; z < H.length; z++) { var Q = g(H, z, P, D, C + "[" + z + "]", u); if (Q instanceof Error) return Q; } return null; } return L(d); } function q() { function g(d, n, m, P, D) { var C = d[n]; if (!y(C)) { var H = o(C); return new N("Invalid " + P + " `" + D + "` of type " + ("`" + H + "` supplied to `" + m + "`, expected a single ReactElement.")); } return null; } return L(g); } function I() { function g(d, n, m, P, D) { var C = d[n]; if (!e.isValidElementType(C)) { var H = o(C); return new N("Invalid " + P + " `" + D + "` of type " + ("`" + H + "` supplied to `" + m + "`, expected a single ReactElement type.")); } return null; } return L(g); } function K(g) { function d(n, m, P, D, C) { if (!(n[m] instanceof g)) { var H = g.name || k, G = w(n[m]); return new N("Invalid " + D + " `" + C + "` of type " + ("`" + G + "` supplied to `" + P + "`, expected ") + ("instance of `" + H + "`.")); } return null; } return L(d); } function et(g) { if (!Array.isArray(g)) return Zt.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, m, P, D, C) { for (v