geekin-devtoys 0.2.4 → 0.2.5

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.
@@ -1,98 +1,97 @@
1
- import { ElMessageBox as Pt, ElMessage as Vt } from "element-plus";
2
- import { withDirectives as Ct, createElementBlock as Ot, openBlock as Mt, vShow as Nt } from "vue";
3
- import { _ as _t } from "../_plugin-vue_export-helper-CHgC5LLL.mjs";
4
- var qt = "0123456789abcdefghijklmnopqrstuvwxyz";
5
- function P(r) {
6
- return qt.charAt(r);
1
+ import { ref as C, watch as it, onMounted as Jt, onBeforeUnmount as zt, withDirectives as Wt, createElementBlock as Gt, openBlock as Zt, vShow as $t } from "vue";
2
+ import { ElMessage as rt, ElMessageBox as Yt } from "element-plus";
3
+ var Xt = "0123456789abcdefghijklmnopqrstuvwxyz";
4
+ function H(r) {
5
+ return Xt.charAt(r);
7
6
  }
8
- function Ht(r, t) {
7
+ function Qt(r, t) {
9
8
  return r & t;
10
9
  }
11
- function G(r, t) {
10
+ function nt(r, t) {
12
11
  return r | t;
13
12
  }
14
- function pt(r, t) {
13
+ function Dt(r, t) {
15
14
  return r ^ t;
16
15
  }
17
- function dt(r, t) {
16
+ function xt(r, t) {
18
17
  return r & ~t;
19
18
  }
20
- function kt(r) {
19
+ function te(r) {
21
20
  if (r == 0)
22
21
  return -1;
23
22
  var t = 0;
24
23
  return (r & 65535) == 0 && (r >>= 16, t += 16), (r & 255) == 0 && (r >>= 8, t += 8), (r & 15) == 0 && (r >>= 4, t += 4), (r & 3) == 0 && (r >>= 2, t += 2), (r & 1) == 0 && ++t, t;
25
24
  }
26
- function Ft(r) {
25
+ function ee(r) {
27
26
  for (var t = 0; r != 0; )
28
27
  r &= r - 1, ++t;
29
28
  return t;
30
29
  }
31
- var F = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", xt = "=";
32
- function J(r) {
30
+ var $ = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", Ht = "=";
31
+ function tt(r) {
33
32
  var t, e, i = "";
34
33
  for (t = 0; t + 3 <= r.length; t += 3)
35
- e = parseInt(r.substring(t, t + 3), 16), i += F.charAt(e >> 6) + F.charAt(e & 63);
36
- for (t + 1 == r.length ? (e = parseInt(r.substring(t, t + 1), 16), i += F.charAt(e << 2)) : t + 2 == r.length && (e = parseInt(r.substring(t, t + 2), 16), i += F.charAt(e >> 2) + F.charAt((e & 3) << 4)); (i.length & 3) > 0; )
37
- i += xt;
34
+ e = parseInt(r.substring(t, t + 3), 16), i += $.charAt(e >> 6) + $.charAt(e & 63);
35
+ for (t + 1 == r.length ? (e = parseInt(r.substring(t, t + 1), 16), i += $.charAt(e << 2)) : t + 2 == r.length && (e = parseInt(r.substring(t, t + 2), 16), i += $.charAt(e >> 2) + $.charAt((e & 3) << 4)); (i.length & 3) > 0; )
36
+ i += Ht;
38
37
  return i;
39
38
  }
40
- function gt(r) {
39
+ function Rt(r) {
41
40
  var t = "", e, i = 0, n = 0;
42
- for (e = 0; e < r.length && r.charAt(e) != xt; ++e) {
43
- var s = F.indexOf(r.charAt(e));
44
- s < 0 || (i == 0 ? (t += P(s >> 2), n = s & 3, i = 1) : i == 1 ? (t += P(n << 2 | s >> 4), n = s & 15, i = 2) : i == 2 ? (t += P(n), t += P(s >> 2), n = s & 3, i = 3) : (t += P(n << 2 | s >> 4), t += P(s & 15), i = 0));
41
+ for (e = 0; e < r.length && r.charAt(e) != Ht; ++e) {
42
+ var s = $.indexOf(r.charAt(e));
43
+ s < 0 || (i == 0 ? (t += H(s >> 2), n = s & 3, i = 1) : i == 1 ? (t += H(n << 2 | s >> 4), n = s & 15, i = 2) : i == 2 ? (t += H(n), t += H(s >> 2), n = s & 3, i = 3) : (t += H(n << 2 | s >> 4), t += H(s & 15), i = 0));
45
44
  }
46
- return i == 1 && (t += P(n << 2)), t;
45
+ return i == 1 && (t += H(n << 2)), t;
47
46
  }
48
- var H, Lt = {
47
+ var G, ie = {
49
48
  decode: function(r) {
50
49
  var t;
51
- if (H === void 0) {
50
+ if (G === void 0) {
52
51
  var e = "0123456789ABCDEF", i = ` \f
53
52
  \r  \u2028\u2029`;
54
- for (H = {}, t = 0; t < 16; ++t)
55
- H[e.charAt(t)] = t;
53
+ for (G = {}, t = 0; t < 16; ++t)
54
+ G[e.charAt(t)] = t;
56
55
  for (e = e.toLowerCase(), t = 10; t < 16; ++t)
57
- H[e.charAt(t)] = t;
56
+ G[e.charAt(t)] = t;
58
57
  for (t = 0; t < i.length; ++t)
59
- H[i.charAt(t)] = -1;
58
+ G[i.charAt(t)] = -1;
60
59
  }
61
60
  var n = [], s = 0, o = 0;
62
61
  for (t = 0; t < r.length; ++t) {
63
- var h = r.charAt(t);
64
- if (h == "=")
62
+ var a = r.charAt(t);
63
+ if (a == "=")
65
64
  break;
66
- if (h = H[h], h != -1) {
67
- if (h === void 0)
65
+ if (a = G[a], a != -1) {
66
+ if (a === void 0)
68
67
  throw new Error("Illegal character at offset " + t);
69
- s |= h, ++o >= 2 ? (n[n.length] = s, s = 0, o = 0) : s <<= 4;
68
+ s |= a, ++o >= 2 ? (n[n.length] = s, s = 0, o = 0) : s <<= 4;
70
69
  }
71
70
  }
72
71
  if (o)
73
72
  throw new Error("Hex encoding incomplete: 4 bits missing");
74
73
  return n;
75
74
  }
76
- }, N, ut = {
75
+ }, z, Tt = {
77
76
  decode: function(r) {
78
77
  var t;
79
- if (N === void 0) {
78
+ if (z === void 0) {
80
79
  var e = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", i = `= \f
81
80
  \r  \u2028\u2029`;
82
- for (N = /* @__PURE__ */ Object.create(null), t = 0; t < 64; ++t)
83
- N[e.charAt(t)] = t;
84
- for (N["-"] = 62, N._ = 63, t = 0; t < i.length; ++t)
85
- N[i.charAt(t)] = -1;
81
+ for (z = /* @__PURE__ */ Object.create(null), t = 0; t < 64; ++t)
82
+ z[e.charAt(t)] = t;
83
+ for (z["-"] = 62, z._ = 63, t = 0; t < i.length; ++t)
84
+ z[i.charAt(t)] = -1;
86
85
  }
87
86
  var n = [], s = 0, o = 0;
88
87
  for (t = 0; t < r.length; ++t) {
89
- var h = r.charAt(t);
90
- if (h == "=")
88
+ var a = r.charAt(t);
89
+ if (a == "=")
91
90
  break;
92
- if (h = N[h], h != -1) {
93
- if (h === void 0)
91
+ if (a = z[a], a != -1) {
92
+ if (a === void 0)
94
93
  throw new Error("Illegal character at offset " + t);
95
- s |= h, ++o >= 4 ? (n[n.length] = s >> 16, n[n.length] = s >> 8 & 255, n[n.length] = s & 255, s = 0, o = 0) : s <<= 6;
94
+ s |= a, ++o >= 4 ? (n[n.length] = s >> 16, n[n.length] = s >> 8 & 255, n[n.length] = s & 255, s = 0, o = 0) : s <<= 6;
96
95
  }
97
96
  }
98
97
  switch (o) {
@@ -109,7 +108,7 @@ var H, Lt = {
109
108
  },
110
109
  re: /-----BEGIN [^-]+-----([A-Za-z0-9+\/=\s]+)-----END [^-]+-----|begin-base64[^\n]+\n([A-Za-z0-9+\/=\s]+)====/,
111
110
  unarmor: function(r) {
112
- var t = ut.re.exec(r);
111
+ var t = Tt.re.exec(r);
113
112
  if (t)
114
113
  if (t[1])
115
114
  r = t[1];
@@ -117,9 +116,9 @@ var H, Lt = {
117
116
  r = t[2];
118
117
  else
119
118
  throw new Error("RegExp out of sync");
120
- return ut.decode(r);
119
+ return Tt.decode(r);
121
120
  }
122
- }, k = 1e13, W = (
121
+ }, Z = 1e13, Q = (
123
122
  /** @class */
124
123
  (function() {
125
124
  function r(t) {
@@ -128,34 +127,34 @@ var H, Lt = {
128
127
  return r.prototype.mulAdd = function(t, e) {
129
128
  var i = this.buf, n = i.length, s, o;
130
129
  for (s = 0; s < n; ++s)
131
- o = i[s] * t + e, o < k ? e = 0 : (e = 0 | o / k, o -= e * k), i[s] = o;
130
+ o = i[s] * t + e, o < Z ? e = 0 : (e = 0 | o / Z, o -= e * Z), i[s] = o;
132
131
  e > 0 && (i[s] = e);
133
132
  }, r.prototype.sub = function(t) {
134
133
  var e = this.buf, i = e.length, n, s;
135
134
  for (n = 0; n < i; ++n)
136
- s = e[n] - t, s < 0 ? (s += k, t = 1) : t = 0, e[n] = s;
135
+ s = e[n] - t, s < 0 ? (s += Z, t = 1) : t = 0, e[n] = s;
137
136
  for (; e[e.length - 1] === 0; )
138
137
  e.pop();
139
138
  }, r.prototype.toString = function(t) {
140
139
  if ((t || 10) != 10)
141
140
  throw new Error("only base 10 is supported");
142
141
  for (var e = this.buf, i = e[e.length - 1].toString(), n = e.length - 2; n >= 0; --n)
143
- i += (k + e[n]).toString().substring(1);
142
+ i += (Z + e[n]).toString().substring(1);
144
143
  return i;
145
144
  }, r.prototype.valueOf = function() {
146
145
  for (var t = this.buf, e = 0, i = t.length - 1; i >= 0; --i)
147
- e = e * k + t[i];
146
+ e = e * Z + t[i];
148
147
  return e;
149
148
  }, r.prototype.simplify = function() {
150
149
  var t = this.buf;
151
150
  return t.length == 1 ? t[0] : this;
152
151
  }, r;
153
152
  })()
154
- ), Rt = "…", Kt = /^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/, jt = /^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;
155
- function L(r, t) {
156
- return r.length > t && (r = r.substring(0, t) + Rt), r;
153
+ ), Ft = "…", re = /^(\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/, ne = /^(\d\d\d\d)(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01])([01]\d|2[0-3])(?:([0-5]\d)(?:([0-5]\d)(?:[.,](\d{1,3}))?)?)?(Z|[-+](?:[0]\d|1[0-2])([0-5]\d)?)?$/;
154
+ function Y(r, t) {
155
+ return r.length > t && (r = r.substring(0, t) + Ft), r;
157
156
  }
158
- var st = (
157
+ var vt = (
159
158
  /** @class */
160
159
  (function() {
161
160
  function r(t, e) {
@@ -204,47 +203,47 @@ var st = (
204
203
  n = this.get(o++), s = this.get(o++), i += String.fromCharCode(n << 8 | s);
205
204
  return i;
206
205
  }, r.prototype.parseTime = function(t, e, i) {
207
- var n = this.parseStringISO(t, e), s = (i ? Kt : jt).exec(n);
206
+ var n = this.parseStringISO(t, e), s = (i ? re : ne).exec(n);
208
207
  return s ? (i && (s[1] = +s[1], s[1] += +s[1] < 70 ? 2e3 : 1900), n = s[1] + "-" + s[2] + "-" + s[3] + " " + s[4], s[5] && (n += ":" + s[5], s[6] && (n += ":" + s[6], s[7] && (n += "." + s[7]))), s[8] && (n += " UTC", s[8] != "Z" && (n += s[8], s[9] && (n += ":" + s[9]))), n) : "Unrecognized time: " + n;
209
208
  }, r.prototype.parseInteger = function(t, e) {
210
- for (var i = this.get(t), n = i > 127, s = n ? 255 : 0, o, h = ""; i == s && ++t < e; )
209
+ for (var i = this.get(t), n = i > 127, s = n ? 255 : 0, o, a = ""; i == s && ++t < e; )
211
210
  i = this.get(t);
212
211
  if (o = e - t, o === 0)
213
212
  return n ? -1 : 0;
214
213
  if (o > 4) {
215
- for (h = i, o <<= 3; ((+h ^ s) & 128) == 0; )
216
- h = +h << 1, --o;
217
- h = "(" + o + ` bit)
214
+ for (a = i, o <<= 3; ((+a ^ s) & 128) == 0; )
215
+ a = +a << 1, --o;
216
+ a = "(" + o + ` bit)
218
217
  `;
219
218
  }
220
219
  n && (i = i - 256);
221
- for (var a = new W(i), f = t + 1; f < e; ++f)
222
- a.mulAdd(256, this.get(f));
223
- return h + a.toString();
220
+ for (var h = new Q(i), f = t + 1; f < e; ++f)
221
+ h.mulAdd(256, this.get(f));
222
+ return a + h.toString();
224
223
  }, r.prototype.parseBitString = function(t, e, i) {
225
224
  for (var n = this.get(t), s = (e - t - 1 << 3) - n, o = "(" + s + ` bit)
226
- `, h = "", a = t + 1; a < e; ++a) {
227
- for (var f = this.get(a), l = a == e - 1 ? n : 0, c = 7; c >= l; --c)
228
- h += f >> c & 1 ? "1" : "0";
229
- if (h.length > i)
230
- return o + L(h, i);
225
+ `, a = "", h = t + 1; h < e; ++h) {
226
+ for (var f = this.get(h), l = h == e - 1 ? n : 0, c = 7; c >= l; --c)
227
+ a += f >> c & 1 ? "1" : "0";
228
+ if (a.length > i)
229
+ return o + Y(a, i);
231
230
  }
232
- return o + h;
231
+ return o + a;
233
232
  }, r.prototype.parseOctetString = function(t, e, i) {
234
233
  if (this.isASCII(t, e))
235
- return L(this.parseStringISO(t, e), i);
234
+ return Y(this.parseStringISO(t, e), i);
236
235
  var n = e - t, s = "(" + n + ` byte)
237
236
  `;
238
237
  i /= 2, n > i && (e = t + i);
239
238
  for (var o = t; o < e; ++o)
240
239
  s += this.hexByte(this.get(o));
241
- return n > i && (s += Rt), s;
240
+ return n > i && (s += Ft), s;
242
241
  }, r.prototype.parseOID = function(t, e, i) {
243
- for (var n = "", s = new W(), o = 0, h = t; h < e; ++h) {
244
- var a = this.get(h);
245
- if (s.mulAdd(128, a & 127), o += 7, !(a & 128)) {
242
+ for (var n = "", s = new Q(), o = 0, a = t; a < e; ++a) {
243
+ var h = this.get(a);
244
+ if (s.mulAdd(128, h & 127), o += 7, !(h & 128)) {
246
245
  if (n === "")
247
- if (s = s.simplify(), s instanceof W)
246
+ if (s = s.simplify(), s instanceof Q)
248
247
  s.sub(80), n = "2." + s.toString();
249
248
  else {
250
249
  var f = s < 80 ? s < 40 ? 0 : 1 : 2;
@@ -253,18 +252,18 @@ var st = (
253
252
  else
254
253
  n += "." + s.toString();
255
254
  if (n.length > i)
256
- return L(n, i);
257
- s = new W(), o = 0;
255
+ return Y(n, i);
256
+ s = new Q(), o = 0;
258
257
  }
259
258
  }
260
259
  return o > 0 && (n += ".incomplete"), n;
261
260
  }, r;
262
261
  })()
263
- ), Ut = (
262
+ ), se = (
264
263
  /** @class */
265
264
  (function() {
266
265
  function r(t, e, i, n, s) {
267
- if (!(n instanceof vt))
266
+ if (!(n instanceof At))
268
267
  throw new Error("Invalid tag value.");
269
268
  this.stream = t, this.header = e, this.length = i, this.tag = n, this.sub = s;
270
269
  }
@@ -369,7 +368,7 @@ var st = (
369
368
  case 17:
370
369
  return this.sub !== null ? "(" + this.sub.length + " elem)" : "(no elem)";
371
370
  case 12:
372
- return L(this.stream.parseStringUTF(e, e + i), t);
371
+ return Y(this.stream.parseStringUTF(e, e + i), t);
373
372
  case 18:
374
373
  // NumericString
375
374
  case 19:
@@ -382,9 +381,9 @@ var st = (
382
381
  // IA5String
383
382
  // case 0x19: // GraphicString
384
383
  case 26:
385
- return L(this.stream.parseStringISO(e, e + i), t);
384
+ return Y(this.stream.parseStringISO(e, e + i), t);
386
385
  case 30:
387
- return L(this.stream.parseStringBMP(e, e + i), t);
386
+ return Y(this.stream.parseStringBMP(e, e + i), t);
388
387
  case 23:
389
388
  // UTCTime
390
389
  case 24:
@@ -428,13 +427,13 @@ var st = (
428
427
  return t.substring(e, e + i);
429
428
  }, r.decode = function(t) {
430
429
  var e;
431
- t instanceof st ? e = t : e = new st(t, 0);
432
- var i = new st(e), n = new vt(e), s = r.decodeLength(e), o = e.pos, h = o - i.pos, a = null, f = function() {
430
+ t instanceof vt ? e = t : e = new vt(t, 0);
431
+ var i = new vt(e), n = new At(e), s = r.decodeLength(e), o = e.pos, a = o - i.pos, h = null, f = function() {
433
432
  var c = [];
434
433
  if (s !== null) {
435
- for (var g = o + s; e.pos < g; )
434
+ for (var v = o + s; e.pos < v; )
436
435
  c[c.length] = r.decode(e);
437
- if (e.pos != g)
436
+ if (e.pos != v)
438
437
  throw new Error("Content size is not correct for container starting at offset " + o);
439
438
  } else
440
439
  try {
@@ -445,39 +444,39 @@ var st = (
445
444
  c[c.length] = p;
446
445
  }
447
446
  s = o - e.pos;
448
- } catch (m) {
449
- throw new Error("Exception while decoding undefined length content: " + m);
447
+ } catch (T) {
448
+ throw new Error("Exception while decoding undefined length content: " + T);
450
449
  }
451
450
  return c;
452
451
  };
453
452
  if (n.tagConstructed)
454
- a = f();
453
+ h = f();
455
454
  else if (n.isUniversal() && (n.tagNumber == 3 || n.tagNumber == 4))
456
455
  try {
457
456
  if (n.tagNumber == 3 && e.get() != 0)
458
457
  throw new Error("BIT STRINGs with unused bits cannot encapsulate.");
459
- a = f();
460
- for (var l = 0; l < a.length; ++l)
461
- if (a[l].tag.isEOC())
458
+ h = f();
459
+ for (var l = 0; l < h.length; ++l)
460
+ if (h[l].tag.isEOC())
462
461
  throw new Error("EOC is not supposed to be actual content.");
463
462
  } catch {
464
- a = null;
463
+ h = null;
465
464
  }
466
- if (a === null) {
465
+ if (h === null) {
467
466
  if (s === null)
468
467
  throw new Error("We can't skip over an invalid tag with undefined length at offset " + o);
469
468
  e.pos = o + Math.abs(s);
470
469
  }
471
- return new r(i, h, s, n, a);
470
+ return new r(i, a, s, n, h);
472
471
  }, r;
473
472
  })()
474
- ), vt = (
473
+ ), At = (
475
474
  /** @class */
476
475
  (function() {
477
476
  function r(t) {
478
477
  var e = t.get();
479
478
  if (this.tagClass = e >> 6, this.tagConstructed = (e & 32) !== 0, this.tagNumber = e & 31, this.tagNumber == 31) {
480
- var i = new W();
479
+ var i = new Q();
481
480
  do
482
481
  e = t.get(), i.mulAdd(128, e & 127);
483
482
  while (e & 128);
@@ -490,7 +489,7 @@ var st = (
490
489
  return this.tagClass === 0 && this.tagNumber === 0;
491
490
  }, r;
492
491
  })()
493
- ), O, Wt = 244837814094590, yt = (Wt & 16777215) == 15715070, E = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997], Jt = (1 << 26) / E[E.length - 1], d = (
492
+ ), U, oe = 244837814094590, Bt = (oe & 16777215) == 15715070, R = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269, 271, 277, 281, 283, 293, 307, 311, 313, 317, 331, 337, 347, 349, 353, 359, 367, 373, 379, 383, 389, 397, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 503, 509, 521, 523, 541, 547, 557, 563, 569, 571, 577, 587, 593, 599, 601, 607, 613, 617, 619, 631, 641, 643, 647, 653, 659, 661, 673, 677, 683, 691, 701, 709, 719, 727, 733, 739, 743, 751, 757, 761, 769, 773, 787, 797, 809, 811, 821, 823, 827, 829, 839, 853, 857, 859, 863, 877, 881, 883, 887, 907, 911, 919, 929, 937, 941, 947, 953, 967, 971, 977, 983, 991, 997], ae = (1 << 26) / R[R.length - 1], g = (
494
493
  /** @class */
495
494
  (function() {
496
495
  function r(t, e, i) {
@@ -512,13 +511,13 @@ var st = (
512
511
  e = 2;
513
512
  else
514
513
  return this.toRadix(t);
515
- var i = (1 << e) - 1, n, s = !1, o = "", h = this.t, a = this.DB - h * this.DB % e;
516
- if (h-- > 0)
517
- for (a < this.DB && (n = this[h] >> a) > 0 && (s = !0, o = P(n)); h >= 0; )
518
- a < e ? (n = (this[h] & (1 << a) - 1) << e - a, n |= this[--h] >> (a += this.DB - e)) : (n = this[h] >> (a -= e) & i, a <= 0 && (a += this.DB, --h)), n > 0 && (s = !0), s && (o += P(n));
514
+ var i = (1 << e) - 1, n, s = !1, o = "", a = this.t, h = this.DB - a * this.DB % e;
515
+ if (a-- > 0)
516
+ for (h < this.DB && (n = this[a] >> h) > 0 && (s = !0, o = H(n)); a >= 0; )
517
+ h < e ? (n = (this[a] & (1 << h) - 1) << e - h, n |= this[--a] >> (h += this.DB - e)) : (n = this[a] >> (h -= e) & i, h <= 0 && (h += this.DB, --a)), n > 0 && (s = !0), s && (o += H(n));
519
518
  return s ? o : "0";
520
519
  }, r.prototype.negate = function() {
521
- var t = v();
520
+ var t = S();
522
521
  return r.ZERO.subTo(this, t), t;
523
522
  }, r.prototype.abs = function() {
524
523
  return this.s < 0 ? this.negate() : this;
@@ -534,15 +533,15 @@ var st = (
534
533
  return e;
535
534
  return 0;
536
535
  }, r.prototype.bitLength = function() {
537
- return this.t <= 0 ? 0 : this.DB * (this.t - 1) + Z(this[this.t - 1] ^ this.s & this.DM);
536
+ return this.t <= 0 ? 0 : this.DB * (this.t - 1) + st(this[this.t - 1] ^ this.s & this.DM);
538
537
  }, r.prototype.mod = function(t) {
539
- var e = v();
538
+ var e = S();
540
539
  return this.abs().divRemTo(t, null, e), this.s < 0 && e.compareTo(r.ZERO) > 0 && t.subTo(e, e), e;
541
540
  }, r.prototype.modPowInt = function(t, e) {
542
541
  var i;
543
- return t < 256 || e.isEven() ? i = new mt(e) : i = new St(e), this.exp(t, i);
542
+ return t < 256 || e.isEven() ? i = new It(e) : i = new Vt(e), this.exp(t, i);
544
543
  }, r.prototype.clone = function() {
545
- var t = v();
544
+ var t = S();
546
545
  return this.copyTo(t), t;
547
546
  }, r.prototype.intValue = function() {
548
547
  if (this.s < 0) {
@@ -578,111 +577,111 @@ var st = (
578
577
  }, r.prototype.max = function(t) {
579
578
  return this.compareTo(t) > 0 ? this : t;
580
579
  }, r.prototype.and = function(t) {
581
- var e = v();
582
- return this.bitwiseTo(t, Ht, e), e;
580
+ var e = S();
581
+ return this.bitwiseTo(t, Qt, e), e;
583
582
  }, r.prototype.or = function(t) {
584
- var e = v();
585
- return this.bitwiseTo(t, G, e), e;
583
+ var e = S();
584
+ return this.bitwiseTo(t, nt, e), e;
586
585
  }, r.prototype.xor = function(t) {
587
- var e = v();
588
- return this.bitwiseTo(t, pt, e), e;
586
+ var e = S();
587
+ return this.bitwiseTo(t, Dt, e), e;
589
588
  }, r.prototype.andNot = function(t) {
590
- var e = v();
591
- return this.bitwiseTo(t, dt, e), e;
589
+ var e = S();
590
+ return this.bitwiseTo(t, xt, e), e;
592
591
  }, r.prototype.not = function() {
593
- for (var t = v(), e = 0; e < this.t; ++e)
592
+ for (var t = S(), e = 0; e < this.t; ++e)
594
593
  t[e] = this.DM & ~this[e];
595
594
  return t.t = this.t, t.s = ~this.s, t;
596
595
  }, r.prototype.shiftLeft = function(t) {
597
- var e = v();
596
+ var e = S();
598
597
  return t < 0 ? this.rShiftTo(-t, e) : this.lShiftTo(t, e), e;
599
598
  }, r.prototype.shiftRight = function(t) {
600
- var e = v();
599
+ var e = S();
601
600
  return t < 0 ? this.lShiftTo(-t, e) : this.rShiftTo(t, e), e;
602
601
  }, r.prototype.getLowestSetBit = function() {
603
602
  for (var t = 0; t < this.t; ++t)
604
603
  if (this[t] != 0)
605
- return t * this.DB + kt(this[t]);
604
+ return t * this.DB + te(this[t]);
606
605
  return this.s < 0 ? this.t * this.DB : -1;
607
606
  }, r.prototype.bitCount = function() {
608
607
  for (var t = 0, e = this.s & this.DM, i = 0; i < this.t; ++i)
609
- t += Ft(this[i] ^ e);
608
+ t += ee(this[i] ^ e);
610
609
  return t;
611
610
  }, r.prototype.testBit = function(t) {
612
611
  var e = Math.floor(t / this.DB);
613
612
  return e >= this.t ? this.s != 0 : (this[e] & 1 << t % this.DB) != 0;
614
613
  }, r.prototype.setBit = function(t) {
615
- return this.changeBit(t, G);
614
+ return this.changeBit(t, nt);
616
615
  }, r.prototype.clearBit = function(t) {
617
- return this.changeBit(t, dt);
616
+ return this.changeBit(t, xt);
618
617
  }, r.prototype.flipBit = function(t) {
619
- return this.changeBit(t, pt);
618
+ return this.changeBit(t, Dt);
620
619
  }, r.prototype.add = function(t) {
621
- var e = v();
620
+ var e = S();
622
621
  return this.addTo(t, e), e;
623
622
  }, r.prototype.subtract = function(t) {
624
- var e = v();
623
+ var e = S();
625
624
  return this.subTo(t, e), e;
626
625
  }, r.prototype.multiply = function(t) {
627
- var e = v();
626
+ var e = S();
628
627
  return this.multiplyTo(t, e), e;
629
628
  }, r.prototype.divide = function(t) {
630
- var e = v();
629
+ var e = S();
631
630
  return this.divRemTo(t, e, null), e;
632
631
  }, r.prototype.remainder = function(t) {
633
- var e = v();
632
+ var e = S();
634
633
  return this.divRemTo(t, null, e), e;
635
634
  }, r.prototype.divideAndRemainder = function(t) {
636
- var e = v(), i = v();
635
+ var e = S(), i = S();
637
636
  return this.divRemTo(t, e, i), [e, i];
638
637
  }, r.prototype.modPow = function(t, e) {
639
- var i = t.bitLength(), n, s = V(1), o;
638
+ var i = t.bitLength(), n, s = j(1), o;
640
639
  if (i <= 0)
641
640
  return s;
642
- i < 18 ? n = 1 : i < 48 ? n = 3 : i < 144 ? n = 4 : i < 768 ? n = 5 : n = 6, i < 8 ? o = new mt(e) : e.isEven() ? o = new $t(e) : o = new St(e);
643
- var h = [], a = 3, f = n - 1, l = (1 << n) - 1;
644
- if (h[1] = o.convert(this), n > 1) {
645
- var c = v();
646
- for (o.sqrTo(h[1], c); a <= l; )
647
- h[a] = v(), o.mulTo(c, h[a - 2], h[a]), a += 2;
641
+ i < 18 ? n = 1 : i < 48 ? n = 3 : i < 144 ? n = 4 : i < 768 ? n = 5 : n = 6, i < 8 ? o = new It(e) : e.isEven() ? o = new ue(e) : o = new Vt(e);
642
+ var a = [], h = 3, f = n - 1, l = (1 << n) - 1;
643
+ if (a[1] = o.convert(this), n > 1) {
644
+ var c = S();
645
+ for (o.sqrTo(a[1], c); h <= l; )
646
+ a[h] = S(), o.mulTo(c, a[h - 2], a[h]), h += 2;
648
647
  }
649
- var g = t.t - 1, p, m = !0, S = v(), D;
650
- for (i = Z(t[g]) - 1; g >= 0; ) {
651
- for (i >= f ? p = t[g] >> i - f & l : (p = (t[g] & (1 << i + 1) - 1) << f - i, g > 0 && (p |= t[g - 1] >> this.DB + i - f)), a = n; (p & 1) == 0; )
652
- p >>= 1, --a;
653
- if ((i -= a) < 0 && (i += this.DB, --g), m)
654
- h[p].copyTo(s), m = !1;
648
+ var v = t.t - 1, p, T = !0, b = S(), x;
649
+ for (i = st(t[v]) - 1; v >= 0; ) {
650
+ for (i >= f ? p = t[v] >> i - f & l : (p = (t[v] & (1 << i + 1) - 1) << f - i, v > 0 && (p |= t[v - 1] >> this.DB + i - f)), h = n; (p & 1) == 0; )
651
+ p >>= 1, --h;
652
+ if ((i -= h) < 0 && (i += this.DB, --v), T)
653
+ a[p].copyTo(s), T = !1;
655
654
  else {
656
- for (; a > 1; )
657
- o.sqrTo(s, S), o.sqrTo(S, s), a -= 2;
658
- a > 0 ? o.sqrTo(s, S) : (D = s, s = S, S = D), o.mulTo(S, h[p], s);
655
+ for (; h > 1; )
656
+ o.sqrTo(s, b), o.sqrTo(b, s), h -= 2;
657
+ h > 0 ? o.sqrTo(s, b) : (x = s, s = b, b = x), o.mulTo(b, a[p], s);
659
658
  }
660
- for (; g >= 0 && (t[g] & 1 << i) == 0; )
661
- o.sqrTo(s, S), D = s, s = S, S = D, --i < 0 && (i = this.DB - 1, --g);
659
+ for (; v >= 0 && (t[v] & 1 << i) == 0; )
660
+ o.sqrTo(s, b), x = s, s = b, b = x, --i < 0 && (i = this.DB - 1, --v);
662
661
  }
663
662
  return o.revert(s);
664
663
  }, r.prototype.modInverse = function(t) {
665
664
  var e = t.isEven();
666
665
  if (this.isEven() && e || t.signum() == 0)
667
666
  return r.ZERO;
668
- for (var i = t.clone(), n = this.clone(), s = V(1), o = V(0), h = V(0), a = V(1); i.signum() != 0; ) {
667
+ for (var i = t.clone(), n = this.clone(), s = j(1), o = j(0), a = j(0), h = j(1); i.signum() != 0; ) {
669
668
  for (; i.isEven(); )
670
669
  i.rShiftTo(1, i), e ? ((!s.isEven() || !o.isEven()) && (s.addTo(this, s), o.subTo(t, o)), s.rShiftTo(1, s)) : o.isEven() || o.subTo(t, o), o.rShiftTo(1, o);
671
670
  for (; n.isEven(); )
672
- n.rShiftTo(1, n), e ? ((!h.isEven() || !a.isEven()) && (h.addTo(this, h), a.subTo(t, a)), h.rShiftTo(1, h)) : a.isEven() || a.subTo(t, a), a.rShiftTo(1, a);
673
- i.compareTo(n) >= 0 ? (i.subTo(n, i), e && s.subTo(h, s), o.subTo(a, o)) : (n.subTo(i, n), e && h.subTo(s, h), a.subTo(o, a));
671
+ n.rShiftTo(1, n), e ? ((!a.isEven() || !h.isEven()) && (a.addTo(this, a), h.subTo(t, h)), a.rShiftTo(1, a)) : h.isEven() || h.subTo(t, h), h.rShiftTo(1, h);
672
+ i.compareTo(n) >= 0 ? (i.subTo(n, i), e && s.subTo(a, s), o.subTo(h, o)) : (n.subTo(i, n), e && a.subTo(s, a), h.subTo(o, h));
674
673
  }
675
674
  if (n.compareTo(r.ONE) != 0)
676
675
  return r.ZERO;
677
- if (a.compareTo(t) >= 0)
678
- return a.subtract(t);
679
- if (a.signum() < 0)
680
- a.addTo(t, a);
676
+ if (h.compareTo(t) >= 0)
677
+ return h.subtract(t);
678
+ if (h.signum() < 0)
679
+ h.addTo(t, h);
681
680
  else
682
- return a;
683
- return a.signum() < 0 ? a.add(t) : a;
681
+ return h;
682
+ return h.signum() < 0 ? h.add(t) : h;
684
683
  }, r.prototype.pow = function(t) {
685
- return this.exp(t, new zt());
684
+ return this.exp(t, new he());
686
685
  }, r.prototype.gcd = function(t) {
687
686
  var e = this.s < 0 ? this.negate() : this.clone(), i = t.s < 0 ? t.negate() : t.clone();
688
687
  if (e.compareTo(i) < 0) {
@@ -697,19 +696,19 @@ var st = (
697
696
  return o > 0 && i.lShiftTo(o, i), i;
698
697
  }, r.prototype.isProbablePrime = function(t) {
699
698
  var e, i = this.abs();
700
- if (i.t == 1 && i[0] <= E[E.length - 1]) {
701
- for (e = 0; e < E.length; ++e)
702
- if (i[0] == E[e])
699
+ if (i.t == 1 && i[0] <= R[R.length - 1]) {
700
+ for (e = 0; e < R.length; ++e)
701
+ if (i[0] == R[e])
703
702
  return !0;
704
703
  return !1;
705
704
  }
706
705
  if (i.isEven())
707
706
  return !1;
708
- for (e = 1; e < E.length; ) {
709
- for (var n = E[e], s = e + 1; s < E.length && n < Jt; )
710
- n *= E[s++];
707
+ for (e = 1; e < R.length; ) {
708
+ for (var n = R[e], s = e + 1; s < R.length && n < ae; )
709
+ n *= R[s++];
711
710
  for (n = i.modInt(n); e < s; )
712
- if (n % E[e++] == 0)
711
+ if (n % R[e++] == 0)
713
712
  return !1;
714
713
  }
715
714
  return i.millerRabin(t);
@@ -739,12 +738,12 @@ var st = (
739
738
  }
740
739
  this.t = 0, this.s = 0;
741
740
  for (var n = t.length, s = !1, o = 0; --n >= 0; ) {
742
- var h = i == 8 ? +t[n] & 255 : Tt(t, n);
743
- if (h < 0) {
741
+ var a = i == 8 ? +t[n] & 255 : Nt(t, n);
742
+ if (a < 0) {
744
743
  t.charAt(n) == "-" && (s = !0);
745
744
  continue;
746
745
  }
747
- s = !1, o == 0 ? this[this.t++] = h : o + i > this.DB ? (this[this.t - 1] |= (h & (1 << this.DB - o) - 1) << o, this[this.t++] = h >> this.DB - o) : this[this.t - 1] |= h << o, o += i, o >= this.DB && (o -= this.DB);
746
+ s = !1, o == 0 ? this[this.t++] = a : o + i > this.DB ? (this[this.t - 1] |= (a & (1 << this.DB - o) - 1) << o, this[this.t++] = a >> this.DB - o) : this[this.t - 1] |= a << o, o += i, o >= this.DB && (o -= this.DB);
748
747
  }
749
748
  i == 8 && (+t[0] & 128) != 0 && (this.s = -1, o > 0 && (this[this.t - 1] |= (1 << this.DB - o) - 1 << o)), this.clamp(), s && r.ZERO.subTo(this, this);
750
749
  }, r.prototype.clamp = function() {
@@ -762,11 +761,11 @@ var st = (
762
761
  e[i - t] = this[i];
763
762
  e.t = Math.max(this.t - t, 0), e.s = this.s;
764
763
  }, r.prototype.lShiftTo = function(t, e) {
765
- for (var i = t % this.DB, n = this.DB - i, s = (1 << n) - 1, o = Math.floor(t / this.DB), h = this.s << i & this.DM, a = this.t - 1; a >= 0; --a)
766
- e[a + o + 1] = this[a] >> n | h, h = (this[a] & s) << i;
767
- for (var a = o - 1; a >= 0; --a)
768
- e[a] = 0;
769
- e[o] = h, e.t = this.t + o + 1, e.s = this.s, e.clamp();
764
+ for (var i = t % this.DB, n = this.DB - i, s = (1 << n) - 1, o = Math.floor(t / this.DB), a = this.s << i & this.DM, h = this.t - 1; h >= 0; --h)
765
+ e[h + o + 1] = this[h] >> n | a, a = (this[h] & s) << i;
766
+ for (var h = o - 1; h >= 0; --h)
767
+ e[h] = 0;
768
+ e[o] = a, e.t = this.t + o + 1, e.s = this.s, e.clamp();
770
769
  }, r.prototype.rShiftTo = function(t, e) {
771
770
  e.s = this.s;
772
771
  var i = Math.floor(t / this.DB);
@@ -776,8 +775,8 @@ var st = (
776
775
  }
777
776
  var n = t % this.DB, s = this.DB - n, o = (1 << n) - 1;
778
777
  e[0] = this[i] >> n;
779
- for (var h = i + 1; h < this.t; ++h)
780
- e[h - i - 1] |= (this[h] & o) << s, e[h - i] = this[h] >> n;
778
+ for (var a = i + 1; a < this.t; ++a)
779
+ e[a - i - 1] |= (this[a] & o) << s, e[a - i] = this[a] >> n;
781
780
  n > 0 && (e[this.t - i - 1] |= (this.s & o) << s), e.t = this.t - i, e.clamp();
782
781
  }, r.prototype.subTo = function(t, e) {
783
782
  for (var i = 0, n = 0, s = Math.min(t.t, this.t); i < s; )
@@ -815,21 +814,21 @@ var st = (
815
814
  e?.fromInt(0), i != null && this.copyTo(i);
816
815
  return;
817
816
  }
818
- i == null && (i = v());
819
- var o = v(), h = this.s, a = t.s, f = this.DB - Z(n[n.t - 1]);
817
+ i == null && (i = S());
818
+ var o = S(), a = this.s, h = t.s, f = this.DB - st(n[n.t - 1]);
820
819
  f > 0 ? (n.lShiftTo(f, o), s.lShiftTo(f, i)) : (n.copyTo(o), s.copyTo(i));
821
820
  var l = o.t, c = o[l - 1];
822
821
  if (c != 0) {
823
- var g = c * (1 << this.F1) + (l > 1 ? o[l - 2] >> this.F2 : 0), p = this.FV / g, m = (1 << this.F1) / g, S = 1 << this.F2, D = i.t, _ = D - l, B = e ?? v();
824
- for (o.dlShiftTo(_, B), i.compareTo(B) >= 0 && (i[i.t++] = 1, i.subTo(B, i)), r.ONE.dlShiftTo(l, B), B.subTo(o, o); o.t < l; )
822
+ var v = c * (1 << this.F1) + (l > 1 ? o[l - 2] >> this.F2 : 0), p = this.FV / v, T = (1 << this.F1) / v, b = 1 << this.F2, x = i.t, q = x - l, B = e ?? S();
823
+ for (o.dlShiftTo(q, B), i.compareTo(B) >= 0 && (i[i.t++] = 1, i.subTo(B, i)), r.ONE.dlShiftTo(l, B), B.subTo(o, o); o.t < l; )
825
824
  o[o.t++] = 0;
826
- for (; --_ >= 0; ) {
827
- var q = i[--D] == c ? this.DM : Math.floor(i[D] * p + (i[D - 1] + S) * m);
828
- if ((i[D] += o.am(0, q, i, _, 0, l)) < q)
829
- for (o.dlShiftTo(_, B), i.subTo(B, i); i[D] < --q; )
825
+ for (; --q >= 0; ) {
826
+ var F = i[--x] == c ? this.DM : Math.floor(i[x] * p + (i[x - 1] + b) * T);
827
+ if ((i[x] += o.am(0, F, i, q, 0, l)) < F)
828
+ for (o.dlShiftTo(q, B), i.subTo(B, i); i[x] < --F; )
830
829
  i.subTo(B, i);
831
830
  }
832
- e != null && (i.drShiftTo(l, e), h != a && r.ZERO.subTo(e, e)), i.t = l, i.clamp(), f > 0 && i.rShiftTo(f, i), h < 0 && r.ZERO.subTo(i, i);
831
+ e != null && (i.drShiftTo(l, e), a != h && r.ZERO.subTo(e, e)), i.t = l, i.clamp(), f > 0 && i.rShiftTo(f, i), a < 0 && r.ZERO.subTo(i, i);
833
832
  }
834
833
  }
835
834
  }, r.prototype.invDigit = function() {
@@ -845,13 +844,13 @@ var st = (
845
844
  }, r.prototype.exp = function(t, e) {
846
845
  if (t > 4294967295 || t < 1)
847
846
  return r.ONE;
848
- var i = v(), n = v(), s = e.convert(this), o = Z(t) - 1;
847
+ var i = S(), n = S(), s = e.convert(this), o = st(t) - 1;
849
848
  for (s.copyTo(i); --o >= 0; )
850
849
  if (e.sqrTo(i, n), (t & 1 << o) > 0)
851
850
  e.mulTo(n, s, i);
852
851
  else {
853
- var h = i;
854
- i = n, n = h;
852
+ var a = i;
853
+ i = n, n = a;
855
854
  }
856
855
  return e.revert(i);
857
856
  }, r.prototype.chunkSize = function(t) {
@@ -859,27 +858,27 @@ var st = (
859
858
  }, r.prototype.toRadix = function(t) {
860
859
  if (t == null && (t = 10), this.signum() == 0 || t < 2 || t > 36)
861
860
  return "0";
862
- var e = this.chunkSize(t), i = Math.pow(t, e), n = V(i), s = v(), o = v(), h = "";
861
+ var e = this.chunkSize(t), i = Math.pow(t, e), n = j(i), s = S(), o = S(), a = "";
863
862
  for (this.divRemTo(n, s, o); s.signum() > 0; )
864
- h = (i + o.intValue()).toString(t).substring(1) + h, s.divRemTo(n, s, o);
865
- return o.intValue().toString(t) + h;
863
+ a = (i + o.intValue()).toString(t).substring(1) + a, s.divRemTo(n, s, o);
864
+ return o.intValue().toString(t) + a;
866
865
  }, r.prototype.fromRadix = function(t, e) {
867
866
  this.fromInt(0), e == null && (e = 10);
868
- for (var i = this.chunkSize(e), n = Math.pow(e, i), s = !1, o = 0, h = 0, a = 0; a < t.length; ++a) {
869
- var f = Tt(t, a);
867
+ for (var i = this.chunkSize(e), n = Math.pow(e, i), s = !1, o = 0, a = 0, h = 0; h < t.length; ++h) {
868
+ var f = Nt(t, h);
870
869
  if (f < 0) {
871
- t.charAt(a) == "-" && this.signum() == 0 && (s = !0);
870
+ t.charAt(h) == "-" && this.signum() == 0 && (s = !0);
872
871
  continue;
873
872
  }
874
- h = e * h + f, ++o >= i && (this.dMultiply(n), this.dAddOffset(h, 0), o = 0, h = 0);
873
+ a = e * a + f, ++o >= i && (this.dMultiply(n), this.dAddOffset(a, 0), o = 0, a = 0);
875
874
  }
876
- o > 0 && (this.dMultiply(Math.pow(e, o)), this.dAddOffset(h, 0)), s && r.ZERO.subTo(this, this);
875
+ o > 0 && (this.dMultiply(Math.pow(e, o)), this.dAddOffset(a, 0)), s && r.ZERO.subTo(this, this);
877
876
  }, r.prototype.fromNumber = function(t, e, i) {
878
877
  if (typeof e == "number")
879
878
  if (t < 2)
880
879
  this.fromInt(1);
881
880
  else
882
- for (this.fromNumber(t, i), this.testBit(t - 1) || this.bitwiseTo(r.ONE.shiftLeft(t - 1), G, this), this.isEven() && this.dAddOffset(1, 0); !this.isProbablePrime(e); )
881
+ for (this.fromNumber(t, i), this.testBit(t - 1) || this.bitwiseTo(r.ONE.shiftLeft(t - 1), nt, this), this.isEven() && this.dAddOffset(1, 0); !this.isProbablePrime(e); )
883
882
  this.dAddOffset(2, 0), this.bitLength() > t && this.subTo(r.ONE.shiftLeft(t - 1), this);
884
883
  else {
885
884
  var n = [], s = t & 7;
@@ -957,21 +956,21 @@ var st = (
957
956
  if (i <= 0)
958
957
  return !1;
959
958
  var n = e.shiftRight(i);
960
- t = t + 1 >> 1, t > E.length && (t = E.length);
961
- for (var s = v(), o = 0; o < t; ++o) {
962
- s.fromInt(E[Math.floor(Math.random() * E.length)]);
963
- var h = s.modPow(n, this);
964
- if (h.compareTo(r.ONE) != 0 && h.compareTo(e) != 0) {
965
- for (var a = 1; a++ < i && h.compareTo(e) != 0; )
966
- if (h = h.modPowInt(2, this), h.compareTo(r.ONE) == 0)
959
+ t = t + 1 >> 1, t > R.length && (t = R.length);
960
+ for (var s = S(), o = 0; o < t; ++o) {
961
+ s.fromInt(R[Math.floor(Math.random() * R.length)]);
962
+ var a = s.modPow(n, this);
963
+ if (a.compareTo(r.ONE) != 0 && a.compareTo(e) != 0) {
964
+ for (var h = 1; h++ < i && a.compareTo(e) != 0; )
965
+ if (a = a.modPowInt(2, this), a.compareTo(r.ONE) == 0)
967
966
  return !1;
968
- if (h.compareTo(e) != 0)
967
+ if (a.compareTo(e) != 0)
969
968
  return !1;
970
969
  }
971
970
  }
972
971
  return !0;
973
972
  }, r.prototype.square = function() {
974
- var t = v();
973
+ var t = S();
975
974
  return this.squareTo(t), t;
976
975
  }, r.prototype.gcda = function(t, e) {
977
976
  var i = this.s < 0 ? this.negate() : this.clone(), n = t.s < 0 ? t.negate() : t.clone();
@@ -979,24 +978,24 @@ var st = (
979
978
  var s = i;
980
979
  i = n, n = s;
981
980
  }
982
- var o = i.getLowestSetBit(), h = n.getLowestSetBit();
983
- if (h < 0) {
981
+ var o = i.getLowestSetBit(), a = n.getLowestSetBit();
982
+ if (a < 0) {
984
983
  e(i);
985
984
  return;
986
985
  }
987
- o < h && (h = o), h > 0 && (i.rShiftTo(h, i), n.rShiftTo(h, n));
988
- var a = function() {
989
- (o = i.getLowestSetBit()) > 0 && i.rShiftTo(o, i), (o = n.getLowestSetBit()) > 0 && n.rShiftTo(o, n), i.compareTo(n) >= 0 ? (i.subTo(n, i), i.rShiftTo(1, i)) : (n.subTo(i, n), n.rShiftTo(1, n)), i.signum() > 0 ? setTimeout(a, 0) : (h > 0 && n.lShiftTo(h, n), setTimeout(function() {
986
+ o < a && (a = o), a > 0 && (i.rShiftTo(a, i), n.rShiftTo(a, n));
987
+ var h = function() {
988
+ (o = i.getLowestSetBit()) > 0 && i.rShiftTo(o, i), (o = n.getLowestSetBit()) > 0 && n.rShiftTo(o, n), i.compareTo(n) >= 0 ? (i.subTo(n, i), i.rShiftTo(1, i)) : (n.subTo(i, n), n.rShiftTo(1, n)), i.signum() > 0 ? setTimeout(h, 0) : (a > 0 && n.lShiftTo(a, n), setTimeout(function() {
990
989
  e(n);
991
990
  }, 0));
992
991
  };
993
- setTimeout(a, 10);
992
+ setTimeout(h, 10);
994
993
  }, r.prototype.fromNumberAsync = function(t, e, i, n) {
995
994
  if (typeof e == "number")
996
995
  if (t < 2)
997
996
  this.fromInt(1);
998
997
  else {
999
- this.fromNumber(t, i), this.testBit(t - 1) || this.bitwiseTo(r.ONE.shiftLeft(t - 1), G, this), this.isEven() && this.dAddOffset(1, 0);
998
+ this.fromNumber(t, i), this.testBit(t - 1) || this.bitwiseTo(r.ONE.shiftLeft(t - 1), nt, this), this.isEven() && this.dAddOffset(1, 0);
1000
999
  var s = this, o = function() {
1001
1000
  s.dAddOffset(2, 0), s.bitLength() > t && s.subTo(r.ONE.shiftLeft(t - 1), s), s.isProbablePrime(e) ? setTimeout(function() {
1002
1001
  n();
@@ -1005,12 +1004,12 @@ var st = (
1005
1004
  setTimeout(o, 0);
1006
1005
  }
1007
1006
  else {
1008
- var h = [], a = t & 7;
1009
- h.length = (t >> 3) + 1, e.nextBytes(h), a > 0 ? h[0] &= (1 << a) - 1 : h[0] = 0, this.fromString(h, 256);
1007
+ var a = [], h = t & 7;
1008
+ a.length = (t >> 3) + 1, e.nextBytes(a), h > 0 ? a[0] &= (1 << h) - 1 : a[0] = 0, this.fromString(a, 256);
1010
1009
  }
1011
1010
  }, r;
1012
1011
  })()
1013
- ), zt = (
1012
+ ), he = (
1014
1013
  /** @class */
1015
1014
  (function() {
1016
1015
  function r() {
@@ -1025,7 +1024,7 @@ var st = (
1025
1024
  t.squareTo(e);
1026
1025
  }, r;
1027
1026
  })()
1028
- ), mt = (
1027
+ ), It = (
1029
1028
  /** @class */
1030
1029
  (function() {
1031
1030
  function r(t) {
@@ -1043,17 +1042,17 @@ var st = (
1043
1042
  t.squareTo(e), this.reduce(e);
1044
1043
  }, r;
1045
1044
  })()
1046
- ), St = (
1045
+ ), Vt = (
1047
1046
  /** @class */
1048
1047
  (function() {
1049
1048
  function r(t) {
1050
1049
  this.m = t, this.mp = t.invDigit(), this.mpl = this.mp & 32767, this.mph = this.mp >> 15, this.um = (1 << t.DB - 15) - 1, this.mt2 = 2 * t.t;
1051
1050
  }
1052
1051
  return r.prototype.convert = function(t) {
1053
- var e = v();
1054
- return t.abs().dlShiftTo(this.m.t, e), e.divRemTo(this.m, null, e), t.s < 0 && e.compareTo(d.ZERO) > 0 && this.m.subTo(e, e), e;
1052
+ var e = S();
1053
+ return t.abs().dlShiftTo(this.m.t, e), e.divRemTo(this.m, null, e), t.s < 0 && e.compareTo(g.ZERO) > 0 && this.m.subTo(e, e), e;
1055
1054
  }, r.prototype.revert = function(t) {
1056
- var e = v();
1055
+ var e = S();
1057
1056
  return t.copyTo(e), this.reduce(e), e;
1058
1057
  }, r.prototype.reduce = function(t) {
1059
1058
  for (; t.t <= this.mt2; )
@@ -1070,18 +1069,18 @@ var st = (
1070
1069
  t.squareTo(e), this.reduce(e);
1071
1070
  }, r;
1072
1071
  })()
1073
- ), $t = (
1072
+ ), ue = (
1074
1073
  /** @class */
1075
1074
  (function() {
1076
1075
  function r(t) {
1077
- this.m = t, this.r2 = v(), this.q3 = v(), d.ONE.dlShiftTo(2 * t.t, this.r2), this.mu = this.r2.divide(t);
1076
+ this.m = t, this.r2 = S(), this.q3 = S(), g.ONE.dlShiftTo(2 * t.t, this.r2), this.mu = this.r2.divide(t);
1078
1077
  }
1079
1078
  return r.prototype.convert = function(t) {
1080
1079
  if (t.s < 0 || t.t > 2 * this.m.t)
1081
1080
  return t.mod(this.m);
1082
1081
  if (t.compareTo(this.m) < 0)
1083
1082
  return t;
1084
- var e = v();
1083
+ var e = S();
1085
1084
  return t.copyTo(e), this.reduce(e), e;
1086
1085
  }, r.prototype.revert = function(t) {
1087
1086
  return t;
@@ -1097,64 +1096,64 @@ var st = (
1097
1096
  }, r;
1098
1097
  })()
1099
1098
  );
1100
- function v() {
1101
- return new d(null);
1099
+ function S() {
1100
+ return new g(null);
1102
1101
  }
1103
- function b(r, t) {
1104
- return new d(r, t);
1102
+ function w(r, t) {
1103
+ return new g(r, t);
1105
1104
  }
1106
- var bt = typeof navigator < "u";
1107
- bt && yt && navigator.appName == "Microsoft Internet Explorer" ? (d.prototype.am = function(t, e, i, n, s, o) {
1108
- for (var h = e & 32767, a = e >> 15; --o >= 0; ) {
1109
- var f = this[t] & 32767, l = this[t++] >> 15, c = a * f + l * h;
1110
- f = h * f + ((c & 32767) << 15) + i[n] + (s & 1073741823), s = (f >>> 30) + (c >>> 15) + a * l + (s >>> 30), i[n++] = f & 1073741823;
1105
+ var Ot = typeof navigator < "u";
1106
+ Ot && Bt && navigator.appName == "Microsoft Internet Explorer" ? (g.prototype.am = function(t, e, i, n, s, o) {
1107
+ for (var a = e & 32767, h = e >> 15; --o >= 0; ) {
1108
+ var f = this[t] & 32767, l = this[t++] >> 15, c = h * f + l * a;
1109
+ f = a * f + ((c & 32767) << 15) + i[n] + (s & 1073741823), s = (f >>> 30) + (c >>> 15) + h * l + (s >>> 30), i[n++] = f & 1073741823;
1111
1110
  }
1112
1111
  return s;
1113
- }, O = 30) : bt && yt && navigator.appName != "Netscape" ? (d.prototype.am = function(t, e, i, n, s, o) {
1112
+ }, U = 30) : Ot && Bt && navigator.appName != "Netscape" ? (g.prototype.am = function(t, e, i, n, s, o) {
1114
1113
  for (; --o >= 0; ) {
1115
- var h = e * this[t++] + i[n] + s;
1116
- s = Math.floor(h / 67108864), i[n++] = h & 67108863;
1114
+ var a = e * this[t++] + i[n] + s;
1115
+ s = Math.floor(a / 67108864), i[n++] = a & 67108863;
1117
1116
  }
1118
1117
  return s;
1119
- }, O = 26) : (d.prototype.am = function(t, e, i, n, s, o) {
1120
- for (var h = e & 16383, a = e >> 14; --o >= 0; ) {
1121
- var f = this[t] & 16383, l = this[t++] >> 14, c = a * f + l * h;
1122
- f = h * f + ((c & 16383) << 14) + i[n] + s, s = (f >> 28) + (c >> 14) + a * l, i[n++] = f & 268435455;
1118
+ }, U = 26) : (g.prototype.am = function(t, e, i, n, s, o) {
1119
+ for (var a = e & 16383, h = e >> 14; --o >= 0; ) {
1120
+ var f = this[t] & 16383, l = this[t++] >> 14, c = h * f + l * a;
1121
+ f = a * f + ((c & 16383) << 14) + i[n] + s, s = (f >> 28) + (c >> 14) + h * l, i[n++] = f & 268435455;
1123
1122
  }
1124
1123
  return s;
1125
- }, O = 28);
1126
- d.prototype.DB = O;
1127
- d.prototype.DM = (1 << O) - 1;
1128
- d.prototype.DV = 1 << O;
1129
- var lt = 52;
1130
- d.prototype.FV = Math.pow(2, lt);
1131
- d.prototype.F1 = lt - O;
1132
- d.prototype.F2 = 2 * O - lt;
1133
- var rt = [], K, x;
1134
- K = 48;
1135
- for (x = 0; x <= 9; ++x)
1136
- rt[K++] = x;
1137
- K = 97;
1138
- for (x = 10; x < 36; ++x)
1139
- rt[K++] = x;
1140
- K = 65;
1141
- for (x = 10; x < 36; ++x)
1142
- rt[K++] = x;
1143
- function Tt(r, t) {
1144
- var e = rt[r.charCodeAt(t)];
1124
+ }, U = 28);
1125
+ g.prototype.DB = U;
1126
+ g.prototype.DM = (1 << U) - 1;
1127
+ g.prototype.DV = 1 << U;
1128
+ var wt = 52;
1129
+ g.prototype.FV = Math.pow(2, wt);
1130
+ g.prototype.F1 = wt - U;
1131
+ g.prototype.F2 = 2 * U - wt;
1132
+ var pt = [], X, V;
1133
+ X = 48;
1134
+ for (V = 0; V <= 9; ++V)
1135
+ pt[X++] = V;
1136
+ X = 97;
1137
+ for (V = 10; V < 36; ++V)
1138
+ pt[X++] = V;
1139
+ X = 65;
1140
+ for (V = 10; V < 36; ++V)
1141
+ pt[X++] = V;
1142
+ function Nt(r, t) {
1143
+ var e = pt[r.charCodeAt(t)];
1145
1144
  return e ?? -1;
1146
1145
  }
1147
- function V(r) {
1148
- var t = v();
1146
+ function j(r) {
1147
+ var t = S();
1149
1148
  return t.fromInt(r), t;
1150
1149
  }
1151
- function Z(r) {
1150
+ function st(r) {
1152
1151
  var t = 1, e;
1153
1152
  return (e = r >>> 16) != 0 && (r = e, t += 16), (e = r >> 8) != 0 && (r = e, t += 8), (e = r >> 4) != 0 && (r = e, t += 4), (e = r >> 2) != 0 && (r = e, t += 2), (e = r >> 1) != 0 && (r = e, t += 1), t;
1154
1153
  }
1155
- d.ZERO = V(0);
1156
- d.ONE = V(1);
1157
- var Gt = (
1154
+ g.ZERO = j(0);
1155
+ g.ONE = j(1);
1156
+ var fe = (
1158
1157
  /** @class */
1159
1158
  (function() {
1160
1159
  function r() {
@@ -1173,123 +1172,123 @@ var Gt = (
1173
1172
  }, r;
1174
1173
  })()
1175
1174
  );
1176
- function Zt() {
1177
- return new Gt();
1175
+ function le() {
1176
+ return new fe();
1178
1177
  }
1179
- var At = 256, Y, C = null, A;
1180
- if (C == null) {
1181
- C = [], A = 0;
1182
- var Q = void 0;
1178
+ var kt = 256, ot, K = null, P;
1179
+ if (K == null) {
1180
+ K = [], P = 0;
1181
+ var at = void 0;
1183
1182
  if (typeof window < "u" && self.crypto && self.crypto.getRandomValues) {
1184
- var ot = new Uint32Array(256);
1185
- for (self.crypto.getRandomValues(ot), Q = 0; Q < ot.length; ++Q)
1186
- C[A++] = ot[Q] & 255;
1183
+ var gt = new Uint32Array(256);
1184
+ for (self.crypto.getRandomValues(gt), at = 0; at < gt.length; ++at)
1185
+ K[P++] = gt[at] & 255;
1187
1186
  }
1188
- var X = 0, tt = function(r) {
1189
- if (X = X || 0, X >= 256 || A >= At) {
1190
- self.removeEventListener ? self.removeEventListener("mousemove", tt, !1) : self.detachEvent && self.detachEvent("onmousemove", tt);
1187
+ var ht = 0, ut = function(r) {
1188
+ if (ht = ht || 0, ht >= 256 || P >= kt) {
1189
+ self.removeEventListener ? self.removeEventListener("mousemove", ut, !1) : self.detachEvent && self.detachEvent("onmousemove", ut);
1191
1190
  return;
1192
1191
  }
1193
1192
  try {
1194
1193
  var t = r.x + r.y;
1195
- C[A++] = t & 255, X += 1;
1194
+ K[P++] = t & 255, ht += 1;
1196
1195
  } catch {
1197
1196
  }
1198
1197
  };
1199
- typeof window < "u" && (self.addEventListener ? self.addEventListener("mousemove", tt, !1) : self.attachEvent && self.attachEvent("onmousemove", tt));
1198
+ typeof window < "u" && (self.addEventListener ? self.addEventListener("mousemove", ut, !1) : self.attachEvent && self.attachEvent("onmousemove", ut));
1200
1199
  }
1201
- function Yt() {
1202
- if (Y == null) {
1203
- for (Y = Zt(); A < At; ) {
1200
+ function ce() {
1201
+ if (ot == null) {
1202
+ for (ot = le(); P < kt; ) {
1204
1203
  var r = Math.floor(65536 * Math.random());
1205
- C[A++] = r & 255;
1204
+ K[P++] = r & 255;
1206
1205
  }
1207
- for (Y.init(C), A = 0; A < C.length; ++A)
1208
- C[A] = 0;
1209
- A = 0;
1206
+ for (ot.init(K), P = 0; P < K.length; ++P)
1207
+ K[P] = 0;
1208
+ P = 0;
1210
1209
  }
1211
- return Y.next();
1210
+ return ot.next();
1212
1211
  }
1213
- var it = (
1212
+ var ct = (
1214
1213
  /** @class */
1215
1214
  (function() {
1216
1215
  function r() {
1217
1216
  }
1218
1217
  return r.prototype.nextBytes = function(t) {
1219
1218
  for (var e = 0; e < t.length; ++e)
1220
- t[e] = Yt();
1219
+ t[e] = ce();
1221
1220
  }, r;
1222
1221
  })()
1223
1222
  );
1224
- function ft(r) {
1225
- return Xt(he(Qt(r), r.length * 8));
1223
+ function bt(r) {
1224
+ return de(we(pe(r), r.length * 8));
1226
1225
  }
1227
- function wt(r) {
1226
+ function Pt(r) {
1228
1227
  for (var t = "0123456789abcdef", e = "", i = 0; i < r.length; i++) {
1229
1228
  var n = r.charCodeAt(i);
1230
1229
  e += t.charAt(n >>> 4 & 15) + t.charAt(n & 15);
1231
1230
  }
1232
1231
  return e;
1233
1232
  }
1234
- function Qt(r) {
1233
+ function pe(r) {
1235
1234
  for (var t = Array(r.length >> 2), e = 0; e < t.length; e++)
1236
1235
  t[e] = 0;
1237
1236
  for (var e = 0; e < r.length * 8; e += 8)
1238
1237
  t[e >> 5] |= (r.charCodeAt(e / 8) & 255) << 24 - e % 32;
1239
1238
  return t;
1240
1239
  }
1241
- function Xt(r) {
1240
+ function de(r) {
1242
1241
  for (var t = "", e = 0; e < r.length * 32; e += 8)
1243
1242
  t += String.fromCharCode(r[e >> 5] >>> 24 - e % 32 & 255);
1244
1243
  return t;
1245
1244
  }
1246
- function I(r, t) {
1245
+ function M(r, t) {
1247
1246
  return r >>> t | r << 32 - t;
1248
1247
  }
1249
- function Bt(r, t) {
1248
+ function Lt(r, t) {
1250
1249
  return r >>> t;
1251
1250
  }
1252
- function te(r, t, e) {
1251
+ function ve(r, t, e) {
1253
1252
  return r & t ^ ~r & e;
1254
1253
  }
1255
- function ee(r, t, e) {
1254
+ function ge(r, t, e) {
1256
1255
  return r & t ^ r & e ^ t & e;
1257
1256
  }
1258
- function ie(r) {
1259
- return I(r, 2) ^ I(r, 13) ^ I(r, 22);
1257
+ function ye(r) {
1258
+ return M(r, 2) ^ M(r, 13) ^ M(r, 22);
1260
1259
  }
1261
- function re(r) {
1262
- return I(r, 6) ^ I(r, 11) ^ I(r, 25);
1260
+ function me(r) {
1261
+ return M(r, 6) ^ M(r, 11) ^ M(r, 25);
1263
1262
  }
1264
- function ne(r) {
1265
- return I(r, 7) ^ I(r, 18) ^ Bt(r, 3);
1263
+ function Se(r) {
1264
+ return M(r, 7) ^ M(r, 18) ^ Lt(r, 3);
1266
1265
  }
1267
- function se(r) {
1268
- return I(r, 17) ^ I(r, 19) ^ Bt(r, 10);
1266
+ function Te(r) {
1267
+ return M(r, 17) ^ M(r, 19) ^ Lt(r, 10);
1269
1268
  }
1270
- var oe = new Array(1116352408, 1899447441, -1245643825, -373957723, 961987163, 1508970993, -1841331548, -1424204075, -670586216, 310598401, 607225278, 1426881987, 1925078388, -2132889090, -1680079193, -1046744716, -459576895, -272742522, 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986, -1740746414, -1473132947, -1341970488, -1084653625, -958395405, -710438585, 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, 1695183700, 1986661051, -2117940946, -1838011259, -1564481375, -1474664885, -1035236496, -949202525, -778901479, -694614492, -200395387, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, 1747873779, 1955562222, 2024104815, -2067236844, -1933114872, -1866530822, -1538233109, -1090935817, -965641998);
1271
- function he(r, t) {
1272
- var e = new Array(1779033703, -1150833019, 1013904242, -1521486534, 1359893119, -1694144372, 528734635, 1541459225), i = new Array(64), n, s, o, h, a, f, l, c, g, p, m, S;
1273
- for (r[t >> 5] |= 128 << 24 - t % 32, r[(t + 64 >> 9 << 4) + 15] = t, g = 0; g < r.length; g += 16) {
1274
- for (n = e[0], s = e[1], o = e[2], h = e[3], a = e[4], f = e[5], l = e[6], c = e[7], p = 0; p < 64; p++)
1275
- p < 16 ? i[p] = r[p + g] : i[p] = w(w(w(se(i[p - 2]), i[p - 7]), ne(i[p - 15])), i[p - 16]), m = w(w(w(w(c, re(a)), te(a, f, l)), oe[p]), i[p]), S = w(ie(n), ee(n, s, o)), c = l, l = f, f = a, a = w(h, m), h = o, o = s, s = n, n = w(m, S);
1276
- e[0] = w(n, e[0]), e[1] = w(s, e[1]), e[2] = w(o, e[2]), e[3] = w(h, e[3]), e[4] = w(a, e[4]), e[5] = w(f, e[5]), e[6] = w(l, e[6]), e[7] = w(c, e[7]);
1269
+ var be = new Array(1116352408, 1899447441, -1245643825, -373957723, 961987163, 1508970993, -1841331548, -1424204075, -670586216, 310598401, 607225278, 1426881987, 1925078388, -2132889090, -1680079193, -1046744716, -459576895, -272742522, 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986, -1740746414, -1473132947, -1341970488, -1084653625, -958395405, -710438585, 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, 1695183700, 1986661051, -2117940946, -1838011259, -1564481375, -1474664885, -1035236496, -949202525, -778901479, -694614492, -200395387, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, 1747873779, 1955562222, 2024104815, -2067236844, -1933114872, -1866530822, -1538233109, -1090935817, -965641998);
1270
+ function we(r, t) {
1271
+ var e = new Array(1779033703, -1150833019, 1013904242, -1521486534, 1359893119, -1694144372, 528734635, 1541459225), i = new Array(64), n, s, o, a, h, f, l, c, v, p, T, b;
1272
+ for (r[t >> 5] |= 128 << 24 - t % 32, r[(t + 64 >> 9 << 4) + 15] = t, v = 0; v < r.length; v += 16) {
1273
+ for (n = e[0], s = e[1], o = e[2], a = e[3], h = e[4], f = e[5], l = e[6], c = e[7], p = 0; p < 64; p++)
1274
+ p < 16 ? i[p] = r[p + v] : i[p] = D(D(D(Te(i[p - 2]), i[p - 7]), Se(i[p - 15])), i[p - 16]), T = D(D(D(D(c, me(h)), ve(h, f, l)), be[p]), i[p]), b = D(ye(n), ge(n, s, o)), c = l, l = f, f = h, h = D(a, T), a = o, o = s, s = n, n = D(T, b);
1275
+ e[0] = D(n, e[0]), e[1] = D(s, e[1]), e[2] = D(o, e[2]), e[3] = D(a, e[3]), e[4] = D(h, e[4]), e[5] = D(f, e[5]), e[6] = D(l, e[6]), e[7] = D(c, e[7]);
1277
1276
  }
1278
1277
  return e;
1279
1278
  }
1280
- function w(r, t) {
1279
+ function D(r, t) {
1281
1280
  var e = (r & 65535) + (t & 65535), i = (r >> 16) + (t >> 16) + (e >> 16);
1282
1281
  return i << 16 | e & 65535;
1283
1282
  }
1284
- function ae(r, t) {
1283
+ function Ee(r, t) {
1285
1284
  if (t < r.length + 22)
1286
1285
  return console.error("Message too long for RSA"), null;
1287
1286
  for (var e = t - r.length - 6, i = "", n = 0; n < e; n += 2)
1288
1287
  i += "ff";
1289
1288
  var s = "0001" + i + "00" + r;
1290
- return b(s, 16);
1289
+ return w(s, 16);
1291
1290
  }
1292
- function ue(r, t) {
1291
+ function De(r, t) {
1293
1292
  if (t < r.length + 11)
1294
1293
  return console.error("Message too long for RSA"), null;
1295
1294
  for (var e = [], i = r.length - 1; i >= 0 && t > 0; ) {
@@ -1297,14 +1296,14 @@ function ue(r, t) {
1297
1296
  n < 128 ? e[--t] = n : n > 127 && n < 2048 ? (e[--t] = n & 63 | 128, e[--t] = n >> 6 | 192) : (e[--t] = n & 63 | 128, e[--t] = n >> 6 & 63 | 128, e[--t] = n >> 12 | 224);
1298
1297
  }
1299
1298
  e[--t] = 0;
1300
- for (var s = new it(), o = []; t > 2; ) {
1299
+ for (var s = new ct(), o = []; t > 2; ) {
1301
1300
  for (o[0] = 0; o[0] == 0; )
1302
1301
  s.nextBytes(o);
1303
1302
  e[--t] = o[0];
1304
1303
  }
1305
- return e[--t] = 2, e[--t] = 0, new d(e);
1304
+ return e[--t] = 2, e[--t] = 0, new g(e);
1306
1305
  }
1307
- function Et(r, t, e) {
1306
+ function _t(r, t, e) {
1308
1307
  for (var i = "", n = 0; i.length < t; )
1309
1308
  i += e(String.fromCharCode.apply(String, r.concat([
1310
1309
  (n & 4278190080) >> 24,
@@ -1314,25 +1313,25 @@ function Et(r, t, e) {
1314
1313
  ]))), n += 1;
1315
1314
  return i;
1316
1315
  }
1317
- var fe = 32;
1318
- function le(r, t) {
1319
- var e = fe, i = ft;
1316
+ var xe = 32;
1317
+ function Re(r, t) {
1318
+ var e = xe, i = bt;
1320
1319
  if (r.length + 2 * e + 2 > t)
1321
1320
  throw "Message too long for RSA";
1322
1321
  var n = "", s;
1323
1322
  for (s = 0; s < t - r.length - 2 * e - 2; s += 1)
1324
1323
  n += "\0";
1325
- var o = i("") + n + "" + r, h = new Array(e);
1326
- new it().nextBytes(h);
1327
- var a = Et(h, o.length, i), f = [];
1324
+ var o = i("") + n + "" + r, a = new Array(e);
1325
+ new ct().nextBytes(a);
1326
+ var h = _t(a, o.length, i), f = [];
1328
1327
  for (s = 0; s < o.length; s += 1)
1329
- f[s] = o.charCodeAt(s) ^ a.charCodeAt(s);
1330
- var l = Et(f, h.length, i), c = [0];
1331
- for (s = 0; s < h.length; s += 1)
1332
- c[s + 1] = h[s] ^ l.charCodeAt(s);
1333
- return new d(c.concat(f));
1328
+ f[s] = o.charCodeAt(s) ^ h.charCodeAt(s);
1329
+ var l = _t(f, a.length, i), c = [0];
1330
+ for (s = 0; s < a.length; s += 1)
1331
+ c[s + 1] = a[s] ^ l.charCodeAt(s);
1332
+ return new g(c.concat(f));
1334
1333
  }
1335
- var ce = (
1334
+ var Ae = (
1336
1335
  /** @class */
1337
1336
  (function() {
1338
1337
  function r() {
@@ -1347,92 +1346,92 @@ var ce = (
1347
1346
  e = e.add(this.p);
1348
1347
  return e.subtract(i).multiply(this.coeff).mod(this.p).multiply(this.q).add(i);
1349
1348
  }, r.prototype.setPublic = function(t, e) {
1350
- t != null && e != null && t.length > 0 && e.length > 0 ? (this.n = b(t, 16), this.e = parseInt(e, 16)) : console.error("Invalid RSA public key");
1349
+ t != null && e != null && t.length > 0 && e.length > 0 ? (this.n = w(t, 16), this.e = parseInt(e, 16)) : console.error("Invalid RSA public key");
1351
1350
  }, r.prototype.encrypt = function(t, e) {
1352
- typeof e > "u" && (e = ue);
1351
+ typeof e > "u" && (e = De);
1353
1352
  var i = this.n.bitLength() + 7 >> 3, n = e(t, i);
1354
1353
  if (n == null)
1355
1354
  return null;
1356
1355
  var s = this.doPublic(n);
1357
1356
  if (s == null)
1358
1357
  return null;
1359
- for (var o = s.toString(16), h = o.length, a = 0; a < i * 2 - h; a++)
1358
+ for (var o = s.toString(16), a = o.length, h = 0; h < i * 2 - a; h++)
1360
1359
  o = "0" + o;
1361
1360
  return o;
1362
1361
  }, r.prototype.setPrivate = function(t, e, i) {
1363
- t != null && e != null && t.length > 0 && e.length > 0 ? (this.n = b(t, 16), this.e = parseInt(e, 16), this.d = b(i, 16)) : console.error("Invalid RSA private key");
1364
- }, r.prototype.setPrivateEx = function(t, e, i, n, s, o, h, a) {
1365
- t != null && e != null && t.length > 0 && e.length > 0 ? (this.n = b(t, 16), this.e = parseInt(e, 16), this.d = b(i, 16), this.p = b(n, 16), this.q = b(s, 16), this.dmp1 = b(o, 16), this.dmq1 = b(h, 16), this.coeff = b(a, 16)) : console.error("Invalid RSA private key");
1362
+ t != null && e != null && t.length > 0 && e.length > 0 ? (this.n = w(t, 16), this.e = parseInt(e, 16), this.d = w(i, 16)) : console.error("Invalid RSA private key");
1363
+ }, r.prototype.setPrivateEx = function(t, e, i, n, s, o, a, h) {
1364
+ t != null && e != null && t.length > 0 && e.length > 0 ? (this.n = w(t, 16), this.e = parseInt(e, 16), this.d = w(i, 16), this.p = w(n, 16), this.q = w(s, 16), this.dmp1 = w(o, 16), this.dmq1 = w(a, 16), this.coeff = w(h, 16)) : console.error("Invalid RSA private key");
1366
1365
  }, r.prototype.generate = function(t, e) {
1367
- var i = new it(), n = t >> 1;
1366
+ var i = new ct(), n = t >> 1;
1368
1367
  this.e = parseInt(e, 16);
1369
- for (var s = new d(e, 16); ; ) {
1370
- for (; this.p = new d(t - n, 1, i), !(this.p.subtract(d.ONE).gcd(s).compareTo(d.ONE) == 0 && this.p.isProbablePrime(10)); )
1368
+ for (var s = new g(e, 16); ; ) {
1369
+ for (; this.p = new g(t - n, 1, i), !(this.p.subtract(g.ONE).gcd(s).compareTo(g.ONE) == 0 && this.p.isProbablePrime(10)); )
1371
1370
  ;
1372
- for (; this.q = new d(n, 1, i), !(this.q.subtract(d.ONE).gcd(s).compareTo(d.ONE) == 0 && this.q.isProbablePrime(10)); )
1371
+ for (; this.q = new g(n, 1, i), !(this.q.subtract(g.ONE).gcd(s).compareTo(g.ONE) == 0 && this.q.isProbablePrime(10)); )
1373
1372
  ;
1374
1373
  if (this.p.compareTo(this.q) <= 0) {
1375
1374
  var o = this.p;
1376
1375
  this.p = this.q, this.q = o;
1377
1376
  }
1378
- var h = this.p.subtract(d.ONE), a = this.q.subtract(d.ONE), f = h.multiply(a);
1379
- if (f.gcd(s).compareTo(d.ONE) == 0) {
1380
- this.n = this.p.multiply(this.q), this.d = s.modInverse(f), this.dmp1 = this.d.mod(h), this.dmq1 = this.d.mod(a), this.coeff = this.q.modInverse(this.p);
1377
+ var a = this.p.subtract(g.ONE), h = this.q.subtract(g.ONE), f = a.multiply(h);
1378
+ if (f.gcd(s).compareTo(g.ONE) == 0) {
1379
+ this.n = this.p.multiply(this.q), this.d = s.modInverse(f), this.dmp1 = this.d.mod(a), this.dmq1 = this.d.mod(h), this.coeff = this.q.modInverse(this.p);
1381
1380
  break;
1382
1381
  }
1383
1382
  }
1384
1383
  }, r.prototype.decrypt = function(t) {
1385
- var e = b(t, 16), i = this.doPrivate(e);
1386
- return i == null ? null : pe(i, this.n.bitLength() + 7 >> 3);
1384
+ var e = w(t, 16), i = this.doPrivate(e);
1385
+ return i == null ? null : Be(i, this.n.bitLength() + 7 >> 3);
1387
1386
  }, r.prototype.generateAsync = function(t, e, i) {
1388
- var n = new it(), s = t >> 1;
1387
+ var n = new ct(), s = t >> 1;
1389
1388
  this.e = parseInt(e, 16);
1390
- var o = new d(e, 16), h = this, a = function() {
1389
+ var o = new g(e, 16), a = this, h = function() {
1391
1390
  var f = function() {
1392
- if (h.p.compareTo(h.q) <= 0) {
1393
- var g = h.p;
1394
- h.p = h.q, h.q = g;
1391
+ if (a.p.compareTo(a.q) <= 0) {
1392
+ var v = a.p;
1393
+ a.p = a.q, a.q = v;
1395
1394
  }
1396
- var p = h.p.subtract(d.ONE), m = h.q.subtract(d.ONE), S = p.multiply(m);
1397
- S.gcd(o).compareTo(d.ONE) == 0 ? (h.n = h.p.multiply(h.q), h.d = o.modInverse(S), h.dmp1 = h.d.mod(p), h.dmq1 = h.d.mod(m), h.coeff = h.q.modInverse(h.p), setTimeout(function() {
1395
+ var p = a.p.subtract(g.ONE), T = a.q.subtract(g.ONE), b = p.multiply(T);
1396
+ b.gcd(o).compareTo(g.ONE) == 0 ? (a.n = a.p.multiply(a.q), a.d = o.modInverse(b), a.dmp1 = a.d.mod(p), a.dmq1 = a.d.mod(T), a.coeff = a.q.modInverse(a.p), setTimeout(function() {
1398
1397
  i();
1399
- }, 0)) : setTimeout(a, 0);
1398
+ }, 0)) : setTimeout(h, 0);
1400
1399
  }, l = function() {
1401
- h.q = v(), h.q.fromNumberAsync(s, 1, n, function() {
1402
- h.q.subtract(d.ONE).gcda(o, function(g) {
1403
- g.compareTo(d.ONE) == 0 && h.q.isProbablePrime(10) ? setTimeout(f, 0) : setTimeout(l, 0);
1400
+ a.q = S(), a.q.fromNumberAsync(s, 1, n, function() {
1401
+ a.q.subtract(g.ONE).gcda(o, function(v) {
1402
+ v.compareTo(g.ONE) == 0 && a.q.isProbablePrime(10) ? setTimeout(f, 0) : setTimeout(l, 0);
1404
1403
  });
1405
1404
  });
1406
1405
  }, c = function() {
1407
- h.p = v(), h.p.fromNumberAsync(t - s, 1, n, function() {
1408
- h.p.subtract(d.ONE).gcda(o, function(g) {
1409
- g.compareTo(d.ONE) == 0 && h.p.isProbablePrime(10) ? setTimeout(l, 0) : setTimeout(c, 0);
1406
+ a.p = S(), a.p.fromNumberAsync(t - s, 1, n, function() {
1407
+ a.p.subtract(g.ONE).gcda(o, function(v) {
1408
+ v.compareTo(g.ONE) == 0 && a.p.isProbablePrime(10) ? setTimeout(l, 0) : setTimeout(c, 0);
1410
1409
  });
1411
1410
  });
1412
1411
  };
1413
1412
  setTimeout(c, 0);
1414
1413
  };
1415
- setTimeout(a, 0);
1414
+ setTimeout(h, 0);
1416
1415
  }, r.prototype.sign = function(t, e, i) {
1417
- var n = de(i), s = n + e(t).toString(), o = this.n.bitLength() / 4, h = ae(s, o);
1418
- if (h == null)
1419
- return null;
1420
- var a = this.doPrivate(h);
1416
+ var n = Ie(i), s = n + e(t).toString(), o = this.n.bitLength() / 4, a = Ee(s, o);
1421
1417
  if (a == null)
1422
1418
  return null;
1423
- for (var f = a.toString(16), l = f.length, c = 0; c < o - l; c++)
1419
+ var h = this.doPrivate(a);
1420
+ if (h == null)
1421
+ return null;
1422
+ for (var f = h.toString(16), l = f.length, c = 0; c < o - l; c++)
1424
1423
  f = "0" + f;
1425
1424
  return f;
1426
1425
  }, r.prototype.verify = function(t, e, i) {
1427
- var n = b(e, 16), s = this.doPublic(n);
1426
+ var n = w(e, 16), s = this.doPublic(n);
1428
1427
  if (s == null)
1429
1428
  return null;
1430
- var o = s.toString(16).replace(/^1f+00/, ""), h = ge(o);
1431
- return h == i(t).toString();
1429
+ var o = s.toString(16).replace(/^1f+00/, ""), a = Ve(o);
1430
+ return a == i(t).toString();
1432
1431
  }, r;
1433
1432
  })()
1434
1433
  );
1435
- function pe(r, t) {
1434
+ function Be(r, t) {
1436
1435
  for (var e = r.toByteArray(), i = 0; i < e.length && e[i] == 0; )
1437
1436
  ++i;
1438
1437
  if (e.length - i != t - 1 || e[i] != 2)
@@ -1446,7 +1445,7 @@ function pe(r, t) {
1446
1445
  }
1447
1446
  return n;
1448
1447
  }
1449
- var et = {
1448
+ var lt = {
1450
1449
  md2: "3020300c06082a864886f70d020205000410",
1451
1450
  md5: "3020300c06082a864886f70d020505000410",
1452
1451
  sha1: "3021300906052b0e03021a05000414",
@@ -1456,19 +1455,19 @@ var et = {
1456
1455
  sha512: "3051300d060960864801650304020305000440",
1457
1456
  ripemd160: "3021300906052b2403020105000414"
1458
1457
  };
1459
- function de(r) {
1460
- return et[r] || "";
1458
+ function Ie(r) {
1459
+ return lt[r] || "";
1461
1460
  }
1462
- function ge(r) {
1463
- for (var t in et)
1464
- if (et.hasOwnProperty(t)) {
1465
- var e = et[t], i = e.length;
1461
+ function Ve(r) {
1462
+ for (var t in lt)
1463
+ if (lt.hasOwnProperty(t)) {
1464
+ var e = lt[t], i = e.length;
1466
1465
  if (r.substring(0, i) == e)
1467
1466
  return r.substring(i);
1468
1467
  }
1469
1468
  return r;
1470
1469
  }
1471
- function T(r, t, e) {
1470
+ function E(r, t, e) {
1472
1471
  if (!t || !r)
1473
1472
  throw new Error("extend failed, please check that all dependencies are included.");
1474
1473
  var i = function() {
@@ -1490,17 +1489,17 @@ u.asn1.ASN1Util = new function() {
1490
1489
  i % 2 == 1 ? i += 1 : t.match(/^[0-7]/) || (i += 2);
1491
1490
  for (var n = "", s = 0; s < i; s++)
1492
1491
  n += "f";
1493
- var o = new d(n, 16), h = o.xor(r).add(d.ONE);
1494
- t = h.toString(16).replace(/^-/, "");
1492
+ var o = new g(n, 16), a = o.xor(r).add(g.ONE);
1493
+ t = a.toString(16).replace(/^-/, "");
1495
1494
  }
1496
1495
  return t;
1497
1496
  }, this.getPEMStringFromHex = function(r, t) {
1498
1497
  return hextopem(r, t);
1499
1498
  }, this.newObject = function(r) {
1500
- var t = u, e = t.asn1, i = e.DERBoolean, n = e.DERInteger, s = e.DERBitString, o = e.DEROctetString, h = e.DERNull, a = e.DERObjectIdentifier, f = e.DEREnumerated, l = e.DERUTF8String, c = e.DERNumericString, g = e.DERPrintableString, p = e.DERTeletexString, m = e.DERIA5String, S = e.DERUTCTime, D = e.DERGeneralizedTime, _ = e.DERSequence, B = e.DERSet, q = e.DERTaggedObject, z = e.ASN1Util.newObject, ct = Object.keys(r);
1501
- if (ct.length != 1)
1499
+ var t = u, e = t.asn1, i = e.DERBoolean, n = e.DERInteger, s = e.DERBitString, o = e.DEROctetString, a = e.DERNull, h = e.DERObjectIdentifier, f = e.DEREnumerated, l = e.DERUTF8String, c = e.DERNumericString, v = e.DERPrintableString, p = e.DERTeletexString, T = e.DERIA5String, b = e.DERUTCTime, x = e.DERGeneralizedTime, q = e.DERSequence, B = e.DERSet, F = e.DERTaggedObject, O = e.ASN1Util.newObject, et = Object.keys(r);
1500
+ if (et.length != 1)
1502
1501
  throw "key of param shall be only one.";
1503
- var y = ct[0];
1502
+ var y = et[0];
1504
1503
  if (":bool:int:bitstr:octstr:null:oid:enum:utf8str:numstr:prnstr:telstr:ia5str:utctime:gentime:seq:set:tag:".indexOf(":" + y + ":") == -1)
1505
1504
  throw "undefined key: " + y;
1506
1505
  if (y == "bool")
@@ -1512,9 +1511,9 @@ u.asn1.ASN1Util = new function() {
1512
1511
  if (y == "octstr")
1513
1512
  return new o(r[y]);
1514
1513
  if (y == "null")
1515
- return new h(r[y]);
1516
- if (y == "oid")
1517
1514
  return new a(r[y]);
1515
+ if (y == "oid")
1516
+ return new h(r[y]);
1518
1517
  if (y == "enum")
1519
1518
  return new f(r[y]);
1520
1519
  if (y == "utf8str")
@@ -1522,43 +1521,43 @@ u.asn1.ASN1Util = new function() {
1522
1521
  if (y == "numstr")
1523
1522
  return new c(r[y]);
1524
1523
  if (y == "prnstr")
1525
- return new g(r[y]);
1524
+ return new v(r[y]);
1526
1525
  if (y == "telstr")
1527
1526
  return new p(r[y]);
1528
1527
  if (y == "ia5str")
1529
- return new m(r[y]);
1528
+ return new T(r[y]);
1530
1529
  if (y == "utctime")
1531
- return new S(r[y]);
1530
+ return new b(r[y]);
1532
1531
  if (y == "gentime")
1533
- return new D(r[y]);
1532
+ return new x(r[y]);
1534
1533
  if (y == "seq") {
1535
- for (var j = r[y], U = [], M = 0; M < j.length; M++) {
1536
- var nt = z(j[M]);
1537
- U.push(nt);
1534
+ for (var k = r[y], L = [], _ = 0; _ < k.length; _++) {
1535
+ var J = O(k[_]);
1536
+ L.push(J);
1538
1537
  }
1539
- return new _({ array: U });
1538
+ return new q({ array: L });
1540
1539
  }
1541
1540
  if (y == "set") {
1542
- for (var j = r[y], U = [], M = 0; M < j.length; M++) {
1543
- var nt = z(j[M]);
1544
- U.push(nt);
1541
+ for (var k = r[y], L = [], _ = 0; _ < k.length; _++) {
1542
+ var J = O(k[_]);
1543
+ L.push(J);
1545
1544
  }
1546
- return new B({ array: U });
1545
+ return new B({ array: L });
1547
1546
  }
1548
1547
  if (y == "tag") {
1549
- var R = r[y];
1550
- if (Object.prototype.toString.call(R) === "[object Array]" && R.length == 3) {
1551
- var It = z(R[2]);
1552
- return new q({
1553
- tag: R[0],
1554
- explicit: R[1],
1555
- obj: It
1548
+ var I = r[y];
1549
+ if (Object.prototype.toString.call(I) === "[object Array]" && I.length == 3) {
1550
+ var dt = O(I[2]);
1551
+ return new F({
1552
+ tag: I[0],
1553
+ explicit: I[1],
1554
+ obj: dt
1556
1555
  });
1557
1556
  } else {
1558
- var $ = {};
1559
- if (R.explicit !== void 0 && ($.explicit = R.explicit), R.tag !== void 0 && ($.tag = R.tag), R.obj === void 0)
1557
+ var N = {};
1558
+ if (I.explicit !== void 0 && (N.explicit = I.explicit), I.tag !== void 0 && (N.tag = I.tag), I.obj === void 0)
1560
1559
  throw "obj shall be specified for 'tag'.";
1561
- return $.obj = z(R.obj), new q($);
1560
+ return N.obj = O(I.obj), new F(N);
1562
1561
  }
1563
1562
  }
1564
1563
  }, this.jsonToASN1HEX = function(r) {
@@ -1568,29 +1567,29 @@ u.asn1.ASN1Util = new function() {
1568
1567
  }();
1569
1568
  u.asn1.ASN1Util.oidHexToInt = function(r) {
1570
1569
  for (var n = "", t = parseInt(r.substring(0, 2), 16), e = Math.floor(t / 40), i = t % 40, n = e + "." + i, s = "", o = 2; o < r.length; o += 2) {
1571
- var h = parseInt(r.substring(o, o + 2), 16), a = ("00000000" + h.toString(2)).slice(-8);
1572
- if (s = s + a.substring(1, 8), a.substring(0, 1) == "0") {
1573
- var f = new d(s, 2);
1570
+ var a = parseInt(r.substring(o, o + 2), 16), h = ("00000000" + a.toString(2)).slice(-8);
1571
+ if (s = s + h.substring(1, 8), h.substring(0, 1) == "0") {
1572
+ var f = new g(s, 2);
1574
1573
  n = n + "." + f.toString(10), s = "";
1575
1574
  }
1576
1575
  }
1577
1576
  return n;
1578
1577
  };
1579
1578
  u.asn1.ASN1Util.oidIntToHex = function(r) {
1580
- var t = function(h) {
1581
- var a = h.toString(16);
1582
- return a.length == 1 && (a = "0" + a), a;
1583
- }, e = function(h) {
1584
- var a = "", f = new d(h, 10), l = f.toString(2), c = 7 - l.length % 7;
1579
+ var t = function(a) {
1580
+ var h = a.toString(16);
1581
+ return h.length == 1 && (h = "0" + h), h;
1582
+ }, e = function(a) {
1583
+ var h = "", f = new g(a, 10), l = f.toString(2), c = 7 - l.length % 7;
1585
1584
  c == 7 && (c = 0);
1586
- for (var g = "", p = 0; p < c; p++)
1587
- g += "0";
1588
- l = g + l;
1585
+ for (var v = "", p = 0; p < c; p++)
1586
+ v += "0";
1587
+ l = v + l;
1589
1588
  for (var p = 0; p < l.length - 1; p += 7) {
1590
- var m = l.substring(p, p + 7);
1591
- p != l.length - 7 && (m = "1" + m), a += t(parseInt(m, 2));
1589
+ var T = l.substring(p, p + 7);
1590
+ p != l.length - 7 && (T = "1" + T), h += t(parseInt(T, 2));
1592
1591
  }
1593
- return a;
1592
+ return h;
1594
1593
  };
1595
1594
  if (!r.match(/^[0-9.]+$/))
1596
1595
  throw "malformed oid string: " + r;
@@ -1634,7 +1633,7 @@ u.asn1.DERAbstractString = function(r) {
1634
1633
  return this.hV;
1635
1634
  }, typeof r < "u" && (typeof r == "string" ? this.setString(r) : typeof r.str < "u" ? this.setString(r.str) : typeof r.hex < "u" && this.setStringHex(r.hex));
1636
1635
  };
1637
- T(u.asn1.DERAbstractString, u.asn1.ASN1Object);
1636
+ E(u.asn1.DERAbstractString, u.asn1.ASN1Object);
1638
1637
  u.asn1.DERAbstractTime = function(r) {
1639
1638
  u.asn1.DERAbstractTime.superclass.constructor.call(this), this.localDateToUTC = function(t) {
1640
1639
  utc = t.getTime() + t.getTimezoneOffset() * 6e4;
@@ -1643,15 +1642,15 @@ u.asn1.DERAbstractTime = function(r) {
1643
1642
  }, this.formatDate = function(t, e, i) {
1644
1643
  var n = this.zeroPadding, s = this.localDateToUTC(t), o = String(s.getFullYear());
1645
1644
  e == "utc" && (o = o.substring(2, 4));
1646
- var h = n(String(s.getMonth() + 1), 2), a = n(String(s.getDate()), 2), f = n(String(s.getHours()), 2), l = n(String(s.getMinutes()), 2), c = n(String(s.getSeconds()), 2), g = o + h + a + f + l + c;
1645
+ var a = n(String(s.getMonth() + 1), 2), h = n(String(s.getDate()), 2), f = n(String(s.getHours()), 2), l = n(String(s.getMinutes()), 2), c = n(String(s.getSeconds()), 2), v = o + a + h + f + l + c;
1647
1646
  if (i === !0) {
1648
1647
  var p = s.getMilliseconds();
1649
1648
  if (p != 0) {
1650
- var m = n(String(p), 3);
1651
- m = m.replace(/[0]+$/, ""), g = g + "." + m;
1649
+ var T = n(String(p), 3);
1650
+ T = T.replace(/[0]+$/, ""), v = v + "." + T;
1652
1651
  }
1653
1652
  }
1654
- return g + "Z";
1653
+ return v + "Z";
1655
1654
  }, this.zeroPadding = function(t, e) {
1656
1655
  return t.length >= e ? t : new Array(e - t.length + 1).join("0") + t;
1657
1656
  }, this.getString = function() {
@@ -1659,13 +1658,13 @@ u.asn1.DERAbstractTime = function(r) {
1659
1658
  }, this.setString = function(t) {
1660
1659
  this.hTLV = null, this.isModified = !0, this.s = t, this.hV = stohex(t);
1661
1660
  }, this.setByDateValue = function(t, e, i, n, s, o) {
1662
- var h = new Date(Date.UTC(t, e - 1, i, n, s, o, 0));
1663
- this.setByDate(h);
1661
+ var a = new Date(Date.UTC(t, e - 1, i, n, s, o, 0));
1662
+ this.setByDate(a);
1664
1663
  }, this.getFreshValueHex = function() {
1665
1664
  return this.hV;
1666
1665
  };
1667
1666
  };
1668
- T(u.asn1.DERAbstractTime, u.asn1.ASN1Object);
1667
+ E(u.asn1.DERAbstractTime, u.asn1.ASN1Object);
1669
1668
  u.asn1.DERAbstractStructured = function(r) {
1670
1669
  u.asn1.DERAbstractString.superclass.constructor.call(this), this.setByASN1ObjectArray = function(t) {
1671
1670
  this.hTLV = null, this.isModified = !0, this.asn1Array = t;
@@ -1673,16 +1672,16 @@ u.asn1.DERAbstractStructured = function(r) {
1673
1672
  this.hTLV = null, this.isModified = !0, this.asn1Array.push(t);
1674
1673
  }, this.asn1Array = new Array(), typeof r < "u" && typeof r.array < "u" && (this.asn1Array = r.array);
1675
1674
  };
1676
- T(u.asn1.DERAbstractStructured, u.asn1.ASN1Object);
1675
+ E(u.asn1.DERAbstractStructured, u.asn1.ASN1Object);
1677
1676
  u.asn1.DERBoolean = function() {
1678
1677
  u.asn1.DERBoolean.superclass.constructor.call(this), this.hT = "01", this.hTLV = "0101ff";
1679
1678
  };
1680
- T(u.asn1.DERBoolean, u.asn1.ASN1Object);
1679
+ E(u.asn1.DERBoolean, u.asn1.ASN1Object);
1681
1680
  u.asn1.DERInteger = function(r) {
1682
1681
  u.asn1.DERInteger.superclass.constructor.call(this), this.hT = "02", this.setByBigInteger = function(t) {
1683
1682
  this.hTLV = null, this.isModified = !0, this.hV = u.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t);
1684
1683
  }, this.setByInteger = function(t) {
1685
- var e = new d(String(t), 10);
1684
+ var e = new g(String(t), 10);
1686
1685
  this.setByBigInteger(e);
1687
1686
  }, this.setValueHex = function(t) {
1688
1687
  this.hV = t;
@@ -1690,7 +1689,7 @@ u.asn1.DERInteger = function(r) {
1690
1689
  return this.hV;
1691
1690
  }, typeof r < "u" && (typeof r.bigint < "u" ? this.setByBigInteger(r.bigint) : typeof r.int < "u" ? this.setByInteger(r.int) : typeof r == "number" ? this.setByInteger(r) : typeof r.hex < "u" && this.setValueHex(r.hex));
1692
1691
  };
1693
- T(u.asn1.DERInteger, u.asn1.ASN1Object);
1692
+ E(u.asn1.DERInteger, u.asn1.ASN1Object);
1694
1693
  u.asn1.DERBitString = function(r) {
1695
1694
  if (r !== void 0 && typeof r.obj < "u") {
1696
1695
  var t = u.asn1.ASN1Util.newObject(r.obj);
@@ -1710,8 +1709,8 @@ u.asn1.DERBitString = function(r) {
1710
1709
  for (var n = 0; n <= i; n++)
1711
1710
  e += "0";
1712
1711
  for (var s = "", n = 0; n < e.length - 1; n += 8) {
1713
- var o = e.substring(n, n + 8), h = parseInt(o, 2).toString(16);
1714
- h.length == 1 && (h = "0" + h), s += h;
1712
+ var o = e.substring(n, n + 8), a = parseInt(o, 2).toString(16);
1713
+ a.length == 1 && (a = "0" + a), s += a;
1715
1714
  }
1716
1715
  this.hTLV = null, this.isModified = !0, this.hV = "0" + i + s;
1717
1716
  }, this.setByBooleanArray = function(e) {
@@ -1726,7 +1725,7 @@ u.asn1.DERBitString = function(r) {
1726
1725
  return this.hV;
1727
1726
  }, typeof r < "u" && (typeof r == "string" && r.toLowerCase().match(/^[0-9a-f]+$/) ? this.setHexValueIncludingUnusedBits(r) : typeof r.hex < "u" ? this.setHexValueIncludingUnusedBits(r.hex) : typeof r.bin < "u" ? this.setByBinaryString(r.bin) : typeof r.array < "u" && this.setByBooleanArray(r.array));
1728
1727
  };
1729
- T(u.asn1.DERBitString, u.asn1.ASN1Object);
1728
+ E(u.asn1.DERBitString, u.asn1.ASN1Object);
1730
1729
  u.asn1.DEROctetString = function(r) {
1731
1730
  if (r !== void 0 && typeof r.obj < "u") {
1732
1731
  var t = u.asn1.ASN1Util.newObject(r.obj);
@@ -1734,21 +1733,21 @@ u.asn1.DEROctetString = function(r) {
1734
1733
  }
1735
1734
  u.asn1.DEROctetString.superclass.constructor.call(this, r), this.hT = "04";
1736
1735
  };
1737
- T(u.asn1.DEROctetString, u.asn1.DERAbstractString);
1736
+ E(u.asn1.DEROctetString, u.asn1.DERAbstractString);
1738
1737
  u.asn1.DERNull = function() {
1739
1738
  u.asn1.DERNull.superclass.constructor.call(this), this.hT = "05", this.hTLV = "0500";
1740
1739
  };
1741
- T(u.asn1.DERNull, u.asn1.ASN1Object);
1740
+ E(u.asn1.DERNull, u.asn1.ASN1Object);
1742
1741
  u.asn1.DERObjectIdentifier = function(r) {
1743
1742
  var t = function(i) {
1744
1743
  var n = i.toString(16);
1745
1744
  return n.length == 1 && (n = "0" + n), n;
1746
1745
  }, e = function(i) {
1747
- var n = "", s = new d(i, 10), o = s.toString(2), h = 7 - o.length % 7;
1748
- h == 7 && (h = 0);
1749
- for (var a = "", f = 0; f < h; f++)
1750
- a += "0";
1751
- o = a + o;
1746
+ var n = "", s = new g(i, 10), o = s.toString(2), a = 7 - o.length % 7;
1747
+ a == 7 && (a = 0);
1748
+ for (var h = "", f = 0; f < a; f++)
1749
+ h += "0";
1750
+ o = h + o;
1752
1751
  for (var f = 0; f < o.length - 1; f += 7) {
1753
1752
  var l = o.substring(f, f + 7);
1754
1753
  f != o.length - 7 && (l = "1" + l), n += t(parseInt(l, 2));
@@ -1762,8 +1761,8 @@ u.asn1.DERObjectIdentifier = function(r) {
1762
1761
  throw "malformed oid string: " + i;
1763
1762
  var n = "", s = i.split("."), o = parseInt(s[0]) * 40 + parseInt(s[1]);
1764
1763
  n += t(o), s.splice(0, 2);
1765
- for (var h = 0; h < s.length; h++)
1766
- n += e(s[h]);
1764
+ for (var a = 0; a < s.length; a++)
1765
+ n += e(s[a]);
1767
1766
  this.hTLV = null, this.isModified = !0, this.s = null, this.hV = n;
1768
1767
  }, this.setValueName = function(i) {
1769
1768
  var n = u.asn1.x509.OID.name2oid(i);
@@ -1775,12 +1774,12 @@ u.asn1.DERObjectIdentifier = function(r) {
1775
1774
  return this.hV;
1776
1775
  }, r !== void 0 && (typeof r == "string" ? r.match(/^[0-2].[0-9.]+$/) ? this.setValueOidString(r) : this.setValueName(r) : r.oid !== void 0 ? this.setValueOidString(r.oid) : r.hex !== void 0 ? this.setValueHex(r.hex) : r.name !== void 0 && this.setValueName(r.name));
1777
1776
  };
1778
- T(u.asn1.DERObjectIdentifier, u.asn1.ASN1Object);
1777
+ E(u.asn1.DERObjectIdentifier, u.asn1.ASN1Object);
1779
1778
  u.asn1.DEREnumerated = function(r) {
1780
1779
  u.asn1.DEREnumerated.superclass.constructor.call(this), this.hT = "0a", this.setByBigInteger = function(t) {
1781
1780
  this.hTLV = null, this.isModified = !0, this.hV = u.asn1.ASN1Util.bigIntToMinTwosComplementsHex(t);
1782
1781
  }, this.setByInteger = function(t) {
1783
- var e = new d(String(t), 10);
1782
+ var e = new g(String(t), 10);
1784
1783
  this.setByBigInteger(e);
1785
1784
  }, this.setValueHex = function(t) {
1786
1785
  this.hV = t;
@@ -1788,27 +1787,27 @@ u.asn1.DEREnumerated = function(r) {
1788
1787
  return this.hV;
1789
1788
  }, typeof r < "u" && (typeof r.int < "u" ? this.setByInteger(r.int) : typeof r == "number" ? this.setByInteger(r) : typeof r.hex < "u" && this.setValueHex(r.hex));
1790
1789
  };
1791
- T(u.asn1.DEREnumerated, u.asn1.ASN1Object);
1790
+ E(u.asn1.DEREnumerated, u.asn1.ASN1Object);
1792
1791
  u.asn1.DERUTF8String = function(r) {
1793
1792
  u.asn1.DERUTF8String.superclass.constructor.call(this, r), this.hT = "0c";
1794
1793
  };
1795
- T(u.asn1.DERUTF8String, u.asn1.DERAbstractString);
1794
+ E(u.asn1.DERUTF8String, u.asn1.DERAbstractString);
1796
1795
  u.asn1.DERNumericString = function(r) {
1797
1796
  u.asn1.DERNumericString.superclass.constructor.call(this, r), this.hT = "12";
1798
1797
  };
1799
- T(u.asn1.DERNumericString, u.asn1.DERAbstractString);
1798
+ E(u.asn1.DERNumericString, u.asn1.DERAbstractString);
1800
1799
  u.asn1.DERPrintableString = function(r) {
1801
1800
  u.asn1.DERPrintableString.superclass.constructor.call(this, r), this.hT = "13";
1802
1801
  };
1803
- T(u.asn1.DERPrintableString, u.asn1.DERAbstractString);
1802
+ E(u.asn1.DERPrintableString, u.asn1.DERAbstractString);
1804
1803
  u.asn1.DERTeletexString = function(r) {
1805
1804
  u.asn1.DERTeletexString.superclass.constructor.call(this, r), this.hT = "14";
1806
1805
  };
1807
- T(u.asn1.DERTeletexString, u.asn1.DERAbstractString);
1806
+ E(u.asn1.DERTeletexString, u.asn1.DERAbstractString);
1808
1807
  u.asn1.DERIA5String = function(r) {
1809
1808
  u.asn1.DERIA5String.superclass.constructor.call(this, r), this.hT = "16";
1810
1809
  };
1811
- T(u.asn1.DERIA5String, u.asn1.DERAbstractString);
1810
+ E(u.asn1.DERIA5String, u.asn1.DERAbstractString);
1812
1811
  u.asn1.DERUTCTime = function(r) {
1813
1812
  u.asn1.DERUTCTime.superclass.constructor.call(this, r), this.hT = "17", this.setByDate = function(t) {
1814
1813
  this.hTLV = null, this.isModified = !0, this.date = t, this.s = this.formatDate(this.date, "utc"), this.hV = stohex(this.s);
@@ -1816,7 +1815,7 @@ u.asn1.DERUTCTime = function(r) {
1816
1815
  return typeof this.date > "u" && typeof this.s > "u" && (this.date = /* @__PURE__ */ new Date(), this.s = this.formatDate(this.date, "utc"), this.hV = stohex(this.s)), this.hV;
1817
1816
  }, r !== void 0 && (r.str !== void 0 ? this.setString(r.str) : typeof r == "string" && r.match(/^[0-9]{12}Z$/) ? this.setString(r) : r.hex !== void 0 ? this.setStringHex(r.hex) : r.date !== void 0 && this.setByDate(r.date));
1818
1817
  };
1819
- T(u.asn1.DERUTCTime, u.asn1.DERAbstractTime);
1818
+ E(u.asn1.DERUTCTime, u.asn1.DERAbstractTime);
1820
1819
  u.asn1.DERGeneralizedTime = function(r) {
1821
1820
  u.asn1.DERGeneralizedTime.superclass.constructor.call(this, r), this.hT = "18", this.withMillis = !1, this.setByDate = function(t) {
1822
1821
  this.hTLV = null, this.isModified = !0, this.date = t, this.s = this.formatDate(this.date, "gen", this.withMillis), this.hV = stohex(this.s);
@@ -1824,7 +1823,7 @@ u.asn1.DERGeneralizedTime = function(r) {
1824
1823
  return this.date === void 0 && this.s === void 0 && (this.date = /* @__PURE__ */ new Date(), this.s = this.formatDate(this.date, "gen", this.withMillis), this.hV = stohex(this.s)), this.hV;
1825
1824
  }, r !== void 0 && (r.str !== void 0 ? this.setString(r.str) : typeof r == "string" && r.match(/^[0-9]{14}Z$/) ? this.setString(r) : r.hex !== void 0 ? this.setStringHex(r.hex) : r.date !== void 0 && this.setByDate(r.date), r.millis === !0 && (this.withMillis = !0));
1826
1825
  };
1827
- T(u.asn1.DERGeneralizedTime, u.asn1.DERAbstractTime);
1826
+ E(u.asn1.DERGeneralizedTime, u.asn1.DERAbstractTime);
1828
1827
  u.asn1.DERSequence = function(r) {
1829
1828
  u.asn1.DERSequence.superclass.constructor.call(this, r), this.hT = "30", this.getFreshValueHex = function() {
1830
1829
  for (var t = "", e = 0; e < this.asn1Array.length; e++) {
@@ -1834,7 +1833,7 @@ u.asn1.DERSequence = function(r) {
1834
1833
  return this.hV = t, this.hV;
1835
1834
  };
1836
1835
  };
1837
- T(u.asn1.DERSequence, u.asn1.DERAbstractStructured);
1836
+ E(u.asn1.DERSequence, u.asn1.DERAbstractStructured);
1838
1837
  u.asn1.DERSet = function(r) {
1839
1838
  u.asn1.DERSet.superclass.constructor.call(this, r), this.hT = "31", this.sortFlag = !0, this.getFreshValueHex = function() {
1840
1839
  for (var t = new Array(), e = 0; e < this.asn1Array.length; e++) {
@@ -1844,7 +1843,7 @@ u.asn1.DERSet = function(r) {
1844
1843
  return this.sortFlag == !0 && t.sort(), this.hV = t.join(""), this.hV;
1845
1844
  }, typeof r < "u" && typeof r.sortflag < "u" && r.sortflag == !1 && (this.sortFlag = !1);
1846
1845
  };
1847
- T(u.asn1.DERSet, u.asn1.DERAbstractStructured);
1846
+ E(u.asn1.DERSet, u.asn1.DERAbstractStructured);
1848
1847
  u.asn1.DERTaggedObject = function(r) {
1849
1848
  u.asn1.DERTaggedObject.superclass.constructor.call(this), this.hT = "a0", this.hV = "", this.isExplicit = !0, this.asn1Object = null, this.setASN1Object = function(t, e, i) {
1850
1849
  this.hT = e, this.isExplicit = t, this.asn1Object = i, this.isExplicit ? (this.hV = this.asn1Object.getEncodedHex(), this.hTLV = null, this.isModified = !0) : (this.hV = null, this.hTLV = i.getEncodedHex(), this.hTLV = this.hTLV.replace(/^../, e), this.isModified = !1);
@@ -1852,8 +1851,8 @@ u.asn1.DERTaggedObject = function(r) {
1852
1851
  return this.hV;
1853
1852
  }, typeof r < "u" && (typeof r.tag < "u" && (this.hT = r.tag), typeof r.explicit < "u" && (this.isExplicit = r.explicit), typeof r.obj < "u" && (this.asn1Object = r.obj, this.setASN1Object(this.isExplicit, this.hT, this.asn1Object)));
1854
1853
  };
1855
- T(u.asn1.DERTaggedObject, u.asn1.ASN1Object);
1856
- var ve = /* @__PURE__ */ (function() {
1854
+ E(u.asn1.DERTaggedObject, u.asn1.ASN1Object);
1855
+ var Oe = /* @__PURE__ */ (function() {
1857
1856
  var r = function(t, e) {
1858
1857
  return r = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(i, n) {
1859
1858
  i.__proto__ = n;
@@ -1870,37 +1869,37 @@ var ve = /* @__PURE__ */ (function() {
1870
1869
  }
1871
1870
  t.prototype = e === null ? Object.create(e) : (i.prototype = e.prototype, new i());
1872
1871
  };
1873
- })(), Dt = (
1872
+ })(), Ct = (
1874
1873
  /** @class */
1875
1874
  (function(r) {
1876
- ve(t, r);
1875
+ Oe(t, r);
1877
1876
  function t(e) {
1878
1877
  var i = r.call(this) || this;
1879
1878
  return e && (typeof e == "string" ? i.parseKey(e) : (t.hasPrivateKeyProperty(e) || t.hasPublicKeyProperty(e)) && i.parsePropertiesFrom(e)), i;
1880
1879
  }
1881
1880
  return t.prototype.parseKey = function(e) {
1882
1881
  try {
1883
- var i = 0, n = 0, s = /^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/, o = s.test(e) ? Lt.decode(e) : ut.unarmor(e), h = Ut.decode(o);
1884
- if (h.sub.length === 3 && (h = h.sub[2].sub[0]), h.sub.length === 9) {
1885
- i = h.sub[1].getHexStringValue(), this.n = b(i, 16), n = h.sub[2].getHexStringValue(), this.e = parseInt(n, 16);
1886
- var a = h.sub[3].getHexStringValue();
1887
- this.d = b(a, 16);
1888
- var f = h.sub[4].getHexStringValue();
1889
- this.p = b(f, 16);
1890
- var l = h.sub[5].getHexStringValue();
1891
- this.q = b(l, 16);
1892
- var c = h.sub[6].getHexStringValue();
1893
- this.dmp1 = b(c, 16);
1894
- var g = h.sub[7].getHexStringValue();
1895
- this.dmq1 = b(g, 16);
1896
- var p = h.sub[8].getHexStringValue();
1897
- this.coeff = b(p, 16);
1898
- } else if (h.sub.length === 2)
1899
- if (h.sub[0].sub) {
1900
- var m = h.sub[1], S = m.sub[0];
1901
- i = S.sub[0].getHexStringValue(), this.n = b(i, 16), n = S.sub[1].getHexStringValue(), this.e = parseInt(n, 16);
1882
+ var i = 0, n = 0, s = /^\s*(?:[0-9A-Fa-f][0-9A-Fa-f]\s*)+$/, o = s.test(e) ? ie.decode(e) : Tt.unarmor(e), a = se.decode(o);
1883
+ if (a.sub.length === 3 && (a = a.sub[2].sub[0]), a.sub.length === 9) {
1884
+ i = a.sub[1].getHexStringValue(), this.n = w(i, 16), n = a.sub[2].getHexStringValue(), this.e = parseInt(n, 16);
1885
+ var h = a.sub[3].getHexStringValue();
1886
+ this.d = w(h, 16);
1887
+ var f = a.sub[4].getHexStringValue();
1888
+ this.p = w(f, 16);
1889
+ var l = a.sub[5].getHexStringValue();
1890
+ this.q = w(l, 16);
1891
+ var c = a.sub[6].getHexStringValue();
1892
+ this.dmp1 = w(c, 16);
1893
+ var v = a.sub[7].getHexStringValue();
1894
+ this.dmq1 = w(v, 16);
1895
+ var p = a.sub[8].getHexStringValue();
1896
+ this.coeff = w(p, 16);
1897
+ } else if (a.sub.length === 2)
1898
+ if (a.sub[0].sub) {
1899
+ var T = a.sub[1], b = T.sub[0];
1900
+ i = b.sub[0].getHexStringValue(), this.n = w(i, 16), n = b.sub[1].getHexStringValue(), this.e = parseInt(n, 16);
1902
1901
  } else
1903
- i = h.sub[0].getHexStringValue(), this.n = b(i, 16), n = h.sub[1].getHexStringValue(), this.e = parseInt(n, 16);
1902
+ i = a.sub[0].getHexStringValue(), this.n = w(i, 16), n = a.sub[1].getHexStringValue(), this.e = parseInt(n, 16);
1904
1903
  else
1905
1904
  return !1;
1906
1905
  return !0;
@@ -1923,7 +1922,7 @@ var ve = /* @__PURE__ */ (function() {
1923
1922
  }, i = new u.asn1.DERSequence(e);
1924
1923
  return i.getEncodedHex();
1925
1924
  }, t.prototype.getPrivateBaseKeyB64 = function() {
1926
- return J(this.getPrivateBaseKey());
1925
+ return tt(this.getPrivateBaseKey());
1927
1926
  }, t.prototype.getPublicBaseKey = function() {
1928
1927
  var e = new u.asn1.DERSequence({
1929
1928
  array: [
@@ -1943,7 +1942,7 @@ var ve = /* @__PURE__ */ (function() {
1943
1942
  });
1944
1943
  return s.getEncodedHex();
1945
1944
  }, t.prototype.getPublicBaseKeyB64 = function() {
1946
- return J(this.getPublicBaseKey());
1945
+ return tt(this.getPublicBaseKey());
1947
1946
  }, t.wordwrap = function(e, i) {
1948
1947
  if (i = i || 64, !e)
1949
1948
  return e;
@@ -1968,34 +1967,34 @@ var ve = /* @__PURE__ */ (function() {
1968
1967
  }, t.prototype.parsePropertiesFrom = function(e) {
1969
1968
  this.n = e.n, this.e = e.e, e.hasOwnProperty("d") && (this.d = e.d, this.p = e.p, this.q = e.q, this.dmp1 = e.dmp1, this.dmq1 = e.dmq1, this.coeff = e.coeff);
1970
1969
  }, t;
1971
- })(ce)
1972
- ), ht, ye = typeof process < "u" ? (ht = process.env) === null || ht === void 0 ? void 0 : ht.npm_package_version : void 0, me = (
1970
+ })(Ae)
1971
+ ), yt, Ne = typeof process < "u" ? (yt = process.env) === null || yt === void 0 ? void 0 : yt.npm_package_version : void 0, Pe = (
1973
1972
  /** @class */
1974
1973
  (function() {
1975
1974
  function r(t) {
1976
1975
  t === void 0 && (t = {}), this.default_key_size = t.default_key_size ? parseInt(t.default_key_size, 10) : 1024, this.default_public_exponent = t.default_public_exponent || "010001", this.log = t.log || !1, this.key = t.key || null;
1977
1976
  }
1978
1977
  return r.prototype.setKey = function(t) {
1979
- t ? (this.log && this.key && console.warn("A key was already set, overriding existing."), this.key = new Dt(t)) : !this.key && this.log && console.error("A key was not set.");
1978
+ t ? (this.log && this.key && console.warn("A key was already set, overriding existing."), this.key = new Ct(t)) : !this.key && this.log && console.error("A key was not set.");
1980
1979
  }, r.prototype.setPrivateKey = function(t) {
1981
1980
  this.setKey(t);
1982
1981
  }, r.prototype.setPublicKey = function(t) {
1983
1982
  this.setKey(t);
1984
1983
  }, r.prototype.decrypt = function(t) {
1985
1984
  try {
1986
- return this.getKey().decrypt(gt(t));
1985
+ return this.getKey().decrypt(Rt(t));
1987
1986
  } catch {
1988
1987
  return !1;
1989
1988
  }
1990
1989
  }, r.prototype.encrypt = function(t) {
1991
1990
  try {
1992
- return J(this.getKey().encrypt(t));
1991
+ return tt(this.getKey().encrypt(t));
1993
1992
  } catch {
1994
1993
  return !1;
1995
1994
  }
1996
1995
  }, r.prototype.encryptOAEP = function(t) {
1997
1996
  try {
1998
- return J(this.getKey().encrypt(t, le));
1997
+ return tt(this.getKey().encrypt(t, Re));
1999
1998
  } catch {
2000
1999
  return !1;
2001
2000
  }
@@ -2004,30 +2003,30 @@ var ve = /* @__PURE__ */ (function() {
2004
2003
  return n;
2005
2004
  }), i === void 0 && (i = "");
2006
2005
  try {
2007
- return J(this.getKey().sign(t, e, i));
2006
+ return tt(this.getKey().sign(t, e, i));
2008
2007
  } catch {
2009
2008
  return !1;
2010
2009
  }
2011
2010
  }, r.prototype.signSha256 = function(t) {
2012
2011
  return this.sign(t, function(e) {
2013
- return wt(ft(e));
2012
+ return Pt(bt(e));
2014
2013
  }, "sha256");
2015
2014
  }, r.prototype.verify = function(t, e, i) {
2016
2015
  i === void 0 && (i = function(n) {
2017
2016
  return n;
2018
2017
  });
2019
2018
  try {
2020
- return this.getKey().verify(t, gt(e), i);
2019
+ return this.getKey().verify(t, Rt(e), i);
2021
2020
  } catch {
2022
2021
  return !1;
2023
2022
  }
2024
2023
  }, r.prototype.verifySha256 = function(t, e) {
2025
2024
  return this.verify(t, e, function(i) {
2026
- return wt(ft(i));
2025
+ return Pt(bt(i));
2027
2026
  });
2028
2027
  }, r.prototype.getKey = function(t) {
2029
2028
  if (!this.key) {
2030
- if (this.key = new Dt(), t && {}.toString.call(t) === "[object Function]") {
2029
+ if (this.key = new Ct(), t && {}.toString.call(t) === "[object Function]") {
2031
2030
  this.key.generateAsync(this.default_key_size, this.default_public_exponent, t);
2032
2031
  return;
2033
2032
  }
@@ -2042,11 +2041,16 @@ var ve = /* @__PURE__ */ (function() {
2042
2041
  return this.getKey().getPublicKey();
2043
2042
  }, r.prototype.getPublicKeyB64 = function() {
2044
2043
  return this.getKey().getPublicBaseKeyB64();
2045
- }, r.version = ye, r;
2044
+ }, r.version = Ne, r;
2046
2045
  })()
2047
2046
  );
2048
- const Se = {
2049
- name: "GPluginVideo",
2047
+ const _e = {
2048
+ id: "playWnd",
2049
+ class: "playWnd"
2050
+ }, Mt = 3, qt = 3e3, mt = "插件未启动,正在尝试启动,请稍候...", ft = "插件启动失败,请检查插件是否安装!", St = /* @__PURE__ */ Object.assign({
2051
+ name: "GPluginVideo"
2052
+ }, {
2053
+ __name: "index",
2050
2054
  props: {
2051
2055
  // 是否播放
2052
2056
  isPlayVideo: {
@@ -2058,7 +2062,7 @@ const Se = {
2058
2062
  type: Boolean,
2059
2063
  default: !1
2060
2064
  },
2061
- //监控点编号值
2065
+ // 监控点编号值
2062
2066
  cameraIndexCode: {
2063
2067
  type: String,
2064
2068
  default: ""
@@ -2076,19 +2080,19 @@ const Se = {
2076
2080
  // 应用Key
2077
2081
  usefullData: {
2078
2082
  type: Object,
2079
- default: {
2083
+ default: () => ({
2080
2084
  appkey: "24460774",
2081
2085
  secret: "vphyI4pTqEVk4lT67jVe",
2082
2086
  ip: "61.27.16.15",
2083
2087
  port: 443
2084
- }
2088
+ })
2085
2089
  },
2086
2090
  size: {
2087
2091
  type: Object,
2088
- default: {
2092
+ default: () => ({
2089
2093
  windowWidth: 300,
2090
2094
  windowHeight: 200
2091
- }
2095
+ })
2092
2096
  },
2093
2097
  // 是否批量
2094
2098
  isMulTip: {
@@ -2104,175 +2108,81 @@ const Se = {
2104
2108
  default: ""
2105
2109
  }
2106
2110
  },
2107
- data() {
2108
- return {
2109
- camlength: "1x1",
2110
- layoutMode: "1x1",
2111
- oWebControl: null,
2112
- initCount: 0,
2113
- pubKey: "",
2114
- isLoading: !0,
2115
- playText: "",
2116
- videoTotal: 0,
2117
- selectAll: [],
2118
- currentPage: 1,
2119
- currentArr: [],
2120
- pageSize: 0
2121
- };
2122
- },
2123
- mounted() {
2124
- this.loadH5PlayerScript().then(() => {
2125
- this.isPlayVideo && this.initPlugin();
2126
- }).catch(() => {
2127
- this.showPluginDownloadDialog();
2128
- }), this.isMulTip && (this.pageSize = 4, this.videoTotal = this.multipPointsArr.length, this.videoTotal === 1 ? this.layoutMode = "1x1" : this.videoTotal === 2 ? this.layoutMode = "2x2" : this.videoTotal > 2 && (this.layoutMode = "2x2"), this.selectAll = this.multipPointsArr, this.selectAll = this.chunkArray(this.selectAll, 4), this.currentArr = [...this.selectAll[this.currentPage - 1]]);
2129
- },
2130
- beforeDestroy() {
2131
- this.oWebControl.JS_RequestInterface({
2132
- funcName: "stopAllPreview"
2133
- }), this.oWebControl.JS_HideWnd(), this.oWebControl.JS_RequestInterface({
2134
- funcName: "destroyWnd"
2135
- });
2136
- },
2137
- watch: {
2138
- happenedTime() {
2139
- this.startMultiPlayback();
2140
- },
2141
- cameraIndexCode(r, t) {
2142
- r !== t && (this.oWebControl.JS_RequestInterface({
2143
- funcName: "stopAllPreview"
2144
- }), this.oWebControl.JS_HideWnd(), this.oWebControl.JS_RequestInterface({
2145
- funcName: "destroyWnd"
2146
- }), this.oWebControl.JS_Disconnect().then(
2147
- () => {
2148
- this.initPlugin();
2149
- },
2150
- () => {
2151
- }
2152
- ));
2153
- },
2154
- playText(r) {
2155
- r != "" && this.showPluginDownloadDialog();
2156
- }
2157
- },
2158
- methods: {
2159
- // 动态加载h5player.min.js脚本
2160
- loadH5PlayerScript() {
2161
- return new Promise((r, t) => {
2111
+ emits: ["closeVideoEmit"],
2112
+ setup(r, { expose: t, emit: e }) {
2113
+ const i = r, n = e, s = C(null), o = C(0), a = C(""), h = C(""), f = C("1x1"), l = C(0), c = C([]), v = C(1), p = C([]), T = C(0);
2114
+ function b() {
2115
+ return new Promise((m, d) => {
2162
2116
  if (window.WebControl) {
2163
- r();
2117
+ m();
2164
2118
  return;
2165
2119
  }
2166
- const e = document.createElement("script");
2167
- let i;
2168
- try {
2169
- i = new URL("./public/web-control_1.2.5.min.js", import.meta.url).href;
2170
- } catch {
2171
- throw i = "../../../public/web-control_1.2.5.min.js", new Error("无法获取web-control_1.2.5.min.js");
2172
- }
2173
- e.src = i, e.async = !0, e.onload = () => {
2174
- console.log("web-control_1.2.5.min.js加载成功"), r();
2175
- }, e.onerror = () => {
2176
- console.error("web-control_1.2.5.min加载失败"), t(new Error("加载hweb-control_1.2.5.min.js失败"));
2177
- }, document.head.appendChild(e);
2120
+ import("../web-control.esm.min-BC66rx6c.mjs").then((A) => {
2121
+ window.WebControl = A.WebControl, console.log("web-control.esm.min.js加载成功"), m();
2122
+ }).catch((A) => {
2123
+ console.error("web-control.esm.min.js加载失败", A), d(new Error("加载web-control.esm.min.js失败"));
2124
+ });
2178
2125
  });
2179
- },
2180
- getPreviousMinute(r) {
2181
- const t = new Date(Number(r));
2182
- return t.setMinutes(t.getMinutes() - 1), t.getTime();
2183
- },
2184
- getNextMinute(r) {
2185
- const t = new Date(Number(r));
2186
- return t.setMinutes(t.getMinutes() + 1), t.getTime();
2187
- },
2188
- chunkArray(r, t) {
2189
- let e = [];
2190
- for (let i = 0; i < r.length; i += t) {
2191
- let n = r.slice(i, i + t);
2192
- e.push(n);
2193
- }
2194
- return e;
2195
- },
2196
- // 关闭视频
2197
- closeVideo() {
2198
- this.$emit("closeVideoEmit"), this.oWebControl !== null && (this.oWebControl.JS_RequestInterface({
2199
- funcName: "stopAllPreview"
2200
- }), this.oWebControl.JS_HideWnd(), this.oWebControl.JS_Disconnect().then(
2201
- () => {
2202
- },
2203
- () => {
2204
- }
2205
- ));
2206
- },
2207
- // 批量播放
2208
- startMultiPreview() {
2209
- const r = {
2210
- argument: {
2211
- list: []
2212
- }
2213
- };
2214
- for (let t = 0; t < this.currentArr.length; t++) {
2215
- let i = {
2216
- cameraIndexCode: this.currentArr[t].indexCode.replace(/(^\s*)/g, ""),
2217
- gpuMode: 0,
2218
- streamMode: 0,
2219
- transMode: 1,
2220
- wndId: t + 1
2221
- };
2222
- r.argument.list.unshift(i);
2223
- }
2224
- this.oWebControl.JS_RequestInterface({
2225
- funcName: "startMultiPreviewByCameraIndexCode",
2226
- argument: JSON.stringify(r.argument)
2126
+ }
2127
+ function x(m) {
2128
+ const d = new Date(Number(m));
2129
+ return d.setMinutes(d.getMinutes() - 1), d.getTime();
2130
+ }
2131
+ function q(m) {
2132
+ const d = new Date(Number(m));
2133
+ return d.setMinutes(d.getMinutes() + 1), d.getTime();
2134
+ }
2135
+ function B(m, d) {
2136
+ const A = [];
2137
+ for (let W = 0; W < m.length; W += d)
2138
+ A.push(m.slice(W, W + d));
2139
+ return A;
2140
+ }
2141
+ function F(m) {
2142
+ const d = new Pe();
2143
+ return d.setPublicKey(a.value), d.encrypt(m);
2144
+ }
2145
+ function O() {
2146
+ n("closeVideoEmit"), s.value !== null && (s.value.JS_RequestInterface({ funcName: "stopAllPreview" }), s.value.JS_HideWnd(), s.value.JS_Disconnect().then(() => {
2147
+ }, () => {
2148
+ }));
2149
+ }
2150
+ function et() {
2151
+ s.value && (s.value.JS_RequestInterface({ funcName: "stopAllPreview" }), s.value.JS_HideWnd(), s.value.JS_RequestInterface({ funcName: "destroyWnd" }));
2152
+ }
2153
+ function y(m) {
2154
+ s.value.JS_RequestInterface({
2155
+ funcName: "getRSAPubKey",
2156
+ argument: JSON.stringify({ keyLength: 1024 })
2157
+ }).then((d) => {
2158
+ d.responseMsg.data && (a.value = d.responseMsg.data, m());
2227
2159
  });
2228
- },
2229
- // 批量回放
2230
- startMultiPlayback() {
2231
- let r = "", t = "";
2232
- this.happenedTime ? (console.log(
2233
- this.getPreviousMinute(this.happenedTime),
2234
- this.getNextMinute(this.happenedTime)
2235
- ), r = this.getPreviousMinute(this.happenedTime), t = this.getNextMinute(this.happenedTime)) : (r = (/* @__PURE__ */ new Date()).getTime() - 1440 * 60 * 1e3, t = (/* @__PURE__ */ new Date()).getTime());
2236
- const e = {
2237
- argument: {
2238
- list: []
2239
- }
2240
- };
2241
- for (let i = 0; i < this.currentArr.length; i++) {
2242
- let n = this.currentArr[i], s = {
2243
- startTimeStamp: Math.floor(r / 1e3).toString(),
2244
- // 录像查询开始时间戳,单位:秒
2245
- endTimeStamp: Math.floor(t / 1e3).toString(),
2246
- // 录像结束开始时间戳,单位:秒
2247
- cameraIndexCode: n.indexCode.replace(/(^\s*)/g, ""),
2248
- gpuMode: 0,
2160
+ }
2161
+ function k() {
2162
+ let m = i.cameraIndexCode.trim();
2163
+ s.value.JS_RequestInterface({
2164
+ funcName: "startPreview",
2165
+ argument: JSON.stringify({
2166
+ cameraIndexCode: m,
2249
2167
  streamMode: 0,
2168
+ // 主子码流标识:0-主码流,1-子码流
2250
2169
  transMode: 1,
2251
- wndId: i + 1
2252
- };
2253
- e.argument.list.unshift(s);
2254
- }
2255
- this.oWebControl.JS_RequestInterface({
2256
- funcName: "startMultiPlaybackByCameraIndexCode",
2257
- argument: JSON.stringify(e.argument)
2170
+ // 传输协议:0-UDP,1-TCP
2171
+ gpuMode: 0,
2172
+ // 是否启用GPU硬解,0-不启用,1-启用
2173
+ wndId: -1
2174
+ // 播放窗口序号(在2x2以上布局下可指定播放窗口)
2175
+ })
2258
2176
  });
2259
- },
2260
- // 回放
2261
- startPlayback() {
2262
- console.log(this.getPreviousMinute(this.happenedTime));
2263
- let r = "", t = "", e = "";
2264
- this.happenedTime ? (console.log(
2265
- this.getPreviousMinute(this.happenedTime),
2266
- this.getNextMinute(this.happenedTime)
2267
- ), r = this.cameraIndexCode, t = this.getPreviousMinute(this.happenedTime), e = this.getNextMinute(this.happenedTime)) : (r = this.cameraIndexCode, t = (/* @__PURE__ */ new Date()).getTime() - 1440 * 60 * 1e3, e = (/* @__PURE__ */ new Date()).getTime()), this.oWebControl.JS_RequestInterface({
2177
+ }
2178
+ function L() {
2179
+ let m = i.cameraIndexCode, d = "", A = "";
2180
+ i.happenedTime ? (d = x(i.happenedTime), A = q(i.happenedTime)) : (d = Date.now() - 1440 * 60 * 1e3, A = Date.now()), s.value.JS_RequestInterface({
2268
2181
  funcName: "startPlayback",
2269
2182
  argument: JSON.stringify({
2270
- cameraIndexCode: r,
2271
- // 监控点编号
2272
- startTimeStamp: Math.floor(t / 1e3).toString(),
2273
- // 录像查询开始时间戳,单位:秒
2274
- endTimeStamp: Math.floor(e / 1e3).toString(),
2275
- // 录像结束开始时间戳,单位:秒
2183
+ cameraIndexCode: m,
2184
+ startTimeStamp: Math.floor(d / 1e3).toString(),
2185
+ endTimeStamp: Math.floor(A / 1e3).toString(),
2276
2186
  recordLocation: 1,
2277
2187
  // 录像存储类型:0-中心存储,1-设备存储
2278
2188
  transMode: 1,
@@ -2283,208 +2193,151 @@ const Se = {
2283
2193
  // 可指定播放窗口
2284
2194
  })
2285
2195
  });
2286
- },
2287
- // 播放事件
2288
- startPlay() {
2289
- let r = this.cameraIndexCode;
2290
- const t = 0, e = 1, i = 0, n = -1;
2291
- r = r.replace(/(^\s*)/g, ""), r = r.replace(/(\s*$)/g, ""), this.oWebControl.JS_RequestInterface({
2292
- funcName: "startPreview",
2293
- argument: JSON.stringify({
2294
- cameraIndexCode: r,
2295
- //监控点编号
2296
- streamMode: t,
2297
- //主子码流标识
2298
- transMode: e,
2299
- //传输协议
2300
- gpuMode: i,
2301
- //是否开启GPU硬解
2302
- wndId: n
2303
- //可指定播放窗口
2304
- })
2196
+ }
2197
+ function _() {
2198
+ const m = p.value.map((d, A) => ({
2199
+ cameraIndexCode: d.indexCode.trim(),
2200
+ gpuMode: 0,
2201
+ streamMode: 0,
2202
+ transMode: 1,
2203
+ wndId: A + 1
2204
+ }));
2205
+ s.value.JS_RequestInterface({
2206
+ funcName: "startMultiPreviewByCameraIndexCode",
2207
+ argument: JSON.stringify({ list: m })
2305
2208
  });
2306
- },
2307
- // 创建播放实例
2308
- initPlugin() {
2309
- this.oWebControl = new window.WebControl({
2310
- szPluginContainer: "playWnd",
2311
- // 指定容器id
2312
- iServicePortStart: 15900,
2313
- // 指定起止端口号,建议使用该值
2314
- iServicePortEnd: 15900,
2315
- szClassId: "23BF3B0A-2C56-4D97-9C03-0CB103AA8F11",
2316
- cbConnectSuccess: () => {
2317
- this.oWebControl.JS_StartService("window", {
2318
- dllPath: "./VideoPluginConnect.dll"
2319
- }).then(
2320
- () => {
2321
- this.oWebControl.JS_SetWindowControlCallback({
2322
- cbIntegrationCallBack: this.cbIntegrationCallBack
2323
- }), this.oWebControl.JS_CreateWnd("playWnd", this.size.windowWidth, this.size.windowHeight).then(() => {
2324
- this.init();
2325
- });
2326
- },
2327
- function() {
2328
- }
2329
- );
2330
- },
2331
- cbConnectError: () => {
2332
- this.oWebControl = null, this.$message.error("插件未启动,正在尝试启动,请稍候..."), this.playText = "插件未启动,正在尝试启动,请稍候...", window.WebControl.JS_WakeUp("VideoWebPlugin://"), this.initCount++, this.initCount < 3 ? setTimeout(() => {
2333
- this.initPlugin();
2334
- }, 3e3) : (this.$message.error("插件启动失败,请检查插件是否安装!"), this.playText = "插件启动失败,请检查插件是否安装!");
2335
- },
2336
- cbConnectClose: (r) => {
2337
- r || (this.oWebControl = null, this.playText = "插件未启动,正在尝试启动,请稍候...", this.initCount++, this.initCount < 3 ? setTimeout(() => {
2338
- this.initPlugin();
2339
- }, 3e3) : (this.$message.error("插件启动失败,请检查插件是否安装!"), this.playText = "插件启动失败,请检查插件是否安装!"));
2340
- }
2209
+ }
2210
+ function J() {
2211
+ let m = "", d = "";
2212
+ i.happenedTime ? (m = x(i.happenedTime), d = q(i.happenedTime)) : (m = Date.now() - 1440 * 60 * 1e3, d = Date.now());
2213
+ const A = p.value.map((W, Ut) => ({
2214
+ startTimeStamp: Math.floor(m / 1e3).toString(),
2215
+ endTimeStamp: Math.floor(d / 1e3).toString(),
2216
+ cameraIndexCode: W.indexCode.trim(),
2217
+ gpuMode: 0,
2218
+ streamMode: 0,
2219
+ transMode: 1,
2220
+ wndId: Ut + 1
2221
+ }));
2222
+ s.value.JS_RequestInterface({
2223
+ funcName: "startMultiPlaybackByCameraIndexCode",
2224
+ argument: JSON.stringify({ list: A })
2341
2225
  });
2342
- },
2343
- //初始化
2344
- init() {
2345
- this.getPubKey(() => {
2346
- this.oWebControl.JS_RequestInterface({
2226
+ }
2227
+ function I() {
2228
+ y(() => {
2229
+ s.value.JS_RequestInterface({
2347
2230
  funcName: "init",
2348
2231
  argument: JSON.stringify({
2349
- appkey: this.usefullData.appkey,
2350
- //API网关提供的appkey
2351
- secret: this.setEncrypt(this.usefullData.secret),
2352
- //API网关提供的secret
2353
- ip: this.usefullData.ip,
2354
- //API网关IP地址
2355
- playMode: this.currentPlayType,
2356
- //播放模式(决定显示预览还是回放界面)
2357
- port: this.usefullData.port,
2358
- //端口
2232
+ appkey: i.usefullData.appkey,
2233
+ secret: F(i.usefullData.secret),
2234
+ ip: i.usefullData.ip,
2235
+ playMode: i.currentPlayType,
2236
+ port: i.usefullData.port,
2359
2237
  snapDir: "D:\\SnapDir",
2360
- //抓图存储路径
2361
2238
  videoDir: "D:\\VideoDir",
2362
- //紧急录像或录像剪辑存储路径
2363
- layout: this.layoutMode,
2364
- //布局
2239
+ layout: f.value,
2365
2240
  enableHTTPS: 1,
2366
- //是否启用HTTPS协议
2367
2241
  encryptedFields: "secret",
2368
- //加密字段
2369
2242
  showToolbar: 1,
2370
- //是否显示工具栏
2371
2243
  showSmart: 0,
2372
- //是否显示智能信息
2373
2244
  buttonIDs: "0,256,257,258,259,260,512,513,514,515,516,517,768,769"
2374
- //自定义工具条按钮
2375
2245
  })
2376
2246
  }).then(() => {
2377
- this.oWebControl.JS_Resize(this.size.windowWidth, this.size.windowHeight), this.isMulTip ? this.currentPlayType === 1 ? this.startMultiPlayback() : this.startMultiPreview() : this.currentPlayType === 1 ? this.startPlayback() : this.startPlay();
2378
- }), this.isFullScreen && this.oWebControl.JS_RequestInterface({
2379
- funcName: "setFullScreen"
2380
- });
2381
- });
2382
- },
2383
- //获取公钥
2384
- getPubKey(r) {
2385
- this.oWebControl.JS_RequestInterface({
2386
- funcName: "getRSAPubKey",
2387
- argument: JSON.stringify({
2388
- keyLength: 1024
2389
- })
2390
- }).then((t) => {
2391
- t.responseMsg.data && (this.pubKey = t.responseMsg.data, r());
2247
+ s.value.JS_Resize(i.size.windowWidth, i.size.windowHeight), i.isMulTip ? i.currentPlayType === 1 ? J() : _() : i.currentPlayType === 1 ? L() : k();
2248
+ }), i.isFullScreen && s.value.JS_RequestInterface({ funcName: "setFullScreen" });
2392
2249
  });
2393
- },
2394
- //RSA加密
2395
- setEncrypt(r) {
2396
- let t = new me();
2397
- return t.setPublicKey(this.pubKey), t.encrypt(r);
2398
- },
2399
- // 格式化时间
2400
- dateFormat(r, t) {
2401
- let e = {
2402
- "M+": r.getMonth() + 1,
2403
- //月份
2404
- "d+": r.getDate(),
2405
- //日
2406
- "h+": r.getHours(),
2407
- //小时
2408
- "m+": r.getMinutes(),
2409
- //分
2410
- "s+": r.getSeconds(),
2411
- //秒
2412
- "q+": Math.floor((r.getMonth() + 3) / 3),
2413
- //季度
2414
- S: r.getMilliseconds()
2415
- //毫秒
2416
- };
2417
- /(y+)/.test(t) && (t = t.replace(
2418
- RegExp.$1,
2419
- (r.getFullYear() + "").substr(4 - RegExp.$1.length)
2420
- ));
2421
- for (let i in e)
2422
- new RegExp("(" + i + ")").test(t) && (t = t.replace(
2423
- RegExp.$1,
2424
- RegExp.$1.length == 1 ? e[i] : ("00" + e[i]).substr(("" + e[i]).length)
2425
- ));
2426
- return t;
2427
- },
2428
- // 回调接口
2429
- cbIntegrationCallBack(r) {
2430
- const { responseMsg: t, responseMsg: e } = r;
2431
- t.type === 6 && (this.videoTotal = this.multipPointsArr.length, this.currentPage = 1, this.selectAll = this.multipPointsArr, this.layoutMode = t.msg.layout, this.pageSize = t.msg.wndNum, this.selectAll = this.chunkArray(this.selectAll, t.msg.wndNum), this.currentArr = [...this.selectAll[this.currentPage - 1]], this.oWebControl.JS_Disconnect().then(
2432
- () => {
2433
- this.initPlugin();
2250
+ }
2251
+ function dt(m) {
2252
+ const { responseMsg: d } = m;
2253
+ d.type === 6 && (l.value = i.multipPointsArr.length, v.value = 1, c.value = i.multipPointsArr, f.value = d.msg.layout, T.value = d.msg.wndNum, c.value = B(c.value, d.msg.wndNum), p.value = [...c.value[v.value - 1]], s.value.JS_Disconnect().then(() => {
2254
+ N();
2255
+ }, () => {
2256
+ })), d.type === 7 && O();
2257
+ }
2258
+ function N() {
2259
+ s.value = new window.WebControl({
2260
+ szPluginContainer: "playWnd",
2261
+ iServicePortStart: 15900,
2262
+ iServicePortEnd: 15900,
2263
+ szClassId: "23BF3B0A-2C56-4D97-9C03-0CB103AA8F11",
2264
+ cbConnectSuccess: () => {
2265
+ s.value.JS_StartService("window", { dllPath: "./VideoPluginConnect.dll" }).then(() => {
2266
+ s.value.JS_SetWindowControlCallback({
2267
+ cbIntegrationCallBack: dt
2268
+ }), s.value.JS_CreateWnd("playWnd", i.size.windowWidth, i.size.windowHeight).then(() => {
2269
+ I();
2270
+ });
2271
+ });
2434
2272
  },
2435
- () => {
2436
- }
2437
- )), t.type === 7 && this.closeVideo();
2438
- },
2439
- // 显示下载插件弹窗
2440
- showPluginDownloadDialog() {
2441
- Pt.alert(
2442
- "播放视频需要下载插件",
2443
- "提示",
2444
- {
2445
- confirmButtonText: "下载插件",
2446
- cancelButtonText: "取消",
2447
- type: "info",
2448
- showCancelButton: !0
2273
+ cbConnectError: () => {
2274
+ s.value = null, rt.error(mt), h.value = mt, window.WebControl.JS_WakeUp("VideoWebPlugin://"), o.value++, o.value < Mt ? setTimeout(() => N(), qt) : (rt.error(ft), h.value = ft);
2275
+ },
2276
+ cbConnectClose: (m) => {
2277
+ m || (s.value = null, h.value = mt, o.value++, o.value < Mt ? setTimeout(() => N(), qt) : (rt.error(ft), h.value = ft));
2449
2278
  }
2450
- ).then(() => {
2451
- deleteSysMenu(row.id).then(() => {
2452
- this.downloadPlugin(), this.showLoading.close(), Vt({
2453
- type: "success",
2454
- message: "下载插件成功"
2455
- });
2456
- });
2279
+ });
2280
+ }
2281
+ function Et() {
2282
+ Yt.alert("播放视频需要下载插件", "提示", {
2283
+ confirmButtonText: "下载插件",
2284
+ cancelButtonText: "取消",
2285
+ type: "info",
2286
+ showCancelButton: !0
2287
+ }).then(() => {
2288
+ jt(), rt({ type: "success", message: "下载插件成功" });
2457
2289
  }).catch(() => {
2458
- this.closeVideo(), this.showLoading.close();
2290
+ O();
2459
2291
  });
2460
- },
2461
- // 下载插件
2462
- downloadPlugin() {
2292
+ }
2293
+ function jt() {
2463
2294
  try {
2464
- const r = this.baseUrl + "static/VideoWebPlugin.exe", t = document.createElement("a");
2465
- t.href = r, t.download = "VideoWebPlugin.exe", t.style.display = "none", document.body.appendChild(t), t.click(), setTimeout(() => {
2466
- t.parentNode && t.parentNode.removeChild(t), this.closeVideo();
2295
+ const m = i.baseUrl + "static/VideoWebPlugin.exe", d = document.createElement("a");
2296
+ d.href = m, d.download = "VideoWebPlugin.exe", d.style.display = "none", document.body.appendChild(d), d.click(), setTimeout(() => {
2297
+ d.parentNode && d.parentNode.removeChild(d), O();
2467
2298
  }, 100);
2468
2299
  } catch {
2469
- this.closeVideo();
2300
+ O();
2470
2301
  }
2471
2302
  }
2303
+ function Kt() {
2304
+ i.isMulTip && (T.value = 4, l.value = i.multipPointsArr.length, f.value = l.value <= 1 ? "1x1" : "2x2", c.value = B(i.multipPointsArr, 4), p.value = [...c.value[v.value - 1]]);
2305
+ }
2306
+ return it(() => i.isPlayVideo, (m) => {
2307
+ m === !1 && O();
2308
+ }), it(() => i.happenedTime, () => {
2309
+ J();
2310
+ }), it(() => i.cameraIndexCode, (m, d) => {
2311
+ m !== d && (et(), s.value.JS_Disconnect().then(() => {
2312
+ N();
2313
+ }, () => {
2314
+ }));
2315
+ }), it(h, (m) => {
2316
+ m !== "" && Et();
2317
+ }), Jt(() => {
2318
+ Kt(), b().then(() => {
2319
+ i.isPlayVideo && N();
2320
+ }).catch(() => {
2321
+ Et();
2322
+ });
2323
+ }), zt(() => {
2324
+ s.value && (s.value.JS_RequestInterface({ funcName: "stopAllPreview" }), s.value.JS_HideWnd(), s.value.JS_RequestInterface({ funcName: "destroyWnd" }));
2325
+ }), t({
2326
+ closeVideo: O,
2327
+ initPlugin: N,
2328
+ startPlay: k,
2329
+ startPlayback: L,
2330
+ startMultiPreview: _,
2331
+ startMultiPlayback: J
2332
+ }), (m, d) => Wt((Zt(), Gt("div", _e, null, 512)), [
2333
+ [$t, !r.isFullScreen]
2334
+ ]);
2472
2335
  }
2473
- }, be = {
2474
- ref: "playWnd",
2475
- id: "playWnd",
2476
- class: "playWnd"
2477
- };
2478
- function Te(r, t, e, i, n, s) {
2479
- return Ct((Mt(), Ot("div", be, null, 512)), [
2480
- [Nt, !e.isFullScreen]
2481
- ]);
2482
- }
2483
- const at = /* @__PURE__ */ _t(Se, [["render", Te]]);
2484
- at.install = (r) => {
2485
- r.component(at.name, at);
2336
+ });
2337
+ St.install = (r) => {
2338
+ r.component(St.name, St);
2486
2339
  };
2487
2340
  export {
2488
- at as GPluginVideo,
2489
- at as default
2341
+ St as GPluginVideo,
2342
+ St as default
2490
2343
  };