@edifice.io/moderation-node-client 1.1.1 → 1.1.3

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.
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  var di = Object.defineProperty;
2
2
  var bi = (t, e, r) => e in t ? di(t, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : t[e] = r;
3
- var l = (t, e, r) => (bi(t, typeof e != "symbol" ? e + "" : e, r), r);
3
+ var d = (t, e, r) => (bi(t, typeof e != "symbol" ? e + "" : e, r), r);
4
4
  var Ee = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
5
5
  function yi(t) {
6
6
  if (t.__esModule)
@@ -14,8 +14,8 @@ function yi(t) {
14
14
  } else
15
15
  r = {};
16
16
  return Object.defineProperty(r, "__esModule", { value: !0 }), Object.keys(t).forEach(function(i) {
17
- var c = Object.getOwnPropertyDescriptor(t, i);
18
- Object.defineProperty(r, i, c.get ? c : {
17
+ var a = Object.getOwnPropertyDescriptor(t, i);
18
+ Object.defineProperty(r, i, a.get ? a : {
19
19
  enumerable: !0,
20
20
  get: function() {
21
21
  return t[i];
@@ -26,50 +26,50 @@ function yi(t) {
26
26
  var An = {}, Cn = {}, jt = {}, be = {}, Ue = {};
27
27
  (function(t) {
28
28
  Object.defineProperty(t, "__esModule", { value: !0 }), t.TD = t.TE = t.Empty = void 0, t.encode = r, t.decode = i, t.Empty = new Uint8Array(0), t.TE = new TextEncoder(), t.TD = new TextDecoder();
29
- function e(...c) {
29
+ function e(...a) {
30
30
  let u = 0;
31
- for (let P = 0; P < c.length; P++)
32
- u += c[P].length;
33
- const d = new Uint8Array(u);
31
+ for (let P = 0; P < a.length; P++)
32
+ u += a[P].length;
33
+ const l = new Uint8Array(u);
34
34
  let m = 0;
35
- for (let P = 0; P < c.length; P++)
36
- d.set(c[P], m), m += c[P].length;
37
- return d;
35
+ for (let P = 0; P < a.length; P++)
36
+ l.set(a[P], m), m += a[P].length;
37
+ return l;
38
38
  }
39
- function r(...c) {
39
+ function r(...a) {
40
40
  const u = [];
41
- for (let d = 0; d < c.length; d++)
42
- u.push(t.TE.encode(c[d]));
41
+ for (let l = 0; l < a.length; l++)
42
+ u.push(t.TE.encode(a[l]));
43
43
  return u.length === 0 ? t.Empty : u.length === 1 ? u[0] : e(...u);
44
44
  }
45
- function i(c) {
46
- return !c || c.length === 0 ? "" : t.TD.decode(c);
45
+ function i(a) {
46
+ return !a || a.length === 0 ? "" : t.TD.decode(a);
47
47
  }
48
48
  })(Ue);
49
49
  var re = {};
50
50
  Object.defineProperty(re, "__esModule", { value: !0 });
51
51
  re.errors = re.PermissionViolationError = re.NoRespondersError = re.TimeoutError = re.RequestError = re.ProtocolError = re.ConnectionError = re.DrainingConnectionError = re.ClosedConnectionError = re.AuthorizationError = re.UserAuthenticationExpiredError = re.InvalidOperationError = re.InvalidArgumentError = re.InvalidSubjectError = void 0;
52
- class In extends Error {
52
+ class Mn extends Error {
53
53
  constructor(e, r) {
54
54
  super(`illegal subject: '${e}'`, r), this.name = "InvalidSubjectError";
55
55
  }
56
56
  }
57
- re.InvalidSubjectError = In;
57
+ re.InvalidSubjectError = Mn;
58
58
  class tr extends Error {
59
59
  constructor(e, r) {
60
60
  super(e, r), this.name = "InvalidArgumentError";
61
61
  }
62
62
  static format(e, r, i) {
63
- return Array.isArray(r) && r.length > 1 && (r = r[0]), Array.isArray(e) ? (e = e.map((c) => `'${c}'`), e = e.join(",")) : e = `'${e}'`, new tr(`${e} ${r}`, i);
63
+ return Array.isArray(r) && r.length > 1 && (r = r[0]), Array.isArray(e) ? (e = e.map((a) => `'${a}'`), e = e.join(",")) : e = `'${e}'`, new tr(`${e} ${r}`, i);
64
64
  }
65
65
  }
66
66
  re.InvalidArgumentError = tr;
67
- class Mn extends Error {
67
+ class In extends Error {
68
68
  constructor(e, r) {
69
69
  super(e, r), this.name = "InvalidOperationError";
70
70
  }
71
71
  }
72
- re.InvalidOperationError = Mn;
72
+ re.InvalidOperationError = In;
73
73
  class rr extends Error {
74
74
  constructor(e, r) {
75
75
  super(e, r), this.name = "UserAuthenticationExpiredError";
@@ -89,8 +89,8 @@ class nr extends Error {
89
89
  "account authentication expired",
90
90
  "authentication timeout"
91
91
  ], i = e.toLowerCase();
92
- for (let c = 0; c < r.length; c++)
93
- if (i.indexOf(r[c]) !== -1)
92
+ for (let a = 0; a < r.length; a++)
93
+ if (i.indexOf(r[a]) !== -1)
94
94
  return new nr(e);
95
95
  return null;
96
96
  }
@@ -138,29 +138,29 @@ re.TimeoutError = Un;
138
138
  class kr extends Error {
139
139
  constructor(r, i) {
140
140
  super(`no responders: '${r}'`, i);
141
- l(this, "subject");
141
+ d(this, "subject");
142
142
  this.subject = r, this.name = "NoResponders";
143
143
  }
144
144
  }
145
145
  re.NoRespondersError = kr;
146
146
  class ir extends Error {
147
- constructor(r, i, c, u, d) {
148
- super(r, d);
149
- l(this, "operation");
150
- l(this, "subject");
151
- l(this, "queue");
152
- this.name = "PermissionViolationError", this.operation = i, this.subject = c, this.queue = u;
147
+ constructor(r, i, a, u, l) {
148
+ super(r, l);
149
+ d(this, "operation");
150
+ d(this, "subject");
151
+ d(this, "queue");
152
+ this.name = "PermissionViolationError", this.operation = i, this.subject = a, this.queue = u;
153
153
  }
154
154
  static parse(r) {
155
155
  if ((r ? r.toLowerCase() : "").indexOf("permissions violation") === -1)
156
156
  return null;
157
- let c = "publish", u = "", d;
157
+ let a = "publish", u = "", l;
158
158
  const m = r.match(/(Publish|Subscription) to "(\S+)"/);
159
- if (m && (c = m[1].toLowerCase(), u = m[2], c === "subscription")) {
159
+ if (m && (a = m[1].toLowerCase(), u = m[2], a === "subscription")) {
160
160
  const P = r.match(/using queue "(\S+)"/);
161
- P && (d = P[1]);
161
+ P && (l = P[1]);
162
162
  }
163
- return new ir(r, c, u, d);
163
+ return new ir(r, a, u, l);
164
164
  }
165
165
  }
166
166
  re.PermissionViolationError = ir;
@@ -170,8 +170,8 @@ re.errors = {
170
170
  ConnectionError: Nn,
171
171
  DrainingConnectionError: Tn,
172
172
  InvalidArgumentError: tr,
173
- InvalidOperationError: Mn,
174
- InvalidSubjectError: In,
173
+ InvalidOperationError: In,
174
+ InvalidSubjectError: Mn,
175
175
  NoRespondersError: kr,
176
176
  PermissionViolationError: ir,
177
177
  ProtocolError: Rn,
@@ -193,13 +193,13 @@ be.collect = Pi;
193
193
  be.jitter = Ln;
194
194
  be.backoff = Ai;
195
195
  be.nanos = Ci;
196
- be.millis = Ii;
196
+ be.millis = Mi;
197
197
  const _i = Ue, Cr = re;
198
198
  function gi(t, ...e) {
199
199
  for (let r = 0; r < e.length; r++) {
200
200
  const i = e[r];
201
- Object.keys(i).forEach(function(c) {
202
- t[c] = i[c];
201
+ Object.keys(i).forEach(function(a) {
202
+ t[a] = i[a];
203
203
  });
204
204
  }
205
205
  return t;
@@ -209,11 +209,11 @@ function mi(t) {
209
209
  }
210
210
  function vi(t, e = !0) {
211
211
  const r = e ? new Cr.TimeoutError() : null;
212
- let i, c;
213
- const u = new Promise((d, m) => {
212
+ let i, a;
213
+ const u = new Promise((l, m) => {
214
214
  i = { cancel: () => {
215
- c && clearTimeout(c);
216
- } }, c = setTimeout(() => {
215
+ a && clearTimeout(a);
216
+ } }, a = setTimeout(() => {
217
217
  m(r === null ? new Cr.TimeoutError() : r);
218
218
  }, t);
219
219
  });
@@ -222,11 +222,11 @@ function vi(t, e = !0) {
222
222
  function xi(t = 0) {
223
223
  let e;
224
224
  const r = new Promise((i) => {
225
- const c = setTimeout(() => {
225
+ const a = setTimeout(() => {
226
226
  i();
227
227
  }, t);
228
228
  e = { cancel: () => {
229
- c && (clearTimeout(c), i());
229
+ a && (clearTimeout(a), i());
230
230
  } };
231
231
  });
232
232
  return Object.assign(r, e);
@@ -252,11 +252,11 @@ function pi() {
252
252
  let t = {};
253
253
  const e = new Promise((r, i) => {
254
254
  t = {
255
- resolve: (c) => {
256
- console.trace("resolve", c), r(c);
255
+ resolve: (a) => {
256
+ console.trace("resolve", a), r(a);
257
257
  },
258
- reject: (c) => {
259
- console.trace("reject"), i(c);
258
+ reject: (a) => {
259
+ console.trace("reject"), i(a);
260
260
  }
261
261
  };
262
262
  });
@@ -277,21 +277,21 @@ async function Pi(t) {
277
277
  }
278
278
  class Si {
279
279
  constructor() {
280
- l(this, "timers");
281
- l(this, "measures");
280
+ d(this, "timers");
281
+ d(this, "measures");
282
282
  this.timers = /* @__PURE__ */ new Map(), this.measures = /* @__PURE__ */ new Map();
283
283
  }
284
284
  mark(e) {
285
285
  this.timers.set(e, performance.now());
286
286
  }
287
287
  measure(e, r, i) {
288
- const c = this.timers.get(r);
289
- if (c === void 0)
288
+ const a = this.timers.get(r);
289
+ if (a === void 0)
290
290
  throw new Error(`${r} is not defined`);
291
291
  const u = this.timers.get(i);
292
292
  if (u === void 0)
293
293
  throw new Error(`${i} is not defined`);
294
- this.measures.set(e, u - c);
294
+ this.measures.set(e, u - a);
295
295
  }
296
296
  getEntries() {
297
297
  const e = [];
@@ -306,9 +306,9 @@ class Oi {
306
306
  * @param max number of concurrent operations
307
307
  */
308
308
  constructor(e = 1) {
309
- l(this, "max");
310
- l(this, "current");
311
- l(this, "waiting");
309
+ d(this, "max");
310
+ d(this, "current");
311
+ d(this, "waiting");
312
312
  this.max = e, this.current = 0, this.waiting = [];
313
313
  }
314
314
  /**
@@ -345,13 +345,13 @@ function Ai(t = [0, 250, 250, 500, 500, 3e3, 5e3]) {
345
345
  function Ci(t) {
346
346
  return t * 1e6;
347
347
  }
348
- function Ii(t) {
348
+ function Mi(t) {
349
349
  return Math.floor(t / 1e6);
350
350
  }
351
- var je = {}, st = {}, Me = {}, Tt = {}, yt = {};
351
+ var je = {}, st = {}, Ie = {}, Tt = {}, yt = {};
352
352
  Object.defineProperty(yt, "__esModule", { value: !0 });
353
353
  yt.nuid = yt.Nuid = void 0;
354
- const nn = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ", Er = 36, Xt = 12, Mi = 10, sn = 3656158440062976, an = 33, ji = 333, on = Xt + Mi;
354
+ const nn = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ", Er = 36, Xt = 12, Ii = 10, sn = 3656158440062976, on = 33, ji = 333, an = Xt + Ii;
355
355
  function Ti(t) {
356
356
  for (let e = 0; e < t.length; e++)
357
357
  t[e] = Math.floor(Math.random() * 255);
@@ -365,20 +365,20 @@ class Fn {
365
365
  /**
366
366
  * @hidden
367
367
  */
368
- l(this, "buf");
368
+ d(this, "buf");
369
369
  /**
370
370
  * @hidden
371
371
  */
372
- l(this, "seq");
372
+ d(this, "seq");
373
373
  /**
374
374
  * @hidden
375
375
  */
376
- l(this, "inc");
376
+ d(this, "inc");
377
377
  /**
378
378
  * @hidden
379
379
  */
380
- l(this, "inited");
381
- this.buf = new Uint8Array(on), this.inited = !1;
380
+ d(this, "inited");
381
+ this.buf = new Uint8Array(an), this.inited = !1;
382
382
  }
383
383
  /**
384
384
  * Initializes a nuid with a crypto random prefix,
@@ -395,7 +395,7 @@ class Fn {
395
395
  * @ignore
396
396
  */
397
397
  initSeqAndInc() {
398
- this.seq = Math.floor(Math.random() * sn), this.inc = Math.floor(Math.random() * (ji - an) + an);
398
+ this.seq = Math.floor(Math.random() * sn), this.inc = Math.floor(Math.random() * (ji - on) + on);
399
399
  }
400
400
  /**
401
401
  * Sets the prefix from crypto random bytes. Converts them to base36.
@@ -416,7 +416,7 @@ class Fn {
416
416
  */
417
417
  fillSeq() {
418
418
  let e = this.seq;
419
- for (let r = on - 1; r >= Xt; r--)
419
+ for (let r = an - 1; r >= Xt; r--)
420
420
  this.buf[r] = nn.charCodeAt(e % Er), e = Math.floor(e / Er);
421
421
  }
422
422
  /**
@@ -445,12 +445,12 @@ yt.nuid = new Fn();
445
445
  return e.nuid;
446
446
  } });
447
447
  })(Tt);
448
- Object.defineProperty(Me, "__esModule", { value: !0 });
449
- Me.DEFAULT_HOST = Me.DEFAULT_PORT = Me.Match = void 0;
450
- Me.syncIterator = Ui;
451
- Me.createInbox = Li;
448
+ Object.defineProperty(Ie, "__esModule", { value: !0 });
449
+ Ie.DEFAULT_HOST = Ie.DEFAULT_PORT = Ie.Match = void 0;
450
+ Ie.syncIterator = Ui;
451
+ Ie.createInbox = Li;
452
452
  const Ri = Tt, ki = re;
453
- Me.Match = {
453
+ Ie.Match = {
454
454
  // Exact option is case-sensitive
455
455
  Exact: "exact",
456
456
  // Case-sensitive, but key is transformed to Canonical MIME representation
@@ -475,16 +475,16 @@ function Li(t = "") {
475
475
  throw ki.InvalidArgumentError.format("prefix", `cannot have wildcards ('${t}')`);
476
476
  }), `${t}.${Ri.nuid.next()}`;
477
477
  }
478
- Me.DEFAULT_PORT = 4222;
479
- Me.DEFAULT_HOST = "127.0.0.1";
480
- var at = {};
481
- Object.defineProperty(at, "__esModule", { value: !0 });
482
- at.DataBuffer = void 0;
478
+ Ie.DEFAULT_PORT = 4222;
479
+ Ie.DEFAULT_HOST = "127.0.0.1";
480
+ var ot = {};
481
+ Object.defineProperty(ot, "__esModule", { value: !0 });
482
+ ot.DataBuffer = void 0;
483
483
  const cn = Ue;
484
484
  class Fi {
485
485
  constructor() {
486
- l(this, "buffers");
487
- l(this, "byteLength");
486
+ d(this, "buffers");
487
+ d(this, "byteLength");
488
488
  this.buffers = [], this.byteLength = 0;
489
489
  }
490
490
  static concat(...e) {
@@ -492,9 +492,9 @@ class Fi {
492
492
  for (let u = 0; u < e.length; u++)
493
493
  r += e[u].length;
494
494
  const i = new Uint8Array(r);
495
- let c = 0;
495
+ let a = 0;
496
496
  for (let u = 0; u < e.length; u++)
497
- i.set(e[u], c), c += e[u].length;
497
+ i.set(e[u], a), a += e[u].length;
498
498
  return i;
499
499
  }
500
500
  static fromAscii(e) {
@@ -530,8 +530,8 @@ class Fi {
530
530
  if (r) {
531
531
  const i = this.byteLength;
532
532
  (e === void 0 || e > i) && (e = i);
533
- const c = r.subarray(0, e);
534
- return i > e && this.buffers.push(r.subarray(e)), this.byteLength = i - e, c;
533
+ const a = r.subarray(0, e);
534
+ return i > e && this.buffers.push(r.subarray(e)), this.byteLength = i - e, a;
535
535
  }
536
536
  }
537
537
  return new Uint8Array(0);
@@ -551,27 +551,27 @@ class Fi {
551
551
  return this.buffers.length;
552
552
  }
553
553
  }
554
- at.DataBuffer = Fi;
554
+ ot.DataBuffer = Fi;
555
555
  (function(t) {
556
- Object.defineProperty(t, "__esModule", { value: !0 }), t.LF = t.CR = t.CRLF = t.CR_LF_LEN = t.CR_LF = void 0, t.setTransportFactory = u, t.defaultPort = d, t.getUrlParseFn = m, t.newTransport = P, t.getResolveFn = g, t.protoLen = p, t.extractProtocolMessage = w;
557
- const e = Ue, r = Me, i = at;
558
- let c;
556
+ Object.defineProperty(t, "__esModule", { value: !0 }), t.LF = t.CR = t.CRLF = t.CR_LF_LEN = t.CR_LF = void 0, t.setTransportFactory = u, t.defaultPort = l, t.getUrlParseFn = m, t.newTransport = P, t.getResolveFn = g, t.protoLen = p, t.extractProtocolMessage = w;
557
+ const e = Ue, r = Ie, i = ot;
558
+ let a;
559
559
  function u(b) {
560
- c = b;
560
+ a = b;
561
561
  }
562
- function d() {
563
- return c !== void 0 && c.defaultPort !== void 0 ? c.defaultPort : r.DEFAULT_PORT;
562
+ function l() {
563
+ return a !== void 0 && a.defaultPort !== void 0 ? a.defaultPort : r.DEFAULT_PORT;
564
564
  }
565
565
  function m() {
566
- return c !== void 0 && c.urlParseFn ? c.urlParseFn : void 0;
566
+ return a !== void 0 && a.urlParseFn ? a.urlParseFn : void 0;
567
567
  }
568
568
  function P() {
569
- if (!c || typeof c.factory != "function")
569
+ if (!a || typeof a.factory != "function")
570
570
  throw new Error("transport fn is not set");
571
- return c.factory();
571
+ return a.factory();
572
572
  }
573
573
  function g() {
574
- return c !== void 0 && c.dnsResolveFn ? c.dnsResolveFn : void 0;
574
+ return a !== void 0 && a.dnsResolveFn ? a.dnsResolveFn : void 0;
575
575
  }
576
576
  t.CR_LF = `\r
577
577
  `, t.CR_LF_LEN = t.CR_LF.length, t.CRLF = i.DataBuffer.fromAscii(t.CR_LF), t.CR = new Uint8Array(t.CRLF)[0], t.LF = new Uint8Array(t.CRLF)[1];
@@ -597,12 +597,12 @@ Object.defineProperty(gt, "__esModule", { value: !0 });
597
597
  gt.ipV4 = Bn;
598
598
  gt.isIP = Di;
599
599
  gt.parseIP = Dn;
600
- const Mt = 4, nt = 16, Qt = 48, Kn = 57, fn = 65, Ki = 70, un = 97, Bi = 102, Ir = 16777215;
600
+ const It = 4, nt = 16, Qt = 48, Kn = 57, fn = 65, Ki = 70, un = 97, Bi = 102, Mr = 16777215;
601
601
  function Bn(t, e, r, i) {
602
- const c = new Uint8Array(nt);
603
- return [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255].forEach((d, m) => {
604
- c[m] = d;
605
- }), c[12] = t, c[13] = e, c[14] = r, c[15] = i, c;
602
+ const a = new Uint8Array(nt);
603
+ return [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255, 255].forEach((l, m) => {
604
+ a[m] = l;
605
+ }), a[12] = t, a[13] = e, a[14] = r, a[15] = i, a;
606
606
  }
607
607
  function Di(t) {
608
608
  return Dn(t) !== void 0;
@@ -617,8 +617,8 @@ function Dn(t) {
617
617
  }
618
618
  }
619
619
  function $n(t) {
620
- const e = new Uint8Array(Mt);
621
- for (let r = 0; r < Mt; r++) {
620
+ const e = new Uint8Array(It);
621
+ for (let r = 0; r < It; r++) {
622
622
  if (t.length === 0)
623
623
  return;
624
624
  if (r > 0) {
@@ -626,10 +626,10 @@ function $n(t) {
626
626
  return;
627
627
  t = t.substring(1);
628
628
  }
629
- const { n: i, c, ok: u } = qi(t);
629
+ const { n: i, c: a, ok: u } = qi(t);
630
630
  if (!u || i > 255)
631
631
  return;
632
- t = t.substring(c), e[r] = i;
632
+ t = t.substring(a), e[r] = i;
633
633
  }
634
634
  return Bn(e[0], e[1], e[2], e[3]);
635
635
  }
@@ -640,19 +640,19 @@ function $i(t) {
640
640
  return e;
641
641
  let i = 0;
642
642
  for (; i < nt; ) {
643
- const { n: c, c: u, ok: d } = zi(t);
644
- if (!d || c > 65535)
643
+ const { n: a, c: u, ok: l } = zi(t);
644
+ if (!l || a > 65535)
645
645
  return;
646
646
  if (u < t.length && t[u] === ".") {
647
- if (r < 0 && i != nt - Mt || i + Mt > nt)
647
+ if (r < 0 && i != nt - It || i + It > nt)
648
648
  return;
649
649
  const m = $n(t);
650
650
  if (m === void 0)
651
651
  return;
652
- e[i] = m[12], e[i + 1] = m[13], e[i + 2] = m[14], e[i + 3] = m[15], t = "", i += Mt;
652
+ e[i] = m[12], e[i + 1] = m[13], e[i + 2] = m[14], e[i + 3] = m[15], t = "", i += It;
653
653
  break;
654
654
  }
655
- if (e[i] = c >> 8, e[i + 1] = c, i += 2, t = t.substring(u), t.length === 0)
655
+ if (e[i] = a >> 8, e[i + 1] = a, i += 2, t = t.substring(u), t.length === 0)
656
656
  break;
657
657
  if (t[0] !== ":" || t.length == 1)
658
658
  return;
@@ -667,10 +667,10 @@ function $i(t) {
667
667
  if (i < nt) {
668
668
  if (r < 0)
669
669
  return;
670
- const c = nt - i;
670
+ const a = nt - i;
671
671
  for (let u = i - 1; u >= r; u--)
672
- e[u + c] = e[u];
673
- for (let u = r + c - 1; u >= r; u--)
672
+ e[u + a] = e[u];
673
+ for (let u = r + a - 1; u >= r; u--)
674
674
  e[u] = 0;
675
675
  } else if (r >= 0)
676
676
  return;
@@ -680,8 +680,8 @@ function $i(t) {
680
680
  function qi(t) {
681
681
  let e = 0, r = 0;
682
682
  for (e = 0; e < t.length && Qt <= t.charCodeAt(e) && t.charCodeAt(e) <= Kn; e++)
683
- if (r = r * 10 + (t.charCodeAt(e) - Qt), r >= Ir)
684
- return { n: Ir, c: e, ok: !1 };
683
+ if (r = r * 10 + (t.charCodeAt(e) - Qt), r >= Mr)
684
+ return { n: Mr, c: e, ok: !1 };
685
685
  return e === 0 ? { n: 0, c: 0, ok: !1 } : { n: r, c: e, ok: !0 };
686
686
  }
687
687
  function zi(t) {
@@ -695,7 +695,7 @@ function zi(t) {
695
695
  e *= 16, e += t.charCodeAt(r) - fn + 10;
696
696
  else
697
697
  break;
698
- if (e >= Ir)
698
+ if (e >= Mr)
699
699
  return { n: 0, c: r, ok: !1 };
700
700
  }
701
701
  return r === 0 ? { n: 0, c: r, ok: !1 } : { n: e, c: r, ok: !0 };
@@ -704,7 +704,7 @@ Object.defineProperty(We, "__esModule", { value: !0 });
704
704
  We.Servers = We.ServerImpl = void 0;
705
705
  We.isIPV4OrHostname = Gn;
706
706
  We.hostPort = Hn;
707
- const Yt = st, qn = be, Mr = gt, zn = Me;
707
+ const Yt = st, qn = be, Ir = gt, zn = Ie;
708
708
  function Gn(t) {
709
709
  return t.indexOf("[") !== -1 || t.indexOf("::") !== -1 ? !1 : t.indexOf(".") !== -1 || t.split(":").length <= 2;
710
710
  }
@@ -721,23 +721,23 @@ function Gi(t) {
721
721
  }
722
722
  function Hn(t) {
723
723
  t = t.trim(), t.match(/^(.*:\/\/)(.*)/m) && (t = t.replace(/^(.*:\/\/)(.*)/gm, "$2")), t = Gi(t), jr(t) && t.indexOf("[") === -1 && (t = `[${t}]`);
724
- const e = jr(t) ? t.match(/(]:)(\d+)/) : t.match(/(:)(\d+)/), r = e && e.length === 3 && e[1] && e[2] ? parseInt(e[2]) : zn.DEFAULT_PORT, i = r === 80 ? "https" : "http", c = new URL(`${i}://${t}`);
725
- c.port = `${r}`;
726
- let u = c.hostname;
727
- return u.charAt(0) === "[" && (u = u.substring(1, u.length - 1)), { listen: c.host, hostname: u, port: r };
724
+ const e = jr(t) ? t.match(/(]:)(\d+)/) : t.match(/(:)(\d+)/), r = e && e.length === 3 && e[1] && e[2] ? parseInt(e[2]) : zn.DEFAULT_PORT, i = r === 80 ? "https" : "http", a = new URL(`${i}://${t}`);
725
+ a.port = `${r}`;
726
+ let u = a.hostname;
727
+ return u.charAt(0) === "[" && (u = u.substring(1, u.length - 1)), { listen: a.host, hostname: u, port: r };
728
728
  }
729
729
  class dt {
730
730
  constructor(e, r = !1) {
731
- l(this, "src");
732
- l(this, "listen");
733
- l(this, "hostname");
734
- l(this, "port");
735
- l(this, "didConnect");
736
- l(this, "reconnects");
737
- l(this, "lastConnect");
738
- l(this, "gossiped");
739
- l(this, "tlsName");
740
- l(this, "resolves");
731
+ d(this, "src");
732
+ d(this, "listen");
733
+ d(this, "hostname");
734
+ d(this, "port");
735
+ d(this, "didConnect");
736
+ d(this, "reconnects");
737
+ d(this, "lastConnect");
738
+ d(this, "gossiped");
739
+ d(this, "tlsName");
740
+ d(this, "resolves");
741
741
  this.src = e, this.tlsName = "";
742
742
  const i = Hn(e);
743
743
  this.listen = i.listen, this.hostname = i.hostname, this.port = i.port, this.didConnect = !1, this.reconnects = 0, this.lastConnect = 0, this.gossiped = r;
@@ -749,15 +749,15 @@ class dt {
749
749
  if (!e.fn || e.resolve === !1)
750
750
  return [this];
751
751
  const r = [];
752
- if ((0, Mr.isIP)(this.hostname))
752
+ if ((0, Ir.isIP)(this.hostname))
753
753
  return [this];
754
754
  {
755
755
  const i = await e.fn(this.hostname);
756
756
  e.debug && console.log(`resolve ${this.hostname} = ${i.join(",")}`);
757
- for (const c of i) {
758
- const u = this.port === 80 ? "https" : "http", d = new URL(`${u}://${jr(c) ? "[" + c + "]" : c}`);
759
- d.port = `${this.port}`;
760
- const m = new dt(d.host, !1);
757
+ for (const a of i) {
758
+ const u = this.port === 80 ? "https" : "http", l = new URL(`${u}://${jr(a) ? "[" + a + "]" : a}`);
759
+ l.port = `${this.port}`;
760
+ const m = new dt(l.host, !1);
761
761
  m.tlsName = this.hostname, r.push(m);
762
762
  }
763
763
  }
@@ -767,15 +767,15 @@ class dt {
767
767
  We.ServerImpl = dt;
768
768
  class Hi {
769
769
  constructor(e = [], r = {}) {
770
- l(this, "firstSelect");
771
- l(this, "servers");
772
- l(this, "currentServer");
773
- l(this, "tlsName");
774
- l(this, "randomize");
770
+ d(this, "firstSelect");
771
+ d(this, "servers");
772
+ d(this, "currentServer");
773
+ d(this, "tlsName");
774
+ d(this, "randomize");
775
775
  this.firstSelect = !0, this.servers = [], this.tlsName = "", this.randomize = r.randomize || !1;
776
776
  const i = (0, Yt.getUrlParseFn)();
777
- e && (e.forEach((c) => {
778
- c = i ? i(c) : c, this.servers.push(new dt(c));
777
+ e && (e.forEach((a) => {
778
+ a = i ? i(a) : a, this.servers.push(new dt(a));
779
779
  }), this.randomize && (this.servers = (0, qn.shuffle)(this.servers))), this.servers.length === 0 && this.addServer(`${zn.DEFAULT_HOST}:${(0, Yt.defaultPort)()}`, !1), this.currentServer = this.servers[0];
780
780
  }
781
781
  clear() {
@@ -783,7 +783,7 @@ class Hi {
783
783
  }
784
784
  updateTLSName() {
785
785
  const e = this.getCurrentServer();
786
- (0, Mr.isIP)(e.hostname) || (this.tlsName = e.hostname, this.servers.forEach((r) => {
786
+ (0, Ir.isIP)(e.hostname) || (this.tlsName = e.hostname, this.servers.forEach((r) => {
787
787
  r.gossiped && (r.tlsName = this.tlsName);
788
788
  }));
789
789
  }
@@ -793,8 +793,8 @@ class Hi {
793
793
  addServer(e, r = !1) {
794
794
  const i = (0, Yt.getUrlParseFn)();
795
795
  e = i ? i(e) : e;
796
- const c = new dt(e, r);
797
- (0, Mr.isIP)(c.hostname) && (c.tlsName = this.tlsName), this.servers.push(c);
796
+ const a = new dt(e, r);
797
+ (0, Ir.isIP)(a.hostname) && (a.tlsName = this.tlsName), this.servers.push(a);
798
798
  }
799
799
  selectServer() {
800
800
  if (this.firstSelect)
@@ -822,23 +822,23 @@ class Hi {
822
822
  }
823
823
  update(e, r) {
824
824
  const i = [];
825
- let c = [];
826
- const u = (0, Yt.getUrlParseFn)(), d = /* @__PURE__ */ new Map();
825
+ let a = [];
826
+ const u = (0, Yt.getUrlParseFn)(), l = /* @__PURE__ */ new Map();
827
827
  e.connect_urls && e.connect_urls.length > 0 && e.connect_urls.forEach((P) => {
828
828
  P = u ? u(P, r) : P;
829
829
  const g = new dt(P, !0);
830
- d.set(P, g);
830
+ l.set(P, g);
831
831
  });
832
832
  const m = [];
833
833
  return this.servers.forEach((P, g) => {
834
834
  const p = P.listen;
835
- P.gossiped && this.currentServer.listen !== p && d.get(p) === void 0 && m.push(g), d.delete(p);
835
+ P.gossiped && this.currentServer.listen !== p && l.get(p) === void 0 && m.push(g), l.delete(p);
836
836
  }), m.reverse(), m.forEach((P) => {
837
837
  const g = this.servers.splice(P, 1);
838
- c = c.concat(g[0].listen);
839
- }), d.forEach((P, g) => {
838
+ a = a.concat(g[0].listen);
839
+ }), l.forEach((P, g) => {
840
840
  this.servers.push(P), i.push(g);
841
- }), { added: i, deleted: c };
841
+ }), { added: i, deleted: a };
842
842
  }
843
843
  }
844
844
  We.Servers = Hi;
@@ -848,25 +848,25 @@ mt.QueuedIteratorImpl = void 0;
848
848
  const pr = be, hn = re;
849
849
  class Vi {
850
850
  constructor() {
851
- l(this, "inflight");
852
- l(this, "processed");
851
+ d(this, "inflight");
852
+ d(this, "processed");
853
853
  // this is updated by the protocol
854
- l(this, "received");
855
- l(this, "noIterator");
856
- l(this, "iterClosed");
857
- l(this, "done");
858
- l(this, "signal");
859
- l(this, "yields");
860
- l(this, "filtered");
861
- l(this, "pendingFiltered");
862
- l(this, "ctx");
863
- l(this, "_data");
854
+ d(this, "received");
855
+ d(this, "noIterator");
856
+ d(this, "iterClosed");
857
+ d(this, "done");
858
+ d(this, "signal");
859
+ d(this, "yields");
860
+ d(this, "filtered");
861
+ d(this, "pendingFiltered");
862
+ d(this, "ctx");
863
+ d(this, "_data");
864
864
  //data is for use by extenders in any way they like
865
- l(this, "err");
866
- l(this, "time");
867
- l(this, "profile");
868
- l(this, "yielding");
869
- l(this, "didBreak");
865
+ d(this, "err");
866
+ d(this, "time");
867
+ d(this, "profile");
868
+ d(this, "yielding");
869
+ d(this, "didBreak");
870
870
  this.inflight = 0, this.filtered = 0, this.pendingFiltered = 0, this.processed = 0, this.received = 0, this.noIterator = !1, this.done = !1, this.signal = (0, pr.deferred)(), this.yields = [], this.iterClosed = (0, pr.deferred)(), this.time = 0, this.yielding = !1, this.didBreak = !1, this.profile = !1;
871
871
  }
872
872
  [Symbol.asyncIterator]() {
@@ -902,9 +902,9 @@ class Vi {
902
902
  for (let r = 0; r < e.length; r++) {
903
903
  if (typeof e[r] == "function") {
904
904
  this.pendingFiltered--;
905
- const c = e[r];
905
+ const a = e[r];
906
906
  try {
907
- c();
907
+ a();
908
908
  } catch (u) {
909
909
  throw u;
910
910
  }
@@ -941,11 +941,11 @@ mt.QueuedIteratorImpl = Vi;
941
941
  var Nt = {};
942
942
  Object.defineProperty(Nt, "__esModule", { value: !0 });
943
943
  Nt.MuxSubscription = void 0;
944
- const Ji = Me, ln = re;
944
+ const Ji = Ie, ln = re;
945
945
  class Yi {
946
946
  constructor() {
947
- l(this, "baseInbox");
948
- l(this, "reqs");
947
+ d(this, "baseInbox");
948
+ d(this, "reqs");
949
949
  this.reqs = /* @__PURE__ */ new Map();
950
950
  }
951
951
  size() {
@@ -976,7 +976,7 @@ class Yi {
976
976
  i.resolver(r, {});
977
977
  }), !0;
978
978
  if (r.operation === "publish") {
979
- const i = this.all().find((c) => c.requestSubject === r.subject);
979
+ const i = this.all().find((a) => a.requestSubject === r.subject);
980
980
  if (i)
981
981
  return i.resolver(r, {}), !0;
982
982
  }
@@ -984,11 +984,11 @@ class Yi {
984
984
  }
985
985
  dispatcher() {
986
986
  return (e, r) => {
987
- var c, u;
987
+ var a, u;
988
988
  const i = this.getToken(r);
989
989
  if (i) {
990
- const d = this.get(i);
991
- d && (e === null && (e = ((c = r == null ? void 0 : r.data) == null ? void 0 : c.length) === 0 && ((u = r.headers) == null ? void 0 : u.code) === 503 ? new ln.NoRespondersError(d.requestSubject) : null), d.resolver(e, r));
990
+ const l = this.get(i);
991
+ l && (e === null && (e = ((a = r == null ? void 0 : r.data) == null ? void 0 : a.length) === 0 && ((u = r.headers) == null ? void 0 : u.code) === 503 ? new ln.NoRespondersError(l.requestSubject) : null), l.resolver(e, r));
992
992
  }
993
993
  };
994
994
  }
@@ -1006,11 +1006,11 @@ Rt.Heartbeat = void 0;
1006
1006
  const Wi = be;
1007
1007
  class Xi {
1008
1008
  constructor(e, r, i) {
1009
- l(this, "ph");
1010
- l(this, "interval");
1011
- l(this, "maxOut");
1012
- l(this, "timer");
1013
- l(this, "pendings");
1009
+ d(this, "ph");
1010
+ d(this, "interval");
1011
+ d(this, "maxOut");
1012
+ d(this, "timer");
1013
+ d(this, "pendings");
1014
1014
  this.ph = e, this.interval = r, this.maxOut = i, this.pendings = [];
1015
1015
  }
1016
1016
  // api to start the heartbeats, since this can be
@@ -1045,7 +1045,7 @@ class Xi {
1045
1045
  Rt.Heartbeat = Xi;
1046
1046
  var Lr = {}, Fr = {};
1047
1047
  (function(t) {
1048
- Object.defineProperty(t, "__esModule", { value: !0 }), t.DenoBuffer = t.MAX_SIZE = t.AssertionError = void 0, t.assert = i, t.concat = d, t.append = m, t.readAll = g, t.writeAll = p;
1048
+ Object.defineProperty(t, "__esModule", { value: !0 }), t.DenoBuffer = t.MAX_SIZE = t.AssertionError = void 0, t.assert = i, t.concat = l, t.append = m, t.readAll = g, t.writeAll = p;
1049
1049
  const e = Ue;
1050
1050
  class r extends Error {
1051
1051
  constructor(b) {
@@ -1057,13 +1057,13 @@ var Lr = {}, Fr = {};
1057
1057
  if (!w)
1058
1058
  throw new r(b);
1059
1059
  }
1060
- const c = 32 * 1024;
1060
+ const a = 32 * 1024;
1061
1061
  t.MAX_SIZE = 2 ** 32 - 2;
1062
1062
  function u(w, b, x = 0) {
1063
1063
  const R = b.byteLength - x;
1064
1064
  return w.byteLength > R && (w = w.subarray(0, R)), b.set(w, x), w.byteLength;
1065
1065
  }
1066
- function d(w, b) {
1066
+ function l(w, b) {
1067
1067
  if (w === void 0 && b === void 0)
1068
1068
  return new Uint8Array(0);
1069
1069
  if (w === void 0)
@@ -1074,14 +1074,14 @@ var Lr = {}, Fr = {};
1074
1074
  return x.set(w, 0), x.set(b, w.length), x;
1075
1075
  }
1076
1076
  function m(w, b) {
1077
- return d(w, Uint8Array.of(b));
1077
+ return l(w, Uint8Array.of(b));
1078
1078
  }
1079
1079
  class P {
1080
1080
  // read at _buf[off], write at _buf[_buf.byteLength]
1081
1081
  constructor(b) {
1082
- l(this, "_buf");
1082
+ d(this, "_buf");
1083
1083
  // contents are the bytes _buf[off : len(_buf)]
1084
- l(this, "_off");
1084
+ d(this, "_off");
1085
1085
  if (this._off = 0, b == null) {
1086
1086
  this._buf = new Uint8Array(0);
1087
1087
  return;
@@ -1166,9 +1166,9 @@ var Lr = {}, Fr = {};
1166
1166
  }
1167
1167
  readFrom(b) {
1168
1168
  let x = 0;
1169
- const R = new Uint8Array(c);
1169
+ const R = new Uint8Array(a);
1170
1170
  for (; ; ) {
1171
- const j = this.capacity - this.length < c, U = j ? R : new Uint8Array(this._buf.buffer, this.length), ie = b.read(U);
1171
+ const j = this.capacity - this.length < a, U = j ? R : new Uint8Array(this._buf.buffer, this.length), ie = b.read(U);
1172
1172
  if (ie === null)
1173
1173
  return x;
1174
1174
  j ? this.write(U.subarray(0, ie)) : this._reslice(this.length + ie), x += ie;
@@ -1220,21 +1220,21 @@ var Lr = {}, Fr = {};
1220
1220
  }
1221
1221
  return `${g}: ${p}`;
1222
1222
  }
1223
- function c() {
1223
+ function a() {
1224
1224
  const P = {};
1225
1225
  return P.sid = -1, P.hdr = -1, P.size = -1, P;
1226
1226
  }
1227
- const u = 48, d = 57;
1227
+ const u = 48, l = 57;
1228
1228
  class m {
1229
1229
  constructor(g) {
1230
- l(this, "dispatcher");
1231
- l(this, "state");
1232
- l(this, "as");
1233
- l(this, "drop");
1234
- l(this, "hdr");
1235
- l(this, "ma");
1236
- l(this, "argBuf");
1237
- l(this, "msgBuf");
1230
+ d(this, "dispatcher");
1231
+ d(this, "state");
1232
+ d(this, "as");
1233
+ d(this, "drop");
1234
+ d(this, "hdr");
1235
+ d(this, "ma");
1236
+ d(this, "argBuf");
1237
+ d(this, "msgBuf");
1238
1238
  this.dispatcher = g, this.state = t.State.OP_START, this.as = 0, this.drop = 0, this.hdr = 0;
1239
1239
  }
1240
1240
  parse(g) {
@@ -1246,11 +1246,11 @@ var Lr = {}, Fr = {};
1246
1246
  switch (w) {
1247
1247
  case t.cc.M:
1248
1248
  case t.cc.m:
1249
- this.state = t.State.OP_M, this.hdr = -1, this.ma = c();
1249
+ this.state = t.State.OP_M, this.hdr = -1, this.ma = a();
1250
1250
  break;
1251
1251
  case t.cc.H:
1252
1252
  case t.cc.h:
1253
- this.state = t.State.OP_H, this.hdr = 0, this.ma = c();
1253
+ this.state = t.State.OP_H, this.hdr = 0, this.ma = a();
1254
1254
  break;
1255
1255
  case t.cc.P:
1256
1256
  case t.cc.p:
@@ -1656,7 +1656,7 @@ var Lr = {}, Fr = {};
1656
1656
  return -1;
1657
1657
  let p = 0;
1658
1658
  for (let w = 0; w < g.length; w++) {
1659
- if (g[w] < u || g[w] > d)
1659
+ if (g[w] < u || g[w] > l)
1660
1660
  return -1;
1661
1661
  p = p * 10 + (g[w] - u);
1662
1662
  }
@@ -1733,7 +1733,7 @@ Object.defineProperty(Qe, "__esModule", { value: !0 });
1733
1733
  Qe.MsgHdrsImpl = void 0;
1734
1734
  Qe.canonicalMIMEHeaderKey = Tr;
1735
1735
  Qe.headers = Zi;
1736
- const dn = Ue, De = Me, Kr = re;
1736
+ const dn = Ue, De = Ie, Kr = re;
1737
1737
  function Tr(t) {
1738
1738
  let p = !0;
1739
1739
  const w = new Array(t.length);
@@ -1753,9 +1753,9 @@ function Zi(t = 0, e = "") {
1753
1753
  const wr = "NATS/1.0";
1754
1754
  class bt {
1755
1755
  constructor(e = 0, r = "") {
1756
- l(this, "_code");
1757
- l(this, "headers");
1758
- l(this, "_description");
1756
+ d(this, "_code");
1757
+ d(this, "headers");
1758
+ d(this, "_description");
1759
1759
  this._code = e, this._description = r, this.headers = /* @__PURE__ */ new Map();
1760
1760
  }
1761
1761
  [Symbol.iterator]() {
@@ -1767,12 +1767,12 @@ class bt {
1767
1767
  equals(e) {
1768
1768
  if (e && this.headers.size === e.headers.size && this._code === e._code) {
1769
1769
  for (const [r, i] of this.headers) {
1770
- const c = e.values(r);
1771
- if (i.length !== c.length)
1770
+ const a = e.values(r);
1771
+ if (i.length !== a.length)
1772
1772
  return !1;
1773
- const u = [...i].sort(), d = [...c].sort();
1773
+ const u = [...i].sort(), l = [...a].sort();
1774
1774
  for (let m = 0; m < u.length; m++)
1775
- if (u[m] !== d[m])
1775
+ if (u[m] !== l[m])
1776
1776
  return !1;
1777
1777
  }
1778
1778
  return !0;
@@ -1780,21 +1780,21 @@ class bt {
1780
1780
  return !1;
1781
1781
  }
1782
1782
  static decode(e) {
1783
- const r = new bt(), c = dn.TD.decode(e).split(`\r
1784
- `), u = c[0];
1783
+ const r = new bt(), a = dn.TD.decode(e).split(`\r
1784
+ `), u = a[0];
1785
1785
  if (u !== wr) {
1786
- let d = u.replace(wr, "").trim();
1787
- if (d.length > 0) {
1788
- r._code = parseInt(d, 10), isNaN(r._code) && (r._code = 0);
1786
+ let l = u.replace(wr, "").trim();
1787
+ if (l.length > 0) {
1788
+ r._code = parseInt(l, 10), isNaN(r._code) && (r._code = 0);
1789
1789
  const m = r._code.toString();
1790
- d = d.replace(m, ""), r._description = d.trim();
1790
+ l = l.replace(m, ""), r._description = l.trim();
1791
1791
  }
1792
1792
  }
1793
- return c.length >= 1 && c.slice(1).map((d) => {
1794
- if (d) {
1795
- const m = d.indexOf(":");
1793
+ return a.length >= 1 && a.slice(1).map((l) => {
1794
+ if (l) {
1795
+ const m = l.indexOf(":");
1796
1796
  if (m > -1) {
1797
- const P = d.slice(0, m), g = d.slice(m + 1).trim();
1797
+ const P = l.slice(0, m), g = l.slice(m + 1).trim();
1798
1798
  r.append(P, g);
1799
1799
  }
1800
1800
  }
@@ -1806,9 +1806,9 @@ class bt {
1806
1806
  let e = wr;
1807
1807
  this._code > 0 && this._description !== "" && (e += ` ${this._code} ${this._description}`);
1808
1808
  for (const [r, i] of this.headers)
1809
- for (let c = 0; c < i.length; c++)
1809
+ for (let a = 0; a < i.length; a++)
1810
1810
  e = `${e}\r
1811
- ${r}: ${i[c]}`;
1811
+ ${r}: ${i[a]}`;
1812
1812
  return `${e}\r
1813
1813
  \r
1814
1814
  `;
@@ -1831,30 +1831,30 @@ ${r}: ${i[c]}`;
1831
1831
  const i = this.keys();
1832
1832
  switch (r) {
1833
1833
  case De.Match.Exact:
1834
- return i.filter((c) => c === e);
1834
+ return i.filter((a) => a === e);
1835
1835
  case De.Match.CanonicalMIME:
1836
- return e = Tr(e), i.filter((c) => c === e);
1836
+ return e = Tr(e), i.filter((a) => a === e);
1837
1837
  default: {
1838
- const c = e.toLowerCase();
1839
- return i.filter((u) => c === u.toLowerCase());
1838
+ const a = e.toLowerCase();
1839
+ return i.filter((u) => a === u.toLowerCase());
1840
1840
  }
1841
1841
  }
1842
1842
  }
1843
1843
  get(e, r = De.Match.Exact) {
1844
1844
  const i = this.findKeys(e, r);
1845
1845
  if (i.length) {
1846
- const c = this.headers.get(i[0]);
1847
- if (c)
1848
- return Array.isArray(c) ? c[0] : c;
1846
+ const a = this.headers.get(i[0]);
1847
+ if (a)
1848
+ return Array.isArray(a) ? a[0] : a;
1849
1849
  }
1850
1850
  return "";
1851
1851
  }
1852
1852
  last(e, r = De.Match.Exact) {
1853
1853
  const i = this.findKeys(e, r);
1854
1854
  if (i.length) {
1855
- const c = this.headers.get(i[0]);
1856
- if (c)
1857
- return Array.isArray(c) ? c[c.length - 1] : c;
1855
+ const a = this.headers.get(i[0]);
1856
+ if (a)
1857
+ return Array.isArray(a) ? a[a.length - 1] : a;
1858
1858
  }
1859
1859
  return "";
1860
1860
  }
@@ -1865,24 +1865,24 @@ ${r}: ${i[c]}`;
1865
1865
  this.delete(e, i), this.append(e, r, i);
1866
1866
  }
1867
1867
  append(e, r, i = De.Match.Exact) {
1868
- const c = Tr(e);
1869
- i === De.Match.CanonicalMIME && (e = c);
1868
+ const a = Tr(e);
1869
+ i === De.Match.CanonicalMIME && (e = a);
1870
1870
  const u = this.findKeys(e, i);
1871
1871
  e = u.length > 0 ? u[0] : e;
1872
- const d = bt.validHeaderValue(r);
1872
+ const l = bt.validHeaderValue(r);
1873
1873
  let m = this.headers.get(e);
1874
- m || (m = [], this.headers.set(e, m)), m.push(d);
1874
+ m || (m = [], this.headers.set(e, m)), m.push(l);
1875
1875
  }
1876
1876
  values(e, r = De.Match.Exact) {
1877
1877
  const i = [];
1878
1878
  return this.findKeys(e, r).forEach((u) => {
1879
- const d = this.headers.get(u);
1880
- d && i.push(...d);
1879
+ const l = this.headers.get(u);
1880
+ l && i.push(...l);
1881
1881
  }), i;
1882
1882
  }
1883
1883
  delete(e, r = De.Match.Exact) {
1884
- this.findKeys(e, r).forEach((c) => {
1885
- this.headers.delete(c);
1884
+ this.findKeys(e, r).forEach((a) => {
1885
+ this.headers.delete(a);
1886
1886
  });
1887
1887
  }
1888
1888
  get hasError() {
@@ -1916,12 +1916,12 @@ kt.MsgImpl = void 0;
1916
1916
  const Qi = Qe, Wt = Ue;
1917
1917
  class es {
1918
1918
  constructor(e, r, i) {
1919
- l(this, "_headers");
1920
- l(this, "_msg");
1921
- l(this, "_rdata");
1922
- l(this, "_reply");
1923
- l(this, "_subject");
1924
- l(this, "publisher");
1919
+ d(this, "_headers");
1920
+ d(this, "_msg");
1921
+ d(this, "_rdata");
1922
+ d(this, "_reply");
1923
+ d(this, "_subject");
1924
+ d(this, "publisher");
1925
1925
  this._msg = e, this._rdata = r, this.publisher = i;
1926
1926
  }
1927
1927
  get subject() {
@@ -1948,8 +1948,8 @@ class es {
1948
1948
  return this.reply ? (this.publisher.publish(this.reply, e, r), !0) : !1;
1949
1949
  }
1950
1950
  size() {
1951
- var c;
1952
- const e = this._msg.subject.length, r = ((c = this._msg.reply) == null ? void 0 : c.length) || 0, i = this._msg.size === -1 ? 0 : this._msg.size;
1951
+ var a;
1952
+ const e = this._msg.subject.length, r = ((a = this._msg.reply) == null ? void 0 : a.length) || 0, i = this._msg.size === -1 ? 0 : this._msg.size;
1953
1953
  return e + r + i;
1954
1954
  }
1955
1955
  json(e) {
@@ -1961,8 +1961,8 @@ class es {
1961
1961
  requestInfo() {
1962
1962
  var r;
1963
1963
  const e = (r = this.headers) == null ? void 0 : r.get("Nats-Request-Info");
1964
- return e ? JSON.parse(e, function(i, c) {
1965
- return (i === "start" || i === "stop") && c !== "" ? new Date(Date.parse(c)) : c;
1964
+ return e ? JSON.parse(e, function(i, a) {
1965
+ return (i === "start" || i === "stop") && a !== "" ? new Date(Date.parse(a)) : a;
1966
1966
  }) : null;
1967
1967
  }
1968
1968
  }
@@ -1970,18 +1970,18 @@ kt.MsgImpl = es;
1970
1970
  var sr = {};
1971
1971
  (function(t) {
1972
1972
  Object.defineProperty(t, "__esModule", { value: !0 }), t.Features = t.Feature = void 0, t.parseSemVer = e, t.compare = r;
1973
- function e(c = "") {
1974
- const u = c.match(/(\d+).(\d+).(\d+)/);
1973
+ function e(a = "") {
1974
+ const u = a.match(/(\d+).(\d+).(\d+)/);
1975
1975
  if (u)
1976
1976
  return {
1977
1977
  major: parseInt(u[1]),
1978
1978
  minor: parseInt(u[2]),
1979
1979
  micro: parseInt(u[3])
1980
1980
  };
1981
- throw new Error(`'${c}' is not a semver value`);
1981
+ throw new Error(`'${a}' is not a semver value`);
1982
1982
  }
1983
- function r(c, u) {
1984
- return c.major < u.major ? -1 : c.major > u.major ? 1 : c.minor < u.minor ? -1 : c.minor > u.minor ? 1 : c.micro < u.micro ? -1 : c.micro > u.micro ? 1 : 0;
1983
+ function r(a, u) {
1984
+ return a.major < u.major ? -1 : a.major > u.major ? 1 : a.minor < u.minor ? -1 : a.minor > u.minor ? 1 : a.micro < u.micro ? -1 : a.micro > u.micro ? 1 : 0;
1985
1985
  }
1986
1986
  t.Feature = {
1987
1987
  JS_KV: "js_kv",
@@ -2003,9 +2003,9 @@ var sr = {};
2003
2003
  };
2004
2004
  class i {
2005
2005
  constructor(u) {
2006
- l(this, "server");
2007
- l(this, "features");
2008
- l(this, "disabled");
2006
+ d(this, "server");
2007
+ d(this, "features");
2008
+ d(this, "disabled");
2009
2009
  this.features = /* @__PURE__ */ new Map(), this.disabled = [], this.update(u);
2010
2010
  }
2011
2011
  /**
@@ -2025,8 +2025,8 @@ var sr = {};
2025
2025
  return this.disabled.indexOf(u) !== -1;
2026
2026
  }
2027
2027
  update(u) {
2028
- typeof u == "string" && (u = e(u)), this.server = u, this.set(t.Feature.JS_KV, "2.6.2"), this.set(t.Feature.JS_OBJECTSTORE, "2.6.3"), this.set(t.Feature.JS_PULL_MAX_BYTES, "2.8.3"), this.set(t.Feature.JS_NEW_CONSUMER_CREATE_API, "2.9.0"), this.set(t.Feature.JS_ALLOW_DIRECT, "2.9.0"), this.set(t.Feature.JS_MULTIPLE_CONSUMER_FILTER, "2.10.0"), this.set(t.Feature.JS_SIMPLIFICATION, "2.9.4"), this.set(t.Feature.JS_STREAM_CONSUMER_METADATA, "2.10.0"), this.set(t.Feature.JS_CONSUMER_FILTER_SUBJECTS, "2.10.0"), this.set(t.Feature.JS_STREAM_FIRST_SEQ, "2.10.0"), this.set(t.Feature.JS_STREAM_SUBJECT_TRANSFORM, "2.10.0"), this.set(t.Feature.JS_STREAM_SOURCE_SUBJECT_TRANSFORM, "2.10.0"), this.set(t.Feature.JS_STREAM_COMPRESSION, "2.10.0"), this.set(t.Feature.JS_DEFAULT_CONSUMER_LIMITS, "2.10.0"), this.set(t.Feature.JS_BATCH_DIRECT_GET, "2.11.0"), this.set(t.Feature.JS_PRIORITY_GROUPS, "2.11.0"), this.disabled.forEach((d) => {
2029
- this.features.delete(d);
2028
+ typeof u == "string" && (u = e(u)), this.server = u, this.set(t.Feature.JS_KV, "2.6.2"), this.set(t.Feature.JS_OBJECTSTORE, "2.6.3"), this.set(t.Feature.JS_PULL_MAX_BYTES, "2.8.3"), this.set(t.Feature.JS_NEW_CONSUMER_CREATE_API, "2.9.0"), this.set(t.Feature.JS_ALLOW_DIRECT, "2.9.0"), this.set(t.Feature.JS_MULTIPLE_CONSUMER_FILTER, "2.10.0"), this.set(t.Feature.JS_SIMPLIFICATION, "2.9.4"), this.set(t.Feature.JS_STREAM_CONSUMER_METADATA, "2.10.0"), this.set(t.Feature.JS_CONSUMER_FILTER_SUBJECTS, "2.10.0"), this.set(t.Feature.JS_STREAM_FIRST_SEQ, "2.10.0"), this.set(t.Feature.JS_STREAM_SUBJECT_TRANSFORM, "2.10.0"), this.set(t.Feature.JS_STREAM_SOURCE_SUBJECT_TRANSFORM, "2.10.0"), this.set(t.Feature.JS_STREAM_COMPRESSION, "2.10.0"), this.set(t.Feature.JS_DEFAULT_CONSUMER_LIMITS, "2.10.0"), this.set(t.Feature.JS_BATCH_DIRECT_GET, "2.11.0"), this.set(t.Feature.JS_PRIORITY_GROUPS, "2.11.0"), this.disabled.forEach((l) => {
2029
+ this.features.delete(l);
2030
2030
  });
2031
2031
  }
2032
2032
  /**
@@ -2034,10 +2034,10 @@ var sr = {};
2034
2034
  * @param f
2035
2035
  * @param requires
2036
2036
  */
2037
- set(u, d) {
2037
+ set(u, l) {
2038
2038
  this.features.set(u, {
2039
- min: d,
2040
- ok: r(this.server, e(d)) >= 0
2039
+ min: l,
2040
+ ok: r(this.server, e(l)) >= 0
2041
2041
  });
2042
2042
  }
2043
2043
  /**
@@ -2053,8 +2053,8 @@ var sr = {};
2053
2053
  * @param f
2054
2054
  */
2055
2055
  supports(u) {
2056
- var d;
2057
- return ((d = this.get(u)) == null ? void 0 : d.ok) || !1;
2056
+ var l;
2057
+ return ((l = this.get(u)) == null ? void 0 : l.ok) || !1;
2058
2058
  }
2059
2059
  /**
2060
2060
  * Returns true if the server is at least the specified version
@@ -2332,8 +2332,8 @@ class Br {
2332
2332
  static checksum(e) {
2333
2333
  let r = 0;
2334
2334
  for (let i = 0; i < e.byteLength; i++) {
2335
- const c = e[i];
2336
- r = r << 8 & 65535 ^ ts[(r >> 8 ^ c) & 255];
2335
+ const a = e[i];
2336
+ r = r << 8 & 65535 ^ ts[(r >> 8 ^ a) & 255];
2337
2337
  }
2338
2338
  return r;
2339
2339
  }
@@ -2350,79 +2350,79 @@ const Pr = "ABCDEFGHIJKLMNOPQRSTUVWXYZ234567";
2350
2350
  class rs {
2351
2351
  static encode(e) {
2352
2352
  let r = 0, i = 0;
2353
- const c = new Uint8Array(e), u = new Uint8Array(e.byteLength * 2);
2354
- let d = 0;
2355
- for (let m = 0; m < c.byteLength; m++)
2356
- for (i = i << 8 | c[m], r += 8; r >= 5; ) {
2353
+ const a = new Uint8Array(e), u = new Uint8Array(e.byteLength * 2);
2354
+ let l = 0;
2355
+ for (let m = 0; m < a.byteLength; m++)
2356
+ for (i = i << 8 | a[m], r += 8; r >= 5; ) {
2357
2357
  const P = i >>> r - 5 & 31;
2358
- u[d++] = Pr.charAt(P).charCodeAt(0), r -= 5;
2358
+ u[l++] = Pr.charAt(P).charCodeAt(0), r -= 5;
2359
2359
  }
2360
2360
  if (r > 0) {
2361
2361
  const m = i << 5 - r & 31;
2362
- u[d++] = Pr.charAt(m).charCodeAt(0);
2362
+ u[l++] = Pr.charAt(m).charCodeAt(0);
2363
2363
  }
2364
- return u.slice(0, d);
2364
+ return u.slice(0, l);
2365
2365
  }
2366
2366
  static decode(e) {
2367
- let r = 0, i = 0, c = 0;
2368
- const u = new Uint8Array(e), d = new Uint8Array(u.byteLength * 5 / 8 | 0);
2367
+ let r = 0, i = 0, a = 0;
2368
+ const u = new Uint8Array(e), l = new Uint8Array(u.byteLength * 5 / 8 | 0);
2369
2369
  for (let m = 0; m < u.byteLength; m++) {
2370
2370
  const P = String.fromCharCode(u[m]), g = Pr.indexOf(P);
2371
2371
  if (g === -1)
2372
2372
  throw new Error("Illegal Base32 character: " + u[m]);
2373
- i = i << 5 | g, r += 5, r >= 8 && (d[c++] = i >>> r - 8 & 255, r -= 8);
2373
+ i = i << 5 | g, r += 5, r >= 8 && (l[a++] = i >>> r - 8 & 255, r -= 8);
2374
2374
  }
2375
- return d.slice(0, c);
2375
+ return l.slice(0, a);
2376
2376
  }
2377
2377
  }
2378
2378
  Kt.base32 = rs;
2379
2379
  var bn;
2380
- function ar() {
2380
+ function or() {
2381
2381
  if (bn)
2382
2382
  return Ct;
2383
2383
  bn = 1, Object.defineProperty(Ct, "__esModule", { value: !0 }), Ct.Codec = void 0;
2384
2384
  const t = Ft, e = _t(), r = Kt;
2385
2385
  class i {
2386
- static encode(u, d) {
2387
- if (!d || !(d instanceof Uint8Array))
2386
+ static encode(u, l) {
2387
+ if (!l || !(l instanceof Uint8Array))
2388
2388
  throw new e.NKeysError(e.NKeysErrorCode.SerializationError);
2389
2389
  if (!e.Prefixes.isValidPrefix(u))
2390
2390
  throw new e.NKeysError(e.NKeysErrorCode.InvalidPrefixByte);
2391
- return i._encode(!1, u, d);
2391
+ return i._encode(!1, u, l);
2392
2392
  }
2393
- static encodeSeed(u, d) {
2394
- if (!d)
2393
+ static encodeSeed(u, l) {
2394
+ if (!l)
2395
2395
  throw new e.NKeysError(e.NKeysErrorCode.ApiError);
2396
2396
  if (!e.Prefixes.isValidPublicPrefix(u))
2397
2397
  throw new e.NKeysError(e.NKeysErrorCode.InvalidPrefixByte);
2398
- if (d.byteLength !== 32)
2398
+ if (l.byteLength !== 32)
2399
2399
  throw new e.NKeysError(e.NKeysErrorCode.InvalidSeedLen);
2400
- return i._encode(!0, u, d);
2400
+ return i._encode(!0, u, l);
2401
2401
  }
2402
- static decode(u, d) {
2402
+ static decode(u, l) {
2403
2403
  if (!e.Prefixes.isValidPrefix(u))
2404
2404
  throw new e.NKeysError(e.NKeysErrorCode.InvalidPrefixByte);
2405
- const m = i._decode(d);
2405
+ const m = i._decode(l);
2406
2406
  if (m[0] !== u)
2407
2407
  throw new e.NKeysError(e.NKeysErrorCode.InvalidPrefixByte);
2408
2408
  return m.slice(1);
2409
2409
  }
2410
2410
  static decodeSeed(u) {
2411
- const d = i._decode(u), m = i._decodePrefix(d);
2411
+ const l = i._decode(u), m = i._decodePrefix(l);
2412
2412
  if (m[0] != e.Prefix.Seed)
2413
2413
  throw new e.NKeysError(e.NKeysErrorCode.InvalidSeed);
2414
2414
  if (!e.Prefixes.isValidPublicPrefix(m[1]))
2415
2415
  throw new e.NKeysError(e.NKeysErrorCode.InvalidPrefixByte);
2416
- return { buf: d.slice(2), prefix: m[1] };
2416
+ return { buf: l.slice(2), prefix: m[1] };
2417
2417
  }
2418
2418
  // unsafe encode no prefix/role validation
2419
- static _encode(u, d, m) {
2419
+ static _encode(u, l, m) {
2420
2420
  const P = u ? 2 : 1, g = m.byteLength, w = P + g + 2, b = P + g, x = new Uint8Array(w);
2421
2421
  if (u) {
2422
- const U = i._encodePrefix(e.Prefix.Seed, d);
2422
+ const U = i._encodePrefix(e.Prefix.Seed, l);
2423
2423
  x.set(U);
2424
2424
  } else
2425
- x[0] = d;
2425
+ x[0] = l;
2426
2426
  x.set(m, P);
2427
2427
  const R = t.crc16.checksum(x.slice(0, b));
2428
2428
  return new DataView(x.buffer).setUint16(b, R, !0), r.base32.encode(x);
@@ -2431,24 +2431,24 @@ function ar() {
2431
2431
  static _decode(u) {
2432
2432
  if (u.byteLength < 4)
2433
2433
  throw new e.NKeysError(e.NKeysErrorCode.InvalidEncoding);
2434
- let d;
2434
+ let l;
2435
2435
  try {
2436
- d = r.base32.decode(u);
2436
+ l = r.base32.decode(u);
2437
2437
  } catch (w) {
2438
2438
  throw new e.NKeysError(e.NKeysErrorCode.InvalidEncoding, { cause: w });
2439
2439
  }
2440
- const m = d.byteLength - 2, g = new DataView(d.buffer).getUint16(m, !0), p = d.slice(0, m);
2440
+ const m = l.byteLength - 2, g = new DataView(l.buffer).getUint16(m, !0), p = l.slice(0, m);
2441
2441
  if (!t.crc16.validate(p, g))
2442
2442
  throw new e.NKeysError(e.NKeysErrorCode.InvalidChecksum);
2443
2443
  return p;
2444
2444
  }
2445
- static _encodePrefix(u, d) {
2446
- const m = u | d >> 5, P = (d & 31) << 3;
2445
+ static _encodePrefix(u, l) {
2446
+ const m = u | l >> 5, P = (l & 31) << 3;
2447
2447
  return new Uint8Array([m, P]);
2448
2448
  }
2449
2449
  static _decodePrefix(u) {
2450
- const d = u[0] & 248, m = (u[0] & 7) << 5 | (u[1] & 248) >> 3;
2451
- return new Uint8Array([d, m]);
2450
+ const l = u[0] & 248, m = (u[0] & 7) << 5 | (u[1] & 248) >> 3;
2451
+ return new Uint8Array([l, m]);
2452
2452
  }
2453
2453
  }
2454
2454
  return Ct.Codec = i, Ct;
@@ -2461,113 +2461,113 @@ var Jn = { exports: {} };
2461
2461
  const is = {}, ss = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2462
2462
  __proto__: null,
2463
2463
  default: is
2464
- }, Symbol.toStringTag, { value: "Module" })), as = /* @__PURE__ */ yi(ss);
2464
+ }, Symbol.toStringTag, { value: "Module" })), os = /* @__PURE__ */ yi(ss);
2465
2465
  (function(t) {
2466
2466
  (function(e) {
2467
2467
  var r = function(s) {
2468
- var o, a = new Float64Array(16);
2468
+ var c, o = new Float64Array(16);
2469
2469
  if (s)
2470
- for (o = 0; o < s.length; o++)
2471
- a[o] = s[o];
2472
- return a;
2470
+ for (c = 0; c < s.length; c++)
2471
+ o[c] = s[c];
2472
+ return o;
2473
2473
  }, i = function() {
2474
2474
  throw new Error("no PRNG");
2475
- }, c = new Uint8Array(16), u = new Uint8Array(32);
2475
+ }, a = new Uint8Array(16), u = new Uint8Array(32);
2476
2476
  u[0] = 9;
2477
- var d = r(), m = r([1]), P = r([56129, 1]), g = r([30883, 4953, 19914, 30187, 55467, 16705, 2637, 112, 59544, 30585, 16505, 36039, 65139, 11119, 27886, 20995]), p = r([61785, 9906, 39828, 60374, 45398, 33411, 5274, 224, 53552, 61171, 33010, 6542, 64743, 22239, 55772, 9222]), w = r([54554, 36645, 11616, 51542, 42930, 38181, 51040, 26924, 56412, 64982, 57905, 49316, 21502, 52590, 14035, 8553]), b = r([26200, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214]), x = r([41136, 18958, 6951, 50414, 58488, 44335, 6150, 12099, 55207, 15867, 153, 11085, 57099, 20417, 9344, 11139]);
2478
- function R(s, o, a, n) {
2479
- s[o] = a >> 24 & 255, s[o + 1] = a >> 16 & 255, s[o + 2] = a >> 8 & 255, s[o + 3] = a & 255, s[o + 4] = n >> 24 & 255, s[o + 5] = n >> 16 & 255, s[o + 6] = n >> 8 & 255, s[o + 7] = n & 255;
2477
+ var l = r(), m = r([1]), P = r([56129, 1]), g = r([30883, 4953, 19914, 30187, 55467, 16705, 2637, 112, 59544, 30585, 16505, 36039, 65139, 11119, 27886, 20995]), p = r([61785, 9906, 39828, 60374, 45398, 33411, 5274, 224, 53552, 61171, 33010, 6542, 64743, 22239, 55772, 9222]), w = r([54554, 36645, 11616, 51542, 42930, 38181, 51040, 26924, 56412, 64982, 57905, 49316, 21502, 52590, 14035, 8553]), b = r([26200, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214, 26214]), x = r([41136, 18958, 6951, 50414, 58488, 44335, 6150, 12099, 55207, 15867, 153, 11085, 57099, 20417, 9344, 11139]);
2478
+ function R(s, c, o, n) {
2479
+ s[c] = o >> 24 & 255, s[c + 1] = o >> 16 & 255, s[c + 2] = o >> 8 & 255, s[c + 3] = o & 255, s[c + 4] = n >> 24 & 255, s[c + 5] = n >> 16 & 255, s[c + 6] = n >> 8 & 255, s[c + 7] = n & 255;
2480
2480
  }
2481
- function j(s, o, a, n, f) {
2481
+ function j(s, c, o, n, f) {
2482
2482
  var y, _ = 0;
2483
2483
  for (y = 0; y < f; y++)
2484
- _ |= s[o + y] ^ a[n + y];
2484
+ _ |= s[c + y] ^ o[n + y];
2485
2485
  return (1 & _ - 1 >>> 8) - 1;
2486
2486
  }
2487
- function U(s, o, a, n) {
2488
- return j(s, o, a, n, 16);
2487
+ function U(s, c, o, n) {
2488
+ return j(s, c, o, n, 16);
2489
2489
  }
2490
- function ie(s, o, a, n) {
2491
- return j(s, o, a, n, 32);
2490
+ function ie(s, c, o, n) {
2491
+ return j(s, c, o, n, 32);
2492
2492
  }
2493
- function ye(s, o, a, n) {
2494
- for (var f = n[0] & 255 | (n[1] & 255) << 8 | (n[2] & 255) << 16 | (n[3] & 255) << 24, y = a[0] & 255 | (a[1] & 255) << 8 | (a[2] & 255) << 16 | (a[3] & 255) << 24, _ = a[4] & 255 | (a[5] & 255) << 8 | (a[6] & 255) << 16 | (a[7] & 255) << 24, O = a[8] & 255 | (a[9] & 255) << 8 | (a[10] & 255) << 16 | (a[11] & 255) << 24, M = a[12] & 255 | (a[13] & 255) << 8 | (a[14] & 255) << 16 | (a[15] & 255) << 24, $ = n[4] & 255 | (n[5] & 255) << 8 | (n[6] & 255) << 16 | (n[7] & 255) << 24, N = o[0] & 255 | (o[1] & 255) << 8 | (o[2] & 255) << 16 | (o[3] & 255) << 24, ce = o[4] & 255 | (o[5] & 255) << 8 | (o[6] & 255) << 16 | (o[7] & 255) << 24, F = o[8] & 255 | (o[9] & 255) << 8 | (o[10] & 255) << 16 | (o[11] & 255) << 24, G = o[12] & 255 | (o[13] & 255) << 8 | (o[14] & 255) << 16 | (o[15] & 255) << 24, H = n[8] & 255 | (n[9] & 255) << 8 | (n[10] & 255) << 16 | (n[11] & 255) << 24, X = a[16] & 255 | (a[17] & 255) << 8 | (a[18] & 255) << 16 | (a[19] & 255) << 24, W = a[20] & 255 | (a[21] & 255) << 8 | (a[22] & 255) << 16 | (a[23] & 255) << 24, V = a[24] & 255 | (a[25] & 255) << 8 | (a[26] & 255) << 16 | (a[27] & 255) << 24, Y = a[28] & 255 | (a[29] & 255) << 8 | (a[30] & 255) << 16 | (a[31] & 255) << 24, J = n[12] & 255 | (n[13] & 255) << 8 | (n[14] & 255) << 16 | (n[15] & 255) << 24, K = f, q = y, k = _, B = O, D = M, T = $, v = N, E = ce, C = F, S = G, A = H, I = X, z = W, Z = V, ee = Y, Q = J, h, ne = 0; ne < 20; ne += 2)
2495
- h = K + z | 0, D ^= h << 7 | h >>> 25, h = D + K | 0, C ^= h << 9 | h >>> 23, h = C + D | 0, z ^= h << 13 | h >>> 19, h = z + C | 0, K ^= h << 18 | h >>> 14, h = T + q | 0, S ^= h << 7 | h >>> 25, h = S + T | 0, Z ^= h << 9 | h >>> 23, h = Z + S | 0, q ^= h << 13 | h >>> 19, h = q + Z | 0, T ^= h << 18 | h >>> 14, h = A + v | 0, ee ^= h << 7 | h >>> 25, h = ee + A | 0, k ^= h << 9 | h >>> 23, h = k + ee | 0, v ^= h << 13 | h >>> 19, h = v + k | 0, A ^= h << 18 | h >>> 14, h = Q + I | 0, B ^= h << 7 | h >>> 25, h = B + Q | 0, E ^= h << 9 | h >>> 23, h = E + B | 0, I ^= h << 13 | h >>> 19, h = I + E | 0, Q ^= h << 18 | h >>> 14, h = K + B | 0, q ^= h << 7 | h >>> 25, h = q + K | 0, k ^= h << 9 | h >>> 23, h = k + q | 0, B ^= h << 13 | h >>> 19, h = B + k | 0, K ^= h << 18 | h >>> 14, h = T + D | 0, v ^= h << 7 | h >>> 25, h = v + T | 0, E ^= h << 9 | h >>> 23, h = E + v | 0, D ^= h << 13 | h >>> 19, h = D + E | 0, T ^= h << 18 | h >>> 14, h = A + S | 0, I ^= h << 7 | h >>> 25, h = I + A | 0, C ^= h << 9 | h >>> 23, h = C + I | 0, S ^= h << 13 | h >>> 19, h = S + C | 0, A ^= h << 18 | h >>> 14, h = Q + ee | 0, z ^= h << 7 | h >>> 25, h = z + Q | 0, Z ^= h << 9 | h >>> 23, h = Z + z | 0, ee ^= h << 13 | h >>> 19, h = ee + Z | 0, Q ^= h << 18 | h >>> 14;
2496
- K = K + f | 0, q = q + y | 0, k = k + _ | 0, B = B + O | 0, D = D + M | 0, T = T + $ | 0, v = v + N | 0, E = E + ce | 0, C = C + F | 0, S = S + G | 0, A = A + H | 0, I = I + X | 0, z = z + W | 0, Z = Z + V | 0, ee = ee + Y | 0, Q = Q + J | 0, s[0] = K >>> 0 & 255, s[1] = K >>> 8 & 255, s[2] = K >>> 16 & 255, s[3] = K >>> 24 & 255, s[4] = q >>> 0 & 255, s[5] = q >>> 8 & 255, s[6] = q >>> 16 & 255, s[7] = q >>> 24 & 255, s[8] = k >>> 0 & 255, s[9] = k >>> 8 & 255, s[10] = k >>> 16 & 255, s[11] = k >>> 24 & 255, s[12] = B >>> 0 & 255, s[13] = B >>> 8 & 255, s[14] = B >>> 16 & 255, s[15] = B >>> 24 & 255, s[16] = D >>> 0 & 255, s[17] = D >>> 8 & 255, s[18] = D >>> 16 & 255, s[19] = D >>> 24 & 255, s[20] = T >>> 0 & 255, s[21] = T >>> 8 & 255, s[22] = T >>> 16 & 255, s[23] = T >>> 24 & 255, s[24] = v >>> 0 & 255, s[25] = v >>> 8 & 255, s[26] = v >>> 16 & 255, s[27] = v >>> 24 & 255, s[28] = E >>> 0 & 255, s[29] = E >>> 8 & 255, s[30] = E >>> 16 & 255, s[31] = E >>> 24 & 255, s[32] = C >>> 0 & 255, s[33] = C >>> 8 & 255, s[34] = C >>> 16 & 255, s[35] = C >>> 24 & 255, s[36] = S >>> 0 & 255, s[37] = S >>> 8 & 255, s[38] = S >>> 16 & 255, s[39] = S >>> 24 & 255, s[40] = A >>> 0 & 255, s[41] = A >>> 8 & 255, s[42] = A >>> 16 & 255, s[43] = A >>> 24 & 255, s[44] = I >>> 0 & 255, s[45] = I >>> 8 & 255, s[46] = I >>> 16 & 255, s[47] = I >>> 24 & 255, s[48] = z >>> 0 & 255, s[49] = z >>> 8 & 255, s[50] = z >>> 16 & 255, s[51] = z >>> 24 & 255, s[52] = Z >>> 0 & 255, s[53] = Z >>> 8 & 255, s[54] = Z >>> 16 & 255, s[55] = Z >>> 24 & 255, s[56] = ee >>> 0 & 255, s[57] = ee >>> 8 & 255, s[58] = ee >>> 16 & 255, s[59] = ee >>> 24 & 255, s[60] = Q >>> 0 & 255, s[61] = Q >>> 8 & 255, s[62] = Q >>> 16 & 255, s[63] = Q >>> 24 & 255;
2493
+ function ye(s, c, o, n) {
2494
+ for (var f = n[0] & 255 | (n[1] & 255) << 8 | (n[2] & 255) << 16 | (n[3] & 255) << 24, y = o[0] & 255 | (o[1] & 255) << 8 | (o[2] & 255) << 16 | (o[3] & 255) << 24, _ = o[4] & 255 | (o[5] & 255) << 8 | (o[6] & 255) << 16 | (o[7] & 255) << 24, O = o[8] & 255 | (o[9] & 255) << 8 | (o[10] & 255) << 16 | (o[11] & 255) << 24, I = o[12] & 255 | (o[13] & 255) << 8 | (o[14] & 255) << 16 | (o[15] & 255) << 24, $ = n[4] & 255 | (n[5] & 255) << 8 | (n[6] & 255) << 16 | (n[7] & 255) << 24, N = c[0] & 255 | (c[1] & 255) << 8 | (c[2] & 255) << 16 | (c[3] & 255) << 24, ce = c[4] & 255 | (c[5] & 255) << 8 | (c[6] & 255) << 16 | (c[7] & 255) << 24, F = c[8] & 255 | (c[9] & 255) << 8 | (c[10] & 255) << 16 | (c[11] & 255) << 24, G = c[12] & 255 | (c[13] & 255) << 8 | (c[14] & 255) << 16 | (c[15] & 255) << 24, H = n[8] & 255 | (n[9] & 255) << 8 | (n[10] & 255) << 16 | (n[11] & 255) << 24, X = o[16] & 255 | (o[17] & 255) << 8 | (o[18] & 255) << 16 | (o[19] & 255) << 24, W = o[20] & 255 | (o[21] & 255) << 8 | (o[22] & 255) << 16 | (o[23] & 255) << 24, V = o[24] & 255 | (o[25] & 255) << 8 | (o[26] & 255) << 16 | (o[27] & 255) << 24, Y = o[28] & 255 | (o[29] & 255) << 8 | (o[30] & 255) << 16 | (o[31] & 255) << 24, J = n[12] & 255 | (n[13] & 255) << 8 | (n[14] & 255) << 16 | (n[15] & 255) << 24, K = f, q = y, k = _, B = O, D = I, T = $, v = N, E = ce, C = F, S = G, A = H, M = X, z = W, Z = V, ee = Y, Q = J, h, ne = 0; ne < 20; ne += 2)
2495
+ h = K + z | 0, D ^= h << 7 | h >>> 25, h = D + K | 0, C ^= h << 9 | h >>> 23, h = C + D | 0, z ^= h << 13 | h >>> 19, h = z + C | 0, K ^= h << 18 | h >>> 14, h = T + q | 0, S ^= h << 7 | h >>> 25, h = S + T | 0, Z ^= h << 9 | h >>> 23, h = Z + S | 0, q ^= h << 13 | h >>> 19, h = q + Z | 0, T ^= h << 18 | h >>> 14, h = A + v | 0, ee ^= h << 7 | h >>> 25, h = ee + A | 0, k ^= h << 9 | h >>> 23, h = k + ee | 0, v ^= h << 13 | h >>> 19, h = v + k | 0, A ^= h << 18 | h >>> 14, h = Q + M | 0, B ^= h << 7 | h >>> 25, h = B + Q | 0, E ^= h << 9 | h >>> 23, h = E + B | 0, M ^= h << 13 | h >>> 19, h = M + E | 0, Q ^= h << 18 | h >>> 14, h = K + B | 0, q ^= h << 7 | h >>> 25, h = q + K | 0, k ^= h << 9 | h >>> 23, h = k + q | 0, B ^= h << 13 | h >>> 19, h = B + k | 0, K ^= h << 18 | h >>> 14, h = T + D | 0, v ^= h << 7 | h >>> 25, h = v + T | 0, E ^= h << 9 | h >>> 23, h = E + v | 0, D ^= h << 13 | h >>> 19, h = D + E | 0, T ^= h << 18 | h >>> 14, h = A + S | 0, M ^= h << 7 | h >>> 25, h = M + A | 0, C ^= h << 9 | h >>> 23, h = C + M | 0, S ^= h << 13 | h >>> 19, h = S + C | 0, A ^= h << 18 | h >>> 14, h = Q + ee | 0, z ^= h << 7 | h >>> 25, h = z + Q | 0, Z ^= h << 9 | h >>> 23, h = Z + z | 0, ee ^= h << 13 | h >>> 19, h = ee + Z | 0, Q ^= h << 18 | h >>> 14;
2496
+ K = K + f | 0, q = q + y | 0, k = k + _ | 0, B = B + O | 0, D = D + I | 0, T = T + $ | 0, v = v + N | 0, E = E + ce | 0, C = C + F | 0, S = S + G | 0, A = A + H | 0, M = M + X | 0, z = z + W | 0, Z = Z + V | 0, ee = ee + Y | 0, Q = Q + J | 0, s[0] = K >>> 0 & 255, s[1] = K >>> 8 & 255, s[2] = K >>> 16 & 255, s[3] = K >>> 24 & 255, s[4] = q >>> 0 & 255, s[5] = q >>> 8 & 255, s[6] = q >>> 16 & 255, s[7] = q >>> 24 & 255, s[8] = k >>> 0 & 255, s[9] = k >>> 8 & 255, s[10] = k >>> 16 & 255, s[11] = k >>> 24 & 255, s[12] = B >>> 0 & 255, s[13] = B >>> 8 & 255, s[14] = B >>> 16 & 255, s[15] = B >>> 24 & 255, s[16] = D >>> 0 & 255, s[17] = D >>> 8 & 255, s[18] = D >>> 16 & 255, s[19] = D >>> 24 & 255, s[20] = T >>> 0 & 255, s[21] = T >>> 8 & 255, s[22] = T >>> 16 & 255, s[23] = T >>> 24 & 255, s[24] = v >>> 0 & 255, s[25] = v >>> 8 & 255, s[26] = v >>> 16 & 255, s[27] = v >>> 24 & 255, s[28] = E >>> 0 & 255, s[29] = E >>> 8 & 255, s[30] = E >>> 16 & 255, s[31] = E >>> 24 & 255, s[32] = C >>> 0 & 255, s[33] = C >>> 8 & 255, s[34] = C >>> 16 & 255, s[35] = C >>> 24 & 255, s[36] = S >>> 0 & 255, s[37] = S >>> 8 & 255, s[38] = S >>> 16 & 255, s[39] = S >>> 24 & 255, s[40] = A >>> 0 & 255, s[41] = A >>> 8 & 255, s[42] = A >>> 16 & 255, s[43] = A >>> 24 & 255, s[44] = M >>> 0 & 255, s[45] = M >>> 8 & 255, s[46] = M >>> 16 & 255, s[47] = M >>> 24 & 255, s[48] = z >>> 0 & 255, s[49] = z >>> 8 & 255, s[50] = z >>> 16 & 255, s[51] = z >>> 24 & 255, s[52] = Z >>> 0 & 255, s[53] = Z >>> 8 & 255, s[54] = Z >>> 16 & 255, s[55] = Z >>> 24 & 255, s[56] = ee >>> 0 & 255, s[57] = ee >>> 8 & 255, s[58] = ee >>> 16 & 255, s[59] = ee >>> 24 & 255, s[60] = Q >>> 0 & 255, s[61] = Q >>> 8 & 255, s[62] = Q >>> 16 & 255, s[63] = Q >>> 24 & 255;
2497
2497
  }
2498
- function Le(s, o, a, n) {
2499
- for (var f = n[0] & 255 | (n[1] & 255) << 8 | (n[2] & 255) << 16 | (n[3] & 255) << 24, y = a[0] & 255 | (a[1] & 255) << 8 | (a[2] & 255) << 16 | (a[3] & 255) << 24, _ = a[4] & 255 | (a[5] & 255) << 8 | (a[6] & 255) << 16 | (a[7] & 255) << 24, O = a[8] & 255 | (a[9] & 255) << 8 | (a[10] & 255) << 16 | (a[11] & 255) << 24, M = a[12] & 255 | (a[13] & 255) << 8 | (a[14] & 255) << 16 | (a[15] & 255) << 24, $ = n[4] & 255 | (n[5] & 255) << 8 | (n[6] & 255) << 16 | (n[7] & 255) << 24, N = o[0] & 255 | (o[1] & 255) << 8 | (o[2] & 255) << 16 | (o[3] & 255) << 24, ce = o[4] & 255 | (o[5] & 255) << 8 | (o[6] & 255) << 16 | (o[7] & 255) << 24, F = o[8] & 255 | (o[9] & 255) << 8 | (o[10] & 255) << 16 | (o[11] & 255) << 24, G = o[12] & 255 | (o[13] & 255) << 8 | (o[14] & 255) << 16 | (o[15] & 255) << 24, H = n[8] & 255 | (n[9] & 255) << 8 | (n[10] & 255) << 16 | (n[11] & 255) << 24, X = a[16] & 255 | (a[17] & 255) << 8 | (a[18] & 255) << 16 | (a[19] & 255) << 24, W = a[20] & 255 | (a[21] & 255) << 8 | (a[22] & 255) << 16 | (a[23] & 255) << 24, V = a[24] & 255 | (a[25] & 255) << 8 | (a[26] & 255) << 16 | (a[27] & 255) << 24, Y = a[28] & 255 | (a[29] & 255) << 8 | (a[30] & 255) << 16 | (a[31] & 255) << 24, J = n[12] & 255 | (n[13] & 255) << 8 | (n[14] & 255) << 16 | (n[15] & 255) << 24, K = f, q = y, k = _, B = O, D = M, T = $, v = N, E = ce, C = F, S = G, A = H, I = X, z = W, Z = V, ee = Y, Q = J, h, ne = 0; ne < 20; ne += 2)
2500
- h = K + z | 0, D ^= h << 7 | h >>> 25, h = D + K | 0, C ^= h << 9 | h >>> 23, h = C + D | 0, z ^= h << 13 | h >>> 19, h = z + C | 0, K ^= h << 18 | h >>> 14, h = T + q | 0, S ^= h << 7 | h >>> 25, h = S + T | 0, Z ^= h << 9 | h >>> 23, h = Z + S | 0, q ^= h << 13 | h >>> 19, h = q + Z | 0, T ^= h << 18 | h >>> 14, h = A + v | 0, ee ^= h << 7 | h >>> 25, h = ee + A | 0, k ^= h << 9 | h >>> 23, h = k + ee | 0, v ^= h << 13 | h >>> 19, h = v + k | 0, A ^= h << 18 | h >>> 14, h = Q + I | 0, B ^= h << 7 | h >>> 25, h = B + Q | 0, E ^= h << 9 | h >>> 23, h = E + B | 0, I ^= h << 13 | h >>> 19, h = I + E | 0, Q ^= h << 18 | h >>> 14, h = K + B | 0, q ^= h << 7 | h >>> 25, h = q + K | 0, k ^= h << 9 | h >>> 23, h = k + q | 0, B ^= h << 13 | h >>> 19, h = B + k | 0, K ^= h << 18 | h >>> 14, h = T + D | 0, v ^= h << 7 | h >>> 25, h = v + T | 0, E ^= h << 9 | h >>> 23, h = E + v | 0, D ^= h << 13 | h >>> 19, h = D + E | 0, T ^= h << 18 | h >>> 14, h = A + S | 0, I ^= h << 7 | h >>> 25, h = I + A | 0, C ^= h << 9 | h >>> 23, h = C + I | 0, S ^= h << 13 | h >>> 19, h = S + C | 0, A ^= h << 18 | h >>> 14, h = Q + ee | 0, z ^= h << 7 | h >>> 25, h = z + Q | 0, Z ^= h << 9 | h >>> 23, h = Z + z | 0, ee ^= h << 13 | h >>> 19, h = ee + Z | 0, Q ^= h << 18 | h >>> 14;
2498
+ function Le(s, c, o, n) {
2499
+ for (var f = n[0] & 255 | (n[1] & 255) << 8 | (n[2] & 255) << 16 | (n[3] & 255) << 24, y = o[0] & 255 | (o[1] & 255) << 8 | (o[2] & 255) << 16 | (o[3] & 255) << 24, _ = o[4] & 255 | (o[5] & 255) << 8 | (o[6] & 255) << 16 | (o[7] & 255) << 24, O = o[8] & 255 | (o[9] & 255) << 8 | (o[10] & 255) << 16 | (o[11] & 255) << 24, I = o[12] & 255 | (o[13] & 255) << 8 | (o[14] & 255) << 16 | (o[15] & 255) << 24, $ = n[4] & 255 | (n[5] & 255) << 8 | (n[6] & 255) << 16 | (n[7] & 255) << 24, N = c[0] & 255 | (c[1] & 255) << 8 | (c[2] & 255) << 16 | (c[3] & 255) << 24, ce = c[4] & 255 | (c[5] & 255) << 8 | (c[6] & 255) << 16 | (c[7] & 255) << 24, F = c[8] & 255 | (c[9] & 255) << 8 | (c[10] & 255) << 16 | (c[11] & 255) << 24, G = c[12] & 255 | (c[13] & 255) << 8 | (c[14] & 255) << 16 | (c[15] & 255) << 24, H = n[8] & 255 | (n[9] & 255) << 8 | (n[10] & 255) << 16 | (n[11] & 255) << 24, X = o[16] & 255 | (o[17] & 255) << 8 | (o[18] & 255) << 16 | (o[19] & 255) << 24, W = o[20] & 255 | (o[21] & 255) << 8 | (o[22] & 255) << 16 | (o[23] & 255) << 24, V = o[24] & 255 | (o[25] & 255) << 8 | (o[26] & 255) << 16 | (o[27] & 255) << 24, Y = o[28] & 255 | (o[29] & 255) << 8 | (o[30] & 255) << 16 | (o[31] & 255) << 24, J = n[12] & 255 | (n[13] & 255) << 8 | (n[14] & 255) << 16 | (n[15] & 255) << 24, K = f, q = y, k = _, B = O, D = I, T = $, v = N, E = ce, C = F, S = G, A = H, M = X, z = W, Z = V, ee = Y, Q = J, h, ne = 0; ne < 20; ne += 2)
2500
+ h = K + z | 0, D ^= h << 7 | h >>> 25, h = D + K | 0, C ^= h << 9 | h >>> 23, h = C + D | 0, z ^= h << 13 | h >>> 19, h = z + C | 0, K ^= h << 18 | h >>> 14, h = T + q | 0, S ^= h << 7 | h >>> 25, h = S + T | 0, Z ^= h << 9 | h >>> 23, h = Z + S | 0, q ^= h << 13 | h >>> 19, h = q + Z | 0, T ^= h << 18 | h >>> 14, h = A + v | 0, ee ^= h << 7 | h >>> 25, h = ee + A | 0, k ^= h << 9 | h >>> 23, h = k + ee | 0, v ^= h << 13 | h >>> 19, h = v + k | 0, A ^= h << 18 | h >>> 14, h = Q + M | 0, B ^= h << 7 | h >>> 25, h = B + Q | 0, E ^= h << 9 | h >>> 23, h = E + B | 0, M ^= h << 13 | h >>> 19, h = M + E | 0, Q ^= h << 18 | h >>> 14, h = K + B | 0, q ^= h << 7 | h >>> 25, h = q + K | 0, k ^= h << 9 | h >>> 23, h = k + q | 0, B ^= h << 13 | h >>> 19, h = B + k | 0, K ^= h << 18 | h >>> 14, h = T + D | 0, v ^= h << 7 | h >>> 25, h = v + T | 0, E ^= h << 9 | h >>> 23, h = E + v | 0, D ^= h << 13 | h >>> 19, h = D + E | 0, T ^= h << 18 | h >>> 14, h = A + S | 0, M ^= h << 7 | h >>> 25, h = M + A | 0, C ^= h << 9 | h >>> 23, h = C + M | 0, S ^= h << 13 | h >>> 19, h = S + C | 0, A ^= h << 18 | h >>> 14, h = Q + ee | 0, z ^= h << 7 | h >>> 25, h = z + Q | 0, Z ^= h << 9 | h >>> 23, h = Z + z | 0, ee ^= h << 13 | h >>> 19, h = ee + Z | 0, Q ^= h << 18 | h >>> 14;
2501
2501
  s[0] = K >>> 0 & 255, s[1] = K >>> 8 & 255, s[2] = K >>> 16 & 255, s[3] = K >>> 24 & 255, s[4] = T >>> 0 & 255, s[5] = T >>> 8 & 255, s[6] = T >>> 16 & 255, s[7] = T >>> 24 & 255, s[8] = A >>> 0 & 255, s[9] = A >>> 8 & 255, s[10] = A >>> 16 & 255, s[11] = A >>> 24 & 255, s[12] = Q >>> 0 & 255, s[13] = Q >>> 8 & 255, s[14] = Q >>> 16 & 255, s[15] = Q >>> 24 & 255, s[16] = v >>> 0 & 255, s[17] = v >>> 8 & 255, s[18] = v >>> 16 & 255, s[19] = v >>> 24 & 255, s[20] = E >>> 0 & 255, s[21] = E >>> 8 & 255, s[22] = E >>> 16 & 255, s[23] = E >>> 24 & 255, s[24] = C >>> 0 & 255, s[25] = C >>> 8 & 255, s[26] = C >>> 16 & 255, s[27] = C >>> 24 & 255, s[28] = S >>> 0 & 255, s[29] = S >>> 8 & 255, s[30] = S >>> 16 & 255, s[31] = S >>> 24 & 255;
2502
2502
  }
2503
- function L(s, o, a, n) {
2504
- ye(s, o, a, n);
2503
+ function L(s, c, o, n) {
2504
+ ye(s, c, o, n);
2505
2505
  }
2506
- function he(s, o, a, n) {
2507
- Le(s, o, a, n);
2506
+ function he(s, c, o, n) {
2507
+ Le(s, c, o, n);
2508
2508
  }
2509
2509
  var le = new Uint8Array([101, 120, 112, 97, 110, 100, 32, 51, 50, 45, 98, 121, 116, 101, 32, 107]);
2510
- function $e(s, o, a, n, f, y, _) {
2511
- var O = new Uint8Array(16), M = new Uint8Array(64), $, N;
2510
+ function $e(s, c, o, n, f, y, _) {
2511
+ var O = new Uint8Array(16), I = new Uint8Array(64), $, N;
2512
2512
  for (N = 0; N < 16; N++)
2513
2513
  O[N] = 0;
2514
2514
  for (N = 0; N < 8; N++)
2515
2515
  O[N] = y[N];
2516
2516
  for (; f >= 64; ) {
2517
- for (L(M, O, _, le), N = 0; N < 64; N++)
2518
- s[o + N] = a[n + N] ^ M[N];
2517
+ for (L(I, O, _, le), N = 0; N < 64; N++)
2518
+ s[c + N] = o[n + N] ^ I[N];
2519
2519
  for ($ = 1, N = 8; N < 16; N++)
2520
2520
  $ = $ + (O[N] & 255) | 0, O[N] = $ & 255, $ >>>= 8;
2521
- f -= 64, o += 64, n += 64;
2521
+ f -= 64, c += 64, n += 64;
2522
2522
  }
2523
2523
  if (f > 0)
2524
- for (L(M, O, _, le), N = 0; N < f; N++)
2525
- s[o + N] = a[n + N] ^ M[N];
2524
+ for (L(I, O, _, le), N = 0; N < f; N++)
2525
+ s[c + N] = o[n + N] ^ I[N];
2526
2526
  return 0;
2527
2527
  }
2528
- function Et(s, o, a, n, f) {
2529
- var y = new Uint8Array(16), _ = new Uint8Array(64), O, M;
2530
- for (M = 0; M < 16; M++)
2531
- y[M] = 0;
2532
- for (M = 0; M < 8; M++)
2533
- y[M] = n[M];
2534
- for (; a >= 64; ) {
2535
- for (L(_, y, f, le), M = 0; M < 64; M++)
2536
- s[o + M] = _[M];
2537
- for (O = 1, M = 8; M < 16; M++)
2538
- O = O + (y[M] & 255) | 0, y[M] = O & 255, O >>>= 8;
2539
- a -= 64, o += 64;
2528
+ function Et(s, c, o, n, f) {
2529
+ var y = new Uint8Array(16), _ = new Uint8Array(64), O, I;
2530
+ for (I = 0; I < 16; I++)
2531
+ y[I] = 0;
2532
+ for (I = 0; I < 8; I++)
2533
+ y[I] = n[I];
2534
+ for (; o >= 64; ) {
2535
+ for (L(_, y, f, le), I = 0; I < 64; I++)
2536
+ s[c + I] = _[I];
2537
+ for (O = 1, I = 8; I < 16; I++)
2538
+ O = O + (y[I] & 255) | 0, y[I] = O & 255, O >>>= 8;
2539
+ o -= 64, c += 64;
2540
2540
  }
2541
- if (a > 0)
2542
- for (L(_, y, f, le), M = 0; M < a; M++)
2543
- s[o + M] = _[M];
2541
+ if (o > 0)
2542
+ for (L(_, y, f, le), I = 0; I < o; I++)
2543
+ s[c + I] = _[I];
2544
2544
  return 0;
2545
2545
  }
2546
- function ot(s, o, a, n, f) {
2546
+ function at(s, c, o, n, f) {
2547
2547
  var y = new Uint8Array(32);
2548
2548
  he(y, n, f, le);
2549
2549
  for (var _ = new Uint8Array(8), O = 0; O < 8; O++)
2550
2550
  _[O] = n[O + 16];
2551
- return Et(s, o, a, _, y);
2551
+ return Et(s, c, o, _, y);
2552
2552
  }
2553
- function ct(s, o, a, n, f, y, _) {
2553
+ function ct(s, c, o, n, f, y, _) {
2554
2554
  var O = new Uint8Array(32);
2555
2555
  he(O, y, _, le);
2556
- for (var M = new Uint8Array(8), $ = 0; $ < 8; $++)
2557
- M[$] = y[$ + 16];
2558
- return $e(s, o, a, n, f, M, O);
2556
+ for (var I = new Uint8Array(8), $ = 0; $ < 8; $++)
2557
+ I[$] = y[$ + 16];
2558
+ return $e(s, c, o, n, f, I, O);
2559
2559
  }
2560
2560
  var ft = function(s) {
2561
2561
  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;
2562
- var o, a, n, f, y, _, O, M;
2563
- o = s[0] & 255 | (s[1] & 255) << 8, this.r[0] = o & 8191, a = s[2] & 255 | (s[3] & 255) << 8, this.r[1] = (o >>> 13 | a << 3) & 8191, n = s[4] & 255 | (s[5] & 255) << 8, this.r[2] = (a >>> 10 | n << 6) & 7939, f = s[6] & 255 | (s[7] & 255) << 8, this.r[3] = (n >>> 7 | f << 9) & 8191, y = s[8] & 255 | (s[9] & 255) << 8, this.r[4] = (f >>> 4 | y << 12) & 255, this.r[5] = y >>> 1 & 8190, _ = s[10] & 255 | (s[11] & 255) << 8, this.r[6] = (y >>> 14 | _ << 2) & 8191, O = s[12] & 255 | (s[13] & 255) << 8, this.r[7] = (_ >>> 11 | O << 5) & 8065, M = s[14] & 255 | (s[15] & 255) << 8, this.r[8] = (O >>> 8 | M << 8) & 8191, this.r[9] = M >>> 5 & 127, this.pad[0] = s[16] & 255 | (s[17] & 255) << 8, this.pad[1] = s[18] & 255 | (s[19] & 255) << 8, this.pad[2] = s[20] & 255 | (s[21] & 255) << 8, this.pad[3] = s[22] & 255 | (s[23] & 255) << 8, this.pad[4] = s[24] & 255 | (s[25] & 255) << 8, this.pad[5] = s[26] & 255 | (s[27] & 255) << 8, this.pad[6] = s[28] & 255 | (s[29] & 255) << 8, this.pad[7] = s[30] & 255 | (s[31] & 255) << 8;
2562
+ var c, o, n, f, y, _, O, I;
2563
+ c = s[0] & 255 | (s[1] & 255) << 8, this.r[0] = c & 8191, o = s[2] & 255 | (s[3] & 255) << 8, this.r[1] = (c >>> 13 | o << 3) & 8191, n = s[4] & 255 | (s[5] & 255) << 8, this.r[2] = (o >>> 10 | n << 6) & 7939, f = s[6] & 255 | (s[7] & 255) << 8, this.r[3] = (n >>> 7 | f << 9) & 8191, y = s[8] & 255 | (s[9] & 255) << 8, this.r[4] = (f >>> 4 | y << 12) & 255, this.r[5] = y >>> 1 & 8190, _ = s[10] & 255 | (s[11] & 255) << 8, this.r[6] = (y >>> 14 | _ << 2) & 8191, O = s[12] & 255 | (s[13] & 255) << 8, this.r[7] = (_ >>> 11 | O << 5) & 8065, I = s[14] & 255 | (s[15] & 255) << 8, this.r[8] = (O >>> 8 | I << 8) & 8191, this.r[9] = I >>> 5 & 127, this.pad[0] = s[16] & 255 | (s[17] & 255) << 8, this.pad[1] = s[18] & 255 | (s[19] & 255) << 8, this.pad[2] = s[20] & 255 | (s[21] & 255) << 8, this.pad[3] = s[22] & 255 | (s[23] & 255) << 8, this.pad[4] = s[24] & 255 | (s[25] & 255) << 8, this.pad[5] = s[26] & 255 | (s[27] & 255) << 8, this.pad[6] = s[28] & 255 | (s[29] & 255) << 8, this.pad[7] = s[30] & 255 | (s[31] & 255) << 8;
2564
2564
  };
2565
- ft.prototype.blocks = function(s, o, a) {
2566
- for (var n = this.fin ? 0 : 2048, f, y, _, O, M, $, N, ce, F, G, H, X, W, V, Y, J, K, q, k, B = this.h[0], D = this.h[1], T = this.h[2], v = this.h[3], E = this.h[4], C = this.h[5], S = this.h[6], A = this.h[7], I = this.h[8], z = this.h[9], Z = this.r[0], ee = this.r[1], Q = this.r[2], h = this.r[3], ne = this.r[4], fe = this.r[5], ue = this.r[6], te = this.r[7], ae = this.r[8], oe = this.r[9]; a >= 16; )
2567
- f = s[o + 0] & 255 | (s[o + 1] & 255) << 8, B += f & 8191, y = s[o + 2] & 255 | (s[o + 3] & 255) << 8, D += (f >>> 13 | y << 3) & 8191, _ = s[o + 4] & 255 | (s[o + 5] & 255) << 8, T += (y >>> 10 | _ << 6) & 8191, O = s[o + 6] & 255 | (s[o + 7] & 255) << 8, v += (_ >>> 7 | O << 9) & 8191, M = s[o + 8] & 255 | (s[o + 9] & 255) << 8, E += (O >>> 4 | M << 12) & 8191, C += M >>> 1 & 8191, $ = s[o + 10] & 255 | (s[o + 11] & 255) << 8, S += (M >>> 14 | $ << 2) & 8191, N = s[o + 12] & 255 | (s[o + 13] & 255) << 8, A += ($ >>> 11 | N << 5) & 8191, ce = s[o + 14] & 255 | (s[o + 15] & 255) << 8, I += (N >>> 8 | ce << 8) & 8191, z += ce >>> 5 | n, F = 0, G = F, G += B * Z, G += D * (5 * oe), G += T * (5 * ae), G += v * (5 * te), G += E * (5 * ue), F = G >>> 13, G &= 8191, G += C * (5 * fe), G += S * (5 * ne), G += A * (5 * h), G += I * (5 * Q), G += z * (5 * ee), F += G >>> 13, G &= 8191, H = F, H += B * ee, H += D * Z, H += T * (5 * oe), H += v * (5 * ae), H += E * (5 * te), F = H >>> 13, H &= 8191, H += C * (5 * ue), H += S * (5 * fe), H += A * (5 * ne), H += I * (5 * h), H += z * (5 * Q), F += H >>> 13, H &= 8191, X = F, X += B * Q, X += D * ee, X += T * Z, X += v * (5 * oe), X += E * (5 * ae), F = X >>> 13, X &= 8191, X += C * (5 * te), X += S * (5 * ue), X += A * (5 * fe), X += I * (5 * ne), X += z * (5 * h), F += X >>> 13, X &= 8191, W = F, W += B * h, W += D * Q, W += T * ee, W += v * Z, W += E * (5 * oe), F = W >>> 13, W &= 8191, W += C * (5 * ae), W += S * (5 * te), W += A * (5 * ue), W += I * (5 * fe), W += z * (5 * ne), F += W >>> 13, W &= 8191, V = F, V += B * ne, V += D * h, V += T * Q, V += v * ee, V += E * Z, F = V >>> 13, V &= 8191, V += C * (5 * oe), V += S * (5 * ae), V += A * (5 * te), V += I * (5 * ue), V += z * (5 * fe), F += V >>> 13, V &= 8191, Y = F, Y += B * fe, Y += D * ne, Y += T * h, Y += v * Q, Y += E * ee, F = Y >>> 13, Y &= 8191, Y += C * Z, Y += S * (5 * oe), Y += A * (5 * ae), Y += I * (5 * te), Y += z * (5 * ue), F += Y >>> 13, Y &= 8191, J = F, J += B * ue, J += D * fe, J += T * ne, J += v * h, J += E * Q, F = J >>> 13, J &= 8191, J += C * ee, J += S * Z, J += A * (5 * oe), J += I * (5 * ae), J += z * (5 * te), F += J >>> 13, J &= 8191, K = F, K += B * te, K += D * ue, K += T * fe, K += v * ne, K += E * h, F = K >>> 13, K &= 8191, K += C * Q, K += S * ee, K += A * Z, K += I * (5 * oe), K += z * (5 * ae), F += K >>> 13, K &= 8191, q = F, q += B * ae, q += D * te, q += T * ue, q += v * fe, q += E * ne, F = q >>> 13, q &= 8191, q += C * h, q += S * Q, q += A * ee, q += I * Z, q += z * (5 * oe), F += q >>> 13, q &= 8191, k = F, k += B * oe, k += D * ae, k += T * te, k += v * ue, k += E * fe, F = k >>> 13, k &= 8191, k += C * ne, k += S * h, k += A * Q, k += I * ee, k += z * Z, F += k >>> 13, k &= 8191, F = (F << 2) + F | 0, F = F + G | 0, G = F & 8191, F = F >>> 13, H += F, B = G, D = H, T = X, v = W, E = V, C = Y, S = J, A = K, I = q, z = k, o += 16, a -= 16;
2568
- this.h[0] = B, this.h[1] = D, this.h[2] = T, this.h[3] = v, this.h[4] = E, this.h[5] = C, this.h[6] = S, this.h[7] = A, this.h[8] = I, this.h[9] = z;
2569
- }, ft.prototype.finish = function(s, o) {
2570
- var a = new Uint16Array(10), n, f, y, _;
2565
+ ft.prototype.blocks = function(s, c, o) {
2566
+ for (var n = this.fin ? 0 : 2048, f, y, _, O, I, $, N, ce, F, G, H, X, W, V, Y, J, K, q, k, B = this.h[0], D = this.h[1], T = this.h[2], v = this.h[3], E = this.h[4], C = this.h[5], S = this.h[6], A = this.h[7], M = this.h[8], z = this.h[9], Z = this.r[0], ee = this.r[1], Q = this.r[2], h = this.r[3], ne = this.r[4], fe = this.r[5], ue = this.r[6], te = this.r[7], oe = this.r[8], ae = this.r[9]; o >= 16; )
2567
+ f = s[c + 0] & 255 | (s[c + 1] & 255) << 8, B += f & 8191, y = s[c + 2] & 255 | (s[c + 3] & 255) << 8, D += (f >>> 13 | y << 3) & 8191, _ = s[c + 4] & 255 | (s[c + 5] & 255) << 8, T += (y >>> 10 | _ << 6) & 8191, O = s[c + 6] & 255 | (s[c + 7] & 255) << 8, v += (_ >>> 7 | O << 9) & 8191, I = s[c + 8] & 255 | (s[c + 9] & 255) << 8, E += (O >>> 4 | I << 12) & 8191, C += I >>> 1 & 8191, $ = s[c + 10] & 255 | (s[c + 11] & 255) << 8, S += (I >>> 14 | $ << 2) & 8191, N = s[c + 12] & 255 | (s[c + 13] & 255) << 8, A += ($ >>> 11 | N << 5) & 8191, ce = s[c + 14] & 255 | (s[c + 15] & 255) << 8, M += (N >>> 8 | ce << 8) & 8191, z += ce >>> 5 | n, F = 0, G = F, G += B * Z, G += D * (5 * ae), G += T * (5 * oe), G += v * (5 * te), G += E * (5 * ue), F = G >>> 13, G &= 8191, G += C * (5 * fe), G += S * (5 * ne), G += A * (5 * h), G += M * (5 * Q), G += z * (5 * ee), F += G >>> 13, G &= 8191, H = F, H += B * ee, H += D * Z, H += T * (5 * ae), H += v * (5 * oe), H += E * (5 * te), F = H >>> 13, H &= 8191, H += C * (5 * ue), H += S * (5 * fe), H += A * (5 * ne), H += M * (5 * h), H += z * (5 * Q), F += H >>> 13, H &= 8191, X = F, X += B * Q, X += D * ee, X += T * Z, X += v * (5 * ae), X += E * (5 * oe), F = X >>> 13, X &= 8191, X += C * (5 * te), X += S * (5 * ue), X += A * (5 * fe), X += M * (5 * ne), X += z * (5 * h), F += X >>> 13, X &= 8191, W = F, W += B * h, W += D * Q, W += T * ee, W += v * Z, W += E * (5 * ae), F = W >>> 13, W &= 8191, W += C * (5 * oe), W += S * (5 * te), W += A * (5 * ue), W += M * (5 * fe), W += z * (5 * ne), F += W >>> 13, W &= 8191, V = F, V += B * ne, V += D * h, V += T * Q, V += v * ee, V += E * Z, F = V >>> 13, V &= 8191, V += C * (5 * ae), V += S * (5 * oe), V += A * (5 * te), V += M * (5 * ue), V += z * (5 * fe), F += V >>> 13, V &= 8191, Y = F, Y += B * fe, Y += D * ne, Y += T * h, Y += v * Q, Y += E * ee, F = Y >>> 13, Y &= 8191, Y += C * Z, Y += S * (5 * ae), Y += A * (5 * oe), Y += M * (5 * te), Y += z * (5 * ue), F += Y >>> 13, Y &= 8191, J = F, J += B * ue, J += D * fe, J += T * ne, J += v * h, J += E * Q, F = J >>> 13, J &= 8191, J += C * ee, J += S * Z, J += A * (5 * ae), J += M * (5 * oe), J += z * (5 * te), F += J >>> 13, J &= 8191, K = F, K += B * te, K += D * ue, K += T * fe, K += v * ne, K += E * h, F = K >>> 13, K &= 8191, K += C * Q, K += S * ee, K += A * Z, K += M * (5 * ae), K += z * (5 * oe), F += K >>> 13, K &= 8191, q = F, q += B * oe, q += D * te, q += T * ue, q += v * fe, q += E * ne, F = q >>> 13, q &= 8191, q += C * h, q += S * Q, q += A * ee, q += M * Z, q += z * (5 * ae), F += q >>> 13, q &= 8191, k = F, k += B * ae, k += D * oe, k += T * te, k += v * ue, k += E * fe, F = k >>> 13, k &= 8191, k += C * ne, k += S * h, k += A * Q, k += M * ee, k += z * Z, F += k >>> 13, k &= 8191, F = (F << 2) + F | 0, F = F + G | 0, G = F & 8191, F = F >>> 13, H += F, B = G, D = H, T = X, v = W, E = V, C = Y, S = J, A = K, M = q, z = k, c += 16, o -= 16;
2568
+ this.h[0] = B, this.h[1] = D, this.h[2] = T, this.h[3] = v, this.h[4] = E, this.h[5] = C, this.h[6] = S, this.h[7] = A, this.h[8] = M, this.h[9] = z;
2569
+ }, ft.prototype.finish = function(s, c) {
2570
+ var o = new Uint16Array(10), n, f, y, _;
2571
2571
  if (this.leftover) {
2572
2572
  for (_ = this.leftover, this.buffer[_++] = 1; _ < 16; _++)
2573
2573
  this.buffer[_] = 0;
@@ -2575,159 +2575,159 @@ const is = {}, ss = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
2575
2575
  }
2576
2576
  for (n = this.h[1] >>> 13, this.h[1] &= 8191, _ = 2; _ < 10; _++)
2577
2577
  this.h[_] += n, n = this.h[_] >>> 13, this.h[_] &= 8191;
2578
- for (this.h[0] += n * 5, n = this.h[0] >>> 13, this.h[0] &= 8191, this.h[1] += n, n = this.h[1] >>> 13, this.h[1] &= 8191, this.h[2] += n, a[0] = this.h[0] + 5, n = a[0] >>> 13, a[0] &= 8191, _ = 1; _ < 10; _++)
2579
- a[_] = this.h[_] + n, n = a[_] >>> 13, a[_] &= 8191;
2580
- for (a[9] -= 8192, f = (n ^ 1) - 1, _ = 0; _ < 10; _++)
2581
- a[_] &= f;
2578
+ for (this.h[0] += n * 5, n = this.h[0] >>> 13, this.h[0] &= 8191, this.h[1] += n, n = this.h[1] >>> 13, this.h[1] &= 8191, this.h[2] += n, o[0] = this.h[0] + 5, n = o[0] >>> 13, o[0] &= 8191, _ = 1; _ < 10; _++)
2579
+ o[_] = this.h[_] + n, n = o[_] >>> 13, o[_] &= 8191;
2580
+ for (o[9] -= 8192, f = (n ^ 1) - 1, _ = 0; _ < 10; _++)
2581
+ o[_] &= f;
2582
2582
  for (f = ~f, _ = 0; _ < 10; _++)
2583
- this.h[_] = this.h[_] & f | a[_];
2583
+ this.h[_] = this.h[_] & f | o[_];
2584
2584
  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, y = this.h[0] + this.pad[0], this.h[0] = y & 65535, _ = 1; _ < 8; _++)
2585
2585
  y = (this.h[_] + this.pad[_] | 0) + (y >>> 16) | 0, this.h[_] = y & 65535;
2586
- s[o + 0] = this.h[0] >>> 0 & 255, s[o + 1] = this.h[0] >>> 8 & 255, s[o + 2] = this.h[1] >>> 0 & 255, s[o + 3] = this.h[1] >>> 8 & 255, s[o + 4] = this.h[2] >>> 0 & 255, s[o + 5] = this.h[2] >>> 8 & 255, s[o + 6] = this.h[3] >>> 0 & 255, s[o + 7] = this.h[3] >>> 8 & 255, s[o + 8] = this.h[4] >>> 0 & 255, s[o + 9] = this.h[4] >>> 8 & 255, s[o + 10] = this.h[5] >>> 0 & 255, s[o + 11] = this.h[5] >>> 8 & 255, s[o + 12] = this.h[6] >>> 0 & 255, s[o + 13] = this.h[6] >>> 8 & 255, s[o + 14] = this.h[7] >>> 0 & 255, s[o + 15] = this.h[7] >>> 8 & 255;
2587
- }, ft.prototype.update = function(s, o, a) {
2586
+ s[c + 0] = this.h[0] >>> 0 & 255, s[c + 1] = this.h[0] >>> 8 & 255, s[c + 2] = this.h[1] >>> 0 & 255, s[c + 3] = this.h[1] >>> 8 & 255, s[c + 4] = this.h[2] >>> 0 & 255, s[c + 5] = this.h[2] >>> 8 & 255, s[c + 6] = this.h[3] >>> 0 & 255, s[c + 7] = this.h[3] >>> 8 & 255, s[c + 8] = this.h[4] >>> 0 & 255, s[c + 9] = this.h[4] >>> 8 & 255, s[c + 10] = this.h[5] >>> 0 & 255, s[c + 11] = this.h[5] >>> 8 & 255, s[c + 12] = this.h[6] >>> 0 & 255, s[c + 13] = this.h[6] >>> 8 & 255, s[c + 14] = this.h[7] >>> 0 & 255, s[c + 15] = this.h[7] >>> 8 & 255;
2587
+ }, ft.prototype.update = function(s, c, o) {
2588
2588
  var n, f;
2589
2589
  if (this.leftover) {
2590
- for (f = 16 - this.leftover, f > a && (f = a), n = 0; n < f; n++)
2591
- this.buffer[this.leftover + n] = s[o + n];
2592
- if (a -= f, o += f, this.leftover += f, this.leftover < 16)
2590
+ for (f = 16 - this.leftover, f > o && (f = o), n = 0; n < f; n++)
2591
+ this.buffer[this.leftover + n] = s[c + n];
2592
+ if (o -= f, c += f, this.leftover += f, this.leftover < 16)
2593
2593
  return;
2594
2594
  this.blocks(this.buffer, 0, 16), this.leftover = 0;
2595
2595
  }
2596
- if (a >= 16 && (f = a - a % 16, this.blocks(s, o, f), o += f, a -= f), a) {
2597
- for (n = 0; n < a; n++)
2598
- this.buffer[this.leftover + n] = s[o + n];
2599
- this.leftover += a;
2596
+ if (o >= 16 && (f = o - o % 16, this.blocks(s, c, f), c += f, o -= f), o) {
2597
+ for (n = 0; n < o; n++)
2598
+ this.buffer[this.leftover + n] = s[c + n];
2599
+ this.leftover += o;
2600
2600
  }
2601
2601
  };
2602
- function ut(s, o, a, n, f, y) {
2602
+ function ut(s, c, o, n, f, y) {
2603
2603
  var _ = new ft(y);
2604
- return _.update(a, n, f), _.finish(s, o), 0;
2604
+ return _.update(o, n, f), _.finish(s, c), 0;
2605
2605
  }
2606
- function pt(s, o, a, n, f, y) {
2606
+ function pt(s, c, o, n, f, y) {
2607
2607
  var _ = new Uint8Array(16);
2608
- return ut(_, 0, a, n, f, y), U(s, o, _, 0);
2608
+ return ut(_, 0, o, n, f, y), U(s, c, _, 0);
2609
2609
  }
2610
- function Pe(s, o, a, n, f) {
2610
+ function Pe(s, c, o, n, f) {
2611
2611
  var y;
2612
- if (a < 32)
2612
+ if (o < 32)
2613
2613
  return -1;
2614
- for (ct(s, 0, o, 0, a, n, f), ut(s, 16, s, 32, a - 32, s), y = 0; y < 16; y++)
2614
+ for (ct(s, 0, c, 0, o, n, f), ut(s, 16, s, 32, o - 32, s), y = 0; y < 16; y++)
2615
2615
  s[y] = 0;
2616
2616
  return 0;
2617
2617
  }
2618
- function qe(s, o, a, n, f) {
2618
+ function qe(s, c, o, n, f) {
2619
2619
  var y, _ = new Uint8Array(32);
2620
- if (a < 32 || (ot(_, 0, 32, n, f), pt(o, 16, o, 32, a - 32, _) !== 0))
2620
+ if (o < 32 || (at(_, 0, 32, n, f), pt(c, 16, c, 32, o - 32, _) !== 0))
2621
2621
  return -1;
2622
- for (ct(s, 0, o, 0, a, n, f), y = 0; y < 32; y++)
2622
+ for (ct(s, 0, c, 0, o, n, f), y = 0; y < 32; y++)
2623
2623
  s[y] = 0;
2624
2624
  return 0;
2625
2625
  }
2626
- function Se(s, o) {
2627
- var a;
2628
- for (a = 0; a < 16; a++)
2629
- s[a] = o[a] | 0;
2626
+ function Se(s, c) {
2627
+ var o;
2628
+ for (o = 0; o < 16; o++)
2629
+ s[o] = c[o] | 0;
2630
2630
  }
2631
2631
  function Te(s) {
2632
- var o, a, n = 1;
2633
- for (o = 0; o < 16; o++)
2634
- a = s[o] + n + 65535, n = Math.floor(a / 65536), s[o] = a - n * 65536;
2632
+ var c, o, n = 1;
2633
+ for (c = 0; c < 16; c++)
2634
+ o = s[c] + n + 65535, n = Math.floor(o / 65536), s[c] = o - n * 65536;
2635
2635
  s[0] += n - 1 + 37 * (n - 1);
2636
2636
  }
2637
- function Ne(s, o, a) {
2638
- for (var n, f = ~(a - 1), y = 0; y < 16; y++)
2639
- n = f & (s[y] ^ o[y]), s[y] ^= n, o[y] ^= n;
2637
+ function Ne(s, c, o) {
2638
+ for (var n, f = ~(o - 1), y = 0; y < 16; y++)
2639
+ n = f & (s[y] ^ c[y]), s[y] ^= n, c[y] ^= n;
2640
2640
  }
2641
- function Re(s, o) {
2642
- var a, n, f, y = r(), _ = r();
2643
- for (a = 0; a < 16; a++)
2644
- _[a] = o[a];
2641
+ function Re(s, c) {
2642
+ var o, n, f, y = r(), _ = r();
2643
+ for (o = 0; o < 16; o++)
2644
+ _[o] = c[o];
2645
2645
  for (Te(_), Te(_), Te(_), n = 0; n < 2; n++) {
2646
- for (y[0] = _[0] - 65517, a = 1; a < 15; a++)
2647
- y[a] = _[a] - 65535 - (y[a - 1] >> 16 & 1), y[a - 1] &= 65535;
2646
+ for (y[0] = _[0] - 65517, o = 1; o < 15; o++)
2647
+ y[o] = _[o] - 65535 - (y[o - 1] >> 16 & 1), y[o - 1] &= 65535;
2648
2648
  y[15] = _[15] - 32767 - (y[14] >> 16 & 1), f = y[15] >> 16 & 1, y[14] &= 65535, Ne(_, y, 1 - f);
2649
2649
  }
2650
- for (a = 0; a < 16; a++)
2651
- s[2 * a] = _[a] & 255, s[2 * a + 1] = _[a] >> 8;
2650
+ for (o = 0; o < 16; o++)
2651
+ s[2 * o] = _[o] & 255, s[2 * o + 1] = _[o] >> 8;
2652
2652
  }
2653
- function zr(s, o) {
2654
- var a = new Uint8Array(32), n = new Uint8Array(32);
2655
- return Re(a, s), Re(n, o), ie(a, 0, n, 0);
2653
+ function zr(s, c) {
2654
+ var o = new Uint8Array(32), n = new Uint8Array(32);
2655
+ return Re(o, s), Re(n, c), ie(o, 0, n, 0);
2656
2656
  }
2657
2657
  function Gr(s) {
2658
- var o = new Uint8Array(32);
2659
- return Re(o, s), o[0] & 1;
2658
+ var c = new Uint8Array(32);
2659
+ return Re(c, s), c[0] & 1;
2660
2660
  }
2661
- function ur(s, o) {
2662
- var a;
2663
- for (a = 0; a < 16; a++)
2664
- s[a] = o[2 * a] + (o[2 * a + 1] << 8);
2661
+ function ur(s, c) {
2662
+ var o;
2663
+ for (o = 0; o < 16; o++)
2664
+ s[o] = c[2 * o] + (c[2 * o + 1] << 8);
2665
2665
  s[15] &= 32767;
2666
2666
  }
2667
- function Ke(s, o, a) {
2667
+ function Ke(s, c, o) {
2668
2668
  for (var n = 0; n < 16; n++)
2669
- s[n] = o[n] + a[n];
2669
+ s[n] = c[n] + o[n];
2670
2670
  }
2671
- function Be(s, o, a) {
2671
+ function Be(s, c, o) {
2672
2672
  for (var n = 0; n < 16; n++)
2673
- s[n] = o[n] - a[n];
2673
+ s[n] = c[n] - o[n];
2674
2674
  }
2675
- function se(s, o, a) {
2676
- var n, f, y = 0, _ = 0, O = 0, M = 0, $ = 0, N = 0, ce = 0, F = 0, G = 0, H = 0, X = 0, W = 0, V = 0, Y = 0, J = 0, K = 0, q = 0, k = 0, B = 0, D = 0, T = 0, v = 0, E = 0, C = 0, S = 0, A = 0, I = 0, z = 0, Z = 0, ee = 0, Q = 0, h = a[0], ne = a[1], fe = a[2], ue = a[3], te = a[4], ae = a[5], oe = a[6], ve = a[7], de = a[8], _e = a[9], ge = a[10], me = a[11], pe = a[12], Ae = a[13], Ce = a[14], Ie = a[15];
2677
- n = o[0], y += n * h, _ += n * ne, O += n * fe, M += n * ue, $ += n * te, N += n * ae, ce += n * oe, F += n * ve, G += n * de, H += n * _e, X += n * ge, W += n * me, V += n * pe, Y += n * Ae, J += n * Ce, K += n * Ie, n = o[1], _ += n * h, O += n * ne, M += n * fe, $ += n * ue, N += n * te, ce += n * ae, F += n * oe, G += n * ve, H += n * de, X += n * _e, W += n * ge, V += n * me, Y += n * pe, J += n * Ae, K += n * Ce, q += n * Ie, n = o[2], O += n * h, M += n * ne, $ += n * fe, N += n * ue, ce += n * te, F += n * ae, G += n * oe, H += n * ve, X += n * de, W += n * _e, V += n * ge, Y += n * me, J += n * pe, K += n * Ae, q += n * Ce, k += n * Ie, n = o[3], M += n * h, $ += n * ne, N += n * fe, ce += n * ue, F += n * te, G += n * ae, H += n * oe, X += n * ve, W += n * de, V += n * _e, Y += n * ge, J += n * me, K += n * pe, q += n * Ae, k += n * Ce, B += n * Ie, n = o[4], $ += n * h, N += n * ne, ce += n * fe, F += n * ue, G += n * te, H += n * ae, X += n * oe, W += n * ve, V += n * de, Y += n * _e, J += n * ge, K += n * me, q += n * pe, k += n * Ae, B += n * Ce, D += n * Ie, n = o[5], N += n * h, ce += n * ne, F += n * fe, G += n * ue, H += n * te, X += n * ae, W += n * oe, V += n * ve, Y += n * de, J += n * _e, K += n * ge, q += n * me, k += n * pe, B += n * Ae, D += n * Ce, T += n * Ie, n = o[6], ce += n * h, F += n * ne, G += n * fe, H += n * ue, X += n * te, W += n * ae, V += n * oe, Y += n * ve, J += n * de, K += n * _e, q += n * ge, k += n * me, B += n * pe, D += n * Ae, T += n * Ce, v += n * Ie, n = o[7], F += n * h, G += n * ne, H += n * fe, X += n * ue, W += n * te, V += n * ae, Y += n * oe, J += n * ve, K += n * de, q += n * _e, k += n * ge, B += n * me, D += n * pe, T += n * Ae, v += n * Ce, E += n * Ie, n = o[8], G += n * h, H += n * ne, X += n * fe, W += n * ue, V += n * te, Y += n * ae, J += n * oe, K += n * ve, q += n * de, k += n * _e, B += n * ge, D += n * me, T += n * pe, v += n * Ae, E += n * Ce, C += n * Ie, n = o[9], H += n * h, X += n * ne, W += n * fe, V += n * ue, Y += n * te, J += n * ae, K += n * oe, q += n * ve, k += n * de, B += n * _e, D += n * ge, T += n * me, v += n * pe, E += n * Ae, C += n * Ce, S += n * Ie, n = o[10], X += n * h, W += n * ne, V += n * fe, Y += n * ue, J += n * te, K += n * ae, q += n * oe, k += n * ve, B += n * de, D += n * _e, T += n * ge, v += n * me, E += n * pe, C += n * Ae, S += n * Ce, A += n * Ie, n = o[11], W += n * h, V += n * ne, Y += n * fe, J += n * ue, K += n * te, q += n * ae, k += n * oe, B += n * ve, D += n * de, T += n * _e, v += n * ge, E += n * me, C += n * pe, S += n * Ae, A += n * Ce, I += n * Ie, n = o[12], V += n * h, Y += n * ne, J += n * fe, K += n * ue, q += n * te, k += n * ae, B += n * oe, D += n * ve, T += n * de, v += n * _e, E += n * ge, C += n * me, S += n * pe, A += n * Ae, I += n * Ce, z += n * Ie, n = o[13], Y += n * h, J += n * ne, K += n * fe, q += n * ue, k += n * te, B += n * ae, D += n * oe, T += n * ve, v += n * de, E += n * _e, C += n * ge, S += n * me, A += n * pe, I += n * Ae, z += n * Ce, Z += n * Ie, n = o[14], J += n * h, K += n * ne, q += n * fe, k += n * ue, B += n * te, D += n * ae, T += n * oe, v += n * ve, E += n * de, C += n * _e, S += n * ge, A += n * me, I += n * pe, z += n * Ae, Z += n * Ce, ee += n * Ie, n = o[15], K += n * h, q += n * ne, k += n * fe, B += n * ue, D += n * te, T += n * ae, v += n * oe, E += n * ve, C += n * de, S += n * _e, A += n * ge, I += n * me, z += n * pe, Z += n * Ae, ee += n * Ce, Q += n * Ie, y += 38 * q, _ += 38 * k, O += 38 * B, M += 38 * D, $ += 38 * T, N += 38 * v, ce += 38 * E, F += 38 * C, G += 38 * S, H += 38 * A, X += 38 * I, W += 38 * z, V += 38 * Z, Y += 38 * ee, J += 38 * Q, f = 1, n = y + f + 65535, f = Math.floor(n / 65536), y = n - f * 65536, n = _ + f + 65535, f = Math.floor(n / 65536), _ = n - f * 65536, n = O + f + 65535, f = Math.floor(n / 65536), O = n - f * 65536, n = M + f + 65535, f = Math.floor(n / 65536), M = n - f * 65536, n = $ + f + 65535, f = Math.floor(n / 65536), $ = n - f * 65536, n = N + f + 65535, f = Math.floor(n / 65536), N = n - f * 65536, n = ce + f + 65535, f = Math.floor(n / 65536), ce = n - f * 65536, n = F + f + 65535, f = Math.floor(n / 65536), F = n - f * 65536, n = G + f + 65535, f = Math.floor(n / 65536), G = n - f * 65536, n = H + f + 65535, f = Math.floor(n / 65536), H = n - f * 65536, n = X + f + 65535, f = Math.floor(n / 65536), X = n - f * 65536, n = W + f + 65535, f = Math.floor(n / 65536), W = n - f * 65536, n = V + f + 65535, f = Math.floor(n / 65536), V = n - f * 65536, n = Y + f + 65535, f = Math.floor(n / 65536), Y = n - f * 65536, n = J + f + 65535, f = Math.floor(n / 65536), J = n - f * 65536, n = K + f + 65535, f = Math.floor(n / 65536), K = n - f * 65536, y += f - 1 + 37 * (f - 1), f = 1, n = y + f + 65535, f = Math.floor(n / 65536), y = n - f * 65536, n = _ + f + 65535, f = Math.floor(n / 65536), _ = n - f * 65536, n = O + f + 65535, f = Math.floor(n / 65536), O = n - f * 65536, n = M + f + 65535, f = Math.floor(n / 65536), M = n - f * 65536, n = $ + f + 65535, f = Math.floor(n / 65536), $ = n - f * 65536, n = N + f + 65535, f = Math.floor(n / 65536), N = n - f * 65536, n = ce + f + 65535, f = Math.floor(n / 65536), ce = n - f * 65536, n = F + f + 65535, f = Math.floor(n / 65536), F = n - f * 65536, n = G + f + 65535, f = Math.floor(n / 65536), G = n - f * 65536, n = H + f + 65535, f = Math.floor(n / 65536), H = n - f * 65536, n = X + f + 65535, f = Math.floor(n / 65536), X = n - f * 65536, n = W + f + 65535, f = Math.floor(n / 65536), W = n - f * 65536, n = V + f + 65535, f = Math.floor(n / 65536), V = n - f * 65536, n = Y + f + 65535, f = Math.floor(n / 65536), Y = n - f * 65536, n = J + f + 65535, f = Math.floor(n / 65536), J = n - f * 65536, n = K + f + 65535, f = Math.floor(n / 65536), K = n - f * 65536, y += f - 1 + 37 * (f - 1), s[0] = y, s[1] = _, s[2] = O, s[3] = M, s[4] = $, s[5] = N, s[6] = ce, s[7] = F, s[8] = G, s[9] = H, s[10] = X, s[11] = W, s[12] = V, s[13] = Y, s[14] = J, s[15] = K;
2675
+ function se(s, c, o) {
2676
+ var n, f, y = 0, _ = 0, O = 0, I = 0, $ = 0, N = 0, ce = 0, F = 0, G = 0, H = 0, X = 0, W = 0, V = 0, Y = 0, J = 0, K = 0, q = 0, k = 0, B = 0, D = 0, T = 0, v = 0, E = 0, C = 0, S = 0, A = 0, M = 0, z = 0, Z = 0, ee = 0, Q = 0, h = o[0], ne = o[1], fe = o[2], ue = o[3], te = o[4], oe = o[5], ae = o[6], ve = o[7], de = o[8], _e = o[9], ge = o[10], me = o[11], pe = o[12], Ae = o[13], Ce = o[14], Me = o[15];
2677
+ n = c[0], y += n * h, _ += n * ne, O += n * fe, I += n * ue, $ += n * te, N += n * oe, ce += n * ae, F += n * ve, G += n * de, H += n * _e, X += n * ge, W += n * me, V += n * pe, Y += n * Ae, J += n * Ce, K += n * Me, n = c[1], _ += n * h, O += n * ne, I += n * fe, $ += n * ue, N += n * te, ce += n * oe, F += n * ae, G += n * ve, H += n * de, X += n * _e, W += n * ge, V += n * me, Y += n * pe, J += n * Ae, K += n * Ce, q += n * Me, n = c[2], O += n * h, I += n * ne, $ += n * fe, N += n * ue, ce += n * te, F += n * oe, G += n * ae, H += n * ve, X += n * de, W += n * _e, V += n * ge, Y += n * me, J += n * pe, K += n * Ae, q += n * Ce, k += n * Me, n = c[3], I += n * h, $ += n * ne, N += n * fe, ce += n * ue, F += n * te, G += n * oe, H += n * ae, X += n * ve, W += n * de, V += n * _e, Y += n * ge, J += n * me, K += n * pe, q += n * Ae, k += n * Ce, B += n * Me, n = c[4], $ += n * h, N += n * ne, ce += n * fe, F += n * ue, G += n * te, H += n * oe, X += n * ae, W += n * ve, V += n * de, Y += n * _e, J += n * ge, K += n * me, q += n * pe, k += n * Ae, B += n * Ce, D += n * Me, n = c[5], N += n * h, ce += n * ne, F += n * fe, G += n * ue, H += n * te, X += n * oe, W += n * ae, V += n * ve, Y += n * de, J += n * _e, K += n * ge, q += n * me, k += n * pe, B += n * Ae, D += n * Ce, T += n * Me, n = c[6], ce += n * h, F += n * ne, G += n * fe, H += n * ue, X += n * te, W += n * oe, V += n * ae, Y += n * ve, J += n * de, K += n * _e, q += n * ge, k += n * me, B += n * pe, D += n * Ae, T += n * Ce, v += n * Me, n = c[7], F += n * h, G += n * ne, H += n * fe, X += n * ue, W += n * te, V += n * oe, Y += n * ae, J += n * ve, K += n * de, q += n * _e, k += n * ge, B += n * me, D += n * pe, T += n * Ae, v += n * Ce, E += n * Me, n = c[8], G += n * h, H += n * ne, X += n * fe, W += n * ue, V += n * te, Y += n * oe, J += n * ae, K += n * ve, q += n * de, k += n * _e, B += n * ge, D += n * me, T += n * pe, v += n * Ae, E += n * Ce, C += n * Me, n = c[9], H += n * h, X += n * ne, W += n * fe, V += n * ue, Y += n * te, J += n * oe, K += n * ae, q += n * ve, k += n * de, B += n * _e, D += n * ge, T += n * me, v += n * pe, E += n * Ae, C += n * Ce, S += n * Me, n = c[10], X += n * h, W += n * ne, V += n * fe, Y += n * ue, J += n * te, K += n * oe, q += n * ae, k += n * ve, B += n * de, D += n * _e, T += n * ge, v += n * me, E += n * pe, C += n * Ae, S += n * Ce, A += n * Me, n = c[11], W += n * h, V += n * ne, Y += n * fe, J += n * ue, K += n * te, q += n * oe, k += n * ae, B += n * ve, D += n * de, T += n * _e, v += n * ge, E += n * me, C += n * pe, S += n * Ae, A += n * Ce, M += n * Me, n = c[12], V += n * h, Y += n * ne, J += n * fe, K += n * ue, q += n * te, k += n * oe, B += n * ae, D += n * ve, T += n * de, v += n * _e, E += n * ge, C += n * me, S += n * pe, A += n * Ae, M += n * Ce, z += n * Me, n = c[13], Y += n * h, J += n * ne, K += n * fe, q += n * ue, k += n * te, B += n * oe, D += n * ae, T += n * ve, v += n * de, E += n * _e, C += n * ge, S += n * me, A += n * pe, M += n * Ae, z += n * Ce, Z += n * Me, n = c[14], J += n * h, K += n * ne, q += n * fe, k += n * ue, B += n * te, D += n * oe, T += n * ae, v += n * ve, E += n * de, C += n * _e, S += n * ge, A += n * me, M += n * pe, z += n * Ae, Z += n * Ce, ee += n * Me, n = c[15], K += n * h, q += n * ne, k += n * fe, B += n * ue, D += n * te, T += n * oe, v += n * ae, E += n * ve, C += n * de, S += n * _e, A += n * ge, M += n * me, z += n * pe, Z += n * Ae, ee += n * Ce, Q += n * Me, y += 38 * q, _ += 38 * k, O += 38 * B, I += 38 * D, $ += 38 * T, N += 38 * v, ce += 38 * E, F += 38 * C, G += 38 * S, H += 38 * A, X += 38 * M, W += 38 * z, V += 38 * Z, Y += 38 * ee, J += 38 * Q, f = 1, n = y + f + 65535, f = Math.floor(n / 65536), y = n - f * 65536, n = _ + f + 65535, f = Math.floor(n / 65536), _ = n - f * 65536, n = O + f + 65535, f = Math.floor(n / 65536), O = n - f * 65536, n = I + f + 65535, f = Math.floor(n / 65536), I = n - f * 65536, n = $ + f + 65535, f = Math.floor(n / 65536), $ = n - f * 65536, n = N + f + 65535, f = Math.floor(n / 65536), N = n - f * 65536, n = ce + f + 65535, f = Math.floor(n / 65536), ce = n - f * 65536, n = F + f + 65535, f = Math.floor(n / 65536), F = n - f * 65536, n = G + f + 65535, f = Math.floor(n / 65536), G = n - f * 65536, n = H + f + 65535, f = Math.floor(n / 65536), H = n - f * 65536, n = X + f + 65535, f = Math.floor(n / 65536), X = n - f * 65536, n = W + f + 65535, f = Math.floor(n / 65536), W = n - f * 65536, n = V + f + 65535, f = Math.floor(n / 65536), V = n - f * 65536, n = Y + f + 65535, f = Math.floor(n / 65536), Y = n - f * 65536, n = J + f + 65535, f = Math.floor(n / 65536), J = n - f * 65536, n = K + f + 65535, f = Math.floor(n / 65536), K = n - f * 65536, y += f - 1 + 37 * (f - 1), f = 1, n = y + f + 65535, f = Math.floor(n / 65536), y = n - f * 65536, n = _ + f + 65535, f = Math.floor(n / 65536), _ = n - f * 65536, n = O + f + 65535, f = Math.floor(n / 65536), O = n - f * 65536, n = I + f + 65535, f = Math.floor(n / 65536), I = n - f * 65536, n = $ + f + 65535, f = Math.floor(n / 65536), $ = n - f * 65536, n = N + f + 65535, f = Math.floor(n / 65536), N = n - f * 65536, n = ce + f + 65535, f = Math.floor(n / 65536), ce = n - f * 65536, n = F + f + 65535, f = Math.floor(n / 65536), F = n - f * 65536, n = G + f + 65535, f = Math.floor(n / 65536), G = n - f * 65536, n = H + f + 65535, f = Math.floor(n / 65536), H = n - f * 65536, n = X + f + 65535, f = Math.floor(n / 65536), X = n - f * 65536, n = W + f + 65535, f = Math.floor(n / 65536), W = n - f * 65536, n = V + f + 65535, f = Math.floor(n / 65536), V = n - f * 65536, n = Y + f + 65535, f = Math.floor(n / 65536), Y = n - f * 65536, n = J + f + 65535, f = Math.floor(n / 65536), J = n - f * 65536, n = K + f + 65535, f = Math.floor(n / 65536), K = n - f * 65536, y += f - 1 + 37 * (f - 1), s[0] = y, s[1] = _, s[2] = O, s[3] = I, s[4] = $, s[5] = N, s[6] = ce, s[7] = F, s[8] = G, s[9] = H, s[10] = X, s[11] = W, s[12] = V, s[13] = Y, s[14] = J, s[15] = K;
2678
2678
  }
2679
- function Fe(s, o) {
2680
- se(s, o, o);
2679
+ function Fe(s, c) {
2680
+ se(s, c, c);
2681
2681
  }
2682
- function Hr(s, o) {
2683
- var a = r(), n;
2682
+ function Hr(s, c) {
2683
+ var o = r(), n;
2684
2684
  for (n = 0; n < 16; n++)
2685
- a[n] = o[n];
2685
+ o[n] = c[n];
2686
2686
  for (n = 253; n >= 0; n--)
2687
- Fe(a, a), n !== 2 && n !== 4 && se(a, a, o);
2687
+ Fe(o, o), n !== 2 && n !== 4 && se(o, o, c);
2688
2688
  for (n = 0; n < 16; n++)
2689
- s[n] = a[n];
2689
+ s[n] = o[n];
2690
2690
  }
2691
- function Vr(s, o) {
2692
- var a = r(), n;
2691
+ function Vr(s, c) {
2692
+ var o = r(), n;
2693
2693
  for (n = 0; n < 16; n++)
2694
- a[n] = o[n];
2694
+ o[n] = c[n];
2695
2695
  for (n = 250; n >= 0; n--)
2696
- Fe(a, a), n !== 1 && se(a, a, o);
2696
+ Fe(o, o), n !== 1 && se(o, o, c);
2697
2697
  for (n = 0; n < 16; n++)
2698
- s[n] = a[n];
2698
+ s[n] = o[n];
2699
2699
  }
2700
- function Dt(s, o, a) {
2701
- var n = new Uint8Array(32), f = new Float64Array(80), y, _, O = r(), M = r(), $ = r(), N = r(), ce = r(), F = r();
2700
+ function Dt(s, c, o) {
2701
+ var n = new Uint8Array(32), f = new Float64Array(80), y, _, O = r(), I = r(), $ = r(), N = r(), ce = r(), F = r();
2702
2702
  for (_ = 0; _ < 31; _++)
2703
- n[_] = o[_];
2704
- for (n[31] = o[31] & 127 | 64, n[0] &= 248, ur(f, a), _ = 0; _ < 16; _++)
2705
- M[_] = f[_], N[_] = O[_] = $[_] = 0;
2703
+ n[_] = c[_];
2704
+ for (n[31] = c[31] & 127 | 64, n[0] &= 248, ur(f, o), _ = 0; _ < 16; _++)
2705
+ I[_] = f[_], N[_] = O[_] = $[_] = 0;
2706
2706
  for (O[0] = N[0] = 1, _ = 254; _ >= 0; --_)
2707
- y = n[_ >>> 3] >>> (_ & 7) & 1, Ne(O, M, y), Ne($, N, y), Ke(ce, O, $), Be(O, O, $), Ke($, M, N), Be(M, M, N), Fe(N, ce), Fe(F, O), se(O, $, O), se($, M, ce), Ke(ce, O, $), Be(O, O, $), Fe(M, O), Be($, N, F), se(O, $, P), Ke(O, O, N), se($, $, O), se(O, N, F), se(N, M, f), Fe(M, ce), Ne(O, M, y), Ne($, N, y);
2707
+ y = n[_ >>> 3] >>> (_ & 7) & 1, Ne(O, I, y), Ne($, N, y), Ke(ce, O, $), Be(O, O, $), Ke($, I, N), Be(I, I, N), Fe(N, ce), Fe(F, O), se(O, $, O), se($, I, ce), Ke(ce, O, $), Be(O, O, $), Fe(I, O), Be($, N, F), se(O, $, P), Ke(O, O, N), se($, $, O), se(O, N, F), se(N, I, f), Fe(I, ce), Ne(O, I, y), Ne($, N, y);
2708
2708
  for (_ = 0; _ < 16; _++)
2709
- f[_ + 16] = O[_], f[_ + 32] = $[_], f[_ + 48] = M[_], f[_ + 64] = N[_];
2709
+ f[_ + 16] = O[_], f[_ + 32] = $[_], f[_ + 48] = I[_], f[_ + 64] = N[_];
2710
2710
  var G = f.subarray(32), H = f.subarray(16);
2711
2711
  return Hr(G, G), se(H, H, G), Re(s, H), 0;
2712
2712
  }
2713
- function $t(s, o) {
2714
- return Dt(s, o, u);
2713
+ function $t(s, c) {
2714
+ return Dt(s, c, u);
2715
2715
  }
2716
- function Jr(s, o) {
2717
- return i(o, 32), $t(s, o);
2716
+ function Jr(s, c) {
2717
+ return i(c, 32), $t(s, c);
2718
2718
  }
2719
- function qt(s, o, a) {
2719
+ function qt(s, c, o) {
2720
2720
  var n = new Uint8Array(32);
2721
- return Dt(n, a, o), he(s, c, n, le);
2721
+ return Dt(n, o, c), he(s, a, n, le);
2722
2722
  }
2723
- var Yr = Pe, ai = qe;
2724
- function oi(s, o, a, n, f, y) {
2723
+ var Yr = Pe, oi = qe;
2724
+ function ai(s, c, o, n, f, y) {
2725
2725
  var _ = new Uint8Array(32);
2726
- return qt(_, f, y), Yr(s, o, a, n, _);
2726
+ return qt(_, f, y), Yr(s, c, o, n, _);
2727
2727
  }
2728
- function ci(s, o, a, n, f, y) {
2728
+ function ci(s, c, o, n, f, y) {
2729
2729
  var _ = new Uint8Array(32);
2730
- return qt(_, f, y), ai(s, o, a, n, _);
2730
+ return qt(_, f, y), oi(s, c, o, n, _);
2731
2731
  }
2732
2732
  var Wr = [
2733
2733
  1116352408,
@@ -2891,122 +2891,122 @@ const is = {}, ss = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
2891
2891
  1816402316,
2892
2892
  1246189591
2893
2893
  ];
2894
- function Xr(s, o, a, n) {
2895
- for (var f = new Int32Array(16), y = new Int32Array(16), _, O, M, $, N, ce, F, G, H, X, W, V, Y, J, K, q, k, B, D, T, v, E, C, S, A, I, z = s[0], Z = s[1], ee = s[2], Q = s[3], h = s[4], ne = s[5], fe = s[6], ue = s[7], te = o[0], ae = o[1], oe = o[2], ve = o[3], de = o[4], _e = o[5], ge = o[6], me = o[7], pe = 0; n >= 128; ) {
2894
+ function Xr(s, c, o, n) {
2895
+ for (var f = new Int32Array(16), y = new Int32Array(16), _, O, I, $, N, ce, F, G, H, X, W, V, Y, J, K, q, k, B, D, T, v, E, C, S, A, M, z = s[0], Z = s[1], ee = s[2], Q = s[3], h = s[4], ne = s[5], fe = s[6], ue = s[7], te = c[0], oe = c[1], ae = c[2], ve = c[3], de = c[4], _e = c[5], ge = c[6], me = c[7], pe = 0; n >= 128; ) {
2896
2896
  for (D = 0; D < 16; D++)
2897
- T = 8 * D + pe, f[D] = a[T + 0] << 24 | a[T + 1] << 16 | a[T + 2] << 8 | a[T + 3], y[D] = a[T + 4] << 24 | a[T + 5] << 16 | a[T + 6] << 8 | a[T + 7];
2897
+ T = 8 * D + pe, f[D] = o[T + 0] << 24 | o[T + 1] << 16 | o[T + 2] << 8 | o[T + 3], y[D] = o[T + 4] << 24 | o[T + 5] << 16 | o[T + 6] << 8 | o[T + 7];
2898
2898
  for (D = 0; D < 80; D++)
2899
- if (_ = z, O = Z, M = ee, $ = Q, N = h, ce = ne, F = fe, G = ue, H = te, X = ae, W = oe, V = ve, Y = de, J = _e, K = ge, q = me, v = ue, E = me, C = E & 65535, S = E >>> 16, A = v & 65535, I = v >>> 16, v = (h >>> 14 | de << 18) ^ (h >>> 18 | de << 14) ^ (de >>> 9 | h << 23), E = (de >>> 14 | h << 18) ^ (de >>> 18 | h << 14) ^ (h >>> 9 | de << 23), C += E & 65535, S += E >>> 16, A += v & 65535, I += v >>> 16, v = h & ne ^ ~h & fe, E = de & _e ^ ~de & ge, C += E & 65535, S += E >>> 16, A += v & 65535, I += v >>> 16, v = Wr[D * 2], E = Wr[D * 2 + 1], C += E & 65535, S += E >>> 16, A += v & 65535, I += v >>> 16, v = f[D % 16], E = y[D % 16], C += E & 65535, S += E >>> 16, A += v & 65535, I += v >>> 16, S += C >>> 16, A += S >>> 16, I += A >>> 16, k = A & 65535 | I << 16, B = C & 65535 | S << 16, v = k, E = B, C = E & 65535, S = E >>> 16, A = v & 65535, I = v >>> 16, v = (z >>> 28 | te << 4) ^ (te >>> 2 | z << 30) ^ (te >>> 7 | z << 25), E = (te >>> 28 | z << 4) ^ (z >>> 2 | te << 30) ^ (z >>> 7 | te << 25), C += E & 65535, S += E >>> 16, A += v & 65535, I += v >>> 16, v = z & Z ^ z & ee ^ Z & ee, E = te & ae ^ te & oe ^ ae & oe, C += E & 65535, S += E >>> 16, A += v & 65535, I += v >>> 16, S += C >>> 16, A += S >>> 16, I += A >>> 16, G = A & 65535 | I << 16, q = C & 65535 | S << 16, v = $, E = V, C = E & 65535, S = E >>> 16, A = v & 65535, I = v >>> 16, v = k, E = B, C += E & 65535, S += E >>> 16, A += v & 65535, I += v >>> 16, S += C >>> 16, A += S >>> 16, I += A >>> 16, $ = A & 65535 | I << 16, V = C & 65535 | S << 16, Z = _, ee = O, Q = M, h = $, ne = N, fe = ce, ue = F, z = G, ae = H, oe = X, ve = W, de = V, _e = Y, ge = J, me = K, te = q, D % 16 === 15)
2899
+ if (_ = z, O = Z, I = ee, $ = Q, N = h, ce = ne, F = fe, G = ue, H = te, X = oe, W = ae, V = ve, Y = de, J = _e, K = ge, q = me, v = ue, E = me, C = E & 65535, S = E >>> 16, A = v & 65535, M = v >>> 16, v = (h >>> 14 | de << 18) ^ (h >>> 18 | de << 14) ^ (de >>> 9 | h << 23), E = (de >>> 14 | h << 18) ^ (de >>> 18 | h << 14) ^ (h >>> 9 | de << 23), C += E & 65535, S += E >>> 16, A += v & 65535, M += v >>> 16, v = h & ne ^ ~h & fe, E = de & _e ^ ~de & ge, C += E & 65535, S += E >>> 16, A += v & 65535, M += v >>> 16, v = Wr[D * 2], E = Wr[D * 2 + 1], C += E & 65535, S += E >>> 16, A += v & 65535, M += v >>> 16, v = f[D % 16], E = y[D % 16], C += E & 65535, S += E >>> 16, A += v & 65535, M += v >>> 16, S += C >>> 16, A += S >>> 16, M += A >>> 16, k = A & 65535 | M << 16, B = C & 65535 | S << 16, v = k, E = B, C = E & 65535, S = E >>> 16, A = v & 65535, M = v >>> 16, v = (z >>> 28 | te << 4) ^ (te >>> 2 | z << 30) ^ (te >>> 7 | z << 25), E = (te >>> 28 | z << 4) ^ (z >>> 2 | te << 30) ^ (z >>> 7 | te << 25), C += E & 65535, S += E >>> 16, A += v & 65535, M += v >>> 16, v = z & Z ^ z & ee ^ Z & ee, E = te & oe ^ te & ae ^ oe & ae, C += E & 65535, S += E >>> 16, A += v & 65535, M += v >>> 16, S += C >>> 16, A += S >>> 16, M += A >>> 16, G = A & 65535 | M << 16, q = C & 65535 | S << 16, v = $, E = V, C = E & 65535, S = E >>> 16, A = v & 65535, M = v >>> 16, v = k, E = B, C += E & 65535, S += E >>> 16, A += v & 65535, M += v >>> 16, S += C >>> 16, A += S >>> 16, M += A >>> 16, $ = A & 65535 | M << 16, V = C & 65535 | S << 16, Z = _, ee = O, Q = I, h = $, ne = N, fe = ce, ue = F, z = G, oe = H, ae = X, ve = W, de = V, _e = Y, ge = J, me = K, te = q, D % 16 === 15)
2900
2900
  for (T = 0; T < 16; T++)
2901
- v = f[T], E = y[T], C = E & 65535, S = E >>> 16, A = v & 65535, I = v >>> 16, v = f[(T + 9) % 16], E = y[(T + 9) % 16], C += E & 65535, S += E >>> 16, A += v & 65535, I += v >>> 16, k = f[(T + 1) % 16], B = y[(T + 1) % 16], v = (k >>> 1 | B << 31) ^ (k >>> 8 | B << 24) ^ k >>> 7, E = (B >>> 1 | k << 31) ^ (B >>> 8 | k << 24) ^ (B >>> 7 | k << 25), C += E & 65535, S += E >>> 16, A += v & 65535, I += v >>> 16, k = f[(T + 14) % 16], B = y[(T + 14) % 16], v = (k >>> 19 | B << 13) ^ (B >>> 29 | k << 3) ^ k >>> 6, E = (B >>> 19 | k << 13) ^ (k >>> 29 | B << 3) ^ (B >>> 6 | k << 26), C += E & 65535, S += E >>> 16, A += v & 65535, I += v >>> 16, S += C >>> 16, A += S >>> 16, I += A >>> 16, f[T] = A & 65535 | I << 16, y[T] = C & 65535 | S << 16;
2902
- v = z, E = te, C = E & 65535, S = E >>> 16, A = v & 65535, I = v >>> 16, v = s[0], E = o[0], C += E & 65535, S += E >>> 16, A += v & 65535, I += v >>> 16, S += C >>> 16, A += S >>> 16, I += A >>> 16, s[0] = z = A & 65535 | I << 16, o[0] = te = C & 65535 | S << 16, v = Z, E = ae, C = E & 65535, S = E >>> 16, A = v & 65535, I = v >>> 16, v = s[1], E = o[1], C += E & 65535, S += E >>> 16, A += v & 65535, I += v >>> 16, S += C >>> 16, A += S >>> 16, I += A >>> 16, s[1] = Z = A & 65535 | I << 16, o[1] = ae = C & 65535 | S << 16, v = ee, E = oe, C = E & 65535, S = E >>> 16, A = v & 65535, I = v >>> 16, v = s[2], E = o[2], C += E & 65535, S += E >>> 16, A += v & 65535, I += v >>> 16, S += C >>> 16, A += S >>> 16, I += A >>> 16, s[2] = ee = A & 65535 | I << 16, o[2] = oe = C & 65535 | S << 16, v = Q, E = ve, C = E & 65535, S = E >>> 16, A = v & 65535, I = v >>> 16, v = s[3], E = o[3], C += E & 65535, S += E >>> 16, A += v & 65535, I += v >>> 16, S += C >>> 16, A += S >>> 16, I += A >>> 16, s[3] = Q = A & 65535 | I << 16, o[3] = ve = C & 65535 | S << 16, v = h, E = de, C = E & 65535, S = E >>> 16, A = v & 65535, I = v >>> 16, v = s[4], E = o[4], C += E & 65535, S += E >>> 16, A += v & 65535, I += v >>> 16, S += C >>> 16, A += S >>> 16, I += A >>> 16, s[4] = h = A & 65535 | I << 16, o[4] = de = C & 65535 | S << 16, v = ne, E = _e, C = E & 65535, S = E >>> 16, A = v & 65535, I = v >>> 16, v = s[5], E = o[5], C += E & 65535, S += E >>> 16, A += v & 65535, I += v >>> 16, S += C >>> 16, A += S >>> 16, I += A >>> 16, s[5] = ne = A & 65535 | I << 16, o[5] = _e = C & 65535 | S << 16, v = fe, E = ge, C = E & 65535, S = E >>> 16, A = v & 65535, I = v >>> 16, v = s[6], E = o[6], C += E & 65535, S += E >>> 16, A += v & 65535, I += v >>> 16, S += C >>> 16, A += S >>> 16, I += A >>> 16, s[6] = fe = A & 65535 | I << 16, o[6] = ge = C & 65535 | S << 16, v = ue, E = me, C = E & 65535, S = E >>> 16, A = v & 65535, I = v >>> 16, v = s[7], E = o[7], C += E & 65535, S += E >>> 16, A += v & 65535, I += v >>> 16, S += C >>> 16, A += S >>> 16, I += A >>> 16, s[7] = ue = A & 65535 | I << 16, o[7] = me = C & 65535 | S << 16, pe += 128, n -= 128;
2901
+ v = f[T], E = y[T], C = E & 65535, S = E >>> 16, A = v & 65535, M = v >>> 16, v = f[(T + 9) % 16], E = y[(T + 9) % 16], C += E & 65535, S += E >>> 16, A += v & 65535, M += v >>> 16, k = f[(T + 1) % 16], B = y[(T + 1) % 16], v = (k >>> 1 | B << 31) ^ (k >>> 8 | B << 24) ^ k >>> 7, E = (B >>> 1 | k << 31) ^ (B >>> 8 | k << 24) ^ (B >>> 7 | k << 25), C += E & 65535, S += E >>> 16, A += v & 65535, M += v >>> 16, k = f[(T + 14) % 16], B = y[(T + 14) % 16], v = (k >>> 19 | B << 13) ^ (B >>> 29 | k << 3) ^ k >>> 6, E = (B >>> 19 | k << 13) ^ (k >>> 29 | B << 3) ^ (B >>> 6 | k << 26), C += E & 65535, S += E >>> 16, A += v & 65535, M += v >>> 16, S += C >>> 16, A += S >>> 16, M += A >>> 16, f[T] = A & 65535 | M << 16, y[T] = C & 65535 | S << 16;
2902
+ v = z, E = te, C = E & 65535, S = E >>> 16, A = v & 65535, M = v >>> 16, v = s[0], E = c[0], C += E & 65535, S += E >>> 16, A += v & 65535, M += v >>> 16, S += C >>> 16, A += S >>> 16, M += A >>> 16, s[0] = z = A & 65535 | M << 16, c[0] = te = C & 65535 | S << 16, v = Z, E = oe, C = E & 65535, S = E >>> 16, A = v & 65535, M = v >>> 16, v = s[1], E = c[1], C += E & 65535, S += E >>> 16, A += v & 65535, M += v >>> 16, S += C >>> 16, A += S >>> 16, M += A >>> 16, s[1] = Z = A & 65535 | M << 16, c[1] = oe = C & 65535 | S << 16, v = ee, E = ae, C = E & 65535, S = E >>> 16, A = v & 65535, M = v >>> 16, v = s[2], E = c[2], C += E & 65535, S += E >>> 16, A += v & 65535, M += v >>> 16, S += C >>> 16, A += S >>> 16, M += A >>> 16, s[2] = ee = A & 65535 | M << 16, c[2] = ae = C & 65535 | S << 16, v = Q, E = ve, C = E & 65535, S = E >>> 16, A = v & 65535, M = v >>> 16, v = s[3], E = c[3], C += E & 65535, S += E >>> 16, A += v & 65535, M += v >>> 16, S += C >>> 16, A += S >>> 16, M += A >>> 16, s[3] = Q = A & 65535 | M << 16, c[3] = ve = C & 65535 | S << 16, v = h, E = de, C = E & 65535, S = E >>> 16, A = v & 65535, M = v >>> 16, v = s[4], E = c[4], C += E & 65535, S += E >>> 16, A += v & 65535, M += v >>> 16, S += C >>> 16, A += S >>> 16, M += A >>> 16, s[4] = h = A & 65535 | M << 16, c[4] = de = C & 65535 | S << 16, v = ne, E = _e, C = E & 65535, S = E >>> 16, A = v & 65535, M = v >>> 16, v = s[5], E = c[5], C += E & 65535, S += E >>> 16, A += v & 65535, M += v >>> 16, S += C >>> 16, A += S >>> 16, M += A >>> 16, s[5] = ne = A & 65535 | M << 16, c[5] = _e = C & 65535 | S << 16, v = fe, E = ge, C = E & 65535, S = E >>> 16, A = v & 65535, M = v >>> 16, v = s[6], E = c[6], C += E & 65535, S += E >>> 16, A += v & 65535, M += v >>> 16, S += C >>> 16, A += S >>> 16, M += A >>> 16, s[6] = fe = A & 65535 | M << 16, c[6] = ge = C & 65535 | S << 16, v = ue, E = me, C = E & 65535, S = E >>> 16, A = v & 65535, M = v >>> 16, v = s[7], E = c[7], C += E & 65535, S += E >>> 16, A += v & 65535, M += v >>> 16, S += C >>> 16, A += S >>> 16, M += A >>> 16, s[7] = ue = A & 65535 | M << 16, c[7] = me = C & 65535 | S << 16, pe += 128, n -= 128;
2903
2903
  }
2904
2904
  return n;
2905
2905
  }
2906
- function et(s, o, a) {
2907
- var n = new Int32Array(8), f = new Int32Array(8), y = new Uint8Array(256), _, O = a;
2908
- for (n[0] = 1779033703, n[1] = 3144134277, n[2] = 1013904242, n[3] = 2773480762, n[4] = 1359893119, n[5] = 2600822924, n[6] = 528734635, n[7] = 1541459225, f[0] = 4089235720, f[1] = 2227873595, f[2] = 4271175723, f[3] = 1595750129, f[4] = 2917565137, f[5] = 725511199, f[6] = 4215389547, f[7] = 327033209, Xr(n, f, o, a), a %= 128, _ = 0; _ < a; _++)
2909
- y[_] = o[O - a + _];
2910
- for (y[a] = 128, a = 256 - 128 * (a < 112 ? 1 : 0), y[a - 9] = 0, R(y, a - 8, O / 536870912 | 0, O << 3), Xr(n, f, y, a), _ = 0; _ < 8; _++)
2906
+ function et(s, c, o) {
2907
+ var n = new Int32Array(8), f = new Int32Array(8), y = new Uint8Array(256), _, O = o;
2908
+ for (n[0] = 1779033703, n[1] = 3144134277, n[2] = 1013904242, n[3] = 2773480762, n[4] = 1359893119, n[5] = 2600822924, n[6] = 528734635, n[7] = 1541459225, f[0] = 4089235720, f[1] = 2227873595, f[2] = 4271175723, f[3] = 1595750129, f[4] = 2917565137, f[5] = 725511199, f[6] = 4215389547, f[7] = 327033209, Xr(n, f, c, o), o %= 128, _ = 0; _ < o; _++)
2909
+ y[_] = c[O - o + _];
2910
+ for (y[o] = 128, o = 256 - 128 * (o < 112 ? 1 : 0), y[o - 9] = 0, R(y, o - 8, O / 536870912 | 0, O << 3), Xr(n, f, y, o), _ = 0; _ < 8; _++)
2911
2911
  R(s, 8 * _, n[_], f[_]);
2912
2912
  return 0;
2913
2913
  }
2914
- function zt(s, o) {
2915
- var a = r(), n = r(), f = r(), y = r(), _ = r(), O = r(), M = r(), $ = r(), N = r();
2916
- Be(a, s[1], s[0]), Be(N, o[1], o[0]), se(a, a, N), Ke(n, s[0], s[1]), Ke(N, o[0], o[1]), se(n, n, N), se(f, s[3], o[3]), se(f, f, p), se(y, s[2], o[2]), Ke(y, y, y), Be(_, n, a), Be(O, y, f), Ke(M, y, f), Ke($, n, a), se(s[0], _, O), se(s[1], $, M), se(s[2], M, O), se(s[3], _, $);
2914
+ function zt(s, c) {
2915
+ var o = r(), n = r(), f = r(), y = r(), _ = r(), O = r(), I = r(), $ = r(), N = r();
2916
+ Be(o, s[1], s[0]), Be(N, c[1], c[0]), se(o, o, N), Ke(n, s[0], s[1]), Ke(N, c[0], c[1]), se(n, n, N), se(f, s[3], c[3]), se(f, f, p), se(y, s[2], c[2]), Ke(y, y, y), Be(_, n, o), Be(O, y, f), Ke(I, y, f), Ke($, n, o), se(s[0], _, O), se(s[1], $, I), se(s[2], I, O), se(s[3], _, $);
2917
2917
  }
2918
- function Zr(s, o, a) {
2918
+ function Zr(s, c, o) {
2919
2919
  var n;
2920
2920
  for (n = 0; n < 4; n++)
2921
- Ne(s[n], o[n], a);
2921
+ Ne(s[n], c[n], o);
2922
2922
  }
2923
- function hr(s, o) {
2924
- var a = r(), n = r(), f = r();
2925
- Hr(f, o[2]), se(a, o[0], f), se(n, o[1], f), Re(s, n), s[31] ^= Gr(a) << 7;
2923
+ function hr(s, c) {
2924
+ var o = r(), n = r(), f = r();
2925
+ Hr(f, c[2]), se(o, c[0], f), se(n, c[1], f), Re(s, n), s[31] ^= Gr(o) << 7;
2926
2926
  }
2927
- function lr(s, o, a) {
2927
+ function lr(s, c, o) {
2928
2928
  var n, f;
2929
- for (Se(s[0], d), Se(s[1], m), Se(s[2], m), Se(s[3], d), f = 255; f >= 0; --f)
2930
- n = a[f / 8 | 0] >> (f & 7) & 1, Zr(s, o, n), zt(o, s), zt(s, s), Zr(s, o, n);
2929
+ for (Se(s[0], l), Se(s[1], m), Se(s[2], m), Se(s[3], l), f = 255; f >= 0; --f)
2930
+ n = o[f / 8 | 0] >> (f & 7) & 1, Zr(s, c, n), zt(c, s), zt(s, s), Zr(s, c, n);
2931
2931
  }
2932
- function Gt(s, o) {
2933
- var a = [r(), r(), r(), r()];
2934
- Se(a[0], w), Se(a[1], b), Se(a[2], m), se(a[3], w, b), lr(s, a, o);
2932
+ function Gt(s, c) {
2933
+ var o = [r(), r(), r(), r()];
2934
+ Se(o[0], w), Se(o[1], b), Se(o[2], m), se(o[3], w, b), lr(s, o, c);
2935
2935
  }
2936
- function dr(s, o, a) {
2936
+ function dr(s, c, o) {
2937
2937
  var n = new Uint8Array(64), f = [r(), r(), r(), r()], y;
2938
- for (a || i(o, 32), et(n, o, 32), n[0] &= 248, n[31] &= 127, n[31] |= 64, Gt(f, n), hr(s, f), y = 0; y < 32; y++)
2939
- o[y + 32] = s[y];
2938
+ for (o || i(c, 32), et(n, c, 32), n[0] &= 248, n[31] &= 127, n[31] |= 64, Gt(f, n), hr(s, f), y = 0; y < 32; y++)
2939
+ c[y + 32] = s[y];
2940
2940
  return 0;
2941
2941
  }
2942
2942
  var Ht = new Float64Array([237, 211, 245, 92, 26, 99, 18, 88, 214, 156, 247, 162, 222, 249, 222, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16]);
2943
- function br(s, o) {
2944
- var a, n, f, y;
2943
+ function br(s, c) {
2944
+ var o, n, f, y;
2945
2945
  for (n = 63; n >= 32; --n) {
2946
- for (a = 0, f = n - 32, y = n - 12; f < y; ++f)
2947
- o[f] += a - 16 * o[n] * Ht[f - (n - 32)], a = Math.floor((o[f] + 128) / 256), o[f] -= a * 256;
2948
- o[f] += a, o[n] = 0;
2946
+ for (o = 0, f = n - 32, y = n - 12; f < y; ++f)
2947
+ c[f] += o - 16 * c[n] * Ht[f - (n - 32)], o = Math.floor((c[f] + 128) / 256), c[f] -= o * 256;
2948
+ c[f] += o, c[n] = 0;
2949
2949
  }
2950
- for (a = 0, f = 0; f < 32; f++)
2951
- o[f] += a - (o[31] >> 4) * Ht[f], a = o[f] >> 8, o[f] &= 255;
2950
+ for (o = 0, f = 0; f < 32; f++)
2951
+ c[f] += o - (c[31] >> 4) * Ht[f], o = c[f] >> 8, c[f] &= 255;
2952
2952
  for (f = 0; f < 32; f++)
2953
- o[f] -= a * Ht[f];
2953
+ c[f] -= o * Ht[f];
2954
2954
  for (n = 0; n < 32; n++)
2955
- o[n + 1] += o[n] >> 8, s[n] = o[n] & 255;
2955
+ c[n + 1] += c[n] >> 8, s[n] = c[n] & 255;
2956
2956
  }
2957
2957
  function yr(s) {
2958
- var o = new Float64Array(64), a;
2959
- for (a = 0; a < 64; a++)
2960
- o[a] = s[a];
2961
- for (a = 0; a < 64; a++)
2962
- s[a] = 0;
2963
- br(s, o);
2964
- }
2965
- function Qr(s, o, a, n) {
2966
- var f = new Uint8Array(64), y = new Uint8Array(64), _ = new Uint8Array(64), O, M, $ = new Float64Array(64), N = [r(), r(), r(), r()];
2958
+ var c = new Float64Array(64), o;
2959
+ for (o = 0; o < 64; o++)
2960
+ c[o] = s[o];
2961
+ for (o = 0; o < 64; o++)
2962
+ s[o] = 0;
2963
+ br(s, c);
2964
+ }
2965
+ function Qr(s, c, o, n) {
2966
+ var f = new Uint8Array(64), y = new Uint8Array(64), _ = new Uint8Array(64), O, I, $ = new Float64Array(64), N = [r(), r(), r(), r()];
2967
2967
  et(f, n, 32), f[0] &= 248, f[31] &= 127, f[31] |= 64;
2968
- var ce = a + 64;
2969
- for (O = 0; O < a; O++)
2970
- s[64 + O] = o[O];
2968
+ var ce = o + 64;
2969
+ for (O = 0; O < o; O++)
2970
+ s[64 + O] = c[O];
2971
2971
  for (O = 0; O < 32; O++)
2972
2972
  s[32 + O] = f[32 + O];
2973
- for (et(_, s.subarray(32), a + 32), yr(_), Gt(N, _), hr(s, N), O = 32; O < 64; O++)
2973
+ for (et(_, s.subarray(32), o + 32), yr(_), Gt(N, _), hr(s, N), O = 32; O < 64; O++)
2974
2974
  s[O] = n[O];
2975
- for (et(y, s, a + 64), yr(y), O = 0; O < 64; O++)
2975
+ for (et(y, s, o + 64), yr(y), O = 0; O < 64; O++)
2976
2976
  $[O] = 0;
2977
2977
  for (O = 0; O < 32; O++)
2978
2978
  $[O] = _[O];
2979
2979
  for (O = 0; O < 32; O++)
2980
- for (M = 0; M < 32; M++)
2981
- $[O + M] += y[O] * f[M];
2980
+ for (I = 0; I < 32; I++)
2981
+ $[O + I] += y[O] * f[I];
2982
2982
  return br(s.subarray(32), $), ce;
2983
2983
  }
2984
- function fi(s, o) {
2985
- var a = r(), n = r(), f = r(), y = r(), _ = r(), O = r(), M = r();
2986
- return Se(s[2], m), ur(s[1], o), Fe(f, s[1]), se(y, f, g), Be(f, f, s[2]), Ke(y, s[2], y), Fe(_, y), Fe(O, _), se(M, O, _), se(a, M, f), se(a, a, y), Vr(a, a), se(a, a, f), se(a, a, y), se(a, a, y), se(s[0], a, y), Fe(n, s[0]), se(n, n, y), zr(n, f) && se(s[0], s[0], x), Fe(n, s[0]), se(n, n, y), zr(n, f) ? -1 : (Gr(s[0]) === o[31] >> 7 && Be(s[0], d, s[0]), se(s[3], s[0], s[1]), 0);
2984
+ function fi(s, c) {
2985
+ var o = r(), n = r(), f = r(), y = r(), _ = r(), O = r(), I = r();
2986
+ return Se(s[2], m), ur(s[1], c), Fe(f, s[1]), se(y, f, g), Be(f, f, s[2]), Ke(y, s[2], y), Fe(_, y), Fe(O, _), se(I, O, _), se(o, I, f), se(o, o, y), Vr(o, o), se(o, o, f), se(o, o, y), se(o, o, y), se(s[0], o, y), Fe(n, s[0]), se(n, n, y), zr(n, f) && se(s[0], s[0], x), Fe(n, s[0]), se(n, n, y), zr(n, f) ? -1 : (Gr(s[0]) === c[31] >> 7 && Be(s[0], l, s[0]), se(s[3], s[0], s[1]), 0);
2987
2987
  }
2988
- function _r(s, o, a, n) {
2989
- var f, y = new Uint8Array(32), _ = new Uint8Array(64), O = [r(), r(), r(), r()], M = [r(), r(), r(), r()];
2990
- if (a < 64 || fi(M, n))
2988
+ function _r(s, c, o, n) {
2989
+ var f, y = new Uint8Array(32), _ = new Uint8Array(64), O = [r(), r(), r(), r()], I = [r(), r(), r(), r()];
2990
+ if (o < 64 || fi(I, n))
2991
2991
  return -1;
2992
- for (f = 0; f < a; f++)
2993
- s[f] = o[f];
2992
+ for (f = 0; f < o; f++)
2993
+ s[f] = c[f];
2994
2994
  for (f = 0; f < 32; f++)
2995
2995
  s[f + 32] = n[f];
2996
- if (et(_, s, a), yr(_), lr(O, M, _), Gt(M, o.subarray(32)), zt(O, M), hr(y, O), a -= 64, ie(o, 0, y, 0)) {
2997
- for (f = 0; f < a; f++)
2996
+ if (et(_, s, o), yr(_), lr(O, I, _), Gt(I, c.subarray(32)), zt(O, I), hr(y, O), o -= 64, ie(c, 0, y, 0)) {
2997
+ for (f = 0; f < o; f++)
2998
2998
  s[f] = 0;
2999
2999
  return -1;
3000
3000
  }
3001
- for (f = 0; f < a; f++)
3002
- s[f] = o[f + 64];
3003
- return a;
3001
+ for (f = 0; f < o; f++)
3002
+ s[f] = c[f + 64];
3003
+ return o;
3004
3004
  }
3005
3005
  var gr = 32, Vt = 24, wt = 32, ht = 16, Pt = 32, Jt = 32, St = 32, Ot = 32, mr = 32, en = Vt, ui = wt, hi = ht, Ve = 64, tt = 32, lt = 64, vr = 32, xr = 64;
3006
3006
  e.lowlevel = {
3007
3007
  crypto_core_hsalsa20: he,
3008
3008
  crypto_stream_xor: ct,
3009
- crypto_stream: ot,
3009
+ crypto_stream: at,
3010
3010
  crypto_stream_salsa20_xor: $e,
3011
3011
  crypto_stream_salsa20: Et,
3012
3012
  crypto_onetimeauth: ut,
@@ -3019,7 +3019,7 @@ const is = {}, ss = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
3019
3019
  crypto_scalarmult_base: $t,
3020
3020
  crypto_box_beforenm: qt,
3021
3021
  crypto_box_afternm: Yr,
3022
- crypto_box: oi,
3022
+ crypto_box: ai,
3023
3023
  crypto_box_open: ci,
3024
3024
  crypto_box_keypair: Jr,
3025
3025
  crypto_hash: et,
@@ -3059,16 +3059,16 @@ const is = {}, ss = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
3059
3059
  scalarmult: lr,
3060
3060
  scalarbase: Gt
3061
3061
  };
3062
- function tn(s, o) {
3062
+ function tn(s, c) {
3063
3063
  if (s.length !== gr)
3064
3064
  throw new Error("bad key size");
3065
- if (o.length !== Vt)
3065
+ if (c.length !== Vt)
3066
3066
  throw new Error("bad nonce size");
3067
3067
  }
3068
- function li(s, o) {
3068
+ function li(s, c) {
3069
3069
  if (s.length !== St)
3070
3070
  throw new Error("bad public key size");
3071
- if (o.length !== Ot)
3071
+ if (c.length !== Ot)
3072
3072
  throw new Error("bad secret key size");
3073
3073
  }
3074
3074
  function ke() {
@@ -3077,131 +3077,131 @@ const is = {}, ss = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineP
3077
3077
  throw new TypeError("unexpected type, use Uint8Array");
3078
3078
  }
3079
3079
  function rn(s) {
3080
- for (var o = 0; o < s.length; o++)
3081
- s[o] = 0;
3080
+ for (var c = 0; c < s.length; c++)
3081
+ s[c] = 0;
3082
3082
  }
3083
3083
  e.randomBytes = function(s) {
3084
- var o = new Uint8Array(s);
3085
- return i(o, s), o;
3086
- }, e.secretbox = function(s, o, a) {
3087
- ke(s, o, a), tn(a, o);
3084
+ var c = new Uint8Array(s);
3085
+ return i(c, s), c;
3086
+ }, e.secretbox = function(s, c, o) {
3087
+ ke(s, c, o), tn(o, c);
3088
3088
  for (var n = new Uint8Array(wt + s.length), f = new Uint8Array(n.length), y = 0; y < s.length; y++)
3089
3089
  n[y + wt] = s[y];
3090
- return Pe(f, n, n.length, o, a), f.subarray(ht);
3091
- }, e.secretbox.open = function(s, o, a) {
3092
- ke(s, o, a), tn(a, o);
3090
+ return Pe(f, n, n.length, c, o), f.subarray(ht);
3091
+ }, e.secretbox.open = function(s, c, o) {
3092
+ ke(s, c, o), tn(o, c);
3093
3093
  for (var n = new Uint8Array(ht + s.length), f = new Uint8Array(n.length), y = 0; y < s.length; y++)
3094
3094
  n[y + ht] = s[y];
3095
- return n.length < 32 || qe(f, n, n.length, o, a) !== 0 ? null : f.subarray(wt);
3096
- }, e.secretbox.keyLength = gr, e.secretbox.nonceLength = Vt, e.secretbox.overheadLength = ht, e.scalarMult = function(s, o) {
3097
- if (ke(s, o), s.length !== Jt)
3095
+ return n.length < 32 || qe(f, n, n.length, c, o) !== 0 ? null : f.subarray(wt);
3096
+ }, e.secretbox.keyLength = gr, e.secretbox.nonceLength = Vt, e.secretbox.overheadLength = ht, e.scalarMult = function(s, c) {
3097
+ if (ke(s, c), s.length !== Jt)
3098
3098
  throw new Error("bad n size");
3099
- if (o.length !== Pt)
3099
+ if (c.length !== Pt)
3100
3100
  throw new Error("bad p size");
3101
- var a = new Uint8Array(Pt);
3102
- return Dt(a, s, o), a;
3101
+ var o = new Uint8Array(Pt);
3102
+ return Dt(o, s, c), o;
3103
3103
  }, e.scalarMult.base = function(s) {
3104
3104
  if (ke(s), s.length !== Jt)
3105
3105
  throw new Error("bad n size");
3106
- var o = new Uint8Array(Pt);
3107
- return $t(o, s), o;
3108
- }, e.scalarMult.scalarLength = Jt, e.scalarMult.groupElementLength = Pt, e.box = function(s, o, a, n) {
3109
- var f = e.box.before(a, n);
3110
- return e.secretbox(s, o, f);
3111
- }, e.box.before = function(s, o) {
3112
- ke(s, o), li(s, o);
3113
- var a = new Uint8Array(mr);
3114
- return qt(a, s, o), a;
3115
- }, e.box.after = e.secretbox, e.box.open = function(s, o, a, n) {
3116
- var f = e.box.before(a, n);
3117
- return e.secretbox.open(s, o, f);
3106
+ var c = new Uint8Array(Pt);
3107
+ return $t(c, s), c;
3108
+ }, e.scalarMult.scalarLength = Jt, e.scalarMult.groupElementLength = Pt, e.box = function(s, c, o, n) {
3109
+ var f = e.box.before(o, n);
3110
+ return e.secretbox(s, c, f);
3111
+ }, e.box.before = function(s, c) {
3112
+ ke(s, c), li(s, c);
3113
+ var o = new Uint8Array(mr);
3114
+ return qt(o, s, c), o;
3115
+ }, e.box.after = e.secretbox, e.box.open = function(s, c, o, n) {
3116
+ var f = e.box.before(o, n);
3117
+ return e.secretbox.open(s, c, f);
3118
3118
  }, e.box.open.after = e.secretbox.open, e.box.keyPair = function() {
3119
- var s = new Uint8Array(St), o = new Uint8Array(Ot);
3120
- return Jr(s, o), { publicKey: s, secretKey: o };
3119
+ var s = new Uint8Array(St), c = new Uint8Array(Ot);
3120
+ return Jr(s, c), { publicKey: s, secretKey: c };
3121
3121
  }, e.box.keyPair.fromSecretKey = function(s) {
3122
3122
  if (ke(s), s.length !== Ot)
3123
3123
  throw new Error("bad secret key size");
3124
- var o = new Uint8Array(St);
3125
- return $t(o, s), { publicKey: o, secretKey: new Uint8Array(s) };
3126
- }, e.box.publicKeyLength = St, e.box.secretKeyLength = Ot, e.box.sharedKeyLength = mr, e.box.nonceLength = en, e.box.overheadLength = e.secretbox.overheadLength, e.sign = function(s, o) {
3127
- if (ke(s, o), o.length !== lt)
3124
+ var c = new Uint8Array(St);
3125
+ return $t(c, s), { publicKey: c, secretKey: new Uint8Array(s) };
3126
+ }, e.box.publicKeyLength = St, e.box.secretKeyLength = Ot, e.box.sharedKeyLength = mr, e.box.nonceLength = en, e.box.overheadLength = e.secretbox.overheadLength, e.sign = function(s, c) {
3127
+ if (ke(s, c), c.length !== lt)
3128
3128
  throw new Error("bad secret key size");
3129
- var a = new Uint8Array(Ve + s.length);
3130
- return Qr(a, s, s.length, o), a;
3131
- }, e.sign.open = function(s, o) {
3132
- if (ke(s, o), o.length !== tt)
3129
+ var o = new Uint8Array(Ve + s.length);
3130
+ return Qr(o, s, s.length, c), o;
3131
+ }, e.sign.open = function(s, c) {
3132
+ if (ke(s, c), c.length !== tt)
3133
3133
  throw new Error("bad public key size");
3134
- var a = new Uint8Array(s.length), n = _r(a, s, s.length, o);
3134
+ var o = new Uint8Array(s.length), n = _r(o, s, s.length, c);
3135
3135
  if (n < 0)
3136
3136
  return null;
3137
3137
  for (var f = new Uint8Array(n), y = 0; y < f.length; y++)
3138
- f[y] = a[y];
3138
+ f[y] = o[y];
3139
3139
  return f;
3140
- }, e.sign.detached = function(s, o) {
3141
- for (var a = e.sign(s, o), n = new Uint8Array(Ve), f = 0; f < n.length; f++)
3142
- n[f] = a[f];
3140
+ }, e.sign.detached = function(s, c) {
3141
+ for (var o = e.sign(s, c), n = new Uint8Array(Ve), f = 0; f < n.length; f++)
3142
+ n[f] = o[f];
3143
3143
  return n;
3144
- }, e.sign.detached.verify = function(s, o, a) {
3145
- if (ke(s, o, a), o.length !== Ve)
3144
+ }, e.sign.detached.verify = function(s, c, o) {
3145
+ if (ke(s, c, o), c.length !== Ve)
3146
3146
  throw new Error("bad signature size");
3147
- if (a.length !== tt)
3147
+ if (o.length !== tt)
3148
3148
  throw new Error("bad public key size");
3149
3149
  var n = new Uint8Array(Ve + s.length), f = new Uint8Array(Ve + s.length), y;
3150
3150
  for (y = 0; y < Ve; y++)
3151
- n[y] = o[y];
3151
+ n[y] = c[y];
3152
3152
  for (y = 0; y < s.length; y++)
3153
3153
  n[y + Ve] = s[y];
3154
- return _r(f, n, n.length, a) >= 0;
3154
+ return _r(f, n, n.length, o) >= 0;
3155
3155
  }, e.sign.keyPair = function() {
3156
- var s = new Uint8Array(tt), o = new Uint8Array(lt);
3157
- return dr(s, o), { publicKey: s, secretKey: o };
3156
+ var s = new Uint8Array(tt), c = new Uint8Array(lt);
3157
+ return dr(s, c), { publicKey: s, secretKey: c };
3158
3158
  }, e.sign.keyPair.fromSecretKey = function(s) {
3159
3159
  if (ke(s), s.length !== lt)
3160
3160
  throw new Error("bad secret key size");
3161
- for (var o = new Uint8Array(tt), a = 0; a < o.length; a++)
3162
- o[a] = s[32 + a];
3163
- return { publicKey: o, secretKey: new Uint8Array(s) };
3161
+ for (var c = new Uint8Array(tt), o = 0; o < c.length; o++)
3162
+ c[o] = s[32 + o];
3163
+ return { publicKey: c, secretKey: new Uint8Array(s) };
3164
3164
  }, e.sign.keyPair.fromSeed = function(s) {
3165
3165
  if (ke(s), s.length !== vr)
3166
3166
  throw new Error("bad seed size");
3167
- for (var o = new Uint8Array(tt), a = new Uint8Array(lt), n = 0; n < 32; n++)
3168
- a[n] = s[n];
3169
- return dr(o, a, !0), { publicKey: o, secretKey: a };
3167
+ for (var c = new Uint8Array(tt), o = new Uint8Array(lt), n = 0; n < 32; n++)
3168
+ o[n] = s[n];
3169
+ return dr(c, o, !0), { publicKey: c, secretKey: o };
3170
3170
  }, e.sign.publicKeyLength = tt, e.sign.secretKeyLength = lt, e.sign.seedLength = vr, e.sign.signatureLength = Ve, e.hash = function(s) {
3171
3171
  ke(s);
3172
- var o = new Uint8Array(xr);
3173
- return et(o, s, s.length), o;
3174
- }, e.hash.hashLength = xr, e.verify = function(s, o) {
3175
- return ke(s, o), s.length === 0 || o.length === 0 || s.length !== o.length ? !1 : j(s, 0, o, 0, s.length) === 0;
3172
+ var c = new Uint8Array(xr);
3173
+ return et(c, s, s.length), c;
3174
+ }, e.hash.hashLength = xr, e.verify = function(s, c) {
3175
+ return ke(s, c), s.length === 0 || c.length === 0 || s.length !== c.length ? !1 : j(s, 0, c, 0, s.length) === 0;
3176
3176
  }, e.setPRNG = function(s) {
3177
3177
  i = s;
3178
3178
  }, function() {
3179
3179
  var s = typeof self < "u" ? self.crypto || self.msCrypto : null;
3180
3180
  if (s && s.getRandomValues) {
3181
- var o = 65536;
3182
- e.setPRNG(function(a, n) {
3181
+ var c = 65536;
3182
+ e.setPRNG(function(o, n) {
3183
3183
  var f, y = new Uint8Array(n);
3184
- for (f = 0; f < n; f += o)
3185
- s.getRandomValues(y.subarray(f, f + Math.min(n - f, o)));
3184
+ for (f = 0; f < n; f += c)
3185
+ s.getRandomValues(y.subarray(f, f + Math.min(n - f, c)));
3186
3186
  for (f = 0; f < n; f++)
3187
- a[f] = y[f];
3187
+ o[f] = y[f];
3188
3188
  rn(y);
3189
3189
  });
3190
3190
  } else
3191
- typeof ns < "u" && (s = as, s && s.randomBytes && e.setPRNG(function(a, n) {
3191
+ typeof ns < "u" && (s = os, s && s.randomBytes && e.setPRNG(function(o, n) {
3192
3192
  var f, y = s.randomBytes(n);
3193
3193
  for (f = 0; f < n; f++)
3194
- a[f] = y[f];
3194
+ o[f] = y[f];
3195
3195
  rn(y);
3196
3196
  }));
3197
3197
  }();
3198
3198
  })(t.exports ? t.exports : self.nacl = self.nacl || {});
3199
3199
  })(Jn);
3200
- var os = Jn.exports, cs = Ee && Ee.__importDefault || function(t) {
3200
+ var as = Jn.exports, cs = Ee && Ee.__importDefault || function(t) {
3201
3201
  return t && t.__esModule ? t : { default: t };
3202
3202
  };
3203
3203
  Object.defineProperty(vt, "__esModule", { value: !0 });
3204
- const fs = cs(os);
3204
+ const fs = cs(as);
3205
3205
  vt.default = fs.default;
3206
3206
  var yn;
3207
3207
  function us() {
@@ -3212,11 +3212,11 @@ function us() {
3212
3212
  return u && u.__esModule ? u : { default: u };
3213
3213
  };
3214
3214
  Object.defineProperty(At, "__esModule", { value: !0 }), At.KP = void 0;
3215
- const e = ar(), r = _t(), i = t(vt);
3216
- class c {
3217
- constructor(d) {
3218
- l(this, "seed");
3219
- this.seed = d;
3215
+ const e = or(), r = _t(), i = t(vt);
3216
+ class a {
3217
+ constructor(l) {
3218
+ d(this, "seed");
3219
+ this.seed = l;
3220
3220
  }
3221
3221
  getRawSeed() {
3222
3222
  if (!this.seed)
@@ -3231,53 +3231,53 @@ function us() {
3231
3231
  getPublicKey() {
3232
3232
  if (!this.seed)
3233
3233
  throw new r.NKeysError(r.NKeysErrorCode.ClearedPair);
3234
- const d = e.Codec.decodeSeed(this.seed), m = i.default.sign.keyPair.fromSeed(this.getRawSeed()), P = e.Codec.encode(d.prefix, m.publicKey);
3234
+ const l = e.Codec.decodeSeed(this.seed), m = i.default.sign.keyPair.fromSeed(this.getRawSeed()), P = e.Codec.encode(l.prefix, m.publicKey);
3235
3235
  return new TextDecoder().decode(P);
3236
3236
  }
3237
3237
  getPrivateKey() {
3238
3238
  if (!this.seed)
3239
3239
  throw new r.NKeysError(r.NKeysErrorCode.ClearedPair);
3240
- const d = i.default.sign.keyPair.fromSeed(this.getRawSeed());
3241
- return e.Codec.encode(r.Prefix.Private, d.secretKey);
3240
+ const l = i.default.sign.keyPair.fromSeed(this.getRawSeed());
3241
+ return e.Codec.encode(r.Prefix.Private, l.secretKey);
3242
3242
  }
3243
- sign(d) {
3243
+ sign(l) {
3244
3244
  if (!this.seed)
3245
3245
  throw new r.NKeysError(r.NKeysErrorCode.ClearedPair);
3246
3246
  const m = i.default.sign.keyPair.fromSeed(this.getRawSeed());
3247
- return i.default.sign.detached(d, m.secretKey);
3247
+ return i.default.sign.detached(l, m.secretKey);
3248
3248
  }
3249
- verify(d, m) {
3249
+ verify(l, m) {
3250
3250
  if (!this.seed)
3251
3251
  throw new r.NKeysError(r.NKeysErrorCode.ClearedPair);
3252
3252
  const P = i.default.sign.keyPair.fromSeed(this.getRawSeed());
3253
- return i.default.sign.detached.verify(d, m, P.publicKey);
3253
+ return i.default.sign.detached.verify(l, m, P.publicKey);
3254
3254
  }
3255
3255
  clear() {
3256
3256
  this.seed && (this.seed.fill(0), this.seed = void 0);
3257
3257
  }
3258
- seal(d, m, P) {
3258
+ seal(l, m, P) {
3259
3259
  throw new r.NKeysError(r.NKeysErrorCode.InvalidNKeyOperation);
3260
3260
  }
3261
- open(d, m) {
3261
+ open(l, m) {
3262
3262
  throw new r.NKeysError(r.NKeysErrorCode.InvalidNKeyOperation);
3263
3263
  }
3264
3264
  }
3265
- return At.KP = c, At;
3265
+ return At.KP = a, At;
3266
3266
  }
3267
- var It = {}, _n;
3267
+ var Mt = {}, _n;
3268
3268
  function hs() {
3269
3269
  if (_n)
3270
- return It;
3270
+ return Mt;
3271
3271
  _n = 1;
3272
3272
  var t = Ee && Ee.__importDefault || function(u) {
3273
3273
  return u && u.__esModule ? u : { default: u };
3274
3274
  };
3275
- Object.defineProperty(It, "__esModule", { value: !0 }), It.PublicKey = void 0;
3276
- const e = ar(), r = _t(), i = t(vt);
3277
- class c {
3278
- constructor(d) {
3279
- l(this, "publicKey");
3280
- this.publicKey = d;
3275
+ Object.defineProperty(Mt, "__esModule", { value: !0 }), Mt.PublicKey = void 0;
3276
+ const e = or(), r = _t(), i = t(vt);
3277
+ class a {
3278
+ constructor(l) {
3279
+ d(this, "publicKey");
3280
+ this.publicKey = l;
3281
3281
  }
3282
3282
  getPublicKey() {
3283
3283
  if (!this.publicKey)
@@ -3290,26 +3290,26 @@ function hs() {
3290
3290
  getSeed() {
3291
3291
  throw this.publicKey ? new r.NKeysError(r.NKeysErrorCode.PublicKeyOnly) : new r.NKeysError(r.NKeysErrorCode.ClearedPair);
3292
3292
  }
3293
- sign(d) {
3293
+ sign(l) {
3294
3294
  throw this.publicKey ? new r.NKeysError(r.NKeysErrorCode.CannotSign) : new r.NKeysError(r.NKeysErrorCode.ClearedPair);
3295
3295
  }
3296
- verify(d, m) {
3296
+ verify(l, m) {
3297
3297
  if (!this.publicKey)
3298
3298
  throw new r.NKeysError(r.NKeysErrorCode.ClearedPair);
3299
3299
  const P = e.Codec._decode(this.publicKey);
3300
- return i.default.sign.detached.verify(d, m, P.slice(1));
3300
+ return i.default.sign.detached.verify(l, m, P.slice(1));
3301
3301
  }
3302
3302
  clear() {
3303
3303
  this.publicKey && (this.publicKey.fill(0), this.publicKey = void 0);
3304
3304
  }
3305
- seal(d, m, P) {
3305
+ seal(l, m, P) {
3306
3306
  throw new r.NKeysError(r.NKeysErrorCode.InvalidNKeyOperation);
3307
3307
  }
3308
- open(d, m) {
3308
+ open(l, m) {
3309
3309
  throw new r.NKeysError(r.NKeysErrorCode.InvalidNKeyOperation);
3310
3310
  }
3311
3311
  }
3312
- return It.PublicKey = c, It;
3312
+ return Mt.PublicKey = a, Mt;
3313
3313
  }
3314
3314
  var Sr = {}, gn;
3315
3315
  function ls() {
@@ -3318,14 +3318,14 @@ function ls() {
3318
3318
  return w && w.__esModule ? w : { default: w };
3319
3319
  };
3320
3320
  Object.defineProperty(t, "__esModule", { value: !0 }), t.CurveKP = t.curveNonceLen = t.curveKeyLen = void 0;
3321
- const r = _t(), i = e(vt), c = ar(), u = _t(), d = Kt, m = Ft;
3321
+ const r = _t(), i = e(vt), a = or(), u = _t(), l = Kt, m = Ft;
3322
3322
  t.curveKeyLen = 32;
3323
3323
  const P = 35;
3324
3324
  t.curveNonceLen = 24;
3325
3325
  const g = [120, 107, 118, 49];
3326
3326
  class p {
3327
3327
  constructor(b) {
3328
- l(this, "seed");
3328
+ d(this, "seed");
3329
3329
  this.seed = b;
3330
3330
  }
3331
3331
  clear() {
@@ -3334,18 +3334,18 @@ function ls() {
3334
3334
  getPrivateKey() {
3335
3335
  if (!this.seed)
3336
3336
  throw new r.NKeysError(r.NKeysErrorCode.ClearedPair);
3337
- return c.Codec.encode(u.Prefix.Private, this.seed);
3337
+ return a.Codec.encode(u.Prefix.Private, this.seed);
3338
3338
  }
3339
3339
  getPublicKey() {
3340
3340
  if (!this.seed)
3341
3341
  throw new r.NKeysError(r.NKeysErrorCode.ClearedPair);
3342
- const b = i.default.scalarMult.base(this.seed), x = c.Codec.encode(u.Prefix.Curve, b);
3342
+ const b = i.default.scalarMult.base(this.seed), x = a.Codec.encode(u.Prefix.Curve, b);
3343
3343
  return new TextDecoder().decode(x);
3344
3344
  }
3345
3345
  getSeed() {
3346
3346
  if (!this.seed)
3347
3347
  throw new r.NKeysError(r.NKeysErrorCode.ClearedPair);
3348
- return c.Codec.encodeSeed(u.Prefix.Curve, this.seed);
3348
+ return a.Codec.encodeSeed(u.Prefix.Curve, this.seed);
3349
3349
  }
3350
3350
  sign() {
3351
3351
  throw new r.NKeysError(r.NKeysErrorCode.InvalidCurveOperation);
@@ -3355,7 +3355,7 @@ function ls() {
3355
3355
  }
3356
3356
  decodePubCurveKey(b) {
3357
3357
  try {
3358
- const x = d.base32.decode(new TextEncoder().encode(b));
3358
+ const x = l.base32.decode(new TextEncoder().encode(b));
3359
3359
  if (x.byteLength !== P)
3360
3360
  throw new r.NKeysError(r.NKeysErrorCode.InvalidCurveKey);
3361
3361
  if (x[0] !== u.Prefix.Curve)
@@ -3402,29 +3402,29 @@ function _t() {
3402
3402
  var t = Ee && Ee.__importDefault || function(L) {
3403
3403
  return L && L.__esModule ? L : { default: L };
3404
3404
  };
3405
- Object.defineProperty(xe, "__esModule", { value: !0 }), xe.NKeysError = xe.NKeysErrorCode = xe.Prefixes = xe.Prefix = void 0, xe.createPair = d, xe.createOperator = m, xe.createAccount = P, xe.createUser = g, xe.createCluster = p, xe.createServer = w, xe.createCurve = b, xe.fromPublic = x, xe.fromCurveSeed = R, xe.fromSeed = j;
3406
- const e = us(), r = hs(), i = ar(), c = ls(), u = t(vt);
3407
- function d(L) {
3408
- const he = L === U.Curve ? c.curveKeyLen : 32, le = u.default.randomBytes(he), $e = i.Codec.encodeSeed(L, new Uint8Array(le));
3409
- return L === U.Curve ? new c.CurveKP(new Uint8Array(le)) : new e.KP($e);
3405
+ Object.defineProperty(xe, "__esModule", { value: !0 }), xe.NKeysError = xe.NKeysErrorCode = xe.Prefixes = xe.Prefix = void 0, xe.createPair = l, xe.createOperator = m, xe.createAccount = P, xe.createUser = g, xe.createCluster = p, xe.createServer = w, xe.createCurve = b, xe.fromPublic = x, xe.fromCurveSeed = R, xe.fromSeed = j;
3406
+ const e = us(), r = hs(), i = or(), a = ls(), u = t(vt);
3407
+ function l(L) {
3408
+ const he = L === U.Curve ? a.curveKeyLen : 32, le = u.default.randomBytes(he), $e = i.Codec.encodeSeed(L, new Uint8Array(le));
3409
+ return L === U.Curve ? new a.CurveKP(new Uint8Array(le)) : new e.KP($e);
3410
3410
  }
3411
3411
  function m() {
3412
- return d(U.Operator);
3412
+ return l(U.Operator);
3413
3413
  }
3414
3414
  function P() {
3415
- return d(U.Account);
3415
+ return l(U.Account);
3416
3416
  }
3417
3417
  function g() {
3418
- return d(U.User);
3418
+ return l(U.User);
3419
3419
  }
3420
3420
  function p() {
3421
- return d(U.Cluster);
3421
+ return l(U.Cluster);
3422
3422
  }
3423
3423
  function w() {
3424
- return d(U.Server);
3424
+ return l(U.Server);
3425
3425
  }
3426
3426
  function b() {
3427
- return d(U.Curve);
3427
+ return l(U.Curve);
3428
3428
  }
3429
3429
  function x(L) {
3430
3430
  const he = new TextEncoder().encode(L), le = i.Codec._decode(he), $e = ie.parsePrefix(le[0]);
@@ -3436,9 +3436,9 @@ function _t() {
3436
3436
  const he = i.Codec.decodeSeed(L);
3437
3437
  if (he.prefix !== U.Curve)
3438
3438
  throw new Le(ye.InvalidCurveSeed);
3439
- if (he.buf.byteLength !== c.curveKeyLen)
3439
+ if (he.buf.byteLength !== a.curveKeyLen)
3440
3440
  throw new Le(ye.InvalidSeedLen);
3441
- return new c.CurveKP(he.buf);
3441
+ return new a.CurveKP(he.buf);
3442
3442
  }
3443
3443
  function j(L) {
3444
3444
  return i.Codec.decodeSeed(L).prefix === U.Curve ? R(L) : new e.KP(L);
@@ -3489,7 +3489,7 @@ function _t() {
3489
3489
  class Le extends Error {
3490
3490
  constructor(le, $e) {
3491
3491
  super(le, $e);
3492
- l(this, "code");
3492
+ d(this, "code");
3493
3493
  this.code = le;
3494
3494
  }
3495
3495
  }
@@ -3515,15 +3515,15 @@ function ys(t, e) {
3515
3515
  for (let i = 0; i < t.byteLength; i++) {
3516
3516
  i % 8 === 0 && r.push(`
3517
3517
  `);
3518
- let c = t[i].toString(16);
3519
- c.length === 1 && (c = "0" + c), r.push(c);
3518
+ let a = t[i].toString(16);
3519
+ a.length === 1 && (a = "0" + a), r.push(a);
3520
3520
  }
3521
3521
  console.log(r.join(" "));
3522
3522
  }
3523
- var or = {};
3524
- Object.defineProperty(or, "__esModule", { value: !0 });
3525
- or.version = void 0;
3526
- or.version = "2.0.3";
3523
+ var ar = {};
3524
+ Object.defineProperty(ar, "__esModule", { value: !0 });
3525
+ ar.version = void 0;
3526
+ ar.version = "2.0.3";
3527
3527
  (function(t) {
3528
3528
  Object.defineProperty(t, "__esModule", { value: !0 }), t.version = t.encode = t.decode = t.Prefixes = t.Prefix = t.NKeysErrorCode = t.NKeysError = t.fromSeed = t.fromPublic = t.fromCurveSeed = t.createUser = t.createServer = t.createPair = t.createOperator = t.createCurve = t.createCluster = t.createAccount = void 0;
3529
3529
  var e = _t();
@@ -3562,17 +3562,17 @@ or.version = "2.0.3";
3562
3562
  } }), Object.defineProperty(t, "encode", { enumerable: !0, get: function() {
3563
3563
  return r.encode;
3564
3564
  } });
3565
- var i = or;
3565
+ var i = ar;
3566
3566
  Object.defineProperty(t, "version", { enumerable: !0, get: function() {
3567
3567
  return i.version;
3568
3568
  } });
3569
3569
  })(Vn);
3570
3570
  var _s = Ee && Ee.__createBinding || (Object.create ? function(t, e, r, i) {
3571
3571
  i === void 0 && (i = r);
3572
- var c = Object.getOwnPropertyDescriptor(e, r);
3573
- (!c || ("get" in c ? !e.__esModule : c.writable || c.configurable)) && (c = { enumerable: !0, get: function() {
3572
+ var a = Object.getOwnPropertyDescriptor(e, r);
3573
+ (!a || ("get" in a ? !e.__esModule : a.writable || a.configurable)) && (a = { enumerable: !0, get: function() {
3574
3574
  return e[r];
3575
- } }), Object.defineProperty(t, i, c);
3575
+ } }), Object.defineProperty(t, i, a);
3576
3576
  } : function(t, e, r, i) {
3577
3577
  i === void 0 && (i = r), t[i] = e[r];
3578
3578
  }), gs = Ee && Ee.__setModuleDefault || (Object.create ? function(t, e) {
@@ -3583,8 +3583,8 @@ var _s = Ee && Ee.__createBinding || (Object.create ? function(t, e, r, i) {
3583
3583
  var t = function(e) {
3584
3584
  return t = Object.getOwnPropertyNames || function(r) {
3585
3585
  var i = [];
3586
- for (var c in r)
3587
- Object.prototype.hasOwnProperty.call(r, c) && (i[i.length] = c);
3586
+ for (var a in r)
3587
+ Object.prototype.hasOwnProperty.call(r, a) && (i[i.length] = a);
3588
3588
  return i;
3589
3589
  }, t(e);
3590
3590
  };
@@ -3593,8 +3593,8 @@ var _s = Ee && Ee.__createBinding || (Object.create ? function(t, e, r, i) {
3593
3593
  return e;
3594
3594
  var r = {};
3595
3595
  if (e != null)
3596
- for (var i = t(e), c = 0; c < i.length; c++)
3597
- i[c] !== "default" && _s(r, e, i[c]);
3596
+ for (var i = t(e), a = 0; a < i.length; a++)
3597
+ i[a] !== "default" && _s(r, e, i[a]);
3598
3598
  return gs(r, e), r;
3599
3599
  };
3600
3600
  }();
@@ -3614,8 +3614,8 @@ function vs(t) {
3614
3614
  return (e) => {
3615
3615
  let r = {};
3616
3616
  return t.forEach((i) => {
3617
- const c = i(e) || {};
3618
- r = Object.assign(r, c);
3617
+ const a = i(e) || {};
3618
+ r = Object.assign(r, a);
3619
3619
  }), r;
3620
3620
  };
3621
3621
  }
@@ -3634,24 +3634,24 @@ function ps(t) {
3634
3634
  }
3635
3635
  function Yn(t) {
3636
3636
  return (e) => {
3637
- const r = typeof t == "function" ? t() : t, i = r ? vn.nkeys.fromSeed(r) : void 0, c = i ? i.getPublicKey() : "", u = Nr.TE.encode(e || ""), d = i !== void 0 && e ? i.sign(u) : void 0, m = d ? vn.nkeys.encode(d) : "";
3638
- return { nkey: c, sig: m };
3637
+ const r = typeof t == "function" ? t() : t, i = r ? vn.nkeys.fromSeed(r) : void 0, a = i ? i.getPublicKey() : "", u = Nr.TE.encode(e || ""), l = i !== void 0 && e ? i.sign(u) : void 0, m = l ? vn.nkeys.encode(l) : "";
3638
+ return { nkey: a, sig: m };
3639
3639
  };
3640
3640
  }
3641
3641
  function Wn(t, e) {
3642
3642
  return (r) => {
3643
- const i = typeof t == "function" ? t() : t, c = Yn(e), { nkey: u, sig: d } = c(r);
3644
- return { jwt: i, nkey: u, sig: d };
3643
+ const i = typeof t == "function" ? t() : t, a = Yn(e), { nkey: u, sig: l } = a(r);
3644
+ return { jwt: i, nkey: u, sig: l };
3645
3645
  };
3646
3646
  }
3647
3647
  function ws(t) {
3648
3648
  const e = typeof t != "function" ? () => t : t, r = () => {
3649
- const u = /\s*(?:(?:[-]{3,}[^\n]*[-]{3,}\n)(.+)(?:\n\s*[-]{3,}[^\n]*[-]{3,}\n))/ig, d = Nr.TD.decode(e());
3650
- let m = u.exec(d);
3649
+ const u = /\s*(?:(?:[-]{3,}[^\n]*[-]{3,}\n)(.+)(?:\n\s*[-]{3,}[^\n]*[-]{3,}\n))/ig, l = Nr.TD.decode(e());
3650
+ let m = u.exec(l);
3651
3651
  if (!m)
3652
3652
  throw new Error("unable to parse credentials");
3653
3653
  const P = m[1].trim();
3654
- if (m = u.exec(d), !m)
3654
+ if (m = u.exec(l), !m)
3655
3655
  throw new Error("unable to parse credentials");
3656
3656
  const g = Nr.TE.encode(m[1].trim());
3657
3657
  return { jwt: P, seed: g };
@@ -3665,10 +3665,10 @@ function ws(t) {
3665
3665
  });
3666
3666
  }
3667
3667
  (function(t) {
3668
- Object.defineProperty(t, "__esModule", { value: !0 }), t.DEFAULT_RECONNECT_TIME_WAIT = t.DEFAULT_MAX_PING_OUT = t.DEFAULT_PING_INTERVAL = t.DEFAULT_JITTER_TLS = t.DEFAULT_JITTER = t.DEFAULT_MAX_RECONNECT_ATTEMPTS = void 0, t.defaultOptions = d, t.hasWsProtocol = m, t.buildAuthenticator = P, t.parseOptions = g, t.checkOptions = p, t.checkUnsupportedOption = w;
3669
- const e = be, r = st, i = Me, c = He, u = re;
3668
+ Object.defineProperty(t, "__esModule", { value: !0 }), t.DEFAULT_RECONNECT_TIME_WAIT = t.DEFAULT_MAX_PING_OUT = t.DEFAULT_PING_INTERVAL = t.DEFAULT_JITTER_TLS = t.DEFAULT_JITTER = t.DEFAULT_MAX_RECONNECT_ATTEMPTS = void 0, t.defaultOptions = l, t.hasWsProtocol = m, t.buildAuthenticator = P, t.parseOptions = g, t.checkOptions = p, t.checkUnsupportedOption = w;
3669
+ const e = be, r = st, i = Ie, a = He, u = re;
3670
3670
  t.DEFAULT_MAX_RECONNECT_ATTEMPTS = 10, t.DEFAULT_JITTER = 100, t.DEFAULT_JITTER_TLS = 1e3, t.DEFAULT_PING_INTERVAL = 2 * 60 * 1e3, t.DEFAULT_MAX_PING_OUT = 2, t.DEFAULT_RECONNECT_TIME_WAIT = 2 * 1e3;
3671
- function d() {
3671
+ function l() {
3672
3672
  return {
3673
3673
  maxPingOut: t.DEFAULT_MAX_PING_OUT,
3674
3674
  maxReconnectAttempts: t.DEFAULT_MAX_RECONNECT_ATTEMPTS,
@@ -3699,14 +3699,14 @@ function ws(t) {
3699
3699
  }
3700
3700
  function P(b) {
3701
3701
  const x = [];
3702
- return typeof b.authenticator == "function" && x.push(b.authenticator), Array.isArray(b.authenticator) && x.push(...b.authenticator), b.token && x.push((0, c.tokenAuthenticator)(b.token)), b.user && x.push((0, c.usernamePasswordAuthenticator)(b.user, b.pass)), x.length === 0 ? (0, c.noAuthFn)() : (0, c.multiAuthenticator)(x);
3702
+ return typeof b.authenticator == "function" && x.push(b.authenticator), Array.isArray(b.authenticator) && x.push(...b.authenticator), b.token && x.push((0, a.tokenAuthenticator)(b.token)), b.user && x.push((0, a.usernamePasswordAuthenticator)(b.user, b.pass)), x.length === 0 ? (0, a.noAuthFn)() : (0, a.multiAuthenticator)(x);
3703
3703
  }
3704
3704
  function g(b) {
3705
3705
  const x = `${i.DEFAULT_HOST}:${(0, r.defaultPort)()}`;
3706
3706
  if (b = b || { servers: [x] }, b.servers = b.servers || [], typeof b.servers == "string" && (b.servers = [b.servers]), b.servers.length > 0 && b.port)
3707
3707
  throw u.InvalidArgumentError.format(["servers", "port"], "are mutually exclusive");
3708
3708
  b.servers.length === 0 && b.port && (b.servers = [`${i.DEFAULT_HOST}:${b.port}`]), b.servers && b.servers.length === 0 && (b.servers = [x]);
3709
- const R = (0, e.extend)(d(), b);
3709
+ const R = (0, e.extend)(l(), b);
3710
3710
  if (R.authenticator = P(R), ["reconnectDelayHandler", "authenticator"].forEach((j) => {
3711
3711
  if (R[j] && typeof R[j] != "function")
3712
3712
  throw TypeError(`'${j}' must be a function`);
@@ -3732,40 +3732,40 @@ function ws(t) {
3732
3732
  })(Ut);
3733
3733
  Object.defineProperty(je, "__esModule", { value: !0 });
3734
3734
  je.ProtocolHandler = je.Subscriptions = je.SubscriptionImpl = je.Connect = je.INFO = void 0;
3735
- const ze = Ue, rt = st, Ge = be, Ps = at, Ss = We, Os = mt, As = Nt, Cs = Rt, Ze = Lr, Is = kt, xn = sr, Or = Ut, Oe = re, Ms = 1024 * 32;
3735
+ const ze = Ue, rt = st, Ge = be, Ps = ot, Ss = We, Os = mt, As = Nt, Cs = Rt, Ze = Lr, Ms = kt, xn = sr, Or = Ut, Oe = re, Is = 1024 * 32;
3736
3736
  je.INFO = /^INFO\s+([^\r\n]+)\r\n/i;
3737
3737
  const js = (0, ze.encode)(`PONG\r
3738
3738
  `), En = (0, ze.encode)(`PING\r
3739
3739
  `);
3740
3740
  class Xn {
3741
3741
  constructor(e, r, i) {
3742
- l(this, "echo");
3743
- l(this, "no_responders");
3744
- l(this, "protocol");
3745
- l(this, "verbose");
3746
- l(this, "pedantic");
3747
- l(this, "jwt");
3748
- l(this, "nkey");
3749
- l(this, "sig");
3750
- l(this, "user");
3751
- l(this, "pass");
3752
- l(this, "auth_token");
3753
- l(this, "tls_required");
3754
- l(this, "name");
3755
- l(this, "lang");
3756
- l(this, "version");
3757
- l(this, "headers");
3742
+ d(this, "echo");
3743
+ d(this, "no_responders");
3744
+ d(this, "protocol");
3745
+ d(this, "verbose");
3746
+ d(this, "pedantic");
3747
+ d(this, "jwt");
3748
+ d(this, "nkey");
3749
+ d(this, "sig");
3750
+ d(this, "user");
3751
+ d(this, "pass");
3752
+ d(this, "auth_token");
3753
+ d(this, "tls_required");
3754
+ d(this, "name");
3755
+ d(this, "lang");
3756
+ d(this, "version");
3757
+ d(this, "headers");
3758
3758
  this.protocol = 1, this.version = e.version, this.lang = e.lang, this.echo = r.noEcho ? !1 : void 0, this.verbose = r.verbose, this.pedantic = r.pedantic, this.tls_required = r.tls ? !0 : void 0, this.name = r.name;
3759
- const c = (r && typeof r.authenticator == "function" ? r.authenticator(i) : {}) || {};
3760
- (0, Ge.extend)(this, c);
3759
+ const a = (r && typeof r.authenticator == "function" ? r.authenticator(i) : {}) || {};
3760
+ (0, Ge.extend)(this, a);
3761
3761
  }
3762
3762
  }
3763
3763
  je.Connect = Xn;
3764
3764
  class Ts {
3765
3765
  constructor(e, r) {
3766
- l(this, "slow");
3767
- l(this, "cb");
3768
- l(this, "notified");
3766
+ d(this, "slow");
3767
+ d(this, "cb");
3768
+ d(this, "notified");
3769
3769
  this.slow = e, this.cb = r, this.notified = !1;
3770
3770
  }
3771
3771
  maybeNotify(e) {
@@ -3773,25 +3773,25 @@ class Ts {
3773
3773
  }
3774
3774
  }
3775
3775
  class Zn extends Os.QueuedIteratorImpl {
3776
- constructor(r, i, c = {}) {
3777
- var d;
3776
+ constructor(r, i, a = {}) {
3777
+ var l;
3778
3778
  super();
3779
- l(this, "sid");
3780
- l(this, "queue");
3781
- l(this, "draining");
3782
- l(this, "max");
3783
- l(this, "subject");
3784
- l(this, "drained");
3785
- l(this, "protocol");
3786
- l(this, "timer");
3787
- l(this, "info");
3788
- l(this, "cleanupFn");
3789
- l(this, "closed");
3790
- l(this, "requestSubject");
3791
- l(this, "slow");
3792
- (0, Ge.extend)(this, c), this.protocol = r, this.subject = i, this.draining = !1, this.noIterator = typeof c.callback == "function", this.closed = (0, Ge.deferred)();
3793
- const u = !((d = r.options) != null && d.noAsyncTraces);
3794
- c.timeout && (this.timer = (0, Ge.timeout)(c.timeout, u), this.timer.then(() => {
3779
+ d(this, "sid");
3780
+ d(this, "queue");
3781
+ d(this, "draining");
3782
+ d(this, "max");
3783
+ d(this, "subject");
3784
+ d(this, "drained");
3785
+ d(this, "protocol");
3786
+ d(this, "timer");
3787
+ d(this, "info");
3788
+ d(this, "cleanupFn");
3789
+ d(this, "closed");
3790
+ d(this, "requestSubject");
3791
+ d(this, "slow");
3792
+ (0, Ge.extend)(this, a), this.protocol = r, this.subject = i, this.draining = !1, this.noIterator = typeof a.callback == "function", this.closed = (0, Ge.deferred)();
3793
+ const u = !((l = r.options) != null && l.noAsyncTraces);
3794
+ a.timeout && (this.timer = (0, Ge.timeout)(a.timeout, u), this.timer.then(() => {
3795
3795
  this.timer = void 0;
3796
3796
  }).catch((m) => {
3797
3797
  this.stop(m), this.noIterator && this.callback(m, {});
@@ -3855,9 +3855,9 @@ class Zn extends Os.QueuedIteratorImpl {
3855
3855
  je.SubscriptionImpl = Zn;
3856
3856
  class Qn {
3857
3857
  constructor() {
3858
- l(this, "mux");
3859
- l(this, "subs");
3860
- l(this, "sidCounter");
3858
+ d(this, "mux");
3859
+ d(this, "subs");
3860
+ d(this, "sidCounter");
3861
3861
  this.sidCounter = 0, this.mux = null, this.subs = /* @__PURE__ */ new Map();
3862
3862
  }
3863
3863
  size() {
@@ -3887,7 +3887,7 @@ class Qn {
3887
3887
  handleError(e) {
3888
3888
  const r = this.all();
3889
3889
  let i;
3890
- return e.operation === "subscription" ? i = r.find((c) => c.subject === e.subject && c.queue === e.queue) : e.operation === "publish" && (i = r.find((c) => c.requestSubject === e.subject)), i ? (i.callback(e, {}), i.close(e), this.subs.delete(i.sid), i !== this.mux) : !1;
3890
+ return e.operation === "subscription" ? i = r.find((a) => a.subject === e.subject && a.queue === e.queue) : e.operation === "publish" && (i = r.find((a) => a.requestSubject === e.subject)), i ? (i.callback(e, {}), i.close(e), this.subs.delete(i.sid), i !== this.mux) : !1;
3891
3891
  }
3892
3892
  close() {
3893
3893
  this.subs.forEach((e) => {
@@ -3898,39 +3898,39 @@ class Qn {
3898
3898
  je.Subscriptions = Qn;
3899
3899
  class er {
3900
3900
  constructor(e, r) {
3901
- l(this, "connected");
3902
- l(this, "connectedOnce");
3903
- l(this, "infoReceived");
3904
- l(this, "info");
3905
- l(this, "muxSubscriptions");
3906
- l(this, "options");
3907
- l(this, "outbound");
3908
- l(this, "pongs");
3909
- l(this, "subscriptions");
3910
- l(this, "transport");
3911
- l(this, "noMorePublishing");
3912
- l(this, "connectError");
3913
- l(this, "publisher");
3914
- l(this, "_closed");
3915
- l(this, "closed");
3916
- l(this, "listeners");
3917
- l(this, "heartbeats");
3918
- l(this, "parser");
3919
- l(this, "outMsgs");
3920
- l(this, "inMsgs");
3921
- l(this, "outBytes");
3922
- l(this, "inBytes");
3923
- l(this, "pendingLimit");
3924
- l(this, "lastError");
3925
- l(this, "abortReconnect");
3926
- l(this, "whyClosed");
3927
- l(this, "servers");
3928
- l(this, "server");
3929
- l(this, "features");
3930
- l(this, "connectPromise");
3931
- l(this, "dialDelay");
3932
- l(this, "raceTimer");
3933
- this._closed = !1, this.connected = !1, this.connectedOnce = !1, this.infoReceived = !1, this.noMorePublishing = !1, this.abortReconnect = !1, this.listeners = [], this.pendingLimit = Ms, this.outMsgs = 0, this.inMsgs = 0, this.outBytes = 0, this.inBytes = 0, this.options = e, this.publisher = r, this.subscriptions = new Qn(), this.muxSubscriptions = new As.MuxSubscription(), this.outbound = new Ps.DataBuffer(), this.pongs = [], this.whyClosed = "", this.pendingLimit = e.pendingLimit || this.pendingLimit, this.features = new xn.Features({ major: 0, minor: 0, micro: 0 }), this.connectPromise = null, this.dialDelay = null;
3901
+ d(this, "connected");
3902
+ d(this, "connectedOnce");
3903
+ d(this, "infoReceived");
3904
+ d(this, "info");
3905
+ d(this, "muxSubscriptions");
3906
+ d(this, "options");
3907
+ d(this, "outbound");
3908
+ d(this, "pongs");
3909
+ d(this, "subscriptions");
3910
+ d(this, "transport");
3911
+ d(this, "noMorePublishing");
3912
+ d(this, "connectError");
3913
+ d(this, "publisher");
3914
+ d(this, "_closed");
3915
+ d(this, "closed");
3916
+ d(this, "listeners");
3917
+ d(this, "heartbeats");
3918
+ d(this, "parser");
3919
+ d(this, "outMsgs");
3920
+ d(this, "inMsgs");
3921
+ d(this, "outBytes");
3922
+ d(this, "inBytes");
3923
+ d(this, "pendingLimit");
3924
+ d(this, "lastError");
3925
+ d(this, "abortReconnect");
3926
+ d(this, "whyClosed");
3927
+ d(this, "servers");
3928
+ d(this, "server");
3929
+ d(this, "features");
3930
+ d(this, "connectPromise");
3931
+ d(this, "dialDelay");
3932
+ d(this, "raceTimer");
3933
+ this._closed = !1, this.connected = !1, this.connectedOnce = !1, this.infoReceived = !1, this.noMorePublishing = !1, this.abortReconnect = !1, this.listeners = [], this.pendingLimit = Is, this.outMsgs = 0, this.inMsgs = 0, this.outBytes = 0, this.inBytes = 0, this.options = e, this.publisher = r, this.subscriptions = new Qn(), this.muxSubscriptions = new As.MuxSubscription(), this.outbound = new Ps.DataBuffer(), this.pongs = [], this.whyClosed = "", this.pendingLimit = e.pendingLimit || this.pendingLimit, this.features = new xn.Features({ major: 0, minor: 0, micro: 0 }), this.connectPromise = null, this.dialDelay = null;
3934
3934
  const i = typeof e.servers == "string" ? [e.servers] : e.servers;
3935
3935
  this.servers = new Ss.Servers(i, {
3936
3936
  randomize: !e.noRandomize
@@ -3985,17 +3985,17 @@ class er {
3985
3985
  }) : await this.close(e).catch();
3986
3986
  }
3987
3987
  async dial(e) {
3988
- var i, c;
3988
+ var i, a;
3989
3989
  const r = this.prepare();
3990
3990
  try {
3991
3991
  this.raceTimer = (0, Ge.timeout)(this.options.timeout || 2e4);
3992
3992
  const u = this.transport.connect(e, this.options);
3993
3993
  await Promise.race([u, this.raceTimer]), (async () => {
3994
3994
  try {
3995
- for await (const d of this.transport)
3996
- this.parser.parse(d);
3997
- } catch (d) {
3998
- console.log("reader closed", d);
3995
+ for await (const l of this.transport)
3996
+ this.parser.parse(l);
3997
+ } catch (l) {
3998
+ console.log("reader closed", l);
3999
3999
  }
4000
4000
  })().then();
4001
4001
  } catch (u) {
@@ -4004,7 +4004,7 @@ class er {
4004
4004
  try {
4005
4005
  await Promise.race([this.raceTimer, r]), (i = this.raceTimer) == null || i.cancel(), this.connected = !0, this.connectError = void 0, this.sendSubscriptions(), this.connectedOnce = !0, this.server.didConnect = !0, this.server.reconnects = 0, this.flushPending(), this.heartbeats.start();
4006
4006
  } catch (u) {
4007
- throw (c = this.raceTimer) == null || c.cancel(), await this.transport.close(u), u;
4007
+ throw (a = this.raceTimer) == null || a.cancel(), await this.transport.close(u), u;
4008
4008
  }
4009
4009
  }
4010
4010
  async _doDial(e) {
@@ -4014,15 +4014,15 @@ class er {
4014
4014
  randomize: !this.options.noRandomize,
4015
4015
  resolve: r
4016
4016
  });
4017
- let c = null;
4017
+ let a = null;
4018
4018
  for (const u of i)
4019
4019
  try {
4020
- c = null, this.dispatchStatus({ type: "reconnecting" }), await this.dial(u);
4020
+ a = null, this.dispatchStatus({ type: "reconnecting" }), await this.dial(u);
4021
4021
  return;
4022
- } catch (d) {
4023
- c = d;
4022
+ } catch (l) {
4023
+ a = l;
4024
4024
  }
4025
- throw c;
4025
+ throw a;
4026
4026
  }
4027
4027
  dialLoop() {
4028
4028
  return this.connectPromise === null && (this.connectPromise = this.dodialLoop(), this.connectPromise.then(() => {
@@ -4037,27 +4037,27 @@ class er {
4037
4037
  this._closed && this.servers.clear();
4038
4038
  const r = this.options.reconnectDelayHandler ? this.options.reconnectDelayHandler() : Or.DEFAULT_RECONNECT_TIME_WAIT;
4039
4039
  let i = r;
4040
- const c = this.selectServer();
4041
- if (!c || this.abortReconnect)
4040
+ const a = this.selectServer();
4041
+ if (!a || this.abortReconnect)
4042
4042
  throw e || (this.lastError ? this.lastError : new Oe.errors.ConnectionError("connection refused"));
4043
4043
  const u = Date.now();
4044
- if (c.lastConnect === 0 || c.lastConnect + r <= u) {
4045
- c.lastConnect = Date.now();
4044
+ if (a.lastConnect === 0 || a.lastConnect + r <= u) {
4045
+ a.lastConnect = Date.now();
4046
4046
  try {
4047
- await this._doDial(c);
4047
+ await this._doDial(a);
4048
4048
  break;
4049
- } catch (d) {
4050
- if (e = d, !this.connectedOnce) {
4049
+ } catch (l) {
4050
+ if (e = l, !this.connectedOnce) {
4051
4051
  if (this.options.waitOnFirstConnect)
4052
4052
  continue;
4053
4053
  this.servers.removeCurrentServer();
4054
4054
  }
4055
- c.reconnects++;
4055
+ a.reconnects++;
4056
4056
  const m = this.options.maxReconnectAttempts || 0;
4057
- m !== -1 && c.reconnects >= m && this.servers.removeCurrentServer();
4057
+ m !== -1 && a.reconnects >= m && this.servers.removeCurrentServer();
4058
4058
  }
4059
4059
  } else
4060
- i = Math.min(i, c.lastConnect + r - u), this.dialDelay = (0, Ge.delay)(i), await this.dialDelay;
4060
+ i = Math.min(i, a.lastConnect + r - u), this.dialDelay = (0, Ge.delay)(i), await this.dialDelay;
4061
4061
  }
4062
4062
  }
4063
4063
  static async connect(e, r) {
@@ -4072,7 +4072,7 @@ class er {
4072
4072
  if (this.inMsgs++, this.inBytes += r.length, !this.subscriptions.sidCounter)
4073
4073
  return;
4074
4074
  const i = this.subscriptions.get(e.sid);
4075
- i && (i.received += 1, i.callback && i.callback(null, new Is.MsgImpl(e, r, this)), i.max !== void 0 && i.received >= i.max && i.unsubscribe());
4075
+ i && (i.received += 1, i.callback && i.callback(null, new Ms.MsgImpl(e, r, this)), i.max !== void 0 && i.received >= i.max && i.unsubscribe());
4076
4076
  }
4077
4077
  processError(e) {
4078
4078
  let r = (0, ze.decode)(e);
@@ -4080,8 +4080,8 @@ class er {
4080
4080
  const i = er.toError(r);
4081
4081
  switch (i.constructor) {
4082
4082
  case Oe.errors.PermissionViolationError: {
4083
- const c = i, u = this.subscriptions.getMux(), d = u ? c.subject === u.subject : !1;
4084
- this.subscriptions.handleError(c), this.muxSubscriptions.handleError(d, c), d && this.subscriptions.setMux(null);
4083
+ const a = i, u = this.subscriptions.getMux(), l = u ? a.subject === u.subject : !1;
4084
+ this.subscriptions.handleError(a), this.muxSubscriptions.handleError(l, a), l && this.subscriptions.setMux(null);
4085
4085
  }
4086
4086
  }
4087
4087
  this.dispatchStatus({ type: "error", error: i }), this.handleError(i);
@@ -4105,9 +4105,9 @@ class er {
4105
4105
  const i = this.options && this.options.ignoreClusterUpdates ? void 0 : this.servers.update(r, this.transport.isEncrypted());
4106
4106
  if (!this.infoReceived) {
4107
4107
  this.features.update((0, xn.parseSemVer)(r.version)), this.infoReceived = !0, this.transport.isEncrypted() && this.servers.updateTLSName();
4108
- const { version: u, lang: d } = this.transport;
4108
+ const { version: u, lang: l } = this.transport;
4109
4109
  try {
4110
- const m = new Xn({ version: u, lang: d }, this.options, r.nonce);
4110
+ const m = new Xn({ version: u, lang: l }, this.options, r.nonce);
4111
4111
  r.headers && (m.headers = !0, m.no_responders = !0);
4112
4112
  const P = JSON.stringify(m);
4113
4113
  this.transport.send((0, ze.encode)(`CONNECT ${P}${rt.CR_LF}`)), this.transport.send(En);
@@ -4116,8 +4116,8 @@ class er {
4116
4116
  }
4117
4117
  }
4118
4118
  if (i) {
4119
- const { added: u, deleted: d } = i;
4120
- this.dispatchStatus({ type: "update", added: u, deleted: d });
4119
+ const { added: u, deleted: l } = i;
4120
+ this.dispatchStatus({ type: "update", added: u, deleted: l });
4121
4121
  }
4122
4122
  (r.ldm !== void 0 ? r.ldm : !1) && this.dispatchStatus({
4123
4123
  type: "ldm",
@@ -4149,31 +4149,31 @@ class er {
4149
4149
  }
4150
4150
  sendCommand(e, ...r) {
4151
4151
  const i = this.outbound.length();
4152
- let c;
4153
- typeof e == "string" ? c = (0, ze.encode)(e) : c = e, this.outbound.fill(c, ...r), i === 0 ? queueMicrotask(() => {
4152
+ let a;
4153
+ typeof e == "string" ? a = (0, ze.encode)(e) : a = e, this.outbound.fill(a, ...r), i === 0 ? queueMicrotask(() => {
4154
4154
  this.flushPending();
4155
4155
  }) : this.outbound.size() >= this.pendingLimit && this.flushPending();
4156
4156
  }
4157
4157
  publish(e, r = ze.Empty, i) {
4158
- let c;
4158
+ let a;
4159
4159
  if (r instanceof Uint8Array)
4160
- c = r;
4160
+ a = r;
4161
4161
  else if (typeof r == "string")
4162
- c = ze.TE.encode(r);
4162
+ a = ze.TE.encode(r);
4163
4163
  else
4164
4164
  throw new TypeError("payload types can be strings or Uint8Array");
4165
- let u = c.length;
4165
+ let u = a.length;
4166
4166
  i = i || {}, i.reply = i.reply || "";
4167
- let d = ze.Empty, m = 0;
4168
- if (i.headers && (this.info && !this.info.headers && Oe.InvalidArgumentError.format("headers", "are not available on this server"), d = i.headers.encode(), m = d.length, u = c.length + m), this.info && u > this.info.max_payload)
4167
+ let l = ze.Empty, m = 0;
4168
+ if (i.headers && (this.info && !this.info.headers && Oe.InvalidArgumentError.format("headers", "are not available on this server"), l = i.headers.encode(), m = l.length, u = a.length + m), this.info && u > this.info.max_payload)
4169
4169
  throw Oe.InvalidArgumentError.format("payload", "max_payload size exceeded");
4170
4170
  this.outBytes += u, this.outMsgs++;
4171
4171
  let P;
4172
4172
  i.headers ? (i.reply ? P = `HPUB ${e} ${i.reply} ${m} ${u}\r
4173
4173
  ` : P = `HPUB ${e} ${m} ${u}\r
4174
- `, this.sendCommand(P, d, c, rt.CRLF)) : (i.reply ? P = `PUB ${e} ${i.reply} ${u}\r
4174
+ `, this.sendCommand(P, l, a, rt.CRLF)) : (i.reply ? P = `PUB ${e} ${i.reply} ${u}\r
4175
4175
  ` : P = `PUB ${e} ${u}\r
4176
- `, this.sendCommand(P, c, rt.CRLF));
4176
+ `, this.sendCommand(P, a, rt.CRLF));
4177
4177
  }
4178
4178
  request(e) {
4179
4179
  return this.initMux(), this.muxSubscriptions.add(e), e;
@@ -4211,16 +4211,16 @@ class er {
4211
4211
  }), e.length && this.transport.send((0, ze.encode)(e.join("")));
4212
4212
  }
4213
4213
  async close(e) {
4214
- var i, c;
4214
+ var i, a;
4215
4215
  if (this._closed)
4216
4216
  return;
4217
4217
  this.whyClosed = new Error("close trace").stack || "", this.heartbeats.cancel(), this.connectError && (this.connectError(e), this.connectError = void 0), this.muxSubscriptions.close(), this.subscriptions.close();
4218
4218
  const r = [];
4219
4219
  for (let u = 0; u < this.listeners.length; u++) {
4220
- const d = this.listeners[u];
4221
- d && (d.push({ type: "close" }), d.stop(), r.push(d.iterClosed));
4220
+ const l = this.listeners[u];
4221
+ l && (l.push({ type: "close" }), l.stop(), r.push(l.iterClosed));
4222
4222
  }
4223
- r.length && await Promise.all(r), this._closed = !0, await this.transport.close(e), (i = this.raceTimer) == null || i.cancel(), (c = this.dialDelay) == null || c.cancel(), this.closed.resolve(e);
4223
+ r.length && await Promise.all(r), this._closed = !0, await this.transport.close(e), (i = this.raceTimer) == null || i.cancel(), (a = this.dialDelay) == null || a.cancel(), this.closed.resolve(e);
4224
4224
  }
4225
4225
  isClosed() {
4226
4226
  return this._closed;
@@ -4266,30 +4266,30 @@ Ye.RequestOne = Ye.RequestMany = Ye.BaseRequest = void 0;
4266
4266
  const Rr = be, Ns = Tt, Zt = re;
4267
4267
  class Dr {
4268
4268
  constructor(e, r, i = !0) {
4269
- l(this, "token");
4270
- l(this, "received");
4271
- l(this, "ctx");
4272
- l(this, "requestSubject");
4273
- l(this, "mux");
4269
+ d(this, "token");
4270
+ d(this, "received");
4271
+ d(this, "ctx");
4272
+ d(this, "requestSubject");
4273
+ d(this, "mux");
4274
4274
  this.mux = e, this.requestSubject = r, this.received = 0, this.token = Ns.nuid.next(), i && (this.ctx = new Zt.RequestError());
4275
4275
  }
4276
4276
  }
4277
4277
  Ye.BaseRequest = Dr;
4278
4278
  class Rs extends Dr {
4279
- constructor(r, i, c = { maxWait: 1e3 }) {
4279
+ constructor(r, i, a = { maxWait: 1e3 }) {
4280
4280
  super(r, i);
4281
- l(this, "callback");
4282
- l(this, "done");
4283
- l(this, "timer");
4284
- l(this, "max");
4285
- l(this, "opts");
4286
- if (this.opts = c, typeof this.opts.callback != "function")
4281
+ d(this, "callback");
4282
+ d(this, "done");
4283
+ d(this, "timer");
4284
+ d(this, "max");
4285
+ d(this, "opts");
4286
+ if (this.opts = a, typeof this.opts.callback != "function")
4287
4287
  throw new TypeError("callback must be a function");
4288
- this.callback = this.opts.callback, this.max = typeof c.maxMessages == "number" && c.maxMessages > 0 ? c.maxMessages : -1, this.done = (0, Rr.deferred)(), this.done.then(() => {
4288
+ this.callback = this.opts.callback, this.max = typeof a.maxMessages == "number" && a.maxMessages > 0 ? a.maxMessages : -1, this.done = (0, Rr.deferred)(), this.done.then(() => {
4289
4289
  this.callback(null, null);
4290
4290
  }), this.timer = setTimeout(() => {
4291
4291
  this.cancel();
4292
- }, c.maxWait);
4292
+ }, a.maxWait);
4293
4293
  }
4294
4294
  cancel(r) {
4295
4295
  r && this.callback(r, null), clearTimeout(this.timer), this.mux.cancel(this), this.done.resolve();
@@ -4304,11 +4304,11 @@ ${this.ctx.stack}`), this.cancel(r)) : (this.callback(null, i), this.opts.strate
4304
4304
  }
4305
4305
  Ye.RequestMany = Rs;
4306
4306
  class ks extends Dr {
4307
- constructor(r, i, c = { timeout: 1e3 }, u = !0) {
4307
+ constructor(r, i, a = { timeout: 1e3 }, u = !0) {
4308
4308
  super(r, i, u);
4309
- l(this, "deferred");
4310
- l(this, "timer");
4311
- this.deferred = (0, Rr.deferred)(), this.timer = (0, Rr.timeout)(c.timeout, u);
4309
+ d(this, "deferred");
4310
+ d(this, "timer");
4311
+ this.deferred = (0, Rr.deferred)(), this.timer = (0, Rr.timeout)(a.timeout, u);
4312
4312
  }
4313
4313
  resolver(r, i) {
4314
4314
  this.timer && this.timer.cancel(), r ? (r instanceof Zt.TimeoutError || (this.ctx ? (this.ctx.message = r.message, this.ctx.cause = r, r = this.ctx) : r = new Zt.errors.RequestError(r.message, { cause: r })), this.deferred.reject(r)) : this.deferred.resolve(i), this.cancel();
@@ -4320,20 +4320,20 @@ class ks extends Dr {
4320
4320
  Ye.RequestOne = ks;
4321
4321
  Object.defineProperty(jt, "__esModule", { value: !0 });
4322
4322
  jt.NatsConnectionImpl = void 0;
4323
- const Us = be, pn = je, Ls = Ue, wn = Qe, Fs = sr, Ks = Ut, Pn = mt, Sn = Ye, On = Me, we = re;
4323
+ const Us = be, pn = je, Ls = Ue, wn = Qe, Fs = sr, Ks = Ut, Pn = mt, Sn = Ye, On = Ie, we = re;
4324
4324
  class $r {
4325
4325
  constructor(e) {
4326
- l(this, "options");
4327
- l(this, "protocol");
4328
- l(this, "draining");
4329
- l(this, "closeListeners");
4326
+ d(this, "options");
4327
+ d(this, "protocol");
4328
+ d(this, "draining");
4329
+ d(this, "closeListeners");
4330
4330
  this.draining = !1, this.options = (0, Ks.parseOptions)(e);
4331
4331
  }
4332
4332
  static connect(e = {}) {
4333
4333
  return new Promise((r, i) => {
4334
- const c = new $r(e);
4335
- pn.ProtocolHandler.connect(c.options, c).then((u) => {
4336
- c.protocol = u, r(c);
4334
+ const a = new $r(e);
4335
+ pn.ProtocolHandler.connect(a.options, a).then((u) => {
4336
+ a.protocol = u, r(a);
4337
4337
  }).catch((u) => {
4338
4338
  i(u);
4339
4339
  });
@@ -4357,12 +4357,12 @@ class $r {
4357
4357
  }
4358
4358
  publish(e, r, i) {
4359
4359
  if (this._check(e, !1, !0), i != null && i.reply && this._check(i.reply, !1, !0), typeof (i == null ? void 0 : i.traceOnly) == "boolean") {
4360
- const c = i.headers || (0, wn.headers)();
4361
- c.set("Nats-Trace-Only", "true"), i.headers = c;
4360
+ const a = i.headers || (0, wn.headers)();
4361
+ a.set("Nats-Trace-Only", "true"), i.headers = a;
4362
4362
  }
4363
4363
  if (typeof (i == null ? void 0 : i.traceDestination) == "string") {
4364
- const c = i.headers || (0, wn.headers)();
4365
- c.set("Nats-Trace-Dest", i.traceDestination), i.headers = c;
4364
+ const a = i.headers || (0, wn.headers)();
4365
+ a.set("Nats-Trace-Dest", i.traceDestination), i.headers = a;
4366
4366
  }
4367
4367
  this.protocol.publish(e, r, i);
4368
4368
  }
@@ -4381,18 +4381,18 @@ class $r {
4381
4381
  subscribe(e, r = {}) {
4382
4382
  this._check(e, !0, !1);
4383
4383
  const i = new pn.SubscriptionImpl(this.protocol, e, r);
4384
- return typeof r.callback != "function" && typeof r.slow == "number" && i.setSlowNotificationFn(r.slow, (c) => {
4384
+ return typeof r.callback != "function" && typeof r.slow == "number" && i.setSlowNotificationFn(r.slow, (a) => {
4385
4385
  this.protocol.dispatchStatus({
4386
4386
  type: "slowConsumer",
4387
4387
  sub: i,
4388
- pending: c
4388
+ pending: a
4389
4389
  });
4390
4390
  }), this.protocol.subscribe(i), i;
4391
4391
  }
4392
4392
  _resub(e, r, i) {
4393
4393
  this._check(r, !0, !1);
4394
- const c = e;
4395
- c.max = i, i && (c.max = i + c.received), this.protocol.resub(c, r);
4394
+ const a = e;
4395
+ a.max = i, i && (a.max = i + a.received), this.protocol.resub(a, r);
4396
4396
  }
4397
4397
  // possibilities are:
4398
4398
  // stop on error or any non-100 status
@@ -4402,7 +4402,7 @@ class $r {
4402
4402
  // - wait for unknown messages, done when empty or reset timer expires (with possible alt wait)
4403
4403
  // - wait for unknown messages, done when an empty payload is received or timer expires (with possible alt wait)
4404
4404
  requestMany(e, r = Ls.Empty, i = { maxWait: 1e3, maxMessages: -1 }) {
4405
- const c = !this.protocol.options.noAsyncTraces;
4405
+ const a = !this.protocol.options.noAsyncTraces;
4406
4406
  try {
4407
4407
  this._check(e, !0, !0);
4408
4408
  } catch (P) {
@@ -4411,16 +4411,16 @@ class $r {
4411
4411
  if (i.strategy = i.strategy || "timer", i.maxWait = i.maxWait || 1e3, i.maxWait < 1)
4412
4412
  return Promise.reject(we.InvalidArgumentError.format("timeout", "must be greater than 0"));
4413
4413
  const u = new Pn.QueuedIteratorImpl();
4414
- function d(P) {
4414
+ function l(P) {
4415
4415
  u.push(() => {
4416
4416
  u.stop(P);
4417
4417
  });
4418
4418
  }
4419
4419
  function m(P, g) {
4420
- P || g === null ? d(P === null ? void 0 : P) : u.push(g);
4420
+ P || g === null ? l(P === null ? void 0 : P) : u.push(g);
4421
4421
  }
4422
4422
  if (i.noMux) {
4423
- const P = c ? new Error().stack : null;
4423
+ const P = a ? new Error().stack : null;
4424
4424
  let g = typeof i.maxMessages == "number" && i.maxMessages > 0 ? i.maxMessages : -1;
4425
4425
  const p = this.subscribe((0, On.createInbox)(this.options.inboxPrefix), {
4426
4426
  callback: (ie, ye) => {
@@ -4437,7 +4437,7 @@ ${P}`), w(ie);
4437
4437
  }
4438
4438
  });
4439
4439
  p.requestSubject = e, p.closed.then(() => {
4440
- d();
4440
+ l();
4441
4441
  }).catch((ie) => {
4442
4442
  u.stop(ie);
4443
4443
  });
@@ -4445,9 +4445,9 @@ ${P}`), w(ie);
4445
4445
  ie && u.push(() => {
4446
4446
  throw ie;
4447
4447
  }), U(), p.drain().then(() => {
4448
- d();
4448
+ l();
4449
4449
  }).catch((ye) => {
4450
- d();
4450
+ l();
4451
4451
  });
4452
4452
  };
4453
4453
  u.iterClosed.then(() => {
@@ -4501,32 +4501,32 @@ ${P}`), w(ie);
4501
4501
  } catch (u) {
4502
4502
  return Promise.reject(u);
4503
4503
  }
4504
- const c = !this.protocol.options.noAsyncTraces;
4504
+ const a = !this.protocol.options.noAsyncTraces;
4505
4505
  if (i.timeout = i.timeout || 1e3, i.timeout < 1)
4506
4506
  return Promise.reject(we.InvalidArgumentError.format("timeout", "must be greater than 0"));
4507
4507
  if (!i.noMux && i.reply)
4508
4508
  return Promise.reject(we.InvalidArgumentError.format(["reply", "noMux"], "are mutually exclusive"));
4509
4509
  if (i.noMux) {
4510
- const u = i.reply ? i.reply : (0, On.createInbox)(this.options.inboxPrefix), d = (0, Us.deferred)(), m = c ? new we.errors.RequestError("") : null, P = this.subscribe(u, {
4510
+ const u = i.reply ? i.reply : (0, On.createInbox)(this.options.inboxPrefix), l = (0, Us.deferred)(), m = a ? new we.errors.RequestError("") : null, P = this.subscribe(u, {
4511
4511
  max: 1,
4512
4512
  timeout: i.timeout,
4513
4513
  callback: (g, p) => {
4514
4514
  var w, b;
4515
- p && ((w = p.data) == null ? void 0 : w.length) === 0 && ((b = p.headers) == null ? void 0 : b.code) === 503 && (g = new we.errors.NoRespondersError(e)), g ? (g instanceof we.TimeoutError || (m ? (m.message = g.message, m.cause = g, g = m) : g = new we.errors.RequestError(g.message, { cause: g })), d.reject(g), P.unsubscribe()) : d.resolve(p);
4515
+ p && ((w = p.data) == null ? void 0 : w.length) === 0 && ((b = p.headers) == null ? void 0 : b.code) === 503 && (g = new we.errors.NoRespondersError(e)), g ? (g instanceof we.TimeoutError || (m ? (m.message = g.message, m.cause = g, g = m) : g = new we.errors.RequestError(g.message, { cause: g })), l.reject(g), P.unsubscribe()) : l.resolve(p);
4516
4516
  }
4517
4517
  });
4518
4518
  return P.requestSubject = e, this.protocol.publish(e, r, {
4519
4519
  reply: u,
4520
4520
  headers: i.headers
4521
- }), d;
4521
+ }), l;
4522
4522
  } else {
4523
- const u = new Sn.RequestOne(this.protocol.muxSubscriptions, e, i, c);
4523
+ const u = new Sn.RequestOne(this.protocol.muxSubscriptions, e, i, a);
4524
4524
  this.protocol.request(u);
4525
- const { headers: d, traceDestination: m, traceOnly: P } = i;
4525
+ const { headers: l, traceDestination: m, traceOnly: P } = i;
4526
4526
  try {
4527
4527
  this.publish(e, r, {
4528
4528
  reply: `${this.protocol.muxSubscriptions.baseInbox}${u.token}`,
4529
- headers: d,
4529
+ headers: l,
4530
4530
  traceDestination: m,
4531
4531
  traceOnly: P
4532
4532
  });
@@ -4610,7 +4610,7 @@ ${P}`), w(ie);
4610
4610
  jt.NatsConnectionImpl = $r;
4611
4611
  class Bs {
4612
4612
  constructor(e) {
4613
- l(this, "listeners");
4613
+ d(this, "listeners");
4614
4614
  this.listeners = [], e.then((r) => {
4615
4615
  this.notify(r);
4616
4616
  });
@@ -4647,23 +4647,23 @@ Xe.humanizeBytes = ti;
4647
4647
  const Ds = qr, $s = Tt, Ar = be;
4648
4648
  class it {
4649
4649
  constructor(e, r) {
4650
- l(this, "name");
4651
- l(this, "duration");
4652
- l(this, "date");
4653
- l(this, "payload");
4654
- l(this, "msgs");
4655
- l(this, "lang");
4656
- l(this, "version");
4657
- l(this, "bytes");
4658
- l(this, "asyncRequests");
4659
- l(this, "min");
4660
- l(this, "max");
4650
+ d(this, "name");
4651
+ d(this, "duration");
4652
+ d(this, "date");
4653
+ d(this, "payload");
4654
+ d(this, "msgs");
4655
+ d(this, "lang");
4656
+ d(this, "version");
4657
+ d(this, "bytes");
4658
+ d(this, "asyncRequests");
4659
+ d(this, "min");
4660
+ d(this, "max");
4661
4661
  this.name = e, this.duration = r, this.date = Date.now(), this.payload = 0, this.msgs = 0, this.bytes = 0;
4662
4662
  }
4663
4663
  toString() {
4664
4664
  const e = this.duration / 1e3, r = Math.round(this.msgs / e), i = this.asyncRequests ? "asyncRequests" : "";
4665
- let c = "";
4666
- return this.max && (c = `${this.min}/${this.max}`), `${this.name}${i ? " [asyncRequests]" : ""} ${Gs(r)} msgs/sec - [${e.toFixed(2)} secs] ~ ${ei(this.bytes, e)} ${c}`;
4665
+ let a = "";
4666
+ return this.max && (a = `${this.min}/${this.max}`), `${this.name}${i ? " [asyncRequests]" : ""} ${Gs(r)} msgs/sec - [${e.toFixed(2)} secs] ~ ${ei(this.bytes, e)} ${a}`;
4667
4667
  }
4668
4668
  toCsv() {
4669
4669
  return `"${this.name}",${new Date(this.date).toISOString()},${this.lang},${this.version},${this.msgs},${this.payload},${this.bytes},${this.duration},${this.asyncRequests ? this.asyncRequests : !1}
@@ -4686,18 +4686,18 @@ class qs {
4686
4686
  req: !1,
4687
4687
  rep: !1
4688
4688
  }) {
4689
- l(this, "nc");
4690
- l(this, "callbacks");
4691
- l(this, "msgs");
4692
- l(this, "size");
4693
- l(this, "subject");
4694
- l(this, "asyncRequests");
4695
- l(this, "pub");
4696
- l(this, "sub");
4697
- l(this, "req");
4698
- l(this, "rep");
4699
- l(this, "perf");
4700
- l(this, "payload");
4689
+ d(this, "nc");
4690
+ d(this, "callbacks");
4691
+ d(this, "msgs");
4692
+ d(this, "size");
4693
+ d(this, "subject");
4694
+ d(this, "asyncRequests");
4695
+ d(this, "pub");
4696
+ d(this, "sub");
4697
+ d(this, "req");
4698
+ d(this, "rep");
4699
+ d(this, "perf");
4700
+ d(this, "payload");
4701
4701
  if (this.nc = e, this.callbacks = r.callbacks || !1, this.msgs = r.msgs || 0, this.size = r.size || 0, this.subject = r.subject || $s.nuid.next(), this.asyncRequests = r.asyncRequests || !1, this.pub = r.pub || !1, this.sub = r.sub || !1, this.req = r.req || !1, this.rep = r.rep || !1, this.perf = new Ar.Perf(), this.payload = this.size ? new Uint8Array(this.size) : Ds.Empty, !this.pub && !this.sub && !this.req && !this.rep)
4702
4702
  throw new Error("no options selected");
4703
4703
  }
@@ -4710,13 +4710,13 @@ class qs {
4710
4710
  processMetrics() {
4711
4711
  const e = this.nc, { lang: r, version: i } = e.protocol.transport;
4712
4712
  this.pub && this.sub && this.perf.measure("pubsub", "pubStart", "subStop"), this.req && this.rep && this.perf.measure("reqrep", "reqStart", "reqStop");
4713
- const c = this.perf.getEntries(), u = c.find((x) => x.name === "pubsub"), d = c.find((x) => x.name === "reqrep"), m = c.find((x) => x.name === "req"), P = c.find((x) => x.name === "rep"), g = c.find((x) => x.name === "pub"), p = c.find((x) => x.name === "sub"), w = this.nc.stats(), b = [];
4713
+ const a = this.perf.getEntries(), u = a.find((x) => x.name === "pubsub"), l = a.find((x) => x.name === "reqrep"), m = a.find((x) => x.name === "req"), P = a.find((x) => x.name === "rep"), g = a.find((x) => x.name === "pub"), p = a.find((x) => x.name === "sub"), w = this.nc.stats(), b = [];
4714
4714
  if (u) {
4715
4715
  const { name: x, duration: R } = u, j = new it(x, R);
4716
4716
  j.msgs = this.msgs * 2, j.bytes = w.inBytes + w.outBytes, j.lang = r, j.version = i, j.payload = this.payload.length, b.push(j);
4717
4717
  }
4718
- if (d) {
4719
- const { name: x, duration: R } = d, j = new it(x, R);
4718
+ if (l) {
4719
+ const { name: x, duration: R } = l, j = new it(x, R);
4720
4720
  j.msgs = this.msgs * 2, j.bytes = w.inBytes + w.outBytes, j.lang = r, j.version = i, j.payload = this.payload.length, b.push(j);
4721
4721
  }
4722
4722
  if (g) {
@@ -4756,7 +4756,7 @@ class qs {
4756
4756
  let i = 0;
4757
4757
  this.nc.subscribe(this.subject, {
4758
4758
  max: this.msgs,
4759
- callback: (c, u) => {
4759
+ callback: (a, u) => {
4760
4760
  u.respond(this.payload), i++, i === 1 && this.perf.mark("repStart"), i === this.msgs && (this.perf.mark("repStop"), this.perf.measure("rep", "repStart", "repStop"), r.resolve());
4761
4761
  }
4762
4762
  });
@@ -4775,7 +4775,7 @@ class qs {
4775
4775
  if (this.asyncRequests) {
4776
4776
  this.perf.mark("reqStart");
4777
4777
  const i = [];
4778
- for (let c = 0; c < this.msgs; c++)
4778
+ for (let a = 0; a < this.msgs; a++)
4779
4779
  i.push(this.nc.request(this.subject, this.payload, { timeout: 2e4 }));
4780
4780
  await Promise.all(i), this.perf.mark("reqStop"), this.perf.measure("req", "reqStart", "reqStop");
4781
4781
  } else {
@@ -4793,21 +4793,21 @@ class qs {
4793
4793
  const e = [];
4794
4794
  if (this.rep) {
4795
4795
  let r = !1;
4796
- const i = this.nc.subscribe(this.subject, { max: this.msgs }), c = (async () => {
4796
+ const i = this.nc.subscribe(this.subject, { max: this.msgs }), a = (async () => {
4797
4797
  for await (const u of i)
4798
4798
  r || (this.perf.mark("repStart"), r = !0), u.respond(this.payload);
4799
4799
  await this.nc.flush(), this.perf.mark("repStop"), this.perf.measure("rep", "repStart", "repStop");
4800
4800
  })();
4801
- e.push(c);
4801
+ e.push(a);
4802
4802
  }
4803
4803
  if (this.sub) {
4804
4804
  let r = !1;
4805
- const i = this.nc.subscribe(this.subject, { max: this.msgs }), c = (async () => {
4805
+ const i = this.nc.subscribe(this.subject, { max: this.msgs }), a = (async () => {
4806
4806
  for await (const u of i)
4807
4807
  r || (this.perf.mark("subStart"), r = !0);
4808
4808
  this.perf.mark("subStop"), this.perf.measure("sub", "subStart", "subStop");
4809
4809
  })();
4810
- e.push(c);
4810
+ e.push(a);
4811
4811
  }
4812
4812
  if (this.pub) {
4813
4813
  const r = (async () => {
@@ -4823,7 +4823,7 @@ class qs {
4823
4823
  if (this.asyncRequests) {
4824
4824
  this.perf.mark("reqStart");
4825
4825
  const i = [];
4826
- for (let c = 0; c < this.msgs; c++)
4826
+ for (let a = 0; a < this.msgs; a++)
4827
4827
  i.push(this.nc.request(this.subject, this.payload, { timeout: 2e4 }));
4828
4828
  await Promise.all(i), this.perf.mark("reqStop"), this.perf.measure("req", "reqStart", "reqStop");
4829
4829
  } else {
@@ -4846,11 +4846,11 @@ function zs(t, e) {
4846
4846
  return `${Math.floor(t / e)} msgs/sec`;
4847
4847
  }
4848
4848
  function ti(t, e = !1) {
4849
- const r = e ? 1e3 : 1024, i = e ? ["k", "M", "G", "T", "P", "E"] : ["K", "M", "G", "T", "P", "E"], c = e ? "iB" : "B";
4849
+ const r = e ? 1e3 : 1024, i = e ? ["k", "M", "G", "T", "P", "E"] : ["K", "M", "G", "T", "P", "E"], a = e ? "iB" : "B";
4850
4850
  if (t < r)
4851
- return `${t.toFixed(2)} ${c}`;
4852
- const u = parseInt(Math.log(t) / Math.log(r) + ""), d = parseInt(u - 1 + "");
4853
- return `${(t / Math.pow(r, u)).toFixed(2)} ${i[d]}${c}`;
4851
+ return `${t.toFixed(2)} ${a}`;
4852
+ const u = parseInt(Math.log(t) / Math.log(r) + ""), l = parseInt(u - 1 + "");
4853
+ return `${(t / Math.pow(r, u)).toFixed(2)} ${i[l]}${a}`;
4854
4854
  }
4855
4855
  function Gs(t) {
4856
4856
  return t.toString().replace(/\B(?=(\d{3})+(?!\d))/g, ",");
@@ -4866,15 +4866,15 @@ class Hs {
4866
4866
  * @param opts monitor options @see IdleHeartbeatOptions
4867
4867
  */
4868
4868
  constructor(e, r, i = { maxOut: 2 }) {
4869
- l(this, "interval");
4870
- l(this, "maxOut");
4871
- l(this, "cancelAfter");
4872
- l(this, "timer");
4873
- l(this, "autoCancelTimer");
4874
- l(this, "last");
4875
- l(this, "missed");
4876
- l(this, "count");
4877
- l(this, "callback");
4869
+ d(this, "interval");
4870
+ d(this, "maxOut");
4871
+ d(this, "cancelAfter");
4872
+ d(this, "timer");
4873
+ d(this, "autoCancelTimer");
4874
+ d(this, "last");
4875
+ d(this, "missed");
4876
+ d(this, "count");
4877
+ d(this, "callback");
4878
4878
  this.interval = e, this.maxOut = (i == null ? void 0 : i.maxOut) || 2, this.cancelAfter = (i == null ? void 0 : i.cancelAfter) || 0, this.last = Date.now(), this.missed = 0, this.count = 0, this.callback = r, this._schedule();
4879
4879
  }
4880
4880
  /**
@@ -4928,35 +4928,35 @@ fr.version = "3.2.0";
4928
4928
  Object.defineProperty(xt, "__esModule", { value: !0 });
4929
4929
  xt.WsTransport = void 0;
4930
4930
  xt.wsUrlParseFn = si;
4931
- xt.wsconnect = ea;
4932
- const Je = be, ri = st, Vs = Ut, Js = at, Ys = je, Ws = jt, Xs = fr, ni = re, Zs = Xs.version, Qs = "nats.ws";
4931
+ xt.wsconnect = eo;
4932
+ const Je = be, ri = st, Vs = Ut, Js = ot, Ys = je, Ws = jt, Xs = fr, ni = re, Zs = Xs.version, Qs = "nats.ws";
4933
4933
  class ii {
4934
4934
  constructor() {
4935
- l(this, "version");
4936
- l(this, "lang");
4937
- l(this, "closeError");
4938
- l(this, "connected");
4939
- l(this, "done");
4935
+ d(this, "version");
4936
+ d(this, "lang");
4937
+ d(this, "closeError");
4938
+ d(this, "connected");
4939
+ d(this, "done");
4940
4940
  // @ts-ignore: expecting global WebSocket
4941
- l(this, "socket");
4942
- l(this, "options");
4943
- l(this, "socketClosed");
4944
- l(this, "encrypted");
4945
- l(this, "peeked");
4946
- l(this, "yields");
4947
- l(this, "signal");
4948
- l(this, "closedNotification");
4941
+ d(this, "socket");
4942
+ d(this, "options");
4943
+ d(this, "socketClosed");
4944
+ d(this, "encrypted");
4945
+ d(this, "peeked");
4946
+ d(this, "yields");
4947
+ d(this, "signal");
4948
+ d(this, "closedNotification");
4949
4949
  this.version = Zs, this.lang = Qs, this.connected = !1, this.done = !1, this.socketClosed = !1, this.encrypted = !1, this.peeked = !1, this.yields = [], this.signal = (0, Je.deferred)(), this.closedNotification = (0, Je.deferred)();
4950
4950
  }
4951
4951
  async connect(e, r) {
4952
4952
  const i = (0, Je.deferred)();
4953
4953
  this.options = r;
4954
- const c = e.src;
4954
+ const a = e.src;
4955
4955
  if (r.wsFactory) {
4956
- const { socket: u, encrypted: d } = await r.wsFactory(e.src, r);
4957
- this.socket = u, this.encrypted = d;
4956
+ const { socket: u, encrypted: l } = await r.wsFactory(e.src, r);
4957
+ this.socket = u, this.encrypted = l;
4958
4958
  } else
4959
- this.encrypted = c.indexOf("wss://") === 0, this.socket = new WebSocket(c);
4959
+ this.encrypted = a.indexOf("wss://") === 0, this.socket = new WebSocket(a);
4960
4960
  return this.socket.binaryType = "arraybuffer", this.socket.onopen = () => {
4961
4961
  this.done && this._closed(new Error("aborted"));
4962
4962
  }, this.socket.onmessage = (u) => {
@@ -4966,11 +4966,11 @@ class ii {
4966
4966
  this.signal.resolve();
4967
4967
  return;
4968
4968
  }
4969
- const d = Js.DataBuffer.concat(...this.yields), m = (0, ri.extractProtocolMessage)(d);
4969
+ const l = Js.DataBuffer.concat(...this.yields), m = (0, ri.extractProtocolMessage)(l);
4970
4970
  if (m !== "") {
4971
4971
  const P = Ys.INFO.exec(m);
4972
4972
  if (!P) {
4973
- r.debug && console.error("!!!", (0, Je.render)(d)), i.reject(new Error("unexpected response from server"));
4973
+ r.debug && console.error("!!!", (0, Je.render)(l)), i.reject(new Error("unexpected response from server"));
4974
4974
  return;
4975
4975
  }
4976
4976
  try {
@@ -4982,12 +4982,12 @@ class ii {
4982
4982
  }
4983
4983
  }
4984
4984
  }, this.socket.onclose = (u) => {
4985
- let d;
4986
- !u.wasClean && u.reason !== "" && (d = new Error(u.reason)), this._closed(d), this._cleanup();
4985
+ let l;
4986
+ !u.wasClean && u.reason !== "" && (l = new Error(u.reason)), this._closed(l), this._cleanup();
4987
4987
  }, this.socket.onerror = (u) => {
4988
4988
  if (this.done)
4989
4989
  return;
4990
- const d = u, m = new ni.errors.ConnectionError(d.message);
4990
+ const l = u, m = new ni.errors.ConnectionError(l.message);
4991
4991
  i.reject(m), this._cleanup();
4992
4992
  }, i;
4993
4993
  }
@@ -5067,28 +5067,28 @@ xt.WsTransport = ii;
5067
5067
  function si(t, e) {
5068
5068
  /^(.*:\/\/)(.*)/.test(t) || (typeof e == "boolean" ? t = `${e === !0 ? "https" : "http"}://${t}` : t = `https://${t}`);
5069
5069
  let i = new URL(t);
5070
- const c = i.protocol.toLowerCase();
5071
- c === "ws:" && (e = !1), c === "wss:" && (e = !0), c !== "https:" && c !== "http" && (t = t.replace(/^(.*:\/\/)(.*)/gm, "$2"), i = new URL(`http://${t}`));
5072
- let u, d;
5070
+ const a = i.protocol.toLowerCase();
5071
+ a === "ws:" && (e = !1), a === "wss:" && (e = !0), a !== "https:" && a !== "http" && (t = t.replace(/^(.*:\/\/)(.*)/gm, "$2"), i = new URL(`http://${t}`));
5072
+ let u, l;
5073
5073
  const m = i.hostname, P = i.pathname, g = i.search || "";
5074
- switch (c) {
5074
+ switch (a) {
5075
5075
  case "http:":
5076
5076
  case "ws:":
5077
5077
  case "nats:":
5078
- d = i.port || "80", u = "ws:";
5078
+ l = i.port || "80", u = "ws:";
5079
5079
  break;
5080
5080
  case "https:":
5081
5081
  case "wss:":
5082
5082
  case "tls:":
5083
- d = i.port || "443", u = "wss:";
5083
+ l = i.port || "443", u = "wss:";
5084
5084
  break;
5085
5085
  default:
5086
- d = i.port || e === !0 ? "443" : "80", u = e === !0 ? "wss:" : "ws:";
5086
+ l = i.port || e === !0 ? "443" : "80", u = e === !0 ? "wss:" : "ws:";
5087
5087
  break;
5088
5088
  }
5089
- return `${u}//${m}:${d}${P}${g}`;
5089
+ return `${u}//${m}:${l}${P}${g}`;
5090
5090
  }
5091
- function ea(t = {}) {
5091
+ function eo(t = {}) {
5092
5092
  return (0, ri.setTransportFactory)({
5093
5093
  defaultPort: 443,
5094
5094
  urlParseFn: si,
@@ -5117,21 +5117,21 @@ function ea(t = {}) {
5117
5117
  Object.defineProperty(t, "NatsConnectionImpl", { enumerable: !0, get: function() {
5118
5118
  return i.NatsConnectionImpl;
5119
5119
  } });
5120
- var c = Tt;
5120
+ var a = Tt;
5121
5121
  Object.defineProperty(t, "Nuid", { enumerable: !0, get: function() {
5122
- return c.Nuid;
5122
+ return a.Nuid;
5123
5123
  } }), Object.defineProperty(t, "nuid", { enumerable: !0, get: function() {
5124
- return c.nuid;
5124
+ return a.nuid;
5125
5125
  } });
5126
5126
  var u = kt;
5127
5127
  Object.defineProperty(t, "MsgImpl", { enumerable: !0, get: function() {
5128
5128
  return u.MsgImpl;
5129
5129
  } });
5130
- var d = st;
5130
+ var l = st;
5131
5131
  Object.defineProperty(t, "getResolveFn", { enumerable: !0, get: function() {
5132
- return d.getResolveFn;
5132
+ return l.getResolveFn;
5133
5133
  } }), Object.defineProperty(t, "setTransportFactory", { enumerable: !0, get: function() {
5134
- return d.setTransportFactory;
5134
+ return l.setTransportFactory;
5135
5135
  } });
5136
5136
  var m = je;
5137
5137
  Object.defineProperty(t, "Connect", { enumerable: !0, get: function() {
@@ -5181,7 +5181,7 @@ function ea(t = {}) {
5181
5181
  Object.defineProperty(t, "MuxSubscription", { enumerable: !0, get: function() {
5182
5182
  return w.MuxSubscription;
5183
5183
  } });
5184
- var b = at;
5184
+ var b = ot;
5185
5185
  Object.defineProperty(t, "DataBuffer", { enumerable: !0, get: function() {
5186
5186
  return b.DataBuffer;
5187
5187
  } });
@@ -5279,13 +5279,13 @@ function ea(t = {}) {
5279
5279
  } }), Object.defineProperty(t, "protoLen", { enumerable: !0, get: function() {
5280
5280
  return Et.protoLen;
5281
5281
  } });
5282
- var ot = Me;
5282
+ var at = Ie;
5283
5283
  Object.defineProperty(t, "createInbox", { enumerable: !0, get: function() {
5284
- return ot.createInbox;
5284
+ return at.createInbox;
5285
5285
  } }), Object.defineProperty(t, "Match", { enumerable: !0, get: function() {
5286
- return ot.Match;
5286
+ return at.Match;
5287
5287
  } }), Object.defineProperty(t, "syncIterator", { enumerable: !0, get: function() {
5288
- return ot.syncIterator;
5288
+ return at.syncIterator;
5289
5289
  } });
5290
5290
  var ct = je;
5291
5291
  Object.defineProperty(t, "SubscriptionImpl", { enumerable: !0, get: function() {
@@ -5425,21 +5425,43 @@ function ea(t = {}) {
5425
5425
  return e.wsconnect;
5426
5426
  } });
5427
5427
  })(An);
5428
- class ra {
5428
+ class ro {
5429
5429
  constructor(e) {
5430
- l(this, "defaultTimeout");
5430
+ d(this, "defaultTimeout");
5431
5431
  this.natsConnection = e, this.defaultTimeout = parseInt(process.env.NATS_REQUEST_TIMEOUT || "5000", 10);
5432
5432
  }
5433
+ /**
5434
+ * Delete a resource
5435
+ */
5436
+ async deleteResource(e, r, i = "", a) {
5437
+ let u = "moderation." + r + ".delete";
5438
+ i && (u = `${i}.${u}`), console.debug("Sending request to NATS subject", { messageAddress: u });
5439
+ const l = await this.natsConnection.request(u, JSON.stringify(e), this.toNatsOptions(a));
5440
+ if (!l)
5441
+ throw console.warn("No reply received for subject", { messageAddress: u }), new Error("No reply received");
5442
+ return this.extractResponse(l.json());
5443
+ }
5433
5444
  /**
5434
5445
  * Verify the rights for a user to see the resource
5435
5446
  */
5436
- async hasRight(e, r, i = "", c) {
5447
+ async hasRight(e, r, i = "", a) {
5437
5448
  let u = "moderation." + r + ".rights";
5438
5449
  i && (u = `${i}.${u}`), console.debug("Sending request to NATS subject", { messageAddress: u });
5439
- const d = await this.natsConnection.request(u, JSON.stringify(e), this.toNatsOptions(c));
5440
- if (!d)
5450
+ const l = await this.natsConnection.request(u, JSON.stringify(e), this.toNatsOptions(a));
5451
+ if (!l)
5452
+ throw console.warn("No reply received for subject", { messageAddress: u }), new Error("No reply received");
5453
+ return this.extractResponse(l.json());
5454
+ }
5455
+ /**
5456
+ * Retrieve a list of versions from a list of resource
5457
+ */
5458
+ async resourcesVersions(e, r, i = "", a) {
5459
+ let u = "moderation." + r + ".versions";
5460
+ i && (u = `${i}.${u}`), console.debug("Sending request to NATS subject", { messageAddress: u });
5461
+ const l = await this.natsConnection.request(u, JSON.stringify(e), this.toNatsOptions(a));
5462
+ if (!l)
5441
5463
  throw console.warn("No reply received for subject", { messageAddress: u }), new Error("No reply received");
5442
- return this.extractResponse(d.json());
5464
+ return this.extractResponse(l.json());
5443
5465
  }
5444
5466
  extractResponse(e) {
5445
5467
  return e.response || e;
@@ -5447,14 +5469,14 @@ class ra {
5447
5469
  toNatsOptions(e) {
5448
5470
  const i = { timeout: (e == null ? void 0 : e.timeout) ?? this.defaultTimeout };
5449
5471
  if (e != null && e.headers) {
5450
- const c = An.headers();
5451
- for (const [u, d] of Object.entries(e.headers))
5452
- Array.isArray(d) ? d.forEach((m) => c.append(u, m)) : c.set(u, d);
5453
- i.headers = c;
5472
+ const a = An.headers();
5473
+ for (const [u, l] of Object.entries(e.headers))
5474
+ Array.isArray(l) ? l.forEach((m) => a.append(u, m)) : a.set(u, l);
5475
+ i.headers = a;
5454
5476
  }
5455
5477
  return i;
5456
5478
  }
5457
5479
  }
5458
5480
  export {
5459
- ra as ModerationNatsServiceClient
5481
+ ro as ModerationNatsServiceClient
5460
5482
  };