/*! pdfmake v0.2.4, @license MIT, @link http://pdfmake.org */ (function webpackUniversalModuleDefinition(root, factory) { if(typeof exports === 'object' && typeof module === 'object') module.exports = factory(); else if(typeof define === 'function' && define.amd) define([], factory); else { var a = factory(); for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i]; } })(typeof self !== 'undefined' ? self : this, function() { return /******/ (function() { // webpackBootstrap /******/ var __webpack_modules__ = ({ /***/ 9282: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; /* provided dependency */ var process = __webpack_require__(4155); // Currently in sync with Node.js lib/assert.js // https://github.com/nodejs/node/commit/2a51ae424a513ec9a6aa3466baa0cc1d55dd4f3b // Originally from narwhal.js (http://narwhaljs.org) // Copyright (c) 2009 Thomas Robinson <280north.com> // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the 'Software'), to // deal in the Software without restriction, including without limitation the // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or // sell copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in // all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } var _require = __webpack_require__(2136), _require$codes = _require.codes, ERR_AMBIGUOUS_ARGUMENT = _require$codes.ERR_AMBIGUOUS_ARGUMENT, ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE, ERR_INVALID_ARG_VALUE = _require$codes.ERR_INVALID_ARG_VALUE, ERR_INVALID_RETURN_VALUE = _require$codes.ERR_INVALID_RETURN_VALUE, ERR_MISSING_ARGS = _require$codes.ERR_MISSING_ARGS; var AssertionError = __webpack_require__(5961); var _require2 = __webpack_require__(9539), inspect = _require2.inspect; var _require$types = (__webpack_require__(9539).types), isPromise = _require$types.isPromise, isRegExp = _require$types.isRegExp; var objectAssign = Object.assign ? Object.assign : (__webpack_require__(8091).assign); var objectIs = Object.is ? Object.is : __webpack_require__(609); var errorCache = new Map(); var isDeepEqual; var isDeepStrictEqual; var parseExpressionAt; var findNodeAround; var decoder; function lazyLoadComparison() { var comparison = __webpack_require__(9158); isDeepEqual = comparison.isDeepEqual; isDeepStrictEqual = comparison.isDeepStrictEqual; } // Escape control characters but not \n and \t to keep the line breaks and // indentation intact. // eslint-disable-next-line no-control-regex var escapeSequencesRegExp = /[\x00-\x08\x0b\x0c\x0e-\x1f]/g; var meta = (/* unused pure expression or super */ null && (["\\u0000", "\\u0001", "\\u0002", "\\u0003", "\\u0004", "\\u0005", "\\u0006", "\\u0007", '\\b', '', '', "\\u000b", '\\f', '', "\\u000e", "\\u000f", "\\u0010", "\\u0011", "\\u0012", "\\u0013", "\\u0014", "\\u0015", "\\u0016", "\\u0017", "\\u0018", "\\u0019", "\\u001a", "\\u001b", "\\u001c", "\\u001d", "\\u001e", "\\u001f"])); var escapeFn = function escapeFn(str) { return meta[str.charCodeAt(0)]; }; var warned = false; // The assert module provides functions that throw // AssertionError's when particular conditions are not met. The // assert module must conform to the following interface. var assert = module.exports = ok; var NO_EXCEPTION_SENTINEL = {}; // All of the following functions must throw an AssertionError // when a corresponding condition is not met, with a message that // may be undefined if not provided. All assertion methods provide // both the actual and expected values to the assertion error for // display purposes. function innerFail(obj) { if (obj.message instanceof Error) throw obj.message; throw new AssertionError(obj); } function fail(actual, expected, message, operator, stackStartFn) { var argsLen = arguments.length; var internalMessage; if (argsLen === 0) { internalMessage = 'Failed'; } else if (argsLen === 1) { message = actual; actual = undefined; } else { if (warned === false) { warned = true; var warn = process.emitWarning ? process.emitWarning : console.warn.bind(console); warn('assert.fail() with more than one argument is deprecated. ' + 'Please use assert.strictEqual() instead or only pass a message.', 'DeprecationWarning', 'DEP0094'); } if (argsLen === 2) operator = '!='; } if (message instanceof Error) throw message; var errArgs = { actual: actual, expected: expected, operator: operator === undefined ? 'fail' : operator, stackStartFn: stackStartFn || fail }; if (message !== undefined) { errArgs.message = message; } var err = new AssertionError(errArgs); if (internalMessage) { err.message = internalMessage; err.generatedMessage = true; } throw err; } assert.fail = fail; // The AssertionError is defined in internal/error. assert.AssertionError = AssertionError; function innerOk(fn, argLen, value, message) { if (!value) { var generatedMessage = false; if (argLen === 0) { generatedMessage = true; message = 'No value argument passed to `assert.ok()`'; } else if (message instanceof Error) { throw message; } var err = new AssertionError({ actual: value, expected: true, message: message, operator: '==', stackStartFn: fn }); err.generatedMessage = generatedMessage; throw err; } } // Pure assertion tests whether a value is truthy, as determined // by !!value. function ok() { for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } innerOk.apply(void 0, [ok, args.length].concat(args)); } assert.ok = ok; // The equality assertion tests shallow, coercive equality with ==. /* eslint-disable no-restricted-properties */ assert.equal = function equal(actual, expected, message) { if (arguments.length < 2) { throw new ERR_MISSING_ARGS('actual', 'expected'); } // eslint-disable-next-line eqeqeq if (actual != expected) { innerFail({ actual: actual, expected: expected, message: message, operator: '==', stackStartFn: equal }); } }; // The non-equality assertion tests for whether two objects are not // equal with !=. assert.notEqual = function notEqual(actual, expected, message) { if (arguments.length < 2) { throw new ERR_MISSING_ARGS('actual', 'expected'); } // eslint-disable-next-line eqeqeq if (actual == expected) { innerFail({ actual: actual, expected: expected, message: message, operator: '!=', stackStartFn: notEqual }); } }; // The equivalence assertion tests a deep equality relation. assert.deepEqual = function deepEqual(actual, expected, message) { if (arguments.length < 2) { throw new ERR_MISSING_ARGS('actual', 'expected'); } if (isDeepEqual === undefined) lazyLoadComparison(); if (!isDeepEqual(actual, expected)) { innerFail({ actual: actual, expected: expected, message: message, operator: 'deepEqual', stackStartFn: deepEqual }); } }; // The non-equivalence assertion tests for any deep inequality. assert.notDeepEqual = function notDeepEqual(actual, expected, message) { if (arguments.length < 2) { throw new ERR_MISSING_ARGS('actual', 'expected'); } if (isDeepEqual === undefined) lazyLoadComparison(); if (isDeepEqual(actual, expected)) { innerFail({ actual: actual, expected: expected, message: message, operator: 'notDeepEqual', stackStartFn: notDeepEqual }); } }; /* eslint-enable */ assert.deepStrictEqual = function deepStrictEqual(actual, expected, message) { if (arguments.length < 2) { throw new ERR_MISSING_ARGS('actual', 'expected'); } if (isDeepEqual === undefined) lazyLoadComparison(); if (!isDeepStrictEqual(actual, expected)) { innerFail({ actual: actual, expected: expected, message: message, operator: 'deepStrictEqual', stackStartFn: deepStrictEqual }); } }; assert.notDeepStrictEqual = notDeepStrictEqual; function notDeepStrictEqual(actual, expected, message) { if (arguments.length < 2) { throw new ERR_MISSING_ARGS('actual', 'expected'); } if (isDeepEqual === undefined) lazyLoadComparison(); if (isDeepStrictEqual(actual, expected)) { innerFail({ actual: actual, expected: expected, message: message, operator: 'notDeepStrictEqual', stackStartFn: notDeepStrictEqual }); } } assert.strictEqual = function strictEqual(actual, expected, message) { if (arguments.length < 2) { throw new ERR_MISSING_ARGS('actual', 'expected'); } if (!objectIs(actual, expected)) { innerFail({ actual: actual, expected: expected, message: message, operator: 'strictEqual', stackStartFn: strictEqual }); } }; assert.notStrictEqual = function notStrictEqual(actual, expected, message) { if (arguments.length < 2) { throw new ERR_MISSING_ARGS('actual', 'expected'); } if (objectIs(actual, expected)) { innerFail({ actual: actual, expected: expected, message: message, operator: 'notStrictEqual', stackStartFn: notStrictEqual }); } }; var Comparison = function Comparison(obj, keys, actual) { var _this = this; _classCallCheck(this, Comparison); keys.forEach(function (key) { if (key in obj) { if (actual !== undefined && typeof actual[key] === 'string' && isRegExp(obj[key]) && obj[key].test(actual[key])) { _this[key] = actual[key]; } else { _this[key] = obj[key]; } } }); }; function compareExceptionKey(actual, expected, key, message, keys, fn) { if (!(key in actual) || !isDeepStrictEqual(actual[key], expected[key])) { if (!message) { // Create placeholder objects to create a nice output. var a = new Comparison(actual, keys); var b = new Comparison(expected, keys, actual); var err = new AssertionError({ actual: a, expected: b, operator: 'deepStrictEqual', stackStartFn: fn }); err.actual = actual; err.expected = expected; err.operator = fn.name; throw err; } innerFail({ actual: actual, expected: expected, message: message, operator: fn.name, stackStartFn: fn }); } } function expectedException(actual, expected, msg, fn) { if (typeof expected !== 'function') { if (isRegExp(expected)) return expected.test(actual); // assert.doesNotThrow does not accept objects. if (arguments.length === 2) { throw new ERR_INVALID_ARG_TYPE('expected', ['Function', 'RegExp'], expected); } // Handle primitives properly. if (_typeof(actual) !== 'object' || actual === null) { var err = new AssertionError({ actual: actual, expected: expected, message: msg, operator: 'deepStrictEqual', stackStartFn: fn }); err.operator = fn.name; throw err; } var keys = Object.keys(expected); // Special handle errors to make sure the name and the message are compared // as well. if (expected instanceof Error) { keys.push('name', 'message'); } else if (keys.length === 0) { throw new ERR_INVALID_ARG_VALUE('error', expected, 'may not be an empty object'); } if (isDeepEqual === undefined) lazyLoadComparison(); keys.forEach(function (key) { if (typeof actual[key] === 'string' && isRegExp(expected[key]) && expected[key].test(actual[key])) { return; } compareExceptionKey(actual, expected, key, msg, keys, fn); }); return true; } // Guard instanceof against arrow functions as they don't have a prototype. if (expected.prototype !== undefined && actual instanceof expected) { return true; } if (Error.isPrototypeOf(expected)) { return false; } return expected.call({}, actual) === true; } function getActual(fn) { if (typeof fn !== 'function') { throw new ERR_INVALID_ARG_TYPE('fn', 'Function', fn); } try { fn(); } catch (e) { return e; } return NO_EXCEPTION_SENTINEL; } function checkIsPromise(obj) { // Accept native ES6 promises and promises that are implemented in a similar // way. Do not accept thenables that use a function as `obj` and that have no // `catch` handler. // TODO: thenables are checked up until they have the correct methods, // but according to documentation, the `then` method should receive // the `fulfill` and `reject` arguments as well or it may be never resolved. return isPromise(obj) || obj !== null && _typeof(obj) === 'object' && typeof obj.then === 'function' && typeof obj.catch === 'function'; } function waitForActual(promiseFn) { return Promise.resolve().then(function () { var resultPromise; if (typeof promiseFn === 'function') { // Return a rejected promise if `promiseFn` throws synchronously. resultPromise = promiseFn(); // Fail in case no promise is returned. if (!checkIsPromise(resultPromise)) { throw new ERR_INVALID_RETURN_VALUE('instance of Promise', 'promiseFn', resultPromise); } } else if (checkIsPromise(promiseFn)) { resultPromise = promiseFn; } else { throw new ERR_INVALID_ARG_TYPE('promiseFn', ['Function', 'Promise'], promiseFn); } return Promise.resolve().then(function () { return resultPromise; }).then(function () { return NO_EXCEPTION_SENTINEL; }).catch(function (e) { return e; }); }); } function expectsError(stackStartFn, actual, error, message) { if (typeof error === 'string') { if (arguments.length === 4) { throw new ERR_INVALID_ARG_TYPE('error', ['Object', 'Error', 'Function', 'RegExp'], error); } if (_typeof(actual) === 'object' && actual !== null) { if (actual.message === error) { throw new ERR_AMBIGUOUS_ARGUMENT('error/message', "The error message \"".concat(actual.message, "\" is identical to the message.")); } } else if (actual === error) { throw new ERR_AMBIGUOUS_ARGUMENT('error/message', "The error \"".concat(actual, "\" is identical to the message.")); } message = error; error = undefined; } else if (error != null && _typeof(error) !== 'object' && typeof error !== 'function') { throw new ERR_INVALID_ARG_TYPE('error', ['Object', 'Error', 'Function', 'RegExp'], error); } if (actual === NO_EXCEPTION_SENTINEL) { var details = ''; if (error && error.name) { details += " (".concat(error.name, ")"); } details += message ? ": ".concat(message) : '.'; var fnType = stackStartFn.name === 'rejects' ? 'rejection' : 'exception'; innerFail({ actual: undefined, expected: error, operator: stackStartFn.name, message: "Missing expected ".concat(fnType).concat(details), stackStartFn: stackStartFn }); } if (error && !expectedException(actual, error, message, stackStartFn)) { throw actual; } } function expectsNoError(stackStartFn, actual, error, message) { if (actual === NO_EXCEPTION_SENTINEL) return; if (typeof error === 'string') { message = error; error = undefined; } if (!error || expectedException(actual, error)) { var details = message ? ": ".concat(message) : '.'; var fnType = stackStartFn.name === 'doesNotReject' ? 'rejection' : 'exception'; innerFail({ actual: actual, expected: error, operator: stackStartFn.name, message: "Got unwanted ".concat(fnType).concat(details, "\n") + "Actual message: \"".concat(actual && actual.message, "\""), stackStartFn: stackStartFn }); } throw actual; } assert.throws = function throws(promiseFn) { for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) { args[_key2 - 1] = arguments[_key2]; } expectsError.apply(void 0, [throws, getActual(promiseFn)].concat(args)); }; assert.rejects = function rejects(promiseFn) { for (var _len3 = arguments.length, args = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) { args[_key3 - 1] = arguments[_key3]; } return waitForActual(promiseFn).then(function (result) { return expectsError.apply(void 0, [rejects, result].concat(args)); }); }; assert.doesNotThrow = function doesNotThrow(fn) { for (var _len4 = arguments.length, args = new Array(_len4 > 1 ? _len4 - 1 : 0), _key4 = 1; _key4 < _len4; _key4++) { args[_key4 - 1] = arguments[_key4]; } expectsNoError.apply(void 0, [doesNotThrow, getActual(fn)].concat(args)); }; assert.doesNotReject = function doesNotReject(fn) { for (var _len5 = arguments.length, args = new Array(_len5 > 1 ? _len5 - 1 : 0), _key5 = 1; _key5 < _len5; _key5++) { args[_key5 - 1] = arguments[_key5]; } return waitForActual(fn).then(function (result) { return expectsNoError.apply(void 0, [doesNotReject, result].concat(args)); }); }; assert.ifError = function ifError(err) { if (err !== null && err !== undefined) { var message = 'ifError got unwanted exception: '; if (_typeof(err) === 'object' && typeof err.message === 'string') { if (err.message.length === 0 && err.constructor) { message += err.constructor.name; } else { message += err.message; } } else { message += inspect(err); } var newErr = new AssertionError({ actual: err, expected: null, operator: 'ifError', message: message, stackStartFn: ifError }); // Make sure we actually have a stack trace! var origStack = err.stack; if (typeof origStack === 'string') { // This will remove any duplicated frames from the error frames taken // from within `ifError` and add the original error frames to the newly // created ones. var tmp2 = origStack.split('\n'); tmp2.shift(); // Filter all frames existing in err.stack. var tmp1 = newErr.stack.split('\n'); for (var i = 0; i < tmp2.length; i++) { // Find the first occurrence of the frame. var pos = tmp1.indexOf(tmp2[i]); if (pos !== -1) { // Only keep new frames. tmp1 = tmp1.slice(0, pos); break; } } newErr.stack = "".concat(tmp1.join('\n'), "\n").concat(tmp2.join('\n')); } throw newErr; } }; // Expose a strict only variant of assert function strict() { for (var _len6 = arguments.length, args = new Array(_len6), _key6 = 0; _key6 < _len6; _key6++) { args[_key6] = arguments[_key6]; } innerOk.apply(void 0, [strict, args.length].concat(args)); } assert.strict = objectAssign(strict, assert, { equal: assert.strictEqual, deepEqual: assert.deepStrictEqual, notEqual: assert.notStrictEqual, notDeepEqual: assert.notDeepStrictEqual }); assert.strict.strict = assert.strict; /***/ }), /***/ 5961: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; /* provided dependency */ var process = __webpack_require__(4155); // Currently in sync with Node.js lib/internal/assert/assertion_error.js // https://github.com/nodejs/node/commit/0817840f775032169ddd70c85ac059f18ffcc81c function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _wrapNativeSuper(Class) { var _cache = typeof Map === "function" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== "function") { throw new TypeError("Super expression must either be null or a function"); } if (typeof _cache !== "undefined") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); } function isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } function _construct(Parent, args, Class) { if (isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); } function _isNativeFunction(fn) { return Function.toString.call(fn).indexOf("[native code]") !== -1; } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } var _require = __webpack_require__(9539), inspect = _require.inspect; var _require2 = __webpack_require__(2136), ERR_INVALID_ARG_TYPE = _require2.codes.ERR_INVALID_ARG_TYPE; // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith function endsWith(str, search, this_len) { if (this_len === undefined || this_len > str.length) { this_len = str.length; } return str.substring(this_len - search.length, this_len) === search; } // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/repeat function repeat(str, count) { count = Math.floor(count); if (str.length == 0 || count == 0) return ''; var maxCount = str.length * count; count = Math.floor(Math.log(count) / Math.log(2)); while (count) { str += str; count--; } str += str.substring(0, maxCount - str.length); return str; } var blue = ''; var green = ''; var red = ''; var white = ''; var kReadableOperator = { deepStrictEqual: 'Expected values to be strictly deep-equal:', strictEqual: 'Expected values to be strictly equal:', strictEqualObject: 'Expected "actual" to be reference-equal to "expected":', deepEqual: 'Expected values to be loosely deep-equal:', equal: 'Expected values to be loosely equal:', notDeepStrictEqual: 'Expected "actual" not to be strictly deep-equal to:', notStrictEqual: 'Expected "actual" to be strictly unequal to:', notStrictEqualObject: 'Expected "actual" not to be reference-equal to "expected":', notDeepEqual: 'Expected "actual" not to be loosely deep-equal to:', notEqual: 'Expected "actual" to be loosely unequal to:', notIdentical: 'Values identical but not reference-equal:' }; // Comparing short primitives should just show === / !== instead of using the // diff. var kMaxShortLength = 10; function copyError(source) { var keys = Object.keys(source); var target = Object.create(Object.getPrototypeOf(source)); keys.forEach(function (key) { target[key] = source[key]; }); Object.defineProperty(target, 'message', { value: source.message }); return target; } function inspectValue(val) { // The util.inspect default values could be changed. This makes sure the // error messages contain the necessary information nevertheless. return inspect(val, { compact: false, customInspect: false, depth: 1000, maxArrayLength: Infinity, // Assert compares only enumerable properties (with a few exceptions). showHidden: false, // Having a long line as error is better than wrapping the line for // comparison for now. // TODO(BridgeAR): `breakLength` should be limited as soon as soon as we // have meta information about the inspected properties (i.e., know where // in what line the property starts and ends). breakLength: Infinity, // Assert does not detect proxies currently. showProxy: false, sorted: true, // Inspect getters as we also check them when comparing entries. getters: true }); } function createErrDiff(actual, expected, operator) { var other = ''; var res = ''; var lastPos = 0; var end = ''; var skipped = false; var actualInspected = inspectValue(actual); var actualLines = actualInspected.split('\n'); var expectedLines = inspectValue(expected).split('\n'); var i = 0; var indicator = ''; // In case both values are objects explicitly mark them as not reference equal // for the `strictEqual` operator. if (operator === 'strictEqual' && _typeof(actual) === 'object' && _typeof(expected) === 'object' && actual !== null && expected !== null) { operator = 'strictEqualObject'; } // If "actual" and "expected" fit on a single line and they are not strictly // equal, check further special handling. if (actualLines.length === 1 && expectedLines.length === 1 && actualLines[0] !== expectedLines[0]) { var inputLength = actualLines[0].length + expectedLines[0].length; // If the character length of "actual" and "expected" together is less than // kMaxShortLength and if neither is an object and at least one of them is // not `zero`, use the strict equal comparison to visualize the output. if (inputLength <= kMaxShortLength) { if ((_typeof(actual) !== 'object' || actual === null) && (_typeof(expected) !== 'object' || expected === null) && (actual !== 0 || expected !== 0)) { // -0 === +0 return "".concat(kReadableOperator[operator], "\n\n") + "".concat(actualLines[0], " !== ").concat(expectedLines[0], "\n"); } } else if (operator !== 'strictEqualObject') { // If the stderr is a tty and the input length is lower than the current // columns per line, add a mismatch indicator below the output. If it is // not a tty, use a default value of 80 characters. var maxLength = process.stderr && process.stderr.isTTY ? process.stderr.columns : 80; if (inputLength < maxLength) { while (actualLines[0][i] === expectedLines[0][i]) { i++; } // Ignore the first characters. if (i > 2) { // Add position indicator for the first mismatch in case it is a // single line and the input length is less than the column length. indicator = "\n ".concat(repeat(' ', i), "^"); i = 0; } } } } // Remove all ending lines that match (this optimizes the output for // readability by reducing the number of total changed lines). var a = actualLines[actualLines.length - 1]; var b = expectedLines[expectedLines.length - 1]; while (a === b) { if (i++ < 2) { end = "\n ".concat(a).concat(end); } else { other = a; } actualLines.pop(); expectedLines.pop(); if (actualLines.length === 0 || expectedLines.length === 0) break; a = actualLines[actualLines.length - 1]; b = expectedLines[expectedLines.length - 1]; } var maxLines = Math.max(actualLines.length, expectedLines.length); // Strict equal with identical objects that are not identical by reference. // E.g., assert.deepStrictEqual({ a: Symbol() }, { a: Symbol() }) if (maxLines === 0) { // We have to get the result again. The lines were all removed before. var _actualLines = actualInspected.split('\n'); // Only remove lines in case it makes sense to collapse those. // TODO: Accept env to always show the full error. if (_actualLines.length > 30) { _actualLines[26] = "".concat(blue, "...").concat(white); while (_actualLines.length > 27) { _actualLines.pop(); } } return "".concat(kReadableOperator.notIdentical, "\n\n").concat(_actualLines.join('\n'), "\n"); } if (i > 3) { end = "\n".concat(blue, "...").concat(white).concat(end); skipped = true; } if (other !== '') { end = "\n ".concat(other).concat(end); other = ''; } var printedLines = 0; var msg = kReadableOperator[operator] + "\n".concat(green, "+ actual").concat(white, " ").concat(red, "- expected").concat(white); var skippedMsg = " ".concat(blue, "...").concat(white, " Lines skipped"); for (i = 0; i < maxLines; i++) { // Only extra expected lines exist var cur = i - lastPos; if (actualLines.length < i + 1) { // If the last diverging line is more than one line above and the // current line is at least line three, add some of the former lines and // also add dots to indicate skipped entries. if (cur > 1 && i > 2) { if (cur > 4) { res += "\n".concat(blue, "...").concat(white); skipped = true; } else if (cur > 3) { res += "\n ".concat(expectedLines[i - 2]); printedLines++; } res += "\n ".concat(expectedLines[i - 1]); printedLines++; } // Mark the current line as the last diverging one. lastPos = i; // Add the expected line to the cache. other += "\n".concat(red, "-").concat(white, " ").concat(expectedLines[i]); printedLines++; // Only extra actual lines exist } else if (expectedLines.length < i + 1) { // If the last diverging line is more than one line above and the // current line is at least line three, add some of the former lines and // also add dots to indicate skipped entries. if (cur > 1 && i > 2) { if (cur > 4) { res += "\n".concat(blue, "...").concat(white); skipped = true; } else if (cur > 3) { res += "\n ".concat(actualLines[i - 2]); printedLines++; } res += "\n ".concat(actualLines[i - 1]); printedLines++; } // Mark the current line as the last diverging one. lastPos = i; // Add the actual line to the result. res += "\n".concat(green, "+").concat(white, " ").concat(actualLines[i]); printedLines++; // Lines diverge } else { var expectedLine = expectedLines[i]; var actualLine = actualLines[i]; // If the lines diverge, specifically check for lines that only diverge by // a trailing comma. In that case it is actually identical and we should // mark it as such. var divergingLines = actualLine !== expectedLine && (!endsWith(actualLine, ',') || actualLine.slice(0, -1) !== expectedLine); // If the expected line has a trailing comma but is otherwise identical, // add a comma at the end of the actual line. Otherwise the output could // look weird as in: // // [ // 1 // No comma at the end! // + 2 // ] // if (divergingLines && endsWith(expectedLine, ',') && expectedLine.slice(0, -1) === actualLine) { divergingLines = false; actualLine += ','; } if (divergingLines) { // If the last diverging line is more than one line above and the // current line is at least line three, add some of the former lines and // also add dots to indicate skipped entries. if (cur > 1 && i > 2) { if (cur > 4) { res += "\n".concat(blue, "...").concat(white); skipped = true; } else if (cur > 3) { res += "\n ".concat(actualLines[i - 2]); printedLines++; } res += "\n ".concat(actualLines[i - 1]); printedLines++; } // Mark the current line as the last diverging one. lastPos = i; // Add the actual line to the result and cache the expected diverging // line so consecutive diverging lines show up as +++--- and not +-+-+-. res += "\n".concat(green, "+").concat(white, " ").concat(actualLine); other += "\n".concat(red, "-").concat(white, " ").concat(expectedLine); printedLines += 2; // Lines are identical } else { // Add all cached information to the result before adding other things // and reset the cache. res += other; other = ''; // If the last diverging line is exactly one line above or if it is the // very first line, add the line to the result. if (cur === 1 || i === 0) { res += "\n ".concat(actualLine); printedLines++; } } } // Inspected object to big (Show ~20 rows max) if (printedLines > 20 && i < maxLines - 2) { return "".concat(msg).concat(skippedMsg, "\n").concat(res, "\n").concat(blue, "...").concat(white).concat(other, "\n") + "".concat(blue, "...").concat(white); } } return "".concat(msg).concat(skipped ? skippedMsg : '', "\n").concat(res).concat(other).concat(end).concat(indicator); } var AssertionError = /*#__PURE__*/ function (_Error) { _inherits(AssertionError, _Error); function AssertionError(options) { var _this; _classCallCheck(this, AssertionError); if (_typeof(options) !== 'object' || options === null) { throw new ERR_INVALID_ARG_TYPE('options', 'Object', options); } var message = options.message, operator = options.operator, stackStartFn = options.stackStartFn; var actual = options.actual, expected = options.expected; var limit = Error.stackTraceLimit; Error.stackTraceLimit = 0; if (message != null) { _this = _possibleConstructorReturn(this, _getPrototypeOf(AssertionError).call(this, String(message))); } else { if (process.stderr && process.stderr.isTTY) { // Reset on each call to make sure we handle dynamically set environment // variables correct. if (process.stderr && process.stderr.getColorDepth && process.stderr.getColorDepth() !== 1) { blue = "\x1B[34m"; green = "\x1B[32m"; white = "\x1B[39m"; red = "\x1B[31m"; } else { blue = ''; green = ''; white = ''; red = ''; } } // Prevent the error stack from being visible by duplicating the error // in a very close way to the original in case both sides are actually // instances of Error. if (_typeof(actual) === 'object' && actual !== null && _typeof(expected) === 'object' && expected !== null && 'stack' in actual && actual instanceof Error && 'stack' in expected && expected instanceof Error) { actual = copyError(actual); expected = copyError(expected); } if (operator === 'deepStrictEqual' || operator === 'strictEqual') { _this = _possibleConstructorReturn(this, _getPrototypeOf(AssertionError).call(this, createErrDiff(actual, expected, operator))); } else if (operator === 'notDeepStrictEqual' || operator === 'notStrictEqual') { // In case the objects are equal but the operator requires unequal, show // the first object and say A equals B var base = kReadableOperator[operator]; var res = inspectValue(actual).split('\n'); // In case "actual" is an object, it should not be reference equal. if (operator === 'notStrictEqual' && _typeof(actual) === 'object' && actual !== null) { base = kReadableOperator.notStrictEqualObject; } // Only remove lines in case it makes sense to collapse those. // TODO: Accept env to always show the full error. if (res.length > 30) { res[26] = "".concat(blue, "...").concat(white); while (res.length > 27) { res.pop(); } } // Only print a single input. if (res.length === 1) { _this = _possibleConstructorReturn(this, _getPrototypeOf(AssertionError).call(this, "".concat(base, " ").concat(res[0]))); } else { _this = _possibleConstructorReturn(this, _getPrototypeOf(AssertionError).call(this, "".concat(base, "\n\n").concat(res.join('\n'), "\n"))); } } else { var _res = inspectValue(actual); var other = ''; var knownOperators = kReadableOperator[operator]; if (operator === 'notDeepEqual' || operator === 'notEqual') { _res = "".concat(kReadableOperator[operator], "\n\n").concat(_res); if (_res.length > 1024) { _res = "".concat(_res.slice(0, 1021), "..."); } } else { other = "".concat(inspectValue(expected)); if (_res.length > 512) { _res = "".concat(_res.slice(0, 509), "..."); } if (other.length > 512) { other = "".concat(other.slice(0, 509), "..."); } if (operator === 'deepEqual' || operator === 'equal') { _res = "".concat(knownOperators, "\n\n").concat(_res, "\n\nshould equal\n\n"); } else { other = " ".concat(operator, " ").concat(other); } } _this = _possibleConstructorReturn(this, _getPrototypeOf(AssertionError).call(this, "".concat(_res).concat(other))); } } Error.stackTraceLimit = limit; _this.generatedMessage = !message; Object.defineProperty(_assertThisInitialized(_this), 'name', { value: 'AssertionError [ERR_ASSERTION]', enumerable: false, writable: true, configurable: true }); _this.code = 'ERR_ASSERTION'; _this.actual = actual; _this.expected = expected; _this.operator = operator; if (Error.captureStackTrace) { // eslint-disable-next-line no-restricted-syntax Error.captureStackTrace(_assertThisInitialized(_this), stackStartFn); } // Create error message including the error code in the name. _this.stack; // Reset the name. _this.name = 'AssertionError'; return _possibleConstructorReturn(_this); } _createClass(AssertionError, [{ key: "toString", value: function toString() { return "".concat(this.name, " [").concat(this.code, "]: ").concat(this.message); } }, { key: inspect.custom, value: function value(recurseTimes, ctx) { // This limits the `actual` and `expected` property default inspection to // the minimum depth. Otherwise those values would be too verbose compared // to the actual error message which contains a combined view of these two // input values. return inspect(this, _objectSpread({}, ctx, { customInspect: false, depth: 0 })); } }]); return AssertionError; }(_wrapNativeSuper(Error)); module.exports = AssertionError; /***/ }), /***/ 2136: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; // Currently in sync with Node.js lib/internal/errors.js // https://github.com/nodejs/node/commit/3b044962c48fe313905877a96b5d0894a5404f6f /* eslint node-core/documented-errors: "error" */ /* eslint node-core/alphabetize-errors: "error" */ /* eslint node-core/prefer-util-format-errors: "error" */ // The whole point behind this internal module is to allow Node.js to no // longer be forced to treat every error message change as a semver-major // change. The NodeError classes here all expose a `code` property whose // value statically and permanently identifies the error. While the error // message may change, the code should not. function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } var codes = {}; // Lazy loaded var assert; var util; function createErrorType(code, message, Base) { if (!Base) { Base = Error; } function getMessage(arg1, arg2, arg3) { if (typeof message === 'string') { return message; } else { return message(arg1, arg2, arg3); } } var NodeError = /*#__PURE__*/ function (_Base) { _inherits(NodeError, _Base); function NodeError(arg1, arg2, arg3) { var _this; _classCallCheck(this, NodeError); _this = _possibleConstructorReturn(this, _getPrototypeOf(NodeError).call(this, getMessage(arg1, arg2, arg3))); _this.code = code; return _this; } return NodeError; }(Base); codes[code] = NodeError; } // https://github.com/nodejs/node/blob/v10.8.0/lib/internal/errors.js function oneOf(expected, thing) { if (Array.isArray(expected)) { var len = expected.length; expected = expected.map(function (i) { return String(i); }); if (len > 2) { return "one of ".concat(thing, " ").concat(expected.slice(0, len - 1).join(', '), ", or ") + expected[len - 1]; } else if (len === 2) { return "one of ".concat(thing, " ").concat(expected[0], " or ").concat(expected[1]); } else { return "of ".concat(thing, " ").concat(expected[0]); } } else { return "of ".concat(thing, " ").concat(String(expected)); } } // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/startsWith function startsWith(str, search, pos) { return str.substr(!pos || pos < 0 ? 0 : +pos, search.length) === search; } // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/endsWith function endsWith(str, search, this_len) { if (this_len === undefined || this_len > str.length) { this_len = str.length; } return str.substring(this_len - search.length, this_len) === search; } // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/includes function includes(str, search, start) { if (typeof start !== 'number') { start = 0; } if (start + search.length > str.length) { return false; } else { return str.indexOf(search, start) !== -1; } } createErrorType('ERR_AMBIGUOUS_ARGUMENT', 'The "%s" argument is ambiguous. %s', TypeError); createErrorType('ERR_INVALID_ARG_TYPE', function (name, expected, actual) { if (assert === undefined) assert = __webpack_require__(9282); assert(typeof name === 'string', "'name' must be a string"); // determiner: 'must be' or 'must not be' var determiner; if (typeof expected === 'string' && startsWith(expected, 'not ')) { determiner = 'must not be'; expected = expected.replace(/^not /, ''); } else { determiner = 'must be'; } var msg; if (endsWith(name, ' argument')) { // For cases like 'first argument' msg = "The ".concat(name, " ").concat(determiner, " ").concat(oneOf(expected, 'type')); } else { var type = includes(name, '.') ? 'property' : 'argument'; msg = "The \"".concat(name, "\" ").concat(type, " ").concat(determiner, " ").concat(oneOf(expected, 'type')); } // TODO(BridgeAR): Improve the output by showing `null` and similar. msg += ". Received type ".concat(_typeof(actual)); return msg; }, TypeError); createErrorType('ERR_INVALID_ARG_VALUE', function (name, value) { var reason = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'is invalid'; if (util === undefined) util = __webpack_require__(9539); var inspected = util.inspect(value); if (inspected.length > 128) { inspected = "".concat(inspected.slice(0, 128), "..."); } return "The argument '".concat(name, "' ").concat(reason, ". Received ").concat(inspected); }, TypeError, RangeError); createErrorType('ERR_INVALID_RETURN_VALUE', function (input, name, value) { var type; if (value && value.constructor && value.constructor.name) { type = "instance of ".concat(value.constructor.name); } else { type = "type ".concat(_typeof(value)); } return "Expected ".concat(input, " to be returned from the \"").concat(name, "\"") + " function but got ".concat(type, "."); }, TypeError); createErrorType('ERR_MISSING_ARGS', function () { for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) { args[_key] = arguments[_key]; } if (assert === undefined) assert = __webpack_require__(9282); assert(args.length > 0, 'At least one arg needs to be specified'); var msg = 'The '; var len = args.length; args = args.map(function (a) { return "\"".concat(a, "\""); }); switch (len) { case 1: msg += "".concat(args[0], " argument"); break; case 2: msg += "".concat(args[0], " and ").concat(args[1], " arguments"); break; default: msg += args.slice(0, len - 1).join(', '); msg += ", and ".concat(args[len - 1], " arguments"); break; } return "".concat(msg, " must be specified"); }, TypeError); module.exports.codes = codes; /***/ }), /***/ 9158: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; // Currently in sync with Node.js lib/internal/util/comparisons.js // https://github.com/nodejs/node/commit/112cc7c27551254aa2b17098fb774867f05ed0d9 function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest(); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); } function _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } var regexFlagsSupported = /a/g.flags !== undefined; var arrayFromSet = function arrayFromSet(set) { var array = []; set.forEach(function (value) { return array.push(value); }); return array; }; var arrayFromMap = function arrayFromMap(map) { var array = []; map.forEach(function (value, key) { return array.push([key, value]); }); return array; }; var objectIs = Object.is ? Object.is : __webpack_require__(609); var objectGetOwnPropertySymbols = Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols : function () { return []; }; var numberIsNaN = Number.isNaN ? Number.isNaN : __webpack_require__(360); function uncurryThis(f) { return f.call.bind(f); } var hasOwnProperty = uncurryThis(Object.prototype.hasOwnProperty); var propertyIsEnumerable = uncurryThis(Object.prototype.propertyIsEnumerable); var objectToString = uncurryThis(Object.prototype.toString); var _require$types = (__webpack_require__(9539).types), isAnyArrayBuffer = _require$types.isAnyArrayBuffer, isArrayBufferView = _require$types.isArrayBufferView, isDate = _require$types.isDate, isMap = _require$types.isMap, isRegExp = _require$types.isRegExp, isSet = _require$types.isSet, isNativeError = _require$types.isNativeError, isBoxedPrimitive = _require$types.isBoxedPrimitive, isNumberObject = _require$types.isNumberObject, isStringObject = _require$types.isStringObject, isBooleanObject = _require$types.isBooleanObject, isBigIntObject = _require$types.isBigIntObject, isSymbolObject = _require$types.isSymbolObject, isFloat32Array = _require$types.isFloat32Array, isFloat64Array = _require$types.isFloat64Array; function isNonIndex(key) { if (key.length === 0 || key.length > 10) return true; for (var i = 0; i < key.length; i++) { var code = key.charCodeAt(i); if (code < 48 || code > 57) return true; } // The maximum size for an array is 2 ** 32 -1. return key.length === 10 && key >= Math.pow(2, 32); } function getOwnNonIndexProperties(value) { return Object.keys(value).filter(isNonIndex).concat(objectGetOwnPropertySymbols(value).filter(Object.prototype.propertyIsEnumerable.bind(value))); } // Taken from https://github.com/feross/buffer/blob/680e9e5e488f22aac27599a57dc844a6315928dd/index.js // original notice: /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */ function compare(a, b) { if (a === b) { return 0; } var x = a.length; var y = b.length; for (var i = 0, len = Math.min(x, y); i < len; ++i) { if (a[i] !== b[i]) { x = a[i]; y = b[i]; break; } } if (x < y) { return -1; } if (y < x) { return 1; } return 0; } var ONLY_ENUMERABLE = undefined; var kStrict = true; var kLoose = false; var kNoIterator = 0; var kIsArray = 1; var kIsSet = 2; var kIsMap = 3; // Check if they have the same source and flags function areSimilarRegExps(a, b) { return regexFlagsSupported ? a.source === b.source && a.flags === b.flags : RegExp.prototype.toString.call(a) === RegExp.prototype.toString.call(b); } function areSimilarFloatArrays(a, b) { if (a.byteLength !== b.byteLength) { return false; } for (var offset = 0; offset < a.byteLength; offset++) { if (a[offset] !== b[offset]) { return false; } } return true; } function areSimilarTypedArrays(a, b) { if (a.byteLength !== b.byteLength) { return false; } return compare(new Uint8Array(a.buffer, a.byteOffset, a.byteLength), new Uint8Array(b.buffer, b.byteOffset, b.byteLength)) === 0; } function areEqualArrayBuffers(buf1, buf2) { return buf1.byteLength === buf2.byteLength && compare(new Uint8Array(buf1), new Uint8Array(buf2)) === 0; } function isEqualBoxedPrimitive(val1, val2) { if (isNumberObject(val1)) { return isNumberObject(val2) && objectIs(Number.prototype.valueOf.call(val1), Number.prototype.valueOf.call(val2)); } if (isStringObject(val1)) { return isStringObject(val2) && String.prototype.valueOf.call(val1) === String.prototype.valueOf.call(val2); } if (isBooleanObject(val1)) { return isBooleanObject(val2) && Boolean.prototype.valueOf.call(val1) === Boolean.prototype.valueOf.call(val2); } if (isBigIntObject(val1)) { return isBigIntObject(val2) && BigInt.prototype.valueOf.call(val1) === BigInt.prototype.valueOf.call(val2); } return isSymbolObject(val2) && Symbol.prototype.valueOf.call(val1) === Symbol.prototype.valueOf.call(val2); } // Notes: Type tags are historical [[Class]] properties that can be set by // FunctionTemplate::SetClassName() in C++ or Symbol.toStringTag in JS // and retrieved using Object.prototype.toString.call(obj) in JS // See https://tc39.github.io/ecma262/#sec-object.prototype.tostring // for a list of tags pre-defined in the spec. // There are some unspecified tags in the wild too (e.g. typed array tags). // Since tags can be altered, they only serve fast failures // // Typed arrays and buffers are checked by comparing the content in their // underlying ArrayBuffer. This optimization requires that it's // reasonable to interpret their underlying memory in the same way, // which is checked by comparing their type tags. // (e.g. a Uint8Array and a Uint16Array with the same memory content // could still be different because they will be interpreted differently). // // For strict comparison, objects should have // a) The same built-in type tags // b) The same prototypes. function innerDeepEqual(val1, val2, strict, memos) { // All identical values are equivalent, as determined by ===. if (val1 === val2) { if (val1 !== 0) return true; return strict ? objectIs(val1, val2) : true; } // Check more closely if val1 and val2 are equal. if (strict) { if (_typeof(val1) !== 'object') { return typeof val1 === 'number' && numberIsNaN(val1) && numberIsNaN(val2); } if (_typeof(val2) !== 'object' || val1 === null || val2 === null) { return false; } if (Object.getPrototypeOf(val1) !== Object.getPrototypeOf(val2)) { return false; } } else { if (val1 === null || _typeof(val1) !== 'object') { if (val2 === null || _typeof(val2) !== 'object') { // eslint-disable-next-line eqeqeq return val1 == val2; } return false; } if (val2 === null || _typeof(val2) !== 'object') { return false; } } var val1Tag = objectToString(val1); var val2Tag = objectToString(val2); if (val1Tag !== val2Tag) { return false; } if (Array.isArray(val1)) { // Check for sparse arrays and general fast path if (val1.length !== val2.length) { return false; } var keys1 = getOwnNonIndexProperties(val1, ONLY_ENUMERABLE); var keys2 = getOwnNonIndexProperties(val2, ONLY_ENUMERABLE); if (keys1.length !== keys2.length) { return false; } return keyCheck(val1, val2, strict, memos, kIsArray, keys1); } // [browserify] This triggers on certain types in IE (Map/Set) so we don't // wan't to early return out of the rest of the checks. However we can check // if the second value is one of these values and the first isn't. if (val1Tag === '[object Object]') { // return keyCheck(val1, val2, strict, memos, kNoIterator); if (!isMap(val1) && isMap(val2) || !isSet(val1) && isSet(val2)) { return false; } } if (isDate(val1)) { if (!isDate(val2) || Date.prototype.getTime.call(val1) !== Date.prototype.getTime.call(val2)) { return false; } } else if (isRegExp(val1)) { if (!isRegExp(val2) || !areSimilarRegExps(val1, val2)) { return false; } } else if (isNativeError(val1) || val1 instanceof Error) { // Do not compare the stack as it might differ even though the error itself // is otherwise identical. if (val1.message !== val2.message || val1.name !== val2.name) { return false; } } else if (isArrayBufferView(val1)) { if (!strict && (isFloat32Array(val1) || isFloat64Array(val1))) { if (!areSimilarFloatArrays(val1, val2)) { return false; } } else if (!areSimilarTypedArrays(val1, val2)) { return false; } // Buffer.compare returns true, so val1.length === val2.length. If they both // only contain numeric keys, we don't need to exam further than checking // the symbols. var _keys = getOwnNonIndexProperties(val1, ONLY_ENUMERABLE); var _keys2 = getOwnNonIndexProperties(val2, ONLY_ENUMERABLE); if (_keys.length !== _keys2.length) { return false; } return keyCheck(val1, val2, strict, memos, kNoIterator, _keys); } else if (isSet(val1)) { if (!isSet(val2) || val1.size !== val2.size) { return false; } return keyCheck(val1, val2, strict, memos, kIsSet); } else if (isMap(val1)) { if (!isMap(val2) || val1.size !== val2.size) { return false; } return keyCheck(val1, val2, strict, memos, kIsMap); } else if (isAnyArrayBuffer(val1)) { if (!areEqualArrayBuffers(val1, val2)) { return false; } } else if (isBoxedPrimitive(val1) && !isEqualBoxedPrimitive(val1, val2)) { return false; } return keyCheck(val1, val2, strict, memos, kNoIterator); } function getEnumerables(val, keys) { return keys.filter(function (k) { return propertyIsEnumerable(val, k); }); } function keyCheck(val1, val2, strict, memos, iterationType, aKeys) { // For all remaining Object pairs, including Array, objects and Maps, // equivalence is determined by having: // a) The same number of owned enumerable properties // b) The same set of keys/indexes (although not necessarily the same order) // c) Equivalent values for every corresponding key/index // d) For Sets and Maps, equal contents // Note: this accounts for both named and indexed properties on Arrays. if (arguments.length === 5) { aKeys = Object.keys(val1); var bKeys = Object.keys(val2); // The pair must have the same number of owned properties. if (aKeys.length !== bKeys.length) { return false; } } // Cheap key test var i = 0; for (; i < aKeys.length; i++) { if (!hasOwnProperty(val2, aKeys[i])) { return false; } } if (strict && arguments.length === 5) { var symbolKeysA = objectGetOwnPropertySymbols(val1); if (symbolKeysA.length !== 0) { var count = 0; for (i = 0; i < symbolKeysA.length; i++) { var key = symbolKeysA[i]; if (propertyIsEnumerable(val1, key)) { if (!propertyIsEnumerable(val2, key)) { return false; } aKeys.push(key); count++; } else if (propertyIsEnumerable(val2, key)) { return false; } } var symbolKeysB = objectGetOwnPropertySymbols(val2); if (symbolKeysA.length !== symbolKeysB.length && getEnumerables(val2, symbolKeysB).length !== count) { return false; } } else { var _symbolKeysB = objectGetOwnPropertySymbols(val2); if (_symbolKeysB.length !== 0 && getEnumerables(val2, _symbolKeysB).length !== 0) { return false; } } } if (aKeys.length === 0 && (iterationType === kNoIterator || iterationType === kIsArray && val1.length === 0 || val1.size === 0)) { return true; } // Use memos to handle cycles. if (memos === undefined) { memos = { val1: new Map(), val2: new Map(), position: 0 }; } else { // We prevent up to two map.has(x) calls by directly retrieving the value // and checking for undefined. The map can only contain numbers, so it is // safe to check for undefined only. var val2MemoA = memos.val1.get(val1); if (val2MemoA !== undefined) { var val2MemoB = memos.val2.get(val2); if (val2MemoB !== undefined) { return val2MemoA === val2MemoB; } } memos.position++; } memos.val1.set(val1, memos.position); memos.val2.set(val2, memos.position); var areEq = objEquiv(val1, val2, strict, aKeys, memos, iterationType); memos.val1.delete(val1); memos.val2.delete(val2); return areEq; } function setHasEqualElement(set, val1, strict, memo) { // Go looking. var setValues = arrayFromSet(set); for (var i = 0; i < setValues.length; i++) { var val2 = setValues[i]; if (innerDeepEqual(val1, val2, strict, memo)) { // Remove the matching element to make sure we do not check that again. set.delete(val2); return true; } } return false; } // See https://developer.mozilla.org/en-US/docs/Web/JavaScript/Equality_comparisons_and_sameness#Loose_equality_using // Sadly it is not possible to detect corresponding values properly in case the // type is a string, number, bigint or boolean. The reason is that those values // can match lots of different string values (e.g., 1n == '+00001'). function findLooseMatchingPrimitives(prim) { switch (_typeof(prim)) { case 'undefined': return null; case 'object': // Only pass in null as object! return undefined; case 'symbol': return false; case 'string': prim = +prim; // Loose equal entries exist only if the string is possible to convert to // a regular number and not NaN. // Fall through case 'number': if (numberIsNaN(prim)) { return false; } } return true; } function setMightHaveLoosePrim(a, b, prim) { var altValue = findLooseMatchingPrimitives(prim); if (altValue != null) return altValue; return b.has(altValue) && !a.has(altValue); } function mapMightHaveLoosePrim(a, b, prim, item, memo) { var altValue = findLooseMatchingPrimitives(prim); if (altValue != null) { return altValue; } var curB = b.get(altValue); if (curB === undefined && !b.has(altValue) || !innerDeepEqual(item, curB, false, memo)) { return false; } return !a.has(altValue) && innerDeepEqual(item, curB, false, memo); } function setEquiv(a, b, strict, memo) { // This is a lazily initiated Set of entries which have to be compared // pairwise. var set = null; var aValues = arrayFromSet(a); for (var i = 0; i < aValues.length; i++) { var val = aValues[i]; // Note: Checking for the objects first improves the performance for object // heavy sets but it is a minor slow down for primitives. As they are fast // to check this improves the worst case scenario instead. if (_typeof(val) === 'object' && val !== null) { if (set === null) { set = new Set(); } // If the specified value doesn't exist in the second set its an not null // object (or non strict only: a not matching primitive) we'll need to go // hunting for something thats deep-(strict-)equal to it. To make this // O(n log n) complexity we have to copy these values in a new set first. set.add(val); } else if (!b.has(val)) { if (strict) return false; // Fast path to detect missing string, symbol, undefined and null values. if (!setMightHaveLoosePrim(a, b, val)) { return false; } if (set === null) { set = new Set(); } set.add(val); } } if (set !== null) { var bValues = arrayFromSet(b); for (var _i = 0; _i < bValues.length; _i++) { var _val = bValues[_i]; // We have to check if a primitive value is already // matching and only if it's not, go hunting for it. if (_typeof(_val) === 'object' && _val !== null) { if (!setHasEqualElement(set, _val, strict, memo)) return false; } else if (!strict && !a.has(_val) && !setHasEqualElement(set, _val, strict, memo)) { return false; } } return set.size === 0; } return true; } function mapHasEqualEntry(set, map, key1, item1, strict, memo) { // To be able to handle cases like: // Map([[{}, 'a'], [{}, 'b']]) vs Map([[{}, 'b'], [{}, 'a']]) // ... we need to consider *all* matching keys, not just the first we find. var setValues = arrayFromSet(set); for (var i = 0; i < setValues.length; i++) { var key2 = setValues[i]; if (innerDeepEqual(key1, key2, strict, memo) && innerDeepEqual(item1, map.get(key2), strict, memo)) { set.delete(key2); return true; } } return false; } function mapEquiv(a, b, strict, memo) { var set = null; var aEntries = arrayFromMap(a); for (var i = 0; i < aEntries.length; i++) { var _aEntries$i = _slicedToArray(aEntries[i], 2), key = _aEntries$i[0], item1 = _aEntries$i[1]; if (_typeof(key) === 'object' && key !== null) { if (set === null) { set = new Set(); } set.add(key); } else { // By directly retrieving the value we prevent another b.has(key) check in // almost all possible cases. var item2 = b.get(key); if (item2 === undefined && !b.has(key) || !innerDeepEqual(item1, item2, strict, memo)) { if (strict) return false; // Fast path to detect missing string, symbol, undefined and null // keys. if (!mapMightHaveLoosePrim(a, b, key, item1, memo)) return false; if (set === null) { set = new Set(); } set.add(key); } } } if (set !== null) { var bEntries = arrayFromMap(b); for (var _i2 = 0; _i2 < bEntries.length; _i2++) { var _bEntries$_i = _slicedToArray(bEntries[_i2], 2), key = _bEntries$_i[0], item = _bEntries$_i[1]; if (_typeof(key) === 'object' && key !== null) { if (!mapHasEqualEntry(set, a, key, item, strict, memo)) return false; } else if (!strict && (!a.has(key) || !innerDeepEqual(a.get(key), item, false, memo)) && !mapHasEqualEntry(set, a, key, item, false, memo)) { return false; } } return set.size === 0; } return true; } function objEquiv(a, b, strict, keys, memos, iterationType) { // Sets and maps don't have their entries accessible via normal object // properties. var i = 0; if (iterationType === kIsSet) { if (!setEquiv(a, b, strict, memos)) { return false; } } else if (iterationType === kIsMap) { if (!mapEquiv(a, b, strict, memos)) { return false; } } else if (iterationType === kIsArray) { for (; i < a.length; i++) { if (hasOwnProperty(a, i)) { if (!hasOwnProperty(b, i) || !innerDeepEqual(a[i], b[i], strict, memos)) { return false; } } else if (hasOwnProperty(b, i)) { return false; } else { // Array is sparse. var keysA = Object.keys(a); for (; i < keysA.length; i++) { var key = keysA[i]; if (!hasOwnProperty(b, key) || !innerDeepEqual(a[key], b[key], strict, memos)) { return false; } } if (keysA.length !== Object.keys(b).length) { return false; } return true; } } } // The pair must have equivalent values for every corresponding key. // Possibly expensive deep test: for (i = 0; i < keys.length; i++) { var _key = keys[i]; if (!innerDeepEqual(a[_key], b[_key], strict, memos)) { return false; } } return true; } function isDeepEqual(val1, val2) { return innerDeepEqual(val1, val2, kLoose); } function isDeepStrictEqual(val1, val2) { return innerDeepEqual(val1, val2, kStrict); } module.exports = { isDeepEqual: isDeepEqual, isDeepStrictEqual: isDeepStrictEqual }; /***/ }), /***/ 2055: /***/ (function(__unused_webpack_module, exports) { "use strict"; // The following break classes are handled by the pair table exports.OP = 0; // Opening punctuation exports.CL = 1; // Closing punctuation exports.CP = 2; // Closing parenthesis exports.QU = 3; // Ambiguous quotation exports.GL = 4; // Glue exports.NS = 5; // Non-starters exports.EX = 6; // Exclamation/Interrogation exports.SY = 7; // Symbols allowing break after exports.IS = 8; // Infix separator exports.PR = 9; // Prefix exports.PO = 10; // Postfix exports.NU = 11; // Numeric exports.AL = 12; // Alphabetic exports.HL = 13; // Hebrew Letter exports.ID = 14; // Ideographic exports.IN = 15; // Inseparable characters exports.HY = 16; // Hyphen exports.BA = 17; // Break after exports.BB = 18; // Break before exports.B2 = 19; // Break on either side (but not pair) exports.ZW = 20; // Zero-width space exports.CM = 21; // Combining marks exports.WJ = 22; // Word joiner exports.H2 = 23; // Hangul LV exports.H3 = 24; // Hangul LVT exports.JL = 25; // Hangul L Jamo exports.JV = 26; // Hangul V Jamo exports.JT = 27; // Hangul T Jamo exports.RI = 28; // Regional Indicator exports.EB = 29; // Emoji Base exports.EM = 30; // Emoji Modifier exports.ZWJ = 31; // Zero Width Joiner exports.CB = 32; // Contingent break // The following break classes are not handled by the pair table exports.AI = 33; // Ambiguous (Alphabetic or Ideograph) exports.BK = 34; // Break (mandatory) exports.CJ = 35; // Conditional Japanese Starter exports.CR = 36; // Carriage return exports.LF = 37; // Line feed exports.NL = 38; // Next line exports.SA = 39; // South-East Asian exports.SG = 40; // Surrogates exports.SP = 41; // Space exports.XX = 42; // Unknown /***/ }), /***/ 8383: /***/ (function(__unused_webpack_module, exports) { "use strict"; var CI_BRK, CP_BRK, DI_BRK, IN_BRK, PR_BRK; exports.DI_BRK = DI_BRK = 0; // Direct break opportunity exports.IN_BRK = IN_BRK = 1; // Indirect break opportunity exports.CI_BRK = CI_BRK = 2; // Indirect break opportunity for combining marks exports.CP_BRK = CP_BRK = 3; // Prohibited break for combining marks exports.PR_BRK = PR_BRK = 4; // Prohibited break // Based on example pair table from https://www.unicode.org/reports/tr14/tr14-37.html#Table2 // - ZWJ special processing for LB8a of Revision 41 // - CB manually added as per Rule LB20 // - CL, CP, NS, SY, IS, PR, PO, HY, BA, B2 and RI manually adjusted as per LB22 of Revision 45 exports.pairTable = [//OP , CL , CP , QU , GL , NS , EX , SY , IS , PR , PO , NU , AL , HL , ID , IN , HY , BA , BB , B2 , ZW , CM , WJ , H2 , H3 , JL , JV , JT , RI , EB , EM , ZWJ , CB [PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, CP_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK], // OP [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // CL [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // CP [PR_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, CI_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK], // QU [IN_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, CI_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK], // GL [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // NS [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // EX [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK, IN_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // SY [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // IS [IN_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK], // PR [IN_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // PO [IN_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // NU [IN_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // AL [IN_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // HL [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // ID [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // IN [DI_BRK, PR_BRK, PR_BRK, IN_BRK, DI_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // HY [DI_BRK, PR_BRK, PR_BRK, IN_BRK, DI_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // BA [IN_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, CI_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK], // BB [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, PR_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // B2 [DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK], // ZW [IN_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // CM [IN_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, CI_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK], // WJ [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // H2 [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // H3 [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // JL [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // JV [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // JT [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // RI [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, DI_BRK], // EB [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, IN_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // EM [IN_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, PR_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, IN_BRK, IN_BRK, IN_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK], // ZWJ [DI_BRK, PR_BRK, PR_BRK, IN_BRK, IN_BRK, DI_BRK, PR_BRK, PR_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, PR_BRK, CI_BRK, PR_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, DI_BRK, IN_BRK, DI_BRK] // CB ]; /***/ }), /***/ 5106: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; __webpack_require__(9601); exports.EncodeStream = __webpack_require__(9126); exports.DecodeStream = __webpack_require__(3030); exports.Array = __webpack_require__(1988); exports.LazyArray = __webpack_require__(6768); exports.Bitfield = __webpack_require__(3425); exports.Boolean = __webpack_require__(9024); exports.Buffer = __webpack_require__(5250); exports.Enum = __webpack_require__(3100); exports.Optional = __webpack_require__(9541); exports.Reserved = __webpack_require__(7468); exports.String = __webpack_require__(1466); exports.Struct = __webpack_require__(1219); exports.VersionedStruct = __webpack_require__(3585); var utils = __webpack_require__(6610); var NumberT = __webpack_require__(6462); var Pointer = __webpack_require__(8011); Object.assign(exports, utils, NumberT, Pointer); /***/ }), /***/ 1988: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; __webpack_require__(7042); __webpack_require__(1539); __webpack_require__(8309); __webpack_require__(1038); __webpack_require__(8783); __webpack_require__(4916); __webpack_require__(2526); __webpack_require__(1817); __webpack_require__(2165); __webpack_require__(6992); __webpack_require__(3948); function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } var _require = __webpack_require__(6462), NumberT = _require.Number; var utils = __webpack_require__(6610); var ArrayT = /*#__PURE__*/function () { function ArrayT(type, length, lengthType) { if (lengthType === void 0) { lengthType = 'count'; } this.type = type; this.length = length; this.lengthType = lengthType; } var _proto = ArrayT.prototype; _proto.decode = function decode(stream, parent) { var length; var pos = stream.pos; var res = []; var ctx = parent; if (this.length != null) { length = utils.resolveLength(this.length, stream, parent); } if (this.length instanceof NumberT) { // define hidden properties Object.defineProperties(res, { parent: { value: parent }, _startOffset: { value: pos }, _currentOffset: { value: 0, writable: true }, _length: { value: length } }); ctx = res; } if (length == null || this.lengthType === 'bytes') { var target = length != null ? stream.pos + length : (parent != null ? parent._length : undefined) ? parent._startOffset + parent._length : stream.length; while (stream.pos < target) { res.push(this.type.decode(stream, ctx)); } } else { for (var i = 0, end = length; i < end; i++) { res.push(this.type.decode(stream, ctx)); } } return res; }; _proto.size = function size(array, ctx) { if (!array) { return this.type.size(null, ctx) * utils.resolveLength(this.length, null, ctx); } var size = 0; if (this.length instanceof NumberT) { size += this.length.size(); ctx = { parent: ctx }; } for (var _iterator = _createForOfIteratorHelperLoose(array), _step; !(_step = _iterator()).done;) { var item = _step.value; size += this.type.size(item, ctx); } return size; }; _proto.encode = function encode(stream, array, parent) { var ctx = parent; if (this.length instanceof NumberT) { ctx = { pointers: [], startOffset: stream.pos, parent: parent }; ctx.pointerOffset = stream.pos + this.size(array, ctx); this.length.encode(stream, array.length); } for (var _iterator2 = _createForOfIteratorHelperLoose(array), _step2; !(_step2 = _iterator2()).done;) { var item = _step2.value; this.type.encode(stream, item, ctx); } if (this.length instanceof NumberT) { var i = 0; while (i < ctx.pointers.length) { var ptr = ctx.pointers[i++]; ptr.type.encode(stream, ptr.val); } } }; return ArrayT; }(); module.exports = ArrayT; /***/ }), /***/ 3425: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; __webpack_require__(2087); var Bitfield = /*#__PURE__*/function () { function Bitfield(type, flags) { if (flags === void 0) { flags = []; } this.type = type; this.flags = flags; } var _proto = Bitfield.prototype; _proto.decode = function decode(stream) { var val = this.type.decode(stream); var res = {}; for (var i = 0; i < this.flags.length; i++) { var flag = this.flags[i]; if (flag != null) { res[flag] = !!(val & 1 << i); } } return res; }; _proto.size = function size() { return this.type.size(); }; _proto.encode = function encode(stream, keys) { var val = 0; for (var i = 0; i < this.flags.length; i++) { var flag = this.flags[i]; if (flag != null) { if (keys[flag]) { val |= 1 << i; } } } return this.type.encode(stream, val); }; return Bitfield; }(); module.exports = Bitfield; /***/ }), /***/ 9024: /***/ (function(module) { "use strict"; var BooleanT = /*#__PURE__*/function () { function BooleanT(type) { this.type = type; } var _proto = BooleanT.prototype; _proto.decode = function decode(stream, parent) { return !!this.type.decode(stream, parent); }; _proto.size = function size(val, parent) { return this.type.size(val, parent); }; _proto.encode = function encode(stream, val, parent) { return this.type.encode(stream, +val, parent); }; return BooleanT; }(); module.exports = BooleanT; /***/ }), /***/ 5250: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var utils = __webpack_require__(6610); var _require = __webpack_require__(6462), NumberT = _require.Number; var BufferT = /*#__PURE__*/function () { function BufferT(length) { this.length = length; } var _proto = BufferT.prototype; _proto.decode = function decode(stream, parent) { var length = utils.resolveLength(this.length, stream, parent); return stream.readBuffer(length); }; _proto.size = function size(val, parent) { if (!val) { return utils.resolveLength(this.length, null, parent); } return val.length; }; _proto.encode = function encode(stream, buf, parent) { if (this.length instanceof NumberT) { this.length.encode(stream, buf.length); } return stream.writeBuffer(buf); }; return BufferT; }(); module.exports = BufferT; /***/ }), /***/ 3030: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; /* provided dependency */ var Buffer = __webpack_require__(8823)["Buffer"]; __webpack_require__(1539); __webpack_require__(9714); __webpack_require__(7042); __webpack_require__(4916); __webpack_require__(5306); var iconv; try { iconv = __webpack_require__(4914); } catch (error) {} var DecodeStream = /*#__PURE__*/function () { function DecodeStream(buffer) { this.buffer = buffer; this.pos = 0; this.length = this.buffer.length; } var _proto = DecodeStream.prototype; _proto.readString = function readString(length, encoding) { if (encoding === void 0) { encoding = 'ascii'; } switch (encoding) { case 'utf16le': case 'ucs2': case 'utf8': case 'ascii': return this.buffer.toString(encoding, this.pos, this.pos += length); case 'utf16be': var buf = Buffer.from(this.readBuffer(length)); // swap the bytes for (var i = 0, end = buf.length - 1; i < end; i += 2) { var byte = buf[i]; buf[i] = buf[i + 1]; buf[i + 1] = byte; } return buf.toString('utf16le'); default: buf = this.readBuffer(length); if (iconv) { try { return iconv.decode(buf, encoding); } catch (error1) {} } return buf; } }; _proto.readBuffer = function readBuffer(length) { return this.buffer.slice(this.pos, this.pos += length); }; _proto.readUInt24BE = function readUInt24BE() { return (this.readUInt16BE() << 8) + this.readUInt8(); }; _proto.readUInt24LE = function readUInt24LE() { return this.readUInt16LE() + (this.readUInt8() << 16); }; _proto.readInt24BE = function readInt24BE() { return (this.readInt16BE() << 8) + this.readUInt8(); }; _proto.readInt24LE = function readInt24LE() { return this.readUInt16LE() + (this.readInt8() << 16); }; return DecodeStream; }(); DecodeStream.TYPES = { UInt8: 1, UInt16: 2, UInt24: 3, UInt32: 4, Int8: 1, Int16: 2, Int24: 3, Int32: 4, Float: 4, Double: 8 }; var _loop = function _loop(key) { if (key.slice(0, 4) === 'read') { var bytes = DecodeStream.TYPES[key.replace(/read|[BL]E/g, '')]; DecodeStream.prototype[key] = function () { var ret = this.buffer[key](this.pos); this.pos += bytes; return ret; }; } }; for (var key in Buffer.prototype) { _loop(key); } module.exports = DecodeStream; /***/ }), /***/ 9126: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; /* provided dependency */ var Buffer = __webpack_require__(8823)["Buffer"]; __webpack_require__(7042); __webpack_require__(3290); __webpack_require__(4916); __webpack_require__(5306); function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } var iconv; var stream = __webpack_require__(2830); var DecodeStream = __webpack_require__(3030); try { iconv = __webpack_require__(4914); } catch (error) {} var EncodeStream = /*#__PURE__*/function (_stream$Readable) { _inheritsLoose(EncodeStream, _stream$Readable); function EncodeStream(bufferSize) { var _this; if (bufferSize === void 0) { bufferSize = 65536; } _this = _stream$Readable.apply(this, arguments) || this; _this.buffer = Buffer.alloc(bufferSize); _this.bufferOffset = 0; _this.pos = 0; return _this; } // do nothing, required by node var _proto = EncodeStream.prototype; _proto._read = function _read() {}; _proto.ensure = function ensure(bytes) { if (this.bufferOffset + bytes > this.buffer.length) { return this.flush(); } }; _proto.flush = function flush() { if (this.bufferOffset > 0) { this.push(Buffer.from(this.buffer.slice(0, this.bufferOffset))); return this.bufferOffset = 0; } }; _proto.writeBuffer = function writeBuffer(buffer) { this.flush(); this.push(buffer); return this.pos += buffer.length; }; _proto.writeString = function writeString(string, encoding) { if (encoding === void 0) { encoding = 'ascii'; } switch (encoding) { case 'utf16le': case 'ucs2': case 'utf8': case 'ascii': return this.writeBuffer(Buffer.from(string, encoding)); case 'utf16be': var buf = Buffer.from(string, 'utf16le'); // swap the bytes for (var i = 0, end = buf.length - 1; i < end; i += 2) { var byte = buf[i]; buf[i] = buf[i + 1]; buf[i + 1] = byte; } return this.writeBuffer(buf); default: if (iconv) { return this.writeBuffer(iconv.encode(string, encoding)); } else { throw new Error('Install iconv-lite to enable additional string encodings.'); } } }; _proto.writeUInt24BE = function writeUInt24BE(val) { this.ensure(3); this.buffer[this.bufferOffset++] = val >>> 16 & 0xff; this.buffer[this.bufferOffset++] = val >>> 8 & 0xff; this.buffer[this.bufferOffset++] = val & 0xff; return this.pos += 3; }; _proto.writeUInt24LE = function writeUInt24LE(val) { this.ensure(3); this.buffer[this.bufferOffset++] = val & 0xff; this.buffer[this.bufferOffset++] = val >>> 8 & 0xff; this.buffer[this.bufferOffset++] = val >>> 16 & 0xff; return this.pos += 3; }; _proto.writeInt24BE = function writeInt24BE(val) { if (val >= 0) { return this.writeUInt24BE(val); } else { return this.writeUInt24BE(val + 0xffffff + 1); } }; _proto.writeInt24LE = function writeInt24LE(val) { if (val >= 0) { return this.writeUInt24LE(val); } else { return this.writeUInt24LE(val + 0xffffff + 1); } }; _proto.fill = function fill(val, length) { if (length < this.buffer.length) { this.ensure(length); this.buffer.fill(val, this.bufferOffset, this.bufferOffset + length); this.bufferOffset += length; return this.pos += length; } else { var buf = Buffer.alloc(length); buf.fill(val); return this.writeBuffer(buf); } }; _proto.end = function end() { this.flush(); return this.push(null); }; return EncodeStream; }(stream.Readable); var _loop = function _loop(key) { if (key.slice(0, 5) === 'write') { var bytes = +DecodeStream.TYPES[key.replace(/write|[BL]E/g, '')]; EncodeStream.prototype[key] = function (value) { this.ensure(bytes); this.buffer[key](value, this.bufferOffset); this.bufferOffset += bytes; return this.pos += bytes; }; } }; for (var key in Buffer.prototype) { _loop(key); } module.exports = EncodeStream; /***/ }), /***/ 3100: /***/ (function(module) { "use strict"; var Enum = /*#__PURE__*/function () { function Enum(type, options) { if (options === void 0) { options = []; } this.type = type; this.options = options; } var _proto = Enum.prototype; _proto.decode = function decode(stream) { var index = this.type.decode(stream); return this.options[index] || index; }; _proto.size = function size() { return this.type.size(); }; _proto.encode = function encode(stream, val) { var index = this.options.indexOf(val); if (index === -1) { throw new Error("Unknown option in enum: " + val); } return this.type.encode(stream, index); }; return Enum; }(); module.exports = Enum; /***/ }), /***/ 6768: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; __webpack_require__(1539); __webpack_require__(8674); function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } var ArrayT = __webpack_require__(1988); var _require = __webpack_require__(6462), NumberT = _require.Number; var utils = __webpack_require__(6610); var _require2 = __webpack_require__(9539), _inspect = _require2.inspect; var LazyArrayT = /*#__PURE__*/function (_ArrayT) { _inheritsLoose(LazyArrayT, _ArrayT); function LazyArrayT() { return _ArrayT.apply(this, arguments) || this; } var _proto = LazyArrayT.prototype; _proto.decode = function decode(stream, parent) { var pos = stream.pos; var length = utils.resolveLength(this.length, stream, parent); if (this.length instanceof NumberT) { parent = { parent: parent, _startOffset: pos, _currentOffset: 0, _length: length }; } var res = new LazyArray(this.type, length, stream, parent); stream.pos += length * this.type.size(null, parent); return res; }; _proto.size = function size(val, ctx) { if (val instanceof LazyArray) { val = val.toArray(); } return _ArrayT.prototype.size.call(this, val, ctx); }; _proto.encode = function encode(stream, val, ctx) { if (val instanceof LazyArray) { val = val.toArray(); } return _ArrayT.prototype.encode.call(this, stream, val, ctx); }; return LazyArrayT; }(ArrayT); var LazyArray = /*#__PURE__*/function () { function LazyArray(type, length, stream, ctx) { this.type = type; this.length = length; this.stream = stream; this.ctx = ctx; this.base = this.stream.pos; this.items = []; } var _proto2 = LazyArray.prototype; _proto2.get = function get(index) { if (index < 0 || index >= this.length) { return undefined; } if (this.items[index] == null) { var pos = this.stream.pos; this.stream.pos = this.base + this.type.size(null, this.ctx) * index; this.items[index] = this.type.decode(this.stream, this.ctx); this.stream.pos = pos; } return this.items[index]; }; _proto2.toArray = function toArray() { var result = []; for (var i = 0, end = this.length; i < end; i++) { result.push(this.get(i)); } return result; }; _proto2.inspect = function inspect() { return _inspect(this.toArray()); }; return LazyArray; }(); module.exports = LazyArrayT; /***/ }), /***/ 6462: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } var DecodeStream = __webpack_require__(3030); var NumberT = /*#__PURE__*/function () { function NumberT(type, endian) { if (endian === void 0) { endian = 'BE'; } this.type = type; this.endian = endian; this.fn = this.type; if (this.type[this.type.length - 1] !== '8') { this.fn += this.endian; } } var _proto = NumberT.prototype; _proto.size = function size() { return DecodeStream.TYPES[this.type]; }; _proto.decode = function decode(stream) { return stream["read" + this.fn](); }; _proto.encode = function encode(stream, val) { return stream["write" + this.fn](val); }; return NumberT; }(); exports.Number = NumberT; exports.uint8 = new NumberT('UInt8'); exports.uint16be = exports.uint16 = new NumberT('UInt16', 'BE'); exports.uint16le = new NumberT('UInt16', 'LE'); exports.uint24be = exports.uint24 = new NumberT('UInt24', 'BE'); exports.uint24le = new NumberT('UInt24', 'LE'); exports.uint32be = exports.uint32 = new NumberT('UInt32', 'BE'); exports.uint32le = new NumberT('UInt32', 'LE'); exports.int8 = new NumberT('Int8'); exports.int16be = exports.int16 = new NumberT('Int16', 'BE'); exports.int16le = new NumberT('Int16', 'LE'); exports.int24be = exports.int24 = new NumberT('Int24', 'BE'); exports.int24le = new NumberT('Int24', 'LE'); exports.int32be = exports.int32 = new NumberT('Int32', 'BE'); exports.int32le = new NumberT('Int32', 'LE'); exports.floatbe = exports.float = new NumberT('Float', 'BE'); exports.floatle = new NumberT('Float', 'LE'); exports.doublebe = exports.double = new NumberT('Double', 'BE'); exports.doublele = new NumberT('Double', 'LE'); var Fixed = /*#__PURE__*/function (_NumberT) { _inheritsLoose(Fixed, _NumberT); function Fixed(size, endian, fracBits) { var _this; if (fracBits === void 0) { fracBits = size >> 1; } _this = _NumberT.call(this, "Int" + size, endian) || this; _this._point = 1 << fracBits; return _this; } var _proto2 = Fixed.prototype; _proto2.decode = function decode(stream) { return _NumberT.prototype.decode.call(this, stream) / this._point; }; _proto2.encode = function encode(stream, val) { return _NumberT.prototype.encode.call(this, stream, val * this._point | 0); }; return Fixed; }(NumberT); exports.Fixed = Fixed; exports.fixed16be = exports.fixed16 = new Fixed(16, 'BE'); exports.fixed16le = new Fixed(16, 'LE'); exports.fixed32be = exports.fixed32 = new Fixed(32, 'BE'); exports.fixed32le = new Fixed(32, 'LE'); /***/ }), /***/ 9541: /***/ (function(module) { "use strict"; var Optional = /*#__PURE__*/function () { function Optional(type, condition) { if (condition === void 0) { condition = true; } this.type = type; this.condition = condition; } var _proto = Optional.prototype; _proto.decode = function decode(stream, parent) { var condition = this.condition; if (typeof condition === 'function') { condition = condition.call(parent, parent); } if (condition) { return this.type.decode(stream, parent); } }; _proto.size = function size(val, parent) { var condition = this.condition; if (typeof condition === 'function') { condition = condition.call(parent, parent); } if (condition) { return this.type.size(val, parent); } else { return 0; } }; _proto.encode = function encode(stream, val, parent) { var condition = this.condition; if (typeof condition === 'function') { condition = condition.call(parent, parent); } if (condition) { return this.type.encode(stream, val, parent); } }; return Optional; }(); module.exports = Optional; /***/ }), /***/ 8011: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var utils = __webpack_require__(6610); var Pointer = /*#__PURE__*/function () { function Pointer(offsetType, type, options) { if (options === void 0) { options = {}; } this.offsetType = offsetType; this.type = type; this.options = options; if (this.type === 'void') { this.type = null; } if (this.options.type == null) { this.options.type = 'local'; } if (this.options.allowNull == null) { this.options.allowNull = true; } if (this.options.nullValue == null) { this.options.nullValue = 0; } if (this.options.lazy == null) { this.options.lazy = false; } if (this.options.relativeTo) { if (typeof this.options.relativeTo !== 'function') { throw new Error('relativeTo option must be a function'); } this.relativeToGetter = options.relativeTo; } } var _proto = Pointer.prototype; _proto.decode = function decode(stream, ctx) { var _this = this; var offset = this.offsetType.decode(stream, ctx); // handle NULL pointers if (offset === this.options.nullValue && this.options.allowNull) { return null; } var relative; switch (this.options.type) { case 'local': relative = ctx._startOffset; break; case 'immediate': relative = stream.pos - this.offsetType.size(); break; case 'parent': relative = ctx.parent._startOffset; break; default: var c = ctx; while (c.parent) { c = c.parent; } relative = c._startOffset || 0; } if (this.options.relativeTo) { relative += this.relativeToGetter(ctx); } var ptr = offset + relative; if (this.type != null) { var val = null; var decodeValue = function decodeValue() { if (val != null) { return val; } var pos = stream.pos; stream.pos = ptr; val = _this.type.decode(stream, ctx); stream.pos = pos; return val; }; // If this is a lazy pointer, define a getter to decode only when needed. // This obviously only works when the pointer is contained by a Struct. if (this.options.lazy) { return new utils.PropertyDescriptor({ get: decodeValue }); } return decodeValue(); } else { return ptr; } }; _proto.size = function size(val, ctx) { var parent = ctx; switch (this.options.type) { case 'local': case 'immediate': break; case 'parent': ctx = ctx.parent; break; default: // global while (ctx.parent) { ctx = ctx.parent; } } var type = this.type; if (type == null) { if (!(val instanceof VoidPointer)) { throw new Error("Must be a VoidPointer"); } var _val = val; type = _val.type; val = val.value; } if (val && ctx) { ctx.pointerSize += type.size(val, parent); } return this.offsetType.size(); }; _proto.encode = function encode(stream, val, ctx) { var relative; var parent = ctx; if (val == null) { this.offsetType.encode(stream, this.options.nullValue); return; } switch (this.options.type) { case 'local': relative = ctx.startOffset; break; case 'immediate': relative = stream.pos + this.offsetType.size(val, parent); break; case 'parent': ctx = ctx.parent; relative = ctx.startOffset; break; default: // global relative = 0; while (ctx.parent) { ctx = ctx.parent; } } if (this.options.relativeTo) { relative += this.relativeToGetter(parent.val); } this.offsetType.encode(stream, ctx.pointerOffset - relative); var type = this.type; if (type == null) { if (!(val instanceof VoidPointer)) { throw new Error("Must be a VoidPointer"); } var _val2 = val; type = _val2.type; val = val.value; } ctx.pointers.push({ type: type, val: val, parent: parent }); return ctx.pointerOffset += type.size(val, parent); }; return Pointer; }(); // A pointer whose type is determined at decode time var VoidPointer = function VoidPointer(type, value) { this.type = type; this.value = value; }; exports.Pointer = Pointer; exports.VoidPointer = VoidPointer; /***/ }), /***/ 7468: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; __webpack_require__(3290); var utils = __webpack_require__(6610); var Reserved = /*#__PURE__*/function () { function Reserved(type, count) { if (count === void 0) { count = 1; } this.type = type; this.count = count; } var _proto = Reserved.prototype; _proto.decode = function decode(stream, parent) { stream.pos += this.size(null, parent); return undefined; }; _proto.size = function size(data, parent) { var count = utils.resolveLength(this.count, null, parent); return this.type.size() * count; }; _proto.encode = function encode(stream, val, parent) { return stream.fill(0, this.size(val, parent)); }; return Reserved; }(); module.exports = Reserved; /***/ }), /***/ 1466: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; /* provided dependency */ var Buffer = __webpack_require__(8823)["Buffer"]; var _require = __webpack_require__(6462), NumberT = _require.Number; var utils = __webpack_require__(6610); var StringT = /*#__PURE__*/function () { function StringT(length, encoding) { if (encoding === void 0) { encoding = 'ascii'; } this.length = length; this.encoding = encoding; } var _proto = StringT.prototype; _proto.decode = function decode(stream, parent) { var length, pos; if (this.length != null) { length = utils.resolveLength(this.length, stream, parent); } else { var buffer; buffer = stream.buffer; length = stream.length; pos = stream.pos; while (pos < length && buffer[pos] !== 0x00) { ++pos; } length = pos - stream.pos; } var encoding = this.encoding; if (typeof encoding === 'function') { encoding = encoding.call(parent, parent) || 'ascii'; } var string = stream.readString(length, encoding); if (this.length == null && stream.pos < stream.length) { stream.pos++; } return string; }; _proto.size = function size(val, parent) { // Use the defined value if no value was given if (!val) { return utils.resolveLength(this.length, null, parent); } var encoding = this.encoding; if (typeof encoding === 'function') { encoding = encoding.call(parent != null ? parent.val : undefined, parent != null ? parent.val : undefined) || 'ascii'; } if (encoding === 'utf16be') { encoding = 'utf16le'; } var size = Buffer.byteLength(val, encoding); if (this.length instanceof NumberT) { size += this.length.size(); } if (this.length == null) { size++; } return size; }; _proto.encode = function encode(stream, val, parent) { var encoding = this.encoding; if (typeof encoding === 'function') { encoding = encoding.call(parent != null ? parent.val : undefined, parent != null ? parent.val : undefined) || 'ascii'; } if (this.length instanceof NumberT) { this.length.encode(stream, Buffer.byteLength(val, encoding)); } stream.writeString(val, encoding); if (this.length == null) { return stream.writeUInt8(0x00); } }; return StringT; }(); module.exports = StringT; /***/ }), /***/ 1219: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var utils = __webpack_require__(6610); var Struct = /*#__PURE__*/function () { function Struct(fields) { if (fields === void 0) { fields = {}; } this.fields = fields; } var _proto = Struct.prototype; _proto.decode = function decode(stream, parent, length) { if (length === void 0) { length = 0; } var res = this._setup(stream, parent, length); this._parseFields(stream, res, this.fields); if (this.process != null) { this.process.call(res, stream); } return res; }; _proto._setup = function _setup(stream, parent, length) { var res = {}; // define hidden properties Object.defineProperties(res, { parent: { value: parent }, _startOffset: { value: stream.pos }, _currentOffset: { value: 0, writable: true }, _length: { value: length } }); return res; }; _proto._parseFields = function _parseFields(stream, res, fields) { for (var key in fields) { var val; var type = fields[key]; if (typeof type === 'function') { val = type.call(res, res); } else { val = type.decode(stream, res); } if (val !== undefined) { if (val instanceof utils.PropertyDescriptor) { Object.defineProperty(res, key, val); } else { res[key] = val; } } res._currentOffset = stream.pos - res._startOffset; } }; _proto.size = function size(val, parent, includePointers) { if (val == null) { val = {}; } if (includePointers == null) { includePointers = true; } var ctx = { parent: parent, val: val, pointerSize: 0 }; var size = 0; for (var key in this.fields) { var type = this.fields[key]; if (type.size != null) { size += type.size(val[key], ctx); } } if (includePointers) { size += ctx.pointerSize; } return size; }; _proto.encode = function encode(stream, val, parent) { var type; if (this.preEncode != null) { this.preEncode.call(val, stream); } var ctx = { pointers: [], startOffset: stream.pos, parent: parent, val: val, pointerSize: 0 }; ctx.pointerOffset = stream.pos + this.size(val, ctx, false); for (var key in this.fields) { type = this.fields[key]; if (type.encode != null) { type.encode(stream, val[key], ctx); } } var i = 0; while (i < ctx.pointers.length) { var ptr = ctx.pointers[i++]; ptr.type.encode(stream, ptr.val, ptr.parent); } }; return Struct; }(); module.exports = Struct; /***/ }), /***/ 3585: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; __webpack_require__(1539); __webpack_require__(4916); __webpack_require__(3123); function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } var Struct = __webpack_require__(1219); var getPath = function getPath(object, pathArray) { return pathArray.reduce(function (prevObj, key) { return prevObj && prevObj[key]; }, object); }; var VersionedStruct = /*#__PURE__*/function (_Struct) { _inheritsLoose(VersionedStruct, _Struct); function VersionedStruct(type, versions) { var _this; if (versions === void 0) { versions = {}; } _this = _Struct.call(this) || this; _this.type = type; _this.versions = versions; if (typeof type === 'string') { _this.versionPath = type.split('.'); } return _this; } var _proto = VersionedStruct.prototype; _proto.decode = function decode(stream, parent, length) { if (length === void 0) { length = 0; } var res = this._setup(stream, parent, length); if (typeof this.type === 'string') { res.version = getPath(parent, this.versionPath); } else { res.version = this.type.decode(stream); } if (this.versions.header) { this._parseFields(stream, res, this.versions.header); } var fields = this.versions[res.version]; if (fields == null) { throw new Error("Unknown version " + res.version); } if (fields instanceof VersionedStruct) { return fields.decode(stream, parent); } this._parseFields(stream, res, fields); if (this.process != null) { this.process.call(res, stream); } return res; }; _proto.size = function size(val, parent, includePointers) { if (includePointers === void 0) { includePointers = true; } var key, type; if (!val) { throw new Error('Not a fixed size'); } var ctx = { parent: parent, val: val, pointerSize: 0 }; var size = 0; if (typeof this.type !== 'string') { size += this.type.size(val.version, ctx); } if (this.versions.header) { for (key in this.versions.header) { type = this.versions.header[key]; if (type.size != null) { size += type.size(val[key], ctx); } } } var fields = this.versions[val.version]; if (fields == null) { throw new Error("Unknown version " + val.version); } for (key in fields) { type = fields[key]; if (type.size != null) { size += type.size(val[key], ctx); } } if (includePointers) { size += ctx.pointerSize; } return size; }; _proto.encode = function encode(stream, val, parent) { var key, type; if (this.preEncode != null) { this.preEncode.call(val, stream); } var ctx = { pointers: [], startOffset: stream.pos, parent: parent, val: val, pointerSize: 0 }; ctx.pointerOffset = stream.pos + this.size(val, ctx, false); if (typeof this.type !== 'string') { this.type.encode(stream, val.version); } if (this.versions.header) { for (key in this.versions.header) { type = this.versions.header[key]; if (type.encode != null) { type.encode(stream, val[key], ctx); } } } var fields = this.versions[val.version]; for (key in fields) { type = fields[key]; if (type.encode != null) { type.encode(stream, val[key], ctx); } } var i = 0; while (i < ctx.pointers.length) { var ptr = ctx.pointers[i++]; ptr.type.encode(stream, ptr.val, ptr.parent); } }; return VersionedStruct; }(Struct); module.exports = VersionedStruct; /***/ }), /***/ 6610: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var _require = __webpack_require__(6462), NumberT = _require.Number; exports.resolveLength = function (length, stream, parent) { var res; if (typeof length === 'number') { res = length; } else if (typeof length === 'function') { res = length.call(parent, parent); } else if (parent && typeof length === 'string') { res = parent[length]; } else if (stream && length instanceof NumberT) { res = length.decode(stream); } if (isNaN(res)) { throw new Error('Not a fixed size'); } return res; }; var PropertyDescriptor = function PropertyDescriptor(opts) { if (opts === void 0) { opts = {}; } this.enumerable = true; this.configurable = true; for (var key in opts) { var val = opts[key]; this[key] = val; } }; exports.PropertyDescriptor = PropertyDescriptor; /***/ }), /***/ 8823: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */ /* eslint-disable no-proto */ __webpack_require__(2526); __webpack_require__(1817); __webpack_require__(1539); __webpack_require__(6992); __webpack_require__(2472); __webpack_require__(2990); __webpack_require__(8927); __webpack_require__(3105); __webpack_require__(5035); __webpack_require__(4345); __webpack_require__(7174); __webpack_require__(2846); __webpack_require__(4731); __webpack_require__(7209); __webpack_require__(6319); __webpack_require__(8867); __webpack_require__(7789); __webpack_require__(3739); __webpack_require__(9368); __webpack_require__(4483); __webpack_require__(2056); __webpack_require__(3462); __webpack_require__(678); __webpack_require__(7462); __webpack_require__(3824); __webpack_require__(5021); __webpack_require__(2974); __webpack_require__(5016); __webpack_require__(7803); __webpack_require__(6649); __webpack_require__(6078); __webpack_require__(3290); __webpack_require__(7042); __webpack_require__(2222); __webpack_require__(9714); __webpack_require__(3210); __webpack_require__(4916); __webpack_require__(5306); __webpack_require__(6699); __webpack_require__(2023); __webpack_require__(9653); __webpack_require__(3753); __webpack_require__(545); __webpack_require__(8309); __webpack_require__(3161); __webpack_require__(3123); function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } var base64 = __webpack_require__(9742); var ieee754 = __webpack_require__(645); var customInspectSymbol = typeof Symbol === 'function' && typeof Symbol['for'] === 'function' // eslint-disable-line dot-notation ? Symbol['for']('nodejs.util.inspect.custom') // eslint-disable-line dot-notation : null; exports.Buffer = Buffer; exports.SlowBuffer = SlowBuffer; exports.INSPECT_MAX_BYTES = 50; var K_MAX_LENGTH = 0x7fffffff; exports.kMaxLength = K_MAX_LENGTH; /** * If `Buffer.TYPED_ARRAY_SUPPORT`: * === true Use Uint8Array implementation (fastest) * === false Print warning and recommend using `buffer` v4.x which has an Object * implementation (most compatible, even IE6) * * Browsers that support typed arrays are IE 10+, Firefox 4+, Chrome 7+, Safari 5.1+, * Opera 11.6+, iOS 4.2+. * * We report that the browser does not support typed arrays if the are not subclassable * using __proto__. Firefox 4-29 lacks support for adding new properties to `Uint8Array` * (See: https://bugzilla.mozilla.org/show_bug.cgi?id=695438). IE 10 lacks support * for __proto__ and has a buggy typed array implementation. */ Buffer.TYPED_ARRAY_SUPPORT = typedArraySupport(); if (!Buffer.TYPED_ARRAY_SUPPORT && typeof console !== 'undefined' && typeof console.error === 'function') { console.error('This browser lacks typed array (Uint8Array) support which is required by ' + '`buffer` v5.x. Use `buffer` v4.x if you require old browser support.'); } function typedArraySupport() { // Can typed array instances can be augmented? try { var arr = new Uint8Array(1); var proto = { foo: function foo() { return 42; } }; Object.setPrototypeOf(proto, Uint8Array.prototype); Object.setPrototypeOf(arr, proto); return arr.foo() === 42; } catch (e) { return false; } } Object.defineProperty(Buffer.prototype, 'parent', { enumerable: true, get: function get() { if (!Buffer.isBuffer(this)) return undefined; return this.buffer; } }); Object.defineProperty(Buffer.prototype, 'offset', { enumerable: true, get: function get() { if (!Buffer.isBuffer(this)) return undefined; return this.byteOffset; } }); function createBuffer(length) { if (length > K_MAX_LENGTH) { throw new RangeError('The value "' + length + '" is invalid for option "size"'); } // Return an augmented `Uint8Array` instance var buf = new Uint8Array(length); Object.setPrototypeOf(buf, Buffer.prototype); return buf; } /** * The Buffer constructor returns instances of `Uint8Array` that have their * prototype changed to `Buffer.prototype`. Furthermore, `Buffer` is a subclass of * `Uint8Array`, so the returned instances will have all the node `Buffer` methods * and the `Uint8Array` methods. Square bracket notation works as expected -- it * returns a single octet. * * The `Uint8Array` prototype remains unmodified. */ function Buffer(arg, encodingOrOffset, length) { // Common case. if (typeof arg === 'number') { if (typeof encodingOrOffset === 'string') { throw new TypeError('The "string" argument must be of type string. Received type number'); } return allocUnsafe(arg); } return from(arg, encodingOrOffset, length); } Buffer.poolSize = 8192; // not used by this implementation function from(value, encodingOrOffset, length) { if (typeof value === 'string') { return fromString(value, encodingOrOffset); } if (ArrayBuffer.isView(value)) { return fromArrayView(value); } if (value == null) { throw new TypeError('The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + 'or Array-like Object. Received type ' + typeof value); } if (isInstance(value, ArrayBuffer) || value && isInstance(value.buffer, ArrayBuffer)) { return fromArrayBuffer(value, encodingOrOffset, length); } if (typeof SharedArrayBuffer !== 'undefined' && (isInstance(value, SharedArrayBuffer) || value && isInstance(value.buffer, SharedArrayBuffer))) { return fromArrayBuffer(value, encodingOrOffset, length); } if (typeof value === 'number') { throw new TypeError('The "value" argument must not be of type number. Received type number'); } var valueOf = value.valueOf && value.valueOf(); if (valueOf != null && valueOf !== value) { return Buffer.from(valueOf, encodingOrOffset, length); } var b = fromObject(value); if (b) return b; if (typeof Symbol !== 'undefined' && Symbol.toPrimitive != null && typeof value[Symbol.toPrimitive] === 'function') { return Buffer.from(value[Symbol.toPrimitive]('string'), encodingOrOffset, length); } throw new TypeError('The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' + 'or Array-like Object. Received type ' + typeof value); } /** * Functionally equivalent to Buffer(arg, encoding) but throws a TypeError * if value is a number. * Buffer.from(str[, encoding]) * Buffer.from(array) * Buffer.from(buffer) * Buffer.from(arrayBuffer[, byteOffset[, length]]) **/ Buffer.from = function (value, encodingOrOffset, length) { return from(value, encodingOrOffset, length); }; // Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug: // https://github.com/feross/buffer/pull/148 Object.setPrototypeOf(Buffer.prototype, Uint8Array.prototype); Object.setPrototypeOf(Buffer, Uint8Array); function assertSize(size) { if (typeof size !== 'number') { throw new TypeError('"size" argument must be of type number'); } else if (size < 0) { throw new RangeError('The value "' + size + '" is invalid for option "size"'); } } function alloc(size, fill, encoding) { assertSize(size); if (size <= 0) { return createBuffer(size); } if (fill !== undefined) { // Only pay attention to encoding if it's a string. This // prevents accidentally sending in a number that would // be interpreted as a start offset. return typeof encoding === 'string' ? createBuffer(size).fill(fill, encoding) : createBuffer(size).fill(fill); } return createBuffer(size); } /** * Creates a new filled Buffer instance. * alloc(size[, fill[, encoding]]) **/ Buffer.alloc = function (size, fill, encoding) { return alloc(size, fill, encoding); }; function allocUnsafe(size) { assertSize(size); return createBuffer(size < 0 ? 0 : checked(size) | 0); } /** * Equivalent to Buffer(num), by default creates a non-zero-filled Buffer instance. * */ Buffer.allocUnsafe = function (size) { return allocUnsafe(size); }; /** * Equivalent to SlowBuffer(num), by default creates a non-zero-filled Buffer instance. */ Buffer.allocUnsafeSlow = function (size) { return allocUnsafe(size); }; function fromString(string, encoding) { if (typeof encoding !== 'string' || encoding === '') { encoding = 'utf8'; } if (!Buffer.isEncoding(encoding)) { throw new TypeError('Unknown encoding: ' + encoding); } var length = byteLength(string, encoding) | 0; var buf = createBuffer(length); var actual = buf.write(string, encoding); if (actual !== length) { // Writing a hex string, for example, that contains invalid characters will // cause everything after the first invalid character to be ignored. (e.g. // 'abxxcd' will be treated as 'ab') buf = buf.slice(0, actual); } return buf; } function fromArrayLike(array) { var length = array.length < 0 ? 0 : checked(array.length) | 0; var buf = createBuffer(length); for (var i = 0; i < length; i += 1) { buf[i] = array[i] & 255; } return buf; } function fromArrayView(arrayView) { if (isInstance(arrayView, Uint8Array)) { var copy = new Uint8Array(arrayView); return fromArrayBuffer(copy.buffer, copy.byteOffset, copy.byteLength); } return fromArrayLike(arrayView); } function fromArrayBuffer(array, byteOffset, length) { if (byteOffset < 0 || array.byteLength < byteOffset) { throw new RangeError('"offset" is outside of buffer bounds'); } if (array.byteLength < byteOffset + (length || 0)) { throw new RangeError('"length" is outside of buffer bounds'); } var buf; if (byteOffset === undefined && length === undefined) { buf = new Uint8Array(array); } else if (length === undefined) { buf = new Uint8Array(array, byteOffset); } else { buf = new Uint8Array(array, byteOffset, length); } // Return an augmented `Uint8Array` instance Object.setPrototypeOf(buf, Buffer.prototype); return buf; } function fromObject(obj) { if (Buffer.isBuffer(obj)) { var len = checked(obj.length) | 0; var buf = createBuffer(len); if (buf.length === 0) { return buf; } obj.copy(buf, 0, 0, len); return buf; } if (obj.length !== undefined) { if (typeof obj.length !== 'number' || numberIsNaN(obj.length)) { return createBuffer(0); } return fromArrayLike(obj); } if (obj.type === 'Buffer' && Array.isArray(obj.data)) { return fromArrayLike(obj.data); } } function checked(length) { // Note: cannot use `length < K_MAX_LENGTH` here because that fails when // length is NaN (which is otherwise coerced to zero.) if (length >= K_MAX_LENGTH) { throw new RangeError('Attempt to allocate Buffer larger than maximum ' + 'size: 0x' + K_MAX_LENGTH.toString(16) + ' bytes'); } return length | 0; } function SlowBuffer(length) { if (+length != length) { // eslint-disable-line eqeqeq length = 0; } return Buffer.alloc(+length); } Buffer.isBuffer = function isBuffer(b) { return b != null && b._isBuffer === true && b !== Buffer.prototype; // so Buffer.isBuffer(Buffer.prototype) will be false }; Buffer.compare = function compare(a, b) { if (isInstance(a, Uint8Array)) a = Buffer.from(a, a.offset, a.byteLength); if (isInstance(b, Uint8Array)) b = Buffer.from(b, b.offset, b.byteLength); if (!Buffer.isBuffer(a) || !Buffer.isBuffer(b)) { throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array'); } if (a === b) return 0; var x = a.length; var y = b.length; for (var i = 0, len = Math.min(x, y); i < len; ++i) { if (a[i] !== b[i]) { x = a[i]; y = b[i]; break; } } if (x < y) return -1; if (y < x) return 1; return 0; }; Buffer.isEncoding = function isEncoding(encoding) { switch (String(encoding).toLowerCase()) { case 'hex': case 'utf8': case 'utf-8': case 'ascii': case 'latin1': case 'binary': case 'base64': case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': return true; default: return false; } }; Buffer.concat = function concat(list, length) { if (!Array.isArray(list)) { throw new TypeError('"list" argument must be an Array of Buffers'); } if (list.length === 0) { return Buffer.alloc(0); } var i; if (length === undefined) { length = 0; for (i = 0; i < list.length; ++i) { length += list[i].length; } } var buffer = Buffer.allocUnsafe(length); var pos = 0; for (i = 0; i < list.length; ++i) { var buf = list[i]; if (isInstance(buf, Uint8Array)) { if (pos + buf.length > buffer.length) { if (!Buffer.isBuffer(buf)) buf = Buffer.from(buf); buf.copy(buffer, pos); } else { Uint8Array.prototype.set.call(buffer, buf, pos); } } else if (!Buffer.isBuffer(buf)) { throw new TypeError('"list" argument must be an Array of Buffers'); } else { buf.copy(buffer, pos); } pos += buf.length; } return buffer; }; function byteLength(string, encoding) { if (Buffer.isBuffer(string)) { return string.length; } if (ArrayBuffer.isView(string) || isInstance(string, ArrayBuffer)) { return string.byteLength; } if (typeof string !== 'string') { throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. ' + 'Received type ' + typeof string); } var len = string.length; var mustMatch = arguments.length > 2 && arguments[2] === true; if (!mustMatch && len === 0) return 0; // Use a for loop to avoid recursion var loweredCase = false; for (;;) { switch (encoding) { case 'ascii': case 'latin1': case 'binary': return len; case 'utf8': case 'utf-8': return utf8ToBytes(string).length; case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': return len * 2; case 'hex': return len >>> 1; case 'base64': return base64ToBytes(string).length; default: if (loweredCase) { return mustMatch ? -1 : utf8ToBytes(string).length; // assume utf8 } encoding = ('' + encoding).toLowerCase(); loweredCase = true; } } } Buffer.byteLength = byteLength; function slowToString(encoding, start, end) { var loweredCase = false; // No need to verify that "this.length <= MAX_UINT32" since it's a read-only // property of a typed array. // This behaves neither like String nor Uint8Array in that we set start/end // to their upper/lower bounds if the value passed is out of range. // undefined is handled specially as per ECMA-262 6th Edition, // Section 13.3.3.7 Runtime Semantics: KeyedBindingInitialization. if (start === undefined || start < 0) { start = 0; } // Return early if start > this.length. Done here to prevent potential uint32 // coercion fail below. if (start > this.length) { return ''; } if (end === undefined || end > this.length) { end = this.length; } if (end <= 0) { return ''; } // Force coercion to uint32. This will also coerce falsey/NaN values to 0. end >>>= 0; start >>>= 0; if (end <= start) { return ''; } if (!encoding) encoding = 'utf8'; while (true) { switch (encoding) { case 'hex': return hexSlice(this, start, end); case 'utf8': case 'utf-8': return utf8Slice(this, start, end); case 'ascii': return asciiSlice(this, start, end); case 'latin1': case 'binary': return latin1Slice(this, start, end); case 'base64': return base64Slice(this, start, end); case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': return utf16leSlice(this, start, end); default: if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding); encoding = (encoding + '').toLowerCase(); loweredCase = true; } } } // This property is used by `Buffer.isBuffer` (and the `is-buffer` npm package) // to detect a Buffer instance. It's not possible to use `instanceof Buffer` // reliably in a browserify context because there could be multiple different // copies of the 'buffer' package in use. This method works even for Buffer // instances that were created from another copy of the `buffer` package. // See: https://github.com/feross/buffer/issues/154 Buffer.prototype._isBuffer = true; function swap(b, n, m) { var i = b[n]; b[n] = b[m]; b[m] = i; } Buffer.prototype.swap16 = function swap16() { var len = this.length; if (len % 2 !== 0) { throw new RangeError('Buffer size must be a multiple of 16-bits'); } for (var i = 0; i < len; i += 2) { swap(this, i, i + 1); } return this; }; Buffer.prototype.swap32 = function swap32() { var len = this.length; if (len % 4 !== 0) { throw new RangeError('Buffer size must be a multiple of 32-bits'); } for (var i = 0; i < len; i += 4) { swap(this, i, i + 3); swap(this, i + 1, i + 2); } return this; }; Buffer.prototype.swap64 = function swap64() { var len = this.length; if (len % 8 !== 0) { throw new RangeError('Buffer size must be a multiple of 64-bits'); } for (var i = 0; i < len; i += 8) { swap(this, i, i + 7); swap(this, i + 1, i + 6); swap(this, i + 2, i + 5); swap(this, i + 3, i + 4); } return this; }; Buffer.prototype.toString = function toString() { var length = this.length; if (length === 0) return ''; if (arguments.length === 0) return utf8Slice(this, 0, length); return slowToString.apply(this, arguments); }; Buffer.prototype.toLocaleString = Buffer.prototype.toString; Buffer.prototype.equals = function equals(b) { if (!Buffer.isBuffer(b)) throw new TypeError('Argument must be a Buffer'); if (this === b) return true; return Buffer.compare(this, b) === 0; }; Buffer.prototype.inspect = function inspect() { var str = ''; var max = exports.INSPECT_MAX_BYTES; str = this.toString('hex', 0, max).replace(/(.{2})/g, '$1 ').trim(); if (this.length > max) str += ' ... '; return ''; }; if (customInspectSymbol) { Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect; } Buffer.prototype.compare = function compare(target, start, end, thisStart, thisEnd) { if (isInstance(target, Uint8Array)) { target = Buffer.from(target, target.offset, target.byteLength); } if (!Buffer.isBuffer(target)) { throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. ' + 'Received type ' + typeof target); } if (start === undefined) { start = 0; } if (end === undefined) { end = target ? target.length : 0; } if (thisStart === undefined) { thisStart = 0; } if (thisEnd === undefined) { thisEnd = this.length; } if (start < 0 || end > target.length || thisStart < 0 || thisEnd > this.length) { throw new RangeError('out of range index'); } if (thisStart >= thisEnd && start >= end) { return 0; } if (thisStart >= thisEnd) { return -1; } if (start >= end) { return 1; } start >>>= 0; end >>>= 0; thisStart >>>= 0; thisEnd >>>= 0; if (this === target) return 0; var x = thisEnd - thisStart; var y = end - start; var len = Math.min(x, y); var thisCopy = this.slice(thisStart, thisEnd); var targetCopy = target.slice(start, end); for (var i = 0; i < len; ++i) { if (thisCopy[i] !== targetCopy[i]) { x = thisCopy[i]; y = targetCopy[i]; break; } } if (x < y) return -1; if (y < x) return 1; return 0; }; // Finds either the first index of `val` in `buffer` at offset >= `byteOffset`, // OR the last index of `val` in `buffer` at offset <= `byteOffset`. // // Arguments: // - buffer - a Buffer to search // - val - a string, Buffer, or number // - byteOffset - an index into `buffer`; will be clamped to an int32 // - encoding - an optional encoding, relevant is val is a string // - dir - true for indexOf, false for lastIndexOf function bidirectionalIndexOf(buffer, val, byteOffset, encoding, dir) { // Empty buffer means no match if (buffer.length === 0) return -1; // Normalize byteOffset if (typeof byteOffset === 'string') { encoding = byteOffset; byteOffset = 0; } else if (byteOffset > 0x7fffffff) { byteOffset = 0x7fffffff; } else if (byteOffset < -0x80000000) { byteOffset = -0x80000000; } byteOffset = +byteOffset; // Coerce to Number. if (numberIsNaN(byteOffset)) { // byteOffset: it it's undefined, null, NaN, "foo", etc, search whole buffer byteOffset = dir ? 0 : buffer.length - 1; } // Normalize byteOffset: negative offsets start from the end of the buffer if (byteOffset < 0) byteOffset = buffer.length + byteOffset; if (byteOffset >= buffer.length) { if (dir) return -1;else byteOffset = buffer.length - 1; } else if (byteOffset < 0) { if (dir) byteOffset = 0;else return -1; } // Normalize val if (typeof val === 'string') { val = Buffer.from(val, encoding); } // Finally, search either indexOf (if dir is true) or lastIndexOf if (Buffer.isBuffer(val)) { // Special case: looking for empty string/buffer always fails if (val.length === 0) { return -1; } return arrayIndexOf(buffer, val, byteOffset, encoding, dir); } else if (typeof val === 'number') { val = val & 0xFF; // Search for a byte value [0-255] if (typeof Uint8Array.prototype.indexOf === 'function') { if (dir) { return Uint8Array.prototype.indexOf.call(buffer, val, byteOffset); } else { return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset); } } return arrayIndexOf(buffer, [val], byteOffset, encoding, dir); } throw new TypeError('val must be string, number or Buffer'); } function arrayIndexOf(arr, val, byteOffset, encoding, dir) { var indexSize = 1; var arrLength = arr.length; var valLength = val.length; if (encoding !== undefined) { encoding = String(encoding).toLowerCase(); if (encoding === 'ucs2' || encoding === 'ucs-2' || encoding === 'utf16le' || encoding === 'utf-16le') { if (arr.length < 2 || val.length < 2) { return -1; } indexSize = 2; arrLength /= 2; valLength /= 2; byteOffset /= 2; } } function read(buf, i) { if (indexSize === 1) { return buf[i]; } else { return buf.readUInt16BE(i * indexSize); } } var i; if (dir) { var foundIndex = -1; for (i = byteOffset; i < arrLength; i++) { if (read(arr, i) === read(val, foundIndex === -1 ? 0 : i - foundIndex)) { if (foundIndex === -1) foundIndex = i; if (i - foundIndex + 1 === valLength) return foundIndex * indexSize; } else { if (foundIndex !== -1) i -= i - foundIndex; foundIndex = -1; } } } else { if (byteOffset + valLength > arrLength) byteOffset = arrLength - valLength; for (i = byteOffset; i >= 0; i--) { var found = true; for (var j = 0; j < valLength; j++) { if (read(arr, i + j) !== read(val, j)) { found = false; break; } } if (found) return i; } } return -1; } Buffer.prototype.includes = function includes(val, byteOffset, encoding) { return this.indexOf(val, byteOffset, encoding) !== -1; }; Buffer.prototype.indexOf = function indexOf(val, byteOffset, encoding) { return bidirectionalIndexOf(this, val, byteOffset, encoding, true); }; Buffer.prototype.lastIndexOf = function lastIndexOf(val, byteOffset, encoding) { return bidirectionalIndexOf(this, val, byteOffset, encoding, false); }; function hexWrite(buf, string, offset, length) { offset = Number(offset) || 0; var remaining = buf.length - offset; if (!length) { length = remaining; } else { length = Number(length); if (length > remaining) { length = remaining; } } var strLen = string.length; if (length > strLen / 2) { length = strLen / 2; } var i; for (i = 0; i < length; ++i) { var parsed = parseInt(string.substr(i * 2, 2), 16); if (numberIsNaN(parsed)) return i; buf[offset + i] = parsed; } return i; } function utf8Write(buf, string, offset, length) { return blitBuffer(utf8ToBytes(string, buf.length - offset), buf, offset, length); } function asciiWrite(buf, string, offset, length) { return blitBuffer(asciiToBytes(string), buf, offset, length); } function base64Write(buf, string, offset, length) { return blitBuffer(base64ToBytes(string), buf, offset, length); } function ucs2Write(buf, string, offset, length) { return blitBuffer(utf16leToBytes(string, buf.length - offset), buf, offset, length); } Buffer.prototype.write = function write(string, offset, length, encoding) { // Buffer#write(string) if (offset === undefined) { encoding = 'utf8'; length = this.length; offset = 0; // Buffer#write(string, encoding) } else if (length === undefined && typeof offset === 'string') { encoding = offset; length = this.length; offset = 0; // Buffer#write(string, offset[, length][, encoding]) } else if (isFinite(offset)) { offset = offset >>> 0; if (isFinite(length)) { length = length >>> 0; if (encoding === undefined) encoding = 'utf8'; } else { encoding = length; length = undefined; } } else { throw new Error('Buffer.write(string, encoding, offset[, length]) is no longer supported'); } var remaining = this.length - offset; if (length === undefined || length > remaining) length = remaining; if (string.length > 0 && (length < 0 || offset < 0) || offset > this.length) { throw new RangeError('Attempt to write outside buffer bounds'); } if (!encoding) encoding = 'utf8'; var loweredCase = false; for (;;) { switch (encoding) { case 'hex': return hexWrite(this, string, offset, length); case 'utf8': case 'utf-8': return utf8Write(this, string, offset, length); case 'ascii': case 'latin1': case 'binary': return asciiWrite(this, string, offset, length); case 'base64': // Warning: maxLength not taken into account in base64Write return base64Write(this, string, offset, length); case 'ucs2': case 'ucs-2': case 'utf16le': case 'utf-16le': return ucs2Write(this, string, offset, length); default: if (loweredCase) throw new TypeError('Unknown encoding: ' + encoding); encoding = ('' + encoding).toLowerCase(); loweredCase = true; } } }; Buffer.prototype.toJSON = function toJSON() { return { type: 'Buffer', data: Array.prototype.slice.call(this._arr || this, 0) }; }; function base64Slice(buf, start, end) { if (start === 0 && end === buf.length) { return base64.fromByteArray(buf); } else { return base64.fromByteArray(buf.slice(start, end)); } } function utf8Slice(buf, start, end) { end = Math.min(buf.length, end); var res = []; var i = start; while (i < end) { var firstByte = buf[i]; var codePoint = null; var bytesPerSequence = firstByte > 0xEF ? 4 : firstByte > 0xDF ? 3 : firstByte > 0xBF ? 2 : 1; if (i + bytesPerSequence <= end) { var secondByte = void 0, thirdByte = void 0, fourthByte = void 0, tempCodePoint = void 0; switch (bytesPerSequence) { case 1: if (firstByte < 0x80) { codePoint = firstByte; } break; case 2: secondByte = buf[i + 1]; if ((secondByte & 0xC0) === 0x80) { tempCodePoint = (firstByte & 0x1F) << 0x6 | secondByte & 0x3F; if (tempCodePoint > 0x7F) { codePoint = tempCodePoint; } } break; case 3: secondByte = buf[i + 1]; thirdByte = buf[i + 2]; if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80) { tempCodePoint = (firstByte & 0xF) << 0xC | (secondByte & 0x3F) << 0x6 | thirdByte & 0x3F; if (tempCodePoint > 0x7FF && (tempCodePoint < 0xD800 || tempCodePoint > 0xDFFF)) { codePoint = tempCodePoint; } } break; case 4: secondByte = buf[i + 1]; thirdByte = buf[i + 2]; fourthByte = buf[i + 3]; if ((secondByte & 0xC0) === 0x80 && (thirdByte & 0xC0) === 0x80 && (fourthByte & 0xC0) === 0x80) { tempCodePoint = (firstByte & 0xF) << 0x12 | (secondByte & 0x3F) << 0xC | (thirdByte & 0x3F) << 0x6 | fourthByte & 0x3F; if (tempCodePoint > 0xFFFF && tempCodePoint < 0x110000) { codePoint = tempCodePoint; } } } } if (codePoint === null) { // we did not generate a valid codePoint so insert a // replacement char (U+FFFD) and advance only 1 byte codePoint = 0xFFFD; bytesPerSequence = 1; } else if (codePoint > 0xFFFF) { // encode to utf16 (surrogate pair dance) codePoint -= 0x10000; res.push(codePoint >>> 10 & 0x3FF | 0xD800); codePoint = 0xDC00 | codePoint & 0x3FF; } res.push(codePoint); i += bytesPerSequence; } return decodeCodePointsArray(res); } // Based on http://stackoverflow.com/a/22747272/680742, the browser with // the lowest limit is Chrome, with 0x10000 args. // We go 1 magnitude less, for safety var MAX_ARGUMENTS_LENGTH = 0x1000; function decodeCodePointsArray(codePoints) { var len = codePoints.length; if (len <= MAX_ARGUMENTS_LENGTH) { return String.fromCharCode.apply(String, codePoints); // avoid extra slice() } // Decode in chunks to avoid "call stack size exceeded". var res = ''; var i = 0; while (i < len) { res += String.fromCharCode.apply(String, codePoints.slice(i, i += MAX_ARGUMENTS_LENGTH)); } return res; } function asciiSlice(buf, start, end) { var ret = ''; end = Math.min(buf.length, end); for (var i = start; i < end; ++i) { ret += String.fromCharCode(buf[i] & 0x7F); } return ret; } function latin1Slice(buf, start, end) { var ret = ''; end = Math.min(buf.length, end); for (var i = start; i < end; ++i) { ret += String.fromCharCode(buf[i]); } return ret; } function hexSlice(buf, start, end) { var len = buf.length; if (!start || start < 0) start = 0; if (!end || end < 0 || end > len) end = len; var out = ''; for (var i = start; i < end; ++i) { out += hexSliceLookupTable[buf[i]]; } return out; } function utf16leSlice(buf, start, end) { var bytes = buf.slice(start, end); var res = ''; // If bytes.length is odd, the last 8 bits must be ignored (same as node.js) for (var i = 0; i < bytes.length - 1; i += 2) { res += String.fromCharCode(bytes[i] + bytes[i + 1] * 256); } return res; } Buffer.prototype.slice = function slice(start, end) { var len = this.length; start = ~~start; end = end === undefined ? len : ~~end; if (start < 0) { start += len; if (start < 0) start = 0; } else if (start > len) { start = len; } if (end < 0) { end += len; if (end < 0) end = 0; } else if (end > len) { end = len; } if (end < start) end = start; var newBuf = this.subarray(start, end); // Return an augmented `Uint8Array` instance Object.setPrototypeOf(newBuf, Buffer.prototype); return newBuf; }; /* * Need to make sure that buffer isn't trying to write out of bounds. */ function checkOffset(offset, ext, length) { if (offset % 1 !== 0 || offset < 0) throw new RangeError('offset is not uint'); if (offset + ext > length) throw new RangeError('Trying to access beyond buffer length'); } Buffer.prototype.readUintLE = Buffer.prototype.readUIntLE = function readUIntLE(offset, byteLength, noAssert) { offset = offset >>> 0; byteLength = byteLength >>> 0; if (!noAssert) checkOffset(offset, byteLength, this.length); var val = this[offset]; var mul = 1; var i = 0; while (++i < byteLength && (mul *= 0x100)) { val += this[offset + i] * mul; } return val; }; Buffer.prototype.readUintBE = Buffer.prototype.readUIntBE = function readUIntBE(offset, byteLength, noAssert) { offset = offset >>> 0; byteLength = byteLength >>> 0; if (!noAssert) { checkOffset(offset, byteLength, this.length); } var val = this[offset + --byteLength]; var mul = 1; while (byteLength > 0 && (mul *= 0x100)) { val += this[offset + --byteLength] * mul; } return val; }; Buffer.prototype.readUint8 = Buffer.prototype.readUInt8 = function readUInt8(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 1, this.length); return this[offset]; }; Buffer.prototype.readUint16LE = Buffer.prototype.readUInt16LE = function readUInt16LE(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 2, this.length); return this[offset] | this[offset + 1] << 8; }; Buffer.prototype.readUint16BE = Buffer.prototype.readUInt16BE = function readUInt16BE(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 2, this.length); return this[offset] << 8 | this[offset + 1]; }; Buffer.prototype.readUint32LE = Buffer.prototype.readUInt32LE = function readUInt32LE(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 4, this.length); return (this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16) + this[offset + 3] * 0x1000000; }; Buffer.prototype.readUint32BE = Buffer.prototype.readUInt32BE = function readUInt32BE(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 4, this.length); return this[offset] * 0x1000000 + (this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]); }; Buffer.prototype.readBigUInt64LE = defineBigIntMethod(function readBigUInt64LE(offset) { offset = offset >>> 0; validateNumber(offset, 'offset'); var first = this[offset]; var last = this[offset + 7]; if (first === undefined || last === undefined) { boundsError(offset, this.length - 8); } var lo = first + this[++offset] * Math.pow(2, 8) + this[++offset] * Math.pow(2, 16) + this[++offset] * Math.pow(2, 24); var hi = this[++offset] + this[++offset] * Math.pow(2, 8) + this[++offset] * Math.pow(2, 16) + last * Math.pow(2, 24); return BigInt(lo) + (BigInt(hi) << BigInt(32)); }); Buffer.prototype.readBigUInt64BE = defineBigIntMethod(function readBigUInt64BE(offset) { offset = offset >>> 0; validateNumber(offset, 'offset'); var first = this[offset]; var last = this[offset + 7]; if (first === undefined || last === undefined) { boundsError(offset, this.length - 8); } var hi = first * Math.pow(2, 24) + this[++offset] * Math.pow(2, 16) + this[++offset] * Math.pow(2, 8) + this[++offset]; var lo = this[++offset] * Math.pow(2, 24) + this[++offset] * Math.pow(2, 16) + this[++offset] * Math.pow(2, 8) + last; return (BigInt(hi) << BigInt(32)) + BigInt(lo); }); Buffer.prototype.readIntLE = function readIntLE(offset, byteLength, noAssert) { offset = offset >>> 0; byteLength = byteLength >>> 0; if (!noAssert) checkOffset(offset, byteLength, this.length); var val = this[offset]; var mul = 1; var i = 0; while (++i < byteLength && (mul *= 0x100)) { val += this[offset + i] * mul; } mul *= 0x80; if (val >= mul) val -= Math.pow(2, 8 * byteLength); return val; }; Buffer.prototype.readIntBE = function readIntBE(offset, byteLength, noAssert) { offset = offset >>> 0; byteLength = byteLength >>> 0; if (!noAssert) checkOffset(offset, byteLength, this.length); var i = byteLength; var mul = 1; var val = this[offset + --i]; while (i > 0 && (mul *= 0x100)) { val += this[offset + --i] * mul; } mul *= 0x80; if (val >= mul) val -= Math.pow(2, 8 * byteLength); return val; }; Buffer.prototype.readInt8 = function readInt8(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 1, this.length); if (!(this[offset] & 0x80)) return this[offset]; return (0xff - this[offset] + 1) * -1; }; Buffer.prototype.readInt16LE = function readInt16LE(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 2, this.length); var val = this[offset] | this[offset + 1] << 8; return val & 0x8000 ? val | 0xFFFF0000 : val; }; Buffer.prototype.readInt16BE = function readInt16BE(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 2, this.length); var val = this[offset + 1] | this[offset] << 8; return val & 0x8000 ? val | 0xFFFF0000 : val; }; Buffer.prototype.readInt32LE = function readInt32LE(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 4, this.length); return this[offset] | this[offset + 1] << 8 | this[offset + 2] << 16 | this[offset + 3] << 24; }; Buffer.prototype.readInt32BE = function readInt32BE(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 4, this.length); return this[offset] << 24 | this[offset + 1] << 16 | this[offset + 2] << 8 | this[offset + 3]; }; Buffer.prototype.readBigInt64LE = defineBigIntMethod(function readBigInt64LE(offset) { offset = offset >>> 0; validateNumber(offset, 'offset'); var first = this[offset]; var last = this[offset + 7]; if (first === undefined || last === undefined) { boundsError(offset, this.length - 8); } var val = this[offset + 4] + this[offset + 5] * Math.pow(2, 8) + this[offset + 6] * Math.pow(2, 16) + (last << 24); // Overflow return (BigInt(val) << BigInt(32)) + BigInt(first + this[++offset] * Math.pow(2, 8) + this[++offset] * Math.pow(2, 16) + this[++offset] * Math.pow(2, 24)); }); Buffer.prototype.readBigInt64BE = defineBigIntMethod(function readBigInt64BE(offset) { offset = offset >>> 0; validateNumber(offset, 'offset'); var first = this[offset]; var last = this[offset + 7]; if (first === undefined || last === undefined) { boundsError(offset, this.length - 8); } var val = (first << 24) + // Overflow this[++offset] * Math.pow(2, 16) + this[++offset] * Math.pow(2, 8) + this[++offset]; return (BigInt(val) << BigInt(32)) + BigInt(this[++offset] * Math.pow(2, 24) + this[++offset] * Math.pow(2, 16) + this[++offset] * Math.pow(2, 8) + last); }); Buffer.prototype.readFloatLE = function readFloatLE(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 4, this.length); return ieee754.read(this, offset, true, 23, 4); }; Buffer.prototype.readFloatBE = function readFloatBE(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 4, this.length); return ieee754.read(this, offset, false, 23, 4); }; Buffer.prototype.readDoubleLE = function readDoubleLE(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 8, this.length); return ieee754.read(this, offset, true, 52, 8); }; Buffer.prototype.readDoubleBE = function readDoubleBE(offset, noAssert) { offset = offset >>> 0; if (!noAssert) checkOffset(offset, 8, this.length); return ieee754.read(this, offset, false, 52, 8); }; function checkInt(buf, value, offset, ext, max, min) { if (!Buffer.isBuffer(buf)) throw new TypeError('"buffer" argument must be a Buffer instance'); if (value > max || value < min) throw new RangeError('"value" argument is out of bounds'); if (offset + ext > buf.length) throw new RangeError('Index out of range'); } Buffer.prototype.writeUintLE = Buffer.prototype.writeUIntLE = function writeUIntLE(value, offset, byteLength, noAssert) { value = +value; offset = offset >>> 0; byteLength = byteLength >>> 0; if (!noAssert) { var maxBytes = Math.pow(2, 8 * byteLength) - 1; checkInt(this, value, offset, byteLength, maxBytes, 0); } var mul = 1; var i = 0; this[offset] = value & 0xFF; while (++i < byteLength && (mul *= 0x100)) { this[offset + i] = value / mul & 0xFF; } return offset + byteLength; }; Buffer.prototype.writeUintBE = Buffer.prototype.writeUIntBE = function writeUIntBE(value, offset, byteLength, noAssert) { value = +value; offset = offset >>> 0; byteLength = byteLength >>> 0; if (!noAssert) { var maxBytes = Math.pow(2, 8 * byteLength) - 1; checkInt(this, value, offset, byteLength, maxBytes, 0); } var i = byteLength - 1; var mul = 1; this[offset + i] = value & 0xFF; while (--i >= 0 && (mul *= 0x100)) { this[offset + i] = value / mul & 0xFF; } return offset + byteLength; }; Buffer.prototype.writeUint8 = Buffer.prototype.writeUInt8 = function writeUInt8(value, offset, noAssert) { value = +value; offset = offset >>> 0; if (!noAssert) checkInt(this, value, offset, 1, 0xff, 0); this[offset] = value & 0xff; return offset + 1; }; Buffer.prototype.writeUint16LE = Buffer.prototype.writeUInt16LE = function writeUInt16LE(value, offset, noAssert) { value = +value; offset = offset >>> 0; if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0); this[offset] = value & 0xff; this[offset + 1] = value >>> 8; return offset + 2; }; Buffer.prototype.writeUint16BE = Buffer.prototype.writeUInt16BE = function writeUInt16BE(value, offset, noAssert) { value = +value; offset = offset >>> 0; if (!noAssert) checkInt(this, value, offset, 2, 0xffff, 0); this[offset] = value >>> 8; this[offset + 1] = value & 0xff; return offset + 2; }; Buffer.prototype.writeUint32LE = Buffer.prototype.writeUInt32LE = function writeUInt32LE(value, offset, noAssert) { value = +value; offset = offset >>> 0; if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0); this[offset + 3] = value >>> 24; this[offset + 2] = value >>> 16; this[offset + 1] = value >>> 8; this[offset] = value & 0xff; return offset + 4; }; Buffer.prototype.writeUint32BE = Buffer.prototype.writeUInt32BE = function writeUInt32BE(value, offset, noAssert) { value = +value; offset = offset >>> 0; if (!noAssert) checkInt(this, value, offset, 4, 0xffffffff, 0); this[offset] = value >>> 24; this[offset + 1] = value >>> 16; this[offset + 2] = value >>> 8; this[offset + 3] = value & 0xff; return offset + 4; }; function wrtBigUInt64LE(buf, value, offset, min, max) { checkIntBI(value, min, max, buf, offset, 7); var lo = Number(value & BigInt(0xffffffff)); buf[offset++] = lo; lo = lo >> 8; buf[offset++] = lo; lo = lo >> 8; buf[offset++] = lo; lo = lo >> 8; buf[offset++] = lo; var hi = Number(value >> BigInt(32) & BigInt(0xffffffff)); buf[offset++] = hi; hi = hi >> 8; buf[offset++] = hi; hi = hi >> 8; buf[offset++] = hi; hi = hi >> 8; buf[offset++] = hi; return offset; } function wrtBigUInt64BE(buf, value, offset, min, max) { checkIntBI(value, min, max, buf, offset, 7); var lo = Number(value & BigInt(0xffffffff)); buf[offset + 7] = lo; lo = lo >> 8; buf[offset + 6] = lo; lo = lo >> 8; buf[offset + 5] = lo; lo = lo >> 8; buf[offset + 4] = lo; var hi = Number(value >> BigInt(32) & BigInt(0xffffffff)); buf[offset + 3] = hi; hi = hi >> 8; buf[offset + 2] = hi; hi = hi >> 8; buf[offset + 1] = hi; hi = hi >> 8; buf[offset] = hi; return offset + 8; } Buffer.prototype.writeBigUInt64LE = defineBigIntMethod(function writeBigUInt64LE(value, offset) { if (offset === void 0) { offset = 0; } return wrtBigUInt64LE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff')); }); Buffer.prototype.writeBigUInt64BE = defineBigIntMethod(function writeBigUInt64BE(value, offset) { if (offset === void 0) { offset = 0; } return wrtBigUInt64BE(this, value, offset, BigInt(0), BigInt('0xffffffffffffffff')); }); Buffer.prototype.writeIntLE = function writeIntLE(value, offset, byteLength, noAssert) { value = +value; offset = offset >>> 0; if (!noAssert) { var limit = Math.pow(2, 8 * byteLength - 1); checkInt(this, value, offset, byteLength, limit - 1, -limit); } var i = 0; var mul = 1; var sub = 0; this[offset] = value & 0xFF; while (++i < byteLength && (mul *= 0x100)) { if (value < 0 && sub === 0 && this[offset + i - 1] !== 0) { sub = 1; } this[offset + i] = (value / mul >> 0) - sub & 0xFF; } return offset + byteLength; }; Buffer.prototype.writeIntBE = function writeIntBE(value, offset, byteLength, noAssert) { value = +value; offset = offset >>> 0; if (!noAssert) { var limit = Math.pow(2, 8 * byteLength - 1); checkInt(this, value, offset, byteLength, limit - 1, -limit); } var i = byteLength - 1; var mul = 1; var sub = 0; this[offset + i] = value & 0xFF; while (--i >= 0 && (mul *= 0x100)) { if (value < 0 && sub === 0 && this[offset + i + 1] !== 0) { sub = 1; } this[offset + i] = (value / mul >> 0) - sub & 0xFF; } return offset + byteLength; }; Buffer.prototype.writeInt8 = function writeInt8(value, offset, noAssert) { value = +value; offset = offset >>> 0; if (!noAssert) checkInt(this, value, offset, 1, 0x7f, -0x80); if (value < 0) value = 0xff + value + 1; this[offset] = value & 0xff; return offset + 1; }; Buffer.prototype.writeInt16LE = function writeInt16LE(value, offset, noAssert) { value = +value; offset = offset >>> 0; if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000); this[offset] = value & 0xff; this[offset + 1] = value >>> 8; return offset + 2; }; Buffer.prototype.writeInt16BE = function writeInt16BE(value, offset, noAssert) { value = +value; offset = offset >>> 0; if (!noAssert) checkInt(this, value, offset, 2, 0x7fff, -0x8000); this[offset] = value >>> 8; this[offset + 1] = value & 0xff; return offset + 2; }; Buffer.prototype.writeInt32LE = function writeInt32LE(value, offset, noAssert) { value = +value; offset = offset >>> 0; if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000); this[offset] = value & 0xff; this[offset + 1] = value >>> 8; this[offset + 2] = value >>> 16; this[offset + 3] = value >>> 24; return offset + 4; }; Buffer.prototype.writeInt32BE = function writeInt32BE(value, offset, noAssert) { value = +value; offset = offset >>> 0; if (!noAssert) checkInt(this, value, offset, 4, 0x7fffffff, -0x80000000); if (value < 0) value = 0xffffffff + value + 1; this[offset] = value >>> 24; this[offset + 1] = value >>> 16; this[offset + 2] = value >>> 8; this[offset + 3] = value & 0xff; return offset + 4; }; Buffer.prototype.writeBigInt64LE = defineBigIntMethod(function writeBigInt64LE(value, offset) { if (offset === void 0) { offset = 0; } return wrtBigUInt64LE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff')); }); Buffer.prototype.writeBigInt64BE = defineBigIntMethod(function writeBigInt64BE(value, offset) { if (offset === void 0) { offset = 0; } return wrtBigUInt64BE(this, value, offset, -BigInt('0x8000000000000000'), BigInt('0x7fffffffffffffff')); }); function checkIEEE754(buf, value, offset, ext, max, min) { if (offset + ext > buf.length) throw new RangeError('Index out of range'); if (offset < 0) throw new RangeError('Index out of range'); } function writeFloat(buf, value, offset, littleEndian, noAssert) { value = +value; offset = offset >>> 0; if (!noAssert) { checkIEEE754(buf, value, offset, 4, 3.4028234663852886e+38, -3.4028234663852886e+38); } ieee754.write(buf, value, offset, littleEndian, 23, 4); return offset + 4; } Buffer.prototype.writeFloatLE = function writeFloatLE(value, offset, noAssert) { return writeFloat(this, value, offset, true, noAssert); }; Buffer.prototype.writeFloatBE = function writeFloatBE(value, offset, noAssert) { return writeFloat(this, value, offset, false, noAssert); }; function writeDouble(buf, value, offset, littleEndian, noAssert) { value = +value; offset = offset >>> 0; if (!noAssert) { checkIEEE754(buf, value, offset, 8, 1.7976931348623157E+308, -1.7976931348623157E+308); } ieee754.write(buf, value, offset, littleEndian, 52, 8); return offset + 8; } Buffer.prototype.writeDoubleLE = function writeDoubleLE(value, offset, noAssert) { return writeDouble(this, value, offset, true, noAssert); }; Buffer.prototype.writeDoubleBE = function writeDoubleBE(value, offset, noAssert) { return writeDouble(this, value, offset, false, noAssert); }; // copy(targetBuffer, targetStart=0, sourceStart=0, sourceEnd=buffer.length) Buffer.prototype.copy = function copy(target, targetStart, start, end) { if (!Buffer.isBuffer(target)) throw new TypeError('argument should be a Buffer'); if (!start) start = 0; if (!end && end !== 0) end = this.length; if (targetStart >= target.length) targetStart = target.length; if (!targetStart) targetStart = 0; if (end > 0 && end < start) end = start; // Copy 0 bytes; we're done if (end === start) return 0; if (target.length === 0 || this.length === 0) return 0; // Fatal error conditions if (targetStart < 0) { throw new RangeError('targetStart out of bounds'); } if (start < 0 || start >= this.length) throw new RangeError('Index out of range'); if (end < 0) throw new RangeError('sourceEnd out of bounds'); // Are we oob? if (end > this.length) end = this.length; if (target.length - targetStart < end - start) { end = target.length - targetStart + start; } var len = end - start; if (this === target && typeof Uint8Array.prototype.copyWithin === 'function') { // Use built-in when available, missing from IE11 this.copyWithin(targetStart, start, end); } else { Uint8Array.prototype.set.call(target, this.subarray(start, end), targetStart); } return len; }; // Usage: // buffer.fill(number[, offset[, end]]) // buffer.fill(buffer[, offset[, end]]) // buffer.fill(string[, offset[, end]][, encoding]) Buffer.prototype.fill = function fill(val, start, end, encoding) { // Handle string cases: if (typeof val === 'string') { if (typeof start === 'string') { encoding = start; start = 0; end = this.length; } else if (typeof end === 'string') { encoding = end; end = this.length; } if (encoding !== undefined && typeof encoding !== 'string') { throw new TypeError('encoding must be a string'); } if (typeof encoding === 'string' && !Buffer.isEncoding(encoding)) { throw new TypeError('Unknown encoding: ' + encoding); } if (val.length === 1) { var code = val.charCodeAt(0); if (encoding === 'utf8' && code < 128 || encoding === 'latin1') { // Fast path: If `val` fits into a single byte, use that numeric value. val = code; } } } else if (typeof val === 'number') { val = val & 255; } else if (typeof val === 'boolean') { val = Number(val); } // Invalid ranges are not set to a default, so can range check early. if (start < 0 || this.length < start || this.length < end) { throw new RangeError('Out of range index'); } if (end <= start) { return this; } start = start >>> 0; end = end === undefined ? this.length : end >>> 0; if (!val) val = 0; var i; if (typeof val === 'number') { for (i = start; i < end; ++i) { this[i] = val; } } else { var bytes = Buffer.isBuffer(val) ? val : Buffer.from(val, encoding); var len = bytes.length; if (len === 0) { throw new TypeError('The value "' + val + '" is invalid for argument "value"'); } for (i = 0; i < end - start; ++i) { this[i + start] = bytes[i % len]; } } return this; }; // CUSTOM ERRORS // ============= // Simplified versions from Node, changed for Buffer-only usage var errors = {}; function E(sym, getMessage, Base) { errors[sym] = /*#__PURE__*/function (_Base) { _inheritsLoose(NodeError, _Base); function NodeError() { var _this; _this = _Base.call(this) || this; Object.defineProperty(_assertThisInitialized(_this), 'message', { value: getMessage.apply(_assertThisInitialized(_this), arguments), writable: true, configurable: true }); // Add the error code to the name to include it in the stack trace. _this.name = _this.name + " [" + sym + "]"; // Access the stack to generate the error message including the error code // from the name. _this.stack; // eslint-disable-line no-unused-expressions // Reset the name to the actual name. delete _this.name; return _this; } var _proto = NodeError.prototype; _proto.toString = function toString() { return this.name + " [" + sym + "]: " + this.message; }; _createClass(NodeError, [{ key: "code", get: function get() { return sym; }, set: function set(value) { Object.defineProperty(this, 'code', { configurable: true, enumerable: true, value: value, writable: true }); } }]); return NodeError; }(Base); } E('ERR_BUFFER_OUT_OF_BOUNDS', function (name) { if (name) { return name + " is outside of buffer bounds"; } return 'Attempt to access memory outside buffer bounds'; }, RangeError); E('ERR_INVALID_ARG_TYPE', function (name, actual) { return "The \"" + name + "\" argument must be of type number. Received type " + typeof actual; }, TypeError); E('ERR_OUT_OF_RANGE', function (str, range, input) { var msg = "The value of \"" + str + "\" is out of range."; var received = input; if (Number.isInteger(input) && Math.abs(input) > Math.pow(2, 32)) { received = addNumericalSeparator(String(input)); } else if (typeof input === 'bigint') { received = String(input); if (input > Math.pow(BigInt(2), BigInt(32)) || input < -Math.pow(BigInt(2), BigInt(32))) { received = addNumericalSeparator(received); } received += 'n'; } msg += " It must be " + range + ". Received " + received; return msg; }, RangeError); function addNumericalSeparator(val) { var res = ''; var i = val.length; var start = val[0] === '-' ? 1 : 0; for (; i >= start + 4; i -= 3) { res = "_" + val.slice(i - 3, i) + res; } return "" + val.slice(0, i) + res; } // CHECK FUNCTIONS // =============== function checkBounds(buf, offset, byteLength) { validateNumber(offset, 'offset'); if (buf[offset] === undefined || buf[offset + byteLength] === undefined) { boundsError(offset, buf.length - (byteLength + 1)); } } function checkIntBI(value, min, max, buf, offset, byteLength) { if (value > max || value < min) { var n = typeof min === 'bigint' ? 'n' : ''; var range; if (byteLength > 3) { if (min === 0 || min === BigInt(0)) { range = ">= 0" + n + " and < 2" + n + " ** " + (byteLength + 1) * 8 + n; } else { range = ">= -(2" + n + " ** " + ((byteLength + 1) * 8 - 1) + n + ") and < 2 ** " + ("" + ((byteLength + 1) * 8 - 1) + n); } } else { range = ">= " + min + n + " and <= " + max + n; } throw new errors.ERR_OUT_OF_RANGE('value', range, value); } checkBounds(buf, offset, byteLength); } function validateNumber(value, name) { if (typeof value !== 'number') { throw new errors.ERR_INVALID_ARG_TYPE(name, 'number', value); } } function boundsError(value, length, type) { if (Math.floor(value) !== value) { validateNumber(value, type); throw new errors.ERR_OUT_OF_RANGE(type || 'offset', 'an integer', value); } if (length < 0) { throw new errors.ERR_BUFFER_OUT_OF_BOUNDS(); } throw new errors.ERR_OUT_OF_RANGE(type || 'offset', ">= " + (type ? 1 : 0) + " and <= " + length, value); } // HELPER FUNCTIONS // ================ var INVALID_BASE64_RE = /[^+/0-9A-Za-z-_]/g; function base64clean(str) { // Node takes equal signs as end of the Base64 encoding str = str.split('=')[0]; // Node strips out invalid characters like \n and \t from the string, base64-js does not str = str.trim().replace(INVALID_BASE64_RE, ''); // Node converts strings with length < 2 to '' if (str.length < 2) return ''; // Node allows for non-padded base64 strings (missing trailing ===), base64-js does not while (str.length % 4 !== 0) { str = str + '='; } return str; } function utf8ToBytes(string, units) { units = units || Infinity; var codePoint; var length = string.length; var leadSurrogate = null; var bytes = []; for (var i = 0; i < length; ++i) { codePoint = string.charCodeAt(i); // is surrogate component if (codePoint > 0xD7FF && codePoint < 0xE000) { // last char was a lead if (!leadSurrogate) { // no lead yet if (codePoint > 0xDBFF) { // unexpected trail if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); continue; } else if (i + 1 === length) { // unpaired lead if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); continue; } // valid lead leadSurrogate = codePoint; continue; } // 2 leads in a row if (codePoint < 0xDC00) { if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); leadSurrogate = codePoint; continue; } // valid surrogate pair codePoint = (leadSurrogate - 0xD800 << 10 | codePoint - 0xDC00) + 0x10000; } else if (leadSurrogate) { // valid bmp char, but last char was a lead if ((units -= 3) > -1) bytes.push(0xEF, 0xBF, 0xBD); } leadSurrogate = null; // encode utf8 if (codePoint < 0x80) { if ((units -= 1) < 0) break; bytes.push(codePoint); } else if (codePoint < 0x800) { if ((units -= 2) < 0) break; bytes.push(codePoint >> 0x6 | 0xC0, codePoint & 0x3F | 0x80); } else if (codePoint < 0x10000) { if ((units -= 3) < 0) break; bytes.push(codePoint >> 0xC | 0xE0, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80); } else if (codePoint < 0x110000) { if ((units -= 4) < 0) break; bytes.push(codePoint >> 0x12 | 0xF0, codePoint >> 0xC & 0x3F | 0x80, codePoint >> 0x6 & 0x3F | 0x80, codePoint & 0x3F | 0x80); } else { throw new Error('Invalid code point'); } } return bytes; } function asciiToBytes(str) { var byteArray = []; for (var i = 0; i < str.length; ++i) { // Node's code seems to be doing this and not & 0x7F.. byteArray.push(str.charCodeAt(i) & 0xFF); } return byteArray; } function utf16leToBytes(str, units) { var c, hi, lo; var byteArray = []; for (var i = 0; i < str.length; ++i) { if ((units -= 2) < 0) break; c = str.charCodeAt(i); hi = c >> 8; lo = c % 256; byteArray.push(lo); byteArray.push(hi); } return byteArray; } function base64ToBytes(str) { return base64.toByteArray(base64clean(str)); } function blitBuffer(src, dst, offset, length) { var i; for (i = 0; i < length; ++i) { if (i + offset >= dst.length || i >= src.length) break; dst[i + offset] = src[i]; } return i; } // ArrayBuffer or Uint8Array objects from other contexts (i.e. iframes) do not pass // the `instanceof` check but they should be treated as of that type. // See: https://github.com/feross/buffer/issues/166 function isInstance(obj, type) { return obj instanceof type || obj != null && obj.constructor != null && obj.constructor.name != null && obj.constructor.name === type.name; } function numberIsNaN(obj) { // For IE11 support return obj !== obj; // eslint-disable-line no-self-compare } // Create lookup table for `toString('hex')` // See: https://github.com/feross/buffer/issues/219 var hexSliceLookupTable = function () { var alphabet = '0123456789abcdef'; var table = new Array(256); for (var i = 0; i < 16; ++i) { var i16 = i * 16; for (var j = 0; j < 16; ++j) { table[i16 + j] = alphabet[i] + alphabet[j]; } } return table; }(); // Return not function with Error if BigInt not supported function defineBigIntMethod(fn) { return typeof BigInt === 'undefined' ? BufferBigIntNotDefined : fn; } function BufferBigIntNotDefined() { throw new Error('BigInt not supported'); } /***/ }), /***/ 477: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; __webpack_require__(7803); __webpack_require__(1539); // eslint-disable-next-line es/no-typed-arrays -- safe module.exports = typeof ArrayBuffer != 'undefined' && typeof DataView != 'undefined'; /***/ }), /***/ 2094: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var NATIVE_ARRAY_BUFFER = __webpack_require__(477); var DESCRIPTORS = __webpack_require__(9781); var global = __webpack_require__(7854); var isCallable = __webpack_require__(614); var isObject = __webpack_require__(111); var hasOwn = __webpack_require__(2597); var classof = __webpack_require__(648); var tryToString = __webpack_require__(6330); var createNonEnumerableProperty = __webpack_require__(8880); var redefine = __webpack_require__(1320); var defineProperty = (__webpack_require__(3070).f); var isPrototypeOf = __webpack_require__(7976); var getPrototypeOf = __webpack_require__(9518); var setPrototypeOf = __webpack_require__(7674); var wellKnownSymbol = __webpack_require__(5112); var uid = __webpack_require__(9711); var Int8Array = global.Int8Array; var Int8ArrayPrototype = Int8Array && Int8Array.prototype; var Uint8ClampedArray = global.Uint8ClampedArray; var Uint8ClampedArrayPrototype = Uint8ClampedArray && Uint8ClampedArray.prototype; var TypedArray = Int8Array && getPrototypeOf(Int8Array); var TypedArrayPrototype = Int8ArrayPrototype && getPrototypeOf(Int8ArrayPrototype); var ObjectPrototype = Object.prototype; var TypeError = global.TypeError; var TO_STRING_TAG = wellKnownSymbol('toStringTag'); var TYPED_ARRAY_TAG = uid('TYPED_ARRAY_TAG'); var TYPED_ARRAY_CONSTRUCTOR = uid('TYPED_ARRAY_CONSTRUCTOR'); // Fixing native typed arrays in Opera Presto crashes the browser, see #595 var NATIVE_ARRAY_BUFFER_VIEWS = NATIVE_ARRAY_BUFFER && !!setPrototypeOf && classof(global.opera) !== 'Opera'; var TYPED_ARRAY_TAG_REQIRED = false; var NAME, Constructor, Prototype; var TypedArrayConstructorsList = { Int8Array: 1, Uint8Array: 1, Uint8ClampedArray: 1, Int16Array: 2, Uint16Array: 2, Int32Array: 4, Uint32Array: 4, Float32Array: 4, Float64Array: 8 }; var BigIntArrayConstructorsList = { BigInt64Array: 8, BigUint64Array: 8 }; var isView = function isView(it) { if (!isObject(it)) return false; var klass = classof(it); return klass === 'DataView' || hasOwn(TypedArrayConstructorsList, klass) || hasOwn(BigIntArrayConstructorsList, klass); }; var isTypedArray = function isTypedArray(it) { if (!isObject(it)) return false; var klass = classof(it); return hasOwn(TypedArrayConstructorsList, klass) || hasOwn(BigIntArrayConstructorsList, klass); }; var aTypedArray = function aTypedArray(it) { if (isTypedArray(it)) return it; throw TypeError('Target is not a typed array'); }; var aTypedArrayConstructor = function aTypedArrayConstructor(C) { if (isCallable(C) && (!setPrototypeOf || isPrototypeOf(TypedArray, C))) return C; throw TypeError(tryToString(C) + ' is not a typed array constructor'); }; var exportTypedArrayMethod = function exportTypedArrayMethod(KEY, property, forced) { if (!DESCRIPTORS) return; if (forced) for (var ARRAY in TypedArrayConstructorsList) { var TypedArrayConstructor = global[ARRAY]; if (TypedArrayConstructor && hasOwn(TypedArrayConstructor.prototype, KEY)) try { delete TypedArrayConstructor.prototype[KEY]; } catch (error) { /* empty */ } } if (!TypedArrayPrototype[KEY] || forced) { redefine(TypedArrayPrototype, KEY, forced ? property : NATIVE_ARRAY_BUFFER_VIEWS && Int8ArrayPrototype[KEY] || property); } }; var exportTypedArrayStaticMethod = function exportTypedArrayStaticMethod(KEY, property, forced) { var ARRAY, TypedArrayConstructor; if (!DESCRIPTORS) return; if (setPrototypeOf) { if (forced) for (ARRAY in TypedArrayConstructorsList) { TypedArrayConstructor = global[ARRAY]; if (TypedArrayConstructor && hasOwn(TypedArrayConstructor, KEY)) try { delete TypedArrayConstructor[KEY]; } catch (error) { /* empty */ } } if (!TypedArray[KEY] || forced) { // V8 ~ Chrome 49-50 `%TypedArray%` methods are non-writable non-configurable try { return redefine(TypedArray, KEY, forced ? property : NATIVE_ARRAY_BUFFER_VIEWS && TypedArray[KEY] || property); } catch (error) { /* empty */ } } else return; } for (ARRAY in TypedArrayConstructorsList) { TypedArrayConstructor = global[ARRAY]; if (TypedArrayConstructor && (!TypedArrayConstructor[KEY] || forced)) { redefine(TypedArrayConstructor, KEY, property); } } }; for (NAME in TypedArrayConstructorsList) { Constructor = global[NAME]; Prototype = Constructor && Constructor.prototype; if (Prototype) createNonEnumerableProperty(Prototype, TYPED_ARRAY_CONSTRUCTOR, Constructor);else NATIVE_ARRAY_BUFFER_VIEWS = false; } for (NAME in BigIntArrayConstructorsList) { Constructor = global[NAME]; Prototype = Constructor && Constructor.prototype; if (Prototype) createNonEnumerableProperty(Prototype, TYPED_ARRAY_CONSTRUCTOR, Constructor); } // WebKit bug - typed arrays constructors prototype is Object.prototype if (!NATIVE_ARRAY_BUFFER_VIEWS || !isCallable(TypedArray) || TypedArray === Function.prototype) { // eslint-disable-next-line no-shadow -- safe TypedArray = function TypedArray() { throw TypeError('Incorrect invocation'); }; if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) { if (global[NAME]) setPrototypeOf(global[NAME], TypedArray); } } if (!NATIVE_ARRAY_BUFFER_VIEWS || !TypedArrayPrototype || TypedArrayPrototype === ObjectPrototype) { TypedArrayPrototype = TypedArray.prototype; if (NATIVE_ARRAY_BUFFER_VIEWS) for (NAME in TypedArrayConstructorsList) { if (global[NAME]) setPrototypeOf(global[NAME].prototype, TypedArrayPrototype); } } // WebKit bug - one more object in Uint8ClampedArray prototype chain if (NATIVE_ARRAY_BUFFER_VIEWS && getPrototypeOf(Uint8ClampedArrayPrototype) !== TypedArrayPrototype) { setPrototypeOf(Uint8ClampedArrayPrototype, TypedArrayPrototype); } if (DESCRIPTORS && !hasOwn(TypedArrayPrototype, TO_STRING_TAG)) { TYPED_ARRAY_TAG_REQIRED = true; defineProperty(TypedArrayPrototype, TO_STRING_TAG, { get: function get() { return isObject(this) ? this[TYPED_ARRAY_TAG] : undefined; } }); for (NAME in TypedArrayConstructorsList) { if (global[NAME]) { createNonEnumerableProperty(global[NAME], TYPED_ARRAY_TAG, NAME); } } } module.exports = { NATIVE_ARRAY_BUFFER_VIEWS: NATIVE_ARRAY_BUFFER_VIEWS, TYPED_ARRAY_CONSTRUCTOR: TYPED_ARRAY_CONSTRUCTOR, TYPED_ARRAY_TAG: TYPED_ARRAY_TAG_REQIRED && TYPED_ARRAY_TAG, aTypedArray: aTypedArray, aTypedArrayConstructor: aTypedArrayConstructor, exportTypedArrayMethod: exportTypedArrayMethod, exportTypedArrayStaticMethod: exportTypedArrayStaticMethod, isView: isView, isTypedArray: isTypedArray, TypedArray: TypedArray, TypedArrayPrototype: TypedArrayPrototype }; /***/ }), /***/ 2091: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; __webpack_require__(8309); var global = __webpack_require__(7854); var uncurryThis = __webpack_require__(1702); var DESCRIPTORS = __webpack_require__(9781); var NATIVE_ARRAY_BUFFER = __webpack_require__(477); var FunctionName = __webpack_require__(6530); var createNonEnumerableProperty = __webpack_require__(8880); var redefineAll = __webpack_require__(2248); var fails = __webpack_require__(7293); var anInstance = __webpack_require__(5787); var toIntegerOrInfinity = __webpack_require__(9303); var toLength = __webpack_require__(7466); var toIndex = __webpack_require__(7067); var IEEE754 = __webpack_require__(1179); var getPrototypeOf = __webpack_require__(9518); var setPrototypeOf = __webpack_require__(7674); var getOwnPropertyNames = (__webpack_require__(8006).f); var defineProperty = (__webpack_require__(3070).f); var arrayFill = __webpack_require__(1285); var arraySlice = __webpack_require__(206); var setToStringTag = __webpack_require__(8003); var InternalStateModule = __webpack_require__(9909); var PROPER_FUNCTION_NAME = FunctionName.PROPER; var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE; var getInternalState = InternalStateModule.get; var setInternalState = InternalStateModule.set; var ARRAY_BUFFER = 'ArrayBuffer'; var DATA_VIEW = 'DataView'; var PROTOTYPE = 'prototype'; var WRONG_LENGTH = 'Wrong length'; var WRONG_INDEX = 'Wrong index'; var NativeArrayBuffer = global[ARRAY_BUFFER]; var $ArrayBuffer = NativeArrayBuffer; var ArrayBufferPrototype = $ArrayBuffer && $ArrayBuffer[PROTOTYPE]; var $DataView = global[DATA_VIEW]; var DataViewPrototype = $DataView && $DataView[PROTOTYPE]; var ObjectPrototype = Object.prototype; var Array = global.Array; var RangeError = global.RangeError; var fill = uncurryThis(arrayFill); var reverse = uncurryThis([].reverse); var packIEEE754 = IEEE754.pack; var unpackIEEE754 = IEEE754.unpack; var packInt8 = function packInt8(number) { return [number & 0xFF]; }; var packInt16 = function packInt16(number) { return [number & 0xFF, number >> 8 & 0xFF]; }; var packInt32 = function packInt32(number) { return [number & 0xFF, number >> 8 & 0xFF, number >> 16 & 0xFF, number >> 24 & 0xFF]; }; var unpackInt32 = function unpackInt32(buffer) { return buffer[3] << 24 | buffer[2] << 16 | buffer[1] << 8 | buffer[0]; }; var packFloat32 = function packFloat32(number) { return packIEEE754(number, 23, 4); }; var packFloat64 = function packFloat64(number) { return packIEEE754(number, 52, 8); }; var addGetter = function addGetter(Constructor, key) { defineProperty(Constructor[PROTOTYPE], key, { get: function get() { return getInternalState(this)[key]; } }); }; var get = function get(view, count, index, isLittleEndian) { var intIndex = toIndex(index); var store = getInternalState(view); if (intIndex + count > store.byteLength) throw RangeError(WRONG_INDEX); var bytes = getInternalState(store.buffer).bytes; var start = intIndex + store.byteOffset; var pack = arraySlice(bytes, start, start + count); return isLittleEndian ? pack : reverse(pack); }; var set = function set(view, count, index, conversion, value, isLittleEndian) { var intIndex = toIndex(index); var store = getInternalState(view); if (intIndex + count > store.byteLength) throw RangeError(WRONG_INDEX); var bytes = getInternalState(store.buffer).bytes; var start = intIndex + store.byteOffset; var pack = conversion(+value); for (var i = 0; i < count; i++) { bytes[start + i] = pack[isLittleEndian ? i : count - i - 1]; } }; if (!NATIVE_ARRAY_BUFFER) { $ArrayBuffer = function ArrayBuffer(length) { anInstance(this, ArrayBufferPrototype); var byteLength = toIndex(length); setInternalState(this, { bytes: fill(Array(byteLength), 0), byteLength: byteLength }); if (!DESCRIPTORS) this.byteLength = byteLength; }; ArrayBufferPrototype = $ArrayBuffer[PROTOTYPE]; $DataView = function DataView(buffer, byteOffset, byteLength) { anInstance(this, DataViewPrototype); anInstance(buffer, ArrayBufferPrototype); var bufferLength = getInternalState(buffer).byteLength; var offset = toIntegerOrInfinity(byteOffset); if (offset < 0 || offset > bufferLength) throw RangeError('Wrong offset'); byteLength = byteLength === undefined ? bufferLength - offset : toLength(byteLength); if (offset + byteLength > bufferLength) throw RangeError(WRONG_LENGTH); setInternalState(this, { buffer: buffer, byteLength: byteLength, byteOffset: offset }); if (!DESCRIPTORS) { this.buffer = buffer; this.byteLength = byteLength; this.byteOffset = offset; } }; DataViewPrototype = $DataView[PROTOTYPE]; if (DESCRIPTORS) { addGetter($ArrayBuffer, 'byteLength'); addGetter($DataView, 'buffer'); addGetter($DataView, 'byteLength'); addGetter($DataView, 'byteOffset'); } redefineAll(DataViewPrototype, { getInt8: function getInt8(byteOffset) { return get(this, 1, byteOffset)[0] << 24 >> 24; }, getUint8: function getUint8(byteOffset) { return get(this, 1, byteOffset)[0]; }, getInt16: function getInt16(byteOffset /* , littleEndian */ ) { var bytes = get(this, 2, byteOffset, arguments.length > 1 ? arguments[1] : undefined); return (bytes[1] << 8 | bytes[0]) << 16 >> 16; }, getUint16: function getUint16(byteOffset /* , littleEndian */ ) { var bytes = get(this, 2, byteOffset, arguments.length > 1 ? arguments[1] : undefined); return bytes[1] << 8 | bytes[0]; }, getInt32: function getInt32(byteOffset /* , littleEndian */ ) { return unpackInt32(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined)); }, getUint32: function getUint32(byteOffset /* , littleEndian */ ) { return unpackInt32(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined)) >>> 0; }, getFloat32: function getFloat32(byteOffset /* , littleEndian */ ) { return unpackIEEE754(get(this, 4, byteOffset, arguments.length > 1 ? arguments[1] : undefined), 23); }, getFloat64: function getFloat64(byteOffset /* , littleEndian */ ) { return unpackIEEE754(get(this, 8, byteOffset, arguments.length > 1 ? arguments[1] : undefined), 52); }, setInt8: function setInt8(byteOffset, value) { set(this, 1, byteOffset, packInt8, value); }, setUint8: function setUint8(byteOffset, value) { set(this, 1, byteOffset, packInt8, value); }, setInt16: function setInt16(byteOffset, value /* , littleEndian */ ) { set(this, 2, byteOffset, packInt16, value, arguments.length > 2 ? arguments[2] : undefined); }, setUint16: function setUint16(byteOffset, value /* , littleEndian */ ) { set(this, 2, byteOffset, packInt16, value, arguments.length > 2 ? arguments[2] : undefined); }, setInt32: function setInt32(byteOffset, value /* , littleEndian */ ) { set(this, 4, byteOffset, packInt32, value, arguments.length > 2 ? arguments[2] : undefined); }, setUint32: function setUint32(byteOffset, value /* , littleEndian */ ) { set(this, 4, byteOffset, packInt32, value, arguments.length > 2 ? arguments[2] : undefined); }, setFloat32: function setFloat32(byteOffset, value /* , littleEndian */ ) { set(this, 4, byteOffset, packFloat32, value, arguments.length > 2 ? arguments[2] : undefined); }, setFloat64: function setFloat64(byteOffset, value /* , littleEndian */ ) { set(this, 8, byteOffset, packFloat64, value, arguments.length > 2 ? arguments[2] : undefined); } }); } else { var INCORRECT_ARRAY_BUFFER_NAME = PROPER_FUNCTION_NAME && NativeArrayBuffer.name !== ARRAY_BUFFER; /* eslint-disable no-new -- required for testing */ if (!fails(function () { NativeArrayBuffer(1); }) || !fails(function () { new NativeArrayBuffer(-1); }) || fails(function () { new NativeArrayBuffer(); new NativeArrayBuffer(1.5); new NativeArrayBuffer(NaN); return INCORRECT_ARRAY_BUFFER_NAME && !CONFIGURABLE_FUNCTION_NAME; })) { /* eslint-enable no-new -- required for testing */ $ArrayBuffer = function ArrayBuffer(length) { anInstance(this, ArrayBufferPrototype); return new NativeArrayBuffer(toIndex(length)); }; $ArrayBuffer[PROTOTYPE] = ArrayBufferPrototype; for (var keys = getOwnPropertyNames(NativeArrayBuffer), j = 0, key; keys.length > j;) { if (!((key = keys[j++]) in $ArrayBuffer)) { createNonEnumerableProperty($ArrayBuffer, key, NativeArrayBuffer[key]); } } ArrayBufferPrototype.constructor = $ArrayBuffer; } else if (INCORRECT_ARRAY_BUFFER_NAME && CONFIGURABLE_FUNCTION_NAME) { createNonEnumerableProperty(NativeArrayBuffer, 'name', ARRAY_BUFFER); } // WebKit bug - the same parent prototype for typed arrays and data view if (setPrototypeOf && getPrototypeOf(DataViewPrototype) !== ObjectPrototype) { setPrototypeOf(DataViewPrototype, ObjectPrototype); } // iOS Safari 7.x bug var testView = new $DataView(new $ArrayBuffer(2)); var $setInt8 = uncurryThis(DataViewPrototype.setInt8); testView.setInt8(0, 2147483648); testView.setInt8(1, 2147483649); if (testView.getInt8(0) || !testView.getInt8(1)) redefineAll(DataViewPrototype, { setInt8: function setInt8(byteOffset, value) { $setInt8(this, byteOffset, value << 24 >> 24); }, setUint8: function setUint8(byteOffset, value) { $setInt8(this, byteOffset, value << 24 >> 24); } }, { unsafe: true }); } setToStringTag($ArrayBuffer, ARRAY_BUFFER); setToStringTag($DataView, DATA_VIEW); module.exports = { ArrayBuffer: $ArrayBuffer, DataView: $DataView }; /***/ }), /***/ 7803: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { "use strict"; var $ = __webpack_require__(2109); var global = __webpack_require__(7854); var arrayBufferModule = __webpack_require__(2091); var setSpecies = __webpack_require__(6340); var ARRAY_BUFFER = 'ArrayBuffer'; var ArrayBuffer = arrayBufferModule[ARRAY_BUFFER]; var NativeArrayBuffer = global[ARRAY_BUFFER]; // `ArrayBuffer` constructor // https://tc39.es/ecma262/#sec-arraybuffer-constructor $({ global: true, forced: NativeArrayBuffer !== ArrayBuffer }, { ArrayBuffer: ArrayBuffer }); setSpecies(ARRAY_BUFFER); /***/ }), /***/ 194: /***/ (function(module, exports, __webpack_require__) { "use strict"; ; (function (root, factory, undef) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(757), __webpack_require__(7508), __webpack_require__(3440), __webpack_require__(3839), __webpack_require__(1582)); } else {} })(void 0, function (CryptoJS) { (function () { // Shortcuts var C = CryptoJS; var C_lib = C.lib; var BlockCipher = C_lib.BlockCipher; var C_algo = C.algo; // Lookup tables var SBOX = []; var INV_SBOX = []; var SUB_MIX_0 = []; var SUB_MIX_1 = []; var SUB_MIX_2 = []; var SUB_MIX_3 = []; var INV_SUB_MIX_0 = []; var INV_SUB_MIX_1 = []; var INV_SUB_MIX_2 = []; var INV_SUB_MIX_3 = []; // Compute lookup tables (function () { // Compute double table var d = []; for (var i = 0; i < 256; i++) { if (i < 128) { d[i] = i << 1; } else { d[i] = i << 1 ^ 0x11b; } } // Walk GF(2^8) var x = 0; var xi = 0; for (var i = 0; i < 256; i++) { // Compute sbox var sx = xi ^ xi << 1 ^ xi << 2 ^ xi << 3 ^ xi << 4; sx = sx >>> 8 ^ sx & 0xff ^ 0x63; SBOX[x] = sx; INV_SBOX[sx] = x; // Compute multiplication var x2 = d[x]; var x4 = d[x2]; var x8 = d[x4]; // Compute sub bytes, mix columns tables var t = d[sx] * 0x101 ^ sx * 0x1010100; SUB_MIX_0[x] = t << 24 | t >>> 8; SUB_MIX_1[x] = t << 16 | t >>> 16; SUB_MIX_2[x] = t << 8 | t >>> 24; SUB_MIX_3[x] = t; // Compute inv sub bytes, inv mix columns tables var t = x8 * 0x1010101 ^ x4 * 0x10001 ^ x2 * 0x101 ^ x * 0x1010100; INV_SUB_MIX_0[sx] = t << 24 | t >>> 8; INV_SUB_MIX_1[sx] = t << 16 | t >>> 16; INV_SUB_MIX_2[sx] = t << 8 | t >>> 24; INV_SUB_MIX_3[sx] = t; // Compute next counter if (!x) { x = xi = 1; } else { x = x2 ^ d[d[d[x8 ^ x2]]]; xi ^= d[d[xi]]; } } })(); // Precomputed Rcon lookup var RCON = [0x00, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36]; /** * AES block cipher algorithm. */ var AES = C_algo.AES = BlockCipher.extend({ _doReset: function _doReset() { var t; // Skip reset of nRounds has been set before and key did not change if (this._nRounds && this._keyPriorReset === this._key) { return; } // Shortcuts var key = this._keyPriorReset = this._key; var keyWords = key.words; var keySize = key.sigBytes / 4; // Compute number of rounds var nRounds = this._nRounds = keySize + 6; // Compute number of key schedule rows var ksRows = (nRounds + 1) * 4; // Compute key schedule var keySchedule = this._keySchedule = []; for (var ksRow = 0; ksRow < ksRows; ksRow++) { if (ksRow < keySize) { keySchedule[ksRow] = keyWords[ksRow]; } else { t = keySchedule[ksRow - 1]; if (!(ksRow % keySize)) { // Rot word t = t << 8 | t >>> 24; // Sub word t = SBOX[t >>> 24] << 24 | SBOX[t >>> 16 & 0xff] << 16 | SBOX[t >>> 8 & 0xff] << 8 | SBOX[t & 0xff]; // Mix Rcon t ^= RCON[ksRow / keySize | 0] << 24; } else if (keySize > 6 && ksRow % keySize == 4) { // Sub word t = SBOX[t >>> 24] << 24 | SBOX[t >>> 16 & 0xff] << 16 | SBOX[t >>> 8 & 0xff] << 8 | SBOX[t & 0xff]; } keySchedule[ksRow] = keySchedule[ksRow - keySize] ^ t; } } // Compute inv key schedule var invKeySchedule = this._invKeySchedule = []; for (var invKsRow = 0; invKsRow < ksRows; invKsRow++) { var ksRow = ksRows - invKsRow; if (invKsRow % 4) { var t = keySchedule[ksRow]; } else { var t = keySchedule[ksRow - 4]; } if (invKsRow < 4 || ksRow <= 4) { invKeySchedule[invKsRow] = t; } else { invKeySchedule[invKsRow] = INV_SUB_MIX_0[SBOX[t >>> 24]] ^ INV_SUB_MIX_1[SBOX[t >>> 16 & 0xff]] ^ INV_SUB_MIX_2[SBOX[t >>> 8 & 0xff]] ^ INV_SUB_MIX_3[SBOX[t & 0xff]]; } } }, encryptBlock: function encryptBlock(M, offset) { this._doCryptBlock(M, offset, this._keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX); }, decryptBlock: function decryptBlock(M, offset) { // Swap 2nd and 4th rows var t = M[offset + 1]; M[offset + 1] = M[offset + 3]; M[offset + 3] = t; this._doCryptBlock(M, offset, this._invKeySchedule, INV_SUB_MIX_0, INV_SUB_MIX_1, INV_SUB_MIX_2, INV_SUB_MIX_3, INV_SBOX); // Inv swap 2nd and 4th rows var t = M[offset + 1]; M[offset + 1] = M[offset + 3]; M[offset + 3] = t; }, _doCryptBlock: function _doCryptBlock(M, offset, keySchedule, SUB_MIX_0, SUB_MIX_1, SUB_MIX_2, SUB_MIX_3, SBOX) { // Shortcut var nRounds = this._nRounds; // Get input, add round key var s0 = M[offset] ^ keySchedule[0]; var s1 = M[offset + 1] ^ keySchedule[1]; var s2 = M[offset + 2] ^ keySchedule[2]; var s3 = M[offset + 3] ^ keySchedule[3]; // Key schedule row counter var ksRow = 4; // Rounds for (var round = 1; round < nRounds; round++) { // Shift rows, sub bytes, mix columns, add round key var t0 = SUB_MIX_0[s0 >>> 24] ^ SUB_MIX_1[s1 >>> 16 & 0xff] ^ SUB_MIX_2[s2 >>> 8 & 0xff] ^ SUB_MIX_3[s3 & 0xff] ^ keySchedule[ksRow++]; var t1 = SUB_MIX_0[s1 >>> 24] ^ SUB_MIX_1[s2 >>> 16 & 0xff] ^ SUB_MIX_2[s3 >>> 8 & 0xff] ^ SUB_MIX_3[s0 & 0xff] ^ keySchedule[ksRow++]; var t2 = SUB_MIX_0[s2 >>> 24] ^ SUB_MIX_1[s3 >>> 16 & 0xff] ^ SUB_MIX_2[s0 >>> 8 & 0xff] ^ SUB_MIX_3[s1 & 0xff] ^ keySchedule[ksRow++]; var t3 = SUB_MIX_0[s3 >>> 24] ^ SUB_MIX_1[s0 >>> 16 & 0xff] ^ SUB_MIX_2[s1 >>> 8 & 0xff] ^ SUB_MIX_3[s2 & 0xff] ^ keySchedule[ksRow++]; // Update state s0 = t0; s1 = t1; s2 = t2; s3 = t3; } // Shift rows, sub bytes, add round key var t0 = (SBOX[s0 >>> 24] << 24 | SBOX[s1 >>> 16 & 0xff] << 16 | SBOX[s2 >>> 8 & 0xff] << 8 | SBOX[s3 & 0xff]) ^ keySchedule[ksRow++]; var t1 = (SBOX[s1 >>> 24] << 24 | SBOX[s2 >>> 16 & 0xff] << 16 | SBOX[s3 >>> 8 & 0xff] << 8 | SBOX[s0 & 0xff]) ^ keySchedule[ksRow++]; var t2 = (SBOX[s2 >>> 24] << 24 | SBOX[s3 >>> 16 & 0xff] << 16 | SBOX[s0 >>> 8 & 0xff] << 8 | SBOX[s1 & 0xff]) ^ keySchedule[ksRow++]; var t3 = (SBOX[s3 >>> 24] << 24 | SBOX[s0 >>> 16 & 0xff] << 16 | SBOX[s1 >>> 8 & 0xff] << 8 | SBOX[s2 & 0xff]) ^ keySchedule[ksRow++]; // Set output M[offset] = t0; M[offset + 1] = t1; M[offset + 2] = t2; M[offset + 3] = t3; }, keySize: 256 / 32 }); /** * Shortcut functions to the cipher's object interface. * * @example * * var ciphertext = CryptoJS.AES.encrypt(message, key, cfg); * var plaintext = CryptoJS.AES.decrypt(ciphertext, key, cfg); */ C.AES = BlockCipher._createHelper(AES); })(); return CryptoJS.AES; }); /***/ }), /***/ 1582: /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__(7042); __webpack_require__(2222); __webpack_require__(1539); __webpack_require__(9714); __webpack_require__(561); ; (function (root, factory, undef) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(757), __webpack_require__(3839)); } else {} })(void 0, function (CryptoJS) { /** * Cipher core components. */ CryptoJS.lib.Cipher || function (undefined) { // Shortcuts var C = CryptoJS; var C_lib = C.lib; var Base = C_lib.Base; var WordArray = C_lib.WordArray; var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm; var C_enc = C.enc; var Utf8 = C_enc.Utf8; var Base64 = C_enc.Base64; var C_algo = C.algo; var EvpKDF = C_algo.EvpKDF; /** * Abstract base cipher template. * * @property {number} keySize This cipher's key size. Default: 4 (128 bits) * @property {number} ivSize This cipher's IV size. Default: 4 (128 bits) * @property {number} _ENC_XFORM_MODE A constant representing encryption mode. * @property {number} _DEC_XFORM_MODE A constant representing decryption mode. */ var Cipher = C_lib.Cipher = BufferedBlockAlgorithm.extend({ /** * Configuration options. * * @property {WordArray} iv The IV to use for this operation. */ cfg: Base.extend(), /** * Creates this cipher in encryption mode. * * @param {WordArray} key The key. * @param {Object} cfg (Optional) The configuration options to use for this operation. * * @return {Cipher} A cipher instance. * * @static * * @example * * var cipher = CryptoJS.algo.AES.createEncryptor(keyWordArray, { iv: ivWordArray }); */ createEncryptor: function createEncryptor(key, cfg) { return this.create(this._ENC_XFORM_MODE, key, cfg); }, /** * Creates this cipher in decryption mode. * * @param {WordArray} key The key. * @param {Object} cfg (Optional) The configuration options to use for this operation. * * @return {Cipher} A cipher instance. * * @static * * @example * * var cipher = CryptoJS.algo.AES.createDecryptor(keyWordArray, { iv: ivWordArray }); */ createDecryptor: function createDecryptor(key, cfg) { return this.create(this._DEC_XFORM_MODE, key, cfg); }, /** * Initializes a newly created cipher. * * @param {number} xformMode Either the encryption or decryption transormation mode constant. * @param {WordArray} key The key. * @param {Object} cfg (Optional) The configuration options to use for this operation. * * @example * * var cipher = CryptoJS.algo.AES.create(CryptoJS.algo.AES._ENC_XFORM_MODE, keyWordArray, { iv: ivWordArray }); */ init: function init(xformMode, key, cfg) { // Apply config defaults this.cfg = this.cfg.extend(cfg); // Store transform mode and key this._xformMode = xformMode; this._key = key; // Set initial values this.reset(); }, /** * Resets this cipher to its initial state. * * @example * * cipher.reset(); */ reset: function reset() { // Reset data buffer BufferedBlockAlgorithm.reset.call(this); // Perform concrete-cipher logic this._doReset(); }, /** * Adds data to be encrypted or decrypted. * * @param {WordArray|string} dataUpdate The data to encrypt or decrypt. * * @return {WordArray} The data after processing. * * @example * * var encrypted = cipher.process('data'); * var encrypted = cipher.process(wordArray); */ process: function process(dataUpdate) { // Append this._append(dataUpdate); // Process available blocks return this._process(); }, /** * Finalizes the encryption or decryption process. * Note that the finalize operation is effectively a destructive, read-once operation. * * @param {WordArray|string} dataUpdate The final data to encrypt or decrypt. * * @return {WordArray} The data after final processing. * * @example * * var encrypted = cipher.finalize(); * var encrypted = cipher.finalize('data'); * var encrypted = cipher.finalize(wordArray); */ finalize: function finalize(dataUpdate) { // Final data update if (dataUpdate) { this._append(dataUpdate); } // Perform concrete-cipher logic var finalProcessedData = this._doFinalize(); return finalProcessedData; }, keySize: 128 / 32, ivSize: 128 / 32, _ENC_XFORM_MODE: 1, _DEC_XFORM_MODE: 2, /** * Creates shortcut functions to a cipher's object interface. * * @param {Cipher} cipher The cipher to create a helper for. * * @return {Object} An object with encrypt and decrypt shortcut functions. * * @static * * @example * * var AES = CryptoJS.lib.Cipher._createHelper(CryptoJS.algo.AES); */ _createHelper: function () { function selectCipherStrategy(key) { if (typeof key == 'string') { return PasswordBasedCipher; } else { return SerializableCipher; } } return function (cipher) { return { encrypt: function encrypt(message, key, cfg) { return selectCipherStrategy(key).encrypt(cipher, message, key, cfg); }, decrypt: function decrypt(ciphertext, key, cfg) { return selectCipherStrategy(key).decrypt(cipher, ciphertext, key, cfg); } }; }; }() }); /** * Abstract base stream cipher template. * * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 1 (32 bits) */ var StreamCipher = C_lib.StreamCipher = Cipher.extend({ _doFinalize: function _doFinalize() { // Process partial blocks var finalProcessedBlocks = this._process(!!'flush'); return finalProcessedBlocks; }, blockSize: 1 }); /** * Mode namespace. */ var C_mode = C.mode = {}; /** * Abstract base block cipher mode template. */ var BlockCipherMode = C_lib.BlockCipherMode = Base.extend({ /** * Creates this mode for encryption. * * @param {Cipher} cipher A block cipher instance. * @param {Array} iv The IV words. * * @static * * @example * * var mode = CryptoJS.mode.CBC.createEncryptor(cipher, iv.words); */ createEncryptor: function createEncryptor(cipher, iv) { return this.Encryptor.create(cipher, iv); }, /** * Creates this mode for decryption. * * @param {Cipher} cipher A block cipher instance. * @param {Array} iv The IV words. * * @static * * @example * * var mode = CryptoJS.mode.CBC.createDecryptor(cipher, iv.words); */ createDecryptor: function createDecryptor(cipher, iv) { return this.Decryptor.create(cipher, iv); }, /** * Initializes a newly created mode. * * @param {Cipher} cipher A block cipher instance. * @param {Array} iv The IV words. * * @example * * var mode = CryptoJS.mode.CBC.Encryptor.create(cipher, iv.words); */ init: function init(cipher, iv) { this._cipher = cipher; this._iv = iv; } }); /** * Cipher Block Chaining mode. */ var CBC = C_mode.CBC = function () { /** * Abstract base CBC mode. */ var CBC = BlockCipherMode.extend(); /** * CBC encryptor. */ CBC.Encryptor = CBC.extend({ /** * Processes the data block at offset. * * @param {Array} words The data words to operate on. * @param {number} offset The offset where the block starts. * * @example * * mode.processBlock(data.words, offset); */ processBlock: function processBlock(words, offset) { // Shortcuts var cipher = this._cipher; var blockSize = cipher.blockSize; // XOR and encrypt xorBlock.call(this, words, offset, blockSize); cipher.encryptBlock(words, offset); // Remember this block to use with next block this._prevBlock = words.slice(offset, offset + blockSize); } }); /** * CBC decryptor. */ CBC.Decryptor = CBC.extend({ /** * Processes the data block at offset. * * @param {Array} words The data words to operate on. * @param {number} offset The offset where the block starts. * * @example * * mode.processBlock(data.words, offset); */ processBlock: function processBlock(words, offset) { // Shortcuts var cipher = this._cipher; var blockSize = cipher.blockSize; // Remember this block to use with next block var thisBlock = words.slice(offset, offset + blockSize); // Decrypt and XOR cipher.decryptBlock(words, offset); xorBlock.call(this, words, offset, blockSize); // This block becomes the previous block this._prevBlock = thisBlock; } }); function xorBlock(words, offset, blockSize) { var block; // Shortcut var iv = this._iv; // Choose mixing block if (iv) { block = iv; // Remove IV for subsequent blocks this._iv = undefined; } else { block = this._prevBlock; } // XOR blocks for (var i = 0; i < blockSize; i++) { words[offset + i] ^= block[i]; } } return CBC; }(); /** * Padding namespace. */ var C_pad = C.pad = {}; /** * PKCS #5/7 padding strategy. */ var Pkcs7 = C_pad.Pkcs7 = { /** * Pads data using the algorithm defined in PKCS #5/7. * * @param {WordArray} data The data to pad. * @param {number} blockSize The multiple that the data should be padded to. * * @static * * @example * * CryptoJS.pad.Pkcs7.pad(wordArray, 4); */ pad: function pad(data, blockSize) { // Shortcut var blockSizeBytes = blockSize * 4; // Count padding bytes var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes; // Create padding word var paddingWord = nPaddingBytes << 24 | nPaddingBytes << 16 | nPaddingBytes << 8 | nPaddingBytes; // Create padding var paddingWords = []; for (var i = 0; i < nPaddingBytes; i += 4) { paddingWords.push(paddingWord); } var padding = WordArray.create(paddingWords, nPaddingBytes); // Add padding data.concat(padding); }, /** * Unpads data that had been padded using the algorithm defined in PKCS #5/7. * * @param {WordArray} data The data to unpad. * * @static * * @example * * CryptoJS.pad.Pkcs7.unpad(wordArray); */ unpad: function unpad(data) { // Get number of padding bytes from last byte var nPaddingBytes = data.words[data.sigBytes - 1 >>> 2] & 0xff; // Remove padding data.sigBytes -= nPaddingBytes; } }; /** * Abstract base block cipher template. * * @property {number} blockSize The number of 32-bit words this cipher operates on. Default: 4 (128 bits) */ var BlockCipher = C_lib.BlockCipher = Cipher.extend({ /** * Configuration options. * * @property {Mode} mode The block mode to use. Default: CBC * @property {Padding} padding The padding strategy to use. Default: Pkcs7 */ cfg: Cipher.cfg.extend({ mode: CBC, padding: Pkcs7 }), reset: function reset() { var modeCreator; // Reset cipher Cipher.reset.call(this); // Shortcuts var cfg = this.cfg; var iv = cfg.iv; var mode = cfg.mode; // Reset block mode if (this._xformMode == this._ENC_XFORM_MODE) { modeCreator = mode.createEncryptor; } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ { modeCreator = mode.createDecryptor; // Keep at least one block in the buffer for unpadding this._minBufferSize = 1; } if (this._mode && this._mode.__creator == modeCreator) { this._mode.init(this, iv && iv.words); } else { this._mode = modeCreator.call(mode, this, iv && iv.words); this._mode.__creator = modeCreator; } }, _doProcessBlock: function _doProcessBlock(words, offset) { this._mode.processBlock(words, offset); }, _doFinalize: function _doFinalize() { var finalProcessedBlocks; // Shortcut var padding = this.cfg.padding; // Finalize if (this._xformMode == this._ENC_XFORM_MODE) { // Pad data padding.pad(this._data, this.blockSize); // Process final blocks finalProcessedBlocks = this._process(!!'flush'); } else /* if (this._xformMode == this._DEC_XFORM_MODE) */ { // Process final blocks finalProcessedBlocks = this._process(!!'flush'); // Unpad data padding.unpad(finalProcessedBlocks); } return finalProcessedBlocks; }, blockSize: 128 / 32 }); /** * A collection of cipher parameters. * * @property {WordArray} ciphertext The raw ciphertext. * @property {WordArray} key The key to this ciphertext. * @property {WordArray} iv The IV used in the ciphering operation. * @property {WordArray} salt The salt used with a key derivation function. * @property {Cipher} algorithm The cipher algorithm. * @property {Mode} mode The block mode used in the ciphering operation. * @property {Padding} padding The padding scheme used in the ciphering operation. * @property {number} blockSize The block size of the cipher. * @property {Format} formatter The default formatting strategy to convert this cipher params object to a string. */ var CipherParams = C_lib.CipherParams = Base.extend({ /** * Initializes a newly created cipher params object. * * @param {Object} cipherParams An object with any of the possible cipher parameters. * * @example * * var cipherParams = CryptoJS.lib.CipherParams.create({ * ciphertext: ciphertextWordArray, * key: keyWordArray, * iv: ivWordArray, * salt: saltWordArray, * algorithm: CryptoJS.algo.AES, * mode: CryptoJS.mode.CBC, * padding: CryptoJS.pad.PKCS7, * blockSize: 4, * formatter: CryptoJS.format.OpenSSL * }); */ init: function init(cipherParams) { this.mixIn(cipherParams); }, /** * Converts this cipher params object to a string. * * @param {Format} formatter (Optional) The formatting strategy to use. * * @return {string} The stringified cipher params. * * @throws Error If neither the formatter nor the default formatter is set. * * @example * * var string = cipherParams + ''; * var string = cipherParams.toString(); * var string = cipherParams.toString(CryptoJS.format.OpenSSL); */ toString: function toString(formatter) { return (formatter || this.formatter).stringify(this); } }); /** * Format namespace. */ var C_format = C.format = {}; /** * OpenSSL formatting strategy. */ var OpenSSLFormatter = C_format.OpenSSL = { /** * Converts a cipher params object to an OpenSSL-compatible string. * * @param {CipherParams} cipherParams The cipher params object. * * @return {string} The OpenSSL-compatible string. * * @static * * @example * * var openSSLString = CryptoJS.format.OpenSSL.stringify(cipherParams); */ stringify: function stringify(cipherParams) { var wordArray; // Shortcuts var ciphertext = cipherParams.ciphertext; var salt = cipherParams.salt; // Format if (salt) { wordArray = WordArray.create([0x53616c74, 0x65645f5f]).concat(salt).concat(ciphertext); } else { wordArray = ciphertext; } return wordArray.toString(Base64); }, /** * Converts an OpenSSL-compatible string to a cipher params object. * * @param {string} openSSLStr The OpenSSL-compatible string. * * @return {CipherParams} The cipher params object. * * @static * * @example * * var cipherParams = CryptoJS.format.OpenSSL.parse(openSSLString); */ parse: function parse(openSSLStr) { var salt; // Parse base64 var ciphertext = Base64.parse(openSSLStr); // Shortcut var ciphertextWords = ciphertext.words; // Test for salt if (ciphertextWords[0] == 0x53616c74 && ciphertextWords[1] == 0x65645f5f) { // Extract salt salt = WordArray.create(ciphertextWords.slice(2, 4)); // Remove salt from ciphertext ciphertextWords.splice(0, 4); ciphertext.sigBytes -= 16; } return CipherParams.create({ ciphertext: ciphertext, salt: salt }); } }; /** * A cipher wrapper that returns ciphertext as a serializable cipher params object. */ var SerializableCipher = C_lib.SerializableCipher = Base.extend({ /** * Configuration options. * * @property {Formatter} format The formatting strategy to convert cipher param objects to and from a string. Default: OpenSSL */ cfg: Base.extend({ format: OpenSSLFormatter }), /** * Encrypts a message. * * @param {Cipher} cipher The cipher algorithm to use. * @param {WordArray|string} message The message to encrypt. * @param {WordArray} key The key. * @param {Object} cfg (Optional) The configuration options to use for this operation. * * @return {CipherParams} A cipher params object. * * @static * * @example * * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key); * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv }); * var ciphertextParams = CryptoJS.lib.SerializableCipher.encrypt(CryptoJS.algo.AES, message, key, { iv: iv, format: CryptoJS.format.OpenSSL }); */ encrypt: function encrypt(cipher, message, key, cfg) { // Apply config defaults cfg = this.cfg.extend(cfg); // Encrypt var encryptor = cipher.createEncryptor(key, cfg); var ciphertext = encryptor.finalize(message); // Shortcut var cipherCfg = encryptor.cfg; // Create and return serializable cipher params return CipherParams.create({ ciphertext: ciphertext, key: key, iv: cipherCfg.iv, algorithm: cipher, mode: cipherCfg.mode, padding: cipherCfg.padding, blockSize: cipher.blockSize, formatter: cfg.format }); }, /** * Decrypts serialized ciphertext. * * @param {Cipher} cipher The cipher algorithm to use. * @param {CipherParams|string} ciphertext The ciphertext to decrypt. * @param {WordArray} key The key. * @param {Object} cfg (Optional) The configuration options to use for this operation. * * @return {WordArray} The plaintext. * * @static * * @example * * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, key, { iv: iv, format: CryptoJS.format.OpenSSL }); * var plaintext = CryptoJS.lib.SerializableCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, key, { iv: iv, format: CryptoJS.format.OpenSSL }); */ decrypt: function decrypt(cipher, ciphertext, key, cfg) { // Apply config defaults cfg = this.cfg.extend(cfg); // Convert string to CipherParams ciphertext = this._parse(ciphertext, cfg.format); // Decrypt var plaintext = cipher.createDecryptor(key, cfg).finalize(ciphertext.ciphertext); return plaintext; }, /** * Converts serialized ciphertext to CipherParams, * else assumed CipherParams already and returns ciphertext unchanged. * * @param {CipherParams|string} ciphertext The ciphertext. * @param {Formatter} format The formatting strategy to use to parse serialized ciphertext. * * @return {CipherParams} The unserialized ciphertext. * * @static * * @example * * var ciphertextParams = CryptoJS.lib.SerializableCipher._parse(ciphertextStringOrParams, format); */ _parse: function _parse(ciphertext, format) { if (typeof ciphertext == 'string') { return format.parse(ciphertext, this); } else { return ciphertext; } } }); /** * Key derivation function namespace. */ var C_kdf = C.kdf = {}; /** * OpenSSL key derivation function. */ var OpenSSLKdf = C_kdf.OpenSSL = { /** * Derives a key and IV from a password. * * @param {string} password The password to derive from. * @param {number} keySize The size in words of the key to generate. * @param {number} ivSize The size in words of the IV to generate. * @param {WordArray|string} salt (Optional) A 64-bit salt to use. If omitted, a salt will be generated randomly. * * @return {CipherParams} A cipher params object with the key, IV, and salt. * * @static * * @example * * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32); * var derivedParams = CryptoJS.kdf.OpenSSL.execute('Password', 256/32, 128/32, 'saltsalt'); */ execute: function execute(password, keySize, ivSize, salt) { // Generate random salt if (!salt) { salt = WordArray.random(64 / 8); } // Derive key and IV var key = EvpKDF.create({ keySize: keySize + ivSize }).compute(password, salt); // Separate key and IV var iv = WordArray.create(key.words.slice(keySize), ivSize * 4); key.sigBytes = keySize * 4; // Return params return CipherParams.create({ key: key, iv: iv, salt: salt }); } }; /** * A serializable cipher wrapper that derives the key from a password, * and returns ciphertext as a serializable cipher params object. */ var PasswordBasedCipher = C_lib.PasswordBasedCipher = SerializableCipher.extend({ /** * Configuration options. * * @property {KDF} kdf The key derivation function to use to generate a key and IV from a password. Default: OpenSSL */ cfg: SerializableCipher.cfg.extend({ kdf: OpenSSLKdf }), /** * Encrypts a message using a password. * * @param {Cipher} cipher The cipher algorithm to use. * @param {WordArray|string} message The message to encrypt. * @param {string} password The password. * @param {Object} cfg (Optional) The configuration options to use for this operation. * * @return {CipherParams} A cipher params object. * * @static * * @example * * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password'); * var ciphertextParams = CryptoJS.lib.PasswordBasedCipher.encrypt(CryptoJS.algo.AES, message, 'password', { format: CryptoJS.format.OpenSSL }); */ encrypt: function encrypt(cipher, message, password, cfg) { // Apply config defaults cfg = this.cfg.extend(cfg); // Derive key and other params var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize); // Add IV to config cfg.iv = derivedParams.iv; // Encrypt var ciphertext = SerializableCipher.encrypt.call(this, cipher, message, derivedParams.key, cfg); // Mix in derived params ciphertext.mixIn(derivedParams); return ciphertext; }, /** * Decrypts serialized ciphertext using a password. * * @param {Cipher} cipher The cipher algorithm to use. * @param {CipherParams|string} ciphertext The ciphertext to decrypt. * @param {string} password The password. * @param {Object} cfg (Optional) The configuration options to use for this operation. * * @return {WordArray} The plaintext. * * @static * * @example * * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, formattedCiphertext, 'password', { format: CryptoJS.format.OpenSSL }); * var plaintext = CryptoJS.lib.PasswordBasedCipher.decrypt(CryptoJS.algo.AES, ciphertextParams, 'password', { format: CryptoJS.format.OpenSSL }); */ decrypt: function decrypt(cipher, ciphertext, password, cfg) { // Apply config defaults cfg = this.cfg.extend(cfg); // Convert string to CipherParams ciphertext = this._parse(ciphertext, cfg.format); // Derive key and other params var derivedParams = cfg.kdf.execute(password, cipher.keySize, cipher.ivSize, ciphertext.salt); // Add IV to config cfg.iv = derivedParams.iv; // Decrypt var plaintext = SerializableCipher.decrypt.call(this, cipher, ciphertext, derivedParams.key, cfg); return plaintext; } }); }(); }); /***/ }), /***/ 757: /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__(5743); __webpack_require__(6992); __webpack_require__(1539); __webpack_require__(9135); __webpack_require__(2990); __webpack_require__(8927); __webpack_require__(3105); __webpack_require__(5035); __webpack_require__(4345); __webpack_require__(7174); __webpack_require__(2846); __webpack_require__(4731); __webpack_require__(7209); __webpack_require__(6319); __webpack_require__(8867); __webpack_require__(7789); __webpack_require__(3739); __webpack_require__(9368); __webpack_require__(4483); __webpack_require__(2056); __webpack_require__(3462); __webpack_require__(678); __webpack_require__(7462); __webpack_require__(3824); __webpack_require__(5021); __webpack_require__(2974); __webpack_require__(5016); __webpack_require__(9714); __webpack_require__(7042); __webpack_require__(9600); __webpack_require__(2222); __webpack_require__(561); ; (function (root, factory) { if (true) { // CommonJS module.exports = exports = factory(); } else {} })(void 0, function () { /*globals window, global, require*/ /** * CryptoJS core components. */ var CryptoJS = CryptoJS || function (Math, undefined) { var crypto; // Native crypto from window (Browser) if (typeof window !== 'undefined' && window.crypto) { crypto = window.crypto; } // Native crypto in web worker (Browser) if (typeof self !== 'undefined' && self.crypto) { crypto = self.crypto; } // Native crypto from worker if (typeof globalThis !== 'undefined' && globalThis.crypto) { crypto = globalThis.crypto; } // Native (experimental IE 11) crypto from window (Browser) if (!crypto && typeof window !== 'undefined' && window.msCrypto) { crypto = window.msCrypto; } // Native crypto from global (NodeJS) if (!crypto && typeof __webpack_require__.g !== 'undefined' && __webpack_require__.g.crypto) { crypto = __webpack_require__.g.crypto; } // Native crypto import via require (NodeJS) if (!crypto && "function" === 'function') { try { crypto = __webpack_require__(2480); } catch (err) {} } /* * Cryptographically secure pseudorandom number generator * * As Math.random() is cryptographically not safe to use */ var cryptoSecureRandomInt = function cryptoSecureRandomInt() { if (crypto) { // Use getRandomValues method (Browser) if (typeof crypto.getRandomValues === 'function') { try { return crypto.getRandomValues(new Uint32Array(1))[0]; } catch (err) {} } // Use randomBytes method (NodeJS) if (typeof crypto.randomBytes === 'function') { try { return crypto.randomBytes(4).readInt32LE(); } catch (err) {} } } throw new Error('Native crypto module could not be used to get secure random number.'); }; /* * Local polyfill of Object.create */ var create = Object.create || function () { function F() {} return function (obj) { var subtype; F.prototype = obj; subtype = new F(); F.prototype = null; return subtype; }; }(); /** * CryptoJS namespace. */ var C = {}; /** * Library namespace. */ var C_lib = C.lib = {}; /** * Base object for prototypal inheritance. */ var Base = C_lib.Base = function () { return { /** * Creates a new object that inherits from this object. * * @param {Object} overrides Properties to copy into the new object. * * @return {Object} The new object. * * @static * * @example * * var MyType = CryptoJS.lib.Base.extend({ * field: 'value', * * method: function () { * } * }); */ extend: function extend(overrides) { // Spawn var subtype = create(this); // Augment if (overrides) { subtype.mixIn(overrides); } // Create default initializer if (!subtype.hasOwnProperty('init') || this.init === subtype.init) { subtype.init = function () { subtype.$super.init.apply(this, arguments); }; } // Initializer's prototype is the subtype object subtype.init.prototype = subtype; // Reference supertype subtype.$super = this; return subtype; }, /** * Extends this object and runs the init method. * Arguments to create() will be passed to init(). * * @return {Object} The new object. * * @static * * @example * * var instance = MyType.create(); */ create: function create() { var instance = this.extend(); instance.init.apply(instance, arguments); return instance; }, /** * Initializes a newly created object. * Override this method to add some logic when your objects are created. * * @example * * var MyType = CryptoJS.lib.Base.extend({ * init: function () { * // ... * } * }); */ init: function init() {}, /** * Copies properties into this object. * * @param {Object} properties The properties to mix in. * * @example * * MyType.mixIn({ * field: 'value' * }); */ mixIn: function mixIn(properties) { for (var propertyName in properties) { if (properties.hasOwnProperty(propertyName)) { this[propertyName] = properties[propertyName]; } } // IE won't copy toString using the loop above if (properties.hasOwnProperty('toString')) { this.toString = properties.toString; } }, /** * Creates a copy of this object. * * @return {Object} The clone. * * @example * * var clone = instance.clone(); */ clone: function clone() { return this.init.prototype.extend(this); } }; }(); /** * An array of 32-bit words. * * @property {Array} words The array of 32-bit words. * @property {number} sigBytes The number of significant bytes in this word array. */ var WordArray = C_lib.WordArray = Base.extend({ /** * Initializes a newly created word array. * * @param {Array} words (Optional) An array of 32-bit words. * @param {number} sigBytes (Optional) The number of significant bytes in the words. * * @example * * var wordArray = CryptoJS.lib.WordArray.create(); * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607]); * var wordArray = CryptoJS.lib.WordArray.create([0x00010203, 0x04050607], 6); */ init: function init(words, sigBytes) { words = this.words = words || []; if (sigBytes != undefined) { this.sigBytes = sigBytes; } else { this.sigBytes = words.length * 4; } }, /** * Converts this word array to a string. * * @param {Encoder} encoder (Optional) The encoding strategy to use. Default: CryptoJS.enc.Hex * * @return {string} The stringified word array. * * @example * * var string = wordArray + ''; * var string = wordArray.toString(); * var string = wordArray.toString(CryptoJS.enc.Utf8); */ toString: function toString(encoder) { return (encoder || Hex).stringify(this); }, /** * Concatenates a word array to this word array. * * @param {WordArray} wordArray The word array to append. * * @return {WordArray} This word array. * * @example * * wordArray1.concat(wordArray2); */ concat: function concat(wordArray) { // Shortcuts var thisWords = this.words; var thatWords = wordArray.words; var thisSigBytes = this.sigBytes; var thatSigBytes = wordArray.sigBytes; // Clamp excess bits this.clamp(); // Concat if (thisSigBytes % 4) { // Copy one byte at a time for (var i = 0; i < thatSigBytes; i++) { var thatByte = thatWords[i >>> 2] >>> 24 - i % 4 * 8 & 0xff; thisWords[thisSigBytes + i >>> 2] |= thatByte << 24 - (thisSigBytes + i) % 4 * 8; } } else { // Copy one word at a time for (var j = 0; j < thatSigBytes; j += 4) { thisWords[thisSigBytes + j >>> 2] = thatWords[j >>> 2]; } } this.sigBytes += thatSigBytes; // Chainable return this; }, /** * Removes insignificant bits. * * @example * * wordArray.clamp(); */ clamp: function clamp() { // Shortcuts var words = this.words; var sigBytes = this.sigBytes; // Clamp words[sigBytes >>> 2] &= 0xffffffff << 32 - sigBytes % 4 * 8; words.length = Math.ceil(sigBytes / 4); }, /** * Creates a copy of this word array. * * @return {WordArray} The clone. * * @example * * var clone = wordArray.clone(); */ clone: function clone() { var clone = Base.clone.call(this); clone.words = this.words.slice(0); return clone; }, /** * Creates a word array filled with random bytes. * * @param {number} nBytes The number of random bytes to generate. * * @return {WordArray} The random word array. * * @static * * @example * * var wordArray = CryptoJS.lib.WordArray.random(16); */ random: function random(nBytes) { var words = []; for (var i = 0; i < nBytes; i += 4) { words.push(cryptoSecureRandomInt()); } return new WordArray.init(words, nBytes); } }); /** * Encoder namespace. */ var C_enc = C.enc = {}; /** * Hex encoding strategy. */ var Hex = C_enc.Hex = { /** * Converts a word array to a hex string. * * @param {WordArray} wordArray The word array. * * @return {string} The hex string. * * @static * * @example * * var hexString = CryptoJS.enc.Hex.stringify(wordArray); */ stringify: function stringify(wordArray) { // Shortcuts var words = wordArray.words; var sigBytes = wordArray.sigBytes; // Convert var hexChars = []; for (var i = 0; i < sigBytes; i++) { var bite = words[i >>> 2] >>> 24 - i % 4 * 8 & 0xff; hexChars.push((bite >>> 4).toString(16)); hexChars.push((bite & 0x0f).toString(16)); } return hexChars.join(''); }, /** * Converts a hex string to a word array. * * @param {string} hexStr The hex string. * * @return {WordArray} The word array. * * @static * * @example * * var wordArray = CryptoJS.enc.Hex.parse(hexString); */ parse: function parse(hexStr) { // Shortcut var hexStrLength = hexStr.length; // Convert var words = []; for (var i = 0; i < hexStrLength; i += 2) { words[i >>> 3] |= parseInt(hexStr.substr(i, 2), 16) << 24 - i % 8 * 4; } return new WordArray.init(words, hexStrLength / 2); } }; /** * Latin1 encoding strategy. */ var Latin1 = C_enc.Latin1 = { /** * Converts a word array to a Latin1 string. * * @param {WordArray} wordArray The word array. * * @return {string} The Latin1 string. * * @static * * @example * * var latin1String = CryptoJS.enc.Latin1.stringify(wordArray); */ stringify: function stringify(wordArray) { // Shortcuts var words = wordArray.words; var sigBytes = wordArray.sigBytes; // Convert var latin1Chars = []; for (var i = 0; i < sigBytes; i++) { var bite = words[i >>> 2] >>> 24 - i % 4 * 8 & 0xff; latin1Chars.push(String.fromCharCode(bite)); } return latin1Chars.join(''); }, /** * Converts a Latin1 string to a word array. * * @param {string} latin1Str The Latin1 string. * * @return {WordArray} The word array. * * @static * * @example * * var wordArray = CryptoJS.enc.Latin1.parse(latin1String); */ parse: function parse(latin1Str) { // Shortcut var latin1StrLength = latin1Str.length; // Convert var words = []; for (var i = 0; i < latin1StrLength; i++) { words[i >>> 2] |= (latin1Str.charCodeAt(i) & 0xff) << 24 - i % 4 * 8; } return new WordArray.init(words, latin1StrLength); } }; /** * UTF-8 encoding strategy. */ var Utf8 = C_enc.Utf8 = { /** * Converts a word array to a UTF-8 string. * * @param {WordArray} wordArray The word array. * * @return {string} The UTF-8 string. * * @static * * @example * * var utf8String = CryptoJS.enc.Utf8.stringify(wordArray); */ stringify: function stringify(wordArray) { try { return decodeURIComponent(escape(Latin1.stringify(wordArray))); } catch (e) { throw new Error('Malformed UTF-8 data'); } }, /** * Converts a UTF-8 string to a word array. * * @param {string} utf8Str The UTF-8 string. * * @return {WordArray} The word array. * * @static * * @example * * var wordArray = CryptoJS.enc.Utf8.parse(utf8String); */ parse: function parse(utf8Str) { return Latin1.parse(unescape(encodeURIComponent(utf8Str))); } }; /** * Abstract buffered block algorithm template. * * The property blockSize must be implemented in a concrete subtype. * * @property {number} _minBufferSize The number of blocks that should be kept unprocessed in the buffer. Default: 0 */ var BufferedBlockAlgorithm = C_lib.BufferedBlockAlgorithm = Base.extend({ /** * Resets this block algorithm's data buffer to its initial state. * * @example * * bufferedBlockAlgorithm.reset(); */ reset: function reset() { // Initial values this._data = new WordArray.init(); this._nDataBytes = 0; }, /** * Adds new data to this block algorithm's buffer. * * @param {WordArray|string} data The data to append. Strings are converted to a WordArray using UTF-8. * * @example * * bufferedBlockAlgorithm._append('data'); * bufferedBlockAlgorithm._append(wordArray); */ _append: function _append(data) { // Convert string to WordArray, else assume WordArray already if (typeof data == 'string') { data = Utf8.parse(data); } // Append this._data.concat(data); this._nDataBytes += data.sigBytes; }, /** * Processes available data blocks. * * This method invokes _doProcessBlock(offset), which must be implemented by a concrete subtype. * * @param {boolean} doFlush Whether all blocks and partial blocks should be processed. * * @return {WordArray} The processed data. * * @example * * var processedData = bufferedBlockAlgorithm._process(); * var processedData = bufferedBlockAlgorithm._process(!!'flush'); */ _process: function _process(doFlush) { var processedWords; // Shortcuts var data = this._data; var dataWords = data.words; var dataSigBytes = data.sigBytes; var blockSize = this.blockSize; var blockSizeBytes = blockSize * 4; // Count blocks ready var nBlocksReady = dataSigBytes / blockSizeBytes; if (doFlush) { // Round up to include partial blocks nBlocksReady = Math.ceil(nBlocksReady); } else { // Round down to include only full blocks, // less the number of blocks that must remain in the buffer nBlocksReady = Math.max((nBlocksReady | 0) - this._minBufferSize, 0); } // Count words ready var nWordsReady = nBlocksReady * blockSize; // Count bytes ready var nBytesReady = Math.min(nWordsReady * 4, dataSigBytes); // Process blocks if (nWordsReady) { for (var offset = 0; offset < nWordsReady; offset += blockSize) { // Perform concrete-algorithm logic this._doProcessBlock(dataWords, offset); } // Remove processed words processedWords = dataWords.splice(0, nWordsReady); data.sigBytes -= nBytesReady; } // Return processed words return new WordArray.init(processedWords, nBytesReady); }, /** * Creates a copy of this object. * * @return {Object} The clone. * * @example * * var clone = bufferedBlockAlgorithm.clone(); */ clone: function clone() { var clone = Base.clone.call(this); clone._data = this._data.clone(); return clone; }, _minBufferSize: 0 }); /** * Abstract hasher template. * * @property {number} blockSize The number of 32-bit words this hasher operates on. Default: 16 (512 bits) */ var Hasher = C_lib.Hasher = BufferedBlockAlgorithm.extend({ /** * Configuration options. */ cfg: Base.extend(), /** * Initializes a newly created hasher. * * @param {Object} cfg (Optional) The configuration options to use for this hash computation. * * @example * * var hasher = CryptoJS.algo.SHA256.create(); */ init: function init(cfg) { // Apply config defaults this.cfg = this.cfg.extend(cfg); // Set initial values this.reset(); }, /** * Resets this hasher to its initial state. * * @example * * hasher.reset(); */ reset: function reset() { // Reset data buffer BufferedBlockAlgorithm.reset.call(this); // Perform concrete-hasher logic this._doReset(); }, /** * Updates this hasher with a message. * * @param {WordArray|string} messageUpdate The message to append. * * @return {Hasher} This hasher. * * @example * * hasher.update('message'); * hasher.update(wordArray); */ update: function update(messageUpdate) { // Append this._append(messageUpdate); // Update the hash this._process(); // Chainable return this; }, /** * Finalizes the hash computation. * Note that the finalize operation is effectively a destructive, read-once operation. * * @param {WordArray|string} messageUpdate (Optional) A final message update. * * @return {WordArray} The hash. * * @example * * var hash = hasher.finalize(); * var hash = hasher.finalize('message'); * var hash = hasher.finalize(wordArray); */ finalize: function finalize(messageUpdate) { // Final message update if (messageUpdate) { this._append(messageUpdate); } // Perform concrete-hasher logic var hash = this._doFinalize(); return hash; }, blockSize: 512 / 32, /** * Creates a shortcut function to a hasher's object interface. * * @param {Hasher} hasher The hasher to create a helper for. * * @return {Function} The shortcut function. * * @static * * @example * * var SHA256 = CryptoJS.lib.Hasher._createHelper(CryptoJS.algo.SHA256); */ _createHelper: function _createHelper(hasher) { return function (message, cfg) { return new hasher.init(cfg).finalize(message); }; }, /** * Creates a shortcut function to the HMAC's object interface. * * @param {Hasher} hasher The hasher to use in this HMAC helper. * * @return {Function} The shortcut function. * * @static * * @example * * var HmacSHA256 = CryptoJS.lib.Hasher._createHmacHelper(CryptoJS.algo.SHA256); */ _createHmacHelper: function _createHmacHelper(hasher) { return function (message, key) { return new C_algo.HMAC.init(hasher, key).finalize(message); }; } }); /** * Algorithm namespace. */ var C_algo = C.algo = {}; return C; }(Math); return CryptoJS; }); /***/ }), /***/ 7508: /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__(9600); ; (function (root, factory) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(757)); } else {} })(void 0, function (CryptoJS) { (function () { // Shortcuts var C = CryptoJS; var C_lib = C.lib; var WordArray = C_lib.WordArray; var C_enc = C.enc; /** * Base64 encoding strategy. */ var Base64 = C_enc.Base64 = { /** * Converts a word array to a Base64 string. * * @param {WordArray} wordArray The word array. * * @return {string} The Base64 string. * * @static * * @example * * var base64String = CryptoJS.enc.Base64.stringify(wordArray); */ stringify: function stringify(wordArray) { // Shortcuts var words = wordArray.words; var sigBytes = wordArray.sigBytes; var map = this._map; // Clamp excess bits wordArray.clamp(); // Convert var base64Chars = []; for (var i = 0; i < sigBytes; i += 3) { var byte1 = words[i >>> 2] >>> 24 - i % 4 * 8 & 0xff; var byte2 = words[i + 1 >>> 2] >>> 24 - (i + 1) % 4 * 8 & 0xff; var byte3 = words[i + 2 >>> 2] >>> 24 - (i + 2) % 4 * 8 & 0xff; var triplet = byte1 << 16 | byte2 << 8 | byte3; for (var j = 0; j < 4 && i + j * 0.75 < sigBytes; j++) { base64Chars.push(map.charAt(triplet >>> 6 * (3 - j) & 0x3f)); } } // Add padding var paddingChar = map.charAt(64); if (paddingChar) { while (base64Chars.length % 4) { base64Chars.push(paddingChar); } } return base64Chars.join(''); }, /** * Converts a Base64 string to a word array. * * @param {string} base64Str The Base64 string. * * @return {WordArray} The word array. * * @static * * @example * * var wordArray = CryptoJS.enc.Base64.parse(base64String); */ parse: function parse(base64Str) { // Shortcuts var base64StrLength = base64Str.length; var map = this._map; var reverseMap = this._reverseMap; if (!reverseMap) { reverseMap = this._reverseMap = []; for (var j = 0; j < map.length; j++) { reverseMap[map.charCodeAt(j)] = j; } } // Ignore padding var paddingChar = map.charAt(64); if (paddingChar) { var paddingIndex = base64Str.indexOf(paddingChar); if (paddingIndex !== -1) { base64StrLength = paddingIndex; } } // Convert return parseLoop(base64Str, base64StrLength, reverseMap); }, _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=' }; function parseLoop(base64Str, base64StrLength, reverseMap) { var words = []; var nBytes = 0; for (var i = 0; i < base64StrLength; i++) { if (i % 4) { var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << i % 4 * 2; var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> 6 - i % 4 * 2; var bitsCombined = bits1 | bits2; words[nBytes >>> 2] |= bitsCombined << 24 - nBytes % 4 * 8; nBytes++; } } return WordArray.create(words, nBytes); } })(); return CryptoJS.enc.Base64; }); /***/ }), /***/ 7590: /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__(9600); ; (function (root, factory) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(757)); } else {} })(void 0, function (CryptoJS) { (function () { // Shortcuts var C = CryptoJS; var C_lib = C.lib; var WordArray = C_lib.WordArray; var C_enc = C.enc; /** * Base64url encoding strategy. */ var Base64url = C_enc.Base64url = { /** * Converts a word array to a Base64url string. * * @param {WordArray} wordArray The word array. * * @param {boolean} urlSafe Whether to use url safe * * @return {string} The Base64url string. * * @static * * @example * * var base64String = CryptoJS.enc.Base64url.stringify(wordArray); */ stringify: function stringify(wordArray, urlSafe) { if (urlSafe === void 0) { urlSafe = true; } // Shortcuts var words = wordArray.words; var sigBytes = wordArray.sigBytes; var map = urlSafe ? this._safe_map : this._map; // Clamp excess bits wordArray.clamp(); // Convert var base64Chars = []; for (var i = 0; i < sigBytes; i += 3) { var byte1 = words[i >>> 2] >>> 24 - i % 4 * 8 & 0xff; var byte2 = words[i + 1 >>> 2] >>> 24 - (i + 1) % 4 * 8 & 0xff; var byte3 = words[i + 2 >>> 2] >>> 24 - (i + 2) % 4 * 8 & 0xff; var triplet = byte1 << 16 | byte2 << 8 | byte3; for (var j = 0; j < 4 && i + j * 0.75 < sigBytes; j++) { base64Chars.push(map.charAt(triplet >>> 6 * (3 - j) & 0x3f)); } } // Add padding var paddingChar = map.charAt(64); if (paddingChar) { while (base64Chars.length % 4) { base64Chars.push(paddingChar); } } return base64Chars.join(''); }, /** * Converts a Base64url string to a word array. * * @param {string} base64Str The Base64url string. * * @param {boolean} urlSafe Whether to use url safe * * @return {WordArray} The word array. * * @static * * @example * * var wordArray = CryptoJS.enc.Base64url.parse(base64String); */ parse: function parse(base64Str, urlSafe) { if (urlSafe === void 0) { urlSafe = true; } // Shortcuts var base64StrLength = base64Str.length; var map = urlSafe ? this._safe_map : this._map; var reverseMap = this._reverseMap; if (!reverseMap) { reverseMap = this._reverseMap = []; for (var j = 0; j < map.length; j++) { reverseMap[map.charCodeAt(j)] = j; } } // Ignore padding var paddingChar = map.charAt(64); if (paddingChar) { var paddingIndex = base64Str.indexOf(paddingChar); if (paddingIndex !== -1) { base64StrLength = paddingIndex; } } // Convert return parseLoop(base64Str, base64StrLength, reverseMap); }, _map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=', _safe_map: 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_' }; function parseLoop(base64Str, base64StrLength, reverseMap) { var words = []; var nBytes = 0; for (var i = 0; i < base64StrLength; i++) { if (i % 4) { var bits1 = reverseMap[base64Str.charCodeAt(i - 1)] << i % 4 * 2; var bits2 = reverseMap[base64Str.charCodeAt(i)] >>> 6 - i % 4 * 2; var bitsCombined = bits1 | bits2; words[nBytes >>> 2] |= bitsCombined << 24 - nBytes % 4 * 8; nBytes++; } } return WordArray.create(words, nBytes); } })(); return CryptoJS.enc.Base64url; }); /***/ }), /***/ 4978: /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__(9600); ; (function (root, factory) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(757)); } else {} })(void 0, function (CryptoJS) { (function () { // Shortcuts var C = CryptoJS; var C_lib = C.lib; var WordArray = C_lib.WordArray; var C_enc = C.enc; /** * UTF-16 BE encoding strategy. */ var Utf16BE = C_enc.Utf16 = C_enc.Utf16BE = { /** * Converts a word array to a UTF-16 BE string. * * @param {WordArray} wordArray The word array. * * @return {string} The UTF-16 BE string. * * @static * * @example * * var utf16String = CryptoJS.enc.Utf16.stringify(wordArray); */ stringify: function stringify(wordArray) { // Shortcuts var words = wordArray.words; var sigBytes = wordArray.sigBytes; // Convert var utf16Chars = []; for (var i = 0; i < sigBytes; i += 2) { var codePoint = words[i >>> 2] >>> 16 - i % 4 * 8 & 0xffff; utf16Chars.push(String.fromCharCode(codePoint)); } return utf16Chars.join(''); }, /** * Converts a UTF-16 BE string to a word array. * * @param {string} utf16Str The UTF-16 BE string. * * @return {WordArray} The word array. * * @static * * @example * * var wordArray = CryptoJS.enc.Utf16.parse(utf16String); */ parse: function parse(utf16Str) { // Shortcut var utf16StrLength = utf16Str.length; // Convert var words = []; for (var i = 0; i < utf16StrLength; i++) { words[i >>> 1] |= utf16Str.charCodeAt(i) << 16 - i % 2 * 16; } return WordArray.create(words, utf16StrLength * 2); } }; /** * UTF-16 LE encoding strategy. */ C_enc.Utf16LE = { /** * Converts a word array to a UTF-16 LE string. * * @param {WordArray} wordArray The word array. * * @return {string} The UTF-16 LE string. * * @static * * @example * * var utf16Str = CryptoJS.enc.Utf16LE.stringify(wordArray); */ stringify: function stringify(wordArray) { // Shortcuts var words = wordArray.words; var sigBytes = wordArray.sigBytes; // Convert var utf16Chars = []; for (var i = 0; i < sigBytes; i += 2) { var codePoint = swapEndian(words[i >>> 2] >>> 16 - i % 4 * 8 & 0xffff); utf16Chars.push(String.fromCharCode(codePoint)); } return utf16Chars.join(''); }, /** * Converts a UTF-16 LE string to a word array. * * @param {string} utf16Str The UTF-16 LE string. * * @return {WordArray} The word array. * * @static * * @example * * var wordArray = CryptoJS.enc.Utf16LE.parse(utf16Str); */ parse: function parse(utf16Str) { // Shortcut var utf16StrLength = utf16Str.length; // Convert var words = []; for (var i = 0; i < utf16StrLength; i++) { words[i >>> 1] |= swapEndian(utf16Str.charCodeAt(i) << 16 - i % 2 * 16); } return WordArray.create(words, utf16StrLength * 2); } }; function swapEndian(word) { return word << 8 & 0xff00ff00 | word >>> 8 & 0x00ff00ff; } })(); return CryptoJS.enc.Utf16; }); /***/ }), /***/ 3839: /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__(2222); ; (function (root, factory, undef) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(757), __webpack_require__(9865), __webpack_require__(6727)); } else {} })(void 0, function (CryptoJS) { (function () { // Shortcuts var C = CryptoJS; var C_lib = C.lib; var Base = C_lib.Base; var WordArray = C_lib.WordArray; var C_algo = C.algo; var MD5 = C_algo.MD5; /** * This key derivation function is meant to conform with EVP_BytesToKey. * www.openssl.org/docs/crypto/EVP_BytesToKey.html */ var EvpKDF = C_algo.EvpKDF = Base.extend({ /** * Configuration options. * * @property {number} keySize The key size in words to generate. Default: 4 (128 bits) * @property {Hasher} hasher The hash algorithm to use. Default: MD5 * @property {number} iterations The number of iterations to perform. Default: 1 */ cfg: Base.extend({ keySize: 128 / 32, hasher: MD5, iterations: 1 }), /** * Initializes a newly created key derivation function. * * @param {Object} cfg (Optional) The configuration options to use for the derivation. * * @example * * var kdf = CryptoJS.algo.EvpKDF.create(); * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8 }); * var kdf = CryptoJS.algo.EvpKDF.create({ keySize: 8, iterations: 1000 }); */ init: function init(cfg) { this.cfg = this.cfg.extend(cfg); }, /** * Derives a key from a password. * * @param {WordArray|string} password The password. * @param {WordArray|string} salt A salt. * * @return {WordArray} The derived key. * * @example * * var key = kdf.compute(password, salt); */ compute: function compute(password, salt) { var block; // Shortcut var cfg = this.cfg; // Init hasher var hasher = cfg.hasher.create(); // Initial values var derivedKey = WordArray.create(); // Shortcuts var derivedKeyWords = derivedKey.words; var keySize = cfg.keySize; var iterations = cfg.iterations; // Generate key while (derivedKeyWords.length < keySize) { if (block) { hasher.update(block); } block = hasher.update(password).finalize(salt); hasher.reset(); // Iterations for (var i = 1; i < iterations; i++) { block = hasher.finalize(block); hasher.reset(); } derivedKey.concat(block); } derivedKey.sigBytes = keySize * 4; return derivedKey; } }); /** * Derives a key from a password. * * @param {WordArray|string} password The password. * @param {WordArray|string} salt A salt. * @param {Object} cfg (Optional) The configuration options to use for this computation. * * @return {WordArray} The derived key. * * @static * * @example * * var key = CryptoJS.EvpKDF(password, salt); * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8 }); * var key = CryptoJS.EvpKDF(password, salt, { keySize: 8, iterations: 1000 }); */ C.EvpKDF = function (password, salt, cfg) { return EvpKDF.create(cfg).compute(password, salt); }; })(); return CryptoJS.EvpKDF; }); /***/ }), /***/ 8942: /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__(1539); __webpack_require__(9714); ; (function (root, factory, undef) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(757), __webpack_require__(1582)); } else {} })(void 0, function (CryptoJS) { (function (undefined) { // Shortcuts var C = CryptoJS; var C_lib = C.lib; var CipherParams = C_lib.CipherParams; var C_enc = C.enc; var Hex = C_enc.Hex; var C_format = C.format; var HexFormatter = C_format.Hex = { /** * Converts the ciphertext of a cipher params object to a hexadecimally encoded string. * * @param {CipherParams} cipherParams The cipher params object. * * @return {string} The hexadecimally encoded string. * * @static * * @example * * var hexString = CryptoJS.format.Hex.stringify(cipherParams); */ stringify: function stringify(cipherParams) { return cipherParams.ciphertext.toString(Hex); }, /** * Converts a hexadecimally encoded ciphertext string to a cipher params object. * * @param {string} input The hexadecimally encoded string. * * @return {CipherParams} The cipher params object. * * @static * * @example * * var cipherParams = CryptoJS.format.Hex.parse(hexString); */ parse: function parse(input) { var ciphertext = Hex.parse(input); return CipherParams.create({ ciphertext: ciphertext }); } }; })(); return CryptoJS.format.Hex; }); /***/ }), /***/ 6727: /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__(2222); ; (function (root, factory) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(757)); } else {} })(void 0, function (CryptoJS) { (function () { // Shortcuts var C = CryptoJS; var C_lib = C.lib; var Base = C_lib.Base; var C_enc = C.enc; var Utf8 = C_enc.Utf8; var C_algo = C.algo; /** * HMAC algorithm. */ var HMAC = C_algo.HMAC = Base.extend({ /** * Initializes a newly created HMAC. * * @param {Hasher} hasher The hash algorithm to use. * @param {WordArray|string} key The secret key. * * @example * * var hmacHasher = CryptoJS.algo.HMAC.create(CryptoJS.algo.SHA256, key); */ init: function init(hasher, key) { // Init hasher hasher = this._hasher = new hasher.init(); // Convert string to WordArray, else assume WordArray already if (typeof key == 'string') { key = Utf8.parse(key); } // Shortcuts var hasherBlockSize = hasher.blockSize; var hasherBlockSizeBytes = hasherBlockSize * 4; // Allow arbitrary length keys if (key.sigBytes > hasherBlockSizeBytes) { key = hasher.finalize(key); } // Clamp excess bits key.clamp(); // Clone key for inner and outer pads var oKey = this._oKey = key.clone(); var iKey = this._iKey = key.clone(); // Shortcuts var oKeyWords = oKey.words; var iKeyWords = iKey.words; // XOR keys with pad constants for (var i = 0; i < hasherBlockSize; i++) { oKeyWords[i] ^= 0x5c5c5c5c; iKeyWords[i] ^= 0x36363636; } oKey.sigBytes = iKey.sigBytes = hasherBlockSizeBytes; // Set initial values this.reset(); }, /** * Resets this HMAC to its initial state. * * @example * * hmacHasher.reset(); */ reset: function reset() { // Shortcut var hasher = this._hasher; // Reset hasher.reset(); hasher.update(this._iKey); }, /** * Updates this HMAC with a message. * * @param {WordArray|string} messageUpdate The message to append. * * @return {HMAC} This HMAC instance. * * @example * * hmacHasher.update('message'); * hmacHasher.update(wordArray); */ update: function update(messageUpdate) { this._hasher.update(messageUpdate); // Chainable return this; }, /** * Finalizes the HMAC computation. * Note that the finalize operation is effectively a destructive, read-once operation. * * @param {WordArray|string} messageUpdate (Optional) A final message update. * * @return {WordArray} The HMAC. * * @example * * var hmac = hmacHasher.finalize(); * var hmac = hmacHasher.finalize('message'); * var hmac = hmacHasher.finalize(wordArray); */ finalize: function finalize(messageUpdate) { // Shortcut var hasher = this._hasher; // Compute HMAC var innerHash = hasher.finalize(messageUpdate); hasher.reset(); var hmac = hasher.finalize(this._oKey.clone().concat(innerHash)); return hmac; } }); })(); }); /***/ }), /***/ 5153: /***/ (function(module, exports, __webpack_require__) { "use strict"; ; (function (root, factory, undef) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(757), __webpack_require__(2601), __webpack_require__(1947), __webpack_require__(4978), __webpack_require__(7508), __webpack_require__(7590), __webpack_require__(3440), __webpack_require__(9865), __webpack_require__(8921), __webpack_require__(6876), __webpack_require__(7991), __webpack_require__(8122), __webpack_require__(8342), __webpack_require__(8714), __webpack_require__(6727), __webpack_require__(3486), __webpack_require__(3839), __webpack_require__(1582), __webpack_require__(702), __webpack_require__(2362), __webpack_require__(4412), __webpack_require__(5720), __webpack_require__(3518), __webpack_require__(6362), __webpack_require__(4431), __webpack_require__(8800), __webpack_require__(3992), __webpack_require__(649), __webpack_require__(8942), __webpack_require__(194), __webpack_require__(8437), __webpack_require__(4640), __webpack_require__(5323), __webpack_require__(4363)); } else {} })(void 0, function (CryptoJS) { return CryptoJS; }); /***/ }), /***/ 1947: /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__(7803); __webpack_require__(1539); __webpack_require__(6992); __webpack_require__(2472); __webpack_require__(2990); __webpack_require__(8927); __webpack_require__(3105); __webpack_require__(5035); __webpack_require__(4345); __webpack_require__(7174); __webpack_require__(2846); __webpack_require__(4731); __webpack_require__(7209); __webpack_require__(6319); __webpack_require__(8867); __webpack_require__(7789); __webpack_require__(3739); __webpack_require__(9368); __webpack_require__(4483); __webpack_require__(2056); __webpack_require__(3462); __webpack_require__(678); __webpack_require__(7462); __webpack_require__(3824); __webpack_require__(5021); __webpack_require__(2974); __webpack_require__(5016); __webpack_require__(7145); __webpack_require__(9743); __webpack_require__(5109); __webpack_require__(8255); __webpack_require__(5125); __webpack_require__(9135); __webpack_require__(4197); __webpack_require__(6495); ; (function (root, factory) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(757)); } else {} })(void 0, function (CryptoJS) { (function () { // Check if typed arrays are supported if (typeof ArrayBuffer != 'function') { return; } // Shortcuts var C = CryptoJS; var C_lib = C.lib; var WordArray = C_lib.WordArray; // Reference original init var superInit = WordArray.init; // Augment WordArray.init to handle typed arrays var subInit = WordArray.init = function (typedArray) { // Convert buffers to uint8 if (typedArray instanceof ArrayBuffer) { typedArray = new Uint8Array(typedArray); } // Convert other array views to uint8 if (typedArray instanceof Int8Array || typeof Uint8ClampedArray !== "undefined" && typedArray instanceof Uint8ClampedArray || typedArray instanceof Int16Array || typedArray instanceof Uint16Array || typedArray instanceof Int32Array || typedArray instanceof Uint32Array || typedArray instanceof Float32Array || typedArray instanceof Float64Array) { typedArray = new Uint8Array(typedArray.buffer, typedArray.byteOffset, typedArray.byteLength); } // Handle Uint8Array if (typedArray instanceof Uint8Array) { // Shortcut var typedArrayByteLength = typedArray.byteLength; // Extract bytes var words = []; for (var i = 0; i < typedArrayByteLength; i++) { words[i >>> 2] |= typedArray[i] << 24 - i % 4 * 8; } // Initialize this word array superInit.call(this, words, typedArrayByteLength); } else { // Else call normal init superInit.apply(this, arguments); } }; subInit.prototype = WordArray; })(); return CryptoJS.lib.WordArray; }); /***/ }), /***/ 3440: /***/ (function(module, exports, __webpack_require__) { "use strict"; ; (function (root, factory) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(757)); } else {} })(void 0, function (CryptoJS) { (function (Math) { // Shortcuts var C = CryptoJS; var C_lib = C.lib; var WordArray = C_lib.WordArray; var Hasher = C_lib.Hasher; var C_algo = C.algo; // Constants table var T = []; // Compute constants (function () { for (var i = 0; i < 64; i++) { T[i] = Math.abs(Math.sin(i + 1)) * 0x100000000 | 0; } })(); /** * MD5 hash algorithm. */ var MD5 = C_algo.MD5 = Hasher.extend({ _doReset: function _doReset() { this._hash = new WordArray.init([0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476]); }, _doProcessBlock: function _doProcessBlock(M, offset) { // Swap endian for (var i = 0; i < 16; i++) { // Shortcuts var offset_i = offset + i; var M_offset_i = M[offset_i]; M[offset_i] = (M_offset_i << 8 | M_offset_i >>> 24) & 0x00ff00ff | (M_offset_i << 24 | M_offset_i >>> 8) & 0xff00ff00; } // Shortcuts var H = this._hash.words; var M_offset_0 = M[offset + 0]; var M_offset_1 = M[offset + 1]; var M_offset_2 = M[offset + 2]; var M_offset_3 = M[offset + 3]; var M_offset_4 = M[offset + 4]; var M_offset_5 = M[offset + 5]; var M_offset_6 = M[offset + 6]; var M_offset_7 = M[offset + 7]; var M_offset_8 = M[offset + 8]; var M_offset_9 = M[offset + 9]; var M_offset_10 = M[offset + 10]; var M_offset_11 = M[offset + 11]; var M_offset_12 = M[offset + 12]; var M_offset_13 = M[offset + 13]; var M_offset_14 = M[offset + 14]; var M_offset_15 = M[offset + 15]; // Working varialbes var a = H[0]; var b = H[1]; var c = H[2]; var d = H[3]; // Computation a = FF(a, b, c, d, M_offset_0, 7, T[0]); d = FF(d, a, b, c, M_offset_1, 12, T[1]); c = FF(c, d, a, b, M_offset_2, 17, T[2]); b = FF(b, c, d, a, M_offset_3, 22, T[3]); a = FF(a, b, c, d, M_offset_4, 7, T[4]); d = FF(d, a, b, c, M_offset_5, 12, T[5]); c = FF(c, d, a, b, M_offset_6, 17, T[6]); b = FF(b, c, d, a, M_offset_7, 22, T[7]); a = FF(a, b, c, d, M_offset_8, 7, T[8]); d = FF(d, a, b, c, M_offset_9, 12, T[9]); c = FF(c, d, a, b, M_offset_10, 17, T[10]); b = FF(b, c, d, a, M_offset_11, 22, T[11]); a = FF(a, b, c, d, M_offset_12, 7, T[12]); d = FF(d, a, b, c, M_offset_13, 12, T[13]); c = FF(c, d, a, b, M_offset_14, 17, T[14]); b = FF(b, c, d, a, M_offset_15, 22, T[15]); a = GG(a, b, c, d, M_offset_1, 5, T[16]); d = GG(d, a, b, c, M_offset_6, 9, T[17]); c = GG(c, d, a, b, M_offset_11, 14, T[18]); b = GG(b, c, d, a, M_offset_0, 20, T[19]); a = GG(a, b, c, d, M_offset_5, 5, T[20]); d = GG(d, a, b, c, M_offset_10, 9, T[21]); c = GG(c, d, a, b, M_offset_15, 14, T[22]); b = GG(b, c, d, a, M_offset_4, 20, T[23]); a = GG(a, b, c, d, M_offset_9, 5, T[24]); d = GG(d, a, b, c, M_offset_14, 9, T[25]); c = GG(c, d, a, b, M_offset_3, 14, T[26]); b = GG(b, c, d, a, M_offset_8, 20, T[27]); a = GG(a, b, c, d, M_offset_13, 5, T[28]); d = GG(d, a, b, c, M_offset_2, 9, T[29]); c = GG(c, d, a, b, M_offset_7, 14, T[30]); b = GG(b, c, d, a, M_offset_12, 20, T[31]); a = HH(a, b, c, d, M_offset_5, 4, T[32]); d = HH(d, a, b, c, M_offset_8, 11, T[33]); c = HH(c, d, a, b, M_offset_11, 16, T[34]); b = HH(b, c, d, a, M_offset_14, 23, T[35]); a = HH(a, b, c, d, M_offset_1, 4, T[36]); d = HH(d, a, b, c, M_offset_4, 11, T[37]); c = HH(c, d, a, b, M_offset_7, 16, T[38]); b = HH(b, c, d, a, M_offset_10, 23, T[39]); a = HH(a, b, c, d, M_offset_13, 4, T[40]); d = HH(d, a, b, c, M_offset_0, 11, T[41]); c = HH(c, d, a, b, M_offset_3, 16, T[42]); b = HH(b, c, d, a, M_offset_6, 23, T[43]); a = HH(a, b, c, d, M_offset_9, 4, T[44]); d = HH(d, a, b, c, M_offset_12, 11, T[45]); c = HH(c, d, a, b, M_offset_15, 16, T[46]); b = HH(b, c, d, a, M_offset_2, 23, T[47]); a = II(a, b, c, d, M_offset_0, 6, T[48]); d = II(d, a, b, c, M_offset_7, 10, T[49]); c = II(c, d, a, b, M_offset_14, 15, T[50]); b = II(b, c, d, a, M_offset_5, 21, T[51]); a = II(a, b, c, d, M_offset_12, 6, T[52]); d = II(d, a, b, c, M_offset_3, 10, T[53]); c = II(c, d, a, b, M_offset_10, 15, T[54]); b = II(b, c, d, a, M_offset_1, 21, T[55]); a = II(a, b, c, d, M_offset_8, 6, T[56]); d = II(d, a, b, c, M_offset_15, 10, T[57]); c = II(c, d, a, b, M_offset_6, 15, T[58]); b = II(b, c, d, a, M_offset_13, 21, T[59]); a = II(a, b, c, d, M_offset_4, 6, T[60]); d = II(d, a, b, c, M_offset_11, 10, T[61]); c = II(c, d, a, b, M_offset_2, 15, T[62]); b = II(b, c, d, a, M_offset_9, 21, T[63]); // Intermediate hash value H[0] = H[0] + a | 0; H[1] = H[1] + b | 0; H[2] = H[2] + c | 0; H[3] = H[3] + d | 0; }, _doFinalize: function _doFinalize() { // Shortcuts var data = this._data; var dataWords = data.words; var nBitsTotal = this._nDataBytes * 8; var nBitsLeft = data.sigBytes * 8; // Add padding dataWords[nBitsLeft >>> 5] |= 0x80 << 24 - nBitsLeft % 32; var nBitsTotalH = Math.floor(nBitsTotal / 0x100000000); var nBitsTotalL = nBitsTotal; dataWords[(nBitsLeft + 64 >>> 9 << 4) + 15] = (nBitsTotalH << 8 | nBitsTotalH >>> 24) & 0x00ff00ff | (nBitsTotalH << 24 | nBitsTotalH >>> 8) & 0xff00ff00; dataWords[(nBitsLeft + 64 >>> 9 << 4) + 14] = (nBitsTotalL << 8 | nBitsTotalL >>> 24) & 0x00ff00ff | (nBitsTotalL << 24 | nBitsTotalL >>> 8) & 0xff00ff00; data.sigBytes = (dataWords.length + 1) * 4; // Hash final blocks this._process(); // Shortcuts var hash = this._hash; var H = hash.words; // Swap endian for (var i = 0; i < 4; i++) { // Shortcut var H_i = H[i]; H[i] = (H_i << 8 | H_i >>> 24) & 0x00ff00ff | (H_i << 24 | H_i >>> 8) & 0xff00ff00; } // Return final computed hash return hash; }, clone: function clone() { var clone = Hasher.clone.call(this); clone._hash = this._hash.clone(); return clone; } }); function FF(a, b, c, d, x, s, t) { var n = a + (b & c | ~b & d) + x + t; return (n << s | n >>> 32 - s) + b; } function GG(a, b, c, d, x, s, t) { var n = a + (b & d | c & ~d) + x + t; return (n << s | n >>> 32 - s) + b; } function HH(a, b, c, d, x, s, t) { var n = a + (b ^ c ^ d) + x + t; return (n << s | n >>> 32 - s) + b; } function II(a, b, c, d, x, s, t) { var n = a + (c ^ (b | ~d)) + x + t; return (n << s | n >>> 32 - s) + b; } /** * Shortcut function to the hasher's object interface. * * @param {WordArray|string} message The message to hash. * * @return {WordArray} The hash. * * @static * * @example * * var hash = CryptoJS.MD5('message'); * var hash = CryptoJS.MD5(wordArray); */ C.MD5 = Hasher._createHelper(MD5); /** * Shortcut function to the HMAC's object interface. * * @param {WordArray|string} message The message to hash. * @param {WordArray|string} key The secret key. * * @return {WordArray} The HMAC. * * @static * * @example * * var hmac = CryptoJS.HmacMD5(message, key); */ C.HmacMD5 = Hasher._createHmacHelper(MD5); })(Math); return CryptoJS.MD5; }); /***/ }), /***/ 702: /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__(7042); ; (function (root, factory, undef) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(757), __webpack_require__(1582)); } else {} })(void 0, function (CryptoJS) { /** * Cipher Feedback block mode. */ CryptoJS.mode.CFB = function () { var CFB = CryptoJS.lib.BlockCipherMode.extend(); CFB.Encryptor = CFB.extend({ processBlock: function processBlock(words, offset) { // Shortcuts var cipher = this._cipher; var blockSize = cipher.blockSize; generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher); // Remember this block to use with next block this._prevBlock = words.slice(offset, offset + blockSize); } }); CFB.Decryptor = CFB.extend({ processBlock: function processBlock(words, offset) { // Shortcuts var cipher = this._cipher; var blockSize = cipher.blockSize; // Remember this block to use with next block var thisBlock = words.slice(offset, offset + blockSize); generateKeystreamAndEncrypt.call(this, words, offset, blockSize, cipher); // This block becomes the previous block this._prevBlock = thisBlock; } }); function generateKeystreamAndEncrypt(words, offset, blockSize, cipher) { var keystream; // Shortcut var iv = this._iv; // Generate keystream if (iv) { keystream = iv.slice(0); // Remove IV for subsequent blocks this._iv = undefined; } else { keystream = this._prevBlock; } cipher.encryptBlock(keystream, 0); // Encrypt for (var i = 0; i < blockSize; i++) { words[offset + i] ^= keystream[i]; } } return CFB; }(); return CryptoJS.mode.CFB; }); /***/ }), /***/ 4412: /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__(7042); ; (function (root, factory, undef) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(757), __webpack_require__(1582)); } else {} })(void 0, function (CryptoJS) { /** @preserve * Counter block mode compatible with Dr Brian Gladman fileenc.c * derived from CryptoJS.mode.CTR * Jan Hruby jhruby.web@gmail.com */ CryptoJS.mode.CTRGladman = function () { var CTRGladman = CryptoJS.lib.BlockCipherMode.extend(); function incWord(word) { if ((word >> 24 & 0xff) === 0xff) { //overflow var b1 = word >> 16 & 0xff; var b2 = word >> 8 & 0xff; var b3 = word & 0xff; if (b1 === 0xff) // overflow b1 { b1 = 0; if (b2 === 0xff) { b2 = 0; if (b3 === 0xff) { b3 = 0; } else { ++b3; } } else { ++b2; } } else { ++b1; } word = 0; word += b1 << 16; word += b2 << 8; word += b3; } else { word += 0x01 << 24; } return word; } function incCounter(counter) { if ((counter[0] = incWord(counter[0])) === 0) { // encr_data in fileenc.c from Dr Brian Gladman's counts only with DWORD j < 8 counter[1] = incWord(counter[1]); } return counter; } var Encryptor = CTRGladman.Encryptor = CTRGladman.extend({ processBlock: function processBlock(words, offset) { // Shortcuts var cipher = this._cipher; var blockSize = cipher.blockSize; var iv = this._iv; var counter = this._counter; // Generate keystream if (iv) { counter = this._counter = iv.slice(0); // Remove IV for subsequent blocks this._iv = undefined; } incCounter(counter); var keystream = counter.slice(0); cipher.encryptBlock(keystream, 0); // Encrypt for (var i = 0; i < blockSize; i++) { words[offset + i] ^= keystream[i]; } } }); CTRGladman.Decryptor = Encryptor; return CTRGladman; }(); return CryptoJS.mode.CTRGladman; }); /***/ }), /***/ 2362: /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__(7042); ; (function (root, factory, undef) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(757), __webpack_require__(1582)); } else {} })(void 0, function (CryptoJS) { /** * Counter block mode. */ CryptoJS.mode.CTR = function () { var CTR = CryptoJS.lib.BlockCipherMode.extend(); var Encryptor = CTR.Encryptor = CTR.extend({ processBlock: function processBlock(words, offset) { // Shortcuts var cipher = this._cipher; var blockSize = cipher.blockSize; var iv = this._iv; var counter = this._counter; // Generate keystream if (iv) { counter = this._counter = iv.slice(0); // Remove IV for subsequent blocks this._iv = undefined; } var keystream = counter.slice(0); cipher.encryptBlock(keystream, 0); // Increment counter counter[blockSize - 1] = counter[blockSize - 1] + 1 | 0; // Encrypt for (var i = 0; i < blockSize; i++) { words[offset + i] ^= keystream[i]; } } }); CTR.Decryptor = Encryptor; return CTR; }(); return CryptoJS.mode.CTR; }); /***/ }), /***/ 3518: /***/ (function(module, exports, __webpack_require__) { "use strict"; ; (function (root, factory, undef) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(757), __webpack_require__(1582)); } else {} })(void 0, function (CryptoJS) { /** * Electronic Codebook block mode. */ CryptoJS.mode.ECB = function () { var ECB = CryptoJS.lib.BlockCipherMode.extend(); ECB.Encryptor = ECB.extend({ processBlock: function processBlock(words, offset) { this._cipher.encryptBlock(words, offset); } }); ECB.Decryptor = ECB.extend({ processBlock: function processBlock(words, offset) { this._cipher.decryptBlock(words, offset); } }); return ECB; }(); return CryptoJS.mode.ECB; }); /***/ }), /***/ 5720: /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__(7042); ; (function (root, factory, undef) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(757), __webpack_require__(1582)); } else {} })(void 0, function (CryptoJS) { /** * Output Feedback block mode. */ CryptoJS.mode.OFB = function () { var OFB = CryptoJS.lib.BlockCipherMode.extend(); var Encryptor = OFB.Encryptor = OFB.extend({ processBlock: function processBlock(words, offset) { // Shortcuts var cipher = this._cipher; var blockSize = cipher.blockSize; var iv = this._iv; var keystream = this._keystream; // Generate keystream if (iv) { keystream = this._keystream = iv.slice(0); // Remove IV for subsequent blocks this._iv = undefined; } cipher.encryptBlock(keystream, 0); // Encrypt for (var i = 0; i < blockSize; i++) { words[offset + i] ^= keystream[i]; } } }); OFB.Decryptor = Encryptor; return OFB; }(); return CryptoJS.mode.OFB; }); /***/ }), /***/ 6362: /***/ (function(module, exports, __webpack_require__) { "use strict"; ; (function (root, factory, undef) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(757), __webpack_require__(1582)); } else {} })(void 0, function (CryptoJS) { /** * ANSI X.923 padding strategy. */ CryptoJS.pad.AnsiX923 = { pad: function pad(data, blockSize) { // Shortcuts var dataSigBytes = data.sigBytes; var blockSizeBytes = blockSize * 4; // Count padding bytes var nPaddingBytes = blockSizeBytes - dataSigBytes % blockSizeBytes; // Compute last byte position var lastBytePos = dataSigBytes + nPaddingBytes - 1; // Pad data.clamp(); data.words[lastBytePos >>> 2] |= nPaddingBytes << 24 - lastBytePos % 4 * 8; data.sigBytes += nPaddingBytes; }, unpad: function unpad(data) { // Get number of padding bytes from last byte var nPaddingBytes = data.words[data.sigBytes - 1 >>> 2] & 0xff; // Remove padding data.sigBytes -= nPaddingBytes; } }; return CryptoJS.pad.Ansix923; }); /***/ }), /***/ 4431: /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__(2222); ; (function (root, factory, undef) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(757), __webpack_require__(1582)); } else {} })(void 0, function (CryptoJS) { /** * ISO 10126 padding strategy. */ CryptoJS.pad.Iso10126 = { pad: function pad(data, blockSize) { // Shortcut var blockSizeBytes = blockSize * 4; // Count padding bytes var nPaddingBytes = blockSizeBytes - data.sigBytes % blockSizeBytes; // Pad data.concat(CryptoJS.lib.WordArray.random(nPaddingBytes - 1)).concat(CryptoJS.lib.WordArray.create([nPaddingBytes << 24], 1)); }, unpad: function unpad(data) { // Get number of padding bytes from last byte var nPaddingBytes = data.words[data.sigBytes - 1 >>> 2] & 0xff; // Remove padding data.sigBytes -= nPaddingBytes; } }; return CryptoJS.pad.Iso10126; }); /***/ }), /***/ 8800: /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__(2222); ; (function (root, factory, undef) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(757), __webpack_require__(1582)); } else {} })(void 0, function (CryptoJS) { /** * ISO/IEC 9797-1 Padding Method 2. */ CryptoJS.pad.Iso97971 = { pad: function pad(data, blockSize) { // Add 0x80 byte data.concat(CryptoJS.lib.WordArray.create([0x80000000], 1)); // Zero pad the rest CryptoJS.pad.ZeroPadding.pad(data, blockSize); }, unpad: function unpad(data) { // Remove zero padding CryptoJS.pad.ZeroPadding.unpad(data); // Remove one more byte -- the 0x80 byte data.sigBytes--; } }; return CryptoJS.pad.Iso97971; }); /***/ }), /***/ 649: /***/ (function(module, exports, __webpack_require__) { "use strict"; ; (function (root, factory, undef) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(757), __webpack_require__(1582)); } else {} })(void 0, function (CryptoJS) { /** * A noop padding strategy. */ CryptoJS.pad.NoPadding = { pad: function pad() {}, unpad: function unpad() {} }; return CryptoJS.pad.NoPadding; }); /***/ }), /***/ 3992: /***/ (function(module, exports, __webpack_require__) { "use strict"; ; (function (root, factory, undef) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(757), __webpack_require__(1582)); } else {} })(void 0, function (CryptoJS) { /** * Zero padding strategy. */ CryptoJS.pad.ZeroPadding = { pad: function pad(data, blockSize) { // Shortcut var blockSizeBytes = blockSize * 4; // Pad data.clamp(); data.sigBytes += blockSizeBytes - (data.sigBytes % blockSizeBytes || blockSizeBytes); }, unpad: function unpad(data) { // Shortcut var dataWords = data.words; // Unpad var i = data.sigBytes - 1; for (var i = data.sigBytes - 1; i >= 0; i--) { if (dataWords[i >>> 2] >>> 24 - i % 4 * 8 & 0xff) { data.sigBytes = i + 1; break; } } } }; return CryptoJS.pad.ZeroPadding; }); /***/ }), /***/ 3486: /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__(2222); ; (function (root, factory, undef) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(757), __webpack_require__(9865), __webpack_require__(6727)); } else {} })(void 0, function (CryptoJS) { (function () { // Shortcuts var C = CryptoJS; var C_lib = C.lib; var Base = C_lib.Base; var WordArray = C_lib.WordArray; var C_algo = C.algo; var SHA1 = C_algo.SHA1; var HMAC = C_algo.HMAC; /** * Password-Based Key Derivation Function 2 algorithm. */ var PBKDF2 = C_algo.PBKDF2 = Base.extend({ /** * Configuration options. * * @property {number} keySize The key size in words to generate. Default: 4 (128 bits) * @property {Hasher} hasher The hasher to use. Default: SHA1 * @property {number} iterations The number of iterations to perform. Default: 1 */ cfg: Base.extend({ keySize: 128 / 32, hasher: SHA1, iterations: 1 }), /** * Initializes a newly created key derivation function. * * @param {Object} cfg (Optional) The configuration options to use for the derivation. * * @example * * var kdf = CryptoJS.algo.PBKDF2.create(); * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8 }); * var kdf = CryptoJS.algo.PBKDF2.create({ keySize: 8, iterations: 1000 }); */ init: function init(cfg) { this.cfg = this.cfg.extend(cfg); }, /** * Computes the Password-Based Key Derivation Function 2. * * @param {WordArray|string} password The password. * @param {WordArray|string} salt A salt. * * @return {WordArray} The derived key. * * @example * * var key = kdf.compute(password, salt); */ compute: function compute(password, salt) { // Shortcut var cfg = this.cfg; // Init HMAC var hmac = HMAC.create(cfg.hasher, password); // Initial values var derivedKey = WordArray.create(); var blockIndex = WordArray.create([0x00000001]); // Shortcuts var derivedKeyWords = derivedKey.words; var blockIndexWords = blockIndex.words; var keySize = cfg.keySize; var iterations = cfg.iterations; // Generate key while (derivedKeyWords.length < keySize) { var block = hmac.update(salt).finalize(blockIndex); hmac.reset(); // Shortcuts var blockWords = block.words; var blockWordsLength = blockWords.length; // Iterations var intermediate = block; for (var i = 1; i < iterations; i++) { intermediate = hmac.finalize(intermediate); hmac.reset(); // Shortcut var intermediateWords = intermediate.words; // XOR intermediate with block for (var j = 0; j < blockWordsLength; j++) { blockWords[j] ^= intermediateWords[j]; } } derivedKey.concat(block); blockIndexWords[0]++; } derivedKey.sigBytes = keySize * 4; return derivedKey; } }); /** * Computes the Password-Based Key Derivation Function 2. * * @param {WordArray|string} password The password. * @param {WordArray|string} salt A salt. * @param {Object} cfg (Optional) The configuration options to use for this computation. * * @return {WordArray} The derived key. * * @static * * @example * * var key = CryptoJS.PBKDF2(password, salt); * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8 }); * var key = CryptoJS.PBKDF2(password, salt, { keySize: 8, iterations: 1000 }); */ C.PBKDF2 = function (password, salt, cfg) { return PBKDF2.create(cfg).compute(password, salt); }; })(); return CryptoJS.PBKDF2; }); /***/ }), /***/ 4363: /***/ (function(module, exports, __webpack_require__) { "use strict"; ; (function (root, factory, undef) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(757), __webpack_require__(7508), __webpack_require__(3440), __webpack_require__(3839), __webpack_require__(1582)); } else {} })(void 0, function (CryptoJS) { (function () { // Shortcuts var C = CryptoJS; var C_lib = C.lib; var StreamCipher = C_lib.StreamCipher; var C_algo = C.algo; // Reusable objects var S = []; var C_ = []; var G = []; /** * Rabbit stream cipher algorithm. * * This is a legacy version that neglected to convert the key to little-endian. * This error doesn't affect the cipher's security, * but it does affect its compatibility with other implementations. */ var RabbitLegacy = C_algo.RabbitLegacy = StreamCipher.extend({ _doReset: function _doReset() { // Shortcuts var K = this._key.words; var iv = this.cfg.iv; // Generate initial state values var X = this._X = [K[0], K[3] << 16 | K[2] >>> 16, K[1], K[0] << 16 | K[3] >>> 16, K[2], K[1] << 16 | K[0] >>> 16, K[3], K[2] << 16 | K[1] >>> 16]; // Generate initial counter values var C = this._C = [K[2] << 16 | K[2] >>> 16, K[0] & 0xffff0000 | K[1] & 0x0000ffff, K[3] << 16 | K[3] >>> 16, K[1] & 0xffff0000 | K[2] & 0x0000ffff, K[0] << 16 | K[0] >>> 16, K[2] & 0xffff0000 | K[3] & 0x0000ffff, K[1] << 16 | K[1] >>> 16, K[3] & 0xffff0000 | K[0] & 0x0000ffff]; // Carry bit this._b = 0; // Iterate the system four times for (var i = 0; i < 4; i++) { nextState.call(this); } // Modify the counters for (var i = 0; i < 8; i++) { C[i] ^= X[i + 4 & 7]; } // IV setup if (iv) { // Shortcuts var IV = iv.words; var IV_0 = IV[0]; var IV_1 = IV[1]; // Generate four subvectors var i0 = (IV_0 << 8 | IV_0 >>> 24) & 0x00ff00ff | (IV_0 << 24 | IV_0 >>> 8) & 0xff00ff00; var i2 = (IV_1 << 8 | IV_1 >>> 24) & 0x00ff00ff | (IV_1 << 24 | IV_1 >>> 8) & 0xff00ff00; var i1 = i0 >>> 16 | i2 & 0xffff0000; var i3 = i2 << 16 | i0 & 0x0000ffff; // Modify counter values C[0] ^= i0; C[1] ^= i1; C[2] ^= i2; C[3] ^= i3; C[4] ^= i0; C[5] ^= i1; C[6] ^= i2; C[7] ^= i3; // Iterate the system four times for (var i = 0; i < 4; i++) { nextState.call(this); } } }, _doProcessBlock: function _doProcessBlock(M, offset) { // Shortcut var X = this._X; // Iterate the system nextState.call(this); // Generate four keystream words S[0] = X[0] ^ X[5] >>> 16 ^ X[3] << 16; S[1] = X[2] ^ X[7] >>> 16 ^ X[5] << 16; S[2] = X[4] ^ X[1] >>> 16 ^ X[7] << 16; S[3] = X[6] ^ X[3] >>> 16 ^ X[1] << 16; for (var i = 0; i < 4; i++) { // Swap endian S[i] = (S[i] << 8 | S[i] >>> 24) & 0x00ff00ff | (S[i] << 24 | S[i] >>> 8) & 0xff00ff00; // Encrypt M[offset + i] ^= S[i]; } }, blockSize: 128 / 32, ivSize: 64 / 32 }); function nextState() { // Shortcuts var X = this._X; var C = this._C; // Save old counter values for (var i = 0; i < 8; i++) { C_[i] = C[i]; } // Calculate new counter values C[0] = C[0] + 0x4d34d34d + this._b | 0; C[1] = C[1] + 0xd34d34d3 + (C[0] >>> 0 < C_[0] >>> 0 ? 1 : 0) | 0; C[2] = C[2] + 0x34d34d34 + (C[1] >>> 0 < C_[1] >>> 0 ? 1 : 0) | 0; C[3] = C[3] + 0x4d34d34d + (C[2] >>> 0 < C_[2] >>> 0 ? 1 : 0) | 0; C[4] = C[4] + 0xd34d34d3 + (C[3] >>> 0 < C_[3] >>> 0 ? 1 : 0) | 0; C[5] = C[5] + 0x34d34d34 + (C[4] >>> 0 < C_[4] >>> 0 ? 1 : 0) | 0; C[6] = C[6] + 0x4d34d34d + (C[5] >>> 0 < C_[5] >>> 0 ? 1 : 0) | 0; C[7] = C[7] + 0xd34d34d3 + (C[6] >>> 0 < C_[6] >>> 0 ? 1 : 0) | 0; this._b = C[7] >>> 0 < C_[7] >>> 0 ? 1 : 0; // Calculate the g-values for (var i = 0; i < 8; i++) { var gx = X[i] + C[i]; // Construct high and low argument for squaring var ga = gx & 0xffff; var gb = gx >>> 16; // Calculate high and low result of squaring var gh = ((ga * ga >>> 17) + ga * gb >>> 15) + gb * gb; var gl = ((gx & 0xffff0000) * gx | 0) + ((gx & 0x0000ffff) * gx | 0); // High XOR low G[i] = gh ^ gl; } // Calculate new state values X[0] = G[0] + (G[7] << 16 | G[7] >>> 16) + (G[6] << 16 | G[6] >>> 16) | 0; X[1] = G[1] + (G[0] << 8 | G[0] >>> 24) + G[7] | 0; X[2] = G[2] + (G[1] << 16 | G[1] >>> 16) + (G[0] << 16 | G[0] >>> 16) | 0; X[3] = G[3] + (G[2] << 8 | G[2] >>> 24) + G[1] | 0; X[4] = G[4] + (G[3] << 16 | G[3] >>> 16) + (G[2] << 16 | G[2] >>> 16) | 0; X[5] = G[5] + (G[4] << 8 | G[4] >>> 24) + G[3] | 0; X[6] = G[6] + (G[5] << 16 | G[5] >>> 16) + (G[4] << 16 | G[4] >>> 16) | 0; X[7] = G[7] + (G[6] << 8 | G[6] >>> 24) + G[5] | 0; } /** * Shortcut functions to the cipher's object interface. * * @example * * var ciphertext = CryptoJS.RabbitLegacy.encrypt(message, key, cfg); * var plaintext = CryptoJS.RabbitLegacy.decrypt(ciphertext, key, cfg); */ C.RabbitLegacy = StreamCipher._createHelper(RabbitLegacy); })(); return CryptoJS.RabbitLegacy; }); /***/ }), /***/ 5323: /***/ (function(module, exports, __webpack_require__) { "use strict"; ; (function (root, factory, undef) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(757), __webpack_require__(7508), __webpack_require__(3440), __webpack_require__(3839), __webpack_require__(1582)); } else {} })(void 0, function (CryptoJS) { (function () { // Shortcuts var C = CryptoJS; var C_lib = C.lib; var StreamCipher = C_lib.StreamCipher; var C_algo = C.algo; // Reusable objects var S = []; var C_ = []; var G = []; /** * Rabbit stream cipher algorithm */ var Rabbit = C_algo.Rabbit = StreamCipher.extend({ _doReset: function _doReset() { // Shortcuts var K = this._key.words; var iv = this.cfg.iv; // Swap endian for (var i = 0; i < 4; i++) { K[i] = (K[i] << 8 | K[i] >>> 24) & 0x00ff00ff | (K[i] << 24 | K[i] >>> 8) & 0xff00ff00; } // Generate initial state values var X = this._X = [K[0], K[3] << 16 | K[2] >>> 16, K[1], K[0] << 16 | K[3] >>> 16, K[2], K[1] << 16 | K[0] >>> 16, K[3], K[2] << 16 | K[1] >>> 16]; // Generate initial counter values var C = this._C = [K[2] << 16 | K[2] >>> 16, K[0] & 0xffff0000 | K[1] & 0x0000ffff, K[3] << 16 | K[3] >>> 16, K[1] & 0xffff0000 | K[2] & 0x0000ffff, K[0] << 16 | K[0] >>> 16, K[2] & 0xffff0000 | K[3] & 0x0000ffff, K[1] << 16 | K[1] >>> 16, K[3] & 0xffff0000 | K[0] & 0x0000ffff]; // Carry bit this._b = 0; // Iterate the system four times for (var i = 0; i < 4; i++) { nextState.call(this); } // Modify the counters for (var i = 0; i < 8; i++) { C[i] ^= X[i + 4 & 7]; } // IV setup if (iv) { // Shortcuts var IV = iv.words; var IV_0 = IV[0]; var IV_1 = IV[1]; // Generate four subvectors var i0 = (IV_0 << 8 | IV_0 >>> 24) & 0x00ff00ff | (IV_0 << 24 | IV_0 >>> 8) & 0xff00ff00; var i2 = (IV_1 << 8 | IV_1 >>> 24) & 0x00ff00ff | (IV_1 << 24 | IV_1 >>> 8) & 0xff00ff00; var i1 = i0 >>> 16 | i2 & 0xffff0000; var i3 = i2 << 16 | i0 & 0x0000ffff; // Modify counter values C[0] ^= i0; C[1] ^= i1; C[2] ^= i2; C[3] ^= i3; C[4] ^= i0; C[5] ^= i1; C[6] ^= i2; C[7] ^= i3; // Iterate the system four times for (var i = 0; i < 4; i++) { nextState.call(this); } } }, _doProcessBlock: function _doProcessBlock(M, offset) { // Shortcut var X = this._X; // Iterate the system nextState.call(this); // Generate four keystream words S[0] = X[0] ^ X[5] >>> 16 ^ X[3] << 16; S[1] = X[2] ^ X[7] >>> 16 ^ X[5] << 16; S[2] = X[4] ^ X[1] >>> 16 ^ X[7] << 16; S[3] = X[6] ^ X[3] >>> 16 ^ X[1] << 16; for (var i = 0; i < 4; i++) { // Swap endian S[i] = (S[i] << 8 | S[i] >>> 24) & 0x00ff00ff | (S[i] << 24 | S[i] >>> 8) & 0xff00ff00; // Encrypt M[offset + i] ^= S[i]; } }, blockSize: 128 / 32, ivSize: 64 / 32 }); function nextState() { // Shortcuts var X = this._X; var C = this._C; // Save old counter values for (var i = 0; i < 8; i++) { C_[i] = C[i]; } // Calculate new counter values C[0] = C[0] + 0x4d34d34d + this._b | 0; C[1] = C[1] + 0xd34d34d3 + (C[0] >>> 0 < C_[0] >>> 0 ? 1 : 0) | 0; C[2] = C[2] + 0x34d34d34 + (C[1] >>> 0 < C_[1] >>> 0 ? 1 : 0) | 0; C[3] = C[3] + 0x4d34d34d + (C[2] >>> 0 < C_[2] >>> 0 ? 1 : 0) | 0; C[4] = C[4] + 0xd34d34d3 + (C[3] >>> 0 < C_[3] >>> 0 ? 1 : 0) | 0; C[5] = C[5] + 0x34d34d34 + (C[4] >>> 0 < C_[4] >>> 0 ? 1 : 0) | 0; C[6] = C[6] + 0x4d34d34d + (C[5] >>> 0 < C_[5] >>> 0 ? 1 : 0) | 0; C[7] = C[7] + 0xd34d34d3 + (C[6] >>> 0 < C_[6] >>> 0 ? 1 : 0) | 0; this._b = C[7] >>> 0 < C_[7] >>> 0 ? 1 : 0; // Calculate the g-values for (var i = 0; i < 8; i++) { var gx = X[i] + C[i]; // Construct high and low argument for squaring var ga = gx & 0xffff; var gb = gx >>> 16; // Calculate high and low result of squaring var gh = ((ga * ga >>> 17) + ga * gb >>> 15) + gb * gb; var gl = ((gx & 0xffff0000) * gx | 0) + ((gx & 0x0000ffff) * gx | 0); // High XOR low G[i] = gh ^ gl; } // Calculate new state values X[0] = G[0] + (G[7] << 16 | G[7] >>> 16) + (G[6] << 16 | G[6] >>> 16) | 0; X[1] = G[1] + (G[0] << 8 | G[0] >>> 24) + G[7] | 0; X[2] = G[2] + (G[1] << 16 | G[1] >>> 16) + (G[0] << 16 | G[0] >>> 16) | 0; X[3] = G[3] + (G[2] << 8 | G[2] >>> 24) + G[1] | 0; X[4] = G[4] + (G[3] << 16 | G[3] >>> 16) + (G[2] << 16 | G[2] >>> 16) | 0; X[5] = G[5] + (G[4] << 8 | G[4] >>> 24) + G[3] | 0; X[6] = G[6] + (G[5] << 16 | G[5] >>> 16) + (G[4] << 16 | G[4] >>> 16) | 0; X[7] = G[7] + (G[6] << 8 | G[6] >>> 24) + G[5] | 0; } /** * Shortcut functions to the cipher's object interface. * * @example * * var ciphertext = CryptoJS.Rabbit.encrypt(message, key, cfg); * var plaintext = CryptoJS.Rabbit.decrypt(ciphertext, key, cfg); */ C.Rabbit = StreamCipher._createHelper(Rabbit); })(); return CryptoJS.Rabbit; }); /***/ }), /***/ 4640: /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__(1539); __webpack_require__(8674); ; (function (root, factory, undef) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(757), __webpack_require__(7508), __webpack_require__(3440), __webpack_require__(3839), __webpack_require__(1582)); } else {} })(void 0, function (CryptoJS) { (function () { // Shortcuts var C = CryptoJS; var C_lib = C.lib; var StreamCipher = C_lib.StreamCipher; var C_algo = C.algo; /** * RC4 stream cipher algorithm. */ var RC4 = C_algo.RC4 = StreamCipher.extend({ _doReset: function _doReset() { // Shortcuts var key = this._key; var keyWords = key.words; var keySigBytes = key.sigBytes; // Init sbox var S = this._S = []; for (var i = 0; i < 256; i++) { S[i] = i; } // Key setup for (var i = 0, j = 0; i < 256; i++) { var keyByteIndex = i % keySigBytes; var keyByte = keyWords[keyByteIndex >>> 2] >>> 24 - keyByteIndex % 4 * 8 & 0xff; j = (j + S[i] + keyByte) % 256; // Swap var t = S[i]; S[i] = S[j]; S[j] = t; } // Counters this._i = this._j = 0; }, _doProcessBlock: function _doProcessBlock(M, offset) { M[offset] ^= generateKeystreamWord.call(this); }, keySize: 256 / 32, ivSize: 0 }); function generateKeystreamWord() { // Shortcuts var S = this._S; var i = this._i; var j = this._j; // Generate keystream word var keystreamWord = 0; for (var n = 0; n < 4; n++) { i = (i + 1) % 256; j = (j + S[i]) % 256; // Swap var t = S[i]; S[i] = S[j]; S[j] = t; keystreamWord |= S[(S[i] + S[j]) % 256] << 24 - n * 8; } // Update counters this._i = i; this._j = j; return keystreamWord; } /** * Shortcut functions to the cipher's object interface. * * @example * * var ciphertext = CryptoJS.RC4.encrypt(message, key, cfg); * var plaintext = CryptoJS.RC4.decrypt(ciphertext, key, cfg); */ C.RC4 = StreamCipher._createHelper(RC4); /** * Modified RC4 stream cipher algorithm. */ var RC4Drop = C_algo.RC4Drop = RC4.extend({ /** * Configuration options. * * @property {number} drop The number of keystream words to drop. Default 192 */ cfg: RC4.cfg.extend({ drop: 192 }), _doReset: function _doReset() { RC4._doReset.call(this); // Drop for (var i = this.cfg.drop; i > 0; i--) { generateKeystreamWord.call(this); } } }); /** * Shortcut functions to the cipher's object interface. * * @example * * var ciphertext = CryptoJS.RC4Drop.encrypt(message, key, cfg); * var plaintext = CryptoJS.RC4Drop.decrypt(ciphertext, key, cfg); */ C.RC4Drop = StreamCipher._createHelper(RC4Drop); })(); return CryptoJS.RC4; }); /***/ }), /***/ 8714: /***/ (function(module, exports, __webpack_require__) { "use strict"; ; (function (root, factory) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(757)); } else {} })(void 0, function (CryptoJS) { /** @preserve (c) 2012 by Cédric Mesnil. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. - Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ (function (Math) { // Shortcuts var C = CryptoJS; var C_lib = C.lib; var WordArray = C_lib.WordArray; var Hasher = C_lib.Hasher; var C_algo = C.algo; // Constants table var _zl = WordArray.create([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 7, 4, 13, 1, 10, 6, 15, 3, 12, 0, 9, 5, 2, 14, 11, 8, 3, 10, 14, 4, 9, 15, 8, 1, 2, 7, 0, 6, 13, 11, 5, 12, 1, 9, 11, 10, 0, 8, 12, 4, 13, 3, 7, 15, 14, 5, 6, 2, 4, 0, 5, 9, 7, 12, 2, 10, 14, 1, 3, 8, 11, 6, 15, 13]); var _zr = WordArray.create([5, 14, 7, 0, 9, 2, 11, 4, 13, 6, 15, 8, 1, 10, 3, 12, 6, 11, 3, 7, 0, 13, 5, 10, 14, 15, 8, 12, 4, 9, 1, 2, 15, 5, 1, 3, 7, 14, 6, 9, 11, 8, 12, 2, 10, 0, 4, 13, 8, 6, 4, 1, 3, 11, 15, 0, 5, 12, 2, 13, 9, 7, 10, 14, 12, 15, 10, 4, 1, 5, 8, 7, 6, 2, 13, 14, 0, 3, 9, 11]); var _sl = WordArray.create([11, 14, 15, 12, 5, 8, 7, 9, 11, 13, 14, 15, 6, 7, 9, 8, 7, 6, 8, 13, 11, 9, 7, 15, 7, 12, 15, 9, 11, 7, 13, 12, 11, 13, 6, 7, 14, 9, 13, 15, 14, 8, 13, 6, 5, 12, 7, 5, 11, 12, 14, 15, 14, 15, 9, 8, 9, 14, 5, 6, 8, 6, 5, 12, 9, 15, 5, 11, 6, 8, 13, 12, 5, 12, 13, 14, 11, 8, 5, 6]); var _sr = WordArray.create([8, 9, 9, 11, 13, 15, 15, 5, 7, 7, 8, 11, 14, 14, 12, 6, 9, 13, 15, 7, 12, 8, 9, 11, 7, 7, 12, 7, 6, 15, 13, 11, 9, 7, 15, 11, 8, 6, 6, 14, 12, 13, 5, 14, 13, 13, 7, 5, 15, 5, 8, 11, 14, 14, 6, 14, 6, 9, 12, 9, 12, 5, 15, 8, 8, 5, 12, 9, 12, 5, 14, 6, 8, 13, 6, 5, 15, 13, 11, 11]); var _hl = WordArray.create([0x00000000, 0x5A827999, 0x6ED9EBA1, 0x8F1BBCDC, 0xA953FD4E]); var _hr = WordArray.create([0x50A28BE6, 0x5C4DD124, 0x6D703EF3, 0x7A6D76E9, 0x00000000]); /** * RIPEMD160 hash algorithm. */ var RIPEMD160 = C_algo.RIPEMD160 = Hasher.extend({ _doReset: function _doReset() { this._hash = WordArray.create([0x67452301, 0xEFCDAB89, 0x98BADCFE, 0x10325476, 0xC3D2E1F0]); }, _doProcessBlock: function _doProcessBlock(M, offset) { // Swap endian for (var i = 0; i < 16; i++) { // Shortcuts var offset_i = offset + i; var M_offset_i = M[offset_i]; // Swap M[offset_i] = (M_offset_i << 8 | M_offset_i >>> 24) & 0x00ff00ff | (M_offset_i << 24 | M_offset_i >>> 8) & 0xff00ff00; } // Shortcut var H = this._hash.words; var hl = _hl.words; var hr = _hr.words; var zl = _zl.words; var zr = _zr.words; var sl = _sl.words; var sr = _sr.words; // Working variables var al, bl, cl, dl, el; var ar, br, cr, dr, er; ar = al = H[0]; br = bl = H[1]; cr = cl = H[2]; dr = dl = H[3]; er = el = H[4]; // Computation var t; for (var i = 0; i < 80; i += 1) { t = al + M[offset + zl[i]] | 0; if (i < 16) { t += f1(bl, cl, dl) + hl[0]; } else if (i < 32) { t += f2(bl, cl, dl) + hl[1]; } else if (i < 48) { t += f3(bl, cl, dl) + hl[2]; } else if (i < 64) { t += f4(bl, cl, dl) + hl[3]; } else { // if (i<80) { t += f5(bl, cl, dl) + hl[4]; } t = t | 0; t = rotl(t, sl[i]); t = t + el | 0; al = el; el = dl; dl = rotl(cl, 10); cl = bl; bl = t; t = ar + M[offset + zr[i]] | 0; if (i < 16) { t += f5(br, cr, dr) + hr[0]; } else if (i < 32) { t += f4(br, cr, dr) + hr[1]; } else if (i < 48) { t += f3(br, cr, dr) + hr[2]; } else if (i < 64) { t += f2(br, cr, dr) + hr[3]; } else { // if (i<80) { t += f1(br, cr, dr) + hr[4]; } t = t | 0; t = rotl(t, sr[i]); t = t + er | 0; ar = er; er = dr; dr = rotl(cr, 10); cr = br; br = t; } // Intermediate hash value t = H[1] + cl + dr | 0; H[1] = H[2] + dl + er | 0; H[2] = H[3] + el + ar | 0; H[3] = H[4] + al + br | 0; H[4] = H[0] + bl + cr | 0; H[0] = t; }, _doFinalize: function _doFinalize() { // Shortcuts var data = this._data; var dataWords = data.words; var nBitsTotal = this._nDataBytes * 8; var nBitsLeft = data.sigBytes * 8; // Add padding dataWords[nBitsLeft >>> 5] |= 0x80 << 24 - nBitsLeft % 32; dataWords[(nBitsLeft + 64 >>> 9 << 4) + 14] = (nBitsTotal << 8 | nBitsTotal >>> 24) & 0x00ff00ff | (nBitsTotal << 24 | nBitsTotal >>> 8) & 0xff00ff00; data.sigBytes = (dataWords.length + 1) * 4; // Hash final blocks this._process(); // Shortcuts var hash = this._hash; var H = hash.words; // Swap endian for (var i = 0; i < 5; i++) { // Shortcut var H_i = H[i]; // Swap H[i] = (H_i << 8 | H_i >>> 24) & 0x00ff00ff | (H_i << 24 | H_i >>> 8) & 0xff00ff00; } // Return final computed hash return hash; }, clone: function clone() { var clone = Hasher.clone.call(this); clone._hash = this._hash.clone(); return clone; } }); function f1(x, y, z) { return x ^ y ^ z; } function f2(x, y, z) { return x & y | ~x & z; } function f3(x, y, z) { return (x | ~y) ^ z; } function f4(x, y, z) { return x & z | y & ~z; } function f5(x, y, z) { return x ^ (y | ~z); } function rotl(x, n) { return x << n | x >>> 32 - n; } /** * Shortcut function to the hasher's object interface. * * @param {WordArray|string} message The message to hash. * * @return {WordArray} The hash. * * @static * * @example * * var hash = CryptoJS.RIPEMD160('message'); * var hash = CryptoJS.RIPEMD160(wordArray); */ C.RIPEMD160 = Hasher._createHelper(RIPEMD160); /** * Shortcut function to the HMAC's object interface. * * @param {WordArray|string} message The message to hash. * @param {WordArray|string} key The secret key. * * @return {WordArray} The HMAC. * * @static * * @example * * var hmac = CryptoJS.HmacRIPEMD160(message, key); */ C.HmacRIPEMD160 = Hasher._createHmacHelper(RIPEMD160); })(Math); return CryptoJS.RIPEMD160; }); /***/ }), /***/ 9865: /***/ (function(module, exports, __webpack_require__) { "use strict"; ; (function (root, factory) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(757)); } else {} })(void 0, function (CryptoJS) { (function () { // Shortcuts var C = CryptoJS; var C_lib = C.lib; var WordArray = C_lib.WordArray; var Hasher = C_lib.Hasher; var C_algo = C.algo; // Reusable object var W = []; /** * SHA-1 hash algorithm. */ var SHA1 = C_algo.SHA1 = Hasher.extend({ _doReset: function _doReset() { this._hash = new WordArray.init([0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, 0xc3d2e1f0]); }, _doProcessBlock: function _doProcessBlock(M, offset) { // Shortcut var H = this._hash.words; // Working variables var a = H[0]; var b = H[1]; var c = H[2]; var d = H[3]; var e = H[4]; // Computation for (var i = 0; i < 80; i++) { if (i < 16) { W[i] = M[offset + i] | 0; } else { var n = W[i - 3] ^ W[i - 8] ^ W[i - 14] ^ W[i - 16]; W[i] = n << 1 | n >>> 31; } var t = (a << 5 | a >>> 27) + e + W[i]; if (i < 20) { t += (b & c | ~b & d) + 0x5a827999; } else if (i < 40) { t += (b ^ c ^ d) + 0x6ed9eba1; } else if (i < 60) { t += (b & c | b & d | c & d) - 0x70e44324; } else /* if (i < 80) */ { t += (b ^ c ^ d) - 0x359d3e2a; } e = d; d = c; c = b << 30 | b >>> 2; b = a; a = t; } // Intermediate hash value H[0] = H[0] + a | 0; H[1] = H[1] + b | 0; H[2] = H[2] + c | 0; H[3] = H[3] + d | 0; H[4] = H[4] + e | 0; }, _doFinalize: function _doFinalize() { // Shortcuts var data = this._data; var dataWords = data.words; var nBitsTotal = this._nDataBytes * 8; var nBitsLeft = data.sigBytes * 8; // Add padding dataWords[nBitsLeft >>> 5] |= 0x80 << 24 - nBitsLeft % 32; dataWords[(nBitsLeft + 64 >>> 9 << 4) + 14] = Math.floor(nBitsTotal / 0x100000000); dataWords[(nBitsLeft + 64 >>> 9 << 4) + 15] = nBitsTotal; data.sigBytes = dataWords.length * 4; // Hash final blocks this._process(); // Return final computed hash return this._hash; }, clone: function clone() { var clone = Hasher.clone.call(this); clone._hash = this._hash.clone(); return clone; } }); /** * Shortcut function to the hasher's object interface. * * @param {WordArray|string} message The message to hash. * * @return {WordArray} The hash. * * @static * * @example * * var hash = CryptoJS.SHA1('message'); * var hash = CryptoJS.SHA1(wordArray); */ C.SHA1 = Hasher._createHelper(SHA1); /** * Shortcut function to the HMAC's object interface. * * @param {WordArray|string} message The message to hash. * @param {WordArray|string} key The secret key. * * @return {WordArray} The HMAC. * * @static * * @example * * var hmac = CryptoJS.HmacSHA1(message, key); */ C.HmacSHA1 = Hasher._createHmacHelper(SHA1); })(); return CryptoJS.SHA1; }); /***/ }), /***/ 6876: /***/ (function(module, exports, __webpack_require__) { "use strict"; ; (function (root, factory, undef) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(757), __webpack_require__(8921)); } else {} })(void 0, function (CryptoJS) { (function () { // Shortcuts var C = CryptoJS; var C_lib = C.lib; var WordArray = C_lib.WordArray; var C_algo = C.algo; var SHA256 = C_algo.SHA256; /** * SHA-224 hash algorithm. */ var SHA224 = C_algo.SHA224 = SHA256.extend({ _doReset: function _doReset() { this._hash = new WordArray.init([0xc1059ed8, 0x367cd507, 0x3070dd17, 0xf70e5939, 0xffc00b31, 0x68581511, 0x64f98fa7, 0xbefa4fa4]); }, _doFinalize: function _doFinalize() { var hash = SHA256._doFinalize.call(this); hash.sigBytes -= 4; return hash; } }); /** * Shortcut function to the hasher's object interface. * * @param {WordArray|string} message The message to hash. * * @return {WordArray} The hash. * * @static * * @example * * var hash = CryptoJS.SHA224('message'); * var hash = CryptoJS.SHA224(wordArray); */ C.SHA224 = SHA256._createHelper(SHA224); /** * Shortcut function to the HMAC's object interface. * * @param {WordArray|string} message The message to hash. * @param {WordArray|string} key The secret key. * * @return {WordArray} The HMAC. * * @static * * @example * * var hmac = CryptoJS.HmacSHA224(message, key); */ C.HmacSHA224 = SHA256._createHmacHelper(SHA224); })(); return CryptoJS.SHA224; }); /***/ }), /***/ 8921: /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__(7042); ; (function (root, factory) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(757)); } else {} })(void 0, function (CryptoJS) { (function (Math) { // Shortcuts var C = CryptoJS; var C_lib = C.lib; var WordArray = C_lib.WordArray; var Hasher = C_lib.Hasher; var C_algo = C.algo; // Initialization and round constants tables var H = []; var K = []; // Compute constants (function () { function isPrime(n) { var sqrtN = Math.sqrt(n); for (var factor = 2; factor <= sqrtN; factor++) { if (!(n % factor)) { return false; } } return true; } function getFractionalBits(n) { return (n - (n | 0)) * 0x100000000 | 0; } var n = 2; var nPrime = 0; while (nPrime < 64) { if (isPrime(n)) { if (nPrime < 8) { H[nPrime] = getFractionalBits(Math.pow(n, 1 / 2)); } K[nPrime] = getFractionalBits(Math.pow(n, 1 / 3)); nPrime++; } n++; } })(); // Reusable object var W = []; /** * SHA-256 hash algorithm. */ var SHA256 = C_algo.SHA256 = Hasher.extend({ _doReset: function _doReset() { this._hash = new WordArray.init(H.slice(0)); }, _doProcessBlock: function _doProcessBlock(M, offset) { // Shortcut var H = this._hash.words; // Working variables var a = H[0]; var b = H[1]; var c = H[2]; var d = H[3]; var e = H[4]; var f = H[5]; var g = H[6]; var h = H[7]; // Computation for (var i = 0; i < 64; i++) { if (i < 16) { W[i] = M[offset + i] | 0; } else { var gamma0x = W[i - 15]; var gamma0 = (gamma0x << 25 | gamma0x >>> 7) ^ (gamma0x << 14 | gamma0x >>> 18) ^ gamma0x >>> 3; var gamma1x = W[i - 2]; var gamma1 = (gamma1x << 15 | gamma1x >>> 17) ^ (gamma1x << 13 | gamma1x >>> 19) ^ gamma1x >>> 10; W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16]; } var ch = e & f ^ ~e & g; var maj = a & b ^ a & c ^ b & c; var sigma0 = (a << 30 | a >>> 2) ^ (a << 19 | a >>> 13) ^ (a << 10 | a >>> 22); var sigma1 = (e << 26 | e >>> 6) ^ (e << 21 | e >>> 11) ^ (e << 7 | e >>> 25); var t1 = h + sigma1 + ch + K[i] + W[i]; var t2 = sigma0 + maj; h = g; g = f; f = e; e = d + t1 | 0; d = c; c = b; b = a; a = t1 + t2 | 0; } // Intermediate hash value H[0] = H[0] + a | 0; H[1] = H[1] + b | 0; H[2] = H[2] + c | 0; H[3] = H[3] + d | 0; H[4] = H[4] + e | 0; H[5] = H[5] + f | 0; H[6] = H[6] + g | 0; H[7] = H[7] + h | 0; }, _doFinalize: function _doFinalize() { // Shortcuts var data = this._data; var dataWords = data.words; var nBitsTotal = this._nDataBytes * 8; var nBitsLeft = data.sigBytes * 8; // Add padding dataWords[nBitsLeft >>> 5] |= 0x80 << 24 - nBitsLeft % 32; dataWords[(nBitsLeft + 64 >>> 9 << 4) + 14] = Math.floor(nBitsTotal / 0x100000000); dataWords[(nBitsLeft + 64 >>> 9 << 4) + 15] = nBitsTotal; data.sigBytes = dataWords.length * 4; // Hash final blocks this._process(); // Return final computed hash return this._hash; }, clone: function clone() { var clone = Hasher.clone.call(this); clone._hash = this._hash.clone(); return clone; } }); /** * Shortcut function to the hasher's object interface. * * @param {WordArray|string} message The message to hash. * * @return {WordArray} The hash. * * @static * * @example * * var hash = CryptoJS.SHA256('message'); * var hash = CryptoJS.SHA256(wordArray); */ C.SHA256 = Hasher._createHelper(SHA256); /** * Shortcut function to the HMAC's object interface. * * @param {WordArray|string} message The message to hash. * @param {WordArray|string} key The secret key. * * @return {WordArray} The HMAC. * * @static * * @example * * var hmac = CryptoJS.HmacSHA256(message, key); */ C.HmacSHA256 = Hasher._createHmacHelper(SHA256); })(Math); return CryptoJS.SHA256; }); /***/ }), /***/ 8342: /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__(7042); ; (function (root, factory, undef) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(757), __webpack_require__(2601)); } else {} })(void 0, function (CryptoJS) { (function (Math) { // Shortcuts var C = CryptoJS; var C_lib = C.lib; var WordArray = C_lib.WordArray; var Hasher = C_lib.Hasher; var C_x64 = C.x64; var X64Word = C_x64.Word; var C_algo = C.algo; // Constants tables var RHO_OFFSETS = []; var PI_INDEXES = []; var ROUND_CONSTANTS = []; // Compute Constants (function () { // Compute rho offset constants var x = 1, y = 0; for (var t = 0; t < 24; t++) { RHO_OFFSETS[x + 5 * y] = (t + 1) * (t + 2) / 2 % 64; var newX = y % 5; var newY = (2 * x + 3 * y) % 5; x = newX; y = newY; } // Compute pi index constants for (var x = 0; x < 5; x++) { for (var y = 0; y < 5; y++) { PI_INDEXES[x + 5 * y] = y + (2 * x + 3 * y) % 5 * 5; } } // Compute round constants var LFSR = 0x01; for (var i = 0; i < 24; i++) { var roundConstantMsw = 0; var roundConstantLsw = 0; for (var j = 0; j < 7; j++) { if (LFSR & 0x01) { var bitPosition = (1 << j) - 1; if (bitPosition < 32) { roundConstantLsw ^= 1 << bitPosition; } else /* if (bitPosition >= 32) */ { roundConstantMsw ^= 1 << bitPosition - 32; } } // Compute next LFSR if (LFSR & 0x80) { // Primitive polynomial over GF(2): x^8 + x^6 + x^5 + x^4 + 1 LFSR = LFSR << 1 ^ 0x71; } else { LFSR <<= 1; } } ROUND_CONSTANTS[i] = X64Word.create(roundConstantMsw, roundConstantLsw); } })(); // Reusable objects for temporary values var T = []; (function () { for (var i = 0; i < 25; i++) { T[i] = X64Word.create(); } })(); /** * SHA-3 hash algorithm. */ var SHA3 = C_algo.SHA3 = Hasher.extend({ /** * Configuration options. * * @property {number} outputLength * The desired number of bits in the output hash. * Only values permitted are: 224, 256, 384, 512. * Default: 512 */ cfg: Hasher.cfg.extend({ outputLength: 512 }), _doReset: function _doReset() { var state = this._state = []; for (var i = 0; i < 25; i++) { state[i] = new X64Word.init(); } this.blockSize = (1600 - 2 * this.cfg.outputLength) / 32; }, _doProcessBlock: function _doProcessBlock(M, offset) { // Shortcuts var state = this._state; var nBlockSizeLanes = this.blockSize / 2; // Absorb for (var i = 0; i < nBlockSizeLanes; i++) { // Shortcuts var M2i = M[offset + 2 * i]; var M2i1 = M[offset + 2 * i + 1]; // Swap endian M2i = (M2i << 8 | M2i >>> 24) & 0x00ff00ff | (M2i << 24 | M2i >>> 8) & 0xff00ff00; M2i1 = (M2i1 << 8 | M2i1 >>> 24) & 0x00ff00ff | (M2i1 << 24 | M2i1 >>> 8) & 0xff00ff00; // Absorb message into state var lane = state[i]; lane.high ^= M2i1; lane.low ^= M2i; } // Rounds for (var round = 0; round < 24; round++) { // Theta for (var x = 0; x < 5; x++) { // Mix column lanes var tMsw = 0, tLsw = 0; for (var y = 0; y < 5; y++) { var lane = state[x + 5 * y]; tMsw ^= lane.high; tLsw ^= lane.low; } // Temporary values var Tx = T[x]; Tx.high = tMsw; Tx.low = tLsw; } for (var x = 0; x < 5; x++) { // Shortcuts var Tx4 = T[(x + 4) % 5]; var Tx1 = T[(x + 1) % 5]; var Tx1Msw = Tx1.high; var Tx1Lsw = Tx1.low; // Mix surrounding columns var tMsw = Tx4.high ^ (Tx1Msw << 1 | Tx1Lsw >>> 31); var tLsw = Tx4.low ^ (Tx1Lsw << 1 | Tx1Msw >>> 31); for (var y = 0; y < 5; y++) { var lane = state[x + 5 * y]; lane.high ^= tMsw; lane.low ^= tLsw; } } // Rho Pi for (var laneIndex = 1; laneIndex < 25; laneIndex++) { var tMsw; var tLsw; // Shortcuts var lane = state[laneIndex]; var laneMsw = lane.high; var laneLsw = lane.low; var rhoOffset = RHO_OFFSETS[laneIndex]; // Rotate lanes if (rhoOffset < 32) { tMsw = laneMsw << rhoOffset | laneLsw >>> 32 - rhoOffset; tLsw = laneLsw << rhoOffset | laneMsw >>> 32 - rhoOffset; } else /* if (rhoOffset >= 32) */ { tMsw = laneLsw << rhoOffset - 32 | laneMsw >>> 64 - rhoOffset; tLsw = laneMsw << rhoOffset - 32 | laneLsw >>> 64 - rhoOffset; } // Transpose lanes var TPiLane = T[PI_INDEXES[laneIndex]]; TPiLane.high = tMsw; TPiLane.low = tLsw; } // Rho pi at x = y = 0 var T0 = T[0]; var state0 = state[0]; T0.high = state0.high; T0.low = state0.low; // Chi for (var x = 0; x < 5; x++) { for (var y = 0; y < 5; y++) { // Shortcuts var laneIndex = x + 5 * y; var lane = state[laneIndex]; var TLane = T[laneIndex]; var Tx1Lane = T[(x + 1) % 5 + 5 * y]; var Tx2Lane = T[(x + 2) % 5 + 5 * y]; // Mix rows lane.high = TLane.high ^ ~Tx1Lane.high & Tx2Lane.high; lane.low = TLane.low ^ ~Tx1Lane.low & Tx2Lane.low; } } // Iota var lane = state[0]; var roundConstant = ROUND_CONSTANTS[round]; lane.high ^= roundConstant.high; lane.low ^= roundConstant.low; } }, _doFinalize: function _doFinalize() { // Shortcuts var data = this._data; var dataWords = data.words; var nBitsTotal = this._nDataBytes * 8; var nBitsLeft = data.sigBytes * 8; var blockSizeBits = this.blockSize * 32; // Add padding dataWords[nBitsLeft >>> 5] |= 0x1 << 24 - nBitsLeft % 32; dataWords[(Math.ceil((nBitsLeft + 1) / blockSizeBits) * blockSizeBits >>> 5) - 1] |= 0x80; data.sigBytes = dataWords.length * 4; // Hash final blocks this._process(); // Shortcuts var state = this._state; var outputLengthBytes = this.cfg.outputLength / 8; var outputLengthLanes = outputLengthBytes / 8; // Squeeze var hashWords = []; for (var i = 0; i < outputLengthLanes; i++) { // Shortcuts var lane = state[i]; var laneMsw = lane.high; var laneLsw = lane.low; // Swap endian laneMsw = (laneMsw << 8 | laneMsw >>> 24) & 0x00ff00ff | (laneMsw << 24 | laneMsw >>> 8) & 0xff00ff00; laneLsw = (laneLsw << 8 | laneLsw >>> 24) & 0x00ff00ff | (laneLsw << 24 | laneLsw >>> 8) & 0xff00ff00; // Squeeze state to retrieve hash hashWords.push(laneLsw); hashWords.push(laneMsw); } // Return final computed hash return new WordArray.init(hashWords, outputLengthBytes); }, clone: function clone() { var clone = Hasher.clone.call(this); var state = clone._state = this._state.slice(0); for (var i = 0; i < 25; i++) { state[i] = state[i].clone(); } return clone; } }); /** * Shortcut function to the hasher's object interface. * * @param {WordArray|string} message The message to hash. * * @return {WordArray} The hash. * * @static * * @example * * var hash = CryptoJS.SHA3('message'); * var hash = CryptoJS.SHA3(wordArray); */ C.SHA3 = Hasher._createHelper(SHA3); /** * Shortcut function to the HMAC's object interface. * * @param {WordArray|string} message The message to hash. * @param {WordArray|string} key The secret key. * * @return {WordArray} The HMAC. * * @static * * @example * * var hmac = CryptoJS.HmacSHA3(message, key); */ C.HmacSHA3 = Hasher._createHmacHelper(SHA3); })(Math); return CryptoJS.SHA3; }); /***/ }), /***/ 8122: /***/ (function(module, exports, __webpack_require__) { "use strict"; ; (function (root, factory, undef) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(757), __webpack_require__(2601), __webpack_require__(7991)); } else {} })(void 0, function (CryptoJS) { (function () { // Shortcuts var C = CryptoJS; var C_x64 = C.x64; var X64Word = C_x64.Word; var X64WordArray = C_x64.WordArray; var C_algo = C.algo; var SHA512 = C_algo.SHA512; /** * SHA-384 hash algorithm. */ var SHA384 = C_algo.SHA384 = SHA512.extend({ _doReset: function _doReset() { this._hash = new X64WordArray.init([new X64Word.init(0xcbbb9d5d, 0xc1059ed8), new X64Word.init(0x629a292a, 0x367cd507), new X64Word.init(0x9159015a, 0x3070dd17), new X64Word.init(0x152fecd8, 0xf70e5939), new X64Word.init(0x67332667, 0xffc00b31), new X64Word.init(0x8eb44a87, 0x68581511), new X64Word.init(0xdb0c2e0d, 0x64f98fa7), new X64Word.init(0x47b5481d, 0xbefa4fa4)]); }, _doFinalize: function _doFinalize() { var hash = SHA512._doFinalize.call(this); hash.sigBytes -= 16; return hash; } }); /** * Shortcut function to the hasher's object interface. * * @param {WordArray|string} message The message to hash. * * @return {WordArray} The hash. * * @static * * @example * * var hash = CryptoJS.SHA384('message'); * var hash = CryptoJS.SHA384(wordArray); */ C.SHA384 = SHA512._createHelper(SHA384); /** * Shortcut function to the HMAC's object interface. * * @param {WordArray|string} message The message to hash. * @param {WordArray|string} key The secret key. * * @return {WordArray} The HMAC. * * @static * * @example * * var hmac = CryptoJS.HmacSHA384(message, key); */ C.HmacSHA384 = SHA512._createHmacHelper(SHA384); })(); return CryptoJS.SHA384; }); /***/ }), /***/ 7991: /***/ (function(module, exports, __webpack_require__) { "use strict"; ; (function (root, factory, undef) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(757), __webpack_require__(2601)); } else {} })(void 0, function (CryptoJS) { (function () { // Shortcuts var C = CryptoJS; var C_lib = C.lib; var Hasher = C_lib.Hasher; var C_x64 = C.x64; var X64Word = C_x64.Word; var X64WordArray = C_x64.WordArray; var C_algo = C.algo; function X64Word_create() { return X64Word.create.apply(X64Word, arguments); } // Constants var K = [X64Word_create(0x428a2f98, 0xd728ae22), X64Word_create(0x71374491, 0x23ef65cd), X64Word_create(0xb5c0fbcf, 0xec4d3b2f), X64Word_create(0xe9b5dba5, 0x8189dbbc), X64Word_create(0x3956c25b, 0xf348b538), X64Word_create(0x59f111f1, 0xb605d019), X64Word_create(0x923f82a4, 0xaf194f9b), X64Word_create(0xab1c5ed5, 0xda6d8118), X64Word_create(0xd807aa98, 0xa3030242), X64Word_create(0x12835b01, 0x45706fbe), X64Word_create(0x243185be, 0x4ee4b28c), X64Word_create(0x550c7dc3, 0xd5ffb4e2), X64Word_create(0x72be5d74, 0xf27b896f), X64Word_create(0x80deb1fe, 0x3b1696b1), X64Word_create(0x9bdc06a7, 0x25c71235), X64Word_create(0xc19bf174, 0xcf692694), X64Word_create(0xe49b69c1, 0x9ef14ad2), X64Word_create(0xefbe4786, 0x384f25e3), X64Word_create(0x0fc19dc6, 0x8b8cd5b5), X64Word_create(0x240ca1cc, 0x77ac9c65), X64Word_create(0x2de92c6f, 0x592b0275), X64Word_create(0x4a7484aa, 0x6ea6e483), X64Word_create(0x5cb0a9dc, 0xbd41fbd4), X64Word_create(0x76f988da, 0x831153b5), X64Word_create(0x983e5152, 0xee66dfab), X64Word_create(0xa831c66d, 0x2db43210), X64Word_create(0xb00327c8, 0x98fb213f), X64Word_create(0xbf597fc7, 0xbeef0ee4), X64Word_create(0xc6e00bf3, 0x3da88fc2), X64Word_create(0xd5a79147, 0x930aa725), X64Word_create(0x06ca6351, 0xe003826f), X64Word_create(0x14292967, 0x0a0e6e70), X64Word_create(0x27b70a85, 0x46d22ffc), X64Word_create(0x2e1b2138, 0x5c26c926), X64Word_create(0x4d2c6dfc, 0x5ac42aed), X64Word_create(0x53380d13, 0x9d95b3df), X64Word_create(0x650a7354, 0x8baf63de), X64Word_create(0x766a0abb, 0x3c77b2a8), X64Word_create(0x81c2c92e, 0x47edaee6), X64Word_create(0x92722c85, 0x1482353b), X64Word_create(0xa2bfe8a1, 0x4cf10364), X64Word_create(0xa81a664b, 0xbc423001), X64Word_create(0xc24b8b70, 0xd0f89791), X64Word_create(0xc76c51a3, 0x0654be30), X64Word_create(0xd192e819, 0xd6ef5218), X64Word_create(0xd6990624, 0x5565a910), X64Word_create(0xf40e3585, 0x5771202a), X64Word_create(0x106aa070, 0x32bbd1b8), X64Word_create(0x19a4c116, 0xb8d2d0c8), X64Word_create(0x1e376c08, 0x5141ab53), X64Word_create(0x2748774c, 0xdf8eeb99), X64Word_create(0x34b0bcb5, 0xe19b48a8), X64Word_create(0x391c0cb3, 0xc5c95a63), X64Word_create(0x4ed8aa4a, 0xe3418acb), X64Word_create(0x5b9cca4f, 0x7763e373), X64Word_create(0x682e6ff3, 0xd6b2b8a3), X64Word_create(0x748f82ee, 0x5defb2fc), X64Word_create(0x78a5636f, 0x43172f60), X64Word_create(0x84c87814, 0xa1f0ab72), X64Word_create(0x8cc70208, 0x1a6439ec), X64Word_create(0x90befffa, 0x23631e28), X64Word_create(0xa4506ceb, 0xde82bde9), X64Word_create(0xbef9a3f7, 0xb2c67915), X64Word_create(0xc67178f2, 0xe372532b), X64Word_create(0xca273ece, 0xea26619c), X64Word_create(0xd186b8c7, 0x21c0c207), X64Word_create(0xeada7dd6, 0xcde0eb1e), X64Word_create(0xf57d4f7f, 0xee6ed178), X64Word_create(0x06f067aa, 0x72176fba), X64Word_create(0x0a637dc5, 0xa2c898a6), X64Word_create(0x113f9804, 0xbef90dae), X64Word_create(0x1b710b35, 0x131c471b), X64Word_create(0x28db77f5, 0x23047d84), X64Word_create(0x32caab7b, 0x40c72493), X64Word_create(0x3c9ebe0a, 0x15c9bebc), X64Word_create(0x431d67c4, 0x9c100d4c), X64Word_create(0x4cc5d4be, 0xcb3e42b6), X64Word_create(0x597f299c, 0xfc657e2a), X64Word_create(0x5fcb6fab, 0x3ad6faec), X64Word_create(0x6c44198c, 0x4a475817)]; // Reusable objects var W = []; (function () { for (var i = 0; i < 80; i++) { W[i] = X64Word_create(); } })(); /** * SHA-512 hash algorithm. */ var SHA512 = C_algo.SHA512 = Hasher.extend({ _doReset: function _doReset() { this._hash = new X64WordArray.init([new X64Word.init(0x6a09e667, 0xf3bcc908), new X64Word.init(0xbb67ae85, 0x84caa73b), new X64Word.init(0x3c6ef372, 0xfe94f82b), new X64Word.init(0xa54ff53a, 0x5f1d36f1), new X64Word.init(0x510e527f, 0xade682d1), new X64Word.init(0x9b05688c, 0x2b3e6c1f), new X64Word.init(0x1f83d9ab, 0xfb41bd6b), new X64Word.init(0x5be0cd19, 0x137e2179)]); }, _doProcessBlock: function _doProcessBlock(M, offset) { // Shortcuts var H = this._hash.words; var H0 = H[0]; var H1 = H[1]; var H2 = H[2]; var H3 = H[3]; var H4 = H[4]; var H5 = H[5]; var H6 = H[6]; var H7 = H[7]; var H0h = H0.high; var H0l = H0.low; var H1h = H1.high; var H1l = H1.low; var H2h = H2.high; var H2l = H2.low; var H3h = H3.high; var H3l = H3.low; var H4h = H4.high; var H4l = H4.low; var H5h = H5.high; var H5l = H5.low; var H6h = H6.high; var H6l = H6.low; var H7h = H7.high; var H7l = H7.low; // Working variables var ah = H0h; var al = H0l; var bh = H1h; var bl = H1l; var ch = H2h; var cl = H2l; var dh = H3h; var dl = H3l; var eh = H4h; var el = H4l; var fh = H5h; var fl = H5l; var gh = H6h; var gl = H6l; var hh = H7h; var hl = H7l; // Rounds for (var i = 0; i < 80; i++) { var Wil; var Wih; // Shortcut var Wi = W[i]; // Extend message if (i < 16) { Wih = Wi.high = M[offset + i * 2] | 0; Wil = Wi.low = M[offset + i * 2 + 1] | 0; } else { // Gamma0 var gamma0x = W[i - 15]; var gamma0xh = gamma0x.high; var gamma0xl = gamma0x.low; var gamma0h = (gamma0xh >>> 1 | gamma0xl << 31) ^ (gamma0xh >>> 8 | gamma0xl << 24) ^ gamma0xh >>> 7; var gamma0l = (gamma0xl >>> 1 | gamma0xh << 31) ^ (gamma0xl >>> 8 | gamma0xh << 24) ^ (gamma0xl >>> 7 | gamma0xh << 25); // Gamma1 var gamma1x = W[i - 2]; var gamma1xh = gamma1x.high; var gamma1xl = gamma1x.low; var gamma1h = (gamma1xh >>> 19 | gamma1xl << 13) ^ (gamma1xh << 3 | gamma1xl >>> 29) ^ gamma1xh >>> 6; var gamma1l = (gamma1xl >>> 19 | gamma1xh << 13) ^ (gamma1xl << 3 | gamma1xh >>> 29) ^ (gamma1xl >>> 6 | gamma1xh << 26); // W[i] = gamma0 + W[i - 7] + gamma1 + W[i - 16] var Wi7 = W[i - 7]; var Wi7h = Wi7.high; var Wi7l = Wi7.low; var Wi16 = W[i - 16]; var Wi16h = Wi16.high; var Wi16l = Wi16.low; Wil = gamma0l + Wi7l; Wih = gamma0h + Wi7h + (Wil >>> 0 < gamma0l >>> 0 ? 1 : 0); Wil = Wil + gamma1l; Wih = Wih + gamma1h + (Wil >>> 0 < gamma1l >>> 0 ? 1 : 0); Wil = Wil + Wi16l; Wih = Wih + Wi16h + (Wil >>> 0 < Wi16l >>> 0 ? 1 : 0); Wi.high = Wih; Wi.low = Wil; } var chh = eh & fh ^ ~eh & gh; var chl = el & fl ^ ~el & gl; var majh = ah & bh ^ ah & ch ^ bh & ch; var majl = al & bl ^ al & cl ^ bl & cl; var sigma0h = (ah >>> 28 | al << 4) ^ (ah << 30 | al >>> 2) ^ (ah << 25 | al >>> 7); var sigma0l = (al >>> 28 | ah << 4) ^ (al << 30 | ah >>> 2) ^ (al << 25 | ah >>> 7); var sigma1h = (eh >>> 14 | el << 18) ^ (eh >>> 18 | el << 14) ^ (eh << 23 | el >>> 9); var sigma1l = (el >>> 14 | eh << 18) ^ (el >>> 18 | eh << 14) ^ (el << 23 | eh >>> 9); // t1 = h + sigma1 + ch + K[i] + W[i] var Ki = K[i]; var Kih = Ki.high; var Kil = Ki.low; var t1l = hl + sigma1l; var t1h = hh + sigma1h + (t1l >>> 0 < hl >>> 0 ? 1 : 0); var t1l = t1l + chl; var t1h = t1h + chh + (t1l >>> 0 < chl >>> 0 ? 1 : 0); var t1l = t1l + Kil; var t1h = t1h + Kih + (t1l >>> 0 < Kil >>> 0 ? 1 : 0); var t1l = t1l + Wil; var t1h = t1h + Wih + (t1l >>> 0 < Wil >>> 0 ? 1 : 0); // t2 = sigma0 + maj var t2l = sigma0l + majl; var t2h = sigma0h + majh + (t2l >>> 0 < sigma0l >>> 0 ? 1 : 0); // Update working variables hh = gh; hl = gl; gh = fh; gl = fl; fh = eh; fl = el; el = dl + t1l | 0; eh = dh + t1h + (el >>> 0 < dl >>> 0 ? 1 : 0) | 0; dh = ch; dl = cl; ch = bh; cl = bl; bh = ah; bl = al; al = t1l + t2l | 0; ah = t1h + t2h + (al >>> 0 < t1l >>> 0 ? 1 : 0) | 0; } // Intermediate hash value H0l = H0.low = H0l + al; H0.high = H0h + ah + (H0l >>> 0 < al >>> 0 ? 1 : 0); H1l = H1.low = H1l + bl; H1.high = H1h + bh + (H1l >>> 0 < bl >>> 0 ? 1 : 0); H2l = H2.low = H2l + cl; H2.high = H2h + ch + (H2l >>> 0 < cl >>> 0 ? 1 : 0); H3l = H3.low = H3l + dl; H3.high = H3h + dh + (H3l >>> 0 < dl >>> 0 ? 1 : 0); H4l = H4.low = H4l + el; H4.high = H4h + eh + (H4l >>> 0 < el >>> 0 ? 1 : 0); H5l = H5.low = H5l + fl; H5.high = H5h + fh + (H5l >>> 0 < fl >>> 0 ? 1 : 0); H6l = H6.low = H6l + gl; H6.high = H6h + gh + (H6l >>> 0 < gl >>> 0 ? 1 : 0); H7l = H7.low = H7l + hl; H7.high = H7h + hh + (H7l >>> 0 < hl >>> 0 ? 1 : 0); }, _doFinalize: function _doFinalize() { // Shortcuts var data = this._data; var dataWords = data.words; var nBitsTotal = this._nDataBytes * 8; var nBitsLeft = data.sigBytes * 8; // Add padding dataWords[nBitsLeft >>> 5] |= 0x80 << 24 - nBitsLeft % 32; dataWords[(nBitsLeft + 128 >>> 10 << 5) + 30] = Math.floor(nBitsTotal / 0x100000000); dataWords[(nBitsLeft + 128 >>> 10 << 5) + 31] = nBitsTotal; data.sigBytes = dataWords.length * 4; // Hash final blocks this._process(); // Convert hash to 32-bit word array before returning var hash = this._hash.toX32(); // Return final computed hash return hash; }, clone: function clone() { var clone = Hasher.clone.call(this); clone._hash = this._hash.clone(); return clone; }, blockSize: 1024 / 32 }); /** * Shortcut function to the hasher's object interface. * * @param {WordArray|string} message The message to hash. * * @return {WordArray} The hash. * * @static * * @example * * var hash = CryptoJS.SHA512('message'); * var hash = CryptoJS.SHA512(wordArray); */ C.SHA512 = Hasher._createHelper(SHA512); /** * Shortcut function to the HMAC's object interface. * * @param {WordArray|string} message The message to hash. * @param {WordArray|string} key The secret key. * * @return {WordArray} The HMAC. * * @static * * @example * * var hmac = CryptoJS.HmacSHA512(message, key); */ C.HmacSHA512 = Hasher._createHmacHelper(SHA512); })(); return CryptoJS.SHA512; }); /***/ }), /***/ 8437: /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__(7042); ; (function (root, factory, undef) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(757), __webpack_require__(7508), __webpack_require__(3440), __webpack_require__(3839), __webpack_require__(1582)); } else {} })(void 0, function (CryptoJS) { (function () { // Shortcuts var C = CryptoJS; var C_lib = C.lib; var WordArray = C_lib.WordArray; var BlockCipher = C_lib.BlockCipher; var C_algo = C.algo; // Permuted Choice 1 constants var PC1 = [57, 49, 41, 33, 25, 17, 9, 1, 58, 50, 42, 34, 26, 18, 10, 2, 59, 51, 43, 35, 27, 19, 11, 3, 60, 52, 44, 36, 63, 55, 47, 39, 31, 23, 15, 7, 62, 54, 46, 38, 30, 22, 14, 6, 61, 53, 45, 37, 29, 21, 13, 5, 28, 20, 12, 4]; // Permuted Choice 2 constants var PC2 = [14, 17, 11, 24, 1, 5, 3, 28, 15, 6, 21, 10, 23, 19, 12, 4, 26, 8, 16, 7, 27, 20, 13, 2, 41, 52, 31, 37, 47, 55, 30, 40, 51, 45, 33, 48, 44, 49, 39, 56, 34, 53, 46, 42, 50, 36, 29, 32]; // Cumulative bit shift constants var BIT_SHIFTS = [1, 2, 4, 6, 8, 10, 12, 14, 15, 17, 19, 21, 23, 25, 27, 28]; // SBOXes and round permutation constants var SBOX_P = [{ 0x0: 0x808200, 0x10000000: 0x8000, 0x20000000: 0x808002, 0x30000000: 0x2, 0x40000000: 0x200, 0x50000000: 0x808202, 0x60000000: 0x800202, 0x70000000: 0x800000, 0x80000000: 0x202, 0x90000000: 0x800200, 0xa0000000: 0x8200, 0xb0000000: 0x808000, 0xc0000000: 0x8002, 0xd0000000: 0x800002, 0xe0000000: 0x0, 0xf0000000: 0x8202, 0x8000000: 0x0, 0x18000000: 0x808202, 0x28000000: 0x8202, 0x38000000: 0x8000, 0x48000000: 0x808200, 0x58000000: 0x200, 0x68000000: 0x808002, 0x78000000: 0x2, 0x88000000: 0x800200, 0x98000000: 0x8200, 0xa8000000: 0x808000, 0xb8000000: 0x800202, 0xc8000000: 0x800002, 0xd8000000: 0x8002, 0xe8000000: 0x202, 0xf8000000: 0x800000, 0x1: 0x8000, 0x10000001: 0x2, 0x20000001: 0x808200, 0x30000001: 0x800000, 0x40000001: 0x808002, 0x50000001: 0x8200, 0x60000001: 0x200, 0x70000001: 0x800202, 0x80000001: 0x808202, 0x90000001: 0x808000, 0xa0000001: 0x800002, 0xb0000001: 0x8202, 0xc0000001: 0x202, 0xd0000001: 0x800200, 0xe0000001: 0x8002, 0xf0000001: 0x0, 0x8000001: 0x808202, 0x18000001: 0x808000, 0x28000001: 0x800000, 0x38000001: 0x200, 0x48000001: 0x8000, 0x58000001: 0x800002, 0x68000001: 0x2, 0x78000001: 0x8202, 0x88000001: 0x8002, 0x98000001: 0x800202, 0xa8000001: 0x202, 0xb8000001: 0x808200, 0xc8000001: 0x800200, 0xd8000001: 0x0, 0xe8000001: 0x8200, 0xf8000001: 0x808002 }, { 0x0: 0x40084010, 0x1000000: 0x4000, 0x2000000: 0x80000, 0x3000000: 0x40080010, 0x4000000: 0x40000010, 0x5000000: 0x40084000, 0x6000000: 0x40004000, 0x7000000: 0x10, 0x8000000: 0x84000, 0x9000000: 0x40004010, 0xa000000: 0x40000000, 0xb000000: 0x84010, 0xc000000: 0x80010, 0xd000000: 0x0, 0xe000000: 0x4010, 0xf000000: 0x40080000, 0x800000: 0x40004000, 0x1800000: 0x84010, 0x2800000: 0x10, 0x3800000: 0x40004010, 0x4800000: 0x40084010, 0x5800000: 0x40000000, 0x6800000: 0x80000, 0x7800000: 0x40080010, 0x8800000: 0x80010, 0x9800000: 0x0, 0xa800000: 0x4000, 0xb800000: 0x40080000, 0xc800000: 0x40000010, 0xd800000: 0x84000, 0xe800000: 0x40084000, 0xf800000: 0x4010, 0x10000000: 0x0, 0x11000000: 0x40080010, 0x12000000: 0x40004010, 0x13000000: 0x40084000, 0x14000000: 0x40080000, 0x15000000: 0x10, 0x16000000: 0x84010, 0x17000000: 0x4000, 0x18000000: 0x4010, 0x19000000: 0x80000, 0x1a000000: 0x80010, 0x1b000000: 0x40000010, 0x1c000000: 0x84000, 0x1d000000: 0x40004000, 0x1e000000: 0x40000000, 0x1f000000: 0x40084010, 0x10800000: 0x84010, 0x11800000: 0x80000, 0x12800000: 0x40080000, 0x13800000: 0x4000, 0x14800000: 0x40004000, 0x15800000: 0x40084010, 0x16800000: 0x10, 0x17800000: 0x40000000, 0x18800000: 0x40084000, 0x19800000: 0x40000010, 0x1a800000: 0x40004010, 0x1b800000: 0x80010, 0x1c800000: 0x0, 0x1d800000: 0x4010, 0x1e800000: 0x40080010, 0x1f800000: 0x84000 }, { 0x0: 0x104, 0x100000: 0x0, 0x200000: 0x4000100, 0x300000: 0x10104, 0x400000: 0x10004, 0x500000: 0x4000004, 0x600000: 0x4010104, 0x700000: 0x4010000, 0x800000: 0x4000000, 0x900000: 0x4010100, 0xa00000: 0x10100, 0xb00000: 0x4010004, 0xc00000: 0x4000104, 0xd00000: 0x10000, 0xe00000: 0x4, 0xf00000: 0x100, 0x80000: 0x4010100, 0x180000: 0x4010004, 0x280000: 0x0, 0x380000: 0x4000100, 0x480000: 0x4000004, 0x580000: 0x10000, 0x680000: 0x10004, 0x780000: 0x104, 0x880000: 0x4, 0x980000: 0x100, 0xa80000: 0x4010000, 0xb80000: 0x10104, 0xc80000: 0x10100, 0xd80000: 0x4000104, 0xe80000: 0x4010104, 0xf80000: 0x4000000, 0x1000000: 0x4010100, 0x1100000: 0x10004, 0x1200000: 0x10000, 0x1300000: 0x4000100, 0x1400000: 0x100, 0x1500000: 0x4010104, 0x1600000: 0x4000004, 0x1700000: 0x0, 0x1800000: 0x4000104, 0x1900000: 0x4000000, 0x1a00000: 0x4, 0x1b00000: 0x10100, 0x1c00000: 0x4010000, 0x1d00000: 0x104, 0x1e00000: 0x10104, 0x1f00000: 0x4010004, 0x1080000: 0x4000000, 0x1180000: 0x104, 0x1280000: 0x4010100, 0x1380000: 0x0, 0x1480000: 0x10004, 0x1580000: 0x4000100, 0x1680000: 0x100, 0x1780000: 0x4010004, 0x1880000: 0x10000, 0x1980000: 0x4010104, 0x1a80000: 0x10104, 0x1b80000: 0x4000004, 0x1c80000: 0x4000104, 0x1d80000: 0x4010000, 0x1e80000: 0x4, 0x1f80000: 0x10100 }, { 0x0: 0x80401000, 0x10000: 0x80001040, 0x20000: 0x401040, 0x30000: 0x80400000, 0x40000: 0x0, 0x50000: 0x401000, 0x60000: 0x80000040, 0x70000: 0x400040, 0x80000: 0x80000000, 0x90000: 0x400000, 0xa0000: 0x40, 0xb0000: 0x80001000, 0xc0000: 0x80400040, 0xd0000: 0x1040, 0xe0000: 0x1000, 0xf0000: 0x80401040, 0x8000: 0x80001040, 0x18000: 0x40, 0x28000: 0x80400040, 0x38000: 0x80001000, 0x48000: 0x401000, 0x58000: 0x80401040, 0x68000: 0x0, 0x78000: 0x80400000, 0x88000: 0x1000, 0x98000: 0x80401000, 0xa8000: 0x400000, 0xb8000: 0x1040, 0xc8000: 0x80000000, 0xd8000: 0x400040, 0xe8000: 0x401040, 0xf8000: 0x80000040, 0x100000: 0x400040, 0x110000: 0x401000, 0x120000: 0x80000040, 0x130000: 0x0, 0x140000: 0x1040, 0x150000: 0x80400040, 0x160000: 0x80401000, 0x170000: 0x80001040, 0x180000: 0x80401040, 0x190000: 0x80000000, 0x1a0000: 0x80400000, 0x1b0000: 0x401040, 0x1c0000: 0x80001000, 0x1d0000: 0x400000, 0x1e0000: 0x40, 0x1f0000: 0x1000, 0x108000: 0x80400000, 0x118000: 0x80401040, 0x128000: 0x0, 0x138000: 0x401000, 0x148000: 0x400040, 0x158000: 0x80000000, 0x168000: 0x80001040, 0x178000: 0x40, 0x188000: 0x80000040, 0x198000: 0x1000, 0x1a8000: 0x80001000, 0x1b8000: 0x80400040, 0x1c8000: 0x1040, 0x1d8000: 0x80401000, 0x1e8000: 0x400000, 0x1f8000: 0x401040 }, { 0x0: 0x80, 0x1000: 0x1040000, 0x2000: 0x40000, 0x3000: 0x20000000, 0x4000: 0x20040080, 0x5000: 0x1000080, 0x6000: 0x21000080, 0x7000: 0x40080, 0x8000: 0x1000000, 0x9000: 0x20040000, 0xa000: 0x20000080, 0xb000: 0x21040080, 0xc000: 0x21040000, 0xd000: 0x0, 0xe000: 0x1040080, 0xf000: 0x21000000, 0x800: 0x1040080, 0x1800: 0x21000080, 0x2800: 0x80, 0x3800: 0x1040000, 0x4800: 0x40000, 0x5800: 0x20040080, 0x6800: 0x21040000, 0x7800: 0x20000000, 0x8800: 0x20040000, 0x9800: 0x0, 0xa800: 0x21040080, 0xb800: 0x1000080, 0xc800: 0x20000080, 0xd800: 0x21000000, 0xe800: 0x1000000, 0xf800: 0x40080, 0x10000: 0x40000, 0x11000: 0x80, 0x12000: 0x20000000, 0x13000: 0x21000080, 0x14000: 0x1000080, 0x15000: 0x21040000, 0x16000: 0x20040080, 0x17000: 0x1000000, 0x18000: 0x21040080, 0x19000: 0x21000000, 0x1a000: 0x1040000, 0x1b000: 0x20040000, 0x1c000: 0x40080, 0x1d000: 0x20000080, 0x1e000: 0x0, 0x1f000: 0x1040080, 0x10800: 0x21000080, 0x11800: 0x1000000, 0x12800: 0x1040000, 0x13800: 0x20040080, 0x14800: 0x20000000, 0x15800: 0x1040080, 0x16800: 0x80, 0x17800: 0x21040000, 0x18800: 0x40080, 0x19800: 0x21040080, 0x1a800: 0x0, 0x1b800: 0x21000000, 0x1c800: 0x1000080, 0x1d800: 0x40000, 0x1e800: 0x20040000, 0x1f800: 0x20000080 }, { 0x0: 0x10000008, 0x100: 0x2000, 0x200: 0x10200000, 0x300: 0x10202008, 0x400: 0x10002000, 0x500: 0x200000, 0x600: 0x200008, 0x700: 0x10000000, 0x800: 0x0, 0x900: 0x10002008, 0xa00: 0x202000, 0xb00: 0x8, 0xc00: 0x10200008, 0xd00: 0x202008, 0xe00: 0x2008, 0xf00: 0x10202000, 0x80: 0x10200000, 0x180: 0x10202008, 0x280: 0x8, 0x380: 0x200000, 0x480: 0x202008, 0x580: 0x10000008, 0x680: 0x10002000, 0x780: 0x2008, 0x880: 0x200008, 0x980: 0x2000, 0xa80: 0x10002008, 0xb80: 0x10200008, 0xc80: 0x0, 0xd80: 0x10202000, 0xe80: 0x202000, 0xf80: 0x10000000, 0x1000: 0x10002000, 0x1100: 0x10200008, 0x1200: 0x10202008, 0x1300: 0x2008, 0x1400: 0x200000, 0x1500: 0x10000000, 0x1600: 0x10000008, 0x1700: 0x202000, 0x1800: 0x202008, 0x1900: 0x0, 0x1a00: 0x8, 0x1b00: 0x10200000, 0x1c00: 0x2000, 0x1d00: 0x10002008, 0x1e00: 0x10202000, 0x1f00: 0x200008, 0x1080: 0x8, 0x1180: 0x202000, 0x1280: 0x200000, 0x1380: 0x10000008, 0x1480: 0x10002000, 0x1580: 0x2008, 0x1680: 0x10202008, 0x1780: 0x10200000, 0x1880: 0x10202000, 0x1980: 0x10200008, 0x1a80: 0x2000, 0x1b80: 0x202008, 0x1c80: 0x200008, 0x1d80: 0x0, 0x1e80: 0x10000000, 0x1f80: 0x10002008 }, { 0x0: 0x100000, 0x10: 0x2000401, 0x20: 0x400, 0x30: 0x100401, 0x40: 0x2100401, 0x50: 0x0, 0x60: 0x1, 0x70: 0x2100001, 0x80: 0x2000400, 0x90: 0x100001, 0xa0: 0x2000001, 0xb0: 0x2100400, 0xc0: 0x2100000, 0xd0: 0x401, 0xe0: 0x100400, 0xf0: 0x2000000, 0x8: 0x2100001, 0x18: 0x0, 0x28: 0x2000401, 0x38: 0x2100400, 0x48: 0x100000, 0x58: 0x2000001, 0x68: 0x2000000, 0x78: 0x401, 0x88: 0x100401, 0x98: 0x2000400, 0xa8: 0x2100000, 0xb8: 0x100001, 0xc8: 0x400, 0xd8: 0x2100401, 0xe8: 0x1, 0xf8: 0x100400, 0x100: 0x2000000, 0x110: 0x100000, 0x120: 0x2000401, 0x130: 0x2100001, 0x140: 0x100001, 0x150: 0x2000400, 0x160: 0x2100400, 0x170: 0x100401, 0x180: 0x401, 0x190: 0x2100401, 0x1a0: 0x100400, 0x1b0: 0x1, 0x1c0: 0x0, 0x1d0: 0x2100000, 0x1e0: 0x2000001, 0x1f0: 0x400, 0x108: 0x100400, 0x118: 0x2000401, 0x128: 0x2100001, 0x138: 0x1, 0x148: 0x2000000, 0x158: 0x100000, 0x168: 0x401, 0x178: 0x2100400, 0x188: 0x2000001, 0x198: 0x2100000, 0x1a8: 0x0, 0x1b8: 0x2100401, 0x1c8: 0x100401, 0x1d8: 0x400, 0x1e8: 0x2000400, 0x1f8: 0x100001 }, { 0x0: 0x8000820, 0x1: 0x20000, 0x2: 0x8000000, 0x3: 0x20, 0x4: 0x20020, 0x5: 0x8020820, 0x6: 0x8020800, 0x7: 0x800, 0x8: 0x8020000, 0x9: 0x8000800, 0xa: 0x20800, 0xb: 0x8020020, 0xc: 0x820, 0xd: 0x0, 0xe: 0x8000020, 0xf: 0x20820, 0x80000000: 0x800, 0x80000001: 0x8020820, 0x80000002: 0x8000820, 0x80000003: 0x8000000, 0x80000004: 0x8020000, 0x80000005: 0x20800, 0x80000006: 0x20820, 0x80000007: 0x20, 0x80000008: 0x8000020, 0x80000009: 0x820, 0x8000000a: 0x20020, 0x8000000b: 0x8020800, 0x8000000c: 0x0, 0x8000000d: 0x8020020, 0x8000000e: 0x8000800, 0x8000000f: 0x20000, 0x10: 0x20820, 0x11: 0x8020800, 0x12: 0x20, 0x13: 0x800, 0x14: 0x8000800, 0x15: 0x8000020, 0x16: 0x8020020, 0x17: 0x20000, 0x18: 0x0, 0x19: 0x20020, 0x1a: 0x8020000, 0x1b: 0x8000820, 0x1c: 0x8020820, 0x1d: 0x20800, 0x1e: 0x820, 0x1f: 0x8000000, 0x80000010: 0x20000, 0x80000011: 0x800, 0x80000012: 0x8020020, 0x80000013: 0x20820, 0x80000014: 0x20, 0x80000015: 0x8020000, 0x80000016: 0x8000000, 0x80000017: 0x8000820, 0x80000018: 0x8020820, 0x80000019: 0x8000020, 0x8000001a: 0x8000800, 0x8000001b: 0x0, 0x8000001c: 0x20800, 0x8000001d: 0x820, 0x8000001e: 0x20020, 0x8000001f: 0x8020800 }]; // Masks that select the SBOX input var SBOX_MASK = [0xf8000001, 0x1f800000, 0x01f80000, 0x001f8000, 0x0001f800, 0x00001f80, 0x000001f8, 0x8000001f]; /** * DES block cipher algorithm. */ var DES = C_algo.DES = BlockCipher.extend({ _doReset: function _doReset() { // Shortcuts var key = this._key; var keyWords = key.words; // Select 56 bits according to PC1 var keyBits = []; for (var i = 0; i < 56; i++) { var keyBitPos = PC1[i] - 1; keyBits[i] = keyWords[keyBitPos >>> 5] >>> 31 - keyBitPos % 32 & 1; } // Assemble 16 subkeys var subKeys = this._subKeys = []; for (var nSubKey = 0; nSubKey < 16; nSubKey++) { // Create subkey var subKey = subKeys[nSubKey] = []; // Shortcut var bitShift = BIT_SHIFTS[nSubKey]; // Select 48 bits according to PC2 for (var i = 0; i < 24; i++) { // Select from the left 28 key bits subKey[i / 6 | 0] |= keyBits[(PC2[i] - 1 + bitShift) % 28] << 31 - i % 6; // Select from the right 28 key bits subKey[4 + (i / 6 | 0)] |= keyBits[28 + (PC2[i + 24] - 1 + bitShift) % 28] << 31 - i % 6; } // Since each subkey is applied to an expanded 32-bit input, // the subkey can be broken into 8 values scaled to 32-bits, // which allows the key to be used without expansion subKey[0] = subKey[0] << 1 | subKey[0] >>> 31; for (var i = 1; i < 7; i++) { subKey[i] = subKey[i] >>> (i - 1) * 4 + 3; } subKey[7] = subKey[7] << 5 | subKey[7] >>> 27; } // Compute inverse subkeys var invSubKeys = this._invSubKeys = []; for (var i = 0; i < 16; i++) { invSubKeys[i] = subKeys[15 - i]; } }, encryptBlock: function encryptBlock(M, offset) { this._doCryptBlock(M, offset, this._subKeys); }, decryptBlock: function decryptBlock(M, offset) { this._doCryptBlock(M, offset, this._invSubKeys); }, _doCryptBlock: function _doCryptBlock(M, offset, subKeys) { // Get input this._lBlock = M[offset]; this._rBlock = M[offset + 1]; // Initial permutation exchangeLR.call(this, 4, 0x0f0f0f0f); exchangeLR.call(this, 16, 0x0000ffff); exchangeRL.call(this, 2, 0x33333333); exchangeRL.call(this, 8, 0x00ff00ff); exchangeLR.call(this, 1, 0x55555555); // Rounds for (var round = 0; round < 16; round++) { // Shortcuts var subKey = subKeys[round]; var lBlock = this._lBlock; var rBlock = this._rBlock; // Feistel function var f = 0; for (var i = 0; i < 8; i++) { f |= SBOX_P[i][((rBlock ^ subKey[i]) & SBOX_MASK[i]) >>> 0]; } this._lBlock = rBlock; this._rBlock = lBlock ^ f; } // Undo swap from last round var t = this._lBlock; this._lBlock = this._rBlock; this._rBlock = t; // Final permutation exchangeLR.call(this, 1, 0x55555555); exchangeRL.call(this, 8, 0x00ff00ff); exchangeRL.call(this, 2, 0x33333333); exchangeLR.call(this, 16, 0x0000ffff); exchangeLR.call(this, 4, 0x0f0f0f0f); // Set output M[offset] = this._lBlock; M[offset + 1] = this._rBlock; }, keySize: 64 / 32, ivSize: 64 / 32, blockSize: 64 / 32 }); // Swap bits across the left and right words function exchangeLR(offset, mask) { var t = (this._lBlock >>> offset ^ this._rBlock) & mask; this._rBlock ^= t; this._lBlock ^= t << offset; } function exchangeRL(offset, mask) { var t = (this._rBlock >>> offset ^ this._lBlock) & mask; this._lBlock ^= t; this._rBlock ^= t << offset; } /** * Shortcut functions to the cipher's object interface. * * @example * * var ciphertext = CryptoJS.DES.encrypt(message, key, cfg); * var plaintext = CryptoJS.DES.decrypt(ciphertext, key, cfg); */ C.DES = BlockCipher._createHelper(DES); /** * Triple-DES block cipher algorithm. */ var TripleDES = C_algo.TripleDES = BlockCipher.extend({ _doReset: function _doReset() { // Shortcuts var key = this._key; var keyWords = key.words; // Make sure the key length is valid (64, 128 or >= 192 bit) if (keyWords.length !== 2 && keyWords.length !== 4 && keyWords.length < 6) { throw new Error('Invalid key length - 3DES requires the key length to be 64, 128, 192 or >192.'); } // Extend the key according to the keying options defined in 3DES standard var key1 = keyWords.slice(0, 2); var key2 = keyWords.length < 4 ? keyWords.slice(0, 2) : keyWords.slice(2, 4); var key3 = keyWords.length < 6 ? keyWords.slice(0, 2) : keyWords.slice(4, 6); // Create DES instances this._des1 = DES.createEncryptor(WordArray.create(key1)); this._des2 = DES.createEncryptor(WordArray.create(key2)); this._des3 = DES.createEncryptor(WordArray.create(key3)); }, encryptBlock: function encryptBlock(M, offset) { this._des1.encryptBlock(M, offset); this._des2.decryptBlock(M, offset); this._des3.encryptBlock(M, offset); }, decryptBlock: function decryptBlock(M, offset) { this._des3.decryptBlock(M, offset); this._des2.encryptBlock(M, offset); this._des1.decryptBlock(M, offset); }, keySize: 192 / 32, ivSize: 64 / 32, blockSize: 64 / 32 }); /** * Shortcut functions to the cipher's object interface. * * @example * * var ciphertext = CryptoJS.TripleDES.encrypt(message, key, cfg); * var plaintext = CryptoJS.TripleDES.decrypt(ciphertext, key, cfg); */ C.TripleDES = BlockCipher._createHelper(TripleDES); })(); return CryptoJS.TripleDES; }); /***/ }), /***/ 2601: /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__(7042); ; (function (root, factory) { if (true) { // CommonJS module.exports = exports = factory(__webpack_require__(757)); } else {} })(void 0, function (CryptoJS) { (function (undefined) { // Shortcuts var C = CryptoJS; var C_lib = C.lib; var Base = C_lib.Base; var X32WordArray = C_lib.WordArray; /** * x64 namespace. */ var C_x64 = C.x64 = {}; /** * A 64-bit word. */ var X64Word = C_x64.Word = Base.extend({ /** * Initializes a newly created 64-bit word. * * @param {number} high The high 32 bits. * @param {number} low The low 32 bits. * * @example * * var x64Word = CryptoJS.x64.Word.create(0x00010203, 0x04050607); */ init: function init(high, low) { this.high = high; this.low = low; } /** * Bitwise NOTs this word. * * @return {X64Word} A new x64-Word object after negating. * * @example * * var negated = x64Word.not(); */ // not: function () { // var high = ~this.high; // var low = ~this.low; // return X64Word.create(high, low); // }, /** * Bitwise ANDs this word with the passed word. * * @param {X64Word} word The x64-Word to AND with this word. * * @return {X64Word} A new x64-Word object after ANDing. * * @example * * var anded = x64Word.and(anotherX64Word); */ // and: function (word) { // var high = this.high & word.high; // var low = this.low & word.low; // return X64Word.create(high, low); // }, /** * Bitwise ORs this word with the passed word. * * @param {X64Word} word The x64-Word to OR with this word. * * @return {X64Word} A new x64-Word object after ORing. * * @example * * var ored = x64Word.or(anotherX64Word); */ // or: function (word) { // var high = this.high | word.high; // var low = this.low | word.low; // return X64Word.create(high, low); // }, /** * Bitwise XORs this word with the passed word. * * @param {X64Word} word The x64-Word to XOR with this word. * * @return {X64Word} A new x64-Word object after XORing. * * @example * * var xored = x64Word.xor(anotherX64Word); */ // xor: function (word) { // var high = this.high ^ word.high; // var low = this.low ^ word.low; // return X64Word.create(high, low); // }, /** * Shifts this word n bits to the left. * * @param {number} n The number of bits to shift. * * @return {X64Word} A new x64-Word object after shifting. * * @example * * var shifted = x64Word.shiftL(25); */ // shiftL: function (n) { // if (n < 32) { // var high = (this.high << n) | (this.low >>> (32 - n)); // var low = this.low << n; // } else { // var high = this.low << (n - 32); // var low = 0; // } // return X64Word.create(high, low); // }, /** * Shifts this word n bits to the right. * * @param {number} n The number of bits to shift. * * @return {X64Word} A new x64-Word object after shifting. * * @example * * var shifted = x64Word.shiftR(7); */ // shiftR: function (n) { // if (n < 32) { // var low = (this.low >>> n) | (this.high << (32 - n)); // var high = this.high >>> n; // } else { // var low = this.high >>> (n - 32); // var high = 0; // } // return X64Word.create(high, low); // }, /** * Rotates this word n bits to the left. * * @param {number} n The number of bits to rotate. * * @return {X64Word} A new x64-Word object after rotating. * * @example * * var rotated = x64Word.rotL(25); */ // rotL: function (n) { // return this.shiftL(n).or(this.shiftR(64 - n)); // }, /** * Rotates this word n bits to the right. * * @param {number} n The number of bits to rotate. * * @return {X64Word} A new x64-Word object after rotating. * * @example * * var rotated = x64Word.rotR(7); */ // rotR: function (n) { // return this.shiftR(n).or(this.shiftL(64 - n)); // }, /** * Adds this word with the passed word. * * @param {X64Word} word The x64-Word to add with this word. * * @return {X64Word} A new x64-Word object after adding. * * @example * * var added = x64Word.add(anotherX64Word); */ // add: function (word) { // var low = (this.low + word.low) | 0; // var carry = (low >>> 0) < (this.low >>> 0) ? 1 : 0; // var high = (this.high + word.high + carry) | 0; // return X64Word.create(high, low); // } }); /** * An array of 64-bit words. * * @property {Array} words The array of CryptoJS.x64.Word objects. * @property {number} sigBytes The number of significant bytes in this word array. */ var X64WordArray = C_x64.WordArray = Base.extend({ /** * Initializes a newly created word array. * * @param {Array} words (Optional) An array of CryptoJS.x64.Word objects. * @param {number} sigBytes (Optional) The number of significant bytes in the words. * * @example * * var wordArray = CryptoJS.x64.WordArray.create(); * * var wordArray = CryptoJS.x64.WordArray.create([ * CryptoJS.x64.Word.create(0x00010203, 0x04050607), * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f) * ]); * * var wordArray = CryptoJS.x64.WordArray.create([ * CryptoJS.x64.Word.create(0x00010203, 0x04050607), * CryptoJS.x64.Word.create(0x18191a1b, 0x1c1d1e1f) * ], 10); */ init: function init(words, sigBytes) { words = this.words = words || []; if (sigBytes != undefined) { this.sigBytes = sigBytes; } else { this.sigBytes = words.length * 8; } }, /** * Converts this 64-bit word array to a 32-bit word array. * * @return {CryptoJS.lib.WordArray} This word array's data as a 32-bit word array. * * @example * * var x32WordArray = x64WordArray.toX32(); */ toX32: function toX32() { // Shortcuts var x64Words = this.words; var x64WordsLength = x64Words.length; // Convert var x32Words = []; for (var i = 0; i < x64WordsLength; i++) { var x64Word = x64Words[i]; x32Words.push(x64Word.high); x32Words.push(x64Word.low); } return X32WordArray.create(x32Words, this.sigBytes); }, /** * Creates a copy of this word array. * * @return {X64WordArray} The clone. * * @example * * var clone = x64WordArray.clone(); */ clone: function clone() { var clone = Base.clone.call(this); // Clone "words" array var words = clone.words = this.words.slice(0); // Clone each X64Word object var wordsLength = words.length; for (var i = 0; i < wordsLength; i++) { words[i] = words[i].clone(); } return clone; } }); })(); return CryptoJS; }); /***/ }), /***/ 9811: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; __webpack_require__(8309); __webpack_require__(1038); __webpack_require__(5666); __webpack_require__(4916); __webpack_require__(4723); __webpack_require__(2165); __webpack_require__(6992); __webpack_require__(1539); __webpack_require__(8783); __webpack_require__(3948); __webpack_require__(2526); __webpack_require__(1817); __webpack_require__(7042); function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } var INITIAL_STATE = 1; var FAIL_STATE = 0; /** * A StateMachine represents a deterministic finite automaton. * It can perform matches over a sequence of values, similar to a regular expression. */ var StateMachine = /*#__PURE__*/function () { function StateMachine(dfa) { this.stateTable = dfa.stateTable; this.accepting = dfa.accepting; this.tags = dfa.tags; } /** * Returns an iterable object that yields pattern matches over the input sequence. * Matches are of the form [startIndex, endIndex, tags]. */ var _proto = StateMachine.prototype; _proto.match = function match(str) { var _ref; var self = this; return _ref = {}, _ref[Symbol.iterator] = /*#__PURE__*/regeneratorRuntime.mark(function _callee() { var state, startRun, lastAccepting, lastState, p, c; return regeneratorRuntime.wrap(function _callee$(_context) { while (1) { switch (_context.prev = _context.next) { case 0: state = INITIAL_STATE; startRun = null; lastAccepting = null; lastState = null; p = 0; case 5: if (!(p < str.length)) { _context.next = 21; break; } c = str[p]; lastState = state; state = self.stateTable[state][c]; if (!(state === FAIL_STATE)) { _context.next = 15; break; } if (!(startRun != null && lastAccepting != null && lastAccepting >= startRun)) { _context.next = 13; break; } _context.next = 13; return [startRun, lastAccepting, self.tags[lastState]]; case 13: // reset the state as if we started over from the initial state state = self.stateTable[INITIAL_STATE][c]; startRun = null; case 15: // start a run if not in the failure state if (state !== FAIL_STATE && startRun == null) { startRun = p; } // if accepting, mark the potential match end if (self.accepting[state]) { lastAccepting = p; } // reset the state to the initial state if we get into the failure state if (state === FAIL_STATE) { state = INITIAL_STATE; } case 18: p++; _context.next = 5; break; case 21: if (!(startRun != null && lastAccepting != null && lastAccepting >= startRun)) { _context.next = 24; break; } _context.next = 24; return [startRun, lastAccepting, self.tags[state]]; case 24: case "end": return _context.stop(); } } }, _callee); }), _ref; } /** * For each match over the input sequence, action functions matching * the tag definitions in the input pattern are called with the startIndex, * endIndex, and sub-match sequence. */ ; _proto.apply = function apply(str, actions) { for (var _iterator = _createForOfIteratorHelperLoose(this.match(str)), _step; !(_step = _iterator()).done;) { var _step$value = _step.value, start = _step$value[0], end = _step$value[1], tags = _step$value[2]; for (var _iterator2 = _createForOfIteratorHelperLoose(tags), _step2; !(_step2 = _iterator2()).done;) { var tag = _step2.value; if (typeof actions[tag] === 'function') { actions[tag](start, end, str.slice(start, end + 1)); } } } }; return StateMachine; }(); module.exports = StateMachine; /***/ }), /***/ 8478: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; /* provided dependency */ var Buffer = __webpack_require__(8823)["Buffer"]; __webpack_require__(7042); __webpack_require__(6699); /* * MIT LICENSE * Copyright (c) 2011 Devon Govett * * Permission is hereby granted, free of charge, to any person obtaining a copy of this * software and associated documentation files (the "Software"), to deal in the Software * without restriction, including without limitation the rights to use, copy, modify, merge, * publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons * to whom the Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in all copies or * substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ var fs = __webpack_require__(3857); var zlib = __webpack_require__(2635); module.exports = /*#__PURE__*/function () { PNG.decode = function decode(path, fn) { return fs.readFile(path, function (err, file) { var png = new PNG(file); return png.decode(function (pixels) { return fn(pixels); }); }); }; PNG.load = function load(path) { var file = fs.readFileSync(path); return new PNG(file); }; function PNG(data) { var i; this.data = data; this.pos = 8; // Skip the default header this.palette = []; this.imgData = []; this.transparency = {}; this.text = {}; while (true) { var chunkSize = this.readUInt32(); var section = ''; for (i = 0; i < 4; i++) { section += String.fromCharCode(this.data[this.pos++]); } switch (section) { case 'IHDR': // we can grab interesting values from here (like width, height, etc) this.width = this.readUInt32(); this.height = this.readUInt32(); this.bits = this.data[this.pos++]; this.colorType = this.data[this.pos++]; this.compressionMethod = this.data[this.pos++]; this.filterMethod = this.data[this.pos++]; this.interlaceMethod = this.data[this.pos++]; break; case 'PLTE': this.palette = this.read(chunkSize); break; case 'IDAT': for (i = 0; i < chunkSize; i++) { this.imgData.push(this.data[this.pos++]); } break; case 'tRNS': // This chunk can only occur once and it must occur after the // PLTE chunk and before the IDAT chunk. this.transparency = {}; switch (this.colorType) { case 3: // Indexed color, RGB. Each byte in this chunk is an alpha for // the palette index in the PLTE ("palette") chunk up until the // last non-opaque entry. Set up an array, stretching over all // palette entries which will be 0 (opaque) or 1 (transparent). this.transparency.indexed = this.read(chunkSize); var short = 255 - this.transparency.indexed.length; if (short > 0) { for (i = 0; i < short; i++) { this.transparency.indexed.push(255); } } break; case 0: // Greyscale. Corresponding to entries in the PLTE chunk. // Grey is two bytes, range 0 .. (2 ^ bit-depth) - 1 this.transparency.grayscale = this.read(chunkSize)[0]; break; case 2: // True color with proper alpha channel. this.transparency.rgb = this.read(chunkSize); break; } break; case 'tEXt': var text = this.read(chunkSize); var index = text.indexOf(0); var key = String.fromCharCode.apply(String, text.slice(0, index)); this.text[key] = String.fromCharCode.apply(String, text.slice(index + 1)); break; case 'IEND': // we've got everything we need! switch (this.colorType) { case 0: case 3: case 4: this.colors = 1; break; case 2: case 6: this.colors = 3; break; } this.hasAlphaChannel = [4, 6].includes(this.colorType); var colors = this.colors + (this.hasAlphaChannel ? 1 : 0); this.pixelBitlength = this.bits * colors; switch (this.colors) { case 1: this.colorSpace = 'DeviceGray'; break; case 3: this.colorSpace = 'DeviceRGB'; break; } this.imgData = new Buffer(this.imgData); return; break; default: // unknown (or unimportant) section, skip it this.pos += chunkSize; } this.pos += 4; // Skip the CRC if (this.pos > this.data.length) { throw new Error('Incomplete or corrupt PNG file'); } } } var _proto = PNG.prototype; _proto.read = function read(bytes) { var result = new Array(bytes); for (var i = 0; i < bytes; i++) { result[i] = this.data[this.pos++]; } return result; }; _proto.readUInt32 = function readUInt32() { var b1 = this.data[this.pos++] << 24; var b2 = this.data[this.pos++] << 16; var b3 = this.data[this.pos++] << 8; var b4 = this.data[this.pos++]; return b1 | b2 | b3 | b4; }; _proto.readUInt16 = function readUInt16() { var b1 = this.data[this.pos++] << 8; var b2 = this.data[this.pos++]; return b1 | b2; }; _proto.decodePixels = function decodePixels(fn) { var _this = this; return zlib.inflate(this.imgData, function (err, data) { if (err) { throw err; } var width = _this.width, height = _this.height; var pixelBytes = _this.pixelBitlength / 8; var pixels = new Buffer(width * height * pixelBytes); var length = data.length; var pos = 0; function pass(x0, y0, dx, dy, singlePass) { if (singlePass === void 0) { singlePass = false; } var w = Math.ceil((width - x0) / dx); var h = Math.ceil((height - y0) / dy); var scanlineLength = pixelBytes * w; var buffer = singlePass ? pixels : new Buffer(scanlineLength * h); var row = 0; var c = 0; while (row < h && pos < length) { var byte, col, i, left, upper; switch (data[pos++]) { case 0: // None for (i = 0; i < scanlineLength; i++) { buffer[c++] = data[pos++]; } break; case 1: // Sub for (i = 0; i < scanlineLength; i++) { byte = data[pos++]; left = i < pixelBytes ? 0 : buffer[c - pixelBytes]; buffer[c++] = (byte + left) % 256; } break; case 2: // Up for (i = 0; i < scanlineLength; i++) { byte = data[pos++]; col = (i - i % pixelBytes) / pixelBytes; upper = row && buffer[(row - 1) * scanlineLength + col * pixelBytes + i % pixelBytes]; buffer[c++] = (upper + byte) % 256; } break; case 3: // Average for (i = 0; i < scanlineLength; i++) { byte = data[pos++]; col = (i - i % pixelBytes) / pixelBytes; left = i < pixelBytes ? 0 : buffer[c - pixelBytes]; upper = row && buffer[(row - 1) * scanlineLength + col * pixelBytes + i % pixelBytes]; buffer[c++] = (byte + Math.floor((left + upper) / 2)) % 256; } break; case 4: // Paeth for (i = 0; i < scanlineLength; i++) { var paeth, upperLeft; byte = data[pos++]; col = (i - i % pixelBytes) / pixelBytes; left = i < pixelBytes ? 0 : buffer[c - pixelBytes]; if (row === 0) { upper = upperLeft = 0; } else { upper = buffer[(row - 1) * scanlineLength + col * pixelBytes + i % pixelBytes]; upperLeft = col && buffer[(row - 1) * scanlineLength + (col - 1) * pixelBytes + i % pixelBytes]; } var p = left + upper - upperLeft; var pa = Math.abs(p - left); var pb = Math.abs(p - upper); var pc = Math.abs(p - upperLeft); if (pa <= pb && pa <= pc) { paeth = left; } else if (pb <= pc) { paeth = upper; } else { paeth = upperLeft; } buffer[c++] = (byte + paeth) % 256; } break; default: throw new Error("Invalid filter algorithm: " + data[pos - 1]); } if (!singlePass) { var pixelsPos = ((y0 + row * dy) * width + x0) * pixelBytes; var bufferPos = row * scanlineLength; for (i = 0; i < w; i++) { for (var j = 0; j < pixelBytes; j++) { pixels[pixelsPos++] = buffer[bufferPos++]; } pixelsPos += (dx - 1) * pixelBytes; } } row++; } } if (_this.interlaceMethod === 1) { /* 1 6 4 6 2 6 4 6 7 7 7 7 7 7 7 7 5 6 5 6 5 6 5 6 7 7 7 7 7 7 7 7 3 6 4 6 3 6 4 6 7 7 7 7 7 7 7 7 5 6 5 6 5 6 5 6 7 7 7 7 7 7 7 7 */ pass(0, 0, 8, 8); // 1 pass(4, 0, 8, 8); // 2 pass(0, 4, 4, 8); // 3 pass(2, 0, 4, 4); // 4 pass(0, 2, 2, 4); // 5 pass(1, 0, 2, 2); // 6 pass(0, 1, 1, 2); // 7 } else { pass(0, 0, 1, 1, true); } return fn(pixels); }); }; _proto.decodePalette = function decodePalette() { var palette = this.palette; var length = palette.length; var transparency = this.transparency.indexed || []; var ret = new Buffer(transparency.length + length); var pos = 0; var c = 0; for (var i = 0; i < length; i += 3) { var left; ret[pos++] = palette[i]; ret[pos++] = palette[i + 1]; ret[pos++] = palette[i + 2]; ret[pos++] = (left = transparency[c++]) != null ? left : 255; } return ret; }; _proto.copyToImageData = function copyToImageData(imageData, pixels) { var j, k; var colors = this.colors; var palette = null; var alpha = this.hasAlphaChannel; if (this.palette.length) { palette = this._decodedPalette || (this._decodedPalette = this.decodePalette()); colors = 4; alpha = true; } var data = imageData.data || imageData; var length = data.length; var input = palette || pixels; var i = j = 0; if (colors === 1) { while (i < length) { k = palette ? pixels[i / 4] * 4 : j; var v = input[k++]; data[i++] = v; data[i++] = v; data[i++] = v; data[i++] = alpha ? input[k++] : 255; j = k; } } else { while (i < length) { k = palette ? pixels[i / 4] * 4 : j; data[i++] = input[k++]; data[i++] = input[k++]; data[i++] = input[k++]; data[i++] = alpha ? input[k++] : 255; j = k; } } }; _proto.decode = function decode(fn) { var _this2 = this; var ret = new Buffer(this.width * this.height * 4); return this.decodePixels(function (pixels) { _this2.copyToImageData(ret, pixels); return fn(ret); }); }; return PNG; }(); /***/ }), /***/ 1750: /***/ (function(module, exports, __webpack_require__) { "use strict"; __webpack_require__(3290); /* eslint-disable node/no-deprecated-api */ var buffer = __webpack_require__(8823); var Buffer = buffer.Buffer; // alternative to using Object.keys for old browsers function copyProps(src, dst) { for (var key in src) { dst[key] = src[key]; } } if (Buffer.from && Buffer.alloc && Buffer.allocUnsafe && Buffer.allocUnsafeSlow) { module.exports = buffer; } else { // Copy properties from require('buffer') copyProps(buffer, exports); exports.Buffer = SafeBuffer; } function SafeBuffer(arg, encodingOrOffset, length) { return Buffer(arg, encodingOrOffset, length); } // Copy static methods from Buffer copyProps(Buffer, SafeBuffer); SafeBuffer.from = function (arg, encodingOrOffset, length) { if (typeof arg === 'number') { throw new TypeError('Argument must not be a number'); } return Buffer(arg, encodingOrOffset, length); }; SafeBuffer.alloc = function (size, fill, encoding) { if (typeof size !== 'number') { throw new TypeError('Argument must be a number'); } var buf = Buffer(size); if (fill !== undefined) { if (typeof encoding === 'string') { buf.fill(fill, encoding); } else { buf.fill(fill); } } else { buf.fill(0); } return buf; }; SafeBuffer.allocUnsafe = function (size) { if (typeof size !== 'number') { throw new TypeError('Argument must be a number'); } return Buffer(size); }; SafeBuffer.allocUnsafeSlow = function (size) { if (typeof size !== 'number') { throw new TypeError('Argument must be a number'); } return buffer.SlowBuffer(size); }; /***/ }), /***/ 7103: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; /* provided dependency */ var process = __webpack_require__(4155); /* eslint-disable node/no-deprecated-api */ __webpack_require__(8145); __webpack_require__(6992); __webpack_require__(1539); __webpack_require__(2472); __webpack_require__(2990); __webpack_require__(8927); __webpack_require__(3105); __webpack_require__(5035); __webpack_require__(4345); __webpack_require__(7174); __webpack_require__(2846); __webpack_require__(4731); __webpack_require__(7209); __webpack_require__(6319); __webpack_require__(8867); __webpack_require__(7789); __webpack_require__(3739); __webpack_require__(9368); __webpack_require__(4483); __webpack_require__(2056); __webpack_require__(3462); __webpack_require__(678); __webpack_require__(7462); __webpack_require__(3824); __webpack_require__(5021); __webpack_require__(2974); __webpack_require__(5016); __webpack_require__(3290); var buffer = __webpack_require__(8823); var Buffer = buffer.Buffer; var safer = {}; var key; for (key in buffer) { if (!buffer.hasOwnProperty(key)) continue; if (key === 'SlowBuffer' || key === 'Buffer') continue; safer[key] = buffer[key]; } var Safer = safer.Buffer = {}; for (key in Buffer) { if (!Buffer.hasOwnProperty(key)) continue; if (key === 'allocUnsafe' || key === 'allocUnsafeSlow') continue; Safer[key] = Buffer[key]; } safer.Buffer.prototype = Buffer.prototype; if (!Safer.from || Safer.from === Uint8Array.from) { Safer.from = function (value, encodingOrOffset, length) { if (typeof value === 'number') { throw new TypeError('The "value" argument must not be of type number. Received type ' + typeof value); } if (value && typeof value.length === 'undefined') { throw new TypeError('The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type ' + typeof value); } return Buffer(value, encodingOrOffset, length); }; } if (!Safer.alloc) { Safer.alloc = function (size, fill, encoding) { if (typeof size !== 'number') { throw new TypeError('The "size" argument must be of type number. Received type ' + typeof size); } if (size < 0 || size >= 2 * (1 << 30)) { throw new RangeError('The value "' + size + '" is invalid for option "size"'); } var buf = Buffer(size); if (!fill || fill.length === 0) { buf.fill(0); } else if (typeof encoding === 'string') { buf.fill(fill, encoding); } else { buf.fill(fill); } return buf; }; } if (!safer.kStringMaxLength) { try { safer.kStringMaxLength = process.binding('buffer').kStringMaxLength; } catch (e) {// we can't determine kStringMaxLength in environments where process.binding // is unsupported, so let's not set it } } if (!safer.constants) { safer.constants = { MAX_LENGTH: safer.kMaxLength }; if (safer.kStringMaxLength) { safer.constants.MAX_STRING_LENGTH = safer.kStringMaxLength; } } module.exports = safer; /***/ }), /***/ 3361: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; __webpack_require__(7941); __webpack_require__(2526); __webpack_require__(7327); __webpack_require__(1539); __webpack_require__(5003); __webpack_require__(4747); __webpack_require__(9337); __webpack_require__(7042); function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } var _require = __webpack_require__(8823), Buffer = _require.Buffer; var _require2 = __webpack_require__(9862), inspect = _require2.inspect; var custom = inspect && inspect.custom || 'inspect'; function copyBuffer(src, target, offset) { Buffer.prototype.copy.call(src, target, offset); } module.exports = /*#__PURE__*/function () { function BufferList() { _classCallCheck(this, BufferList); this.head = null; this.tail = null; this.length = 0; } _createClass(BufferList, [{ key: "push", value: function push(v) { var entry = { data: v, next: null }; if (this.length > 0) this.tail.next = entry;else this.head = entry; this.tail = entry; ++this.length; } }, { key: "unshift", value: function unshift(v) { var entry = { data: v, next: this.head }; if (this.length === 0) this.tail = entry; this.head = entry; ++this.length; } }, { key: "shift", value: function shift() { if (this.length === 0) return; var ret = this.head.data; if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next; --this.length; return ret; } }, { key: "clear", value: function clear() { this.head = this.tail = null; this.length = 0; } }, { key: "join", value: function join(s) { if (this.length === 0) return ''; var p = this.head; var ret = '' + p.data; while (p = p.next) { ret += s + p.data; } return ret; } }, { key: "concat", value: function concat(n) { if (this.length === 0) return Buffer.alloc(0); var ret = Buffer.allocUnsafe(n >>> 0); var p = this.head; var i = 0; while (p) { copyBuffer(p.data, ret, i); i += p.data.length; p = p.next; } return ret; } // Consumes a specified amount of bytes or characters from the buffered data. }, { key: "consume", value: function consume(n, hasStrings) { var ret; if (n < this.head.data.length) { // `slice` is the same for buffers and strings. ret = this.head.data.slice(0, n); this.head.data = this.head.data.slice(n); } else if (n === this.head.data.length) { // First chunk is a perfect match. ret = this.shift(); } else { // Result spans more than one buffer. ret = hasStrings ? this._getString(n) : this._getBuffer(n); } return ret; } }, { key: "first", value: function first() { return this.head.data; } // Consumes a specified amount of characters from the buffered data. }, { key: "_getString", value: function _getString(n) { var p = this.head; var c = 1; var ret = p.data; n -= ret.length; while (p = p.next) { var str = p.data; var nb = n > str.length ? str.length : n; if (nb === str.length) ret += str;else ret += str.slice(0, n); n -= nb; if (n === 0) { if (nb === str.length) { ++c; if (p.next) this.head = p.next;else this.head = this.tail = null; } else { this.head = p; p.data = str.slice(nb); } break; } ++c; } this.length -= c; return ret; } // Consumes a specified amount of bytes from the buffered data. }, { key: "_getBuffer", value: function _getBuffer(n) { var ret = Buffer.allocUnsafe(n); var p = this.head; var c = 1; p.data.copy(ret); n -= p.data.length; while (p = p.next) { var buf = p.data; var nb = n > buf.length ? buf.length : n; buf.copy(ret, ret.length - n, 0, nb); n -= nb; if (n === 0) { if (nb === buf.length) { ++c; if (p.next) this.head = p.next;else this.head = this.tail = null; } else { this.head = p; p.data = buf.slice(nb); } break; } ++c; } this.length -= c; return ret; } // Make sure the linked list only shows the minimal necessary information. }, { key: custom, value: function value(_, options) { return inspect(this, _objectSpread({}, options, { // Only inspect one level. depth: 0, // It should not recurse. customInspect: false })); } }]); return BufferList; }(); /***/ }), /***/ 4872: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var __dirname = "/"; /* provided dependency */ var Buffer = __webpack_require__(8823)["Buffer"]; Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = void 0; __webpack_require__(7941); __webpack_require__(2526); __webpack_require__(7327); __webpack_require__(1539); __webpack_require__(5003); __webpack_require__(4747); __webpack_require__(9337); __webpack_require__(489); __webpack_require__(2419); __webpack_require__(1817); __webpack_require__(2165); __webpack_require__(6992); __webpack_require__(8783); __webpack_require__(3948); __webpack_require__(1038); __webpack_require__(7042); __webpack_require__(8309); __webpack_require__(4916); __webpack_require__(2707); __webpack_require__(2222); __webpack_require__(9600); __webpack_require__(9714); __webpack_require__(5306); __webpack_require__(1249); __webpack_require__(9841); __webpack_require__(4953); __webpack_require__(6977); __webpack_require__(6699); __webpack_require__(5192); __webpack_require__(9653); __webpack_require__(3123); __webpack_require__(4723); __webpack_require__(8734); __webpack_require__(2472); __webpack_require__(2990); __webpack_require__(8927); __webpack_require__(3105); __webpack_require__(5035); __webpack_require__(4345); __webpack_require__(7174); __webpack_require__(2846); __webpack_require__(4731); __webpack_require__(7209); __webpack_require__(6319); __webpack_require__(8867); __webpack_require__(7789); __webpack_require__(3739); __webpack_require__(9368); __webpack_require__(4483); __webpack_require__(2056); __webpack_require__(3462); __webpack_require__(678); __webpack_require__(7462); __webpack_require__(3824); __webpack_require__(5021); __webpack_require__(2974); __webpack_require__(5016); __webpack_require__(7803); __webpack_require__(3290); __webpack_require__(9601); __webpack_require__(3210); __webpack_require__(9254); __webpack_require__(7397); var _stream = _interopRequireDefault(__webpack_require__(2830)); var _zlib = _interopRequireDefault(__webpack_require__(2635)); var _cryptoJs = _interopRequireDefault(__webpack_require__(5153)); var _fontkit = _interopRequireDefault(__webpack_require__(1917)); var _events = __webpack_require__(7187); var _linebreak = _interopRequireDefault(__webpack_require__(7337)); var _pngJs = _interopRequireDefault(__webpack_require__(8478)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var fs = __webpack_require__(3857); function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; } function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } function _objectSpread2(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); } function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); } function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Date.prototype.toString.call(Reflect.construct(Date, [], function () {})); return true; } catch (e) { return false; } } function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; } function _possibleConstructorReturn(self, call) { if (call && (typeof call === "object" || typeof call === "function")) { return call; } return _assertThisInitialized(self); } function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; } function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); } function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); } function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); } function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; } function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } function _createForOfIteratorHelper(o, allowArrayLike) { var it; if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; } /* PDFAbstractReference - abstract class for PDF reference */ var PDFAbstractReference = /*#__PURE__*/function () { function PDFAbstractReference() { _classCallCheck(this, PDFAbstractReference); } _createClass(PDFAbstractReference, [{ key: "toString", value: function toString() { throw new Error('Must be implemented by subclasses'); } }]); return PDFAbstractReference; }(); var PDFTree = /*#__PURE__*/function () { function PDFTree() { var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; _classCallCheck(this, PDFTree); this._items = {}; // disable /Limits output for this tree this.limits = typeof options.limits === 'boolean' ? options.limits : true; } _createClass(PDFTree, [{ key: "add", value: function add(key, val) { return this._items[key] = val; } }, { key: "get", value: function get(key) { return this._items[key]; } }, { key: "toString", value: function toString() { var _this = this; // Needs to be sorted by key var sortedKeys = Object.keys(this._items).sort(function (a, b) { return _this._compareKeys(a, b); }); var out = ['<<']; if (this.limits && sortedKeys.length > 1) { var first = sortedKeys[0], last = sortedKeys[sortedKeys.length - 1]; out.push(" /Limits ".concat(PDFObject.convert([this._dataForKey(first), this._dataForKey(last)]))); } out.push(" /".concat(this._keysName(), " [")); var _iterator = _createForOfIteratorHelper(sortedKeys), _step; try { for (_iterator.s(); !(_step = _iterator.n()).done;) { var key = _step.value; out.push(" ".concat(PDFObject.convert(this._dataForKey(key)), " ").concat(PDFObject.convert(this._items[key]))); } } catch (err) { _iterator.e(err); } finally { _iterator.f(); } out.push(']'); out.push('>>'); return out.join('\n'); } }, { key: "_compareKeys", value: function _compareKeys() /*a, b*/ { throw new Error('Must be implemented by subclasses'); } }, { key: "_keysName", value: function _keysName() { throw new Error('Must be implemented by subclasses'); } }, { key: "_dataForKey", value: function _dataForKey() /*k*/ { throw new Error('Must be implemented by subclasses'); } }]); return PDFTree; }(); var pad = function pad(str, length) { return (Array(length + 1).join('0') + str).slice(-length); }; var escapableRe = /[\n\r\t\b\f()\\]/g; var escapable = { '\n': '\\n', '\r': '\\r', '\t': '\\t', '\b': '\\b', '\f': '\\f', '\\': '\\\\', '(': '\\(', ')': '\\)' }; // Convert little endian UTF-16 to big endian var swapBytes = function swapBytes(buff) { var l = buff.length; if (l & 0x01) { throw new Error('Buffer length must be even'); } else { for (var i = 0, end = l - 1; i < end; i += 2) { var a = buff[i]; buff[i] = buff[i + 1]; buff[i + 1] = a; } } return buff; }; var PDFObject = /*#__PURE__*/function () { function PDFObject() { _classCallCheck(this, PDFObject); } _createClass(PDFObject, null, [{ key: "convert", value: function convert(object) { var encryptFn = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; // String literals are converted to the PDF name type if (typeof object === 'string') { return "/".concat(object); // String objects are converted to PDF strings (UTF-16) } else if (object instanceof String) { var string = object; // Detect if this is a unicode string var isUnicode = false; for (var i = 0, end = string.length; i < end; i++) { if (string.charCodeAt(i) > 0x7f) { isUnicode = true; break; } } // If so, encode it as big endian UTF-16 var stringBuffer; if (isUnicode) { stringBuffer = swapBytes(Buffer.from("\uFEFF".concat(string), 'utf16le')); } else { stringBuffer = Buffer.from(string.valueOf(), 'ascii'); } // Encrypt the string when necessary if (encryptFn) { string = encryptFn(stringBuffer).toString('binary'); } else { string = stringBuffer.toString('binary'); } // Escape characters as required by the spec string = string.replace(escapableRe, function (c) { return escapable[c]; }); return "(".concat(string, ")"); // Buffers are converted to PDF hex strings } else if (Buffer.isBuffer(object)) { return "<".concat(object.toString('hex'), ">"); } else if (object instanceof PDFAbstractReference || object instanceof PDFTree) { return object.toString(); } else if (object instanceof Date) { var _string = "D:".concat(pad(object.getUTCFullYear(), 4)) + pad(object.getUTCMonth() + 1, 2) + pad(object.getUTCDate(), 2) + pad(object.getUTCHours(), 2) + pad(object.getUTCMinutes(), 2) + pad(object.getUTCSeconds(), 2) + 'Z'; // Encrypt the string when necessary if (encryptFn) { _string = encryptFn(Buffer.from(_string, 'ascii')).toString('binary'); // Escape characters as required by the spec _string = _string.replace(escapableRe, function (c) { return escapable[c]; }); } return "(".concat(_string, ")"); } else if (Array.isArray(object)) { var items = object.map(function (e) { return PDFObject.convert(e, encryptFn); }).join(' '); return "[".concat(items, "]"); } else if ({}.toString.call(object) === '[object Object]') { var out = ['<<']; for (var key in object) { var val = object[key]; out.push("/".concat(key, " ").concat(PDFObject.convert(val, encryptFn))); } out.push('>>'); return out.join('\n'); } else if (typeof object === 'number') { return PDFObject.number(object); } else { return "".concat(object); } } }, { key: "number", value: function number(n) { if (n > -1e21 && n < 1e21) { return Math.round(n * 1e6) / 1e6; } throw new Error("unsupported number: ".concat(n)); } }]); return PDFObject; }(); var PDFReference = /*#__PURE__*/function (_PDFAbstractReference) { _inherits(PDFReference, _PDFAbstractReference); var _super = _createSuper(PDFReference); function PDFReference(document, id) { var _this; var data = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; _classCallCheck(this, PDFReference); _this = _super.call(this); _this.document = document; _this.id = id; _this.data = data; _this.gen = 0; _this.compress = _this.document.compress && !_this.data.Filter; _this.uncompressedLength = 0; _this.buffer = []; return _this; } _createClass(PDFReference, [{ key: "write", value: function write(chunk) { if (!Buffer.isBuffer(chunk)) { chunk = Buffer.from(chunk + '\n', 'binary'); } this.uncompressedLength += chunk.length; if (this.data.Length == null) { this.data.Length = 0; } this.buffer.push(chunk); this.data.Length += chunk.length; if (this.compress) { return this.data.Filter = 'FlateDecode'; } } }, { key: "end", value: function end(chunk) { if (chunk) { this.write(chunk); } return this.finalize(); } }, { key: "finalize", value: function finalize() { this.offset = this.document._offset; var encryptFn = this.document._security ? this.document._security.getEncryptFn(this.id, this.gen) : null; if (this.buffer.length) { this.buffer = Buffer.concat(this.buffer); if (this.compress) { this.buffer = _zlib.default.deflateSync(this.buffer); } if (encryptFn) { this.buffer = encryptFn(this.buffer); } this.data.Length = this.buffer.length; } this.document._write("".concat(this.id, " ").concat(this.gen, " obj")); this.document._write(PDFObject.convert(this.data, encryptFn)); if (this.buffer.length) { this.document._write('stream'); this.document._write(this.buffer); this.buffer = []; // free up memory this.document._write('\nendstream'); } this.document._write('endobj'); this.document._refEnd(this); } }, { key: "toString", value: function toString() { return "".concat(this.id, " ").concat(this.gen, " R"); } }]); return PDFReference; }(PDFAbstractReference); /* PDFPage - represents a single page in the PDF document By Devon Govett */ var DEFAULT_MARGINS = { top: 72, left: 72, bottom: 72, right: 72 }; var SIZES = { '4A0': [4767.87, 6740.79], '2A0': [3370.39, 4767.87], A0: [2383.94, 3370.39], A1: [1683.78, 2383.94], A2: [1190.55, 1683.78], A3: [841.89, 1190.55], A4: [595.28, 841.89], A5: [419.53, 595.28], A6: [297.64, 419.53], A7: [209.76, 297.64], A8: [147.4, 209.76], A9: [104.88, 147.4], A10: [73.7, 104.88], B0: [2834.65, 4008.19], B1: [2004.09, 2834.65], B2: [1417.32, 2004.09], B3: [1000.63, 1417.32], B4: [708.66, 1000.63], B5: [498.9, 708.66], B6: [354.33, 498.9], B7: [249.45, 354.33], B8: [175.75, 249.45], B9: [124.72, 175.75], B10: [87.87, 124.72], C0: [2599.37, 3676.54], C1: [1836.85, 2599.37], C2: [1298.27, 1836.85], C3: [918.43, 1298.27], C4: [649.13, 918.43], C5: [459.21, 649.13], C6: [323.15, 459.21], C7: [229.61, 323.15], C8: [161.57, 229.61], C9: [113.39, 161.57], C10: [79.37, 113.39], RA0: [2437.8, 3458.27], RA1: [1729.13, 2437.8], RA2: [1218.9, 1729.13], RA3: [864.57, 1218.9], RA4: [609.45, 864.57], SRA0: [2551.18, 3628.35], SRA1: [1814.17, 2551.18], SRA2: [1275.59, 1814.17], SRA3: [907.09, 1275.59], SRA4: [637.8, 907.09], EXECUTIVE: [521.86, 756.0], FOLIO: [612.0, 936.0], LEGAL: [612.0, 1008.0], LETTER: [612.0, 792.0], TABLOID: [792.0, 1224.0] }; var PDFPage = /*#__PURE__*/function () { function PDFPage(document) { var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; _classCallCheck(this, PDFPage); this.document = document; this.size = options.size || 'letter'; this.layout = options.layout || 'portrait'; // process margins if (typeof options.margin === 'number') { this.margins = { top: options.margin, left: options.margin, bottom: options.margin, right: options.margin }; // default to 1 inch margins } else { this.margins = options.margins || DEFAULT_MARGINS; } // calculate page dimensions var dimensions = Array.isArray(this.size) ? this.size : SIZES[this.size.toUpperCase()]; this.width = dimensions[this.layout === 'portrait' ? 0 : 1]; this.height = dimensions[this.layout === 'portrait' ? 1 : 0]; this.content = this.document.ref(); // Initialize the Font, XObject, and ExtGState dictionaries this.resources = this.document.ref({ ProcSet: ['PDF', 'Text', 'ImageB', 'ImageC', 'ImageI'] }); // The page dictionary this.dictionary = this.document.ref({ Type: 'Page', Parent: this.document._root.data.Pages, MediaBox: [0, 0, this.width, this.height], Contents: this.content, Resources: this.resources }); this.markings = []; } // Lazily create these objects _createClass(PDFPage, [{ key: "maxY", value: function maxY() { return this.height - this.margins.bottom; } }, { key: "write", value: function write(chunk) { return this.content.write(chunk); } }, { key: "end", value: function end() { this.dictionary.end(); this.resources.end(); return this.content.end(); } }, { key: "fonts", get: function get() { var data = this.resources.data; return data.Font != null ? data.Font : data.Font = {}; } }, { key: "xobjects", get: function get() { var data = this.resources.data; return data.XObject != null ? data.XObject : data.XObject = {}; } }, { key: "ext_gstates", get: function get() { var data = this.resources.data; return data.ExtGState != null ? data.ExtGState : data.ExtGState = {}; } }, { key: "patterns", get: function get() { var data = this.resources.data; return data.Pattern != null ? data.Pattern : data.Pattern = {}; } }, { key: "colorSpaces", get: function get() { var data = this.resources.data; return data.ColorSpace || (data.ColorSpace = {}); } }, { key: "annotations", get: function get() { var data = this.dictionary.data; return data.Annots != null ? data.Annots : data.Annots = []; } }, { key: "structParentTreeKey", get: function get() { var data = this.dictionary.data; return data.StructParents != null ? data.StructParents : data.StructParents = this.document.createStructParentTreeNextKey(); } }]); return PDFPage; }(); var PDFNameTree = /*#__PURE__*/function (_PDFTree) { _inherits(PDFNameTree, _PDFTree); var _super = _createSuper(PDFNameTree); function PDFNameTree() { _classCallCheck(this, PDFNameTree); return _super.apply(this, arguments); } _createClass(PDFNameTree, [{ key: "_compareKeys", value: function _compareKeys(a, b) { return a.localeCompare(b); } }, { key: "_keysName", value: function _keysName() { return "Names"; } }, { key: "_dataForKey", value: function _dataForKey(k) { return new String(k); } }]); return PDFNameTree; }(PDFTree); /** * Check if value is in a range group. * @param {number} value * @param {number[]} rangeGroup * @returns {boolean} */ function inRange(value, rangeGroup) { if (value < rangeGroup[0]) return false; var startRange = 0; var endRange = rangeGroup.length / 2; while (startRange <= endRange) { var middleRange = Math.floor((startRange + endRange) / 2); // actual array index var arrayIndex = middleRange * 2; // Check if value is in range pointed by actual index if (value >= rangeGroup[arrayIndex] && value <= rangeGroup[arrayIndex + 1]) { return true; } if (value > rangeGroup[arrayIndex + 1]) { // Search Right Side Of Array startRange = middleRange + 1; } else { // Search Left Side Of Array endRange = middleRange - 1; } } return false; } /** * A.1 Unassigned code points in Unicode 3.2 * @link https://tools.ietf.org/html/rfc3454#appendix-A.1 */ var unassigned_code_points = [0x0221, 0x0221, 0x0234, 0x024f, 0x02ae, 0x02af, 0x02ef, 0x02ff, 0x0350, 0x035f, 0x0370, 0x0373, 0x0376, 0x0379, 0x037b, 0x037d, 0x037f, 0x0383, 0x038b, 0x038b, 0x038d, 0x038d, 0x03a2, 0x03a2, 0x03cf, 0x03cf, 0x03f7, 0x03ff, 0x0487, 0x0487, 0x04cf, 0x04cf, 0x04f6, 0x04f7, 0x04fa, 0x04ff, 0x0510, 0x0530, 0x0557, 0x0558, 0x0560, 0x0560, 0x0588, 0x0588, 0x058b, 0x0590, 0x05a2, 0x05a2, 0x05ba, 0x05ba, 0x05c5, 0x05cf, 0x05eb, 0x05ef, 0x05f5, 0x060b, 0x060d, 0x061a, 0x061c, 0x061e, 0x0620, 0x0620, 0x063b, 0x063f, 0x0656, 0x065f, 0x06ee, 0x06ef, 0x06ff, 0x06ff, 0x070e, 0x070e, 0x072d, 0x072f, 0x074b, 0x077f, 0x07b2, 0x0900, 0x0904, 0x0904, 0x093a, 0x093b, 0x094e, 0x094f, 0x0955, 0x0957, 0x0971, 0x0980, 0x0984, 0x0984, 0x098d, 0x098e, 0x0991, 0x0992, 0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0f48, 0x0f48, 0x0f6b, 0x0f70, 0x0f8c, 0x0f8f, 0x0f98, 0x0f98, 0x0fbd, 0x0fbd, 0x0fcd, 0x0fce, 0x0fd0, 0x0fff, 0x1022, 0x1022, 0x1028, 0x1028, 0x102b, 0x102b, 0x1033, 0x1035, 0x103a, 0x103f, 0x105a, 0x109f, 0x10c6, 0x10cf, 0x10f9, 0x10fa, 0x10fc, 0x10ff, 0x115a, 0x115e, 0x11a3, 0x11a7, 0x11fa, 0x11ff, 0x1207, 0x1207, 0x1247, 0x1247, 0x1249, 0x1249, 0x124e, 0x124f, 0x1257, 0x1257, 0x1259, 0x1259, 0x125e, 0x125f, 0x1287, 0x1287, 0x1289, 0x1289, 0x128e, 0x128f, 0x12af, 0x12af, 0x12b1, 0x12b1, 0x12b6, 0x12b7, 0x12bf, 0x12bf, 0x12c1, 0x12c1, 0x12c6, 0x12c7, 0x12cf, 0x12cf, 0x12d7, 0x12d7, 0x12ef, 0x12ef, 0x130f, 0x130f, 0x1311, 0x1311, 0x1316, 0x1317, 0x131f, 0x131f, 0x1347, 0x1347, 0x135b, 0x1360, 0x137d, 0x139f, 0x13f5, 0x1400, 0x1677, 0x167f, 0x169d, 0x169f, 0x16f1, 0x16ff, 0x170d, 0x170d, 0x1715, 0x171f, 0x1737, 0x173f, 0x1754, 0x175f, 0x176d, 0x176d, 0x1771, 0x1771, 0x1774, 0x177f, 0x17dd, 0x17df, 0x17ea, 0x17ff, 0x180f, 0x180f, 0x181a, 0x181f, 0x1878, 0x187f, 0x18aa, 0x1dff, 0x1e9c, 0x1e9f, 0x1efa, 0x1eff, 0x1f16, 0x1f17, 0x1f1e, 0x1f1f, 0x1f46, 0x1f47, 0x1f4e, 0x1f4f, 0x1f58, 0x1f58, 0x1f5a, 0x1f5a, 0x1f5c, 0x1f5c, 0x1f5e, 0x1f5e, 0x1f7e, 0x1f7f, 0x1fb5, 0x1fb5, 0x1fc5, 0x1fc5, 0x1fd4, 0x1fd5, 0x1fdc, 0x1fdc, 0x1ff0, 0x1ff1, 0x1ff5, 0x1ff5, 0x1fff, 0x1fff, 0x2053, 0x2056, 0x2058, 0x205e, 0x2064, 0x2069, 0x2072, 0x2073, 0x208f, 0x209f, 0x20b2, 0x20cf, 0x20eb, 0x20ff, 0x213b, 0x213c, 0x214c, 0x2152, 0x2184, 0x218f, 0x23cf, 0x23ff, 0x2427, 0x243f, 0x244b, 0x245f, 0x24ff, 0x24ff, 0x2614, 0x2615, 0x2618, 0x2618, 0x267e, 0x267f, 0x268a, 0x2700, 0x2705, 0x2705, 0x270a, 0x270b, 0x2728, 0x2728, 0x274c, 0x274c, 0x274e, 0x274e, 0x2753, 0x2755, 0x2757, 0x2757, 0x275f, 0x2760, 0x2795, 0x2797, 0x27b0, 0x27b0, 0x27bf, 0x27cf, 0x27ec, 0x27ef, 0x2b00, 0x2e7f, 0x2e9a, 0x2e9a, 0x2ef4, 0x2eff, 0x2fd6, 0x2fef, 0x2ffc, 0x2fff, 0x3040, 0x3040, 0x3097, 0x3098, 0x3100, 0x3104, 0x312d, 0x3130, 0x318f, 0x318f, 0x31b8, 0x31ef, 0x321d, 0x321f, 0x3244, 0x3250, 0x327c, 0x327e, 0x32cc, 0x32cf, 0x32ff, 0x32ff, 0x3377, 0x337a, 0x33de, 0x33df, 0x33ff, 0x33ff, 0x4db6, 0x4dff, 0x9fa6, 0x9fff, 0xa48d, 0xa48f, 0xa4c7, 0xabff, 0xd7a4, 0xd7ff, 0xfa2e, 0xfa2f, 0xfa6b, 0xfaff, 0xfb07, 0xfb12, 0xfb18, 0xfb1c, 0xfb37, 0xfb37, 0xfb3d, 0xfb3d, 0xfb3f, 0xfb3f, 0xfb42, 0xfb42, 0xfb45, 0xfb45, 0xfbb2, 0xfbd2, 0xfd40, 0xfd4f, 0xfd90, 0xfd91, 0xfdc8, 0xfdcf, 0xfdfd, 0xfdff, 0xfe10, 0xfe1f, 0xfe24, 0xfe2f, 0xfe47, 0xfe48, 0xfe53, 0xfe53, 0xfe67, 0xfe67, 0xfe6c, 0xfe6f, 0xfe75, 0xfe75, 0xfefd, 0xfefe, 0xff00, 0xff00, 0xffbf, 0xffc1, 0xffc8, 0xffc9, 0xffd0, 0xffd1, 0xffd8, 0xffd9, 0xffdd, 0xffdf, 0xffe7, 0xffe7, 0xffef, 0xfff8, 0x10000, 0x102ff, 0x1031f, 0x1031f, 0x10324, 0x1032f, 0x1034b, 0x103ff, 0x10426, 0x10427, 0x1044e, 0x1cfff, 0x1d0f6, 0x1d0ff, 0x1d127, 0x1d129, 0x1d1de, 0x1d3ff, 0x1d455, 0x1d455, 0x1d49d, 0x1d49d, 0x1d4a0, 0x1d4a1, 0x1d4a3, 0x1d4a4, 0x1d4a7, 0x1d4a8, 0x1d4ad, 0x1d4ad, 0x1d4ba, 0x1d4ba, 0x1d4bc, 0x1d4bc, 0x1d4c1, 0x1d4c1, 0x1d4c4, 0x1d4c4, 0x1d506, 0x1d506, 0x1d50b, 0x1d50c, 0x1d515, 0x1d515, 0x1d51d, 0x1d51d, 0x1d53a, 0x1d53a, 0x1d53f, 0x1d53f, 0x1d545, 0x1d545, 0x1d547, 0x1d549, 0x1d551, 0x1d551, 0x1d6a4, 0x1d6a7, 0x1d7ca, 0x1d7cd, 0x1d800, 0x1fffd, 0x2a6d7, 0x2f7ff, 0x2fa1e, 0x2fffd, 0x30000, 0x3fffd, 0x40000, 0x4fffd, 0x50000, 0x5fffd, 0x60000, 0x6fffd, 0x70000, 0x7fffd, 0x80000, 0x8fffd, 0x90000, 0x9fffd, 0xa0000, 0xafffd, 0xb0000, 0xbfffd, 0xc0000, 0xcfffd, 0xd0000, 0xdfffd, 0xe0000, 0xe0000, 0xe0002, 0xe001f, 0xe0080, 0xefffd]; // prettier-ignore-end var isUnassignedCodePoint = function isUnassignedCodePoint(character) { return inRange(character, unassigned_code_points); }; // prettier-ignore-start /** * B.1 Commonly mapped to nothing * @link https://tools.ietf.org/html/rfc3454#appendix-B.1 */ var commonly_mapped_to_nothing = [0x00ad, 0x00ad, 0x034f, 0x034f, 0x1806, 0x1806, 0x180b, 0x180b, 0x180c, 0x180c, 0x180d, 0x180d, 0x200b, 0x200b, 0x200c, 0x200c, 0x200d, 0x200d, 0x2060, 0x2060, 0xfe00, 0xfe00, 0xfe01, 0xfe01, 0xfe02, 0xfe02, 0xfe03, 0xfe03, 0xfe04, 0xfe04, 0xfe05, 0xfe05, 0xfe06, 0xfe06, 0xfe07, 0xfe07, 0xfe08, 0xfe08, 0xfe09, 0xfe09, 0xfe0a, 0xfe0a, 0xfe0b, 0xfe0b, 0xfe0c, 0xfe0c, 0xfe0d, 0xfe0d, 0xfe0e, 0xfe0e, 0xfe0f, 0xfe0f, 0xfeff, 0xfeff]; // prettier-ignore-end var isCommonlyMappedToNothing = function isCommonlyMappedToNothing(character) { return inRange(character, commonly_mapped_to_nothing); }; // prettier-ignore-start /** * C.1.2 Non-ASCII space characters * @link https://tools.ietf.org/html/rfc3454#appendix-C.1.2 */ var non_ASCII_space_characters = [0x00a0, 0x00a0 /* NO-BREAK SPACE */ , 0x1680, 0x1680 /* OGHAM SPACE MARK */ , 0x2000, 0x2000 /* EN QUAD */ , 0x2001, 0x2001 /* EM QUAD */ , 0x2002, 0x2002 /* EN SPACE */ , 0x2003, 0x2003 /* EM SPACE */ , 0x2004, 0x2004 /* THREE-PER-EM SPACE */ , 0x2005, 0x2005 /* FOUR-PER-EM SPACE */ , 0x2006, 0x2006 /* SIX-PER-EM SPACE */ , 0x2007, 0x2007 /* FIGURE SPACE */ , 0x2008, 0x2008 /* PUNCTUATION SPACE */ , 0x2009, 0x2009 /* THIN SPACE */ , 0x200a, 0x200a /* HAIR SPACE */ , 0x200b, 0x200b /* ZERO WIDTH SPACE */ , 0x202f, 0x202f /* NARROW NO-BREAK SPACE */ , 0x205f, 0x205f /* MEDIUM MATHEMATICAL SPACE */ , 0x3000, 0x3000 /* IDEOGRAPHIC SPACE */ ]; // prettier-ignore-end var isNonASCIISpaceCharacter = function isNonASCIISpaceCharacter(character) { return inRange(character, non_ASCII_space_characters); }; // prettier-ignore-start var non_ASCII_controls_characters = [ /** * C.2.2 Non-ASCII control characters * @link https://tools.ietf.org/html/rfc3454#appendix-C.2.2 */ 0x0080, 0x009f /* [CONTROL CHARACTERS] */ , 0x06dd, 0x06dd /* ARABIC END OF AYAH */ , 0x070f, 0x070f /* SYRIAC ABBREVIATION MARK */ , 0x180e, 0x180e /* MONGOLIAN VOWEL SEPARATOR */ , 0x200c, 0x200c /* ZERO WIDTH NON-JOINER */ , 0x200d, 0x200d /* ZERO WIDTH JOINER */ , 0x2028, 0x2028 /* LINE SEPARATOR */ , 0x2029, 0x2029 /* PARAGRAPH SEPARATOR */ , 0x2060, 0x2060 /* WORD JOINER */ , 0x2061, 0x2061 /* FUNCTION APPLICATION */ , 0x2062, 0x2062 /* INVISIBLE TIMES */ , 0x2063, 0x2063 /* INVISIBLE SEPARATOR */ , 0x206a, 0x206f /* [CONTROL CHARACTERS] */ , 0xfeff, 0xfeff /* ZERO WIDTH NO-BREAK SPACE */ , 0xfff9, 0xfffc /* [CONTROL CHARACTERS] */ , 0x1d173, 0x1d17a /* [MUSICAL CONTROL CHARACTERS] */ ]; var non_character_codepoints = [ /** * C.4 Non-character code points * @link https://tools.ietf.org/html/rfc3454#appendix-C.4 */ 0xfdd0, 0xfdef /* [NONCHARACTER CODE POINTS] */ , 0xfffe, 0xffff /* [NONCHARACTER CODE POINTS] */ , 0x1fffe, 0x1ffff /* [NONCHARACTER CODE POINTS] */ , 0x2fffe, 0x2ffff /* [NONCHARACTER CODE POINTS] */ , 0x3fffe, 0x3ffff /* [NONCHARACTER CODE POINTS] */ , 0x4fffe, 0x4ffff /* [NONCHARACTER CODE POINTS] */ , 0x5fffe, 0x5ffff /* [NONCHARACTER CODE POINTS] */ , 0x6fffe, 0x6ffff /* [NONCHARACTER CODE POINTS] */ , 0x7fffe, 0x7ffff /* [NONCHARACTER CODE POINTS] */ , 0x8fffe, 0x8ffff /* [NONCHARACTER CODE POINTS] */ , 0x9fffe, 0x9ffff /* [NONCHARACTER CODE POINTS] */ , 0xafffe, 0xaffff /* [NONCHARACTER CODE POINTS] */ , 0xbfffe, 0xbffff /* [NONCHARACTER CODE POINTS] */ , 0xcfffe, 0xcffff /* [NONCHARACTER CODE POINTS] */ , 0xdfffe, 0xdffff /* [NONCHARACTER CODE POINTS] */ , 0xefffe, 0xeffff /* [NONCHARACTER CODE POINTS] */ , 0x10fffe, 0x10ffff /* [NONCHARACTER CODE POINTS] */ ]; /** * 2.3. Prohibited Output */ var prohibited_characters = [ /** * C.2.1 ASCII control characters * @link https://tools.ietf.org/html/rfc3454#appendix-C.2.1 */ 0, 0x001f /* [CONTROL CHARACTERS] */ , 0x007f, 0x007f /* DELETE */ , /** * C.8 Change display properties or are deprecated * @link https://tools.ietf.org/html/rfc3454#appendix-C.8 */ 0x0340, 0x0340 /* COMBINING GRAVE TONE MARK */ , 0x0341, 0x0341 /* COMBINING ACUTE TONE MARK */ , 0x200e, 0x200e /* LEFT-TO-RIGHT MARK */ , 0x200f, 0x200f /* RIGHT-TO-LEFT MARK */ , 0x202a, 0x202a /* LEFT-TO-RIGHT EMBEDDING */ , 0x202b, 0x202b /* RIGHT-TO-LEFT EMBEDDING */ , 0x202c, 0x202c /* POP DIRECTIONAL FORMATTING */ , 0x202d, 0x202d /* LEFT-TO-RIGHT OVERRIDE */ , 0x202e, 0x202e /* RIGHT-TO-LEFT OVERRIDE */ , 0x206a, 0x206a /* INHIBIT SYMMETRIC SWAPPING */ , 0x206b, 0x206b /* ACTIVATE SYMMETRIC SWAPPING */ , 0x206c, 0x206c /* INHIBIT ARABIC FORM SHAPING */ , 0x206d, 0x206d /* ACTIVATE ARABIC FORM SHAPING */ , 0x206e, 0x206e /* NATIONAL DIGIT SHAPES */ , 0x206f, 0x206f /* NOMINAL DIGIT SHAPES */ , /** * C.7 Inappropriate for canonical representation * @link https://tools.ietf.org/html/rfc3454#appendix-C.7 */ 0x2ff0, 0x2ffb /* [IDEOGRAPHIC DESCRIPTION CHARACTERS] */ , /** * C.5 Surrogate codes * @link https://tools.ietf.org/html/rfc3454#appendix-C.5 */ 0xd800, 0xdfff, /** * C.3 Private use * @link https://tools.ietf.org/html/rfc3454#appendix-C.3 */ 0xe000, 0xf8ff /* [PRIVATE USE, PLANE 0] */ , /** * C.6 Inappropriate for plain text * @link https://tools.ietf.org/html/rfc3454#appendix-C.6 */ 0xfff9, 0xfff9 /* INTERLINEAR ANNOTATION ANCHOR */ , 0xfffa, 0xfffa /* INTERLINEAR ANNOTATION SEPARATOR */ , 0xfffb, 0xfffb /* INTERLINEAR ANNOTATION TERMINATOR */ , 0xfffc, 0xfffc /* OBJECT REPLACEMENT CHARACTER */ , 0xfffd, 0xfffd /* REPLACEMENT CHARACTER */ , /** * C.9 Tagging characters * @link https://tools.ietf.org/html/rfc3454#appendix-C.9 */ 0xe0001, 0xe0001 /* LANGUAGE TAG */ , 0xe0020, 0xe007f /* [TAGGING CHARACTERS] */ , /** * C.3 Private use * @link https://tools.ietf.org/html/rfc3454#appendix-C.3 */ 0xf0000, 0xffffd /* [PRIVATE USE, PLANE 15] */ , 0x100000, 0x10fffd /* [PRIVATE USE, PLANE 16] */ ]; // prettier-ignore-end var isProhibitedCharacter = function isProhibitedCharacter(character) { return inRange(character, non_ASCII_space_characters) || inRange(character, prohibited_characters) || inRange(character, non_ASCII_controls_characters) || inRange(character, non_character_codepoints); }; // prettier-ignore-start /** * D.1 Characters with bidirectional property "R" or "AL" * @link https://tools.ietf.org/html/rfc3454#appendix-D.1 */ var bidirectional_r_al = [0x05be, 0x05be, 0x05c0, 0x05c0, 0x05c3, 0x05c3, 0x05d0, 0x05ea, 0x05f0, 0x05f4, 0x061b, 0x061b, 0x061f, 0x061f, 0x0621, 0x063a, 0x0640, 0x064a, 0x066d, 0x066f, 0x0671, 0x06d5, 0x06dd, 0x06dd, 0x06e5, 0x06e6, 0x06fa, 0x06fe, 0x0700, 0x070d, 0x0710, 0x0710, 0x0712, 0x072c, 0x0780, 0x07a5, 0x07b1, 0x07b1, 0x200f, 0x200f, 0xfb1d, 0xfb1d, 0xfb1f, 0xfb28, 0xfb2a, 0xfb36, 0xfb38, 0xfb3c, 0xfb3e, 0xfb3e, 0xfb40, 0xfb41, 0xfb43, 0xfb44, 0xfb46, 0xfbb1, 0xfbd3, 0xfd3d, 0xfd50, 0xfd8f, 0xfd92, 0xfdc7, 0xfdf0, 0xfdfc, 0xfe70, 0xfe74, 0xfe76, 0xfefc]; // prettier-ignore-end var isBidirectionalRAL = function isBidirectionalRAL(character) { return inRange(character, bidirectional_r_al); }; // prettier-ignore-start /** * D.2 Characters with bidirectional property "L" * @link https://tools.ietf.org/html/rfc3454#appendix-D.2 */ var bidirectional_l = [0x0041, 0x005a, 0x0061, 0x007a, 0x00aa, 0x00aa, 0x00b5, 0x00b5, 0x00ba, 0x00ba, 0x00c0, 0x00d6, 0x00d8, 0x00f6, 0x00f8, 0x0220, 0x0222, 0x0233, 0x0250, 0x02ad, 0x02b0, 0x02b8, 0x02bb, 0x02c1, 0x02d0, 0x02d1, 0x02e0, 0x02e4, 0x02ee, 0x02ee, 0x037a, 0x037a, 0x0386, 0x0386, 0x0388, 0x038a, 0x038c, 0x038c, 0x038e, 0x03a1, 0x03a3, 0x03ce, 0x03d0, 0x03f5, 0x0400, 0x0482, 0x048a, 0x04ce, 0x04d0, 0x04f5, 0x04f8, 0x04f9, 0x0500, 0x050f, 0x0531, 0x0556, 0x0559, 0x055f, 0x0561, 0x0587, 0x0589, 0x0589, 0x0903, 0x0903, 0x0905, 0x0939, 0x093d, 0x0940, 0x0949, 0x094c, 0x0950, 0x0950, 0x0958, 0x0961, 0x0964, 0x0970, 0x0982, 0x0983, 0x0985, 0x098c, 0x098f, 0x0990, 0x0993, 0x09a8, 0x09aa, 0x09b0, 0x09b2, 0x09b2, 0x09b6, 0x09b9, 0x09be, 0x09c0, 0x09c7, 0x09c8, 0x09cb, 0x09cc, 0x09d7, 0x09d7, 0x09dc, 0x09dd, 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c, 0x0fcf, 0x0fcf, 0x1000, 0x1021, 0x1023, 0x1027, 0x1029, 0x102a, 0x102c, 0x102c, 0x1031, 0x1031, 0x1038, 0x1038, 0x1040, 0x1057, 0x10a0, 0x10c5, 0x10d0, 0x10f8, 0x10fb, 0x10fb, 0x1100, 0x1159, 0x115f, 0x11a2, 0x11a8, 0x11f9, 0x1200, 0x1206, 0x1208, 0x1246, 0x1248, 0x1248, 0x124a, 0x124d, 0x1250, 0x1256, 0x1258, 0x1258, 0x125a, 0x125d, 0x1260, 0x1286, 0x1288, 0x1288, 0x128a, 0x128d, 0x1290, 0x12ae, 0x12b0, 0x12b0, 0x12b2, 0x12b5, 0x12b8, 0x12be, 0x12c0, 0x12c0, 0x12c2, 0x12c5, 0x12c8, 0x12ce, 0x12d0, 0x12d6, 0x12d8, 0x12ee, 0x12f0, 0x130e, 0x1310, 0x1310, 0x1312, 0x1315, 0x1318, 0x131e, 0x1320, 0x1346, 0x1348, 0x135a, 0x1361, 0x137c, 0x13a0, 0x13f4, 0x1401, 0x1676, 0x1681, 0x169a, 0x16a0, 0x16f0, 0x1700, 0x170c, 0x170e, 0x1711, 0x1720, 0x1731, 0x1735, 0x1736, 0x1740, 0x1751, 0x1760, 0x176c, 0x176e, 0x1770, 0x1780, 0x17b6, 0x17be, 0x17c5, 0x17c7, 0x17c8, 0x17d4, 0x17da, 0x17dc, 0x17dc, 0x17e0, 0x17e9, 0x1810, 0x1819, 0x1820, 0x1877, 0x1880, 0x18a8, 0x1e00, 0x1e9b, 0x1ea0, 0x1ef9, 0x1f00, 0x1f15, 0x1f18, 0x1f1d, 0x1f20, 0x1f45, 0x1f48, 0x1f4d, 0x1f50, 0x1f57, 0x1f59, 0x1f59, 0x1f5b, 0x1f5b, 0x1f5d, 0x1f5d, 0x1f5f, 0x1f7d, 0x1f80, 0x1fb4, 0x1fb6, 0x1fbc, 0x1fbe, 0x1fbe, 0x1fc2, 0x1fc4, 0x1fc6, 0x1fcc, 0x1fd0, 0x1fd3, 0x1fd6, 0x1fdb, 0x1fe0, 0x1fec, 0x1ff2, 0x1ff4, 0x1ff6, 0x1ffc, 0x200e, 0x200e, 0x2071, 0x2071, 0x207f, 0x207f, 0x2102, 0x2102, 0x2107, 0x2107, 0x210a, 0x2113, 0x2115, 0x2115, 0x2119, 0x211d, 0x2124, 0x2124, 0x2126, 0x2126, 0x2128, 0x2128, 0x212a, 0x212d, 0x212f, 0x2131, 0x2133, 0x2139, 0x213d, 0x213f, 0x2145, 0x2149, 0x2160, 0x2183, 0x2336, 0x237a, 0x2395, 0x2395, 0x249c, 0x24e9, 0x3005, 0x3007, 0x3021, 0x3029, 0x3031, 0x3035, 0x3038, 0x303c, 0x3041, 0x3096, 0x309d, 0x309f, 0x30a1, 0x30fa, 0x30fc, 0x30ff, 0x3105, 0x312c, 0x3131, 0x318e, 0x3190, 0x31b7, 0x31f0, 0x321c, 0x3220, 0x3243, 0x3260, 0x327b, 0x327f, 0x32b0, 0x32c0, 0x32cb, 0x32d0, 0x32fe, 0x3300, 0x3376, 0x337b, 0x33dd, 0x33e0, 0x33fe, 0x3400, 0x4db5, 0x4e00, 0x9fa5, 0xa000, 0xa48c, 0xac00, 0xd7a3, 0xd800, 0xfa2d, 0xfa30, 0xfa6a, 0xfb00, 0xfb06, 0xfb13, 0xfb17, 0xff21, 0xff3a, 0xff41, 0xff5a, 0xff66, 0xffbe, 0xffc2, 0xffc7, 0xffca, 0xffcf, 0xffd2, 0xffd7, 0xffda, 0xffdc, 0x10300, 0x1031e, 0x10320, 0x10323, 0x10330, 0x1034a, 0x10400, 0x10425, 0x10428, 0x1044d, 0x1d000, 0x1d0f5, 0x1d100, 0x1d126, 0x1d12a, 0x1d166, 0x1d16a, 0x1d172, 0x1d183, 0x1d184, 0x1d18c, 0x1d1a9, 0x1d1ae, 0x1d1dd, 0x1d400, 0x1d454, 0x1d456, 0x1d49c, 0x1d49e, 0x1d49f, 0x1d4a2, 0x1d4a2, 0x1d4a5, 0x1d4a6, 0x1d4a9, 0x1d4ac, 0x1d4ae, 0x1d4b9, 0x1d4bb, 0x1d4bb, 0x1d4bd, 0x1d4c0, 0x1d4c2, 0x1d4c3, 0x1d4c5, 0x1d505, 0x1d507, 0x1d50a, 0x1d50d, 0x1d514, 0x1d516, 0x1d51c, 0x1d51e, 0x1d539, 0x1d53b, 0x1d53e, 0x1d540, 0x1d544, 0x1d546, 0x1d546, 0x1d54a, 0x1d550, 0x1d552, 0x1d6a3, 0x1d6a8, 0x1d7c9, 0x20000, 0x2a6d6, 0x2f800, 0x2fa1d, 0xf0000, 0xffffd, 0x100000, 0x10fffd]; // prettier-ignore-end var isBidirectionalL = function isBidirectionalL(character) { return inRange(character, bidirectional_l); }; /** * non-ASCII space characters [StringPrep, C.1.2] that can be * mapped to SPACE (U+0020) */ var mapping2space = isNonASCIISpaceCharacter; /** * the "commonly mapped to nothing" characters [StringPrep, B.1] * that can be mapped to nothing. */ var mapping2nothing = isCommonlyMappedToNothing; // utils var getCodePoint = function getCodePoint(character) { return character.codePointAt(0); }; var first = function first(x) { return x[0]; }; var last = function last(x) { return x[x.length - 1]; }; /** * Convert provided string into an array of Unicode Code Points. * Based on https://stackoverflow.com/a/21409165/1556249 * and https://www.npmjs.com/package/code-point-at. * @param {string} input * @returns {number[]} */ function toCodePoints(input) { var codepoints = []; var size = input.length; for (var i = 0; i < size; i += 1) { var before = input.charCodeAt(i); if (before >= 0xd800 && before <= 0xdbff && size > i + 1) { var next = input.charCodeAt(i + 1); if (next >= 0xdc00 && next <= 0xdfff) { codepoints.push((before - 0xd800) * 0x400 + next - 0xdc00 + 0x10000); i += 1; continue; } } codepoints.push(before); } return codepoints; } /** * SASLprep. * @param {string} input * @param {Object} opts * @param {boolean} opts.allowUnassigned * @returns {string} */ function saslprep(input) { var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; if (typeof input !== 'string') { throw new TypeError('Expected string.'); } if (input.length === 0) { return ''; } // 1. Map var mapped_input = toCodePoints(input) // 1.1 mapping to space .map(function (character) { return mapping2space(character) ? 0x20 : character; }) // 1.2 mapping to nothing .filter(function (character) { return !mapping2nothing(character); }); // 2. Normalize var normalized_input = String.fromCodePoint.apply(null, mapped_input).normalize('NFKC'); var normalized_map = toCodePoints(normalized_input); // 3. Prohibit var hasProhibited = normalized_map.some(isProhibitedCharacter); if (hasProhibited) { throw new Error('Prohibited character, see https://tools.ietf.org/html/rfc4013#section-2.3'); } // Unassigned Code Points if (opts.allowUnassigned !== true) { var hasUnassigned = normalized_map.some(isUnassignedCodePoint); if (hasUnassigned) { throw new Error('Unassigned code point, see https://tools.ietf.org/html/rfc4013#section-2.5'); } } // 4. check bidi var hasBidiRAL = normalized_map.some(isBidirectionalRAL); var hasBidiL = normalized_map.some(isBidirectionalL); // 4.1 If a string contains any RandALCat character, the string MUST NOT // contain any LCat character. if (hasBidiRAL && hasBidiL) { throw new Error('String must not contain RandALCat and LCat at the same time,' + ' see https://tools.ietf.org/html/rfc3454#section-6'); } /** * 4.2 If a string contains any RandALCat character, a RandALCat * character MUST be the first character of the string, and a * RandALCat character MUST be the last character of the string. */ var isFirstBidiRAL = isBidirectionalRAL(getCodePoint(first(normalized_input))); var isLastBidiRAL = isBidirectionalRAL(getCodePoint(last(normalized_input))); if (hasBidiRAL && !(isFirstBidiRAL && isLastBidiRAL)) { throw new Error('Bidirectional RandALCat character must be the first and the last' + ' character of the string, see https://tools.ietf.org/html/rfc3454#section-6'); } return normalized_input; } var PDFSecurity = /*#__PURE__*/function () { _createClass(PDFSecurity, null, [{ key: "generateFileID", value: function generateFileID() { var info = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; var infoStr = "".concat(info.CreationDate.getTime(), "\n"); for (var key in info) { // eslint-disable-next-line no-prototype-builtins if (!info.hasOwnProperty(key)) { continue; } infoStr += "".concat(key, ": ").concat(info[key].valueOf(), "\n"); } return wordArrayToBuffer(_cryptoJs.default.MD5(infoStr)); } }, { key: "generateRandomWordArray", value: function generateRandomWordArray(bytes) { return _cryptoJs.default.lib.WordArray.random(bytes); } }, { key: "create", value: function create(document) { var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; if (!options.ownerPassword && !options.userPassword) { return null; } return new PDFSecurity(document, options); } }]); function PDFSecurity(document) { var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; _classCallCheck(this, PDFSecurity); if (!options.ownerPassword && !options.userPassword) { throw new Error('None of owner password and user password is defined.'); } this.document = document; this._setupEncryption(options); } _createClass(PDFSecurity, [{ key: "_setupEncryption", value: function _setupEncryption(options) { switch (options.pdfVersion) { case '1.4': case '1.5': this.version = 2; break; case '1.6': case '1.7': this.version = 4; break; case '1.7ext3': this.version = 5; break; default: this.version = 1; break; } var encDict = { Filter: 'Standard' }; switch (this.version) { case 1: case 2: case 4: this._setupEncryptionV1V2V4(this.version, encDict, options); break; case 5: this._setupEncryptionV5(encDict, options); break; } this.dictionary = this.document.ref(encDict); } }, { key: "_setupEncryptionV1V2V4", value: function _setupEncryptionV1V2V4(v, encDict, options) { var r, permissions; switch (v) { case 1: r = 2; this.keyBits = 40; permissions = getPermissionsR2(options.permissions); break; case 2: r = 3; this.keyBits = 128; permissions = getPermissionsR3(options.permissions); break; case 4: r = 4; this.keyBits = 128; permissions = getPermissionsR3(options.permissions); break; } var paddedUserPassword = processPasswordR2R3R4(options.userPassword); var paddedOwnerPassword = options.ownerPassword ? processPasswordR2R3R4(options.ownerPassword) : paddedUserPassword; var ownerPasswordEntry = getOwnerPasswordR2R3R4(r, this.keyBits, paddedUserPassword, paddedOwnerPassword); this.encryptionKey = getEncryptionKeyR2R3R4(r, this.keyBits, this.document._id, paddedUserPassword, ownerPasswordEntry, permissions); var userPasswordEntry; if (r === 2) { userPasswordEntry = getUserPasswordR2(this.encryptionKey); } else { userPasswordEntry = getUserPasswordR3R4(this.document._id, this.encryptionKey); } encDict.V = v; if (v >= 2) { encDict.Length = this.keyBits; } if (v === 4) { encDict.CF = { StdCF: { AuthEvent: 'DocOpen', CFM: 'AESV2', Length: this.keyBits / 8 } }; encDict.StmF = 'StdCF'; encDict.StrF = 'StdCF'; } encDict.R = r; encDict.O = wordArrayToBuffer(ownerPasswordEntry); encDict.U = wordArrayToBuffer(userPasswordEntry); encDict.P = permissions; } }, { key: "_setupEncryptionV5", value: function _setupEncryptionV5(encDict, options) { this.keyBits = 256; var permissions = getPermissionsR3(options.permissions); var processedUserPassword = processPasswordR5(options.userPassword); var processedOwnerPassword = options.ownerPassword ? processPasswordR5(options.ownerPassword) : processedUserPassword; this.encryptionKey = getEncryptionKeyR5(PDFSecurity.generateRandomWordArray); var userPasswordEntry = getUserPasswordR5(processedUserPassword, PDFSecurity.generateRandomWordArray); var userKeySalt = _cryptoJs.default.lib.WordArray.create(userPasswordEntry.words.slice(10, 12), 8); var userEncryptionKeyEntry = getUserEncryptionKeyR5(processedUserPassword, userKeySalt, this.encryptionKey); var ownerPasswordEntry = getOwnerPasswordR5(processedOwnerPassword, userPasswordEntry, PDFSecurity.generateRandomWordArray); var ownerKeySalt = _cryptoJs.default.lib.WordArray.create(ownerPasswordEntry.words.slice(10, 12), 8); var ownerEncryptionKeyEntry = getOwnerEncryptionKeyR5(processedOwnerPassword, ownerKeySalt, userPasswordEntry, this.encryptionKey); var permsEntry = getEncryptedPermissionsR5(permissions, this.encryptionKey, PDFSecurity.generateRandomWordArray); encDict.V = 5; encDict.Length = this.keyBits; encDict.CF = { StdCF: { AuthEvent: 'DocOpen', CFM: 'AESV3', Length: this.keyBits / 8 } }; encDict.StmF = 'StdCF'; encDict.StrF = 'StdCF'; encDict.R = 5; encDict.O = wordArrayToBuffer(ownerPasswordEntry); encDict.OE = wordArrayToBuffer(ownerEncryptionKeyEntry); encDict.U = wordArrayToBuffer(userPasswordEntry); encDict.UE = wordArrayToBuffer(userEncryptionKeyEntry); encDict.P = permissions; encDict.Perms = wordArrayToBuffer(permsEntry); } }, { key: "getEncryptFn", value: function getEncryptFn(obj, gen) { var digest; if (this.version < 5) { digest = this.encryptionKey.clone().concat(_cryptoJs.default.lib.WordArray.create([(obj & 0xff) << 24 | (obj & 0xff00) << 8 | obj >> 8 & 0xff00 | gen & 0xff, (gen & 0xff00) << 16], 5)); } if (this.version === 1 || this.version === 2) { var _key = _cryptoJs.default.MD5(digest); _key.sigBytes = Math.min(16, this.keyBits / 8 + 5); return function (buffer) { return wordArrayToBuffer(_cryptoJs.default.RC4.encrypt(_cryptoJs.default.lib.WordArray.create(buffer), _key).ciphertext); }; } var key; if (this.version === 4) { key = _cryptoJs.default.MD5(digest.concat(_cryptoJs.default.lib.WordArray.create([0x73416c54], 4))); } else { key = this.encryptionKey; } var iv = PDFSecurity.generateRandomWordArray(16); var options = { mode: _cryptoJs.default.mode.CBC, padding: _cryptoJs.default.pad.Pkcs7, iv: iv }; return function (buffer) { return wordArrayToBuffer(iv.clone().concat(_cryptoJs.default.AES.encrypt(_cryptoJs.default.lib.WordArray.create(buffer), key, options).ciphertext)); }; } }, { key: "end", value: function end() { this.dictionary.end(); } }]); return PDFSecurity; }(); function getPermissionsR2() { var permissionObject = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; var permissions = 0xffffffc0 >> 0; if (permissionObject.printing) { permissions |= 4; } if (permissionObject.modifying) { permissions |= 8; } if (permissionObject.copying) { permissions |= 16; } if (permissionObject.annotating) { permissions |= 32; } return permissions; } function getPermissionsR3() { var permissionObject = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; var permissions = 0xfffff0c0 >> 0; if (permissionObject.printing === 'lowResolution') { permissions |= 4; } if (permissionObject.printing === 'highResolution') { permissions |= 2052; } if (permissionObject.modifying) { permissions |= 8; } if (permissionObject.copying) { permissions |= 16; } if (permissionObject.annotating) { permissions |= 32; } if (permissionObject.fillingForms) { permissions |= 256; } if (permissionObject.contentAccessibility) { permissions |= 512; } if (permissionObject.documentAssembly) { permissions |= 1024; } return permissions; } function getUserPasswordR2(encryptionKey) { return _cryptoJs.default.RC4.encrypt(processPasswordR2R3R4(), encryptionKey).ciphertext; } function getUserPasswordR3R4(documentId, encryptionKey) { var key = encryptionKey.clone(); var cipher = _cryptoJs.default.MD5(processPasswordR2R3R4().concat(_cryptoJs.default.lib.WordArray.create(documentId))); for (var i = 0; i < 20; i++) { var xorRound = Math.ceil(key.sigBytes / 4); for (var j = 0; j < xorRound; j++) { key.words[j] = encryptionKey.words[j] ^ (i | i << 8 | i << 16 | i << 24); } cipher = _cryptoJs.default.RC4.encrypt(cipher, key).ciphertext; } return cipher.concat(_cryptoJs.default.lib.WordArray.create(null, 16)); } function getOwnerPasswordR2R3R4(r, keyBits, paddedUserPassword, paddedOwnerPassword) { var digest = paddedOwnerPassword; var round = r >= 3 ? 51 : 1; for (var i = 0; i < round; i++) { digest = _cryptoJs.default.MD5(digest); } var key = digest.clone(); key.sigBytes = keyBits / 8; var cipher = paddedUserPassword; round = r >= 3 ? 20 : 1; for (var _i = 0; _i < round; _i++) { var xorRound = Math.ceil(key.sigBytes / 4); for (var j = 0; j < xorRound; j++) { key.words[j] = digest.words[j] ^ (_i | _i << 8 | _i << 16 | _i << 24); } cipher = _cryptoJs.default.RC4.encrypt(cipher, key).ciphertext; } return cipher; } function getEncryptionKeyR2R3R4(r, keyBits, documentId, paddedUserPassword, ownerPasswordEntry, permissions) { var key = paddedUserPassword.clone().concat(ownerPasswordEntry).concat(_cryptoJs.default.lib.WordArray.create([lsbFirstWord(permissions)], 4)).concat(_cryptoJs.default.lib.WordArray.create(documentId)); var round = r >= 3 ? 51 : 1; for (var i = 0; i < round; i++) { key = _cryptoJs.default.MD5(key); key.sigBytes = keyBits / 8; } return key; } function getUserPasswordR5(processedUserPassword, generateRandomWordArray) { var validationSalt = generateRandomWordArray(8); var keySalt = generateRandomWordArray(8); return _cryptoJs.default.SHA256(processedUserPassword.clone().concat(validationSalt)).concat(validationSalt).concat(keySalt); } function getUserEncryptionKeyR5(processedUserPassword, userKeySalt, encryptionKey) { var key = _cryptoJs.default.SHA256(processedUserPassword.clone().concat(userKeySalt)); var options = { mode: _cryptoJs.default.mode.CBC, padding: _cryptoJs.default.pad.NoPadding, iv: _cryptoJs.default.lib.WordArray.create(null, 16) }; return _cryptoJs.default.AES.encrypt(encryptionKey, key, options).ciphertext; } function getOwnerPasswordR5(processedOwnerPassword, userPasswordEntry, generateRandomWordArray) { var validationSalt = generateRandomWordArray(8); var keySalt = generateRandomWordArray(8); return _cryptoJs.default.SHA256(processedOwnerPassword.clone().concat(validationSalt).concat(userPasswordEntry)).concat(validationSalt).concat(keySalt); } function getOwnerEncryptionKeyR5(processedOwnerPassword, ownerKeySalt, userPasswordEntry, encryptionKey) { var key = _cryptoJs.default.SHA256(processedOwnerPassword.clone().concat(ownerKeySalt).concat(userPasswordEntry)); var options = { mode: _cryptoJs.default.mode.CBC, padding: _cryptoJs.default.pad.NoPadding, iv: _cryptoJs.default.lib.WordArray.create(null, 16) }; return _cryptoJs.default.AES.encrypt(encryptionKey, key, options).ciphertext; } function getEncryptionKeyR5(generateRandomWordArray) { return generateRandomWordArray(32); } function getEncryptedPermissionsR5(permissions, encryptionKey, generateRandomWordArray) { var cipher = _cryptoJs.default.lib.WordArray.create([lsbFirstWord(permissions), 0xffffffff, 0x54616462], 12).concat(generateRandomWordArray(4)); var options = { mode: _cryptoJs.default.mode.ECB, padding: _cryptoJs.default.pad.NoPadding }; return _cryptoJs.default.AES.encrypt(cipher, encryptionKey, options).ciphertext; } function processPasswordR2R3R4() { var password = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; var out = Buffer.alloc(32); var length = password.length; var index = 0; while (index < length && index < 32) { var code = password.charCodeAt(index); if (code > 0xff) { throw new Error('Password contains one or more invalid characters.'); } out[index] = code; index++; } while (index < 32) { out[index] = PASSWORD_PADDING[index - length]; index++; } return _cryptoJs.default.lib.WordArray.create(out); } function processPasswordR5() { var password = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : ''; password = unescape(encodeURIComponent(saslprep(password))); var length = Math.min(127, password.length); var out = Buffer.alloc(length); for (var i = 0; i < length; i++) { out[i] = password.charCodeAt(i); } return _cryptoJs.default.lib.WordArray.create(out); } function lsbFirstWord(data) { return (data & 0xff) << 24 | (data & 0xff00) << 8 | data >> 8 & 0xff00 | data >> 24 & 0xff; } function wordArrayToBuffer(wordArray) { var byteArray = []; for (var i = 0; i < wordArray.sigBytes; i++) { byteArray.push(wordArray.words[Math.floor(i / 4)] >> 8 * (3 - i % 4) & 0xff); } return Buffer.from(byteArray); } var PASSWORD_PADDING = [0x28, 0xbf, 0x4e, 0x5e, 0x4e, 0x75, 0x8a, 0x41, 0x64, 0x00, 0x4e, 0x56, 0xff, 0xfa, 0x01, 0x08, 0x2e, 0x2e, 0x00, 0xb6, 0xd0, 0x68, 0x3e, 0x80, 0x2f, 0x0c, 0xa9, 0xfe, 0x64, 0x53, 0x69, 0x7a]; var number = PDFObject.number; var PDFGradient = /*#__PURE__*/function () { function PDFGradient(doc) { _classCallCheck(this, PDFGradient); this.doc = doc; this.stops = []; this.embedded = false; this.transform = [1, 0, 0, 1, 0, 0]; } _createClass(PDFGradient, [{ key: "stop", value: function stop(pos, color, opacity) { if (opacity == null) { opacity = 1; } color = this.doc._normalizeColor(color); if (this.stops.length === 0) { if (color.length === 3) { this._colorSpace = 'DeviceRGB'; } else if (color.length === 4) { this._colorSpace = 'DeviceCMYK'; } else if (color.length === 1) { this._colorSpace = 'DeviceGray'; } else { throw new Error('Unknown color space'); } } else if (this._colorSpace === 'DeviceRGB' && color.length !== 3 || this._colorSpace === 'DeviceCMYK' && color.length !== 4 || this._colorSpace === 'DeviceGray' && color.length !== 1) { throw new Error('All gradient stops must use the same color space'); } opacity = Math.max(0, Math.min(1, opacity)); this.stops.push([pos, color, opacity]); return this; } }, { key: "setTransform", value: function setTransform(m11, m12, m21, m22, dx, dy) { this.transform = [m11, m12, m21, m22, dx, dy]; return this; } }, { key: "embed", value: function embed(m) { var fn; var stopsLength = this.stops.length; if (stopsLength === 0) { return; } this.embedded = true; this.matrix = m; // if the last stop comes before 100%, add a copy at 100% var last = this.stops[stopsLength - 1]; if (last[0] < 1) { this.stops.push([1, last[1], last[2]]); } var bounds = []; var encode = []; var stops = []; for (var i = 0; i < stopsLength - 1; i++) { encode.push(0, 1); if (i + 2 !== stopsLength) { bounds.push(this.stops[i + 1][0]); } fn = this.doc.ref({ FunctionType: 2, Domain: [0, 1], C0: this.stops[i + 0][1], C1: this.stops[i + 1][1], N: 1 }); stops.push(fn); fn.end(); } // if there are only two stops, we don't need a stitching function if (stopsLength === 1) { fn = stops[0]; } else { fn = this.doc.ref({ FunctionType: 3, // stitching function Domain: [0, 1], Functions: stops, Bounds: bounds, Encode: encode }); fn.end(); } this.id = "Sh".concat(++this.doc._gradCount); var shader = this.shader(fn); shader.end(); var pattern = this.doc.ref({ Type: 'Pattern', PatternType: 2, Shading: shader, Matrix: this.matrix.map(number) }); pattern.end(); if (this.stops.some(function (stop) { return stop[2] < 1; })) { var grad = this.opacityGradient(); grad._colorSpace = 'DeviceGray'; var _iterator = _createForOfIteratorHelper(this.stops), _step; try { for (_iterator.s(); !(_step = _iterator.n()).done;) { var stop = _step.value; grad.stop(stop[0], [stop[2]]); } } catch (err) { _iterator.e(err); } finally { _iterator.f(); } grad = grad.embed(this.matrix); var pageBBox = [0, 0, this.doc.page.width, this.doc.page.height]; var form = this.doc.ref({ Type: 'XObject', Subtype: 'Form', FormType: 1, BBox: pageBBox, Group: { Type: 'Group', S: 'Transparency', CS: 'DeviceGray' }, Resources: { ProcSet: ['PDF', 'Text', 'ImageB', 'ImageC', 'ImageI'], Pattern: { Sh1: grad } } }); form.write('/Pattern cs /Sh1 scn'); form.end("".concat(pageBBox.join(' '), " re f")); var gstate = this.doc.ref({ Type: 'ExtGState', SMask: { Type: 'Mask', S: 'Luminosity', G: form } }); gstate.end(); var opacityPattern = this.doc.ref({ Type: 'Pattern', PatternType: 1, PaintType: 1, TilingType: 2, BBox: pageBBox, XStep: pageBBox[2], YStep: pageBBox[3], Resources: { ProcSet: ['PDF', 'Text', 'ImageB', 'ImageC', 'ImageI'], Pattern: { Sh1: pattern }, ExtGState: { Gs1: gstate } } }); opacityPattern.write('/Gs1 gs /Pattern cs /Sh1 scn'); opacityPattern.end("".concat(pageBBox.join(' '), " re f")); this.doc.page.patterns[this.id] = opacityPattern; } else { this.doc.page.patterns[this.id] = pattern; } return pattern; } }, { key: "apply", value: function apply(stroke) { // apply gradient transform to existing document ctm var _this$doc$_ctm = _slicedToArray(this.doc._ctm, 6), m0 = _this$doc$_ctm[0], m1 = _this$doc$_ctm[1], m2 = _this$doc$_ctm[2], m3 = _this$doc$_ctm[3], m4 = _this$doc$_ctm[4], m5 = _this$doc$_ctm[5]; var _this$transform = _slicedToArray(this.transform, 6), m11 = _this$transform[0], m12 = _this$transform[1], m21 = _this$transform[2], m22 = _this$transform[3], dx = _this$transform[4], dy = _this$transform[5]; var m = [m0 * m11 + m2 * m12, m1 * m11 + m3 * m12, m0 * m21 + m2 * m22, m1 * m21 + m3 * m22, m0 * dx + m2 * dy + m4, m1 * dx + m3 * dy + m5]; if (!this.embedded || m.join(' ') !== this.matrix.join(' ')) { this.embed(m); } this.doc._setColorSpace('Pattern', stroke); var op = stroke ? 'SCN' : 'scn'; return this.doc.addContent("/".concat(this.id, " ").concat(op)); } }]); return PDFGradient; }(); var PDFLinearGradient = /*#__PURE__*/function (_PDFGradient) { _inherits(PDFLinearGradient, _PDFGradient); var _super = _createSuper(PDFLinearGradient); function PDFLinearGradient(doc, x1, y1, x2, y2) { var _this; _classCallCheck(this, PDFLinearGradient); _this = _super.call(this, doc); _this.x1 = x1; _this.y1 = y1; _this.x2 = x2; _this.y2 = y2; return _this; } _createClass(PDFLinearGradient, [{ key: "shader", value: function shader(fn) { return this.doc.ref({ ShadingType: 2, ColorSpace: this._colorSpace, Coords: [this.x1, this.y1, this.x2, this.y2], Function: fn, Extend: [true, true] }); } }, { key: "opacityGradient", value: function opacityGradient() { return new PDFLinearGradient(this.doc, this.x1, this.y1, this.x2, this.y2); } }]); return PDFLinearGradient; }(PDFGradient); var PDFRadialGradient = /*#__PURE__*/function (_PDFGradient2) { _inherits(PDFRadialGradient, _PDFGradient2); var _super2 = _createSuper(PDFRadialGradient); function PDFRadialGradient(doc, x1, y1, r1, x2, y2, r2) { var _this2; _classCallCheck(this, PDFRadialGradient); _this2 = _super2.call(this, doc); _this2.doc = doc; _this2.x1 = x1; _this2.y1 = y1; _this2.r1 = r1; _this2.x2 = x2; _this2.y2 = y2; _this2.r2 = r2; return _this2; } _createClass(PDFRadialGradient, [{ key: "shader", value: function shader(fn) { return this.doc.ref({ ShadingType: 3, ColorSpace: this._colorSpace, Coords: [this.x1, this.y1, this.r1, this.x2, this.y2, this.r2], Function: fn, Extend: [true, true] }); } }, { key: "opacityGradient", value: function opacityGradient() { return new PDFRadialGradient(this.doc, this.x1, this.y1, this.r1, this.x2, this.y2, this.r2); } }]); return PDFRadialGradient; }(PDFGradient); var Gradient = { PDFGradient: PDFGradient, PDFLinearGradient: PDFLinearGradient, PDFRadialGradient: PDFRadialGradient }; /* PDF tiling pattern support. Uncolored only. */ var underlyingColorSpaces = ['DeviceCMYK', 'DeviceRGB']; var PDFTilingPattern = /*#__PURE__*/function () { function PDFTilingPattern(doc, bBox, xStep, yStep, stream) { _classCallCheck(this, PDFTilingPattern); this.doc = doc; this.bBox = bBox; this.xStep = xStep; this.yStep = yStep; this.stream = stream; } _createClass(PDFTilingPattern, [{ key: "createPattern", value: function createPattern() { // no resources needed for our current usage // required entry var resources = this.doc.ref(); resources.end(); // apply default transform matrix (flipped in the default doc._ctm) // see document.js & gradient.js var _this$doc$_ctm = _slicedToArray(this.doc._ctm, 6), m0 = _this$doc$_ctm[0], m1 = _this$doc$_ctm[1], m2 = _this$doc$_ctm[2], m3 = _this$doc$_ctm[3], m4 = _this$doc$_ctm[4], m5 = _this$doc$_ctm[5]; var m11 = 1, m12 = 0, m21 = 0, m22 = 1, dx = 0, dy = 0; var m = [m0 * m11 + m2 * m12, m1 * m11 + m3 * m12, m0 * m21 + m2 * m22, m1 * m21 + m3 * m22, m0 * dx + m2 * dy + m4, m1 * dx + m3 * dy + m5]; var pattern = this.doc.ref({ Type: 'Pattern', PatternType: 1, // tiling PaintType: 2, // 1-colored, 2-uncolored TilingType: 2, // 2-no distortion BBox: this.bBox, XStep: this.xStep, YStep: this.yStep, Matrix: m.map(function (v) { return +v.toFixed(5); }), Resources: resources }); pattern.end(this.stream); return pattern; } }, { key: "embedPatternColorSpaces", value: function embedPatternColorSpaces() { var _this = this; // map each pattern to an underlying color space // and embed on each page underlyingColorSpaces.forEach(function (csName) { var csId = _this.getPatternColorSpaceId(csName); if (_this.doc.page.colorSpaces[csId]) return; var cs = _this.doc.ref(['Pattern', csName]); cs.end(); _this.doc.page.colorSpaces[csId] = cs; }); } }, { key: "getPatternColorSpaceId", value: function getPatternColorSpaceId(underlyingColorspace) { return "CsP".concat(underlyingColorspace); } }, { key: "embed", value: function embed() { if (!this.id) { this.doc._patternCount = this.doc._patternCount + 1; this.id = 'P' + this.doc._patternCount; this.pattern = this.createPattern(); } // patterns are embedded in each page if (!this.doc.page.patterns[this.id]) { this.doc.page.patterns[this.id] = this.pattern; } } }, { key: "apply", value: function apply(stroke, patternColor) { // do any embedding/creating that might be needed this.embedPatternColorSpaces(); this.embed(); var normalizedColor = this.doc._normalizeColor(patternColor); if (!normalizedColor) throw Error("invalid pattern color. (value: ".concat(patternColor, ")")); // select one of the pattern color spaces var csId = this.getPatternColorSpaceId(this.doc._getColorSpace(normalizedColor)); this.doc._setColorSpace(csId, stroke); // stroke/fill using the pattern and color (in the above underlying color space) var op = stroke ? 'SCN' : 'scn'; return this.doc.addContent("".concat(normalizedColor.join(' '), " /").concat(this.id, " ").concat(op)); } }]); return PDFTilingPattern; }(); var pattern = { PDFTilingPattern: PDFTilingPattern }; var PDFGradient$1 = Gradient.PDFGradient, PDFLinearGradient$1 = Gradient.PDFLinearGradient, PDFRadialGradient$1 = Gradient.PDFRadialGradient; var PDFTilingPattern$1 = pattern.PDFTilingPattern; var ColorMixin = { initColor: function initColor() { // The opacity dictionaries this._opacityRegistry = {}; this._opacityCount = 0; this._patternCount = 0; return this._gradCount = 0; }, _normalizeColor: function _normalizeColor(color) { if (typeof color === 'string') { if (color.charAt(0) === '#') { if (color.length === 4) { color = color.replace(/#([0-9A-F])([0-9A-F])([0-9A-F])/i, '#$1$1$2$2$3$3'); } var hex = parseInt(color.slice(1), 16); color = [hex >> 16, hex >> 8 & 0xff, hex & 0xff]; } else if (namedColors[color]) { color = namedColors[color]; } } if (Array.isArray(color)) { // RGB if (color.length === 3) { color = color.map(function (part) { return part / 255; }); // CMYK } else if (color.length === 4) { color = color.map(function (part) { return part / 100; }); } return color; } return null; }, _setColor: function _setColor(color, stroke) { if (color instanceof PDFGradient$1) { color.apply(stroke); return true; // see if tiling pattern, decode & apply it it } else if (Array.isArray(color) && color[0] instanceof PDFTilingPattern$1) { color[0].apply(stroke, color[1]); return true; } // any other case should be a normal color and not a pattern return this._setColorCore(color, stroke); }, _setColorCore: function _setColorCore(color, stroke) { color = this._normalizeColor(color); if (!color) { return false; } var op = stroke ? 'SCN' : 'scn'; var space = this._getColorSpace(color); this._setColorSpace(space, stroke); color = color.join(' '); this.addContent("".concat(color, " ").concat(op)); return true; }, _setColorSpace: function _setColorSpace(space, stroke) { var op = stroke ? 'CS' : 'cs'; return this.addContent("/".concat(space, " ").concat(op)); }, _getColorSpace: function _getColorSpace(color) { return color.length === 4 ? 'DeviceCMYK' : 'DeviceRGB'; }, fillColor: function fillColor(color, opacity) { var set = this._setColor(color, false); if (set) { this.fillOpacity(opacity); } // save this for text wrapper, which needs to reset // the fill color on new pages this._fillColor = [color, opacity]; return this; }, strokeColor: function strokeColor(color, opacity) { var set = this._setColor(color, true); if (set) { this.strokeOpacity(opacity); } return this; }, opacity: function opacity(_opacity) { this._doOpacity(_opacity, _opacity); return this; }, fillOpacity: function fillOpacity(opacity) { this._doOpacity(opacity, null); return this; }, strokeOpacity: function strokeOpacity(opacity) { this._doOpacity(null, opacity); return this; }, _doOpacity: function _doOpacity(fillOpacity, strokeOpacity) { var dictionary, name; if (fillOpacity == null && strokeOpacity == null) { return; } if (fillOpacity != null) { fillOpacity = Math.max(0, Math.min(1, fillOpacity)); } if (strokeOpacity != null) { strokeOpacity = Math.max(0, Math.min(1, strokeOpacity)); } var key = "".concat(fillOpacity, "_").concat(strokeOpacity); if (this._opacityRegistry[key]) { var _this$_opacityRegistr = _slicedToArray(this._opacityRegistry[key], 2); dictionary = _this$_opacityRegistr[0]; name = _this$_opacityRegistr[1]; } else { dictionary = { Type: 'ExtGState' }; if (fillOpacity != null) { dictionary.ca = fillOpacity; } if (strokeOpacity != null) { dictionary.CA = strokeOpacity; } dictionary = this.ref(dictionary); dictionary.end(); var id = ++this._opacityCount; name = "Gs".concat(id); this._opacityRegistry[key] = [dictionary, name]; } this.page.ext_gstates[name] = dictionary; return this.addContent("/".concat(name, " gs")); }, linearGradient: function linearGradient(x1, y1, x2, y2) { return new PDFLinearGradient$1(this, x1, y1, x2, y2); }, radialGradient: function radialGradient(x1, y1, r1, x2, y2, r2) { return new PDFRadialGradient$1(this, x1, y1, r1, x2, y2, r2); }, pattern: function pattern(bbox, xStep, yStep, stream) { return new PDFTilingPattern$1(this, bbox, xStep, yStep, stream); } }; var namedColors = { aliceblue: [240, 248, 255], antiquewhite: [250, 235, 215], aqua: [0, 255, 255], aquamarine: [127, 255, 212], azure: [240, 255, 255], beige: [245, 245, 220], bisque: [255, 228, 196], black: [0, 0, 0], blanchedalmond: [255, 235, 205], blue: [0, 0, 255], blueviolet: [138, 43, 226], brown: [165, 42, 42], burlywood: [222, 184, 135], cadetblue: [95, 158, 160], chartreuse: [127, 255, 0], chocolate: [210, 105, 30], coral: [255, 127, 80], cornflowerblue: [100, 149, 237], cornsilk: [255, 248, 220], crimson: [220, 20, 60], cyan: [0, 255, 255], darkblue: [0, 0, 139], darkcyan: [0, 139, 139], darkgoldenrod: [184, 134, 11], darkgray: [169, 169, 169], darkgreen: [0, 100, 0], darkgrey: [169, 169, 169], darkkhaki: [189, 183, 107], darkmagenta: [139, 0, 139], darkolivegreen: [85, 107, 47], darkorange: [255, 140, 0], darkorchid: [153, 50, 204], darkred: [139, 0, 0], darksalmon: [233, 150, 122], darkseagreen: [143, 188, 143], darkslateblue: [72, 61, 139], darkslategray: [47, 79, 79], darkslategrey: [47, 79, 79], darkturquoise: [0, 206, 209], darkviolet: [148, 0, 211], deeppink: [255, 20, 147], deepskyblue: [0, 191, 255], dimgray: [105, 105, 105], dimgrey: [105, 105, 105], dodgerblue: [30, 144, 255], firebrick: [178, 34, 34], floralwhite: [255, 250, 240], forestgreen: [34, 139, 34], fuchsia: [255, 0, 255], gainsboro: [220, 220, 220], ghostwhite: [248, 248, 255], gold: [255, 215, 0], goldenrod: [218, 165, 32], gray: [128, 128, 128], grey: [128, 128, 128], green: [0, 128, 0], greenyellow: [173, 255, 47], honeydew: [240, 255, 240], hotpink: [255, 105, 180], indianred: [205, 92, 92], indigo: [75, 0, 130], ivory: [255, 255, 240], khaki: [240, 230, 140], lavender: [230, 230, 250], lavenderblush: [255, 240, 245], lawngreen: [124, 252, 0], lemonchiffon: [255, 250, 205], lightblue: [173, 216, 230], lightcoral: [240, 128, 128], lightcyan: [224, 255, 255], lightgoldenrodyellow: [250, 250, 210], lightgray: [211, 211, 211], lightgreen: [144, 238, 144], lightgrey: [211, 211, 211], lightpink: [255, 182, 193], lightsalmon: [255, 160, 122], lightseagreen: [32, 178, 170], lightskyblue: [135, 206, 250], lightslategray: [119, 136, 153], lightslategrey: [119, 136, 153], lightsteelblue: [176, 196, 222], lightyellow: [255, 255, 224], lime: [0, 255, 0], limegreen: [50, 205, 50], linen: [250, 240, 230], magenta: [255, 0, 255], maroon: [128, 0, 0], mediumaquamarine: [102, 205, 170], mediumblue: [0, 0, 205], mediumorchid: [186, 85, 211], mediumpurple: [147, 112, 219], mediumseagreen: [60, 179, 113], mediumslateblue: [123, 104, 238], mediumspringgreen: [0, 250, 154], mediumturquoise: [72, 209, 204], mediumvioletred: [199, 21, 133], midnightblue: [25, 25, 112], mintcream: [245, 255, 250], mistyrose: [255, 228, 225], moccasin: [255, 228, 181], navajowhite: [255, 222, 173], navy: [0, 0, 128], oldlace: [253, 245, 230], olive: [128, 128, 0], olivedrab: [107, 142, 35], orange: [255, 165, 0], orangered: [255, 69, 0], orchid: [218, 112, 214], palegoldenrod: [238, 232, 170], palegreen: [152, 251, 152], paleturquoise: [175, 238, 238], palevioletred: [219, 112, 147], papayawhip: [255, 239, 213], peachpuff: [255, 218, 185], peru: [205, 133, 63], pink: [255, 192, 203], plum: [221, 160, 221], powderblue: [176, 224, 230], purple: [128, 0, 128], red: [255, 0, 0], rosybrown: [188, 143, 143], royalblue: [65, 105, 225], saddlebrown: [139, 69, 19], salmon: [250, 128, 114], sandybrown: [244, 164, 96], seagreen: [46, 139, 87], seashell: [255, 245, 238], sienna: [160, 82, 45], silver: [192, 192, 192], skyblue: [135, 206, 235], slateblue: [106, 90, 205], slategray: [112, 128, 144], slategrey: [112, 128, 144], snow: [255, 250, 250], springgreen: [0, 255, 127], steelblue: [70, 130, 180], tan: [210, 180, 140], teal: [0, 128, 128], thistle: [216, 191, 216], tomato: [255, 99, 71], turquoise: [64, 224, 208], violet: [238, 130, 238], wheat: [245, 222, 179], white: [255, 255, 255], whitesmoke: [245, 245, 245], yellow: [255, 255, 0], yellowgreen: [154, 205, 50] }; var cx, cy, px, py, sx, sy; cx = cy = px = py = sx = sy = 0; var parameters = { A: 7, a: 7, C: 6, c: 6, H: 1, h: 1, L: 2, l: 2, M: 2, m: 2, Q: 4, q: 4, S: 4, s: 4, T: 2, t: 2, V: 1, v: 1, Z: 0, z: 0 }; var parse = function parse(path) { var cmd; var ret = []; var args = []; var curArg = ''; var foundDecimal = false; var params = 0; var _iterator = _createForOfIteratorHelper(path), _step; try { for (_iterator.s(); !(_step = _iterator.n()).done;) { var c = _step.value; if (parameters[c] != null) { params = parameters[c]; if (cmd) { // save existing command if (curArg.length > 0) { args[args.length] = +curArg; } ret[ret.length] = { cmd: cmd, args: args }; args = []; curArg = ''; foundDecimal = false; } cmd = c; } else if ([' ', ','].includes(c) || c === '-' && curArg.length > 0 && curArg[curArg.length - 1] !== 'e' || c === '.' && foundDecimal) { if (curArg.length === 0) { continue; } if (args.length === params) { // handle reused commands ret[ret.length] = { cmd: cmd, args: args }; args = [+curArg]; // handle assumed commands if (cmd === 'M') { cmd = 'L'; } if (cmd === 'm') { cmd = 'l'; } } else { args[args.length] = +curArg; } foundDecimal = c === '.'; // fix for negative numbers or repeated decimals with no delimeter between commands curArg = ['-', '.'].includes(c) ? c : ''; } else { curArg += c; if (c === '.') { foundDecimal = true; } } } // add the last command } catch (err) { _iterator.e(err); } finally { _iterator.f(); } if (curArg.length > 0) { if (args.length === params) { // handle reused commands ret[ret.length] = { cmd: cmd, args: args }; args = [+curArg]; // handle assumed commands if (cmd === 'M') { cmd = 'L'; } if (cmd === 'm') { cmd = 'l'; } } else { args[args.length] = +curArg; } } ret[ret.length] = { cmd: cmd, args: args }; return ret; }; var _apply = function apply(commands, doc) { // current point, control point, and subpath starting point cx = cy = px = py = sx = sy = 0; // run the commands for (var i = 0; i < commands.length; i++) { var c = commands[i]; if (typeof runners[c.cmd] === 'function') { runners[c.cmd](doc, c.args); } } }; var runners = { M: function M(doc, a) { cx = a[0]; cy = a[1]; px = py = null; sx = cx; sy = cy; return doc.moveTo(cx, cy); }, m: function m(doc, a) { cx += a[0]; cy += a[1]; px = py = null; sx = cx; sy = cy; return doc.moveTo(cx, cy); }, C: function C(doc, a) { cx = a[4]; cy = a[5]; px = a[2]; py = a[3]; return doc.bezierCurveTo.apply(doc, _toConsumableArray(a)); }, c: function c(doc, a) { doc.bezierCurveTo(a[0] + cx, a[1] + cy, a[2] + cx, a[3] + cy, a[4] + cx, a[5] + cy); px = cx + a[2]; py = cy + a[3]; cx += a[4]; return cy += a[5]; }, S: function S(doc, a) { if (px === null) { px = cx; py = cy; } doc.bezierCurveTo(cx - (px - cx), cy - (py - cy), a[0], a[1], a[2], a[3]); px = a[0]; py = a[1]; cx = a[2]; return cy = a[3]; }, s: function s(doc, a) { if (px === null) { px = cx; py = cy; } doc.bezierCurveTo(cx - (px - cx), cy - (py - cy), cx + a[0], cy + a[1], cx + a[2], cy + a[3]); px = cx + a[0]; py = cy + a[1]; cx += a[2]; return cy += a[3]; }, Q: function Q(doc, a) { px = a[0]; py = a[1]; cx = a[2]; cy = a[3]; return doc.quadraticCurveTo(a[0], a[1], cx, cy); }, q: function q(doc, a) { doc.quadraticCurveTo(a[0] + cx, a[1] + cy, a[2] + cx, a[3] + cy); px = cx + a[0]; py = cy + a[1]; cx += a[2]; return cy += a[3]; }, T: function T(doc, a) { if (px === null) { px = cx; py = cy; } else { px = cx - (px - cx); py = cy - (py - cy); } doc.quadraticCurveTo(px, py, a[0], a[1]); px = cx - (px - cx); py = cy - (py - cy); cx = a[0]; return cy = a[1]; }, t: function t(doc, a) { if (px === null) { px = cx; py = cy; } else { px = cx - (px - cx); py = cy - (py - cy); } doc.quadraticCurveTo(px, py, cx + a[0], cy + a[1]); cx += a[0]; return cy += a[1]; }, A: function A(doc, a) { solveArc(doc, cx, cy, a); cx = a[5]; return cy = a[6]; }, a: function a(doc, _a) { _a[5] += cx; _a[6] += cy; solveArc(doc, cx, cy, _a); cx = _a[5]; return cy = _a[6]; }, L: function L(doc, a) { cx = a[0]; cy = a[1]; px = py = null; return doc.lineTo(cx, cy); }, l: function l(doc, a) { cx += a[0]; cy += a[1]; px = py = null; return doc.lineTo(cx, cy); }, H: function H(doc, a) { cx = a[0]; px = py = null; return doc.lineTo(cx, cy); }, h: function h(doc, a) { cx += a[0]; px = py = null; return doc.lineTo(cx, cy); }, V: function V(doc, a) { cy = a[0]; px = py = null; return doc.lineTo(cx, cy); }, v: function v(doc, a) { cy += a[0]; px = py = null; return doc.lineTo(cx, cy); }, Z: function Z(doc) { doc.closePath(); cx = sx; return cy = sy; }, z: function z(doc) { doc.closePath(); cx = sx; return cy = sy; } }; var solveArc = function solveArc(doc, x, y, coords) { var _coords = _slicedToArray(coords, 7), rx = _coords[0], ry = _coords[1], rot = _coords[2], large = _coords[3], sweep = _coords[4], ex = _coords[5], ey = _coords[6]; var segs = arcToSegments(ex, ey, rx, ry, large, sweep, rot, x, y); var _iterator2 = _createForOfIteratorHelper(segs), _step2; try { for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { var seg = _step2.value; var bez = segmentToBezier.apply(void 0, _toConsumableArray(seg)); doc.bezierCurveTo.apply(doc, _toConsumableArray(bez)); } } catch (err) { _iterator2.e(err); } finally { _iterator2.f(); } }; // from Inkscape svgtopdf, thanks! var arcToSegments = function arcToSegments(x, y, rx, ry, large, sweep, rotateX, ox, oy) { var th = rotateX * (Math.PI / 180); var sin_th = Math.sin(th); var cos_th = Math.cos(th); rx = Math.abs(rx); ry = Math.abs(ry); px = cos_th * (ox - x) * 0.5 + sin_th * (oy - y) * 0.5; py = cos_th * (oy - y) * 0.5 - sin_th * (ox - x) * 0.5; var pl = px * px / (rx * rx) + py * py / (ry * ry); if (pl > 1) { pl = Math.sqrt(pl); rx *= pl; ry *= pl; } var a00 = cos_th / rx; var a01 = sin_th / rx; var a10 = -sin_th / ry; var a11 = cos_th / ry; var x0 = a00 * ox + a01 * oy; var y0 = a10 * ox + a11 * oy; var x1 = a00 * x + a01 * y; var y1 = a10 * x + a11 * y; var d = (x1 - x0) * (x1 - x0) + (y1 - y0) * (y1 - y0); var sfactor_sq = 1 / d - 0.25; if (sfactor_sq < 0) { sfactor_sq = 0; } var sfactor = Math.sqrt(sfactor_sq); if (sweep === large) { sfactor = -sfactor; } var xc = 0.5 * (x0 + x1) - sfactor * (y1 - y0); var yc = 0.5 * (y0 + y1) + sfactor * (x1 - x0); var th0 = Math.atan2(y0 - yc, x0 - xc); var th1 = Math.atan2(y1 - yc, x1 - xc); var th_arc = th1 - th0; if (th_arc < 0 && sweep === 1) { th_arc += 2 * Math.PI; } else if (th_arc > 0 && sweep === 0) { th_arc -= 2 * Math.PI; } var segments = Math.ceil(Math.abs(th_arc / (Math.PI * 0.5 + 0.001))); var result = []; for (var i = 0; i < segments; i++) { var th2 = th0 + i * th_arc / segments; var th3 = th0 + (i + 1) * th_arc / segments; result[i] = [xc, yc, th2, th3, rx, ry, sin_th, cos_th]; } return result; }; var segmentToBezier = function segmentToBezier(cx, cy, th0, th1, rx, ry, sin_th, cos_th) { var a00 = cos_th * rx; var a01 = -sin_th * ry; var a10 = sin_th * rx; var a11 = cos_th * ry; var th_half = 0.5 * (th1 - th0); var t = 8 / 3 * Math.sin(th_half * 0.5) * Math.sin(th_half * 0.5) / Math.sin(th_half); var x1 = cx + Math.cos(th0) - t * Math.sin(th0); var y1 = cy + Math.sin(th0) + t * Math.cos(th0); var x3 = cx + Math.cos(th1); var y3 = cy + Math.sin(th1); var x2 = x3 + t * Math.sin(th1); var y2 = y3 - t * Math.cos(th1); return [a00 * x1 + a01 * y1, a10 * x1 + a11 * y1, a00 * x2 + a01 * y2, a10 * x2 + a11 * y2, a00 * x3 + a01 * y3, a10 * x3 + a11 * y3]; }; var SVGPath = /*#__PURE__*/function () { function SVGPath() { _classCallCheck(this, SVGPath); } _createClass(SVGPath, null, [{ key: "apply", value: function apply(doc, path) { var commands = parse(path); _apply(commands, doc); } }]); return SVGPath; }(); var number$1 = PDFObject.number; // This constant is used to approximate a symmetrical arc using a cubic // Bezier curve. var KAPPA = 4.0 * ((Math.sqrt(2) - 1.0) / 3.0); var VectorMixin = { initVector: function initVector() { this._ctm = [1, 0, 0, 1, 0, 0]; // current transformation matrix return this._ctmStack = []; }, save: function save() { this._ctmStack.push(this._ctm.slice()); // TODO: save/restore colorspace and styles so not setting it unnessesarily all the time? return this.addContent('q'); }, restore: function restore() { this._ctm = this._ctmStack.pop() || [1, 0, 0, 1, 0, 0]; return this.addContent('Q'); }, closePath: function closePath() { return this.addContent('h'); }, lineWidth: function lineWidth(w) { return this.addContent("".concat(number$1(w), " w")); }, _CAP_STYLES: { BUTT: 0, ROUND: 1, SQUARE: 2 }, lineCap: function lineCap(c) { if (typeof c === 'string') { c = this._CAP_STYLES[c.toUpperCase()]; } return this.addContent("".concat(c, " J")); }, _JOIN_STYLES: { MITER: 0, ROUND: 1, BEVEL: 2 }, lineJoin: function lineJoin(j) { if (typeof j === 'string') { j = this._JOIN_STYLES[j.toUpperCase()]; } return this.addContent("".concat(j, " j")); }, miterLimit: function miterLimit(m) { return this.addContent("".concat(number$1(m), " M")); }, dash: function dash(length) { var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; var originalLength = length; if (!Array.isArray(length)) { length = [length, options.space || length]; } var valid = length.every(function (x) { return Number.isFinite(x) && x > 0; }); if (!valid) { throw new Error("dash(".concat(JSON.stringify(originalLength), ", ").concat(JSON.stringify(options), ") invalid, lengths must be numeric and greater than zero")); } length = length.map(number$1).join(' '); return this.addContent("[".concat(length, "] ").concat(number$1(options.phase || 0), " d")); }, undash: function undash() { return this.addContent('[] 0 d'); }, moveTo: function moveTo(x, y) { return this.addContent("".concat(number$1(x), " ").concat(number$1(y), " m")); }, lineTo: function lineTo(x, y) { return this.addContent("".concat(number$1(x), " ").concat(number$1(y), " l")); }, bezierCurveTo: function bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y) { return this.addContent("".concat(number$1(cp1x), " ").concat(number$1(cp1y), " ").concat(number$1(cp2x), " ").concat(number$1(cp2y), " ").concat(number$1(x), " ").concat(number$1(y), " c")); }, quadraticCurveTo: function quadraticCurveTo(cpx, cpy, x, y) { return this.addContent("".concat(number$1(cpx), " ").concat(number$1(cpy), " ").concat(number$1(x), " ").concat(number$1(y), " v")); }, rect: function rect(x, y, w, h) { return this.addContent("".concat(number$1(x), " ").concat(number$1(y), " ").concat(number$1(w), " ").concat(number$1(h), " re")); }, roundedRect: function roundedRect(x, y, w, h, r) { if (r == null) { r = 0; } r = Math.min(r, 0.5 * w, 0.5 * h); // amount to inset control points from corners (see `ellipse`) var c = r * (1.0 - KAPPA); this.moveTo(x + r, y); this.lineTo(x + w - r, y); this.bezierCurveTo(x + w - c, y, x + w, y + c, x + w, y + r); this.lineTo(x + w, y + h - r); this.bezierCurveTo(x + w, y + h - c, x + w - c, y + h, x + w - r, y + h); this.lineTo(x + r, y + h); this.bezierCurveTo(x + c, y + h, x, y + h - c, x, y + h - r); this.lineTo(x, y + r); this.bezierCurveTo(x, y + c, x + c, y, x + r, y); return this.closePath(); }, ellipse: function ellipse(x, y, r1, r2) { // based on http://stackoverflow.com/questions/2172798/how-to-draw-an-oval-in-html5-canvas/2173084#2173084 if (r2 == null) { r2 = r1; } x -= r1; y -= r2; var ox = r1 * KAPPA; var oy = r2 * KAPPA; var xe = x + r1 * 2; var ye = y + r2 * 2; var xm = x + r1; var ym = y + r2; this.moveTo(x, ym); this.bezierCurveTo(x, ym - oy, xm - ox, y, xm, y); this.bezierCurveTo(xm + ox, y, xe, ym - oy, xe, ym); this.bezierCurveTo(xe, ym + oy, xm + ox, ye, xm, ye); this.bezierCurveTo(xm - ox, ye, x, ym + oy, x, ym); return this.closePath(); }, circle: function circle(x, y, radius) { return this.ellipse(x, y, radius); }, arc: function arc(x, y, radius, startAngle, endAngle, anticlockwise) { if (anticlockwise == null) { anticlockwise = false; } var TWO_PI = 2.0 * Math.PI; var HALF_PI = 0.5 * Math.PI; var deltaAng = endAngle - startAngle; if (Math.abs(deltaAng) > TWO_PI) { // draw only full circle if more than that is specified deltaAng = TWO_PI; } else if (deltaAng !== 0 && anticlockwise !== deltaAng < 0) { // necessary to flip direction of rendering var dir = anticlockwise ? -1 : 1; deltaAng = dir * TWO_PI + deltaAng; } var numSegs = Math.ceil(Math.abs(deltaAng) / HALF_PI); var segAng = deltaAng / numSegs; var handleLen = segAng / HALF_PI * KAPPA * radius; var curAng = startAngle; // component distances between anchor point and control point var deltaCx = -Math.sin(curAng) * handleLen; var deltaCy = Math.cos(curAng) * handleLen; // anchor point var ax = x + Math.cos(curAng) * radius; var ay = y + Math.sin(curAng) * radius; // calculate and render segments this.moveTo(ax, ay); for (var segIdx = 0; segIdx < numSegs; segIdx++) { // starting control point var cp1x = ax + deltaCx; var cp1y = ay + deltaCy; // step angle curAng += segAng; // next anchor point ax = x + Math.cos(curAng) * radius; ay = y + Math.sin(curAng) * radius; // next control point delta deltaCx = -Math.sin(curAng) * handleLen; deltaCy = Math.cos(curAng) * handleLen; // ending control point var cp2x = ax - deltaCx; var cp2y = ay - deltaCy; // render segment this.bezierCurveTo(cp1x, cp1y, cp2x, cp2y, ax, ay); } return this; }, polygon: function polygon() { for (var _len = arguments.length, points = new Array(_len), _key = 0; _key < _len; _key++) { points[_key] = arguments[_key]; } this.moveTo.apply(this, _toConsumableArray(points.shift() || [])); for (var _i = 0, _points = points; _i < _points.length; _i++) { var point = _points[_i]; this.lineTo.apply(this, _toConsumableArray(point || [])); } return this.closePath(); }, path: function path(_path) { SVGPath.apply(this, _path); return this; }, _windingRule: function _windingRule(rule) { if (/even-?odd/.test(rule)) { return '*'; } return ''; }, fill: function fill(color, rule) { if (/(even-?odd)|(non-?zero)/.test(color)) { rule = color; color = null; } if (color) { this.fillColor(color); } return this.addContent("f".concat(this._windingRule(rule))); }, stroke: function stroke(color) { if (color) { this.strokeColor(color); } return this.addContent('S'); }, fillAndStroke: function fillAndStroke(fillColor, strokeColor, rule) { if (strokeColor == null) { strokeColor = fillColor; } var isFillRule = /(even-?odd)|(non-?zero)/; if (isFillRule.test(fillColor)) { rule = fillColor; fillColor = null; } if (isFillRule.test(strokeColor)) { rule = strokeColor; strokeColor = fillColor; } if (fillColor) { this.fillColor(fillColor); this.strokeColor(strokeColor); } return this.addContent("B".concat(this._windingRule(rule))); }, clip: function clip(rule) { return this.addContent("W".concat(this._windingRule(rule), " n")); }, transform: function transform(m11, m12, m21, m22, dx, dy) { // keep track of the current transformation matrix var m = this._ctm; var _m = _slicedToArray(m, 6), m0 = _m[0], m1 = _m[1], m2 = _m[2], m3 = _m[3], m4 = _m[4], m5 = _m[5]; m[0] = m0 * m11 + m2 * m12; m[1] = m1 * m11 + m3 * m12; m[2] = m0 * m21 + m2 * m22; m[3] = m1 * m21 + m3 * m22; m[4] = m0 * dx + m2 * dy + m4; m[5] = m1 * dx + m3 * dy + m5; var values = [m11, m12, m21, m22, dx, dy].map(function (v) { return number$1(v); }).join(' '); return this.addContent("".concat(values, " cm")); }, translate: function translate(x, y) { return this.transform(1, 0, 0, 1, x, y); }, rotate: function rotate(angle) { var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; var y; var rad = angle * Math.PI / 180; var cos = Math.cos(rad); var sin = Math.sin(rad); var x = y = 0; if (options.origin != null) { var _options$origin = _slicedToArray(options.origin, 2); x = _options$origin[0]; y = _options$origin[1]; var x1 = x * cos - y * sin; var y1 = x * sin + y * cos; x -= x1; y -= y1; } return this.transform(cos, sin, -sin, cos, x, y); }, scale: function scale(xFactor, yFactor) { var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; var y; if (yFactor == null) { yFactor = xFactor; } if (typeof yFactor === 'object') { options = yFactor; yFactor = xFactor; } var x = y = 0; if (options.origin != null) { var _options$origin2 = _slicedToArray(options.origin, 2); x = _options$origin2[0]; y = _options$origin2[1]; x -= xFactor * x; y -= yFactor * y; } return this.transform(xFactor, 0, 0, yFactor, x, y); } }; var WIN_ANSI_MAP = { 402: 131, 8211: 150, 8212: 151, 8216: 145, 8217: 146, 8218: 130, 8220: 147, 8221: 148, 8222: 132, 8224: 134, 8225: 135, 8226: 149, 8230: 133, 8364: 128, 8240: 137, 8249: 139, 8250: 155, 710: 136, 8482: 153, 338: 140, 339: 156, 732: 152, 352: 138, 353: 154, 376: 159, 381: 142, 382: 158 }; var characters = ".notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n.notdef .notdef .notdef .notdef\n \nspace exclam quotedbl numbersign\ndollar percent ampersand quotesingle\nparenleft parenright asterisk plus\ncomma hyphen period slash\nzero one two three\nfour five six seven\neight nine colon semicolon\nless equal greater question\n \nat A B C\nD E F G\nH I J K\nL M N O\nP Q R S\nT U V W\nX Y Z bracketleft\nbackslash bracketright asciicircum underscore\n \ngrave a b c\nd e f g\nh i j k\nl m n o\np q r s\nt u v w\nx y z braceleft\nbar braceright asciitilde .notdef\n \nEuro .notdef quotesinglbase florin\nquotedblbase ellipsis dagger daggerdbl\ncircumflex perthousand Scaron guilsinglleft\nOE .notdef Zcaron .notdef\n.notdef quoteleft quoteright quotedblleft\nquotedblright bullet endash emdash\ntilde trademark scaron guilsinglright\noe .notdef zcaron ydieresis\n \nspace exclamdown cent sterling\ncurrency yen brokenbar section\ndieresis copyright ordfeminine guillemotleft\nlogicalnot hyphen registered macron\ndegree plusminus twosuperior threesuperior\nacute mu paragraph periodcentered\ncedilla onesuperior ordmasculine guillemotright\nonequarter onehalf threequarters questiondown\n \nAgrave Aacute Acircumflex Atilde\nAdieresis Aring AE Ccedilla\nEgrave Eacute Ecircumflex Edieresis\nIgrave Iacute Icircumflex Idieresis\nEth Ntilde Ograve Oacute\nOcircumflex Otilde Odieresis multiply\nOslash Ugrave Uacute Ucircumflex\nUdieresis Yacute Thorn germandbls\n \nagrave aacute acircumflex atilde\nadieresis aring ae ccedilla\negrave eacute ecircumflex edieresis\nigrave iacute icircumflex idieresis\neth ntilde ograve oacute\nocircumflex otilde odieresis divide\noslash ugrave uacute ucircumflex\nudieresis yacute thorn ydieresis".split(/\s+/); var AFMFont = /*#__PURE__*/function () { _createClass(AFMFont, null, [{ key: "open", value: function open(filename) { return new AFMFont(fs.readFileSync(filename, 'utf8')); } }]); function AFMFont(contents) { _classCallCheck(this, AFMFont); this.contents = contents; this.attributes = {}; this.glyphWidths = {}; this.boundingBoxes = {}; this.kernPairs = {}; this.parse(); // todo: remove charWidths since appears to not be used this.charWidths = new Array(256); for (var char = 0; char <= 255; char++) { this.charWidths[char] = this.glyphWidths[characters[char]]; } this.bbox = this.attributes['FontBBox'].split(/\s+/).map(function (e) { return +e; }); this.ascender = +(this.attributes['Ascender'] || 0); this.descender = +(this.attributes['Descender'] || 0); this.xHeight = +(this.attributes['XHeight'] || 0); this.capHeight = +(this.attributes['CapHeight'] || 0); this.lineGap = this.bbox[3] - this.bbox[1] - (this.ascender - this.descender); } _createClass(AFMFont, [{ key: "parse", value: function parse() { var section = ''; var _iterator = _createForOfIteratorHelper(this.contents.split('\n')), _step; try { for (_iterator.s(); !(_step = _iterator.n()).done;) { var line = _step.value; var match; var a; if (match = line.match(/^Start(\w+)/)) { section = match[1]; continue; } else if (match = line.match(/^End(\w+)/)) { section = ''; continue; } switch (section) { case 'FontMetrics': match = line.match(/(^\w+)\s+(.*)/); var key = match[1]; var value = match[2]; if (a = this.attributes[key]) { if (!Array.isArray(a)) { a = this.attributes[key] = [a]; } a.push(value); } else { this.attributes[key] = value; } break; case 'CharMetrics': if (!/^CH?\s/.test(line)) { continue; } var name = line.match(/\bN\s+(\.?\w+)\s*;/)[1]; this.glyphWidths[name] = +line.match(/\bWX\s+(\d+)\s*;/)[1]; break; case 'KernPairs': match = line.match(/^KPX\s+(\.?\w+)\s+(\.?\w+)\s+(-?\d+)/); if (match) { this.kernPairs[match[1] + '\0' + match[2]] = parseInt(match[3]); } break; } } } catch (err) { _iterator.e(err); } finally { _iterator.f(); } } }, { key: "encodeText", value: function encodeText(text) { var res = []; for (var i = 0, len = text.length; i < len; i++) { var char = text.charCodeAt(i); char = WIN_ANSI_MAP[char] || char; res.push(char.toString(16)); } return res; } }, { key: "glyphsForString", value: function glyphsForString(string) { var glyphs = []; for (var i = 0, len = string.length; i < len; i++) { var charCode = string.charCodeAt(i); glyphs.push(this.characterToGlyph(charCode)); } return glyphs; } }, { key: "characterToGlyph", value: function characterToGlyph(character) { return characters[WIN_ANSI_MAP[character] || character] || '.notdef'; } }, { key: "widthOfGlyph", value: function widthOfGlyph(glyph) { return this.glyphWidths[glyph] || 0; } }, { key: "getKernPair", value: function getKernPair(left, right) { return this.kernPairs[left + '\0' + right] || 0; } }, { key: "advancesForGlyphs", value: function advancesForGlyphs(glyphs) { var advances = []; for (var index = 0; index < glyphs.length; index++) { var left = glyphs[index]; var right = glyphs[index + 1]; advances.push(this.widthOfGlyph(left) + this.getKernPair(left, right)); } return advances; } }]); return AFMFont; }(); var PDFFont = /*#__PURE__*/function () { function PDFFont() { _classCallCheck(this, PDFFont); } _createClass(PDFFont, [{ key: "encode", value: function encode() { throw new Error('Must be implemented by subclasses'); } }, { key: "widthOfString", value: function widthOfString() { throw new Error('Must be implemented by subclasses'); } }, { key: "ref", value: function ref() { return this.dictionary != null ? this.dictionary : this.dictionary = this.document.ref(); } }, { key: "finalize", value: function finalize() { if (this.embedded || this.dictionary == null) { return; } this.embed(); return this.embedded = true; } }, { key: "embed", value: function embed() { throw new Error('Must be implemented by subclasses'); } }, { key: "lineHeight", value: function lineHeight(size, includeGap) { if (includeGap == null) { includeGap = false; } var gap = includeGap ? this.lineGap : 0; return (this.ascender + gap - this.descender) / 1000 * size; } }]); return PDFFont; }(); var STANDARD_FONTS = { Courier: function Courier() { return fs.readFileSync(__dirname + '/data/Courier.afm', 'utf8'); }, 'Courier-Bold': function CourierBold() { return fs.readFileSync(__dirname + '/data/Courier-Bold.afm', 'utf8'); }, 'Courier-Oblique': function CourierOblique() { return fs.readFileSync(__dirname + '/data/Courier-Oblique.afm', 'utf8'); }, 'Courier-BoldOblique': function CourierBoldOblique() { return fs.readFileSync(__dirname + '/data/Courier-BoldOblique.afm', 'utf8'); }, Helvetica: function Helvetica() { return fs.readFileSync(__dirname + '/data/Helvetica.afm', 'utf8'); }, 'Helvetica-Bold': function HelveticaBold() { return fs.readFileSync(__dirname + '/data/Helvetica-Bold.afm', 'utf8'); }, 'Helvetica-Oblique': function HelveticaOblique() { return fs.readFileSync(__dirname + '/data/Helvetica-Oblique.afm', 'utf8'); }, 'Helvetica-BoldOblique': function HelveticaBoldOblique() { return fs.readFileSync(__dirname + '/data/Helvetica-BoldOblique.afm', 'utf8'); }, 'Times-Roman': function TimesRoman() { return fs.readFileSync(__dirname + '/data/Times-Roman.afm', 'utf8'); }, 'Times-Bold': function TimesBold() { return fs.readFileSync(__dirname + '/data/Times-Bold.afm', 'utf8'); }, 'Times-Italic': function TimesItalic() { return fs.readFileSync(__dirname + '/data/Times-Italic.afm', 'utf8'); }, 'Times-BoldItalic': function TimesBoldItalic() { return fs.readFileSync(__dirname + '/data/Times-BoldItalic.afm', 'utf8'); }, Symbol: function Symbol() { return fs.readFileSync(__dirname + '/data/Symbol.afm', 'utf8'); }, ZapfDingbats: function ZapfDingbats() { return fs.readFileSync(__dirname + '/data/ZapfDingbats.afm', 'utf8'); } }; var StandardFont = /*#__PURE__*/function (_PDFFont) { _inherits(StandardFont, _PDFFont); var _super = _createSuper(StandardFont); function StandardFont(document, name, id) { var _this; _classCallCheck(this, StandardFont); _this = _super.call(this); _this.document = document; _this.name = name; _this.id = id; _this.font = new AFMFont(STANDARD_FONTS[_this.name]()); var _this$font = _this.font; _this.ascender = _this$font.ascender; _this.descender = _this$font.descender; _this.bbox = _this$font.bbox; _this.lineGap = _this$font.lineGap; _this.xHeight = _this$font.xHeight; _this.capHeight = _this$font.capHeight; return _this; } _createClass(StandardFont, [{ key: "embed", value: function embed() { this.dictionary.data = { Type: 'Font', BaseFont: this.name, Subtype: 'Type1', Encoding: 'WinAnsiEncoding' }; return this.dictionary.end(); } }, { key: "encode", value: function encode(text) { var encoded = this.font.encodeText(text); var glyphs = this.font.glyphsForString("".concat(text)); var advances = this.font.advancesForGlyphs(glyphs); var positions = []; for (var i = 0; i < glyphs.length; i++) { var glyph = glyphs[i]; positions.push({ xAdvance: advances[i], yAdvance: 0, xOffset: 0, yOffset: 0, advanceWidth: this.font.widthOfGlyph(glyph) }); } return [encoded, positions]; } }, { key: "widthOfString", value: function widthOfString(string, size) { var glyphs = this.font.glyphsForString("".concat(string)); var advances = this.font.advancesForGlyphs(glyphs); var width = 0; var _iterator = _createForOfIteratorHelper(advances), _step; try { for (_iterator.s(); !(_step = _iterator.n()).done;) { var advance = _step.value; width += advance; } } catch (err) { _iterator.e(err); } finally { _iterator.f(); } var scale = size / 1000; return width * scale; } }], [{ key: "isStandardFont", value: function isStandardFont(name) { return name in STANDARD_FONTS; } }]); return StandardFont; }(PDFFont); var toHex = function toHex(num) { return "0000".concat(num.toString(16)).slice(-4); }; var EmbeddedFont = /*#__PURE__*/function (_PDFFont) { _inherits(EmbeddedFont, _PDFFont); var _super = _createSuper(EmbeddedFont); function EmbeddedFont(document, font, id) { var _this; _classCallCheck(this, EmbeddedFont); _this = _super.call(this); _this.document = document; _this.font = font; _this.id = id; _this.subset = _this.font.createSubset(); _this.unicode = [[0]]; _this.widths = [_this.font.getGlyph(0).advanceWidth]; _this.name = _this.font.postscriptName; _this.scale = 1000 / _this.font.unitsPerEm; _this.ascender = _this.font.ascent * _this.scale; _this.descender = _this.font.descent * _this.scale; _this.xHeight = _this.font.xHeight * _this.scale; _this.capHeight = _this.font.capHeight * _this.scale; _this.lineGap = _this.font.lineGap * _this.scale; _this.bbox = _this.font.bbox; if (document.options.fontLayoutCache !== false) { _this.layoutCache = Object.create(null); } return _this; } _createClass(EmbeddedFont, [{ key: "layoutRun", value: function layoutRun(text, features) { var run = this.font.layout(text, features); // Normalize position values for (var i = 0; i < run.positions.length; i++) { var position = run.positions[i]; for (var key in position) { position[key] *= this.scale; } position.advanceWidth = run.glyphs[i].advanceWidth * this.scale; } return run; } }, { key: "layoutCached", value: function layoutCached(text) { if (!this.layoutCache) { return this.layoutRun(text); } var cached; if (cached = this.layoutCache[text]) { return cached; } var run = this.layoutRun(text); this.layoutCache[text] = run; return run; } }, { key: "layout", value: function layout(text, features, onlyWidth) { // Skip the cache if any user defined features are applied if (features) { return this.layoutRun(text, features); } var glyphs = onlyWidth ? null : []; var positions = onlyWidth ? null : []; var advanceWidth = 0; // Split the string by words to increase cache efficiency. // For this purpose, spaces and tabs are a good enough delimeter. var last = 0; var index = 0; while (index <= text.length) { var needle; if (index === text.length && last < index || (needle = text.charAt(index), [' ', '\t'].includes(needle))) { var run = this.layoutCached(text.slice(last, ++index)); if (!onlyWidth) { glyphs = glyphs.concat(run.glyphs); positions = positions.concat(run.positions); } advanceWidth += run.advanceWidth; last = index; } else { index++; } } return { glyphs: glyphs, positions: positions, advanceWidth: advanceWidth }; } }, { key: "encode", value: function encode(text, features) { var _this$layout = this.layout(text, features), glyphs = _this$layout.glyphs, positions = _this$layout.positions; var res = []; for (var i = 0; i < glyphs.length; i++) { var glyph = glyphs[i]; var gid = this.subset.includeGlyph(glyph.id); res.push("0000".concat(gid.toString(16)).slice(-4)); if (this.widths[gid] == null) { this.widths[gid] = glyph.advanceWidth * this.scale; } if (this.unicode[gid] == null) { this.unicode[gid] = glyph.codePoints; } } return [res, positions]; } }, { key: "widthOfString", value: function widthOfString(string, size, features) { var width = this.layout(string, features, true).advanceWidth; var scale = size / 1000; return width * scale; } }, { key: "embed", value: function embed() { var _this2 = this; var isCFF = this.subset.cff != null; var fontFile = this.document.ref(); if (isCFF) { fontFile.data.Subtype = 'CIDFontType0C'; } this.subset.encodeStream().on('data', function (data) { return fontFile.write(data); }).on('end', function () { return fontFile.end(); }); var familyClass = ((this.font['OS/2'] != null ? this.font['OS/2'].sFamilyClass : undefined) || 0) >> 8; var flags = 0; if (this.font.post.isFixedPitch) { flags |= 1 << 0; } if (1 <= familyClass && familyClass <= 7) { flags |= 1 << 1; } flags |= 1 << 2; // assume the font uses non-latin characters if (familyClass === 10) { flags |= 1 << 3; } if (this.font.head.macStyle.italic) { flags |= 1 << 6; } // generate a tag (6 uppercase letters. 17 is the char code offset from '0' to 'A'. 73 will map to 'Z') var tag = [1, 2, 3, 4, 5, 6].map(function (i) { return String.fromCharCode((_this2.id.charCodeAt(i) || 73) + 17); }).join(''); var name = tag + '+' + this.font.postscriptName; var bbox = this.font.bbox; var descriptor = this.document.ref({ Type: 'FontDescriptor', FontName: name, Flags: flags, FontBBox: [bbox.minX * this.scale, bbox.minY * this.scale, bbox.maxX * this.scale, bbox.maxY * this.scale], ItalicAngle: this.font.italicAngle, Ascent: this.ascender, Descent: this.descender, CapHeight: (this.font.capHeight || this.font.ascent) * this.scale, XHeight: (this.font.xHeight || 0) * this.scale, StemV: 0 }); // not sure how to calculate this if (isCFF) { descriptor.data.FontFile3 = fontFile; } else { descriptor.data.FontFile2 = fontFile; } descriptor.end(); var descendantFontData = { Type: 'Font', Subtype: 'CIDFontType0', BaseFont: name, CIDSystemInfo: { Registry: new String('Adobe'), Ordering: new String('Identity'), Supplement: 0 }, FontDescriptor: descriptor, W: [0, this.widths] }; if (!isCFF) { descendantFontData.Subtype = 'CIDFontType2'; descendantFontData.CIDToGIDMap = 'Identity'; } var descendantFont = this.document.ref(descendantFontData); descendantFont.end(); this.dictionary.data = { Type: 'Font', Subtype: 'Type0', BaseFont: name, Encoding: 'Identity-H', DescendantFonts: [descendantFont], ToUnicode: this.toUnicodeCmap() }; return this.dictionary.end(); } // Maps the glyph ids encoded in the PDF back to unicode strings // Because of ligature substitutions and the like, there may be one or more // unicode characters represented by each glyph. }, { key: "toUnicodeCmap", value: function toUnicodeCmap() { var cmap = this.document.ref(); var entries = []; var _iterator = _createForOfIteratorHelper(this.unicode), _step; try { for (_iterator.s(); !(_step = _iterator.n()).done;) { var codePoints = _step.value; var encoded = []; // encode codePoints to utf16 var _iterator2 = _createForOfIteratorHelper(codePoints), _step2; try { for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { var value = _step2.value; if (value > 0xffff) { value -= 0x10000; encoded.push(toHex(value >>> 10 & 0x3ff | 0xd800)); value = 0xdc00 | value & 0x3ff; } encoded.push(toHex(value)); } } catch (err) { _iterator2.e(err); } finally { _iterator2.f(); } entries.push("<".concat(encoded.join(' '), ">")); } } catch (err) { _iterator.e(err); } finally { _iterator.f(); } cmap.end("/CIDInit /ProcSet findresource begin\n12 dict begin\nbegincmap\n/CIDSystemInfo <<\n /Registry (Adobe)\n /Ordering (UCS)\n /Supplement 0\n>> def\n/CMapName /Adobe-Identity-UCS def\n/CMapType 2 def\n1 begincodespacerange\n<0000>\nendcodespacerange\n1 beginbfrange\n<0000> <".concat(toHex(entries.length - 1), "> [").concat(entries.join(' '), "]\nendbfrange\nendcmap\nCMapName currentdict /CMap defineresource pop\nend\nend")); return cmap; } }]); return EmbeddedFont; }(PDFFont); var PDFFontFactory = /*#__PURE__*/function () { function PDFFontFactory() { _classCallCheck(this, PDFFontFactory); } _createClass(PDFFontFactory, null, [{ key: "open", value: function open(document, src, family, id) { var font; if (typeof src === 'string') { if (StandardFont.isStandardFont(src)) { return new StandardFont(document, src, id); } src = fs.readFileSync(src); } if (Buffer.isBuffer(src)) { font = _fontkit.default.create(src, family); } else if (src instanceof Uint8Array) { font = _fontkit.default.create(Buffer.from(src), family); } else if (src instanceof ArrayBuffer) { font = _fontkit.default.create(Buffer.from(new Uint8Array(src)), family); } if (font == null) { throw new Error('Not a supported font format or standard PDF font.'); } return new EmbeddedFont(document, font, id); } }]); return PDFFontFactory; }(); var FontsMixin = { initFonts: function initFonts() { var defaultFont = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'Helvetica'; // Lookup table for embedded fonts this._fontFamilies = {}; this._fontCount = 0; // Font state this._fontSize = 12; this._font = null; this._registeredFonts = {}; // Set the default font if (defaultFont) { this.font(defaultFont); } }, font: function font(src, family, size) { var cacheKey, font; if (typeof family === 'number') { size = family; family = null; } // check registered fonts if src is a string if (typeof src === 'string' && this._registeredFonts[src]) { cacheKey = src; var _this$_registeredFont = this._registeredFonts[src]; src = _this$_registeredFont.src; family = _this$_registeredFont.family; } else { cacheKey = family || src; if (typeof cacheKey !== 'string') { cacheKey = null; } } if (size != null) { this.fontSize(size); } // fast path: check if the font is already in the PDF if (font = this._fontFamilies[cacheKey]) { this._font = font; return this; } // load the font var id = "F".concat(++this._fontCount); this._font = PDFFontFactory.open(this, src, family, id); // check for existing font familes with the same name already in the PDF // useful if the font was passed as a buffer if (font = this._fontFamilies[this._font.name]) { this._font = font; return this; } // save the font for reuse later if (cacheKey) { this._fontFamilies[cacheKey] = this._font; } if (this._font.name) { this._fontFamilies[this._font.name] = this._font; } return this; }, fontSize: function fontSize(_fontSize) { this._fontSize = _fontSize; return this; }, currentLineHeight: function currentLineHeight(includeGap) { if (includeGap == null) { includeGap = false; } return this._font.lineHeight(this._fontSize, includeGap); }, registerFont: function registerFont(name, src, family) { this._registeredFonts[name] = { src: src, family: family }; return this; } }; var LineWrapper = /*#__PURE__*/function (_EventEmitter) { _inherits(LineWrapper, _EventEmitter); var _super = _createSuper(LineWrapper); function LineWrapper(document, options) { var _this; _classCallCheck(this, LineWrapper); _this = _super.call(this); _this.document = document; _this.indent = options.indent || 0; _this.characterSpacing = options.characterSpacing || 0; _this.wordSpacing = options.wordSpacing === 0; _this.columns = options.columns || 1; _this.columnGap = options.columnGap != null ? options.columnGap : 18; // 1/4 inch _this.lineWidth = (options.width - _this.columnGap * (_this.columns - 1)) / _this.columns; _this.spaceLeft = _this.lineWidth; _this.startX = _this.document.x; _this.startY = _this.document.y; _this.column = 1; _this.ellipsis = options.ellipsis; _this.continuedX = 0; _this.features = options.features; // calculate the maximum Y position the text can appear at if (options.height != null) { _this.height = options.height; _this.maxY = _this.startY + options.height; } else { _this.maxY = _this.document.page.maxY(); } // handle paragraph indents _this.on('firstLine', function (options) { // if this is the first line of the text segment, and // we're continuing where we left off, indent that much // otherwise use the user specified indent option var indent = _this.continuedX || _this.indent; _this.document.x += indent; _this.lineWidth -= indent; return _this.once('line', function () { _this.document.x -= indent; _this.lineWidth += indent; if (options.continued && !_this.continuedX) { _this.continuedX = _this.indent; } if (!options.continued) { return _this.continuedX = 0; } }); }); // handle left aligning last lines of paragraphs _this.on('lastLine', function (options) { var align = options.align; if (align === 'justify') { options.align = 'left'; } _this.lastLine = true; return _this.once('line', function () { _this.document.y += options.paragraphGap || 0; options.align = align; return _this.lastLine = false; }); }); return _this; } _createClass(LineWrapper, [{ key: "wordWidth", value: function wordWidth(word) { return this.document.widthOfString(word, this) + this.characterSpacing + this.wordSpacing; } }, { key: "eachWord", value: function eachWord(text, fn) { // setup a unicode line breaker var bk; var breaker = new _linebreak.default(text); var last = null; var wordWidths = Object.create(null); while (bk = breaker.nextBreak()) { var shouldContinue; var word = text.slice((last != null ? last.position : undefined) || 0, bk.position); var w = wordWidths[word] != null ? wordWidths[word] : wordWidths[word] = this.wordWidth(word); // if the word is longer than the whole line, chop it up // TODO: break by grapheme clusters, not JS string characters if (w > this.lineWidth + this.continuedX) { // make some fake break objects var lbk = last; var fbk = {}; while (word.length) { // fit as much of the word as possible into the space we have var l, mightGrow; if (w > this.spaceLeft) { // start our check at the end of our available space - this method is faster than a loop of each character and it resolves // an issue with long loops when processing massive words, such as a huge number of spaces l = Math.ceil(this.spaceLeft / (w / word.length)); w = this.wordWidth(word.slice(0, l)); mightGrow = w <= this.spaceLeft && l < word.length; } else { l = word.length; } var mustShrink = w > this.spaceLeft && l > 0; // shrink or grow word as necessary after our near-guess above while (mustShrink || mightGrow) { if (mustShrink) { w = this.wordWidth(word.slice(0, --l)); mustShrink = w > this.spaceLeft && l > 0; } else { w = this.wordWidth(word.slice(0, ++l)); mustShrink = w > this.spaceLeft && l > 0; mightGrow = w <= this.spaceLeft && l < word.length; } } // check for the edge case where a single character cannot fit into a line. if (l === 0 && this.spaceLeft === this.lineWidth) { l = 1; } // send a required break unless this is the last piece and a linebreak is not specified fbk.required = bk.required || l < word.length; shouldContinue = fn(word.slice(0, l), w, fbk, lbk); lbk = { required: false }; // get the remaining piece of the word word = word.slice(l); w = this.wordWidth(word); if (shouldContinue === false) { break; } } } else { // otherwise just emit the break as it was given to us shouldContinue = fn(word, w, bk, last); } if (shouldContinue === false) { break; } last = bk; } } }, { key: "wrap", value: function wrap(text, options) { var _this2 = this; // override options from previous continued fragments if (options.indent != null) { this.indent = options.indent; } if (options.characterSpacing != null) { this.characterSpacing = options.characterSpacing; } if (options.wordSpacing != null) { this.wordSpacing = options.wordSpacing; } if (options.ellipsis != null) { this.ellipsis = options.ellipsis; } // make sure we're actually on the page // and that the first line of is never by // itself at the bottom of a page (orphans) var nextY = this.document.y + this.document.currentLineHeight(true); if (this.document.y > this.maxY || nextY > this.maxY) { this.nextSection(); } var buffer = ''; var textWidth = 0; var wc = 0; var lc = 0; var y = this.document.y; // used to reset Y pos if options.continued (below) var emitLine = function emitLine() { options.textWidth = textWidth + _this2.wordSpacing * (wc - 1); options.wordCount = wc; options.lineWidth = _this2.lineWidth; y = _this2.document.y; _this2.emit('line', buffer, options, _this2); return lc++; }; this.emit('sectionStart', options, this); this.eachWord(text, function (word, w, bk, last) { if (last == null || last.required) { _this2.emit('firstLine', options, _this2); _this2.spaceLeft = _this2.lineWidth; } if (w <= _this2.spaceLeft) { buffer += word; textWidth += w; wc++; } if (bk.required || w > _this2.spaceLeft) { // if the user specified a max height and an ellipsis, and is about to pass the // max height and max columns after the next line, append the ellipsis var lh = _this2.document.currentLineHeight(true); if (_this2.height != null && _this2.ellipsis && _this2.document.y + lh * 2 > _this2.maxY && _this2.column >= _this2.columns) { if (_this2.ellipsis === true) { _this2.ellipsis = '…'; } // map default ellipsis character buffer = buffer.replace(/\s+$/, ''); textWidth = _this2.wordWidth(buffer + _this2.ellipsis); // remove characters from the buffer until the ellipsis fits // to avoid infinite loop need to stop while-loop if buffer is empty string while (buffer && textWidth > _this2.lineWidth) { buffer = buffer.slice(0, -1).replace(/\s+$/, ''); textWidth = _this2.wordWidth(buffer + _this2.ellipsis); } // need to add ellipsis only if there is enough space for it if (textWidth <= _this2.lineWidth) { buffer = buffer + _this2.ellipsis; } textWidth = _this2.wordWidth(buffer); } if (bk.required) { if (w > _this2.spaceLeft) { emitLine(); buffer = word; textWidth = w; wc = 1; } _this2.emit('lastLine', options, _this2); } emitLine(); // if we've reached the edge of the page, // continue on a new page or column if (_this2.document.y + lh > _this2.maxY) { var shouldContinue = _this2.nextSection(); // stop if we reached the maximum height if (!shouldContinue) { wc = 0; buffer = ''; return false; } } // reset the space left and buffer if (bk.required) { _this2.spaceLeft = _this2.lineWidth; buffer = ''; textWidth = 0; return wc = 0; } else { // reset the space left and buffer _this2.spaceLeft = _this2.lineWidth - w; buffer = word; textWidth = w; return wc = 1; } } else { return _this2.spaceLeft -= w; } }); if (wc > 0) { this.emit('lastLine', options, this); emitLine(); } this.emit('sectionEnd', options, this); // if the wrap is set to be continued, save the X position // to start the first line of the next segment at, and reset // the y position if (options.continued === true) { if (lc > 1) { this.continuedX = 0; } this.continuedX += options.textWidth || 0; return this.document.y = y; } else { return this.document.x = this.startX; } } }, { key: "nextSection", value: function nextSection(options) { this.emit('sectionEnd', options, this); if (++this.column > this.columns) { // if a max height was specified by the user, we're done. // otherwise, the default is to make a new page at the bottom. if (this.height != null) { return false; } this.document.continueOnNewPage(); this.column = 1; this.startY = this.document.page.margins.top; this.maxY = this.document.page.maxY(); this.document.x = this.startX; if (this.document._fillColor) { var _this$document; (_this$document = this.document).fillColor.apply(_this$document, _toConsumableArray(this.document._fillColor)); } this.emit('pageBreak', options, this); } else { this.document.x += this.lineWidth + this.columnGap; this.document.y = this.startY; this.emit('columnBreak', options, this); } this.emit('sectionStart', options, this); return true; } }]); return LineWrapper; }(_events.EventEmitter); var number$2 = PDFObject.number; var TextMixin = { initText: function initText() { this._line = this._line.bind(this); // Current coordinates this.x = 0; this.y = 0; return this._lineGap = 0; }, lineGap: function lineGap(_lineGap) { this._lineGap = _lineGap; return this; }, moveDown: function moveDown(lines) { if (lines == null) { lines = 1; } this.y += this.currentLineHeight(true) * lines + this._lineGap; return this; }, moveUp: function moveUp(lines) { if (lines == null) { lines = 1; } this.y -= this.currentLineHeight(true) * lines + this._lineGap; return this; }, _text: function _text(text, x, y, options, lineCallback) { var _this = this; options = this._initOptions(x, y, options); // Convert text to a string text = text == null ? '' : "".concat(text); // if the wordSpacing option is specified, remove multiple consecutive spaces if (options.wordSpacing) { text = text.replace(/\s{2,}/g, ' '); } var addStructure = function addStructure() { if (options.structParent) { options.structParent.add(_this.struct(options.structType || 'P', [_this.markStructureContent(options.structType || 'P')])); } }; // word wrapping if (options.width) { var wrapper = this._wrapper; if (!wrapper) { wrapper = new LineWrapper(this, options); wrapper.on('line', lineCallback); wrapper.on('firstLine', addStructure); } this._wrapper = options.continued ? wrapper : null; this._textOptions = options.continued ? options : null; wrapper.wrap(text, options); // render paragraphs as single lines } else { var _iterator = _createForOfIteratorHelper(text.split('\n')), _step; try { for (_iterator.s(); !(_step = _iterator.n()).done;) { var line = _step.value; addStructure(); lineCallback(line, options); } } catch (err) { _iterator.e(err); } finally { _iterator.f(); } } return this; }, text: function text(_text2, x, y, options) { return this._text(_text2, x, y, options, this._line); }, widthOfString: function widthOfString(string) { var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; return this._font.widthOfString(string, this._fontSize, options.features) + (options.characterSpacing || 0) * (string.length - 1); }, heightOfString: function heightOfString(text, options) { var _this2 = this; var x = this.x, y = this.y; options = this._initOptions(options); options.height = Infinity; // don't break pages var lineGap = options.lineGap || this._lineGap || 0; this._text(text, this.x, this.y, options, function () { return _this2.y += _this2.currentLineHeight(true) + lineGap; }); var height = this.y - y; this.x = x; this.y = y; return height; }, list: function list(_list, x, y, options, wrapper) { var _this3 = this; options = this._initOptions(x, y, options); var listType = options.listType || 'bullet'; var unit = Math.round(this._font.ascender / 1000 * this._fontSize); var midLine = unit / 2; var r = options.bulletRadius || unit / 3; var indent = options.textIndent || (listType === 'bullet' ? r * 5 : unit * 2); var itemIndent = options.bulletIndent || (listType === 'bullet' ? r * 8 : unit * 2); var level = 1; var items = []; var levels = []; var numbers = []; var flatten = function flatten(list) { var n = 1; for (var _i = 0; _i < list.length; _i++) { var item = list[_i]; if (Array.isArray(item)) { level++; flatten(item); level--; } else { items.push(item); levels.push(level); if (listType !== 'bullet') { numbers.push(n++); } } } }; flatten(_list); var label = function label(n) { switch (listType) { case 'numbered': return "".concat(n, "."); case 'lettered': var letter = String.fromCharCode((n - 1) % 26 + 65); var times = Math.floor((n - 1) / 26 + 1); var text = Array(times + 1).join(letter); return "".concat(text, "."); } }; wrapper = new LineWrapper(this, options); wrapper.on('line', this._line); level = 1; var i = 0; wrapper.on('firstLine', function () { var item, itemType, labelType, bodyType; if (options.structParent) { if (options.structTypes) { var _options$structTypes = _slicedToArray(options.structTypes, 3); itemType = _options$structTypes[0]; labelType = _options$structTypes[1]; bodyType = _options$structTypes[2]; } else { itemType = 'LI'; labelType = 'Lbl'; bodyType = 'LBody'; } } if (itemType) { item = _this3.struct(itemType); options.structParent.add(item); } else if (options.structParent) { item = options.structParent; } var l; if ((l = levels[i++]) !== level) { var diff = itemIndent * (l - level); _this3.x += diff; wrapper.lineWidth -= diff; level = l; } if (item && (labelType || bodyType)) { item.add(_this3.struct(labelType || bodyType, [_this3.markStructureContent(labelType || bodyType)])); } switch (listType) { case 'bullet': _this3.circle(_this3.x - indent + r, _this3.y + midLine, r); _this3.fill(); break; case 'numbered': case 'lettered': var text = label(numbers[i - 1]); _this3._fragment(text, _this3.x - indent, _this3.y, options); break; } if (item && labelType && bodyType) { item.add(_this3.struct(bodyType, [_this3.markStructureContent(bodyType)])); } if (item && item !== options.structParent) { item.end(); } }); wrapper.on('sectionStart', function () { var pos = indent + itemIndent * (level - 1); _this3.x += pos; return wrapper.lineWidth -= pos; }); wrapper.on('sectionEnd', function () { var pos = indent + itemIndent * (level - 1); _this3.x -= pos; return wrapper.lineWidth += pos; }); wrapper.wrap(items.join('\n'), options); return this; }, _initOptions: function _initOptions() { var x = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; var y = arguments.length > 1 ? arguments[1] : undefined; var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; if (typeof x === 'object') { options = x; x = null; } // clone options object var result = Object.assign({}, options); // extend options with previous values for continued text if (this._textOptions) { for (var key in this._textOptions) { var val = this._textOptions[key]; if (key !== 'continued') { if (result[key] === undefined) { result[key] = val; } } } } // Update the current position if (x != null) { this.x = x; } if (y != null) { this.y = y; } // wrap to margins if no x or y position passed if (result.lineBreak !== false) { if (result.width == null) { result.width = this.page.width - this.x - this.page.margins.right; } result.width = Math.max(result.width, 0); } if (!result.columns) { result.columns = 0; } if (result.columnGap == null) { result.columnGap = 18; } // 1/4 inch return result; }, _line: function _line(text) { var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; var wrapper = arguments.length > 2 ? arguments[2] : undefined; this._fragment(text, this.x, this.y, options); var lineGap = options.lineGap || this._lineGap || 0; if (!wrapper) { return this.x += this.widthOfString(text); } else { return this.y += this.currentLineHeight(true) + lineGap; } }, _fragment: function _fragment(text, x, y, options) { var _this4 = this; var dy, encoded, i, positions, textWidth, words; text = "".concat(text).replace(/\n/g, ''); if (text.length === 0) { return; } // handle options var align = options.align || 'left'; var wordSpacing = options.wordSpacing || 0; var characterSpacing = options.characterSpacing || 0; // text alignments if (options.width) { switch (align) { case 'right': textWidth = this.widthOfString(text.replace(/\s+$/, ''), options); x += options.lineWidth - textWidth; break; case 'center': x += options.lineWidth / 2 - options.textWidth / 2; break; case 'justify': // calculate the word spacing value words = text.trim().split(/\s+/); textWidth = this.widthOfString(text.replace(/\s+/g, ''), options); var spaceWidth = this.widthOfString(' ') + characterSpacing; wordSpacing = Math.max(0, (options.lineWidth - textWidth) / Math.max(1, words.length - 1) - spaceWidth); break; } } // text baseline alignments based on http://wiki.apache.org/xmlgraphics-fop/LineLayout/AlignmentHandling if (typeof options.baseline === 'number') { dy = -options.baseline; } else { switch (options.baseline) { case 'svg-middle': dy = 0.5 * this._font.xHeight; break; case 'middle': case 'svg-central': dy = 0.5 * (this._font.descender + this._font.ascender); break; case 'bottom': case 'ideographic': dy = this._font.descender; break; case 'alphabetic': dy = 0; break; case 'mathematical': dy = 0.5 * this._font.ascender; break; case 'hanging': dy = 0.8 * this._font.ascender; break; case 'top': dy = this._font.ascender; break; default: dy = this._font.ascender; } dy = dy / 1000 * this._fontSize; } // calculate the actual rendered width of the string after word and character spacing var renderedWidth = options.textWidth + wordSpacing * (options.wordCount - 1) + characterSpacing * (text.length - 1); // create link annotations if the link option is given if (options.link != null) { this.link(x, y, renderedWidth, this.currentLineHeight(), options.link); } if (options.goTo != null) { this.goTo(x, y, renderedWidth, this.currentLineHeight(), options.goTo); } if (options.destination != null) { this.addNamedDestination(options.destination, 'XYZ', x, y, null); } // create underline if (options.underline) { this.save(); if (!options.stroke) { this.strokeColor.apply(this, _toConsumableArray(this._fillColor || [])); } var lineWidth = this._fontSize < 10 ? 0.5 : Math.floor(this._fontSize / 10); this.lineWidth(lineWidth); var lineY = y + this.currentLineHeight() - lineWidth; this.moveTo(x, lineY); this.lineTo(x + renderedWidth, lineY); this.stroke(); this.restore(); } // create strikethrough line if (options.strike) { this.save(); if (!options.stroke) { this.strokeColor.apply(this, _toConsumableArray(this._fillColor || [])); } var _lineWidth = this._fontSize < 10 ? 0.5 : Math.floor(this._fontSize / 10); this.lineWidth(_lineWidth); var _lineY = y + this.currentLineHeight() / 2; this.moveTo(x, _lineY); this.lineTo(x + renderedWidth, _lineY); this.stroke(); this.restore(); } this.save(); // oblique (angle in degrees or boolean) if (options.oblique) { var skew; if (typeof options.oblique === 'number') { skew = -Math.tan(options.oblique * Math.PI / 180); } else { skew = -0.25; } this.transform(1, 0, 0, 1, x, y); this.transform(1, 0, skew, 1, -skew * dy, 0); this.transform(1, 0, 0, 1, -x, -y); } // flip coordinate system this.transform(1, 0, 0, -1, 0, this.page.height); y = this.page.height - y - dy; // add current font to page if necessary if (this.page.fonts[this._font.id] == null) { this.page.fonts[this._font.id] = this._font.ref(); } // begin the text object this.addContent('BT'); // text position this.addContent("1 0 0 1 ".concat(number$2(x), " ").concat(number$2(y), " Tm")); // font and font size this.addContent("/".concat(this._font.id, " ").concat(number$2(this._fontSize), " Tf")); // rendering mode var mode = options.fill && options.stroke ? 2 : options.stroke ? 1 : 0; if (mode) { this.addContent("".concat(mode, " Tr")); } // Character spacing if (characterSpacing) { this.addContent("".concat(number$2(characterSpacing), " Tc")); } // Add the actual text // If we have a word spacing value, we need to encode each word separately // since the normal Tw operator only works on character code 32, which isn't // used for embedded fonts. if (wordSpacing) { words = text.trim().split(/\s+/); wordSpacing += this.widthOfString(' ') + characterSpacing; wordSpacing *= 1000 / this._fontSize; encoded = []; positions = []; var _iterator2 = _createForOfIteratorHelper(words), _step2; try { for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { var word = _step2.value; var _this$_font$encode = this._font.encode(word, options.features), _this$_font$encode2 = _slicedToArray(_this$_font$encode, 2), encodedWord = _this$_font$encode2[0], positionsWord = _this$_font$encode2[1]; encoded = encoded.concat(encodedWord); positions = positions.concat(positionsWord); // add the word spacing to the end of the word // clone object because of cache var space = {}; var object = positions[positions.length - 1]; for (var key in object) { var val = object[key]; space[key] = val; } space.xAdvance += wordSpacing; positions[positions.length - 1] = space; } } catch (err) { _iterator2.e(err); } finally { _iterator2.f(); } } else { var _this$_font$encode3 = this._font.encode(text, options.features); var _this$_font$encode4 = _slicedToArray(_this$_font$encode3, 2); encoded = _this$_font$encode4[0]; positions = _this$_font$encode4[1]; } var scale = this._fontSize / 1000; var commands = []; var last = 0; var hadOffset = false; // Adds a segment of text to the TJ command buffer var addSegment = function addSegment(cur) { if (last < cur) { var hex = encoded.slice(last, cur).join(''); var advance = positions[cur - 1].xAdvance - positions[cur - 1].advanceWidth; commands.push("<".concat(hex, "> ").concat(number$2(-advance))); } return last = cur; }; // Flushes the current TJ commands to the output stream var flush = function flush(i) { addSegment(i); if (commands.length > 0) { _this4.addContent("[".concat(commands.join(' '), "] TJ")); return commands.length = 0; } }; for (i = 0; i < positions.length; i++) { // If we have an x or y offset, we have to break out of the current TJ command // so we can move the text position. var pos = positions[i]; if (pos.xOffset || pos.yOffset) { // Flush the current buffer flush(i); // Move the text position and flush just the current character this.addContent("1 0 0 1 ".concat(number$2(x + pos.xOffset * scale), " ").concat(number$2(y + pos.yOffset * scale), " Tm")); flush(i + 1); hadOffset = true; } else { // If the last character had an offset, reset the text position if (hadOffset) { this.addContent("1 0 0 1 ".concat(number$2(x), " ").concat(number$2(y), " Tm")); hadOffset = false; } // Group segments that don't have any advance adjustments if (pos.xAdvance - pos.advanceWidth !== 0) { addSegment(i + 1); } } x += pos.xAdvance * scale; } // Flush any remaining commands flush(i); // end the text object this.addContent('ET'); // restore flipped coordinate system return this.restore(); } }; var MARKERS = [0xffc0, 0xffc1, 0xffc2, 0xffc3, 0xffc5, 0xffc6, 0xffc7, 0xffc8, 0xffc9, 0xffca, 0xffcb, 0xffcc, 0xffcd, 0xffce, 0xffcf]; var COLOR_SPACE_MAP = { 1: 'DeviceGray', 3: 'DeviceRGB', 4: 'DeviceCMYK' }; var JPEG = /*#__PURE__*/function () { function JPEG(data, label) { _classCallCheck(this, JPEG); var marker; this.data = data; this.label = label; if (this.data.readUInt16BE(0) !== 0xffd8) { throw 'SOI not found in JPEG'; } var pos = 2; while (pos < this.data.length) { marker = this.data.readUInt16BE(pos); pos += 2; if (MARKERS.includes(marker)) { break; } pos += this.data.readUInt16BE(pos); } if (!MARKERS.includes(marker)) { throw 'Invalid JPEG.'; } pos += 2; this.bits = this.data[pos++]; this.height = this.data.readUInt16BE(pos); pos += 2; this.width = this.data.readUInt16BE(pos); pos += 2; var channels = this.data[pos++]; this.colorSpace = COLOR_SPACE_MAP[channels]; this.obj = null; } _createClass(JPEG, [{ key: "embed", value: function embed(document) { if (this.obj) { return; } this.obj = document.ref({ Type: 'XObject', Subtype: 'Image', BitsPerComponent: this.bits, Width: this.width, Height: this.height, ColorSpace: this.colorSpace, Filter: 'DCTDecode' }); // add extra decode params for CMYK images. By swapping the // min and max values from the default, we invert the colors. See // section 4.8.4 of the spec. if (this.colorSpace === 'DeviceCMYK') { this.obj.data['Decode'] = [1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 1.0, 0.0]; } this.obj.end(this.data); // free memory return this.data = null; } }]); return JPEG; }(); var PNGImage = /*#__PURE__*/function () { function PNGImage(data, label) { _classCallCheck(this, PNGImage); this.label = label; this.image = new _pngJs.default(data); this.width = this.image.width; this.height = this.image.height; this.imgData = this.image.imgData; this.obj = null; } _createClass(PNGImage, [{ key: "embed", value: function embed(document) { var dataDecoded = false; this.document = document; if (this.obj) { return; } var hasAlphaChannel = this.image.hasAlphaChannel; var isInterlaced = this.image.interlaceMethod === 1; this.obj = this.document.ref({ Type: 'XObject', Subtype: 'Image', BitsPerComponent: hasAlphaChannel ? 8 : this.image.bits, Width: this.width, Height: this.height, Filter: 'FlateDecode' }); if (!hasAlphaChannel) { var params = this.document.ref({ Predictor: isInterlaced ? 1 : 15, Colors: this.image.colors, BitsPerComponent: this.image.bits, Columns: this.width }); this.obj.data['DecodeParms'] = params; params.end(); } if (this.image.palette.length === 0) { this.obj.data['ColorSpace'] = this.image.colorSpace; } else { // embed the color palette in the PDF as an object stream var palette = this.document.ref(); palette.end(Buffer.from(this.image.palette)); // build the color space array for the image this.obj.data['ColorSpace'] = ['Indexed', 'DeviceRGB', this.image.palette.length / 3 - 1, palette]; } // For PNG color types 0, 2 and 3, the transparency data is stored in // a dedicated PNG chunk. if (this.image.transparency.grayscale != null) { // Use Color Key Masking (spec section 4.8.5) // An array with N elements, where N is two times the number of color components. var val = this.image.transparency.grayscale; this.obj.data['Mask'] = [val, val]; } else if (this.image.transparency.rgb) { // Use Color Key Masking (spec section 4.8.5) // An array with N elements, where N is two times the number of color components. var rgb = this.image.transparency.rgb; var mask = []; var _iterator = _createForOfIteratorHelper(rgb), _step; try { for (_iterator.s(); !(_step = _iterator.n()).done;) { var x = _step.value; mask.push(x, x); } } catch (err) { _iterator.e(err); } finally { _iterator.f(); } this.obj.data['Mask'] = mask; } else if (this.image.transparency.indexed) { // Create a transparency SMask for the image based on the data // in the PLTE and tRNS sections. See below for details on SMasks. dataDecoded = true; return this.loadIndexedAlphaChannel(); } else if (hasAlphaChannel) { // For PNG color types 4 and 6, the transparency data is stored as a alpha // channel mixed in with the main image data. Separate this data out into an // SMask object and store it separately in the PDF. dataDecoded = true; return this.splitAlphaChannel(); } if (isInterlaced && !dataDecoded) { return this.decodeData(); } this.finalize(); } }, { key: "finalize", value: function finalize() { if (this.alphaChannel) { var sMask = this.document.ref({ Type: 'XObject', Subtype: 'Image', Height: this.height, Width: this.width, BitsPerComponent: 8, Filter: 'FlateDecode', ColorSpace: 'DeviceGray', Decode: [0, 1] }); sMask.end(this.alphaChannel); this.obj.data['SMask'] = sMask; } // add the actual image data this.obj.end(this.imgData); // free memory this.image = null; return this.imgData = null; } }, { key: "splitAlphaChannel", value: function splitAlphaChannel() { var _this = this; return this.image.decodePixels(function (pixels) { var a, p; var colorCount = _this.image.colors; var pixelCount = _this.width * _this.height; var imgData = Buffer.alloc(pixelCount * colorCount); var alphaChannel = Buffer.alloc(pixelCount); var i = p = a = 0; var len = pixels.length; // For 16bit images copy only most significant byte (MSB) - PNG data is always stored in network byte order (MSB first) var skipByteCount = _this.image.bits === 16 ? 1 : 0; while (i < len) { for (var colorIndex = 0; colorIndex < colorCount; colorIndex++) { imgData[p++] = pixels[i++]; i += skipByteCount; } alphaChannel[a++] = pixels[i++]; i += skipByteCount; } _this.imgData = _zlib.default.deflateSync(imgData); _this.alphaChannel = _zlib.default.deflateSync(alphaChannel); return _this.finalize(); }); } }, { key: "loadIndexedAlphaChannel", value: function loadIndexedAlphaChannel() { var _this2 = this; var transparency = this.image.transparency.indexed; return this.image.decodePixels(function (pixels) { var alphaChannel = Buffer.alloc(_this2.width * _this2.height); var i = 0; for (var j = 0, end = pixels.length; j < end; j++) { alphaChannel[i++] = transparency[pixels[j]]; } _this2.alphaChannel = _zlib.default.deflateSync(alphaChannel); return _this2.finalize(); }); } }, { key: "decodeData", value: function decodeData() { var _this3 = this; this.image.decodePixels(function (pixels) { _this3.imgData = _zlib.default.deflateSync(pixels); _this3.finalize(); }); } }]); return PNGImage; }(); var PDFImage = /*#__PURE__*/function () { function PDFImage() { _classCallCheck(this, PDFImage); } _createClass(PDFImage, null, [{ key: "open", value: function open(src, label) { var data; if (Buffer.isBuffer(src)) { data = src; } else if (src instanceof ArrayBuffer) { data = Buffer.from(new Uint8Array(src)); } else { var match; if (match = /^data:.+;base64,(.*)$/.exec(src)) { data = Buffer.from(match[1], 'base64'); } else { data = fs.readFileSync(src); if (!data) { return; } } } if (data[0] === 0xff && data[1] === 0xd8) { return new JPEG(data, label); } else if (data[0] === 0x89 && data.toString('ascii', 1, 4) === 'PNG') { return new PNGImage(data, label); } else { throw new Error('Unknown image format.'); } } }]); return PDFImage; }(); var ImagesMixin = { initImages: function initImages() { this._imageRegistry = {}; return this._imageCount = 0; }, image: function image(src, x, y) { var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {}; var bh, bp, bw, image, ip, left, left1; if (typeof x === 'object') { options = x; x = null; } x = (left = x != null ? x : options.x) != null ? left : this.x; y = (left1 = y != null ? y : options.y) != null ? left1 : this.y; if (typeof src === 'string') { image = this._imageRegistry[src]; } if (!image) { if (src.width && src.height) { image = src; } else { image = this.openImage(src); } } if (!image.obj) { image.embed(this); } if (this.page.xobjects[image.label] == null) { this.page.xobjects[image.label] = image.obj; } var w = options.width || image.width; var h = options.height || image.height; if (options.width && !options.height) { var wp = w / image.width; w = image.width * wp; h = image.height * wp; } else if (options.height && !options.width) { var hp = h / image.height; w = image.width * hp; h = image.height * hp; } else if (options.scale) { w = image.width * options.scale; h = image.height * options.scale; } else if (options.fit) { var _options$fit = _slicedToArray(options.fit, 2); bw = _options$fit[0]; bh = _options$fit[1]; bp = bw / bh; ip = image.width / image.height; if (ip > bp) { w = bw; h = bw / ip; } else { h = bh; w = bh * ip; } } else if (options.cover) { var _options$cover = _slicedToArray(options.cover, 2); bw = _options$cover[0]; bh = _options$cover[1]; bp = bw / bh; ip = image.width / image.height; if (ip > bp) { h = bh; w = bh * ip; } else { w = bw; h = bw / ip; } } if (options.fit || options.cover) { if (options.align === 'center') { x = x + bw / 2 - w / 2; } else if (options.align === 'right') { x = x + bw - w; } if (options.valign === 'center') { y = y + bh / 2 - h / 2; } else if (options.valign === 'bottom') { y = y + bh - h; } } // create link annotations if the link option is given if (options.link != null) { this.link(x, y, w, h, options.link); } if (options.goTo != null) { this.goTo(x, y, w, h, options.goTo); } if (options.destination != null) { this.addNamedDestination(options.destination, 'XYZ', x, y, null); } // Set the current y position to below the image if it is in the document flow if (this.y === y) { this.y += h; } this.save(); this.transform(w, 0, 0, -h, x, y + h); this.addContent("/".concat(image.label, " Do")); this.restore(); return this; }, openImage: function openImage(src) { var image; if (typeof src === 'string') { image = this._imageRegistry[src]; } if (!image) { image = PDFImage.open(src, "I".concat(++this._imageCount)); if (typeof src === 'string') { this._imageRegistry[src] = image; } } return image; } }; var AnnotationsMixin = { annotate: function annotate(x, y, w, h, options) { options.Type = 'Annot'; options.Rect = this._convertRect(x, y, w, h); options.Border = [0, 0, 0]; if (options.Subtype === 'Link' && typeof options.F === 'undefined') { options.F = 1 << 2; // Print Annotation Flag } if (options.Subtype !== 'Link') { if (options.C == null) { options.C = this._normalizeColor(options.color || [0, 0, 0]); } } // convert colors delete options.color; if (typeof options.Dest === 'string') { options.Dest = new String(options.Dest); } // Capitalize keys for (var key in options) { var val = options[key]; options[key[0].toUpperCase() + key.slice(1)] = val; } var ref = this.ref(options); this.page.annotations.push(ref); ref.end(); return this; }, note: function note(x, y, w, h, contents) { var options = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {}; options.Subtype = 'Text'; options.Contents = new String(contents); options.Name = 'Comment'; if (options.color == null) { options.color = [243, 223, 92]; } return this.annotate(x, y, w, h, options); }, goTo: function goTo(x, y, w, h, name) { var options = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {}; options.Subtype = 'Link'; options.A = this.ref({ S: 'GoTo', D: new String(name) }); options.A.end(); return this.annotate(x, y, w, h, options); }, link: function link(x, y, w, h, url) { var options = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {}; options.Subtype = 'Link'; if (typeof url === 'number') { // Link to a page in the document (the page must already exist) var pages = this._root.data.Pages.data; if (url >= 0 && url < pages.Kids.length) { options.A = this.ref({ S: 'GoTo', D: [pages.Kids[url], 'XYZ', null, null, null] }); options.A.end(); } else { throw new Error("The document has no page ".concat(url)); } } else { // Link to an external url options.A = this.ref({ S: 'URI', URI: new String(url) }); options.A.end(); } return this.annotate(x, y, w, h, options); }, _markup: function _markup(x, y, w, h) { var options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {}; var _this$_convertRect = this._convertRect(x, y, w, h), _this$_convertRect2 = _slicedToArray(_this$_convertRect, 4), x1 = _this$_convertRect2[0], y1 = _this$_convertRect2[1], x2 = _this$_convertRect2[2], y2 = _this$_convertRect2[3]; options.QuadPoints = [x1, y2, x2, y2, x1, y1, x2, y1]; options.Contents = new String(); return this.annotate(x, y, w, h, options); }, highlight: function highlight(x, y, w, h) { var options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {}; options.Subtype = 'Highlight'; if (options.color == null) { options.color = [241, 238, 148]; } return this._markup(x, y, w, h, options); }, underline: function underline(x, y, w, h) { var options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {}; options.Subtype = 'Underline'; return this._markup(x, y, w, h, options); }, strike: function strike(x, y, w, h) { var options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {}; options.Subtype = 'StrikeOut'; return this._markup(x, y, w, h, options); }, lineAnnotation: function lineAnnotation(x1, y1, x2, y2) { var options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {}; options.Subtype = 'Line'; options.Contents = new String(); options.L = [x1, this.page.height - y1, x2, this.page.height - y2]; return this.annotate(x1, y1, x2, y2, options); }, rectAnnotation: function rectAnnotation(x, y, w, h) { var options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {}; options.Subtype = 'Square'; options.Contents = new String(); return this.annotate(x, y, w, h, options); }, ellipseAnnotation: function ellipseAnnotation(x, y, w, h) { var options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {}; options.Subtype = 'Circle'; options.Contents = new String(); return this.annotate(x, y, w, h, options); }, textAnnotation: function textAnnotation(x, y, w, h, text) { var options = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {}; options.Subtype = 'FreeText'; options.Contents = new String(text); options.DA = new String(); return this.annotate(x, y, w, h, options); }, fileAnnotation: function fileAnnotation(x, y, w, h) { var file = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : {}; var options = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {}; // create hidden file var filespec = this.file(file.src, Object.assign({ hidden: true }, file)); options.Subtype = 'FileAttachment'; options.FS = filespec; // add description from filespec unless description (Contents) has already been set if (options.Contents) { options.Contents = new String(options.Contents); } else if (filespec.data.Desc) { options.Contents = filespec.data.Desc; } return this.annotate(x, y, w, h, options); }, _convertRect: function _convertRect(x1, y1, w, h) { // flip y1 and y2 var y2 = y1; y1 += h; // make x2 var x2 = x1 + w; // apply current transformation matrix to points var _this$_ctm = _slicedToArray(this._ctm, 6), m0 = _this$_ctm[0], m1 = _this$_ctm[1], m2 = _this$_ctm[2], m3 = _this$_ctm[3], m4 = _this$_ctm[4], m5 = _this$_ctm[5]; x1 = m0 * x1 + m2 * y1 + m4; y1 = m1 * x1 + m3 * y1 + m5; x2 = m0 * x2 + m2 * y2 + m4; y2 = m1 * x2 + m3 * y2 + m5; return [x1, y1, x2, y2]; } }; var PDFOutline = /*#__PURE__*/function () { function PDFOutline(document, parent, title, dest) { var options = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : { expanded: false }; _classCallCheck(this, PDFOutline); this.document = document; this.options = options; this.outlineData = {}; if (dest !== null) { this.outlineData['Dest'] = [dest.dictionary, 'Fit']; } if (parent !== null) { this.outlineData['Parent'] = parent; } if (title !== null) { this.outlineData['Title'] = new String(title); } this.dictionary = this.document.ref(this.outlineData); this.children = []; } _createClass(PDFOutline, [{ key: "addItem", value: function addItem(title) { var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : { expanded: false }; var result = new PDFOutline(this.document, this.dictionary, title, this.document.page, options); this.children.push(result); return result; } }, { key: "endOutline", value: function endOutline() { if (this.children.length > 0) { if (this.options.expanded) { this.outlineData.Count = this.children.length; } var first = this.children[0], last = this.children[this.children.length - 1]; this.outlineData.First = first.dictionary; this.outlineData.Last = last.dictionary; for (var i = 0, len = this.children.length; i < len; i++) { var child = this.children[i]; if (i > 0) { child.outlineData.Prev = this.children[i - 1].dictionary; } if (i < this.children.length - 1) { child.outlineData.Next = this.children[i + 1].dictionary; } child.endOutline(); } } return this.dictionary.end(); } }]); return PDFOutline; }(); var OutlineMixin = { initOutline: function initOutline() { return this.outline = new PDFOutline(this, null, null, null); }, endOutline: function endOutline() { this.outline.endOutline(); if (this.outline.children.length > 0) { this._root.data.Outlines = this.outline.dictionary; return this._root.data.PageMode = 'UseOutlines'; } } }; /* PDFStructureContent - a reference to a marked structure content By Ben Schmidt */ var PDFStructureContent = /*#__PURE__*/function () { function PDFStructureContent(pageRef, mcid) { _classCallCheck(this, PDFStructureContent); this.refs = [{ pageRef: pageRef, mcid: mcid }]; } _createClass(PDFStructureContent, [{ key: "push", value: function push(structContent) { var _this = this; structContent.refs.forEach(function (ref) { return _this.refs.push(ref); }); } }]); return PDFStructureContent; }(); var PDFStructureElement = /*#__PURE__*/function () { function PDFStructureElement(document, type) { var _this = this; var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; var children = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null; _classCallCheck(this, PDFStructureElement); this.document = document; this._attached = false; this._ended = false; this._flushed = false; this.dictionary = document.ref({ // Type: "StructElem", S: type }); var data = this.dictionary.data; if (Array.isArray(options) || this._isValidChild(options)) { children = options; options = {}; } if (typeof options.title !== 'undefined') { data.T = new String(options.title); } if (typeof options.lang !== 'undefined') { data.Lang = new String(options.lang); } if (typeof options.alt !== 'undefined') { data.Alt = new String(options.alt); } if (typeof options.expanded !== 'undefined') { data.E = new String(options.expanded); } if (typeof options.actual !== 'undefined') { data.ActualText = new String(options.actual); } this._children = []; if (children) { if (!Array.isArray(children)) { children = [children]; } children.forEach(function (child) { return _this.add(child); }); this.end(); } } _createClass(PDFStructureElement, [{ key: "add", value: function add(child) { if (this._ended) { throw new Error("Cannot add child to already-ended structure element"); } if (!this._isValidChild(child)) { throw new Error("Invalid structure element child"); } if (child instanceof PDFStructureElement) { child.setParent(this.dictionary); if (this._attached) { child.setAttached(); } } if (child instanceof PDFStructureContent) { this._addContentToParentTree(child); } if (typeof child === 'function' && this._attached) { // _contentForClosure() adds the content to the parent tree child = this._contentForClosure(child); } this._children.push(child); return this; } }, { key: "_addContentToParentTree", value: function _addContentToParentTree(content) { var _this2 = this; content.refs.forEach(function (_ref) { var pageRef = _ref.pageRef, mcid = _ref.mcid; var pageStructParents = _this2.document.getStructParentTree().get(pageRef.data.StructParents); pageStructParents[mcid] = _this2.dictionary; }); } }, { key: "setParent", value: function setParent(parentRef) { if (this.dictionary.data.P) { throw new Error("Structure element added to more than one parent"); } this.dictionary.data.P = parentRef; this._flush(); } }, { key: "setAttached", value: function setAttached() { var _this3 = this; if (this._attached) { return; } this._children.forEach(function (child, index) { if (child instanceof PDFStructureElement) { child.setAttached(); } if (typeof child === 'function') { _this3._children[index] = _this3._contentForClosure(child); } }); this._attached = true; this._flush(); } }, { key: "end", value: function end() { if (this._ended) { return; } this._children.filter(function (child) { return child instanceof PDFStructureElement; }).forEach(function (child) { return child.end(); }); this._ended = true; this._flush(); } }, { key: "_isValidChild", value: function _isValidChild(child) { return child instanceof PDFStructureElement || child instanceof PDFStructureContent || typeof child === 'function'; } }, { key: "_contentForClosure", value: function _contentForClosure(closure) { var content = this.document.markStructureContent(this.dictionary.data.S); closure(); this.document.endMarkedContent(); this._addContentToParentTree(content); return content; } }, { key: "_isFlushable", value: function _isFlushable() { if (!this.dictionary.data.P || !this._ended) { return false; } return this._children.every(function (child) { if (typeof child === 'function') { return false; } if (child instanceof PDFStructureElement) { return child._isFlushable(); } return true; }); } }, { key: "_flush", value: function _flush() { var _this4 = this; if (this._flushed || !this._isFlushable()) { return; } this.dictionary.data.K = []; this._children.forEach(function (child) { return _this4._flushChild(child); }); this.dictionary.end(); // free memory used by children; the dictionary itself may still be // referenced by a parent structure element or root, but we can // at least trim the tree here this._children = []; this.dictionary.data.K = null; this._flushed = true; } }, { key: "_flushChild", value: function _flushChild(child) { var _this5 = this; if (child instanceof PDFStructureElement) { this.dictionary.data.K.push(child.dictionary); } if (child instanceof PDFStructureContent) { child.refs.forEach(function (_ref2) { var pageRef = _ref2.pageRef, mcid = _ref2.mcid; if (!_this5.dictionary.data.Pg) { _this5.dictionary.data.Pg = pageRef; } if (_this5.dictionary.data.Pg === pageRef) { _this5.dictionary.data.K.push(mcid); } else { _this5.dictionary.data.K.push({ Type: "MCR", Pg: pageRef, MCID: mcid }); } }); } } }]); return PDFStructureElement; }(); var PDFNumberTree = /*#__PURE__*/function (_PDFTree) { _inherits(PDFNumberTree, _PDFTree); var _super = _createSuper(PDFNumberTree); function PDFNumberTree() { _classCallCheck(this, PDFNumberTree); return _super.apply(this, arguments); } _createClass(PDFNumberTree, [{ key: "_compareKeys", value: function _compareKeys(a, b) { return parseInt(a) - parseInt(b); } }, { key: "_keysName", value: function _keysName() { return "Nums"; } }, { key: "_dataForKey", value: function _dataForKey(k) { return parseInt(k); } }]); return PDFNumberTree; }(PDFTree); var MarkingsMixin = { initMarkings: function initMarkings(options) { this.structChildren = []; if (options.tagged) { this.getMarkInfoDictionary().data.Marked = true; this.getStructTreeRoot(); } }, markContent: function markContent(tag) { var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null; if (tag === 'Artifact' || options && options.mcid) { var toClose = 0; this.page.markings.forEach(function (marking) { if (toClose || marking.structContent || marking.tag === 'Artifact') { toClose++; } }); while (toClose--) { this.endMarkedContent(); } } if (!options) { this.page.markings.push({ tag: tag }); this.addContent("/".concat(tag, " BMC")); return this; } this.page.markings.push({ tag: tag, options: options }); var dictionary = {}; if (typeof options.mcid !== 'undefined') { dictionary.MCID = options.mcid; } if (tag === 'Artifact') { if (typeof options.type === 'string') { dictionary.Type = options.type; } if (Array.isArray(options.bbox)) { dictionary.BBox = [options.bbox[0], this.page.height - options.bbox[3], options.bbox[2], this.page.height - options.bbox[1]]; } if (Array.isArray(options.attached) && options.attached.every(function (val) { return typeof val === 'string'; })) { dictionary.Attached = options.attached; } } if (tag === 'Span') { if (options.lang) { dictionary.Lang = new String(options.lang); } if (options.alt) { dictionary.Alt = new String(options.alt); } if (options.expanded) { dictionary.E = new String(options.expanded); } if (options.actual) { dictionary.ActualText = new String(options.actual); } } this.addContent("/".concat(tag, " ").concat(PDFObject.convert(dictionary), " BDC")); return this; }, markStructureContent: function markStructureContent(tag) { var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; var pageStructParents = this.getStructParentTree().get(this.page.structParentTreeKey); var mcid = pageStructParents.length; pageStructParents.push(null); this.markContent(tag, _objectSpread2(_objectSpread2({}, options), {}, { mcid: mcid })); var structContent = new PDFStructureContent(this.page.dictionary, mcid); this.page.markings.slice(-1)[0].structContent = structContent; return structContent; }, endMarkedContent: function endMarkedContent() { this.page.markings.pop(); this.addContent('EMC'); return this; }, struct: function struct(type) { var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; var children = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null; return new PDFStructureElement(this, type, options, children); }, addStructure: function addStructure(structElem) { var structTreeRoot = this.getStructTreeRoot(); structElem.setParent(structTreeRoot); structElem.setAttached(); this.structChildren.push(structElem); if (!structTreeRoot.data.K) { structTreeRoot.data.K = []; } structTreeRoot.data.K.push(structElem.dictionary); return this; }, initPageMarkings: function initPageMarkings(pageMarkings) { var _this = this; pageMarkings.forEach(function (marking) { if (marking.structContent) { var structContent = marking.structContent; var newStructContent = _this.markStructureContent(marking.tag, marking.options); structContent.push(newStructContent); _this.page.markings.slice(-1)[0].structContent = structContent; } else { _this.markContent(marking.tag, marking.options); } }); }, endPageMarkings: function endPageMarkings(page) { var pageMarkings = page.markings; pageMarkings.forEach(function () { return page.write('EMC'); }); page.markings = []; return pageMarkings; }, getMarkInfoDictionary: function getMarkInfoDictionary() { if (!this._root.data.MarkInfo) { this._root.data.MarkInfo = this.ref({}); } return this._root.data.MarkInfo; }, getStructTreeRoot: function getStructTreeRoot() { if (!this._root.data.StructTreeRoot) { this._root.data.StructTreeRoot = this.ref({ Type: 'StructTreeRoot', ParentTree: new PDFNumberTree(), ParentTreeNextKey: 0 }); } return this._root.data.StructTreeRoot; }, getStructParentTree: function getStructParentTree() { return this.getStructTreeRoot().data.ParentTree; }, createStructParentTreeNextKey: function createStructParentTreeNextKey() { // initialise the MarkInfo dictionary this.getMarkInfoDictionary(); var structTreeRoot = this.getStructTreeRoot(); var key = structTreeRoot.data.ParentTreeNextKey++; structTreeRoot.data.ParentTree.add(key, []); return key; }, endMarkings: function endMarkings() { var structTreeRoot = this._root.data.StructTreeRoot; if (structTreeRoot) { structTreeRoot.end(); this.structChildren.forEach(function (structElem) { return structElem.end(); }); } if (this._root.data.MarkInfo) { this._root.data.MarkInfo.end(); } } }; var FIELD_FLAGS = { readOnly: 1, required: 2, noExport: 4, multiline: 0x1000, password: 0x2000, toggleToOffButton: 0x4000, radioButton: 0x8000, pushButton: 0x10000, combo: 0x20000, edit: 0x40000, sort: 0x80000, multiSelect: 0x200000, noSpell: 0x400000 }; var FIELD_JUSTIFY = { left: 0, center: 1, right: 2 }; var VALUE_MAP = { value: 'V', defaultValue: 'DV' }; var FORMAT_SPECIAL = { zip: '0', zipPlus4: '1', zip4: '1', phone: '2', ssn: '3' }; var FORMAT_DEFAULT = { number: { nDec: 0, sepComma: false, negStyle: 'MinusBlack', currency: '', currencyPrepend: true }, percent: { nDec: 0, sepComma: false } }; var AcroFormMixin = { /** * Must call if adding AcroForms to a document. Must also call font() before * this method to set the default font. */ initForm: function initForm() { if (!this._font) { throw new Error('Must set a font before calling initForm method'); } this._acroform = { fonts: {}, defaultFont: this._font.name }; this._acroform.fonts[this._font.id] = this._font.ref(); var data = { Fields: [], NeedAppearances: true, DA: new String("/".concat(this._font.id, " 0 Tf 0 g")), DR: { Font: {} } }; data.DR.Font[this._font.id] = this._font.ref(); var AcroForm = this.ref(data); this._root.data.AcroForm = AcroForm; return this; }, /** * Called automatically by document.js */ endAcroForm: function endAcroForm() { var _this = this; if (this._root.data.AcroForm) { if (!Object.keys(this._acroform.fonts).length && !this._acroform.defaultFont) { throw new Error('No fonts specified for PDF form'); } var fontDict = this._root.data.AcroForm.data.DR.Font; Object.keys(this._acroform.fonts).forEach(function (name) { fontDict[name] = _this._acroform.fonts[name]; }); this._root.data.AcroForm.data.Fields.forEach(function (fieldRef) { _this._endChild(fieldRef); }); this._root.data.AcroForm.end(); } return this; }, _endChild: function _endChild(ref) { var _this2 = this; if (Array.isArray(ref.data.Kids)) { ref.data.Kids.forEach(function (childRef) { _this2._endChild(childRef); }); ref.end(); } return this; }, /** * Creates and adds a form field to the document. Form fields are intermediate * nodes in a PDF form that are used to specify form name heirarchy and form * value defaults. * @param {string} name - field name (T attribute in field dictionary) * @param {object} options - other attributes to include in field dictionary */ formField: function formField(name) { var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; var fieldDict = this._fieldDict(name, null, options); var fieldRef = this.ref(fieldDict); this._addToParent(fieldRef); return fieldRef; }, /** * Creates and adds a Form Annotation to the document. Form annotations are * called Widget annotations internally within a PDF file. * @param {string} name - form field name (T attribute of widget annotation * dictionary) * @param {number} x * @param {number} y * @param {number} w * @param {number} h * @param {object} options */ formAnnotation: function formAnnotation(name, type, x, y, w, h) { var options = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : {}; var fieldDict = this._fieldDict(name, type, options); fieldDict.Subtype = 'Widget'; if (fieldDict.F === undefined) { fieldDict.F = 4; // print the annotation } // Add Field annot to page, and get it's ref this.annotate(x, y, w, h, fieldDict); var annotRef = this.page.annotations[this.page.annotations.length - 1]; return this._addToParent(annotRef); }, formText: function formText(name, x, y, w, h) { var options = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {}; return this.formAnnotation(name, 'text', x, y, w, h, options); }, formPushButton: function formPushButton(name, x, y, w, h) { var options = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {}; return this.formAnnotation(name, 'pushButton', x, y, w, h, options); }, formCombo: function formCombo(name, x, y, w, h) { var options = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {}; return this.formAnnotation(name, 'combo', x, y, w, h, options); }, formList: function formList(name, x, y, w, h) { var options = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {}; return this.formAnnotation(name, 'list', x, y, w, h, options); }, formRadioButton: function formRadioButton(name, x, y, w, h) { var options = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {}; return this.formAnnotation(name, 'radioButton', x, y, w, h, options); }, formCheckbox: function formCheckbox(name, x, y, w, h) { var options = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {}; return this.formAnnotation(name, 'checkbox', x, y, w, h, options); }, _addToParent: function _addToParent(fieldRef) { var parent = fieldRef.data.Parent; if (parent) { if (!parent.data.Kids) { parent.data.Kids = []; } parent.data.Kids.push(fieldRef); } else { this._root.data.AcroForm.data.Fields.push(fieldRef); } return this; }, _fieldDict: function _fieldDict(name, type) { var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {}; if (!this._acroform) { throw new Error('Call document.initForms() method before adding form elements to document'); } var opts = Object.assign({}, options); if (type !== null) { opts = this._resolveType(type, options); } opts = this._resolveFlags(opts); opts = this._resolveJustify(opts); opts = this._resolveFont(opts); opts = this._resolveStrings(opts); opts = this._resolveColors(opts); opts = this._resolveFormat(opts); opts.T = new String(name); if (opts.parent) { opts.Parent = opts.parent; delete opts.parent; } return opts; }, _resolveType: function _resolveType(type, opts) { if (type === 'text') { opts.FT = 'Tx'; } else if (type === 'pushButton') { opts.FT = 'Btn'; opts.pushButton = true; } else if (type === 'radioButton') { opts.FT = 'Btn'; opts.radioButton = true; } else if (type === 'checkbox') { opts.FT = 'Btn'; } else if (type === 'combo') { opts.FT = 'Ch'; opts.combo = true; } else if (type === 'list') { opts.FT = 'Ch'; } else { throw new Error("Invalid form annotation type '".concat(type, "'")); } return opts; }, _resolveFormat: function _resolveFormat(opts) { var f = opts.format; if (f && f.type) { var fnKeystroke; var fnFormat; var params = ''; if (FORMAT_SPECIAL[f.type] !== undefined) { fnKeystroke = "AFSpecial_Keystroke"; fnFormat = "AFSpecial_Format"; params = FORMAT_SPECIAL[f.type]; } else { var format = f.type.charAt(0).toUpperCase() + f.type.slice(1); fnKeystroke = "AF".concat(format, "_Keystroke"); fnFormat = "AF".concat(format, "_Format"); if (f.type === 'date') { fnKeystroke += 'Ex'; params = String(f.param); } else if (f.type === 'time') { params = String(f.param); } else if (f.type === 'number') { var p = Object.assign({}, FORMAT_DEFAULT.number, f); params = String([String(p.nDec), p.sepComma ? '0' : '1', '"' + p.negStyle + '"', 'null', '"' + p.currency + '"', String(p.currencyPrepend)].join(',')); } else if (f.type === 'percent') { var _p = Object.assign({}, FORMAT_DEFAULT.percent, f); params = String([String(_p.nDec), _p.sepComma ? '0' : '1'].join(',')); } } opts.AA = opts.AA ? opts.AA : {}; opts.AA.K = { S: 'JavaScript', JS: new String("".concat(fnKeystroke, "(").concat(params, ");")) }; opts.AA.F = { S: 'JavaScript', JS: new String("".concat(fnFormat, "(").concat(params, ");")) }; } delete opts.format; return opts; }, _resolveColors: function _resolveColors(opts) { var color = this._normalizeColor(opts.backgroundColor); if (color) { if (!opts.MK) { opts.MK = {}; } opts.MK.BG = color; } color = this._normalizeColor(opts.borderColor); if (color) { if (!opts.MK) { opts.MK = {}; } opts.MK.BC = color; } delete opts.backgroundColor; delete opts.borderColor; return opts; }, _resolveFlags: function _resolveFlags(options) { var result = 0; Object.keys(options).forEach(function (key) { if (FIELD_FLAGS[key]) { result |= FIELD_FLAGS[key]; delete options[key]; } }); if (result !== 0) { options.Ff = options.Ff ? options.Ff : 0; options.Ff |= result; } return options; }, _resolveJustify: function _resolveJustify(options) { var result = 0; if (options.align !== undefined) { if (typeof FIELD_JUSTIFY[options.align] === 'number') { result = FIELD_JUSTIFY[options.align]; } delete options.align; } if (result !== 0) { options.Q = result; // default } return options; }, _resolveFont: function _resolveFont(options) { // add current font to document-level AcroForm dict if necessary if (this._acroform.fonts[this._font.id] === null) { this._acroform.fonts[this._font.id] = this._font.ref(); } // add current font to field's resource dict (RD) if not the default acroform font if (this._acroform.defaultFont !== this._font.name) { options.DR = { Font: {} }; // Get the fontSize option. If not set use auto sizing var fontSize = options.fontSize || 0; options.DR.Font[this._font.id] = this._font.ref(); options.DA = new String("/".concat(this._font.id, " ").concat(fontSize, " Tf 0 g")); } return options; }, _resolveStrings: function _resolveStrings(options) { var select = []; function appendChoices(a) { if (Array.isArray(a)) { for (var idx = 0; idx < a.length; idx++) { if (typeof a[idx] === 'string') { select.push(new String(a[idx])); } else { select.push(a[idx]); } } } } appendChoices(options.Opt); if (options.select) { appendChoices(options.select); delete options.select; } if (select.length) { options.Opt = select; } Object.keys(VALUE_MAP).forEach(function (key) { if (options[key] !== undefined) { options[VALUE_MAP[key]] = options[key]; delete options[key]; } }); ['V', 'DV'].forEach(function (key) { if (typeof options[key] === 'string') { options[key] = new String(options[key]); } }); if (options.MK && options.MK.CA) { options.MK.CA = new String(options.MK.CA); } if (options.label) { options.MK = options.MK ? options.MK : {}; options.MK.CA = new String(options.label); delete options.label; } return options; } }; var AttachmentsMixin = { /** * Embed contents of `src` in PDF * @param {Buffer | ArrayBuffer | string} src input Buffer, ArrayBuffer, base64 encoded string or path to file * @param {object} options * * options.name: filename to be shown in PDF, will use `src` if none set * * options.type: filetype to be shown in PDF * * options.description: description to be shown in PDF * * options.hidden: if true, do not add attachment to EmbeddedFiles dictionary. Useful for file attachment annotations * * options.creationDate: override creation date * * options.modifiedDate: override modified date * @returns filespec reference */ file: function file(src) { var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; options.name = options.name || src; var refBody = { Type: 'EmbeddedFile', Params: {} }; var data; if (!src) { throw new Error('No src specified'); } if (Buffer.isBuffer(src)) { data = src; } else if (src instanceof ArrayBuffer) { data = Buffer.from(new Uint8Array(src)); } else { var match; if (match = /^data:(.*);base64,(.*)$/.exec(src)) { if (match[1]) { refBody.Subtype = match[1].replace('/', '#2F'); } data = Buffer.from(match[2], 'base64'); } else { data = fs.readFileSync(src); if (!data) { throw new Error("Could not read contents of file at filepath ".concat(src)); } // update CreationDate and ModDate var _fs$statSync = fs.statSync(src), birthtime = _fs$statSync.birthtime, ctime = _fs$statSync.ctime; refBody.Params.CreationDate = birthtime; refBody.Params.ModDate = ctime; } } // override creation date and modified date if (options.creationDate instanceof Date) { refBody.Params.CreationDate = options.creationDate; } if (options.modifiedDate instanceof Date) { refBody.Params.ModDate = options.modifiedDate; } // add optional subtype if (options.type) { refBody.Subtype = options.type.replace('/', '#2F'); } // add checksum and size information var checksum = _cryptoJs.default.MD5(_cryptoJs.default.lib.WordArray.create(new Uint8Array(data))); refBody.Params.CheckSum = new String(checksum); refBody.Params.Size = data.byteLength; // save some space when embedding the same file again // if a file with the same name and metadata exists, reuse its reference var ref; if (!this._fileRegistry) this._fileRegistry = {}; var file = this._fileRegistry[options.name]; if (file && isEqual(refBody, file)) { ref = file.ref; } else { ref = this.ref(refBody); ref.end(data); this._fileRegistry[options.name] = _objectSpread2(_objectSpread2({}, refBody), {}, { ref: ref }); } // add filespec for embedded file var fileSpecBody = { Type: 'Filespec', F: new String(options.name), EF: { F: ref }, UF: new String(options.name) }; if (options.description) { fileSpecBody.Desc = new String(options.description); } var filespec = this.ref(fileSpecBody); filespec.end(); if (!options.hidden) { this.addNamedEmbeddedFile(options.name, filespec); } return filespec; } }; /** check two embedded file metadata objects for equality */ function isEqual(a, b) { return a.Subtype === b.Subtype && a.Params.CheckSum.toString() === b.Params.CheckSum.toString() && a.Params.Size === b.Params.Size && a.Params.CreationDate === b.Params.CreationDate && a.Params.ModDate === b.Params.ModDate; } var PDFDocument = /*#__PURE__*/function (_stream$Readable) { _inherits(PDFDocument, _stream$Readable); var _super = _createSuper(PDFDocument); function PDFDocument() { var _this; var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {}; _classCallCheck(this, PDFDocument); _this = _super.call(this, options); _this.options = options; // PDF version switch (options.pdfVersion) { case '1.4': _this.version = 1.4; break; case '1.5': _this.version = 1.5; break; case '1.6': _this.version = 1.6; break; case '1.7': case '1.7ext3': _this.version = 1.7; break; default: _this.version = 1.3; break; } // Whether streams should be compressed _this.compress = _this.options.compress != null ? _this.options.compress : true; _this._pageBuffer = []; _this._pageBufferStart = 0; // The PDF object store _this._offsets = []; _this._waiting = 0; _this._ended = false; _this._offset = 0; var Pages = _this.ref({ Type: 'Pages', Count: 0, Kids: [] }); var Names = _this.ref({ Dests: new PDFNameTree() }); _this._root = _this.ref({ Type: 'Catalog', Pages: Pages, Names: Names }); if (_this.options.lang) { _this._root.data.Lang = new String(_this.options.lang); } // The current page _this.page = null; // Initialize mixins _this.initColor(); _this.initVector(); _this.initFonts(options.font); _this.initText(); _this.initImages(); _this.initOutline(); _this.initMarkings(options); // Initialize the metadata _this.info = { Producer: 'PDFKit', Creator: 'PDFKit', CreationDate: new Date() }; if (_this.options.info) { for (var key in _this.options.info) { var val = _this.options.info[key]; _this.info[key] = val; } } if (_this.options.displayTitle) { _this._root.data.ViewerPreferences = _this.ref({ DisplayDocTitle: true }); } // Generate file ID _this._id = PDFSecurity.generateFileID(_this.info); // Initialize security settings _this._security = PDFSecurity.create(_assertThisInitialized(_this), options); // Write the header // PDF version _this._write("%PDF-".concat(_this.version)); // 4 binary chars, as recommended by the spec _this._write('%\xFF\xFF\xFF\xFF'); // Add the first page if (_this.options.autoFirstPage !== false) { _this.addPage(); } return _this; } _createClass(PDFDocument, [{ key: "addPage", value: function addPage(options) { if (options == null) { options = this.options; } // end the current page if needed if (!this.options.bufferPages) { this.flushPages(); } // create a page object this.page = new PDFPage(this, options); this._pageBuffer.push(this.page); // add the page to the object store var pages = this._root.data.Pages.data; pages.Kids.push(this.page.dictionary); pages.Count++; // reset x and y coordinates this.x = this.page.margins.left; this.y = this.page.margins.top; // flip PDF coordinate system so that the origin is in // the top left rather than the bottom left this._ctm = [1, 0, 0, 1, 0, 0]; this.transform(1, 0, 0, -1, 0, this.page.height); this.emit('pageAdded'); return this; } }, { key: "continueOnNewPage", value: function continueOnNewPage(options) { var pageMarkings = this.endPageMarkings(this.page); this.addPage(options); this.initPageMarkings(pageMarkings); return this; } }, { key: "bufferedPageRange", value: function bufferedPageRange() { return { start: this._pageBufferStart, count: this._pageBuffer.length }; } }, { key: "switchToPage", value: function switchToPage(n) { var page; if (!(page = this._pageBuffer[n - this._pageBufferStart])) { throw new Error("switchToPage(".concat(n, ") out of bounds, current buffer covers pages ").concat(this._pageBufferStart, " to ").concat(this._pageBufferStart + this._pageBuffer.length - 1)); } return this.page = page; } }, { key: "flushPages", value: function flushPages() { // this local variable exists so we're future-proof against // reentrant calls to flushPages. var pages = this._pageBuffer; this._pageBuffer = []; this._pageBufferStart += pages.length; var _iterator = _createForOfIteratorHelper(pages), _step; try { for (_iterator.s(); !(_step = _iterator.n()).done;) { var page = _step.value; this.endPageMarkings(page); page.end(); } } catch (err) { _iterator.e(err); } finally { _iterator.f(); } } }, { key: "addNamedDestination", value: function addNamedDestination(name) { for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) { args[_key - 1] = arguments[_key]; } if (args.length === 0) { args = ['XYZ', null, null, null]; } if (args[0] === 'XYZ' && args[2] !== null) { args[2] = this.page.height - args[2]; } args.unshift(this.page.dictionary); this._root.data.Names.data.Dests.add(name, args); } }, { key: "addNamedEmbeddedFile", value: function addNamedEmbeddedFile(name, ref) { if (!this._root.data.Names.data.EmbeddedFiles) { // disabling /Limits for this tree fixes attachments not showing in Adobe Reader this._root.data.Names.data.EmbeddedFiles = new PDFNameTree({ limits: false }); } // add filespec to EmbeddedFiles this._root.data.Names.data.EmbeddedFiles.add(name, ref); } }, { key: "addNamedJavaScript", value: function addNamedJavaScript(name, js) { if (!this._root.data.Names.data.JavaScript) { this._root.data.Names.data.JavaScript = new PDFNameTree(); } var data = { JS: new String(js), S: 'JavaScript' }; this._root.data.Names.data.JavaScript.add(name, data); } }, { key: "ref", value: function ref(data) { var ref = new PDFReference(this, this._offsets.length + 1, data); this._offsets.push(null); // placeholder for this object's offset once it is finalized this._waiting++; return ref; } }, { key: "_read", value: function _read() {} // do nothing, but this method is required by node }, { key: "_write", value: function _write(data) { if (!Buffer.isBuffer(data)) { data = Buffer.from(data + '\n', 'binary'); } this.push(data); return this._offset += data.length; } }, { key: "addContent", value: function addContent(data) { this.page.write(data); return this; } }, { key: "_refEnd", value: function _refEnd(ref) { this._offsets[ref.id - 1] = ref.offset; if (--this._waiting === 0 && this._ended) { this._finalize(); return this._ended = false; } } }, { key: "write", value: function write(filename, fn) { // print a deprecation warning with a stacktrace var err = new Error("PDFDocument#write is deprecated, and will be removed in a future version of PDFKit. Please pipe the document into a Node stream."); console.warn(err.stack); this.pipe(fs.createWriteStream(filename)); this.end(); return this.once('end', fn); } }, { key: "end", value: function end() { this.flushPages(); this._info = this.ref(); for (var key in this.info) { var val = this.info[key]; if (typeof val === 'string') { val = new String(val); } var entry = this.ref(val); entry.end(); this._info.data[key] = entry; } this._info.end(); for (var name in this._fontFamilies) { var font = this._fontFamilies[name]; font.finalize(); } this.endOutline(); this.endMarkings(); this._root.end(); this._root.data.Pages.end(); this._root.data.Names.end(); this.endAcroForm(); if (this._root.data.ViewerPreferences) { this._root.data.ViewerPreferences.end(); } if (this._security) { this._security.end(); } if (this._waiting === 0) { return this._finalize(); } else { return this._ended = true; } } }, { key: "_finalize", value: function _finalize() { // generate xref var xRefOffset = this._offset; this._write('xref'); this._write("0 ".concat(this._offsets.length + 1)); this._write('0000000000 65535 f '); var _iterator2 = _createForOfIteratorHelper(this._offsets), _step2; try { for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) { var offset = _step2.value; offset = "0000000000".concat(offset).slice(-10); this._write(offset + ' 00000 n '); } // trailer } catch (err) { _iterator2.e(err); } finally { _iterator2.f(); } var trailer = { Size: this._offsets.length + 1, Root: this._root, Info: this._info, ID: [this._id, this._id] }; if (this._security) { trailer.Encrypt = this._security.dictionary; } this._write('trailer'); this._write(PDFObject.convert(trailer)); this._write('startxref'); this._write("".concat(xRefOffset)); this._write('%%EOF'); // end the stream return this.push(null); } }, { key: "toString", value: function toString() { return '[object PDFDocument]'; } }]); return PDFDocument; }(_stream.default.Readable); var mixin = function mixin(methods) { Object.assign(PDFDocument.prototype, methods); }; mixin(ColorMixin); mixin(VectorMixin); mixin(FontsMixin); mixin(TextMixin); mixin(ImagesMixin); mixin(AnnotationsMixin); mixin(OutlineMixin); mixin(MarkingsMixin); mixin(AcroFormMixin); mixin(AttachmentsMixin); PDFDocument.LineWrapper = LineWrapper; var _default = PDFDocument; exports["default"] = _default; /***/ }), /***/ 9160: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); exports["default"] = void 0; __webpack_require__(4256); var _unicodeTrie = _interopRequireDefault(__webpack_require__(4781)); var _base64Js = _interopRequireDefault(__webpack_require__(9742)); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var categories = ["Cc", "Zs", "Po", "Sc", "Ps", "Pe", "Sm", "Pd", "Nd", "Lu", "Sk", "Pc", "Ll", "So", "Lo", "Pi", "Cf", "No", "Pf", "Lt", "Lm", "Mn", "Me", "Mc", "Nl", "Zl", "Zp", "Cs", "Co"]; var combiningClasses = ["Not_Reordered", "Above", "Above_Right", "Below", "Attached_Above_Right", "Attached_Below", "Overlay", "Iota_Subscript", "Double_Below", "Double_Above", "Below_Right", "Above_Left", "CCC10", "CCC11", "CCC12", "CCC13", "CCC14", "CCC15", "CCC16", "CCC17", "CCC18", "CCC19", "CCC20", "CCC21", "CCC22", "CCC23", "CCC24", "CCC25", "CCC30", "CCC31", "CCC32", "CCC27", "CCC28", "CCC29", "CCC33", "CCC34", "CCC35", "CCC36", "Nukta", "Virama", "CCC84", "CCC91", "CCC103", "CCC107", "CCC118", "CCC122", "CCC129", "CCC130", "CCC132", "Attached_Above", "Below_Left", "Left", "Kana_Voicing", "CCC26", "Right"]; var scripts = ["Common", "Latin", "Bopomofo", "Inherited", "Greek", "Coptic", "Cyrillic", "Armenian", "Hebrew", "Arabic", "Syriac", "Thaana", "Nko", "Samaritan", "Mandaic", "Devanagari", "Bengali", "Gurmukhi", "Gujarati", "Oriya", "Tamil", "Telugu", "Kannada", "Malayalam", "Sinhala", "Thai", "Lao", "Tibetan", "Myanmar", "Georgian", "Hangul", "Ethiopic", "Cherokee", "Canadian_Aboriginal", "Ogham", "Runic", "Tagalog", "Hanunoo", "Buhid", "Tagbanwa", "Khmer", "Mongolian", "Limbu", "Tai_Le", "New_Tai_Lue", "Buginese", "Tai_Tham", "Balinese", "Sundanese", "Batak", "Lepcha", "Ol_Chiki", "Braille", "Glagolitic", "Tifinagh", "Han", "Hiragana", "Katakana", "Yi", "Lisu", "Vai", "Bamum", "Syloti_Nagri", "Phags_Pa", "Saurashtra", "Kayah_Li", "Rejang", "Javanese", "Cham", "Tai_Viet", "Meetei_Mayek", "null", "Linear_B", "Lycian", "Carian", "Old_Italic", "Gothic", "Old_Permic", "Ugaritic", "Old_Persian", "Deseret", "Shavian", "Osmanya", "Osage", "Elbasan", "Caucasian_Albanian", "Linear_A", "Cypriot", "Imperial_Aramaic", "Palmyrene", "Nabataean", "Hatran", "Phoenician", "Lydian", "Meroitic_Hieroglyphs", "Meroitic_Cursive", "Kharoshthi", "Old_South_Arabian", "Old_North_Arabian", "Manichaean", "Avestan", "Inscriptional_Parthian", "Inscriptional_Pahlavi", "Psalter_Pahlavi", "Old_Turkic", "Old_Hungarian", "Hanifi_Rohingya", "Old_Sogdian", "Sogdian", "Elymaic", "Brahmi", "Kaithi", "Sora_Sompeng", "Chakma", "Mahajani", "Sharada", "Khojki", "Multani", "Khudawadi", "Grantha", "Newa", "Tirhuta", "Siddham", "Modi", "Takri", "Ahom", "Dogra", "Warang_Citi", "Nandinagari", "Zanabazar_Square", "Soyombo", "Pau_Cin_Hau", "Bhaiksuki", "Marchen", "Masaram_Gondi", "Gunjala_Gondi", "Makasar", "Cuneiform", "Egyptian_Hieroglyphs", "Anatolian_Hieroglyphs", "Mro", "Bassa_Vah", "Pahawh_Hmong", "Medefaidrin", "Miao", "Tangut", "Nushu", "Duployan", "SignWriting", "Nyiakeng_Puachue_Hmong", "Wancho", "Mende_Kikakui", "Adlam"]; var eaw = ["N", "Na", "A", "W", "H", "F"]; var data = { categories: categories, combiningClasses: combiningClasses, scripts: scripts, eaw: eaw }; var data$1 = "AAARAAAAAADwfAEAZXl5ONRt+/5bPVFZimRfKoTQJNm37CGE7Iw0j3UsTWKsoyI7kwyyTiEUzSD7NiEzhWYijH0wMVkHE4Mx49fzfo+3nuP4/fdZjvv+XNd5n/d9nef1WZvmKhTxiZndzDQBSEYQqxqKwnsKvGQucFh+6t6cJ792ePQBZv5S9yXSwkyjf/P4T7mTNnIAv1dOVhMlR9lflbUL9JeJguqsjvG9NTj/wLb566VAURnLo2vvRi89S3gW/33ihh2eXpDn40BIW7REl/7coRKIhAFlAiOtbLDTt6mMb4GzMF1gNnvX/sBxtbsAIjfztCNcQjcNDtLThRvuXu5M5g/CBjaLBE4lJm4qy/oZD97+IJryApcXfgWYlkvWbhfXgujOJKVu8B+ozqTLbxyJ5kNiR75CxDqfBM9eOlDMmGeoZ0iQbbS5VUplIwI+ZNXEKQVJxlwqjhOY7w3XwPesbLK5JZE+Tt4X8q8km0dzInsPPzbscrjBMVjF5mOHSeRdJVgKUjLTHiHqXSPkep8N/zFk8167KLp75f6RndkvzdfB6Uz3MmqvRArzdCbs1/iRZjYPLLF3U8Qs+H+Rb8iK51a6NIV2V9+07uJsTGFWpPz8J++7iRu2B6eAKlK/kujrLthwaD/7a6J5w90TusnH1JMAc+gNrql4aspOUG/RrsxUKmPzhHgP4Bleru+6Vfc/MBjgXVx7who94nPn7M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tIKtGh6PDVH+85ew3caqVt2BsDv5rOcu3G9srQWd7NmgtzCRUXLYknYRSwtH9oUtkqyN3CfP20xQ1faXQl4MEmjQehWR6GmGnkdpYNQYeIG408yAX7uCZmYUic9juOfb+Re28+OVOB+scYK4DaPcBe+5wmji9gymtkMpKo4UKqCz7yxzuN8VIlx9yNozpRJpNaWHtaZVEqP45n2JemTlYBSmNIK1FuSYAUQ1yBLnKxevrjayd+h2i8PjdB3YY6b0nr3JuOXGpPMyh4V2dslpR3DFEvgpsBLqhqLDOWP4yEvIL6f21PpA7/8B"; var trieData = { data: data$1 }; var log2 = Math.log2 || function (n) { return Math.log(n) / Math.LN2; }; var bits = function bits(n) { return log2(n) + 1 | 0; }; var buildUnicodeProperties = function buildUnicodeProperties(data, trie) { // compute the number of bits stored for each field var CATEGORY_BITS = bits(data.categories.length - 1); var COMBINING_BITS = bits(data.combiningClasses.length - 1); var SCRIPT_BITS = bits(data.scripts.length - 1); var EAW_BITS = bits(data.eaw.length - 1); var NUMBER_BITS = 10; // compute shift and mask values for each field var CATEGORY_SHIFT = COMBINING_BITS + SCRIPT_BITS + EAW_BITS + NUMBER_BITS; var COMBINING_SHIFT = SCRIPT_BITS + EAW_BITS + NUMBER_BITS; var SCRIPT_SHIFT = EAW_BITS + NUMBER_BITS; var EAW_SHIFT = NUMBER_BITS; var CATEGORY_MASK = (1 << CATEGORY_BITS) - 1; var COMBINING_MASK = (1 << COMBINING_BITS) - 1; var SCRIPT_MASK = (1 << SCRIPT_BITS) - 1; var EAW_MASK = (1 << EAW_BITS) - 1; var NUMBER_MASK = (1 << NUMBER_BITS) - 1; var getCategory = function getCategory(codePoint) { var val = trie.get(codePoint); return data.categories[val >> CATEGORY_SHIFT & CATEGORY_MASK]; }; var getCombiningClass = function getCombiningClass(codePoint) { var val = trie.get(codePoint); return data.combiningClasses[val >> COMBINING_SHIFT & COMBINING_MASK]; }; var getScript = function getScript(codePoint) { var val = trie.get(codePoint); return data.scripts[val >> SCRIPT_SHIFT & SCRIPT_MASK]; }; var getEastAsianWidth = function getEastAsianWidth(codePoint) { var val = trie.get(codePoint); return data.eaw[val >> EAW_SHIFT & EAW_MASK]; }; var getNumericValue = function getNumericValue(codePoint) { var val = trie.get(codePoint); var num = val & NUMBER_MASK; if (num === 0) { return null; } else if (num <= 50) { return num - 1; } else if (num < 0x1e0) { var numerator = (num >> 4) - 12; var denominator = (num & 0xf) + 1; return numerator / denominator; } else if (num < 0x300) { val = (num >> 5) - 14; var exp = (num & 0x1f) + 2; while (exp > 0) { val *= 10; exp--; } return val; } else { val = (num >> 2) - 0xbf; var _exp = (num & 3) + 1; while (_exp > 0) { val *= 60; _exp--; } return val; } }; var isAlphabetic = function isAlphabetic(codePoint) { var category = getCategory(codePoint); return category === 'Lu' || category === 'Ll' || category === 'Lt' || category === 'Lm' || category === 'Lo' || category === 'Nl'; }; var isDigit = function isDigit(codePoint) { return getCategory(codePoint) === 'Nd'; }; var isPunctuation = function isPunctuation(codePoint) { var category = getCategory(codePoint); return category === 'Pc' || category === 'Pd' || category === 'Pe' || category === 'Pf' || category === 'Pi' || category === 'Po' || category === 'Ps'; }; var isLowerCase = function isLowerCase(codePoint) { return getCategory(codePoint) === 'Ll'; }; var isUpperCase = function isUpperCase(codePoint) { return getCategory(codePoint) === 'Lu'; }; var isTitleCase = function isTitleCase(codePoint) { return getCategory(codePoint) === 'Lt'; }; var isWhiteSpace = function isWhiteSpace(codePoint) { var category = getCategory(codePoint); return category === 'Zs' || category === 'Zl' || category === 'Zp'; }; var isBaseForm = function isBaseForm(codePoint) { var category = getCategory(codePoint); return category === 'Nd' || category === 'No' || category === 'Nl' || category === 'Lu' || category === 'Ll' || category === 'Lt' || category === 'Lm' || category === 'Lo' || category === 'Me' || category === 'Mc'; }; var isMark = function isMark(codePoint) { var category = getCategory(codePoint); return category === 'Mn' || category === 'Me' || category === 'Mc'; }; return { getCategory: getCategory, getCombiningClass: getCombiningClass, getScript: getScript, getEastAsianWidth: getEastAsianWidth, getNumericValue: getNumericValue, isAlphabetic: isAlphabetic, isDigit: isDigit, isPunctuation: isPunctuation, isLowerCase: isLowerCase, isUpperCase: isUpperCase, isTitleCase: isTitleCase, isWhiteSpace: isWhiteSpace, isBaseForm: isBaseForm, isMark: isMark }; }; var trie = new _unicodeTrie.default(_base64Js.default.toByteArray(trieData.data)); var unicodeProperties = buildUnicodeProperties(data, trie); var _default = unicodeProperties; exports["default"] = _default; /***/ }), /***/ 4781: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; __webpack_require__(7042); __webpack_require__(6992); __webpack_require__(1539); __webpack_require__(2472); __webpack_require__(2990); __webpack_require__(8927); __webpack_require__(3105); __webpack_require__(5035); __webpack_require__(4345); __webpack_require__(7174); __webpack_require__(2846); __webpack_require__(4731); __webpack_require__(7209); __webpack_require__(6319); __webpack_require__(8867); __webpack_require__(7789); __webpack_require__(3739); __webpack_require__(9368); __webpack_require__(4483); __webpack_require__(2056); __webpack_require__(3462); __webpack_require__(678); __webpack_require__(7462); __webpack_require__(3824); __webpack_require__(5021); __webpack_require__(2974); __webpack_require__(5016); __webpack_require__(9135); var inflate = __webpack_require__(311); var _require = __webpack_require__(1753), swap32LE = _require.swap32LE; // Shift size for getting the index-1 table offset. var SHIFT_1 = 6 + 5; // Shift size for getting the index-2 table offset. var SHIFT_2 = 5; // Difference between the two shift sizes, // for getting an index-1 offset from an index-2 offset. 6=11-5 var SHIFT_1_2 = SHIFT_1 - SHIFT_2; // Number of index-1 entries for the BMP. 32=0x20 // This part of the index-1 table is omitted from the serialized form. var OMITTED_BMP_INDEX_1_LENGTH = 0x10000 >> SHIFT_1; // Number of entries in an index-2 block. 64=0x40 var INDEX_2_BLOCK_LENGTH = 1 << SHIFT_1_2; // Mask for getting the lower bits for the in-index-2-block offset. */ var INDEX_2_MASK = INDEX_2_BLOCK_LENGTH - 1; // Shift size for shifting left the index array values. // Increases possible data size with 16-bit index values at the cost // of compactability. // This requires data blocks to be aligned by DATA_GRANULARITY. var INDEX_SHIFT = 2; // Number of entries in a data block. 32=0x20 var DATA_BLOCK_LENGTH = 1 << SHIFT_2; // Mask for getting the lower bits for the in-data-block offset. var DATA_MASK = DATA_BLOCK_LENGTH - 1; // The part of the index-2 table for U+D800..U+DBFF stores values for // lead surrogate code _units_ not code _points_. // Values for lead surrogate code _points_ are indexed with this portion of the table. // Length=32=0x20=0x400>>SHIFT_2. (There are 1024=0x400 lead surrogates.) var LSCP_INDEX_2_OFFSET = 0x10000 >> SHIFT_2; var LSCP_INDEX_2_LENGTH = 0x400 >> SHIFT_2; // Count the lengths of both BMP pieces. 2080=0x820 var INDEX_2_BMP_LENGTH = LSCP_INDEX_2_OFFSET + LSCP_INDEX_2_LENGTH; // The 2-byte UTF-8 version of the index-2 table follows at offset 2080=0x820. // Length 32=0x20 for lead bytes C0..DF, regardless of SHIFT_2. var UTF8_2B_INDEX_2_OFFSET = INDEX_2_BMP_LENGTH; var UTF8_2B_INDEX_2_LENGTH = 0x800 >> 6; // U+0800 is the first code point after 2-byte UTF-8 // The index-1 table, only used for supplementary code points, at offset 2112=0x840. // Variable length, for code points up to highStart, where the last single-value range starts. // Maximum length 512=0x200=0x100000>>SHIFT_1. // (For 0x100000 supplementary code points U+10000..U+10ffff.) // // The part of the index-2 table for supplementary code points starts // after this index-1 table. // // Both the index-1 table and the following part of the index-2 table // are omitted completely if there is only BMP data. var INDEX_1_OFFSET = UTF8_2B_INDEX_2_OFFSET + UTF8_2B_INDEX_2_LENGTH; // The alignment size of a data block. Also the granularity for compaction. var DATA_GRANULARITY = 1 << INDEX_SHIFT; var UnicodeTrie = /*#__PURE__*/function () { function UnicodeTrie(data) { var isBuffer = typeof data.readUInt32BE === 'function' && typeof data.slice === 'function'; if (isBuffer || data instanceof Uint8Array) { // read binary format var uncompressedLength; if (isBuffer) { this.highStart = data.readUInt32LE(0); this.errorValue = data.readUInt32LE(4); uncompressedLength = data.readUInt32LE(8); data = data.slice(12); } else { var view = new DataView(data.buffer); this.highStart = view.getUint32(0, true); this.errorValue = view.getUint32(4, true); uncompressedLength = view.getUint32(8, true); data = data.subarray(12); } // double inflate the actual trie data data = inflate(data, new Uint8Array(uncompressedLength)); data = inflate(data, new Uint8Array(uncompressedLength)); // swap bytes from little-endian swap32LE(data); this.data = new Uint32Array(data.buffer); } else { // pre-parsed data var _data = data; this.data = _data.data; this.highStart = _data.highStart; this.errorValue = _data.errorValue; } } var _proto = UnicodeTrie.prototype; _proto.get = function get(codePoint) { var index; if (codePoint < 0 || codePoint > 0x10ffff) { return this.errorValue; } if (codePoint < 0xd800 || codePoint > 0xdbff && codePoint <= 0xffff) { // Ordinary BMP code point, excluding leading surrogates. // BMP uses a single level lookup. BMP index starts at offset 0 in the index. // data is stored in the index array itself. index = (this.data[codePoint >> SHIFT_2] << INDEX_SHIFT) + (codePoint & DATA_MASK); return this.data[index]; } if (codePoint <= 0xffff) { // Lead Surrogate Code Point. A Separate index section is stored for // lead surrogate code units and code points. // The main index has the code unit data. // For this function, we need the code point data. index = (this.data[LSCP_INDEX_2_OFFSET + (codePoint - 0xd800 >> SHIFT_2)] << INDEX_SHIFT) + (codePoint & DATA_MASK); return this.data[index]; } if (codePoint < this.highStart) { // Supplemental code point, use two-level lookup. index = this.data[INDEX_1_OFFSET - OMITTED_BMP_INDEX_1_LENGTH + (codePoint >> SHIFT_1)]; index = this.data[index + (codePoint >> SHIFT_2 & INDEX_2_MASK)]; index = (index << INDEX_SHIFT) + (codePoint & DATA_MASK); return this.data[index]; } return this.data[this.data.length - DATA_GRANULARITY]; }; return UnicodeTrie; }(); module.exports = UnicodeTrie; /***/ }), /***/ 1753: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; __webpack_require__(6992); __webpack_require__(1539); __webpack_require__(2472); __webpack_require__(2990); __webpack_require__(8927); __webpack_require__(3105); __webpack_require__(5035); __webpack_require__(4345); __webpack_require__(7174); __webpack_require__(2846); __webpack_require__(4731); __webpack_require__(7209); __webpack_require__(6319); __webpack_require__(8867); __webpack_require__(7789); __webpack_require__(3739); __webpack_require__(9368); __webpack_require__(4483); __webpack_require__(2056); __webpack_require__(3462); __webpack_require__(678); __webpack_require__(7462); __webpack_require__(3824); __webpack_require__(5021); __webpack_require__(2974); __webpack_require__(5016); __webpack_require__(9135); var isBigEndian = new Uint8Array(new Uint32Array([0x12345678]).buffer)[0] === 0x12; var swap = function swap(b, n, m) { var i = b[n]; b[n] = b[m]; b[m] = i; }; var swap32 = function swap32(array) { var len = array.length; for (var i = 0; i < len; i += 4) { swap(array, i, i + 3); swap(array, i + 1, i + 2); } }; var swap32LE = function swap32LE(array) { if (isBigEndian) { swap32(array); } }; module.exports = { swap32LE: swap32LE }; /***/ }), /***/ 8071: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var SVGtoPDF = __webpack_require__(8519); module.exports = SVGtoPDF; /***/ }), /***/ 8519: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; /* module decorator */ module = __webpack_require__.nmd(module); __webpack_require__(8309); __webpack_require__(7941); __webpack_require__(3210); __webpack_require__(4916); __webpack_require__(4723); __webpack_require__(3123); __webpack_require__(3728); __webpack_require__(5306); __webpack_require__(7042); __webpack_require__(9653); __webpack_require__(2222); __webpack_require__(6992); __webpack_require__(1539); __webpack_require__(3948); __webpack_require__(9254); __webpack_require__(3290); var SVGtoPDF = function SVGtoPDF(doc, svg, x, y, options) { "use strict"; var NamedColors = { aliceblue: [240, 248, 255], antiquewhite: [250, 235, 215], aqua: [0, 255, 255], aquamarine: [127, 255, 212], azure: [240, 255, 255], beige: [245, 245, 220], bisque: [255, 228, 196], black: [0, 0, 0], blanchedalmond: [255, 235, 205], blue: [0, 0, 255], blueviolet: [138, 43, 226], brown: [165, 42, 42], burlywood: [222, 184, 135], cadetblue: [95, 158, 160], chartreuse: [127, 255, 0], chocolate: [210, 105, 30], coral: [255, 127, 80], cornflowerblue: [100, 149, 237], cornsilk: [255, 248, 220], crimson: [220, 20, 60], cyan: [0, 255, 255], darkblue: [0, 0, 139], darkcyan: [0, 139, 139], darkgoldenrod: [184, 134, 11], darkgray: [169, 169, 169], darkgrey: [169, 169, 169], darkgreen: [0, 100, 0], darkkhaki: [189, 183, 107], darkmagenta: [139, 0, 139], darkolivegreen: [85, 107, 47], darkorange: [255, 140, 0], darkorchid: [153, 50, 204], darkred: [139, 0, 0], darksalmon: [233, 150, 122], darkseagreen: [143, 188, 143], darkslateblue: [72, 61, 139], darkslategray: [47, 79, 79], darkslategrey: [47, 79, 79], darkturquoise: [0, 206, 209], darkviolet: [148, 0, 211], deeppink: [255, 20, 147], deepskyblue: [0, 191, 255], dimgray: [105, 105, 105], dimgrey: [105, 105, 105], dodgerblue: [30, 144, 255], firebrick: [178, 34, 34], floralwhite: [255, 250, 240], forestgreen: [34, 139, 34], fuchsia: [255, 0, 255], gainsboro: [220, 220, 220], ghostwhite: [248, 248, 255], gold: [255, 215, 0], goldenrod: [218, 165, 32], gray: [128, 128, 128], grey: [128, 128, 128], green: [0, 128, 0], greenyellow: [173, 255, 47], honeydew: [240, 255, 240], hotpink: [255, 105, 180], indianred: [205, 92, 92], indigo: [75, 0, 130], ivory: [255, 255, 240], khaki: [240, 230, 140], lavender: [230, 230, 250], lavenderblush: [255, 240, 245], lawngreen: [124, 252, 0], lemonchiffon: [255, 250, 205], lightblue: [173, 216, 230], lightcoral: [240, 128, 128], lightcyan: [224, 255, 255], lightgoldenrodyellow: [250, 250, 210], lightgray: [211, 211, 211], lightgrey: [211, 211, 211], lightgreen: [144, 238, 144], lightpink: [255, 182, 193], lightsalmon: [255, 160, 122], lightseagreen: [32, 178, 170], lightskyblue: [135, 206, 250], lightslategray: [119, 136, 153], lightslategrey: [119, 136, 153], lightsteelblue: [176, 196, 222], lightyellow: [255, 255, 224], lime: [0, 255, 0], limegreen: [50, 205, 50], linen: [250, 240, 230], magenta: [255, 0, 255], maroon: [128, 0, 0], mediumaquamarine: [102, 205, 170], mediumblue: [0, 0, 205], mediumorchid: [186, 85, 211], mediumpurple: [147, 112, 219], mediumseagreen: [60, 179, 113], mediumslateblue: [123, 104, 238], mediumspringgreen: [0, 250, 154], mediumturquoise: [72, 209, 204], mediumvioletred: [199, 21, 133], midnightblue: [25, 25, 112], mintcream: [245, 255, 250], mistyrose: [255, 228, 225], moccasin: [255, 228, 181], navajowhite: [255, 222, 173], navy: [0, 0, 128], oldlace: [253, 245, 230], olive: [128, 128, 0], olivedrab: [107, 142, 35], orange: [255, 165, 0], orangered: [255, 69, 0], orchid: [218, 112, 214], palegoldenrod: [238, 232, 170], palegreen: [152, 251, 152], paleturquoise: [175, 238, 238], palevioletred: [219, 112, 147], papayawhip: [255, 239, 213], peachpuff: [255, 218, 185], peru: [205, 133, 63], pink: [255, 192, 203], plum: [221, 160, 221], powderblue: [176, 224, 230], purple: [128, 0, 128], rebeccapurple: [102, 51, 153], red: [255, 0, 0], rosybrown: [188, 143, 143], royalblue: [65, 105, 225], saddlebrown: [139, 69, 19], salmon: [250, 128, 114], sandybrown: [244, 164, 96], seagreen: [46, 139, 87], seashell: [255, 245, 238], sienna: [160, 82, 45], silver: [192, 192, 192], skyblue: [135, 206, 235], slateblue: [106, 90, 205], slategray: [112, 128, 144], slategrey: [112, 128, 144], snow: [255, 250, 250], springgreen: [0, 255, 127], steelblue: [70, 130, 180], tan: [210, 180, 140], teal: [0, 128, 128], thistle: [216, 191, 216], tomato: [255, 99, 71], turquoise: [64, 224, 208], violet: [238, 130, 238], wheat: [245, 222, 179], white: [255, 255, 255], whitesmoke: [245, 245, 245], yellow: [255, 255, 0] }; var DefaultColors = { black: [NamedColors.black, 1], white: [NamedColors.white, 1], transparent: [NamedColors.black, 0] }; var Entities = { quot: 34, amp: 38, lt: 60, gt: 62, apos: 39, OElig: 338, oelig: 339, Scaron: 352, scaron: 353, Yuml: 376, circ: 710, tilde: 732, ensp: 8194, emsp: 8195, thinsp: 8201, zwnj: 8204, zwj: 8205, lrm: 8206, rlm: 8207, ndash: 8211, mdash: 8212, lsquo: 8216, rsquo: 8217, sbquo: 8218, ldquo: 8220, rdquo: 8221, bdquo: 8222, dagger: 8224, Dagger: 8225, permil: 8240, lsaquo: 8249, rsaquo: 8250, euro: 8364, nbsp: 160, iexcl: 161, cent: 162, pound: 163, curren: 164, yen: 165, brvbar: 166, sect: 167, uml: 168, copy: 169, ordf: 170, laquo: 171, not: 172, shy: 173, reg: 174, macr: 175, deg: 176, plusmn: 177, sup2: 178, sup3: 179, acute: 180, micro: 181, para: 182, middot: 183, cedil: 184, sup1: 185, ordm: 186, raquo: 187, frac14: 188, frac12: 189, frac34: 190, iquest: 191, Agrave: 192, Aacute: 193, Acirc: 194, Atilde: 195, Auml: 196, Aring: 197, AElig: 198, Ccedil: 199, Egrave: 200, Eacute: 201, Ecirc: 202, Euml: 203, Igrave: 204, Iacute: 205, Icirc: 206, Iuml: 207, ETH: 208, Ntilde: 209, Ograve: 210, Oacute: 211, Ocirc: 212, Otilde: 213, Ouml: 214, times: 215, Oslash: 216, Ugrave: 217, Uacute: 218, Ucirc: 219, Uuml: 220, Yacute: 221, THORN: 222, szlig: 223, agrave: 224, aacute: 225, acirc: 226, atilde: 227, auml: 228, aring: 229, aelig: 230, ccedil: 231, egrave: 232, eacute: 233, ecirc: 234, euml: 235, igrave: 236, iacute: 237, icirc: 238, iuml: 239, eth: 240, ntilde: 241, ograve: 242, oacute: 243, ocirc: 244, otilde: 245, ouml: 246, divide: 247, oslash: 248, ugrave: 249, uacute: 250, ucirc: 251, uuml: 252, yacute: 253, thorn: 254, yuml: 255, fnof: 402, Alpha: 913, Beta: 914, Gamma: 915, Delta: 916, Epsilon: 917, Zeta: 918, Eta: 919, Theta: 920, Iota: 921, Kappa: 922, Lambda: 923, Mu: 924, Nu: 925, Xi: 926, Omicron: 927, Pi: 928, Rho: 929, Sigma: 931, Tau: 932, Upsilon: 933, Phi: 934, Chi: 935, Psi: 936, Omega: 937, alpha: 945, beta: 946, gamma: 947, delta: 948, epsilon: 949, zeta: 950, eta: 951, theta: 952, iota: 953, kappa: 954, lambda: 955, mu: 956, nu: 957, xi: 958, omicron: 959, pi: 960, rho: 961, sigmaf: 962, sigma: 963, tau: 964, upsilon: 965, phi: 966, chi: 967, psi: 968, omega: 969, thetasym: 977, upsih: 978, piv: 982, bull: 8226, hellip: 8230, prime: 8242, Prime: 8243, oline: 8254, frasl: 8260, weierp: 8472, image: 8465, real: 8476, trade: 8482, alefsym: 8501, larr: 8592, uarr: 8593, rarr: 8594, darr: 8595, harr: 8596, crarr: 8629, lArr: 8656, uArr: 8657, rArr: 8658, dArr: 8659, hArr: 8660, forall: 8704, part: 8706, exist: 8707, empty: 8709, nabla: 8711, isin: 8712, notin: 8713, ni: 8715, prod: 8719, sum: 8721, minus: 8722, lowast: 8727, radic: 8730, prop: 8733, infin: 8734, ang: 8736, and: 8743, or: 8744, cap: 8745, cup: 8746, int: 8747, there4: 8756, sim: 8764, cong: 8773, asymp: 8776, ne: 8800, equiv: 8801, le: 8804, ge: 8805, sub: 8834, sup: 8835, nsub: 8836, sube: 8838, supe: 8839, oplus: 8853, otimes: 8855, perp: 8869, sdot: 8901, lceil: 8968, rceil: 8969, lfloor: 8970, rfloor: 8971, lang: 9001, rang: 9002, loz: 9674, spades: 9824, clubs: 9827, hearts: 9829, diams: 9830 }; var PathArguments = { A: 7, a: 7, C: 6, c: 6, H: 1, h: 1, L: 2, l: 2, M: 2, m: 2, Q: 4, q: 4, S: 4, s: 4, T: 2, t: 2, V: 1, v: 1, Z: 0, z: 0 }; var PathFlags = { A3: true, A4: true, a3: true, a4: true }; var Properties = { 'color': { inherit: true, initial: undefined }, 'visibility': { inherit: true, initial: 'visible', values: { 'hidden': 'hidden', 'collapse': 'hidden', 'visible': 'visible' } }, 'fill': { inherit: true, initial: DefaultColors.black }, 'stroke': { inherit: true, initial: 'none' }, 'stop-color': { inherit: false, initial: DefaultColors.black }, 'fill-opacity': { inherit: true, initial: 1 }, 'stroke-opacity': { inherit: true, initial: 1 }, 'stop-opacity': { inherit: false, initial: 1 }, 'fill-rule': { inherit: true, initial: 'nonzero', values: { 'nonzero': 'nonzero', 'evenodd': 'evenodd' } }, 'clip-rule': { inherit: true, initial: 'nonzero', values: { 'nonzero': 'nonzero', 'evenodd': 'evenodd' } }, 'stroke-width': { inherit: true, initial: 1 }, 'stroke-dasharray': { inherit: true, initial: [] }, 'stroke-dashoffset': { inherit: true, initial: 0 }, 'stroke-miterlimit': { inherit: true, initial: 4 }, 'stroke-linejoin': { inherit: true, initial: 'miter', values: { 'miter': 'miter', 'round': 'round', 'bevel': 'bevel' } }, 'stroke-linecap': { inherit: true, initial: 'butt', values: { 'butt': 'butt', 'round': 'round', 'square': 'square' } }, 'font-size': { inherit: true, initial: 16, values: { 'xx-small': 9, 'x-small': 10, 'small': 13, 'medium': 16, 'large': 18, 'x-large': 24, 'xx-large': 32 } }, 'font-family': { inherit: true, initial: 'sans-serif' }, 'font-weight': { inherit: true, initial: 'normal', values: { '600': 'bold', '700': 'bold', '800': 'bold', '900': 'bold', 'bold': 'bold', 'bolder': 'bold', '500': 'normal', '400': 'normal', '300': 'normal', '200': 'normal', '100': 'normal', 'normal': 'normal', 'lighter': 'normal' } }, 'font-style': { inherit: true, initial: 'normal', values: { 'italic': 'italic', 'oblique': 'italic', 'normal': 'normal' } }, 'text-anchor': { inherit: true, initial: 'start', values: { 'start': 'start', 'middle': 'middle', 'end': 'end' } }, 'direction': { inherit: true, initial: 'ltr', values: { 'ltr': 'ltr', 'rtl': 'rtl' } }, 'dominant-baseline': { inherit: true, initial: 'baseline', values: { 'auto': 'baseline', 'baseline': 'baseline', 'before-edge': 'before-edge', 'text-before-edge': 'before-edge', 'middle': 'middle', 'central': 'central', 'after-edge': 'after-edge', 'text-after-edge': 'after-edge', 'ideographic': 'ideographic', 'alphabetic': 'alphabetic', 'hanging': 'hanging', 'mathematical': 'mathematical' } }, 'alignment-baseline': { inherit: false, initial: undefined, values: { 'auto': 'baseline', 'baseline': 'baseline', 'before-edge': 'before-edge', 'text-before-edge': 'before-edge', 'middle': 'middle', 'central': 'central', 'after-edge': 'after-edge', 'text-after-edge': 'after-edge', 'ideographic': 'ideographic', 'alphabetic': 'alphabetic', 'hanging': 'hanging', 'mathematical': 'mathematical' } }, 'baseline-shift': { inherit: true, initial: 'baseline', values: { 'baseline': 'baseline', 'sub': 'sub', 'super': 'super' } }, 'word-spacing': { inherit: true, initial: 0, values: { normal: 0 } }, 'letter-spacing': { inherit: true, initial: 0, values: { normal: 0 } }, 'text-decoration': { inherit: false, initial: 'none', values: { 'none': 'none', 'underline': 'underline', 'overline': 'overline', 'line-through': 'line-through' } }, 'xml:space': { inherit: true, initial: 'default', css: 'white-space', values: { 'preserve': 'preserve', 'default': 'default', 'pre': 'preserve', 'pre-line': 'preserve', 'pre-wrap': 'preserve', 'nowrap': 'default' } }, 'marker-start': { inherit: true, initial: 'none' }, 'marker-mid': { inherit: true, initial: 'none' }, 'marker-end': { inherit: true, initial: 'none' }, 'opacity': { inherit: false, initial: 1 }, 'transform': { inherit: false, initial: [1, 0, 0, 1, 0, 0] }, 'display': { inherit: false, initial: 'inline', values: { 'none': 'none', 'inline': 'inline', 'block': 'inline' } }, 'clip-path': { inherit: false, initial: 'none' }, 'mask': { inherit: false, initial: 'none' }, 'overflow': { inherit: false, initial: 'hidden', values: { 'hidden': 'hidden', 'scroll': 'hidden', 'visible': 'visible' } } }; function docBeginGroup(bbox) { var group = new function PDFGroup() {}(); group.name = 'G' + (doc._groupCount = (doc._groupCount || 0) + 1); group.resources = doc.ref(); group.xobj = doc.ref({ Type: 'XObject', Subtype: 'Form', FormType: 1, BBox: bbox, Group: { S: 'Transparency', CS: 'DeviceRGB', I: true, K: false }, Resources: group.resources }); group.xobj.write(''); group.savedMatrix = doc._ctm; group.savedPage = doc.page; groupStack.push(group); doc._ctm = [1, 0, 0, 1, 0, 0]; doc.page = { width: doc.page.width, height: doc.page.height, write: function write(data) { group.xobj.write(data); }, fonts: {}, xobjects: {}, ext_gstates: {}, patterns: {} }; return group; } function docEndGroup(group) { if (group !== groupStack.pop()) { throw 'Group not matching'; } if (Object.keys(doc.page.fonts).length) { group.resources.data.Font = doc.page.fonts; } if (Object.keys(doc.page.xobjects).length) { group.resources.data.XObject = doc.page.xobjects; } if (Object.keys(doc.page.ext_gstates).length) { group.resources.data.ExtGState = doc.page.ext_gstates; } if (Object.keys(doc.page.patterns).length) { group.resources.data.Pattern = doc.page.patterns; } group.resources.end(); group.xobj.end(); doc._ctm = group.savedMatrix; doc.page = group.savedPage; } function docInsertGroup(group) { doc.page.xobjects[group.name] = group.xobj; doc.addContent('/' + group.name + ' Do'); } function docApplyMask(group, clip) { var name = 'M' + (doc._maskCount = (doc._maskCount || 0) + 1); var gstate = doc.ref({ Type: 'ExtGState', CA: 1, ca: 1, BM: 'Normal', SMask: { S: 'Luminosity', G: group.xobj, BC: clip ? [0, 0, 0] : [1, 1, 1] } }); gstate.end(); doc.page.ext_gstates[name] = gstate; doc.addContent('/' + name + ' gs'); } function docCreatePattern(group, dx, dy, matrix) { var pattern = new function PDFPattern() {}(); pattern.group = group; pattern.dx = dx; pattern.dy = dy; pattern.matrix = matrix || [1, 0, 0, 1, 0, 0]; return pattern; } function docUsePattern(pattern, stroke) { var name = 'P' + (doc._patternCount = (doc._patternCount || 0) + 1); var ref = doc.ref({ Type: 'Pattern', PatternType: 1, PaintType: 1, TilingType: 2, BBox: [0, 0, pattern.dx, pattern.dy], XStep: pattern.dx, YStep: pattern.dy, Matrix: multiplyMatrix(doc._ctm, pattern.matrix), Resources: { ProcSet: ['PDF', 'Text', 'ImageB', 'ImageC', 'ImageI'], XObject: function () { var temp = {}; temp[pattern.group.name] = pattern.group.xobj; return temp; }() } }); ref.write('/' + pattern.group.name + ' Do'); ref.end(); doc.page.patterns[name] = ref; if (stroke) { doc.addContent('/Pattern CS'); doc.addContent('/' + name + ' SCN'); } else { doc.addContent('/Pattern cs'); doc.addContent('/' + name + ' scn'); } } function docBeginText(font, size) { if (!doc.page.fonts[font.id]) { doc.page.fonts[font.id] = font.ref(); } doc.addContent('BT').addContent('/' + font.id + ' ' + size + ' Tf'); } function docSetTextMatrix(a, b, c, d, e, f) { doc.addContent(validateNumber(a) + ' ' + validateNumber(b) + ' ' + validateNumber(-c) + ' ' + validateNumber(-d) + ' ' + validateNumber(e) + ' ' + validateNumber(f) + ' Tm'); } function docSetTextMode(fill, stroke) { var mode = fill && stroke ? 2 : stroke ? 1 : fill ? 0 : 3; doc.addContent(mode + ' Tr'); } function docWriteGlyph(glyph) { doc.addContent('<' + glyph + '> Tj'); } function docEndText() { doc.addContent('ET'); } function docFillColor(color) { if (color[0].constructor.name === 'PDFPattern') { doc.fillOpacity(color[1]); docUsePattern(color[0], false); } else { doc.fillColor(color[0], color[1]); } } function docStrokeColor(color) { if (color[0].constructor.name === 'PDFPattern') { doc.strokeOpacity(color[1]); docUsePattern(color[0], true); } else { doc.strokeColor(color[0], color[1]); } } function docInsertLink(x, y, w, h, url) { var ref = doc.ref({ Type: 'Annot', Subtype: 'Link', Rect: [x, y, w, h], Border: [0, 0, 0], A: { S: 'URI', URI: new String(url) } }); ref.end(); links.push(ref); } function parseXml(xml) { var SvgNode = function SvgNode(tag, type, value, error) { this.error = error; this.nodeName = tag; this.nodeValue = value; this.nodeType = type; this.attributes = Object.create(null); this.childNodes = []; this.parentNode = null; this.id = ''; this.textContent = ''; this.classList = []; }; SvgNode.prototype.getAttribute = function (attr) { return this.attributes[attr] != null ? this.attributes[attr] : null; }; SvgNode.prototype.getElementById = function (id) { var result = null; (function recursive(node) { if (result) { return; } if (node.nodeType === 1) { if (node.id === id) { result = node; } for (var i = 0; i < node.childNodes.length; i++) { recursive(node.childNodes[i]); } } })(this); return result; }; SvgNode.prototype.getElementsByTagName = function (tag) { var result = []; (function recursive(node) { if (node.nodeType === 1) { if (node.nodeName === tag) { result.push(node); } for (var i = 0; i < node.childNodes.length; i++) { recursive(node.childNodes[i]); } } })(this); return result; }; var parser = new StringParser(xml.trim()), result, child, error = false; var recursive = function recursive() { var temp, child; if (temp = parser.match(/^<([\w:.-]+)\s*/, true)) { // Opening tag var node = new SvgNode(temp[1], 1, null, error); while (temp = parser.match(/^([\w:.-]+)(?:\s*=\s*"([^"]*)"|\s*=\s*'([^']*)')?\s*/, true)) { // Attribute var attr = temp[1], value = decodeEntities(temp[2] || temp[3] || ''); if (!node.attributes[attr]) { node.attributes[attr] = value; if (attr === 'id') { node.id = value; } if (attr === 'class') { node.classList = value.split(' '); } } else { warningCallback('parseXml: duplicate attribute "' + attr + '"'); error = true; } } if (parser.match(/^>/)) { // End of opening tag while (child = recursive()) { node.childNodes.push(child); child.parentNode = node; node.textContent += child.nodeType === 3 || child.nodeType === 4 ? child.nodeValue : child.textContent; } if (temp = parser.match(/^<\/([\w:.-]+)\s*>/, true)) { // Closing tag if (temp[1] === node.nodeName) { return node; } else { warningCallback('parseXml: tag not matching, opening "' + node.nodeName + '" & closing "' + temp[1] + '"'); error = true; return node; } } else { warningCallback('parseXml: tag not matching, opening "' + node.nodeName + '" & not closing'); error = true; return node; } } else if (parser.match(/^\/>/)) { // Self-closing tag return node; } else { warningCallback('parseXml: tag could not be parsed "' + node.nodeName + '"'); error = true; } } else if (temp = parser.match(/^/)) { // Comment return new SvgNode(null, 8, temp, error); } else if (temp = parser.match(/^<\?[\s\S]*?\?>/)) { // Processing instructions return new SvgNode(null, 7, temp, error); } else if (temp = parser.match(/^/)) { // Doctype return new SvgNode(null, 10, temp, error); } else if (temp = parser.match(/^/, true)) { // Cdata node return new SvgNode('#cdata-section', 4, temp[1], error); } else if (temp = parser.match(/^([^<]+)/, true)) { // Text node return new SvgNode('#text', 3, decodeEntities(temp[1]), error); } }; while (child = recursive()) { if (child.nodeType === 1 && !result) { result = child; } else if (child.nodeType === 1 || child.nodeType === 3 && child.nodeValue.trim() !== '') { warningCallback('parseXml: data after document end has been discarded'); } } if (parser.matchAll()) { warningCallback('parseXml: parsing error'); } return result; } ; function decodeEntities(str) { return str.replace(/&(?:#([0-9]+)|#[xX]([0-9A-Fa-f]+)|([0-9A-Za-z]+));/g, function (mt, m0, m1, m2) { if (m0) { return String.fromCharCode(parseInt(m0, 10)); } else if (m1) { return String.fromCharCode(parseInt(m1, 16)); } else if (m2 && Entities[m2]) { return String.fromCharCode(Entities[m2]); } else { return mt; } }); } function parseColor(raw) { var temp, result; raw = (raw || '').trim(); if (temp = NamedColors[raw]) { result = [temp.slice(), 1]; } else if (temp = raw.match(/^rgba\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9.]+)\s*\)$/i)) { temp[1] = parseInt(temp[1]); temp[2] = parseInt(temp[2]); temp[3] = parseInt(temp[3]); temp[4] = parseFloat(temp[4]); if (temp[1] < 256 && temp[2] < 256 && temp[3] < 256 && temp[4] <= 1) { result = [temp.slice(1, 4), temp[4]]; } } else if (temp = raw.match(/^rgb\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)$/i)) { temp[1] = parseInt(temp[1]); temp[2] = parseInt(temp[2]); temp[3] = parseInt(temp[3]); if (temp[1] < 256 && temp[2] < 256 && temp[3] < 256) { result = [temp.slice(1, 4), 1]; } } else if (temp = raw.match(/^rgb\(\s*([0-9.]+)%\s*,\s*([0-9.]+)%\s*,\s*([0-9.]+)%\s*\)$/i)) { temp[1] = 2.55 * parseFloat(temp[1]); temp[2] = 2.55 * parseFloat(temp[2]); temp[3] = 2.55 * parseFloat(temp[3]); if (temp[1] < 256 && temp[2] < 256 && temp[3] < 256) { result = [temp.slice(1, 4), 1]; } } else if (temp = raw.match(/^#([0-9a-f]{2})([0-9a-f]{2})([0-9a-f]{2})$/i)) { result = [[parseInt(temp[1], 16), parseInt(temp[2], 16), parseInt(temp[3], 16)], 1]; } else if (temp = raw.match(/^#([0-9a-f])([0-9a-f])([0-9a-f])$/i)) { result = [[0x11 * parseInt(temp[1], 16), 0x11 * parseInt(temp[2], 16), 0x11 * parseInt(temp[3], 16)], 1]; } return colorCallback ? colorCallback(result, raw) : result; } function opacityToColor(color, opacity, isMask) { var newColor = color[0].slice(), newOpacity = color[1] * opacity; if (isMask) { for (var i = 0; i < color.length; i++) { newColor[i] *= newOpacity; } return [newColor, 1]; } else { return [newColor, newOpacity]; } } function multiplyMatrix() { function multiply(a, b) { return [a[0] * b[0] + a[2] * b[1], a[1] * b[0] + a[3] * b[1], a[0] * b[2] + a[2] * b[3], a[1] * b[2] + a[3] * b[3], a[0] * b[4] + a[2] * b[5] + a[4], a[1] * b[4] + a[3] * b[5] + a[5]]; } var result = arguments[0]; for (var i = 1; i < arguments.length; i++) { result = multiply(result, arguments[i]); } return result; } function transformPoint(p, m) { return [m[0] * p[0] + m[2] * p[1] + m[4], m[1] * p[0] + m[3] * p[1] + m[5]]; } function getGlobalMatrix() { var ctm = doc._ctm; for (var i = groupStack.length - 1; i >= 0; i--) { ctm = multiplyMatrix(groupStack[i].savedMatrix, ctm); } return ctm; } function getPageBBox() { return new SvgShape().M(0, 0).L(doc.page.width, 0).L(doc.page.width, doc.page.height).L(0, doc.page.height).transform(inverseMatrix(getGlobalMatrix())).getBoundingBox(); } function inverseMatrix(m) { var dt = m[0] * m[3] - m[1] * m[2]; 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[4] - m[0] * m[5]) / dt]; } function validateMatrix(m) { var m0 = validateNumber(m[0]), m1 = validateNumber(m[1]), m2 = validateNumber(m[2]), m3 = validateNumber(m[3]), m4 = validateNumber(m[4]), m5 = validateNumber(m[5]); if (isNotEqual(m0 * m3 - m1 * m2, 0)) { return [m0, m1, m2, m3, m4, m5]; } } function solveEquation(curve) { var a = curve[2] || 0, b = curve[1] || 0, c = curve[0] || 0; if (isEqual(a, 0) && isEqual(b, 0)) { return []; } else if (isEqual(a, 0)) { return [-c / b]; } else { var d = b * b - 4 * a * c; if (isNotEqual(d, 0) && d > 0) { return [(-b + Math.sqrt(d)) / (2 * a), (-b - Math.sqrt(d)) / (2 * a)]; } else if (isEqual(d, 0)) { return [-b / (2 * a)]; } else { return []; } } } function getCurveValue(t, curve) { return (curve[0] || 0) + (curve[1] || 0) * t + (curve[2] || 0) * t * t + (curve[3] || 0) * t * t * t; } function isEqual(number, ref) { return Math.abs(number - ref) < 1e-10; } function isNotEqual(number, ref) { return Math.abs(number - ref) >= 1e-10; } function validateNumber(n) { return n > -1e21 && n < 1e21 ? Math.round(n * 1e6) / 1e6 : 0; } function isArrayLike(v) { return typeof v === 'object' && v !== null && typeof v.length === 'number'; } function parseTranform(v) { var parser = new StringParser((v || '').trim()), result = [1, 0, 0, 1, 0, 0], temp; while (temp = parser.match(/^([A-Za-z]+)\s*[(]([^(]+)[)]/, true)) { var func = temp[1], nums = [], parser2 = new StringParser(temp[2].trim()), temp2 = void 0; while (temp2 = parser2.matchNumber()) { nums.push(Number(temp2)); parser2.matchSeparator(); } if (func === 'matrix' && nums.length === 6) { result = multiplyMatrix(result, [nums[0], nums[1], nums[2], nums[3], nums[4], nums[5]]); } else if (func === 'translate' && nums.length === 2) { result = multiplyMatrix(result, [1, 0, 0, 1, nums[0], nums[1]]); } else if (func === 'translate' && nums.length === 1) { result = multiplyMatrix(result, [1, 0, 0, 1, nums[0], 0]); } else if (func === 'scale' && nums.length === 2) { result = multiplyMatrix(result, [nums[0], 0, 0, nums[1], 0, 0]); } else if (func === 'scale' && nums.length === 1) { result = multiplyMatrix(result, [nums[0], 0, 0, nums[0], 0, 0]); } else if (func === 'rotate' && nums.length === 3) { var a = nums[0] * Math.PI / 180; result = multiplyMatrix(result, [1, 0, 0, 1, nums[1], nums[2]], [Math.cos(a), Math.sin(a), -Math.sin(a), Math.cos(a), 0, 0], [1, 0, 0, 1, -nums[1], -nums[2]]); } else if (func === 'rotate' && nums.length === 1) { var _a = nums[0] * Math.PI / 180; result = multiplyMatrix(result, [Math.cos(_a), Math.sin(_a), -Math.sin(_a), Math.cos(_a), 0, 0]); } else if (func === 'skewX' && nums.length === 1) { var _a2 = nums[0] * Math.PI / 180; result = multiplyMatrix(result, [1, 0, Math.tan(_a2), 1, 0, 0]); } else if (func === 'skewY' && nums.length === 1) { var _a3 = nums[0] * Math.PI / 180; result = multiplyMatrix(result, [1, Math.tan(_a3), 0, 1, 0, 0]); } else { return; } parser.matchSeparator(); } if (parser.matchAll()) { return; } return result; } function parseAspectRatio(aspectRatio, availWidth, availHeight, elemWidth, elemHeight, initAlign) { var temp = (aspectRatio || '').trim().match(/^(none)$|^x(Min|Mid|Max)Y(Min|Mid|Max)(?:\s+(meet|slice))?$/) || [], ratioType = temp[1] || temp[4] || 'meet', xAlign = temp[2] || 'Mid', yAlign = temp[3] || 'Mid', scaleX = availWidth / elemWidth, scaleY = availHeight / elemHeight, dx = { 'Min': 0, 'Mid': 0.5, 'Max': 1 }[xAlign] - (initAlign || 0), dy = { 'Min': 0, 'Mid': 0.5, 'Max': 1 }[yAlign] - (initAlign || 0); if (ratioType === 'slice') { scaleY = scaleX = Math.max(scaleX, scaleY); } else if (ratioType === 'meet') { scaleY = scaleX = Math.min(scaleX, scaleY); } return [scaleX, 0, 0, scaleY, dx * (availWidth - elemWidth * scaleX), dy * (availHeight - elemHeight * scaleY)]; } function parseStyleAttr(v) { var result = Object.create(null); v = (v || '').trim().split(/;/); for (var i = 0; i < v.length; i++) { var key = (v[i].split(':')[0] || '').trim(), value = (v[i].split(':')[1] || '').trim(); if (key) { result[key] = value; } } if (result['marker']) { if (!result['marker-start']) { result['marker-start'] = result['marker']; } if (!result['marker-mid']) { result['marker-mid'] = result['marker']; } if (!result['marker-end']) { result['marker-end'] = result['marker']; } } if (result['font']) { var fontFamily = null, fontSize = null, fontStyle = "normal", fontWeight = "normal", fontVariant = "normal"; var parts = result['font'].split(/\s+/); for (var _i = 0; _i < parts.length; _i++) { switch (parts[_i]) { case "normal": break; case "italic": case "oblique": fontStyle = parts[_i]; break; case "small-caps": fontVariant = parts[_i]; break; case "bold": case "bolder": case "lighter": case "100": case "200": case "300": case "400": case "500": case "600": case "700": case "800": case "900": fontWeight = parts[_i]; break; default: if (!fontSize) { fontSize = parts[_i].split('/')[0]; } else { if (!fontFamily) { fontFamily = parts[_i]; } else { fontFamily += ' ' + parts[_i]; } } break; } } if (!result['font-style']) { result['font-style'] = fontStyle; } if (!result['font-variant']) { result['font-variant'] = fontVariant; } if (!result['font-weight']) { result['font-weight'] = fontWeight; } if (!result['font-size']) { result['font-size'] = fontSize; } if (!result['font-family']) { result['font-family'] = fontFamily; } } return result; } function parseSelector(v) { var parts = v.split(/(?=[.#])/g), ids = [], classes = [], tags = [], temp; for (var i = 0; i < parts.length; i++) { if (temp = parts[i].match(/^[#]([_A-Za-z0-9-]+)$/)) { ids.push(temp[1]); } else if (temp = parts[i].match(/^[.]([_A-Za-z0-9-]+)$/)) { classes.push(temp[1]); } else if (temp = parts[i].match(/^([_A-Za-z0-9-]+)$/)) { tags.push(temp[1]); } else if (parts[i] !== '*') { return; } } return { tags: tags, ids: ids, classes: classes, specificity: ids.length * 10000 + classes.length * 100 + tags.length }; } function parseStyleSheet(v) { var parser = new StringParser(v.trim()), rules = [], rule; while (rule = parser.match(/^\s*([^\{\}]*?)\s*\{([^\{\}]*?)\}/, true)) { var selectors = rule[1].split(/\s*,\s*/g), css = parseStyleAttr(rule[2]); for (var i = 0; i < selectors.length; i++) { var selector = parseSelector(selectors[i]); if (selector) { rules.push({ selector: selector, css: css }); } } } return rules; } function matchesSelector(elem, selector) { if (elem.nodeType !== 1) { return false; } for (var i = 0; i < selector.tags.length; i++) { if (selector.tags[i] !== elem.nodeName) { return false; } } for (var _i2 = 0; _i2 < selector.ids.length; _i2++) { if (selector.ids[_i2] !== elem.id) { return false; } } for (var _i3 = 0; _i3 < selector.classes.length; _i3++) { if (elem.classList.indexOf(selector.classes[_i3]) === -1) { return false; } } return true; } function getStyle(elem) { var result = Object.create(null); var specificities = Object.create(null); for (var i = 0; i < styleRules.length; i++) { var rule = styleRules[i]; if (matchesSelector(elem, rule.selector)) { for (var key in rule.css) { if (!(specificities[key] > rule.selector.specificity)) { result[key] = rule.css[key]; specificities[key] = rule.selector.specificity; } } } } return result; } function combineArrays(array1, array2) { return array1.concat(array2.slice(array1.length)); } function getAscent(font, size) { return Math.max(font.ascender, (font.bbox[3] || font.bbox.maxY) * (font.scale || 1)) * size / 1000; } function getDescent(font, size) { return Math.min(font.descender, (font.bbox[1] || font.bbox.minY) * (font.scale || 1)) * size / 1000; } function getXHeight(font, size) { return (font.xHeight || 0.5 * (font.ascender - font.descender)) * size / 1000; } function getBaseline(font, size, baseline, shift) { var dy1, dy2; switch (baseline) { case 'middle': dy1 = 0.5 * getXHeight(font, size); break; case 'central': dy1 = 0.5 * (getDescent(font, size) + getAscent(font, size)); break; case 'after-edge': case 'text-after-edge': dy1 = getDescent(font, size); break; case 'alphabetic': case 'auto': case 'baseline': dy1 = 0; break; case 'mathematical': dy1 = 0.5 * getAscent(font, size); break; case 'hanging': dy1 = 0.8 * getAscent(font, size); break; case 'before-edge': case 'text-before-edge': dy1 = getAscent(font, size); break; default: dy1 = 0; break; } switch (shift) { case 'baseline': dy2 = 0; break; case 'super': dy2 = 0.6 * size; break; case 'sub': dy2 = -0.6 * size; break; default: dy2 = shift; break; } return dy1 - dy2; } function getTextPos(font, size, text) { var encoded = font.encode('' + text), hex = encoded[0], pos = encoded[1], data = []; for (var i = 0; i < hex.length; i++) { var unicode = font.unicode ? font.unicode[parseInt(hex[i], 16)] : [text.charCodeAt(i)]; data.push({ glyph: hex[i], unicode: unicode, width: pos[i].advanceWidth * size / 1000, xOffset: pos[i].xOffset * size / 1000, yOffset: pos[i].yOffset * size / 1000, xAdvance: pos[i].xAdvance * size / 1000, yAdvance: pos[i].yAdvance * size / 1000 }); } return data; } function createSVGElement(obj, inherits) { switch (obj.nodeName) { case 'use': return new SvgElemUse(obj, inherits); case 'symbol': return new SvgElemSymbol(obj, inherits); case 'g': return new SvgElemGroup(obj, inherits); case 'a': return new SvgElemLink(obj, inherits); case 'svg': return new SvgElemSvg(obj, inherits); case 'image': return new SVGElemImage(obj, inherits); case 'rect': return new SvgElemRect(obj, inherits); case 'circle': return new SvgElemCircle(obj, inherits); case 'ellipse': return new SvgElemEllipse(obj, inherits); case 'line': return new SvgElemLine(obj, inherits); case 'polyline': return new SvgElemPolyline(obj, inherits); case 'polygon': return new SvgElemPolygon(obj, inherits); case 'path': return new SvgElemPath(obj, inherits); case 'text': return new SvgElemText(obj, inherits); case 'tspan': return new SvgElemTspan(obj, inherits); case 'textPath': return new SvgElemTextPath(obj, inherits); case '#text': case '#cdata-section': return new SvgElemTextNode(obj, inherits); default: return new SvgElem(obj, inherits); } } var StringParser = function StringParser(str) { this.match = function (exp, all) { var temp = str.match(exp); if (!temp || temp.index !== 0) { return; } str = str.substring(temp[0].length); return all ? temp : temp[0]; }; this.matchSeparator = function () { return this.match(/^(?:\s*,\s*|\s*|)/); }; this.matchSpace = function () { return this.match(/^(?:\s*)/); }; this.matchLengthUnit = function () { return this.match(/^(?:px|pt|cm|mm|in|pc|em|ex|%|)/); }; this.matchNumber = function () { return this.match(/^(?:[-+]?(?:[0-9]+[.][0-9]+|[0-9]+[.]|[.][0-9]+|[0-9]+)(?:[eE][-+]?[0-9]+)?)/); }; this.matchAll = function () { return this.match(/^[\s\S]+/); }; }; var BezierSegment = function BezierSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y) { var divisions = 6 * precision; var equationX = [p1x, -3 * p1x + 3 * c1x, 3 * p1x - 6 * c1x + 3 * c2x, -p1x + 3 * c1x - 3 * c2x + p2x]; var equationY = [p1y, -3 * p1y + 3 * c1y, 3 * p1y - 6 * c1y + 3 * c2y, -p1y + 3 * c1y - 3 * c2y + p2y]; var derivativeX = [-3 * p1x + 3 * c1x, 6 * p1x - 12 * c1x + 6 * c2x, -3 * p1x + 9 * c1x - 9 * c2x + 3 * p2x]; var derivativeY = [-3 * p1y + 3 * c1y, 6 * p1y - 12 * c1y + 6 * c2y, -3 * p1y + 9 * c1y - 9 * c2y + 3 * p2y]; var lengthMap = [0]; for (var i = 1; i <= divisions; i++) { var t = (i - 0.5) / divisions; var dx = getCurveValue(t, derivativeX) / divisions, dy = getCurveValue(t, derivativeY) / divisions, l = Math.sqrt(dx * dx + dy * dy); lengthMap[i] = lengthMap[i - 1] + l; } this.totalLength = lengthMap[divisions]; this.startPoint = [p1x, p1y, isEqual(p1x, c1x) && isEqual(p1y, c1y) ? Math.atan2(c2y - c1y, c2x - c1x) : Math.atan2(c1y - p1y, c1x - p1x)]; this.endPoint = [p2x, p2y, isEqual(c2x, p2x) && isEqual(c2y, p2y) ? Math.atan2(c2y - c1y, c2x - c1x) : Math.atan2(p2y - c2y, p2x - c2x)]; this.getBoundingBox = function () { var temp; var minX = getCurveValue(0, equationX), minY = getCurveValue(0, equationY), maxX = getCurveValue(1, equationX), maxY = getCurveValue(1, equationY); if (minX > maxX) { temp = maxX; maxX = minX; minX = temp; } if (minY > maxY) { temp = maxY; maxY = minY; minY = temp; } var rootsX = solveEquation(derivativeX); for (var _i4 = 0; _i4 < rootsX.length; _i4++) { if (rootsX[_i4] >= 0 && rootsX[_i4] <= 1) { var _x = getCurveValue(rootsX[_i4], equationX); if (_x < minX) { minX = _x; } if (_x > maxX) { maxX = _x; } } } var rootsY = solveEquation(derivativeY); for (var _i5 = 0; _i5 < rootsY.length; _i5++) { if (rootsY[_i5] >= 0 && rootsY[_i5] <= 1) { var _y = getCurveValue(rootsY[_i5], equationY); if (_y < minY) { minY = _y; } if (_y > maxY) { maxY = _y; } } } return [minX, minY, maxX, maxY]; }; this.getPointAtLength = function (l) { if (isEqual(l, 0)) { return this.startPoint; } if (isEqual(l, this.totalLength)) { return this.endPoint; } if (l < 0 || l > this.totalLength) { return; } for (var _i6 = 1; _i6 <= divisions; _i6++) { var l1 = lengthMap[_i6 - 1], l2 = lengthMap[_i6]; if (l1 <= l && l <= l2) { var _t = (_i6 - (l2 - l) / (l2 - l1)) / divisions, _x2 = getCurveValue(_t, equationX), _y2 = getCurveValue(_t, equationY), _dx = getCurveValue(_t, derivativeX), _dy = getCurveValue(_t, derivativeY); return [_x2, _y2, Math.atan2(_dy, _dx)]; } } }; }; var LineSegment = function LineSegment(p1x, p1y, p2x, p2y) { this.totalLength = Math.sqrt((p2x - p1x) * (p2x - p1x) + (p2y - p1y) * (p2y - p1y)); this.startPoint = [p1x, p1y, Math.atan2(p2y - p1y, p2x - p1x)]; this.endPoint = [p2x, p2y, Math.atan2(p2y - p1y, p2x - p1x)]; this.getBoundingBox = function () { return [Math.min(this.startPoint[0], this.endPoint[0]), Math.min(this.startPoint[1], this.endPoint[1]), Math.max(this.startPoint[0], this.endPoint[0]), Math.max(this.startPoint[1], this.endPoint[1])]; }; this.getPointAtLength = function (l) { if (l >= 0 && l <= this.totalLength) { var r = l / this.totalLength || 0, _x3 = this.startPoint[0] + r * (this.endPoint[0] - this.startPoint[0]), _y3 = this.startPoint[1] + r * (this.endPoint[1] - this.startPoint[1]); return [_x3, _y3, this.startPoint[2]]; } }; }; var SvgShape = function SvgShape() { this.pathCommands = []; this.pathSegments = []; this.startPoint = null; this.endPoint = null; this.totalLength = 0; var startX = 0, startY = 0, currX = 0, currY = 0, lastCom, lastCtrlX, lastCtrlY; this.move = function (x, y) { startX = currX = x; startY = currY = y; return null; }; this.line = function (x, y) { var segment = new LineSegment(currX, currY, x, y); currX = x; currY = y; return segment; }; this.curve = function (c1x, c1y, c2x, c2y, x, y) { var segment = new BezierSegment(currX, currY, c1x, c1y, c2x, c2y, x, y); currX = x; currY = y; return segment; }; this.close = function () { var segment = new LineSegment(currX, currY, startX, startY); currX = startX; currY = startY; return segment; }; this.addCommand = function (data) { this.pathCommands.push(data); var segment = this[data[0]].apply(this, data.slice(3)); if (segment) { segment.hasStart = data[1]; segment.hasEnd = data[2]; this.startPoint = this.startPoint || segment.startPoint; this.endPoint = segment.endPoint; this.pathSegments.push(segment); this.totalLength += segment.totalLength; } }; this.M = function (x, y) { this.addCommand(['move', true, true, x, y]); lastCom = 'M'; return this; }; this.m = function (x, y) { return this.M(currX + x, currY + y); }; this.Z = this.z = function () { this.addCommand(['close', true, true]); lastCom = 'Z'; return this; }; this.L = function (x, y) { this.addCommand(['line', true, true, x, y]); lastCom = 'L'; return this; }; this.l = function (x, y) { return this.L(currX + x, currY + y); }; this.H = function (x) { return this.L(x, currY); }; this.h = function (x) { return this.L(currX + x, currY); }; this.V = function (y) { return this.L(currX, y); }; this.v = function (y) { return this.L(currX, currY + y); }; this.C = function (c1x, c1y, c2x, c2y, x, y) { this.addCommand(['curve', true, true, c1x, c1y, c2x, c2y, x, y]); lastCom = 'C'; lastCtrlX = c2x; lastCtrlY = c2y; return this; }; this.c = function (c1x, c1y, c2x, c2y, x, y) { return this.C(currX + c1x, currY + c1y, currX + c2x, currY + c2y, currX + x, currY + y); }; this.S = function (c1x, c1y, x, y) { return this.C(currX + (lastCom === 'C' ? currX - lastCtrlX : 0), currY + (lastCom === 'C' ? currY - lastCtrlY : 0), c1x, c1y, x, y); }; this.s = function (c1x, c1y, x, y) { return this.C(currX + (lastCom === 'C' ? currX - lastCtrlX : 0), currY + (lastCom === 'C' ? currY - lastCtrlY : 0), currX + c1x, currY + c1y, currX + x, currY + y); }; this.Q = function (cx, cy, x, y) { var c1x = currX + 2 / 3 * (cx - currX), c1y = currY + 2 / 3 * (cy - currY), c2x = x + 2 / 3 * (cx - x), c2y = y + 2 / 3 * (cy - y); this.addCommand(['curve', true, true, c1x, c1y, c2x, c2y, x, y]); lastCom = 'Q'; lastCtrlX = cx; lastCtrlY = cy; return this; }; this.q = function (c1x, c1y, x, y) { return this.Q(currX + c1x, currY + c1y, currX + x, currY + y); }; this.T = function (x, y) { return this.Q(currX + (lastCom === 'Q' ? currX - lastCtrlX : 0), currY + (lastCom === 'Q' ? currY - lastCtrlY : 0), x, y); }; this.t = function (x, y) { return this.Q(currX + (lastCom === 'Q' ? currX - lastCtrlX : 0), currY + (lastCom === 'Q' ? currY - lastCtrlY : 0), currX + x, currY + y); }; this.A = function (rx, ry, fi, fa, fs, x, y) { if (isEqual(rx, 0) || isEqual(ry, 0)) { this.addCommand(['line', true, true, x, y]); } else { fi = fi * (Math.PI / 180); rx = Math.abs(rx); ry = Math.abs(ry); fa = 1 * !!fa; fs = 1 * !!fs; var x1 = Math.cos(fi) * (currX - x) / 2 + Math.sin(fi) * (currY - y) / 2, y1 = Math.cos(fi) * (currY - y) / 2 - Math.sin(fi) * (currX - x) / 2, lambda = x1 * x1 / (rx * rx) + y1 * y1 / (ry * ry); if (lambda > 1) { rx *= Math.sqrt(lambda); ry *= Math.sqrt(lambda); } var r = Math.sqrt(Math.max(0, rx * rx * ry * ry - rx * rx * y1 * y1 - ry * ry * x1 * x1) / (rx * rx * y1 * y1 + ry * ry * x1 * x1)), x2 = (fa === fs ? -1 : 1) * r * rx * y1 / ry, y2 = (fa === fs ? 1 : -1) * r * ry * x1 / rx; var cx = Math.cos(fi) * x2 - Math.sin(fi) * y2 + (currX + x) / 2, cy = Math.sin(fi) * x2 + Math.cos(fi) * y2 + (currY + y) / 2, th1 = Math.atan2((y1 - y2) / ry, (x1 - x2) / rx), th2 = Math.atan2((-y1 - y2) / ry, (-x1 - x2) / rx); if (fs === 0 && th2 - th1 > 0) { th2 -= 2 * Math.PI; } else if (fs === 1 && th2 - th1 < 0) { th2 += 2 * Math.PI; } var segms = Math.ceil(Math.abs(th2 - th1) / (Math.PI / precision)); for (var i = 0; i < segms; i++) { var th3 = th1 + i * (th2 - th1) / segms, th4 = th1 + (i + 1) * (th2 - th1) / segms, t = 4 / 3 * Math.tan((th4 - th3) / 4); var c1x = cx + Math.cos(fi) * rx * (Math.cos(th3) - t * Math.sin(th3)) - Math.sin(fi) * ry * (Math.sin(th3) + t * Math.cos(th3)), c1y = cy + Math.sin(fi) * rx * (Math.cos(th3) - t * Math.sin(th3)) + Math.cos(fi) * ry * (Math.sin(th3) + t * Math.cos(th3)), c2x = cx + Math.cos(fi) * rx * (Math.cos(th4) + t * Math.sin(th4)) - Math.sin(fi) * ry * (Math.sin(th4) - t * Math.cos(th4)), c2y = cy + Math.sin(fi) * rx * (Math.cos(th4) + t * Math.sin(th4)) + Math.cos(fi) * ry * (Math.sin(th4) - t * Math.cos(th4)), endX = cx + Math.cos(fi) * rx * Math.cos(th4) - Math.sin(fi) * ry * Math.sin(th4), endY = cy + Math.sin(fi) * rx * Math.cos(th4) + Math.cos(fi) * ry * Math.sin(th4); this.addCommand(['curve', i === 0, i === segms - 1, c1x, c1y, c2x, c2y, endX, endY]); } } lastCom = 'A'; return this; }; this.a = function (rx, ry, fi, fa, fs, x, y) { return this.A(rx, ry, fi, fa, fs, currX + x, currY + y); }; this.path = function (d) { var command, value, temp, parser = new StringParser((d || '').trim()); while (command = parser.match(/^[astvzqmhlcASTVZQMHLC]/)) { parser.matchSeparator(); var values = []; while (value = PathFlags[command + values.length] ? parser.match(/^[01]/) : parser.matchNumber()) { parser.matchSeparator(); if (values.length === PathArguments[command]) { this[command].apply(this, values); values = []; if (command === 'M') { command = 'L'; } else if (command === 'm') { command = 'l'; } } values.push(Number(value)); } if (values.length === PathArguments[command]) { this[command].apply(this, values); } else { warningCallback('SvgPath: command ' + command + ' with ' + values.length + ' numbers'); return; } } if (temp = parser.matchAll()) { warningCallback('SvgPath: unexpected string ' + temp); } return this; }; this.getBoundingBox = function () { var bbox = [Infinity, Infinity, -Infinity, -Infinity]; function addBounds(bbox1) { if (bbox1[0] < bbox[0]) { bbox[0] = bbox1[0]; } if (bbox1[2] > bbox[2]) { bbox[2] = bbox1[2]; } if (bbox1[1] < bbox[1]) { bbox[1] = bbox1[1]; } if (bbox1[3] > bbox[3]) { bbox[3] = bbox1[3]; } } for (var i = 0; i < this.pathSegments.length; i++) { addBounds(this.pathSegments[i].getBoundingBox()); } if (bbox[0] === Infinity) { bbox[0] = 0; } if (bbox[1] === Infinity) { bbox[1] = 0; } if (bbox[2] === -Infinity) { bbox[2] = 0; } if (bbox[3] === -Infinity) { bbox[3] = 0; } return bbox; }; this.getPointAtLength = function (l) { if (l >= 0 && l <= this.totalLength) { var temp; for (var i = 0; i < this.pathSegments.length; i++) { if (temp = this.pathSegments[i].getPointAtLength(l)) { return temp; } l -= this.pathSegments[i].totalLength; } return this.endPoint; } }; this.transform = function (m) { this.pathSegments = []; this.startPoint = null; this.endPoint = null; this.totalLength = 0; for (var i = 0; i < this.pathCommands.length; i++) { var data = this.pathCommands.shift(); for (var j = 3; j < data.length; j += 2) { var p = transformPoint([data[j], data[j + 1]], m); data[j] = p[0]; data[j + 1] = p[1]; } this.addCommand(data); } return this; }; this.mergeShape = function (shape) { for (var i = 0; i < shape.pathCommands.length; i++) { this.addCommand(shape.pathCommands[i].slice()); } return this; }; this.clone = function () { return new SvgShape().mergeShape(this); }; this.insertInDocument = function () { for (var i = 0; i < this.pathCommands.length; i++) { var command = this.pathCommands[i][0], values = this.pathCommands[i].slice(3); switch (command) { case 'move': doc.moveTo(values[0], values[1]); break; case 'line': doc.lineTo(values[0], values[1]); break; case 'curve': doc.bezierCurveTo(values[0], values[1], values[2], values[3], values[4], values[5]); break; case 'close': doc.closePath(); break; } } }; this.getSubPaths = function () { var subPaths = [], shape = new SvgShape(); for (var i = 0; i < this.pathCommands.length; i++) { var data = this.pathCommands[i], command = this.pathCommands[i][0]; if (command === 'move' && i !== 0) { subPaths.push(shape); shape = new SvgShape(); } shape.addCommand(data); } subPaths.push(shape); return subPaths; }; this.getMarkers = function () { var markers = [], subPaths = this.getSubPaths(); for (var i = 0; i < subPaths.length; i++) { var subPath = subPaths[i], subPathMarkers = []; for (var j = 0; j < subPath.pathSegments.length; j++) { var segment = subPath.pathSegments[j]; if (isNotEqual(segment.totalLength, 0) || j === 0 || j === subPath.pathSegments.length - 1) { if (segment.hasStart) { var startMarker = segment.getPointAtLength(0), prevEndMarker = subPathMarkers.pop(); if (prevEndMarker) { startMarker[2] = 0.5 * (prevEndMarker[2] + startMarker[2]); } subPathMarkers.push(startMarker); } if (segment.hasEnd) { var endMarker = segment.getPointAtLength(segment.totalLength); subPathMarkers.push(endMarker); } } } markers = markers.concat(subPathMarkers); } return markers; }; }; var SvgElem = function SvgElem(obj, inherits) { var styleCache = Object.create(null); var childrenCache = null; this.name = obj.nodeName; this.isOuterElement = obj === svg || !obj.parentNode; this.inherits = inherits || (!this.isOuterElement ? createSVGElement(obj.parentNode, null) : null); this.stack = this.inherits ? this.inherits.stack.concat(obj) : [obj]; this.style = parseStyleAttr(typeof obj.getAttribute === 'function' && obj.getAttribute('style')); this.css = useCSS ? getComputedStyle(obj) : getStyle(obj); this.allowedChildren = []; this.attr = function (key) { if (typeof obj.getAttribute === 'function') { return obj.getAttribute(key); } }; this.resolveUrl = function (value) { var temp = (value || '').match(/^\s*(?:url\("(.*)#(.*)"\)|url\('(.*)#(.*)'\)|url\((.*)#(.*)\)|(.*)#(.*))\s*$/) || []; var file = temp[1] || temp[3] || temp[5] || temp[7], id = temp[2] || temp[4] || temp[6] || temp[8]; if (id) { if (!file) { var svgObj = svg.getElementById(id); if (svgObj) { if (this.stack.indexOf(svgObj) === -1) { return svgObj; } else { warningCallback('SVGtoPDF: loop of circular references for id "' + id + '"'); return; } } } if (documentCallback) { var svgs = documentCache[file]; if (!svgs) { svgs = documentCallback(file); if (!isArrayLike(svgs)) { svgs = [svgs]; } for (var i = 0; i < svgs.length; i++) { if (typeof svgs[i] === 'string') { svgs[i] = parseXml(svgs[i]); } } documentCache[file] = svgs; } for (var _i7 = 0; _i7 < svgs.length; _i7++) { var _svgObj = svgs[_i7].getElementById(id); if (_svgObj) { if (this.stack.indexOf(_svgObj) === -1) { return _svgObj; } else { warningCallback('SVGtoPDF: loop of circular references for id "' + file + '#' + id + '"'); return; } } } } } }; this.computeUnits = function (value, unit, percent, isFontSize) { if (unit === '%') { return parseFloat(value) / 100 * (isFontSize || percent != null ? percent : this.getViewport()); } else if (unit === 'ex' || unit === 'em') { return value * { 'em': 1, 'ex': 0.5 }[unit] * (isFontSize ? percent : this.get('font-size')); } else { return value * { '': 1, 'px': 1, 'pt': 96 / 72, 'cm': 96 / 2.54, 'mm': 96 / 25.4, 'in': 96, 'pc': 96 / 6 }[unit]; } }; this.computeLength = function (value, percent, initial, isFontSize) { var parser = new StringParser((value || '').trim()), temp1, temp2; if (typeof (temp1 = parser.matchNumber()) === 'string' && typeof (temp2 = parser.matchLengthUnit()) === 'string' && !parser.matchAll()) { return this.computeUnits(temp1, temp2, percent, isFontSize); } return initial; }; this.computeLengthList = function (value, percent, strict) { var parser = new StringParser((value || '').trim()), result = [], temp1, temp2; while (typeof (temp1 = parser.matchNumber()) === 'string' && typeof (temp2 = parser.matchLengthUnit()) === 'string') { result.push(this.computeUnits(temp1, temp2, percent)); parser.matchSeparator(); } if (strict && parser.matchAll()) { return; } return result; }; this.getLength = function (key, percent, initial) { return this.computeLength(this.attr(key), percent, initial); }; this.getLengthList = function (key, percent) { return this.computeLengthList(this.attr(key), percent); }; this.getUrl = function (key) { return this.resolveUrl(this.attr(key)); }; this.getNumberList = function (key) { var parser = new StringParser((this.attr(key) || '').trim()), result = [], temp; while (temp = parser.matchNumber()) { result.push(Number(temp)); parser.matchSeparator(); } result.error = parser.matchAll(); return result; }; this.getViewbox = function (key, initial) { var viewBox = this.getNumberList(key); if (viewBox.length === 4 && viewBox[2] >= 0 && viewBox[3] >= 0) { return viewBox; } return initial; }; this.getPercent = function (key, initial) { var value = this.attr(key); var parser = new StringParser((value || '').trim()), temp1, temp2; var number = parser.matchNumber(); if (!number) { return initial; } if (parser.match('%')) { number *= 0.01; } if (parser.matchAll()) { return initial; } return Math.max(0, Math.min(1, number)); }; this.chooseValue = function (args) { for (var i = 0; i < arguments.length; i++) { if (arguments[i] != null && arguments[i] === arguments[i]) { return arguments[i]; } } return arguments[arguments.length - 1]; }; this.get = function (key) { if (styleCache[key] !== undefined) { return styleCache[key]; } var keyInfo = Properties[key] || {}, value, result; for (var i = 0; i < 3; i++) { switch (i) { case 0: if (key !== 'transform') { // the CSS transform behaves strangely value = this.css[keyInfo.css || key]; } break; case 1: value = this.style[key]; break; case 2: value = this.attr(key); break; } if (value === 'inherit') { result = this.inherits ? this.inherits.get(key) : keyInfo.initial; if (result != null) { return styleCache[key] = result; } } if (keyInfo.values != null) { result = keyInfo.values[value]; if (result != null) { return styleCache[key] = result; } } if (value != null) { var parsed = void 0; switch (key) { case 'font-size': result = this.computeLength(value, this.inherits ? this.inherits.get(key) : keyInfo.initial, undefined, true); break; case 'baseline-shift': result = this.computeLength(value, this.get('font-size')); break; case 'font-family': result = value || undefined; break; case 'opacity': case 'stroke-opacity': case 'fill-opacity': case 'stop-opacity': parsed = parseFloat(value); if (!isNaN(parsed)) { result = Math.max(0, Math.min(1, parsed)); } break; case 'transform': result = parseTranform(value); break; case 'stroke-dasharray': if (value === 'none') { result = []; } else if (parsed = this.computeLengthList(value, this.getViewport(), true)) { var sum = 0, error = false; for (var j = 0; j < parsed.length; j++) { if (parsed[j] < 0) { error = true; } sum += parsed[j]; } if (!error) { if (parsed.length % 2 === 1) { parsed = parsed.concat(parsed); } result = sum === 0 ? [] : parsed; } } break; case 'color': if (value === 'none' || value === 'transparent') { result = 'none'; } else { result = parseColor(value); } break; case 'fill': case 'stroke': if (value === 'none' || value === 'transparent') { result = 'none'; } else if (value === 'currentColor') { result = this.get('color'); } else if (parsed = parseColor(value)) { return parsed; } else if (parsed = (value || '').split(' ')) { var object = this.resolveUrl(parsed[0]), fallbackColor = parseColor(parsed[1]); if (object == null) { result = fallbackColor; } else if (object.nodeName === 'linearGradient' || object.nodeName === 'radialGradient') { result = new SvgElemGradient(object, null, fallbackColor); } else if (object.nodeName === 'pattern') { result = new SvgElemPattern(object, null, fallbackColor); } else { result = fallbackColor; } } break; case 'stop-color': if (value === 'none' || value === 'transparent') { result = 'none'; } else if (value === 'currentColor') { result = this.get('color'); } else { result = parseColor(value); } break; case 'marker-start': case 'marker-mid': case 'marker-end': case 'clip-path': case 'mask': if (value === 'none') { result = 'none'; } else { result = this.resolveUrl(value); } break; case 'stroke-width': parsed = this.computeLength(value, this.getViewport()); if (parsed != null && parsed >= 0) { result = parsed; } break; case 'stroke-miterlimit': parsed = parseFloat(value); if (parsed != null && parsed >= 1) { result = parsed; } break; case 'word-spacing': case 'letter-spacing': result = this.computeLength(value, this.getViewport()); break; case 'stroke-dashoffset': result = this.computeLength(value, this.getViewport()); if (result != null) { if (result < 0) { // fix for crbug.com/660850 var dasharray = this.get('stroke-dasharray'); for (var _j = 0; _j < dasharray.length; _j++) { result += dasharray[_j]; } } } break; } if (result != null) { return styleCache[key] = result; } } } return styleCache[key] = keyInfo.inherit && this.inherits ? this.inherits.get(key) : keyInfo.initial; }; this.getChildren = function () { if (childrenCache != null) { return childrenCache; } var children = []; for (var i = 0; i < obj.childNodes.length; i++) { var child = obj.childNodes[i]; if (!child.error && this.allowedChildren.indexOf(child.nodeName) !== -1) { children.push(createSVGElement(child, this)); } } return childrenCache = children; }; this.getParentVWidth = function () { return this.inherits ? this.inherits.getVWidth() : viewportWidth; }; this.getParentVHeight = function () { return this.inherits ? this.inherits.getVHeight() : viewportHeight; }; this.getParentViewport = function () { return Math.sqrt(0.5 * this.getParentVWidth() * this.getParentVWidth() + 0.5 * this.getParentVHeight() * this.getParentVHeight()); }; this.getVWidth = function () { return this.getParentVWidth(); }; this.getVHeight = function () { return this.getParentVHeight(); }; this.getViewport = function () { return Math.sqrt(0.5 * this.getVWidth() * this.getVWidth() + 0.5 * this.getVHeight() * this.getVHeight()); }; this.getBoundingBox = function () { var shape = this.getBoundingShape(); return shape.getBoundingBox(); }; }; var SvgElemStylable = function SvgElemStylable(obj, inherits) { SvgElem.call(this, obj, inherits); this.transform = function () { doc.transform.apply(doc, this.getTransformation()); }; this.clip = function () { if (this.get('clip-path') !== 'none') { var clipPath = new SvgElemClipPath(this.get('clip-path'), null); clipPath.useMask(this.getBoundingBox()); return true; } }; this.mask = function () { if (this.get('mask') !== 'none') { var mask = new SvgElemMask(this.get('mask'), null); mask.useMask(this.getBoundingBox()); return true; } }; this.getFill = function (isClip, isMask) { var opacity = this.get('opacity'), fill = this.get('fill'), fillOpacity = this.get('fill-opacity'); if (isClip) { return DefaultColors.white; } if (fill !== 'none' && opacity && fillOpacity) { if (fill instanceof SvgElemGradient || fill instanceof SvgElemPattern) { return fill.getPaint(this.getBoundingBox(), fillOpacity * opacity, isClip, isMask); } return opacityToColor(fill, fillOpacity * opacity, isMask); } }; this.getStroke = function (isClip, isMask) { var opacity = this.get('opacity'), stroke = this.get('stroke'), strokeOpacity = this.get('stroke-opacity'); if (isClip || isEqual(this.get('stroke-width'), 0)) { return; } if (stroke !== 'none' && opacity && strokeOpacity) { if (stroke instanceof SvgElemGradient || stroke instanceof SvgElemPattern) { return stroke.getPaint(this.getBoundingBox(), strokeOpacity * opacity, isClip, isMask); } return opacityToColor(stroke, strokeOpacity * opacity, isMask); } }; }; var SvgElemHasChildren = function SvgElemHasChildren(obj, inherits) { SvgElemStylable.call(this, obj, inherits); this.allowedChildren = ['use', 'g', 'a', 'svg', 'image', 'rect', 'circle', 'ellipse', 'line', 'polyline', 'polygon', 'path', 'text']; this.getBoundingShape = function () { var shape = new SvgShape(), children = this.getChildren(); for (var i = 0; i < children.length; i++) { if (children[i].get('display') !== 'none') { if (typeof children[i].getBoundingShape === 'function') { var childShape = children[i].getBoundingShape().clone(); if (typeof children[i].getTransformation === 'function') { childShape.transform(children[i].getTransformation()); } shape.mergeShape(childShape); } } } return shape; }; this.drawChildren = function (isClip, isMask) { var children = this.getChildren(); for (var i = 0; i < children.length; i++) { if (children[i].get('display') !== 'none') { if (typeof children[i].drawInDocument === 'function') { children[i].drawInDocument(isClip, isMask); } } } }; }; var SvgElemContainer = function SvgElemContainer(obj, inherits) { SvgElemHasChildren.call(this, obj, inherits); this.drawContent = function (isClip, isMask) { this.transform(); var clipped = this.clip(), masked = this.mask(), group; if ((this.get('opacity') < 1 || clipped || masked) && !isClip) { group = docBeginGroup(getPageBBox()); } this.drawChildren(isClip, isMask); if (group) { docEndGroup(group); doc.fillOpacity(this.get('opacity')); docInsertGroup(group); } }; }; var SvgElemUse = function SvgElemUse(obj, inherits) { SvgElemContainer.call(this, obj, inherits); var x = this.getLength('x', this.getVWidth(), 0), y = this.getLength('y', this.getVHeight(), 0), child = this.getUrl('href') || this.getUrl('xlink:href'); if (child) { child = createSVGElement(child, this); } this.getChildren = function () { return child ? [child] : []; }; this.drawInDocument = function (isClip, isMask) { doc.save(); this.drawContent(isClip, isMask); doc.restore(); }; this.getTransformation = function () { return multiplyMatrix(this.get('transform'), [1, 0, 0, 1, x, y]); }; }; var SvgElemSymbol = function SvgElemSymbol(obj, inherits) { SvgElemContainer.call(this, obj, inherits); var width = this.getLength('width', this.getParentVWidth(), this.getParentVWidth()), height = this.getLength('height', this.getParentVHeight(), this.getParentVHeight()); if (inherits instanceof SvgElemUse) { width = inherits.getLength('width', inherits.getParentVWidth(), width); height = inherits.getLength('height', inherits.getParentVHeight(), height); } var aspectRatio = (this.attr('preserveAspectRatio') || '').trim(), viewBox = this.getViewbox('viewBox', [0, 0, width, height]); this.getVWidth = function () { return viewBox[2]; }; this.getVHeight = function () { return viewBox[3]; }; this.drawInDocument = function (isClip, isMask) { doc.save(); this.drawContent(isClip, isMask); doc.restore(); }; this.getTransformation = function () { return multiplyMatrix(parseAspectRatio(aspectRatio, width, height, viewBox[2], viewBox[3]), [1, 0, 0, 1, -viewBox[0], -viewBox[1]]); }; }; var SvgElemGroup = function SvgElemGroup(obj, inherits) { SvgElemContainer.call(this, obj, inherits); this.drawInDocument = function (isClip, isMask) { doc.save(); if (this.link && !isClip && !isMask) { this.addLink(); } this.drawContent(isClip, isMask); doc.restore(); }; this.getTransformation = function () { return this.get('transform'); }; }; var SvgElemLink = function SvgElemLink(obj, inherits) { if (inherits && inherits.isText) { SvgElemTspan.call(this, obj, inherits); this.allowedChildren = ['textPath', 'tspan', '#text', '#cdata-section', 'a']; } else { SvgElemGroup.call(this, obj, inherits); } this.link = this.attr('href') || this.attr('xlink:href'); this.addLink = function () { if (this.link.match(/^(?:[a-z][a-z0-9+.-]*:|\/\/)?/i) && this.getChildren().length) { var bbox = this.getBoundingShape().transform(getGlobalMatrix()).getBoundingBox(); docInsertLink(bbox[0], bbox[1], bbox[2], bbox[3], this.link); } }; }; var SvgElemSvg = function SvgElemSvg(obj, inherits) { SvgElemContainer.call(this, obj, inherits); var width = this.getLength('width', this.getParentVWidth(), this.getParentVWidth()), height = this.getLength('height', this.getParentVHeight(), this.getParentVHeight()), x = this.getLength('x', this.getParentVWidth(), 0), y = this.getLength('y', this.getParentVHeight(), 0); if (inherits instanceof SvgElemUse) { width = inherits.getLength('width', inherits.getParentVWidth(), width); height = inherits.getLength('height', inherits.getParentVHeight(), height); } var aspectRatio = this.attr('preserveAspectRatio'), viewBox = this.getViewbox('viewBox', [0, 0, width, height]); if (this.isOuterElement && preserveAspectRatio) { x = y = 0; width = viewportWidth; height = viewportHeight; aspectRatio = preserveAspectRatio; } this.getVWidth = function () { return viewBox[2]; }; this.getVHeight = function () { return viewBox[3]; }; this.drawInDocument = function (isClip, isMask) { doc.save(); if (this.get('overflow') === 'hidden') { new SvgShape().M(x, y).L(x + width, y).L(x + width, y + height).L(x, y + height).Z().transform(this.get('transform')).insertInDocument(); doc.clip(); } this.drawContent(isClip, isMask); doc.restore(); }; this.getTransformation = function () { return multiplyMatrix(this.get('transform'), [1, 0, 0, 1, x, y], parseAspectRatio(aspectRatio, width, height, viewBox[2], viewBox[3]), [1, 0, 0, 1, -viewBox[0], -viewBox[1]]); }; }; var SVGElemImage = function SVGElemImage(obj, inherits) { SvgElemStylable.call(this, obj, inherits); var link = imageCallback(this.attr('href') || this.attr('xlink:href') || ''), x = this.getLength('x', this.getVWidth(), 0), y = this.getLength('y', this.getVHeight(), 0), width = this.getLength('width', this.getVWidth(), 'auto'), height = this.getLength('height', this.getVHeight(), 'auto'), image; try { image = doc.openImage(link); } catch (e) { warningCallback('SVGElemImage: failed to open image "' + link + '" in PDFKit'); } if (image) { if (width === 'auto' && height !== 'auto') { width = height * image.width / image.height; } else if (height === 'auto' && width !== 'auto') { height = width * image.height / image.width; } else if (width === 'auto' && height === 'auto') { width = image.width; height = image.height; } } if (width === 'auto' || width < 0) { width = 0; } if (height === 'auto' || height < 0) { height = 0; } this.getTransformation = function () { return this.get('transform'); }; this.getBoundingShape = function () { return new SvgShape().M(x, y).L(x + width, y).M(x + width, y + height).L(x, y + height); }; this.drawInDocument = function (isClip, isMask) { if (this.get('visibility') === 'hidden' || !image) { return; } doc.save(); this.transform(); if (this.get('overflow') === 'hidden') { doc.rect(x, y, width, height).clip(); } this.clip(); this.mask(); doc.translate(x, y); doc.transform.apply(doc, parseAspectRatio(this.attr('preserveAspectRatio'), width, height, image ? image.width : width, image ? image.height : height)); if (!isClip) { doc.fillOpacity(this.get('opacity')); doc.image(image, 0, 0); } else { doc.rect(0, 0, image.width, image.height); docFillColor(DefaultColors.white).fill(); } doc.restore(); }; }; var SvgElemPattern = function SvgElemPattern(obj, inherits, fallback) { SvgElemHasChildren.call(this, obj, inherits); this.ref = function () { var ref = this.getUrl('href') || this.getUrl('xlink:href'); if (ref && ref.nodeName === obj.nodeName) { return new SvgElemPattern(ref, inherits, fallback); } }.call(this); var _attr = this.attr; this.attr = function (key) { var attr = _attr.call(this, key); if (attr != null || key === 'href' || key === 'xlink:href') { return attr; } return this.ref ? this.ref.attr(key) : null; }; var _getChildren = this.getChildren; this.getChildren = function () { var children = _getChildren.call(this); if (children.length > 0) { return children; } return this.ref ? this.ref.getChildren() : []; }; this.getPaint = function (bBox, gOpacity, isClip, isMask) { var bBoxUnitsPattern = this.attr('patternUnits') !== 'userSpaceOnUse', bBoxUnitsContent = this.attr('patternContentUnits') === 'objectBoundingBox', x = this.getLength('x', bBoxUnitsPattern ? 1 : this.getParentVWidth(), 0), y = this.getLength('y', bBoxUnitsPattern ? 1 : this.getParentVHeight(), 0), width = this.getLength('width', bBoxUnitsPattern ? 1 : this.getParentVWidth(), 0), height = this.getLength('height', bBoxUnitsPattern ? 1 : this.getParentVHeight(), 0); if (bBoxUnitsContent && !bBoxUnitsPattern) { // Use the same units for pattern & pattern content x = (x - bBox[0]) / (bBox[2] - bBox[0]) || 0; y = (y - bBox[1]) / (bBox[3] - bBox[1]) || 0; width = width / (bBox[2] - bBox[0]) || 0; height = height / (bBox[3] - bBox[1]) || 0; } else if (!bBoxUnitsContent && bBoxUnitsPattern) { x = bBox[0] + x * (bBox[2] - bBox[0]); y = bBox[1] + y * (bBox[3] - bBox[1]); width = width * (bBox[2] - bBox[0]); height = height * (bBox[3] - bBox[1]); } var viewBox = this.getViewbox('viewBox', [0, 0, width, height]), aspectRatio = (this.attr('preserveAspectRatio') || '').trim(), aspectRatioMatrix = multiplyMatrix(parseAspectRatio(aspectRatio, width, height, viewBox[2], viewBox[3], 0), [1, 0, 0, 1, -viewBox[0], -viewBox[1]]), matrix = parseTranform(this.attr('patternTransform')); if (bBoxUnitsContent) { matrix = multiplyMatrix([bBox[2] - bBox[0], 0, 0, bBox[3] - bBox[1], bBox[0], bBox[1]], matrix); } matrix = multiplyMatrix(matrix, [1, 0, 0, 1, x, y]); if ((matrix = validateMatrix(matrix)) && (aspectRatioMatrix = validateMatrix(aspectRatioMatrix)) && (width = validateNumber(width)) && (height = validateNumber(height))) { var group = docBeginGroup([0, 0, width, height]); doc.transform.apply(doc, aspectRatioMatrix); this.drawChildren(isClip, isMask); docEndGroup(group); return [docCreatePattern(group, width, height, matrix), gOpacity]; } else { return fallback ? [fallback[0], fallback[1] * gOpacity] : undefined; } }; this.getVWidth = function () { var bBoxUnitsPattern = this.attr('patternUnits') !== 'userSpaceOnUse', width = this.getLength('width', bBoxUnitsPattern ? 1 : this.getParentVWidth(), 0); return this.getViewbox('viewBox', [0, 0, width, 0])[2]; }; this.getVHeight = function () { var bBoxUnitsPattern = this.attr('patternUnits') !== 'userSpaceOnUse', height = this.getLength('height', bBoxUnitsPattern ? 1 : this.getParentVHeight(), 0); return this.getViewbox('viewBox', [0, 0, 0, height])[3]; }; }; var SvgElemGradient = function SvgElemGradient(obj, inherits, fallback) { SvgElem.call(this, obj, inherits); this.allowedChildren = ['stop']; this.ref = function () { var ref = this.getUrl('href') || this.getUrl('xlink:href'); if (ref && ref.nodeName === obj.nodeName) { return new SvgElemGradient(ref, inherits, fallback); } }.call(this); var _attr = this.attr; this.attr = function (key) { var attr = _attr.call(this, key); if (attr != null || key === 'href' || key === 'xlink:href') { return attr; } return this.ref ? this.ref.attr(key) : null; }; var _getChildren = this.getChildren; this.getChildren = function () { var children = _getChildren.call(this); if (children.length > 0) { return children; } return this.ref ? this.ref.getChildren() : []; }; this.getPaint = function (bBox, gOpacity, isClip, isMask) { var children = this.getChildren(); if (children.length === 0) { return; } if (children.length === 1) { var child = children[0], stopColor = child.get('stop-color'); if (stopColor === 'none') { return; } return opacityToColor(stopColor, child.get('stop-opacity') * gOpacity, isMask); } var bBoxUnits = this.attr('gradientUnits') !== 'userSpaceOnUse', matrix = parseTranform(this.attr('gradientTransform')), spread = this.attr('spreadMethod'), grad, x1, x2, y1, y2, r2, nAfter = 0, nBefore = 0, nTotal = 1; if (bBoxUnits) { matrix = multiplyMatrix([bBox[2] - bBox[0], 0, 0, bBox[3] - bBox[1], bBox[0], bBox[1]], matrix); } if (matrix = validateMatrix(matrix)) { if (this.name === 'linearGradient') { x1 = this.getLength('x1', bBoxUnits ? 1 : this.getVWidth(), 0); x2 = this.getLength('x2', bBoxUnits ? 1 : this.getVWidth(), bBoxUnits ? 1 : this.getVWidth()); y1 = this.getLength('y1', bBoxUnits ? 1 : this.getVHeight(), 0); y2 = this.getLength('y2', bBoxUnits ? 1 : this.getVHeight(), 0); } else { x2 = this.getLength('cx', bBoxUnits ? 1 : this.getVWidth(), bBoxUnits ? 0.5 : 0.5 * this.getVWidth()); y2 = this.getLength('cy', bBoxUnits ? 1 : this.getVHeight(), bBoxUnits ? 0.5 : 0.5 * this.getVHeight()); r2 = this.getLength('r', bBoxUnits ? 1 : this.getViewport(), bBoxUnits ? 0.5 : 0.5 * this.getViewport()); x1 = this.getLength('fx', bBoxUnits ? 1 : this.getVWidth(), x2); y1 = this.getLength('fy', bBoxUnits ? 1 : this.getVHeight(), y2); if (r2 < 0) { warningCallback('SvgElemGradient: negative r value'); } var d = Math.sqrt(Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2)), multiplier = 1; if (d > r2) { // according to specification multiplier = r2 / d; x1 = x2 + (x1 - x2) * multiplier; y1 = y2 + (y1 - y2) * multiplier; } r2 = Math.max(r2, d * multiplier * (1 + 1e-6)); // fix for edge-case gradients see issue #84 } if (spread === 'reflect' || spread === 'repeat') { var inv = inverseMatrix(matrix), corner1 = transformPoint([bBox[0], bBox[1]], inv), corner2 = transformPoint([bBox[2], bBox[1]], inv), corner3 = transformPoint([bBox[2], bBox[3]], inv), corner4 = transformPoint([bBox[0], bBox[3]], inv); if (this.name === 'linearGradient') { // See file 'gradient-repeat-maths.png' nAfter = Math.max((corner1[0] - x2) * (x2 - x1) + (corner1[1] - y2) * (y2 - y1), (corner2[0] - x2) * (x2 - x1) + (corner2[1] - y2) * (y2 - y1), (corner3[0] - x2) * (x2 - x1) + (corner3[1] - y2) * (y2 - y1), (corner4[0] - x2) * (x2 - x1) + (corner4[1] - y2) * (y2 - y1)) / (Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2)); nBefore = Math.max((corner1[0] - x1) * (x1 - x2) + (corner1[1] - y1) * (y1 - y2), (corner2[0] - x1) * (x1 - x2) + (corner2[1] - y1) * (y1 - y2), (corner3[0] - x1) * (x1 - x2) + (corner3[1] - y1) * (y1 - y2), (corner4[0] - x1) * (x1 - x2) + (corner4[1] - y1) * (y1 - y2)) / (Math.pow(x2 - x1, 2) + Math.pow(y2 - y1, 2)); } else { nAfter = Math.sqrt(Math.max(Math.pow(corner1[0] - x2, 2) + Math.pow(corner1[1] - y2, 2), Math.pow(corner2[0] - x2, 2) + Math.pow(corner2[1] - y2, 2), Math.pow(corner3[0] - x2, 2) + Math.pow(corner3[1] - y2, 2), Math.pow(corner4[0] - x2, 2) + Math.pow(corner4[1] - y2, 2))) / r2 - 1; } nAfter = Math.ceil(nAfter + 0.5); // Add a little more because the stroke can extend outside of the bounding box nBefore = Math.ceil(nBefore + 0.5); nTotal = nBefore + 1 + nAfter; // How many times the gradient needs to be repeated to fill the object bounding box } if (this.name === 'linearGradient') { grad = doc.linearGradient(x1 - nBefore * (x2 - x1), y1 - nBefore * (y2 - y1), x2 + nAfter * (x2 - x1), y2 + nAfter * (y2 - y1)); } else { grad = doc.radialGradient(x1, y1, 0, x2, y2, r2 + nAfter * r2); } for (var n = 0; n < nTotal; n++) { var offset = 0, inOrder = spread !== 'reflect' || (n - nBefore) % 2 === 0; for (var i = 0; i < children.length; i++) { var _child = children[inOrder ? i : children.length - 1 - i], _stopColor = _child.get('stop-color'); if (_stopColor === 'none') { _stopColor = DefaultColors.transparent; } _stopColor = opacityToColor(_stopColor, _child.get('stop-opacity') * gOpacity, isMask); offset = Math.max(offset, inOrder ? _child.getPercent('offset', 0) : 1 - _child.getPercent('offset', 0)); if (i === 0 && _stopColor[0].length === 4) { grad._colorSpace = 'DeviceCMYK'; } // Fix until PR #763 is merged into PDFKit if (i === 0 && offset > 0) { grad.stop((n + 0) / nTotal, _stopColor[0], _stopColor[1]); } grad.stop((n + offset) / (nAfter + nBefore + 1), _stopColor[0], _stopColor[1]); if (i === children.length - 1 && offset < 1) { grad.stop((n + 1) / nTotal, _stopColor[0], _stopColor[1]); } } } grad.setTransform.apply(grad, matrix); return [grad, 1]; } else { return fallback ? [fallback[0], fallback[1] * gOpacity] : undefined; } }; }; var SvgElemBasicShape = function SvgElemBasicShape(obj, inherits) { SvgElemStylable.call(this, obj, inherits); this.dashScale = 1; this.getBoundingShape = function () { return this.shape; }; this.getTransformation = function () { return this.get('transform'); }; this.drawInDocument = function (isClip, isMask) { if (this.get('visibility') === 'hidden' || !this.shape) { return; } doc.save(); this.transform(); this.clip(); if (!isClip) { var masked = this.mask(), group; if (masked) { group = docBeginGroup(getPageBBox()); } var subPaths = this.shape.getSubPaths(), fill = this.getFill(isClip, isMask), stroke = this.getStroke(isClip, isMask), lineWidth = this.get('stroke-width'), lineCap = this.get('stroke-linecap'); if (fill || stroke) { if (fill) { docFillColor(fill); } if (stroke) { for (var j = 0; j < subPaths.length; j++) { if (isEqual(subPaths[j].totalLength, 0)) { if ((lineCap === 'square' || lineCap === 'round') && lineWidth > 0) { if (subPaths[j].startPoint && subPaths[j].startPoint.length > 1) { var _x4 = subPaths[j].startPoint[0], _y4 = subPaths[j].startPoint[1]; docFillColor(stroke); if (lineCap === 'square') { doc.rect(_x4 - 0.5 * lineWidth, _y4 - 0.5 * lineWidth, lineWidth, lineWidth); } else if (lineCap === 'round') { doc.circle(_x4, _y4, 0.5 * lineWidth); } doc.fill(); } } } } var dashArray = this.get('stroke-dasharray'), dashOffset = this.get('stroke-dashoffset'); if (isNotEqual(this.dashScale, 1)) { for (var _j2 = 0; _j2 < dashArray.length; _j2++) { dashArray[_j2] *= this.dashScale; } dashOffset *= this.dashScale; } docStrokeColor(stroke); doc.lineWidth(lineWidth).miterLimit(this.get('stroke-miterlimit')).lineJoin(this.get('stroke-linejoin')).lineCap(lineCap).dash(dashArray, { phase: dashOffset }); } for (var _j3 = 0; _j3 < subPaths.length; _j3++) { if (subPaths[_j3].totalLength > 0) { subPaths[_j3].insertInDocument(); } } if (fill && stroke) { doc.fillAndStroke(this.get('fill-rule')); } else if (fill) { doc.fill(this.get('fill-rule')); } else if (stroke) { doc.stroke(); } } var markerStart = this.get('marker-start'), markerMid = this.get('marker-mid'), markerEnd = this.get('marker-end'); if (markerStart !== 'none' || markerMid !== 'none' || markerEnd !== 'none') { var markersPos = this.shape.getMarkers(); if (markerStart !== 'none') { var marker = new SvgElemMarker(markerStart, null); marker.drawMarker(false, isMask, markersPos[0], lineWidth); } if (markerMid !== 'none') { for (var i = 1; i < markersPos.length - 1; i++) { var _marker = new SvgElemMarker(markerMid, null); _marker.drawMarker(false, isMask, markersPos[i], lineWidth); } } if (markerEnd !== 'none') { var _marker2 = new SvgElemMarker(markerEnd, null); _marker2.drawMarker(false, isMask, markersPos[markersPos.length - 1], lineWidth); } } if (group) { docEndGroup(group); docInsertGroup(group); } } else { this.shape.insertInDocument(); docFillColor(DefaultColors.white); doc.fill(this.get('clip-rule')); } doc.restore(); }; }; var SvgElemRect = function SvgElemRect(obj, inherits) { SvgElemBasicShape.call(this, obj, inherits); var x = this.getLength('x', this.getVWidth(), 0), y = this.getLength('y', this.getVHeight(), 0), w = this.getLength('width', this.getVWidth(), 0), h = this.getLength('height', this.getVHeight(), 0), rx = this.getLength('rx', this.getVWidth()), ry = this.getLength('ry', this.getVHeight()); if (rx === undefined && ry === undefined) { rx = ry = 0; } else if (rx === undefined && ry !== undefined) { rx = ry; } else if (rx !== undefined && ry === undefined) { ry = rx; } if (w > 0 && h > 0) { if (rx && ry) { rx = Math.min(rx, 0.5 * w); ry = Math.min(ry, 0.5 * h); this.shape = new SvgShape().M(x + rx, y).L(x + 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 + h).L(x + rx, y + h).A(rx, ry, 0, 0, 1, x, y + h - ry).L(x, y + ry).A(rx, ry, 0, 0, 1, x + rx, y).Z(); } else { this.shape = new SvgShape().M(x, y).L(x + w, y).L(x + w, y + h).L(x, y + h).Z(); } } else { this.shape = new SvgShape(); } }; var SvgElemCircle = function SvgElemCircle(obj, inherits) { SvgElemBasicShape.call(this, obj, inherits); var cx = this.getLength('cx', this.getVWidth(), 0), cy = this.getLength('cy', this.getVHeight(), 0), r = this.getLength('r', this.getViewport(), 0); if (r > 0) { 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).Z(); } else { this.shape = new SvgShape(); } }; var SvgElemEllipse = function SvgElemEllipse(obj, inherits) { SvgElemBasicShape.call(this, obj, inherits); var cx = this.getLength('cx', this.getVWidth(), 0), cy = this.getLength('cy', this.getVHeight(), 0), rx = this.getLength('rx', this.getVWidth(), 0), ry = this.getLength('ry', this.getVHeight(), 0); if (rx > 0 && ry > 0) { this.shape = new SvgShape().M(cx + rx, cy).A(rx, ry, 0, 0, 1, cx - rx, cy).A(rx, ry, 0, 0, 1, cx + rx, cy).Z(); } else { this.shape = new SvgShape(); } }; var SvgElemLine = function SvgElemLine(obj, inherits) { SvgElemBasicShape.call(this, obj, inherits); var x1 = this.getLength('x1', this.getVWidth(), 0), y1 = this.getLength('y1', this.getVHeight(), 0), x2 = this.getLength('x2', this.getVWidth(), 0), y2 = this.getLength('y2', this.getVHeight(), 0); this.shape = new SvgShape().M(x1, y1).L(x2, y2); }; var SvgElemPolyline = function SvgElemPolyline(obj, inherits) { SvgElemBasicShape.call(this, obj, inherits); var points = this.getNumberList('points'); this.shape = new SvgShape(); for (var i = 0; i < points.length - 1; i += 2) { if (i === 0) { this.shape.M(points[i], points[i + 1]); } else { this.shape.L(points[i], points[i + 1]); } } if (points.error) { warningCallback('SvgElemPolygon: unexpected string ' + points.error); } if (points.length % 2 === 1) { warningCallback('SvgElemPolyline: uneven number of coordinates'); } }; var SvgElemPolygon = function SvgElemPolygon(obj, inherits) { SvgElemBasicShape.call(this, obj, inherits); var points = this.getNumberList('points'); this.shape = new SvgShape(); for (var i = 0; i < points.length - 1; i += 2) { if (i === 0) { this.shape.M(points[i], points[i + 1]); } else { this.shape.L(points[i], points[i + 1]); } } this.shape.Z(); if (points.error) { warningCallback('SvgElemPolygon: unexpected string ' + points.error); } if (points.length % 2 === 1) { warningCallback('SvgElemPolygon: uneven number of coordinates'); } }; var SvgElemPath = function SvgElemPath(obj, inherits) { SvgElemBasicShape.call(this, obj, inherits); this.shape = new SvgShape().path(this.attr('d')); var pathLength = this.getLength('pathLength', this.getViewport()); this.pathLength = pathLength > 0 ? pathLength : undefined; this.dashScale = this.pathLength !== undefined ? this.shape.totalLength / this.pathLength : 1; }; var SvgElemMarker = function SvgElemMarker(obj, inherits) { SvgElemHasChildren.call(this, obj, inherits); var width = this.getLength('markerWidth', this.getParentVWidth(), 3), height = this.getLength('markerHeight', this.getParentVHeight(), 3), viewBox = this.getViewbox('viewBox', [0, 0, width, height]); this.getVWidth = function () { return viewBox[2]; }; this.getVHeight = function () { return viewBox[3]; }; this.drawMarker = function (isClip, isMask, posArray, strokeWidth) { doc.save(); var orient = this.attr('orient'), units = this.attr('markerUnits'), rotate = orient === 'auto' ? posArray[2] : (parseFloat(orient) || 0) * Math.PI / 180, scale = units === 'userSpaceOnUse' ? 1 : strokeWidth; doc.transform(Math.cos(rotate) * scale, Math.sin(rotate) * scale, -Math.sin(rotate) * scale, Math.cos(rotate) * scale, posArray[0], posArray[1]); var refX = this.getLength('refX', this.getVWidth(), 0), refY = this.getLength('refY', this.getVHeight(), 0), aspectRatioMatrix = parseAspectRatio(this.attr('preserveAspectRatio'), width, height, viewBox[2], viewBox[3], 0.5); if (this.get('overflow') === 'hidden') { doc.rect(aspectRatioMatrix[0] * (viewBox[0] + viewBox[2] / 2 - refX) - width / 2, aspectRatioMatrix[3] * (viewBox[1] + viewBox[3] / 2 - refY) - height / 2, width, height).clip(); } doc.transform.apply(doc, aspectRatioMatrix); doc.translate(-refX, -refY); var group; if (this.get('opacity') < 1 && !isClip) { group = docBeginGroup(getPageBBox()); } this.drawChildren(isClip, isMask); if (group) { docEndGroup(group); doc.fillOpacity(this.get('opacity')); docInsertGroup(group); } doc.restore(); }; }; var SvgElemClipPath = function SvgElemClipPath(obj, inherits) { SvgElemHasChildren.call(this, obj, inherits); this.useMask = function (bBox) { var group = docBeginGroup(getPageBBox()); doc.save(); if (this.attr('clipPathUnits') === 'objectBoundingBox') { doc.transform(bBox[2] - bBox[0], 0, 0, bBox[3] - bBox[1], bBox[0], bBox[1]); } this.clip(); this.drawChildren(true, false); doc.restore(); docEndGroup(group); docApplyMask(group, true); }; }; var SvgElemMask = function SvgElemMask(obj, inherits) { SvgElemHasChildren.call(this, obj, inherits); this.useMask = function (bBox) { var group = docBeginGroup(getPageBBox()); doc.save(); var x, y, w, h; if (this.attr('maskUnits') === 'userSpaceOnUse') { x = this.getLength('x', this.getVWidth(), -0.1 * (bBox[2] - bBox[0]) + bBox[0]); y = this.getLength('y', this.getVHeight(), -0.1 * (bBox[3] - bBox[1]) + bBox[1]); w = this.getLength('width', this.getVWidth(), 1.2 * (bBox[2] - bBox[0])); h = this.getLength('height', this.getVHeight(), 1.2 * (bBox[3] - bBox[1])); } else { x = this.getLength('x', this.getVWidth(), -0.1) * (bBox[2] - bBox[0]) + bBox[0]; y = this.getLength('y', this.getVHeight(), -0.1) * (bBox[3] - bBox[1]) + bBox[1]; w = this.getLength('width', this.getVWidth(), 1.2) * (bBox[2] - bBox[0]); h = this.getLength('height', this.getVHeight(), 1.2) * (bBox[3] - bBox[1]); } doc.rect(x, y, w, h).clip(); if (this.attr('maskContentUnits') === 'objectBoundingBox') { doc.transform(bBox[2] - bBox[0], 0, 0, bBox[3] - bBox[1], bBox[0], bBox[1]); } this.clip(); this.drawChildren(false, true); doc.restore(); docEndGroup(group); docApplyMask(group, true); }; }; var SvgElemTextContainer = function SvgElemTextContainer(obj, inherits) { SvgElemStylable.call(this, obj, inherits); this.allowedChildren = ['tspan', '#text', '#cdata-section', 'a']; this.isText = true; this.getBoundingShape = function () { var shape = new SvgShape(); for (var i = 0; i < this._pos.length; i++) { var pos = this._pos[i]; if (!pos.hidden) { var dx0 = pos.ascent * Math.sin(pos.rotate), dy0 = -pos.ascent * Math.cos(pos.rotate), dx1 = pos.descent * Math.sin(pos.rotate), dy1 = -pos.descent * Math.cos(pos.rotate), dx2 = pos.width * Math.cos(pos.rotate), dy2 = pos.width * Math.sin(pos.rotate); shape.M(pos.x + dx0, pos.y + dy0).L(pos.x + dx0 + dx2, pos.y + dy0 + dy2).M(pos.x + dx1 + dx2, pos.y + dy1 + dy2).L(pos.x + dx1, pos.y + dy1); } } return shape; }; this.drawTextInDocument = function (isClip, isMask) { if (this.link && !isClip && !isMask) { this.addLink(); } if (this.get('text-decoration') === 'underline') { this.decorate(0.05 * this._font.size, -0.075 * this._font.size, isClip, isMask); } if (this.get('text-decoration') === 'overline') { this.decorate(0.05 * this._font.size, getAscent(this._font.font, this._font.size) + 0.075 * this._font.size, isClip, isMask); } var fill = this.getFill(isClip, isMask), stroke = this.getStroke(isClip, isMask), strokeWidth = this.get('stroke-width'); if (this._font.fauxBold) { if (!stroke) { stroke = fill; strokeWidth = this._font.size * 0.03; } else { strokeWidth += this._font.size * 0.03; } } var children = this.getChildren(); for (var i = 0; i < children.length; i++) { var childElem = children[i]; switch (childElem.name) { case 'tspan': case 'textPath': case 'a': if (childElem.get('display') !== 'none') { childElem.drawTextInDocument(isClip, isMask); } break; case '#text': case '#cdata-section': if (this.get('visibility') === 'hidden') { continue; } if (fill || stroke || isClip) { if (fill) { docFillColor(fill); } if (stroke && strokeWidth) { docStrokeColor(stroke); doc.lineWidth(strokeWidth).miterLimit(this.get('stroke-miterlimit')).lineJoin(this.get('stroke-linejoin')).lineCap(this.get('stroke-linecap')).dash(this.get('stroke-dasharray'), { phase: this.get('stroke-dashoffset') }); } docBeginText(this._font.font, this._font.size); docSetTextMode(!!fill, !!stroke); for (var j = 0, pos = childElem._pos; j < pos.length; j++) { if (!pos[j].hidden && isNotEqual(pos[j].width, 0)) { var cos = Math.cos(pos[j].rotate), sin = Math.sin(pos[j].rotate), skew = this._font.fauxItalic ? -0.25 : 0; docSetTextMatrix(cos * pos[j].scale, sin * pos[j].scale, cos * skew - sin, sin * skew + cos, pos[j].x, pos[j].y); docWriteGlyph(pos[j].glyph); } } docEndText(); } break; } } if (this.get('text-decoration') === 'line-through') { this.decorate(0.05 * this._font.size, 0.5 * (getAscent(this._font.font, this._font.size) + getDescent(this._font.font, this._font.size)), isClip, isMask); } }; this.decorate = function (lineWidth, linePosition, isClip, isMask) { var fill = this.getFill(isClip, isMask), stroke = this.getStroke(isClip, isMask); if (fill) { docFillColor(fill); } if (stroke) { docStrokeColor(stroke); doc.lineWidth(this.get('stroke-width')).miterLimit(this.get('stroke-miterlimit')).lineJoin(this.get('stroke-linejoin')).lineCap(this.get('stroke-linecap')).dash(this.get('stroke-dasharray'), { phase: this.get('stroke-dashoffset') }); } for (var j = 0, pos = this._pos; j < pos.length; j++) { if (!pos[j].hidden && isNotEqual(pos[j].width, 0)) { var dx0 = (linePosition + lineWidth / 2) * Math.sin(pos[j].rotate), dy0 = -(linePosition + lineWidth / 2) * Math.cos(pos[j].rotate), dx1 = (linePosition - lineWidth / 2) * Math.sin(pos[j].rotate), dy1 = -(linePosition - lineWidth / 2) * Math.cos(pos[j].rotate), dx2 = pos[j].width * Math.cos(pos[j].rotate), dy2 = pos[j].width * Math.sin(pos[j].rotate); new SvgShape().M(pos[j].x + dx0, pos[j].y + dy0).L(pos[j].x + dx0 + dx2, pos[j].y + dy0 + dy2).L(pos[j].x + dx1 + dx2, pos[j].y + dy1 + dy2).L(pos[j].x + dx1, pos[j].y + dy1).Z().insertInDocument(); if (fill && stroke) { doc.fillAndStroke(); } else if (fill) { doc.fill(); } else if (stroke) { doc.stroke(); } } } }; }; var SvgElemTextNode = function SvgElemTextNode(obj, inherits) { this.name = obj.nodeName; this.textContent = obj.nodeValue; }; var SvgElemTspan = function SvgElemTspan(obj, inherits) { SvgElemTextContainer.call(this, obj, inherits); }; var SvgElemTextPath = function SvgElemTextPath(obj, inherits) { SvgElemTextContainer.call(this, obj, inherits); var pathObject, pathLength, temp; if ((temp = this.attr('path')) && temp.trim() !== '') { var _pathLength = this.getLength('pathLength', this.getViewport()); this.pathObject = new SvgShape().path(temp); this.pathLength = _pathLength > 0 ? _pathLength : this.pathObject.totalLength; this.pathScale = this.pathObject.totalLength / this.pathLength; } else if ((temp = this.getUrl('href') || this.getUrl('xlink:href')) && temp.nodeName === 'path') { var pathElem = new SvgElemPath(temp, this); this.pathObject = pathElem.shape.clone().transform(pathElem.get('transform')); this.pathLength = this.chooseValue(pathElem.pathLength, this.pathObject.totalLength); this.pathScale = this.pathObject.totalLength / this.pathLength; } }; var SvgElemText = function SvgElemText(obj, inherits) { SvgElemTextContainer.call(this, obj, inherits); this.allowedChildren = ['textPath', 'tspan', '#text', '#cdata-section', 'a']; (function (textParentElem) { var processedText = '', remainingText = obj.textContent, textPaths = [], currentChunk = [], currentAnchor, currentDirection, currentX = 0, currentY = 0; function doAnchoring() { if (currentChunk.length) { var last = currentChunk[currentChunk.length - 1]; var first = currentChunk[0]; var width = last.x + last.width - first.x; var anchordx = { 'startltr': 0, 'middleltr': 0.5, 'endltr': 1, 'startrtl': 1, 'middlertl': 0.5, 'endrtl': 0 }[currentAnchor + currentDirection] * width || 0; for (var i = 0; i < currentChunk.length; i++) { currentChunk[i].x -= anchordx; } } currentChunk = []; } function adjustLength(pos, length, spacingAndGlyphs) { var firstChar = pos[0], lastChar = pos[pos.length - 1], startX = firstChar.x, endX = lastChar.x + lastChar.width; if (spacingAndGlyphs) { var textScale = length / (endX - startX); if (textScale > 0 && textScale < Infinity) { for (var j = 0; j < pos.length; j++) { pos[j].x = startX + textScale * (pos[j].x - startX); pos[j].scale *= textScale; pos[j].width *= textScale; } } } else { if (pos.length >= 2) { var spaceDiff = (length - (endX - startX)) / (pos.length - 1); for (var _j4 = 0; _j4 < pos.length; _j4++) { pos[_j4].x += _j4 * spaceDiff; } } } currentX += length - (endX - startX); } function recursive(currentElem, parentElem) { currentElem._x = combineArrays(currentElem.getLengthList('x', currentElem.getVWidth()), parentElem ? parentElem._x.slice(parentElem._pos.length) : []); currentElem._y = combineArrays(currentElem.getLengthList('y', currentElem.getVHeight()), parentElem ? parentElem._y.slice(parentElem._pos.length) : []); currentElem._dx = combineArrays(currentElem.getLengthList('dx', currentElem.getVWidth()), parentElem ? parentElem._dx.slice(parentElem._pos.length) : []); currentElem._dy = combineArrays(currentElem.getLengthList('dy', currentElem.getVHeight()), parentElem ? parentElem._dy.slice(parentElem._pos.length) : []); currentElem._rot = combineArrays(currentElem.getNumberList('rotate'), parentElem ? parentElem._rot.slice(parentElem._pos.length) : []); currentElem._defRot = currentElem.chooseValue(currentElem._rot[currentElem._rot.length - 1], parentElem && parentElem._defRot, 0); if (currentElem.name === 'textPath') { currentElem._y = []; } var fontOptions = { fauxItalic: false, fauxBold: false }, fontNameorLink = fontCallback(currentElem.get('font-family'), currentElem.get('font-weight') === 'bold', currentElem.get('font-style') === 'italic', fontOptions); try { doc.font(fontNameorLink); } catch (e) { warningCallback('SVGElemText: failed to open font "' + fontNameorLink + '" in PDFKit'); } currentElem._pos = []; currentElem._index = 0; currentElem._font = { font: doc._font, size: currentElem.get('font-size'), fauxItalic: fontOptions.fauxItalic, fauxBold: fontOptions.fauxBold }; var textLength = currentElem.getLength('textLength', currentElem.getVWidth(), undefined), spacingAndGlyphs = currentElem.attr('lengthAdjust') === 'spacingAndGlyphs', wordSpacing = currentElem.get('word-spacing'), letterSpacing = currentElem.get('letter-spacing'), textAnchor = currentElem.get('text-anchor'), textDirection = currentElem.get('direction'), baseline = getBaseline(currentElem._font.font, currentElem._font.size, currentElem.get('alignment-baseline') || currentElem.get('dominant-baseline'), currentElem.get('baseline-shift')); if (currentElem.name === 'textPath') { doAnchoring(); currentX = currentY = 0; } var children = currentElem.getChildren(); for (var i = 0; i < children.length; i++) { var childElem = children[i]; switch (childElem.name) { case 'tspan': case 'textPath': case 'a': recursive(childElem, currentElem); break; case '#text': case '#cdata-section': var rawText = childElem.textContent, renderedText = rawText, words = void 0; childElem._font = currentElem._font; childElem._pos = []; remainingText = remainingText.substring(rawText.length); if (currentElem.get('xml:space') === 'preserve') { renderedText = renderedText.replace(/[\s]/g, ' '); } else { renderedText = renderedText.replace(/[\s]+/g, ' '); if (processedText.match(/[\s]$|^$/)) { renderedText = renderedText.replace(/^[\s]/, ''); } if (remainingText.match(/^[\s]*$/)) { renderedText = renderedText.replace(/[\s]$/, ''); } } processedText += rawText; if (wordSpacing === 0) { words = [renderedText]; } else { words = renderedText.split(/(\s)/); } for (var w = 0; w < words.length; w++) { var pos = getTextPos(currentElem._font.font, currentElem._font.size, words[w]); for (var j = 0; j < pos.length; j++) { var index = currentElem._index, xAttr = currentElem._x[index], yAttr = currentElem._y[index], dxAttr = currentElem._dx[index], dyAttr = currentElem._dy[index], rotAttr = currentElem._rot[index], continuous = !(w === 0 && j === 0); if (xAttr !== undefined) { continuous = false; doAnchoring(); currentX = xAttr; } if (yAttr !== undefined) { continuous = false; doAnchoring(); currentY = yAttr; } if (dxAttr !== undefined) { continuous = false; currentX += dxAttr; } if (dyAttr !== undefined) { continuous = false; currentY += dyAttr; } if (rotAttr !== undefined || currentElem._defRot !== 0) { continuous = false; } var position = { glyph: pos[j].glyph, rotate: Math.PI / 180 * currentElem.chooseValue(rotAttr, currentElem._defRot), x: currentX + pos[j].xOffset, y: currentY + baseline + pos[j].yOffset, width: pos[j].width, ascent: getAscent(currentElem._font.font, currentElem._font.size), descent: getDescent(currentElem._font.font, currentElem._font.size), scale: 1, hidden: false, continuous: continuous }; currentChunk.push(position); childElem._pos.push(position); currentElem._pos.push(position); currentElem._index += pos[j].unicode.length; if (currentChunk.length === 1) { currentAnchor = textAnchor; currentDirection = textDirection; } currentX += pos[j].xAdvance + letterSpacing; currentY += pos[j].yAdvance; } if (words[w] === ' ') { currentX += wordSpacing; } } break; default: remainingText = remainingText.substring(childElem.textContent.length); } } if (textLength && currentElem._pos.length) { adjustLength(currentElem._pos, textLength, spacingAndGlyphs); } if (currentElem.name === 'textPath' || currentElem.name === 'text') { doAnchoring(); } if (currentElem.name === 'textPath') { textPaths.push(currentElem); var pathObject = currentElem.pathObject; if (pathObject) { currentX = pathObject.endPoint[0]; currentY = pathObject.endPoint[1]; } } if (parentElem) { parentElem._pos = parentElem._pos.concat(currentElem._pos); parentElem._index += currentElem._index; } } function textOnPath(currentElem) { var pathObject = currentElem.pathObject, pathLength = currentElem.pathLength, pathScale = currentElem.pathScale; if (pathObject) { var textOffset = currentElem.getLength('startOffset', pathLength, 0); for (var j = 0; j < currentElem._pos.length; j++) { var charMidX = textOffset + currentElem._pos[j].x + 0.5 * currentElem._pos[j].width; if (charMidX > pathLength || charMidX < 0) { currentElem._pos[j].hidden = true; } else { var pointOnPath = pathObject.getPointAtLength(charMidX * pathScale); if (isNotEqual(pathScale, 1)) { currentElem._pos[j].scale *= pathScale; currentElem._pos[j].width *= pathScale; } currentElem._pos[j].x = pointOnPath[0] - 0.5 * currentElem._pos[j].width * Math.cos(pointOnPath[2]) - currentElem._pos[j].y * Math.sin(pointOnPath[2]); currentElem._pos[j].y = pointOnPath[1] - 0.5 * currentElem._pos[j].width * Math.sin(pointOnPath[2]) + currentElem._pos[j].y * Math.cos(pointOnPath[2]); currentElem._pos[j].rotate = pointOnPath[2] + currentElem._pos[j].rotate; currentElem._pos[j].continuous = false; } } } else { for (var _j5 = 0; _j5 < currentElem._pos.length; _j5++) { currentElem._pos[_j5].hidden = true; } } } recursive(textParentElem, null); for (var i = 0; i < textPaths.length; i++) { textOnPath(textPaths[i]); } })(this); this.getTransformation = function () { return this.get('transform'); }; this.drawInDocument = function (isClip, isMask) { doc.save(); this.transform(); this.clip(); var masked = this.mask(), group; if (masked) { group = docBeginGroup(getPageBBox()); } this.drawTextInDocument(isClip, isMask); if (group) { docEndGroup(group); docInsertGroup(group); } doc.restore(); }; }; options = options || {}; var pxToPt = options.assumePt ? 1 : 72 / 96, // 1px = 72/96pt, but only if assumePt is false viewportWidth = (options.width || doc.page.width) / pxToPt, viewportHeight = (options.height || doc.page.height) / pxToPt, preserveAspectRatio = options.preserveAspectRatio || null, // default to null so that the attr can override if not passed useCSS = options.useCSS && typeof SVGElement !== 'undefined' && svg instanceof SVGElement && typeof getComputedStyle === 'function', warningCallback = options.warningCallback, fontCallback = options.fontCallback, imageCallback = options.imageCallback, colorCallback = options.colorCallback, documentCallback = options.documentCallback, precision = Math.ceil(Math.max(1, options.precision)) || 3, groupStack = [], documentCache = {}, links = [], styleRules = []; if (typeof warningCallback !== 'function') { warningCallback = function warningCallback(str) { if (typeof console !== undefined && typeof console.warn === 'function') { console.warn(str); } }; } if (typeof fontCallback !== 'function') { fontCallback = function fontCallback(family, bold, italic, fontOptions) { // Check if the font is already registered in the document if (bold && italic) { if (doc._registeredFonts.hasOwnProperty(family + '-BoldItalic')) { return family + '-BoldItalic'; } else if (doc._registeredFonts.hasOwnProperty(family + '-Italic')) { fontOptions.fauxBold = true; return family + '-Italic'; } else if (doc._registeredFonts.hasOwnProperty(family + '-Bold')) { fontOptions.fauxItalic = true; return family + '-Bold'; } else if (doc._registeredFonts.hasOwnProperty(family)) { fontOptions.fauxBold = true; fontOptions.fauxItalic = true; return family; } } if (bold && !italic) { if (doc._registeredFonts.hasOwnProperty(family + '-Bold')) { return family + '-Bold'; } else if (doc._registeredFonts.hasOwnProperty(family)) { fontOptions.fauxBold = true; return family; } } if (!bold && italic) { if (doc._registeredFonts.hasOwnProperty(family + '-Italic')) { return family + '-Italic'; } else if (doc._registeredFonts.hasOwnProperty(family)) { fontOptions.fauxItalic = true; return family; } } if (!bold && !italic) { if (doc._registeredFonts.hasOwnProperty(family)) { return family; } } // Use standard fonts as fallback if (family.match(/(?:^|,)\s*serif\s*$/)) { if (bold && italic) { return 'Times-BoldItalic'; } if (bold && !italic) { return 'Times-Bold'; } if (!bold && italic) { return 'Times-Italic'; } if (!bold && !italic) { return 'Times-Roman'; } } else if (family.match(/(?:^|,)\s*monospace\s*$/)) { if (bold && italic) { return 'Courier-BoldOblique'; } if (bold && !italic) { return 'Courier-Bold'; } if (!bold && italic) { return 'Courier-Oblique'; } if (!bold && !italic) { return 'Courier'; } } else if (family.match(/(?:^|,)\s*sans-serif\s*$/) || true) { if (bold && italic) { return 'Helvetica-BoldOblique'; } if (bold && !italic) { return 'Helvetica-Bold'; } if (!bold && italic) { return 'Helvetica-Oblique'; } if (!bold && !italic) { return 'Helvetica'; } } }; } if (typeof imageCallback !== 'function') { imageCallback = function imageCallback(link) { return link.replace(/\s+/g, ''); }; } if (typeof colorCallback !== 'function') { colorCallback = null; } else { for (var color in DefaultColors) { var newColor = colorCallback(DefaultColors[color]); DefaultColors[color][0] = newColor[0]; DefaultColors[color][1] = newColor[1]; } } if (typeof documentCallback !== 'function') { documentCallback = null; } if (typeof svg === 'string') { svg = parseXml(svg); } if (svg) { var styles = svg.getElementsByTagName('style'); for (var i = 0; i < styles.length; i++) { styleRules = styleRules.concat(parseStyleSheet(styles[i].textContent)); } var elem = createSVGElement(svg, null); if (typeof elem.drawInDocument === 'function') { if (options.useCSS && !useCSS) { warningCallback('SVGtoPDF: useCSS option can only be used for SVG *elements* in compatible browsers'); } var savedFillColor = doc._fillColor; doc.save().translate(x || 0, y || 0).scale(pxToPt); elem.drawInDocument(); for (var _i8 = 0; _i8 < links.length; _i8++) { doc.page.annotations.push(links[_i8]); } doc.restore(); doc._fillColor = savedFillColor; } else { warningCallback('SVGtoPDF: this element can\'t be rendered directly: ' + svg.nodeName); } } else { warningCallback('SVGtoPDF: the input does not look like a valid SVG'); } }; if ( true && module && typeof module.exports !== 'undefined') { module.exports = SVGtoPDF; } /***/ }), /***/ 9742: /***/ (function(__unused_webpack_module, exports) { "use strict"; exports.byteLength = byteLength exports.toByteArray = toByteArray exports.fromByteArray = fromByteArray var lookup = [] var revLookup = [] var Arr = typeof Uint8Array !== 'undefined' ? Uint8Array : Array var code = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/' for (var i = 0, len = code.length; i < len; ++i) { lookup[i] = code[i] revLookup[code.charCodeAt(i)] = i } // Support decoding URL-safe base64 strings, as Node.js does. // See: https://en.wikipedia.org/wiki/Base64#URL_applications revLookup['-'.charCodeAt(0)] = 62 revLookup['_'.charCodeAt(0)] = 63 function getLens (b64) { var len = b64.length if (len % 4 > 0) { throw new Error('Invalid string. Length must be a multiple of 4') } // Trim off extra bytes after placeholder bytes are found // See: https://github.com/beatgammit/base64-js/issues/42 var validLen = b64.indexOf('=') if (validLen === -1) validLen = len var placeHoldersLen = validLen === len ? 0 : 4 - (validLen % 4) return [validLen, placeHoldersLen] } // base64 is 4/3 + up to two characters of the original data function byteLength (b64) { var lens = getLens(b64) var validLen = lens[0] var placeHoldersLen = lens[1] return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen } function _byteLength (b64, validLen, placeHoldersLen) { return ((validLen + placeHoldersLen) * 3 / 4) - placeHoldersLen } function toByteArray (b64) { var tmp var lens = getLens(b64) var validLen = lens[0] var placeHoldersLen = lens[1] var arr = new Arr(_byteLength(b64, validLen, placeHoldersLen)) var curByte = 0 // if there are placeholders, only get up to the last complete 4 chars var len = placeHoldersLen > 0 ? validLen - 4 : validLen var i for (i = 0; i < len; i += 4) { tmp = (revLookup[b64.charCodeAt(i)] << 18) | (revLookup[b64.charCodeAt(i + 1)] << 12) | (revLookup[b64.charCodeAt(i + 2)] << 6) | revLookup[b64.charCodeAt(i + 3)] arr[curByte++] = (tmp >> 16) & 0xFF arr[curByte++] = (tmp >> 8) & 0xFF arr[curByte++] = tmp & 0xFF } if (placeHoldersLen === 2) { tmp = (revLookup[b64.charCodeAt(i)] << 2) | (revLookup[b64.charCodeAt(i + 1)] >> 4) arr[curByte++] = tmp & 0xFF } if (placeHoldersLen === 1) { tmp = (revLookup[b64.charCodeAt(i)] << 10) | (revLookup[b64.charCodeAt(i + 1)] << 4) | (revLookup[b64.charCodeAt(i + 2)] >> 2) arr[curByte++] = (tmp >> 8) & 0xFF arr[curByte++] = tmp & 0xFF } return arr } function tripletToBase64 (num) { return lookup[num >> 18 & 0x3F] + lookup[num >> 12 & 0x3F] + lookup[num >> 6 & 0x3F] + lookup[num & 0x3F] } function encodeChunk (uint8, start, end) { var tmp var output = [] for (var i = start; i < end; i += 3) { tmp = ((uint8[i] << 16) & 0xFF0000) + ((uint8[i + 1] << 8) & 0xFF00) + (uint8[i + 2] & 0xFF) output.push(tripletToBase64(tmp)) } return output.join('') } function fromByteArray (uint8) { var tmp var len = uint8.length var extraBytes = len % 3 // if we have 1 byte left, pad 2 bytes var parts = [] var maxChunkLength = 16383 // must be multiple of 3 // go through the array every three bytes, we'll deal with trailing stuff later for (var i = 0, len2 = len - extraBytes; i < len2; i += maxChunkLength) { parts.push(encodeChunk( uint8, i, (i + maxChunkLength) > len2 ? len2 : (i + maxChunkLength) )) } // pad the end with zeros, but make sure to not forget the extra bytes if (extraBytes === 1) { tmp = uint8[len - 1] parts.push( lookup[tmp >> 2] + lookup[(tmp << 4) & 0x3F] + '==' ) } else if (extraBytes === 2) { tmp = (uint8[len - 2] << 8) + uint8[len - 1] parts.push( lookup[tmp >> 10] + lookup[(tmp >> 4) & 0x3F] + lookup[(tmp << 2) & 0x3F] + '=' ) } return parts.join('') } /***/ }), /***/ 4181: /***/ (function(module) { /* Copyright 2013 Google Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Bit reading helpers */ var BROTLI_READ_SIZE = 4096; var BROTLI_IBUF_SIZE = (2 * BROTLI_READ_SIZE + 32); var BROTLI_IBUF_MASK = (2 * BROTLI_READ_SIZE - 1); var kBitMask = new Uint32Array([ 0, 1, 3, 7, 15, 31, 63, 127, 255, 511, 1023, 2047, 4095, 8191, 16383, 32767, 65535, 131071, 262143, 524287, 1048575, 2097151, 4194303, 8388607, 16777215 ]); /* Input byte buffer, consist of a ringbuffer and a "slack" region where */ /* bytes from the start of the ringbuffer are copied. */ function BrotliBitReader(input) { this.buf_ = new Uint8Array(BROTLI_IBUF_SIZE); this.input_ = input; /* input callback */ this.reset(); } BrotliBitReader.READ_SIZE = BROTLI_READ_SIZE; BrotliBitReader.IBUF_MASK = BROTLI_IBUF_MASK; BrotliBitReader.prototype.reset = function() { this.buf_ptr_ = 0; /* next input will write here */ this.val_ = 0; /* pre-fetched bits */ this.pos_ = 0; /* byte position in stream */ this.bit_pos_ = 0; /* current bit-reading position in val_ */ this.bit_end_pos_ = 0; /* bit-reading end position from LSB of val_ */ this.eos_ = 0; /* input stream is finished */ this.readMoreInput(); for (var i = 0; i < 4; i++) { this.val_ |= this.buf_[this.pos_] << (8 * i); ++this.pos_; } return this.bit_end_pos_ > 0; }; /* Fills up the input ringbuffer by calling the input callback. Does nothing if there are at least 32 bytes present after current position. Returns 0 if either: - the input callback returned an error, or - there is no more input and the position is past the end of the stream. After encountering the end of the input stream, 32 additional zero bytes are copied to the ringbuffer, therefore it is safe to call this function after every 32 bytes of input is read. */ BrotliBitReader.prototype.readMoreInput = function() { if (this.bit_end_pos_ > 256) { return; } else if (this.eos_) { if (this.bit_pos_ > this.bit_end_pos_) throw new Error('Unexpected end of input ' + this.bit_pos_ + ' ' + this.bit_end_pos_); } else { var dst = this.buf_ptr_; var bytes_read = this.input_.read(this.buf_, dst, BROTLI_READ_SIZE); if (bytes_read < 0) { throw new Error('Unexpected end of input'); } if (bytes_read < BROTLI_READ_SIZE) { this.eos_ = 1; /* Store 32 bytes of zero after the stream end. */ for (var p = 0; p < 32; p++) this.buf_[dst + bytes_read + p] = 0; } if (dst === 0) { /* Copy the head of the ringbuffer to the slack region. */ for (var p = 0; p < 32; p++) this.buf_[(BROTLI_READ_SIZE << 1) + p] = this.buf_[p]; this.buf_ptr_ = BROTLI_READ_SIZE; } else { this.buf_ptr_ = 0; } this.bit_end_pos_ += bytes_read << 3; } }; /* Guarantees that there are at least 24 bits in the buffer. */ BrotliBitReader.prototype.fillBitWindow = function() { while (this.bit_pos_ >= 8) { this.val_ >>>= 8; this.val_ |= this.buf_[this.pos_ & BROTLI_IBUF_MASK] << 24; ++this.pos_; this.bit_pos_ = this.bit_pos_ - 8 >>> 0; this.bit_end_pos_ = this.bit_end_pos_ - 8 >>> 0; } }; /* Reads the specified number of bits from Read Buffer. */ BrotliBitReader.prototype.readBits = function(n_bits) { if (32 - this.bit_pos_ < n_bits) { this.fillBitWindow(); } var val = ((this.val_ >>> this.bit_pos_) & kBitMask[n_bits]); this.bit_pos_ += n_bits; return val; }; module.exports = BrotliBitReader; /***/ }), /***/ 7080: /***/ (function(__unused_webpack_module, exports) { /* Copyright 2013 Google Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Lookup table to map the previous two bytes to a context id. There are four different context modeling modes defined here: CONTEXT_LSB6: context id is the least significant 6 bits of the last byte, CONTEXT_MSB6: context id is the most significant 6 bits of the last byte, CONTEXT_UTF8: second-order context model tuned for UTF8-encoded text, CONTEXT_SIGNED: second-order context model tuned for signed integers. The context id for the UTF8 context model is calculated as follows. If p1 and p2 are the previous two bytes, we calcualte the context as context = kContextLookup[p1] | kContextLookup[p2 + 256]. If the previous two bytes are ASCII characters (i.e. < 128), this will be equivalent to context = 4 * context1(p1) + context2(p2), where context1 is based on the previous byte in the following way: 0 : non-ASCII control 1 : \t, \n, \r 2 : space 3 : other punctuation 4 : " ' 5 : % 6 : ( < [ { 7 : ) > ] } 8 : , ; : 9 : . 10 : = 11 : number 12 : upper-case vowel 13 : upper-case consonant 14 : lower-case vowel 15 : lower-case consonant and context2 is based on the second last byte: 0 : control, space 1 : punctuation 2 : upper-case letter, number 3 : lower-case letter If the last byte is ASCII, and the second last byte is not (in a valid UTF8 stream it will be a continuation byte, value between 128 and 191), the context is the same as if the second last byte was an ASCII control or space. If the last byte is a UTF8 lead byte (value >= 192), then the next byte will be a continuation byte and the context id is 2 or 3 depending on the LSB of the last byte and to a lesser extent on the second last byte if it is ASCII. If the last byte is a UTF8 continuation byte, the second last byte can be: - continuation byte: the next byte is probably ASCII or lead byte (assuming 4-byte UTF8 characters are rare) and the context id is 0 or 1. - lead byte (192 - 207): next byte is ASCII or lead byte, context is 0 or 1 - lead byte (208 - 255): next byte is continuation byte, context is 2 or 3 The possible value combinations of the previous two bytes, the range of context ids and the type of the next byte is summarized in the table below: |--------\-----------------------------------------------------------------| | \ Last byte | | Second \---------------------------------------------------------------| | last byte \ ASCII | cont. byte | lead byte | | \ (0-127) | (128-191) | (192-) | |=============|===================|=====================|==================| | ASCII | next: ASCII/lead | not valid | next: cont. | | (0-127) | context: 4 - 63 | | context: 2 - 3 | |-------------|-------------------|---------------------|------------------| | cont. byte | next: ASCII/lead | next: ASCII/lead | next: cont. | | (128-191) | context: 4 - 63 | context: 0 - 1 | context: 2 - 3 | |-------------|-------------------|---------------------|------------------| | lead byte | not valid | next: ASCII/lead | not valid | | (192-207) | | context: 0 - 1 | | |-------------|-------------------|---------------------|------------------| | lead byte | not valid | next: cont. | not valid | | (208-) | | context: 2 - 3 | | |-------------|-------------------|---------------------|------------------| The context id for the signed context mode is calculated as: context = (kContextLookup[512 + p1] << 3) | kContextLookup[512 + p2]. For any context modeling modes, the context ids can be calculated by |-ing together two lookups from one table using context model dependent offsets: context = kContextLookup[offset1 + p1] | kContextLookup[offset2 + p2]. where offset1 and offset2 are dependent on the context mode. */ var CONTEXT_LSB6 = 0; var CONTEXT_MSB6 = 1; var CONTEXT_UTF8 = 2; var CONTEXT_SIGNED = 3; /* Common context lookup table for all context modes. */ exports.lookup = new Uint8Array([ /* CONTEXT_UTF8, last byte. */ /* ASCII range. */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 12, 16, 12, 12, 20, 12, 16, 24, 28, 12, 12, 32, 12, 36, 12, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 32, 32, 24, 40, 28, 12, 12, 48, 52, 52, 52, 48, 52, 52, 52, 48, 52, 52, 52, 52, 52, 48, 52, 52, 52, 52, 52, 48, 52, 52, 52, 52, 52, 24, 12, 28, 12, 12, 12, 56, 60, 60, 60, 56, 60, 60, 60, 56, 60, 60, 60, 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, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, /* CONTEXT_SIGNED, last byte, same as the above values shifted by 3 bits. */ 0, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 56, /* CONTEXT_LSB6, last byte. */ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, /* CONTEXT_MSB6, last byte. */ 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 22, 22, 22, 22, 23, 23, 23, 23, 24, 24, 24, 24, 25, 25, 25, 25, 26, 26, 26, 26, 27, 27, 27, 27, 28, 28, 28, 28, 29, 29, 29, 29, 30, 30, 30, 30, 31, 31, 31, 31, 32, 32, 32, 32, 33, 33, 33, 33, 34, 34, 34, 34, 35, 35, 35, 35, 36, 36, 36, 36, 37, 37, 37, 37, 38, 38, 38, 38, 39, 39, 39, 39, 40, 40, 40, 40, 41, 41, 41, 41, 42, 42, 42, 42, 43, 43, 43, 43, 44, 44, 44, 44, 45, 45, 45, 45, 46, 46, 46, 46, 47, 47, 47, 47, 48, 48, 48, 48, 49, 49, 49, 49, 50, 50, 50, 50, 51, 51, 51, 51, 52, 52, 52, 52, 53, 53, 53, 53, 54, 54, 54, 54, 55, 55, 55, 55, 56, 56, 56, 56, 57, 57, 57, 57, 58, 58, 58, 58, 59, 59, 59, 59, 60, 60, 60, 60, 61, 61, 61, 61, 62, 62, 62, 62, 63, 63, 63, 63, /* CONTEXT_{M,L}SB6, second last byte, */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ]); exports.lookupOffsets = new Uint16Array([ /* CONTEXT_LSB6 */ 1024, 1536, /* CONTEXT_MSB6 */ 1280, 1536, /* CONTEXT_UTF8 */ 0, 256, /* CONTEXT_SIGNED */ 768, 512, ]); /***/ }), /***/ 6450: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { var __webpack_unused_export__; /* Copyright 2013 Google Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ var BrotliInput = (__webpack_require__(6154)/* .BrotliInput */ .g); var BrotliOutput = (__webpack_require__(6154)/* .BrotliOutput */ .j); var BrotliBitReader = __webpack_require__(4181); var BrotliDictionary = __webpack_require__(5139); var HuffmanCode = (__webpack_require__(966)/* .HuffmanCode */ .h); var BrotliBuildHuffmanTable = (__webpack_require__(966)/* .BrotliBuildHuffmanTable */ .g); var Context = __webpack_require__(7080); var Prefix = __webpack_require__(8435); var Transform = __webpack_require__(2973); var kDefaultCodeLength = 8; var kCodeLengthRepeatCode = 16; var kNumLiteralCodes = 256; var kNumInsertAndCopyCodes = 704; var kNumBlockLengthCodes = 26; var kLiteralContextBits = 6; var kDistanceContextBits = 2; var HUFFMAN_TABLE_BITS = 8; var HUFFMAN_TABLE_MASK = 0xff; /* Maximum possible Huffman table size for an alphabet size of 704, max code * length 15 and root table bits 8. */ var HUFFMAN_MAX_TABLE_SIZE = 1080; var CODE_LENGTH_CODES = 18; var kCodeLengthCodeOrder = new Uint8Array([ 1, 2, 3, 4, 0, 5, 17, 6, 16, 7, 8, 9, 10, 11, 12, 13, 14, 15, ]); var NUM_DISTANCE_SHORT_CODES = 16; var kDistanceShortCodeIndexOffset = new Uint8Array([ 3, 2, 1, 0, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2 ]); var kDistanceShortCodeValueOffset = new Int8Array([ 0, 0, 0, 0, -1, 1, -2, 2, -3, 3, -1, 1, -2, 2, -3, 3 ]); var kMaxHuffmanTableSize = new Uint16Array([ 256, 402, 436, 468, 500, 534, 566, 598, 630, 662, 694, 726, 758, 790, 822, 854, 886, 920, 952, 984, 1016, 1048, 1080 ]); function DecodeWindowBits(br) { var n; if (br.readBits(1) === 0) { return 16; } n = br.readBits(3); if (n > 0) { return 17 + n; } n = br.readBits(3); if (n > 0) { return 8 + n; } return 17; } /* Decodes a number in the range [0..255], by reading 1 - 11 bits. */ function DecodeVarLenUint8(br) { if (br.readBits(1)) { var nbits = br.readBits(3); if (nbits === 0) { return 1; } else { return br.readBits(nbits) + (1 << nbits); } } return 0; } function MetaBlockLength() { this.meta_block_length = 0; this.input_end = 0; this.is_uncompressed = 0; this.is_metadata = false; } function DecodeMetaBlockLength(br) { var out = new MetaBlockLength; var size_nibbles; var size_bytes; var i; out.input_end = br.readBits(1); if (out.input_end && br.readBits(1)) { return out; } size_nibbles = br.readBits(2) + 4; if (size_nibbles === 7) { out.is_metadata = true; if (br.readBits(1) !== 0) throw new Error('Invalid reserved bit'); size_bytes = br.readBits(2); if (size_bytes === 0) return out; for (i = 0; i < size_bytes; i++) { var next_byte = br.readBits(8); if (i + 1 === size_bytes && size_bytes > 1 && next_byte === 0) throw new Error('Invalid size byte'); out.meta_block_length |= next_byte << (i * 8); } } else { for (i = 0; i < size_nibbles; ++i) { var next_nibble = br.readBits(4); if (i + 1 === size_nibbles && size_nibbles > 4 && next_nibble === 0) throw new Error('Invalid size nibble'); out.meta_block_length |= next_nibble << (i * 4); } } ++out.meta_block_length; if (!out.input_end && !out.is_metadata) { out.is_uncompressed = br.readBits(1); } return out; } /* Decodes the next Huffman code from bit-stream. */ function ReadSymbol(table, index, br) { var start_index = index; var nbits; br.fillBitWindow(); index += (br.val_ >>> br.bit_pos_) & HUFFMAN_TABLE_MASK; nbits = table[index].bits - HUFFMAN_TABLE_BITS; if (nbits > 0) { br.bit_pos_ += HUFFMAN_TABLE_BITS; index += table[index].value; index += (br.val_ >>> br.bit_pos_) & ((1 << nbits) - 1); } br.bit_pos_ += table[index].bits; return table[index].value; } function ReadHuffmanCodeLengths(code_length_code_lengths, num_symbols, code_lengths, br) { var symbol = 0; var prev_code_len = kDefaultCodeLength; var repeat = 0; var repeat_code_len = 0; var space = 32768; var table = []; for (var i = 0; i < 32; i++) table.push(new HuffmanCode(0, 0)); BrotliBuildHuffmanTable(table, 0, 5, code_length_code_lengths, CODE_LENGTH_CODES); while (symbol < num_symbols && space > 0) { var p = 0; var code_len; br.readMoreInput(); br.fillBitWindow(); p += (br.val_ >>> br.bit_pos_) & 31; br.bit_pos_ += table[p].bits; code_len = table[p].value & 0xff; if (code_len < kCodeLengthRepeatCode) { repeat = 0; code_lengths[symbol++] = code_len; if (code_len !== 0) { prev_code_len = code_len; space -= 32768 >> code_len; } } else { var extra_bits = code_len - 14; var old_repeat; var repeat_delta; var new_len = 0; if (code_len === kCodeLengthRepeatCode) { new_len = prev_code_len; } if (repeat_code_len !== new_len) { repeat = 0; repeat_code_len = new_len; } old_repeat = repeat; if (repeat > 0) { repeat -= 2; repeat <<= extra_bits; } repeat += br.readBits(extra_bits) + 3; repeat_delta = repeat - old_repeat; if (symbol + repeat_delta > num_symbols) { throw new Error('[ReadHuffmanCodeLengths] symbol + repeat_delta > num_symbols'); } for (var x = 0; x < repeat_delta; x++) code_lengths[symbol + x] = repeat_code_len; symbol += repeat_delta; if (repeat_code_len !== 0) { space -= repeat_delta << (15 - repeat_code_len); } } } if (space !== 0) { throw new Error("[ReadHuffmanCodeLengths] space = " + space); } for (; symbol < num_symbols; symbol++) code_lengths[symbol] = 0; } function ReadHuffmanCode(alphabet_size, tables, table, br) { var table_size = 0; var simple_code_or_skip; var code_lengths = new Uint8Array(alphabet_size); br.readMoreInput(); /* simple_code_or_skip is used as follows: 1 for simple code; 0 for no skipping, 2 skips 2 code lengths, 3 skips 3 code lengths */ simple_code_or_skip = br.readBits(2); if (simple_code_or_skip === 1) { /* Read symbols, codes & code lengths directly. */ var i; var max_bits_counter = alphabet_size - 1; var max_bits = 0; var symbols = new Int32Array(4); var num_symbols = br.readBits(2) + 1; while (max_bits_counter) { max_bits_counter >>= 1; ++max_bits; } for (i = 0; i < num_symbols; ++i) { symbols[i] = br.readBits(max_bits) % alphabet_size; code_lengths[symbols[i]] = 2; } code_lengths[symbols[0]] = 1; switch (num_symbols) { case 1: break; case 3: if ((symbols[0] === symbols[1]) || (symbols[0] === symbols[2]) || (symbols[1] === symbols[2])) { throw new Error('[ReadHuffmanCode] invalid symbols'); } break; case 2: if (symbols[0] === symbols[1]) { throw new Error('[ReadHuffmanCode] invalid symbols'); } code_lengths[symbols[1]] = 1; break; case 4: if ((symbols[0] === symbols[1]) || (symbols[0] === symbols[2]) || (symbols[0] === symbols[3]) || (symbols[1] === symbols[2]) || (symbols[1] === symbols[3]) || (symbols[2] === symbols[3])) { throw new Error('[ReadHuffmanCode] invalid symbols'); } if (br.readBits(1)) { code_lengths[symbols[2]] = 3; code_lengths[symbols[3]] = 3; } else { code_lengths[symbols[0]] = 2; } break; } } else { /* Decode Huffman-coded code lengths. */ var i; var code_length_code_lengths = new Uint8Array(CODE_LENGTH_CODES); var space = 32; var num_codes = 0; /* Static Huffman code for the code length code lengths */ var huff = [ new HuffmanCode(2, 0), new HuffmanCode(2, 4), new HuffmanCode(2, 3), new HuffmanCode(3, 2), new HuffmanCode(2, 0), new HuffmanCode(2, 4), new HuffmanCode(2, 3), new HuffmanCode(4, 1), new HuffmanCode(2, 0), new HuffmanCode(2, 4), new HuffmanCode(2, 3), new HuffmanCode(3, 2), new HuffmanCode(2, 0), new HuffmanCode(2, 4), new HuffmanCode(2, 3), new HuffmanCode(4, 5) ]; for (i = simple_code_or_skip; i < CODE_LENGTH_CODES && space > 0; ++i) { var code_len_idx = kCodeLengthCodeOrder[i]; var p = 0; var v; br.fillBitWindow(); p += (br.val_ >>> br.bit_pos_) & 15; br.bit_pos_ += huff[p].bits; v = huff[p].value; code_length_code_lengths[code_len_idx] = v; if (v !== 0) { space -= (32 >> v); ++num_codes; } } if (!(num_codes === 1 || space === 0)) throw new Error('[ReadHuffmanCode] invalid num_codes or space'); ReadHuffmanCodeLengths(code_length_code_lengths, alphabet_size, code_lengths, br); } table_size = BrotliBuildHuffmanTable(tables, table, HUFFMAN_TABLE_BITS, code_lengths, alphabet_size); if (table_size === 0) { throw new Error("[ReadHuffmanCode] BuildHuffmanTable failed: "); } return table_size; } function ReadBlockLength(table, index, br) { var code; var nbits; code = ReadSymbol(table, index, br); nbits = Prefix.kBlockLengthPrefixCode[code].nbits; return Prefix.kBlockLengthPrefixCode[code].offset + br.readBits(nbits); } function TranslateShortCodes(code, ringbuffer, index) { var val; if (code < NUM_DISTANCE_SHORT_CODES) { index += kDistanceShortCodeIndexOffset[code]; index &= 3; val = ringbuffer[index] + kDistanceShortCodeValueOffset[code]; } else { val = code - NUM_DISTANCE_SHORT_CODES + 1; } return val; } function MoveToFront(v, index) { var value = v[index]; var i = index; for (; i; --i) v[i] = v[i - 1]; v[0] = value; } function InverseMoveToFrontTransform(v, v_len) { var mtf = new Uint8Array(256); var i; for (i = 0; i < 256; ++i) { mtf[i] = i; } for (i = 0; i < v_len; ++i) { var index = v[i]; v[i] = mtf[index]; if (index) MoveToFront(mtf, index); } } /* Contains a collection of huffman trees with the same alphabet size. */ function HuffmanTreeGroup(alphabet_size, num_htrees) { this.alphabet_size = alphabet_size; this.num_htrees = num_htrees; this.codes = new Array(num_htrees + num_htrees * kMaxHuffmanTableSize[(alphabet_size + 31) >>> 5]); this.htrees = new Uint32Array(num_htrees); } HuffmanTreeGroup.prototype.decode = function(br) { var i; var table_size; var next = 0; for (i = 0; i < this.num_htrees; ++i) { this.htrees[i] = next; table_size = ReadHuffmanCode(this.alphabet_size, this.codes, next, br); next += table_size; } }; function DecodeContextMap(context_map_size, br) { var out = { num_htrees: null, context_map: null }; var use_rle_for_zeros; var max_run_length_prefix = 0; var table; var i; br.readMoreInput(); var num_htrees = out.num_htrees = DecodeVarLenUint8(br) + 1; var context_map = out.context_map = new Uint8Array(context_map_size); if (num_htrees <= 1) { return out; } use_rle_for_zeros = br.readBits(1); if (use_rle_for_zeros) { max_run_length_prefix = br.readBits(4) + 1; } table = []; for (i = 0; i < HUFFMAN_MAX_TABLE_SIZE; i++) { table[i] = new HuffmanCode(0, 0); } ReadHuffmanCode(num_htrees + max_run_length_prefix, table, 0, br); for (i = 0; i < context_map_size;) { var code; br.readMoreInput(); code = ReadSymbol(table, 0, br); if (code === 0) { context_map[i] = 0; ++i; } else if (code <= max_run_length_prefix) { var reps = 1 + (1 << code) + br.readBits(code); while (--reps) { if (i >= context_map_size) { throw new Error("[DecodeContextMap] i >= context_map_size"); } context_map[i] = 0; ++i; } } else { context_map[i] = code - max_run_length_prefix; ++i; } } if (br.readBits(1)) { InverseMoveToFrontTransform(context_map, context_map_size); } return out; } function DecodeBlockType(max_block_type, trees, tree_type, block_types, ringbuffers, indexes, br) { var ringbuffer = tree_type * 2; var index = tree_type; var type_code = ReadSymbol(trees, tree_type * HUFFMAN_MAX_TABLE_SIZE, br); var block_type; if (type_code === 0) { block_type = ringbuffers[ringbuffer + (indexes[index] & 1)]; } else if (type_code === 1) { block_type = ringbuffers[ringbuffer + ((indexes[index] - 1) & 1)] + 1; } else { block_type = type_code - 2; } if (block_type >= max_block_type) { block_type -= max_block_type; } block_types[tree_type] = block_type; ringbuffers[ringbuffer + (indexes[index] & 1)] = block_type; ++indexes[index]; } function CopyUncompressedBlockToOutput(output, len, pos, ringbuffer, ringbuffer_mask, br) { var rb_size = ringbuffer_mask + 1; var rb_pos = pos & ringbuffer_mask; var br_pos = br.pos_ & BrotliBitReader.IBUF_MASK; var nbytes; /* For short lengths copy byte-by-byte */ if (len < 8 || br.bit_pos_ + (len << 3) < br.bit_end_pos_) { while (len-- > 0) { br.readMoreInput(); ringbuffer[rb_pos++] = br.readBits(8); if (rb_pos === rb_size) { output.write(ringbuffer, rb_size); rb_pos = 0; } } return; } if (br.bit_end_pos_ < 32) { throw new Error('[CopyUncompressedBlockToOutput] br.bit_end_pos_ < 32'); } /* Copy remaining 0-4 bytes from br.val_ to ringbuffer. */ while (br.bit_pos_ < 32) { ringbuffer[rb_pos] = (br.val_ >>> br.bit_pos_); br.bit_pos_ += 8; ++rb_pos; --len; } /* Copy remaining bytes from br.buf_ to ringbuffer. */ nbytes = (br.bit_end_pos_ - br.bit_pos_) >> 3; if (br_pos + nbytes > BrotliBitReader.IBUF_MASK) { var tail = BrotliBitReader.IBUF_MASK + 1 - br_pos; for (var x = 0; x < tail; x++) ringbuffer[rb_pos + x] = br.buf_[br_pos + x]; nbytes -= tail; rb_pos += tail; len -= tail; br_pos = 0; } for (var x = 0; x < nbytes; x++) ringbuffer[rb_pos + x] = br.buf_[br_pos + x]; rb_pos += nbytes; len -= nbytes; /* If we wrote past the logical end of the ringbuffer, copy the tail of the ringbuffer to its beginning and flush the ringbuffer to the output. */ if (rb_pos >= rb_size) { output.write(ringbuffer, rb_size); rb_pos -= rb_size; for (var x = 0; x < rb_pos; x++) ringbuffer[x] = ringbuffer[rb_size + x]; } /* If we have more to copy than the remaining size of the ringbuffer, then we first fill the ringbuffer from the input and then flush the ringbuffer to the output */ while (rb_pos + len >= rb_size) { nbytes = rb_size - rb_pos; if (br.input_.read(ringbuffer, rb_pos, nbytes) < nbytes) { throw new Error('[CopyUncompressedBlockToOutput] not enough bytes'); } output.write(ringbuffer, rb_size); len -= nbytes; rb_pos = 0; } /* Copy straight from the input onto the ringbuffer. The ringbuffer will be flushed to the output at a later time. */ if (br.input_.read(ringbuffer, rb_pos, len) < len) { throw new Error('[CopyUncompressedBlockToOutput] not enough bytes'); } /* Restore the state of the bit reader. */ br.reset(); } /* Advances the bit reader position to the next byte boundary and verifies that any skipped bits are set to zero. */ function JumpToByteBoundary(br) { var new_bit_pos = (br.bit_pos_ + 7) & ~7; var pad_bits = br.readBits(new_bit_pos - br.bit_pos_); return pad_bits == 0; } function BrotliDecompressedSize(buffer) { var input = new BrotliInput(buffer); var br = new BrotliBitReader(input); DecodeWindowBits(br); var out = DecodeMetaBlockLength(br); return out.meta_block_length; } __webpack_unused_export__ = BrotliDecompressedSize; function BrotliDecompressBuffer(buffer, output_size) { var input = new BrotliInput(buffer); if (output_size == null) { output_size = BrotliDecompressedSize(buffer); } var output_buffer = new Uint8Array(output_size); var output = new BrotliOutput(output_buffer); BrotliDecompress(input, output); if (output.pos < output.buffer.length) { output.buffer = output.buffer.subarray(0, output.pos); } return output.buffer; } exports.BrotliDecompressBuffer = BrotliDecompressBuffer; function BrotliDecompress(input, output) { var i; var pos = 0; var input_end = 0; var window_bits = 0; var max_backward_distance; var max_distance = 0; var ringbuffer_size; var ringbuffer_mask; var ringbuffer; var ringbuffer_end; /* This ring buffer holds a few past copy distances that will be used by */ /* some special distance codes. */ var dist_rb = [ 16, 15, 11, 4 ]; var dist_rb_idx = 0; /* The previous 2 bytes used for context. */ var prev_byte1 = 0; var prev_byte2 = 0; var hgroup = [new HuffmanTreeGroup(0, 0), new HuffmanTreeGroup(0, 0), new HuffmanTreeGroup(0, 0)]; var block_type_trees; var block_len_trees; var br; /* We need the slack region for the following reasons: - always doing two 8-byte copies for fast backward copying - transforms - flushing the input ringbuffer when decoding uncompressed blocks */ var kRingBufferWriteAheadSlack = 128 + BrotliBitReader.READ_SIZE; br = new BrotliBitReader(input); /* Decode window size. */ window_bits = DecodeWindowBits(br); max_backward_distance = (1 << window_bits) - 16; ringbuffer_size = 1 << window_bits; ringbuffer_mask = ringbuffer_size - 1; ringbuffer = new Uint8Array(ringbuffer_size + kRingBufferWriteAheadSlack + BrotliDictionary.maxDictionaryWordLength); ringbuffer_end = ringbuffer_size; block_type_trees = []; block_len_trees = []; for (var x = 0; x < 3 * HUFFMAN_MAX_TABLE_SIZE; x++) { block_type_trees[x] = new HuffmanCode(0, 0); block_len_trees[x] = new HuffmanCode(0, 0); } while (!input_end) { var meta_block_remaining_len = 0; var is_uncompressed; var block_length = [ 1 << 28, 1 << 28, 1 << 28 ]; var block_type = [ 0 ]; var num_block_types = [ 1, 1, 1 ]; var block_type_rb = [ 0, 1, 0, 1, 0, 1 ]; var block_type_rb_index = [ 0 ]; var distance_postfix_bits; var num_direct_distance_codes; var distance_postfix_mask; var num_distance_codes; var context_map = null; var context_modes = null; var num_literal_htrees; var dist_context_map = null; var num_dist_htrees; var context_offset = 0; var context_map_slice = null; var literal_htree_index = 0; var dist_context_offset = 0; var dist_context_map_slice = null; var dist_htree_index = 0; var context_lookup_offset1 = 0; var context_lookup_offset2 = 0; var context_mode; var htree_command; for (i = 0; i < 3; ++i) { hgroup[i].codes = null; hgroup[i].htrees = null; } br.readMoreInput(); var _out = DecodeMetaBlockLength(br); meta_block_remaining_len = _out.meta_block_length; if (pos + meta_block_remaining_len > output.buffer.length) { /* We need to grow the output buffer to fit the additional data. */ var tmp = new Uint8Array( pos + meta_block_remaining_len ); tmp.set( output.buffer ); output.buffer = tmp; } input_end = _out.input_end; is_uncompressed = _out.is_uncompressed; if (_out.is_metadata) { JumpToByteBoundary(br); for (; meta_block_remaining_len > 0; --meta_block_remaining_len) { br.readMoreInput(); /* Read one byte and ignore it. */ br.readBits(8); } continue; } if (meta_block_remaining_len === 0) { continue; } if (is_uncompressed) { br.bit_pos_ = (br.bit_pos_ + 7) & ~7; CopyUncompressedBlockToOutput(output, meta_block_remaining_len, pos, ringbuffer, ringbuffer_mask, br); pos += meta_block_remaining_len; continue; } for (i = 0; i < 3; ++i) { num_block_types[i] = DecodeVarLenUint8(br) + 1; if (num_block_types[i] >= 2) { ReadHuffmanCode(num_block_types[i] + 2, block_type_trees, i * HUFFMAN_MAX_TABLE_SIZE, br); ReadHuffmanCode(kNumBlockLengthCodes, block_len_trees, i * HUFFMAN_MAX_TABLE_SIZE, br); block_length[i] = ReadBlockLength(block_len_trees, i * HUFFMAN_MAX_TABLE_SIZE, br); block_type_rb_index[i] = 1; } } br.readMoreInput(); distance_postfix_bits = br.readBits(2); num_direct_distance_codes = NUM_DISTANCE_SHORT_CODES + (br.readBits(4) << distance_postfix_bits); distance_postfix_mask = (1 << distance_postfix_bits) - 1; num_distance_codes = (num_direct_distance_codes + (48 << distance_postfix_bits)); context_modes = new Uint8Array(num_block_types[0]); for (i = 0; i < num_block_types[0]; ++i) { br.readMoreInput(); context_modes[i] = (br.readBits(2) << 1); } var _o1 = DecodeContextMap(num_block_types[0] << kLiteralContextBits, br); num_literal_htrees = _o1.num_htrees; context_map = _o1.context_map; var _o2 = DecodeContextMap(num_block_types[2] << kDistanceContextBits, br); num_dist_htrees = _o2.num_htrees; dist_context_map = _o2.context_map; hgroup[0] = new HuffmanTreeGroup(kNumLiteralCodes, num_literal_htrees); hgroup[1] = new HuffmanTreeGroup(kNumInsertAndCopyCodes, num_block_types[1]); hgroup[2] = new HuffmanTreeGroup(num_distance_codes, num_dist_htrees); for (i = 0; i < 3; ++i) { hgroup[i].decode(br); } context_map_slice = 0; dist_context_map_slice = 0; context_mode = context_modes[block_type[0]]; context_lookup_offset1 = Context.lookupOffsets[context_mode]; context_lookup_offset2 = Context.lookupOffsets[context_mode + 1]; htree_command = hgroup[1].htrees[0]; while (meta_block_remaining_len > 0) { var cmd_code; var range_idx; var insert_code; var copy_code; var insert_length; var copy_length; var distance_code; var distance; var context; var j; var copy_dst; br.readMoreInput(); if (block_length[1] === 0) { DecodeBlockType(num_block_types[1], block_type_trees, 1, block_type, block_type_rb, block_type_rb_index, br); block_length[1] = ReadBlockLength(block_len_trees, HUFFMAN_MAX_TABLE_SIZE, br); htree_command = hgroup[1].htrees[block_type[1]]; } --block_length[1]; cmd_code = ReadSymbol(hgroup[1].codes, htree_command, br); range_idx = cmd_code >> 6; if (range_idx >= 2) { range_idx -= 2; distance_code = -1; } else { distance_code = 0; } insert_code = Prefix.kInsertRangeLut[range_idx] + ((cmd_code >> 3) & 7); copy_code = Prefix.kCopyRangeLut[range_idx] + (cmd_code & 7); insert_length = Prefix.kInsertLengthPrefixCode[insert_code].offset + br.readBits(Prefix.kInsertLengthPrefixCode[insert_code].nbits); copy_length = Prefix.kCopyLengthPrefixCode[copy_code].offset + br.readBits(Prefix.kCopyLengthPrefixCode[copy_code].nbits); prev_byte1 = ringbuffer[pos-1 & ringbuffer_mask]; prev_byte2 = ringbuffer[pos-2 & ringbuffer_mask]; for (j = 0; j < insert_length; ++j) { br.readMoreInput(); if (block_length[0] === 0) { DecodeBlockType(num_block_types[0], block_type_trees, 0, block_type, block_type_rb, block_type_rb_index, br); block_length[0] = ReadBlockLength(block_len_trees, 0, br); context_offset = block_type[0] << kLiteralContextBits; context_map_slice = context_offset; context_mode = context_modes[block_type[0]]; context_lookup_offset1 = Context.lookupOffsets[context_mode]; context_lookup_offset2 = Context.lookupOffsets[context_mode + 1]; } context = (Context.lookup[context_lookup_offset1 + prev_byte1] | Context.lookup[context_lookup_offset2 + prev_byte2]); literal_htree_index = context_map[context_map_slice + context]; --block_length[0]; prev_byte2 = prev_byte1; prev_byte1 = ReadSymbol(hgroup[0].codes, hgroup[0].htrees[literal_htree_index], br); ringbuffer[pos & ringbuffer_mask] = prev_byte1; if ((pos & ringbuffer_mask) === ringbuffer_mask) { output.write(ringbuffer, ringbuffer_size); } ++pos; } meta_block_remaining_len -= insert_length; if (meta_block_remaining_len <= 0) break; if (distance_code < 0) { var context; br.readMoreInput(); if (block_length[2] === 0) { DecodeBlockType(num_block_types[2], block_type_trees, 2, block_type, block_type_rb, block_type_rb_index, br); block_length[2] = ReadBlockLength(block_len_trees, 2 * HUFFMAN_MAX_TABLE_SIZE, br); dist_context_offset = block_type[2] << kDistanceContextBits; dist_context_map_slice = dist_context_offset; } --block_length[2]; context = (copy_length > 4 ? 3 : copy_length - 2) & 0xff; dist_htree_index = dist_context_map[dist_context_map_slice + context]; distance_code = ReadSymbol(hgroup[2].codes, hgroup[2].htrees[dist_htree_index], br); if (distance_code >= num_direct_distance_codes) { var nbits; var postfix; var offset; distance_code -= num_direct_distance_codes; postfix = distance_code & distance_postfix_mask; distance_code >>= distance_postfix_bits; nbits = (distance_code >> 1) + 1; offset = ((2 + (distance_code & 1)) << nbits) - 4; distance_code = num_direct_distance_codes + ((offset + br.readBits(nbits)) << distance_postfix_bits) + postfix; } } /* Convert the distance code to the actual distance by possibly looking */ /* up past distnaces from the ringbuffer. */ distance = TranslateShortCodes(distance_code, dist_rb, dist_rb_idx); if (distance < 0) { throw new Error('[BrotliDecompress] invalid distance'); } if (pos < max_backward_distance && max_distance !== max_backward_distance) { max_distance = pos; } else { max_distance = max_backward_distance; } copy_dst = pos & ringbuffer_mask; if (distance > max_distance) { if (copy_length >= BrotliDictionary.minDictionaryWordLength && copy_length <= BrotliDictionary.maxDictionaryWordLength) { var offset = BrotliDictionary.offsetsByLength[copy_length]; var word_id = distance - max_distance - 1; var shift = BrotliDictionary.sizeBitsByLength[copy_length]; var mask = (1 << shift) - 1; var word_idx = word_id & mask; var transform_idx = word_id >> shift; offset += word_idx * copy_length; if (transform_idx < Transform.kNumTransforms) { var len = Transform.transformDictionaryWord(ringbuffer, copy_dst, offset, copy_length, transform_idx); copy_dst += len; pos += len; meta_block_remaining_len -= len; if (copy_dst >= ringbuffer_end) { output.write(ringbuffer, ringbuffer_size); for (var _x = 0; _x < (copy_dst - ringbuffer_end); _x++) ringbuffer[_x] = ringbuffer[ringbuffer_end + _x]; } } else { throw new Error("Invalid backward reference. pos: " + pos + " distance: " + distance + " len: " + copy_length + " bytes left: " + meta_block_remaining_len); } } else { throw new Error("Invalid backward reference. pos: " + pos + " distance: " + distance + " len: " + copy_length + " bytes left: " + meta_block_remaining_len); } } else { if (distance_code > 0) { dist_rb[dist_rb_idx & 3] = distance; ++dist_rb_idx; } if (copy_length > meta_block_remaining_len) { throw new Error("Invalid backward reference. pos: " + pos + " distance: " + distance + " len: " + copy_length + " bytes left: " + meta_block_remaining_len); } for (j = 0; j < copy_length; ++j) { ringbuffer[pos & ringbuffer_mask] = ringbuffer[(pos - distance) & ringbuffer_mask]; if ((pos & ringbuffer_mask) === ringbuffer_mask) { output.write(ringbuffer, ringbuffer_size); } ++pos; --meta_block_remaining_len; } } /* When we get here, we must have inserted at least one literal and */ /* made a copy of at least length two, therefore accessing the last 2 */ /* bytes is valid. */ prev_byte1 = ringbuffer[(pos - 1) & ringbuffer_mask]; prev_byte2 = ringbuffer[(pos - 2) & ringbuffer_mask]; } /* Protect pos from overflow, wrap it around at every GB of input data */ pos &= 0x3fffffff; } output.write(ringbuffer, pos & ringbuffer_mask); } __webpack_unused_export__ = BrotliDecompress; BrotliDictionary.init(); /***/ }), /***/ 5340: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { var base64 = __webpack_require__(9742); var fs = __webpack_require__(3857); /** * The normal dictionary-data.js is quite large, which makes it * unsuitable for browser usage. In order to make it smaller, * we read dictionary.bin, which is a compressed version of * the dictionary, and on initial load, Brotli decompresses * it's own dictionary. 😜 */ exports.init = function() { var BrotliDecompressBuffer = (__webpack_require__(6450).BrotliDecompressBuffer); var compressed = base64.toByteArray(__webpack_require__(2722)); return BrotliDecompressBuffer(compressed); }; /***/ }), /***/ 2722: /***/ (function(module) { module.exports="W5/fcQLn5gKf2XUbAiQ1XULX+TZz6ADToDsgqk6qVfeC0e4m6OO2wcQ1J76ZBVRV1fRkEsdu//62zQsFEZWSTCnMhcsQKlS2qOhuVYYMGCkV0fXWEoMFbESXrKEZ9wdUEsyw9g4bJlEt1Y6oVMxMRTEVbCIwZzJzboK5j8m4YH02qgXYhv1V+PM435sLVxyHJihaJREEhZGqL03txGFQLm76caGO/ovxKvzCby/3vMTtX/459f0igi7WutnKiMQ6wODSoRh/8Lx1V3Q99MvKtwB6bHdERY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iz+t2QyqH1O8x3JKZVl6Q+Lp/XK8wMjVMslOq9FdSw5FtUs/CptXH9PW+wbWHgrV17R5jTVOtGtKFu3nb80T+E0tv9QkzW3J2dbaw/8ddAKZ0pxIaEqLjlPrji3VgJ3GvdFvlqD8075woxh4fVt0JZE0KVFsAvqhe0dqN9b35jtSpnYMXkU+vZq+IAHad3IHc2s/LYrnD1anfG46IFiMIr9oNbZDWvwthqYNqOigaKd/XlLU4XHfk/PXIjPsLy/9/kAtQ+/wKH+hI/IROWj5FPvTZAT9f7j4ZXQyG4M0TujMAFXYkKvEHv1xhySekgXGGqNxWeWKlf8dDAlLuB1cb/qOD+rk7cmwt+1yKpk9cudqBanTi6zTbXRtV8qylNtjyOVKy1HTz0GW9rjt6sSjAZcT5R+KdtyYb0zyqG9pSLuCw5WBwAn7fjBjKLLoxLXMI+52L9cLwIR2B6OllJZLHJ8vDxmWdtF+QJnmt1rsHPIWY20lftk8fYePkAIg6Hgn532QoIpegMxiWgAOfe5/U44APR8Ac0NeZrVh3gEhs12W+tVSiWiUQekf/YBECUy5fdYbA08dd7VzPAP9aiVcIB9k6tY7WdJ1wNV+bHeydNtmC6G5ICtFC1ZwmJU/j8hf0I8TRVKSiz5oYIa93EpUI78X8GYIAZabx47/n8LDAAJ0nNtP1rpROprqKMBRecShca6qXuTSI3jZBLOB3Vp381B5rCGhjSvh/NSVkYp2qIdP/Bg="; /***/ }), /***/ 5139: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { /* Copyright 2013 Google Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Collection of static dictionary words. */ var data = __webpack_require__(5340); exports.init = function() { exports.dictionary = data.init(); }; exports.offsetsByLength = new Uint32Array([ 0, 0, 0, 0, 0, 4096, 9216, 21504, 35840, 44032, 53248, 63488, 74752, 87040, 93696, 100864, 104704, 106752, 108928, 113536, 115968, 118528, 119872, 121280, 122016, ]); exports.sizeBitsByLength = new Uint8Array([ 0, 0, 0, 0, 10, 10, 11, 11, 10, 10, 10, 10, 10, 9, 9, 8, 7, 7, 8, 7, 7, 6, 6, 5, 5, ]); exports.minDictionaryWordLength = 4; exports.maxDictionaryWordLength = 24; /***/ }), /***/ 966: /***/ (function(__unused_webpack_module, exports) { function HuffmanCode(bits, value) { this.bits = bits; /* number of bits used for this symbol */ this.value = value; /* symbol value or table offset */ } exports.h = HuffmanCode; var MAX_LENGTH = 15; /* Returns reverse(reverse(key, len) + 1, len), where reverse(key, len) is the bit-wise reversal of the len least significant bits of key. */ function GetNextKey(key, len) { var step = 1 << (len - 1); while (key & step) { step >>= 1; } return (key & (step - 1)) + step; } /* Stores code in table[0], table[step], table[2*step], ..., table[end] */ /* Assumes that end is an integer multiple of step */ function ReplicateValue(table, i, step, end, code) { do { end -= step; table[i + end] = new HuffmanCode(code.bits, code.value); } while (end > 0); } /* Returns the table width of the next 2nd level table. count is the histogram of bit lengths for the remaining symbols, len is the code length of the next processed symbol */ function NextTableBitSize(count, len, root_bits) { var left = 1 << (len - root_bits); while (len < MAX_LENGTH) { left -= count[len]; if (left <= 0) break; ++len; left <<= 1; } return len - root_bits; } exports.g = function(root_table, table, root_bits, code_lengths, code_lengths_size) { var start_table = table; var code; /* current table entry */ var len; /* current code length */ var symbol; /* symbol index in original or sorted table */ var key; /* reversed prefix code */ var step; /* step size to replicate values in current table */ var low; /* low bits for current root entry */ var mask; /* mask for low bits */ var table_bits; /* key length of current table */ var table_size; /* size of current table */ var total_size; /* sum of root table size and 2nd level table sizes */ var sorted; /* symbols sorted by code length */ var count = new Int32Array(MAX_LENGTH + 1); /* number of codes of each length */ var offset = new Int32Array(MAX_LENGTH + 1); /* offsets in sorted table for each length */ sorted = new Int32Array(code_lengths_size); /* build histogram of code lengths */ for (symbol = 0; symbol < code_lengths_size; symbol++) { count[code_lengths[symbol]]++; } /* generate offsets into sorted symbol table by code length */ offset[1] = 0; for (len = 1; len < MAX_LENGTH; len++) { offset[len + 1] = offset[len] + count[len]; } /* sort symbols by length, by symbol order within each length */ for (symbol = 0; symbol < code_lengths_size; symbol++) { if (code_lengths[symbol] !== 0) { sorted[offset[code_lengths[symbol]]++] = symbol; } } table_bits = root_bits; table_size = 1 << table_bits; total_size = table_size; /* special case code with only one value */ if (offset[MAX_LENGTH] === 1) { for (key = 0; key < total_size; ++key) { root_table[table + key] = new HuffmanCode(0, sorted[0] & 0xffff); } return total_size; } /* fill in root table */ key = 0; symbol = 0; for (len = 1, step = 2; len <= root_bits; ++len, step <<= 1) { for (; count[len] > 0; --count[len]) { code = new HuffmanCode(len & 0xff, sorted[symbol++] & 0xffff); ReplicateValue(root_table, table + key, step, table_size, code); key = GetNextKey(key, len); } } /* fill in 2nd level tables and add pointers to root table */ mask = total_size - 1; low = -1; for (len = root_bits + 1, step = 2; len <= MAX_LENGTH; ++len, step <<= 1) { for (; count[len] > 0; --count[len]) { if ((key & mask) !== low) { table += table_size; table_bits = NextTableBitSize(count, len, root_bits); table_size = 1 << table_bits; total_size += table_size; low = key & mask; root_table[start_table + low] = new HuffmanCode((table_bits + root_bits) & 0xff, ((table - start_table) - low) & 0xffff); } code = new HuffmanCode((len - root_bits) & 0xff, sorted[symbol++] & 0xffff); ReplicateValue(root_table, table + (key >> root_bits), step, table_size, code); key = GetNextKey(key, len); } } return total_size; } /***/ }), /***/ 8435: /***/ (function(__unused_webpack_module, exports) { /* Copyright 2013 Google Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Lookup tables to map prefix codes to value ranges. This is used during decoding of the block lengths, literal insertion lengths and copy lengths. */ /* Represents the range of values belonging to a prefix code: */ /* [offset, offset + 2^nbits) */ function PrefixCodeRange(offset, nbits) { this.offset = offset; this.nbits = nbits; } exports.kBlockLengthPrefixCode = [ new PrefixCodeRange(1, 2), new PrefixCodeRange(5, 2), new PrefixCodeRange(9, 2), new PrefixCodeRange(13, 2), new PrefixCodeRange(17, 3), new PrefixCodeRange(25, 3), new PrefixCodeRange(33, 3), new PrefixCodeRange(41, 3), new PrefixCodeRange(49, 4), new PrefixCodeRange(65, 4), new PrefixCodeRange(81, 4), new PrefixCodeRange(97, 4), new PrefixCodeRange(113, 5), new PrefixCodeRange(145, 5), new PrefixCodeRange(177, 5), new PrefixCodeRange(209, 5), new PrefixCodeRange(241, 6), new PrefixCodeRange(305, 6), new PrefixCodeRange(369, 7), new PrefixCodeRange(497, 8), new PrefixCodeRange(753, 9), new PrefixCodeRange(1265, 10), new PrefixCodeRange(2289, 11), new PrefixCodeRange(4337, 12), new PrefixCodeRange(8433, 13), new PrefixCodeRange(16625, 24) ]; exports.kInsertLengthPrefixCode = [ new PrefixCodeRange(0, 0), new PrefixCodeRange(1, 0), new PrefixCodeRange(2, 0), new PrefixCodeRange(3, 0), new PrefixCodeRange(4, 0), new PrefixCodeRange(5, 0), new PrefixCodeRange(6, 1), new PrefixCodeRange(8, 1), new PrefixCodeRange(10, 2), new PrefixCodeRange(14, 2), new PrefixCodeRange(18, 3), new PrefixCodeRange(26, 3), new PrefixCodeRange(34, 4), new PrefixCodeRange(50, 4), new PrefixCodeRange(66, 5), new PrefixCodeRange(98, 5), new PrefixCodeRange(130, 6), new PrefixCodeRange(194, 7), new PrefixCodeRange(322, 8), new PrefixCodeRange(578, 9), new PrefixCodeRange(1090, 10), new PrefixCodeRange(2114, 12), new PrefixCodeRange(6210, 14), new PrefixCodeRange(22594, 24), ]; exports.kCopyLengthPrefixCode = [ new PrefixCodeRange(2, 0), new PrefixCodeRange(3, 0), new PrefixCodeRange(4, 0), new PrefixCodeRange(5, 0), new PrefixCodeRange(6, 0), new PrefixCodeRange(7, 0), new PrefixCodeRange(8, 0), new PrefixCodeRange(9, 0), new PrefixCodeRange(10, 1), new PrefixCodeRange(12, 1), new PrefixCodeRange(14, 2), new PrefixCodeRange(18, 2), new PrefixCodeRange(22, 3), new PrefixCodeRange(30, 3), new PrefixCodeRange(38, 4), new PrefixCodeRange(54, 4), new PrefixCodeRange(70, 5), new PrefixCodeRange(102, 5), new PrefixCodeRange(134, 6), new PrefixCodeRange(198, 7), new PrefixCodeRange(326, 8), new PrefixCodeRange(582, 9), new PrefixCodeRange(1094, 10), new PrefixCodeRange(2118, 24), ]; exports.kInsertRangeLut = [ 0, 0, 8, 8, 0, 16, 8, 16, 16, ]; exports.kCopyRangeLut = [ 0, 8, 0, 8, 16, 0, 16, 8, 16, ]; /***/ }), /***/ 6154: /***/ (function(__unused_webpack_module, exports) { function BrotliInput(buffer) { this.buffer = buffer; this.pos = 0; } BrotliInput.prototype.read = function(buf, i, count) { if (this.pos + count > this.buffer.length) { count = this.buffer.length - this.pos; } for (var p = 0; p < count; p++) buf[i + p] = this.buffer[this.pos + p]; this.pos += count; return count; } exports.g = BrotliInput; function BrotliOutput(buf) { this.buffer = buf; this.pos = 0; } BrotliOutput.prototype.write = function(buf, count) { if (this.pos + count > this.buffer.length) throw new Error('Output buffer is not large enough'); this.buffer.set(buf.subarray(0, count), this.pos); this.pos += count; return count; }; exports.j = BrotliOutput; /***/ }), /***/ 2973: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { /* Copyright 2013 Google Inc. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Transformations on dictionary words. */ var BrotliDictionary = __webpack_require__(5139); var kIdentity = 0; var kOmitLast1 = 1; var kOmitLast2 = 2; var kOmitLast3 = 3; var kOmitLast4 = 4; var kOmitLast5 = 5; var kOmitLast6 = 6; var kOmitLast7 = 7; var kOmitLast8 = 8; var kOmitLast9 = 9; var kUppercaseFirst = 10; var kUppercaseAll = 11; var kOmitFirst1 = 12; var kOmitFirst2 = 13; var kOmitFirst3 = 14; var kOmitFirst4 = 15; var kOmitFirst5 = 16; var kOmitFirst6 = 17; var kOmitFirst7 = 18; var kOmitFirst8 = 19; var kOmitFirst9 = 20; function Transform(prefix, transform, suffix) { this.prefix = new Uint8Array(prefix.length); this.transform = transform; this.suffix = new Uint8Array(suffix.length); for (var i = 0; i < prefix.length; i++) this.prefix[i] = prefix.charCodeAt(i); for (var i = 0; i < suffix.length; i++) this.suffix[i] = suffix.charCodeAt(i); } var kTransforms = [ new Transform( "", kIdentity, "" ), new Transform( "", kIdentity, " " ), new Transform( " ", kIdentity, " " ), new Transform( "", kOmitFirst1, "" ), new Transform( "", kUppercaseFirst, " " ), new Transform( "", kIdentity, " the " ), new Transform( " ", kIdentity, "" ), new Transform( "s ", kIdentity, " " ), new Transform( "", kIdentity, " of " ), new Transform( "", kUppercaseFirst, "" ), new Transform( "", kIdentity, " and " ), new Transform( "", kOmitFirst2, "" ), new Transform( "", kOmitLast1, "" ), new Transform( ", ", kIdentity, " " ), new Transform( "", kIdentity, ", " ), new Transform( " ", kUppercaseFirst, " " ), new Transform( "", kIdentity, " in " ), new Transform( "", kIdentity, " to " ), new Transform( "e ", kIdentity, " " ), new Transform( "", kIdentity, "\"" ), new Transform( "", kIdentity, "." ), new Transform( "", kIdentity, "\">" ), new Transform( "", kIdentity, "\n" ), new Transform( "", kOmitLast3, "" ), new Transform( "", kIdentity, "]" ), new Transform( "", kIdentity, " for " ), new Transform( "", kOmitFirst3, "" ), new Transform( "", kOmitLast2, "" ), new Transform( "", kIdentity, " a " ), new Transform( "", kIdentity, " that " ), new Transform( " ", kUppercaseFirst, "" ), new Transform( "", kIdentity, ". " ), new Transform( ".", kIdentity, "" ), new Transform( " ", kIdentity, ", " ), new Transform( "", kOmitFirst4, "" ), new Transform( "", kIdentity, " with " ), new Transform( "", kIdentity, "'" ), new Transform( "", kIdentity, " from " ), new Transform( "", kIdentity, " by " ), new Transform( "", kOmitFirst5, "" ), new Transform( "", kOmitFirst6, "" ), new Transform( " the ", kIdentity, "" ), new Transform( "", kOmitLast4, "" ), new Transform( "", kIdentity, ". The " ), new Transform( "", kUppercaseAll, "" ), new Transform( "", kIdentity, " on " ), new Transform( "", kIdentity, " as " ), new Transform( "", kIdentity, " is " ), new Transform( "", kOmitLast7, "" ), new Transform( "", kOmitLast1, "ing " ), new Transform( "", kIdentity, "\n\t" ), new Transform( "", kIdentity, ":" ), new Transform( " ", kIdentity, ". " ), new Transform( "", kIdentity, "ed " ), new Transform( "", kOmitFirst9, "" ), new Transform( "", kOmitFirst7, "" ), new Transform( "", kOmitLast6, "" ), new Transform( "", kIdentity, "(" ), new Transform( "", kUppercaseFirst, ", " ), new Transform( "", kOmitLast8, "" ), new Transform( "", kIdentity, " at " ), new Transform( "", kIdentity, "ly " ), new Transform( " the ", kIdentity, " of " ), new Transform( "", kOmitLast5, "" ), new Transform( "", kOmitLast9, "" ), new Transform( " ", kUppercaseFirst, ", " ), new Transform( "", kUppercaseFirst, "\"" ), new Transform( ".", kIdentity, "(" ), new Transform( "", kUppercaseAll, " " ), new Transform( "", kUppercaseFirst, "\">" ), new Transform( "", kIdentity, "=\"" ), new Transform( " ", kIdentity, "." ), new Transform( ".com/", kIdentity, "" ), new Transform( " the ", kIdentity, " of the " ), new Transform( "", kUppercaseFirst, "'" ), new Transform( "", kIdentity, ". This " ), new Transform( "", kIdentity, "," ), new Transform( ".", kIdentity, " " ), new Transform( "", kUppercaseFirst, "(" ), new Transform( "", kUppercaseFirst, "." ), new Transform( "", kIdentity, " not " ), new Transform( " ", kIdentity, "=\"" ), new Transform( "", kIdentity, "er " ), new Transform( " ", kUppercaseAll, " " ), new Transform( "", kIdentity, "al " ), new Transform( " ", kUppercaseAll, "" ), new Transform( "", kIdentity, "='" ), new Transform( "", kUppercaseAll, "\"" ), new Transform( "", kUppercaseFirst, ". " ), new Transform( " ", kIdentity, "(" ), new Transform( "", kIdentity, "ful " ), new Transform( " ", kUppercaseFirst, ". " ), new Transform( "", kIdentity, "ive " ), new Transform( "", kIdentity, "less " ), new Transform( "", kUppercaseAll, "'" ), new Transform( "", kIdentity, "est " ), new Transform( " ", kUppercaseFirst, "." ), new Transform( "", kUppercaseAll, "\">" ), new Transform( " ", kIdentity, "='" ), new Transform( "", kUppercaseFirst, "," ), new Transform( "", kIdentity, "ize " ), new Transform( "", kUppercaseAll, "." ), new Transform( "\xc2\xa0", kIdentity, "" ), new Transform( " ", kIdentity, "," ), new Transform( "", kUppercaseFirst, "=\"" ), new Transform( "", kUppercaseAll, "=\"" ), new Transform( "", kIdentity, "ous " ), new Transform( "", kUppercaseAll, ", " ), new Transform( "", kUppercaseFirst, "='" ), new Transform( " ", kUppercaseFirst, "," ), new Transform( " ", kUppercaseAll, "=\"" ), new Transform( " ", kUppercaseAll, ", " ), new Transform( "", kUppercaseAll, "," ), new Transform( "", kUppercaseAll, "(" ), new Transform( "", kUppercaseAll, ". " ), new Transform( " ", kUppercaseAll, "." ), new Transform( "", kUppercaseAll, "='" ), new Transform( " ", kUppercaseAll, ". " ), new Transform( " ", kUppercaseFirst, "=\"" ), new Transform( " ", kUppercaseAll, "='" ), new Transform( " ", kUppercaseFirst, "='" ) ]; exports.kTransforms = kTransforms; exports.kNumTransforms = kTransforms.length; function ToUpperCase(p, i) { if (p[i] < 0xc0) { if (p[i] >= 97 && p[i] <= 122) { p[i] ^= 32; } return 1; } /* An overly simplified uppercasing model for utf-8. */ if (p[i] < 0xe0) { p[i + 1] ^= 32; return 2; } /* An arbitrary transform for three byte characters. */ p[i + 2] ^= 5; return 3; } exports.transformDictionaryWord = function(dst, idx, word, len, transform) { var prefix = kTransforms[transform].prefix; var suffix = kTransforms[transform].suffix; var t = kTransforms[transform].transform; var skip = t < kOmitFirst1 ? 0 : t - (kOmitFirst1 - 1); var i = 0; var start_idx = idx; var uppercase; if (skip > len) { skip = len; } var prefix_pos = 0; while (prefix_pos < prefix.length) { dst[idx++] = prefix[prefix_pos++]; } word += skip; len -= skip; if (t <= kOmitLast9) { len -= t; } for (i = 0; i < len; i++) { dst[idx++] = BrotliDictionary.dictionary[word + i]; } uppercase = idx - len; if (t === kUppercaseFirst) { ToUpperCase(dst, uppercase); } else if (t === kUppercaseAll) { while (len > 0) { var step = ToUpperCase(dst, uppercase); uppercase += step; len -= step; } } var suffix_pos = 0; while (suffix_pos < suffix.length) { dst[idx++] = suffix[suffix_pos++]; } return idx - start_idx; } /***/ }), /***/ 7709: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { module.exports = __webpack_require__(6450).BrotliDecompressBuffer; /***/ }), /***/ 4505: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; /* provided dependency */ var Buffer = __webpack_require__(8823)["Buffer"]; /* provided dependency */ var process = __webpack_require__(4155); /* eslint camelcase: "off" */ var assert = __webpack_require__(9282); var Zstream = __webpack_require__(4860); var zlib_deflate = __webpack_require__(2233); var zlib_inflate = __webpack_require__(3001); var constants = __webpack_require__(7162); for (var key in constants) { exports[key] = constants[key]; } // zlib modes exports.NONE = 0; exports.DEFLATE = 1; exports.INFLATE = 2; exports.GZIP = 3; exports.GUNZIP = 4; exports.DEFLATERAW = 5; exports.INFLATERAW = 6; exports.UNZIP = 7; var GZIP_HEADER_ID1 = 0x1f; var GZIP_HEADER_ID2 = 0x8b; /** * Emulate Node's zlib C++ layer for use by the JS layer in index.js */ function Zlib(mode) { if (typeof mode !== 'number' || mode < exports.DEFLATE || mode > exports.UNZIP) { throw new TypeError('Bad argument'); } this.dictionary = null; this.err = 0; this.flush = 0; this.init_done = false; this.level = 0; this.memLevel = 0; this.mode = mode; this.strategy = 0; this.windowBits = 0; this.write_in_progress = false; this.pending_close = false; this.gzip_id_bytes_read = 0; } Zlib.prototype.close = function () { if (this.write_in_progress) { this.pending_close = true; return; } this.pending_close = false; assert(this.init_done, 'close before init'); assert(this.mode <= exports.UNZIP); if (this.mode === exports.DEFLATE || this.mode === exports.GZIP || this.mode === exports.DEFLATERAW) { zlib_deflate.deflateEnd(this.strm); } else if (this.mode === exports.INFLATE || this.mode === exports.GUNZIP || this.mode === exports.INFLATERAW || this.mode === exports.UNZIP) { zlib_inflate.inflateEnd(this.strm); } this.mode = exports.NONE; this.dictionary = null; }; Zlib.prototype.write = function (flush, input, in_off, in_len, out, out_off, out_len) { return this._write(true, flush, input, in_off, in_len, out, out_off, out_len); }; Zlib.prototype.writeSync = function (flush, input, in_off, in_len, out, out_off, out_len) { return this._write(false, flush, input, in_off, in_len, out, out_off, out_len); }; Zlib.prototype._write = function (async, flush, input, in_off, in_len, out, out_off, out_len) { assert.equal(arguments.length, 8); assert(this.init_done, 'write before init'); assert(this.mode !== exports.NONE, 'already finalized'); assert.equal(false, this.write_in_progress, 'write already in progress'); assert.equal(false, this.pending_close, 'close is pending'); this.write_in_progress = true; assert.equal(false, flush === undefined, 'must provide flush value'); this.write_in_progress = true; if (flush !== exports.Z_NO_FLUSH && flush !== exports.Z_PARTIAL_FLUSH && flush !== exports.Z_SYNC_FLUSH && flush !== exports.Z_FULL_FLUSH && flush !== exports.Z_FINISH && flush !== exports.Z_BLOCK) { throw new Error('Invalid flush value'); } if (input == null) { input = Buffer.alloc(0); in_len = 0; in_off = 0; } this.strm.avail_in = in_len; this.strm.input = input; this.strm.next_in = in_off; this.strm.avail_out = out_len; this.strm.output = out; this.strm.next_out = out_off; this.flush = flush; if (!async) { // sync version this._process(); if (this._checkError()) { return this._afterSync(); } return; } // async version var self = this; process.nextTick(function () { self._process(); self._after(); }); return this; }; Zlib.prototype._afterSync = function () { var avail_out = this.strm.avail_out; var avail_in = this.strm.avail_in; this.write_in_progress = false; return [avail_in, avail_out]; }; Zlib.prototype._process = function () { var next_expected_header_byte = null; // If the avail_out is left at 0, then it means that it ran out // of room. If there was avail_out left over, then it means // that all of the input was consumed. switch (this.mode) { case exports.DEFLATE: case exports.GZIP: case exports.DEFLATERAW: this.err = zlib_deflate.deflate(this.strm, this.flush); break; case exports.UNZIP: if (this.strm.avail_in > 0) { next_expected_header_byte = this.strm.next_in; } switch (this.gzip_id_bytes_read) { case 0: if (next_expected_header_byte === null) { break; } if (this.strm.input[next_expected_header_byte] === GZIP_HEADER_ID1) { this.gzip_id_bytes_read = 1; next_expected_header_byte++; if (this.strm.avail_in === 1) { // The only available byte was already read. break; } } else { this.mode = exports.INFLATE; break; } // fallthrough case 1: if (next_expected_header_byte === null) { break; } if (this.strm.input[next_expected_header_byte] === GZIP_HEADER_ID2) { this.gzip_id_bytes_read = 2; this.mode = exports.GUNZIP; } else { // There is no actual difference between INFLATE and INFLATERAW // (after initialization). this.mode = exports.INFLATE; } break; default: throw new Error('invalid number of gzip magic number bytes read'); } // fallthrough case exports.INFLATE: case exports.GUNZIP: case exports.INFLATERAW: this.err = zlib_inflate.inflate(this.strm, this.flush // If data was encoded with dictionary );if (this.err === exports.Z_NEED_DICT && this.dictionary) { // Load it this.err = zlib_inflate.inflateSetDictionary(this.strm, this.dictionary); if (this.err === exports.Z_OK) { // And try to decode again this.err = zlib_inflate.inflate(this.strm, this.flush); } else if (this.err === exports.Z_DATA_ERROR) { // Both inflateSetDictionary() and inflate() return Z_DATA_ERROR. // Make it possible for After() to tell a bad dictionary from bad // input. this.err = exports.Z_NEED_DICT; } } while (this.strm.avail_in > 0 && this.mode === exports.GUNZIP && this.err === exports.Z_STREAM_END && this.strm.next_in[0] !== 0x00) { // Bytes remain in input buffer. Perhaps this is another compressed // member in the same archive, or just trailing garbage. // Trailing zero bytes are okay, though, since they are frequently // used for padding. this.reset(); this.err = zlib_inflate.inflate(this.strm, this.flush); } break; default: throw new Error('Unknown mode ' + this.mode); } }; Zlib.prototype._checkError = function () { // Acceptable error states depend on the type of zlib stream. switch (this.err) { case exports.Z_OK: case exports.Z_BUF_ERROR: if (this.strm.avail_out !== 0 && this.flush === exports.Z_FINISH) { this._error('unexpected end of file'); return false; } break; case exports.Z_STREAM_END: // normal statuses, not fatal break; case exports.Z_NEED_DICT: if (this.dictionary == null) { this._error('Missing dictionary'); } else { this._error('Bad dictionary'); } return false; default: // something else. this._error('Zlib error'); return false; } return true; }; Zlib.prototype._after = function () { if (!this._checkError()) { return; } var avail_out = this.strm.avail_out; var avail_in = this.strm.avail_in; this.write_in_progress = false; // call the write() cb this.callback(avail_in, avail_out); if (this.pending_close) { this.close(); } }; Zlib.prototype._error = function (message) { if (this.strm.msg) { message = this.strm.msg; } this.onerror(message, this.err // no hope of rescue. );this.write_in_progress = false; if (this.pending_close) { this.close(); } }; Zlib.prototype.init = function (windowBits, level, memLevel, strategy, dictionary) { assert(arguments.length === 4 || arguments.length === 5, 'init(windowBits, level, memLevel, strategy, [dictionary])'); assert(windowBits >= 8 && windowBits <= 15, 'invalid windowBits'); assert(level >= -1 && level <= 9, 'invalid compression level'); assert(memLevel >= 1 && memLevel <= 9, 'invalid memlevel'); assert(strategy === exports.Z_FILTERED || strategy === exports.Z_HUFFMAN_ONLY || strategy === exports.Z_RLE || strategy === exports.Z_FIXED || strategy === exports.Z_DEFAULT_STRATEGY, 'invalid strategy'); this._init(level, windowBits, memLevel, strategy, dictionary); this._setDictionary(); }; Zlib.prototype.params = function () { throw new Error('deflateParams Not supported'); }; Zlib.prototype.reset = function () { this._reset(); this._setDictionary(); }; Zlib.prototype._init = function (level, windowBits, memLevel, strategy, dictionary) { this.level = level; this.windowBits = windowBits; this.memLevel = memLevel; this.strategy = strategy; this.flush = exports.Z_NO_FLUSH; this.err = exports.Z_OK; if (this.mode === exports.GZIP || this.mode === exports.GUNZIP) { this.windowBits += 16; } if (this.mode === exports.UNZIP) { this.windowBits += 32; } if (this.mode === exports.DEFLATERAW || this.mode === exports.INFLATERAW) { this.windowBits = -1 * this.windowBits; } this.strm = new Zstream(); switch (this.mode) { case exports.DEFLATE: case exports.GZIP: case exports.DEFLATERAW: this.err = zlib_deflate.deflateInit2(this.strm, this.level, exports.Z_DEFLATED, this.windowBits, this.memLevel, this.strategy); break; case exports.INFLATE: case exports.GUNZIP: case exports.INFLATERAW: case exports.UNZIP: this.err = zlib_inflate.inflateInit2(this.strm, this.windowBits); break; default: throw new Error('Unknown mode ' + this.mode); } if (this.err !== exports.Z_OK) { this._error('Init error'); } this.dictionary = dictionary; this.write_in_progress = false; this.init_done = true; }; Zlib.prototype._setDictionary = function () { if (this.dictionary == null) { return; } this.err = exports.Z_OK; switch (this.mode) { case exports.DEFLATE: case exports.DEFLATERAW: this.err = zlib_deflate.deflateSetDictionary(this.strm, this.dictionary); break; default: break; } if (this.err !== exports.Z_OK) { this._error('Failed to set dictionary'); } }; Zlib.prototype._reset = function () { this.err = exports.Z_OK; switch (this.mode) { case exports.DEFLATE: case exports.DEFLATERAW: case exports.GZIP: this.err = zlib_deflate.deflateReset(this.strm); break; case exports.INFLATE: case exports.INFLATERAW: case exports.GUNZIP: this.err = zlib_inflate.inflateReset(this.strm); break; default: break; } if (this.err !== exports.Z_OK) { this._error('Failed to reset stream'); } }; exports.Zlib = Zlib; /***/ }), /***/ 2635: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; /* provided dependency */ var process = __webpack_require__(4155); var Buffer = (__webpack_require__(8823).Buffer); var Transform = (__webpack_require__(2830).Transform); var binding = __webpack_require__(4505); var util = __webpack_require__(9539); var assert = (__webpack_require__(9282).ok); var kMaxLength = (__webpack_require__(8823).kMaxLength); var kRangeErrorMessage = 'Cannot create final Buffer. It would be larger ' + 'than 0x' + kMaxLength.toString(16) + ' bytes'; // zlib doesn't provide these, so kludge them in following the same // const naming scheme zlib uses. binding.Z_MIN_WINDOWBITS = 8; binding.Z_MAX_WINDOWBITS = 15; binding.Z_DEFAULT_WINDOWBITS = 15; // fewer than 64 bytes per chunk is stupid. // technically it could work with as few as 8, but even 64 bytes // is absurdly low. Usually a MB or more is best. binding.Z_MIN_CHUNK = 64; binding.Z_MAX_CHUNK = Infinity; binding.Z_DEFAULT_CHUNK = 16 * 1024; binding.Z_MIN_MEMLEVEL = 1; binding.Z_MAX_MEMLEVEL = 9; binding.Z_DEFAULT_MEMLEVEL = 8; binding.Z_MIN_LEVEL = -1; binding.Z_MAX_LEVEL = 9; binding.Z_DEFAULT_LEVEL = binding.Z_DEFAULT_COMPRESSION; // expose all the zlib constants var bkeys = Object.keys(binding); for (var bk = 0; bk < bkeys.length; bk++) { var bkey = bkeys[bk]; if (bkey.match(/^Z/)) { Object.defineProperty(exports, bkey, { enumerable: true, value: binding[bkey], writable: false }); } } // translation table for return codes. var codes = { Z_OK: binding.Z_OK, Z_STREAM_END: binding.Z_STREAM_END, Z_NEED_DICT: binding.Z_NEED_DICT, Z_ERRNO: binding.Z_ERRNO, Z_STREAM_ERROR: binding.Z_STREAM_ERROR, Z_DATA_ERROR: binding.Z_DATA_ERROR, Z_MEM_ERROR: binding.Z_MEM_ERROR, Z_BUF_ERROR: binding.Z_BUF_ERROR, Z_VERSION_ERROR: binding.Z_VERSION_ERROR }; var ckeys = Object.keys(codes); for (var ck = 0; ck < ckeys.length; ck++) { var ckey = ckeys[ck]; codes[codes[ckey]] = ckey; } Object.defineProperty(exports, "codes", ({ enumerable: true, value: Object.freeze(codes), writable: false })); exports.Deflate = Deflate; exports.Inflate = Inflate; exports.Gzip = Gzip; exports.Gunzip = Gunzip; exports.DeflateRaw = DeflateRaw; exports.InflateRaw = InflateRaw; exports.Unzip = Unzip; exports.createDeflate = function (o) { return new Deflate(o); }; exports.createInflate = function (o) { return new Inflate(o); }; exports.createDeflateRaw = function (o) { return new DeflateRaw(o); }; exports.createInflateRaw = function (o) { return new InflateRaw(o); }; exports.createGzip = function (o) { return new Gzip(o); }; exports.createGunzip = function (o) { return new Gunzip(o); }; exports.createUnzip = function (o) { return new Unzip(o); }; // Convenience methods. // compress/decompress a string or buffer in one step. exports.deflate = function (buffer, opts, callback) { if (typeof opts === 'function') { callback = opts; opts = {}; } return zlibBuffer(new Deflate(opts), buffer, callback); }; exports.deflateSync = function (buffer, opts) { return zlibBufferSync(new Deflate(opts), buffer); }; exports.gzip = function (buffer, opts, callback) { if (typeof opts === 'function') { callback = opts; opts = {}; } return zlibBuffer(new Gzip(opts), buffer, callback); }; exports.gzipSync = function (buffer, opts) { return zlibBufferSync(new Gzip(opts), buffer); }; exports.deflateRaw = function (buffer, opts, callback) { if (typeof opts === 'function') { callback = opts; opts = {}; } return zlibBuffer(new DeflateRaw(opts), buffer, callback); }; exports.deflateRawSync = function (buffer, opts) { return zlibBufferSync(new DeflateRaw(opts), buffer); }; exports.unzip = function (buffer, opts, callback) { if (typeof opts === 'function') { callback = opts; opts = {}; } return zlibBuffer(new Unzip(opts), buffer, callback); }; exports.unzipSync = function (buffer, opts) { return zlibBufferSync(new Unzip(opts), buffer); }; exports.inflate = function (buffer, opts, callback) { if (typeof opts === 'function') { callback = opts; opts = {}; } return zlibBuffer(new Inflate(opts), buffer, callback); }; exports.inflateSync = function (buffer, opts) { return zlibBufferSync(new Inflate(opts), buffer); }; exports.gunzip = function (buffer, opts, callback) { if (typeof opts === 'function') { callback = opts; opts = {}; } return zlibBuffer(new Gunzip(opts), buffer, callback); }; exports.gunzipSync = function (buffer, opts) { return zlibBufferSync(new Gunzip(opts), buffer); }; exports.inflateRaw = function (buffer, opts, callback) { if (typeof opts === 'function') { callback = opts; opts = {}; } return zlibBuffer(new InflateRaw(opts), buffer, callback); }; exports.inflateRawSync = function (buffer, opts) { return zlibBufferSync(new InflateRaw(opts), buffer); }; function zlibBuffer(engine, buffer, callback) { var buffers = []; var nread = 0; engine.on('error', onError); engine.on('end', onEnd); engine.end(buffer); flow(); function flow() { var chunk; while (null !== (chunk = engine.read())) { buffers.push(chunk); nread += chunk.length; } engine.once('readable', flow); } function onError(err) { engine.removeListener('end', onEnd); engine.removeListener('readable', flow); callback(err); } function onEnd() { var buf; var err = null; if (nread >= kMaxLength) { err = new RangeError(kRangeErrorMessage); } else { buf = Buffer.concat(buffers, nread); } buffers = []; engine.close(); callback(err, buf); } } function zlibBufferSync(engine, buffer) { if (typeof buffer === 'string') buffer = Buffer.from(buffer); if (!Buffer.isBuffer(buffer)) throw new TypeError('Not a string or buffer'); var flushFlag = engine._finishFlushFlag; return engine._processChunk(buffer, flushFlag); } // generic zlib // minimal 2-byte header function Deflate(opts) { if (!(this instanceof Deflate)) return new Deflate(opts); Zlib.call(this, opts, binding.DEFLATE); } function Inflate(opts) { if (!(this instanceof Inflate)) return new Inflate(opts); Zlib.call(this, opts, binding.INFLATE); } // gzip - bigger header, same deflate compression function Gzip(opts) { if (!(this instanceof Gzip)) return new Gzip(opts); Zlib.call(this, opts, binding.GZIP); } function Gunzip(opts) { if (!(this instanceof Gunzip)) return new Gunzip(opts); Zlib.call(this, opts, binding.GUNZIP); } // raw - no header function DeflateRaw(opts) { if (!(this instanceof DeflateRaw)) return new DeflateRaw(opts); Zlib.call(this, opts, binding.DEFLATERAW); } function InflateRaw(opts) { if (!(this instanceof InflateRaw)) return new InflateRaw(opts); Zlib.call(this, opts, binding.INFLATERAW); } // auto-detect header. function Unzip(opts) { if (!(this instanceof Unzip)) return new Unzip(opts); Zlib.call(this, opts, binding.UNZIP); } function isValidFlushFlag(flag) { return flag === binding.Z_NO_FLUSH || flag === binding.Z_PARTIAL_FLUSH || flag === binding.Z_SYNC_FLUSH || flag === binding.Z_FULL_FLUSH || flag === binding.Z_FINISH || flag === binding.Z_BLOCK; } // the Zlib class they all inherit from // This thing manages the queue of requests, and returns // true or false if there is anything in the queue when // you call the .write() method. function Zlib(opts, mode) { var _this = this; this._opts = opts = opts || {}; this._chunkSize = opts.chunkSize || exports.Z_DEFAULT_CHUNK; Transform.call(this, opts); if (opts.flush && !isValidFlushFlag(opts.flush)) { throw new Error('Invalid flush flag: ' + opts.flush); } if (opts.finishFlush && !isValidFlushFlag(opts.finishFlush)) { throw new Error('Invalid flush flag: ' + opts.finishFlush); } this._flushFlag = opts.flush || binding.Z_NO_FLUSH; this._finishFlushFlag = typeof opts.finishFlush !== 'undefined' ? opts.finishFlush : binding.Z_FINISH; if (opts.chunkSize) { if (opts.chunkSize < exports.Z_MIN_CHUNK || opts.chunkSize > exports.Z_MAX_CHUNK) { throw new Error('Invalid chunk size: ' + opts.chunkSize); } } if (opts.windowBits) { if (opts.windowBits < exports.Z_MIN_WINDOWBITS || opts.windowBits > exports.Z_MAX_WINDOWBITS) { throw new Error('Invalid windowBits: ' + opts.windowBits); } } if (opts.level) { if (opts.level < exports.Z_MIN_LEVEL || opts.level > exports.Z_MAX_LEVEL) { throw new Error('Invalid compression level: ' + opts.level); } } if (opts.memLevel) { if (opts.memLevel < exports.Z_MIN_MEMLEVEL || opts.memLevel > exports.Z_MAX_MEMLEVEL) { throw new Error('Invalid memLevel: ' + opts.memLevel); } } if (opts.strategy) { if (opts.strategy != exports.Z_FILTERED && opts.strategy != exports.Z_HUFFMAN_ONLY && opts.strategy != exports.Z_RLE && opts.strategy != exports.Z_FIXED && opts.strategy != exports.Z_DEFAULT_STRATEGY) { throw new Error('Invalid strategy: ' + opts.strategy); } } if (opts.dictionary) { if (!Buffer.isBuffer(opts.dictionary)) { throw new Error('Invalid dictionary: it should be a Buffer instance'); } } this._handle = new binding.Zlib(mode); var self = this; this._hadError = false; this._handle.onerror = function (message, errno) { // there is no way to cleanly recover. // continuing only obscures problems. _close(self); self._hadError = true; var error = new Error(message); error.errno = errno; error.code = exports.codes[errno]; self.emit('error', error); }; var level = exports.Z_DEFAULT_COMPRESSION; if (typeof opts.level === 'number') level = opts.level; var strategy = exports.Z_DEFAULT_STRATEGY; if (typeof opts.strategy === 'number') strategy = opts.strategy; this._handle.init(opts.windowBits || exports.Z_DEFAULT_WINDOWBITS, level, opts.memLevel || exports.Z_DEFAULT_MEMLEVEL, strategy, opts.dictionary); this._buffer = Buffer.allocUnsafe(this._chunkSize); this._offset = 0; this._level = level; this._strategy = strategy; this.once('end', this.close); Object.defineProperty(this, '_closed', { get: function () { return !_this._handle; }, configurable: true, enumerable: true }); } util.inherits(Zlib, Transform); Zlib.prototype.params = function (level, strategy, callback) { if (level < exports.Z_MIN_LEVEL || level > exports.Z_MAX_LEVEL) { throw new RangeError('Invalid compression level: ' + level); } if (strategy != exports.Z_FILTERED && strategy != exports.Z_HUFFMAN_ONLY && strategy != exports.Z_RLE && strategy != exports.Z_FIXED && strategy != exports.Z_DEFAULT_STRATEGY) { throw new TypeError('Invalid strategy: ' + strategy); } if (this._level !== level || this._strategy !== strategy) { var self = this; this.flush(binding.Z_SYNC_FLUSH, function () { assert(self._handle, 'zlib binding closed'); self._handle.params(level, strategy); if (!self._hadError) { self._level = level; self._strategy = strategy; if (callback) callback(); } }); } else { process.nextTick(callback); } }; Zlib.prototype.reset = function () { assert(this._handle, 'zlib binding closed'); return this._handle.reset(); }; // This is the _flush function called by the transform class, // internally, when the last chunk has been written. Zlib.prototype._flush = function (callback) { this._transform(Buffer.alloc(0), '', callback); }; Zlib.prototype.flush = function (kind, callback) { var _this2 = this; var ws = this._writableState; if (typeof kind === 'function' || kind === undefined && !callback) { callback = kind; kind = binding.Z_FULL_FLUSH; } if (ws.ended) { if (callback) process.nextTick(callback); } else if (ws.ending) { if (callback) this.once('end', callback); } else if (ws.needDrain) { if (callback) { this.once('drain', function () { return _this2.flush(kind, callback); }); } } else { this._flushFlag = kind; this.write(Buffer.alloc(0), '', callback); } }; Zlib.prototype.close = function (callback) { _close(this, callback); process.nextTick(emitCloseNT, this); }; function _close(engine, callback) { if (callback) process.nextTick(callback); // Caller may invoke .close after a zlib error (which will null _handle). if (!engine._handle) return; engine._handle.close(); engine._handle = null; } function emitCloseNT(self) { self.emit('close'); } Zlib.prototype._transform = function (chunk, encoding, cb) { var flushFlag; var ws = this._writableState; var ending = ws.ending || ws.ended; var last = ending && (!chunk || ws.length === chunk.length); if (chunk !== null && !Buffer.isBuffer(chunk)) return cb(new Error('invalid input')); if (!this._handle) return cb(new Error('zlib binding closed')); // If it's the last chunk, or a final flush, we use the Z_FINISH flush flag // (or whatever flag was provided using opts.finishFlush). // If it's explicitly flushing at some other time, then we use // Z_FULL_FLUSH. Otherwise, use Z_NO_FLUSH for maximum compression // goodness. if (last) flushFlag = this._finishFlushFlag;else { flushFlag = this._flushFlag; // once we've flushed the last of the queue, stop flushing and // go back to the normal behavior. if (chunk.length >= ws.length) { this._flushFlag = this._opts.flush || binding.Z_NO_FLUSH; } } this._processChunk(chunk, flushFlag, cb); }; Zlib.prototype._processChunk = function (chunk, flushFlag, cb) { var availInBefore = chunk && chunk.length; var availOutBefore = this._chunkSize - this._offset; var inOff = 0; var self = this; var async = typeof cb === 'function'; if (!async) { var buffers = []; var nread = 0; var error; this.on('error', function (er) { error = er; }); assert(this._handle, 'zlib binding closed'); do { var res = this._handle.writeSync(flushFlag, chunk, // in inOff, // in_off availInBefore, // in_len this._buffer, // out this._offset, //out_off availOutBefore); // out_len } while (!this._hadError && callback(res[0], res[1])); if (this._hadError) { throw error; } if (nread >= kMaxLength) { _close(this); throw new RangeError(kRangeErrorMessage); } var buf = Buffer.concat(buffers, nread); _close(this); return buf; } assert(this._handle, 'zlib binding closed'); var req = this._handle.write(flushFlag, chunk, // in inOff, // in_off availInBefore, // in_len this._buffer, // out this._offset, //out_off availOutBefore); // out_len req.buffer = chunk; req.callback = callback; function callback(availInAfter, availOutAfter) { // When the callback is used in an async write, the callback's // context is the `req` object that was created. The req object // is === this._handle, and that's why it's important to null // out the values after they are done being used. `this._handle` // can stay in memory longer than the callback and buffer are needed. if (this) { this.buffer = null; this.callback = null; } if (self._hadError) return; var have = availOutBefore - availOutAfter; assert(have >= 0, 'have should not go down'); if (have > 0) { var out = self._buffer.slice(self._offset, self._offset + have); self._offset += have; // serve some output to the consumer. if (async) { self.push(out); } else { buffers.push(out); nread += out.length; } } // exhausted the output buffer, or used all the input create a new one. if (availOutAfter === 0 || self._offset >= self._chunkSize) { availOutBefore = self._chunkSize; self._offset = 0; self._buffer = Buffer.allocUnsafe(self._chunkSize); } if (availOutAfter === 0) { // Not actually done. Need to reprocess. // Also, update the availInBefore to the availInAfter value, // so that if we have to hit it a third (fourth, etc.) time, // it'll have the correct byte counts. inOff += availInBefore - availInAfter; availInBefore = availInAfter; if (!async) return true; var newReq = self._handle.write(flushFlag, chunk, inOff, availInBefore, self._buffer, self._offset, self._chunkSize); newReq.callback = callback; // this same function newReq.buffer = chunk; return; } if (!async) return false; // finished with the chunk. cb(); } }; util.inherits(Deflate, Zlib); util.inherits(Inflate, Zlib); util.inherits(Gzip, Zlib); util.inherits(Gunzip, Zlib); util.inherits(DeflateRaw, Zlib); util.inherits(InflateRaw, Zlib); util.inherits(Unzip, Zlib); /***/ }), /***/ 6907: /***/ (function(__unused_webpack_module, exports) { "use strict"; var TYPED_OK = (typeof Uint8Array !== 'undefined') && (typeof Uint16Array !== 'undefined') && (typeof Int32Array !== 'undefined'); function _has(obj, key) { return Object.prototype.hasOwnProperty.call(obj, key); } exports.assign = function (obj /*from1, from2, from3, ...*/) { var sources = Array.prototype.slice.call(arguments, 1); while (sources.length) { var source = sources.shift(); if (!source) { continue; } if (typeof source !== 'object') { throw new TypeError(source + 'must be non-object'); } for (var p in source) { if (_has(source, p)) { obj[p] = source[p]; } } } return obj; }; // reduce buffer size, avoiding mem copy exports.shrinkBuf = function (buf, size) { if (buf.length === size) { return buf; } if (buf.subarray) { return buf.subarray(0, size); } buf.length = size; return buf; }; var fnTyped = { arraySet: function (dest, src, src_offs, len, dest_offs) { if (src.subarray && dest.subarray) { dest.set(src.subarray(src_offs, src_offs + len), dest_offs); return; } // Fallback to ordinary array for (var i = 0; i < len; i++) { dest[dest_offs + i] = src[src_offs + i]; } }, // Join array of chunks to single array. flattenChunks: function (chunks) { var i, l, len, pos, chunk, result; // calculate data length len = 0; for (i = 0, l = chunks.length; i < l; i++) { len += chunks[i].length; } // join chunks result = new Uint8Array(len); pos = 0; for (i = 0, l = chunks.length; i < l; i++) { chunk = chunks[i]; result.set(chunk, pos); pos += chunk.length; } return result; } }; var fnUntyped = { arraySet: function (dest, src, src_offs, len, dest_offs) { for (var i = 0; i < len; i++) { dest[dest_offs + i] = src[src_offs + i]; } }, // Join array of chunks to single array. flattenChunks: function (chunks) { return [].concat.apply([], chunks); } }; // Enable/Disable typed arrays use, for testing // exports.setTyped = function (on) { if (on) { exports.Buf8 = Uint8Array; exports.Buf16 = Uint16Array; exports.Buf32 = Int32Array; exports.assign(exports, fnTyped); } else { exports.Buf8 = Array; exports.Buf16 = Array; exports.Buf32 = Array; exports.assign(exports, fnUntyped); } }; exports.setTyped(TYPED_OK); /***/ }), /***/ 7575: /***/ (function(module) { "use strict"; // Note: adler32 takes 12% for level 0 and 2% for level 6. // It isn't worth it to make additional optimizations as in original. // Small size is preferable. // (C) 1995-2013 Jean-loup Gailly and Mark Adler // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would be // appreciated but is not required. // 2. Altered source versions must be plainly marked as such, and must not be // misrepresented as being the original software. // 3. This notice may not be removed or altered from any source distribution. function adler32(adler, buf, len, pos) { var s1 = (adler & 0xffff) |0, s2 = ((adler >>> 16) & 0xffff) |0, n = 0; while (len !== 0) { // Set limit ~ twice less than 5552, to keep // s2 in 31-bits, because we force signed ints. // in other case %= will fail. n = len > 2000 ? 2000 : len; len -= n; do { s1 = (s1 + buf[pos++]) |0; s2 = (s2 + s1) |0; } while (--n); s1 %= 65521; s2 %= 65521; } return (s1 | (s2 << 16)) |0; } module.exports = adler32; /***/ }), /***/ 7162: /***/ (function(module) { "use strict"; // (C) 1995-2013 Jean-loup Gailly and Mark Adler // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would be // appreciated but is not required. // 2. Altered source versions must be plainly marked as such, and must not be // misrepresented as being the original software. // 3. This notice may not be removed or altered from any source distribution. module.exports = { /* Allowed flush values; see deflate() and inflate() below for details */ Z_NO_FLUSH: 0, Z_PARTIAL_FLUSH: 1, Z_SYNC_FLUSH: 2, Z_FULL_FLUSH: 3, Z_FINISH: 4, Z_BLOCK: 5, Z_TREES: 6, /* Return codes for the compression/decompression functions. Negative values * are errors, positive values are used for special but normal events. */ Z_OK: 0, Z_STREAM_END: 1, Z_NEED_DICT: 2, Z_ERRNO: -1, Z_STREAM_ERROR: -2, Z_DATA_ERROR: -3, //Z_MEM_ERROR: -4, Z_BUF_ERROR: -5, //Z_VERSION_ERROR: -6, /* compression levels */ Z_NO_COMPRESSION: 0, Z_BEST_SPEED: 1, Z_BEST_COMPRESSION: 9, Z_DEFAULT_COMPRESSION: -1, Z_FILTERED: 1, Z_HUFFMAN_ONLY: 2, Z_RLE: 3, Z_FIXED: 4, Z_DEFAULT_STRATEGY: 0, /* Possible values of the data_type field (though see inflate()) */ Z_BINARY: 0, Z_TEXT: 1, //Z_ASCII: 1, // = Z_TEXT (deprecated) Z_UNKNOWN: 2, /* The deflate compression method */ Z_DEFLATED: 8 //Z_NULL: null // Use -1 or null inline, depending on var type }; /***/ }), /***/ 3415: /***/ (function(module) { "use strict"; // Note: we can't get significant speed boost here. // So write code to minimize size - no pregenerated tables // and array tools dependencies. // (C) 1995-2013 Jean-loup Gailly and Mark Adler // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would be // appreciated but is not required. // 2. Altered source versions must be plainly marked as such, and must not be // misrepresented as being the original software. // 3. This notice may not be removed or altered from any source distribution. // Use ordinary array, since untyped makes no boost here function makeTable() { var c, table = []; for (var n = 0; n < 256; n++) { c = n; for (var k = 0; k < 8; k++) { c = ((c & 1) ? (0xEDB88320 ^ (c >>> 1)) : (c >>> 1)); } table[n] = c; } return table; } // Create table on load. Just 255 signed longs. Not a problem. var crcTable = makeTable(); function crc32(crc, buf, len, pos) { var t = crcTable, end = pos + len; crc ^= -1; for (var i = pos; i < end; i++) { crc = (crc >>> 8) ^ t[(crc ^ buf[i]) & 0xFF]; } return (crc ^ (-1)); // >>> 0; } module.exports = crc32; /***/ }), /***/ 2233: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; // (C) 1995-2013 Jean-loup Gailly and Mark Adler // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would be // appreciated but is not required. // 2. Altered source versions must be plainly marked as such, and must not be // misrepresented as being the original software. // 3. This notice may not be removed or altered from any source distribution. var utils = __webpack_require__(6907); var trees = __webpack_require__(1339); var adler32 = __webpack_require__(7575); var crc32 = __webpack_require__(3415); var msg = __webpack_require__(9364); /* Public constants ==========================================================*/ /* ===========================================================================*/ /* Allowed flush values; see deflate() and inflate() below for details */ var Z_NO_FLUSH = 0; var Z_PARTIAL_FLUSH = 1; //var Z_SYNC_FLUSH = 2; var Z_FULL_FLUSH = 3; var Z_FINISH = 4; var Z_BLOCK = 5; //var Z_TREES = 6; /* Return codes for the compression/decompression functions. Negative values * are errors, positive values are used for special but normal events. */ var Z_OK = 0; var Z_STREAM_END = 1; //var Z_NEED_DICT = 2; //var Z_ERRNO = -1; var Z_STREAM_ERROR = -2; var Z_DATA_ERROR = -3; //var Z_MEM_ERROR = -4; var Z_BUF_ERROR = -5; //var Z_VERSION_ERROR = -6; /* compression levels */ //var Z_NO_COMPRESSION = 0; //var Z_BEST_SPEED = 1; //var Z_BEST_COMPRESSION = 9; var Z_DEFAULT_COMPRESSION = -1; var Z_FILTERED = 1; var Z_HUFFMAN_ONLY = 2; var Z_RLE = 3; var Z_FIXED = 4; var Z_DEFAULT_STRATEGY = 0; /* Possible values of the data_type field (though see inflate()) */ //var Z_BINARY = 0; //var Z_TEXT = 1; //var Z_ASCII = 1; // = Z_TEXT var Z_UNKNOWN = 2; /* The deflate compression method */ var Z_DEFLATED = 8; /*============================================================================*/ var MAX_MEM_LEVEL = 9; /* Maximum value for memLevel in deflateInit2 */ var MAX_WBITS = 15; /* 32K LZ77 window */ var DEF_MEM_LEVEL = 8; var LENGTH_CODES = 29; /* number of length codes, not counting the special END_BLOCK code */ var LITERALS = 256; /* number of literal bytes 0..255 */ var L_CODES = LITERALS + 1 + LENGTH_CODES; /* number of Literal or Length codes, including the END_BLOCK code */ var D_CODES = 30; /* number of distance codes */ var BL_CODES = 19; /* number of codes used to transfer the bit lengths */ var HEAP_SIZE = 2 * L_CODES + 1; /* maximum heap size */ var MAX_BITS = 15; /* All codes must not exceed MAX_BITS bits */ var MIN_MATCH = 3; var MAX_MATCH = 258; var MIN_LOOKAHEAD = (MAX_MATCH + MIN_MATCH + 1); var PRESET_DICT = 0x20; var INIT_STATE = 42; var EXTRA_STATE = 69; var NAME_STATE = 73; var COMMENT_STATE = 91; var HCRC_STATE = 103; var BUSY_STATE = 113; var FINISH_STATE = 666; var BS_NEED_MORE = 1; /* block not completed, need more input or more output */ var BS_BLOCK_DONE = 2; /* block flush performed */ var BS_FINISH_STARTED = 3; /* finish started, need only more output at next deflate */ var BS_FINISH_DONE = 4; /* finish done, accept no more input or output */ var OS_CODE = 0x03; // Unix :) . Don't detect, use this default. function err(strm, errorCode) { strm.msg = msg[errorCode]; return errorCode; } function rank(f) { return ((f) << 1) - ((f) > 4 ? 9 : 0); } function zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } } /* ========================================================================= * Flush as much pending output as possible. All deflate() output goes * through this function so some applications may wish to modify it * to avoid allocating a large strm->output buffer and copying into it. * (See also read_buf()). */ function flush_pending(strm) { var s = strm.state; //_tr_flush_bits(s); var len = s.pending; if (len > strm.avail_out) { len = strm.avail_out; } if (len === 0) { return; } utils.arraySet(strm.output, s.pending_buf, s.pending_out, len, strm.next_out); strm.next_out += len; s.pending_out += len; strm.total_out += len; strm.avail_out -= len; s.pending -= len; if (s.pending === 0) { s.pending_out = 0; } } function flush_block_only(s, last) { trees._tr_flush_block(s, (s.block_start >= 0 ? s.block_start : -1), s.strstart - s.block_start, last); s.block_start = s.strstart; flush_pending(s.strm); } function put_byte(s, b) { s.pending_buf[s.pending++] = b; } /* ========================================================================= * Put a short in the pending buffer. The 16-bit value is put in MSB order. * IN assertion: the stream state is correct and there is enough room in * pending_buf. */ function putShortMSB(s, b) { // put_byte(s, (Byte)(b >> 8)); // put_byte(s, (Byte)(b & 0xff)); s.pending_buf[s.pending++] = (b >>> 8) & 0xff; s.pending_buf[s.pending++] = b & 0xff; } /* =========================================================================== * Read a new buffer from the current input stream, update the adler32 * and total number of bytes read. All deflate() input goes through * this function so some applications may wish to modify it to avoid * allocating a large strm->input buffer and copying from it. * (See also flush_pending()). */ function read_buf(strm, buf, start, size) { var len = strm.avail_in; if (len > size) { len = size; } if (len === 0) { return 0; } strm.avail_in -= len; // zmemcpy(buf, strm->next_in, len); utils.arraySet(buf, strm.input, strm.next_in, len, start); if (strm.state.wrap === 1) { strm.adler = adler32(strm.adler, buf, len, start); } else if (strm.state.wrap === 2) { strm.adler = crc32(strm.adler, buf, len, start); } strm.next_in += len; strm.total_in += len; return len; } /* =========================================================================== * Set match_start to the longest match starting at the given string and * return its length. Matches shorter or equal to prev_length are discarded, * in which case the result is equal to prev_length and match_start is * garbage. * IN assertions: cur_match is the head of the hash chain for the current * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1 * OUT assertion: the match length is not greater than s->lookahead. */ function longest_match(s, cur_match) { var chain_length = s.max_chain_length; /* max hash chain length */ var scan = s.strstart; /* current string */ var match; /* matched string */ var len; /* length of current match */ var best_len = s.prev_length; /* best match length so far */ var nice_match = s.nice_match; /* stop if match long enough */ var limit = (s.strstart > (s.w_size - MIN_LOOKAHEAD)) ? s.strstart - (s.w_size - MIN_LOOKAHEAD) : 0/*NIL*/; var _win = s.window; // shortcut var wmask = s.w_mask; var prev = s.prev; /* Stop when cur_match becomes <= limit. To simplify the code, * we prevent matches with the string of window index 0. */ var strend = s.strstart + MAX_MATCH; var scan_end1 = _win[scan + best_len - 1]; var scan_end = _win[scan + best_len]; /* The code is optimized for HASH_BITS >= 8 and MAX_MATCH-2 multiple of 16. * It is easy to get rid of this optimization if necessary. */ // Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever"); /* Do not waste too much time if we already have a good match: */ if (s.prev_length >= s.good_match) { chain_length >>= 2; } /* Do not look for matches beyond the end of the input. This is necessary * to make deflate deterministic. */ if (nice_match > s.lookahead) { nice_match = s.lookahead; } // Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead"); do { // Assert(cur_match < s->strstart, "no future"); match = cur_match; /* Skip to next match if the match length cannot increase * or if the match length is less than 2. Note that the checks below * for insufficient lookahead only occur occasionally for performance * reasons. Therefore uninitialized memory will be accessed, and * conditional jumps will be made that depend on those values. * However the length of the match is limited to the lookahead, so * the output of deflate is not affected by the uninitialized values. */ if (_win[match + best_len] !== scan_end || _win[match + best_len - 1] !== scan_end1 || _win[match] !== _win[scan] || _win[++match] !== _win[scan + 1]) { continue; } /* The check at best_len-1 can be removed because it will be made * again later. (This heuristic is not always a win.) * It is not necessary to compare scan[2] and match[2] since they * are always equal when the other bytes match, given that * the hash keys are equal and that HASH_BITS >= 8. */ scan += 2; match++; // Assert(*scan == *match, "match[2]?"); /* We check for insufficient lookahead only every 8th comparison; * the 256th check will be made at strstart+258. */ do { /*jshint noempty:false*/ } while (_win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && _win[++scan] === _win[++match] && scan < strend); // Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan"); len = MAX_MATCH - (strend - scan); scan = strend - MAX_MATCH; if (len > best_len) { s.match_start = cur_match; best_len = len; if (len >= nice_match) { break; } scan_end1 = _win[scan + best_len - 1]; scan_end = _win[scan + best_len]; } } while ((cur_match = prev[cur_match & wmask]) > limit && --chain_length !== 0); if (best_len <= s.lookahead) { return best_len; } return s.lookahead; } /* =========================================================================== * Fill the window when the lookahead becomes insufficient. * Updates strstart and lookahead. * * IN assertion: lookahead < MIN_LOOKAHEAD * OUT assertions: strstart <= window_size-MIN_LOOKAHEAD * At least one byte has been read, or avail_in == 0; reads are * performed for at least two bytes (required for the zip translate_eol * option -- not supported here). */ function fill_window(s) { var _w_size = s.w_size; var p, n, m, more, str; //Assert(s->lookahead < MIN_LOOKAHEAD, "already enough lookahead"); do { more = s.window_size - s.lookahead - s.strstart; // JS ints have 32 bit, block below not needed /* Deal with !@#$% 64K limit: */ //if (sizeof(int) <= 2) { // if (more == 0 && s->strstart == 0 && s->lookahead == 0) { // more = wsize; // // } else if (more == (unsigned)(-1)) { // /* Very unlikely, but possible on 16 bit machine if // * strstart == 0 && lookahead == 1 (input done a byte at time) // */ // more--; // } //} /* If the window is almost full and there is insufficient lookahead, * move the upper half to the lower one to make room in the upper half. */ if (s.strstart >= _w_size + (_w_size - MIN_LOOKAHEAD)) { utils.arraySet(s.window, s.window, _w_size, _w_size, 0); s.match_start -= _w_size; s.strstart -= _w_size; /* we now have strstart >= MAX_DIST */ s.block_start -= _w_size; /* Slide the hash table (could be avoided with 32 bit values at the expense of memory usage). We slide even when level == 0 to keep the hash table consistent if we switch back to level > 0 later. (Using level 0 permanently is not an optimal usage of zlib, so we don't care about this pathological case.) */ n = s.hash_size; p = n; do { m = s.head[--p]; s.head[p] = (m >= _w_size ? m - _w_size : 0); } while (--n); n = _w_size; p = n; do { m = s.prev[--p]; s.prev[p] = (m >= _w_size ? m - _w_size : 0); /* If n is not on any hash chain, prev[n] is garbage but * its value will never be used. */ } while (--n); more += _w_size; } if (s.strm.avail_in === 0) { break; } /* If there was no sliding: * strstart <= WSIZE+MAX_DIST-1 && lookahead <= MIN_LOOKAHEAD - 1 && * more == window_size - lookahead - strstart * => more >= window_size - (MIN_LOOKAHEAD-1 + WSIZE + MAX_DIST-1) * => more >= window_size - 2*WSIZE + 2 * In the BIG_MEM or MMAP case (not yet supported), * window_size == input_size + MIN_LOOKAHEAD && * strstart + s->lookahead <= input_size => more >= MIN_LOOKAHEAD. * Otherwise, window_size == 2*WSIZE so more >= 2. * If there was sliding, more >= WSIZE. So in all cases, more >= 2. */ //Assert(more >= 2, "more < 2"); n = read_buf(s.strm, s.window, s.strstart + s.lookahead, more); s.lookahead += n; /* Initialize the hash value now that we have some input: */ if (s.lookahead + s.insert >= MIN_MATCH) { str = s.strstart - s.insert; s.ins_h = s.window[str]; /* UPDATE_HASH(s, s->ins_h, s->window[str + 1]); */ s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + 1]) & s.hash_mask; //#if MIN_MATCH != 3 // Call update_hash() MIN_MATCH-3 more times //#endif while (s.insert) { /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */ s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask; s.prev[str & s.w_mask] = s.head[s.ins_h]; s.head[s.ins_h] = str; str++; s.insert--; if (s.lookahead + s.insert < MIN_MATCH) { break; } } } /* If the whole input has less than MIN_MATCH bytes, ins_h is garbage, * but this is not important since only literal bytes will be emitted. */ } while (s.lookahead < MIN_LOOKAHEAD && s.strm.avail_in !== 0); /* If the WIN_INIT bytes after the end of the current data have never been * written, then zero those bytes in order to avoid memory check reports of * the use of uninitialized (or uninitialised as Julian writes) bytes by * the longest match routines. Update the high water mark for the next * time through here. WIN_INIT is set to MAX_MATCH since the longest match * routines allow scanning to strstart + MAX_MATCH, ignoring lookahead. */ // if (s.high_water < s.window_size) { // var curr = s.strstart + s.lookahead; // var init = 0; // // if (s.high_water < curr) { // /* Previous high water mark below current data -- zero WIN_INIT // * bytes or up to end of window, whichever is less. // */ // init = s.window_size - curr; // if (init > WIN_INIT) // init = WIN_INIT; // zmemzero(s->window + curr, (unsigned)init); // s->high_water = curr + init; // } // else if (s->high_water < (ulg)curr + WIN_INIT) { // /* High water mark at or above current data, but below current data // * plus WIN_INIT -- zero out to current data plus WIN_INIT, or up // * to end of window, whichever is less. // */ // init = (ulg)curr + WIN_INIT - s->high_water; // if (init > s->window_size - s->high_water) // init = s->window_size - s->high_water; // zmemzero(s->window + s->high_water, (unsigned)init); // s->high_water += init; // } // } // // Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD, // "not enough room for search"); } /* =========================================================================== * Copy without compression as much as possible from the input stream, return * the current block state. * This function does not insert new strings in the dictionary since * uncompressible data is probably not useful. This function is used * only for the level=0 compression option. * NOTE: this function should be optimized to avoid extra copying from * window to pending_buf. */ function deflate_stored(s, flush) { /* Stored blocks are limited to 0xffff bytes, pending_buf is limited * to pending_buf_size, and each stored block has a 5 byte header: */ var max_block_size = 0xffff; if (max_block_size > s.pending_buf_size - 5) { max_block_size = s.pending_buf_size - 5; } /* Copy as much as possible from input to output: */ for (;;) { /* Fill the window as much as possible: */ if (s.lookahead <= 1) { //Assert(s->strstart < s->w_size+MAX_DIST(s) || // s->block_start >= (long)s->w_size, "slide too late"); // if (!(s.strstart < s.w_size + (s.w_size - MIN_LOOKAHEAD) || // s.block_start >= s.w_size)) { // throw new Error("slide too late"); // } fill_window(s); if (s.lookahead === 0 && flush === Z_NO_FLUSH) { return BS_NEED_MORE; } if (s.lookahead === 0) { break; } /* flush the current block */ } //Assert(s->block_start >= 0L, "block gone"); // if (s.block_start < 0) throw new Error("block gone"); s.strstart += s.lookahead; s.lookahead = 0; /* Emit a stored block if pending_buf will be full: */ var max_start = s.block_start + max_block_size; if (s.strstart === 0 || s.strstart >= max_start) { /* strstart == 0 is possible when wraparound on 16-bit machine */ s.lookahead = s.strstart - max_start; s.strstart = max_start; /*** FLUSH_BLOCK(s, 0); ***/ flush_block_only(s, false); if (s.strm.avail_out === 0) { return BS_NEED_MORE; } /***/ } /* Flush if we may have to slide, otherwise block_start may become * negative and the data will be gone: */ if (s.strstart - s.block_start >= (s.w_size - MIN_LOOKAHEAD)) { /*** FLUSH_BLOCK(s, 0); ***/ flush_block_only(s, false); if (s.strm.avail_out === 0) { return BS_NEED_MORE; } /***/ } } s.insert = 0; if (flush === Z_FINISH) { /*** FLUSH_BLOCK(s, 1); ***/ flush_block_only(s, true); if (s.strm.avail_out === 0) { return BS_FINISH_STARTED; } /***/ return BS_FINISH_DONE; } if (s.strstart > s.block_start) { /*** FLUSH_BLOCK(s, 0); ***/ flush_block_only(s, false); if (s.strm.avail_out === 0) { return BS_NEED_MORE; } /***/ } return BS_NEED_MORE; } /* =========================================================================== * Compress as much as possible from the input stream, return the current * block state. * This function does not perform lazy evaluation of matches and inserts * new strings in the dictionary only for unmatched strings or for short * matches. It is used only for the fast compression options. */ function deflate_fast(s, flush) { var hash_head; /* head of the hash chain */ var bflush; /* set if current block must be flushed */ for (;;) { /* Make sure that we always have enough lookahead, except * at the end of the input file. We need MAX_MATCH bytes * for the next match, plus MIN_MATCH bytes to insert the * string following the next match. */ if (s.lookahead < MIN_LOOKAHEAD) { fill_window(s); if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) { return BS_NEED_MORE; } if (s.lookahead === 0) { break; /* flush the current block */ } } /* Insert the string window[strstart .. strstart+2] in the * dictionary, and set hash_head to the head of the hash chain: */ hash_head = 0/*NIL*/; if (s.lookahead >= MIN_MATCH) { /*** INSERT_STRING(s, s.strstart, hash_head); ***/ s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; s.head[s.ins_h] = s.strstart; /***/ } /* Find the longest match, discarding those <= prev_length. * At this point we have always match_length < MIN_MATCH */ if (hash_head !== 0/*NIL*/ && ((s.strstart - hash_head) <= (s.w_size - MIN_LOOKAHEAD))) { /* To simplify the code, we prevent matches with the string * of window index 0 (in particular we have to avoid a match * of the string with itself at the start of the input file). */ s.match_length = longest_match(s, hash_head); /* longest_match() sets match_start */ } if (s.match_length >= MIN_MATCH) { // check_match(s, s.strstart, s.match_start, s.match_length); // for debug only /*** _tr_tally_dist(s, s.strstart - s.match_start, s.match_length - MIN_MATCH, bflush); ***/ bflush = trees._tr_tally(s, s.strstart - s.match_start, s.match_length - MIN_MATCH); s.lookahead -= s.match_length; /* Insert new strings in the hash table only if the match length * is not too large. This saves time but degrades compression. */ if (s.match_length <= s.max_lazy_match/*max_insert_length*/ && s.lookahead >= MIN_MATCH) { s.match_length--; /* string at strstart already in table */ do { s.strstart++; /*** INSERT_STRING(s, s.strstart, hash_head); ***/ s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; s.head[s.ins_h] = s.strstart; /***/ /* strstart never exceeds WSIZE-MAX_MATCH, so there are * always MIN_MATCH bytes ahead. */ } while (--s.match_length !== 0); s.strstart++; } else { s.strstart += s.match_length; s.match_length = 0; s.ins_h = s.window[s.strstart]; /* UPDATE_HASH(s, s.ins_h, s.window[s.strstart+1]); */ s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + 1]) & s.hash_mask; //#if MIN_MATCH != 3 // Call UPDATE_HASH() MIN_MATCH-3 more times //#endif /* If lookahead < MIN_MATCH, ins_h is garbage, but it does not * matter since it will be recomputed at next deflate call. */ } } else { /* No match, output a literal byte */ //Tracevv((stderr,"%c", s.window[s.strstart])); /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ bflush = trees._tr_tally(s, 0, s.window[s.strstart]); s.lookahead--; s.strstart++; } if (bflush) { /*** FLUSH_BLOCK(s, 0); ***/ flush_block_only(s, false); if (s.strm.avail_out === 0) { return BS_NEED_MORE; } /***/ } } s.insert = ((s.strstart < (MIN_MATCH - 1)) ? s.strstart : MIN_MATCH - 1); if (flush === Z_FINISH) { /*** FLUSH_BLOCK(s, 1); ***/ flush_block_only(s, true); if (s.strm.avail_out === 0) { return BS_FINISH_STARTED; } /***/ return BS_FINISH_DONE; } if (s.last_lit) { /*** FLUSH_BLOCK(s, 0); ***/ flush_block_only(s, false); if (s.strm.avail_out === 0) { return BS_NEED_MORE; } /***/ } return BS_BLOCK_DONE; } /* =========================================================================== * Same as above, but achieves better compression. We use a lazy * evaluation for matches: a match is finally adopted only if there is * no better match at the next window position. */ function deflate_slow(s, flush) { var hash_head; /* head of hash chain */ var bflush; /* set if current block must be flushed */ var max_insert; /* Process the input block. */ for (;;) { /* Make sure that we always have enough lookahead, except * at the end of the input file. We need MAX_MATCH bytes * for the next match, plus MIN_MATCH bytes to insert the * string following the next match. */ if (s.lookahead < MIN_LOOKAHEAD) { fill_window(s); if (s.lookahead < MIN_LOOKAHEAD && flush === Z_NO_FLUSH) { return BS_NEED_MORE; } if (s.lookahead === 0) { break; } /* flush the current block */ } /* Insert the string window[strstart .. strstart+2] in the * dictionary, and set hash_head to the head of the hash chain: */ hash_head = 0/*NIL*/; if (s.lookahead >= MIN_MATCH) { /*** INSERT_STRING(s, s.strstart, hash_head); ***/ s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; s.head[s.ins_h] = s.strstart; /***/ } /* Find the longest match, discarding those <= prev_length. */ s.prev_length = s.match_length; s.prev_match = s.match_start; s.match_length = MIN_MATCH - 1; if (hash_head !== 0/*NIL*/ && s.prev_length < s.max_lazy_match && s.strstart - hash_head <= (s.w_size - MIN_LOOKAHEAD)/*MAX_DIST(s)*/) { /* To simplify the code, we prevent matches with the string * of window index 0 (in particular we have to avoid a match * of the string with itself at the start of the input file). */ s.match_length = longest_match(s, hash_head); /* longest_match() sets match_start */ if (s.match_length <= 5 && (s.strategy === Z_FILTERED || (s.match_length === MIN_MATCH && s.strstart - s.match_start > 4096/*TOO_FAR*/))) { /* If prev_match is also MIN_MATCH, match_start is garbage * but we will ignore the current match anyway. */ s.match_length = MIN_MATCH - 1; } } /* If there was a match at the previous step and the current * match is not better, output the previous match: */ if (s.prev_length >= MIN_MATCH && s.match_length <= s.prev_length) { max_insert = s.strstart + s.lookahead - MIN_MATCH; /* Do not insert strings in hash table beyond this. */ //check_match(s, s.strstart-1, s.prev_match, s.prev_length); /***_tr_tally_dist(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH, bflush);***/ bflush = trees._tr_tally(s, s.strstart - 1 - s.prev_match, s.prev_length - MIN_MATCH); /* Insert in hash table all strings up to the end of the match. * strstart-1 and strstart are already inserted. If there is not * enough lookahead, the last two strings are not inserted in * the hash table. */ s.lookahead -= s.prev_length - 1; s.prev_length -= 2; do { if (++s.strstart <= max_insert) { /*** INSERT_STRING(s, s.strstart, hash_head); ***/ s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[s.strstart + MIN_MATCH - 1]) & s.hash_mask; hash_head = s.prev[s.strstart & s.w_mask] = s.head[s.ins_h]; s.head[s.ins_h] = s.strstart; /***/ } } while (--s.prev_length !== 0); s.match_available = 0; s.match_length = MIN_MATCH - 1; s.strstart++; if (bflush) { /*** FLUSH_BLOCK(s, 0); ***/ flush_block_only(s, false); if (s.strm.avail_out === 0) { return BS_NEED_MORE; } /***/ } } else if (s.match_available) { /* If there was no match at the previous position, output a * single literal. If there was a match but the current match * is longer, truncate the previous match to a single literal. */ //Tracevv((stderr,"%c", s->window[s->strstart-1])); /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/ bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]); if (bflush) { /*** FLUSH_BLOCK_ONLY(s, 0) ***/ flush_block_only(s, false); /***/ } s.strstart++; s.lookahead--; if (s.strm.avail_out === 0) { return BS_NEED_MORE; } } else { /* There is no previous match to compare with, wait for * the next step to decide. */ s.match_available = 1; s.strstart++; s.lookahead--; } } //Assert (flush != Z_NO_FLUSH, "no flush?"); if (s.match_available) { //Tracevv((stderr,"%c", s->window[s->strstart-1])); /*** _tr_tally_lit(s, s.window[s.strstart-1], bflush); ***/ bflush = trees._tr_tally(s, 0, s.window[s.strstart - 1]); s.match_available = 0; } s.insert = s.strstart < MIN_MATCH - 1 ? s.strstart : MIN_MATCH - 1; if (flush === Z_FINISH) { /*** FLUSH_BLOCK(s, 1); ***/ flush_block_only(s, true); if (s.strm.avail_out === 0) { return BS_FINISH_STARTED; } /***/ return BS_FINISH_DONE; } if (s.last_lit) { /*** FLUSH_BLOCK(s, 0); ***/ flush_block_only(s, false); if (s.strm.avail_out === 0) { return BS_NEED_MORE; } /***/ } return BS_BLOCK_DONE; } /* =========================================================================== * For Z_RLE, simply look for runs of bytes, generate matches only of distance * one. Do not maintain a hash table. (It will be regenerated if this run of * deflate switches away from Z_RLE.) */ function deflate_rle(s, flush) { var bflush; /* set if current block must be flushed */ var prev; /* byte at distance one to match */ var scan, strend; /* scan goes up to strend for length of run */ var _win = s.window; for (;;) { /* Make sure that we always have enough lookahead, except * at the end of the input file. We need MAX_MATCH bytes * for the longest run, plus one for the unrolled loop. */ if (s.lookahead <= MAX_MATCH) { fill_window(s); if (s.lookahead <= MAX_MATCH && flush === Z_NO_FLUSH) { return BS_NEED_MORE; } if (s.lookahead === 0) { break; } /* flush the current block */ } /* See how many times the previous byte repeats */ s.match_length = 0; if (s.lookahead >= MIN_MATCH && s.strstart > 0) { scan = s.strstart - 1; prev = _win[scan]; if (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan]) { strend = s.strstart + MAX_MATCH; do { /*jshint noempty:false*/ } while (prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && prev === _win[++scan] && scan < strend); s.match_length = MAX_MATCH - (strend - scan); if (s.match_length > s.lookahead) { s.match_length = s.lookahead; } } //Assert(scan <= s->window+(uInt)(s->window_size-1), "wild scan"); } /* Emit match if have run of MIN_MATCH or longer, else emit literal */ if (s.match_length >= MIN_MATCH) { //check_match(s, s.strstart, s.strstart - 1, s.match_length); /*** _tr_tally_dist(s, 1, s.match_length - MIN_MATCH, bflush); ***/ bflush = trees._tr_tally(s, 1, s.match_length - MIN_MATCH); s.lookahead -= s.match_length; s.strstart += s.match_length; s.match_length = 0; } else { /* No match, output a literal byte */ //Tracevv((stderr,"%c", s->window[s->strstart])); /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ bflush = trees._tr_tally(s, 0, s.window[s.strstart]); s.lookahead--; s.strstart++; } if (bflush) { /*** FLUSH_BLOCK(s, 0); ***/ flush_block_only(s, false); if (s.strm.avail_out === 0) { return BS_NEED_MORE; } /***/ } } s.insert = 0; if (flush === Z_FINISH) { /*** FLUSH_BLOCK(s, 1); ***/ flush_block_only(s, true); if (s.strm.avail_out === 0) { return BS_FINISH_STARTED; } /***/ return BS_FINISH_DONE; } if (s.last_lit) { /*** FLUSH_BLOCK(s, 0); ***/ flush_block_only(s, false); if (s.strm.avail_out === 0) { return BS_NEED_MORE; } /***/ } return BS_BLOCK_DONE; } /* =========================================================================== * For Z_HUFFMAN_ONLY, do not look for matches. Do not maintain a hash table. * (It will be regenerated if this run of deflate switches away from Huffman.) */ function deflate_huff(s, flush) { var bflush; /* set if current block must be flushed */ for (;;) { /* Make sure that we have a literal to write. */ if (s.lookahead === 0) { fill_window(s); if (s.lookahead === 0) { if (flush === Z_NO_FLUSH) { return BS_NEED_MORE; } break; /* flush the current block */ } } /* Output a literal byte */ s.match_length = 0; //Tracevv((stderr,"%c", s->window[s->strstart])); /*** _tr_tally_lit(s, s.window[s.strstart], bflush); ***/ bflush = trees._tr_tally(s, 0, s.window[s.strstart]); s.lookahead--; s.strstart++; if (bflush) { /*** FLUSH_BLOCK(s, 0); ***/ flush_block_only(s, false); if (s.strm.avail_out === 0) { return BS_NEED_MORE; } /***/ } } s.insert = 0; if (flush === Z_FINISH) { /*** FLUSH_BLOCK(s, 1); ***/ flush_block_only(s, true); if (s.strm.avail_out === 0) { return BS_FINISH_STARTED; } /***/ return BS_FINISH_DONE; } if (s.last_lit) { /*** FLUSH_BLOCK(s, 0); ***/ flush_block_only(s, false); if (s.strm.avail_out === 0) { return BS_NEED_MORE; } /***/ } return BS_BLOCK_DONE; } /* Values for max_lazy_match, good_match and max_chain_length, depending on * the desired pack level (0..9). The values given below have been tuned to * exclude worst case performance for pathological files. Better values may be * found for specific files. */ function Config(good_length, max_lazy, nice_length, max_chain, func) { this.good_length = good_length; this.max_lazy = max_lazy; this.nice_length = nice_length; this.max_chain = max_chain; this.func = func; } var configuration_table; configuration_table = [ /* good lazy nice chain */ new Config(0, 0, 0, 0, deflate_stored), /* 0 store only */ new Config(4, 4, 8, 4, deflate_fast), /* 1 max speed, no lazy matches */ new Config(4, 5, 16, 8, deflate_fast), /* 2 */ new Config(4, 6, 32, 32, deflate_fast), /* 3 */ new Config(4, 4, 16, 16, deflate_slow), /* 4 lazy matches */ new Config(8, 16, 32, 32, deflate_slow), /* 5 */ new Config(8, 16, 128, 128, deflate_slow), /* 6 */ new Config(8, 32, 128, 256, deflate_slow), /* 7 */ new Config(32, 128, 258, 1024, deflate_slow), /* 8 */ new Config(32, 258, 258, 4096, deflate_slow) /* 9 max compression */ ]; /* =========================================================================== * Initialize the "longest match" routines for a new zlib stream */ function lm_init(s) { s.window_size = 2 * s.w_size; /*** CLEAR_HASH(s); ***/ zero(s.head); // Fill with NIL (= 0); /* Set the default configuration parameters: */ s.max_lazy_match = configuration_table[s.level].max_lazy; s.good_match = configuration_table[s.level].good_length; s.nice_match = configuration_table[s.level].nice_length; s.max_chain_length = configuration_table[s.level].max_chain; s.strstart = 0; s.block_start = 0; s.lookahead = 0; s.insert = 0; s.match_length = s.prev_length = MIN_MATCH - 1; s.match_available = 0; s.ins_h = 0; } function DeflateState() { this.strm = null; /* pointer back to this zlib stream */ this.status = 0; /* as the name implies */ this.pending_buf = null; /* output still pending */ this.pending_buf_size = 0; /* size of pending_buf */ this.pending_out = 0; /* next pending byte to output to the stream */ this.pending = 0; /* nb of bytes in the pending buffer */ this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */ this.gzhead = null; /* gzip header information to write */ this.gzindex = 0; /* where in extra, name, or comment */ this.method = Z_DEFLATED; /* can only be DEFLATED */ this.last_flush = -1; /* value of flush param for previous deflate call */ this.w_size = 0; /* LZ77 window size (32K by default) */ this.w_bits = 0; /* log2(w_size) (8..16) */ this.w_mask = 0; /* w_size - 1 */ this.window = null; /* Sliding window. Input bytes are read into the second half of the window, * and move to the first half later to keep a dictionary of at least wSize * bytes. With this organization, matches are limited to a distance of * wSize-MAX_MATCH bytes, but this ensures that IO is always * performed with a length multiple of the block size. */ this.window_size = 0; /* Actual size of window: 2*wSize, except when the user input buffer * is directly used as sliding window. */ this.prev = null; /* Link to older string with same hash index. To limit the size of this * array to 64K, this link is maintained only for the last 32K strings. * An index in this array is thus a window index modulo 32K. */ this.head = null; /* Heads of the hash chains or NIL. */ this.ins_h = 0; /* hash index of string to be inserted */ this.hash_size = 0; /* number of elements in hash table */ this.hash_bits = 0; /* log2(hash_size) */ this.hash_mask = 0; /* hash_size-1 */ this.hash_shift = 0; /* Number of bits by which ins_h must be shifted at each input * step. It must be such that after MIN_MATCH steps, the oldest * byte no longer takes part in the hash key, that is: * hash_shift * MIN_MATCH >= hash_bits */ this.block_start = 0; /* Window position at the beginning of the current output block. Gets * negative when the window is moved backwards. */ this.match_length = 0; /* length of best match */ this.prev_match = 0; /* previous match */ this.match_available = 0; /* set if previous match exists */ this.strstart = 0; /* start of string to insert */ this.match_start = 0; /* start of matching string */ this.lookahead = 0; /* number of valid bytes ahead in window */ this.prev_length = 0; /* Length of the best match at previous step. Matches not greater than this * are discarded. This is used in the lazy match evaluation. */ this.max_chain_length = 0; /* To speed up deflation, hash chains are never searched beyond this * length. A higher limit improves compression ratio but degrades the * speed. */ this.max_lazy_match = 0; /* Attempt to find a better match only when the current match is strictly * smaller than this value. This mechanism is used only for compression * levels >= 4. */ // That's alias to max_lazy_match, don't use directly //this.max_insert_length = 0; /* Insert new strings in the hash table only if the match length is not * greater than this length. This saves time but degrades compression. * max_insert_length is used only for compression levels <= 3. */ this.level = 0; /* compression level (1..9) */ this.strategy = 0; /* favor or force Huffman coding*/ this.good_match = 0; /* Use a faster search when the previous match is longer than this */ this.nice_match = 0; /* Stop searching when current match exceeds this */ /* used by trees.c: */ /* Didn't use ct_data typedef below to suppress compiler warning */ // struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */ // struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */ // struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */ // Use flat array of DOUBLE size, with interleaved fata, // because JS does not support effective this.dyn_ltree = new utils.Buf16(HEAP_SIZE * 2); this.dyn_dtree = new utils.Buf16((2 * D_CODES + 1) * 2); this.bl_tree = new utils.Buf16((2 * BL_CODES + 1) * 2); zero(this.dyn_ltree); zero(this.dyn_dtree); zero(this.bl_tree); this.l_desc = null; /* desc. for literal tree */ this.d_desc = null; /* desc. for distance tree */ this.bl_desc = null; /* desc. for bit length tree */ //ush bl_count[MAX_BITS+1]; this.bl_count = new utils.Buf16(MAX_BITS + 1); /* number of codes at each bit length for an optimal tree */ //int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */ this.heap = new utils.Buf16(2 * L_CODES + 1); /* heap used to build the Huffman trees */ zero(this.heap); this.heap_len = 0; /* number of elements in the heap */ this.heap_max = 0; /* element of largest frequency */ /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used. * The same heap array is used to build all trees. */ this.depth = new utils.Buf16(2 * L_CODES + 1); //uch depth[2*L_CODES+1]; zero(this.depth); /* Depth of each subtree used as tie breaker for trees of equal frequency */ this.l_buf = 0; /* buffer index for literals or lengths */ this.lit_bufsize = 0; /* Size of match buffer for literals/lengths. There are 4 reasons for * limiting lit_bufsize to 64K: * - frequencies can be kept in 16 bit counters * - if compression is not successful for the first block, all input * data is still in the window so we can still emit a stored block even * when input comes from standard input. (This can also be done for * all blocks if lit_bufsize is not greater than 32K.) * - if compression is not successful for a file smaller than 64K, we can * even emit a stored file instead of a stored block (saving 5 bytes). * This is applicable only for zip (not gzip or zlib). * - creating new Huffman trees less frequently may not provide fast * adaptation to changes in the input data statistics. (Take for * example a binary file with poorly compressible code followed by * a highly compressible string table.) Smaller buffer sizes give * fast adaptation but have of course the overhead of transmitting * trees more frequently. * - I can't count above 4 */ this.last_lit = 0; /* running index in l_buf */ this.d_buf = 0; /* Buffer index for distances. To simplify the code, d_buf and l_buf have * the same number of elements. To use different lengths, an extra flag * array would be necessary. */ this.opt_len = 0; /* bit length of current block with optimal trees */ this.static_len = 0; /* bit length of current block with static trees */ this.matches = 0; /* number of string matches in current block */ this.insert = 0; /* bytes at end of window left to insert */ this.bi_buf = 0; /* Output buffer. bits are inserted starting at the bottom (least * significant bits). */ this.bi_valid = 0; /* Number of valid bits in bi_buf. All bits above the last valid bit * are always zero. */ // Used for window memory init. We safely ignore it for JS. That makes // sense only for pointers and memory check tools. //this.high_water = 0; /* High water mark offset in window for initialized bytes -- bytes above * this are set to zero in order to avoid memory check warnings when * longest match routines access bytes past the input. This is then * updated to the new high water mark. */ } function deflateResetKeep(strm) { var s; if (!strm || !strm.state) { return err(strm, Z_STREAM_ERROR); } strm.total_in = strm.total_out = 0; strm.data_type = Z_UNKNOWN; s = strm.state; s.pending = 0; s.pending_out = 0; if (s.wrap < 0) { s.wrap = -s.wrap; /* was made negative by deflate(..., Z_FINISH); */ } s.status = (s.wrap ? INIT_STATE : BUSY_STATE); strm.adler = (s.wrap === 2) ? 0 // crc32(0, Z_NULL, 0) : 1; // adler32(0, Z_NULL, 0) s.last_flush = Z_NO_FLUSH; trees._tr_init(s); return Z_OK; } function deflateReset(strm) { var ret = deflateResetKeep(strm); if (ret === Z_OK) { lm_init(strm.state); } return ret; } function deflateSetHeader(strm, head) { if (!strm || !strm.state) { return Z_STREAM_ERROR; } if (strm.state.wrap !== 2) { return Z_STREAM_ERROR; } strm.state.gzhead = head; return Z_OK; } function deflateInit2(strm, level, method, windowBits, memLevel, strategy) { if (!strm) { // === Z_NULL return Z_STREAM_ERROR; } var wrap = 1; if (level === Z_DEFAULT_COMPRESSION) { level = 6; } if (windowBits < 0) { /* suppress zlib wrapper */ wrap = 0; windowBits = -windowBits; } else if (windowBits > 15) { wrap = 2; /* write gzip wrapper instead */ windowBits -= 16; } if (memLevel < 1 || memLevel > MAX_MEM_LEVEL || method !== Z_DEFLATED || windowBits < 8 || windowBits > 15 || level < 0 || level > 9 || strategy < 0 || strategy > Z_FIXED) { return err(strm, Z_STREAM_ERROR); } if (windowBits === 8) { windowBits = 9; } /* until 256-byte window bug fixed */ var s = new DeflateState(); strm.state = s; s.strm = strm; s.wrap = wrap; s.gzhead = null; s.w_bits = windowBits; s.w_size = 1 << s.w_bits; s.w_mask = s.w_size - 1; s.hash_bits = memLevel + 7; s.hash_size = 1 << s.hash_bits; s.hash_mask = s.hash_size - 1; s.hash_shift = ~~((s.hash_bits + MIN_MATCH - 1) / MIN_MATCH); s.window = new utils.Buf8(s.w_size * 2); s.head = new utils.Buf16(s.hash_size); s.prev = new utils.Buf16(s.w_size); // Don't need mem init magic for JS. //s.high_water = 0; /* nothing written to s->window yet */ s.lit_bufsize = 1 << (memLevel + 6); /* 16K elements by default */ s.pending_buf_size = s.lit_bufsize * 4; //overlay = (ushf *) ZALLOC(strm, s->lit_bufsize, sizeof(ush)+2); //s->pending_buf = (uchf *) overlay; s.pending_buf = new utils.Buf8(s.pending_buf_size); // It is offset from `s.pending_buf` (size is `s.lit_bufsize * 2`) //s->d_buf = overlay + s->lit_bufsize/sizeof(ush); s.d_buf = 1 * s.lit_bufsize; //s->l_buf = s->pending_buf + (1+sizeof(ush))*s->lit_bufsize; s.l_buf = (1 + 2) * s.lit_bufsize; s.level = level; s.strategy = strategy; s.method = method; return deflateReset(strm); } function deflateInit(strm, level) { return deflateInit2(strm, level, Z_DEFLATED, MAX_WBITS, DEF_MEM_LEVEL, Z_DEFAULT_STRATEGY); } function deflate(strm, flush) { var old_flush, s; var beg, val; // for gzip header write only if (!strm || !strm.state || flush > Z_BLOCK || flush < 0) { return strm ? err(strm, Z_STREAM_ERROR) : Z_STREAM_ERROR; } s = strm.state; if (!strm.output || (!strm.input && strm.avail_in !== 0) || (s.status === FINISH_STATE && flush !== Z_FINISH)) { return err(strm, (strm.avail_out === 0) ? Z_BUF_ERROR : Z_STREAM_ERROR); } s.strm = strm; /* just in case */ old_flush = s.last_flush; s.last_flush = flush; /* Write the header */ if (s.status === INIT_STATE) { if (s.wrap === 2) { // GZIP header strm.adler = 0; //crc32(0L, Z_NULL, 0); put_byte(s, 31); put_byte(s, 139); put_byte(s, 8); if (!s.gzhead) { // s->gzhead == Z_NULL put_byte(s, 0); put_byte(s, 0); put_byte(s, 0); put_byte(s, 0); put_byte(s, 0); put_byte(s, s.level === 9 ? 2 : (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? 4 : 0)); put_byte(s, OS_CODE); s.status = BUSY_STATE; } else { put_byte(s, (s.gzhead.text ? 1 : 0) + (s.gzhead.hcrc ? 2 : 0) + (!s.gzhead.extra ? 0 : 4) + (!s.gzhead.name ? 0 : 8) + (!s.gzhead.comment ? 0 : 16) ); put_byte(s, s.gzhead.time & 0xff); put_byte(s, (s.gzhead.time >> 8) & 0xff); put_byte(s, (s.gzhead.time >> 16) & 0xff); put_byte(s, (s.gzhead.time >> 24) & 0xff); put_byte(s, s.level === 9 ? 2 : (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2 ? 4 : 0)); put_byte(s, s.gzhead.os & 0xff); if (s.gzhead.extra && s.gzhead.extra.length) { put_byte(s, s.gzhead.extra.length & 0xff); put_byte(s, (s.gzhead.extra.length >> 8) & 0xff); } if (s.gzhead.hcrc) { strm.adler = crc32(strm.adler, s.pending_buf, s.pending, 0); } s.gzindex = 0; s.status = EXTRA_STATE; } } else // DEFLATE header { var header = (Z_DEFLATED + ((s.w_bits - 8) << 4)) << 8; var level_flags = -1; if (s.strategy >= Z_HUFFMAN_ONLY || s.level < 2) { level_flags = 0; } else if (s.level < 6) { level_flags = 1; } else if (s.level === 6) { level_flags = 2; } else { level_flags = 3; } header |= (level_flags << 6); if (s.strstart !== 0) { header |= PRESET_DICT; } header += 31 - (header % 31); s.status = BUSY_STATE; putShortMSB(s, header); /* Save the adler32 of the preset dictionary: */ if (s.strstart !== 0) { putShortMSB(s, strm.adler >>> 16); putShortMSB(s, strm.adler & 0xffff); } strm.adler = 1; // adler32(0L, Z_NULL, 0); } } //#ifdef GZIP if (s.status === EXTRA_STATE) { if (s.gzhead.extra/* != Z_NULL*/) { beg = s.pending; /* start of bytes to update crc */ while (s.gzindex < (s.gzhead.extra.length & 0xffff)) { if (s.pending === s.pending_buf_size) { if (s.gzhead.hcrc && s.pending > beg) { strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); } flush_pending(strm); beg = s.pending; if (s.pending === s.pending_buf_size) { break; } } put_byte(s, s.gzhead.extra[s.gzindex] & 0xff); s.gzindex++; } if (s.gzhead.hcrc && s.pending > beg) { strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); } if (s.gzindex === s.gzhead.extra.length) { s.gzindex = 0; s.status = NAME_STATE; } } else { s.status = NAME_STATE; } } if (s.status === NAME_STATE) { if (s.gzhead.name/* != Z_NULL*/) { beg = s.pending; /* start of bytes to update crc */ //int val; do { if (s.pending === s.pending_buf_size) { if (s.gzhead.hcrc && s.pending > beg) { strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); } flush_pending(strm); beg = s.pending; if (s.pending === s.pending_buf_size) { val = 1; break; } } // JS specific: little magic to add zero terminator to end of string if (s.gzindex < s.gzhead.name.length) { val = s.gzhead.name.charCodeAt(s.gzindex++) & 0xff; } else { val = 0; } put_byte(s, val); } while (val !== 0); if (s.gzhead.hcrc && s.pending > beg) { strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); } if (val === 0) { s.gzindex = 0; s.status = COMMENT_STATE; } } else { s.status = COMMENT_STATE; } } if (s.status === COMMENT_STATE) { if (s.gzhead.comment/* != Z_NULL*/) { beg = s.pending; /* start of bytes to update crc */ //int val; do { if (s.pending === s.pending_buf_size) { if (s.gzhead.hcrc && s.pending > beg) { strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); } flush_pending(strm); beg = s.pending; if (s.pending === s.pending_buf_size) { val = 1; break; } } // JS specific: little magic to add zero terminator to end of string if (s.gzindex < s.gzhead.comment.length) { val = s.gzhead.comment.charCodeAt(s.gzindex++) & 0xff; } else { val = 0; } put_byte(s, val); } while (val !== 0); if (s.gzhead.hcrc && s.pending > beg) { strm.adler = crc32(strm.adler, s.pending_buf, s.pending - beg, beg); } if (val === 0) { s.status = HCRC_STATE; } } else { s.status = HCRC_STATE; } } if (s.status === HCRC_STATE) { if (s.gzhead.hcrc) { if (s.pending + 2 > s.pending_buf_size) { flush_pending(strm); } if (s.pending + 2 <= s.pending_buf_size) { put_byte(s, strm.adler & 0xff); put_byte(s, (strm.adler >> 8) & 0xff); strm.adler = 0; //crc32(0L, Z_NULL, 0); s.status = BUSY_STATE; } } else { s.status = BUSY_STATE; } } //#endif /* Flush as much pending output as possible */ if (s.pending !== 0) { flush_pending(strm); if (strm.avail_out === 0) { /* Since avail_out is 0, deflate will be called again with * more output space, but possibly with both pending and * avail_in equal to zero. There won't be anything to do, * but this is not an error situation so make sure we * return OK instead of BUF_ERROR at next call of deflate: */ s.last_flush = -1; return Z_OK; } /* Make sure there is something to do and avoid duplicate consecutive * flushes. For repeated and useless calls with Z_FINISH, we keep * returning Z_STREAM_END instead of Z_BUF_ERROR. */ } else if (strm.avail_in === 0 && rank(flush) <= rank(old_flush) && flush !== Z_FINISH) { return err(strm, Z_BUF_ERROR); } /* User must not provide more input after the first FINISH: */ if (s.status === FINISH_STATE && strm.avail_in !== 0) { return err(strm, Z_BUF_ERROR); } /* Start a new block or continue the current one. */ if (strm.avail_in !== 0 || s.lookahead !== 0 || (flush !== Z_NO_FLUSH && s.status !== FINISH_STATE)) { var bstate = (s.strategy === Z_HUFFMAN_ONLY) ? deflate_huff(s, flush) : (s.strategy === Z_RLE ? deflate_rle(s, flush) : configuration_table[s.level].func(s, flush)); if (bstate === BS_FINISH_STARTED || bstate === BS_FINISH_DONE) { s.status = FINISH_STATE; } if (bstate === BS_NEED_MORE || bstate === BS_FINISH_STARTED) { if (strm.avail_out === 0) { s.last_flush = -1; /* avoid BUF_ERROR next call, see above */ } return Z_OK; /* If flush != Z_NO_FLUSH && avail_out == 0, the next call * of deflate should use the same flush parameter to make sure * that the flush is complete. So we don't have to output an * empty block here, this will be done at next call. This also * ensures that for a very small output buffer, we emit at most * one empty block. */ } if (bstate === BS_BLOCK_DONE) { if (flush === Z_PARTIAL_FLUSH) { trees._tr_align(s); } else if (flush !== Z_BLOCK) { /* FULL_FLUSH or SYNC_FLUSH */ trees._tr_stored_block(s, 0, 0, false); /* For a full flush, this empty block will be recognized * as a special marker by inflate_sync(). */ if (flush === Z_FULL_FLUSH) { /*** CLEAR_HASH(s); ***/ /* forget history */ zero(s.head); // Fill with NIL (= 0); if (s.lookahead === 0) { s.strstart = 0; s.block_start = 0; s.insert = 0; } } } flush_pending(strm); if (strm.avail_out === 0) { s.last_flush = -1; /* avoid BUF_ERROR at next call, see above */ return Z_OK; } } } //Assert(strm->avail_out > 0, "bug2"); //if (strm.avail_out <= 0) { throw new Error("bug2");} if (flush !== Z_FINISH) { return Z_OK; } if (s.wrap <= 0) { return Z_STREAM_END; } /* Write the trailer */ if (s.wrap === 2) { put_byte(s, strm.adler & 0xff); put_byte(s, (strm.adler >> 8) & 0xff); put_byte(s, (strm.adler >> 16) & 0xff); put_byte(s, (strm.adler >> 24) & 0xff); put_byte(s, strm.total_in & 0xff); put_byte(s, (strm.total_in >> 8) & 0xff); put_byte(s, (strm.total_in >> 16) & 0xff); put_byte(s, (strm.total_in >> 24) & 0xff); } else { putShortMSB(s, strm.adler >>> 16); putShortMSB(s, strm.adler & 0xffff); } flush_pending(strm); /* If avail_out is zero, the application will call deflate again * to flush the rest. */ if (s.wrap > 0) { s.wrap = -s.wrap; } /* write the trailer only once! */ return s.pending !== 0 ? Z_OK : Z_STREAM_END; } function deflateEnd(strm) { var status; if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) { return Z_STREAM_ERROR; } status = strm.state.status; if (status !== INIT_STATE && status !== EXTRA_STATE && status !== NAME_STATE && status !== COMMENT_STATE && status !== HCRC_STATE && status !== BUSY_STATE && status !== FINISH_STATE ) { return err(strm, Z_STREAM_ERROR); } strm.state = null; return status === BUSY_STATE ? err(strm, Z_DATA_ERROR) : Z_OK; } /* ========================================================================= * Initializes the compression dictionary from the given byte * sequence without producing any compressed output. */ function deflateSetDictionary(strm, dictionary) { var dictLength = dictionary.length; var s; var str, n; var wrap; var avail; var next; var input; var tmpDict; if (!strm/*== Z_NULL*/ || !strm.state/*== Z_NULL*/) { return Z_STREAM_ERROR; } s = strm.state; wrap = s.wrap; if (wrap === 2 || (wrap === 1 && s.status !== INIT_STATE) || s.lookahead) { return Z_STREAM_ERROR; } /* when using zlib wrappers, compute Adler-32 for provided dictionary */ if (wrap === 1) { /* adler32(strm->adler, dictionary, dictLength); */ strm.adler = adler32(strm.adler, dictionary, dictLength, 0); } s.wrap = 0; /* avoid computing Adler-32 in read_buf */ /* if dictionary would fill window, just replace the history */ if (dictLength >= s.w_size) { if (wrap === 0) { /* already empty otherwise */ /*** CLEAR_HASH(s); ***/ zero(s.head); // Fill with NIL (= 0); s.strstart = 0; s.block_start = 0; s.insert = 0; } /* use the tail */ // dictionary = dictionary.slice(dictLength - s.w_size); tmpDict = new utils.Buf8(s.w_size); utils.arraySet(tmpDict, dictionary, dictLength - s.w_size, s.w_size, 0); dictionary = tmpDict; dictLength = s.w_size; } /* insert dictionary into window and hash */ avail = strm.avail_in; next = strm.next_in; input = strm.input; strm.avail_in = dictLength; strm.next_in = 0; strm.input = dictionary; fill_window(s); while (s.lookahead >= MIN_MATCH) { str = s.strstart; n = s.lookahead - (MIN_MATCH - 1); do { /* UPDATE_HASH(s, s->ins_h, s->window[str + MIN_MATCH-1]); */ s.ins_h = ((s.ins_h << s.hash_shift) ^ s.window[str + MIN_MATCH - 1]) & s.hash_mask; s.prev[str & s.w_mask] = s.head[s.ins_h]; s.head[s.ins_h] = str; str++; } while (--n); s.strstart = str; s.lookahead = MIN_MATCH - 1; fill_window(s); } s.strstart += s.lookahead; s.block_start = s.strstart; s.insert = s.lookahead; s.lookahead = 0; s.match_length = s.prev_length = MIN_MATCH - 1; s.match_available = 0; strm.next_in = next; strm.input = input; strm.avail_in = avail; s.wrap = wrap; return Z_OK; } exports.deflateInit = deflateInit; exports.deflateInit2 = deflateInit2; exports.deflateReset = deflateReset; exports.deflateResetKeep = deflateResetKeep; exports.deflateSetHeader = deflateSetHeader; exports.deflate = deflate; exports.deflateEnd = deflateEnd; exports.deflateSetDictionary = deflateSetDictionary; exports.deflateInfo = 'pako deflate (from Nodeca project)'; /* Not implemented exports.deflateBound = deflateBound; exports.deflateCopy = deflateCopy; exports.deflateParams = deflateParams; exports.deflatePending = deflatePending; exports.deflatePrime = deflatePrime; exports.deflateTune = deflateTune; */ /***/ }), /***/ 6438: /***/ (function(module) { "use strict"; // (C) 1995-2013 Jean-loup Gailly and Mark Adler // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would be // appreciated but is not required. // 2. Altered source versions must be plainly marked as such, and must not be // misrepresented as being the original software. // 3. This notice may not be removed or altered from any source distribution. // See state defs from inflate.js var BAD = 30; /* got a data error -- remain here until reset */ var TYPE = 12; /* i: waiting for type bits, including last-flag bit */ /* Decode literal, length, and distance codes and write out the resulting literal and match bytes until either not enough input or output is available, an end-of-block is encountered, or a data error is encountered. When large enough input and output buffers are supplied to inflate(), for example, a 16K input buffer and a 64K output buffer, more than 95% of the inflate execution time is spent in this routine. Entry assumptions: state.mode === LEN strm.avail_in >= 6 strm.avail_out >= 258 start >= strm.avail_out state.bits < 8 On return, state.mode is one of: LEN -- ran out of enough output space or enough available input TYPE -- reached end of block code, inflate() to interpret next block BAD -- error in block data Notes: - The maximum input bits used by a length/distance pair is 15 bits for the length code, 5 bits for the length extra, 15 bits for the distance code, and 13 bits for the distance extra. This totals 48 bits, or six bytes. Therefore if strm.avail_in >= 6, then there is enough input to avoid checking for available input while decoding. - The maximum bytes that a single length/distance pair can output is 258 bytes, which is the maximum length that can be coded. inflate_fast() requires strm.avail_out >= 258 for each loop to avoid checking for output space. */ module.exports = function inflate_fast(strm, start) { var state; var _in; /* local strm.input */ var last; /* have enough input while in < last */ var _out; /* local strm.output */ var beg; /* inflate()'s initial strm.output */ var end; /* while out < end, enough space available */ //#ifdef INFLATE_STRICT var dmax; /* maximum distance from zlib header */ //#endif var wsize; /* window size or zero if not using window */ var whave; /* valid bytes in the window */ var wnext; /* window write index */ // Use `s_window` instead `window`, avoid conflict with instrumentation tools var s_window; /* allocated sliding window, if wsize != 0 */ var hold; /* local strm.hold */ var bits; /* local strm.bits */ var lcode; /* local strm.lencode */ var dcode; /* local strm.distcode */ var lmask; /* mask for first level of length codes */ var dmask; /* mask for first level of distance codes */ var here; /* retrieved table entry */ var op; /* code bits, operation, extra bits, or */ /* window position, window bytes to copy */ var len; /* match length, unused bytes */ var dist; /* match distance */ var from; /* where to copy match from */ var from_source; var input, output; // JS specific, because we have no pointers /* copy state to local variables */ state = strm.state; //here = state.here; _in = strm.next_in; input = strm.input; last = _in + (strm.avail_in - 5); _out = strm.next_out; output = strm.output; beg = _out - (start - strm.avail_out); end = _out + (strm.avail_out - 257); //#ifdef INFLATE_STRICT dmax = state.dmax; //#endif wsize = state.wsize; whave = state.whave; wnext = state.wnext; s_window = state.window; hold = state.hold; bits = state.bits; lcode = state.lencode; dcode = state.distcode; lmask = (1 << state.lenbits) - 1; dmask = (1 << state.distbits) - 1; /* decode literals and length/distances until end-of-block or not enough input data or output space */ top: do { if (bits < 15) { hold += input[_in++] << bits; bits += 8; hold += input[_in++] << bits; bits += 8; } here = lcode[hold & lmask]; dolen: for (;;) { // Goto emulation op = here >>> 24/*here.bits*/; hold >>>= op; bits -= op; op = (here >>> 16) & 0xff/*here.op*/; if (op === 0) { /* literal */ //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? // "inflate: literal '%c'\n" : // "inflate: literal 0x%02x\n", here.val)); output[_out++] = here & 0xffff/*here.val*/; } else if (op & 16) { /* length base */ len = here & 0xffff/*here.val*/; op &= 15; /* number of extra bits */ if (op) { if (bits < op) { hold += input[_in++] << bits; bits += 8; } len += hold & ((1 << op) - 1); hold >>>= op; bits -= op; } //Tracevv((stderr, "inflate: length %u\n", len)); if (bits < 15) { hold += input[_in++] << bits; bits += 8; hold += input[_in++] << bits; bits += 8; } here = dcode[hold & dmask]; dodist: for (;;) { // goto emulation op = here >>> 24/*here.bits*/; hold >>>= op; bits -= op; op = (here >>> 16) & 0xff/*here.op*/; if (op & 16) { /* distance base */ dist = here & 0xffff/*here.val*/; op &= 15; /* number of extra bits */ if (bits < op) { hold += input[_in++] << bits; bits += 8; if (bits < op) { hold += input[_in++] << bits; bits += 8; } } dist += hold & ((1 << op) - 1); //#ifdef INFLATE_STRICT if (dist > dmax) { strm.msg = 'invalid distance too far back'; state.mode = BAD; break top; } //#endif hold >>>= op; bits -= op; //Tracevv((stderr, "inflate: distance %u\n", dist)); op = _out - beg; /* max distance in output */ if (dist > op) { /* see if copy from window */ op = dist - op; /* distance back in window */ if (op > whave) { if (state.sane) { strm.msg = 'invalid distance too far back'; state.mode = BAD; break top; } // (!) This block is disabled in zlib defaults, // don't enable it for binary compatibility //#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR // if (len <= op - whave) { // do { // output[_out++] = 0; // } while (--len); // continue top; // } // len -= op - whave; // do { // output[_out++] = 0; // } while (--op > whave); // if (op === 0) { // from = _out - dist; // do { // output[_out++] = output[from++]; // } while (--len); // continue top; // } //#endif } from = 0; // window index from_source = s_window; if (wnext === 0) { /* very common case */ from += wsize - op; if (op < len) { /* some from window */ len -= op; do { output[_out++] = s_window[from++]; } while (--op); from = _out - dist; /* rest from output */ from_source = output; } } else if (wnext < op) { /* wrap around window */ from += wsize + wnext - op; op -= wnext; if (op < len) { /* some from end of window */ len -= op; do { output[_out++] = s_window[from++]; } while (--op); from = 0; if (wnext < len) { /* some from start of window */ op = wnext; len -= op; do { output[_out++] = s_window[from++]; } while (--op); from = _out - dist; /* rest from output */ from_source = output; } } } else { /* contiguous in window */ from += wnext - op; if (op < len) { /* some from window */ len -= op; do { output[_out++] = s_window[from++]; } while (--op); from = _out - dist; /* rest from output */ from_source = output; } } while (len > 2) { output[_out++] = from_source[from++]; output[_out++] = from_source[from++]; output[_out++] = from_source[from++]; len -= 3; } if (len) { output[_out++] = from_source[from++]; if (len > 1) { output[_out++] = from_source[from++]; } } } else { from = _out - dist; /* copy direct from output */ do { /* minimum length is three */ output[_out++] = output[from++]; output[_out++] = output[from++]; output[_out++] = output[from++]; len -= 3; } while (len > 2); if (len) { output[_out++] = output[from++]; if (len > 1) { output[_out++] = output[from++]; } } } } else if ((op & 64) === 0) { /* 2nd level distance code */ here = dcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))]; continue dodist; } else { strm.msg = 'invalid distance code'; state.mode = BAD; break top; } break; // need to emulate goto via "continue" } } else if ((op & 64) === 0) { /* 2nd level length code */ here = lcode[(here & 0xffff)/*here.val*/ + (hold & ((1 << op) - 1))]; continue dolen; } else if (op & 32) { /* end-of-block */ //Tracevv((stderr, "inflate: end of block\n")); state.mode = TYPE; break top; } else { strm.msg = 'invalid literal/length code'; state.mode = BAD; break top; } break; // need to emulate goto via "continue" } } while (_in < last && _out < end); /* return unused bytes (on entry, bits < 8, so in won't go too far back) */ len = bits >> 3; _in -= len; bits -= len << 3; hold &= (1 << bits) - 1; /* update state and return */ strm.next_in = _in; strm.next_out = _out; strm.avail_in = (_in < last ? 5 + (last - _in) : 5 - (_in - last)); strm.avail_out = (_out < end ? 257 + (end - _out) : 257 - (_out - end)); state.hold = hold; state.bits = bits; return; }; /***/ }), /***/ 3001: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; // (C) 1995-2013 Jean-loup Gailly and Mark Adler // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would be // appreciated but is not required. // 2. Altered source versions must be plainly marked as such, and must not be // misrepresented as being the original software. // 3. This notice may not be removed or altered from any source distribution. var utils = __webpack_require__(6907); var adler32 = __webpack_require__(7575); var crc32 = __webpack_require__(3415); var inflate_fast = __webpack_require__(6438); var inflate_table = __webpack_require__(1375); var CODES = 0; var LENS = 1; var DISTS = 2; /* Public constants ==========================================================*/ /* ===========================================================================*/ /* Allowed flush values; see deflate() and inflate() below for details */ //var Z_NO_FLUSH = 0; //var Z_PARTIAL_FLUSH = 1; //var Z_SYNC_FLUSH = 2; //var Z_FULL_FLUSH = 3; var Z_FINISH = 4; var Z_BLOCK = 5; var Z_TREES = 6; /* Return codes for the compression/decompression functions. Negative values * are errors, positive values are used for special but normal events. */ var Z_OK = 0; var Z_STREAM_END = 1; var Z_NEED_DICT = 2; //var Z_ERRNO = -1; var Z_STREAM_ERROR = -2; var Z_DATA_ERROR = -3; var Z_MEM_ERROR = -4; var Z_BUF_ERROR = -5; //var Z_VERSION_ERROR = -6; /* The deflate compression method */ var Z_DEFLATED = 8; /* STATES ====================================================================*/ /* ===========================================================================*/ var HEAD = 1; /* i: waiting for magic header */ var FLAGS = 2; /* i: waiting for method and flags (gzip) */ var TIME = 3; /* i: waiting for modification time (gzip) */ var OS = 4; /* i: waiting for extra flags and operating system (gzip) */ var EXLEN = 5; /* i: waiting for extra length (gzip) */ var EXTRA = 6; /* i: waiting for extra bytes (gzip) */ var NAME = 7; /* i: waiting for end of file name (gzip) */ var COMMENT = 8; /* i: waiting for end of comment (gzip) */ var HCRC = 9; /* i: waiting for header crc (gzip) */ var DICTID = 10; /* i: waiting for dictionary check value */ var DICT = 11; /* waiting for inflateSetDictionary() call */ var TYPE = 12; /* i: waiting for type bits, including last-flag bit */ var TYPEDO = 13; /* i: same, but skip check to exit inflate on new block */ var STORED = 14; /* i: waiting for stored size (length and complement) */ var COPY_ = 15; /* i/o: same as COPY below, but only first time in */ var COPY = 16; /* i/o: waiting for input or output to copy stored block */ var TABLE = 17; /* i: waiting for dynamic block table lengths */ var LENLENS = 18; /* i: waiting for code length code lengths */ var CODELENS = 19; /* i: waiting for length/lit and distance code lengths */ var LEN_ = 20; /* i: same as LEN below, but only first time in */ var LEN = 21; /* i: waiting for length/lit/eob code */ var LENEXT = 22; /* i: waiting for length extra bits */ var DIST = 23; /* i: waiting for distance code */ var DISTEXT = 24; /* i: waiting for distance extra bits */ var MATCH = 25; /* o: waiting for output space to copy string */ var LIT = 26; /* o: waiting for output space to write literal */ var CHECK = 27; /* i: waiting for 32-bit check value */ var LENGTH = 28; /* i: waiting for 32-bit length (gzip) */ var DONE = 29; /* finished check, done -- remain here until reset */ var BAD = 30; /* got a data error -- remain here until reset */ var MEM = 31; /* got an inflate() memory error -- remain here until reset */ var SYNC = 32; /* looking for synchronization bytes to restart inflate() */ /* ===========================================================================*/ var ENOUGH_LENS = 852; var ENOUGH_DISTS = 592; //var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS); var MAX_WBITS = 15; /* 32K LZ77 window */ var DEF_WBITS = MAX_WBITS; function zswap32(q) { return (((q >>> 24) & 0xff) + ((q >>> 8) & 0xff00) + ((q & 0xff00) << 8) + ((q & 0xff) << 24)); } function InflateState() { this.mode = 0; /* current inflate mode */ this.last = false; /* true if processing last block */ this.wrap = 0; /* bit 0 true for zlib, bit 1 true for gzip */ this.havedict = false; /* true if dictionary provided */ this.flags = 0; /* gzip header method and flags (0 if zlib) */ this.dmax = 0; /* zlib header max distance (INFLATE_STRICT) */ this.check = 0; /* protected copy of check value */ this.total = 0; /* protected copy of output count */ // TODO: may be {} this.head = null; /* where to save gzip header information */ /* sliding window */ this.wbits = 0; /* log base 2 of requested window size */ this.wsize = 0; /* window size or zero if not using window */ this.whave = 0; /* valid bytes in the window */ this.wnext = 0; /* window write index */ this.window = null; /* allocated sliding window, if needed */ /* bit accumulator */ this.hold = 0; /* input bit accumulator */ this.bits = 0; /* number of bits in "in" */ /* for string and stored block copying */ this.length = 0; /* literal or length of data to copy */ this.offset = 0; /* distance back to copy string from */ /* for table and code decoding */ this.extra = 0; /* extra bits needed */ /* fixed and dynamic code tables */ this.lencode = null; /* starting table for length/literal codes */ this.distcode = null; /* starting table for distance codes */ this.lenbits = 0; /* index bits for lencode */ this.distbits = 0; /* index bits for distcode */ /* dynamic table building */ this.ncode = 0; /* number of code length code lengths */ this.nlen = 0; /* number of length code lengths */ this.ndist = 0; /* number of distance code lengths */ this.have = 0; /* number of code lengths in lens[] */ this.next = null; /* next available space in codes[] */ this.lens = new utils.Buf16(320); /* temporary storage for code lengths */ this.work = new utils.Buf16(288); /* work area for code table building */ /* because we don't have pointers in js, we use lencode and distcode directly as buffers so we don't need codes */ //this.codes = new utils.Buf32(ENOUGH); /* space for code tables */ this.lendyn = null; /* dynamic table for length/literal codes (JS specific) */ this.distdyn = null; /* dynamic table for distance codes (JS specific) */ this.sane = 0; /* if false, allow invalid distance too far */ this.back = 0; /* bits back of last unprocessed length/lit */ this.was = 0; /* initial length of match */ } function inflateResetKeep(strm) { var state; if (!strm || !strm.state) { return Z_STREAM_ERROR; } state = strm.state; strm.total_in = strm.total_out = state.total = 0; strm.msg = ''; /*Z_NULL*/ if (state.wrap) { /* to support ill-conceived Java test suite */ strm.adler = state.wrap & 1; } state.mode = HEAD; state.last = 0; state.havedict = 0; state.dmax = 32768; state.head = null/*Z_NULL*/; state.hold = 0; state.bits = 0; //state.lencode = state.distcode = state.next = state.codes; state.lencode = state.lendyn = new utils.Buf32(ENOUGH_LENS); state.distcode = state.distdyn = new utils.Buf32(ENOUGH_DISTS); state.sane = 1; state.back = -1; //Tracev((stderr, "inflate: reset\n")); return Z_OK; } function inflateReset(strm) { var state; if (!strm || !strm.state) { return Z_STREAM_ERROR; } state = strm.state; state.wsize = 0; state.whave = 0; state.wnext = 0; return inflateResetKeep(strm); } function inflateReset2(strm, windowBits) { var wrap; var state; /* get the state */ if (!strm || !strm.state) { return Z_STREAM_ERROR; } state = strm.state; /* extract wrap request from windowBits parameter */ if (windowBits < 0) { wrap = 0; windowBits = -windowBits; } else { wrap = (windowBits >> 4) + 1; if (windowBits < 48) { windowBits &= 15; } } /* set number of window bits, free window if different */ if (windowBits && (windowBits < 8 || windowBits > 15)) { return Z_STREAM_ERROR; } if (state.window !== null && state.wbits !== windowBits) { state.window = null; } /* update state and reset the rest of it */ state.wrap = wrap; state.wbits = windowBits; return inflateReset(strm); } function inflateInit2(strm, windowBits) { var ret; var state; if (!strm) { return Z_STREAM_ERROR; } //strm.msg = Z_NULL; /* in case we return an error */ state = new InflateState(); //if (state === Z_NULL) return Z_MEM_ERROR; //Tracev((stderr, "inflate: allocated\n")); strm.state = state; state.window = null/*Z_NULL*/; ret = inflateReset2(strm, windowBits); if (ret !== Z_OK) { strm.state = null/*Z_NULL*/; } return ret; } function inflateInit(strm) { return inflateInit2(strm, DEF_WBITS); } /* Return state with length and distance decoding tables and index sizes set to fixed code decoding. Normally this returns fixed tables from inffixed.h. If BUILDFIXED is defined, then instead this routine builds the tables the first time it's called, and returns those tables the first time and thereafter. This reduces the size of the code by about 2K bytes, in exchange for a little execution time. However, BUILDFIXED should not be used for threaded applications, since the rewriting of the tables and virgin may not be thread-safe. */ var virgin = true; var lenfix, distfix; // We have no pointers in JS, so keep tables separate function fixedtables(state) { /* build fixed huffman tables if first call (may not be thread safe) */ if (virgin) { var sym; lenfix = new utils.Buf32(512); distfix = new utils.Buf32(32); /* literal/length table */ sym = 0; while (sym < 144) { state.lens[sym++] = 8; } while (sym < 256) { state.lens[sym++] = 9; } while (sym < 280) { state.lens[sym++] = 7; } while (sym < 288) { state.lens[sym++] = 8; } inflate_table(LENS, state.lens, 0, 288, lenfix, 0, state.work, { bits: 9 }); /* distance table */ sym = 0; while (sym < 32) { state.lens[sym++] = 5; } inflate_table(DISTS, state.lens, 0, 32, distfix, 0, state.work, { bits: 5 }); /* do this just once */ virgin = false; } state.lencode = lenfix; state.lenbits = 9; state.distcode = distfix; state.distbits = 5; } /* Update the window with the last wsize (normally 32K) bytes written before returning. If window does not exist yet, create it. This is only called when a window is already in use, or when output has been written during this inflate call, but the end of the deflate stream has not been reached yet. It is also called to create a window for dictionary data when a dictionary is loaded. Providing output buffers larger than 32K to inflate() should provide a speed advantage, since only the last 32K of output is copied to the sliding window upon return from inflate(), and since all distances after the first 32K of output will fall in the output data, making match copies simpler and faster. The advantage may be dependent on the size of the processor's data caches. */ function updatewindow(strm, src, end, copy) { var dist; var state = strm.state; /* if it hasn't been done already, allocate space for the window */ if (state.window === null) { state.wsize = 1 << state.wbits; state.wnext = 0; state.whave = 0; state.window = new utils.Buf8(state.wsize); } /* copy state->wsize or less output bytes into the circular window */ if (copy >= state.wsize) { utils.arraySet(state.window, src, end - state.wsize, state.wsize, 0); state.wnext = 0; state.whave = state.wsize; } else { dist = state.wsize - state.wnext; if (dist > copy) { dist = copy; } //zmemcpy(state->window + state->wnext, end - copy, dist); utils.arraySet(state.window, src, end - copy, dist, state.wnext); copy -= dist; if (copy) { //zmemcpy(state->window, end - copy, copy); utils.arraySet(state.window, src, end - copy, copy, 0); state.wnext = copy; state.whave = state.wsize; } else { state.wnext += dist; if (state.wnext === state.wsize) { state.wnext = 0; } if (state.whave < state.wsize) { state.whave += dist; } } } return 0; } function inflate(strm, flush) { var state; var input, output; // input/output buffers var next; /* next input INDEX */ var put; /* next output INDEX */ var have, left; /* available input and output */ var hold; /* bit buffer */ var bits; /* bits in bit buffer */ var _in, _out; /* save starting available input and output */ var copy; /* number of stored or match bytes to copy */ var from; /* where to copy match bytes from */ var from_source; var here = 0; /* current decoding table entry */ var here_bits, here_op, here_val; // paked "here" denormalized (JS specific) //var last; /* parent table entry */ var last_bits, last_op, last_val; // paked "last" denormalized (JS specific) var len; /* length to copy for repeats, bits to drop */ var ret; /* return code */ var hbuf = new utils.Buf8(4); /* buffer for gzip header crc calculation */ var opts; var n; // temporary var for NEED_BITS var order = /* permutation of code lengths */ [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ]; if (!strm || !strm.state || !strm.output || (!strm.input && strm.avail_in !== 0)) { return Z_STREAM_ERROR; } state = strm.state; if (state.mode === TYPE) { state.mode = TYPEDO; } /* skip check */ //--- LOAD() --- put = strm.next_out; output = strm.output; left = strm.avail_out; next = strm.next_in; input = strm.input; have = strm.avail_in; hold = state.hold; bits = state.bits; //--- _in = have; _out = left; ret = Z_OK; inf_leave: // goto emulation for (;;) { switch (state.mode) { case HEAD: if (state.wrap === 0) { state.mode = TYPEDO; break; } //=== NEEDBITS(16); while (bits < 16) { if (have === 0) { break inf_leave; } have--; hold += input[next++] << bits; bits += 8; } //===// if ((state.wrap & 2) && hold === 0x8b1f) { /* gzip header */ state.check = 0/*crc32(0L, Z_NULL, 0)*/; //=== CRC2(state.check, hold); hbuf[0] = hold & 0xff; hbuf[1] = (hold >>> 8) & 0xff; state.check = crc32(state.check, hbuf, 2, 0); //===// //=== INITBITS(); hold = 0; bits = 0; //===// state.mode = FLAGS; break; } state.flags = 0; /* expect zlib header */ if (state.head) { state.head.done = false; } if (!(state.wrap & 1) || /* check if zlib header allowed */ (((hold & 0xff)/*BITS(8)*/ << 8) + (hold >> 8)) % 31) { strm.msg = 'incorrect header check'; state.mode = BAD; break; } if ((hold & 0x0f)/*BITS(4)*/ !== Z_DEFLATED) { strm.msg = 'unknown compression method'; state.mode = BAD; break; } //--- DROPBITS(4) ---// hold >>>= 4; bits -= 4; //---// len = (hold & 0x0f)/*BITS(4)*/ + 8; if (state.wbits === 0) { state.wbits = len; } else if (len > state.wbits) { strm.msg = 'invalid window size'; state.mode = BAD; break; } state.dmax = 1 << len; //Tracev((stderr, "inflate: zlib header ok\n")); strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/; state.mode = hold & 0x200 ? DICTID : TYPE; //=== INITBITS(); hold = 0; bits = 0; //===// break; case FLAGS: //=== NEEDBITS(16); */ while (bits < 16) { if (have === 0) { break inf_leave; } have--; hold += input[next++] << bits; bits += 8; } //===// state.flags = hold; if ((state.flags & 0xff) !== Z_DEFLATED) { strm.msg = 'unknown compression method'; state.mode = BAD; break; } if (state.flags & 0xe000) { strm.msg = 'unknown header flags set'; state.mode = BAD; break; } if (state.head) { state.head.text = ((hold >> 8) & 1); } if (state.flags & 0x0200) { //=== CRC2(state.check, hold); hbuf[0] = hold & 0xff; hbuf[1] = (hold >>> 8) & 0xff; state.check = crc32(state.check, hbuf, 2, 0); //===// } //=== INITBITS(); hold = 0; bits = 0; //===// state.mode = TIME; /* falls through */ case TIME: //=== NEEDBITS(32); */ while (bits < 32) { if (have === 0) { break inf_leave; } have--; hold += input[next++] << bits; bits += 8; } //===// if (state.head) { state.head.time = hold; } if (state.flags & 0x0200) { //=== CRC4(state.check, hold) hbuf[0] = hold & 0xff; hbuf[1] = (hold >>> 8) & 0xff; hbuf[2] = (hold >>> 16) & 0xff; hbuf[3] = (hold >>> 24) & 0xff; state.check = crc32(state.check, hbuf, 4, 0); //=== } //=== INITBITS(); hold = 0; bits = 0; //===// state.mode = OS; /* falls through */ case OS: //=== NEEDBITS(16); */ while (bits < 16) { if (have === 0) { break inf_leave; } have--; hold += input[next++] << bits; bits += 8; } //===// if (state.head) { state.head.xflags = (hold & 0xff); state.head.os = (hold >> 8); } if (state.flags & 0x0200) { //=== CRC2(state.check, hold); hbuf[0] = hold & 0xff; hbuf[1] = (hold >>> 8) & 0xff; state.check = crc32(state.check, hbuf, 2, 0); //===// } //=== INITBITS(); hold = 0; bits = 0; //===// state.mode = EXLEN; /* falls through */ case EXLEN: if (state.flags & 0x0400) { //=== NEEDBITS(16); */ while (bits < 16) { if (have === 0) { break inf_leave; } have--; hold += input[next++] << bits; bits += 8; } //===// state.length = hold; if (state.head) { state.head.extra_len = hold; } if (state.flags & 0x0200) { //=== CRC2(state.check, hold); hbuf[0] = hold & 0xff; hbuf[1] = (hold >>> 8) & 0xff; state.check = crc32(state.check, hbuf, 2, 0); //===// } //=== INITBITS(); hold = 0; bits = 0; //===// } else if (state.head) { state.head.extra = null/*Z_NULL*/; } state.mode = EXTRA; /* falls through */ case EXTRA: if (state.flags & 0x0400) { copy = state.length; if (copy > have) { copy = have; } if (copy) { if (state.head) { len = state.head.extra_len - state.length; if (!state.head.extra) { // Use untyped array for more convenient processing later state.head.extra = new Array(state.head.extra_len); } utils.arraySet( state.head.extra, input, next, // extra field is limited to 65536 bytes // - no need for additional size check copy, /*len + copy > state.head.extra_max - len ? state.head.extra_max : copy,*/ len ); //zmemcpy(state.head.extra + len, next, // len + copy > state.head.extra_max ? // state.head.extra_max - len : copy); } if (state.flags & 0x0200) { state.check = crc32(state.check, input, copy, next); } have -= copy; next += copy; state.length -= copy; } if (state.length) { break inf_leave; } } state.length = 0; state.mode = NAME; /* falls through */ case NAME: if (state.flags & 0x0800) { if (have === 0) { break inf_leave; } copy = 0; do { // TODO: 2 or 1 bytes? len = input[next + copy++]; /* use constant limit because in js we should not preallocate memory */ if (state.head && len && (state.length < 65536 /*state.head.name_max*/)) { state.head.name += String.fromCharCode(len); } } while (len && copy < have); if (state.flags & 0x0200) { state.check = crc32(state.check, input, copy, next); } have -= copy; next += copy; if (len) { break inf_leave; } } else if (state.head) { state.head.name = null; } state.length = 0; state.mode = COMMENT; /* falls through */ case COMMENT: if (state.flags & 0x1000) { if (have === 0) { break inf_leave; } copy = 0; do { len = input[next + copy++]; /* use constant limit because in js we should not preallocate memory */ if (state.head && len && (state.length < 65536 /*state.head.comm_max*/)) { state.head.comment += String.fromCharCode(len); } } while (len && copy < have); if (state.flags & 0x0200) { state.check = crc32(state.check, input, copy, next); } have -= copy; next += copy; if (len) { break inf_leave; } } else if (state.head) { state.head.comment = null; } state.mode = HCRC; /* falls through */ case HCRC: if (state.flags & 0x0200) { //=== NEEDBITS(16); */ while (bits < 16) { if (have === 0) { break inf_leave; } have--; hold += input[next++] << bits; bits += 8; } //===// if (hold !== (state.check & 0xffff)) { strm.msg = 'header crc mismatch'; state.mode = BAD; break; } //=== INITBITS(); hold = 0; bits = 0; //===// } if (state.head) { state.head.hcrc = ((state.flags >> 9) & 1); state.head.done = true; } strm.adler = state.check = 0; state.mode = TYPE; break; case DICTID: //=== NEEDBITS(32); */ while (bits < 32) { if (have === 0) { break inf_leave; } have--; hold += input[next++] << bits; bits += 8; } //===// strm.adler = state.check = zswap32(hold); //=== INITBITS(); hold = 0; bits = 0; //===// state.mode = DICT; /* falls through */ case DICT: if (state.havedict === 0) { //--- RESTORE() --- strm.next_out = put; strm.avail_out = left; strm.next_in = next; strm.avail_in = have; state.hold = hold; state.bits = bits; //--- return Z_NEED_DICT; } strm.adler = state.check = 1/*adler32(0L, Z_NULL, 0)*/; state.mode = TYPE; /* falls through */ case TYPE: if (flush === Z_BLOCK || flush === Z_TREES) { break inf_leave; } /* falls through */ case TYPEDO: if (state.last) { //--- BYTEBITS() ---// hold >>>= bits & 7; bits -= bits & 7; //---// state.mode = CHECK; break; } //=== NEEDBITS(3); */ while (bits < 3) { if (have === 0) { break inf_leave; } have--; hold += input[next++] << bits; bits += 8; } //===// state.last = (hold & 0x01)/*BITS(1)*/; //--- DROPBITS(1) ---// hold >>>= 1; bits -= 1; //---// switch ((hold & 0x03)/*BITS(2)*/) { case 0: /* stored block */ //Tracev((stderr, "inflate: stored block%s\n", // state.last ? " (last)" : "")); state.mode = STORED; break; case 1: /* fixed block */ fixedtables(state); //Tracev((stderr, "inflate: fixed codes block%s\n", // state.last ? " (last)" : "")); state.mode = LEN_; /* decode codes */ if (flush === Z_TREES) { //--- DROPBITS(2) ---// hold >>>= 2; bits -= 2; //---// break inf_leave; } break; case 2: /* dynamic block */ //Tracev((stderr, "inflate: dynamic codes block%s\n", // state.last ? " (last)" : "")); state.mode = TABLE; break; case 3: strm.msg = 'invalid block type'; state.mode = BAD; } //--- DROPBITS(2) ---// hold >>>= 2; bits -= 2; //---// break; case STORED: //--- BYTEBITS() ---// /* go to byte boundary */ hold >>>= bits & 7; bits -= bits & 7; //---// //=== NEEDBITS(32); */ while (bits < 32) { if (have === 0) { break inf_leave; } have--; hold += input[next++] << bits; bits += 8; } //===// if ((hold & 0xffff) !== ((hold >>> 16) ^ 0xffff)) { strm.msg = 'invalid stored block lengths'; state.mode = BAD; break; } state.length = hold & 0xffff; //Tracev((stderr, "inflate: stored length %u\n", // state.length)); //=== INITBITS(); hold = 0; bits = 0; //===// state.mode = COPY_; if (flush === Z_TREES) { break inf_leave; } /* falls through */ case COPY_: state.mode = COPY; /* falls through */ case COPY: copy = state.length; if (copy) { if (copy > have) { copy = have; } if (copy > left) { copy = left; } if (copy === 0) { break inf_leave; } //--- zmemcpy(put, next, copy); --- utils.arraySet(output, input, next, copy, put); //---// have -= copy; next += copy; left -= copy; put += copy; state.length -= copy; break; } //Tracev((stderr, "inflate: stored end\n")); state.mode = TYPE; break; case TABLE: //=== NEEDBITS(14); */ while (bits < 14) { if (have === 0) { break inf_leave; } have--; hold += input[next++] << bits; bits += 8; } //===// state.nlen = (hold & 0x1f)/*BITS(5)*/ + 257; //--- DROPBITS(5) ---// hold >>>= 5; bits -= 5; //---// state.ndist = (hold & 0x1f)/*BITS(5)*/ + 1; //--- DROPBITS(5) ---// hold >>>= 5; bits -= 5; //---// state.ncode = (hold & 0x0f)/*BITS(4)*/ + 4; //--- DROPBITS(4) ---// hold >>>= 4; bits -= 4; //---// //#ifndef PKZIP_BUG_WORKAROUND if (state.nlen > 286 || state.ndist > 30) { strm.msg = 'too many length or distance symbols'; state.mode = BAD; break; } //#endif //Tracev((stderr, "inflate: table sizes ok\n")); state.have = 0; state.mode = LENLENS; /* falls through */ case LENLENS: while (state.have < state.ncode) { //=== NEEDBITS(3); while (bits < 3) { if (have === 0) { break inf_leave; } have--; hold += input[next++] << bits; bits += 8; } //===// state.lens[order[state.have++]] = (hold & 0x07);//BITS(3); //--- DROPBITS(3) ---// hold >>>= 3; bits -= 3; //---// } while (state.have < 19) { state.lens[order[state.have++]] = 0; } // We have separate tables & no pointers. 2 commented lines below not needed. //state.next = state.codes; //state.lencode = state.next; // Switch to use dynamic table state.lencode = state.lendyn; state.lenbits = 7; opts = { bits: state.lenbits }; ret = inflate_table(CODES, state.lens, 0, 19, state.lencode, 0, state.work, opts); state.lenbits = opts.bits; if (ret) { strm.msg = 'invalid code lengths set'; state.mode = BAD; break; } //Tracev((stderr, "inflate: code lengths ok\n")); state.have = 0; state.mode = CODELENS; /* falls through */ case CODELENS: while (state.have < state.nlen + state.ndist) { for (;;) { here = state.lencode[hold & ((1 << state.lenbits) - 1)];/*BITS(state.lenbits)*/ here_bits = here >>> 24; here_op = (here >>> 16) & 0xff; here_val = here & 0xffff; if ((here_bits) <= bits) { break; } //--- PULLBYTE() ---// if (have === 0) { break inf_leave; } have--; hold += input[next++] << bits; bits += 8; //---// } if (here_val < 16) { //--- DROPBITS(here.bits) ---// hold >>>= here_bits; bits -= here_bits; //---// state.lens[state.have++] = here_val; } else { if (here_val === 16) { //=== NEEDBITS(here.bits + 2); n = here_bits + 2; while (bits < n) { if (have === 0) { break inf_leave; } have--; hold += input[next++] << bits; bits += 8; } //===// //--- DROPBITS(here.bits) ---// hold >>>= here_bits; bits -= here_bits; //---// if (state.have === 0) { strm.msg = 'invalid bit length repeat'; state.mode = BAD; break; } len = state.lens[state.have - 1]; copy = 3 + (hold & 0x03);//BITS(2); //--- DROPBITS(2) ---// hold >>>= 2; bits -= 2; //---// } else if (here_val === 17) { //=== NEEDBITS(here.bits + 3); n = here_bits + 3; while (bits < n) { if (have === 0) { break inf_leave; } have--; hold += input[next++] << bits; bits += 8; } //===// //--- DROPBITS(here.bits) ---// hold >>>= here_bits; bits -= here_bits; //---// len = 0; copy = 3 + (hold & 0x07);//BITS(3); //--- DROPBITS(3) ---// hold >>>= 3; bits -= 3; //---// } else { //=== NEEDBITS(here.bits + 7); n = here_bits + 7; while (bits < n) { if (have === 0) { break inf_leave; } have--; hold += input[next++] << bits; bits += 8; } //===// //--- DROPBITS(here.bits) ---// hold >>>= here_bits; bits -= here_bits; //---// len = 0; copy = 11 + (hold & 0x7f);//BITS(7); //--- DROPBITS(7) ---// hold >>>= 7; bits -= 7; //---// } if (state.have + copy > state.nlen + state.ndist) { strm.msg = 'invalid bit length repeat'; state.mode = BAD; break; } while (copy--) { state.lens[state.have++] = len; } } } /* handle error breaks in while */ if (state.mode === BAD) { break; } /* check for end-of-block code (better have one) */ if (state.lens[256] === 0) { strm.msg = 'invalid code -- missing end-of-block'; state.mode = BAD; break; } /* build code tables -- note: do not change the lenbits or distbits values here (9 and 6) without reading the comments in inftrees.h concerning the ENOUGH constants, which depend on those values */ state.lenbits = 9; opts = { bits: state.lenbits }; ret = inflate_table(LENS, state.lens, 0, state.nlen, state.lencode, 0, state.work, opts); // We have separate tables & no pointers. 2 commented lines below not needed. // state.next_index = opts.table_index; state.lenbits = opts.bits; // state.lencode = state.next; if (ret) { strm.msg = 'invalid literal/lengths set'; state.mode = BAD; break; } state.distbits = 6; //state.distcode.copy(state.codes); // Switch to use dynamic table state.distcode = state.distdyn; opts = { bits: state.distbits }; ret = inflate_table(DISTS, state.lens, state.nlen, state.ndist, state.distcode, 0, state.work, opts); // We have separate tables & no pointers. 2 commented lines below not needed. // state.next_index = opts.table_index; state.distbits = opts.bits; // state.distcode = state.next; if (ret) { strm.msg = 'invalid distances set'; state.mode = BAD; break; } //Tracev((stderr, 'inflate: codes ok\n')); state.mode = LEN_; if (flush === Z_TREES) { break inf_leave; } /* falls through */ case LEN_: state.mode = LEN; /* falls through */ case LEN: if (have >= 6 && left >= 258) { //--- RESTORE() --- strm.next_out = put; strm.avail_out = left; strm.next_in = next; strm.avail_in = have; state.hold = hold; state.bits = bits; //--- inflate_fast(strm, _out); //--- LOAD() --- put = strm.next_out; output = strm.output; left = strm.avail_out; next = strm.next_in; input = strm.input; have = strm.avail_in; hold = state.hold; bits = state.bits; //--- if (state.mode === TYPE) { state.back = -1; } break; } state.back = 0; for (;;) { here = state.lencode[hold & ((1 << state.lenbits) - 1)]; /*BITS(state.lenbits)*/ here_bits = here >>> 24; here_op = (here >>> 16) & 0xff; here_val = here & 0xffff; if (here_bits <= bits) { break; } //--- PULLBYTE() ---// if (have === 0) { break inf_leave; } have--; hold += input[next++] << bits; bits += 8; //---// } if (here_op && (here_op & 0xf0) === 0) { last_bits = here_bits; last_op = here_op; last_val = here_val; for (;;) { here = state.lencode[last_val + ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)]; here_bits = here >>> 24; here_op = (here >>> 16) & 0xff; here_val = here & 0xffff; if ((last_bits + here_bits) <= bits) { break; } //--- PULLBYTE() ---// if (have === 0) { break inf_leave; } have--; hold += input[next++] << bits; bits += 8; //---// } //--- DROPBITS(last.bits) ---// hold >>>= last_bits; bits -= last_bits; //---// state.back += last_bits; } //--- DROPBITS(here.bits) ---// hold >>>= here_bits; bits -= here_bits; //---// state.back += here_bits; state.length = here_val; if (here_op === 0) { //Tracevv((stderr, here.val >= 0x20 && here.val < 0x7f ? // "inflate: literal '%c'\n" : // "inflate: literal 0x%02x\n", here.val)); state.mode = LIT; break; } if (here_op & 32) { //Tracevv((stderr, "inflate: end of block\n")); state.back = -1; state.mode = TYPE; break; } if (here_op & 64) { strm.msg = 'invalid literal/length code'; state.mode = BAD; break; } state.extra = here_op & 15; state.mode = LENEXT; /* falls through */ case LENEXT: if (state.extra) { //=== NEEDBITS(state.extra); n = state.extra; while (bits < n) { if (have === 0) { break inf_leave; } have--; hold += input[next++] << bits; bits += 8; } //===// state.length += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/; //--- DROPBITS(state.extra) ---// hold >>>= state.extra; bits -= state.extra; //---// state.back += state.extra; } //Tracevv((stderr, "inflate: length %u\n", state.length)); state.was = state.length; state.mode = DIST; /* falls through */ case DIST: for (;;) { here = state.distcode[hold & ((1 << state.distbits) - 1)];/*BITS(state.distbits)*/ here_bits = here >>> 24; here_op = (here >>> 16) & 0xff; here_val = here & 0xffff; if ((here_bits) <= bits) { break; } //--- PULLBYTE() ---// if (have === 0) { break inf_leave; } have--; hold += input[next++] << bits; bits += 8; //---// } if ((here_op & 0xf0) === 0) { last_bits = here_bits; last_op = here_op; last_val = here_val; for (;;) { here = state.distcode[last_val + ((hold & ((1 << (last_bits + last_op)) - 1))/*BITS(last.bits + last.op)*/ >> last_bits)]; here_bits = here >>> 24; here_op = (here >>> 16) & 0xff; here_val = here & 0xffff; if ((last_bits + here_bits) <= bits) { break; } //--- PULLBYTE() ---// if (have === 0) { break inf_leave; } have--; hold += input[next++] << bits; bits += 8; //---// } //--- DROPBITS(last.bits) ---// hold >>>= last_bits; bits -= last_bits; //---// state.back += last_bits; } //--- DROPBITS(here.bits) ---// hold >>>= here_bits; bits -= here_bits; //---// state.back += here_bits; if (here_op & 64) { strm.msg = 'invalid distance code'; state.mode = BAD; break; } state.offset = here_val; state.extra = (here_op) & 15; state.mode = DISTEXT; /* falls through */ case DISTEXT: if (state.extra) { //=== NEEDBITS(state.extra); n = state.extra; while (bits < n) { if (have === 0) { break inf_leave; } have--; hold += input[next++] << bits; bits += 8; } //===// state.offset += hold & ((1 << state.extra) - 1)/*BITS(state.extra)*/; //--- DROPBITS(state.extra) ---// hold >>>= state.extra; bits -= state.extra; //---// state.back += state.extra; } //#ifdef INFLATE_STRICT if (state.offset > state.dmax) { strm.msg = 'invalid distance too far back'; state.mode = BAD; break; } //#endif //Tracevv((stderr, "inflate: distance %u\n", state.offset)); state.mode = MATCH; /* falls through */ case MATCH: if (left === 0) { break inf_leave; } copy = _out - left; if (state.offset > copy) { /* copy from window */ copy = state.offset - copy; if (copy > state.whave) { if (state.sane) { strm.msg = 'invalid distance too far back'; state.mode = BAD; break; } // (!) This block is disabled in zlib defaults, // don't enable it for binary compatibility //#ifdef INFLATE_ALLOW_INVALID_DISTANCE_TOOFAR_ARRR // Trace((stderr, "inflate.c too far\n")); // copy -= state.whave; // if (copy > state.length) { copy = state.length; } // if (copy > left) { copy = left; } // left -= copy; // state.length -= copy; // do { // output[put++] = 0; // } while (--copy); // if (state.length === 0) { state.mode = LEN; } // break; //#endif } if (copy > state.wnext) { copy -= state.wnext; from = state.wsize - copy; } else { from = state.wnext - copy; } if (copy > state.length) { copy = state.length; } from_source = state.window; } else { /* copy from output */ from_source = output; from = put - state.offset; copy = state.length; } if (copy > left) { copy = left; } left -= copy; state.length -= copy; do { output[put++] = from_source[from++]; } while (--copy); if (state.length === 0) { state.mode = LEN; } break; case LIT: if (left === 0) { break inf_leave; } output[put++] = state.length; left--; state.mode = LEN; break; case CHECK: if (state.wrap) { //=== NEEDBITS(32); while (bits < 32) { if (have === 0) { break inf_leave; } have--; // Use '|' instead of '+' to make sure that result is signed hold |= input[next++] << bits; bits += 8; } //===// _out -= left; strm.total_out += _out; state.total += _out; if (_out) { strm.adler = state.check = /*UPDATE(state.check, put - _out, _out);*/ (state.flags ? crc32(state.check, output, _out, put - _out) : adler32(state.check, output, _out, put - _out)); } _out = left; // NB: crc32 stored as signed 32-bit int, zswap32 returns signed too if ((state.flags ? hold : zswap32(hold)) !== state.check) { strm.msg = 'incorrect data check'; state.mode = BAD; break; } //=== INITBITS(); hold = 0; bits = 0; //===// //Tracev((stderr, "inflate: check matches trailer\n")); } state.mode = LENGTH; /* falls through */ case LENGTH: if (state.wrap && state.flags) { //=== NEEDBITS(32); while (bits < 32) { if (have === 0) { break inf_leave; } have--; hold += input[next++] << bits; bits += 8; } //===// if (hold !== (state.total & 0xffffffff)) { strm.msg = 'incorrect length check'; state.mode = BAD; break; } //=== INITBITS(); hold = 0; bits = 0; //===// //Tracev((stderr, "inflate: length matches trailer\n")); } state.mode = DONE; /* falls through */ case DONE: ret = Z_STREAM_END; break inf_leave; case BAD: ret = Z_DATA_ERROR; break inf_leave; case MEM: return Z_MEM_ERROR; case SYNC: /* falls through */ default: return Z_STREAM_ERROR; } } // inf_leave <- here is real place for "goto inf_leave", emulated via "break inf_leave" /* Return from inflate(), updating the total counts and the check value. If there was no progress during the inflate() call, return a buffer error. Call updatewindow() to create and/or update the window state. Note: a memory error from inflate() is non-recoverable. */ //--- RESTORE() --- strm.next_out = put; strm.avail_out = left; strm.next_in = next; strm.avail_in = have; state.hold = hold; state.bits = bits; //--- if (state.wsize || (_out !== strm.avail_out && state.mode < BAD && (state.mode < CHECK || flush !== Z_FINISH))) { if (updatewindow(strm, strm.output, strm.next_out, _out - strm.avail_out)) { state.mode = MEM; return Z_MEM_ERROR; } } _in -= strm.avail_in; _out -= strm.avail_out; strm.total_in += _in; strm.total_out += _out; state.total += _out; if (state.wrap && _out) { strm.adler = state.check = /*UPDATE(state.check, strm.next_out - _out, _out);*/ (state.flags ? crc32(state.check, output, _out, strm.next_out - _out) : adler32(state.check, output, _out, strm.next_out - _out)); } strm.data_type = state.bits + (state.last ? 64 : 0) + (state.mode === TYPE ? 128 : 0) + (state.mode === LEN_ || state.mode === COPY_ ? 256 : 0); if (((_in === 0 && _out === 0) || flush === Z_FINISH) && ret === Z_OK) { ret = Z_BUF_ERROR; } return ret; } function inflateEnd(strm) { if (!strm || !strm.state /*|| strm->zfree == (free_func)0*/) { return Z_STREAM_ERROR; } var state = strm.state; if (state.window) { state.window = null; } strm.state = null; return Z_OK; } function inflateGetHeader(strm, head) { var state; /* check state */ if (!strm || !strm.state) { return Z_STREAM_ERROR; } state = strm.state; if ((state.wrap & 2) === 0) { return Z_STREAM_ERROR; } /* save header structure */ state.head = head; head.done = false; return Z_OK; } function inflateSetDictionary(strm, dictionary) { var dictLength = dictionary.length; var state; var dictid; var ret; /* check state */ if (!strm /* == Z_NULL */ || !strm.state /* == Z_NULL */) { return Z_STREAM_ERROR; } state = strm.state; if (state.wrap !== 0 && state.mode !== DICT) { return Z_STREAM_ERROR; } /* check for correct dictionary identifier */ if (state.mode === DICT) { dictid = 1; /* adler32(0, null, 0)*/ /* dictid = adler32(dictid, dictionary, dictLength); */ dictid = adler32(dictid, dictionary, dictLength, 0); if (dictid !== state.check) { return Z_DATA_ERROR; } } /* copy dictionary to window using updatewindow(), which will amend the existing dictionary if appropriate */ ret = updatewindow(strm, dictionary, dictLength, dictLength); if (ret) { state.mode = MEM; return Z_MEM_ERROR; } state.havedict = 1; // Tracev((stderr, "inflate: dictionary set\n")); return Z_OK; } exports.inflateReset = inflateReset; exports.inflateReset2 = inflateReset2; exports.inflateResetKeep = inflateResetKeep; exports.inflateInit = inflateInit; exports.inflateInit2 = inflateInit2; exports.inflate = inflate; exports.inflateEnd = inflateEnd; exports.inflateGetHeader = inflateGetHeader; exports.inflateSetDictionary = inflateSetDictionary; exports.inflateInfo = 'pako inflate (from Nodeca project)'; /* Not implemented exports.inflateCopy = inflateCopy; exports.inflateGetDictionary = inflateGetDictionary; exports.inflateMark = inflateMark; exports.inflatePrime = inflatePrime; exports.inflateSync = inflateSync; exports.inflateSyncPoint = inflateSyncPoint; exports.inflateUndermine = inflateUndermine; */ /***/ }), /***/ 1375: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; // (C) 1995-2013 Jean-loup Gailly and Mark Adler // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would be // appreciated but is not required. // 2. Altered source versions must be plainly marked as such, and must not be // misrepresented as being the original software. // 3. This notice may not be removed or altered from any source distribution. var utils = __webpack_require__(6907); var MAXBITS = 15; var ENOUGH_LENS = 852; var ENOUGH_DISTS = 592; //var ENOUGH = (ENOUGH_LENS+ENOUGH_DISTS); var CODES = 0; var LENS = 1; var DISTS = 2; var lbase = [ /* Length codes 257..285 base */ 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0 ]; var lext = [ /* Length codes 257..285 extra */ 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78 ]; var dbase = [ /* Distance codes 0..29 base */ 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, 8193, 12289, 16385, 24577, 0, 0 ]; var dext = [ /* Distance codes 0..29 extra */ 16, 16, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 27, 27, 28, 28, 29, 29, 64, 64 ]; module.exports = function inflate_table(type, lens, lens_index, codes, table, table_index, work, opts) { var bits = opts.bits; //here = opts.here; /* table entry for duplication */ var len = 0; /* a code's length in bits */ var sym = 0; /* index of code symbols */ var min = 0, max = 0; /* minimum and maximum code lengths */ var root = 0; /* number of index bits for root table */ var curr = 0; /* number of index bits for current table */ var drop = 0; /* code bits to drop for sub-table */ var left = 0; /* number of prefix codes available */ var used = 0; /* code entries in table used */ var huff = 0; /* Huffman code */ var incr; /* for incrementing code, index */ var fill; /* index for replicating entries */ var low; /* low bits for current root entry */ var mask; /* mask for low root bits */ var next; /* next available space in table */ var base = null; /* base value table to use */ var base_index = 0; // var shoextra; /* extra bits table to use */ var end; /* use base and extra for symbol > end */ var count = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* number of codes of each length */ var offs = new utils.Buf16(MAXBITS + 1); //[MAXBITS+1]; /* offsets in table for each length */ var extra = null; var extra_index = 0; var here_bits, here_op, here_val; /* Process a set of code lengths to create a canonical Huffman code. The code lengths are lens[0..codes-1]. Each length corresponds to the symbols 0..codes-1. The Huffman code is generated by first sorting the symbols by length from short to long, and retaining the symbol order for codes with equal lengths. Then the code starts with all zero bits for the first code of the shortest length, and the codes are integer increments for the same length, and zeros are appended as the length increases. For the deflate format, these bits are stored backwards from their more natural integer increment ordering, and so when the decoding tables are built in the large loop below, the integer codes are incremented backwards. This routine assumes, but does not check, that all of the entries in lens[] are in the range 0..MAXBITS. The caller must assure this. 1..MAXBITS is interpreted as that code length. zero means that that symbol does not occur in this code. The codes are sorted by computing a count of codes for each length, creating from that a table of starting indices for each length in the sorted table, and then entering the symbols in order in the sorted table. The sorted table is work[], with that space being provided by the caller. The length counts are used for other purposes as well, i.e. finding the minimum and maximum length codes, determining if there are any codes at all, checking for a valid set of lengths, and looking ahead at length counts to determine sub-table sizes when building the decoding tables. */ /* accumulate lengths for codes (assumes lens[] all in 0..MAXBITS) */ for (len = 0; len <= MAXBITS; len++) { count[len] = 0; } for (sym = 0; sym < codes; sym++) { count[lens[lens_index + sym]]++; } /* bound code lengths, force root to be within code lengths */ root = bits; for (max = MAXBITS; max >= 1; max--) { if (count[max] !== 0) { break; } } if (root > max) { root = max; } if (max === 0) { /* no symbols to code at all */ //table.op[opts.table_index] = 64; //here.op = (var char)64; /* invalid code marker */ //table.bits[opts.table_index] = 1; //here.bits = (var char)1; //table.val[opts.table_index++] = 0; //here.val = (var short)0; table[table_index++] = (1 << 24) | (64 << 16) | 0; //table.op[opts.table_index] = 64; //table.bits[opts.table_index] = 1; //table.val[opts.table_index++] = 0; table[table_index++] = (1 << 24) | (64 << 16) | 0; opts.bits = 1; return 0; /* no symbols, but wait for decoding to report error */ } for (min = 1; min < max; min++) { if (count[min] !== 0) { break; } } if (root < min) { root = min; } /* check for an over-subscribed or incomplete set of lengths */ left = 1; for (len = 1; len <= MAXBITS; len++) { left <<= 1; left -= count[len]; if (left < 0) { return -1; } /* over-subscribed */ } if (left > 0 && (type === CODES || max !== 1)) { return -1; /* incomplete set */ } /* generate offsets into symbol table for each length for sorting */ offs[1] = 0; for (len = 1; len < MAXBITS; len++) { offs[len + 1] = offs[len] + count[len]; } /* sort symbols by length, by symbol order within each length */ for (sym = 0; sym < codes; sym++) { if (lens[lens_index + sym] !== 0) { work[offs[lens[lens_index + sym]]++] = sym; } } /* Create and fill in decoding tables. In this loop, the table being filled is at next and has curr index bits. The code being used is huff with length len. That code is converted to an index by dropping drop bits off of the bottom. For codes where len is less than drop + curr, those top drop + curr - len bits are incremented through all values to fill the table with replicated entries. root is the number of index bits for the root table. When len exceeds root, sub-tables are created pointed to by the root entry with an index of the low root bits of huff. This is saved in low to check for when a new sub-table should be started. drop is zero when the root table is being filled, and drop is root when sub-tables are being filled. When a new sub-table is needed, it is necessary to look ahead in the code lengths to determine what size sub-table is needed. The length counts are used for this, and so count[] is decremented as codes are entered in the tables. used keeps track of how many table entries have been allocated from the provided *table space. It is checked for LENS and DIST tables against the constants ENOUGH_LENS and ENOUGH_DISTS to guard against changes in the initial root table size constants. See the comments in inftrees.h for more information. sym increments through all symbols, and the loop terminates when all codes of length max, i.e. all codes, have been processed. This routine permits incomplete codes, so another loop after this one fills in the rest of the decoding tables with invalid code markers. */ /* set up for code type */ // poor man optimization - use if-else instead of switch, // to avoid deopts in old v8 if (type === CODES) { base = extra = work; /* dummy value--not used */ end = 19; } else if (type === LENS) { base = lbase; base_index -= 257; extra = lext; extra_index -= 257; end = 256; } else { /* DISTS */ base = dbase; extra = dext; end = -1; } /* initialize opts for loop */ huff = 0; /* starting code */ sym = 0; /* starting code symbol */ len = min; /* starting code length */ next = table_index; /* current table to fill in */ curr = root; /* current table index bits */ drop = 0; /* current bits to drop from code for index */ low = -1; /* trigger new sub-table when len > root */ used = 1 << root; /* use root table entries */ mask = used - 1; /* mask for comparing low */ /* check available table space */ if ((type === LENS && used > ENOUGH_LENS) || (type === DISTS && used > ENOUGH_DISTS)) { return 1; } /* process all codes and make table entries */ for (;;) { /* create table entry */ here_bits = len - drop; if (work[sym] < end) { here_op = 0; here_val = work[sym]; } else if (work[sym] > end) { here_op = extra[extra_index + work[sym]]; here_val = base[base_index + work[sym]]; } else { here_op = 32 + 64; /* end of block */ here_val = 0; } /* replicate for those indices with low len bits equal to huff */ incr = 1 << (len - drop); fill = 1 << curr; min = fill; /* save offset to next table */ do { fill -= incr; table[next + (huff >> drop) + fill] = (here_bits << 24) | (here_op << 16) | here_val |0; } while (fill !== 0); /* backwards increment the len-bit code huff */ incr = 1 << (len - 1); while (huff & incr) { incr >>= 1; } if (incr !== 0) { huff &= incr - 1; huff += incr; } else { huff = 0; } /* go to next symbol, update count, len */ sym++; if (--count[len] === 0) { if (len === max) { break; } len = lens[lens_index + work[sym]]; } /* create new sub-table if needed */ if (len > root && (huff & mask) !== low) { /* if first time, transition to sub-tables */ if (drop === 0) { drop = root; } /* increment past last table */ next += min; /* here min is 1 << curr */ /* determine length of next table */ curr = len - drop; left = 1 << curr; while (curr + drop < max) { left -= count[curr + drop]; if (left <= 0) { break; } curr++; left <<= 1; } /* check for enough space */ used += 1 << curr; if ((type === LENS && used > ENOUGH_LENS) || (type === DISTS && used > ENOUGH_DISTS)) { return 1; } /* point entry in root table to sub-table */ low = huff & mask; /*table.op[low] = curr; table.bits[low] = root; table.val[low] = next - opts.table_index;*/ table[low] = (root << 24) | (curr << 16) | (next - table_index) |0; } } /* fill in remaining table entry if code is incomplete (guaranteed to have at most one remaining entry, since if the code is incomplete, the maximum code length that was allowed to get this far is one bit) */ if (huff !== 0) { //table.op[next + huff] = 64; /* invalid code marker */ //table.bits[next + huff] = len - drop; //table.val[next + huff] = 0; table[next + huff] = ((len - drop) << 24) | (64 << 16) |0; } /* set return parameters */ //opts.table_index += used; opts.bits = root; return 0; }; /***/ }), /***/ 9364: /***/ (function(module) { "use strict"; // (C) 1995-2013 Jean-loup Gailly and Mark Adler // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would be // appreciated but is not required. // 2. Altered source versions must be plainly marked as such, and must not be // misrepresented as being the original software. // 3. This notice may not be removed or altered from any source distribution. module.exports = { 2: 'need dictionary', /* Z_NEED_DICT 2 */ 1: 'stream end', /* Z_STREAM_END 1 */ 0: '', /* Z_OK 0 */ '-1': 'file error', /* Z_ERRNO (-1) */ '-2': 'stream error', /* Z_STREAM_ERROR (-2) */ '-3': 'data error', /* Z_DATA_ERROR (-3) */ '-4': 'insufficient memory', /* Z_MEM_ERROR (-4) */ '-5': 'buffer error', /* Z_BUF_ERROR (-5) */ '-6': 'incompatible version' /* Z_VERSION_ERROR (-6) */ }; /***/ }), /***/ 1339: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; // (C) 1995-2013 Jean-loup Gailly and Mark Adler // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would be // appreciated but is not required. // 2. Altered source versions must be plainly marked as such, and must not be // misrepresented as being the original software. // 3. This notice may not be removed or altered from any source distribution. /* eslint-disable space-unary-ops */ var utils = __webpack_require__(6907); /* Public constants ==========================================================*/ /* ===========================================================================*/ //var Z_FILTERED = 1; //var Z_HUFFMAN_ONLY = 2; //var Z_RLE = 3; var Z_FIXED = 4; //var Z_DEFAULT_STRATEGY = 0; /* Possible values of the data_type field (though see inflate()) */ var Z_BINARY = 0; var Z_TEXT = 1; //var Z_ASCII = 1; // = Z_TEXT var Z_UNKNOWN = 2; /*============================================================================*/ function zero(buf) { var len = buf.length; while (--len >= 0) { buf[len] = 0; } } // From zutil.h var STORED_BLOCK = 0; var STATIC_TREES = 1; var DYN_TREES = 2; /* The three kinds of block type */ var MIN_MATCH = 3; var MAX_MATCH = 258; /* The minimum and maximum match lengths */ // From deflate.h /* =========================================================================== * Internal compression state. */ var LENGTH_CODES = 29; /* number of length codes, not counting the special END_BLOCK code */ var LITERALS = 256; /* number of literal bytes 0..255 */ var L_CODES = LITERALS + 1 + LENGTH_CODES; /* number of Literal or Length codes, including the END_BLOCK code */ var D_CODES = 30; /* number of distance codes */ var BL_CODES = 19; /* number of codes used to transfer the bit lengths */ var HEAP_SIZE = 2 * L_CODES + 1; /* maximum heap size */ var MAX_BITS = 15; /* All codes must not exceed MAX_BITS bits */ var Buf_size = 16; /* size of bit buffer in bi_buf */ /* =========================================================================== * Constants */ var MAX_BL_BITS = 7; /* Bit length codes must not exceed MAX_BL_BITS bits */ var END_BLOCK = 256; /* end of block literal code */ var REP_3_6 = 16; /* repeat previous bit length 3-6 times (2 bits of repeat count) */ var REPZ_3_10 = 17; /* repeat a zero length 3-10 times (3 bits of repeat count) */ var REPZ_11_138 = 18; /* repeat a zero length 11-138 times (7 bits of repeat count) */ /* eslint-disable comma-spacing,array-bracket-spacing */ var extra_lbits = /* extra bits for each length code */ [0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]; var extra_dbits = /* extra bits for each distance code */ [0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]; var extra_blbits = /* extra bits for each bit length code */ [0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]; var bl_order = [16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]; /* eslint-enable comma-spacing,array-bracket-spacing */ /* The lengths of the bit length codes are sent in order of decreasing * probability, to avoid transmitting the lengths for unused bit length codes. */ /* =========================================================================== * Local data. These are initialized only once. */ // We pre-fill arrays with 0 to avoid uninitialized gaps var DIST_CODE_LEN = 512; /* see definition of array dist_code below */ // !!!! Use flat array instead of structure, Freq = i*2, Len = i*2+1 var static_ltree = new Array((L_CODES + 2) * 2); zero(static_ltree); /* The static literal tree. Since the bit lengths are imposed, there is no * need for the L_CODES extra codes used during heap construction. However * The codes 286 and 287 are needed to build a canonical tree (see _tr_init * below). */ var static_dtree = new Array(D_CODES * 2); zero(static_dtree); /* The static distance tree. (Actually a trivial tree since all codes use * 5 bits.) */ var _dist_code = new Array(DIST_CODE_LEN); zero(_dist_code); /* Distance codes. The first 256 values correspond to the distances * 3 .. 258, the last 256 values correspond to the top 8 bits of * the 15 bit distances. */ var _length_code = new Array(MAX_MATCH - MIN_MATCH + 1); zero(_length_code); /* length code for each normalized match length (0 == MIN_MATCH) */ var base_length = new Array(LENGTH_CODES); zero(base_length); /* First normalized length for each code (0 = MIN_MATCH) */ var base_dist = new Array(D_CODES); zero(base_dist); /* First normalized distance for each code (0 = distance of 1) */ function StaticTreeDesc(static_tree, extra_bits, extra_base, elems, max_length) { this.static_tree = static_tree; /* static tree or NULL */ this.extra_bits = extra_bits; /* extra bits for each code or NULL */ this.extra_base = extra_base; /* base index for extra_bits */ this.elems = elems; /* max number of elements in the tree */ this.max_length = max_length; /* max bit length for the codes */ // show if `static_tree` has data or dummy - needed for monomorphic objects this.has_stree = static_tree && static_tree.length; } var static_l_desc; var static_d_desc; var static_bl_desc; function TreeDesc(dyn_tree, stat_desc) { this.dyn_tree = dyn_tree; /* the dynamic tree */ this.max_code = 0; /* largest code with non zero frequency */ this.stat_desc = stat_desc; /* the corresponding static tree */ } function d_code(dist) { return dist < 256 ? _dist_code[dist] : _dist_code[256 + (dist >>> 7)]; } /* =========================================================================== * Output a short LSB first on the stream. * IN assertion: there is enough room in pendingBuf. */ function put_short(s, w) { // put_byte(s, (uch)((w) & 0xff)); // put_byte(s, (uch)((ush)(w) >> 8)); s.pending_buf[s.pending++] = (w) & 0xff; s.pending_buf[s.pending++] = (w >>> 8) & 0xff; } /* =========================================================================== * Send a value on a given number of bits. * IN assertion: length <= 16 and value fits in length bits. */ function send_bits(s, value, length) { if (s.bi_valid > (Buf_size - length)) { s.bi_buf |= (value << s.bi_valid) & 0xffff; put_short(s, s.bi_buf); s.bi_buf = value >> (Buf_size - s.bi_valid); s.bi_valid += length - Buf_size; } else { s.bi_buf |= (value << s.bi_valid) & 0xffff; s.bi_valid += length; } } function send_code(s, c, tree) { send_bits(s, tree[c * 2]/*.Code*/, tree[c * 2 + 1]/*.Len*/); } /* =========================================================================== * Reverse the first len bits of a code, using straightforward code (a faster * method would use a table) * IN assertion: 1 <= len <= 15 */ function bi_reverse(code, len) { var res = 0; do { res |= code & 1; code >>>= 1; res <<= 1; } while (--len > 0); return res >>> 1; } /* =========================================================================== * Flush the bit buffer, keeping at most 7 bits in it. */ function bi_flush(s) { if (s.bi_valid === 16) { put_short(s, s.bi_buf); s.bi_buf = 0; s.bi_valid = 0; } else if (s.bi_valid >= 8) { s.pending_buf[s.pending++] = s.bi_buf & 0xff; s.bi_buf >>= 8; s.bi_valid -= 8; } } /* =========================================================================== * Compute the optimal bit lengths for a tree and update the total bit length * for the current block. * IN assertion: the fields freq and dad are set, heap[heap_max] and * above are the tree nodes sorted by increasing frequency. * OUT assertions: the field len is set to the optimal bit length, the * array bl_count contains the frequencies for each bit length. * The length opt_len is updated; static_len is also updated if stree is * not null. */ function gen_bitlen(s, desc) // deflate_state *s; // tree_desc *desc; /* the tree descriptor */ { var tree = desc.dyn_tree; var max_code = desc.max_code; var stree = desc.stat_desc.static_tree; var has_stree = desc.stat_desc.has_stree; var extra = desc.stat_desc.extra_bits; var base = desc.stat_desc.extra_base; var max_length = desc.stat_desc.max_length; var h; /* heap index */ var n, m; /* iterate over the tree elements */ var bits; /* bit length */ var xbits; /* extra bits */ var f; /* frequency */ var overflow = 0; /* number of elements with bit length too large */ for (bits = 0; bits <= MAX_BITS; bits++) { s.bl_count[bits] = 0; } /* In a first pass, compute the optimal bit lengths (which may * overflow in the case of the bit length tree). */ tree[s.heap[s.heap_max] * 2 + 1]/*.Len*/ = 0; /* root of the heap */ for (h = s.heap_max + 1; h < HEAP_SIZE; h++) { n = s.heap[h]; bits = tree[tree[n * 2 + 1]/*.Dad*/ * 2 + 1]/*.Len*/ + 1; if (bits > max_length) { bits = max_length; overflow++; } tree[n * 2 + 1]/*.Len*/ = bits; /* We overwrite tree[n].Dad which is no longer needed */ if (n > max_code) { continue; } /* not a leaf node */ s.bl_count[bits]++; xbits = 0; if (n >= base) { xbits = extra[n - base]; } f = tree[n * 2]/*.Freq*/; s.opt_len += f * (bits + xbits); if (has_stree) { s.static_len += f * (stree[n * 2 + 1]/*.Len*/ + xbits); } } if (overflow === 0) { return; } // Trace((stderr,"\nbit length overflow\n")); /* This happens for example on obj2 and pic of the Calgary corpus */ /* Find the first bit length which could increase: */ do { bits = max_length - 1; while (s.bl_count[bits] === 0) { bits--; } s.bl_count[bits]--; /* move one leaf down the tree */ s.bl_count[bits + 1] += 2; /* move one overflow item as its brother */ s.bl_count[max_length]--; /* The brother of the overflow item also moves one step up, * but this does not affect bl_count[max_length] */ overflow -= 2; } while (overflow > 0); /* Now recompute all bit lengths, scanning in increasing frequency. * h is still equal to HEAP_SIZE. (It is simpler to reconstruct all * lengths instead of fixing only the wrong ones. This idea is taken * from 'ar' written by Haruhiko Okumura.) */ for (bits = max_length; bits !== 0; bits--) { n = s.bl_count[bits]; while (n !== 0) { m = s.heap[--h]; if (m > max_code) { continue; } if (tree[m * 2 + 1]/*.Len*/ !== bits) { // Trace((stderr,"code %d bits %d->%d\n", m, tree[m].Len, bits)); s.opt_len += (bits - tree[m * 2 + 1]/*.Len*/) * tree[m * 2]/*.Freq*/; tree[m * 2 + 1]/*.Len*/ = bits; } n--; } } } /* =========================================================================== * Generate the codes for a given tree and bit counts (which need not be * optimal). * IN assertion: the array bl_count contains the bit length statistics for * the given tree and the field len is set for all tree elements. * OUT assertion: the field code is set for all tree elements of non * zero code length. */ function gen_codes(tree, max_code, bl_count) // ct_data *tree; /* the tree to decorate */ // int max_code; /* largest code with non zero frequency */ // ushf *bl_count; /* number of codes at each bit length */ { var next_code = new Array(MAX_BITS + 1); /* next code value for each bit length */ var code = 0; /* running code value */ var bits; /* bit index */ var n; /* code index */ /* The distribution counts are first used to generate the code values * without bit reversal. */ for (bits = 1; bits <= MAX_BITS; bits++) { next_code[bits] = code = (code + bl_count[bits - 1]) << 1; } /* Check that the bit counts in bl_count are consistent. The last code * must be all ones. */ //Assert (code + bl_count[MAX_BITS]-1 == (1< length code (0..28) */ length = 0; for (code = 0; code < LENGTH_CODES - 1; code++) { base_length[code] = length; for (n = 0; n < (1 << extra_lbits[code]); n++) { _length_code[length++] = code; } } //Assert (length == 256, "tr_static_init: length != 256"); /* Note that the length 255 (match length 258) can be represented * in two different ways: code 284 + 5 bits or code 285, so we * overwrite length_code[255] to use the best encoding: */ _length_code[length - 1] = code; /* Initialize the mapping dist (0..32K) -> dist code (0..29) */ dist = 0; for (code = 0; code < 16; code++) { base_dist[code] = dist; for (n = 0; n < (1 << extra_dbits[code]); n++) { _dist_code[dist++] = code; } } //Assert (dist == 256, "tr_static_init: dist != 256"); dist >>= 7; /* from now on, all distances are divided by 128 */ for (; code < D_CODES; code++) { base_dist[code] = dist << 7; for (n = 0; n < (1 << (extra_dbits[code] - 7)); n++) { _dist_code[256 + dist++] = code; } } //Assert (dist == 256, "tr_static_init: 256+dist != 512"); /* Construct the codes of the static literal tree */ for (bits = 0; bits <= MAX_BITS; bits++) { bl_count[bits] = 0; } n = 0; while (n <= 143) { static_ltree[n * 2 + 1]/*.Len*/ = 8; n++; bl_count[8]++; } while (n <= 255) { static_ltree[n * 2 + 1]/*.Len*/ = 9; n++; bl_count[9]++; } while (n <= 279) { static_ltree[n * 2 + 1]/*.Len*/ = 7; n++; bl_count[7]++; } while (n <= 287) { static_ltree[n * 2 + 1]/*.Len*/ = 8; n++; bl_count[8]++; } /* Codes 286 and 287 do not exist, but we must include them in the * tree construction to get a canonical Huffman tree (longest code * all ones) */ gen_codes(static_ltree, L_CODES + 1, bl_count); /* The static distance tree is trivial: */ for (n = 0; n < D_CODES; n++) { static_dtree[n * 2 + 1]/*.Len*/ = 5; static_dtree[n * 2]/*.Code*/ = bi_reverse(n, 5); } // Now data ready and we can init static trees static_l_desc = new StaticTreeDesc(static_ltree, extra_lbits, LITERALS + 1, L_CODES, MAX_BITS); static_d_desc = new StaticTreeDesc(static_dtree, extra_dbits, 0, D_CODES, MAX_BITS); static_bl_desc = new StaticTreeDesc(new Array(0), extra_blbits, 0, BL_CODES, MAX_BL_BITS); //static_init_done = true; } /* =========================================================================== * Initialize a new block. */ function init_block(s) { var n; /* iterates over tree elements */ /* Initialize the trees. */ for (n = 0; n < L_CODES; n++) { s.dyn_ltree[n * 2]/*.Freq*/ = 0; } for (n = 0; n < D_CODES; n++) { s.dyn_dtree[n * 2]/*.Freq*/ = 0; } for (n = 0; n < BL_CODES; n++) { s.bl_tree[n * 2]/*.Freq*/ = 0; } s.dyn_ltree[END_BLOCK * 2]/*.Freq*/ = 1; s.opt_len = s.static_len = 0; s.last_lit = s.matches = 0; } /* =========================================================================== * Flush the bit buffer and align the output on a byte boundary */ function bi_windup(s) { if (s.bi_valid > 8) { put_short(s, s.bi_buf); } else if (s.bi_valid > 0) { //put_byte(s, (Byte)s->bi_buf); s.pending_buf[s.pending++] = s.bi_buf; } s.bi_buf = 0; s.bi_valid = 0; } /* =========================================================================== * Copy a stored block, storing first the length and its * one's complement if requested. */ function copy_block(s, buf, len, header) //DeflateState *s; //charf *buf; /* the input data */ //unsigned len; /* its length */ //int header; /* true if block header must be written */ { bi_windup(s); /* align on byte boundary */ if (header) { put_short(s, len); put_short(s, ~len); } // while (len--) { // put_byte(s, *buf++); // } utils.arraySet(s.pending_buf, s.window, buf, len, s.pending); s.pending += len; } /* =========================================================================== * Compares to subtrees, using the tree depth as tie breaker when * the subtrees have equal frequency. This minimizes the worst case length. */ function smaller(tree, n, m, depth) { var _n2 = n * 2; var _m2 = m * 2; return (tree[_n2]/*.Freq*/ < tree[_m2]/*.Freq*/ || (tree[_n2]/*.Freq*/ === tree[_m2]/*.Freq*/ && depth[n] <= depth[m])); } /* =========================================================================== * Restore the heap property by moving down the tree starting at node k, * exchanging a node with the smallest of its two sons if necessary, stopping * when the heap property is re-established (each father smaller than its * two sons). */ function pqdownheap(s, tree, k) // deflate_state *s; // ct_data *tree; /* the tree to restore */ // int k; /* node to move down */ { var v = s.heap[k]; var j = k << 1; /* left son of k */ while (j <= s.heap_len) { /* Set j to the smallest of the two sons: */ if (j < s.heap_len && smaller(tree, s.heap[j + 1], s.heap[j], s.depth)) { j++; } /* Exit if v is smaller than both sons */ if (smaller(tree, v, s.heap[j], s.depth)) { break; } /* Exchange v with the smallest son */ s.heap[k] = s.heap[j]; k = j; /* And continue down the tree, setting j to the left son of k */ j <<= 1; } s.heap[k] = v; } // inlined manually // var SMALLEST = 1; /* =========================================================================== * Send the block data compressed using the given Huffman trees */ function compress_block(s, ltree, dtree) // deflate_state *s; // const ct_data *ltree; /* literal tree */ // const ct_data *dtree; /* distance tree */ { var dist; /* distance of matched string */ var lc; /* match length or unmatched char (if dist == 0) */ var lx = 0; /* running index in l_buf */ var code; /* the code to send */ var extra; /* number of extra bits to send */ if (s.last_lit !== 0) { do { dist = (s.pending_buf[s.d_buf + lx * 2] << 8) | (s.pending_buf[s.d_buf + lx * 2 + 1]); lc = s.pending_buf[s.l_buf + lx]; lx++; if (dist === 0) { send_code(s, lc, ltree); /* send a literal byte */ //Tracecv(isgraph(lc), (stderr," '%c' ", lc)); } else { /* Here, lc is the match length - MIN_MATCH */ code = _length_code[lc]; send_code(s, code + LITERALS + 1, ltree); /* send the length code */ extra = extra_lbits[code]; if (extra !== 0) { lc -= base_length[code]; send_bits(s, lc, extra); /* send the extra length bits */ } dist--; /* dist is now the match distance - 1 */ code = d_code(dist); //Assert (code < D_CODES, "bad d_code"); send_code(s, code, dtree); /* send the distance code */ extra = extra_dbits[code]; if (extra !== 0) { dist -= base_dist[code]; send_bits(s, dist, extra); /* send the extra distance bits */ } } /* literal or match pair ? */ /* Check that the overlay between pending_buf and d_buf+l_buf is ok: */ //Assert((uInt)(s->pending) < s->lit_bufsize + 2*lx, // "pendingBuf overflow"); } while (lx < s.last_lit); } send_code(s, END_BLOCK, ltree); } /* =========================================================================== * Construct one Huffman tree and assigns the code bit strings and lengths. * Update the total bit length for the current block. * IN assertion: the field freq is set for all tree elements. * OUT assertions: the fields len and code are set to the optimal bit length * and corresponding code. The length opt_len is updated; static_len is * also updated if stree is not null. The field max_code is set. */ function build_tree(s, desc) // deflate_state *s; // tree_desc *desc; /* the tree descriptor */ { var tree = desc.dyn_tree; var stree = desc.stat_desc.static_tree; var has_stree = desc.stat_desc.has_stree; var elems = desc.stat_desc.elems; var n, m; /* iterate over heap elements */ var max_code = -1; /* largest code with non zero frequency */ var node; /* new node being created */ /* Construct the initial heap, with least frequent element in * heap[SMALLEST]. The sons of heap[n] are heap[2*n] and heap[2*n+1]. * heap[0] is not used. */ s.heap_len = 0; s.heap_max = HEAP_SIZE; for (n = 0; n < elems; n++) { if (tree[n * 2]/*.Freq*/ !== 0) { s.heap[++s.heap_len] = max_code = n; s.depth[n] = 0; } else { tree[n * 2 + 1]/*.Len*/ = 0; } } /* The pkzip format requires that at least one distance code exists, * and that at least one bit should be sent even if there is only one * possible code. So to avoid special checks later on we force at least * two codes of non zero frequency. */ while (s.heap_len < 2) { node = s.heap[++s.heap_len] = (max_code < 2 ? ++max_code : 0); tree[node * 2]/*.Freq*/ = 1; s.depth[node] = 0; s.opt_len--; if (has_stree) { s.static_len -= stree[node * 2 + 1]/*.Len*/; } /* node is 0 or 1 so it does not have extra bits */ } desc.max_code = max_code; /* The elements heap[heap_len/2+1 .. heap_len] are leaves of the tree, * establish sub-heaps of increasing lengths: */ for (n = (s.heap_len >> 1/*int /2*/); n >= 1; n--) { pqdownheap(s, tree, n); } /* Construct the Huffman tree by repeatedly combining the least two * frequent nodes. */ node = elems; /* next internal node of the tree */ do { //pqremove(s, tree, n); /* n = node of least frequency */ /*** pqremove ***/ n = s.heap[1/*SMALLEST*/]; s.heap[1/*SMALLEST*/] = s.heap[s.heap_len--]; pqdownheap(s, tree, 1/*SMALLEST*/); /***/ m = s.heap[1/*SMALLEST*/]; /* m = node of next least frequency */ s.heap[--s.heap_max] = n; /* keep the nodes sorted by frequency */ s.heap[--s.heap_max] = m; /* Create a new node father of n and m */ tree[node * 2]/*.Freq*/ = tree[n * 2]/*.Freq*/ + tree[m * 2]/*.Freq*/; s.depth[node] = (s.depth[n] >= s.depth[m] ? s.depth[n] : s.depth[m]) + 1; tree[n * 2 + 1]/*.Dad*/ = tree[m * 2 + 1]/*.Dad*/ = node; /* and insert the new node in the heap */ s.heap[1/*SMALLEST*/] = node++; pqdownheap(s, tree, 1/*SMALLEST*/); } while (s.heap_len >= 2); s.heap[--s.heap_max] = s.heap[1/*SMALLEST*/]; /* At this point, the fields freq and dad are set. We can now * generate the bit lengths. */ gen_bitlen(s, desc); /* The field len is now set, we can generate the bit codes */ gen_codes(tree, max_code, s.bl_count); } /* =========================================================================== * Scan a literal or distance tree to determine the frequencies of the codes * in the bit length tree. */ function scan_tree(s, tree, max_code) // deflate_state *s; // ct_data *tree; /* the tree to be scanned */ // int max_code; /* and its largest code of non zero frequency */ { var n; /* iterates over all tree elements */ var prevlen = -1; /* last emitted length */ var curlen; /* length of current code */ var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */ var count = 0; /* repeat count of the current code */ var max_count = 7; /* max repeat count */ var min_count = 4; /* min repeat count */ if (nextlen === 0) { max_count = 138; min_count = 3; } tree[(max_code + 1) * 2 + 1]/*.Len*/ = 0xffff; /* guard */ for (n = 0; n <= max_code; n++) { curlen = nextlen; nextlen = tree[(n + 1) * 2 + 1]/*.Len*/; if (++count < max_count && curlen === nextlen) { continue; } else if (count < min_count) { s.bl_tree[curlen * 2]/*.Freq*/ += count; } else if (curlen !== 0) { if (curlen !== prevlen) { s.bl_tree[curlen * 2]/*.Freq*/++; } s.bl_tree[REP_3_6 * 2]/*.Freq*/++; } else if (count <= 10) { s.bl_tree[REPZ_3_10 * 2]/*.Freq*/++; } else { s.bl_tree[REPZ_11_138 * 2]/*.Freq*/++; } count = 0; prevlen = curlen; if (nextlen === 0) { max_count = 138; min_count = 3; } else if (curlen === nextlen) { max_count = 6; min_count = 3; } else { max_count = 7; min_count = 4; } } } /* =========================================================================== * Send a literal or distance tree in compressed form, using the codes in * bl_tree. */ function send_tree(s, tree, max_code) // deflate_state *s; // ct_data *tree; /* the tree to be scanned */ // int max_code; /* and its largest code of non zero frequency */ { var n; /* iterates over all tree elements */ var prevlen = -1; /* last emitted length */ var curlen; /* length of current code */ var nextlen = tree[0 * 2 + 1]/*.Len*/; /* length of next code */ var count = 0; /* repeat count of the current code */ var max_count = 7; /* max repeat count */ var min_count = 4; /* min repeat count */ /* tree[max_code+1].Len = -1; */ /* guard already set */ if (nextlen === 0) { max_count = 138; min_count = 3; } for (n = 0; n <= max_code; n++) { curlen = nextlen; nextlen = tree[(n + 1) * 2 + 1]/*.Len*/; if (++count < max_count && curlen === nextlen) { continue; } else if (count < min_count) { do { send_code(s, curlen, s.bl_tree); } while (--count !== 0); } else if (curlen !== 0) { if (curlen !== prevlen) { send_code(s, curlen, s.bl_tree); count--; } //Assert(count >= 3 && count <= 6, " 3_6?"); send_code(s, REP_3_6, s.bl_tree); send_bits(s, count - 3, 2); } else if (count <= 10) { send_code(s, REPZ_3_10, s.bl_tree); send_bits(s, count - 3, 3); } else { send_code(s, REPZ_11_138, s.bl_tree); send_bits(s, count - 11, 7); } count = 0; prevlen = curlen; if (nextlen === 0) { max_count = 138; min_count = 3; } else if (curlen === nextlen) { max_count = 6; min_count = 3; } else { max_count = 7; min_count = 4; } } } /* =========================================================================== * Construct the Huffman tree for the bit lengths and return the index in * bl_order of the last bit length code to send. */ function build_bl_tree(s) { var max_blindex; /* index of last bit length code of non zero freq */ /* Determine the bit length frequencies for literal and distance trees */ scan_tree(s, s.dyn_ltree, s.l_desc.max_code); scan_tree(s, s.dyn_dtree, s.d_desc.max_code); /* Build the bit length tree: */ build_tree(s, s.bl_desc); /* opt_len now includes the length of the tree representations, except * the lengths of the bit lengths codes and the 5+5+4 bits for the counts. */ /* Determine the number of bit length codes to send. The pkzip format * requires that at least 4 bit length codes be sent. (appnote.txt says * 3 but the actual value used is 4.) */ for (max_blindex = BL_CODES - 1; max_blindex >= 3; max_blindex--) { if (s.bl_tree[bl_order[max_blindex] * 2 + 1]/*.Len*/ !== 0) { break; } } /* Update opt_len to include the bit length tree and counts */ s.opt_len += 3 * (max_blindex + 1) + 5 + 5 + 4; //Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld", // s->opt_len, s->static_len)); return max_blindex; } /* =========================================================================== * Send the header for a block using dynamic Huffman trees: the counts, the * lengths of the bit length codes, the literal tree and the distance tree. * IN assertion: lcodes >= 257, dcodes >= 1, blcodes >= 4. */ function send_all_trees(s, lcodes, dcodes, blcodes) // deflate_state *s; // int lcodes, dcodes, blcodes; /* number of codes for each tree */ { var rank; /* index in bl_order */ //Assert (lcodes >= 257 && dcodes >= 1 && blcodes >= 4, "not enough codes"); //Assert (lcodes <= L_CODES && dcodes <= D_CODES && blcodes <= BL_CODES, // "too many codes"); //Tracev((stderr, "\nbl counts: ")); send_bits(s, lcodes - 257, 5); /* not +255 as stated in appnote.txt */ send_bits(s, dcodes - 1, 5); send_bits(s, blcodes - 4, 4); /* not -3 as stated in appnote.txt */ for (rank = 0; rank < blcodes; rank++) { //Tracev((stderr, "\nbl code %2d ", bl_order[rank])); send_bits(s, s.bl_tree[bl_order[rank] * 2 + 1]/*.Len*/, 3); } //Tracev((stderr, "\nbl tree: sent %ld", s->bits_sent)); send_tree(s, s.dyn_ltree, lcodes - 1); /* literal tree */ //Tracev((stderr, "\nlit tree: sent %ld", s->bits_sent)); send_tree(s, s.dyn_dtree, dcodes - 1); /* distance tree */ //Tracev((stderr, "\ndist tree: sent %ld", s->bits_sent)); } /* =========================================================================== * Check if the data type is TEXT or BINARY, using the following algorithm: * - TEXT if the two conditions below are satisfied: * a) There are no non-portable control characters belonging to the * "black list" (0..6, 14..25, 28..31). * b) There is at least one printable character belonging to the * "white list" (9 {TAB}, 10 {LF}, 13 {CR}, 32..255). * - BINARY otherwise. * - The following partially-portable control characters form a * "gray list" that is ignored in this detection algorithm: * (7 {BEL}, 8 {BS}, 11 {VT}, 12 {FF}, 26 {SUB}, 27 {ESC}). * IN assertion: the fields Freq of dyn_ltree are set. */ function detect_data_type(s) { /* black_mask is the bit mask of black-listed bytes * set bits 0..6, 14..25, and 28..31 * 0xf3ffc07f = binary 11110011111111111100000001111111 */ var black_mask = 0xf3ffc07f; var n; /* Check for non-textual ("black-listed") bytes. */ for (n = 0; n <= 31; n++, black_mask >>>= 1) { if ((black_mask & 1) && (s.dyn_ltree[n * 2]/*.Freq*/ !== 0)) { return Z_BINARY; } } /* Check for textual ("white-listed") bytes. */ if (s.dyn_ltree[9 * 2]/*.Freq*/ !== 0 || s.dyn_ltree[10 * 2]/*.Freq*/ !== 0 || s.dyn_ltree[13 * 2]/*.Freq*/ !== 0) { return Z_TEXT; } for (n = 32; n < LITERALS; n++) { if (s.dyn_ltree[n * 2]/*.Freq*/ !== 0) { return Z_TEXT; } } /* There are no "black-listed" or "white-listed" bytes: * this stream either is empty or has tolerated ("gray-listed") bytes only. */ return Z_BINARY; } var static_init_done = false; /* =========================================================================== * Initialize the tree data structures for a new zlib stream. */ function _tr_init(s) { if (!static_init_done) { tr_static_init(); static_init_done = true; } s.l_desc = new TreeDesc(s.dyn_ltree, static_l_desc); s.d_desc = new TreeDesc(s.dyn_dtree, static_d_desc); s.bl_desc = new TreeDesc(s.bl_tree, static_bl_desc); s.bi_buf = 0; s.bi_valid = 0; /* Initialize the first block of the first file: */ init_block(s); } /* =========================================================================== * Send a stored block */ function _tr_stored_block(s, buf, stored_len, last) //DeflateState *s; //charf *buf; /* input block */ //ulg stored_len; /* length of input block */ //int last; /* one if this is the last block for a file */ { send_bits(s, (STORED_BLOCK << 1) + (last ? 1 : 0), 3); /* send block type */ copy_block(s, buf, stored_len, true); /* with header */ } /* =========================================================================== * Send one empty static block to give enough lookahead for inflate. * This takes 10 bits, of which 7 may remain in the bit buffer. */ function _tr_align(s) { send_bits(s, STATIC_TREES << 1, 3); send_code(s, END_BLOCK, static_ltree); bi_flush(s); } /* =========================================================================== * Determine the best encoding for the current block: dynamic trees, static * trees or store, and output the encoded block to the zip file. */ function _tr_flush_block(s, buf, stored_len, last) //DeflateState *s; //charf *buf; /* input block, or NULL if too old */ //ulg stored_len; /* length of input block */ //int last; /* one if this is the last block for a file */ { var opt_lenb, static_lenb; /* opt_len and static_len in bytes */ var max_blindex = 0; /* index of last bit length code of non zero freq */ /* Build the Huffman trees unless a stored block is forced */ if (s.level > 0) { /* Check if the file is binary or text */ if (s.strm.data_type === Z_UNKNOWN) { s.strm.data_type = detect_data_type(s); } /* Construct the literal and distance trees */ build_tree(s, s.l_desc); // Tracev((stderr, "\nlit data: dyn %ld, stat %ld", s->opt_len, // s->static_len)); build_tree(s, s.d_desc); // Tracev((stderr, "\ndist data: dyn %ld, stat %ld", s->opt_len, // s->static_len)); /* At this point, opt_len and static_len are the total bit lengths of * the compressed block data, excluding the tree representations. */ /* Build the bit length tree for the above two trees, and get the index * in bl_order of the last bit length code to send. */ max_blindex = build_bl_tree(s); /* Determine the best encoding. Compute the block lengths in bytes. */ opt_lenb = (s.opt_len + 3 + 7) >>> 3; static_lenb = (s.static_len + 3 + 7) >>> 3; // Tracev((stderr, "\nopt %lu(%lu) stat %lu(%lu) stored %lu lit %u ", // opt_lenb, s->opt_len, static_lenb, s->static_len, stored_len, // s->last_lit)); if (static_lenb <= opt_lenb) { opt_lenb = static_lenb; } } else { // Assert(buf != (char*)0, "lost buf"); opt_lenb = static_lenb = stored_len + 5; /* force a stored block */ } if ((stored_len + 4 <= opt_lenb) && (buf !== -1)) { /* 4: two words for the lengths */ /* The test buf != NULL is only necessary if LIT_BUFSIZE > WSIZE. * Otherwise we can't have processed more than WSIZE input bytes since * the last block flush, because compression would have been * successful. If LIT_BUFSIZE <= WSIZE, it is never too late to * transform a block into a stored block. */ _tr_stored_block(s, buf, stored_len, last); } else if (s.strategy === Z_FIXED || static_lenb === opt_lenb) { send_bits(s, (STATIC_TREES << 1) + (last ? 1 : 0), 3); compress_block(s, static_ltree, static_dtree); } else { send_bits(s, (DYN_TREES << 1) + (last ? 1 : 0), 3); send_all_trees(s, s.l_desc.max_code + 1, s.d_desc.max_code + 1, max_blindex + 1); compress_block(s, s.dyn_ltree, s.dyn_dtree); } // Assert (s->compressed_len == s->bits_sent, "bad compressed size"); /* The above check is made mod 2^32, for files larger than 512 MB * and uLong implemented on 32 bits. */ init_block(s); if (last) { bi_windup(s); } // Tracev((stderr,"\ncomprlen %lu(%lu) ", s->compressed_len>>3, // s->compressed_len-7*last)); } /* =========================================================================== * Save the match info and tally the frequency counts. Return true if * the current block must be flushed. */ function _tr_tally(s, dist, lc) // deflate_state *s; // unsigned dist; /* distance of matched string */ // unsigned lc; /* match length-MIN_MATCH or unmatched char (if dist==0) */ { //var out_length, in_length, dcode; s.pending_buf[s.d_buf + s.last_lit * 2] = (dist >>> 8) & 0xff; s.pending_buf[s.d_buf + s.last_lit * 2 + 1] = dist & 0xff; s.pending_buf[s.l_buf + s.last_lit] = lc & 0xff; s.last_lit++; if (dist === 0) { /* lc is the unmatched char */ s.dyn_ltree[lc * 2]/*.Freq*/++; } else { s.matches++; /* Here, lc is the match length - MIN_MATCH */ dist--; /* dist = match distance - 1 */ //Assert((ush)dist < (ush)MAX_DIST(s) && // (ush)lc <= (ush)(MAX_MATCH-MIN_MATCH) && // (ush)d_code(dist) < (ush)D_CODES, "_tr_tally: bad match"); s.dyn_ltree[(_length_code[lc] + LITERALS + 1) * 2]/*.Freq*/++; s.dyn_dtree[d_code(dist) * 2]/*.Freq*/++; } // (!) This block is disabled in zlib defaults, // don't enable it for binary compatibility //#ifdef TRUNCATE_BLOCK // /* Try to guess if it is profitable to stop the current block here */ // if ((s.last_lit & 0x1fff) === 0 && s.level > 2) { // /* Compute an upper bound for the compressed length */ // out_length = s.last_lit*8; // in_length = s.strstart - s.block_start; // // for (dcode = 0; dcode < D_CODES; dcode++) { // out_length += s.dyn_dtree[dcode*2]/*.Freq*/ * (5 + extra_dbits[dcode]); // } // out_length >>>= 3; // //Tracev((stderr,"\nlast_lit %u, in %ld, out ~%ld(%ld%%) ", // // s->last_lit, in_length, out_length, // // 100L - out_length*100L/in_length)); // if (s.matches < (s.last_lit>>1)/*int /2*/ && out_length < (in_length>>1)/*int /2*/) { // return true; // } // } //#endif return (s.last_lit === s.lit_bufsize - 1); /* We avoid equality with lit_bufsize because of wraparound at 64K * on 16 bit machines and because stored blocks are restricted to * 64K-1 bytes. */ } exports._tr_init = _tr_init; exports._tr_stored_block = _tr_stored_block; exports._tr_flush_block = _tr_flush_block; exports._tr_tally = _tr_tally; exports._tr_align = _tr_align; /***/ }), /***/ 4860: /***/ (function(module) { "use strict"; // (C) 1995-2013 Jean-loup Gailly and Mark Adler // (C) 2014-2017 Vitaly Puzrin and Andrey Tupitsin // // This software is provided 'as-is', without any express or implied // warranty. In no event will the authors be held liable for any damages // arising from the use of this software. // // Permission is granted to anyone to use this software for any purpose, // including commercial applications, and to alter it and redistribute it // freely, subject to the following restrictions: // // 1. The origin of this software must not be misrepresented; you must not // claim that you wrote the original software. If you use this software // in a product, an acknowledgment in the product documentation would be // appreciated but is not required. // 2. Altered source versions must be plainly marked as such, and must not be // misrepresented as being the original software. // 3. This notice may not be removed or altered from any source distribution. function ZStream() { /* next input byte */ this.input = null; // JS specific, because we have no pointers this.next_in = 0; /* number of bytes available at input */ this.avail_in = 0; /* total number of input bytes read so far */ this.total_in = 0; /* next output byte should be put there */ this.output = null; // JS specific, because we have no pointers this.next_out = 0; /* remaining free space at output */ this.avail_out = 0; /* total number of bytes output so far */ this.total_out = 0; /* last error message, NULL if no error */ this.msg = ''/*Z_NULL*/; /* not visible by applications */ this.state = null; /* best guess about the data type: binary or text */ this.data_type = 2/*Z_UNKNOWN*/; /* adler32 value of the uncompressed data */ this.adler = 0; } module.exports = ZStream; /***/ }), /***/ 1924: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var GetIntrinsic = __webpack_require__(210); var callBind = __webpack_require__(5559); var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf')); module.exports = function callBoundIntrinsic(name, allowMissing) { var intrinsic = GetIntrinsic(name, !!allowMissing); if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) { return callBind(intrinsic); } return intrinsic; }; /***/ }), /***/ 5559: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var bind = __webpack_require__(8612); var GetIntrinsic = __webpack_require__(210); var $apply = GetIntrinsic('%Function.prototype.apply%'); var $call = GetIntrinsic('%Function.prototype.call%'); var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply); var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true); var $defineProperty = GetIntrinsic('%Object.defineProperty%', true); var $max = GetIntrinsic('%Math.max%'); if ($defineProperty) { try { $defineProperty({}, 'a', { value: 1 }); } catch (e) { // IE 8 has a broken defineProperty $defineProperty = null; } } module.exports = function callBind(originalFunction) { var func = $reflectApply(bind, $call, arguments); if ($gOPD && $defineProperty) { var desc = $gOPD(func, 'length'); if (desc.configurable) { // original length, plus the receiver, minus any additional arguments (after the receiver) $defineProperty( func, 'length', { value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) } ); } } return func; }; var applyBind = function applyBind() { return $reflectApply(bind, $apply, arguments); }; if ($defineProperty) { $defineProperty(module.exports, 'apply', { value: applyBind }); } else { module.exports.apply = applyBind; } /***/ }), /***/ 6313: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { /* provided dependency */ var Buffer = __webpack_require__(8823)["Buffer"]; var clone = (function() { 'use strict'; /** * Clones (copies) an Object using deep copying. * * This function supports circular references by default, but if you are certain * there are no circular references in your object, you can save some CPU time * by calling clone(obj, false). * * Caution: if `circular` is false and `parent` contains circular references, * your program may enter an infinite loop and crash. * * @param `parent` - the object to be cloned * @param `circular` - set to true if the object to be cloned may contain * circular references. (optional - true by default) * @param `depth` - set to a number if the object is only to be cloned to * a particular depth. (optional - defaults to Infinity) * @param `prototype` - sets the prototype to be used when cloning an object. * (optional - defaults to parent prototype). */ function clone(parent, circular, depth, prototype) { var filter; if (typeof circular === 'object') { depth = circular.depth; prototype = circular.prototype; filter = circular.filter; circular = circular.circular } // maintain two arrays for circular references, where corresponding parents // and children have the same index var allParents = []; var allChildren = []; var useBuffer = typeof Buffer != 'undefined'; if (typeof circular == 'undefined') circular = true; if (typeof depth == 'undefined') depth = Infinity; // recurse this function so we don't reset allParents and allChildren function _clone(parent, depth) { // cloning null always returns null if (parent === null) return null; if (depth == 0) return parent; var child; var proto; if (typeof parent != 'object') { return parent; } if (clone.__isArray(parent)) { child = []; } else if (clone.__isRegExp(parent)) { child = new RegExp(parent.source, __getRegExpFlags(parent)); if (parent.lastIndex) child.lastIndex = parent.lastIndex; } else if (clone.__isDate(parent)) { child = new Date(parent.getTime()); } else if (useBuffer && Buffer.isBuffer(parent)) { if (Buffer.allocUnsafe) { // Node.js >= 4.5.0 child = Buffer.allocUnsafe(parent.length); } else { // Older Node.js versions child = new Buffer(parent.length); } parent.copy(child); return child; } else { if (typeof prototype == 'undefined') { proto = Object.getPrototypeOf(parent); child = Object.create(proto); } else { child = Object.create(prototype); proto = prototype; } } if (circular) { var index = allParents.indexOf(parent); if (index != -1) { return allChildren[index]; } allParents.push(parent); allChildren.push(child); } for (var i in parent) { var attrs; if (proto) { attrs = Object.getOwnPropertyDescriptor(proto, i); } if (attrs && attrs.set == null) { continue; } child[i] = _clone(parent[i], depth - 1); } return child; } return _clone(parent, depth); } /** * Simple flat clone using prototype, accepts only objects, usefull for property * override on FLAT configuration object (no nested props). * * USE WITH CAUTION! This may not behave as you wish if you do not know how this * works. */ clone.clonePrototype = function clonePrototype(parent) { if (parent === null) return null; var c = function () {}; c.prototype = parent; return new c(); }; // private utility functions function __objToStr(o) { return Object.prototype.toString.call(o); }; clone.__objToStr = __objToStr; function __isDate(o) { return typeof o === 'object' && __objToStr(o) === '[object Date]'; }; clone.__isDate = __isDate; function __isArray(o) { return typeof o === 'object' && __objToStr(o) === '[object Array]'; }; clone.__isArray = __isArray; function __isRegExp(o) { return typeof o === 'object' && __objToStr(o) === '[object RegExp]'; }; clone.__isRegExp = __isRegExp; function __getRegExpFlags(re) { var flags = ''; if (re.global) flags += 'g'; if (re.ignoreCase) flags += 'i'; if (re.multiline) flags += 'm'; return flags; }; clone.__getRegExpFlags = __getRegExpFlags; return clone; })(); if ( true && module.exports) { module.exports = clone; } /***/ }), /***/ 4667: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { __webpack_require__(2479); var path = __webpack_require__(857); module.exports = path.Object.values; /***/ }), /***/ 7633: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { __webpack_require__(9170); __webpack_require__(6992); __webpack_require__(1539); __webpack_require__(8674); __webpack_require__(7922); __webpack_require__(4668); __webpack_require__(7727); __webpack_require__(8783); var path = __webpack_require__(857); module.exports = path.Promise; /***/ }), /***/ 3867: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var parent = __webpack_require__(1150); __webpack_require__(8628); // TODO: Remove from `core-js@4` __webpack_require__(7314); __webpack_require__(7479); __webpack_require__(6290); module.exports = parent; /***/ }), /***/ 9662: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var global = __webpack_require__(7854); var isCallable = __webpack_require__(614); var tryToString = __webpack_require__(6330); var TypeError = global.TypeError; // `Assert: IsCallable(argument) is true` module.exports = function (argument) { if (isCallable(argument)) return argument; throw TypeError(tryToString(argument) + ' is not a function'); }; /***/ }), /***/ 9483: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var global = __webpack_require__(7854); var isConstructor = __webpack_require__(4411); var tryToString = __webpack_require__(6330); var TypeError = global.TypeError; // `Assert: IsConstructor(argument) is true` module.exports = function (argument) { if (isConstructor(argument)) return argument; throw TypeError(tryToString(argument) + ' is not a constructor'); }; /***/ }), /***/ 6077: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var global = __webpack_require__(7854); var isCallable = __webpack_require__(614); var String = global.String; var TypeError = global.TypeError; module.exports = function (argument) { if (typeof argument == 'object' || isCallable(argument)) return argument; throw TypeError("Can't set " + String(argument) + ' as a prototype'); }; /***/ }), /***/ 1223: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var wellKnownSymbol = __webpack_require__(5112); var create = __webpack_require__(30); var definePropertyModule = __webpack_require__(3070); var UNSCOPABLES = wellKnownSymbol('unscopables'); var ArrayPrototype = Array.prototype; // Array.prototype[@@unscopables] // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables if (ArrayPrototype[UNSCOPABLES] == undefined) { definePropertyModule.f(ArrayPrototype, UNSCOPABLES, { configurable: true, value: create(null) }); } // add a key to Array.prototype[@@unscopables] module.exports = function (key) { ArrayPrototype[UNSCOPABLES][key] = true; }; /***/ }), /***/ 1530: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var charAt = (__webpack_require__(8710).charAt); // `AdvanceStringIndex` abstract operation // https://tc39.es/ecma262/#sec-advancestringindex module.exports = function (S, index, unicode) { return index + (unicode ? charAt(S, index).length : 1); }; /***/ }), /***/ 5787: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var global = __webpack_require__(7854); var isPrototypeOf = __webpack_require__(7976); var TypeError = global.TypeError; module.exports = function (it, Prototype) { if (isPrototypeOf(Prototype, it)) return it; throw TypeError('Incorrect invocation'); }; /***/ }), /***/ 9670: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var global = __webpack_require__(7854); var isObject = __webpack_require__(111); var String = global.String; var TypeError = global.TypeError; // `Assert: Type(argument) is Object` module.exports = function (argument) { if (isObject(argument)) return argument; throw TypeError(String(argument) + ' is not an object'); }; /***/ }), /***/ 1048: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var toObject = __webpack_require__(7908); var toAbsoluteIndex = __webpack_require__(1400); var lengthOfArrayLike = __webpack_require__(6244); var min = Math.min; // `Array.prototype.copyWithin` method implementation // https://tc39.es/ecma262/#sec-array.prototype.copywithin // eslint-disable-next-line es/no-array-prototype-copywithin -- safe module.exports = [].copyWithin || function copyWithin(target /* = 0 */, start /* = 0, end = @length */) { var O = toObject(this); var len = lengthOfArrayLike(O); var to = toAbsoluteIndex(target, len); var from = toAbsoluteIndex(start, len); var end = arguments.length > 2 ? arguments[2] : undefined; var count = min((end === undefined ? len : toAbsoluteIndex(end, len)) - from, len - to); var inc = 1; if (from < to && to < from + count) { inc = -1; from += count - 1; to += count - 1; } while (count-- > 0) { if (from in O) O[to] = O[from]; else delete O[to]; to += inc; from += inc; } return O; }; /***/ }), /***/ 1285: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var toObject = __webpack_require__(7908); var toAbsoluteIndex = __webpack_require__(1400); var lengthOfArrayLike = __webpack_require__(6244); // `Array.prototype.fill` method implementation // https://tc39.es/ecma262/#sec-array.prototype.fill module.exports = function fill(value /* , start = 0, end = @length */) { var O = toObject(this); var length = lengthOfArrayLike(O); var argumentsLength = arguments.length; var index = toAbsoluteIndex(argumentsLength > 1 ? arguments[1] : undefined, length); var end = argumentsLength > 2 ? arguments[2] : undefined; var endPos = end === undefined ? length : toAbsoluteIndex(end, length); while (endPos > index) O[index++] = value; return O; }; /***/ }), /***/ 8533: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var $forEach = (__webpack_require__(2092).forEach); var arrayMethodIsStrict = __webpack_require__(9341); var STRICT_METHOD = arrayMethodIsStrict('forEach'); // `Array.prototype.forEach` method implementation // https://tc39.es/ecma262/#sec-array.prototype.foreach module.exports = !STRICT_METHOD ? function forEach(callbackfn /* , thisArg */) { return $forEach(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); // eslint-disable-next-line es/no-array-prototype-foreach -- safe } : [].forEach; /***/ }), /***/ 7745: /***/ (function(module) { module.exports = function (Constructor, list) { var index = 0; var length = list.length; var result = new Constructor(length); while (length > index) result[index] = list[index++]; return result; }; /***/ }), /***/ 8457: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var global = __webpack_require__(7854); var bind = __webpack_require__(9974); var call = __webpack_require__(6916); var toObject = __webpack_require__(7908); var callWithSafeIterationClosing = __webpack_require__(3411); var isArrayIteratorMethod = __webpack_require__(7659); var isConstructor = __webpack_require__(4411); var lengthOfArrayLike = __webpack_require__(6244); var createProperty = __webpack_require__(6135); var getIterator = __webpack_require__(8554); var getIteratorMethod = __webpack_require__(1246); var Array = global.Array; // `Array.from` method implementation // https://tc39.es/ecma262/#sec-array.from module.exports = function from(arrayLike /* , mapfn = undefined, thisArg = undefined */) { var O = toObject(arrayLike); var IS_CONSTRUCTOR = isConstructor(this); var argumentsLength = arguments.length; var mapfn = argumentsLength > 1 ? arguments[1] : undefined; var mapping = mapfn !== undefined; if (mapping) mapfn = bind(mapfn, argumentsLength > 2 ? arguments[2] : undefined); var iteratorMethod = getIteratorMethod(O); var index = 0; var length, result, step, iterator, next, value; // if the target is not iterable or it's an array with the default iterator - use a simple case if (iteratorMethod && !(this == Array && isArrayIteratorMethod(iteratorMethod))) { iterator = getIterator(O, iteratorMethod); next = iterator.next; result = IS_CONSTRUCTOR ? new this() : []; for (;!(step = call(next, iterator)).done; index++) { value = mapping ? callWithSafeIterationClosing(iterator, mapfn, [step.value, index], true) : step.value; createProperty(result, index, value); } } else { length = lengthOfArrayLike(O); result = IS_CONSTRUCTOR ? new this(length) : Array(length); for (;length > index; index++) { value = mapping ? mapfn(O[index], index) : O[index]; createProperty(result, index, value); } } result.length = index; return result; }; /***/ }), /***/ 1318: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var toIndexedObject = __webpack_require__(5656); var toAbsoluteIndex = __webpack_require__(1400); var lengthOfArrayLike = __webpack_require__(6244); // `Array.prototype.{ indexOf, includes }` methods implementation var createMethod = function (IS_INCLUDES) { return function ($this, el, fromIndex) { var O = toIndexedObject($this); var length = lengthOfArrayLike(O); var index = toAbsoluteIndex(fromIndex, length); var value; // Array#includes uses SameValueZero equality algorithm // eslint-disable-next-line no-self-compare -- NaN check if (IS_INCLUDES && el != el) while (length > index) { value = O[index++]; // eslint-disable-next-line no-self-compare -- NaN check if (value != value) return true; // Array#indexOf ignores holes, Array#includes - not } else for (;length > index; index++) { if ((IS_INCLUDES || index in O) && O[index] === el) return IS_INCLUDES || index || 0; } return !IS_INCLUDES && -1; }; }; module.exports = { // `Array.prototype.includes` method // https://tc39.es/ecma262/#sec-array.prototype.includes includes: createMethod(true), // `Array.prototype.indexOf` method // https://tc39.es/ecma262/#sec-array.prototype.indexof indexOf: createMethod(false) }; /***/ }), /***/ 2092: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var bind = __webpack_require__(9974); var uncurryThis = __webpack_require__(1702); var IndexedObject = __webpack_require__(8361); var toObject = __webpack_require__(7908); var lengthOfArrayLike = __webpack_require__(6244); var arraySpeciesCreate = __webpack_require__(5417); var push = uncurryThis([].push); // `Array.prototype.{ forEach, map, filter, some, every, find, findIndex, filterReject }` methods implementation var createMethod = function (TYPE) { var IS_MAP = TYPE == 1; var IS_FILTER = TYPE == 2; var IS_SOME = TYPE == 3; var IS_EVERY = TYPE == 4; var IS_FIND_INDEX = TYPE == 6; var IS_FILTER_REJECT = TYPE == 7; var NO_HOLES = TYPE == 5 || IS_FIND_INDEX; return function ($this, callbackfn, that, specificCreate) { var O = toObject($this); var self = IndexedObject(O); var boundFunction = bind(callbackfn, that); var length = lengthOfArrayLike(self); var index = 0; var create = specificCreate || arraySpeciesCreate; var target = IS_MAP ? create($this, length) : IS_FILTER || IS_FILTER_REJECT ? create($this, 0) : undefined; var value, result; for (;length > index; index++) if (NO_HOLES || index in self) { value = self[index]; result = boundFunction(value, index, O); if (TYPE) { if (IS_MAP) target[index] = result; // map else if (result) switch (TYPE) { case 3: return true; // some case 5: return value; // find case 6: return index; // findIndex case 2: push(target, value); // filter } else switch (TYPE) { case 4: return false; // every case 7: push(target, value); // filterReject } } } return IS_FIND_INDEX ? -1 : IS_SOME || IS_EVERY ? IS_EVERY : target; }; }; module.exports = { // `Array.prototype.forEach` method // https://tc39.es/ecma262/#sec-array.prototype.foreach forEach: createMethod(0), // `Array.prototype.map` method // https://tc39.es/ecma262/#sec-array.prototype.map map: createMethod(1), // `Array.prototype.filter` method // https://tc39.es/ecma262/#sec-array.prototype.filter filter: createMethod(2), // `Array.prototype.some` method // https://tc39.es/ecma262/#sec-array.prototype.some some: createMethod(3), // `Array.prototype.every` method // https://tc39.es/ecma262/#sec-array.prototype.every every: createMethod(4), // `Array.prototype.find` method // https://tc39.es/ecma262/#sec-array.prototype.find find: createMethod(5), // `Array.prototype.findIndex` method // https://tc39.es/ecma262/#sec-array.prototype.findIndex findIndex: createMethod(6), // `Array.prototype.filterReject` method // https://github.com/tc39/proposal-array-filtering filterReject: createMethod(7) }; /***/ }), /***/ 6583: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; /* eslint-disable es/no-array-prototype-lastindexof -- safe */ var apply = __webpack_require__(2104); var toIndexedObject = __webpack_require__(5656); var toIntegerOrInfinity = __webpack_require__(9303); var lengthOfArrayLike = __webpack_require__(6244); var arrayMethodIsStrict = __webpack_require__(9341); var min = Math.min; var $lastIndexOf = [].lastIndexOf; var NEGATIVE_ZERO = !!$lastIndexOf && 1 / [1].lastIndexOf(1, -0) < 0; var STRICT_METHOD = arrayMethodIsStrict('lastIndexOf'); var FORCED = NEGATIVE_ZERO || !STRICT_METHOD; // `Array.prototype.lastIndexOf` method implementation // https://tc39.es/ecma262/#sec-array.prototype.lastindexof module.exports = FORCED ? function lastIndexOf(searchElement /* , fromIndex = @[*-1] */) { // convert -0 to +0 if (NEGATIVE_ZERO) return apply($lastIndexOf, this, arguments) || 0; var O = toIndexedObject(this); var length = lengthOfArrayLike(O); var index = length - 1; if (arguments.length > 1) index = min(index, toIntegerOrInfinity(arguments[1])); if (index < 0) index = length + index; for (;index >= 0; index--) if (index in O && O[index] === searchElement) return index || 0; return -1; } : $lastIndexOf; /***/ }), /***/ 1194: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var fails = __webpack_require__(7293); var wellKnownSymbol = __webpack_require__(5112); var V8_VERSION = __webpack_require__(7392); var SPECIES = wellKnownSymbol('species'); module.exports = function (METHOD_NAME) { // We can't use this feature detection in V8 since it causes // deoptimization and serious performance degradation // https://github.com/zloirock/core-js/issues/677 return V8_VERSION >= 51 || !fails(function () { var array = []; var constructor = array.constructor = {}; constructor[SPECIES] = function () { return { foo: 1 }; }; return array[METHOD_NAME](Boolean).foo !== 1; }); }; /***/ }), /***/ 9341: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var fails = __webpack_require__(7293); module.exports = function (METHOD_NAME, argument) { var method = [][METHOD_NAME]; return !!method && fails(function () { // eslint-disable-next-line no-useless-call,no-throw-literal -- required for testing method.call(null, argument || function () { throw 1; }, 1); }); }; /***/ }), /***/ 3671: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var global = __webpack_require__(7854); var aCallable = __webpack_require__(9662); var toObject = __webpack_require__(7908); var IndexedObject = __webpack_require__(8361); var lengthOfArrayLike = __webpack_require__(6244); var TypeError = global.TypeError; // `Array.prototype.{ reduce, reduceRight }` methods implementation var createMethod = function (IS_RIGHT) { return function (that, callbackfn, argumentsLength, memo) { aCallable(callbackfn); var O = toObject(that); var self = IndexedObject(O); var length = lengthOfArrayLike(O); var index = IS_RIGHT ? length - 1 : 0; var i = IS_RIGHT ? -1 : 1; if (argumentsLength < 2) while (true) { if (index in self) { memo = self[index]; index += i; break; } index += i; if (IS_RIGHT ? index < 0 : length <= index) { throw TypeError('Reduce of empty array with no initial value'); } } for (;IS_RIGHT ? index >= 0 : length > index; index += i) if (index in self) { memo = callbackfn(memo, self[index], index, O); } return memo; }; }; module.exports = { // `Array.prototype.reduce` method // https://tc39.es/ecma262/#sec-array.prototype.reduce left: createMethod(false), // `Array.prototype.reduceRight` method // https://tc39.es/ecma262/#sec-array.prototype.reduceright right: createMethod(true) }; /***/ }), /***/ 206: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var uncurryThis = __webpack_require__(1702); module.exports = uncurryThis([].slice); /***/ }), /***/ 4362: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var arraySlice = __webpack_require__(206); var floor = Math.floor; var mergeSort = function (array, comparefn) { var length = array.length; var middle = floor(length / 2); return length < 8 ? insertionSort(array, comparefn) : merge( array, mergeSort(arraySlice(array, 0, middle), comparefn), mergeSort(arraySlice(array, middle), comparefn), comparefn ); }; var insertionSort = function (array, comparefn) { var length = array.length; var i = 1; var element, j; while (i < length) { j = i; element = array[i]; while (j && comparefn(array[j - 1], element) > 0) { array[j] = array[--j]; } if (j !== i++) array[j] = element; } return array; }; var merge = function (array, left, right, comparefn) { var llength = left.length; var rlength = right.length; var lindex = 0; var rindex = 0; while (lindex < llength || rindex < rlength) { array[lindex + rindex] = (lindex < llength && rindex < rlength) ? comparefn(left[lindex], right[rindex]) <= 0 ? left[lindex++] : right[rindex++] : lindex < llength ? left[lindex++] : right[rindex++]; } return array; }; module.exports = mergeSort; /***/ }), /***/ 7475: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var global = __webpack_require__(7854); var isArray = __webpack_require__(3157); var isConstructor = __webpack_require__(4411); var isObject = __webpack_require__(111); var wellKnownSymbol = __webpack_require__(5112); var SPECIES = wellKnownSymbol('species'); var Array = global.Array; // a part of `ArraySpeciesCreate` abstract operation // https://tc39.es/ecma262/#sec-arrayspeciescreate module.exports = function (originalArray) { var C; if (isArray(originalArray)) { C = originalArray.constructor; // cross-realm fallback if (isConstructor(C) && (C === Array || isArray(C.prototype))) C = undefined; else if (isObject(C)) { C = C[SPECIES]; if (C === null) C = undefined; } } return C === undefined ? Array : C; }; /***/ }), /***/ 5417: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var arraySpeciesConstructor = __webpack_require__(7475); // `ArraySpeciesCreate` abstract operation // https://tc39.es/ecma262/#sec-arrayspeciescreate module.exports = function (originalArray, length) { return new (arraySpeciesConstructor(originalArray))(length === 0 ? 0 : length); }; /***/ }), /***/ 3411: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var anObject = __webpack_require__(9670); var iteratorClose = __webpack_require__(9212); // call something on iterator step with safe closing on error module.exports = function (iterator, fn, value, ENTRIES) { try { return ENTRIES ? fn(anObject(value)[0], value[1]) : fn(value); } catch (error) { iteratorClose(iterator, 'throw', error); } }; /***/ }), /***/ 7072: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var wellKnownSymbol = __webpack_require__(5112); var ITERATOR = wellKnownSymbol('iterator'); var SAFE_CLOSING = false; try { var called = 0; var iteratorWithReturn = { next: function () { return { done: !!called++ }; }, 'return': function () { SAFE_CLOSING = true; } }; iteratorWithReturn[ITERATOR] = function () { return this; }; // eslint-disable-next-line es/no-array-from, no-throw-literal -- required for testing Array.from(iteratorWithReturn, function () { throw 2; }); } catch (error) { /* empty */ } module.exports = function (exec, SKIP_CLOSING) { if (!SKIP_CLOSING && !SAFE_CLOSING) return false; var ITERATION_SUPPORT = false; try { var object = {}; object[ITERATOR] = function () { return { next: function () { return { done: ITERATION_SUPPORT = true }; } }; }; exec(object); } catch (error) { /* empty */ } return ITERATION_SUPPORT; }; /***/ }), /***/ 4326: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var uncurryThis = __webpack_require__(1702); var toString = uncurryThis({}.toString); var stringSlice = uncurryThis(''.slice); module.exports = function (it) { return stringSlice(toString(it), 8, -1); }; /***/ }), /***/ 648: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var global = __webpack_require__(7854); var TO_STRING_TAG_SUPPORT = __webpack_require__(1694); var isCallable = __webpack_require__(614); var classofRaw = __webpack_require__(4326); var wellKnownSymbol = __webpack_require__(5112); var TO_STRING_TAG = wellKnownSymbol('toStringTag'); var Object = global.Object; // ES3 wrong here var CORRECT_ARGUMENTS = classofRaw(function () { return arguments; }()) == 'Arguments'; // fallback for IE11 Script Access Denied error var tryGet = function (it, key) { try { return it[key]; } catch (error) { /* empty */ } }; // getting tag from ES6+ `Object.prototype.toString` module.exports = TO_STRING_TAG_SUPPORT ? classofRaw : function (it) { var O, tag, result; return it === undefined ? 'Undefined' : it === null ? 'Null' // @@toStringTag case : typeof (tag = tryGet(O = Object(it), TO_STRING_TAG)) == 'string' ? tag // builtinTag case : CORRECT_ARGUMENTS ? classofRaw(O) // ES3 arguments fallback : (result = classofRaw(O)) == 'Object' && isCallable(O.callee) ? 'Arguments' : result; }; /***/ }), /***/ 7741: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var uncurryThis = __webpack_require__(1702); var arraySlice = __webpack_require__(206); var replace = uncurryThis(''.replace); var split = uncurryThis(''.split); var join = uncurryThis([].join); var TEST = (function (arg) { return String(Error(arg).stack); })('zxcasd'); var V8_OR_CHAKRA_STACK_ENTRY = /\n\s*at [^:]*:[^\n]*/; var IS_V8_OR_CHAKRA_STACK = V8_OR_CHAKRA_STACK_ENTRY.test(TEST); var IS_FIREFOX_OR_SAFARI_STACK = /@[^\n]*\n/.test(TEST) && !/zxcasd/.test(TEST); module.exports = function (stack, dropEntries) { if (typeof stack != 'string') return stack; if (IS_V8_OR_CHAKRA_STACK) { while (dropEntries--) stack = replace(stack, V8_OR_CHAKRA_STACK_ENTRY, ''); } else if (IS_FIREFOX_OR_SAFARI_STACK) { return join(arraySlice(split(stack, '\n'), dropEntries), '\n'); } return stack; }; /***/ }), /***/ 5631: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var defineProperty = (__webpack_require__(3070).f); var create = __webpack_require__(30); var redefineAll = __webpack_require__(2248); var bind = __webpack_require__(9974); var anInstance = __webpack_require__(5787); var iterate = __webpack_require__(408); var defineIterator = __webpack_require__(654); var setSpecies = __webpack_require__(6340); var DESCRIPTORS = __webpack_require__(9781); var fastKey = (__webpack_require__(2423).fastKey); var InternalStateModule = __webpack_require__(9909); var setInternalState = InternalStateModule.set; var internalStateGetterFor = InternalStateModule.getterFor; module.exports = { getConstructor: function (wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER) { var Constructor = wrapper(function (that, iterable) { anInstance(that, Prototype); setInternalState(that, { type: CONSTRUCTOR_NAME, index: create(null), first: undefined, last: undefined, size: 0 }); if (!DESCRIPTORS) that.size = 0; if (iterable != undefined) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP }); }); var Prototype = Constructor.prototype; var getInternalState = internalStateGetterFor(CONSTRUCTOR_NAME); var define = function (that, key, value) { var state = getInternalState(that); var entry = getEntry(that, key); var previous, index; // change existing entry if (entry) { entry.value = value; // create new entry } else { state.last = entry = { index: index = fastKey(key, true), key: key, value: value, previous: previous = state.last, next: undefined, removed: false }; if (!state.first) state.first = entry; if (previous) previous.next = entry; if (DESCRIPTORS) state.size++; else that.size++; // add to index if (index !== 'F') state.index[index] = entry; } return that; }; var getEntry = function (that, key) { var state = getInternalState(that); // fast case var index = fastKey(key); var entry; if (index !== 'F') return state.index[index]; // frozen object case for (entry = state.first; entry; entry = entry.next) { if (entry.key == key) return entry; } }; redefineAll(Prototype, { // `{ Map, Set }.prototype.clear()` methods // https://tc39.es/ecma262/#sec-map.prototype.clear // https://tc39.es/ecma262/#sec-set.prototype.clear clear: function clear() { var that = this; var state = getInternalState(that); var data = state.index; var entry = state.first; while (entry) { entry.removed = true; if (entry.previous) entry.previous = entry.previous.next = undefined; delete data[entry.index]; entry = entry.next; } state.first = state.last = undefined; if (DESCRIPTORS) state.size = 0; else that.size = 0; }, // `{ Map, Set }.prototype.delete(key)` methods // https://tc39.es/ecma262/#sec-map.prototype.delete // https://tc39.es/ecma262/#sec-set.prototype.delete 'delete': function (key) { var that = this; var state = getInternalState(that); var entry = getEntry(that, key); if (entry) { var next = entry.next; var prev = entry.previous; delete state.index[entry.index]; entry.removed = true; if (prev) prev.next = next; if (next) next.previous = prev; if (state.first == entry) state.first = next; if (state.last == entry) state.last = prev; if (DESCRIPTORS) state.size--; else that.size--; } return !!entry; }, // `{ Map, Set }.prototype.forEach(callbackfn, thisArg = undefined)` methods // https://tc39.es/ecma262/#sec-map.prototype.foreach // https://tc39.es/ecma262/#sec-set.prototype.foreach forEach: function forEach(callbackfn /* , that = undefined */) { var state = getInternalState(this); var boundFunction = bind(callbackfn, arguments.length > 1 ? arguments[1] : undefined); var entry; while (entry = entry ? entry.next : state.first) { boundFunction(entry.value, entry.key, this); // revert to the last existing entry while (entry && entry.removed) entry = entry.previous; } }, // `{ Map, Set}.prototype.has(key)` methods // https://tc39.es/ecma262/#sec-map.prototype.has // https://tc39.es/ecma262/#sec-set.prototype.has has: function has(key) { return !!getEntry(this, key); } }); redefineAll(Prototype, IS_MAP ? { // `Map.prototype.get(key)` method // https://tc39.es/ecma262/#sec-map.prototype.get get: function get(key) { var entry = getEntry(this, key); return entry && entry.value; }, // `Map.prototype.set(key, value)` method // https://tc39.es/ecma262/#sec-map.prototype.set set: function set(key, value) { return define(this, key === 0 ? 0 : key, value); } } : { // `Set.prototype.add(value)` method // https://tc39.es/ecma262/#sec-set.prototype.add add: function add(value) { return define(this, value = value === 0 ? 0 : value, value); } }); if (DESCRIPTORS) defineProperty(Prototype, 'size', { get: function () { return getInternalState(this).size; } }); return Constructor; }, setStrong: function (Constructor, CONSTRUCTOR_NAME, IS_MAP) { var ITERATOR_NAME = CONSTRUCTOR_NAME + ' Iterator'; var getInternalCollectionState = internalStateGetterFor(CONSTRUCTOR_NAME); var getInternalIteratorState = internalStateGetterFor(ITERATOR_NAME); // `{ Map, Set }.prototype.{ keys, values, entries, @@iterator }()` methods // https://tc39.es/ecma262/#sec-map.prototype.entries // https://tc39.es/ecma262/#sec-map.prototype.keys // https://tc39.es/ecma262/#sec-map.prototype.values // https://tc39.es/ecma262/#sec-map.prototype-@@iterator // https://tc39.es/ecma262/#sec-set.prototype.entries // https://tc39.es/ecma262/#sec-set.prototype.keys // https://tc39.es/ecma262/#sec-set.prototype.values // https://tc39.es/ecma262/#sec-set.prototype-@@iterator defineIterator(Constructor, CONSTRUCTOR_NAME, function (iterated, kind) { setInternalState(this, { type: ITERATOR_NAME, target: iterated, state: getInternalCollectionState(iterated), kind: kind, last: undefined }); }, function () { var state = getInternalIteratorState(this); var kind = state.kind; var entry = state.last; // revert to the last existing entry while (entry && entry.removed) entry = entry.previous; // get next entry if (!state.target || !(state.last = entry = entry ? entry.next : state.state.first)) { // or finish the iteration state.target = undefined; return { value: undefined, done: true }; } // return step by kind if (kind == 'keys') return { value: entry.key, done: false }; if (kind == 'values') return { value: entry.value, done: false }; return { value: [entry.key, entry.value], done: false }; }, IS_MAP ? 'entries' : 'values', !IS_MAP, true); // `{ Map, Set }.prototype[@@species]` accessors // https://tc39.es/ecma262/#sec-get-map-@@species // https://tc39.es/ecma262/#sec-get-set-@@species setSpecies(CONSTRUCTOR_NAME); } }; /***/ }), /***/ 7710: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var $ = __webpack_require__(2109); var global = __webpack_require__(7854); var uncurryThis = __webpack_require__(1702); var isForced = __webpack_require__(4705); var redefine = __webpack_require__(1320); var InternalMetadataModule = __webpack_require__(2423); var iterate = __webpack_require__(408); var anInstance = __webpack_require__(5787); var isCallable = __webpack_require__(614); var isObject = __webpack_require__(111); var fails = __webpack_require__(7293); var checkCorrectnessOfIteration = __webpack_require__(7072); var setToStringTag = __webpack_require__(8003); var inheritIfRequired = __webpack_require__(9587); module.exports = function (CONSTRUCTOR_NAME, wrapper, common) { var IS_MAP = CONSTRUCTOR_NAME.indexOf('Map') !== -1; var IS_WEAK = CONSTRUCTOR_NAME.indexOf('Weak') !== -1; var ADDER = IS_MAP ? 'set' : 'add'; var NativeConstructor = global[CONSTRUCTOR_NAME]; var NativePrototype = NativeConstructor && NativeConstructor.prototype; var Constructor = NativeConstructor; var exported = {}; var fixMethod = function (KEY) { var uncurriedNativeMethod = uncurryThis(NativePrototype[KEY]); redefine(NativePrototype, KEY, KEY == 'add' ? function add(value) { uncurriedNativeMethod(this, value === 0 ? 0 : value); return this; } : KEY == 'delete' ? function (key) { return IS_WEAK && !isObject(key) ? false : uncurriedNativeMethod(this, key === 0 ? 0 : key); } : KEY == 'get' ? function get(key) { return IS_WEAK && !isObject(key) ? undefined : uncurriedNativeMethod(this, key === 0 ? 0 : key); } : KEY == 'has' ? function has(key) { return IS_WEAK && !isObject(key) ? false : uncurriedNativeMethod(this, key === 0 ? 0 : key); } : function set(key, value) { uncurriedNativeMethod(this, key === 0 ? 0 : key, value); return this; } ); }; var REPLACE = isForced( CONSTRUCTOR_NAME, !isCallable(NativeConstructor) || !(IS_WEAK || NativePrototype.forEach && !fails(function () { new NativeConstructor().entries().next(); })) ); if (REPLACE) { // create collection constructor Constructor = common.getConstructor(wrapper, CONSTRUCTOR_NAME, IS_MAP, ADDER); InternalMetadataModule.enable(); } else if (isForced(CONSTRUCTOR_NAME, true)) { var instance = new Constructor(); // early implementations not supports chaining var HASNT_CHAINING = instance[ADDER](IS_WEAK ? {} : -0, 1) != instance; // V8 ~ Chromium 40- weak-collections throws on primitives, but should return false var THROWS_ON_PRIMITIVES = fails(function () { instance.has(1); }); // most early implementations doesn't supports iterables, most modern - not close it correctly // eslint-disable-next-line no-new -- required for testing var ACCEPT_ITERABLES = checkCorrectnessOfIteration(function (iterable) { new NativeConstructor(iterable); }); // for early implementations -0 and +0 not the same var BUGGY_ZERO = !IS_WEAK && fails(function () { // V8 ~ Chromium 42- fails only with 5+ elements var $instance = new NativeConstructor(); var index = 5; while (index--) $instance[ADDER](index, index); return !$instance.has(-0); }); if (!ACCEPT_ITERABLES) { Constructor = wrapper(function (dummy, iterable) { anInstance(dummy, NativePrototype); var that = inheritIfRequired(new NativeConstructor(), dummy, Constructor); if (iterable != undefined) iterate(iterable, that[ADDER], { that: that, AS_ENTRIES: IS_MAP }); return that; }); Constructor.prototype = NativePrototype; NativePrototype.constructor = Constructor; } if (THROWS_ON_PRIMITIVES || BUGGY_ZERO) { fixMethod('delete'); fixMethod('has'); IS_MAP && fixMethod('get'); } if (BUGGY_ZERO || HASNT_CHAINING) fixMethod(ADDER); // weak collections should not contains .clear method if (IS_WEAK && NativePrototype.clear) delete NativePrototype.clear; } exported[CONSTRUCTOR_NAME] = Constructor; $({ global: true, forced: Constructor != NativeConstructor }, exported); setToStringTag(Constructor, CONSTRUCTOR_NAME); if (!IS_WEAK) common.setStrong(Constructor, CONSTRUCTOR_NAME, IS_MAP); return Constructor; }; /***/ }), /***/ 9920: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var hasOwn = __webpack_require__(2597); var ownKeys = __webpack_require__(3887); var getOwnPropertyDescriptorModule = __webpack_require__(1236); var definePropertyModule = __webpack_require__(3070); module.exports = function (target, source) { var keys = ownKeys(source); var defineProperty = definePropertyModule.f; var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f; for (var i = 0; i < keys.length; i++) { var key = keys[i]; if (!hasOwn(target, key)) defineProperty(target, key, getOwnPropertyDescriptor(source, key)); } }; /***/ }), /***/ 4964: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var wellKnownSymbol = __webpack_require__(5112); var MATCH = wellKnownSymbol('match'); module.exports = function (METHOD_NAME) { var regexp = /./; try { '/./'[METHOD_NAME](regexp); } catch (error1) { try { regexp[MATCH] = false; return '/./'[METHOD_NAME](regexp); } catch (error2) { /* empty */ } } return false; }; /***/ }), /***/ 8544: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var fails = __webpack_require__(7293); module.exports = !fails(function () { function F() { /* empty */ } F.prototype.constructor = null; // eslint-disable-next-line es/no-object-getprototypeof -- required for testing return Object.getPrototypeOf(new F()) !== F.prototype; }); /***/ }), /***/ 4230: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var uncurryThis = __webpack_require__(1702); var requireObjectCoercible = __webpack_require__(4488); var toString = __webpack_require__(1340); var quot = /"/g; var replace = uncurryThis(''.replace); // `CreateHTML` abstract operation // https://tc39.es/ecma262/#sec-createhtml module.exports = function (string, tag, attribute, value) { var S = toString(requireObjectCoercible(string)); var p1 = '<' + tag; if (attribute !== '') p1 += ' ' + attribute + '="' + replace(toString(value), quot, '"') + '"'; return p1 + '>' + S + ''; }; /***/ }), /***/ 4994: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var IteratorPrototype = (__webpack_require__(3383).IteratorPrototype); var create = __webpack_require__(30); var createPropertyDescriptor = __webpack_require__(9114); var setToStringTag = __webpack_require__(8003); var Iterators = __webpack_require__(7497); var returnThis = function () { return this; }; module.exports = function (IteratorConstructor, NAME, next) { var TO_STRING_TAG = NAME + ' Iterator'; IteratorConstructor.prototype = create(IteratorPrototype, { next: createPropertyDescriptor(1, next) }); setToStringTag(IteratorConstructor, TO_STRING_TAG, false, true); Iterators[TO_STRING_TAG] = returnThis; return IteratorConstructor; }; /***/ }), /***/ 8880: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var DESCRIPTORS = __webpack_require__(9781); var definePropertyModule = __webpack_require__(3070); var createPropertyDescriptor = __webpack_require__(9114); module.exports = DESCRIPTORS ? function (object, key, value) { return definePropertyModule.f(object, key, createPropertyDescriptor(1, value)); } : function (object, key, value) { object[key] = value; return object; }; /***/ }), /***/ 9114: /***/ (function(module) { module.exports = function (bitmap, value) { return { enumerable: !(bitmap & 1), configurable: !(bitmap & 2), writable: !(bitmap & 4), value: value }; }; /***/ }), /***/ 6135: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var toPropertyKey = __webpack_require__(4948); var definePropertyModule = __webpack_require__(3070); var createPropertyDescriptor = __webpack_require__(9114); module.exports = function (object, key, value) { var propertyKey = toPropertyKey(key); if (propertyKey in object) definePropertyModule.f(object, propertyKey, createPropertyDescriptor(0, value)); else object[propertyKey] = value; }; /***/ }), /***/ 8709: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var global = __webpack_require__(7854); var anObject = __webpack_require__(9670); var ordinaryToPrimitive = __webpack_require__(2140); var TypeError = global.TypeError; // `Date.prototype[@@toPrimitive](hint)` method implementation // https://tc39.es/ecma262/#sec-date.prototype-@@toprimitive module.exports = function (hint) { anObject(this); if (hint === 'string' || hint === 'default') hint = 'string'; else if (hint !== 'number') throw TypeError('Incorrect hint'); return ordinaryToPrimitive(this, hint); }; /***/ }), /***/ 654: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var $ = __webpack_require__(2109); var call = __webpack_require__(6916); var IS_PURE = __webpack_require__(1913); var FunctionName = __webpack_require__(6530); var isCallable = __webpack_require__(614); var createIteratorConstructor = __webpack_require__(4994); var getPrototypeOf = __webpack_require__(9518); var setPrototypeOf = __webpack_require__(7674); var setToStringTag = __webpack_require__(8003); var createNonEnumerableProperty = __webpack_require__(8880); var redefine = __webpack_require__(1320); var wellKnownSymbol = __webpack_require__(5112); var Iterators = __webpack_require__(7497); var IteratorsCore = __webpack_require__(3383); var PROPER_FUNCTION_NAME = FunctionName.PROPER; var CONFIGURABLE_FUNCTION_NAME = FunctionName.CONFIGURABLE; var IteratorPrototype = IteratorsCore.IteratorPrototype; var BUGGY_SAFARI_ITERATORS = IteratorsCore.BUGGY_SAFARI_ITERATORS; var ITERATOR = wellKnownSymbol('iterator'); var KEYS = 'keys'; var VALUES = 'values'; var ENTRIES = 'entries'; var returnThis = function () { return this; }; module.exports = function (Iterable, NAME, IteratorConstructor, next, DEFAULT, IS_SET, FORCED) { createIteratorConstructor(IteratorConstructor, NAME, next); var getIterationMethod = function (KIND) { if (KIND === DEFAULT && defaultIterator) return defaultIterator; if (!BUGGY_SAFARI_ITERATORS && KIND in IterablePrototype) return IterablePrototype[KIND]; switch (KIND) { case KEYS: return function keys() { return new IteratorConstructor(this, KIND); }; case VALUES: return function values() { return new IteratorConstructor(this, KIND); }; case ENTRIES: return function entries() { return new IteratorConstructor(this, KIND); }; } return function () { return new IteratorConstructor(this); }; }; var TO_STRING_TAG = NAME + ' Iterator'; var INCORRECT_VALUES_NAME = false; var IterablePrototype = Iterable.prototype; var nativeIterator = IterablePrototype[ITERATOR] || IterablePrototype['@@iterator'] || DEFAULT && IterablePrototype[DEFAULT]; var defaultIterator = !BUGGY_SAFARI_ITERATORS && nativeIterator || getIterationMethod(DEFAULT); var anyNativeIterator = NAME == 'Array' ? IterablePrototype.entries || nativeIterator : nativeIterator; var CurrentIteratorPrototype, methods, KEY; // fix native if (anyNativeIterator) { CurrentIteratorPrototype = getPrototypeOf(anyNativeIterator.call(new Iterable())); if (CurrentIteratorPrototype !== Object.prototype && CurrentIteratorPrototype.next) { if (!IS_PURE && getPrototypeOf(CurrentIteratorPrototype) !== IteratorPrototype) { if (setPrototypeOf) { setPrototypeOf(CurrentIteratorPrototype, IteratorPrototype); } else if (!isCallable(CurrentIteratorPrototype[ITERATOR])) { redefine(CurrentIteratorPrototype, ITERATOR, returnThis); } } // Set @@toStringTag to native iterators setToStringTag(CurrentIteratorPrototype, TO_STRING_TAG, true, true); if (IS_PURE) Iterators[TO_STRING_TAG] = returnThis; } } // fix Array.prototype.{ values, @@iterator }.name in V8 / FF if (PROPER_FUNCTION_NAME && DEFAULT == VALUES && nativeIterator && nativeIterator.name !== VALUES) { if (!IS_PURE && CONFIGURABLE_FUNCTION_NAME) { createNonEnumerableProperty(IterablePrototype, 'name', VALUES); } else { INCORRECT_VALUES_NAME = true; defaultIterator = function values() { return call(nativeIterator, this); }; } } // export additional methods if (DEFAULT) { methods = { values: getIterationMethod(VALUES), keys: IS_SET ? defaultIterator : getIterationMethod(KEYS), entries: getIterationMethod(ENTRIES) }; if (FORCED) for (KEY in methods) { if (BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME || !(KEY in IterablePrototype)) { redefine(IterablePrototype, KEY, methods[KEY]); } } else $({ target: NAME, proto: true, forced: BUGGY_SAFARI_ITERATORS || INCORRECT_VALUES_NAME }, methods); } // define iterator if ((!IS_PURE || FORCED) && IterablePrototype[ITERATOR] !== defaultIterator) { redefine(IterablePrototype, ITERATOR, defaultIterator, { name: DEFAULT }); } Iterators[NAME] = defaultIterator; return methods; }; /***/ }), /***/ 7235: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var path = __webpack_require__(857); var hasOwn = __webpack_require__(2597); var wrappedWellKnownSymbolModule = __webpack_require__(6061); var defineProperty = (__webpack_require__(3070).f); module.exports = function (NAME) { var Symbol = path.Symbol || (path.Symbol = {}); if (!hasOwn(Symbol, NAME)) defineProperty(Symbol, NAME, { value: wrappedWellKnownSymbolModule.f(NAME) }); }; /***/ }), /***/ 9781: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var fails = __webpack_require__(7293); // Detect IE8's incomplete defineProperty implementation module.exports = !fails(function () { // eslint-disable-next-line es/no-object-defineproperty -- required for testing return Object.defineProperty({}, 1, { get: function () { return 7; } })[1] != 7; }); /***/ }), /***/ 317: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var global = __webpack_require__(7854); var isObject = __webpack_require__(111); var document = global.document; // typeof document.createElement is 'object' in old IE var EXISTS = isObject(document) && isObject(document.createElement); module.exports = function (it) { return EXISTS ? document.createElement(it) : {}; }; /***/ }), /***/ 8324: /***/ (function(module) { // iterable DOM collections // flag - `iterable` interface - 'entries', 'keys', 'values', 'forEach' methods module.exports = { CSSRuleList: 0, CSSStyleDeclaration: 0, CSSValueList: 0, ClientRectList: 0, DOMRectList: 0, DOMStringList: 0, DOMTokenList: 1, DataTransferItemList: 0, FileList: 0, HTMLAllCollection: 0, HTMLCollection: 0, HTMLFormElement: 0, HTMLSelectElement: 0, MediaList: 0, MimeTypeArray: 0, NamedNodeMap: 0, NodeList: 1, PaintRequestList: 0, Plugin: 0, PluginArray: 0, SVGLengthList: 0, SVGNumberList: 0, SVGPathSegList: 0, SVGPointList: 0, SVGStringList: 0, SVGTransformList: 0, SourceBufferList: 0, StyleSheetList: 0, TextTrackCueList: 0, TextTrackList: 0, TouchList: 0 }; /***/ }), /***/ 8509: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { // in old WebKit versions, `element.classList` is not an instance of global `DOMTokenList` var documentCreateElement = __webpack_require__(317); var classList = documentCreateElement('span').classList; var DOMTokenListPrototype = classList && classList.constructor && classList.constructor.prototype; module.exports = DOMTokenListPrototype === Object.prototype ? undefined : DOMTokenListPrototype; /***/ }), /***/ 8886: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var userAgent = __webpack_require__(8113); var firefox = userAgent.match(/firefox\/(\d+)/i); module.exports = !!firefox && +firefox[1]; /***/ }), /***/ 7871: /***/ (function(module) { module.exports = typeof window == 'object'; /***/ }), /***/ 256: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var UA = __webpack_require__(8113); module.exports = /MSIE|Trident/.test(UA); /***/ }), /***/ 1528: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var userAgent = __webpack_require__(8113); var global = __webpack_require__(7854); module.exports = /ipad|iphone|ipod/i.test(userAgent) && global.Pebble !== undefined; /***/ }), /***/ 6833: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var userAgent = __webpack_require__(8113); module.exports = /(?:ipad|iphone|ipod).*applewebkit/i.test(userAgent); /***/ }), /***/ 5268: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var classof = __webpack_require__(4326); var global = __webpack_require__(7854); module.exports = classof(global.process) == 'process'; /***/ }), /***/ 1036: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var userAgent = __webpack_require__(8113); module.exports = /web0s(?!.*chrome)/i.test(userAgent); /***/ }), /***/ 8113: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var getBuiltIn = __webpack_require__(5005); module.exports = getBuiltIn('navigator', 'userAgent') || ''; /***/ }), /***/ 7392: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var global = __webpack_require__(7854); var userAgent = __webpack_require__(8113); var process = global.process; var Deno = global.Deno; var versions = process && process.versions || Deno && Deno.version; var v8 = versions && versions.v8; var match, version; if (v8) { match = v8.split('.'); // in old Chrome, versions of V8 isn't V8 = Chrome / 10 // but their correct versions are not interesting for us version = match[0] > 0 && match[0] < 4 ? 1 : +(match[0] + match[1]); } // BrowserFS NodeJS `process` polyfill incorrectly set `.v8` to `0.0` // so check `userAgent` even if `.v8` exists, but 0 if (!version && userAgent) { match = userAgent.match(/Edge\/(\d+)/); if (!match || match[1] >= 74) { match = userAgent.match(/Chrome\/(\d+)/); if (match) version = +match[1]; } } module.exports = version; /***/ }), /***/ 8008: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var userAgent = __webpack_require__(8113); var webkit = userAgent.match(/AppleWebKit\/(\d+)\./); module.exports = !!webkit && +webkit[1]; /***/ }), /***/ 748: /***/ (function(module) { // IE8- don't enum bug keys module.exports = [ 'constructor', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'toLocaleString', 'toString', 'valueOf' ]; /***/ }), /***/ 2914: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var fails = __webpack_require__(7293); var createPropertyDescriptor = __webpack_require__(9114); module.exports = !fails(function () { var error = Error('a'); if (!('stack' in error)) return true; // eslint-disable-next-line es/no-object-defineproperty -- safe Object.defineProperty(error, 'stack', createPropertyDescriptor(1, 7)); return error.stack !== 7; }); /***/ }), /***/ 2109: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var global = __webpack_require__(7854); var getOwnPropertyDescriptor = (__webpack_require__(1236).f); var createNonEnumerableProperty = __webpack_require__(8880); var redefine = __webpack_require__(1320); var setGlobal = __webpack_require__(3505); var copyConstructorProperties = __webpack_require__(9920); var isForced = __webpack_require__(4705); /* options.target - name of the target object options.global - target is the global object options.stat - export as static methods of target options.proto - export as prototype methods of target options.real - real prototype method for the `pure` version options.forced - export even if the native feature is available options.bind - bind methods to the target, required for the `pure` version options.wrap - wrap constructors to preventing global pollution, required for the `pure` version options.unsafe - use the simple assignment of property instead of delete + defineProperty options.sham - add a flag to not completely full polyfills options.enumerable - export as enumerable property options.noTargetGet - prevent calling a getter on target options.name - the .name of the function if it does not match the key */ module.exports = function (options, source) { var TARGET = options.target; var GLOBAL = options.global; var STATIC = options.stat; var FORCED, target, key, targetProperty, sourceProperty, descriptor; if (GLOBAL) { target = global; } else if (STATIC) { target = global[TARGET] || setGlobal(TARGET, {}); } else { target = (global[TARGET] || {}).prototype; } if (target) for (key in source) { sourceProperty = source[key]; if (options.noTargetGet) { descriptor = getOwnPropertyDescriptor(target, key); targetProperty = descriptor && descriptor.value; } else targetProperty = target[key]; FORCED = isForced(GLOBAL ? key : TARGET + (STATIC ? '.' : '#') + key, options.forced); // contained in target if (!FORCED && targetProperty !== undefined) { if (typeof sourceProperty == typeof targetProperty) continue; copyConstructorProperties(sourceProperty, targetProperty); } // add a flag to not completely full polyfills if (options.sham || (targetProperty && targetProperty.sham)) { createNonEnumerableProperty(sourceProperty, 'sham', true); } // extend global redefine(target, key, sourceProperty, options); } }; /***/ }), /***/ 7293: /***/ (function(module) { module.exports = function (exec) { try { return !!exec(); } catch (error) { return true; } }; /***/ }), /***/ 7007: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; // TODO: Remove from `core-js@4` since it's moved to entry points __webpack_require__(4916); var uncurryThis = __webpack_require__(1702); var redefine = __webpack_require__(1320); var regexpExec = __webpack_require__(2261); var fails = __webpack_require__(7293); var wellKnownSymbol = __webpack_require__(5112); var createNonEnumerableProperty = __webpack_require__(8880); var SPECIES = wellKnownSymbol('species'); var RegExpPrototype = RegExp.prototype; module.exports = function (KEY, exec, FORCED, SHAM) { var SYMBOL = wellKnownSymbol(KEY); var DELEGATES_TO_SYMBOL = !fails(function () { // String methods call symbol-named RegEp methods var O = {}; O[SYMBOL] = function () { return 7; }; return ''[KEY](O) != 7; }); var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () { // Symbol-named RegExp methods call .exec var execCalled = false; var re = /a/; if (KEY === 'split') { // We can't use real regex here since it causes deoptimization // and serious performance degradation in V8 // https://github.com/zloirock/core-js/issues/306 re = {}; // RegExp[@@split] doesn't call the regex's exec method, but first creates // a new one. We need to return the patched regex when creating the new one. re.constructor = {}; re.constructor[SPECIES] = function () { return re; }; re.flags = ''; re[SYMBOL] = /./[SYMBOL]; } re.exec = function () { execCalled = true; return null; }; re[SYMBOL](''); return !execCalled; }); if ( !DELEGATES_TO_SYMBOL || !DELEGATES_TO_EXEC || FORCED ) { var uncurriedNativeRegExpMethod = uncurryThis(/./[SYMBOL]); var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) { var uncurriedNativeMethod = uncurryThis(nativeMethod); var $exec = regexp.exec; if ($exec === regexpExec || $exec === RegExpPrototype.exec) { if (DELEGATES_TO_SYMBOL && !forceStringMethod) { // The native String method already delegates to @@method (this // polyfilled function), leasing to infinite recursion. // We avoid it by directly calling the native @@method method. return { done: true, value: uncurriedNativeRegExpMethod(regexp, str, arg2) }; } return { done: true, value: uncurriedNativeMethod(str, regexp, arg2) }; } return { done: false }; }); redefine(String.prototype, KEY, methods[0]); redefine(RegExpPrototype, SYMBOL, methods[1]); } if (SHAM) createNonEnumerableProperty(RegExpPrototype[SYMBOL], 'sham', true); }; /***/ }), /***/ 6677: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var fails = __webpack_require__(7293); module.exports = !fails(function () { // eslint-disable-next-line es/no-object-isextensible, es/no-object-preventextensions -- required for testing return Object.isExtensible(Object.preventExtensions({})); }); /***/ }), /***/ 2104: /***/ (function(module) { var FunctionPrototype = Function.prototype; var apply = FunctionPrototype.apply; var bind = FunctionPrototype.bind; var call = FunctionPrototype.call; // eslint-disable-next-line es/no-reflect -- safe module.exports = typeof Reflect == 'object' && Reflect.apply || (bind ? call.bind(apply) : function () { return call.apply(apply, arguments); }); /***/ }), /***/ 9974: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var uncurryThis = __webpack_require__(1702); var aCallable = __webpack_require__(9662); var bind = uncurryThis(uncurryThis.bind); // optional / simple context binding module.exports = function (fn, that) { aCallable(fn); return that === undefined ? fn : bind ? bind(fn, that) : function (/* ...args */) { return fn.apply(that, arguments); }; }; /***/ }), /***/ 7065: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var global = __webpack_require__(7854); var uncurryThis = __webpack_require__(1702); var aCallable = __webpack_require__(9662); var isObject = __webpack_require__(111); var hasOwn = __webpack_require__(2597); var arraySlice = __webpack_require__(206); var Function = global.Function; var concat = uncurryThis([].concat); var join = uncurryThis([].join); var factories = {}; var construct = function (C, argsLength, args) { if (!hasOwn(factories, argsLength)) { for (var list = [], i = 0; i < argsLength; i++) list[i] = 'a[' + i + ']'; factories[argsLength] = Function('C,a', 'return new C(' + join(list, ',') + ')'); } return factories[argsLength](C, args); }; // `Function.prototype.bind` method implementation // https://tc39.es/ecma262/#sec-function.prototype.bind module.exports = Function.bind || function bind(that /* , ...args */) { var F = aCallable(this); var Prototype = F.prototype; var partArgs = arraySlice(arguments, 1); var boundFunction = function bound(/* args... */) { var args = concat(partArgs, arraySlice(arguments)); return this instanceof boundFunction ? construct(F, args.length, args) : F.apply(that, args); }; if (isObject(Prototype)) boundFunction.prototype = Prototype; return boundFunction; }; /***/ }), /***/ 6916: /***/ (function(module) { var call = Function.prototype.call; module.exports = call.bind ? call.bind(call) : function () { return call.apply(call, arguments); }; /***/ }), /***/ 6530: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var DESCRIPTORS = __webpack_require__(9781); var hasOwn = __webpack_require__(2597); var FunctionPrototype = Function.prototype; // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe var getDescriptor = DESCRIPTORS && Object.getOwnPropertyDescriptor; var EXISTS = hasOwn(FunctionPrototype, 'name'); // additional protection from minified / mangled / dropped function names var PROPER = EXISTS && (function something() { /* empty */ }).name === 'something'; var CONFIGURABLE = EXISTS && (!DESCRIPTORS || (DESCRIPTORS && getDescriptor(FunctionPrototype, 'name').configurable)); module.exports = { EXISTS: EXISTS, PROPER: PROPER, CONFIGURABLE: CONFIGURABLE }; /***/ }), /***/ 1702: /***/ (function(module) { var FunctionPrototype = Function.prototype; var bind = FunctionPrototype.bind; var call = FunctionPrototype.call; var callBind = bind && bind.bind(call); module.exports = bind ? function (fn) { return fn && callBind(call, fn); } : function (fn) { return fn && function () { return call.apply(fn, arguments); }; }; /***/ }), /***/ 5005: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var global = __webpack_require__(7854); var isCallable = __webpack_require__(614); var aFunction = function (argument) { return isCallable(argument) ? argument : undefined; }; module.exports = function (namespace, method) { return arguments.length < 2 ? aFunction(global[namespace]) : global[namespace] && global[namespace][method]; }; /***/ }), /***/ 1246: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var classof = __webpack_require__(648); var getMethod = __webpack_require__(8173); var Iterators = __webpack_require__(7497); var wellKnownSymbol = __webpack_require__(5112); var ITERATOR = wellKnownSymbol('iterator'); module.exports = function (it) { if (it != undefined) return getMethod(it, ITERATOR) || getMethod(it, '@@iterator') || Iterators[classof(it)]; }; /***/ }), /***/ 8554: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var global = __webpack_require__(7854); var call = __webpack_require__(6916); var aCallable = __webpack_require__(9662); var anObject = __webpack_require__(9670); var tryToString = __webpack_require__(6330); var getIteratorMethod = __webpack_require__(1246); var TypeError = global.TypeError; module.exports = function (argument, usingIterator) { var iteratorMethod = arguments.length < 2 ? getIteratorMethod(argument) : usingIterator; if (aCallable(iteratorMethod)) return anObject(call(iteratorMethod, argument)); throw TypeError(tryToString(argument) + ' is not iterable'); }; /***/ }), /***/ 8173: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var aCallable = __webpack_require__(9662); // `GetMethod` abstract operation // https://tc39.es/ecma262/#sec-getmethod module.exports = function (V, P) { var func = V[P]; return func == null ? undefined : aCallable(func); }; /***/ }), /***/ 647: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var uncurryThis = __webpack_require__(1702); var toObject = __webpack_require__(7908); var floor = Math.floor; var charAt = uncurryThis(''.charAt); var replace = uncurryThis(''.replace); var stringSlice = uncurryThis(''.slice); var SUBSTITUTION_SYMBOLS = /\$([$&'`]|\d{1,2}|<[^>]*>)/g; var SUBSTITUTION_SYMBOLS_NO_NAMED = /\$([$&'`]|\d{1,2})/g; // `GetSubstitution` abstract operation // https://tc39.es/ecma262/#sec-getsubstitution module.exports = function (matched, str, position, captures, namedCaptures, replacement) { var tailPos = position + matched.length; var m = captures.length; var symbols = SUBSTITUTION_SYMBOLS_NO_NAMED; if (namedCaptures !== undefined) { namedCaptures = toObject(namedCaptures); symbols = SUBSTITUTION_SYMBOLS; } return replace(replacement, symbols, function (match, ch) { var capture; switch (charAt(ch, 0)) { case '$': return '$'; case '&': return matched; case '`': return stringSlice(str, 0, position); case "'": return stringSlice(str, tailPos); case '<': capture = namedCaptures[stringSlice(ch, 1, -1)]; break; default: // \d\d? var n = +ch; if (n === 0) return match; if (n > m) { var f = floor(n / 10); if (f === 0) return match; if (f <= m) return captures[f - 1] === undefined ? charAt(ch, 1) : captures[f - 1] + charAt(ch, 1); return match; } capture = captures[n - 1]; } return capture === undefined ? '' : capture; }); }; /***/ }), /***/ 7854: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var check = function (it) { return it && it.Math == Math && it; }; // https://github.com/zloirock/core-js/issues/86#issuecomment-115759028 module.exports = // eslint-disable-next-line es/no-global-this -- safe check(typeof globalThis == 'object' && globalThis) || check(typeof window == 'object' && window) || // eslint-disable-next-line no-restricted-globals -- safe check(typeof self == 'object' && self) || check(typeof __webpack_require__.g == 'object' && __webpack_require__.g) || // eslint-disable-next-line no-new-func -- fallback (function () { return this; })() || Function('return this')(); /***/ }), /***/ 2597: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var uncurryThis = __webpack_require__(1702); var toObject = __webpack_require__(7908); var hasOwnProperty = uncurryThis({}.hasOwnProperty); // `HasOwnProperty` abstract operation // https://tc39.es/ecma262/#sec-hasownproperty module.exports = Object.hasOwn || function hasOwn(it, key) { return hasOwnProperty(toObject(it), key); }; /***/ }), /***/ 3501: /***/ (function(module) { module.exports = {}; /***/ }), /***/ 842: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var global = __webpack_require__(7854); module.exports = function (a, b) { var console = global.console; if (console && console.error) { arguments.length == 1 ? console.error(a) : console.error(a, b); } }; /***/ }), /***/ 490: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var getBuiltIn = __webpack_require__(5005); module.exports = getBuiltIn('document', 'documentElement'); /***/ }), /***/ 4664: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var DESCRIPTORS = __webpack_require__(9781); var fails = __webpack_require__(7293); var createElement = __webpack_require__(317); // Thank's IE8 for his funny defineProperty module.exports = !DESCRIPTORS && !fails(function () { // eslint-disable-next-line es/no-object-defineproperty -- requied for testing return Object.defineProperty(createElement('div'), 'a', { get: function () { return 7; } }).a != 7; }); /***/ }), /***/ 1179: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { // IEEE754 conversions based on https://github.com/feross/ieee754 var global = __webpack_require__(7854); var Array = global.Array; var abs = Math.abs; var pow = Math.pow; var floor = Math.floor; var log = Math.log; var LN2 = Math.LN2; var pack = function (number, mantissaLength, bytes) { var buffer = Array(bytes); var exponentLength = bytes * 8 - mantissaLength - 1; var eMax = (1 << exponentLength) - 1; var eBias = eMax >> 1; var rt = mantissaLength === 23 ? pow(2, -24) - pow(2, -77) : 0; var sign = number < 0 || number === 0 && 1 / number < 0 ? 1 : 0; var index = 0; var exponent, mantissa, c; number = abs(number); // eslint-disable-next-line no-self-compare -- NaN check if (number != number || number === Infinity) { // eslint-disable-next-line no-self-compare -- NaN check mantissa = number != number ? 1 : 0; exponent = eMax; } else { exponent = floor(log(number) / LN2); if (number * (c = pow(2, -exponent)) < 1) { exponent--; c *= 2; } if (exponent + eBias >= 1) { number += rt / c; } else { number += rt * pow(2, 1 - eBias); } if (number * c >= 2) { exponent++; c /= 2; } if (exponent + eBias >= eMax) { mantissa = 0; exponent = eMax; } else if (exponent + eBias >= 1) { mantissa = (number * c - 1) * pow(2, mantissaLength); exponent = exponent + eBias; } else { mantissa = number * pow(2, eBias - 1) * pow(2, mantissaLength); exponent = 0; } } for (; mantissaLength >= 8; buffer[index++] = mantissa & 255, mantissa /= 256, mantissaLength -= 8); exponent = exponent << mantissaLength | mantissa; exponentLength += mantissaLength; for (; exponentLength > 0; buffer[index++] = exponent & 255, exponent /= 256, exponentLength -= 8); buffer[--index] |= sign * 128; return buffer; }; var unpack = function (buffer, mantissaLength) { var bytes = buffer.length; var exponentLength = bytes * 8 - mantissaLength - 1; var eMax = (1 << exponentLength) - 1; var eBias = eMax >> 1; var nBits = exponentLength - 7; var index = bytes - 1; var sign = buffer[index--]; var exponent = sign & 127; var mantissa; sign >>= 7; for (; nBits > 0; exponent = exponent * 256 + buffer[index], index--, nBits -= 8); mantissa = exponent & (1 << -nBits) - 1; exponent >>= -nBits; nBits += mantissaLength; for (; nBits > 0; mantissa = mantissa * 256 + buffer[index], index--, nBits -= 8); if (exponent === 0) { exponent = 1 - eBias; } else if (exponent === eMax) { return mantissa ? NaN : sign ? -Infinity : Infinity; } else { mantissa = mantissa + pow(2, mantissaLength); exponent = exponent - eBias; } return (sign ? -1 : 1) * mantissa * pow(2, exponent - mantissaLength); }; module.exports = { pack: pack, unpack: unpack }; /***/ }), /***/ 8361: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var global = __webpack_require__(7854); var uncurryThis = __webpack_require__(1702); var fails = __webpack_require__(7293); var classof = __webpack_require__(4326); var Object = global.Object; var split = uncurryThis(''.split); // fallback for non-array-like ES3 and non-enumerable old V8 strings module.exports = fails(function () { // throws an error in rhino, see https://github.com/mozilla/rhino/issues/346 // eslint-disable-next-line no-prototype-builtins -- safe return !Object('z').propertyIsEnumerable(0); }) ? function (it) { return classof(it) == 'String' ? split(it, '') : Object(it); } : Object; /***/ }), /***/ 9587: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var isCallable = __webpack_require__(614); var isObject = __webpack_require__(111); var setPrototypeOf = __webpack_require__(7674); // makes subclassing work correct for wrapped built-ins module.exports = function ($this, dummy, Wrapper) { var NewTarget, NewTargetPrototype; if ( // it can work only with native `setPrototypeOf` setPrototypeOf && // we haven't completely correct pre-ES6 way for getting `new.target`, so use this isCallable(NewTarget = dummy.constructor) && NewTarget !== Wrapper && isObject(NewTargetPrototype = NewTarget.prototype) && NewTargetPrototype !== Wrapper.prototype ) setPrototypeOf($this, NewTargetPrototype); return $this; }; /***/ }), /***/ 2788: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var uncurryThis = __webpack_require__(1702); var isCallable = __webpack_require__(614); var store = __webpack_require__(5465); var functionToString = uncurryThis(Function.toString); // this helper broken in `core-js@3.4.1-3.4.4`, so we can't use `shared` helper if (!isCallable(store.inspectSource)) { store.inspectSource = function (it) { return functionToString(it); }; } module.exports = store.inspectSource; /***/ }), /***/ 8340: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var isObject = __webpack_require__(111); var createNonEnumerableProperty = __webpack_require__(8880); // `InstallErrorCause` abstract operation // https://tc39.es/proposal-error-cause/#sec-errorobjects-install-error-cause module.exports = function (O, options) { if (isObject(options) && 'cause' in options) { createNonEnumerableProperty(O, 'cause', options.cause); } }; /***/ }), /***/ 2423: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var $ = __webpack_require__(2109); var uncurryThis = __webpack_require__(1702); var hiddenKeys = __webpack_require__(3501); var isObject = __webpack_require__(111); var hasOwn = __webpack_require__(2597); var defineProperty = (__webpack_require__(3070).f); var getOwnPropertyNamesModule = __webpack_require__(8006); var getOwnPropertyNamesExternalModule = __webpack_require__(1156); var uid = __webpack_require__(9711); var FREEZING = __webpack_require__(6677); var REQUIRED = false; var METADATA = uid('meta'); var id = 0; // eslint-disable-next-line es/no-object-isextensible -- safe var isExtensible = Object.isExtensible || function () { return true; }; var setMetadata = function (it) { defineProperty(it, METADATA, { value: { objectID: 'O' + id++, // object ID weakData: {} // weak collections IDs } }); }; var fastKey = function (it, create) { // return a primitive with prefix if (!isObject(it)) return typeof it == 'symbol' ? it : (typeof it == 'string' ? 'S' : 'P') + it; if (!hasOwn(it, METADATA)) { // can't set metadata to uncaught frozen object if (!isExtensible(it)) return 'F'; // not necessary to add metadata if (!create) return 'E'; // add missing metadata setMetadata(it); // return object ID } return it[METADATA].objectID; }; var getWeakData = function (it, create) { if (!hasOwn(it, METADATA)) { // can't set metadata to uncaught frozen object if (!isExtensible(it)) return true; // not necessary to add metadata if (!create) return false; // add missing metadata setMetadata(it); // return the store of weak collections IDs } return it[METADATA].weakData; }; // add metadata on freeze-family methods calling var onFreeze = function (it) { if (FREEZING && REQUIRED && isExtensible(it) && !hasOwn(it, METADATA)) setMetadata(it); return it; }; var enable = function () { meta.enable = function () { /* empty */ }; REQUIRED = true; var getOwnPropertyNames = getOwnPropertyNamesModule.f; var splice = uncurryThis([].splice); var test = {}; test[METADATA] = 1; // prevent exposing of metadata key if (getOwnPropertyNames(test).length) { getOwnPropertyNamesModule.f = function (it) { var result = getOwnPropertyNames(it); for (var i = 0, length = result.length; i < length; i++) { if (result[i] === METADATA) { splice(result, i, 1); break; } } return result; }; $({ target: 'Object', stat: true, forced: true }, { getOwnPropertyNames: getOwnPropertyNamesExternalModule.f }); } }; var meta = module.exports = { enable: enable, fastKey: fastKey, getWeakData: getWeakData, onFreeze: onFreeze }; hiddenKeys[METADATA] = true; /***/ }), /***/ 9909: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var NATIVE_WEAK_MAP = __webpack_require__(8536); var global = __webpack_require__(7854); var uncurryThis = __webpack_require__(1702); var isObject = __webpack_require__(111); var createNonEnumerableProperty = __webpack_require__(8880); var hasOwn = __webpack_require__(2597); var shared = __webpack_require__(5465); var sharedKey = __webpack_require__(6200); var hiddenKeys = __webpack_require__(3501); var OBJECT_ALREADY_INITIALIZED = 'Object already initialized'; var TypeError = global.TypeError; var WeakMap = global.WeakMap; var set, get, has; var enforce = function (it) { return has(it) ? get(it) : set(it, {}); }; var getterFor = function (TYPE) { return function (it) { var state; if (!isObject(it) || (state = get(it)).type !== TYPE) { throw TypeError('Incompatible receiver, ' + TYPE + ' required'); } return state; }; }; if (NATIVE_WEAK_MAP || shared.state) { var store = shared.state || (shared.state = new WeakMap()); var wmget = uncurryThis(store.get); var wmhas = uncurryThis(store.has); var wmset = uncurryThis(store.set); set = function (it, metadata) { if (wmhas(store, it)) throw new TypeError(OBJECT_ALREADY_INITIALIZED); metadata.facade = it; wmset(store, it, metadata); return metadata; }; get = function (it) { return wmget(store, it) || {}; }; has = function (it) { return wmhas(store, it); }; } else { var STATE = sharedKey('state'); hiddenKeys[STATE] = true; set = function (it, metadata) { if (hasOwn(it, STATE)) throw new TypeError(OBJECT_ALREADY_INITIALIZED); metadata.facade = it; createNonEnumerableProperty(it, STATE, metadata); return metadata; }; get = function (it) { return hasOwn(it, STATE) ? it[STATE] : {}; }; has = function (it) { return hasOwn(it, STATE); }; } module.exports = { set: set, get: get, has: has, enforce: enforce, getterFor: getterFor }; /***/ }), /***/ 7659: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var wellKnownSymbol = __webpack_require__(5112); var Iterators = __webpack_require__(7497); var ITERATOR = wellKnownSymbol('iterator'); var ArrayPrototype = Array.prototype; // check on default Array iterator module.exports = function (it) { return it !== undefined && (Iterators.Array === it || ArrayPrototype[ITERATOR] === it); }; /***/ }), /***/ 3157: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var classof = __webpack_require__(4326); // `IsArray` abstract operation // https://tc39.es/ecma262/#sec-isarray // eslint-disable-next-line es/no-array-isarray -- safe module.exports = Array.isArray || function isArray(argument) { return classof(argument) == 'Array'; }; /***/ }), /***/ 614: /***/ (function(module) { // `IsCallable` abstract operation // https://tc39.es/ecma262/#sec-iscallable module.exports = function (argument) { return typeof argument == 'function'; }; /***/ }), /***/ 4411: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var uncurryThis = __webpack_require__(1702); var fails = __webpack_require__(7293); var isCallable = __webpack_require__(614); var classof = __webpack_require__(648); var getBuiltIn = __webpack_require__(5005); var inspectSource = __webpack_require__(2788); var noop = function () { /* empty */ }; var empty = []; var construct = getBuiltIn('Reflect', 'construct'); var constructorRegExp = /^\s*(?:class|function)\b/; var exec = uncurryThis(constructorRegExp.exec); var INCORRECT_TO_STRING = !constructorRegExp.exec(noop); var isConstructorModern = function (argument) { if (!isCallable(argument)) return false; try { construct(noop, empty, argument); return true; } catch (error) { return false; } }; var isConstructorLegacy = function (argument) { if (!isCallable(argument)) return false; switch (classof(argument)) { case 'AsyncFunction': case 'GeneratorFunction': case 'AsyncGeneratorFunction': return false; // we can't check .prototype since constructors produced by .bind haven't it } return INCORRECT_TO_STRING || !!exec(constructorRegExp, inspectSource(argument)); }; // `IsConstructor` abstract operation // https://tc39.es/ecma262/#sec-isconstructor module.exports = !construct || fails(function () { var called; return isConstructorModern(isConstructorModern.call) || !isConstructorModern(Object) || !isConstructorModern(function () { called = true; }) || called; }) ? isConstructorLegacy : isConstructorModern; /***/ }), /***/ 4705: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var fails = __webpack_require__(7293); var isCallable = __webpack_require__(614); var replacement = /#|\.prototype\./; var isForced = function (feature, detection) { var value = data[normalize(feature)]; return value == POLYFILL ? true : value == NATIVE ? false : isCallable(detection) ? fails(detection) : !!detection; }; var normalize = isForced.normalize = function (string) { return String(string).replace(replacement, '.').toLowerCase(); }; var data = isForced.data = {}; var NATIVE = isForced.NATIVE = 'N'; var POLYFILL = isForced.POLYFILL = 'P'; module.exports = isForced; /***/ }), /***/ 5988: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var isObject = __webpack_require__(111); var floor = Math.floor; // `IsIntegralNumber` abstract operation // https://tc39.es/ecma262/#sec-isintegralnumber // eslint-disable-next-line es/no-number-isinteger -- safe module.exports = Number.isInteger || function isInteger(it) { return !isObject(it) && isFinite(it) && floor(it) === it; }; /***/ }), /***/ 111: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var isCallable = __webpack_require__(614); module.exports = function (it) { return typeof it == 'object' ? it !== null : isCallable(it); }; /***/ }), /***/ 1913: /***/ (function(module) { module.exports = false; /***/ }), /***/ 7850: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var isObject = __webpack_require__(111); var classof = __webpack_require__(4326); var wellKnownSymbol = __webpack_require__(5112); var MATCH = wellKnownSymbol('match'); // `IsRegExp` abstract operation // https://tc39.es/ecma262/#sec-isregexp module.exports = function (it) { var isRegExp; return isObject(it) && ((isRegExp = it[MATCH]) !== undefined ? !!isRegExp : classof(it) == 'RegExp'); }; /***/ }), /***/ 2190: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var global = __webpack_require__(7854); var getBuiltIn = __webpack_require__(5005); var isCallable = __webpack_require__(614); var isPrototypeOf = __webpack_require__(7976); var USE_SYMBOL_AS_UID = __webpack_require__(3307); var Object = global.Object; module.exports = USE_SYMBOL_AS_UID ? function (it) { return typeof it == 'symbol'; } : function (it) { var $Symbol = getBuiltIn('Symbol'); return isCallable($Symbol) && isPrototypeOf($Symbol.prototype, Object(it)); }; /***/ }), /***/ 408: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var global = __webpack_require__(7854); var bind = __webpack_require__(9974); var call = __webpack_require__(6916); var anObject = __webpack_require__(9670); var tryToString = __webpack_require__(6330); var isArrayIteratorMethod = __webpack_require__(7659); var lengthOfArrayLike = __webpack_require__(6244); var isPrototypeOf = __webpack_require__(7976); var getIterator = __webpack_require__(8554); var getIteratorMethod = __webpack_require__(1246); var iteratorClose = __webpack_require__(9212); var TypeError = global.TypeError; var Result = function (stopped, result) { this.stopped = stopped; this.result = result; }; var ResultPrototype = Result.prototype; module.exports = function (iterable, unboundFunction, options) { var that = options && options.that; var AS_ENTRIES = !!(options && options.AS_ENTRIES); var IS_ITERATOR = !!(options && options.IS_ITERATOR); var INTERRUPTED = !!(options && options.INTERRUPTED); var fn = bind(unboundFunction, that); var iterator, iterFn, index, length, result, next, step; var stop = function (condition) { if (iterator) iteratorClose(iterator, 'normal', condition); return new Result(true, condition); }; var callFn = function (value) { if (AS_ENTRIES) { anObject(value); return INTERRUPTED ? fn(value[0], value[1], stop) : fn(value[0], value[1]); } return INTERRUPTED ? fn(value, stop) : fn(value); }; if (IS_ITERATOR) { iterator = iterable; } else { iterFn = getIteratorMethod(iterable); if (!iterFn) throw TypeError(tryToString(iterable) + ' is not iterable'); // optimisation for array iterators if (isArrayIteratorMethod(iterFn)) { for (index = 0, length = lengthOfArrayLike(iterable); length > index; index++) { result = callFn(iterable[index]); if (result && isPrototypeOf(ResultPrototype, result)) return result; } return new Result(false); } iterator = getIterator(iterable, iterFn); } next = iterator.next; while (!(step = call(next, iterator)).done) { try { result = callFn(step.value); } catch (error) { iteratorClose(iterator, 'throw', error); } if (typeof result == 'object' && result && isPrototypeOf(ResultPrototype, result)) return result; } return new Result(false); }; /***/ }), /***/ 9212: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var call = __webpack_require__(6916); var anObject = __webpack_require__(9670); var getMethod = __webpack_require__(8173); module.exports = function (iterator, kind, value) { var innerResult, innerError; anObject(iterator); try { innerResult = getMethod(iterator, 'return'); if (!innerResult) { if (kind === 'throw') throw value; return value; } innerResult = call(innerResult, iterator); } catch (error) { innerError = true; innerResult = error; } if (kind === 'throw') throw value; if (innerError) throw innerResult; anObject(innerResult); return value; }; /***/ }), /***/ 3383: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var fails = __webpack_require__(7293); var isCallable = __webpack_require__(614); var create = __webpack_require__(30); var getPrototypeOf = __webpack_require__(9518); var redefine = __webpack_require__(1320); var wellKnownSymbol = __webpack_require__(5112); var IS_PURE = __webpack_require__(1913); var ITERATOR = wellKnownSymbol('iterator'); var BUGGY_SAFARI_ITERATORS = false; // `%IteratorPrototype%` object // https://tc39.es/ecma262/#sec-%iteratorprototype%-object var IteratorPrototype, PrototypeOfArrayIteratorPrototype, arrayIterator; /* eslint-disable es/no-array-prototype-keys -- safe */ if ([].keys) { arrayIterator = [].keys(); // Safari 8 has buggy iterators w/o `next` if (!('next' in arrayIterator)) BUGGY_SAFARI_ITERATORS = true; else { PrototypeOfArrayIteratorPrototype = getPrototypeOf(getPrototypeOf(arrayIterator)); if (PrototypeOfArrayIteratorPrototype !== Object.prototype) IteratorPrototype = PrototypeOfArrayIteratorPrototype; } } var NEW_ITERATOR_PROTOTYPE = IteratorPrototype == undefined || fails(function () { var test = {}; // FF44- legacy iterators case return IteratorPrototype[ITERATOR].call(test) !== test; }); if (NEW_ITERATOR_PROTOTYPE) IteratorPrototype = {}; else if (IS_PURE) IteratorPrototype = create(IteratorPrototype); // `%IteratorPrototype%[@@iterator]()` method // https://tc39.es/ecma262/#sec-%iteratorprototype%-@@iterator if (!isCallable(IteratorPrototype[ITERATOR])) { redefine(IteratorPrototype, ITERATOR, function () { return this; }); } module.exports = { IteratorPrototype: IteratorPrototype, BUGGY_SAFARI_ITERATORS: BUGGY_SAFARI_ITERATORS }; /***/ }), /***/ 7497: /***/ (function(module) { module.exports = {}; /***/ }), /***/ 6244: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var toLength = __webpack_require__(7466); // `LengthOfArrayLike` abstract operation // https://tc39.es/ecma262/#sec-lengthofarraylike module.exports = function (obj) { return toLength(obj.length); }; /***/ }), /***/ 5948: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var global = __webpack_require__(7854); var bind = __webpack_require__(9974); var getOwnPropertyDescriptor = (__webpack_require__(1236).f); var macrotask = (__webpack_require__(261).set); var IS_IOS = __webpack_require__(6833); var IS_IOS_PEBBLE = __webpack_require__(1528); var IS_WEBOS_WEBKIT = __webpack_require__(1036); var IS_NODE = __webpack_require__(5268); var MutationObserver = global.MutationObserver || global.WebKitMutationObserver; var document = global.document; var process = global.process; var Promise = global.Promise; // Node.js 11 shows ExperimentalWarning on getting `queueMicrotask` var queueMicrotaskDescriptor = getOwnPropertyDescriptor(global, 'queueMicrotask'); var queueMicrotask = queueMicrotaskDescriptor && queueMicrotaskDescriptor.value; var flush, head, last, notify, toggle, node, promise, then; // modern engines have queueMicrotask method if (!queueMicrotask) { flush = function () { var parent, fn; if (IS_NODE && (parent = process.domain)) parent.exit(); while (head) { fn = head.fn; head = head.next; try { fn(); } catch (error) { if (head) notify(); else last = undefined; throw error; } } last = undefined; if (parent) parent.enter(); }; // browsers with MutationObserver, except iOS - https://github.com/zloirock/core-js/issues/339 // also except WebOS Webkit https://github.com/zloirock/core-js/issues/898 if (!IS_IOS && !IS_NODE && !IS_WEBOS_WEBKIT && MutationObserver && document) { toggle = true; node = document.createTextNode(''); new MutationObserver(flush).observe(node, { characterData: true }); notify = function () { node.data = toggle = !toggle; }; // environments with maybe non-completely correct, but existent Promise } else if (!IS_IOS_PEBBLE && Promise && Promise.resolve) { // Promise.resolve without an argument throws an error in LG WebOS 2 promise = Promise.resolve(undefined); // workaround of WebKit ~ iOS Safari 10.1 bug promise.constructor = Promise; then = bind(promise.then, promise); notify = function () { then(flush); }; // Node.js without promises } else if (IS_NODE) { notify = function () { process.nextTick(flush); }; // for other environments - macrotask based on: // - setImmediate // - MessageChannel // - window.postMessag // - onreadystatechange // - setTimeout } else { // strange IE + webpack dev server bug - use .bind(global) macrotask = bind(macrotask, global); notify = function () { macrotask(flush); }; } } module.exports = queueMicrotask || function (fn) { var task = { fn: fn, next: undefined }; if (last) last.next = task; if (!head) { head = task; notify(); } last = task; }; /***/ }), /***/ 3366: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var global = __webpack_require__(7854); module.exports = global.Promise; /***/ }), /***/ 133: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { /* eslint-disable es/no-symbol -- required for testing */ var V8_VERSION = __webpack_require__(7392); var fails = __webpack_require__(7293); // eslint-disable-next-line es/no-object-getownpropertysymbols -- required for testing module.exports = !!Object.getOwnPropertySymbols && !fails(function () { var symbol = Symbol(); // Chrome 38 Symbol has incorrect toString conversion // `get-own-property-symbols` polyfill symbols converted to object are not Symbol instances return !String(symbol) || !(Object(symbol) instanceof Symbol) || // Chrome 38-40 symbols are not inherited from DOM collections prototypes to instances !Symbol.sham && V8_VERSION && V8_VERSION < 41; }); /***/ }), /***/ 8536: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var global = __webpack_require__(7854); var isCallable = __webpack_require__(614); var inspectSource = __webpack_require__(2788); var WeakMap = global.WeakMap; module.exports = isCallable(WeakMap) && /native code/.test(inspectSource(WeakMap)); /***/ }), /***/ 8523: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var aCallable = __webpack_require__(9662); var PromiseCapability = function (C) { var resolve, reject; this.promise = new C(function ($$resolve, $$reject) { if (resolve !== undefined || reject !== undefined) throw TypeError('Bad Promise constructor'); resolve = $$resolve; reject = $$reject; }); this.resolve = aCallable(resolve); this.reject = aCallable(reject); }; // `NewPromiseCapability` abstract operation // https://tc39.es/ecma262/#sec-newpromisecapability module.exports.f = function (C) { return new PromiseCapability(C); }; /***/ }), /***/ 6277: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var toString = __webpack_require__(1340); module.exports = function (argument, $default) { return argument === undefined ? arguments.length < 2 ? '' : $default : toString(argument); }; /***/ }), /***/ 3929: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var global = __webpack_require__(7854); var isRegExp = __webpack_require__(7850); var TypeError = global.TypeError; module.exports = function (it) { if (isRegExp(it)) { throw TypeError("The method doesn't accept regular expressions"); } return it; }; /***/ }), /***/ 7023: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var global = __webpack_require__(7854); var globalIsFinite = global.isFinite; // `Number.isFinite` method // https://tc39.es/ecma262/#sec-number.isfinite // eslint-disable-next-line es/no-number-isfinite -- safe module.exports = Number.isFinite || function isFinite(it) { return typeof it == 'number' && globalIsFinite(it); }; /***/ }), /***/ 1574: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var DESCRIPTORS = __webpack_require__(9781); var uncurryThis = __webpack_require__(1702); var call = __webpack_require__(6916); var fails = __webpack_require__(7293); var objectKeys = __webpack_require__(1956); var getOwnPropertySymbolsModule = __webpack_require__(5181); var propertyIsEnumerableModule = __webpack_require__(5296); var toObject = __webpack_require__(7908); var IndexedObject = __webpack_require__(8361); // eslint-disable-next-line es/no-object-assign -- safe var $assign = Object.assign; // eslint-disable-next-line es/no-object-defineproperty -- required for testing var defineProperty = Object.defineProperty; var concat = uncurryThis([].concat); // `Object.assign` method // https://tc39.es/ecma262/#sec-object.assign module.exports = !$assign || fails(function () { // should have correct order of operations (Edge bug) if (DESCRIPTORS && $assign({ b: 1 }, $assign(defineProperty({}, 'a', { enumerable: true, get: function () { defineProperty(this, 'b', { value: 3, enumerable: false }); } }), { b: 2 })).b !== 1) return true; // should work with symbols and should have deterministic property order (V8 bug) var A = {}; var B = {}; // eslint-disable-next-line es/no-symbol -- safe var symbol = Symbol(); var alphabet = 'abcdefghijklmnopqrst'; A[symbol] = 7; alphabet.split('').forEach(function (chr) { B[chr] = chr; }); return $assign({}, A)[symbol] != 7 || objectKeys($assign({}, B)).join('') != alphabet; }) ? function assign(target, source) { // eslint-disable-line no-unused-vars -- required for `.length` var T = toObject(target); var argumentsLength = arguments.length; var index = 1; var getOwnPropertySymbols = getOwnPropertySymbolsModule.f; var propertyIsEnumerable = propertyIsEnumerableModule.f; while (argumentsLength > index) { var S = IndexedObject(arguments[index++]); var keys = getOwnPropertySymbols ? concat(objectKeys(S), getOwnPropertySymbols(S)) : objectKeys(S); var length = keys.length; var j = 0; var key; while (length > j) { key = keys[j++]; if (!DESCRIPTORS || call(propertyIsEnumerable, S, key)) T[key] = S[key]; } } return T; } : $assign; /***/ }), /***/ 30: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { /* global ActiveXObject -- old IE, WSH */ var anObject = __webpack_require__(9670); var defineProperties = __webpack_require__(6048); var enumBugKeys = __webpack_require__(748); var hiddenKeys = __webpack_require__(3501); var html = __webpack_require__(490); var documentCreateElement = __webpack_require__(317); var sharedKey = __webpack_require__(6200); var GT = '>'; var LT = '<'; var PROTOTYPE = 'prototype'; var SCRIPT = 'script'; var IE_PROTO = sharedKey('IE_PROTO'); var EmptyConstructor = function () { /* empty */ }; var scriptTag = function (content) { return LT + SCRIPT + GT + content + LT + '/' + SCRIPT + GT; }; // Create object with fake `null` prototype: use ActiveX Object with cleared prototype var NullProtoObjectViaActiveX = function (activeXDocument) { activeXDocument.write(scriptTag('')); activeXDocument.close(); var temp = activeXDocument.parentWindow.Object; activeXDocument = null; // avoid memory leak return temp; }; // Create object with fake `null` prototype: use iframe Object with cleared prototype var NullProtoObjectViaIFrame = function () { // Thrash, waste and sodomy: IE GC bug var iframe = documentCreateElement('iframe'); var JS = 'java' + SCRIPT + ':'; var iframeDocument; iframe.style.display = 'none'; html.appendChild(iframe); // https://github.com/zloirock/core-js/issues/475 iframe.src = String(JS); iframeDocument = iframe.contentWindow.document; iframeDocument.open(); iframeDocument.write(scriptTag('document.F=Object')); iframeDocument.close(); return iframeDocument.F; }; // Check for document.domain and active x support // No need to use active x approach when document.domain is not set // see https://github.com/es-shims/es5-shim/issues/150 // variation of https://github.com/kitcambridge/es5-shim/commit/4f738ac066346 // avoid IE GC bug var activeXDocument; var NullProtoObject = function () { try { activeXDocument = new ActiveXObject('htmlfile'); } catch (error) { /* ignore */ } NullProtoObject = typeof document != 'undefined' ? document.domain && activeXDocument ? NullProtoObjectViaActiveX(activeXDocument) // old IE : NullProtoObjectViaIFrame() : NullProtoObjectViaActiveX(activeXDocument); // WSH var length = enumBugKeys.length; while (length--) delete NullProtoObject[PROTOTYPE][enumBugKeys[length]]; return NullProtoObject(); }; hiddenKeys[IE_PROTO] = true; // `Object.create` method // https://tc39.es/ecma262/#sec-object.create module.exports = Object.create || function create(O, Properties) { var result; if (O !== null) { EmptyConstructor[PROTOTYPE] = anObject(O); result = new EmptyConstructor(); EmptyConstructor[PROTOTYPE] = null; // add "__proto__" for Object.getPrototypeOf polyfill result[IE_PROTO] = O; } else result = NullProtoObject(); return Properties === undefined ? result : defineProperties(result, Properties); }; /***/ }), /***/ 6048: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var DESCRIPTORS = __webpack_require__(9781); var definePropertyModule = __webpack_require__(3070); var anObject = __webpack_require__(9670); var toIndexedObject = __webpack_require__(5656); var objectKeys = __webpack_require__(1956); // `Object.defineProperties` method // https://tc39.es/ecma262/#sec-object.defineproperties // eslint-disable-next-line es/no-object-defineproperties -- safe module.exports = DESCRIPTORS ? Object.defineProperties : function defineProperties(O, Properties) { anObject(O); var props = toIndexedObject(Properties); var keys = objectKeys(Properties); var length = keys.length; var index = 0; var key; while (length > index) definePropertyModule.f(O, key = keys[index++], props[key]); return O; }; /***/ }), /***/ 3070: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { var global = __webpack_require__(7854); var DESCRIPTORS = __webpack_require__(9781); var IE8_DOM_DEFINE = __webpack_require__(4664); var anObject = __webpack_require__(9670); var toPropertyKey = __webpack_require__(4948); var TypeError = global.TypeError; // eslint-disable-next-line es/no-object-defineproperty -- safe var $defineProperty = Object.defineProperty; // `Object.defineProperty` method // https://tc39.es/ecma262/#sec-object.defineproperty exports.f = DESCRIPTORS ? $defineProperty : function defineProperty(O, P, Attributes) { anObject(O); P = toPropertyKey(P); anObject(Attributes); if (IE8_DOM_DEFINE) try { return $defineProperty(O, P, Attributes); } catch (error) { /* empty */ } if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported'); if ('value' in Attributes) O[P] = Attributes.value; return O; }; /***/ }), /***/ 1236: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { var DESCRIPTORS = __webpack_require__(9781); var call = __webpack_require__(6916); var propertyIsEnumerableModule = __webpack_require__(5296); var createPropertyDescriptor = __webpack_require__(9114); var toIndexedObject = __webpack_require__(5656); var toPropertyKey = __webpack_require__(4948); var hasOwn = __webpack_require__(2597); var IE8_DOM_DEFINE = __webpack_require__(4664); // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe var $getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; // `Object.getOwnPropertyDescriptor` method // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor exports.f = DESCRIPTORS ? $getOwnPropertyDescriptor : function getOwnPropertyDescriptor(O, P) { O = toIndexedObject(O); P = toPropertyKey(P); if (IE8_DOM_DEFINE) try { return $getOwnPropertyDescriptor(O, P); } catch (error) { /* empty */ } if (hasOwn(O, P)) return createPropertyDescriptor(!call(propertyIsEnumerableModule.f, O, P), O[P]); }; /***/ }), /***/ 1156: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { /* eslint-disable es/no-object-getownpropertynames -- safe */ var classof = __webpack_require__(4326); var toIndexedObject = __webpack_require__(5656); var $getOwnPropertyNames = (__webpack_require__(8006).f); var arraySlice = __webpack_require__(206); var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames ? Object.getOwnPropertyNames(window) : []; var getWindowNames = function (it) { try { return $getOwnPropertyNames(it); } catch (error) { return arraySlice(windowNames); } }; // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window module.exports.f = function getOwnPropertyNames(it) { return windowNames && classof(it) == 'Window' ? getWindowNames(it) : $getOwnPropertyNames(toIndexedObject(it)); }; /***/ }), /***/ 8006: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { var internalObjectKeys = __webpack_require__(6324); var enumBugKeys = __webpack_require__(748); var hiddenKeys = enumBugKeys.concat('length', 'prototype'); // `Object.getOwnPropertyNames` method // https://tc39.es/ecma262/#sec-object.getownpropertynames // eslint-disable-next-line es/no-object-getownpropertynames -- safe exports.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) { return internalObjectKeys(O, hiddenKeys); }; /***/ }), /***/ 5181: /***/ (function(__unused_webpack_module, exports) { // eslint-disable-next-line es/no-object-getownpropertysymbols -- safe exports.f = Object.getOwnPropertySymbols; /***/ }), /***/ 9518: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var global = __webpack_require__(7854); var hasOwn = __webpack_require__(2597); var isCallable = __webpack_require__(614); var toObject = __webpack_require__(7908); var sharedKey = __webpack_require__(6200); var CORRECT_PROTOTYPE_GETTER = __webpack_require__(8544); var IE_PROTO = sharedKey('IE_PROTO'); var Object = global.Object; var ObjectPrototype = Object.prototype; // `Object.getPrototypeOf` method // https://tc39.es/ecma262/#sec-object.getprototypeof module.exports = CORRECT_PROTOTYPE_GETTER ? Object.getPrototypeOf : function (O) { var object = toObject(O); if (hasOwn(object, IE_PROTO)) return object[IE_PROTO]; var constructor = object.constructor; if (isCallable(constructor) && object instanceof constructor) { return constructor.prototype; } return object instanceof Object ? ObjectPrototype : null; }; /***/ }), /***/ 7976: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var uncurryThis = __webpack_require__(1702); module.exports = uncurryThis({}.isPrototypeOf); /***/ }), /***/ 6324: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var uncurryThis = __webpack_require__(1702); var hasOwn = __webpack_require__(2597); var toIndexedObject = __webpack_require__(5656); var indexOf = (__webpack_require__(1318).indexOf); var hiddenKeys = __webpack_require__(3501); var push = uncurryThis([].push); module.exports = function (object, names) { var O = toIndexedObject(object); var i = 0; var result = []; var key; for (key in O) !hasOwn(hiddenKeys, key) && hasOwn(O, key) && push(result, key); // Don't enum bug & hidden keys while (names.length > i) if (hasOwn(O, key = names[i++])) { ~indexOf(result, key) || push(result, key); } return result; }; /***/ }), /***/ 1956: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var internalObjectKeys = __webpack_require__(6324); var enumBugKeys = __webpack_require__(748); // `Object.keys` method // https://tc39.es/ecma262/#sec-object.keys // eslint-disable-next-line es/no-object-keys -- safe module.exports = Object.keys || function keys(O) { return internalObjectKeys(O, enumBugKeys); }; /***/ }), /***/ 5296: /***/ (function(__unused_webpack_module, exports) { "use strict"; var $propertyIsEnumerable = {}.propertyIsEnumerable; // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe var getOwnPropertyDescriptor = Object.getOwnPropertyDescriptor; // Nashorn ~ JDK8 bug var NASHORN_BUG = getOwnPropertyDescriptor && !$propertyIsEnumerable.call({ 1: 2 }, 1); // `Object.prototype.propertyIsEnumerable` method implementation // https://tc39.es/ecma262/#sec-object.prototype.propertyisenumerable exports.f = NASHORN_BUG ? function propertyIsEnumerable(V) { var descriptor = getOwnPropertyDescriptor(this, V); return !!descriptor && descriptor.enumerable; } : $propertyIsEnumerable; /***/ }), /***/ 7674: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { /* eslint-disable no-proto -- safe */ var uncurryThis = __webpack_require__(1702); var anObject = __webpack_require__(9670); var aPossiblePrototype = __webpack_require__(6077); // `Object.setPrototypeOf` method // https://tc39.es/ecma262/#sec-object.setprototypeof // Works with __proto__ only. Old v8 can't work with null proto objects. // eslint-disable-next-line es/no-object-setprototypeof -- safe module.exports = Object.setPrototypeOf || ('__proto__' in {} ? function () { var CORRECT_SETTER = false; var test = {}; var setter; try { // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe setter = uncurryThis(Object.getOwnPropertyDescriptor(Object.prototype, '__proto__').set); setter(test, []); CORRECT_SETTER = test instanceof Array; } catch (error) { /* empty */ } return function setPrototypeOf(O, proto) { anObject(O); aPossiblePrototype(proto); if (CORRECT_SETTER) setter(O, proto); else O.__proto__ = proto; return O; }; }() : undefined); /***/ }), /***/ 4699: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var DESCRIPTORS = __webpack_require__(9781); var uncurryThis = __webpack_require__(1702); var objectKeys = __webpack_require__(1956); var toIndexedObject = __webpack_require__(5656); var $propertyIsEnumerable = (__webpack_require__(5296).f); var propertyIsEnumerable = uncurryThis($propertyIsEnumerable); var push = uncurryThis([].push); // `Object.{ entries, values }` methods implementation var createMethod = function (TO_ENTRIES) { return function (it) { var O = toIndexedObject(it); var keys = objectKeys(O); var length = keys.length; var i = 0; var result = []; var key; while (length > i) { key = keys[i++]; if (!DESCRIPTORS || propertyIsEnumerable(O, key)) { push(result, TO_ENTRIES ? [key, O[key]] : O[key]); } } return result; }; }; module.exports = { // `Object.entries` method // https://tc39.es/ecma262/#sec-object.entries entries: createMethod(true), // `Object.values` method // https://tc39.es/ecma262/#sec-object.values values: createMethod(false) }; /***/ }), /***/ 288: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var TO_STRING_TAG_SUPPORT = __webpack_require__(1694); var classof = __webpack_require__(648); // `Object.prototype.toString` method implementation // https://tc39.es/ecma262/#sec-object.prototype.tostring module.exports = TO_STRING_TAG_SUPPORT ? {}.toString : function toString() { return '[object ' + classof(this) + ']'; }; /***/ }), /***/ 2140: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var global = __webpack_require__(7854); var call = __webpack_require__(6916); var isCallable = __webpack_require__(614); var isObject = __webpack_require__(111); var TypeError = global.TypeError; // `OrdinaryToPrimitive` abstract operation // https://tc39.es/ecma262/#sec-ordinarytoprimitive module.exports = function (input, pref) { var fn, val; if (pref === 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val; if (isCallable(fn = input.valueOf) && !isObject(val = call(fn, input))) return val; if (pref !== 'string' && isCallable(fn = input.toString) && !isObject(val = call(fn, input))) return val; throw TypeError("Can't convert object to primitive value"); }; /***/ }), /***/ 3887: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var getBuiltIn = __webpack_require__(5005); var uncurryThis = __webpack_require__(1702); var getOwnPropertyNamesModule = __webpack_require__(8006); var getOwnPropertySymbolsModule = __webpack_require__(5181); var anObject = __webpack_require__(9670); var concat = uncurryThis([].concat); // all object keys, includes non-enumerable and symbols module.exports = getBuiltIn('Reflect', 'ownKeys') || function ownKeys(it) { var keys = getOwnPropertyNamesModule.f(anObject(it)); var getOwnPropertySymbols = getOwnPropertySymbolsModule.f; return getOwnPropertySymbols ? concat(keys, getOwnPropertySymbols(it)) : keys; }; /***/ }), /***/ 857: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var global = __webpack_require__(7854); module.exports = global; /***/ }), /***/ 2534: /***/ (function(module) { module.exports = function (exec) { try { return { error: false, value: exec() }; } catch (error) { return { error: true, value: error }; } }; /***/ }), /***/ 9478: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var anObject = __webpack_require__(9670); var isObject = __webpack_require__(111); var newPromiseCapability = __webpack_require__(8523); module.exports = function (C, x) { anObject(C); if (isObject(x) && x.constructor === C) return x; var promiseCapability = newPromiseCapability.f(C); var resolve = promiseCapability.resolve; resolve(x); return promiseCapability.promise; }; /***/ }), /***/ 2248: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var redefine = __webpack_require__(1320); module.exports = function (target, src, options) { for (var key in src) redefine(target, key, src[key], options); return target; }; /***/ }), /***/ 1320: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var global = __webpack_require__(7854); var isCallable = __webpack_require__(614); var hasOwn = __webpack_require__(2597); var createNonEnumerableProperty = __webpack_require__(8880); var setGlobal = __webpack_require__(3505); var inspectSource = __webpack_require__(2788); var InternalStateModule = __webpack_require__(9909); var CONFIGURABLE_FUNCTION_NAME = (__webpack_require__(6530).CONFIGURABLE); var getInternalState = InternalStateModule.get; var enforceInternalState = InternalStateModule.enforce; var TEMPLATE = String(String).split('String'); (module.exports = function (O, key, value, options) { var unsafe = options ? !!options.unsafe : false; var simple = options ? !!options.enumerable : false; var noTargetGet = options ? !!options.noTargetGet : false; var name = options && options.name !== undefined ? options.name : key; var state; if (isCallable(value)) { if (String(name).slice(0, 7) === 'Symbol(') { name = '[' + String(name).replace(/^Symbol\(([^)]*)\)/, '$1') + ']'; } if (!hasOwn(value, 'name') || (CONFIGURABLE_FUNCTION_NAME && value.name !== name)) { createNonEnumerableProperty(value, 'name', name); } state = enforceInternalState(value); if (!state.source) { state.source = TEMPLATE.join(typeof name == 'string' ? name : ''); } } if (O === global) { if (simple) O[key] = value; else setGlobal(key, value); return; } else if (!unsafe) { delete O[key]; } else if (!noTargetGet && O[key]) { simple = true; } if (simple) O[key] = value; else createNonEnumerableProperty(O, key, value); // add fake Function#toString for correct work wrapped methods / constructors with methods like LoDash isNative })(Function.prototype, 'toString', function toString() { return isCallable(this) && getInternalState(this).source || inspectSource(this); }); /***/ }), /***/ 7651: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var global = __webpack_require__(7854); var call = __webpack_require__(6916); var anObject = __webpack_require__(9670); var isCallable = __webpack_require__(614); var classof = __webpack_require__(4326); var regexpExec = __webpack_require__(2261); var TypeError = global.TypeError; // `RegExpExec` abstract operation // https://tc39.es/ecma262/#sec-regexpexec module.exports = function (R, S) { var exec = R.exec; if (isCallable(exec)) { var result = call(exec, R, S); if (result !== null) anObject(result); return result; } if (classof(R) === 'RegExp') return call(regexpExec, R, S); throw TypeError('RegExp#exec called on incompatible receiver'); }; /***/ }), /***/ 2261: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; /* eslint-disable regexp/no-empty-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */ /* eslint-disable regexp/no-useless-quantifier -- testing */ var call = __webpack_require__(6916); var uncurryThis = __webpack_require__(1702); var toString = __webpack_require__(1340); var regexpFlags = __webpack_require__(7066); var stickyHelpers = __webpack_require__(2999); var shared = __webpack_require__(2309); var create = __webpack_require__(30); var getInternalState = (__webpack_require__(9909).get); var UNSUPPORTED_DOT_ALL = __webpack_require__(9441); var UNSUPPORTED_NCG = __webpack_require__(7168); var nativeReplace = shared('native-string-replace', String.prototype.replace); var nativeExec = RegExp.prototype.exec; var patchedExec = nativeExec; var charAt = uncurryThis(''.charAt); var indexOf = uncurryThis(''.indexOf); var replace = uncurryThis(''.replace); var stringSlice = uncurryThis(''.slice); var UPDATES_LAST_INDEX_WRONG = (function () { var re1 = /a/; var re2 = /b*/g; call(nativeExec, re1, 'a'); call(nativeExec, re2, 'a'); return re1.lastIndex !== 0 || re2.lastIndex !== 0; })(); var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y || stickyHelpers.BROKEN_CARET; // nonparticipating capturing group, copied from es5-shim's String#split patch. var NPCG_INCLUDED = /()??/.exec('')[1] !== undefined; var PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y || UNSUPPORTED_DOT_ALL || UNSUPPORTED_NCG; if (PATCH) { // eslint-disable-next-line max-statements -- TODO patchedExec = function exec(string) { var re = this; var state = getInternalState(re); var str = toString(string); var raw = state.raw; var result, reCopy, lastIndex, match, i, object, group; if (raw) { raw.lastIndex = re.lastIndex; result = call(patchedExec, raw, str); re.lastIndex = raw.lastIndex; return result; } var groups = state.groups; var sticky = UNSUPPORTED_Y && re.sticky; var flags = call(regexpFlags, re); var source = re.source; var charsAdded = 0; var strCopy = str; if (sticky) { flags = replace(flags, 'y', ''); if (indexOf(flags, 'g') === -1) { flags += 'g'; } strCopy = stringSlice(str, re.lastIndex); // Support anchored sticky behavior. if (re.lastIndex > 0 && (!re.multiline || re.multiline && charAt(str, re.lastIndex - 1) !== '\n')) { source = '(?: ' + source + ')'; strCopy = ' ' + strCopy; charsAdded++; } // ^(? + rx + ) is needed, in combination with some str slicing, to // simulate the 'y' flag. reCopy = new RegExp('^(?:' + source + ')', flags); } if (NPCG_INCLUDED) { reCopy = new RegExp('^' + source + '$(?!\\s)', flags); } if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex; match = call(nativeExec, sticky ? reCopy : re, strCopy); if (sticky) { if (match) { match.input = stringSlice(match.input, charsAdded); match[0] = stringSlice(match[0], charsAdded); match.index = re.lastIndex; re.lastIndex += match[0].length; } else re.lastIndex = 0; } else if (UPDATES_LAST_INDEX_WRONG && match) { re.lastIndex = re.global ? match.index + match[0].length : lastIndex; } if (NPCG_INCLUDED && match && match.length > 1) { // Fix browsers whose `exec` methods don't consistently return `undefined` // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/ call(nativeReplace, match[0], reCopy, function () { for (i = 1; i < arguments.length - 2; i++) { if (arguments[i] === undefined) match[i] = undefined; } }); } if (match && groups) { match.groups = object = create(null); for (i = 0; i < groups.length; i++) { group = groups[i]; object[group[0]] = match[group[1]]; } } return match; }; } module.exports = patchedExec; /***/ }), /***/ 7066: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var anObject = __webpack_require__(9670); // `RegExp.prototype.flags` getter implementation // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags module.exports = function () { var that = anObject(this); var result = ''; if (that.global) result += 'g'; if (that.ignoreCase) result += 'i'; if (that.multiline) result += 'm'; if (that.dotAll) result += 's'; if (that.unicode) result += 'u'; if (that.sticky) result += 'y'; return result; }; /***/ }), /***/ 2999: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { var fails = __webpack_require__(7293); var global = __webpack_require__(7854); // babel-minify and Closure Compiler transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError var $RegExp = global.RegExp; exports.UNSUPPORTED_Y = fails(function () { var re = $RegExp('a', 'y'); re.lastIndex = 2; return re.exec('abcd') != null; }); exports.BROKEN_CARET = fails(function () { // https://bugzilla.mozilla.org/show_bug.cgi?id=773687 var re = $RegExp('^r', 'gy'); re.lastIndex = 2; return re.exec('str') != null; }); /***/ }), /***/ 9441: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var fails = __webpack_require__(7293); var global = __webpack_require__(7854); // babel-minify and Closure Compiler transpiles RegExp('.', 's') -> /./s and it causes SyntaxError var $RegExp = global.RegExp; module.exports = fails(function () { var re = $RegExp('.', 's'); return !(re.dotAll && re.exec('\n') && re.flags === 's'); }); /***/ }), /***/ 7168: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var fails = __webpack_require__(7293); var global = __webpack_require__(7854); // babel-minify and Closure Compiler transpiles RegExp('(?b)', 'g') -> /(?b)/g and it causes SyntaxError var $RegExp = global.RegExp; module.exports = fails(function () { var re = $RegExp('(?b)', 'g'); return re.exec('b').groups.a !== 'b' || 'b'.replace(re, '$c') !== 'bc'; }); /***/ }), /***/ 4488: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var global = __webpack_require__(7854); var TypeError = global.TypeError; // `RequireObjectCoercible` abstract operation // https://tc39.es/ecma262/#sec-requireobjectcoercible module.exports = function (it) { if (it == undefined) throw TypeError("Can't call method on " + it); return it; }; /***/ }), /***/ 3505: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var global = __webpack_require__(7854); // eslint-disable-next-line es/no-object-defineproperty -- safe var defineProperty = Object.defineProperty; module.exports = function (key, value) { try { defineProperty(global, key, { value: value, configurable: true, writable: true }); } catch (error) { global[key] = value; } return value; }; /***/ }), /***/ 6340: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var getBuiltIn = __webpack_require__(5005); var definePropertyModule = __webpack_require__(3070); var wellKnownSymbol = __webpack_require__(5112); var DESCRIPTORS = __webpack_require__(9781); var SPECIES = wellKnownSymbol('species'); module.exports = function (CONSTRUCTOR_NAME) { var Constructor = getBuiltIn(CONSTRUCTOR_NAME); var defineProperty = definePropertyModule.f; if (DESCRIPTORS && Constructor && !Constructor[SPECIES]) { defineProperty(Constructor, SPECIES, { configurable: true, get: function () { return this; } }); } }; /***/ }), /***/ 8003: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var defineProperty = (__webpack_require__(3070).f); var hasOwn = __webpack_require__(2597); var wellKnownSymbol = __webpack_require__(5112); var TO_STRING_TAG = wellKnownSymbol('toStringTag'); module.exports = function (it, TAG, STATIC) { if (it && !hasOwn(it = STATIC ? it : it.prototype, TO_STRING_TAG)) { defineProperty(it, TO_STRING_TAG, { configurable: true, value: TAG }); } }; /***/ }), /***/ 6200: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var shared = __webpack_require__(2309); var uid = __webpack_require__(9711); var keys = shared('keys'); module.exports = function (key) { return keys[key] || (keys[key] = uid(key)); }; /***/ }), /***/ 5465: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var global = __webpack_require__(7854); var setGlobal = __webpack_require__(3505); var SHARED = '__core-js_shared__'; var store = global[SHARED] || setGlobal(SHARED, {}); module.exports = store; /***/ }), /***/ 2309: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var IS_PURE = __webpack_require__(1913); var store = __webpack_require__(5465); (module.exports = function (key, value) { return store[key] || (store[key] = value !== undefined ? value : {}); })('versions', []).push({ version: '3.19.0', mode: IS_PURE ? 'pure' : 'global', copyright: '© 2021 Denis Pushkarev (zloirock.ru)' }); /***/ }), /***/ 6707: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var anObject = __webpack_require__(9670); var aConstructor = __webpack_require__(9483); var wellKnownSymbol = __webpack_require__(5112); var SPECIES = wellKnownSymbol('species'); // `SpeciesConstructor` abstract operation // https://tc39.es/ecma262/#sec-speciesconstructor module.exports = function (O, defaultConstructor) { var C = anObject(O).constructor; var S; return C === undefined || (S = anObject(C)[SPECIES]) == undefined ? defaultConstructor : aConstructor(S); }; /***/ }), /***/ 3429: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var fails = __webpack_require__(7293); // check the existence of a method, lowercase // of a tag and escaping quotes in arguments module.exports = function (METHOD_NAME) { return fails(function () { var test = ''[METHOD_NAME]('"'); return test !== test.toLowerCase() || test.split('"').length > 3; }); }; /***/ }), /***/ 8710: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var uncurryThis = __webpack_require__(1702); var toIntegerOrInfinity = __webpack_require__(9303); var toString = __webpack_require__(1340); var requireObjectCoercible = __webpack_require__(4488); var charAt = uncurryThis(''.charAt); var charCodeAt = uncurryThis(''.charCodeAt); var stringSlice = uncurryThis(''.slice); var createMethod = function (CONVERT_TO_STRING) { return function ($this, pos) { var S = toString(requireObjectCoercible($this)); var position = toIntegerOrInfinity(pos); var size = S.length; var first, second; if (position < 0 || position >= size) return CONVERT_TO_STRING ? '' : undefined; first = charCodeAt(S, position); return first < 0xD800 || first > 0xDBFF || position + 1 === size || (second = charCodeAt(S, position + 1)) < 0xDC00 || second > 0xDFFF ? CONVERT_TO_STRING ? charAt(S, position) : first : CONVERT_TO_STRING ? stringSlice(S, position, position + 2) : (first - 0xD800 << 10) + (second - 0xDC00) + 0x10000; }; }; module.exports = { // `String.prototype.codePointAt` method // https://tc39.es/ecma262/#sec-string.prototype.codepointat codeAt: createMethod(false), // `String.prototype.at` method // https://github.com/mathiasbynens/String.prototype.at charAt: createMethod(true) }; /***/ }), /***/ 8415: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var global = __webpack_require__(7854); var toIntegerOrInfinity = __webpack_require__(9303); var toString = __webpack_require__(1340); var requireObjectCoercible = __webpack_require__(4488); var RangeError = global.RangeError; // `String.prototype.repeat` method implementation // https://tc39.es/ecma262/#sec-string.prototype.repeat module.exports = function repeat(count) { var str = toString(requireObjectCoercible(this)); var result = ''; var n = toIntegerOrInfinity(count); if (n < 0 || n == Infinity) throw RangeError('Wrong number of repetitions'); for (;n > 0; (n >>>= 1) && (str += str)) if (n & 1) result += str; return result; }; /***/ }), /***/ 6091: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var PROPER_FUNCTION_NAME = (__webpack_require__(6530).PROPER); var fails = __webpack_require__(7293); var whitespaces = __webpack_require__(1361); var non = '\u200B\u0085\u180E'; // check that a method works with the correct list // of whitespaces and has a correct name module.exports = function (METHOD_NAME) { return fails(function () { return !!whitespaces[METHOD_NAME]() || non[METHOD_NAME]() !== non || (PROPER_FUNCTION_NAME && whitespaces[METHOD_NAME].name !== METHOD_NAME); }); }; /***/ }), /***/ 3111: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var uncurryThis = __webpack_require__(1702); var requireObjectCoercible = __webpack_require__(4488); var toString = __webpack_require__(1340); var whitespaces = __webpack_require__(1361); var replace = uncurryThis(''.replace); var whitespace = '[' + whitespaces + ']'; var ltrim = RegExp('^' + whitespace + whitespace + '*'); var rtrim = RegExp(whitespace + whitespace + '*$'); // `String.prototype.{ trim, trimStart, trimEnd, trimLeft, trimRight }` methods implementation var createMethod = function (TYPE) { return function ($this) { var string = toString(requireObjectCoercible($this)); if (TYPE & 1) string = replace(string, ltrim, ''); if (TYPE & 2) string = replace(string, rtrim, ''); return string; }; }; module.exports = { // `String.prototype.{ trimLeft, trimStart }` methods // https://tc39.es/ecma262/#sec-string.prototype.trimstart start: createMethod(1), // `String.prototype.{ trimRight, trimEnd }` methods // https://tc39.es/ecma262/#sec-string.prototype.trimend end: createMethod(2), // `String.prototype.trim` method // https://tc39.es/ecma262/#sec-string.prototype.trim trim: createMethod(3) }; /***/ }), /***/ 261: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var global = __webpack_require__(7854); var apply = __webpack_require__(2104); var bind = __webpack_require__(9974); var isCallable = __webpack_require__(614); var hasOwn = __webpack_require__(2597); var fails = __webpack_require__(7293); var html = __webpack_require__(490); var arraySlice = __webpack_require__(206); var createElement = __webpack_require__(317); var IS_IOS = __webpack_require__(6833); var IS_NODE = __webpack_require__(5268); var set = global.setImmediate; var clear = global.clearImmediate; var process = global.process; var Dispatch = global.Dispatch; var Function = global.Function; var MessageChannel = global.MessageChannel; var String = global.String; var counter = 0; var queue = {}; var ONREADYSTATECHANGE = 'onreadystatechange'; var location, defer, channel, port; try { // Deno throws a ReferenceError on `location` access without `--location` flag location = global.location; } catch (error) { /* empty */ } var run = function (id) { if (hasOwn(queue, id)) { var fn = queue[id]; delete queue[id]; fn(); } }; var runner = function (id) { return function () { run(id); }; }; var listener = function (event) { run(event.data); }; var post = function (id) { // old engines have not location.origin global.postMessage(String(id), location.protocol + '//' + location.host); }; // Node.js 0.9+ & IE10+ has setImmediate, otherwise: if (!set || !clear) { set = function setImmediate(fn) { var args = arraySlice(arguments, 1); queue[++counter] = function () { apply(isCallable(fn) ? fn : Function(fn), undefined, args); }; defer(counter); return counter; }; clear = function clearImmediate(id) { delete queue[id]; }; // Node.js 0.8- if (IS_NODE) { defer = function (id) { process.nextTick(runner(id)); }; // Sphere (JS game engine) Dispatch API } else if (Dispatch && Dispatch.now) { defer = function (id) { Dispatch.now(runner(id)); }; // Browsers with MessageChannel, includes WebWorkers // except iOS - https://github.com/zloirock/core-js/issues/624 } else if (MessageChannel && !IS_IOS) { channel = new MessageChannel(); port = channel.port2; channel.port1.onmessage = listener; defer = bind(port.postMessage, port); // Browsers with postMessage, skip WebWorkers // IE8 has postMessage, but it's sync & typeof its postMessage is 'object' } else if ( global.addEventListener && isCallable(global.postMessage) && !global.importScripts && location && location.protocol !== 'file:' && !fails(post) ) { defer = post; global.addEventListener('message', listener, false); // IE8- } else if (ONREADYSTATECHANGE in createElement('script')) { defer = function (id) { html.appendChild(createElement('script'))[ONREADYSTATECHANGE] = function () { html.removeChild(this); run(id); }; }; // Rest old browsers } else { defer = function (id) { setTimeout(runner(id), 0); }; } } module.exports = { set: set, clear: clear }; /***/ }), /***/ 863: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var uncurryThis = __webpack_require__(1702); // `thisNumberValue` abstract operation // https://tc39.es/ecma262/#sec-thisnumbervalue module.exports = uncurryThis(1.0.valueOf); /***/ }), /***/ 1400: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var toIntegerOrInfinity = __webpack_require__(9303); var max = Math.max; var min = Math.min; // Helper for a popular repeating case of the spec: // Let integer be ? ToInteger(index). // If integer < 0, let result be max((length + integer), 0); else let result be min(integer, length). module.exports = function (index, length) { var integer = toIntegerOrInfinity(index); return integer < 0 ? max(integer + length, 0) : min(integer, length); }; /***/ }), /***/ 7067: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var global = __webpack_require__(7854); var toIntegerOrInfinity = __webpack_require__(9303); var toLength = __webpack_require__(7466); var RangeError = global.RangeError; // `ToIndex` abstract operation // https://tc39.es/ecma262/#sec-toindex module.exports = function (it) { if (it === undefined) return 0; var number = toIntegerOrInfinity(it); var length = toLength(number); if (number !== length) throw RangeError('Wrong length or index'); return length; }; /***/ }), /***/ 5656: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { // toObject with fallback for non-array-like ES3 strings var IndexedObject = __webpack_require__(8361); var requireObjectCoercible = __webpack_require__(4488); module.exports = function (it) { return IndexedObject(requireObjectCoercible(it)); }; /***/ }), /***/ 9303: /***/ (function(module) { var ceil = Math.ceil; var floor = Math.floor; // `ToIntegerOrInfinity` abstract operation // https://tc39.es/ecma262/#sec-tointegerorinfinity module.exports = function (argument) { var number = +argument; // eslint-disable-next-line no-self-compare -- safe return number !== number || number === 0 ? 0 : (number > 0 ? floor : ceil)(number); }; /***/ }), /***/ 7466: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var toIntegerOrInfinity = __webpack_require__(9303); var min = Math.min; // `ToLength` abstract operation // https://tc39.es/ecma262/#sec-tolength module.exports = function (argument) { return argument > 0 ? min(toIntegerOrInfinity(argument), 0x1FFFFFFFFFFFFF) : 0; // 2 ** 53 - 1 == 9007199254740991 }; /***/ }), /***/ 7908: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var global = __webpack_require__(7854); var requireObjectCoercible = __webpack_require__(4488); var Object = global.Object; // `ToObject` abstract operation // https://tc39.es/ecma262/#sec-toobject module.exports = function (argument) { return Object(requireObjectCoercible(argument)); }; /***/ }), /***/ 4590: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var global = __webpack_require__(7854); var toPositiveInteger = __webpack_require__(3002); var RangeError = global.RangeError; module.exports = function (it, BYTES) { var offset = toPositiveInteger(it); if (offset % BYTES) throw RangeError('Wrong offset'); return offset; }; /***/ }), /***/ 3002: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var global = __webpack_require__(7854); var toIntegerOrInfinity = __webpack_require__(9303); var RangeError = global.RangeError; module.exports = function (it) { var result = toIntegerOrInfinity(it); if (result < 0) throw RangeError("The argument can't be less than 0"); return result; }; /***/ }), /***/ 7593: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var global = __webpack_require__(7854); var call = __webpack_require__(6916); var isObject = __webpack_require__(111); var isSymbol = __webpack_require__(2190); var getMethod = __webpack_require__(8173); var ordinaryToPrimitive = __webpack_require__(2140); var wellKnownSymbol = __webpack_require__(5112); var TypeError = global.TypeError; var TO_PRIMITIVE = wellKnownSymbol('toPrimitive'); // `ToPrimitive` abstract operation // https://tc39.es/ecma262/#sec-toprimitive module.exports = function (input, pref) { if (!isObject(input) || isSymbol(input)) return input; var exoticToPrim = getMethod(input, TO_PRIMITIVE); var result; if (exoticToPrim) { if (pref === undefined) pref = 'default'; result = call(exoticToPrim, input, pref); if (!isObject(result) || isSymbol(result)) return result; throw TypeError("Can't convert object to primitive value"); } if (pref === undefined) pref = 'number'; return ordinaryToPrimitive(input, pref); }; /***/ }), /***/ 4948: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var toPrimitive = __webpack_require__(7593); var isSymbol = __webpack_require__(2190); // `ToPropertyKey` abstract operation // https://tc39.es/ecma262/#sec-topropertykey module.exports = function (argument) { var key = toPrimitive(argument, 'string'); return isSymbol(key) ? key : key + ''; }; /***/ }), /***/ 1694: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var wellKnownSymbol = __webpack_require__(5112); var TO_STRING_TAG = wellKnownSymbol('toStringTag'); var test = {}; test[TO_STRING_TAG] = 'z'; module.exports = String(test) === '[object z]'; /***/ }), /***/ 1340: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var global = __webpack_require__(7854); var classof = __webpack_require__(648); var String = global.String; module.exports = function (argument) { if (classof(argument) === 'Symbol') throw TypeError('Cannot convert a Symbol value to a string'); return String(argument); }; /***/ }), /***/ 6330: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var global = __webpack_require__(7854); var String = global.String; module.exports = function (argument) { try { return String(argument); } catch (error) { return 'Object'; } }; /***/ }), /***/ 9843: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var $ = __webpack_require__(2109); var global = __webpack_require__(7854); var call = __webpack_require__(6916); var DESCRIPTORS = __webpack_require__(9781); var TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS = __webpack_require__(3832); var ArrayBufferViewCore = __webpack_require__(2094); var ArrayBufferModule = __webpack_require__(2091); var anInstance = __webpack_require__(5787); var createPropertyDescriptor = __webpack_require__(9114); var createNonEnumerableProperty = __webpack_require__(8880); var isIntegralNumber = __webpack_require__(5988); var toLength = __webpack_require__(7466); var toIndex = __webpack_require__(7067); var toOffset = __webpack_require__(4590); var toPropertyKey = __webpack_require__(4948); var hasOwn = __webpack_require__(2597); var classof = __webpack_require__(648); var isObject = __webpack_require__(111); var isSymbol = __webpack_require__(2190); var create = __webpack_require__(30); var isPrototypeOf = __webpack_require__(7976); var setPrototypeOf = __webpack_require__(7674); var getOwnPropertyNames = (__webpack_require__(8006).f); var typedArrayFrom = __webpack_require__(7321); var forEach = (__webpack_require__(2092).forEach); var setSpecies = __webpack_require__(6340); var definePropertyModule = __webpack_require__(3070); var getOwnPropertyDescriptorModule = __webpack_require__(1236); var InternalStateModule = __webpack_require__(9909); var inheritIfRequired = __webpack_require__(9587); var getInternalState = InternalStateModule.get; var setInternalState = InternalStateModule.set; var nativeDefineProperty = definePropertyModule.f; var nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f; var round = Math.round; var RangeError = global.RangeError; var ArrayBuffer = ArrayBufferModule.ArrayBuffer; var ArrayBufferPrototype = ArrayBuffer.prototype; var DataView = ArrayBufferModule.DataView; var NATIVE_ARRAY_BUFFER_VIEWS = ArrayBufferViewCore.NATIVE_ARRAY_BUFFER_VIEWS; var TYPED_ARRAY_CONSTRUCTOR = ArrayBufferViewCore.TYPED_ARRAY_CONSTRUCTOR; var TYPED_ARRAY_TAG = ArrayBufferViewCore.TYPED_ARRAY_TAG; var TypedArray = ArrayBufferViewCore.TypedArray; var TypedArrayPrototype = ArrayBufferViewCore.TypedArrayPrototype; var aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor; var isTypedArray = ArrayBufferViewCore.isTypedArray; var BYTES_PER_ELEMENT = 'BYTES_PER_ELEMENT'; var WRONG_LENGTH = 'Wrong length'; var fromList = function (C, list) { aTypedArrayConstructor(C); var index = 0; var length = list.length; var result = new C(length); while (length > index) result[index] = list[index++]; return result; }; var addGetter = function (it, key) { nativeDefineProperty(it, key, { get: function () { return getInternalState(this)[key]; } }); }; var isArrayBuffer = function (it) { var klass; return isPrototypeOf(ArrayBufferPrototype, it) || (klass = classof(it)) == 'ArrayBuffer' || klass == 'SharedArrayBuffer'; }; var isTypedArrayIndex = function (target, key) { return isTypedArray(target) && !isSymbol(key) && key in target && isIntegralNumber(+key) && key >= 0; }; var wrappedGetOwnPropertyDescriptor = function getOwnPropertyDescriptor(target, key) { key = toPropertyKey(key); return isTypedArrayIndex(target, key) ? createPropertyDescriptor(2, target[key]) : nativeGetOwnPropertyDescriptor(target, key); }; var wrappedDefineProperty = function defineProperty(target, key, descriptor) { key = toPropertyKey(key); if (isTypedArrayIndex(target, key) && isObject(descriptor) && hasOwn(descriptor, 'value') && !hasOwn(descriptor, 'get') && !hasOwn(descriptor, 'set') // TODO: add validation descriptor w/o calling accessors && !descriptor.configurable && (!hasOwn(descriptor, 'writable') || descriptor.writable) && (!hasOwn(descriptor, 'enumerable') || descriptor.enumerable) ) { target[key] = descriptor.value; return target; } return nativeDefineProperty(target, key, descriptor); }; if (DESCRIPTORS) { if (!NATIVE_ARRAY_BUFFER_VIEWS) { getOwnPropertyDescriptorModule.f = wrappedGetOwnPropertyDescriptor; definePropertyModule.f = wrappedDefineProperty; addGetter(TypedArrayPrototype, 'buffer'); addGetter(TypedArrayPrototype, 'byteOffset'); addGetter(TypedArrayPrototype, 'byteLength'); addGetter(TypedArrayPrototype, 'length'); } $({ target: 'Object', stat: true, forced: !NATIVE_ARRAY_BUFFER_VIEWS }, { getOwnPropertyDescriptor: wrappedGetOwnPropertyDescriptor, defineProperty: wrappedDefineProperty }); module.exports = function (TYPE, wrapper, CLAMPED) { var BYTES = TYPE.match(/\d+$/)[0] / 8; var CONSTRUCTOR_NAME = TYPE + (CLAMPED ? 'Clamped' : '') + 'Array'; var GETTER = 'get' + TYPE; var SETTER = 'set' + TYPE; var NativeTypedArrayConstructor = global[CONSTRUCTOR_NAME]; var TypedArrayConstructor = NativeTypedArrayConstructor; var TypedArrayConstructorPrototype = TypedArrayConstructor && TypedArrayConstructor.prototype; var exported = {}; var getter = function (that, index) { var data = getInternalState(that); return data.view[GETTER](index * BYTES + data.byteOffset, true); }; var setter = function (that, index, value) { var data = getInternalState(that); if (CLAMPED) value = (value = round(value)) < 0 ? 0 : value > 0xFF ? 0xFF : value & 0xFF; data.view[SETTER](index * BYTES + data.byteOffset, value, true); }; var addElement = function (that, index) { nativeDefineProperty(that, index, { get: function () { return getter(this, index); }, set: function (value) { return setter(this, index, value); }, enumerable: true }); }; if (!NATIVE_ARRAY_BUFFER_VIEWS) { TypedArrayConstructor = wrapper(function (that, data, offset, $length) { anInstance(that, TypedArrayConstructorPrototype); var index = 0; var byteOffset = 0; var buffer, byteLength, length; if (!isObject(data)) { length = toIndex(data); byteLength = length * BYTES; buffer = new ArrayBuffer(byteLength); } else if (isArrayBuffer(data)) { buffer = data; byteOffset = toOffset(offset, BYTES); var $len = data.byteLength; if ($length === undefined) { if ($len % BYTES) throw RangeError(WRONG_LENGTH); byteLength = $len - byteOffset; if (byteLength < 0) throw RangeError(WRONG_LENGTH); } else { byteLength = toLength($length) * BYTES; if (byteLength + byteOffset > $len) throw RangeError(WRONG_LENGTH); } length = byteLength / BYTES; } else if (isTypedArray(data)) { return fromList(TypedArrayConstructor, data); } else { return call(typedArrayFrom, TypedArrayConstructor, data); } setInternalState(that, { buffer: buffer, byteOffset: byteOffset, byteLength: byteLength, length: length, view: new DataView(buffer) }); while (index < length) addElement(that, index++); }); if (setPrototypeOf) setPrototypeOf(TypedArrayConstructor, TypedArray); TypedArrayConstructorPrototype = TypedArrayConstructor.prototype = create(TypedArrayPrototype); } else if (TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS) { TypedArrayConstructor = wrapper(function (dummy, data, typedArrayOffset, $length) { anInstance(dummy, TypedArrayConstructorPrototype); return inheritIfRequired(function () { if (!isObject(data)) return new NativeTypedArrayConstructor(toIndex(data)); if (isArrayBuffer(data)) return $length !== undefined ? new NativeTypedArrayConstructor(data, toOffset(typedArrayOffset, BYTES), $length) : typedArrayOffset !== undefined ? new NativeTypedArrayConstructor(data, toOffset(typedArrayOffset, BYTES)) : new NativeTypedArrayConstructor(data); if (isTypedArray(data)) return fromList(TypedArrayConstructor, data); return call(typedArrayFrom, TypedArrayConstructor, data); }(), dummy, TypedArrayConstructor); }); if (setPrototypeOf) setPrototypeOf(TypedArrayConstructor, TypedArray); forEach(getOwnPropertyNames(NativeTypedArrayConstructor), function (key) { if (!(key in TypedArrayConstructor)) { createNonEnumerableProperty(TypedArrayConstructor, key, NativeTypedArrayConstructor[key]); } }); TypedArrayConstructor.prototype = TypedArrayConstructorPrototype; } if (TypedArrayConstructorPrototype.constructor !== TypedArrayConstructor) { createNonEnumerableProperty(TypedArrayConstructorPrototype, 'constructor', TypedArrayConstructor); } createNonEnumerableProperty(TypedArrayConstructorPrototype, TYPED_ARRAY_CONSTRUCTOR, TypedArrayConstructor); if (TYPED_ARRAY_TAG) { createNonEnumerableProperty(TypedArrayConstructorPrototype, TYPED_ARRAY_TAG, CONSTRUCTOR_NAME); } exported[CONSTRUCTOR_NAME] = TypedArrayConstructor; $({ global: true, forced: TypedArrayConstructor != NativeTypedArrayConstructor, sham: !NATIVE_ARRAY_BUFFER_VIEWS }, exported); if (!(BYTES_PER_ELEMENT in TypedArrayConstructor)) { createNonEnumerableProperty(TypedArrayConstructor, BYTES_PER_ELEMENT, BYTES); } if (!(BYTES_PER_ELEMENT in TypedArrayConstructorPrototype)) { createNonEnumerableProperty(TypedArrayConstructorPrototype, BYTES_PER_ELEMENT, BYTES); } setSpecies(CONSTRUCTOR_NAME); }; } else module.exports = function () { /* empty */ }; /***/ }), /***/ 3832: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { /* eslint-disable no-new -- required for testing */ var global = __webpack_require__(7854); var fails = __webpack_require__(7293); var checkCorrectnessOfIteration = __webpack_require__(7072); var NATIVE_ARRAY_BUFFER_VIEWS = (__webpack_require__(2094).NATIVE_ARRAY_BUFFER_VIEWS); var ArrayBuffer = global.ArrayBuffer; var Int8Array = global.Int8Array; module.exports = !NATIVE_ARRAY_BUFFER_VIEWS || !fails(function () { Int8Array(1); }) || !fails(function () { new Int8Array(-1); }) || !checkCorrectnessOfIteration(function (iterable) { new Int8Array(); new Int8Array(null); new Int8Array(1.5); new Int8Array(iterable); }, true) || fails(function () { // Safari (11+) bug - a reason why even Safari 13 should load a typed array polyfill return new Int8Array(new ArrayBuffer(2), 1, undefined).length !== 1; }); /***/ }), /***/ 3074: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var arrayFromConstructorAndList = __webpack_require__(7745); var typedArraySpeciesConstructor = __webpack_require__(6304); module.exports = function (instance, list) { return arrayFromConstructorAndList(typedArraySpeciesConstructor(instance), list); }; /***/ }), /***/ 7321: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var bind = __webpack_require__(9974); var call = __webpack_require__(6916); var aConstructor = __webpack_require__(9483); var toObject = __webpack_require__(7908); var lengthOfArrayLike = __webpack_require__(6244); var getIterator = __webpack_require__(8554); var getIteratorMethod = __webpack_require__(1246); var isArrayIteratorMethod = __webpack_require__(7659); var aTypedArrayConstructor = (__webpack_require__(2094).aTypedArrayConstructor); module.exports = function from(source /* , mapfn, thisArg */) { var C = aConstructor(this); var O = toObject(source); var argumentsLength = arguments.length; var mapfn = argumentsLength > 1 ? arguments[1] : undefined; var mapping = mapfn !== undefined; var iteratorMethod = getIteratorMethod(O); var i, length, result, step, iterator, next; if (iteratorMethod && !isArrayIteratorMethod(iteratorMethod)) { iterator = getIterator(O, iteratorMethod); next = iterator.next; O = []; while (!(step = call(next, iterator)).done) { O.push(step.value); } } if (mapping && argumentsLength > 2) { mapfn = bind(mapfn, arguments[2]); } length = lengthOfArrayLike(O); result = new (aTypedArrayConstructor(C))(length); for (i = 0; length > i; i++) { result[i] = mapping ? mapfn(O[i], i) : O[i]; } return result; }; /***/ }), /***/ 6304: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var ArrayBufferViewCore = __webpack_require__(2094); var speciesConstructor = __webpack_require__(6707); var TYPED_ARRAY_CONSTRUCTOR = ArrayBufferViewCore.TYPED_ARRAY_CONSTRUCTOR; var aTypedArrayConstructor = ArrayBufferViewCore.aTypedArrayConstructor; // a part of `TypedArraySpeciesCreate` abstract operation // https://tc39.es/ecma262/#typedarray-species-create module.exports = function (originalArray) { return aTypedArrayConstructor(speciesConstructor(originalArray, originalArray[TYPED_ARRAY_CONSTRUCTOR])); }; /***/ }), /***/ 9711: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var uncurryThis = __webpack_require__(1702); var id = 0; var postfix = Math.random(); var toString = uncurryThis(1.0.toString); module.exports = function (key) { return 'Symbol(' + (key === undefined ? '' : key) + ')_' + toString(++id + postfix, 36); }; /***/ }), /***/ 3307: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { /* eslint-disable es/no-symbol -- required for testing */ var NATIVE_SYMBOL = __webpack_require__(133); module.exports = NATIVE_SYMBOL && !Symbol.sham && typeof Symbol.iterator == 'symbol'; /***/ }), /***/ 6061: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { var wellKnownSymbol = __webpack_require__(5112); exports.f = wellKnownSymbol; /***/ }), /***/ 5112: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var global = __webpack_require__(7854); var shared = __webpack_require__(2309); var hasOwn = __webpack_require__(2597); var uid = __webpack_require__(9711); var NATIVE_SYMBOL = __webpack_require__(133); var USE_SYMBOL_AS_UID = __webpack_require__(3307); var WellKnownSymbolsStore = shared('wks'); var Symbol = global.Symbol; var symbolFor = Symbol && Symbol['for']; var createWellKnownSymbol = USE_SYMBOL_AS_UID ? Symbol : Symbol && Symbol.withoutSetter || uid; module.exports = function (name) { if (!hasOwn(WellKnownSymbolsStore, name) || !(NATIVE_SYMBOL || typeof WellKnownSymbolsStore[name] == 'string')) { var description = 'Symbol.' + name; if (NATIVE_SYMBOL && hasOwn(Symbol, name)) { WellKnownSymbolsStore[name] = Symbol[name]; } else if (USE_SYMBOL_AS_UID && symbolFor) { WellKnownSymbolsStore[name] = symbolFor(description); } else { WellKnownSymbolsStore[name] = createWellKnownSymbol(description); } } return WellKnownSymbolsStore[name]; }; /***/ }), /***/ 1361: /***/ (function(module) { // a string of all valid unicode whitespaces module.exports = '\u0009\u000A\u000B\u000C\u000D\u0020\u00A0\u1680\u2000\u2001\u2002' + '\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200A\u202F\u205F\u3000\u2028\u2029\uFEFF'; /***/ }), /***/ 9170: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { "use strict"; var $ = __webpack_require__(2109); var global = __webpack_require__(7854); var isPrototypeOf = __webpack_require__(7976); var getPrototypeOf = __webpack_require__(9518); var setPrototypeOf = __webpack_require__(7674); var copyConstructorProperties = __webpack_require__(9920); var create = __webpack_require__(30); var createNonEnumerableProperty = __webpack_require__(8880); var createPropertyDescriptor = __webpack_require__(9114); var clearErrorStack = __webpack_require__(7741); var installErrorCause = __webpack_require__(8340); var iterate = __webpack_require__(408); var normalizeStringArgument = __webpack_require__(6277); var ERROR_STACK_INSTALLABLE = __webpack_require__(2914); var Error = global.Error; var push = [].push; var $AggregateError = function AggregateError(errors, message /* , options */) { var that = isPrototypeOf(AggregateErrorPrototype, this) ? this : create(AggregateErrorPrototype); var options = arguments.length > 2 ? arguments[2] : undefined; if (setPrototypeOf) { that = setPrototypeOf(new Error(undefined), getPrototypeOf(that)); } createNonEnumerableProperty(that, 'message', normalizeStringArgument(message, '')); if (ERROR_STACK_INSTALLABLE) createNonEnumerableProperty(that, 'stack', clearErrorStack(that.stack, 1)); installErrorCause(that, options); var errorsArray = []; iterate(errors, push, { that: errorsArray }); createNonEnumerableProperty(that, 'errors', errorsArray); return that; }; if (setPrototypeOf) setPrototypeOf($AggregateError, Error); else copyConstructorProperties($AggregateError, Error); var AggregateErrorPrototype = $AggregateError.prototype = create(Error.prototype, { constructor: createPropertyDescriptor(1, $AggregateError), message: createPropertyDescriptor(1, ''), name: createPropertyDescriptor(1, 'AggregateError') }); // `AggregateError` constructor // https://tc39.es/ecma262/#sec-aggregate-error-constructor $({ global: true }, { AggregateError: $AggregateError }); /***/ }), /***/ 2222: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { "use strict"; var $ = __webpack_require__(2109); var global = __webpack_require__(7854); var fails = __webpack_require__(7293); var isArray = __webpack_require__(3157); var isObject = __webpack_require__(111); var toObject = __webpack_require__(7908); var lengthOfArrayLike = __webpack_require__(6244); var createProperty = __webpack_require__(6135); var arraySpeciesCreate = __webpack_require__(5417); var arrayMethodHasSpeciesSupport = __webpack_require__(1194); var wellKnownSymbol = __webpack_require__(5112); var V8_VERSION = __webpack_require__(7392); var IS_CONCAT_SPREADABLE = wellKnownSymbol('isConcatSpreadable'); var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; var MAXIMUM_ALLOWED_INDEX_EXCEEDED = 'Maximum allowed index exceeded'; var TypeError = global.TypeError; // We can't use this feature detection in V8 since it causes // deoptimization and serious performance degradation // https://github.com/zloirock/core-js/issues/679 var IS_CONCAT_SPREADABLE_SUPPORT = V8_VERSION >= 51 || !fails(function () { var array = []; array[IS_CONCAT_SPREADABLE] = false; return array.concat()[0] !== array; }); var SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('concat'); var isConcatSpreadable = function (O) { if (!isObject(O)) return false; var spreadable = O[IS_CONCAT_SPREADABLE]; return spreadable !== undefined ? !!spreadable : isArray(O); }; var FORCED = !IS_CONCAT_SPREADABLE_SUPPORT || !SPECIES_SUPPORT; // `Array.prototype.concat` method // https://tc39.es/ecma262/#sec-array.prototype.concat // with adding support of @@isConcatSpreadable and @@species $({ target: 'Array', proto: true, forced: FORCED }, { // eslint-disable-next-line no-unused-vars -- required for `.length` concat: function concat(arg) { var O = toObject(this); var A = arraySpeciesCreate(O, 0); var n = 0; var i, k, length, len, E; for (i = -1, length = arguments.length; i < length; i++) { E = i === -1 ? O : arguments[i]; if (isConcatSpreadable(E)) { len = lengthOfArrayLike(E); if (n + len > MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED); for (k = 0; k < len; k++, n++) if (k in E) createProperty(A, n, E[k]); } else { if (n >= MAX_SAFE_INTEGER) throw TypeError(MAXIMUM_ALLOWED_INDEX_EXCEEDED); createProperty(A, n++, E); } } A.length = n; return A; } }); /***/ }), /***/ 545: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { var $ = __webpack_require__(2109); var copyWithin = __webpack_require__(1048); var addToUnscopables = __webpack_require__(1223); // `Array.prototype.copyWithin` method // https://tc39.es/ecma262/#sec-array.prototype.copywithin $({ target: 'Array', proto: true }, { copyWithin: copyWithin }); // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables addToUnscopables('copyWithin'); /***/ }), /***/ 3290: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { var $ = __webpack_require__(2109); var fill = __webpack_require__(1285); var addToUnscopables = __webpack_require__(1223); // `Array.prototype.fill` method // https://tc39.es/ecma262/#sec-array.prototype.fill $({ target: 'Array', proto: true }, { fill: fill }); // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables addToUnscopables('fill'); /***/ }), /***/ 7327: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { "use strict"; var $ = __webpack_require__(2109); var $filter = (__webpack_require__(2092).filter); var arrayMethodHasSpeciesSupport = __webpack_require__(1194); var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('filter'); // `Array.prototype.filter` method // https://tc39.es/ecma262/#sec-array.prototype.filter // with adding support of @@species $({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, { filter: function filter(callbackfn /* , thisArg */) { return $filter(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); } }); /***/ }), /***/ 1038: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { var $ = __webpack_require__(2109); var from = __webpack_require__(8457); var checkCorrectnessOfIteration = __webpack_require__(7072); var INCORRECT_ITERATION = !checkCorrectnessOfIteration(function (iterable) { // eslint-disable-next-line es/no-array-from -- required for testing Array.from(iterable); }); // `Array.from` method // https://tc39.es/ecma262/#sec-array.from $({ target: 'Array', stat: true, forced: INCORRECT_ITERATION }, { from: from }); /***/ }), /***/ 6699: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { "use strict"; var $ = __webpack_require__(2109); var $includes = (__webpack_require__(1318).includes); var addToUnscopables = __webpack_require__(1223); // `Array.prototype.includes` method // https://tc39.es/ecma262/#sec-array.prototype.includes $({ target: 'Array', proto: true }, { includes: function includes(el /* , fromIndex = 0 */) { return $includes(this, el, arguments.length > 1 ? arguments[1] : undefined); } }); // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables addToUnscopables('includes'); /***/ }), /***/ 6992: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var toIndexedObject = __webpack_require__(5656); var addToUnscopables = __webpack_require__(1223); var Iterators = __webpack_require__(7497); var InternalStateModule = __webpack_require__(9909); var defineIterator = __webpack_require__(654); var ARRAY_ITERATOR = 'Array Iterator'; var setInternalState = InternalStateModule.set; var getInternalState = InternalStateModule.getterFor(ARRAY_ITERATOR); // `Array.prototype.entries` method // https://tc39.es/ecma262/#sec-array.prototype.entries // `Array.prototype.keys` method // https://tc39.es/ecma262/#sec-array.prototype.keys // `Array.prototype.values` method // https://tc39.es/ecma262/#sec-array.prototype.values // `Array.prototype[@@iterator]` method // https://tc39.es/ecma262/#sec-array.prototype-@@iterator // `CreateArrayIterator` internal method // https://tc39.es/ecma262/#sec-createarrayiterator module.exports = defineIterator(Array, 'Array', function (iterated, kind) { setInternalState(this, { type: ARRAY_ITERATOR, target: toIndexedObject(iterated), // target index: 0, // next index kind: kind // kind }); // `%ArrayIteratorPrototype%.next` method // https://tc39.es/ecma262/#sec-%arrayiteratorprototype%.next }, function () { var state = getInternalState(this); var target = state.target; var kind = state.kind; var index = state.index++; if (!target || index >= target.length) { state.target = undefined; return { value: undefined, done: true }; } if (kind == 'keys') return { value: index, done: false }; if (kind == 'values') return { value: target[index], done: false }; return { value: [index, target[index]], done: false }; }, 'values'); // argumentsList[@@iterator] is %ArrayProto_values% // https://tc39.es/ecma262/#sec-createunmappedargumentsobject // https://tc39.es/ecma262/#sec-createmappedargumentsobject Iterators.Arguments = Iterators.Array; // https://tc39.es/ecma262/#sec-array.prototype-@@unscopables addToUnscopables('keys'); addToUnscopables('values'); addToUnscopables('entries'); /***/ }), /***/ 9600: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { "use strict"; var $ = __webpack_require__(2109); var uncurryThis = __webpack_require__(1702); var IndexedObject = __webpack_require__(8361); var toIndexedObject = __webpack_require__(5656); var arrayMethodIsStrict = __webpack_require__(9341); var un$Join = uncurryThis([].join); var ES3_STRINGS = IndexedObject != Object; var STRICT_METHOD = arrayMethodIsStrict('join', ','); // `Array.prototype.join` method // https://tc39.es/ecma262/#sec-array.prototype.join $({ target: 'Array', proto: true, forced: ES3_STRINGS || !STRICT_METHOD }, { join: function join(separator) { return un$Join(toIndexedObject(this), separator === undefined ? ',' : separator); } }); /***/ }), /***/ 1249: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { "use strict"; var $ = __webpack_require__(2109); var $map = (__webpack_require__(2092).map); var arrayMethodHasSpeciesSupport = __webpack_require__(1194); var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('map'); // `Array.prototype.map` method // https://tc39.es/ecma262/#sec-array.prototype.map // with adding support of @@species $({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, { map: function map(callbackfn /* , thisArg */) { return $map(this, callbackfn, arguments.length > 1 ? arguments[1] : undefined); } }); /***/ }), /***/ 7042: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { "use strict"; var $ = __webpack_require__(2109); var global = __webpack_require__(7854); var isArray = __webpack_require__(3157); var isConstructor = __webpack_require__(4411); var isObject = __webpack_require__(111); var toAbsoluteIndex = __webpack_require__(1400); var lengthOfArrayLike = __webpack_require__(6244); var toIndexedObject = __webpack_require__(5656); var createProperty = __webpack_require__(6135); var wellKnownSymbol = __webpack_require__(5112); var arrayMethodHasSpeciesSupport = __webpack_require__(1194); var un$Slice = __webpack_require__(206); var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('slice'); var SPECIES = wellKnownSymbol('species'); var Array = global.Array; var max = Math.max; // `Array.prototype.slice` method // https://tc39.es/ecma262/#sec-array.prototype.slice // fallback for not array-like ES3 strings and DOM objects $({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, { slice: function slice(start, end) { var O = toIndexedObject(this); var length = lengthOfArrayLike(O); var k = toAbsoluteIndex(start, length); var fin = toAbsoluteIndex(end === undefined ? length : end, length); // inline `ArraySpeciesCreate` for usage native `Array#slice` where it's possible var Constructor, result, n; if (isArray(O)) { Constructor = O.constructor; // cross-realm fallback if (isConstructor(Constructor) && (Constructor === Array || isArray(Constructor.prototype))) { Constructor = undefined; } else if (isObject(Constructor)) { Constructor = Constructor[SPECIES]; if (Constructor === null) Constructor = undefined; } if (Constructor === Array || Constructor === undefined) { return un$Slice(O, k, fin); } } result = new (Constructor === undefined ? Array : Constructor)(max(fin - k, 0)); for (n = 0; k < fin; k++, n++) if (k in O) createProperty(result, n, O[k]); result.length = n; return result; } }); /***/ }), /***/ 2707: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { "use strict"; var $ = __webpack_require__(2109); var uncurryThis = __webpack_require__(1702); var aCallable = __webpack_require__(9662); var toObject = __webpack_require__(7908); var lengthOfArrayLike = __webpack_require__(6244); var toString = __webpack_require__(1340); var fails = __webpack_require__(7293); var internalSort = __webpack_require__(4362); var arrayMethodIsStrict = __webpack_require__(9341); var FF = __webpack_require__(8886); var IE_OR_EDGE = __webpack_require__(256); var V8 = __webpack_require__(7392); var WEBKIT = __webpack_require__(8008); var test = []; var un$Sort = uncurryThis(test.sort); var push = uncurryThis(test.push); // IE8- var FAILS_ON_UNDEFINED = fails(function () { test.sort(undefined); }); // V8 bug var FAILS_ON_NULL = fails(function () { test.sort(null); }); // Old WebKit var STRICT_METHOD = arrayMethodIsStrict('sort'); var STABLE_SORT = !fails(function () { // feature detection can be too slow, so check engines versions if (V8) return V8 < 70; if (FF && FF > 3) return; if (IE_OR_EDGE) return true; if (WEBKIT) return WEBKIT < 603; var result = ''; var code, chr, value, index; // generate an array with more 512 elements (Chakra and old V8 fails only in this case) for (code = 65; code < 76; code++) { chr = String.fromCharCode(code); switch (code) { case 66: case 69: case 70: case 72: value = 3; break; case 68: case 71: value = 4; break; default: value = 2; } for (index = 0; index < 47; index++) { test.push({ k: chr + index, v: value }); } } test.sort(function (a, b) { return b.v - a.v; }); for (index = 0; index < test.length; index++) { chr = test[index].k.charAt(0); if (result.charAt(result.length - 1) !== chr) result += chr; } return result !== 'DGBEFHACIJK'; }); var FORCED = FAILS_ON_UNDEFINED || !FAILS_ON_NULL || !STRICT_METHOD || !STABLE_SORT; var getSortCompare = function (comparefn) { return function (x, y) { if (y === undefined) return -1; if (x === undefined) return 1; if (comparefn !== undefined) return +comparefn(x, y) || 0; return toString(x) > toString(y) ? 1 : -1; }; }; // `Array.prototype.sort` method // https://tc39.es/ecma262/#sec-array.prototype.sort $({ target: 'Array', proto: true, forced: FORCED }, { sort: function sort(comparefn) { if (comparefn !== undefined) aCallable(comparefn); var array = toObject(this); if (STABLE_SORT) return comparefn === undefined ? un$Sort(array) : un$Sort(array, comparefn); var items = []; var arrayLength = lengthOfArrayLike(array); var itemsLength, index; for (index = 0; index < arrayLength; index++) { if (index in array) push(items, array[index]); } internalSort(items, getSortCompare(comparefn)); itemsLength = items.length; index = 0; while (index < itemsLength) array[index] = items[index++]; while (index < arrayLength) delete array[index++]; return array; } }); /***/ }), /***/ 561: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { "use strict"; var $ = __webpack_require__(2109); var global = __webpack_require__(7854); var toAbsoluteIndex = __webpack_require__(1400); var toIntegerOrInfinity = __webpack_require__(9303); var lengthOfArrayLike = __webpack_require__(6244); var toObject = __webpack_require__(7908); var arraySpeciesCreate = __webpack_require__(5417); var createProperty = __webpack_require__(6135); var arrayMethodHasSpeciesSupport = __webpack_require__(1194); var HAS_SPECIES_SUPPORT = arrayMethodHasSpeciesSupport('splice'); var TypeError = global.TypeError; var max = Math.max; var min = Math.min; var MAX_SAFE_INTEGER = 0x1FFFFFFFFFFFFF; var MAXIMUM_ALLOWED_LENGTH_EXCEEDED = 'Maximum allowed length exceeded'; // `Array.prototype.splice` method // https://tc39.es/ecma262/#sec-array.prototype.splice // with adding support of @@species $({ target: 'Array', proto: true, forced: !HAS_SPECIES_SUPPORT }, { splice: function splice(start, deleteCount /* , ...items */) { var O = toObject(this); var len = lengthOfArrayLike(O); var actualStart = toAbsoluteIndex(start, len); var argumentsLength = arguments.length; var insertCount, actualDeleteCount, A, k, from, to; if (argumentsLength === 0) { insertCount = actualDeleteCount = 0; } else if (argumentsLength === 1) { insertCount = 0; actualDeleteCount = len - actualStart; } else { insertCount = argumentsLength - 2; actualDeleteCount = min(max(toIntegerOrInfinity(deleteCount), 0), len - actualStart); } if (len + insertCount - actualDeleteCount > MAX_SAFE_INTEGER) { throw TypeError(MAXIMUM_ALLOWED_LENGTH_EXCEEDED); } A = arraySpeciesCreate(O, actualDeleteCount); for (k = 0; k < actualDeleteCount; k++) { from = actualStart + k; if (from in O) createProperty(A, k, O[from]); } A.length = actualDeleteCount; if (insertCount < actualDeleteCount) { for (k = actualStart; k < len - actualDeleteCount; k++) { from = k + actualDeleteCount; to = k + insertCount; if (from in O) O[to] = O[from]; else delete O[to]; } for (k = len; k > len - actualDeleteCount + insertCount; k--) delete O[k - 1]; } else if (insertCount > actualDeleteCount) { for (k = len - actualDeleteCount; k > actualStart; k--) { from = k + actualDeleteCount - 1; to = k + insertCount - 1; if (from in O) O[to] = O[from]; else delete O[to]; } } for (k = 0; k < insertCount; k++) { O[k + actualStart] = arguments[k + 2]; } O.length = len - actualDeleteCount + insertCount; return A; } }); /***/ }), /***/ 6078: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { var hasOwn = __webpack_require__(2597); var redefine = __webpack_require__(1320); var dateToPrimitive = __webpack_require__(8709); var wellKnownSymbol = __webpack_require__(5112); var TO_PRIMITIVE = wellKnownSymbol('toPrimitive'); var DatePrototype = Date.prototype; // `Date.prototype[@@toPrimitive]` method // https://tc39.es/ecma262/#sec-date.prototype-@@toprimitive if (!hasOwn(DatePrototype, TO_PRIMITIVE)) { redefine(DatePrototype, TO_PRIMITIVE, dateToPrimitive); } /***/ }), /***/ 8309: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { var DESCRIPTORS = __webpack_require__(9781); var FUNCTION_NAME_EXISTS = (__webpack_require__(6530).EXISTS); var uncurryThis = __webpack_require__(1702); var defineProperty = (__webpack_require__(3070).f); var FunctionPrototype = Function.prototype; var functionToString = uncurryThis(FunctionPrototype.toString); var nameRE = /^\s*function ([^ (]*)/; var regExpExec = uncurryThis(nameRE.exec); var NAME = 'name'; // Function instances `.name` property // https://tc39.es/ecma262/#sec-function-instances-name if (DESCRIPTORS && !FUNCTION_NAME_EXISTS) { defineProperty(FunctionPrototype, NAME, { configurable: true, get: function () { try { return regExpExec(nameRE, functionToString(this))[1]; } catch (error) { return ''; } } }); } /***/ }), /***/ 5837: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { var $ = __webpack_require__(2109); var global = __webpack_require__(7854); // `globalThis` object // https://tc39.es/ecma262/#sec-globalthis $({ global: true }, { globalThis: global }); /***/ }), /***/ 1532: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { "use strict"; var collection = __webpack_require__(7710); var collectionStrong = __webpack_require__(5631); // `Map` constructor // https://tc39.es/ecma262/#sec-map-objects collection('Map', function (init) { return function Map() { return init(this, arguments.length ? arguments[0] : undefined); }; }, collectionStrong); /***/ }), /***/ 4256: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { var $ = __webpack_require__(2109); var log = Math.log; var LN2 = Math.LN2; // `Math.log2` method // https://tc39.es/ecma262/#sec-math.log2 $({ target: 'Math', stat: true }, { log2: function log2(x) { return log(x) / LN2; } }); /***/ }), /***/ 9653: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { "use strict"; var DESCRIPTORS = __webpack_require__(9781); var global = __webpack_require__(7854); var uncurryThis = __webpack_require__(1702); var isForced = __webpack_require__(4705); var redefine = __webpack_require__(1320); var hasOwn = __webpack_require__(2597); var inheritIfRequired = __webpack_require__(9587); var isPrototypeOf = __webpack_require__(7976); var isSymbol = __webpack_require__(2190); var toPrimitive = __webpack_require__(7593); var fails = __webpack_require__(7293); var getOwnPropertyNames = (__webpack_require__(8006).f); var getOwnPropertyDescriptor = (__webpack_require__(1236).f); var defineProperty = (__webpack_require__(3070).f); var thisNumberValue = __webpack_require__(863); var trim = (__webpack_require__(3111).trim); var NUMBER = 'Number'; var NativeNumber = global[NUMBER]; var NumberPrototype = NativeNumber.prototype; var TypeError = global.TypeError; var arraySlice = uncurryThis(''.slice); var charCodeAt = uncurryThis(''.charCodeAt); // `ToNumeric` abstract operation // https://tc39.es/ecma262/#sec-tonumeric var toNumeric = function (value) { var primValue = toPrimitive(value, 'number'); return typeof primValue == 'bigint' ? primValue : toNumber(primValue); }; // `ToNumber` abstract operation // https://tc39.es/ecma262/#sec-tonumber var toNumber = function (argument) { var it = toPrimitive(argument, 'number'); var first, third, radix, maxCode, digits, length, index, code; if (isSymbol(it)) throw TypeError('Cannot convert a Symbol value to a number'); if (typeof it == 'string' && it.length > 2) { it = trim(it); first = charCodeAt(it, 0); if (first === 43 || first === 45) { third = charCodeAt(it, 2); if (third === 88 || third === 120) return NaN; // Number('+0x1') should be NaN, old V8 fix } else if (first === 48) { switch (charCodeAt(it, 1)) { case 66: case 98: radix = 2; maxCode = 49; break; // fast equal of /^0b[01]+$/i case 79: case 111: radix = 8; maxCode = 55; break; // fast equal of /^0o[0-7]+$/i default: return +it; } digits = arraySlice(it, 2); length = digits.length; for (index = 0; index < length; index++) { code = charCodeAt(digits, index); // parseInt parses a string to a first unavailable symbol // but ToNumber should return NaN if a string contains unavailable symbols if (code < 48 || code > maxCode) return NaN; } return parseInt(digits, radix); } } return +it; }; // `Number` constructor // https://tc39.es/ecma262/#sec-number-constructor if (isForced(NUMBER, !NativeNumber(' 0o1') || !NativeNumber('0b1') || NativeNumber('+0x1'))) { var NumberWrapper = function Number(value) { var n = arguments.length < 1 ? 0 : NativeNumber(toNumeric(value)); var dummy = this; // check on 1..constructor(foo) case return isPrototypeOf(NumberPrototype, dummy) && fails(function () { thisNumberValue(dummy); }) ? inheritIfRequired(Object(n), dummy, NumberWrapper) : n; }; for (var keys = DESCRIPTORS ? getOwnPropertyNames(NativeNumber) : ( // ES3: 'MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,' + // ES2015 (in case, if modules with ES2015 Number statics required before): 'EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,' + // ESNext 'fromString,range' ).split(','), j = 0, key; keys.length > j; j++) { if (hasOwn(NativeNumber, key = keys[j]) && !hasOwn(NumberWrapper, key)) { defineProperty(NumberWrapper, key, getOwnPropertyDescriptor(NativeNumber, key)); } } NumberWrapper.prototype = NumberPrototype; NumberPrototype.constructor = NumberWrapper; redefine(global, NUMBER, NumberWrapper); } /***/ }), /***/ 3299: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { var $ = __webpack_require__(2109); // `Number.EPSILON` constant // https://tc39.es/ecma262/#sec-number.epsilon $({ target: 'Number', stat: true }, { EPSILON: Math.pow(2, -52) }); /***/ }), /***/ 5192: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { var $ = __webpack_require__(2109); var numberIsFinite = __webpack_require__(7023); // `Number.isFinite` method // https://tc39.es/ecma262/#sec-number.isfinite $({ target: 'Number', stat: true }, { isFinite: numberIsFinite }); /***/ }), /***/ 3161: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { var $ = __webpack_require__(2109); var isIntegralNumber = __webpack_require__(5988); // `Number.isInteger` method // https://tc39.es/ecma262/#sec-number.isinteger $({ target: 'Number', stat: true }, { isInteger: isIntegralNumber }); /***/ }), /***/ 6977: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { "use strict"; var $ = __webpack_require__(2109); var global = __webpack_require__(7854); var uncurryThis = __webpack_require__(1702); var toIntegerOrInfinity = __webpack_require__(9303); var thisNumberValue = __webpack_require__(863); var $repeat = __webpack_require__(8415); var fails = __webpack_require__(7293); var RangeError = global.RangeError; var String = global.String; var floor = Math.floor; var repeat = uncurryThis($repeat); var stringSlice = uncurryThis(''.slice); var un$ToFixed = uncurryThis(1.0.toFixed); var pow = function (x, n, acc) { return n === 0 ? acc : n % 2 === 1 ? pow(x, n - 1, acc * x) : pow(x * x, n / 2, acc); }; var log = function (x) { var n = 0; var x2 = x; while (x2 >= 4096) { n += 12; x2 /= 4096; } while (x2 >= 2) { n += 1; x2 /= 2; } return n; }; var multiply = function (data, n, c) { var index = -1; var c2 = c; while (++index < 6) { c2 += n * data[index]; data[index] = c2 % 1e7; c2 = floor(c2 / 1e7); } }; var divide = function (data, n) { var index = 6; var c = 0; while (--index >= 0) { c += data[index]; data[index] = floor(c / n); c = (c % n) * 1e7; } }; var dataToString = function (data) { var index = 6; var s = ''; while (--index >= 0) { if (s !== '' || index === 0 || data[index] !== 0) { var t = String(data[index]); s = s === '' ? t : s + repeat('0', 7 - t.length) + t; } } return s; }; var FORCED = fails(function () { return un$ToFixed(0.00008, 3) !== '0.000' || un$ToFixed(0.9, 0) !== '1' || un$ToFixed(1.255, 2) !== '1.25' || un$ToFixed(1000000000000000128.0, 0) !== '1000000000000000128'; }) || !fails(function () { // V8 ~ Android 4.3- un$ToFixed({}); }); // `Number.prototype.toFixed` method // https://tc39.es/ecma262/#sec-number.prototype.tofixed $({ target: 'Number', proto: true, forced: FORCED }, { toFixed: function toFixed(fractionDigits) { var number = thisNumberValue(this); var fractDigits = toIntegerOrInfinity(fractionDigits); var data = [0, 0, 0, 0, 0, 0]; var sign = ''; var result = '0'; var e, z, j, k; if (fractDigits < 0 || fractDigits > 20) throw RangeError('Incorrect fraction digits'); // eslint-disable-next-line no-self-compare -- NaN check if (number != number) return 'NaN'; if (number <= -1e21 || number >= 1e21) return String(number); if (number < 0) { sign = '-'; number = -number; } if (number > 1e-21) { e = log(number * pow(2, 69, 1)) - 69; z = e < 0 ? number * pow(2, -e, 1) : number / pow(2, e, 1); z *= 0x10000000000000; e = 52 - e; if (e > 0) { multiply(data, 0, z); j = fractDigits; while (j >= 7) { multiply(data, 1e7, 0); j -= 7; } multiply(data, pow(10, j, 1), 0); j = e - 1; while (j >= 23) { divide(data, 1 << 23); j -= 23; } divide(data, 1 << j); multiply(data, 1, 1); divide(data, 2); result = dataToString(data); } else { multiply(data, 0, z); multiply(data, 1 << -e, 0); result = dataToString(data) + repeat('0', fractDigits); } } if (fractDigits > 0) { k = result.length; result = sign + (k <= fractDigits ? '0.' + repeat('0', fractDigits - k) + result : stringSlice(result, 0, k - fractDigits) + '.' + stringSlice(result, k - fractDigits)); } else { result = sign + result; } return result; } }); /***/ }), /***/ 9601: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { var $ = __webpack_require__(2109); var assign = __webpack_require__(1574); // `Object.assign` method // https://tc39.es/ecma262/#sec-object.assign // eslint-disable-next-line es/no-object-assign -- required for testing $({ target: 'Object', stat: true, forced: Object.assign !== assign }, { assign: assign }); /***/ }), /***/ 3371: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { var $ = __webpack_require__(2109); var FREEZING = __webpack_require__(6677); var fails = __webpack_require__(7293); var isObject = __webpack_require__(111); var onFreeze = (__webpack_require__(2423).onFreeze); // eslint-disable-next-line es/no-object-freeze -- safe var $freeze = Object.freeze; var FAILS_ON_PRIMITIVES = fails(function () { $freeze(1); }); // `Object.freeze` method // https://tc39.es/ecma262/#sec-object.freeze $({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !FREEZING }, { freeze: function freeze(it) { return $freeze && isObject(it) ? $freeze(onFreeze(it)) : it; } }); /***/ }), /***/ 5003: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { var $ = __webpack_require__(2109); var fails = __webpack_require__(7293); var toIndexedObject = __webpack_require__(5656); var nativeGetOwnPropertyDescriptor = (__webpack_require__(1236).f); var DESCRIPTORS = __webpack_require__(9781); var FAILS_ON_PRIMITIVES = fails(function () { nativeGetOwnPropertyDescriptor(1); }); var FORCED = !DESCRIPTORS || FAILS_ON_PRIMITIVES; // `Object.getOwnPropertyDescriptor` method // https://tc39.es/ecma262/#sec-object.getownpropertydescriptor $({ target: 'Object', stat: true, forced: FORCED, sham: !DESCRIPTORS }, { getOwnPropertyDescriptor: function getOwnPropertyDescriptor(it, key) { return nativeGetOwnPropertyDescriptor(toIndexedObject(it), key); } }); /***/ }), /***/ 9337: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { var $ = __webpack_require__(2109); var DESCRIPTORS = __webpack_require__(9781); var ownKeys = __webpack_require__(3887); var toIndexedObject = __webpack_require__(5656); var getOwnPropertyDescriptorModule = __webpack_require__(1236); var createProperty = __webpack_require__(6135); // `Object.getOwnPropertyDescriptors` method // https://tc39.es/ecma262/#sec-object.getownpropertydescriptors $({ target: 'Object', stat: true, sham: !DESCRIPTORS }, { getOwnPropertyDescriptors: function getOwnPropertyDescriptors(object) { var O = toIndexedObject(object); var getOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f; var keys = ownKeys(O); var result = {}; var index = 0; var key, descriptor; while (keys.length > index) { descriptor = getOwnPropertyDescriptor(O, key = keys[index++]); if (descriptor !== undefined) createProperty(result, key, descriptor); } return result; } }); /***/ }), /***/ 489: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { var $ = __webpack_require__(2109); var fails = __webpack_require__(7293); var toObject = __webpack_require__(7908); var nativeGetPrototypeOf = __webpack_require__(9518); var CORRECT_PROTOTYPE_GETTER = __webpack_require__(8544); var FAILS_ON_PRIMITIVES = fails(function () { nativeGetPrototypeOf(1); }); // `Object.getPrototypeOf` method // https://tc39.es/ecma262/#sec-object.getprototypeof $({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES, sham: !CORRECT_PROTOTYPE_GETTER }, { getPrototypeOf: function getPrototypeOf(it) { return nativeGetPrototypeOf(toObject(it)); } }); /***/ }), /***/ 7941: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { var $ = __webpack_require__(2109); var toObject = __webpack_require__(7908); var nativeKeys = __webpack_require__(1956); var fails = __webpack_require__(7293); var FAILS_ON_PRIMITIVES = fails(function () { nativeKeys(1); }); // `Object.keys` method // https://tc39.es/ecma262/#sec-object.keys $({ target: 'Object', stat: true, forced: FAILS_ON_PRIMITIVES }, { keys: function keys(it) { return nativeKeys(toObject(it)); } }); /***/ }), /***/ 1539: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { var TO_STRING_TAG_SUPPORT = __webpack_require__(1694); var redefine = __webpack_require__(1320); var toString = __webpack_require__(288); // `Object.prototype.toString` method // https://tc39.es/ecma262/#sec-object.prototype.tostring if (!TO_STRING_TAG_SUPPORT) { redefine(Object.prototype, 'toString', toString, { unsafe: true }); } /***/ }), /***/ 2479: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { var $ = __webpack_require__(2109); var $values = (__webpack_require__(4699).values); // `Object.values` method // https://tc39.es/ecma262/#sec-object.values $({ target: 'Object', stat: true }, { values: function values(O) { return $values(O); } }); /***/ }), /***/ 7922: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { "use strict"; var $ = __webpack_require__(2109); var call = __webpack_require__(6916); var aCallable = __webpack_require__(9662); var newPromiseCapabilityModule = __webpack_require__(8523); var perform = __webpack_require__(2534); var iterate = __webpack_require__(408); // `Promise.allSettled` method // https://tc39.es/ecma262/#sec-promise.allsettled $({ target: 'Promise', stat: true }, { allSettled: function allSettled(iterable) { var C = this; var capability = newPromiseCapabilityModule.f(C); var resolve = capability.resolve; var reject = capability.reject; var result = perform(function () { var promiseResolve = aCallable(C.resolve); var values = []; var counter = 0; var remaining = 1; iterate(iterable, function (promise) { var index = counter++; var alreadyCalled = false; remaining++; call(promiseResolve, C, promise).then(function (value) { if (alreadyCalled) return; alreadyCalled = true; values[index] = { status: 'fulfilled', value: value }; --remaining || resolve(values); }, function (error) { if (alreadyCalled) return; alreadyCalled = true; values[index] = { status: 'rejected', reason: error }; --remaining || resolve(values); }); }); --remaining || resolve(values); }); if (result.error) reject(result.value); return capability.promise; } }); /***/ }), /***/ 4668: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { "use strict"; var $ = __webpack_require__(2109); var aCallable = __webpack_require__(9662); var getBuiltIn = __webpack_require__(5005); var call = __webpack_require__(6916); var newPromiseCapabilityModule = __webpack_require__(8523); var perform = __webpack_require__(2534); var iterate = __webpack_require__(408); var PROMISE_ANY_ERROR = 'No one promise resolved'; // `Promise.any` method // https://tc39.es/ecma262/#sec-promise.any $({ target: 'Promise', stat: true }, { any: function any(iterable) { var C = this; var AggregateError = getBuiltIn('AggregateError'); var capability = newPromiseCapabilityModule.f(C); var resolve = capability.resolve; var reject = capability.reject; var result = perform(function () { var promiseResolve = aCallable(C.resolve); var errors = []; var counter = 0; var remaining = 1; var alreadyResolved = false; iterate(iterable, function (promise) { var index = counter++; var alreadyRejected = false; remaining++; call(promiseResolve, C, promise).then(function (value) { if (alreadyRejected || alreadyResolved) return; alreadyResolved = true; resolve(value); }, function (error) { if (alreadyRejected || alreadyResolved) return; alreadyRejected = true; errors[index] = error; --remaining || reject(new AggregateError(errors, PROMISE_ANY_ERROR)); }); }); --remaining || reject(new AggregateError(errors, PROMISE_ANY_ERROR)); }); if (result.error) reject(result.value); return capability.promise; } }); /***/ }), /***/ 7727: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { "use strict"; var $ = __webpack_require__(2109); var IS_PURE = __webpack_require__(1913); var NativePromise = __webpack_require__(3366); var fails = __webpack_require__(7293); var getBuiltIn = __webpack_require__(5005); var isCallable = __webpack_require__(614); var speciesConstructor = __webpack_require__(6707); var promiseResolve = __webpack_require__(9478); var redefine = __webpack_require__(1320); // Safari bug https://bugs.webkit.org/show_bug.cgi?id=200829 var NON_GENERIC = !!NativePromise && fails(function () { NativePromise.prototype['finally'].call({ then: function () { /* empty */ } }, function () { /* empty */ }); }); // `Promise.prototype.finally` method // https://tc39.es/ecma262/#sec-promise.prototype.finally $({ target: 'Promise', proto: true, real: true, forced: NON_GENERIC }, { 'finally': function (onFinally) { var C = speciesConstructor(this, getBuiltIn('Promise')); var isFunction = isCallable(onFinally); return this.then( isFunction ? function (x) { return promiseResolve(C, onFinally()).then(function () { return x; }); } : onFinally, isFunction ? function (e) { return promiseResolve(C, onFinally()).then(function () { throw e; }); } : onFinally ); } }); // makes sure that native promise-based APIs `Promise#finally` properly works with patched `Promise#then` if (!IS_PURE && isCallable(NativePromise)) { var method = getBuiltIn('Promise').prototype['finally']; if (NativePromise.prototype['finally'] !== method) { redefine(NativePromise.prototype, 'finally', method, { unsafe: true }); } } /***/ }), /***/ 8674: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { "use strict"; var $ = __webpack_require__(2109); var IS_PURE = __webpack_require__(1913); var global = __webpack_require__(7854); var getBuiltIn = __webpack_require__(5005); var call = __webpack_require__(6916); var NativePromise = __webpack_require__(3366); var redefine = __webpack_require__(1320); var redefineAll = __webpack_require__(2248); var setPrototypeOf = __webpack_require__(7674); var setToStringTag = __webpack_require__(8003); var setSpecies = __webpack_require__(6340); var aCallable = __webpack_require__(9662); var isCallable = __webpack_require__(614); var isObject = __webpack_require__(111); var anInstance = __webpack_require__(5787); var inspectSource = __webpack_require__(2788); var iterate = __webpack_require__(408); var checkCorrectnessOfIteration = __webpack_require__(7072); var speciesConstructor = __webpack_require__(6707); var task = (__webpack_require__(261).set); var microtask = __webpack_require__(5948); var promiseResolve = __webpack_require__(9478); var hostReportErrors = __webpack_require__(842); var newPromiseCapabilityModule = __webpack_require__(8523); var perform = __webpack_require__(2534); var InternalStateModule = __webpack_require__(9909); var isForced = __webpack_require__(4705); var wellKnownSymbol = __webpack_require__(5112); var IS_BROWSER = __webpack_require__(7871); var IS_NODE = __webpack_require__(5268); var V8_VERSION = __webpack_require__(7392); var SPECIES = wellKnownSymbol('species'); var PROMISE = 'Promise'; var getInternalState = InternalStateModule.get; var setInternalState = InternalStateModule.set; var getInternalPromiseState = InternalStateModule.getterFor(PROMISE); var NativePromisePrototype = NativePromise && NativePromise.prototype; var PromiseConstructor = NativePromise; var PromisePrototype = NativePromisePrototype; var TypeError = global.TypeError; var document = global.document; var process = global.process; var newPromiseCapability = newPromiseCapabilityModule.f; var newGenericPromiseCapability = newPromiseCapability; var DISPATCH_EVENT = !!(document && document.createEvent && global.dispatchEvent); var NATIVE_REJECTION_EVENT = isCallable(global.PromiseRejectionEvent); var UNHANDLED_REJECTION = 'unhandledrejection'; var REJECTION_HANDLED = 'rejectionhandled'; var PENDING = 0; var FULFILLED = 1; var REJECTED = 2; var HANDLED = 1; var UNHANDLED = 2; var SUBCLASSING = false; var Internal, OwnPromiseCapability, PromiseWrapper, nativeThen; var FORCED = isForced(PROMISE, function () { var PROMISE_CONSTRUCTOR_SOURCE = inspectSource(PromiseConstructor); var GLOBAL_CORE_JS_PROMISE = PROMISE_CONSTRUCTOR_SOURCE !== String(PromiseConstructor); // V8 6.6 (Node 10 and Chrome 66) have a bug with resolving custom thenables // https://bugs.chromium.org/p/chromium/issues/detail?id=830565 // We can't detect it synchronously, so just check versions if (!GLOBAL_CORE_JS_PROMISE && V8_VERSION === 66) return true; // We need Promise#finally in the pure version for preventing prototype pollution if (IS_PURE && !PromisePrototype['finally']) return true; // We can't use @@species feature detection in V8 since it causes // deoptimization and performance degradation // https://github.com/zloirock/core-js/issues/679 if (V8_VERSION >= 51 && /native code/.test(PROMISE_CONSTRUCTOR_SOURCE)) return false; // Detect correctness of subclassing with @@species support var promise = new PromiseConstructor(function (resolve) { resolve(1); }); var FakePromise = function (exec) { exec(function () { /* empty */ }, function () { /* empty */ }); }; var constructor = promise.constructor = {}; constructor[SPECIES] = FakePromise; SUBCLASSING = promise.then(function () { /* empty */ }) instanceof FakePromise; if (!SUBCLASSING) return true; // Unhandled rejections tracking support, NodeJS Promise without it fails @@species test return !GLOBAL_CORE_JS_PROMISE && IS_BROWSER && !NATIVE_REJECTION_EVENT; }); var INCORRECT_ITERATION = FORCED || !checkCorrectnessOfIteration(function (iterable) { PromiseConstructor.all(iterable)['catch'](function () { /* empty */ }); }); // helpers var isThenable = function (it) { var then; return isObject(it) && isCallable(then = it.then) ? then : false; }; var notify = function (state, isReject) { if (state.notified) return; state.notified = true; var chain = state.reactions; microtask(function () { var value = state.value; var ok = state.state == FULFILLED; var index = 0; // variable length - can't use forEach while (chain.length > index) { var reaction = chain[index++]; var handler = ok ? reaction.ok : reaction.fail; var resolve = reaction.resolve; var reject = reaction.reject; var domain = reaction.domain; var result, then, exited; try { if (handler) { if (!ok) { if (state.rejection === UNHANDLED) onHandleUnhandled(state); state.rejection = HANDLED; } if (handler === true) result = value; else { if (domain) domain.enter(); result = handler(value); // can throw if (domain) { domain.exit(); exited = true; } } if (result === reaction.promise) { reject(TypeError('Promise-chain cycle')); } else if (then = isThenable(result)) { call(then, result, resolve, reject); } else resolve(result); } else reject(value); } catch (error) { if (domain && !exited) domain.exit(); reject(error); } } state.reactions = []; state.notified = false; if (isReject && !state.rejection) onUnhandled(state); }); }; var dispatchEvent = function (name, promise, reason) { var event, handler; if (DISPATCH_EVENT) { event = document.createEvent('Event'); event.promise = promise; event.reason = reason; event.initEvent(name, false, true); global.dispatchEvent(event); } else event = { promise: promise, reason: reason }; if (!NATIVE_REJECTION_EVENT && (handler = global['on' + name])) handler(event); else if (name === UNHANDLED_REJECTION) hostReportErrors('Unhandled promise rejection', reason); }; var onUnhandled = function (state) { call(task, global, function () { var promise = state.facade; var value = state.value; var IS_UNHANDLED = isUnhandled(state); var result; if (IS_UNHANDLED) { result = perform(function () { if (IS_NODE) { process.emit('unhandledRejection', value, promise); } else dispatchEvent(UNHANDLED_REJECTION, promise, value); }); // Browsers should not trigger `rejectionHandled` event if it was handled here, NodeJS - should state.rejection = IS_NODE || isUnhandled(state) ? UNHANDLED : HANDLED; if (result.error) throw result.value; } }); }; var isUnhandled = function (state) { return state.rejection !== HANDLED && !state.parent; }; var onHandleUnhandled = function (state) { call(task, global, function () { var promise = state.facade; if (IS_NODE) { process.emit('rejectionHandled', promise); } else dispatchEvent(REJECTION_HANDLED, promise, state.value); }); }; var bind = function (fn, state, unwrap) { return function (value) { fn(state, value, unwrap); }; }; var internalReject = function (state, value, unwrap) { if (state.done) return; state.done = true; if (unwrap) state = unwrap; state.value = value; state.state = REJECTED; notify(state, true); }; var internalResolve = function (state, value, unwrap) { if (state.done) return; state.done = true; if (unwrap) state = unwrap; try { if (state.facade === value) throw TypeError("Promise can't be resolved itself"); var then = isThenable(value); if (then) { microtask(function () { var wrapper = { done: false }; try { call(then, value, bind(internalResolve, wrapper, state), bind(internalReject, wrapper, state) ); } catch (error) { internalReject(wrapper, error, state); } }); } else { state.value = value; state.state = FULFILLED; notify(state, false); } } catch (error) { internalReject({ done: false }, error, state); } }; // constructor polyfill if (FORCED) { // 25.4.3.1 Promise(executor) PromiseConstructor = function Promise(executor) { anInstance(this, PromisePrototype); aCallable(executor); call(Internal, this); var state = getInternalState(this); try { executor(bind(internalResolve, state), bind(internalReject, state)); } catch (error) { internalReject(state, error); } }; PromisePrototype = PromiseConstructor.prototype; // eslint-disable-next-line no-unused-vars -- required for `.length` Internal = function Promise(executor) { setInternalState(this, { type: PROMISE, done: false, notified: false, parent: false, reactions: [], rejection: false, state: PENDING, value: undefined }); }; Internal.prototype = redefineAll(PromisePrototype, { // `Promise.prototype.then` method // https://tc39.es/ecma262/#sec-promise.prototype.then then: function then(onFulfilled, onRejected) { var state = getInternalPromiseState(this); var reactions = state.reactions; var reaction = newPromiseCapability(speciesConstructor(this, PromiseConstructor)); reaction.ok = isCallable(onFulfilled) ? onFulfilled : true; reaction.fail = isCallable(onRejected) && onRejected; reaction.domain = IS_NODE ? process.domain : undefined; state.parent = true; reactions[reactions.length] = reaction; if (state.state != PENDING) notify(state, false); return reaction.promise; }, // `Promise.prototype.catch` method // https://tc39.es/ecma262/#sec-promise.prototype.catch 'catch': function (onRejected) { return this.then(undefined, onRejected); } }); OwnPromiseCapability = function () { var promise = new Internal(); var state = getInternalState(promise); this.promise = promise; this.resolve = bind(internalResolve, state); this.reject = bind(internalReject, state); }; newPromiseCapabilityModule.f = newPromiseCapability = function (C) { return C === PromiseConstructor || C === PromiseWrapper ? new OwnPromiseCapability(C) : newGenericPromiseCapability(C); }; if (!IS_PURE && isCallable(NativePromise) && NativePromisePrototype !== Object.prototype) { nativeThen = NativePromisePrototype.then; if (!SUBCLASSING) { // make `Promise#then` return a polyfilled `Promise` for native promise-based APIs redefine(NativePromisePrototype, 'then', function then(onFulfilled, onRejected) { var that = this; return new PromiseConstructor(function (resolve, reject) { call(nativeThen, that, resolve, reject); }).then(onFulfilled, onRejected); // https://github.com/zloirock/core-js/issues/640 }, { unsafe: true }); // makes sure that native promise-based APIs `Promise#catch` properly works with patched `Promise#then` redefine(NativePromisePrototype, 'catch', PromisePrototype['catch'], { unsafe: true }); } // make `.constructor === Promise` work for native promise-based APIs try { delete NativePromisePrototype.constructor; } catch (error) { /* empty */ } // make `instanceof Promise` work for native promise-based APIs if (setPrototypeOf) { setPrototypeOf(NativePromisePrototype, PromisePrototype); } } } $({ global: true, wrap: true, forced: FORCED }, { Promise: PromiseConstructor }); setToStringTag(PromiseConstructor, PROMISE, false, true); setSpecies(PROMISE); PromiseWrapper = getBuiltIn(PROMISE); // statics $({ target: PROMISE, stat: true, forced: FORCED }, { // `Promise.reject` method // https://tc39.es/ecma262/#sec-promise.reject reject: function reject(r) { var capability = newPromiseCapability(this); call(capability.reject, undefined, r); return capability.promise; } }); $({ target: PROMISE, stat: true, forced: IS_PURE || FORCED }, { // `Promise.resolve` method // https://tc39.es/ecma262/#sec-promise.resolve resolve: function resolve(x) { return promiseResolve(IS_PURE && this === PromiseWrapper ? PromiseConstructor : this, x); } }); $({ target: PROMISE, stat: true, forced: INCORRECT_ITERATION }, { // `Promise.all` method // https://tc39.es/ecma262/#sec-promise.all all: function all(iterable) { var C = this; var capability = newPromiseCapability(C); var resolve = capability.resolve; var reject = capability.reject; var result = perform(function () { var $promiseResolve = aCallable(C.resolve); var values = []; var counter = 0; var remaining = 1; iterate(iterable, function (promise) { var index = counter++; var alreadyCalled = false; remaining++; call($promiseResolve, C, promise).then(function (value) { if (alreadyCalled) return; alreadyCalled = true; values[index] = value; --remaining || resolve(values); }, reject); }); --remaining || resolve(values); }); if (result.error) reject(result.value); return capability.promise; }, // `Promise.race` method // https://tc39.es/ecma262/#sec-promise.race race: function race(iterable) { var C = this; var capability = newPromiseCapability(C); var reject = capability.reject; var result = perform(function () { var $promiseResolve = aCallable(C.resolve); iterate(iterable, function (promise) { call($promiseResolve, C, promise).then(capability.resolve, reject); }); }); if (result.error) reject(result.value); return capability.promise; } }); /***/ }), /***/ 2419: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { var $ = __webpack_require__(2109); var getBuiltIn = __webpack_require__(5005); var apply = __webpack_require__(2104); var bind = __webpack_require__(7065); var aConstructor = __webpack_require__(9483); var anObject = __webpack_require__(9670); var isObject = __webpack_require__(111); var create = __webpack_require__(30); var fails = __webpack_require__(7293); var nativeConstruct = getBuiltIn('Reflect', 'construct'); var ObjectPrototype = Object.prototype; var push = [].push; // `Reflect.construct` method // https://tc39.es/ecma262/#sec-reflect.construct // MS Edge supports only 2 arguments and argumentsList argument is optional // FF Nightly sets third argument as `new.target`, but does not create `this` from it var NEW_TARGET_BUG = fails(function () { function F() { /* empty */ } return !(nativeConstruct(function () { /* empty */ }, [], F) instanceof F); }); var ARGS_BUG = !fails(function () { nativeConstruct(function () { /* empty */ }); }); var FORCED = NEW_TARGET_BUG || ARGS_BUG; $({ target: 'Reflect', stat: true, forced: FORCED, sham: FORCED }, { construct: function construct(Target, args /* , newTarget */) { aConstructor(Target); anObject(args); var newTarget = arguments.length < 3 ? Target : aConstructor(arguments[2]); if (ARGS_BUG && !NEW_TARGET_BUG) return nativeConstruct(Target, args, newTarget); if (Target == newTarget) { // w/o altered newTarget, optimization for 0-4 arguments switch (args.length) { case 0: return new Target(); case 1: return new Target(args[0]); case 2: return new Target(args[0], args[1]); case 3: return new Target(args[0], args[1], args[2]); case 4: return new Target(args[0], args[1], args[2], args[3]); } // w/o altered newTarget, lot of arguments case var $args = [null]; apply(push, $args, args); return new (apply(bind, Target, $args))(); } // with altered newTarget, not support built-in constructors var proto = newTarget.prototype; var instance = create(isObject(proto) ? proto : ObjectPrototype); var result = apply(Target, instance, args); return isObject(result) ? result : instance; } }); /***/ }), /***/ 4916: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { "use strict"; var $ = __webpack_require__(2109); var exec = __webpack_require__(2261); // `RegExp.prototype.exec` method // https://tc39.es/ecma262/#sec-regexp.prototype.exec $({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, { exec: exec }); /***/ }), /***/ 2087: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { var DESCRIPTORS = __webpack_require__(9781); var objectDefinePropertyModule = __webpack_require__(3070); var regExpFlags = __webpack_require__(7066); var fails = __webpack_require__(7293); var RegExpPrototype = RegExp.prototype; var FORCED = DESCRIPTORS && fails(function () { // eslint-disable-next-line es/no-object-getownpropertydescriptor -- safe return Object.getOwnPropertyDescriptor(RegExpPrototype, 'flags').get.call({ dotAll: true, sticky: true }) !== 'sy'; }); // `RegExp.prototype.flags` getter // https://tc39.es/ecma262/#sec-get-regexp.prototype.flags if (FORCED) objectDefinePropertyModule.f(RegExpPrototype, 'flags', { configurable: true, get: regExpFlags }); /***/ }), /***/ 9714: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { "use strict"; var uncurryThis = __webpack_require__(1702); var PROPER_FUNCTION_NAME = (__webpack_require__(6530).PROPER); var redefine = __webpack_require__(1320); var anObject = __webpack_require__(9670); var isPrototypeOf = __webpack_require__(7976); var $toString = __webpack_require__(1340); var fails = __webpack_require__(7293); var regExpFlags = __webpack_require__(7066); var TO_STRING = 'toString'; var RegExpPrototype = RegExp.prototype; var n$ToString = RegExpPrototype[TO_STRING]; var getFlags = uncurryThis(regExpFlags); var NOT_GENERIC = fails(function () { return n$ToString.call({ source: 'a', flags: 'b' }) != '/a/b'; }); // FF44- RegExp#toString has a wrong name var INCORRECT_NAME = PROPER_FUNCTION_NAME && n$ToString.name != TO_STRING; // `RegExp.prototype.toString` method // https://tc39.es/ecma262/#sec-regexp.prototype.tostring if (NOT_GENERIC || INCORRECT_NAME) { redefine(RegExp.prototype, TO_STRING, function toString() { var R = anObject(this); var p = $toString(R.source); var rf = R.flags; var f = $toString(rf === undefined && isPrototypeOf(RegExpPrototype, R) && !('flags' in RegExpPrototype) ? getFlags(R) : rf); return '/' + p + '/' + f; }, { unsafe: true }); } /***/ }), /***/ 189: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { "use strict"; var collection = __webpack_require__(7710); var collectionStrong = __webpack_require__(5631); // `Set` constructor // https://tc39.es/ecma262/#sec-set-objects collection('Set', function (init) { return function Set() { return init(this, arguments.length ? arguments[0] : undefined); }; }, collectionStrong); /***/ }), /***/ 9841: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { "use strict"; var $ = __webpack_require__(2109); var codeAt = (__webpack_require__(8710).codeAt); // `String.prototype.codePointAt` method // https://tc39.es/ecma262/#sec-string.prototype.codepointat $({ target: 'String', proto: true }, { codePointAt: function codePointAt(pos) { return codeAt(this, pos); } }); /***/ }), /***/ 4953: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { var $ = __webpack_require__(2109); var global = __webpack_require__(7854); var uncurryThis = __webpack_require__(1702); var toAbsoluteIndex = __webpack_require__(1400); var RangeError = global.RangeError; var fromCharCode = String.fromCharCode; // eslint-disable-next-line es/no-string-fromcodepoint -- required for testing var $fromCodePoint = String.fromCodePoint; var join = uncurryThis([].join); // length should be 1, old FF problem var INCORRECT_LENGTH = !!$fromCodePoint && $fromCodePoint.length != 1; // `String.fromCodePoint` method // https://tc39.es/ecma262/#sec-string.fromcodepoint $({ target: 'String', stat: true, forced: INCORRECT_LENGTH }, { // eslint-disable-next-line no-unused-vars -- required for `.length` fromCodePoint: function fromCodePoint(x) { var elements = []; var length = arguments.length; var i = 0; var code; while (length > i) { code = +arguments[i++]; if (toAbsoluteIndex(code, 0x10FFFF) !== code) throw RangeError(code + ' is not a valid code point'); elements[i] = code < 0x10000 ? fromCharCode(code) : fromCharCode(((code -= 0x10000) >> 10) + 0xD800, code % 0x400 + 0xDC00); } return join(elements, ''); } }); /***/ }), /***/ 2023: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { "use strict"; var $ = __webpack_require__(2109); var uncurryThis = __webpack_require__(1702); var notARegExp = __webpack_require__(3929); var requireObjectCoercible = __webpack_require__(4488); var toString = __webpack_require__(1340); var correctIsRegExpLogic = __webpack_require__(4964); var stringIndexOf = uncurryThis(''.indexOf); // `String.prototype.includes` method // https://tc39.es/ecma262/#sec-string.prototype.includes $({ target: 'String', proto: true, forced: !correctIsRegExpLogic('includes') }, { includes: function includes(searchString /* , position = 0 */) { return !!~stringIndexOf( toString(requireObjectCoercible(this)), toString(notARegExp(searchString)), arguments.length > 1 ? arguments[1] : undefined ); } }); /***/ }), /***/ 8734: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { "use strict"; var $ = __webpack_require__(2109); var createHTML = __webpack_require__(4230); var forcedStringHTMLMethod = __webpack_require__(3429); // `String.prototype.italics` method // https://tc39.es/ecma262/#sec-string.prototype.italics $({ target: 'String', proto: true, forced: forcedStringHTMLMethod('italics') }, { italics: function italics() { return createHTML(this, 'i', '', ''); } }); /***/ }), /***/ 8783: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { "use strict"; var charAt = (__webpack_require__(8710).charAt); var toString = __webpack_require__(1340); var InternalStateModule = __webpack_require__(9909); var defineIterator = __webpack_require__(654); var STRING_ITERATOR = 'String Iterator'; var setInternalState = InternalStateModule.set; var getInternalState = InternalStateModule.getterFor(STRING_ITERATOR); // `String.prototype[@@iterator]` method // https://tc39.es/ecma262/#sec-string.prototype-@@iterator defineIterator(String, 'String', function (iterated) { setInternalState(this, { type: STRING_ITERATOR, string: toString(iterated), index: 0 }); // `%StringIteratorPrototype%.next` method // https://tc39.es/ecma262/#sec-%stringiteratorprototype%.next }, function next() { var state = getInternalState(this); var string = state.string; var index = state.index; var point; if (index >= string.length) return { value: undefined, done: true }; point = charAt(string, index); state.index += point.length; return { value: point, done: false }; }); /***/ }), /***/ 9254: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { "use strict"; var $ = __webpack_require__(2109); var createHTML = __webpack_require__(4230); var forcedStringHTMLMethod = __webpack_require__(3429); // `String.prototype.link` method // https://tc39.es/ecma262/#sec-string.prototype.link $({ target: 'String', proto: true, forced: forcedStringHTMLMethod('link') }, { link: function link(url) { return createHTML(this, 'a', 'href', url); } }); /***/ }), /***/ 6373: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { "use strict"; /* eslint-disable es/no-string-prototype-matchall -- safe */ var $ = __webpack_require__(2109); var global = __webpack_require__(7854); var call = __webpack_require__(6916); var uncurryThis = __webpack_require__(1702); var createIteratorConstructor = __webpack_require__(4994); var requireObjectCoercible = __webpack_require__(4488); var toLength = __webpack_require__(7466); var toString = __webpack_require__(1340); var anObject = __webpack_require__(9670); var classof = __webpack_require__(4326); var isPrototypeOf = __webpack_require__(7976); var isRegExp = __webpack_require__(7850); var regExpFlags = __webpack_require__(7066); var getMethod = __webpack_require__(8173); var redefine = __webpack_require__(1320); var fails = __webpack_require__(7293); var wellKnownSymbol = __webpack_require__(5112); var speciesConstructor = __webpack_require__(6707); var advanceStringIndex = __webpack_require__(1530); var regExpExec = __webpack_require__(7651); var InternalStateModule = __webpack_require__(9909); var IS_PURE = __webpack_require__(1913); var MATCH_ALL = wellKnownSymbol('matchAll'); var REGEXP_STRING = 'RegExp String'; var REGEXP_STRING_ITERATOR = REGEXP_STRING + ' Iterator'; var setInternalState = InternalStateModule.set; var getInternalState = InternalStateModule.getterFor(REGEXP_STRING_ITERATOR); var RegExpPrototype = RegExp.prototype; var TypeError = global.TypeError; var getFlags = uncurryThis(regExpFlags); var stringIndexOf = uncurryThis(''.indexOf); var un$MatchAll = uncurryThis(''.matchAll); var WORKS_WITH_NON_GLOBAL_REGEX = !!un$MatchAll && !fails(function () { un$MatchAll('a', /./); }); var $RegExpStringIterator = createIteratorConstructor(function RegExpStringIterator(regexp, string, $global, fullUnicode) { setInternalState(this, { type: REGEXP_STRING_ITERATOR, regexp: regexp, string: string, global: $global, unicode: fullUnicode, done: false }); }, REGEXP_STRING, function next() { var state = getInternalState(this); if (state.done) return { value: undefined, done: true }; var R = state.regexp; var S = state.string; var match = regExpExec(R, S); if (match === null) return { value: undefined, done: state.done = true }; if (state.global) { if (toString(match[0]) === '') R.lastIndex = advanceStringIndex(S, toLength(R.lastIndex), state.unicode); return { value: match, done: false }; } state.done = true; return { value: match, done: false }; }); var $matchAll = function (string) { var R = anObject(this); var S = toString(string); var C, flagsValue, flags, matcher, $global, fullUnicode; C = speciesConstructor(R, RegExp); flagsValue = R.flags; if (flagsValue === undefined && isPrototypeOf(RegExpPrototype, R) && !('flags' in RegExpPrototype)) { flagsValue = getFlags(R); } flags = flagsValue === undefined ? '' : toString(flagsValue); matcher = new C(C === RegExp ? R.source : R, flags); $global = !!~stringIndexOf(flags, 'g'); fullUnicode = !!~stringIndexOf(flags, 'u'); matcher.lastIndex = toLength(R.lastIndex); return new $RegExpStringIterator(matcher, S, $global, fullUnicode); }; // `String.prototype.matchAll` method // https://tc39.es/ecma262/#sec-string.prototype.matchall $({ target: 'String', proto: true, forced: WORKS_WITH_NON_GLOBAL_REGEX }, { matchAll: function matchAll(regexp) { var O = requireObjectCoercible(this); var flags, S, matcher, rx; if (regexp != null) { if (isRegExp(regexp)) { flags = toString(requireObjectCoercible('flags' in RegExpPrototype ? regexp.flags : getFlags(regexp) )); if (!~stringIndexOf(flags, 'g')) throw TypeError('`.matchAll` does not allow non-global regexes'); } if (WORKS_WITH_NON_GLOBAL_REGEX) return un$MatchAll(O, regexp); matcher = getMethod(regexp, MATCH_ALL); if (matcher === undefined && IS_PURE && classof(regexp) == 'RegExp') matcher = $matchAll; if (matcher) return call(matcher, regexp, O); } else if (WORKS_WITH_NON_GLOBAL_REGEX) return un$MatchAll(O, regexp); S = toString(O); rx = new RegExp(regexp, 'g'); return IS_PURE ? call($matchAll, rx, S) : rx[MATCH_ALL](S); } }); IS_PURE || MATCH_ALL in RegExpPrototype || redefine(RegExpPrototype, MATCH_ALL, $matchAll); /***/ }), /***/ 4723: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { "use strict"; var call = __webpack_require__(6916); var fixRegExpWellKnownSymbolLogic = __webpack_require__(7007); var anObject = __webpack_require__(9670); var toLength = __webpack_require__(7466); var toString = __webpack_require__(1340); var requireObjectCoercible = __webpack_require__(4488); var getMethod = __webpack_require__(8173); var advanceStringIndex = __webpack_require__(1530); var regExpExec = __webpack_require__(7651); // @@match logic fixRegExpWellKnownSymbolLogic('match', function (MATCH, nativeMatch, maybeCallNative) { return [ // `String.prototype.match` method // https://tc39.es/ecma262/#sec-string.prototype.match function match(regexp) { var O = requireObjectCoercible(this); var matcher = regexp == undefined ? undefined : getMethod(regexp, MATCH); return matcher ? call(matcher, regexp, O) : new RegExp(regexp)[MATCH](toString(O)); }, // `RegExp.prototype[@@match]` method // https://tc39.es/ecma262/#sec-regexp.prototype-@@match function (string) { var rx = anObject(this); var S = toString(string); var res = maybeCallNative(nativeMatch, rx, S); if (res.done) return res.value; if (!rx.global) return regExpExec(rx, S); var fullUnicode = rx.unicode; rx.lastIndex = 0; var A = []; var n = 0; var result; while ((result = regExpExec(rx, S)) !== null) { var matchStr = toString(result[0]); A[n] = matchStr; if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode); n++; } return n === 0 ? null : A; } ]; }); /***/ }), /***/ 2481: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { var $ = __webpack_require__(2109); var repeat = __webpack_require__(8415); // `String.prototype.repeat` method // https://tc39.es/ecma262/#sec-string.prototype.repeat $({ target: 'String', proto: true }, { repeat: repeat }); /***/ }), /***/ 5306: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { "use strict"; var apply = __webpack_require__(2104); var call = __webpack_require__(6916); var uncurryThis = __webpack_require__(1702); var fixRegExpWellKnownSymbolLogic = __webpack_require__(7007); var fails = __webpack_require__(7293); var anObject = __webpack_require__(9670); var isCallable = __webpack_require__(614); var toIntegerOrInfinity = __webpack_require__(9303); var toLength = __webpack_require__(7466); var toString = __webpack_require__(1340); var requireObjectCoercible = __webpack_require__(4488); var advanceStringIndex = __webpack_require__(1530); var getMethod = __webpack_require__(8173); var getSubstitution = __webpack_require__(647); var regExpExec = __webpack_require__(7651); var wellKnownSymbol = __webpack_require__(5112); var REPLACE = wellKnownSymbol('replace'); var max = Math.max; var min = Math.min; var concat = uncurryThis([].concat); var push = uncurryThis([].push); var stringIndexOf = uncurryThis(''.indexOf); var stringSlice = uncurryThis(''.slice); var maybeToString = function (it) { return it === undefined ? it : String(it); }; // IE <= 11 replaces $0 with the whole match, as if it was $& // https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0 var REPLACE_KEEPS_$0 = (function () { // eslint-disable-next-line regexp/prefer-escape-replacement-dollar-char -- required for testing return 'a'.replace(/./, '$0') === '$0'; })(); // Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string var REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () { if (/./[REPLACE]) { return /./[REPLACE]('a', '$0') === ''; } return false; })(); var REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () { var re = /./; re.exec = function () { var result = []; result.groups = { a: '7' }; return result; }; // eslint-disable-next-line regexp/no-useless-dollar-replacements -- false positive return ''.replace(re, '$') !== '7'; }); // @@replace logic fixRegExpWellKnownSymbolLogic('replace', function (_, nativeReplace, maybeCallNative) { var UNSAFE_SUBSTITUTE = REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE ? '$' : '$0'; return [ // `String.prototype.replace` method // https://tc39.es/ecma262/#sec-string.prototype.replace function replace(searchValue, replaceValue) { var O = requireObjectCoercible(this); var replacer = searchValue == undefined ? undefined : getMethod(searchValue, REPLACE); return replacer ? call(replacer, searchValue, O, replaceValue) : call(nativeReplace, toString(O), searchValue, replaceValue); }, // `RegExp.prototype[@@replace]` method // https://tc39.es/ecma262/#sec-regexp.prototype-@@replace function (string, replaceValue) { var rx = anObject(this); var S = toString(string); if ( typeof replaceValue == 'string' && stringIndexOf(replaceValue, UNSAFE_SUBSTITUTE) === -1 && stringIndexOf(replaceValue, '$<') === -1 ) { var res = maybeCallNative(nativeReplace, rx, S, replaceValue); if (res.done) return res.value; } var functionalReplace = isCallable(replaceValue); if (!functionalReplace) replaceValue = toString(replaceValue); var global = rx.global; if (global) { var fullUnicode = rx.unicode; rx.lastIndex = 0; } var results = []; while (true) { var result = regExpExec(rx, S); if (result === null) break; push(results, result); if (!global) break; var matchStr = toString(result[0]); if (matchStr === '') rx.lastIndex = advanceStringIndex(S, toLength(rx.lastIndex), fullUnicode); } var accumulatedResult = ''; var nextSourcePosition = 0; for (var i = 0; i < results.length; i++) { result = results[i]; var matched = toString(result[0]); var position = max(min(toIntegerOrInfinity(result.index), S.length), 0); var captures = []; // NOTE: This is equivalent to // captures = result.slice(1).map(maybeToString) // but for some reason `nativeSlice.call(result, 1, result.length)` (called in // the slice polyfill when slicing native arrays) "doesn't work" in safari 9 and // causes a crash (https://pastebin.com/N21QzeQA) when trying to debug it. for (var j = 1; j < result.length; j++) push(captures, maybeToString(result[j])); var namedCaptures = result.groups; if (functionalReplace) { var replacerArgs = concat([matched], captures, position, S); if (namedCaptures !== undefined) push(replacerArgs, namedCaptures); var replacement = toString(apply(replaceValue, undefined, replacerArgs)); } else { replacement = getSubstitution(matched, S, position, captures, namedCaptures, replaceValue); } if (position >= nextSourcePosition) { accumulatedResult += stringSlice(S, nextSourcePosition, position) + replacement; nextSourcePosition = position + matched.length; } } return accumulatedResult + stringSlice(S, nextSourcePosition); } ]; }, !REPLACE_SUPPORTS_NAMED_GROUPS || !REPLACE_KEEPS_$0 || REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE); /***/ }), /***/ 3123: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { "use strict"; var apply = __webpack_require__(2104); var call = __webpack_require__(6916); var uncurryThis = __webpack_require__(1702); var fixRegExpWellKnownSymbolLogic = __webpack_require__(7007); var isRegExp = __webpack_require__(7850); var anObject = __webpack_require__(9670); var requireObjectCoercible = __webpack_require__(4488); var speciesConstructor = __webpack_require__(6707); var advanceStringIndex = __webpack_require__(1530); var toLength = __webpack_require__(7466); var toString = __webpack_require__(1340); var getMethod = __webpack_require__(8173); var arraySlice = __webpack_require__(206); var callRegExpExec = __webpack_require__(7651); var regexpExec = __webpack_require__(2261); var stickyHelpers = __webpack_require__(2999); var fails = __webpack_require__(7293); var UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y; var MAX_UINT32 = 0xFFFFFFFF; var min = Math.min; var $push = [].push; var exec = uncurryThis(/./.exec); var push = uncurryThis($push); var stringSlice = uncurryThis(''.slice); // Chrome 51 has a buggy "split" implementation when RegExp#exec !== nativeExec // Weex JS has frozen built-in prototypes, so use try / catch wrapper var SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () { // eslint-disable-next-line regexp/no-empty-group -- required for testing var re = /(?:)/; var originalExec = re.exec; re.exec = function () { return originalExec.apply(this, arguments); }; var result = 'ab'.split(re); return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b'; }); // @@split logic fixRegExpWellKnownSymbolLogic('split', function (SPLIT, nativeSplit, maybeCallNative) { var internalSplit; if ( 'abbc'.split(/(b)*/)[1] == 'c' || // eslint-disable-next-line regexp/no-empty-group -- required for testing 'test'.split(/(?:)/, -1).length != 4 || 'ab'.split(/(?:ab)*/).length != 2 || '.'.split(/(.?)(.?)/).length != 4 || // eslint-disable-next-line regexp/no-empty-capturing-group, regexp/no-empty-group -- required for testing '.'.split(/()()/).length > 1 || ''.split(/.?/).length ) { // based on es5-shim implementation, need to rework it internalSplit = function (separator, limit) { var string = toString(requireObjectCoercible(this)); var lim = limit === undefined ? MAX_UINT32 : limit >>> 0; if (lim === 0) return []; if (separator === undefined) return [string]; // If `separator` is not a regex, use native split if (!isRegExp(separator)) { return call(nativeSplit, string, separator, lim); } var output = []; var flags = (separator.ignoreCase ? 'i' : '') + (separator.multiline ? 'm' : '') + (separator.unicode ? 'u' : '') + (separator.sticky ? 'y' : ''); var lastLastIndex = 0; // Make `global` and avoid `lastIndex` issues by working with a copy var separatorCopy = new RegExp(separator.source, flags + 'g'); var match, lastIndex, lastLength; while (match = call(regexpExec, separatorCopy, string)) { lastIndex = separatorCopy.lastIndex; if (lastIndex > lastLastIndex) { push(output, stringSlice(string, lastLastIndex, match.index)); if (match.length > 1 && match.index < string.length) apply($push, output, arraySlice(match, 1)); lastLength = match[0].length; lastLastIndex = lastIndex; if (output.length >= lim) break; } if (separatorCopy.lastIndex === match.index) separatorCopy.lastIndex++; // Avoid an infinite loop } if (lastLastIndex === string.length) { if (lastLength || !exec(separatorCopy, '')) push(output, ''); } else push(output, stringSlice(string, lastLastIndex)); return output.length > lim ? arraySlice(output, 0, lim) : output; }; // Chakra, V8 } else if ('0'.split(undefined, 0).length) { internalSplit = function (separator, limit) { return separator === undefined && limit === 0 ? [] : call(nativeSplit, this, separator, limit); }; } else internalSplit = nativeSplit; return [ // `String.prototype.split` method // https://tc39.es/ecma262/#sec-string.prototype.split function split(separator, limit) { var O = requireObjectCoercible(this); var splitter = separator == undefined ? undefined : getMethod(separator, SPLIT); return splitter ? call(splitter, separator, O, limit) : call(internalSplit, toString(O), separator, limit); }, // `RegExp.prototype[@@split]` method // https://tc39.es/ecma262/#sec-regexp.prototype-@@split // // NOTE: This cannot be properly polyfilled in engines that don't support // the 'y' flag. function (string, limit) { var rx = anObject(this); var S = toString(string); var res = maybeCallNative(internalSplit, rx, S, limit, internalSplit !== nativeSplit); if (res.done) return res.value; var C = speciesConstructor(rx, RegExp); var unicodeMatching = rx.unicode; var flags = (rx.ignoreCase ? 'i' : '') + (rx.multiline ? 'm' : '') + (rx.unicode ? 'u' : '') + (UNSUPPORTED_Y ? 'g' : 'y'); // ^(? + rx + ) is needed, in combination with some S slicing, to // simulate the 'y' flag. var splitter = new C(UNSUPPORTED_Y ? '^(?:' + rx.source + ')' : rx, flags); var lim = limit === undefined ? MAX_UINT32 : limit >>> 0; if (lim === 0) return []; if (S.length === 0) return callRegExpExec(splitter, S) === null ? [S] : []; var p = 0; var q = 0; var A = []; while (q < S.length) { splitter.lastIndex = UNSUPPORTED_Y ? 0 : q; var z = callRegExpExec(splitter, UNSUPPORTED_Y ? stringSlice(S, q) : S); var e; if ( z === null || (e = min(toLength(splitter.lastIndex + (UNSUPPORTED_Y ? q : 0)), S.length)) === p ) { q = advanceStringIndex(S, q, unicodeMatching); } else { push(A, stringSlice(S, p, q)); if (A.length === lim) return A; for (var i = 1; i <= z.length - 1; i++) { push(A, z[i]); if (A.length === lim) return A; } q = p = e; } } push(A, stringSlice(S, p)); return A; } ]; }, !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC, UNSUPPORTED_Y); /***/ }), /***/ 7397: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { "use strict"; var $ = __webpack_require__(2109); var createHTML = __webpack_require__(4230); var forcedStringHTMLMethod = __webpack_require__(3429); // `String.prototype.strike` method // https://tc39.es/ecma262/#sec-string.prototype.strike $({ target: 'String', proto: true, forced: forcedStringHTMLMethod('strike') }, { strike: function strike() { return createHTML(this, 'strike', '', ''); } }); /***/ }), /***/ 3210: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { "use strict"; var $ = __webpack_require__(2109); var $trim = (__webpack_require__(3111).trim); var forcedStringTrimMethod = __webpack_require__(6091); // `String.prototype.trim` method // https://tc39.es/ecma262/#sec-string.prototype.trim $({ target: 'String', proto: true, forced: forcedStringTrimMethod('trim') }, { trim: function trim() { return $trim(this); } }); /***/ }), /***/ 1817: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { "use strict"; // `Symbol.prototype.description` getter // https://tc39.es/ecma262/#sec-symbol.prototype.description var $ = __webpack_require__(2109); var DESCRIPTORS = __webpack_require__(9781); var global = __webpack_require__(7854); var uncurryThis = __webpack_require__(1702); var hasOwn = __webpack_require__(2597); var isCallable = __webpack_require__(614); var isPrototypeOf = __webpack_require__(7976); var toString = __webpack_require__(1340); var defineProperty = (__webpack_require__(3070).f); var copyConstructorProperties = __webpack_require__(9920); var NativeSymbol = global.Symbol; var SymbolPrototype = NativeSymbol && NativeSymbol.prototype; if (DESCRIPTORS && isCallable(NativeSymbol) && (!('description' in SymbolPrototype) || // Safari 12 bug NativeSymbol().description !== undefined )) { var EmptyStringDescriptionStore = {}; // wrap Symbol constructor for correct work with undefined description var SymbolWrapper = function Symbol() { var description = arguments.length < 1 || arguments[0] === undefined ? undefined : toString(arguments[0]); var result = isPrototypeOf(SymbolPrototype, this) ? new NativeSymbol(description) // in Edge 13, String(Symbol(undefined)) === 'Symbol(undefined)' : description === undefined ? NativeSymbol() : NativeSymbol(description); if (description === '') EmptyStringDescriptionStore[result] = true; return result; }; copyConstructorProperties(SymbolWrapper, NativeSymbol); SymbolWrapper.prototype = SymbolPrototype; SymbolPrototype.constructor = SymbolWrapper; var NATIVE_SYMBOL = String(NativeSymbol('test')) == 'Symbol(test)'; var symbolToString = uncurryThis(SymbolPrototype.toString); var symbolValueOf = uncurryThis(SymbolPrototype.valueOf); var regexp = /^Symbol\((.*)\)[^)]+$/; var replace = uncurryThis(''.replace); var stringSlice = uncurryThis(''.slice); defineProperty(SymbolPrototype, 'description', { configurable: true, get: function description() { var symbol = symbolValueOf(this); var string = symbolToString(symbol); if (hasOwn(EmptyStringDescriptionStore, symbol)) return ''; var desc = NATIVE_SYMBOL ? stringSlice(string, 7, -1) : replace(string, regexp, '$1'); return desc === '' ? undefined : desc; } }); $({ global: true, forced: true }, { Symbol: SymbolWrapper }); } /***/ }), /***/ 2165: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { var defineWellKnownSymbol = __webpack_require__(7235); // `Symbol.iterator` well-known symbol // https://tc39.es/ecma262/#sec-symbol.iterator defineWellKnownSymbol('iterator'); /***/ }), /***/ 2526: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { "use strict"; var $ = __webpack_require__(2109); var global = __webpack_require__(7854); var getBuiltIn = __webpack_require__(5005); var apply = __webpack_require__(2104); var call = __webpack_require__(6916); var uncurryThis = __webpack_require__(1702); var IS_PURE = __webpack_require__(1913); var DESCRIPTORS = __webpack_require__(9781); var NATIVE_SYMBOL = __webpack_require__(133); var fails = __webpack_require__(7293); var hasOwn = __webpack_require__(2597); var isArray = __webpack_require__(3157); var isCallable = __webpack_require__(614); var isObject = __webpack_require__(111); var isPrototypeOf = __webpack_require__(7976); var isSymbol = __webpack_require__(2190); var anObject = __webpack_require__(9670); var toObject = __webpack_require__(7908); var toIndexedObject = __webpack_require__(5656); var toPropertyKey = __webpack_require__(4948); var $toString = __webpack_require__(1340); var createPropertyDescriptor = __webpack_require__(9114); var nativeObjectCreate = __webpack_require__(30); var objectKeys = __webpack_require__(1956); var getOwnPropertyNamesModule = __webpack_require__(8006); var getOwnPropertyNamesExternal = __webpack_require__(1156); var getOwnPropertySymbolsModule = __webpack_require__(5181); var getOwnPropertyDescriptorModule = __webpack_require__(1236); var definePropertyModule = __webpack_require__(3070); var propertyIsEnumerableModule = __webpack_require__(5296); var arraySlice = __webpack_require__(206); var redefine = __webpack_require__(1320); var shared = __webpack_require__(2309); var sharedKey = __webpack_require__(6200); var hiddenKeys = __webpack_require__(3501); var uid = __webpack_require__(9711); var wellKnownSymbol = __webpack_require__(5112); var wrappedWellKnownSymbolModule = __webpack_require__(6061); var defineWellKnownSymbol = __webpack_require__(7235); var setToStringTag = __webpack_require__(8003); var InternalStateModule = __webpack_require__(9909); var $forEach = (__webpack_require__(2092).forEach); var HIDDEN = sharedKey('hidden'); var SYMBOL = 'Symbol'; var PROTOTYPE = 'prototype'; var TO_PRIMITIVE = wellKnownSymbol('toPrimitive'); var setInternalState = InternalStateModule.set; var getInternalState = InternalStateModule.getterFor(SYMBOL); var ObjectPrototype = Object[PROTOTYPE]; var $Symbol = global.Symbol; var SymbolPrototype = $Symbol && $Symbol[PROTOTYPE]; var TypeError = global.TypeError; var QObject = global.QObject; var $stringify = getBuiltIn('JSON', 'stringify'); var nativeGetOwnPropertyDescriptor = getOwnPropertyDescriptorModule.f; var nativeDefineProperty = definePropertyModule.f; var nativeGetOwnPropertyNames = getOwnPropertyNamesExternal.f; var nativePropertyIsEnumerable = propertyIsEnumerableModule.f; var push = uncurryThis([].push); var AllSymbols = shared('symbols'); var ObjectPrototypeSymbols = shared('op-symbols'); var StringToSymbolRegistry = shared('string-to-symbol-registry'); var SymbolToStringRegistry = shared('symbol-to-string-registry'); var WellKnownSymbolsStore = shared('wks'); // Don't use setters in Qt Script, https://github.com/zloirock/core-js/issues/173 var USE_SETTER = !QObject || !QObject[PROTOTYPE] || !QObject[PROTOTYPE].findChild; // fallback for old Android, https://code.google.com/p/v8/issues/detail?id=687 var setSymbolDescriptor = DESCRIPTORS && fails(function () { return nativeObjectCreate(nativeDefineProperty({}, 'a', { get: function () { return nativeDefineProperty(this, 'a', { value: 7 }).a; } })).a != 7; }) ? function (O, P, Attributes) { var ObjectPrototypeDescriptor = nativeGetOwnPropertyDescriptor(ObjectPrototype, P); if (ObjectPrototypeDescriptor) delete ObjectPrototype[P]; nativeDefineProperty(O, P, Attributes); if (ObjectPrototypeDescriptor && O !== ObjectPrototype) { nativeDefineProperty(ObjectPrototype, P, ObjectPrototypeDescriptor); } } : nativeDefineProperty; var wrap = function (tag, description) { var symbol = AllSymbols[tag] = nativeObjectCreate(SymbolPrototype); setInternalState(symbol, { type: SYMBOL, tag: tag, description: description }); if (!DESCRIPTORS) symbol.description = description; return symbol; }; var $defineProperty = function defineProperty(O, P, Attributes) { if (O === ObjectPrototype) $defineProperty(ObjectPrototypeSymbols, P, Attributes); anObject(O); var key = toPropertyKey(P); anObject(Attributes); if (hasOwn(AllSymbols, key)) { if (!Attributes.enumerable) { if (!hasOwn(O, HIDDEN)) nativeDefineProperty(O, HIDDEN, createPropertyDescriptor(1, {})); O[HIDDEN][key] = true; } else { if (hasOwn(O, HIDDEN) && O[HIDDEN][key]) O[HIDDEN][key] = false; Attributes = nativeObjectCreate(Attributes, { enumerable: createPropertyDescriptor(0, false) }); } return setSymbolDescriptor(O, key, Attributes); } return nativeDefineProperty(O, key, Attributes); }; var $defineProperties = function defineProperties(O, Properties) { anObject(O); var properties = toIndexedObject(Properties); var keys = objectKeys(properties).concat($getOwnPropertySymbols(properties)); $forEach(keys, function (key) { if (!DESCRIPTORS || call($propertyIsEnumerable, properties, key)) $defineProperty(O, key, properties[key]); }); return O; }; var $create = function create(O, Properties) { return Properties === undefined ? nativeObjectCreate(O) : $defineProperties(nativeObjectCreate(O), Properties); }; var $propertyIsEnumerable = function propertyIsEnumerable(V) { var P = toPropertyKey(V); var enumerable = call(nativePropertyIsEnumerable, this, P); if (this === ObjectPrototype && hasOwn(AllSymbols, P) && !hasOwn(ObjectPrototypeSymbols, P)) return false; return enumerable || !hasOwn(this, P) || !hasOwn(AllSymbols, P) || hasOwn(this, HIDDEN) && this[HIDDEN][P] ? enumerable : true; }; var $getOwnPropertyDescriptor = function getOwnPropertyDescriptor(O, P) { var it = toIndexedObject(O); var key = toPropertyKey(P); if (it === ObjectPrototype && hasOwn(AllSymbols, key) && !hasOwn(ObjectPrototypeSymbols, key)) return; var descriptor = nativeGetOwnPropertyDescriptor(it, key); if (descriptor && hasOwn(AllSymbols, key) && !(hasOwn(it, HIDDEN) && it[HIDDEN][key])) { descriptor.enumerable = true; } return descriptor; }; var $getOwnPropertyNames = function getOwnPropertyNames(O) { var names = nativeGetOwnPropertyNames(toIndexedObject(O)); var result = []; $forEach(names, function (key) { if (!hasOwn(AllSymbols, key) && !hasOwn(hiddenKeys, key)) push(result, key); }); return result; }; var $getOwnPropertySymbols = function getOwnPropertySymbols(O) { var IS_OBJECT_PROTOTYPE = O === ObjectPrototype; var names = nativeGetOwnPropertyNames(IS_OBJECT_PROTOTYPE ? ObjectPrototypeSymbols : toIndexedObject(O)); var result = []; $forEach(names, function (key) { if (hasOwn(AllSymbols, key) && (!IS_OBJECT_PROTOTYPE || hasOwn(ObjectPrototype, key))) { push(result, AllSymbols[key]); } }); return result; }; // `Symbol` constructor // https://tc39.es/ecma262/#sec-symbol-constructor if (!NATIVE_SYMBOL) { $Symbol = function Symbol() { if (isPrototypeOf(SymbolPrototype, this)) throw TypeError('Symbol is not a constructor'); var description = !arguments.length || arguments[0] === undefined ? undefined : $toString(arguments[0]); var tag = uid(description); var setter = function (value) { if (this === ObjectPrototype) call(setter, ObjectPrototypeSymbols, value); if (hasOwn(this, HIDDEN) && hasOwn(this[HIDDEN], tag)) this[HIDDEN][tag] = false; setSymbolDescriptor(this, tag, createPropertyDescriptor(1, value)); }; if (DESCRIPTORS && USE_SETTER) setSymbolDescriptor(ObjectPrototype, tag, { configurable: true, set: setter }); return wrap(tag, description); }; SymbolPrototype = $Symbol[PROTOTYPE]; redefine(SymbolPrototype, 'toString', function toString() { return getInternalState(this).tag; }); redefine($Symbol, 'withoutSetter', function (description) { return wrap(uid(description), description); }); propertyIsEnumerableModule.f = $propertyIsEnumerable; definePropertyModule.f = $defineProperty; getOwnPropertyDescriptorModule.f = $getOwnPropertyDescriptor; getOwnPropertyNamesModule.f = getOwnPropertyNamesExternal.f = $getOwnPropertyNames; getOwnPropertySymbolsModule.f = $getOwnPropertySymbols; wrappedWellKnownSymbolModule.f = function (name) { return wrap(wellKnownSymbol(name), name); }; if (DESCRIPTORS) { // https://github.com/tc39/proposal-Symbol-description nativeDefineProperty(SymbolPrototype, 'description', { configurable: true, get: function description() { return getInternalState(this).description; } }); if (!IS_PURE) { redefine(ObjectPrototype, 'propertyIsEnumerable', $propertyIsEnumerable, { unsafe: true }); } } } $({ global: true, wrap: true, forced: !NATIVE_SYMBOL, sham: !NATIVE_SYMBOL }, { Symbol: $Symbol }); $forEach(objectKeys(WellKnownSymbolsStore), function (name) { defineWellKnownSymbol(name); }); $({ target: SYMBOL, stat: true, forced: !NATIVE_SYMBOL }, { // `Symbol.for` method // https://tc39.es/ecma262/#sec-symbol.for 'for': function (key) { var string = $toString(key); if (hasOwn(StringToSymbolRegistry, string)) return StringToSymbolRegistry[string]; var symbol = $Symbol(string); StringToSymbolRegistry[string] = symbol; SymbolToStringRegistry[symbol] = string; return symbol; }, // `Symbol.keyFor` method // https://tc39.es/ecma262/#sec-symbol.keyfor keyFor: function keyFor(sym) { if (!isSymbol(sym)) throw TypeError(sym + ' is not a symbol'); if (hasOwn(SymbolToStringRegistry, sym)) return SymbolToStringRegistry[sym]; }, useSetter: function () { USE_SETTER = true; }, useSimple: function () { USE_SETTER = false; } }); $({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL, sham: !DESCRIPTORS }, { // `Object.create` method // https://tc39.es/ecma262/#sec-object.create create: $create, // `Object.defineProperty` method // https://tc39.es/ecma262/#sec-object.defineproperty defineProperty: $defineProperty, // `Object.defineProperties` method // https://tc39.es/ecma262/#sec-object.defineproperties defineProperties: $defineProperties, // `Object.getOwnPropertyDescriptor` method // https://tc39.es/ecma262/#sec-object.getownpropertydescriptors getOwnPropertyDescriptor: $getOwnPropertyDescriptor }); $({ target: 'Object', stat: true, forced: !NATIVE_SYMBOL }, { // `Object.getOwnPropertyNames` method // https://tc39.es/ecma262/#sec-object.getownpropertynames getOwnPropertyNames: $getOwnPropertyNames, // `Object.getOwnPropertySymbols` method // https://tc39.es/ecma262/#sec-object.getownpropertysymbols getOwnPropertySymbols: $getOwnPropertySymbols }); // Chrome 38 and 39 `Object.getOwnPropertySymbols` fails on primitives // https://bugs.chromium.org/p/v8/issues/detail?id=3443 $({ target: 'Object', stat: true, forced: fails(function () { getOwnPropertySymbolsModule.f(1); }) }, { getOwnPropertySymbols: function getOwnPropertySymbols(it) { return getOwnPropertySymbolsModule.f(toObject(it)); } }); // `JSON.stringify` method behavior with symbols // https://tc39.es/ecma262/#sec-json.stringify if ($stringify) { var FORCED_JSON_STRINGIFY = !NATIVE_SYMBOL || fails(function () { var symbol = $Symbol(); // MS Edge converts symbol values to JSON as {} return $stringify([symbol]) != '[null]' // WebKit converts symbol values to JSON as null || $stringify({ a: symbol }) != '{}' // V8 throws on boxed symbols || $stringify(Object(symbol)) != '{}'; }); $({ target: 'JSON', stat: true, forced: FORCED_JSON_STRINGIFY }, { // eslint-disable-next-line no-unused-vars -- required for `.length` stringify: function stringify(it, replacer, space) { var args = arraySlice(arguments); var $replacer = replacer; if (!isObject(replacer) && it === undefined || isSymbol(it)) return; // IE8 returns string on undefined if (!isArray(replacer)) replacer = function (key, value) { if (isCallable($replacer)) value = call($replacer, this, key, value); if (!isSymbol(value)) return value; }; args[1] = replacer; return apply($stringify, null, args); } }); } // `Symbol.prototype[@@toPrimitive]` method // https://tc39.es/ecma262/#sec-symbol.prototype-@@toprimitive if (!SymbolPrototype[TO_PRIMITIVE]) { var valueOf = SymbolPrototype.valueOf; // eslint-disable-next-line no-unused-vars -- required for .length redefine(SymbolPrototype, TO_PRIMITIVE, function (hint) { // TODO: improve hint logic return call(valueOf, this); }); } // `Symbol.prototype[@@toStringTag]` property // https://tc39.es/ecma262/#sec-symbol.prototype-@@tostringtag setToStringTag($Symbol, SYMBOL); hiddenKeys[HIDDEN] = true; /***/ }), /***/ 6649: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { var defineWellKnownSymbol = __webpack_require__(7235); // `Symbol.toPrimitive` well-known symbol // https://tc39.es/ecma262/#sec-symbol.toprimitive defineWellKnownSymbol('toPrimitive'); /***/ }), /***/ 2990: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { "use strict"; var uncurryThis = __webpack_require__(1702); var ArrayBufferViewCore = __webpack_require__(2094); var $ArrayCopyWithin = __webpack_require__(1048); var u$ArrayCopyWithin = uncurryThis($ArrayCopyWithin); var aTypedArray = ArrayBufferViewCore.aTypedArray; var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; // `%TypedArray%.prototype.copyWithin` method // https://tc39.es/ecma262/#sec-%typedarray%.prototype.copywithin exportTypedArrayMethod('copyWithin', function copyWithin(target, start /* , end */) { return u$ArrayCopyWithin(aTypedArray(this), target, start, arguments.length > 2 ? arguments[2] : undefined); }); /***/ }), /***/ 8927: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { "use strict"; var ArrayBufferViewCore = __webpack_require__(2094); var $every = (__webpack_require__(2092).every); var aTypedArray = ArrayBufferViewCore.aTypedArray; var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; // `%TypedArray%.prototype.every` method // https://tc39.es/ecma262/#sec-%typedarray%.prototype.every exportTypedArrayMethod('every', function every(callbackfn /* , thisArg */) { return $every(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); }); /***/ }), /***/ 3105: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { "use strict"; var ArrayBufferViewCore = __webpack_require__(2094); var call = __webpack_require__(6916); var $fill = __webpack_require__(1285); var aTypedArray = ArrayBufferViewCore.aTypedArray; var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; // `%TypedArray%.prototype.fill` method // https://tc39.es/ecma262/#sec-%typedarray%.prototype.fill exportTypedArrayMethod('fill', function fill(value /* , start, end */) { var length = arguments.length; return call( $fill, aTypedArray(this), value, length > 1 ? arguments[1] : undefined, length > 2 ? arguments[2] : undefined ); }); /***/ }), /***/ 5035: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { "use strict"; var ArrayBufferViewCore = __webpack_require__(2094); var $filter = (__webpack_require__(2092).filter); var fromSpeciesAndList = __webpack_require__(3074); var aTypedArray = ArrayBufferViewCore.aTypedArray; var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; // `%TypedArray%.prototype.filter` method // https://tc39.es/ecma262/#sec-%typedarray%.prototype.filter exportTypedArrayMethod('filter', function filter(callbackfn /* , thisArg */) { var list = $filter(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); return fromSpeciesAndList(this, list); }); /***/ }), /***/ 7174: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { "use strict"; var ArrayBufferViewCore = __webpack_require__(2094); var $findIndex = (__webpack_require__(2092).findIndex); var aTypedArray = ArrayBufferViewCore.aTypedArray; var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; // `%TypedArray%.prototype.findIndex` method // https://tc39.es/ecma262/#sec-%typedarray%.prototype.findindex exportTypedArrayMethod('findIndex', function findIndex(predicate /* , thisArg */) { return $findIndex(aTypedArray(this), predicate, arguments.length > 1 ? arguments[1] : undefined); }); /***/ }), /***/ 4345: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { "use strict"; var ArrayBufferViewCore = __webpack_require__(2094); var $find = (__webpack_require__(2092).find); var aTypedArray = ArrayBufferViewCore.aTypedArray; var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; // `%TypedArray%.prototype.find` method // https://tc39.es/ecma262/#sec-%typedarray%.prototype.find exportTypedArrayMethod('find', function find(predicate /* , thisArg */) { return $find(aTypedArray(this), predicate, arguments.length > 1 ? arguments[1] : undefined); }); /***/ }), /***/ 4197: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { var createTypedArrayConstructor = __webpack_require__(9843); // `Float32Array` constructor // https://tc39.es/ecma262/#sec-typedarray-objects createTypedArrayConstructor('Float32', function (init) { return function Float32Array(data, byteOffset, length) { return init(this, data, byteOffset, length); }; }); /***/ }), /***/ 6495: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { var createTypedArrayConstructor = __webpack_require__(9843); // `Float64Array` constructor // https://tc39.es/ecma262/#sec-typedarray-objects createTypedArrayConstructor('Float64', function (init) { return function Float64Array(data, byteOffset, length) { return init(this, data, byteOffset, length); }; }); /***/ }), /***/ 2846: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { "use strict"; var ArrayBufferViewCore = __webpack_require__(2094); var $forEach = (__webpack_require__(2092).forEach); var aTypedArray = ArrayBufferViewCore.aTypedArray; var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; // `%TypedArray%.prototype.forEach` method // https://tc39.es/ecma262/#sec-%typedarray%.prototype.foreach exportTypedArrayMethod('forEach', function forEach(callbackfn /* , thisArg */) { $forEach(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); }); /***/ }), /***/ 8145: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { "use strict"; var TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS = __webpack_require__(3832); var exportTypedArrayStaticMethod = (__webpack_require__(2094).exportTypedArrayStaticMethod); var typedArrayFrom = __webpack_require__(7321); // `%TypedArray%.from` method // https://tc39.es/ecma262/#sec-%typedarray%.from exportTypedArrayStaticMethod('from', typedArrayFrom, TYPED_ARRAYS_CONSTRUCTORS_REQUIRES_WRAPPERS); /***/ }), /***/ 4731: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { "use strict"; var ArrayBufferViewCore = __webpack_require__(2094); var $includes = (__webpack_require__(1318).includes); var aTypedArray = ArrayBufferViewCore.aTypedArray; var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; // `%TypedArray%.prototype.includes` method // https://tc39.es/ecma262/#sec-%typedarray%.prototype.includes exportTypedArrayMethod('includes', function includes(searchElement /* , fromIndex */) { return $includes(aTypedArray(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); }); /***/ }), /***/ 7209: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { "use strict"; var ArrayBufferViewCore = __webpack_require__(2094); var $indexOf = (__webpack_require__(1318).indexOf); var aTypedArray = ArrayBufferViewCore.aTypedArray; var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; // `%TypedArray%.prototype.indexOf` method // https://tc39.es/ecma262/#sec-%typedarray%.prototype.indexof exportTypedArrayMethod('indexOf', function indexOf(searchElement /* , fromIndex */) { return $indexOf(aTypedArray(this), searchElement, arguments.length > 1 ? arguments[1] : undefined); }); /***/ }), /***/ 5109: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { var createTypedArrayConstructor = __webpack_require__(9843); // `Int16Array` constructor // https://tc39.es/ecma262/#sec-typedarray-objects createTypedArrayConstructor('Int16', function (init) { return function Int16Array(data, byteOffset, length) { return init(this, data, byteOffset, length); }; }); /***/ }), /***/ 5125: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { var createTypedArrayConstructor = __webpack_require__(9843); // `Int32Array` constructor // https://tc39.es/ecma262/#sec-typedarray-objects createTypedArrayConstructor('Int32', function (init) { return function Int32Array(data, byteOffset, length) { return init(this, data, byteOffset, length); }; }); /***/ }), /***/ 7145: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { var createTypedArrayConstructor = __webpack_require__(9843); // `Int8Array` constructor // https://tc39.es/ecma262/#sec-typedarray-objects createTypedArrayConstructor('Int8', function (init) { return function Int8Array(data, byteOffset, length) { return init(this, data, byteOffset, length); }; }); /***/ }), /***/ 6319: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { "use strict"; var global = __webpack_require__(7854); var uncurryThis = __webpack_require__(1702); var PROPER_FUNCTION_NAME = (__webpack_require__(6530).PROPER); var ArrayBufferViewCore = __webpack_require__(2094); var ArrayIterators = __webpack_require__(6992); var wellKnownSymbol = __webpack_require__(5112); var ITERATOR = wellKnownSymbol('iterator'); var Uint8Array = global.Uint8Array; var arrayValues = uncurryThis(ArrayIterators.values); var arrayKeys = uncurryThis(ArrayIterators.keys); var arrayEntries = uncurryThis(ArrayIterators.entries); var aTypedArray = ArrayBufferViewCore.aTypedArray; var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; var nativeTypedArrayIterator = Uint8Array && Uint8Array.prototype[ITERATOR]; var PROPER_ARRAY_VALUES_NAME = !!nativeTypedArrayIterator && nativeTypedArrayIterator.name === 'values'; var typedArrayValues = function values() { return arrayValues(aTypedArray(this)); }; // `%TypedArray%.prototype.entries` method // https://tc39.es/ecma262/#sec-%typedarray%.prototype.entries exportTypedArrayMethod('entries', function entries() { return arrayEntries(aTypedArray(this)); }); // `%TypedArray%.prototype.keys` method // https://tc39.es/ecma262/#sec-%typedarray%.prototype.keys exportTypedArrayMethod('keys', function keys() { return arrayKeys(aTypedArray(this)); }); // `%TypedArray%.prototype.values` method // https://tc39.es/ecma262/#sec-%typedarray%.prototype.values exportTypedArrayMethod('values', typedArrayValues, PROPER_FUNCTION_NAME && !PROPER_ARRAY_VALUES_NAME); // `%TypedArray%.prototype[@@iterator]` method // https://tc39.es/ecma262/#sec-%typedarray%.prototype-@@iterator exportTypedArrayMethod(ITERATOR, typedArrayValues, PROPER_FUNCTION_NAME && !PROPER_ARRAY_VALUES_NAME); /***/ }), /***/ 8867: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { "use strict"; var ArrayBufferViewCore = __webpack_require__(2094); var uncurryThis = __webpack_require__(1702); var aTypedArray = ArrayBufferViewCore.aTypedArray; var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; var $join = uncurryThis([].join); // `%TypedArray%.prototype.join` method // https://tc39.es/ecma262/#sec-%typedarray%.prototype.join exportTypedArrayMethod('join', function join(separator) { return $join(aTypedArray(this), separator); }); /***/ }), /***/ 7789: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { "use strict"; var ArrayBufferViewCore = __webpack_require__(2094); var apply = __webpack_require__(2104); var $lastIndexOf = __webpack_require__(6583); var aTypedArray = ArrayBufferViewCore.aTypedArray; var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; // `%TypedArray%.prototype.lastIndexOf` method // https://tc39.es/ecma262/#sec-%typedarray%.prototype.lastindexof exportTypedArrayMethod('lastIndexOf', function lastIndexOf(searchElement /* , fromIndex */) { var length = arguments.length; return apply($lastIndexOf, aTypedArray(this), length > 1 ? [searchElement, arguments[1]] : [searchElement]); }); /***/ }), /***/ 3739: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { "use strict"; var ArrayBufferViewCore = __webpack_require__(2094); var $map = (__webpack_require__(2092).map); var typedArraySpeciesConstructor = __webpack_require__(6304); var aTypedArray = ArrayBufferViewCore.aTypedArray; var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; // `%TypedArray%.prototype.map` method // https://tc39.es/ecma262/#sec-%typedarray%.prototype.map exportTypedArrayMethod('map', function map(mapfn /* , thisArg */) { return $map(aTypedArray(this), mapfn, arguments.length > 1 ? arguments[1] : undefined, function (O, length) { return new (typedArraySpeciesConstructor(O))(length); }); }); /***/ }), /***/ 4483: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { "use strict"; var ArrayBufferViewCore = __webpack_require__(2094); var $reduceRight = (__webpack_require__(3671).right); var aTypedArray = ArrayBufferViewCore.aTypedArray; var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; // `%TypedArray%.prototype.reduceRicht` method // https://tc39.es/ecma262/#sec-%typedarray%.prototype.reduceright exportTypedArrayMethod('reduceRight', function reduceRight(callbackfn /* , initialValue */) { var length = arguments.length; return $reduceRight(aTypedArray(this), callbackfn, length, length > 1 ? arguments[1] : undefined); }); /***/ }), /***/ 9368: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { "use strict"; var ArrayBufferViewCore = __webpack_require__(2094); var $reduce = (__webpack_require__(3671).left); var aTypedArray = ArrayBufferViewCore.aTypedArray; var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; // `%TypedArray%.prototype.reduce` method // https://tc39.es/ecma262/#sec-%typedarray%.prototype.reduce exportTypedArrayMethod('reduce', function reduce(callbackfn /* , initialValue */) { var length = arguments.length; return $reduce(aTypedArray(this), callbackfn, length, length > 1 ? arguments[1] : undefined); }); /***/ }), /***/ 2056: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { "use strict"; var ArrayBufferViewCore = __webpack_require__(2094); var aTypedArray = ArrayBufferViewCore.aTypedArray; var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; var floor = Math.floor; // `%TypedArray%.prototype.reverse` method // https://tc39.es/ecma262/#sec-%typedarray%.prototype.reverse exportTypedArrayMethod('reverse', function reverse() { var that = this; var length = aTypedArray(that).length; var middle = floor(length / 2); var index = 0; var value; while (index < middle) { value = that[index]; that[index++] = that[--length]; that[length] = value; } return that; }); /***/ }), /***/ 3462: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { "use strict"; var global = __webpack_require__(7854); var ArrayBufferViewCore = __webpack_require__(2094); var lengthOfArrayLike = __webpack_require__(6244); var toOffset = __webpack_require__(4590); var toObject = __webpack_require__(7908); var fails = __webpack_require__(7293); var RangeError = global.RangeError; var aTypedArray = ArrayBufferViewCore.aTypedArray; var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; var FORCED = fails(function () { // eslint-disable-next-line es/no-typed-arrays -- required for testing new Int8Array(1).set({}); }); // `%TypedArray%.prototype.set` method // https://tc39.es/ecma262/#sec-%typedarray%.prototype.set exportTypedArrayMethod('set', function set(arrayLike /* , offset */) { aTypedArray(this); var offset = toOffset(arguments.length > 1 ? arguments[1] : undefined, 1); var length = this.length; var src = toObject(arrayLike); var len = lengthOfArrayLike(src); var index = 0; if (len + offset > length) throw RangeError('Wrong length'); while (index < len) this[offset + index] = src[index++]; }, FORCED); /***/ }), /***/ 678: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { "use strict"; var ArrayBufferViewCore = __webpack_require__(2094); var typedArraySpeciesConstructor = __webpack_require__(6304); var fails = __webpack_require__(7293); var arraySlice = __webpack_require__(206); var aTypedArray = ArrayBufferViewCore.aTypedArray; var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; var FORCED = fails(function () { // eslint-disable-next-line es/no-typed-arrays -- required for testing new Int8Array(1).slice(); }); // `%TypedArray%.prototype.slice` method // https://tc39.es/ecma262/#sec-%typedarray%.prototype.slice exportTypedArrayMethod('slice', function slice(start, end) { var list = arraySlice(aTypedArray(this), start, end); var C = typedArraySpeciesConstructor(this); var index = 0; var length = list.length; var result = new C(length); while (length > index) result[index] = list[index++]; return result; }, FORCED); /***/ }), /***/ 7462: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { "use strict"; var ArrayBufferViewCore = __webpack_require__(2094); var $some = (__webpack_require__(2092).some); var aTypedArray = ArrayBufferViewCore.aTypedArray; var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; // `%TypedArray%.prototype.some` method // https://tc39.es/ecma262/#sec-%typedarray%.prototype.some exportTypedArrayMethod('some', function some(callbackfn /* , thisArg */) { return $some(aTypedArray(this), callbackfn, arguments.length > 1 ? arguments[1] : undefined); }); /***/ }), /***/ 3824: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { "use strict"; var global = __webpack_require__(7854); var uncurryThis = __webpack_require__(1702); var fails = __webpack_require__(7293); var aCallable = __webpack_require__(9662); var internalSort = __webpack_require__(4362); var ArrayBufferViewCore = __webpack_require__(2094); var FF = __webpack_require__(8886); var IE_OR_EDGE = __webpack_require__(256); var V8 = __webpack_require__(7392); var WEBKIT = __webpack_require__(8008); var Array = global.Array; var aTypedArray = ArrayBufferViewCore.aTypedArray; var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; var Uint16Array = global.Uint16Array; var un$Sort = Uint16Array && uncurryThis(Uint16Array.prototype.sort); // WebKit var ACCEPT_INCORRECT_ARGUMENTS = !!un$Sort && !(fails(function () { un$Sort(new Uint16Array(2), null); }) && fails(function () { un$Sort(new Uint16Array(2), {}); })); var STABLE_SORT = !!un$Sort && !fails(function () { // feature detection can be too slow, so check engines versions if (V8) return V8 < 74; if (FF) return FF < 67; if (IE_OR_EDGE) return true; if (WEBKIT) return WEBKIT < 602; var array = new Uint16Array(516); var expected = Array(516); var index, mod; for (index = 0; index < 516; index++) { mod = index % 4; array[index] = 515 - index; expected[index] = index - 2 * mod + 3; } un$Sort(array, function (a, b) { return (a / 4 | 0) - (b / 4 | 0); }); for (index = 0; index < 516; index++) { if (array[index] !== expected[index]) return true; } }); var getSortCompare = function (comparefn) { return function (x, y) { if (comparefn !== undefined) return +comparefn(x, y) || 0; // eslint-disable-next-line no-self-compare -- NaN check if (y !== y) return -1; // eslint-disable-next-line no-self-compare -- NaN check if (x !== x) return 1; if (x === 0 && y === 0) return 1 / x > 0 && 1 / y < 0 ? 1 : -1; return x > y; }; }; // `%TypedArray%.prototype.sort` method // https://tc39.es/ecma262/#sec-%typedarray%.prototype.sort exportTypedArrayMethod('sort', function sort(comparefn) { if (comparefn !== undefined) aCallable(comparefn); if (STABLE_SORT) return un$Sort(this, comparefn); return internalSort(aTypedArray(this), getSortCompare(comparefn)); }, !STABLE_SORT || ACCEPT_INCORRECT_ARGUMENTS); /***/ }), /***/ 5021: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { "use strict"; var ArrayBufferViewCore = __webpack_require__(2094); var toLength = __webpack_require__(7466); var toAbsoluteIndex = __webpack_require__(1400); var typedArraySpeciesConstructor = __webpack_require__(6304); var aTypedArray = ArrayBufferViewCore.aTypedArray; var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; // `%TypedArray%.prototype.subarray` method // https://tc39.es/ecma262/#sec-%typedarray%.prototype.subarray exportTypedArrayMethod('subarray', function subarray(begin, end) { var O = aTypedArray(this); var length = O.length; var beginIndex = toAbsoluteIndex(begin, length); var C = typedArraySpeciesConstructor(O); return new C( O.buffer, O.byteOffset + beginIndex * O.BYTES_PER_ELEMENT, toLength((end === undefined ? length : toAbsoluteIndex(end, length)) - beginIndex) ); }); /***/ }), /***/ 2974: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { "use strict"; var global = __webpack_require__(7854); var apply = __webpack_require__(2104); var ArrayBufferViewCore = __webpack_require__(2094); var fails = __webpack_require__(7293); var arraySlice = __webpack_require__(206); var Int8Array = global.Int8Array; var aTypedArray = ArrayBufferViewCore.aTypedArray; var exportTypedArrayMethod = ArrayBufferViewCore.exportTypedArrayMethod; var $toLocaleString = [].toLocaleString; // iOS Safari 6.x fails here var TO_LOCALE_STRING_BUG = !!Int8Array && fails(function () { $toLocaleString.call(new Int8Array(1)); }); var FORCED = fails(function () { return [1, 2].toLocaleString() != new Int8Array([1, 2]).toLocaleString(); }) || !fails(function () { Int8Array.prototype.toLocaleString.call([1, 2]); }); // `%TypedArray%.prototype.toLocaleString` method // https://tc39.es/ecma262/#sec-%typedarray%.prototype.tolocalestring exportTypedArrayMethod('toLocaleString', function toLocaleString() { return apply( $toLocaleString, TO_LOCALE_STRING_BUG ? arraySlice(aTypedArray(this)) : aTypedArray(this), arraySlice(arguments) ); }, FORCED); /***/ }), /***/ 5016: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { "use strict"; var exportTypedArrayMethod = (__webpack_require__(2094).exportTypedArrayMethod); var fails = __webpack_require__(7293); var global = __webpack_require__(7854); var uncurryThis = __webpack_require__(1702); var Uint8Array = global.Uint8Array; var Uint8ArrayPrototype = Uint8Array && Uint8Array.prototype || {}; var arrayToString = [].toString; var join = uncurryThis([].join); if (fails(function () { arrayToString.call({}); })) { arrayToString = function toString() { return join(this); }; } var IS_NOT_ARRAY_METHOD = Uint8ArrayPrototype.toString != arrayToString; // `%TypedArray%.prototype.toString` method // https://tc39.es/ecma262/#sec-%typedarray%.prototype.tostring exportTypedArrayMethod('toString', arrayToString, IS_NOT_ARRAY_METHOD); /***/ }), /***/ 8255: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { var createTypedArrayConstructor = __webpack_require__(9843); // `Uint16Array` constructor // https://tc39.es/ecma262/#sec-typedarray-objects createTypedArrayConstructor('Uint16', function (init) { return function Uint16Array(data, byteOffset, length) { return init(this, data, byteOffset, length); }; }); /***/ }), /***/ 9135: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { var createTypedArrayConstructor = __webpack_require__(9843); // `Uint32Array` constructor // https://tc39.es/ecma262/#sec-typedarray-objects createTypedArrayConstructor('Uint32', function (init) { return function Uint32Array(data, byteOffset, length) { return init(this, data, byteOffset, length); }; }); /***/ }), /***/ 2472: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { var createTypedArrayConstructor = __webpack_require__(9843); // `Uint8Array` constructor // https://tc39.es/ecma262/#sec-typedarray-objects createTypedArrayConstructor('Uint8', function (init) { return function Uint8Array(data, byteOffset, length) { return init(this, data, byteOffset, length); }; }); /***/ }), /***/ 9743: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { var createTypedArrayConstructor = __webpack_require__(9843); // `Uint8ClampedArray` constructor // https://tc39.es/ecma262/#sec-typedarray-objects createTypedArrayConstructor('Uint8', function (init) { return function Uint8ClampedArray(data, byteOffset, length) { return init(this, data, byteOffset, length); }; }, true); /***/ }), /***/ 8628: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { // TODO: Remove from `core-js@4` __webpack_require__(9170); /***/ }), /***/ 5743: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { // TODO: Remove from `core-js@4` __webpack_require__(5837); /***/ }), /***/ 7314: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { // TODO: Remove from `core-js@4` __webpack_require__(7922); /***/ }), /***/ 6290: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { // TODO: Remove from `core-js@4` __webpack_require__(4668); /***/ }), /***/ 7479: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { "use strict"; var $ = __webpack_require__(2109); var newPromiseCapabilityModule = __webpack_require__(8523); var perform = __webpack_require__(2534); // `Promise.try` method // https://github.com/tc39/proposal-promise-try $({ target: 'Promise', stat: true }, { 'try': function (callbackfn) { var promiseCapability = newPromiseCapabilityModule.f(this); var result = perform(callbackfn); (result.error ? promiseCapability.reject : promiseCapability.resolve)(result.value); return promiseCapability.promise; } }); /***/ }), /***/ 3728: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { // TODO: Remove from `core-js@4` __webpack_require__(6373); /***/ }), /***/ 4747: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { var global = __webpack_require__(7854); var DOMIterables = __webpack_require__(8324); var DOMTokenListPrototype = __webpack_require__(8509); var forEach = __webpack_require__(8533); var createNonEnumerableProperty = __webpack_require__(8880); var handlePrototype = function (CollectionPrototype) { // some Chrome versions have non-configurable methods on DOMTokenList if (CollectionPrototype && CollectionPrototype.forEach !== forEach) try { createNonEnumerableProperty(CollectionPrototype, 'forEach', forEach); } catch (error) { CollectionPrototype.forEach = forEach; } }; for (var COLLECTION_NAME in DOMIterables) { if (DOMIterables[COLLECTION_NAME]) { handlePrototype(global[COLLECTION_NAME] && global[COLLECTION_NAME].prototype); } } handlePrototype(DOMTokenListPrototype); /***/ }), /***/ 3948: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { var global = __webpack_require__(7854); var DOMIterables = __webpack_require__(8324); var DOMTokenListPrototype = __webpack_require__(8509); var ArrayIteratorMethods = __webpack_require__(6992); var createNonEnumerableProperty = __webpack_require__(8880); var wellKnownSymbol = __webpack_require__(5112); var ITERATOR = wellKnownSymbol('iterator'); var TO_STRING_TAG = wellKnownSymbol('toStringTag'); var ArrayValues = ArrayIteratorMethods.values; var handlePrototype = function (CollectionPrototype, COLLECTION_NAME) { if (CollectionPrototype) { // some Chrome versions have non-configurable methods on DOMTokenList if (CollectionPrototype[ITERATOR] !== ArrayValues) try { createNonEnumerableProperty(CollectionPrototype, ITERATOR, ArrayValues); } catch (error) { CollectionPrototype[ITERATOR] = ArrayValues; } if (!CollectionPrototype[TO_STRING_TAG]) { createNonEnumerableProperty(CollectionPrototype, TO_STRING_TAG, COLLECTION_NAME); } if (DOMIterables[COLLECTION_NAME]) for (var METHOD_NAME in ArrayIteratorMethods) { // some Chrome versions have non-configurable methods on DOMTokenList if (CollectionPrototype[METHOD_NAME] !== ArrayIteratorMethods[METHOD_NAME]) try { createNonEnumerableProperty(CollectionPrototype, METHOD_NAME, ArrayIteratorMethods[METHOD_NAME]); } catch (error) { CollectionPrototype[METHOD_NAME] = ArrayIteratorMethods[METHOD_NAME]; } } } }; for (var COLLECTION_NAME in DOMIterables) { handlePrototype(global[COLLECTION_NAME] && global[COLLECTION_NAME].prototype, COLLECTION_NAME); } handlePrototype(DOMTokenListPrototype, 'DOMTokenList'); /***/ }), /***/ 3753: /***/ (function(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) { "use strict"; var $ = __webpack_require__(2109); var call = __webpack_require__(6916); // `URL.prototype.toJSON` method // https://url.spec.whatwg.org/#dom-url-tojson $({ target: 'URL', proto: true, enumerable: true }, { toJSON: function toJSON() { return call(URL.prototype.toString, this); } }); /***/ }), /***/ 1150: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var parent = __webpack_require__(7633); __webpack_require__(3948); module.exports = parent; /***/ }), /***/ 251: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var objectKeys = __webpack_require__(2215); var isArguments = __webpack_require__(2584); var is = __webpack_require__(609); var isRegex = __webpack_require__(8420); var flags = __webpack_require__(2847); var isDate = __webpack_require__(8923); var getTime = Date.prototype.getTime; function deepEqual(actual, expected, options) { var opts = options || {}; // 7.1. All identical values are equivalent, as determined by ===. if (opts.strict ? is(actual, expected) : actual === expected) { return true; } // 7.3. Other pairs that do not both pass typeof value == 'object', equivalence is determined by ==. if (!actual || !expected || (typeof actual !== 'object' && typeof expected !== 'object')) { return opts.strict ? is(actual, expected) : actual == expected; } /* * 7.4. For all other Object pairs, including Array objects, equivalence is * determined by having the same number of owned properties (as verified * with Object.prototype.hasOwnProperty.call), the same set of keys * (although not necessarily the same order), equivalent values for every * corresponding key, and an identical 'prototype' property. Note: this * accounts for both named and indexed properties on Arrays. */ // eslint-disable-next-line no-use-before-define return objEquiv(actual, expected, opts); } function isUndefinedOrNull(value) { return value === null || value === undefined; } function isBuffer(x) { if (!x || typeof x !== 'object' || typeof x.length !== 'number') { return false; } if (typeof x.copy !== 'function' || typeof x.slice !== 'function') { return false; } if (x.length > 0 && typeof x[0] !== 'number') { return false; } return true; } function objEquiv(a, b, opts) { /* eslint max-statements: [2, 50] */ var i, key; if (typeof a !== typeof b) { return false; } if (isUndefinedOrNull(a) || isUndefinedOrNull(b)) { return false; } // an identical 'prototype' property. if (a.prototype !== b.prototype) { return false; } if (isArguments(a) !== isArguments(b)) { return false; } var aIsRegex = isRegex(a); var bIsRegex = isRegex(b); if (aIsRegex !== bIsRegex) { return false; } if (aIsRegex || bIsRegex) { return a.source === b.source && flags(a) === flags(b); } if (isDate(a) && isDate(b)) { return getTime.call(a) === getTime.call(b); } var aIsBuffer = isBuffer(a); var bIsBuffer = isBuffer(b); if (aIsBuffer !== bIsBuffer) { return false; } if (aIsBuffer || bIsBuffer) { // && would work too, because both are true or both false here if (a.length !== b.length) { return false; } for (i = 0; i < a.length; i++) { if (a[i] !== b[i]) { return false; } } return true; } if (typeof a !== typeof b) { return false; } try { var ka = objectKeys(a); var kb = objectKeys(b); } catch (e) { // happens when one is a string literal and the other isn't return false; } // having the same number of owned properties (keys incorporates hasOwnProperty) if (ka.length !== kb.length) { return false; } // the same set of keys (although not necessarily the same order), ka.sort(); kb.sort(); // ~~~cheap key test for (i = ka.length - 1; i >= 0; i--) { if (ka[i] != kb[i]) { return false; } } // equivalent values for every corresponding key, and ~~~possibly expensive deep test for (i = ka.length - 1; i >= 0; i--) { key = ka[i]; if (!deepEqual(a[key], b[key], opts)) { return false; } } return true; } module.exports = deepEqual; /***/ }), /***/ 4289: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var keys = __webpack_require__(2215); var hasSymbols = typeof Symbol === 'function' && typeof Symbol('foo') === 'symbol'; var toStr = Object.prototype.toString; var concat = Array.prototype.concat; var origDefineProperty = Object.defineProperty; var isFunction = function (fn) { return typeof fn === 'function' && toStr.call(fn) === '[object Function]'; }; var arePropertyDescriptorsSupported = function () { var obj = {}; try { origDefineProperty(obj, 'x', { enumerable: false, value: obj }); // eslint-disable-next-line no-unused-vars, no-restricted-syntax for (var _ in obj) { // jscs:ignore disallowUnusedVariables return false; } return obj.x === obj; } catch (e) { /* this is IE 8. */ return false; } }; var supportsDescriptors = origDefineProperty && arePropertyDescriptorsSupported(); var defineProperty = function (object, name, value, predicate) { if (name in object && (!isFunction(predicate) || !predicate())) { return; } if (supportsDescriptors) { origDefineProperty(object, name, { configurable: true, enumerable: false, value: value, writable: true }); } else { object[name] = value; } }; var defineProperties = function (object, map) { var predicates = arguments.length > 2 ? arguments[2] : {}; var props = keys(map); if (hasSymbols) { props = concat.call(props, Object.getOwnPropertySymbols(map)); } for (var i = 0; i < props.length; i += 1) { defineProperty(object, props[i], map[props[i]], predicates[props[i]]); } }; defineProperties.supportsDescriptors = !!supportsDescriptors; module.exports = defineProperties; /***/ }), /***/ 8091: /***/ (function(module) { "use strict"; /** * Code refactored from Mozilla Developer Network: * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/assign */ function assign(target, firstSource) { if (target === undefined || target === null) { throw new TypeError('Cannot convert first argument to object'); } var to = Object(target); for (var i = 1; i < arguments.length; i++) { var nextSource = arguments[i]; if (nextSource === undefined || nextSource === null) { continue; } var keysArray = Object.keys(Object(nextSource)); for (var nextIndex = 0, len = keysArray.length; nextIndex < len; nextIndex++) { var nextKey = keysArray[nextIndex]; var desc = Object.getOwnPropertyDescriptor(nextSource, nextKey); if (desc !== undefined && desc.enumerable) { to[nextKey] = nextSource[nextKey]; } } } return to; } function polyfill() { if (!Object.assign) { Object.defineProperty(Object, 'assign', { enumerable: false, configurable: true, writable: true, value: assign }); } } module.exports = { assign: assign, polyfill: polyfill }; /***/ }), /***/ 7187: /***/ (function(module) { "use strict"; // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. var R = typeof Reflect === 'object' ? Reflect : null var ReflectApply = R && typeof R.apply === 'function' ? R.apply : function ReflectApply(target, receiver, args) { return Function.prototype.apply.call(target, receiver, args); } var ReflectOwnKeys if (R && typeof R.ownKeys === 'function') { ReflectOwnKeys = R.ownKeys } else if (Object.getOwnPropertySymbols) { ReflectOwnKeys = function ReflectOwnKeys(target) { return Object.getOwnPropertyNames(target) .concat(Object.getOwnPropertySymbols(target)); }; } else { ReflectOwnKeys = function ReflectOwnKeys(target) { return Object.getOwnPropertyNames(target); }; } function ProcessEmitWarning(warning) { if (console && console.warn) console.warn(warning); } var NumberIsNaN = Number.isNaN || function NumberIsNaN(value) { return value !== value; } function EventEmitter() { EventEmitter.init.call(this); } module.exports = EventEmitter; module.exports.once = once; // Backwards-compat with node 0.10.x EventEmitter.EventEmitter = EventEmitter; EventEmitter.prototype._events = undefined; EventEmitter.prototype._eventsCount = 0; EventEmitter.prototype._maxListeners = undefined; // By default EventEmitters will print a warning if more than 10 listeners are // added to it. This is a useful default which helps finding memory leaks. var defaultMaxListeners = 10; function checkListener(listener) { if (typeof listener !== 'function') { throw new TypeError('The "listener" argument must be of type Function. Received type ' + typeof listener); } } Object.defineProperty(EventEmitter, 'defaultMaxListeners', { enumerable: true, get: function() { return defaultMaxListeners; }, set: function(arg) { if (typeof arg !== 'number' || arg < 0 || NumberIsNaN(arg)) { throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + arg + '.'); } defaultMaxListeners = arg; } }); EventEmitter.init = function() { if (this._events === undefined || this._events === Object.getPrototypeOf(this)._events) { this._events = Object.create(null); this._eventsCount = 0; } this._maxListeners = this._maxListeners || undefined; }; // Obviously not all Emitters should be limited to 10. This function allows // that to be increased. Set to zero for unlimited. EventEmitter.prototype.setMaxListeners = function setMaxListeners(n) { if (typeof n !== 'number' || n < 0 || NumberIsNaN(n)) { throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received ' + n + '.'); } this._maxListeners = n; return this; }; function _getMaxListeners(that) { if (that._maxListeners === undefined) return EventEmitter.defaultMaxListeners; return that._maxListeners; } EventEmitter.prototype.getMaxListeners = function getMaxListeners() { return _getMaxListeners(this); }; EventEmitter.prototype.emit = function emit(type) { var args = []; for (var i = 1; i < arguments.length; i++) args.push(arguments[i]); var doError = (type === 'error'); var events = this._events; if (events !== undefined) doError = (doError && events.error === undefined); else if (!doError) return false; // If there is no 'error' event listener then throw. if (doError) { var er; if (args.length > 0) er = args[0]; if (er instanceof Error) { // Note: The comments on the `throw` lines are intentional, they show // up in Node's output if this results in an unhandled exception. throw er; // Unhandled 'error' event } // At least give some kind of context to the user var err = new Error('Unhandled error.' + (er ? ' (' + er.message + ')' : '')); err.context = er; throw err; // Unhandled 'error' event } var handler = events[type]; if (handler === undefined) return false; if (typeof handler === 'function') { ReflectApply(handler, this, args); } else { var len = handler.length; var listeners = arrayClone(handler, len); for (var i = 0; i < len; ++i) ReflectApply(listeners[i], this, args); } return true; }; function _addListener(target, type, listener, prepend) { var m; var events; var existing; checkListener(listener); events = target._events; if (events === undefined) { events = target._events = Object.create(null); target._eventsCount = 0; } else { // To avoid recursion in the case that type === "newListener"! Before // adding it to the listeners, first emit "newListener". if (events.newListener !== undefined) { target.emit('newListener', type, listener.listener ? listener.listener : listener); // Re-assign `events` because a newListener handler could have caused the // this._events to be assigned to a new object events = target._events; } existing = events[type]; } if (existing === undefined) { // Optimize the case of one listener. Don't need the extra array object. existing = events[type] = listener; ++target._eventsCount; } else { if (typeof existing === 'function') { // Adding the second element, need to change to array. existing = events[type] = prepend ? [listener, existing] : [existing, listener]; // If we've already got an array, just append. } else if (prepend) { existing.unshift(listener); } else { existing.push(listener); } // Check for listener leak m = _getMaxListeners(target); if (m > 0 && existing.length > m && !existing.warned) { existing.warned = true; // No error code for this since it is a Warning // eslint-disable-next-line no-restricted-syntax var w = new Error('Possible EventEmitter memory leak detected. ' + existing.length + ' ' + String(type) + ' listeners ' + 'added. Use emitter.setMaxListeners() to ' + 'increase limit'); w.name = 'MaxListenersExceededWarning'; w.emitter = target; w.type = type; w.count = existing.length; ProcessEmitWarning(w); } } return target; } EventEmitter.prototype.addListener = function addListener(type, listener) { return _addListener(this, type, listener, false); }; EventEmitter.prototype.on = EventEmitter.prototype.addListener; EventEmitter.prototype.prependListener = function prependListener(type, listener) { return _addListener(this, type, listener, true); }; function onceWrapper() { if (!this.fired) { this.target.removeListener(this.type, this.wrapFn); this.fired = true; if (arguments.length === 0) return this.listener.call(this.target); return this.listener.apply(this.target, arguments); } } function _onceWrap(target, type, listener) { var state = { fired: false, wrapFn: undefined, target: target, type: type, listener: listener }; var wrapped = onceWrapper.bind(state); wrapped.listener = listener; state.wrapFn = wrapped; return wrapped; } EventEmitter.prototype.once = function once(type, listener) { checkListener(listener); this.on(type, _onceWrap(this, type, listener)); return this; }; EventEmitter.prototype.prependOnceListener = function prependOnceListener(type, listener) { checkListener(listener); this.prependListener(type, _onceWrap(this, type, listener)); return this; }; // Emits a 'removeListener' event if and only if the listener was removed. EventEmitter.prototype.removeListener = function removeListener(type, listener) { var list, events, position, i, originalListener; checkListener(listener); events = this._events; if (events === undefined) return this; list = events[type]; if (list === undefined) return this; if (list === listener || list.listener === listener) { if (--this._eventsCount === 0) this._events = Object.create(null); else { delete events[type]; if (events.removeListener) this.emit('removeListener', type, list.listener || listener); } } else if (typeof list !== 'function') { position = -1; for (i = list.length - 1; i >= 0; i--) { if (list[i] === listener || list[i].listener === listener) { originalListener = list[i].listener; position = i; break; } } if (position < 0) return this; if (position === 0) list.shift(); else { spliceOne(list, position); } if (list.length === 1) events[type] = list[0]; if (events.removeListener !== undefined) this.emit('removeListener', type, originalListener || listener); } return this; }; EventEmitter.prototype.off = EventEmitter.prototype.removeListener; EventEmitter.prototype.removeAllListeners = function removeAllListeners(type) { var listeners, events, i; events = this._events; if (events === undefined) return this; // not listening for removeListener, no need to emit if (events.removeListener === undefined) { if (arguments.length === 0) { this._events = Object.create(null); this._eventsCount = 0; } else if (events[type] !== undefined) { if (--this._eventsCount === 0) this._events = Object.create(null); else delete events[type]; } return this; } // emit removeListener for all listeners on all events if (arguments.length === 0) { var keys = Object.keys(events); var key; for (i = 0; i < keys.length; ++i) { key = keys[i]; if (key === 'removeListener') continue; this.removeAllListeners(key); } this.removeAllListeners('removeListener'); this._events = Object.create(null); this._eventsCount = 0; return this; } listeners = events[type]; if (typeof listeners === 'function') { this.removeListener(type, listeners); } else if (listeners !== undefined) { // LIFO order for (i = listeners.length - 1; i >= 0; i--) { this.removeListener(type, listeners[i]); } } return this; }; function _listeners(target, type, unwrap) { var events = target._events; if (events === undefined) return []; var evlistener = events[type]; if (evlistener === undefined) return []; if (typeof evlistener === 'function') return unwrap ? [evlistener.listener || evlistener] : [evlistener]; return unwrap ? unwrapListeners(evlistener) : arrayClone(evlistener, evlistener.length); } EventEmitter.prototype.listeners = function listeners(type) { return _listeners(this, type, true); }; EventEmitter.prototype.rawListeners = function rawListeners(type) { return _listeners(this, type, false); }; EventEmitter.listenerCount = function(emitter, type) { if (typeof emitter.listenerCount === 'function') { return emitter.listenerCount(type); } else { return listenerCount.call(emitter, type); } }; EventEmitter.prototype.listenerCount = listenerCount; function listenerCount(type) { var events = this._events; if (events !== undefined) { var evlistener = events[type]; if (typeof evlistener === 'function') { return 1; } else if (evlistener !== undefined) { return evlistener.length; } } return 0; } EventEmitter.prototype.eventNames = function eventNames() { return this._eventsCount > 0 ? ReflectOwnKeys(this._events) : []; }; function arrayClone(arr, n) { var copy = new Array(n); for (var i = 0; i < n; ++i) copy[i] = arr[i]; return copy; } function spliceOne(list, index) { for (; index + 1 < list.length; index++) list[index] = list[index + 1]; list.pop(); } function unwrapListeners(arr) { var ret = new Array(arr.length); for (var i = 0; i < ret.length; ++i) { ret[i] = arr[i].listener || arr[i]; } return ret; } function once(emitter, name) { return new Promise(function (resolve, reject) { function errorListener(err) { emitter.removeListener(name, resolver); reject(err); } function resolver() { if (typeof emitter.removeListener === 'function') { emitter.removeListener('error', errorListener); } resolve([].slice.call(arguments)); }; eventTargetAgnosticAddListener(emitter, name, resolver, { once: true }); if (name !== 'error') { addErrorHandlerIfEventEmitter(emitter, errorListener, { once: true }); } }); } function addErrorHandlerIfEventEmitter(emitter, handler, flags) { if (typeof emitter.on === 'function') { eventTargetAgnosticAddListener(emitter, 'error', handler, flags); } } function eventTargetAgnosticAddListener(emitter, name, listener, flags) { if (typeof emitter.on === 'function') { if (flags.once) { emitter.once(name, listener); } else { emitter.on(name, listener); } } else if (typeof emitter.addEventListener === 'function') { // EventTarget does not have `error` event semantics like Node // EventEmitters, we do not listen for `error` events here. emitter.addEventListener(name, function wrapListener(arg) { // IE does not have builtin `{ once: true }` support so we // have to do it manually. if (flags.once) { emitter.removeEventListener(name, wrapListener); } listener(arg); }); } else { throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type ' + typeof emitter); } } /***/ }), /***/ 2536: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { var ___EXPOSE_LOADER_IMPORT___ = __webpack_require__(4275); var ___EXPOSE_LOADER_GET_GLOBAL_THIS___ = __webpack_require__(7672); var ___EXPOSE_LOADER_GLOBAL_THIS___ = ___EXPOSE_LOADER_GET_GLOBAL_THIS___; if (typeof ___EXPOSE_LOADER_GLOBAL_THIS___["pdfMake"] === 'undefined') ___EXPOSE_LOADER_GLOBAL_THIS___["pdfMake"] = ___EXPOSE_LOADER_IMPORT___; module.exports = ___EXPOSE_LOADER_IMPORT___; /***/ }), /***/ 7672: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; // eslint-disable-next-line func-names module.exports = function () { if (typeof globalThis === "object") { return globalThis; } var g; try { // This works if eval is allowed (see CSP) // eslint-disable-next-line no-new-func g = this || new Function("return this")(); } catch (e) { // This works if the window reference is available if (typeof window === "object") { return window; } // This works if the self reference is available if (typeof self === "object") { return self; } // This works if the global reference is available if (typeof __webpack_require__.g !== "undefined") { return __webpack_require__.g; } } return g; }(); /***/ }), /***/ 9804: /***/ (function(module) { var hasOwn = Object.prototype.hasOwnProperty; var toString = Object.prototype.toString; module.exports = function forEach (obj, fn, ctx) { if (toString.call(fn) !== '[object Function]') { throw new TypeError('iterator must be a function'); } var l = obj.length; if (l === +l) { for (var i = 0; i < l; i++) { fn.call(ctx, obj[i], i, obj); } } else { for (var k in obj) { if (hasOwn.call(obj, k)) { fn.call(ctx, obj[k], k, obj); } } } }; /***/ }), /***/ 7648: /***/ (function(module) { "use strict"; /* eslint no-invalid-this: 1 */ var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible '; var slice = Array.prototype.slice; var toStr = Object.prototype.toString; var funcType = '[object Function]'; module.exports = function bind(that) { var target = this; if (typeof target !== 'function' || toStr.call(target) !== funcType) { throw new TypeError(ERROR_MESSAGE + target); } var args = slice.call(arguments, 1); var bound; var binder = function () { if (this instanceof bound) { var result = target.apply( this, args.concat(slice.call(arguments)) ); if (Object(result) === result) { return result; } return this; } else { return target.apply( that, args.concat(slice.call(arguments)) ); } }; var boundLength = Math.max(0, target.length - args.length); var boundArgs = []; for (var i = 0; i < boundLength; i++) { boundArgs.push('$' + i); } bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder); if (target.prototype) { var Empty = function Empty() {}; Empty.prototype = target.prototype; bound.prototype = new Empty(); Empty.prototype = null; } return bound; }; /***/ }), /***/ 8612: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var implementation = __webpack_require__(7648); module.exports = Function.prototype.bind || implementation; /***/ }), /***/ 210: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var undefined; var $SyntaxError = SyntaxError; var $Function = Function; var $TypeError = TypeError; // eslint-disable-next-line consistent-return var getEvalledConstructor = function (expressionSyntax) { try { return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')(); } catch (e) {} }; var $gOPD = Object.getOwnPropertyDescriptor; if ($gOPD) { try { $gOPD({}, ''); } catch (e) { $gOPD = null; // this is IE 8, which has a broken gOPD } } var throwTypeError = function () { throw new $TypeError(); }; var ThrowTypeError = $gOPD ? (function () { try { // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties arguments.callee; // IE 8 does not throw here return throwTypeError; } catch (calleeThrows) { try { // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '') return $gOPD(arguments, 'callee').get; } catch (gOPDthrows) { return throwTypeError; } } }()) : throwTypeError; var hasSymbols = __webpack_require__(1405)(); var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto var needsEval = {}; var TypedArray = typeof Uint8Array === 'undefined' ? undefined : getProto(Uint8Array); var INTRINSICS = { '%AggregateError%': typeof AggregateError === 'undefined' ? undefined : AggregateError, '%Array%': Array, '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined : ArrayBuffer, '%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined, '%AsyncFromSyncIteratorPrototype%': undefined, '%AsyncFunction%': needsEval, '%AsyncGenerator%': needsEval, '%AsyncGeneratorFunction%': needsEval, '%AsyncIteratorPrototype%': needsEval, '%Atomics%': typeof Atomics === 'undefined' ? undefined : Atomics, '%BigInt%': typeof BigInt === 'undefined' ? undefined : BigInt, '%Boolean%': Boolean, '%DataView%': typeof DataView === 'undefined' ? undefined : DataView, '%Date%': Date, '%decodeURI%': decodeURI, '%decodeURIComponent%': decodeURIComponent, '%encodeURI%': encodeURI, '%encodeURIComponent%': encodeURIComponent, '%Error%': Error, '%eval%': eval, // eslint-disable-line no-eval '%EvalError%': EvalError, '%Float32Array%': typeof Float32Array === 'undefined' ? undefined : Float32Array, '%Float64Array%': typeof Float64Array === 'undefined' ? undefined : Float64Array, '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined : FinalizationRegistry, '%Function%': $Function, '%GeneratorFunction%': needsEval, '%Int8Array%': typeof Int8Array === 'undefined' ? undefined : Int8Array, '%Int16Array%': typeof Int16Array === 'undefined' ? undefined : Int16Array, '%Int32Array%': typeof Int32Array === 'undefined' ? undefined : Int32Array, '%isFinite%': isFinite, '%isNaN%': isNaN, '%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined, '%JSON%': typeof JSON === 'object' ? JSON : undefined, '%Map%': typeof Map === 'undefined' ? undefined : Map, '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined : getProto(new Map()[Symbol.iterator]()), '%Math%': Math, '%Number%': Number, '%Object%': Object, '%parseFloat%': parseFloat, '%parseInt%': parseInt, '%Promise%': typeof Promise === 'undefined' ? undefined : Promise, '%Proxy%': typeof Proxy === 'undefined' ? undefined : Proxy, '%RangeError%': RangeError, '%ReferenceError%': ReferenceError, '%Reflect%': typeof Reflect === 'undefined' ? undefined : Reflect, '%RegExp%': RegExp, '%Set%': typeof Set === 'undefined' ? undefined : Set, '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined : getProto(new Set()[Symbol.iterator]()), '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined : SharedArrayBuffer, '%String%': String, '%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined, '%Symbol%': hasSymbols ? Symbol : undefined, '%SyntaxError%': $SyntaxError, '%ThrowTypeError%': ThrowTypeError, '%TypedArray%': TypedArray, '%TypeError%': $TypeError, '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined : Uint8Array, '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined : Uint8ClampedArray, '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined : Uint16Array, '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined : Uint32Array, '%URIError%': URIError, '%WeakMap%': typeof WeakMap === 'undefined' ? undefined : WeakMap, '%WeakRef%': typeof WeakRef === 'undefined' ? undefined : WeakRef, '%WeakSet%': typeof WeakSet === 'undefined' ? undefined : WeakSet }; var doEval = function doEval(name) { var value; if (name === '%AsyncFunction%') { value = getEvalledConstructor('async function () {}'); } else if (name === '%GeneratorFunction%') { value = getEvalledConstructor('function* () {}'); } else if (name === '%AsyncGeneratorFunction%') { value = getEvalledConstructor('async function* () {}'); } else if (name === '%AsyncGenerator%') { var fn = doEval('%AsyncGeneratorFunction%'); if (fn) { value = fn.prototype; } } else if (name === '%AsyncIteratorPrototype%') { var gen = doEval('%AsyncGenerator%'); if (gen) { value = getProto(gen.prototype); } } INTRINSICS[name] = value; return value; }; var LEGACY_ALIASES = { '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'], '%ArrayPrototype%': ['Array', 'prototype'], '%ArrayProto_entries%': ['Array', 'prototype', 'entries'], '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'], '%ArrayProto_keys%': ['Array', 'prototype', 'keys'], '%ArrayProto_values%': ['Array', 'prototype', 'values'], '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'], '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'], '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'], '%BooleanPrototype%': ['Boolean', 'prototype'], '%DataViewPrototype%': ['DataView', 'prototype'], '%DatePrototype%': ['Date', 'prototype'], '%ErrorPrototype%': ['Error', 'prototype'], '%EvalErrorPrototype%': ['EvalError', 'prototype'], '%Float32ArrayPrototype%': ['Float32Array', 'prototype'], '%Float64ArrayPrototype%': ['Float64Array', 'prototype'], '%FunctionPrototype%': ['Function', 'prototype'], '%Generator%': ['GeneratorFunction', 'prototype'], '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'], '%Int8ArrayPrototype%': ['Int8Array', 'prototype'], '%Int16ArrayPrototype%': ['Int16Array', 'prototype'], '%Int32ArrayPrototype%': ['Int32Array', 'prototype'], '%JSONParse%': ['JSON', 'parse'], '%JSONStringify%': ['JSON', 'stringify'], '%MapPrototype%': ['Map', 'prototype'], '%NumberPrototype%': ['Number', 'prototype'], '%ObjectPrototype%': ['Object', 'prototype'], '%ObjProto_toString%': ['Object', 'prototype', 'toString'], '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'], '%PromisePrototype%': ['Promise', 'prototype'], '%PromiseProto_then%': ['Promise', 'prototype', 'then'], '%Promise_all%': ['Promise', 'all'], '%Promise_reject%': ['Promise', 'reject'], '%Promise_resolve%': ['Promise', 'resolve'], '%RangeErrorPrototype%': ['RangeError', 'prototype'], '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'], '%RegExpPrototype%': ['RegExp', 'prototype'], '%SetPrototype%': ['Set', 'prototype'], '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'], '%StringPrototype%': ['String', 'prototype'], '%SymbolPrototype%': ['Symbol', 'prototype'], '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'], '%TypedArrayPrototype%': ['TypedArray', 'prototype'], '%TypeErrorPrototype%': ['TypeError', 'prototype'], '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'], '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'], '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'], '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'], '%URIErrorPrototype%': ['URIError', 'prototype'], '%WeakMapPrototype%': ['WeakMap', 'prototype'], '%WeakSetPrototype%': ['WeakSet', 'prototype'] }; var bind = __webpack_require__(8612); var hasOwn = __webpack_require__(7642); var $concat = bind.call(Function.call, Array.prototype.concat); var $spliceApply = bind.call(Function.apply, Array.prototype.splice); var $replace = bind.call(Function.call, String.prototype.replace); var $strSlice = bind.call(Function.call, String.prototype.slice); /* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */ var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */ var stringToPath = function stringToPath(string) { var first = $strSlice(string, 0, 1); var last = $strSlice(string, -1); if (first === '%' && last !== '%') { throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`'); } else if (last === '%' && first !== '%') { throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`'); } var result = []; $replace(string, rePropName, function (match, number, quote, subString) { result[result.length] = quote ? $replace(subString, reEscapeChar, '$1') : number || match; }); return result; }; /* end adaptation */ var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) { var intrinsicName = name; var alias; if (hasOwn(LEGACY_ALIASES, intrinsicName)) { alias = LEGACY_ALIASES[intrinsicName]; intrinsicName = '%' + alias[0] + '%'; } if (hasOwn(INTRINSICS, intrinsicName)) { var value = INTRINSICS[intrinsicName]; if (value === needsEval) { value = doEval(intrinsicName); } if (typeof value === 'undefined' && !allowMissing) { throw new $TypeError('intrinsic ' + name + ' exists, but is not available. Please file an issue!'); } return { alias: alias, name: intrinsicName, value: value }; } throw new $SyntaxError('intrinsic ' + name + ' does not exist!'); }; module.exports = function GetIntrinsic(name, allowMissing) { if (typeof name !== 'string' || name.length === 0) { throw new $TypeError('intrinsic name must be a non-empty string'); } if (arguments.length > 1 && typeof allowMissing !== 'boolean') { throw new $TypeError('"allowMissing" argument must be a boolean'); } var parts = stringToPath(name); var intrinsicBaseName = parts.length > 0 ? parts[0] : ''; var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing); var intrinsicRealName = intrinsic.name; var value = intrinsic.value; var skipFurtherCaching = false; var alias = intrinsic.alias; if (alias) { intrinsicBaseName = alias[0]; $spliceApply(parts, $concat([0, 1], alias)); } for (var i = 1, isOwn = true; i < parts.length; i += 1) { var part = parts[i]; var first = $strSlice(part, 0, 1); var last = $strSlice(part, -1); if ( ( (first === '"' || first === "'" || first === '`') || (last === '"' || last === "'" || last === '`') ) && first !== last ) { throw new $SyntaxError('property names with quotes must have matching quotes'); } if (part === 'constructor' || !isOwn) { skipFurtherCaching = true; } intrinsicBaseName += '.' + part; intrinsicRealName = '%' + intrinsicBaseName + '%'; if (hasOwn(INTRINSICS, intrinsicRealName)) { value = INTRINSICS[intrinsicRealName]; } else if (value != null) { if (!(part in value)) { if (!allowMissing) { throw new $TypeError('base intrinsic for ' + name + ' exists, but the property is not available.'); } return void undefined; } if ($gOPD && (i + 1) >= parts.length) { var desc = $gOPD(value, part); isOwn = !!desc; // By convention, when a data property is converted to an accessor // property to emulate a data property that does not suffer from // the override mistake, that accessor's getter is marked with // an `originalValue` property. Here, when we detect this, we // uphold the illusion by pretending to see that original data // property, i.e., returning the value rather than the getter // itself. if (isOwn && 'get' in desc && !('originalValue' in desc.get)) { value = desc.get; } else { value = value[part]; } } else { isOwn = hasOwn(value, part); value = value[part]; } if (isOwn && !skipFurtherCaching) { INTRINSICS[intrinsicRealName] = value; } } } return value; }; /***/ }), /***/ 1405: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var origSymbol = typeof Symbol !== 'undefined' && Symbol; var hasSymbolSham = __webpack_require__(5419); module.exports = function hasNativeSymbols() { if (typeof origSymbol !== 'function') { return false; } if (typeof Symbol !== 'function') { return false; } if (typeof origSymbol('foo') !== 'symbol') { return false; } if (typeof Symbol('bar') !== 'symbol') { return false; } return hasSymbolSham(); }; /***/ }), /***/ 5419: /***/ (function(module) { "use strict"; /* eslint complexity: [2, 18], max-statements: [2, 33] */ module.exports = function hasSymbols() { if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; } if (typeof Symbol.iterator === 'symbol') { return true; } var obj = {}; var sym = Symbol('test'); var symObj = Object(sym); if (typeof sym === 'string') { return false; } if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; } if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; } // temp disabled per https://github.com/ljharb/object.assign/issues/17 // if (sym instanceof Symbol) { return false; } // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4 // if (!(symObj instanceof Symbol)) { return false; } // if (typeof Symbol.prototype.toString !== 'function') { return false; } // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; } var symVal = 42; obj[sym] = symVal; for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; } if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; } var syms = Object.getOwnPropertySymbols(obj); if (syms.length !== 1 || syms[0] !== sym) { return false; } if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; } if (typeof Object.getOwnPropertyDescriptor === 'function') { var descriptor = Object.getOwnPropertyDescriptor(obj, sym); if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; } } return true; }; /***/ }), /***/ 6410: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var hasSymbols = __webpack_require__(5419); module.exports = function hasToStringTagShams() { return hasSymbols() && !!Symbol.toStringTag; }; /***/ }), /***/ 7642: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var bind = __webpack_require__(8612); module.exports = bind.call(Function.call, Object.prototype.hasOwnProperty); /***/ }), /***/ 688: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var Buffer = (__webpack_require__(7103).Buffer); // Multibyte codec. In this scheme, a character is represented by 1 or more bytes. // Our codec supports UTF-16 surrogates, extensions for GB18030 and unicode sequences. // To save memory and loading time, we read table files only when requested. exports._dbcs = DBCSCodec; var UNASSIGNED = -1, GB18030_CODE = -2, SEQ_START = -10, NODE_START = -1000, UNASSIGNED_NODE = new Array(0x100), DEF_CHAR = -1; for (var i = 0; i < 0x100; i++) UNASSIGNED_NODE[i] = UNASSIGNED; // Class DBCSCodec reads and initializes mapping tables. function DBCSCodec(codecOptions, iconv) { this.encodingName = codecOptions.encodingName; if (!codecOptions) throw new Error("DBCS codec is called without the data.") if (!codecOptions.table) throw new Error("Encoding '" + this.encodingName + "' has no data."); // Load tables. var mappingTable = codecOptions.table(); // Decode tables: MBCS -> Unicode. // decodeTables is a trie, encoded as an array of arrays of integers. Internal arrays are trie nodes and all have len = 256. // Trie root is decodeTables[0]. // Values: >= 0 -> unicode character code. can be > 0xFFFF // == UNASSIGNED -> unknown/unassigned sequence. // == GB18030_CODE -> this is the end of a GB18030 4-byte sequence. // <= NODE_START -> index of the next node in our trie to process next byte. // <= SEQ_START -> index of the start of a character code sequence, in decodeTableSeq. this.decodeTables = []; this.decodeTables[0] = UNASSIGNED_NODE.slice(0); // Create root node. // Sometimes a MBCS char corresponds to a sequence of unicode chars. We store them as arrays of integers here. this.decodeTableSeq = []; // Actual mapping tables consist of chunks. Use them to fill up decode tables. for (var i = 0; i < mappingTable.length; i++) this._addDecodeChunk(mappingTable[i]); // Load & create GB18030 tables when needed. if (typeof codecOptions.gb18030 === 'function') { this.gb18030 = codecOptions.gb18030(); // Load GB18030 ranges. // Add GB18030 common decode nodes. var commonThirdByteNodeIdx = this.decodeTables.length; this.decodeTables.push(UNASSIGNED_NODE.slice(0)); var commonFourthByteNodeIdx = this.decodeTables.length; this.decodeTables.push(UNASSIGNED_NODE.slice(0)); // Fill out the tree var firstByteNode = this.decodeTables[0]; for (var i = 0x81; i <= 0xFE; i++) { var secondByteNode = this.decodeTables[NODE_START - firstByteNode[i]]; for (var j = 0x30; j <= 0x39; j++) { if (secondByteNode[j] === UNASSIGNED) { secondByteNode[j] = NODE_START - commonThirdByteNodeIdx; } else if (secondByteNode[j] > NODE_START) { throw new Error("gb18030 decode tables conflict at byte 2"); } var thirdByteNode = this.decodeTables[NODE_START - secondByteNode[j]]; for (var k = 0x81; k <= 0xFE; k++) { if (thirdByteNode[k] === UNASSIGNED) { thirdByteNode[k] = NODE_START - commonFourthByteNodeIdx; } else if (thirdByteNode[k] === NODE_START - commonFourthByteNodeIdx) { continue; } else if (thirdByteNode[k] > NODE_START) { throw new Error("gb18030 decode tables conflict at byte 3"); } var fourthByteNode = this.decodeTables[NODE_START - thirdByteNode[k]]; for (var l = 0x30; l <= 0x39; l++) { if (fourthByteNode[l] === UNASSIGNED) fourthByteNode[l] = GB18030_CODE; } } } } } this.defaultCharUnicode = iconv.defaultCharUnicode; // Encode tables: Unicode -> DBCS. // `encodeTable` is array mapping from unicode char to encoded char. All its values are integers for performance. // Because it can be sparse, it is represented as array of buckets by 256 chars each. Bucket can be null. // Values: >= 0 -> it is a normal char. Write the value (if <=256 then 1 byte, if <=65536 then 2 bytes, etc.). // == UNASSIGNED -> no conversion found. Output a default char. // <= SEQ_START -> it's an index in encodeTableSeq, see below. The character starts a sequence. this.encodeTable = []; // `encodeTableSeq` is used when a sequence of unicode characters is encoded as a single code. We use a tree of // objects where keys correspond to characters in sequence and leafs are the encoded dbcs values. A special DEF_CHAR key // means end of sequence (needed when one sequence is a strict subsequence of another). // Objects are kept separately from encodeTable to increase performance. this.encodeTableSeq = []; // Some chars can be decoded, but need not be encoded. var skipEncodeChars = {}; if (codecOptions.encodeSkipVals) for (var i = 0; i < codecOptions.encodeSkipVals.length; i++) { var val = codecOptions.encodeSkipVals[i]; if (typeof val === 'number') skipEncodeChars[val] = true; else for (var j = val.from; j <= val.to; j++) skipEncodeChars[j] = true; } // Use decode trie to recursively fill out encode tables. this._fillEncodeTable(0, 0, skipEncodeChars); // Add more encoding pairs when needed. if (codecOptions.encodeAdd) { for (var uChar in codecOptions.encodeAdd) if (Object.prototype.hasOwnProperty.call(codecOptions.encodeAdd, uChar)) this._setEncodeChar(uChar.charCodeAt(0), codecOptions.encodeAdd[uChar]); } this.defCharSB = this.encodeTable[0][iconv.defaultCharSingleByte.charCodeAt(0)]; if (this.defCharSB === UNASSIGNED) this.defCharSB = this.encodeTable[0]['?']; if (this.defCharSB === UNASSIGNED) this.defCharSB = "?".charCodeAt(0); } DBCSCodec.prototype.encoder = DBCSEncoder; DBCSCodec.prototype.decoder = DBCSDecoder; // Decoder helpers DBCSCodec.prototype._getDecodeTrieNode = function(addr) { var bytes = []; for (; addr > 0; addr >>>= 8) bytes.push(addr & 0xFF); if (bytes.length == 0) bytes.push(0); var node = this.decodeTables[0]; for (var i = bytes.length-1; i > 0; i--) { // Traverse nodes deeper into the trie. var val = node[bytes[i]]; if (val == UNASSIGNED) { // Create new node. node[bytes[i]] = NODE_START - this.decodeTables.length; this.decodeTables.push(node = UNASSIGNED_NODE.slice(0)); } else if (val <= NODE_START) { // Existing node. node = this.decodeTables[NODE_START - val]; } else throw new Error("Overwrite byte in " + this.encodingName + ", addr: " + addr.toString(16)); } return node; } DBCSCodec.prototype._addDecodeChunk = function(chunk) { // First element of chunk is the hex mbcs code where we start. var curAddr = parseInt(chunk[0], 16); // Choose the decoding node where we'll write our chars. var writeTable = this._getDecodeTrieNode(curAddr); curAddr = curAddr & 0xFF; // Write all other elements of the chunk to the table. for (var k = 1; k < chunk.length; k++) { var part = chunk[k]; if (typeof part === "string") { // String, write as-is. for (var l = 0; l < part.length;) { var code = part.charCodeAt(l++); if (0xD800 <= code && code < 0xDC00) { // Decode surrogate var codeTrail = part.charCodeAt(l++); if (0xDC00 <= codeTrail && codeTrail < 0xE000) writeTable[curAddr++] = 0x10000 + (code - 0xD800) * 0x400 + (codeTrail - 0xDC00); else throw new Error("Incorrect surrogate pair in " + this.encodingName + " at chunk " + chunk[0]); } else if (0x0FF0 < code && code <= 0x0FFF) { // Character sequence (our own encoding used) var len = 0xFFF - code + 2; var seq = []; for (var m = 0; m < len; m++) seq.push(part.charCodeAt(l++)); // Simple variation: don't support surrogates or subsequences in seq. writeTable[curAddr++] = SEQ_START - this.decodeTableSeq.length; this.decodeTableSeq.push(seq); } else writeTable[curAddr++] = code; // Basic char } } else if (typeof part === "number") { // Integer, meaning increasing sequence starting with prev character. var charCode = writeTable[curAddr - 1] + 1; for (var l = 0; l < part; l++) writeTable[curAddr++] = charCode++; } else throw new Error("Incorrect type '" + typeof part + "' given in " + this.encodingName + " at chunk " + chunk[0]); } if (curAddr > 0xFF) throw new Error("Incorrect chunk in " + this.encodingName + " at addr " + chunk[0] + ": too long" + curAddr); } // Encoder helpers DBCSCodec.prototype._getEncodeBucket = function(uCode) { var high = uCode >> 8; // This could be > 0xFF because of astral characters. if (this.encodeTable[high] === undefined) this.encodeTable[high] = UNASSIGNED_NODE.slice(0); // Create bucket on demand. return this.encodeTable[high]; } DBCSCodec.prototype._setEncodeChar = function(uCode, dbcsCode) { var bucket = this._getEncodeBucket(uCode); var low = uCode & 0xFF; if (bucket[low] <= SEQ_START) this.encodeTableSeq[SEQ_START-bucket[low]][DEF_CHAR] = dbcsCode; // There's already a sequence, set a single-char subsequence of it. else if (bucket[low] == UNASSIGNED) bucket[low] = dbcsCode; } DBCSCodec.prototype._setEncodeSequence = function(seq, dbcsCode) { // Get the root of character tree according to first character of the sequence. var uCode = seq[0]; var bucket = this._getEncodeBucket(uCode); var low = uCode & 0xFF; var node; if (bucket[low] <= SEQ_START) { // There's already a sequence with - use it. node = this.encodeTableSeq[SEQ_START-bucket[low]]; } else { // There was no sequence object - allocate a new one. node = {}; if (bucket[low] !== UNASSIGNED) node[DEF_CHAR] = bucket[low]; // If a char was set before - make it a single-char subsequence. bucket[low] = SEQ_START - this.encodeTableSeq.length; this.encodeTableSeq.push(node); } // Traverse the character tree, allocating new nodes as needed. for (var j = 1; j < seq.length-1; j++) { var oldVal = node[uCode]; if (typeof oldVal === 'object') node = oldVal; else { node = node[uCode] = {} if (oldVal !== undefined) node[DEF_CHAR] = oldVal } } // Set the leaf to given dbcsCode. uCode = seq[seq.length-1]; node[uCode] = dbcsCode; } DBCSCodec.prototype._fillEncodeTable = function(nodeIdx, prefix, skipEncodeChars) { var node = this.decodeTables[nodeIdx]; var hasValues = false; var subNodeEmpty = {}; for (var i = 0; i < 0x100; i++) { var uCode = node[i]; var mbCode = prefix + i; if (skipEncodeChars[mbCode]) continue; if (uCode >= 0) { this._setEncodeChar(uCode, mbCode); hasValues = true; } else if (uCode <= NODE_START) { var subNodeIdx = NODE_START - uCode; if (!subNodeEmpty[subNodeIdx]) { // Skip empty subtrees (they are too large in gb18030). var newPrefix = (mbCode << 8) >>> 0; // NOTE: '>>> 0' keeps 32-bit num positive. if (this._fillEncodeTable(subNodeIdx, newPrefix, skipEncodeChars)) hasValues = true; else subNodeEmpty[subNodeIdx] = true; } } else if (uCode <= SEQ_START) { this._setEncodeSequence(this.decodeTableSeq[SEQ_START - uCode], mbCode); hasValues = true; } } return hasValues; } // == Encoder ================================================================== function DBCSEncoder(options, codec) { // Encoder state this.leadSurrogate = -1; this.seqObj = undefined; // Static data this.encodeTable = codec.encodeTable; this.encodeTableSeq = codec.encodeTableSeq; this.defaultCharSingleByte = codec.defCharSB; this.gb18030 = codec.gb18030; } DBCSEncoder.prototype.write = function(str) { var newBuf = Buffer.alloc(str.length * (this.gb18030 ? 4 : 3)), leadSurrogate = this.leadSurrogate, seqObj = this.seqObj, nextChar = -1, i = 0, j = 0; while (true) { // 0. Get next character. if (nextChar === -1) { if (i == str.length) break; var uCode = str.charCodeAt(i++); } else { var uCode = nextChar; nextChar = -1; } // 1. Handle surrogates. if (0xD800 <= uCode && uCode < 0xE000) { // Char is one of surrogates. if (uCode < 0xDC00) { // We've got lead surrogate. if (leadSurrogate === -1) { leadSurrogate = uCode; continue; } else { leadSurrogate = uCode; // Double lead surrogate found. uCode = UNASSIGNED; } } else { // We've got trail surrogate. if (leadSurrogate !== -1) { uCode = 0x10000 + (leadSurrogate - 0xD800) * 0x400 + (uCode - 0xDC00); leadSurrogate = -1; } else { // Incomplete surrogate pair - only trail surrogate found. uCode = UNASSIGNED; } } } else if (leadSurrogate !== -1) { // Incomplete surrogate pair - only lead surrogate found. nextChar = uCode; uCode = UNASSIGNED; // Write an error, then current char. leadSurrogate = -1; } // 2. Convert uCode character. var dbcsCode = UNASSIGNED; if (seqObj !== undefined && uCode != UNASSIGNED) { // We are in the middle of the sequence var resCode = seqObj[uCode]; if (typeof resCode === 'object') { // Sequence continues. seqObj = resCode; continue; } else if (typeof resCode == 'number') { // Sequence finished. Write it. dbcsCode = resCode; } else if (resCode == undefined) { // Current character is not part of the sequence. // Try default character for this sequence resCode = seqObj[DEF_CHAR]; if (resCode !== undefined) { dbcsCode = resCode; // Found. Write it. nextChar = uCode; // Current character will be written too in the next iteration. } else { // TODO: What if we have no default? (resCode == undefined) // Then, we should write first char of the sequence as-is and try the rest recursively. // Didn't do it for now because no encoding has this situation yet. // Currently, just skip the sequence and write current char. } } seqObj = undefined; } else if (uCode >= 0) { // Regular character var subtable = this.encodeTable[uCode >> 8]; if (subtable !== undefined) dbcsCode = subtable[uCode & 0xFF]; if (dbcsCode <= SEQ_START) { // Sequence start seqObj = this.encodeTableSeq[SEQ_START-dbcsCode]; continue; } if (dbcsCode == UNASSIGNED && this.gb18030) { // Use GB18030 algorithm to find character(s) to write. var idx = findIdx(this.gb18030.uChars, uCode); if (idx != -1) { var dbcsCode = this.gb18030.gbChars[idx] + (uCode - this.gb18030.uChars[idx]); newBuf[j++] = 0x81 + Math.floor(dbcsCode / 12600); dbcsCode = dbcsCode % 12600; newBuf[j++] = 0x30 + Math.floor(dbcsCode / 1260); dbcsCode = dbcsCode % 1260; newBuf[j++] = 0x81 + Math.floor(dbcsCode / 10); dbcsCode = dbcsCode % 10; newBuf[j++] = 0x30 + dbcsCode; continue; } } } // 3. Write dbcsCode character. if (dbcsCode === UNASSIGNED) dbcsCode = this.defaultCharSingleByte; if (dbcsCode < 0x100) { newBuf[j++] = dbcsCode; } else if (dbcsCode < 0x10000) { newBuf[j++] = dbcsCode >> 8; // high byte newBuf[j++] = dbcsCode & 0xFF; // low byte } else if (dbcsCode < 0x1000000) { newBuf[j++] = dbcsCode >> 16; newBuf[j++] = (dbcsCode >> 8) & 0xFF; newBuf[j++] = dbcsCode & 0xFF; } else { newBuf[j++] = dbcsCode >>> 24; newBuf[j++] = (dbcsCode >>> 16) & 0xFF; newBuf[j++] = (dbcsCode >>> 8) & 0xFF; newBuf[j++] = dbcsCode & 0xFF; } } this.seqObj = seqObj; this.leadSurrogate = leadSurrogate; return newBuf.slice(0, j); } DBCSEncoder.prototype.end = function() { if (this.leadSurrogate === -1 && this.seqObj === undefined) return; // All clean. Most often case. var newBuf = Buffer.alloc(10), j = 0; if (this.seqObj) { // We're in the sequence. var dbcsCode = this.seqObj[DEF_CHAR]; if (dbcsCode !== undefined) { // Write beginning of the sequence. if (dbcsCode < 0x100) { newBuf[j++] = dbcsCode; } else { newBuf[j++] = dbcsCode >> 8; // high byte newBuf[j++] = dbcsCode & 0xFF; // low byte } } else { // See todo above. } this.seqObj = undefined; } if (this.leadSurrogate !== -1) { // Incomplete surrogate pair - only lead surrogate found. newBuf[j++] = this.defaultCharSingleByte; this.leadSurrogate = -1; } return newBuf.slice(0, j); } // Export for testing DBCSEncoder.prototype.findIdx = findIdx; // == Decoder ================================================================== function DBCSDecoder(options, codec) { // Decoder state this.nodeIdx = 0; this.prevBytes = []; // Static data this.decodeTables = codec.decodeTables; this.decodeTableSeq = codec.decodeTableSeq; this.defaultCharUnicode = codec.defaultCharUnicode; this.gb18030 = codec.gb18030; } DBCSDecoder.prototype.write = function(buf) { var newBuf = Buffer.alloc(buf.length*2), nodeIdx = this.nodeIdx, prevBytes = this.prevBytes, prevOffset = this.prevBytes.length, seqStart = -this.prevBytes.length, // idx of the start of current parsed sequence. uCode; for (var i = 0, j = 0; i < buf.length; i++) { var curByte = (i >= 0) ? buf[i] : prevBytes[i + prevOffset]; // Lookup in current trie node. var uCode = this.decodeTables[nodeIdx][curByte]; if (uCode >= 0) { // Normal character, just use it. } else if (uCode === UNASSIGNED) { // Unknown char. // TODO: Callback with seq. uCode = this.defaultCharUnicode.charCodeAt(0); i = seqStart; // Skip one byte ('i' will be incremented by the for loop) and try to parse again. } else if (uCode === GB18030_CODE) { if (i >= 3) { var ptr = (buf[i-3]-0x81)*12600 + (buf[i-2]-0x30)*1260 + (buf[i-1]-0x81)*10 + (curByte-0x30); } else { var ptr = (prevBytes[i-3+prevOffset]-0x81)*12600 + (((i-2 >= 0) ? buf[i-2] : prevBytes[i-2+prevOffset])-0x30)*1260 + (((i-1 >= 0) ? buf[i-1] : prevBytes[i-1+prevOffset])-0x81)*10 + (curByte-0x30); } var idx = findIdx(this.gb18030.gbChars, ptr); uCode = this.gb18030.uChars[idx] + ptr - this.gb18030.gbChars[idx]; } else if (uCode <= NODE_START) { // Go to next trie node. nodeIdx = NODE_START - uCode; continue; } else if (uCode <= SEQ_START) { // Output a sequence of chars. var seq = this.decodeTableSeq[SEQ_START - uCode]; for (var k = 0; k < seq.length - 1; k++) { uCode = seq[k]; newBuf[j++] = uCode & 0xFF; newBuf[j++] = uCode >> 8; } uCode = seq[seq.length-1]; } else throw new Error("iconv-lite internal error: invalid decoding table value " + uCode + " at " + nodeIdx + "/" + curByte); // Write the character to buffer, handling higher planes using surrogate pair. if (uCode >= 0x10000) { uCode -= 0x10000; var uCodeLead = 0xD800 | (uCode >> 10); newBuf[j++] = uCodeLead & 0xFF; newBuf[j++] = uCodeLead >> 8; uCode = 0xDC00 | (uCode & 0x3FF); } newBuf[j++] = uCode & 0xFF; newBuf[j++] = uCode >> 8; // Reset trie node. nodeIdx = 0; seqStart = i+1; } this.nodeIdx = nodeIdx; this.prevBytes = (seqStart >= 0) ? Array.prototype.slice.call(buf, seqStart) : prevBytes.slice(seqStart + prevOffset).concat(Array.prototype.slice.call(buf)); return newBuf.slice(0, j).toString('ucs2'); } DBCSDecoder.prototype.end = function() { var ret = ''; // Try to parse all remaining chars. while (this.prevBytes.length > 0) { // Skip 1 character in the buffer. ret += this.defaultCharUnicode; var bytesArr = this.prevBytes.slice(1); // Parse remaining as usual. this.prevBytes = []; this.nodeIdx = 0; if (bytesArr.length > 0) ret += this.write(bytesArr); } this.prevBytes = []; this.nodeIdx = 0; return ret; } // Binary search for GB18030. Returns largest i such that table[i] <= val. function findIdx(table, val) { if (table[0] > val) return -1; var l = 0, r = table.length; while (l < r-1) { // always table[l] <= val < table[r] var mid = l + ((r-l+1) >> 1); if (table[mid] <= val) l = mid; else r = mid; } return l; } /***/ }), /***/ 5990: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; // Description of supported double byte encodings and aliases. // Tables are not require()-d until they are needed to speed up library load. // require()-s are direct to support Browserify. module.exports = { // == Japanese/ShiftJIS ==================================================== // All japanese encodings are based on JIS X set of standards: // JIS X 0201 - Single-byte encoding of ASCII + ¥ + Kana chars at 0xA1-0xDF. // JIS X 0208 - Main set of 6879 characters, placed in 94x94 plane, to be encoded by 2 bytes. // Has several variations in 1978, 1983, 1990 and 1997. // JIS X 0212 - Supplementary plane of 6067 chars in 94x94 plane. 1990. Effectively dead. // JIS X 0213 - Extension and modern replacement of 0208 and 0212. Total chars: 11233. // 2 planes, first is superset of 0208, second - revised 0212. // Introduced in 2000, revised 2004. Some characters are in Unicode Plane 2 (0x2xxxx) // Byte encodings are: // * Shift_JIS: Compatible with 0201, uses not defined chars in top half as lead bytes for double-byte // encoding of 0208. Lead byte ranges: 0x81-0x9F, 0xE0-0xEF; Trail byte ranges: 0x40-0x7E, 0x80-0x9E, 0x9F-0xFC. // Windows CP932 is a superset of Shift_JIS. Some companies added more chars, notably KDDI. // * EUC-JP: Up to 3 bytes per character. Used mostly on *nixes. // 0x00-0x7F - lower part of 0201 // 0x8E, 0xA1-0xDF - upper part of 0201 // (0xA1-0xFE)x2 - 0208 plane (94x94). // 0x8F, (0xA1-0xFE)x2 - 0212 plane (94x94). // * JIS X 208: 7-bit, direct encoding of 0208. Byte ranges: 0x21-0x7E (94 values). Uncommon. // Used as-is in ISO2022 family. // * ISO2022-JP: Stateful encoding, with escape sequences to switch between ASCII, // 0201-1976 Roman, 0208-1978, 0208-1983. // * ISO2022-JP-1: Adds esc seq for 0212-1990. // * ISO2022-JP-2: Adds esc seq for GB2313-1980, KSX1001-1992, ISO8859-1, ISO8859-7. // * ISO2022-JP-3: Adds esc seq for 0201-1976 Kana set, 0213-2000 Planes 1, 2. // * ISO2022-JP-2004: Adds 0213-2004 Plane 1. // // After JIS X 0213 appeared, Shift_JIS-2004, EUC-JISX0213 and ISO2022-JP-2004 followed, with just changing the planes. // // Overall, it seems that it's a mess :( http://www8.plala.or.jp/tkubota1/unicode-symbols-map2.html 'shiftjis': { type: '_dbcs', table: function() { return __webpack_require__(7014) }, encodeAdd: {'\u00a5': 0x5C, '\u203E': 0x7E}, encodeSkipVals: [{from: 0xED40, to: 0xF940}], }, 'csshiftjis': 'shiftjis', 'mskanji': 'shiftjis', 'sjis': 'shiftjis', 'windows31j': 'shiftjis', 'ms31j': 'shiftjis', 'xsjis': 'shiftjis', 'windows932': 'shiftjis', 'ms932': 'shiftjis', '932': 'shiftjis', 'cp932': 'shiftjis', 'eucjp': { type: '_dbcs', table: function() { return __webpack_require__(5633) }, encodeAdd: {'\u00a5': 0x5C, '\u203E': 0x7E}, }, // TODO: KDDI extension to Shift_JIS // TODO: IBM CCSID 942 = CP932, but F0-F9 custom chars and other char changes. // TODO: IBM CCSID 943 = Shift_JIS = CP932 with original Shift_JIS lower 128 chars. // == Chinese/GBK ========================================================== // http://en.wikipedia.org/wiki/GBK // We mostly implement W3C recommendation: https://www.w3.org/TR/encoding/#gbk-encoder // Oldest GB2312 (1981, ~7600 chars) is a subset of CP936 'gb2312': 'cp936', 'gb231280': 'cp936', 'gb23121980': 'cp936', 'csgb2312': 'cp936', 'csiso58gb231280': 'cp936', 'euccn': 'cp936', // Microsoft's CP936 is a subset and approximation of GBK. 'windows936': 'cp936', 'ms936': 'cp936', '936': 'cp936', 'cp936': { type: '_dbcs', table: function() { return __webpack_require__(3336) }, }, // GBK (~22000 chars) is an extension of CP936 that added user-mapped chars and some other. 'gbk': { type: '_dbcs', table: function() { return (__webpack_require__(3336).concat)(__webpack_require__(4346)) }, }, 'xgbk': 'gbk', 'isoir58': 'gbk', // GB18030 is an algorithmic extension of GBK. // Main source: https://www.w3.org/TR/encoding/#gbk-encoder // http://icu-project.org/docs/papers/gb18030.html // http://source.icu-project.org/repos/icu/data/trunk/charset/data/xml/gb-18030-2000.xml // http://www.khngai.com/chinese/charmap/tblgbk.php?page=0 'gb18030': { type: '_dbcs', table: function() { return (__webpack_require__(3336).concat)(__webpack_require__(4346)) }, gb18030: function() { return __webpack_require__(6258) }, encodeSkipVals: [0x80], encodeAdd: {'€': 0xA2E3}, }, 'chinese': 'gb18030', // == Korean =============================================================== // EUC-KR, KS_C_5601 and KS X 1001 are exactly the same. 'windows949': 'cp949', 'ms949': 'cp949', '949': 'cp949', 'cp949': { type: '_dbcs', table: function() { return __webpack_require__(7348) }, }, 'cseuckr': 'cp949', 'csksc56011987': 'cp949', 'euckr': 'cp949', 'isoir149': 'cp949', 'korean': 'cp949', 'ksc56011987': 'cp949', 'ksc56011989': 'cp949', 'ksc5601': 'cp949', // == Big5/Taiwan/Hong Kong ================================================ // There are lots of tables for Big5 and cp950. Please see the following links for history: // http://moztw.org/docs/big5/ http://www.haible.de/bruno/charsets/conversion-tables/Big5.html // Variations, in roughly number of defined chars: // * Windows CP 950: Microsoft variant of Big5. Canonical: http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP950.TXT // * Windows CP 951: Microsoft variant of Big5-HKSCS-2001. Seems to be never public. http://me.abelcheung.org/articles/research/what-is-cp951/ // * Big5-2003 (Taiwan standard) almost superset of cp950. // * Unicode-at-on (UAO) / Mozilla 1.8. Falling out of use on the Web. Not supported by other browsers. // * Big5-HKSCS (-2001, -2004, -2008). Hong Kong standard. // many unicode code points moved from PUA to Supplementary plane (U+2XXXX) over the years. // Plus, it has 4 combining sequences. // Seems that Mozilla refused to support it for 10 yrs. https://bugzilla.mozilla.org/show_bug.cgi?id=162431 https://bugzilla.mozilla.org/show_bug.cgi?id=310299 // because big5-hkscs is the only encoding to include astral characters in non-algorithmic way. // Implementations are not consistent within browsers; sometimes labeled as just big5. // MS Internet Explorer switches from big5 to big5-hkscs when a patch applied. // Great discussion & recap of what's going on https://bugzilla.mozilla.org/show_bug.cgi?id=912470#c31 // In the encoder, it might make sense to support encoding old PUA mappings to Big5 bytes seq-s. // Official spec: http://www.ogcio.gov.hk/en/business/tech_promotion/ccli/terms/doc/2003cmp_2008.txt // http://www.ogcio.gov.hk/tc/business/tech_promotion/ccli/terms/doc/hkscs-2008-big5-iso.txt // // Current understanding of how to deal with Big5(-HKSCS) is in the Encoding Standard, http://encoding.spec.whatwg.org/#big5-encoder // Unicode mapping (http://www.unicode.org/Public/MAPPINGS/OBSOLETE/EASTASIA/OTHER/BIG5.TXT) is said to be wrong. 'windows950': 'cp950', 'ms950': 'cp950', '950': 'cp950', 'cp950': { type: '_dbcs', table: function() { return __webpack_require__(4284) }, }, // Big5 has many variations and is an extension of cp950. We use Encoding Standard's as a consensus. 'big5': 'big5hkscs', 'big5hkscs': { type: '_dbcs', table: function() { return (__webpack_require__(4284).concat)(__webpack_require__(3480)) }, encodeSkipVals: [ // Although Encoding Standard says we should avoid encoding to HKSCS area (See Step 1 of // https://encoding.spec.whatwg.org/#index-big5-pointer), we still do it to increase compatibility with ICU. // But if a single unicode point can be encoded both as HKSCS and regular Big5, we prefer the latter. 0x8e69, 0x8e6f, 0x8e7e, 0x8eab, 0x8eb4, 0x8ecd, 0x8ed0, 0x8f57, 0x8f69, 0x8f6e, 0x8fcb, 0x8ffe, 0x906d, 0x907a, 0x90c4, 0x90dc, 0x90f1, 0x91bf, 0x92af, 0x92b0, 0x92b1, 0x92b2, 0x92d1, 0x9447, 0x94ca, 0x95d9, 0x96fc, 0x9975, 0x9b76, 0x9b78, 0x9b7b, 0x9bc6, 0x9bde, 0x9bec, 0x9bf6, 0x9c42, 0x9c53, 0x9c62, 0x9c68, 0x9c6b, 0x9c77, 0x9cbc, 0x9cbd, 0x9cd0, 0x9d57, 0x9d5a, 0x9dc4, 0x9def, 0x9dfb, 0x9ea9, 0x9eef, 0x9efd, 0x9f60, 0x9fcb, 0xa077, 0xa0dc, 0xa0df, 0x8fcc, 0x92c8, 0x9644, 0x96ed, // Step 2 of https://encoding.spec.whatwg.org/#index-big5-pointer: Use last pointer for U+2550, U+255E, U+2561, U+256A, U+5341, or U+5345 0xa2a4, 0xa2a5, 0xa2a7, 0xa2a6, 0xa2cc, 0xa2ce, ], }, 'cnbig5': 'big5hkscs', 'csbig5': 'big5hkscs', 'xxbig5': 'big5hkscs', }; /***/ }), /***/ 6934: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; // Update this array if you add/rename/remove files in this directory. // We support Browserify by skipping automatic module discovery and requiring modules directly. var modules = [ __webpack_require__(1025), __webpack_require__(7688), __webpack_require__(1279), __webpack_require__(758), __webpack_require__(9068), __webpack_require__(3769), __webpack_require__(7018), __webpack_require__(688), __webpack_require__(5990), ]; // Put all encoding/alias/codec definitions to single object and export it. for (var i = 0; i < modules.length; i++) { var module = modules[i]; for (var enc in module) if (Object.prototype.hasOwnProperty.call(module, enc)) exports[enc] = module[enc]; } /***/ }), /***/ 1025: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var Buffer = (__webpack_require__(7103).Buffer); // Export Node.js internal encodings. module.exports = { // Encodings utf8: { type: "_internal", bomAware: true}, cesu8: { type: "_internal", bomAware: true}, unicode11utf8: "utf8", ucs2: { type: "_internal", bomAware: true}, utf16le: "ucs2", binary: { type: "_internal" }, base64: { type: "_internal" }, hex: { type: "_internal" }, // Codec. _internal: InternalCodec, }; //------------------------------------------------------------------------------ function InternalCodec(codecOptions, iconv) { this.enc = codecOptions.encodingName; this.bomAware = codecOptions.bomAware; if (this.enc === "base64") this.encoder = InternalEncoderBase64; else if (this.enc === "cesu8") { this.enc = "utf8"; // Use utf8 for decoding. this.encoder = InternalEncoderCesu8; // Add decoder for versions of Node not supporting CESU-8 if (Buffer.from('eda0bdedb2a9', 'hex').toString() !== '💩') { this.decoder = InternalDecoderCesu8; this.defaultCharUnicode = iconv.defaultCharUnicode; } } } InternalCodec.prototype.encoder = InternalEncoder; InternalCodec.prototype.decoder = InternalDecoder; //------------------------------------------------------------------------------ // We use node.js internal decoder. Its signature is the same as ours. var StringDecoder = (__webpack_require__(2553)/* .StringDecoder */ .s); if (!StringDecoder.prototype.end) // Node v0.8 doesn't have this method. StringDecoder.prototype.end = function() {}; function InternalDecoder(options, codec) { this.decoder = new StringDecoder(codec.enc); } InternalDecoder.prototype.write = function(buf) { if (!Buffer.isBuffer(buf)) { buf = Buffer.from(buf); } return this.decoder.write(buf); } InternalDecoder.prototype.end = function() { return this.decoder.end(); } //------------------------------------------------------------------------------ // Encoder is mostly trivial function InternalEncoder(options, codec) { this.enc = codec.enc; } InternalEncoder.prototype.write = function(str) { return Buffer.from(str, this.enc); } InternalEncoder.prototype.end = function() { } //------------------------------------------------------------------------------ // Except base64 encoder, which must keep its state. function InternalEncoderBase64(options, codec) { this.prevStr = ''; } InternalEncoderBase64.prototype.write = function(str) { str = this.prevStr + str; var completeQuads = str.length - (str.length % 4); this.prevStr = str.slice(completeQuads); str = str.slice(0, completeQuads); return Buffer.from(str, "base64"); } InternalEncoderBase64.prototype.end = function() { return Buffer.from(this.prevStr, "base64"); } //------------------------------------------------------------------------------ // CESU-8 encoder is also special. function InternalEncoderCesu8(options, codec) { } InternalEncoderCesu8.prototype.write = function(str) { var buf = Buffer.alloc(str.length * 3), bufIdx = 0; for (var i = 0; i < str.length; i++) { var charCode = str.charCodeAt(i); // Naive implementation, but it works because CESU-8 is especially easy // to convert from UTF-16 (which all JS strings are encoded in). if (charCode < 0x80) buf[bufIdx++] = charCode; else if (charCode < 0x800) { buf[bufIdx++] = 0xC0 + (charCode >>> 6); buf[bufIdx++] = 0x80 + (charCode & 0x3f); } else { // charCode will always be < 0x10000 in javascript. buf[bufIdx++] = 0xE0 + (charCode >>> 12); buf[bufIdx++] = 0x80 + ((charCode >>> 6) & 0x3f); buf[bufIdx++] = 0x80 + (charCode & 0x3f); } } return buf.slice(0, bufIdx); } InternalEncoderCesu8.prototype.end = function() { } //------------------------------------------------------------------------------ // CESU-8 decoder is not implemented in Node v4.0+ function InternalDecoderCesu8(options, codec) { this.acc = 0; this.contBytes = 0; this.accBytes = 0; this.defaultCharUnicode = codec.defaultCharUnicode; } InternalDecoderCesu8.prototype.write = function(buf) { var acc = this.acc, contBytes = this.contBytes, accBytes = this.accBytes, res = ''; for (var i = 0; i < buf.length; i++) { var curByte = buf[i]; if ((curByte & 0xC0) !== 0x80) { // Leading byte if (contBytes > 0) { // Previous code is invalid res += this.defaultCharUnicode; contBytes = 0; } if (curByte < 0x80) { // Single-byte code res += String.fromCharCode(curByte); } else if (curByte < 0xE0) { // Two-byte code acc = curByte & 0x1F; contBytes = 1; accBytes = 1; } else if (curByte < 0xF0) { // Three-byte code acc = curByte & 0x0F; contBytes = 2; accBytes = 1; } else { // Four or more are not supported for CESU-8. res += this.defaultCharUnicode; } } else { // Continuation byte if (contBytes > 0) { // We're waiting for it. acc = (acc << 6) | (curByte & 0x3f); contBytes--; accBytes++; if (contBytes === 0) { // Check for overlong encoding, but support Modified UTF-8 (encoding NULL as C0 80) if (accBytes === 2 && acc < 0x80 && acc > 0) res += this.defaultCharUnicode; else if (accBytes === 3 && acc < 0x800) res += this.defaultCharUnicode; else // Actually add character. res += String.fromCharCode(acc); } } else { // Unexpected continuation byte res += this.defaultCharUnicode; } } } this.acc = acc; this.contBytes = contBytes; this.accBytes = accBytes; return res; } InternalDecoderCesu8.prototype.end = function() { var res = 0; if (this.contBytes > 0) res += this.defaultCharUnicode; return res; } /***/ }), /***/ 9068: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var Buffer = (__webpack_require__(7103).Buffer); // Single-byte codec. Needs a 'chars' string parameter that contains 256 or 128 chars that // correspond to encoded bytes (if 128 - then lower half is ASCII). exports._sbcs = SBCSCodec; function SBCSCodec(codecOptions, iconv) { if (!codecOptions) throw new Error("SBCS codec is called without the data.") // Prepare char buffer for decoding. if (!codecOptions.chars || (codecOptions.chars.length !== 128 && codecOptions.chars.length !== 256)) throw new Error("Encoding '"+codecOptions.type+"' has incorrect 'chars' (must be of len 128 or 256)"); if (codecOptions.chars.length === 128) { var asciiString = ""; for (var i = 0; i < 128; i++) asciiString += String.fromCharCode(i); codecOptions.chars = asciiString + codecOptions.chars; } this.decodeBuf = Buffer.from(codecOptions.chars, 'ucs2'); // Encoding buffer. var encodeBuf = Buffer.alloc(65536, iconv.defaultCharSingleByte.charCodeAt(0)); for (var i = 0; i < codecOptions.chars.length; i++) encodeBuf[codecOptions.chars.charCodeAt(i)] = i; this.encodeBuf = encodeBuf; } SBCSCodec.prototype.encoder = SBCSEncoder; SBCSCodec.prototype.decoder = SBCSDecoder; function SBCSEncoder(options, codec) { this.encodeBuf = codec.encodeBuf; } SBCSEncoder.prototype.write = function(str) { var buf = Buffer.alloc(str.length); for (var i = 0; i < str.length; i++) buf[i] = this.encodeBuf[str.charCodeAt(i)]; return buf; } SBCSEncoder.prototype.end = function() { } function SBCSDecoder(options, codec) { this.decodeBuf = codec.decodeBuf; } SBCSDecoder.prototype.write = function(buf) { // Strings are immutable in JS -> we use ucs2 buffer to speed up computations. var decodeBuf = this.decodeBuf; var newBuf = Buffer.alloc(buf.length*2); var idx1 = 0, idx2 = 0; for (var i = 0; i < buf.length; i++) { idx1 = buf[i]*2; idx2 = i*2; newBuf[idx2] = decodeBuf[idx1]; newBuf[idx2+1] = decodeBuf[idx1+1]; } return newBuf.toString('ucs2'); } SBCSDecoder.prototype.end = function() { } /***/ }), /***/ 7018: /***/ (function(module) { "use strict"; // Generated data for sbcs codec. Don't edit manually. Regenerate using generation/gen-sbcs.js script. module.exports = { "437": "cp437", "737": "cp737", "775": "cp775", "850": "cp850", "852": "cp852", "855": "cp855", "856": "cp856", "857": "cp857", "858": "cp858", "860": "cp860", "861": "cp861", "862": "cp862", "863": "cp863", "864": "cp864", "865": "cp865", "866": "cp866", "869": "cp869", "874": "windows874", "922": "cp922", "1046": "cp1046", "1124": "cp1124", "1125": "cp1125", "1129": "cp1129", "1133": "cp1133", "1161": "cp1161", "1162": "cp1162", "1163": "cp1163", "1250": "windows1250", "1251": "windows1251", "1252": "windows1252", "1253": "windows1253", "1254": "windows1254", "1255": "windows1255", "1256": "windows1256", "1257": "windows1257", "1258": "windows1258", "28591": "iso88591", "28592": "iso88592", "28593": "iso88593", "28594": "iso88594", "28595": "iso88595", "28596": "iso88596", "28597": "iso88597", "28598": "iso88598", "28599": "iso88599", "28600": "iso885910", "28601": "iso885911", "28603": "iso885913", "28604": "iso885914", "28605": "iso885915", "28606": "iso885916", "windows874": { "type": "_sbcs", "chars": "€����…�����������‘’“”•–—�������� กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����" }, "win874": "windows874", "cp874": "windows874", "windows1250": { "type": "_sbcs", "chars": "€�‚�„…†‡�‰Š‹ŚŤŽŹ�‘’“”•–—�™š›śťžź ˇ˘Ł¤Ą¦§¨©Ş«¬­®Ż°±˛ł´µ¶·¸ąş»Ľ˝ľżŔÁÂĂÄĹĆÇČÉĘËĚÍÎĎĐŃŇÓÔŐÖ×ŘŮÚŰÜÝŢßŕáâăäĺćçčéęëěíîďđńňóôőö÷řůúűüýţ˙" }, "win1250": "windows1250", "cp1250": "windows1250", "windows1251": { "type": "_sbcs", "chars": "ЂЃ‚ѓ„…†‡€‰Љ‹ЊЌЋЏђ‘’“”•–—�™љ›њќћџ ЎўЈ¤Ґ¦§Ё©Є«¬­®Ї°±Ііґµ¶·ё№є»јЅѕїАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя" }, "win1251": "windows1251", "cp1251": "windows1251", "windows1252": { "type": "_sbcs", "chars": "€�‚ƒ„…†‡ˆ‰Š‹Œ�Ž��‘’“”•–—˜™š›œ�žŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" }, "win1252": "windows1252", "cp1252": "windows1252", "windows1253": { "type": "_sbcs", "chars": "€�‚ƒ„…†‡�‰�‹�����‘’“”•–—�™�›���� ΅Ά£¤¥¦§¨©�«¬­®―°±²³΄µ¶·ΈΉΊ»Ό½ΎΏΐΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡ�ΣΤΥΦΧΨΩΪΫάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώ�" }, "win1253": "windows1253", "cp1253": "windows1253", "windows1254": { "type": "_sbcs", "chars": "€�‚ƒ„…†‡ˆ‰Š‹Œ����‘’“”•–—˜™š›œ��Ÿ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏĞÑÒÓÔÕÖ×ØÙÚÛÜİŞßàáâãäåæçèéêëìíîïğñòóôõö÷øùúûüışÿ" }, "win1254": "windows1254", "cp1254": "windows1254", "windows1255": { "type": "_sbcs", "chars": "€�‚ƒ„…†‡ˆ‰�‹�����‘’“”•–—˜™�›���� ¡¢£₪¥¦§¨©×«¬­®¯°±²³´µ¶·¸¹÷»¼½¾¿ְֱֲֳִֵֶַָֹֺֻּֽ־ֿ׀ׁׂ׃װױײ׳״�������אבגדהוזחטיךכלםמןנסעףפץצקרשת��‎‏�" }, "win1255": "windows1255", "cp1255": "windows1255", "windows1256": { "type": "_sbcs", "chars": "€پ‚ƒ„…†‡ˆ‰ٹ‹Œچژڈگ‘’“”•–—ک™ڑ›œ‌‍ں ،¢£¤¥¦§¨©ھ«¬­®¯°±²³´µ¶·¸¹؛»¼½¾؟ہءآأؤإئابةتثجحخدذرزسشصض×طظعغـفقكàلâمنهوçèéêëىيîïًٌٍَôُِ÷ّùْûü‎‏ے" }, "win1256": "windows1256", "cp1256": "windows1256", "windows1257": { "type": "_sbcs", "chars": "€�‚�„…†‡�‰�‹�¨ˇ¸�‘’“”•–—�™�›�¯˛� �¢£¤�¦§Ø©Ŗ«¬­®Æ°±²³´µ¶·ø¹ŗ»¼½¾æĄĮĀĆÄÅĘĒČÉŹĖĢĶĪĻŠŃŅÓŌÕÖ×ŲŁŚŪÜŻŽßąįāćäåęēčéźėģķīļšńņóōõö÷ųłśūüżž˙" }, "win1257": "windows1257", "cp1257": "windows1257", "windows1258": { "type": "_sbcs", "chars": "€�‚ƒ„…†‡ˆ‰�‹Œ����‘’“”•–—˜™�›œ��Ÿ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖ×ØÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ" }, "win1258": "windows1258", "cp1258": "windows1258", "iso88591": { "type": "_sbcs", "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" }, "cp28591": "iso88591", "iso88592": { "type": "_sbcs", "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ą˘Ł¤ĽŚ§¨ŠŞŤŹ­ŽŻ°ą˛ł´ľśˇ¸šşťź˝žżŔÁÂĂÄĹĆÇČÉĘËĚÍÎĎĐŃŇÓÔŐÖ×ŘŮÚŰÜÝŢßŕáâăäĺćçčéęëěíîďđńňóôőö÷řůúűüýţ˙" }, "cp28592": "iso88592", "iso88593": { "type": "_sbcs", "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ħ˘£¤�Ĥ§¨İŞĞĴ­�Ż°ħ²³´µĥ·¸ışğĵ½�żÀÁÂ�ÄĊĈÇÈÉÊËÌÍÎÏ�ÑÒÓÔĠÖ×ĜÙÚÛÜŬŜßàáâ�äċĉçèéêëìíîï�ñòóôġö÷ĝùúûüŭŝ˙" }, "cp28593": "iso88593", "iso88594": { "type": "_sbcs", "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄĸŖ¤ĨĻ§¨ŠĒĢŦ­Ž¯°ą˛ŗ´ĩļˇ¸šēģŧŊžŋĀÁÂÃÄÅÆĮČÉĘËĖÍÎĪĐŅŌĶÔÕÖ×ØŲÚÛÜŨŪßāáâãäåæįčéęëėíîīđņōķôõö÷øųúûüũū˙" }, "cp28594": "iso88594", "iso88595": { "type": "_sbcs", "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ЁЂЃЄЅІЇЈЉЊЋЌ­ЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя№ёђѓєѕіїјљњћќ§ўџ" }, "cp28595": "iso88595", "iso88596": { "type": "_sbcs", "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ���¤�������،­�������������؛���؟�ءآأؤإئابةتثجحخدذرزسشصضطظعغ�����ـفقكلمنهوىيًٌٍَُِّْ�������������" }, "cp28596": "iso88596", "iso88597": { "type": "_sbcs", "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ‘’£€₯¦§¨©ͺ«¬­�―°±²³΄΅Ά·ΈΉΊ»Ό½ΎΏΐΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡ�ΣΤΥΦΧΨΩΪΫάέήίΰαβγδεζηθικλμνξοπρςστυφχψωϊϋόύώ�" }, "cp28597": "iso88597", "iso88598": { "type": "_sbcs", "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ �¢£¤¥¦§¨©×«¬­®¯°±²³´µ¶·¸¹÷»¼½¾��������������������������������‗אבגדהוזחטיךכלםמןנסעףפץצקרשת��‎‏�" }, "cp28598": "iso88598", "iso88599": { "type": "_sbcs", "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏĞÑÒÓÔÕÖ×ØÙÚÛÜİŞßàáâãäåæçèéêëìíîïğñòóôõö÷øùúûüışÿ" }, "cp28599": "iso88599", "iso885910": { "type": "_sbcs", "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄĒĢĪĨĶ§ĻĐŠŦŽ­ŪŊ°ąēģīĩķ·ļđšŧž―ūŋĀÁÂÃÄÅÆĮČÉĘËĖÍÎÏÐŅŌÓÔÕÖŨØŲÚÛÜÝÞßāáâãäåæįčéęëėíîïðņōóôõöũøųúûüýþĸ" }, "cp28600": "iso885910", "iso885911": { "type": "_sbcs", "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����" }, "cp28601": "iso885911", "iso885913": { "type": "_sbcs", "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ”¢£¤„¦§Ø©Ŗ«¬­®Æ°±²³“µ¶·ø¹ŗ»¼½¾æĄĮĀĆÄÅĘĒČÉŹĖĢĶĪĻŠŃŅÓŌÕÖ×ŲŁŚŪÜŻŽßąįāćäåęēčéźėģķīļšńņóōõö÷ųłśūüżž’" }, "cp28603": "iso885913", "iso885914": { "type": "_sbcs", "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ Ḃḃ£ĊċḊ§Ẁ©ẂḋỲ­®ŸḞḟĠġṀṁ¶ṖẁṗẃṠỳẄẅṡÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏŴÑÒÓÔÕÖṪØÙÚÛÜÝŶßàáâãäåæçèéêëìíîïŵñòóôõöṫøùúûüýŷÿ" }, "cp28604": "iso885914", "iso885915": { "type": "_sbcs", "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£€¥Š§š©ª«¬­®¯°±²³Žµ¶·ž¹º»ŒœŸ¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" }, "cp28605": "iso885915", "iso885916": { "type": "_sbcs", "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ĄąŁ€„Š§š©Ș«Ź­źŻ°±ČłŽ”¶·žčș»ŒœŸżÀÁÂĂÄĆÆÇÈÉÊËÌÍÎÏĐŃÒÓÔŐÖŚŰÙÚÛÜĘȚßàáâăäćæçèéêëìíîïđńòóôőöśűùúûüęțÿ" }, "cp28606": "iso885916", "cp437": { "type": "_sbcs", "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " }, "ibm437": "cp437", "csibm437": "cp437", "cp737": { "type": "_sbcs", "chars": "ΑΒΓΔΕΖΗΘΙΚΛΜΝΞΟΠΡΣΤΥΦΧΨΩαβγδεζηθικλμνξοπρσςτυφχψ░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀ωάέήϊίόύϋώΆΈΉΊΌΎΏ±≥≤ΪΫ÷≈°∙·√ⁿ²■ " }, "ibm737": "cp737", "csibm737": "cp737", "cp775": { "type": "_sbcs", "chars": "ĆüéāäģåćłēŖŗīŹÄÅÉæÆōöĢ¢ŚśÖÜø£ØפĀĪóŻżź”¦©®¬½¼Ł«»░▒▓│┤ĄČĘĖ╣║╗╝ĮŠ┐└┴┬├─┼ŲŪ╚╔╩╦╠═╬Žąčęėįšųūž┘┌█▄▌▐▀ÓßŌŃõÕµńĶķĻļņĒŅ’­±“¾¶§÷„°∙·¹³²■ " }, "ibm775": "cp775", "csibm775": "cp775", "cp850": { "type": "_sbcs", "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø׃áíóúñѪº¿®¬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ðÐÊËÈıÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµþÞÚÛÙýݯ´­±‗¾¶§÷¸°¨·¹³²■ " }, "ibm850": "cp850", "csibm850": "cp850", "cp852": { "type": "_sbcs", "chars": "ÇüéâäůćçłëŐőîŹÄĆÉĹĺôöĽľŚśÖÜŤťŁ×čáíóúĄąŽžĘ꬟Ⱥ«»░▒▓│┤ÁÂĚŞ╣║╗╝Żż┐└┴┬├─┼Ăă╚╔╩╦╠═╬¤đĐĎËďŇÍÎě┘┌█▄ŢŮ▀ÓßÔŃńňŠšŔÚŕŰýÝţ´­˝˛ˇ˘§÷¸°¨˙űŘř■ " }, "ibm852": "cp852", "csibm852": "cp852", "cp855": { "type": "_sbcs", "chars": "ђЂѓЃёЁєЄѕЅіІїЇјЈљЉњЊћЋќЌўЎџЏюЮъЪаАбБцЦдДеЕфФгГ«»░▒▓│┤хХиИ╣║╗╝йЙ┐└┴┬├─┼кК╚╔╩╦╠═╬¤лЛмМнНоОп┘┌█▄Пя▀ЯрРсСтТуУжЖвВьЬ№­ыЫзЗшШэЭщЩчЧ§■ " }, "ibm855": "cp855", "csibm855": "cp855", "cp856": { "type": "_sbcs", "chars": "אבגדהוזחטיךכלםמןנסעףפץצקרשת�£�×����������®¬½¼�«»░▒▓│┤���©╣║╗╝¢¥┐└┴┬├─┼��╚╔╩╦╠═╬¤���������┘┌█▄¦�▀������µ�������¯´­±‗¾¶§÷¸°¨·¹³²■ " }, "ibm856": "cp856", "csibm856": "cp856", "cp857": { "type": "_sbcs", "chars": "ÇüéâäàåçêëèïîıÄÅÉæÆôöòûùİÖÜø£ØŞşáíóúñÑĞ𿮬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ºªÊËÈ�ÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµ�×ÚÛÙìÿ¯´­±�¾¶§÷¸°¨·¹³²■ " }, "ibm857": "cp857", "csibm857": "cp857", "cp858": { "type": "_sbcs", "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø׃áíóúñѪº¿®¬½¼¡«»░▒▓│┤ÁÂÀ©╣║╗╝¢¥┐└┴┬├─┼ãÃ╚╔╩╦╠═╬¤ðÐÊËÈ€ÍÎÏ┘┌█▄¦Ì▀ÓßÔÒõÕµþÞÚÛÙýݯ´­±‗¾¶§÷¸°¨·¹³²■ " }, "ibm858": "cp858", "csibm858": "cp858", "cp860": { "type": "_sbcs", "chars": "ÇüéâãàÁçêÊèÍÔìÃÂÉÀÈôõòÚùÌÕÜ¢£Ù₧ÓáíóúñѪº¿Ò¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " }, "ibm860": "cp860", "csibm860": "cp860", "cp861": { "type": "_sbcs", "chars": "ÇüéâäàåçêëèÐðÞÄÅÉæÆôöþûÝýÖÜø£Ø₧ƒáíóúÁÍÓÚ¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " }, "ibm861": "cp861", "csibm861": "cp861", "cp862": { "type": "_sbcs", "chars": "אבגדהוזחטיךכלםמןנסעףפץצקרשת¢£¥₧ƒáíóúñѪº¿⌐¬½¼¡«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " }, "ibm862": "cp862", "csibm862": "cp862", "cp863": { "type": "_sbcs", "chars": "ÇüéâÂà¶çêëèïî‗À§ÉÈÊôËÏûù¤ÔÜ¢£ÙÛƒ¦´óú¨¸³¯Î⌐¬½¼¾«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " }, "ibm863": "cp863", "csibm863": "cp863", "cp864": { "type": "_sbcs", "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$٪&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~°·∙√▒─│┼┤┬├┴┐┌└┘β∞φ±½¼≈«»ﻷﻸ��ﻻﻼ� ­ﺂ£¤ﺄ��ﺎﺏﺕﺙ،ﺝﺡﺥ٠١٢٣٤٥٦٧٨٩ﻑ؛ﺱﺵﺹ؟¢ﺀﺁﺃﺅﻊﺋﺍﺑﺓﺗﺛﺟﺣﺧﺩﺫﺭﺯﺳﺷﺻﺿﻁﻅﻋﻏ¦¬÷×ﻉـﻓﻗﻛﻟﻣﻧﻫﻭﻯﻳﺽﻌﻎﻍﻡﹽّﻥﻩﻬﻰﻲﻐﻕﻵﻶﻝﻙﻱ■�" }, "ibm864": "cp864", "csibm864": "cp864", "cp865": { "type": "_sbcs", "chars": "ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜø£Ø₧ƒáíóúñѪº¿⌐¬½¼¡«¤░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " }, "ibm865": "cp865", "csibm865": "cp865", "cp866": { "type": "_sbcs", "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёЄєЇїЎў°∙·√№¤■ " }, "ibm866": "cp866", "csibm866": "cp866", "cp869": { "type": "_sbcs", "chars": "������Ά�·¬¦‘’Έ―ΉΊΪΌ��ΎΫ©Ώ²³ά£έήίϊΐόύΑΒΓΔΕΖΗ½ΘΙ«»░▒▓│┤ΚΛΜΝ╣║╗╝ΞΟ┐└┴┬├─┼ΠΡ╚╔╩╦╠═╬ΣΤΥΦΧΨΩαβγ┘┌█▄δε▀ζηθικλμνξοπρσςτ΄­±υφχ§ψ΅°¨ωϋΰώ■ " }, "ibm869": "cp869", "csibm869": "cp869", "cp922": { "type": "_sbcs", "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®‾°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏŠÑÒÓÔÕÖ×ØÙÚÛÜÝŽßàáâãäåæçèéêëìíîïšñòóôõö÷øùúûüýžÿ" }, "ibm922": "cp922", "csibm922": "cp922", "cp1046": { "type": "_sbcs", "chars": "ﺈ×÷ﹱˆ■│─┐┌└┘ﹹﹻﹽﹿﹷﺊﻰﻳﻲﻎﻏﻐﻶﻸﻺﻼ ¤ﺋﺑﺗﺛﺟﺣ،­ﺧﺳ٠١٢٣٤٥٦٧٨٩ﺷ؛ﺻﺿﻊ؟ﻋءآأؤإئابةتثجحخدذرزسشصضطﻇعغﻌﺂﺄﺎﻓـفقكلمنهوىيًٌٍَُِّْﻗﻛﻟﻵﻷﻹﻻﻣﻧﻬﻩ�" }, "ibm1046": "cp1046", "csibm1046": "cp1046", "cp1124": { "type": "_sbcs", "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ЁЂҐЄЅІЇЈЉЊЋЌ­ЎЏАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя№ёђґєѕіїјљњћќ§ўџ" }, "ibm1124": "cp1124", "csibm1124": "cp1124", "cp1125": { "type": "_sbcs", "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёҐґЄєІіЇї·√№¤■ " }, "ibm1125": "cp1125", "csibm1125": "cp1125", "cp1129": { "type": "_sbcs", "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§œ©ª«¬­®¯°±²³Ÿµ¶·Œ¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖ×ØÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ" }, "ibm1129": "cp1129", "csibm1129": "cp1129", "cp1133": { "type": "_sbcs", "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ກຂຄງຈສຊຍດຕຖທນບປຜຝພຟມຢຣລວຫອຮ���ຯະາຳິີຶືຸູຼັົຽ���ເແໂໃໄ່້໊໋໌ໍໆ�ໜໝ₭����������������໐໑໒໓໔໕໖໗໘໙��¢¬¦�" }, "ibm1133": "cp1133", "csibm1133": "cp1133", "cp1161": { "type": "_sbcs", "chars": "��������������������������������่กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู้๊๋€฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛¢¬¦ " }, "ibm1161": "cp1161", "csibm1161": "cp1161", "cp1162": { "type": "_sbcs", "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����" }, "ibm1162": "cp1162", "csibm1162": "cp1162", "cp1163": { "type": "_sbcs", "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£€¥¦§œ©ª«¬­®¯°±²³Ÿµ¶·Œ¹º»¼½¾¿ÀÁÂĂÄÅÆÇÈÉÊË̀ÍÎÏĐÑ̉ÓÔƠÖ×ØÙÚÛÜỮßàáâăäåæçèéêë́íîïđṇ̃óôơö÷øùúûüư₫ÿ" }, "ibm1163": "cp1163", "csibm1163": "cp1163", "maccroatian": { "type": "_sbcs", "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®Š™´¨≠ŽØ∞±≤≥∆µ∂∑∏š∫ªºΩžø¿¡¬√ƒ≈Ć«Č… ÀÃÕŒœĐ—“”‘’÷◊�©⁄¤‹›Æ»–·‚„‰ÂćÁčÈÍÎÏÌÓÔđÒÚÛÙıˆ˜¯πË˚¸Êæˇ" }, "maccyrillic": { "type": "_sbcs", "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°¢£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµ∂ЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю¤" }, "macgreek": { "type": "_sbcs", "chars": "Ĺ²É³ÖÜ΅àâä΄¨çéèê룙î‰ôö¦­ùûü†ΓΔΘΛΞΠß®©ΣΪ§≠°·Α±≤≥¥ΒΕΖΗΙΚΜΦΫΨΩάΝ¬ΟΡ≈Τ«»… ΥΧΆΈœ–―“”‘’÷ΉΊΌΎέήίόΏύαβψδεφγηιξκλμνοπώρστθωςχυζϊϋΐΰ�" }, "maciceland": { "type": "_sbcs", "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûüÝ°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤ÐðÞþý·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ" }, "macroman": { "type": "_sbcs", "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ" }, "macromania": { "type": "_sbcs", "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ĂŞ∞±≤≥¥µ∂∑∏π∫ªºΩăş¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›Ţţ‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ" }, "macthai": { "type": "_sbcs", "chars": "«»…“”�•‘’� กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู​–—฿เแโใไๅๆ็่้๊๋์ํ™๏๐๑๒๓๔๕๖๗๘๙®©����" }, "macturkish": { "type": "_sbcs", "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸĞğİıŞş‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙ�ˆ˜¯˘˙˚¸˝˛ˇ" }, "macukraine": { "type": "_sbcs", "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯ†°Ґ£§•¶І®©™Ђђ≠Ѓѓ∞±≤≥іµґЈЄєЇїЉљЊњјЅ¬√ƒ≈∆«»… ЋћЌќѕ–—“”‘’÷„ЎўЏџ№Ёёяабвгдежзийклмнопрстуфхцчшщъыьэю¤" }, "koi8r": { "type": "_sbcs", "chars": "─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ё╓╔╕╖╗╘╙╚╛╜╝╞╟╠╡Ё╢╣╤╥╦╧╨╩╪╫╬©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ" }, "koi8u": { "type": "_sbcs", "chars": "─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ёє╔ії╗╘╙╚╛ґ╝╞╟╠╡ЁЄ╣ІЇ╦╧╨╩╪Ґ╬©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ" }, "koi8ru": { "type": "_sbcs", "chars": "─│┌┐└┘├┤┬┴┼▀▄█▌▐░▒▓⌠■∙√≈≤≥ ⌡°²·÷═║╒ёє╔ії╗╘╙╚╛ґў╞╟╠╡ЁЄ╣ІЇ╦╧╨╩╪ҐЎ©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ" }, "koi8t": { "type": "_sbcs", "chars": "қғ‚Ғ„…†‡�‰ҳ‹ҲҷҶ�Қ‘’“”•–—�™�›�����ӯӮё¤ӣ¦§���«¬­®�°±²Ё�Ӣ¶·�№�»���©юабцдефгхийклмнопярстужвьызшэщчъЮАБЦДЕФГХИЙКЛМНОПЯРСТУЖВЬЫЗШЭЩЧЪ" }, "armscii8": { "type": "_sbcs", "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ �և։)(»«—.՝,-֊…՜՛՞ԱաԲբԳգԴդԵեԶզԷէԸըԹթԺժԻիԼլԽխԾծԿկՀհՁձՂղՃճՄմՅյՆնՇշՈոՉչՊպՋջՌռՍսՎվՏտՐրՑցՒւՓփՔքՕօՖֆ՚�" }, "rk1048": { "type": "_sbcs", "chars": "ЂЃ‚ѓ„…†‡€‰Љ‹ЊҚҺЏђ‘’“”•–—�™љ›њқһџ ҰұӘ¤Ө¦§Ё©Ғ«¬­®Ү°±Ііөµ¶·ё№ғ»әҢңүАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя" }, "tcvn": { "type": "_sbcs", "chars": "\u0000ÚỤ\u0003ỪỬỮ\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010ỨỰỲỶỸÝỴ\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ÀẢÃÁẠẶẬÈẺẼÉẸỆÌỈĨÍỊÒỎÕÓỌỘỜỞỠỚỢÙỦŨ ĂÂÊÔƠƯĐăâêôơưđẶ̀̀̉̃́àảãáạẲằẳẵắẴẮẦẨẪẤỀặầẩẫấậèỂẻẽéẹềểễếệìỉỄẾỒĩíịòỔỏõóọồổỗốộờởỡớợùỖủũúụừửữứựỳỷỹýỵỐ" }, "georgianacademy": { "type": "_sbcs", "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿აბგდევზთიკლმნოპჟრსტუფქღყშჩცძწჭხჯჰჱჲჳჴჵჶçèéêëìíîïðñòóôõö÷øùúûüýþÿ" }, "georgianps": { "type": "_sbcs", "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ¡¢£¤¥¦§¨©ª«¬­®¯°±²³´µ¶·¸¹º»¼½¾¿აბგდევზჱთიკლმნჲოპჟრსტჳუფქღყშჩცძწჭხჴჯჰჵæçèéêëìíîïðñòóôõö÷øùúûüýþÿ" }, "pt154": { "type": "_sbcs", "chars": "ҖҒӮғ„…ҶҮҲүҠӢҢҚҺҸҗ‘’“”•–—ҳҷҡӣңқһҹ ЎўЈӨҘҰ§Ё©Ә«¬ӯ®Ҝ°ұІіҙө¶·ё№ә»јҪҫҝАБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя" }, "viscii": { "type": "_sbcs", "chars": "\u0000\u0001Ẳ\u0003\u0004ẴẪ\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013Ỷ\u0015\u0016\u0017\u0018Ỹ\u001a\u001b\u001c\u001dỴ\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~ẠẮẰẶẤẦẨẬẼẸẾỀỂỄỆỐỒỔỖỘỢỚỜỞỊỎỌỈỦŨỤỲÕắằặấầẩậẽẹếềểễệốồổỗỠƠộờởịỰỨỪỬơớƯÀÁÂÃẢĂẳẵÈÉÊẺÌÍĨỳĐứÒÓÔạỷừửÙÚỹỵÝỡưàáâãảăữẫèéêẻìíĩỉđựòóôõỏọụùúũủýợỮ" }, "iso646cn": { "type": "_sbcs", "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#¥%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}‾��������������������������������������������������������������������������������������������������������������������������������" }, "iso646jp": { "type": "_sbcs", "chars": "\u0000\u0001\u0002\u0003\u0004\u0005\u0006\u0007\b\t\n\u000b\f\r\u000e\u000f\u0010\u0011\u0012\u0013\u0014\u0015\u0016\u0017\u0018\u0019\u001a\u001b\u001c\u001d\u001e\u001f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[¥]^_`abcdefghijklmnopqrstuvwxyz{|}‾��������������������������������������������������������������������������������������������������������������������������������" }, "hproman8": { "type": "_sbcs", "chars": "€‚ƒ„…†‡ˆ‰Š‹ŒŽ‘’“”•–—˜™š›œžŸ ÀÂÈÊËÎÏ´ˋˆ¨˜ÙÛ₤¯Ýý°ÇçÑñ¡¿¤£¥§ƒ¢âêôûáéóúàèòùäëöüÅîØÆåíøæÄìÖÜÉïßÔÁÃãÐðÍÌÓÒÕõŠšÚŸÿÞþ·µ¶¾—¼½ªº«■»±�" }, "macintosh": { "type": "_sbcs", "chars": "ÄÅÇÉÑÖÜáàâäãåçéèêëíìîïñóòôöõúùûü†°¢£§•¶ß®©™´¨≠ÆØ∞±≤≥¥µ∂∑∏π∫ªºΩæø¿¡¬√ƒ≈∆«»… ÀÃÕŒœ–—“”‘’÷◊ÿŸ⁄¤‹›fifl‡·‚„‰ÂÊÁËÈÍÎÏÌÓÔ�ÒÚÛÙıˆ˜¯˘˙˚¸˝˛ˇ" }, "ascii": { "type": "_sbcs", "chars": "��������������������������������������������������������������������������������������������������������������������������������" }, "tis620": { "type": "_sbcs", "chars": "���������������������������������กขฃคฅฆงจฉชซฌญฎฏฐฑฒณดตถทธนบปผฝพฟภมยรฤลฦวศษสหฬอฮฯะัาำิีึืฺุู����฿เแโใไๅๆ็่้๊๋์ํ๎๏๐๑๒๓๔๕๖๗๘๙๚๛����" } } /***/ }), /***/ 3769: /***/ (function(module) { "use strict"; // Manually added data to be used by sbcs codec in addition to generated one. module.exports = { // Not supported by iconv, not sure why. "10029": "maccenteuro", "maccenteuro": { "type": "_sbcs", "chars": "ÄĀāÉĄÖÜáąČäčĆć鏟ĎíďĒēĖóėôöõúĚěü†°Ę£§•¶ß®©™ę¨≠ģĮįĪ≤≥īĶ∂∑łĻļĽľĹĺŅņѬ√ńŇ∆«»… ňŐÕőŌ–—“”‘’÷◊ōŔŕŘ‹›řŖŗŠ‚„šŚśÁŤťÍŽžŪÓÔūŮÚůŰűŲųÝýķŻŁżĢˇ" }, "808": "cp808", "ibm808": "cp808", "cp808": { "type": "_sbcs", "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмноп░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀рстуфхцчшщъыьэюяЁёЄєЇїЎў°∙·√№€■ " }, "mik": { "type": "_sbcs", "chars": "АБВГДЕЖЗИЙКЛМНОПРСТУФХЦЧШЩЪЫЬЭЮЯабвгдежзийклмнопрстуфхцчшщъыьэюя└┴┬├─┼╣║╚╔╩╦╠═╬┐░▒▓│┤№§╗╝┘┌█▄▌▐▀αßΓπΣσµτΦΘΩδ∞φε∩≡±≥≤⌠⌡÷≈°∙·√ⁿ²■ " }, "cp720": { "type": "_sbcs", "chars": "\x80\x81éâ\x84à\x86çêëèïî\x8d\x8e\x8f\x90\u0651\u0652ô¤ـûùءآأؤ£إئابةتثجحخدذرزسشص«»░▒▓│┤╡╢╖╕╣║╗╝╜╛┐└┴┬├─┼╞╟╚╔╩╦╠═╬╧╨╤╥╙╘╒╓╫╪┘┌█▄▌▐▀ضطظعغفµقكلمنهوىي≡\u064b\u064c\u064d\u064e\u064f\u0650≈°∙·√ⁿ²■\u00a0" }, // Aliases of generated encodings. "ascii8bit": "ascii", "usascii": "ascii", "ansix34": "ascii", "ansix341968": "ascii", "ansix341986": "ascii", "csascii": "ascii", "cp367": "ascii", "ibm367": "ascii", "isoir6": "ascii", "iso646us": "ascii", "iso646irv": "ascii", "us": "ascii", "latin1": "iso88591", "latin2": "iso88592", "latin3": "iso88593", "latin4": "iso88594", "latin5": "iso88599", "latin6": "iso885910", "latin7": "iso885913", "latin8": "iso885914", "latin9": "iso885915", "latin10": "iso885916", "csisolatin1": "iso88591", "csisolatin2": "iso88592", "csisolatin3": "iso88593", "csisolatin4": "iso88594", "csisolatincyrillic": "iso88595", "csisolatinarabic": "iso88596", "csisolatingreek" : "iso88597", "csisolatinhebrew": "iso88598", "csisolatin5": "iso88599", "csisolatin6": "iso885910", "l1": "iso88591", "l2": "iso88592", "l3": "iso88593", "l4": "iso88594", "l5": "iso88599", "l6": "iso885910", "l7": "iso885913", "l8": "iso885914", "l9": "iso885915", "l10": "iso885916", "isoir14": "iso646jp", "isoir57": "iso646cn", "isoir100": "iso88591", "isoir101": "iso88592", "isoir109": "iso88593", "isoir110": "iso88594", "isoir144": "iso88595", "isoir127": "iso88596", "isoir126": "iso88597", "isoir138": "iso88598", "isoir148": "iso88599", "isoir157": "iso885910", "isoir166": "tis620", "isoir179": "iso885913", "isoir199": "iso885914", "isoir203": "iso885915", "isoir226": "iso885916", "cp819": "iso88591", "ibm819": "iso88591", "cyrillic": "iso88595", "arabic": "iso88596", "arabic8": "iso88596", "ecma114": "iso88596", "asmo708": "iso88596", "greek" : "iso88597", "greek8" : "iso88597", "ecma118" : "iso88597", "elot928" : "iso88597", "hebrew": "iso88598", "hebrew8": "iso88598", "turkish": "iso88599", "turkish8": "iso88599", "thai": "iso885911", "thai8": "iso885911", "celtic": "iso885914", "celtic8": "iso885914", "isoceltic": "iso885914", "tis6200": "tis620", "tis62025291": "tis620", "tis62025330": "tis620", "10000": "macroman", "10006": "macgreek", "10007": "maccyrillic", "10079": "maciceland", "10081": "macturkish", "cspc8codepage437": "cp437", "cspc775baltic": "cp775", "cspc850multilingual": "cp850", "cspcp852": "cp852", "cspc862latinhebrew": "cp862", "cpgr": "cp869", "msee": "cp1250", "mscyrl": "cp1251", "msansi": "cp1252", "msgreek": "cp1253", "msturk": "cp1254", "mshebr": "cp1255", "msarab": "cp1256", "winbaltrim": "cp1257", "cp20866": "koi8r", "20866": "koi8r", "ibm878": "koi8r", "cskoi8r": "koi8r", "cp21866": "koi8u", "21866": "koi8u", "ibm1168": "koi8u", "strk10482002": "rk1048", "tcvn5712": "tcvn", "tcvn57121": "tcvn", "gb198880": "iso646cn", "cn": "iso646cn", "csiso14jisc6220ro": "iso646jp", "jisc62201969ro": "iso646jp", "jp": "iso646jp", "cshproman8": "hproman8", "r8": "hproman8", "roman8": "hproman8", "xroman8": "hproman8", "ibm1051": "hproman8", "mac": "macintosh", "csmacintosh": "macintosh", }; /***/ }), /***/ 1279: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var Buffer = (__webpack_require__(7103).Buffer); // Note: UTF16-LE (or UCS2) codec is Node.js native. See encodings/internal.js // == UTF16-BE codec. ========================================================== exports.utf16be = Utf16BECodec; function Utf16BECodec() { } Utf16BECodec.prototype.encoder = Utf16BEEncoder; Utf16BECodec.prototype.decoder = Utf16BEDecoder; Utf16BECodec.prototype.bomAware = true; // -- Encoding function Utf16BEEncoder() { } Utf16BEEncoder.prototype.write = function(str) { var buf = Buffer.from(str, 'ucs2'); for (var i = 0; i < buf.length; i += 2) { var tmp = buf[i]; buf[i] = buf[i+1]; buf[i+1] = tmp; } return buf; } Utf16BEEncoder.prototype.end = function() { } // -- Decoding function Utf16BEDecoder() { this.overflowByte = -1; } Utf16BEDecoder.prototype.write = function(buf) { if (buf.length == 0) return ''; var buf2 = Buffer.alloc(buf.length + 1), i = 0, j = 0; if (this.overflowByte !== -1) { buf2[0] = buf[0]; buf2[1] = this.overflowByte; i = 1; j = 2; } for (; i < buf.length-1; i += 2, j+= 2) { buf2[j] = buf[i+1]; buf2[j+1] = buf[i]; } this.overflowByte = (i == buf.length-1) ? buf[buf.length-1] : -1; return buf2.slice(0, j).toString('ucs2'); } Utf16BEDecoder.prototype.end = function() { this.overflowByte = -1; } // == UTF-16 codec ============================================================= // Decoder chooses automatically from UTF-16LE and UTF-16BE using BOM and space-based heuristic. // Defaults to UTF-16LE, as it's prevalent and default in Node. // http://en.wikipedia.org/wiki/UTF-16 and http://encoding.spec.whatwg.org/#utf-16le // Decoder default can be changed: iconv.decode(buf, 'utf16', {defaultEncoding: 'utf-16be'}); // Encoder uses UTF-16LE and prepends BOM (which can be overridden with addBOM: false). exports.utf16 = Utf16Codec; function Utf16Codec(codecOptions, iconv) { this.iconv = iconv; } Utf16Codec.prototype.encoder = Utf16Encoder; Utf16Codec.prototype.decoder = Utf16Decoder; // -- Encoding (pass-through) function Utf16Encoder(options, codec) { options = options || {}; if (options.addBOM === undefined) options.addBOM = true; this.encoder = codec.iconv.getEncoder('utf-16le', options); } Utf16Encoder.prototype.write = function(str) { return this.encoder.write(str); } Utf16Encoder.prototype.end = function() { return this.encoder.end(); } // -- Decoding function Utf16Decoder(options, codec) { this.decoder = null; this.initialBufs = []; this.initialBufsLen = 0; this.options = options || {}; this.iconv = codec.iconv; } Utf16Decoder.prototype.write = function(buf) { if (!this.decoder) { // Codec is not chosen yet. Accumulate initial bytes. this.initialBufs.push(buf); this.initialBufsLen += buf.length; if (this.initialBufsLen < 16) // We need more bytes to use space heuristic (see below) return ''; // We have enough bytes -> detect endianness. var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding); this.decoder = this.iconv.getDecoder(encoding, this.options); var resStr = ''; for (var i = 0; i < this.initialBufs.length; i++) resStr += this.decoder.write(this.initialBufs[i]); this.initialBufs.length = this.initialBufsLen = 0; return resStr; } return this.decoder.write(buf); } Utf16Decoder.prototype.end = function() { if (!this.decoder) { var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding); this.decoder = this.iconv.getDecoder(encoding, this.options); var resStr = ''; for (var i = 0; i < this.initialBufs.length; i++) resStr += this.decoder.write(this.initialBufs[i]); var trail = this.decoder.end(); if (trail) resStr += trail; this.initialBufs.length = this.initialBufsLen = 0; return resStr; } return this.decoder.end(); } function detectEncoding(bufs, defaultEncoding) { var b = []; var charsProcessed = 0; var asciiCharsLE = 0, asciiCharsBE = 0; // Number of ASCII chars when decoded as LE or BE. outer_loop: for (var i = 0; i < bufs.length; i++) { var buf = bufs[i]; for (var j = 0; j < buf.length; j++) { b.push(buf[j]); if (b.length === 2) { if (charsProcessed === 0) { // Check BOM first. if (b[0] === 0xFF && b[1] === 0xFE) return 'utf-16le'; if (b[0] === 0xFE && b[1] === 0xFF) return 'utf-16be'; } if (b[0] === 0 && b[1] !== 0) asciiCharsBE++; if (b[0] !== 0 && b[1] === 0) asciiCharsLE++; b.length = 0; charsProcessed++; if (charsProcessed >= 100) { break outer_loop; } } } } // Make decisions. // Most of the time, the content has ASCII chars (U+00**), but the opposite (U+**00) is uncommon. // So, we count ASCII as if it was LE or BE, and decide from that. if (asciiCharsBE > asciiCharsLE) return 'utf-16be'; if (asciiCharsBE < asciiCharsLE) return 'utf-16le'; // Couldn't decide (likely all zeros or not enough data). return defaultEncoding || 'utf-16le'; } /***/ }), /***/ 7688: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var Buffer = (__webpack_require__(7103).Buffer); // == UTF32-LE/BE codec. ========================================================== exports._utf32 = Utf32Codec; function Utf32Codec(codecOptions, iconv) { this.iconv = iconv; this.bomAware = true; this.isLE = codecOptions.isLE; } exports.utf32le = { type: '_utf32', isLE: true }; exports.utf32be = { type: '_utf32', isLE: false }; // Aliases exports.ucs4le = 'utf32le'; exports.ucs4be = 'utf32be'; Utf32Codec.prototype.encoder = Utf32Encoder; Utf32Codec.prototype.decoder = Utf32Decoder; // -- Encoding function Utf32Encoder(options, codec) { this.isLE = codec.isLE; this.highSurrogate = 0; } Utf32Encoder.prototype.write = function(str) { var src = Buffer.from(str, 'ucs2'); var dst = Buffer.alloc(src.length * 2); var write32 = this.isLE ? dst.writeUInt32LE : dst.writeUInt32BE; var offset = 0; for (var i = 0; i < src.length; i += 2) { var code = src.readUInt16LE(i); var isHighSurrogate = (0xD800 <= code && code < 0xDC00); var isLowSurrogate = (0xDC00 <= code && code < 0xE000); if (this.highSurrogate) { if (isHighSurrogate || !isLowSurrogate) { // There shouldn't be two high surrogates in a row, nor a high surrogate which isn't followed by a low // surrogate. If this happens, keep the pending high surrogate as a stand-alone semi-invalid character // (technically wrong, but expected by some applications, like Windows file names). write32.call(dst, this.highSurrogate, offset); offset += 4; } else { // Create 32-bit value from high and low surrogates; var codepoint = (((this.highSurrogate - 0xD800) << 10) | (code - 0xDC00)) + 0x10000; write32.call(dst, codepoint, offset); offset += 4; this.highSurrogate = 0; continue; } } if (isHighSurrogate) this.highSurrogate = code; else { // Even if the current character is a low surrogate, with no previous high surrogate, we'll // encode it as a semi-invalid stand-alone character for the same reasons expressed above for // unpaired high surrogates. write32.call(dst, code, offset); offset += 4; this.highSurrogate = 0; } } if (offset < dst.length) dst = dst.slice(0, offset); return dst; }; Utf32Encoder.prototype.end = function() { // Treat any leftover high surrogate as a semi-valid independent character. if (!this.highSurrogate) return; var buf = Buffer.alloc(4); if (this.isLE) buf.writeUInt32LE(this.highSurrogate, 0); else buf.writeUInt32BE(this.highSurrogate, 0); this.highSurrogate = 0; return buf; }; // -- Decoding function Utf32Decoder(options, codec) { this.isLE = codec.isLE; this.badChar = codec.iconv.defaultCharUnicode.charCodeAt(0); this.overflow = []; } Utf32Decoder.prototype.write = function(src) { if (src.length === 0) return ''; var i = 0; var codepoint = 0; var dst = Buffer.alloc(src.length + 4); var offset = 0; var isLE = this.isLE; var overflow = this.overflow; var badChar = this.badChar; if (overflow.length > 0) { for (; i < src.length && overflow.length < 4; i++) overflow.push(src[i]); if (overflow.length === 4) { // NOTE: codepoint is a signed int32 and can be negative. // NOTE: We copied this block from below to help V8 optimize it (it works with array, not buffer). if (isLE) { codepoint = overflow[i] | (overflow[i+1] << 8) | (overflow[i+2] << 16) | (overflow[i+3] << 24); } else { codepoint = overflow[i+3] | (overflow[i+2] << 8) | (overflow[i+1] << 16) | (overflow[i] << 24); } overflow.length = 0; offset = _writeCodepoint(dst, offset, codepoint, badChar); } } // Main loop. Should be as optimized as possible. for (; i < src.length - 3; i += 4) { // NOTE: codepoint is a signed int32 and can be negative. if (isLE) { codepoint = src[i] | (src[i+1] << 8) | (src[i+2] << 16) | (src[i+3] << 24); } else { codepoint = src[i+3] | (src[i+2] << 8) | (src[i+1] << 16) | (src[i] << 24); } offset = _writeCodepoint(dst, offset, codepoint, badChar); } // Keep overflowing bytes. for (; i < src.length; i++) { overflow.push(src[i]); } return dst.slice(0, offset).toString('ucs2'); }; function _writeCodepoint(dst, offset, codepoint, badChar) { // NOTE: codepoint is signed int32 and can be negative. We keep it that way to help V8 with optimizations. if (codepoint < 0 || codepoint > 0x10FFFF) { // Not a valid Unicode codepoint codepoint = badChar; } // Ephemeral Planes: Write high surrogate. if (codepoint >= 0x10000) { codepoint -= 0x10000; var high = 0xD800 | (codepoint >> 10); dst[offset++] = high & 0xff; dst[offset++] = high >> 8; // Low surrogate is written below. var codepoint = 0xDC00 | (codepoint & 0x3FF); } // Write BMP char or low surrogate. dst[offset++] = codepoint & 0xff; dst[offset++] = codepoint >> 8; return offset; }; Utf32Decoder.prototype.end = function() { this.overflow.length = 0; }; // == UTF-32 Auto codec ============================================================= // Decoder chooses automatically from UTF-32LE and UTF-32BE using BOM and space-based heuristic. // Defaults to UTF-32LE. http://en.wikipedia.org/wiki/UTF-32 // Encoder/decoder default can be changed: iconv.decode(buf, 'utf32', {defaultEncoding: 'utf-32be'}); // Encoder prepends BOM (which can be overridden with (addBOM: false}). exports.utf32 = Utf32AutoCodec; exports.ucs4 = 'utf32'; function Utf32AutoCodec(options, iconv) { this.iconv = iconv; } Utf32AutoCodec.prototype.encoder = Utf32AutoEncoder; Utf32AutoCodec.prototype.decoder = Utf32AutoDecoder; // -- Encoding function Utf32AutoEncoder(options, codec) { options = options || {}; if (options.addBOM === undefined) options.addBOM = true; this.encoder = codec.iconv.getEncoder(options.defaultEncoding || 'utf-32le', options); } Utf32AutoEncoder.prototype.write = function(str) { return this.encoder.write(str); }; Utf32AutoEncoder.prototype.end = function() { return this.encoder.end(); }; // -- Decoding function Utf32AutoDecoder(options, codec) { this.decoder = null; this.initialBufs = []; this.initialBufsLen = 0; this.options = options || {}; this.iconv = codec.iconv; } Utf32AutoDecoder.prototype.write = function(buf) { if (!this.decoder) { // Codec is not chosen yet. Accumulate initial bytes. this.initialBufs.push(buf); this.initialBufsLen += buf.length; if (this.initialBufsLen < 32) // We need more bytes to use space heuristic (see below) return ''; // We have enough bytes -> detect endianness. var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding); this.decoder = this.iconv.getDecoder(encoding, this.options); var resStr = ''; for (var i = 0; i < this.initialBufs.length; i++) resStr += this.decoder.write(this.initialBufs[i]); this.initialBufs.length = this.initialBufsLen = 0; return resStr; } return this.decoder.write(buf); }; Utf32AutoDecoder.prototype.end = function() { if (!this.decoder) { var encoding = detectEncoding(this.initialBufs, this.options.defaultEncoding); this.decoder = this.iconv.getDecoder(encoding, this.options); var resStr = ''; for (var i = 0; i < this.initialBufs.length; i++) resStr += this.decoder.write(this.initialBufs[i]); var trail = this.decoder.end(); if (trail) resStr += trail; this.initialBufs.length = this.initialBufsLen = 0; return resStr; } return this.decoder.end(); }; function detectEncoding(bufs, defaultEncoding) { var b = []; var charsProcessed = 0; var invalidLE = 0, invalidBE = 0; // Number of invalid chars when decoded as LE or BE. var bmpCharsLE = 0, bmpCharsBE = 0; // Number of BMP chars when decoded as LE or BE. outer_loop: for (var i = 0; i < bufs.length; i++) { var buf = bufs[i]; for (var j = 0; j < buf.length; j++) { b.push(buf[j]); if (b.length === 4) { if (charsProcessed === 0) { // Check BOM first. if (b[0] === 0xFF && b[1] === 0xFE && b[2] === 0 && b[3] === 0) { return 'utf-32le'; } if (b[0] === 0 && b[1] === 0 && b[2] === 0xFE && b[3] === 0xFF) { return 'utf-32be'; } } if (b[0] !== 0 || b[1] > 0x10) invalidBE++; if (b[3] !== 0 || b[2] > 0x10) invalidLE++; if (b[0] === 0 && b[1] === 0 && (b[2] !== 0 || b[3] !== 0)) bmpCharsBE++; if ((b[0] !== 0 || b[1] !== 0) && b[2] === 0 && b[3] === 0) bmpCharsLE++; b.length = 0; charsProcessed++; if (charsProcessed >= 100) { break outer_loop; } } } } // Make decisions. if (bmpCharsBE - invalidBE > bmpCharsLE - invalidLE) return 'utf-32be'; if (bmpCharsBE - invalidBE < bmpCharsLE - invalidLE) return 'utf-32le'; // Couldn't decide (likely all zeros or not enough data). return defaultEncoding || 'utf-32le'; } /***/ }), /***/ 758: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { "use strict"; var Buffer = (__webpack_require__(7103).Buffer); // UTF-7 codec, according to https://tools.ietf.org/html/rfc2152 // See also below a UTF-7-IMAP codec, according to http://tools.ietf.org/html/rfc3501#section-5.1.3 exports.utf7 = Utf7Codec; exports.unicode11utf7 = 'utf7'; // Alias UNICODE-1-1-UTF-7 function Utf7Codec(codecOptions, iconv) { this.iconv = iconv; }; Utf7Codec.prototype.encoder = Utf7Encoder; Utf7Codec.prototype.decoder = Utf7Decoder; Utf7Codec.prototype.bomAware = true; // -- Encoding var nonDirectChars = /[^A-Za-z0-9'\(\),-\.\/:\? \n\r\t]+/g; function Utf7Encoder(options, codec) { this.iconv = codec.iconv; } Utf7Encoder.prototype.write = function(str) { // Naive implementation. // Non-direct chars are encoded as "+-"; single "+" char is encoded as "+-". return Buffer.from(str.replace(nonDirectChars, function(chunk) { return "+" + (chunk === '+' ? '' : this.iconv.encode(chunk, 'utf16-be').toString('base64').replace(/=+$/, '')) + "-"; }.bind(this))); } Utf7Encoder.prototype.end = function() { } // -- Decoding function Utf7Decoder(options, codec) { this.iconv = codec.iconv; this.inBase64 = false; this.base64Accum = ''; } var base64Regex = /[A-Za-z0-9\/+]/; var base64Chars = []; for (var i = 0; i < 256; i++) base64Chars[i] = base64Regex.test(String.fromCharCode(i)); var plusChar = '+'.charCodeAt(0), minusChar = '-'.charCodeAt(0), andChar = '&'.charCodeAt(0); Utf7Decoder.prototype.write = function(buf) { var res = "", lastI = 0, inBase64 = this.inBase64, base64Accum = this.base64Accum; // The decoder is more involved as we must handle chunks in stream. for (var i = 0; i < buf.length; i++) { if (!inBase64) { // We're in direct mode. // Write direct chars until '+' if (buf[i] == plusChar) { res += this.iconv.decode(buf.slice(lastI, i), "ascii"); // Write direct chars. lastI = i+1; inBase64 = true; } } else { // We decode base64. if (!base64Chars[buf[i]]) { // Base64 ended. if (i == lastI && buf[i] == minusChar) {// "+-" -> "+" res += "+"; } else { var b64str = base64Accum + this.iconv.decode(buf.slice(lastI, i), "ascii"); res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be"); } if (buf[i] != minusChar) // Minus is absorbed after base64. i--; lastI = i+1; inBase64 = false; base64Accum = ''; } } } if (!inBase64) { res += this.iconv.decode(buf.slice(lastI), "ascii"); // Write direct chars. } else { var b64str = base64Accum + this.iconv.decode(buf.slice(lastI), "ascii"); var canBeDecoded = b64str.length - (b64str.length % 8); // Minimal chunk: 2 quads -> 2x3 bytes -> 3 chars. base64Accum = b64str.slice(canBeDecoded); // The rest will be decoded in future. b64str = b64str.slice(0, canBeDecoded); res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be"); } this.inBase64 = inBase64; this.base64Accum = base64Accum; return res; } Utf7Decoder.prototype.end = function() { var res = ""; if (this.inBase64 && this.base64Accum.length > 0) res = this.iconv.decode(Buffer.from(this.base64Accum, 'base64'), "utf16-be"); this.inBase64 = false; this.base64Accum = ''; return res; } // UTF-7-IMAP codec. // RFC3501 Sec. 5.1.3 Modified UTF-7 (http://tools.ietf.org/html/rfc3501#section-5.1.3) // Differences: // * Base64 part is started by "&" instead of "+" // * Direct characters are 0x20-0x7E, except "&" (0x26) // * In Base64, "," is used instead of "/" // * Base64 must not be used to represent direct characters. // * No implicit shift back from Base64 (should always end with '-') // * String must end in non-shifted position. // * "-&" while in base64 is not allowed. exports.utf7imap = Utf7IMAPCodec; function Utf7IMAPCodec(codecOptions, iconv) { this.iconv = iconv; }; Utf7IMAPCodec.prototype.encoder = Utf7IMAPEncoder; Utf7IMAPCodec.prototype.decoder = Utf7IMAPDecoder; Utf7IMAPCodec.prototype.bomAware = true; // -- Encoding function Utf7IMAPEncoder(options, codec) { this.iconv = codec.iconv; this.inBase64 = false; this.base64Accum = Buffer.alloc(6); this.base64AccumIdx = 0; } Utf7IMAPEncoder.prototype.write = function(str) { var inBase64 = this.inBase64, base64Accum = this.base64Accum, base64AccumIdx = this.base64AccumIdx, buf = Buffer.alloc(str.length*5 + 10), bufIdx = 0; for (var i = 0; i < str.length; i++) { var uChar = str.charCodeAt(i); if (0x20 <= uChar && uChar <= 0x7E) { // Direct character or '&'. if (inBase64) { if (base64AccumIdx > 0) { bufIdx += buf.write(base64Accum.slice(0, base64AccumIdx).toString('base64').replace(/\//g, ',').replace(/=+$/, ''), bufIdx); base64AccumIdx = 0; } buf[bufIdx++] = minusChar; // Write '-', then go to direct mode. inBase64 = false; } if (!inBase64) { buf[bufIdx++] = uChar; // Write direct character if (uChar === andChar) // Ampersand -> '&-' buf[bufIdx++] = minusChar; } } else { // Non-direct character if (!inBase64) { buf[bufIdx++] = andChar; // Write '&', then go to base64 mode. inBase64 = true; } if (inBase64) { base64Accum[base64AccumIdx++] = uChar >> 8; base64Accum[base64AccumIdx++] = uChar & 0xFF; if (base64AccumIdx == base64Accum.length) { bufIdx += buf.write(base64Accum.toString('base64').replace(/\//g, ','), bufIdx); base64AccumIdx = 0; } } } } this.inBase64 = inBase64; this.base64AccumIdx = base64AccumIdx; return buf.slice(0, bufIdx); } Utf7IMAPEncoder.prototype.end = function() { var buf = Buffer.alloc(10), bufIdx = 0; if (this.inBase64) { if (this.base64AccumIdx > 0) { bufIdx += buf.write(this.base64Accum.slice(0, this.base64AccumIdx).toString('base64').replace(/\//g, ',').replace(/=+$/, ''), bufIdx); this.base64AccumIdx = 0; } buf[bufIdx++] = minusChar; // Write '-', then go to direct mode. this.inBase64 = false; } return buf.slice(0, bufIdx); } // -- Decoding function Utf7IMAPDecoder(options, codec) { this.iconv = codec.iconv; this.inBase64 = false; this.base64Accum = ''; } var base64IMAPChars = base64Chars.slice(); base64IMAPChars[','.charCodeAt(0)] = true; Utf7IMAPDecoder.prototype.write = function(buf) { var res = "", lastI = 0, inBase64 = this.inBase64, base64Accum = this.base64Accum; // The decoder is more involved as we must handle chunks in stream. // It is forgiving, closer to standard UTF-7 (for example, '-' is optional at the end). for (var i = 0; i < buf.length; i++) { if (!inBase64) { // We're in direct mode. // Write direct chars until '&' if (buf[i] == andChar) { res += this.iconv.decode(buf.slice(lastI, i), "ascii"); // Write direct chars. lastI = i+1; inBase64 = true; } } else { // We decode base64. if (!base64IMAPChars[buf[i]]) { // Base64 ended. if (i == lastI && buf[i] == minusChar) { // "&-" -> "&" res += "&"; } else { var b64str = base64Accum + this.iconv.decode(buf.slice(lastI, i), "ascii").replace(/,/g, '/'); res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be"); } if (buf[i] != minusChar) // Minus may be absorbed after base64. i--; lastI = i+1; inBase64 = false; base64Accum = ''; } } } if (!inBase64) { res += this.iconv.decode(buf.slice(lastI), "ascii"); // Write direct chars. } else { var b64str = base64Accum + this.iconv.decode(buf.slice(lastI), "ascii").replace(/,/g, '/'); var canBeDecoded = b64str.length - (b64str.length % 8); // Minimal chunk: 2 quads -> 2x3 bytes -> 3 chars. base64Accum = b64str.slice(canBeDecoded); // The rest will be decoded in future. b64str = b64str.slice(0, canBeDecoded); res += this.iconv.decode(Buffer.from(b64str, 'base64'), "utf16-be"); } this.inBase64 = inBase64; this.base64Accum = base64Accum; return res; } Utf7IMAPDecoder.prototype.end = function() { var res = ""; if (this.inBase64 && this.base64Accum.length > 0) res = this.iconv.decode(Buffer.from(this.base64Accum, 'base64'), "utf16-be"); this.inBase64 = false; this.base64Accum = ''; return res; } /***/ }), /***/ 5395: /***/ (function(__unused_webpack_module, exports) { "use strict"; var BOMChar = '\uFEFF'; exports.PrependBOM = PrependBOMWrapper function PrependBOMWrapper(encoder, options) { this.encoder = encoder; this.addBOM = true; } PrependBOMWrapper.prototype.write = function(str) { if (this.addBOM) { str = BOMChar + str; this.addBOM = false; } return this.encoder.write(str); } PrependBOMWrapper.prototype.end = function() { return this.encoder.end(); } //------------------------------------------------------------------------------ exports.StripBOM = StripBOMWrapper; function StripBOMWrapper(decoder, options) { this.decoder = decoder; this.pass = false; this.options = options || {}; } StripBOMWrapper.prototype.write = function(buf) { var res = this.decoder.write(buf); if (this.pass || !res) return res; if (res[0] === BOMChar) { res = res.slice(1); if (typeof this.options.stripBOM === 'function') this.options.stripBOM(); } this.pass = true; return res; } StripBOMWrapper.prototype.end = function() { return this.decoder.end(); } /***/ }), /***/ 4914: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var Buffer = (__webpack_require__(7103).Buffer); var bomHandling = __webpack_require__(5395), iconv = module.exports; // All codecs and aliases are kept here, keyed by encoding name/alias. // They are lazy loaded in `iconv.getCodec` from `encodings/index.js`. iconv.encodings = null; // Characters emitted in case of error. iconv.defaultCharUnicode = '�'; iconv.defaultCharSingleByte = '?'; // Public API. iconv.encode = function encode(str, encoding, options) { str = "" + (str || ""); // Ensure string. var encoder = iconv.getEncoder(encoding, options); var res = encoder.write(str); var trail = encoder.end(); return (trail && trail.length > 0) ? Buffer.concat([res, trail]) : res; } iconv.decode = function decode(buf, encoding, options) { if (typeof buf === 'string') { if (!iconv.skipDecodeWarning) { console.error('Iconv-lite warning: decode()-ing strings is deprecated. Refer to https://github.com/ashtuchkin/iconv-lite/wiki/Use-Buffers-when-decoding'); iconv.skipDecodeWarning = true; } buf = Buffer.from("" + (buf || ""), "binary"); // Ensure buffer. } var decoder = iconv.getDecoder(encoding, options); var res = decoder.write(buf); var trail = decoder.end(); return trail ? (res + trail) : res; } iconv.encodingExists = function encodingExists(enc) { try { iconv.getCodec(enc); return true; } catch (e) { return false; } } // Legacy aliases to convert functions iconv.toEncoding = iconv.encode; iconv.fromEncoding = iconv.decode; // Search for a codec in iconv.encodings. Cache codec data in iconv._codecDataCache. iconv._codecDataCache = {}; iconv.getCodec = function getCodec(encoding) { if (!iconv.encodings) iconv.encodings = __webpack_require__(6934); // Lazy load all encoding definitions. // Canonicalize encoding name: strip all non-alphanumeric chars and appended year. var enc = iconv._canonicalizeEncoding(encoding); // Traverse iconv.encodings to find actual codec. var codecOptions = {}; while (true) { var codec = iconv._codecDataCache[enc]; if (codec) return codec; var codecDef = iconv.encodings[enc]; switch (typeof codecDef) { case "string": // Direct alias to other encoding. enc = codecDef; break; case "object": // Alias with options. Can be layered. for (var key in codecDef) codecOptions[key] = codecDef[key]; if (!codecOptions.encodingName) codecOptions.encodingName = enc; enc = codecDef.type; break; case "function": // Codec itself. if (!codecOptions.encodingName) codecOptions.encodingName = enc; // The codec function must load all tables and return object with .encoder and .decoder methods. // It'll be called only once (for each different options object). codec = new codecDef(codecOptions, iconv); iconv._codecDataCache[codecOptions.encodingName] = codec; // Save it to be reused later. return codec; default: throw new Error("Encoding not recognized: '" + encoding + "' (searched as: '"+enc+"')"); } } } iconv._canonicalizeEncoding = function(encoding) { // Canonicalize encoding name: strip all non-alphanumeric chars and appended year. return (''+encoding).toLowerCase().replace(/:\d{4}$|[^0-9a-z]/g, ""); } iconv.getEncoder = function getEncoder(encoding, options) { var codec = iconv.getCodec(encoding), encoder = new codec.encoder(options, codec); if (codec.bomAware && options && options.addBOM) encoder = new bomHandling.PrependBOM(encoder, options); return encoder; } iconv.getDecoder = function getDecoder(encoding, options) { var codec = iconv.getCodec(encoding), decoder = new codec.decoder(options, codec); if (codec.bomAware && !(options && options.stripBOM === false)) decoder = new bomHandling.StripBOM(decoder, options); return decoder; } // Streaming API // NOTE: Streaming API naturally depends on 'stream' module from Node.js. Unfortunately in browser environments this module can add // up to 100Kb to the output bundle. To avoid unnecessary code bloat, we don't enable Streaming API in browser by default. // If you would like to enable it explicitly, please add the following code to your app: // > iconv.enableStreamingAPI(require('stream')); iconv.enableStreamingAPI = function enableStreamingAPI(stream_module) { if (iconv.supportsStreams) return; // Dependency-inject stream module to create IconvLite stream classes. var streams = __webpack_require__(8044)(stream_module); // Not public API yet, but expose the stream classes. iconv.IconvLiteEncoderStream = streams.IconvLiteEncoderStream; iconv.IconvLiteDecoderStream = streams.IconvLiteDecoderStream; // Streaming API. iconv.encodeStream = function encodeStream(encoding, options) { return new iconv.IconvLiteEncoderStream(iconv.getEncoder(encoding, options), options); } iconv.decodeStream = function decodeStream(encoding, options) { return new iconv.IconvLiteDecoderStream(iconv.getDecoder(encoding, options), options); } iconv.supportsStreams = true; } // Enable Streaming API automatically if 'stream' module is available and non-empty (the majority of environments). var stream_module; try { stream_module = __webpack_require__(5832); } catch (e) {} if (stream_module && stream_module.Transform) { iconv.enableStreamingAPI(stream_module); } else { // In rare cases where 'stream' module is not available by default, throw a helpful exception. iconv.encodeStream = iconv.decodeStream = function() { throw new Error("iconv-lite Streaming API is not enabled. Use iconv.enableStreamingAPI(require('stream')); to enable it."); }; } if (false) {} /***/ }), /***/ 8044: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var Buffer = (__webpack_require__(7103).Buffer); // NOTE: Due to 'stream' module being pretty large (~100Kb, significant in browser environments), // we opt to dependency-inject it instead of creating a hard dependency. module.exports = function(stream_module) { var Transform = stream_module.Transform; // == Encoder stream ======================================================= function IconvLiteEncoderStream(conv, options) { this.conv = conv; options = options || {}; options.decodeStrings = false; // We accept only strings, so we don't need to decode them. Transform.call(this, options); } IconvLiteEncoderStream.prototype = Object.create(Transform.prototype, { constructor: { value: IconvLiteEncoderStream } }); IconvLiteEncoderStream.prototype._transform = function(chunk, encoding, done) { if (typeof chunk != 'string') return done(new Error("Iconv encoding stream needs strings as its input.")); try { var res = this.conv.write(chunk); if (res && res.length) this.push(res); done(); } catch (e) { done(e); } } IconvLiteEncoderStream.prototype._flush = function(done) { try { var res = this.conv.end(); if (res && res.length) this.push(res); done(); } catch (e) { done(e); } } IconvLiteEncoderStream.prototype.collect = function(cb) { var chunks = []; this.on('error', cb); this.on('data', function(chunk) { chunks.push(chunk); }); this.on('end', function() { cb(null, Buffer.concat(chunks)); }); return this; } // == Decoder stream ======================================================= function IconvLiteDecoderStream(conv, options) { this.conv = conv; options = options || {}; options.encoding = this.encoding = 'utf8'; // We output strings. Transform.call(this, options); } IconvLiteDecoderStream.prototype = Object.create(Transform.prototype, { constructor: { value: IconvLiteDecoderStream } }); IconvLiteDecoderStream.prototype._transform = function(chunk, encoding, done) { if (!Buffer.isBuffer(chunk) && !(chunk instanceof Uint8Array)) return done(new Error("Iconv decoding stream needs buffers as its input.")); try { var res = this.conv.write(chunk); if (res && res.length) this.push(res, this.encoding); done(); } catch (e) { done(e); } } IconvLiteDecoderStream.prototype._flush = function(done) { try { var res = this.conv.end(); if (res && res.length) this.push(res, this.encoding); done(); } catch (e) { done(e); } } IconvLiteDecoderStream.prototype.collect = function(cb) { var res = ''; this.on('error', cb); this.on('data', function(chunk) { res += chunk; }); this.on('end', function() { cb(null, res); }); return this; } return { IconvLiteEncoderStream: IconvLiteEncoderStream, IconvLiteDecoderStream: IconvLiteDecoderStream, }; }; /***/ }), /***/ 645: /***/ (function(__unused_webpack_module, exports) { /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ exports.read = function (buffer, offset, isLE, mLen, nBytes) { var e, m var eLen = (nBytes * 8) - mLen - 1 var eMax = (1 << eLen) - 1 var eBias = eMax >> 1 var nBits = -7 var i = isLE ? (nBytes - 1) : 0 var d = isLE ? -1 : 1 var s = buffer[offset + i] i += d e = s & ((1 << (-nBits)) - 1) s >>= (-nBits) nBits += eLen for (; nBits > 0; e = (e * 256) + buffer[offset + i], i += d, nBits -= 8) {} m = e & ((1 << (-nBits)) - 1) e >>= (-nBits) nBits += mLen for (; nBits > 0; m = (m * 256) + buffer[offset + i], i += d, nBits -= 8) {} if (e === 0) { e = 1 - eBias } else if (e === eMax) { return m ? NaN : ((s ? -1 : 1) * Infinity) } else { m = m + Math.pow(2, mLen) e = e - eBias } return (s ? -1 : 1) * m * Math.pow(2, e - mLen) } exports.write = function (buffer, value, offset, isLE, mLen, nBytes) { var e, m, c var eLen = (nBytes * 8) - mLen - 1 var eMax = (1 << eLen) - 1 var eBias = eMax >> 1 var rt = (mLen === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0) var i = isLE ? 0 : (nBytes - 1) var d = isLE ? 1 : -1 var s = value < 0 || (value === 0 && 1 / value < 0) ? 1 : 0 value = Math.abs(value) if (isNaN(value) || value === Infinity) { m = isNaN(value) ? 1 : 0 e = eMax } else { e = Math.floor(Math.log(value) / Math.LN2) if (value * (c = Math.pow(2, -e)) < 1) { e-- c *= 2 } if (e + eBias >= 1) { value += rt / c } else { value += rt * Math.pow(2, 1 - eBias) } if (value * c >= 2) { e++ c /= 2 } if (e + eBias >= eMax) { m = 0 e = eMax } else if (e + eBias >= 1) { m = ((value * c) - 1) * Math.pow(2, mLen) e = e + eBias } else { m = value * Math.pow(2, eBias - 1) * Math.pow(2, mLen) e = 0 } } for (; mLen >= 8; buffer[offset + i] = m & 0xff, i += d, m /= 256, mLen -= 8) {} e = (e << mLen) | m eLen += mLen for (; eLen > 0; buffer[offset + i] = e & 0xff, i += d, e /= 256, eLen -= 8) {} buffer[offset + i - d] |= s * 128 } /***/ }), /***/ 5717: /***/ (function(module) { if (typeof Object.create === 'function') { // implementation from standard node.js 'util' module module.exports = function inherits(ctor, superCtor) { if (superCtor) { ctor.super_ = superCtor ctor.prototype = Object.create(superCtor.prototype, { constructor: { value: ctor, enumerable: false, writable: true, configurable: true } }) } }; } else { // old school shim for old browsers module.exports = function inherits(ctor, superCtor) { if (superCtor) { ctor.super_ = superCtor var TempCtor = function () {} TempCtor.prototype = superCtor.prototype ctor.prototype = new TempCtor() ctor.prototype.constructor = ctor } } } /***/ }), /***/ 2584: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var hasToStringTag = __webpack_require__(6410)(); var callBound = __webpack_require__(1924); var $toString = callBound('Object.prototype.toString'); var isStandardArguments = function isArguments(value) { if (hasToStringTag && value && typeof value === 'object' && Symbol.toStringTag in value) { return false; } return $toString(value) === '[object Arguments]'; }; var isLegacyArguments = function isArguments(value) { if (isStandardArguments(value)) { return true; } return value !== null && typeof value === 'object' && typeof value.length === 'number' && value.length >= 0 && $toString(value) !== '[object Array]' && $toString(value.callee) === '[object Function]'; }; var supportsStandardArguments = (function () { return isStandardArguments(arguments); }()); isStandardArguments.isLegacyArguments = isLegacyArguments; // for tests module.exports = supportsStandardArguments ? isStandardArguments : isLegacyArguments; /***/ }), /***/ 8923: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var getDay = Date.prototype.getDay; var tryDateObject = function tryDateGetDayCall(value) { try { getDay.call(value); return true; } catch (e) { return false; } }; var toStr = Object.prototype.toString; var dateClass = '[object Date]'; var hasToStringTag = __webpack_require__(6410)(); module.exports = function isDateObject(value) { if (typeof value !== 'object' || value === null) { return false; } return hasToStringTag ? tryDateObject(value) : toStr.call(value) === dateClass; }; /***/ }), /***/ 8662: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var toStr = Object.prototype.toString; var fnToStr = Function.prototype.toString; var isFnRegex = /^\s*(?:function)?\*/; var hasToStringTag = __webpack_require__(6410)(); var getProto = Object.getPrototypeOf; var getGeneratorFunc = function () { // eslint-disable-line consistent-return if (!hasToStringTag) { return false; } try { return Function('return function*() {}')(); } catch (e) { } }; var GeneratorFunction; module.exports = function isGeneratorFunction(fn) { if (typeof fn !== 'function') { return false; } if (isFnRegex.test(fnToStr.call(fn))) { return true; } if (!hasToStringTag) { var str = toStr.call(fn); return str === '[object GeneratorFunction]'; } if (!getProto) { return false; } if (typeof GeneratorFunction === 'undefined') { var generatorFunc = getGeneratorFunc(); GeneratorFunction = generatorFunc ? getProto(generatorFunc) : false; } return getProto(fn) === GeneratorFunction; }; /***/ }), /***/ 8611: /***/ (function(module) { "use strict"; /* http://www.ecma-international.org/ecma-262/6.0/#sec-number.isnan */ module.exports = function isNaN(value) { return value !== value; }; /***/ }), /***/ 360: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var callBind = __webpack_require__(5559); var define = __webpack_require__(4289); var implementation = __webpack_require__(8611); var getPolyfill = __webpack_require__(9415); var shim = __webpack_require__(6743); var polyfill = callBind(getPolyfill(), Number); /* http://www.ecma-international.org/ecma-262/6.0/#sec-number.isnan */ define(polyfill, { getPolyfill: getPolyfill, implementation: implementation, shim: shim }); module.exports = polyfill; /***/ }), /***/ 9415: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var implementation = __webpack_require__(8611); module.exports = function getPolyfill() { if (Number.isNaN && Number.isNaN(NaN) && !Number.isNaN('a')) { return Number.isNaN; } return implementation; }; /***/ }), /***/ 6743: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var define = __webpack_require__(4289); var getPolyfill = __webpack_require__(9415); /* http://www.ecma-international.org/ecma-262/6.0/#sec-number.isnan */ module.exports = function shimNumberIsNaN() { var polyfill = getPolyfill(); define(Number, { isNaN: polyfill }, { isNaN: function testIsNaN() { return Number.isNaN !== polyfill; } }); return polyfill; }; /***/ }), /***/ 8420: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var callBound = __webpack_require__(1924); var hasToStringTag = __webpack_require__(6410)(); var has; var $exec; var isRegexMarker; var badStringifier; if (hasToStringTag) { has = callBound('Object.prototype.hasOwnProperty'); $exec = callBound('RegExp.prototype.exec'); isRegexMarker = {}; var throwRegexMarker = function () { throw isRegexMarker; }; badStringifier = { toString: throwRegexMarker, valueOf: throwRegexMarker }; if (typeof Symbol.toPrimitive === 'symbol') { badStringifier[Symbol.toPrimitive] = throwRegexMarker; } } var $toString = callBound('Object.prototype.toString'); var gOPD = Object.getOwnPropertyDescriptor; var regexClass = '[object RegExp]'; module.exports = hasToStringTag // eslint-disable-next-line consistent-return ? function isRegex(value) { if (!value || typeof value !== 'object') { return false; } var descriptor = gOPD(value, 'lastIndex'); var hasLastIndexDataProperty = descriptor && has(descriptor, 'value'); if (!hasLastIndexDataProperty) { return false; } try { $exec(value, badStringifier); } catch (e) { return e === isRegexMarker; } } : function isRegex(value) { // In older browsers, typeof regex incorrectly returns 'function' if (!value || (typeof value !== 'object' && typeof value !== 'function')) { return false; } return $toString(value) === regexClass; }; /***/ }), /***/ 5692: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var forEach = __webpack_require__(9804); var availableTypedArrays = __webpack_require__(3083); var callBound = __webpack_require__(1924); var $toString = callBound('Object.prototype.toString'); var hasToStringTag = __webpack_require__(6410)(); var g = typeof globalThis === 'undefined' ? __webpack_require__.g : globalThis; var typedArrays = availableTypedArrays(); var $indexOf = callBound('Array.prototype.indexOf', true) || function indexOf(array, value) { for (var i = 0; i < array.length; i += 1) { if (array[i] === value) { return i; } } return -1; }; var $slice = callBound('String.prototype.slice'); var toStrTags = {}; var gOPD = __webpack_require__(882); var getPrototypeOf = Object.getPrototypeOf; // require('getprototypeof'); if (hasToStringTag && gOPD && getPrototypeOf) { forEach(typedArrays, function (typedArray) { var arr = new g[typedArray](); if (Symbol.toStringTag in arr) { var proto = getPrototypeOf(arr); var descriptor = gOPD(proto, Symbol.toStringTag); if (!descriptor) { var superProto = getPrototypeOf(proto); descriptor = gOPD(superProto, Symbol.toStringTag); } toStrTags[typedArray] = descriptor.get; } }); } var tryTypedArrays = function tryAllTypedArrays(value) { var anyTrue = false; forEach(toStrTags, function (getter, typedArray) { if (!anyTrue) { try { anyTrue = getter.call(value) === typedArray; } catch (e) { /**/ } } }); return anyTrue; }; module.exports = function isTypedArray(value) { if (!value || typeof value !== 'object') { return false; } if (!hasToStringTag || !(Symbol.toStringTag in value)) { var tag = $slice($toString(value), 8, -1); return $indexOf(typedArrays, tag) > -1; } if (!gOPD) { return false; } return tryTypedArrays(value); }; /***/ }), /***/ 4244: /***/ (function(module) { "use strict"; var numberIsNaN = function (value) { return value !== value; }; module.exports = function is(a, b) { if (a === 0 && b === 0) { return 1 / a === 1 / b; } if (a === b) { return true; } if (numberIsNaN(a) && numberIsNaN(b)) { return true; } return false; }; /***/ }), /***/ 609: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var define = __webpack_require__(4289); var callBind = __webpack_require__(5559); var implementation = __webpack_require__(4244); var getPolyfill = __webpack_require__(5624); var shim = __webpack_require__(2281); var polyfill = callBind(getPolyfill(), Object); define(polyfill, { getPolyfill: getPolyfill, implementation: implementation, shim: shim }); module.exports = polyfill; /***/ }), /***/ 5624: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var implementation = __webpack_require__(4244); module.exports = function getPolyfill() { return typeof Object.is === 'function' ? Object.is : implementation; }; /***/ }), /***/ 2281: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var getPolyfill = __webpack_require__(5624); var define = __webpack_require__(4289); module.exports = function shimObjectIs() { var polyfill = getPolyfill(); define(Object, { is: polyfill }, { is: function testObjectIs() { return Object.is !== polyfill; } }); return polyfill; }; /***/ }), /***/ 8987: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var keysShim; if (!Object.keys) { // modified from https://github.com/es-shims/es5-shim var has = Object.prototype.hasOwnProperty; var toStr = Object.prototype.toString; var isArgs = __webpack_require__(1414); // eslint-disable-line global-require var isEnumerable = Object.prototype.propertyIsEnumerable; var hasDontEnumBug = !isEnumerable.call({ toString: null }, 'toString'); var hasProtoEnumBug = isEnumerable.call(function () {}, 'prototype'); var dontEnums = [ 'toString', 'toLocaleString', 'valueOf', 'hasOwnProperty', 'isPrototypeOf', 'propertyIsEnumerable', 'constructor' ]; var equalsConstructorPrototype = function (o) { var ctor = o.constructor; return ctor && ctor.prototype === o; }; var excludedKeys = { $applicationCache: true, $console: true, $external: true, $frame: true, $frameElement: true, $frames: true, $innerHeight: true, $innerWidth: true, $onmozfullscreenchange: true, $onmozfullscreenerror: true, $outerHeight: true, $outerWidth: true, $pageXOffset: true, $pageYOffset: true, $parent: true, $scrollLeft: true, $scrollTop: true, $scrollX: true, $scrollY: true, $self: true, $webkitIndexedDB: true, $webkitStorageInfo: true, $window: true }; var hasAutomationEqualityBug = (function () { /* global window */ if (typeof window === 'undefined') { return false; } for (var k in window) { try { if (!excludedKeys['$' + k] && has.call(window, k) && window[k] !== null && typeof window[k] === 'object') { try { equalsConstructorPrototype(window[k]); } catch (e) { return true; } } } catch (e) { return true; } } return false; }()); var equalsConstructorPrototypeIfNotBuggy = function (o) { /* global window */ if (typeof window === 'undefined' || !hasAutomationEqualityBug) { return equalsConstructorPrototype(o); } try { return equalsConstructorPrototype(o); } catch (e) { return false; } }; keysShim = function keys(object) { var isObject = object !== null && typeof object === 'object'; var isFunction = toStr.call(object) === '[object Function]'; var isArguments = isArgs(object); var isString = isObject && toStr.call(object) === '[object String]'; var theKeys = []; if (!isObject && !isFunction && !isArguments) { throw new TypeError('Object.keys called on a non-object'); } var skipProto = hasProtoEnumBug && isFunction; if (isString && object.length > 0 && !has.call(object, 0)) { for (var i = 0; i < object.length; ++i) { theKeys.push(String(i)); } } if (isArguments && object.length > 0) { for (var j = 0; j < object.length; ++j) { theKeys.push(String(j)); } } else { for (var name in object) { if (!(skipProto && name === 'prototype') && has.call(object, name)) { theKeys.push(String(name)); } } } if (hasDontEnumBug) { var skipConstructor = equalsConstructorPrototypeIfNotBuggy(object); for (var k = 0; k < dontEnums.length; ++k) { if (!(skipConstructor && dontEnums[k] === 'constructor') && has.call(object, dontEnums[k])) { theKeys.push(dontEnums[k]); } } } return theKeys; }; } module.exports = keysShim; /***/ }), /***/ 2215: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var slice = Array.prototype.slice; var isArgs = __webpack_require__(1414); var origKeys = Object.keys; var keysShim = origKeys ? function keys(o) { return origKeys(o); } : __webpack_require__(8987); var originalKeys = Object.keys; keysShim.shim = function shimObjectKeys() { if (Object.keys) { var keysWorksWithArguments = (function () { // Safari 5.0 bug var args = Object.keys(arguments); return args && args.length === arguments.length; }(1, 2)); if (!keysWorksWithArguments) { Object.keys = function keys(object) { // eslint-disable-line func-name-matching if (isArgs(object)) { return originalKeys(slice.call(object)); } return originalKeys(object); }; } } else { Object.keys = keysShim; } return Object.keys || keysShim; }; module.exports = keysShim; /***/ }), /***/ 1414: /***/ (function(module) { "use strict"; var toStr = Object.prototype.toString; module.exports = function isArguments(value) { var str = toStr.call(value); var isArgs = str === '[object Arguments]'; if (!isArgs) { isArgs = str !== '[object Array]' && value !== null && typeof value === 'object' && typeof value.length === 'number' && value.length >= 0 && toStr.call(value.callee) === '[object Function]'; } return isArgs; }; /***/ }), /***/ 4155: /***/ (function(module) { // shim for using process in browser var process = module.exports = {}; // cached from whatever global is present so that test runners that stub it // don't break things. But we need to wrap it in a try catch in case it is // wrapped in strict mode code which doesn't define any globals. It's inside a // function because try/catches deoptimize in certain engines. var cachedSetTimeout; var cachedClearTimeout; function defaultSetTimout() { throw new Error('setTimeout has not been defined'); } function defaultClearTimeout () { throw new Error('clearTimeout has not been defined'); } (function () { try { if (typeof setTimeout === 'function') { cachedSetTimeout = setTimeout; } else { cachedSetTimeout = defaultSetTimout; } } catch (e) { cachedSetTimeout = defaultSetTimout; } try { if (typeof clearTimeout === 'function') { cachedClearTimeout = clearTimeout; } else { cachedClearTimeout = defaultClearTimeout; } } catch (e) { cachedClearTimeout = defaultClearTimeout; } } ()) function runTimeout(fun) { if (cachedSetTimeout === setTimeout) { //normal enviroments in sane situations return setTimeout(fun, 0); } // if setTimeout wasn't available but was latter defined if ((cachedSetTimeout === defaultSetTimout || !cachedSetTimeout) && setTimeout) { cachedSetTimeout = setTimeout; return setTimeout(fun, 0); } try { // when when somebody has screwed with setTimeout but no I.E. maddness return cachedSetTimeout(fun, 0); } catch(e){ try { // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally return cachedSetTimeout.call(null, fun, 0); } catch(e){ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error return cachedSetTimeout.call(this, fun, 0); } } } function runClearTimeout(marker) { if (cachedClearTimeout === clearTimeout) { //normal enviroments in sane situations return clearTimeout(marker); } // if clearTimeout wasn't available but was latter defined if ((cachedClearTimeout === defaultClearTimeout || !cachedClearTimeout) && clearTimeout) { cachedClearTimeout = clearTimeout; return clearTimeout(marker); } try { // when when somebody has screwed with setTimeout but no I.E. maddness return cachedClearTimeout(marker); } catch (e){ try { // When we are in I.E. but the script has been evaled so I.E. doesn't trust the global object when called normally return cachedClearTimeout.call(null, marker); } catch (e){ // same as above but when it's a version of I.E. that must have the global object for 'this', hopfully our context correct otherwise it will throw a global error. // Some versions of I.E. have different rules for clearTimeout vs setTimeout return cachedClearTimeout.call(this, marker); } } } var queue = []; var draining = false; var currentQueue; var queueIndex = -1; function cleanUpNextTick() { if (!draining || !currentQueue) { return; } draining = false; if (currentQueue.length) { queue = currentQueue.concat(queue); } else { queueIndex = -1; } if (queue.length) { drainQueue(); } } function drainQueue() { if (draining) { return; } var timeout = runTimeout(cleanUpNextTick); draining = true; var len = queue.length; while(len) { currentQueue = queue; queue = []; while (++queueIndex < len) { if (currentQueue) { currentQueue[queueIndex].run(); } } queueIndex = -1; len = queue.length; } currentQueue = null; draining = false; runClearTimeout(timeout); } process.nextTick = function (fun) { var args = new Array(arguments.length - 1); if (arguments.length > 1) { for (var i = 1; i < arguments.length; i++) { args[i - 1] = arguments[i]; } } queue.push(new Item(fun, args)); if (queue.length === 1 && !draining) { runTimeout(drainQueue); } }; // v8 likes predictible objects function Item(fun, array) { this.fun = fun; this.array = array; } Item.prototype.run = function () { this.fun.apply(null, this.array); }; process.title = 'browser'; process.browser = true; process.env = {}; process.argv = []; process.version = ''; // empty string to avoid regexp issues process.versions = {}; function noop() {} process.on = noop; process.addListener = noop; process.once = noop; process.off = noop; process.removeListener = noop; process.removeAllListeners = noop; process.emit = noop; process.prependListener = noop; process.prependOnceListener = noop; process.listeners = function (name) { return [] } process.binding = function (name) { throw new Error('process.binding is not supported'); }; process.cwd = function () { return '/' }; process.chdir = function (dir) { throw new Error('process.chdir is not supported'); }; process.umask = function() { return 0; }; /***/ }), /***/ 5666: /***/ (function(module) { /** * Copyright (c) 2014-present, Facebook, Inc. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ var runtime = (function (exports) { "use strict"; var Op = Object.prototype; var hasOwn = Op.hasOwnProperty; var undefined; // More compressible than void 0. var $Symbol = typeof Symbol === "function" ? Symbol : {}; var iteratorSymbol = $Symbol.iterator || "@@iterator"; var asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator"; var toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); return obj[key]; } try { // IE 8 has a broken Object.defineProperty that only works on DOM objects. define({}, ""); } catch (err) { define = function(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator. var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator; var generator = Object.create(protoGenerator.prototype); var context = new Context(tryLocsList || []); // The ._invoke method unifies the implementations of the .next, // .throw, and .return methods. generator._invoke = makeInvokeMethod(innerFn, self, context); return generator; } exports.wrap = wrap; // Try/catch helper to minimize deoptimizations. Returns a completion // record like context.tryEntries[i].completion. This interface could // have been (and was previously) designed to take a closure to be // invoked without arguments, but in all the cases we care about we // already have an existing method we want to call, so there's no need // to create a new function object. We can even get away with assuming // the method takes exactly one argument, since that happens to be true // in every case, so we don't have to touch the arguments object. The // only additional allocation required is the completion record, which // has a stable shape and so hopefully should be cheap to allocate. function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } var GenStateSuspendedStart = "suspendedStart"; var GenStateSuspendedYield = "suspendedYield"; var GenStateExecuting = "executing"; var GenStateCompleted = "completed"; // Returning this object from the innerFn has the same effect as // breaking out of the dispatch switch statement. var ContinueSentinel = {}; // Dummy constructor functions that we use as the .constructor and // .constructor.prototype properties for functions that return Generator // objects. For full spec compliance, you may wish to configure your // minifier not to mangle the names of these two functions. function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} // This is a polyfill for %IteratorPrototype% for environments that // don't natively support it. var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf; var NativeIteratorPrototype = getProto && getProto(getProto(values([]))); if (NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) { // This environment has a native %IteratorPrototype%; use it instead // of the polyfill. IteratorPrototype = NativeIteratorPrototype; } var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); GeneratorFunction.prototype = GeneratorFunctionPrototype; define(Gp, "constructor", GeneratorFunctionPrototype); define(GeneratorFunctionPrototype, "constructor", GeneratorFunction); GeneratorFunction.displayName = define( GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction" ); // Helper for defining the .next, .throw, and .return methods of the // Iterator interface in terms of a single ._invoke method. function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function(method) { define(prototype, method, function(arg) { return this._invoke(method, arg); }); }); } exports.isGeneratorFunction = function(genFun) { var ctor = typeof genFun === "function" && genFun.constructor; return ctor ? ctor === GeneratorFunction || // For the native GeneratorFunction constructor, the best we can // do is to check its .name property. (ctor.displayName || ctor.name) === "GeneratorFunction" : false; }; exports.mark = function(genFun) { if (Object.setPrototypeOf) { Object.setPrototypeOf(genFun, GeneratorFunctionPrototype); } else { genFun.__proto__ = GeneratorFunctionPrototype; define(genFun, toStringTagSymbol, "GeneratorFunction"); } genFun.prototype = Object.create(Gp); return genFun; }; // Within the body of any async function, `await x` is transformed to // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test // `hasOwn.call(value, "__await")` to determine if the yielded value is // meant to be awaited. exports.awrap = function(arg) { return { __await: arg }; }; function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if (record.type === "throw") { reject(record.arg); } else { var result = record.arg; var value = result.value; if (value && typeof value === "object" && hasOwn.call(value, "__await")) { return PromiseImpl.resolve(value.__await).then(function(value) { invoke("next", value, resolve, reject); }, function(err) { invoke("throw", err, resolve, reject); }); } return PromiseImpl.resolve(value).then(function(unwrapped) { // When a yielded Promise is resolved, its final value becomes // the .value of the Promise<{value,done}> result for the // current iteration. result.value = unwrapped; resolve(result); }, function(error) { // If a rejected Promise was yielded, throw the rejection back // into the async generator function so it can be handled there. return invoke("throw", error, resolve, reject); }); } } var previousPromise; function enqueue(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function(resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = // If enqueue has been called before, then we want to wait until // all previous Promises have been resolved before calling invoke, // so that results are always delivered in the correct order. If // enqueue has not been called before, then it is important to // call invoke immediately, without waiting on a callback to fire, // so that the async generator function has the opportunity to do // any necessary setup in a predictable way. This predictability // is why the Promise constructor synchronously invokes its // executor callback, and why async functions synchronously // execute code before the first await. Since we implement simple // async functions in terms of async generators, it is especially // important to get this right, even though it requires care. previousPromise ? previousPromise.then( callInvokeWithMethodAndArg, // Avoid propagating failures to Promises returned by later // invocations of the iterator. callInvokeWithMethodAndArg ) : callInvokeWithMethodAndArg(); } // Define the unified helper method that is used to implement .next, // .throw, and .return (see defineIteratorMethods). this._invoke = enqueue; } defineIteratorMethods(AsyncIterator.prototype); define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }); exports.AsyncIterator = AsyncIterator; // Note that simple async functions are implemented on top of // AsyncIterator objects; they just return a Promise for the value of // the final result produced by the iterator. exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) { if (PromiseImpl === void 0) PromiseImpl = Promise; var iter = new AsyncIterator( wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl ); return exports.isGeneratorFunction(outerFn) ? iter // If outerFn is a generator, return the full iterator. : iter.next().then(function(result) { return result.done ? result.value : iter.next(); }); }; function makeInvokeMethod(innerFn, self, context) { var state = GenStateSuspendedStart; return function invoke(method, arg) { if (state === GenStateExecuting) { throw new Error("Generator is already running"); } if (state === GenStateCompleted) { if (method === "throw") { throw arg; } // Be forgiving, per 25.3.3.3.3 of the spec: // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume return doneResult(); } context.method = method; context.arg = arg; while (true) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if (context.method === "next") { // Setting context._sent for legacy support of Babel's // function.sent implementation. context.sent = context._sent = context.arg; } else if (context.method === "throw") { if (state === GenStateSuspendedStart) { state = GenStateCompleted; throw context.arg; } context.dispatchException(context.arg); } else if (context.method === "return") { context.abrupt("return", context.arg); } state = GenStateExecuting; var record = tryCatch(innerFn, self, context); if (record.type === "normal") { // If an exception is thrown from innerFn, we leave state === // GenStateExecuting and loop back for another invocation. state = context.done ? GenStateCompleted : GenStateSuspendedYield; if (record.arg === ContinueSentinel) { continue; } return { value: record.arg, done: context.done }; } else if (record.type === "throw") { state = GenStateCompleted; // Dispatch the exception by looping back around to the // context.dispatchException(context.arg) call above. context.method = "throw"; context.arg = record.arg; } } }; } // Call delegate.iterator[context.method](context.arg) and handle the // result, either by returning a { value, done } result from the // delegate iterator, or by modifying context.method and context.arg, // setting context.delegate to null, and returning the ContinueSentinel. function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (method === undefined) { // A .throw or .return when the delegate iterator has no .throw // method always terminates the yield* loop. context.delegate = null; if (context.method === "throw") { // Note: ["return"] must be used for ES3 parsing compatibility. if (delegate.iterator["return"]) { // If the delegate iterator has a return method, give it a // chance to clean up. context.method = "return"; context.arg = undefined; maybeInvokeDelegate(delegate, context); if (context.method === "throw") { // If maybeInvokeDelegate(context) changed context.method from // "return" to "throw", let that override the TypeError below. return ContinueSentinel; } } context.method = "throw"; context.arg = new TypeError( "The iterator does not provide a 'throw' method"); } return ContinueSentinel; } var record = tryCatch(method, delegate.iterator, context.arg); if (record.type === "throw") { context.method = "throw"; context.arg = record.arg; context.delegate = null; return ContinueSentinel; } var info = record.arg; if (! info) { context.method = "throw"; context.arg = new TypeError("iterator result is not an object"); context.delegate = null; return ContinueSentinel; } if (info.done) { // Assign the result of the finished delegate to the temporary // variable specified by delegate.resultName (see delegateYield). context[delegate.resultName] = info.value; // Resume execution at the desired location (see delegateYield). context.next = delegate.nextLoc; // If context.method was "throw" but the delegate handled the // exception, let the outer generator proceed normally. If // context.method was "next", forget context.arg since it has been // "consumed" by the delegate iterator. If context.method was // "return", allow the original .return call to continue in the // outer generator. if (context.method !== "return") { context.method = "next"; context.arg = undefined; } } else { // Re-yield the result returned by the delegate method. return info; } // The delegate iterator is finished, so forget it and continue with // the outer generator. context.delegate = null; return ContinueSentinel; } // Define Generator.prototype.{next,throw,return} in terms of the // unified ._invoke helper method. defineIteratorMethods(Gp); define(Gp, toStringTagSymbol, "Generator"); // A Generator should always return itself as the iterator object when the // @@iterator function is called on it. Some browsers' implementations of the // iterator prototype chain incorrectly implement this, causing the Generator // object to not be returned from this call. This ensures that doesn't happen. // See https://github.com/facebook/regenerator/issues/274 for more details. define(Gp, iteratorSymbol, function() { return this; }); define(Gp, "toString", function() { return "[object Generator]"; }); function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; if (1 in locs) { entry.catchLoc = locs[1]; } if (2 in locs) { entry.finallyLoc = locs[2]; entry.afterLoc = locs[3]; } this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal"; delete record.arg; entry.completion = record; } function Context(tryLocsList) { // The root entry object (effectively a try statement without a catch // or a finally block) gives us a place to store values thrown from // locations where there is no enclosing try statement. this.tryEntries = [{ tryLoc: "root" }]; tryLocsList.forEach(pushTryEntry, this); this.reset(true); } exports.keys = function(object) { var keys = []; for (var key in object) { keys.push(key); } keys.reverse(); // Rather than returning an object with a next method, we keep // things simple and return the next function itself. return function next() { while (keys.length) { var key = keys.pop(); if (key in object) { next.value = key; next.done = false; return next; } } // To avoid creating an additional object, we just hang the .value // and .done properties off the next function object itself. This // also ensures that the minifier will not anonymize the function. next.done = true; return next; }; }; function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) { return iteratorMethod.call(iterable); } if (typeof iterable.next === "function") { return iterable; } if (!isNaN(iterable.length)) { var i = -1, next = function next() { while (++i < iterable.length) { if (hasOwn.call(iterable, i)) { next.value = iterable[i]; next.done = false; return next; } } next.value = undefined; next.done = true; return next; }; return next.next = next; } } // Return an iterator with no values. return { next: doneResult }; } exports.values = values; function doneResult() { return { value: undefined, done: true }; } Context.prototype = { constructor: Context, reset: function(skipTempReset) { this.prev = 0; this.next = 0; // Resetting context._sent for legacy support of Babel's // function.sent implementation. this.sent = this._sent = undefined; this.done = false; this.delegate = null; this.method = "next"; this.arg = undefined; this.tryEntries.forEach(resetTryEntry); if (!skipTempReset) { for (var name in this) { // Not sure about the optimal order of these conditions: if (name.charAt(0) === "t" && hasOwn.call(this, name) && !isNaN(+name.slice(1))) { this[name] = undefined; } } } }, stop: function() { this.done = true; var rootEntry = this.tryEntries[0]; var rootRecord = rootEntry.completion; if (rootRecord.type === "throw") { throw rootRecord.arg; } return this.rval; }, dispatchException: function(exception) { if (this.done) { throw exception; } var context = this; function handle(loc, caught) { record.type = "throw"; record.arg = exception; context.next = loc; if (caught) { // If the dispatched exception was caught by a catch block, // then let that catch block handle the exception normally. context.method = "next"; context.arg = undefined; } return !! caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; var record = entry.completion; if (entry.tryLoc === "root") { // Exception thrown outside of any try block that could handle // it, so set the completion value of the entire function to // throw the exception. return handle("end"); } if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"); var hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) { return handle(entry.catchLoc, true); } else if (this.prev < entry.finallyLoc) { return handle(entry.finallyLoc); } } else if (hasCatch) { if (this.prev < entry.catchLoc) { return handle(entry.catchLoc, true); } } else if (hasFinally) { if (this.prev < entry.finallyLoc) { return handle(entry.finallyLoc); } } else { throw new Error("try statement without catch or finally"); } } } }, abrupt: function(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } if (finallyEntry && (type === "break" || type === "continue") && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc) { // Ignore the finally entry if control is not jumping to a // location outside the try/catch block. finallyEntry = null; } var record = finallyEntry ? finallyEntry.completion : {}; record.type = type; record.arg = arg; if (finallyEntry) { this.method = "next"; this.next = finallyEntry.finallyLoc; return ContinueSentinel; } return this.complete(record); }, complete: function(record, afterLoc) { if (record.type === "throw") { throw record.arg; } if (record.type === "break" || record.type === "continue") { this.next = record.arg; } else if (record.type === "return") { this.rval = this.arg = record.arg; this.method = "return"; this.next = "end"; } else if (record.type === "normal" && afterLoc) { this.next = afterLoc; } return ContinueSentinel; }, finish: function(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) { this.complete(entry.completion, entry.afterLoc); resetTryEntry(entry); return ContinueSentinel; } } }, "catch": function(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if (record.type === "throw") { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } // The context.catch method must only be called with a location // argument that corresponds to a known catch block. throw new Error("illegal catch attempt"); }, delegateYield: function(iterable, resultName, nextLoc) { this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }; if (this.method === "next") { // Deliberately forget the last sent value so that we don't // accidentally pass it on to the delegate. this.arg = undefined; } return ContinueSentinel; } }; // Regardless of whether this script is executing as a CommonJS module // or not, return the runtime object so that we can declare the variable // regeneratorRuntime in the outer scope, which allows this module to be // injected easily by `bin/regenerator --include-runtime script.js`. return exports; }( // If this script is executing as a CommonJS module, use module.exports // as the regeneratorRuntime namespace. Otherwise create a new empty // object. Either way, the resulting object will be used to initialize // the regeneratorRuntime variable at the top of this file. true ? module.exports : 0 )); try { regeneratorRuntime = runtime; } catch (accidentalStrictMode) { // This module should not be running in strict mode, so the above // assignment should always work unless something is misconfigured. Just // in case runtime.js accidentally runs in strict mode, in modern engines // we can explicitly access globalThis. In older engines we can escape // strict mode using a global Function call. This could conceivably fail // if a Content Security Policy forbids using Function, but in that case // the proper solution is to fix the accidental strict mode problem. If // you've misconfigured your bundler to force strict mode and applied a // CSP to forbid Function, and you're not willing to fix either of those // problems, please detail your unique predicament in a GitHub issue. if (typeof globalThis === "object") { globalThis.regeneratorRuntime = runtime; } else { Function("r", "regeneratorRuntime = r")(runtime); } } /***/ }), /***/ 3697: /***/ (function(module) { "use strict"; var $Object = Object; var $TypeError = TypeError; module.exports = function flags() { if (this != null && this !== $Object(this)) { throw new $TypeError('RegExp.prototype.flags getter called on non-object'); } var result = ''; if (this.global) { result += 'g'; } if (this.ignoreCase) { result += 'i'; } if (this.multiline) { result += 'm'; } if (this.dotAll) { result += 's'; } if (this.unicode) { result += 'u'; } if (this.sticky) { result += 'y'; } return result; }; /***/ }), /***/ 2847: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var define = __webpack_require__(4289); var callBind = __webpack_require__(5559); var implementation = __webpack_require__(3697); var getPolyfill = __webpack_require__(1721); var shim = __webpack_require__(2753); var flagsBound = callBind(implementation); define(flagsBound, { getPolyfill: getPolyfill, implementation: implementation, shim: shim }); module.exports = flagsBound; /***/ }), /***/ 1721: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var implementation = __webpack_require__(3697); var supportsDescriptors = (__webpack_require__(4289).supportsDescriptors); var $gOPD = Object.getOwnPropertyDescriptor; var $TypeError = TypeError; module.exports = function getPolyfill() { if (!supportsDescriptors) { throw new $TypeError('RegExp.prototype.flags requires a true ES5 environment that supports property descriptors'); } if ((/a/mig).flags === 'gim') { var descriptor = $gOPD(RegExp.prototype, 'flags'); if (descriptor && typeof descriptor.get === 'function' && typeof (/a/).dotAll === 'boolean') { return descriptor.get; } } return implementation; }; /***/ }), /***/ 2753: /***/ (function(module, __unused_webpack_exports, __webpack_require__) { "use strict"; var supportsDescriptors = (__webpack_require__(4289).supportsDescriptors); var getPolyfill = __webpack_require__(1721); var gOPD = Object.getOwnPropertyDescriptor; var defineProperty = Object.defineProperty; var TypeErr = TypeError; var getProto = Object.getPrototypeOf; var regex = /a/; module.exports = function shimFlags() { if (!supportsDescriptors || !getProto) { throw new TypeErr('RegExp.prototype.flags requires a true ES5 environment that supports property descriptors'); } var polyfill = getPolyfill(); var proto = getProto(regex); var descriptor = gOPD(proto, 'flags'); if (!descriptor || descriptor.get !== polyfill) { defineProperty(proto, 'flags', { configurable: true, enumerable: false, get: polyfill }); } return polyfill; }; /***/ }), /***/ 6099: /***/ (function(__unused_webpack_module, exports, __webpack_require__) { /* provided dependency */ var Buffer = __webpack_require__(8823)["Buffer"]; ;(function (sax) { // wrapper for non-node envs sax.parser = function (strict, opt) { return new SAXParser(strict, opt) } sax.SAXParser = SAXParser sax.SAXStream = SAXStream sax.createStream = createStream // When we pass the MAX_BUFFER_LENGTH position, start checking for buffer overruns. // When we check, schedule the next check for MAX_BUFFER_LENGTH - (max(buffer lengths)), // since that's the earliest that a buffer overrun could occur. This way, checks are // as rare as required, but as often as necessary to ensure never crossing this bound. // Furthermore, buffers are only tested at most once per write(), so passing a very // large string into write() might have undesirable effects, but this is manageable by // the caller, so it is assumed to be safe. Thus, a call to write() may, in the extreme // edge case, result in creating at most one complete copy of the string passed in. // Set to Infinity to have unlimited buffers. sax.MAX_BUFFER_LENGTH = 64 * 1024 var buffers = [ 'comment', 'sgmlDecl', 'textNode', 'tagName', 'doctype', 'procInstName', 'procInstBody', 'entity', 'attribName', 'attribValue', 'cdata', 'script' ] sax.EVENTS = [ 'text', 'processinginstruction', 'sgmldeclaration', 'doctype', 'comment', 'opentagstart', 'attribute', 'opentag', 'closetag', 'opencdata', 'cdata', 'closecdata', 'error', 'end', 'ready', 'script', 'opennamespace', 'closenamespace' ] function SAXParser (strict, opt) { if (!(this instanceof SAXParser)) { return new SAXParser(strict, opt) } var parser = this clearBuffers(parser) parser.q = parser.c = '' parser.bufferCheckPosition = sax.MAX_BUFFER_LENGTH parser.opt = opt || {} parser.opt.lowercase = parser.opt.lowercase || parser.opt.lowercasetags parser.looseCase = parser.opt.lowercase ? 'toLowerCase' : 'toUpperCase' parser.tags = [] parser.closed = parser.closedRoot = parser.sawRoot = false parser.tag = parser.error = null parser.strict = !!strict parser.noscript = !!(strict || parser.opt.noscript) parser.state = S.BEGIN parser.strictEntities = parser.opt.strictEntities parser.ENTITIES = parser.strictEntities ? Object.create(sax.XML_ENTITIES) : Object.create(sax.ENTITIES) parser.attribList = [] // namespaces form a prototype chain. // it always points at the current tag, // which protos to its parent tag. if (parser.opt.xmlns) { parser.ns = Object.create(rootNS) } // mostly just for error reporting parser.trackPosition = parser.opt.position !== false if (parser.trackPosition) { parser.position = parser.line = parser.column = 0 } emit(parser, 'onready') } if (!Object.create) { Object.create = function (o) { function F () {} F.prototype = o var newf = new F() return newf } } if (!Object.keys) { Object.keys = function (o) { var a = [] for (var i in o) if (o.hasOwnProperty(i)) a.push(i) return a } } function checkBufferLength (parser) { var maxAllowed = Math.max(sax.MAX_BUFFER_LENGTH, 10) var maxActual = 0 for (var i = 0, l = buffers.length; i < l; i++) { var len = parser[buffers[i]].length if (len > maxAllowed) { // Text/cdata nodes can get big, and since they're buffered, // we can get here under normal conditions. // Avoid issues by emitting the text node now, // so at least it won't get any bigger. switch (buffers[i]) { case 'textNode': closeText(parser) break case 'cdata': emitNode(parser, 'oncdata', parser.cdata) parser.cdata = '' break case 'script': emitNode(parser, 'onscript', parser.script) parser.script = '' break default: error(parser, 'Max buffer length exceeded: ' + buffers[i]) } } maxActual = Math.max(maxActual, len) } // schedule the next check for the earliest possible buffer overrun. var m = sax.MAX_BUFFER_LENGTH - maxActual parser.bufferCheckPosition = m + parser.position } function clearBuffers (parser) { for (var i = 0, l = buffers.length; i < l; i++) { parser[buffers[i]] = '' } } function flushBuffers (parser) { closeText(parser) if (parser.cdata !== '') { emitNode(parser, 'oncdata', parser.cdata) parser.cdata = '' } if (parser.script !== '') { emitNode(parser, 'onscript', parser.script) parser.script = '' } } SAXParser.prototype = { end: function () { end(this) }, write: write, resume: function () { this.error = null; return this }, close: function () { return this.write(null) }, flush: function () { flushBuffers(this) } } var Stream try { Stream = (__webpack_require__(2830).Stream) } catch (ex) { Stream = function () {} } var streamWraps = sax.EVENTS.filter(function (ev) { return ev !== 'error' && ev !== 'end' }) function createStream (strict, opt) { return new SAXStream(strict, opt) } function SAXStream (strict, opt) { if (!(this instanceof SAXStream)) { return new SAXStream(strict, opt) } Stream.apply(this) this._parser = new SAXParser(strict, opt) this.writable = true this.readable = true var me = this this._parser.onend = function () { me.emit('end') } this._parser.onerror = function (er) { me.emit('error', er) // if didn't throw, then means error was handled. // go ahead and clear error, so we can write again. me._parser.error = null } this._decoder = null streamWraps.forEach(function (ev) { Object.defineProperty(me, 'on' + ev, { get: function () { return me._parser['on' + ev] }, set: function (h) { if (!h) { me.removeAllListeners(ev) me._parser['on' + ev] = h return h } me.on(ev, h) }, enumerable: true, configurable: false }) }) } SAXStream.prototype = Object.create(Stream.prototype, { constructor: { value: SAXStream } }) SAXStream.prototype.write = function (data) { if (typeof Buffer === 'function' && typeof Buffer.isBuffer === 'function' && Buffer.isBuffer(data)) { if (!this._decoder) { var SD = (__webpack_require__(2553)/* .StringDecoder */ .s) this._decoder = new SD('utf8') } data = this._decoder.write(data) } this._parser.write(data.toString()) this.emit('data', data) return true } SAXStream.prototype.end = function (chunk) { if (chunk && chunk.length) { this.write(chunk) } this._parser.end() return true } SAXStream.prototype.on = function (ev, handler) { var me = this if (!me._parser['on' + ev] && streamWraps.indexOf(ev) !== -1) { me._parser['on' + ev] = function () { var args = arguments.length === 1 ? [arguments[0]] : Array.apply(null, arguments) args.splice(0, 0, ev) me.emit.apply(me, args) } } return Stream.prototype.on.call(me, ev, handler) } // this really needs to be replaced with character classes. // XML allows all manner of ridiculous numbers and digits. var CDATA = '[CDATA[' var DOCTYPE = 'DOCTYPE' var XML_NAMESPACE = 'http://www.w3.org/XML/1998/namespace' var XMLNS_NAMESPACE = 'http://www.w3.org/2000/xmlns/' var rootNS = { xml: XML_NAMESPACE, xmlns: XMLNS_NAMESPACE } // http://www.w3.org/TR/REC-xml/#NT-NameStartChar // This implementation works on strings, a single character at a time // as such, it cannot ever support astral-plane characters (10000-EFFFF) // without a significant breaking change to either this parser, or the // JavaScript language. Implementation of an emoji-capable xml parser // is left as an exercise for the reader. var nameStart = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/ var nameBody = /[:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/ var entityStart = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD]/ var entityBody = /[#:_A-Za-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\u00B7\u0300-\u036F\u203F-\u2040.\d-]/ function isWhitespace (c) { return c === ' ' || c === '\n' || c === '\r' || c === '\t' } function isQuote (c) { return c === '"' || c === '\'' } function isAttribEnd (c) { return c === '>' || isWhitespace(c) } function isMatch (regex, c) { return regex.test(c) } function notMatch (regex, c) { return !isMatch(regex, c) } var S = 0 sax.STATE = { BEGIN: S++, // leading byte order mark or whitespace BEGIN_WHITESPACE: S++, // leading whitespace TEXT: S++, // general stuff TEXT_ENTITY: S++, // & and such. OPEN_WAKA: S++, // < SGML_DECL: S++, // SCRIPT: S++, //