bl-trtc-callkit 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -0
- package/dist/bl-trtc-callkit.css +1 -0
- package/dist/bl-trtc-callkit.js +4186 -0
- package/dist/bl-trtc-callkit.umd.cjs +15 -0
- package/dist/index.d.ts +1 -0
- package/dist/vite.svg +1 -0
- package/package.json +44 -0
|
@@ -0,0 +1,4186 @@
|
|
|
1
|
+
import { ref as bt, reactive as Mr, onUnmounted as Ja, createBlock as Qa, openBlock as Qt, Transition as to, withCtx as eo, createElementBlock as Se, createCommentVNode as Dr, createElementVNode as at, toDisplayString as Tn, normalizeClass as Ln, Fragment as zn, renderList as no, normalizeStyle as ro, unref as te, nextTick as Pr } from "vue";
|
|
2
|
+
import nt from "trtc-sdk-v5";
|
|
3
|
+
var Ce = typeof global < "u" ? global : typeof self < "u" ? self : typeof window < "u" ? window : {}, Lt = [], kt = [], io = typeof Uint8Array < "u" ? Uint8Array : Array, fr = !1;
|
|
4
|
+
function ta() {
|
|
5
|
+
fr = !0;
|
|
6
|
+
for (var t = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/", e = 0, n = t.length; e < n; ++e) Lt[e] = t[e], kt[t.charCodeAt(e)] = e;
|
|
7
|
+
kt[45] = 62, kt[95] = 63;
|
|
8
|
+
}
|
|
9
|
+
function ao(t, e, n) {
|
|
10
|
+
for (var r, a, i = [], s = e; s < n; s += 3) r = (t[s] << 16) + (t[s + 1] << 8) + t[s + 2], i.push(Lt[(a = r) >> 18 & 63] + Lt[a >> 12 & 63] + Lt[a >> 6 & 63] + Lt[63 & a]);
|
|
11
|
+
return i.join("");
|
|
12
|
+
}
|
|
13
|
+
function Or(t) {
|
|
14
|
+
var e;
|
|
15
|
+
fr || ta();
|
|
16
|
+
for (var n = t.length, r = n % 3, a = "", i = [], s = 0, l = n - r; s < l; s += 16383) i.push(ao(t, s, s + 16383 > l ? l : s + 16383));
|
|
17
|
+
return r === 1 ? (e = t[n - 1], a += Lt[e >> 2], a += Lt[e << 4 & 63], a += "==") : r === 2 && (e = (t[n - 2] << 8) + t[n - 1], a += Lt[e >> 10], a += Lt[e >> 4 & 63], a += Lt[e << 2 & 63], a += "="), i.push(a), i.join("");
|
|
18
|
+
}
|
|
19
|
+
function rn(t, e, n, r, a) {
|
|
20
|
+
var i, s, l = 8 * a - r - 1, h = (1 << l) - 1, o = h >> 1, c = -7, u = n ? a - 1 : 0, p = n ? -1 : 1, f = t[e + u];
|
|
21
|
+
for (u += p, i = f & (1 << -c) - 1, f >>= -c, c += l; c > 0; i = 256 * i + t[e + u], u += p, c -= 8) ;
|
|
22
|
+
for (s = i & (1 << -c) - 1, i >>= -c, c += r; c > 0; s = 256 * s + t[e + u], u += p, c -= 8) ;
|
|
23
|
+
if (i === 0) i = 1 - o;
|
|
24
|
+
else {
|
|
25
|
+
if (i === h) return s ? NaN : 1 / 0 * (f ? -1 : 1);
|
|
26
|
+
s += Math.pow(2, r), i -= o;
|
|
27
|
+
}
|
|
28
|
+
return (f ? -1 : 1) * s * Math.pow(2, i - r);
|
|
29
|
+
}
|
|
30
|
+
function ea(t, e, n, r, a, i) {
|
|
31
|
+
var s, l, h, o = 8 * i - a - 1, c = (1 << o) - 1, u = c >> 1, p = a === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0, f = r ? 0 : i - 1, _ = r ? 1 : -1, g = e < 0 || e === 0 && 1 / e < 0 ? 1 : 0;
|
|
32
|
+
for (e = Math.abs(e), isNaN(e) || e === 1 / 0 ? (l = isNaN(e) ? 1 : 0, s = c) : (s = Math.floor(Math.log(e) / Math.LN2), e * (h = Math.pow(2, -s)) < 1 && (s--, h *= 2), (e += s + u >= 1 ? p / h : p * Math.pow(2, 1 - u)) * h >= 2 && (s++, h /= 2), s + u >= c ? (l = 0, s = c) : s + u >= 1 ? (l = (e * h - 1) * Math.pow(2, a), s += u) : (l = e * Math.pow(2, u - 1) * Math.pow(2, a), s = 0)); a >= 8; t[n + f] = 255 & l, f += _, l /= 256, a -= 8) ;
|
|
33
|
+
for (s = s << a | l, o += a; o > 0; t[n + f] = 255 & s, f += _, s /= 256, o -= 8) ;
|
|
34
|
+
t[n + f - _] |= 128 * g;
|
|
35
|
+
}
|
|
36
|
+
var oo = {}.toString, na = Array.isArray || function(t) {
|
|
37
|
+
return oo.call(t) == "[object Array]";
|
|
38
|
+
};
|
|
39
|
+
function er() {
|
|
40
|
+
return A.TYPED_ARRAY_SUPPORT ? 2147483647 : 1073741823;
|
|
41
|
+
}
|
|
42
|
+
function Ut(t, e) {
|
|
43
|
+
if (er() < e) throw new RangeError("Invalid typed array length");
|
|
44
|
+
return A.TYPED_ARRAY_SUPPORT ? (t = new Uint8Array(e)).__proto__ = A.prototype : (t === null && (t = new A(e)), t.length = e), t;
|
|
45
|
+
}
|
|
46
|
+
function A(t, e, n) {
|
|
47
|
+
if (!(A.TYPED_ARRAY_SUPPORT || this instanceof A)) return new A(t, e, n);
|
|
48
|
+
if (typeof t == "number") {
|
|
49
|
+
if (typeof e == "string") throw new Error("If encoding is specified then the first argument must be a string");
|
|
50
|
+
return nr(this, t);
|
|
51
|
+
}
|
|
52
|
+
return ra(this, t, e, n);
|
|
53
|
+
}
|
|
54
|
+
function ra(t, e, n, r) {
|
|
55
|
+
if (typeof e == "number") throw new TypeError('"value" argument must not be a number');
|
|
56
|
+
return typeof ArrayBuffer < "u" && e instanceof ArrayBuffer ? (function(a, i, s, l) {
|
|
57
|
+
if (i.byteLength, s < 0 || i.byteLength < s) throw new RangeError("'offset' is out of bounds");
|
|
58
|
+
if (i.byteLength < s + (l || 0)) throw new RangeError("'length' is out of bounds");
|
|
59
|
+
return i = s === void 0 && l === void 0 ? new Uint8Array(i) : l === void 0 ? new Uint8Array(i, s) : new Uint8Array(i, s, l), A.TYPED_ARRAY_SUPPORT ? (a = i).__proto__ = A.prototype : a = Cn(a, i), a;
|
|
60
|
+
})(t, e, n, r) : typeof e == "string" ? (function(a, i, s) {
|
|
61
|
+
if (typeof s == "string" && s !== "" || (s = "utf8"), !A.isEncoding(s)) throw new TypeError('"encoding" must be a valid string encoding');
|
|
62
|
+
var l = 0 | aa(i, s), h = (a = Ut(a, l)).write(i, s);
|
|
63
|
+
return h !== l && (a = a.slice(0, h)), a;
|
|
64
|
+
})(t, e, n) : (function(a, i) {
|
|
65
|
+
if (zt(i)) {
|
|
66
|
+
var s = 0 | ur(i.length);
|
|
67
|
+
return (a = Ut(a, s)).length === 0 || i.copy(a, 0, 0, s), a;
|
|
68
|
+
}
|
|
69
|
+
if (i) {
|
|
70
|
+
if (typeof ArrayBuffer < "u" && i.buffer instanceof ArrayBuffer || "length" in i) return typeof i.length != "number" || (l = i.length) != l ? Ut(a, 0) : Cn(a, i);
|
|
71
|
+
if (i.type === "Buffer" && na(i.data)) return Cn(a, i.data);
|
|
72
|
+
}
|
|
73
|
+
var l;
|
|
74
|
+
throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.");
|
|
75
|
+
})(t, e);
|
|
76
|
+
}
|
|
77
|
+
function ia(t) {
|
|
78
|
+
if (typeof t != "number") throw new TypeError('"size" argument must be a number');
|
|
79
|
+
if (t < 0) throw new RangeError('"size" argument must not be negative');
|
|
80
|
+
}
|
|
81
|
+
function nr(t, e) {
|
|
82
|
+
if (ia(e), t = Ut(t, e < 0 ? 0 : 0 | ur(e)), !A.TYPED_ARRAY_SUPPORT) for (var n = 0; n < e; ++n) t[n] = 0;
|
|
83
|
+
return t;
|
|
84
|
+
}
|
|
85
|
+
function Cn(t, e) {
|
|
86
|
+
var n = e.length < 0 ? 0 : 0 | ur(e.length);
|
|
87
|
+
t = Ut(t, n);
|
|
88
|
+
for (var r = 0; r < n; r += 1) t[r] = 255 & e[r];
|
|
89
|
+
return t;
|
|
90
|
+
}
|
|
91
|
+
function ur(t) {
|
|
92
|
+
if (t >= er()) throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x" + er().toString(16) + " bytes");
|
|
93
|
+
return 0 | t;
|
|
94
|
+
}
|
|
95
|
+
function zt(t) {
|
|
96
|
+
return !(t == null || !t._isBuffer);
|
|
97
|
+
}
|
|
98
|
+
function aa(t, e) {
|
|
99
|
+
if (zt(t)) return t.length;
|
|
100
|
+
if (typeof ArrayBuffer < "u" && typeof ArrayBuffer.isView == "function" && (ArrayBuffer.isView(t) || t instanceof ArrayBuffer)) return t.byteLength;
|
|
101
|
+
typeof t != "string" && (t = "" + t);
|
|
102
|
+
var n = t.length;
|
|
103
|
+
if (n === 0) return 0;
|
|
104
|
+
for (var r = !1; ; ) switch (e) {
|
|
105
|
+
case "ascii":
|
|
106
|
+
case "latin1":
|
|
107
|
+
case "binary":
|
|
108
|
+
return n;
|
|
109
|
+
case "utf8":
|
|
110
|
+
case "utf-8":
|
|
111
|
+
case void 0:
|
|
112
|
+
return bn(t).length;
|
|
113
|
+
case "ucs2":
|
|
114
|
+
case "ucs-2":
|
|
115
|
+
case "utf16le":
|
|
116
|
+
case "utf-16le":
|
|
117
|
+
return 2 * n;
|
|
118
|
+
case "hex":
|
|
119
|
+
return n >>> 1;
|
|
120
|
+
case "base64":
|
|
121
|
+
return ha(t).length;
|
|
122
|
+
default:
|
|
123
|
+
if (r) return bn(t).length;
|
|
124
|
+
e = ("" + e).toLowerCase(), r = !0;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
function so(t, e, n) {
|
|
128
|
+
var r = !1;
|
|
129
|
+
if ((e === void 0 || e < 0) && (e = 0), e > this.length || ((n === void 0 || n > this.length) && (n = this.length), n <= 0) || (n >>>= 0) <= (e >>>= 0)) return "";
|
|
130
|
+
for (t || (t = "utf8"); ; ) switch (t) {
|
|
131
|
+
case "hex":
|
|
132
|
+
return vo(this, e, n);
|
|
133
|
+
case "utf8":
|
|
134
|
+
case "utf-8":
|
|
135
|
+
return sa(this, e, n);
|
|
136
|
+
case "ascii":
|
|
137
|
+
return _o(this, e, n);
|
|
138
|
+
case "latin1":
|
|
139
|
+
case "binary":
|
|
140
|
+
return go(this, e, n);
|
|
141
|
+
case "base64":
|
|
142
|
+
return po(this, e, n);
|
|
143
|
+
case "ucs2":
|
|
144
|
+
case "ucs-2":
|
|
145
|
+
case "utf16le":
|
|
146
|
+
case "utf-16le":
|
|
147
|
+
return wo(this, e, n);
|
|
148
|
+
default:
|
|
149
|
+
if (r) throw new TypeError("Unknown encoding: " + t);
|
|
150
|
+
t = (t + "").toLowerCase(), r = !0;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
function ee(t, e, n) {
|
|
154
|
+
var r = t[e];
|
|
155
|
+
t[e] = t[n], t[n] = r;
|
|
156
|
+
}
|
|
157
|
+
function Ur(t, e, n, r, a) {
|
|
158
|
+
if (t.length === 0) return -1;
|
|
159
|
+
if (typeof n == "string" ? (r = n, n = 0) : n > 2147483647 ? n = 2147483647 : n < -2147483648 && (n = -2147483648), n = +n, isNaN(n) && (n = a ? 0 : t.length - 1), n < 0 && (n = t.length + n), n >= t.length) {
|
|
160
|
+
if (a) return -1;
|
|
161
|
+
n = t.length - 1;
|
|
162
|
+
} else if (n < 0) {
|
|
163
|
+
if (!a) return -1;
|
|
164
|
+
n = 0;
|
|
165
|
+
}
|
|
166
|
+
if (typeof e == "string" && (e = A.from(e, r)), zt(e)) return e.length === 0 ? -1 : Nr(t, e, n, r, a);
|
|
167
|
+
if (typeof e == "number") return e &= 255, A.TYPED_ARRAY_SUPPORT && typeof Uint8Array.prototype.indexOf == "function" ? a ? Uint8Array.prototype.indexOf.call(t, e, n) : Uint8Array.prototype.lastIndexOf.call(t, e, n) : Nr(t, [e], n, r, a);
|
|
168
|
+
throw new TypeError("val must be string, number or Buffer");
|
|
169
|
+
}
|
|
170
|
+
function Nr(t, e, n, r, a) {
|
|
171
|
+
var i, s = 1, l = t.length, h = e.length;
|
|
172
|
+
if (r !== void 0 && ((r = String(r).toLowerCase()) === "ucs2" || r === "ucs-2" || r === "utf16le" || r === "utf-16le")) {
|
|
173
|
+
if (t.length < 2 || e.length < 2) return -1;
|
|
174
|
+
s = 2, l /= 2, h /= 2, n /= 2;
|
|
175
|
+
}
|
|
176
|
+
function o(f, _) {
|
|
177
|
+
return s === 1 ? f[_] : f.readUInt16BE(_ * s);
|
|
178
|
+
}
|
|
179
|
+
if (a) {
|
|
180
|
+
var c = -1;
|
|
181
|
+
for (i = n; i < l; i++) if (o(t, i) === o(e, c === -1 ? 0 : i - c)) {
|
|
182
|
+
if (c === -1 && (c = i), i - c + 1 === h) return c * s;
|
|
183
|
+
} else c !== -1 && (i -= i - c), c = -1;
|
|
184
|
+
} else for (n + h > l && (n = l - h), i = n; i >= 0; i--) {
|
|
185
|
+
for (var u = !0, p = 0; p < h; p++) if (o(t, i + p) !== o(e, p)) {
|
|
186
|
+
u = !1;
|
|
187
|
+
break;
|
|
188
|
+
}
|
|
189
|
+
if (u) return i;
|
|
190
|
+
}
|
|
191
|
+
return -1;
|
|
192
|
+
}
|
|
193
|
+
function lo(t, e, n, r) {
|
|
194
|
+
n = Number(n) || 0;
|
|
195
|
+
var a = t.length - n;
|
|
196
|
+
r ? (r = Number(r)) > a && (r = a) : r = a;
|
|
197
|
+
var i = e.length;
|
|
198
|
+
if (i % 2 != 0) throw new TypeError("Invalid hex string");
|
|
199
|
+
r > i / 2 && (r = i / 2);
|
|
200
|
+
for (var s = 0; s < r; ++s) {
|
|
201
|
+
var l = parseInt(e.substr(2 * s, 2), 16);
|
|
202
|
+
if (isNaN(l)) return s;
|
|
203
|
+
t[n + s] = l;
|
|
204
|
+
}
|
|
205
|
+
return s;
|
|
206
|
+
}
|
|
207
|
+
function ho(t, e, n, r) {
|
|
208
|
+
return Bn(bn(e, t.length - n), t, n, r);
|
|
209
|
+
}
|
|
210
|
+
function oa(t, e, n, r) {
|
|
211
|
+
return Bn((function(a) {
|
|
212
|
+
for (var i = [], s = 0; s < a.length; ++s) i.push(255 & a.charCodeAt(s));
|
|
213
|
+
return i;
|
|
214
|
+
})(e), t, n, r);
|
|
215
|
+
}
|
|
216
|
+
function co(t, e, n, r) {
|
|
217
|
+
return oa(t, e, n, r);
|
|
218
|
+
}
|
|
219
|
+
function fo(t, e, n, r) {
|
|
220
|
+
return Bn(ha(e), t, n, r);
|
|
221
|
+
}
|
|
222
|
+
function uo(t, e, n, r) {
|
|
223
|
+
return Bn((function(a, i) {
|
|
224
|
+
for (var s, l, h, o = [], c = 0; c < a.length && !((i -= 2) < 0); ++c) s = a.charCodeAt(c), l = s >> 8, h = s % 256, o.push(h), o.push(l);
|
|
225
|
+
return o;
|
|
226
|
+
})(e, t.length - n), t, n, r);
|
|
227
|
+
}
|
|
228
|
+
function po(t, e, n) {
|
|
229
|
+
return e === 0 && n === t.length ? Or(t) : Or(t.slice(e, n));
|
|
230
|
+
}
|
|
231
|
+
function sa(t, e, n) {
|
|
232
|
+
n = Math.min(t.length, n);
|
|
233
|
+
for (var r = [], a = e; a < n; ) {
|
|
234
|
+
var i, s, l, h, o = t[a], c = null, u = o > 239 ? 4 : o > 223 ? 3 : o > 191 ? 2 : 1;
|
|
235
|
+
if (a + u <= n) switch (u) {
|
|
236
|
+
case 1:
|
|
237
|
+
o < 128 && (c = o);
|
|
238
|
+
break;
|
|
239
|
+
case 2:
|
|
240
|
+
(192 & (i = t[a + 1])) == 128 && (h = (31 & o) << 6 | 63 & i) > 127 && (c = h);
|
|
241
|
+
break;
|
|
242
|
+
case 3:
|
|
243
|
+
i = t[a + 1], s = t[a + 2], (192 & i) == 128 && (192 & s) == 128 && (h = (15 & o) << 12 | (63 & i) << 6 | 63 & s) > 2047 && (h < 55296 || h > 57343) && (c = h);
|
|
244
|
+
break;
|
|
245
|
+
case 4:
|
|
246
|
+
i = t[a + 1], s = t[a + 2], l = t[a + 3], (192 & i) == 128 && (192 & s) == 128 && (192 & l) == 128 && (h = (15 & o) << 18 | (63 & i) << 12 | (63 & s) << 6 | 63 & l) > 65535 && h < 1114112 && (c = h);
|
|
247
|
+
}
|
|
248
|
+
c === null ? (c = 65533, u = 1) : c > 65535 && (c -= 65536, r.push(c >>> 10 & 1023 | 55296), c = 56320 | 1023 & c), r.push(c), a += u;
|
|
249
|
+
}
|
|
250
|
+
return (function(p) {
|
|
251
|
+
var f = p.length;
|
|
252
|
+
if (f <= Hr) return String.fromCharCode.apply(String, p);
|
|
253
|
+
for (var _ = "", g = 0; g < f; ) _ += String.fromCharCode.apply(String, p.slice(g, g += Hr));
|
|
254
|
+
return _;
|
|
255
|
+
})(r);
|
|
256
|
+
}
|
|
257
|
+
A.TYPED_ARRAY_SUPPORT = Ce.TYPED_ARRAY_SUPPORT === void 0 || Ce.TYPED_ARRAY_SUPPORT, A.poolSize = 8192, A._augment = function(t) {
|
|
258
|
+
return t.__proto__ = A.prototype, t;
|
|
259
|
+
}, A.from = function(t, e, n) {
|
|
260
|
+
return ra(null, t, e, n);
|
|
261
|
+
}, A.TYPED_ARRAY_SUPPORT && (A.prototype.__proto__ = Uint8Array.prototype, A.__proto__ = Uint8Array), A.alloc = function(t, e, n) {
|
|
262
|
+
return (function(r, a, i, s) {
|
|
263
|
+
return ia(a), a <= 0 ? Ut(r, a) : i !== void 0 ? typeof s == "string" ? Ut(r, a).fill(i, s) : Ut(r, a).fill(i) : Ut(r, a);
|
|
264
|
+
})(null, t, e, n);
|
|
265
|
+
}, A.allocUnsafe = function(t) {
|
|
266
|
+
return nr(null, t);
|
|
267
|
+
}, A.allocUnsafeSlow = function(t) {
|
|
268
|
+
return nr(null, t);
|
|
269
|
+
}, A.isBuffer = Qe, A.compare = function(t, e) {
|
|
270
|
+
if (!zt(t) || !zt(e)) throw new TypeError("Arguments must be Buffers");
|
|
271
|
+
if (t === e) return 0;
|
|
272
|
+
for (var n = t.length, r = e.length, a = 0, i = Math.min(n, r); a < i; ++a) if (t[a] !== e[a]) {
|
|
273
|
+
n = t[a], r = e[a];
|
|
274
|
+
break;
|
|
275
|
+
}
|
|
276
|
+
return n < r ? -1 : r < n ? 1 : 0;
|
|
277
|
+
}, A.isEncoding = function(t) {
|
|
278
|
+
switch (String(t).toLowerCase()) {
|
|
279
|
+
case "hex":
|
|
280
|
+
case "utf8":
|
|
281
|
+
case "utf-8":
|
|
282
|
+
case "ascii":
|
|
283
|
+
case "latin1":
|
|
284
|
+
case "binary":
|
|
285
|
+
case "base64":
|
|
286
|
+
case "ucs2":
|
|
287
|
+
case "ucs-2":
|
|
288
|
+
case "utf16le":
|
|
289
|
+
case "utf-16le":
|
|
290
|
+
return !0;
|
|
291
|
+
default:
|
|
292
|
+
return !1;
|
|
293
|
+
}
|
|
294
|
+
}, A.concat = function(t, e) {
|
|
295
|
+
if (!na(t)) throw new TypeError('"list" argument must be an Array of Buffers');
|
|
296
|
+
if (t.length === 0) return A.alloc(0);
|
|
297
|
+
var n;
|
|
298
|
+
if (e === void 0) for (e = 0, n = 0; n < t.length; ++n) e += t[n].length;
|
|
299
|
+
var r = A.allocUnsafe(e), a = 0;
|
|
300
|
+
for (n = 0; n < t.length; ++n) {
|
|
301
|
+
var i = t[n];
|
|
302
|
+
if (!zt(i)) throw new TypeError('"list" argument must be an Array of Buffers');
|
|
303
|
+
i.copy(r, a), a += i.length;
|
|
304
|
+
}
|
|
305
|
+
return r;
|
|
306
|
+
}, A.byteLength = aa, A.prototype._isBuffer = !0, A.prototype.swap16 = function() {
|
|
307
|
+
var t = this.length;
|
|
308
|
+
if (t % 2 != 0) throw new RangeError("Buffer size must be a multiple of 16-bits");
|
|
309
|
+
for (var e = 0; e < t; e += 2) ee(this, e, e + 1);
|
|
310
|
+
return this;
|
|
311
|
+
}, A.prototype.swap32 = function() {
|
|
312
|
+
var t = this.length;
|
|
313
|
+
if (t % 4 != 0) throw new RangeError("Buffer size must be a multiple of 32-bits");
|
|
314
|
+
for (var e = 0; e < t; e += 4) ee(this, e, e + 3), ee(this, e + 1, e + 2);
|
|
315
|
+
return this;
|
|
316
|
+
}, A.prototype.swap64 = function() {
|
|
317
|
+
var t = this.length;
|
|
318
|
+
if (t % 8 != 0) throw new RangeError("Buffer size must be a multiple of 64-bits");
|
|
319
|
+
for (var e = 0; e < t; e += 8) ee(this, e, e + 7), ee(this, e + 1, e + 6), ee(this, e + 2, e + 5), ee(this, e + 3, e + 4);
|
|
320
|
+
return this;
|
|
321
|
+
}, A.prototype.toString = function() {
|
|
322
|
+
var t = 0 | this.length;
|
|
323
|
+
return t === 0 ? "" : arguments.length === 0 ? sa(this, 0, t) : so.apply(this, arguments);
|
|
324
|
+
}, A.prototype.equals = function(t) {
|
|
325
|
+
if (!zt(t)) throw new TypeError("Argument must be a Buffer");
|
|
326
|
+
return this === t || A.compare(this, t) === 0;
|
|
327
|
+
}, A.prototype.inspect = function() {
|
|
328
|
+
var t = "";
|
|
329
|
+
return this.length > 0 && (t = this.toString("hex", 0, 50).match(/.{2}/g).join(" "), this.length > 50 && (t += " ... ")), "<Buffer " + t + ">";
|
|
330
|
+
}, A.prototype.compare = function(t, e, n, r, a) {
|
|
331
|
+
if (!zt(t)) throw new TypeError("Argument must be a Buffer");
|
|
332
|
+
if (e === void 0 && (e = 0), n === void 0 && (n = t ? t.length : 0), r === void 0 && (r = 0), a === void 0 && (a = this.length), e < 0 || n > t.length || r < 0 || a > this.length) throw new RangeError("out of range index");
|
|
333
|
+
if (r >= a && e >= n) return 0;
|
|
334
|
+
if (r >= a) return -1;
|
|
335
|
+
if (e >= n) return 1;
|
|
336
|
+
if (this === t) return 0;
|
|
337
|
+
for (var i = (a >>>= 0) - (r >>>= 0), s = (n >>>= 0) - (e >>>= 0), l = Math.min(i, s), h = this.slice(r, a), o = t.slice(e, n), c = 0; c < l; ++c) if (h[c] !== o[c]) {
|
|
338
|
+
i = h[c], s = o[c];
|
|
339
|
+
break;
|
|
340
|
+
}
|
|
341
|
+
return i < s ? -1 : s < i ? 1 : 0;
|
|
342
|
+
}, A.prototype.includes = function(t, e, n) {
|
|
343
|
+
return this.indexOf(t, e, n) !== -1;
|
|
344
|
+
}, A.prototype.indexOf = function(t, e, n) {
|
|
345
|
+
return Ur(this, t, e, n, !0);
|
|
346
|
+
}, A.prototype.lastIndexOf = function(t, e, n) {
|
|
347
|
+
return Ur(this, t, e, n, !1);
|
|
348
|
+
}, A.prototype.write = function(t, e, n, r) {
|
|
349
|
+
if (e === void 0) r = "utf8", n = this.length, e = 0;
|
|
350
|
+
else if (n === void 0 && typeof e == "string") r = e, n = this.length, e = 0;
|
|
351
|
+
else {
|
|
352
|
+
if (!isFinite(e)) throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");
|
|
353
|
+
e |= 0, isFinite(n) ? (n |= 0, r === void 0 && (r = "utf8")) : (r = n, n = void 0);
|
|
354
|
+
}
|
|
355
|
+
var a = this.length - e;
|
|
356
|
+
if ((n === void 0 || n > a) && (n = a), t.length > 0 && (n < 0 || e < 0) || e > this.length) throw new RangeError("Attempt to write outside buffer bounds");
|
|
357
|
+
r || (r = "utf8");
|
|
358
|
+
for (var i = !1; ; ) switch (r) {
|
|
359
|
+
case "hex":
|
|
360
|
+
return lo(this, t, e, n);
|
|
361
|
+
case "utf8":
|
|
362
|
+
case "utf-8":
|
|
363
|
+
return ho(this, t, e, n);
|
|
364
|
+
case "ascii":
|
|
365
|
+
return oa(this, t, e, n);
|
|
366
|
+
case "latin1":
|
|
367
|
+
case "binary":
|
|
368
|
+
return co(this, t, e, n);
|
|
369
|
+
case "base64":
|
|
370
|
+
return fo(this, t, e, n);
|
|
371
|
+
case "ucs2":
|
|
372
|
+
case "ucs-2":
|
|
373
|
+
case "utf16le":
|
|
374
|
+
case "utf-16le":
|
|
375
|
+
return uo(this, t, e, n);
|
|
376
|
+
default:
|
|
377
|
+
if (i) throw new TypeError("Unknown encoding: " + r);
|
|
378
|
+
r = ("" + r).toLowerCase(), i = !0;
|
|
379
|
+
}
|
|
380
|
+
}, A.prototype.toJSON = function() {
|
|
381
|
+
return { type: "Buffer", data: Array.prototype.slice.call(this._arr || this, 0) };
|
|
382
|
+
};
|
|
383
|
+
var Hr = 4096;
|
|
384
|
+
function _o(t, e, n) {
|
|
385
|
+
var r = "";
|
|
386
|
+
n = Math.min(t.length, n);
|
|
387
|
+
for (var a = e; a < n; ++a) r += String.fromCharCode(127 & t[a]);
|
|
388
|
+
return r;
|
|
389
|
+
}
|
|
390
|
+
function go(t, e, n) {
|
|
391
|
+
var r = "";
|
|
392
|
+
n = Math.min(t.length, n);
|
|
393
|
+
for (var a = e; a < n; ++a) r += String.fromCharCode(t[a]);
|
|
394
|
+
return r;
|
|
395
|
+
}
|
|
396
|
+
function vo(t, e, n) {
|
|
397
|
+
var r = t.length;
|
|
398
|
+
(!e || e < 0) && (e = 0), (!n || n < 0 || n > r) && (n = r);
|
|
399
|
+
for (var a = "", i = e; i < n; ++i) a += yo(t[i]);
|
|
400
|
+
return a;
|
|
401
|
+
}
|
|
402
|
+
function wo(t, e, n) {
|
|
403
|
+
for (var r = t.slice(e, n), a = "", i = 0; i < r.length; i += 2) a += String.fromCharCode(r[i] + 256 * r[i + 1]);
|
|
404
|
+
return a;
|
|
405
|
+
}
|
|
406
|
+
function ot(t, e, n) {
|
|
407
|
+
if (t % 1 != 0 || t < 0) throw new RangeError("offset is not uint");
|
|
408
|
+
if (t + e > n) throw new RangeError("Trying to access beyond buffer length");
|
|
409
|
+
}
|
|
410
|
+
function _t(t, e, n, r, a, i) {
|
|
411
|
+
if (!zt(t)) throw new TypeError('"buffer" argument must be a Buffer instance');
|
|
412
|
+
if (e > a || e < i) throw new RangeError('"value" argument is out of bounds');
|
|
413
|
+
if (n + r > t.length) throw new RangeError("Index out of range");
|
|
414
|
+
}
|
|
415
|
+
function an(t, e, n, r) {
|
|
416
|
+
e < 0 && (e = 65535 + e + 1);
|
|
417
|
+
for (var a = 0, i = Math.min(t.length - n, 2); a < i; ++a) t[n + a] = (e & 255 << 8 * (r ? a : 1 - a)) >>> 8 * (r ? a : 1 - a);
|
|
418
|
+
}
|
|
419
|
+
function on(t, e, n, r) {
|
|
420
|
+
e < 0 && (e = 4294967295 + e + 1);
|
|
421
|
+
for (var a = 0, i = Math.min(t.length - n, 4); a < i; ++a) t[n + a] = e >>> 8 * (r ? a : 3 - a) & 255;
|
|
422
|
+
}
|
|
423
|
+
function la(t, e, n, r, a, i) {
|
|
424
|
+
if (n + r > t.length) throw new RangeError("Index out of range");
|
|
425
|
+
if (n < 0) throw new RangeError("Index out of range");
|
|
426
|
+
}
|
|
427
|
+
function Fr(t, e, n, r, a) {
|
|
428
|
+
return a || la(t, 0, n, 4), ea(t, e, n, r, 23, 4), n + 4;
|
|
429
|
+
}
|
|
430
|
+
function Zr(t, e, n, r, a) {
|
|
431
|
+
return a || la(t, 0, n, 8), ea(t, e, n, r, 52, 8), n + 8;
|
|
432
|
+
}
|
|
433
|
+
A.prototype.slice = function(t, e) {
|
|
434
|
+
var n, r = this.length;
|
|
435
|
+
if ((t = ~~t) < 0 ? (t += r) < 0 && (t = 0) : t > r && (t = r), (e = e === void 0 ? r : ~~e) < 0 ? (e += r) < 0 && (e = 0) : e > r && (e = r), e < t && (e = t), A.TYPED_ARRAY_SUPPORT) (n = this.subarray(t, e)).__proto__ = A.prototype;
|
|
436
|
+
else {
|
|
437
|
+
var a = e - t;
|
|
438
|
+
n = new A(a, void 0);
|
|
439
|
+
for (var i = 0; i < a; ++i) n[i] = this[i + t];
|
|
440
|
+
}
|
|
441
|
+
return n;
|
|
442
|
+
}, A.prototype.readUIntLE = function(t, e, n) {
|
|
443
|
+
t |= 0, e |= 0, n || ot(t, e, this.length);
|
|
444
|
+
for (var r = this[t], a = 1, i = 0; ++i < e && (a *= 256); ) r += this[t + i] * a;
|
|
445
|
+
return r;
|
|
446
|
+
}, A.prototype.readUIntBE = function(t, e, n) {
|
|
447
|
+
t |= 0, e |= 0, n || ot(t, e, this.length);
|
|
448
|
+
for (var r = this[t + --e], a = 1; e > 0 && (a *= 256); ) r += this[t + --e] * a;
|
|
449
|
+
return r;
|
|
450
|
+
}, A.prototype.readUInt8 = function(t, e) {
|
|
451
|
+
return e || ot(t, 1, this.length), this[t];
|
|
452
|
+
}, A.prototype.readUInt16LE = function(t, e) {
|
|
453
|
+
return e || ot(t, 2, this.length), this[t] | this[t + 1] << 8;
|
|
454
|
+
}, A.prototype.readUInt16BE = function(t, e) {
|
|
455
|
+
return e || ot(t, 2, this.length), this[t] << 8 | this[t + 1];
|
|
456
|
+
}, A.prototype.readUInt32LE = function(t, e) {
|
|
457
|
+
return e || ot(t, 4, this.length), (this[t] | this[t + 1] << 8 | this[t + 2] << 16) + 16777216 * this[t + 3];
|
|
458
|
+
}, A.prototype.readUInt32BE = function(t, e) {
|
|
459
|
+
return e || ot(t, 4, this.length), 16777216 * this[t] + (this[t + 1] << 16 | this[t + 2] << 8 | this[t + 3]);
|
|
460
|
+
}, A.prototype.readIntLE = function(t, e, n) {
|
|
461
|
+
t |= 0, e |= 0, n || ot(t, e, this.length);
|
|
462
|
+
for (var r = this[t], a = 1, i = 0; ++i < e && (a *= 256); ) r += this[t + i] * a;
|
|
463
|
+
return r >= (a *= 128) && (r -= Math.pow(2, 8 * e)), r;
|
|
464
|
+
}, A.prototype.readIntBE = function(t, e, n) {
|
|
465
|
+
t |= 0, e |= 0, n || ot(t, e, this.length);
|
|
466
|
+
for (var r = e, a = 1, i = this[t + --r]; r > 0 && (a *= 256); ) i += this[t + --r] * a;
|
|
467
|
+
return i >= (a *= 128) && (i -= Math.pow(2, 8 * e)), i;
|
|
468
|
+
}, A.prototype.readInt8 = function(t, e) {
|
|
469
|
+
return e || ot(t, 1, this.length), 128 & this[t] ? -1 * (255 - this[t] + 1) : this[t];
|
|
470
|
+
}, A.prototype.readInt16LE = function(t, e) {
|
|
471
|
+
e || ot(t, 2, this.length);
|
|
472
|
+
var n = this[t] | this[t + 1] << 8;
|
|
473
|
+
return 32768 & n ? 4294901760 | n : n;
|
|
474
|
+
}, A.prototype.readInt16BE = function(t, e) {
|
|
475
|
+
e || ot(t, 2, this.length);
|
|
476
|
+
var n = this[t + 1] | this[t] << 8;
|
|
477
|
+
return 32768 & n ? 4294901760 | n : n;
|
|
478
|
+
}, A.prototype.readInt32LE = function(t, e) {
|
|
479
|
+
return e || ot(t, 4, this.length), this[t] | this[t + 1] << 8 | this[t + 2] << 16 | this[t + 3] << 24;
|
|
480
|
+
}, A.prototype.readInt32BE = function(t, e) {
|
|
481
|
+
return e || ot(t, 4, this.length), this[t] << 24 | this[t + 1] << 16 | this[t + 2] << 8 | this[t + 3];
|
|
482
|
+
}, A.prototype.readFloatLE = function(t, e) {
|
|
483
|
+
return e || ot(t, 4, this.length), rn(this, t, !0, 23, 4);
|
|
484
|
+
}, A.prototype.readFloatBE = function(t, e) {
|
|
485
|
+
return e || ot(t, 4, this.length), rn(this, t, !1, 23, 4);
|
|
486
|
+
}, A.prototype.readDoubleLE = function(t, e) {
|
|
487
|
+
return e || ot(t, 8, this.length), rn(this, t, !0, 52, 8);
|
|
488
|
+
}, A.prototype.readDoubleBE = function(t, e) {
|
|
489
|
+
return e || ot(t, 8, this.length), rn(this, t, !1, 52, 8);
|
|
490
|
+
}, A.prototype.writeUIntLE = function(t, e, n, r) {
|
|
491
|
+
t = +t, e |= 0, n |= 0, r || _t(this, t, e, n, Math.pow(2, 8 * n) - 1, 0);
|
|
492
|
+
var a = 1, i = 0;
|
|
493
|
+
for (this[e] = 255 & t; ++i < n && (a *= 256); ) this[e + i] = t / a & 255;
|
|
494
|
+
return e + n;
|
|
495
|
+
}, A.prototype.writeUIntBE = function(t, e, n, r) {
|
|
496
|
+
t = +t, e |= 0, n |= 0, r || _t(this, t, e, n, Math.pow(2, 8 * n) - 1, 0);
|
|
497
|
+
var a = n - 1, i = 1;
|
|
498
|
+
for (this[e + a] = 255 & t; --a >= 0 && (i *= 256); ) this[e + a] = t / i & 255;
|
|
499
|
+
return e + n;
|
|
500
|
+
}, A.prototype.writeUInt8 = function(t, e, n) {
|
|
501
|
+
return t = +t, e |= 0, n || _t(this, t, e, 1, 255, 0), A.TYPED_ARRAY_SUPPORT || (t = Math.floor(t)), this[e] = 255 & t, e + 1;
|
|
502
|
+
}, A.prototype.writeUInt16LE = function(t, e, n) {
|
|
503
|
+
return t = +t, e |= 0, n || _t(this, t, e, 2, 65535, 0), A.TYPED_ARRAY_SUPPORT ? (this[e] = 255 & t, this[e + 1] = t >>> 8) : an(this, t, e, !0), e + 2;
|
|
504
|
+
}, A.prototype.writeUInt16BE = function(t, e, n) {
|
|
505
|
+
return t = +t, e |= 0, n || _t(this, t, e, 2, 65535, 0), A.TYPED_ARRAY_SUPPORT ? (this[e] = t >>> 8, this[e + 1] = 255 & t) : an(this, t, e, !1), e + 2;
|
|
506
|
+
}, A.prototype.writeUInt32LE = function(t, e, n) {
|
|
507
|
+
return t = +t, e |= 0, n || _t(this, t, e, 4, 4294967295, 0), A.TYPED_ARRAY_SUPPORT ? (this[e + 3] = t >>> 24, this[e + 2] = t >>> 16, this[e + 1] = t >>> 8, this[e] = 255 & t) : on(this, t, e, !0), e + 4;
|
|
508
|
+
}, A.prototype.writeUInt32BE = function(t, e, n) {
|
|
509
|
+
return t = +t, e |= 0, n || _t(this, t, e, 4, 4294967295, 0), A.TYPED_ARRAY_SUPPORT ? (this[e] = t >>> 24, this[e + 1] = t >>> 16, this[e + 2] = t >>> 8, this[e + 3] = 255 & t) : on(this, t, e, !1), e + 4;
|
|
510
|
+
}, A.prototype.writeIntLE = function(t, e, n, r) {
|
|
511
|
+
if (t = +t, e |= 0, !r) {
|
|
512
|
+
var a = Math.pow(2, 8 * n - 1);
|
|
513
|
+
_t(this, t, e, n, a - 1, -a);
|
|
514
|
+
}
|
|
515
|
+
var i = 0, s = 1, l = 0;
|
|
516
|
+
for (this[e] = 255 & t; ++i < n && (s *= 256); ) t < 0 && l === 0 && this[e + i - 1] !== 0 && (l = 1), this[e + i] = (t / s >> 0) - l & 255;
|
|
517
|
+
return e + n;
|
|
518
|
+
}, A.prototype.writeIntBE = function(t, e, n, r) {
|
|
519
|
+
if (t = +t, e |= 0, !r) {
|
|
520
|
+
var a = Math.pow(2, 8 * n - 1);
|
|
521
|
+
_t(this, t, e, n, a - 1, -a);
|
|
522
|
+
}
|
|
523
|
+
var i = n - 1, s = 1, l = 0;
|
|
524
|
+
for (this[e + i] = 255 & t; --i >= 0 && (s *= 256); ) t < 0 && l === 0 && this[e + i + 1] !== 0 && (l = 1), this[e + i] = (t / s >> 0) - l & 255;
|
|
525
|
+
return e + n;
|
|
526
|
+
}, A.prototype.writeInt8 = function(t, e, n) {
|
|
527
|
+
return t = +t, e |= 0, n || _t(this, t, e, 1, 127, -128), A.TYPED_ARRAY_SUPPORT || (t = Math.floor(t)), t < 0 && (t = 255 + t + 1), this[e] = 255 & t, e + 1;
|
|
528
|
+
}, A.prototype.writeInt16LE = function(t, e, n) {
|
|
529
|
+
return t = +t, e |= 0, n || _t(this, t, e, 2, 32767, -32768), A.TYPED_ARRAY_SUPPORT ? (this[e] = 255 & t, this[e + 1] = t >>> 8) : an(this, t, e, !0), e + 2;
|
|
530
|
+
}, A.prototype.writeInt16BE = function(t, e, n) {
|
|
531
|
+
return t = +t, e |= 0, n || _t(this, t, e, 2, 32767, -32768), A.TYPED_ARRAY_SUPPORT ? (this[e] = t >>> 8, this[e + 1] = 255 & t) : an(this, t, e, !1), e + 2;
|
|
532
|
+
}, A.prototype.writeInt32LE = function(t, e, n) {
|
|
533
|
+
return t = +t, e |= 0, n || _t(this, t, e, 4, 2147483647, -2147483648), A.TYPED_ARRAY_SUPPORT ? (this[e] = 255 & t, this[e + 1] = t >>> 8, this[e + 2] = t >>> 16, this[e + 3] = t >>> 24) : on(this, t, e, !0), e + 4;
|
|
534
|
+
}, A.prototype.writeInt32BE = function(t, e, n) {
|
|
535
|
+
return t = +t, e |= 0, n || _t(this, t, e, 4, 2147483647, -2147483648), t < 0 && (t = 4294967295 + t + 1), A.TYPED_ARRAY_SUPPORT ? (this[e] = t >>> 24, this[e + 1] = t >>> 16, this[e + 2] = t >>> 8, this[e + 3] = 255 & t) : on(this, t, e, !1), e + 4;
|
|
536
|
+
}, A.prototype.writeFloatLE = function(t, e, n) {
|
|
537
|
+
return Fr(this, t, e, !0, n);
|
|
538
|
+
}, A.prototype.writeFloatBE = function(t, e, n) {
|
|
539
|
+
return Fr(this, t, e, !1, n);
|
|
540
|
+
}, A.prototype.writeDoubleLE = function(t, e, n) {
|
|
541
|
+
return Zr(this, t, e, !0, n);
|
|
542
|
+
}, A.prototype.writeDoubleBE = function(t, e, n) {
|
|
543
|
+
return Zr(this, t, e, !1, n);
|
|
544
|
+
}, A.prototype.copy = function(t, e, n, r) {
|
|
545
|
+
if (n || (n = 0), r || r === 0 || (r = this.length), e >= t.length && (e = t.length), e || (e = 0), r > 0 && r < n && (r = n), r === n || t.length === 0 || this.length === 0) return 0;
|
|
546
|
+
if (e < 0) throw new RangeError("targetStart out of bounds");
|
|
547
|
+
if (n < 0 || n >= this.length) throw new RangeError("sourceStart out of bounds");
|
|
548
|
+
if (r < 0) throw new RangeError("sourceEnd out of bounds");
|
|
549
|
+
r > this.length && (r = this.length), t.length - e < r - n && (r = t.length - e + n);
|
|
550
|
+
var a, i = r - n;
|
|
551
|
+
if (this === t && n < e && e < r) for (a = i - 1; a >= 0; --a) t[a + e] = this[a + n];
|
|
552
|
+
else if (i < 1e3 || !A.TYPED_ARRAY_SUPPORT) for (a = 0; a < i; ++a) t[a + e] = this[a + n];
|
|
553
|
+
else Uint8Array.prototype.set.call(t, this.subarray(n, n + i), e);
|
|
554
|
+
return i;
|
|
555
|
+
}, A.prototype.fill = function(t, e, n, r) {
|
|
556
|
+
if (typeof t == "string") {
|
|
557
|
+
if (typeof e == "string" ? (r = e, e = 0, n = this.length) : typeof n == "string" && (r = n, n = this.length), t.length === 1) {
|
|
558
|
+
var a = t.charCodeAt(0);
|
|
559
|
+
a < 256 && (t = a);
|
|
560
|
+
}
|
|
561
|
+
if (r !== void 0 && typeof r != "string") throw new TypeError("encoding must be a string");
|
|
562
|
+
if (typeof r == "string" && !A.isEncoding(r)) throw new TypeError("Unknown encoding: " + r);
|
|
563
|
+
} else typeof t == "number" && (t &= 255);
|
|
564
|
+
if (e < 0 || this.length < e || this.length < n) throw new RangeError("Out of range index");
|
|
565
|
+
if (n <= e) return this;
|
|
566
|
+
var i;
|
|
567
|
+
if (e >>>= 0, n = n === void 0 ? this.length : n >>> 0, t || (t = 0), typeof t == "number") for (i = e; i < n; ++i) this[i] = t;
|
|
568
|
+
else {
|
|
569
|
+
var s = zt(t) ? t : bn(new A(t, r).toString()), l = s.length;
|
|
570
|
+
for (i = 0; i < n - e; ++i) this[i + e] = s[i % l];
|
|
571
|
+
}
|
|
572
|
+
return this;
|
|
573
|
+
};
|
|
574
|
+
var mo = /[^+\/0-9A-Za-z-_]/g;
|
|
575
|
+
function yo(t) {
|
|
576
|
+
return t < 16 ? "0" + t.toString(16) : t.toString(16);
|
|
577
|
+
}
|
|
578
|
+
function bn(t, e) {
|
|
579
|
+
var n;
|
|
580
|
+
e = e || 1 / 0;
|
|
581
|
+
for (var r = t.length, a = null, i = [], s = 0; s < r; ++s) {
|
|
582
|
+
if ((n = t.charCodeAt(s)) > 55295 && n < 57344) {
|
|
583
|
+
if (!a) {
|
|
584
|
+
if (n > 56319) {
|
|
585
|
+
(e -= 3) > -1 && i.push(239, 191, 189);
|
|
586
|
+
continue;
|
|
587
|
+
}
|
|
588
|
+
if (s + 1 === r) {
|
|
589
|
+
(e -= 3) > -1 && i.push(239, 191, 189);
|
|
590
|
+
continue;
|
|
591
|
+
}
|
|
592
|
+
a = n;
|
|
593
|
+
continue;
|
|
594
|
+
}
|
|
595
|
+
if (n < 56320) {
|
|
596
|
+
(e -= 3) > -1 && i.push(239, 191, 189), a = n;
|
|
597
|
+
continue;
|
|
598
|
+
}
|
|
599
|
+
n = 65536 + (a - 55296 << 10 | n - 56320);
|
|
600
|
+
} else a && (e -= 3) > -1 && i.push(239, 191, 189);
|
|
601
|
+
if (a = null, n < 128) {
|
|
602
|
+
if ((e -= 1) < 0) break;
|
|
603
|
+
i.push(n);
|
|
604
|
+
} else if (n < 2048) {
|
|
605
|
+
if ((e -= 2) < 0) break;
|
|
606
|
+
i.push(n >> 6 | 192, 63 & n | 128);
|
|
607
|
+
} else if (n < 65536) {
|
|
608
|
+
if ((e -= 3) < 0) break;
|
|
609
|
+
i.push(n >> 12 | 224, n >> 6 & 63 | 128, 63 & n | 128);
|
|
610
|
+
} else {
|
|
611
|
+
if (!(n < 1114112)) throw new Error("Invalid code point");
|
|
612
|
+
if ((e -= 4) < 0) break;
|
|
613
|
+
i.push(n >> 18 | 240, n >> 12 & 63 | 128, n >> 6 & 63 | 128, 63 & n | 128);
|
|
614
|
+
}
|
|
615
|
+
}
|
|
616
|
+
return i;
|
|
617
|
+
}
|
|
618
|
+
function ha(t) {
|
|
619
|
+
return (function(e) {
|
|
620
|
+
var n, r, a, i, s, l;
|
|
621
|
+
fr || ta();
|
|
622
|
+
var h = e.length;
|
|
623
|
+
if (h % 4 > 0) throw new Error("Invalid string. Length must be a multiple of 4");
|
|
624
|
+
s = e[h - 2] === "=" ? 2 : e[h - 1] === "=" ? 1 : 0, l = new io(3 * h / 4 - s), a = s > 0 ? h - 4 : h;
|
|
625
|
+
var o = 0;
|
|
626
|
+
for (n = 0, r = 0; n < a; n += 4, r += 3) i = kt[e.charCodeAt(n)] << 18 | kt[e.charCodeAt(n + 1)] << 12 | kt[e.charCodeAt(n + 2)] << 6 | kt[e.charCodeAt(n + 3)], l[o++] = i >> 16 & 255, l[o++] = i >> 8 & 255, l[o++] = 255 & i;
|
|
627
|
+
return s === 2 ? (i = kt[e.charCodeAt(n)] << 2 | kt[e.charCodeAt(n + 1)] >> 4, l[o++] = 255 & i) : s === 1 && (i = kt[e.charCodeAt(n)] << 10 | kt[e.charCodeAt(n + 1)] << 4 | kt[e.charCodeAt(n + 2)] >> 2, l[o++] = i >> 8 & 255, l[o++] = 255 & i), l;
|
|
628
|
+
})((function(e) {
|
|
629
|
+
if ((e = (function(n) {
|
|
630
|
+
return n.trim ? n.trim() : n.replace(/^\s+|\s+$/g, "");
|
|
631
|
+
})(e).replace(mo, "")).length < 2) return "";
|
|
632
|
+
for (; e.length % 4 != 0; ) e += "=";
|
|
633
|
+
return e;
|
|
634
|
+
})(t));
|
|
635
|
+
}
|
|
636
|
+
function Bn(t, e, n, r) {
|
|
637
|
+
for (var a = 0; a < r && !(a + n >= e.length || a >= t.length); ++a) e[a + n] = t[a];
|
|
638
|
+
return a;
|
|
639
|
+
}
|
|
640
|
+
function Qe(t) {
|
|
641
|
+
return t != null && (!!t._isBuffer || Vr(t) || (function(e) {
|
|
642
|
+
return typeof e.readFloatLE == "function" && typeof e.slice == "function" && Vr(e.slice(0, 0));
|
|
643
|
+
})(t));
|
|
644
|
+
}
|
|
645
|
+
function Vr(t) {
|
|
646
|
+
return !!t.constructor && typeof t.constructor.isBuffer == "function" && t.constructor.isBuffer(t);
|
|
647
|
+
}
|
|
648
|
+
function K(t, e) {
|
|
649
|
+
return t(e = { exports: {} }, e.exports), e.exports;
|
|
650
|
+
}
|
|
651
|
+
var q = K(function(t, e) {
|
|
652
|
+
var n;
|
|
653
|
+
t.exports = (n = n || (function(r, a) {
|
|
654
|
+
var i = Object.create || /* @__PURE__ */ (function() {
|
|
655
|
+
function d() {
|
|
656
|
+
}
|
|
657
|
+
return function(v) {
|
|
658
|
+
var w;
|
|
659
|
+
return d.prototype = v, w = new d(), d.prototype = null, w;
|
|
660
|
+
};
|
|
661
|
+
})(), s = {}, l = s.lib = {}, h = l.Base = { extend: function(d) {
|
|
662
|
+
var v = i(this);
|
|
663
|
+
return d && v.mixIn(d), v.hasOwnProperty("init") && this.init !== v.init || (v.init = function() {
|
|
664
|
+
v.$super.init.apply(this, arguments);
|
|
665
|
+
}), v.init.prototype = v, v.$super = this, v;
|
|
666
|
+
}, create: function() {
|
|
667
|
+
var d = this.extend();
|
|
668
|
+
return d.init.apply(d, arguments), d;
|
|
669
|
+
}, init: function() {
|
|
670
|
+
}, mixIn: function(d) {
|
|
671
|
+
for (var v in d) d.hasOwnProperty(v) && (this[v] = d[v]);
|
|
672
|
+
d.hasOwnProperty("toString") && (this.toString = d.toString);
|
|
673
|
+
}, clone: function() {
|
|
674
|
+
return this.init.prototype.extend(this);
|
|
675
|
+
} }, o = l.WordArray = h.extend({ init: function(d, v) {
|
|
676
|
+
d = this.words = d || [], this.sigBytes = v ?? 4 * d.length;
|
|
677
|
+
}, toString: function(d) {
|
|
678
|
+
return (d || u).stringify(this);
|
|
679
|
+
}, concat: function(d) {
|
|
680
|
+
var v = this.words, w = d.words, m = this.sigBytes, y = d.sigBytes;
|
|
681
|
+
if (this.clamp(), m % 4) for (var x = 0; x < y; x++) {
|
|
682
|
+
var S = w[x >>> 2] >>> 24 - x % 4 * 8 & 255;
|
|
683
|
+
v[m + x >>> 2] |= S << 24 - (m + x) % 4 * 8;
|
|
684
|
+
}
|
|
685
|
+
else for (var x = 0; x < y; x += 4) v[m + x >>> 2] = w[x >>> 2];
|
|
686
|
+
return this.sigBytes += y, this;
|
|
687
|
+
}, clamp: function() {
|
|
688
|
+
var d = this.words, v = this.sigBytes;
|
|
689
|
+
d[v >>> 2] &= 4294967295 << 32 - v % 4 * 8, d.length = r.ceil(v / 4);
|
|
690
|
+
}, clone: function() {
|
|
691
|
+
var d = h.clone.call(this);
|
|
692
|
+
return d.words = this.words.slice(0), d;
|
|
693
|
+
}, random: function(d) {
|
|
694
|
+
for (var v, w = [], m = function(k) {
|
|
695
|
+
var k = k, E = 987654321, B = 4294967295;
|
|
696
|
+
return function() {
|
|
697
|
+
var b = ((E = 36969 * (65535 & E) + (E >> 16) & B) << 16) + (k = 18e3 * (65535 & k) + (k >> 16) & B) & B;
|
|
698
|
+
return b /= 4294967296, (b += 0.5) * (r.random() > 0.5 ? 1 : -1);
|
|
699
|
+
};
|
|
700
|
+
}, y = 0; y < d; y += 4) {
|
|
701
|
+
var x = m(4294967296 * (v || r.random()));
|
|
702
|
+
v = 987654071 * x(), w.push(4294967296 * x() | 0);
|
|
703
|
+
}
|
|
704
|
+
return new o.init(w, d);
|
|
705
|
+
} }), c = s.enc = {}, u = c.Hex = { stringify: function(d) {
|
|
706
|
+
for (var v = d.words, w = d.sigBytes, m = [], y = 0; y < w; y++) {
|
|
707
|
+
var x = v[y >>> 2] >>> 24 - y % 4 * 8 & 255;
|
|
708
|
+
m.push((x >>> 4).toString(16)), m.push((15 & x).toString(16));
|
|
709
|
+
}
|
|
710
|
+
return m.join("");
|
|
711
|
+
}, parse: function(d) {
|
|
712
|
+
for (var v = d.length, w = [], m = 0; m < v; m += 2) w[m >>> 3] |= parseInt(d.substr(m, 2), 16) << 24 - m % 8 * 4;
|
|
713
|
+
return new o.init(w, v / 2);
|
|
714
|
+
} }, p = c.Latin1 = { stringify: function(d) {
|
|
715
|
+
for (var v = d.words, w = d.sigBytes, m = [], y = 0; y < w; y++) {
|
|
716
|
+
var x = v[y >>> 2] >>> 24 - y % 4 * 8 & 255;
|
|
717
|
+
m.push(String.fromCharCode(x));
|
|
718
|
+
}
|
|
719
|
+
return m.join("");
|
|
720
|
+
}, parse: function(d) {
|
|
721
|
+
for (var v = d.length, w = [], m = 0; m < v; m++) w[m >>> 2] |= (255 & d.charCodeAt(m)) << 24 - m % 4 * 8;
|
|
722
|
+
return new o.init(w, v);
|
|
723
|
+
} }, f = c.Utf8 = { stringify: function(d) {
|
|
724
|
+
try {
|
|
725
|
+
return decodeURIComponent(escape(p.stringify(d)));
|
|
726
|
+
} catch {
|
|
727
|
+
throw new Error("Malformed UTF-8 data");
|
|
728
|
+
}
|
|
729
|
+
}, parse: function(d) {
|
|
730
|
+
return p.parse(unescape(encodeURIComponent(d)));
|
|
731
|
+
} }, _ = l.BufferedBlockAlgorithm = h.extend({ reset: function() {
|
|
732
|
+
this._data = new o.init(), this._nDataBytes = 0;
|
|
733
|
+
}, _append: function(d) {
|
|
734
|
+
typeof d == "string" && (d = f.parse(d)), this._data.concat(d), this._nDataBytes += d.sigBytes;
|
|
735
|
+
}, _process: function(d) {
|
|
736
|
+
var v = this._data, w = v.words, m = v.sigBytes, y = this.blockSize, x = 4 * y, S = m / x, k = (S = d ? r.ceil(S) : r.max((0 | S) - this._minBufferSize, 0)) * y, E = r.min(4 * k, m);
|
|
737
|
+
if (k) {
|
|
738
|
+
for (var B = 0; B < k; B += y) this._doProcessBlock(w, B);
|
|
739
|
+
var b = w.splice(0, k);
|
|
740
|
+
v.sigBytes -= E;
|
|
741
|
+
}
|
|
742
|
+
return new o.init(b, E);
|
|
743
|
+
}, clone: function() {
|
|
744
|
+
var d = h.clone.call(this);
|
|
745
|
+
return d._data = this._data.clone(), d;
|
|
746
|
+
}, _minBufferSize: 0 }), g = (l.Hasher = _.extend({ cfg: h.extend(), init: function(d) {
|
|
747
|
+
this.cfg = this.cfg.extend(d), this.reset();
|
|
748
|
+
}, reset: function() {
|
|
749
|
+
_.reset.call(this), this._doReset();
|
|
750
|
+
}, update: function(d) {
|
|
751
|
+
return this._append(d), this._process(), this;
|
|
752
|
+
}, finalize: function(d) {
|
|
753
|
+
d && this._append(d);
|
|
754
|
+
var v = this._doFinalize();
|
|
755
|
+
return v;
|
|
756
|
+
}, blockSize: 16, _createHelper: function(d) {
|
|
757
|
+
return function(v, w) {
|
|
758
|
+
return new d.init(w).finalize(v);
|
|
759
|
+
};
|
|
760
|
+
}, _createHmacHelper: function(d) {
|
|
761
|
+
return function(v, w) {
|
|
762
|
+
return new g.HMAC.init(d, w).finalize(v);
|
|
763
|
+
};
|
|
764
|
+
} }), s.algo = {});
|
|
765
|
+
return s;
|
|
766
|
+
})(Math), n);
|
|
767
|
+
}), jr = (K(function(t, e) {
|
|
768
|
+
var n, r, a, i, s, l;
|
|
769
|
+
t.exports = (a = (r = n = q).lib, i = a.Base, s = a.WordArray, (l = r.x64 = {}).Word = i.extend({ init: function(h, o) {
|
|
770
|
+
this.high = h, this.low = o;
|
|
771
|
+
} }), l.WordArray = i.extend({ init: function(h, o) {
|
|
772
|
+
h = this.words = h || [], this.sigBytes = o ?? 8 * h.length;
|
|
773
|
+
}, toX32: function() {
|
|
774
|
+
for (var h = this.words, o = h.length, c = [], u = 0; u < o; u++) {
|
|
775
|
+
var p = h[u];
|
|
776
|
+
c.push(p.high), c.push(p.low);
|
|
777
|
+
}
|
|
778
|
+
return s.create(c, this.sigBytes);
|
|
779
|
+
}, clone: function() {
|
|
780
|
+
for (var h = i.clone.call(this), o = h.words = this.words.slice(0), c = o.length, u = 0; u < c; u++) o[u] = o[u].clone();
|
|
781
|
+
return h;
|
|
782
|
+
} }), n);
|
|
783
|
+
}), K(function(t, e) {
|
|
784
|
+
var n;
|
|
785
|
+
t.exports = (n = q, (function() {
|
|
786
|
+
if (typeof ArrayBuffer == "function") {
|
|
787
|
+
var r = n.lib.WordArray, a = r.init;
|
|
788
|
+
(r.init = function(i) {
|
|
789
|
+
if (i instanceof ArrayBuffer && (i = new Uint8Array(i)), (i instanceof Int8Array || typeof Uint8ClampedArray < "u" && i instanceof Uint8ClampedArray || i instanceof Int16Array || i instanceof Uint16Array || i instanceof Int32Array || i instanceof Uint32Array || i instanceof Float32Array || i instanceof Float64Array) && (i = new Uint8Array(i.buffer, i.byteOffset, i.byteLength)), i instanceof Uint8Array) {
|
|
790
|
+
for (var s = i.byteLength, l = [], h = 0; h < s; h++) l[h >>> 2] |= i[h] << 24 - h % 4 * 8;
|
|
791
|
+
a.call(this, l, s);
|
|
792
|
+
} else a.apply(this, arguments);
|
|
793
|
+
}).prototype = r;
|
|
794
|
+
}
|
|
795
|
+
})(), n.lib.WordArray);
|
|
796
|
+
}), K(function(t, e) {
|
|
797
|
+
var n;
|
|
798
|
+
t.exports = (n = q, (function() {
|
|
799
|
+
var r = n, a = r.lib.WordArray, i = r.enc;
|
|
800
|
+
function s(l) {
|
|
801
|
+
return l << 8 & 4278255360 | l >>> 8 & 16711935;
|
|
802
|
+
}
|
|
803
|
+
i.Utf16 = i.Utf16BE = { stringify: function(l) {
|
|
804
|
+
for (var h = l.words, o = l.sigBytes, c = [], u = 0; u < o; u += 2) {
|
|
805
|
+
var p = h[u >>> 2] >>> 16 - u % 4 * 8 & 65535;
|
|
806
|
+
c.push(String.fromCharCode(p));
|
|
807
|
+
}
|
|
808
|
+
return c.join("");
|
|
809
|
+
}, parse: function(l) {
|
|
810
|
+
for (var h = l.length, o = [], c = 0; c < h; c++) o[c >>> 1] |= l.charCodeAt(c) << 16 - c % 2 * 16;
|
|
811
|
+
return a.create(o, 2 * h);
|
|
812
|
+
} }, i.Utf16LE = { stringify: function(l) {
|
|
813
|
+
for (var h = l.words, o = l.sigBytes, c = [], u = 0; u < o; u += 2) {
|
|
814
|
+
var p = s(h[u >>> 2] >>> 16 - u % 4 * 8 & 65535);
|
|
815
|
+
c.push(String.fromCharCode(p));
|
|
816
|
+
}
|
|
817
|
+
return c.join("");
|
|
818
|
+
}, parse: function(l) {
|
|
819
|
+
for (var h = l.length, o = [], c = 0; c < h; c++) o[c >>> 1] |= s(l.charCodeAt(c) << 16 - c % 2 * 16);
|
|
820
|
+
return a.create(o, 2 * h);
|
|
821
|
+
} };
|
|
822
|
+
})(), n.enc.Utf16);
|
|
823
|
+
}), K(function(t, e) {
|
|
824
|
+
var n, r, a;
|
|
825
|
+
t.exports = (a = (r = n = q).lib.WordArray, r.enc.Base64 = { stringify: function(i) {
|
|
826
|
+
var s = i.words, l = i.sigBytes, h = this._map;
|
|
827
|
+
i.clamp();
|
|
828
|
+
for (var o = [], c = 0; c < l; c += 3) for (var u = (s[c >>> 2] >>> 24 - c % 4 * 8 & 255) << 16 | (s[c + 1 >>> 2] >>> 24 - (c + 1) % 4 * 8 & 255) << 8 | s[c + 2 >>> 2] >>> 24 - (c + 2) % 4 * 8 & 255, p = 0; p < 4 && c + 0.75 * p < l; p++) o.push(h.charAt(u >>> 6 * (3 - p) & 63));
|
|
829
|
+
var f = h.charAt(64);
|
|
830
|
+
if (f) for (; o.length % 4; ) o.push(f);
|
|
831
|
+
return o.join("");
|
|
832
|
+
}, parse: function(i) {
|
|
833
|
+
var s = i.length, l = this._map, h = this._reverseMap;
|
|
834
|
+
if (!h) {
|
|
835
|
+
h = this._reverseMap = [];
|
|
836
|
+
for (var o = 0; o < l.length; o++) h[l.charCodeAt(o)] = o;
|
|
837
|
+
}
|
|
838
|
+
var c = l.charAt(64);
|
|
839
|
+
if (c) {
|
|
840
|
+
var u = i.indexOf(c);
|
|
841
|
+
u !== -1 && (s = u);
|
|
842
|
+
}
|
|
843
|
+
return (function(p, f, _) {
|
|
844
|
+
for (var g = [], d = 0, v = 0; v < f; v++) if (v % 4) {
|
|
845
|
+
var w = _[p.charCodeAt(v - 1)] << v % 4 * 2, m = _[p.charCodeAt(v)] >>> 6 - v % 4 * 2;
|
|
846
|
+
g[d >>> 2] |= (w | m) << 24 - d % 4 * 8, d++;
|
|
847
|
+
}
|
|
848
|
+
return a.create(g, d);
|
|
849
|
+
})(i, s, h);
|
|
850
|
+
}, _map: "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=" }, n.enc.Base64);
|
|
851
|
+
}), K(function(t, e) {
|
|
852
|
+
var n;
|
|
853
|
+
t.exports = (n = q, (function(r) {
|
|
854
|
+
var a = n, i = a.lib, s = i.WordArray, l = i.Hasher, h = a.algo, o = [];
|
|
855
|
+
(function() {
|
|
856
|
+
for (var g = 0; g < 64; g++) o[g] = 4294967296 * r.abs(r.sin(g + 1)) | 0;
|
|
857
|
+
})();
|
|
858
|
+
var c = h.MD5 = l.extend({ _doReset: function() {
|
|
859
|
+
this._hash = new s.init([1732584193, 4023233417, 2562383102, 271733878]);
|
|
860
|
+
}, _doProcessBlock: function(g, d) {
|
|
861
|
+
for (var v = 0; v < 16; v++) {
|
|
862
|
+
var w = d + v, m = g[w];
|
|
863
|
+
g[w] = 16711935 & (m << 8 | m >>> 24) | 4278255360 & (m << 24 | m >>> 8);
|
|
864
|
+
}
|
|
865
|
+
var y = this._hash.words, x = g[d + 0], S = g[d + 1], k = g[d + 2], E = g[d + 3], B = g[d + 4], b = g[d + 5], R = g[d + 6], D = g[d + 7], T = g[d + 8], P = g[d + 9], N = g[d + 10], Z = g[d + 11], V = g[d + 12], H = g[d + 13], Y = g[d + 14], et = g[d + 15], z = y[0], I = y[1], L = y[2], C = y[3];
|
|
866
|
+
z = u(z, I, L, C, x, 7, o[0]), C = u(C, z, I, L, S, 12, o[1]), L = u(L, C, z, I, k, 17, o[2]), I = u(I, L, C, z, E, 22, o[3]), z = u(z, I, L, C, B, 7, o[4]), C = u(C, z, I, L, b, 12, o[5]), L = u(L, C, z, I, R, 17, o[6]), I = u(I, L, C, z, D, 22, o[7]), z = u(z, I, L, C, T, 7, o[8]), C = u(C, z, I, L, P, 12, o[9]), L = u(L, C, z, I, N, 17, o[10]), I = u(I, L, C, z, Z, 22, o[11]), z = u(z, I, L, C, V, 7, o[12]), C = u(C, z, I, L, H, 12, o[13]), L = u(L, C, z, I, Y, 17, o[14]), z = p(z, I = u(I, L, C, z, et, 22, o[15]), L, C, S, 5, o[16]), C = p(C, z, I, L, R, 9, o[17]), L = p(L, C, z, I, Z, 14, o[18]), I = p(I, L, C, z, x, 20, o[19]), z = p(z, I, L, C, b, 5, o[20]), C = p(C, z, I, L, N, 9, o[21]), L = p(L, C, z, I, et, 14, o[22]), I = p(I, L, C, z, B, 20, o[23]), z = p(z, I, L, C, P, 5, o[24]), C = p(C, z, I, L, Y, 9, o[25]), L = p(L, C, z, I, E, 14, o[26]), I = p(I, L, C, z, T, 20, o[27]), z = p(z, I, L, C, H, 5, o[28]), C = p(C, z, I, L, k, 9, o[29]), L = p(L, C, z, I, D, 14, o[30]), z = f(z, I = p(I, L, C, z, V, 20, o[31]), L, C, b, 4, o[32]), C = f(C, z, I, L, T, 11, o[33]), L = f(L, C, z, I, Z, 16, o[34]), I = f(I, L, C, z, Y, 23, o[35]), z = f(z, I, L, C, S, 4, o[36]), C = f(C, z, I, L, B, 11, o[37]), L = f(L, C, z, I, D, 16, o[38]), I = f(I, L, C, z, N, 23, o[39]), z = f(z, I, L, C, H, 4, o[40]), C = f(C, z, I, L, x, 11, o[41]), L = f(L, C, z, I, E, 16, o[42]), I = f(I, L, C, z, R, 23, o[43]), z = f(z, I, L, C, P, 4, o[44]), C = f(C, z, I, L, V, 11, o[45]), L = f(L, C, z, I, et, 16, o[46]), z = _(z, I = f(I, L, C, z, k, 23, o[47]), L, C, x, 6, o[48]), C = _(C, z, I, L, D, 10, o[49]), L = _(L, C, z, I, Y, 15, o[50]), I = _(I, L, C, z, b, 21, o[51]), z = _(z, I, L, C, V, 6, o[52]), C = _(C, z, I, L, E, 10, o[53]), L = _(L, C, z, I, N, 15, o[54]), I = _(I, L, C, z, S, 21, o[55]), z = _(z, I, L, C, T, 6, o[56]), C = _(C, z, I, L, et, 10, o[57]), L = _(L, C, z, I, R, 15, o[58]), I = _(I, L, C, z, H, 21, o[59]), z = _(z, I, L, C, B, 6, o[60]), C = _(C, z, I, L, Z, 10, o[61]), L = _(L, C, z, I, k, 15, o[62]), I = _(I, L, C, z, P, 21, o[63]), y[0] = y[0] + z | 0, y[1] = y[1] + I | 0, y[2] = y[2] + L | 0, y[3] = y[3] + C | 0;
|
|
867
|
+
}, _doFinalize: function() {
|
|
868
|
+
var g = this._data, d = g.words, v = 8 * this._nDataBytes, w = 8 * g.sigBytes;
|
|
869
|
+
d[w >>> 5] |= 128 << 24 - w % 32;
|
|
870
|
+
var m = r.floor(v / 4294967296), y = v;
|
|
871
|
+
d[15 + (w + 64 >>> 9 << 4)] = 16711935 & (m << 8 | m >>> 24) | 4278255360 & (m << 24 | m >>> 8), d[14 + (w + 64 >>> 9 << 4)] = 16711935 & (y << 8 | y >>> 24) | 4278255360 & (y << 24 | y >>> 8), g.sigBytes = 4 * (d.length + 1), this._process();
|
|
872
|
+
for (var x = this._hash, S = x.words, k = 0; k < 4; k++) {
|
|
873
|
+
var E = S[k];
|
|
874
|
+
S[k] = 16711935 & (E << 8 | E >>> 24) | 4278255360 & (E << 24 | E >>> 8);
|
|
875
|
+
}
|
|
876
|
+
return x;
|
|
877
|
+
}, clone: function() {
|
|
878
|
+
var g = l.clone.call(this);
|
|
879
|
+
return g._hash = this._hash.clone(), g;
|
|
880
|
+
} });
|
|
881
|
+
function u(g, d, v, w, m, y, x) {
|
|
882
|
+
var S = g + (d & v | ~d & w) + m + x;
|
|
883
|
+
return (S << y | S >>> 32 - y) + d;
|
|
884
|
+
}
|
|
885
|
+
function p(g, d, v, w, m, y, x) {
|
|
886
|
+
var S = g + (d & w | v & ~w) + m + x;
|
|
887
|
+
return (S << y | S >>> 32 - y) + d;
|
|
888
|
+
}
|
|
889
|
+
function f(g, d, v, w, m, y, x) {
|
|
890
|
+
var S = g + (d ^ v ^ w) + m + x;
|
|
891
|
+
return (S << y | S >>> 32 - y) + d;
|
|
892
|
+
}
|
|
893
|
+
function _(g, d, v, w, m, y, x) {
|
|
894
|
+
var S = g + (v ^ (d | ~w)) + m + x;
|
|
895
|
+
return (S << y | S >>> 32 - y) + d;
|
|
896
|
+
}
|
|
897
|
+
a.MD5 = l._createHelper(c), a.HmacMD5 = l._createHmacHelper(c);
|
|
898
|
+
})(Math), n.MD5);
|
|
899
|
+
}), K(function(t, e) {
|
|
900
|
+
var n, r, a, i, s, l, h, o;
|
|
901
|
+
t.exports = (a = (r = n = q).lib, i = a.WordArray, s = a.Hasher, l = r.algo, h = [], o = l.SHA1 = s.extend({ _doReset: function() {
|
|
902
|
+
this._hash = new i.init([1732584193, 4023233417, 2562383102, 271733878, 3285377520]);
|
|
903
|
+
}, _doProcessBlock: function(c, u) {
|
|
904
|
+
for (var p = this._hash.words, f = p[0], _ = p[1], g = p[2], d = p[3], v = p[4], w = 0; w < 80; w++) {
|
|
905
|
+
if (w < 16) h[w] = 0 | c[u + w];
|
|
906
|
+
else {
|
|
907
|
+
var m = h[w - 3] ^ h[w - 8] ^ h[w - 14] ^ h[w - 16];
|
|
908
|
+
h[w] = m << 1 | m >>> 31;
|
|
909
|
+
}
|
|
910
|
+
var y = (f << 5 | f >>> 27) + v + h[w];
|
|
911
|
+
y += w < 20 ? 1518500249 + (_ & g | ~_ & d) : w < 40 ? 1859775393 + (_ ^ g ^ d) : w < 60 ? (_ & g | _ & d | g & d) - 1894007588 : (_ ^ g ^ d) - 899497514, v = d, d = g, g = _ << 30 | _ >>> 2, _ = f, f = y;
|
|
912
|
+
}
|
|
913
|
+
p[0] = p[0] + f | 0, p[1] = p[1] + _ | 0, p[2] = p[2] + g | 0, p[3] = p[3] + d | 0, p[4] = p[4] + v | 0;
|
|
914
|
+
}, _doFinalize: function() {
|
|
915
|
+
var c = this._data, u = c.words, p = 8 * this._nDataBytes, f = 8 * c.sigBytes;
|
|
916
|
+
return u[f >>> 5] |= 128 << 24 - f % 32, u[14 + (f + 64 >>> 9 << 4)] = Math.floor(p / 4294967296), u[15 + (f + 64 >>> 9 << 4)] = p, c.sigBytes = 4 * u.length, this._process(), this._hash;
|
|
917
|
+
}, clone: function() {
|
|
918
|
+
var c = s.clone.call(this);
|
|
919
|
+
return c._hash = this._hash.clone(), c;
|
|
920
|
+
} }), r.SHA1 = s._createHelper(o), r.HmacSHA1 = s._createHmacHelper(o), n.SHA1);
|
|
921
|
+
}), K(function(t, e) {
|
|
922
|
+
var n;
|
|
923
|
+
t.exports = (n = q, (function(r) {
|
|
924
|
+
var a = n, i = a.lib, s = i.WordArray, l = i.Hasher, h = a.algo, o = [], c = [];
|
|
925
|
+
(function() {
|
|
926
|
+
function f(v) {
|
|
927
|
+
for (var w = r.sqrt(v), m = 2; m <= w; m++) if (!(v % m)) return !1;
|
|
928
|
+
return !0;
|
|
929
|
+
}
|
|
930
|
+
function _(v) {
|
|
931
|
+
return 4294967296 * (v - (0 | v)) | 0;
|
|
932
|
+
}
|
|
933
|
+
for (var g = 2, d = 0; d < 64; ) f(g) && (d < 8 && (o[d] = _(r.pow(g, 0.5))), c[d] = _(r.pow(g, 1 / 3)), d++), g++;
|
|
934
|
+
})();
|
|
935
|
+
var u = [], p = h.SHA256 = l.extend({ _doReset: function() {
|
|
936
|
+
this._hash = new s.init(o.slice(0));
|
|
937
|
+
}, _doProcessBlock: function(f, _) {
|
|
938
|
+
for (var g = this._hash.words, d = g[0], v = g[1], w = g[2], m = g[3], y = g[4], x = g[5], S = g[6], k = g[7], E = 0; E < 64; E++) {
|
|
939
|
+
if (E < 16) u[E] = 0 | f[_ + E];
|
|
940
|
+
else {
|
|
941
|
+
var B = u[E - 15], b = (B << 25 | B >>> 7) ^ (B << 14 | B >>> 18) ^ B >>> 3, R = u[E - 2], D = (R << 15 | R >>> 17) ^ (R << 13 | R >>> 19) ^ R >>> 10;
|
|
942
|
+
u[E] = b + u[E - 7] + D + u[E - 16];
|
|
943
|
+
}
|
|
944
|
+
var T = d & v ^ d & w ^ v & w, P = (d << 30 | d >>> 2) ^ (d << 19 | d >>> 13) ^ (d << 10 | d >>> 22), N = k + ((y << 26 | y >>> 6) ^ (y << 21 | y >>> 11) ^ (y << 7 | y >>> 25)) + (y & x ^ ~y & S) + c[E] + u[E];
|
|
945
|
+
k = S, S = x, x = y, y = m + N | 0, m = w, w = v, v = d, d = N + (P + T) | 0;
|
|
946
|
+
}
|
|
947
|
+
g[0] = g[0] + d | 0, g[1] = g[1] + v | 0, g[2] = g[2] + w | 0, g[3] = g[3] + m | 0, g[4] = g[4] + y | 0, g[5] = g[5] + x | 0, g[6] = g[6] + S | 0, g[7] = g[7] + k | 0;
|
|
948
|
+
}, _doFinalize: function() {
|
|
949
|
+
var f = this._data, _ = f.words, g = 8 * this._nDataBytes, d = 8 * f.sigBytes;
|
|
950
|
+
return _[d >>> 5] |= 128 << 24 - d % 32, _[14 + (d + 64 >>> 9 << 4)] = r.floor(g / 4294967296), _[15 + (d + 64 >>> 9 << 4)] = g, f.sigBytes = 4 * _.length, this._process(), this._hash;
|
|
951
|
+
}, clone: function() {
|
|
952
|
+
var f = l.clone.call(this);
|
|
953
|
+
return f._hash = this._hash.clone(), f;
|
|
954
|
+
} });
|
|
955
|
+
a.SHA256 = l._createHelper(p), a.HmacSHA256 = l._createHmacHelper(p);
|
|
956
|
+
})(Math), n.SHA256);
|
|
957
|
+
}), K(function(t, e) {
|
|
958
|
+
var n, r, a, i, s, l;
|
|
959
|
+
t.exports = (a = (r = n = q).lib.WordArray, i = r.algo, s = i.SHA256, l = i.SHA224 = s.extend({ _doReset: function() {
|
|
960
|
+
this._hash = new a.init([3238371032, 914150663, 812702999, 4144912697, 4290775857, 1750603025, 1694076839, 3204075428]);
|
|
961
|
+
}, _doFinalize: function() {
|
|
962
|
+
var h = s._doFinalize.call(this);
|
|
963
|
+
return h.sigBytes -= 4, h;
|
|
964
|
+
} }), r.SHA224 = s._createHelper(l), r.HmacSHA224 = s._createHmacHelper(l), n.SHA224);
|
|
965
|
+
}), K(function(t, e) {
|
|
966
|
+
var n;
|
|
967
|
+
t.exports = (n = q, (function() {
|
|
968
|
+
var r = n, a = r.lib.Hasher, i = r.x64, s = i.Word, l = i.WordArray, h = r.algo;
|
|
969
|
+
function o() {
|
|
970
|
+
return s.create.apply(s, arguments);
|
|
971
|
+
}
|
|
972
|
+
var c = [o(1116352408, 3609767458), o(1899447441, 602891725), o(3049323471, 3964484399), o(3921009573, 2173295548), o(961987163, 4081628472), o(1508970993, 3053834265), o(2453635748, 2937671579), o(2870763221, 3664609560), o(3624381080, 2734883394), o(310598401, 1164996542), o(607225278, 1323610764), o(1426881987, 3590304994), o(1925078388, 4068182383), o(2162078206, 991336113), o(2614888103, 633803317), o(3248222580, 3479774868), o(3835390401, 2666613458), o(4022224774, 944711139), o(264347078, 2341262773), o(604807628, 2007800933), o(770255983, 1495990901), o(1249150122, 1856431235), o(1555081692, 3175218132), o(1996064986, 2198950837), o(2554220882, 3999719339), o(2821834349, 766784016), o(2952996808, 2566594879), o(3210313671, 3203337956), o(3336571891, 1034457026), o(3584528711, 2466948901), o(113926993, 3758326383), o(338241895, 168717936), o(666307205, 1188179964), o(773529912, 1546045734), o(1294757372, 1522805485), o(1396182291, 2643833823), o(1695183700, 2343527390), o(1986661051, 1014477480), o(2177026350, 1206759142), o(2456956037, 344077627), o(2730485921, 1290863460), o(2820302411, 3158454273), o(3259730800, 3505952657), o(3345764771, 106217008), o(3516065817, 3606008344), o(3600352804, 1432725776), o(4094571909, 1467031594), o(275423344, 851169720), o(430227734, 3100823752), o(506948616, 1363258195), o(659060556, 3750685593), o(883997877, 3785050280), o(958139571, 3318307427), o(1322822218, 3812723403), o(1537002063, 2003034995), o(1747873779, 3602036899), o(1955562222, 1575990012), o(2024104815, 1125592928), o(2227730452, 2716904306), o(2361852424, 442776044), o(2428436474, 593698344), o(2756734187, 3733110249), o(3204031479, 2999351573), o(3329325298, 3815920427), o(3391569614, 3928383900), o(3515267271, 566280711), o(3940187606, 3454069534), o(4118630271, 4000239992), o(116418474, 1914138554), o(174292421, 2731055270), o(289380356, 3203993006), o(460393269, 320620315), o(685471733, 587496836), o(852142971, 1086792851), o(1017036298, 365543100), o(1126000580, 2618297676), o(1288033470, 3409855158), o(1501505948, 4234509866), o(1607167915, 987167468), o(1816402316, 1246189591)], u = [];
|
|
973
|
+
(function() {
|
|
974
|
+
for (var f = 0; f < 80; f++) u[f] = o();
|
|
975
|
+
})();
|
|
976
|
+
var p = h.SHA512 = a.extend({ _doReset: function() {
|
|
977
|
+
this._hash = new l.init([new s.init(1779033703, 4089235720), new s.init(3144134277, 2227873595), new s.init(1013904242, 4271175723), new s.init(2773480762, 1595750129), new s.init(1359893119, 2917565137), new s.init(2600822924, 725511199), new s.init(528734635, 4215389547), new s.init(1541459225, 327033209)]);
|
|
978
|
+
}, _doProcessBlock: function(f, _) {
|
|
979
|
+
for (var g = this._hash.words, d = g[0], v = g[1], w = g[2], m = g[3], y = g[4], x = g[5], S = g[6], k = g[7], E = d.high, B = d.low, b = v.high, R = v.low, D = w.high, T = w.low, P = m.high, N = m.low, Z = y.high, V = y.low, H = x.high, Y = x.low, et = S.high, z = S.low, I = k.high, L = k.low, C = E, it = B, wt = b, dt = R, yt = D, It = T, Me = P, Rt = N, mt = Z, pt = V, ye = H, $t = Y, M = et, O = z, j = I, W = L, F = 0; F < 80; F++) {
|
|
980
|
+
var ft = u[F];
|
|
981
|
+
if (F < 16) var De = ft.high = 0 | f[_ + 2 * F], be = ft.low = 0 | f[_ + 2 * F + 1];
|
|
982
|
+
else {
|
|
983
|
+
var kr = u[F - 15], ke = kr.high, Pe = kr.low, Ha = (ke >>> 1 | Pe << 31) ^ (ke >>> 8 | Pe << 24) ^ ke >>> 7, Er = (Pe >>> 1 | ke << 31) ^ (Pe >>> 8 | ke << 24) ^ (Pe >>> 7 | ke << 25), Sr = u[F - 2], Ee = Sr.high, Oe = Sr.low, Fa = (Ee >>> 19 | Oe << 13) ^ (Ee << 3 | Oe >>> 29) ^ Ee >>> 6, xr = (Oe >>> 19 | Ee << 13) ^ (Oe << 3 | Ee >>> 29) ^ (Oe >>> 6 | Ee << 26), Rr = u[F - 7], Za = Rr.high, Va = Rr.low, Ar = u[F - 16], ja = Ar.high, Br = Ar.low;
|
|
984
|
+
De = (De = (De = Ha + Za + ((be = Er + Va) >>> 0 < Er >>> 0 ? 1 : 0)) + Fa + ((be += xr) >>> 0 < xr >>> 0 ? 1 : 0)) + ja + ((be += Br) >>> 0 < Br >>> 0 ? 1 : 0), ft.high = De, ft.low = be;
|
|
985
|
+
}
|
|
986
|
+
var Jt, Wa = mt & ye ^ ~mt & M, Tr = pt & $t ^ ~pt & O, Ya = C & wt ^ C & yt ^ wt & yt, Ka = it & dt ^ it & It ^ dt & It, Ga = (C >>> 28 | it << 4) ^ (C << 30 | it >>> 2) ^ (C << 25 | it >>> 7), Lr = (it >>> 28 | C << 4) ^ (it << 30 | C >>> 2) ^ (it << 25 | C >>> 7), qa = (mt >>> 14 | pt << 18) ^ (mt >>> 18 | pt << 14) ^ (mt << 23 | pt >>> 9), Xa = (pt >>> 14 | mt << 18) ^ (pt >>> 18 | mt << 14) ^ (pt << 23 | mt >>> 9), zr = c[F], $a = zr.high, Cr = zr.low, Ue = j + qa + ((Jt = W + Xa) >>> 0 < W >>> 0 ? 1 : 0), Ir = Lr + Ka;
|
|
987
|
+
j = M, W = O, M = ye, O = $t, ye = mt, $t = pt, mt = Me + (Ue = (Ue = (Ue = Ue + Wa + ((Jt += Tr) >>> 0 < Tr >>> 0 ? 1 : 0)) + $a + ((Jt += Cr) >>> 0 < Cr >>> 0 ? 1 : 0)) + De + ((Jt += be) >>> 0 < be >>> 0 ? 1 : 0)) + ((pt = Rt + Jt | 0) >>> 0 < Rt >>> 0 ? 1 : 0) | 0, Me = yt, Rt = It, yt = wt, It = dt, wt = C, dt = it, C = Ue + (Ga + Ya + (Ir >>> 0 < Lr >>> 0 ? 1 : 0)) + ((it = Jt + Ir | 0) >>> 0 < Jt >>> 0 ? 1 : 0) | 0;
|
|
988
|
+
}
|
|
989
|
+
B = d.low = B + it, d.high = E + C + (B >>> 0 < it >>> 0 ? 1 : 0), R = v.low = R + dt, v.high = b + wt + (R >>> 0 < dt >>> 0 ? 1 : 0), T = w.low = T + It, w.high = D + yt + (T >>> 0 < It >>> 0 ? 1 : 0), N = m.low = N + Rt, m.high = P + Me + (N >>> 0 < Rt >>> 0 ? 1 : 0), V = y.low = V + pt, y.high = Z + mt + (V >>> 0 < pt >>> 0 ? 1 : 0), Y = x.low = Y + $t, x.high = H + ye + (Y >>> 0 < $t >>> 0 ? 1 : 0), z = S.low = z + O, S.high = et + M + (z >>> 0 < O >>> 0 ? 1 : 0), L = k.low = L + W, k.high = I + j + (L >>> 0 < W >>> 0 ? 1 : 0);
|
|
990
|
+
}, _doFinalize: function() {
|
|
991
|
+
var f = this._data, _ = f.words, g = 8 * this._nDataBytes, d = 8 * f.sigBytes;
|
|
992
|
+
return _[d >>> 5] |= 128 << 24 - d % 32, _[30 + (d + 128 >>> 10 << 5)] = Math.floor(g / 4294967296), _[31 + (d + 128 >>> 10 << 5)] = g, f.sigBytes = 4 * _.length, this._process(), this._hash.toX32();
|
|
993
|
+
}, clone: function() {
|
|
994
|
+
var f = a.clone.call(this);
|
|
995
|
+
return f._hash = this._hash.clone(), f;
|
|
996
|
+
}, blockSize: 32 });
|
|
997
|
+
r.SHA512 = a._createHelper(p), r.HmacSHA512 = a._createHmacHelper(p);
|
|
998
|
+
})(), n.SHA512);
|
|
999
|
+
}), K(function(t, e) {
|
|
1000
|
+
var n, r, a, i, s, l, h, o;
|
|
1001
|
+
t.exports = (a = (r = n = q).x64, i = a.Word, s = a.WordArray, l = r.algo, h = l.SHA512, o = l.SHA384 = h.extend({ _doReset: function() {
|
|
1002
|
+
this._hash = new s.init([new i.init(3418070365, 3238371032), new i.init(1654270250, 914150663), new i.init(2438529370, 812702999), new i.init(355462360, 4144912697), new i.init(1731405415, 4290775857), new i.init(2394180231, 1750603025), new i.init(3675008525, 1694076839), new i.init(1203062813, 3204075428)]);
|
|
1003
|
+
}, _doFinalize: function() {
|
|
1004
|
+
var c = h._doFinalize.call(this);
|
|
1005
|
+
return c.sigBytes -= 16, c;
|
|
1006
|
+
} }), r.SHA384 = h._createHelper(o), r.HmacSHA384 = h._createHmacHelper(o), n.SHA384);
|
|
1007
|
+
}), K(function(t, e) {
|
|
1008
|
+
var n;
|
|
1009
|
+
t.exports = (n = q, (function(r) {
|
|
1010
|
+
var a = n, i = a.lib, s = i.WordArray, l = i.Hasher, h = a.x64.Word, o = a.algo, c = [], u = [], p = [];
|
|
1011
|
+
(function() {
|
|
1012
|
+
for (var g = 1, d = 0, v = 0; v < 24; v++) {
|
|
1013
|
+
c[g + 5 * d] = (v + 1) * (v + 2) / 2 % 64;
|
|
1014
|
+
var w = (2 * g + 3 * d) % 5;
|
|
1015
|
+
g = d % 5, d = w;
|
|
1016
|
+
}
|
|
1017
|
+
for (g = 0; g < 5; g++) for (d = 0; d < 5; d++) u[g + 5 * d] = d + (2 * g + 3 * d) % 5 * 5;
|
|
1018
|
+
for (var m = 1, y = 0; y < 24; y++) {
|
|
1019
|
+
for (var x = 0, S = 0, k = 0; k < 7; k++) {
|
|
1020
|
+
if (1 & m) {
|
|
1021
|
+
var E = (1 << k) - 1;
|
|
1022
|
+
E < 32 ? S ^= 1 << E : x ^= 1 << E - 32;
|
|
1023
|
+
}
|
|
1024
|
+
128 & m ? m = m << 1 ^ 113 : m <<= 1;
|
|
1025
|
+
}
|
|
1026
|
+
p[y] = h.create(x, S);
|
|
1027
|
+
}
|
|
1028
|
+
})();
|
|
1029
|
+
var f = [];
|
|
1030
|
+
(function() {
|
|
1031
|
+
for (var g = 0; g < 25; g++) f[g] = h.create();
|
|
1032
|
+
})();
|
|
1033
|
+
var _ = o.SHA3 = l.extend({ cfg: l.cfg.extend({ outputLength: 512 }), _doReset: function() {
|
|
1034
|
+
for (var g = this._state = [], d = 0; d < 25; d++) g[d] = new h.init();
|
|
1035
|
+
this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32;
|
|
1036
|
+
}, _doProcessBlock: function(g, d) {
|
|
1037
|
+
for (var v = this._state, w = this.blockSize / 2, m = 0; m < w; m++) {
|
|
1038
|
+
var y = g[d + 2 * m], x = g[d + 2 * m + 1];
|
|
1039
|
+
y = 16711935 & (y << 8 | y >>> 24) | 4278255360 & (y << 24 | y >>> 8), x = 16711935 & (x << 8 | x >>> 24) | 4278255360 & (x << 24 | x >>> 8), (L = v[m]).high ^= x, L.low ^= y;
|
|
1040
|
+
}
|
|
1041
|
+
for (var S = 0; S < 24; S++) {
|
|
1042
|
+
for (var k = 0; k < 5; k++) {
|
|
1043
|
+
for (var E = 0, B = 0, b = 0; b < 5; b++) E ^= (L = v[k + 5 * b]).high, B ^= L.low;
|
|
1044
|
+
var R = f[k];
|
|
1045
|
+
R.high = E, R.low = B;
|
|
1046
|
+
}
|
|
1047
|
+
for (k = 0; k < 5; k++) {
|
|
1048
|
+
var D = f[(k + 4) % 5], T = f[(k + 1) % 5], P = T.high, N = T.low;
|
|
1049
|
+
for (E = D.high ^ (P << 1 | N >>> 31), B = D.low ^ (N << 1 | P >>> 31), b = 0; b < 5; b++) (L = v[k + 5 * b]).high ^= E, L.low ^= B;
|
|
1050
|
+
}
|
|
1051
|
+
for (var Z = 1; Z < 25; Z++) {
|
|
1052
|
+
var V = (L = v[Z]).high, H = L.low, Y = c[Z];
|
|
1053
|
+
Y < 32 ? (E = V << Y | H >>> 32 - Y, B = H << Y | V >>> 32 - Y) : (E = H << Y - 32 | V >>> 64 - Y, B = V << Y - 32 | H >>> 64 - Y);
|
|
1054
|
+
var et = f[u[Z]];
|
|
1055
|
+
et.high = E, et.low = B;
|
|
1056
|
+
}
|
|
1057
|
+
var z = f[0], I = v[0];
|
|
1058
|
+
for (z.high = I.high, z.low = I.low, k = 0; k < 5; k++) for (b = 0; b < 5; b++) {
|
|
1059
|
+
var L = v[Z = k + 5 * b], C = f[Z], it = f[(k + 1) % 5 + 5 * b], wt = f[(k + 2) % 5 + 5 * b];
|
|
1060
|
+
L.high = C.high ^ ~it.high & wt.high, L.low = C.low ^ ~it.low & wt.low;
|
|
1061
|
+
}
|
|
1062
|
+
L = v[0];
|
|
1063
|
+
var dt = p[S];
|
|
1064
|
+
L.high ^= dt.high, L.low ^= dt.low;
|
|
1065
|
+
}
|
|
1066
|
+
}, _doFinalize: function() {
|
|
1067
|
+
var g = this._data, d = g.words, v = (this._nDataBytes, 8 * g.sigBytes), w = 32 * this.blockSize;
|
|
1068
|
+
d[v >>> 5] |= 1 << 24 - v % 32, d[(r.ceil((v + 1) / w) * w >>> 5) - 1] |= 128, g.sigBytes = 4 * d.length, this._process();
|
|
1069
|
+
for (var m = this._state, y = this.cfg.outputLength / 8, x = y / 8, S = [], k = 0; k < x; k++) {
|
|
1070
|
+
var E = m[k], B = E.high, b = E.low;
|
|
1071
|
+
B = 16711935 & (B << 8 | B >>> 24) | 4278255360 & (B << 24 | B >>> 8), b = 16711935 & (b << 8 | b >>> 24) | 4278255360 & (b << 24 | b >>> 8), S.push(b), S.push(B);
|
|
1072
|
+
}
|
|
1073
|
+
return new s.init(S, y);
|
|
1074
|
+
}, clone: function() {
|
|
1075
|
+
for (var g = l.clone.call(this), d = g._state = this._state.slice(0), v = 0; v < 25; v++) d[v] = d[v].clone();
|
|
1076
|
+
return g;
|
|
1077
|
+
} });
|
|
1078
|
+
a.SHA3 = l._createHelper(_), a.HmacSHA3 = l._createHmacHelper(_);
|
|
1079
|
+
})(Math), n.SHA3);
|
|
1080
|
+
}), K(function(t, e) {
|
|
1081
|
+
var n;
|
|
1082
|
+
t.exports = (n = q, (function(r) {
|
|
1083
|
+
var a = n, i = a.lib, s = i.WordArray, l = i.Hasher, h = a.algo, o = s.create([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]), c = s.create([5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]), u = s.create([11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6]), p = s.create([8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11]), f = s.create([0, 1518500249, 1859775393, 2400959708, 2840853838]), _ = s.create([1352829926, 1548603684, 1836072691, 2053994217, 0]), g = h.RIPEMD160 = l.extend({ _doReset: function() {
|
|
1084
|
+
this._hash = s.create([1732584193, 4023233417, 2562383102, 271733878, 3285377520]);
|
|
1085
|
+
}, _doProcessBlock: function(S, k) {
|
|
1086
|
+
for (var E = 0; E < 16; E++) {
|
|
1087
|
+
var B = k + E, b = S[B];
|
|
1088
|
+
S[B] = 16711935 & (b << 8 | b >>> 24) | 4278255360 & (b << 24 | b >>> 8);
|
|
1089
|
+
}
|
|
1090
|
+
var R, D, T, P, N, Z, V, H, Y, et, z, I = this._hash.words, L = f.words, C = _.words, it = o.words, wt = c.words, dt = u.words, yt = p.words;
|
|
1091
|
+
for (Z = R = I[0], V = D = I[1], H = T = I[2], Y = P = I[3], et = N = I[4], E = 0; E < 80; E += 1) z = R + S[k + it[E]] | 0, z += E < 16 ? d(D, T, P) + L[0] : E < 32 ? v(D, T, P) + L[1] : E < 48 ? w(D, T, P) + L[2] : E < 64 ? m(D, T, P) + L[3] : y(D, T, P) + L[4], z = (z = x(z |= 0, dt[E])) + N | 0, R = N, N = P, P = x(T, 10), T = D, D = z, z = Z + S[k + wt[E]] | 0, z += E < 16 ? y(V, H, Y) + C[0] : E < 32 ? m(V, H, Y) + C[1] : E < 48 ? w(V, H, Y) + C[2] : E < 64 ? v(V, H, Y) + C[3] : d(V, H, Y) + C[4], z = (z = x(z |= 0, yt[E])) + et | 0, Z = et, et = Y, Y = x(H, 10), H = V, V = z;
|
|
1092
|
+
z = I[1] + T + Y | 0, I[1] = I[2] + P + et | 0, I[2] = I[3] + N + Z | 0, I[3] = I[4] + R + V | 0, I[4] = I[0] + D + H | 0, I[0] = z;
|
|
1093
|
+
}, _doFinalize: function() {
|
|
1094
|
+
var S = this._data, k = S.words, E = 8 * this._nDataBytes, B = 8 * S.sigBytes;
|
|
1095
|
+
k[B >>> 5] |= 128 << 24 - B % 32, k[14 + (B + 64 >>> 9 << 4)] = 16711935 & (E << 8 | E >>> 24) | 4278255360 & (E << 24 | E >>> 8), S.sigBytes = 4 * (k.length + 1), this._process();
|
|
1096
|
+
for (var b = this._hash, R = b.words, D = 0; D < 5; D++) {
|
|
1097
|
+
var T = R[D];
|
|
1098
|
+
R[D] = 16711935 & (T << 8 | T >>> 24) | 4278255360 & (T << 24 | T >>> 8);
|
|
1099
|
+
}
|
|
1100
|
+
return b;
|
|
1101
|
+
}, clone: function() {
|
|
1102
|
+
var S = l.clone.call(this);
|
|
1103
|
+
return S._hash = this._hash.clone(), S;
|
|
1104
|
+
} });
|
|
1105
|
+
function d(S, k, E) {
|
|
1106
|
+
return S ^ k ^ E;
|
|
1107
|
+
}
|
|
1108
|
+
function v(S, k, E) {
|
|
1109
|
+
return S & k | ~S & E;
|
|
1110
|
+
}
|
|
1111
|
+
function w(S, k, E) {
|
|
1112
|
+
return (S | ~k) ^ E;
|
|
1113
|
+
}
|
|
1114
|
+
function m(S, k, E) {
|
|
1115
|
+
return S & E | k & ~E;
|
|
1116
|
+
}
|
|
1117
|
+
function y(S, k, E) {
|
|
1118
|
+
return S ^ (k | ~E);
|
|
1119
|
+
}
|
|
1120
|
+
function x(S, k) {
|
|
1121
|
+
return S << k | S >>> 32 - k;
|
|
1122
|
+
}
|
|
1123
|
+
a.RIPEMD160 = l._createHelper(g), a.HmacRIPEMD160 = l._createHmacHelper(g);
|
|
1124
|
+
})(), n.RIPEMD160);
|
|
1125
|
+
}), K(function(t, e) {
|
|
1126
|
+
var n, r, a, i, s, l;
|
|
1127
|
+
t.exports = (r = (n = q).lib, a = r.Base, i = n.enc, s = i.Utf8, l = n.algo, void (l.HMAC = a.extend({ init: function(h, o) {
|
|
1128
|
+
h = this._hasher = new h.init(), typeof o == "string" && (o = s.parse(o));
|
|
1129
|
+
var c = h.blockSize, u = 4 * c;
|
|
1130
|
+
o.sigBytes > u && (o = h.finalize(o)), o.clamp();
|
|
1131
|
+
for (var p = this._oKey = o.clone(), f = this._iKey = o.clone(), _ = p.words, g = f.words, d = 0; d < c; d++) _[d] ^= 1549556828, g[d] ^= 909522486;
|
|
1132
|
+
p.sigBytes = f.sigBytes = u, this.reset();
|
|
1133
|
+
}, reset: function() {
|
|
1134
|
+
var h = this._hasher;
|
|
1135
|
+
h.reset(), h.update(this._iKey);
|
|
1136
|
+
}, update: function(h) {
|
|
1137
|
+
return this._hasher.update(h), this;
|
|
1138
|
+
}, finalize: function(h) {
|
|
1139
|
+
var o = this._hasher, c = o.finalize(h);
|
|
1140
|
+
o.reset();
|
|
1141
|
+
var u = o.finalize(this._oKey.clone().concat(c));
|
|
1142
|
+
return u;
|
|
1143
|
+
} })));
|
|
1144
|
+
}), K(function(t, e) {
|
|
1145
|
+
var n, r, a, i, s, l, h, o, c;
|
|
1146
|
+
t.exports = (a = (r = n = q).lib, i = a.Base, s = a.WordArray, l = r.algo, h = l.SHA1, o = l.HMAC, c = l.PBKDF2 = i.extend({ cfg: i.extend({ keySize: 4, hasher: h, iterations: 1 }), init: function(u) {
|
|
1147
|
+
this.cfg = this.cfg.extend(u);
|
|
1148
|
+
}, compute: function(u, p) {
|
|
1149
|
+
for (var f = this.cfg, _ = o.create(f.hasher, u), g = s.create(), d = s.create([1]), v = g.words, w = d.words, m = f.keySize, y = f.iterations; v.length < m; ) {
|
|
1150
|
+
var x = _.update(p).finalize(d);
|
|
1151
|
+
_.reset();
|
|
1152
|
+
for (var S = x.words, k = S.length, E = x, B = 1; B < y; B++) {
|
|
1153
|
+
E = _.finalize(E), _.reset();
|
|
1154
|
+
for (var b = E.words, R = 0; R < k; R++) S[R] ^= b[R];
|
|
1155
|
+
}
|
|
1156
|
+
g.concat(x), w[0]++;
|
|
1157
|
+
}
|
|
1158
|
+
return g.sigBytes = 4 * m, g;
|
|
1159
|
+
} }), r.PBKDF2 = function(u, p, f) {
|
|
1160
|
+
return c.create(f).compute(u, p);
|
|
1161
|
+
}, n.PBKDF2);
|
|
1162
|
+
}), K(function(t, e) {
|
|
1163
|
+
var n, r, a, i, s, l, h, o;
|
|
1164
|
+
t.exports = (a = (r = n = q).lib, i = a.Base, s = a.WordArray, l = r.algo, h = l.MD5, o = l.EvpKDF = i.extend({ cfg: i.extend({ keySize: 4, hasher: h, iterations: 1 }), init: function(c) {
|
|
1165
|
+
this.cfg = this.cfg.extend(c);
|
|
1166
|
+
}, compute: function(c, u) {
|
|
1167
|
+
for (var p = this.cfg, f = p.hasher.create(), _ = s.create(), g = _.words, d = p.keySize, v = p.iterations; g.length < d; ) {
|
|
1168
|
+
w && f.update(w);
|
|
1169
|
+
var w = f.update(c).finalize(u);
|
|
1170
|
+
f.reset();
|
|
1171
|
+
for (var m = 1; m < v; m++) w = f.finalize(w), f.reset();
|
|
1172
|
+
_.concat(w);
|
|
1173
|
+
}
|
|
1174
|
+
return _.sigBytes = 4 * d, _;
|
|
1175
|
+
} }), r.EvpKDF = function(c, u, p) {
|
|
1176
|
+
return o.create(p).compute(c, u);
|
|
1177
|
+
}, n.EvpKDF);
|
|
1178
|
+
}), K(function(t, e) {
|
|
1179
|
+
var n, r, a, i, s, l, h, o, c, u, p, f, _, g, d, v, w, m, y, x, S, k, E, B;
|
|
1180
|
+
t.exports = void ((n = q).lib.Cipher || (a = n, i = a.lib, s = i.Base, l = i.WordArray, h = i.BufferedBlockAlgorithm, o = a.enc, o.Utf8, c = o.Base64, u = a.algo, p = u.EvpKDF, f = i.Cipher = h.extend({ cfg: s.extend(), createEncryptor: function(b, R) {
|
|
1181
|
+
return this.create(this._ENC_XFORM_MODE, b, R);
|
|
1182
|
+
}, createDecryptor: function(b, R) {
|
|
1183
|
+
return this.create(this._DEC_XFORM_MODE, b, R);
|
|
1184
|
+
}, init: function(b, R, D) {
|
|
1185
|
+
this.cfg = this.cfg.extend(D), this._xformMode = b, this._key = R, this.reset();
|
|
1186
|
+
}, reset: function() {
|
|
1187
|
+
h.reset.call(this), this._doReset();
|
|
1188
|
+
}, process: function(b) {
|
|
1189
|
+
return this._append(b), this._process();
|
|
1190
|
+
}, finalize: function(b) {
|
|
1191
|
+
b && this._append(b);
|
|
1192
|
+
var R = this._doFinalize();
|
|
1193
|
+
return R;
|
|
1194
|
+
}, keySize: 4, ivSize: 4, _ENC_XFORM_MODE: 1, _DEC_XFORM_MODE: 2, _createHelper: /* @__PURE__ */ (function() {
|
|
1195
|
+
function b(R) {
|
|
1196
|
+
return typeof R == "string" ? B : S;
|
|
1197
|
+
}
|
|
1198
|
+
return function(R) {
|
|
1199
|
+
return { encrypt: function(D, T, P) {
|
|
1200
|
+
return b(T).encrypt(R, D, T, P);
|
|
1201
|
+
}, decrypt: function(D, T, P) {
|
|
1202
|
+
return b(T).decrypt(R, D, T, P);
|
|
1203
|
+
} };
|
|
1204
|
+
};
|
|
1205
|
+
})() }), i.StreamCipher = f.extend({ _doFinalize: function() {
|
|
1206
|
+
var b = this._process(!0);
|
|
1207
|
+
return b;
|
|
1208
|
+
}, blockSize: 1 }), _ = a.mode = {}, g = i.BlockCipherMode = s.extend({ createEncryptor: function(b, R) {
|
|
1209
|
+
return this.Encryptor.create(b, R);
|
|
1210
|
+
}, createDecryptor: function(b, R) {
|
|
1211
|
+
return this.Decryptor.create(b, R);
|
|
1212
|
+
}, init: function(b, R) {
|
|
1213
|
+
this._cipher = b, this._iv = R;
|
|
1214
|
+
} }), d = _.CBC = (function() {
|
|
1215
|
+
var b = g.extend();
|
|
1216
|
+
function R(D, T, P) {
|
|
1217
|
+
var N = this._iv;
|
|
1218
|
+
if (N) {
|
|
1219
|
+
var Z = N;
|
|
1220
|
+
this._iv = r;
|
|
1221
|
+
} else var Z = this._prevBlock;
|
|
1222
|
+
for (var V = 0; V < P; V++) D[T + V] ^= Z[V];
|
|
1223
|
+
}
|
|
1224
|
+
return b.Encryptor = b.extend({ processBlock: function(D, T) {
|
|
1225
|
+
var P = this._cipher, N = P.blockSize;
|
|
1226
|
+
R.call(this, D, T, N), P.encryptBlock(D, T), this._prevBlock = D.slice(T, T + N);
|
|
1227
|
+
} }), b.Decryptor = b.extend({ processBlock: function(D, T) {
|
|
1228
|
+
var P = this._cipher, N = P.blockSize, Z = D.slice(T, T + N);
|
|
1229
|
+
P.decryptBlock(D, T), R.call(this, D, T, N), this._prevBlock = Z;
|
|
1230
|
+
} }), b;
|
|
1231
|
+
})(), v = a.pad = {}, w = v.Pkcs7 = { pad: function(b, R) {
|
|
1232
|
+
for (var D = 4 * R, T = D - b.sigBytes % D, P = T << 24 | T << 16 | T << 8 | T, N = [], Z = 0; Z < T; Z += 4) N.push(P);
|
|
1233
|
+
var V = l.create(N, T);
|
|
1234
|
+
b.concat(V);
|
|
1235
|
+
}, unpad: function(b) {
|
|
1236
|
+
var R = 255 & b.words[b.sigBytes - 1 >>> 2];
|
|
1237
|
+
b.sigBytes -= R;
|
|
1238
|
+
} }, i.BlockCipher = f.extend({ cfg: f.cfg.extend({ mode: d, padding: w }), reset: function() {
|
|
1239
|
+
f.reset.call(this);
|
|
1240
|
+
var b = this.cfg, R = b.iv, D = b.mode;
|
|
1241
|
+
if (this._xformMode == this._ENC_XFORM_MODE) var T = D.createEncryptor;
|
|
1242
|
+
else {
|
|
1243
|
+
var T = D.createDecryptor;
|
|
1244
|
+
this._minBufferSize = 1;
|
|
1245
|
+
}
|
|
1246
|
+
this._mode && this._mode.__creator == T ? this._mode.init(this, R && R.words) : (this._mode = T.call(D, this, R && R.words), this._mode.__creator = T);
|
|
1247
|
+
}, _doProcessBlock: function(b, R) {
|
|
1248
|
+
this._mode.processBlock(b, R);
|
|
1249
|
+
}, _doFinalize: function() {
|
|
1250
|
+
var b = this.cfg.padding;
|
|
1251
|
+
if (this._xformMode == this._ENC_XFORM_MODE) {
|
|
1252
|
+
b.pad(this._data, this.blockSize);
|
|
1253
|
+
var R = this._process(!0);
|
|
1254
|
+
} else {
|
|
1255
|
+
var R = this._process(!0);
|
|
1256
|
+
b.unpad(R);
|
|
1257
|
+
}
|
|
1258
|
+
return R;
|
|
1259
|
+
}, blockSize: 4 }), m = i.CipherParams = s.extend({ init: function(b) {
|
|
1260
|
+
this.mixIn(b);
|
|
1261
|
+
}, toString: function(b) {
|
|
1262
|
+
return (b || this.formatter).stringify(this);
|
|
1263
|
+
} }), y = a.format = {}, x = y.OpenSSL = { stringify: function(b) {
|
|
1264
|
+
var R = b.ciphertext, D = b.salt;
|
|
1265
|
+
if (D) var T = l.create([1398893684, 1701076831]).concat(D).concat(R);
|
|
1266
|
+
else var T = R;
|
|
1267
|
+
return T.toString(c);
|
|
1268
|
+
}, parse: function(b) {
|
|
1269
|
+
var R = c.parse(b), D = R.words;
|
|
1270
|
+
if (D[0] == 1398893684 && D[1] == 1701076831) {
|
|
1271
|
+
var T = l.create(D.slice(2, 4));
|
|
1272
|
+
D.splice(0, 4), R.sigBytes -= 16;
|
|
1273
|
+
}
|
|
1274
|
+
return m.create({ ciphertext: R, salt: T });
|
|
1275
|
+
} }, S = i.SerializableCipher = s.extend({ cfg: s.extend({ format: x }), encrypt: function(b, R, D, T) {
|
|
1276
|
+
T = this.cfg.extend(T);
|
|
1277
|
+
var P = b.createEncryptor(D, T), N = P.finalize(R), Z = P.cfg;
|
|
1278
|
+
return m.create({ ciphertext: N, key: D, iv: Z.iv, algorithm: b, mode: Z.mode, padding: Z.padding, blockSize: b.blockSize, formatter: T.format });
|
|
1279
|
+
}, decrypt: function(b, R, D, T) {
|
|
1280
|
+
T = this.cfg.extend(T), R = this._parse(R, T.format);
|
|
1281
|
+
var P = b.createDecryptor(D, T).finalize(R.ciphertext);
|
|
1282
|
+
return P;
|
|
1283
|
+
}, _parse: function(b, R) {
|
|
1284
|
+
return typeof b == "string" ? R.parse(b, this) : b;
|
|
1285
|
+
} }), k = a.kdf = {}, E = k.OpenSSL = { execute: function(b, R, D, T) {
|
|
1286
|
+
T || (T = l.random(8));
|
|
1287
|
+
var P = p.create({ keySize: R + D }).compute(b, T), N = l.create(P.words.slice(R), 4 * D);
|
|
1288
|
+
return P.sigBytes = 4 * R, m.create({ key: P, iv: N, salt: T });
|
|
1289
|
+
} }, B = i.PasswordBasedCipher = S.extend({ cfg: S.cfg.extend({ kdf: E }), encrypt: function(b, R, D, T) {
|
|
1290
|
+
var P = (T = this.cfg.extend(T)).kdf.execute(D, b.keySize, b.ivSize);
|
|
1291
|
+
T.iv = P.iv;
|
|
1292
|
+
var N = S.encrypt.call(this, b, R, P.key, T);
|
|
1293
|
+
return N.mixIn(P), N;
|
|
1294
|
+
}, decrypt: function(b, R, D, T) {
|
|
1295
|
+
T = this.cfg.extend(T), R = this._parse(R, T.format);
|
|
1296
|
+
var P = T.kdf.execute(D, b.keySize, b.ivSize, R.salt);
|
|
1297
|
+
T.iv = P.iv;
|
|
1298
|
+
var N = S.decrypt.call(this, b, R, P.key, T);
|
|
1299
|
+
return N;
|
|
1300
|
+
} })));
|
|
1301
|
+
}), K(function(t, e) {
|
|
1302
|
+
var n;
|
|
1303
|
+
t.exports = ((n = q).mode.CFB = (function() {
|
|
1304
|
+
var r = n.lib.BlockCipherMode.extend();
|
|
1305
|
+
function a(i, s, l, h) {
|
|
1306
|
+
var o = this._iv;
|
|
1307
|
+
if (o) {
|
|
1308
|
+
var c = o.slice(0);
|
|
1309
|
+
this._iv = void 0;
|
|
1310
|
+
} else c = this._prevBlock;
|
|
1311
|
+
h.encryptBlock(c, 0);
|
|
1312
|
+
for (var u = 0; u < l; u++) i[s + u] ^= c[u];
|
|
1313
|
+
}
|
|
1314
|
+
return r.Encryptor = r.extend({ processBlock: function(i, s) {
|
|
1315
|
+
var l = this._cipher, h = l.blockSize;
|
|
1316
|
+
a.call(this, i, s, h, l), this._prevBlock = i.slice(s, s + h);
|
|
1317
|
+
} }), r.Decryptor = r.extend({ processBlock: function(i, s) {
|
|
1318
|
+
var l = this._cipher, h = l.blockSize, o = i.slice(s, s + h);
|
|
1319
|
+
a.call(this, i, s, h, l), this._prevBlock = o;
|
|
1320
|
+
} }), r;
|
|
1321
|
+
})(), n.mode.CFB);
|
|
1322
|
+
}), K(function(t, e) {
|
|
1323
|
+
var n, r, a;
|
|
1324
|
+
t.exports = ((n = q).mode.CTR = (r = n.lib.BlockCipherMode.extend(), a = r.Encryptor = r.extend({ processBlock: function(i, s) {
|
|
1325
|
+
var l = this._cipher, h = l.blockSize, o = this._iv, c = this._counter;
|
|
1326
|
+
o && (c = this._counter = o.slice(0), this._iv = void 0);
|
|
1327
|
+
var u = c.slice(0);
|
|
1328
|
+
l.encryptBlock(u, 0), c[h - 1] = c[h - 1] + 1 | 0;
|
|
1329
|
+
for (var p = 0; p < h; p++) i[s + p] ^= u[p];
|
|
1330
|
+
} }), r.Decryptor = a, r), n.mode.CTR);
|
|
1331
|
+
}), K(function(t, e) {
|
|
1332
|
+
var n;
|
|
1333
|
+
t.exports = ((n = q).mode.CTRGladman = (function() {
|
|
1334
|
+
var r = n.lib.BlockCipherMode.extend();
|
|
1335
|
+
function a(s) {
|
|
1336
|
+
if ((s >> 24 & 255) == 255) {
|
|
1337
|
+
var l = s >> 16 & 255, h = s >> 8 & 255, o = 255 & s;
|
|
1338
|
+
l === 255 ? (l = 0, h === 255 ? (h = 0, o === 255 ? o = 0 : ++o) : ++h) : ++l, s = 0, s += l << 16, s += h << 8, s += o;
|
|
1339
|
+
} else s += 1 << 24;
|
|
1340
|
+
return s;
|
|
1341
|
+
}
|
|
1342
|
+
var i = r.Encryptor = r.extend({ processBlock: function(s, l) {
|
|
1343
|
+
var h = this._cipher, o = h.blockSize, c = this._iv, u = this._counter;
|
|
1344
|
+
c && (u = this._counter = c.slice(0), this._iv = void 0), (function(_) {
|
|
1345
|
+
(_[0] = a(_[0])) === 0 && (_[1] = a(_[1]));
|
|
1346
|
+
})(u);
|
|
1347
|
+
var p = u.slice(0);
|
|
1348
|
+
h.encryptBlock(p, 0);
|
|
1349
|
+
for (var f = 0; f < o; f++) s[l + f] ^= p[f];
|
|
1350
|
+
} });
|
|
1351
|
+
return r.Decryptor = i, r;
|
|
1352
|
+
})(), n.mode.CTRGladman);
|
|
1353
|
+
}), K(function(t, e) {
|
|
1354
|
+
var n, r, a;
|
|
1355
|
+
t.exports = ((n = q).mode.OFB = (r = n.lib.BlockCipherMode.extend(), a = r.Encryptor = r.extend({ processBlock: function(i, s) {
|
|
1356
|
+
var l = this._cipher, h = l.blockSize, o = this._iv, c = this._keystream;
|
|
1357
|
+
o && (c = this._keystream = o.slice(0), this._iv = void 0), l.encryptBlock(c, 0);
|
|
1358
|
+
for (var u = 0; u < h; u++) i[s + u] ^= c[u];
|
|
1359
|
+
} }), r.Decryptor = a, r), n.mode.OFB);
|
|
1360
|
+
}), K(function(t, e) {
|
|
1361
|
+
var n, r;
|
|
1362
|
+
t.exports = ((n = q).mode.ECB = ((r = n.lib.BlockCipherMode.extend()).Encryptor = r.extend({ processBlock: function(a, i) {
|
|
1363
|
+
this._cipher.encryptBlock(a, i);
|
|
1364
|
+
} }), r.Decryptor = r.extend({ processBlock: function(a, i) {
|
|
1365
|
+
this._cipher.decryptBlock(a, i);
|
|
1366
|
+
} }), r), n.mode.ECB);
|
|
1367
|
+
}), K(function(t, e) {
|
|
1368
|
+
var n;
|
|
1369
|
+
t.exports = ((n = q).pad.AnsiX923 = { pad: function(r, a) {
|
|
1370
|
+
var i = r.sigBytes, s = 4 * a, l = s - i % s, h = i + l - 1;
|
|
1371
|
+
r.clamp(), r.words[h >>> 2] |= l << 24 - h % 4 * 8, r.sigBytes += l;
|
|
1372
|
+
}, unpad: function(r) {
|
|
1373
|
+
var a = 255 & r.words[r.sigBytes - 1 >>> 2];
|
|
1374
|
+
r.sigBytes -= a;
|
|
1375
|
+
} }, n.pad.Ansix923);
|
|
1376
|
+
}), K(function(t, e) {
|
|
1377
|
+
var n;
|
|
1378
|
+
t.exports = ((n = q).pad.Iso10126 = { pad: function(r, a) {
|
|
1379
|
+
var i = 4 * a, s = i - r.sigBytes % i;
|
|
1380
|
+
r.concat(n.lib.WordArray.random(s - 1)).concat(n.lib.WordArray.create([s << 24], 1));
|
|
1381
|
+
}, unpad: function(r) {
|
|
1382
|
+
var a = 255 & r.words[r.sigBytes - 1 >>> 2];
|
|
1383
|
+
r.sigBytes -= a;
|
|
1384
|
+
} }, n.pad.Iso10126);
|
|
1385
|
+
}), K(function(t, e) {
|
|
1386
|
+
var n;
|
|
1387
|
+
t.exports = ((n = q).pad.Iso97971 = { pad: function(r, a) {
|
|
1388
|
+
r.concat(n.lib.WordArray.create([2147483648], 1)), n.pad.ZeroPadding.pad(r, a);
|
|
1389
|
+
}, unpad: function(r) {
|
|
1390
|
+
n.pad.ZeroPadding.unpad(r), r.sigBytes--;
|
|
1391
|
+
} }, n.pad.Iso97971);
|
|
1392
|
+
}), K(function(t, e) {
|
|
1393
|
+
var n;
|
|
1394
|
+
t.exports = ((n = q).pad.ZeroPadding = { pad: function(r, a) {
|
|
1395
|
+
var i = 4 * a;
|
|
1396
|
+
r.clamp(), r.sigBytes += i - (r.sigBytes % i || i);
|
|
1397
|
+
}, unpad: function(r) {
|
|
1398
|
+
for (var a = r.words, i = r.sigBytes - 1; !(a[i >>> 2] >>> 24 - i % 4 * 8 & 255); ) i--;
|
|
1399
|
+
r.sigBytes = i + 1;
|
|
1400
|
+
} }, n.pad.ZeroPadding);
|
|
1401
|
+
}), K(function(t, e) {
|
|
1402
|
+
var n;
|
|
1403
|
+
t.exports = ((n = q).pad.NoPadding = { pad: function() {
|
|
1404
|
+
}, unpad: function() {
|
|
1405
|
+
} }, n.pad.NoPadding);
|
|
1406
|
+
}), K(function(t, e) {
|
|
1407
|
+
var n, r, a, i;
|
|
1408
|
+
t.exports = (a = (r = n = q).lib.CipherParams, i = r.enc.Hex, r.format.Hex = { stringify: function(s) {
|
|
1409
|
+
return s.ciphertext.toString(i);
|
|
1410
|
+
}, parse: function(s) {
|
|
1411
|
+
var l = i.parse(s);
|
|
1412
|
+
return a.create({ ciphertext: l });
|
|
1413
|
+
} }, n.format.Hex);
|
|
1414
|
+
}), K(function(t, e) {
|
|
1415
|
+
var n;
|
|
1416
|
+
t.exports = (n = q, (function() {
|
|
1417
|
+
var r = n, a = r.lib.BlockCipher, i = r.algo, s = [], l = [], h = [], o = [], c = [], u = [], p = [], f = [], _ = [], g = [];
|
|
1418
|
+
(function() {
|
|
1419
|
+
for (var w = [], m = 0; m < 256; m++) w[m] = m < 128 ? m << 1 : m << 1 ^ 283;
|
|
1420
|
+
var y = 0, x = 0;
|
|
1421
|
+
for (m = 0; m < 256; m++) {
|
|
1422
|
+
var S = x ^ x << 1 ^ x << 2 ^ x << 3 ^ x << 4;
|
|
1423
|
+
S = S >>> 8 ^ 255 & S ^ 99, s[y] = S, l[S] = y;
|
|
1424
|
+
var k = w[y], E = w[k], B = w[E], b = 257 * w[S] ^ 16843008 * S;
|
|
1425
|
+
h[y] = b << 24 | b >>> 8, o[y] = b << 16 | b >>> 16, c[y] = b << 8 | b >>> 24, u[y] = b, b = 16843009 * B ^ 65537 * E ^ 257 * k ^ 16843008 * y, p[S] = b << 24 | b >>> 8, f[S] = b << 16 | b >>> 16, _[S] = b << 8 | b >>> 24, g[S] = b, y ? (y = k ^ w[w[w[B ^ k]]], x ^= w[w[x]]) : y = x = 1;
|
|
1426
|
+
}
|
|
1427
|
+
})();
|
|
1428
|
+
var d = [0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54], v = i.AES = a.extend({ _doReset: function() {
|
|
1429
|
+
if (!this._nRounds || this._keyPriorReset !== this._key) {
|
|
1430
|
+
for (var w = this._keyPriorReset = this._key, m = w.words, y = w.sigBytes / 4, x = 4 * ((this._nRounds = y + 6) + 1), S = this._keySchedule = [], k = 0; k < x; k++) if (k < y) S[k] = m[k];
|
|
1431
|
+
else {
|
|
1432
|
+
var E = S[k - 1];
|
|
1433
|
+
k % y ? y > 6 && k % y == 4 && (E = s[E >>> 24] << 24 | s[E >>> 16 & 255] << 16 | s[E >>> 8 & 255] << 8 | s[255 & E]) : (E = s[(E = E << 8 | E >>> 24) >>> 24] << 24 | s[E >>> 16 & 255] << 16 | s[E >>> 8 & 255] << 8 | s[255 & E], E ^= d[k / y | 0] << 24), S[k] = S[k - y] ^ E;
|
|
1434
|
+
}
|
|
1435
|
+
for (var B = this._invKeySchedule = [], b = 0; b < x; b++) k = x - b, E = b % 4 ? S[k] : S[k - 4], B[b] = b < 4 || k <= 4 ? E : p[s[E >>> 24]] ^ f[s[E >>> 16 & 255]] ^ _[s[E >>> 8 & 255]] ^ g[s[255 & E]];
|
|
1436
|
+
}
|
|
1437
|
+
}, encryptBlock: function(w, m) {
|
|
1438
|
+
this._doCryptBlock(w, m, this._keySchedule, h, o, c, u, s);
|
|
1439
|
+
}, decryptBlock: function(w, m) {
|
|
1440
|
+
var y = w[m + 1];
|
|
1441
|
+
w[m + 1] = w[m + 3], w[m + 3] = y, this._doCryptBlock(w, m, this._invKeySchedule, p, f, _, g, l), y = w[m + 1], w[m + 1] = w[m + 3], w[m + 3] = y;
|
|
1442
|
+
}, _doCryptBlock: function(w, m, y, x, S, k, E, B) {
|
|
1443
|
+
for (var b = this._nRounds, R = w[m] ^ y[0], D = w[m + 1] ^ y[1], T = w[m + 2] ^ y[2], P = w[m + 3] ^ y[3], N = 4, Z = 1; Z < b; Z++) {
|
|
1444
|
+
var V = x[R >>> 24] ^ S[D >>> 16 & 255] ^ k[T >>> 8 & 255] ^ E[255 & P] ^ y[N++], H = x[D >>> 24] ^ S[T >>> 16 & 255] ^ k[P >>> 8 & 255] ^ E[255 & R] ^ y[N++], Y = x[T >>> 24] ^ S[P >>> 16 & 255] ^ k[R >>> 8 & 255] ^ E[255 & D] ^ y[N++], et = x[P >>> 24] ^ S[R >>> 16 & 255] ^ k[D >>> 8 & 255] ^ E[255 & T] ^ y[N++];
|
|
1445
|
+
R = V, D = H, T = Y, P = et;
|
|
1446
|
+
}
|
|
1447
|
+
V = (B[R >>> 24] << 24 | B[D >>> 16 & 255] << 16 | B[T >>> 8 & 255] << 8 | B[255 & P]) ^ y[N++], H = (B[D >>> 24] << 24 | B[T >>> 16 & 255] << 16 | B[P >>> 8 & 255] << 8 | B[255 & R]) ^ y[N++], Y = (B[T >>> 24] << 24 | B[P >>> 16 & 255] << 16 | B[R >>> 8 & 255] << 8 | B[255 & D]) ^ y[N++], et = (B[P >>> 24] << 24 | B[R >>> 16 & 255] << 16 | B[D >>> 8 & 255] << 8 | B[255 & T]) ^ y[N++], w[m] = V, w[m + 1] = H, w[m + 2] = Y, w[m + 3] = et;
|
|
1448
|
+
}, keySize: 8 });
|
|
1449
|
+
r.AES = a._createHelper(v);
|
|
1450
|
+
})(), n.AES);
|
|
1451
|
+
}), K(function(t, e) {
|
|
1452
|
+
var n;
|
|
1453
|
+
t.exports = (n = q, (function() {
|
|
1454
|
+
var r = n, a = r.lib, i = a.WordArray, s = a.BlockCipher, l = r.algo, h = [57, 49, 41, 33, 25, 17, 9, 1, 58, 50, 42, 34, 26, 18, 10, 2, 59, 51, 43, 35, 27, 19, 11, 3, 60, 52, 44, 36, 63, 55, 47, 39, 31, 23, 15, 7, 62, 54, 46, 38, 30, 22, 14, 6, 61, 53, 45, 37, 29, 21, 13, 5, 28, 20, 12, 4], o = [14, 17, 11, 24, 1, 5, 3, 28, 15, 6, 21, 10, 23, 19, 12, 4, 26, 8, 16, 7, 27, 20, 13, 2, 41, 52, 31, 37, 47, 55, 30, 40, 51, 45, 33, 48, 44, 49, 39, 56, 34, 53, 46, 42, 50, 36, 29, 32], c = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28], u = [{ 0: 8421888, 268435456: 32768, 536870912: 8421378, 805306368: 2, 1073741824: 512, 1342177280: 8421890, 1610612736: 8389122, 1879048192: 8388608, 2147483648: 514, 2415919104: 8389120, 2684354560: 33280, 2952790016: 8421376, 3221225472: 32770, 3489660928: 8388610, 3758096384: 0, 4026531840: 33282, 134217728: 0, 402653184: 8421890, 671088640: 33282, 939524096: 32768, 1207959552: 8421888, 1476395008: 512, 1744830464: 8421378, 2013265920: 2, 2281701376: 8389120, 2550136832: 33280, 2818572288: 8421376, 3087007744: 8389122, 3355443200: 8388610, 3623878656: 32770, 3892314112: 514, 4160749568: 8388608, 1: 32768, 268435457: 2, 536870913: 8421888, 805306369: 8388608, 1073741825: 8421378, 1342177281: 33280, 1610612737: 512, 1879048193: 8389122, 2147483649: 8421890, 2415919105: 8421376, 2684354561: 8388610, 2952790017: 33282, 3221225473: 514, 3489660929: 8389120, 3758096385: 32770, 4026531841: 0, 134217729: 8421890, 402653185: 8421376, 671088641: 8388608, 939524097: 512, 1207959553: 32768, 1476395009: 8388610, 1744830465: 2, 2013265921: 33282, 2281701377: 32770, 2550136833: 8389122, 2818572289: 514, 3087007745: 8421888, 3355443201: 8389120, 3623878657: 0, 3892314113: 33280, 4160749569: 8421378 }, { 0: 1074282512, 16777216: 16384, 33554432: 524288, 50331648: 1074266128, 67108864: 1073741840, 83886080: 1074282496, 100663296: 1073758208, 117440512: 16, 134217728: 540672, 150994944: 1073758224, 167772160: 1073741824, 184549376: 540688, 201326592: 524304, 218103808: 0, 234881024: 16400, 251658240: 1074266112, 8388608: 1073758208, 25165824: 540688, 41943040: 16, 58720256: 1073758224, 75497472: 1074282512, 92274688: 1073741824, 109051904: 524288, 125829120: 1074266128, 142606336: 524304, 159383552: 0, 176160768: 16384, 192937984: 1074266112, 209715200: 1073741840, 226492416: 540672, 243269632: 1074282496, 260046848: 16400, 268435456: 0, 285212672: 1074266128, 301989888: 1073758224, 318767104: 1074282496, 335544320: 1074266112, 352321536: 16, 369098752: 540688, 385875968: 16384, 402653184: 16400, 419430400: 524288, 436207616: 524304, 452984832: 1073741840, 469762048: 540672, 486539264: 1073758208, 503316480: 1073741824, 520093696: 1074282512, 276824064: 540688, 293601280: 524288, 310378496: 1074266112, 327155712: 16384, 343932928: 1073758208, 360710144: 1074282512, 377487360: 16, 394264576: 1073741824, 411041792: 1074282496, 427819008: 1073741840, 444596224: 1073758224, 461373440: 524304, 478150656: 0, 494927872: 16400, 511705088: 1074266128, 528482304: 540672 }, { 0: 260, 1048576: 0, 2097152: 67109120, 3145728: 65796, 4194304: 65540, 5242880: 67108868, 6291456: 67174660, 7340032: 67174400, 8388608: 67108864, 9437184: 67174656, 10485760: 65792, 11534336: 67174404, 12582912: 67109124, 13631488: 65536, 14680064: 4, 15728640: 256, 524288: 67174656, 1572864: 67174404, 2621440: 0, 3670016: 67109120, 4718592: 67108868, 5767168: 65536, 6815744: 65540, 7864320: 260, 8912896: 4, 9961472: 256, 11010048: 67174400, 12058624: 65796, 13107200: 65792, 14155776: 67109124, 15204352: 67174660, 16252928: 67108864, 16777216: 67174656, 17825792: 65540, 18874368: 65536, 19922944: 67109120, 20971520: 256, 22020096: 67174660, 23068672: 67108868, 24117248: 0, 25165824: 67109124, 26214400: 67108864, 27262976: 4, 28311552: 65792, 29360128: 67174400, 30408704: 260, 31457280: 65796, 32505856: 67174404, 17301504: 67108864, 18350080: 260, 19398656: 67174656, 20447232: 0, 21495808: 65540, 22544384: 67109120, 23592960: 256, 24641536: 67174404, 25690112: 65536, 26738688: 67174660, 27787264: 65796, 28835840: 67108868, 29884416: 67109124, 30932992: 67174400, 31981568: 4, 33030144: 65792 }, { 0: 2151682048, 65536: 2147487808, 131072: 4198464, 196608: 2151677952, 262144: 0, 327680: 4198400, 393216: 2147483712, 458752: 4194368, 524288: 2147483648, 589824: 4194304, 655360: 64, 720896: 2147487744, 786432: 2151678016, 851968: 4160, 917504: 4096, 983040: 2151682112, 32768: 2147487808, 98304: 64, 163840: 2151678016, 229376: 2147487744, 294912: 4198400, 360448: 2151682112, 425984: 0, 491520: 2151677952, 557056: 4096, 622592: 2151682048, 688128: 4194304, 753664: 4160, 819200: 2147483648, 884736: 4194368, 950272: 4198464, 1015808: 2147483712, 1048576: 4194368, 1114112: 4198400, 1179648: 2147483712, 1245184: 0, 1310720: 4160, 1376256: 2151678016, 1441792: 2151682048, 1507328: 2147487808, 1572864: 2151682112, 1638400: 2147483648, 1703936: 2151677952, 1769472: 4198464, 1835008: 2147487744, 1900544: 4194304, 1966080: 64, 2031616: 4096, 1081344: 2151677952, 1146880: 2151682112, 1212416: 0, 1277952: 4198400, 1343488: 4194368, 1409024: 2147483648, 1474560: 2147487808, 1540096: 64, 1605632: 2147483712, 1671168: 4096, 1736704: 2147487744, 1802240: 2151678016, 1867776: 4160, 1933312: 2151682048, 1998848: 4194304, 2064384: 4198464 }, { 0: 128, 4096: 17039360, 8192: 262144, 12288: 536870912, 16384: 537133184, 20480: 16777344, 24576: 553648256, 28672: 262272, 32768: 16777216, 36864: 537133056, 40960: 536871040, 45056: 553910400, 49152: 553910272, 53248: 0, 57344: 17039488, 61440: 553648128, 2048: 17039488, 6144: 553648256, 10240: 128, 14336: 17039360, 18432: 262144, 22528: 537133184, 26624: 553910272, 30720: 536870912, 34816: 537133056, 38912: 0, 43008: 553910400, 47104: 16777344, 51200: 536871040, 55296: 553648128, 59392: 16777216, 63488: 262272, 65536: 262144, 69632: 128, 73728: 536870912, 77824: 553648256, 81920: 16777344, 86016: 553910272, 90112: 537133184, 94208: 16777216, 98304: 553910400, 102400: 553648128, 106496: 17039360, 110592: 537133056, 114688: 262272, 118784: 536871040, 122880: 0, 126976: 17039488, 67584: 553648256, 71680: 16777216, 75776: 17039360, 79872: 537133184, 83968: 536870912, 88064: 17039488, 92160: 128, 96256: 553910272, 100352: 262272, 104448: 553910400, 108544: 0, 112640: 553648128, 116736: 16777344, 120832: 262144, 124928: 537133056, 129024: 536871040 }, { 0: 268435464, 256: 8192, 512: 270532608, 768: 270540808, 1024: 268443648, 1280: 2097152, 1536: 2097160, 1792: 268435456, 2048: 0, 2304: 268443656, 2560: 2105344, 2816: 8, 3072: 270532616, 3328: 2105352, 3584: 8200, 3840: 270540800, 128: 270532608, 384: 270540808, 640: 8, 896: 2097152, 1152: 2105352, 1408: 268435464, 1664: 268443648, 1920: 8200, 2176: 2097160, 2432: 8192, 2688: 268443656, 2944: 270532616, 3200: 0, 3456: 270540800, 3712: 2105344, 3968: 268435456, 4096: 268443648, 4352: 270532616, 4608: 270540808, 4864: 8200, 5120: 2097152, 5376: 268435456, 5632: 268435464, 5888: 2105344, 6144: 2105352, 6400: 0, 6656: 8, 6912: 270532608, 7168: 8192, 7424: 268443656, 7680: 270540800, 7936: 2097160, 4224: 8, 4480: 2105344, 4736: 2097152, 4992: 268435464, 5248: 268443648, 5504: 8200, 5760: 270540808, 6016: 270532608, 6272: 270540800, 6528: 270532616, 6784: 8192, 7040: 2105352, 7296: 2097160, 7552: 0, 7808: 268435456, 8064: 268443656 }, { 0: 1048576, 16: 33555457, 32: 1024, 48: 1049601, 64: 34604033, 80: 0, 96: 1, 112: 34603009, 128: 33555456, 144: 1048577, 160: 33554433, 176: 34604032, 192: 34603008, 208: 1025, 224: 1049600, 240: 33554432, 8: 34603009, 24: 0, 40: 33555457, 56: 34604032, 72: 1048576, 88: 33554433, 104: 33554432, 120: 1025, 136: 1049601, 152: 33555456, 168: 34603008, 184: 1048577, 200: 1024, 216: 34604033, 232: 1, 248: 1049600, 256: 33554432, 272: 1048576, 288: 33555457, 304: 34603009, 320: 1048577, 336: 33555456, 352: 34604032, 368: 1049601, 384: 1025, 400: 34604033, 416: 1049600, 432: 1, 448: 0, 464: 34603008, 480: 33554433, 496: 1024, 264: 1049600, 280: 33555457, 296: 34603009, 312: 1, 328: 33554432, 344: 1048576, 360: 1025, 376: 34604032, 392: 33554433, 408: 34603008, 424: 0, 440: 34604033, 456: 1049601, 472: 1024, 488: 33555456, 504: 1048577 }, { 0: 134219808, 1: 131072, 2: 134217728, 3: 32, 4: 131104, 5: 134350880, 6: 134350848, 7: 2048, 8: 134348800, 9: 134219776, 10: 133120, 11: 134348832, 12: 2080, 13: 0, 14: 134217760, 15: 133152, 2147483648: 2048, 2147483649: 134350880, 2147483650: 134219808, 2147483651: 134217728, 2147483652: 134348800, 2147483653: 133120, 2147483654: 133152, 2147483655: 32, 2147483656: 134217760, 2147483657: 2080, 2147483658: 131104, 2147483659: 134350848, 2147483660: 0, 2147483661: 134348832, 2147483662: 134219776, 2147483663: 131072, 16: 133152, 17: 134350848, 18: 32, 19: 2048, 20: 134219776, 21: 134217760, 22: 134348832, 23: 131072, 24: 0, 25: 131104, 26: 134348800, 27: 134219808, 28: 134350880, 29: 133120, 30: 2080, 31: 134217728, 2147483664: 131072, 2147483665: 2048, 2147483666: 134348832, 2147483667: 133152, 2147483668: 32, 2147483669: 134348800, 2147483670: 134217728, 2147483671: 134219808, 2147483672: 134350880, 2147483673: 134217760, 2147483674: 134219776, 2147483675: 0, 2147483676: 133120, 2147483677: 2080, 2147483678: 131104, 2147483679: 134350848 }], p = [4160749569, 528482304, 33030144, 2064384, 129024, 8064, 504, 2147483679], f = l.DES = s.extend({ _doReset: function() {
|
|
1455
|
+
for (var v = this._key.words, w = [], m = 0; m < 56; m++) {
|
|
1456
|
+
var y = h[m] - 1;
|
|
1457
|
+
w[m] = v[y >>> 5] >>> 31 - y % 32 & 1;
|
|
1458
|
+
}
|
|
1459
|
+
for (var x = this._subKeys = [], S = 0; S < 16; S++) {
|
|
1460
|
+
var k = x[S] = [], E = c[S];
|
|
1461
|
+
for (m = 0; m < 24; m++) k[m / 6 | 0] |= w[(o[m] - 1 + E) % 28] << 31 - m % 6, k[4 + (m / 6 | 0)] |= w[28 + (o[m + 24] - 1 + E) % 28] << 31 - m % 6;
|
|
1462
|
+
for (k[0] = k[0] << 1 | k[0] >>> 31, m = 1; m < 7; m++) k[m] = k[m] >>> 4 * (m - 1) + 3;
|
|
1463
|
+
k[7] = k[7] << 5 | k[7] >>> 27;
|
|
1464
|
+
}
|
|
1465
|
+
var B = this._invSubKeys = [];
|
|
1466
|
+
for (m = 0; m < 16; m++) B[m] = x[15 - m];
|
|
1467
|
+
}, encryptBlock: function(v, w) {
|
|
1468
|
+
this._doCryptBlock(v, w, this._subKeys);
|
|
1469
|
+
}, decryptBlock: function(v, w) {
|
|
1470
|
+
this._doCryptBlock(v, w, this._invSubKeys);
|
|
1471
|
+
}, _doCryptBlock: function(v, w, m) {
|
|
1472
|
+
this._lBlock = v[w], this._rBlock = v[w + 1], _.call(this, 4, 252645135), _.call(this, 16, 65535), g.call(this, 2, 858993459), g.call(this, 8, 16711935), _.call(this, 1, 1431655765);
|
|
1473
|
+
for (var y = 0; y < 16; y++) {
|
|
1474
|
+
for (var x = m[y], S = this._lBlock, k = this._rBlock, E = 0, B = 0; B < 8; B++) E |= u[B][((k ^ x[B]) & p[B]) >>> 0];
|
|
1475
|
+
this._lBlock = k, this._rBlock = S ^ E;
|
|
1476
|
+
}
|
|
1477
|
+
var b = this._lBlock;
|
|
1478
|
+
this._lBlock = this._rBlock, this._rBlock = b, _.call(this, 1, 1431655765), g.call(this, 8, 16711935), g.call(this, 2, 858993459), _.call(this, 16, 65535), _.call(this, 4, 252645135), v[w] = this._lBlock, v[w + 1] = this._rBlock;
|
|
1479
|
+
}, keySize: 2, ivSize: 2, blockSize: 2 });
|
|
1480
|
+
function _(v, w) {
|
|
1481
|
+
var m = (this._lBlock >>> v ^ this._rBlock) & w;
|
|
1482
|
+
this._rBlock ^= m, this._lBlock ^= m << v;
|
|
1483
|
+
}
|
|
1484
|
+
function g(v, w) {
|
|
1485
|
+
var m = (this._rBlock >>> v ^ this._lBlock) & w;
|
|
1486
|
+
this._lBlock ^= m, this._rBlock ^= m << v;
|
|
1487
|
+
}
|
|
1488
|
+
r.DES = s._createHelper(f);
|
|
1489
|
+
var d = l.TripleDES = s.extend({ _doReset: function() {
|
|
1490
|
+
var v = this._key.words;
|
|
1491
|
+
this._des1 = f.createEncryptor(i.create(v.slice(0, 2))), this._des2 = f.createEncryptor(i.create(v.slice(2, 4))), this._des3 = f.createEncryptor(i.create(v.slice(4, 6)));
|
|
1492
|
+
}, encryptBlock: function(v, w) {
|
|
1493
|
+
this._des1.encryptBlock(v, w), this._des2.decryptBlock(v, w), this._des3.encryptBlock(v, w);
|
|
1494
|
+
}, decryptBlock: function(v, w) {
|
|
1495
|
+
this._des3.decryptBlock(v, w), this._des2.encryptBlock(v, w), this._des1.decryptBlock(v, w);
|
|
1496
|
+
}, keySize: 6, ivSize: 2, blockSize: 2 });
|
|
1497
|
+
r.TripleDES = s._createHelper(d);
|
|
1498
|
+
})(), n.TripleDES);
|
|
1499
|
+
}), K(function(t, e) {
|
|
1500
|
+
var n;
|
|
1501
|
+
t.exports = (n = q, (function() {
|
|
1502
|
+
var r = n, a = r.lib.StreamCipher, i = r.algo, s = i.RC4 = a.extend({ _doReset: function() {
|
|
1503
|
+
for (var o = this._key, c = o.words, u = o.sigBytes, p = this._S = [], f = 0; f < 256; f++) p[f] = f;
|
|
1504
|
+
f = 0;
|
|
1505
|
+
for (var _ = 0; f < 256; f++) {
|
|
1506
|
+
var g = f % u, d = c[g >>> 2] >>> 24 - g % 4 * 8 & 255;
|
|
1507
|
+
_ = (_ + p[f] + d) % 256;
|
|
1508
|
+
var v = p[f];
|
|
1509
|
+
p[f] = p[_], p[_] = v;
|
|
1510
|
+
}
|
|
1511
|
+
this._i = this._j = 0;
|
|
1512
|
+
}, _doProcessBlock: function(o, c) {
|
|
1513
|
+
o[c] ^= l.call(this);
|
|
1514
|
+
}, keySize: 8, ivSize: 0 });
|
|
1515
|
+
function l() {
|
|
1516
|
+
for (var o = this._S, c = this._i, u = this._j, p = 0, f = 0; f < 4; f++) {
|
|
1517
|
+
u = (u + o[c = (c + 1) % 256]) % 256;
|
|
1518
|
+
var _ = o[c];
|
|
1519
|
+
o[c] = o[u], o[u] = _, p |= o[(o[c] + o[u]) % 256] << 24 - 8 * f;
|
|
1520
|
+
}
|
|
1521
|
+
return this._i = c, this._j = u, p;
|
|
1522
|
+
}
|
|
1523
|
+
r.RC4 = a._createHelper(s);
|
|
1524
|
+
var h = i.RC4Drop = s.extend({ cfg: s.cfg.extend({ drop: 192 }), _doReset: function() {
|
|
1525
|
+
s._doReset.call(this);
|
|
1526
|
+
for (var o = this.cfg.drop; o > 0; o--) l.call(this);
|
|
1527
|
+
} });
|
|
1528
|
+
r.RC4Drop = a._createHelper(h);
|
|
1529
|
+
})(), n.RC4);
|
|
1530
|
+
}), K(function(t, e) {
|
|
1531
|
+
var n;
|
|
1532
|
+
t.exports = (n = q, (function() {
|
|
1533
|
+
var r = n, a = r.lib.StreamCipher, i = r.algo, s = [], l = [], h = [], o = i.Rabbit = a.extend({ _doReset: function() {
|
|
1534
|
+
for (var u = this._key.words, p = this.cfg.iv, f = 0; f < 4; f++) u[f] = 16711935 & (u[f] << 8 | u[f] >>> 24) | 4278255360 & (u[f] << 24 | u[f] >>> 8);
|
|
1535
|
+
var _ = this._X = [u[0], u[3] << 16 | u[2] >>> 16, u[1], u[0] << 16 | u[3] >>> 16, u[2], u[1] << 16 | u[0] >>> 16, u[3], u[2] << 16 | u[1] >>> 16], g = this._C = [u[2] << 16 | u[2] >>> 16, 4294901760 & u[0] | 65535 & u[1], u[3] << 16 | u[3] >>> 16, 4294901760 & u[1] | 65535 & u[2], u[0] << 16 | u[0] >>> 16, 4294901760 & u[2] | 65535 & u[3], u[1] << 16 | u[1] >>> 16, 4294901760 & u[3] | 65535 & u[0]];
|
|
1536
|
+
for (this._b = 0, f = 0; f < 4; f++) c.call(this);
|
|
1537
|
+
for (f = 0; f < 8; f++) g[f] ^= _[f + 4 & 7];
|
|
1538
|
+
if (p) {
|
|
1539
|
+
var d = p.words, v = d[0], w = d[1], m = 16711935 & (v << 8 | v >>> 24) | 4278255360 & (v << 24 | v >>> 8), y = 16711935 & (w << 8 | w >>> 24) | 4278255360 & (w << 24 | w >>> 8), x = m >>> 16 | 4294901760 & y, S = y << 16 | 65535 & m;
|
|
1540
|
+
for (g[0] ^= m, g[1] ^= x, g[2] ^= y, g[3] ^= S, g[4] ^= m, g[5] ^= x, g[6] ^= y, g[7] ^= S, f = 0; f < 4; f++) c.call(this);
|
|
1541
|
+
}
|
|
1542
|
+
}, _doProcessBlock: function(u, p) {
|
|
1543
|
+
var f = this._X;
|
|
1544
|
+
c.call(this), s[0] = f[0] ^ f[5] >>> 16 ^ f[3] << 16, s[1] = f[2] ^ f[7] >>> 16 ^ f[5] << 16, s[2] = f[4] ^ f[1] >>> 16 ^ f[7] << 16, s[3] = f[6] ^ f[3] >>> 16 ^ f[1] << 16;
|
|
1545
|
+
for (var _ = 0; _ < 4; _++) s[_] = 16711935 & (s[_] << 8 | s[_] >>> 24) | 4278255360 & (s[_] << 24 | s[_] >>> 8), u[p + _] ^= s[_];
|
|
1546
|
+
}, blockSize: 4, ivSize: 2 });
|
|
1547
|
+
function c() {
|
|
1548
|
+
for (var u = this._X, p = this._C, f = 0; f < 8; f++) l[f] = p[f];
|
|
1549
|
+
for (p[0] = p[0] + 1295307597 + this._b | 0, p[1] = p[1] + 3545052371 + (p[0] >>> 0 < l[0] >>> 0 ? 1 : 0) | 0, p[2] = p[2] + 886263092 + (p[1] >>> 0 < l[1] >>> 0 ? 1 : 0) | 0, p[3] = p[3] + 1295307597 + (p[2] >>> 0 < l[2] >>> 0 ? 1 : 0) | 0, p[4] = p[4] + 3545052371 + (p[3] >>> 0 < l[3] >>> 0 ? 1 : 0) | 0, p[5] = p[5] + 886263092 + (p[4] >>> 0 < l[4] >>> 0 ? 1 : 0) | 0, p[6] = p[6] + 1295307597 + (p[5] >>> 0 < l[5] >>> 0 ? 1 : 0) | 0, p[7] = p[7] + 3545052371 + (p[6] >>> 0 < l[6] >>> 0 ? 1 : 0) | 0, this._b = p[7] >>> 0 < l[7] >>> 0 ? 1 : 0, f = 0; f < 8; f++) {
|
|
1550
|
+
var _ = u[f] + p[f], g = 65535 & _, d = _ >>> 16, v = ((g * g >>> 17) + g * d >>> 15) + d * d, w = ((4294901760 & _) * _ | 0) + ((65535 & _) * _ | 0);
|
|
1551
|
+
h[f] = v ^ w;
|
|
1552
|
+
}
|
|
1553
|
+
u[0] = h[0] + (h[7] << 16 | h[7] >>> 16) + (h[6] << 16 | h[6] >>> 16) | 0, u[1] = h[1] + (h[0] << 8 | h[0] >>> 24) + h[7] | 0, u[2] = h[2] + (h[1] << 16 | h[1] >>> 16) + (h[0] << 16 | h[0] >>> 16) | 0, u[3] = h[3] + (h[2] << 8 | h[2] >>> 24) + h[1] | 0, u[4] = h[4] + (h[3] << 16 | h[3] >>> 16) + (h[2] << 16 | h[2] >>> 16) | 0, u[5] = h[5] + (h[4] << 8 | h[4] >>> 24) + h[3] | 0, u[6] = h[6] + (h[5] << 16 | h[5] >>> 16) + (h[4] << 16 | h[4] >>> 16) | 0, u[7] = h[7] + (h[6] << 8 | h[6] >>> 24) + h[5] | 0;
|
|
1554
|
+
}
|
|
1555
|
+
r.Rabbit = a._createHelper(o);
|
|
1556
|
+
})(), n.Rabbit);
|
|
1557
|
+
}), K(function(t, e) {
|
|
1558
|
+
var n;
|
|
1559
|
+
t.exports = (n = q, (function() {
|
|
1560
|
+
var r = n, a = r.lib.StreamCipher, i = r.algo, s = [], l = [], h = [], o = i.RabbitLegacy = a.extend({ _doReset: function() {
|
|
1561
|
+
var u = this._key.words, p = this.cfg.iv, f = this._X = [u[0], u[3] << 16 | u[2] >>> 16, u[1], u[0] << 16 | u[3] >>> 16, u[2], u[1] << 16 | u[0] >>> 16, u[3], u[2] << 16 | u[1] >>> 16], _ = this._C = [u[2] << 16 | u[2] >>> 16, 4294901760 & u[0] | 65535 & u[1], u[3] << 16 | u[3] >>> 16, 4294901760 & u[1] | 65535 & u[2], u[0] << 16 | u[0] >>> 16, 4294901760 & u[2] | 65535 & u[3], u[1] << 16 | u[1] >>> 16, 4294901760 & u[3] | 65535 & u[0]];
|
|
1562
|
+
this._b = 0;
|
|
1563
|
+
for (var g = 0; g < 4; g++) c.call(this);
|
|
1564
|
+
for (g = 0; g < 8; g++) _[g] ^= f[g + 4 & 7];
|
|
1565
|
+
if (p) {
|
|
1566
|
+
var d = p.words, v = d[0], w = d[1], m = 16711935 & (v << 8 | v >>> 24) | 4278255360 & (v << 24 | v >>> 8), y = 16711935 & (w << 8 | w >>> 24) | 4278255360 & (w << 24 | w >>> 8), x = m >>> 16 | 4294901760 & y, S = y << 16 | 65535 & m;
|
|
1567
|
+
for (_[0] ^= m, _[1] ^= x, _[2] ^= y, _[3] ^= S, _[4] ^= m, _[5] ^= x, _[6] ^= y, _[7] ^= S, g = 0; g < 4; g++) c.call(this);
|
|
1568
|
+
}
|
|
1569
|
+
}, _doProcessBlock: function(u, p) {
|
|
1570
|
+
var f = this._X;
|
|
1571
|
+
c.call(this), s[0] = f[0] ^ f[5] >>> 16 ^ f[3] << 16, s[1] = f[2] ^ f[7] >>> 16 ^ f[5] << 16, s[2] = f[4] ^ f[1] >>> 16 ^ f[7] << 16, s[3] = f[6] ^ f[3] >>> 16 ^ f[1] << 16;
|
|
1572
|
+
for (var _ = 0; _ < 4; _++) s[_] = 16711935 & (s[_] << 8 | s[_] >>> 24) | 4278255360 & (s[_] << 24 | s[_] >>> 8), u[p + _] ^= s[_];
|
|
1573
|
+
}, blockSize: 4, ivSize: 2 });
|
|
1574
|
+
function c() {
|
|
1575
|
+
for (var u = this._X, p = this._C, f = 0; f < 8; f++) l[f] = p[f];
|
|
1576
|
+
for (p[0] = p[0] + 1295307597 + this._b | 0, p[1] = p[1] + 3545052371 + (p[0] >>> 0 < l[0] >>> 0 ? 1 : 0) | 0, p[2] = p[2] + 886263092 + (p[1] >>> 0 < l[1] >>> 0 ? 1 : 0) | 0, p[3] = p[3] + 1295307597 + (p[2] >>> 0 < l[2] >>> 0 ? 1 : 0) | 0, p[4] = p[4] + 3545052371 + (p[3] >>> 0 < l[3] >>> 0 ? 1 : 0) | 0, p[5] = p[5] + 886263092 + (p[4] >>> 0 < l[4] >>> 0 ? 1 : 0) | 0, p[6] = p[6] + 1295307597 + (p[5] >>> 0 < l[5] >>> 0 ? 1 : 0) | 0, p[7] = p[7] + 3545052371 + (p[6] >>> 0 < l[6] >>> 0 ? 1 : 0) | 0, this._b = p[7] >>> 0 < l[7] >>> 0 ? 1 : 0, f = 0; f < 8; f++) {
|
|
1577
|
+
var _ = u[f] + p[f], g = 65535 & _, d = _ >>> 16, v = ((g * g >>> 17) + g * d >>> 15) + d * d, w = ((4294901760 & _) * _ | 0) + ((65535 & _) * _ | 0);
|
|
1578
|
+
h[f] = v ^ w;
|
|
1579
|
+
}
|
|
1580
|
+
u[0] = h[0] + (h[7] << 16 | h[7] >>> 16) + (h[6] << 16 | h[6] >>> 16) | 0, u[1] = h[1] + (h[0] << 8 | h[0] >>> 24) + h[7] | 0, u[2] = h[2] + (h[1] << 16 | h[1] >>> 16) + (h[0] << 16 | h[0] >>> 16) | 0, u[3] = h[3] + (h[2] << 8 | h[2] >>> 24) + h[1] | 0, u[4] = h[4] + (h[3] << 16 | h[3] >>> 16) + (h[2] << 16 | h[2] >>> 16) | 0, u[5] = h[5] + (h[4] << 8 | h[4] >>> 24) + h[3] | 0, u[6] = h[6] + (h[5] << 16 | h[5] >>> 16) + (h[4] << 16 | h[4] >>> 16) | 0, u[7] = h[7] + (h[6] << 8 | h[6] >>> 24) + h[5] | 0;
|
|
1581
|
+
}
|
|
1582
|
+
r.RabbitLegacy = a._createHelper(o);
|
|
1583
|
+
})(), n.RabbitLegacy);
|
|
1584
|
+
}), K(function(t, e) {
|
|
1585
|
+
t.exports = q;
|
|
1586
|
+
}));
|
|
1587
|
+
function ca() {
|
|
1588
|
+
throw new Error("setTimeout has not been defined");
|
|
1589
|
+
}
|
|
1590
|
+
function fa() {
|
|
1591
|
+
throw new Error("clearTimeout has not been defined");
|
|
1592
|
+
}
|
|
1593
|
+
var Ht = ca, Ft = fa;
|
|
1594
|
+
function ua(t) {
|
|
1595
|
+
if (Ht === setTimeout) return setTimeout(t, 0);
|
|
1596
|
+
if ((Ht === ca || !Ht) && setTimeout) return Ht = setTimeout, setTimeout(t, 0);
|
|
1597
|
+
try {
|
|
1598
|
+
return Ht(t, 0);
|
|
1599
|
+
} catch {
|
|
1600
|
+
try {
|
|
1601
|
+
return Ht.call(null, t, 0);
|
|
1602
|
+
} catch {
|
|
1603
|
+
return Ht.call(this, t, 0);
|
|
1604
|
+
}
|
|
1605
|
+
}
|
|
1606
|
+
}
|
|
1607
|
+
typeof Ce.setTimeout == "function" && (Ht = setTimeout), typeof Ce.clearTimeout == "function" && (Ft = clearTimeout);
|
|
1608
|
+
var se, Nt = [], Te = !1, pn = -1;
|
|
1609
|
+
function bo() {
|
|
1610
|
+
Te && se && (Te = !1, se.length ? Nt = se.concat(Nt) : pn = -1, Nt.length && da());
|
|
1611
|
+
}
|
|
1612
|
+
function da() {
|
|
1613
|
+
if (!Te) {
|
|
1614
|
+
var t = ua(bo);
|
|
1615
|
+
Te = !0;
|
|
1616
|
+
for (var e = Nt.length; e; ) {
|
|
1617
|
+
for (se = Nt, Nt = []; ++pn < e; ) se && se[pn].run();
|
|
1618
|
+
pn = -1, e = Nt.length;
|
|
1619
|
+
}
|
|
1620
|
+
se = null, Te = !1, (function(n) {
|
|
1621
|
+
if (Ft === clearTimeout) return clearTimeout(n);
|
|
1622
|
+
if ((Ft === fa || !Ft) && clearTimeout) return Ft = clearTimeout, clearTimeout(n);
|
|
1623
|
+
try {
|
|
1624
|
+
Ft(n);
|
|
1625
|
+
} catch {
|
|
1626
|
+
try {
|
|
1627
|
+
return Ft.call(null, n);
|
|
1628
|
+
} catch {
|
|
1629
|
+
return Ft.call(this, n);
|
|
1630
|
+
}
|
|
1631
|
+
}
|
|
1632
|
+
})(t);
|
|
1633
|
+
}
|
|
1634
|
+
}
|
|
1635
|
+
function ht(t) {
|
|
1636
|
+
var e = new Array(arguments.length - 1);
|
|
1637
|
+
if (arguments.length > 1) for (var n = 1; n < arguments.length; n++) e[n - 1] = arguments[n];
|
|
1638
|
+
Nt.push(new pa(t, e)), Nt.length !== 1 || Te || ua(da);
|
|
1639
|
+
}
|
|
1640
|
+
function pa(t, e) {
|
|
1641
|
+
this.fun = t, this.array = e;
|
|
1642
|
+
}
|
|
1643
|
+
pa.prototype.run = function() {
|
|
1644
|
+
this.fun.apply(null, this.array);
|
|
1645
|
+
};
|
|
1646
|
+
var Ne = Ce.performance || {};
|
|
1647
|
+
Ne.now || Ne.mozNow || Ne.msNow || Ne.oNow || Ne.webkitNow;
|
|
1648
|
+
function Zt() {
|
|
1649
|
+
}
|
|
1650
|
+
function G() {
|
|
1651
|
+
G.init.call(this);
|
|
1652
|
+
}
|
|
1653
|
+
function _a(t) {
|
|
1654
|
+
return t._maxListeners === void 0 ? G.defaultMaxListeners : t._maxListeners;
|
|
1655
|
+
}
|
|
1656
|
+
function ko(t, e, n) {
|
|
1657
|
+
if (e) t.call(n);
|
|
1658
|
+
else for (var r = t.length, a = tn(t, r), i = 0; i < r; ++i) a[i].call(n);
|
|
1659
|
+
}
|
|
1660
|
+
function Eo(t, e, n, r) {
|
|
1661
|
+
if (e) t.call(n, r);
|
|
1662
|
+
else for (var a = t.length, i = tn(t, a), s = 0; s < a; ++s) i[s].call(n, r);
|
|
1663
|
+
}
|
|
1664
|
+
function So(t, e, n, r, a) {
|
|
1665
|
+
if (e) t.call(n, r, a);
|
|
1666
|
+
else for (var i = t.length, s = tn(t, i), l = 0; l < i; ++l) s[l].call(n, r, a);
|
|
1667
|
+
}
|
|
1668
|
+
function xo(t, e, n, r, a, i) {
|
|
1669
|
+
if (e) t.call(n, r, a, i);
|
|
1670
|
+
else for (var s = t.length, l = tn(t, s), h = 0; h < s; ++h) l[h].call(n, r, a, i);
|
|
1671
|
+
}
|
|
1672
|
+
function Ro(t, e, n, r) {
|
|
1673
|
+
if (e) t.apply(n, r);
|
|
1674
|
+
else for (var a = t.length, i = tn(t, a), s = 0; s < a; ++s) i[s].apply(n, r);
|
|
1675
|
+
}
|
|
1676
|
+
function Wr(t, e, n, r) {
|
|
1677
|
+
var a, i, s, l;
|
|
1678
|
+
if (typeof n != "function") throw new TypeError('"listener" argument must be a function');
|
|
1679
|
+
if ((i = t._events) ? (i.newListener && (t.emit("newListener", e, n.listener ? n.listener : n), i = t._events), s = i[e]) : (i = t._events = new Zt(), t._eventsCount = 0), s) {
|
|
1680
|
+
if (typeof s == "function" ? s = i[e] = r ? [n, s] : [s, n] : r ? s.unshift(n) : s.push(n), !s.warned && (a = _a(t)) && a > 0 && s.length > a) {
|
|
1681
|
+
s.warned = !0;
|
|
1682
|
+
var h = new Error("Possible EventEmitter memory leak detected. " + s.length + " " + e + " listeners added. Use emitter.setMaxListeners() to increase limit");
|
|
1683
|
+
h.name = "MaxListenersExceededWarning", h.emitter = t, h.type = e, h.count = s.length, l = h, typeof console.warn == "function" ? console.warn(l) : console.log(l);
|
|
1684
|
+
}
|
|
1685
|
+
} else s = i[e] = n, ++t._eventsCount;
|
|
1686
|
+
return t;
|
|
1687
|
+
}
|
|
1688
|
+
function Yr(t, e, n) {
|
|
1689
|
+
var r = !1;
|
|
1690
|
+
function a() {
|
|
1691
|
+
t.removeListener(e, a), r || (r = !0, n.apply(t, arguments));
|
|
1692
|
+
}
|
|
1693
|
+
return a.listener = n, a;
|
|
1694
|
+
}
|
|
1695
|
+
function Kr(t) {
|
|
1696
|
+
var e = this._events;
|
|
1697
|
+
if (e) {
|
|
1698
|
+
var n = e[t];
|
|
1699
|
+
if (typeof n == "function") return 1;
|
|
1700
|
+
if (n) return n.length;
|
|
1701
|
+
}
|
|
1702
|
+
return 0;
|
|
1703
|
+
}
|
|
1704
|
+
function tn(t, e) {
|
|
1705
|
+
for (var n = new Array(e); e--; ) n[e] = t[e];
|
|
1706
|
+
return n;
|
|
1707
|
+
}
|
|
1708
|
+
Zt.prototype = /* @__PURE__ */ Object.create(null), G.EventEmitter = G, G.usingDomains = !1, G.prototype.domain = void 0, G.prototype._events = void 0, G.prototype._maxListeners = void 0, G.defaultMaxListeners = 10, G.init = function() {
|
|
1709
|
+
this.domain = null, G.usingDomains && (void 0).active && (void 0).Domain, this._events && this._events !== Object.getPrototypeOf(this)._events || (this._events = new Zt(), this._eventsCount = 0), this._maxListeners = this._maxListeners || void 0;
|
|
1710
|
+
}, G.prototype.setMaxListeners = function(t) {
|
|
1711
|
+
if (typeof t != "number" || t < 0 || isNaN(t)) throw new TypeError('"n" argument must be a positive number');
|
|
1712
|
+
return this._maxListeners = t, this;
|
|
1713
|
+
}, G.prototype.getMaxListeners = function() {
|
|
1714
|
+
return _a(this);
|
|
1715
|
+
}, G.prototype.emit = function(t) {
|
|
1716
|
+
var e, n, r, a, i, s, l, h = t === "error";
|
|
1717
|
+
if (s = this._events) h = h && s.error == null;
|
|
1718
|
+
else if (!h) return !1;
|
|
1719
|
+
if (l = this.domain, h) {
|
|
1720
|
+
if (e = arguments[1], !l) {
|
|
1721
|
+
if (e instanceof Error) throw e;
|
|
1722
|
+
var o = new Error('Uncaught, unspecified "error" event. (' + e + ")");
|
|
1723
|
+
throw o.context = e, o;
|
|
1724
|
+
}
|
|
1725
|
+
return e || (e = new Error('Uncaught, unspecified "error" event')), e.domainEmitter = this, e.domain = l, e.domainThrown = !1, l.emit("error", e), !1;
|
|
1726
|
+
}
|
|
1727
|
+
if (!(n = s[t])) return !1;
|
|
1728
|
+
var c = typeof n == "function";
|
|
1729
|
+
switch (r = arguments.length) {
|
|
1730
|
+
case 1:
|
|
1731
|
+
ko(n, c, this);
|
|
1732
|
+
break;
|
|
1733
|
+
case 2:
|
|
1734
|
+
Eo(n, c, this, arguments[1]);
|
|
1735
|
+
break;
|
|
1736
|
+
case 3:
|
|
1737
|
+
So(n, c, this, arguments[1], arguments[2]);
|
|
1738
|
+
break;
|
|
1739
|
+
case 4:
|
|
1740
|
+
xo(n, c, this, arguments[1], arguments[2], arguments[3]);
|
|
1741
|
+
break;
|
|
1742
|
+
default:
|
|
1743
|
+
for (a = new Array(r - 1), i = 1; i < r; i++) a[i - 1] = arguments[i];
|
|
1744
|
+
Ro(n, c, this, a);
|
|
1745
|
+
}
|
|
1746
|
+
return !0;
|
|
1747
|
+
}, G.prototype.addListener = function(t, e) {
|
|
1748
|
+
return Wr(this, t, e, !1);
|
|
1749
|
+
}, G.prototype.on = G.prototype.addListener, G.prototype.prependListener = function(t, e) {
|
|
1750
|
+
return Wr(this, t, e, !0);
|
|
1751
|
+
}, G.prototype.once = function(t, e) {
|
|
1752
|
+
if (typeof e != "function") throw new TypeError('"listener" argument must be a function');
|
|
1753
|
+
return this.on(t, Yr(this, t, e)), this;
|
|
1754
|
+
}, G.prototype.prependOnceListener = function(t, e) {
|
|
1755
|
+
if (typeof e != "function") throw new TypeError('"listener" argument must be a function');
|
|
1756
|
+
return this.prependListener(t, Yr(this, t, e)), this;
|
|
1757
|
+
}, G.prototype.removeListener = function(t, e) {
|
|
1758
|
+
var n, r, a, i, s;
|
|
1759
|
+
if (typeof e != "function") throw new TypeError('"listener" argument must be a function');
|
|
1760
|
+
if (!(r = this._events)) return this;
|
|
1761
|
+
if (!(n = r[t])) return this;
|
|
1762
|
+
if (n === e || n.listener && n.listener === e) --this._eventsCount == 0 ? this._events = new Zt() : (delete r[t], r.removeListener && this.emit("removeListener", t, n.listener || e));
|
|
1763
|
+
else if (typeof n != "function") {
|
|
1764
|
+
for (a = -1, i = n.length; i-- > 0; ) if (n[i] === e || n[i].listener && n[i].listener === e) {
|
|
1765
|
+
s = n[i].listener, a = i;
|
|
1766
|
+
break;
|
|
1767
|
+
}
|
|
1768
|
+
if (a < 0) return this;
|
|
1769
|
+
if (n.length === 1) {
|
|
1770
|
+
if (n[0] = void 0, --this._eventsCount == 0) return this._events = new Zt(), this;
|
|
1771
|
+
delete r[t];
|
|
1772
|
+
} else (function(l, h) {
|
|
1773
|
+
for (var o = h, c = o + 1, u = l.length; c < u; o += 1, c += 1) l[o] = l[c];
|
|
1774
|
+
l.pop();
|
|
1775
|
+
})(n, a);
|
|
1776
|
+
r.removeListener && this.emit("removeListener", t, s || e);
|
|
1777
|
+
}
|
|
1778
|
+
return this;
|
|
1779
|
+
}, G.prototype.removeAllListeners = function(t) {
|
|
1780
|
+
var e, n;
|
|
1781
|
+
if (!(n = this._events)) return this;
|
|
1782
|
+
if (!n.removeListener) return arguments.length === 0 ? (this._events = new Zt(), this._eventsCount = 0) : n[t] && (--this._eventsCount == 0 ? this._events = new Zt() : delete n[t]), this;
|
|
1783
|
+
if (arguments.length === 0) {
|
|
1784
|
+
for (var r, a = Object.keys(n), i = 0; i < a.length; ++i) (r = a[i]) !== "removeListener" && this.removeAllListeners(r);
|
|
1785
|
+
return this.removeAllListeners("removeListener"), this._events = new Zt(), this._eventsCount = 0, this;
|
|
1786
|
+
}
|
|
1787
|
+
if (typeof (e = n[t]) == "function") this.removeListener(t, e);
|
|
1788
|
+
else if (e) do
|
|
1789
|
+
this.removeListener(t, e[e.length - 1]);
|
|
1790
|
+
while (e[0]);
|
|
1791
|
+
return this;
|
|
1792
|
+
}, G.prototype.listeners = function(t) {
|
|
1793
|
+
var e, n = this._events;
|
|
1794
|
+
return n && (e = n[t]) ? typeof e == "function" ? [e.listener || e] : (function(r) {
|
|
1795
|
+
for (var a = new Array(r.length), i = 0; i < a.length; ++i) a[i] = r[i].listener || r[i];
|
|
1796
|
+
return a;
|
|
1797
|
+
})(e) : [];
|
|
1798
|
+
}, G.listenerCount = function(t, e) {
|
|
1799
|
+
return typeof t.listenerCount == "function" ? t.listenerCount(e) : Kr.call(t, e);
|
|
1800
|
+
}, G.prototype.listenerCount = Kr, G.prototype.eventNames = function() {
|
|
1801
|
+
return this._eventsCount > 0 ? Reflect.ownKeys(this._events) : [];
|
|
1802
|
+
};
|
|
1803
|
+
var gt = typeof Object.create == "function" ? function(t, e) {
|
|
1804
|
+
t.super_ = e, t.prototype = Object.create(e.prototype, { constructor: { value: t, enumerable: !1, writable: !0, configurable: !0 } });
|
|
1805
|
+
} : function(t, e) {
|
|
1806
|
+
t.super_ = e;
|
|
1807
|
+
var n = function() {
|
|
1808
|
+
};
|
|
1809
|
+
n.prototype = e.prototype, t.prototype = new n(), t.prototype.constructor = t;
|
|
1810
|
+
}, Ao = /%[sdj%]/g;
|
|
1811
|
+
function Bo(t) {
|
|
1812
|
+
if (!rr(t)) {
|
|
1813
|
+
for (var e = [], n = 0; n < arguments.length; n++) e.push(Gt(arguments[n]));
|
|
1814
|
+
return e.join(" ");
|
|
1815
|
+
}
|
|
1816
|
+
n = 1;
|
|
1817
|
+
for (var r = arguments, a = r.length, i = String(t).replace(Ao, function(l) {
|
|
1818
|
+
if (l === "%%") return "%";
|
|
1819
|
+
if (n >= a) return l;
|
|
1820
|
+
switch (l) {
|
|
1821
|
+
case "%s":
|
|
1822
|
+
return String(r[n++]);
|
|
1823
|
+
case "%d":
|
|
1824
|
+
return Number(r[n++]);
|
|
1825
|
+
case "%j":
|
|
1826
|
+
try {
|
|
1827
|
+
return JSON.stringify(r[n++]);
|
|
1828
|
+
} catch {
|
|
1829
|
+
return "[Circular]";
|
|
1830
|
+
}
|
|
1831
|
+
default:
|
|
1832
|
+
return l;
|
|
1833
|
+
}
|
|
1834
|
+
}), s = r[n]; n < a; s = r[++n]) dr(s) || !en(s) ? i += " " + s : i += " " + Gt(s);
|
|
1835
|
+
return i;
|
|
1836
|
+
}
|
|
1837
|
+
function ga(t, e) {
|
|
1838
|
+
if (Wt(Ce.process)) return function() {
|
|
1839
|
+
return ga(t, e).apply(this, arguments);
|
|
1840
|
+
};
|
|
1841
|
+
var n = !1;
|
|
1842
|
+
return function() {
|
|
1843
|
+
return n || (console.error(e), n = !0), t.apply(this, arguments);
|
|
1844
|
+
};
|
|
1845
|
+
}
|
|
1846
|
+
var In, sn = {};
|
|
1847
|
+
function Gt(t, e) {
|
|
1848
|
+
var n = { seen: [], stylize: Lo };
|
|
1849
|
+
return arguments.length >= 3 && (n.depth = arguments[2]), arguments.length >= 4 && (n.colors = arguments[3]), va(e) ? n.showHidden = e : e && (function(r, a) {
|
|
1850
|
+
if (!a || !en(a)) return r;
|
|
1851
|
+
for (var i = Object.keys(a), s = i.length; s--; ) r[i[s]] = a[i[s]];
|
|
1852
|
+
})(n, e), Wt(n.showHidden) && (n.showHidden = !1), Wt(n.depth) && (n.depth = 2), Wt(n.colors) && (n.colors = !1), Wt(n.customInspect) && (n.customInspect = !0), n.colors && (n.stylize = To), kn(n, t, n.depth);
|
|
1853
|
+
}
|
|
1854
|
+
function To(t, e) {
|
|
1855
|
+
var n = Gt.styles[e];
|
|
1856
|
+
return n ? "\x1B[" + Gt.colors[n][0] + "m" + t + "\x1B[" + Gt.colors[n][1] + "m" : t;
|
|
1857
|
+
}
|
|
1858
|
+
function Lo(t, e) {
|
|
1859
|
+
return t;
|
|
1860
|
+
}
|
|
1861
|
+
function kn(t, e, n) {
|
|
1862
|
+
if (t.customInspect && e && Un(e.inspect) && e.inspect !== Gt && (!e.constructor || e.constructor.prototype !== e)) {
|
|
1863
|
+
var r = e.inspect(n, t);
|
|
1864
|
+
return rr(r) || (r = kn(t, r, n)), r;
|
|
1865
|
+
}
|
|
1866
|
+
var a = (function(f, _) {
|
|
1867
|
+
if (Wt(_)) return f.stylize("undefined", "undefined");
|
|
1868
|
+
if (rr(_)) {
|
|
1869
|
+
var g = "'" + JSON.stringify(_).replace(/^"|"$/g, "").replace(/'/g, "\\'").replace(/\\"/g, '"') + "'";
|
|
1870
|
+
return f.stylize(g, "string");
|
|
1871
|
+
}
|
|
1872
|
+
if (d = _, typeof d == "number") return f.stylize("" + _, "number");
|
|
1873
|
+
var d;
|
|
1874
|
+
if (va(_)) return f.stylize("" + _, "boolean");
|
|
1875
|
+
if (dr(_)) return f.stylize("null", "null");
|
|
1876
|
+
})(t, e);
|
|
1877
|
+
if (a) return a;
|
|
1878
|
+
var i = Object.keys(e), s = (function(f) {
|
|
1879
|
+
var _ = {};
|
|
1880
|
+
return f.forEach(function(g, d) {
|
|
1881
|
+
_[g] = !0;
|
|
1882
|
+
}), _;
|
|
1883
|
+
})(i);
|
|
1884
|
+
if (t.showHidden && (i = Object.getOwnPropertyNames(e)), On(e) && (i.indexOf("message") >= 0 || i.indexOf("description") >= 0)) return Mn(e);
|
|
1885
|
+
if (i.length === 0) {
|
|
1886
|
+
if (Un(e)) {
|
|
1887
|
+
var l = e.name ? ": " + e.name : "";
|
|
1888
|
+
return t.stylize("[Function" + l + "]", "special");
|
|
1889
|
+
}
|
|
1890
|
+
if (Pn(e)) return t.stylize(RegExp.prototype.toString.call(e), "regexp");
|
|
1891
|
+
if (Gr(e)) return t.stylize(Date.prototype.toString.call(e), "date");
|
|
1892
|
+
if (On(e)) return Mn(e);
|
|
1893
|
+
}
|
|
1894
|
+
var h, o, c = "", u = !1, p = ["{", "}"];
|
|
1895
|
+
return h = e, Array.isArray(h) && (u = !0, p = ["[", "]"]), Un(e) && (c = " [Function" + (e.name ? ": " + e.name : "") + "]"), Pn(e) && (c = " " + RegExp.prototype.toString.call(e)), Gr(e) && (c = " " + Date.prototype.toUTCString.call(e)), On(e) && (c = " " + Mn(e)), i.length !== 0 || u && e.length != 0 ? n < 0 ? Pn(e) ? t.stylize(RegExp.prototype.toString.call(e), "regexp") : t.stylize("[Object]", "special") : (t.seen.push(e), o = u ? (function(f, _, g, d, v) {
|
|
1896
|
+
for (var w = [], m = 0, y = _.length; m < y; ++m) wa(_, String(m)) ? w.push(Dn(f, _, g, d, String(m), !0)) : w.push("");
|
|
1897
|
+
return v.forEach(function(x) {
|
|
1898
|
+
x.match(/^\d+$/) || w.push(Dn(f, _, g, d, x, !0));
|
|
1899
|
+
}), w;
|
|
1900
|
+
})(t, e, n, s, i) : i.map(function(f) {
|
|
1901
|
+
return Dn(t, e, n, s, f, u);
|
|
1902
|
+
}), t.seen.pop(), (function(f, _, g) {
|
|
1903
|
+
return f.reduce(function(d, v) {
|
|
1904
|
+
return v.indexOf(`
|
|
1905
|
+
`), d + v.replace(/\u001b\[\d\d?m/g, "").length + 1;
|
|
1906
|
+
}, 0) > 60 ? g[0] + (_ === "" ? "" : _ + `
|
|
1907
|
+
`) + " " + f.join(`,
|
|
1908
|
+
`) + " " + g[1] : g[0] + _ + " " + f.join(", ") + " " + g[1];
|
|
1909
|
+
})(o, c, p)) : p[0] + c + p[1];
|
|
1910
|
+
}
|
|
1911
|
+
function Mn(t) {
|
|
1912
|
+
return "[" + Error.prototype.toString.call(t) + "]";
|
|
1913
|
+
}
|
|
1914
|
+
function Dn(t, e, n, r, a, i) {
|
|
1915
|
+
var s, l, h;
|
|
1916
|
+
if ((h = Object.getOwnPropertyDescriptor(e, a) || { value: e[a] }).get ? l = h.set ? t.stylize("[Getter/Setter]", "special") : t.stylize("[Getter]", "special") : h.set && (l = t.stylize("[Setter]", "special")), wa(r, a) || (s = "[" + a + "]"), l || (t.seen.indexOf(h.value) < 0 ? (l = dr(n) ? kn(t, h.value, null) : kn(t, h.value, n - 1)).indexOf(`
|
|
1917
|
+
`) > -1 && (l = i ? l.split(`
|
|
1918
|
+
`).map(function(o) {
|
|
1919
|
+
return " " + o;
|
|
1920
|
+
}).join(`
|
|
1921
|
+
`).substr(2) : `
|
|
1922
|
+
` + l.split(`
|
|
1923
|
+
`).map(function(o) {
|
|
1924
|
+
return " " + o;
|
|
1925
|
+
}).join(`
|
|
1926
|
+
`)) : l = t.stylize("[Circular]", "special")), Wt(s)) {
|
|
1927
|
+
if (i && a.match(/^\d+$/)) return l;
|
|
1928
|
+
(s = JSON.stringify("" + a)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/) ? (s = s.substr(1, s.length - 2), s = t.stylize(s, "name")) : (s = s.replace(/'/g, "\\'").replace(/\\"/g, '"').replace(/(^"|"$)/g, "'"), s = t.stylize(s, "string"));
|
|
1929
|
+
}
|
|
1930
|
+
return s + ": " + l;
|
|
1931
|
+
}
|
|
1932
|
+
function va(t) {
|
|
1933
|
+
return typeof t == "boolean";
|
|
1934
|
+
}
|
|
1935
|
+
function dr(t) {
|
|
1936
|
+
return t === null;
|
|
1937
|
+
}
|
|
1938
|
+
function rr(t) {
|
|
1939
|
+
return typeof t == "string";
|
|
1940
|
+
}
|
|
1941
|
+
function Wt(t) {
|
|
1942
|
+
return t === void 0;
|
|
1943
|
+
}
|
|
1944
|
+
function Pn(t) {
|
|
1945
|
+
return en(t) && pr(t) === "[object RegExp]";
|
|
1946
|
+
}
|
|
1947
|
+
function en(t) {
|
|
1948
|
+
return typeof t == "object" && t !== null;
|
|
1949
|
+
}
|
|
1950
|
+
function Gr(t) {
|
|
1951
|
+
return en(t) && pr(t) === "[object Date]";
|
|
1952
|
+
}
|
|
1953
|
+
function On(t) {
|
|
1954
|
+
return en(t) && (pr(t) === "[object Error]" || t instanceof Error);
|
|
1955
|
+
}
|
|
1956
|
+
function Un(t) {
|
|
1957
|
+
return typeof t == "function";
|
|
1958
|
+
}
|
|
1959
|
+
function pr(t) {
|
|
1960
|
+
return Object.prototype.toString.call(t);
|
|
1961
|
+
}
|
|
1962
|
+
function wa(t, e) {
|
|
1963
|
+
return Object.prototype.hasOwnProperty.call(t, e);
|
|
1964
|
+
}
|
|
1965
|
+
function ie() {
|
|
1966
|
+
this.head = null, this.tail = null, this.length = 0;
|
|
1967
|
+
}
|
|
1968
|
+
Gt.colors = { bold: [1, 22], italic: [3, 23], underline: [4, 24], inverse: [7, 27], white: [37, 39], grey: [90, 39], black: [30, 39], blue: [34, 39], cyan: [36, 39], green: [32, 39], magenta: [35, 39], red: [31, 39], yellow: [33, 39] }, Gt.styles = { special: "cyan", number: "yellow", boolean: "yellow", undefined: "grey", null: "bold", string: "green", date: "magenta", regexp: "red" }, ie.prototype.push = function(t) {
|
|
1969
|
+
var e = { data: t, next: null };
|
|
1970
|
+
this.length > 0 ? this.tail.next = e : this.head = e, this.tail = e, ++this.length;
|
|
1971
|
+
}, ie.prototype.unshift = function(t) {
|
|
1972
|
+
var e = { data: t, next: this.head };
|
|
1973
|
+
this.length === 0 && (this.tail = e), this.head = e, ++this.length;
|
|
1974
|
+
}, ie.prototype.shift = function() {
|
|
1975
|
+
if (this.length !== 0) {
|
|
1976
|
+
var t = this.head.data;
|
|
1977
|
+
return this.length === 1 ? this.head = this.tail = null : this.head = this.head.next, --this.length, t;
|
|
1978
|
+
}
|
|
1979
|
+
}, ie.prototype.clear = function() {
|
|
1980
|
+
this.head = this.tail = null, this.length = 0;
|
|
1981
|
+
}, ie.prototype.join = function(t) {
|
|
1982
|
+
if (this.length === 0) return "";
|
|
1983
|
+
for (var e = this.head, n = "" + e.data; e = e.next; ) n += t + e.data;
|
|
1984
|
+
return n;
|
|
1985
|
+
}, ie.prototype.concat = function(t) {
|
|
1986
|
+
if (this.length === 0) return A.alloc(0);
|
|
1987
|
+
if (this.length === 1) return this.head.data;
|
|
1988
|
+
for (var e = A.allocUnsafe(t >>> 0), n = this.head, r = 0; n; ) n.data.copy(e, r), r += n.data.length, n = n.next;
|
|
1989
|
+
return e;
|
|
1990
|
+
};
|
|
1991
|
+
var zo = A.isEncoding || function(t) {
|
|
1992
|
+
switch (t && t.toLowerCase()) {
|
|
1993
|
+
case "hex":
|
|
1994
|
+
case "utf8":
|
|
1995
|
+
case "utf-8":
|
|
1996
|
+
case "ascii":
|
|
1997
|
+
case "binary":
|
|
1998
|
+
case "base64":
|
|
1999
|
+
case "ucs2":
|
|
2000
|
+
case "ucs-2":
|
|
2001
|
+
case "utf16le":
|
|
2002
|
+
case "utf-16le":
|
|
2003
|
+
case "raw":
|
|
2004
|
+
return !0;
|
|
2005
|
+
default:
|
|
2006
|
+
return !1;
|
|
2007
|
+
}
|
|
2008
|
+
};
|
|
2009
|
+
function Ze(t) {
|
|
2010
|
+
switch (this.encoding = (t || "utf8").toLowerCase().replace(/[-_]/, ""), (function(e) {
|
|
2011
|
+
if (e && !zo(e)) throw new Error("Unknown encoding: " + e);
|
|
2012
|
+
})(t), this.encoding) {
|
|
2013
|
+
case "utf8":
|
|
2014
|
+
this.surrogateSize = 3;
|
|
2015
|
+
break;
|
|
2016
|
+
case "ucs2":
|
|
2017
|
+
case "utf16le":
|
|
2018
|
+
this.surrogateSize = 2, this.detectIncompleteChar = Io;
|
|
2019
|
+
break;
|
|
2020
|
+
case "base64":
|
|
2021
|
+
this.surrogateSize = 3, this.detectIncompleteChar = Mo;
|
|
2022
|
+
break;
|
|
2023
|
+
default:
|
|
2024
|
+
return void (this.write = Co);
|
|
2025
|
+
}
|
|
2026
|
+
this.charBuffer = new A(6), this.charReceived = 0, this.charLength = 0;
|
|
2027
|
+
}
|
|
2028
|
+
function Co(t) {
|
|
2029
|
+
return t.toString(this.encoding);
|
|
2030
|
+
}
|
|
2031
|
+
function Io(t) {
|
|
2032
|
+
this.charReceived = t.length % 2, this.charLength = this.charReceived ? 2 : 0;
|
|
2033
|
+
}
|
|
2034
|
+
function Mo(t) {
|
|
2035
|
+
this.charReceived = t.length % 3, this.charLength = this.charReceived ? 3 : 0;
|
|
2036
|
+
}
|
|
2037
|
+
Ze.prototype.write = function(t) {
|
|
2038
|
+
for (var e = ""; this.charLength; ) {
|
|
2039
|
+
var n = t.length >= this.charLength - this.charReceived ? this.charLength - this.charReceived : t.length;
|
|
2040
|
+
if (t.copy(this.charBuffer, this.charReceived, 0, n), this.charReceived += n, this.charReceived < this.charLength) return "";
|
|
2041
|
+
if (t = t.slice(n, t.length), !((a = (e = this.charBuffer.slice(0, this.charLength).toString(this.encoding)).charCodeAt(e.length - 1)) >= 55296 && a <= 56319)) {
|
|
2042
|
+
if (this.charReceived = this.charLength = 0, t.length === 0) return e;
|
|
2043
|
+
break;
|
|
2044
|
+
}
|
|
2045
|
+
this.charLength += this.surrogateSize, e = "";
|
|
2046
|
+
}
|
|
2047
|
+
this.detectIncompleteChar(t);
|
|
2048
|
+
var r = t.length;
|
|
2049
|
+
this.charLength && (t.copy(this.charBuffer, 0, t.length - this.charReceived, r), r -= this.charReceived);
|
|
2050
|
+
var a;
|
|
2051
|
+
if (r = (e += t.toString(this.encoding, 0, r)).length - 1, (a = e.charCodeAt(r)) >= 55296 && a <= 56319) {
|
|
2052
|
+
var i = this.surrogateSize;
|
|
2053
|
+
return this.charLength += i, this.charReceived += i, this.charBuffer.copy(this.charBuffer, i, 0, i), t.copy(this.charBuffer, 0, 0, i), e.substring(0, r);
|
|
2054
|
+
}
|
|
2055
|
+
return e;
|
|
2056
|
+
}, Ze.prototype.detectIncompleteChar = function(t) {
|
|
2057
|
+
for (var e = t.length >= 3 ? 3 : t.length; e > 0; e--) {
|
|
2058
|
+
var n = t[t.length - e];
|
|
2059
|
+
if (e == 1 && n >> 5 == 6) {
|
|
2060
|
+
this.charLength = 2;
|
|
2061
|
+
break;
|
|
2062
|
+
}
|
|
2063
|
+
if (e <= 2 && n >> 4 == 14) {
|
|
2064
|
+
this.charLength = 3;
|
|
2065
|
+
break;
|
|
2066
|
+
}
|
|
2067
|
+
if (e <= 3 && n >> 3 == 30) {
|
|
2068
|
+
this.charLength = 4;
|
|
2069
|
+
break;
|
|
2070
|
+
}
|
|
2071
|
+
}
|
|
2072
|
+
this.charReceived = e;
|
|
2073
|
+
}, Ze.prototype.end = function(t) {
|
|
2074
|
+
var e = "";
|
|
2075
|
+
if (t && t.length && (e = this.write(t)), this.charReceived) {
|
|
2076
|
+
var n = this.charReceived, r = this.charBuffer, a = this.encoding;
|
|
2077
|
+
e += r.slice(0, n).toString(a);
|
|
2078
|
+
}
|
|
2079
|
+
return e;
|
|
2080
|
+
}, rt.ReadableState = ma;
|
|
2081
|
+
var J = (function(t) {
|
|
2082
|
+
return Wt(In) && (In = ""), t = t.toUpperCase(), sn[t] || (new RegExp("\\b" + t + "\\b", "i").test(In) ? sn[t] = function() {
|
|
2083
|
+
var e = Bo.apply(null, arguments);
|
|
2084
|
+
console.error("%s %d: %s", t, 0, e);
|
|
2085
|
+
} : sn[t] = function() {
|
|
2086
|
+
}), sn[t];
|
|
2087
|
+
})("stream");
|
|
2088
|
+
function ma(t, e) {
|
|
2089
|
+
t = t || {}, this.objectMode = !!t.objectMode, e instanceof xt && (this.objectMode = this.objectMode || !!t.readableObjectMode);
|
|
2090
|
+
var n = t.highWaterMark, r = this.objectMode ? 16 : 16384;
|
|
2091
|
+
this.highWaterMark = n || n === 0 ? n : r, this.highWaterMark = ~~this.highWaterMark, this.buffer = new ie(), this.length = 0, this.pipes = null, this.pipesCount = 0, this.flowing = null, this.ended = !1, this.endEmitted = !1, this.reading = !1, this.sync = !0, this.needReadable = !1, this.emittedReadable = !1, this.readableListening = !1, this.resumeScheduled = !1, this.defaultEncoding = t.defaultEncoding || "utf8", this.ranOut = !1, this.awaitDrain = 0, this.readingMore = !1, this.decoder = null, this.encoding = null, t.encoding && (this.decoder = new Ze(t.encoding), this.encoding = t.encoding);
|
|
2092
|
+
}
|
|
2093
|
+
function rt(t) {
|
|
2094
|
+
if (!(this instanceof rt)) return new rt(t);
|
|
2095
|
+
this._readableState = new ma(t, this), this.readable = !0, t && typeof t.read == "function" && (this._read = t.read), G.call(this);
|
|
2096
|
+
}
|
|
2097
|
+
function qr(t, e, n, r, a) {
|
|
2098
|
+
var i = (function(o, c) {
|
|
2099
|
+
var u = null;
|
|
2100
|
+
return Qe(c) || typeof c == "string" || c == null || o.objectMode || (u = new TypeError("Invalid non-string/buffer chunk")), u;
|
|
2101
|
+
})(e, n);
|
|
2102
|
+
if (i) t.emit("error", i);
|
|
2103
|
+
else if (n === null) e.reading = !1, (function(o, c) {
|
|
2104
|
+
if (!c.ended) {
|
|
2105
|
+
if (c.decoder) {
|
|
2106
|
+
var u = c.decoder.end();
|
|
2107
|
+
u && u.length && (c.buffer.push(u), c.length += c.objectMode ? 1 : u.length);
|
|
2108
|
+
}
|
|
2109
|
+
c.ended = !0, En(o);
|
|
2110
|
+
}
|
|
2111
|
+
})(t, e);
|
|
2112
|
+
else if (e.objectMode || n && n.length > 0) if (e.ended && !a) {
|
|
2113
|
+
var s = new Error("stream.push() after EOF");
|
|
2114
|
+
t.emit("error", s);
|
|
2115
|
+
} else if (e.endEmitted && a) {
|
|
2116
|
+
var l = new Error("stream.unshift() after end event");
|
|
2117
|
+
t.emit("error", l);
|
|
2118
|
+
} else {
|
|
2119
|
+
var h;
|
|
2120
|
+
!e.decoder || a || r || (n = e.decoder.write(n), h = !e.objectMode && n.length === 0), a || (e.reading = !1), h || (e.flowing && e.length === 0 && !e.sync ? (t.emit("data", n), t.read(0)) : (e.length += e.objectMode ? 1 : n.length, a ? e.buffer.unshift(n) : e.buffer.push(n), e.needReadable && En(t))), (function(o, c) {
|
|
2121
|
+
c.readingMore || (c.readingMore = !0, ht(Do, o, c));
|
|
2122
|
+
})(t, e);
|
|
2123
|
+
}
|
|
2124
|
+
else a || (e.reading = !1);
|
|
2125
|
+
return (function(o) {
|
|
2126
|
+
return !o.ended && (o.needReadable || o.length < o.highWaterMark || o.length === 0);
|
|
2127
|
+
})(e);
|
|
2128
|
+
}
|
|
2129
|
+
gt(rt, G), rt.prototype.push = function(t, e) {
|
|
2130
|
+
var n = this._readableState;
|
|
2131
|
+
return n.objectMode || typeof t != "string" || (e = e || n.defaultEncoding) !== n.encoding && (t = A.from(t, e), e = ""), qr(this, n, t, e, !1);
|
|
2132
|
+
}, rt.prototype.unshift = function(t) {
|
|
2133
|
+
return qr(this, this._readableState, t, "", !0);
|
|
2134
|
+
}, rt.prototype.isPaused = function() {
|
|
2135
|
+
return this._readableState.flowing === !1;
|
|
2136
|
+
}, rt.prototype.setEncoding = function(t) {
|
|
2137
|
+
return this._readableState.decoder = new Ze(t), this._readableState.encoding = t, this;
|
|
2138
|
+
};
|
|
2139
|
+
var Xr = 8388608;
|
|
2140
|
+
function $r(t, e) {
|
|
2141
|
+
return t <= 0 || e.length === 0 && e.ended ? 0 : e.objectMode ? 1 : t != t ? e.flowing && e.length ? e.buffer.head.data.length : e.length : (t > e.highWaterMark && (e.highWaterMark = (function(n) {
|
|
2142
|
+
return n >= Xr ? n = Xr : (n--, n |= n >>> 1, n |= n >>> 2, n |= n >>> 4, n |= n >>> 8, n |= n >>> 16, n++), n;
|
|
2143
|
+
})(t)), t <= e.length ? t : e.ended ? e.length : (e.needReadable = !0, 0));
|
|
2144
|
+
}
|
|
2145
|
+
function En(t) {
|
|
2146
|
+
var e = t._readableState;
|
|
2147
|
+
e.needReadable = !1, e.emittedReadable || (J("emitReadable", e.flowing), e.emittedReadable = !0, e.sync ? ht(Jr, t) : Jr(t));
|
|
2148
|
+
}
|
|
2149
|
+
function Jr(t) {
|
|
2150
|
+
J("emit readable"), t.emit("readable"), _r(t);
|
|
2151
|
+
}
|
|
2152
|
+
function Do(t, e) {
|
|
2153
|
+
for (var n = e.length; !e.reading && !e.flowing && !e.ended && e.length < e.highWaterMark && (J("maybeReadMore read 0"), t.read(0), n !== e.length); ) n = e.length;
|
|
2154
|
+
e.readingMore = !1;
|
|
2155
|
+
}
|
|
2156
|
+
function Po(t) {
|
|
2157
|
+
J("readable nexttick read 0"), t.read(0);
|
|
2158
|
+
}
|
|
2159
|
+
function Oo(t, e) {
|
|
2160
|
+
e.reading || (J("resume read 0"), t.read(0)), e.resumeScheduled = !1, e.awaitDrain = 0, t.emit("resume"), _r(t), e.flowing && !e.reading && t.read(0);
|
|
2161
|
+
}
|
|
2162
|
+
function _r(t) {
|
|
2163
|
+
var e = t._readableState;
|
|
2164
|
+
for (J("flow", e.flowing); e.flowing && t.read() !== null; ) ;
|
|
2165
|
+
}
|
|
2166
|
+
function Qr(t, e) {
|
|
2167
|
+
return e.length === 0 ? null : (e.objectMode ? n = e.buffer.shift() : !t || t >= e.length ? (n = e.decoder ? e.buffer.join("") : e.buffer.length === 1 ? e.buffer.head.data : e.buffer.concat(e.length), e.buffer.clear()) : n = (function(r, a, i) {
|
|
2168
|
+
var s;
|
|
2169
|
+
return r < a.head.data.length ? (s = a.head.data.slice(0, r), a.head.data = a.head.data.slice(r)) : s = r === a.head.data.length ? a.shift() : i ? (function(l, h) {
|
|
2170
|
+
var o = h.head, c = 1, u = o.data;
|
|
2171
|
+
for (l -= u.length; o = o.next; ) {
|
|
2172
|
+
var p = o.data, f = l > p.length ? p.length : l;
|
|
2173
|
+
if (f === p.length ? u += p : u += p.slice(0, l), (l -= f) === 0) {
|
|
2174
|
+
f === p.length ? (++c, o.next ? h.head = o.next : h.head = h.tail = null) : (h.head = o, o.data = p.slice(f));
|
|
2175
|
+
break;
|
|
2176
|
+
}
|
|
2177
|
+
++c;
|
|
2178
|
+
}
|
|
2179
|
+
return h.length -= c, u;
|
|
2180
|
+
})(r, a) : (function(l, h) {
|
|
2181
|
+
var o = A.allocUnsafe(l), c = h.head, u = 1;
|
|
2182
|
+
for (c.data.copy(o), l -= c.data.length; c = c.next; ) {
|
|
2183
|
+
var p = c.data, f = l > p.length ? p.length : l;
|
|
2184
|
+
if (p.copy(o, o.length - l, 0, f), (l -= f) === 0) {
|
|
2185
|
+
f === p.length ? (++u, c.next ? h.head = c.next : h.head = h.tail = null) : (h.head = c, c.data = p.slice(f));
|
|
2186
|
+
break;
|
|
2187
|
+
}
|
|
2188
|
+
++u;
|
|
2189
|
+
}
|
|
2190
|
+
return h.length -= u, o;
|
|
2191
|
+
})(r, a), s;
|
|
2192
|
+
})(t, e.buffer, e.decoder), n);
|
|
2193
|
+
var n;
|
|
2194
|
+
}
|
|
2195
|
+
function Nn(t) {
|
|
2196
|
+
var e = t._readableState;
|
|
2197
|
+
if (e.length > 0) throw new Error('"endReadable()" called on non-empty stream');
|
|
2198
|
+
e.endEmitted || (e.ended = !0, ht(Uo, e, t));
|
|
2199
|
+
}
|
|
2200
|
+
function Uo(t, e) {
|
|
2201
|
+
t.endEmitted || t.length !== 0 || (t.endEmitted = !0, e.readable = !1, e.emit("end"));
|
|
2202
|
+
}
|
|
2203
|
+
function ti(t, e) {
|
|
2204
|
+
for (var n = 0, r = t.length; n < r; n++) if (t[n] === e) return n;
|
|
2205
|
+
return -1;
|
|
2206
|
+
}
|
|
2207
|
+
function No() {
|
|
2208
|
+
}
|
|
2209
|
+
function Ho(t, e, n) {
|
|
2210
|
+
this.chunk = t, this.encoding = e, this.callback = n, this.next = null;
|
|
2211
|
+
}
|
|
2212
|
+
function ir(t, e) {
|
|
2213
|
+
Object.defineProperty(this, "buffer", { get: ga(function() {
|
|
2214
|
+
return this.getBuffer();
|
|
2215
|
+
}, "_writableState.buffer is deprecated. Use _writableState.getBuffer instead.") }), t = t || {}, this.objectMode = !!t.objectMode, e instanceof xt && (this.objectMode = this.objectMode || !!t.writableObjectMode);
|
|
2216
|
+
var n = t.highWaterMark, r = this.objectMode ? 16 : 16384;
|
|
2217
|
+
this.highWaterMark = n || n === 0 ? n : r, this.highWaterMark = ~~this.highWaterMark, this.needDrain = !1, this.ending = !1, this.ended = !1, this.finished = !1;
|
|
2218
|
+
var a = t.decodeStrings === !1;
|
|
2219
|
+
this.decodeStrings = !a, this.defaultEncoding = t.defaultEncoding || "utf8", this.length = 0, this.writing = !1, this.corked = 0, this.sync = !0, this.bufferProcessing = !1, this.onwrite = function(i) {
|
|
2220
|
+
(function(s, l) {
|
|
2221
|
+
var h = s._writableState, o = h.sync, c = h.writecb;
|
|
2222
|
+
if ((function(p) {
|
|
2223
|
+
p.writing = !1, p.writecb = null, p.length -= p.writelen, p.writelen = 0;
|
|
2224
|
+
})(h), l) (function(p, f, _, g, d) {
|
|
2225
|
+
--f.pendingcb, _ ? ht(d, g) : d(g), p._writableState.errorEmitted = !0, p.emit("error", g);
|
|
2226
|
+
})(s, h, o, l, c);
|
|
2227
|
+
else {
|
|
2228
|
+
var u = ba(h);
|
|
2229
|
+
u || h.corked || h.bufferProcessing || !h.bufferedRequest || ya(s, h), o ? ht(ei, s, h, u, c) : ei(s, h, u, c);
|
|
2230
|
+
}
|
|
2231
|
+
})(e, i);
|
|
2232
|
+
}, this.writecb = null, this.writelen = 0, this.bufferedRequest = null, this.lastBufferedRequest = null, this.pendingcb = 0, this.prefinished = !1, this.errorEmitted = !1, this.bufferedRequestCount = 0, this.corkedRequestsFree = new Ea(this);
|
|
2233
|
+
}
|
|
2234
|
+
function ut(t) {
|
|
2235
|
+
if (!(this instanceof ut || this instanceof xt)) return new ut(t);
|
|
2236
|
+
this._writableState = new ir(t, this), this.writable = !0, t && (typeof t.write == "function" && (this._write = t.write), typeof t.writev == "function" && (this._writev = t.writev)), G.call(this);
|
|
2237
|
+
}
|
|
2238
|
+
function ar(t, e, n, r, a, i, s) {
|
|
2239
|
+
e.writelen = r, e.writecb = s, e.writing = !0, e.sync = !0, n ? t._writev(a, e.onwrite) : t._write(a, i, e.onwrite), e.sync = !1;
|
|
2240
|
+
}
|
|
2241
|
+
function ei(t, e, n, r) {
|
|
2242
|
+
n || (function(a, i) {
|
|
2243
|
+
i.length === 0 && i.needDrain && (i.needDrain = !1, a.emit("drain"));
|
|
2244
|
+
})(t, e), e.pendingcb--, r(), ka(t, e);
|
|
2245
|
+
}
|
|
2246
|
+
function ya(t, e) {
|
|
2247
|
+
e.bufferProcessing = !0;
|
|
2248
|
+
var n = e.bufferedRequest;
|
|
2249
|
+
if (t._writev && n && n.next) {
|
|
2250
|
+
var r = e.bufferedRequestCount, a = new Array(r), i = e.corkedRequestsFree;
|
|
2251
|
+
i.entry = n;
|
|
2252
|
+
for (var s = 0; n; ) a[s] = n, n = n.next, s += 1;
|
|
2253
|
+
ar(t, e, !0, e.length, a, "", i.finish), e.pendingcb++, e.lastBufferedRequest = null, i.next ? (e.corkedRequestsFree = i.next, i.next = null) : e.corkedRequestsFree = new Ea(e);
|
|
2254
|
+
} else {
|
|
2255
|
+
for (; n; ) {
|
|
2256
|
+
var l = n.chunk, h = n.encoding, o = n.callback;
|
|
2257
|
+
if (ar(t, e, !1, e.objectMode ? 1 : l.length, l, h, o), n = n.next, e.writing) break;
|
|
2258
|
+
}
|
|
2259
|
+
n === null && (e.lastBufferedRequest = null);
|
|
2260
|
+
}
|
|
2261
|
+
e.bufferedRequestCount = 0, e.bufferedRequest = n, e.bufferProcessing = !1;
|
|
2262
|
+
}
|
|
2263
|
+
function ba(t) {
|
|
2264
|
+
return t.ending && t.length === 0 && t.bufferedRequest === null && !t.finished && !t.writing;
|
|
2265
|
+
}
|
|
2266
|
+
function ni(t, e) {
|
|
2267
|
+
e.prefinished || (e.prefinished = !0, t.emit("prefinish"));
|
|
2268
|
+
}
|
|
2269
|
+
function ka(t, e) {
|
|
2270
|
+
var n = ba(e);
|
|
2271
|
+
return n && (e.pendingcb === 0 ? (ni(t, e), e.finished = !0, t.emit("finish")) : ni(t, e)), n;
|
|
2272
|
+
}
|
|
2273
|
+
function Ea(t) {
|
|
2274
|
+
var e = this;
|
|
2275
|
+
this.next = null, this.entry = null, this.finish = function(n) {
|
|
2276
|
+
var r = e.entry;
|
|
2277
|
+
for (e.entry = null; r; ) {
|
|
2278
|
+
var a = r.callback;
|
|
2279
|
+
t.pendingcb--, a(n), r = r.next;
|
|
2280
|
+
}
|
|
2281
|
+
t.corkedRequestsFree ? t.corkedRequestsFree.next = e : t.corkedRequestsFree = e;
|
|
2282
|
+
};
|
|
2283
|
+
}
|
|
2284
|
+
rt.prototype.read = function(t) {
|
|
2285
|
+
J("read", t), t = parseInt(t, 10);
|
|
2286
|
+
var e = this._readableState, n = t;
|
|
2287
|
+
if (t !== 0 && (e.emittedReadable = !1), t === 0 && e.needReadable && (e.length >= e.highWaterMark || e.ended)) return J("read: emitReadable", e.length, e.ended), e.length === 0 && e.ended ? Nn(this) : En(this), null;
|
|
2288
|
+
if ((t = $r(t, e)) === 0 && e.ended) return e.length === 0 && Nn(this), null;
|
|
2289
|
+
var r, a = e.needReadable;
|
|
2290
|
+
return J("need readable", a), (e.length === 0 || e.length - t < e.highWaterMark) && J("length less than watermark", a = !0), e.ended || e.reading ? J("reading or ended", a = !1) : a && (J("do read"), e.reading = !0, e.sync = !0, e.length === 0 && (e.needReadable = !0), this._read(e.highWaterMark), e.sync = !1, e.reading || (t = $r(n, e))), (r = t > 0 ? Qr(t, e) : null) === null ? (e.needReadable = !0, t = 0) : e.length -= t, e.length === 0 && (e.ended || (e.needReadable = !0), n !== t && e.ended && Nn(this)), r !== null && this.emit("data", r), r;
|
|
2291
|
+
}, rt.prototype._read = function(t) {
|
|
2292
|
+
this.emit("error", new Error("not implemented"));
|
|
2293
|
+
}, rt.prototype.pipe = function(t, e) {
|
|
2294
|
+
var n = this, r = this._readableState;
|
|
2295
|
+
switch (r.pipesCount) {
|
|
2296
|
+
case 0:
|
|
2297
|
+
r.pipes = t;
|
|
2298
|
+
break;
|
|
2299
|
+
case 1:
|
|
2300
|
+
r.pipes = [r.pipes, t];
|
|
2301
|
+
break;
|
|
2302
|
+
default:
|
|
2303
|
+
r.pipes.push(t);
|
|
2304
|
+
}
|
|
2305
|
+
r.pipesCount += 1, J("pipe count=%d opts=%j", r.pipesCount, e);
|
|
2306
|
+
var a = !e || e.end !== !1 ? s : o;
|
|
2307
|
+
function i(d) {
|
|
2308
|
+
J("onunpipe"), d === n && o();
|
|
2309
|
+
}
|
|
2310
|
+
function s() {
|
|
2311
|
+
J("onend"), t.end();
|
|
2312
|
+
}
|
|
2313
|
+
r.endEmitted ? ht(a) : n.once("end", a), t.on("unpipe", i);
|
|
2314
|
+
var l = /* @__PURE__ */ (function(d) {
|
|
2315
|
+
return function() {
|
|
2316
|
+
var v = d._readableState;
|
|
2317
|
+
J("pipeOnDrain", v.awaitDrain), v.awaitDrain && v.awaitDrain--, v.awaitDrain === 0 && d.listeners("data").length && (v.flowing = !0, _r(d));
|
|
2318
|
+
};
|
|
2319
|
+
})(n);
|
|
2320
|
+
t.on("drain", l);
|
|
2321
|
+
var h = !1;
|
|
2322
|
+
function o() {
|
|
2323
|
+
J("cleanup"), t.removeListener("close", f), t.removeListener("finish", _), t.removeListener("drain", l), t.removeListener("error", p), t.removeListener("unpipe", i), n.removeListener("end", s), n.removeListener("end", o), n.removeListener("data", u), h = !0, !r.awaitDrain || t._writableState && !t._writableState.needDrain || l();
|
|
2324
|
+
}
|
|
2325
|
+
var c = !1;
|
|
2326
|
+
function u(d) {
|
|
2327
|
+
J("ondata"), c = !1, t.write(d) !== !1 || c || ((r.pipesCount === 1 && r.pipes === t || r.pipesCount > 1 && ti(r.pipes, t) !== -1) && !h && (J("false write response, pause", n._readableState.awaitDrain), n._readableState.awaitDrain++, c = !0), n.pause());
|
|
2328
|
+
}
|
|
2329
|
+
function p(d) {
|
|
2330
|
+
var v;
|
|
2331
|
+
J("onerror", d), g(), t.removeListener("error", p), v = "error", t.listeners(v).length === 0 && t.emit("error", d);
|
|
2332
|
+
}
|
|
2333
|
+
function f() {
|
|
2334
|
+
t.removeListener("finish", _), g();
|
|
2335
|
+
}
|
|
2336
|
+
function _() {
|
|
2337
|
+
J("onfinish"), t.removeListener("close", f), g();
|
|
2338
|
+
}
|
|
2339
|
+
function g() {
|
|
2340
|
+
J("unpipe"), n.unpipe(t);
|
|
2341
|
+
}
|
|
2342
|
+
return n.on("data", u), (function(d, v, w) {
|
|
2343
|
+
if (typeof d.prependListener == "function") return d.prependListener(v, w);
|
|
2344
|
+
d._events && d._events[v] ? Array.isArray(d._events[v]) ? d._events[v].unshift(w) : d._events[v] = [w, d._events[v]] : d.on(v, w);
|
|
2345
|
+
})(t, "error", p), t.once("close", f), t.once("finish", _), t.emit("pipe", n), r.flowing || (J("pipe resume"), n.resume()), t;
|
|
2346
|
+
}, rt.prototype.unpipe = function(t) {
|
|
2347
|
+
var e = this._readableState;
|
|
2348
|
+
if (e.pipesCount === 0) return this;
|
|
2349
|
+
if (e.pipesCount === 1) return t && t !== e.pipes ? this : (t || (t = e.pipes), e.pipes = null, e.pipesCount = 0, e.flowing = !1, t && t.emit("unpipe", this), this);
|
|
2350
|
+
if (!t) {
|
|
2351
|
+
var n = e.pipes, r = e.pipesCount;
|
|
2352
|
+
e.pipes = null, e.pipesCount = 0, e.flowing = !1;
|
|
2353
|
+
for (var a = 0; a < r; a++) n[a].emit("unpipe", this);
|
|
2354
|
+
return this;
|
|
2355
|
+
}
|
|
2356
|
+
var i = ti(e.pipes, t);
|
|
2357
|
+
return i === -1 ? this : (e.pipes.splice(i, 1), e.pipesCount -= 1, e.pipesCount === 1 && (e.pipes = e.pipes[0]), t.emit("unpipe", this), this);
|
|
2358
|
+
}, rt.prototype.on = function(t, e) {
|
|
2359
|
+
var n = G.prototype.on.call(this, t, e);
|
|
2360
|
+
if (t === "data") this._readableState.flowing !== !1 && this.resume();
|
|
2361
|
+
else if (t === "readable") {
|
|
2362
|
+
var r = this._readableState;
|
|
2363
|
+
r.endEmitted || r.readableListening || (r.readableListening = r.needReadable = !0, r.emittedReadable = !1, r.reading ? r.length && En(this) : ht(Po, this));
|
|
2364
|
+
}
|
|
2365
|
+
return n;
|
|
2366
|
+
}, rt.prototype.addListener = rt.prototype.on, rt.prototype.resume = function() {
|
|
2367
|
+
var t = this._readableState;
|
|
2368
|
+
return t.flowing || (J("resume"), t.flowing = !0, (function(e, n) {
|
|
2369
|
+
n.resumeScheduled || (n.resumeScheduled = !0, ht(Oo, e, n));
|
|
2370
|
+
})(this, t)), this;
|
|
2371
|
+
}, rt.prototype.pause = function() {
|
|
2372
|
+
return J("call pause flowing=%j", this._readableState.flowing), this._readableState.flowing !== !1 && (J("pause"), this._readableState.flowing = !1, this.emit("pause")), this;
|
|
2373
|
+
}, rt.prototype.wrap = function(t) {
|
|
2374
|
+
var e = this._readableState, n = !1, r = this;
|
|
2375
|
+
for (var a in t.on("end", function() {
|
|
2376
|
+
if (J("wrapped end"), e.decoder && !e.ended) {
|
|
2377
|
+
var i = e.decoder.end();
|
|
2378
|
+
i && i.length && r.push(i);
|
|
2379
|
+
}
|
|
2380
|
+
r.push(null);
|
|
2381
|
+
}), t.on("data", function(i) {
|
|
2382
|
+
J("wrapped data"), e.decoder && (i = e.decoder.write(i)), e.objectMode && i == null || (e.objectMode || i && i.length) && (r.push(i) || (n = !0, t.pause()));
|
|
2383
|
+
}), t) this[a] === void 0 && typeof t[a] == "function" && (this[a] = /* @__PURE__ */ (function(i) {
|
|
2384
|
+
return function() {
|
|
2385
|
+
return t[i].apply(t, arguments);
|
|
2386
|
+
};
|
|
2387
|
+
})(a));
|
|
2388
|
+
return (function(i, s) {
|
|
2389
|
+
for (var l = 0, h = i.length; l < h; l++) s(i[l], l);
|
|
2390
|
+
})(["error", "close", "destroy", "pause", "resume"], function(i) {
|
|
2391
|
+
t.on(i, r.emit.bind(r, i));
|
|
2392
|
+
}), r._read = function(i) {
|
|
2393
|
+
J("wrapped _read", i), n && (n = !1, t.resume());
|
|
2394
|
+
}, r;
|
|
2395
|
+
}, rt._fromList = Qr, ut.WritableState = ir, gt(ut, G), ir.prototype.getBuffer = function() {
|
|
2396
|
+
for (var t = this.bufferedRequest, e = []; t; ) e.push(t), t = t.next;
|
|
2397
|
+
return e;
|
|
2398
|
+
}, ut.prototype.pipe = function() {
|
|
2399
|
+
this.emit("error", new Error("Cannot pipe, not readable"));
|
|
2400
|
+
}, ut.prototype.write = function(t, e, n) {
|
|
2401
|
+
var r = this._writableState, a = !1;
|
|
2402
|
+
return typeof e == "function" && (n = e, e = null), A.isBuffer(t) ? e = "buffer" : e || (e = r.defaultEncoding), typeof n != "function" && (n = No), r.ended ? (function(i, s) {
|
|
2403
|
+
var l = new Error("write after end");
|
|
2404
|
+
i.emit("error", l), ht(s, l);
|
|
2405
|
+
})(this, n) : (function(i, s, l, h) {
|
|
2406
|
+
var o = !0, c = !1;
|
|
2407
|
+
return l === null ? c = new TypeError("May not write null values to stream") : A.isBuffer(l) || typeof l == "string" || l === void 0 || s.objectMode || (c = new TypeError("Invalid non-string/buffer chunk")), c && (i.emit("error", c), ht(h, c), o = !1), o;
|
|
2408
|
+
})(this, r, t, n) && (r.pendingcb++, a = (function(i, s, l, h, o) {
|
|
2409
|
+
l = (function(f, _, g) {
|
|
2410
|
+
return f.objectMode || f.decodeStrings === !1 || typeof _ != "string" || (_ = A.from(_, g)), _;
|
|
2411
|
+
})(s, l, h), A.isBuffer(l) && (h = "buffer");
|
|
2412
|
+
var c = s.objectMode ? 1 : l.length;
|
|
2413
|
+
s.length += c;
|
|
2414
|
+
var u = s.length < s.highWaterMark;
|
|
2415
|
+
if (u || (s.needDrain = !0), s.writing || s.corked) {
|
|
2416
|
+
var p = s.lastBufferedRequest;
|
|
2417
|
+
s.lastBufferedRequest = new Ho(l, h, o), p ? p.next = s.lastBufferedRequest : s.bufferedRequest = s.lastBufferedRequest, s.bufferedRequestCount += 1;
|
|
2418
|
+
} else ar(i, s, !1, c, l, h, o);
|
|
2419
|
+
return u;
|
|
2420
|
+
})(this, r, t, e, n)), a;
|
|
2421
|
+
}, ut.prototype.cork = function() {
|
|
2422
|
+
this._writableState.corked++;
|
|
2423
|
+
}, ut.prototype.uncork = function() {
|
|
2424
|
+
var t = this._writableState;
|
|
2425
|
+
t.corked && (t.corked--, t.writing || t.corked || t.finished || t.bufferProcessing || !t.bufferedRequest || ya(this, t));
|
|
2426
|
+
}, ut.prototype.setDefaultEncoding = function(t) {
|
|
2427
|
+
if (typeof t == "string" && (t = t.toLowerCase()), !(["hex", "utf8", "utf-8", "ascii", "binary", "base64", "ucs2", "ucs-2", "utf16le", "utf-16le", "raw"].indexOf((t + "").toLowerCase()) > -1)) throw new TypeError("Unknown encoding: " + t);
|
|
2428
|
+
return this._writableState.defaultEncoding = t, this;
|
|
2429
|
+
}, ut.prototype._write = function(t, e, n) {
|
|
2430
|
+
n(new Error("not implemented"));
|
|
2431
|
+
}, ut.prototype._writev = null, ut.prototype.end = function(t, e, n) {
|
|
2432
|
+
var r = this._writableState;
|
|
2433
|
+
typeof t == "function" ? (n = t, t = null, e = null) : typeof e == "function" && (n = e, e = null), t != null && this.write(t, e), r.corked && (r.corked = 1, this.uncork()), r.ending || r.finished || (function(a, i, s) {
|
|
2434
|
+
i.ending = !0, ka(a, i), s && (i.finished ? ht(s) : a.once("finish", s)), i.ended = !0, a.writable = !1;
|
|
2435
|
+
})(this, r, n);
|
|
2436
|
+
}, gt(xt, rt);
|
|
2437
|
+
for (var ri = Object.keys(ut.prototype), Hn = 0; Hn < ri.length; Hn++) {
|
|
2438
|
+
var Fn = ri[Hn];
|
|
2439
|
+
xt.prototype[Fn] || (xt.prototype[Fn] = ut.prototype[Fn]);
|
|
2440
|
+
}
|
|
2441
|
+
function xt(t) {
|
|
2442
|
+
if (!(this instanceof xt)) return new xt(t);
|
|
2443
|
+
rt.call(this, t), ut.call(this, t), t && t.readable === !1 && (this.readable = !1), t && t.writable === !1 && (this.writable = !1), this.allowHalfOpen = !0, t && t.allowHalfOpen === !1 && (this.allowHalfOpen = !1), this.once("end", Fo);
|
|
2444
|
+
}
|
|
2445
|
+
function Fo() {
|
|
2446
|
+
this.allowHalfOpen || this._writableState.ended || ht(Zo, this);
|
|
2447
|
+
}
|
|
2448
|
+
function Zo(t) {
|
|
2449
|
+
t.end();
|
|
2450
|
+
}
|
|
2451
|
+
function Vo(t) {
|
|
2452
|
+
this.afterTransform = function(e, n) {
|
|
2453
|
+
return (function(r, a, i) {
|
|
2454
|
+
var s = r._transformState;
|
|
2455
|
+
s.transforming = !1;
|
|
2456
|
+
var l = s.writecb;
|
|
2457
|
+
if (!l) return r.emit("error", new Error("no writecb in Transform class"));
|
|
2458
|
+
s.writechunk = null, s.writecb = null, i != null && r.push(i), l(a);
|
|
2459
|
+
var h = r._readableState;
|
|
2460
|
+
h.reading = !1, (h.needReadable || h.length < h.highWaterMark) && r._read(h.highWaterMark);
|
|
2461
|
+
})(t, e, n);
|
|
2462
|
+
}, this.needTransform = !1, this.transforming = !1, this.writecb = null, this.writechunk = null, this.writeencoding = null;
|
|
2463
|
+
}
|
|
2464
|
+
function Et(t) {
|
|
2465
|
+
if (!(this instanceof Et)) return new Et(t);
|
|
2466
|
+
xt.call(this, t), this._transformState = new Vo(this);
|
|
2467
|
+
var e = this;
|
|
2468
|
+
this._readableState.needReadable = !0, this._readableState.sync = !1, t && (typeof t.transform == "function" && (this._transform = t.transform), typeof t.flush == "function" && (this._flush = t.flush)), this.once("prefinish", function() {
|
|
2469
|
+
typeof this._flush == "function" ? this._flush(function(n) {
|
|
2470
|
+
ii(e, n);
|
|
2471
|
+
}) : ii(e);
|
|
2472
|
+
});
|
|
2473
|
+
}
|
|
2474
|
+
function ii(t, e) {
|
|
2475
|
+
if (e) return t.emit("error", e);
|
|
2476
|
+
var n = t._writableState, r = t._transformState;
|
|
2477
|
+
if (n.length) throw new Error("Calling transform done when ws.length != 0");
|
|
2478
|
+
if (r.transforming) throw new Error("Calling transform done when still transforming");
|
|
2479
|
+
return t.push(null);
|
|
2480
|
+
}
|
|
2481
|
+
function Ve(t) {
|
|
2482
|
+
if (!(this instanceof Ve)) return new Ve(t);
|
|
2483
|
+
Et.call(this, t);
|
|
2484
|
+
}
|
|
2485
|
+
function Mt() {
|
|
2486
|
+
G.call(this);
|
|
2487
|
+
}
|
|
2488
|
+
gt(Et, xt), Et.prototype.push = function(t, e) {
|
|
2489
|
+
return this._transformState.needTransform = !1, xt.prototype.push.call(this, t, e);
|
|
2490
|
+
}, Et.prototype._transform = function(t, e, n) {
|
|
2491
|
+
throw new Error("Not implemented");
|
|
2492
|
+
}, Et.prototype._write = function(t, e, n) {
|
|
2493
|
+
var r = this._transformState;
|
|
2494
|
+
if (r.writecb = n, r.writechunk = t, r.writeencoding = e, !r.transforming) {
|
|
2495
|
+
var a = this._readableState;
|
|
2496
|
+
(r.needTransform || a.needReadable || a.length < a.highWaterMark) && this._read(a.highWaterMark);
|
|
2497
|
+
}
|
|
2498
|
+
}, Et.prototype._read = function(t) {
|
|
2499
|
+
var e = this._transformState;
|
|
2500
|
+
e.writechunk !== null && e.writecb && !e.transforming ? (e.transforming = !0, this._transform(e.writechunk, e.writeencoding, e.afterTransform)) : e.needTransform = !0;
|
|
2501
|
+
}, gt(Ve, Et), Ve.prototype._transform = function(t, e, n) {
|
|
2502
|
+
n(null, t);
|
|
2503
|
+
}, gt(Mt, G), Mt.Readable = rt, Mt.Writable = ut, Mt.Duplex = xt, Mt.Transform = Et, Mt.PassThrough = Ve, Mt.Stream = Mt, Mt.prototype.pipe = function(t, e) {
|
|
2504
|
+
var n = this;
|
|
2505
|
+
function r(c) {
|
|
2506
|
+
t.writable && t.write(c) === !1 && n.pause && n.pause();
|
|
2507
|
+
}
|
|
2508
|
+
function a() {
|
|
2509
|
+
n.readable && n.resume && n.resume();
|
|
2510
|
+
}
|
|
2511
|
+
n.on("data", r), t.on("drain", a), t._isStdio || e && e.end === !1 || (n.on("end", s), n.on("close", l));
|
|
2512
|
+
var i = !1;
|
|
2513
|
+
function s() {
|
|
2514
|
+
i || (i = !0, t.end());
|
|
2515
|
+
}
|
|
2516
|
+
function l() {
|
|
2517
|
+
i || (i = !0, typeof t.destroy == "function" && t.destroy());
|
|
2518
|
+
}
|
|
2519
|
+
function h(c) {
|
|
2520
|
+
if (o(), G.listenerCount(this, "error") === 0) throw c;
|
|
2521
|
+
}
|
|
2522
|
+
function o() {
|
|
2523
|
+
n.removeListener("data", r), t.removeListener("drain", a), n.removeListener("end", s), n.removeListener("close", l), n.removeListener("error", h), t.removeListener("error", h), n.removeListener("end", o), n.removeListener("close", o), t.removeListener("close", o);
|
|
2524
|
+
}
|
|
2525
|
+
return n.on("error", h), t.on("error", h), n.on("end", o), n.on("close", o), t.on("close", o), t.emit("pipe", n), t;
|
|
2526
|
+
};
|
|
2527
|
+
var Sa = { 2: "need dictionary", 1: "stream end", 0: "", "-1": "file error", "-2": "stream error", "-3": "data error", "-4": "insufficient memory", "-5": "buffer error", "-6": "incompatible version" };
|
|
2528
|
+
function jo() {
|
|
2529
|
+
this.input = null, this.next_in = 0, this.avail_in = 0, this.total_in = 0, this.output = null, this.next_out = 0, this.avail_out = 0, this.total_out = 0, this.msg = "", this.state = null, this.data_type = 2, this.adler = 0;
|
|
2530
|
+
}
|
|
2531
|
+
function Ot(t, e, n, r, a) {
|
|
2532
|
+
if (e.subarray && t.subarray) t.set(e.subarray(n, n + r), a);
|
|
2533
|
+
else for (var i = 0; i < r; i++) t[a + i] = e[n + i];
|
|
2534
|
+
}
|
|
2535
|
+
var Sn = Uint8Array, St = Uint16Array, xn = Int32Array, Wo = 4, ai = 0, oi = 1, Yo = 2;
|
|
2536
|
+
function Ie(t) {
|
|
2537
|
+
for (var e = t.length; --e >= 0; ) t[e] = 0;
|
|
2538
|
+
}
|
|
2539
|
+
var Ko = 0, xa = 1, Go = 2, gr = 29, nn = 256, Ge = nn + 1 + gr, Le = 30, vr = 19, si = 2 * Ge + 1, le = 15, Zn = 16, qo = 7, wr = 256, Ra = 16, Aa = 17, Ba = 18, or = [0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0], _n = [0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13], Xo = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7], li = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15], Pt = new Array(2 * (Ge + 2));
|
|
2540
|
+
Ie(Pt);
|
|
2541
|
+
var je = new Array(2 * Le);
|
|
2542
|
+
Ie(je);
|
|
2543
|
+
var qe = new Array(512);
|
|
2544
|
+
Ie(qe);
|
|
2545
|
+
var Xe = new Array(256);
|
|
2546
|
+
Ie(Xe);
|
|
2547
|
+
var mr = new Array(gr);
|
|
2548
|
+
Ie(mr);
|
|
2549
|
+
var hi, ci, fi, Rn = new Array(Le);
|
|
2550
|
+
function Vn(t, e, n, r, a) {
|
|
2551
|
+
this.static_tree = t, this.extra_bits = e, this.extra_base = n, this.elems = r, this.max_length = a, this.has_stree = t && t.length;
|
|
2552
|
+
}
|
|
2553
|
+
function jn(t, e) {
|
|
2554
|
+
this.dyn_tree = t, this.max_code = 0, this.stat_desc = e;
|
|
2555
|
+
}
|
|
2556
|
+
function Ta(t) {
|
|
2557
|
+
return t < 256 ? qe[t] : qe[256 + (t >>> 7)];
|
|
2558
|
+
}
|
|
2559
|
+
function $e(t, e) {
|
|
2560
|
+
t.pending_buf[t.pending++] = 255 & e, t.pending_buf[t.pending++] = e >>> 8 & 255;
|
|
2561
|
+
}
|
|
2562
|
+
function vt(t, e, n) {
|
|
2563
|
+
t.bi_valid > Zn - n ? (t.bi_buf |= e << t.bi_valid & 65535, $e(t, t.bi_buf), t.bi_buf = e >> Zn - t.bi_valid, t.bi_valid += n - Zn) : (t.bi_buf |= e << t.bi_valid & 65535, t.bi_valid += n);
|
|
2564
|
+
}
|
|
2565
|
+
function Ct(t, e, n) {
|
|
2566
|
+
vt(t, n[2 * e], n[2 * e + 1]);
|
|
2567
|
+
}
|
|
2568
|
+
function La(t, e) {
|
|
2569
|
+
var n = 0;
|
|
2570
|
+
do
|
|
2571
|
+
n |= 1 & t, t >>>= 1, n <<= 1;
|
|
2572
|
+
while (--e > 0);
|
|
2573
|
+
return n >>> 1;
|
|
2574
|
+
}
|
|
2575
|
+
function za(t, e, n) {
|
|
2576
|
+
var r, a, i = new Array(le + 1), s = 0;
|
|
2577
|
+
for (r = 1; r <= le; r++) i[r] = s = s + n[r - 1] << 1;
|
|
2578
|
+
for (a = 0; a <= e; a++) {
|
|
2579
|
+
var l = t[2 * a + 1];
|
|
2580
|
+
l !== 0 && (t[2 * a] = La(i[l]++, l));
|
|
2581
|
+
}
|
|
2582
|
+
}
|
|
2583
|
+
function Ca(t) {
|
|
2584
|
+
var e;
|
|
2585
|
+
for (e = 0; e < Ge; e++) t.dyn_ltree[2 * e] = 0;
|
|
2586
|
+
for (e = 0; e < Le; e++) t.dyn_dtree[2 * e] = 0;
|
|
2587
|
+
for (e = 0; e < vr; e++) t.bl_tree[2 * e] = 0;
|
|
2588
|
+
t.dyn_ltree[2 * wr] = 1, t.opt_len = t.static_len = 0, t.last_lit = t.matches = 0;
|
|
2589
|
+
}
|
|
2590
|
+
function Ia(t) {
|
|
2591
|
+
t.bi_valid > 8 ? $e(t, t.bi_buf) : t.bi_valid > 0 && (t.pending_buf[t.pending++] = t.bi_buf), t.bi_buf = 0, t.bi_valid = 0;
|
|
2592
|
+
}
|
|
2593
|
+
function ui(t, e, n, r) {
|
|
2594
|
+
var a = 2 * e, i = 2 * n;
|
|
2595
|
+
return t[a] < t[i] || t[a] === t[i] && r[e] <= r[n];
|
|
2596
|
+
}
|
|
2597
|
+
function Wn(t, e, n) {
|
|
2598
|
+
for (var r = t.heap[n], a = n << 1; a <= t.heap_len && (a < t.heap_len && ui(e, t.heap[a + 1], t.heap[a], t.depth) && a++, !ui(e, r, t.heap[a], t.depth)); ) t.heap[n] = t.heap[a], n = a, a <<= 1;
|
|
2599
|
+
t.heap[n] = r;
|
|
2600
|
+
}
|
|
2601
|
+
function di(t, e, n) {
|
|
2602
|
+
var r, a, i, s, l = 0;
|
|
2603
|
+
if (t.last_lit !== 0) do
|
|
2604
|
+
r = t.pending_buf[t.d_buf + 2 * l] << 8 | t.pending_buf[t.d_buf + 2 * l + 1], a = t.pending_buf[t.l_buf + l], l++, r === 0 ? Ct(t, a, e) : (Ct(t, (i = Xe[a]) + nn + 1, e), (s = or[i]) !== 0 && vt(t, a -= mr[i], s), Ct(t, i = Ta(--r), n), (s = _n[i]) !== 0 && vt(t, r -= Rn[i], s));
|
|
2605
|
+
while (l < t.last_lit);
|
|
2606
|
+
Ct(t, wr, e);
|
|
2607
|
+
}
|
|
2608
|
+
function Yn(t, e) {
|
|
2609
|
+
var n, r, a, i = e.dyn_tree, s = e.stat_desc.static_tree, l = e.stat_desc.has_stree, h = e.stat_desc.elems, o = -1;
|
|
2610
|
+
for (t.heap_len = 0, t.heap_max = si, n = 0; n < h; n++) i[2 * n] !== 0 ? (t.heap[++t.heap_len] = o = n, t.depth[n] = 0) : i[2 * n + 1] = 0;
|
|
2611
|
+
for (; t.heap_len < 2; ) i[2 * (a = t.heap[++t.heap_len] = o < 2 ? ++o : 0)] = 1, t.depth[a] = 0, t.opt_len--, l && (t.static_len -= s[2 * a + 1]);
|
|
2612
|
+
for (e.max_code = o, n = t.heap_len >> 1; n >= 1; n--) Wn(t, i, n);
|
|
2613
|
+
a = h;
|
|
2614
|
+
do
|
|
2615
|
+
n = t.heap[1], t.heap[1] = t.heap[t.heap_len--], Wn(t, i, 1), r = t.heap[1], t.heap[--t.heap_max] = n, t.heap[--t.heap_max] = r, i[2 * a] = i[2 * n] + i[2 * r], t.depth[a] = (t.depth[n] >= t.depth[r] ? t.depth[n] : t.depth[r]) + 1, i[2 * n + 1] = i[2 * r + 1] = a, t.heap[1] = a++, Wn(t, i, 1);
|
|
2616
|
+
while (t.heap_len >= 2);
|
|
2617
|
+
t.heap[--t.heap_max] = t.heap[1], (function(c, u) {
|
|
2618
|
+
var p, f, _, g, d, v, w = u.dyn_tree, m = u.max_code, y = u.stat_desc.static_tree, x = u.stat_desc.has_stree, S = u.stat_desc.extra_bits, k = u.stat_desc.extra_base, E = u.stat_desc.max_length, B = 0;
|
|
2619
|
+
for (g = 0; g <= le; g++) c.bl_count[g] = 0;
|
|
2620
|
+
for (w[2 * c.heap[c.heap_max] + 1] = 0, p = c.heap_max + 1; p < si; p++) (g = w[2 * w[2 * (f = c.heap[p]) + 1] + 1] + 1) > E && (g = E, B++), w[2 * f + 1] = g, f > m || (c.bl_count[g]++, d = 0, f >= k && (d = S[f - k]), v = w[2 * f], c.opt_len += v * (g + d), x && (c.static_len += v * (y[2 * f + 1] + d)));
|
|
2621
|
+
if (B !== 0) {
|
|
2622
|
+
do {
|
|
2623
|
+
for (g = E - 1; c.bl_count[g] === 0; ) g--;
|
|
2624
|
+
c.bl_count[g]--, c.bl_count[g + 1] += 2, c.bl_count[E]--, B -= 2;
|
|
2625
|
+
} while (B > 0);
|
|
2626
|
+
for (g = E; g !== 0; g--) for (f = c.bl_count[g]; f !== 0; ) (_ = c.heap[--p]) > m || (w[2 * _ + 1] !== g && (c.opt_len += (g - w[2 * _ + 1]) * w[2 * _], w[2 * _ + 1] = g), f--);
|
|
2627
|
+
}
|
|
2628
|
+
})(t, e), za(i, o, t.bl_count);
|
|
2629
|
+
}
|
|
2630
|
+
function pi(t, e, n) {
|
|
2631
|
+
var r, a, i = -1, s = e[1], l = 0, h = 7, o = 4;
|
|
2632
|
+
for (s === 0 && (h = 138, o = 3), e[2 * (n + 1) + 1] = 65535, r = 0; r <= n; r++) a = s, s = e[2 * (r + 1) + 1], ++l < h && a === s || (l < o ? t.bl_tree[2 * a] += l : a !== 0 ? (a !== i && t.bl_tree[2 * a]++, t.bl_tree[2 * Ra]++) : l <= 10 ? t.bl_tree[2 * Aa]++ : t.bl_tree[2 * Ba]++, l = 0, i = a, s === 0 ? (h = 138, o = 3) : a === s ? (h = 6, o = 3) : (h = 7, o = 4));
|
|
2633
|
+
}
|
|
2634
|
+
function _i(t, e, n) {
|
|
2635
|
+
var r, a, i = -1, s = e[1], l = 0, h = 7, o = 4;
|
|
2636
|
+
for (s === 0 && (h = 138, o = 3), r = 0; r <= n; r++) if (a = s, s = e[2 * (r + 1) + 1], !(++l < h && a === s)) {
|
|
2637
|
+
if (l < o) do
|
|
2638
|
+
Ct(t, a, t.bl_tree);
|
|
2639
|
+
while (--l != 0);
|
|
2640
|
+
else a !== 0 ? (a !== i && (Ct(t, a, t.bl_tree), l--), Ct(t, Ra, t.bl_tree), vt(t, l - 3, 2)) : l <= 10 ? (Ct(t, Aa, t.bl_tree), vt(t, l - 3, 3)) : (Ct(t, Ba, t.bl_tree), vt(t, l - 11, 7));
|
|
2641
|
+
l = 0, i = a, s === 0 ? (h = 138, o = 3) : a === s ? (h = 6, o = 3) : (h = 7, o = 4);
|
|
2642
|
+
}
|
|
2643
|
+
}
|
|
2644
|
+
Ie(Rn);
|
|
2645
|
+
var gi = !1;
|
|
2646
|
+
function $o(t) {
|
|
2647
|
+
gi || ((function() {
|
|
2648
|
+
var e, n, r, a, i, s = new Array(le + 1);
|
|
2649
|
+
for (r = 0, a = 0; a < gr - 1; a++) for (mr[a] = r, e = 0; e < 1 << or[a]; e++) Xe[r++] = a;
|
|
2650
|
+
for (Xe[r - 1] = a, i = 0, a = 0; a < 16; a++) for (Rn[a] = i, e = 0; e < 1 << _n[a]; e++) qe[i++] = a;
|
|
2651
|
+
for (i >>= 7; a < Le; a++) for (Rn[a] = i << 7, e = 0; e < 1 << _n[a] - 7; e++) qe[256 + i++] = a;
|
|
2652
|
+
for (n = 0; n <= le; n++) s[n] = 0;
|
|
2653
|
+
for (e = 0; e <= 143; ) Pt[2 * e + 1] = 8, e++, s[8]++;
|
|
2654
|
+
for (; e <= 255; ) Pt[2 * e + 1] = 9, e++, s[9]++;
|
|
2655
|
+
for (; e <= 279; ) Pt[2 * e + 1] = 7, e++, s[7]++;
|
|
2656
|
+
for (; e <= 287; ) Pt[2 * e + 1] = 8, e++, s[8]++;
|
|
2657
|
+
for (za(Pt, Ge + 1, s), e = 0; e < Le; e++) je[2 * e + 1] = 5, je[2 * e] = La(e, 5);
|
|
2658
|
+
hi = new Vn(Pt, or, nn + 1, Ge, le), ci = new Vn(je, _n, 0, Le, le), fi = new Vn(new Array(0), Xo, 0, vr, qo);
|
|
2659
|
+
})(), gi = !0), t.l_desc = new jn(t.dyn_ltree, hi), t.d_desc = new jn(t.dyn_dtree, ci), t.bl_desc = new jn(t.bl_tree, fi), t.bi_buf = 0, t.bi_valid = 0, Ca(t);
|
|
2660
|
+
}
|
|
2661
|
+
function Ma(t, e, n, r) {
|
|
2662
|
+
vt(t, (Ko << 1) + (r ? 1 : 0), 3), (function(a, i, s, l) {
|
|
2663
|
+
Ia(a), $e(a, s), $e(a, ~s), Ot(a.pending_buf, a.window, i, s, a.pending), a.pending += s;
|
|
2664
|
+
})(t, e, n);
|
|
2665
|
+
}
|
|
2666
|
+
function Jo(t) {
|
|
2667
|
+
vt(t, xa << 1, 3), Ct(t, wr, Pt), (function(e) {
|
|
2668
|
+
e.bi_valid === 16 ? ($e(e, e.bi_buf), e.bi_buf = 0, e.bi_valid = 0) : e.bi_valid >= 8 && (e.pending_buf[e.pending++] = 255 & e.bi_buf, e.bi_buf >>= 8, e.bi_valid -= 8);
|
|
2669
|
+
})(t);
|
|
2670
|
+
}
|
|
2671
|
+
function Qo(t, e, n, r) {
|
|
2672
|
+
var a, i, s = 0;
|
|
2673
|
+
t.level > 0 ? (t.strm.data_type === Yo && (t.strm.data_type = (function(l) {
|
|
2674
|
+
var h, o = 4093624447;
|
|
2675
|
+
for (h = 0; h <= 31; h++, o >>>= 1) if (1 & o && l.dyn_ltree[2 * h] !== 0) return ai;
|
|
2676
|
+
if (l.dyn_ltree[18] !== 0 || l.dyn_ltree[20] !== 0 || l.dyn_ltree[26] !== 0) return oi;
|
|
2677
|
+
for (h = 32; h < nn; h++) if (l.dyn_ltree[2 * h] !== 0) return oi;
|
|
2678
|
+
return ai;
|
|
2679
|
+
})(t)), Yn(t, t.l_desc), Yn(t, t.d_desc), s = (function(l) {
|
|
2680
|
+
var h;
|
|
2681
|
+
for (pi(l, l.dyn_ltree, l.l_desc.max_code), pi(l, l.dyn_dtree, l.d_desc.max_code), Yn(l, l.bl_desc), h = vr - 1; h >= 3 && l.bl_tree[2 * li[h] + 1] === 0; h--) ;
|
|
2682
|
+
return l.opt_len += 3 * (h + 1) + 5 + 5 + 4, h;
|
|
2683
|
+
})(t), a = t.opt_len + 3 + 7 >>> 3, (i = t.static_len + 3 + 7 >>> 3) <= a && (a = i)) : a = i = n + 5, n + 4 <= a && e !== -1 ? Ma(t, e, n, r) : t.strategy === Wo || i === a ? (vt(t, (xa << 1) + (r ? 1 : 0), 3), di(t, Pt, je)) : (vt(t, (Go << 1) + (r ? 1 : 0), 3), (function(l, h, o, c) {
|
|
2684
|
+
var u;
|
|
2685
|
+
for (vt(l, h - 257, 5), vt(l, o - 1, 5), vt(l, c - 4, 4), u = 0; u < c; u++) vt(l, l.bl_tree[2 * li[u] + 1], 3);
|
|
2686
|
+
_i(l, l.dyn_ltree, h - 1), _i(l, l.dyn_dtree, o - 1);
|
|
2687
|
+
})(t, t.l_desc.max_code + 1, t.d_desc.max_code + 1, s + 1), di(t, t.dyn_ltree, t.dyn_dtree)), Ca(t), r && Ia(t);
|
|
2688
|
+
}
|
|
2689
|
+
function qt(t, e, n) {
|
|
2690
|
+
return t.pending_buf[t.d_buf + 2 * t.last_lit] = e >>> 8 & 255, t.pending_buf[t.d_buf + 2 * t.last_lit + 1] = 255 & e, t.pending_buf[t.l_buf + t.last_lit] = 255 & n, t.last_lit++, e === 0 ? t.dyn_ltree[2 * n]++ : (t.matches++, e--, t.dyn_ltree[2 * (Xe[n] + nn + 1)]++, t.dyn_dtree[2 * Ta(e)]++), t.last_lit === t.lit_bufsize - 1;
|
|
2691
|
+
}
|
|
2692
|
+
function sr(t, e, n, r) {
|
|
2693
|
+
for (var a = 65535 & t | 0, i = t >>> 16 & 65535 | 0, s = 0; n !== 0; ) {
|
|
2694
|
+
n -= s = n > 2e3 ? 2e3 : n;
|
|
2695
|
+
do
|
|
2696
|
+
i = i + (a = a + e[r++] | 0) | 0;
|
|
2697
|
+
while (--s);
|
|
2698
|
+
a %= 65521, i %= 65521;
|
|
2699
|
+
}
|
|
2700
|
+
return a | i << 16 | 0;
|
|
2701
|
+
}
|
|
2702
|
+
var ts = (function() {
|
|
2703
|
+
for (var t, e = [], n = 0; n < 256; n++) {
|
|
2704
|
+
t = n;
|
|
2705
|
+
for (var r = 0; r < 8; r++) t = 1 & t ? 3988292384 ^ t >>> 1 : t >>> 1;
|
|
2706
|
+
e[n] = t;
|
|
2707
|
+
}
|
|
2708
|
+
return e;
|
|
2709
|
+
})();
|
|
2710
|
+
function st(t, e, n, r) {
|
|
2711
|
+
var a = ts, i = r + n;
|
|
2712
|
+
t ^= -1;
|
|
2713
|
+
for (var s = r; s < i; s++) t = t >>> 8 ^ a[255 & (t ^ e[s])];
|
|
2714
|
+
return -1 ^ t;
|
|
2715
|
+
}
|
|
2716
|
+
var Ae, we = 0, es = 1, ns = 3, jt = 4, vi = 5, ae = 0, wi = 1, me = -2, rs = -3, Kn = -5, is = -1, as = 1, ln = 2, os = 3, ss = 4, ls = 2, yr = 8, hs = 9, lr = 286, cs = 30, fs = 19, us = 2 * lr + 1, ds = 15, $ = 3, Yt = 258, At = Yt + $ + 1, ps = 32, br = 42, hr = 69, gn = 73, vn = 91, wn = 103, he = 113, Fe = 666, lt = 1, We = 2, ce = 3, ze = 4, _s = 3;
|
|
2717
|
+
function Kt(t, e) {
|
|
2718
|
+
return t.msg = Sa[e], e;
|
|
2719
|
+
}
|
|
2720
|
+
function mi(t) {
|
|
2721
|
+
return (t << 1) - (t > 4 ? 9 : 0);
|
|
2722
|
+
}
|
|
2723
|
+
function oe(t) {
|
|
2724
|
+
for (var e = t.length; --e >= 0; ) t[e] = 0;
|
|
2725
|
+
}
|
|
2726
|
+
function Vt(t) {
|
|
2727
|
+
var e = t.state, n = e.pending;
|
|
2728
|
+
n > t.avail_out && (n = t.avail_out), n !== 0 && (Ot(t.output, e.pending_buf, e.pending_out, n, t.next_out), t.next_out += n, e.pending_out += n, t.total_out += n, t.avail_out -= n, e.pending -= n, e.pending === 0 && (e.pending_out = 0));
|
|
2729
|
+
}
|
|
2730
|
+
function ct(t, e) {
|
|
2731
|
+
Qo(t, t.block_start >= 0 ? t.block_start : -1, t.strstart - t.block_start, e), t.block_start = t.strstart, Vt(t.strm);
|
|
2732
|
+
}
|
|
2733
|
+
function X(t, e) {
|
|
2734
|
+
t.pending_buf[t.pending++] = e;
|
|
2735
|
+
}
|
|
2736
|
+
function He(t, e) {
|
|
2737
|
+
t.pending_buf[t.pending++] = e >>> 8 & 255, t.pending_buf[t.pending++] = 255 & e;
|
|
2738
|
+
}
|
|
2739
|
+
function Da(t, e) {
|
|
2740
|
+
var n, r, a = t.max_chain_length, i = t.strstart, s = t.prev_length, l = t.nice_match, h = t.strstart > t.w_size - At ? t.strstart - (t.w_size - At) : 0, o = t.window, c = t.w_mask, u = t.prev, p = t.strstart + Yt, f = o[i + s - 1], _ = o[i + s];
|
|
2741
|
+
t.prev_length >= t.good_match && (a >>= 2), l > t.lookahead && (l = t.lookahead);
|
|
2742
|
+
do
|
|
2743
|
+
if (o[(n = e) + s] === _ && o[n + s - 1] === f && o[n] === o[i] && o[++n] === o[i + 1]) {
|
|
2744
|
+
i += 2, n++;
|
|
2745
|
+
do
|
|
2746
|
+
;
|
|
2747
|
+
while (o[++i] === o[++n] && o[++i] === o[++n] && o[++i] === o[++n] && o[++i] === o[++n] && o[++i] === o[++n] && o[++i] === o[++n] && o[++i] === o[++n] && o[++i] === o[++n] && i < p);
|
|
2748
|
+
if (r = Yt - (p - i), i = p - Yt, r > s) {
|
|
2749
|
+
if (t.match_start = e, s = r, r >= l) break;
|
|
2750
|
+
f = o[i + s - 1], _ = o[i + s];
|
|
2751
|
+
}
|
|
2752
|
+
}
|
|
2753
|
+
while ((e = u[e & c]) > h && --a != 0);
|
|
2754
|
+
return s <= t.lookahead ? s : t.lookahead;
|
|
2755
|
+
}
|
|
2756
|
+
function Je(t) {
|
|
2757
|
+
var e, n, r, a, i, s, l, h, o, c, u = t.w_size;
|
|
2758
|
+
do {
|
|
2759
|
+
if (a = t.window_size - t.lookahead - t.strstart, t.strstart >= u + (u - At)) {
|
|
2760
|
+
Ot(t.window, t.window, u, u, 0), t.match_start -= u, t.strstart -= u, t.block_start -= u, e = n = t.hash_size;
|
|
2761
|
+
do
|
|
2762
|
+
r = t.head[--e], t.head[e] = r >= u ? r - u : 0;
|
|
2763
|
+
while (--n);
|
|
2764
|
+
e = n = u;
|
|
2765
|
+
do
|
|
2766
|
+
r = t.prev[--e], t.prev[e] = r >= u ? r - u : 0;
|
|
2767
|
+
while (--n);
|
|
2768
|
+
a += u;
|
|
2769
|
+
}
|
|
2770
|
+
if (t.strm.avail_in === 0) break;
|
|
2771
|
+
if (s = t.strm, l = t.window, h = t.strstart + t.lookahead, o = a, c = void 0, (c = s.avail_in) > o && (c = o), n = c === 0 ? 0 : (s.avail_in -= c, Ot(l, s.input, s.next_in, c, h), s.state.wrap === 1 ? s.adler = sr(s.adler, l, c, h) : s.state.wrap === 2 && (s.adler = st(s.adler, l, c, h)), s.next_in += c, s.total_in += c, c), t.lookahead += n, t.lookahead + t.insert >= $) for (i = t.strstart - t.insert, t.ins_h = t.window[i], t.ins_h = (t.ins_h << t.hash_shift ^ t.window[i + 1]) & t.hash_mask; t.insert && (t.ins_h = (t.ins_h << t.hash_shift ^ t.window[i + $ - 1]) & t.hash_mask, t.prev[i & t.w_mask] = t.head[t.ins_h], t.head[t.ins_h] = i, i++, t.insert--, !(t.lookahead + t.insert < $)); ) ;
|
|
2772
|
+
} while (t.lookahead < At && t.strm.avail_in !== 0);
|
|
2773
|
+
}
|
|
2774
|
+
function Gn(t, e) {
|
|
2775
|
+
for (var n, r; ; ) {
|
|
2776
|
+
if (t.lookahead < At) {
|
|
2777
|
+
if (Je(t), t.lookahead < At && e === we) return lt;
|
|
2778
|
+
if (t.lookahead === 0) break;
|
|
2779
|
+
}
|
|
2780
|
+
if (n = 0, t.lookahead >= $ && (t.ins_h = (t.ins_h << t.hash_shift ^ t.window[t.strstart + $ - 1]) & t.hash_mask, n = t.prev[t.strstart & t.w_mask] = t.head[t.ins_h], t.head[t.ins_h] = t.strstart), n !== 0 && t.strstart - n <= t.w_size - At && (t.match_length = Da(t, n)), t.match_length >= $) if (r = qt(t, t.strstart - t.match_start, t.match_length - $), t.lookahead -= t.match_length, t.match_length <= t.max_lazy_match && t.lookahead >= $) {
|
|
2781
|
+
t.match_length--;
|
|
2782
|
+
do
|
|
2783
|
+
t.strstart++, t.ins_h = (t.ins_h << t.hash_shift ^ t.window[t.strstart + $ - 1]) & t.hash_mask, n = t.prev[t.strstart & t.w_mask] = t.head[t.ins_h], t.head[t.ins_h] = t.strstart;
|
|
2784
|
+
while (--t.match_length != 0);
|
|
2785
|
+
t.strstart++;
|
|
2786
|
+
} else t.strstart += t.match_length, t.match_length = 0, t.ins_h = t.window[t.strstart], t.ins_h = (t.ins_h << t.hash_shift ^ t.window[t.strstart + 1]) & t.hash_mask;
|
|
2787
|
+
else r = qt(t, 0, t.window[t.strstart]), t.lookahead--, t.strstart++;
|
|
2788
|
+
if (r && (ct(t, !1), t.strm.avail_out === 0)) return lt;
|
|
2789
|
+
}
|
|
2790
|
+
return t.insert = t.strstart < $ - 1 ? t.strstart : $ - 1, e === jt ? (ct(t, !0), t.strm.avail_out === 0 ? ce : ze) : t.last_lit && (ct(t, !1), t.strm.avail_out === 0) ? lt : We;
|
|
2791
|
+
}
|
|
2792
|
+
function xe(t, e) {
|
|
2793
|
+
for (var n, r, a; ; ) {
|
|
2794
|
+
if (t.lookahead < At) {
|
|
2795
|
+
if (Je(t), t.lookahead < At && e === we) return lt;
|
|
2796
|
+
if (t.lookahead === 0) break;
|
|
2797
|
+
}
|
|
2798
|
+
if (n = 0, t.lookahead >= $ && (t.ins_h = (t.ins_h << t.hash_shift ^ t.window[t.strstart + $ - 1]) & t.hash_mask, n = t.prev[t.strstart & t.w_mask] = t.head[t.ins_h], t.head[t.ins_h] = t.strstart), t.prev_length = t.match_length, t.prev_match = t.match_start, t.match_length = $ - 1, n !== 0 && t.prev_length < t.max_lazy_match && t.strstart - n <= t.w_size - At && (t.match_length = Da(t, n), t.match_length <= 5 && (t.strategy === as || t.match_length === $ && t.strstart - t.match_start > 4096) && (t.match_length = $ - 1)), t.prev_length >= $ && t.match_length <= t.prev_length) {
|
|
2799
|
+
a = t.strstart + t.lookahead - $, r = qt(t, t.strstart - 1 - t.prev_match, t.prev_length - $), t.lookahead -= t.prev_length - 1, t.prev_length -= 2;
|
|
2800
|
+
do
|
|
2801
|
+
++t.strstart <= a && (t.ins_h = (t.ins_h << t.hash_shift ^ t.window[t.strstart + $ - 1]) & t.hash_mask, n = t.prev[t.strstart & t.w_mask] = t.head[t.ins_h], t.head[t.ins_h] = t.strstart);
|
|
2802
|
+
while (--t.prev_length != 0);
|
|
2803
|
+
if (t.match_available = 0, t.match_length = $ - 1, t.strstart++, r && (ct(t, !1), t.strm.avail_out === 0)) return lt;
|
|
2804
|
+
} else if (t.match_available) {
|
|
2805
|
+
if ((r = qt(t, 0, t.window[t.strstart - 1])) && ct(t, !1), t.strstart++, t.lookahead--, t.strm.avail_out === 0) return lt;
|
|
2806
|
+
} else t.match_available = 1, t.strstart++, t.lookahead--;
|
|
2807
|
+
}
|
|
2808
|
+
return t.match_available && (r = qt(t, 0, t.window[t.strstart - 1]), t.match_available = 0), t.insert = t.strstart < $ - 1 ? t.strstart : $ - 1, e === jt ? (ct(t, !0), t.strm.avail_out === 0 ? ce : ze) : t.last_lit && (ct(t, !1), t.strm.avail_out === 0) ? lt : We;
|
|
2809
|
+
}
|
|
2810
|
+
function Bt(t, e, n, r, a) {
|
|
2811
|
+
this.good_length = t, this.max_lazy = e, this.nice_length = n, this.max_chain = r, this.func = a;
|
|
2812
|
+
}
|
|
2813
|
+
function gs() {
|
|
2814
|
+
this.strm = null, this.status = 0, this.pending_buf = null, this.pending_buf_size = 0, this.pending_out = 0, this.pending = 0, this.wrap = 0, this.gzhead = null, this.gzindex = 0, this.method = yr, this.last_flush = -1, this.w_size = 0, this.w_bits = 0, this.w_mask = 0, this.window = null, this.window_size = 0, this.prev = null, this.head = null, this.ins_h = 0, this.hash_size = 0, this.hash_bits = 0, this.hash_mask = 0, this.hash_shift = 0, this.block_start = 0, this.match_length = 0, this.prev_match = 0, this.match_available = 0, this.strstart = 0, this.match_start = 0, this.lookahead = 0, this.prev_length = 0, this.max_chain_length = 0, this.max_lazy_match = 0, this.level = 0, this.strategy = 0, this.good_match = 0, this.nice_match = 0, this.dyn_ltree = new St(2 * us), this.dyn_dtree = new St(2 * (2 * cs + 1)), this.bl_tree = new St(2 * (2 * fs + 1)), oe(this.dyn_ltree), oe(this.dyn_dtree), oe(this.bl_tree), this.l_desc = null, this.d_desc = null, this.bl_desc = null, this.bl_count = new St(ds + 1), this.heap = new St(2 * lr + 1), oe(this.heap), this.heap_len = 0, this.heap_max = 0, this.depth = new St(2 * lr + 1), oe(this.depth), this.l_buf = 0, this.lit_bufsize = 0, this.last_lit = 0, this.d_buf = 0, this.opt_len = 0, this.static_len = 0, this.matches = 0, this.insert = 0, this.bi_buf = 0, this.bi_valid = 0;
|
|
2815
|
+
}
|
|
2816
|
+
function yi(t) {
|
|
2817
|
+
var e, n = (function(r) {
|
|
2818
|
+
var a;
|
|
2819
|
+
return r && r.state ? (r.total_in = r.total_out = 0, r.data_type = ls, (a = r.state).pending = 0, a.pending_out = 0, a.wrap < 0 && (a.wrap = -a.wrap), a.status = a.wrap ? br : he, r.adler = a.wrap === 2 ? 0 : 1, a.last_flush = we, $o(a), ae) : Kt(r, me);
|
|
2820
|
+
})(t);
|
|
2821
|
+
return n === ae && ((e = t.state).window_size = 2 * e.w_size, oe(e.head), e.max_lazy_match = Ae[e.level].max_lazy, e.good_match = Ae[e.level].good_length, e.nice_match = Ae[e.level].nice_length, e.max_chain_length = Ae[e.level].max_chain, e.strstart = 0, e.block_start = 0, e.lookahead = 0, e.insert = 0, e.match_length = e.prev_length = $ - 1, e.match_available = 0, e.ins_h = 0), n;
|
|
2822
|
+
}
|
|
2823
|
+
function vs(t, e) {
|
|
2824
|
+
var n, r, a, i;
|
|
2825
|
+
if (!t || !t.state || e > vi || e < 0) return t ? Kt(t, me) : me;
|
|
2826
|
+
if (r = t.state, !t.output || !t.input && t.avail_in !== 0 || r.status === Fe && e !== jt) return Kt(t, t.avail_out === 0 ? Kn : me);
|
|
2827
|
+
if (r.strm = t, n = r.last_flush, r.last_flush = e, r.status === br) if (r.wrap === 2) t.adler = 0, X(r, 31), X(r, 139), X(r, 8), r.gzhead ? (X(r, (r.gzhead.text ? 1 : 0) + (r.gzhead.hcrc ? 2 : 0) + (r.gzhead.extra ? 4 : 0) + (r.gzhead.name ? 8 : 0) + (r.gzhead.comment ? 16 : 0)), X(r, 255 & r.gzhead.time), X(r, r.gzhead.time >> 8 & 255), X(r, r.gzhead.time >> 16 & 255), X(r, r.gzhead.time >> 24 & 255), X(r, r.level === 9 ? 2 : r.strategy >= ln || r.level < 2 ? 4 : 0), X(r, 255 & r.gzhead.os), r.gzhead.extra && r.gzhead.extra.length && (X(r, 255 & r.gzhead.extra.length), X(r, r.gzhead.extra.length >> 8 & 255)), r.gzhead.hcrc && (t.adler = st(t.adler, r.pending_buf, r.pending, 0)), r.gzindex = 0, r.status = hr) : (X(r, 0), X(r, 0), X(r, 0), X(r, 0), X(r, 0), X(r, r.level === 9 ? 2 : r.strategy >= ln || r.level < 2 ? 4 : 0), X(r, _s), r.status = he);
|
|
2828
|
+
else {
|
|
2829
|
+
var s = yr + (r.w_bits - 8 << 4) << 8;
|
|
2830
|
+
s |= (r.strategy >= ln || r.level < 2 ? 0 : r.level < 6 ? 1 : r.level === 6 ? 2 : 3) << 6, r.strstart !== 0 && (s |= ps), s += 31 - s % 31, r.status = he, He(r, s), r.strstart !== 0 && (He(r, t.adler >>> 16), He(r, 65535 & t.adler)), t.adler = 1;
|
|
2831
|
+
}
|
|
2832
|
+
if (r.status === hr) if (r.gzhead.extra) {
|
|
2833
|
+
for (a = r.pending; r.gzindex < (65535 & r.gzhead.extra.length) && (r.pending !== r.pending_buf_size || (r.gzhead.hcrc && r.pending > a && (t.adler = st(t.adler, r.pending_buf, r.pending - a, a)), Vt(t), a = r.pending, r.pending !== r.pending_buf_size)); ) X(r, 255 & r.gzhead.extra[r.gzindex]), r.gzindex++;
|
|
2834
|
+
r.gzhead.hcrc && r.pending > a && (t.adler = st(t.adler, r.pending_buf, r.pending - a, a)), r.gzindex === r.gzhead.extra.length && (r.gzindex = 0, r.status = gn);
|
|
2835
|
+
} else r.status = gn;
|
|
2836
|
+
if (r.status === gn) if (r.gzhead.name) {
|
|
2837
|
+
a = r.pending;
|
|
2838
|
+
do {
|
|
2839
|
+
if (r.pending === r.pending_buf_size && (r.gzhead.hcrc && r.pending > a && (t.adler = st(t.adler, r.pending_buf, r.pending - a, a)), Vt(t), a = r.pending, r.pending === r.pending_buf_size)) {
|
|
2840
|
+
i = 1;
|
|
2841
|
+
break;
|
|
2842
|
+
}
|
|
2843
|
+
i = r.gzindex < r.gzhead.name.length ? 255 & r.gzhead.name.charCodeAt(r.gzindex++) : 0, X(r, i);
|
|
2844
|
+
} while (i !== 0);
|
|
2845
|
+
r.gzhead.hcrc && r.pending > a && (t.adler = st(t.adler, r.pending_buf, r.pending - a, a)), i === 0 && (r.gzindex = 0, r.status = vn);
|
|
2846
|
+
} else r.status = vn;
|
|
2847
|
+
if (r.status === vn) if (r.gzhead.comment) {
|
|
2848
|
+
a = r.pending;
|
|
2849
|
+
do {
|
|
2850
|
+
if (r.pending === r.pending_buf_size && (r.gzhead.hcrc && r.pending > a && (t.adler = st(t.adler, r.pending_buf, r.pending - a, a)), Vt(t), a = r.pending, r.pending === r.pending_buf_size)) {
|
|
2851
|
+
i = 1;
|
|
2852
|
+
break;
|
|
2853
|
+
}
|
|
2854
|
+
i = r.gzindex < r.gzhead.comment.length ? 255 & r.gzhead.comment.charCodeAt(r.gzindex++) : 0, X(r, i);
|
|
2855
|
+
} while (i !== 0);
|
|
2856
|
+
r.gzhead.hcrc && r.pending > a && (t.adler = st(t.adler, r.pending_buf, r.pending - a, a)), i === 0 && (r.status = wn);
|
|
2857
|
+
} else r.status = wn;
|
|
2858
|
+
if (r.status === wn && (r.gzhead.hcrc ? (r.pending + 2 > r.pending_buf_size && Vt(t), r.pending + 2 <= r.pending_buf_size && (X(r, 255 & t.adler), X(r, t.adler >> 8 & 255), t.adler = 0, r.status = he)) : r.status = he), r.pending !== 0) {
|
|
2859
|
+
if (Vt(t), t.avail_out === 0) return r.last_flush = -1, ae;
|
|
2860
|
+
} else if (t.avail_in === 0 && mi(e) <= mi(n) && e !== jt) return Kt(t, Kn);
|
|
2861
|
+
if (r.status === Fe && t.avail_in !== 0) return Kt(t, Kn);
|
|
2862
|
+
if (t.avail_in !== 0 || r.lookahead !== 0 || e !== we && r.status !== Fe) {
|
|
2863
|
+
var l = r.strategy === ln ? (function(h, o) {
|
|
2864
|
+
for (var c; ; ) {
|
|
2865
|
+
if (h.lookahead === 0 && (Je(h), h.lookahead === 0)) {
|
|
2866
|
+
if (o === we) return lt;
|
|
2867
|
+
break;
|
|
2868
|
+
}
|
|
2869
|
+
if (h.match_length = 0, c = qt(h, 0, h.window[h.strstart]), h.lookahead--, h.strstart++, c && (ct(h, !1), h.strm.avail_out === 0)) return lt;
|
|
2870
|
+
}
|
|
2871
|
+
return h.insert = 0, o === jt ? (ct(h, !0), h.strm.avail_out === 0 ? ce : ze) : h.last_lit && (ct(h, !1), h.strm.avail_out === 0) ? lt : We;
|
|
2872
|
+
})(r, e) : r.strategy === os ? (function(h, o) {
|
|
2873
|
+
for (var c, u, p, f, _ = h.window; ; ) {
|
|
2874
|
+
if (h.lookahead <= Yt) {
|
|
2875
|
+
if (Je(h), h.lookahead <= Yt && o === we) return lt;
|
|
2876
|
+
if (h.lookahead === 0) break;
|
|
2877
|
+
}
|
|
2878
|
+
if (h.match_length = 0, h.lookahead >= $ && h.strstart > 0 && (u = _[p = h.strstart - 1]) === _[++p] && u === _[++p] && u === _[++p]) {
|
|
2879
|
+
f = h.strstart + Yt;
|
|
2880
|
+
do
|
|
2881
|
+
;
|
|
2882
|
+
while (u === _[++p] && u === _[++p] && u === _[++p] && u === _[++p] && u === _[++p] && u === _[++p] && u === _[++p] && u === _[++p] && p < f);
|
|
2883
|
+
h.match_length = Yt - (f - p), h.match_length > h.lookahead && (h.match_length = h.lookahead);
|
|
2884
|
+
}
|
|
2885
|
+
if (h.match_length >= $ ? (c = qt(h, 1, h.match_length - $), h.lookahead -= h.match_length, h.strstart += h.match_length, h.match_length = 0) : (c = qt(h, 0, h.window[h.strstart]), h.lookahead--, h.strstart++), c && (ct(h, !1), h.strm.avail_out === 0)) return lt;
|
|
2886
|
+
}
|
|
2887
|
+
return h.insert = 0, o === jt ? (ct(h, !0), h.strm.avail_out === 0 ? ce : ze) : h.last_lit && (ct(h, !1), h.strm.avail_out === 0) ? lt : We;
|
|
2888
|
+
})(r, e) : Ae[r.level].func(r, e);
|
|
2889
|
+
if (l !== ce && l !== ze || (r.status = Fe), l === lt || l === ce) return t.avail_out === 0 && (r.last_flush = -1), ae;
|
|
2890
|
+
if (l === We && (e === es ? Jo(r) : e !== vi && (Ma(r, 0, 0, !1), e === ns && (oe(r.head), r.lookahead === 0 && (r.strstart = 0, r.block_start = 0, r.insert = 0))), Vt(t), t.avail_out === 0)) return r.last_flush = -1, ae;
|
|
2891
|
+
}
|
|
2892
|
+
return e !== jt ? ae : r.wrap <= 0 ? wi : (r.wrap === 2 ? (X(r, 255 & t.adler), X(r, t.adler >> 8 & 255), X(r, t.adler >> 16 & 255), X(r, t.adler >> 24 & 255), X(r, 255 & t.total_in), X(r, t.total_in >> 8 & 255), X(r, t.total_in >> 16 & 255), X(r, t.total_in >> 24 & 255)) : (He(r, t.adler >>> 16), He(r, 65535 & t.adler)), Vt(t), r.wrap > 0 && (r.wrap = -r.wrap), r.pending !== 0 ? ae : wi);
|
|
2893
|
+
}
|
|
2894
|
+
Ae = [new Bt(0, 0, 0, 0, function(t, e) {
|
|
2895
|
+
var n = 65535;
|
|
2896
|
+
for (n > t.pending_buf_size - 5 && (n = t.pending_buf_size - 5); ; ) {
|
|
2897
|
+
if (t.lookahead <= 1) {
|
|
2898
|
+
if (Je(t), t.lookahead === 0 && e === we) return lt;
|
|
2899
|
+
if (t.lookahead === 0) break;
|
|
2900
|
+
}
|
|
2901
|
+
t.strstart += t.lookahead, t.lookahead = 0;
|
|
2902
|
+
var r = t.block_start + n;
|
|
2903
|
+
if ((t.strstart === 0 || t.strstart >= r) && (t.lookahead = t.strstart - r, t.strstart = r, ct(t, !1), t.strm.avail_out === 0) || t.strstart - t.block_start >= t.w_size - At && (ct(t, !1), t.strm.avail_out === 0)) return lt;
|
|
2904
|
+
}
|
|
2905
|
+
return t.insert = 0, e === jt ? (ct(t, !0), t.strm.avail_out === 0 ? ce : ze) : (t.strstart > t.block_start && (ct(t, !1), t.strm.avail_out), lt);
|
|
2906
|
+
}), new Bt(4, 4, 8, 4, Gn), new Bt(4, 5, 16, 8, Gn), new Bt(4, 6, 32, 32, Gn), new Bt(4, 4, 16, 16, xe), new Bt(8, 16, 32, 32, xe), new Bt(8, 16, 128, 128, xe), new Bt(8, 32, 128, 256, xe), new Bt(32, 128, 258, 1024, xe), new Bt(32, 258, 258, 4096, xe)];
|
|
2907
|
+
var hn = 30, ws = 12;
|
|
2908
|
+
function ms(t, e) {
|
|
2909
|
+
var n, r, a, i, s, l, h, o, c, u, p, f, _, g, d, v, w, m, y, x, S, k, E, B, b;
|
|
2910
|
+
n = t.state, r = t.next_in, B = t.input, a = r + (t.avail_in - 5), i = t.next_out, b = t.output, s = i - (e - t.avail_out), l = i + (t.avail_out - 257), h = n.dmax, o = n.wsize, c = n.whave, u = n.wnext, p = n.window, f = n.hold, _ = n.bits, g = n.lencode, d = n.distcode, v = (1 << n.lenbits) - 1, w = (1 << n.distbits) - 1;
|
|
2911
|
+
t: do {
|
|
2912
|
+
_ < 15 && (f += B[r++] << _, _ += 8, f += B[r++] << _, _ += 8), m = g[f & v];
|
|
2913
|
+
e: for (; ; ) {
|
|
2914
|
+
if (f >>>= y = m >>> 24, _ -= y, (y = m >>> 16 & 255) === 0) b[i++] = 65535 & m;
|
|
2915
|
+
else {
|
|
2916
|
+
if (!(16 & y)) {
|
|
2917
|
+
if ((64 & y) == 0) {
|
|
2918
|
+
m = g[(65535 & m) + (f & (1 << y) - 1)];
|
|
2919
|
+
continue e;
|
|
2920
|
+
}
|
|
2921
|
+
if (32 & y) {
|
|
2922
|
+
n.mode = ws;
|
|
2923
|
+
break t;
|
|
2924
|
+
}
|
|
2925
|
+
t.msg = "invalid literal/length code", n.mode = hn;
|
|
2926
|
+
break t;
|
|
2927
|
+
}
|
|
2928
|
+
x = 65535 & m, (y &= 15) && (_ < y && (f += B[r++] << _, _ += 8), x += f & (1 << y) - 1, f >>>= y, _ -= y), _ < 15 && (f += B[r++] << _, _ += 8, f += B[r++] << _, _ += 8), m = d[f & w];
|
|
2929
|
+
n: for (; ; ) {
|
|
2930
|
+
if (f >>>= y = m >>> 24, _ -= y, !(16 & (y = m >>> 16 & 255))) {
|
|
2931
|
+
if ((64 & y) == 0) {
|
|
2932
|
+
m = d[(65535 & m) + (f & (1 << y) - 1)];
|
|
2933
|
+
continue n;
|
|
2934
|
+
}
|
|
2935
|
+
t.msg = "invalid distance code", n.mode = hn;
|
|
2936
|
+
break t;
|
|
2937
|
+
}
|
|
2938
|
+
if (S = 65535 & m, _ < (y &= 15) && (f += B[r++] << _, (_ += 8) < y && (f += B[r++] << _, _ += 8)), (S += f & (1 << y) - 1) > h) {
|
|
2939
|
+
t.msg = "invalid distance too far back", n.mode = hn;
|
|
2940
|
+
break t;
|
|
2941
|
+
}
|
|
2942
|
+
if (f >>>= y, _ -= y, S > (y = i - s)) {
|
|
2943
|
+
if ((y = S - y) > c && n.sane) {
|
|
2944
|
+
t.msg = "invalid distance too far back", n.mode = hn;
|
|
2945
|
+
break t;
|
|
2946
|
+
}
|
|
2947
|
+
if (k = 0, E = p, u === 0) {
|
|
2948
|
+
if (k += o - y, y < x) {
|
|
2949
|
+
x -= y;
|
|
2950
|
+
do
|
|
2951
|
+
b[i++] = p[k++];
|
|
2952
|
+
while (--y);
|
|
2953
|
+
k = i - S, E = b;
|
|
2954
|
+
}
|
|
2955
|
+
} else if (u < y) {
|
|
2956
|
+
if (k += o + u - y, (y -= u) < x) {
|
|
2957
|
+
x -= y;
|
|
2958
|
+
do
|
|
2959
|
+
b[i++] = p[k++];
|
|
2960
|
+
while (--y);
|
|
2961
|
+
if (k = 0, u < x) {
|
|
2962
|
+
x -= y = u;
|
|
2963
|
+
do
|
|
2964
|
+
b[i++] = p[k++];
|
|
2965
|
+
while (--y);
|
|
2966
|
+
k = i - S, E = b;
|
|
2967
|
+
}
|
|
2968
|
+
}
|
|
2969
|
+
} else if (k += u - y, y < x) {
|
|
2970
|
+
x -= y;
|
|
2971
|
+
do
|
|
2972
|
+
b[i++] = p[k++];
|
|
2973
|
+
while (--y);
|
|
2974
|
+
k = i - S, E = b;
|
|
2975
|
+
}
|
|
2976
|
+
for (; x > 2; ) b[i++] = E[k++], b[i++] = E[k++], b[i++] = E[k++], x -= 3;
|
|
2977
|
+
x && (b[i++] = E[k++], x > 1 && (b[i++] = E[k++]));
|
|
2978
|
+
} else {
|
|
2979
|
+
k = i - S;
|
|
2980
|
+
do
|
|
2981
|
+
b[i++] = b[k++], b[i++] = b[k++], b[i++] = b[k++], x -= 3;
|
|
2982
|
+
while (x > 2);
|
|
2983
|
+
x && (b[i++] = b[k++], x > 1 && (b[i++] = b[k++]));
|
|
2984
|
+
}
|
|
2985
|
+
break;
|
|
2986
|
+
}
|
|
2987
|
+
}
|
|
2988
|
+
break;
|
|
2989
|
+
}
|
|
2990
|
+
} while (r < a && i < l);
|
|
2991
|
+
r -= x = _ >> 3, f &= (1 << (_ -= x << 3)) - 1, t.next_in = r, t.next_out = i, t.avail_in = r < a ? a - r + 5 : 5 - (r - a), t.avail_out = i < l ? l - i + 257 : 257 - (i - l), n.hold = f, n.bits = _;
|
|
2992
|
+
}
|
|
2993
|
+
var Re = 15, bi = 852, ki = 592, Ei = 0, qn = 1, Si = 2, ys = [3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0], bs = [16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78], ks = [1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 0, 0], Es = [16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 64, 64];
|
|
2994
|
+
function Ye(t, e, n, r, a, i, s, l) {
|
|
2995
|
+
var h, o, c, u, p, f, _, g, d, v = l.bits, w = 0, m = 0, y = 0, x = 0, S = 0, k = 0, E = 0, B = 0, b = 0, R = 0, D = null, T = 0, P = new St(Re + 1), N = new St(Re + 1), Z = null, V = 0;
|
|
2996
|
+
for (w = 0; w <= Re; w++) P[w] = 0;
|
|
2997
|
+
for (m = 0; m < r; m++) P[e[n + m]]++;
|
|
2998
|
+
for (S = v, x = Re; x >= 1 && P[x] === 0; x--) ;
|
|
2999
|
+
if (S > x && (S = x), x === 0) return a[i++] = 20971520, a[i++] = 20971520, l.bits = 1, 0;
|
|
3000
|
+
for (y = 1; y < x && P[y] === 0; y++) ;
|
|
3001
|
+
for (S < y && (S = y), B = 1, w = 1; w <= Re; w++) if (B <<= 1, (B -= P[w]) < 0) return -1;
|
|
3002
|
+
if (B > 0 && (t === Ei || x !== 1)) return -1;
|
|
3003
|
+
for (N[1] = 0, w = 1; w < Re; w++) N[w + 1] = N[w] + P[w];
|
|
3004
|
+
for (m = 0; m < r; m++) e[n + m] !== 0 && (s[N[e[n + m]]++] = m);
|
|
3005
|
+
if (t === Ei ? (D = Z = s, f = 19) : t === qn ? (D = ys, T -= 257, Z = bs, V -= 257, f = 256) : (D = ks, Z = Es, f = -1), R = 0, m = 0, w = y, p = i, k = S, E = 0, c = -1, u = (b = 1 << S) - 1, t === qn && b > bi || t === Si && b > ki) return 1;
|
|
3006
|
+
for (; ; ) {
|
|
3007
|
+
_ = w - E, s[m] < f ? (g = 0, d = s[m]) : s[m] > f ? (g = Z[V + s[m]], d = D[T + s[m]]) : (g = 96, d = 0), h = 1 << w - E, y = o = 1 << k;
|
|
3008
|
+
do
|
|
3009
|
+
a[p + (R >> E) + (o -= h)] = _ << 24 | g << 16 | d | 0;
|
|
3010
|
+
while (o !== 0);
|
|
3011
|
+
for (h = 1 << w - 1; R & h; ) h >>= 1;
|
|
3012
|
+
if (h !== 0 ? (R &= h - 1, R += h) : R = 0, m++, --P[w] == 0) {
|
|
3013
|
+
if (w === x) break;
|
|
3014
|
+
w = e[n + s[m]];
|
|
3015
|
+
}
|
|
3016
|
+
if (w > S && (R & u) !== c) {
|
|
3017
|
+
for (E === 0 && (E = S), p += y, B = 1 << (k = w - E); k + E < x && !((B -= P[k + E]) <= 0); ) k++, B <<= 1;
|
|
3018
|
+
if (b += 1 << k, t === qn && b > bi || t === Si && b > ki) return 1;
|
|
3019
|
+
a[c = R & u] = S << 24 | k << 16 | p - i | 0;
|
|
3020
|
+
}
|
|
3021
|
+
}
|
|
3022
|
+
return R !== 0 && (a[p + R] = w - E << 24 | 64 << 16 | 0), l.bits = S, 0;
|
|
3023
|
+
}
|
|
3024
|
+
var Ss = 0, Pa = 1, Oa = 2, xi = 4, xs = 5, cn = 6, An = 0, Rs = 1, As = 2, Xt = -2, Bs = -3, Ts = -4, Ls = -5, Ri = 8, Ua = 1, Ai = 2, Bi = 3, Ti = 4, Li = 5, zi = 6, Ci = 7, Ii = 8, Mi = 9, Di = 10, Pi = 11, Dt = 12, Xn = 13, Oi = 14, $n = 15, Ui = 16, Ni = 17, Hi = 18, Fi = 19, fn = 20, un = 21, Zi = 22, Vi = 23, ji = 24, Wi = 25, Yi = 26, Jn = 27, Ki = 28, Gi = 29, Q = 30, zs = 31, Cs = 32, Is = 852, Ms = 592;
|
|
3025
|
+
function qi(t) {
|
|
3026
|
+
return (t >>> 24 & 255) + (t >>> 8 & 65280) + ((65280 & t) << 8) + ((255 & t) << 24);
|
|
3027
|
+
}
|
|
3028
|
+
function Ds() {
|
|
3029
|
+
this.mode = 0, this.last = !1, this.wrap = 0, this.havedict = !1, this.flags = 0, this.dmax = 0, this.check = 0, this.total = 0, this.head = null, this.wbits = 0, this.wsize = 0, this.whave = 0, this.wnext = 0, this.window = null, this.hold = 0, this.bits = 0, this.length = 0, this.offset = 0, this.extra = 0, this.lencode = null, this.distcode = null, this.lenbits = 0, this.distbits = 0, this.ncode = 0, this.nlen = 0, this.ndist = 0, this.have = 0, this.next = null, this.lens = new St(320), this.work = new St(288), this.lendyn = null, this.distdyn = null, this.sane = 0, this.back = 0, this.was = 0;
|
|
3030
|
+
}
|
|
3031
|
+
function Na(t) {
|
|
3032
|
+
var e;
|
|
3033
|
+
return t && t.state ? ((e = t.state).wsize = 0, e.whave = 0, e.wnext = 0, (function(n) {
|
|
3034
|
+
var r;
|
|
3035
|
+
return n && n.state ? (r = n.state, n.total_in = n.total_out = r.total = 0, n.msg = "", r.wrap && (n.adler = 1 & r.wrap), r.mode = Ua, r.last = 0, r.havedict = 0, r.dmax = 32768, r.head = null, r.hold = 0, r.bits = 0, r.lencode = r.lendyn = new xn(Is), r.distcode = r.distdyn = new xn(Ms), r.sane = 1, r.back = -1, An) : Xt;
|
|
3036
|
+
})(t)) : Xt;
|
|
3037
|
+
}
|
|
3038
|
+
function Ps(t, e) {
|
|
3039
|
+
var n, r;
|
|
3040
|
+
return t ? (r = new Ds(), t.state = r, r.window = null, (n = (function(a, i) {
|
|
3041
|
+
var s, l;
|
|
3042
|
+
return a && a.state ? (l = a.state, i < 0 ? (s = 0, i = -i) : (s = 1 + (i >> 4), i < 48 && (i &= 15)), i && (i < 8 || i > 15) ? Xt : (l.window !== null && l.wbits !== i && (l.window = null), l.wrap = s, l.wbits = i, Na(a))) : Xt;
|
|
3043
|
+
})(t, e)) !== An && (t.state = null), n) : Xt;
|
|
3044
|
+
}
|
|
3045
|
+
var Qn, tr, Xi = !0;
|
|
3046
|
+
function Os(t) {
|
|
3047
|
+
if (Xi) {
|
|
3048
|
+
var e;
|
|
3049
|
+
for (Qn = new xn(512), tr = new xn(32), e = 0; e < 144; ) t.lens[e++] = 8;
|
|
3050
|
+
for (; e < 256; ) t.lens[e++] = 9;
|
|
3051
|
+
for (; e < 280; ) t.lens[e++] = 7;
|
|
3052
|
+
for (; e < 288; ) t.lens[e++] = 8;
|
|
3053
|
+
for (Ye(Pa, t.lens, 0, 288, Qn, 0, t.work, { bits: 9 }), e = 0; e < 32; ) t.lens[e++] = 5;
|
|
3054
|
+
Ye(Oa, t.lens, 0, 32, tr, 0, t.work, { bits: 5 }), Xi = !1;
|
|
3055
|
+
}
|
|
3056
|
+
t.lencode = Qn, t.lenbits = 9, t.distcode = tr, t.distbits = 5;
|
|
3057
|
+
}
|
|
3058
|
+
function Us(t, e) {
|
|
3059
|
+
var n, r, a, i, s, l, h, o, c, u, p, f, _, g, d, v, w, m, y, x, S, k, E, B, b = 0, R = new Sn(4), D = [16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15];
|
|
3060
|
+
if (!t || !t.state || !t.output || !t.input && t.avail_in !== 0) return Xt;
|
|
3061
|
+
(n = t.state).mode === Dt && (n.mode = Xn), s = t.next_out, a = t.output, h = t.avail_out, i = t.next_in, r = t.input, l = t.avail_in, o = n.hold, c = n.bits, u = l, p = h, k = An;
|
|
3062
|
+
t: for (; ; ) switch (n.mode) {
|
|
3063
|
+
case Ua:
|
|
3064
|
+
if (n.wrap === 0) {
|
|
3065
|
+
n.mode = Xn;
|
|
3066
|
+
break;
|
|
3067
|
+
}
|
|
3068
|
+
for (; c < 16; ) {
|
|
3069
|
+
if (l === 0) break t;
|
|
3070
|
+
l--, o += r[i++] << c, c += 8;
|
|
3071
|
+
}
|
|
3072
|
+
if (2 & n.wrap && o === 35615) {
|
|
3073
|
+
n.check = 0, R[0] = 255 & o, R[1] = o >>> 8 & 255, n.check = st(n.check, R, 2, 0), o = 0, c = 0, n.mode = Ai;
|
|
3074
|
+
break;
|
|
3075
|
+
}
|
|
3076
|
+
if (n.flags = 0, n.head && (n.head.done = !1), !(1 & n.wrap) || (((255 & o) << 8) + (o >> 8)) % 31) {
|
|
3077
|
+
t.msg = "incorrect header check", n.mode = Q;
|
|
3078
|
+
break;
|
|
3079
|
+
}
|
|
3080
|
+
if ((15 & o) !== Ri) {
|
|
3081
|
+
t.msg = "unknown compression method", n.mode = Q;
|
|
3082
|
+
break;
|
|
3083
|
+
}
|
|
3084
|
+
if (c -= 4, S = 8 + (15 & (o >>>= 4)), n.wbits === 0) n.wbits = S;
|
|
3085
|
+
else if (S > n.wbits) {
|
|
3086
|
+
t.msg = "invalid window size", n.mode = Q;
|
|
3087
|
+
break;
|
|
3088
|
+
}
|
|
3089
|
+
n.dmax = 1 << S, t.adler = n.check = 1, n.mode = 512 & o ? Di : Dt, o = 0, c = 0;
|
|
3090
|
+
break;
|
|
3091
|
+
case Ai:
|
|
3092
|
+
for (; c < 16; ) {
|
|
3093
|
+
if (l === 0) break t;
|
|
3094
|
+
l--, o += r[i++] << c, c += 8;
|
|
3095
|
+
}
|
|
3096
|
+
if (n.flags = o, (255 & n.flags) !== Ri) {
|
|
3097
|
+
t.msg = "unknown compression method", n.mode = Q;
|
|
3098
|
+
break;
|
|
3099
|
+
}
|
|
3100
|
+
if (57344 & n.flags) {
|
|
3101
|
+
t.msg = "unknown header flags set", n.mode = Q;
|
|
3102
|
+
break;
|
|
3103
|
+
}
|
|
3104
|
+
n.head && (n.head.text = o >> 8 & 1), 512 & n.flags && (R[0] = 255 & o, R[1] = o >>> 8 & 255, n.check = st(n.check, R, 2, 0)), o = 0, c = 0, n.mode = Bi;
|
|
3105
|
+
case Bi:
|
|
3106
|
+
for (; c < 32; ) {
|
|
3107
|
+
if (l === 0) break t;
|
|
3108
|
+
l--, o += r[i++] << c, c += 8;
|
|
3109
|
+
}
|
|
3110
|
+
n.head && (n.head.time = o), 512 & n.flags && (R[0] = 255 & o, R[1] = o >>> 8 & 255, R[2] = o >>> 16 & 255, R[3] = o >>> 24 & 255, n.check = st(n.check, R, 4, 0)), o = 0, c = 0, n.mode = Ti;
|
|
3111
|
+
case Ti:
|
|
3112
|
+
for (; c < 16; ) {
|
|
3113
|
+
if (l === 0) break t;
|
|
3114
|
+
l--, o += r[i++] << c, c += 8;
|
|
3115
|
+
}
|
|
3116
|
+
n.head && (n.head.xflags = 255 & o, n.head.os = o >> 8), 512 & n.flags && (R[0] = 255 & o, R[1] = o >>> 8 & 255, n.check = st(n.check, R, 2, 0)), o = 0, c = 0, n.mode = Li;
|
|
3117
|
+
case Li:
|
|
3118
|
+
if (1024 & n.flags) {
|
|
3119
|
+
for (; c < 16; ) {
|
|
3120
|
+
if (l === 0) break t;
|
|
3121
|
+
l--, o += r[i++] << c, c += 8;
|
|
3122
|
+
}
|
|
3123
|
+
n.length = o, n.head && (n.head.extra_len = o), 512 & n.flags && (R[0] = 255 & o, R[1] = o >>> 8 & 255, n.check = st(n.check, R, 2, 0)), o = 0, c = 0;
|
|
3124
|
+
} else n.head && (n.head.extra = null);
|
|
3125
|
+
n.mode = zi;
|
|
3126
|
+
case zi:
|
|
3127
|
+
if (1024 & n.flags && ((f = n.length) > l && (f = l), f && (n.head && (S = n.head.extra_len - n.length, n.head.extra || (n.head.extra = new Array(n.head.extra_len)), Ot(n.head.extra, r, i, f, S)), 512 & n.flags && (n.check = st(n.check, r, f, i)), l -= f, i += f, n.length -= f), n.length)) break t;
|
|
3128
|
+
n.length = 0, n.mode = Ci;
|
|
3129
|
+
case Ci:
|
|
3130
|
+
if (2048 & n.flags) {
|
|
3131
|
+
if (l === 0) break t;
|
|
3132
|
+
f = 0;
|
|
3133
|
+
do
|
|
3134
|
+
S = r[i + f++], n.head && S && n.length < 65536 && (n.head.name += String.fromCharCode(S));
|
|
3135
|
+
while (S && f < l);
|
|
3136
|
+
if (512 & n.flags && (n.check = st(n.check, r, f, i)), l -= f, i += f, S) break t;
|
|
3137
|
+
} else n.head && (n.head.name = null);
|
|
3138
|
+
n.length = 0, n.mode = Ii;
|
|
3139
|
+
case Ii:
|
|
3140
|
+
if (4096 & n.flags) {
|
|
3141
|
+
if (l === 0) break t;
|
|
3142
|
+
f = 0;
|
|
3143
|
+
do
|
|
3144
|
+
S = r[i + f++], n.head && S && n.length < 65536 && (n.head.comment += String.fromCharCode(S));
|
|
3145
|
+
while (S && f < l);
|
|
3146
|
+
if (512 & n.flags && (n.check = st(n.check, r, f, i)), l -= f, i += f, S) break t;
|
|
3147
|
+
} else n.head && (n.head.comment = null);
|
|
3148
|
+
n.mode = Mi;
|
|
3149
|
+
case Mi:
|
|
3150
|
+
if (512 & n.flags) {
|
|
3151
|
+
for (; c < 16; ) {
|
|
3152
|
+
if (l === 0) break t;
|
|
3153
|
+
l--, o += r[i++] << c, c += 8;
|
|
3154
|
+
}
|
|
3155
|
+
if (o !== (65535 & n.check)) {
|
|
3156
|
+
t.msg = "header crc mismatch", n.mode = Q;
|
|
3157
|
+
break;
|
|
3158
|
+
}
|
|
3159
|
+
o = 0, c = 0;
|
|
3160
|
+
}
|
|
3161
|
+
n.head && (n.head.hcrc = n.flags >> 9 & 1, n.head.done = !0), t.adler = n.check = 0, n.mode = Dt;
|
|
3162
|
+
break;
|
|
3163
|
+
case Di:
|
|
3164
|
+
for (; c < 32; ) {
|
|
3165
|
+
if (l === 0) break t;
|
|
3166
|
+
l--, o += r[i++] << c, c += 8;
|
|
3167
|
+
}
|
|
3168
|
+
t.adler = n.check = qi(o), o = 0, c = 0, n.mode = Pi;
|
|
3169
|
+
case Pi:
|
|
3170
|
+
if (n.havedict === 0) return t.next_out = s, t.avail_out = h, t.next_in = i, t.avail_in = l, n.hold = o, n.bits = c, As;
|
|
3171
|
+
t.adler = n.check = 1, n.mode = Dt;
|
|
3172
|
+
case Dt:
|
|
3173
|
+
if (e === xs || e === cn) break t;
|
|
3174
|
+
case Xn:
|
|
3175
|
+
if (n.last) {
|
|
3176
|
+
o >>>= 7 & c, c -= 7 & c, n.mode = Jn;
|
|
3177
|
+
break;
|
|
3178
|
+
}
|
|
3179
|
+
for (; c < 3; ) {
|
|
3180
|
+
if (l === 0) break t;
|
|
3181
|
+
l--, o += r[i++] << c, c += 8;
|
|
3182
|
+
}
|
|
3183
|
+
switch (n.last = 1 & o, c -= 1, 3 & (o >>>= 1)) {
|
|
3184
|
+
case 0:
|
|
3185
|
+
n.mode = Oi;
|
|
3186
|
+
break;
|
|
3187
|
+
case 1:
|
|
3188
|
+
if (Os(n), n.mode = fn, e === cn) {
|
|
3189
|
+
o >>>= 2, c -= 2;
|
|
3190
|
+
break t;
|
|
3191
|
+
}
|
|
3192
|
+
break;
|
|
3193
|
+
case 2:
|
|
3194
|
+
n.mode = Ni;
|
|
3195
|
+
break;
|
|
3196
|
+
case 3:
|
|
3197
|
+
t.msg = "invalid block type", n.mode = Q;
|
|
3198
|
+
}
|
|
3199
|
+
o >>>= 2, c -= 2;
|
|
3200
|
+
break;
|
|
3201
|
+
case Oi:
|
|
3202
|
+
for (o >>>= 7 & c, c -= 7 & c; c < 32; ) {
|
|
3203
|
+
if (l === 0) break t;
|
|
3204
|
+
l--, o += r[i++] << c, c += 8;
|
|
3205
|
+
}
|
|
3206
|
+
if ((65535 & o) != (o >>> 16 ^ 65535)) {
|
|
3207
|
+
t.msg = "invalid stored block lengths", n.mode = Q;
|
|
3208
|
+
break;
|
|
3209
|
+
}
|
|
3210
|
+
if (n.length = 65535 & o, o = 0, c = 0, n.mode = $n, e === cn) break t;
|
|
3211
|
+
case $n:
|
|
3212
|
+
n.mode = Ui;
|
|
3213
|
+
case Ui:
|
|
3214
|
+
if (f = n.length) {
|
|
3215
|
+
if (f > l && (f = l), f > h && (f = h), f === 0) break t;
|
|
3216
|
+
Ot(a, r, i, f, s), l -= f, i += f, h -= f, s += f, n.length -= f;
|
|
3217
|
+
break;
|
|
3218
|
+
}
|
|
3219
|
+
n.mode = Dt;
|
|
3220
|
+
break;
|
|
3221
|
+
case Ni:
|
|
3222
|
+
for (; c < 14; ) {
|
|
3223
|
+
if (l === 0) break t;
|
|
3224
|
+
l--, o += r[i++] << c, c += 8;
|
|
3225
|
+
}
|
|
3226
|
+
if (n.nlen = 257 + (31 & o), o >>>= 5, c -= 5, n.ndist = 1 + (31 & o), o >>>= 5, c -= 5, n.ncode = 4 + (15 & o), o >>>= 4, c -= 4, n.nlen > 286 || n.ndist > 30) {
|
|
3227
|
+
t.msg = "too many length or distance symbols", n.mode = Q;
|
|
3228
|
+
break;
|
|
3229
|
+
}
|
|
3230
|
+
n.have = 0, n.mode = Hi;
|
|
3231
|
+
case Hi:
|
|
3232
|
+
for (; n.have < n.ncode; ) {
|
|
3233
|
+
for (; c < 3; ) {
|
|
3234
|
+
if (l === 0) break t;
|
|
3235
|
+
l--, o += r[i++] << c, c += 8;
|
|
3236
|
+
}
|
|
3237
|
+
n.lens[D[n.have++]] = 7 & o, o >>>= 3, c -= 3;
|
|
3238
|
+
}
|
|
3239
|
+
for (; n.have < 19; ) n.lens[D[n.have++]] = 0;
|
|
3240
|
+
if (n.lencode = n.lendyn, n.lenbits = 7, E = { bits: n.lenbits }, k = Ye(Ss, n.lens, 0, 19, n.lencode, 0, n.work, E), n.lenbits = E.bits, k) {
|
|
3241
|
+
t.msg = "invalid code lengths set", n.mode = Q;
|
|
3242
|
+
break;
|
|
3243
|
+
}
|
|
3244
|
+
n.have = 0, n.mode = Fi;
|
|
3245
|
+
case Fi:
|
|
3246
|
+
for (; n.have < n.nlen + n.ndist; ) {
|
|
3247
|
+
for (; v = (b = n.lencode[o & (1 << n.lenbits) - 1]) >>> 16 & 255, w = 65535 & b, !((d = b >>> 24) <= c); ) {
|
|
3248
|
+
if (l === 0) break t;
|
|
3249
|
+
l--, o += r[i++] << c, c += 8;
|
|
3250
|
+
}
|
|
3251
|
+
if (w < 16) o >>>= d, c -= d, n.lens[n.have++] = w;
|
|
3252
|
+
else {
|
|
3253
|
+
if (w === 16) {
|
|
3254
|
+
for (B = d + 2; c < B; ) {
|
|
3255
|
+
if (l === 0) break t;
|
|
3256
|
+
l--, o += r[i++] << c, c += 8;
|
|
3257
|
+
}
|
|
3258
|
+
if (o >>>= d, c -= d, n.have === 0) {
|
|
3259
|
+
t.msg = "invalid bit length repeat", n.mode = Q;
|
|
3260
|
+
break;
|
|
3261
|
+
}
|
|
3262
|
+
S = n.lens[n.have - 1], f = 3 + (3 & o), o >>>= 2, c -= 2;
|
|
3263
|
+
} else if (w === 17) {
|
|
3264
|
+
for (B = d + 3; c < B; ) {
|
|
3265
|
+
if (l === 0) break t;
|
|
3266
|
+
l--, o += r[i++] << c, c += 8;
|
|
3267
|
+
}
|
|
3268
|
+
c -= d, S = 0, f = 3 + (7 & (o >>>= d)), o >>>= 3, c -= 3;
|
|
3269
|
+
} else {
|
|
3270
|
+
for (B = d + 7; c < B; ) {
|
|
3271
|
+
if (l === 0) break t;
|
|
3272
|
+
l--, o += r[i++] << c, c += 8;
|
|
3273
|
+
}
|
|
3274
|
+
c -= d, S = 0, f = 11 + (127 & (o >>>= d)), o >>>= 7, c -= 7;
|
|
3275
|
+
}
|
|
3276
|
+
if (n.have + f > n.nlen + n.ndist) {
|
|
3277
|
+
t.msg = "invalid bit length repeat", n.mode = Q;
|
|
3278
|
+
break;
|
|
3279
|
+
}
|
|
3280
|
+
for (; f--; ) n.lens[n.have++] = S;
|
|
3281
|
+
}
|
|
3282
|
+
}
|
|
3283
|
+
if (n.mode === Q) break;
|
|
3284
|
+
if (n.lens[256] === 0) {
|
|
3285
|
+
t.msg = "invalid code -- missing end-of-block", n.mode = Q;
|
|
3286
|
+
break;
|
|
3287
|
+
}
|
|
3288
|
+
if (n.lenbits = 9, E = { bits: n.lenbits }, k = Ye(Pa, n.lens, 0, n.nlen, n.lencode, 0, n.work, E), n.lenbits = E.bits, k) {
|
|
3289
|
+
t.msg = "invalid literal/lengths set", n.mode = Q;
|
|
3290
|
+
break;
|
|
3291
|
+
}
|
|
3292
|
+
if (n.distbits = 6, n.distcode = n.distdyn, E = { bits: n.distbits }, k = Ye(Oa, n.lens, n.nlen, n.ndist, n.distcode, 0, n.work, E), n.distbits = E.bits, k) {
|
|
3293
|
+
t.msg = "invalid distances set", n.mode = Q;
|
|
3294
|
+
break;
|
|
3295
|
+
}
|
|
3296
|
+
if (n.mode = fn, e === cn) break t;
|
|
3297
|
+
case fn:
|
|
3298
|
+
n.mode = un;
|
|
3299
|
+
case un:
|
|
3300
|
+
if (l >= 6 && h >= 258) {
|
|
3301
|
+
t.next_out = s, t.avail_out = h, t.next_in = i, t.avail_in = l, n.hold = o, n.bits = c, ms(t, p), s = t.next_out, a = t.output, h = t.avail_out, i = t.next_in, r = t.input, l = t.avail_in, o = n.hold, c = n.bits, n.mode === Dt && (n.back = -1);
|
|
3302
|
+
break;
|
|
3303
|
+
}
|
|
3304
|
+
for (n.back = 0; v = (b = n.lencode[o & (1 << n.lenbits) - 1]) >>> 16 & 255, w = 65535 & b, !((d = b >>> 24) <= c); ) {
|
|
3305
|
+
if (l === 0) break t;
|
|
3306
|
+
l--, o += r[i++] << c, c += 8;
|
|
3307
|
+
}
|
|
3308
|
+
if (v && (240 & v) == 0) {
|
|
3309
|
+
for (m = d, y = v, x = w; v = (b = n.lencode[x + ((o & (1 << m + y) - 1) >> m)]) >>> 16 & 255, w = 65535 & b, !(m + (d = b >>> 24) <= c); ) {
|
|
3310
|
+
if (l === 0) break t;
|
|
3311
|
+
l--, o += r[i++] << c, c += 8;
|
|
3312
|
+
}
|
|
3313
|
+
o >>>= m, c -= m, n.back += m;
|
|
3314
|
+
}
|
|
3315
|
+
if (o >>>= d, c -= d, n.back += d, n.length = w, v === 0) {
|
|
3316
|
+
n.mode = Yi;
|
|
3317
|
+
break;
|
|
3318
|
+
}
|
|
3319
|
+
if (32 & v) {
|
|
3320
|
+
n.back = -1, n.mode = Dt;
|
|
3321
|
+
break;
|
|
3322
|
+
}
|
|
3323
|
+
if (64 & v) {
|
|
3324
|
+
t.msg = "invalid literal/length code", n.mode = Q;
|
|
3325
|
+
break;
|
|
3326
|
+
}
|
|
3327
|
+
n.extra = 15 & v, n.mode = Zi;
|
|
3328
|
+
case Zi:
|
|
3329
|
+
if (n.extra) {
|
|
3330
|
+
for (B = n.extra; c < B; ) {
|
|
3331
|
+
if (l === 0) break t;
|
|
3332
|
+
l--, o += r[i++] << c, c += 8;
|
|
3333
|
+
}
|
|
3334
|
+
n.length += o & (1 << n.extra) - 1, o >>>= n.extra, c -= n.extra, n.back += n.extra;
|
|
3335
|
+
}
|
|
3336
|
+
n.was = n.length, n.mode = Vi;
|
|
3337
|
+
case Vi:
|
|
3338
|
+
for (; v = (b = n.distcode[o & (1 << n.distbits) - 1]) >>> 16 & 255, w = 65535 & b, !((d = b >>> 24) <= c); ) {
|
|
3339
|
+
if (l === 0) break t;
|
|
3340
|
+
l--, o += r[i++] << c, c += 8;
|
|
3341
|
+
}
|
|
3342
|
+
if ((240 & v) == 0) {
|
|
3343
|
+
for (m = d, y = v, x = w; v = (b = n.distcode[x + ((o & (1 << m + y) - 1) >> m)]) >>> 16 & 255, w = 65535 & b, !(m + (d = b >>> 24) <= c); ) {
|
|
3344
|
+
if (l === 0) break t;
|
|
3345
|
+
l--, o += r[i++] << c, c += 8;
|
|
3346
|
+
}
|
|
3347
|
+
o >>>= m, c -= m, n.back += m;
|
|
3348
|
+
}
|
|
3349
|
+
if (o >>>= d, c -= d, n.back += d, 64 & v) {
|
|
3350
|
+
t.msg = "invalid distance code", n.mode = Q;
|
|
3351
|
+
break;
|
|
3352
|
+
}
|
|
3353
|
+
n.offset = w, n.extra = 15 & v, n.mode = ji;
|
|
3354
|
+
case ji:
|
|
3355
|
+
if (n.extra) {
|
|
3356
|
+
for (B = n.extra; c < B; ) {
|
|
3357
|
+
if (l === 0) break t;
|
|
3358
|
+
l--, o += r[i++] << c, c += 8;
|
|
3359
|
+
}
|
|
3360
|
+
n.offset += o & (1 << n.extra) - 1, o >>>= n.extra, c -= n.extra, n.back += n.extra;
|
|
3361
|
+
}
|
|
3362
|
+
if (n.offset > n.dmax) {
|
|
3363
|
+
t.msg = "invalid distance too far back", n.mode = Q;
|
|
3364
|
+
break;
|
|
3365
|
+
}
|
|
3366
|
+
n.mode = Wi;
|
|
3367
|
+
case Wi:
|
|
3368
|
+
if (h === 0) break t;
|
|
3369
|
+
if (f = p - h, n.offset > f) {
|
|
3370
|
+
if ((f = n.offset - f) > n.whave && n.sane) {
|
|
3371
|
+
t.msg = "invalid distance too far back", n.mode = Q;
|
|
3372
|
+
break;
|
|
3373
|
+
}
|
|
3374
|
+
f > n.wnext ? (f -= n.wnext, _ = n.wsize - f) : _ = n.wnext - f, f > n.length && (f = n.length), g = n.window;
|
|
3375
|
+
} else g = a, _ = s - n.offset, f = n.length;
|
|
3376
|
+
f > h && (f = h), h -= f, n.length -= f;
|
|
3377
|
+
do
|
|
3378
|
+
a[s++] = g[_++];
|
|
3379
|
+
while (--f);
|
|
3380
|
+
n.length === 0 && (n.mode = un);
|
|
3381
|
+
break;
|
|
3382
|
+
case Yi:
|
|
3383
|
+
if (h === 0) break t;
|
|
3384
|
+
a[s++] = n.length, h--, n.mode = un;
|
|
3385
|
+
break;
|
|
3386
|
+
case Jn:
|
|
3387
|
+
if (n.wrap) {
|
|
3388
|
+
for (; c < 32; ) {
|
|
3389
|
+
if (l === 0) break t;
|
|
3390
|
+
l--, o |= r[i++] << c, c += 8;
|
|
3391
|
+
}
|
|
3392
|
+
if (p -= h, t.total_out += p, n.total += p, p && (t.adler = n.check = n.flags ? st(n.check, a, p, s - p) : sr(n.check, a, p, s - p)), p = h, (n.flags ? o : qi(o)) !== n.check) {
|
|
3393
|
+
t.msg = "incorrect data check", n.mode = Q;
|
|
3394
|
+
break;
|
|
3395
|
+
}
|
|
3396
|
+
o = 0, c = 0;
|
|
3397
|
+
}
|
|
3398
|
+
n.mode = Ki;
|
|
3399
|
+
case Ki:
|
|
3400
|
+
if (n.wrap && n.flags) {
|
|
3401
|
+
for (; c < 32; ) {
|
|
3402
|
+
if (l === 0) break t;
|
|
3403
|
+
l--, o += r[i++] << c, c += 8;
|
|
3404
|
+
}
|
|
3405
|
+
if (o !== (4294967295 & n.total)) {
|
|
3406
|
+
t.msg = "incorrect length check", n.mode = Q;
|
|
3407
|
+
break;
|
|
3408
|
+
}
|
|
3409
|
+
o = 0, c = 0;
|
|
3410
|
+
}
|
|
3411
|
+
n.mode = Gi;
|
|
3412
|
+
case Gi:
|
|
3413
|
+
k = Rs;
|
|
3414
|
+
break t;
|
|
3415
|
+
case Q:
|
|
3416
|
+
k = Bs;
|
|
3417
|
+
break t;
|
|
3418
|
+
case zs:
|
|
3419
|
+
return Ts;
|
|
3420
|
+
case Cs:
|
|
3421
|
+
default:
|
|
3422
|
+
return Xt;
|
|
3423
|
+
}
|
|
3424
|
+
return t.next_out = s, t.avail_out = h, t.next_in = i, t.avail_in = l, n.hold = o, n.bits = c, (n.wsize || p !== t.avail_out && n.mode < Q && (n.mode < Jn || e !== xi)) && (function(T, P, N, Z) {
|
|
3425
|
+
var V, H = T.state;
|
|
3426
|
+
H.window === null && (H.wsize = 1 << H.wbits, H.wnext = 0, H.whave = 0, H.window = new Sn(H.wsize)), Z >= H.wsize ? (Ot(H.window, P, N - H.wsize, H.wsize, 0), H.wnext = 0, H.whave = H.wsize) : ((V = H.wsize - H.wnext) > Z && (V = Z), Ot(H.window, P, N - Z, V, H.wnext), (Z -= V) ? (Ot(H.window, P, N - Z, Z, 0), H.wnext = Z, H.whave = H.wsize) : (H.wnext += V, H.wnext === H.wsize && (H.wnext = 0), H.whave < H.wsize && (H.whave += V)));
|
|
3427
|
+
})(t, t.output, t.next_out, p - t.avail_out), u -= t.avail_in, p -= t.avail_out, t.total_in += u, t.total_out += p, n.total += p, n.wrap && p && (t.adler = n.check = n.flags ? st(n.check, a, p, t.next_out - p) : sr(n.check, a, p, t.next_out - p)), t.data_type = n.bits + (n.last ? 64 : 0) + (n.mode === Dt ? 128 : 0) + (n.mode === fn || n.mode === $n ? 256 : 0), (u === 0 && p === 0 || e === xi) && k === An && (k = Ls), k;
|
|
3428
|
+
}
|
|
3429
|
+
var dn, Be = 1, Ke = 7;
|
|
3430
|
+
function Tt(t) {
|
|
3431
|
+
if (t < Be || t > Ke) throw new TypeError("Bad argument");
|
|
3432
|
+
this.mode = t, this.init_done = !1, this.write_in_progress = !1, this.pending_close = !1, this.windowBits = 0, this.level = 0, this.memLevel = 0, this.strategy = 0, this.dictionary = null;
|
|
3433
|
+
}
|
|
3434
|
+
function Ns(t, e) {
|
|
3435
|
+
for (var n = 0; n < t.length; n++) this[e + n] = t[n];
|
|
3436
|
+
}
|
|
3437
|
+
Tt.prototype.init = function(t, e, n, r, a) {
|
|
3438
|
+
var i;
|
|
3439
|
+
switch (this.windowBits = t, this.level = e, this.memLevel = n, this.strategy = r, this.mode !== 3 && this.mode !== 4 || (this.windowBits += 16), this.mode === Ke && (this.windowBits += 32), this.mode !== 5 && this.mode !== 6 || (this.windowBits = -this.windowBits), this.strm = new jo(), this.mode) {
|
|
3440
|
+
case Be:
|
|
3441
|
+
case 3:
|
|
3442
|
+
case 5:
|
|
3443
|
+
i = (function(s, l, h, o, c, u) {
|
|
3444
|
+
if (!s) return me;
|
|
3445
|
+
var p = 1;
|
|
3446
|
+
if (l === is && (l = 6), o < 0 ? (p = 0, o = -o) : o > 15 && (p = 2, o -= 16), c < 1 || c > hs || h !== yr || o < 8 || o > 15 || l < 0 || l > 9 || u < 0 || u > ss) return Kt(s, me);
|
|
3447
|
+
o === 8 && (o = 9);
|
|
3448
|
+
var f = new gs();
|
|
3449
|
+
return s.state = f, f.strm = s, f.wrap = p, f.gzhead = null, f.w_bits = o, f.w_size = 1 << f.w_bits, f.w_mask = f.w_size - 1, f.hash_bits = c + 7, f.hash_size = 1 << f.hash_bits, f.hash_mask = f.hash_size - 1, f.hash_shift = ~~((f.hash_bits + $ - 1) / $), f.window = new Sn(2 * f.w_size), f.head = new St(f.hash_size), f.prev = new St(f.w_size), f.lit_bufsize = 1 << c + 6, f.pending_buf_size = 4 * f.lit_bufsize, f.pending_buf = new Sn(f.pending_buf_size), f.d_buf = 1 * f.lit_bufsize, f.l_buf = 3 * f.lit_bufsize, f.level = l, f.strategy = u, f.method = h, yi(s);
|
|
3450
|
+
})(this.strm, this.level, 8, this.windowBits, this.memLevel, this.strategy);
|
|
3451
|
+
break;
|
|
3452
|
+
case 2:
|
|
3453
|
+
case 4:
|
|
3454
|
+
case 6:
|
|
3455
|
+
case Ke:
|
|
3456
|
+
i = Ps(this.strm, this.windowBits);
|
|
3457
|
+
break;
|
|
3458
|
+
default:
|
|
3459
|
+
throw new Error("Unknown mode " + this.mode);
|
|
3460
|
+
}
|
|
3461
|
+
i === 0 ? (this.write_in_progress = !1, this.init_done = !0) : this._error(i);
|
|
3462
|
+
}, Tt.prototype.params = function() {
|
|
3463
|
+
throw new Error("deflateParams Not supported");
|
|
3464
|
+
}, Tt.prototype._writeCheck = function() {
|
|
3465
|
+
if (!this.init_done) throw new Error("write before init");
|
|
3466
|
+
if (this.mode === 0) throw new Error("already finalized");
|
|
3467
|
+
if (this.write_in_progress) throw new Error("write already in progress");
|
|
3468
|
+
if (this.pending_close) throw new Error("close is pending");
|
|
3469
|
+
}, Tt.prototype.write = function(t, e, n, r, a, i, s) {
|
|
3470
|
+
this._writeCheck(), this.write_in_progress = !0;
|
|
3471
|
+
var l = this;
|
|
3472
|
+
return ht(function() {
|
|
3473
|
+
l.write_in_progress = !1;
|
|
3474
|
+
var h = l._write(t, e, n, r, a, i, s);
|
|
3475
|
+
l.callback(h[0], h[1]), l.pending_close && l.close();
|
|
3476
|
+
}), this;
|
|
3477
|
+
}, Tt.prototype.writeSync = function(t, e, n, r, a, i, s) {
|
|
3478
|
+
return this._writeCheck(), this._write(t, e, n, r, a, i, s);
|
|
3479
|
+
}, Tt.prototype._write = function(t, e, n, r, a, i, s) {
|
|
3480
|
+
if (this.write_in_progress = !0, t !== 0 && t !== 1 && t !== 2 && t !== 3 && t !== 4 && t !== 5) throw new Error("Invalid flush value");
|
|
3481
|
+
e == null && (e = new A(0), r = 0, n = 0), a._set ? a.set = a._set : a.set = Ns;
|
|
3482
|
+
var l, h = this.strm;
|
|
3483
|
+
switch (h.avail_in = r, h.input = e, h.next_in = n, h.avail_out = s, h.output = a, h.next_out = i, this.mode) {
|
|
3484
|
+
case Be:
|
|
3485
|
+
case 3:
|
|
3486
|
+
case 5:
|
|
3487
|
+
l = vs(h, t);
|
|
3488
|
+
break;
|
|
3489
|
+
case Ke:
|
|
3490
|
+
case 2:
|
|
3491
|
+
case 4:
|
|
3492
|
+
case 6:
|
|
3493
|
+
l = Us(h, t);
|
|
3494
|
+
break;
|
|
3495
|
+
default:
|
|
3496
|
+
throw new Error("Unknown mode " + this.mode);
|
|
3497
|
+
}
|
|
3498
|
+
return l !== 1 && l !== 0 && this._error(l), this.write_in_progress = !1, [h.avail_in, h.avail_out];
|
|
3499
|
+
}, Tt.prototype.close = function() {
|
|
3500
|
+
this.write_in_progress ? this.pending_close = !0 : (this.pending_close = !1, this.mode === Be || this.mode === 3 || this.mode === 5 ? (function(t) {
|
|
3501
|
+
var e;
|
|
3502
|
+
t && t.state && ((e = t.state.status) !== br && e !== hr && e !== gn && e !== vn && e !== wn && e !== he && e !== Fe ? Kt(t, me) : (t.state = null, e === he && Kt(t, rs)));
|
|
3503
|
+
})(this.strm) : (function(t) {
|
|
3504
|
+
if (!t || !t.state) return Xt;
|
|
3505
|
+
var e = t.state;
|
|
3506
|
+
e.window && (e.window = null), t.state = null;
|
|
3507
|
+
})(this.strm), this.mode = 0);
|
|
3508
|
+
}, Tt.prototype.reset = function() {
|
|
3509
|
+
switch (this.mode) {
|
|
3510
|
+
case Be:
|
|
3511
|
+
case 5:
|
|
3512
|
+
dn = yi(this.strm);
|
|
3513
|
+
break;
|
|
3514
|
+
case 2:
|
|
3515
|
+
case 6:
|
|
3516
|
+
dn = Na(this.strm);
|
|
3517
|
+
}
|
|
3518
|
+
dn !== 0 && this._error(dn);
|
|
3519
|
+
}, Tt.prototype._error = function(t) {
|
|
3520
|
+
this.onerror(Sa[t] + ": " + this.strm.msg, t), this.write_in_progress = !1, this.pending_close && this.close();
|
|
3521
|
+
};
|
|
3522
|
+
var $i = Object.freeze({ NONE: 0, DEFLATE: Be, INFLATE: 2, GZIP: 3, GUNZIP: 4, DEFLATERAW: 5, INFLATERAW: 6, UNZIP: Ke, Z_NO_FLUSH: 0, Z_PARTIAL_FLUSH: 1, Z_SYNC_FLUSH: 2, Z_FULL_FLUSH: 3, Z_FINISH: 4, Z_BLOCK: 5, Z_TREES: 6, Z_OK: 0, Z_STREAM_END: 1, Z_NEED_DICT: 2, Z_ERRNO: -1, Z_STREAM_ERROR: -2, Z_DATA_ERROR: -3, Z_BUF_ERROR: -5, Z_NO_COMPRESSION: 0, Z_BEST_SPEED: 1, Z_BEST_COMPRESSION: 9, Z_DEFAULT_COMPRESSION: -1, Z_FILTERED: 1, Z_HUFFMAN_ONLY: 2, Z_RLE: 3, Z_FIXED: 4, Z_DEFAULT_STRATEGY: 0, Z_BINARY: 0, Z_TEXT: 1, Z_UNKNOWN: 2, Z_DEFLATED: 8, Zlib: Tt }), U = {};
|
|
3523
|
+
Object.keys($i).forEach(function(t) {
|
|
3524
|
+
U[t] = $i[t];
|
|
3525
|
+
}), U.Z_MIN_WINDOWBITS = 8, U.Z_MAX_WINDOWBITS = 15, U.Z_DEFAULT_WINDOWBITS = 15, U.Z_MIN_CHUNK = 64, U.Z_MAX_CHUNK = 1 / 0, U.Z_DEFAULT_CHUNK = 16384, U.Z_MIN_MEMLEVEL = 1, U.Z_MAX_MEMLEVEL = 9, U.Z_DEFAULT_MEMLEVEL = 8, U.Z_MIN_LEVEL = -1, U.Z_MAX_LEVEL = 9, U.Z_DEFAULT_LEVEL = U.Z_DEFAULT_COMPRESSION;
|
|
3526
|
+
var mn = { Z_OK: U.Z_OK, Z_STREAM_END: U.Z_STREAM_END, Z_NEED_DICT: U.Z_NEED_DICT, Z_ERRNO: U.Z_ERRNO, Z_STREAM_ERROR: U.Z_STREAM_ERROR, Z_DATA_ERROR: U.Z_DATA_ERROR, Z_MEM_ERROR: U.Z_MEM_ERROR, Z_BUF_ERROR: U.Z_BUF_ERROR, Z_VERSION_ERROR: U.Z_VERSION_ERROR };
|
|
3527
|
+
function ne(t, e, n) {
|
|
3528
|
+
var r = [], a = 0;
|
|
3529
|
+
function i() {
|
|
3530
|
+
for (var l; (l = t.read()) !== null; ) r.push(l), a += l.length;
|
|
3531
|
+
t.once("readable", i);
|
|
3532
|
+
}
|
|
3533
|
+
function s() {
|
|
3534
|
+
var l = A.concat(r, a);
|
|
3535
|
+
r = [], n(null, l), t.close();
|
|
3536
|
+
}
|
|
3537
|
+
t.on("error", function(l) {
|
|
3538
|
+
t.removeListener("end", s), t.removeListener("readable", i), n(l);
|
|
3539
|
+
}), t.on("end", s), t.end(e), i();
|
|
3540
|
+
}
|
|
3541
|
+
function re(t, e) {
|
|
3542
|
+
if (typeof e == "string" && (e = new A(e)), !Qe(e)) throw new TypeError("Not a string or buffer");
|
|
3543
|
+
var n = U.Z_FINISH;
|
|
3544
|
+
return t._processChunk(e, n);
|
|
3545
|
+
}
|
|
3546
|
+
function fe(t) {
|
|
3547
|
+
if (!(this instanceof fe)) return new fe(t);
|
|
3548
|
+
tt.call(this, t, U.DEFLATE);
|
|
3549
|
+
}
|
|
3550
|
+
function ue(t) {
|
|
3551
|
+
if (!(this instanceof ue)) return new ue(t);
|
|
3552
|
+
tt.call(this, t, U.INFLATE);
|
|
3553
|
+
}
|
|
3554
|
+
function de(t) {
|
|
3555
|
+
if (!(this instanceof de)) return new de(t);
|
|
3556
|
+
tt.call(this, t, U.GZIP);
|
|
3557
|
+
}
|
|
3558
|
+
function pe(t) {
|
|
3559
|
+
if (!(this instanceof pe)) return new pe(t);
|
|
3560
|
+
tt.call(this, t, U.GUNZIP);
|
|
3561
|
+
}
|
|
3562
|
+
function _e(t) {
|
|
3563
|
+
if (!(this instanceof _e)) return new _e(t);
|
|
3564
|
+
tt.call(this, t, U.DEFLATERAW);
|
|
3565
|
+
}
|
|
3566
|
+
function ge(t) {
|
|
3567
|
+
if (!(this instanceof ge)) return new ge(t);
|
|
3568
|
+
tt.call(this, t, U.INFLATERAW);
|
|
3569
|
+
}
|
|
3570
|
+
function ve(t) {
|
|
3571
|
+
if (!(this instanceof ve)) return new ve(t);
|
|
3572
|
+
tt.call(this, t, U.UNZIP);
|
|
3573
|
+
}
|
|
3574
|
+
function tt(t, e) {
|
|
3575
|
+
if (this._opts = t = t || {}, this._chunkSize = t.chunkSize || U.Z_DEFAULT_CHUNK, Et.call(this, t), t.flush && t.flush !== U.Z_NO_FLUSH && t.flush !== U.Z_PARTIAL_FLUSH && t.flush !== U.Z_SYNC_FLUSH && t.flush !== U.Z_FULL_FLUSH && t.flush !== U.Z_FINISH && t.flush !== U.Z_BLOCK) throw new Error("Invalid flush flag: " + t.flush);
|
|
3576
|
+
if (this._flushFlag = t.flush || U.Z_NO_FLUSH, t.chunkSize && (t.chunkSize < U.Z_MIN_CHUNK || t.chunkSize > U.Z_MAX_CHUNK)) throw new Error("Invalid chunk size: " + t.chunkSize);
|
|
3577
|
+
if (t.windowBits && (t.windowBits < U.Z_MIN_WINDOWBITS || t.windowBits > U.Z_MAX_WINDOWBITS)) throw new Error("Invalid windowBits: " + t.windowBits);
|
|
3578
|
+
if (t.level && (t.level < U.Z_MIN_LEVEL || t.level > U.Z_MAX_LEVEL)) throw new Error("Invalid compression level: " + t.level);
|
|
3579
|
+
if (t.memLevel && (t.memLevel < U.Z_MIN_MEMLEVEL || t.memLevel > U.Z_MAX_MEMLEVEL)) throw new Error("Invalid memLevel: " + t.memLevel);
|
|
3580
|
+
if (t.strategy && t.strategy != U.Z_FILTERED && t.strategy != U.Z_HUFFMAN_ONLY && t.strategy != U.Z_RLE && t.strategy != U.Z_FIXED && t.strategy != U.Z_DEFAULT_STRATEGY) throw new Error("Invalid strategy: " + t.strategy);
|
|
3581
|
+
if (t.dictionary && !Qe(t.dictionary)) throw new Error("Invalid dictionary: it should be a Buffer instance");
|
|
3582
|
+
this._binding = new U.Zlib(e);
|
|
3583
|
+
var n = this;
|
|
3584
|
+
this._hadError = !1, this._binding.onerror = function(i, s) {
|
|
3585
|
+
n._binding = null, n._hadError = !0;
|
|
3586
|
+
var l = new Error(i);
|
|
3587
|
+
l.errno = s, l.code = U.codes[s], n.emit("error", l);
|
|
3588
|
+
};
|
|
3589
|
+
var r = U.Z_DEFAULT_COMPRESSION;
|
|
3590
|
+
typeof t.level == "number" && (r = t.level);
|
|
3591
|
+
var a = U.Z_DEFAULT_STRATEGY;
|
|
3592
|
+
typeof t.strategy == "number" && (a = t.strategy), this._binding.init(t.windowBits || U.Z_DEFAULT_WINDOWBITS, r, t.memLevel || U.Z_DEFAULT_MEMLEVEL, a, t.dictionary), this._buffer = new A(this._chunkSize), this._offset = 0, this._closed = !1, this._level = r, this._strategy = a, this.once("end", this.close);
|
|
3593
|
+
}
|
|
3594
|
+
Object.keys(mn).forEach(function(t) {
|
|
3595
|
+
mn[mn[t]] = t;
|
|
3596
|
+
}), gt(tt, Et), tt.prototype.params = function(t, e, n) {
|
|
3597
|
+
if (t < U.Z_MIN_LEVEL || t > U.Z_MAX_LEVEL) throw new RangeError("Invalid compression level: " + t);
|
|
3598
|
+
if (e != U.Z_FILTERED && e != U.Z_HUFFMAN_ONLY && e != U.Z_RLE && e != U.Z_FIXED && e != U.Z_DEFAULT_STRATEGY) throw new TypeError("Invalid strategy: " + e);
|
|
3599
|
+
if (this._level !== t || this._strategy !== e) {
|
|
3600
|
+
var r = this;
|
|
3601
|
+
this.flush(U.Z_SYNC_FLUSH, function() {
|
|
3602
|
+
r._binding.params(t, e), r._hadError || (r._level = t, r._strategy = e, n && n());
|
|
3603
|
+
});
|
|
3604
|
+
} else ht(n);
|
|
3605
|
+
}, tt.prototype.reset = function() {
|
|
3606
|
+
return this._binding.reset();
|
|
3607
|
+
}, tt.prototype._flush = function(t) {
|
|
3608
|
+
this._transform(new A(0), "", t);
|
|
3609
|
+
}, tt.prototype.flush = function(t, e) {
|
|
3610
|
+
var n = this._writableState;
|
|
3611
|
+
if ((typeof t == "function" || t === void 0 && !e) && (e = t, t = U.Z_FULL_FLUSH), n.ended) e && ht(e);
|
|
3612
|
+
else if (n.ending) e && this.once("end", e);
|
|
3613
|
+
else if (n.needDrain) {
|
|
3614
|
+
var r = this;
|
|
3615
|
+
this.once("drain", function() {
|
|
3616
|
+
r.flush(e);
|
|
3617
|
+
});
|
|
3618
|
+
} else this._flushFlag = t, this.write(new A(0), "", e);
|
|
3619
|
+
}, tt.prototype.close = function(t) {
|
|
3620
|
+
if (t && ht(t), !this._closed) {
|
|
3621
|
+
this._closed = !0, this._binding.close();
|
|
3622
|
+
var e = this;
|
|
3623
|
+
ht(function() {
|
|
3624
|
+
e.emit("close");
|
|
3625
|
+
});
|
|
3626
|
+
}
|
|
3627
|
+
}, tt.prototype._transform = function(t, e, n) {
|
|
3628
|
+
var r, a = this._writableState, i = (a.ending || a.ended) && (!t || a.length === t.length);
|
|
3629
|
+
if (!t === null && !Qe(t)) return n(new Error("invalid input"));
|
|
3630
|
+
i ? r = U.Z_FINISH : (r = this._flushFlag, t.length >= a.length && (this._flushFlag = this._opts.flush || U.Z_NO_FLUSH)), this._processChunk(t, r, n);
|
|
3631
|
+
}, tt.prototype._processChunk = function(t, e, n) {
|
|
3632
|
+
var r = t && t.length, a = this._chunkSize - this._offset, i = 0, s = this, l = typeof n == "function";
|
|
3633
|
+
if (!l) {
|
|
3634
|
+
var h, o = [], c = 0;
|
|
3635
|
+
this.on("error", function(g) {
|
|
3636
|
+
h = g;
|
|
3637
|
+
});
|
|
3638
|
+
do
|
|
3639
|
+
var u = this._binding.writeSync(e, t, i, r, this._buffer, this._offset, a);
|
|
3640
|
+
while (!this._hadError && _(u[0], u[1]));
|
|
3641
|
+
if (this._hadError) throw h;
|
|
3642
|
+
var p = A.concat(o, c);
|
|
3643
|
+
return this.close(), p;
|
|
3644
|
+
}
|
|
3645
|
+
var f = this._binding.write(e, t, i, r, this._buffer, this._offset, a);
|
|
3646
|
+
function _(g, d) {
|
|
3647
|
+
if (!s._hadError) {
|
|
3648
|
+
var v = a - d;
|
|
3649
|
+
if ((function(y, x) {
|
|
3650
|
+
if (!y) throw new Error(x);
|
|
3651
|
+
})(v >= 0, "have should not go down"), v > 0) {
|
|
3652
|
+
var w = s._buffer.slice(s._offset, s._offset + v);
|
|
3653
|
+
s._offset += v, l ? s.push(w) : (o.push(w), c += w.length);
|
|
3654
|
+
}
|
|
3655
|
+
if ((d === 0 || s._offset >= s._chunkSize) && (a = s._chunkSize, s._offset = 0, s._buffer = new A(s._chunkSize)), d === 0) {
|
|
3656
|
+
if (i += r - g, r = g, !l) return !0;
|
|
3657
|
+
var m = s._binding.write(e, t, i, r, s._buffer, s._offset, s._chunkSize);
|
|
3658
|
+
return m.callback = _, void (m.buffer = t);
|
|
3659
|
+
}
|
|
3660
|
+
if (!l) return !1;
|
|
3661
|
+
n();
|
|
3662
|
+
}
|
|
3663
|
+
}
|
|
3664
|
+
f.buffer = t, f.callback = _;
|
|
3665
|
+
}, gt(fe, tt), gt(ue, tt), gt(de, tt), gt(pe, tt), gt(_e, tt), gt(ge, tt), gt(ve, tt);
|
|
3666
|
+
var Ji = { codes: mn, createDeflate: function(t) {
|
|
3667
|
+
return new fe(t);
|
|
3668
|
+
}, createInflate: function(t) {
|
|
3669
|
+
return new ue(t);
|
|
3670
|
+
}, createDeflateRaw: function(t) {
|
|
3671
|
+
return new _e(t);
|
|
3672
|
+
}, createInflateRaw: function(t) {
|
|
3673
|
+
return new ge(t);
|
|
3674
|
+
}, createGzip: function(t) {
|
|
3675
|
+
return new de(t);
|
|
3676
|
+
}, createGunzip: function(t) {
|
|
3677
|
+
return new pe(t);
|
|
3678
|
+
}, createUnzip: function(t) {
|
|
3679
|
+
return new ve(t);
|
|
3680
|
+
}, deflate: function(t, e, n) {
|
|
3681
|
+
return typeof e == "function" && (n = e, e = {}), ne(new fe(e), t, n);
|
|
3682
|
+
}, deflateSync: function(t, e) {
|
|
3683
|
+
return re(new fe(e), t);
|
|
3684
|
+
}, gzip: function(t, e, n) {
|
|
3685
|
+
return typeof e == "function" && (n = e, e = {}), ne(new de(e), t, n);
|
|
3686
|
+
}, gzipSync: function(t, e) {
|
|
3687
|
+
return re(new de(e), t);
|
|
3688
|
+
}, deflateRaw: function(t, e, n) {
|
|
3689
|
+
return typeof e == "function" && (n = e, e = {}), ne(new _e(e), t, n);
|
|
3690
|
+
}, deflateRawSync: function(t, e) {
|
|
3691
|
+
return re(new _e(e), t);
|
|
3692
|
+
}, unzip: function(t, e, n) {
|
|
3693
|
+
return typeof e == "function" && (n = e, e = {}), ne(new ve(e), t, n);
|
|
3694
|
+
}, unzipSync: function(t, e) {
|
|
3695
|
+
return re(new ve(e), t);
|
|
3696
|
+
}, inflate: function(t, e, n) {
|
|
3697
|
+
return typeof e == "function" && (n = e, e = {}), ne(new ue(e), t, n);
|
|
3698
|
+
}, inflateSync: function(t, e) {
|
|
3699
|
+
return re(new ue(e), t);
|
|
3700
|
+
}, gunzip: function(t, e, n) {
|
|
3701
|
+
return typeof e == "function" && (n = e, e = {}), ne(new pe(e), t, n);
|
|
3702
|
+
}, gunzipSync: function(t, e) {
|
|
3703
|
+
return re(new pe(e), t);
|
|
3704
|
+
}, inflateRaw: function(t, e, n) {
|
|
3705
|
+
return typeof e == "function" && (n = e, e = {}), ne(new ge(e), t, n);
|
|
3706
|
+
}, inflateRawSync: function(t, e) {
|
|
3707
|
+
return re(new ge(e), t);
|
|
3708
|
+
}, Deflate: fe, Inflate: ue, Gzip: de, Gunzip: pe, DeflateRaw: _e, InflateRaw: ge, Unzip: ve, Zlib: tt };
|
|
3709
|
+
class Hs {
|
|
3710
|
+
constructor(e, n, r) {
|
|
3711
|
+
this.SDKAPPID = e, this.EXPIRETIME = r, this.PRIVATEKEY = n;
|
|
3712
|
+
}
|
|
3713
|
+
genTestUserSig(e) {
|
|
3714
|
+
return this._isNumber(this.SDKAPPID) ? this._isString(this.PRIVATEKEY) ? this._isString(e) ? this._isNumber(this.EXPIRETIME) ? (console.log("sdkAppID=" + this.SDKAPPID + " key=" + this.PRIVATEKEY + " userID=" + e + " expire=" + this.EXPIRETIME), this.genSigWithUserbuf(e, this.EXPIRETIME, null)) : (console.error("expireTime must be a number"), "") : (console.error("userID must be a string"), "") : (console.error("privateKey must be a string"), "") : (console.error("sdkAppID must be a number"), "");
|
|
3715
|
+
}
|
|
3716
|
+
newBuffer(e, n) {
|
|
3717
|
+
return A.from ? A.from(e, n) : new A(e, n);
|
|
3718
|
+
}
|
|
3719
|
+
unescape(e) {
|
|
3720
|
+
return e.replace(/_/g, "=").replace(/\-/g, "/").replace(/\*/g, "+");
|
|
3721
|
+
}
|
|
3722
|
+
escape(e) {
|
|
3723
|
+
return e.replace(/\+/g, "*").replace(/\//g, "-").replace(/=/g, "_");
|
|
3724
|
+
}
|
|
3725
|
+
encode(e) {
|
|
3726
|
+
return this.escape(this.newBuffer(e).toString("base64"));
|
|
3727
|
+
}
|
|
3728
|
+
decode(e) {
|
|
3729
|
+
return this.newBuffer(this.unescape(e), "base64");
|
|
3730
|
+
}
|
|
3731
|
+
base64encode(e) {
|
|
3732
|
+
return this.newBuffer(e).toString("base64");
|
|
3733
|
+
}
|
|
3734
|
+
base64decode(e) {
|
|
3735
|
+
return this.newBuffer(e, "base64").toString();
|
|
3736
|
+
}
|
|
3737
|
+
_hmacsha256(e, n, r, a) {
|
|
3738
|
+
let i = "TLS.identifier:" + e + `
|
|
3739
|
+
`;
|
|
3740
|
+
i += "TLS.sdkappid:" + this.SDKAPPID + `
|
|
3741
|
+
`, i += "TLS.time:" + n + `
|
|
3742
|
+
`, i += "TLS.expire:" + r + `
|
|
3743
|
+
`, a != null && (i += "TLS.userbuf:" + a + `
|
|
3744
|
+
`);
|
|
3745
|
+
let s = jr.HmacSHA256(i, this.PRIVATEKEY);
|
|
3746
|
+
return jr.enc.Base64.stringify(s);
|
|
3747
|
+
}
|
|
3748
|
+
_utc() {
|
|
3749
|
+
return Math.round(Date.now() / 1e3);
|
|
3750
|
+
}
|
|
3751
|
+
_isNumber(e) {
|
|
3752
|
+
return e !== null && (typeof e == "number" && !isNaN(e - 0) || typeof e == "object" && e.constructor === Number);
|
|
3753
|
+
}
|
|
3754
|
+
_isString(e) {
|
|
3755
|
+
return typeof e == "string";
|
|
3756
|
+
}
|
|
3757
|
+
genSigWithUserbuf(e, n, r) {
|
|
3758
|
+
let a = this._utc(), i = { "TLS.ver": "2.0", "TLS.identifier": e, "TLS.sdkappid": this.SDKAPPID, "TLS.time": a, "TLS.expire": n }, s = "";
|
|
3759
|
+
if (r != null) {
|
|
3760
|
+
let c = this.base64encode(r);
|
|
3761
|
+
i["TLS.userbuf"] = c, s = this._hmacsha256(e, a, n, c);
|
|
3762
|
+
} else s = this._hmacsha256(e, a, n, null);
|
|
3763
|
+
i["TLS.sig"] = s;
|
|
3764
|
+
let l = JSON.stringify(i), h = Ji.deflateSync(this.newBuffer(l)).toString("base64"), o = this.escape(h);
|
|
3765
|
+
return console.log("ret=" + o), o;
|
|
3766
|
+
}
|
|
3767
|
+
validate(e) {
|
|
3768
|
+
let n = this.decode(e), r = Ji.inflateSync(n);
|
|
3769
|
+
console.log("validate ret=" + r);
|
|
3770
|
+
}
|
|
3771
|
+
}
|
|
3772
|
+
let yn = window.SDKAppID;
|
|
3773
|
+
console.log("🚀 ~GGG SDKAPPID:", yn);
|
|
3774
|
+
let cr = window.SDKSecretKey;
|
|
3775
|
+
console.log("🚀 ~GGG SECRETKEY:", cr);
|
|
3776
|
+
const Fs = 604800;
|
|
3777
|
+
function Zs({ userID: t, SDKAppID: e, SecretKey: n }) {
|
|
3778
|
+
e && (yn = e), n && (cr = n);
|
|
3779
|
+
const a = new Hs(yn, cr, Fs).genTestUserSig(t);
|
|
3780
|
+
return {
|
|
3781
|
+
SDKAppID: yn,
|
|
3782
|
+
userSig: a
|
|
3783
|
+
};
|
|
3784
|
+
}
|
|
3785
|
+
const Vs = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1768359133902'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='12117'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M17.516667%20500.983333c0%2055.033333%202.054167%2078.5875%2014.325%20132.345834%204.270833%2018.7%2014.745833%2048.591667%2021.870833%2066.466666%2017.0125%2042.6875%2048.295833%2096.245833%2077.591667%20129.0875%2029.6375%2033.2375%2040.495833%2045.695833%2075.304166%2073.045834%2048.570833%2038.158333%2096.041667%2062.558333%20154.916667%2081.779166%2020.004167%206.525%2052.5%2014.7125%2071.345833%2017%2022.9%202.779167%2040.520833%204.5%2056.5125%205.275h38.279167c16.5-0.783333%2034.504167-2.520833%2058.183333-5.120833%2015.904167-1.75%2033.991667-6.65%2049.720834-10.295833%2023.7125-5.491667%2065.575-21.241667%2086.541666-31.808334%206.816667-3.433333%2012.629167-6.158333%2018.9125-9.429166l19.304167-10.7c28.1-17%2044.783333-30.3125%2069.995833-50.016667l39.791667-38.55c28.733333-34.370833%2043.470833-48.891667%2067.520833-90.825%2011.525-20.0875%2019.495833-37.758333%2028.879167-59.4625%2051.383333-118.845833%2047.283333-280.908333-9.35-393.25-7.1375-14.15-13.129167-25.816667-20.55-39.458333-24.404167-44.895833-71.704167-100.0375-110.358333-131.329167-43.05-34.845833-62.083333-45.495833-111.354167-70.333333-60.920833-30.708333-143.316667-44.433333-212.279167-44.433334-104.808333%200-207.425%2038.2-290.058333%20100-38.145833%2028.533333-76.254167%2068.5875-104.320833%20107.366667C57.291667%20298.758333%2017.516667%20404.133333%2017.516667%20500.983333z'%20fill='%2314B400'%20p-id='12118'%3e%3c/path%3e%3cpath%20d='M401.0875%20150.3875c-90.966667%2016.291667-107.383333%20115.995833-88.566667%20212.3875%2019.2375%2098.554167%2089.308333%20242.670833%20150.279167%20319.683333%2023.741667%2029.991667%2030.2625%2037.158333%2055.091667%2061.583334l20.454166%2019.583333c40.208333%2037.041667%20152.145833%20115.054167%20217.9%2047.6%2010.195833-10.4625%2024.6-30.533333%2027.758334-50.491667%205.091667-32.220833-25.4625-49.9125-46.4375-69.7l-62.375-55.979166c-9.208333-9.379167-12.4875-4.5375-26.516667%200.304166-10.158333%203.5125-19.695833%206.958333-29.591667%2010.408334-41.625%2014.5-32.258333%2017.1125-54.270833-0.316667-61.595833-48.7875-107.7625-105.891667-126.308333-187.154167-2.345833-10.266667-11.1625-59.129167-8.441667-68.341666%202.15-7.279167%2058.345833-50.216667%2059.970833-56.291667%201.4125-5.2875-8.016667-98.666667-8.975-107.670833-2.379167-22.383333-3.391667-49.958333-16.391666-62.0875-14.179167-13.229167-39.808333-17.775-63.579167-13.516667z'%20fill='%23FEFDFC'%20p-id='12119'%3e%3c/path%3e%3c/svg%3e", Qi = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1768382101596'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='8216'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M510.82885015%20513.55777368m358.46705228-358.46705229a506.948967%20506.948967%200%201%200-716.93410456%20716.93410457%20506.948967%20506.948967%200%201%200%20716.93410456-716.93410457Z'%20fill='%23ea331b'%20p-id='8217'%3e%3c/path%3e%3cpath%20d='M511.23865671%20491.7945444c-41.24543107%200-82.50977582%207.84936752-119.82737014%2025.5340869l-7.84306295%2066.7921271c-0.01260984%203.92153148-2.96321511%206.87213675-7.86197665%207.86197664l-112.94262426%2024.55055158c-14.72150427%202.94430142-30.4580674-4.9239805-33.39606355-19.65179004a10.824279%2010.824279%200%200%201-0.01260913-7.85567209l0.99614446-63.84152111c0.97723076-18.66825471%209.82274203-35.35682893%2024.55055087-46.163107%2075.62502924-50.09094233%20165.98417187-77.57949006%20256.34962119-79.55286528%2090.35283807-1.96076538%20179.72844609%2022.60239532%20256.33700994%2071.69719391%2014.72780884%2010.80627807%2023.56701625%2027.50115756%2024.55685614%2046.16941085l-0.98353533%2065.79598264c0%2015.72395329-11.78350812%2027.50746142-27.51376598%2027.51376598-2.93799615%200.97092549-5.88860143%200-7.84936751-0.00630456l-112.96153866-22.58978619c-3.92153077%200-6.86583219-2.94430142-7.85567209-7.85567208l-5.90121055-66.7921271c-37.31128975-15.71134416-77.56057636-22.57087179-117.8413858-21.60625015z%20m0%200'%20fill='%23ffffff'%20p-id='8218'%20data-spm-anchor-id='a313x.search_index.0.i3.5a6e3a81TURsDW'%20class='selected'%3e%3c/path%3e%3c/svg%3e", js = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1768358629006'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='6156'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M512%20637.1c106.5%200%20193.7-87.2%20193.7-193.7V257.7C705.7%20151.2%20618.5%2064%20512%2064c-106.6%200-193.7%2087.2-193.7%20193.7v185.7c0%20106.5%2087.1%20193.7%20193.7%20193.7z'%20p-id='6157'%20fill='%232c2c2c'%3e%3c/path%3e%3cpath%20d='M834.9%20403c-22.3%200-40.4%2018.1-40.4%2040.4%200%20155.8-126.7%20282.5-282.5%20282.5S229.5%20599.2%20229.5%20443.4c0-22.3-18.1-40.4-40.4-40.4s-40.4%2018.1-40.4%2040.4c0%20183.9%20137.3%20336.1%20314.8%20359.9v108.3c0%2026.6%2021.8%2048.4%2048.4%2048.4%2026.6%200%2048.4-21.8%2048.4-48.4V803.3c177.5-23.8%20314.8-176.1%20314.8-359.9%200.1-22.3-17.9-40.4-40.2-40.4z'%20p-id='6158'%20fill='%232c2c2c'%3e%3c/path%3e%3c/svg%3e", Ws = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1768358648084'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='6380'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M556.4%20631.7L318.3%20291.6v151.8c0%20106.6%2087.2%20193.7%20193.7%20193.7%2015.3%200%2030.1-2%2044.4-5.4z'%20p-id='6381'%20fill='%23ffffff'%3e%3c/path%3e%3cpath%20d='M512%20725.9c-155.8%200-282.5-126.7-282.5-282.5%200-22.3-18.1-40.4-40.4-40.4s-40.4%2018.1-40.4%2040.4c0%20183.9%20137.3%20336.1%20314.8%20359.9v108.3c0%2026.6%2021.8%2048.4%2048.4%2048.4%2026.6%200%2048.4-21.8%2048.4-48.4V803.3c34.1-4.6%2066.6-13.9%2097-27.3l-47.6-67.9c-30.4%2011.3-63.3%2017.8-97.7%2017.8zM760.9%20707.3c70.3-66.2%20114.4-160%20114.4-264%200-22.3-18.1-40.4-40.4-40.4s-40.4%2018.1-40.4%2040.4c0%2076.6-30.8%20146.1-80.5%20197l-52.5-74.9c27.4-33.4%2044.2-75.8%2044.2-122.1V257.7C705.7%20151.2%20618.5%2064%20512%2064c-60.8%200-115.1%2028.5-150.7%2072.8l-35.7-51c-10.2-14.5-30.4-18.1-45-7.9-14.5%2010.2-18.1%2030.4-7.9%2045l494.7%20706.6c10.2%2014.5%2030.4%2018.1%2045%207.9%2014.5-10.2%2018.1-30.4%207.9-45l-59.4-85.1z'%20p-id='6382'%20fill='%23ffffff'%3e%3c/path%3e%3c/svg%3e", Ys = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1768358681920'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='7461'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M868.032%20287.808a64%2064%200%200%201%20101.056%2051.648l2.624%20302.592a64%2064%200%200%201-102.752%2051.456l-206.912-157.536a64%2064%200%200%201%201.728-103.104l204.256-145.056z'%20fill='%232c2c2c'%20p-id='7462'%3e%3c/path%3e%3cpath%20d='M144%20192h456.32a96%2096%200%200%201%2096%2096v417.376a96%2096%200%200%201-96%2096H144a96%2096%200%200%201-96-96V288a96%2096%200%200%201%2096-96z'%20fill='%232c2c2c'%20p-id='7463'%3e%3c/path%3e%3c/svg%3e", Ks = "data:image/svg+xml,%3c?xml%20version='1.0'%20standalone='no'?%3e%3c!DOCTYPE%20svg%20PUBLIC%20'-//W3C//DTD%20SVG%201.1//EN'%20'http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd'%3e%3csvg%20t='1768358492097'%20class='icon'%20viewBox='0%200%201024%201024'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20p-id='4839'%20id='mx_n_1768358492097'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20width='200'%20height='200'%3e%3cpath%20d='M106.912%20152.096A32%2032%200%201%201%20149.12%20103.904l768%20672a32%2032%200%200%201-42.176%2048.192l-768-672z'%20fill='%23ffffff'%20p-id='4840'%3e%3c/path%3e%3cpath%20d='M732.672%20462.4l-37.056-52.16%20172.416-122.432a64%2064%200%200%201%20101.056%2051.648l2.624%20302.592a63.904%2063.904%200%200%201-20.16%2047.2l-43.84-46.656-2.624-302.592-172.416%20122.432z%20m-34.72-54.016l35.616%2053.184c-10.752%207.2-24.32%2012.16-37.216%2012.16a64%2064%200%200%201-64-64V288a32%2032%200%200%200-32-32h-205.952V192h205.952a96%2096%200%200%201%2096%2096v121.28c0.416-0.224%201.088-0.544%201.6-0.896zM632.32%20608h64v97.376a96%2096%200%200%201-96%2096H144a96%2096%200%200%201-96-96V288a96%2096%200%200%201%2096-96h96v64h-96a32%2032%200%200%200-32%2032v417.376a32%2032%200%200%200%2032%2032h456.32a32%2032%200%200%200%2032-32V608z'%20fill='%23ffffff'%20p-id='4841'%3e%3c/path%3e%3c/svg%3e", Gs = (t, e) => {
|
|
3786
|
+
const n = t.__vccOpts || t;
|
|
3787
|
+
for (const [r, a] of e)
|
|
3788
|
+
n[r] = a;
|
|
3789
|
+
return n;
|
|
3790
|
+
}, qs = {
|
|
3791
|
+
key: 0,
|
|
3792
|
+
class: "callkit-wrapper"
|
|
3793
|
+
}, Xs = { class: "call-label" }, $s = ["id"], Js = { class: "bottom-controls" }, Qs = {
|
|
3794
|
+
key: 0,
|
|
3795
|
+
class: "operation-btn"
|
|
3796
|
+
}, t0 = ["src"], e0 = { class: "operation-btn" }, n0 = ["src"], r0 = ["src"], i0 = { class: "operation-btn" }, a0 = ["src"], o0 = ["src"], s0 = {
|
|
3797
|
+
__name: "CallKit",
|
|
3798
|
+
emits: ["notify", "remote-user-status-change"],
|
|
3799
|
+
setup(t, { expose: e, emit: n }) {
|
|
3800
|
+
const r = bt(""), a = bt(null), i = bt(null), s = bt([]), l = bt([]), h = Mr({}), o = bt(!1), c = bt(!1), u = bt(""), p = bt(""), f = bt(null), _ = nt.create(), g = n;
|
|
3801
|
+
function d(M, O) {
|
|
3802
|
+
try {
|
|
3803
|
+
g("notify", { type: M, text: O });
|
|
3804
|
+
} catch (j) {
|
|
3805
|
+
console.warn("emit notify failed", j);
|
|
3806
|
+
}
|
|
3807
|
+
}
|
|
3808
|
+
const v = Mr({
|
|
3809
|
+
audio: !0,
|
|
3810
|
+
video: !0
|
|
3811
|
+
}), w = bt(!1), m = bt("1440p");
|
|
3812
|
+
let y = null;
|
|
3813
|
+
async function x() {
|
|
3814
|
+
if (!a.value || !i.value) {
|
|
3815
|
+
d("error", "缺少 sdkAppId 或 sdkSecretKey");
|
|
3816
|
+
return;
|
|
3817
|
+
}
|
|
3818
|
+
try {
|
|
3819
|
+
const { userSig: M } = Zs({
|
|
3820
|
+
userID: r.value,
|
|
3821
|
+
SDKAppID: a.value,
|
|
3822
|
+
SecretKey: i.value
|
|
3823
|
+
});
|
|
3824
|
+
console.log("🚀 ~ 当前用户:", r.value), await _.enterRoom({ sdkAppId: a.value, userId: r.value, userSig: M, roomId: 8888 }), Y(), await H(), N(), d("info", "进入房间成功");
|
|
3825
|
+
} catch (M) {
|
|
3826
|
+
d("error", "进入房间失败: " + M);
|
|
3827
|
+
}
|
|
3828
|
+
}
|
|
3829
|
+
async function S({ userId: M, sdkAppId: O, sdkSecretKey: j } = {}) {
|
|
3830
|
+
r.value = M || `user_${Math.floor(Math.random() * 900 + 100)}`, a.value = O || a.value, i.value = j || i.value, await x();
|
|
3831
|
+
}
|
|
3832
|
+
function k() {
|
|
3833
|
+
o.value = !0;
|
|
3834
|
+
}
|
|
3835
|
+
function E() {
|
|
3836
|
+
o.value = !1, c.value = !1, f.value = null, u.value = "", p.value = "";
|
|
3837
|
+
}
|
|
3838
|
+
async function B() {
|
|
3839
|
+
try {
|
|
3840
|
+
await _.exitRoom(), console.log("🚀 ~ 退出房间成功"), await R(), await V(), et(), Z();
|
|
3841
|
+
} catch (M) {
|
|
3842
|
+
d("error", "退出房间失败: " + M);
|
|
3843
|
+
}
|
|
3844
|
+
}
|
|
3845
|
+
async function b() {
|
|
3846
|
+
console.log("🚀 ~ 打开麦克风");
|
|
3847
|
+
try {
|
|
3848
|
+
await _.startLocalAudio(), v.audio = !0;
|
|
3849
|
+
} catch (M) {
|
|
3850
|
+
v.audio = !1, d("error", "启动麦克风失败: " + M);
|
|
3851
|
+
}
|
|
3852
|
+
}
|
|
3853
|
+
async function R() {
|
|
3854
|
+
console.log("🚀 ~ 关闭麦克风"), await _.stopLocalAudio();
|
|
3855
|
+
try {
|
|
3856
|
+
await _.stopLocalAudio(), v.audio = !1;
|
|
3857
|
+
} catch (M) {
|
|
3858
|
+
d("error", "关闭麦克风失败: " + M);
|
|
3859
|
+
}
|
|
3860
|
+
}
|
|
3861
|
+
async function D() {
|
|
3862
|
+
console.log("🚀 ~ 打开摄像头");
|
|
3863
|
+
try {
|
|
3864
|
+
const M = "local-video", O = await nt.getCameraList();
|
|
3865
|
+
await _.startLocalVideo({ view: M, option: { profile: m.value } }), O[1] && await _.updateLocalVideo({ option: { cameraId: O[1].deviceId } }), v.video = !0;
|
|
3866
|
+
} catch (M) {
|
|
3867
|
+
v.video = !1, d("error", "打开摄像头失败: " + M);
|
|
3868
|
+
}
|
|
3869
|
+
}
|
|
3870
|
+
async function T(M) {
|
|
3871
|
+
if (!(!M || m.value === M))
|
|
3872
|
+
try {
|
|
3873
|
+
try {
|
|
3874
|
+
await _.stopLocalVideo();
|
|
3875
|
+
} catch {
|
|
3876
|
+
}
|
|
3877
|
+
await _.startLocalVideo({ view: "local-video", option: { profile: M } }), m.value = M, v.video = !0, d("info", `已将视频质量调整为 ${M}`);
|
|
3878
|
+
} catch (O) {
|
|
3879
|
+
v.video = !1, d("error", "调整视频质量失败:" + O);
|
|
3880
|
+
}
|
|
3881
|
+
}
|
|
3882
|
+
async function P() {
|
|
3883
|
+
try {
|
|
3884
|
+
let M = null;
|
|
3885
|
+
typeof _.getLocalStats == "function" && (M = await _.getLocalStats());
|
|
3886
|
+
let O = !1, j = "";
|
|
3887
|
+
if (M) {
|
|
3888
|
+
const W = M.uplinkKbps ?? M.sendKbps ?? M.txKbps ?? null, F = M.uplinkPacketLostRate ?? M.packetLostRate ?? M.sendPacketLostRate ?? null;
|
|
3889
|
+
j = `uplink:${W ?? "n/a"}kbps loss:${F ?? "n/a"}`, (W !== null && W < 300 || F !== null && F > 0.05) && (O = !0);
|
|
3890
|
+
} else if (typeof _.getNetworkQuality == "function") {
|
|
3891
|
+
const W = await _.getNetworkQuality(), F = W.uplinkQuality ?? W.upQuality ?? null;
|
|
3892
|
+
j = `uplinkQuality:${F ?? "n/a"}`, F !== null && F >= 4 && (O = !0);
|
|
3893
|
+
} else
|
|
3894
|
+
return;
|
|
3895
|
+
O && !w.value ? (w.value = !0, d("warn", `网络不稳定:${j},已切换到低清 360p`), await T("360p")) : !O && w.value && (w.value = !1, d("info", `网络已恢复:${j},恢复到高清`), await T("1440p"));
|
|
3896
|
+
} catch (M) {
|
|
3897
|
+
console.warn("checkNetworkQuality error", M);
|
|
3898
|
+
}
|
|
3899
|
+
}
|
|
3900
|
+
function N() {
|
|
3901
|
+
Z(), y = setInterval(() => {
|
|
3902
|
+
P();
|
|
3903
|
+
}, 5e3);
|
|
3904
|
+
}
|
|
3905
|
+
function Z() {
|
|
3906
|
+
y && (clearInterval(y), y = null);
|
|
3907
|
+
}
|
|
3908
|
+
async function V() {
|
|
3909
|
+
console.log("🚀 ~ 关闭摄像头");
|
|
3910
|
+
try {
|
|
3911
|
+
await _.stopLocalVideo(), v.video = !1;
|
|
3912
|
+
} catch (M) {
|
|
3913
|
+
d("error", "关闭摄像头失败: " + M);
|
|
3914
|
+
}
|
|
3915
|
+
}
|
|
3916
|
+
async function H() {
|
|
3917
|
+
console.log("🚀 ~ 打开扬声器");
|
|
3918
|
+
try {
|
|
3919
|
+
await _.setCurrentSpeaker(nt.TYPE.SPEAKER);
|
|
3920
|
+
} catch (M) {
|
|
3921
|
+
d("error", "打开扬声器失败:" + M);
|
|
3922
|
+
}
|
|
3923
|
+
}
|
|
3924
|
+
function Y() {
|
|
3925
|
+
_.on(nt.EVENT.ERROR, z), _.on(nt.EVENT.REMOTE_VIDEO_AVAILABLE, L), _.on(nt.EVENT.REMOTE_VIDEO_UNAVAILABLE, C), _.on(nt.EVENT.VIDEO_SIZE_CHANGED, I), _.on(nt.EVENT.REMOTE_AUDIO_AVAILABLE, it), _.on(nt.EVENT.REMOTE_USER_ENTER, wt), _.on(nt.EVENT.REMOTE_USER_EXIT, dt), _.on(nt.EVENT.CUSTOM_MESSAGE, It);
|
|
3926
|
+
}
|
|
3927
|
+
function et() {
|
|
3928
|
+
_.off(nt.EVENT.ERROR, z), _.off(nt.EVENT.REMOTE_VIDEO_AVAILABLE, L), _.off(nt.EVENT.REMOTE_VIDEO_UNAVAILABLE, C), _.off(nt.EVENT.VIDEO_SIZE_CHANGED, I), _.off(nt.EVENT.REMOTE_AUDIO_AVAILABLE, it), _.off(nt.EVENT.REMOTE_USER_ENTER, wt), _.off(nt.EVENT.REMOTE_USER_EXIT, dt), _.off(nt.EVENT.CUSTOM_MESSAGE, It);
|
|
3929
|
+
}
|
|
3930
|
+
function z(M) {
|
|
3931
|
+
console.error("🚀 ~ 错误 ~ error:", M), d("error", "TRTC 错误:" + (M && M.message ? M.message : JSON.stringify(M)));
|
|
3932
|
+
}
|
|
3933
|
+
function I(M) {
|
|
3934
|
+
console.log("🚀 ~ 远端视频尺寸变化 ~ event:", M);
|
|
3935
|
+
const { userId: O, streamType: j, newHeight: W, newWidth: F } = M, ft = `${O}_${j}`;
|
|
3936
|
+
W > 0 && F > 0 && (h[ft] = F / W);
|
|
3937
|
+
}
|
|
3938
|
+
async function L(M) {
|
|
3939
|
+
console.log("🚀 ~ 远端用户发布了视频 ~ event:", M);
|
|
3940
|
+
const { userId: O, streamType: j } = M, W = `${O}_${j}`;
|
|
3941
|
+
try {
|
|
3942
|
+
if (j === nt.TYPE.STREAM_TYPE_MAIN) {
|
|
3943
|
+
s.value.push(W), await Pr(), await _.startRemoteVideo({ userId: O, streamType: j, view: W });
|
|
3944
|
+
try {
|
|
3945
|
+
await _.startRemoteAudio({ userId: O });
|
|
3946
|
+
} catch {
|
|
3947
|
+
}
|
|
3948
|
+
await H();
|
|
3949
|
+
} else {
|
|
3950
|
+
s.value.push(W), await Pr(), _.startRemoteVideo({ userId: O, streamType: j, view: W });
|
|
3951
|
+
try {
|
|
3952
|
+
await _.startRemoteAudio({ userId: O });
|
|
3953
|
+
} catch {
|
|
3954
|
+
}
|
|
3955
|
+
}
|
|
3956
|
+
setTimeout(() => {
|
|
3957
|
+
try {
|
|
3958
|
+
const F = document.getElementById(W);
|
|
3959
|
+
if (F) {
|
|
3960
|
+
const ft = F.querySelector("video");
|
|
3961
|
+
ft && ft.videoWidth > 0 && ft.videoHeight > 0 && (h[W] = ft.videoWidth / ft.videoHeight);
|
|
3962
|
+
}
|
|
3963
|
+
} catch (F) {
|
|
3964
|
+
console.warn("Failed to get video element:", F);
|
|
3965
|
+
}
|
|
3966
|
+
}, 1e3);
|
|
3967
|
+
} catch (F) {
|
|
3968
|
+
console.log("🚀 ~ handleRemoteVideoAvailable ~ error:", F), d("error", "远端视频订阅失败:" + F);
|
|
3969
|
+
}
|
|
3970
|
+
}
|
|
3971
|
+
async function C(M) {
|
|
3972
|
+
console.log("🚀 ~ 远端用户停止发布视频 ~ event:", M);
|
|
3973
|
+
const { userId: O, streamType: j } = M, W = `${O}_${j}`;
|
|
3974
|
+
try {
|
|
3975
|
+
await _.stopRemoteVideo({ userId: O, streamType: j });
|
|
3976
|
+
} catch {
|
|
3977
|
+
}
|
|
3978
|
+
const F = s.value.indexOf(W);
|
|
3979
|
+
F !== -1 && s.value.splice(F, 1), delete h[W];
|
|
3980
|
+
}
|
|
3981
|
+
async function it(M) {
|
|
3982
|
+
console.log("🚀 ~ 异步订阅音频 ~ event:", M);
|
|
3983
|
+
const { userId: O } = M;
|
|
3984
|
+
try {
|
|
3985
|
+
await _.startRemoteAudio({ userId: O });
|
|
3986
|
+
} catch (j) {
|
|
3987
|
+
console.warn("startRemoteAudio fail", j);
|
|
3988
|
+
}
|
|
3989
|
+
}
|
|
3990
|
+
function wt(M) {
|
|
3991
|
+
const { userId: O } = M;
|
|
3992
|
+
if (console.log("🚀 ~ 远端用户进入/退出", O), !l.value.includes(O)) {
|
|
3993
|
+
l.value.push(O), d("info", `用户 ${O} 进入房间`);
|
|
3994
|
+
try {
|
|
3995
|
+
g("remote-user-status-change", {
|
|
3996
|
+
userId: O,
|
|
3997
|
+
action: "enter",
|
|
3998
|
+
userList: [...l.value]
|
|
3999
|
+
});
|
|
4000
|
+
} catch (j) {
|
|
4001
|
+
console.warn("emit remote-user-status-change failed", j);
|
|
4002
|
+
}
|
|
4003
|
+
}
|
|
4004
|
+
}
|
|
4005
|
+
async function dt(M) {
|
|
4006
|
+
const { userId: O } = M;
|
|
4007
|
+
console.log("🚀 ~ 远端用户退出房间", O);
|
|
4008
|
+
try {
|
|
4009
|
+
await _.stopRemoteAudio({ userId: O });
|
|
4010
|
+
} catch {
|
|
4011
|
+
}
|
|
4012
|
+
try {
|
|
4013
|
+
await _.stopRemoteVideo({ userId: O, streamType: nt.TYPE.STREAM_TYPE_MAIN });
|
|
4014
|
+
} catch {
|
|
4015
|
+
}
|
|
4016
|
+
try {
|
|
4017
|
+
await _.stopRemoteVideo({ userId: O, streamType: nt.TYPE.STREAM_TYPE_SUB });
|
|
4018
|
+
} catch {
|
|
4019
|
+
}
|
|
4020
|
+
["main", "screen", "sub"].forEach((W) => {
|
|
4021
|
+
const F = `${O}_${W}`, ft = s.value.indexOf(F);
|
|
4022
|
+
ft !== -1 && s.value.splice(ft, 1), delete h[F];
|
|
4023
|
+
});
|
|
4024
|
+
const j = l.value.indexOf(O);
|
|
4025
|
+
j !== -1 && l.value.splice(j, 1), d("info", `用户 ${O} 离开房间`);
|
|
4026
|
+
try {
|
|
4027
|
+
g("remote-user-status-change", {
|
|
4028
|
+
userId: O,
|
|
4029
|
+
action: "exit",
|
|
4030
|
+
userList: [...l.value]
|
|
4031
|
+
});
|
|
4032
|
+
} catch (W) {
|
|
4033
|
+
console.warn("emit remote-user-status-change failed", W);
|
|
4034
|
+
}
|
|
4035
|
+
try {
|
|
4036
|
+
const W = l.value.length;
|
|
4037
|
+
c.value && W === 0 && u.value === O && (d("info", "对方已离开,正在自动结束本地通话"), await Rt());
|
|
4038
|
+
} catch (W) {
|
|
4039
|
+
console.warn("auto hangup on remote exit failed", W);
|
|
4040
|
+
}
|
|
4041
|
+
}
|
|
4042
|
+
async function yt(M, O = 1) {
|
|
4043
|
+
console.log("🚀 ~ 发送自定义信令(广播) ~ payload, cmdId:", M, O);
|
|
4044
|
+
try {
|
|
4045
|
+
const W = new TextEncoder().encode(JSON.stringify(M)).buffer;
|
|
4046
|
+
await _.sendCustomMessage({ cmdId: O, data: W });
|
|
4047
|
+
} catch (j) {
|
|
4048
|
+
console.warn("发送自定义信令(广播)", j), d("error", "发送信令失败:" + j);
|
|
4049
|
+
}
|
|
4050
|
+
}
|
|
4051
|
+
async function It(M) {
|
|
4052
|
+
console.log("🚀 ~ 收到自定义消息", M);
|
|
4053
|
+
let O = null;
|
|
4054
|
+
if (M.data instanceof ArrayBuffer ? (O = M.data, M.userId || M.from) : M.message && M.message.data ? (O = M.message.data, M.userId || M.message.userId) : (M.userId && M.cmdId && M.data || M.userId && M.data instanceof ArrayBuffer) && (O = M.data, M.userId), !!O)
|
|
4055
|
+
try {
|
|
4056
|
+
const W = new TextDecoder().decode(new Uint8Array(O)), F = JSON.parse(W);
|
|
4057
|
+
if (console.log("🚀 ~ 收到自定义消息内容", F), !F || !F.type) return;
|
|
4058
|
+
F.type === "incoming_call" && F.to === r.value ? (f.value = { from: F.from, callId: F.callId }, o.value = !0, p.value = F.from) : F.type === "call_response" && F.to === r.value ? F.accept ? (d("info", `用户 ${F.from} 接听了呼叫`), await b(), await D(), c.value = !0, p.value = F.from) : (d("info", `用户 ${F.from} 拒绝了呼叫`), E()) : F.type === "hangup_call" && F.to === r.value && (await Rt(), d("info", `用户 ${F.from} 已挂断通话`));
|
|
4059
|
+
} catch (j) {
|
|
4060
|
+
console.warn("parse custom message fail", j), d("error", "接收广播消息异常: " + error.message);
|
|
4061
|
+
}
|
|
4062
|
+
}
|
|
4063
|
+
async function Me(M) {
|
|
4064
|
+
console.log("🚀 ~ 发起呼叫");
|
|
4065
|
+
const O = M && String(M).trim();
|
|
4066
|
+
if (!O) {
|
|
4067
|
+
d("error", "缺少呼叫目标,请传入目标用户ID");
|
|
4068
|
+
return;
|
|
4069
|
+
}
|
|
4070
|
+
if (!l.value.includes(O)) {
|
|
4071
|
+
d("error", "用户不在线或未加入房间");
|
|
4072
|
+
return;
|
|
4073
|
+
}
|
|
4074
|
+
o.value = !0, u.value = O, p.value = O;
|
|
4075
|
+
const j = `call_${Date.now()}_${Math.floor(Math.random() * 1e4)}`, W = { type: "incoming_call", from: r.value, to: O, callId: j };
|
|
4076
|
+
await yt(W, 1), d("info", `已向 ${O} 发起呼叫,等待应答`);
|
|
4077
|
+
}
|
|
4078
|
+
async function Rt() {
|
|
4079
|
+
try {
|
|
4080
|
+
await R(), await V();
|
|
4081
|
+
const M = `call_${Date.now()}_${Math.floor(Math.random() * 1e4)}`, O = {
|
|
4082
|
+
type: "hangup_call",
|
|
4083
|
+
from: r.value,
|
|
4084
|
+
to: u.value,
|
|
4085
|
+
callId: M
|
|
4086
|
+
};
|
|
4087
|
+
await yt(O, 3), E(), d("info", "已挂断");
|
|
4088
|
+
} catch (M) {
|
|
4089
|
+
console.warn("hangup fail", M), d("error", "挂断失败:" + M);
|
|
4090
|
+
}
|
|
4091
|
+
}
|
|
4092
|
+
async function mt() {
|
|
4093
|
+
if (console.log("🚀 ~ 接听来电"), !f.value) return;
|
|
4094
|
+
const M = { type: "call_response", from: r.value, to: f.value.from, callId: f.value.callId, accept: !0 };
|
|
4095
|
+
await yt(M, 2), await b(), await D(), c.value = !0, u.value = f.value.from, p.value = f.value.from, f.value = null;
|
|
4096
|
+
}
|
|
4097
|
+
async function pt() {
|
|
4098
|
+
if (console.log("🚀 ~ 拒绝来电"), f.value) {
|
|
4099
|
+
const M = { type: "call_response", from: r.value, to: f.value.from, callId: f.value.callId, accept: !1 };
|
|
4100
|
+
await yt(M, 2), f.value = null, E();
|
|
4101
|
+
return;
|
|
4102
|
+
} else
|
|
4103
|
+
Rt();
|
|
4104
|
+
}
|
|
4105
|
+
function ye() {
|
|
4106
|
+
v.audio ? R() : b();
|
|
4107
|
+
}
|
|
4108
|
+
function $t() {
|
|
4109
|
+
v.video ? V() : D();
|
|
4110
|
+
}
|
|
4111
|
+
return e({ handleCall: Me, init: S, show: k, hide: E, hangup: Rt }), Ja(() => {
|
|
4112
|
+
B();
|
|
4113
|
+
}), (M, O) => (Qt(), Qa(to, { name: "callkit" }, {
|
|
4114
|
+
default: eo(() => [
|
|
4115
|
+
o.value ? (Qt(), Se("div", qs, [
|
|
4116
|
+
at("div", Xs, Tn(p.value), 1),
|
|
4117
|
+
O[3] || (O[3] = at("div", {
|
|
4118
|
+
class: "local-video",
|
|
4119
|
+
id: "local-video"
|
|
4120
|
+
}, null, -1)),
|
|
4121
|
+
at("div", {
|
|
4122
|
+
class: Ln(["player-container", { single: s.value.length === 1 }])
|
|
4123
|
+
}, [
|
|
4124
|
+
(Qt(!0), Se(zn, null, no(s.value, (j) => (Qt(), Se("div", {
|
|
4125
|
+
key: j,
|
|
4126
|
+
class: "remote",
|
|
4127
|
+
id: j,
|
|
4128
|
+
style: ro({
|
|
4129
|
+
aspectRatio: h[j] || "16/9"
|
|
4130
|
+
})
|
|
4131
|
+
}, null, 12, $s))), 128))
|
|
4132
|
+
], 2),
|
|
4133
|
+
at("div", Js, [
|
|
4134
|
+
c.value ? (Qt(), Se(zn, { key: 1 }, [
|
|
4135
|
+
at("div", {
|
|
4136
|
+
class: Ln(["equipment-btn operation-btn", v.audio ? "equipment-btn--open" : "equipment-btn--close"])
|
|
4137
|
+
}, [
|
|
4138
|
+
at("img", {
|
|
4139
|
+
src: v.audio ? te(js) : te(Ws),
|
|
4140
|
+
onClick: ye
|
|
4141
|
+
}, null, 8, r0),
|
|
4142
|
+
at("div", null, Tn(v.audio ? "麦克风已开" : "麦克风已关"), 1)
|
|
4143
|
+
], 2),
|
|
4144
|
+
at("div", i0, [
|
|
4145
|
+
at("img", {
|
|
4146
|
+
src: te(Qi),
|
|
4147
|
+
onClick: Rt
|
|
4148
|
+
}, null, 8, a0),
|
|
4149
|
+
O[2] || (O[2] = at("div", null, "挂断", -1))
|
|
4150
|
+
]),
|
|
4151
|
+
at("div", {
|
|
4152
|
+
class: Ln(["equipment-btn operation-btn", v.video ? "equipment-btn--open" : "equipment-btn--close"])
|
|
4153
|
+
}, [
|
|
4154
|
+
at("img", {
|
|
4155
|
+
src: v.video ? te(Ys) : te(Ks),
|
|
4156
|
+
onClick: $t
|
|
4157
|
+
}, null, 8, o0),
|
|
4158
|
+
at("div", null, Tn(v.video ? "摄像头已开" : "摄像头已关"), 1)
|
|
4159
|
+
], 2)
|
|
4160
|
+
], 64)) : (Qt(), Se(zn, { key: 0 }, [
|
|
4161
|
+
f.value ? (Qt(), Se("div", Qs, [
|
|
4162
|
+
at("img", {
|
|
4163
|
+
src: te(Vs),
|
|
4164
|
+
onClick: mt
|
|
4165
|
+
}, null, 8, t0),
|
|
4166
|
+
O[0] || (O[0] = at("div", null, "接听", -1))
|
|
4167
|
+
])) : Dr("", !0),
|
|
4168
|
+
at("div", e0, [
|
|
4169
|
+
at("img", {
|
|
4170
|
+
src: te(Qi),
|
|
4171
|
+
onClick: pt
|
|
4172
|
+
}, null, 8, n0),
|
|
4173
|
+
O[1] || (O[1] = at("div", null, "挂断", -1))
|
|
4174
|
+
])
|
|
4175
|
+
], 64))
|
|
4176
|
+
])
|
|
4177
|
+
])) : Dr("", !0)
|
|
4178
|
+
]),
|
|
4179
|
+
_: 1
|
|
4180
|
+
}));
|
|
4181
|
+
}
|
|
4182
|
+
}, c0 = /* @__PURE__ */ Gs(s0, [["__scopeId", "data-v-7a5bd531"]]);
|
|
4183
|
+
export {
|
|
4184
|
+
c0 as CallKit,
|
|
4185
|
+
c0 as default
|
|
4186
|
+
};
|