import { r as R, a as G } from "./sha3-DjQmYPLK.js";
var U = {}, L = {}, q;
function O() {
  if (q) return L;
  q = 1, Object.defineProperty(L, "__esModule", { value: !0 }), L.HashMD = void 0, L.setBigUint64 = y, L.Chi = x, L.Maj = H;
  const b = /* @__PURE__ */ G(), u = /* @__PURE__ */ R();
  function y(t, s, h, a) {
    if (typeof t.setBigUint64 == "function")
      return t.setBigUint64(s, h, a);
    const e = BigInt(32), i = BigInt(4294967295), r = Number(h >> e & i), d = Number(h & i), l = a ? 4 : 0, n = a ? 0 : 4;
    t.setUint32(s + l, r, a), t.setUint32(s + n, d, a);
  }
  function x(t, s, h) {
    return t & s ^ ~t & h;
  }
  function H(t, s, h) {
    return t & s ^ t & h ^ s & h;
  }
  class _ extends u.Hash {
    constructor(s, h, a, e) {
      super(), this.blockLen = s, this.outputLen = h, this.padOffset = a, this.isLE = e, this.finished = !1, this.length = 0, this.pos = 0, this.destroyed = !1, this.buffer = new Uint8Array(s), this.view = (0, u.createView)(this.buffer);
    }
    update(s) {
      (0, b.aexists)(this);
      const { view: h, buffer: a, blockLen: e } = this;
      s = (0, u.toBytes)(s);
      const i = s.length;
      for (let r = 0; r < i; ) {
        const d = Math.min(e - this.pos, i - r);
        if (d === e) {
          const l = (0, u.createView)(s);
          for (; e <= i - r; r += e)
            this.process(l, r);
          continue;
        }
        a.set(s.subarray(r, r + d), this.pos), this.pos += d, r += d, this.pos === e && (this.process(h, 0), this.pos = 0);
      }
      return this.length += s.length, this.roundClean(), this;
    }
    digestInto(s) {
      (0, b.aexists)(this), (0, b.aoutput)(s, this), this.finished = !0;
      const { buffer: h, view: a, blockLen: e, isLE: i } = this;
      let { pos: r } = this;
      h[r++] = 128, this.buffer.subarray(r).fill(0), this.padOffset > e - r && (this.process(a, 0), r = 0);
      for (let o = r; o < e; o++)
        h[o] = 0;
      y(a, e - 8, BigInt(this.length * 8), i), this.process(a, 0);
      const d = (0, u.createView)(s), l = this.outputLen;
      if (l % 4)
        throw new Error("_sha2: outputLen should be aligned to 32bit");
      const n = l / 4, f = this.get();
      if (n > f.length)
        throw new Error("_sha2: outputLen bigger than state");
      for (let o = 0; o < n; o++)
        d.setUint32(4 * o, f[o], i);
    }
    digest() {
      const { buffer: s, outputLen: h } = this;
      this.digestInto(s);
      const a = s.slice(0, h);
      return this.destroy(), a;
    }
    _cloneInto(s) {
      s || (s = new this.constructor()), s.set(...this.get());
      const { blockLen: h, buffer: a, length: e, finished: i, destroyed: r, pos: d } = this;
      return s.length = e, s.pos = d, s.finished = i, s.destroyed = r, e % h && s.buffer.set(a), s;
    }
  }
  return L.HashMD = _, L;
}
var P;
function Y() {
  if (P) return U;
  P = 1, Object.defineProperty(U, "__esModule", { value: !0 }), U.sha224 = U.sha256 = U.SHA256 = void 0;
  const b = /* @__PURE__ */ O(), u = /* @__PURE__ */ R(), y = /* @__PURE__ */ new Uint32Array([
    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
  ]), x = /* @__PURE__ */ new Uint32Array([
    1779033703,
    3144134277,
    1013904242,
    2773480762,
    1359893119,
    2600822924,
    528734635,
    1541459225
  ]), H = /* @__PURE__ */ new Uint32Array(64);
  class _ extends b.HashMD {
    constructor() {
      super(64, 32, 8, !1), this.A = x[0] | 0, this.B = x[1] | 0, this.C = x[2] | 0, this.D = x[3] | 0, this.E = x[4] | 0, this.F = x[5] | 0, this.G = x[6] | 0, this.H = x[7] | 0;
    }
    get() {
      const { A: h, B: a, C: e, D: i, E: r, F: d, G: l, H: n } = this;
      return [h, a, e, i, r, d, l, n];
    }
    // prettier-ignore
    set(h, a, e, i, r, d, l, n) {
      this.A = h | 0, this.B = a | 0, this.C = e | 0, this.D = i | 0, this.E = r | 0, this.F = d | 0, this.G = l | 0, this.H = n | 0;
    }
    process(h, a) {
      for (let c = 0; c < 16; c++, a += 4)
        H[c] = h.getUint32(a, !1);
      for (let c = 16; c < 64; c++) {
        const w = H[c - 15], p = H[c - 2], M = (0, u.rotr)(w, 7) ^ (0, u.rotr)(w, 18) ^ w >>> 3, m = (0, u.rotr)(p, 17) ^ (0, u.rotr)(p, 19) ^ p >>> 10;
        H[c] = m + H[c - 7] + M + H[c - 16] | 0;
      }
      let { A: e, B: i, C: r, D: d, E: l, F: n, G: f, H: o } = this;
      for (let c = 0; c < 64; c++) {
        const w = (0, u.rotr)(l, 6) ^ (0, u.rotr)(l, 11) ^ (0, u.rotr)(l, 25), p = o + w + (0, b.Chi)(l, n, f) + y[c] + H[c] | 0, m = ((0, u.rotr)(e, 2) ^ (0, u.rotr)(e, 13) ^ (0, u.rotr)(e, 22)) + (0, b.Maj)(e, i, r) | 0;
        o = f, f = n, n = l, l = d + p | 0, d = r, r = i, i = e, e = p + m | 0;
      }
      e = e + this.A | 0, i = i + this.B | 0, r = r + this.C | 0, d = d + this.D | 0, l = l + this.E | 0, n = n + this.F | 0, f = f + this.G | 0, o = o + this.H | 0, this.set(e, i, r, d, l, n, f, o);
    }
    roundClean() {
      H.fill(0);
    }
    destroy() {
      this.set(0, 0, 0, 0, 0, 0, 0, 0), this.buffer.fill(0);
    }
  }
  U.SHA256 = _;
  class t extends _ {
    constructor() {
      super(), this.A = -1056596264, this.B = 914150663, this.C = 812702999, this.D = -150054599, this.E = -4191439, this.F = 1750603025, this.G = 1694076839, this.H = -1090891868, this.outputLen = 28;
    }
  }
  return U.sha256 = (0, u.wrapConstructor)(() => new _()), U.sha224 = (0, u.wrapConstructor)(() => new t()), U;
}
var E = {}, S;
function Z() {
  return S || (S = 1, function(b) {
    Object.defineProperty(b, "__esModule", { value: !0 }), b.hmac = b.HMAC = void 0;
    const u = /* @__PURE__ */ G(), y = /* @__PURE__ */ R();
    class x extends y.Hash {
      constructor(t, s) {
        super(), this.finished = !1, this.destroyed = !1, (0, u.ahash)(t);
        const h = (0, y.toBytes)(s);
        if (this.iHash = t.create(), typeof this.iHash.update != "function")
          throw new Error("Expected instance of class which extends utils.Hash");
        this.blockLen = this.iHash.blockLen, this.outputLen = this.iHash.outputLen;
        const a = this.blockLen, e = new Uint8Array(a);
        e.set(h.length > a ? t.create().update(h).digest() : h);
        for (let i = 0; i < e.length; i++)
          e[i] ^= 54;
        this.iHash.update(e), this.oHash = t.create();
        for (let i = 0; i < e.length; i++)
          e[i] ^= 106;
        this.oHash.update(e), e.fill(0);
      }
      update(t) {
        return (0, u.aexists)(this), this.iHash.update(t), this;
      }
      digestInto(t) {
        (0, u.aexists)(this), (0, u.abytes)(t, this.outputLen), this.finished = !0, this.iHash.digestInto(t), this.oHash.update(t), this.oHash.digestInto(t), this.destroy();
      }
      digest() {
        const t = new Uint8Array(this.oHash.outputLen);
        return this.digestInto(t), t;
      }
      _cloneInto(t) {
        t || (t = Object.create(Object.getPrototypeOf(this), {}));
        const { oHash: s, iHash: h, finished: a, destroyed: e, blockLen: i, outputLen: r } = this;
        return t = t, t.finished = a, t.destroyed = e, t.blockLen = i, t.outputLen = r, t.oHash = s._cloneInto(t.oHash), t.iHash = h._cloneInto(t.iHash), t;
      }
      destroy() {
        this.destroyed = !0, this.oHash.destroy(), this.iHash.destroy();
      }
    }
    b.HMAC = x;
    const H = (_, t, s) => new x(_, t).update(s).digest();
    b.hmac = H, b.hmac.create = (_, t) => new x(_, t);
  }(E)), E;
}
var j = {}, F;
function $() {
  if (F) return j;
  F = 1, Object.defineProperty(j, "__esModule", { value: !0 }), j.ripemd160 = j.RIPEMD160 = void 0;
  const b = /* @__PURE__ */ O(), u = /* @__PURE__ */ R(), y = /* @__PURE__ */ new Uint8Array([7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8]), x = /* @__PURE__ */ new Uint8Array(new Array(16).fill(0).map((n, f) => f)), H = /* @__PURE__ */ x.map((n) => (9 * n + 5) % 16);
  let _ = [x], t = [H];
  for (let n = 0; n < 4; n++)
    for (let f of [_, t])
      f.push(f[n].map((o) => y[o]));
  const s = /* @__PURE__ */ [
    [11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8],
    [12, 13, 11, 15, 6, 9, 9, 7, 12, 15, 11, 13, 7, 8, 7, 7],
    [13, 15, 14, 11, 7, 7, 6, 8, 13, 14, 13, 12, 5, 5, 6, 9],
    [14, 11, 12, 14, 8, 6, 5, 5, 15, 12, 15, 14, 9, 9, 8, 6],
    [15, 12, 13, 13, 9, 5, 8, 6, 14, 11, 12, 11, 8, 6, 5, 5]
  ].map((n) => new Uint8Array(n)), h = /* @__PURE__ */ _.map((n, f) => n.map((o) => s[f][o])), a = /* @__PURE__ */ t.map((n, f) => n.map((o) => s[f][o])), e = /* @__PURE__ */ new Uint32Array([
    0,
    1518500249,
    1859775393,
    2400959708,
    2840853838
  ]), i = /* @__PURE__ */ new Uint32Array([
    1352829926,
    1548603684,
    1836072691,
    2053994217,
    0
  ]);
  function r(n, f, o, c) {
    return n === 0 ? f ^ o ^ c : n === 1 ? f & o | ~f & c : n === 2 ? (f | ~o) ^ c : n === 3 ? f & c | o & ~c : f ^ (o | ~c);
  }
  const d = /* @__PURE__ */ new Uint32Array(16);
  class l extends b.HashMD {
    constructor() {
      super(64, 20, 8, !0), this.h0 = 1732584193, this.h1 = -271733879, this.h2 = -1732584194, this.h3 = 271733878, this.h4 = -1009589776;
    }
    get() {
      const { h0: f, h1: o, h2: c, h3: w, h4: p } = this;
      return [f, o, c, w, p];
    }
    set(f, o, c, w, p) {
      this.h0 = f | 0, this.h1 = o | 0, this.h2 = c | 0, this.h3 = w | 0, this.h4 = p | 0;
    }
    process(f, o) {
      for (let g = 0; g < 16; g++, o += 4)
        d[g] = f.getUint32(o, !0);
      let c = this.h0 | 0, w = c, p = this.h1 | 0, M = p, m = this.h2 | 0, B = m, C = this.h3 | 0, v = C, I = this.h4 | 0, D = I;
      for (let g = 0; g < 5; g++) {
        const V = 4 - g, K = e[g], W = i[g], N = _[g], T = t[g], J = h[g], Q = a[g];
        for (let A = 0; A < 16; A++) {
          const k = (0, u.rotl)(c + r(g, p, m, C) + d[N[A]] + K, J[A]) + I | 0;
          c = I, I = C, C = (0, u.rotl)(m, 10) | 0, m = p, p = k;
        }
        for (let A = 0; A < 16; A++) {
          const k = (0, u.rotl)(w + r(V, M, B, v) + d[T[A]] + W, Q[A]) + D | 0;
          w = D, D = v, v = (0, u.rotl)(B, 10) | 0, B = M, M = k;
        }
      }
      this.set(this.h1 + m + v | 0, this.h2 + C + D | 0, this.h3 + I + w | 0, this.h4 + c + M | 0, this.h0 + p + B | 0);
    }
    roundClean() {
      d.fill(0);
    }
    destroy() {
      this.destroyed = !0, this.buffer.fill(0), this.set(0, 0, 0, 0, 0);
    }
  }
  return j.RIPEMD160 = l, j.ripemd160 = (0, u.wrapConstructor)(() => new l()), j;
}
export {
  $ as a,
  O as b,
  Z as c,
  Y as r
};
//# sourceMappingURL=ripemd160-D-v1OmeN.js.map
