Add files via upload

This commit is contained in:
潇洒 2024-10-13 09:52:40 +08:00 committed by GitHub
parent b5449375c3
commit c234c394e5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
12 changed files with 10405 additions and 9493 deletions

999
JS/cheerio.min.js vendored

File diff suppressed because one or more lines are too long

View File

@ -1097,7 +1097,15 @@ var CryptoJS = CryptoJS || (function(Math, undefined) {
// Convert other array views to uint8 // Convert other array views to uint8
if ( if (
typedArray instanceof Int8Array || (typeof Uint8ClampedArray !== "undefined" && typedArray instanceof Uint8ClampedArray) || typedArray instanceof Int16Array || typedArray instanceof Uint16Array || typedArray instanceof Int32Array || typedArray instanceof Uint32Array || typedArray instanceof Float32Array || typedArray instanceof Float64Array) { typedArray instanceof Int8Array ||
(typeof Uint8ClampedArray !== "undefined" && typedArray instanceof Uint8ClampedArray) ||
typedArray instanceof Int16Array ||
typedArray instanceof Uint16Array ||
typedArray instanceof Int32Array ||
typedArray instanceof Uint32Array ||
typedArray instanceof Float32Array ||
typedArray instanceof Float64Array
) {
typedArray = new Uint8Array(typedArray.buffer, typedArray.byteOffset, typedArray.byteLength); typedArray = new Uint8Array(typedArray.buffer, typedArray.byteOffset, typedArray.byteLength);
} }
@ -1425,7 +1433,8 @@ var CryptoJS = CryptoJS || (function(Math, undefined) {
_doReset: function() { _doReset: function() {
this._hash = new WordArray.init([ this._hash = new WordArray.init([
0x67452301, 0xefcdab89, 0x67452301, 0xefcdab89,
0x98badcfe, 0x10325476]); 0x98badcfe, 0x10325476
]);
}, },
_doProcessBlock: function(M, offset) { _doProcessBlock: function(M, offset) {
@ -1436,7 +1445,9 @@ var CryptoJS = CryptoJS || (function(Math, undefined) {
var M_offset_i = M[offset_i]; var M_offset_i = M[offset_i];
M[offset_i] = ( M[offset_i] = (
(((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) | (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00)); (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) |
(((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00)
);
} }
// Shortcuts // Shortcuts
@ -1555,9 +1566,13 @@ var CryptoJS = CryptoJS || (function(Math, undefined) {
var nBitsTotalH = Math.floor(nBitsTotal / 0x100000000); var nBitsTotalH = Math.floor(nBitsTotal / 0x100000000);
var nBitsTotalL = nBitsTotal; var nBitsTotalL = nBitsTotal;
dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = ( dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = (
(((nBitsTotalH << 8) | (nBitsTotalH >>> 24)) & 0x00ff00ff) | (((nBitsTotalH << 24) | (nBitsTotalH >>> 8)) & 0xff00ff00)); (((nBitsTotalH << 8) | (nBitsTotalH >>> 24)) & 0x00ff00ff) |
(((nBitsTotalH << 24) | (nBitsTotalH >>> 8)) & 0xff00ff00)
);
dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = ( dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = (
(((nBitsTotalL << 8) | (nBitsTotalL >>> 24)) & 0x00ff00ff) | (((nBitsTotalL << 24) | (nBitsTotalL >>> 8)) & 0xff00ff00)); (((nBitsTotalL << 8) | (nBitsTotalL >>> 24)) & 0x00ff00ff) |
(((nBitsTotalL << 24) | (nBitsTotalL >>> 8)) & 0xff00ff00)
);
data.sigBytes = (dataWords.length + 1) * 4; data.sigBytes = (dataWords.length + 1) * 4;
@ -1573,7 +1588,8 @@ var CryptoJS = CryptoJS || (function(Math, undefined) {
// Shortcut // Shortcut
var H_i = H[i]; var H_i = H[i];
H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) | (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00); H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) |
(((H_i << 24) | (H_i >>> 8)) & 0xff00ff00);
} }
// Return final computed hash // Return final computed hash
@ -1674,7 +1690,8 @@ var CryptoJS = CryptoJS || (function(Math, undefined) {
this._hash = new WordArray.init([ this._hash = new WordArray.init([
0x67452301, 0xefcdab89, 0x67452301, 0xefcdab89,
0x98badcfe, 0x10325476, 0x98badcfe, 0x10325476,
0xc3d2e1f0]); 0xc3d2e1f0
]);
}, },
_doProcessBlock: function(M, offset) { _doProcessBlock: function(M, offset) {
@ -1872,10 +1889,14 @@ var CryptoJS = CryptoJS || (function(Math, undefined) {
W[i] = M[offset + i] | 0; W[i] = M[offset + i] | 0;
} else { } else {
var gamma0x = W[i - 15]; var gamma0x = W[i - 15];
var gamma0 = ((gamma0x << 25) | (gamma0x >>> 7)) ^ ((gamma0x << 14) | (gamma0x >>> 18)) ^ (gamma0x >>> 3); var gamma0 = ((gamma0x << 25) | (gamma0x >>> 7)) ^
((gamma0x << 14) | (gamma0x >>> 18)) ^
(gamma0x >>> 3);
var gamma1x = W[i - 2]; var gamma1x = W[i - 2];
var gamma1 = ((gamma1x << 15) | (gamma1x >>> 17)) ^ ((gamma1x << 13) | (gamma1x >>> 19)) ^ (gamma1x >>> 10); var gamma1 = ((gamma1x << 15) | (gamma1x >>> 17)) ^
((gamma1x << 13) | (gamma1x >>> 19)) ^
(gamma1x >>> 10);
W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16]; W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16];
} }
@ -1999,7 +2020,8 @@ var CryptoJS = CryptoJS || (function(Math, undefined) {
_doReset: function() { _doReset: function() {
this._hash = new WordArray.init([ this._hash = new WordArray.init([
0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939, 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939,
0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4]); 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4
]);
}, },
_doFinalize: function() { _doFinalize: function() {
@ -2107,7 +2129,8 @@ var CryptoJS = CryptoJS || (function(Math, undefined) {
X64Word_create(0x28db77f5, 0x23047d84), X64Word_create(0x32caab7b, 0x40c72493), X64Word_create(0x28db77f5, 0x23047d84), X64Word_create(0x32caab7b, 0x40c72493),
X64Word_create(0x3c9ebe0a, 0x15c9bebc), X64Word_create(0x431d67c4, 0x9c100d4c), X64Word_create(0x3c9ebe0a, 0x15c9bebc), X64Word_create(0x431d67c4, 0x9c100d4c),
X64Word_create(0x4cc5d4be, 0xcb3e42b6), X64Word_create(0x597f299c, 0xfc657e2a), X64Word_create(0x4cc5d4be, 0xcb3e42b6), X64Word_create(0x597f299c, 0xfc657e2a),
X64Word_create(0x5fcb6fab, 0x3ad6faec), X64Word_create(0x6c44198c, 0x4a475817)]; X64Word_create(0x5fcb6fab, 0x3ad6faec), X64Word_create(0x6c44198c, 0x4a475817)
];
// Reusable objects // Reusable objects
var W = []; var W = [];
@ -2126,7 +2149,8 @@ var CryptoJS = CryptoJS || (function(Math, undefined) {
new X64Word.init(0x6a09e667, 0xf3bcc908), new X64Word.init(0xbb67ae85, 0x84caa73b), new X64Word.init(0x6a09e667, 0xf3bcc908), new X64Word.init(0xbb67ae85, 0x84caa73b),
new X64Word.init(0x3c6ef372, 0xfe94f82b), new X64Word.init(0xa54ff53a, 0x5f1d36f1), new X64Word.init(0x3c6ef372, 0xfe94f82b), new X64Word.init(0xa54ff53a, 0x5f1d36f1),
new X64Word.init(0x510e527f, 0xade682d1), new X64Word.init(0x9b05688c, 0x2b3e6c1f), new X64Word.init(0x510e527f, 0xade682d1), new X64Word.init(0x9b05688c, 0x2b3e6c1f),
new X64Word.init(0x1f83d9ab, 0xfb41bd6b), new X64Word.init(0x5be0cd19, 0x137e2179)]); new X64Word.init(0x1f83d9ab, 0xfb41bd6b), new X64Word.init(0x5be0cd19, 0x137e2179)
]);
}, },
_doProcessBlock: function(M, offset) { _doProcessBlock: function(M, offset) {
@ -2382,7 +2406,8 @@ var CryptoJS = CryptoJS || (function(Math, undefined) {
new X64Word.init(0xcbbb9d5d, 0xc1059ed8), new X64Word.init(0x629a292a, 0x367cd507), new X64Word.init(0xcbbb9d5d, 0xc1059ed8), new X64Word.init(0x629a292a, 0x367cd507),
new X64Word.init(0x9159015a, 0x3070dd17), new X64Word.init(0x152fecd8, 0xf70e5939), new X64Word.init(0x9159015a, 0x3070dd17), new X64Word.init(0x152fecd8, 0xf70e5939),
new X64Word.init(0x67332667, 0xffc00b31), new X64Word.init(0x8eb44a87, 0x68581511), new X64Word.init(0x67332667, 0xffc00b31), new X64Word.init(0x8eb44a87, 0x68581511),
new X64Word.init(0xdb0c2e0d, 0x64f98fa7), new X64Word.init(0x47b5481d, 0xbefa4fa4)]); new X64Word.init(0xdb0c2e0d, 0x64f98fa7), new X64Word.init(0x47b5481d, 0xbefa4fa4)
]);
}, },
_doFinalize: function() { _doFinalize: function() {
@ -2547,9 +2572,13 @@ var CryptoJS = CryptoJS || (function(Math, undefined) {
// Swap endian // Swap endian
M2i = ( M2i = (
(((M2i << 8) | (M2i >>> 24)) & 0x00ff00ff) | (((M2i << 24) | (M2i >>> 8)) & 0xff00ff00)); (((M2i << 8) | (M2i >>> 24)) & 0x00ff00ff) |
(((M2i << 24) | (M2i >>> 8)) & 0xff00ff00)
);
M2i1 = ( M2i1 = (
(((M2i1 << 8) | (M2i1 >>> 24)) & 0x00ff00ff) | (((M2i1 << 24) | (M2i1 >>> 8)) & 0xff00ff00)); (((M2i1 << 8) | (M2i1 >>> 24)) & 0x00ff00ff) |
(((M2i1 << 24) | (M2i1 >>> 8)) & 0xff00ff00)
);
// Absorb message into state // Absorb message into state
var lane = state[i]; var lane = state[i];
@ -2679,9 +2708,13 @@ var CryptoJS = CryptoJS || (function(Math, undefined) {
// Swap endian // Swap endian
laneMsw = ( laneMsw = (
(((laneMsw << 8) | (laneMsw >>> 24)) & 0x00ff00ff) | (((laneMsw << 24) | (laneMsw >>> 8)) & 0xff00ff00)); (((laneMsw << 8) | (laneMsw >>> 24)) & 0x00ff00ff) |
(((laneMsw << 24) | (laneMsw >>> 8)) & 0xff00ff00)
);
laneLsw = ( laneLsw = (
(((laneLsw << 8) | (laneLsw >>> 24)) & 0x00ff00ff) | (((laneLsw << 24) | (laneLsw >>> 8)) & 0xff00ff00)); (((laneLsw << 8) | (laneLsw >>> 24)) & 0x00ff00ff) |
(((laneLsw << 24) | (laneLsw >>> 8)) & 0xff00ff00)
);
// Squeeze state to retrieve hash // Squeeze state to retrieve hash
hashWords.push(laneLsw); hashWords.push(laneLsw);
@ -2768,25 +2801,29 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, 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, 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, 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]); 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13
]);
var _zr = WordArray.create([ var _zr = WordArray.create([
5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, 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, 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, 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, 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]); 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11
]);
var _sl = WordArray.create([ var _sl = WordArray.create([
11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, 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, 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, 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, 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]); 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6
]);
var _sr = WordArray.create([ var _sr = WordArray.create([
8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, 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, 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, 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, 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]); 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11
]);
var _hl = WordArray.create([0x00000000, 0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xA953FD4E]); var _hl = WordArray.create([0x00000000, 0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xA953FD4E]);
var _hr = WordArray.create([0x50A28BE6, 0x5C4DD124, 0x6D703EF3, 0x7A6D76E9, 0x00000000]); var _hr = WordArray.create([0x50A28BE6, 0x5C4DD124, 0x6D703EF3, 0x7A6D76E9, 0x00000000]);
@ -2809,7 +2846,9 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// Swap // Swap
M[offset_i] = ( M[offset_i] = (
(((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) | (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00)); (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) |
(((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00)
);
} }
// Shortcut // Shortcut
var H = this._hash.words; var H = this._hash.words;
@ -2894,7 +2933,9 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
// Add padding // Add padding
dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);
dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = ( dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = (
(((nBitsTotal << 8) | (nBitsTotal >>> 24)) & 0x00ff00ff) | (((nBitsTotal << 24) | (nBitsTotal >>> 8)) & 0xff00ff00)); (((nBitsTotal << 8) | (nBitsTotal >>> 24)) & 0x00ff00ff) |
(((nBitsTotal << 24) | (nBitsTotal >>> 8)) & 0xff00ff00)
);
data.sigBytes = (dataWords.length + 1) * 4; data.sigBytes = (dataWords.length + 1) * 4;
// Hash final blocks // Hash final blocks
@ -2910,7 +2951,8 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
var H_i = H[i]; var H_i = H[i];
// Swap // Swap
H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) | (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00); H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) |
(((H_i << 24) | (H_i >>> 8)) & 0xff00ff00);
} }
// Return final computed hash // Return final computed hash
@ -2936,15 +2978,15 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
} }
function f3(x, y, z) { function f3(x, y, z) {
return (((x) | (~ (y))) ^ (z)); return (((x) | (~(y))) ^ (z));
} }
function f4(x, y, z) { function f4(x, y, z) {
return (((x) & (z)) | ((y) & (~ (z)))); return (((x) & (z)) | ((y) & (~(z))));
} }
function f5(x, y, z) { function f5(x, y, z) {
return ((x) ^ ((y) | (~ (z)))); return ((x) ^ ((y) | (~(z))));
} }
@ -3472,7 +3514,7 @@ CryptoJS.lib.Cipher || (function(undefined) {
var StreamCipher = C_lib.StreamCipher = Cipher.extend({ var StreamCipher = C_lib.StreamCipher = Cipher.extend({
_doFinalize: function() { _doFinalize: function() {
// Process partial blocks // Process partial blocks
var finalProcessedBlocks = this._process( !! 'flush'); var finalProcessedBlocks = this._process(!!'flush');
return finalProcessedBlocks; return finalProcessedBlocks;
}, },
@ -3753,10 +3795,10 @@ CryptoJS.lib.Cipher || (function(undefined) {
padding.pad(this._data, this.blockSize); padding.pad(this._data, this.blockSize);
// Process final blocks // Process final blocks
finalProcessedBlocks = this._process( !! 'flush'); finalProcessedBlocks = this._process(!!'flush');
} else /* if (this._xformMode == this._DEC_XFORM_MODE) */ { } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ {
// Process final blocks // Process final blocks
finalProcessedBlocks = this._process( !! 'flush'); finalProcessedBlocks = this._process(!!'flush');
// Unpad data // Unpad data
padding.unpad(finalProcessedBlocks); padding.unpad(finalProcessedBlocks);
@ -4764,7 +4806,8 @@ CryptoJS.pad.NoPadding = {
if (invKsRow < 4 || ksRow <= 4) { if (invKsRow < 4 || ksRow <= 4) {
invKeySchedule[invKsRow] = t; invKeySchedule[invKsRow] = t;
} else { } else {
invKeySchedule[invKsRow] = INV_SUB_MIX_0[SBOX[t >>> 24]] ^ INV_SUB_MIX_1[SBOX[(t >>> 16) & 0xff]] ^ INV_SUB_MIX_2[SBOX[(t >>> 8) & 0xff]] ^ INV_SUB_MIX_3[SBOX[t & 0xff]]; invKeySchedule[invKsRow] = INV_SUB_MIX_0[SBOX[t >>> 24]] ^ INV_SUB_MIX_1[SBOX[(t >>> 16) & 0xff]] ^
INV_SUB_MIX_2[SBOX[(t >>> 8) & 0xff]] ^ INV_SUB_MIX_3[SBOX[t & 0xff]];
} }
} }
}, },
@ -4863,7 +4906,8 @@ CryptoJS.pad.NoPadding = {
60, 52, 44, 36, 63, 55, 47, 39, 60, 52, 44, 36, 63, 55, 47, 39,
31, 23, 15, 7, 62, 54, 46, 38, 31, 23, 15, 7, 62, 54, 46, 38,
30, 22, 14, 6, 61, 53, 45, 37, 30, 22, 14, 6, 61, 53, 45, 37,
29, 21, 13, 5, 28, 20, 12, 4]; 29, 21, 13, 5, 28, 20, 12, 4
];
// Permuted Choice 2 constants // Permuted Choice 2 constants
var PC2 = [ var PC2 = [
@ -4874,7 +4918,8 @@ CryptoJS.pad.NoPadding = {
41, 52, 31, 37, 47, 55, 41, 52, 31, 37, 47, 55,
30, 40, 51, 45, 33, 48, 30, 40, 51, 45, 33, 48,
44, 49, 39, 56, 34, 53, 44, 49, 39, 56, 34, 53,
46, 42, 50, 36, 29, 32]; 46, 42, 50, 36, 29, 32
];
// Cumulative bit shift constants // Cumulative bit shift constants
var BIT_SHIFTS = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28]; var BIT_SHIFTS = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28];
@ -4945,7 +4990,8 @@ CryptoJS.pad.NoPadding = {
0xd8000001: 0x0, 0xd8000001: 0x0,
0xe8000001: 0x8200, 0xe8000001: 0x8200,
0xf8000001: 0x808002 0xf8000001: 0x808002
}, { },
{
0x0: 0x40084010, 0x0: 0x40084010,
0x1000000: 0x4000, 0x1000000: 0x4000,
0x2000000: 0x80000, 0x2000000: 0x80000,
@ -5010,7 +5056,8 @@ CryptoJS.pad.NoPadding = {
0x1d800000: 0x4010, 0x1d800000: 0x4010,
0x1e800000: 0x40080010, 0x1e800000: 0x40080010,
0x1f800000: 0x84000 0x1f800000: 0x84000
}, { },
{
0x0: 0x104, 0x0: 0x104,
0x100000: 0x0, 0x100000: 0x0,
0x200000: 0x4000100, 0x200000: 0x4000100,
@ -5075,7 +5122,8 @@ CryptoJS.pad.NoPadding = {
0x1d80000: 0x4010000, 0x1d80000: 0x4010000,
0x1e80000: 0x4, 0x1e80000: 0x4,
0x1f80000: 0x10100 0x1f80000: 0x10100
}, { },
{
0x0: 0x80401000, 0x0: 0x80401000,
0x10000: 0x80001040, 0x10000: 0x80001040,
0x20000: 0x401040, 0x20000: 0x401040,
@ -5140,7 +5188,8 @@ CryptoJS.pad.NoPadding = {
0x1d8000: 0x80401000, 0x1d8000: 0x80401000,
0x1e8000: 0x400000, 0x1e8000: 0x400000,
0x1f8000: 0x401040 0x1f8000: 0x401040
}, { },
{
0x0: 0x80, 0x0: 0x80,
0x1000: 0x1040000, 0x1000: 0x1040000,
0x2000: 0x40000, 0x2000: 0x40000,
@ -5205,7 +5254,8 @@ CryptoJS.pad.NoPadding = {
0x1d800: 0x40000, 0x1d800: 0x40000,
0x1e800: 0x20040000, 0x1e800: 0x20040000,
0x1f800: 0x20000080 0x1f800: 0x20000080
}, { },
{
0x0: 0x10000008, 0x0: 0x10000008,
0x100: 0x2000, 0x100: 0x2000,
0x200: 0x10200000, 0x200: 0x10200000,
@ -5270,7 +5320,8 @@ CryptoJS.pad.NoPadding = {
0x1d80: 0x0, 0x1d80: 0x0,
0x1e80: 0x10000000, 0x1e80: 0x10000000,
0x1f80: 0x10002008 0x1f80: 0x10002008
}, { },
{
0x0: 0x100000, 0x0: 0x100000,
0x10: 0x2000401, 0x10: 0x2000401,
0x20: 0x400, 0x20: 0x400,
@ -5335,7 +5386,8 @@ CryptoJS.pad.NoPadding = {
0x1d8: 0x400, 0x1d8: 0x400,
0x1e8: 0x2000400, 0x1e8: 0x2000400,
0x1f8: 0x100001 0x1f8: 0x100001
}, { },
{
0x0: 0x8000820, 0x0: 0x8000820,
0x1: 0x20000, 0x1: 0x20000,
0x2: 0x8000000, 0x2: 0x8000000,
@ -5400,12 +5452,14 @@ CryptoJS.pad.NoPadding = {
0x8000001d: 0x820, 0x8000001d: 0x820,
0x8000001e: 0x20020, 0x8000001e: 0x20020,
0x8000001f: 0x8020800 0x8000001f: 0x8020800
}]; }
];
// Masks that select the SBOX input // Masks that select the SBOX input
var SBOX_MASK = [ var SBOX_MASK = [
0xf8000001, 0x1f800000, 0x01f80000, 0x001f8000, 0xf8000001, 0x1f800000, 0x01f80000, 0x001f8000,
0x0001f800, 0x00001f80, 0x000001f8, 0x8000001f]; 0x0001f800, 0x00001f80, 0x000001f8, 0x8000001f
];
/** /**
* DES block cipher algorithm. * DES block cipher algorithm.
@ -5756,7 +5810,8 @@ CryptoJS.pad.NoPadding = {
// Swap endian // Swap endian
for (var i = 0; i < 4; i++) { for (var i = 0; i < 4; i++) {
K[i] = (((K[i] << 8) | (K[i] >>> 24)) & 0x00ff00ff) | (((K[i] << 24) | (K[i] >>> 8)) & 0xff00ff00); K[i] = (((K[i] << 8) | (K[i] >>> 24)) & 0x00ff00ff) |
(((K[i] << 24) | (K[i] >>> 8)) & 0xff00ff00);
} }
// Generate initial state values // Generate initial state values
@ -5764,11 +5819,16 @@ CryptoJS.pad.NoPadding = {
K[0], (K[3] << 16) | (K[2] >>> 16), K[0], (K[3] << 16) | (K[2] >>> 16),
K[1], (K[0] << 16) | (K[3] >>> 16), K[1], (K[0] << 16) | (K[3] >>> 16),
K[2], (K[1] << 16) | (K[0] >>> 16), K[2], (K[1] << 16) | (K[0] >>> 16),
K[3], (K[2] << 16) | (K[1] >>> 16)]; K[3], (K[2] << 16) | (K[1] >>> 16)
];
// Generate initial counter values // Generate initial counter values
var C = this._C = [ var C = this._C = [
(K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff), (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff), (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff), (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff)]; (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff),
(K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff),
(K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff),
(K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff)
];
// Carry bit // Carry bit
this._b = 0; this._b = 0;
@ -5828,7 +5888,8 @@ CryptoJS.pad.NoPadding = {
for (var i = 0; i < 4; i++) { for (var i = 0; i < 4; i++) {
// Swap endian // Swap endian
S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) | (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00); S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) |
(((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00);
// Encrypt // Encrypt
M[offset + i] ^= S[i]; M[offset + i] ^= S[i];
@ -5938,11 +5999,16 @@ CryptoJS.pad.NoPadding = {
K[0], (K[3] << 16) | (K[2] >>> 16), K[0], (K[3] << 16) | (K[2] >>> 16),
K[1], (K[0] << 16) | (K[3] >>> 16), K[1], (K[0] << 16) | (K[3] >>> 16),
K[2], (K[1] << 16) | (K[0] >>> 16), K[2], (K[1] << 16) | (K[0] >>> 16),
K[3], (K[2] << 16) | (K[1] >>> 16)]; K[3], (K[2] << 16) | (K[1] >>> 16)
];
// Generate initial counter values // Generate initial counter values
var C = this._C = [ var C = this._C = [
(K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff), (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff), (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff), (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff)]; (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff),
(K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff),
(K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff),
(K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff)
];
// Carry bit // Carry bit
this._b = 0; this._b = 0;
@ -6002,7 +6068,8 @@ CryptoJS.pad.NoPadding = {
for (var i = 0; i < 4; i++) { for (var i = 0; i < 4; i++) {
// Swap endian // Swap endian
S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) | (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00); S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) |
(((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00);
// Encrypt // Encrypt
M[offset + i] ^= S[i]; M[offset + i] ^= S[i];

View File

@ -80,6 +80,7 @@
/* /*
* Local polyfill of Object.create * Local polyfill of Object.create
*/ */
var create = Object.create || (function() { var create = Object.create || (function() {
function F() {} function F() {}
@ -1108,7 +1109,15 @@
// Convert other array views to uint8 // Convert other array views to uint8
if ( if (
typedArray instanceof Int8Array || (typeof Uint8ClampedArray !== "undefined" && typedArray instanceof Uint8ClampedArray) || typedArray instanceof Int16Array || typedArray instanceof Uint16Array || typedArray instanceof Int32Array || typedArray instanceof Uint32Array || typedArray instanceof Float32Array || typedArray instanceof Float64Array) { typedArray instanceof Int8Array ||
(typeof Uint8ClampedArray !== "undefined" && typedArray instanceof Uint8ClampedArray) ||
typedArray instanceof Int16Array ||
typedArray instanceof Uint16Array ||
typedArray instanceof Int32Array ||
typedArray instanceof Uint32Array ||
typedArray instanceof Float32Array ||
typedArray instanceof Float64Array
) {
typedArray = new Uint8Array(typedArray.buffer, typedArray.byteOffset, typedArray.byteLength); typedArray = new Uint8Array(typedArray.buffer, typedArray.byteOffset, typedArray.byteLength);
} }
@ -1533,7 +1542,8 @@
_doReset: function() { _doReset: function() {
this._hash = new WordArray.init([ this._hash = new WordArray.init([
0x67452301, 0xefcdab89, 0x67452301, 0xefcdab89,
0x98badcfe, 0x10325476]); 0x98badcfe, 0x10325476
]);
}, },
_doProcessBlock: function(M, offset) { _doProcessBlock: function(M, offset) {
@ -1544,7 +1554,9 @@
var M_offset_i = M[offset_i]; var M_offset_i = M[offset_i];
M[offset_i] = ( M[offset_i] = (
(((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) | (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00)); (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) |
(((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00)
);
} }
// Shortcuts // Shortcuts
@ -1663,9 +1675,13 @@
var nBitsTotalH = Math.floor(nBitsTotal / 0x100000000); var nBitsTotalH = Math.floor(nBitsTotal / 0x100000000);
var nBitsTotalL = nBitsTotal; var nBitsTotalL = nBitsTotal;
dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = ( dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 15] = (
(((nBitsTotalH << 8) | (nBitsTotalH >>> 24)) & 0x00ff00ff) | (((nBitsTotalH << 24) | (nBitsTotalH >>> 8)) & 0xff00ff00)); (((nBitsTotalH << 8) | (nBitsTotalH >>> 24)) & 0x00ff00ff) |
(((nBitsTotalH << 24) | (nBitsTotalH >>> 8)) & 0xff00ff00)
);
dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = ( dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = (
(((nBitsTotalL << 8) | (nBitsTotalL >>> 24)) & 0x00ff00ff) | (((nBitsTotalL << 24) | (nBitsTotalL >>> 8)) & 0xff00ff00)); (((nBitsTotalL << 8) | (nBitsTotalL >>> 24)) & 0x00ff00ff) |
(((nBitsTotalL << 24) | (nBitsTotalL >>> 8)) & 0xff00ff00)
);
data.sigBytes = (dataWords.length + 1) * 4; data.sigBytes = (dataWords.length + 1) * 4;
@ -1681,7 +1697,8 @@
// Shortcut // Shortcut
var H_i = H[i]; var H_i = H[i];
H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) | (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00); H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) |
(((H_i << 24) | (H_i >>> 8)) & 0xff00ff00);
} }
// Return final computed hash // Return final computed hash
@ -1769,7 +1786,8 @@
this._hash = new WordArray.init([ this._hash = new WordArray.init([
0x67452301, 0xefcdab89, 0x67452301, 0xefcdab89,
0x98badcfe, 0x10325476, 0x98badcfe, 0x10325476,
0xc3d2e1f0]); 0xc3d2e1f0
]);
}, },
_doProcessBlock: function(M, offset) { _doProcessBlock: function(M, offset) {
@ -1957,10 +1975,14 @@
W[i] = M[offset + i] | 0; W[i] = M[offset + i] | 0;
} else { } else {
var gamma0x = W[i - 15]; var gamma0x = W[i - 15];
var gamma0 = ((gamma0x << 25) | (gamma0x >>> 7)) ^ ((gamma0x << 14) | (gamma0x >>> 18)) ^ (gamma0x >>> 3); var gamma0 = ((gamma0x << 25) | (gamma0x >>> 7)) ^
((gamma0x << 14) | (gamma0x >>> 18)) ^
(gamma0x >>> 3);
var gamma1x = W[i - 2]; var gamma1x = W[i - 2];
var gamma1 = ((gamma1x << 15) | (gamma1x >>> 17)) ^ ((gamma1x << 13) | (gamma1x >>> 19)) ^ (gamma1x >>> 10); var gamma1 = ((gamma1x << 15) | (gamma1x >>> 17)) ^
((gamma1x << 13) | (gamma1x >>> 19)) ^
(gamma1x >>> 10);
W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16]; W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16];
} }
@ -2073,7 +2095,8 @@
_doReset: function() { _doReset: function() {
this._hash = new WordArray.init([ this._hash = new WordArray.init([
0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939, 0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939,
0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4]); 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4
]);
}, },
_doFinalize: function() { _doFinalize: function() {
@ -2174,7 +2197,8 @@
X64Word_create(0x28db77f5, 0x23047d84), X64Word_create(0x32caab7b, 0x40c72493), X64Word_create(0x28db77f5, 0x23047d84), X64Word_create(0x32caab7b, 0x40c72493),
X64Word_create(0x3c9ebe0a, 0x15c9bebc), X64Word_create(0x431d67c4, 0x9c100d4c), X64Word_create(0x3c9ebe0a, 0x15c9bebc), X64Word_create(0x431d67c4, 0x9c100d4c),
X64Word_create(0x4cc5d4be, 0xcb3e42b6), X64Word_create(0x597f299c, 0xfc657e2a), X64Word_create(0x4cc5d4be, 0xcb3e42b6), X64Word_create(0x597f299c, 0xfc657e2a),
X64Word_create(0x5fcb6fab, 0x3ad6faec), X64Word_create(0x6c44198c, 0x4a475817)]; X64Word_create(0x5fcb6fab, 0x3ad6faec), X64Word_create(0x6c44198c, 0x4a475817)
];
// Reusable objects // Reusable objects
var W = []; var W = [];
@ -2193,7 +2217,8 @@
new X64Word.init(0x6a09e667, 0xf3bcc908), new X64Word.init(0xbb67ae85, 0x84caa73b), new X64Word.init(0x6a09e667, 0xf3bcc908), new X64Word.init(0xbb67ae85, 0x84caa73b),
new X64Word.init(0x3c6ef372, 0xfe94f82b), new X64Word.init(0xa54ff53a, 0x5f1d36f1), new X64Word.init(0x3c6ef372, 0xfe94f82b), new X64Word.init(0xa54ff53a, 0x5f1d36f1),
new X64Word.init(0x510e527f, 0xade682d1), new X64Word.init(0x9b05688c, 0x2b3e6c1f), new X64Word.init(0x510e527f, 0xade682d1), new X64Word.init(0x9b05688c, 0x2b3e6c1f),
new X64Word.init(0x1f83d9ab, 0xfb41bd6b), new X64Word.init(0x5be0cd19, 0x137e2179)]); new X64Word.init(0x1f83d9ab, 0xfb41bd6b), new X64Word.init(0x5be0cd19, 0x137e2179)
]);
}, },
_doProcessBlock: function(M, offset) { _doProcessBlock: function(M, offset) {
@ -2443,7 +2468,8 @@
new X64Word.init(0xcbbb9d5d, 0xc1059ed8), new X64Word.init(0x629a292a, 0x367cd507), new X64Word.init(0xcbbb9d5d, 0xc1059ed8), new X64Word.init(0x629a292a, 0x367cd507),
new X64Word.init(0x9159015a, 0x3070dd17), new X64Word.init(0x152fecd8, 0xf70e5939), new X64Word.init(0x9159015a, 0x3070dd17), new X64Word.init(0x152fecd8, 0xf70e5939),
new X64Word.init(0x67332667, 0xffc00b31), new X64Word.init(0x8eb44a87, 0x68581511), new X64Word.init(0x67332667, 0xffc00b31), new X64Word.init(0x8eb44a87, 0x68581511),
new X64Word.init(0xdb0c2e0d, 0x64f98fa7), new X64Word.init(0x47b5481d, 0xbefa4fa4)]); new X64Word.init(0xdb0c2e0d, 0x64f98fa7), new X64Word.init(0x47b5481d, 0xbefa4fa4)
]);
}, },
_doFinalize: function() { _doFinalize: function() {
@ -2600,9 +2626,13 @@
// Swap endian // Swap endian
M2i = ( M2i = (
(((M2i << 8) | (M2i >>> 24)) & 0x00ff00ff) | (((M2i << 24) | (M2i >>> 8)) & 0xff00ff00)); (((M2i << 8) | (M2i >>> 24)) & 0x00ff00ff) |
(((M2i << 24) | (M2i >>> 8)) & 0xff00ff00)
);
M2i1 = ( M2i1 = (
(((M2i1 << 8) | (M2i1 >>> 24)) & 0x00ff00ff) | (((M2i1 << 24) | (M2i1 >>> 8)) & 0xff00ff00)); (((M2i1 << 8) | (M2i1 >>> 24)) & 0x00ff00ff) |
(((M2i1 << 24) | (M2i1 >>> 8)) & 0xff00ff00)
);
// Absorb message into state // Absorb message into state
var lane = state[i]; var lane = state[i];
@ -2732,9 +2762,13 @@
// Swap endian // Swap endian
laneMsw = ( laneMsw = (
(((laneMsw << 8) | (laneMsw >>> 24)) & 0x00ff00ff) | (((laneMsw << 24) | (laneMsw >>> 8)) & 0xff00ff00)); (((laneMsw << 8) | (laneMsw >>> 24)) & 0x00ff00ff) |
(((laneMsw << 24) | (laneMsw >>> 8)) & 0xff00ff00)
);
laneLsw = ( laneLsw = (
(((laneLsw << 8) | (laneLsw >>> 24)) & 0x00ff00ff) | (((laneLsw << 24) | (laneLsw >>> 8)) & 0xff00ff00)); (((laneLsw << 8) | (laneLsw >>> 24)) & 0x00ff00ff) |
(((laneLsw << 24) | (laneLsw >>> 8)) & 0xff00ff00)
);
// Squeeze state to retrieve hash // Squeeze state to retrieve hash
hashWords.push(laneLsw); hashWords.push(laneLsw);
@ -2816,25 +2850,29 @@
7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, 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, 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, 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]); 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13
]);
var _zr = WordArray.create([ var _zr = WordArray.create([
5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, 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, 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, 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, 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]); 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11
]);
var _sl = WordArray.create([ var _sl = WordArray.create([
11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, 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, 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, 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, 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]); 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6
]);
var _sr = WordArray.create([ var _sr = WordArray.create([
8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, 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, 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, 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, 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]); 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11
]);
var _hl = WordArray.create([0x00000000, 0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xA953FD4E]); var _hl = WordArray.create([0x00000000, 0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xA953FD4E]);
var _hr = WordArray.create([0x50A28BE6, 0x5C4DD124, 0x6D703EF3, 0x7A6D76E9, 0x00000000]); var _hr = WordArray.create([0x50A28BE6, 0x5C4DD124, 0x6D703EF3, 0x7A6D76E9, 0x00000000]);
@ -2857,7 +2895,9 @@
// Swap // Swap
M[offset_i] = ( M[offset_i] = (
(((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) | (((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00)); (((M_offset_i << 8) | (M_offset_i >>> 24)) & 0x00ff00ff) |
(((M_offset_i << 24) | (M_offset_i >>> 8)) & 0xff00ff00)
);
} }
// Shortcut // Shortcut
var H = this._hash.words; var H = this._hash.words;
@ -2942,7 +2982,9 @@
// Add padding // Add padding
dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32); dataWords[nBitsLeft >>> 5] |= 0x80 << (24 - nBitsLeft % 32);
dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = ( dataWords[(((nBitsLeft + 64) >>> 9) << 4) + 14] = (
(((nBitsTotal << 8) | (nBitsTotal >>> 24)) & 0x00ff00ff) | (((nBitsTotal << 24) | (nBitsTotal >>> 8)) & 0xff00ff00)); (((nBitsTotal << 8) | (nBitsTotal >>> 24)) & 0x00ff00ff) |
(((nBitsTotal << 24) | (nBitsTotal >>> 8)) & 0xff00ff00)
);
data.sigBytes = (dataWords.length + 1) * 4; data.sigBytes = (dataWords.length + 1) * 4;
// Hash final blocks // Hash final blocks
@ -2958,7 +3000,8 @@
var H_i = H[i]; var H_i = H[i];
// Swap // Swap
H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) | (((H_i << 24) | (H_i >>> 8)) & 0xff00ff00); H[i] = (((H_i << 8) | (H_i >>> 24)) & 0x00ff00ff) |
(((H_i << 24) | (H_i >>> 8)) & 0xff00ff00);
} }
// Return final computed hash // Return final computed hash
@ -2984,15 +3027,15 @@
} }
function f3(x, y, z) { function f3(x, y, z) {
return (((x) | (~ (y))) ^ (z)); return (((x) | (~(y))) ^ (z));
} }
function f4(x, y, z) { function f4(x, y, z) {
return (((x) & (z)) | ((y) & (~ (z)))); return (((x) & (z)) | ((y) & (~(z))));
} }
function f5(x, y, z) { function f5(x, y, z) {
return ((x) ^ ((y) | (~ (z)))); return ((x) ^ ((y) | (~(z))));
} }
@ -3609,7 +3652,7 @@
var StreamCipher = C_lib.StreamCipher = Cipher.extend({ var StreamCipher = C_lib.StreamCipher = Cipher.extend({
_doFinalize: function() { _doFinalize: function() {
// Process partial blocks // Process partial blocks
var finalProcessedBlocks = this._process( !! 'flush'); var finalProcessedBlocks = this._process(!!'flush');
return finalProcessedBlocks; return finalProcessedBlocks;
}, },
@ -3890,10 +3933,10 @@
padding.pad(this._data, this.blockSize); padding.pad(this._data, this.blockSize);
// Process final blocks // Process final blocks
finalProcessedBlocks = this._process( !! 'flush'); finalProcessedBlocks = this._process(!!'flush');
} else /* if (this._xformMode == this._DEC_XFORM_MODE) */ { } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ {
// Process final blocks // Process final blocks
finalProcessedBlocks = this._process( !! 'flush'); finalProcessedBlocks = this._process(!!'flush');
// Unpad data // Unpad data
padding.unpad(finalProcessedBlocks); padding.unpad(finalProcessedBlocks);
@ -4837,7 +4880,8 @@
if (invKsRow < 4 || ksRow <= 4) { if (invKsRow < 4 || ksRow <= 4) {
invKeySchedule[invKsRow] = t; invKeySchedule[invKsRow] = t;
} else { } else {
invKeySchedule[invKsRow] = INV_SUB_MIX_0[SBOX[t >>> 24]] ^ INV_SUB_MIX_1[SBOX[(t >>> 16) & 0xff]] ^ INV_SUB_MIX_2[SBOX[(t >>> 8) & 0xff]] ^ INV_SUB_MIX_3[SBOX[t & 0xff]]; invKeySchedule[invKsRow] = INV_SUB_MIX_0[SBOX[t >>> 24]] ^ INV_SUB_MIX_1[SBOX[(t >>> 16) & 0xff]] ^
INV_SUB_MIX_2[SBOX[(t >>> 8) & 0xff]] ^ INV_SUB_MIX_3[SBOX[t & 0xff]];
} }
} }
}, },
@ -4932,7 +4976,8 @@
60, 52, 44, 36, 63, 55, 47, 39, 60, 52, 44, 36, 63, 55, 47, 39,
31, 23, 15, 7, 62, 54, 46, 38, 31, 23, 15, 7, 62, 54, 46, 38,
30, 22, 14, 6, 61, 53, 45, 37, 30, 22, 14, 6, 61, 53, 45, 37,
29, 21, 13, 5, 28, 20, 12, 4]; 29, 21, 13, 5, 28, 20, 12, 4
];
// Permuted Choice 2 constants // Permuted Choice 2 constants
var PC2 = [ var PC2 = [
@ -4943,7 +4988,8 @@
41, 52, 31, 37, 47, 55, 41, 52, 31, 37, 47, 55,
30, 40, 51, 45, 33, 48, 30, 40, 51, 45, 33, 48,
44, 49, 39, 56, 34, 53, 44, 49, 39, 56, 34, 53,
46, 42, 50, 36, 29, 32]; 46, 42, 50, 36, 29, 32
];
// Cumulative bit shift constants // Cumulative bit shift constants
var BIT_SHIFTS = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28]; var BIT_SHIFTS = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28];
@ -5014,7 +5060,8 @@
0xd8000001: 0x0, 0xd8000001: 0x0,
0xe8000001: 0x8200, 0xe8000001: 0x8200,
0xf8000001: 0x808002 0xf8000001: 0x808002
}, { },
{
0x0: 0x40084010, 0x0: 0x40084010,
0x1000000: 0x4000, 0x1000000: 0x4000,
0x2000000: 0x80000, 0x2000000: 0x80000,
@ -5079,7 +5126,8 @@
0x1d800000: 0x4010, 0x1d800000: 0x4010,
0x1e800000: 0x40080010, 0x1e800000: 0x40080010,
0x1f800000: 0x84000 0x1f800000: 0x84000
}, { },
{
0x0: 0x104, 0x0: 0x104,
0x100000: 0x0, 0x100000: 0x0,
0x200000: 0x4000100, 0x200000: 0x4000100,
@ -5144,7 +5192,8 @@
0x1d80000: 0x4010000, 0x1d80000: 0x4010000,
0x1e80000: 0x4, 0x1e80000: 0x4,
0x1f80000: 0x10100 0x1f80000: 0x10100
}, { },
{
0x0: 0x80401000, 0x0: 0x80401000,
0x10000: 0x80001040, 0x10000: 0x80001040,
0x20000: 0x401040, 0x20000: 0x401040,
@ -5209,7 +5258,8 @@
0x1d8000: 0x80401000, 0x1d8000: 0x80401000,
0x1e8000: 0x400000, 0x1e8000: 0x400000,
0x1f8000: 0x401040 0x1f8000: 0x401040
}, { },
{
0x0: 0x80, 0x0: 0x80,
0x1000: 0x1040000, 0x1000: 0x1040000,
0x2000: 0x40000, 0x2000: 0x40000,
@ -5274,7 +5324,8 @@
0x1d800: 0x40000, 0x1d800: 0x40000,
0x1e800: 0x20040000, 0x1e800: 0x20040000,
0x1f800: 0x20000080 0x1f800: 0x20000080
}, { },
{
0x0: 0x10000008, 0x0: 0x10000008,
0x100: 0x2000, 0x100: 0x2000,
0x200: 0x10200000, 0x200: 0x10200000,
@ -5339,7 +5390,8 @@
0x1d80: 0x0, 0x1d80: 0x0,
0x1e80: 0x10000000, 0x1e80: 0x10000000,
0x1f80: 0x10002008 0x1f80: 0x10002008
}, { },
{
0x0: 0x100000, 0x0: 0x100000,
0x10: 0x2000401, 0x10: 0x2000401,
0x20: 0x400, 0x20: 0x400,
@ -5404,7 +5456,8 @@
0x1d8: 0x400, 0x1d8: 0x400,
0x1e8: 0x2000400, 0x1e8: 0x2000400,
0x1f8: 0x100001 0x1f8: 0x100001
}, { },
{
0x0: 0x8000820, 0x0: 0x8000820,
0x1: 0x20000, 0x1: 0x20000,
0x2: 0x8000000, 0x2: 0x8000000,
@ -5469,12 +5522,14 @@
0x8000001d: 0x820, 0x8000001d: 0x820,
0x8000001e: 0x20020, 0x8000001e: 0x20020,
0x8000001f: 0x8020800 0x8000001f: 0x8020800
}]; }
];
// Masks that select the SBOX input // Masks that select the SBOX input
var SBOX_MASK = [ var SBOX_MASK = [
0xf8000001, 0x1f800000, 0x01f80000, 0x001f8000, 0xf8000001, 0x1f800000, 0x01f80000, 0x001f8000,
0x0001f800, 0x00001f80, 0x000001f8, 0x8000001f]; 0x0001f800, 0x00001f80, 0x000001f8, 0x8000001f
];
/** /**
* DES block cipher algorithm. * DES block cipher algorithm.
@ -5809,7 +5864,8 @@
// Swap endian // Swap endian
for (var i = 0; i < 4; i++) { for (var i = 0; i < 4; i++) {
K[i] = (((K[i] << 8) | (K[i] >>> 24)) & 0x00ff00ff) | (((K[i] << 24) | (K[i] >>> 8)) & 0xff00ff00); K[i] = (((K[i] << 8) | (K[i] >>> 24)) & 0x00ff00ff) |
(((K[i] << 24) | (K[i] >>> 8)) & 0xff00ff00);
} }
// Generate initial state values // Generate initial state values
@ -5817,11 +5873,16 @@
K[0], (K[3] << 16) | (K[2] >>> 16), K[0], (K[3] << 16) | (K[2] >>> 16),
K[1], (K[0] << 16) | (K[3] >>> 16), K[1], (K[0] << 16) | (K[3] >>> 16),
K[2], (K[1] << 16) | (K[0] >>> 16), K[2], (K[1] << 16) | (K[0] >>> 16),
K[3], (K[2] << 16) | (K[1] >>> 16)]; K[3], (K[2] << 16) | (K[1] >>> 16)
];
// Generate initial counter values // Generate initial counter values
var C = this._C = [ var C = this._C = [
(K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff), (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff), (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff), (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff)]; (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff),
(K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff),
(K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff),
(K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff)
];
// Carry bit // Carry bit
this._b = 0; this._b = 0;
@ -5881,7 +5942,8 @@
for (var i = 0; i < 4; i++) { for (var i = 0; i < 4; i++) {
// Swap endian // Swap endian
S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) | (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00); S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) |
(((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00);
// Encrypt // Encrypt
M[offset + i] ^= S[i]; M[offset + i] ^= S[i];
@ -5983,11 +6045,16 @@
K[0], (K[3] << 16) | (K[2] >>> 16), K[0], (K[3] << 16) | (K[2] >>> 16),
K[1], (K[0] << 16) | (K[3] >>> 16), K[1], (K[0] << 16) | (K[3] >>> 16),
K[2], (K[1] << 16) | (K[0] >>> 16), K[2], (K[1] << 16) | (K[0] >>> 16),
K[3], (K[2] << 16) | (K[1] >>> 16)]; K[3], (K[2] << 16) | (K[1] >>> 16)
];
// Generate initial counter values // Generate initial counter values
var C = this._C = [ var C = this._C = [
(K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff), (K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff), (K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff), (K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff)]; (K[2] << 16) | (K[2] >>> 16), (K[0] & 0xffff0000) | (K[1] & 0x0000ffff),
(K[3] << 16) | (K[3] >>> 16), (K[1] & 0xffff0000) | (K[2] & 0x0000ffff),
(K[0] << 16) | (K[0] >>> 16), (K[2] & 0xffff0000) | (K[3] & 0x0000ffff),
(K[1] << 16) | (K[1] >>> 16), (K[3] & 0xffff0000) | (K[0] & 0x0000ffff)
];
// Carry bit // Carry bit
this._b = 0; this._b = 0;
@ -6047,7 +6114,8 @@
for (var i = 0; i < 4; i++) { for (var i = 0; i < 4; i++) {
// Swap endian // Swap endian
S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) | (((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00); S[i] = (((S[i] << 8) | (S[i] >>> 24)) & 0x00ff00ff) |
(((S[i] << 24) | (S[i] >>> 8)) & 0xff00ff00);
// Encrypt // Encrypt
M[offset + i] ^= S[i]; M[offset + i] ^= S[i];

View File

@ -5,7 +5,9 @@ import './node-rsa.js';
import './pako.min.js'; import './pako.min.js';
// import JSEncrypt from './jsencrypt.js'; // 会导致壳子崩溃的 // import JSEncrypt from './jsencrypt.js'; // 会导致壳子崩溃的
import 模板 from './模板.js' import 模板 from './模板.js'
import { gbkTool } from './gbk.js' import {
gbkTool
} from './gbk.js'
import './json5.js' import './json5.js'
// 下面是尝试对jinja2库进行更换 // 下面是尝试对jinja2库进行更换
import './jinja.js' import './jinja.js'
@ -450,7 +452,8 @@ function window_b64() {
*/ */
if (typeof atob !== 'function' || typeof btoa !== 'function') { if (typeof atob !== 'function' || typeof btoa !== 'function') {
var { var {
atob, btoa atob,
btoa
} = window_b64(); } = window_b64();
} }
@ -829,7 +832,8 @@ function Utf8ArrayToStr(array) {
char2 = array[i++]; char2 = array[i++];
char3 = array[i++]; char3 = array[i++];
out += String.fromCharCode( out += String.fromCharCode(
((c & 0x0f) << 12) | ((char2 & 0x3f) << 6) | ((char3 & 0x3f) << 0)); ((c & 0x0f) << 12) | ((char2 & 0x3f) << 6) | ((char3 & 0x3f) << 0)
);
break; break;
} }
} }
@ -3110,21 +3114,24 @@ function getOriginalJs(js_code) {
logger('非gzip加密'); logger('非gzip加密');
return '' return ''
} }
}, (text) => { },
(text) => {
try { try {
return base64Decode(text) return base64Decode(text)
} catch (e) { } catch (e) {
logger('非b64加密'); logger('非b64加密');
return '' return ''
} }
}, (text) => { },
(text) => {
try { try {
return aes_decrypt(text) return aes_decrypt(text)
} catch (e) { } catch (e) {
logger('非aes加密'); logger('非aes加密');
return '' return ''
} }
}, (text) => { },
(text) => {
try { try {
return RSA.decode(text, rsa_private_key, null) return RSA.decode(text, rsa_private_key, null)
} catch (e) { } catch (e) {
@ -3313,7 +3320,7 @@ function init(ext) {
rule.sniffer = false; rule.sniffer = false;
} }
rule.sniffer = rule.hasOwnProperty('sniffer') ? rule.sniffer : ''; rule.sniffer = rule.hasOwnProperty('sniffer') ? rule.sniffer : '';
rule.sniffer = !! (rule.sniffer && rule.sniffer !== '0' && rule.sniffer !== 'false'); rule.sniffer = !!(rule.sniffer && rule.sniffer !== '0' && rule.sniffer !== 'false');
rule.isVideo = rule.hasOwnProperty('isVideo') ? rule.isVideo : ''; rule.isVideo = rule.hasOwnProperty('isVideo') ? rule.isVideo : '';
if (rule.sniffer && !rule.isVideo) { // 默认辅助嗅探自动增强嗅探规则 if (rule.sniffer && !rule.isVideo) { // 默认辅助嗅探自动增强嗅探规则

97
JS/drpy2.min.js vendored
View File

@ -4,7 +4,9 @@ import "./jsencrypt.js";
import "./node-rsa.js"; import "./node-rsa.js";
import "./pako.min.js"; import "./pako.min.js";
import 模板 from "./模板.js"; import 模板 from "./模板.js";
import { gbkTool } from "./gbk.js"; import {
gbkTool
} from "./gbk.js";
import "./json5.js"; import "./json5.js";
import "./jinja.js"; import "./jinja.js";
const _jinja2 = cheerio.jinja2; const _jinja2 = cheerio.jinja2;
@ -25,12 +27,14 @@ function init_test() {
console.log(JSON.stringify(rule)); console.log(JSON.stringify(rule));
console.log("init_test_end") console.log("init_test_end")
} }
function ocr_demo_test() { function ocr_demo_test() {
let img_base64 = `iVBORw0KGgoAAAANSUhEUgAAAIAAAAAoBAMAAADEX+97AAAAG1BMVEXz+/4thQTa7N6QwIFFkyNeokKozqDB3b93sWHFR+MEAAAACXBIWXMAAA7EAAAOxAGVKw4bAAABN0lEQVRIie2TQU+DQBCFt9vScvQpxR4xrcSjJCZ67JDGXsX+AdR4B3vpsSYm/m2HXaRLmuySepR3Gdidb/btDAjRq5dT96eCMlfBuzi1QLZUoZy2yz5sOvI+9iomaPEZ6nWnEtxqIyiM1RcAy44GNDhBXUjot/VVNweV1ah68FqWRyjKIOqAcyYF6rGcmpYnHzGt3fycNoMw0d3/THFu7hFSJ/8OXO6iTM8/KSg09obAzIHLO250LgQ0txOZSfgrV4Exdw98uGycJ0ErAeExZGhOmFHV9zHO6qVSj0MpLq7xZON56o++MjlsEgfVhbQWWME+xQX7J4V6zfi9A1Ly9rP1BvEXp+BbVJ/M77n+wfOIDVp51pZ4iBxvmj9AGrtvry6emwfKnVkW+ZRKd5ZNMvob36vXP9YPDmQki8QiCFAAAAAASUVORK5CYII=`; let img_base64 = `iVBORw0KGgoAAAANSUhEUgAAAIAAAAAoBAMAAADEX+97AAAAG1BMVEXz+/4thQTa7N6QwIFFkyNeokKozqDB3b93sWHFR+MEAAAACXBIWXMAAA7EAAAOxAGVKw4bAAABN0lEQVRIie2TQU+DQBCFt9vScvQpxR4xrcSjJCZ67JDGXsX+AdR4B3vpsSYm/m2HXaRLmuySepR3Gdidb/btDAjRq5dT96eCMlfBuzi1QLZUoZy2yz5sOvI+9iomaPEZ6nWnEtxqIyiM1RcAy44GNDhBXUjot/VVNweV1ah68FqWRyjKIOqAcyYF6rGcmpYnHzGt3fycNoMw0d3/THFu7hFSJ/8OXO6iTM8/KSg09obAzIHLO250LgQ0txOZSfgrV4Exdw98uGycJ0ErAeExZGhOmFHV9zHO6qVSj0MpLq7xZON56o++MjlsEgfVhbQWWME+xQX7J4V6zfi9A1Ly9rP1BvEXp+BbVJ/M77n+wfOIDVp51pZ4iBxvmj9AGrtvry6emwfKnVkW+ZRKd5ZNMvob36vXP9YPDmQki8QiCFAAAAAASUVORK5CYII=`;
OcrApi.api = OCR_API; OcrApi.api = OCR_API;
let code = OcrApi.classification(img_base64); let code = OcrApi.classification(img_base64);
log("测试验证码图片的ocr识别结果为:" + code) log("测试验证码图片的ocr识别结果为:" + code)
} }
function rsa_demo_test() { function rsa_demo_test() {
let t1 = (new Date).getTime(); let t1 = (new Date).getTime();
let pkcs1_public = ` let pkcs1_public = `
@ -184,6 +188,7 @@ m7mp8il0kaftHdSxTbspG3tZ2fjIiFIZkLEOmRpd7ogWumgOajzUdA==
let t2 = (new Date).getTime(); let t2 = (new Date).getTime();
console.log("rsa_demo_test 测试耗时:" + (t2 - t1) + "毫秒") console.log("rsa_demo_test 测试耗时:" + (t2 - t1) + "毫秒")
} }
function pre() { function pre() {
if (typeof rule.预处理 === "string" && rule.预处理 && rule.预处理.trim()) { if (typeof rule.预处理 === "string" && rule.预处理 && rule.预处理.trim()) {
let code = rule.预处理.trim(); let code = rule.预处理.trim();
@ -272,6 +277,7 @@ function window_b64() {
} }
return out return out
} }
function atob(str) { function atob(str) {
var c1, c2, c3, c4; var c1, c2, c3, c4;
var i, len, out; var i, len, out;
@ -312,7 +318,8 @@ function window_b64() {
} }
if (typeof atob !== "function" || typeof btoa !== "function") { if (typeof atob !== "function" || typeof btoa !== "function") {
var { var {
atob, btoa atob,
btoa
} = window_b64() } = window_b64()
} }
if (typeof Object.assign !== "function") { if (typeof Object.assign !== "function") {
@ -463,6 +470,7 @@ function 是否正版(vipUrl) {
let flag = new RegExp("qq.com|iqiyi.com|youku.com|mgtv.com|bilibili.com|sohu.com|ixigua.com|pptv.com|miguvideo.com|le.com|1905.com|fun.tv"); let flag = new RegExp("qq.com|iqiyi.com|youku.com|mgtv.com|bilibili.com|sohu.com|ixigua.com|pptv.com|miguvideo.com|le.com|1905.com|fun.tv");
return flag.test(vipUrl) return flag.test(vipUrl)
} }
function urlDeal(vipUrl) { function urlDeal(vipUrl) {
if (!vipUrl) { if (!vipUrl) {
return "" return ""
@ -475,6 +483,7 @@ function urlDeal(vipUrl) {
} }
return vipUrl return vipUrl
} }
function setResult(d) { function setResult(d) {
if (!Array.isArray(d)) { if (!Array.isArray(d)) {
return [] return []
@ -511,16 +520,19 @@ function setResult(d) {
}); });
return VODS return VODS
} }
function setResult2(res) { function setResult2(res) {
VODS = res.list || []; VODS = res.list || [];
return VODS return VODS
} }
function setHomeResult(res) { function setHomeResult(res) {
if (!res || typeof res !== "object") { if (!res || typeof res !== "object") {
return [] return []
} }
return setResult(res.list) return setResult(res.list)
} }
function rc(js) { function rc(js) {
if (js === "maomi_aes.js") { if (js === "maomi_aes.js") {
var a = CryptoJS.enc.Utf8.parse("625222f9149e961d"); var a = CryptoJS.enc.Utf8.parse("625222f9149e961d");
@ -546,6 +558,7 @@ function rc(js) {
} }
return {} return {}
} }
function maoss(jxurl, ref, key) { function maoss(jxurl, ref, key) {
fetch_params = JSON.parse(JSON.stringify(rule_fetch_params)); fetch_params = JSON.parse(JSON.stringify(rule_fetch_params));
eval(getCryptoJS()); eval(getCryptoJS());
@ -588,10 +601,12 @@ function maoss(jxurl, ref, key) {
return "" return ""
} }
} }
function urlencode(str) { function urlencode(str) {
str = (str + "").toString(); str = (str + "").toString();
return encodeURIComponent(str).replace(/!/g, "%21").replace(/'/g, "%27").replace(/\(/g, "%28").replace(/\)/g, "%29").replace(/\*/g, "%2A").replace(/%20/g, "+") return encodeURIComponent(str).replace(/!/g, "%21").replace(/'/g, "%27").replace(/\(/g, "%28").replace(/\)/g, "%29").replace(/\*/g, "%2A").replace(/%20/g, "+")
} }
function encodeUrl(str) { function encodeUrl(str) {
if (typeof encodeURI == "function") { if (typeof encodeURI == "function") {
return encodeURI(str) return encodeURI(str)
@ -600,19 +615,24 @@ function encodeUrl(str) {
return encodeURIComponent(str).replace(/%2F/g, "/").replace(/%3F/g, "?").replace(/%3A/g, ":").replace(/%40/g, "@").replace(/%3D/g, "=").replace(/%3A/g, ":").replace(/%2C/g, ",").replace(/%2B/g, "+").replace(/%24/g, "$") return encodeURIComponent(str).replace(/%2F/g, "/").replace(/%3F/g, "?").replace(/%3A/g, ":").replace(/%40/g, "@").replace(/%3D/g, "=").replace(/%3A/g, ":").replace(/%2C/g, ",").replace(/%2B/g, "+").replace(/%24/g, "$")
} }
} }
function base64Encode(text) { function base64Encode(text) {
return CryptoJS.enc.Base64.stringify(CryptoJS.enc.Utf8.parse(text)) return CryptoJS.enc.Base64.stringify(CryptoJS.enc.Utf8.parse(text))
} }
function base64Decode(text) { function base64Decode(text) {
return CryptoJS.enc.Utf8.stringify(CryptoJS.enc.Base64.parse(text)) return CryptoJS.enc.Utf8.stringify(CryptoJS.enc.Base64.parse(text))
} }
function md5(text) { function md5(text) {
return CryptoJS.MD5(text).toString() return CryptoJS.MD5(text).toString()
} }
function uint8ArrayToBase64(uint8Array) { function uint8ArrayToBase64(uint8Array) {
let binaryString = String.fromCharCode.apply(null, Array.from(uint8Array)); let binaryString = String.fromCharCode.apply(null, Array.from(uint8Array));
return btoa(binaryString) return btoa(binaryString)
} }
function Utf8ArrayToStr(array) { function Utf8ArrayToStr(array) {
var out, i, len, c; var out, i, len, c;
var char2, char3; var char2, char3;
@ -646,10 +666,12 @@ function Utf8ArrayToStr(array) {
} }
return out return out
} }
function gzip(str) { function gzip(str) {
let arr = pako.gzip(str, {}); let arr = pako.gzip(str, {});
return uint8ArrayToBase64(arr) return uint8ArrayToBase64(arr)
} }
function ungzip(b64Data) { function ungzip(b64Data) {
let strData = atob(b64Data); let strData = atob(b64Data);
const charData = strData.split("").map(function(x) { const charData = strData.split("").map(function(x) {
@ -659,6 +681,7 @@ function ungzip(b64Data) {
const data = pako.inflate(binData); const data = pako.inflate(binData);
return Utf8ArrayToStr(data) return Utf8ArrayToStr(data)
} }
function encodeStr(input, encoding) { function encodeStr(input, encoding) {
encoding = encoding || "gbk"; encoding = encoding || "gbk";
if (encoding.startsWith("gb")) { if (encoding.startsWith("gb")) {
@ -667,6 +690,7 @@ function encodeStr(input, encoding) {
} }
return input return input
} }
function decodeStr(input, encoding) { function decodeStr(input, encoding) {
encoding = encoding || "gbk"; encoding = encoding || "gbk";
if (encoding.startsWith("gb")) { if (encoding.startsWith("gb")) {
@ -675,6 +699,7 @@ function decodeStr(input, encoding) {
} }
return input return input
} }
function getCryptoJS() { function getCryptoJS() {
return 'console.log("CryptoJS已装载");' return 'console.log("CryptoJS已装载");'
} }
@ -735,6 +760,7 @@ function getProxyUrl() {
return "http://127.0.0.1:9978/proxy?do=js" return "http://127.0.0.1:9978/proxy?do=js"
} }
} }
function fixAdM3u8(m3u8_text, m3u8_url, ad_remove) { function fixAdM3u8(m3u8_text, m3u8_url, ad_remove) {
if (!m3u8_text && !m3u8_url || !m3u8_text && m3u8_url && !m3u8_url.startsWith("http")) { if (!m3u8_text && !m3u8_url || !m3u8_text && m3u8_url && !m3u8_url.startsWith("http")) {
return "" return ""
@ -789,6 +815,7 @@ function fixAdM3u8(m3u8_text, m3u8_url, ad_remove) {
m3u8_text = [m3u8_start, new_m3u8_body, m3u8_end].join("\n").trim(); m3u8_text = [m3u8_start, new_m3u8_body, m3u8_end].join("\n").trim();
return m3u8_text return m3u8_text
} }
function fixAdM3u8Ai(m3u8_url, headers) { function fixAdM3u8Ai(m3u8_url, headers) {
let ts = (new Date).getTime(); let ts = (new Date).getTime();
let option = headers ? { let option = headers ? {
@ -805,6 +832,7 @@ function fixAdM3u8Ai(m3u8_url, headers) {
} }
return i return i
} }
function reverseString(str) { function reverseString(str) {
return str.split("").reverse().join("") return str.split("").reverse().join("")
} }
@ -883,6 +911,7 @@ function fixAdM3u8Ai(m3u8_url, headers) {
log("处理耗时:" + ((new Date).getTime() - ts).toString()); log("处理耗时:" + ((new Date).getTime() - ts).toString());
return m3u8 return m3u8
} }
function forceOrder(lists, key, option) { function forceOrder(lists, key, option) {
let start = Math.floor(lists.length / 2); let start = Math.floor(lists.length / 2);
let end = Math.min(lists.length - 1, start + 1); let end = Math.min(lists.length - 1, start + 1);
@ -938,6 +967,7 @@ function getQuery(url) {
return {} return {}
} }
} }
function urljoin(fromPath, nowPath) { function urljoin(fromPath, nowPath) {
fromPath = fromPath || ""; fromPath = fromPath || "";
nowPath = nowPath || ""; nowPath = nowPath || "";
@ -969,6 +999,7 @@ function pdfh2(html, parse) {
} }
return result return result
} }
function pdfa2(html, parse) { function pdfa2(html, parse) {
let html2 = html; let html2 = html;
try { try {
@ -980,6 +1011,7 @@ function pdfa2(html, parse) {
} }
return defaultParser.pdfa(html2, parse) return defaultParser.pdfa(html2, parse)
} }
function pd2(html, parse, uri) { function pd2(html, parse, uri) {
let ret = pdfh2(html, parse); let ret = pdfh2(html, parse);
if (typeof uri === "undefined" || !uri) { if (typeof uri === "undefined" || !uri) {
@ -1028,7 +1060,8 @@ const parseTags = {
} }
} }
return "" return ""
}, pdfa(html, parse) { },
pdfa(html, parse) {
if (!parse || !parse.trim()) { if (!parse || !parse.trim()) {
return "" return ""
} }
@ -1044,7 +1077,8 @@ const parseTags = {
return ret[0] || [] return ret[0] || []
} }
return ret || [] return ret || []
}, pd(html, parse) { },
pd(html, parse) {
let ret = parseTags.json.pdfh(html, parse); let ret = parseTags.json.pdfh(html, parse);
if (ret) { if (ret) {
return urljoin(MY_URL, ret) return urljoin(MY_URL, ret)
@ -1060,7 +1094,8 @@ const parseTags = {
parse = parse.trim(); parse = parse.trim();
let result = defaultParser.pdfh(html, parse); let result = defaultParser.pdfh(html, parse);
return result return result
}, pdfa(html, parse) { },
pdfa(html, parse) {
if (!html || !parse || !parse.trim()) { if (!html || !parse || !parse.trim()) {
return [] return []
} }
@ -1068,7 +1103,8 @@ const parseTags = {
let result = defaultParser.pdfa(html, parse); let result = defaultParser.pdfa(html, parse);
print(`pdfa解析${parse}=>${result.length}`); print(`pdfa解析${parse}=>${result.length}`);
return result return result
}, pd(html, parse, base_url) { },
pd(html, parse, base_url) {
if (!html || !parse || !parse.trim()) { if (!html || !parse || !parse.trim()) {
return "" return ""
} }
@ -1103,6 +1139,7 @@ function readFile(filePath) {
console.log(text); console.log(text);
return text return text
} }
function dealJson(html) { function dealJson(html) {
try { try {
html = html.trim(); html = html.trim();
@ -1191,16 +1228,20 @@ function verifyCode(url) {
} }
return cookie return cookie
} }
function setItem(k, v) { function setItem(k, v) {
local.set(RKEY, k, v); local.set(RKEY, k, v);
console.log(`规则${RKEY}设置${k} => ${v}`) console.log(`规则${RKEY}设置${k} => ${v}`)
} }
function getItem(k, v) { function getItem(k, v) {
return local.get(RKEY, k) || v return local.get(RKEY, k) || v
} }
function clearItem(k) { function clearItem(k) {
local.delete(RKEY, k) local.delete(RKEY, k)
} }
function getHome(url) { function getHome(url) {
if (!url) { if (!url) {
return "" return ""
@ -1212,6 +1253,7 @@ function getHome(url) {
} catch (e) {} } catch (e) {}
return url return url
} }
function buildUrl(url, obj) { function buildUrl(url, obj) {
obj = obj || {}; obj = obj || {};
if (url.indexOf("?") < 0) { if (url.indexOf("?") < 0) {
@ -1229,9 +1271,11 @@ function buildUrl(url, obj) {
url += prs; url += prs;
return url return url
} }
function $require(url) { function $require(url) {
eval(request(url)) eval(request(url))
} }
function keysToLowerCase(obj) { function keysToLowerCase(obj) {
return Object.keys(obj).reduce((result, key) => { return Object.keys(obj).reduce((result, key) => {
const newKey = key.toLowerCase(); const newKey = key.toLowerCase();
@ -1239,6 +1283,7 @@ function keysToLowerCase(obj) {
return result return result
}, {}) }, {})
} }
function request(url, obj, ocr_flag) { function request(url, obj, ocr_flag) {
ocr_flag = ocr_flag || false; ocr_flag = ocr_flag || false;
if (typeof obj === "undefined" || !obj || obj === {}) { if (typeof obj === "undefined" || !obj || obj === {}) {
@ -1310,11 +1355,13 @@ function request(url, obj, ocr_flag) {
return html return html
} }
} }
function post(url, obj) { function post(url, obj) {
obj = obj || {}; obj = obj || {};
obj.method = "POST"; obj.method = "POST";
return request(url, obj) return request(url, obj)
} }
function reqCookie(url, obj, all_cookie) { function reqCookie(url, obj, all_cookie) {
obj = obj || {}; obj = obj || {};
obj.withHeaders = true; obj.withHeaders = true;
@ -1363,11 +1410,13 @@ function checkHtml(html, url, obj) {
} }
return html return html
} }
function getCode(url, obj) { function getCode(url, obj) {
let html = request(url, obj); let html = request(url, obj);
html = checkHtml(html, url, obj); html = checkHtml(html, url, obj);
return html return html
} }
function getHtml(url) { function getHtml(url) {
let obj = {}; let obj = {};
if (rule.headers) { if (rule.headers) {
@ -1394,6 +1443,7 @@ function getHtml(url) {
let html = getCode(url, obj); let html = getCode(url, obj);
return html return html
} }
function homeParse(homeObj) { function homeParse(homeObj) {
fetch_params = JSON.parse(JSON.stringify(rule_fetch_params)); fetch_params = JSON.parse(JSON.stringify(rule_fetch_params));
let classes = []; let classes = [];
@ -1488,6 +1538,7 @@ function homeParse(homeObj) {
console.log(JSON.stringify(resp)); console.log(JSON.stringify(resp));
return JSON.stringify(resp) return JSON.stringify(resp)
} }
function getPP(p, pn, pp, ppn) { function getPP(p, pn, pp, ppn) {
try { try {
let ps = p[pn] === "*" && pp.length > ppn ? pp[ppn] : p[pn]; let ps = p[pn] === "*" && pp.length > ppn ? pp[ppn] : p[pn];
@ -1496,6 +1547,7 @@ function getPP(p, pn, pp, ppn) {
return "" return ""
} }
} }
function homeVodParse(homeVodObj) { function homeVodParse(homeVodObj) {
fetch_params = JSON.parse(JSON.stringify(rule_fetch_params)); fetch_params = JSON.parse(JSON.stringify(rule_fetch_params));
let d = []; let d = [];
@ -1674,6 +1726,7 @@ function homeVodParse(homeVodObj) {
list: d list: d
}) })
} }
function categoryParse(cateObj) { function categoryParse(cateObj) {
fetch_params = JSON.parse(JSON.stringify(rule_fetch_params)); fetch_params = JSON.parse(JSON.stringify(rule_fetch_params));
let p = cateObj.一级; let p = cateObj.一级;
@ -1838,6 +1891,7 @@ function categoryParse(cateObj) {
}); });
return vod return vod
} }
function searchParse(searchObj) { function searchParse(searchObj) {
fetch_params = JSON.parse(JSON.stringify(rule_fetch_params)); fetch_params = JSON.parse(JSON.stringify(rule_fetch_params));
let d = []; let d = [];
@ -2013,6 +2067,7 @@ function searchParse(searchObj) {
list: d list: d
}) })
} }
function detailParse(detailObj) { function detailParse(detailObj) {
let t1 = (new Date).getTime(); let t1 = (new Date).getTime();
fetch_params = JSON.parse(JSON.stringify(rule_fetch_params)); fetch_params = JSON.parse(JSON.stringify(rule_fetch_params));
@ -2248,6 +2303,7 @@ function detailParse(detailObj) {
list: [vod] list: [vod]
}) })
} }
function get_tab_index(vod) { function get_tab_index(vod) {
let obj = {}; let obj = {};
vod.vod_play_from.split("$$$").forEach((it, index) => { vod.vod_play_from.split("$$$").forEach((it, index) => {
@ -2255,6 +2311,7 @@ function get_tab_index(vod) {
}); });
return obj return obj
} }
function vodDeal(vod) { function vodDeal(vod) {
let vod_play_from = vod.vod_play_from.split("$$$"); let vod_play_from = vod.vod_play_from.split("$$$");
let vod_play_url = vod.vod_play_url.split("$$$"); let vod_play_url = vod.vod_play_url.split("$$$");
@ -2286,6 +2343,7 @@ function vodDeal(vod) {
vod.vod_play_url = play_ordered_list.join("$$$"); vod.vod_play_url = play_ordered_list.join("$$$");
return vod return vod
} }
function tellIsJx(url) { function tellIsJx(url) {
try { try {
let is_vip = !/\.(m3u8|mp4|m4a)$/.test(url.split("?")[0]) && 是否正版(url); let is_vip = !/\.(m3u8|mp4|m4a)$/.test(url.split("?")[0]) && 是否正版(url);
@ -2294,6 +2352,7 @@ function tellIsJx(url) {
return 1 return 1
} }
} }
function playParse(playObj) { function playParse(playObj) {
fetch_params = JSON.parse(JSON.stringify(rule_fetch_params)); fetch_params = JSON.parse(JSON.stringify(rule_fetch_params));
MY_URL = playObj.url; MY_URL = playObj.url;
@ -2362,6 +2421,7 @@ function playParse(playObj) {
console.log(JSON.stringify(lazy_play)); console.log(JSON.stringify(lazy_play));
return JSON.stringify(lazy_play) return JSON.stringify(lazy_play)
} }
function proxyParse(proxyObj) { function proxyParse(proxyObj) {
var input = proxyObj.params; var input = proxyObj.params;
if (proxyObj.proxy_rule) { if (proxyObj.proxy_rule) {
@ -2380,6 +2440,7 @@ function proxyParse(proxyObj) {
return [404, "text/plain", "Not Found"] return [404, "text/plain", "Not Found"]
} }
} }
function isVideoParse(isVideoObj) { function isVideoParse(isVideoObj) {
var input = isVideoObj.url; var input = isVideoObj.url;
if (!isVideoObj.t) { if (!isVideoObj.t) {
@ -2399,6 +2460,7 @@ function isVideoParse(isVideoObj) {
} }
} }
} }
function getOriginalJs(js_code) { function getOriginalJs(js_code) {
let current_match = /var rule|[\u4E00-\u9FA5]+|function|let |var |const |\(|\)|"|'/; let current_match = /var rule|[\u4E00-\u9FA5]+|function|let |var |const |\(|\)|"|'/;
if (current_match.test(js_code)) { if (current_match.test(js_code)) {
@ -2433,24 +2495,21 @@ function getOriginalJs(js_code) {
logger("非gzip加密"); logger("非gzip加密");
return "" return ""
} }
}, }, text => {
text => {
try { try {
return base64Decode(text) return base64Decode(text)
} catch (e) { } catch (e) {
logger("非b64加密"); logger("非b64加密");
return "" return ""
} }
}, }, text => {
text => {
try { try {
return aes_decrypt(text) return aes_decrypt(text)
} catch (e) { } catch (e) {
logger("非aes加密"); logger("非aes加密");
return "" return ""
} }
}, }, text => {
text => {
try { try {
return RSA.decode(text, rsa_private_key, null) return RSA.decode(text, rsa_private_key, null)
} catch (e) { } catch (e) {
@ -2468,6 +2527,7 @@ function getOriginalJs(js_code) {
} }
return decode_content return decode_content
} }
function runMain(main_func_code, arg) { function runMain(main_func_code, arg) {
let mainFunc = function() { let mainFunc = function() {
return "" return ""
@ -2480,6 +2540,7 @@ function runMain(main_func_code, arg) {
return "" return ""
} }
} }
function init(ext) { function init(ext) {
console.log("init"); console.log("init");
rule = {}; rule = {};
@ -2603,7 +2664,7 @@ function init(ext) {
rule.sniffer = false rule.sniffer = false
} }
rule.sniffer = rule.hasOwnProperty("sniffer") ? rule.sniffer : ""; rule.sniffer = rule.hasOwnProperty("sniffer") ? rule.sniffer : "";
rule.sniffer = !! (rule.sniffer && rule.sniffer !== "0" && rule.sniffer !== "false"); rule.sniffer = !!(rule.sniffer && rule.sniffer !== "0" && rule.sniffer !== "false");
rule.isVideo = rule.hasOwnProperty("isVideo") ? rule.isVideo : ""; rule.isVideo = rule.hasOwnProperty("isVideo") ? rule.isVideo : "";
if (rule.sniffer && !rule.isVideo) { if (rule.sniffer && !rule.isVideo) {
rule.isVideo = "http((?!http).){12,}?\\.(m3u8|mp4|flv|avi|mkv|rm|wmv|mpg|m4a|mp3)\\?.*|http((?!http).){12,}\\.(m3u8|mp4|flv|avi|mkv|rm|wmv|mpg|m4a|mp3)|http((?!http).)*?video/tos*|http((?!http).)*?obj/tos*" rule.isVideo = "http((?!http).){12,}?\\.(m3u8|mp4|flv|avi|mkv|rm|wmv|mpg|m4a|mp3)\\?.*|http((?!http).){12,}\\.(m3u8|mp4|flv|avi|mkv|rm|wmv|mpg|m4a|mp3)|http((?!http).)*?video/tos*|http((?!http).)*?obj/tos*"
@ -2677,6 +2738,7 @@ function home(filter, home_html, class_parse) {
}; };
return homeParse(homeObj) return homeParse(homeObj)
} }
function homeVod(params) { function homeVod(params) {
console.log("homeVod"); console.log("homeVod");
let homeVodObj = { let homeVodObj = {
@ -2687,6 +2749,7 @@ function homeVod(params) {
}; };
return homeVodParse(homeVodObj) return homeVodParse(homeVodObj)
} }
function category(tid, pg, filter, extend) { function category(tid, pg, filter, extend) {
let cateObj = { let cateObj = {
url: rule.url, url: rule.url,
@ -2698,6 +2761,7 @@ function category(tid, pg, filter, extend) {
}; };
return categoryParse(cateObj) return categoryParse(cateObj)
} }
function detail(vod_url) { function detail(vod_url) {
let orId = vod_url; let orId = vod_url;
let fyclass = ""; let fyclass = "";
@ -2727,6 +2791,7 @@ function detail(vod_url) {
}; };
return detailParse(detailObj) return detailParse(detailObj)
} }
function play(flag, id, flags) { function play(flag, id, flags) {
let playObj = { let playObj = {
url: id, url: id,
@ -2735,6 +2800,7 @@ function play(flag, id, flags) {
}; };
return playParse(playObj) return playParse(playObj)
} }
function search(wd, quick, pg) { function search(wd, quick, pg) {
if (rule.search_encoding) { if (rule.search_encoding) {
if (rule.search_encoding.toLowerCase() !== "utf-8") { if (rule.search_encoding.toLowerCase() !== "utf-8") {
@ -2752,6 +2818,7 @@ function search(wd, quick, pg) {
}; };
return searchParse(searchObj) return searchParse(searchObj)
} }
function proxy(params) { function proxy(params) {
if (rule.proxy_rule && rule.proxy_rule.trim()) { if (rule.proxy_rule && rule.proxy_rule.trim()) {
rule.proxy_rule = rule.proxy_rule.trim() rule.proxy_rule = rule.proxy_rule.trim()
@ -2765,6 +2832,7 @@ function proxy(params) {
}; };
return proxyParse(proxyObj) return proxyParse(proxyObj)
} }
function sniffer() { function sniffer() {
let enable_sniffer = rule.sniffer || false; let enable_sniffer = rule.sniffer || false;
if (enable_sniffer) { if (enable_sniffer) {
@ -2772,6 +2840,7 @@ function sniffer() {
} }
return enable_sniffer return enable_sniffer
} }
function isVideo(url) { function isVideo(url) {
let t = 0; let t = 0;
let is_video; let is_video;
@ -2793,9 +2862,11 @@ function isVideo(url) {
} }
return result return result
} }
function getRule(key) { function getRule(key) {
return key ? rule[key] || "" : rule return key ? rule[key] || "" : rule
} }
function DRPY() { function DRPY() {
return { return {
runMain: runMain, runMain: runMain,

View File

@ -3,10 +3,10 @@
* strTool = gbkTool() strTool.encode(key) * strTool = gbkTool() strTool.encode(key)
* @returns {{encode: (function(*): *), decode: (function(*): *)}} * @returns {{encode: (function(*): *), decode: (function(*): *)}}
*/ */
export export function gbkTool() {
function gbkTool() {
var data = function(zipData) { var data = function(zipData) {
var re = zipData.replace(/#(\d+)\$/g, function(a, b) { var re = zipData
.replace(/#(\d+)\$/g, function(a, b) {
return Array(+b + 3).join('#'); return Array(+b + 3).join('#');
}) })
.replace(/#/g, '####') .replace(/#/g, '####')

View File

@ -21,7 +21,9 @@
/*global require, exports, module, define */ /*global require, exports, module, define */
(function(global, factory) { (function(global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : typeof define === 'function' && define.amd ? define(['exports'], factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.jinja = {})); typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
typeof define === 'function' && define.amd ? define(['exports'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.jinja = {}));
})(this, (function(jinja) { })(this, (function(jinja) {
"use strict"; "use strict";
var STRINGS = /'(\\.|[^'])*'|"(\\.|[^"'"])*"/g; var STRINGS = /'(\\.|[^'])*'|"(\\.|[^"'"])*"/g;
@ -402,7 +404,8 @@
var _hasOwnProperty = Object.prototype.hasOwnProperty; var _hasOwnProperty = Object.prototype.hasOwnProperty;
var getKeys = Object.keys || function(obj) { var getKeys = Object.keys || function(obj) {
var keys = []; var keys = [];
for (var n in obj) if (_hasOwnProperty.call(obj, n)) keys.push(n); for (var n in obj)
if (_hasOwnProperty.call(obj, n)) keys.push(n);
return keys; return keys;
}; };
var isArray = Array.isArray || function(obj) { var isArray = Array.isArray || function(obj) {

View File

@ -5,7 +5,8 @@
* If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/) * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
* or disable the default devtool with "devtool: false". * or disable the default devtool with "devtool: false".
* If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/). * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
*/ (function webpackUniversalModuleDefinition(root, factory) { */
(function webpackUniversalModuleDefinition(root, factory) {
if (typeof exports === 'object' && typeof module === 'object') { if (typeof exports === 'object' && typeof module === 'object') {
// CommonJS // CommonJS
module.exports = exports = factory(); module.exports = exports = factory();
@ -247,17 +248,14 @@
/******/ /******/
}); });
/************************************************************************/ /************************************************************************/
/******/ /******/ // The module cache
// The module cache
/******/ /******/
var __webpack_module_cache__ = {}; var __webpack_module_cache__ = {};
/******/ /******/
/******/ /******/ // The require function
// The require function
/******/ /******/
function __webpack_require__(moduleId) { function __webpack_require__(moduleId) {
/******/ /******/ // Check if module is in cache
// Check if module is in cache
/******/ /******/
var cachedModule = __webpack_module_cache__[moduleId]; var cachedModule = __webpack_module_cache__[moduleId];
/******/ /******/
@ -266,26 +264,21 @@
return cachedModule.exports; return cachedModule.exports;
/******/ /******/
} }
/******/ /******/ // Create a new module (and put it into the cache)
// Create a new module (and put it into the cache)
/******/ /******/
var module = __webpack_module_cache__[moduleId] = { var module = __webpack_module_cache__[moduleId] = {
/******/ /******/ // no module.id needed
// no module.id needed /******/ // no module.loaded needed
/******/
// no module.loaded needed
/******/ /******/
exports: {} exports: {}
/******/ /******/
}; };
/******/ /******/
/******/ /******/ // Execute the module function
// Execute the module function
/******/ /******/
__webpack_modules__[moduleId](module, module.exports, __webpack_require__); __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/ /******/
/******/ /******/ // Return the exports of the module
// Return the exports of the module
/******/ /******/
return module.exports; return module.exports;
/******/ /******/
@ -296,8 +289,7 @@
/* webpack/runtime/define property getters */ /* webpack/runtime/define property getters */
/******/ /******/
(() => { (() => {
/******/ /******/ // define getter functions for harmony exports
// define getter functions for harmony exports
/******/ /******/
__webpack_require__.d = (exports, definition) => { __webpack_require__.d = (exports, definition) => {
/******/ /******/
@ -331,8 +323,7 @@
/* webpack/runtime/make namespace object */ /* webpack/runtime/make namespace object */
/******/ /******/
(() => { (() => {
/******/ /******/ // define __esModule on exports
// define __esModule on exports
/******/ /******/
__webpack_require__.r = (exports) => { __webpack_require__.r = (exports) => {
/******/ /******/
@ -354,12 +345,9 @@
/******/ /******/
/************************************************************************/ /************************************************************************/
/******/ /******/
/******/ /******/ // startup
// startup /******/ // Load entry module and return exports
/******/ /******/ // This entry module can't be inlined because the eval devtool is used.
// Load entry module and return exports
/******/
// This entry module can't be inlined because the eval devtool is used.
/******/ /******/
var __webpack_exports__ = __webpack_require__("./lib/index.js"); var __webpack_exports__ = __webpack_require__("./lib/index.js");
/******/ /******/

View File

@ -1,5 +1,7 @@
(function(global, factory) { (function(global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : typeof define === 'function' && define.amd ? define(factory) : (global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.JSON5 = factory()); typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.JSON5 = factory());
}(this, (function() { }(this, (function() {
'use strict'; 'use strict';
@ -11,7 +13,8 @@
var _global = createCommonjsModule(function(module) { var _global = createCommonjsModule(function(module) {
// https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
var global = module.exports = typeof window != 'undefined' && window.Math == Math ? window : typeof self != 'undefined' && self.Math == Math ? self var global = module.exports = typeof window != 'undefined' && window.Math == Math ?
window : typeof self != 'undefined' && self.Math == Math ? self
// eslint-disable-next-line no-new-func // eslint-disable-next-line no-new-func
: :
Function('return this')(); Function('return this')();
@ -103,7 +106,8 @@
if (_ie8DomDefine) { if (_ie8DomDefine) {
try { try {
return dP(O, P, Attributes); return dP(O, P, Attributes);
} catch (e) { /* empty */} } catch (e) {
/* empty */ }
} }
if ('get' in Attributes || 'set' in Attributes) { if ('get' in Attributes || 'set' in Attributes) {
throw TypeError('Accessors not supported!'); throw TypeError('Accessors not supported!');
@ -306,7 +310,9 @@
return TO_STRING ? '' : undefined; return TO_STRING ? '' : undefined;
} }
a = s.charCodeAt(i); a = s.charCodeAt(i);
return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff ? TO_STRING ? s.charAt(i) : a : TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000; return a < 0xd800 || a > 0xdbff || i + 1 === l || (b = s.charCodeAt(i + 1)) < 0xdc00 || b > 0xdfff ?
TO_STRING ? s.charAt(i) : a :
TO_STRING ? s.slice(i, i + 2) : (a - 0xd800 << 10) + (b - 0xdc00) + 0x10000;
}; };
}; };
@ -331,7 +337,7 @@
var $fromCodePoint = String.fromCodePoint; var $fromCodePoint = String.fromCodePoint;
// length should be 1, old FF problem // length should be 1, old FF problem
_export(_export.S + _export.F * ( !! $fromCodePoint && $fromCodePoint.length != 1), 'String', { _export(_export.S + _export.F * (!!$fromCodePoint && $fromCodePoint.length != 1), 'String', {
// 21.1.2.2 String.fromCodePoint(...codePoints) // 21.1.2.2 String.fromCodePoint(...codePoints)
fromCodePoint: function fromCodePoint(x) { fromCodePoint: function fromCodePoint(x) {
var arguments$1 = arguments; var arguments$1 = arguments;
@ -345,7 +351,10 @@
if (_toAbsoluteIndex(code, 0x10ffff) !== code) { if (_toAbsoluteIndex(code, 0x10ffff) !== code) {
throw RangeError(code + ' is not a valid code point'); throw RangeError(code + ' is not a valid code point');
} }
res.push(code < 0x10000 ? fromCharCode(code) : fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00)); res.push(code < 0x10000 ?
fromCharCode(code) :
fromCharCode(((code -= 0x10000) >> 10) + 0xd800, code % 0x400 + 0xdc00)
);
} }
return res.join(''); return res.join('');
} }
@ -371,12 +380,22 @@
isIdStartChar: function isIdStartChar(c) { isIdStartChar: function isIdStartChar(c) {
return typeof c === 'string' && ( return typeof c === 'string' && (
(c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c === '$') || (c === '_') || unicode.ID_Start.test(c)) (c >= 'a' && c <= 'z') ||
(c >= 'A' && c <= 'Z') ||
(c === '$') || (c === '_') ||
unicode.ID_Start.test(c)
)
}, },
isIdContinueChar: function isIdContinueChar(c) { isIdContinueChar: function isIdContinueChar(c) {
return typeof c === 'string' && ( return typeof c === 'string' && (
(c >= 'a' && c <= 'z') || (c >= 'A' && c <= 'Z') || (c >= '0' && c <= '9') || (c === '$') || (c === '_') || (c === '') || (c === '') || unicode.ID_Continue.test(c)) (c >= 'a' && c <= 'z') ||
(c >= 'A' && c <= 'Z') ||
(c >= '0' && c <= '9') ||
(c === '$') || (c === '_') ||
(c === '\u200C') || (c === '\u200D') ||
unicode.ID_Continue.test(c)
)
}, },
isDigit: function isDigit(c) { isDigit: function isDigit(c) {
@ -526,12 +545,12 @@
case '\v': case '\v':
case '\f': case '\f':
case ' ': case ' ':
case ' ': case '\u00A0':
case '': case '\uFEFF':
case '\n': case '\n':
case '\r': case '\r':
case '': case '\u2028':
case '': case '\u2029':
read(); read();
return return
@ -611,8 +630,8 @@
switch (c) { switch (c) {
case '\n': case '\n':
case '\r': case '\r':
case '': case '\u2028':
case '': case '\u2029':
read(); read();
lexState = 'default'; lexState = 'default';
return return
@ -727,8 +746,8 @@
switch (c) { switch (c) {
case '$': case '$':
case '_': case '_':
case '': case '\u200C':
case '': case '\u200D':
buffer += read(); buffer += read();
return return
@ -756,8 +775,8 @@
switch (u) { switch (u) {
case '$': case '$':
case '_': case '_':
case '': case '\u200C':
case '': case '\u200D':
break break
default: default:
@ -986,8 +1005,8 @@
case '\r': case '\r':
throw invalidChar(read()) throw invalidChar(read())
case '': case '\u2028':
case '': case '\u2029':
separatorChar(c); separatorChar(c);
break break
@ -1162,8 +1181,8 @@
return unicodeEscape() return unicodeEscape()
case '\n': case '\n':
case '': case '\u2028':
case '': case '\u2029':
read(); read();
return '' return ''
@ -1482,8 +1501,8 @@
'\t': '\\t', '\t': '\\t',
'\v': '\\v', '\v': '\\v',
'\0': '\\0', '\0': '\\0',
'': '\\u2028', '\u2028': '\\u2028',
'': '\\u2029', '\u2029': '\\u2029',
}; };
if (replacements[c]) { if (replacements[c]) {
@ -1514,7 +1533,10 @@
var quote; var quote;
if ( if (
replacer != null && typeof replacer === 'object' && !Array.isArray(replacer)) { replacer != null &&
typeof replacer === 'object' &&
!Array.isArray(replacer)
) {
space = replacer.space; space = replacer.space;
quote = replacer.quote; quote = replacer.quote;
replacer = replacer.replacer; replacer = replacer.replacer;
@ -1532,7 +1554,10 @@
if (typeof v === 'string') { if (typeof v === 'string') {
item = v; item = v;
} else if ( } else if (
typeof v === 'number' || v instanceof String || v instanceof Number) { typeof v === 'number' ||
v instanceof String ||
v instanceof Number
) {
item = String(v); item = String(v);
} }
@ -1624,8 +1649,8 @@
'\t': '\\t', '\t': '\\t',
'\v': '\\v', '\v': '\\v',
'\0': '\\0', '\0': '\\0',
'': '\\u2028', '\u2028': '\\u2028',
'': '\\u2029', '\u2029': '\\u2029',
}; };
var product = ''; var product = '';

File diff suppressed because it is too large Load Diff

303
JS/pako.min.js vendored
View File

@ -7,7 +7,15 @@
let e = t.length; let e = t.length;
for (; --e >= 0;) t[e] = 0 for (; --e >= 0;) t[e] = 0
} }
const a = 256, i = 286, n = 30, s = 15, r = new Uint8Array([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]), o = new Uint8Array([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]), l = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7]), h = new Uint8Array([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]), d = new Array(576); const a = 256,
i = 286,
n = 30,
s = 15,
r = new Uint8Array([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]),
o = new Uint8Array([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]),
l = new Uint8Array([0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7]),
h = new Uint8Array([16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15]),
d = new Array(576);
e(d); e(d);
const _ = new Array(60); const _ = new Array(60);
e(_); e(_);
@ -28,19 +36,24 @@
this.dyn_tree = t, this.max_code = 0, this.stat_desc = e this.dyn_tree = t, this.max_code = 0, this.stat_desc = e
} }
e(w); e(w);
const v = t => t < 256 ? f[t] : f[256 + (t >>> 7)], y = (t, e) => { const v = t => t < 256 ? f[t] : f[256 + (t >>> 7)],
y = (t, e) => {
t.pending_buf[t.pending++] = 255 & e, t.pending_buf[t.pending++] = e >>> 8 & 255 t.pending_buf[t.pending++] = 255 & e, t.pending_buf[t.pending++] = e >>> 8 & 255
}, x = (t, e, a) => { },
x = (t, e, a) => {
t.bi_valid > 16 - a ? (t.bi_buf |= e << t.bi_valid & 65535, y(t, t.bi_buf), t.bi_buf = e >> 16 - t.bi_valid, t.bi_valid += a - 16) : (t.bi_buf |= e << t.bi_valid & 65535, t.bi_valid += a) t.bi_valid > 16 - a ? (t.bi_buf |= e << t.bi_valid & 65535, y(t, t.bi_buf), t.bi_buf = e >> 16 - t.bi_valid, t.bi_valid += a - 16) : (t.bi_buf |= e << t.bi_valid & 65535, t.bi_valid += a)
}, z = (t, e, a) => { },
z = (t, e, a) => {
x(t, a[2 * e], a[2 * e + 1]) x(t, a[2 * e], a[2 * e + 1])
}, A = (t, e) => { },
A = (t, e) => {
let a = 0; let a = 0;
do { do {
a |= 1 & t, t >>>= 1, a <<= 1 a |= 1 & t, t >>>= 1, a <<= 1
} while (--e > 0); } while (--e > 0);
return a >>> 1 return a >>> 1
}, E = (t, e, a) => { },
E = (t, e, a) => {
const i = new Array(16); const i = new Array(16);
let n, r, o = 0; let n, r, o = 0;
for (n = 1; n <= s; n++) o = o + a[n - 1] << 1, i[n] = o; for (n = 1; n <= s; n++) o = o + a[n - 1] << 1, i[n] = o;
@ -48,30 +61,41 @@
let e = t[2 * r + 1]; let e = t[2 * r + 1];
0 !== e && (t[2 * r] = A(i[e]++, e)) 0 !== e && (t[2 * r] = A(i[e]++, e))
} }
}, R = t => { },
R = t => {
let e; let e;
for (e = 0; e < i; e++) t.dyn_ltree[2 * e] = 0; for (e = 0; e < i; e++) t.dyn_ltree[2 * e] = 0;
for (e = 0; e < n; e++) t.dyn_dtree[2 * e] = 0; for (e = 0; e < n; e++) t.dyn_dtree[2 * e] = 0;
for (e = 0; e < 19; e++) t.bl_tree[2 * e] = 0; for (e = 0; e < 19; e++) t.bl_tree[2 * e] = 0;
t.dyn_ltree[512] = 1, t.opt_len = t.static_len = 0, t.sym_next = t.matches = 0 t.dyn_ltree[512] = 1, t.opt_len = t.static_len = 0, t.sym_next = t.matches = 0
}, Z = t => { },
Z = t => {
t.bi_valid > 8 ? y(t, t.bi_buf) : t.bi_valid > 0 && (t.pending_buf[t.pending++] = t.bi_buf), t.bi_buf = 0, t.bi_valid = 0 t.bi_valid > 8 ? y(t, t.bi_buf) : t.bi_valid > 0 && (t.pending_buf[t.pending++] = t.bi_buf), t.bi_buf = 0, t.bi_valid = 0
}, U = (t, e, a, i) => { },
const n = 2 * e, s = 2 * a; U = (t, e, a, i) => {
const n = 2 * e,
s = 2 * a;
return t[n] < t[s] || t[n] === t[s] && i[e] <= i[a] return t[n] < t[s] || t[n] === t[s] && i[e] <= i[a]
}, S = (t, e, a) => { },
S = (t, e, a) => {
const i = t.heap[a]; const i = t.heap[a];
let n = a << 1; let n = a << 1;
for (; n <= t.heap_len && (n < t.heap_len && U(e, t.heap[n + 1], t.heap[n], t.depth) && n++, !U(e, i, t.heap[n], t.depth));) t.heap[a] = t.heap[n], a = n, n <<= 1; for (; n <= t.heap_len && (n < t.heap_len && U(e, t.heap[n + 1], t.heap[n], t.depth) && n++, !U(e, i, t.heap[n], t.depth));) t.heap[a] = t.heap[n], a = n, n <<= 1;
t.heap[a] = i t.heap[a] = i
}, D = (t, e, i) => { },
D = (t, e, i) => {
let n, s, l, h, d = 0; let n, s, l, h, d = 0;
if (0 !== t.sym_next) do { if (0 !== t.sym_next)
do {
n = 255 & t.pending_buf[t.sym_buf + d++], n += (255 & t.pending_buf[t.sym_buf + d++]) << 8, s = t.pending_buf[t.sym_buf + d++], 0 === n ? z(t, s, e) : (l = c[s], z(t, l + a + 1, e), h = r[l], 0 !== h && (s -= u[l], x(t, s, h)), n--, l = v(n), z(t, l, i), h = o[l], 0 !== h && (n -= w[l], x(t, n, h))) n = 255 & t.pending_buf[t.sym_buf + d++], n += (255 & t.pending_buf[t.sym_buf + d++]) << 8, s = t.pending_buf[t.sym_buf + d++], 0 === n ? z(t, s, e) : (l = c[s], z(t, l + a + 1, e), h = r[l], 0 !== h && (s -= u[l], x(t, s, h)), n--, l = v(n), z(t, l, i), h = o[l], 0 !== h && (n -= w[l], x(t, n, h)))
} while (d < t.sym_next); } while (d < t.sym_next);
z(t, 256, e) z(t, 256, e)
}, T = (t, e) => { },
const a = e.dyn_tree, i = e.stat_desc.static_tree, n = e.stat_desc.has_stree, r = e.stat_desc.elems; T = (t, e) => {
const a = e.dyn_tree,
i = e.stat_desc.static_tree,
n = e.stat_desc.has_stree,
r = e.stat_desc.elems;
let o, l, h, d = -1; let o, l, h, d = -1;
for (t.heap_len = 0, t.heap_max = 573, o = 0; o < r; o++) 0 !== a[2 * o] ? (t.heap[++t.heap_len] = d = o, t.depth[o] = 0) : a[2 * o + 1] = 0; for (t.heap_len = 0, t.heap_max = 573, o = 0; o < r; o++) 0 !== a[2 * o] ? (t.heap[++t.heap_len] = d = o, t.depth[o] = 0) : a[2 * o + 1] = 0;
for (; t.heap_len < 2;) h = t.heap[++t.heap_len] = d < 2 ? ++d : 0, a[2 * h] = 1, t.depth[h] = 0, t.opt_len--, n && (t.static_len -= i[2 * h + 1]); for (; t.heap_len < 2;) h = t.heap[++t.heap_len] = d < 2 ? ++d : 0, a[2 * h] = 1, t.depth[h] = 0, t.opt_len--, n && (t.static_len -= i[2 * h + 1]);
@ -81,7 +105,13 @@
o = t.heap[1], t.heap[1] = t.heap[t.heap_len--], S(t, a, 1), l = t.heap[1], t.heap[--t.heap_max] = o, t.heap[--t.heap_max] = l, a[2 * h] = a[2 * o] + a[2 * l], t.depth[h] = (t.depth[o] >= t.depth[l] ? t.depth[o] : t.depth[l]) + 1, a[2 * o + 1] = a[2 * l + 1] = h, t.heap[1] = h++, S(t, a, 1) o = t.heap[1], t.heap[1] = t.heap[t.heap_len--], S(t, a, 1), l = t.heap[1], t.heap[--t.heap_max] = o, t.heap[--t.heap_max] = l, a[2 * h] = a[2 * o] + a[2 * l], t.depth[h] = (t.depth[o] >= t.depth[l] ? t.depth[o] : t.depth[l]) + 1, a[2 * o + 1] = a[2 * l + 1] = h, t.heap[1] = h++, S(t, a, 1)
} while (t.heap_len >= 2); } while (t.heap_len >= 2);
t.heap[--t.heap_max] = t.heap[1], ((t, e) => { t.heap[--t.heap_max] = t.heap[1], ((t, e) => {
const a = e.dyn_tree, i = e.max_code, n = e.stat_desc.static_tree, r = e.stat_desc.has_stree, o = e.stat_desc.extra_bits, l = e.stat_desc.extra_base, h = e.stat_desc.max_length; const a = e.dyn_tree,
i = e.max_code,
n = e.stat_desc.static_tree,
r = e.stat_desc.has_stree,
o = e.stat_desc.extra_bits,
l = e.stat_desc.extra_base,
h = e.stat_desc.max_length;
let d, _, f, c, u, w, m = 0; let d, _, f, c, u, w, m = 0;
for (c = 0; c <= s; c++) t.bl_count[c] = 0; for (c = 0; c <= s; c++) t.bl_count[c] = 0;
for (a[2 * t.heap[t.heap_max] + 1] = 0, d = t.heap_max + 1; d < 573; d++) _ = t.heap[d], c = a[2 * a[2 * _ + 1] + 1] + 1, c > h && (c = h, m++), a[2 * _ + 1] = c, _ > i || (t.bl_count[c]++, u = 0, _ >= l && (u = o[_ - l]), w = a[2 * _], t.opt_len += w * (c + u), r && (t.static_len += w * (n[2 * _ + 1] + u))); for (a[2 * t.heap[t.heap_max] + 1] = 0, d = t.heap_max + 1; d < 573; d++) _ = t.heap[d], c = a[2 * a[2 * _ + 1] + 1] + 1, c > h && (c = h, m++), a[2 * _ + 1] = c, _ > i || (t.bl_count[c]++, u = 0, _ >= l && (u = o[_ - l]), w = a[2 * _], t.opt_len += w * (c + u), r && (t.static_len += w * (n[2 * _ + 1] + u)));
@ -90,16 +120,29 @@
for (c = h - 1; 0 === t.bl_count[c];) c--; for (c = h - 1; 0 === t.bl_count[c];) c--;
t.bl_count[c]--, t.bl_count[c + 1] += 2, t.bl_count[h]--, m -= 2 t.bl_count[c]--, t.bl_count[c + 1] += 2, t.bl_count[h]--, m -= 2
} while (m > 0); } while (m > 0);
for (c = h; 0 !== c; c--) for (_ = t.bl_count[c]; 0 !== _;) f = t.heap[--d], f > i || (a[2 * f + 1] !== c && (t.opt_len += (c - a[2 * f + 1]) * a[2 * f], a[2 * f + 1] = c), _--) for (c = h; 0 !== c; c--)
for (_ = t.bl_count[c]; 0 !== _;) f = t.heap[--d], f > i || (a[2 * f + 1] !== c && (t.opt_len += (c - a[2 * f + 1]) * a[2 * f], a[2 * f + 1] = c), _--)
} }
})(t, e), E(a, d, t.bl_count) })(t, e), E(a, d, t.bl_count)
}, O = (t, e, a) => { },
let i, n, s = -1, r = e[1], o = 0, l = 7, h = 4; O = (t, e, a) => {
let i, n, s = -1,
r = e[1],
o = 0,
l = 7,
h = 4;
for (0 === r && (l = 138, h = 3), e[2 * (a + 1) + 1] = 65535, i = 0; i <= a; i++) n = r, r = e[2 * (i + 1) + 1], ++o < l && n === r || (o < h ? t.bl_tree[2 * n] += o : 0 !== n ? (n !== s && t.bl_tree[2 * n]++, t.bl_tree[32]++) : o <= 10 ? t.bl_tree[34]++ : t.bl_tree[36]++, o = 0, s = n, 0 === r ? (l = 138, h = 3) : n === r ? (l = 6, h = 3) : (l = 7, h = 4)) for (0 === r && (l = 138, h = 3), e[2 * (a + 1) + 1] = 65535, i = 0; i <= a; i++) n = r, r = e[2 * (i + 1) + 1], ++o < l && n === r || (o < h ? t.bl_tree[2 * n] += o : 0 !== n ? (n !== s && t.bl_tree[2 * n]++, t.bl_tree[32]++) : o <= 10 ? t.bl_tree[34]++ : t.bl_tree[36]++, o = 0, s = n, 0 === r ? (l = 138, h = 3) : n === r ? (l = 6, h = 3) : (l = 7, h = 4))
}, I = (t, e, a) => { },
let i, n, s = -1, r = e[1], o = 0, l = 7, h = 4; I = (t, e, a) => {
for (0 === r && (l = 138, h = 3), i = 0; i <= a; i++) if (n = r, r = e[2 * (i + 1) + 1], !(++o < l && n === r)) { let i, n, s = -1,
if (o < h) do { r = e[1],
o = 0,
l = 7,
h = 4;
for (0 === r && (l = 138, h = 3), i = 0; i <= a; i++)
if (n = r, r = e[2 * (i + 1) + 1], !(++o < l && n === r)) {
if (o < h)
do {
z(t, n, t.bl_tree) z(t, n, t.bl_tree)
} while (0 != --o); } while (0 != --o);
else 0 !== n ? (n !== s && (z(t, n, t.bl_tree), o--), z(t, 16, t.bl_tree), x(t, o - 3, 2)) : o <= 10 ? (z(t, 17, t.bl_tree), x(t, o - 3, 3)) : (z(t, 18, t.bl_tree), x(t, o - 11, 7)); else 0 !== n ? (n !== s && (z(t, n, t.bl_tree), o--), z(t, 16, t.bl_tree), x(t, o - 3, 2)) : o <= 10 ? (z(t, 17, t.bl_tree), x(t, o - 3, 3)) : (z(t, 18, t.bl_tree), x(t, o - 11, 7));
@ -114,9 +157,11 @@
let s, r, o = 0; let s, r, o = 0;
t.level > 0 ? (2 === t.strm.data_type && (t.strm.data_type = (t => { t.level > 0 ? (2 === t.strm.data_type && (t.strm.data_type = (t => {
let e, i = 4093624447; let e, i = 4093624447;
for (e = 0; e <= 31; e++, i >>>= 1) if (1 & i && 0 !== t.dyn_ltree[2 * e]) return 0; for (e = 0; e <= 31; e++, i >>>= 1)
if (1 & i && 0 !== t.dyn_ltree[2 * e]) return 0;
if (0 !== t.dyn_ltree[18] || 0 !== t.dyn_ltree[20] || 0 !== t.dyn_ltree[26]) return 1; if (0 !== t.dyn_ltree[18] || 0 !== t.dyn_ltree[20] || 0 !== t.dyn_ltree[26]) return 1;
for (e = 32; e < a; e++) if (0 !== t.dyn_ltree[2 * e]) return 1; for (e = 32; e < a; e++)
if (0 !== t.dyn_ltree[2 * e]) return 1;
return 0 return 0
})(t)), T(t, t.l_desc), T(t, t.d_desc), o = (t => { })(t)), T(t, t.l_desc), T(t, t.d_desc), o = (t => {
let e; let e;
@ -127,14 +172,18 @@
for (x(t, e - 257, 5), x(t, a - 1, 5), x(t, i - 4, 4), n = 0; n < i; n++) x(t, t.bl_tree[2 * h[n] + 1], 3); for (x(t, e - 257, 5), x(t, a - 1, 5), x(t, i - 4, 4), n = 0; n < i; n++) x(t, t.bl_tree[2 * h[n] + 1], 3);
I(t, t.dyn_ltree, e - 1), I(t, t.dyn_dtree, a - 1) I(t, t.dyn_ltree, e - 1), I(t, t.dyn_dtree, a - 1)
})(t, t.l_desc.max_code + 1, t.d_desc.max_code + 1, o + 1), D(t, t.dyn_ltree, t.dyn_dtree)), R(t), n && Z(t) })(t, t.l_desc.max_code + 1, t.d_desc.max_code + 1, o + 1), D(t, t.dyn_ltree, t.dyn_dtree)), R(t), n && Z(t)
}, B = { },
B = {
_tr_init: t => { _tr_init: t => {
F || ((() => { F || ((() => {
let t, e, a, h, k; let t, e, a, h, k;
const v = new Array(16); const v = new Array(16);
for (a = 0, h = 0; h < 28; h++) for (u[h] = a, t = 0; t < 1 << r[h]; t++) c[a++] = h; for (a = 0, h = 0; h < 28; h++)
for (c[a - 1] = h, k = 0, h = 0; h < 16; h++) for (w[h] = k, t = 0; t < 1 << o[h]; t++) f[k++] = h; for (u[h] = a, t = 0; t < 1 << r[h]; t++) c[a++] = h;
for (k >>= 7; h < n; h++) for (w[h] = k << 7, t = 0; t < 1 << o[h] - 7; t++) f[256 + k++] = h; for (c[a - 1] = h, k = 0, h = 0; h < 16; h++)
for (w[h] = k, t = 0; t < 1 << o[h]; t++) f[k++] = h;
for (k >>= 7; h < n; h++)
for (w[h] = k << 7, t = 0; t < 1 << o[h] - 7; t++) f[256 + k++] = h;
for (e = 0; e <= s; e++) v[e] = 0; for (e = 0; e <= s; e++) v[e] = 0;
for (t = 0; t <= 143;) d[2 * t + 1] = 8, t++, v[8]++; for (t = 0; t <= 143;) d[2 * t + 1] = 8, t++, v[8]++;
for (; t <= 255;) d[2 * t + 1] = 9, t++, v[9]++; for (; t <= 255;) d[2 * t + 1] = 9, t++, v[9]++;
@ -154,7 +203,9 @@
} }
}; };
var C = (t, e, a, i) => { var C = (t, e, a, i) => {
let n = 65535 & t | 0, s = t >>> 16 & 65535 | 0, r = 0; let n = 65535 & t | 0,
s = t >>> 16 & 65535 | 0,
r = 0;
for (; 0 !== a;) { for (; 0 !== a;) {
r = a > 2e3 ? 2e3 : a, a -= r; r = a > 2e3 ? 2e3 : a, a -= r;
do { do {
@ -174,11 +225,13 @@
return e return e
})()); })());
var H = (t, e, a, i) => { var H = (t, e, a, i) => {
const n = M, s = i + a; const n = M,
s = i + a;
t ^= -1; t ^= -1;
for (let a = i; a < s; a++) t = t >>> 8 ^ n[255 & (t ^ e[a])]; for (let a = i; a < s; a++) t = t >>> 8 ^ n[255 & (t ^ e[a])];
return -1 ^ t return -1 ^ t
}, j = { },
j = {
2: "need dictionary", 2: "need dictionary",
1: "stream end", 1: "stream end",
0: "", 0: "",
@ -188,7 +241,8 @@
"-4": "insufficient memory", "-4": "insufficient memory",
"-5": "buffer error", "-5": "buffer error",
"-6": "incompatible version" "-6": "incompatible version"
}, K = { },
K = {
Z_NO_FLUSH: 0, Z_NO_FLUSH: 0,
Z_PARTIAL_FLUSH: 1, Z_PARTIAL_FLUSH: 1,
Z_SYNC_FLUSH: 2, Z_SYNC_FLUSH: 2,
@ -262,19 +316,32 @@
const e = t.state; const e = t.state;
let a = e.pending; let a = e.pending;
a > t.avail_out && (a = t.avail_out), 0 !== a && (t.output.set(e.pending_buf.subarray(e.pending_out, e.pending_out + a), t.next_out), t.next_out += a, e.pending_out += a, t.total_out += a, t.avail_out -= a, e.pending -= a, 0 === e.pending && (e.pending_out = 0)) a > t.avail_out && (a = t.avail_out), 0 !== a && (t.output.set(e.pending_buf.subarray(e.pending_out, e.pending_out + a), t.next_out), t.next_out += a, e.pending_out += a, t.total_out += a, t.avail_out -= a, e.pending -= a, 0 === e.pending && (e.pending_out = 0))
}, zt = (t, e) => { },
zt = (t, e) => {
G(t, t.block_start >= 0 ? t.block_start : -1, t.strstart - t.block_start, e), t.block_start = t.strstart, xt(t.strm) G(t, t.block_start >= 0 ? t.block_start : -1, t.strstart - t.block_start, e), t.block_start = t.strstart, xt(t.strm)
}, At = (t, e) => { },
At = (t, e) => {
t.pending_buf[t.pending++] = e t.pending_buf[t.pending++] = e
}, Et = (t, e) => { },
Et = (t, e) => {
t.pending_buf[t.pending++] = e >>> 8 & 255, t.pending_buf[t.pending++] = 255 & e t.pending_buf[t.pending++] = e >>> 8 & 255, t.pending_buf[t.pending++] = 255 & e
}, Rt = (t, e, a, i) => { },
Rt = (t, e, a, i) => {
let n = t.avail_in; let n = t.avail_in;
return n > i && (n = i), 0 === n ? 0 : (t.avail_in -= n, e.set(t.input.subarray(t.next_in, t.next_in + n), a), 1 === t.state.wrap ? t.adler = C(t.adler, e, n, a) : 2 === t.state.wrap && (t.adler = H(t.adler, e, n, a)), t.next_in += n, t.total_in += n, n) return n > i && (n = i), 0 === n ? 0 : (t.avail_in -= n, e.set(t.input.subarray(t.next_in, t.next_in + n), a), 1 === t.state.wrap ? t.adler = C(t.adler, e, n, a) : 2 === t.state.wrap && (t.adler = H(t.adler, e, n, a)), t.next_in += n, t.total_in += n, n)
}, Zt = (t, e) => { },
let a, i, n = t.max_chain_length, s = t.strstart, r = t.prev_length, o = t.nice_match; Zt = (t, e) => {
const l = t.strstart > t.w_size - ut ? t.strstart - (t.w_size - ut) : 0, h = t.window, d = t.w_mask, _ = t.prev, f = t.strstart + ct; let a, i, n = t.max_chain_length,
let c = h[s + r - 1], u = h[s + r]; s = t.strstart,
r = t.prev_length,
o = t.nice_match;
const l = t.strstart > t.w_size - ut ? t.strstart - (t.w_size - ut) : 0,
h = t.window,
d = t.w_mask,
_ = t.prev,
f = t.strstart + ct;
let c = h[s + r - 1],
u = h[s + r];
t.prev_length >= t.good_match && (n >>= 2), o > t.lookahead && (o = t.lookahead); t.prev_length >= t.good_match && (n >>= 2), o > t.lookahead && (o = t.lookahead);
do { do {
if (a = e, h[a + r] === u && h[a + r - 1] === c && h[a] === h[s] && h[++a] === h[s + 1]) { if (a = e, h[a + r] === u && h[a + r - 1] === c && h[a] === h[s] && h[++a] === h[s + 1]) {
@ -287,29 +354,36 @@
} }
} while ((e = _[e & d]) > l && 0 != --n); } while ((e = _[e & d]) > l && 0 != --n);
return r <= t.lookahead ? r : t.lookahead return r <= t.lookahead ? r : t.lookahead
}, Ut = t => { },
Ut = t => {
const e = t.w_size; const e = t.w_size;
let a, i, n; let a, i, n;
do { do {
if (i = t.window_size - t.lookahead - t.strstart, t.strstart >= e + (e - ut) && (t.window.set(t.window.subarray(e, e + e - i), 0), t.match_start -= e, t.strstart -= e, t.block_start -= e, t.insert > t.strstart && (t.insert = t.strstart), vt(t), i += e), 0 === t.strm.avail_in) break; if (i = t.window_size - t.lookahead - t.strstart, t.strstart >= e + (e - ut) && (t.window.set(t.window.subarray(e, e + e - i), 0), t.match_start -= e, t.strstart -= e, t.block_start -= e, t.insert > t.strstart && (t.insert = t.strstart), vt(t), i += e), 0 === t.strm.avail_in) break;
if (a = Rt(t.strm, t.window, t.strstart + t.lookahead, i), t.lookahead += a, t.lookahead + t.insert >= 3) for (n = t.strstart - t.insert, t.ins_h = t.window[n], t.ins_h = yt(t, t.ins_h, t.window[n + 1]); t.insert && (t.ins_h = yt(t, t.ins_h, t.window[n + 3 - 1]), t.prev[n & t.w_mask] = t.head[t.ins_h], t.head[t.ins_h] = n, n++, t.insert--, !(t.lookahead + t.insert < 3));); if (a = Rt(t.strm, t.window, t.strstart + t.lookahead, i), t.lookahead += a, t.lookahead + t.insert >= 3)
for (n = t.strstart - t.insert, t.ins_h = t.window[n], t.ins_h = yt(t, t.ins_h, t.window[n + 1]); t.insert && (t.ins_h = yt(t, t.ins_h, t.window[n + 3 - 1]), t.prev[n & t.w_mask] = t.head[t.ins_h], t.head[t.ins_h] = n, n++, t.insert--, !(t.lookahead + t.insert < 3)););
} while (t.lookahead < ut && 0 !== t.strm.avail_in) } while (t.lookahead < ut && 0 !== t.strm.avail_in)
}, St = (t, e) => { },
let a, i, n, s = t.pending_buf_size - 5 > t.w_size ? t.w_size : t.pending_buf_size - 5, r = 0, o = t.strm.avail_in; St = (t, e) => {
let a, i, n, s = t.pending_buf_size - 5 > t.w_size ? t.w_size : t.pending_buf_size - 5,
r = 0,
o = t.strm.avail_in;
do { do {
if (a = 65535, n = t.bi_valid + 42 >> 3, t.strm.avail_out < n) break; if (a = 65535, n = t.bi_valid + 42 >> 3, t.strm.avail_out < n) break;
if (n = t.strm.avail_out - n, i = t.strstart - t.block_start, a > i + t.strm.avail_in && (a = i + t.strm.avail_in), a > n && (a = n), a < s && (0 === a && e !== V || e === q || a !== i + t.strm.avail_in)) break; if (n = t.strm.avail_out - n, i = t.strstart - t.block_start, a > i + t.strm.avail_in && (a = i + t.strm.avail_in), a > n && (a = n), a < s && (0 === a && e !== V || e === q || a !== i + t.strm.avail_in)) break;
r = e === V && a === i + t.strm.avail_in ? 1 : 0, Y(t, 0, 0, r), t.pending_buf[t.pending - 4] = a, t.pending_buf[t.pending - 3] = a >> 8, t.pending_buf[t.pending - 2] = ~a, t.pending_buf[t.pending - 1] = ~a >> 8, xt(t.strm), i && (i > a && (i = a), t.strm.output.set(t.window.subarray(t.block_start, t.block_start + i), t.strm.next_out), t.strm.next_out += i, t.strm.avail_out -= i, t.strm.total_out += i, t.block_start += i, a -= i), a && (Rt(t.strm, t.strm.output, t.strm.next_out, a), t.strm.next_out += a, t.strm.avail_out -= a, t.strm.total_out += a) r = e === V && a === i + t.strm.avail_in ? 1 : 0, Y(t, 0, 0, r), t.pending_buf[t.pending - 4] = a, t.pending_buf[t.pending - 3] = a >> 8, t.pending_buf[t.pending - 2] = ~a, t.pending_buf[t.pending - 1] = ~a >> 8, xt(t.strm), i && (i > a && (i = a), t.strm.output.set(t.window.subarray(t.block_start, t.block_start + i), t.strm.next_out), t.strm.next_out += i, t.strm.avail_out -= i, t.strm.total_out += i, t.block_start += i, a -= i), a && (Rt(t.strm, t.strm.output, t.strm.next_out, a), t.strm.next_out += a, t.strm.avail_out -= a, t.strm.total_out += a)
} while (0 === r); } while (0 === r);
return o -= t.strm.avail_in, o && (o >= t.w_size ? (t.matches = 2, t.window.set(t.strm.input.subarray(t.strm.next_in - t.w_size, t.strm.next_in), 0), t.strstart = t.w_size, t.insert = t.strstart) : (t.window_size - t.strstart <= o && (t.strstart -= t.w_size, t.window.set(t.window.subarray(t.w_size, t.w_size + t.strstart), 0), t.matches < 2 && t.matches++, t.insert > t.strstart && (t.insert = t.strstart)), t.window.set(t.strm.input.subarray(t.strm.next_in - o, t.strm.next_in), t.strstart), t.strstart += o, t.insert += o > t.w_size - t.insert ? t.w_size - t.insert : o), t.block_start = t.strstart), t.high_water < t.strstart && (t.high_water = t.strstart), r ? 4 : e !== q && e !== V && 0 === t.strm.avail_in && t.strstart === t.block_start ? 2 : (n = t.window_size - t.strstart, t.strm.avail_in > n && t.block_start >= t.w_size && (t.block_start -= t.w_size, t.strstart -= t.w_size, t.window.set(t.window.subarray(t.w_size, t.w_size + t.strstart), 0), t.matches < 2 && t.matches++, n += t.w_size, t.insert > t.strstart && (t.insert = t.strstart)), n > t.strm.avail_in && (n = t.strm.avail_in), n && (Rt(t.strm, t.window, t.strstart, n), t.strstart += n, t.insert += n > t.w_size - t.insert ? t.w_size - t.insert : n), t.high_water < t.strstart && (t.high_water = t.strstart), n = t.bi_valid + 42 >> 3, n = t.pending_buf_size - n > 65535 ? 65535 : t.pending_buf_size - n, s = n > t.w_size ? t.w_size : n, i = t.strstart - t.block_start, (i >= s || (i || e === V) && e !== q && 0 === t.strm.avail_in && i <= n) && (a = i > n ? n : i, r = e === V && 0 === t.strm.avail_in && a === i ? 1 : 0, Y(t, t.block_start, a, r), t.block_start += a, xt(t.strm)), r ? 3 : 1) return o -= t.strm.avail_in, o && (o >= t.w_size ? (t.matches = 2, t.window.set(t.strm.input.subarray(t.strm.next_in - t.w_size, t.strm.next_in), 0), t.strstart = t.w_size, t.insert = t.strstart) : (t.window_size - t.strstart <= o && (t.strstart -= t.w_size, t.window.set(t.window.subarray(t.w_size, t.w_size + t.strstart), 0), t.matches < 2 && t.matches++, t.insert > t.strstart && (t.insert = t.strstart)), t.window.set(t.strm.input.subarray(t.strm.next_in - o, t.strm.next_in), t.strstart), t.strstart += o, t.insert += o > t.w_size - t.insert ? t.w_size - t.insert : o), t.block_start = t.strstart), t.high_water < t.strstart && (t.high_water = t.strstart), r ? 4 : e !== q && e !== V && 0 === t.strm.avail_in && t.strstart === t.block_start ? 2 : (n = t.window_size - t.strstart, t.strm.avail_in > n && t.block_start >= t.w_size && (t.block_start -= t.w_size, t.strstart -= t.w_size, t.window.set(t.window.subarray(t.w_size, t.w_size + t.strstart), 0), t.matches < 2 && t.matches++, n += t.w_size, t.insert > t.strstart && (t.insert = t.strstart)), n > t.strm.avail_in && (n = t.strm.avail_in), n && (Rt(t.strm, t.window, t.strstart, n), t.strstart += n, t.insert += n > t.w_size - t.insert ? t.w_size - t.insert : n), t.high_water < t.strstart && (t.high_water = t.strstart), n = t.bi_valid + 42 >> 3, n = t.pending_buf_size - n > 65535 ? 65535 : t.pending_buf_size - n, s = n > t.w_size ? t.w_size : n, i = t.strstart - t.block_start, (i >= s || (i || e === V) && e !== q && 0 === t.strm.avail_in && i <= n) && (a = i > n ? n : i, r = e === V && 0 === t.strm.avail_in && a === i ? 1 : 0, Y(t, t.block_start, a, r), t.block_start += a, xt(t.strm)), r ? 3 : 1)
}, Dt = (t, e) => { },
Dt = (t, e) => {
let a, i; let a, i;
for (;;) { for (;;) {
if (t.lookahead < ut) { if (t.lookahead < ut) {
if (Ut(t), t.lookahead < ut && e === q) return 1; if (Ut(t), t.lookahead < ut && e === q) return 1;
if (0 === t.lookahead) break if (0 === t.lookahead) break
} }
if (a = 0, t.lookahead >= 3 && (t.ins_h = yt(t, t.ins_h, t.window[t.strstart + 3 - 1]), a = t.prev[t.strstart & t.w_mask] = t.head[t.ins_h], t.head[t.ins_h] = t.strstart), 0 !== a && t.strstart - a <= t.w_size - ut && (t.match_length = Zt(t, a)), t.match_length >= 3) if (i = X(t, t.strstart - t.match_start, t.match_length - 3), t.lookahead -= t.match_length, t.match_length <= t.max_lazy_match && t.lookahead >= 3) { if (a = 0, t.lookahead >= 3 && (t.ins_h = yt(t, t.ins_h, t.window[t.strstart + 3 - 1]), a = t.prev[t.strstart & t.w_mask] = t.head[t.ins_h], t.head[t.ins_h] = t.strstart), 0 !== a && t.strstart - a <= t.w_size - ut && (t.match_length = Zt(t, a)), t.match_length >= 3)
if (i = X(t, t.strstart - t.match_start, t.match_length - 3), t.lookahead -= t.match_length, t.match_length <= t.max_lazy_match && t.lookahead >= 3) {
t.match_length--; t.match_length--;
do { do {
t.strstart++, t.ins_h = yt(t, t.ins_h, t.window[t.strstart + 3 - 1]), a = t.prev[t.strstart & t.w_mask] = t.head[t.ins_h], t.head[t.ins_h] = t.strstart t.strstart++, t.ins_h = yt(t, t.ins_h, t.window[t.strstart + 3 - 1]), a = t.prev[t.strstart & t.w_mask] = t.head[t.ins_h], t.head[t.ins_h] = t.strstart
@ -320,7 +394,8 @@
if (i && (zt(t, !1), 0 === t.strm.avail_out)) return 1 if (i && (zt(t, !1), 0 === t.strm.avail_out)) return 1
} }
return t.insert = t.strstart < 2 ? t.strstart : 2, e === V ? (zt(t, !0), 0 === t.strm.avail_out ? 3 : 4) : t.sym_next && (zt(t, !1), 0 === t.strm.avail_out) ? 1 : 2 return t.insert = t.strstart < 2 ? t.strstart : 2, e === V ? (zt(t, !0), 0 === t.strm.avail_out ? 3 : 4) : t.sym_next && (zt(t, !1), 0 === t.strm.avail_out) ? 1 : 2
}, Tt = (t, e) => { },
Tt = (t, e) => {
let a, i, n; let a, i, n;
for (;;) { for (;;) {
if (t.lookahead < ut) { if (t.lookahead < ut) {
@ -329,7 +404,8 @@
} }
if (a = 0, t.lookahead >= 3 && (t.ins_h = yt(t, t.ins_h, t.window[t.strstart + 3 - 1]), a = 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 = 2, 0 !== a && t.prev_length < t.max_lazy_match && t.strstart - a <= t.w_size - ut && (t.match_length = Zt(t, a), t.match_length <= 5 && (t.strategy === rt || 3 === t.match_length && t.strstart - t.match_start > 4096) && (t.match_length = 2)), t.prev_length >= 3 && t.match_length <= t.prev_length) { if (a = 0, t.lookahead >= 3 && (t.ins_h = yt(t, t.ins_h, t.window[t.strstart + 3 - 1]), a = 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 = 2, 0 !== a && t.prev_length < t.max_lazy_match && t.strstart - a <= t.w_size - ut && (t.match_length = Zt(t, a), t.match_length <= 5 && (t.strategy === rt || 3 === t.match_length && t.strstart - t.match_start > 4096) && (t.match_length = 2)), t.prev_length >= 3 && t.match_length <= t.prev_length) {
n = t.strstart + t.lookahead - 3, i = X(t, t.strstart - 1 - t.prev_match, t.prev_length - 3), t.lookahead -= t.prev_length - 1, t.prev_length -= 2; n = t.strstart + t.lookahead - 3, i = X(t, t.strstart - 1 - t.prev_match, t.prev_length - 3), t.lookahead -= t.prev_length - 1, t.prev_length -= 2;
do {++t.strstart <= n && (t.ins_h = yt(t, t.ins_h, t.window[t.strstart + 3 - 1]), a = t.prev[t.strstart & t.w_mask] = t.head[t.ins_h], t.head[t.ins_h] = t.strstart) do {
++t.strstart <= n && (t.ins_h = yt(t, t.ins_h, t.window[t.strstart + 3 - 1]), a = t.prev[t.strstart & t.w_mask] = t.head[t.ins_h], t.head[t.ins_h] = t.strstart)
} while (0 != --t.prev_length); } while (0 != --t.prev_length);
if (t.match_available = 0, t.match_length = 2, t.strstart++, i && (zt(t, !1), 0 === t.strm.avail_out)) return 1 if (t.match_available = 0, t.match_length = 2, t.strstart++, i && (zt(t, !1), 0 === t.strm.avail_out)) return 1
} else if (t.match_available) { } else if (t.match_available) {
@ -351,22 +427,25 @@
if (!t) return 1; if (!t) return 1;
const e = t.state; const e = t.state;
return !e || e.strm !== t || e.status !== wt && 57 !== e.status && 69 !== e.status && 73 !== e.status && 91 !== e.status && 103 !== e.status && e.status !== mt && e.status !== bt ? 1 : 0 return !e || e.strm !== t || e.status !== wt && 57 !== e.status && 69 !== e.status && 73 !== e.status && 91 !== e.status && 103 !== e.status && e.status !== mt && e.status !== bt ? 1 : 0
}, Nt = t => { },
Nt = t => {
if (Lt(t)) return gt(t, at); if (Lt(t)) return gt(t, at);
t.total_in = t.total_out = 0, t.data_type = _t; t.total_in = t.total_out = 0, t.data_type = _t;
const e = t.state; const e = t.state;
return e.pending = 0, e.pending_out = 0, e.wrap < 0 && (e.wrap = -e.wrap), e.status = 2 === e.wrap ? 57 : e.wrap ? wt : mt, t.adler = 2 === e.wrap ? 0 : 1, e.last_flush = -2, P(e), tt return e.pending = 0, e.pending_out = 0, e.wrap < 0 && (e.wrap = -e.wrap), e.status = 2 === e.wrap ? 57 : e.wrap ? wt : mt, t.adler = 2 === e.wrap ? 0 : 1, e.last_flush = -2, P(e), tt
}, Bt = t => { },
Bt = t => {
const e = Nt(t); const e = Nt(t);
var a; var a;
return e === tt && ((a = t.state).window_size = 2 * a.w_size, kt(a.head), a.max_lazy_match = It[a.level].max_lazy, a.good_match = It[a.level].good_length, a.nice_match = It[a.level].nice_length, a.max_chain_length = It[a.level].max_chain, a.strstart = 0, a.block_start = 0, a.lookahead = 0, a.insert = 0, a.match_length = a.prev_length = 2, a.match_available = 0, a.ins_h = 0), e return e === tt && ((a = t.state).window_size = 2 * a.w_size, kt(a.head), a.max_lazy_match = It[a.level].max_lazy, a.good_match = It[a.level].good_length, a.nice_match = It[a.level].nice_length, a.max_chain_length = It[a.level].max_chain, a.strstart = 0, a.block_start = 0, a.lookahead = 0, a.insert = 0, a.match_length = a.prev_length = 2, a.match_available = 0, a.ins_h = 0), e
}, Ct = (t, e, a, i, n, s) => { },
Ct = (t, e, a, i, n, s) => {
if (!t) return at; if (!t) return at;
let r = 1; let r = 1;
if (e === st && (e = 6), i < 0 ? (r = 0, i = -i) : i > 15 && (r = 2, i -= 16), n < 1 || n > 9 || a !== ft || i < 8 || i > 15 || e < 0 || e > 9 || s < 0 || s > ht || 8 === i && 1 !== r) return gt(t, at); if (e === st && (e = 6), i < 0 ? (r = 0, i = -i) : i > 15 && (r = 2, i -= 16), n < 1 || n > 9 || a !== ft || i < 8 || i > 15 || e < 0 || e > 9 || s < 0 || s > ht || 8 === i && 1 !== r) return gt(t, at);
8 === i && (i = 9); 8 === i && (i = 9);
const o = new Ft; const o = new Ft;
return t.state = o, o.strm = t, o.status = wt, o.wrap = r, o.gzhead = null, o.w_bits = i, o.w_size = 1 << o.w_bits, o.w_mask = o.w_size - 1, o.hash_bits = n + 7, o.hash_size = 1 << o.hash_bits, o.hash_mask = o.hash_size - 1, o.hash_shift = ~~ ((o.hash_bits + 3 - 1) / 3), o.window = new Uint8Array(2 * o.w_size), o.head = new Uint16Array(o.hash_size), o.prev = new Uint16Array(o.w_size), o.lit_bufsize = 1 << n + 6, o.pending_buf_size = 4 * o.lit_bufsize, o.pending_buf = new Uint8Array(o.pending_buf_size), o.sym_buf = o.lit_bufsize, o.sym_end = 3 * (o.lit_bufsize - 1), o.level = e, o.strategy = s, o.method = a, Bt(t) return t.state = o, o.strm = t, o.status = wt, o.wrap = r, o.gzhead = null, o.w_bits = i, o.w_size = 1 << o.w_bits, o.w_mask = o.w_size - 1, o.hash_bits = n + 7, o.hash_size = 1 << o.hash_bits, o.hash_mask = o.hash_size - 1, o.hash_shift = ~~((o.hash_bits + 3 - 1) / 3), o.window = new Uint8Array(2 * o.w_size), o.head = new Uint16Array(o.hash_size), o.prev = new Uint16Array(o.w_size), o.lit_bufsize = 1 << n + 6, o.pending_buf_size = 4 * o.lit_bufsize, o.pending_buf = new Uint8Array(o.pending_buf_size), o.sym_buf = o.lit_bufsize, o.sym_end = 3 * (o.lit_bufsize - 1), o.level = e, o.strategy = s, o.method = a, Bt(t)
}; };
var Mt = { var Mt = {
deflateInit: (t, e) => Ct(t, e, ft, 15, 8, dt), deflateInit: (t, e) => Ct(t, e, ft, 15, 8, dt),
@ -384,14 +463,17 @@
} else if (0 === t.avail_in && pt(e) <= pt(i) && e !== V) return gt(t, nt); } else if (0 === t.avail_in && pt(e) <= pt(i) && e !== V) return gt(t, nt);
if (a.status === bt && 0 !== t.avail_in) return gt(t, nt); if (a.status === bt && 0 !== t.avail_in) return gt(t, nt);
if (a.status === wt && 0 === a.wrap && (a.status = mt), a.status === wt) { if (a.status === wt && 0 === a.wrap && (a.status = mt), a.status === wt) {
let e = ft + (a.w_bits - 8 << 4) << 8, i = -1; let e = ft + (a.w_bits - 8 << 4) << 8,
i = -1;
if (i = a.strategy >= ot || a.level < 2 ? 0 : a.level < 6 ? 1 : 6 === a.level ? 2 : 3, e |= i << 6, 0 !== a.strstart && (e |= 32), e += 31 - e % 31, Et(a, e), 0 !== a.strstart && (Et(a, t.adler >>> 16), Et(a, 65535 & t.adler)), t.adler = 1, a.status = mt, xt(t), 0 !== a.pending) return a.last_flush = -1, tt if (i = a.strategy >= ot || a.level < 2 ? 0 : a.level < 6 ? 1 : 6 === a.level ? 2 : 3, e |= i << 6, 0 !== a.strstart && (e |= 32), e += 31 - e % 31, Et(a, e), 0 !== a.strstart && (Et(a, t.adler >>> 16), Et(a, 65535 & t.adler)), t.adler = 1, a.status = mt, xt(t), 0 !== a.pending) return a.last_flush = -1, tt
} }
if (57 === a.status) if (t.adler = 0, At(a, 31), At(a, 139), At(a, 8), a.gzhead) At(a, (a.gzhead.text ? 1 : 0) + (a.gzhead.hcrc ? 2 : 0) + (a.gzhead.extra ? 4 : 0) + (a.gzhead.name ? 8 : 0) + (a.gzhead.comment ? 16 : 0)), At(a, 255 & a.gzhead.time), At(a, a.gzhead.time >> 8 & 255), At(a, a.gzhead.time >> 16 & 255), At(a, a.gzhead.time >> 24 & 255), At(a, 9 === a.level ? 2 : a.strategy >= ot || a.level < 2 ? 4 : 0), At(a, 255 & a.gzhead.os), a.gzhead.extra && a.gzhead.extra.length && (At(a, 255 & a.gzhead.extra.length), At(a, a.gzhead.extra.length >> 8 & 255)), a.gzhead.hcrc && (t.adler = H(t.adler, a.pending_buf, a.pending, 0)), a.gzindex = 0, a.status = 69; if (57 === a.status)
if (t.adler = 0, At(a, 31), At(a, 139), At(a, 8), a.gzhead) At(a, (a.gzhead.text ? 1 : 0) + (a.gzhead.hcrc ? 2 : 0) + (a.gzhead.extra ? 4 : 0) + (a.gzhead.name ? 8 : 0) + (a.gzhead.comment ? 16 : 0)), At(a, 255 & a.gzhead.time), At(a, a.gzhead.time >> 8 & 255), At(a, a.gzhead.time >> 16 & 255), At(a, a.gzhead.time >> 24 & 255), At(a, 9 === a.level ? 2 : a.strategy >= ot || a.level < 2 ? 4 : 0), At(a, 255 & a.gzhead.os), a.gzhead.extra && a.gzhead.extra.length && (At(a, 255 & a.gzhead.extra.length), At(a, a.gzhead.extra.length >> 8 & 255)), a.gzhead.hcrc && (t.adler = H(t.adler, a.pending_buf, a.pending, 0)), a.gzindex = 0, a.status = 69;
else if (At(a, 0), At(a, 0), At(a, 0), At(a, 0), At(a, 0), At(a, 9 === a.level ? 2 : a.strategy >= ot || a.level < 2 ? 4 : 0), At(a, 3), a.status = mt, xt(t), 0 !== a.pending) return a.last_flush = -1, tt; else if (At(a, 0), At(a, 0), At(a, 0), At(a, 0), At(a, 0), At(a, 9 === a.level ? 2 : a.strategy >= ot || a.level < 2 ? 4 : 0), At(a, 3), a.status = mt, xt(t), 0 !== a.pending) return a.last_flush = -1, tt;
if (69 === a.status) { if (69 === a.status) {
if (a.gzhead.extra) { if (a.gzhead.extra) {
let e = a.pending, i = (65535 & a.gzhead.extra.length) - a.gzindex; let e = a.pending,
i = (65535 & a.gzhead.extra.length) - a.gzindex;
for (; a.pending + i > a.pending_buf_size;) { for (; a.pending + i > a.pending_buf_size;) {
let n = a.pending_buf_size - a.pending; let n = a.pending_buf_size - a.pending;
if (a.pending_buf.set(a.gzhead.extra.subarray(a.gzindex, a.gzindex + n), a.pending), a.pending = a.pending_buf_size, a.gzhead.hcrc && a.pending > e && (t.adler = H(t.adler, a.pending_buf, a.pending - e, e)), a.gzindex += n, xt(t), 0 !== a.pending) return a.last_flush = -1, tt; if (a.pending_buf.set(a.gzhead.extra.subarray(a.gzindex, a.gzindex + n), a.pending), a.pending = a.pending_buf_size, a.gzhead.hcrc && a.pending > e && (t.adler = H(t.adler, a.pending_buf, a.pending - e, e)), a.gzindex += n, xt(t), 0 !== a.pending) return a.last_flush = -1, tt;
@ -478,16 +560,20 @@
deflateSetDictionary: (t, e) => { deflateSetDictionary: (t, e) => {
let a = e.length; let a = e.length;
if (Lt(t)) return at; if (Lt(t)) return at;
const i = t.state, n = i.wrap; const i = t.state,
n = i.wrap;
if (2 === n || 1 === n && i.status !== wt || i.lookahead) return at; if (2 === n || 1 === n && i.status !== wt || i.lookahead) return at;
if (1 === n && (t.adler = C(t.adler, e, a, 0)), i.wrap = 0, a >= i.w_size) { if (1 === n && (t.adler = C(t.adler, e, a, 0)), i.wrap = 0, a >= i.w_size) {
0 === n && (kt(i.head), i.strstart = 0, i.block_start = 0, i.insert = 0); 0 === n && (kt(i.head), i.strstart = 0, i.block_start = 0, i.insert = 0);
let t = new Uint8Array(i.w_size); let t = new Uint8Array(i.w_size);
t.set(e.subarray(a - i.w_size, a), 0), e = t, a = i.w_size t.set(e.subarray(a - i.w_size, a), 0), e = t, a = i.w_size
} }
const s = t.avail_in, r = t.next_in, o = t.input; const s = t.avail_in,
r = t.next_in,
o = t.input;
for (t.avail_in = a, t.next_in = 0, t.input = e, Ut(i); i.lookahead >= 3;) { for (t.avail_in = a, t.next_in = 0, t.input = e, Ut(i); i.lookahead >= 3;) {
let t = i.strstart, e = i.lookahead - 2; let t = i.strstart,
e = i.lookahead - 2;
do { do {
i.ins_h = yt(i, i.ins_h, i.window[t + 3 - 1]), i.prev[t & i.w_mask] = i.head[i.ins_h], i.head[i.ins_h] = t, t++ i.ins_h = yt(i, i.ins_h, i.window[t + 3 - 1]), i.prev[t & i.w_mask] = i.head[i.ins_h], i.head[i.ins_h] = t, t++
} while (--e); } while (--e);
@ -508,7 +594,8 @@
} }
} }
return t return t
}, Kt = t => { },
Kt = t => {
let e = 0; let e = 0;
for (let a = 0, i = t.length; a < i; a++) e += t[a].length; for (let a = 0, i = t.length; a < i; a++) e += t[a].length;
const a = new Uint8Array(e); const a = new Uint8Array(e);
@ -529,11 +616,13 @@
Yt[254] = Yt[254] = 1; Yt[254] = Yt[254] = 1;
var Gt = t => { var Gt = t => {
if ("function" == typeof TextEncoder && TextEncoder.prototype.encode) return (new TextEncoder).encode(t); if ("function" == typeof TextEncoder && TextEncoder.prototype.encode) return (new TextEncoder).encode(t);
let e, a, i, n, s, r = t.length, o = 0; let e, a, i, n, s, r = t.length,
o = 0;
for (n = 0; n < r; n++) a = t.charCodeAt(n), 55296 == (64512 & a) && n + 1 < r && (i = t.charCodeAt(n + 1), 56320 == (64512 & i) && (a = 65536 + (a - 55296 << 10) + (i - 56320), n++)), o += a < 128 ? 1 : a < 2048 ? 2 : a < 65536 ? 3 : 4; for (n = 0; n < r; n++) a = t.charCodeAt(n), 55296 == (64512 & a) && n + 1 < r && (i = t.charCodeAt(n + 1), 56320 == (64512 & i) && (a = 65536 + (a - 55296 << 10) + (i - 56320), n++)), o += a < 128 ? 1 : a < 2048 ? 2 : a < 65536 ? 3 : 4;
for (e = new Uint8Array(o), s = 0, n = 0; s < o; n++) a = t.charCodeAt(n), 55296 == (64512 & a) && n + 1 < r && (i = t.charCodeAt(n + 1), 56320 == (64512 & i) && (a = 65536 + (a - 55296 << 10) + (i - 56320), n++)), a < 128 ? e[s++] = a : a < 2048 ? (e[s++] = 192 | a >>> 6, e[s++] = 128 | 63 & a) : a < 65536 ? (e[s++] = 224 | a >>> 12, e[s++] = 128 | a >>> 6 & 63, e[s++] = 128 | 63 & a) : (e[s++] = 240 | a >>> 18, e[s++] = 128 | a >>> 12 & 63, e[s++] = 128 | a >>> 6 & 63, e[s++] = 128 | 63 & a); for (e = new Uint8Array(o), s = 0, n = 0; s < o; n++) a = t.charCodeAt(n), 55296 == (64512 & a) && n + 1 < r && (i = t.charCodeAt(n + 1), 56320 == (64512 & i) && (a = 65536 + (a - 55296 << 10) + (i - 56320), n++)), a < 128 ? e[s++] = a : a < 2048 ? (e[s++] = 192 | a >>> 6, e[s++] = 128 | 63 & a) : a < 65536 ? (e[s++] = 224 | a >>> 12, e[s++] = 128 | a >>> 6 & 63, e[s++] = 128 | 63 & a) : (e[s++] = 240 | a >>> 18, e[s++] = 128 | a >>> 12 & 63, e[s++] = 128 | a >>> 6 & 63, e[s++] = 128 | 63 & a);
return e return e
}, Xt = (t, e) => { },
Xt = (t, e) => {
const a = e || t.length; const a = e || t.length;
if ("function" == typeof TextDecoder && TextDecoder.prototype.decode) return (new TextDecoder).decode(t.subarray(0, e)); if ("function" == typeof TextDecoder && TextDecoder.prototype.decode) return (new TextDecoder).decode(t.subarray(0, e));
let i, n; let i, n;
@ -557,7 +646,8 @@
for (let i = 0; i < e; i++) a += String.fromCharCode(t[i]); for (let i = 0; i < e; i++) a += String.fromCharCode(t[i]);
return a return a
})(s, n) })(s, n)
}, Wt = (t, e) => { },
Wt = (t, e) => {
(e = e || t.length) > t.length && (e = t.length); (e = e || t.length) > t.length && (e = t.length);
let a = e - 1; let a = e - 1;
for (; a >= 0 && 128 == (192 & t[a]);) a--; for (; a >= 0 && 128 == (192 & t[a]);) a--;
@ -566,7 +656,8 @@
var qt = function() { var qt = function() {
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 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
}; };
const Jt = Object.prototype.toString, { const Jt = Object.prototype.toString,
{
Z_NO_FLUSH: Qt, Z_NO_FLUSH: Qt,
Z_SYNC_FLUSH: Vt, Z_SYNC_FLUSH: Vt,
Z_FULL_FLUSH: $t, Z_FULL_FLUSH: $t,
@ -597,24 +688,26 @@
this._dict_set = !0 this._dict_set = !0
} }
} }
function oe(t, e) { function oe(t, e) {
const a = new re(e); const a = new re(e);
if (a.push(t, !0), a.err) throw a.msg || j[a.err]; if (a.push(t, !0), a.err) throw a.msg || j[a.err];
return a.result return a.result
} }
re.prototype.push = function(t, e) { re.prototype.push = function(t, e) {
const a = this.strm, i = this.options.chunkSize; const a = this.strm,
i = this.options.chunkSize;
let n, s; let n, s;
if (this.ended) return !1; if (this.ended) return !1;
for (s = e === ~~e ? e : !0 === e ? te : Qt, "string" == typeof t ? a.input = Gt(t) : "[object ArrayBuffer]" === Jt.call(t) ? a.input = new Uint8Array(t) : a.input = t, a.next_in = 0, a.avail_in = a.input.length;;) if (0 === a.avail_out && (a.output = new Uint8Array(i), a.next_out = 0, a.avail_out = i), (s === Vt || s === $t) && a.avail_out <= 6) this.onData(a.output.subarray(0, a.next_out)), a.avail_out = 0; for (s = e === ~~e ? e : !0 === e ? te : Qt, "string" == typeof t ? a.input = Gt(t) : "[object ArrayBuffer]" === Jt.call(t) ? a.input = new Uint8Array(t) : a.input = t, a.next_in = 0, a.avail_in = a.input.length;;)
if (0 === a.avail_out && (a.output = new Uint8Array(i), a.next_out = 0, a.avail_out = i), (s === Vt || s === $t) && a.avail_out <= 6) this.onData(a.output.subarray(0, a.next_out)), a.avail_out = 0;
else { else {
if (n = Mt.deflate(a, s), n === ae) return a.next_out > 0 && this.onData(a.output.subarray(0, a.next_out)), n = Mt.deflateEnd(this.strm), this.onEnd(n), this.ended = !0, n === ee; if (n = Mt.deflate(a, s), n === ae) return a.next_out > 0 && this.onData(a.output.subarray(0, a.next_out)), n = Mt.deflateEnd(this.strm), this.onEnd(n), this.ended = !0, n === ee;
if (0 !== a.avail_out) { if (0 !== a.avail_out) {
if (s > 0 && a.next_out > 0) this.onData(a.output.subarray(0, a.next_out)), a.avail_out = 0; if (s > 0 && a.next_out > 0) this.onData(a.output.subarray(0, a.next_out)), a.avail_out = 0;
else if (0 === a.avail_in) break else if (0 === a.avail_in) break
} else this.onData(a.output) } else this.onData(a.output)
} } return !0
return !0
}, re.prototype.onData = function(t) { }, re.prototype.onData = function(t) {
this.chunks.push(t) this.chunks.push(t)
}, re.prototype.onEnd = function(t) { }, re.prototype.onEnd = function(t) {
@ -718,18 +811,34 @@
} while (a < i && n < r); } while (a < i && n < r);
k = c >> 3, a -= k, c -= k << 3, f &= (1 << c) - 1, t.next_in = a, t.next_out = n, t.avail_in = a < i ? i - a + 5 : 5 - (a - i), t.avail_out = n < r ? r - n + 257 : 257 - (n - r), E.hold = f, E.bits = c k = c >> 3, a -= k, c -= k << 3, f &= (1 << c) - 1, t.next_in = a, t.next_out = n, t.avail_in = a < i ? i - a + 5 : 5 - (a - i), t.avail_out = n < r ? r - n + 257 : 257 - (n - r), E.hold = f, E.bits = c
}; };
const _e = 15, fe = new Uint16Array([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]), ce = new Uint8Array([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]), ue = new Uint16Array([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]), we = new Uint8Array([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]); const _e = 15,
fe = new Uint16Array([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]),
ce = new Uint8Array([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]),
ue = new Uint16Array([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]),
we = new Uint8Array([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]);
var me = (t, e, a, i, n, s, r, o) => { var me = (t, e, a, i, n, s, r, o) => {
const l = o.bits; const l = o.bits;
let h, d, _, f, c, u, w = 0, m = 0, b = 0, g = 0, p = 0, k = 0, v = 0, y = 0, x = 0, z = 0, A = null; let h, d, _, f, c, u, w = 0,
const E = new Uint16Array(16), R = new Uint16Array(16); m = 0,
b = 0,
g = 0,
p = 0,
k = 0,
v = 0,
y = 0,
x = 0,
z = 0,
A = null;
const E = new Uint16Array(16),
R = new Uint16Array(16);
let Z, U, S, D = null; let Z, U, S, D = null;
for (w = 0; w <= _e; w++) E[w] = 0; for (w = 0; w <= _e; w++) E[w] = 0;
for (m = 0; m < i; m++) E[e[a + m]]++; for (m = 0; m < i; m++) E[e[a + m]]++;
for (p = l, g = _e; g >= 1 && 0 === E[g]; g--); for (p = l, g = _e; g >= 1 && 0 === E[g]; g--);
if (p > g && (p = g), 0 === g) return n[s++] = 20971520, n[s++] = 20971520, o.bits = 1, 0; if (p > g && (p = g), 0 === g) return n[s++] = 20971520, n[s++] = 20971520, o.bits = 1, 0;
for (b = 1; b < g && 0 === E[b]; b++); for (b = 1; b < g && 0 === E[b]; b++);
for (p < b && (p = b), y = 1, w = 1; w <= _e; w++) if (y <<= 1, y -= E[w], y < 0) return -1; for (p < b && (p = b), y = 1, w = 1; w <= _e; w++)
if (y <<= 1, y -= E[w], y < 0) return -1;
if (y > 0 && (0 === t || 1 !== g)) return -1; if (y > 0 && (0 === t || 1 !== g)) return -1;
for (R[1] = 0, w = 1; w < _e; w++) R[w + 1] = R[w] + E[w]; for (R[1] = 0, w = 1; w < _e; w++) R[w + 1] = R[w] + E[w];
for (m = 0; m < i; m++) 0 !== e[a + m] && (r[R[e[a + m]]++] = m); for (m = 0; m < i; m++) 0 !== e[a + m] && (r[R[e[a + m]]++] = m);
@ -773,20 +882,24 @@
if (!t) return 1; if (!t) return 1;
const e = t.state; const e = t.state;
return !e || e.strm !== t || e.mode < Ze || e.mode > 16211 ? 1 : 0 return !e || e.strm !== t || e.mode < Ze || e.mode > 16211 ? 1 : 0
}, Me = t => { },
Me = t => {
if (Ce(t)) return xe; if (Ce(t)) return xe;
const e = t.state; const e = t.state;
return t.total_in = t.total_out = e.total = 0, t.msg = "", e.wrap && (t.adler = 1 & e.wrap), e.mode = Ze, e.last = 0, e.havedict = 0, e.flags = -1, e.dmax = 32768, e.head = null, e.hold = 0, e.bits = 0, e.lencode = e.lendyn = new Int32Array(852), e.distcode = e.distdyn = new Int32Array(592), e.sane = 1, e.back = -1, ke return t.total_in = t.total_out = e.total = 0, t.msg = "", e.wrap && (t.adler = 1 & e.wrap), e.mode = Ze, e.last = 0, e.havedict = 0, e.flags = -1, e.dmax = 32768, e.head = null, e.hold = 0, e.bits = 0, e.lencode = e.lendyn = new Int32Array(852), e.distcode = e.distdyn = new Int32Array(592), e.sane = 1, e.back = -1, ke
}, He = t => { },
He = t => {
if (Ce(t)) return xe; if (Ce(t)) return xe;
const e = t.state; const e = t.state;
return e.wsize = 0, e.whave = 0, e.wnext = 0, Me(t) return e.wsize = 0, e.whave = 0, e.wnext = 0, Me(t)
}, je = (t, e) => { },
je = (t, e) => {
let a; let a;
if (Ce(t)) return xe; if (Ce(t)) return xe;
const i = t.state; const i = t.state;
return e < 0 ? (a = 0, e = -e) : (a = 5 + (e >> 4), e < 48 && (e &= 15)), e && (e < 8 || e > 15) ? xe : (null !== i.window && i.wbits !== e && (i.window = null), i.wrap = a, i.wbits = e, He(t)) return e < 0 ? (a = 0, e = -e) : (a = 5 + (e >> 4), e < 48 && (e &= 15)), e && (e < 8 || e > 15) ? xe : (null !== i.window && i.wbits !== e && (i.window = null), i.wrap = a, i.wbits = e, He(t))
}, Ke = (t, e) => { },
Ke = (t, e) => {
if (!t) return xe; if (!t) return xe;
const a = new Be; const a = new Be;
t.state = a, a.strm = t, a.window = null, a.mode = Ze; t.state = a, a.strm = t, a.window = null, a.mode = Ze;
@ -810,7 +923,8 @@
}), Ge = !1 }), Ge = !1
} }
t.lencode = Pe, t.lenbits = 9, t.distcode = Ye, t.distbits = 5 t.lencode = Pe, t.lenbits = 9, t.distcode = Ye, t.distbits = 5
}, We = (t, e, a, i) => { },
We = (t, e, a, i) => {
let n; let n;
const s = t.state; const s = t.state;
return null === s.window && (s.wsize = 1 << s.wbits, s.wnext = 0, s.whave = 0, s.window = new Uint8Array(s.wsize)), i >= s.wsize ? (s.window.set(e.subarray(a - s.wsize, a), 0), s.wnext = 0, s.whave = s.wsize) : (n = s.wsize - s.wnext, n > i && (n = i), s.window.set(e.subarray(a - i, a - i + n), s.wnext), (i -= n) ? (s.window.set(e.subarray(a - i, a), 0), s.wnext = i, s.whave = s.wsize) : (s.wnext += n, s.wnext === s.wsize && (s.wnext = 0), s.whave < s.wsize && (s.whave += n))), 0 return null === s.window && (s.wsize = 1 << s.wbits, s.wnext = 0, s.whave = 0, s.window = new Uint8Array(s.wsize)), i >= s.wsize ? (s.window.set(e.subarray(a - s.wsize, a), 0), s.wnext = 0, s.whave = s.wsize) : (n = s.wsize - s.wnext, n > i && (n = i), s.window.set(e.subarray(a - i, a - i + n), s.wnext), (i -= n) ? (s.window.set(e.subarray(a - i, a), 0), s.wnext = i, s.whave = s.wsize) : (s.wnext += n, s.wnext === s.wsize && (s.wnext = 0), s.whave < s.wsize && (s.whave += n))), 0
@ -1194,22 +1308,7 @@
default: default:
return xe return xe
} }
return t.next_out = r, return t.next_out = r, t.avail_out = l, t.next_in = s, t.avail_in = o, a.hold = h, a.bits = d, (a.wsize || f !== t.avail_out && a.mode < Le && (a.mode < Fe || e !== be)) && We(t, t.output, t.next_out, f - t.avail_out), _ -= t.avail_in, f -= t.avail_out, t.total_in += _, t.total_out += f, a.total += f, 4 & a.wrap && f && (t.adler = a.check = a.flags ? H(a.check, n, f, t.next_out - f) : C(a.check, n, f, t.next_out - f)), t.data_type = a.bits + (a.last ? 64 : 0) + (a.mode === Se ? 128 : 0) + (a.mode === Oe || a.mode === Te ? 256 : 0), (0 === _ && 0 === f || e === be) && x === ke && (x = Ee), x
t.avail_out = l,
t.next_in = s,
t.avail_in = o,
a.hold = h,
a.bits = d,
(a.wsize || f !== t.avail_out && a.mode < Le && (a.mode < Fe || e !== be)) && We(t, t.output, t.next_out, f - t.avail_out),
_ -= t.avail_in,
f -= t.avail_out,
t.total_in += _,
t.total_out += f,
a.total += f,
4 & a.wrap && f && (t.adler = a.check = a.flags ? H(a.check, n, f, t.next_out - f) : C(a.check, n, f, t.next_out - f)),
t.data_type = a.bits + (a.last ? 64 : 0) + (a.mode === Se ? 128 : 0) + (a.mode === Oe || a.mode === Te ? 256 : 0),
(0 === _ && 0 === f || e === be) && x === ke && (x = Ee),
x
}, },
inflateEnd: t => { inflateEnd: t => {
if (Ce(t)) return xe; if (Ce(t)) return xe;
@ -1231,7 +1330,8 @@
var Je = function() { var Je = function() {
this.text = 0, this.time = 0, this.xflags = 0, this.os = 0, this.extra = null, this.extra_len = 0, this.name = "", this.comment = "", this.hcrc = 0, this.done = !1 this.text = 0, this.time = 0, this.xflags = 0, this.os = 0, this.extra = null, this.extra_len = 0, this.name = "", this.comment = "", this.hcrc = 0, this.done = !1
}; };
const Qe = Object.prototype.toString, { const Qe = Object.prototype.toString,
{
Z_NO_FLUSH: Ve, Z_NO_FLUSH: Ve,
Z_FINISH: $e, Z_FINISH: $e,
Z_OK: ta, Z_OK: ta,
@ -1254,13 +1354,16 @@
if (a !== ta) throw new Error(j[a]); if (a !== ta) throw new Error(j[a]);
if (this.header = new Je, qe.inflateGetHeader(this.strm, this.header), e.dictionary && ("string" == typeof e.dictionary ? e.dictionary = Gt(e.dictionary) : "[object ArrayBuffer]" === Qe.call(e.dictionary) && (e.dictionary = new Uint8Array(e.dictionary)), e.raw && (a = qe.inflateSetDictionary(this.strm, e.dictionary), a !== ta))) throw new Error(j[a]) if (this.header = new Je, qe.inflateGetHeader(this.strm, this.header), e.dictionary && ("string" == typeof e.dictionary ? e.dictionary = Gt(e.dictionary) : "[object ArrayBuffer]" === Qe.call(e.dictionary) && (e.dictionary = new Uint8Array(e.dictionary)), e.raw && (a = qe.inflateSetDictionary(this.strm, e.dictionary), a !== ta))) throw new Error(j[a])
} }
function oa(t, e) { function oa(t, e) {
const a = new ra(e); const a = new ra(e);
if (a.push(t), a.err) throw a.msg || j[a.err]; if (a.push(t), a.err) throw a.msg || j[a.err];
return a.result return a.result
} }
ra.prototype.push = function(t, e) { ra.prototype.push = function(t, e) {
const a = this.strm, i = this.options.chunkSize, n = this.options.dictionary; const a = this.strm,
i = this.options.chunkSize,
n = this.options.dictionary;
let s, r, o; let s, r, o;
if (this.ended) return !1; if (this.ended) return !1;
for (r = e === ~~e ? e : !0 === e ? $e : Ve, "[object ArrayBuffer]" === Qe.call(t) ? a.input = new Uint8Array(t) : a.input = t, a.next_in = 0, a.avail_in = a.input.length;;) { for (r = e === ~~e ? e : !0 === e ? $e : Ve, "[object ArrayBuffer]" === Qe.call(t) ? a.input = new Uint8Array(t) : a.input = t, a.next_in = 0, a.avail_in = a.input.length;;) {
@ -1272,8 +1375,11 @@
case sa: case sa:
return this.onEnd(s), this.ended = !0, !1 return this.onEnd(s), this.ended = !0, !1
} }
if (o = a.avail_out, a.next_out && (0 === a.avail_out || s === ea)) if ("string" === this.options.to) { if (o = a.avail_out, a.next_out && (0 === a.avail_out || s === ea))
let t = Wt(a.output, a.next_out), e = a.next_out - t, n = Xt(a.output, t); if ("string" === this.options.to) {
let t = Wt(a.output, a.next_out),
e = a.next_out - t,
n = Xt(a.output, t);
a.next_out = e, a.avail_out = i - e, e && a.output.set(a.output.subarray(t, t + e), 0), this.onData(n) a.next_out = e, a.avail_out = i - e, e && a.output.set(a.output.subarray(t, t + e), 0), this.onData(n)
} else this.onData(a.output.length === a.next_out ? a.output : a.output.subarray(0, a.next_out)); } else this.onData(a.output.length === a.next_out ? a.output : a.output.subarray(0, a.next_out));
if (s !== ta || 0 !== o) { if (s !== ta || 0 !== o) {
@ -1327,8 +1433,7 @@
ungzip: za, ungzip: za,
constants: Aa constants: Aa
}; };
t.Deflate = ba, t.Inflate = va, t.constants = Aa, t. t.Deflate = ba, t.Inflate = va, t.constants = Aa, t.default = Ea, t.deflate = ga, t.deflateRaw = pa, t.gzip = ka, t.inflate = ya, t.inflateRaw = xa, t.ungzip = za, Object.defineProperty(t, "__esModule", {
default = Ea, t.deflate = ga, t.deflateRaw = pa, t.gzip = ka, t.inflate = ya, t.inflateRaw = xa, t.ungzip = za, Object.defineProperty(t, "__esModule", {
value: !0 value: !0
}) })
})); }));

View File

@ -424,5 +424,6 @@ function getMubans() {
var mubanDict = getMubans(); var mubanDict = getMubans();
var muban = getMubans(); var muban = getMubans();
export default { export default {
muban, getMubans muban,
getMubans
}; };