Lines Matching +full:k +full:- +full:lite

80 // eslint-disable-next-line no-control-regex
83 var escapeSequencesRegExp = /[\x00-\x08\x0b\x0c\x0e-\x1f]/g;
186 /* eslint-disable no-restricted-properties */
191 } // eslint-disable-next-line eqeqeq
203 }; // The non-equality assertion tests for whether two objects are not
210 } // eslint-disable-next-line eqeqeq
241 }; // The non-equivalence assertion tests for any deep inequality.
261 /* eslint-enable */
549 …for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 <…
550 args[_key2 - 1] = arguments[_key2];
557 …for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 <…
558 args[_key3 - 1] = arguments[_key3];
567 …for (var _len4 = arguments.length, args = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 <…
568 args[_key4 - 1] = arguments[_key4];
575 …for (var _len5 = arguments.length, args = new Array(_len5 > 1 ? _len5 - 1 : 0), _key5 = 1; _key5 <…
576 args[_key5 - 1] = arguments[_key5];
621 if (pos !== -1) {
675 … (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been …
685 function _isNativeFunction(fn) { return Function.toString.call(fn).indexOf("[native code]") !== -1;…
697 … = _require2.codes.ERR_INVALID_ARG_TYPE; // https://developer.mozilla.org/en-US/docs/Web/JavaScrip…
705 return str.substring(this_len - search.length, this_len) === search;
706 } // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/repeat
717 count--;
720 str += str.substring(0, maxCount - str.length);
729 deepStrictEqual: 'Expected values to be strictly deep-equal:',
731 strictEqualObject: 'Expected "actual" to be reference-equal to "expected":',
732 deepEqual: 'Expected values to be loosely deep-equal:',
734 notDeepStrictEqual: 'Expected "actual" not to be strictly deep-equal to:',
736 notStrictEqualObject: 'Expected "actual" not to be reference-equal to "expected":',
737 notDeepEqual: 'Expected "actual" not to be loosely deep-equal to:',
739 notIdentical: 'Values identical but not reference-equal:'
807 // -0 === +0
834 var a = actualLines[actualLines.length - 1];
835 var b = expectedLines[expectedLines.length - 1];
847 a = actualLines[actualLines.length - 1];
848 b = expectedLines[expectedLines.length - 1];
882 …[operator] + "\n".concat(green, "+ actual").concat(white, " ").concat(red, "- expected").concat(wh…
887 var cur = i - lastPos;
898 res += "\n ".concat(expectedLines[i - 2]);
902 res += "\n ".concat(expectedLines[i - 1]);
909 other += "\n".concat(red, "-").concat(white, " ").concat(expectedLines[i]);
920 res += "\n ".concat(actualLines[i - 2]);
924 res += "\n ".concat(actualLines[i - 1]);
939 …Line !== expectedLine && (!endsWith(actualLine, ',') || actualLine.slice(0, -1) !== expectedLine);…
949 … if (divergingLines && endsWith(expectedLine, ',') && expectedLine.slice(0, -1) === actualLine) {
963 res += "\n ".concat(actualLines[i - 2]);
967 res += "\n ".concat(actualLines[i - 1]);
973 // line so consecutive diverging lines show up as +++--- and not +-+-+-.
976 other += "\n".concat(red, "-").concat(white, " ").concat(expectedLine);
993 if (printedLines > 20 && i < maxLines - 2) {
1126 // eslint-disable-next-line no-restricted-syntax
1170 /* eslint node-core/documented-errors: "error" */
1172 /* eslint node-core/alphabetize-errors: "error" */
1174 /* eslint node-core/prefer-util-format-errors: "error" */
1176 // longer be forced to treat every error message change as a semver-major
1187 … (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been …
1243 …e of ".concat(thing, " ").concat(expected.slice(0, len - 1).join(', '), ", or ") + expected[len -
1252 } // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/starts…
1257 } // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWi…
1265 return str.substring(this_len - search.length, this_len) === search;
1266 } // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includ…
1277 return str.indexOf(search, start) !== -1;
1354 msg += args.slice(0, len - 1).join(', ');
1355 msg += ", and ".concat(args[len - 1], " arguments");
1375 function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable inst…
1438 } // The maximum size for an array is 2 ** 32 -1.
1474 return -1;
1543 // See https://tc39.github.io/ecma262/#sec-object.prototype.tostring
1544 // for a list of tags pre-defined in the spec.
1556 // a) The same built-in type tags
1583 // eslint-disable-next-line eqeqeq
1687 return keys.filter(function (k) {
1688 return propertyIsEnumerable(val, k);
1804 } // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Equality_comparisons_and_sameness#…
1876 // hunting for something thats deep-(strict-)equal to it. To make this
2072 exports.NS = 5; // Non-starters
2087 exports.ZW = 20; // Zero-width space
2108 exports.SA = 39; // South-East Asian
2128 // Based on example pair table from https://www.unicode.org/reports/tr14/tr14-37.html#Table2
2129 // - ZWJ special processing for LB8a of Revision 41
2130 // - CB manually added as per Rule LB20
2131 // - CL, CP, NS, SY, IS, PR, PO, HY, BA, B2 and RI manually adjusted as per LB22 of Revision 45
2247 …throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, n…
2248 …yLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object…
2495 for (var i = 0, end = buf.length - 1; i < end; i += 2) {
2623 for (var i = 0, end = buf.length - 1; i < end; i += 2) {
2633 throw new Error('Install iconv-lite to enable additional string encodings.');
2725 if (index === -1) {
2842 if (this.type[this.type.length - 1] !== '8') {
3007 relative = stream.pos - this.offsetType.size();
3105 this.offsetType.encode(stream, ctx.pointerOffset - relative);
3198 length = pos - stream.pos;
3313 res._currentOffset = stream.pos - res._startOffset;
3560 /* eslint-disable no-proto */
3613 … (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been …
3618 …of Symbol === 'function' && typeof Symbol['for'] === 'function' // eslint-disable-line dot-notation
3619 ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation
3637 * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array`
3689 * and the `Uint8Array` methods. Square bracket notation works as expected -- it
3715 …gument must be one of type string, Buffer, ArrayBuffer, Array, ' + 'or Array-like Object. Received…
3735 …gument must be one of type string, Buffer, ArrayBuffer, Array, ' + 'or Array-like Object. Received…
3788 * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance.
3794 * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance.
3882 // eslint-disable-line eqeqeq
3907 if (x < y) return -1;
3915 case 'utf-8':
3921 case 'ucs-2':
3923 case 'utf-16le':
3986 case 'utf-8':
3989 case 'ucs-2':
3991 case 'utf-16le':
3999 return mustMatch ? -1 : utf8ToBytes(string).length; // assume utf8
4011 // No need to verify that "this.length <= MAX_UINT32" since it's a read-only
4016 // undefined is handled specially as per ECMA-262 6th Edition,
4045 case 'utf-8':
4055 case 'ucs-2':
4057 case 'utf-16le':
4067 // This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package)
4082 throw new RangeError('Buffer size must be a multiple of 16-bits');
4092 throw new RangeError('Buffer size must be a multiple of 32-bits');
4103 throw new RangeError('Buffer size must be a multiple of 64-bits');
4161 return -1;
4171 var x = thisEnd - thisStart;
4172 var y = end - start;
4183 if (x < y) return -1;
4192 // - buffer - a Buffer to search
4193 // - val - a string, Buffer, or number
4194 // - byteOffset - an index into `buffer`; will be clamped to an int32
4195 // - encoding - an optional encoding, relevant is val is a string
4196 // - dir - true for indexOf, false for lastIndexOf
4199 if (buffer.length === 0) return -1;
4207 } else if (byteOffset < -0x80000000) {
4208 byteOffset = -0x80000000;
4213 byteOffset = dir ? 0 : buffer.length - 1;
4219 if (dir) return -1;else byteOffset = buffer.length - 1;
4221 if (dir) byteOffset = 0;else return -1;
4233 return -1;
4237 val = val & 0xFF; // Search for a byte value [0-255]
4255 …if (encoding === 'ucs2' || encoding === 'ucs-2' || encoding === 'utf16le' || encoding === 'utf-16l…
4257 return -1;
4274 var foundIndex = -1;
4276 if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) {
4277 if (foundIndex === -1) foundIndex = i;
4278 if (i - foundIndex + 1 === valLength) return foundIndex * indexSize;
4280 if (foundIndex !== -1) i -= i - foundIndex;
4281 foundIndex = -1;
4285 if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength;
4286 for (i = byteOffset; i >= 0; i--) {
4297 return -1;
4300 return this.indexOf(val, byteOffset, encoding) !== -1;
4310 var remaining = buf.length - offset;
4332 return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length);
4341 return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length);
4367 var remaining = this.length - offset;
4379 case 'utf-8':
4389 case 'ucs-2':
4391 case 'utf-16le':
4470 codePoint -= 0x10000;
4528 for (var i = 0; i < bytes.length - 1; i += 2) {
4581 var val = this[offset + --byteLength];
4584 val += this[offset + --byteLength] * mul;
4619 boundsError(offset, this.length - 8);
4631 boundsError(offset, this.length - 8);
4648 if (val >= mul) val -= Math.pow(2, 8 * byteLength);
4657 var val = this[offset + --i];
4659 val += this[offset + --i] * mul;
4662 if (val >= mul) val -= Math.pow(2, 8 * byteLength);
4669 return (0xff - this[offset] + 1) * -1;
4699 boundsError(offset, this.length - 8);
4711 boundsError(offset, this.length - 8);
4748 var maxBytes = Math.pow(2, 8 * byteLength) - 1;
4764 var maxBytes = Math.pow(2, 8 * byteLength) - 1;
4767 var i = byteLength - 1;
4770 while (--i >= 0 && (mul *= 0x100)) {
4874 var limit = Math.pow(2, 8 * byteLength - 1);
4875 checkInt(this, value, offset, byteLength, limit - 1, -limit);
4882 if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) {
4885 this[offset + i] = (value / mul >> 0) - sub & 0xFF;
4893 var limit = Math.pow(2, 8 * byteLength - 1);
4894 checkInt(this, value, offset, byteLength, limit - 1, -limit);
4896 var i = byteLength - 1;
4900 while (--i >= 0 && (mul *= 0x100)) {
4904 this[offset + i] = (value / mul >> 0) - sub & 0xFF;
4911 if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80);
4919 if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);
4927 if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000);
4935 if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);
4945 if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000);
4957 …return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffff…
4963 …return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffff…
4973 checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38);
4988 checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308);
5022 if (target.length - targetStart < end - start) {
5023 end = target.length - targetStart + start;
5025 var len = end - start;
5027 // Use built-in when available, missing from IE11
5090 for (i = 0; i < end - start; ++i) {
5100 // Simplified versions from Node, changed for Buffer-only usage
5118 _this.stack; // eslint-disable-line no-unused-expressions
5160 if (input > Math.pow(BigInt(2), BigInt(32)) || input < -Math.pow(BigInt(2), BigInt(32))) {
5171 var start = val[0] === '-' ? 1 : 0;
5172 for (; i >= start + 4; i -= 3) {
5173 res = "_" + val.slice(i - 3, i) + res;
5184 boundsError(offset, buf.length - (byteLength + 1));
5195 …range = ">= -(2" + n + " ** " + ((byteLength + 1) * 8 - 1) + n + ") and < 2 ** " + ("" + ((byteLen…
5223 var INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g;
5227 // Node strips out invalid characters like \n and \t from the string, base64-js does not
5231 // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not
5253 if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
5257 if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
5268 if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
5274 codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000;
5277 if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD);
5283 if ((units -= 1) < 0) break;
5286 if ((units -= 2) < 0) break;
5289 if ((units -= 3) < 0) break;
5292 if ((units -= 4) < 0) break;
5312 if ((units -= 2) < 0) break;
5341 return obj !== obj; // eslint-disable-line no-self-compare
5376 // eslint-disable-next-line es/no-typed-arrays -- safe
5474 // V8 ~ Chrome 49-50 `%TypedArray%` methods are non-writable non-configurable
5498 // WebKit bug - typed arrays constructors prototype is Object.prototype
5500 // eslint-disable-next-line no-shadow -- safe
5515 // WebKit bug - one more object in Uint8ClampedArray prototype chain
5639 bytes[start + i] = pack[isLittleEndian ? i : count - i - 1];
5659 byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength);
5733 /* eslint-disable no-new -- required for testing */
5737 new NativeArrayBuffer(-1);
5744 /* eslint-enable no-new -- required for testing */
5760 // WebKit bug - the same parent prototype for typed arrays and data view
5805 // https://tc39.es/ecma262/#sec-arraybuffer-constructor
5931 t = keySchedule[ksRow - 1];
5945 keySchedule[ksRow] = keySchedule[ksRow - keySize] ^ t;
5952 var ksRow = ksRows - invKsRow;
5956 var t = keySchedule[ksRow - 4];
6154 // Perform concrete-cipher logic
6178 * Note that the finalize operation is effectively a destructive, read-once operation.
6196 // Perform concrete-cipher logic
6241 …* @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 1 (32 …
6424 var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes;
6452 var nPaddingBytes = data.words[data.sigBytes - 1 >>> 2] & 0xff;
6455 data.sigBytes -= nPaddingBytes;
6462 …* @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 4 (128…
6595 * Converts a cipher params object to an OpenSSL-compatible string.
6599 * @return {string} The OpenSSL-compatible string.
6623 * Converts an OpenSSL-compatible string to a cipher params object.
6625 * @param {string} openSSLStr The OpenSSL-compatible string.
6651 ciphertext.sigBytes -= 16;
6780 …* @param {WordArray|string} salt (Optional) A 64-bit salt to use. If omitted, a salt will be gener…
7150 * An array of 32-bit words.
7152 * @property {Array} words The array of 32-bit words.
7159 * @param {Array} words (Optional) An array of 32-bit words.
7217 var thatByte = thatWords[i >>> 2] >>> 24 - i % 4 * 8 & 0xff;
7218 thisWords[thisSigBytes + i >>> 2] |= thatByte << 24 - (thisSigBytes + i) % 4 * 8;
7244 words[sigBytes >>> 2] &= 0xffffffff << 32 - sigBytes % 4 * 8;
7313 var bite = words[i >>> 2] >>> 24 - i % 4 * 8 & 0xff;
7339 words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << 24 - i % 8 * 4;
7370 var bite = words[i >>> 2] >>> 24 - i % 4 * 8 & 0xff;
7395 words[i >>> 2] |= (latin1Str.charCodeAt(i) & 0xff) << 24 - i % 4 * 8;
7402 * UTF-8 encoding strategy.
7406 * Converts a word array to a UTF-8 string.
7410 * @return {string} The UTF-8 string.
7422 throw new Error('Malformed UTF-8 data');
7426 * Converts a UTF-8 string to a word array.
7428 * @param {string} utf8Str The UTF-8 string.
7466 …param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8.
7515 nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0);
7527 // Perform concrete-algorithm logic
7533 data.sigBytes -= nBytesReady;
7559 …* @property {number} blockSize The number of 32-bit words this hasher operates on. Default: 16 (51…
7593 // Perform concrete-hasher logic
7620 * Note that the finalize operation is effectively a destructive, read-once operation.
7638 // Perform concrete-hasher logic
7742 var byte1 = words[i >>> 2] >>> 24 - i % 4 * 8 & 0xff;
7743 var byte2 = words[i + 1 >>> 2] >>> 24 - (i + 1) % 4 * 8 & 0xff;
7744 var byte3 = words[i + 2 >>> 2] >>> 24 - (i + 2) % 4 * 8 & 0xff;
7747 base64Chars.push(map.charAt(triplet >>> 6 * (3 - j) & 0x3f));
7789 if (paddingIndex !== -1) {
7804 var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << i % 4 * 2;
7805 var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> 6 - i % 4 * 2;
7807 words[nBytes >>> 2] |= bitsCombined << 24 - nBytes % 4 * 8;
7874 var byte1 = words[i >>> 2] >>> 24 - i % 4 * 8 & 0xff;
7875 var byte2 = words[i + 1 >>> 2] >>> 24 - (i + 1) % 4 * 8 & 0xff;
7876 var byte3 = words[i + 2 >>> 2] >>> 24 - (i + 2) % 4 * 8 & 0xff;
7879 base64Chars.push(map.charAt(triplet >>> 6 * (3 - j) & 0x3f));
7926 if (paddingIndex !== -1) {
7935 _safe_map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_'
7942 var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << i % 4 * 2;
7943 var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> 6 - i % 4 * 2;
7945 words[nBytes >>> 2] |= bitsCombined << 24 - nBytes % 4 * 8;
7979 * UTF-16 BE encoding strategy.
7983 * Converts a word array to a UTF-16 BE string.
7987 * @return {string} The UTF-16 BE string.
8003 var codePoint = words[i >>> 2] >>> 16 - i % 4 * 8 & 0xffff;
8009 * Converts a UTF-16 BE string to a word array.
8011 * @param {string} utf16Str The UTF-16 BE string.
8028 words[i >>> 1] |= utf16Str.charCodeAt(i) << 16 - i % 2 * 16;
8035 * UTF-16 LE encoding strategy.
8039 * Converts a word array to a UTF-16 LE string.
8043 * @return {string} The UTF-16 LE string.
8059 var codePoint = swapEndian(words[i >>> 2] >>> 16 - i % 4 * 8 & 0xffff);
8065 * Converts a UTF-16 LE string to a word array.
8067 * @param {string} utf16Str The UTF-16 LE string.
8084 words[i >>> 1] |= swapEndian(utf16Str.charCodeAt(i) << 16 - i % 2 * 16);
8404 * Note that the finalize operation is effectively a destructive, read-once operation.
8532 words[i >>> 2] |= typedArray[i] << 24 - i % 4 * 8;
8701 dataWords[nBitsLeft >>> 5] |= 0x80 << 24 - nBitsLeft % 32;
8733 return (n << s | n >>> 32 - s) + b;
8737 return (n << s | n >>> 32 - s) + b;
8741 return (n << s | n >>> 32 - s) + b;
8745 return (n << s | n >>> 32 - s) + b;
8989 counter[blockSize - 1] = counter[blockSize - 1] + 1 | 0;
9113 var nPaddingBytes = blockSizeBytes - dataSigBytes % blockSizeBytes;
9116 var lastBytePos = dataSigBytes + nPaddingBytes - 1;
9120 data.words[lastBytePos >>> 2] |= nPaddingBytes << 24 - lastBytePos % 4 * 8;
9125 var nPaddingBytes = data.words[data.sigBytes - 1 >>> 2] & 0xff;
9128 data.sigBytes -= nPaddingBytes;
9159 var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes;
9162 …data.concat(CryptoJS.lib.WordArray.random(nPaddingBytes - 1)).concat(CryptoJS.lib.WordArray.create…
9166 var nPaddingBytes = data.words[data.sigBytes - 1 >>> 2] & 0xff;
9169 data.sigBytes -= nPaddingBytes;
9192 * ISO/IEC 9797-1 Padding Method 2.
9206 // Remove one more byte -- the 0x80 byte
9207 data.sigBytes--;
9263 data.sigBytes += blockSizeBytes - (data.sigBytes % blockSizeBytes || blockSizeBytes);
9270 var i = data.sigBytes - 1;
9271 for (var i = data.sigBytes - 1; i >= 0; i--) {
9272 if (dataWords[i >>> 2] >>> 24 - i % 4 * 8 & 0xff) {
9309 * Password-Based Key Derivation Function 2 algorithm.
9339 * Computes the Password-Based Key Derivation Function 2.
9399 * Computes the Password-Based Key Derivation Function 2.
9452 * This is a legacy version that neglected to convert the key to little-endian.
9459 var K = this._key.words;
9463 …ar X = this._X = [K[0], K[3] << 16 | K[2] >>> 16, K[1], K[0] << 16 | K[3] >>> 16, K[2], K[1] << 16…
9466K[2] << 16 | K[2] >>> 16, K[0] & 0xffff0000 | K[1] & 0x0000ffff, K[3] << 16 | K[3] >>> 16, K[1] & …
9554 // Calculate the g-values
9627 var K = this._key.words;
9632 K[i] = (K[i] << 8 | K[i] >>> 24) & 0x00ff00ff | (K[i] << 24 | K[i] >>> 8) & 0xff00ff00;
9636 …ar X = this._X = [K[0], K[3] << 16 | K[2] >>> 16, K[1], K[0] << 16 | K[3] >>> 16, K[2], K[1] << 16…
9639K[2] << 16 | K[2] >>> 16, K[0] & 0xffff0000 | K[1] & 0x0000ffff, K[3] << 16 | K[3] >>> 16, K[1] & …
9727 // Calculate the g-values
9810 var keyByte = keyWords[keyByteIndex >>> 2] >>> 24 - keyByteIndex % 4 * 8 & 0xff;
9844 keystreamWord |= S[(S[i] + S[j]) % 256] << 24 - n * 8;
9879 for (var i = this.cfg.drop; i > 0; i--) {
9916- Redistributions of source code must retain the above copyright notice, this list of conditions a…
9917- Redistributions in binary form must reproduce the above copyright notice, this list of condition…
10033 dataWords[nBitsLeft >>> 5] |= 0x80 << 24 - nBitsLeft % 32;
10078 return x << n | x >>> 32 - n;
10143 * SHA-1 hash algorithm.
10165 var n = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16];
10174 t += (b & c | b & d | c & d) - 0x70e44324;
10176 t += (b ^ c ^ d) - 0x359d3e2a;
10200 dataWords[nBitsLeft >>> 5] |= 0x80 << 24 - nBitsLeft % 32;
10277 * SHA-224 hash algorithm.
10285 hash.sigBytes -= 4;
10351 var K = [];
10365 return (n - (n | 0)) * 0x100000000 | 0;
10374 K[nPrime] = getFractionalBits(Math.pow(n, 1 / 3));
10385 * SHA-256 hash algorithm.
10410 var gamma0x = W[i - 15];
10412 var gamma1x = W[i - 2];
10414 W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16];
10420 var t1 = h + sigma1 + ch + K[i] + W[i];
10450 dataWords[nBitsLeft >>> 5] |= 0x80 << 24 - nBitsLeft % 32;
10561 var bitPosition = (1 << j) - 1;
10565 roundConstantMsw ^= 1 << bitPosition - 32;
10590 * SHA-3 hash algorithm.
10609 this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32;
10680 tMsw = laneMsw << rhoOffset | laneLsw >>> 32 - rhoOffset;
10681 tLsw = laneLsw << rhoOffset | laneMsw >>> 32 - rhoOffset;
10683 tMsw = laneLsw << rhoOffset - 32 | laneMsw >>> 64 - rhoOffset;
10684 tLsw = laneMsw << rhoOffset - 32 | laneLsw >>> 64 - rhoOffset;
10731 dataWords[nBitsLeft >>> 5] |= 0x1 << 24 - nBitsLeft % 32;
10732 dataWords[(Math.ceil((nBitsLeft + 1) / blockSizeBits) * blockSizeBits >>> 5) - 1] |= 0x80;
10833 * SHA-384 hash algorithm.
10841 hash.sigBytes -= 16;
10910 …var K = [X64Word_create(0x428a2f98, 0xd728ae22), X64Word_create(0x71374491, 0x23ef65cd), X64Word_c…
10921 * SHA-512 hash algorithm.
10987 var gamma0x = W[i - 15];
10994 var gamma1x = W[i - 2];
11000 // W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16]
11001 var Wi7 = W[i - 7];
11004 var Wi16 = W[i - 16];
11025 // t1 = h + sigma1 + ch + K[i] + W[i]
11026 var Ki = K[i];
11087 dataWords[nBitsLeft >>> 5] |= 0x80 << 24 - nBitsLeft % 32;
11095 // Convert hash to 32-bit word array before returning
11715 var keyBitPos = PC1[i] - 1;
11716 keyBits[i] = keyWords[keyBitPos >>> 5] >>> 31 - keyBitPos % 32 & 1;
11731 subKey[i / 6 | 0] |= keyBits[(PC2[i] - 1 + bitShift) % 28] << 31 - i % 6;
11734 … subKey[4 + (i / 6 | 0)] |= keyBits[28 + (PC2[i + 24] - 1 + bitShift) % 28] << 31 - i % 6;
11737 // Since each subkey is applied to an expanded 32-bit input,
11738 // the subkey can be broken into 8 values scaled to 32-bits,
11742 subKey[i] = subKey[i] >>> (i - 1) * 4 + 3;
11750 invSubKeys[i] = subKeys[15 - i];
11831 * Triple-DES block cipher algorithm.
11840 … throw new Error('Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.');
11910 * A 64-bit word.
11914 * Initializes a newly created 64-bit word.
11931 * @return {X64Word} A new x64-Word object after negating.
11947 * @param {X64Word} word The x64-Word to AND with this word.
11949 * @return {X64Word} A new x64-Word object after ANDing.
11965 * @param {X64Word} word The x64-Word to OR with this word.
11967 * @return {X64Word} A new x64-Word object after ORing.
11983 * @param {X64Word} word The x64-Word to XOR with this word.
11985 * @return {X64Word} A new x64-Word object after XORing.
12003 * @return {X64Word} A new x64-Word object after shifting.
12011 // var high = (this.high << n) | (this.low >>> (32 - n));
12014 // var high = this.low << (n - 32);
12026 * @return {X64Word} A new x64-Word object after shifting.
12034 // var low = (this.low >>> n) | (this.high << (32 - n));
12037 // var low = this.high >>> (n - 32);
12049 * @return {X64Word} A new x64-Word object after rotating.
12056 // return this.shiftL(n).or(this.shiftR(64 - n));
12064 * @return {X64Word} A new x64-Word object after rotating.
12071 // return this.shiftR(n).or(this.shiftL(64 - n));
12077 * @param {X64Word} word The x64-Word to add with this word.
12079 * @return {X64Word} A new x64-Word object after adding.
12095 * An array of 64-bit words.
12130 * Converts this 64-bit word array to a 32-bit word array.
12132 * @return {CryptoJS.lib.WordArray} This word array's data as a 32-bit word array.
12206 …throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, n…
12207 …yLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object…
12209-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebo…
12300 * endIndex, and sub-match sequence.
12410 // last non-opaque entry. Set up an array, stretching over all
12413 var short = 255 - this.transparency.indexed.length;
12422 // Grey is two bytes, range 0 .. (2 ^ bit-depth) - 1
12511 var w = Math.ceil((width - x0) / dx);
12512 var h = Math.ceil((height - y0) / dy);
12530 left = i < pixelBytes ? 0 : buffer[c - pixelBytes];
12538 col = (i - i % pixelBytes) / pixelBytes;
12539 … upper = row && buffer[(row - 1) * scanlineLength + col * pixelBytes + i % pixelBytes];
12547 col = (i - i % pixelBytes) / pixelBytes;
12548 left = i < pixelBytes ? 0 : buffer[c - pixelBytes];
12549 … upper = row && buffer[(row - 1) * scanlineLength + col * pixelBytes + i % pixelBytes];
12558 col = (i - i % pixelBytes) / pixelBytes;
12559 left = i < pixelBytes ? 0 : buffer[c - pixelBytes];
12563 upper = buffer[(row - 1) * scanlineLength + col * pixelBytes + i % pixelBytes];
12564 … upperLeft = col && buffer[(row - 1) * scanlineLength + (col - 1) * pixelBytes + i % pixelBytes];
12566 var p = left + upper - upperLeft;
12567 var pa = Math.abs(p - left);
12568 var pb = Math.abs(p - upper);
12569 var pc = Math.abs(p - upperLeft);
12581 throw new Error("Invalid filter algorithm: " + data[pos - 1]);
12590 pixelsPos += (dx - 1) * pixelBytes;
12637 var j, k;
12652 k = palette ? pixels[i / 4] * 4 : j;
12653 var v = input[k++];
12657 data[i++] = alpha ? input[k++] : 255;
12658 j = k;
12662 k = palette ? pixels[i / 4] * 4 : j;
12663 data[i++] = input[k++];
12664 data[i++] = input[k++];
12665 data[i++] = input[k++];
12666 data[i++] = alpha ? input[k++] : 255;
12667 j = k;
12689 /* eslint-disable node/no-deprecated-api */
12743 …st argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received…
12905 --this.length;
12967 n -= ret.length;
12972 n -= nb;
12985 this.length -= c;
12995 n -= p.data.length;
12999 buf.copy(ret, ret.length - n, 0, nb);
13000 n -= nb;
13013 this.length -= c;
13216 throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
13281 var n = Object.prototype.toString.call(o).slice(8, -1);
13294 …throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, no…
13297 …w new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, n…
13323 …throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, n…
13352 PDFAbstractReference - abstract class for PDF reference
13396 last = sortedKeys[sortedKeys.length - 1];
13429 value: function _dataForKey() /*k*/
13437 return (Array(length + 1).join('0') + str).slice(-length);
13449 }; // Convert little endian UTF-16 to big endian
13456 for (var i = 0, end = l - 1; i < end; i += 2) {
13475 return "/".concat(object); // String objects are converted to PDF strings (UTF-16)
13485 } // If so, encode it as big endian UTF-16
13541 if (n > -1e21 && n < 1e21) {
13627 PDFPage - represents a single page in the PDF document
13729 return this.height - this.margins.bottom;
13807 value: function _dataForKey(k) {
13808 return new String(k);
13837 endRange = middleRange - 1;
13845 * @link https://tools.ietf.org/html/rfc3454#appendix-A.1
13848 …fd, 0xd0000, 0xdfffd, 0xe0000, 0xe0000, 0xe0002, 0xe001f, 0xe0080, 0xefffd]; // prettier-ignore-end
13852 }; // prettier-ignore-start
13856 * @link https://tools.ietf.org/html/rfc3454#appendix-B.1
13859 …0c, 0xfe0c, 0xfe0d, 0xfe0d, 0xfe0e, 0xfe0e, 0xfe0f, 0xfe0f, 0xfeff, 0xfeff]; // prettier-ignore-end
13863 }; // prettier-ignore-start
13866 * C.1.2 Non-ASCII space characters
13867 * @link https://tools.ietf.org/html/rfc3454#appendix-C.1.2
13871 /* NO-BREAK SPACE */, 0x1680, 0x1680
13877 /* THREE-PER-EM SPACE */, 0x2005, 0x2005
13878 /* FOUR-PER-EM SPACE */, 0x2006, 0x2006
13879 /* SIX-PER-EM SPACE */, 0x2007, 0x2007
13885 /* NARROW NO-BREAK SPACE */, 0x205f, 0x205f
13887 /* IDEOGRAPHIC SPACE */]; // prettier-ignore-end
13891 }; // prettier-ignore-start
13895 * C.2.2 Non-ASCII control characters
13896 * @link https://tools.ietf.org/html/rfc3454#appendix-C.2.2
13903 /* ZERO WIDTH NON-JOINER */, 0x200d, 0x200d
13912 /* ZERO WIDTH NO-BREAK SPACE */, 0xfff9, 0xfffc
13918 * C.4 Non-character code points
13919 * @link https://tools.ietf.org/html/rfc3454#appendix-C.4
13946 * @link https://tools.ietf.org/html/rfc3454#appendix-C.2.1
13953 * @link https://tools.ietf.org/html/rfc3454#appendix-C.8
13958 /* LEFT-TO-RIGHT MARK */, 0x200f, 0x200f
13959 /* RIGHT-TO-LEFT MARK */, 0x202a, 0x202a
13960 /* LEFT-TO-RIGHT EMBEDDING */, 0x202b, 0x202b
13961 /* RIGHT-TO-LEFT EMBEDDING */, 0x202c, 0x202c
13963 /* LEFT-TO-RIGHT OVERRIDE */, 0x202e, 0x202e
13964 /* RIGHT-TO-LEFT OVERRIDE */, 0x206a, 0x206a
13973 * @link https://tools.ietf.org/html/rfc3454#appendix-C.7
13979 * @link https://tools.ietf.org/html/rfc3454#appendix-C.5
13984 * @link https://tools.ietf.org/html/rfc3454#appendix-C.3
13990 * @link https://tools.ietf.org/html/rfc3454#appendix-C.6
14000 * @link https://tools.ietf.org/html/rfc3454#appendix-C.9
14007 * @link https://tools.ietf.org/html/rfc3454#appendix-C.3
14011 /* [PRIVATE USE, PLANE 16] */]; // prettier-ignore-end
14015 }; // prettier-ignore-start
14019 * @link https://tools.ietf.org/html/rfc3454#appendix-D.1
14022 …50, 0xfd8f, 0xfd92, 0xfdc7, 0xfdf0, 0xfdfc, 0xfe70, 0xfe74, 0xfe76, 0xfefc]; // prettier-ignore-end
14026 }; // prettier-ignore-start
14030 * @link https://tools.ietf.org/html/rfc3454#appendix-D.2
14033 …, 0x20000, 0x2a6d6, 0x2f800, 0x2fa1d, 0xf0000, 0xffffd, 0x100000, 0x10fffd]; // prettier-ignore-end
14040 * non-ASCII space characters [StringPrep, C.1.2] that can be
14059 return x[x.length - 1];
14064 * and https://www.npmjs.com/package/code-point-at.
14077 codepoints.push((before - 0xd800) * 0x400 + next - 0xdc00 + 0x10000);
14116 throw new Error('Prohibited character, see https://tools.ietf.org/html/rfc4013#section-2.3');
14122 throw new Error('Unassigned code point, see https://tools.ietf.org/html/rfc4013#section-2.5');
14131 …tain RandALCat and LCat at the same time,' + ' see https://tools.ietf.org/html/rfc3454#section-6');
14142 …rst and the last' + ' character of the string, see https://tools.ietf.org/html/rfc3454#section-6');
14153 // eslint-disable-next-line no-prototype-builtins
14484 out[index] = PASSWORD_PADDING[index - length];
14505 byteArray.push(wordArray.words[Math.floor(i / 4)] >> 8 * (3 - i % 4) & 0xff);
14560 var last = this.stops[stopsLength - 1];
14567 for (var i = 0; i < stopsLength - 1; i++) {
14822 // 1-colored, 2-uncolored
14824 // 2-no distortion
14906 color = color.replace(/#([0-9A-F])([0-9A-F])([0-9A-F])/i, '#$1$1$2$2$3$3');
15234 …} else if ([' ', ','].includes(c) || c === '-' && curArg.length > 0 && curArg[curArg.length - 1] !…
15257 curArg = ['-', '.'].includes(c) ? c : '';
15342 doc.bezierCurveTo(cx - (px - cx), cy - (py - cy), a[0], a[1], a[2], a[3]);
15353 doc.bezierCurveTo(cx - (px - cx), cy - (py - cy), cx + a[0], cy + a[1], cx + a[2], cy + a[3]);
15378 px = cx - (px - cx);
15379 py = cy - (py - cy);
15382 px = cx - (px - cx);
15383 py = cy - (py - cy);
15392 px = cx - (px - cx);
15393 py = cy - (py - cy);
15485 px = cos_th * (ox - x) * 0.5 + sin_th * (oy - y) * 0.5;
15486 py = cos_th * (oy - y) * 0.5 - sin_th * (ox - x) * 0.5;
15495 var a10 = -sin_th / ry;
15501 var d = (x1 - x0) * (x1 - x0) + (y1 - y0) * (y1 - y0);
15502 var sfactor_sq = 1 / d - 0.25;
15508 sfactor = -sfactor;
15510 var xc = 0.5 * (x0 + x1) - sfactor * (y1 - y0);
15511 var yc = 0.5 * (y0 + y1) + sfactor * (x1 - x0);
15512 var th0 = Math.atan2(y0 - yc, x0 - xc);
15513 var th1 = Math.atan2(y1 - yc, x1 - xc);
15514 var th_arc = th1 - th0;
15518 th_arc -= 2 * Math.PI;
15531 var a01 = -sin_th * ry;
15534 var th_half = 0.5 * (th1 - th0);
15536 var x1 = cx + Math.cos(th0) - t * Math.sin(th0);
15541 var y2 = y3 - t * Math.cos(th1);
15560 var KAPPA = 4.0 * ((Math.sqrt(2) - 1.0) / 3.0);
15646 var c = r * (1.0 - KAPPA);
15648 this.lineTo(x + w - r, y);
15649 this.bezierCurveTo(x + w - c, y, x + w, y + c, x + w, y + r);
15650 this.lineTo(x + w, y + h - r);
15651 this.bezierCurveTo(x + w, y + h - c, x + w - c, y + h, x + w - r, y + h);
15653 this.bezierCurveTo(x + c, y + h, x, y + h - c, x, y + h - r);
15659 …// based on http://stackoverflow.com/questions/2172798/how-to-draw-an-oval-in-html5-canvas/2173084…
15663 x -= r1;
15664 y -= r2;
15672 this.bezierCurveTo(x, ym - oy, xm - ox, y, xm, y);
15673 this.bezierCurveTo(xm + ox, y, xe, ym - oy, xe, ym);
15675 this.bezierCurveTo(xm - ox, ye, x, ym + oy, x, ym);
15687 var deltaAng = endAngle - startAngle;
15693 var dir = anticlockwise ? -1 : 1;
15701 var deltaCx = -Math.sin(curAng) * handleLen;
15718 deltaCx = -Math.sin(curAng) * handleLen;
15721 var cp2x = ax - deltaCx;
15722 var cp2y = ay - deltaCy; // render segment
15744 if (/even-?odd/.test(rule)) {
15750 if (/(even-?odd)|(non-?zero)/.test(color)) {
15769 var isFillRule = /(even-?odd)|(non-?zero)/;
15822 var x1 = x * cos - y * sin;
15824 x -= x1;
15825 y -= y1;
15827 return this.transform(cos, sin, -sin, cos, x, y);
15844 x -= xFactor * x;
15845 y -= yFactor * y;
15879K\nL M N O\nP Q R S\nT…
15907 this.lineGap = this.bbox[3] - this.bbox[1] - (this.ascender - this.descender);
15949 match = line.match(/^KPX\s+(\.?\w+)\s+(\.?\w+)\s+(-?\d+)/);
16052 return (this.ascender + gap - this.descender) / 1000 * size;
16061 'Courier-Bold': function CourierBold() {
16062 return fs.readFileSync(__dirname + '/data/Courier-Bold.afm', 'utf8');
16064 'Courier-Oblique': function CourierOblique() {
16065 return fs.readFileSync(__dirname + '/data/Courier-Oblique.afm', 'utf8');
16067 'Courier-BoldOblique': function CourierBoldOblique() {
16068 return fs.readFileSync(__dirname + '/data/Courier-BoldOblique.afm', 'utf8');
16073 'Helvetica-Bold': function HelveticaBold() {
16074 return fs.readFileSync(__dirname + '/data/Helvetica-Bold.afm', 'utf8');
16076 'Helvetica-Oblique': function HelveticaOblique() {
16077 return fs.readFileSync(__dirname + '/data/Helvetica-Oblique.afm', 'utf8');
16079 'Helvetica-BoldOblique': function HelveticaBoldOblique() {
16080 return fs.readFileSync(__dirname + '/data/Helvetica-BoldOblique.afm', 'utf8');
16082 'Times-Roman': function TimesRoman() {
16083 return fs.readFileSync(__dirname + '/data/Times-Roman.afm', 'utf8');
16085 'Times-Bold': function TimesBold() {
16086 return fs.readFileSync(__dirname + '/data/Times-Bold.afm', 'utf8');
16088 'Times-Italic': function TimesItalic() {
16089 return fs.readFileSync(__dirname + '/data/Times-Italic.afm', 'utf8');
16091 'Times-BoldItalic': function TimesBoldItalic() {
16092 return fs.readFileSync(__dirname + '/data/Times-BoldItalic.afm', 'utf8');
16181 return "0000".concat(num.toString(16)).slice(-4);
16281 res.push("0000".concat(gid.toString(16)).slice(-4));
16320 flags |= 1 << 2; // assume the font uses non-latin characters
16375 Encoding: 'Identity-H',
16401 value -= 0x10000;
16419 …obe-Identity-UCS def\n/CMapType 2 def\n1 begincodespacerange\n<0000><ffff>\nendcodespacerange\n1 b…
16545 _this.lineWidth = (options.width - _this.columnGap * (_this.columns - 1)) / _this.columns;
16567 _this.lineWidth -= indent;
16569 _this.document.x -= indent;
16621 …// start our check at the end of our available space - this method is faster than a loop of each c…
16629 …hrink = w > this.spaceLeft && l > 0; // shrink or grow word as necessary after our near-guess above
16633 w = this.wordWidth(word.slice(0, --l));
16700 options.textWidth = textWidth + _this2.wordSpacing * (wc - 1);
16729 // to avoid infinite loop need to stop while-loop if buffer is empty string
16732 buffer = buffer.slice(0, -1).replace(/\s+$/, '');
16770 _this2.spaceLeft = _this2.lineWidth - w;
16776 return _this2.spaceLeft -= w;
16852 this.y -= this.currentLineHeight(true) * lines + this._lineGap;
16902 …(string, this._fontSize, options.features) + (options.characterSpacing || 0) * (string.length - 1);
16915 var height = this.y - y;
16940 level--;
16956 var letter = String.fromCharCode((n - 1) % 26 + 65);
16957 var times = Math.floor((n - 1) / 26 + 1);
16988 var diff = itemIndent * (l - level);
16990 wrapper.lineWidth -= diff;
16998 _this3.circle(_this3.x - indent + r, _this3.y + midLine, r);
17003 var text = label(numbers[i - 1]);
17004 _this3._fragment(text, _this3.x - indent, _this3.y, options);
17015 var pos = indent + itemIndent * (level - 1);
17017 return wrapper.lineWidth -= pos;
17020 var pos = indent + itemIndent * (level - 1);
17021 _this3.x -= pos;
17058 result.width = this.page.width - this.x - this.page.margins.right;
17098 x += options.lineWidth - textWidth;
17101 x += options.lineWidth / 2 - options.textWidth / 2;
17108 …wordSpacing = Math.max(0, (options.lineWidth - textWidth) / Math.max(1, words.length - 1) - spaceW…
17111 …} // text baseline alignments based on http://wiki.apache.org/xmlgraphics-fop/LineLayout/Alignment…
17114 dy = -options.baseline;
17117 case 'svg-middle':
17121 case 'svg-central':
17146 … = options.textWidth + wordSpacing * (options.wordCount - 1) + characterSpacing * (text.length - 1…
17165 var lineY = y + this.currentLineHeight() - lineWidth;
17190 skew = -Math.tan(options.oblique * Math.PI / 180);
17192 skew = -0.25;
17195 this.transform(1, 0, skew, 1, -skew * dy, 0);
17196 this.transform(1, 0, 0, 1, -x, -y);
17199 this.transform(1, 0, 0, -1, 0, this.page.height);
17200 y = this.page.height - y - dy; // add current font to page if necessary
17244 var object = positions[positions.length - 1];
17250 positions[positions.length - 1] = space;
17271 var advance = positions[cur - 1].xAdvance - positions[cur - 1].advanceWidth;
17272 commands.push("<".concat(hex, "> ").concat(number$2(-advance)));
17302 if (pos.xAdvance - pos.advanceWidth !== 0) {
17426 …this.obj.data['ColorSpace'] = ['Indexed', 'DeviceRGB', this.image.palette.length / 3 - 1, palette];
17504 …var len = pixels.length; // For 16bit images copy only most significant byte (MSB) - PNG data is a…
17653 x = x + bw / 2 - w / 2;
17655 x = x + bw - w;
17658 y = y + bh / 2 - h / 2;
17660 y = y + bh - h;
17678 this.transform(w, 0, 0, -h, x, y + h);
17805 options.L = [x1, this.page.height - y1, x2, this.page.height - y2];
17904 last = this.children[this.children.length - 1];
17910 child.outlineData.Prev = this.children[i - 1].dictionary;
17912 if (i < this.children.length - 1) {
17937 PDFStructureContent - a reference to a marked structure content
18008 throw new Error("Cannot add child to already-ended structure element");
18118 this.dictionary.data.K = [];
18127 this.dictionary.data.K = null;
18135 this.dictionary.data.K.push(child.dictionary);
18145 _this5.dictionary.data.K.push(mcid);
18147 _this5.dictionary.data.K.push({
18169 return parseInt(a) - parseInt(b);
18178 value: function _dataForKey(k) {
18179 return parseInt(k);
18201 while (toClose--) {
18225 …ionary.BBox = [options.bbox[0], this.page.height - options.bbox[3], options.bbox[2], this.page.hei…
18259 this.page.markings.slice(-1)[0].structContent = structContent;
18277 if (!structTreeRoot.data.K) {
18278 structTreeRoot.data.K = [];
18280 structTreeRoot.data.K.push(structElem.dictionary);
18290 _this.page.markings.slice(-1)[0].structContent = structContent;
18449 * @param {string} name - field name (T attribute in field dictionary)
18450 * @param {object} options - other attributes to include in field dictionary
18462 * @param {string} name - form field name (T attribute of widget annotation
18479 var annotRef = this.page.annotations[this.page.annotations.length - 1];
18589 opts.AA.K = {
18649 // add current font to document-level AcroForm dict if necessary
18896 _this._write("%PDF-".concat(_this.version)); // 4 binary chars, as recommended by the spec
18928 this.transform(1, 0, 0, -1, 0, this.page.height);
18952 if (!(page = this._pageBuffer[n - this._pageBufferStart])) {
18953 …concat(this._pageBufferStart, " to ").concat(this._pageBufferStart + this._pageBuffer.length - 1));
18960 // this local variable exists so we're future-proof against
18982 …for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len…
18983 args[_key - 1] = arguments[_key];
18989 args[2] = this.page.height - args[2];
19048 this._offsets[ref.id - 1] = ref.offset;
19049 if (--this._waiting === 0 && this._ended) {
19114 offset = "0000000000".concat(offset).slice(-10);
19173 /* eslint-disable node/no-deprecated-api */
19271 // Shift size for getting the index-1 table offset.
19274 // Shift size for getting the index-2 table offset.
19278 // for getting an index-1 offset from an index-2 offset. 6=11-5
19279 var SHIFT_1_2 = SHIFT_1 - SHIFT_2;
19281 // Number of index-1 entries for the BMP. 32=0x20
19282 // This part of the index-1 table is omitted from the serialized form.
19285 // Number of entries in an index-2 block. 64=0x40
19288 // Mask for getting the lower bits for the in-index-2-block offset. */
19289 var INDEX_2_MASK = INDEX_2_BLOCK_LENGTH - 1;
19292 // Increases possible data size with 16-bit index values at the cost
19300 // Mask for getting the lower bits for the in-data-block offset.
19301 var DATA_MASK = DATA_BLOCK_LENGTH - 1;
19303 // The part of the index-2 table for U+D800..U+DBFF stores values for
19313 // The 2-byte UTF-8 version of the index-2 table follows at offset 2080=0x820.
19316 var UTF8_2B_INDEX_2_LENGTH = 0x800 >> 6; // U+0800 is the first code point after 2-byte UTF-8
19318 // The index-1 table, only used for supplementary code points, at offset 2112=0x840.
19319 // Variable length, for code points up to highStart, where the last single-value range starts.
19323 // The part of the index-2 table for supplementary code points starts
19324 // after this index-1 table.
19326 // Both the index-1 table and the following part of the index-2 table
19355 // swap bytes from little-endian
19359 // pre-parsed data
19384 …index = (this.data[LSCP_INDEX_2_OFFSET + (codePoint - 0xd800 >> SHIFT_2)] << INDEX_SHIFT) + (codeP…
19388 // Supplemental code point, use two-level lookup.
19389 index = this.data[INDEX_1_OFFSET - OMITTED_BMP_INDEX_1_LENGTH + (codePoint >> SHIFT_1)];
19394 return this.data[this.data.length - DATA_GRANULARITY];
19955 'stop-color': {
19959 'fill-opacity': {
19963 'stroke-opacity': {
19967 'stop-opacity': {
19971 'fill-rule': {
19979 'clip-rule': {
19987 'stroke-width': {
19991 'stroke-dasharray': {
19995 'stroke-dashoffset': {
19999 'stroke-miterlimit': {
20003 'stroke-linejoin': {
20012 'stroke-linecap': {
20021 'font-size': {
20025 'xx-small': 9,
20026 'x-small': 10,
20030 'x-large': 24,
20031 'xx-large': 32
20034 'font-family': {
20036 initial: 'sans-serif'
20038 'font-weight': {
20057 'font-style': {
20066 'text-anchor': {
20083 'dominant-baseline': {
20089 'before-edge': 'before-edge',
20090 'text-before-edge': 'before-edge',
20093 'after-edge': 'after-edge',
20094 'text-after-edge': 'after-edge',
20101 'alignment-baseline': {
20107 'before-edge': 'before-edge',
20108 'text-before-edge': 'before-edge',
20111 'after-edge': 'after-edge',
20112 'text-after-edge': 'after-edge',
20119 'baseline-shift': {
20128 'word-spacing': {
20135 'letter-spacing': {
20142 'text-decoration': {
20149 'line-through': 'line-through'
20155 css: 'white-space',
20160 'pre-line': 'preserve',
20161 'pre-wrap': 'preserve',
20165 'marker-start': {
20169 'marker-mid': {
20173 'marker-end': {
20194 'clip-path': {
20225 K: false
20335 …ateNumber(a) + ' ' + validateNumber(b) + ' ' + validateNumber(-c) + ' ' + validateNumber(-d) + ' '…
20430 if (temp = parser.match(/^<([\w:.-]+)\s*/, true)) {
20433 while (temp = parser.match(/^([\w:.-]+)(?:\s*=\s*"([^"]*)"|\s*=\s*'([^']*)')?\s*/, true)) {
20457 if (temp = parser.match(/^<\/([\w:.-]+)\s*>/, true)) {
20472 // Self-closing tag
20478 } else if (temp = parser.match(/^<!--[\s\S]*?-->/)) {
20489 return new SvgNode('#cdata-section', 4, temp[1], error);
20509 …return str.replace(/&(?:#([0-9]+)|#[xX]([0-9A-Fa-f]+)|([0-9A-Za-z]+));/g, function (mt, m0, m1, m2…
20526 …} else if (temp = raw.match(/^rgba\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9.]+)\s*\)…
20534 } else if (temp = raw.match(/^rgb\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)$/i)) {
20541 } else if (temp = raw.match(/^rgb\(\s*([0-9.]+)%\s*,\s*([0-9.]+)%\s*,\s*([0-9.]+)%\s*\)$/i)) {
20548 } else if (temp = raw.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i)) {
20550 } else if (temp = raw.match(/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i)) {
20582 for (var i = groupStack.length - 1; i >= 0; i--) {
20591 var dt = m[0] * m[3] - m[1] * m[2];
20592 …return [m[3] / dt, -m[1] / dt, -m[2] / dt, m[0] / dt, (m[2] * m[5] - m[3] * m[4]) / dt, (m[1] * m[…
20601 if (isNotEqual(m0 * m3 - m1 * m2, 0)) {
20612 return [-c / b];
20614 var d = b * b - 4 * a * c;
20616 return [(-b + Math.sqrt(d)) / (2 * a), (-b - Math.sqrt(d)) / (2 * a)];
20618 return [-b / (2 * a)];
20628 return Math.abs(number - ref) < 1e-10;
20631 return Math.abs(number - ref) >= 1e-10;
20634 return n > -1e21 && n < 1e21 ? Math.round(n * 1e6) / 1e6 : 0;
20643 while (temp = parser.match(/^([A-Za-z]+)\s*[(]([^(]+)[)]/, true)) {
20664 … nums[1], nums[2]], [Math.cos(a), Math.sin(a), -Math.sin(a), Math.cos(a), 0, 0], [1, 0, 0, 1, -num…
20667 … result = multiplyMatrix(result, [Math.cos(_a), Math.sin(_a), -Math.sin(_a), Math.cos(_a), 0, 0]);
20695 }[xAlign] - (initAlign || 0),
20700 }[yAlign] - (initAlign || 0);
20706 …return [scaleX, 0, 0, scaleY, dx * (availWidth - elemWidth * scaleX), dy * (availHeight - elemHeig…
20719 if (!result['marker-start']) {
20720 result['marker-start'] = result['marker'];
20722 if (!result['marker-mid']) {
20723 result['marker-mid'] = result['marker'];
20725 if (!result['marker-end']) {
20726 result['marker-end'] = result['marker'];
20744 case "small-caps":
20774 if (!result['font-style']) {
20775 result['font-style'] = fontStyle;
20777 if (!result['font-variant']) {
20778 result['font-variant'] = fontVariant;
20780 if (!result['font-weight']) {
20781 result['font-weight'] = fontWeight;
20783 if (!result['font-size']) {
20784 result['font-size'] = fontSize;
20786 if (!result['font-family']) {
20787 result['font-family'] = fontFamily;
20799 if (temp = parts[i].match(/^[#]([_A-Za-z0-9-]+)$/)) {
20801 } else if (temp = parts[i].match(/^[.]([_A-Za-z0-9-]+)$/)) {
20803 } else if (temp = parts[i].match(/^([_A-Za-z0-9-]+)$/)) {
20850 if (elem.classList.indexOf(selector.classes[_i3]) === -1) {
20882 return (font.xHeight || 0.5 * (font.ascender - font.descender)) * size / 1000;
20893 case 'after-edge':
20894 case 'text-after-edge':
20908 case 'before-edge':
20909 case 'text-before-edge':
20924 dy2 = -0.6 * size;
20930 return dy1 - dy2;
20986 case '#cdata-section':
21011 … return this.match(/^(?:[-+]?(?:[0-9]+[.][0-9]+|[0-9]+[.]|[.][0-9]+|[0-9]+)(?:[eE][-+]?[0-9]+)?)/);
21019 …var equationX = [p1x, -3 * p1x + 3 * c1x, 3 * p1x - 6 * c1x + 3 * c2x, -p1x + 3 * c1x - 3 * c2x + …
21020 …var equationY = [p1y, -3 * p1y + 3 * c1y, 3 * p1y - 6 * c1y + 3 * c2y, -p1y + 3 * c1y - 3 * c2y + …
21021 …var derivativeX = [-3 * p1x + 3 * c1x, 6 * p1x - 12 * c1x + 6 * c2x, -3 * p1x + 9 * c1x - 9 * c2x …
21022 …var derivativeY = [-3 * p1y + 3 * c1y, 6 * p1y - 12 * c1y + 6 * c2y, -3 * p1y + 9 * c1y - 9 * c2y …
21025 var t = (i - 0.5) / divisions;
21029 lengthMap[i] = lengthMap[i - 1] + l;
21032 …qual(p1x, c1x) && isEqual(p1y, c1y) ? Math.atan2(c2y - c1y, c2x - c1x) : Math.atan2(c1y - p1y, c1x…
21033 …qual(c2x, p2x) && isEqual(c2y, p2y) ? Math.atan2(c2y - c1y, c2x - c1x) : Math.atan2(p2y - c2y, p2x…
21087 var l1 = lengthMap[_i6 - 1],
21090 var _t = (_i6 - (l2 - l) / (l2 - l1)) / divisions,
21101 this.totalLength = Math.sqrt((p2x - p1x) * (p2x - p1x) + (p2y - p1y) * (p2y - p1y));
21102 this.startPoint = [p1x, p1y, Math.atan2(p2y - p1y, p2x - p1x)];
21103 this.endPoint = [p2x, p2y, Math.atan2(p2y - p1y, p2x - p1x)];
21110 _x3 = this.startPoint[0] + r * (this.endPoint[0] - this.startPoint[0]),
21111 _y3 = this.startPoint[1] + r * (this.endPoint[1] - this.startPoint[1]);
21208 …return this.C(currX + (lastCom === 'C' ? currX - lastCtrlX : 0), currY + (lastCom === 'C' ? currY
21211 …return this.C(currX + (lastCom === 'C' ? currX - lastCtrlX : 0), currY + (lastCom === 'C' ? currY
21214 var c1x = currX + 2 / 3 * (cx - currX),
21215 c1y = currY + 2 / 3 * (cy - currY),
21216 c2x = x + 2 / 3 * (cx - x),
21217 c2y = y + 2 / 3 * (cy - y);
21228 …return this.Q(currX + (lastCom === 'Q' ? currX - lastCtrlX : 0), currY + (lastCom === 'Q' ? currY
21231 …return this.Q(currX + (lastCom === 'Q' ? currX - lastCtrlX : 0), currY + (lastCom === 'Q' ? currY
21242 var x1 = Math.cos(fi) * (currX - x) / 2 + Math.sin(fi) * (currY - y) / 2,
21243 y1 = Math.cos(fi) * (currY - y) / 2 - Math.sin(fi) * (currX - x) / 2,
21249 …var r = Math.sqrt(Math.max(0, rx * rx * ry * ry - rx * rx * y1 * y1 - ry * ry * x1 * x1) / (rx * r…
21250 x2 = (fa === fs ? -1 : 1) * r * rx * y1 / ry,
21251 y2 = (fa === fs ? 1 : -1) * r * ry * x1 / rx;
21252 var cx = Math.cos(fi) * x2 - Math.sin(fi) * y2 + (currX + x) / 2,
21254 th1 = Math.atan2((y1 - y2) / ry, (x1 - x2) / rx),
21255 th2 = Math.atan2((-y1 - y2) / ry, (-x1 - x2) / rx);
21256 if (fs === 0 && th2 - th1 > 0) {
21257 th2 -= 2 * Math.PI;
21258 } else if (fs === 1 && th2 - th1 < 0) {
21261 var segms = Math.ceil(Math.abs(th2 - th1) / (Math.PI / precision));
21263 var th3 = th1 + i * (th2 - th1) / segms,
21264 th4 = th1 + (i + 1) * (th2 - th1) / segms,
21265 t = 4 / 3 * Math.tan((th4 - th3) / 4);
21266 …var c1x = cx + Math.cos(fi) * rx * (Math.cos(th3) - t * Math.sin(th3)) - Math.sin(fi) * ry * (Math…
21267 …c1y = cy + Math.sin(fi) * rx * (Math.cos(th3) - t * Math.sin(th3)) + Math.cos(fi) * ry * (Math.sin…
21268 … Math.cos(fi) * rx * (Math.cos(th4) + t * Math.sin(th4)) - Math.sin(fi) * ry * (Math.sin(th4) - t …
21269 …rx * (Math.cos(th4) + t * Math.sin(th4)) + Math.cos(fi) * ry * (Math.sin(th4) - t * Math.cos(th4)),
21270 endX = cx + Math.cos(fi) * rx * Math.cos(th4) - Math.sin(fi) * ry * Math.sin(th4),
21272 this.addCommand(['curve', i === 0, i === segms - 1, c1x, c1y, c2x, c2y, endX, endY]);
21315 var bbox = [Infinity, Infinity, -Infinity, -Infinity];
21339 if (bbox[2] === -Infinity) {
21342 if (bbox[3] === -Infinity) {
21354 l -= this.pathSegments[i].totalLength;
21427 … if (isNotEqual(segment.totalLength, 0) || j === 0 || j === subPath.pathSegments.length - 1) {
21470 if (this.stack.indexOf(svgObj) === -1) {
21495 if (this.stack.indexOf(_svgObj) === -1) {
21513 }[unit] * (isFontSize ? percent : this.get('font-size'));
21599 return arguments[arguments.length - 1];
21638 case 'font-size':
21641 case 'baseline-shift':
21642 result = this.computeLength(value, this.get('font-size'));
21644 case 'font-family':
21648 case 'stroke-opacity':
21649 case 'fill-opacity':
21650 case 'stop-opacity':
21659 case 'stroke-dasharray':
21708 case 'stop-color':
21717 case 'marker-start':
21718 case 'marker-mid':
21719 case 'marker-end':
21720 case 'clip-path':
21728 case 'stroke-width':
21734 case 'stroke-miterlimit':
21740 case 'word-spacing':
21741 case 'letter-spacing':
21744 case 'stroke-dashoffset':
21749 var dasharray = this.get('stroke-dasharray');
21771 if (!child.error && this.allowedChildren.indexOf(child.nodeName) !== -1) {
21806 if (this.get('clip-path') !== 'none') {
21807 var clipPath = new SvgElemClipPath(this.get('clip-path'), null);
21822 fillOpacity = this.get('fill-opacity');
21836 strokeOpacity = this.get('stroke-opacity');
21837 if (isClip || isEqual(this.get('stroke-width'), 0)) {
21938 …Ratio(aspectRatio, width, height, viewBox[2], viewBox[3]), [1, 0, 0, 1, -viewBox[0], -viewBox[1]]);
21958 this.allowedChildren = ['textPath', 'tspan', '#text', '#cdata-section', 'a'];
21964 if (this.link.match(/^(?:[a-z][a-z0-9+.-]*:|\/\/)?/i) && this.getChildren().length) {
22004 …Ratio(aspectRatio, width, height, viewBox[2], viewBox[3]), [1, 0, 0, 1, -viewBox[0], -viewBox[1]]);
22098 x = (x - bBox[0]) / (bBox[2] - bBox[0]) || 0;
22099 y = (y - bBox[1]) / (bBox[3] - bBox[1]) || 0;
22100 width = width / (bBox[2] - bBox[0]) || 0;
22101 height = height / (bBox[3] - bBox[1]) || 0;
22103 x = bBox[0] + x * (bBox[2] - bBox[0]);
22104 y = bBox[1] + y * (bBox[3] - bBox[1]);
22105 width = width * (bBox[2] - bBox[0]);
22106 height = height * (bBox[3] - bBox[1]);
22110 …io(aspectRatio, width, height, viewBox[2], viewBox[3], 0), [1, 0, 0, 1, -viewBox[0], -viewBox[1]]),
22113 … matrix = multiplyMatrix([bBox[2] - bBox[0], 0, 0, bBox[3] - bBox[1], bBox[0], bBox[1]], matrix);
22169 stopColor = child.get('stop-color');
22173 return opacityToColor(stopColor, child.get('stop-opacity') * gOpacity, isMask);
22188 … matrix = multiplyMatrix([bBox[2] - bBox[0], 0, 0, bBox[3] - bBox[1], bBox[0], bBox[1]], matrix);
22205 var d = Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2)),
22210 x1 = x2 + (x1 - x2) * multiplier;
22211 y1 = y2 + (y1 - y2) * multiplier;
22213 … r2 = Math.max(r2, d * multiplier * (1 + 1e-6)); // fix for edge-case gradients see issue #84
22223 // See file 'gradient-repeat-maths.png'
22224- x2) * (x2 - x1) + (corner1[1] - y2) * (y2 - y1), (corner2[0] - x2) * (x2 - x1) + (corner2[1] - y…
22225- x1) * (x1 - x2) + (corner1[1] - y1) * (y1 - y2), (corner2[0] - x1) * (x1 - x2) + (corner2[1] - y…
22227- x2, 2) + Math.pow(corner1[1] - y2, 2), Math.pow(corner2[0] - x2, 2) + Math.pow(corner2[1] - y2, …
22235 …grad = doc.linearGradient(x1 - nBefore * (x2 - x1), y1 - nBefore * (y2 - y1), x2 + nAfter * (x2 -
22241 inOrder = spread !== 'reflect' || (n - nBefore) % 2 === 0;
22243 var _child = children[inOrder ? i : children.length - 1 - i],
22244 _stopColor = _child.get('stop-color');
22248 _stopColor = opacityToColor(_stopColor, _child.get('stop-opacity') * gOpacity, isMask);
22249 …offset = Math.max(offset, inOrder ? _child.getPercent('offset', 0) : 1 - _child.getPercent('offset…
22257 if (i === children.length - 1 && offset < 1) {
22294 lineWidth = this.get('stroke-width'),
22295 lineCap = this.get('stroke-linecap');
22309 doc.rect(_x4 - 0.5 * lineWidth, _y4 - 0.5 * lineWidth, lineWidth, lineWidth);
22318 var dashArray = this.get('stroke-dasharray'),
22319 dashOffset = this.get('stroke-dashoffset');
22327 …doc.lineWidth(lineWidth).miterLimit(this.get('stroke-miterlimit')).lineJoin(this.get('stroke-linej…
22337 doc.fillAndStroke(this.get('fill-rule'));
22339 doc.fill(this.get('fill-rule'));
22344 var markerStart = this.get('marker-start'),
22345 markerMid = this.get('marker-mid'),
22346 markerEnd = this.get('marker-end');
22354 for (var i = 1; i < markersPos.length - 1; i++) {
22361 _marker2.drawMarker(false, isMask, markersPos[markersPos.length - 1], lineWidth);
22371 doc.fill(this.get('clip-rule'));
22395 …w - rx, y).A(rx, ry, 0, 0, 1, x + w, y + ry).L(x + w, y + h - ry).A(rx, ry, 0, 0, 1, x + w - rx, y…
22409 …this.shape = new SvgShape().M(cx + r, cy).A(r, r, 0, 0, 1, cx - r, cy).A(r, r, 0, 0, 1, cx + r, cy…
22421 …this.shape = new SvgShape().M(cx + rx, cy).A(rx, ry, 0, 0, 1, cx - rx, cy).A(rx, ry, 0, 0, 1, cx +…
22438 for (var i = 0; i < points.length - 1; i += 2) {
22456 for (var i = 0; i < points.length - 1; i += 2) {
22495 …doc.transform(Math.cos(rotate) * scale, Math.sin(rotate) * scale, -Math.sin(rotate) * scale, Math.…
22500 …[0] * (viewBox[0] + viewBox[2] / 2 - refX) - width / 2, aspectRatioMatrix[3] * (viewBox[1] + viewB…
22503 doc.translate(-refX, -refY);
22523 doc.transform(bBox[2] - bBox[0], 0, 0, bBox[3] - bBox[1], bBox[0], bBox[1]);
22539 x = this.getLength('x', this.getVWidth(), -0.1 * (bBox[2] - bBox[0]) + bBox[0]);
22540 y = this.getLength('y', this.getVHeight(), -0.1 * (bBox[3] - bBox[1]) + bBox[1]);
22541 w = this.getLength('width', this.getVWidth(), 1.2 * (bBox[2] - bBox[0]));
22542 h = this.getLength('height', this.getVHeight(), 1.2 * (bBox[3] - bBox[1]));
22544 x = this.getLength('x', this.getVWidth(), -0.1) * (bBox[2] - bBox[0]) + bBox[0];
22545 y = this.getLength('y', this.getVHeight(), -0.1) * (bBox[3] - bBox[1]) + bBox[1];
22546 w = this.getLength('width', this.getVWidth(), 1.2) * (bBox[2] - bBox[0]);
22547 h = this.getLength('height', this.getVHeight(), 1.2) * (bBox[3] - bBox[1]);
22551 doc.transform(bBox[2] - bBox[0], 0, 0, bBox[3] - bBox[1], bBox[0], bBox[1]);
22562 this.allowedChildren = ['tspan', '#text', '#cdata-section', 'a'];
22570 dy0 = -pos.ascent * Math.cos(pos.rotate),
22572 dy1 = -pos.descent * Math.cos(pos.rotate),
22584 if (this.get('text-decoration') === 'underline') {
22585 this.decorate(0.05 * this._font.size, -0.075 * this._font.size, isClip, isMask);
22587 if (this.get('text-decoration') === 'overline') {
22592 strokeWidth = this.get('stroke-width');
22613 case '#cdata-section':
22623 …imit(this.get('stroke-miterlimit')).lineJoin(this.get('stroke-linejoin')).lineCap(this.get('stroke
22624 phase: this.get('stroke-dashoffset')
22633 skew = this._font.fauxItalic ? -0.25 : 0;
22634 …docSetTextMatrix(cos * pos[j].scale, sin * pos[j].scale, cos * skew - sin, sin * skew + cos, pos[j…
22643 if (this.get('text-decoration') === 'line-through') {
22655 …ke-width')).miterLimit(this.get('stroke-miterlimit')).lineJoin(this.get('stroke-linejoin')).lineCa…
22656 phase: this.get('stroke-dashoffset')
22662 dy0 = -(linePosition + lineWidth / 2) * Math.cos(pos[j].rotate),
22663 dx1 = (linePosition - lineWidth / 2) * Math.sin(pos[j].rotate),
22664 dy1 = -(linePosition - lineWidth / 2) * Math.cos(pos[j].rotate),
22703 this.allowedChildren = ['textPath', 'tspan', '#text', '#cdata-section', 'a'];
22715 var last = currentChunk[currentChunk.length - 1];
22717 var width = last.x + last.width - first.x;
22727 currentChunk[i].x -= anchordx;
22734 lastChar = pos[pos.length - 1],
22738 var textScale = length / (endX - startX);
22741 pos[j].x = startX + textScale * (pos[j].x - startX);
22748 var spaceDiff = (length - (endX - startX)) / (pos.length - 1);
22754 currentX += length - (endX - startX);
22762 …currentElem._defRot = currentElem.chooseValue(currentElem._rot[currentElem._rot.length - 1], paren…
22770 …k = fontCallback(currentElem.get('font-family'), currentElem.get('font-weight') === 'bold', curren…
22780 size: currentElem.get('font-size'),
22786 wordSpacing = currentElem.get('word-spacing'),
22787 letterSpacing = currentElem.get('letter-spacing'),
22788 textAnchor = currentElem.get('text-anchor'),
22790 …font.size, currentElem.get('alignment-baseline') || currentElem.get('dominant-baseline'), currentE…
22805 case '#cdata-section':
22927 …currentElem._pos[j].x = pointOnPath[0] - 0.5 * currentElem._pos[j].width * Math.cos(pointOnPath[2]…
22928 …currentElem._pos[j].y = pointOnPath[1] - 0.5 * currentElem._pos[j].width * Math.sin(pointOnPath[2]…
22993 if (doc._registeredFonts.hasOwnProperty(family + '-BoldItalic')) {
22994 return family + '-BoldItalic';
22995 } else if (doc._registeredFonts.hasOwnProperty(family + '-Italic')) {
22997 return family + '-Italic';
22998 } else if (doc._registeredFonts.hasOwnProperty(family + '-Bold')) {
23000 return family + '-Bold';
23008 if (doc._registeredFonts.hasOwnProperty(family + '-Bold')) {
23009 return family + '-Bold';
23016 if (doc._registeredFonts.hasOwnProperty(family + '-Italic')) {
23017 return family + '-Italic';
23031 return 'Times-BoldItalic';
23034 return 'Times-Bold';
23037 return 'Times-Italic';
23040 return 'Times-Roman';
23044 return 'Courier-BoldOblique';
23047 return 'Courier-Bold';
23050 return 'Courier-Oblique';
23055 } else if (family.match(/(?:^|,)\s*sans-serif\s*$/) || true) {
23057 return 'Helvetica-BoldOblique';
23060 return 'Helvetica-Bold';
23063 return 'Helvetica-Oblique';
23142 // Support decoding URL-safe base64 strings, as Node.js does.
23144 revLookup['-'.charCodeAt(0)] = 62
23155 // See: https://github.com/beatgammit/base64-js/issues/42
23157 if (validLen === -1) validLen = len
23161 : 4 - (validLen % 4)
23171 return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
23175 return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen
23190 ? validLen - 4
23252 for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) {
23260 tmp = uint8[len - 1]
23267 tmp = (uint8[len - 2] << 8) + uint8[len - 1]
23291 http://www.apache.org/licenses/LICENSE-2.0
23304 var BROTLI_IBUF_MASK = (2 * BROTLI_READ_SIZE - 1);
23325 this.val_ = 0; /* pre-fetched bits */
23327 this.bit_pos_ = 0; /* current bit-reading position in val_ */
23328 this.bit_end_pos_ = 0; /* bit-reading end position from LSB of val_ */
23345 - the input callback returned an error, or
23346 - there is no more input and the position is past the end of the stream.
23392 this.bit_pos_ = this.bit_pos_ - 8 >>> 0;
23393 this.bit_end_pos_ = this.bit_end_pos_ - 8 >>> 0;
23399 if (32 - this.bit_pos_ < n_bits) {
23422 http://www.apache.org/licenses/LICENSE-2.0
23435 CONTEXT_UTF8: second-order context model tuned for UTF8-encoded text,
23436 CONTEXT_SIGNED: second-order context model tuned for signed integers.
23450 0 : non-ASCII control
23462 12 : upper-case vowel
23463 13 : upper-case consonant
23464 14 : lower-case vowel
23465 15 : lower-case consonant
23471 2 : upper-case letter, number
23472 3 : lower-case letter
23483 - continuation byte: the next byte is probably ASCII or lead byte (assuming
23484 4-byte UTF8 characters are rare) and the context id is 0 or 1.
23485 - lead byte (192 - 207): next byte is ASCII or lead byte, context is 0 or 1
23486 - lead byte (208 - 255): next byte is continuation byte, context is 2 or 3
23491 |--------\-----------------------------------------------------------------|
23493 | Second \---------------------------------------------------------------|
23495 | \ (0-127) | (128-191) | (192-) |
23498 | (0-127) | context: 4 - 63 | | context: 2 - 3 |
23499 |-------------|-------------------|---------------------|------------------|
23501 | (128-191) | context: 4 - 63 | context: 0 - 1 | context: 2 - 3 |
23502 |-------------|-------------------|---------------------|------------------|
23504 | (192-207) | | context: 0 - 1 | |
23505 |-------------|-------------------|---------------------|------------------|
23507 | (208-) | | context: 2 - 3 | |
23508 |-------------|-------------------|---------------------|------------------|
23514 For any context modeling modes, the context ids can be calculated by |-ing
23680 http://www.apache.org/licenses/LICENSE-2.0
23724 0, 0, 0, 0, -1, 1, -2, 2, -3, 3, -1, 1, -2, 2, -3, 3
23751 /* Decodes a number in the range [0..255], by reading 1 - 11 bits. */
23819 /* Decodes the next Huffman code from bit-stream. */
23826 nbits = table[index].bits - HUFFMAN_TABLE_BITS;
23830 index += (br.val_ >>> br.bit_pos_) & ((1 << nbits) - 1);
23863 space -= 32768 >> code_len;
23866 var extra_bits = code_len - 14;
23879 repeat -= 2;
23883 repeat_delta = repeat - old_repeat;
23894 space -= repeat_delta << (15 - repeat_code_len);
23920 var max_bits_counter = alphabet_size - 1;
23969 } else { /* Decode Huffman-coded code lengths. */
23991 space -= (32 >> v);
24026 val = code - NUM_DISTANCE_SHORT_CODES + 1;
24034 for (; i; --i) v[i] = v[i - 1];
24107 while (--reps) {
24115 context_map[i] = code - max_run_length_prefix;
24134 block_type = ringbuffers[ringbuffer + ((indexes[index] - 1) & 1)] + 1;
24136 block_type = type_code - 2;
24139 block_type -= max_block_type;
24152 /* For short lengths copy byte-by-byte */
24154 while (len-- > 0) {
24169 /* Copy remaining 0-4 bytes from br.val_ to ringbuffer. */
24174 --len;
24178 nbytes = (br.bit_end_pos_ - br.bit_pos_) >> 3;
24180 var tail = BrotliBitReader.IBUF_MASK + 1 - br_pos;
24184 nbytes -= tail;
24186 len -= tail;
24194 len -= nbytes;
24200 rb_pos -= rb_size;
24209 nbytes = rb_size - rb_pos;
24214 len -= nbytes;
24232 var pad_bits = br.readBits(new_bit_pos - br.bit_pos_);
24291 - always doing two 8-byte copies for fast backward copying
24292 - transforms
24293 - flushing the input ringbuffer when decoding uncompressed blocks */
24300 max_backward_distance = (1 << window_bits) - 16;
24303 ringbuffer_mask = ringbuffer_size - 1;
24363 for (; meta_block_remaining_len > 0; --meta_block_remaining_len) {
24398 distance_postfix_mask = (1 << distance_postfix_bits) - 1;
24452 --block_length[1];
24456 range_idx -= 2;
24457 distance_code = -1;
24467 prev_byte1 = ringbuffer[pos-1 & ringbuffer_mask];
24468 prev_byte2 = ringbuffer[pos-2 & ringbuffer_mask];
24486 --block_length[0];
24495 meta_block_remaining_len -= insert_length;
24510 --block_length[2];
24511 context = (copy_length > 4 ? 3 : copy_length - 2) & 0xff;
24518 distance_code -= num_direct_distance_codes;
24522 offset = ((2 + (distance_code & 1)) << nbits) - 4;
24549 var word_id = distance - max_distance - 1;
24551 var mask = (1 << shift) - 1;
24559 meta_block_remaining_len -= len;
24563 for (var _x = 0; _x < (copy_dst - ringbuffer_end); _x++)
24586 ringbuffer[pos & ringbuffer_mask] = ringbuffer[(pos - distance) & ringbuffer_mask];
24591 --meta_block_remaining_len;
24598 prev_byte1 = ringbuffer[(pos - 1) & ringbuffer_mask];
24599 prev_byte2 = ringbuffer[(pos - 2) & ringbuffer_mask];
24622 * The normal dictionary-data.js is quite large, which makes it
24640K/JTWI3t9YyVyRhlP4CCoUk/mmF7+r2pilVBjxXBHFaBfBtr9hbVn2zDuI0kEOG3kBx8CGdPOjX1ph1POOZJUO1JEGG0jzUy2t…
24654 http://www.apache.org/licenses/LICENSE-2.0
24701 bit-wise reversal of the len least significant bits of key. */
24703 var step = 1 << (len - 1);
24707 return (key & (step - 1)) + step;
24714 end -= step;
24723 var left = 1 << (len - root_bits);
24725 left -= count[len];
24730 return len - root_bits;
24786 for (; count[len] > 0; --count[len]) {
24794 mask = total_size - 1;
24795 low = -1;
24797 for (; count[len] > 0; --count[len]) {
24804 …e + low] = new HuffmanCode((table_bits + root_bits) & 0xff, ((table - start_table) - low) & 0xffff…
24806 code = new HuffmanCode((len - root_bits) & 0xff, sorted[symbol++] & 0xffff);
24827 http://www.apache.org/licenses/LICENSE-2.0
24895 count = this.buffer.length - this.pos;
24935 http://www.apache.org/licenses/LICENSE-2.0
25117 /* An overly simplified uppercasing model for utf-8. */
25132 var skip = t < kOmitFirst1 ? 0 : t - (kOmitFirst1 - 1);
25147 len -= skip;
25150 len -= t;
25157 uppercase = idx - len;
25165 len -= step;
25174 return idx - start_idx;
25489 assert(level >= -1 && level <= 9, 'invalid compression level');
25527 this.windowBits = -1 * this.windowBits;
25638 binding.Z_MIN_LEVEL = -1;
25850 // minimal 2-byte header
25861 // gzip - bigger header, same deflate compression
25872 // raw - no header
25883 // auto-detect header.
26103 var availOutBefore = this._chunkSize - this._offset;
26168 var have = availOutBefore - availOutAfter;
26195 inOff += availInBefore - availInAfter;
26237 if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
26281 { value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }
26318 * @param `parent` - the object to be cloned
26319 * @param `circular` - set to true if the object to be cloned may contain
26320 * circular references. (optional - true by default)
26321 * @param `depth` - set to a number if the object is only to be cloned to
26322 * a particular depth. (optional - defaults to Infinity)
26323 * @param `prototype` - sets the prototype to be used when cloning an object.
26324 * (optional - defaults to parent prototype).
26393 if (index != -1) {
26409 child[i] = _clone(parent[i], depth - 1);
26509 // TODO: Remove from `core-js@4`
26583 // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
26607 // https://tc39.es/ecma262/#sec-advancestringindex
26661 // https://tc39.es/ecma262/#sec-array.prototype.copywithin
26662 // eslint-disable-next-line es/no-array-prototype-copywithin -- safe
26669 var count = min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to);
26672 inc = -1;
26673 from += count - 1;
26674 to += count - 1;
26676 while (count-- > 0) {
26697 // https://tc39.es/ecma262/#sec-array.prototype.fill
26723 // https://tc39.es/ecma262/#sec-array.prototype.foreach
26726 // eslint-disable-next-line es/no-array-prototype-foreach -- safe
26766 // https://tc39.es/ecma262/#sec-array.from
26777 // if the target is not iterable or it's an array with the default iterator - use a simple case
26816 // eslint-disable-next-line no-self-compare -- NaN check
26819 // eslint-disable-next-line no-self-compare -- NaN check
26821 // Array#indexOf ignores holes, Array#includes - not
26824 } return !IS_INCLUDES && -1;
26830 // https://tc39.es/ecma262/#sec-array.prototype.includes
26833 // https://tc39.es/ecma262/#sec-array.prototype.indexof
26886 return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target;
26892 // https://tc39.es/ecma262/#sec-array.prototype.foreach
26895 // https://tc39.es/ecma262/#sec-array.prototype.map
26898 // https://tc39.es/ecma262/#sec-array.prototype.filter
26901 // https://tc39.es/ecma262/#sec-array.prototype.some
26904 // https://tc39.es/ecma262/#sec-array.prototype.every
26907 // https://tc39.es/ecma262/#sec-array.prototype.find
26910 // https://tc39.es/ecma262/#sec-array.prototype.findIndex
26913 // https://github.com/tc39/proposal-array-filtering
26925 /* eslint-disable es/no-array-prototype-lastindexof -- safe */
26934 var NEGATIVE_ZERO = !!$lastIndexOf && 1 / [1].lastIndexOf(1, -0) < 0;
26939 // https://tc39.es/ecma262/#sec-array.prototype.lastindexof
26940 module.exports = FORCED ? function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) {
26941 // convert -0 to +0
26945 var index = length - 1;
26948 for (;index >= 0; index--) if (index in O && O[index] === searchElement) return index || 0;
26949 return -1;
26967 // https://github.com/zloirock/core-js/issues/677
26991 // eslint-disable-next-line no-useless-call,no-throw-literal -- required for testing
27017 var index = IS_RIGHT ? length - 1 : 0;
27018 var i = IS_RIGHT ? -1 : 1;
27039 // https://tc39.es/ecma262/#sec-array.prototype.reduce
27042 // https://tc39.es/ecma262/#sec-array.prototype.reduceright
27085 while (j && comparefn(array[j - 1], element) > 0) {
27086 array[j] = array[--j];
27123 // https://tc39.es/ecma262/#sec-arrayspeciescreate
27128 // cross-realm fallback
27146 // https://tc39.es/ecma262/#sec-arrayspeciescreate
27193 // eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing
27226 return stringSlice(toString(it), 8, -1);
27287 while (dropEntries--) stack = replace(stack, V8_OR_CHAKRA_STACK_ENTRY, '');
27375 // https://tc39.es/ecma262/#sec-map.prototype.clear
27376 // https://tc39.es/ecma262/#sec-set.prototype.clear
27393 // https://tc39.es/ecma262/#sec-map.prototype.delete
27394 // https://tc39.es/ecma262/#sec-set.prototype.delete
27408 if (DESCRIPTORS) state.size--;
27409 else that.size--;
27413 // https://tc39.es/ecma262/#sec-map.prototype.foreach
27414 // https://tc39.es/ecma262/#sec-set.prototype.foreach
27426 // https://tc39.es/ecma262/#sec-map.prototype.has
27427 // https://tc39.es/ecma262/#sec-set.prototype.has
27435 // https://tc39.es/ecma262/#sec-map.prototype.get
27441 // https://tc39.es/ecma262/#sec-map.prototype.set
27447 // https://tc39.es/ecma262/#sec-set.prototype.add
27464 // https://tc39.es/ecma262/#sec-map.prototype.entries
27465 // https://tc39.es/ecma262/#sec-map.prototype.keys
27466 // https://tc39.es/ecma262/#sec-map.prototype.values
27467 // https://tc39.es/ecma262/#sec-map.prototype-@@iterator
27468 // https://tc39.es/ecma262/#sec-set.prototype.entries
27469 // https://tc39.es/ecma262/#sec-set.prototype.keys
27470 // https://tc39.es/ecma262/#sec-set.prototype.values
27471 // https://tc39.es/ecma262/#sec-set.prototype-@@iterator
27499 // https://tc39.es/ecma262/#sec-get-map-@@species
27500 // https://tc39.es/ecma262/#sec-get-set-@@species
27529 var IS_MAP = CONSTRUCTOR_NAME.indexOf('Map') !== -1;
27530 var IS_WEAK = CONSTRUCTOR_NAME.indexOf('Weak') !== -1;
27570 var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance;
27571 // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false
27573 // most early implementations doesn't supports iterables, most modern - not close it correctly
27574 // eslint-disable-next-line no-new -- required for testing
27576 // for early implementations -0 and +0 not the same
27578 // V8 ~ Chromium 42- fails only with 5+ elements
27581 while (index--) $instance[ADDER](index, index);
27582 return !$instance.has(-0);
27672 // eslint-disable-next-line es/no-object-getprototypeof -- required for testing
27690 // https://tc39.es/ecma262/#sec-createhtml
27787 // https://tc39.es/ecma262/#sec-date.prototype-@@toprimitive
27930 // eslint-disable-next-line es/no-object-defineproperty -- required for testing
27958 // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods
28141 // IE8- don't enum bug keys
28164 // eslint-disable-next-line es/no-object-defineproperty -- safe
28184 options.target - name of the target object
28185 options.global - target is the global object
28186 options.stat - export as static methods of target
28187 options.proto - export as prototype methods of target
28188 options.real - real prototype method for the `pure` version
28189 options.forced - export even if the native feature is available
28190 options.bind - bind methods to the target, required for the `pure` version
28191 …options.wrap - wrap constructors to preventing global pollution, required for the `pure` ve…
28192 options.unsafe - use the simple assignment of property instead of delete + defineProperty
28193 options.sham - add a flag to not completely full polyfills
28194 options.enumerable - export as enumerable property
28195 options.noTargetGet - prevent calling a getter on target
28196 options.name - the .name of the function if it does not match the key
28253 // TODO: Remove from `core-js@4` since it's moved to entry points
28269 // String methods call symbol-named RegEp methods
28276 // Symbol-named RegExp methods call .exec
28283 // https://github.com/zloirock/core-js/issues/306
28336 …// eslint-disable-next-line es/no-object-isextensible, es/no-object-preventextensions -- required …
28351 // eslint-disable-next-line es/no-reflect -- safe
28403 // https://tc39.es/ecma262/#sec-function.prototype.bind
28438 // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
28537 // https://tc39.es/ecma262/#sec-getmethod
28560 // https://tc39.es/ecma262/#sec-getsubstitution
28577 capture = namedCaptures[stringSlice(ch, 1, -1)];
28585 …if (f <= m) return captures[f - 1] === undefined ? charAt(ch, 1) : captures[f - 1] + charAt(ch, 1);
28588 capture = captures[n - 1];
28604 // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028
28606 // eslint-disable-next-line es/no-global-this -- safe
28609 // eslint-disable-next-line no-restricted-globals -- safe
28612 // eslint-disable-next-line no-new-func -- fallback
28627 // https://tc39.es/ecma262/#sec-hasownproperty
28677 // eslint-disable-next-line es/no-object-defineproperty -- requied for testing
28701 var exponentLength = bytes * 8 - mantissaLength - 1;
28702 var eMax = (1 << exponentLength) - 1;
28704 var rt = mantissaLength === 23 ? pow(2, -24) - pow(2, -77) : 0;
28709 // eslint-disable-next-line no-self-compare -- NaN check
28711 // eslint-disable-next-line no-self-compare -- NaN check
28716 if (number * (c = pow(2, -exponent)) < 1) {
28717 exponent--;
28723 number += rt * pow(2, 1 - eBias);
28733 mantissa = (number * c - 1) * pow(2, mantissaLength);
28736 mantissa = number * pow(2, eBias - 1) * pow(2, mantissaLength);
28740 …for (; mantissaLength >= 8; buffer[index++] = mantissa & 255, mantissa /= 256, mantissaLength -= 8…
28743 …for (; exponentLength > 0; buffer[index++] = exponent & 255, exponent /= 256, exponentLength -= 8);
28744 buffer[--index] |= sign * 128;
28750 var exponentLength = bytes * 8 - mantissaLength - 1;
28751 var eMax = (1 << exponentLength) - 1;
28753 var nBits = exponentLength - 7;
28754 var index = bytes - 1;
28755 var sign = buffer[index--];
28759 for (; nBits > 0; exponent = exponent * 256 + buffer[index], index--, nBits -= 8);
28760 mantissa = exponent & (1 << -nBits) - 1;
28761 exponent >>= -nBits;
28763 for (; nBits > 0; mantissa = mantissa * 256 + buffer[index], index--, nBits -= 8);
28765 exponent = 1 - eBias;
28767 return mantissa ? NaN : sign ? -Infinity : Infinity;
28770 exponent = exponent - eBias;
28771 } return (sign ? -1 : 1) * mantissa * pow(2, exponent - mantissaLength);
28793 // fallback for non-array-like ES3 and non-enumerable old V8 strings
28796 // eslint-disable-next-line no-prototype-builtins -- safe
28812 // makes subclassing work correct for wrapped built-ins
28818 // we haven't completely correct pre-ES6 way for getting `new.target`, so use this
28839 // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper
28858 // https://tc39.es/proposal-error-cause/#sec-errorobjects-install-error-cause
28886 // eslint-disable-next-line es/no-object-isextensible -- safe
28924 // add metadata on freeze-family methods calling
29067 // https://tc39.es/ecma262/#sec-isarray
29068 // eslint-disable-next-line es/no-array-isarray -- safe
29080 // https://tc39.es/ecma262/#sec-iscallable
29126 // https://tc39.es/ecma262/#sec-isconstructor
29175 // https://tc39.es/ecma262/#sec-isintegralnumber
29176 // eslint-disable-next-line es/no-number-isinteger -- safe
29214 // https://tc39.es/ecma262/#sec-isregexp
29364 // https://tc39.es/ecma262/#sec-%iteratorprototype%-object
29367 /* eslint-disable es/no-array-prototype-keys -- safe */
29380 // FF44- legacy iterators case
29388 // https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator
29417 // https://tc39.es/ecma262/#sec-lengthofarraylike
29466 // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339
29467 // also except WebOS Webkit https://github.com/zloirock/core-js/issues/898
29475 // environments with maybe non-completely correct, but existent Promise
29490 // for other environments - macrotask based on:
29491 // - setImmediate
29492 // - MessageChannel
29493 // - window.postMessag
29494 // - onreadystatechange
29495 // - setTimeout
29497 // strange IE + webpack dev server bug - use .bind(global)
29530 /* eslint-disable es/no-symbol -- required for testing */
29534 // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing
29538 // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances
29540 // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances
29580 // https://tc39.es/ecma262/#sec-newpromisecapability
29625 // https://tc39.es/ecma262/#sec-number.isfinite
29626 // eslint-disable-next-line es/no-number-isfinite -- safe
29649 // eslint-disable-next-line es/no-object-assign -- safe
29651 // eslint-disable-next-line es/no-object-defineproperty -- required for testing
29656 // https://tc39.es/ecma262/#sec-object.assign
29671 // eslint-disable-next-line es/no-symbol -- safe
29677 }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.leng…
29702 /* global ActiveXObject -- old IE, WSH */
29740 // https://github.com/zloirock/core-js/issues/475
29751 // see https://github.com/es-shims/es5-shim/issues/150
29752 // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346
29765 while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]];
29772 // https://tc39.es/ecma262/#sec-object.create
29798 // https://tc39.es/ecma262/#sec-object.defineproperties
29799 // eslint-disable-next-line es/no-object-defineproperties -- safe
29824 // eslint-disable-next-line es/no-object-defineproperty -- safe
29828 // https://tc39.es/ecma262/#sec-object.defineproperty
29856 // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
29860 // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
29876 /* eslint-disable es/no-object-getownpropertynames -- safe */
29912 // https://tc39.es/ecma262/#sec-object.getownpropertynames
29913 // eslint-disable-next-line es/no-object-getownpropertynames -- safe
29924 // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe
29945 // https://tc39.es/ecma262/#sec-object.getprototypeof
30002 // https://tc39.es/ecma262/#sec-object.keys
30003 // eslint-disable-next-line es/no-object-keys -- safe
30017 // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
30024 // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable
30036 /* eslint-disable no-proto -- safe */
30042 // https://tc39.es/ecma262/#sec-object.setprototypeof
30044 // eslint-disable-next-line es/no-object-setprototypeof -- safe
30050 // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
30100 // https://tc39.es/ecma262/#sec-object.entries
30103 // https://tc39.es/ecma262/#sec-object.values
30119 // https://tc39.es/ecma262/#sec-object.prototype.tostring
30138 // https://tc39.es/ecma262/#sec-ordinarytoprimitive
30161 // all object keys, includes non-enumerable and symbols
30293 // https://tc39.es/ecma262/#sec-regexpexec
30313 /* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- te…
30314 /* eslint-disable regexp/no-useless-quantifier -- testing */
30326 var nativeReplace = shared('native-string-replace', String.prototype.replace);
30344 // nonparticipating capturing group, copied from es5-shim's String#split patch.
30350 // eslint-disable-next-line max-statements -- TODO
30374 if (indexOf(flags, 'g') === -1) {
30380 …if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt(str, re.lastIndex - 1) !== '\n'))…
30411 for (i = 1; i < arguments.length - 2; i++) {
30442 // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
30464 // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError
30489 // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError
30506 // babel-minify and Closure Compiler transpiles RegExp('(?<a>b)', 'g') -> /(?<a>b)/g and it causes …
30526 // https://tc39.es/ecma262/#sec-requireobjectcoercible
30540 // eslint-disable-next-line es/no-object-defineproperty -- safe
30620 var SHARED = '__core-js_shared__';
30655 // https://tc39.es/ecma262/#sec-speciesconstructor
30709 : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000;
30715 // https://tc39.es/ecma262/#sec-string.prototype.codepointat
30738 // https://tc39.es/ecma262/#sec-string.prototype.repeat
30798 // https://tc39.es/ecma262/#sec-string.prototype.trimstart
30801 // https://tc39.es/ecma262/#sec-string.prototype.trimend
30804 // https://tc39.es/ecma262/#sec-string.prototype.trim
30839 // Deno throws a ReferenceError on `location` access without `--location` flag
30879 // Node.js 0.8-
30890 // except iOS - https://github.com/zloirock/core-js/issues/624
30907 // IE8-
30937 // https://tc39.es/ecma262/#sec-thisnumbervalue
30972 // https://tc39.es/ecma262/#sec-toindex
30987 // toObject with fallback for non-array-like ES3 strings
31005 // https://tc39.es/ecma262/#sec-tointegerorinfinity
31008 // eslint-disable-next-line no-self-compare -- safe
31023 // https://tc39.es/ecma262/#sec-tolength
31025 …return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == …
31040 // https://tc39.es/ecma262/#sec-toobject
31097 // https://tc39.es/ecma262/#sec-toprimitive
31122 // https://tc39.es/ecma262/#sec-topropertykey
31351 byteLength = $len - byteOffset;
31433 /* eslint-disable no-new -- required for testing */
31445 new Int8Array(-1);
31452 // Safari (11+) bug - a reason why even Safari 13 should load a typed array polyfill
31525 // https://tc39.es/ecma262/#typedarray-species-create
31552 /* eslint-disable es/no-symbol -- required for testing */
31661 // https://tc39.es/ecma262/#sec-aggregate-error-constructor
31694 // https://github.com/zloirock/core-js/issues/679
31712 // https://tc39.es/ecma262/#sec-array.prototype.concat
31715 // eslint-disable-next-line no-unused-vars -- required for `.length`
31720 var i, k, length, len, E;
31721 for (i = -1, length = arguments.length; i < length; i++) {
31722 E = i === -1 ? O : arguments[i];
31726 for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]);
31748 // https://tc39.es/ecma262/#sec-array.prototype.copywithin
31753 // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
31767 // https://tc39.es/ecma262/#sec-array.prototype.fill
31772 // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
31790 // https://tc39.es/ecma262/#sec-array.prototype.filter
31809 // eslint-disable-next-line es/no-array-from -- required for testing
31814 // https://tc39.es/ecma262/#sec-array.from
31832 // https://tc39.es/ecma262/#sec-array.prototype.includes
31839 // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
31861 // https://tc39.es/ecma262/#sec-array.prototype.entries
31863 // https://tc39.es/ecma262/#sec-array.prototype.keys
31865 // https://tc39.es/ecma262/#sec-array.prototype.values
31867 // https://tc39.es/ecma262/#sec-array.prototype-@@iterator
31869 // https://tc39.es/ecma262/#sec-createarrayiterator
31878 // https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next
31894 // https://tc39.es/ecma262/#sec-createunmappedargumentsobject
31895 // https://tc39.es/ecma262/#sec-createmappedargumentsobject
31898 // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables
31923 // https://tc39.es/ecma262/#sec-array.prototype.join
31945 // https://tc39.es/ecma262/#sec-array.prototype.map
31981 // https://tc39.es/ecma262/#sec-array.prototype.slice
31982 // fallback for not array-like ES3 strings and DOM objects
31987 var k = toAbsoluteIndex(start, length);
31993 // cross-realm fallback
32001 return un$Slice(O, k, fin);
32004 result = new (Constructor === undefined ? Array : Constructor)(max(fin - k, 0));
32005 for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]);
32037 // IE8-
32069 test.push({ k: chr + index, v: value });
32073 test.sort(function (a, b) { return b.v - a.v; });
32076 chr = test[index].k.charAt(0);
32077 if (result.charAt(result.length - 1) !== chr) result += chr;
32087 if (y === undefined) return -1;
32090 return toString(x) > toString(y) ? 1 : -1;
32095 // https://tc39.es/ecma262/#sec-array.prototype.sort
32151 // https://tc39.es/ecma262/#sec-array.prototype.splice
32159 var insertCount, actualDeleteCount, A, k, from, to;
32164 actualDeleteCount = len - actualStart;
32166 insertCount = argumentsLength - 2;
32167 actualDeleteCount = min(max(toIntegerOrInfinity(deleteCount), 0), len - actualStart);
32169 if (len + insertCount - actualDeleteCount > MAX_SAFE_INTEGER) {
32173 for (k = 0; k < actualDeleteCount; k++) {
32174 from = actualStart + k;
32175 if (from in O) createProperty(A, k, O[from]);
32179 for (k = actualStart; k < len - actualDeleteCount; k++) {
32180 from = k + actualDeleteCount;
32181 to = k + insertCount;
32185 for (k = len; k > len - actualDeleteCount + insertCount; k--) delete O[k - 1];
32187 for (k = len - actualDeleteCount; k > actualStart; k--) {
32188 from = k + actualDeleteCount - 1;
32189 to = k + insertCount - 1;
32194 for (k = 0; k < insertCount; k++) {
32195 O[k + actualStart] = arguments[k + 2];
32197 O.length = len - actualDeleteCount + insertCount;
32217 // https://tc39.es/ecma262/#sec-date.prototype-@@toprimitive
32240 // https://tc39.es/ecma262/#sec-function-instances-name
32264 // https://tc39.es/ecma262/#sec-globalthis
32279 // https://tc39.es/ecma262/#sec-json-@@tostringtag
32294 // https://tc39.es/ecma262/#sec-map-objects
32308 // https://tc39.es/ecma262/#sec-math-@@tostringtag
32344 // https://tc39.es/ecma262/#sec-tonumeric
32351 // https://tc39.es/ecma262/#sec-tonumber
32365 case 79: case 111: radix = 8; maxCode = 55; break; // fast equal of /^0o[0-7]+$/i
32381 // https://tc39.es/ecma262/#sec-number-constructor
32416 // https://tc39.es/ecma262/#sec-number.epsilon
32418 EPSILON: Math.pow(2, -52)
32431 // https://tc39.es/ecma262/#sec-number.isfinite
32444 // https://tc39.es/ecma262/#sec-number.isinteger
32473 return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc);
32490 var index = -1;
32502 while (--index >= 0) {
32512 while (--index >= 0) {
32515 s = s === '' ? t : s + repeat('0', 7 - t.length) + t;
32526 // V8 ~ Android 4.3-
32531 // https://tc39.es/ecma262/#sec-number.prototype.tofixed
32539 var e, z, j, k;
32542 // eslint-disable-next-line no-self-compare -- NaN check
32544 if (number <= -1e21 || number >= 1e21) return String(number);
32546 sign = '-';
32547 number = -number;
32549 if (number > 1e-21) {
32550 e = log(number * pow(2, 69, 1)) - 69;
32551 z = e < 0 ? number * pow(2, -e, 1) : number / pow(2, e, 1);
32553 e = 52 - e;
32559 j -= 7;
32562 j = e - 1;
32565 j -= 23;
32573 multiply(data, 1 << -e, 0);
32578 k = result.length;
32579 result = sign + (k <= fractDigits
32580 ? '0.' + repeat('0', fractDigits - k) + result
32581 : stringSlice(result, 0, k - fractDigits) + '.' + stringSlice(result, k - fractDigits));
32598 // https://tc39.es/ecma262/#sec-object.assign
32599 // eslint-disable-next-line es/no-object-assign -- required for testing
32616 // eslint-disable-next-line es/no-object-freeze -- safe
32621 // https://tc39.es/ecma262/#sec-object.freeze
32644 // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor
32665 // https://tc39.es/ecma262/#sec-object.getownpropertydescriptors
32697 // https://tc39.es/ecma262/#sec-object.getprototypeof
32719 // https://tc39.es/ecma262/#sec-object.keys
32737 // https://tc39.es/ecma262/#sec-object.prototype.tostring
32752 // https://tc39.es/ecma262/#sec-object.values
32775 // https://tc39.es/ecma262/#sec-promise.allsettled
32795 --remaining || resolve(values);
32800 --remaining || resolve(values);
32803 --remaining || resolve(values);
32829 // https://tc39.es/ecma262/#sec-promise.any
32855 --remaining || reject(new AggregateError(errors, PROMISE_ANY_ERROR));
32858 --remaining || reject(new AggregateError(errors, PROMISE_ANY_ERROR));
32889 // https://tc39.es/ecma262/#sec-promise.prototype.finally
32905 // makes sure that native promise-based APIs `Promise#finally` properly works with patched `Promise…
32992 // https://github.com/zloirock/core-js/issues/679
33025 // variable length - can't use forEach
33049 reject(TypeError('Promise-chain cycle'));
33090 … // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should
33169 // eslint-disable-next-line no-unused-vars -- required for `.length`
33184 // https://tc39.es/ecma262/#sec-promise.prototype.then
33198 // https://tc39.es/ecma262/#sec-promise.prototype.catch
33220 // make `Promise#then` return a polyfilled `Promise` for native promise-based APIs
33226 // https://github.com/zloirock/core-js/issues/640
33229 …// makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#…
33233 // make `.constructor === Promise` work for native promise-based APIs
33238 // make `instanceof Promise` work for native promise-based APIs
33257 // https://tc39.es/ecma262/#sec-promise.reject
33267 // https://tc39.es/ecma262/#sec-promise.resolve
33275 // https://tc39.es/ecma262/#sec-promise.all
33294 --remaining || resolve(values);
33297 --remaining || resolve(values);
33303 // https://tc39.es/ecma262/#sec-promise.race
33340 // https://tc39.es/ecma262/#sec-reflect.construct
33361 // w/o altered newTarget, optimization for 0-4 arguments
33374 // with altered newTarget, not support built-in constructors
33394 // https://tc39.es/ecma262/#sec-regexp.prototype.exec
33413 // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe
33418 // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags
33447 // FF44- RegExp#toString has a wrong name
33451 // https://tc39.es/ecma262/#sec-regexp.prototype.tostring
33474 // https://tc39.es/ecma262/#sec-set-objects
33491 // https://tc39.es/ecma262/#sec-string.prototype.codepointat
33511 // eslint-disable-next-line es/no-string-fromcodepoint -- required for testing
33519 // https://tc39.es/ecma262/#sec-string.fromcodepoint
33521 // eslint-disable-next-line no-unused-vars -- required for `.length`
33532 : fromCharCode(((code -= 0x10000) >> 10) + 0xD800, code % 0x400 + 0xDC00);
33555 // https://tc39.es/ecma262/#sec-string.prototype.includes
33579 // https://tc39.es/ecma262/#sec-string.prototype.italics
33604 // https://tc39.es/ecma262/#sec-string.prototype-@@iterator
33612 // https://tc39.es/ecma262/#sec-%stringiteratorprototype%.next
33637 // https://tc39.es/ecma262/#sec-string.prototype.link
33652 /* eslint-disable es/no-string-prototype-matchall -- safe */
33733 // https://tc39.es/ecma262/#sec-string.prototype.matchall
33744 … if (!~stringIndexOf(flags, 'g')) throw TypeError('`.matchAll` does not allow non-global regexes');
33781 // https://tc39.es/ecma262/#sec-string.prototype.match
33788 // https://tc39.es/ecma262/#sec-regexp.prototype-@@match
33824 // https://tc39.es/ecma262/#sec-string.prototype.repeat
33867 …/ https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-strin…
33869 // eslint-disable-next-line regexp/prefer-escape-replacement-dollar-char -- required for testing
33888 // eslint-disable-next-line regexp/no-useless-dollar-replacements -- false positive
33898 // https://tc39.es/ecma262/#sec-string.prototype.replace
33907 // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace
33914 stringIndexOf(replaceValue, UNSAFE_SUBSTITUTE) === -1 &&
33915 stringIndexOf(replaceValue, '$<') === -1
34008 // Weex JS has frozen built-in prototypes, so use try / catch wrapper
34010 // eslint-disable-next-line regexp/no-empty-group -- required for testing
34023 // eslint-disable-next-line regexp/no-empty-group -- required for testing
34024 'test'.split(/(?:)/, -1).length != 4 ||
34027 …// eslint-disable-next-line regexp/no-empty-capturing-group, regexp/no-empty-group -- required for…
34031 // based on es5-shim implementation, need to rework it
34075 // https://tc39.es/ecma262/#sec-string.prototype.split
34084 // https://tc39.es/ecma262/#sec-regexp.prototype-@@split
34124 for (var i = 1; i <= z.length - 1; i++) {
34150 // https://tc39.es/ecma262/#sec-string.prototype.strike
34170 // https://tc39.es/ecma262/#sec-string.prototype.trim
34185 // `Symbol.asyncIterator` well-known symbol
34186 // https://tc39.es/ecma262/#sec-symbol.asynciterator
34197 // https://tc39.es/ecma262/#sec-symbol.prototype.description
34246 var desc = NATIVE_SYMBOL ? stringSlice(string, 7, -1) : replace(string, regexp, '$1');
34264 // `Symbol.iterator` well-known symbol
34265 // https://tc39.es/ecma262/#sec-symbol.iterator
34340 var ObjectPrototypeSymbols = shared('op-symbols');
34341 var StringToSymbolRegistry = shared('string-to-symbol-registry');
34342 var SymbolToStringRegistry = shared('symbol-to-string-registry');
34345 // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173
34444 // https://tc39.es/ecma262/#sec-symbol-constructor
34480 // https://github.com/tc39/proposal-Symbol-description
34503 // https://tc39.es/ecma262/#sec-symbol.for
34513 // https://tc39.es/ecma262/#sec-symbol.keyfor
34524 // https://tc39.es/ecma262/#sec-object.create
34527 // https://tc39.es/ecma262/#sec-object.defineproperty
34530 // https://tc39.es/ecma262/#sec-object.defineproperties
34533 // https://tc39.es/ecma262/#sec-object.getownpropertydescriptors
34539 // https://tc39.es/ecma262/#sec-object.getownpropertynames
34542 // https://tc39.es/ecma262/#sec-object.getownpropertysymbols
34555 // https://tc39.es/ecma262/#sec-json.stringify
34568 // eslint-disable-next-line no-unused-vars -- required for `.length`
34584 // https://tc39.es/ecma262/#sec-symbol.prototype-@@toprimitive
34587 // eslint-disable-next-line no-unused-vars -- required for .length
34594 // https://tc39.es/ecma262/#sec-symbol.prototype-@@tostringtag
34607 // `Symbol.toPrimitive` well-known symbol
34608 // https://tc39.es/ecma262/#sec-symbol.toprimitive
34619 // `Symbol.toStringTag` well-known symbol
34620 // https://tc39.es/ecma262/#sec-symbol.tostringtag
34640 // https://tc39.es/ecma262/#sec-%typedarray%.prototype.copywithin
34660 // https://tc39.es/ecma262/#sec-%typedarray%.prototype.every
34681 // https://tc39.es/ecma262/#sec-%typedarray%.prototype.fill
34709 // https://tc39.es/ecma262/#sec-%typedarray%.prototype.filter
34730 // https://tc39.es/ecma262/#sec-%typedarray%.prototype.findindex
34750 // https://tc39.es/ecma262/#sec-%typedarray%.prototype.find
34764 // https://tc39.es/ecma262/#sec-typedarray-objects
34780 // https://tc39.es/ecma262/#sec-typedarray-objects
34802 // https://tc39.es/ecma262/#sec-%typedarray%.prototype.foreach
34820 // https://tc39.es/ecma262/#sec-%typedarray%.from
34838 // https://tc39.es/ecma262/#sec-%typedarray%.prototype.includes
34858 // https://tc39.es/ecma262/#sec-%typedarray%.prototype.indexof
34872 // https://tc39.es/ecma262/#sec-typedarray-objects
34888 // https://tc39.es/ecma262/#sec-typedarray-objects
34904 // https://tc39.es/ecma262/#sec-typedarray-objects
34942 // https://tc39.es/ecma262/#sec-%typedarray%.prototype.entries
34947 // https://tc39.es/ecma262/#sec-%typedarray%.prototype.keys
34952 // https://tc39.es/ecma262/#sec-%typedarray%.prototype.values
34955 // https://tc39.es/ecma262/#sec-%typedarray%.prototype-@@iterator
34974 // https://tc39.es/ecma262/#sec-%typedarray%.prototype.join
34995 // https://tc39.es/ecma262/#sec-%typedarray%.prototype.lastindexof
35017 // https://tc39.es/ecma262/#sec-%typedarray%.prototype.map
35039 // https://tc39.es/ecma262/#sec-%typedarray%.prototype.reduceright
35060 // https://tc39.es/ecma262/#sec-%typedarray%.prototype.reduce
35081 // https://tc39.es/ecma262/#sec-%typedarray%.prototype.reverse
35090 that[index++] = that[--length];
35115 // eslint-disable-next-line es/no-typed-arrays -- required for testing
35120 // https://tc39.es/ecma262/#sec-%typedarray%.prototype.set
35149 // eslint-disable-next-line es/no-typed-arrays -- required for testing
35154 // https://tc39.es/ecma262/#sec-%typedarray%.prototype.slice
35180 // https://tc39.es/ecma262/#sec-%typedarray%.prototype.some
35230 array[index] = 515 - index;
35231 expected[index] = index - 2 * mod + 3;
35235 return (a / 4 | 0) - (b / 4 | 0);
35246 // eslint-disable-next-line no-self-compare -- NaN check
35247 if (y !== y) return -1;
35248 // eslint-disable-next-line no-self-compare -- NaN check
35250 if (x === 0 && y === 0) return 1 / x > 0 && 1 / y < 0 ? 1 : -1;
35256 // https://tc39.es/ecma262/#sec-%typedarray%.prototype.sort
35281 // https://tc39.es/ecma262/#sec-%typedarray%.prototype.subarray
35290 toLength((end === undefined ? length : toAbsoluteIndex(end, length)) - beginIndex)
35325 // https://tc39.es/ecma262/#sec-%typedarray%.prototype.tolocalestring
35361 // https://tc39.es/ecma262/#sec-%typedarray%.prototype.tostring
35373 // https://tc39.es/ecma262/#sec-typedarray-objects
35389 // https://tc39.es/ecma262/#sec-typedarray-objects
35405 // https://tc39.es/ecma262/#sec-typedarray-objects
35421 // https://tc39.es/ecma262/#sec-typedarray-objects
35434 // TODO: Remove from `core-js@4`
35443 // TODO: Remove from `core-js@4`
35452 // TODO: Remove from `core-js@4`
35461 // TODO: Remove from `core-js@4`
35477 // https://github.com/tc39/proposal-promise-try
35493 // TODO: Remove from `core-js@4`
35509 // some Chrome versions have non-configurable methods on DOMTokenList
35544 // some Chrome versions have non-configurable methods on DOMTokenList
35554 // some Chrome versions have non-configurable methods on DOMTokenList
35582 // https://url.spec.whatwg.org/#dom-url-tojson
35636 // eslint-disable-next-line no-use-before-define
35658 /* eslint max-statements: [2, 50] */
35705 for (i = ka.length - 1; i >= 0; i--) {
35709 for (i = ka.length - 1; i >= 0; i--) {
35755 object[name] = value; // eslint-disable-line no-param-reassign
35783 * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign
35893 // Backwards-compat with node 0.10.x
35917 …throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negativ…
35938 …throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received…
36016 // Re-assign `events` because a newListener handler could have caused the
36044 // eslint-disable-next-line no-restricted-syntax
36118 if (--this._eventsCount === 0)
36126 position = -1;
36128 for (i = list.length - 1; i >= 0; i--) {
36171 if (--this._eventsCount === 0)
36200 for (i = listeners.length - 1; i >= 0; i--) {
36354 // eslint-disable-next-line func-names
36364 // eslint-disable-next-line no-new-func
36423 for (var k in object) {
36424 if (hasOwnProperty.call(object, k)) {
36426 iterator(object[k], k, object);
36428 iterator.call(receiver, object[k], k, object);
36464 /* eslint no-invalid-this: 1 */
36497 var boundLength = Math.max(0, target.length - args.length);
36582 // eslint-disable-next-line consistent-return
36604 // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
36620 …to = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto
36646 '%eval%': eval, // eslint-disable-line no-eval
36780 /* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
36781 var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\]…
36785 var last = $strSlice(string, -1);
36828 throw new $TypeError('intrinsic name must be a non-empty string');
36854 var last = $strSlice(part, -1);
36967 // In Firefox 4-22, defining length on an array throws an exception.
37004 /* eslint complexity: [2, 18], max-statements: [2, 33] */
37019 // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
37027 for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
37084 // Our codec supports UTF-16 surrogates, extensions for GB18030 and unicode sequences.
37089 var UNASSIGNED = -1,
37090 GB18030_CODE = -2,
37091 SEQ_START = -10,
37092 NODE_START = -1000,
37094 DEF_CHAR = -1;
37112 // Decode tables: MBCS -> Unicode.
37116 // Values: >= 0 -> unicode character code. can be > 0xFFFF
37117 // == UNASSIGNED -> unknown/unassigned sequence.
37118 // == GB18030_CODE -> this is the end of a GB18030 4-byte sequence.
37119 // <= NODE_START -> index of the next node in our trie to process next byte.
37120 // <= SEQ_START -> index of the start of a character code sequence, in decodeTableSeq.
37145 var secondByteNode = this.decodeTables[NODE_START - firstByteNode[i]];
37148 secondByteNode[j] = NODE_START - commonThirdByteNodeIdx;
37153 var thirdByteNode = this.decodeTables[NODE_START - secondByteNode[j]];
37154 for (var k = 0x81; k <= 0xFE; k++) {
37155 if (thirdByteNode[k] === UNASSIGNED) {
37156 thirdByteNode[k] = NODE_START - commonFourthByteNodeIdx;
37157 } else if (thirdByteNode[k] === NODE_START - commonFourthByteNodeIdx) {
37159 } else if (thirdByteNode[k] > NODE_START) {
37163 var fourthByteNode = this.decodeTables[NODE_START - thirdByteNode[k]];
37176 // Encode tables: Unicode -> DBCS.
37180 …// Values: >= 0 -> it is a normal char. Write the value (if <=256 then 1 byte, if <=65536 then 2 …
37181 // == UNASSIGNED -> no conversion found. Output a default char.
37182 …// <= SEQ_START -> it's an index in encodeTableSeq, see below. The character starts a seq…
37230 for (var i = bytes.length-1; i > 0; i--) { // Traverse nodes deeper into the trie.
37234 node[bytes[i]] = NODE_START - this.decodeTables.length;
37238 node = this.decodeTables[NODE_START - val];
37256 for (var k = 1; k < chunk.length; k++) {
37257 var part = chunk[k];
37258 if (typeof part === "string") { // String, write as-is.
37264 … writeTable[curAddr++] = 0x10000 + (code - 0xD800) * 0x400 + (codeTrail - 0xDC00);
37269 var len = 0xFFF - code + 2;
37274 writeTable[curAddr++] = SEQ_START - this.decodeTableSeq.length;
37282 var charCode = writeTable[curAddr - 1] + 1;
37305 …this.encodeTableSeq[SEQ_START-bucket[low]][DEF_CHAR] = dbcsCode; // There's already a sequence, se…
37319 // There's already a sequence with - use it.
37320 node = this.encodeTableSeq[SEQ_START-bucket[low]];
37323 // There was no sequence object - allocate a new one.
37325 …SSIGNED) node[DEF_CHAR] = bucket[low]; // If a char was set before - make it a single-char subsequ…
37326 bucket[low] = SEQ_START - this.encodeTableSeq.length;
37331 for (var j = 1; j < seq.length-1; j++) {
37343 uCode = seq[seq.length-1];
37361 var subNodeIdx = NODE_START - uCode;
37363 var newPrefix = (mbCode << 8) >>> 0; // NOTE: '>>> 0' keeps 32-bit num positive.
37370 this._setEncodeSequence(this.decodeTableSeq[SEQ_START - uCode], mbCode);
37383 this.leadSurrogate = -1;
37396 seqObj = this.seqObj, nextChar = -1,
37401 if (nextChar === -1) {
37407 nextChar = -1;
37413 if (leadSurrogate === -1) {
37422 if (leadSurrogate !== -1) {
37423 uCode = 0x10000 + (leadSurrogate - 0xD800) * 0x400 + (uCode - 0xDC00);
37424 leadSurrogate = -1;
37426 // Incomplete surrogate pair - only trail surrogate found.
37432 else if (leadSurrogate !== -1) {
37433 // Incomplete surrogate pair - only lead surrogate found.
37435 leadSurrogate = -1;
37459 … // Then, we should write first char of the sequence as-is and try the rest recursively.
37472 seqObj = this.encodeTableSeq[SEQ_START-dbcsCode];
37479 if (idx != -1) {
37480 var dbcsCode = this.gb18030.gbChars[idx] + (uCode - this.gb18030.uChars[idx]);
37519 if (this.leadSurrogate === -1 && this.seqObj === undefined)
37540 if (this.leadSurrogate !== -1) {
37541 // Incomplete surrogate pair - only lead surrogate found.
37543 this.leadSurrogate = -1;
37571 seqStart = -this.prevBytes.length, // idx of the start of current parsed sequence.
37590 … var ptr = (buf[i-3]-0x81)*12600 + (buf[i-2]-0x30)*1260 + (buf[i-1]-0x81)*10 + (curByte-0x30);
37592 var ptr = (prevBytes[i-3+prevOffset]-0x81)*12600 +
37593 (((i-2 >= 0) ? buf[i-2] : prevBytes[i-2+prevOffset])-0x30)*1260 +
37594 (((i-1 >= 0) ? buf[i-1] : prevBytes[i-1+prevOffset])-0x81)*10 +
37595 (curByte-0x30);
37598 uCode = this.gb18030.uChars[idx] + ptr - this.gb18030.gbChars[idx];
37601 nodeIdx = NODE_START - uCode;
37605 var seq = this.decodeTableSeq[SEQ_START - uCode];
37606 for (var k = 0; k < seq.length - 1; k++) {
37607 uCode = seq[k];
37611 uCode = seq[seq.length-1];
37614 …throw new Error("iconv-lite internal error: invalid decoding table value " + uCode + " at " + node…
37618 uCode -= 0x10000;
37664 return -1;
37667 while (l < r-1) { // always table[l] <= val < table[r]
37668 var mid = l + ((r-l+1) >> 1);
37688 // Tables are not require()-d until they are needed to speed up library load.
37689 // require()-s are direct to support Browserify.
37695 // JIS X 0201 - Single-byte encoding of ASCII + ¥ + Kana chars at 0xA1-0xDF.
37696 // JIS X 0208 - Main set of 6879 characters, placed in 94x94 plane, to be encoded by 2 bytes.
37698 // JIS X 0212 - Supplementary plane of 6067 chars in 94x94 plane. 1990. Effectively dead.
37699 // JIS X 0213 - Extension and modern replacement of 0208 and 0212. Total chars: 11233.
37700 // 2 planes, first is superset of 0208, second - revised 0212.
37704 …* Shift_JIS: Compatible with 0201, uses not defined chars in top half as lead bytes for double-byte
37705 … encoding of 0208. Lead byte ranges: 0x81-0x9F, 0xE0-0xEF; Trail byte ranges: 0x40-0x7E, 0x80-0…
37707 // * EUC-JP: Up to 3 bytes per character. Used mostly on *nixes.
37708 // 0x00-0x7F - lower part of 0201
37709 // 0x8E, 0xA1-0xDF - upper part of 0201
37710 // (0xA1-0xFE)x2 - 0208 plane (94x94).
37711 // 0x8F, (0xA1-0xFE)x2 - 0212 plane (94x94).
37712 // * JIS X 208: 7-bit, direct encoding of 0208. Byte ranges: 0x21-0x7E (94 values). Uncommon.
37713 // Used as-is in ISO2022 family.
37714 // * ISO2022-JP: Stateful encoding, with escape sequences to switch between ASCII,
37715 // 0201-1976 Roman, 0208-1978, 0208-1983.
37716 // * ISO2022-JP-1: Adds esc seq for 0212-1990.
37717 // * ISO2022-JP-2: Adds esc seq for GB2313-1980, KSX1001-1992, ISO8859-1, ISO8859-7.
37718 // * ISO2022-JP-3: Adds esc seq for 0201-1976 Kana set, 0213-2000 Planes 1, 2.
37719 // * ISO2022-JP-2004: Adds 0213-2004 Plane 1.
37721 …// After JIS X 0213 appeared, Shift_JIS-2004, EUC-JISX0213 and ISO2022-JP-2004 followed, with just…
37723 …// Overall, it seems that it's a mess :( http://www8.plala.or.jp/tkubota1/unicode-symbols-map2.html
37749 // TODO: IBM CCSID 942 = CP932, but F0-F9 custom chars and other char changes.
37755 // We mostly implement W3C recommendation: https://www.w3.org/TR/encoding/#gbk-encoder
37774 // GBK (~22000 chars) is an extension of CP936 that added user-mapped chars and some other.
37783 // Main source: https://www.w3.org/TR/encoding/#gbk-encoder
37784 // http://icu-project.org/docs/papers/gb18030.html
37785 // http://source.icu-project.org/repos/icu/data/trunk/charset/data/xml/gb-18030-2000.xml
37799 // EUC-KR, KS_C_5601 and KS X 1001 are exactly the same.
37820 // http://moztw.org/docs/big5/ http://www.haible.de/bruno/charsets/conversion-tables/Big5.html
37823 … 951: Microsoft variant of Big5-HKSCS-2001. Seems to be never public. http://me.abelcheung.org/art…
37824 // * Big5-2003 (Taiwan standard) almost superset of cp950.
37825 …// * Unicode-at-on (UAO) / Mozilla 1.8. Falling out of use on the Web. Not supported by other bro…
37826 // * Big5-HKSCS (-2001, -2004, -2008). Hong Kong standard.
37830 … // because big5-hkscs is the only encoding to include astral characters in non-algorithmic way.
37832 // MS Internet Explorer switches from big5 to big5-hkscs when a patch applied.
37834 …// In the encoder, it might make sense to support encoding old PUA mappings to Big5 bytes seq-s.
37836 … http://www.ogcio.gov.hk/tc/business/tech_promotion/ccli/terms/doc/hkscs-2008-big5-iso.txt
37838 …understanding of how to deal with Big5(-HKSCS) is in the Encoding Standard, http://encoding.spec.w…
37856 …// https://encoding.spec.whatwg.org/#index-big5-pointer), we still do it to increase compatibility…
37864 …// Step 2 of https://encoding.spec.whatwg.org/#index-big5-pointer: Use last pointer for U+2550, U+…
37934 //------------------------------------------------------------------------------
37946 // Add decoder for versions of Node not supporting CESU-8
37957 //------------------------------------------------------------------------------
37983 //------------------------------------------------------------------------------
37998 //------------------------------------------------------------------------------
38007 var completeQuads = str.length - (str.length % 4);
38019 //------------------------------------------------------------------------------
38020 // CESU-8 encoder is also special.
38029 // Naive implementation, but it works because CESU-8 is especially easy
38030 // to convert from UTF-16 (which all JS strings are encoded in).
38049 //------------------------------------------------------------------------------
38050 // CESU-8 decoder is not implemented in Node v4.0+
38070 if (curByte < 0x80) { // Single-byte code
38072 } else if (curByte < 0xE0) { // Two-byte code
38075 } else if (curByte < 0xF0) { // Three-byte code
38078 } else { // Four or more are not supported for CESU-8.
38084 contBytes--; accBytes++;
38086 … // Check for overlong encoding, but support Modified UTF-8 (encoding NULL as C0 80)
38121 // Single-byte codec. Needs a 'chars' string parameter that contains 256 or 128 chars that
38122 // correspond to encoded bytes (if 128 - then lower half is ASCII).
38176 // Strings are immutable in JS -> we use ucs2 buffer to speed up computations.
38200 // Generated data for sbcs codec. Don't edit manually. Regenerate using generation/gen-sbcs.js scri…
38468 …15\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$٪&'()*+,-./0123456789:;<=>?@AB…
38598 …"chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ �և։)(»«—.՝,-֊…՜՛՞ԱաԲբԳգԴդԵեԶզԷէԸըԹթԺժԻիԼլԽխԾծԿկՀհՁձՂղՃճ…
38606 …f\u0010ỨỰỲỶỸÝỴ\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&'()*+,-./0123456789:;<=>?@AB…
38622 …u0013Ỷ\u0015\u0016\u0017\u0018Ỹ\u001a\u001b\u001c\u001dỴ\u001f !\"#$%&'()*+,-./0123456789:;<=>?@AB…
38626 …15\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#¥%&'()*+,-./0123456789:;<=>?@AB…
38630 …15\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&'()*+,-./0123456789:;<=>?@AB…
38846 // Note: UTF16-LE (or UCS2) codec is Node.js native. See encodings/internal.js
38848 // == UTF16-BE codec. ==========================================================
38859 // -- Encoding
38876 // -- Decoding
38879 this.overflowByte = -1;
38889 if (this.overflowByte !== -1) {
38895 for (; i < buf.length-1; i += 2, j+= 2) {
38900 this.overflowByte = (i == buf.length-1) ? buf[buf.length-1] : -1;
38906 this.overflowByte = -1;
38910 // == UTF-16 codec =============================================================
38911 // Decoder chooses automatically from UTF-16LE and UTF-16BE using BOM and space-based heuristic.
38912 // Defaults to UTF-16LE, as it's prevalent and default in Node.
38913 // http://en.wikipedia.org/wiki/UTF-16 and http://encoding.spec.whatwg.org/#utf-16le
38914 // Decoder default can be changed: iconv.decode(buf, 'utf16', {defaultEncoding: 'utf-16be'});
38916 // Encoder uses UTF-16LE and prepends BOM (which can be overridden with addBOM: false).
38927 // -- Encoding (pass-through)
38933 this.encoder = codec.iconv.getEncoder('utf-16le', options);
38945 // -- Decoding
38965 // We have enough bytes -> detect endianness.
39012 if (b[0] === 0xFF && b[1] === 0xFE) return 'utf-16le';
39013 if (b[0] === 0xFE && b[1] === 0xFF) return 'utf-16be';
39032 if (asciiCharsBE > asciiCharsLE) return 'utf-16be';
39033 if (asciiCharsBE < asciiCharsLE) return 'utf-16le';
39036 return defaultEncoding || 'utf-16le';
39052 // == UTF32-LE/BE codec. ==========================================================
39072 // -- Encoding
39093 …surrogate. If this happens, keep the pending high surrogate as a stand-alone semi-invalid character
39099 // Create 32-bit value from high and low surrogates;
39100 var codepoint = (((this.highSurrogate - 0xD800) << 10) | (code - 0xDC00)) + 0x10000;
39114 … // encode it as a semi-invalid stand-alone character for the same reasons expressed above for
39129 // Treat any leftover high surrogate as a semi-valid independent character.
39145 // -- Decoding
39184 for (; i < src.length - 3; i += 4) {
39211 codepoint -= 0x10000;
39232 // == UTF-32 Auto codec =============================================================
39233 // Decoder chooses automatically from UTF-32LE and UTF-32BE using BOM and space-based heuristic.
39234 // Defaults to UTF-32LE. http://en.wikipedia.org/wiki/UTF-32
39235 // Encoder/decoder default can be changed: iconv.decode(buf, 'utf32', {defaultEncoding: 'utf-32be'}…
39249 // -- Encoding
39257 this.encoder = codec.iconv.getEncoder(options.defaultEncoding || 'utf-32le', options);
39268 // -- Decoding
39287 // We have enough bytes -> detect endianness.
39337 return 'utf-32le';
39340 return 'utf-32be';
39361 if (bmpCharsBE - invalidBE > bmpCharsLE - invalidLE) return 'utf-32be';
39362 if (bmpCharsBE - invalidBE < bmpCharsLE - invalidLE) return 'utf-32le';
39365 return defaultEncoding || 'utf-32le';
39378 // UTF-7 codec, according to https://tools.ietf.org/html/rfc2152
39379 // See also below a UTF-7-IMAP codec, according to http://tools.ietf.org/html/rfc3501#section-5.1.3
39382 exports.unicode11utf7 = 'utf7'; // Alias UNICODE-1-1-UTF-7
39392 // -- Encoding
39394 var nonDirectChars = /[^A-Za-z0-9'\(\),-\.\/:\? \n\r\t]+/g;
39402 // Non-direct chars are encoded as "+<base64>-"; single "+" char is encoded as "+-".
39405 this.iconv.encode(chunk, 'utf16-be').toString('base64').replace(/=+$/, ''))
39406 + "-";
39414 // -- Decoding
39422 var base64Regex = /[A-Za-z0-9\/+]/;
39428 minusChar = '-'.charCodeAt(0),
39448 if (i == lastI && buf[i] == minusChar) {// "+-" -> "+"
39452 res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be");
39456 i--;
39470 …var canBeDecoded = b64str.length - (b64str.length % 8); // Minimal chunk: 2 quads -> 2x3 bytes -> …
39474 res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be");
39486 res = this.iconv.decode(Buffer.from(this.base64Accum, 'base64'), "utf16-be");
39494 // UTF-7-IMAP codec.
39495 // RFC3501 Sec. 5.1.3 Modified UTF-7 (http://tools.ietf.org/html/rfc3501#section-5.1.3)
39498 // * Direct characters are 0x20-0x7E, except "&" (0x26)
39501 // * No implicit shift back from Base64 (should always end with '-')
39502 // * String must end in non-shifted position.
39503 // * "-&" while in base64 is not allowed.
39516 // -- Encoding
39540 buf[bufIdx++] = minusChar; // Write '-', then go to direct mode.
39547 if (uChar === andChar) // Ampersand -> '&-'
39551 } else { // Non-direct character
39582 buf[bufIdx++] = minusChar; // Write '-', then go to direct mode.
39590 // -- Decoding
39607 // It is forgiving, closer to standard UTF-7 (for example, '-' is optional at the end).
39619 if (i == lastI && buf[i] == minusChar) { // "&-" -> "&"
39623 res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be");
39627 i--;
39641 …var canBeDecoded = b64str.length - (b64str.length % 8); // Minimal chunk: 2 quads -> 2x3 bytes -> …
39645 res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be");
39657 res = this.iconv.decode(Buffer.from(this.base64Accum, 'base64'), "utf16-be");
39697 //------------------------------------------------------------------------------
39763 …le.error('Iconv-lite warning: decode()-ing strings is deprecated. Refer to https://github.com/asht…
39797 // Canonicalize encoding name: strip all non-alphanumeric chars and appended year.
39842 // Canonicalize encoding name: strip all non-alphanumeric chars and appended year.
39843 return (''+encoding).toLowerCase().replace(/:\d{4}$|[^0-9a-z]/g, "");
39875 // Dependency-inject stream module to create IconvLite stream classes.
39894 // Enable Streaming API automatically if 'stream' module is available and non-empty (the majority o…
39906 …throw new Error("iconv-lite Streaming API is not enabled. Use iconv.enableStreamingAPI(require('st…
39924 // we opt to dependency-inject it instead of creating a hard dependency.
40035 /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */
40038 var eLen = (nBytes * 8) - mLen - 1
40039 var eMax = (1 << eLen) - 1
40041 var nBits = -7
40042 var i = isLE ? (nBytes - 1) : 0
40043 var d = isLE ? -1 : 1
40048 e = s & ((1 << (-nBits)) - 1)
40049 s >>= (-nBits)
40051 for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {}
40053 m = e & ((1 << (-nBits)) - 1)
40054 e >>= (-nBits)
40056 for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {}
40059 e = 1 - eBias
40061 return m ? NaN : ((s ? -1 : 1) * Infinity)
40064 e = e - eBias
40066 return (s ? -1 : 1) * m * Math.pow(2, e - mLen)
40071 var eLen = (nBytes * 8) - mLen - 1
40072 var eMax = (1 << eLen) - 1
40074 var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0)
40075 var i = isLE ? 0 : (nBytes - 1)
40076 var d = isLE ? 1 : -1
40086 if (value * (c = Math.pow(2, -e)) < 1) {
40087 e--
40093 value += rt * Math.pow(2, 1 - eBias)
40104 m = ((value * c) - 1) * Math.pow(2, mLen)
40107 m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen)
40112 for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {}
40116 for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {}
40118 buffer[offset + i - d] |= s * 128
40217 // eslint-disable-next-line no-throw-literal
40253 var ddaClass3 = '[object HTMLCollection]'; // IE 9-10
40254 var hasToStringTag = typeof Symbol === 'function' && !!Symbol.toStringTag; // better: use `has-tost…
40256 var isIE68 = !(0 in [,]); // eslint-disable-line no-sparse-arrays, comma-spacing
40265 // in IE 6-8, typeof document.all is "object" and it's truthy
40273 || str === objectClass // IE 6-8
40274 ) && value('') == null; // eslint-disable-line eqeqeq
40349 var getGeneratorFunc = function () { // eslint-disable-line consistent-return
40390 /* http://www.ecma-international.org/ecma-262/6.0/#sec-number.isnan */
40414 /* http://www.ecma-international.org/ecma-262/6.0/#sec-number.isnan */
40454 /* http://www.ecma-international.org/ecma-262/6.0/#sec-number.isnan */
40505 // eslint-disable-next-line consistent-return
40558 return -1;
40593 var tag = $slice($toString(value), 8, -1);
40594 return $indexOf(typedArrays, tag) > -1;
40701 // modified from https://github.com/es-shims/es5-shim
40704 var isArgs = __webpack_require__(1414); // eslint-disable-line global-require
40749 for (var k in window) {
40751 …if (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'o…
40753 equalsConstructorPrototype(window[k]);
40784 throw new TypeError('Object.keys called on a non-object');
40809 for (var k = 0; k < dontEnums.length; ++k) {
40810 if (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) {
40811 theKeys.push(dontEnums[k]);
40845 Object.keys = function keys(object) { // eslint-disable-line func-name-matching
40910 throw new TypeError(source + 'must be non-object');
41011 // (C) 1995-2013 Jean-loup Gailly and Mark Adler
41012 // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
41014 // This software is provided 'as-is', without any express or implied
41037 // s2 in 31-bits, because we force signed ints.
41040 len -= n;
41045 } while (--n);
41066 // (C) 1995-2013 Jean-loup Gailly and Mark Adler
41067 // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
41069 // This software is provided 'as-is', without any express or implied
41102 Z_ERRNO: -1,
41103 Z_STREAM_ERROR: -2,
41104 Z_DATA_ERROR: -3,
41105 //Z_MEM_ERROR: -4,
41106 Z_BUF_ERROR: -5,
41107 //Z_VERSION_ERROR: -6,
41113 Z_DEFAULT_COMPRESSION: -1,
41130 //Z_NULL: null // Use -1 or null inline, depending on var type
41143 // So write code to minimize size - no pregenerated tables
41146 // (C) 1995-2013 Jean-loup Gailly and Mark Adler
41147 // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
41149 // This software is provided 'as-is', without any express or implied
41171 for (var k = 0; k < 8; k++) {
41188 crc ^= -1;
41194 return (crc ^ (-1)); // >>> 0;
41209 // (C) 1995-2013 Jean-loup Gailly and Mark Adler
41210 // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
41212 // This software is provided 'as-is', without any express or implied
41254 //var Z_ERRNO = -1;
41255 var Z_STREAM_ERROR = -2;
41256 var Z_DATA_ERROR = -3;
41257 //var Z_MEM_ERROR = -4;
41258 var Z_BUF_ERROR = -5;
41259 //var Z_VERSION_ERROR = -6;
41266 var Z_DEFAULT_COMPRESSION = -1;
41291 /* 32K LZ77 window */
41337 return ((f) << 1) - ((f) > 4 ? 9 : 0);
41340 function zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } }
41346 * to avoid allocating a large strm->output buffer and copying into it.
41363 strm.avail_out -= len;
41364 s.pending -= len;
41372 …trees._tr_flush_block(s, (s.block_start >= 0 ? s.block_start : -1), s.strstart - s.block_start, la…
41384 * Put a short in the pending buffer. The 16-bit value is put in MSB order.
41400 * allocating a large strm->input buffer and copying from it.
41409 strm.avail_in -= len;
41411 // zmemcpy(buf, strm->next_in, len);
41435 * OUT assertion: the match length is not greater than s->lookahead.
41444 var limit = (s.strstart > (s.w_size - MIN_LOOKAHEAD)) ?
41445 s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0/*NIL*/;
41457 var scan_end1 = _win[scan + best_len - 1];
41460 /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16.
41463 // Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever");
41474 // Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead");
41477 // Assert(cur_match < s->strstart, "no future");
41490 _win[match + best_len - 1] !== scan_end1 ||
41496 /* The check at best_len-1 can be removed because it will be made
41517 // Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan");
41519 len = MAX_MATCH - (strend - scan);
41520 scan = strend - MAX_MATCH;
41528 scan_end1 = _win[scan + best_len - 1];
41531 } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0);
41545 * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD
41548 * option -- not supported here).
41554 //Assert(s->lookahead < MIN_LOOKAHEAD, "already enough lookahead");
41557 more = s.window_size - s.lookahead - s.strstart;
41560 /* Deal with !@#$% 64K limit: */
41562 // if (more == 0 && s->strstart == 0 && s->lookahead == 0) {
41565 // } else if (more == (unsigned)(-1)) {
41569 // more--;
41577 if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) {
41580 s.match_start -= _w_size;
41581 s.strstart -= _w_size;
41583 s.block_start -= _w_size;
41595 m = s.head[--p];
41596 s.head[p] = (m >= _w_size ? m - _w_size : 0);
41597 } while (--n);
41602 m = s.prev[--p];
41603 s.prev[p] = (m >= _w_size ? m - _w_size : 0);
41607 } while (--n);
41616 * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 &&
41617 * more == window_size - lookahead - strstart
41618 * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1)
41619 * => more >= window_size - 2*WSIZE + 2
41622 * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD.
41632 str = s.strstart - s.insert;
41635 /* UPDATE_HASH(s, s->ins_h, s->window[str + 1]); */
41638 // Call update_hash() MIN_MATCH-3 more times
41641 /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */
41642 s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask;
41647 s.insert--;
41671 // /* Previous high water mark below current data -- zero WIN_INIT
41674 // init = s.window_size - curr;
41677 // zmemzero(s->window + curr, (unsigned)init);
41678 // s->high_water = curr + init;
41680 // else if (s->high_water < (ulg)curr + WIN_INIT) {
41682 // * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up
41685 // init = (ulg)curr + WIN_INIT - s->high_water;
41686 // if (init > s->window_size - s->high_water)
41687 // init = s->window_size - s->high_water;
41688 // zmemzero(s->window + s->high_water, (unsigned)init);
41689 // s->high_water += init;
41693 // Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD,
41712 if (max_block_size > s.pending_buf_size - 5) {
41713 max_block_size = s.pending_buf_size - 5;
41721 //Assert(s->strstart < s->w_size+MAX_DIST(s) ||
41722 // s->block_start >= (long)s->w_size, "slide too late");
41723 // if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) ||
41738 //Assert(s->block_start >= 0L, "block gone");
41748 /* strstart == 0 is possible when wraparound on 16-bit machine */
41749 s.lookahead = s.strstart - max_start;
41763 if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) {
41830 s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;
41839 if (hash_head !== 0/*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) {
41850 /*** _tr_tally_dist(s, s.strstart - s.match_start,
41851 s.match_length - MIN_MATCH, bflush); ***/
41852 bflush = trees._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH);
41854 s.lookahead -= s.match_length;
41860 s.match_length--; /* string at strstart already in table */
41864 … s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;
41868 /* strstart never exceeds WSIZE-MAX_MATCH, so there are
41871 } while (--s.match_length !== 0);
41882 // Call UPDATE_HASH() MIN_MATCH-3 more times
41894 s.lookahead--;
41906 s.insert = ((s.strstart < (MIN_MATCH - 1)) ? s.strstart : MIN_MATCH - 1);
41959 s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;
41969 s.match_length = MIN_MATCH - 1;
41972 s.strstart - hash_head <= (s.w_size - MIN_LOOKAHEAD)/*MAX_DIST(s)*/) {
41981 …(s.strategy === Z_FILTERED || (s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096/*…
41986 s.match_length = MIN_MATCH - 1;
41993 max_insert = s.strstart + s.lookahead - MIN_MATCH;
41996 //check_match(s, s.strstart-1, s.prev_match, s.prev_length);
41998 /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match,
41999 s.prev_length - MIN_MATCH, bflush);***/
42000 bflush = trees._tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH);
42002 * strstart-1 and strstart are already inserted. If there is not
42006 s.lookahead -= s.prev_length - 1;
42007 s.prev_length -= 2;
42011 … s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask;
42016 } while (--s.prev_length !== 0);
42018 s.match_length = MIN_MATCH - 1;
42035 //Tracevv((stderr,"%c", s->window[s->strstart-1]));
42036 /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/
42037 bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]);
42045 s.lookahead--;
42055 s.lookahead--;
42060 //Tracevv((stderr,"%c", s->window[s->strstart-1]));
42061 /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/
42062 bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]);
42066 s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1;
42117 scan = s.strstart - 1;
42128 s.match_length = MAX_MATCH - (strend - scan);
42133 //Assert(scan <= s->window+(uInt)(s->window_size-1), "wild scan");
42138 //check_match(s, s.strstart, s.strstart - 1, s.match_length);
42140 /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/
42141 bflush = trees._tr_tally(s, 1, s.match_length - MIN_MATCH);
42143 s.lookahead -= s.match_length;
42148 //Tracevv((stderr,"%c", s->window[s->strstart]));
42152 s.lookahead--;
42206 //Tracevv((stderr,"%c", s->window[s->strstart]));
42209 s.lookahead--;
42292 s.match_length = s.prev_length = MIN_MATCH - 1;
42309 this.last_flush = -1; /* value of flush param for previous deflate call */
42311 this.w_size = 0; /* LZ77 window size (32K by default) */
42313 this.w_mask = 0; /* w_size - 1 */
42319 * wSize-MAX_MATCH bytes, but this ensures that IO is always
42330 * array to 64K, this link is maintained only for the last 32K strings.
42331 * An index in this array is thus a window index modulo 32K.
42339 this.hash_mask = 0; /* hash_size-1 */
42435 * limiting lit_bufsize to 64K:
42436 * - frequencies can be kept in 16 bit counters
42437 * - if compression is not successful for the first block, all input
42440 * all blocks if lit_bufsize is not greater than 32K.)
42441 * - if compression is not successful for a file smaller than 64K, we can
42444 * - creating new Huffman trees less frequently may not provide fast
42450 * - I can't count above 4
42479 /* High water mark offset in window for initialized bytes -- bytes above
42502 s.wrap = -s.wrap;
42545 windowBits = -windowBits;
42550 windowBits -= 16;
42564 /* until 256-byte window bug fixed */
42575 s.w_mask = s.w_size - 1;
42579 s.hash_mask = s.hash_size - 1;
42580 s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH);
42587 //s.high_water = 0; /* nothing written to s->window yet */
42589 s.lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */
42593 //overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2);
42594 //s->pending_buf = (uchf *) overlay;
42598 //s->d_buf = overlay + s->lit_bufsize/sizeof(ush);
42601 //s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize;
42645 if (!s.gzhead) { // s->gzhead == Z_NULL
42685 var header = (Z_DEFLATED + ((s.w_bits - 8) << 4)) << 8;
42686 var level_flags = -1;
42699 header += 31 - (header % 31);
42721 strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);
42733 strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);
42752 strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);
42771 strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);
42790 strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);
42809 strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg);
42847 s.last_flush = -1;
42878 s.last_flush = -1;
42913 s.last_flush = -1; /* avoid BUF_ERROR at next call, see above */
42918 //Assert(strm->avail_out > 0, "bug2");
42945 if (s.wrap > 0) { s.wrap = -s.wrap; }
43001 /* when using zlib wrappers, compute Adler-32 for provided dictionary */
43003 /* adler32(strm->adler, dictionary, dictLength); */
43007 s.wrap = 0; /* avoid computing Adler-32 in read_buf */
43019 // dictionary = dictionary.slice(dictLength - s.w_size);
43021 utils.arraySet(tmpDict, dictionary, dictLength - s.w_size, s.w_size, 0);
43035 n = s.lookahead - (MIN_MATCH - 1);
43037 /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */
43038 s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask;
43044 } while (--n);
43046 s.lookahead = MIN_MATCH - 1;
43053 s.match_length = s.prev_length = MIN_MATCH - 1;
43091 // (C) 1995-2013 Jean-loup Gailly and Mark Adler
43092 // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
43094 // This software is provided 'as-is', without any express or implied
43111 var BAD = 30; /* got a data error -- remain here until reset */
43112 var TYPE = 12; /* i: waiting for type bits, including last-flag bit */
43117 available, an end-of-block is encountered, or a data error is encountered.
43119 example, a 16K input buffer and a 64K output buffer, more than 95% of the
43132 LEN -- ran out of enough output space or enough available input
43133 TYPE -- reached end of block code, inflate() to interpret next block
43134 BAD -- error in block data
43138 - The maximum input bits used by a length/distance pair is 15 bits for the
43144 - The maximum bytes that a single length/distance pair can output is 258
43186 last = _in + (strm.avail_in - 5);
43189 beg = _out - (start - strm.avail_out);
43190 end = _out + (strm.avail_out - 257);
43202 lmask = (1 << state.lenbits) - 1;
43203 dmask = (1 << state.distbits) - 1;
43206 /* decode literals and length/distances until end-of-block or not enough
43224 bits -= op;
43240 len += hold & ((1 << op) - 1);
43242 bits -= op;
43257 bits -= op;
43271 dist += hold & ((1 << op) - 1);
43280 bits -= op;
43282 op = _out - beg; /* max distance in output */
43284 op = dist - op; /* distance back in window */
43295 // if (len <= op - whave) {
43298 // } while (--len);
43301 // len -= op - whave;
43304 // } while (--op > whave);
43306 // from = _out - dist;
43309 // } while (--len);
43317 from += wsize - op;
43319 len -= op;
43322 } while (--op);
43323 from = _out - dist; /* rest from output */
43328 from += wsize + wnext - op;
43329 op -= wnext;
43331 len -= op;
43334 } while (--op);
43338 len -= op;
43341 } while (--op);
43342 from = _out - dist; /* rest from output */
43348 from += wnext - op;
43350 len -= op;
43353 } while (--op);
43354 from = _out - dist; /* rest from output */
43362 len -= 3;
43372 from = _out - dist; /* copy direct from output */
43377 len -= 3;
43388 here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];
43401 here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))];
43404 else if (op & 32) { /* end-of-block */
43421 _in -= len;
43422 bits -= len << 3;
43423 hold &= (1 << bits) - 1;
43428 strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last));
43429 strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end));
43444 // (C) 1995-2013 Jean-loup Gailly and Mark Adler
43445 // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
43447 // This software is provided 'as-is', without any express or implied
43493 //var Z_ERRNO = -1;
43494 var Z_STREAM_ERROR = -2;
43495 var Z_DATA_ERROR = -3;
43496 var Z_MEM_ERROR = -4;
43497 var Z_BUF_ERROR = -5;
43498 //var Z_VERSION_ERROR = -6;
43519 var TYPE = 12; /* i: waiting for type bits, including last-flag bit */
43534 var CHECK = 27; /* i: waiting for 32-bit check value */
43535 var LENGTH = 28; /* i: waiting for 32-bit length (gzip) */
43536 var DONE = 29; /* finished check, done -- remain here until reset */
43537 var BAD = 30; /* got a data error -- remain here until reset */
43538 var MEM = 31; /* got an inflate() memory error -- remain here until reset */
43550 /* 32K LZ77 window */
43627 if (state.wrap) { /* to support ill-conceived Java test suite */
43642 state.back = -1;
43670 windowBits = -windowBits;
43723 thereafter. This reduces the size of the code by about 2K bytes, in
43726 may not be thread-safe.
43767 Update the window with the last wsize (normally 32K) bytes written before
43774 Providing output buffers larger than 32K to inflate() should provide a speed
43775 advantage, since only the last 32K of output is copied to the sliding window
43776 upon return from inflate(), and since all distances after the first 32K of
43793 /* copy state->wsize or less output bytes into the circular window */
43795 utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0);
43800 dist = state.wsize - state.wnext;
43804 //zmemcpy(state->window + state->wnext, end - copy, dist);
43805 utils.arraySet(state.window, src, end - copy, dist, state.wnext);
43806 copy -= dist;
43808 //zmemcpy(state->window, end - copy, copy);
43809 utils.arraySet(state.window, src, end - copy, copy, 0);
43858 //--- LOAD() ---
43867 //---
43884 have--;
43919 //--- DROPBITS(4) ---//
43921 bits -= 4;
43922 //---//
43945 have--;
43981 have--;
44008 have--;
44035 have--;
44067 len = state.head.extra_len - state.length;
44077 // - no need for additional size check
44079 /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/
44084 // state.head.extra_max - len : copy);
44089 have -= copy;
44091 state.length -= copy;
44115 have -= copy;
44140 have -= copy;
44154 have--;
44180 have--;
44194 //--- RESTORE() ---
44201 //---
44212 //--- BYTEBITS() ---//
44214 bits -= bits & 7;
44215 //---//
44222 have--;
44228 //--- DROPBITS(1) ---//
44230 bits -= 1;
44231 //---//
44245 //--- DROPBITS(2) ---//
44247 bits -= 2;
44248 //---//
44261 //--- DROPBITS(2) ---//
44263 bits -= 2;
44264 //---//
44267 //--- BYTEBITS() ---// /* go to byte boundary */
44269 bits -= bits & 7;
44270 //---//
44274 have--;
44303 //--- zmemcpy(put, next, copy); ---
44305 //---//
44306 have -= copy;
44308 left -= copy;
44310 state.length -= copy;
44320 have--;
44326 //--- DROPBITS(5) ---//
44328 bits -= 5;
44329 //---//
44331 //--- DROPBITS(5) ---//
44333 bits -= 5;
44334 //---//
44336 //--- DROPBITS(4) ---//
44338 bits -= 4;
44339 //---//
44356 have--;
44362 //--- DROPBITS(3) ---//
44364 bits -= 3;
44365 //---//
44393 here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/
44399 //--- PULLBYTE() ---//
44401 have--;
44404 //---//
44407 //--- DROPBITS(here.bits) ---//
44409 bits -= here_bits;
44410 //---//
44419 have--;
44424 //--- DROPBITS(here.bits) ---//
44426 bits -= here_bits;
44427 //---//
44433 len = state.lens[state.have - 1];
44435 //--- DROPBITS(2) ---//
44437 bits -= 2;
44438 //---//
44445 have--;
44450 //--- DROPBITS(here.bits) ---//
44452 bits -= here_bits;
44453 //---//
44456 //--- DROPBITS(3) ---//
44458 bits -= 3;
44459 //---//
44466 have--;
44471 //--- DROPBITS(here.bits) ---//
44473 bits -= here_bits;
44474 //---//
44477 //--- DROPBITS(7) ---//
44479 bits -= 7;
44480 //---//
44487 while (copy--) {
44496 /* check for end-of-block code (better have one) */
44498 strm.msg = 'invalid code -- missing end-of-block';
44503 /* build code tables -- note: do not change the lenbits or distbits
44546 //--- RESTORE() ---
44553 //---
44555 //--- LOAD() ---
44564 //---
44567 state.back = -1;
44573 here = state.lencode[hold & ((1 << state.lenbits) - 1)]; /*BITS(state.lenbits)*/
44579 //--- PULLBYTE() ---//
44581 have--;
44584 //---//
44592 … ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];
44598 //--- PULLBYTE() ---//
44600 have--;
44603 //---//
44605 //--- DROPBITS(last.bits) ---//
44607 bits -= last_bits;
44608 //---//
44611 //--- DROPBITS(here.bits) ---//
44613 bits -= here_bits;
44614 //---//
44626 state.back = -1;
44644 have--;
44649 state.length += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;
44650 //--- DROPBITS(state.extra) ---//
44652 bits -= state.extra;
44653 //---//
44662 here = state.distcode[hold & ((1 << state.distbits) - 1)];/*BITS(state.distbits)*/
44668 //--- PULLBYTE() ---//
44670 have--;
44673 //---//
44681 … ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)];
44687 //--- PULLBYTE() ---//
44689 have--;
44692 //---//
44694 //--- DROPBITS(last.bits) ---//
44696 bits -= last_bits;
44697 //---//
44700 //--- DROPBITS(here.bits) ---//
44702 bits -= here_bits;
44703 //---//
44720 have--;
44725 state.offset += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/;
44726 //--- DROPBITS(state.extra) ---//
44728 bits -= state.extra;
44729 //---//
44744 copy = _out - left;
44746 copy = state.offset - copy;
44757 // copy -= state.whave;
44760 // left -= copy;
44761 // state.length -= copy;
44764 // } while (--copy);
44770 copy -= state.wnext;
44771 from = state.wsize - copy;
44774 from = state.wnext - copy;
44781 from = put - state.offset;
44785 left -= copy;
44786 state.length -= copy;
44789 } while (--copy);
44795 left--;
44803 have--;
44809 _out -= left;
44814 /*UPDATE(state.check, put - _out, _out);*/
44815 …state.flags ? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, pu…
44819 // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too
44838 have--;
44871 // inf_leave <- here is real place for "goto inf_leave", emulated via "break inf_leave"
44877 Note: a memory error from inflate() is non-recoverable.
44880 //--- RESTORE() ---
44887 //---
44891 if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) {
44896 _in -= strm.avail_in;
44897 _out -= strm.avail_out;
44902 strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/
44903 …rc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.ne…
44916 if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) {
45008 // (C) 1995-2013 Jean-loup Gailly and Mark Adler
45009 // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
45011 // This software is provided 'as-is', without any express or implied
45070 var drop = 0; /* code bits to drop for sub-table */
45092 code lengths are lens[0..codes-1]. Each length corresponds to the
45093 symbols 0..codes-1. The Huffman code is generated by first sorting the
45117 at length counts to determine sub-table sizes when building the
45131 for (max = MAXBITS; max >= 1; max--) {
45159 /* check for an over-subscribed or incomplete set of lengths */
45163 left -= count[len];
45165 return -1;
45166 } /* over-subscribed */
45169 return -1; /* incomplete set */
45190 those top drop + curr - len bits are incremented through all values to
45194 root, sub-tables are created pointed to by the root entry with an index
45196 new sub-table should be started. drop is zero when the root table is
45197 being filled, and drop is root when sub-tables are being filled.
45199 When a new sub-table is needed, it is necessary to look ahead in the
45200 code lengths to determine what size sub-table is needed. The length
45217 // poor man optimization - use if-else instead of switch,
45220 base = extra = work; /* dummy value--not used */
45225 base_index -= 257;
45227 extra_index -= 257;
45233 end = -1;
45243 low = -1; /* trigger new sub-table when len > root */
45245 mask = used - 1; /* mask for comparing low */
45256 here_bits = len - drop;
45271 incr = 1 << (len - drop);
45275 fill -= incr;
45279 /* backwards increment the len-bit code huff */
45280 incr = 1 << (len - 1);
45285 huff &= incr - 1;
45293 if (--count[len] === 0) {
45298 /* create new sub-table if needed */
45300 /* if first time, transition to sub-tables */
45309 curr = len - drop;
45312 left -= count[curr + drop];
45325 /* point entry in root table to sub-table */
45329 table.val[low] = next - opts.table_index;*/
45330 table[low] = (root << 24) | (curr << 16) | (next - table_index) |0;
45339 //table.bits[next + huff] = len - drop;
45341 table[next + huff] = ((len - drop) << 24) | (64 << 16) |0;
45359 // (C) 1995-2013 Jean-loup Gailly and Mark Adler
45360 // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
45362 // This software is provided 'as-is', without any express or implied
45382 '-1': 'file error', /* Z_ERRNO (-1) */
45383 '-2': 'stream error', /* Z_STREAM_ERROR (-2) */
45384 '-3': 'data error', /* Z_DATA_ERROR (-3) */
45385 '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */
45386 '-5': 'buffer error', /* Z_BUF_ERROR (-5) */
45387 '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */
45399 // (C) 1995-2013 Jean-loup Gailly and Mark Adler
45400 // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
45402 // This software is provided 'as-is', without any express or implied
45418 /* eslint-disable space-unary-ops */
45441 function zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } }
45495 /* repeat previous bit length 3-6 times (2 bits of repeat count) */
45498 /* repeat a zero length 3-10 times (3 bits of repeat count) */
45501 /* repeat a zero length 11-138 times (7 bits of repeat count) */
45503 /* eslint-disable comma-spacing,array-bracket-spacing */
45515 /* eslint-enable comma-spacing,array-bracket-spacing */
45525 // We pre-fill arrays with 0 to avoid uninitialized gaps
45551 var _length_code = new Array(MAX_MATCH - MIN_MATCH + 1);
45572 // show if `static_tree` has data or dummy - needed for monomorphic objects
45612 if (s.bi_valid > (Buf_size - length)) {
45615 s.bi_buf = value >> (Buf_size - s.bi_valid);
45616 s.bi_valid += length - Buf_size;
45640 } while (--len > 0);
45657 s.bi_valid -= 8;
45714 xbits = extra[n - base];
45729 bits = max_length - 1;
45730 while (s.bl_count[bits] === 0) { bits--; }
45731 s.bl_count[bits]--; /* move one leaf down the tree */
45733 s.bl_count[max_length]--;
45737 overflow -= 2;
45745 for (bits = max_length; bits !== 0; bits--) {
45748 m = s.heap[--h];
45751 // Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits));
45752 s.opt_len += (bits - tree[m * 2 + 1]/*.Len*/) * tree[m * 2]/*.Freq*/;
45755 n--;
45783 next_code[bits] = code = (code + bl_count[bits - 1]) << 1;
45788 //Assert (code + bl_count[MAX_BITS]-1 == (1<<MAX_BITS)-1,
45799 // n, (isgraph(n) ? n : ' '), len, tree[n].Code, next_code[len]-1));
45828 /* Initialize the mapping length (0..255) -> length code (0..28) */
45830 for (code = 0; code < LENGTH_CODES - 1; code++) {
45841 _length_code[length - 1] = code;
45843 /* Initialize the mapping dist (0..32K) -> dist code (0..29) */
45855 for (n = 0; n < (1 << (extra_dbits[code] - 7)); n++) {
45933 //put_byte(s, (Byte)s->bi_buf);
45956 // while (len--) {
45975 * Restore the heap property by moving down the tree starting at node k,
45977 * when the heap property is re-established (each father smaller than its
45980 function pqdownheap(s, tree, k)
45983 // int k; /* node to move down */
45985 var v = s.heap[k];
45986 var j = k << 1; /* left son of k */
45997 s.heap[k] = s.heap[j];
45998 k = j;
46000 /* And continue down the tree, setting j to the left son of k */
46003 s.heap[k] = v;
46034 /* Here, lc is the match length - MIN_MATCH */
46039 lc -= base_length[code];
46042 dist--; /* dist is now the match distance - 1 */
46049 dist -= base_dist[code];
46055 //Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx,
46082 var max_code = -1; /* largest code with non zero frequency */
46111 s.opt_len--;
46114 s.static_len -= stree[node * 2 + 1]/*.Len*/;
46121 * establish sub-heaps of increasing lengths:
46123 for (n = (s.heap_len >> 1/*int /2*/); n >= 1; n--) { pqdownheap(s, tree, n); }
46133 s.heap[1/*SMALLEST*/] = s.heap[s.heap_len--];
46139 s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */
46140 s.heap[--s.heap_max] = m;
46153 s.heap[--s.heap_max] = s.heap[1/*SMALLEST*/];
46175 var prevlen = -1; /* last emitted length */
46241 var prevlen = -1; /* last emitted length */
46250 /* tree[max_code+1].Len = -1; */ /* guard already set */
46264 do { send_code(s, curlen, s.bl_tree); } while (--count !== 0);
46269 count--;
46273 send_bits(s, count - 3, 2);
46277 send_bits(s, count - 3, 3);
46281 send_bits(s, count - 11, 7);
46323 for (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) {
46331 // s->opt_len, s->static_len));
46352 send_bits(s, lcodes - 257, 5); /* not +255 as stated in appnote.txt */
46353 send_bits(s, dcodes - 1, 5);
46354 send_bits(s, blcodes - 4, 4); /* not -3 as stated in appnote.txt */
46359 //Tracev((stderr, "\nbl tree: sent %ld", s->bits_sent));
46361 send_tree(s, s.dyn_ltree, lcodes - 1); /* literal tree */
46362 //Tracev((stderr, "\nlit tree: sent %ld", s->bits_sent));
46364 send_tree(s, s.dyn_dtree, dcodes - 1); /* distance tree */
46365 //Tracev((stderr, "\ndist tree: sent %ld", s->bits_sent));
46371 * - TEXT if the two conditions below are satisfied:
46372 * a) There are no non-portable control characters belonging to the
46376 * - BINARY otherwise.
46377 * - The following partially-portable control characters form a
46383 /* black_mask is the bit mask of black-listed bytes
46390 /* Check for non-textual ("black-listed") bytes. */
46397 /* Check for textual ("white-listed") bytes. */
46408 /* There are no "black-listed" or "white-listed" bytes:
46409 * this stream either is empty or has tolerated ("gray-listed") bytes only.
46488 // Tracev((stderr, "\nlit data: dyn %ld, stat %ld", s->opt_len,
46489 // s->static_len));
46492 // Tracev((stderr, "\ndist data: dyn %ld, stat %ld", s->opt_len,
46493 // s->static_len));
46508 // opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len,
46509 // s->last_lit));
46518 if ((stored_len + 4 <= opt_lenb) && (buf !== -1)) {
46539 // Assert (s->compressed_len == s->bits_sent, "bad compressed size");
46548 // Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len>>3,
46549 // s->compressed_len-7*last));
46559 // unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */
46574 /* Here, lc is the match length - MIN_MATCH */
46575 dist--; /* dist = match distance - 1 */
46577 // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) &&
46592 // in_length = s.strstart - s.block_start;
46599 // // s->last_lit, in_length, out_length,
46600 // // 100L - out_length*100L/in_length));
46607 return (s.last_lit === s.lit_bufsize - 1);
46608 /* We avoid equality with lit_bufsize because of wraparound at 64K
46610 * 64K-1 bytes.
46629 // (C) 1995-2013 Jean-loup Gailly and Mark Adler
46630 // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin
46632 // This software is provided 'as-is', without any express or implied
46773 var queueIndex = -1;
46783 queueIndex = -1;
46806 queueIndex = -1;
46815 var args = new Array(arguments.length - 1);
46818 args[i - 1] = arguments[i];
46882 throw new $TypeError('RegExp.prototype.flags getter called on non-object');
46962 /* eslint getter-return: 0 */
47024 ;(function (sax) { // wrapper for non-node envs
47031 // When we check, schedule the next check for MAX_BUFFER_LENGTH - (max(buffer lengths)),
47154 var m = sax.MAX_BUFFER_LENGTH - maxActual
47277 if (!me._parser['on' + ev] && streamWraps.indexOf(ev) !== -1) {
47296 // http://www.w3.org/TR/REC-xml/#NT-NameStartChar
47298 // as such, it cannot ever support astral-plane characters (10000-EFFFF)
47300 // JavaScript language. Implementation of an emoji-capable xml parser
47302 …/[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u2…
47304-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u…
47306 …[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u2…
47307-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u…
47342 COMMENT_STARTING: S++, // <!-
47343 COMMENT: S++, // <!--
47344 COMMENT_ENDING: S++, // <!-- blah -
47345 COMMENT_ENDED: S++, // <!-- blah --
47706 var parent = parser.tags[parser.tags.length - 1] || parser
47737 if (parser.attribList.indexOf(parser.attribName) !== -1 ||
47760 var parent = parser.tags[parser.tags.length - 1] || parser
47773 // in non-xmlns mode, we can emit the event right away
47801 var parent = parser.tags[parser.tags.length - 1] || parser
47813 // http://www.w3.org/TR/REC-xml-names/#defaulting
47850 // special case for <script> in non-strict mode.
47890 while (t--) {
47909 while (s-- > t) {
47919 var parent = parser.tags[parser.tags.length - 1] || parser
47974 strictFail(parser, 'Non-whitespace before first tag.')
48038 var starti = i - 1
48051 parser.textNode += chunk.substring(starti, i - 1)
48069 // only non-strict
48106 var pad = parser.position - parser.startTagPosition
48120 } else if (parser.sgmlDecl + c === '--') {
48195 if (c === '-') {
48203 if (c === '-') {
48211 parser.comment += '-' + c
48219 // allow <!-- blah -- bloo --> in non-strict mode,
48220 // which is a comment of " blah -- bloo "
48221 parser.comment += '--' + c
48318 strictFail(parser, 'Forward-slash in opening tag not followed by >')
48544 var index = -1
48553 !isFinite(codePoint) || // `NaN`, `+Infinity`, or `-Infinity`
48563 // http://mathiasbynens.be/notes/javascript-encoding#surrogate-formulae
48564 codePoint -= 0x10000
48631 // Backwards-compat with node 0.4.x
48636 // old-style streams. Note that the pipe method (the only relevant
48722 // Allow for unix-like usage: A.pipe(B).pipe(C)
48778 …e of ".concat(thing, " ").concat(expected.slice(0, len - 1).join(', '), ", or ") + expected[len -
48787 } // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/starts…
48792 } // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWi…
48800 return str.substring(this_len - search.length, this_len) === search;
48801 } // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includ…
48812 return str.indexOf(search, start) !== -1;
48969 }); // the no-half-open enforcer
49037 // Every written chunk gets output as-is.
49417 n--;
49500 if (state.length === 0 || state.length - n < state.highWaterMark) {
49520 // and we need to re-evaluate how much data we can return to the user.
49532 state.length -= n;
49630 // - Not enough data buffered (state.length < state.highWaterMark). The loop
49635 // - No data in the buffer, and the stream is in flowing mode. In this mode
49643 // - The stream has ended (state.ended).
49644 // - There is already a pending 'read' operation (state.reading). This is a
49661 // for virtual (non-string, non-buffer) streams, "length" is somewhat
49750 …state.pipes === dest || state.pipesCount > 1 && indexOf(state.pipes, dest) !== -1) && !cleanedUp) {
49806 if (state.awaitDrain) state.awaitDrain--;
49855 if (index === -1) return this;
49857 state.pipesCount -= 1;
49870 // update readableListening so that resume() may be a no-op
50003 } // wrap an old-style stream as the async data source.
50184 return -1;
50221 // a zlib stream might take multiple plain-text writes(), and then
50239 // This way, back-pressure is actually determined by the reading side,
50243 // interpreted as an integer from 0-255, and then results in that many
50252 // would be consumed, and then the rest would wait (un-transformed) until
50533 // this is here so that some node-core streams can optimize string
50569 this.lastBufferedRequest = null; // number of pending user-supplied write callbacks
50635 // Node.js LazyTransform implementation, which has a non-trivial getter for
50666 } // Checks that a user-supplied chunk is valid, especially for the particular
50668 // and undefined/non-string values are only allowed in object mode.
50721 state.corked--;
50729 …', 'utf8', 'utf-8', 'ascii', 'binary', 'base64', 'ucs2', 'ucs-2', 'utf16le', 'utf-16le', 'raw'].in…
50815 --state.pendingcb;
50841 state.length -= state.writelen;
50869 state.pendingcb--;
50921 // Slow case, write chunks one-by-one
50929 state.bufferedRequestCount--; // if we didn't call the onwrite immediately, then
50992 state.pendingcb--;
51060 state.pendingcb--;
51344 // to make it re-entrance safe in case destroy() is called within callbacks
51414 // For now when you opt-in to autoDestroy we allow
51434 // Ported from https://github.com/mafintosh/end-of-stream with
51602 destroyed = true; // request.destroy just do .end - .abort is what we want
51620 if (typeof streams[streams.length - 1] !== 'function') return noop;
51638 var reading = i < streams.length - 1;
51703-8/i.test(a.type)?new Blob(["\uFEFF",a],{type:a.type}):a}function c(a,b,c){var d=new XMLHttpReques…
51744 …e 'hex':case 'utf8':case 'utf-8':case 'ascii':case 'binary':case 'base64':case 'ucs2':case 'ucs-2'…
51757 case 'utf-8':
51760 case 'ucs-2':
51762 case 'utf-16le':
51780 // modules monkey-patch it to support additional encodings
51788 // buffers into a series of JS strings without breaking apart multi-byte
51840 // Attempts to complete a partial non-UTF-8 character using bytes from a Buffer
51843 buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed);
51846 buf.copy(this.lastChar, this.lastTotal - this.lastNeed, 0, buf.length);
51847 this.lastNeed -= buf.length;
51850 // Checks the type of a UTF-8 byte, whether it's ASCII, a leading byte, or a
51851 // continuation byte. If an invalid byte is detected, -2 is returned.
51854 return byte >> 6 === 0x02 ? -1 : -2;
51858 // incomplete multi-byte UTF-8 character. The total number of bytes (2, 3, or 4)
51859 // needed to complete the UTF-8 character (if applicable) are returned.
51861 var j = buf.length - 1;
51865 if (nb > 0) self.lastNeed = nb - 1;
51868 if (--j < i || nb === -2) return 0;
51871 if (nb > 0) self.lastNeed = nb - 2;
51874 if (--j < i || nb === -2) return 0;
51878 if (nb === 2) nb = 0;else self.lastNeed = nb - 3;
51885 // Validates as many continuation bytes for a multi-byte UTF-8 character as
51886 // needed or are available. If we see a non-continuation byte where we expect
51888 // a single UTF-8 replacement character ('\ufffd'), to match v8's UTF-8 decoding
51912 // Attempts to complete a multi-byte UTF-8 character using bytes from a Buffer.
51914 var p = this.lastTotal - this.lastNeed;
51922 this.lastNeed -= buf.length;
51925 // Returns all complete UTF-8 characters in a Buffer. If the Buffer ended on a
51932 var end = buf.length - (total - this.lastNeed);
51937 // For UTF-8, a replacement character is added when ending on a partial
51945 // UTF-16LE typically needs two bytes per character, but even if we have an even
51950 if ((buf.length - i) % 2 === 0) {
51953 var c = r.charCodeAt(r.length - 1);
51957 this.lastChar[0] = buf[buf.length - 2];
51958 this.lastChar[1] = buf[buf.length - 1];
51959 return r.slice(0, -1);
51966 this.lastChar[0] = buf[buf.length - 1];
51967 return buf.toString('utf16le', i, buf.length - 1);
51970 // For UTF-16LE we do not explicitly append special replacement characters if we
51975 var end = this.lastTotal - this.lastNeed;
51982 var n = (buf.length - i) % 3;
51984 this.lastNeed = 3 - n;
51987 this.lastChar[0] = buf[buf.length - 1];
51989 this.lastChar[0] = buf[buf.length - 2];
51990 this.lastChar[1] = buf[buf.length - 1];
51992 return buf.toString('base64', i, buf.length - n);
51997 if (this.lastNeed) return r + this.lastChar.toString('base64', 0, 3 - this.lastNeed);
52001 // Pass bytes on through for single-byte encodings (e.g. ascii, latin1, hex)
52016 var TINF_DATA_ERROR = -3;
52020 this.trans = new Uint16Array(288); /* code -> symbol translation table */
52036 /* --------------------------------------------------- *
52037 * -- uninitialized global data (static structures) -- *
52038 * --------------------------------------------------- */
52062 /* ----------------------- *
52063 * -- utility functions -- *
52064 * ----------------------- */
52072 for (i = 0; i < 30 - delta; ++i) bits[i + delta] = i / delta | 0;
52125 /* create code->symbol translation table (symbols sorted by code) */
52131 /* ---------------------- *
52132 * -- decode functions -- *
52133 * ---------------------- */
52138 if (!d.bitcount--) {
52161 var val = d.tag & (0xffff >>> (16 - num));
52163 d.bitcount -= num;
52184 cur -= t.table[len];
52188 d.bitcount -= len;
52198 /* get 5 bits HLIT (257-286) */
52201 /* get 5 bits HDIST (1-32) */
52204 /* get 4 bits HCLEN (4-19) */
52211 /* get 3 bits code length (0-7) */
52225 /* copy previous code length 3-6 times (read 2 bits) */
52226 var prev = lengths[num - 1];
52227 for (length = tinf_read_bits(d, 2, 3); length; --length) {
52232 /* repeat code length 0 for 3-10 times (read 3 bits) */
52233 for (length = tinf_read_bits(d, 3, 3); length; --length) {
52238 /* repeat code length 0 for 11-138 times (read 7 bits) */
52239 for (length = tinf_read_bits(d, 7, 11); length; --length) {
52244 /* values 0-15 represent the actual code lengths */
52255 /* ----------------------------- *
52256 * -- block inflate functions -- *
52257 * ----------------------------- */
52275 sym -= 257;
52283 offs = d.destLen - tinf_read_bits(d, dist_bits[dist], dist_base[dist]);
52300 d.sourceIndex--;
52301 d.bitcount -= 8;
52319 for (i = length; i; --i)
52374 /* -------------------- *
52375 * -- initialization -- *
52376 * -------------------- */
52468 …throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, n…
52469 …yLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object…
52645 // Language code for this encoding subtable, or zero if language-independent
52649 // High-byte mapping (CJK)
52679 return (t.length - t._currentOffset) / 2;
52691 // mixed 16-bit and 32-bit coverage
52717 // Many-to-one range mappings (same as 12 except for group.startGlyphID)
52735 // Platform-specific encoding identifier
52797 // Set to 0 for non-slanted fonts
52813 return t.parent.maxp.numGlyphs - t.parent.hhea.numberOfMetrics;
52821 // Maximum points in a non-composite glyph
52823 // Maximum contours in a non-composite glyph
52849 * Returned encoding names can be used in iconv-lite to decode text.
52883-jis', 'big5', 'euc-kr', 'iso-8859-6', 'iso-8859-8', 'macgreek', 'maccyrillic', 'symbol', 'Devanag…
52887 // Docs here: http://msdn.microsoft.com/en-us/library/system.text.encoding(v=vs.110).aspx
52888 ['symbol', 'utf16be', 'shift-jis', 'gb18030', 'big5', 'wansung', 'johab', null, null, null, 'utf16b…
52906 // Unsupported by iconv-lite
52907 146: 'macgaelic' // Unsupported by iconv-lite
52908 }; // Map of platform ids to BCP-47 language codes.
52931 34: 'nl-BE',
52990 19: 'zh-Hant',
52991 49: 'az-Cyrl',
52995 50: 'az-Arab',
53012 84: 'ms-Arab',
53017 148: 'el-polyton',
53023 57: 'mn-CN',
53038 0x4009: 'en-IN',
53042 0x1809: 'en-IE',
53046 0x2009: 'en-JM',
53050 0x4409: 'en-MY',
53053 0x1401: 'ar-DZ',
53054 0x1409: 'en-NZ',
53056 0x2C0A: 'es-AR',
53057 0x3C01: 'ar-BH',
53058 0x3409: 'en-PH',
53060 0x400A: 'es-BO',
53062 0x4809: 'en-SG',
53064 0x340A: 'es-CL',
53065 0x0801: 'ar-IQ',
53066 0x1C09: 'en-ZA',
53068 0x240A: 'es-CO',
53069 0x2C01: 'ar-JO',
53070 0x2C09: 'en-TT',
53072 0x140A: 'es-CR',
53073 0x3401: 'ar-KW',
53074 0x0809: 'en-GB',
53076 0x1C0A: 'es-DO',
53077 0x3001: 'ar-LB',
53080 0x300A: 'es-EC',
53081 0x1001: 'ar-LY',
53082 0x3009: 'en-ZW',
53083 0x083E: 'ms-BN',
53084 0x440A: 'es-SV',
53088 0x100A: 'es-GT',
53089 0x2001: 'ar-OM',
53092 0x480A: 'es-HN',
53093 0x4001: 'ar-QA',
53096 0x080A: 'es-MX',
53097 0x0401: 'ar-SA',
53100 0x4C0A: 'es-NI',
53101 0x2801: 'ar-SY',
53102 0x080C: 'fr-BE',
53104 0x180A: 'es-PA',
53106 0x0C0C: 'fr-CA',
53108 0x3C0A: 'es-PY',
53109 0x3801: 'ar-AE',
53112 0x280A: 'es-PE',
53113 0x2401: 'ar-YE',
53114 0x140C: 'fr-LU',
53116 0x500A: 'es-PR',
53118 0x180C: 'fr-MC',
53119 0x0850: 'mn-CN',
53122 0x100C: 'fr-CH',
53125 0x082C: 'az-Cyrl',
53128 0x540A: 'es-US',
53132 0x380A: 'es-UY',
53136 0x200A: 'es-VE',
53138 0x0C07: 'de-AT',
53140 0x081D: 'sv-FI',
53146 0x1407: 'de-LI',
53149 0x0445: 'bn-IN',
53150 0x1007: 'de-LU',
53153 0x201A: 'bs-Cyrl',
53154 0x0807: 'de-CH',
53155 0x0816: 'pt-PT',
53163 0x046B: 'qu-BO',
53167 0x086B: 'qu-EC',
53173 0x0C04: 'zh-HK',
53177 0x1404: 'zh-MO',
53185 0x1004: 'zh-SG',
53189 0x0404: 'zh-TW',
53191 0x103B: 'smj-NO',
53199 0x0C3B: 'se-FI',
53201 0x101A: 'hr-BA',
53202 0x085D: 'iu-Latn',
53204 0x0843: 'uz-Cyrl',
53207 0x083B: 'se-SE',
53215 0x183B: 'sma-NO',
53221 0x0813: 'nl-BE',
53222 0x0810: 'it-CH',
53227 0x1C1A: 'sr-Cyrl-BA',
53229 0x0C09: 'en-AU',
53233 0x2809: 'en-BZ',
53235 0x181A: 'sr-Latn-BA',
53236 0x1009: 'en-CA',
53238 0x081A: 'sr-Latn',
53239 0x2409: 'en-029',
53294 language = this.langTags[record.languageID - 0x8000].tag;
53297 language = record.platformID + '-' + record.languageID;
53376 // classification of font-family design
53436 // Italic angle in counter-clockwise degrees from the vertical.
53516 return ctx ? ctx.version : -1;
53538 var startPos = stream.pos + (count + 1) * offSize - 1;
53545 parent.length = end - start;
53551 length: end - start
53584 size += offset - 1;
53633 var FLOAT_LOOKUP = ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '.', 'E', 'E-', null, '-'];
53637 'E-': 12,
53638 '-': 14
53644 return value - 139;
53647 return (value - 247) * 256 + stream.readUInt8() + 108;
53650 return -(value - 251) * 256 - stream.readUInt8() - 108;
53687 } else if (-107 <= value && value <= 107) {
53689 } else if (108 <= value && value <= 1131 || -1131 <= value && value <= -108) {
53691 } else if (-32768 <= value && value <= 32767) {
53711 if (i === str.length - 1) {
53722 } else if (-107 <= val && val <= 107) {
53725 val -= 108;
53728 } else if (-1131 <= val && val <= -108) {
53729 val = -val - 108;
53732 } else if (-32768 <= val && val <= 32767) {
53849 for (var k in this.fields) {
53850 var field = this.fields[k];
53976K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "bracketleft", "bac…
53977K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'bracketleft', 'bac…
53979K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'bracketleft', 'bac…
54102 return t.glyphCount - 1;
54111 return t.glyphCount - 1;
54124 // Class-based context
54145 return t.inputGlyphCount - 1;
54161 // Class-based chaining context
54170 // Coverage-based chaining context
54202 return t.parent.regionIndexCount - t.parent.shortDeltaCount;
54278 if (index !== -1) {
54342 return t.parent.CharStrings.length - 1;
54347 return t.parent.CharStrings.length - 1;
54352 return t.parent.CharStrings.length - 1;
54405 …, 2], 'ItalicAngle', 'number', 0], [[12, 3], 'UnderlinePosition', 'number', -100], [[12, 4], 'Unde…
54461 return this.stringIndex[sid - standardStrings.length];
54471 } // CID-keyed fonts don't have glyph names
54483 gid -= 1;
54492 return this.string(range.first + (gid - range.offset));
54510 var high = ranges.length - 1;
54514 high = mid - 1;
54667 return t.parent.lastGlyphIndex - t.parent.firstGlyphIndex + 1;
54676 return t.parent.lastGlyphIndex - t.parent.firstGlyphIndex + 1;
54737 // Glyph ID of layer glyph (must be in z-order from bottom to top).
54808 // Index of default baseline for this script-same index in the BaseTagList
54814 // 4-byte feature identification tag-must match FeatureTag in FeatureList
54836 // 4-byte language system identification tag
54853 // 4-byte script identification tag
54858 …st = new r.Array(BaseScriptRecord, r.uint16); // Array of 4-byte baseline identification tags-must…
55151 return t.compCount - 1;
55291 return t.entry & (1 << (t.parent.entryFormat & 0x000F) + 1) - 1;
55373 return t._startOffset - t.parent.parent._startOffset;
55376 return ((t.parent.leftTable.max - t.off) / t.parent.rowWidth + 1) * (t.parent.rowWidth / 2);
55418 // Microsoft has an extra sub-table version number
55434 return t.length - t._currentOffset;
55443 // Set if table has cross-stream kerning values
55451 return t.length - t._currentOffset;
55505 // Value to use for x-Ratio
55507 // Starting y-Ratio value
55508 yEndRatio: r.uint8 // Ending y-Ratio value
55581 return t.parent.maxp.numGlyphs - t.parent.vhea.numberOfMetrics;
55673 return t.lastGlyph - t.firstGlyph + 1;
55755 …return (t.newStateOffset - (t.parent.stateArray.base - t.parent._startOffset)) / t.parent.nClasses;
55773 // Distance-based, no mapping
55777 // Distance-based, with mapping
55782 // Control point-based, no mapping
55787 // Control point-based, with mapping
55847 return t.parent.instanceSize - t._currentOffset > 0;
55945 return t.actionLength - t._currentOffset;
56005 // Non-contextual Glyph Substitution Subtable
56021 return t.length - t._currentOffset;
56144 this.rangeShift = this.numTables * 16 - this.searchRange;
56148 var max = arr.length - 1;
56153 max = mid - 1;
56160 return -1;
56178 // 32-bit subtables
56180 // 16-bit subtables
56181 …[3, 1], [0, 3], [0, 2], [0, 1], [0, 0]]); // If not unicode cmap was found, and iconv-lite is inst…
56187 var encoding = getEncoding(cmap.platformID, cmap.encodingID, cmap.table.language - 1);
56218 // If there is no Unicode cmap in this font, we need to re-encode
56239 var max = cmap.segCount - 1;
56243 max = mid - 1;
56252 … var index = rangeOffset / 2 + (codepoint - cmap.startCode.get(mid)) - (cmap.segCount - mid);
56267 return cmap.glyphIndices.get(codepoint - cmap.firstCode) || 0;
56272 var _max = cmap.nGroups - 1;
56277 _max = _mid - 1;
56282 return group.glyphID + (codepoint - group.startCharCode);
56302 return variationSelector - x.varSelector;
56305 if (i !== -1 && sel.defaultUVS) {
56307 …return codepoint < x.startUnicodeValue ? -1 : codepoint > x.startUnicodeValue + x.additionalCount …
56310 if (i !== -1 && sel.nonDefaultUVS) {
56312 return codepoint - x.unicodeValue;
56314 if (i !== -1) {
56383 var index = rangeOffset / 2 + (c - start) - (cmap.segCount - _i);
56401 … if (gid >= group.glyphID && gid <= group.glyphID + (group.endCharCode - group.startCharCode)) {
56402 _res3.push(group.startCharCode + (gid - group.glyphID));
56430 for (var glyphIndex = 0; glyphIndex < glyphs.length - 1; glyphIndex++) {
56462 return left - pair.left || right - pair.right;
56472 leftOffset = s.leftTable.offsets[left - s.leftTable.firstGlyph];
56477 rightOffset = s.rightTable.offsets[right - s.rightTable.firstGlyph];
56479 var index = (leftOffset + rightOffset - s.array.off) / 2;
56489 throw new Error("Unsupported kerning sub-table format ".concat(table.format));
56509 * https://github.com/behdad/harfbuzz/blob/master/src/hb-ot-shape-fallback.cc
56543 baseBox.minX += (base.codePoints.length - 1) * baseBox.width / base.codePoints.length;
56545 var xOffset = -positions[clusterStart].xAdvance;
56561 position.xOffset += baseBox.minX - markBox.width / 2 - markBox.minX;
56567 position.xOffset += baseBox.minX - markBox.minX;
56573 position.xOffset += baseBox.maxX - markBox.width - markBox.minX;
56578 position.xOffset += baseBox.minX + (baseBox.width - markBox.width) / 2 - markBox.minX;
56592 position.yOffset = -baseBox.minY - markBox.maxY;
56605 position.yOffset = baseBox.maxY - markBox.minY;
56613 xOffset -= position.xAdvance;
56614 yOffset -= position.yAdvance;
56620 …var combiningClass = unicode.getCombiningClass(codePoint); // Thai / Lao need some per-character w…
56761 maxX = -Infinity;
56764 maxY = -Infinity;
56819 return this.maxX - this.minX;
56828 return this.maxY - this.minY;
57215 }; // see https://developer.apple.com/fonts/TrueType-Reference-Manual/RM09/AppendixF.html
57454 // noRubyKana: 0 # deprecated - use rubyKanaOff instead
57455 // rubyKana: 1 # deprecated - use rubyKanaOn instead
57487 // noCJKItalicRoman: 0 # deprecated - use CJKItalicRomanOff instead
57488 // CJKItalicRoman: 1 # deprecated - use CJKItalicRomanOn instead
57586 // dist -> trak table?
57587 // kern, vkrn -> kern table
57588 // lfbd + opbd + rtbd -> opbd table?
57589 // mark, mkmk -> acnt table?
57590 // locl -> languageTag + ltag table
57682 // Add cv01-cv99 features
57685 OTMapping["cv".concat("00".concat(i).slice(-2))] = [features.characterAlternatives.code, i];
57700 for (var k in features) {
57702 if (r = OTMapping[k]) {
57706 res[r[0]][r[1]] = features[k];
57735 for (var k = 0; k < features.length; k++) {
57737 var f = mapFeatureStrings(features[k]);
57772 var max = this.table.binarySearchHeader.nUnits - 1;
57781 max = mid - 1;
57788 return seg.values[glyph - seg.firstGlyph];
57798 var _max = this.table.binarySearchHeader.nUnits - 1;
57807 _max = mid - 1;
57818 return this.table.values[glyph - this.table.firstGlyph];
57886 var index = reverse ? glyphs.length - 1 : 0;
57887 var dir = reverse ? -1 : 1;
57888 while (dir === 1 && index <= glyphs.length || dir === -1 && index >= -1) {
57892 if (index === glyphs.length || index === -1) {
57921 * Performs a depth-first traversal of the glyph strings
58021 var index = glyphs.length - 1;
58026 index--;
58155 while (count--) {
58236 glyphs.push(input[input.length - 1]); // Process ligature substitution
58238 …process(glyphs[glyphs.length - 1], entry, glyphs.length - 1); // Add input to result if only one m…
58280 var end = glyphs.splice(rangeB[0] - (rangeB[1] - 1), rangeB[1]);
58288 glyphs.splice.apply(glyphs, [rangeB[0] - (rangeA[1] - 1), 0].concat(start));
58354 // so reverse the glyphs if the script is right-to-left.
58377 if (index < glyphs.length - 1) {
58410 var stageIndex = this.stages.length - 1;
58541 while (start > 0 && unicode.isDigit(glyphs[start - 1].codePoints[0])) {
58542 glyphs[start - 1].features.numr = true;
58543 glyphs[start - 1].features.frac = true;
58544 start--;
58554 i = end - 1;
58601 * compiled to a UnicodeTrie by generate-data.coffee.
58604 * https://github.com/behdad/harfbuzz/blob/master/src/hb-ot-shape-complex-arabic.cc
58621 var prev = -1;
58638 if (prevAction !== NONE && prev !== -1) {
58658 return res - 1;
58701 return this.move(-1);
58726 var dir = count < 0 ? -1 : 1;
58728 while (count--) {
58753 …sor ? this.findVariationsIndex(font._variationProcessor.normalizedCoords) : -1; // initialize to d…
58803 language += ' '.repeat(4 - language.length);
58848 if (exclude && exclude.indexOf(lookupIndex) !== -1) {
58859 return a.index - b.index;
58864 if (this.variationsIndex === -1) {
58880 return -1;
58889 return -1;
58963 return range.startCoverageIndex + glyph - range.start;
58968 return -1;
59012 var i = glyph - classDef.startGlyph;
59038 if (index === -1) {
59050 if (this.coverageIndex(table.coverage) === -1) {
59054 if (index === -1) {
59077 if (index === -1) {
59083 …if (this.sequenceMatches(-rule.backtrack.length, rule.backtrack) && this.sequenceMatches(1, rule.i…
59089 if (this.coverageIndex(table.coverage) === -1) {
59099 …if (this.classSequenceMatches(-_rule2.backtrack.length, _rule2.backtrack, table.backtrackClassDef)…
59105 …if (this.coverageSequenceMatches(-table.backtrackGlyphCount, table.backtrackCoverage) && this.cove…
59173 * - decompose if unsupported by the font:
59174 * <LV> -> <L,V>
59175 * <LVT> -> <L,V,T>
59176 * <LV,T> -> <L,V,T>
59178 * - compose if supported by the font:
59179 * <L,V> -> <LV>
59180 * <L,V,T> -> <LVT>
59181 * <LV,T> -> <LVT>
59183 * - reorder tone marks (S is any valid syllable):
59184 * <S, M> -> <M, S>
59186 * - apply ljmo, vjmo, and tjmo OpenType features to decomposed Jamo sequences.
59189 * - http://www.microsoft.com/typography/OpenTypeDev/hangul/intro.htm
59190 * - http://ktug.org/~nomos/harfbuzz-hangul/hangulshaper.pdf
59239 var HANGUL_COUNT = HANGUL_END - HANGUL_BASE + 1;
59249 var L_END = L_BASE + L_COUNT - 1;
59250 var V_END = V_BASE + V_COUNT - 1;
59251 var T_END = T_BASE + T_COUNT - 1;
59269 return code - HANGUL_BASE < HANGUL_COUNT && (code - HANGUL_BASE) % T_COUNT === 0;
59341 var s = code - HANGUL_BASE;
59363 return i + insert.length - 1;
59369 var prev = glyphs[i - 1].codePoints[0];
59380 ljmo = glyphs[i - 1];
59384 ljmo = glyphs[i - 2];
59385 vjmo = glyphs[i - 1];
59392 lv = HANGUL_BASE + ((l - L_BASE) * V_COUNT + (v - V_BASE)) * T_COUNT;
59397 var s = lv + (t - T_BASE); // Replace with a composed glyph if supported by the font,
59402 glyphs.splice(i - del + 1, del, getGlyph(font, s, glyph.features));
59403 return i - del + 1;
59405 } // Didn't compose (either a non-combining component or unsupported by font).
59418 // Either the T was non-combining, or the LVT glyph wasn't supported.
59420 decompose(glyphs, i - 1, font);
59443 var prev = glyphs[i - 1].codePoints[0];
59446 return glyphs.splice(i - len, 0, glyph);
59545 // Khmer-style Virama.
59547 // Atomically-encoded logical or visual repha.
59550 // Consonant-Medial.
59688 …code from Harfbuzz: https://github.com/behdad/harfbuzz/blob/master/src/hb-ot-shape-complex-indic.cc
59719 …plan.isOldSpec = plan.indicConfig.hasOldSpec && plan.script[plan.script.length - 1] !== '2'; // TO…
59736 for (var i = glyphs.length - 1; i >= 0; i--) {
59847 // until a consonant is found that does not have a below-base or post-base
59848 // form (post-base forms have to follow below-base forms), or that is not a
59849 // pre-base reordering Ra, or arrive at the first consonant. The consonant
59884 var _info = glyphs[--_i4].shaperInfo; // until a consonant is found
59887 // that does not have a below-base or post-base form
59888 // (post-base forms have to follow below-base forms),
59892 } // or that is not a pre-base reordering Ra,
59896 // Our pre-base reordering Ra's are marked POS_POST_C, so will be skipped
59906 …} else if (start < _i4 && _info.category === CATEGORIES.ZWJ && glyphs[_i4 - 1].shaperInfo.category…
59911 // sequence Ra,H,Ya that should form Ya-Phalaa by subjoining Ya.
59934 if (hasReph && base === start && limit - base <= 2) {
59940 // shaping engine decomposes two- or three-part matras into their constituent
59947 // o After post-form consonant
59987 } // For old-style Indic script tags, move the first post-base Halant after
60002 // With lohit-ttf-20121122/Lohit-Malayalam.ttf
60009 for (_j = end - 1; _j > _i8; _j--) {
60017 glyphs.splice.apply(glyphs, [_i8, 0].concat(glyphs.splice(_i8 + 1, _j - _i8)));
60038 for (var _j2 = _i9; _j2 > start; _j2--) {
60039 if (glyphs[_j2 - 1].shaperInfo.position !== POSITIONS.Pre_M) {
60040 _info3.position = glyphs[_j2 - 1].shaperInfo.position;
60048 } // For post-base consonants let them own anything before them
60066 return a.shaperInfo.position - b.shaperInfo.position;
60080 } // Pre-base
60088 } // Post-base
60096 // Old-spec eye-lash Ra needs special handling. From the
60099 // "The feature 'below-base form' is applied to consonants
60100 // having below-base forms and following the base consonant.
60102 // as well as below the base glyph. The feature 'below-base
60122 // Find a Halant,Ra sequence and mark it for pre-base reordering processing.
60123 for (var _i16 = base + 1; _i16 + prefLen - 1 < end; _i16++) {
60149 _j5--; // ZWJ/ZWNJ should disable CJCT. They do that by simply
60193 } // For Malayalam, skip over unformed below- (but NOT post-) forms.
60215 base--;
60220 if (base === end && start < base && glyphs[base - 1].shaperInfo.category === CATEGORIES.ZWJ) {
60221 base--;
60225 base--;
60229 // If a pre-base matra character had been reordered before applying basic
60231 // whether half-forms had been formed. Actual position for the matra is
60238 // Otherwise there can't be any pre-base matra characters.
60240 …var newPos = base === end ? base - 2 : base - 1; // Malayalam / Tamil do not have "half" forms or …
60246 newPos--;
60263 for (var _i19 = newPos; _i19 > start; _i19--) {
60264 if (glyphs[_i19 - 1].shaperInfo.position === POSITIONS.Pre_M) {
60265 var oldPos = _i19 - 1;
60268 base--;
60271 … glyphs.splice.apply(glyphs, [oldPos, 0].concat(glyphs.splice(oldPos + 1, newPos - oldPos)));
60273 newPos--;
60281 // it will be reordered according to the basic-forms shaping results.
60283 // before post-base consonant forms, and after post-base consonant forms.
60286 // - If repha is encoded as a sequence of characters (Ra,H or Ra,H,ZWJ), then
60289 // - If repha is encoded separately and in the logical position, we should only
60296 var found = false; // 1. If reph should be positioned after post-base consonant forms,
60300 // 2. If the reph repositioning class is not after post-base: target
60302 // first post-reph consonant and last main consonant. If ZWJ or ZWNJ
60307 // Note: in old-implementation fonts, where classifications were
60315 // ->If ZWJ or ZWNJ are following this halant, position is moved after it.
60322 // consonant that is not a potential pre-base reordering Ra.
60330 } // 4. If reph should be positioned before post-base consonant, find
60331 // first post-base classified consonant not ligated with main. If no
60345 // immediately before the first post-base matra, syllable modifier
60348 // is post-main, it will skip above-base matras that also have a
60349 // post-main position.
60358 // ->If ZWJ or ZWNJ are following this halant, position is moved after it.
60367 newRephPos = end - 1;
60369 newRephPos--;
60379 newRephPos--;
60385 glyphs.splice.apply(glyphs, [start, 0].concat(glyphs.splice(start + 1, newRephPos - start)));
60388 base--;
60390 } // o Reorder pre-base reordering consonants:
60392 // If a pre-base reordering consonant is found, reorder it according to
60406 // 2. Try to find a target position the same way as for pre-base matra.
60407 // If it is found, reorder pre-base consonant glyph.
60416 …while (_newPos > start && !(glyphs[_newPos - 1].shaperInfo.category & (CATEGORIES.M | HALANT_OR_CO…
60417 _newPos--;
60421 if (_newPos > start && glyphs[_newPos - 1].shaperInfo.category === CATEGORIES.M) {
60425 _newPos--;
60431 if (_newPos > start && isHalantOrCoeng(glyphs[_newPos - 1])) {
60432 // -> If ZWJ or ZWNJ follow this halant, position is moved after it.
60439 … glyphs.splice.apply(glyphs, [_newPos + 1, 0].concat(glyphs.splice(_newPos, _oldPos - _newPos)));
60450 …OSITIONS.Pre_M && (!start || !/Cf|Mn/.test(unicode.getCategory(glyphs[start - 1].codePoints[0]))))…
60463 …1tTcaXjGjtJbYIj7UHm7wxSyx+D/d7SfpfJ3wPpfSQp32tS2dt8V2tD7+Bce3rpPa3eC6Dr8Ulq+K+J3HFvbn312Zv2RdStr9g…
60476 plan.addStage(setupSyllables$1); // Default glyph pre-processing group
60509 for (var i = glyphs.length - 1; i >= 0; i--) {
60537 var limit = glyphs[start].shaperInfo.category === 'R' ? 1 : Math.min(3, end - start);
60588 if (info.category === 'R' && end - start > 1) {
60596 i--;
60598 … glyphs.splice.apply(glyphs, [start, 0].concat(glyphs.splice(start + 1, i - start), [glyphs[i]]));
60611 glyphs.splice.apply(glyphs, [j, 1, glyphs[i]].concat(glyphs.splice(j, i - j)));
60735 // phag: UniversalShaper, // Phags-pa
60800 if (index === -1) {
60818 if (_index !== -1) {
60849 if (_index2 !== -1) {
60861 if (_index3 === -1) {
60883 // - If it *is* a mark ligature, we don't allocate a new ligature id, and leave
60892 // - If a ligature is formed of components that some of which are also ligatures
60901 // id and component == 1. Now, during 'liga', the LAM and the LAM-HEH ligature
60902 // form a LAM-LAM-HEH ligature. We need to reassign the SHADDA and FATHA to
60925 …var ligatureComponent = curComps - lastNumComps + Math.min(this.glyphs[idx].ligatureComponent || 1…
60940 …var ligatureComponent = curComps - lastNumComps + Math.min(this.glyphs[_i].ligatureComponent || 1,…
60948 for (var _i2 = matched.length - 1; _i2 >= 0; _i2--) {
61015 if (index === -1) {
61036 if (_index === -1) {
61056 if (class1 === -1 || class2 === -1) {
61089 next.xAdvance -= d;
61090 next.xOffset -= d;
61094 cur.xAdvance -= d;
61095 cur.xOffset -= d;
61101 cur.yOffset = entry.y - exit.y;
61104 cur.yOffset = exit.y - entry.y;
61112 if (markIndex === -1) {
61117 …while (--baseGlyphIndex >= 0 && (this.glyphs[baseGlyphIndex].isMark || this.glyphs[baseGlyphIndex]…
61122 if (baseIndex === -1) {
61134 if (_markIndex === -1) {
61139 while (--_baseGlyphIndex >= 0 && this.glyphs[_baseGlyphIndex].isMark) {}
61144 if (ligIndex === -1) {
61150 ….min(markGlyph.ligatureComponent, ligGlyph.codePoints.length) - 1 : ligGlyph.codePoints.length - 1;
61160 if (mark1Index === -1) {
61164 var prevIndex = this.glyphIterator.peekIndex(-1);
61191 if (mark2Index === -1) {
61217 markPos.xOffset = baseCoords.x - markCoords.x;
61218 markPos.yOffset = baseCoords.y - markCoords.y;
61265 for (var k = j; k < i; k++) {
61266 this.positions[i].xOffset -= this.positions[k].xAdvance;
61267 this.positions[i].yOffset -= this.positions[k].yAdvance;
61340 } // Reverse the glyphs and positions if the script is right-to-left
61522 if (this.font.kern && features.indexOf('kern') === -1) {
61639 return this.transform(cos, sin, -sin, cos, 0, 0);
61680 …return Math.pow(1 - t, 3) * p0[i] + 3 * Math.pow(1 - t, 2) * t * p1[i] + 3 * (1 - t) * Math.pow(t,…
61703 var cp1x = cx + 2 / 3 * (qp1x - cx); // CP1 = QP0 + 2/3 * (QP1-QP0)
61705 var cp1y = cy + 2 / 3 * (qp1y - cy);
61706 var cp2x = p3x + 2 / 3 * (qp1x - p3x); // CP2 = QP2 + 2/3 * (QP1-QP2)
61708 var cp2y = p3y + 2 / 3 * (qp1y - p3y);
61717 } // http://blog.hackers-cafe.net/2009/06/how-to-calculate-bezier-curves-bounding.html
61725 var b = 6 * p0[i] - 12 * p1[i] + 6 * p2[i];
61726 var a = -3 * p0[i] + 9 * p1[i] - 9 * p2[i] + 3 * p3[i];
61727 c = 3 * p1[i] - 3 * p0[i];
61732 var t = -c / b;
61742 var b2ac = Math.pow(b, 2) - 4 * c * a;
61746 var t1 = (-b + Math.sqrt(b2ac)) / (2 * a);
61754 var t2 = (-b - Math.sqrt(b2ac)) / (2 * a);
61790K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'bracketleft', 'bac…
61835 var metric = table.metrics.get(table.metrics.length - 1);
61838 bearing: table.bearings.get(this.id - table.metrics.length) || 0
61860 var advanceHeight = Math.abs(os2.typoAscender - os2.typoDescender);
61861 var topBearing = os2.typoAscender - cbox.maxY;
61864 var advanceHeight = Math.abs(hhea.ascent - hhea.descent);
61865 var topBearing = hhea.ascent - cbox.maxY;
61884 * See [here](http://www.freetype.org/freetype2/docs/glyphs/glyphs-6.html#section-2)
61915 return post.names[id - StandardNames.length];
62067 val = -val;
62105 var numCoords = endPtsOfContours[endPtsOfContours.length - 1] + 1;
62136 glyph.phantomPoints = points.slice(-4);
62150 var gPos = stream.pos - offset;
62186 glyph.phantomPoints = points.splice(-4, 4);
62205 …return [new Point(false, true, glyph.xMin - leftBearing, 0), new Point(false, true, glyph.xMin - l…
62234 this._metrics.advanceWidth = glyph.phantomPoints[1].x - glyph.phantomPoints[0].x;
62235 this._metrics.advanceHeight = glyph.phantomPoints[3].y - glyph.phantomPoints[2].y;
62236 this._metrics.leftBearing = glyph.xMin - glyph.phantomPoints[0].x;
62237 this._metrics.topBearing = glyph.phantomPoints[2].y - glyph.yMax;
62241 for (var k = 0; k < points.length; k++) {
62242 var point = points[k];
62270 var lastPt = contour[contour.length - 1];
62289 var prevPt = j === 0 ? firstPt : contour[j - 1];
62493 throw new Error('blend operator in non-variation font');
62498 var delta = stack.length - numOperands;
62499 var base = delta - numBlends;
62507 while (numOperands--) {
62675 stack.push(a - b);
62686 stack.push(-a);
62748 } else if (idx > stack.length - 1) {
62749 idx = stack.length - 1;
62759 var t = stack[n - 1];
62760 for (var _i = n - 2; _i >= 0; _i--) {
62764 _j--;
62772 stack[n - 1] = t;
62838 if (Math.abs(x - startx) > Math.abs(y - starty)) {
62858 stack.push(op - 139);
62861 stack.push((op - 247) * 256 + b1 + 108);
62864 stack.push(-(op - 251) * 256 - b1 - 108);
62883 return t.parent.buflen - t._currentOffset;
62918 buflen: end - start
62928 y: (this.bbox.minY - img.originY) * scale
62983 var high = colr.baseGlyphRecord.length - 1;
62988 high = mid - 1;
63057 …normalized.push((coords[i] - axis.defaultValue + Number.EPSILON) / (axis.defaultValue - axis.minVa…
63059 …normalized.push((coords[i] - axis.defaultValue + Number.EPSILON) / (axis.maxValue - axis.defaultVa…
63070 var prev = segment.correspondence[j - 1];
63071 …normalized[i] = ((normalized[i] - prev.fromCoord) * (pair.toCoord - prev.toCoord) + Number.EPSILON…
63176 var deltaX = outPoints[_i3].x - origPoints[_i3].x;
63177 var deltaY = outPoints[_i3].y - origPoints[_i3].y;
63244 …factor = factor * (normalized[i] - startCoords[i] + Number.EPSILON) / (tupleCoords[i] - startCoord…
63246 …factor = factor * (endCoords[i] - normalized[i] + Number.EPSILON) / (endCoords[i] - tupleCoords[i]…
63281 this.deltaInterpolate(curDelta + 1, point - 1, curDelta, point, inPoints, points);
63293 this.deltaInterpolate(firstPoint, firstDelta - 1, curDelta, firstDelta, inPoints, points);
63305 var k = iterable[i];
63306 if (inPoints[ref1][k] > inPoints[ref2][k]) {
63311 var in1 = inPoints[ref1][k];
63312 var in2 = inPoints[ref2][k];
63313 var out1 = outPoints[ref1][k];
63314 … var out2 = outPoints[ref2][k]; // If the reference points have the same coordinate but different
63318 var scale = in1 === in2 ? 0 : (out2 - out1) / (in2 - in1);
63320 var out = inPoints[_p][k];
63322 out += out1 - in1;
63324 out += out2 - in2;
63326 out = out1 + (out - in1) * scale;
63328 outPoints[_p][k] = out;
63334 var deltaX = outPoints[ref].x - inPoints[ref].x;
63335 var deltaY = outPoints[ref].y - inPoints[ref].y;
63351 idx = table.advanceWidthMapping.mapCount - 1;
63411 …axisScalar = (normalizedCoords[j] - axis.startCoord + Number.EPSILON) / (axis.peakCoord - axis.sta…
63413 …axisScalar = (axis.endCoord - normalizedCoords[j] + Number.EPSILON) / (axis.endCoord - axis.peakCo…
63442 this.mapping[glyph] = this.glyphs.length - 1;
63535 flags[flags.length - 1] |= REPEAT$1;
63550 endPtsOfContours.push(pointCount - 1);
63554 … if (path.commands.length > 1 && path.commands[path.commands.length - 1].command !== 'closePath') {
63555 endPtsOfContours.push(pointCount - 1);
63571 var tail = 4 - size % 4;
63573 Glyf.encode(stream, glyf); // Align to 4-byte length
63581 var diff = value - last;
63585 if (-255 <= diff && diff <= 255) {
63588 diff = -diff;
63616 …var buffer = stream.readBuffer(nextOffset - curOffset); // if it is a compound glyph, include its …
63626 // If this is a TrueType variation glyph, re-encode the path
63636 return this.glyf.length - 1;
63768 fd_select[fd] = topDict.FDArray.length - 1;
63825 return standardStrings.length + this.strings.length - 1;
63833 nLeft: this.charstrings.length - 2
63868 * This is the base class for all SFNT-based font formats in fontkit.
63940 * `lang` is a BCP-47 language code.
63956 * The unique PostScript name for this font, e.g. "Helvetica-Bold"
63980 * This is only a one-to-one mapping from characters to glyphs.
63991 var last = -1;
63992 var state = -1;
64038 * @param {number} gid - glyph id
64169 * The font's sub-family, e.g. "Bold".
64262 * See [here](https://en.wikipedia.org/wiki/X-height) for more details.
64442 var buf = inflate(this.stream.readBuffer(table.compLength - 2), outBuffer);
64462 // We have to decode in advance (in WOFF2Font), so just return the pre-decoded data.
64613 glyph.points[nPoints[_i] - 1].endContour = true;
64630 }(TTFFont); // Special class that accepts a length and returns a sub-stream for that data
64679 return flag & 1 ? baseval : -baseval;
64695 dx = withSign(flag, ((flag - 10 & 14) << 7) + glyphs.readUInt8());
64698 var b0 = flag - 20;
64703 var b0 = flag - 84;
64921k/m/D/eHYBPzb4G7DfyS+enZ42/qnXPFp+pjZdgD/yX0XcV6+93DF+H+G5AhtcxPIs/BoY5cg0g7RRGXx/8Ewo8Y6vhp/Bnwz2…
64974 return (code - 0xd800) * 0x400 + (next - 0xdc00) + 0x10000;
65106 * If `localStorage.noDeprecation = true` is set, then it is a no-op.
65114 * @param {Function} fn - the function to deprecate
65115 * @param {String} msg - the string to print to the console when `fn` is invoked
65230 // https://github.com/sindresorhus/p-is-promise/blob/cda35a513bda03f977ad5cde3a079d237e82d7ef/index…
65597 // If --no-deprecation is set, then it is a no-op.
65752 // Provide a hook for user-specified inspect functions.
65782 // IE doesn't make error fields non-enumerable
65783 // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx
65930 str = formatValue(ctx, desc.value, recurseTimes - 1);
65932 if (str.indexOf('\n') > -1) {
65952 if (name.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) {
65953 name = name.slice(1, -1);
66098 console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));
66123 while (i--) {
66194 // occurred", we error-wrap so the callback consumer can distinguish between
66299 if (!hasToStringTag || !(Symbol.toStringTag in value)) { return $slice($toString(value), 8, -1); }
66327 // We're being used in a Node-like environment
66348 var parser = delegates[delegates.length - 1].parser;
66537 if (whiteList.indexOf(this.name) !== -1) s += "/>";
66577 return "<!--" + formatText(escapeXML(this.comment), options) + "-->";
66608 // We'll use the file-scoped "delegates" var to remember what elements we're currently
66610 // It's safe to use a global because JS is single-threaded.
66624 // the first tag we encounter should be the root - we'll "become" the root XmlElement
66634 // file-scoped global stack of delegates
66651 // create these closures and cache them by keeping them file-scoped
66706 // Are we being used in a Node-like environment?
66848 normal: 'Roboto-Regular.ttf',
66849 bold: 'Roboto-Medium.ttf',
66850 italics: 'Roboto-Italic.ttf',
66851 bolditalics: 'Roboto-MediumItalic.ttf'
67278 availableWidth -= col._calcWidth;
67282 // http://www.w3.org/TR/CSS2/tables.html#width-layout
67283 // http://dev.w3.org/csswg/css3-tables-algorithms/Overview.src.htm
67287 // case 1 - there's no way to fit all columns within available width
67300 // case 2 - we can fit rest of the table within available space
67303 availableWidth -= col._calcWidth;
67307 var W = availableWidth - minW;
67308 var D = maxW - minW;
67311 var d = col._maxWidth - col._minWidth;
67313 availableWidth -= col._calcWidth;
67384 /*eslint no-unused-vars: ["error", {"args": "none"}]*/
67414 * Measures all nodes and sets min/max-width properties required for the second
67415 * layout-pass.
67416 * @param {Object} docStructure document-definition-object
67417 * @return {Object} document-measurement-object
67485 for (var i = styleArray.length - 1; i >= 0; i--) {
67687 // TODO: ascender-based calculations
67692 y: (gapSize.height / gapSize.lineHeight) + gapSize.descender - gapSize.fontSize / 3,
67702 // TODO: ascender-based calculations
67707 …y: (gapSize.height / gapSize.lineHeight) + gapSize.descender - (gapSize.fontSize / 3) - (size / 2),
67717 // TODO: ascender-based calculations
67722 y: (gapSize.height / gapSize.lineHeight) + gapSize.descender - gapSize.fontSize / 3,
67762 …return (num >= 26 ? toAlpha((num / 26 >> 0) - 1) : '') + 'abcdefghijklmnopqrstuvwxyz'[num % 26 >> …
67769 return toAlpha(counter - 1);
67781 num -= lookup[i];
67797 case 'upper-alpha':
67801 case 'lower-alpha':
67805 case 'upper-roman':
67809 case 'lower-roman':
67892 } // TODO: else - nested lists numbering
67898 counter--;
67927 var numGaps = (columns.length > 0) ? (columns.length - 1) : 0;
68072 var minDifference = span.minWidth - currentMinMax.minWidth;
68073 var maxDifference = span.maxWidth - currentMinMax.maxWidth;
68136 node.table.widths.push(node.table.widths[node.table.widths.length - 1]);
68334 node.id = 'toc-' + tocItemId + '-' + this.tocs[tocItemId].toc._items.length;
68469 …* Creates an instance of DocumentContext - a store for current x, y positions and available width/…
68478 this.availableWidth = pageSize.width - pageMargins.left - pageMargins.right;
68480 this.page = -1;
68515 var saved = this.snapshots[this.snapshots.length - 1];
68523 this.availableWidth = width; //saved.availableWidth - offset;
68582 this.availableHeight -= (y - saved.bottomMost.y);
68589 this.availableWidth -= left + (right || 0);
68594 this.availableHeight -= offset;
68601 …this.availableHeight = this.getCurrentPage().pageSize.height - this.pageMargins.top - this.pageMar…
68602 …napshot().availableWidth = this.getCurrentPage().pageSize.width - this.pageMargins.left - this.pag…
68616 this.availableWidth = this.getCurrentPage().pageSize.width - this.x - this.pageMargins.right;
68620 this.availableHeight = this.getCurrentPage().pageSize.height - this.y - this.pageMargins.bottom;
68723 this.page = this.pages.length - 1;
68741 var innerHeight = pageSize.height - this.pageMargins.top - this.pageMargins.bottom;
68742 var innerWidth = pageSize.width - this.pageMargins.left - this.pageMargins.right;
68751 verticalRatio: ((this.y - this.pageMargins.top) / innerHeight),
68752 horizontalRatio: ((this.x - this.pageMargins.left) / innerWidth)
68794 * Creates an instance of ElementWriter - a line/vector writer, which adds
68848 offset = width - lineWidth;
68851 offset = (width - lineWidth) / 2;
68863 var additionalSpacing = (width - lineWidth) / (line.inlines.length - 1);
68942 offset = width - imageWidth;
68945 offset = (width - imageWidth) / 2;
68960 offset = width - canvasWidth;
68963 offset = (width - canvasWidth) / 2;
69079 * pushContext(context) - pushes the provided context and makes it current
69080 * pushContext(width, height) - creates and pushes a new context with the specified width and height
69081 …* pushContext() - creates a new context for unbreakable blocks (with current availableWidth and fu…
69085 …height = this.context.getCurrentPage().height - this.context.pageMargins.top - this.context.pageMa…
69415 * Creates an instance of LayoutBuilder - layout engine which turns document-definition-object
69418 * @param {Object} pageSize - an object defining page width and height
69419 * @param {Object} pageMargins - an object defining top, left, right and bottom margins
69435 * Executes layout engine on document-definition-object and creates an array of pages
69438 * @param {Object} docStructure document-definition-object
69485 if (linearNodeList[ii].nodeInfo.pageNumbers.indexOf(pageNumber) > -1) {
69488 …reakBeforeFct.length > 2 && linearNodeList[ii].nodeInfo.pageNumbers.indexOf(pageNumber + 1) > -1) {
69495 if (linearNodeList[ii].nodeInfo.pageNumbers.indexOf(pageNumber) > -1) {
69610 y: pageSize.height - pageMargins.bottom,
69647 watermark.angle = Math.atan2(this.pageSize.height, this.pageSize.width) * -180 / Math.PI;
69697 while (Math.abs(a - b) > 1) {
69836 self.writer.context().addMargin(-margin[0], -margin[2]);
69874 availableWidth -= (gaps.length - 1) * columnNode._gap;
69890 for (var i = columns.length - 1; i > 0; i--) {
69923 // row-span ending
69961 var endingRow = tableRow + column.rowSpan - 1;
69989 this.writer.context().addMargin(-gapSize.width);
70001 offsetVector(vector, -marker._minWidth, 0);
70006 markerLine.x = -marker._minWidth;
70007 markerLine.y = line.getAscenderHeight() - markerLine.getAscenderHeight();
70053 var maxHeight = node.maxHeight || -1;
70082 while (line && (maxHeight === -1 || currentHeight < maxHeight)) {
70249 return (this.inlineWidths + inlineWidth - this.leadingCut - inlineTrailingCut) <= this.maxWidth;
70258 inline.x = this.inlineWidths - this.leadingCut;
70269 return this.inlineWidths - this.leadingCut - this.trailingCut;
70273 return this.maxWidth - this.getWidth();
70305 * Creates an instance of PageElementWriter - an extended ElementWriter
70307 * - page-breaks (it adds new pages when there's not enough space left),
70308 * - repeatable fragments (like table-headers, which are repeated everytime
70309 * a page-break occurs)
70310 * - transactions (used for unbreakable-blocks when we want to make sure
70407 if (--this.transactionLevel === 0) {
70413 // no support for multi-page unbreakableBlocks
70420 …// on out-of-context blocs (headers, footers, background) height should be the whole DocumentConte…
70422 …ht = unbreakableContext.getCurrentPage().pageSize.height - unbreakableContext.pageMargins.top - un…
70424 …t = this.writer.context.getCurrentPage().pageSize.height - this.writer.context.pageMargins.top - t…
70426 fragment.height -= this.repeatables[i].height;
70510 /*eslint no-unused-vars: ["error", {"args": "none"}]*/
70556 * normal: 'fonts/Roboto-Regular.ttf',
70557 * bold: 'fonts/Roboto-Medium.ttf',
70558 * italics: 'fonts/Roboto-Italic.ttf',
70559 * bolditalics: 'fonts/Roboto-MediumItalic.ttf'
70618 * @return {Object} a pdfKit document object which can be saved or encode to data-url
70659 var maxNumberPages = docDefinition.maxPagesNumber || -1;
70660 if (isNumber(maxNumberPages) && maxNumberPages > -1) {
70696 if (standardProperties.indexOf(standardizedKey) !== -1) {
70813 return (i < node.table.widths.length - 1) ? 4 : 0;
70830 return (i === node.table.widths.length - 1) ? 0 : 8;
70850 return (i === node.table.widths.length - 1) ? 0 : 8;
70942 newY -= inline.fontSize * 0.75;
70964 diffWidth = inline.width - newWidth;
70986 var descent = lineHeight - ascenderHeight;
70993 var shiftToBaseline = lineHeight - ((inline.font.ascender / 1000) * inline.fontSize) - descent;
71033 Dest: [inline.linkToPage - 1, 'XYZ', null, null, null]
71052 var x = pdfKitDoc.page.width / 2 - watermark._size.size.width / 2;
71053 var y = pdfKitDoc.page.height / 2 - watermark._size.size.height / 2;
71082 …gradient = pdfKitDoc.linearGradient(vector.x - vector.r1, vector.y, vector.x + vector.r1, vector.y…
71112 var pn = vector.points[vector.points.length - 1];
71125 var step = 1 / (vector.linearGradient.length - 1);
71174 ….y, image._width, image._height, { Subtype: 'Link', Dest: [image.linkToPage - 1, 'XYZ', null, null…
71227 /*eslint no-unused-vars: ["error", {"args": "none"}]*/
71228 /*eslint no-redeclare: "off"*/
71231 /* qr.js -- QR code generator in Javascript (revision 2011-01-19)
71240 // per-version information (cf. JIS X 0510:2004 pp. 30--36, 71)
71244 // [2]: left-top positions of alignment patterns
71297 var ALPHANUMERIC_REGEXP = /^[A-Za-z0-9 $%*+\-./:]*$/;
71298 var ALPHANUMERIC_OUT_REGEXP = /^[A-Z0-9 $%*+\-./:]*$/;
71303 // GF(2^8)-to-integer mapping with a reducing polynomial x^8+x^4+x^3+x^2+1
71305 var GF256_MAP = [], GF256_INVMAP = [-1];
71315 // generator polynomial of degree K is product of (x-\alpha^0), (x-\alpha^1),
71316 // ..., (x-\alpha^(K-1)). by convention, we omit the K-th coefficient (always 1)
71324 var b = GF256_MAP[(i + (prevpoly[j - 1] || 0)) % 255];
71333 ALPHANUMERIC_MAP['0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:'.charAt(i)] = i;
71378 * |<--------------- n --------------->|
71379 * | |<----- n-17 ---->| |
71380 * +-------+ ///+-------+ ----
71384 * +-------+ @@@@@ +-------+ |
71385 * # ---|
71389 * @5x5@ @5x5@ @5x5@ n-17
71393 * //////# ---|
71394 * +-------+ @@@@@ @@@@@ |
71398 * +-------+ ----
71400 * when the entire code has n^2 modules and there are m^2-3 alignment
71402 * - 225 (= 9x9 + 9x8 + 8x9) modules for finder patterns and
71404 * - 2n-34 (= 2(n-17)) modules for timing patterns;
71405 * - 36 (= 3x6 + 6x3) modules for version information, if any;
71406 * - 25m^2-75 (= (m^2-3)(5x5)) modules for alignment patterns
71407 * if any, but 10m-20 (= 2(m-2)x5) of them overlaps with
71413 nbits -= 36; // version information
71415 nbits -= 25 * v[2].length * v[2].length - 10 * v[2].length - 55;
71423 var nbits = nfullbits(ver) & ~7; // no sub-octet code words
71425 nbits -= 8 * v[0][ecclevel] * v[1][ecclevel]; // ecc bits
71446 var nbits = ndatabits(ver, ecclevel) - 4 - ndatalenbits(ver, mode); // 4 for mode bits
71478 if (typeof data === 'string') { // encode as utf-8 string
71513 // this function is intentionally no-op when n=0.
71516 buf.push(bits | (x >> (n -= remaining)));
71518 buf.push((x >> (n -= 8)) & 255);
71523 bits |= (x & ((1 << n) - 1)) << (remaining -= n);
71533 pack(parseInt(data.substring(i - 2, i + 1), 10), 10);
71535 pack(parseInt(data.substring(i - 2), 10), [0, 4, 7][datalen % 3]);
71540 pack(ALPHANUMERIC_MAP[data.charAt(i - 1)] * 45 +
71544 pack(ALPHANUMERIC_MAP[data.charAt(i - 1)], 6);
71574 // this is quite similar to CRC calculation as both Reed-Solomon and CRC use
71576 // zero-augumented polynomial by the generator polynomial. the only difference
71577 // is that Reed-Solomon uses GF(2^8), instead of CRC's GF(2), and Reed-Solomon
71605 var pivot = nblocks - poly.length % nblocks;
71629 result.push(poly[subsizes[j + 1] - 1]);
71644 // - p=10, q=5, genpoly=x^10+x^8+x^5+x^4+x^2+x+1 (JIS X 0510:2004 Appendix C)
71645 // - p=18, q=6, genpoly=x^12+x^11+x^10+x^9+x^8+x^5+x^2+1 (ibid. Appendix D)
71648 for (var i = p - 1; i >= 0; --i) {
71682 blit(n - 8, 0, 8, 9, [0x100, 0x7f, 0x41, 0x5d, 0x5d, 0x5d, 0x41, 0x7f]);
71683 blit(0, n - 8, 9, 8, [0xfe, 0x82, 0xba, 0xba, 0xba, 0x82, 0xfe, 0x00, 0x00]);
71686 for (var i = 9; i < n - 8; ++i) {
71694 var minj = (i === 0 || i === m - 1 ? 1 : 0), maxj = (i === 0 ? m - 1 : m);
71703 var k = 0;
71706 matrix[i][(n - 11) + j] = matrix[(n - 11) + j][i] = (code >> k++) & 1;
71707 reserved[i][(n - 11) + j] = reserved[(n - 11) + j][i] = 1;
71720 var k = 0, dir = -1;
71721 for (var i = n - 1; i >= 0; i -= 2) {
71723 --i; // skip the entire timing pattern column
71724 var jj = (dir < 0 ? n - 1 : 0);
71726 for (var ii = i; ii > i - 2; --ii) {
71729 // is 0 so it will auto-pad to zero.
71730 matrix[jj][ii] = (buf[k >> 3] >> (~k & 7)) & 1;
71731 ++k;
71736 dir = -dir;
71741 // XOR-masks the data portion of the matrix. repeating the call with the same
71760 var r = [0, 1, 2, 3, 4, 5, 7, 8, n - 7, n - 6, n - 5, n - 4, n - 3, n - 2, n - 1][i];
71761 var c = [n - 1, n - 2, n - 3, n - 4, n - 5, n - 6, n - 7, n - 8, 7, 5, 4, 3, 2, 1, 0][i];
71780 // N1+(k-5) points for each consecutive row of k same-colored modules,
71781 // where k >= 5. no overlapping row counts.
71783 // N2 points for each 2x2 block of same-colored modules.
71790 // N4*k points for every (5*k)% deviation from 50% black density.
71791 // i.e. k=1 for 55~60% and 40~45%, k=2 for 60~65% and 35~40%, etc.
71798 score += PENALTY_CONSECUTIVE + (groups[i] - 5);
71802 if (groups[i - 1] == p && groups[i - 2] == 3 * p && groups[i - 3] == p &&
71803 groups[i - 4] == p && (groups[i - 5] >= 4 * p || groups[i + 1] >= 4 * p)) {
71820 var k;
71821 for (k = 0; j < n && row[j]; ++k)
71823 groups.push(k);
71824 for (k = 0; j < n && !row[j]; ++k)
71826 groups.push(k);
71833 var k;
71834 for (k = 0; j < n && matrix[j][i]; ++k)
71836 groups.push(k);
71837 for (k = 0; j < n && !matrix[j][i]; ++k)
71839 groups.push(k);
71850 if (row[j - 1] == p && nextrow[j] === p && nextrow[j - 1] === p) {
71856 score += PENALTY_DENSITY * ((Math.abs(nblacks / n / n - 0.5) / 0.05) | 0);
71861 // it also chooses the best mask automatically when mask is -1.
71897 // - version: an integer in [1,40]. when omitted (or -1) the smallest possible
71899 // - mode: one of 'numeric', 'alphanumeric', 'octet'. when omitted the smallest
71901 // - eccLevel: one of 'L', 'M', 'Q', 'H'. defaults to 'L'.
71902 // - mask: an integer in [0,7]. when omitted (or -1) the best mask is chosen.
71912 var ver = options.version || -1;
71914 var mode = options.mode ? MODES[options.mode.toLowerCase()] : -1;
71915 var mask = 'mask' in options ? options.mask : -1;
71922 …// while encode supports case-insensitive encoding, we restrict the data to be uppercased when aut…
71953 if (mask != -1 && (mask < 0 || mask > 8))
71961 // - modulesize: a number. this is a size of each modules in pixels, and
71963 // - margin: a number. this is a size of margin in *modules*, and defaults to
72121 * Pushes style-name or style-overrides-object onto the stack for future evaluation
72123 * @param {String|Object} styleNameOrOverride style-name (referring to styleDictionary) or
72131 * Removes last style-name or style-overrides-object from the stack
72133 * @param {Number} howMany - optional number of elements to be popped (if not specified,
72139 while (howMany-- > 0) {
72145 * Creates a set of named styles or/and a style-overrides-object based on the item,
72149 * @param {Object} item - an object with optional style property and/or style overrides
72221 * @param {Object} item - an object with optional style property and/or style overrides
72239 * @param {String} property - property name
72244 for (var i = this.styleOverrides.length - 1; i >= 0; i--) {
72248 // named-style-override
72254 // style-overrides-object
72369 availableWidth = writer.context().availableWidth - this.offsets.total;
72410 rsd[rsd.length - 1].width = lastWidth;
72421 // line-drawing loops draws lines for a single cell, not for an entire
72442 setBorder(rowIndex + rowOffset, colIndex + colSpan - 1, 2, cell.border[2]);
72454 setBorder(rowIndex + rowSpan - 1, colIndex + colOffset, 3, cell.border[3]);
72474 writer.context().availableHeight -= self.reservedAtBottom;
72493 writer.context().availableHeight -= this.reservedAtBottom;
72521 if (shouldDrawLine && i < l - 1) {
72526 cellAbove = body[lineIndex - 1][i];
72546 rowCellAbove = body[lineIndex - 1 - cellAbove._rowSpanCurrentOffset][i];
72567 i += colSpanIndex - 1;
72572 i += colSpanIndex - 1;
72577 i += colSpanIndex - 1;
72648 …var rowCellBeforeAbove = body[vLineRowIndex - cellBefore._rowSpanCurrentOffset][beforeVLineColInde…
72657 var rowCurrentCellAbove = body[vLineRowIndex - currentCell._rowSpanCurrentOffset][vLineColIndex];
72714 ys[ys.length - 1].y1 = pageBreak.prevY;
72720 ys[ys.length - 1].y1 = endingY;
72722 var skipOrphanePadding = (ys[0].y1 - ys[0].y0 === this.rowPaddingTop);
72724 var willBreak = yi < ys.length - 1;
72756 var cell = body[rowIndex][colIndex - 1];
72767 ….drawVerticalLine(xs[i].x, y1 - hzLineOffset, y2 + this.bottomLineWidth, xs[i].index, writer, rowI…
72770 if (i < l - 1) {
72793 var y1f = this.dontBreakRows ? y1 : y1 - (hzLineOffset / 2);
72796 var bgWidth = x2f - x1f;
72797 var bgHeight = y2f - y1f;
72858 this.rowSpanData[i].rowSpan--;
72864 if (this.headerRows && rowIndex === this.headerRows - 1) {
72881 …able && (rowIndex === (this.rowsWithoutPageBreak - 1) || rowIndex === this.tableNode.table.body.le…
72900 cols--;
72904 …ult.push({ x: self.rowSpanData[self.rowSpanData.length - 1].left, index: self.rowSpanData.length -
72984 descent = height - ascent;
72986 var lw = 0.5 + Math.floor(Math.max(biggerInline.fontSize - 8, 0) / 2) * 0.12;
72993 y += lineAscent - (ascent * 0.85);
72996 y += lineAscent - (ascent * 0.25);
73006 .rect(x + firstInline.x, y - lw / 2, totalWidth, lw / 2).fill()
73007 .rect(x + firstInline.x, y + gap - lw / 2, totalWidth, lw / 2).fill();
73014 pdfKitDoc.rect(rdx, y - lw / 2, 3.96, lw).fill();
73023 pdfKitDoc.rect(rx, y - lw / 2, lw, lw).fill();
73029 var rwx = x + firstInline.x - 1;
73030 pdfKitDoc.rect(x + firstInline.x, y - sv, totalWidth, y + sv).clip();
73034 pdfKitDoc.bezierCurveTo(rwx + sh, y - sv, rwx + sh * 2, y - sv, rwx + sh * 3, y)
73041 .rect(x + firstInline.x, y - lw / 2, totalWidth, lw)
73067 .rect(x + inline.x - justifyShift, y, inline.width + justifyShift, height)
73097 * Creates an instance of TextTools - text measurement utility
73107 * Converts an array of strings (or inline-definition-objects) into a collection
73110 * @param {Object} textArray - an array of inline-definition-objects (or strings)
73122 minWidth = Math.max(minWidth, inline.width - inline.leadingCut - inline.trailingCut);
73149 return Math.max(0, item.width - item.leadingCut - item.trailingCut);
73162 //TODO: refactor - extract from measure
73192 var angleRad = angle * Math.PI / -180;
73268 if (isUndefined(tmpWords[tmpWords.length - 1])) {
73271 word = tmpWords[tmpWords.length - 1].text;
73307 results[results.length - 1].noNewLine = true;
73327 lastWord = getOneWord(words.length - 1, words, noWrap);
73376 normalized[0].leadingCut = -leadingIndent;
73453 …n font.widthOfString(text, fontSize, fontFeatures) + ((characterSpacing || 0) * (text.length - 1));
73622 …$bits((0, (/*@__PURE__*/$parcel$interopDefault($29668e65f2091c2c$exports))).categories.length - 1);
73623 …(0, (/*@__PURE__*/$parcel$interopDefault($29668e65f2091c2c$exports))).combiningClasses.length - 1);
73624 …var$bits((0, (/*@__PURE__*/$parcel$interopDefault($29668e65f2091c2c$exports))).scripts.length - 1);
73625 …b24$var$bits((0, (/*@__PURE__*/$parcel$interopDefault($29668e65f2091c2c$exports))).eaw.length - 1);
73632 const $43d7963e56408b24$var$CATEGORY_MASK = (1 << $43d7963e56408b24$var$CATEGORY_BITS) - 1;
73633 const $43d7963e56408b24$var$COMBINING_MASK = (1 << $43d7963e56408b24$var$COMBINING_BITS) - 1;
73634 const $43d7963e56408b24$var$SCRIPT_MASK = (1 << $43d7963e56408b24$var$SCRIPT_BITS) - 1;
73635 const $43d7963e56408b24$var$EAW_MASK = (1 << $43d7963e56408b24$var$EAW_BITS) - 1;
73636 const $43d7963e56408b24$var$NUMBER_MASK = (1 << $43d7963e56408b24$var$NUMBER_BITS) - 1;
73657 else if (num <= 50) return num - 1;
73659 const numerator = (num >> 4) - 12;
73663 val = (num >> 5) - 14;
73667 exp--;
73671 val = (num >> 2) - 0xbf;
73675 exp--;