import { cE as Ot, X as Tt, cv as Nt, cF as Mt, co as Ft } from "./index-CTdUTRp6.mjs";
function Lt(e, r) {
  for (var n = 0; n < r.length; n++) {
    const i = r[n];
    if (typeof i != "string" && !Array.isArray(i)) {
      for (const h in i)
        if (h !== "default" && !(h in e)) {
          const s = Object.getOwnPropertyDescriptor(i, h);
          s && Object.defineProperty(e, h, s.get ? s : {
            enumerable: !0,
            get: () => i[h]
          });
        }
    }
  }
  return Object.freeze(Object.defineProperty(e, Symbol.toStringTag, { value: "Module" }));
}
var lt = Ot();
const Bt = /* @__PURE__ */ Tt(lt), Hn = /* @__PURE__ */ Lt({
  __proto__: null,
  default: Bt
}, [lt]);
var xt = {}, Fe = {}, B = {}, Dt = {};
(function(e) {
  Object.defineProperty(e, "__esModule", { value: !0 });
  function r(a, f) {
    var o = a >>> 16 & 65535, c = a & 65535, v = f >>> 16 & 65535, d = f & 65535;
    return c * d + (o * d + c * v << 16 >>> 0) | 0;
  }
  e.mul = Math.imul || r;
  function n(a, f) {
    return a + f | 0;
  }
  e.add = n;
  function i(a, f) {
    return a - f | 0;
  }
  e.sub = i;
  function h(a, f) {
    return a << f | a >>> 32 - f;
  }
  e.rotl = h;
  function s(a, f) {
    return a << 32 - f | a >>> f;
  }
  e.rotr = s;
  function b(a) {
    return typeof a == "number" && isFinite(a) && Math.floor(a) === a;
  }
  e.isInteger = Number.isInteger || b, e.MAX_SAFE_INTEGER = 9007199254740991, e.isSafeInteger = function(a) {
    return e.isInteger(a) && a >= -e.MAX_SAFE_INTEGER && a <= e.MAX_SAFE_INTEGER;
  };
})(Dt);
Object.defineProperty(B, "__esModule", { value: !0 });
var ct = Dt;
function Pt(e, r) {
  return r === void 0 && (r = 0), (e[r + 0] << 8 | e[r + 1]) << 16 >> 16;
}
B.readInt16BE = Pt;
function Rt(e, r) {
  return r === void 0 && (r = 0), (e[r + 0] << 8 | e[r + 1]) >>> 0;
}
B.readUint16BE = Rt;
function jt(e, r) {
  return r === void 0 && (r = 0), (e[r + 1] << 8 | e[r]) << 16 >> 16;
}
B.readInt16LE = jt;
function It(e, r) {
  return r === void 0 && (r = 0), (e[r + 1] << 8 | e[r]) >>> 0;
}
B.readUint16LE = It;
function _t(e, r, n) {
  return r === void 0 && (r = new Uint8Array(2)), n === void 0 && (n = 0), r[n + 0] = e >>> 8, r[n + 1] = e >>> 0, r;
}
B.writeUint16BE = _t;
B.writeInt16BE = _t;
function dt(e, r, n) {
  return r === void 0 && (r = new Uint8Array(2)), n === void 0 && (n = 0), r[n + 0] = e >>> 0, r[n + 1] = e >>> 8, r;
}
B.writeUint16LE = dt;
B.writeInt16LE = dt;
function Ye(e, r) {
  return r === void 0 && (r = 0), e[r] << 24 | e[r + 1] << 16 | e[r + 2] << 8 | e[r + 3];
}
B.readInt32BE = Ye;
function qe(e, r) {
  return r === void 0 && (r = 0), (e[r] << 24 | e[r + 1] << 16 | e[r + 2] << 8 | e[r + 3]) >>> 0;
}
B.readUint32BE = qe;
function Ge(e, r) {
  return r === void 0 && (r = 0), e[r + 3] << 24 | e[r + 2] << 16 | e[r + 1] << 8 | e[r];
}
B.readInt32LE = Ge;
function We(e, r) {
  return r === void 0 && (r = 0), (e[r + 3] << 24 | e[r + 2] << 16 | e[r + 1] << 8 | e[r]) >>> 0;
}
B.readUint32LE = We;
function Ne(e, r, n) {
  return r === void 0 && (r = new Uint8Array(4)), n === void 0 && (n = 0), r[n + 0] = e >>> 24, r[n + 1] = e >>> 16, r[n + 2] = e >>> 8, r[n + 3] = e >>> 0, r;
}
B.writeUint32BE = Ne;
B.writeInt32BE = Ne;
function Me(e, r, n) {
  return r === void 0 && (r = new Uint8Array(4)), n === void 0 && (n = 0), r[n + 0] = e >>> 0, r[n + 1] = e >>> 8, r[n + 2] = e >>> 16, r[n + 3] = e >>> 24, r;
}
B.writeUint32LE = Me;
B.writeInt32LE = Me;
function Ht(e, r) {
  r === void 0 && (r = 0);
  var n = Ye(e, r), i = Ye(e, r + 4);
  return n * 4294967296 + i - (i >> 31) * 4294967296;
}
B.readInt64BE = Ht;
function Kt(e, r) {
  r === void 0 && (r = 0);
  var n = qe(e, r), i = qe(e, r + 4);
  return n * 4294967296 + i;
}
B.readUint64BE = Kt;
function zt(e, r) {
  r === void 0 && (r = 0);
  var n = Ge(e, r), i = Ge(e, r + 4);
  return i * 4294967296 + n - (n >> 31) * 4294967296;
}
B.readInt64LE = zt;
function Yt(e, r) {
  r === void 0 && (r = 0);
  var n = We(e, r), i = We(e, r + 4);
  return i * 4294967296 + n;
}
B.readUint64LE = Yt;
function Et(e, r, n) {
  return r === void 0 && (r = new Uint8Array(8)), n === void 0 && (n = 0), Ne(e / 4294967296 >>> 0, r, n), Ne(e >>> 0, r, n + 4), r;
}
B.writeUint64BE = Et;
B.writeInt64BE = Et;
function bt(e, r, n) {
  return r === void 0 && (r = new Uint8Array(8)), n === void 0 && (n = 0), Me(e >>> 0, r, n), Me(e / 4294967296 >>> 0, r, n + 4), r;
}
B.writeUint64LE = bt;
B.writeInt64LE = bt;
function qt(e, r, n) {
  if (n === void 0 && (n = 0), e % 8 !== 0)
    throw new Error("readUintBE supports only bitLengths divisible by 8");
  if (e / 8 > r.length - n)
    throw new Error("readUintBE: array is too short for the given bitLength");
  for (var i = 0, h = 1, s = e / 8 + n - 1; s >= n; s--)
    i += r[s] * h, h *= 256;
  return i;
}
B.readUintBE = qt;
function Gt(e, r, n) {
  if (n === void 0 && (n = 0), e % 8 !== 0)
    throw new Error("readUintLE supports only bitLengths divisible by 8");
  if (e / 8 > r.length - n)
    throw new Error("readUintLE: array is too short for the given bitLength");
  for (var i = 0, h = 1, s = n; s < n + e / 8; s++)
    i += r[s] * h, h *= 256;
  return i;
}
B.readUintLE = Gt;
function Wt(e, r, n, i) {
  if (n === void 0 && (n = new Uint8Array(e / 8)), i === void 0 && (i = 0), e % 8 !== 0)
    throw new Error("writeUintBE supports only bitLengths divisible by 8");
  if (!ct.isSafeInteger(r))
    throw new Error("writeUintBE value must be an integer");
  for (var h = 1, s = e / 8 + i - 1; s >= i; s--)
    n[s] = r / h & 255, h *= 256;
  return n;
}
B.writeUintBE = Wt;
function Vt(e, r, n, i) {
  if (n === void 0 && (n = new Uint8Array(e / 8)), i === void 0 && (i = 0), e % 8 !== 0)
    throw new Error("writeUintLE supports only bitLengths divisible by 8");
  if (!ct.isSafeInteger(r))
    throw new Error("writeUintLE value must be an integer");
  for (var h = 1, s = i; s < i + e / 8; s++)
    n[s] = r / h & 255, h *= 256;
  return n;
}
B.writeUintLE = Vt;
function $t(e, r) {
  r === void 0 && (r = 0);
  var n = new DataView(e.buffer, e.byteOffset, e.byteLength);
  return n.getFloat32(r);
}
B.readFloat32BE = $t;
function Xt(e, r) {
  r === void 0 && (r = 0);
  var n = new DataView(e.buffer, e.byteOffset, e.byteLength);
  return n.getFloat32(r, !0);
}
B.readFloat32LE = Xt;
function Jt(e, r) {
  r === void 0 && (r = 0);
  var n = new DataView(e.buffer, e.byteOffset, e.byteLength);
  return n.getFloat64(r);
}
B.readFloat64BE = Jt;
function Zt(e, r) {
  r === void 0 && (r = 0);
  var n = new DataView(e.buffer, e.byteOffset, e.byteLength);
  return n.getFloat64(r, !0);
}
B.readFloat64LE = Zt;
function Qt(e, r, n) {
  r === void 0 && (r = new Uint8Array(4)), n === void 0 && (n = 0);
  var i = new DataView(r.buffer, r.byteOffset, r.byteLength);
  return i.setFloat32(n, e), r;
}
B.writeFloat32BE = Qt;
function kt(e, r, n) {
  r === void 0 && (r = new Uint8Array(4)), n === void 0 && (n = 0);
  var i = new DataView(r.buffer, r.byteOffset, r.byteLength);
  return i.setFloat32(n, e, !0), r;
}
B.writeFloat32LE = kt;
function er(e, r, n) {
  r === void 0 && (r = new Uint8Array(8)), n === void 0 && (n = 0);
  var i = new DataView(r.buffer, r.byteOffset, r.byteLength);
  return i.setFloat64(n, e), r;
}
B.writeFloat64BE = er;
function tr(e, r, n) {
  r === void 0 && (r = new Uint8Array(8)), n === void 0 && (n = 0);
  var i = new DataView(r.buffer, r.byteOffset, r.byteLength);
  return i.setFloat64(n, e, !0), r;
}
B.writeFloat64LE = tr;
var de = {};
Object.defineProperty(de, "__esModule", { value: !0 });
function rr(e) {
  for (var r = 0; r < e.length; r++)
    e[r] = 0;
  return e;
}
de.wipe = rr;
Object.defineProperty(Fe, "__esModule", { value: !0 });
var _e = B, Ve = de, nr = 20;
function ir(e, r, n) {
  for (var i = 1634760805, h = 857760878, s = 2036477234, b = 1797285236, a = n[3] << 24 | n[2] << 16 | n[1] << 8 | n[0], f = n[7] << 24 | n[6] << 16 | n[5] << 8 | n[4], o = n[11] << 24 | n[10] << 16 | n[9] << 8 | n[8], c = n[15] << 24 | n[14] << 16 | n[13] << 8 | n[12], v = n[19] << 24 | n[18] << 16 | n[17] << 8 | n[16], d = n[23] << 24 | n[22] << 16 | n[21] << 8 | n[20], _ = n[27] << 24 | n[26] << 16 | n[25] << 8 | n[24], w = n[31] << 24 | n[30] << 16 | n[29] << 8 | n[28], m = r[3] << 24 | r[2] << 16 | r[1] << 8 | r[0], p = r[7] << 24 | r[6] << 16 | r[5] << 8 | r[4], O = r[11] << 24 | r[10] << 16 | r[9] << 8 | r[8], R = r[15] << 24 | r[14] << 16 | r[13] << 8 | r[12], T = i, l = h, E = s, D = b, t = a, u = f, y = o, S = c, U = v, F = d, x = _, L = w, N = m, M = p, g = O, A = R, W = 0; W < nr; W += 2)
    T = T + t | 0, N ^= T, N = N >>> 16 | N << 16, U = U + N | 0, t ^= U, t = t >>> 20 | t << 12, l = l + u | 0, M ^= l, M = M >>> 16 | M << 16, F = F + M | 0, u ^= F, u = u >>> 20 | u << 12, E = E + y | 0, g ^= E, g = g >>> 16 | g << 16, x = x + g | 0, y ^= x, y = y >>> 20 | y << 12, D = D + S | 0, A ^= D, A = A >>> 16 | A << 16, L = L + A | 0, S ^= L, S = S >>> 20 | S << 12, E = E + y | 0, g ^= E, g = g >>> 24 | g << 8, x = x + g | 0, y ^= x, y = y >>> 25 | y << 7, D = D + S | 0, A ^= D, A = A >>> 24 | A << 8, L = L + A | 0, S ^= L, S = S >>> 25 | S << 7, l = l + u | 0, M ^= l, M = M >>> 24 | M << 8, F = F + M | 0, u ^= F, u = u >>> 25 | u << 7, T = T + t | 0, N ^= T, N = N >>> 24 | N << 8, U = U + N | 0, t ^= U, t = t >>> 25 | t << 7, T = T + u | 0, A ^= T, A = A >>> 16 | A << 16, x = x + A | 0, u ^= x, u = u >>> 20 | u << 12, l = l + y | 0, N ^= l, N = N >>> 16 | N << 16, L = L + N | 0, y ^= L, y = y >>> 20 | y << 12, E = E + S | 0, M ^= E, M = M >>> 16 | M << 16, U = U + M | 0, S ^= U, S = S >>> 20 | S << 12, D = D + t | 0, g ^= D, g = g >>> 16 | g << 16, F = F + g | 0, t ^= F, t = t >>> 20 | t << 12, E = E + S | 0, M ^= E, M = M >>> 24 | M << 8, U = U + M | 0, S ^= U, S = S >>> 25 | S << 7, D = D + t | 0, g ^= D, g = g >>> 24 | g << 8, F = F + g | 0, t ^= F, t = t >>> 25 | t << 7, l = l + y | 0, N ^= l, N = N >>> 24 | N << 8, L = L + N | 0, y ^= L, y = y >>> 25 | y << 7, T = T + u | 0, A ^= T, A = A >>> 24 | A << 8, x = x + A | 0, u ^= x, u = u >>> 25 | u << 7;
  _e.writeUint32LE(T + i | 0, e, 0), _e.writeUint32LE(l + h | 0, e, 4), _e.writeUint32LE(E + s | 0, e, 8), _e.writeUint32LE(D + b | 0, e, 12), _e.writeUint32LE(t + a | 0, e, 16), _e.writeUint32LE(u + f | 0, e, 20), _e.writeUint32LE(y + o | 0, e, 24), _e.writeUint32LE(S + c | 0, e, 28), _e.writeUint32LE(U + v | 0, e, 32), _e.writeUint32LE(F + d | 0, e, 36), _e.writeUint32LE(x + _ | 0, e, 40), _e.writeUint32LE(L + w | 0, e, 44), _e.writeUint32LE(N + m | 0, e, 48), _e.writeUint32LE(M + p | 0, e, 52), _e.writeUint32LE(g + O | 0, e, 56), _e.writeUint32LE(A + R | 0, e, 60);
}
function wt(e, r, n, i, h) {
  if (h === void 0 && (h = 0), e.length !== 32)
    throw new Error("ChaCha: key size must be 32 bytes");
  if (i.length < n.length)
    throw new Error("ChaCha: destination is shorter than source");
  var s, b;
  if (h === 0) {
    if (r.length !== 8 && r.length !== 12)
      throw new Error("ChaCha nonce must be 8 or 12 bytes");
    s = new Uint8Array(16), b = s.length - r.length, s.set(r, b);
  } else {
    if (r.length !== 16)
      throw new Error("ChaCha nonce with counter must be 16 bytes");
    s = r, b = h;
  }
  for (var a = new Uint8Array(64), f = 0; f < n.length; f += 64) {
    ir(a, s, e);
    for (var o = f; o < f + 64 && o < n.length; o++)
      i[o] = n[o] ^ a[o - f];
    ar(s, 0, b);
  }
  return Ve.wipe(a), h === 0 && Ve.wipe(s), i;
}
Fe.streamXOR = wt;
function ur(e, r, n, i) {
  return i === void 0 && (i = 0), Ve.wipe(n), wt(e, r, n, n, i);
}
Fe.stream = ur;
function ar(e, r, n) {
  for (var i = 1; n--; )
    i = i + (e[r] & 255) | 0, e[r] = i & 255, i >>>= 8, r++;
  if (i > 0)
    throw new Error("ChaCha: counter overflow");
}
var vt = {}, be = {};
Object.defineProperty(be, "__esModule", { value: !0 });
function fr(e, r, n) {
  return ~(e - 1) & r | e - 1 & n;
}
be.select = fr;
function hr(e, r) {
  return (e | 0) - (r | 0) - 1 >>> 31 & 1;
}
be.lessOrEqual = hr;
function yt(e, r) {
  if (e.length !== r.length)
    return 0;
  for (var n = 0, i = 0; i < e.length; i++)
    n |= e[i] ^ r[i];
  return 1 & n - 1 >>> 8;
}
be.compare = yt;
function sr(e, r) {
  return e.length === 0 || r.length === 0 ? !1 : yt(e, r) !== 0;
}
be.equal = sr;
(function(e) {
  Object.defineProperty(e, "__esModule", { value: !0 });
  var r = be, n = de;
  e.DIGEST_LENGTH = 16;
  var i = (
    /** @class */
    function() {
      function b(a) {
        this.digestLength = e.DIGEST_LENGTH, this._buffer = new Uint8Array(16), this._r = new Uint16Array(10), this._h = new Uint16Array(10), this._pad = new Uint16Array(8), this._leftover = 0, this._fin = 0, this._finished = !1;
        var f = a[0] | a[1] << 8;
        this._r[0] = f & 8191;
        var o = a[2] | a[3] << 8;
        this._r[1] = (f >>> 13 | o << 3) & 8191;
        var c = a[4] | a[5] << 8;
        this._r[2] = (o >>> 10 | c << 6) & 7939;
        var v = a[6] | a[7] << 8;
        this._r[3] = (c >>> 7 | v << 9) & 8191;
        var d = a[8] | a[9] << 8;
        this._r[4] = (v >>> 4 | d << 12) & 255, this._r[5] = d >>> 1 & 8190;
        var _ = a[10] | a[11] << 8;
        this._r[6] = (d >>> 14 | _ << 2) & 8191;
        var w = a[12] | a[13] << 8;
        this._r[7] = (_ >>> 11 | w << 5) & 8065;
        var m = a[14] | a[15] << 8;
        this._r[8] = (w >>> 8 | m << 8) & 8191, this._r[9] = m >>> 5 & 127, this._pad[0] = a[16] | a[17] << 8, this._pad[1] = a[18] | a[19] << 8, this._pad[2] = a[20] | a[21] << 8, this._pad[3] = a[22] | a[23] << 8, this._pad[4] = a[24] | a[25] << 8, this._pad[5] = a[26] | a[27] << 8, this._pad[6] = a[28] | a[29] << 8, this._pad[7] = a[30] | a[31] << 8;
      }
      return b.prototype._blocks = function(a, f, o) {
        for (var c = this._fin ? 0 : 2048, v = this._h[0], d = this._h[1], _ = this._h[2], w = this._h[3], m = this._h[4], p = this._h[5], O = this._h[6], R = this._h[7], T = this._h[8], l = this._h[9], E = this._r[0], D = this._r[1], t = this._r[2], u = this._r[3], y = this._r[4], S = this._r[5], U = this._r[6], F = this._r[7], x = this._r[8], L = this._r[9]; o >= 16; ) {
          var N = a[f + 0] | a[f + 1] << 8;
          v += N & 8191;
          var M = a[f + 2] | a[f + 3] << 8;
          d += (N >>> 13 | M << 3) & 8191;
          var g = a[f + 4] | a[f + 5] << 8;
          _ += (M >>> 10 | g << 6) & 8191;
          var A = a[f + 6] | a[f + 7] << 8;
          w += (g >>> 7 | A << 9) & 8191;
          var W = a[f + 8] | a[f + 9] << 8;
          m += (A >>> 4 | W << 12) & 8191, p += W >>> 1 & 8191;
          var J = a[f + 10] | a[f + 11] << 8;
          O += (W >>> 14 | J << 2) & 8191;
          var X = a[f + 12] | a[f + 13] << 8;
          R += (J >>> 11 | X << 5) & 8191;
          var $ = a[f + 14] | a[f + 15] << 8;
          T += (X >>> 8 | $ << 8) & 8191, l += $ >>> 5 | c;
          var C = 0, P = C;
          P += v * E, P += d * (5 * L), P += _ * (5 * x), P += w * (5 * F), P += m * (5 * U), C = P >>> 13, P &= 8191, P += p * (5 * S), P += O * (5 * y), P += R * (5 * u), P += T * (5 * t), P += l * (5 * D), C += P >>> 13, P &= 8191;
          var j = C;
          j += v * D, j += d * E, j += _ * (5 * L), j += w * (5 * x), j += m * (5 * F), C = j >>> 13, j &= 8191, j += p * (5 * U), j += O * (5 * S), j += R * (5 * y), j += T * (5 * u), j += l * (5 * t), C += j >>> 13, j &= 8191;
          var I = C;
          I += v * t, I += d * D, I += _ * E, I += w * (5 * L), I += m * (5 * x), C = I >>> 13, I &= 8191, I += p * (5 * F), I += O * (5 * U), I += R * (5 * S), I += T * (5 * y), I += l * (5 * u), C += I >>> 13, I &= 8191;
          var H = C;
          H += v * u, H += d * t, H += _ * D, H += w * E, H += m * (5 * L), C = H >>> 13, H &= 8191, H += p * (5 * x), H += O * (5 * F), H += R * (5 * U), H += T * (5 * S), H += l * (5 * y), C += H >>> 13, H &= 8191;
          var K = C;
          K += v * y, K += d * u, K += _ * t, K += w * D, K += m * E, C = K >>> 13, K &= 8191, K += p * (5 * L), K += O * (5 * x), K += R * (5 * F), K += T * (5 * U), K += l * (5 * S), C += K >>> 13, K &= 8191;
          var z = C;
          z += v * S, z += d * y, z += _ * u, z += w * t, z += m * D, C = z >>> 13, z &= 8191, z += p * E, z += O * (5 * L), z += R * (5 * x), z += T * (5 * F), z += l * (5 * U), C += z >>> 13, z &= 8191;
          var Y = C;
          Y += v * U, Y += d * S, Y += _ * y, Y += w * u, Y += m * t, C = Y >>> 13, Y &= 8191, Y += p * D, Y += O * E, Y += R * (5 * L), Y += T * (5 * x), Y += l * (5 * F), C += Y >>> 13, Y &= 8191;
          var q = C;
          q += v * F, q += d * U, q += _ * S, q += w * y, q += m * u, C = q >>> 13, q &= 8191, q += p * t, q += O * D, q += R * E, q += T * (5 * L), q += l * (5 * x), C += q >>> 13, q &= 8191;
          var G = C;
          G += v * x, G += d * F, G += _ * U, G += w * S, G += m * y, C = G >>> 13, G &= 8191, G += p * u, G += O * t, G += R * D, G += T * E, G += l * (5 * L), C += G >>> 13, G &= 8191;
          var V = C;
          V += v * L, V += d * x, V += _ * F, V += w * U, V += m * S, C = V >>> 13, V &= 8191, V += p * y, V += O * u, V += R * t, V += T * D, V += l * E, C += V >>> 13, V &= 8191, C = (C << 2) + C | 0, C = C + P | 0, P = C & 8191, C = C >>> 13, j += C, v = P, d = j, _ = I, w = H, m = K, p = z, O = Y, R = q, T = G, l = V, f += 16, o -= 16;
        }
        this._h[0] = v, this._h[1] = d, this._h[2] = _, this._h[3] = w, this._h[4] = m, this._h[5] = p, this._h[6] = O, this._h[7] = R, this._h[8] = T, this._h[9] = l;
      }, b.prototype.finish = function(a, f) {
        f === void 0 && (f = 0);
        var o = new Uint16Array(10), c, v, d, _;
        if (this._leftover) {
          for (_ = this._leftover, this._buffer[_++] = 1; _ < 16; _++)
            this._buffer[_] = 0;
          this._fin = 1, this._blocks(this._buffer, 0, 16);
        }
        for (c = this._h[1] >>> 13, this._h[1] &= 8191, _ = 2; _ < 10; _++)
          this._h[_] += c, c = this._h[_] >>> 13, this._h[_] &= 8191;
        for (this._h[0] += c * 5, c = this._h[0] >>> 13, this._h[0] &= 8191, this._h[1] += c, c = this._h[1] >>> 13, this._h[1] &= 8191, this._h[2] += c, o[0] = this._h[0] + 5, c = o[0] >>> 13, o[0] &= 8191, _ = 1; _ < 10; _++)
          o[_] = this._h[_] + c, c = o[_] >>> 13, o[_] &= 8191;
        for (o[9] -= 8192, v = (c ^ 1) - 1, _ = 0; _ < 10; _++)
          o[_] &= v;
        for (v = ~v, _ = 0; _ < 10; _++)
          this._h[_] = this._h[_] & v | o[_];
        for (this._h[0] = (this._h[0] | this._h[1] << 13) & 65535, this._h[1] = (this._h[1] >>> 3 | this._h[2] << 10) & 65535, this._h[2] = (this._h[2] >>> 6 | this._h[3] << 7) & 65535, this._h[3] = (this._h[3] >>> 9 | this._h[4] << 4) & 65535, this._h[4] = (this._h[4] >>> 12 | this._h[5] << 1 | this._h[6] << 14) & 65535, this._h[5] = (this._h[6] >>> 2 | this._h[7] << 11) & 65535, this._h[6] = (this._h[7] >>> 5 | this._h[8] << 8) & 65535, this._h[7] = (this._h[8] >>> 8 | this._h[9] << 5) & 65535, d = this._h[0] + this._pad[0], this._h[0] = d & 65535, _ = 1; _ < 8; _++)
          d = (this._h[_] + this._pad[_] | 0) + (d >>> 16) | 0, this._h[_] = d & 65535;
        return a[f + 0] = this._h[0] >>> 0, a[f + 1] = this._h[0] >>> 8, a[f + 2] = this._h[1] >>> 0, a[f + 3] = this._h[1] >>> 8, a[f + 4] = this._h[2] >>> 0, a[f + 5] = this._h[2] >>> 8, a[f + 6] = this._h[3] >>> 0, a[f + 7] = this._h[3] >>> 8, a[f + 8] = this._h[4] >>> 0, a[f + 9] = this._h[4] >>> 8, a[f + 10] = this._h[5] >>> 0, a[f + 11] = this._h[5] >>> 8, a[f + 12] = this._h[6] >>> 0, a[f + 13] = this._h[6] >>> 8, a[f + 14] = this._h[7] >>> 0, a[f + 15] = this._h[7] >>> 8, this._finished = !0, this;
      }, b.prototype.update = function(a) {
        var f = 0, o = a.length, c;
        if (this._leftover) {
          c = 16 - this._leftover, c > o && (c = o);
          for (var v = 0; v < c; v++)
            this._buffer[this._leftover + v] = a[f + v];
          if (o -= c, f += c, this._leftover += c, this._leftover < 16)
            return this;
          this._blocks(this._buffer, 0, 16), this._leftover = 0;
        }
        if (o >= 16 && (c = o - o % 16, this._blocks(a, f, c), f += c, o -= c), o) {
          for (var v = 0; v < o; v++)
            this._buffer[this._leftover + v] = a[f + v];
          this._leftover += o;
        }
        return this;
      }, b.prototype.digest = function() {
        if (this._finished)
          throw new Error("Poly1305 was finished");
        var a = new Uint8Array(16);
        return this.finish(a), a;
      }, b.prototype.clean = function() {
        return n.wipe(this._buffer), n.wipe(this._r), n.wipe(this._h), n.wipe(this._pad), this._leftover = 0, this._fin = 0, this._finished = !0, this;
      }, b;
    }()
  );
  e.Poly1305 = i;
  function h(b, a) {
    var f = new i(b);
    f.update(a);
    var o = f.digest();
    return f.clean(), o;
  }
  e.oneTimeAuth = h;
  function s(b, a) {
    return b.length !== e.DIGEST_LENGTH || a.length !== e.DIGEST_LENGTH ? !1 : r.equal(b, a);
  }
  e.equal = s;
})(vt);
(function(e) {
  Object.defineProperty(e, "__esModule", { value: !0 });
  var r = Fe, n = vt, i = de, h = B, s = be;
  e.KEY_LENGTH = 32, e.NONCE_LENGTH = 12, e.TAG_LENGTH = 16;
  var b = new Uint8Array(16), a = (
    /** @class */
    function() {
      function f(o) {
        if (this.nonceLength = e.NONCE_LENGTH, this.tagLength = e.TAG_LENGTH, o.length !== e.KEY_LENGTH)
          throw new Error("ChaCha20Poly1305 needs 32-byte key");
        this._key = new Uint8Array(o);
      }
      return f.prototype.seal = function(o, c, v, d) {
        if (o.length > 16)
          throw new Error("ChaCha20Poly1305: incorrect nonce length");
        var _ = new Uint8Array(16);
        _.set(o, _.length - o.length);
        var w = new Uint8Array(32);
        r.stream(this._key, _, w, 4);
        var m = c.length + this.tagLength, p;
        if (d) {
          if (d.length !== m)
            throw new Error("ChaCha20Poly1305: incorrect destination length");
          p = d;
        } else
          p = new Uint8Array(m);
        return r.streamXOR(this._key, _, c, p, 4), this._authenticate(p.subarray(p.length - this.tagLength, p.length), w, p.subarray(0, p.length - this.tagLength), v), i.wipe(_), p;
      }, f.prototype.open = function(o, c, v, d) {
        if (o.length > 16)
          throw new Error("ChaCha20Poly1305: incorrect nonce length");
        if (c.length < this.tagLength)
          return null;
        var _ = new Uint8Array(16);
        _.set(o, _.length - o.length);
        var w = new Uint8Array(32);
        r.stream(this._key, _, w, 4);
        var m = new Uint8Array(this.tagLength);
        if (this._authenticate(m, w, c.subarray(0, c.length - this.tagLength), v), !s.equal(m, c.subarray(c.length - this.tagLength, c.length)))
          return null;
        var p = c.length - this.tagLength, O;
        if (d) {
          if (d.length !== p)
            throw new Error("ChaCha20Poly1305: incorrect destination length");
          O = d;
        } else
          O = new Uint8Array(p);
        return r.streamXOR(this._key, _, c.subarray(0, c.length - this.tagLength), O, 4), i.wipe(_), O;
      }, f.prototype.clean = function() {
        return i.wipe(this._key), this;
      }, f.prototype._authenticate = function(o, c, v, d) {
        var _ = new n.Poly1305(c);
        d && (_.update(d), d.length % 16 > 0 && _.update(b.subarray(d.length % 16))), _.update(v), v.length % 16 > 0 && _.update(b.subarray(v.length % 16));
        var w = new Uint8Array(8);
        d && h.writeUint64LE(d.length, w), _.update(w), h.writeUint64LE(v.length, w), _.update(w);
        for (var m = _.digest(), p = 0; p < m.length; p++)
          o[p] = m[p];
        _.clean(), i.wipe(m), i.wipe(w);
      }, f;
    }()
  );
  e.ChaCha20Poly1305 = a;
})(xt);
var gt = {}, Ae = {}, Ze = {};
Object.defineProperty(Ze, "__esModule", { value: !0 });
function or(e) {
  return typeof e.saveState < "u" && typeof e.restoreState < "u" && typeof e.cleanSavedState < "u";
}
Ze.isSerializableHash = or;
Object.defineProperty(Ae, "__esModule", { value: !0 });
var Ee = Ze, lr = be, Dr = de, St = (
  /** @class */
  function() {
    function e(r, n) {
      this._finished = !1, this._inner = new r(), this._outer = new r(), this.blockSize = this._outer.blockSize, this.digestLength = this._outer.digestLength;
      var i = new Uint8Array(this.blockSize);
      n.length > this.blockSize ? this._inner.update(n).finish(i).clean() : i.set(n);
      for (var h = 0; h < i.length; h++)
        i[h] ^= 54;
      this._inner.update(i);
      for (var h = 0; h < i.length; h++)
        i[h] ^= 106;
      this._outer.update(i), Ee.isSerializableHash(this._inner) && Ee.isSerializableHash(this._outer) && (this._innerKeyedState = this._inner.saveState(), this._outerKeyedState = this._outer.saveState()), Dr.wipe(i);
    }
    return e.prototype.reset = function() {
      if (!Ee.isSerializableHash(this._inner) || !Ee.isSerializableHash(this._outer))
        throw new Error("hmac: can't reset() because hash doesn't implement restoreState()");
      return this._inner.restoreState(this._innerKeyedState), this._outer.restoreState(this._outerKeyedState), this._finished = !1, this;
    }, e.prototype.clean = function() {
      Ee.isSerializableHash(this._inner) && this._inner.cleanSavedState(this._innerKeyedState), Ee.isSerializableHash(this._outer) && this._outer.cleanSavedState(this._outerKeyedState), this._inner.clean(), this._outer.clean();
    }, e.prototype.update = function(r) {
      return this._inner.update(r), this;
    }, e.prototype.finish = function(r) {
      return this._finished ? (this._outer.finish(r), this) : (this._inner.finish(r), this._outer.update(r.subarray(0, this.digestLength)).finish(r), this._finished = !0, this);
    }, e.prototype.digest = function() {
      var r = new Uint8Array(this.digestLength);
      return this.finish(r), r;
    }, e.prototype.saveState = function() {
      if (!Ee.isSerializableHash(this._inner))
        throw new Error("hmac: can't saveState() because hash doesn't implement it");
      return this._inner.saveState();
    }, e.prototype.restoreState = function(r) {
      if (!Ee.isSerializableHash(this._inner) || !Ee.isSerializableHash(this._outer))
        throw new Error("hmac: can't restoreState() because hash doesn't implement it");
      return this._inner.restoreState(r), this._outer.restoreState(this._outerKeyedState), this._finished = !1, this;
    }, e.prototype.cleanSavedState = function(r) {
      if (!Ee.isSerializableHash(this._inner))
        throw new Error("hmac: can't cleanSavedState() because hash doesn't implement it");
      this._inner.cleanSavedState(r);
    }, e;
  }()
);
Ae.HMAC = St;
function cr(e, r, n) {
  var i = new St(e, r);
  i.update(n);
  var h = i.digest();
  return i.clean(), h;
}
Ae.hmac = cr;
Ae.equal = lr.equal;
Object.defineProperty(gt, "__esModule", { value: !0 });
var ke = Ae, et = de, _r = (
  /** @class */
  function() {
    function e(r, n, i, h) {
      i === void 0 && (i = new Uint8Array(0)), this._counter = new Uint8Array(1), this._hash = r, this._info = h;
      var s = ke.hmac(this._hash, i, n);
      this._hmac = new ke.HMAC(r, s), this._buffer = new Uint8Array(this._hmac.digestLength), this._bufpos = this._buffer.length;
    }
    return e.prototype._fillBuffer = function() {
      this._counter[0]++;
      var r = this._counter[0];
      if (r === 0)
        throw new Error("hkdf: cannot expand more");
      this._hmac.reset(), r > 1 && this._hmac.update(this._buffer), this._info && this._hmac.update(this._info), this._hmac.update(this._counter), this._hmac.finish(this._buffer), this._bufpos = 0;
    }, e.prototype.expand = function(r) {
      for (var n = new Uint8Array(r), i = 0; i < n.length; i++)
        this._bufpos === this._buffer.length && this._fillBuffer(), n[i] = this._buffer[this._bufpos++];
      return n;
    }, e.prototype.clean = function() {
      this._hmac.clean(), et.wipe(this._buffer), et.wipe(this._counter), this._bufpos = 0;
    }, e;
  }()
), Kn = gt.HKDF = _r, pt = {}, Le = {}, Be = {};
Object.defineProperty(Be, "__esModule", { value: !0 });
Be.BrowserRandomSource = void 0;
const tt = 65536;
class dr {
  constructor() {
    this.isAvailable = !1, this.isInstantiated = !1;
    const r = typeof self < "u" ? self.crypto || self.msCrypto : null;
    r && r.getRandomValues !== void 0 && (this._crypto = r, this.isAvailable = !0, this.isInstantiated = !0);
  }
  randomBytes(r) {
    if (!this.isAvailable || !this._crypto)
      throw new Error("Browser random byte generator is not available.");
    const n = new Uint8Array(r);
    for (let i = 0; i < n.length; i += tt)
      this._crypto.getRandomValues(n.subarray(i, i + Math.min(n.length - i, tt)));
    return n;
  }
}
Be.BrowserRandomSource = dr;
var xe = {};
Object.defineProperty(xe, "__esModule", { value: !0 });
xe.NodeRandomSource = void 0;
const Er = de;
class br {
  constructor() {
    if (this.isAvailable = !1, this.isInstantiated = !1, typeof Nt < "u") {
      const r = Mt();
      r && r.randomBytes && (this._crypto = r, this.isAvailable = !0, this.isInstantiated = !0);
    }
  }
  randomBytes(r) {
    if (!this.isAvailable || !this._crypto)
      throw new Error("Node.js random byte generator is not available.");
    let n = this._crypto.randomBytes(r);
    if (n.length !== r)
      throw new Error("NodeRandomSource: got fewer bytes than requested");
    const i = new Uint8Array(r);
    for (let h = 0; h < i.length; h++)
      i[h] = n[h];
    return (0, Er.wipe)(n), i;
  }
}
xe.NodeRandomSource = br;
Object.defineProperty(Le, "__esModule", { value: !0 });
Le.SystemRandomSource = void 0;
const wr = Be, vr = xe;
class yr {
  constructor() {
    if (this.isAvailable = !1, this.name = "", this._source = new wr.BrowserRandomSource(), this._source.isAvailable) {
      this.isAvailable = !0, this.name = "Browser";
      return;
    }
    if (this._source = new vr.NodeRandomSource(), this._source.isAvailable) {
      this.isAvailable = !0, this.name = "Node";
      return;
    }
  }
  randomBytes(r) {
    if (!this.isAvailable)
      throw new Error("System random byte generator is not available.");
    return this._source.randomBytes(r);
  }
}
Le.SystemRandomSource = yr;
(function(e) {
  Object.defineProperty(e, "__esModule", { value: !0 }), e.randomStringForEntropy = e.randomString = e.randomUint32 = e.randomBytes = e.defaultRandomSource = void 0;
  const r = Le, n = B, i = de;
  e.defaultRandomSource = new r.SystemRandomSource();
  function h(o, c = e.defaultRandomSource) {
    return c.randomBytes(o);
  }
  e.randomBytes = h;
  function s(o = e.defaultRandomSource) {
    const c = h(4, o), v = (0, n.readUint32LE)(c);
    return (0, i.wipe)(c), v;
  }
  e.randomUint32 = s;
  const b = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
  function a(o, c = b, v = e.defaultRandomSource) {
    if (c.length < 2)
      throw new Error("randomString charset is too short");
    if (c.length > 256)
      throw new Error("randomString charset is too long");
    let d = "";
    const _ = c.length, w = 256 - 256 % _;
    for (; o > 0; ) {
      const m = h(Math.ceil(o * 256 / w), v);
      for (let p = 0; p < m.length && o > 0; p++) {
        const O = m[p];
        O < w && (d += c.charAt(O % _), o--);
      }
      (0, i.wipe)(m);
    }
    return d;
  }
  e.randomString = a;
  function f(o, c = b, v = e.defaultRandomSource) {
    const d = Math.ceil(o / (Math.log(c.length) / Math.LN2));
    return a(d, c, v);
  }
  e.randomStringForEntropy = f;
})(pt);
var gr = {};
(function(e) {
  Object.defineProperty(e, "__esModule", { value: !0 });
  var r = B, n = de;
  e.DIGEST_LENGTH = 32, e.BLOCK_SIZE = 64;
  var i = (
    /** @class */
    function() {
      function a() {
        this.digestLength = e.DIGEST_LENGTH, this.blockSize = e.BLOCK_SIZE, this._state = new Int32Array(8), this._temp = new Int32Array(64), this._buffer = new Uint8Array(128), this._bufferLength = 0, this._bytesHashed = 0, this._finished = !1, this.reset();
      }
      return a.prototype._initState = function() {
        this._state[0] = 1779033703, this._state[1] = 3144134277, this._state[2] = 1013904242, this._state[3] = 2773480762, this._state[4] = 1359893119, this._state[5] = 2600822924, this._state[6] = 528734635, this._state[7] = 1541459225;
      }, a.prototype.reset = function() {
        return this._initState(), this._bufferLength = 0, this._bytesHashed = 0, this._finished = !1, this;
      }, a.prototype.clean = function() {
        n.wipe(this._buffer), n.wipe(this._temp), this.reset();
      }, a.prototype.update = function(f, o) {
        if (o === void 0 && (o = f.length), this._finished)
          throw new Error("SHA256: can't update because hash was finished.");
        var c = 0;
        if (this._bytesHashed += o, this._bufferLength > 0) {
          for (; this._bufferLength < this.blockSize && o > 0; )
            this._buffer[this._bufferLength++] = f[c++], o--;
          this._bufferLength === this.blockSize && (s(this._temp, this._state, this._buffer, 0, this.blockSize), this._bufferLength = 0);
        }
        for (o >= this.blockSize && (c = s(this._temp, this._state, f, c, o), o %= this.blockSize); o > 0; )
          this._buffer[this._bufferLength++] = f[c++], o--;
        return this;
      }, a.prototype.finish = function(f) {
        if (!this._finished) {
          var o = this._bytesHashed, c = this._bufferLength, v = o / 536870912 | 0, d = o << 3, _ = o % 64 < 56 ? 64 : 128;
          this._buffer[c] = 128;
          for (var w = c + 1; w < _ - 8; w++)
            this._buffer[w] = 0;
          r.writeUint32BE(v, this._buffer, _ - 8), r.writeUint32BE(d, this._buffer, _ - 4), s(this._temp, this._state, this._buffer, 0, _), this._finished = !0;
        }
        for (var w = 0; w < this.digestLength / 4; w++)
          r.writeUint32BE(this._state[w], f, w * 4);
        return this;
      }, a.prototype.digest = function() {
        var f = new Uint8Array(this.digestLength);
        return this.finish(f), f;
      }, a.prototype.saveState = function() {
        if (this._finished)
          throw new Error("SHA256: cannot save finished state");
        return {
          state: new Int32Array(this._state),
          buffer: this._bufferLength > 0 ? new Uint8Array(this._buffer) : void 0,
          bufferLength: this._bufferLength,
          bytesHashed: this._bytesHashed
        };
      }, a.prototype.restoreState = function(f) {
        return this._state.set(f.state), this._bufferLength = f.bufferLength, f.buffer && this._buffer.set(f.buffer), this._bytesHashed = f.bytesHashed, this._finished = !1, this;
      }, a.prototype.cleanSavedState = function(f) {
        n.wipe(f.state), f.buffer && n.wipe(f.buffer), f.bufferLength = 0, f.bytesHashed = 0;
      }, a;
    }()
  );
  e.SHA256 = i;
  var h = new Int32Array([
    1116352408,
    1899447441,
    3049323471,
    3921009573,
    961987163,
    1508970993,
    2453635748,
    2870763221,
    3624381080,
    310598401,
    607225278,
    1426881987,
    1925078388,
    2162078206,
    2614888103,
    3248222580,
    3835390401,
    4022224774,
    264347078,
    604807628,
    770255983,
    1249150122,
    1555081692,
    1996064986,
    2554220882,
    2821834349,
    2952996808,
    3210313671,
    3336571891,
    3584528711,
    113926993,
    338241895,
    666307205,
    773529912,
    1294757372,
    1396182291,
    1695183700,
    1986661051,
    2177026350,
    2456956037,
    2730485921,
    2820302411,
    3259730800,
    3345764771,
    3516065817,
    3600352804,
    4094571909,
    275423344,
    430227734,
    506948616,
    659060556,
    883997877,
    958139571,
    1322822218,
    1537002063,
    1747873779,
    1955562222,
    2024104815,
    2227730452,
    2361852424,
    2428436474,
    2756734187,
    3204031479,
    3329325298
  ]);
  function s(a, f, o, c, v) {
    for (; v >= 64; ) {
      for (var d = f[0], _ = f[1], w = f[2], m = f[3], p = f[4], O = f[5], R = f[6], T = f[7], l = 0; l < 16; l++) {
        var E = c + l * 4;
        a[l] = r.readUint32BE(o, E);
      }
      for (var l = 16; l < 64; l++) {
        var D = a[l - 2], t = (D >>> 17 | D << 15) ^ (D >>> 19 | D << 13) ^ D >>> 10;
        D = a[l - 15];
        var u = (D >>> 7 | D << 25) ^ (D >>> 18 | D << 14) ^ D >>> 3;
        a[l] = (t + a[l - 7] | 0) + (u + a[l - 16] | 0);
      }
      for (var l = 0; l < 64; l++) {
        var t = (((p >>> 6 | p << 26) ^ (p >>> 11 | p << 21) ^ (p >>> 25 | p << 7)) + (p & O ^ ~p & R) | 0) + (T + (h[l] + a[l] | 0) | 0) | 0, u = ((d >>> 2 | d << 30) ^ (d >>> 13 | d << 19) ^ (d >>> 22 | d << 10)) + (d & _ ^ d & w ^ _ & w) | 0;
        T = R, R = O, O = p, p = m + t | 0, m = w, w = _, _ = d, d = t + u | 0;
      }
      f[0] += d, f[1] += _, f[2] += w, f[3] += m, f[4] += p, f[5] += O, f[6] += R, f[7] += T, c += 64, v -= 64;
    }
    return c;
  }
  function b(a) {
    var f = new i();
    f.update(a);
    var o = f.digest();
    return f.clean(), o;
  }
  e.hash = b;
})(gr);
var Sr = {};
(function(e) {
  Object.defineProperty(e, "__esModule", { value: !0 }), e.sharedKey = e.generateKeyPair = e.generateKeyPairFromSeed = e.scalarMultBase = e.scalarMult = e.SHARED_KEY_LENGTH = e.SECRET_KEY_LENGTH = e.PUBLIC_KEY_LENGTH = void 0;
  const r = pt, n = de;
  e.PUBLIC_KEY_LENGTH = 32, e.SECRET_KEY_LENGTH = 32, e.SHARED_KEY_LENGTH = 32;
  function i(l) {
    const E = new Float64Array(16);
    if (l)
      for (let D = 0; D < l.length; D++)
        E[D] = l[D];
    return E;
  }
  const h = new Uint8Array(32);
  h[0] = 9;
  const s = i([56129, 1]);
  function b(l) {
    let E = 1;
    for (let D = 0; D < 16; D++) {
      let t = l[D] + E + 65535;
      E = Math.floor(t / 65536), l[D] = t - E * 65536;
    }
    l[0] += E - 1 + 37 * (E - 1);
  }
  function a(l, E, D) {
    const t = ~(D - 1);
    for (let u = 0; u < 16; u++) {
      const y = t & (l[u] ^ E[u]);
      l[u] ^= y, E[u] ^= y;
    }
  }
  function f(l, E) {
    const D = i(), t = i();
    for (let u = 0; u < 16; u++)
      t[u] = E[u];
    b(t), b(t), b(t);
    for (let u = 0; u < 2; u++) {
      D[0] = t[0] - 65517;
      for (let S = 1; S < 15; S++)
        D[S] = t[S] - 65535 - (D[S - 1] >> 16 & 1), D[S - 1] &= 65535;
      D[15] = t[15] - 32767 - (D[14] >> 16 & 1);
      const y = D[15] >> 16 & 1;
      D[14] &= 65535, a(t, D, 1 - y);
    }
    for (let u = 0; u < 16; u++)
      l[2 * u] = t[u] & 255, l[2 * u + 1] = t[u] >> 8;
  }
  function o(l, E) {
    for (let D = 0; D < 16; D++)
      l[D] = E[2 * D] + (E[2 * D + 1] << 8);
    l[15] &= 32767;
  }
  function c(l, E, D) {
    for (let t = 0; t < 16; t++)
      l[t] = E[t] + D[t];
  }
  function v(l, E, D) {
    for (let t = 0; t < 16; t++)
      l[t] = E[t] - D[t];
  }
  function d(l, E, D) {
    let t, u, y = 0, S = 0, U = 0, F = 0, x = 0, L = 0, N = 0, M = 0, g = 0, A = 0, W = 0, J = 0, X = 0, $ = 0, C = 0, P = 0, j = 0, I = 0, H = 0, K = 0, z = 0, Y = 0, q = 0, G = 0, V = 0, we = 0, ge = 0, pe = 0, Te = 0, je = 0, Qe = 0, Q = D[0], k = D[1], ee = D[2], te = D[3], re = D[4], ne = D[5], ie = D[6], ue = D[7], ae = D[8], fe = D[9], he = D[10], se = D[11], oe = D[12], le = D[13], De = D[14], ce = D[15];
    t = E[0], y += t * Q, S += t * k, U += t * ee, F += t * te, x += t * re, L += t * ne, N += t * ie, M += t * ue, g += t * ae, A += t * fe, W += t * he, J += t * se, X += t * oe, $ += t * le, C += t * De, P += t * ce, t = E[1], S += t * Q, U += t * k, F += t * ee, x += t * te, L += t * re, N += t * ne, M += t * ie, g += t * ue, A += t * ae, W += t * fe, J += t * he, X += t * se, $ += t * oe, C += t * le, P += t * De, j += t * ce, t = E[2], U += t * Q, F += t * k, x += t * ee, L += t * te, N += t * re, M += t * ne, g += t * ie, A += t * ue, W += t * ae, J += t * fe, X += t * he, $ += t * se, C += t * oe, P += t * le, j += t * De, I += t * ce, t = E[3], F += t * Q, x += t * k, L += t * ee, N += t * te, M += t * re, g += t * ne, A += t * ie, W += t * ue, J += t * ae, X += t * fe, $ += t * he, C += t * se, P += t * oe, j += t * le, I += t * De, H += t * ce, t = E[4], x += t * Q, L += t * k, N += t * ee, M += t * te, g += t * re, A += t * ne, W += t * ie, J += t * ue, X += t * ae, $ += t * fe, C += t * he, P += t * se, j += t * oe, I += t * le, H += t * De, K += t * ce, t = E[5], L += t * Q, N += t * k, M += t * ee, g += t * te, A += t * re, W += t * ne, J += t * ie, X += t * ue, $ += t * ae, C += t * fe, P += t * he, j += t * se, I += t * oe, H += t * le, K += t * De, z += t * ce, t = E[6], N += t * Q, M += t * k, g += t * ee, A += t * te, W += t * re, J += t * ne, X += t * ie, $ += t * ue, C += t * ae, P += t * fe, j += t * he, I += t * se, H += t * oe, K += t * le, z += t * De, Y += t * ce, t = E[7], M += t * Q, g += t * k, A += t * ee, W += t * te, J += t * re, X += t * ne, $ += t * ie, C += t * ue, P += t * ae, j += t * fe, I += t * he, H += t * se, K += t * oe, z += t * le, Y += t * De, q += t * ce, t = E[8], g += t * Q, A += t * k, W += t * ee, J += t * te, X += t * re, $ += t * ne, C += t * ie, P += t * ue, j += t * ae, I += t * fe, H += t * he, K += t * se, z += t * oe, Y += t * le, q += t * De, G += t * ce, t = E[9], A += t * Q, W += t * k, J += t * ee, X += t * te, $ += t * re, C += t * ne, P += t * ie, j += t * ue, I += t * ae, H += t * fe, K += t * he, z += t * se, Y += t * oe, q += t * le, G += t * De, V += t * ce, t = E[10], W += t * Q, J += t * k, X += t * ee, $ += t * te, C += t * re, P += t * ne, j += t * ie, I += t * ue, H += t * ae, K += t * fe, z += t * he, Y += t * se, q += t * oe, G += t * le, V += t * De, we += t * ce, t = E[11], J += t * Q, X += t * k, $ += t * ee, C += t * te, P += t * re, j += t * ne, I += t * ie, H += t * ue, K += t * ae, z += t * fe, Y += t * he, q += t * se, G += t * oe, V += t * le, we += t * De, ge += t * ce, t = E[12], X += t * Q, $ += t * k, C += t * ee, P += t * te, j += t * re, I += t * ne, H += t * ie, K += t * ue, z += t * ae, Y += t * fe, q += t * he, G += t * se, V += t * oe, we += t * le, ge += t * De, pe += t * ce, t = E[13], $ += t * Q, C += t * k, P += t * ee, j += t * te, I += t * re, H += t * ne, K += t * ie, z += t * ue, Y += t * ae, q += t * fe, G += t * he, V += t * se, we += t * oe, ge += t * le, pe += t * De, Te += t * ce, t = E[14], C += t * Q, P += t * k, j += t * ee, I += t * te, H += t * re, K += t * ne, z += t * ie, Y += t * ue, q += t * ae, G += t * fe, V += t * he, we += t * se, ge += t * oe, pe += t * le, Te += t * De, je += t * ce, t = E[15], P += t * Q, j += t * k, I += t * ee, H += t * te, K += t * re, z += t * ne, Y += t * ie, q += t * ue, G += t * ae, V += t * fe, we += t * he, ge += t * se, pe += t * oe, Te += t * le, je += t * De, Qe += t * ce, y += 38 * j, S += 38 * I, U += 38 * H, F += 38 * K, x += 38 * z, L += 38 * Y, N += 38 * q, M += 38 * G, g += 38 * V, A += 38 * we, W += 38 * ge, J += 38 * pe, X += 38 * Te, $ += 38 * je, C += 38 * Qe, u = 1, t = y + u + 65535, u = Math.floor(t / 65536), y = t - u * 65536, t = S + u + 65535, u = Math.floor(t / 65536), S = t - u * 65536, t = U + u + 65535, u = Math.floor(t / 65536), U = t - u * 65536, t = F + u + 65535, u = Math.floor(t / 65536), F = t - u * 65536, t = x + u + 65535, u = Math.floor(t / 65536), x = t - u * 65536, t = L + u + 65535, u = Math.floor(t / 65536), L = t - u * 65536, t = N + u + 65535, u = Math.floor(t / 65536), N = t - u * 65536, t = M + u + 65535, u = Math.floor(t / 65536), M = t - u * 65536, t = g + u + 65535, u = Math.floor(t / 65536), g = t - u * 65536, t = A + u + 65535, u = Math.floor(t / 65536), A = t - u * 65536, t = W + u + 65535, u = Math.floor(t / 65536), W = t - u * 65536, t = J + u + 65535, u = Math.floor(t / 65536), J = t - u * 65536, t = X + u + 65535, u = Math.floor(t / 65536), X = t - u * 65536, t = $ + u + 65535, u = Math.floor(t / 65536), $ = t - u * 65536, t = C + u + 65535, u = Math.floor(t / 65536), C = t - u * 65536, t = P + u + 65535, u = Math.floor(t / 65536), P = t - u * 65536, y += u - 1 + 37 * (u - 1), u = 1, t = y + u + 65535, u = Math.floor(t / 65536), y = t - u * 65536, t = S + u + 65535, u = Math.floor(t / 65536), S = t - u * 65536, t = U + u + 65535, u = Math.floor(t / 65536), U = t - u * 65536, t = F + u + 65535, u = Math.floor(t / 65536), F = t - u * 65536, t = x + u + 65535, u = Math.floor(t / 65536), x = t - u * 65536, t = L + u + 65535, u = Math.floor(t / 65536), L = t - u * 65536, t = N + u + 65535, u = Math.floor(t / 65536), N = t - u * 65536, t = M + u + 65535, u = Math.floor(t / 65536), M = t - u * 65536, t = g + u + 65535, u = Math.floor(t / 65536), g = t - u * 65536, t = A + u + 65535, u = Math.floor(t / 65536), A = t - u * 65536, t = W + u + 65535, u = Math.floor(t / 65536), W = t - u * 65536, t = J + u + 65535, u = Math.floor(t / 65536), J = t - u * 65536, t = X + u + 65535, u = Math.floor(t / 65536), X = t - u * 65536, t = $ + u + 65535, u = Math.floor(t / 65536), $ = t - u * 65536, t = C + u + 65535, u = Math.floor(t / 65536), C = t - u * 65536, t = P + u + 65535, u = Math.floor(t / 65536), P = t - u * 65536, y += u - 1 + 37 * (u - 1), l[0] = y, l[1] = S, l[2] = U, l[3] = F, l[4] = x, l[5] = L, l[6] = N, l[7] = M, l[8] = g, l[9] = A, l[10] = W, l[11] = J, l[12] = X, l[13] = $, l[14] = C, l[15] = P;
  }
  function _(l, E) {
    d(l, E, E);
  }
  function w(l, E) {
    const D = i();
    for (let t = 0; t < 16; t++)
      D[t] = E[t];
    for (let t = 253; t >= 0; t--)
      _(D, D), t !== 2 && t !== 4 && d(D, D, E);
    for (let t = 0; t < 16; t++)
      l[t] = D[t];
  }
  function m(l, E) {
    const D = new Uint8Array(32), t = new Float64Array(80), u = i(), y = i(), S = i(), U = i(), F = i(), x = i();
    for (let g = 0; g < 31; g++)
      D[g] = l[g];
    D[31] = l[31] & 127 | 64, D[0] &= 248, o(t, E);
    for (let g = 0; g < 16; g++)
      y[g] = t[g];
    u[0] = U[0] = 1;
    for (let g = 254; g >= 0; --g) {
      const A = D[g >>> 3] >>> (g & 7) & 1;
      a(u, y, A), a(S, U, A), c(F, u, S), v(u, u, S), c(S, y, U), v(y, y, U), _(U, F), _(x, u), d(u, S, u), d(S, y, F), c(F, u, S), v(u, u, S), _(y, u), v(S, U, x), d(u, S, s), c(u, u, U), d(S, S, u), d(u, U, x), d(U, y, t), _(y, F), a(u, y, A), a(S, U, A);
    }
    for (let g = 0; g < 16; g++)
      t[g + 16] = u[g], t[g + 32] = S[g], t[g + 48] = y[g], t[g + 64] = U[g];
    const L = t.subarray(32), N = t.subarray(16);
    w(L, L), d(N, N, L);
    const M = new Uint8Array(32);
    return f(M, N), M;
  }
  e.scalarMult = m;
  function p(l) {
    return m(l, h);
  }
  e.scalarMultBase = p;
  function O(l) {
    if (l.length !== e.SECRET_KEY_LENGTH)
      throw new Error(`x25519: seed must be ${e.SECRET_KEY_LENGTH} bytes`);
    const E = new Uint8Array(l);
    return {
      publicKey: p(E),
      secretKey: E
    };
  }
  e.generateKeyPairFromSeed = O;
  function R(l) {
    const E = (0, r.randomBytes)(32, l), D = O(E);
    return (0, n.wipe)(E), D;
  }
  e.generateKeyPair = R;
  function T(l, E, D = !1) {
    if (l.length !== e.PUBLIC_KEY_LENGTH)
      throw new Error("X25519: incorrect secret key length");
    if (E.length !== e.PUBLIC_KEY_LENGTH)
      throw new Error("X25519: incorrect public key length");
    const t = m(l, E);
    if (D) {
      let u = 0;
      for (let y = 0; y < t.length; y++)
        u |= t[y];
      if (u === 0)
        throw new Error("X25519: invalid shared key");
    }
    return t;
  }
  e.sharedKey = T;
})(Sr);
function pr(e, r) {
  if (e.length >= 255)
    throw new TypeError("Alphabet too long");
  for (var n = new Uint8Array(256), i = 0; i < n.length; i++)
    n[i] = 255;
  for (var h = 0; h < e.length; h++) {
    var s = e.charAt(h), b = s.charCodeAt(0);
    if (n[b] !== 255)
      throw new TypeError(s + " is ambiguous");
    n[b] = h;
  }
  var a = e.length, f = e.charAt(0), o = Math.log(a) / Math.log(256), c = Math.log(256) / Math.log(a);
  function v(w) {
    if (w instanceof Uint8Array || (ArrayBuffer.isView(w) ? w = new Uint8Array(w.buffer, w.byteOffset, w.byteLength) : Array.isArray(w) && (w = Uint8Array.from(w))), !(w instanceof Uint8Array))
      throw new TypeError("Expected Uint8Array");
    if (w.length === 0)
      return "";
    for (var m = 0, p = 0, O = 0, R = w.length; O !== R && w[O] === 0; )
      O++, m++;
    for (var T = (R - O) * c + 1 >>> 0, l = new Uint8Array(T); O !== R; ) {
      for (var E = w[O], D = 0, t = T - 1; (E !== 0 || D < p) && t !== -1; t--, D++)
        E += 256 * l[t] >>> 0, l[t] = E % a >>> 0, E = E / a >>> 0;
      if (E !== 0)
        throw new Error("Non-zero carry");
      p = D, O++;
    }
    for (var u = T - p; u !== T && l[u] === 0; )
      u++;
    for (var y = f.repeat(m); u < T; ++u)
      y += e.charAt(l[u]);
    return y;
  }
  function d(w) {
    if (typeof w != "string")
      throw new TypeError("Expected String");
    if (w.length === 0)
      return new Uint8Array();
    var m = 0;
    if (w[m] !== " ") {
      for (var p = 0, O = 0; w[m] === f; )
        p++, m++;
      for (var R = (w.length - m) * o + 1 >>> 0, T = new Uint8Array(R); w[m]; ) {
        var l = n[w.charCodeAt(m)];
        if (l === 255)
          return;
        for (var E = 0, D = R - 1; (l !== 0 || E < O) && D !== -1; D--, E++)
          l += a * T[D] >>> 0, T[D] = l % 256 >>> 0, l = l / 256 >>> 0;
        if (l !== 0)
          throw new Error("Non-zero carry");
        O = E, m++;
      }
      if (w[m] !== " ") {
        for (var t = R - O; t !== R && T[t] === 0; )
          t++;
        for (var u = new Uint8Array(p + (R - t)), y = p; t !== R; )
          u[y++] = T[t++];
        return u;
      }
    }
  }
  function _(w) {
    var m = d(w);
    if (m)
      return m;
    throw new Error(`Non-${r} character`);
  }
  return {
    encode: v,
    decodeUnsafe: d,
    decode: _
  };
}
var Cr = pr, mr = Cr;
const Ur = (e) => {
  if (e instanceof Uint8Array && e.constructor.name === "Uint8Array")
    return e;
  if (e instanceof ArrayBuffer)
    return new Uint8Array(e);
  if (ArrayBuffer.isView(e))
    return new Uint8Array(e.buffer, e.byteOffset, e.byteLength);
  throw new Error("Unknown type, must be binary type");
}, Ar = (e) => new TextEncoder().encode(e), Or = (e) => new TextDecoder().decode(e);
class Tr {
  constructor(r, n, i) {
    this.name = r, this.prefix = n, this.baseEncode = i;
  }
  encode(r) {
    if (r instanceof Uint8Array)
      return `${this.prefix}${this.baseEncode(r)}`;
    throw Error("Unknown type, must be binary type");
  }
}
class Nr {
  constructor(r, n, i) {
    if (this.name = r, this.prefix = n, n.codePointAt(0) === void 0)
      throw new Error("Invalid prefix character");
    this.prefixCodePoint = n.codePointAt(0), this.baseDecode = i;
  }
  decode(r) {
    if (typeof r == "string") {
      if (r.codePointAt(0) !== this.prefixCodePoint)
        throw Error(`Unable to decode multibase string ${JSON.stringify(r)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);
      return this.baseDecode(r.slice(this.prefix.length));
    } else
      throw Error("Can only multibase decode strings");
  }
  or(r) {
    return Ct(this, r);
  }
}
class Mr {
  constructor(r) {
    this.decoders = r;
  }
  or(r) {
    return Ct(this, r);
  }
  decode(r) {
    const n = r[0], i = this.decoders[n];
    if (i)
      return i.decode(r);
    throw RangeError(`Unable to decode multibase string ${JSON.stringify(r)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`);
  }
}
const Ct = (e, r) => new Mr({
  ...e.decoders || { [e.prefix]: e },
  ...r.decoders || { [r.prefix]: r }
});
class Fr {
  constructor(r, n, i, h) {
    this.name = r, this.prefix = n, this.baseEncode = i, this.baseDecode = h, this.encoder = new Tr(r, n, i), this.decoder = new Nr(r, n, h);
  }
  encode(r) {
    return this.encoder.encode(r);
  }
  decode(r) {
    return this.decoder.decode(r);
  }
}
const Pe = ({ name: e, prefix: r, encode: n, decode: i }) => new Fr(e, r, n, i), Oe = ({ prefix: e, name: r, alphabet: n }) => {
  const { encode: i, decode: h } = mr(n, r);
  return Pe({
    prefix: e,
    name: r,
    encode: i,
    decode: (s) => Ur(h(s))
  });
}, Lr = (e, r, n, i) => {
  const h = {};
  for (let c = 0; c < r.length; ++c)
    h[r[c]] = c;
  let s = e.length;
  for (; e[s - 1] === "="; )
    --s;
  const b = new Uint8Array(s * n / 8 | 0);
  let a = 0, f = 0, o = 0;
  for (let c = 0; c < s; ++c) {
    const v = h[e[c]];
    if (v === void 0)
      throw new SyntaxError(`Non-${i} character`);
    f = f << n | v, a += n, a >= 8 && (a -= 8, b[o++] = 255 & f >> a);
  }
  if (a >= n || 255 & f << 8 - a)
    throw new SyntaxError("Unexpected end of data");
  return b;
}, Br = (e, r, n) => {
  const i = r[r.length - 1] === "=", h = (1 << n) - 1;
  let s = "", b = 0, a = 0;
  for (let f = 0; f < e.length; ++f)
    for (a = a << 8 | e[f], b += 8; b > n; )
      b -= n, s += r[h & a >> b];
  if (b && (s += r[h & a << n - b]), i)
    for (; s.length * n & 7; )
      s += "=";
  return s;
}, Z = ({ name: e, prefix: r, bitsPerChar: n, alphabet: i }) => Pe({
  prefix: r,
  name: e,
  encode(h) {
    return Br(h, i, n);
  },
  decode(h) {
    return Lr(h, i, n, e);
  }
}), xr = Pe({
  prefix: "\0",
  name: "identity",
  encode: (e) => Or(e),
  decode: (e) => Ar(e)
}), zn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  identity: xr
}, Symbol.toStringTag, { value: "Module" })), Pr = Z({
  prefix: "0",
  name: "base2",
  alphabet: "01",
  bitsPerChar: 1
}), Yn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  base2: Pr
}, Symbol.toStringTag, { value: "Module" })), Rr = Z({
  prefix: "7",
  name: "base8",
  alphabet: "01234567",
  bitsPerChar: 3
}), qn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  base8: Rr
}, Symbol.toStringTag, { value: "Module" })), jr = Oe({
  prefix: "9",
  name: "base10",
  alphabet: "0123456789"
}), Gn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  base10: jr
}, Symbol.toStringTag, { value: "Module" })), Ir = Z({
  prefix: "f",
  name: "base16",
  alphabet: "0123456789abcdef",
  bitsPerChar: 4
}), Hr = Z({
  prefix: "F",
  name: "base16upper",
  alphabet: "0123456789ABCDEF",
  bitsPerChar: 4
}), Wn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  base16: Ir,
  base16upper: Hr
}, Symbol.toStringTag, { value: "Module" })), Kr = Z({
  prefix: "b",
  name: "base32",
  alphabet: "abcdefghijklmnopqrstuvwxyz234567",
  bitsPerChar: 5
}), zr = Z({
  prefix: "B",
  name: "base32upper",
  alphabet: "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567",
  bitsPerChar: 5
}), Yr = Z({
  prefix: "c",
  name: "base32pad",
  alphabet: "abcdefghijklmnopqrstuvwxyz234567=",
  bitsPerChar: 5
}), qr = Z({
  prefix: "C",
  name: "base32padupper",
  alphabet: "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567=",
  bitsPerChar: 5
}), Gr = Z({
  prefix: "v",
  name: "base32hex",
  alphabet: "0123456789abcdefghijklmnopqrstuv",
  bitsPerChar: 5
}), Wr = Z({
  prefix: "V",
  name: "base32hexupper",
  alphabet: "0123456789ABCDEFGHIJKLMNOPQRSTUV",
  bitsPerChar: 5
}), Vr = Z({
  prefix: "t",
  name: "base32hexpad",
  alphabet: "0123456789abcdefghijklmnopqrstuv=",
  bitsPerChar: 5
}), $r = Z({
  prefix: "T",
  name: "base32hexpadupper",
  alphabet: "0123456789ABCDEFGHIJKLMNOPQRSTUV=",
  bitsPerChar: 5
}), Xr = Z({
  prefix: "h",
  name: "base32z",
  alphabet: "ybndrfg8ejkmcpqxot1uwisza345h769",
  bitsPerChar: 5
}), Vn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  base32: Kr,
  base32hex: Gr,
  base32hexpad: Vr,
  base32hexpadupper: $r,
  base32hexupper: Wr,
  base32pad: Yr,
  base32padupper: qr,
  base32upper: zr,
  base32z: Xr
}, Symbol.toStringTag, { value: "Module" })), Jr = Oe({
  prefix: "k",
  name: "base36",
  alphabet: "0123456789abcdefghijklmnopqrstuvwxyz"
}), Zr = Oe({
  prefix: "K",
  name: "base36upper",
  alphabet: "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
}), $n = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  base36: Jr,
  base36upper: Zr
}, Symbol.toStringTag, { value: "Module" })), Qr = Oe({
  name: "base58btc",
  prefix: "z",
  alphabet: "123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"
}), kr = Oe({
  name: "base58flickr",
  prefix: "Z",
  alphabet: "123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"
}), Xn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  base58btc: Qr,
  base58flickr: kr
}, Symbol.toStringTag, { value: "Module" })), en = Z({
  prefix: "m",
  name: "base64",
  alphabet: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",
  bitsPerChar: 6
}), tn = Z({
  prefix: "M",
  name: "base64pad",
  alphabet: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",
  bitsPerChar: 6
}), rn = Z({
  prefix: "u",
  name: "base64url",
  alphabet: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",
  bitsPerChar: 6
}), nn = Z({
  prefix: "U",
  name: "base64urlpad",
  alphabet: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_=",
  bitsPerChar: 6
}), Jn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  base64: en,
  base64pad: tn,
  base64url: rn,
  base64urlpad: nn
}, Symbol.toStringTag, { value: "Module" })), mt = Array.from("🚀🪐☄🛰🌌🌑🌒🌓🌔🌕🌖🌗🌘🌍🌏🌎🐉☀💻🖥💾💿😂❤😍🤣😊🙏💕😭😘👍😅👏😁🔥🥰💔💖💙😢🤔😆🙄💪😉☺👌🤗💜😔😎😇🌹🤦🎉💞✌✨🤷😱😌🌸🙌😋💗💚😏💛🙂💓🤩😄😀🖤😃💯🙈👇🎶😒🤭❣😜💋👀😪😑💥🙋😞😩😡🤪👊🥳😥🤤👉💃😳✋😚😝😴🌟😬🙃🍀🌷😻😓⭐✅🥺🌈😈🤘💦✔😣🏃💐☹🎊💘😠☝😕🌺🎂🌻😐🖕💝🙊😹🗣💫💀👑🎵🤞😛🔴😤🌼😫⚽🤙☕🏆🤫👈😮🙆🍻🍃🐶💁😲🌿🧡🎁⚡🌞🎈❌✊👋😰🤨😶🤝🚶💰🍓💢🤟🙁🚨💨🤬✈🎀🍺🤓😙💟🌱😖👶🥴▶➡❓💎💸⬇😨🌚🦋😷🕺⚠🙅😟😵👎🤲🤠🤧📌🔵💅🧐🐾🍒😗🤑🌊🤯🐷☎💧😯💆👆🎤🙇🍑❄🌴💣🐸💌📍🥀🤢👅💡💩👐📸👻🤐🤮🎼🥵🚩🍎🍊👼💍📣🥂"), un = mt.reduce((e, r, n) => (e[n] = r, e), []), an = mt.reduce((e, r, n) => (e[r.codePointAt(0)] = n, e), []);
function fn(e) {
  return e.reduce((r, n) => (r += un[n], r), "");
}
function hn(e) {
  const r = [];
  for (const n of e) {
    const i = an[n.codePointAt(0)];
    if (i === void 0)
      throw new Error(`Non-base256emoji character: ${n}`);
    r.push(i);
  }
  return new Uint8Array(r);
}
const sn = Pe({
  prefix: "🚀",
  name: "base256emoji",
  encode: fn,
  decode: hn
}), Zn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  base256emoji: sn
}, Symbol.toStringTag, { value: "Module" }));
new TextEncoder();
new TextDecoder();
var on = {};
/*! *****************************************************************************
Copyright (c) Microsoft Corporation.

Permission to use, copy, modify, and/or distribute this software for any
purpose with or without fee is hereby granted.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
***************************************************************************** */
var $e = function(e, r) {
  return $e = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(n, i) {
    n.__proto__ = i;
  } || function(n, i) {
    for (var h in i) i.hasOwnProperty(h) && (n[h] = i[h]);
  }, $e(e, r);
};
function ln(e, r) {
  $e(e, r);
  function n() {
    this.constructor = e;
  }
  e.prototype = r === null ? Object.create(r) : (n.prototype = r.prototype, new n());
}
var Xe = function() {
  return Xe = Object.assign || function(r) {
    for (var n, i = 1, h = arguments.length; i < h; i++) {
      n = arguments[i];
      for (var s in n) Object.prototype.hasOwnProperty.call(n, s) && (r[s] = n[s]);
    }
    return r;
  }, Xe.apply(this, arguments);
};
function Dn(e, r) {
  var n = {};
  for (var i in e) Object.prototype.hasOwnProperty.call(e, i) && r.indexOf(i) < 0 && (n[i] = e[i]);
  if (e != null && typeof Object.getOwnPropertySymbols == "function")
    for (var h = 0, i = Object.getOwnPropertySymbols(e); h < i.length; h++)
      r.indexOf(i[h]) < 0 && Object.prototype.propertyIsEnumerable.call(e, i[h]) && (n[i[h]] = e[i[h]]);
  return n;
}
function cn(e, r, n, i) {
  var h = arguments.length, s = h < 3 ? r : i === null ? i = Object.getOwnPropertyDescriptor(r, n) : i, b;
  if (typeof Reflect == "object" && typeof Reflect.decorate == "function") s = Reflect.decorate(e, r, n, i);
  else for (var a = e.length - 1; a >= 0; a--) (b = e[a]) && (s = (h < 3 ? b(s) : h > 3 ? b(r, n, s) : b(r, n)) || s);
  return h > 3 && s && Object.defineProperty(r, n, s), s;
}
function _n(e, r) {
  return function(n, i) {
    r(n, i, e);
  };
}
function dn(e, r) {
  if (typeof Reflect == "object" && typeof Reflect.metadata == "function") return Reflect.metadata(e, r);
}
function En(e, r, n, i) {
  function h(s) {
    return s instanceof n ? s : new n(function(b) {
      b(s);
    });
  }
  return new (n || (n = Promise))(function(s, b) {
    function a(c) {
      try {
        o(i.next(c));
      } catch (v) {
        b(v);
      }
    }
    function f(c) {
      try {
        o(i.throw(c));
      } catch (v) {
        b(v);
      }
    }
    function o(c) {
      c.done ? s(c.value) : h(c.value).then(a, f);
    }
    o((i = i.apply(e, r || [])).next());
  });
}
function bn(e, r) {
  var n = { label: 0, sent: function() {
    if (s[0] & 1) throw s[1];
    return s[1];
  }, trys: [], ops: [] }, i, h, s, b;
  return b = { next: a(0), throw: a(1), return: a(2) }, typeof Symbol == "function" && (b[Symbol.iterator] = function() {
    return this;
  }), b;
  function a(o) {
    return function(c) {
      return f([o, c]);
    };
  }
  function f(o) {
    if (i) throw new TypeError("Generator is already executing.");
    for (; n; ) try {
      if (i = 1, h && (s = o[0] & 2 ? h.return : o[0] ? h.throw || ((s = h.return) && s.call(h), 0) : h.next) && !(s = s.call(h, o[1])).done) return s;
      switch (h = 0, s && (o = [o[0] & 2, s.value]), o[0]) {
        case 0:
        case 1:
          s = o;
          break;
        case 4:
          return n.label++, { value: o[1], done: !1 };
        case 5:
          n.label++, h = o[1], o = [0];
          continue;
        case 7:
          o = n.ops.pop(), n.trys.pop();
          continue;
        default:
          if (s = n.trys, !(s = s.length > 0 && s[s.length - 1]) && (o[0] === 6 || o[0] === 2)) {
            n = 0;
            continue;
          }
          if (o[0] === 3 && (!s || o[1] > s[0] && o[1] < s[3])) {
            n.label = o[1];
            break;
          }
          if (o[0] === 6 && n.label < s[1]) {
            n.label = s[1], s = o;
            break;
          }
          if (s && n.label < s[2]) {
            n.label = s[2], n.ops.push(o);
            break;
          }
          s[2] && n.ops.pop(), n.trys.pop();
          continue;
      }
      o = r.call(e, n);
    } catch (c) {
      o = [6, c], h = 0;
    } finally {
      i = s = 0;
    }
    if (o[0] & 5) throw o[1];
    return { value: o[0] ? o[1] : void 0, done: !0 };
  }
}
function wn(e, r, n, i) {
  i === void 0 && (i = n), e[i] = r[n];
}
function vn(e, r) {
  for (var n in e) n !== "default" && !r.hasOwnProperty(n) && (r[n] = e[n]);
}
function Je(e) {
  var r = typeof Symbol == "function" && Symbol.iterator, n = r && e[r], i = 0;
  if (n) return n.call(e);
  if (e && typeof e.length == "number") return {
    next: function() {
      return e && i >= e.length && (e = void 0), { value: e && e[i++], done: !e };
    }
  };
  throw new TypeError(r ? "Object is not iterable." : "Symbol.iterator is not defined.");
}
function Ut(e, r) {
  var n = typeof Symbol == "function" && e[Symbol.iterator];
  if (!n) return e;
  var i = n.call(e), h, s = [], b;
  try {
    for (; (r === void 0 || r-- > 0) && !(h = i.next()).done; ) s.push(h.value);
  } catch (a) {
    b = { error: a };
  } finally {
    try {
      h && !h.done && (n = i.return) && n.call(i);
    } finally {
      if (b) throw b.error;
    }
  }
  return s;
}
function yn() {
  for (var e = [], r = 0; r < arguments.length; r++)
    e = e.concat(Ut(arguments[r]));
  return e;
}
function gn() {
  for (var e = 0, r = 0, n = arguments.length; r < n; r++) e += arguments[r].length;
  for (var i = Array(e), h = 0, r = 0; r < n; r++)
    for (var s = arguments[r], b = 0, a = s.length; b < a; b++, h++)
      i[h] = s[b];
  return i;
}
function Ue(e) {
  return this instanceof Ue ? (this.v = e, this) : new Ue(e);
}
function Sn(e, r, n) {
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
  var i = n.apply(e, r || []), h, s = [];
  return h = {}, b("next"), b("throw"), b("return"), h[Symbol.asyncIterator] = function() {
    return this;
  }, h;
  function b(d) {
    i[d] && (h[d] = function(_) {
      return new Promise(function(w, m) {
        s.push([d, _, w, m]) > 1 || a(d, _);
      });
    });
  }
  function a(d, _) {
    try {
      f(i[d](_));
    } catch (w) {
      v(s[0][3], w);
    }
  }
  function f(d) {
    d.value instanceof Ue ? Promise.resolve(d.value.v).then(o, c) : v(s[0][2], d);
  }
  function o(d) {
    a("next", d);
  }
  function c(d) {
    a("throw", d);
  }
  function v(d, _) {
    d(_), s.shift(), s.length && a(s[0][0], s[0][1]);
  }
}
function pn(e) {
  var r, n;
  return r = {}, i("next"), i("throw", function(h) {
    throw h;
  }), i("return"), r[Symbol.iterator] = function() {
    return this;
  }, r;
  function i(h, s) {
    r[h] = e[h] ? function(b) {
      return (n = !n) ? { value: Ue(e[h](b)), done: h === "return" } : s ? s(b) : b;
    } : s;
  }
}
function Cn(e) {
  if (!Symbol.asyncIterator) throw new TypeError("Symbol.asyncIterator is not defined.");
  var r = e[Symbol.asyncIterator], n;
  return r ? r.call(e) : (e = typeof Je == "function" ? Je(e) : e[Symbol.iterator](), n = {}, i("next"), i("throw"), i("return"), n[Symbol.asyncIterator] = function() {
    return this;
  }, n);
  function i(s) {
    n[s] = e[s] && function(b) {
      return new Promise(function(a, f) {
        b = e[s](b), h(a, f, b.done, b.value);
      });
    };
  }
  function h(s, b, a, f) {
    Promise.resolve(f).then(function(o) {
      s({ value: o, done: a });
    }, b);
  }
}
function mn(e, r) {
  return Object.defineProperty ? Object.defineProperty(e, "raw", { value: r }) : e.raw = r, e;
}
function Un(e) {
  if (e && e.__esModule) return e;
  var r = {};
  if (e != null) for (var n in e) Object.hasOwnProperty.call(e, n) && (r[n] = e[n]);
  return r.default = e, r;
}
function An(e) {
  return e && e.__esModule ? e : { default: e };
}
function On(e, r) {
  if (!r.has(e))
    throw new TypeError("attempted to get private field on non-instance");
  return r.get(e);
}
function Tn(e, r, n) {
  if (!r.has(e))
    throw new TypeError("attempted to set private field on non-instance");
  return r.set(e, n), n;
}
const Nn = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
  __proto__: null,
  get __assign() {
    return Xe;
  },
  __asyncDelegator: pn,
  __asyncGenerator: Sn,
  __asyncValues: Cn,
  __await: Ue,
  __awaiter: En,
  __classPrivateFieldGet: On,
  __classPrivateFieldSet: Tn,
  __createBinding: wn,
  __decorate: cn,
  __exportStar: vn,
  __extends: ln,
  __generator: bn,
  __importDefault: An,
  __importStar: Un,
  __makeTemplateObject: mn,
  __metadata: dn,
  __param: _n,
  __read: Ut,
  __rest: Dn,
  __spread: yn,
  __spreadArrays: gn,
  __values: Je
}, Symbol.toStringTag, { value: "Module" })), Re = /* @__PURE__ */ Ft(Nn);
var Ie = {}, Ce = {}, rt;
function Mn() {
  if (rt) return Ce;
  rt = 1, Object.defineProperty(Ce, "__esModule", { value: !0 }), Ce.delay = void 0;
  function e(r) {
    return new Promise((n) => {
      setTimeout(() => {
        n(!0);
      }, r);
    });
  }
  return Ce.delay = e, Ce;
}
var ve = {}, He = {}, ye = {}, nt;
function Fn() {
  return nt || (nt = 1, Object.defineProperty(ye, "__esModule", { value: !0 }), ye.ONE_THOUSAND = ye.ONE_HUNDRED = void 0, ye.ONE_HUNDRED = 100, ye.ONE_THOUSAND = 1e3), ye;
}
var Ke = {}, it;
function Ln() {
  return it || (it = 1, function(e) {
    Object.defineProperty(e, "__esModule", { value: !0 }), e.ONE_YEAR = e.FOUR_WEEKS = e.THREE_WEEKS = e.TWO_WEEKS = e.ONE_WEEK = e.THIRTY_DAYS = e.SEVEN_DAYS = e.FIVE_DAYS = e.THREE_DAYS = e.ONE_DAY = e.TWENTY_FOUR_HOURS = e.TWELVE_HOURS = e.SIX_HOURS = e.THREE_HOURS = e.ONE_HOUR = e.SIXTY_MINUTES = e.THIRTY_MINUTES = e.TEN_MINUTES = e.FIVE_MINUTES = e.ONE_MINUTE = e.SIXTY_SECONDS = e.THIRTY_SECONDS = e.TEN_SECONDS = e.FIVE_SECONDS = e.ONE_SECOND = void 0, e.ONE_SECOND = 1, e.FIVE_SECONDS = 5, e.TEN_SECONDS = 10, e.THIRTY_SECONDS = 30, e.SIXTY_SECONDS = 60, e.ONE_MINUTE = e.SIXTY_SECONDS, e.FIVE_MINUTES = e.ONE_MINUTE * 5, e.TEN_MINUTES = e.ONE_MINUTE * 10, e.THIRTY_MINUTES = e.ONE_MINUTE * 30, e.SIXTY_MINUTES = e.ONE_MINUTE * 60, e.ONE_HOUR = e.SIXTY_MINUTES, e.THREE_HOURS = e.ONE_HOUR * 3, e.SIX_HOURS = e.ONE_HOUR * 6, e.TWELVE_HOURS = e.ONE_HOUR * 12, e.TWENTY_FOUR_HOURS = e.ONE_HOUR * 24, e.ONE_DAY = e.TWENTY_FOUR_HOURS, e.THREE_DAYS = e.ONE_DAY * 3, e.FIVE_DAYS = e.ONE_DAY * 5, e.SEVEN_DAYS = e.ONE_DAY * 7, e.THIRTY_DAYS = e.ONE_DAY * 30, e.ONE_WEEK = e.SEVEN_DAYS, e.TWO_WEEKS = e.ONE_WEEK * 2, e.THREE_WEEKS = e.ONE_WEEK * 3, e.FOUR_WEEKS = e.ONE_WEEK * 4, e.ONE_YEAR = e.ONE_DAY * 365;
  }(Ke)), Ke;
}
var ut;
function At() {
  return ut || (ut = 1, function(e) {
    Object.defineProperty(e, "__esModule", { value: !0 });
    const r = Re;
    r.__exportStar(Fn(), e), r.__exportStar(Ln(), e);
  }(He)), He;
}
var at;
function Bn() {
  if (at) return ve;
  at = 1, Object.defineProperty(ve, "__esModule", { value: !0 }), ve.fromMiliseconds = ve.toMiliseconds = void 0;
  const e = At();
  function r(i) {
    return i * e.ONE_THOUSAND;
  }
  ve.toMiliseconds = r;
  function n(i) {
    return Math.floor(i / e.ONE_THOUSAND);
  }
  return ve.fromMiliseconds = n, ve;
}
var ft;
function xn() {
  return ft || (ft = 1, function(e) {
    Object.defineProperty(e, "__esModule", { value: !0 });
    const r = Re;
    r.__exportStar(Mn(), e), r.__exportStar(Bn(), e);
  }(Ie)), Ie;
}
var Se = {}, ht;
function Pn() {
  if (ht) return Se;
  ht = 1, Object.defineProperty(Se, "__esModule", { value: !0 }), Se.Watch = void 0;
  class e {
    constructor() {
      this.timestamps = /* @__PURE__ */ new Map();
    }
    start(n) {
      if (this.timestamps.has(n))
        throw new Error(`Watch already started for label: ${n}`);
      this.timestamps.set(n, { started: Date.now() });
    }
    stop(n) {
      const i = this.get(n);
      if (typeof i.elapsed < "u")
        throw new Error(`Watch already stopped for label: ${n}`);
      const h = Date.now() - i.started;
      this.timestamps.set(n, { started: i.started, elapsed: h });
    }
    get(n) {
      const i = this.timestamps.get(n);
      if (typeof i > "u")
        throw new Error(`No timestamp found for label: ${n}`);
      return i;
    }
    elapsed(n) {
      const i = this.get(n);
      return i.elapsed || Date.now() - i.started;
    }
  }
  return Se.Watch = e, Se.default = e, Se;
}
var ze = {}, me = {}, st;
function Rn() {
  if (st) return me;
  st = 1, Object.defineProperty(me, "__esModule", { value: !0 }), me.IWatch = void 0;
  class e {
  }
  return me.IWatch = e, me;
}
var ot;
function jn() {
  return ot || (ot = 1, function(e) {
    Object.defineProperty(e, "__esModule", { value: !0 }), Re.__exportStar(Rn(), e);
  }(ze)), ze;
}
(function(e) {
  Object.defineProperty(e, "__esModule", { value: !0 });
  const r = Re;
  r.__exportStar(xn(), e), r.__exportStar(Pn(), e), r.__exportStar(jn(), e), r.__exportStar(At(), e);
})(on);
export {
  Kn as H,
  xt as a,
  Bt as b,
  on as c,
  Yn as d,
  Hn as e,
  qn as f,
  Gn as g,
  lt as h,
  zn as i,
  Wn as j,
  Vn as k,
  $n as l,
  Xn as m,
  Jn as n,
  Zn as o,
  B as p,
  pt as r,
  gr as s,
  de as w,
  Sr as x
};
