flagmint-js-sdk 1.2.15 → 1.2.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1262,7 +1262,7 @@ class yu {
1262
1262
  fetchFlags(n) {
1263
1263
  return ke(this, null, function* () {
1264
1264
  var s;
1265
- return this.context = n, this.isReady && ((s = this.socket) == null ? void 0 : s.readyState) === 1 && this.sendContext(n), this.flags;
1265
+ return this.context = n, this.isReady && ((s = this.socket) == null ? void 0 : s.readyState) === 1 && (this.sendContext(n), this.initialFlagsReceived ? yield new Promise((o) => setTimeout(o, 200)) : yield this.waitForInitialFlags()), this.flags;
1266
1266
  });
1267
1267
  }
1268
1268
  onFlagsUpdated(n) {
@@ -12805,7 +12805,7 @@ Er.padLength = 64;
12805
12805
  Er.prototype._digest = function(n) {
12806
12806
  return n === "hex" ? u0.toHex32(this.h.slice(0, 7), "big") : u0.split32(this.h.slice(0, 7), "big");
12807
12807
  };
12808
- var Ne = Xt, Jp = xi, Gp = We, ur = Ne.rotr64_hi, lr = Ne.rotr64_lo, yo = Ne.shr64_hi, wo = Ne.shr64_lo, Tr = Ne.sum64, Rf = Ne.sum64_hi, Tf = Ne.sum64_lo, Xp = Ne.sum64_4_hi, jp = Ne.sum64_4_lo, Qp = Ne.sum64_5_hi, t2 = Ne.sum64_5_lo, Mo = Jp.BlockHash, e2 = [
12808
+ var Ne = Xt, Jp = xi, Gp = We, ur = Ne.rotr64_hi, lr = Ne.rotr64_lo, yo = Ne.shr64_hi, wo = Ne.shr64_lo, Tr = Ne.sum64, Rf = Ne.sum64_hi, Tf = Ne.sum64_lo, Xp = Ne.sum64_4_hi, jp = Ne.sum64_4_lo, Qp = Ne.sum64_5_hi, tm = Ne.sum64_5_lo, Mo = Jp.BlockHash, em = [
12809
12809
  1116352408,
12810
12810
  3609767458,
12811
12811
  1899447441,
@@ -12987,7 +12987,7 @@ function tr() {
12987
12987
  4215389547,
12988
12988
  1541459225,
12989
12989
  327033209
12990
- ], this.k = e2, this.W = new Array(160);
12990
+ ], this.k = em, this.W = new Array(160);
12991
12991
  }
12992
12992
  Ne.inherits(tr, Mo);
12993
12993
  var xo = tr;
@@ -12999,7 +12999,7 @@ tr.prototype._prepareBlock = function(n, s) {
12999
12999
  for (var o = this.W, m = 0; m < 32; m++)
13000
13000
  o[m] = n[s + m];
13001
13001
  for (; m < o.length; m += 2) {
13002
- var f = d2(o[m - 4], o[m - 3]), g = c2(o[m - 4], o[m - 3]), y = o[m - 14], S = o[m - 13], B = u2(o[m - 30], o[m - 29]), M = l2(o[m - 30], o[m - 29]), x = o[m - 32], I = o[m - 31];
13002
+ var f = dm(o[m - 4], o[m - 3]), g = cm(o[m - 4], o[m - 3]), y = o[m - 14], S = o[m - 13], B = um(o[m - 30], o[m - 29]), M = lm(o[m - 30], o[m - 29]), x = o[m - 32], I = o[m - 31];
13003
13003
  o[m] = Xp(
13004
13004
  f,
13005
13005
  g,
@@ -13026,7 +13026,7 @@ tr.prototype._update = function(n, s) {
13026
13026
  var o = this.W, m = this.h[0], f = this.h[1], g = this.h[2], y = this.h[3], S = this.h[4], B = this.h[5], M = this.h[6], x = this.h[7], I = this.h[8], k = this.h[9], D = this.h[10], L = this.h[11], W = this.h[12], z = this.h[13], $ = this.h[14], lt = this.h[15];
13027
13027
  Gp(this.k.length === o.length);
13028
13028
  for (var H = 0; H < o.length; H += 2) {
13029
- var At = $, Bt = lt, Ct = s2(I, k), Et = o2(I, k), Y = r2(I, k, D, L, W), It = i2(I, k, D, L, W, z), p = this.k[H], t = this.k[H + 1], r = o[H], i = o[H + 1], a = Qp(
13029
+ var At = $, Bt = lt, Ct = sm(I, k), Et = om(I, k), Y = rm(I, k, D, L, W), It = im(I, k, D, L, W, z), p = this.k[H], t = this.k[H + 1], r = o[H], i = o[H + 1], a = Qp(
13030
13030
  At,
13031
13031
  Bt,
13032
13032
  Ct,
@@ -13037,7 +13037,7 @@ tr.prototype._update = function(n, s) {
13037
13037
  t,
13038
13038
  r,
13039
13039
  i
13040
- ), d = t2(
13040
+ ), d = tm(
13041
13041
  At,
13042
13042
  Bt,
13043
13043
  Ct,
@@ -13049,7 +13049,7 @@ tr.prototype._update = function(n, s) {
13049
13049
  r,
13050
13050
  i
13051
13051
  );
13052
- At = a2(m, f), Bt = h2(m, f), Ct = n2(m, f, g, y, S), Et = f2(m, f, g, y, S, B);
13052
+ At = am(m, f), Bt = hm(m, f), Ct = nm(m, f, g, y, S), Et = fm(m, f, g, y, S, B);
13053
13053
  var c = Rf(At, Bt, Ct, Et), v = Tf(At, Bt, Ct, Et);
13054
13054
  $ = W, lt = z, W = D, z = L, D = I, L = k, I = Rf(M, x, a, d), k = Tf(x, x, a, d), M = S, x = B, S = g, B = y, g = m, y = f, m = Rf(a, d, c, v), f = Tf(a, d, c, v);
13055
13055
  }
@@ -13058,51 +13058,51 @@ tr.prototype._update = function(n, s) {
13058
13058
  tr.prototype._digest = function(n) {
13059
13059
  return n === "hex" ? Ne.toHex32(this.h, "big") : Ne.split32(this.h, "big");
13060
13060
  };
13061
- function r2(h, n, s, o, m) {
13061
+ function rm(h, n, s, o, m) {
13062
13062
  var f = h & s ^ ~h & m;
13063
13063
  return f < 0 && (f += 4294967296), f;
13064
13064
  }
13065
- function i2(h, n, s, o, m, f) {
13065
+ function im(h, n, s, o, m, f) {
13066
13066
  var g = n & o ^ ~n & f;
13067
13067
  return g < 0 && (g += 4294967296), g;
13068
13068
  }
13069
- function n2(h, n, s, o, m) {
13069
+ function nm(h, n, s, o, m) {
13070
13070
  var f = h & s ^ h & m ^ s & m;
13071
13071
  return f < 0 && (f += 4294967296), f;
13072
13072
  }
13073
- function f2(h, n, s, o, m, f) {
13073
+ function fm(h, n, s, o, m, f) {
13074
13074
  var g = n & o ^ n & f ^ o & f;
13075
13075
  return g < 0 && (g += 4294967296), g;
13076
13076
  }
13077
- function a2(h, n) {
13077
+ function am(h, n) {
13078
13078
  var s = ur(h, n, 28), o = ur(n, h, 2), m = ur(n, h, 7), f = s ^ o ^ m;
13079
13079
  return f < 0 && (f += 4294967296), f;
13080
13080
  }
13081
- function h2(h, n) {
13081
+ function hm(h, n) {
13082
13082
  var s = lr(h, n, 28), o = lr(n, h, 2), m = lr(n, h, 7), f = s ^ o ^ m;
13083
13083
  return f < 0 && (f += 4294967296), f;
13084
13084
  }
13085
- function s2(h, n) {
13085
+ function sm(h, n) {
13086
13086
  var s = ur(h, n, 14), o = ur(h, n, 18), m = ur(n, h, 9), f = s ^ o ^ m;
13087
13087
  return f < 0 && (f += 4294967296), f;
13088
13088
  }
13089
- function o2(h, n) {
13089
+ function om(h, n) {
13090
13090
  var s = lr(h, n, 14), o = lr(h, n, 18), m = lr(n, h, 9), f = s ^ o ^ m;
13091
13091
  return f < 0 && (f += 4294967296), f;
13092
13092
  }
13093
- function u2(h, n) {
13093
+ function um(h, n) {
13094
13094
  var s = ur(h, n, 1), o = ur(h, n, 8), m = yo(h, n, 7), f = s ^ o ^ m;
13095
13095
  return f < 0 && (f += 4294967296), f;
13096
13096
  }
13097
- function l2(h, n) {
13097
+ function lm(h, n) {
13098
13098
  var s = lr(h, n, 1), o = lr(h, n, 8), m = wo(h, n, 7), f = s ^ o ^ m;
13099
13099
  return f < 0 && (f += 4294967296), f;
13100
13100
  }
13101
- function d2(h, n) {
13101
+ function dm(h, n) {
13102
13102
  var s = ur(h, n, 19), o = ur(n, h, 29), m = yo(h, n, 6), f = s ^ o ^ m;
13103
13103
  return f < 0 && (f += 4294967296), f;
13104
13104
  }
13105
- function c2(h, n) {
13105
+ function cm(h, n) {
13106
13106
  var s = lr(h, n, 19), o = lr(n, h, 29), m = wo(h, n, 6), f = s ^ o ^ m;
13107
13107
  return f < 0 && (f += 4294967296), f;
13108
13108
  }
@@ -13130,7 +13130,7 @@ function kr() {
13130
13130
  ];
13131
13131
  }
13132
13132
  l0.inherits(kr, _o);
13133
- var v2 = kr;
13133
+ var vm = kr;
13134
13134
  kr.blockSize = 1024;
13135
13135
  kr.outSize = 384;
13136
13136
  kr.hmacStrength = 192;
@@ -13141,9 +13141,9 @@ kr.prototype._digest = function(n) {
13141
13141
  _i.sha1 = Dp;
13142
13142
  _i.sha224 = Yp;
13143
13143
  _i.sha256 = go;
13144
- _i.sha384 = v2;
13144
+ _i.sha384 = vm;
13145
13145
  _i.sha512 = xo;
13146
- var So = {}, jr = Xt, p2 = xi, cn = jr.rotl32, Pa = jr.sum32, qi = jr.sum32_3, Da = jr.sum32_4, Ao = p2.BlockHash;
13146
+ var So = {}, jr = Xt, pm = xi, cn = jr.rotl32, Pa = jr.sum32, qi = jr.sum32_3, Da = jr.sum32_4, Ao = pm.BlockHash;
13147
13147
  function mr() {
13148
13148
  if (!(this instanceof mr))
13149
13149
  return new mr();
@@ -13159,15 +13159,15 @@ mr.prototype._update = function(n, s) {
13159
13159
  for (var o = this.h[0], m = this.h[1], f = this.h[2], g = this.h[3], y = this.h[4], S = o, B = m, M = f, x = g, I = y, k = 0; k < 80; k++) {
13160
13160
  var D = Pa(
13161
13161
  cn(
13162
- Da(o, Na(k, m, f, g), n[b2[k] + s], m2(k)),
13163
- w2[k]
13162
+ Da(o, Na(k, m, f, g), n[bm[k] + s], mm(k)),
13163
+ wm[k]
13164
13164
  ),
13165
13165
  y
13166
13166
  );
13167
13167
  o = y, y = g, g = cn(f, 10), f = m, m = D, D = Pa(
13168
13168
  cn(
13169
- Da(S, Na(79 - k, B, M, x), n[y2[k] + s], g2(k)),
13170
- M2[k]
13169
+ Da(S, Na(79 - k, B, M, x), n[ym[k] + s], gm(k)),
13170
+ Mm[k]
13171
13171
  ),
13172
13172
  I
13173
13173
  ), S = I, I = x, x = cn(M, 10), M = B, B = D;
@@ -13180,13 +13180,13 @@ mr.prototype._digest = function(n) {
13180
13180
  function Na(h, n, s, o) {
13181
13181
  return h <= 15 ? n ^ s ^ o : h <= 31 ? n & s | ~n & o : h <= 47 ? (n | ~s) ^ o : h <= 63 ? n & o | s & ~o : n ^ (s | ~o);
13182
13182
  }
13183
- function m2(h) {
13183
+ function mm(h) {
13184
13184
  return h <= 15 ? 0 : h <= 31 ? 1518500249 : h <= 47 ? 1859775393 : h <= 63 ? 2400959708 : 2840853838;
13185
13185
  }
13186
- function g2(h) {
13186
+ function gm(h) {
13187
13187
  return h <= 15 ? 1352829926 : h <= 31 ? 1548603684 : h <= 47 ? 1836072691 : h <= 63 ? 2053994217 : 0;
13188
13188
  }
13189
- var b2 = [
13189
+ var bm = [
13190
13190
  0,
13191
13191
  1,
13192
13192
  2,
@@ -13267,7 +13267,7 @@ var b2 = [
13267
13267
  6,
13268
13268
  15,
13269
13269
  13
13270
- ], y2 = [
13270
+ ], ym = [
13271
13271
  5,
13272
13272
  14,
13273
13273
  7,
@@ -13348,7 +13348,7 @@ var b2 = [
13348
13348
  3,
13349
13349
  9,
13350
13350
  11
13351
- ], w2 = [
13351
+ ], wm = [
13352
13352
  11,
13353
13353
  14,
13354
13354
  15,
@@ -13429,7 +13429,7 @@ var b2 = [
13429
13429
  8,
13430
13430
  5,
13431
13431
  6
13432
- ], M2 = [
13432
+ ], Mm = [
13433
13433
  8,
13434
13434
  9,
13435
13435
  9,
@@ -13510,15 +13510,15 @@ var b2 = [
13510
13510
  13,
13511
13511
  11,
13512
13512
  11
13513
- ], x2 = Xt, _2 = We;
13513
+ ], xm = Xt, _m = We;
13514
13514
  function vi(h, n, s) {
13515
13515
  if (!(this instanceof vi))
13516
13516
  return new vi(h, n, s);
13517
- this.Hash = h, this.blockSize = h.blockSize / 8, this.outSize = h.outSize / 8, this.inner = null, this.outer = null, this._init(x2.toArray(n, s));
13517
+ this.Hash = h, this.blockSize = h.blockSize / 8, this.outSize = h.outSize / 8, this.inner = null, this.outer = null, this._init(xm.toArray(n, s));
13518
13518
  }
13519
- var S2 = vi;
13519
+ var Sm = vi;
13520
13520
  vi.prototype._init = function(n) {
13521
- n.length > this.blockSize && (n = new this.Hash().update(n).digest()), _2(n.length <= this.blockSize);
13521
+ n.length > this.blockSize && (n = new this.Hash().update(n).digest()), _m(n.length <= this.blockSize);
13522
13522
  for (var s = n.length; s < this.blockSize; s++)
13523
13523
  n.push(0);
13524
13524
  for (s = 0; s < n.length; s++)
@@ -13535,10 +13535,10 @@ vi.prototype.digest = function(n) {
13535
13535
  };
13536
13536
  (function(h) {
13537
13537
  var n = h;
13538
- n.utils = Xt, n.common = xi, n.sha = _i, n.ripemd = So, n.hmac = S2, n.sha1 = n.sha.sha1, n.sha256 = n.sha.sha256, n.sha224 = n.sha.sha224, n.sha384 = n.sha.sha384, n.sha512 = n.sha.sha512, n.ripemd160 = n.ripemd.ripemd160;
13538
+ n.utils = Xt, n.common = xi, n.sha = _i, n.ripemd = So, n.hmac = Sm, n.sha1 = n.sha.sha1, n.sha256 = n.sha.sha256, n.sha224 = n.sha.sha224, n.sha384 = n.sha.sha384, n.sha512 = n.sha.sha512, n.ripemd160 = n.ripemd.ripemd160;
13539
13539
  })(rf);
13540
13540
  var Cf, $a;
13541
- function A2() {
13541
+ function Am() {
13542
13542
  return $a || ($a = 1, Cf = {
13543
13543
  doubles: {
13544
13544
  step: 4,
@@ -14436,7 +14436,7 @@ function A2() {
14436
14436
  });
14437
14437
  var S;
14438
14438
  try {
14439
- S = A2();
14439
+ S = Am();
14440
14440
  } catch (B) {
14441
14441
  S = void 0;
14442
14442
  }
@@ -14470,7 +14470,7 @@ function A2() {
14470
14470
  ]
14471
14471
  });
14472
14472
  })(ef);
14473
- var B2 = rf, Jr = O0, Bo = We;
14473
+ var Bm = rf, Jr = O0, Bo = We;
14474
14474
  function Dr(h) {
14475
14475
  if (!(this instanceof Dr))
14476
14476
  return new Dr(h);
@@ -14481,7 +14481,7 @@ function Dr(h) {
14481
14481
  "Not enough entropy. Minimum is: " + this.minEntropy + " bits"
14482
14482
  ), this._init(n, s, o);
14483
14483
  }
14484
- var E2 = Dr;
14484
+ var Em = Dr;
14485
14485
  Dr.prototype._init = function(n, s, o) {
14486
14486
  var m = n.concat(s).concat(o);
14487
14487
  this.K = new Array(this.outLen / 8), this.V = new Array(this.outLen / 8);
@@ -14490,7 +14490,7 @@ Dr.prototype._init = function(n, s, o) {
14490
14490
  this._update(m), this._reseed = 1, this.reseedInterval = 281474976710656;
14491
14491
  };
14492
14492
  Dr.prototype._hmac = function() {
14493
- return new B2.hmac(this.hash, this.K);
14493
+ return new Bm.hmac(this.hash, this.K);
14494
14494
  };
14495
14495
  Dr.prototype._update = function(n) {
14496
14496
  var s = this._hmac().update(this.V).update([0]);
@@ -14511,11 +14511,11 @@ Dr.prototype.generate = function(n, s, o, m) {
14511
14511
  var g = f.slice(0, n);
14512
14512
  return this._update(o), this._reseed++, Jr.encode(g, s);
14513
14513
  };
14514
- var k2 = Rr, I2 = ze, d0 = I2.assert;
14514
+ var km = Rr, Im = ze, d0 = Im.assert;
14515
14515
  function Fe(h, n) {
14516
14516
  this.ec = h, this.priv = null, this.pub = null, n.priv && this._importPrivate(n.priv, n.privEnc), n.pub && this._importPublic(n.pub, n.pubEnc);
14517
14517
  }
14518
- var R2 = Fe;
14518
+ var Rm = Fe;
14519
14519
  Fe.fromPublic = function(n, s, o) {
14520
14520
  return s instanceof Fe ? s : new Fe(n, {
14521
14521
  pub: s,
@@ -14539,7 +14539,7 @@ Fe.prototype.getPrivate = function(n) {
14539
14539
  return n === "hex" ? this.priv.toString(16, 2) : this.priv;
14540
14540
  };
14541
14541
  Fe.prototype._importPrivate = function(n, s) {
14542
- this.priv = new k2(n, s || 16), this.priv = this.priv.umod(this.ec.curve.n);
14542
+ this.priv = new km(n, s || 16), this.priv = this.priv.umod(this.ec.curve.n);
14543
14543
  };
14544
14544
  Fe.prototype._importPublic = function(n, s) {
14545
14545
  if (n.x || n.y) {
@@ -14560,14 +14560,14 @@ Fe.prototype.verify = function(n, s, o) {
14560
14560
  Fe.prototype.inspect = function() {
14561
14561
  return "<Key priv: " + (this.priv && this.priv.toString(16, 2)) + " pub: " + (this.pub && this.pub.inspect()) + " >";
14562
14562
  };
14563
- var In = Rr, H0 = ze, T2 = H0.assert;
14563
+ var In = Rr, H0 = ze, Tm = H0.assert;
14564
14564
  function ff(h, n) {
14565
14565
  if (h instanceof ff)
14566
14566
  return h;
14567
- this._importDER(h, n) || (T2(h.r && h.s, "Signature without r or s"), this.r = new In(h.r, 16), this.s = new In(h.s, 16), h.recoveryParam === void 0 ? this.recoveryParam = null : this.recoveryParam = h.recoveryParam);
14567
+ this._importDER(h, n) || (Tm(h.r && h.s, "Signature without r or s"), this.r = new In(h.r, 16), this.s = new In(h.s, 16), h.recoveryParam === void 0 ? this.recoveryParam = null : this.recoveryParam = h.recoveryParam);
14568
14568
  }
14569
- var C2 = ff;
14570
- function F2() {
14569
+ var Cm = ff;
14570
+ function Fm() {
14571
14571
  this.place = 0;
14572
14572
  }
14573
14573
  function Ff(h, n) {
@@ -14588,7 +14588,7 @@ function Ua(h) {
14588
14588
  }
14589
14589
  ff.prototype._importDER = function(n, s) {
14590
14590
  n = H0.toArray(n, s);
14591
- var o = new F2();
14591
+ var o = new Fm();
14592
14592
  if (n[o.place++] !== 48)
14593
14593
  return !1;
14594
14594
  var m = Ff(n, o);
@@ -14636,11 +14636,11 @@ ff.prototype.toDER = function(n) {
14636
14636
  return qf(g, f.length), g = g.concat(f), H0.encode(g, n);
14637
14637
  };
14638
14638
  var Pf, La;
14639
- function q2() {
14639
+ function qm() {
14640
14640
  if (La)
14641
14641
  return Pf;
14642
14642
  La = 1;
14643
- var h = Rr, n = E2, s = ze, o = ef, m = P0(), f = s.assert, g = R2, y = C2;
14643
+ var h = Rr, n = Em, s = ze, o = ef, m = P0(), f = s.assert, g = Rm, y = Cm;
14644
14644
  function S(B) {
14645
14645
  if (!(this instanceof S))
14646
14646
  return new S(B);
@@ -14791,12 +14791,12 @@ _e.prototype.getSecret = function(n) {
14791
14791
  _e.prototype.getPublic = function(n) {
14792
14792
  return nn.encode(this.pubBytes(), n);
14793
14793
  };
14794
- var P2 = _e, D2 = Rr, af = ze, za = af.assert, hf = af.cachedProperty, N2 = af.parseBytes;
14794
+ var Pm = _e, Dm = Rr, af = ze, za = af.assert, hf = af.cachedProperty, Nm = af.parseBytes;
14795
14795
  function ri(h, n) {
14796
- this.eddsa = h, typeof n != "object" && (n = N2(n)), Array.isArray(n) && (za(n.length === h.encodingLength * 2, "Signature has invalid size"), n = {
14796
+ this.eddsa = h, typeof n != "object" && (n = Nm(n)), Array.isArray(n) && (za(n.length === h.encodingLength * 2, "Signature has invalid size"), n = {
14797
14797
  R: n.slice(0, h.encodingLength),
14798
14798
  S: n.slice(h.encodingLength)
14799
- }), za(n.R && n.S, "Signature without R or S"), h.isPoint(n.R) && (this._R = n.R), n.S instanceof D2 && (this._S = n.S), this._Rencoded = Array.isArray(n.R) ? n.R : n.Rencoded, this._Sencoded = Array.isArray(n.S) ? n.S : n.Sencoded;
14799
+ }), za(n.R && n.S, "Signature without R or S"), h.isPoint(n.R) && (this._R = n.R), n.S instanceof Dm && (this._S = n.S), this._Rencoded = Array.isArray(n.R) ? n.R : n.Rencoded, this._Sencoded = Array.isArray(n.S) ? n.S : n.Sencoded;
14800
14800
  }
14801
14801
  hf(ri, "S", function() {
14802
14802
  return this.eddsa.decodeInt(this.Sencoded());
@@ -14816,13 +14816,13 @@ ri.prototype.toBytes = function() {
14816
14816
  ri.prototype.toHex = function() {
14817
14817
  return af.encode(this.toBytes(), "hex").toUpperCase();
14818
14818
  };
14819
- var $2 = ri, U2 = rf, L2 = ef, pi = ze, O2 = pi.assert, ko = pi.parseBytes, Io = P2, Ka = $2;
14819
+ var $m = ri, Um = rf, Lm = ef, pi = ze, Om = pi.assert, ko = pi.parseBytes, Io = Pm, Ka = $m;
14820
14820
  function $e(h) {
14821
- if (O2(h === "ed25519", "only tested with ed25519 so far"), !(this instanceof $e))
14821
+ if (Om(h === "ed25519", "only tested with ed25519 so far"), !(this instanceof $e))
14822
14822
  return new $e(h);
14823
- h = L2[h].curve, this.curve = h, this.g = h.g, this.g.precompute(h.n.bitLength() + 1), this.pointClass = h.point().constructor, this.encodingLength = Math.ceil(h.n.bitLength() / 8), this.hash = U2.sha512;
14823
+ h = Lm[h].curve, this.curve = h, this.g = h.g, this.g.precompute(h.n.bitLength() + 1), this.pointClass = h.point().constructor, this.encodingLength = Math.ceil(h.n.bitLength() / 8), this.hash = Um.sha512;
14824
14824
  }
14825
- var z2 = $e;
14825
+ var zm = $e;
14826
14826
  $e.prototype.sign = function(n, s) {
14827
14827
  n = ko(n);
14828
14828
  var o = this.keyFromSecret(s), m = this.hashInt(o.messagePrefix(), n), f = this.g.mul(m), g = this.encodePoint(f), y = this.hashInt(g, o.pubBytes(), n).mul(o.priv()), S = m.add(y).umod(this.curve.n);
@@ -14870,7 +14870,7 @@ var Ha;
14870
14870
  function Z0() {
14871
14871
  return Ha || (Ha = 1, function(h) {
14872
14872
  var n = h;
14873
- n.version = Kv.version, n.utils = ze, n.rand = P0(), n.curve = z0, n.curves = ef, n.ec = q2(), n.eddsa = z2;
14873
+ n.version = Kv.version, n.utils = ze, n.rand = P0(), n.curve = z0, n.curves = ef, n.ec = qm(), n.eddsa = zm;
14874
14874
  }(kf)), kf;
14875
14875
  }
14876
14876
  var rr = {}, Df = {}, W0 = { exports: {} };
@@ -16053,8 +16053,8 @@ W0.exports;
16053
16053
  };
16054
16054
  })(h, Gt);
16055
16055
  })(W0);
16056
- var K2 = W0.exports, Nf = {}, Za;
16057
- function H2() {
16056
+ var Km = W0.exports, Nf = {}, Za;
16057
+ function Hm() {
16058
16058
  return Za || (Za = 1, function(h) {
16059
16059
  var n = fn(), s = Jt, o = h;
16060
16060
  o.define = function(g, y) {
@@ -16090,7 +16090,7 @@ function H2() {
16090
16090
  };
16091
16091
  }(Nf)), Nf;
16092
16092
  }
16093
- var $f = {}, Ro = {}, Z2 = Jt;
16093
+ var $f = {}, Ro = {}, Zm = Jt;
16094
16094
  function Ge(h) {
16095
16095
  this._reporterState = {
16096
16096
  obj: null,
@@ -16151,7 +16151,7 @@ Ge.prototype.wrapResult = function(n) {
16151
16151
  function mi(h, n) {
16152
16152
  this.path = h, this.rethrow(n);
16153
16153
  }
16154
- Z2(mi, Error);
16154
+ Zm(mi, Error);
16155
16155
  mi.prototype.rethrow = function(n) {
16156
16156
  if (this.message = n + " at: " + (this.path || "(shallow)"), Error.captureStackTrace && Error.captureStackTrace(this, mi), !this.stack)
16157
16157
  try {
@@ -16214,7 +16214,7 @@ function Va() {
16214
16214
  }, vn;
16215
16215
  }
16216
16216
  var Uf, Ya;
16217
- function W2() {
16217
+ function Wm() {
16218
16218
  if (Ya)
16219
16219
  return Uf;
16220
16220
  Ya = 1;
@@ -16542,11 +16542,11 @@ var Ja;
16542
16542
  function Ui() {
16543
16543
  return Ja || (Ja = 1, function(h) {
16544
16544
  var n = h;
16545
- n.Reporter = Ro.Reporter, n.DecoderBuffer = Va().DecoderBuffer, n.EncoderBuffer = Va().EncoderBuffer, n.Node = W2();
16545
+ n.Reporter = Ro.Reporter, n.DecoderBuffer = Va().DecoderBuffer, n.EncoderBuffer = Va().EncoderBuffer, n.Node = Wm();
16546
16546
  }($f)), $f;
16547
16547
  }
16548
16548
  var Lf = {}, Of = {}, Ga;
16549
- function V2() {
16549
+ function Vm() {
16550
16550
  return Ga || (Ga = 1, function(h) {
16551
16551
  var n = To();
16552
16552
  h.tagClass = {
@@ -16598,7 +16598,7 @@ function To() {
16598
16598
  var g = o[f];
16599
16599
  m[g] = f;
16600
16600
  }), m;
16601
- }, n.der = V2();
16601
+ }, n.der = Vm();
16602
16602
  }(Lf)), Lf;
16603
16603
  }
16604
16604
  var zf = {}, Kf, ja;
@@ -16773,7 +16773,7 @@ function Co() {
16773
16773
  return Kf;
16774
16774
  }
16775
16775
  var Hf, Qa;
16776
- function Y2() {
16776
+ function Ym() {
16777
16777
  if (Qa)
16778
16778
  return Hf;
16779
16779
  Qa = 1;
@@ -16805,10 +16805,10 @@ function Y2() {
16805
16805
  }, Hf;
16806
16806
  }
16807
16807
  var th;
16808
- function J2() {
16808
+ function Jm() {
16809
16809
  return th || (th = 1, function(h) {
16810
16810
  var n = h;
16811
- n.der = Co(), n.pem = Y2();
16811
+ n.der = Co(), n.pem = Ym();
16812
16812
  }(zf)), zf;
16813
16813
  }
16814
16814
  var Zf = {}, Wf, eh;
@@ -16961,7 +16961,7 @@ function Fo() {
16961
16961
  return Wf;
16962
16962
  }
16963
16963
  var Vf, rh;
16964
- function G2() {
16964
+ function Gm() {
16965
16965
  if (rh)
16966
16966
  return Vf;
16967
16967
  rh = 1;
@@ -16977,17 +16977,17 @@ function G2() {
16977
16977
  }, Vf;
16978
16978
  }
16979
16979
  var ih;
16980
- function X2() {
16980
+ function Xm() {
16981
16981
  return ih || (ih = 1, function(h) {
16982
16982
  var n = h;
16983
- n.der = Fo(), n.pem = G2();
16983
+ n.der = Fo(), n.pem = Gm();
16984
16984
  }(Zf)), Zf;
16985
16985
  }
16986
16986
  var nh;
16987
16987
  function fn() {
16988
16988
  return nh || (nh = 1, function(h) {
16989
16989
  var n = h;
16990
- n.bignum = K2, n.define = H2().define, n.base = Ui(), n.constants = To(), n.decoders = J2(), n.encoders = X2();
16990
+ n.bignum = Km, n.define = Hm().define, n.base = Ui(), n.constants = To(), n.decoders = Jm(), n.encoders = Xm();
16991
16991
  }(Df)), Df;
16992
16992
  }
16993
16993
  var ir = fn(), fh = ir.define("Time", function() {
@@ -16995,7 +16995,7 @@ var ir = fn(), fh = ir.define("Time", function() {
16995
16995
  utcTime: this.utctime(),
16996
16996
  generalTime: this.gentime()
16997
16997
  });
16998
- }), j2 = ir.define("AttributeTypeValue", function() {
16998
+ }), jm = ir.define("AttributeTypeValue", function() {
16999
16999
  this.seq().obj(
17000
17000
  this.key("type").objid(),
17001
17001
  this.key("value").any()
@@ -17006,52 +17006,52 @@ var ir = fn(), fh = ir.define("Time", function() {
17006
17006
  this.key("parameters").optional(),
17007
17007
  this.key("curve").objid().optional()
17008
17008
  );
17009
- }), Q2 = ir.define("SubjectPublicKeyInfo", function() {
17009
+ }), Qm = ir.define("SubjectPublicKeyInfo", function() {
17010
17010
  this.seq().obj(
17011
17011
  this.key("algorithm").use(V0),
17012
17012
  this.key("subjectPublicKey").bitstr()
17013
17013
  );
17014
- }), tm = ir.define("RelativeDistinguishedName", function() {
17015
- this.setof(j2);
17016
- }), em = ir.define("RDNSequence", function() {
17017
- this.seqof(tm);
17014
+ }), t2 = ir.define("RelativeDistinguishedName", function() {
17015
+ this.setof(jm);
17016
+ }), e2 = ir.define("RDNSequence", function() {
17017
+ this.seqof(t2);
17018
17018
  }), ah = ir.define("Name", function() {
17019
17019
  this.choice({
17020
- rdnSequence: this.use(em)
17020
+ rdnSequence: this.use(e2)
17021
17021
  });
17022
- }), rm = ir.define("Validity", function() {
17022
+ }), r2 = ir.define("Validity", function() {
17023
17023
  this.seq().obj(
17024
17024
  this.key("notBefore").use(fh),
17025
17025
  this.key("notAfter").use(fh)
17026
17026
  );
17027
- }), im = ir.define("Extension", function() {
17027
+ }), i2 = ir.define("Extension", function() {
17028
17028
  this.seq().obj(
17029
17029
  this.key("extnID").objid(),
17030
17030
  this.key("critical").bool().def(!1),
17031
17031
  this.key("extnValue").octstr()
17032
17032
  );
17033
- }), nm = ir.define("TBSCertificate", function() {
17033
+ }), n2 = ir.define("TBSCertificate", function() {
17034
17034
  this.seq().obj(
17035
17035
  this.key("version").explicit(0).int().optional(),
17036
17036
  this.key("serialNumber").int(),
17037
17037
  this.key("signature").use(V0),
17038
17038
  this.key("issuer").use(ah),
17039
- this.key("validity").use(rm),
17039
+ this.key("validity").use(r2),
17040
17040
  this.key("subject").use(ah),
17041
- this.key("subjectPublicKeyInfo").use(Q2),
17041
+ this.key("subjectPublicKeyInfo").use(Qm),
17042
17042
  this.key("issuerUniqueID").implicit(1).bitstr().optional(),
17043
17043
  this.key("subjectUniqueID").implicit(2).bitstr().optional(),
17044
- this.key("extensions").explicit(3).seqof(im).optional()
17044
+ this.key("extensions").explicit(3).seqof(i2).optional()
17045
17045
  );
17046
- }), fm = ir.define("X509Certificate", function() {
17046
+ }), f2 = ir.define("X509Certificate", function() {
17047
17047
  this.seq().obj(
17048
- this.key("tbsCertificate").use(nm),
17048
+ this.key("tbsCertificate").use(n2),
17049
17049
  this.key("signatureAlgorithm").use(V0),
17050
17050
  this.key("signatureValue").bitstr()
17051
17051
  );
17052
- }), am = fm, nr = fn();
17053
- rr.certificate = am;
17054
- var hm = nr.define("RSAPrivateKey", function() {
17052
+ }), a2 = f2, nr = fn();
17053
+ rr.certificate = a2;
17054
+ var h2 = nr.define("RSAPrivateKey", function() {
17055
17055
  this.seq().obj(
17056
17056
  this.key("version").int(),
17057
17057
  this.key("modulus").int(),
@@ -17064,14 +17064,14 @@ var hm = nr.define("RSAPrivateKey", function() {
17064
17064
  this.key("coefficient").int()
17065
17065
  );
17066
17066
  });
17067
- rr.RSAPrivateKey = hm;
17068
- var sm = nr.define("RSAPublicKey", function() {
17067
+ rr.RSAPrivateKey = h2;
17068
+ var s2 = nr.define("RSAPublicKey", function() {
17069
17069
  this.seq().obj(
17070
17070
  this.key("modulus").int(),
17071
17071
  this.key("publicExponent").int()
17072
17072
  );
17073
17073
  });
17074
- rr.RSAPublicKey = sm;
17074
+ rr.RSAPublicKey = s2;
17075
17075
  var qo = nr.define("AlgorithmIdentifier", function() {
17076
17076
  this.seq().obj(
17077
17077
  this.key("algorithm").objid(),
@@ -17083,22 +17083,22 @@ var qo = nr.define("AlgorithmIdentifier", function() {
17083
17083
  this.key("g").int()
17084
17084
  ).optional()
17085
17085
  );
17086
- }), om = nr.define("SubjectPublicKeyInfo", function() {
17086
+ }), o2 = nr.define("SubjectPublicKeyInfo", function() {
17087
17087
  this.seq().obj(
17088
17088
  this.key("algorithm").use(qo),
17089
17089
  this.key("subjectPublicKey").bitstr()
17090
17090
  );
17091
17091
  });
17092
- rr.PublicKey = om;
17093
- var um = nr.define("PrivateKeyInfo", function() {
17092
+ rr.PublicKey = o2;
17093
+ var u2 = nr.define("PrivateKeyInfo", function() {
17094
17094
  this.seq().obj(
17095
17095
  this.key("version").int(),
17096
17096
  this.key("algorithm").use(qo),
17097
17097
  this.key("subjectPrivateKey").octstr()
17098
17098
  );
17099
17099
  });
17100
- rr.PrivateKey = um;
17101
- var lm = nr.define("EncryptedPrivateKeyInfo", function() {
17100
+ rr.PrivateKey = u2;
17101
+ var l2 = nr.define("EncryptedPrivateKeyInfo", function() {
17102
17102
  this.seq().obj(
17103
17103
  this.key("algorithm").seq().obj(
17104
17104
  this.key("id").objid(),
@@ -17119,8 +17119,8 @@ var lm = nr.define("EncryptedPrivateKeyInfo", function() {
17119
17119
  this.key("subjectPrivateKey").octstr()
17120
17120
  );
17121
17121
  });
17122
- rr.EncryptedPrivateKey = lm;
17123
- var dm = nr.define("DSAPrivateKey", function() {
17122
+ rr.EncryptedPrivateKey = l2;
17123
+ var d2 = nr.define("DSAPrivateKey", function() {
17124
17124
  this.seq().obj(
17125
17125
  this.key("version").int(),
17126
17126
  this.key("p").int(),
@@ -17130,30 +17130,30 @@ var dm = nr.define("DSAPrivateKey", function() {
17130
17130
  this.key("priv_key").int()
17131
17131
  );
17132
17132
  });
17133
- rr.DSAPrivateKey = dm;
17133
+ rr.DSAPrivateKey = d2;
17134
17134
  rr.DSAparam = nr.define("DSAparam", function() {
17135
17135
  this.int();
17136
17136
  });
17137
- var cm = nr.define("ECParameters", function() {
17137
+ var c2 = nr.define("ECParameters", function() {
17138
17138
  this.choice({
17139
17139
  namedCurve: this.objid()
17140
17140
  });
17141
- }), vm = nr.define("ECPrivateKey", function() {
17141
+ }), v2 = nr.define("ECPrivateKey", function() {
17142
17142
  this.seq().obj(
17143
17143
  this.key("version").int(),
17144
17144
  this.key("privateKey").octstr(),
17145
- this.key("parameters").optional().explicit(0).use(cm),
17145
+ this.key("parameters").optional().explicit(0).use(c2),
17146
17146
  this.key("publicKey").optional().explicit(1).bitstr()
17147
17147
  );
17148
17148
  });
17149
- rr.ECPrivateKey = vm;
17149
+ rr.ECPrivateKey = v2;
17150
17150
  rr.signature = nr.define("signature", function() {
17151
17151
  this.seq().obj(
17152
17152
  this.key("r").int(),
17153
17153
  this.key("s").int()
17154
17154
  );
17155
17155
  });
17156
- const pm = {
17156
+ const p2 = {
17157
17157
  "2.16.840.1.101.3.4.1.1": "aes-128-ecb",
17158
17158
  "2.16.840.1.101.3.4.1.2": "aes-128-cbc",
17159
17159
  "2.16.840.1.101.3.4.1.3": "aes-128-ofb",
@@ -17167,29 +17167,29 @@ const pm = {
17167
17167
  "2.16.840.1.101.3.4.1.43": "aes-256-ofb",
17168
17168
  "2.16.840.1.101.3.4.1.44": "aes-256-cfb"
17169
17169
  };
17170
- var mm = /Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m, gm = /^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m, bm = /^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m, ym = Wn, wm = Le, pn = Ot.Buffer, Mm = function(h, n) {
17171
- var s = h.toString(), o = s.match(mm), m;
17170
+ var m2 = /Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m, g2 = /^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m, b2 = /^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m, y2 = Wn, w2 = Le, pn = Ot.Buffer, M2 = function(h, n) {
17171
+ var s = h.toString(), o = s.match(m2), m;
17172
17172
  if (o) {
17173
- var g = "aes" + o[1], y = pn.from(o[2], "hex"), S = pn.from(o[3].replace(/[\r\n]/g, ""), "base64"), B = ym(n, y.slice(0, 8), parseInt(o[1], 10)).key, M = [], x = wm.createDecipheriv(g, B, y);
17173
+ var g = "aes" + o[1], y = pn.from(o[2], "hex"), S = pn.from(o[3].replace(/[\r\n]/g, ""), "base64"), B = y2(n, y.slice(0, 8), parseInt(o[1], 10)).key, M = [], x = w2.createDecipheriv(g, B, y);
17174
17174
  M.push(x.update(S)), M.push(x.final()), m = pn.concat(M);
17175
17175
  } else {
17176
- var f = s.match(bm);
17176
+ var f = s.match(b2);
17177
17177
  m = pn.from(f[2].replace(/[\r\n]/g, ""), "base64");
17178
17178
  }
17179
- var I = s.match(gm)[1];
17179
+ var I = s.match(g2)[1];
17180
17180
  return {
17181
17181
  tag: I,
17182
17182
  data: m
17183
17183
  };
17184
- }, qe = rr, xm = pm, _m = Mm, Sm = Le, Am = Un, c0 = Ot.Buffer;
17185
- function Bm(h, n) {
17186
- var s = h.algorithm.decrypt.kde.kdeparams.salt, o = parseInt(h.algorithm.decrypt.kde.kdeparams.iters.toString(), 10), m = xm[h.algorithm.decrypt.cipher.algo.join(".")], f = h.algorithm.decrypt.cipher.iv, g = h.subjectPrivateKey, y = parseInt(m.split("-")[1], 10) / 8, S = Am.pbkdf2Sync(n, s, o, y, "sha1"), B = Sm.createDecipheriv(m, S, f), M = [];
17184
+ }, qe = rr, x2 = p2, _2 = M2, S2 = Le, A2 = Un, c0 = Ot.Buffer;
17185
+ function B2(h, n) {
17186
+ var s = h.algorithm.decrypt.kde.kdeparams.salt, o = parseInt(h.algorithm.decrypt.kde.kdeparams.iters.toString(), 10), m = x2[h.algorithm.decrypt.cipher.algo.join(".")], f = h.algorithm.decrypt.cipher.iv, g = h.subjectPrivateKey, y = parseInt(m.split("-")[1], 10) / 8, S = A2.pbkdf2Sync(n, s, o, y, "sha1"), B = S2.createDecipheriv(m, S, f), M = [];
17187
17187
  return M.push(B.update(g)), M.push(B.final()), c0.concat(M);
17188
17188
  }
17189
17189
  function Po(h) {
17190
17190
  var n;
17191
17191
  typeof h == "object" && !c0.isBuffer(h) && (n = h.passphrase, h = h.key), typeof h == "string" && (h = c0.from(h));
17192
- var s = _m(h, n), o = s.tag, m = s.data, f, g;
17192
+ var s = _2(h, n), o = s.tag, m = s.data, f, g;
17193
17193
  switch (o) {
17194
17194
  case "CERTIFICATE":
17195
17195
  g = qe.certificate.decode(m, "der").tbsCertificate.subjectPublicKeyInfo;
@@ -17211,7 +17211,7 @@ function Po(h) {
17211
17211
  throw new Error("unknown key id " + f);
17212
17212
  }
17213
17213
  case "ENCRYPTED PRIVATE KEY":
17214
- m = qe.EncryptedPrivateKey.decode(m, "der"), m = Bm(m, n);
17214
+ m = qe.EncryptedPrivateKey.decode(m, "der"), m = B2(m, n);
17215
17215
  case "PRIVATE KEY":
17216
17216
  switch (g = qe.PrivateKey.decode(m, "der"), f = g.algorithm.algorithm.join("."), f) {
17217
17217
  case "1.2.840.113549.1.1.1":
@@ -17258,7 +17258,7 @@ const Do = {
17258
17258
  "1.3.132.0.35": "p521"
17259
17259
  };
17260
17260
  var hh;
17261
- function Em() {
17261
+ function E2() {
17262
17262
  if (hh)
17263
17263
  return Ci.exports;
17264
17264
  hh = 1;
@@ -17347,7 +17347,7 @@ function Em() {
17347
17347
  return Ci.exports = S, Ci.exports.getKey = I, Ci.exports.makeKey = L, Ci.exports;
17348
17348
  }
17349
17349
  var Yf, sh;
17350
- function km() {
17350
+ function k2() {
17351
17351
  if (sh)
17352
17352
  return Yf;
17353
17353
  sh = 1;
@@ -17401,11 +17401,11 @@ function km() {
17401
17401
  return Yf = f, Yf;
17402
17402
  }
17403
17403
  var Jf, oh;
17404
- function Im() {
17404
+ function I2() {
17405
17405
  if (oh)
17406
17406
  return Jf;
17407
17407
  oh = 1;
17408
- var h = Ot.Buffer, n = Gi, s = Av, o = Jt, m = Em(), f = km(), g = Zh;
17408
+ var h = Ot.Buffer, n = Gi, s = Av, o = Jt, m = E2(), f = k2(), g = Zh;
17409
17409
  Object.keys(g).forEach(function(x) {
17410
17410
  g[x].id = h.from(g[x].id, "hex"), g[x.toLowerCase()] = g[x];
17411
17411
  });
@@ -18635,12 +18635,12 @@ Y0.exports;
18635
18635
  };
18636
18636
  })(h, Gt);
18637
18637
  })(Y0);
18638
- var Rm = Y0.exports, Gf, uh;
18639
- function Tm() {
18638
+ var R2 = Y0.exports, Gf, uh;
18639
+ function T2() {
18640
18640
  if (uh)
18641
18641
  return Gf;
18642
18642
  uh = 1;
18643
- var h = Z0(), n = Rm;
18643
+ var h = Z0(), n = R2;
18644
18644
  Gf = function(g) {
18645
18645
  return new o(g);
18646
18646
  };
@@ -18709,12 +18709,12 @@ function Tm() {
18709
18709
  }
18710
18710
  return Gf;
18711
18711
  }
18712
- var No = {}, Cm = Gi, v0 = Ot.Buffer, $o = function(h, n) {
18712
+ var No = {}, C2 = Gi, v0 = Ot.Buffer, $o = function(h, n) {
18713
18713
  for (var s = v0.alloc(0), o = 0, m; s.length < n; )
18714
- m = Fm(o++), s = v0.concat([s, Cm("sha1").update(h).update(m).digest()]);
18714
+ m = F2(o++), s = v0.concat([s, C2("sha1").update(h).update(m).digest()]);
18715
18715
  return s.slice(0, n);
18716
18716
  };
18717
- function Fm(h) {
18717
+ function F2(h) {
18718
18718
  var n = v0.allocUnsafe(4);
18719
18719
  return n.writeUInt32BE(h, 0), n;
18720
18720
  }
@@ -19902,67 +19902,67 @@ J0.exports;
19902
19902
  };
19903
19903
  })(h, Gt);
19904
19904
  })(J0);
19905
- var G0 = J0.exports, lh = G0, qm = Ot.Buffer;
19906
- function Pm(h, n) {
19907
- return qm.from(h.toRed(lh.mont(n.modulus)).redPow(new lh(n.publicExponent)).fromRed().toArray());
19905
+ var G0 = J0.exports, lh = G0, q2 = Ot.Buffer;
19906
+ function P2(h, n) {
19907
+ return q2.from(h.toRed(lh.mont(n.modulus)).redPow(new lh(n.publicExponent)).fromRed().toArray());
19908
19908
  }
19909
- var Lo = Pm, Dm = sf, p0 = gi, Nm = Gi, dh = $o, ch = Uo, X0 = G0, $m = Lo, Um = U0, je = Ot.Buffer, Lm = function(n, s, o) {
19909
+ var Lo = P2, D2 = sf, p0 = gi, N2 = Gi, dh = $o, ch = Uo, X0 = G0, $2 = Lo, U2 = U0, je = Ot.Buffer, L2 = function(n, s, o) {
19910
19910
  var m;
19911
19911
  n.padding ? m = n.padding : o ? m = 1 : m = 4;
19912
- var f = Dm(n), g;
19912
+ var f = D2(n), g;
19913
19913
  if (m === 4)
19914
- g = Om(f, s);
19914
+ g = O2(f, s);
19915
19915
  else if (m === 1)
19916
- g = zm(f, s, o);
19916
+ g = z2(f, s, o);
19917
19917
  else if (m === 3) {
19918
19918
  if (g = new X0(s), g.cmp(f.modulus) >= 0)
19919
19919
  throw new Error("data too long for modulus");
19920
19920
  } else
19921
19921
  throw new Error("unknown padding");
19922
- return o ? Um(g, f) : $m(g, f);
19922
+ return o ? U2(g, f) : $2(g, f);
19923
19923
  };
19924
- function Om(h, n) {
19925
- var s = h.modulus.byteLength(), o = n.length, m = Nm("sha1").update(je.alloc(0)).digest(), f = m.length, g = 2 * f;
19924
+ function O2(h, n) {
19925
+ var s = h.modulus.byteLength(), o = n.length, m = N2("sha1").update(je.alloc(0)).digest(), f = m.length, g = 2 * f;
19926
19926
  if (o > s - g - 2)
19927
19927
  throw new Error("message too long");
19928
19928
  var y = je.alloc(s - o - g - 2), S = s - f - 1, B = p0(f), M = ch(je.concat([m, y, je.alloc(1, 1), n], S), dh(B, S)), x = ch(B, dh(M, f));
19929
19929
  return new X0(je.concat([je.alloc(1), x, M], s));
19930
19930
  }
19931
- function zm(h, n, s) {
19931
+ function z2(h, n, s) {
19932
19932
  var o = n.length, m = h.modulus.byteLength();
19933
19933
  if (o > m - 11)
19934
19934
  throw new Error("message too long");
19935
19935
  var f;
19936
- return s ? f = je.alloc(m - o - 3, 255) : f = Km(m - o - 3), new X0(je.concat([je.from([0, s ? 1 : 2]), f, je.alloc(1), n], m));
19936
+ return s ? f = je.alloc(m - o - 3, 255) : f = K2(m - o - 3), new X0(je.concat([je.from([0, s ? 1 : 2]), f, je.alloc(1), n], m));
19937
19937
  }
19938
- function Km(h) {
19938
+ function K2(h) {
19939
19939
  for (var n = je.allocUnsafe(h), s = 0, o = p0(h * 2), m = 0, f; s < h; )
19940
19940
  m === o.length && (o = p0(h * 2), m = 0), f = o[m++], f && (n[s++] = f);
19941
19941
  return n;
19942
19942
  }
19943
- var Hm = sf, vh = $o, ph = Uo, mh = G0, Zm = U0, Wm = Gi, Vm = Lo, Hi = Ot.Buffer, Ym = function(n, s, o) {
19943
+ var H2 = sf, vh = $o, ph = Uo, mh = G0, Z2 = U0, W2 = Gi, V2 = Lo, Hi = Ot.Buffer, Y2 = function(n, s, o) {
19944
19944
  var m;
19945
19945
  n.padding ? m = n.padding : o ? m = 1 : m = 4;
19946
- var f = Hm(n), g = f.modulus.byteLength();
19946
+ var f = H2(n), g = f.modulus.byteLength();
19947
19947
  if (s.length > g || new mh(s).cmp(f.modulus) >= 0)
19948
19948
  throw new Error("decryption error");
19949
19949
  var y;
19950
- o ? y = Vm(new mh(s), f) : y = Zm(s, f);
19950
+ o ? y = V2(new mh(s), f) : y = Z2(s, f);
19951
19951
  var S = Hi.alloc(g - y.length);
19952
19952
  if (y = Hi.concat([S, y], g), m === 4)
19953
- return Jm(f, y);
19953
+ return J2(f, y);
19954
19954
  if (m === 1)
19955
- return Gm(f, y, o);
19955
+ return G2(f, y, o);
19956
19956
  if (m === 3)
19957
19957
  return y;
19958
19958
  throw new Error("unknown padding");
19959
19959
  };
19960
- function Jm(h, n) {
19961
- var s = h.modulus.byteLength(), o = Wm("sha1").update(Hi.alloc(0)).digest(), m = o.length;
19960
+ function J2(h, n) {
19961
+ var s = h.modulus.byteLength(), o = W2("sha1").update(Hi.alloc(0)).digest(), m = o.length;
19962
19962
  if (n[0] !== 0)
19963
19963
  throw new Error("decryption error");
19964
19964
  var f = n.slice(1, m + 1), g = n.slice(m + 1), y = ph(f, vh(g, m)), S = ph(g, vh(y, s - m - 1));
19965
- if (Xm(o, S.slice(0, m)))
19965
+ if (X2(o, S.slice(0, m)))
19966
19966
  throw new Error("decryption error");
19967
19967
  for (var B = m; S[B] === 0; )
19968
19968
  B++;
@@ -19970,7 +19970,7 @@ function Jm(h, n) {
19970
19970
  throw new Error("decryption error");
19971
19971
  return S.slice(B);
19972
19972
  }
19973
- function Gm(h, n, s) {
19973
+ function G2(h, n, s) {
19974
19974
  for (var o = n.slice(0, 2), m = 2, f = 0; n[m++] !== 0; )
19975
19975
  if (m >= n.length) {
19976
19976
  f++;
@@ -19981,7 +19981,7 @@ function Gm(h, n, s) {
19981
19981
  throw new Error("decryption error");
19982
19982
  return n.slice(m);
19983
19983
  }
19984
- function Xm(h, n) {
19984
+ function X2(h, n) {
19985
19985
  h = Hi.from(h), n = Hi.from(n);
19986
19986
  var s = 0, o = h.length;
19987
19987
  h.length !== n.length && (s++, o = Math.min(h.length, n.length));
@@ -19990,7 +19990,7 @@ function Xm(h, n) {
19990
19990
  return s;
19991
19991
  }
19992
19992
  (function(h) {
19993
- h.publicEncrypt = Lm, h.privateDecrypt = Ym, h.privateEncrypt = function(s, o) {
19993
+ h.publicEncrypt = L2, h.privateDecrypt = Y2, h.privateEncrypt = function(s, o) {
19994
19994
  return h.publicEncrypt(s, o, !0);
19995
19995
  }, h.publicDecrypt = function(s, o) {
19996
19996
  return h.privateDecrypt(s, o, !0);
@@ -20018,8 +20018,8 @@ function Wo(h, n, s) {
20018
20018
  if (h + n > s || h > Ko)
20019
20019
  throw new RangeError("buffer too small");
20020
20020
  }
20021
- m0 && m0.getRandomValues || !ye.browser ? (Ni.randomFill = jm, Ni.randomFillSync = Qm) : (Ni.randomFill = gh, Ni.randomFillSync = gh);
20022
- function jm(h, n, s, o) {
20021
+ m0 && m0.getRandomValues || !ye.browser ? (Ni.randomFill = j2, Ni.randomFillSync = Q2) : (Ni.randomFill = gh, Ni.randomFillSync = gh);
20022
+ function j2(h, n, s, o) {
20023
20023
  if (!zo.isBuffer(h) && !(h instanceof Gt.Uint8Array))
20024
20024
  throw new TypeError('"buf" argument must be a Buffer or Uint8Array');
20025
20025
  if (typeof n == "function")
@@ -20052,7 +20052,7 @@ function Vo(h, n, s, o) {
20052
20052
  var g = bh(s);
20053
20053
  return g.copy(h, n), h;
20054
20054
  }
20055
- function Qm(h, n, s) {
20055
+ function Q2(h, n, s) {
20056
20056
  if (typeof n == "undefined" && (n = 0), !zo.isBuffer(h) && !(h instanceof Gt.Uint8Array))
20057
20057
  throw new TypeError('"buf" argument must be a Buffer or Uint8Array');
20058
20058
  return Zo(n, h.length), s === void 0 && (s = h.length - n), Wo(s, n, h.length), Vo(h, n, s);
@@ -20080,8 +20080,8 @@ function Yo() {
20080
20080
  Ut.Cipher = m.Cipher, Ut.createCipher = m.createCipher, Ut.Cipheriv = m.Cipheriv, Ut.createCipheriv = m.createCipheriv, Ut.Decipher = m.Decipher, Ut.createDecipher = m.createDecipher, Ut.Decipheriv = m.Decipheriv, Ut.createDecipheriv = m.createDecipheriv, Ut.getCiphers = m.getCiphers, Ut.listCiphers = m.listCiphers;
20081
20081
  var f = Q1();
20082
20082
  Ut.DiffieHellmanGroup = f.DiffieHellmanGroup, Ut.createDiffieHellmanGroup = f.createDiffieHellmanGroup, Ut.getDiffieHellman = f.getDiffieHellman, Ut.createDiffieHellman = f.createDiffieHellman, Ut.DiffieHellman = f.DiffieHellman;
20083
- var g = Im();
20084
- Ut.createSign = g.createSign, Ut.Sign = g.Sign, Ut.createVerify = g.createVerify, Ut.Verify = g.Verify, Ut.createECDH = Tm();
20083
+ var g = I2();
20084
+ Ut.createSign = g.createSign, Ut.Sign = g.Sign, Ut.createVerify = g.createVerify, Ut.Verify = g.Verify, Ut.createECDH = T2();
20085
20085
  var y = No;
20086
20086
  Ut.publicEncrypt = y.publicEncrypt, Ut.privateEncrypt = y.privateEncrypt, Ut.publicDecrypt = y.publicDecrypt, Ut.privateDecrypt = y.privateDecrypt;
20087
20087
  var S = Ni;
@@ -20399,9 +20399,13 @@ class gg {
20399
20399
  /**
20400
20400
  * Wait for the client to be ready.
20401
20401
  */
20402
- ready() {
20402
+ ready(n = 5e3) {
20403
20403
  return ke(this, null, function* () {
20404
- return console.log("[FlagClient] Waiting for client to be ready...", this.initializationOptions), this.deferInitialization && !this.isInitialized && this.initializationOptions && (console.log("[FlagClient] Deferred initialization triggered by ready() call", this.initializationOptions), yield this.initialize(this.initializationOptions)), this.readyPromise;
20404
+ if (console.log("[FlagClient] Waiting for client to be ready...", this.initializationOptions), this.deferInitialization && !this.isInitialized && this.initializationOptions && (console.log("[FlagClient] Deferred initialization triggered by ready() call", this.initializationOptions), yield this.initialize(this.initializationOptions)), yield this.readyPromise, Object.keys(this.flags).length > 0) {
20405
+ console.log("[FlagClient] Ready with cached flags");
20406
+ return;
20407
+ }
20408
+ yield this.waitForFlags(n);
20405
20409
  });
20406
20410
  }
20407
20411
  /**
@@ -20415,6 +20419,15 @@ class gg {
20415
20419
  }
20416
20420
  return o;
20417
20421
  }
20422
+ waitForFlags(n) {
20423
+ return new Promise((s) => {
20424
+ const o = setTimeout(() => {
20425
+ console.warn("[FlagClient] Flag fetch timeout after", n, "ms"), m(), s();
20426
+ }, n), m = this.subscribe((f) => {
20427
+ Object.keys(f).length > 0 && (clearTimeout(o), m(), console.log("[FlagClient] Flags received"), s());
20428
+ });
20429
+ });
20430
+ }
20418
20431
  }
20419
20432
  function iu(h) {
20420
20433
  return `flagmint_${h}_flags`;