(self["webpackChunk_N_E"] = self["webpackChunk_N_E"] || []).push([ [760], { /***/ 7228: /***/ function (module) { 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; } (module.exports = _arrayLikeToArray), (module.exports.__esModule = true), (module.exports["default"] = module.exports); /***/ }, /***/ 8926: /***/ function (module) { function asyncGeneratorStep( gen, resolve, reject, _next, _throw, key, arg ) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep( gen, resolve, reject, _next, _throw, "next", value ); } function _throw(err) { asyncGeneratorStep( gen, resolve, reject, _next, _throw, "throw", err ); } _next(undefined); }); }; } (module.exports = _asyncToGenerator), (module.exports.__esModule = true), (module.exports["default"] = module.exports); /***/ }, /***/ 3913: /***/ function (module) { 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); Object.defineProperty(Constructor, "prototype", { writable: false, }); return Constructor; } (module.exports = _createClass), (module.exports.__esModule = true), (module.exports["default"] = module.exports); /***/ }, /***/ 314: /***/ function ( module, __unused_webpack_exports, __webpack_require__ ) { var unsupportedIterableToArray = __webpack_require__(379); 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." ); } (module.exports = _createForOfIteratorHelperLoose), (module.exports.__esModule = true), (module.exports["default"] = module.exports); /***/ }, /***/ 7154: /***/ function (module) { function _extends() { (module.exports = _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if ( Object.prototype.hasOwnProperty.call( source, key ) ) { target[key] = source[key]; } } } return target; }), (module.exports.__esModule = true), (module.exports["default"] = module.exports); return _extends.apply(this, arguments); } (module.exports = _extends), (module.exports.__esModule = true), (module.exports["default"] = module.exports); /***/ }, /***/ 5318: /***/ function (module) { function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj, }; } (module.exports = _interopRequireDefault), (module.exports.__esModule = true), (module.exports["default"] = module.exports); /***/ }, /***/ 7316: /***/ function (module) { function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } (module.exports = _objectWithoutPropertiesLoose), (module.exports.__esModule = true), (module.exports["default"] = module.exports); /***/ }, /***/ 9591: /***/ function ( module, __unused_webpack_exports, __webpack_require__ ) { var _typeof = __webpack_require__(8)["default"]; function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ (module.exports = _regeneratorRuntime = function _regeneratorRuntime() { return exports; }), (module.exports.__esModule = true), (module.exports["default"] = module.exports); var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return ( Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0, }), obj[key] ); } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return (obj[key] = value); }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return ( (generator._invoke = (function ( innerFn, self, context ) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error( "Generator is already running" ); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for ( context.method = method, context.arg = arg; ; ) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate( delegate, context ); if (delegateResult) { if ( delegateResult === ContinueSentinel ) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg; else if ("throw" === context.method) { if ("suspendedStart" === state) throw ( ((state = "completed"), context.arg) ); context.dispatchException(context.arg); } else "return" === context.method && context.abrupt( "return", context.arg ); state = "executing"; var record = tryCatch( innerFn, self, context ); if ("normal" === record.type) { if ( ((state = context.done ? "completed" : "suspendedYield"), record.arg === ContinueSentinel) ) continue; return { value: record.arg, done: context.done, }; } "throw" === record.type && ((state = "completed"), (context.method = "throw"), (context.arg = record.arg)); } }; })(innerFn, self, context)), generator ); } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg), }; } catch (err) { return { type: "throw", arg: err, }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = (GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype)); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch( generator[method], generator, arg ); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then( function (value) { invoke( "next", value, resolve, reject ); }, function (err) { invoke("throw", err, resolve, reject); } ) : PromiseImpl.resolve(value).then( function (unwrapped) { (result.value = unwrapped), resolve(result); }, function (error) { return invoke( "throw", error, resolve, reject ); } ); } reject(record.arg); } var previousPromise; this._invoke = function (method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return (previousPromise = previousPromise ? previousPromise.then( callInvokeWithMethodAndArg, callInvokeWithMethodAndArg ) : callInvokeWithMethodAndArg()); }; } function maybeInvokeDelegate(delegate, context) { var method = delegate.iterator[context.method]; if (undefined === method) { if ( ((context.delegate = null), "throw" === context.method) ) { if ( delegate.iterator["return"] && ((context.method = "return"), (context.arg = undefined), maybeInvokeDelegate(delegate, context), "throw" === context.method) ) 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 ("throw" === record.type) return ( (context.method = "throw"), (context.arg = record.arg), (context.delegate = null), ContinueSentinel ); var info = record.arg; return info ? info.done ? ((context[delegate.resultName] = info.value), (context.next = delegate.nextLoc), "return" !== context.method && ((context.method = "next"), (context.arg = undefined)), (context.delegate = null), ContinueSentinel) : info : ((context.method = "throw"), (context.arg = new TypeError( "iterator result is not an object" )), (context.delegate = null), ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0], }; 1 in locs && (entry.catchLoc = locs[1]), 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) { (this.tryEntries = [ { tryLoc: "root", }, ]), tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length; ) { if (hasOwn.call(iterable, i)) return ( (next.value = iterable[i]), (next.done = !1), next ); } return ( (next.value = undefined), (next.done = !0), next ); }; return (next.next = next); } } return { next: doneResult, }; } function doneResult() { return { value: undefined, done: !0, }; } return ( (GeneratorFunction.prototype = GeneratorFunctionPrototype), define(Gp, "constructor", GeneratorFunctionPrototype), define( GeneratorFunctionPrototype, "constructor", GeneratorFunction ), (GeneratorFunction.displayName = define( GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction" )), (exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return ( !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)) ); }), (exports.mark = function (genFun) { return ( Object.setPrototypeOf ? Object.setPrototypeOf( genFun, GeneratorFunctionPrototype ) : ((genFun.__proto__ = GeneratorFunctionPrototype), define( genFun, toStringTagSymbol, "GeneratorFunction" )), (genFun.prototype = Object.create(Gp)), genFun ); }), (exports.awrap = function (arg) { return { __await: arg, }; }), defineIteratorMethods(AsyncIterator.prototype), define( AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; } ), (exports.AsyncIterator = AsyncIterator), (exports.async = function ( innerFn, outerFn, self, tryLocsList, PromiseImpl ) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator( wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl ); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }), defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), (exports.keys = function (object) { var keys = []; for (var key in object) { keys.push(key); } return ( keys.reverse(), function next() { for (; keys.length; ) { var key = keys.pop(); if (key in object) return ( (next.value = key), (next.done = !1), next ); } return (next.done = !0), next; } ); }), (exports.values = values), (Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if ( ((this.prev = 0), (this.next = 0), (this.sent = this._sent = undefined), (this.done = !1), (this.delegate = null), (this.method = "next"), (this.arg = undefined), this.tryEntries.forEach(resetTryEntry), !skipTempReset) ) for (var name in this) { "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); } }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException( exception ) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return ( (record.type = "throw"), (record.arg = exception), (context.next = loc), caught && ((context.method = "next"), (context.arg = undefined)), !!caught ); } for ( var i = this.tryEntries.length - 1; i >= 0; --i ) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call( entry, "catchLoc" ), hasFinally = hasOwn.call( entry, "finallyLoc" ); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error( "try statement without catch or finally" ); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(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; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return ( (record.type = type), (record.arg = arg), finallyEntry ? ((this.method = "next"), (this.next = finallyEntry.finallyLoc), ContinueSentinel) : this.complete(record) ); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return ( "break" === record.type || "continue" === record.type ? (this.next = record.arg) : "return" === record.type ? ((this.rval = this.arg = record.arg), (this.method = "return"), (this.next = "end")) : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel ); }, finish: function finish(finallyLoc) { for ( var i = this.tryEntries.length - 1; i >= 0; --i ) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return ( this.complete( entry.completion, entry.afterLoc ), resetTryEntry(entry), ContinueSentinel ); } }, catch: function _catch(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 ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield( iterable, resultName, nextLoc ) { return ( (this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc, }), "next" === this.method && (this.arg = undefined), ContinueSentinel ); }, }), exports ); } (module.exports = _regeneratorRuntime), (module.exports.__esModule = true), (module.exports["default"] = module.exports); /***/ }, /***/ 8: /***/ function (module) { function _typeof(obj) { "@babel/helpers - typeof"; return ( ((module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }), (module.exports.__esModule = true), (module.exports["default"] = module.exports)), _typeof(obj) ); } (module.exports = _typeof), (module.exports.__esModule = true), (module.exports["default"] = module.exports); /***/ }, /***/ 379: /***/ function ( module, __unused_webpack_exports, __webpack_require__ ) { var arrayLikeToArray = __webpack_require__(7228); 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); } (module.exports = _unsupportedIterableToArray), (module.exports.__esModule = true), (module.exports["default"] = module.exports); /***/ }, /***/ 7757: /***/ function ( module, __unused_webpack_exports, __webpack_require__ ) { // TODO(Babel 8): Remove this file. var runtime = __webpack_require__(9591)(); module.exports = runtime; // Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736= try { regeneratorRuntime = runtime; } catch (accidentalStrictMode) { if (typeof globalThis === "object") { globalThis.regeneratorRuntime = runtime; } else { Function("r", "regeneratorRuntime = r")(runtime); } } /***/ }, /***/ 9332: /***/ function (__unused_webpack_module, exports) { "use strict"; exports.__esModule = true; exports["default"] = void 0; /** * Applies a function to the value at the given index of an array * @param {number} index * @param {function} fn * @param {array} collection * @returns copy of the array with the element at the given index replaced with the result of the function application. */ var adjust = function adjust(index, fn, collection) { var _Object$assign; if (index >= 0 && index >= collection.length) return collection; if (index < 0 && Math.abs(index) > collection.length) return collection; var i = index < 0 ? collection.length + index : index; return Object.assign( [], collection, ((_Object$assign = {}), (_Object$assign[i] = fn(collection[i])), _Object$assign) ); }; var _default = adjust; exports["default"] = _default; /***/ }, /***/ 2354: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { "use strict"; var _interopRequireDefault = __webpack_require__(5318)["default"]; exports.__esModule = true; exports["default"] = void 0; var _regenerator = _interopRequireDefault( __webpack_require__(7757) ); var _asyncToGenerator2 = _interopRequireDefault( __webpack_require__(8926) ); var _reverse = _interopRequireDefault(__webpack_require__(4615)); /* eslint-disable no-await-in-loop */ /** * Performs right-to-left function composition with async functions support * * @param {...any} functions */ var asyncCompose = function asyncCompose() { for ( var _len = arguments.length, fns = new Array(_len), _key = 0; _key < _len; _key++ ) { fns[_key] = arguments[_key]; } return /*#__PURE__*/ (function () { var _ref = (0, _asyncToGenerator2.default)( /*#__PURE__*/ _regenerator.default.mark( function _callee(value) { var result, reversedFns, _len2, args, _key2, i, fn, _args = arguments; return _regenerator.default.wrap( function _callee$(_context) { while (1) { switch ( (_context.prev = _context.next) ) { case 0: result = value; reversedFns = (0, _reverse.default)(fns); for ( _len2 = _args.length, args = new Array( _len2 > 1 ? _len2 - 1 : 0 ), _key2 = 1; _key2 < _len2; _key2++ ) { args[_key2 - 1] = _args[_key2]; } i = 0; case 4: if ( !( i < reversedFns.length ) ) { _context.next = 12; break; } fn = reversedFns[i]; _context.next = 8; return fn.apply( void 0, [result].concat(args) ); case 8: result = _context.sent; case 9: i += 1; _context.next = 4; break; case 12: return _context.abrupt( "return", result ); case 13: case "end": return _context.stop(); } } }, _callee ); } ) ); return function (_x) { return _ref.apply(this, arguments); }; })(); }; var _default = asyncCompose; exports["default"] = _default; /***/ }, /***/ 4522: /***/ function (__unused_webpack_module, exports) { "use strict"; exports.__esModule = true; exports["default"] = void 0; /** * Capitalize first letter of each word * * @param {String} string * @returns {String} capitalized string */ var capitalize = function capitalize(value) { if (!value) return value; return value.replace(/(^|\s)\S/g, function (l) { return l.toUpperCase(); }); }; var _default = capitalize; exports["default"] = _default; /***/ }, /***/ 10: /***/ function (__unused_webpack_module, exports) { "use strict"; exports.__esModule = true; exports["default"] = void 0; /** * Casts value to array * * @param {any} value * @returns {Array} casted value */ var castArray = function castArray(value) { return Array.isArray(value) ? value : [value]; }; var _default = castArray; exports["default"] = _default; /***/ }, /***/ 3624: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { "use strict"; var _interopRequireDefault = __webpack_require__(5318)["default"]; exports.__esModule = true; exports["default"] = void 0; var _reverse = _interopRequireDefault(__webpack_require__(4615)); /* eslint-disable no-await-in-loop */ /** * Performs right-to-left function composition * * @param {...any} functions */ var compose = function compose() { for ( var _len = arguments.length, fns = new Array(_len), _key = 0; _key < _len; _key++ ) { fns[_key] = arguments[_key]; } return function (value) { var result = value; var reversedFns = (0, _reverse.default)(fns); for ( var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++ ) { args[_key2 - 1] = arguments[_key2]; } for (var i = 0; i < reversedFns.length; i += 1) { var fn = reversedFns[i]; result = fn.apply(void 0, [result].concat(args)); } return result; }; }; var _default = compose; exports["default"] = _default; /***/ }, /***/ 5558: /***/ function (__unused_webpack_module, exports) { "use strict"; exports.__esModule = true; exports["default"] = void 0; var dropLast = function dropLast(array) { return array.slice(0, array.length - 1); }; var _default = dropLast; exports["default"] = _default; /***/ }, /***/ 7493: /***/ function (__unused_webpack_module, exports) { "use strict"; exports.__esModule = true; exports["default"] = void 0; var evolve = function evolve(transformations, object) { var result = object instanceof Array ? [] : {}; var keys = Object.keys(object); for (var i = 0; i < keys.length; i += 1) { var key = keys[i]; var transformation = transformations[key]; var type = typeof transformation; if (type === "function") { result[key] = transformation(object[key]); } else if (transformation && type === "object") { result[key] = evolve(transformation, object[key]); } else result[key] = object[key]; } return result; }; var _default = evolve; exports["default"] = _default; /***/ }, /***/ 6127: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { "use strict"; var _interopRequireDefault = __webpack_require__(5318)["default"]; exports.__esModule = true; exports["default"] = void 0; var _isNil = _interopRequireDefault(__webpack_require__(9248)); var _castArray = _interopRequireDefault(__webpack_require__(10)); var get = function get(target, path, defaultValue) { if ((0, _isNil.default)(target)) return defaultValue; var _path = (0, _castArray.default)(path); var result = target; for (var i = 0; i < _path.length; i += 1) { if ((0, _isNil.default)(result)) return undefined; result = result[_path[i]]; } return (0, _isNil.default)(result) ? defaultValue : result; }; var _default = get; exports["default"] = _default; /***/ }, /***/ 4354: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { "use strict"; var _interopRequireDefault = __webpack_require__(5318)["default"]; exports.__esModule = true; exports.upperFirst = exports.reverse = exports.pick = exports.omit = exports.matchPercent = exports.mapValues = exports.last = exports.isNil = exports.get = exports.evolve = exports.dropLast = exports.compose = exports.castArray = exports.capitalize = exports.asyncCompose = exports.adjust = void 0; var _adjust = _interopRequireDefault(__webpack_require__(9332)); exports.adjust = _adjust.default; var _asyncCompose = _interopRequireDefault( __webpack_require__(2354) ); exports.asyncCompose = _asyncCompose.default; var _capitalize = _interopRequireDefault(__webpack_require__(4522)); exports.capitalize = _capitalize.default; var _castArray = _interopRequireDefault(__webpack_require__(10)); exports.castArray = _castArray.default; var _compose = _interopRequireDefault(__webpack_require__(3624)); exports.compose = _compose.default; var _dropLast = _interopRequireDefault(__webpack_require__(5558)); exports.dropLast = _dropLast.default; var _evolve = _interopRequireDefault(__webpack_require__(7493)); exports.evolve = _evolve.default; var _get = _interopRequireDefault(__webpack_require__(6127)); exports.get = _get.default; var _isNil = _interopRequireDefault(__webpack_require__(9248)); exports.isNil = _isNil.default; var _last = _interopRequireDefault(__webpack_require__(1866)); exports.last = _last.default; var _mapValues = _interopRequireDefault(__webpack_require__(8838)); exports.mapValues = _mapValues.default; var _matchPercent = _interopRequireDefault( __webpack_require__(7213) ); exports.matchPercent = _matchPercent.default; var _omit = _interopRequireDefault(__webpack_require__(2036)); exports.omit = _omit.default; var _pick = _interopRequireDefault(__webpack_require__(9346)); exports.pick = _pick.default; var _reverse = _interopRequireDefault(__webpack_require__(4615)); exports.reverse = _reverse.default; var _upperFirst = _interopRequireDefault(__webpack_require__(9424)); exports.upperFirst = _upperFirst.default; /***/ }, /***/ 9248: /***/ function (__unused_webpack_module, exports) { "use strict"; exports.__esModule = true; exports["default"] = void 0; var isNil = function isNil(value) { return value === null || value === undefined; }; var _default = isNil; exports["default"] = _default; /***/ }, /***/ 1866: /***/ function (__unused_webpack_module, exports) { "use strict"; exports.__esModule = true; exports["default"] = void 0; var last = function last(value) { return value === "" ? "" : value[value.length - 1]; }; var _default = last; exports["default"] = _default; /***/ }, /***/ 8838: /***/ function (__unused_webpack_module, exports) { "use strict"; exports.__esModule = true; exports["default"] = void 0; var mapValues = function mapValues(object, fn) { var entries = Object.entries(object); return entries.reduce(function (acc, _ref, index) { var key = _ref[0], value = _ref[1]; acc[key] = fn(value, key, index); return acc; }, {}); }; var _default = mapValues; exports["default"] = _default; /***/ }, /***/ 7213: /***/ function (__unused_webpack_module, exports) { "use strict"; exports.__esModule = true; exports["default"] = void 0; var isPercent = function isPercent(value) { return /((-)?\d+\.?\d*)%/g.exec(value); }; /** * Get percentage value of input * * @param {String} value * @returns {Object} percent value (if matches) */ var matchPercent = function matchPercent(value) { var match = isPercent(value); if (match) { var f = parseFloat(match[1], 10); var percent = f / 100; return { percent: percent, value: f, }; } return null; }; var _default = matchPercent; exports["default"] = _default; /***/ }, /***/ 2036: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { "use strict"; var _interopRequireDefault = __webpack_require__(5318)["default"]; exports.__esModule = true; exports["default"] = void 0; var _castArray = _interopRequireDefault(__webpack_require__(10)); var omit = function omit(keys, object) { var _keys = (0, _castArray.default)(keys); var copy = Object.assign({}, object); _keys.forEach(function (key) { delete copy[key]; }); return copy; }; var _default = omit; exports["default"] = _default; /***/ }, /***/ 9346: /***/ function (__unused_webpack_module, exports) { "use strict"; exports.__esModule = true; exports["default"] = void 0; var pick = function pick(keys, obj) { var result = {}; for (var i = 0; i < keys.length; i += 1) { var key = keys[i]; if (key in obj) result[key] = obj[key]; } return result; }; var _default = pick; exports["default"] = _default; /***/ }, /***/ 4615: /***/ function (__unused_webpack_module, exports) { "use strict"; exports.__esModule = true; exports["default"] = void 0; var reverse = function reverse(list) { return Array.prototype.slice.call(list, 0).reverse(); }; var _default = reverse; exports["default"] = _default; /***/ }, /***/ 9424: /***/ function (__unused_webpack_module, exports) { "use strict"; exports.__esModule = true; exports["default"] = void 0; /** * Capitalize first letter of string * * @param {String} string * @returns {String} capitalized string */ var upperFirst = function upperFirst(value) { if (!value) return value; return value.charAt(0).toUpperCase() + value.slice(1); }; var _default = upperFirst; exports["default"] = _default; /***/ }, /***/ 1384: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { "use strict"; var __webpack_unused_export__; /* provided dependency */ var Buffer = __webpack_require__(1876)["Buffer"]; __webpack_unused_export__ = { value: true }; var _asyncToGenerator = __webpack_require__(8926); var _extends = __webpack_require__(7154); var _regeneratorRuntime = __webpack_require__(7757); var _objectWithoutPropertiesLoose = __webpack_require__(7316); __webpack_require__(8079); var fetch = __webpack_require__(4098); var fontkit = __webpack_require__(6855); function _interopDefaultLegacy(e) { return e && typeof e === "object" && "default" in e ? e : { default: e }; } var _asyncToGenerator__default = /*#__PURE__*/ _interopDefaultLegacy(_asyncToGenerator); var _extends__default = /*#__PURE__*/ _interopDefaultLegacy(_extends); var _regeneratorRuntime__default = /*#__PURE__*/ _interopDefaultLegacy(_regeneratorRuntime); var _objectWithoutPropertiesLoose__default = /*#__PURE__*/ _interopDefaultLegacy( _objectWithoutPropertiesLoose ); var fetch__default = /*#__PURE__*/ _interopDefaultLegacy(fetch); var fontkit__default = /*#__PURE__*/ _interopDefaultLegacy(fontkit); var _excluded = ["src", "fontWeight", "fontStyle"]; var FONT_WEIGHTS = { thin: 100, hairline: 100, ultralight: 200, extralight: 200, light: 300, normal: 400, medium: 500, semibold: 600, demibold: 600, bold: 700, ultrabold: 800, extrabold: 800, heavy: 900, black: 900, }; var fetchFont = /*#__PURE__*/ (function () { var _ref = _asyncToGenerator__default["default"]( /*#__PURE__*/ _regeneratorRuntime__default["default"].mark( function _callee(src, options) { var response, buffer; return _regeneratorRuntime__default["default"].wrap( function _callee$(_context) { while (1) { switch ( (_context.prev = _context.next) ) { case 0: _context.next = 2; return fetch__default[ "default" ](src, options); case 2: response = _context.sent; _context.next = 5; return response.buffer ? response.buffer() : response.arrayBuffer(); case 5: buffer = _context.sent; return _context.abrupt( "return", buffer.constructor.name === "Buffer" ? buffer : Buffer.from(buffer) ); case 7: case "end": return _context.stop(); } } }, _callee ); } ) ); return function fetchFont(_x, _x2) { return _ref.apply(this, arguments); }; })(); var isDataUrl = function isDataUrl(dataUrl) { var header = dataUrl.split(",")[0]; var hasDataPrefix = header.substring(0, 5) === "data:"; var hasBase64Prefix = header.split(";")[1] === "base64"; return hasDataPrefix && hasBase64Prefix; }; var resolveFontWeight = function resolveFontWeight(value) { return typeof value === "string" ? FONT_WEIGHTS[value] : value; }; var sortByFontWeight = function sortByFontWeight(a, b) { return a.fontWeight - b.fontWeight; }; var FontSource = /*#__PURE__*/ (function () { function FontSource( src, fontFamily, fontStyle, fontWeight, options ) { this.src = src; this.fontFamily = fontFamily; this.fontStyle = fontStyle || "normal"; this.fontWeight = fontWeight || 400; this.data = null; this.loading = false; this.options = options; } var _proto = FontSource.prototype; _proto.load = /*#__PURE__*/ (function () { var _load = _asyncToGenerator__default["default"]( /*#__PURE__*/ _regeneratorRuntime__default[ "default" ].mark(function _callee2() { var _this = this; var postscriptName, _this$options, headers, body, _this$options$method, method, data; return _regeneratorRuntime__default["default"].wrap( function _callee2$(_context2) { while (1) { switch ( (_context2.prev = _context2.next) ) { case 0: this.loading = true; postscriptName = this.options.postscriptName; if (!isDataUrl(this.src)) { _context2.next = 6; break; } this.data = fontkit__default[ "default" ].create( Buffer.from( this.src.split(",")[1], "base64" ), postscriptName ); _context2.next = 17; break; case 6: (_this$options = this.options), (headers = _this$options.headers), (body = _this$options.body), (_this$options$method = _this$options.method), (method = _this$options$method === void 0 ? "GET" : _this$options$method); _context2.next = 10; return fetchFont(this.src, { method: method, body: body, headers: headers, }); case 10: data = _context2.sent; this.data = fontkit__default[ "default" ].create(data, postscriptName); _context2.next = 17; break; case 14: _context2.next = 16; return new Promise(function ( resolve, reject ) { return fontkit__default[ "default" ].open( _this.src, postscriptName, function (err, data) { return err ? reject(err) : resolve(data); } ); }); case 16: this.data = _context2.sent; case 17: this.loading = false; case 18: case "end": return _context2.stop(); } } }, _callee2, this ); }) ); function load() { return _load.apply(this, arguments); } return load; })(); return FontSource; })(); var Font = /*#__PURE__*/ (function () { Font.create = function create(family) { return new Font(family); }; function Font(family) { this.family = family; this.sources = []; } var _proto2 = Font.prototype; _proto2.register = function register(_ref2) { var src = _ref2.src, fontWeight = _ref2.fontWeight, fontStyle = _ref2.fontStyle, options = _objectWithoutPropertiesLoose__default[ "default" ](_ref2, _excluded); var numericFontWeight = resolveFontWeight(fontWeight); this.sources.push( new FontSource( src, this.family, fontStyle, numericFontWeight, options ) ); }; _proto2.resolve = function resolve(descriptor) { var _descriptor$fontWeigh = descriptor.fontWeight, fontWeight = _descriptor$fontWeigh === void 0 ? 400 : _descriptor$fontWeigh, _descriptor$fontStyle = descriptor.fontStyle, fontStyle = _descriptor$fontStyle === void 0 ? "normal" : _descriptor$fontStyle; var styleSources = this.sources.filter(function (s) { return s.fontStyle === fontStyle; }); // Weight resolution. https://developer.mozilla.org/en-US/docs/Web/CSS/font-weight#Fallback_weights var exactFit = styleSources.find(function (s) { return s.fontWeight === fontWeight; }); if (exactFit) return exactFit; var res; if (fontWeight >= 400 && fontWeight <= 500) { var leftOffset = styleSources.filter(function (s) { return s.fontWeight <= fontWeight; }); var rightOffset = styleSources.filter(function (s) { return s.fontWeight > 500; }); var fit = styleSources.filter(function (s) { return ( s.fontWeight >= fontWeight && s.fontWeight < 500 ); }); res = fit[0] || leftOffset[leftOffset.length - 1] || rightOffset[0]; } var lt = styleSources .filter(function (s) { return s.fontWeight < fontWeight; }) .sort(sortByFontWeight); var gt = styleSources .filter(function (s) { return s.fontWeight > fontWeight; }) .sort(sortByFontWeight); if (fontWeight < 400) { res = lt[lt.length - 1] || gt[0]; } if (fontWeight > 500) { res = gt[0] || lt[lt.length - 1]; } if (!res) { throw new Error( "Could not resolve font for " + this.family + ", fontWeight " + fontWeight ); } return res; }; return Font; })(); var standard = [ "Courier", "Courier-Bold", "Courier-Oblique", "Courier-BoldOblique", "Helvetica", "Helvetica-Bold", "Helvetica-Oblique", "Helvetica-BoldOblique", "Times-Roman", "Times-Bold", "Times-Italic", "Times-BoldItalic", ]; function FontStore() { var _this = this; var fonts = {}; var emojiSource = null; var hyphenationCallback = null; this.register = function (data) { var family = data.family; if (!fonts[family]) { fonts[family] = Font.create(family); } // Bulk loading if (data.fonts) { for (var i = 0; i < data.fonts.length; i += 1) { fonts[family].register( _extends__default["default"]( { family: family, }, data.fonts[i] ) ); } } else { fonts[family].register(data); } }; this.registerEmojiSource = function (_ref) { var url = _ref.url, _ref$format = _ref.format, format = _ref$format === void 0 ? "png" : _ref$format; emojiSource = { url: url, format: format, }; }; this.registerHyphenationCallback = function (callback) { hyphenationCallback = callback; }; this.getFont = function (descriptor) { var fontFamily = descriptor.fontFamily; var isStandard = standard.includes(fontFamily); if (isStandard) return null; if (!fonts[fontFamily]) { throw new Error( "Font family not registered: " + fontFamily + ". Please register it calling Font.register() method." ); } return fonts[fontFamily].resolve(descriptor); }; this.load = /*#__PURE__*/ (function () { var _ref2 = _asyncToGenerator__default["default"]( /*#__PURE__*/ _regeneratorRuntime__default[ "default" ].mark(function _callee(descriptor) { var fontFamily, isStandard, f; return _regeneratorRuntime__default["default"].wrap( function _callee$(_context) { while (1) { switch ( (_context.prev = _context.next) ) { case 0: fontFamily = descriptor.fontFamily; isStandard = standard.includes( fontFamily ); if (!isStandard) { _context.next = 4; break; } return _context.abrupt( "return" ); case 4: f = _this.getFont(descriptor); // We cache the font to avoid fetching it many times if (!(!f.data && !f.loading)) { _context.next = 8; break; } _context.next = 8; return f.load(); case 8: case "end": return _context.stop(); } } }, _callee ); }) ); return function (_x) { return _ref2.apply(this, arguments); }; })(); this.reset = function () { var keys = Object.keys(fonts); for (var i = 0; i < keys.length; i += 1) { var key = keys[i]; fonts[key].data = null; } }; this.clear = function () { fonts = {}; }; this.getRegisteredFonts = function () { return fonts; }; this.getEmojiSource = function () { return emojiSource; }; this.getHyphenationCallback = function () { return hyphenationCallback; }; this.getRegisteredFontFamilies = function () { return Object.keys(fonts); }; } exports.Z = FontStore; //# sourceMappingURL=index.browser.js.map /***/ }, /***/ 7515: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { "use strict"; /* provided dependency */ var Buffer = __webpack_require__(1876)["Buffer"]; Object.defineProperty(exports, "__esModule", { value: true }); var _asyncToGenerator = __webpack_require__(8926); var _regeneratorRuntime = __webpack_require__(7757); var fetch = __webpack_require__(4098); var PNG = __webpack_require__(1852); function _interopDefaultLegacy(e) { return e && typeof e === "object" && "default" in e ? e : { default: e }; } var _asyncToGenerator__default = /*#__PURE__*/ _interopDefaultLegacy(_asyncToGenerator); var _regeneratorRuntime__default = /*#__PURE__*/ _interopDefaultLegacy(_regeneratorRuntime); var fetch__default = /*#__PURE__*/ _interopDefaultLegacy(fetch); var PNG__default = /*#__PURE__*/ _interopDefaultLegacy(PNG); PNG__default["default"].isValid = function (data) { try { return !!new PNG__default["default"](data); } catch (e) { return false; } }; // Extracted from https://github.com/devongovett/pdfkit/blob/master/lib/image/jpeg.coffee var MARKERS = [ 0xffc0, 0xffc1, 0xffc2, 0xffc3, 0xffc5, 0xffc6, 0xffc7, 0xffc8, 0xffc9, 0xffca, 0xffcb, 0xffcc, 0xffcd, 0xffce, 0xffcf, ]; var JPEG = function JPEG(data) { this.data = null; this.width = null; this.height = null; this.data = data; if (data.readUInt16BE(0) !== 0xffd8) { throw new Error("SOI not found in JPEG"); } var marker; var pos = 2; while (pos < data.length) { marker = data.readUInt16BE(pos); pos += 2; if (MARKERS.includes(marker)) { break; } pos += data.readUInt16BE(pos); } if (!MARKERS.includes(marker)) { throw new Error("Invalid JPEG."); } pos += 3; this.height = data.readUInt16BE(pos); pos += 2; this.width = data.readUInt16BE(pos); }; JPEG.isValid = function (data) { if ( !data || !Buffer.isBuffer(data) || data.readUInt16BE(0) !== 0xffd8 ) { return false; } var marker; var pos = 2; while (pos < data.length) { marker = data.readUInt16BE(pos); pos += 2; if (MARKERS.includes(marker)) { break; } pos += data.readUInt16BE(pos); } if (!MARKERS.includes(marker)) { return false; } return true; }; var createCache = function createCache(_temp) { var _ref = _temp === void 0 ? {} : _temp, _ref$limit = _ref.limit, limit = _ref$limit === void 0 ? 100 : _ref$limit; var cache = {}; var keys = []; return { get: function get(key) { return cache[key]; }, set: function set(key, value) { keys.push(key); if (keys.length > limit) { delete cache[keys.shift()]; } cache[key] = value; }, reset: function reset() { cache = {}; keys = []; }, length: function length() { return keys.length; }, }; }; var IMAGE_CACHE = createCache({ limit: 30, }); var fetchRemoteFile = /*#__PURE__*/ (function () { var _ref = _asyncToGenerator__default["default"]( /*#__PURE__*/ _regeneratorRuntime__default["default"].mark( function _callee(uri, options) { var response, buffer; return _regeneratorRuntime__default["default"].wrap( function _callee$(_context) { while (1) { switch ( (_context.prev = _context.next) ) { case 0: _context.next = 2; return fetch__default[ "default" ](uri, options); case 2: response = _context.sent; _context.next = 5; return response.buffer ? response.buffer() : response.arrayBuffer(); case 5: buffer = _context.sent; return _context.abrupt( "return", buffer.constructor.name === "Buffer" ? buffer : Buffer.from(buffer) ); case 7: case "end": return _context.stop(); } } }, _callee ); } ) ); return function fetchRemoteFile(_x, _x2) { return _ref.apply(this, arguments); }; })(); var isValidFormat = function isValidFormat(format) { var lower = format.toLowerCase(); return lower === "jpg" || lower === "jpeg" || lower === "png"; }; var guessFormat = function guessFormat(buffer) { var format; if (JPEG.isValid(buffer)) { format = "jpg"; } else if (PNG__default["default"].isValid(buffer)) { format = "png"; } return format; }; var isCompatibleBase64 = function isCompatibleBase64(_ref2) { var uri = _ref2.uri; return /^data:image\/[a-zA-Z]*;base64,[^"]*/g.test(uri); }; function getImage(body, extension) { switch (extension.toLowerCase()) { case "jpg": case "jpeg": return new JPEG(body); case "png": return new PNG__default["default"](body); default: return null; } } var resolveBase64Image = function resolveBase64Image(_ref3) { var uri = _ref3.uri; var match = /^data:image\/([a-zA-Z]*);base64,([^"]*)/g.exec( uri ); var format = match[1]; var data = match[2]; if (!isValidFormat(format)) { throw new Error("Base64 image invalid format: " + format); } return new Promise(function (resolve) { return resolve( getImage(Buffer.from(data, "base64"), format) ); }); }; var resolveImageFromData = function resolveImageFromData(src) { if (src.data && src.format) { return new Promise(function (resolve) { return resolve(getImage(src.data, src.format)); }); } throw new Error( "Invalid data given for local file: " + JSON.stringify(src) ); }; var resolveBufferImage = function resolveBufferImage(buffer) { var format = guessFormat(buffer); if (format) { return new Promise(function (resolve) { return resolve(getImage(buffer, format)); }); } return Promise.resolve(); }; var getImageFormat = function getImageFormat(body) { var isPng = body[0] === 137 && body[1] === 80 && body[2] === 78 && body[3] === 71 && body[4] === 13 && body[5] === 10 && body[6] === 26 && body[7] === 10; var isJpg = body[0] === 255 && body[1] === 216 && body[2] === 255; var extension = ""; if (isPng) { extension = "png"; } else if (isJpg) { extension = "jpg"; } else { throw new Error("Not valid image extension"); } return extension; }; var resolveImageFromUrl = /*#__PURE__*/ (function () { var _ref4 = _asyncToGenerator__default["default"]( /*#__PURE__*/ _regeneratorRuntime__default["default"].mark( function _callee2(src) { var uri, body, headers, _src$method, method, data, extension; return _regeneratorRuntime__default["default"].wrap( function _callee2$(_context2) { while (1) { switch ( (_context2.prev = _context2.next) ) { case 0: (uri = src.uri), (body = src.body), (headers = src.headers), (_src$method = src.method), (method = _src$method === void 0 ? "GET" : _src$method); { _context2.next = 7; break; } case 4: _context2.t0 = _context2.sent; _context2.next = 10; break; case 7: _context2.next = 9; return fetchRemoteFile(uri, { body: body, headers: headers, method: method, }); case 9: _context2.t0 = _context2.sent; case 10: data = _context2.t0; extension = getImageFormat(data); return _context2.abrupt( "return", getImage(data, extension) ); case 13: case "end": return _context2.stop(); } } }, _callee2 ); } ) ); return function resolveImageFromUrl(_x3) { return _ref4.apply(this, arguments); }; })(); var resolveImage = function resolveImage(src, _temp) { var _ref5 = _temp === void 0 ? {} : _temp, _ref5$cache = _ref5.cache, cache = _ref5$cache === void 0 ? true : _ref5$cache; var cacheKey = src.data ? src.data.toString() : src.uri; if (cache && IMAGE_CACHE.get(cacheKey)) { return IMAGE_CACHE.get(cacheKey); } var image; if (isCompatibleBase64(src)) { image = resolveBase64Image(src); } else if (Buffer.isBuffer(src)) { image = resolveBufferImage(src); } else if (typeof src === "object" && src.data) { image = resolveImageFromData(src); } else { image = resolveImageFromUrl(src); } if (!image) { throw new Error("Cannot resolve image"); } if (cache) { IMAGE_CACHE.set(cacheKey, image); } return image; }; exports["default"] = resolveImage; //# sourceMappingURL=index.browser.js.map /***/ }, /***/ 791: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { "use strict"; var __webpack_unused_export__; __webpack_unused_export__ = { value: true }; var fns = __webpack_require__(4354); var P = __webpack_require__(368); var stylesheet = __webpack_require__(6335); var layoutEngine = __webpack_require__(4825); var linebreaker = __webpack_require__(7335); var justification = __webpack_require__(9186); var scriptItemizer = __webpack_require__(9276); var wordHyphenation = __webpack_require__(4915); var decorationEngine = __webpack_require__(32); var fromFragments = __webpack_require__(2779); var _createClass = __webpack_require__(3913); var pdfkit = __webpack_require__(6054); var _asyncToGenerator = __webpack_require__(8926); var _regeneratorRuntime = __webpack_require__(7757); var _extends = __webpack_require__(7154); var emojiRegex = __webpack_require__(5648); var resolveImage = __webpack_require__(7515); var flatten = __webpack_require__(4340); var Yoga = __webpack_require__(9745); var _objectWithoutPropertiesLoose = __webpack_require__(7316); var advanceWidth = __webpack_require__(7106); function _interopDefaultLegacy(e) { return e && typeof e === "object" && "default" in e ? e : { default: e }; } function _interopNamespace(e) { if (e && e.__esModule) return e; var n = Object.create(null); if (e) { Object.keys(e).forEach(function (k) { if (k !== "default") { var d = Object.getOwnPropertyDescriptor(e, k); Object.defineProperty( n, k, d.get ? d : { enumerable: true, get: function () { return e[k]; }, } ); } }); } n["default"] = e; return Object.freeze(n); } var P__namespace = /*#__PURE__*/ _interopNamespace(P); var stylesheet__default = /*#__PURE__*/ _interopDefaultLegacy(stylesheet); var layoutEngine__default = /*#__PURE__*/ _interopDefaultLegacy(layoutEngine); var linebreaker__default = /*#__PURE__*/ _interopDefaultLegacy(linebreaker); var justification__default = /*#__PURE__*/ _interopDefaultLegacy(justification); var scriptItemizer__default = /*#__PURE__*/ _interopDefaultLegacy(scriptItemizer); var wordHyphenation__default = /*#__PURE__*/ _interopDefaultLegacy(wordHyphenation); var decorationEngine__default = /*#__PURE__*/ _interopDefaultLegacy(decorationEngine); var fromFragments__default = /*#__PURE__*/ _interopDefaultLegacy(fromFragments); var _createClass__default = /*#__PURE__*/ _interopDefaultLegacy(_createClass); var _asyncToGenerator__default = /*#__PURE__*/ _interopDefaultLegacy(_asyncToGenerator); var _regeneratorRuntime__default = /*#__PURE__*/ _interopDefaultLegacy(_regeneratorRuntime); var _extends__default = /*#__PURE__*/ _interopDefaultLegacy(_extends); var emojiRegex__default = /*#__PURE__*/ _interopDefaultLegacy(emojiRegex); var resolveImage__default = /*#__PURE__*/ _interopDefaultLegacy(resolveImage); var flatten__default = /*#__PURE__*/ _interopDefaultLegacy(flatten); var Yoga__default = /*#__PURE__*/ _interopDefaultLegacy(Yoga); var _objectWithoutPropertiesLoose__default = /*#__PURE__*/ _interopDefaultLegacy( _objectWithoutPropertiesLoose ); var advanceWidth__default = /*#__PURE__*/ _interopDefaultLegacy(advanceWidth); /** * Apply transformation to text string * * @param {String} text * @param {String} transformation type * @returns {String} transformed text */ var transformText = function transformText(text, transformation) { switch (transformation) { case "uppercase": return text.toUpperCase(); case "lowercase": return text.toLowerCase(); case "capitalize": return fns.capitalize(text); case "upperfirst": return fns.upperFirst(text); default: return text; } }; var StandardFont = /*#__PURE__*/ (function () { function StandardFont(src) { this.name = src; this.src = pdfkit.PDFFont.open(null, src); } var _proto = StandardFont.prototype; _proto.encode = function encode(str) { return this.src.encode(str); }; _proto.layout = function layout(str) { var _this = this; var _this$encode = this.encode(str), encoded = _this$encode[0], positions = _this$encode[1]; return { positions: positions, stringIndices: positions.map(function (_, i) { return i; }), glyphs: encoded.map(function (g, i) { var glyph = _this.getGlyph(parseInt(g, 16)); glyph.advanceWidth = positions[i].advanceWidth; return glyph; }), }; }; _proto.glyphForCodePoint = function glyphForCodePoint( codePoint ) { var glyph = this.getGlyph(codePoint); glyph.advanceWidth = 400; return glyph; }; _proto.getGlyph = function getGlyph(id) { return { id: id, _font: this.src, codePoints: [id], isLigature: false, name: this.src.font.characterToGlyph(id), }; }; _proto.hasGlyphForCodePoint = function hasGlyphForCodePoint( codePoint ) { return ( this.src.font.characterToGlyph(codePoint) !== ".notdef" ); }; // Based on empirical observation _createClass__default["default"](StandardFont, [ { key: "ascent", get: function get() { return 900; }, // Based on empirical observation }, { key: "capHeight", get: function get() { switch (this.name) { case "Times-Roman": case "Times-Bold": case "Times-Italic": case "Times-BoldItalic": return 650; case "Courier": case "Courier-Bold": case "Courier-Oblique": case "Courier-BoldOblique": return 550; default: return 690; } }, // Based on empirical observation }, { key: "xHeight", get: function get() { switch (this.name) { case "Times-Roman": case "Times-Bold": case "Times-Italic": case "Times-BoldItalic": return 440; case "Courier": case "Courier-Bold": case "Courier-Oblique": case "Courier-BoldOblique": return 390; default: return 490; } }, // Based on empirical observation }, { key: "descent", get: function get() { switch (this.name) { case "Times-Roman": case "Times-Bold": case "Times-Italic": case "Times-BoldItalic": return -220; case "Courier": case "Courier-Bold": case "Courier-Oblique": case "Courier-BoldOblique": return -230; default: return -200; } }, }, { key: "lineGap", get: function get() { return 0; }, }, { key: "unitsPerEm", get: function get() { return 1000; }, }, ]); return StandardFont; })(); var fontCache = {}; var IGNORED_CODE_POINTS = [173]; var getFontSize = function getFontSize(node) { return node.attributes.fontSize || 12; }; var getOrCreateFont = function getOrCreateFont(name) { if (fontCache[name]) return fontCache[name]; var font = new StandardFont(name); fontCache[name] = font; return font; }; var getFallbackFont = function getFallbackFont() { return getOrCreateFont("Helvetica"); }; var shouldFallbackToFont = function shouldFallbackToFont( codePoint, font ) { return ( !font || (!IGNORED_CODE_POINTS.includes(codePoint) && !font.hasGlyphForCodePoint(codePoint) && getFallbackFont().hasGlyphForCodePoint(codePoint)) ); }; var fontSubstitution = function fontSubstitution() { return function (_ref) { var string = _ref.string, runs = _ref.runs; var lastFont = null; var lastFontSize = null; var lastIndex = 0; var index = 0; var res = []; for (var i = 0; i < runs.length; i += 1) { var run = runs[i]; var defaultFont = typeof run.attributes.font === "string" ? getOrCreateFont(run.attributes.font) : run.attributes.font; if (string.length === 0) { res.push({ start: 0, end: 0, attributes: { font: defaultFont, }, }); break; } var chars = string.slice(run.start, run.end); for (var j = 0; j < chars.length; j += 1) { var char = chars[j]; var codePoint = char.codePointAt(); var shouldFallback = shouldFallbackToFont( codePoint, defaultFont ); // If the default font does not have a glyph and the fallback font does, we use it var font = shouldFallback ? getFallbackFont() : defaultFont; var fontSize = getFontSize(run); // If anything that would impact res has changed, update it if ( font !== lastFont || fontSize !== lastFontSize || font.unitsPerEm !== lastFont.unitsPerEm ) { if (lastFont) { res.push({ start: lastIndex, end: index, attributes: { font: lastFont, scale: lastFontSize / lastFont.unitsPerEm, }, }); } lastFont = font; lastFontSize = fontSize; lastIndex = index; } index += char.length; } } if (lastIndex < string.length) { var _fontSize = getFontSize(fns.last(runs)); res.push({ start: lastIndex, end: string.length, attributes: { font: lastFont, scale: _fontSize / lastFont.unitsPerEm, }, }); } return { string: string, runs: res, }; }; }; var isTextInstance$4 = function isTextInstance(node) { return node.type === P__namespace.TextInstance; }; var engines$1 = { linebreaker: linebreaker__default["default"], justification: justification__default["default"], scriptItemizer: scriptItemizer__default["default"], wordHyphenation: wordHyphenation__default["default"], fontSubstitution: fontSubstitution, textDecoration: decorationEngine__default["default"], }; var engine$1 = layoutEngine__default["default"](engines$1); var getFragments$1 = function getFragments(fontStore, instance) { if (!instance) return [ { string: "", }, ]; var fragments = []; var _instance$props = instance.props, _instance$props$fill = _instance$props.fill, fill = _instance$props$fill === void 0 ? "black" : _instance$props$fill, _instance$props$fontF = _instance$props.fontFamily, fontFamily = _instance$props$fontF === void 0 ? "Helvetica" : _instance$props$fontF, fontWeight = _instance$props.fontWeight, fontStyle = _instance$props.fontStyle, _instance$props$fontS = _instance$props.fontSize, fontSize = _instance$props$fontS === void 0 ? 18 : _instance$props$fontS, textDecoration = _instance$props.textDecoration, textDecorationColor = _instance$props.textDecorationColor, textDecorationStyle = _instance$props.textDecorationStyle, textTransform = _instance$props.textTransform, opacity = _instance$props.opacity; var obj = fontStore ? fontStore.getFont({ fontFamily: fontFamily, fontWeight: fontWeight, fontStyle: fontStyle, }) : null; var font = obj ? obj.data : fontFamily; var attributes = { font: font, opacity: opacity, fontSize: fontSize, color: fill, underlineStyle: textDecorationStyle, underline: textDecoration === "underline" || textDecoration === "underline line-through" || textDecoration === "line-through underline", underlineColor: textDecorationColor || fill, strike: textDecoration === "line-through" || textDecoration === "underline line-through" || textDecoration === "line-through underline", strikeStyle: textDecorationStyle, strikeColor: textDecorationColor || fill, }; for (var i = 0; i < instance.children.length; i += 1) { var child = instance.children[i]; if (isTextInstance$4(child)) { fragments.push({ string: transformText(child.value, textTransform), attributes: attributes, }); } else if (child) { fragments.push.apply(fragments, getFragments(child)); } } return fragments; }; var getAttributedString$1 = function getAttributedString( fontStore, instance ) { return fromFragments__default["default"]( getFragments$1(fontStore, instance) ); }; var AlmostInfinity = 999999999999; var shrinkWhitespaceFactor = { before: -0.5, after: -0.5, }; var layoutTspan = function layoutTspan(fontStore) { return function (node) { var _node$props, _node$props2; var attributedString = getAttributedString$1( fontStore, node ); var x = ((_node$props = node.props) === null || _node$props === void 0 ? void 0 : _node$props.x) || 0; var y = ((_node$props2 = node.props) === null || _node$props2 === void 0 ? void 0 : _node$props2.y) || 0; var container = { x: x, y: y, width: AlmostInfinity, height: AlmostInfinity, }; var hyphenationCallback = node.props.hyphenationCallback || (fontStore === null || fontStore === void 0 ? void 0 : fontStore.getHyphenationCallback()) || null; var layoutOptions = { hyphenationCallback: hyphenationCallback, shrinkWhitespaceFactor: shrinkWhitespaceFactor, }; var lines = engine$1( attributedString, container, layoutOptions ).flat(); return Object.assign({}, node, { lines: lines, }); }; }; var layoutText$1 = function layoutText(fontStore, node) { if (!node.children) return node; var children = node.children.map(layoutTspan(fontStore)); return Object.assign({}, node, { children: children, }); }; var isDefs = function isDefs(node) { return node.type === P__namespace.Defs; }; var getDefs = function getDefs(node) { var children = node.children || []; var defs = children.find(isDefs) || {}; var values = defs.children || []; return values.reduce(function (acc, value) { var _value$props; var id = (_value$props = value.props) === null || _value$props === void 0 ? void 0 : _value$props.id; if (id) acc[id] = value; return acc; }, {}); }; var isNotDefs = function isNotDefs(node) { return node.type !== P__namespace.Defs; }; var detachDefs = function detachDefs(node) { if (!node.children) return node; var children = node.children.filter(isNotDefs); return Object.assign({}, node, { children: children, }); }; var URL_REGEX = /url\(['"]?#([^'"]+)['"]?\)/; var replaceDef = function replaceDef(defs, value) { if (!value) return undefined; if (!URL_REGEX.test(value)) return value; var match = value.match(URL_REGEX); return defs[match[1]]; }; var parseNodeDefs = function parseNodeDefs(defs) { return function (node) { var _node$props, _node$props2; var fill = replaceDef( defs, (_node$props = node.props) === null || _node$props === void 0 ? void 0 : _node$props.fill ); var clipPath = replaceDef( defs, (_node$props2 = node.props) === null || _node$props2 === void 0 ? void 0 : _node$props2.clipPath ); var props = Object.assign({}, node.props, { fill: fill, clipPath: clipPath, }); var children = node.children ? node.children.map(parseNodeDefs(defs)) : undefined; return Object.assign({}, node, { props: props, children: children, }); }; }; var parseDefs = function parseDefs(root) { if (!root.children) return root; var defs = getDefs(root); var children = root.children.map(parseNodeDefs(defs)); return Object.assign({}, root, { children: children, }); }; var replaceDefs = function replaceDefs(node) { return detachDefs(parseDefs(node)); }; var parseViewbox = function parseViewbox(value) { if (!value) return null; var values = value.split(/[,\s]+/).map(parseFloat); if (values.length !== 4) return null; return { minX: values[0], minY: values[1], maxX: values[2], maxY: values[3], }; }; var getContainer$1 = function getContainer(node) { var viewbox = parseViewbox(node.props.viewBox); if (viewbox) { return { width: viewbox.maxX, height: viewbox.maxY, }; } if (node.props.width && node.props.height) { return { width: parseFloat(node.props.width), height: parseFloat(node.props.height), }; } return { width: 0, height: 0, }; }; var SVG_INHERITED_PROPS = [ "x", "y", "clipPath", "clipRule", "opacity", "fill", "fillOpacity", "fillRule", "stroke", "strokeLinecap", "strokeLinejoin", "strokeOpacity", "strokeWidth", "textAnchor", "dominantBaseline", "color", "fontFamily", "fontSize", "fontStyle", "fontWeight", "letterSpacing", "opacity", "textDecoration", "lineHeight", "textAlign", "visibility", "wordSpacing", ]; var getInheritProps = function getInheritProps(node) { var props = node.props || {}; return fns.pick(SVG_INHERITED_PROPS, props); }; var inheritProps = function inheritProps(node) { if (!node.children) return node; var inheritedProps = getInheritProps(node); var children = node.children.map(function (child) { var props = Object.assign( {}, inheritedProps, child.props || {} ); var newChild = Object.assign({}, child, { props: props, }); return inheritProps(newChild); }); return Object.assign({}, node, { children: children, }); }; var parseAspectRatio = function parseAspectRatio(value) { var match = value .replace(/[\s\r\t\n]+/gm, " ") .replace(/^defer\s/, "") .split(" "); var align = match[0] || "xMidYMid"; var meetOrSlice = match[1] || "meet"; return { align: align, meetOrSlice: meetOrSlice, }; }; var STYLE_PROPS = [ "width", "height", "color", "stroke", "strokeWidth", "opacity", "fillOpacity", "strokeOpacity", "fill", "fillRule", "clipPath", "offset", "transform", "strokeLinejoin", "strokeLinecap", "strokeDasharray", ]; var VERTICAL_PROPS = ["y", "y1", "y2", "height", "cy", "ry"]; var HORIZONTAL_PROPS = ["x", "x1", "x2", "width", "cx", "rx"]; var isType$3 = function isType(type) { return function (node) { return node.type === type; }; }; var isSvg$3 = isType$3(P__namespace.Svg); var isText$4 = isType$3(P__namespace.Text); var isTextInstance$3 = isType$3(P__namespace.TextInstance); var transformPercent = function transformPercent(container) { return function (props) { return fns.mapValues(props, function (value, key) { var match = fns.matchPercent(value); if (match && VERTICAL_PROPS.includes(key)) { return match.percent * container.height; } if (match && HORIZONTAL_PROPS.includes(key)) { return match.percent * container.width; } return value; }); }; }; var parsePercent = function parsePercent(value) { var match = fns.matchPercent(value); return match ? match.percent : parseFloat(value); }; var parseProps = function parseProps(container) { return function (node) { var props = transformPercent(container)(node.props); props = fns.evolve( { x: parseFloat, x1: parseFloat, x2: parseFloat, y: parseFloat, y1: parseFloat, y2: parseFloat, r: parseFloat, rx: parseFloat, ry: parseFloat, cx: parseFloat, cy: parseFloat, width: parseFloat, height: parseFloat, offset: parsePercent, fill: stylesheet.transformColor, opacity: parsePercent, stroke: stylesheet.transformColor, stopOpacity: parsePercent, stopColor: stylesheet.transformColor, transform: stylesheet.processTransform, }, props ); return Object.assign({}, node, { props: props, }); }; }; var mergeStyles$1 = function mergeStyles(node) { var style = node.style || {}; var props = Object.assign({}, style, node.props); return Object.assign({}, node, { props: props, }); }; var removeNoneValues = function removeNoneValues(node) { var removeNone = function removeNone(value) { return value === "none" ? null : value; }; var props = fns.mapValues(node.props, removeNone); return Object.assign({}, node, { props: props, }); }; var pickStyleProps = function pickStyleProps(node) { var props = node.props || {}; var styleProps = fns.pick(STYLE_PROPS, props); var style = Object.assign({}, styleProps, node.style || {}); return Object.assign({}, node, { style: style, }); }; var parseSvgProps = function parseSvgProps(node) { var props = fns.evolve( { width: parseFloat, height: parseFloat, viewBox: parseViewbox, preserveAspectRatio: parseAspectRatio, }, node.props ); return Object.assign({}, node, { props: props, }); }; var wrapBetweenTspan = function wrapBetweenTspan(node) { return { type: P__namespace.Tspan, props: {}, children: [node], }; }; var addMissingTspan = function addMissingTspan(node) { if (!isText$4(node)) return node; if (!node.children) return node; var resolveChild = function resolveChild(child) { return isTextInstance$3(child) ? wrapBetweenTspan(child) : child; }; var children = node.children.map(resolveChild); return Object.assign({}, node, { children: children, }); }; var parseText = function parseText(fontStore) { return function (node) { if (isText$4(node)) return layoutText$1(fontStore, node); if (!node.children) return node; var children = node.children.map(parseText(fontStore)); return Object.assign({}, node, { children: children, }); }; }; var resolveSvgNode = function resolveSvgNode(container) { return fns.compose( parseProps(container), addMissingTspan, removeNoneValues, mergeStyles$1 ); }; var resolveChildren = function resolveChildren(container) { return function (node) { if (!node.children) return node; var resolveChild = fns.compose( resolveChildren(container), resolveSvgNode(container) ); var children = node.children.map(resolveChild); return Object.assign({}, node, { children: children, }); }; }; var resolveSvgRoot = function resolveSvgRoot(node, fontStore) { var container = getContainer$1(node); return fns.compose( replaceDefs, parseText(fontStore), parseSvgProps, pickStyleProps, inheritProps, resolveChildren(container) )(node); }; /** * Pre-process SVG nodes so they can be rendered in the next steps * * @param {Object} root node * @param {Object} fontStore font store * @returns {Object} root node */ var resolveSvg = function resolveSvg(node, fontStore) { if (!node.children) return node; var resolveChild = function resolveChild(child) { return resolveSvg(child, fontStore); }; var root = isSvg$3(node) ? resolveSvgRoot(node, fontStore) : node; var children = root.children.map(resolveChild); return Object.assign({}, root, { children: children, }); }; var getZIndex = function getZIndex(node) { return node.style.zIndex; }; var shouldSort = function shouldSort(node) { return ( node.type !== P__namespace.Document && node.type !== P__namespace.Svg ); }; var sortZIndex = function sortZIndex(a, b) { var za = getZIndex(a); var zb = getZIndex(b); if (!za && !zb) return 0; if (!za) return 1; if (!zb) return -1; return zb - za; }; /** * Sort children by zIndex value * * @param {Object} node * @returns {Object} node */ var resolveZIndex = function resolveZIndex(node) { if (!node.children) return node; var sortedChildren = shouldSort(node) ? node.children.sort(sortZIndex) : node.children; var children = sortedChildren.map(resolveZIndex); return Object.assign({}, node, { children: children, }); }; var emojis = {}; var regex = emojiRegex__default["default"](); var reflect = function reflect(promise) { return function () { return promise.apply(void 0, arguments).then( function (v) { return v; }, function (e) { return e; } ); }; }; // Returns a function to be able to mock resolveImage. var makeFetchEmojiImage = function makeFetchEmojiImage() { return reflect(resolveImage__default["default"]); }; /** * When an emoji as no color, it might still have 2 parts, * the canonical emoji and an empty string. * ex. * (no color) Array.from('❤️') => ["❤", "️"] * (w/ color) Array.from('👍🏿') => ["👍", "🏿"] * * The empty string needs to be removed otherwise the generated * url will be incorect. */ var _removeNoColor = function _removeNoColor(x) { return x !== "️"; }; var getCodePoints = function getCodePoints(string) { return Array.from(string) .filter(_removeNoColor) .map(function (char) { return char.codePointAt(0).toString(16); }) .join("-"); }; var buildEmojiUrl = function buildEmojiUrl(emoji, source) { var url = source.url, format = source.format; return "" + url + getCodePoints(emoji) + "." + format; }; var fetchEmojis = function fetchEmojis(string, source) { if (!source || !source.url) return []; var promises = []; var match; var _loop = function _loop() { var emoji = match[0]; if (!emojis[emoji] || emojis[emoji].loading) { var emojiUrl = buildEmojiUrl(emoji, source); emojis[emoji] = { loading: true, }; var fetchEmojiImage = makeFetchEmojiImage(); promises.push( fetchEmojiImage({ uri: emojiUrl, }).then(function (image) { emojis[emoji].loading = false; emojis[emoji].data = image.data; }) ); } }; while ((match = regex.exec(string))) { _loop(); } return promises; }; var embedEmojis = function embedEmojis(fragments) { var result = []; for (var i = 0; i < fragments.length; i += 1) { var fragment = fragments[i]; var match = void 0; var lastIndex = 0; while ((match = regex.exec(fragment.string))) { var _match = match, index = _match.index; var emoji = match[0]; var emojiSize = fragment.attributes.fontSize; var chunk = fragment.string.slice( lastIndex, index + match[0].length ); // If emoji image was found, we create a new fragment with the // correct attachment and object substitution character; if (emojis[emoji] && emojis[emoji].data) { result.push({ string: chunk.replace( match, String.fromCharCode(0xfffc) ), attributes: _extends__default["default"]( {}, fragment.attributes, { attachment: { width: emojiSize, height: emojiSize, yOffset: Math.floor( emojiSize * 0.1 ), image: emojis[emoji].data, }, } ), }); } else { // If no emoji data, we just replace the emoji with a nodef char result.push({ string: chunk.replace( match, String.fromCharCode(0) ), attributes: fragment.attributes, }); } lastIndex = index + emoji.length; } if (lastIndex < fragment.string.length) { result.push({ string: fragment.string.slice(lastIndex), attributes: fragment.attributes, }); } } return result; }; /** * Get image source * * @param {Object} image node * @returns {String | Object} image src */ var getSource = function getSource(node) { var _node$props, _node$props2, _node$props3; return ( ((_node$props = node.props) === null || _node$props === void 0 ? void 0 : _node$props.src) || ((_node$props2 = node.props) === null || _node$props2 === void 0 ? void 0 : _node$props2.source) || ((_node$props3 = node.props) === null || _node$props3 === void 0 ? void 0 : _node$props3.href) ); }; /** * Resolves `src` to `@react-pdf/image` interface. * * Also it handles factories and async sources. * * @param {string | Object | Function} src * @returns {object} resolved src */ var resolveSource = /*#__PURE__*/ (function () { var _ref = _asyncToGenerator__default["default"]( /*#__PURE__*/ _regeneratorRuntime__default["default"].mark( function _callee(src) { var source; return _regeneratorRuntime__default["default"].wrap( function _callee$(_context) { while (1) { switch ( (_context.prev = _context.next) ) { case 0: if ( !(typeof src === "function") ) { _context.next = 6; break; } _context.next = 3; return src(); case 3: _context.t0 = _context.sent; _context.next = 9; break; case 6: _context.next = 8; return src; case 8: _context.t0 = _context.sent; case 9: source = _context.t0; return _context.abrupt( "return", typeof source === "string" ? { uri: source, } : source ); case 11: case "end": return _context.stop(); } } }, _callee ); } ) ); return function resolveSource(_x) { return _ref.apply(this, arguments); }; })(); /** * Fetches image and append data to node * Ideally this fn should be immutable. * * @param {Object} node */ var fetchImage = /*#__PURE__*/ (function () { var _ref = _asyncToGenerator__default["default"]( /*#__PURE__*/ _regeneratorRuntime__default["default"].mark( function _callee(node) { var src, cache, source; return _regeneratorRuntime__default["default"].wrap( function _callee$(_context) { while (1) { switch ( (_context.prev = _context.next) ) { case 0: src = getSource(node); cache = node.props.cache; if (src) { _context.next = 5; break; } console.warn( false, 'Image should receive either a "src" or "source" prop' ); return _context.abrupt( "return" ); case 5: _context.prev = 5; _context.next = 8; return resolveSource(src); case 8: source = _context.sent; if (source) { _context.next = 11; break; } throw new Error( 'Image\'s "src" or "source" prop returned ' + source ); case 11: _context.next = 13; return resolveImage__default[ "default" ](source, { cache: cache, }); case 13: node.image = _context.sent; node.image.key = source.data ? source.data.toString() : source.uri; _context.next = 21; break; case 17: _context.prev = 17; _context.t0 = _context["catch"](5); node.image = { width: 0, height: 0, key: null, }; console.warn( _context.t0.message ); case 21: case "end": return _context.stop(); } } }, _callee, null, [[5, 17]] ); } ) ); return function fetchImage(_x) { return _ref.apply(this, arguments); }; })(); var isImage$2 = function isImage(node) { return node.type === P__namespace.Image; }; /** * Get all asset promises that need to be resolved * * @param {Object} root node * @returns {Array} asset promises */ var fetchAssets = function fetchAssets(fontStore, node) { var _node$children; var promises = []; var listToExplore = ((_node$children = node.children) === null || _node$children === void 0 ? void 0 : _node$children.slice(0)) || []; var emojiSource = fontStore ? fontStore.getEmojiSource() : null; while (listToExplore.length > 0) { var _n$style; var n = listToExplore.shift(); if (isImage$2(n)) { promises.push(fetchImage(n)); } if ( fontStore && (_n$style = n.style) !== null && _n$style !== void 0 && _n$style.fontFamily ) { promises.push(fontStore.load(n.style)); } if (typeof n === "string") { promises.push.apply( promises, fetchEmojis(n, emojiSource) ); } if (typeof n.value === "string") { promises.push.apply( promises, fetchEmojis(n.value, emojiSource) ); } if (n.children) { n.children.forEach(function (childNode) { listToExplore.push(childNode); }); } } return promises; }; /** * Fetch image, font and emoji assets in parallel. * Layout process will not be resumed until promise resolves. * * @param {Object} root node * @param {Object} fontStore font store * @returns {Object} root node */ var resolveAssets = /*#__PURE__*/ (function () { var _ref = _asyncToGenerator__default["default"]( /*#__PURE__*/ _regeneratorRuntime__default["default"].mark( function _callee(node, fontStore) { var promises; return _regeneratorRuntime__default["default"].wrap( function _callee$(_context) { while (1) { switch ( (_context.prev = _context.next) ) { case 0: promises = fetchAssets( fontStore, node ); _context.next = 3; return Promise.all(promises); case 3: return _context.abrupt( "return", node ); case 4: case "end": return _context.stop(); } } }, _callee ); } ) ); return function resolveAssets(_x, _x2) { return _ref.apply(this, arguments); }; })(); var isLink$1 = function isLink(node) { return node.type === P__namespace.Link; }; var LINK_STYLES = { color: "blue", textDecoration: "underline", }; /** * Computes styles using stylesheet * * @param {Object} container * @param {Object} document node * @returns {Object} computed styles */ var computeStyle = function computeStyle(container, node) { var overrideStyle = isLink$1(node) ? LINK_STYLES : {}; var baseStyle = Array.isArray(node.style) ? [].concat(node.style, [overrideStyle]) : Object.assign({}, overrideStyle, node.style); return stylesheet__default["default"](container, baseStyle); }; /** * Resolves node styles * * @param {Object} container * @param {Object} document node * @returns {Object} node (and subnodes) with resolved styles */ var resolveNodeStyles = function resolveNodeStyles(container) { return function (node) { var style = computeStyle(container, node); if (!node.children) return Object.assign({}, node, { style: style, }); var children = node.children.map( resolveNodeStyles(container) ); return Object.assign({}, node, { style: style, children: children, }); }; }; /** * Resolves page styles * * @param {Object} document page * @returns {Object} document page with resolved styles */ var resolvePageStyles = function resolvePageStyles(page) { var _page$props; var dpi = ((_page$props = page.props) === null || _page$props === void 0 ? void 0 : _page$props.dpi) || 72; var box = page.box || page.style; var container = _extends__default["default"]({}, box, { dpi: dpi, }); return resolveNodeStyles(container)(page); }; /** * Resolves document styles * * @param {Object} document root * @returns {Object} document root with resolved styles */ var resolveStyles = function resolveStyles(root) { if (!root.children) return root; var children = root.children.map(resolvePageStyles); return Object.assign({}, root, { children: children, }); }; var getTransformStyle = function getTransformStyle(s) { return function (node) { var _node$style, _node$style2; return fns.isNil( (_node$style = node.style) === null || _node$style === void 0 ? void 0 : _node$style[s] ) ? "50%" : (_node$style2 = node.style) === null || _node$style2 === void 0 ? void 0 : _node$style2[s]; }; }; /** * Get node origin * * @param {Object} node * @returns {Object} node origin */ var getOrigin = function getOrigin(node) { if (!node.box) return {}; var _node$box = node.box, left = _node$box.left, top = _node$box.top, width = _node$box.width, height = _node$box.height; var transformOriginX = getTransformStyle("transformOriginX")(node); var transformOriginY = getTransformStyle("transformOriginY")(node); var percentX = fns.matchPercent(transformOriginX); var percentY = fns.matchPercent(transformOriginY); var offsetX = percentX ? width * percentX.percent : transformOriginX; var offsetY = percentY ? height * percentY.percent : transformOriginY; return { left: left + offsetX, top: top + offsetY, }; }; /** * Resolve node origin * * @param {Object} node * @returns {Object} node with origin attribute */ var resolveNodeOrigin = function resolveNodeOrigin(node) { var origin = getOrigin(node); var newNode = Object.assign({}, node, { origin: origin, }); if (!node.children) return newNode; var children = node.children.map(resolveNodeOrigin); return Object.assign({}, newNode, { children: children, }); }; /** * Resolve document origins * * @param {Object} document root * @returns {Object} documrnt root */ var resolveOrigin = function resolveOrigin(root) { if (!root.children) return root; var children = root.children.map(resolveNodeOrigin); return Object.assign({}, root, { children: children, }); }; /* eslint-disable no-plusplus */ /* eslint-disable prefer-const */ /* eslint-disable prefer-destructuring */ var getBookmarkValue = function getBookmarkValue(title) { return typeof title === "string" ? { title: title, fit: false, expanded: false, } : title; }; var resolveBookmarks = function resolveBookmarks(node) { var refs = 0; var children = (node.children || []).slice(0); var listToExplore = children.map(function (value) { return { value: value, parent: null, }; }); var _loop = function _loop() { var _child$props; var element = listToExplore.shift(); var child = element.value; var parent = element.parent; if ( (_child$props = child.props) !== null && _child$props !== void 0 && _child$props.bookmark ) { var _parent; var bookmark = getBookmarkValue(child.props.bookmark); var ref = refs++; var newHierarchy = _extends__default["default"]( { ref: ref, parent: (_parent = parent) === null || _parent === void 0 ? void 0 : _parent.ref, }, bookmark ); child.props.bookmark = newHierarchy; parent = newHierarchy; } if (child.children) { child.children.forEach(function (childNode) { listToExplore.push({ value: childNode, parent: parent, }); }); } }; while (listToExplore.length > 0) { _loop(); } return node; }; var VALID_ORIENTATIONS = ["portrait", "landscape"]; /** * Get page orientation. Defaults to portrait * * @param { Object } page object * @returns { String } page orientation */ var getOrientation = function getOrientation(page) { var _page$props; var value = ((_page$props = page.props) === null || _page$props === void 0 ? void 0 : _page$props.orientation) || "portrait"; return VALID_ORIENTATIONS.includes(value) ? value : "portrait"; }; /** * Return true if page is landscape * * @param {Object} page instance * @returns {Boolean} is page landscape */ var isLandscape = function isLandscape(page) { return getOrientation(page) === "landscape"; }; var PAGE_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], ID1: [153, 243], }; /** * Transforms array into size object * * @param {Array} array * @returns {Object} size object with width and height */ var toSizeObject = function toSizeObject(v) { return { width: v[0], height: v[1], }; }; /** * Flip size object * * @param {Object} size object * @returns {Object} flipped size object */ var flipSizeObject = function flipSizeObject(v) { return { width: v.height, height: v.width, }; }; /** * Adjust page size to passed DPI * * @param {Object} size object * @param {number} dpi * @returns {Object} adjusted size object */ var adjustDpi = function adjustDpi(v, dpi) { return { width: v.width ? v.width * dpi : v.width, height: v.height ? v.height * dpi : v.height, }; }; /** * Returns size object from a given string * * @param {String} page size string * @returns {Object} size object with width and height */ var getStringSize = function getStringSize(v) { return toSizeObject(PAGE_SIZES[v.toUpperCase()]); }; /** * Returns size object from a single number * * @param {Number} page size number * @returns {Object} size object with width and height */ var getNumberSize = function getNumberSize(n) { return toSizeObject([n]); }; /** * Return page size in an object { width, height } * * @param {Object} page instance * @returns {Object} size object with width and height */ var getSize = function getSize(page) { var _page$props, _page$props2; var value = ((_page$props = page.props) === null || _page$props === void 0 ? void 0 : _page$props.size) || "A4"; var dpi = parseFloat( ((_page$props2 = page.props) === null || _page$props2 === void 0 ? void 0 : _page$props2.dpi) || 72 ); var type = typeof value; var size = value; if (type === "string") { size = getStringSize(value); } else if (Array.isArray(value)) { size = toSizeObject(value); } else if (type === "number") { size = getNumberSize(value); } size = adjustDpi(size, dpi / 72); return isLandscape(page) ? flipSizeObject(size) : size; }; /** * Resolves page size * * @param {Object} page * @returns {Object} page with resolved size in style attribute */ var resolvePageSize = function resolvePageSize(page) { var size = getSize(page); var style = flatten__default["default"](page.style || {}); return _extends__default["default"]({}, page, { style: _extends__default["default"]({}, style, size), }); }; /** * Resolves page sizes * * @param {Object} document root * @returns {Object} document root with resolved page sizes */ var resolvePageSizes = function resolvePageSizes(root) { if (!root.children) return root; var children = root.children.map(resolvePageSize); return Object.assign({}, root, { children: children, }); }; var isFixed = function isFixed(node) { var _node$props; return ( ((_node$props = node.props) === null || _node$props === void 0 ? void 0 : _node$props.fixed) === true ); }; /** * Get line index at given height * * @param {Object} node * @param {Number} height */ var lineIndexAtHeight = function lineIndexAtHeight(node, height) { var y = 0; if (!node.lines) return 0; for (var i = 0; i < node.lines.length; i += 1) { var line = node.lines[i]; if (y + line.box.height > height) return i; y += line.box.height; } return node.lines.length; }; /** * Get height for given text line index * * @param {Object} node * @param {Number} index */ var heightAtLineIndex = function heightAtLineIndex(node, index) { var counter = 0; if (!node.lines) return counter; for (var i = 0; i < index; i += 1) { var line = node.lines[i]; if (!line) break; counter += line.box.height; } return counter; }; var getLineBreak = function getLineBreak(node, height) { var top = fns.get(node, ["box", "top"], 0); var widows = fns.get(node, ["props", "widows"], 2); var orphans = fns.get(node, ["props", "orphans"], 2); var linesQuantity = node.lines.length; var slicedLine = lineIndexAtHeight(node, height - top); if (slicedLine === 0) { return 0; } if (linesQuantity < orphans) { return linesQuantity; } if (slicedLine < orphans || linesQuantity < orphans + widows) { return 0; } if (linesQuantity === orphans + widows) { return orphans; } if (linesQuantity - slicedLine < widows) { return linesQuantity - widows; } return slicedLine; }; // Also receives contentArea in case it's needed var splitText = function splitText(node, height) { var slicedLineIndex = getLineBreak(node, height); var currentHeight = heightAtLineIndex(node, slicedLineIndex); var nextHeight = node.box.height - currentHeight; var current = Object.assign({}, node, { box: _extends__default["default"]({}, node.box, { height: currentHeight, borderBottomWidth: 0, }), style: _extends__default["default"]({}, node.style, { marginBottom: 0, paddingBottom: 0, borderBottomWidth: 0, borderBottomLeftRadius: 0, borderBottomRightRadius: 0, }), lines: node.lines.slice(0, slicedLineIndex), }); var next = Object.assign({}, node, { box: _extends__default["default"]({}, node.box, { top: 0, height: nextHeight, borderTopWidth: 0, }), style: _extends__default["default"]({}, node.style, { marginTop: 0, paddingTop: 0, borderTopWidth: 0, borderTopLeftRadius: 0, borderTopRightRadius: 0, }), lines: node.lines.slice(slicedLineIndex), }); return [current, next]; }; var getTop$1 = function getTop(node) { var _node$box; return ( ((_node$box = node.box) === null || _node$box === void 0 ? void 0 : _node$box.top) || 0 ); }; var hasFixedHeight = function hasFixedHeight(node) { var _node$style; return !fns.isNil( (_node$style = node.style) === null || _node$style === void 0 ? void 0 : _node$style.height ); }; var splitNode = function splitNode(node, height) { if (!node) return [null, null]; var nodeTop = getTop$1(node); var current = Object.assign({}, node, { box: _extends__default["default"]({}, node.box, { borderBottomWidth: 0, }), style: _extends__default["default"]({}, node.style, { marginBottom: 0, paddingBottom: 0, borderBottomWidth: 0, borderBottomLeftRadius: 0, borderBottomRightRadius: 0, }), }); current.style.height = height - nodeTop; var nextHeight = hasFixedHeight(node) ? node.box.height - (height - nodeTop) : null; var next = Object.assign({}, node, { box: _extends__default["default"]({}, node.box, { top: 0, borderTopWidth: 0, }), style: _extends__default["default"]({}, node.style, { marginTop: 0, paddingTop: 0, borderTopWidth: 0, borderTopLeftRadius: 0, borderTopRightRadius: 0, }), }); if (nextHeight) { next.style.height = nextHeight; } return [current, next]; }; var NON_WRAP_TYPES = [ P__namespace.Svg, P__namespace.Note, P__namespace.Image, P__namespace.Canvas, ]; var getWrap = function getWrap(node) { var _node$props; if (NON_WRAP_TYPES.includes(node.type)) return false; return fns.isNil( (_node$props = node.props) === null || _node$props === void 0 ? void 0 : _node$props.wrap ) ? true : node.props.wrap; }; var getComputedPadding = function getComputedPadding(node, edge) { var yogaNode = node._yogaNode; return yogaNode ? yogaNode.getComputedPadding(edge) : null; }; /** * Get Yoga computed paddings. Zero otherwise * * @param {Object} node * @return {Object} paddings */ var getPadding = function getPadding(node) { var style = node.style, box = node.box; var paddingTop = getComputedPadding( node, Yoga__default["default"].EDGE_TOP ) || (box === null || box === void 0 ? void 0 : box.paddingTop) || (style === null || style === void 0 ? void 0 : style.paddingTop) || (style === null || style === void 0 ? void 0 : style.paddingVertical) || (style === null || style === void 0 ? void 0 : style.padding) || 0; var paddingRight = getComputedPadding( node, Yoga__default["default"].EDGE_RIGHT ) || (box === null || box === void 0 ? void 0 : box.paddingRight) || (style === null || style === void 0 ? void 0 : style.paddingRight) || (style === null || style === void 0 ? void 0 : style.paddingHorizontal) || (style === null || style === void 0 ? void 0 : style.padding) || 0; var paddingBottom = getComputedPadding( node, Yoga__default["default"].EDGE_BOTTOM ) || (box === null || box === void 0 ? void 0 : box.paddingBottom) || (style === null || style === void 0 ? void 0 : style.paddingBottom) || (style === null || style === void 0 ? void 0 : style.paddingVertical) || (style === null || style === void 0 ? void 0 : style.padding) || 0; var paddingLeft = getComputedPadding( node, Yoga__default["default"].EDGE_LEFT ) || (box === null || box === void 0 ? void 0 : box.paddingLeft) || (style === null || style === void 0 ? void 0 : style.paddingLeft) || (style === null || style === void 0 ? void 0 : style.paddingHorizontal) || (style === null || style === void 0 ? void 0 : style.padding) || 0; return { paddingTop: paddingTop, paddingRight: paddingRight, paddingBottom: paddingBottom, paddingLeft: paddingLeft, }; }; var getWrapArea = function getWrapArea(page) { var _page$style; var _getPadding = getPadding(page), paddingBottom = _getPadding.paddingBottom; var height = (_page$style = page.style) === null || _page$style === void 0 ? void 0 : _page$style.height; return height - paddingBottom; }; var getContentArea = function getContentArea(page) { var _page$style; var height = (_page$style = page.style) === null || _page$style === void 0 ? void 0 : _page$style.height; var _getPadding = getPadding(page), paddingTop = _getPadding.paddingTop, paddingBottom = _getPadding.paddingBottom; return height - paddingBottom - paddingTop; }; var _excluded = ["style", "children"]; var isString = function isString(value) { return typeof value === "string"; }; var isNumber = function isNumber(value) { return typeof value === "number"; }; /** * Transforms a react element instance to internal element format * * @param {Object} React element * @returns {Object} parsed react element */ var createInstance = function createInstance(element) { if (!element) return null; if (isString(element) || isNumber(element)) return { type: P.TextInstance, value: "" + element, }; if (!isString(element.type)) return createInstance(element.type(element.props)); var type = element.type, _element$props = element.props, _element$props$style = _element$props.style, style = _element$props$style === void 0 ? {} : _element$props$style, _element$props$childr = _element$props.children, children = _element$props$childr === void 0 ? [] : _element$props$childr, props = _objectWithoutPropertiesLoose__default["default"]( _element$props, _excluded ); var nextChildren = fns.castArray(children).map(createInstance); return { type: type, style: style, props: props, box: {}, children: nextChildren, }; }; /** * Get many nodes height * * @param {Array} nodes * @return {number} nodes height */ var getNodesHeight = function getNodesHeight(nodes) { var max = 0; var min = Infinity; if (!nodes || nodes.length === 0) return 0; for (var i = 0; i < nodes.length; i += 1) { var node = nodes[i]; min = Math.min(min, node.box.top); max = Math.max(max, node.box.top + node.box.height); } return max - min; }; /* eslint-disable no-continue */ var getBreak = function getBreak(node) { var _node$props; return ( ((_node$props = node.props) === null || _node$props === void 0 ? void 0 : _node$props.break) || false ); }; var getMinPresenceAhead = function getMinPresenceAhead(node) { var _node$props2; return (_node$props2 = node.props) === null || _node$props2 === void 0 ? void 0 : _node$props2.minPresenceAhead; }; var defaultPresenceAhead = function defaultPresenceAhead(element) { return function (height) { return Math.min(element.box.height, height); }; }; var getPresenceAhead = function getPresenceAhead(elements, height) { var result = 0; for (var i = 0; i < elements.length; i += 1) { var element = elements[i]; if (!element.box) continue; var isElementInside = height > element.box.top; var presenceAhead = element.props.presenceAhead || defaultPresenceAhead(element); if (element && isElementInside) { result += presenceAhead(height - element.box.top); } } return result; }; var shouldBreak = function shouldBreak( child, futureElements, height ) { var minPresenceAhead = getMinPresenceAhead(child); var presenceAhead = getPresenceAhead(futureElements, height); var futureHeight = getNodesHeight(futureElements); var shouldSplit = height < child.box.top + child.box.height; var shouldWrap = getWrap(child); return ( getBreak(child) || (!shouldWrap && shouldSplit) || (minPresenceAhead < futureHeight && presenceAhead < minPresenceAhead) ); }; var IGNORABLE_CODEPOINTS = [ 8232, // LINE_SEPARATOR 8233, // PARAGRAPH_SEPARATOR ]; var buildSubsetForFont = function buildSubsetForFont(font) { return IGNORABLE_CODEPOINTS.reduce(function (acc, codePoint) { if ( font && font.hasGlyphForCodePoint && font.hasGlyphForCodePoint(codePoint) ) { return acc; } return [].concat(acc, [String.fromCharCode(codePoint)]); }, []); }; var ignoreChars = function ignoreChars(fragments) { return fragments.map(function (fragment) { var charSubset = buildSubsetForFont( fragment.attributes.font ); var subsetRegex = new RegExp(charSubset.join("|")); return { string: fragment.string.replace(subsetRegex, ""), attributes: fragment.attributes, }; }); }; var PREPROCESSORS = [ignoreChars, embedEmojis]; var isImage$1 = function isImage(node) { return node.type === P__namespace.Image; }; var isTextInstance$2 = function isTextInstance(node) { return node.type === P__namespace.TextInstance; }; /** * Get textkit fragments of given node object * * @param {Object} font store * @param {Object} instance node * @returns {Array} text fragments */ var getFragments = function getFragments( fontStore, instance, parentLink, level ) { var _instance$props, _instance$props2; if (level === void 0) { level = 0; } if (!instance) return [ { string: "", }, ]; var fragments = []; var _instance$style = instance.style, _instance$style$color = _instance$style.color, color = _instance$style$color === void 0 ? "black" : _instance$style$color, _instance$style$fontF = _instance$style.fontFamily, fontFamily = _instance$style$fontF === void 0 ? "Helvetica" : _instance$style$fontF, fontWeight = _instance$style.fontWeight, fontStyle = _instance$style.fontStyle, _instance$style$fontS = _instance$style.fontSize, fontSize = _instance$style$fontS === void 0 ? 18 : _instance$style$fontS, _instance$style$textA = _instance$style.textAlign, textAlign = _instance$style$textA === void 0 ? "left" : _instance$style$textA, lineHeight = _instance$style.lineHeight, textDecoration = _instance$style.textDecoration, textDecorationColor = _instance$style.textDecorationColor, textDecorationStyle = _instance$style.textDecorationStyle, textTransform = _instance$style.textTransform, letterSpacing = _instance$style.letterSpacing, textIndent = _instance$style.textIndent, opacity = _instance$style.opacity; var opts = { fontFamily: fontFamily, fontWeight: fontWeight, fontStyle: fontStyle, }; var obj = fontStore ? fontStore.getFont(opts) : null; var font = obj ? obj.data : fontFamily; // Don't pass main background color to textkit. Will be rendered by the render package instead var backgroundColor = level === 0 ? null : instance.style.backgroundColor; var attributes = { font: font, color: color, opacity: opacity, fontSize: fontSize, backgroundColor: backgroundColor, align: textAlign, indent: textIndent, characterSpacing: letterSpacing, strikeStyle: textDecorationStyle, underlineStyle: textDecorationStyle, underline: textDecoration === "underline" || textDecoration === "underline line-through" || textDecoration === "line-through underline", strike: textDecoration === "line-through" || textDecoration === "underline line-through" || textDecoration === "line-through underline", strikeColor: textDecorationColor || color, underlineColor: textDecorationColor || color, link: parentLink || ((_instance$props = instance.props) === null || _instance$props === void 0 ? void 0 : _instance$props.src) || ((_instance$props2 = instance.props) === null || _instance$props2 === void 0 ? void 0 : _instance$props2.href), lineHeight: lineHeight ? lineHeight * fontSize : null, }; for (var i = 0; i < instance.children.length; i += 1) { var child = instance.children[i]; if (isImage$1(child)) { fragments.push({ string: String.fromCharCode(0xfffc), attributes: _extends__default["default"]( {}, attributes, { attachment: { width: child.style.width || fontSize, height: child.style.height || fontSize, image: child.image.data, }, } ), }); } else if (isTextInstance$2(child)) { fragments.push({ string: transformText(child.value, textTransform), attributes: attributes, }); } else if (child) { var _fragments; (_fragments = fragments).push.apply( _fragments, getFragments( fontStore, child, attributes.link, level + 1 ) ); } } for (var _i = 0; _i < PREPROCESSORS.length; _i += 1) { var preprocessor = PREPROCESSORS[_i]; fragments = preprocessor(fragments); } return fragments; }; /** * Get textkit attributed string from text node * * @param {Object} font store * @param {Object} instance node * @returns {Object} attributed string */ var getAttributedString = function getAttributedString( fontStore, instance ) { var fragments = getFragments(fontStore, instance); return fromFragments__default["default"](fragments); }; var engines = { linebreaker: linebreaker__default["default"], justification: justification__default["default"], textDecoration: decorationEngine__default["default"], scriptItemizer: scriptItemizer__default["default"], wordHyphenation: wordHyphenation__default["default"], fontSubstitution: fontSubstitution, }; var engine = layoutEngine__default["default"](engines); var getMaxLines = function getMaxLines(node) { var _node$style; return (_node$style = node.style) === null || _node$style === void 0 ? void 0 : _node$style.maxLines; }; var getTextOverflow = function getTextOverflow(node) { var _node$style2; return (_node$style2 = node.style) === null || _node$style2 === void 0 ? void 0 : _node$style2.textOverflow; }; /** * Get layout container for specific text node * * @param {Number} width * @param {Number} height * @param {Object} node * @returns {Object} layout container */ var getContainer = function getContainer(width, height, node) { var maxLines = getMaxLines(node); var textOverflow = getTextOverflow(node); return { x: 0, y: 0, width: width, maxLines: maxLines, height: height || Infinity, truncateMode: textOverflow, }; }; /** * Get text layout options for specific text node * * @param {Object} node instance * @returns {Object} layout options */ var getLayoutOptions = function getLayoutOptions(fontStore, node) { return { hyphenationPenalty: node.props.hyphenationPenalty, shrinkWhitespaceFactor: { before: -0.5, after: -0.5, }, hyphenationCallback: node.props.hyphenationCallback || (fontStore === null || fontStore === void 0 ? void 0 : fontStore.getHyphenationCallback()) || null, }; }; /** * Get text lines for given node * * @param {Object} node * @param {Number} container width * @param {Number} container height * @param {Number} fontStore font store * @returns {Array} layout lines */ var layoutText = function layoutText( node, width, height, fontStore ) { var attributedString = getAttributedString(fontStore, node); var container = getContainer(width, height, node); var options = getLayoutOptions(fontStore, node); var lines = engine(attributedString, container, options); return lines.reduce(function (acc, line) { return [].concat(acc, line); }, []); }; var isType$2 = function isType(type) { return function (node) { return node.type === type; }; }; var isSvg$2 = isType$2(P__namespace.Svg); var isText$3 = isType$2(P__namespace.Text); var shouldIterate = function shouldIterate(node) { return !isSvg$2(node) && !isText$3(node); }; var shouldLayoutText = function shouldLayoutText(node) { return isText$3(node) && !node.lines; }; /** * Performs text layout on text node if wasn't calculated before. * Text layout is usually performed on Yoga's layout process (via setMeasureFunc), * but we need to layout those nodes with fixed width and height. * * @param {Object} node * @returns {Object} layout node */ var resolveTextLayout = function resolveTextLayout( node, fontStore ) { if (shouldLayoutText(node)) { var width = node.box.width - (node.box.paddingRight + node.box.paddingLeft); var height = node.box.height - (node.box.paddingTop + node.box.paddingBottom); // eslint-disable-next-line no-param-reassign node.lines = layoutText(node, width, height, fontStore); } if (shouldIterate(node)) { if (!node.children) return node; var mapChild = function mapChild(child) { return resolveTextLayout(child, fontStore); }; var children = node.children.map(mapChild); return Object.assign({}, node, { children: children, }); } return node; }; var INHERITED_PROPERTIES = [ "color", "fontFamily", "fontSize", "fontStyle", "fontWeight", "letterSpacing", "opacity", "textDecoration", "textTransform", "lineHeight", "textAlign", "visibility", "wordSpacing", ]; var isSvg$1 = function isSvg(node) { return node.type === P__namespace.Svg; }; // Merge style values var mergeValues = function mergeValues( styleName, value, inheritedValue ) { switch (styleName) { case "textDecoration": { // merge not none and not false textDecoration values to one rule return [inheritedValue, value] .filter(function (v) { return v && v !== "none"; }) .join(" "); } default: return value; } }; // Merge inherited and node styles var merge = function merge(inheritedStyles, style) { var mergedStyles = _extends__default["default"]( {}, inheritedStyles ); Object.entries(style).forEach(function (_ref) { var styleName = _ref[0], value = _ref[1]; mergedStyles[styleName] = mergeValues( styleName, value, inheritedStyles[styleName] ); }); return mergedStyles; }; /** * Merges styles with node * * @param {Object} style object * @param {Object} node * @returns {Object} node with styles merged */ var mergeStyles = function mergeStyles(inheritedStyles) { return function (node) { var style = merge(inheritedStyles, node.style || {}); return Object.assign({}, node, { style: style, }); }; }; /** * Inherit style values from the root to the leafs * * @param {Object} document root * @returns {Object} document root with inheritance * */ var resolveInheritance = function resolveInheritance(node) { if (isSvg$1(node)) return node; if (!node.children) return node; var inheritStyles = fns.pick( INHERITED_PROPERTIES, node.style || {} ); var resolveChild = fns.compose( resolveInheritance, mergeStyles(inheritStyles) ); var children = node.children.map(resolveChild); return Object.assign({}, node, { children: children, }); }; var getComputedMargin = function getComputedMargin(node, edge) { var yogaNode = node._yogaNode; return yogaNode ? yogaNode.getComputedMargin(edge) : null; }; /** * Get Yoga computed magins. Zero otherwise * * @param {Object} node * @return {Object} margins */ var getMargin = function getMargin(node) { var style = node.style, box = node.box; var marginTop = getComputedMargin( node, Yoga__default["default"].EDGE_TOP ) || (box === null || box === void 0 ? void 0 : box.marginTop) || (style === null || style === void 0 ? void 0 : style.marginTop) || (style === null || style === void 0 ? void 0 : style.marginVertical) || (style === null || style === void 0 ? void 0 : style.margin) || 0; var marginRight = getComputedMargin( node, Yoga__default["default"].EDGE_RIGHT ) || (box === null || box === void 0 ? void 0 : box.marginRight) || (style === null || style === void 0 ? void 0 : style.marginRight) || (style === null || style === void 0 ? void 0 : style.marginHorizontal) || (style === null || style === void 0 ? void 0 : style.margin) || 0; var marginBottom = getComputedMargin( node, Yoga__default["default"].EDGE_BOTTOM ) || (box === null || box === void 0 ? void 0 : box.marginBottom) || (style === null || style === void 0 ? void 0 : style.marginBottom) || (style === null || style === void 0 ? void 0 : style.marginVertical) || (style === null || style === void 0 ? void 0 : style.margin) || 0; var marginLeft = getComputedMargin( node, Yoga__default["default"].EDGE_LEFT ) || (box === null || box === void 0 ? void 0 : box.marginLeft) || (style === null || style === void 0 ? void 0 : style.marginLeft) || (style === null || style === void 0 ? void 0 : style.marginHorizontal) || (style === null || style === void 0 ? void 0 : style.margin) || 0; return { marginTop: marginTop, marginRight: marginRight, marginBottom: marginBottom, marginLeft: marginLeft, }; }; /** * Get Yoga computed position. Zero otherwise * * @param {Object} node * @return {Object} position */ var getPosition = function getPosition(node) { var yogaNode = node._yogaNode; return { top: (yogaNode === null || yogaNode === void 0 ? void 0 : yogaNode.getComputedTop()) || 0, right: (yogaNode === null || yogaNode === void 0 ? void 0 : yogaNode.getComputedRight()) || 0, bottom: (yogaNode === null || yogaNode === void 0 ? void 0 : yogaNode.getComputedBottom()) || 0, left: (yogaNode === null || yogaNode === void 0 ? void 0 : yogaNode.getComputedLeft()) || 0, }; }; var DEFAULT_DIMENSION = { width: 0, height: 0, }; /** * Get Yoga computed dimensions. Zero otherwise * * @param {Object} node * @return {Object} dimensions */ var getDimension = function getDimension(node) { var yogaNode = node._yogaNode; if (!yogaNode) return DEFAULT_DIMENSION; return { width: yogaNode.getComputedWidth(), height: yogaNode.getComputedHeight(), }; }; var getComputedBorder = function getComputedBorder(yogaNode, edge) { return yogaNode ? yogaNode.getComputedBorder(edge) : 0; }; /** * Get Yoga computed border width. Zero otherwise * * @param {Object} node * @return {Object} border widths */ var getBorderWidth = function getBorderWidth(node) { var yogaNode = node._yogaNode; return { borderTopWidth: getComputedBorder( yogaNode, Yoga__default["default"].EDGE_TOP ), borderRightWidth: getComputedBorder( yogaNode, Yoga__default["default"].EDGE_RIGHT ), borderBottomWidth: getComputedBorder( yogaNode, Yoga__default["default"].EDGE_BOTTOM ), borderLeftWidth: getComputedBorder( yogaNode, Yoga__default["default"].EDGE_LEFT ), }; }; /** * Set display attribute to node's Yoga instance * * @param {String} display * @param {Object} node instance * @return {Object} node instance */ var setDisplay = function setDisplay(value) { return function (node) { var yogaNode = node._yogaNode; if (yogaNode) { yogaNode.setDisplay( value === "none" ? Yoga__default["default"].DISPLAY_NONE : Yoga__default["default"].DISPLAY_FLEX ); } return node; }; }; var OVERFLOW = { hidden: Yoga__default["default"].OVERFLOW_HIDDEN, scroll: Yoga__default["default"].OVERFLOW_SCROLL, }; /** * Set overflow attribute to node's Yoga instance * * @param {String} overflow value * @param {Object} node instance * @return {Object} node instance */ var setOverflow = function setOverflow(value) { return function (node) { var yogaNode = node._yogaNode; if (!fns.isNil(value) && yogaNode) { var overflow = OVERFLOW[value] || Yoga__default["default"].OVERFLOW_VISIBLE; yogaNode.setOverflow(overflow); } return node; }; }; var FLEX_WRAP = { wrap: Yoga__default["default"].WRAP_WRAP, "wrap-reverse": Yoga__default["default"].WRAP_WRAP_REVERSE, }; /** * Set flex wrap attribute to node's Yoga instance * * @param {String} flex wrap value * @param {Object} node instance * @return {Object} node instance */ var setFlexWrap = function setFlexWrap(value) { return function (node) { var yogaNode = node._yogaNode; if (yogaNode) { var flexWrap = FLEX_WRAP[value] || Yoga__default["default"].WRAP_NO_WRAP; yogaNode.setFlexWrap(flexWrap); } return node; }; }; /* eslint-disable no-unused-expressions */ /** * Set generic yoga attribute to node's Yoga instance, handing `auto`, edges and percentage cases * * @param {String} property * @param {Number} edge * @param {any} value * @param {Object} node instance * @return {Object} node instance */ var setYogaValue = function setYogaValue(attr, edge) { return function (value) { return function (node) { var yogaNode = node._yogaNode; if (!fns.isNil(value) && yogaNode) { var hasEdge = !fns.isNil(edge); var fixedMethod = "set" + fns.upperFirst(attr); var autoMethod = fixedMethod + "Auto"; var percentMethod = fixedMethod + "Percent"; var percent = fns.matchPercent(value); if (percent && !yogaNode[percentMethod]) { throw new Error( "You can't pass percentage values to " + attr + " property" ); } if (percent) { if (hasEdge) { var _yogaNode$percentMeth; (_yogaNode$percentMeth = yogaNode[percentMethod]) === null || _yogaNode$percentMeth === void 0 ? void 0 : _yogaNode$percentMeth.call( yogaNode, edge, percent.value ); } else { var _yogaNode$percentMeth2; (_yogaNode$percentMeth2 = yogaNode[percentMethod]) === null || _yogaNode$percentMeth2 === void 0 ? void 0 : _yogaNode$percentMeth2.call( yogaNode, percent.value ); } } else if (value === "auto") { if (hasEdge) { var _yogaNode$autoMethod; (_yogaNode$autoMethod = yogaNode[autoMethod]) === null || _yogaNode$autoMethod === void 0 ? void 0 : _yogaNode$autoMethod.call( yogaNode, edge ); } else if (attr === "flexBasis") { // YogaNode.setFlexBasisAuto is missing (#766) yogaNode.setFlexBasis( Yoga__default["default"].UNIT_AUTO ); } else { var _yogaNode$autoMethod2; (_yogaNode$autoMethod2 = yogaNode[autoMethod]) === null || _yogaNode$autoMethod2 === void 0 ? void 0 : _yogaNode$autoMethod2.call(yogaNode); } } else if (hasEdge) { var _yogaNode$fixedMethod; (_yogaNode$fixedMethod = yogaNode[fixedMethod]) === null || _yogaNode$fixedMethod === void 0 ? void 0 : _yogaNode$fixedMethod.call( yogaNode, edge, value ); } else { var _yogaNode$fixedMethod2; (_yogaNode$fixedMethod2 = yogaNode[fixedMethod]) === null || _yogaNode$fixedMethod2 === void 0 ? void 0 : _yogaNode$fixedMethod2.call( yogaNode, value ); } } return node; }; }; }; /** * Set flex grow attribute to node's Yoga instance * * @param {Number} flex grow value * @param {Object} node instance * @return {Object} node instance */ var setFlexGrow = function setFlexGrow(value) { return function (node) { return setYogaValue("flexGrow")(value || 0)(node); }; }; /** * Set flex basis attribute to node's Yoga instance * * @param {Number} flex basis value * @param {Object} node instance * @return {Object} node instance */ var setFlexBasis = setYogaValue("flexBasis"); var ALIGN = { "flex-start": Yoga__default["default"].ALIGN_FLEX_START, center: Yoga__default["default"].ALIGN_CENTER, "flex-end": Yoga__default["default"].ALIGN_FLEX_END, stretch: Yoga__default["default"].ALIGN_STRETCH, baseline: Yoga__default["default"].ALIGN_BASELINE, "space-between": Yoga__default["default"].ALIGN_SPACE_BETWEEN, "space-around": Yoga__default["default"].ALIGN_SPACE_AROUND, }; /** * Set generic align attribute to node's Yoga instance * * @param {String} specific align property * @param {String} align value * @param {Object} node instance * @return {Object} node instance */ var setAlign = function setAlign(attr) { return function (value) { return function (node) { var yogaNode = node._yogaNode; var defaultValue = attr === "items" ? Yoga__default["default"].ALIGN_STRETCH : Yoga__default["default"].ALIGN_AUTO; if (yogaNode) { var align = ALIGN[value] || defaultValue; yogaNode["setAlign" + fns.upperFirst(attr)](align); } return node; }; }; }; /** * Set align self attribute to node's Yoga instance * * @param {String} align value * @param {Object} node instance * @return {Object} node instance */ var setAlignSelf = setAlign("self"); /** * Set align items attribute to node's Yoga instance * * @param {String} align value * @param {Object} node instance * @return {Object} node instance */ var setAlignItems = setAlign("items"); /** * Set flex shrink attribute to node's Yoga instance * * @param {Number} flex shrink value * @param {Object} node instance * @return {Object} node instance */ var setFlexShrink = function setFlexShrink(value) { return function (node) { return setYogaValue("flexShrink")(value || 1)(node); }; }; /** * Set aspect ratio attribute to node's Yoga instance * * @param {Number} ratio * @param {Object} node instance * @return {Object} node instance */ var setAspectRatio = function setAspectRatio(value) { return function (node) { var yogaNode = node._yogaNode; if (!fns.isNil(value) && yogaNode) { yogaNode.setAspectRatio(value); } return node; }; }; /** * Set align content attribute to node's Yoga instance * * @param {String} align value * @param {Object} node instance * @return {Object} node instance */ var setAlignContent = setAlign("content"); /** * Set position type attribute to node's Yoga instance * * @param {String} position type * @param {Object} node instance * @return {Object} node instance */ var setPositionType = function setPositionType(value) { return function (node) { var yogaNode = node._yogaNode; if (!fns.isNil(value) && yogaNode) { yogaNode.setPositionType( value === "absolute" ? Yoga__default["default"] .POSITION_TYPE_ABSOLUTE : Yoga__default["default"] .POSITION_TYPE_RELATIVE ); } return node; }; }; var FLEX_DIRECTIONS = { row: Yoga__default["default"].FLEX_DIRECTION_ROW, "row-reverse": Yoga__default["default"].FLEX_DIRECTION_ROW_REVERSE, "column-reverse": Yoga__default["default"].FLEX_DIRECTION_COLUMN_REVERSE, }; /** * Set flex direction attribute to node's Yoga instance * * @param {String} flex direction value * @param {Object} node instance * @return {Object} node instance */ var setFlexDirection = function setFlexDirection(value) { return function (node) { var yogaNode = node._yogaNode; if (yogaNode) { var flexDirection = FLEX_DIRECTIONS[value] || Yoga__default["default"].FLEX_DIRECTION_COLUMN; yogaNode.setFlexDirection(flexDirection); } return node; }; }; var JUSTIFY_CONTENT = { center: Yoga__default["default"].JUSTIFY_CENTER, "flex-end": Yoga__default["default"].JUSTIFY_FLEX_END, "space-between": Yoga__default["default"].JUSTIFY_SPACE_BETWEEN, "space-around": Yoga__default["default"].JUSTIFY_SPACE_AROUND, "space-evenly": Yoga__default["default"].JUSTIFY_SPACE_EVENLY, }; /** * Set justify content attribute to node's Yoga instance * * @param {String} justify content value * @param {Object} node instance * @return {Object} node instance */ var setJustifyContent = function setJustifyContent(value) { return function (node) { var yogaNode = node._yogaNode; if (!fns.isNil(value) && yogaNode) { var justifyContent = JUSTIFY_CONTENT[value] || Yoga__default["default"].JUSTIFY_FLEX_START; yogaNode.setJustifyContent(justifyContent); } return node; }; }; /** * Set margin top attribute to node's Yoga instance * * @param {Number} margin top * @param {Object} node instance * @return {Object} node instance */ var setMarginTop = setYogaValue( "margin", Yoga__default["default"].EDGE_TOP ); /** * Set margin right attribute to node's Yoga instance * * @param {Number} margin right * @param {Object} node instance * @return {Object} node instance */ var setMarginRight = setYogaValue( "margin", Yoga__default["default"].EDGE_RIGHT ); /** * Set margin bottom attribute to node's Yoga instance * * @param {Number} margin bottom * @param {Object} node instance * @return {Object} node instance */ var setMarginBottom = setYogaValue( "margin", Yoga__default["default"].EDGE_BOTTOM ); /** * Set margin left attribute to node's Yoga instance * * @param {Number} margin left * @param {Object} node instance * @return {Object} node instance */ var setMarginLeft = setYogaValue( "margin", Yoga__default["default"].EDGE_LEFT ); /** * Set padding top attribute to node's Yoga instance * * @param {Number} padding top * @param {Object} node instance * @return {Object} node instance */ var setPaddingTop = setYogaValue( "padding", Yoga__default["default"].EDGE_TOP ); /** * Set padding right attribute to node's Yoga instance * * @param {Number} padding right * @param {Object} node instance * @return {Object} node instance */ var setPaddingRight = setYogaValue( "padding", Yoga__default["default"].EDGE_RIGHT ); /** * Set padding bottom attribute to node's Yoga instance * * @param {Number} padding bottom * @param {Object} node instance * @return {Object} node instance */ var setPaddingBottom = setYogaValue( "padding", Yoga__default["default"].EDGE_BOTTOM ); /** * Set padding left attribute to node's Yoga instance * * @param {Number} padding left * @param {Object} node instance * @return {Object} node instance */ var setPaddingLeft = setYogaValue( "padding", Yoga__default["default"].EDGE_LEFT ); /** * Set border top attribute to node's Yoga instance * * @param {Number} border top width * @param {Object} node instance * @return {Object} node instance */ var setBorderTop = setYogaValue( "border", Yoga__default["default"].EDGE_TOP ); /** * Set border right attribute to node's Yoga instance * * @param {Number} border right width * @param {Object} node instance * @return {Object} node instance */ var setBorderRight = setYogaValue( "border", Yoga__default["default"].EDGE_RIGHT ); /** * Set border bottom attribute to node's Yoga instance * * @param {Number} border bottom width * @param {Object} node instance * @return {Object} node instance */ var setBorderBottom = setYogaValue( "border", Yoga__default["default"].EDGE_BOTTOM ); /** * Set border left attribute to node's Yoga instance * * @param {Number} border left width * @param {Object} node instance * @return {Object} node instance */ var setBorderLeft = setYogaValue( "border", Yoga__default["default"].EDGE_LEFT ); /** * Set position top attribute to node's Yoga instance * * @param {Number} position top * @param {Object} node instance * @return {Object} node instance */ var setPositionTop = setYogaValue( "position", Yoga__default["default"].EDGE_TOP ); /** * Set position right attribute to node's Yoga instance * * @param {Number} position right * @param {Object} node instance * @return {Object} node instance */ var setPositionRight = setYogaValue( "position", Yoga__default["default"].EDGE_RIGHT ); /** * Set position bottom attribute to node's Yoga instance * * @param {Number} position bottom * @param {Object} node instance * @return {Object} node instance */ var setPositionBottom = setYogaValue( "position", Yoga__default["default"].EDGE_BOTTOM ); /** * Set position left attribute to node's Yoga instance * * @param {Number} position left * @param {Object} node instance * @return {Object} node instance */ var setPositionLeft = setYogaValue( "position", Yoga__default["default"].EDGE_LEFT ); /** * Set width to node's Yoga instance * * @param {Number} width * @param {Object} node instance * @return {Object} node instance */ var setWidth = setYogaValue("width"); /** * Set min width to node's Yoga instance * * @param {Number} min width * @param {Object} node instance * @return {Object} node instance */ var setMinWidth = setYogaValue("minWidth"); /** * Set max width to node's Yoga instance * * @param {Number} max width * @param {Object} node instance * @return {Object} node instance */ var setMaxWidth = setYogaValue("maxWidth"); /** * Set height to node's Yoga instance * * @param {Number} height * @param {Object} node instance * @return {Object} node instance */ var setHeight = setYogaValue("height"); /** * Set min height to node's Yoga instance * * @param {Number} min height * @param {Object} node instance * @return {Object} node instance */ var setMinHeight = setYogaValue("minHeight"); /** * Set max height to node's Yoga instance * * @param {Number} max height * @param {Object} node instance * @return {Object} node instance */ var setMaxHeight = setYogaValue("maxHeight"); var getAspectRatio = function getAspectRatio(viewbox) { if (!viewbox) return null; return ( (viewbox.maxX - viewbox.minX) / (viewbox.maxY - viewbox.minY) ); }; /** * Yoga svg measure function * * @param {Object} page * @param {Object} node * @param {Number} width * @param {Number} widthMode * @param {Number} height * @param {Number} heightMode * @returns {Object} canvas width and height */ var measureCanvas$1 = function measureCanvas(page, node) { return function (width, widthMode, height, heightMode) { var aspectRatio = getAspectRatio(node.props.viewBox) || 1; if ( widthMode === Yoga__default["default"].MEASURE_MODE_EXACTLY || widthMode === Yoga__default["default"].MEASURE_MODE_AT_MOST ) { return { width: width, height: width / aspectRatio, }; } if ( heightMode === Yoga__default["default"].MEASURE_MODE_EXACTLY ) { return { width: height * aspectRatio, }; } return {}; }; }; /** * Get lines width (if any) * * @param {Object} node * @returns {Number} lines width */ var linesWidth = function linesWidth(node) { if (!node.lines) return 0; return Math.max.apply( Math, [0].concat( node.lines.map(function (line) { return advanceWidth__default["default"](line); }) ) ); }; /** * Get lines height (if any) * * @param {Object} node * @returns {Number} lines height */ var linesHeight = function linesHeight(node) { if (!node.lines) return -1; return node.lines.reduce(function (acc, line) { return acc + line.box.height; }, 0); }; /* eslint-disable no-param-reassign */ var ALIGNMENT_FACTORS = { center: 0.5, right: 1, }; /** * Yoga text measure function * * @param {Object} page * @param {Object} node * @param {Number} width * @param {Number} widthMode * @param {Number} height * @param {Number} heightMode * @returns {Object} text width and height */ var measureText = function measureText(page, node, fontStore) { return function (width, widthMode, height) { if ( widthMode === Yoga__default["default"].MEASURE_MODE_EXACTLY ) { if (!node.lines) node.lines = layoutText( node, width, height, fontStore ); return { height: linesHeight(node), }; } if ( widthMode === Yoga__default["default"].MEASURE_MODE_AT_MOST ) { var _node$style; var alignFactor = ALIGNMENT_FACTORS[ (_node$style = node.style) === null || _node$style === void 0 ? void 0 : _node$style.textAlign ] || 0; if (!node.lines) { node.lines = layoutText( node, width, height, fontStore ); node.alignOffset = (width - linesWidth(node)) * alignFactor; // Compensate align in variable width containers } return { height: linesHeight(node), width: Math.min(width, linesWidth(node)), }; } return {}; }; }; /** * Get image ratio * * @param {Object} image node * @returns {Number} image ratio */ var getRatio = function getRatio(node) { var _node$image; return (_node$image = node.image) !== null && _node$image !== void 0 && _node$image.data ? node.image.width / node.image.height : 1; }; /** * Checks if page has auto height * * @param {Object} page * @returns {Boolean} is page height auto */ var isHeightAuto = function isHeightAuto(page) { var _page$box; return fns.isNil( (_page$box = page.box) === null || _page$box === void 0 ? void 0 : _page$box.height ); }; var SAFETY_HEIGHT$1 = 10; /** * Yoga image measure function * * @param {Object} page * @param {Object} node * @param {Number} width * @param {Number} widthMode * @param {Number} height * @param {Number} heightMode * @returns {Object} image width and height */ var measureImage = function measureImage(page, node) { return function (width, widthMode, height, heightMode) { var imageRatio = getRatio(node); var imageMargin = getMargin(node); var pagePadding = getPadding(page); var pageArea = isHeightAuto(page) ? Infinity : page.box.height - pagePadding.paddingTop - pagePadding.paddingBottom - imageMargin.marginTop - imageMargin.marginBottom - SAFETY_HEIGHT$1; // Skip measure if image data not present yet if (!node.image) return { width: 0, height: 0, }; if ( widthMode === Yoga__default["default"].MEASURE_MODE_EXACTLY && heightMode === Yoga__default["default"].MEASURE_MODE_UNDEFINED ) { var scaledHeight = width / imageRatio; return { height: Math.min(pageArea, scaledHeight), }; } if ( heightMode === Yoga__default["default"].MEASURE_MODE_EXACTLY && (widthMode === Yoga__default["default"].MEASURE_MODE_AT_MOST || widthMode === Yoga__default["default"].MEASURE_MODE_UNDEFINED) ) { return { width: Math.min(height * imageRatio, width), }; } if ( widthMode === Yoga__default["default"].MEASURE_MODE_EXACTLY && heightMode === Yoga__default["default"].MEASURE_MODE_AT_MOST ) { var _scaledHeight = width / imageRatio; return { height: Math.min(height, pageArea, _scaledHeight), }; } if ( widthMode === Yoga__default["default"].MEASURE_MODE_AT_MOST && heightMode === Yoga__default["default"].MEASURE_MODE_AT_MOST ) { if (imageRatio > 1) { return { width: width, height: Math.min(width / imageRatio, height), }; } return { height: height, width: Math.min(height * imageRatio, width), }; } return { height: height, width: width, }; }; }; /* eslint-disable no-param-reassign */ var SAFETY_HEIGHT = 10; var getMax = function getMax(values) { return Math.max.apply(Math, [-Infinity].concat(values)); }; /** * Helper object to predict canvas size * TODO: Implement remaining functions (as close as possible); */ var measureCtx = function measureCtx() { var ctx = {}; var points = []; var nil = function nil() { return ctx; }; var addPoint = function addPoint(x, y) { return points.push([x, y]); }; var moveTo = function moveTo() { addPoint.apply(void 0, arguments); return ctx; }; var rect = function rect(x, y, w, h) { addPoint(x, y); addPoint(x + w, y); addPoint(x, y + h); addPoint(x + w, y + h); return ctx; }; var ellipse = function ellipse(x, y, rx, ry) { ry = ry || rx; addPoint(x - rx, y - ry); addPoint(x + rx, y - ry); addPoint(x + rx, y + ry); addPoint(x - rx, y + ry); return ctx; }; var polygon = function polygon() { points.push.apply(points, arguments); return ctx; }; // Change dimensions ctx.rect = rect; ctx.moveTo = moveTo; ctx.lineTo = moveTo; ctx.circle = ellipse; ctx.polygon = polygon; ctx.ellipse = ellipse; ctx.roundedRect = rect; // To be implemented ctx.text = nil; ctx.path = nil; ctx.lineWidth = nil; ctx.bezierCurveTo = nil; ctx.quadraticCurveTo = nil; ctx.scale = nil; ctx.rotate = nil; ctx.translate = nil; // These don't change dimensions ctx.dash = nil; ctx.clip = nil; ctx.save = nil; ctx.fill = nil; ctx.font = nil; ctx.stroke = nil; ctx.lineCap = nil; ctx.opacity = nil; ctx.restore = nil; ctx.lineJoin = nil; ctx.fontSize = nil; ctx.fillColor = nil; ctx.miterLimit = nil; ctx.strokeColor = nil; ctx.fillOpacity = nil; ctx.strokeOpacity = nil; ctx.linearGradient = nil; ctx.radialGradient = nil; ctx.getWidth = function () { return getMax( points.map(function (p) { return p[0]; }) ); }; ctx.getHeight = function () { return getMax( points.map(function (p) { return p[1]; }) ); }; return ctx; }; /** * Yoga canvas measure function * * @param {Object} page * @param {Object} node * @param {Number} width * @param {Number} widthMode * @param {Number} height * @param {Number} heightMode * @returns {Object} canvas width and height */ var measureCanvas = function measureCanvas(page, node) { return function () { var imageMargin = getMargin(node); var pagePadding = getPadding(page); var pageArea = isHeightAuto(page) ? Infinity : page.box.height - pagePadding.paddingTop - pagePadding.paddingBottom - imageMargin.marginTop - imageMargin.marginBottom - SAFETY_HEIGHT; var ctx = measureCtx(); node.props.paint(ctx); var width = ctx.getWidth(); var height = Math.min(pageArea, ctx.getHeight()); return { height: height, width: width, }; }; }; var YOGA_NODE = "_yogaNode"; var YOGA_CONFIG = Yoga__default["default"].Config.create(); YOGA_CONFIG.setPointScaleFactor(0); var isType$1 = function isType(type) { return function (node) { return node.type === type; }; }; var isSvg = isType$1(P__namespace.Svg); var isText$2 = isType$1(P__namespace.Text); var isNote = isType$1(P__namespace.Note); var isPage = isType$1(P__namespace.Page); var isImage = isType$1(P__namespace.Image); var isCanvas = isType$1(P__namespace.Canvas); var isTextInstance$1 = isType$1(P__namespace.TextInstance); var setNodeHeight = function setNodeHeight(node) { var value = isPage(node) ? node.box.height : node.style.height; return setHeight(value); }; /** * Set styles valeus into yoga node before layout calculation * * @param {Object} node * @returns {Object} node */ var setYogaValues = function setYogaValues(node) { fns.compose( setNodeHeight(node), setWidth(node.style.width), setMinWidth(node.style.minWidth), setMaxWidth(node.style.maxWidth), setMinHeight(node.style.minHeight), setMaxHeight(node.style.maxHeight), setMarginTop(node.style.marginTop), setMarginRight(node.style.marginRight), setMarginBottom(node.style.marginBottom), setMarginLeft(node.style.marginLeft), setPaddingTop(node.style.paddingTop), setPaddingRight(node.style.paddingRight), setPaddingBottom(node.style.paddingBottom), setPaddingLeft(node.style.paddingLeft), setPositionType(node.style.position), setPositionTop(node.style.top), setPositionRight(node.style.right), setPositionBottom(node.style.bottom), setPositionLeft(node.style.left), setBorderTop(node.style.borderTopWidth), setBorderRight(node.style.borderRightWidth), setBorderBottom(node.style.borderBottomWidth), setBorderLeft(node.style.borderLeftWidth), setDisplay(node.style.display), setFlexDirection(node.style.flexDirection), setAlignSelf(node.style.alignSelf), setAlignContent(node.style.alignContent), setAlignItems(node.style.alignItems), setJustifyContent(node.style.justifyContent), setFlexWrap(node.style.flexWrap), setOverflow(node.style.overflow), setAspectRatio(node.style.aspectRatio), setFlexBasis(node.style.flexBasis), setFlexGrow(node.style.flexGrow), setFlexShrink(node.style.flexShrink) )(node); }; /** * Inserts child into parent' yoga node * * @param {Object} parent * @param {Object} node * @param {Object} node */ var insertYogaNodes = function insertYogaNodes(parent) { return function (child) { parent.insertChild( child[YOGA_NODE], parent.getChildCount() ); return child; }; }; var setMeasureFunc = function setMeasureFunc( node, page, fontStore ) { var yogaNode = node[YOGA_NODE]; if (isText$2(node)) { yogaNode.setMeasureFunc(measureText(page, node, fontStore)); } if (isImage(node)) { yogaNode.setMeasureFunc(measureImage(page, node)); } if (isCanvas(node)) { yogaNode.setMeasureFunc(measureCanvas(page, node)); } if (isSvg(node)) { yogaNode.setMeasureFunc(measureCanvas$1(page, node)); } return node; }; var isLayoutElement = function isLayoutElement(node) { return !isText$2(node) && !isNote(node) && !isSvg(node); }; /** * Creates and add yoga node to document tree * Handles measure function for text and image nodes * * @param {Object} node * @returns {Object} node with appended yoga node */ var createYogaNodes = function createYogaNodes(page, fontStore) { return function (node) { var yogaNode = Yoga__default["default"].Node.createWithConfig( YOGA_CONFIG ); var result = Object.assign({}, node); result[YOGA_NODE] = yogaNode; setYogaValues(result); if (isLayoutElement(node) && node.children) { var resolveChild = fns.compose( insertYogaNodes(yogaNode), createYogaNodes(page, fontStore) ); result.children = node.children.map(resolveChild); } setMeasureFunc(result, page, fontStore); return result; }; }; /** * Performs yoga calculation * * @param {Object} node * @returns {Object} node */ var calculateLayout = function calculateLayout(page) { page[YOGA_NODE].calculateLayout(); return page; }; /** * Saves Yoga layout result into 'box' attribute of node * * @param {Object} node * @returns {Object} node with box data */ var persistDimensions = function persistDimensions(node) { if (isTextInstance$1(node)) return node; var box = Object.assign( getPadding(node), getMargin(node), getBorderWidth(node), getPosition(node), getDimension(node) ); var newNode = Object.assign({}, node, { box: box, }); if (!node.children) return newNode; var children = node.children.map(persistDimensions); return Object.assign({}, newNode, { children: children, }); }; /** * Removes yoga node from document tree * * @param {Object} node * @returns {Object} node without yoga node */ var destroyYogaNodes = function destroyYogaNodes(node) { var newNode = Object.assign({}, node); delete newNode[YOGA_NODE]; if (!node.children) return newNode; var children = node.children.map(destroyYogaNodes); return Object.assign({}, newNode, { children: children, }); }; /** * Free yoga node from document tree * * @param {Object} node * @returns {Object} node without yoga node */ var freeYogaNodes = function freeYogaNodes(node) { if (node[YOGA_NODE]) node[YOGA_NODE].freeRecursive(); return node; }; /** * Calculates page object layout using Yoga. * Takes node values from 'box' and 'style' attributes, and persist them back into 'box' * Destroy yoga values at the end. * * @param {Object} page object * @returns {Object} page object with correct 'box' layout attributes */ var resolvePageDimensions = function resolvePageDimensions( page, fontStore ) { if (fns.isNil(page)) return null; return fns.compose( destroyYogaNodes, freeYogaNodes, persistDimensions, calculateLayout, createYogaNodes(page, fontStore) )(page); }; /** * Calculates root object layout using Yoga. * * @param {Object} root object * @returns {Object} root object with correct 'box' layout attributes */ var resolveDimensions = function resolveDimensions( node, fontStore ) { if (!node.children) return node; var resolveChild = function resolveChild(child) { return resolvePageDimensions(child, fontStore); }; var children = node.children.map(resolveChild); return Object.assign({}, node, { children: children, }); }; var isText$1 = function isText(node) { return node.type === P__namespace.Text; }; // Prevent splitting elements by low decimal numbers var SAFTY_THRESHOLD = 0.001; var assingChildren = function assingChildren(children, node) { return Object.assign({}, node, { children: children, }); }; var getTop = function getTop(node) { var _node$box; return ( ((_node$box = node.box) === null || _node$box === void 0 ? void 0 : _node$box.top) || 0 ); }; var allFixed = function allFixed(nodes) { return nodes.every(isFixed); }; var isDynamic = function isDynamic(node) { var _node$props; return !fns.isNil( (_node$props = node.props) === null || _node$props === void 0 ? void 0 : _node$props.render ); }; var relayoutPage = fns.compose( resolveTextLayout, resolveInheritance, resolvePageDimensions ); var warnUnavailableSpace = function warnUnavailableSpace(node) { console.warn( "Node of type " + node.type + " can't wrap between pages and it's bigger than available page height" ); }; var splitNodes = function splitNodes(height, contentArea, nodes) { var currentChildren = []; var nextChildren = []; for (var i = 0; i < nodes.length; i += 1) { var child = nodes[i]; var futureNodes = nodes.slice(i + 1); var futureFixedNodes = futureNodes.filter(isFixed); var nodeTop = getTop(child); var nodeHeight = child.box.height; var isOutside = height <= nodeTop; var shouldBreak$1 = shouldBreak(child, futureNodes, height); var shouldSplit = height + SAFTY_THRESHOLD < nodeTop + nodeHeight; var canWrap = getWrap(child); var fitsInsidePage = nodeHeight <= contentArea; if (isFixed(child)) { nextChildren.push(child); currentChildren.push(child); continue; } if (isOutside) { var box = Object.assign({}, child.box, { top: child.box.top - height, }); var next = Object.assign({}, child, { box: box, }); nextChildren.push(next); continue; } if (!fitsInsidePage && !canWrap) { currentChildren.push(child); nextChildren.push.apply(nextChildren, futureNodes); warnUnavailableSpace(child); break; } if (shouldBreak$1) { var _box = Object.assign({}, child.box, { top: child.box.top - height, }); var props = Object.assign({}, child.props, { wrap: true, break: false, }); var _next = Object.assign({}, child, { box: _box, props: props, }); currentChildren.push.apply( currentChildren, futureFixedNodes ); nextChildren.push.apply( nextChildren, [_next].concat(futureNodes) ); break; } if (shouldSplit) { var _split = split(child, height, contentArea), currentChild = _split[0], nextChild = _split[1]; if (currentChild) currentChildren.push(currentChild); if (nextChild) nextChildren.push(nextChild); continue; } currentChildren.push(child); } return [currentChildren, nextChildren]; }; var splitChildren = function splitChildren( height, contentArea, node ) { var children = node.children || []; var availableHeight = height - getTop(node); return splitNodes(availableHeight, contentArea, children); }; var splitView = function splitView(node, height, contentArea) { var _splitNode = splitNode(node, height), currentNode = _splitNode[0], nextNode = _splitNode[1]; var _splitChildren = splitChildren(height, contentArea, node), currentChilds = _splitChildren[0], nextChildren = _splitChildren[1]; return [ assingChildren(currentChilds, currentNode), assingChildren(nextChildren, nextNode), ]; }; var split = function split(node, height, contentArea) { return isText$1(node) ? splitText(node, height) : splitView(node, height, contentArea); }; var shouldResolveDynamicNodes = function shouldResolveDynamicNodes( node ) { var children = node.children || []; return ( isDynamic(node) || children.some(shouldResolveDynamicNodes) ); }; var resolveDynamicNodes = function resolveDynamicNodes( props, node ) { var isNodeDynamic = isDynamic(node); // Call render prop on dynamic nodes and append result to children var resolveChildren = function resolveChildren(children) { if (children === void 0) { children = []; } if (isNodeDynamic) { var res = node.props.render(props); return [createInstance(res)].filter(Boolean); } return children.map(function (c) { return resolveDynamicNodes(props, c); }); }; // We reset dynamic text box so it can be computed again later on var resetHeight = isNodeDynamic && isText$1(node); var box = resetHeight ? _extends__default["default"]({}, node.box, { height: 0, }) : node.box; var children = resolveChildren(node.children); var lines = isNodeDynamic ? null : node.lines; return Object.assign({}, node, { box: box, lines: lines, children: children, }); }; var resolveDynamicPage = function resolveDynamicPage( props, page, fontStore ) { if (shouldResolveDynamicNodes(page)) { var resolvedPage = resolveDynamicNodes(props, page); return relayoutPage(resolvedPage, fontStore); } return page; }; var splitPage = function splitPage(page, pageNumber, fontStore) { var wrapArea = getWrapArea(page); var contentArea = getContentArea(page); var dynamicPage = resolveDynamicPage( { pageNumber: pageNumber, }, page, fontStore ); var height = page.style.height; var _splitNodes = splitNodes( wrapArea, contentArea, dynamicPage.children ), currentChilds = _splitNodes[0], nextChilds = _splitNodes[1]; var relayout = function relayout(node) { return relayoutPage(node, fontStore); }; var currentBox = _extends__default["default"]({}, page.box, { height: height, }); var currentPage = relayout( Object.assign({}, page, { box: currentBox, children: currentChilds, }) ); if (nextChilds.length === 0 || allFixed(nextChilds)) return [currentPage, null]; var nextBox = fns.omit("height", page.box); var nextProps = fns.omit("bookmark", page.props); var nextPage = relayout( Object.assign({}, page, { props: nextProps, box: nextBox, children: nextChilds, }) ); return [currentPage, nextPage]; }; var resolvePageIndices = function resolvePageIndices( fontStore, page, pageNumber, pages ) { var totalPages = pages.length; var props = { totalPages: totalPages, pageNumber: pageNumber + 1, subPageNumber: page.subPageNumber + 1, subPageTotalPages: page.subPageTotalPages, }; return resolveDynamicPage(props, page, fontStore); }; var assocSubPageData = function assocSubPageData(subpages) { return subpages.map(function (page, i) { return _extends__default["default"]({}, page, { subPageNumber: i, subPageTotalPages: subpages.length, }); }); }; var dissocSubPageData = function dissocSubPageData(page) { return fns.omit(["subPageNumber", "subPageTotalPages"], page); }; var paginate = function paginate(page, pageNumber, fontStore) { if (!page) return []; var splittedPage = splitPage(page, pageNumber, fontStore); var pages = [splittedPage[0]]; var nextPage = splittedPage[1]; while (nextPage !== null) { splittedPage = splitPage( nextPage, pageNumber + pages.length, fontStore ); pages.push(splittedPage[0]); nextPage = splittedPage[1]; } return pages; }; /** * Performs pagination. This is the step responsible of breaking the whole document * into pages following pagiation rules, such as `fixed`, `break` and dynamic nodes. * * @param {Object} node * @param {Object} fontStore font store * @returns {Object} layout node */ var resolvePagination = function resolvePagination(doc, fontStore) { var pages = []; var pageNumber = 1; for (var i = 0; i < doc.children.length; i += 1) { var page = doc.children[i]; var subpages = paginate(page, pageNumber, fontStore); subpages = assocSubPageData(subpages); pageNumber += subpages.length; pages = pages.concat(subpages); } pages = pages.map(function () { for ( var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++ ) { args[_key] = arguments[_key]; } return dissocSubPageData( resolvePageIndices.apply( void 0, [fontStore].concat(args) ) ); }); return assingChildren(pages, doc); }; /* * Translates page percentage horizontal paddings in fixed ones * * @param {Object} page container * @param {String} padding value * @returns {Object} translated padding value */ var resolvePageHorizontalPadding = function resolvePageHorizontalPadding(container) { return function (value) { var match = fns.matchPercent(value); return match ? match.percent * container.width : value; }; }; /** * Translates page percentage vertical paddings in fixed ones * * @param {Object} page container * @param {String} padding value * @returns {Object} translated padding value */ var resolvePageVerticalPadding = function resolvePageVerticalPadding(container) { return function (value) { var match = fns.matchPercent(value); return match ? match.percent * container.height : value; }; }; /** * Translates page percentage paddings in fixed ones * * @param {Object} page * @returns {Object} page with fixed paddings */ var resolvePagePaddings = function resolvePagePaddings(page) { var container = page.style; var style = fns.evolve( { paddingTop: resolvePageVerticalPadding(container), paddingLeft: resolvePageHorizontalPadding(container), paddingRight: resolvePageHorizontalPadding(container), paddingBottom: resolvePageVerticalPadding(container), }, page.style ); return Object.assign({}, page, { style: style, }); }; /** * Translates all pages percentage paddings in fixed ones * This has to be computed from pages calculated size and not by Yoga * because at this point we didn't performed pagination yet. * * @param {Object} document root * @returns {Object} document root with translated page paddings */ var resolvePagesPaddings = function resolvePagesPaddings(root) { if (!root.children) return root; var children = root.children.map(resolvePagePaddings); return Object.assign({}, root, { children: children, }); }; /** * * @param {Object} container width and height * @param {String | Number} value border radius value * @returns {Number} fixed border radius value */ var resolveRadius = function resolveRadius(container) { return function (value) { if (!value) return undefined; var match = fns.matchPercent(value); return match ? match.percent * Math.min(container.width, container.height) : value; }; }; /** * Transforms percent border radius into fixed values * * @param {Object} node * @returns {Object} node */ var resolvePercentRadius = function resolvePercentRadius(node) { var style = fns.evolve( { borderTopLeftRadius: resolveRadius(node.box), borderTopRightRadius: resolveRadius(node.box), borderBottomRightRadius: resolveRadius(node.box), borderBottomLeftRadius: resolveRadius(node.box), }, node.style || {} ); var newNode = Object.assign({}, node, { style: style, }); if (!node.children) return newNode; var children = node.children.map(resolvePercentRadius); return Object.assign({}, newNode, { children: children, }); }; /** * Transform percent height into fixed * * @param {String | number} height * @return {number} height */ var transformHeight = function transformHeight(pageArea, height) { var match = fns.matchPercent(height); return match ? match.percent * pageArea : height; }; /** * Get page area (height minus paddings) * * @param {Object} page * @return {number} page area */ var getPageArea = function getPageArea(page) { var _page$style, _page$style2; var pageHeight = page.style.height; var pagePaddingTop = ((_page$style = page.style) === null || _page$style === void 0 ? void 0 : _page$style.paddingTop) || 0; var pagePaddingBottom = ((_page$style2 = page.style) === null || _page$style2 === void 0 ? void 0 : _page$style2.paddingBottom) || 0; return pageHeight - pagePaddingTop - pagePaddingBottom; }; /** * Transform node percent height to fixed * * @param {Object} page * @param {Object} node * @return {Object} transformed node */ var resolveNodePercentHeight = function resolveNodePercentHeight( page, node ) { var _page$style3, _node$style; if ( fns.isNil( (_page$style3 = page.style) === null || _page$style3 === void 0 ? void 0 : _page$style3.height ) ) return node; if ( fns.isNil( (_node$style = node.style) === null || _node$style === void 0 ? void 0 : _node$style.height ) ) return node; var pageArea = getPageArea(page); var height = transformHeight(pageArea, node.style.height); var style = Object.assign({}, node.style, { height: height, }); return Object.assign({}, node, { style: style, }); }; /** * Transform page immediate children with percent height to fixed * * @param {Object} page * @return {Object} transformed page */ var resolvePagePercentHeight = function resolvePagePercentHeight( page ) { if (!page.children) return page; var resolveChild = function resolveChild(child) { return resolveNodePercentHeight(page, child); }; var children = page.children.map(resolveChild); return Object.assign({}, page, { children: children, }); }; /** * Transform all page immediate children with percent height to fixed. * This is needed for computing correct dimensions on pre-pagination layout. * * @param {Object} document root * @return {Object} transformed document root */ var resolvePercentHeight = function resolvePercentHeight(root) { if (!root.children) return root; var children = root.children.map(resolvePagePercentHeight); return Object.assign({}, root, { children: children, }); }; var isType = function isType(type) { return function (node) { return node.type === type; }; }; var isLink = isType(P__namespace.Link); var isText = isType(P__namespace.Text); var isTextInstance = isType(P__namespace.TextInstance); /** * Checks if node has render prop * * @param {Object} node * @returns {Boolean} has render prop? */ var hasRenderProp = function hasRenderProp(node) { var _node$props; return !!( (_node$props = node.props) !== null && _node$props !== void 0 && _node$props.render ); }; /** * Checks if node is text type (Text or TextInstance) * * @param {Object} node * @returns {Boolean} are all children text instances? */ var isTextType = function isTextType(node) { return isText(node) || isTextInstance(node); }; /** * Checks if is tet link that needs to be wrapped in Text * * @param {Object} node * @returns {Boolean} are all children text instances? */ var isTextLink = function isTextLink(node) { var children = node.children || []; // Text string inside a Link if (children.every(isTextInstance)) return true; // Text node inside a Link if (children.every(isText)) return false; return children.every(isTextType); }; /** * Wraps node children inside Text node * * @param {Object} node * @returns {Boolean} node with intermediate Text child */ var wrapText = function wrapText(node) { var textElement = { type: P__namespace.Text, props: {}, style: {}, box: {}, children: node.children, }; return Object.assign({}, node, { children: [textElement], }); }; var transformLink = function transformLink(node) { if (!isLink(node)) return node; // If has render prop substitute the instance by a Text, that will // ultimately render the inline Link via the textkit PDF renderer. if (hasRenderProp(node)) return Object.assign({}, node, { type: P__namespace.Text, }); // If is a text link (either contains Text or TextInstalce), wrap it // inside a Text element so styles are applied correctly if (isTextLink(node)) return wrapText(node); return node; }; /** * Transforms Link layout to correctly render text and dynamic rendered links * * @param {Object} node * @returns {Object} node with link substitution */ var resolveLinkSubstitution = function resolveLinkSubstitution( node ) { if (!node.children) return node; var resolveChild = fns.compose( transformLink, resolveLinkSubstitution ); var children = node.children.map(resolveChild); return Object.assign({}, node, { children: children, }); }; var layout = fns.asyncCompose( resolveZIndex, resolveOrigin, resolvePagination, resolveTextLayout, resolvePercentRadius, resolveDimensions, resolveSvg, resolveAssets, resolveInheritance, resolvePercentHeight, resolvePagesPaddings, resolveStyles, resolveLinkSubstitution, resolveBookmarks, resolvePageSizes ); exports.Z = layout; /***/ }, /***/ 5648: /***/ function (module) { "use strict"; module.exports = function () { // https://mths.be/emoji return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F|\uD83D\uDC68(?:\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68\uD83C\uDFFB|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|[\u2695\u2696\u2708]\uFE0F|\uD83D[\uDC66\uDC67]|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708])\uFE0F|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C[\uDFFB-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)\uD83C\uDFFB|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB\uDFFC])|\uD83D\uDC69(?:\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D\uD83D\uDC69)(?:\uD83C[\uDFFB-\uDFFD])|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|(?:(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)\uFE0F|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:(?:\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\u200D[\u2640\u2642])|\uD83C\uDFF4\u200D\u2620)\uFE0F|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF4\uD83C\uDDF2|\uD83C\uDDF6\uD83C\uDDE6|[#\*0-9]\uFE0F\u20E3|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83D\uDC69(?:\uD83C[\uDFFB-\uDFFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270A-\u270D]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC70\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDCAA\uDD74\uDD7A\uDD90\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD36\uDDB5\uDDB6\uDDBB\uDDD2-\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5\uDEEB\uDEEC\uDEF4-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFA\uDFE0-\uDFEB]|\uD83E[\uDD0D-\uDD3A\uDD3C-\uDD45\uDD47-\uDD71\uDD73-\uDD76\uDD7A-\uDDA2\uDDA5-\uDDAA\uDDAE-\uDDCA\uDDCD-\uDDFF\uDE70-\uDE73\uDE78-\uDE7A\uDE80-\uDE82\uDE90-\uDE95])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g; }; /***/ }, /***/ 1852: /***/ function ( __unused_webpack_module, __webpack_exports__, __webpack_require__ ) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ default: function () { return /* binding */ PNG; }, /* harmony export */ }); /* harmony import */ var zlib__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7715); /* harmony import */ var zlib__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/ __webpack_require__.n( zlib__WEBPACK_IMPORTED_MODULE_0__ ); /* provided dependency */ var Buffer = __webpack_require__(1876)["Buffer"]; var PNG = /*#__PURE__*/ (function () { PNG.decode = function decode(path, fn) { { throw new Error( "PNG.decode not available in browser build" ); } }; PNG.load = function load(path) { { throw new Error( "PNG.load not available in browser build" ); } }; 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 = Buffer.from(this.imgData); return; 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__WEBPACK_IMPORTED_MODULE_0___default().inflate( this.imgData, function (err, data) { if (err) throw err; var pos = 0; var width = _this.width, height = _this.height; var pixelBytes = _this.pixelBitlength / 8; var pixels = Buffer.alloc( width * height * pixelBytes ); 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 : Buffer.alloc(scanlineLength * h); var row = 0; var c = 0; while (row < h && pos < data.length) { var byte; var col; var i; var left; var 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; var 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 = Buffer.alloc(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; var 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 = Buffer.alloc(this.width * this.height * 4); return this.decodePixels(function (pixels) { _this2.copyToImageData(ret, pixels); return fn(ret); }); }; return PNG; })(); /***/ }, /***/ 368: /***/ function ( __unused_webpack_module, __webpack_exports__, __webpack_require__ ) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Canvas: function () { return /* binding */ Canvas; }, /* harmony export */ Circle: function () { return /* binding */ Circle; }, /* harmony export */ ClipPath: function () { return /* binding */ ClipPath; }, /* harmony export */ Defs: function () { return /* binding */ Defs; }, /* harmony export */ Document: function () { return /* binding */ Document; }, /* harmony export */ Ellipse: function () { return /* binding */ Ellipse; }, /* harmony export */ G: function () { return /* binding */ G; }, /* harmony export */ Image: function () { return /* binding */ Image; }, /* harmony export */ Line: function () { return /* binding */ Line; }, /* harmony export */ LinearGradient: function () { return /* binding */ LinearGradient; }, /* harmony export */ Link: function () { return /* binding */ Link; }, /* harmony export */ Note: function () { return /* binding */ Note; }, /* harmony export */ Page: function () { return /* binding */ Page; }, /* harmony export */ Path: function () { return /* binding */ Path; }, /* harmony export */ Polygon: function () { return /* binding */ Polygon; }, /* harmony export */ Polyline: function () { return /* binding */ Polyline; }, /* harmony export */ RadialGradient: function () { return /* binding */ RadialGradient; }, /* harmony export */ Rect: function () { return /* binding */ Rect; }, /* harmony export */ Stop: function () { return /* binding */ Stop; }, /* harmony export */ Svg: function () { return /* binding */ Svg; }, /* harmony export */ Text: function () { return /* binding */ Text; }, /* harmony export */ TextInstance: function () { return /* binding */ TextInstance; }, /* harmony export */ Tspan: function () { return /* binding */ Tspan; }, /* harmony export */ View: function () { return /* binding */ View; }, /* harmony export */ }); const G = "G"; const Svg = "SVG"; const View = "VIEW"; const Text = "TEXT"; const Link = "LINK"; const Page = "PAGE"; const Note = "NOTE"; const Path = "PATH"; const Rect = "RECT"; const Line = "LINE"; const Stop = "STOP"; const Defs = "DEFS"; const Image = "IMAGE"; const Tspan = "TSPAN"; const Canvas = "CANVAS"; const Circle = "CIRCLE"; const Ellipse = "ELLIPSE"; const Polygon = "POLYGON"; const Document = "DOCUMENT"; const Polyline = "POLYLINE"; const ClipPath = "CLIP_PATH"; const TextInstance = "TEXT_INSTANCE"; const LinearGradient = "LINEAR_GRADIENT"; const RadialGradient = "RADIAL_GRADIENT"; /***/ }, /***/ 2837: /***/ function ( __unused_webpack_module, __unused_webpack___webpack_exports__, __webpack_require__ ) { "use strict"; // UNUSED EXPORTS: BlobProvider, Canvas, Circle, ClipPath, Defs, Document, Ellipse, Font, G, Image, Line, LinearGradient, Link, Note, PDFDownloadLink, PDFViewer, Page, Path, Polygon, Polyline, RadialGradient, Rect, Stop, StyleSheet, Svg, Text, TextInstance, Tspan, View, createRenderer, default, pdf, render, renderToFile, renderToStream, renderToString, usePDF, version // EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/extends.js var esm_extends = __webpack_require__(7462); // EXTERNAL MODULE: ./node_modules/@react-pdf/primitives/src/index.js var src = __webpack_require__(368); // EXTERNAL MODULE: ./node_modules/queue/index.js var queue = __webpack_require__(9189); var queue_default = /*#__PURE__*/ __webpack_require__.n(queue); // EXTERNAL MODULE: ./node_modules/react/index.js var react = __webpack_require__(7294); // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js function asyncGeneratorStep( gen, resolve, reject, _next, _throw, key, arg ) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } } function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep( gen, resolve, reject, _next, _throw, "next", value ); } function _throw(err) { asyncGeneratorStep( gen, resolve, reject, _next, _throw, "throw", err ); } _next(undefined); }); }; } // EXTERNAL MODULE: ./node_modules/@babel/runtime/regenerator/index.js var regenerator = __webpack_require__(7757); var regenerator_default = /*#__PURE__*/ __webpack_require__.n(regenerator); // EXTERNAL MODULE: ./node_modules/blob-stream/index.js var blob_stream = __webpack_require__(7152); var blob_stream_default = /*#__PURE__*/ __webpack_require__.n(blob_stream); // EXTERNAL MODULE: ./node_modules/@react-pdf/font/lib/index.browser.js var index_browser = __webpack_require__(1384); // EXTERNAL MODULE: ./node_modules/@react-pdf/fns/lib/index.js var lib = __webpack_require__(4354); // EXTERNAL MODULE: ./node_modules/@react-pdf/textkit/lib/run/advanceWidth.js var advanceWidth = __webpack_require__(3689); // EXTERNAL MODULE: ./node_modules/@react-pdf/textkit/lib/attributedString/advanceWidth.js var attributedString_advanceWidth = __webpack_require__(7106); // EXTERNAL MODULE: ./node_modules/abs-svg-path/index.js var abs_svg_path = __webpack_require__(4299); var abs_svg_path_default = /*#__PURE__*/ __webpack_require__.n(abs_svg_path); // EXTERNAL MODULE: ./node_modules/parse-svg-path/index.js var parse_svg_path = __webpack_require__(4462); var parse_svg_path_default = /*#__PURE__*/ __webpack_require__.n(parse_svg_path); // CONCATENATED MODULE: ./node_modules/svg-arc-to-cubic-bezier/modules/index.js var _slicedToArray = (function () { function sliceIterator(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"]) _i["return"](); } finally { if (_d) throw _e; } } return _arr; } return function (arr, i) { if (Array.isArray(arr)) { return arr; } else if (Symbol.iterator in Object(arr)) { return sliceIterator(arr, i); } else { throw new TypeError( "Invalid attempt to destructure non-iterable instance" ); } }; })(); var TAU = Math.PI * 2; var mapToEllipse = function mapToEllipse( _ref, rx, ry, cosphi, sinphi, centerx, centery ) { var x = _ref.x, y = _ref.y; x *= rx; y *= ry; var xp = cosphi * x - sinphi * y; var yp = sinphi * x + cosphi * y; return { x: xp + centerx, y: yp + centery, }; }; var approxUnitArc = function approxUnitArc(ang1, ang2) { // If 90 degree circular arc, use a constant // as derived from http://spencermortensen.com/articles/bezier-circle var a = ang2 === 1.5707963267948966 ? 0.551915024494 : ang2 === -1.5707963267948966 ? -0.551915024494 : (4 / 3) * Math.tan(ang2 / 4); var x1 = Math.cos(ang1); var y1 = Math.sin(ang1); var x2 = Math.cos(ang1 + ang2); var y2 = Math.sin(ang1 + ang2); return [ { x: x1 - y1 * a, y: y1 + x1 * a, }, { x: x2 + y2 * a, y: y2 - x2 * a, }, { x: x2, y: y2, }, ]; }; var vectorAngle = function vectorAngle(ux, uy, vx, vy) { var sign = ux * vy - uy * vx < 0 ? -1 : 1; var dot = ux * vx + uy * vy; if (dot > 1) { dot = 1; } if (dot < -1) { dot = -1; } return sign * Math.acos(dot); }; var getArcCenter = function getArcCenter( px, py, cx, cy, rx, ry, largeArcFlag, sweepFlag, sinphi, cosphi, pxp, pyp ) { var rxsq = Math.pow(rx, 2); var rysq = Math.pow(ry, 2); var pxpsq = Math.pow(pxp, 2); var pypsq = Math.pow(pyp, 2); var radicant = rxsq * rysq - rxsq * pypsq - rysq * pxpsq; if (radicant < 0) { radicant = 0; } radicant /= rxsq * pypsq + rysq * pxpsq; radicant = Math.sqrt(radicant) * (largeArcFlag === sweepFlag ? -1 : 1); var centerxp = ((radicant * rx) / ry) * pyp; var centeryp = ((radicant * -ry) / rx) * pxp; var centerx = cosphi * centerxp - sinphi * centeryp + (px + cx) / 2; var centery = sinphi * centerxp + cosphi * centeryp + (py + cy) / 2; var vx1 = (pxp - centerxp) / rx; var vy1 = (pyp - centeryp) / ry; var vx2 = (-pxp - centerxp) / rx; var vy2 = (-pyp - centeryp) / ry; var ang1 = vectorAngle(1, 0, vx1, vy1); var ang2 = vectorAngle(vx1, vy1, vx2, vy2); if (sweepFlag === 0 && ang2 > 0) { ang2 -= TAU; } if (sweepFlag === 1 && ang2 < 0) { ang2 += TAU; } return [centerx, centery, ang1, ang2]; }; var arcToBezier = function arcToBezier(_ref2) { var px = _ref2.px, py = _ref2.py, cx = _ref2.cx, cy = _ref2.cy, rx = _ref2.rx, ry = _ref2.ry, _ref2$xAxisRotation = _ref2.xAxisRotation, xAxisRotation = _ref2$xAxisRotation === undefined ? 0 : _ref2$xAxisRotation, _ref2$largeArcFlag = _ref2.largeArcFlag, largeArcFlag = _ref2$largeArcFlag === undefined ? 0 : _ref2$largeArcFlag, _ref2$sweepFlag = _ref2.sweepFlag, sweepFlag = _ref2$sweepFlag === undefined ? 0 : _ref2$sweepFlag; var curves = []; if (rx === 0 || ry === 0) { return []; } var sinphi = Math.sin((xAxisRotation * TAU) / 360); var cosphi = Math.cos((xAxisRotation * TAU) / 360); var pxp = (cosphi * (px - cx)) / 2 + (sinphi * (py - cy)) / 2; var pyp = (-sinphi * (px - cx)) / 2 + (cosphi * (py - cy)) / 2; if (pxp === 0 && pyp === 0) { return []; } rx = Math.abs(rx); ry = Math.abs(ry); var lambda = Math.pow(pxp, 2) / Math.pow(rx, 2) + Math.pow(pyp, 2) / Math.pow(ry, 2); if (lambda > 1) { rx *= Math.sqrt(lambda); ry *= Math.sqrt(lambda); } var _getArcCenter = getArcCenter( px, py, cx, cy, rx, ry, largeArcFlag, sweepFlag, sinphi, cosphi, pxp, pyp ), _getArcCenter2 = _slicedToArray(_getArcCenter, 4), centerx = _getArcCenter2[0], centery = _getArcCenter2[1], ang1 = _getArcCenter2[2], ang2 = _getArcCenter2[3]; // If 'ang2' == 90.0000000001, then `ratio` will evaluate to // 1.0000000001. This causes `segments` to be greater than one, which is an // unecessary split, and adds extra points to the bezier curve. To alleviate // this issue, we round to 1.0 when the ratio is close to 1.0. var ratio = Math.abs(ang2) / (TAU / 4); if (Math.abs(1.0 - ratio) < 0.0000001) { ratio = 1.0; } var segments = Math.max(Math.ceil(ratio), 1); ang2 /= segments; for (var i = 0; i < segments; i++) { curves.push(approxUnitArc(ang1, ang2)); ang1 += ang2; } return curves.map(function (curve) { var _mapToEllipse = mapToEllipse( curve[0], rx, ry, cosphi, sinphi, centerx, centery ), x1 = _mapToEllipse.x, y1 = _mapToEllipse.y; var _mapToEllipse2 = mapToEllipse( curve[1], rx, ry, cosphi, sinphi, centerx, centery ), x2 = _mapToEllipse2.x, y2 = _mapToEllipse2.y; var _mapToEllipse3 = mapToEllipse( curve[2], rx, ry, cosphi, sinphi, centerx, centery ), x = _mapToEllipse3.x, y = _mapToEllipse3.y; return { x1: x1, y1: y1, x2: x2, y2: y2, x: x, y: y }; }); }; /* harmony default export */ var modules = arcToBezier; // CONCATENATED MODULE: ./node_modules/normalize-svg-path/index.mjs function normalize(path) { // init state var prev; var result = []; var bezierX = 0; var bezierY = 0; var startX = 0; var startY = 0; var quadX = null; var quadY = null; var x = 0; var y = 0; for (var i = 0, len = path.length; i < len; i++) { var seg = path[i]; var command = seg[0]; switch (command) { case "M": startX = seg[1]; startY = seg[2]; break; case "A": var curves = modules({ px: x, py: y, cx: seg[6], cy: seg[7], rx: seg[1], ry: seg[2], xAxisRotation: seg[3], largeArcFlag: seg[4], sweepFlag: seg[5], }); // null-curves if (!curves.length) continue; for (var j = 0, c; j < curves.length; j++) { c = curves[j]; seg = ["C", c.x1, c.y1, c.x2, c.y2, c.x, c.y]; if (j < curves.length - 1) result.push(seg); } break; case "S": // default control point var cx = x; var cy = y; if (prev == "C" || prev == "S") { cx += cx - bezierX; // reflect the previous command's control cy += cy - bezierY; // point relative to the current point } seg = ["C", cx, cy, seg[1], seg[2], seg[3], seg[4]]; break; case "T": if (prev == "Q" || prev == "T") { quadX = x * 2 - quadX; // as with 'S' reflect previous control point quadY = y * 2 - quadY; } else { quadX = x; quadY = y; } seg = quadratic(x, y, quadX, quadY, seg[1], seg[2]); break; case "Q": quadX = seg[1]; quadY = seg[2]; seg = quadratic( x, y, seg[1], seg[2], seg[3], seg[4] ); break; case "L": seg = line(x, y, seg[1], seg[2]); break; case "H": seg = line(x, y, seg[1], y); break; case "V": seg = line(x, y, x, seg[1]); break; case "Z": seg = line(x, y, startX, startY); break; } // update state prev = command; x = seg[seg.length - 2]; y = seg[seg.length - 1]; if (seg.length > 4) { bezierX = seg[seg.length - 4]; bezierY = seg[seg.length - 3]; } else { bezierX = x; bezierY = y; } result.push(seg); } return result; } function line(x1, y1, x2, y2) { return ["C", x1, y1, x2, y2, x2, y2]; } function quadratic(x1, y1, cx, cy, x2, y2) { return [ "C", x1 / 3 + (2 / 3) * cx, y1 / 3 + (2 / 3) * cy, x2 / 3 + (2 / 3) * cx, y2 / 3 + (2 / 3) * cy, x2, y2, ]; } // EXTERNAL MODULE: ./node_modules/@react-pdf/textkit/lib/run/height.js var run_height = __webpack_require__(7369); // EXTERNAL MODULE: ./node_modules/@react-pdf/textkit/lib/run/descent.js var run_descent = __webpack_require__(9406); // EXTERNAL MODULE: ./node_modules/@react-pdf/textkit/lib/attributedString/ascent.js var ascent = __webpack_require__(3226); // EXTERNAL MODULE: ./node_modules/color-string/index.js var color_string = __webpack_require__(9818); var color_string_default = /*#__PURE__*/ __webpack_require__.n(color_string); // CONCATENATED MODULE: ./node_modules/@react-pdf/render/lib/index.es.js var renderPath = function renderPath(ctx, node) { var _node$props; var d = (_node$props = node.props) === null || _node$props === void 0 ? void 0 : _node$props.d; if (d) ctx.path(node.props.d); }; var KAPPA$3 = 4.0 * ((Math.sqrt(2) - 1.0) / 3.0); var renderRect = function renderRect(ctx, node) { var _node$props, _node$props2, _node$props3, _node$props4, _node$props5, _node$props6; var x = ((_node$props = node.props) === null || _node$props === void 0 ? void 0 : _node$props.x) || 0; var y = ((_node$props2 = node.props) === null || _node$props2 === void 0 ? void 0 : _node$props2.y) || 0; var rx = ((_node$props3 = node.props) === null || _node$props3 === void 0 ? void 0 : _node$props3.rx) || 0; var ry = ((_node$props4 = node.props) === null || _node$props4 === void 0 ? void 0 : _node$props4.ry) || 0; var width = ((_node$props5 = node.props) === null || _node$props5 === void 0 ? void 0 : _node$props5.width) || 0; var height = ((_node$props6 = node.props) === null || _node$props6 === void 0 ? void 0 : _node$props6.height) || 0; if (!width || !height) return; if (rx && ry) { var krx = rx * KAPPA$3; var kry = ry * KAPPA$3; ctx.moveTo(x + rx, y); ctx.lineTo(x - rx + width, y); ctx.bezierCurveTo( x - rx + width + krx, y, x + width, y + ry - kry, x + width, y + ry ); ctx.lineTo(x + width, y + height - ry); ctx.bezierCurveTo( x + width, y + height - ry + kry, x - rx + width + krx, y + height, x - rx + width, y + height ); ctx.lineTo(x + rx, y + height); ctx.bezierCurveTo( x + rx - krx, y + height, x, y + height - ry + kry, x, y + height - ry ); ctx.lineTo(x, y + ry); ctx.bezierCurveTo( x, y + ry - kry, x + rx - krx, y, x + rx, y ); } else { ctx.moveTo(x, y); ctx.lineTo(x + width, y); ctx.lineTo(x + width, y + height); ctx.lineTo(x, y + height); } ctx.closePath(); }; var renderLine$1 = function renderLine(ctx, node) { var _ref = node.props || {}, x1 = _ref.x1, x2 = _ref.x2, y1 = _ref.y1, y2 = _ref.y2; ctx.moveTo(x1, y1); ctx.lineTo(x2, y2); }; var renderGroup = function renderGroup() { // noop }; var KAPPA$2 = 4.0 * ((Math.sqrt(2) - 1.0) / 3.0); var drawEllipse = function drawEllipse(ctx, cx, cy, rx, ry) { var x = cx - rx; var y = cy - ry; var ox = rx * KAPPA$2; var oy = ry * KAPPA$2; var xe = x + rx * 2; var ye = y + ry * 2; var xm = x + rx; var ym = y + ry; ctx.moveTo(x, ym); ctx.bezierCurveTo(x, ym - oy, xm - ox, y, xm, y); ctx.bezierCurveTo(xm + ox, y, xe, ym - oy, xe, ym); ctx.bezierCurveTo(xe, ym + oy, xm + ox, ye, xm, ye); ctx.bezierCurveTo(xm - ox, ye, x, ym + oy, x, ym); ctx.closePath(); }; var renderEllipse = function renderEllipse(ctx, node) { var _ref = node.props || {}, cx = _ref.cx, cy = _ref.cy, rx = _ref.rx, ry = _ref.ry; drawEllipse(ctx, cx, cy, rx, ry); }; var renderCircle = function renderCircle(ctx, node) { var _node$props, _node$props2, _node$props3; var cx = (_node$props = node.props) === null || _node$props === void 0 ? void 0 : _node$props.cx; var cy = (_node$props2 = node.props) === null || _node$props2 === void 0 ? void 0 : _node$props2.cy; var r = (_node$props3 = node.props) === null || _node$props3 === void 0 ? void 0 : _node$props3.r; drawEllipse(ctx, cx, cy, r, r); }; var renderGlyphs = function renderGlyphs( ctx, glyphs, positions, x, y, options ) { if (options === void 0) { options = {}; } var scale = 1000 / ctx._fontSize; var unitsPerEm = ctx._font.font.unitsPerEm || 1000; var advanceWidthScale = 1000 / unitsPerEm; // Glyph encoding and positioning var encodedGlyphs = ctx._font.encodeGlyphs(glyphs); var encodedPositions = positions.map(function (pos, i) { return { xAdvance: pos.xAdvance * scale, yAdvance: pos.yAdvance * scale, xOffset: pos.xOffset, yOffset: pos.yOffset, advanceWidth: glyphs[i].advanceWidth * advanceWidthScale, }; }); return ctx._glyphs( encodedGlyphs, encodedPositions, x, y, options ); }; var renderRun$1 = function renderRun(ctx, run) { var runAdvanceWidth = (0, advanceWidth["default"])(run); var _run$attributes = run.attributes, font = _run$attributes.font, fontSize = _run$attributes.fontSize, color = _run$attributes.color, opacity = _run$attributes.opacity; ctx.fillColor(color); ctx.fillOpacity(opacity); if (font.sbix || (font.COLR && font.CPAL)) { ctx.save(); ctx.translate(0, -run.ascent); for (var i = 0; i < run.glyphs.length; i += 1) { var position = run.positions[i]; var glyph = run.glyphs[i]; ctx.save(); ctx.translate(position.xOffset, position.yOffset); glyph.render(ctx, fontSize); ctx.restore(); ctx.translate(position.xAdvance, position.yAdvance); } ctx.restore(); } else { ctx.font( typeof font.name === "string" ? font.name : font, fontSize ); try { renderGlyphs(ctx, run.glyphs, run.positions, 0, 0); } catch (error) { console.log(error); } } ctx.translate(runAdvanceWidth, 0); }; var renderSpan = function renderSpan( ctx, line, textAnchor, dominantBaseline ) { var _line$box, _line$box2, _line$runs$, _line$runs$2, _line$runs$2$attribut; ctx.save(); var x = ((_line$box = line.box) === null || _line$box === void 0 ? void 0 : _line$box.x) || 0; var y = ((_line$box2 = line.box) === null || _line$box2 === void 0 ? void 0 : _line$box2.y) || 0; var font = (_line$runs$ = line.runs[0]) === null || _line$runs$ === void 0 ? void 0 : _line$runs$.attributes.font; var scale = ((_line$runs$2 = line.runs[0]) === null || _line$runs$2 === void 0 ? void 0 : (_line$runs$2$attribut = _line$runs$2.attributes) === null || _line$runs$2$attribut === void 0 ? void 0 : _line$runs$2$attribut.scale) || 1; var width = (0, attributedString_advanceWidth["default"])(line); var ascent = font.ascent * scale; var xHeight = font.xHeight * scale; var descent = font.descent * scale; var capHeight = font.capHeight * scale; var xTranslate = x; var yTranslate = y; switch (textAnchor) { case "middle": xTranslate = x - width / 2; break; case "end": xTranslate = x - width; break; default: xTranslate = x; break; } switch (dominantBaseline) { case "middle": case "central": yTranslate = y + capHeight / 2; break; case "hanging": yTranslate = y + capHeight; break; case "mathematical": yTranslate = y + xHeight; break; case "text-after-edge": yTranslate = y + descent; break; case "text-before-edge": yTranslate = y + ascent; break; default: yTranslate = y; break; } ctx.translate(xTranslate, yTranslate); line.runs.forEach(function (run) { return renderRun$1(ctx, run); }); ctx.restore(); }; var renderSvgText = function renderSvgText(ctx, node) { node.children.forEach(function (span) { return renderSpan( ctx, span.lines[0], span.props.textAnchor, span.props.dominantBaseline ); }); }; var pairs = function pairs(values) { var result = []; for (var i = 0; i < values.length; i += 2) { result.push([values[i], values[i + 1]]); } return result; }; /** * Parse svg-like points into number arrays * * @param {String} points string ex. "20,30 50,60" * @return {Array} points array ex. [[20, 30], [50, 60]] */ var parsePoints = function parsePoints(points) { var values = (points || "") .trim() .replace(/,/g, " ") .replace(/(\d)-(\d)/g, "$1 -$2") .split(/\s+/); if (values.length % 2 !== 0) { values = values.slice(0, -1); } values = values.map(parseFloat); return pairs(values); }; var drawPolyline = function drawPolyline(ctx, points) { if (points.length > 0) { ctx.moveTo(points[0][0], points[0][1]); points.slice(1).forEach(function (p) { return ctx.lineTo(p[0], p[1]); }); } }; var renderPolyline = function renderPolyline(ctx, node) { var points = parsePoints(node.props.points || ""); drawPolyline(ctx, points); }; var renderPolygon = function renderPolygon(ctx, node) { renderPolyline(ctx, node); ctx.closePath(); }; var renderImage$1 = function renderImage(ctx, node) { if (!node.image.data) return; var _node$props = node.props, x = _node$props.x, y = _node$props.y; var _node$style = node.style, width = _node$style.width, height = _node$style.height, opacity = _node$style.opacity; var paddingTop = node.box.paddingLeft || 0; var paddingLeft = node.box.paddingLeft || 0; if (width === 0 || height === 0) { console.warn( "Image with src '" + node.props.href + "' skipped due to invalid dimensions" ); return; } ctx.save(); ctx.fillOpacity(opacity || 1).image( node.image.data, x + paddingLeft, y + paddingTop, { width: width, height: height, } ); ctx.restore(); }; // This constant is used to approximate a symmetrical arc using a cubic // Bezier curve. var KAPPA$1 = 4.0 * ((Math.sqrt(2) - 1.0) / 3.0); var clipNode = function clipNode(ctx, node) { if (!node.style) return; var _node$box = node.box, top = _node$box.top, left = _node$box.left, width = _node$box.width, height = _node$box.height; var _node$style = node.style, _node$style$borderTop = _node$style.borderTopLeftRadius, borderTopLeftRadius = _node$style$borderTop === void 0 ? 0 : _node$style$borderTop, _node$style$borderTop2 = _node$style.borderTopRightRadius, borderTopRightRadius = _node$style$borderTop2 === void 0 ? 0 : _node$style$borderTop2, _node$style$borderBot = _node$style.borderBottomRightRadius, borderBottomRightRadius = _node$style$borderBot === void 0 ? 0 : _node$style$borderBot, _node$style$borderBot2 = _node$style.borderBottomLeftRadius, borderBottomLeftRadius = _node$style$borderBot2 === void 0 ? 0 : _node$style$borderBot2; // Border top var rtr = Math.min( borderTopRightRadius, 0.5 * width, 0.5 * height ); var ctr = rtr * (1.0 - KAPPA$1); ctx.moveTo(left + rtr, top); ctx.lineTo(left + width - rtr, top); ctx.bezierCurveTo( left + width - ctr, top, left + width, top + ctr, left + width, top + rtr ); // Border right var rbr = Math.min( borderBottomRightRadius, 0.5 * width, 0.5 * height ); var cbr = rbr * (1.0 - KAPPA$1); ctx.lineTo(left + width, top + height - rbr); ctx.bezierCurveTo( left + width, top + height - cbr, left + width - cbr, top + height, left + width - rbr, top + height ); // Border bottom var rbl = Math.min( borderBottomLeftRadius, 0.5 * width, 0.5 * height ); var cbl = rbl * (1.0 - KAPPA$1); ctx.lineTo(left + rbl, top + height); ctx.bezierCurveTo( left + cbl, top + height, left, top + height - cbl, left, top + height - rbl ); // Border left var rtl = Math.min( borderTopLeftRadius, 0.5 * width, 0.5 * height ); var ctl = rtl * (1.0 - KAPPA$1); ctx.lineTo(left, top + rtl); ctx.bezierCurveTo( left, top + ctl, left + ctl, top, left + rtl, top ); ctx.closePath(); ctx.clip(); }; // TODO: Implement using only matrices to support skew and even more operations than css. var applySingleTransformation = function applySingleTransformation( ctx, transform, origin ) { var operation = transform.operation, value = transform.value; switch (operation) { case "scale": { var scaleX = value[0], scaleY = value[1]; ctx.scale(scaleX, scaleY, { origin: origin, }); break; } case "rotate": { var angle = value[0]; ctx.rotate(angle, { origin: origin, }); break; } case "translate": { var x = value[0], y = value[1]; ctx.translate(x, y, { origin: origin, }); break; } case "matrix": { ctx.transform.apply(ctx, value); break; } default: { console.error( "Transform operation: '" + operation + "' doesn't supported" ); } } }; var applyTransformations = function applyTransformations( ctx, node ) { var _node$style, _node$props; if (!node.origin) return; var origin = [node.origin.left, node.origin.top]; var operations = ((_node$style = node.style) === null || _node$style === void 0 ? void 0 : _node$style.transform) || ((_node$props = node.props) === null || _node$props === void 0 ? void 0 : _node$props.transform) || []; operations.forEach(function (operation) { applySingleTransformation(ctx, operation, origin); }); }; var _boundingBoxFns; var getPathBoundingBox = function getPathBoundingBox(node) { var _node$props; var path = normalize( abs_svg_path_default()( parse_svg_path_default()( ((_node$props = node.props) === null || _node$props === void 0 ? void 0 : _node$props.d) || "" ) ) ); if (!path.length) return [0, 0, 0, 0]; var bounds = [Infinity, Infinity, -Infinity, -Infinity]; for (var i = 0, l = path.length; i < l; i += 1) { var points = path[i].slice(1); for (var j = 0; j < points.length; j += 2) { if (points[j + 0] < bounds[0]) bounds[0] = points[j + 0]; if (points[j + 1] < bounds[1]) bounds[1] = points[j + 1]; if (points[j + 0] > bounds[2]) bounds[2] = points[j + 0]; if (points[j + 1] > bounds[3]) bounds[3] = points[j + 1]; } } return bounds; }; var getCircleBoundingBox = function getCircleBoundingBox(node) { var _node$props2, _node$props3, _node$props4; var r = ((_node$props2 = node.props) === null || _node$props2 === void 0 ? void 0 : _node$props2.r) || 0; var cx = ((_node$props3 = node.props) === null || _node$props3 === void 0 ? void 0 : _node$props3.cx) || 0; var cy = ((_node$props4 = node.props) === null || _node$props4 === void 0 ? void 0 : _node$props4.cy) || 0; return [cx - r, cy - r, cx + r, cy + r]; }; var getEllipseBoundingBox = function getEllipseBoundingBox(node) { var _node$props5, _node$props6, _node$props7, _node$props8; var cx = ((_node$props5 = node.props) === null || _node$props5 === void 0 ? void 0 : _node$props5.cx) || 0; var cy = ((_node$props6 = node.props) === null || _node$props6 === void 0 ? void 0 : _node$props6.cy) || 0; var rx = ((_node$props7 = node.props) === null || _node$props7 === void 0 ? void 0 : _node$props7.rx) || 0; var ry = ((_node$props8 = node.props) === null || _node$props8 === void 0 ? void 0 : _node$props8.ry) || 0; return [cx - rx, cy - ry, cx + rx, cy + ry]; }; var getLineBoundingBox = function getLineBoundingBox(node) { var _node$props9, _node$props10, _node$props11, _node$props12; var x1 = ((_node$props9 = node.props) === null || _node$props9 === void 0 ? void 0 : _node$props9.x1) || 0; var y1 = ((_node$props10 = node.props) === null || _node$props10 === void 0 ? void 0 : _node$props10.y1) || 0; var x2 = ((_node$props11 = node.props) === null || _node$props11 === void 0 ? void 0 : _node$props11.x2) || 0; var y2 = ((_node$props12 = node.props) === null || _node$props12 === void 0 ? void 0 : _node$props12.y2) || 0; return [ Math.min(x1, x2), Math.min(y1, y2), Math.max(x1, x2), Math.max(y1, y2), ]; }; var getRectBoundingBox = function getRectBoundingBox(node) { var _node$props13, _node$props14, _node$props15, _node$props16; var x = ((_node$props13 = node.props) === null || _node$props13 === void 0 ? void 0 : _node$props13.x) || 0; var y = ((_node$props14 = node.props) === null || _node$props14 === void 0 ? void 0 : _node$props14.y) || 0; var width = ((_node$props15 = node.props) === null || _node$props15 === void 0 ? void 0 : _node$props15.width) || 0; var height = ((_node$props16 = node.props) === null || _node$props16 === void 0 ? void 0 : _node$props16.height) || 0; return [x, y, x + width, y + height]; }; var max = function max(values) { return Math.max.apply(Math, [-Infinity].concat(values)); }; var min = function min(values) { return Math.min.apply(Math, [Infinity].concat(values)); }; var getPolylineBoundingBox = function getPolylineBoundingBox(node) { var _node$props17; var points = parsePoints( ((_node$props17 = node.props) === null || _node$props17 === void 0 ? void 0 : _node$props17.points) || [] ); var xValues = points.map(function (p) { return p[0]; }); var yValues = points.map(function (p) { return p[1]; }); return [min(xValues), min(yValues), max(xValues), max(yValues)]; }; var boundingBoxFns = ((_boundingBoxFns = {}), (_boundingBoxFns[src.Rect] = getRectBoundingBox), (_boundingBoxFns[src.Line] = getLineBoundingBox), (_boundingBoxFns[src.Path] = getPathBoundingBox), (_boundingBoxFns[src.Circle] = getCircleBoundingBox), (_boundingBoxFns[src.Ellipse] = getEllipseBoundingBox), (_boundingBoxFns[src.Polygon] = getPolylineBoundingBox), (_boundingBoxFns[src.Polyline] = getPolylineBoundingBox), _boundingBoxFns); var getBoundingBox = function getBoundingBox(node) { var boundingBoxFn = boundingBoxFns[node.type]; return boundingBoxFn ? boundingBoxFn(node) : [0, 0, 0, 0]; }; var _renderFns$1; var setStrokeWidth = function setStrokeWidth(ctx, node) { var _node$props; var lineWidth = ((_node$props = node.props) === null || _node$props === void 0 ? void 0 : _node$props.strokeWidth) || 0; if (lineWidth) ctx.lineWidth(lineWidth); }; var setStrokeColor = function setStrokeColor(ctx, node) { var _node$props2; var strokeColor = ((_node$props2 = node.props) === null || _node$props2 === void 0 ? void 0 : _node$props2.stroke) || null; if (strokeColor) ctx.strokeColor(strokeColor); }; var setOpacity = function setOpacity(ctx, node) { var _node$props3; var opacity = ((_node$props3 = node.props) === null || _node$props3 === void 0 ? void 0 : _node$props3.opacity) || null; if (!(0, lib.isNil)(opacity)) ctx.opacity(opacity); }; var setFillOpacity = function setFillOpacity(ctx, node) { var _node$props4; var fillOpacity = ((_node$props4 = node.props) === null || _node$props4 === void 0 ? void 0 : _node$props4.fillOpacity) || null; if (!(0, lib.isNil)(fillOpacity)) ctx.fillOpacity(fillOpacity); }; var setStrokeOpacity = function setStrokeOpacity(ctx, node) { var _node$props5; var strokeOpacity = ((_node$props5 = node.props) === null || _node$props5 === void 0 ? void 0 : _node$props5.strokeOpacity) || null; if (!(0, lib.isNil)(strokeOpacity)) ctx.strokeOpacity(strokeOpacity); }; var setLineJoin = function setLineJoin(ctx, node) { var _node$props6; var lineJoin = ((_node$props6 = node.props) === null || _node$props6 === void 0 ? void 0 : _node$props6.strokeLinejoin) || null; if (lineJoin) ctx.lineJoin(lineJoin); }; var setLineCap = function setLineCap(ctx, node) { var _node$props7; var lineCap = ((_node$props7 = node.props) === null || _node$props7 === void 0 ? void 0 : _node$props7.strokeLinecap) || null; if (lineCap) ctx.lineCap(lineCap); }; var setLineDash = function setLineDash(ctx, node) { var _node$props8; var value = ((_node$props8 = node.props) === null || _node$props8 === void 0 ? void 0 : _node$props8.strokeDasharray) || null; if (value) ctx.dash(value.split(",")); }; var hasLinearGradientFill = function hasLinearGradientFill(node) { var _node$props9, _node$props9$fill; return ( ((_node$props9 = node.props) === null || _node$props9 === void 0 ? void 0 : (_node$props9$fill = _node$props9.fill) === null || _node$props9$fill === void 0 ? void 0 : _node$props9$fill.type) === src.LinearGradient ); }; var hasRadialGradientFill = function hasRadialGradientFill(node) { var _node$props10, _node$props10$fill; return ( ((_node$props10 = node.props) === null || _node$props10 === void 0 ? void 0 : (_node$props10$fill = _node$props10.fill) === null || _node$props10$fill === void 0 ? void 0 : _node$props10$fill.type) === src.RadialGradient ); }; // Math simplified from https://github.com/devongovett/svgkit/blob/master/src/elements/SVGGradient.js#L104 var setLinearGradientFill = function setLinearGradientFill( ctx, node ) { var _node$props11; var bbox = getBoundingBox(node); var gradient = ((_node$props11 = node.props) === null || _node$props11 === void 0 ? void 0 : _node$props11.fill) || null; var x1 = gradient.props.x1 || 0; var y1 = gradient.props.y1 || 0; var x2 = gradient.props.x2 || 1; var y2 = gradient.props.y2 || 0; var m0 = bbox[2] - bbox[0]; var m3 = bbox[3] - bbox[1]; var m4 = bbox[0]; var m5 = bbox[1]; var gx1 = m0 * x1 + m4; var gy1 = m3 * y1 + m5; var gx2 = m0 * x2 + m4; var gy2 = m3 * y2 + m5; var grad = ctx.linearGradient(gx1, gy1, gx2, gy2); gradient.children.forEach(function (stop) { grad.stop( stop.props.offset, stop.props.stopColor, stop.props.stopOpacity ); }); ctx.fill(grad); }; // Math simplified from https://github.com/devongovett/svgkit/blob/master/src/elements/SVGGradient.js#L155 var setRadialGradientFill = function setRadialGradientFill( ctx, node ) { var _node$props12; var bbox = getBoundingBox(node); var gradient = ((_node$props12 = node.props) === null || _node$props12 === void 0 ? void 0 : _node$props12.fill) || null; var cx = gradient.props.cx || 0.5; var cy = gradient.props.cy || 0.5; var fx = gradient.props.fx || cx; var fy = gradient.props.fy || cy; var r = gradient.props.r || 0.5; var m0 = bbox[2] - bbox[0]; var m3 = bbox[3] - bbox[1]; var m4 = bbox[0]; var m5 = bbox[1]; var gr = r * m0; var gcx = m0 * cx + m4; var gcy = m3 * cy + m5; var gfx = m0 * fx + m4; var gfy = m3 * fy + m5; var grad = ctx.radialGradient(gfx, gfy, 0, gcx, gcy, gr); gradient.children.forEach(function (stop) { grad.stop( stop.props.offset, stop.props.stopColor, stop.props.stopOpacity ); }); ctx.fill(grad); }; var setFillColor = function setFillColor(ctx, node) { var _node$props13; var fillColor = ((_node$props13 = node.props) === null || _node$props13 === void 0 ? void 0 : _node$props13.fill) || null; if (fillColor) ctx.fillColor(fillColor); }; var setFill = function setFill(ctx, node) { if (hasLinearGradientFill(node)) return setLinearGradientFill(ctx, node); if (hasRadialGradientFill(node)) return setRadialGradientFill(ctx, node); return setFillColor(ctx, node); }; var draw = function draw(ctx, node) { var props = node.props || {}; if (props.fill && props.stroke) { ctx.fillAndStroke(props.fillRule); } else if (props.fill) { ctx.fill(props.fillRule); } else if (props.stroke) { ctx.stroke(); } else { ctx.save(); ctx.opacity(0); ctx.fill(null); ctx.restore(); } }; var noop = function noop() {}; var renderFns$1 = ((_renderFns$1 = {}), (_renderFns$1[src.Tspan] = noop), (_renderFns$1[src.TextInstance] = noop), (_renderFns$1[src.Path] = renderPath), (_renderFns$1[src.Rect] = renderRect), (_renderFns$1[src.Line] = renderLine$1), (_renderFns$1[src.G] = renderGroup), (_renderFns$1[src.Text] = renderSvgText), (_renderFns$1[src.Circle] = renderCircle), (_renderFns$1[src.Image] = renderImage$1), (_renderFns$1[src.Ellipse] = renderEllipse), (_renderFns$1[src.Polygon] = renderPolygon), (_renderFns$1[src.Polyline] = renderPolyline), _renderFns$1); var renderNode$1 = function renderNode(ctx, node) { var renderFn = renderFns$1[node.type]; if (renderFns$1) { renderFn(ctx, node); } else { console.warn( "SVG node of type " + node.type + " is not currenty supported" ); } }; var drawNode = function drawNode(ctx, node) { setLineCap(ctx, node); setLineDash(ctx, node); setLineJoin(ctx, node); setStrokeWidth(ctx, node); setStrokeColor(ctx, node); setFill(ctx, node); setStrokeOpacity(ctx, node); setFillOpacity(ctx, node); setOpacity(ctx, node); applyTransformations(ctx, node); renderNode$1(ctx, node); draw(ctx, node); }; var clipPath = function clipPath(ctx, node) { var _node$props14; var value = (_node$props14 = node.props) === null || _node$props14 === void 0 ? void 0 : _node$props14.clipPath; if (value) { var children = value.children || []; children.forEach(function (child) { return renderNode$1(ctx, child); }); ctx.clip(); } }; var drawChildren = function drawChildren(ctx, node) { var children = node.children || []; children.forEach(function (child) { ctx.save(); clipPath(ctx, child); drawNode(ctx, child); drawChildren(ctx, child); ctx.restore(); }); }; var resolveAspectRatio = function resolveAspectRatio(ctx, node) { var _node$box = node.box, width = _node$box.width, height = _node$box.height; var _node$props15 = node.props, viewBox = _node$props15.viewBox, _node$props15$preserv = _node$props15.preserveAspectRatio, preserveAspectRatio = _node$props15$preserv === void 0 ? {} : _node$props15$preserv; var _preserveAspectRatio$ = preserveAspectRatio.meetOrSlice, meetOrSlice = _preserveAspectRatio$ === void 0 ? "meet" : _preserveAspectRatio$, _preserveAspectRatio$2 = preserveAspectRatio.align, align = _preserveAspectRatio$2 === void 0 ? "xMidYMid" : _preserveAspectRatio$2; if (viewBox == null || width == null || height == null) return; var x = (viewBox === null || viewBox === void 0 ? void 0 : viewBox.minX) || 0; var y = (viewBox === null || viewBox === void 0 ? void 0 : viewBox.minY) || 0; var logicalWidth = (viewBox === null || viewBox === void 0 ? void 0 : viewBox.maxX) || width; var logicalHeight = (viewBox === null || viewBox === void 0 ? void 0 : viewBox.maxY) || height; var logicalRatio = logicalWidth / logicalHeight; var physicalRatio = width / height; var scaleX = width / logicalWidth; var scaleY = height / logicalHeight; if (align === "none") { ctx.scale(scaleX, scaleY); ctx.translate(-x, -y); return; } if ( (logicalRatio < physicalRatio && meetOrSlice === "meet") || (logicalRatio >= physicalRatio && meetOrSlice === "slice") ) { ctx.scale(scaleY, scaleY); switch (align) { case "xMinYMin": case "xMinYMid": case "xMinYMax": ctx.translate(-x, -y); break; case "xMidYMin": case "xMidYMid": case "xMidYMax": ctx.translate( -x - (logicalWidth - (width * logicalHeight) / height) / 2, -y ); break; default: ctx.translate( -x - (logicalWidth - (width * logicalHeight) / height), -y ); } } else { ctx.scale(scaleX, scaleX); switch (align) { case "xMinYMin": case "xMidYMin": case "xMaxYMin": ctx.translate(-x, -y); break; case "xMinYMid": case "xMidYMid": case "xMaxYMid": ctx.translate( -x, -y - (logicalHeight - (height * logicalWidth) / width) / 2 ); break; default: ctx.translate( -x, -y - (logicalHeight - (height * logicalWidth) / width) ); } } }; var moveToOrigin = function moveToOrigin(ctx, node) { var _node$box2 = node.box, top = _node$box2.top, left = _node$box2.left; var paddingLeft = node.box.paddingLeft || 0; var paddingTop = node.box.paddingTop || 0; ctx.translate(left + paddingLeft, top + paddingTop); }; var renderSvg = function renderSvg(ctx, node) { ctx.save(); clipNode(ctx, node); moveToOrigin(ctx, node); resolveAspectRatio(ctx, node); drawChildren(ctx, node); ctx.restore(); }; var parseColor = function parseColor(hex) { var parsed = color_string_default().get(hex); var value = color_string_default().to.hex( parsed.value.slice(0, 3) ); var opacity = parsed.value[3]; return { value: value, opacity: opacity, }; }; /* eslint-disable no-param-reassign */ var DEST_REGEXP = /^#.+/; var isSrcId$1 = function isSrcId(src) { return src.match(DEST_REGEXP); }; var renderAttachment = function renderAttachment(ctx, attachment) { var _attachment$xOffset = attachment.xOffset, xOffset = _attachment$xOffset === void 0 ? 0 : _attachment$xOffset, _attachment$yOffset = attachment.yOffset, yOffset = _attachment$yOffset === void 0 ? 0 : _attachment$yOffset, width = attachment.width, height = attachment.height, image = attachment.image; ctx.translate(-width + xOffset, -height + yOffset); ctx.image(image, 0, 0, { fit: [width, height], align: "center", valign: "bottom", }); }; var renderAttachments = function renderAttachments(ctx, run) { ctx.save(); var font = run.attributes.font; var space = font.glyphForCodePoint(0x20); var objectReplacement = font.glyphForCodePoint(0xfffc); var attachmentAdvance = 0; for (var i = 0; i < run.glyphs.length; i += 1) { var position = run.positions[i]; var glyph = run.glyphs[i]; attachmentAdvance += position.xAdvance || 0; if ( glyph.id === objectReplacement.id && run.attributes.attachment ) { ctx.translate(attachmentAdvance, position.yOffset || 0); renderAttachment(ctx, run.attributes.attachment); run.glyphs[i] = space; attachmentAdvance = 0; } } ctx.restore(); }; var renderRun = function renderRun(ctx, run, options) { var _run$attributes = run.attributes, font = _run$attributes.font, fontSize = _run$attributes.fontSize, link = _run$attributes.link; var color = parseColor(run.attributes.color); var opacity = (0, lib.isNil)(run.attributes.opacity) ? color.opacity : run.attributes.opacity; var height = (0, run_height["default"])(run); var descent = (0, run_descent["default"])(run); var runAdvanceWidth = (0, advanceWidth["default"])(run); if (options.outlineRuns) { ctx.rect(0, -height, runAdvanceWidth, height).stroke(); } ctx.fillColor(color.value); ctx.fillOpacity(opacity); if (link) { if (isSrcId$1(link)) { ctx.goTo( 0, -height - descent, runAdvanceWidth, height, link.slice(1) ); } else { ctx.link( 0, -height - descent, runAdvanceWidth, height, link ); } } renderAttachments(ctx, run); if (font.sbix || (font.COLR && font.CPAL)) { ctx.save(); ctx.translate(0, -run.ascent); for (var i = 0; i < run.glyphs.length; i += 1) { var position = run.positions[i]; var glyph = run.glyphs[i]; ctx.save(); ctx.translate(position.xOffset, position.yOffset); glyph.render(ctx, fontSize); ctx.restore(); ctx.translate(position.xAdvance, position.yAdvance); } ctx.restore(); } else { ctx.font( typeof font.name === "string" ? font.name : font, fontSize ); try { renderGlyphs(ctx, run.glyphs, run.positions, 0, 0); } catch (error) { console.log(error); } } ctx.translate(runAdvanceWidth, 0); }; var renderBackground$1 = function renderBackground( ctx, rect, backgroundColor ) { var color = parseColor(backgroundColor); ctx.save(); ctx.fillOpacity(color.opacity); ctx.rect(rect.x, rect.y, rect.width, rect.height); ctx.fill(color.value); ctx.restore(); }; var renderDecorationLine = function renderDecorationLine( ctx, line ) { ctx.save(); ctx.lineWidth(line.rect.height); ctx.strokeOpacity(line.opacity); if (/dashed/.test(line.style)) { ctx.dash(3 * line.rect.height); } else if (/dotted/.test(line.style)) { ctx.dash(line.rect.height); } if (/wavy/.test(line.style)) { var dist = Math.max(2, line.rect.height); var step = 1.1 * dist; var stepCount = Math.floor(line.rect.width / (2 * step)); // Adjust step to fill entire width var remainingWidth = line.rect.width - stepCount * 2 * step; var adjustment = remainingWidth / stepCount / 2; step += adjustment; var cp1y = line.rect.y + dist; var cp2y = line.rect.y - dist; var x = line.rect.x; ctx.moveTo(line.rect.x, line.rect.y); for (var i = 0; i < stepCount; i += 1) { ctx.bezierCurveTo( x + step, cp1y, x + step, cp2y, x + 2 * step, line.rect.y ); x += 2 * step; } } else { ctx.moveTo(line.rect.x, line.rect.y); ctx.lineTo(line.rect.x + line.rect.width, line.rect.y); if (/double/.test(line.style)) { ctx.moveTo( line.rect.x, line.rect.y + line.rect.height * 2 ); ctx.lineTo( line.rect.x + line.rect.width, line.rect.y + line.rect.height * 2 ); } } ctx.stroke(line.color); ctx.restore(); }; var renderLine = function renderLine(ctx, line, options) { var lineAscent = (0, ascent["default"])(line); if (options.outlineLines) { ctx.rect( line.box.x, line.box.y, line.box.width, line.box.height ).stroke(); } ctx.save(); ctx.translate(line.box.x, line.box.y + lineAscent); for (var i = 0; i < line.runs.length; i += 1) { var run = line.runs[i]; var isLastRun = i === line.runs.length - 1; if (run.attributes.backgroundColor) { var overflowRight = isLastRun ? line.overflowRight : 0; var backgroundRect = { x: 0, y: -lineAscent, height: line.box.height, width: (0, advanceWidth["default"])(run) - overflowRight, }; renderBackground$1( ctx, backgroundRect, run.attributes.backgroundColor ); } renderRun(ctx, run, options); } ctx.restore(); ctx.save(); ctx.translate(line.box.x, line.box.y); for (var _i = 0; _i < line.decorationLines.length; _i += 1) { var decorationLine = line.decorationLines[_i]; renderDecorationLine(ctx, decorationLine); } ctx.restore(); }; var renderBlock = function renderBlock(ctx, block, options) { block.forEach(function (line) { renderLine(ctx, line, options); }); }; var renderText = function renderText(ctx, node) { var _node$box2, _node$box3; var _node$box = node.box, top = _node$box.top, left = _node$box.left; var blocks = [node.lines]; var paddingTop = ((_node$box2 = node.box) === null || _node$box2 === void 0 ? void 0 : _node$box2.paddingTop) || 0; var paddingLeft = ((_node$box3 = node.box) === null || _node$box3 === void 0 ? void 0 : _node$box3.paddingLeft) || 0; var initialY = node.lines[0] ? node.lines[0].box.y : 0; var offsetX = node.alignOffset || 0; ctx.save(); ctx.translate( left + paddingLeft - offsetX, top + paddingTop - initialY ); blocks.forEach(function (block) { renderBlock(ctx, block, {}); }); ctx.restore(); }; var renderPage = function renderPage(ctx, node) { var _node$props; var _node$box = node.box, width = _node$box.width, height = _node$box.height; var dpi = ((_node$props = node.props) === null || _node$props === void 0 ? void 0 : _node$props.dpi) || 72; var userUnit = dpi / 72; ctx.addPage({ size: [width, height], margin: 0, userUnit: userUnit, }); }; var renderNote = function renderNote(ctx, node) { var _node$children, _node$style, _node$style2; var _node$box = node.box, top = _node$box.top, left = _node$box.left; var value = (node === null || node === void 0 ? void 0 : (_node$children = node.children) === null || _node$children === void 0 ? void 0 : _node$children[0].value) || ""; var color = ((_node$style = node.style) === null || _node$style === void 0 ? void 0 : _node$style.backgroundColor) || null; var borderWidth = ((_node$style2 = node.style) === null || _node$style2 === void 0 ? void 0 : _node$style2.borderWidth) || null; ctx.note(left, top, 0, 0, value, { color: color, borderWidth: borderWidth, }); }; var isNumeric = function isNumeric(n) { return !Number.isNaN(parseFloat(n)) && Number.isFinite(n); }; var applyContainObjectFit = function applyContainObjectFit( cw, ch, iw, ih, px, py ) { var cr = cw / ch; var ir = iw / ih; var pxp = (0, lib.matchPercent)(px); var pyp = (0, lib.matchPercent)(py); var pxv = pxp ? pxp.percent : 0.5; var pyv = pyp ? pyp.percent : 0.5; if (cr > ir) { var _height = ch; var _width = _height * ir; var _yOffset = isNumeric(py) ? py : 0; var _xOffset = isNumeric(px) ? px : (cw - _width) * pxv; return { width: _width, height: _height, xOffset: _xOffset, yOffset: _yOffset, }; } var width = cw; var height = width / ir; var xOffset = isNumeric(px) ? px : 0; var yOffset = isNumeric(py) ? py : (ch - height) * pyv; return { width: width, height: height, yOffset: yOffset, xOffset: xOffset, }; }; var applyNoneObjectFit = function applyNoneObjectFit( cw, ch, iw, ih, px, py ) { var width = iw; var height = ih; var pxp = (0, lib.matchPercent)(px); var pyp = (0, lib.matchPercent)(py); var pxv = pxp ? pxp.percent : 0.5; var pyv = pyp ? pyp.percent : 0.5; var xOffset = isNumeric(px) ? px : (cw - width) * pxv; var yOffset = isNumeric(py) ? py : (ch - height) * pyv; return { width: width, height: height, xOffset: xOffset, yOffset: yOffset, }; }; var applyCoverObjectFit = function applyCoverObjectFit( cw, ch, iw, ih, px, py ) { var ir = iw / ih; var cr = cw / ch; var pxp = (0, lib.matchPercent)(px); var pyp = (0, lib.matchPercent)(py); var pxv = pxp ? pxp.percent : 0.5; var pyv = pyp ? pyp.percent : 0.5; if (cr > ir) { var _width2 = cw; var _height2 = _width2 / ir; var _xOffset2 = isNumeric(px) ? px : 0; var _yOffset2 = isNumeric(py) ? py : (ch - _height2) * pyv; return { width: _width2, height: _height2, yOffset: _yOffset2, xOffset: _xOffset2, }; } var height = ch; var width = height * ir; var xOffset = isNumeric(px) ? px : (cw - width) * pxv; var yOffset = isNumeric(py) ? py : 0; return { width: width, height: height, xOffset: xOffset, yOffset: yOffset, }; }; var applyScaleDownObjectFit = function applyScaleDownObjectFit( cw, ch, iw, ih, px, py ) { var containDimension = applyContainObjectFit( cw, ch, iw, ih, px, py ); var noneDimension = applyNoneObjectFit(cw, ch, iw, ih, px, py); return containDimension.width < noneDimension.width ? containDimension : noneDimension; }; var applyFillObjectFit = function applyFillObjectFit( cw, ch, px, py ) { return { width: cw, height: ch, xOffset: (0, lib.matchPercent)(px) ? 0 : px || 0, yOffset: (0, lib.matchPercent)(py) ? 0 : py || 0, }; }; var resolveObjectFit = function resolveObjectFit( type, cw, ch, iw, ih, px, py ) { if (type === void 0) { type = "fill"; } switch (type) { case "contain": return applyContainObjectFit(cw, ch, iw, ih, px, py); case "cover": return applyCoverObjectFit(cw, ch, iw, ih, px, py); case "none": return applyNoneObjectFit(cw, ch, iw, ih, px, py); case "scale-down": return applyScaleDownObjectFit(cw, ch, iw, ih, px, py); default: return applyFillObjectFit(cw, ch, px, py); } }; var drawImage = function drawImage(ctx, node, options) { var _node$style, _node$style2, _node$style3, _node$style4; if (options === void 0) { options = {}; } var _node$box = node.box, left = _node$box.left, top = _node$box.top; var opacity = (_node$style = node.style) === null || _node$style === void 0 ? void 0 : _node$style.opacity; var objectFit = (_node$style2 = node.style) === null || _node$style2 === void 0 ? void 0 : _node$style2.objectFit; var objectPositionX = (_node$style3 = node.style) === null || _node$style3 === void 0 ? void 0 : _node$style3.objectPositionX; var objectPositionY = (_node$style4 = node.style) === null || _node$style4 === void 0 ? void 0 : _node$style4.objectPositionY; var paddingTop = node.box.paddingTop || 0; var paddingRight = node.box.paddingRight || 0; var paddingBottom = node.box.paddingBottom || 0; var paddingLeft = node.box.paddingLeft || 0; var imageCache = options.imageCache || new Map(); var _resolveObjectFit = resolveObjectFit( objectFit, node.box.width - paddingLeft - paddingRight, node.box.height - paddingTop - paddingBottom, node.image.width, node.image.height, objectPositionX, objectPositionY ), width = _resolveObjectFit.width, height = _resolveObjectFit.height, xOffset = _resolveObjectFit.xOffset, yOffset = _resolveObjectFit.yOffset; if (node.image.data) { if (width !== 0 && height !== 0) { var cacheKey = node.image.key; var image = imageCache.get(cacheKey) || ctx.embedImage(node.image.data); if (cacheKey) imageCache.set(cacheKey, image); var imageOpacity = (0, lib.isNil)(opacity) ? 1 : opacity; ctx.fillOpacity(imageOpacity).image( image, left + paddingLeft + xOffset, top + paddingTop + yOffset, { width: width, height: height, } ); } else { console.warn( "Image with src '" + JSON.stringify(node.props.src) + "' skipped due to invalid dimensions" ); } } }; var renderImage = function renderImage(ctx, node, options) { ctx.save(); clipNode(ctx, node); drawImage(ctx, node, options); ctx.restore(); }; var CONTENT_COLOR = "#a1c6e7"; var PADDING_COLOR = "#c4deb9"; var MARGIN_COLOR = "#f8cca1"; // TODO: Draw debug boxes using clipping to enhance quality var debugContent = function debugContent(ctx, node) { var _node$box = node.box, left = _node$box.left, top = _node$box.top, width = _node$box.width, height = _node$box.height, _node$box$paddingLeft = _node$box.paddingLeft, paddingLeft = _node$box$paddingLeft === void 0 ? 0 : _node$box$paddingLeft, _node$box$paddingTop = _node$box.paddingTop, paddingTop = _node$box$paddingTop === void 0 ? 0 : _node$box$paddingTop, _node$box$paddingRigh = _node$box.paddingRight, paddingRight = _node$box$paddingRigh === void 0 ? 0 : _node$box$paddingRigh, _node$box$paddingBott = _node$box.paddingBottom, paddingBottom = _node$box$paddingBott === void 0 ? 0 : _node$box$paddingBott, _node$box$borderLeftW = _node$box.borderLeftWidth, borderLeftWidth = _node$box$borderLeftW === void 0 ? 0 : _node$box$borderLeftW, _node$box$borderTopWi = _node$box.borderTopWidth, borderTopWidth = _node$box$borderTopWi === void 0 ? 0 : _node$box$borderTopWi, _node$box$borderRight = _node$box.borderRightWidth, borderRightWidth = _node$box$borderRight === void 0 ? 0 : _node$box$borderRight, _node$box$borderBotto = _node$box.borderBottomWidth, borderBottomWidth = _node$box$borderBotto === void 0 ? 0 : _node$box$borderBotto; ctx.fillColor(CONTENT_COLOR) .opacity(0.5) .rect( left + paddingLeft + borderLeftWidth, top + paddingTop + borderTopWidth, width - paddingLeft - paddingRight - borderRightWidth - borderLeftWidth, height - paddingTop - paddingBottom - borderTopWidth - borderBottomWidth ) .fill(); }; var debugPadding = function debugPadding(ctx, node) { var _node$box2 = node.box, left = _node$box2.left, top = _node$box2.top, width = _node$box2.width, height = _node$box2.height, _node$box2$paddingLef = _node$box2.paddingLeft, paddingLeft = _node$box2$paddingLef === void 0 ? 0 : _node$box2$paddingLef, _node$box2$paddingTop = _node$box2.paddingTop, paddingTop = _node$box2$paddingTop === void 0 ? 0 : _node$box2$paddingTop, _node$box2$paddingRig = _node$box2.paddingRight, paddingRight = _node$box2$paddingRig === void 0 ? 0 : _node$box2$paddingRig, _node$box2$paddingBot = _node$box2.paddingBottom, paddingBottom = _node$box2$paddingBot === void 0 ? 0 : _node$box2$paddingBot, _node$box2$borderLeft = _node$box2.borderLeftWidth, borderLeftWidth = _node$box2$borderLeft === void 0 ? 0 : _node$box2$borderLeft, _node$box2$borderTopW = _node$box2.borderTopWidth, borderTopWidth = _node$box2$borderTopW === void 0 ? 0 : _node$box2$borderTopW, _node$box2$borderRigh = _node$box2.borderRightWidth, borderRightWidth = _node$box2$borderRigh === void 0 ? 0 : _node$box2$borderRigh, _node$box2$borderBott = _node$box2.borderBottomWidth, borderBottomWidth = _node$box2$borderBott === void 0 ? 0 : _node$box2$borderBott; ctx.fillColor(PADDING_COLOR).opacity(0.5); // Padding top ctx.rect( left + paddingLeft + borderLeftWidth, top + borderTopWidth, width - paddingRight - paddingLeft - borderLeftWidth - borderRightWidth, paddingTop ).fill(); // Padding left ctx.rect( left + borderLeftWidth, top + borderTopWidth, paddingLeft, height - borderTopWidth - borderBottomWidth ).fill(); // Padding right ctx.rect( left + width - paddingRight - borderRightWidth, top + borderTopWidth, paddingRight, height - borderTopWidth - borderBottomWidth ).fill(); // Padding bottom ctx.rect( left + paddingLeft + borderLeftWidth, top + height - paddingBottom - borderBottomWidth, width - paddingRight - paddingLeft - borderLeftWidth - borderRightWidth, paddingBottom ).fill(); }; var getMargin = function getMargin(box) { var marginLeft = box.marginLeft === "auto" ? 0 : box.marginLeft; var marginTop = box.marginTop === "auto" ? 0 : box.marginTop; var marginRight = box.marginRight === "auto" ? 0 : box.marginRight; var marginBottom = box.marginBottom === "auto" ? 0 : box.marginBottom; return { marginLeft: marginLeft, marginTop: marginTop, marginRight: marginRight, marginBottom: marginBottom, }; }; var debugMargin = function debugMargin(ctx, node) { var _node$box3 = node.box, left = _node$box3.left, top = _node$box3.top, width = _node$box3.width, height = _node$box3.height; var _getMargin = getMargin(node.box), _getMargin$marginLeft = _getMargin.marginLeft, marginLeft = _getMargin$marginLeft === void 0 ? 0 : _getMargin$marginLeft, _getMargin$marginTop = _getMargin.marginTop, marginTop = _getMargin$marginTop === void 0 ? 0 : _getMargin$marginTop, _getMargin$marginRigh = _getMargin.marginRight, marginRight = _getMargin$marginRigh === void 0 ? 0 : _getMargin$marginRigh, _getMargin$marginBott = _getMargin.marginBottom, marginBottom = _getMargin$marginBott === void 0 ? 0 : _getMargin$marginBott; ctx.fillColor(MARGIN_COLOR).opacity(0.5); // Margin top ctx.rect(left, top - marginTop, width, marginTop).fill(); // Margin left ctx.rect( left - marginLeft, top - marginTop, marginLeft, height + marginTop + marginBottom ).fill(); // Margin right ctx.rect( left + width, top - marginTop, marginRight, height + marginTop + marginBottom ).fill(); // Margin bottom ctx.rect(left, top + height, width, marginBottom).fill(); }; var debugText = function debugText(ctx, node) { var _node$box4 = node.box, left = _node$box4.left, top = _node$box4.top, width = _node$box4.width, height = _node$box4.height; var _getMargin2 = getMargin(node.box), _getMargin2$marginLef = _getMargin2.marginLeft, marginLeft = _getMargin2$marginLef === void 0 ? 0 : _getMargin2$marginLef, _getMargin2$marginTop = _getMargin2.marginTop, marginTop = _getMargin2$marginTop === void 0 ? 0 : _getMargin2$marginTop, _getMargin2$marginRig = _getMargin2.marginRight, marginRight = _getMargin2$marginRig === void 0 ? 0 : _getMargin2$marginRig, _getMargin2$marginBot = _getMargin2.marginBottom, marginBottom = _getMargin2$marginBot === void 0 ? 0 : _getMargin2$marginBot; var roundedWidth = Math.round(width + marginLeft + marginRight); var roundedHeight = Math.round( height + marginTop + marginBottom ); ctx.fontSize(6) .opacity(1) .fillColor("black") .text( roundedWidth + " x " + roundedHeight, left - marginLeft, Math.max(top - marginTop - 4, 1) ); }; var debugOrigin = function debugOrigin(ctx, node) { if (node.origin) { ctx.circle(node.origin.left, node.origin.top, 3) .fill("red") .circle(node.origin.left, node.origin.top, 5) .stroke("red"); } }; var renderDebug = function renderDebug(ctx, node) { var _node$props; if ( !( (_node$props = node.props) !== null && _node$props !== void 0 && _node$props.debug ) ) return; ctx.save(); debugContent(ctx, node); debugPadding(ctx, node); debugMargin(ctx, node); debugText(ctx, node); debugOrigin(ctx, node); ctx.restore(); }; var availableMethods = [ "dash", "clip", "save", "path", "fill", "font", "text", "rect", "scale", "moveTo", "lineTo", "stroke", "rotate", "circle", "lineCap", "opacity", "ellipse", "polygon", "restore", "lineJoin", "fontSize", "fillColor", "lineWidth", "translate", "miterLimit", "strokeColor", "fillOpacity", "roundedRect", "fillAndStroke", "strokeOpacity", "bezierCurveTo", "quadraticCurveTo", "linearGradient", "radialGradient", ]; var painter = function painter(ctx) { var p = availableMethods.reduce(function (acc, prop) { var _extends2; return (0, esm_extends /* default */.Z)( {}, acc, ((_extends2 = {}), (_extends2[prop] = function () { ctx[prop].apply(ctx, arguments); return p; }), _extends2) ); }, {}); return p; }; var renderCanvas = function renderCanvas(ctx, node) { var _node$box = node.box, top = _node$box.top, left = _node$box.left, width = _node$box.width, height = _node$box.height; var paddingTop = node.box.paddingTop || 0; var paddingLeft = node.box.paddingLeft || 0; var paddingRight = node.box.paddingRight || 0; var paddingBottom = node.box.paddingBottom || 0; var availableWidth = width - paddingLeft - paddingRight; var availableHeight = height - paddingTop - paddingBottom; if (!availableWidth || !availableHeight) { console.warn( "Canvas element has null width or height. Please provide valid values via the `style` prop in order to correctly render it." ); } ctx.save().translate(left + paddingLeft, top + paddingTop); if (node.props.paint) { node.props.paint( painter(ctx), availableWidth, availableHeight ); } ctx.restore(); }; // Ref: https://www.w3.org/TR/css-backgrounds-3/#borders // 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 clipBorderTop = function clipBorderTop( ctx, layout, style, rtr, rtl ) { var top = layout.top, left = layout.left, width = layout.width, height = layout.height; var borderTopWidth = style.borderTopWidth, borderRightWidth = style.borderRightWidth, borderLeftWidth = style.borderLeftWidth; // Clip outer top border edge ctx.moveTo(left + rtl, top); ctx.lineTo(left + width - rtr, top); // Ellipse coefficients outer top right cap var c0 = rtr * (1.0 - KAPPA); // Clip outer top right cap ctx.bezierCurveTo( left + width - c0, top, left + width, top + c0, left + width, top + rtr ); // Move down in case the margin exceedes the radius var topRightYCoord = top + Math.max(borderTopWidth, rtr); ctx.lineTo(left + width, topRightYCoord); // Clip inner top right cap ctx.lineTo(left + width - borderRightWidth, topRightYCoord); // Ellipse coefficients inner top right cap var innerTopRightRadiusX = Math.max(rtr - borderRightWidth, 0); var innerTopRightRadiusY = Math.max(rtr - borderTopWidth, 0); var c1 = innerTopRightRadiusX * (1.0 - KAPPA); var c2 = innerTopRightRadiusY * (1.0 - KAPPA); // Clip inner top right cap ctx.bezierCurveTo( left + width - borderRightWidth, top + borderTopWidth + c2, left + width - borderRightWidth - c1, top + borderTopWidth, left + width - borderRightWidth - innerTopRightRadiusX, top + borderTopWidth ); // Clip inner top border edge ctx.lineTo( left + Math.max(rtl, borderLeftWidth), top + borderTopWidth ); // Ellipse coefficients inner top left cap var innerTopLeftRadiusX = Math.max(rtl - borderLeftWidth, 0); var innerTopLeftRadiusY = Math.max(rtl - borderTopWidth, 0); var c3 = innerTopLeftRadiusX * (1.0 - KAPPA); var c4 = innerTopLeftRadiusY * (1.0 - KAPPA); var topLeftYCoord = top + Math.max(borderTopWidth, rtl); // Clip inner top left cap ctx.bezierCurveTo( left + borderLeftWidth + c3, top + borderTopWidth, left + borderLeftWidth, top + borderTopWidth + c4, left + borderLeftWidth, topLeftYCoord ); ctx.lineTo(left, topLeftYCoord); // Move down in case the margin exceedes the radius ctx.lineTo(left, top + rtl); // Ellipse coefficients outer top left cap var c5 = rtl * (1.0 - KAPPA); // Clip outer top left cap ctx.bezierCurveTo( left, top + c5, left + c5, top, left + rtl, top ); ctx.closePath(); ctx.clip(); // Clip border top cap joins if (borderRightWidth) { var trSlope = -borderTopWidth / borderRightWidth; ctx.moveTo(left + width / 2, trSlope * (-width / 2) + top); ctx.lineTo(left + width, top); ctx.lineTo(left, top); ctx.lineTo(left, top + height); ctx.closePath(); ctx.clip(); } if (borderLeftWidth) { var _trSlope = -borderTopWidth / borderLeftWidth; ctx.moveTo(left + width / 2, _trSlope * (-width / 2) + top); ctx.lineTo(left, top); ctx.lineTo(left + width, top); ctx.lineTo(left + width, top + height); ctx.closePath(); ctx.clip(); } }; var fillBorderTop = function fillBorderTop( ctx, layout, style, rtr, rtl ) { var top = layout.top, left = layout.left, width = layout.width; var borderTopColor = style.borderTopColor, borderTopWidth = style.borderTopWidth, borderTopStyle = style.borderTopStyle, borderRightWidth = style.borderRightWidth, borderLeftWidth = style.borderLeftWidth; var c0 = rtl * (1.0 - KAPPA); var c1 = rtr * (1.0 - KAPPA); ctx.moveTo(left, top + Math.max(rtl, borderTopWidth)); ctx.bezierCurveTo( left, top + c0, left + c0, top, left + rtl, top ); ctx.lineTo(left + width - rtr, top); ctx.bezierCurveTo( left + width - c1, top, left + width, top + c1, left + width, top + rtr ); ctx.strokeColor(borderTopColor); ctx.lineWidth( Math.max( borderRightWidth, borderTopWidth, borderLeftWidth ) * 2 ); if (borderTopStyle === "dashed") { ctx.dash(borderTopWidth * 2, { space: borderTopWidth * 1.2, }); } else if (borderTopStyle === "dotted") { ctx.dash(borderTopWidth, { space: borderTopWidth * 1.2, }); } ctx.stroke(); ctx.undash(); }; var clipBorderRight = function clipBorderRight( ctx, layout, style, rtr, rbr ) { var top = layout.top, left = layout.left, width = layout.width, height = layout.height; var borderTopWidth = style.borderTopWidth, borderRightWidth = style.borderRightWidth, borderBottomWidth = style.borderBottomWidth; // Clip outer right border edge ctx.moveTo(left + width, top + rtr); ctx.lineTo(left + width, top + height - rbr); // Ellipse coefficients outer bottom right cap var c0 = rbr * (1.0 - KAPPA); // Clip outer top right cap ctx.bezierCurveTo( left + width, top + height - c0, left + width - c0, top + height, left + width - rbr, top + height ); // Move left in case the margin exceedes the radius var topBottomXCoord = left + width - Math.max(borderRightWidth, rbr); ctx.lineTo(topBottomXCoord, top + height); // Clip inner bottom right cap ctx.lineTo(topBottomXCoord, top + height - borderBottomWidth); // Ellipse coefficients inner bottom right cap var innerBottomRightRadiusX = Math.max( rbr - borderRightWidth, 0 ); var innerBottomRightRadiusY = Math.max( rbr - borderBottomWidth, 0 ); var c1 = innerBottomRightRadiusX * (1.0 - KAPPA); var c2 = innerBottomRightRadiusY * (1.0 - KAPPA); // Clip inner top right cap ctx.bezierCurveTo( left + width - borderRightWidth - c1, top + height - borderBottomWidth, left + width - borderRightWidth, top + height - borderBottomWidth - c2, left + width - borderRightWidth, top + height - Math.max(rbr, borderBottomWidth) ); // Clip inner right border edge ctx.lineTo( left + width - borderRightWidth, top + Math.max(rtr, borderTopWidth) ); // Ellipse coefficients inner top right cap var innerTopRightRadiusX = Math.max(rtr - borderRightWidth, 0); var innerTopRightRadiusY = Math.max(rtr - borderTopWidth, 0); var c3 = innerTopRightRadiusX * (1.0 - KAPPA); var c4 = innerTopRightRadiusY * (1.0 - KAPPA); var topRightXCoord = left + width - Math.max(rtr, borderRightWidth); // Clip inner top left cap ctx.bezierCurveTo( left + width - borderRightWidth, top + borderTopWidth + c4, left + width - borderRightWidth - c3, top + borderTopWidth, topRightXCoord, top + borderTopWidth ); ctx.lineTo(topRightXCoord, top); // Move right in case the margin exceedes the radius ctx.lineTo(left + width - rtr, top); // Ellipse coefficients outer top right cap var c5 = rtr * (1.0 - KAPPA); // Clip outer top right cap ctx.bezierCurveTo( left + width - c5, top, left + width, top + c5, left + width, top + rtr ); ctx.closePath(); ctx.clip(); // Clip border right cap joins if (borderTopWidth) { var trSlope = -borderTopWidth / borderRightWidth; ctx.moveTo(left + width / 2, trSlope * (-width / 2) + top); ctx.lineTo(left + width, top); ctx.lineTo(left + width, top + height); ctx.lineTo(left, top + height); ctx.closePath(); ctx.clip(); } if (borderBottomWidth) { var brSlope = borderBottomWidth / borderRightWidth; ctx.moveTo( left + width / 2, brSlope * (-width / 2) + top + height ); ctx.lineTo(left + width, top + height); ctx.lineTo(left + width, top); ctx.lineTo(left, top); ctx.closePath(); ctx.clip(); } }; var fillBorderRight = function fillBorderRight( ctx, layout, style, rtr, rbr ) { var top = layout.top, left = layout.left, width = layout.width, height = layout.height; var borderRightColor = style.borderRightColor, borderRightStyle = style.borderRightStyle, borderRightWidth = style.borderRightWidth, borderTopWidth = style.borderTopWidth, borderBottomWidth = style.borderBottomWidth; var c0 = rbr * (1.0 - KAPPA); var c1 = rtr * (1.0 - KAPPA); ctx.moveTo(left + width - rtr, top); ctx.bezierCurveTo( left + width - c1, top, left + width, top + c1, left + width, top + rtr ); ctx.lineTo(left + width, top + height - rbr); ctx.bezierCurveTo( left + width, top + height - c0, left + width - c0, top + height, left + width - rbr, top + height ); ctx.strokeColor(borderRightColor); ctx.lineWidth( Math.max( borderRightWidth, borderTopWidth, borderBottomWidth ) * 2 ); if (borderRightStyle === "dashed") { ctx.dash(borderRightWidth * 2, { space: borderRightWidth * 1.2, }); } else if (borderRightStyle === "dotted") { ctx.dash(borderRightWidth, { space: borderRightWidth * 1.2, }); } ctx.stroke(); ctx.undash(); }; var clipBorderBottom = function clipBorderBottom( ctx, layout, style, rbl, rbr ) { var top = layout.top, left = layout.left, width = layout.width, height = layout.height; var borderBottomWidth = style.borderBottomWidth, borderRightWidth = style.borderRightWidth, borderLeftWidth = style.borderLeftWidth; // Clip outer top border edge ctx.moveTo(left + width - rbr, top + height); ctx.lineTo(left + rbl, top + height); // Ellipse coefficients outer top right cap var c0 = rbl * (1.0 - KAPPA); // Clip outer top right cap ctx.bezierCurveTo( left + c0, top + height, left, top + height - c0, left, top + height - rbl ); // Move up in case the margin exceedes the radius var bottomLeftYCoord = top + height - Math.max(borderBottomWidth, rbl); ctx.lineTo(left, bottomLeftYCoord); // Clip inner bottom left cap ctx.lineTo(left + borderLeftWidth, bottomLeftYCoord); // Ellipse coefficients inner top right cap var innerBottomLeftRadiusX = Math.max(rbl - borderLeftWidth, 0); var innerBottomLeftRadiusY = Math.max( rbl - borderBottomWidth, 0 ); var c1 = innerBottomLeftRadiusX * (1.0 - KAPPA); var c2 = innerBottomLeftRadiusY * (1.0 - KAPPA); // Clip inner bottom left cap ctx.bezierCurveTo( left + borderLeftWidth, top + height - borderBottomWidth - c2, left + borderLeftWidth + c1, top + height - borderBottomWidth, left + borderLeftWidth + innerBottomLeftRadiusX, top + height - borderBottomWidth ); // Clip inner bottom border edge ctx.lineTo( left + width - Math.max(rbr, borderRightWidth), top + height - borderBottomWidth ); // Ellipse coefficients inner top left cap var innerBottomRightRadiusX = Math.max( rbr - borderRightWidth, 0 ); var innerBottomRightRadiusY = Math.max( rbr - borderBottomWidth, 0 ); var c3 = innerBottomRightRadiusX * (1.0 - KAPPA); var c4 = innerBottomRightRadiusY * (1.0 - KAPPA); var bottomRightYCoord = top + height - Math.max(borderBottomWidth, rbr); // Clip inner top left cap ctx.bezierCurveTo( left + width - borderRightWidth - c3, top + height - borderBottomWidth, left + width - borderRightWidth, top + height - borderBottomWidth - c4, left + width - borderRightWidth, bottomRightYCoord ); ctx.lineTo(left + width, bottomRightYCoord); // Move down in case the margin exceedes the radius ctx.lineTo(left + width, top + height - rbr); // Ellipse coefficients outer top left cap var c5 = rbr * (1.0 - KAPPA); // Clip outer top left cap ctx.bezierCurveTo( left + width, top + height - c5, left + width - c5, top + height, left + width - rbr, top + height ); ctx.closePath(); ctx.clip(); // Clip border bottom cap joins if (borderRightWidth) { var brSlope = borderBottomWidth / borderRightWidth; ctx.moveTo( left + width / 2, brSlope * (-width / 2) + top + height ); ctx.lineTo(left + width, top + height); ctx.lineTo(left, top + height); ctx.lineTo(left, top); ctx.closePath(); ctx.clip(); } if (borderLeftWidth) { var trSlope = -borderBottomWidth / borderLeftWidth; ctx.moveTo( left + width / 2, trSlope * (width / 2) + top + height ); ctx.lineTo(left, top + height); ctx.lineTo(left + width, top + height); ctx.lineTo(left + width, top); ctx.closePath(); ctx.clip(); } }; var fillBorderBottom = function fillBorderBottom( ctx, layout, style, rbl, rbr ) { var top = layout.top, left = layout.left, width = layout.width, height = layout.height; var borderBottomColor = style.borderBottomColor, borderBottomStyle = style.borderBottomStyle, borderBottomWidth = style.borderBottomWidth, borderRightWidth = style.borderRightWidth, borderLeftWidth = style.borderLeftWidth; var c0 = rbl * (1.0 - KAPPA); var c1 = rbr * (1.0 - KAPPA); ctx.moveTo(left + width, top + height - rbr); ctx.bezierCurveTo( left + width, top + height - c1, left + width - c1, top + height, left + width - rbr, top + height ); ctx.lineTo(left + rbl, top + height); ctx.bezierCurveTo( left + c0, top + height, left, top + height - c0, left, top + height - rbl ); ctx.strokeColor(borderBottomColor); ctx.lineWidth( Math.max( borderBottomWidth, borderRightWidth, borderLeftWidth ) * 2 ); if (borderBottomStyle === "dashed") { ctx.dash(borderBottomWidth * 2, { space: borderBottomWidth * 1.2, }); } else if (borderBottomStyle === "dotted") { ctx.dash(borderBottomWidth, { space: borderBottomWidth * 1.2, }); } ctx.stroke(); ctx.undash(); }; var clipBorderLeft = function clipBorderLeft( ctx, layout, style, rbl, rtl ) { var top = layout.top, left = layout.left, width = layout.width, height = layout.height; var borderTopWidth = style.borderTopWidth, borderLeftWidth = style.borderLeftWidth, borderBottomWidth = style.borderBottomWidth; // Clip outer left border edge ctx.moveTo(left, top + height - rbl); ctx.lineTo(left, top + rtl); // Ellipse coefficients outer top left cap var c0 = rtl * (1.0 - KAPPA); // Clip outer top left cap ctx.bezierCurveTo( left, top + c0, left + c0, top, left + rtl, top ); // Move right in case the margin exceedes the radius var topLeftCoordX = left + Math.max(borderLeftWidth, rtl); ctx.lineTo(topLeftCoordX, top); // Clip inner top left cap ctx.lineTo(topLeftCoordX, top + borderTopWidth); // Ellipse coefficients inner top left cap var innerTopLeftRadiusX = Math.max(rtl - borderLeftWidth, 0); var innerTopLeftRadiusY = Math.max(rtl - borderTopWidth, 0); var c1 = innerTopLeftRadiusX * (1.0 - KAPPA); var c2 = innerTopLeftRadiusY * (1.0 - KAPPA); // Clip inner top right cap ctx.bezierCurveTo( left + borderLeftWidth + c1, top + borderTopWidth, left + borderLeftWidth, top + borderTopWidth + c2, left + borderLeftWidth, top + Math.max(rtl, borderTopWidth) ); // Clip inner left border edge ctx.lineTo( left + borderLeftWidth, top + height - Math.max(rbl, borderBottomWidth) ); // Ellipse coefficients inner bottom left cap var innerBottomLeftRadiusX = Math.max(rbl - borderLeftWidth, 0); var innerBottomLeftRadiusY = Math.max( rbl - borderBottomWidth, 0 ); var c3 = innerBottomLeftRadiusX * (1.0 - KAPPA); var c4 = innerBottomLeftRadiusY * (1.0 - KAPPA); var bottomLeftXCoord = left + Math.max(rbl, borderLeftWidth); // Clip inner top left cap ctx.bezierCurveTo( left + borderLeftWidth, top + height - borderBottomWidth - c4, left + borderLeftWidth + c3, top + height - borderBottomWidth, bottomLeftXCoord, top + height - borderBottomWidth ); ctx.lineTo(bottomLeftXCoord, top + height); // Move left in case the margin exceedes the radius ctx.lineTo(left + rbl, top + height); // Ellipse coefficients outer top right cap var c5 = rbl * (1.0 - KAPPA); // Clip outer top right cap ctx.bezierCurveTo( left + c5, top + height, left, top + height - c5, left, top + height - rbl ); ctx.closePath(); ctx.clip(); // Clip border right cap joins if (borderBottomWidth) { var trSlope = -borderBottomWidth / borderLeftWidth; ctx.moveTo( left + width / 2, trSlope * (width / 2) + top + height ); ctx.lineTo(left, top + height); ctx.lineTo(left, top); ctx.lineTo(left + width, top); ctx.closePath(); ctx.clip(); } if (borderBottomWidth) { var _trSlope2 = -borderTopWidth / borderLeftWidth; ctx.moveTo( left + width / 2, _trSlope2 * (-width / 2) + top ); ctx.lineTo(left, top); ctx.lineTo(left, top + height); ctx.lineTo(left + width, top + height); ctx.closePath(); ctx.clip(); } }; var fillBorderLeft = function fillBorderLeft( ctx, layout, style, rbl, rtl ) { var top = layout.top, left = layout.left, height = layout.height; var borderLeftColor = style.borderLeftColor, borderLeftStyle = style.borderLeftStyle, borderLeftWidth = style.borderLeftWidth, borderTopWidth = style.borderTopWidth, borderBottomWidth = style.borderBottomWidth; var c0 = rbl * (1.0 - KAPPA); var c1 = rtl * (1.0 - KAPPA); ctx.moveTo(left + rbl, top + height); ctx.bezierCurveTo( left + c0, top + height, left, top + height - c0, left, top + height - rbl ); ctx.lineTo(left, top + rtl); ctx.bezierCurveTo( left, top + c1, left + c1, top, left + rtl, top ); ctx.strokeColor(borderLeftColor); ctx.lineWidth( Math.max( borderLeftWidth, borderTopWidth, borderBottomWidth ) * 2 ); if (borderLeftStyle === "dashed") { ctx.dash(borderLeftWidth * 2, { space: borderLeftWidth * 1.2, }); } else if (borderLeftStyle === "dotted") { ctx.dash(borderLeftWidth, { space: borderLeftWidth * 1.2, }); } ctx.stroke(); ctx.undash(); }; var shouldRenderBorders = function shouldRenderBorders(node) { return ( node.box && (node.box.borderTopWidth || node.box.borderRightWidth || node.box.borderBottomWidth || node.box.borderLeftWidth) ); }; var renderBorders = function renderBorders(ctx, node) { if (!shouldRenderBorders(node)) return; var _node$box = node.box, width = _node$box.width, height = _node$box.height, borderTopWidth = _node$box.borderTopWidth, borderLeftWidth = _node$box.borderLeftWidth, borderRightWidth = _node$box.borderRightWidth, borderBottomWidth = _node$box.borderBottomWidth; var _node$style = node.style, opacity = _node$style.opacity, _node$style$borderTop = _node$style.borderTopLeftRadius, borderTopLeftRadius = _node$style$borderTop === void 0 ? 0 : _node$style$borderTop, _node$style$borderTop2 = _node$style.borderTopRightRadius, borderTopRightRadius = _node$style$borderTop2 === void 0 ? 0 : _node$style$borderTop2, _node$style$borderBot = _node$style.borderBottomLeftRadius, borderBottomLeftRadius = _node$style$borderBot === void 0 ? 0 : _node$style$borderBot, _node$style$borderBot2 = _node$style.borderBottomRightRadius, borderBottomRightRadius = _node$style$borderBot2 === void 0 ? 0 : _node$style$borderBot2, _node$style$borderTop3 = _node$style.borderTopColor, borderTopColor = _node$style$borderTop3 === void 0 ? "black" : _node$style$borderTop3, _node$style$borderTop4 = _node$style.borderTopStyle, borderTopStyle = _node$style$borderTop4 === void 0 ? "solid" : _node$style$borderTop4, _node$style$borderLef = _node$style.borderLeftColor, borderLeftColor = _node$style$borderLef === void 0 ? "black" : _node$style$borderLef, _node$style$borderLef2 = _node$style.borderLeftStyle, borderLeftStyle = _node$style$borderLef2 === void 0 ? "solid" : _node$style$borderLef2, _node$style$borderRig = _node$style.borderRightColor, borderRightColor = _node$style$borderRig === void 0 ? "black" : _node$style$borderRig, _node$style$borderRig2 = _node$style.borderRightStyle, borderRightStyle = _node$style$borderRig2 === void 0 ? "solid" : _node$style$borderRig2, _node$style$borderBot3 = _node$style.borderBottomColor, borderBottomColor = _node$style$borderBot3 === void 0 ? "black" : _node$style$borderBot3, _node$style$borderBot4 = _node$style.borderBottomStyle, borderBottomStyle = _node$style$borderBot4 === void 0 ? "solid" : _node$style$borderBot4; var style = { borderTopColor: borderTopColor, borderTopWidth: borderTopWidth, borderTopStyle: borderTopStyle, borderLeftColor: borderLeftColor, borderLeftWidth: borderLeftWidth, borderLeftStyle: borderLeftStyle, borderRightColor: borderRightColor, borderRightWidth: borderRightWidth, borderRightStyle: borderRightStyle, borderBottomColor: borderBottomColor, borderBottomWidth: borderBottomWidth, borderBottomStyle: borderBottomStyle, borderTopLeftRadius: borderTopLeftRadius, borderTopRightRadius: borderTopRightRadius, borderBottomLeftRadius: borderBottomLeftRadius, borderBottomRightRadius: borderBottomRightRadius, }; var rtr = Math.min( borderTopRightRadius, 0.5 * width, 0.5 * height ); var rtl = Math.min( borderTopLeftRadius, 0.5 * width, 0.5 * height ); var rbr = Math.min( borderBottomRightRadius, 0.5 * width, 0.5 * height ); var rbl = Math.min( borderBottomLeftRadius, 0.5 * width, 0.5 * height ); ctx.save(); ctx.strokeOpacity(opacity); if (borderTopWidth) { ctx.save(); clipBorderTop(ctx, node.box, style, rtr, rtl); fillBorderTop(ctx, node.box, style, rtr, rtl); ctx.restore(); } if (borderRightWidth) { ctx.save(); clipBorderRight(ctx, node.box, style, rtr, rbr); fillBorderRight(ctx, node.box, style, rtr, rbr); ctx.restore(); } if (borderBottomWidth) { ctx.save(); clipBorderBottom(ctx, node.box, style, rbl, rbr); fillBorderBottom(ctx, node.box, style, rbl, rbr); ctx.restore(); } if (borderLeftWidth) { ctx.save(); clipBorderLeft(ctx, node.box, style, rbl, rtl); fillBorderLeft(ctx, node.box, style, rbl, rtl); ctx.restore(); } ctx.restore(); }; var drawBackground = function drawBackground(ctx, node) { var _node$style; var _node$box = node.box, top = _node$box.top, left = _node$box.left, width = _node$box.width, height = _node$box.height; var color = parseColor(node.style.backgroundColor); var nodeOpacity = (0, lib.isNil)( (_node$style = node.style) === null || _node$style === void 0 ? void 0 : _node$style.opacity ) ? 1 : node.style.opacity; var opacity = Math.min(color.opacity, nodeOpacity); ctx.fillOpacity(opacity) .fillColor(color.value) .rect(left, top, width, height) .fill(); }; var renderBackground = function renderBackground(ctx, node) { var _node$style2; var hasBackground = !!node.box && !!( (_node$style2 = node.style) !== null && _node$style2 !== void 0 && _node$style2.backgroundColor ); if (hasBackground) { ctx.save(); clipNode(ctx, node); drawBackground(ctx, node); ctx.restore(); } }; var isSrcId = function isSrcId(value) { return /^#.+/.test(value); }; var setLink = function setLink(ctx, node) { var props = node.props || {}; var _node$box = node.box, top = _node$box.top, left = _node$box.left, width = _node$box.width, height = _node$box.height; var src = props.src || props.href; if (src) { var isId = isSrcId(src); var method = isId ? "goTo" : "link"; var value = isId ? src.slice(1) : src; ctx[method](left, top, width, height, value); } }; var setDestination = function setDestination(ctx, node) { var _node$props; if ( (_node$props = node.props) !== null && _node$props !== void 0 && _node$props.id ) { ctx.addNamedDestination( node.props.id, "XYZ", null, node.box.top, null ); } }; var _renderFns; var isRecursiveNode = function isRecursiveNode(node) { return node.type !== src.Text && node.type !== src.Svg; }; var renderChildren = function renderChildren(ctx, node, options) { ctx.save(); if (node.box) { ctx.translate(node.box.left, node.box.top); } var children = node.children || []; var renderChild = function renderChild(child) { return renderNode(ctx, child, options); }; children.forEach(renderChild); ctx.restore(); }; var renderFns = ((_renderFns = {}), (_renderFns[src.Text] = renderText), (_renderFns[src.Note] = renderNote), (_renderFns[src.Image] = renderImage), (_renderFns[src.Canvas] = renderCanvas), (_renderFns[src.Svg] = renderSvg), (_renderFns[src.Link] = setLink), _renderFns); var renderNode = function renderNode(ctx, node, options) { var _node$style; var overflowHidden = ((_node$style = node.style) === null || _node$style === void 0 ? void 0 : _node$style.overflow) === "hidden"; var shouldRenderChildren = isRecursiveNode(node); if (node.type === src.Page) renderPage(ctx, node); ctx.save(); if (overflowHidden) clipNode(ctx, node); applyTransformations(ctx, node); renderBackground(ctx, node); renderBorders(ctx, node); var renderFn = renderFns[node.type]; if (renderFn) renderFn(ctx, node, options); if (shouldRenderChildren) renderChildren(ctx, node, options); setDestination(ctx, node); renderDebug(ctx, node); ctx.restore(); }; /* eslint-disable no-param-reassign */ var setPDFMetadata = function setPDFMetadata(target) { return function (key, value) { if (value) target.info[key] = value; }; }; /** * Set document instance metadata * * @param {Object} ctx document instance * @param {Object} doc document root */ var addMetadata = function addMetadata(ctx, doc) { var setProp = setPDFMetadata(ctx); var props = doc.props || {}; var title = props.title || null; var author = props.author || null; var subject = props.subject || null; var keywords = props.keywords || null; var creator = props.creator || "react-pdf"; var producer = props.producer || "react-pdf"; setProp("Title", title); setProp("Author", author); setProp("Subject", subject); setProp("Keywords", keywords); setProp("Creator", creator); setProp("Producer", producer); }; /* eslint-disable no-param-reassign */ var addNodeBookmark = function addNodeBookmark( ctx, node, pageNumber, registry ) { var _node$props; var bookmark = (_node$props = node.props) === null || _node$props === void 0 ? void 0 : _node$props.bookmark; if (bookmark) { var title = bookmark.title, parent = bookmark.parent, expanded = bookmark.expanded, zoom = bookmark.zoom, fit = bookmark.fit; var outline = registry[parent] || ctx.outline; var top = bookmark.top || node.box.top; var left = bookmark.left || node.box.left; var instance = outline.addItem(title, { pageNumber: pageNumber, expanded: expanded, top: top, left: left, zoom: zoom, fit: fit, }); registry[bookmark.ref] = instance; } if (!node.children) return; node.children.forEach(function (child) { return addNodeBookmark(ctx, child, pageNumber, registry); }); }; var addBookmarks = function addBookmarks(ctx, root) { var registry = {}; var pages = root.children || []; pages.forEach(function (page, i) { addNodeBookmark(ctx, page, i, registry); }); }; var index_es_render = function render(ctx, doc) { var pages = doc.children || []; var options = { imageCache: new Map(), }; addMetadata(ctx, doc); pages.forEach(function (page) { return renderNode(ctx, page, options); }); addBookmarks(ctx, doc); ctx.end(); return ctx; }; // EXTERNAL MODULE: ./node_modules/@react-pdf/pdfkit/lib/pdfkit.browser.es.js var pdfkit_browser_es = __webpack_require__(6054); // EXTERNAL MODULE: ./node_modules/@react-pdf/layout/lib/index.cjs.js var index_cjs = __webpack_require__(791); // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/objectWithoutPropertiesLoose.js function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } // EXTERNAL MODULE: ./node_modules/react-reconciler/index.js var react_reconciler = __webpack_require__(8448); var react_reconciler_default = /*#__PURE__*/ __webpack_require__.n(react_reconciler); // EXTERNAL MODULE: ./node_modules/@react-pdf/renderer/node_modules/scheduler/index.js var scheduler = __webpack_require__(6821); // CONCATENATED MODULE: ./node_modules/@react-pdf/renderer/lib/react-pdf.browser.es.js /* eslint-disable no-continue */ /** * Checks if two sets of props are equal (recursively) * * @param {Object} props A * @param {Object} props B * @returns {Boolean} props equals? * */ var propsEqual = function propsEqual(a, b) { var oldPropsKeys = Object.keys(a); var newPropsKeys = Object.keys(b); if (oldPropsKeys.length !== newPropsKeys.length) { return false; } for (var i = 0; i < oldPropsKeys.length; i += 1) { var propName = oldPropsKeys[i]; if ( propName === "render" && !a[propName] !== !b[propName] ) { return false; } if ( propName !== "children" && a[propName] !== b[propName] ) { if ( typeof a[propName] === "object" && typeof b[propName] === "object" && propsEqual(a[propName], b[propName]) ) { continue; } return false; } if ( propName === "children" && (typeof a[propName] === "string" || typeof b[propName] === "string") ) { return a[propName] === b[propName]; } } return true; }; var _excluded$1 = ["style", "children"], _excluded2 = ["style"]; var emptyObject = {}; var createRenderer = function createRenderer(_ref) { var _ref$onChange = _ref.onChange, onChange = _ref$onChange === void 0 ? function () {} : _ref$onChange; return react_reconciler_default()({ schedulePassiveEffects: scheduler.unstable_scheduleCallback, cancelPassiveEffects: scheduler.unstable_cancelCallback, supportsMutation: true, isPrimaryRenderer: false, warnsIfNotActing: false, appendInitialChild: function appendInitialChild( parentInstance, child ) { parentInstance.children.push(child); }, createInstance: function createInstance(type, _ref2) { var style = _ref2.style; _ref2.children; var props = _objectWithoutPropertiesLoose( _ref2, _excluded$1 ); return { type: type, box: {}, style: style || {}, props: props || {}, children: [], }; }, createTextInstance: function createTextInstance( text, rootContainerInstance ) { return { type: "TEXT_INSTANCE", value: text, }; }, finalizeInitialChildren: function finalizeInitialChildren( element, type, props ) { return false; }, getPublicInstance: function getPublicInstance(instance) { return instance; }, prepareForCommit: function prepareForCommit() { // Noop }, clearContainer: function clearContainer() { // Noop }, prepareUpdate: function prepareUpdate( element, type, oldProps, newProps ) { return !propsEqual(oldProps, newProps); }, resetAfterCommit: onChange, resetTextContent: function resetTextContent(element) { // Noop }, getRootHostContext: function getRootHostContext() { return emptyObject; }, getChildHostContext: function getChildHostContext() { return emptyObject; }, shouldSetTextContent: function shouldSetTextContent( type, props ) { return false; }, now: Date.now, useSyncScheduling: true, appendChild: function appendChild(parentInstance, child) { parentInstance.children.push(child); }, appendChildToContainer: function appendChildToContainer( parentInstance, child ) { if (parentInstance.type === "ROOT") { parentInstance.document = child; } else { parentInstance.children.push(child); } }, insertBefore: function insertBefore( parentInstance, child, beforeChild ) { var _parentInstance$child; var index = (_parentInstance$child = parentInstance.children) === null || _parentInstance$child === void 0 ? void 0 : _parentInstance$child.indexOf(beforeChild); if (index === undefined) return; if (index !== -1 && child) parentInstance.children.splice(index, 0, child); }, removeChild: function removeChild(parentInstance, child) { var _parentInstance$child2; var index = (_parentInstance$child2 = parentInstance.children) === null || _parentInstance$child2 === void 0 ? void 0 : _parentInstance$child2.indexOf(child); if (index === undefined) return; if (index !== -1) parentInstance.children.splice(index, 1); }, removeChildFromContainer: function removeChildFromContainer( parentInstance, child ) { var _parentInstance$child3; var index = (_parentInstance$child3 = parentInstance.children) === null || _parentInstance$child3 === void 0 ? void 0 : _parentInstance$child3.indexOf(child); if (index === undefined) return; if (index !== -1) parentInstance.children.splice(index, 1); }, commitTextUpdate: function commitTextUpdate( textInstance, oldText, newText ) { textInstance.value = newText; }, commitUpdate: function commitUpdate( instance, updatePayload, type, oldProps, newProps ) { var style = newProps.style, props = _objectWithoutPropertiesLoose( newProps, _excluded2 ); instance.props = props; instance.style = style; }, }); }; var version = "2.1.2"; var fontStore = new index_browser /* default */.Z(); // We must keep a single renderer instance, otherwise React will complain var renderer; // The pdf instance acts as an event emitter for DOM usage. // We only want to trigger an update when PDF content changes var events = {}; var pdf = function pdf(initialValue) { var onChange = function onChange() { var _events$change; var listeners = ((_events$change = events.change) === null || _events$change === void 0 ? void 0 : _events$change.slice()) || []; for (var i = 0; i < listeners.length; i += 1) { listeners[i](); } }; var container = { type: "ROOT", document: null, }; renderer = renderer || createRenderer({ onChange: onChange, }); var mountNode = renderer.createContainer(container); var updateContainer = function updateContainer(doc) { renderer.updateContainer(doc, mountNode, null); }; if (initialValue) updateContainer(initialValue); var render = /*#__PURE__*/ (function () { var _ref = _asyncToGenerator( /*#__PURE__*/ regenerator_default().mark( function _callee(compress) { var props, pdfVersion, language, ctx, layout; return regenerator_default().wrap( function _callee$(_context) { while (1) { switch ( (_context.prev = _context.next) ) { case 0: if (compress === void 0) { compress = true; } props = container.document .props || {}; (pdfVersion = props.pdfVersion), (language = props.language); ctx = new pdfkit_browser_es[ "default" ]({ compress: compress, pdfVersion: pdfVersion, lang: language, displayTitle: true, autoFirstPage: false, }); _context.next = 6; return (0, index_cjs /* default */.Z)( container.document, fontStore ); case 6: layout = _context.sent; return _context.abrupt( "return", index_es_render( ctx, layout ) ); case 8: case "end": return _context.stop(); } } }, _callee ); } ) ); return function render(_x) { return _ref.apply(this, arguments); }; })(); var callOnRender = function callOnRender(params) { if (params === void 0) { params = {}; } if (container.document.props.onRender) { container.document.props.onRender(params); } }; var toBlob = /*#__PURE__*/ (function () { var _ref2 = _asyncToGenerator( /*#__PURE__*/ regenerator_default().mark( function _callee2() { var instance, stream; return regenerator_default().wrap( function _callee2$(_context2) { while (1) { switch ( (_context2.prev = _context2.next) ) { case 0: _context2.next = 2; return render(); case 2: instance = _context2.sent; stream = instance.pipe( blob_stream_default()() ); return _context2.abrupt( "return", new Promise(function ( resolve, reject ) { stream.on( "finish", function () { try { var blob = stream.toBlob( "application/pdf" ); callOnRender( { blob: blob, } ); resolve( blob ); } catch (error) { reject( error ); } } ); stream.on( "error", reject ); }) ); case 5: case "end": return _context2.stop(); } } }, _callee2 ); } ) ); return function toBlob() { return _ref2.apply(this, arguments); }; })(); var toBuffer = /*#__PURE__*/ (function () { var _ref3 = _asyncToGenerator( /*#__PURE__*/ regenerator_default().mark( function _callee3() { return regenerator_default().wrap( function _callee3$(_context3) { while (1) { switch ( (_context3.prev = _context3.next) ) { case 0: callOnRender(); return _context3.abrupt( "return", render() ); case 2: case "end": return _context3.stop(); } } }, _callee3 ); } ) ); return function toBuffer() { return _ref3.apply(this, arguments); }; })(); var toString = /*#__PURE__*/ (function () { var _ref4 = _asyncToGenerator( /*#__PURE__*/ regenerator_default().mark( function _callee4() { var result, instance; return regenerator_default().wrap( function _callee4$(_context4) { while (1) { switch ( (_context4.prev = _context4.next) ) { case 0: result = ""; _context4.next = 3; return render(false); case 3: instance = _context4.sent; return _context4.abrupt( "return", new Promise(function ( resolve, reject ) { try { instance.on( "data", function ( buffer ) { result += buffer; } ); instance.on( "end", function () { callOnRender(); resolve( result ); } ); } catch (error) { reject(error); } }) ); case 5: case "end": return _context4.stop(); } } }, _callee4 ); } ) ); return function toString() { return _ref4.apply(this, arguments); }; })(); var on = function on(event, listener) { if (!events[event]) events[event] = []; events[event].push(listener); }; var removeListener = function removeListener(event, listener) { if (!events[event]) return; var idx = events[event].indexOf(listener); if (idx > -1) events[event].splice(idx, 1); }; return { on: on, container: container, toBlob: toBlob, toBuffer: toBuffer, toString: toString, removeListener: removeListener, updateContainer: updateContainer, }; }; var Font = fontStore; var StyleSheet = { create: function create(s) { return s; }, }; var usePDF = function usePDF(_ref) { var document = _ref.document; var pdfInstance = (0, react.useRef)(null); var _useState = (0, react.useState)({ url: null, blob: null, error: null, loading: false, }), state = _useState[0], setState = _useState[1]; // Setup rendering queue (0, react.useEffect)(function () { var renderQueue = queue_default()({ autostart: true, concurrency: 1, }); var queueDocumentRender = function queueDocumentRender() { setState(function (prev) { return (0, esm_extends /* default */.Z)({}, prev, { loading: true, }); }); renderQueue.splice(0, renderQueue.length, function () { return state.error ? Promise.resolve() : pdfInstance.current.toBlob(); }); }; var onRenderFailed = function onRenderFailed(error) { console.error(error); setState(function (prev) { return (0, esm_extends /* default */.Z)({}, prev, { error: error, }); }); }; var onRenderSuccessful = function onRenderSuccessful(blob) { setState({ blob: blob, error: null, loading: false, url: URL.createObjectURL(blob), }); }; pdfInstance.current = pdf(); pdfInstance.current.on("change", queueDocumentRender); pdfInstance.current.updateContainer(document); renderQueue.on("error", onRenderFailed); renderQueue.on("success", onRenderSuccessful); return function () { renderQueue.end(); pdfInstance.current.removeListener( "change", queueDocumentRender ); }; }, []); // Revoke old unused url instances (0, react.useEffect)( function () { return function () { if (state.url) { URL.revokeObjectURL(state.url); } }; }, [state.url] ); var update = function update() { pdfInstance.current.updateContainer(document); }; return [state, update]; }; var _excluded = [ "title", "style", "className", "children", "innerRef", "showToolbar", ]; var PDFViewer = function PDFViewer(_ref) { var title = _ref.title, style = _ref.style, className = _ref.className, children = _ref.children, innerRef = _ref.innerRef, _ref$showToolbar = _ref.showToolbar, showToolbar = _ref$showToolbar === void 0 ? true : _ref$showToolbar, props = _objectWithoutPropertiesLoose(_ref, _excluded); var _usePDF = usePDF({ document: children, }), instance = _usePDF[0], updateInstance = _usePDF[1]; (0, react.useEffect)(updateInstance, [children]); var src = instance.url ? instance.url + "#toolbar=" + (showToolbar ? 1 : 0) : null; return /*#__PURE__*/ react.createElement( "iframe", (0, esm_extends /* default */.Z)( { src: src, title: title, ref: innerRef, style: style, className: className, }, props ) ); }; /* eslint-disable no-console */ var BlobProvider = function BlobProvider(_ref) { var doc = _ref.document, children = _ref.children; var _usePDF = usePDF({ document: doc, }), instance = _usePDF[0], updateInstance = _usePDF[1]; (0, react.useEffect)(updateInstance, [doc]); if (!doc) { console.warn( "You should pass a valid document to BlobProvider" ); return null; } return children(instance); }; /* eslint-disable no-console */ var PDFDownloadLink = function PDFDownloadLink(_ref) { var style = _ref.style, children = _ref.children, className = _ref.className, doc = _ref.document, _ref$fileName = _ref.fileName, fileName = _ref$fileName === void 0 ? "document.pdf" : _ref$fileName; var _usePDF = usePDF({ document: doc, }), instance = _usePDF[0], updateInstance = _usePDF[1]; (0, react.useEffect)(updateInstance, [children]); if (!doc) { console.warn( "You should pass a valid document to PDFDownloadLink" ); return null; } var handleDownloadIE = function handleDownloadIE() { if (window.navigator.msSaveBlob) { // IE window.navigator.msSaveBlob(instance.blob, fileName); } }; return /*#__PURE__*/ react.createElement( "a", { style: style, href: instance.url, download: fileName, className: className, onClick: handleDownloadIE, }, typeof children === "function" ? children(instance) : children ); }; var throwEnvironmentError = function throwEnvironmentError(name) { throw new Error( name + " is a Node specific API. You're either using this method in a browser, or your bundler is not loading react-pdf from the appropriate web build." ); }; var renderToStream = function renderToStream() { throwEnvironmentError("renderToStream"); }; var renderToString = function renderToString() { throwEnvironmentError("renderToString"); }; var renderToFile = function renderToFile() { throwEnvironmentError("renderToFile"); }; var render = function render() { throwEnvironmentError("render"); }; var index = (0, esm_extends /* default */.Z)( { pdf: pdf, usePDF: usePDF, Font: Font, version: version, StyleSheet: StyleSheet, PDFViewer: PDFViewer, BlobProvider: BlobProvider, PDFDownloadLink: PDFDownloadLink, renderToStream: renderToStream, renderToString: renderToString, renderToFile: renderToFile, render: render, }, src ); //# sourceMappingURL=react-pdf.browser.es.js.map /***/ }, /***/ 6665: /***/ function (__unused_webpack_module, exports) { "use strict"; /** @license React v0.17.0 * scheduler.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ Object.defineProperty(exports, "__esModule", { value: !0 }); var f, g, h, k, l; if ( "undefined" === typeof window || "function" !== typeof MessageChannel ) { var p = null, q = null, t = function () { if (null !== p) try { var a = exports.unstable_now(); p(!0, a); p = null; } catch (b) { throw (setTimeout(t, 0), b); } }, u = Date.now(); exports.unstable_now = function () { return Date.now() - u; }; f = function (a) { null !== p ? setTimeout(f, 0, a) : ((p = a), setTimeout(t, 0)); }; g = function (a, b) { q = setTimeout(a, b); }; h = function () { clearTimeout(q); }; k = function () { return !1; }; l = exports.unstable_forceFrameRate = function () {}; } else { var w = window.performance, x = window.Date, y = window.setTimeout, z = window.clearTimeout, A = window.requestAnimationFrame, B = window.cancelAnimationFrame; "undefined" !== typeof console && ("function" !== typeof A && console.error( "This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills" ), "function" !== typeof B && console.error( "This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills" )); if ("object" === typeof w && "function" === typeof w.now) exports.unstable_now = function () { return w.now(); }; else { var C = x.now(); exports.unstable_now = function () { return x.now() - C; }; } var D = !1, E = null, F = -1, G = 5, H = 0; k = function () { return exports.unstable_now() >= H; }; l = function () {}; exports.unstable_forceFrameRate = function (a) { 0 > a || 125 < a ? console.error( "forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported" ) : (G = 0 < a ? Math.floor(1e3 / a) : 33.33); }; var I = new MessageChannel(), J = I.port2; I.port1.onmessage = function () { if (null !== E) { var a = exports.unstable_now(); H = a + G; try { E(!0, a) ? J.postMessage(null) : ((D = !1), (E = null)); } catch (b) { throw (J.postMessage(null), b); } } else D = !1; }; f = function (a) { E = a; D || ((D = !0), J.postMessage(null)); }; g = function (a, b) { F = y(function () { a(exports.unstable_now()); }, b); }; h = function () { z(F); F = -1; }; } function K(a, b) { var c = a.length; a.push(b); a: for (;;) { var d = Math.floor((c - 1) / 2), e = a[d]; if (void 0 !== e && 0 < L(e, b)) (a[d] = b), (a[c] = e), (c = d); else break a; } } function M(a) { a = a[0]; return void 0 === a ? null : a; } function N(a) { var b = a[0]; if (void 0 !== b) { var c = a.pop(); if (c !== b) { a[0] = c; a: for (var d = 0, e = a.length; d < e; ) { var m = 2 * (d + 1) - 1, n = a[m], v = m + 1, r = a[v]; if (void 0 !== n && 0 > L(n, c)) void 0 !== r && 0 > L(r, n) ? ((a[d] = r), (a[v] = c), (d = v)) : ((a[d] = n), (a[m] = c), (d = m)); else if (void 0 !== r && 0 > L(r, c)) (a[d] = r), (a[v] = c), (d = v); else break a; } } return b; } return null; } function L(a, b) { var c = a.sortIndex - b.sortIndex; return 0 !== c ? c : a.id - b.id; } var O = [], P = [], Q = 1, R = null, S = 3, T = !1, U = !1, V = !1; function W(a) { for (var b = M(P); null !== b; ) { if (null === b.callback) N(P); else if (b.startTime <= a) N(P), (b.sortIndex = b.expirationTime), K(O, b); else break; b = M(P); } } function X(a) { V = !1; W(a); if (!U) if (null !== M(O)) (U = !0), f(Y); else { var b = M(P); null !== b && g(X, b.startTime - a); } } function Y(a, b) { U = !1; V && ((V = !1), h()); T = !0; var c = S; try { W(b); for ( R = M(O); null !== R && (!(R.expirationTime > b) || (a && !k())); ) { var d = R.callback; if (null !== d) { R.callback = null; S = R.priorityLevel; var e = d(R.expirationTime <= b); b = exports.unstable_now(); "function" === typeof e ? (R.callback = e) : R === M(O) && N(O); W(b); } else N(O); R = M(O); } if (null !== R) var m = !0; else { var n = M(P); null !== n && g(X, n.startTime - b); m = !1; } return m; } finally { (R = null), (S = c), (T = !1); } } function Z(a) { switch (a) { case 1: return -1; case 2: return 250; case 5: return 1073741823; case 4: return 1e4; default: return 5e3; } } var aa = l; exports.unstable_ImmediatePriority = 1; exports.unstable_UserBlockingPriority = 2; exports.unstable_NormalPriority = 3; exports.unstable_IdlePriority = 5; exports.unstable_LowPriority = 4; exports.unstable_runWithPriority = function (a, b) { switch (a) { case 1: case 2: case 3: case 4: case 5: break; default: a = 3; } var c = S; S = a; try { return b(); } finally { S = c; } }; exports.unstable_next = function (a) { switch (S) { case 1: case 2: case 3: var b = 3; break; default: b = S; } var c = S; S = b; try { return a(); } finally { S = c; } }; exports.unstable_scheduleCallback = function (a, b, c) { var d = exports.unstable_now(); if ("object" === typeof c && null !== c) { var e = c.delay; e = "number" === typeof e && 0 < e ? d + e : d; c = "number" === typeof c.timeout ? c.timeout : Z(a); } else (c = Z(a)), (e = d); c = e + c; a = { id: Q++, callback: b, priorityLevel: a, startTime: e, expirationTime: c, sortIndex: -1, }; e > d ? ((a.sortIndex = e), K(P, a), null === M(O) && a === M(P) && (V ? h() : (V = !0), g(X, e - d))) : ((a.sortIndex = c), K(O, a), U || T || ((U = !0), f(Y))); return a; }; exports.unstable_cancelCallback = function (a) { a.callback = null; }; exports.unstable_wrapCallback = function (a) { var b = S; return function () { var c = S; S = b; try { return a.apply(this, arguments); } finally { S = c; } }; }; exports.unstable_getCurrentPriorityLevel = function () { return S; }; exports.unstable_shouldYield = function () { var a = exports.unstable_now(); W(a); var b = M(O); return ( (b !== R && null !== R && null !== b && null !== b.callback && b.startTime <= a && b.expirationTime < R.expirationTime) || k() ); }; exports.unstable_requestPaint = aa; exports.unstable_continueExecution = function () { U || T || ((U = !0), f(Y)); }; exports.unstable_pauseExecution = function () {}; exports.unstable_getFirstCallbackNode = function () { return M(O); }; exports.unstable_Profiling = null; /***/ }, /***/ 6821: /***/ function ( module, __unused_webpack_exports, __webpack_require__ ) { "use strict"; if (true) { module.exports = __webpack_require__(6665); } else { } /***/ }, /***/ 1713: /***/ function (__unused_webpack_module, exports) { "use strict"; exports.__esModule = true; exports["default"] = void 0; var BORDER_SHORTHAND_REGEX = /(-?\d+(\.\d+)?(px|in|mm|cm|pt|vw|vh|px)?)\s(\S+)\s(.+)/; var matchBorderShorthand = function matchBorderShorthand(value) { return value.match(BORDER_SHORTHAND_REGEX) || []; }; var expandBorders = function expandBorders(key, value) { var match = matchBorderShorthand("" + value); if (match) { var color = match[5] || value; var style = match[4] || value; var width = match[1] || value; if (key.match(/(Top|Right|Bottom|Left)$/)) { var _ref; return ( (_ref = {}), (_ref[key + "Color"] = color), (_ref[key + "Style"] = style), (_ref[key + "Width"] = width), _ref ); } if (key.match(/Color$/)) { return { borderTopColor: color, borderRightColor: color, borderBottomColor: color, borderLeftColor: color, }; } if (key.match(/Style$/)) { return { borderTopStyle: style, borderRightStyle: style, borderBottomStyle: style, borderLeftStyle: style, }; } if (key.match(/Width$/)) { return { borderTopWidth: width, borderRightWidth: width, borderBottomWidth: width, borderLeftWidth: width, }; } if (key.match(/Radius$/)) { return { borderTopLeftRadius: value, borderTopRightRadius: value, borderBottomRightRadius: value, borderBottomLeftRadius: value, }; } return { borderTopColor: color, borderTopStyle: style, borderTopWidth: width, borderRightColor: color, borderRightStyle: style, borderRightWidth: width, borderBottomColor: color, borderBottomStyle: style, borderBottomWidth: width, borderLeftColor: color, borderLeftStyle: style, borderLeftWidth: width, }; } return value; }; var _default = expandBorders; exports["default"] = _default; /***/ }, /***/ 7753: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { "use strict"; var _interopRequireDefault = __webpack_require__(5318)["default"]; exports.__esModule = true; exports["default"] = void 0; var _parse = _interopRequireDefault(__webpack_require__(788)); var _unit = _interopRequireDefault(__webpack_require__(3433)); /* eslint-disable no-plusplus */ var BOX_MODEL_UNITS = "px,in,mm,cm,pt,%,vw,vh"; var logError = function logError(style, value) { console.error( "\n @react-pdf/stylesheet parsing error:\n\n " + style + ": " + value + ",\n " + " ".repeat(style.length + 2) + "^\n Unsupported " + style + " value format\n " ); }; var expandBoxModel = function expandBoxModel(_temp) { var _ref = _temp === void 0 ? {} : _temp, expandsTo = _ref.expandsTo, _ref$maxValues = _ref.maxValues, maxValues = _ref$maxValues === void 0 ? 1 : _ref$maxValues, _ref$autoSupported = _ref.autoSupported, autoSupported = _ref$autoSupported === void 0 ? false : _ref$autoSupported; return function (model, value) { var _ref2; var nodes = (0, _parse.default)("" + value); var parts = []; for (var i = 0; i < nodes.length; i++) { var node = nodes[i]; // value contains `calc`, `url` or other css function // `,`, `/` or strings that unsupported by margin and padding if ( node.type === "function" || node.type === "string" || node.type === "div" ) { logError(model, value); return {}; } if (node.type === "word") { if (node.value === "auto" && autoSupported) { parts.push(node.value); } else { var result = (0, _unit.default)(node.value); // when unit isn't specified this condition is true if ( result && BOX_MODEL_UNITS.includes(result.unit) ) { parts.push(node.value); } else { logError(model, value); return {}; } } } } // checks that we have enough parsed values if (parts.length > maxValues) { logError(model, value); return {}; } var first = parts[0]; if (expandsTo) { var second = parts[1] || parts[0]; var third = parts[2] || parts[0]; var fourth = parts[3] || parts[1] || parts[0]; return expandsTo({ first: first, second: second, third: third, fourth: fourth, }); } return (_ref2 = {}), (_ref2[model] = first), _ref2; }; }; var _default = expandBoxModel; exports["default"] = _default; /***/ }, /***/ 4214: /***/ function (__unused_webpack_module, exports) { "use strict"; exports.__esModule = true; exports["default"] = void 0; var flexDefaults = [1, 1, 0]; var expandFlex = function expandFlex(key, value) { var matches = ("" + value).split(" "); var flexGrow = matches[0] || flexDefaults[0]; var flexShrink = matches[1] || flexDefaults[1]; var flexBasis = matches[2] || flexDefaults[2]; return { flexGrow: flexGrow, flexShrink: flexShrink, flexBasis: flexBasis, }; }; var _default = expandFlex; exports["default"] = _default; /***/ }, /***/ 9214: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { "use strict"; var _interopRequireDefault = __webpack_require__(5318)["default"]; exports.__esModule = true; exports["default"] = void 0; var _flex = _interopRequireDefault(__webpack_require__(4214)); var _margins = __webpack_require__(9373); var _borders = _interopRequireDefault(__webpack_require__(1713)); var _paddings = __webpack_require__(5571); var _objectPosition = _interopRequireDefault( __webpack_require__(2594) ); var _transformOrigin = _interopRequireDefault( __webpack_require__(5229) ); var shorthands = { flex: _flex.default, margin: _margins.processMargin, marginHorizontal: _margins.processMarginHorizontal, marginVertical: _margins.processMarginVertical, marginTop: _margins.processMarginSingle, marginRight: _margins.processMarginSingle, marginBottom: _margins.processMarginSingle, marginLeft: _margins.processMarginSingle, padding: _paddings.processPadding, paddingHorizontal: _paddings.processPaddingHorizontal, paddingVertical: _paddings.processPaddingVertical, paddingTop: _paddings.processPaddingSingle, paddingRight: _paddings.processPaddingSingle, paddingBottom: _paddings.processPaddingSingle, paddingLeft: _paddings.processPaddingSingle, border: _borders.default, borderTop: _borders.default, borderRight: _borders.default, borderBottom: _borders.default, borderLeft: _borders.default, borderColor: _borders.default, borderRadius: _borders.default, borderStyle: _borders.default, borderWidth: _borders.default, objectPosition: _objectPosition.default, transformOrigin: _transformOrigin.default, }; /** * Transforms style key-value * * @param {String} key style key * @param {String} value style value * @returns {String | Number} transformed style values */ var expandStyle = function expandStyle(key, value) { var _ref; return shorthands[key] ? shorthands[key](key, value) : ((_ref = {}), (_ref[key] = value), _ref); }; /** * Expand the shorthand properties. * * @param { Object } style object * @returns { Object } expanded style object */ var expand = function expand(style) { if (!style) return style; var propsArray = Object.keys(style); var resolvedStyle = {}; for (var i = 0; i < propsArray.length; i += 1) { var key = propsArray[i]; var value = style[key]; var extended = expandStyle(key, value); var keys = Object.keys(extended); for (var j = 0; j < keys.length; j += 1) { var propName = keys[j]; var propValue = extended[propName]; resolvedStyle[propName] = propValue; } } return resolvedStyle; }; var _default = expand; exports["default"] = _default; /***/ }, /***/ 9373: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { "use strict"; var _interopRequireDefault = __webpack_require__(5318)["default"]; exports.__esModule = true; exports.processMarginVertical = exports.processMarginSingle = exports.processMarginHorizontal = exports.processMargin = void 0; var _boxModel = _interopRequireDefault(__webpack_require__(7753)); var processMargin = (0, _boxModel.default)({ expandsTo: function expandsTo(_ref) { var first = _ref.first, second = _ref.second, third = _ref.third, fourth = _ref.fourth; return { marginTop: first, marginRight: second, marginBottom: third, marginLeft: fourth, }; }, maxValues: 4, autoSupported: true, }); exports.processMargin = processMargin; var processMarginVertical = (0, _boxModel.default)({ expandsTo: function expandsTo(_ref2) { var first = _ref2.first, second = _ref2.second; return { marginTop: first, marginBottom: second, }; }, maxValues: 2, autoSupported: true, }); exports.processMarginVertical = processMarginVertical; var processMarginHorizontal = (0, _boxModel.default)({ expandsTo: function expandsTo(_ref3) { var first = _ref3.first, second = _ref3.second; return { marginRight: first, marginLeft: second, }; }, maxValues: 2, autoSupported: true, }); exports.processMarginHorizontal = processMarginHorizontal; var processMarginSingle = (0, _boxModel.default)({ autoSupported: true, }); exports.processMarginSingle = processMarginSingle; /***/ }, /***/ 2594: /***/ function (__unused_webpack_module, exports) { "use strict"; exports.__esModule = true; exports["default"] = void 0; var expandObjectPosition = function expandObjectPosition( key, value ) { var match = ("" + value).split(" "); return { objectPositionX: (match === null || match === void 0 ? void 0 : match[0]) || value, objectPositionY: (match === null || match === void 0 ? void 0 : match[1]) || value, }; }; var _default = expandObjectPosition; exports["default"] = _default; /***/ }, /***/ 5571: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { "use strict"; var _interopRequireDefault = __webpack_require__(5318)["default"]; exports.__esModule = true; exports.processPaddingVertical = exports.processPaddingSingle = exports.processPaddingHorizontal = exports.processPadding = void 0; var _boxModel = _interopRequireDefault(__webpack_require__(7753)); var processPadding = (0, _boxModel.default)({ expandsTo: function expandsTo(_ref) { var first = _ref.first, second = _ref.second, third = _ref.third, fourth = _ref.fourth; return { paddingTop: first, paddingRight: second, paddingBottom: third, paddingLeft: fourth, }; }, maxValues: 4, }); exports.processPadding = processPadding; var processPaddingVertical = (0, _boxModel.default)({ expandsTo: function expandsTo(_ref2) { var first = _ref2.first, second = _ref2.second; return { paddingTop: first, paddingBottom: second, }; }, maxValues: 2, }); exports.processPaddingVertical = processPaddingVertical; var processPaddingHorizontal = (0, _boxModel.default)({ expandsTo: function expandsTo(_ref3) { var first = _ref3.first, second = _ref3.second; return { paddingRight: first, paddingLeft: second, }; }, maxValues: 2, }); exports.processPaddingHorizontal = processPaddingHorizontal; var processPaddingSingle = (0, _boxModel.default)(); exports.processPaddingSingle = processPaddingSingle; /***/ }, /***/ 5229: /***/ function (__unused_webpack_module, exports) { "use strict"; exports.__esModule = true; exports["default"] = void 0; var Y_AXIS_SHORTHANDS = { top: true, bottom: true, }; var sortTransformOriginPair = function sortTransformOriginPair( a, b ) { if (Y_AXIS_SHORTHANDS[a]) return 1; if (Y_AXIS_SHORTHANDS[b]) return -1; return 0; }; var getTransformOriginPair = function getTransformOriginPair( values ) { if (!values || values.length === 0) return ["center", "center"]; var pair = values.length === 1 ? [values[0], "center"] : values; return pair.sort(sortTransformOriginPair); }; // Transforms shorthand transformOrigin values var expandTransformOrigin = function expandTransformOrigin( key, value ) { var match = ("" + value).split(" "); var pair = getTransformOriginPair(match); return { transformOriginX: pair[0], transformOriginY: pair[1], }; }; var _default = expandTransformOrigin; exports["default"] = _default; /***/ }, /***/ 4340: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { "use strict"; exports.__esModule = true; exports["default"] = void 0; var _fns = __webpack_require__(4354); /** * Remove nil values from array * * @param {Array} array * @returns {Array} array without nils */ var compact = function compact(array) { return array.filter(Boolean); }; /** * Merges style objects array * * @param {Array} style objects array * @returns {Object} merged style object */ var mergeStyles = function mergeStyles(styles) { return styles.reduce(function (acc, style) { var s = Array.isArray(style) ? flatten(style) : style; Object.keys(s).forEach(function (key) { if (s[key] !== null && s[key] !== undefined) { acc[key] = s[key]; } }); return acc; }, {}); }; /** * Flattens an array of style objects, into one aggregated style object. * * @param {Array} style objects array * @returns {Object} flatted style object */ var flatten = (0, _fns.compose)( mergeStyles, compact, _fns.castArray ); var _default = flatten; exports["default"] = _default; /***/ }, /***/ 6335: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { "use strict"; var _interopRequireDefault = __webpack_require__(5318)["default"]; exports.__esModule = true; exports.transformColor = exports.processTransform = exports["default"] = void 0; var _fns = __webpack_require__(4354); var _expand = _interopRequireDefault(__webpack_require__(9214)); var _flatten = _interopRequireDefault(__webpack_require__(4340)); var _transform = _interopRequireDefault(__webpack_require__(4806)); var _mediaQueries = _interopRequireDefault( __webpack_require__(4016) ); var _colors = _interopRequireDefault(__webpack_require__(3566)); exports.transformColor = _colors.default; var _transform2 = _interopRequireDefault(__webpack_require__(6284)); exports.processTransform = _transform2.default; /** * Resolves styles * * @param {Object} container * @param {Object} style object * @returns {Object} resolved style object */ var resolveStyles = function resolveStyles(container, style) { var computeMediaQueries = function computeMediaQueries(value) { return (0, _mediaQueries.default)(container, value); }; return (0, _fns.compose)( (0, _transform.default)(container), _expand.default, computeMediaQueries, _flatten.default )(style); }; // Utils exported for SVG processing var _default = resolveStyles; exports["default"] = _default; /***/ }, /***/ 4016: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { "use strict"; var _interopRequireDefault = __webpack_require__(5318)["default"]; exports.__esModule = true; exports["default"] = void 0; var _extends3 = _interopRequireDefault(__webpack_require__(7154)); var _mediaEngine = _interopRequireDefault( __webpack_require__(1028) ); /** * Resolves media queries in styles object * * @param {Object} container * @param {Object} styles object */ var resolveMediaQueries = function resolveMediaQueries( container, styles ) { return Object.keys(styles).reduce(function (acc, key) { var _extends2; if (/@media/.test(key)) { var _matchMedia; return (0, _extends3.default)( {}, acc, (0, _mediaEngine.default)( ((_matchMedia = {}), (_matchMedia[key] = styles[key]), _matchMedia), container ) ); } return (0, _extends3.default)({}, acc, ((_extends2 = {}), (_extends2[key] = styles[key]), _extends2)); }, {}); }; var _default = resolveMediaQueries; exports["default"] = _default; /***/ }, /***/ 3566: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { "use strict"; var _interopRequireDefault = __webpack_require__(5318)["default"]; exports.__esModule = true; exports["default"] = void 0; var _hslToHex = _interopRequireDefault(__webpack_require__(6119)); var _colorString = _interopRequireDefault( __webpack_require__(9818) ); var isRgb = function isRgb(value) { return /rgba?/g.test(value); }; var isHsl = function isHsl(value) { return /hsla?/g.test(value); }; /** * Transform rgb color to hexa * * @param {String} styles value * @returns {Object} transformed value */ var parseRgb = function parseRgb(value) { var rgb = _colorString.default.get.rgb(value); return _colorString.default.to.hex(rgb); }; /** * Transform Hsl color to hexa * * @param {String} styles value * @returns {Object} transformed value */ var parseHsl = function parseHsl(value) { var hsl = _colorString.default.get.hsl(value).map(Math.round); var hex = _hslToHex.default.apply(void 0, hsl); return hex.toUpperCase(); }; /** * Transform given color to hexa * * @param {String} styles value * @returns {Object} transformed value */ var transformColor = function transformColor(value) { if (isRgb(value)) return parseRgb(value); if (isHsl(value)) return parseHsl(value); return value; }; var _default = transformColor; exports["default"] = _default; /***/ }, /***/ 2580: /***/ function (__unused_webpack_module, exports) { "use strict"; exports.__esModule = true; exports["default"] = void 0; var FONT_WEIGHTS = { thin: 100, hairline: 100, ultralight: 200, extralight: 200, light: 300, normal: 400, medium: 500, semibold: 600, demibold: 600, bold: 700, ultrabold: 800, extrabold: 800, heavy: 900, black: 900, }; var processFontWeight = function processFontWeight(value) { if (!value) return FONT_WEIGHTS.normal; if (typeof value === "number") return value; var lv = value.toLowerCase(); if (FONT_WEIGHTS[lv]) return FONT_WEIGHTS[lv]; return value; }; var _default = processFontWeight; exports["default"] = _default; /***/ }, /***/ 4806: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { "use strict"; var _interopRequireDefault = __webpack_require__(5318)["default"]; exports.__esModule = true; exports["default"] = void 0; var _units = _interopRequireDefault(__webpack_require__(7098)); var _colors = _interopRequireDefault(__webpack_require__(3566)); var _transform = _interopRequireDefault(__webpack_require__(6284)); var _fontWeight = _interopRequireDefault(__webpack_require__(2580)); var _objectPosition = _interopRequireDefault( __webpack_require__(4446) ); var _transformOrigin = _interopRequireDefault( __webpack_require__(2210) ); var _castFloat = _interopRequireDefault(__webpack_require__(3230)); var handlers = { transform: _transform.default, fontWeight: _fontWeight.default, objectPositionX: _objectPosition.default, objectPositionY: _objectPosition.default, transformOriginX: _transformOrigin.default, transformOriginY: _transformOrigin.default, }; var transformStyle = function transformStyle( key, value, container ) { var result = handlers[key] ? handlers[key](value) : value; return (0, _colors.default)( (0, _units.default)( container, (0, _castFloat.default)(result) ) ); }; /** * Transform styles values * * @param {Object} styles object * @returns {Object} transformed styles */ var transform = function transform(container) { return function (style) { if (!style) return style; var propsArray = Object.keys(style); var resolvedStyle = {}; for (var i = 0; i < propsArray.length; i += 1) { var key = propsArray[i]; var value = style[key]; var transformed = transformStyle(key, value, container); resolvedStyle[key] = transformed; } return resolvedStyle; }; }; var _default = transform; exports["default"] = _default; /***/ }, /***/ 4446: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { "use strict"; var _interopRequireDefault = __webpack_require__(5318)["default"]; exports.__esModule = true; exports["default"] = void 0; var _castFloat = _interopRequireDefault(__webpack_require__(3230)); var _offsetKeyword = _interopRequireDefault( __webpack_require__(3668) ); var transformObjectPosition = function transformObjectPosition( value ) { return ( (0, _offsetKeyword.default)(value) || (0, _castFloat.default)(value) ); }; var _default = transformObjectPosition; exports["default"] = _default; /***/ }, /***/ 6284: /***/ function (__unused_webpack_module, exports) { "use strict"; exports.__esModule = true; exports["default"] = void 0; var parse = function parse(transformString) { var transforms = transformString.trim().split(/\) |\)/); // Handle "initial", "inherit", "unset". if (transforms.length === 1) { return [[transforms[0], true]]; } var parsed = []; for (var i = 0; i < transforms.length; i += 1) { var transform = transforms[i]; if (transform) { var _transform$split = transform.split("("), name = _transform$split[0], rawValue = _transform$split[1]; var splitChar = rawValue.indexOf(",") >= 0 ? "," : " "; var value = rawValue .split(splitChar) .map(function (val) { return val.trim(); }); parsed.push({ operation: name, value: value, }); } } return parsed; }; var normalizeTransformOperation = function normalizeTransformOperation(_ref) { var operation = _ref.operation, value = _ref.value; switch (operation) { case "scale": { var _value$map = value.map(function (num) { return Number.parseFloat(num); }), scaleX = _value$map[0], _value$map$ = _value$map[1], scaleY = _value$map$ === void 0 ? scaleX : _value$map$; return { operation: "scale", value: [scaleX, scaleY], }; } case "scaleX": { return { operation: "scale", value: [Number.parseFloat(value), 1], }; } case "scaleY": { return { operation: "scale", value: [1, Number.parseFloat(value)], }; } case "rotate": { var unitsRegexp = /(-?\d*\.?\d*)(\w*)?/i; var _unitsRegexp$exec = unitsRegexp.exec(value), angle = _unitsRegexp$exec[1], unit = _unitsRegexp$exec[2]; var number = Number.parseFloat(angle); return { operation: "rotate", value: [ unit === "rad" ? (number * 180) / Math.PI : number, ], }; } case "translate": { return { operation: "translate", value: value.map(function (num) { return Number.parseFloat(num); }), }; } case "translateX": { return { operation: "translate", value: [Number.parseFloat(value), 0], }; } case "translateY": { return { operation: "translate", value: [0, Number.parseFloat(value)], }; } default: { return { operation: operation, value: value.map(function (num) { return Number.parseFloat(num); }), }; } } }; var normalize = function normalize(operations) { return operations.map(function (operation) { return normalizeTransformOperation(operation); }); }; var processTransform = function processTransform(value) { if (typeof value !== "string") return value; return normalize(parse(value)); }; var _default = processTransform; exports["default"] = _default; /***/ }, /***/ 2210: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { "use strict"; var _interopRequireDefault = __webpack_require__(5318)["default"]; exports.__esModule = true; exports["default"] = void 0; var _castFloat = _interopRequireDefault(__webpack_require__(3230)); var _offsetKeyword = _interopRequireDefault( __webpack_require__(3668) ); var transformTransformOrigin = function transformTransformOrigin( value ) { return ( (0, _offsetKeyword.default)(value) || (0, _castFloat.default)(value) ); }; var _default = transformTransformOrigin; exports["default"] = _default; /***/ }, /***/ 7098: /***/ function (__unused_webpack_module, exports) { "use strict"; exports.__esModule = true; exports["default"] = void 0; /** * Parses scalar value in value and unit pairs * * @param {String} scalar value * @returns {Object} parsed value */ var parseValue = function parseValue(value) { var match = /^(-?\d*\.?\d+)(in|mm|cm|pt|vh|vw|px)?$/g.exec( value ); return match ? { value: parseFloat(match[1], 10), unit: match[2] || "pt", } : { value: value, unit: undefined, }; }; /** * Transform given scalar value * * @param {Object} container * @param {String} styles value * @returns {Object} transformed value */ var transformUnit = function transformUnit(container, value) { var scalar = parseValue(value); var dpi = container.dpi || 72; var mmFactor = (1 / 25.4) * dpi; var cmFactor = (1 / 2.54) * dpi; switch (scalar.unit) { case "in": return scalar.value * dpi; case "mm": return scalar.value * mmFactor; case "cm": return scalar.value * cmFactor; case "vh": return scalar.value * (container.height / 100); case "vw": return scalar.value * (container.width / 100); default: return scalar.value; } }; var _default = transformUnit; exports["default"] = _default; /***/ }, /***/ 3230: /***/ function (__unused_webpack_module, exports) { "use strict"; exports.__esModule = true; exports["default"] = void 0; var matchNumber = function matchNumber(value) { return typeof value === "string" && /^-?\d*\.?\d*$/.test(value); }; var castFloat = function castFloat(value) { if (typeof value !== "string") return value; if (matchNumber(value)) return parseFloat(value, 10); return value; }; var _default = castFloat; exports["default"] = _default; /***/ }, /***/ 3668: /***/ function (__unused_webpack_module, exports) { "use strict"; exports.__esModule = true; exports["default"] = void 0; var offsetKeyword = function offsetKeyword(value) { switch (value) { case "top": case "left": return "0%"; case "right": case "bottom": return "100%"; case "center": return "50%"; default: return null; } }; var _default = offsetKeyword; exports["default"] = _default; /***/ }, /***/ 7106: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { "use strict"; var _interopRequireDefault = __webpack_require__(5318)["default"]; exports.__esModule = true; exports["default"] = void 0; var _advanceWidth = _interopRequireDefault( __webpack_require__(3689) ); /** * Returns attributed string advancewidth * * @param {Object} attributed string * @return {number} advance width */ var advanceWidth = function advanceWidth(attributeString) { var reducer = function reducer(acc, run) { return acc + (0, _advanceWidth.default)(run); }; return attributeString.runs.reduce(reducer, 0); }; var _default = advanceWidth; exports["default"] = _default; /***/ }, /***/ 5090: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { "use strict"; var _interopRequireDefault = __webpack_require__(5318)["default"]; exports.__esModule = true; exports["default"] = void 0; var _filter = _interopRequireDefault(__webpack_require__(7621)); var _advanceWidthBetween = _interopRequireDefault( __webpack_require__(3529) ); /** * Advance width between start and end * Does not consider ligature splitting for the moment. * Check performance impact on supporting this * * @param {number} start offset * @param {number} end offset * @param {Object} attributedString * @return {number} advance width */ var advanceWidthBetween = function advanceWidthBetween( start, end, attributedString ) { var runs = (0, _filter.default)( start, end, attributedString.runs ); return runs.reduce(function (acc, run) { return ( acc + (0, _advanceWidthBetween.default)(start, end, run) ); }, 0); }; var _default = advanceWidthBetween; exports["default"] = _default; /***/ }, /***/ 9845: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { "use strict"; var _interopRequireDefault = __webpack_require__(5318)["default"]; exports.__esModule = true; exports["default"] = void 0; var _fns = __webpack_require__(4354); var _empty = _interopRequireDefault(__webpack_require__(6266)); var _append = _interopRequireDefault(__webpack_require__(7763)); var _stringFromCodePoints = _interopRequireDefault( __webpack_require__(511) ); /** * Append glyph into last run of attributed string * * @param {Object} glyph * @param {Object} attributed string * @return {Object} attributed string with new glyph */ var append = function append(glyph, attributedString) { var codePoints = (glyph === null || glyph === void 0 ? void 0 : glyph.codePoints) || []; var codePointsString = (0, _stringFromCodePoints.default)( codePoints ); var string = attributedString.string + codePointsString; var firstRuns = attributedString.runs.slice(0, -1); var lastRun = (0, _fns.last)(attributedString.runs) || (0, _empty.default)(); var runs = firstRuns.concat( (0, _append.default)(glyph, lastRun) ); return Object.assign({}, attributedString, { string: string, runs: runs, }); }; var _default = append; exports["default"] = _default; /***/ }, /***/ 3226: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { "use strict"; var _interopRequireDefault = __webpack_require__(5318)["default"]; exports.__esModule = true; exports["default"] = void 0; var _ascent = _interopRequireDefault(__webpack_require__(1162)); /** * Returns attributed string ascent * * @param {Object} attributed string * @return {number} ascent */ var ascent = function ascent(attributeString) { var reducer = function reducer(acc, run) { return Math.max(acc, (0, _ascent.default)(run)); }; return attributeString.runs.reduce(reducer, 0); }; var _default = ascent; exports["default"] = _default; /***/ }, /***/ 8208: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { "use strict"; var _interopRequireDefault = __webpack_require__(5318)["default"]; exports.__esModule = true; exports["default"] = void 0; var _fns = __webpack_require__(4354); var _dropLast = _interopRequireDefault(__webpack_require__(8848)); /** * Drop last glyph * * @param {Object} attributed string * @return {Object} attributed string with new glyph */ var dropLast = function dropLast(attributeString) { var string = (0, _fns.dropLast)(attributeString.string); var runs = (0, _fns.adjust)( -1, _dropLast.default, attributeString.runs ); return Object.assign({}, attributeString, { string: string, runs: runs, }); }; var _default = dropLast; exports["default"] = _default; /***/ }, /***/ 5579: /***/ function (__unused_webpack_module, exports) { "use strict"; exports.__esModule = true; exports["default"] = void 0; /** * Returns empty attributed string * * @return {Object} empty attributed string */ var empty = function empty() { return { string: "", runs: [], }; }; var _default = empty; exports["default"] = _default; /***/ }, /***/ 7590: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { "use strict"; exports.__esModule = true; exports["default"] = void 0; var _fns = __webpack_require__(4354); /** * Get attributed string end value * * @param {Object} attributed string * @return {number} end */ var end = function end(attributedString) { var runs = attributedString.runs; return runs.length === 0 ? 0 : (0, _fns.last)(runs).end; }; var _default = end; exports["default"] = _default; /***/ }, /***/ 2779: /***/ function (__unused_webpack_module, exports) { "use strict"; exports.__esModule = true; exports["default"] = void 0; /** * Create attributed string from text fragments * * @param {Array} fragments * @return {Object} attributed string */ var fromFragments = function fromFragments(fragments) { var offset = 0; var string = ""; var runs = []; fragments.forEach(function (fragment) { string += fragment.string; runs.push({ start: offset, end: offset + fragment.string.length, attributes: fragment.attributes || {}, }); offset += fragment.string.length; }); return { string: string, runs: runs, }; }; var _default = fromFragments; exports["default"] = _default; /***/ }, /***/ 9528: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { "use strict"; var _interopRequireDefault = __webpack_require__(5318)["default"]; exports.__esModule = true; exports["default"] = void 0; var _height = _interopRequireDefault(__webpack_require__(7369)); /** * Returns attributed string height * * @param {Object} attributed string * @return {number} height */ var height = function height(attributeString) { var reducer = function reducer(acc, run) { return Math.max(acc, (0, _height.default)(run)); }; return attributeString.runs.reduce(reducer, 0); }; var _default = height; exports["default"] = _default; /***/ }, /***/ 5821: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { "use strict"; var _interopRequireDefault = __webpack_require__(5318)["default"]; exports.__esModule = true; exports["default"] = void 0; var _append = _interopRequireDefault(__webpack_require__(9845)); var _add = _interopRequireDefault(__webpack_require__(6062)); var _insert = _interopRequireDefault(__webpack_require__(7222)); var _runIndexAt = _interopRequireDefault(__webpack_require__(2307)); var _stringFromCodePoints = _interopRequireDefault( __webpack_require__(511) ); /** * Insert glyph into attributed string * * @param {number} index * @param {Object} glyph * @param {Object} attributed string * @return {Object} attributed string with new glyph */ var insertGlyph = function insertGlyph( index, glyph, attributedString ) { var runIndex = (0, _runIndexAt.default)( index, attributedString ); // Add glyph to the end if run index invalid if (runIndex === -1) return (0, _append.default)(glyph, attributedString); var codePoints = (glyph === null || glyph === void 0 ? void 0 : glyph.codePoints) || []; var string = attributedString.string.slice(0, index) + (0, _stringFromCodePoints.default)(codePoints) + attributedString.string.slice(index); var runs = attributedString.runs.map(function (run, i) { if (i === runIndex) return (0, _insert.default)( index - run.start, glyph, run ); if (i > runIndex) return (0, _add.default)(codePoints.length, run); return run; }); return Object.assign({}, attributedString, { string: string, runs: runs, }); }; var _default = insertGlyph; exports["default"] = _default; /***/ }, /***/ 2182: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { "use strict"; var _interopRequireDefault = __webpack_require__(5318)["default"]; exports.__esModule = true; exports["default"] = void 0; var _leadingOffset = _interopRequireDefault( __webpack_require__(7925) ); /** * Get attributed string leading white space offset * * @param {Object} attributed string * @return {number} leading white space offset */ var leadingOffset = function leadingOffset(attributedString) { var runs = attributedString.runs || []; return (0, _leadingOffset.default)(runs[0]); }; var _default = leadingOffset; exports["default"] = _default; /***/ }, /***/ 7698: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { "use strict"; var _interopRequireDefault = __webpack_require__(5318)["default"]; exports.__esModule = true; exports["default"] = void 0; var _start = _interopRequireDefault(__webpack_require__(1464)); var _end = _interopRequireDefault(__webpack_require__(7590)); /** * Get attributed string length * * @param {Object} glyph string * @return {number} end */ var length = function length(attributedString) { return ( (0, _end.default)(attributedString) - (0, _start.default)(attributedString) ); }; var _default = length; exports["default"] = _default; /***/ }, /***/ 2307: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { "use strict"; var _interopRequireDefault = __webpack_require__(5318)["default"]; exports.__esModule = true; exports["default"] = void 0; var _runIndexAt = _interopRequireDefault(__webpack_require__(9139)); /** * Get run index at char index * * @param {number} char index * @param {Object} attributedString * @return {number} run index */ var runIndexAt = function runIndexAt(n, string) { return (0, _runIndexAt.default)(n, string.runs); }; var _default = runIndexAt; exports["default"] = _default; /***/ }, /***/ 2564: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { "use strict"; var _interopRequireDefault = __webpack_require__(5318)["default"]; exports.__esModule = true; exports["default"] = void 0; var _slice = _interopRequireDefault(__webpack_require__(4450)); var _filter = _interopRequireDefault(__webpack_require__(7621)); var _subtract = _interopRequireDefault(__webpack_require__(9629)); /** * Slice array of runs * * @param {number} start offset * @param {number} end offset * @param {Array} runs * @return {Array} sliced runs */ var sliceRuns = function sliceRuns(start, end, runs) { var sliceFirstRun = function sliceFirstRun(a) { return (0, _slice.default)( start - a.start, end - a.start, a ); }; var sliceLastRun = function sliceLastRun(a) { return (0, _slice.default)(0, end - a.start, a); }; return runs.map(function (run, i) { var result = run; var isFirst = i === 0; var isLast = !isFirst && i === runs.length - 1; if (isFirst) result = sliceFirstRun(run); if (isLast) result = sliceLastRun(run); return (0, _subtract.default)(start, result); }); }; /** * Slice attributed string between two indices * * @param {number} start offset * @param {number} end offset * @param {Object} attributedString * @return {Object} attributedString */ var slice = function slice(start, end, attributedString) { if (attributedString.string.length === 0) return attributedString; var string = attributedString.string.slice(start, end); var filteredRuns = (0, _filter.default)( start, end, attributedString.runs ); var slicedRuns = sliceRuns(start, end, filteredRuns); return Object.assign({}, attributedString, { string: string, runs: slicedRuns, }); }; var _default = slice; exports["default"] = _default; /***/ }, /***/ 1464: /***/ function (__unused_webpack_module, exports) { "use strict"; exports.__esModule = true; exports["default"] = void 0; /** * Get attributed string start value * * @param {Object} attributed string * @return {number} start */ var start = function start(attributedString) { var runs = attributedString.runs; return runs.length === 0 ? 0 : runs[0].start; }; var _default = start; exports["default"] = _default; /***/ }, /***/ 9815: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { "use strict"; var _interopRequireDefault = __webpack_require__(5318)["default"]; exports.__esModule = true; exports["default"] = void 0; var _fns = __webpack_require__(4354); var _trailingOffset = _interopRequireDefault( __webpack_require__(2179) ); /** * Get attributed string trailing white space offset * * @param {Object} attributed string * @return {number} trailing white space offset */ var trailingOffset = function trailingOffset(attributedString) { var runs = attributedString.runs || []; return (0, _trailingOffset.default)((0, _fns.last)(runs)); }; var _default = trailingOffset; exports["default"] = _default; /***/ }, /***/ 4573: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { "use strict"; var _interopRequireDefault = __webpack_require__(5318)["default"]; exports.__esModule = true; exports["default"] = void 0; var _slice = _interopRequireDefault(__webpack_require__(2564)); var findCharIndex = function findCharIndex(string) { return string.search(/\S/g); }; var findLastCharIndex = function findLastCharIndex(string) { var match = string.match(/\S/g); return match ? string.lastIndexOf(match[match.length - 1]) : -1; }; /** * Removes (strips) whitespace from both ends of the attributted string. * * @param {Object} attributedString * @return {Object} attributedString */ var trim = function trim(attributedString) { var start = findCharIndex(attributedString.string); var end = findLastCharIndex(attributedString.string); return (0, _slice.default)(start, end + 1, attributedString); }; var _default = trim; exports["default"] = _default; /***/ }, /***/ 839: /***/ function (__unused_webpack_module, exports) { "use strict"; exports.__esModule = true; exports["default"] = void 0; /** * Get paragraph block height * * @param {Object} paragraph block * @return {number} paragraph block height */ var height = function height(paragraph) { return paragraph.reduce(function (acc, block) { return acc + block.box.height; }, 0); }; var _default = height; exports["default"] = _default; /***/ }, /***/ 4248: /***/ function (__unused_webpack_module, exports) { "use strict"; exports.__esModule = true; exports["default"] = void 0; /** * Slice block at given height * * @param {number} height * @param {Object} paragraph block * @return {number} sliced paragraph block */ var sliceAtHeight = function sliceAtHeight(height, block) { var newBlock = []; var counter = 0; for (var i = 0; i < block.length; i += 1) { var line = block[i]; counter += line.box.height; if (counter < height) { newBlock.push(line); } else { break; } } return newBlock; }; var _default = sliceAtHeight; exports["default"] = _default; /***/ }, /***/ 6314: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { "use strict"; var _interopRequireDefault = __webpack_require__(5318)["default"]; exports.__esModule = true; exports["default"] = void 0; var _fns = __webpack_require__(4354); var _trim = _interopRequireDefault(__webpack_require__(4573)); var _append = _interopRequireDefault(__webpack_require__(9845)); var ELLIPSIS_UNICODE = 8230; var ELLIPSIS_STRING = String.fromCharCode(ELLIPSIS_UNICODE); /** * Get ellipsis codepoint. This may be different in standard and embedded fonts * * @param {number} font * @return {Object} ellipsis codepoint */ var getEllipsisCodePoint = function getEllipsisCodePoint(font) { if (!font.encode) return ELLIPSIS_UNICODE; var _font$encode = font.encode(ELLIPSIS_STRING), codePoints = _font$encode[0]; return parseInt(codePoints[0], 16); }; /** * Trucante block with ellipsis * * @param {number} lines quantity * @param {Object} paragraph block * @return {Object} sliced paragraph block */ var truncate = function truncate(block) { var _last, _last2, _last2$attributes; var runs = ((_last = (0, _fns.last)(block)) === null || _last === void 0 ? void 0 : _last.runs) || []; var font = (_last2 = (0, _fns.last)(runs)) === null || _last2 === void 0 ? void 0 : (_last2$attributes = _last2.attributes) === null || _last2$attributes === void 0 ? void 0 : _last2$attributes.font; if (font) { var _Object$assign; var index = block.length - 1; var codePoint = getEllipsisCodePoint(font); var glyph = font.glyphForCodePoint(codePoint); var lastBlock = (0, _append.default)( glyph, (0, _trim.default)(block[index]) ); return Object.assign( [], block, ((_Object$assign = {}), (_Object$assign[index] = lastBlock), _Object$assign) ); } return block; }; var _default = truncate; exports["default"] = _default; /***/ }, /***/ 7518: /***/ function (__unused_webpack_module, exports) { "use strict"; exports.__esModule = true; exports["default"] = void 0; /* eslint-disable no-multi-assign */ var KASHIDA_PRIORITY = 0; var NULL_PRIORITY = 3; var getDistances = function getDistances(gap, factors) { var total = 0; var priorities = []; var unconstrained = []; for ( var _priority = KASHIDA_PRIORITY; _priority <= NULL_PRIORITY; _priority += 1 ) { priorities[_priority] = unconstrained[_priority] = 0; } // sum the factors at each priority for (var j = 0; j < factors.length; j += 1) { var f = factors[j]; var sum = f.before + f.after; total += sum; priorities[f.priority] += sum; if (f.unconstrained) { unconstrained[f.priority] += sum; } } // choose the priorities that need to be applied var highestPriority = -1; var highestPrioritySum = 0; var remainingGap = gap; var priority; for ( priority = KASHIDA_PRIORITY; priority <= NULL_PRIORITY; priority += 1 ) { var prioritySum = priorities[priority]; if (prioritySum !== 0) { if (highestPriority === -1) { highestPriority = priority; highestPrioritySum = prioritySum; } // if this priority covers the remaining gap, we're done if (Math.abs(remainingGap) <= Math.abs(prioritySum)) { priorities[priority] = remainingGap / prioritySum; unconstrained[priority] = 0; remainingGap = 0; break; } // mark that we need to use 100% of the adjustment from // this priority, and subtract the space that it consumes priorities[priority] = 1; remainingGap -= prioritySum; // if this priority has unconstrained glyphs, let them consume the remaining space if (unconstrained[priority] !== 0) { unconstrained[priority] = remainingGap / unconstrained[priority]; remainingGap = 0; break; } } } // zero out remaining priorities (if any) for (var p = priority + 1; p <= NULL_PRIORITY; p += 1) { priorities[p] = 0; unconstrained[p] = 0; } // if there is still space left over, assign it to the highest priority that we saw. // this violates their factors, but it only happens in extreme cases if (remainingGap > 0 && highestPriority > -1) { priorities[highestPriority] = (highestPrioritySum + (gap - total)) / highestPrioritySum; } // create and return an array of distances to add to each glyph's advance var distances = []; for (var index = 0; index < factors.length; index += 1) { // the distance to add to this glyph is the sum of the space to add // after this glyph, and the space to add before the next glyph var _f = factors[index]; var next = factors[index + 1]; var dist = _f.after * priorities[_f.priority]; if (next) { dist += next.before * priorities[next.priority]; } // if this glyph is unconstrained, add the unconstrained distance as well if (_f.unconstrained) { dist += _f.after * unconstrained[_f.priority]; if (next) { dist += next.before * unconstrained[next.priority]; } } distances.push(dist); } return distances; }; var _default = getDistances; exports["default"] = _default; /***/ }, /***/ 1845: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { "use strict"; var _interopRequireDefault = __webpack_require__(5318)["default"]; exports.__esModule = true; exports["default"] = void 0; var _isWhiteSpace = _interopRequireDefault( __webpack_require__(2065) ); var WHITESPACE_PRIORITY = 1; var LETTER_PRIORITY = 2; var EXPAND_WHITESPACE_FACTOR = { before: 0.5, after: 0.5, priority: WHITESPACE_PRIORITY, unconstrained: false, }; var EXPAND_CHAR_FACTOR = { before: 0.14453125, // 37/256 after: 0.14453125, priority: LETTER_PRIORITY, unconstrained: false, }; var SHRINK_WHITESPACE_FACTOR = { before: -0.04296875, // -11/256 after: -0.04296875, priority: WHITESPACE_PRIORITY, unconstrained: false, }; var SHRINK_CHAR_FACTOR = { before: -0.04296875, after: -0.04296875, priority: LETTER_PRIORITY, unconstrained: false, }; var getCharFactor = function getCharFactor(direction, options) { var expandCharFactor = options.expandCharFactor || {}; var shrinkCharFactor = options.shrinkCharFactor || {}; return direction === "GROW" ? Object.assign({}, EXPAND_CHAR_FACTOR, expandCharFactor) : Object.assign({}, SHRINK_CHAR_FACTOR, shrinkCharFactor); }; var getWhitespaceFactor = function getWhitespaceFactor( direction, options ) { var expandWhitespaceFactor = options.expandWhitespaceFactor || {}; var shrinkWhitespaceFactor = options.shrinkWhitespaceFactor || {}; return direction === "GROW" ? Object.assign( {}, EXPAND_WHITESPACE_FACTOR, expandWhitespaceFactor ) : Object.assign( {}, SHRINK_WHITESPACE_FACTOR, shrinkWhitespaceFactor ); }; var factor = function factor(direction, options) { return function (glyphs) { var charFactor = getCharFactor(direction, options); var whitespaceFactor = getWhitespaceFactor( direction, options ); var factors = []; for (var index = 0; index < glyphs.length; index += 1) { var f = void 0; var glyph = glyphs[index]; if ((0, _isWhiteSpace.default)(glyph)) { f = Object.assign({}, whitespaceFactor); if (index === glyphs.length - 1) { f.before = 0; if (index > 0) { factors[index - 1].after = 0; } } } else if (glyph.isMark && index > 0) { f = Object.assign({}, factors[index - 1]); f.before = 0; factors[index - 1].after = 0; } else { f = Object.assign({}, charFactor); } factors.push(f); } return factors; }; }; var getFactors = function getFactors(gap, line, options) { var direction = gap > 0 ? "GROW" : "SHRINK"; var getFactor = factor(direction, options); var factors = line.runs.reduce(function (acc, run) { return acc.concat(getFactor(run.glyphs)); }, []); factors[0].before = 0; factors[factors.length - 1].after = 0; return factors; }; var _default = getFactors; exports["default"] = _default; /***/ }, /***/ 9186: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { "use strict"; var _interopRequireDefault = __webpack_require__(5318)["default"]; exports.__esModule = true; exports["default"] = void 0; var _createForOfIteratorHelperLoose2 = _interopRequireDefault( __webpack_require__(314) ); var _getFactors = _interopRequireDefault(__webpack_require__(1845)); var _getDistances = _interopRequireDefault( __webpack_require__(7518) ); var _advanceWidth = _interopRequireDefault( __webpack_require__(7106) ); /* eslint-disable consistent-return */ /* eslint-disable no-plusplus */ /* eslint-disable no-restricted-syntax */ /** * Adjust run positions by given distances * * @param {Array} distances * @param {Object} line * @returns {Object} line */ var justifyLine = function justifyLine(distances, line) { var index = 0; for ( var _iterator = (0, _createForOfIteratorHelperLoose2.default)(line.runs), _step; !(_step = _iterator()).done; ) { var run = _step.value; for ( var _iterator2 = (0, _createForOfIteratorHelperLoose2.default)( run.positions ), _step2; !(_step2 = _iterator2()).done; ) { var position = _step2.value; position.xAdvance += distances[index++]; } } return line; }; /** * A JustificationEngine is used by a Typesetter to perform line fragment * justification. This implementation is based on a description of Apple's * justification algorithm from a PDF in the Apple Font Tools package. * * //TODO: Make it immutable * * @param {Object} layout options * @param {Object} line * @returns {Object} line */ var justification = function justification(options) { return function (line) { var gap = line.box.width - (0, _advanceWidth.default)(line); if (gap === 0) return; // Exact fit var factors = (0, _getFactors.default)(gap, line, options); var distances = (0, _getDistances.default)(gap, factors); return justifyLine(distances, line); }; }; var _default = justification; exports["default"] = _default; /***/ }, /***/ 2195: /***/ function (__unused_webpack_module, exports) { "use strict"; exports.__esModule = true; exports["default"] = void 0; /* eslint-disable no-plusplus */ var INFINITY = 10000; var getNextBreakpoint = function getNextBreakpoint( subnodes, widths, lineNumber ) { var position = null; var minimumBadness = Infinity; var sum = { width: 0, stretch: 0, shrink: 0, }; var lineLength = widths[Math.min(lineNumber, widths.length - 1)]; var calculateRatio = function calculateRatio(node) { if (sum.width < lineLength) { return sum.stretch - node.stretch > 0 ? (lineLength - sum.width) / sum.stretch : INFINITY; } if (sum.width > lineLength) { return sum.shrink - node.shrink > 0 ? (lineLength - sum.width) / sum.shrink : INFINITY; } return 0; }; for (var i = 0; i < subnodes.length; i += 1) { var node = subnodes[i]; if (node.type === "box") { sum.width += node.width; } else if (node.type === "glue") { sum.width += node.width; sum.stretch += node.stretch; sum.shrink += node.shrink; } if (sum.width - sum.shrink > lineLength) { if (position === null) { var j = i === 0 ? i + 1 : i; while ( j < subnodes.length && (subnodes[j].type === "glue" || subnodes[j].type === "penalty") ) { j++; } position = j - 1; } break; } if (node.type === "penalty" || node.type === "glue") { var ratio = calculateRatio(node); var penalty = node.type === "penalty" ? node.penalty : 0; var badness = 100 * Math.pow(Math.abs(ratio), 3) + penalty; if (minimumBadness >= badness) { position = i; minimumBadness = badness; } } } return sum.width - sum.shrink > lineLength ? position : null; }; var applyBestFit = function applyBestFit(nodes, widths) { var count = 0; var lineNumber = 0; var subnodes = nodes; var breakpoints = [ { position: 0, }, ]; while (subnodes.length > 0) { var breakpoint = getNextBreakpoint( subnodes, widths, lineNumber ); if (breakpoint !== null) { count += breakpoint; breakpoints.push({ position: count, }); subnodes = subnodes.slice( breakpoint + 1, subnodes.length ); count++; lineNumber++; } else { subnodes = []; } } return breakpoints; }; var _default = applyBestFit; exports["default"] = _default; /***/ }, /***/ 7335: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { "use strict"; var _interopRequireDefault = __webpack_require__(5318)["default"]; exports.__esModule = true; exports["default"] = void 0; var _bestFit = _interopRequireDefault(__webpack_require__(2195)); var _linebreak = _interopRequireDefault(__webpack_require__(26)); var _slice = _interopRequireDefault(__webpack_require__(2564)); var _insertGlyph = _interopRequireDefault( __webpack_require__(5821) ); var _advanceWidthBetween = _interopRequireDefault( __webpack_require__(5090) ); var HYPHEN = 0x002d; var TOLERANCE_STEPS = 5; var TOLERANCE_LIMIT = 50; var opts = { width: 3, stretch: 6, shrink: 9, }; /** * Slice attributed string to many lines * * @param {Object} attributed string * @param {Array} nodes * @param {Array} breaks * @return {Array} attributed strings */ var breakLines = function breakLines(string, nodes, breaks) { var start = 0; var end = null; var lines = breaks.reduce(function (acc, breakPoint) { var node = nodes[breakPoint.position]; var prevNode = nodes[breakPoint.position - 1]; // Last breakpoint corresponds to K&P mandatory final glue if (breakPoint.position === nodes.length - 1) return acc; var line; if (node.type === "penalty") { end = prevNode.value.end; line = (0, _slice.default)(start, end, string); line = (0, _insertGlyph.default)( line.length, HYPHEN, line ); } else { end = node.value.end; line = (0, _slice.default)(start, end, string); } start = end; return [].concat(acc, [line]); }, []); // Last line lines.push( (0, _slice.default)(start, string.string.length, string) ); return lines; }; /** * Return Knuth & Plass nodes based on line and previously calculated syllables * * @param {Object} attributed string * @param {Object} attributed string * @param {Object} layout options * @return {Array} attributed strings */ var getNodes = function getNodes(attributedString, _ref, options) { var align = _ref.align; var start = 0; var hyphenWidth = 5; var syllables = attributedString.syllables; var hyphenPenalty = options.hyphenationPenalty || (align === "justify" ? 100 : 600); var result = syllables.reduce(function (acc, s, index) { var width = (0, _advanceWidthBetween.default)( start, start + s.length, attributedString ); if (s.trim() === "") { var stretch = (width * opts.width) / opts.stretch; var shrink = (width * opts.width) / opts.shrink; var value = { start: start, end: start + s.length, }; acc.push( _linebreak.default.glue( width, value, stretch, shrink ) ); } else { var hyphenated = syllables[index + 1] !== " "; var _value = { start: start, end: start + s.length, }; acc.push( _linebreak.default.box(width, _value, hyphenated) ); if (syllables[index + 1] && hyphenated) { acc.push( _linebreak.default.penalty( hyphenWidth, hyphenPenalty, 1 ) ); } } start += s.length; return acc; }, []); result.push( _linebreak.default.glue( 0, null, _linebreak.default.infinity, 0 ) ); result.push( _linebreak.default.penalty( 0, -_linebreak.default.infinity, 1 ) ); return result; }; var getStyles = function getStyles(attributedString) { var _attributedString$run, _attributedString$run2; return ( ((_attributedString$run = attributedString.runs) === null || _attributedString$run === void 0 ? void 0 : (_attributedString$run2 = _attributedString$run[0]) === null || _attributedString$run2 === void 0 ? void 0 : _attributedString$run2.attributes) || {} ); }; /** * Performs Knuth & Plass line breaking algorithm * Fallbacks to best fit algorithm if latter not successful * * @param {Object} layout options * @param {Object} attributed string * @param {Object} attributed string * @return {Array} attributed strings */ var linebreaker = function linebreaker(options) { return function (attributedString, availableWidths) { var tolerance = options.tolerance || 4; var style = getStyles(attributedString); var nodes = getNodes(attributedString, style, options); var breaks = (0, _linebreak.default)( nodes, availableWidths, { tolerance: tolerance, } ); // Try again with a higher tolerance if the line breaking failed. while (breaks.length === 0 && tolerance < TOLERANCE_LIMIT) { tolerance += TOLERANCE_STEPS; breaks = (0, _linebreak.default)( nodes, availableWidths, { tolerance: tolerance, } ); } if ( breaks.length === 0 || (breaks.length === 1 && breaks[0].position === 0) ) { breaks = (0, _bestFit.default)(nodes, availableWidths); } return breakLines(attributedString, nodes, breaks.slice(1)); }; }; var _default = linebreaker; exports["default"] = _default; /***/ }, /***/ 26: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { "use strict"; var _interopRequireDefault = __webpack_require__(5318)["default"]; exports.__esModule = true; exports["default"] = void 0; var _linkedList = _interopRequireDefault(__webpack_require__(4561)); /* eslint-disable no-restricted-properties */ /** * @preserve Knuth and Plass line breaking algorithm in JavaScript * * Licensed under the new BSD License. * Copyright 2009-2010, Bram Stein * All rights reserved. */ var linebreak = function linebreak(nodes, lines, settings) { var options = { demerits: { line: (settings && settings.demerits && settings.demerits.line) || 10, flagged: (settings && settings.demerits && settings.demerits.flagged) || 100, fitness: (settings && settings.demerits && settings.demerits.fitness) || 3000, }, tolerance: (settings && settings.tolerance) || 3, }; var activeNodes = new _linkedList.default(); var sum = { width: 0, stretch: 0, shrink: 0, }; var lineLengths = lines; var breaks = []; var tmp = { data: { demerits: Infinity, }, }; function breakpoint( position, demerits, ratio, line, fitnessClass, totals, previous ) { return { position: position, demerits: demerits, ratio: ratio, line: line, fitnessClass: fitnessClass, totals: totals || { width: 0, stretch: 0, shrink: 0, }, previous: previous, }; } function computeCost(start, end, active, currentLine) { var width = sum.width - active.totals.width; var stretch = 0; var shrink = 0; // If the current line index is within the list of linelengths, use it, otherwise use // the last line length of the list. var lineLength = currentLine < lineLengths.length ? lineLengths[currentLine - 1] : lineLengths[lineLengths.length - 1]; if (nodes[end].type === "penalty") { width += nodes[end].width; } if (width < lineLength) { // Calculate the stretch ratio stretch = sum.stretch - active.totals.stretch; if (stretch > 0) { return (lineLength - width) / stretch; } return linebreak.infinity; } if (width > lineLength) { // Calculate the shrink ratio shrink = sum.shrink - active.totals.shrink; if (shrink > 0) { return (lineLength - width) / shrink; } return linebreak.infinity; } // perfect match return 0; } // Add width, stretch and shrink values from the current // break point up to the next box or forced penalty. function computeSum(breakPointIndex) { var result = { width: sum.width, stretch: sum.stretch, shrink: sum.shrink, }; for (var i = breakPointIndex; i < nodes.length; i += 1) { if (nodes[i].type === "glue") { result.width += nodes[i].width; result.stretch += nodes[i].stretch; result.shrink += nodes[i].shrink; } else if ( nodes[i].type === "box" || (nodes[i].type === "penalty" && nodes[i].penalty === -linebreak.infinity && i > breakPointIndex) ) { break; } } return result; } // The main loop of the algorithm // eslint-disable-next-line no-shadow function mainLoop(node, index, nodes) { var active = activeNodes.first(); var next = null; var ratio = 0; var demerits = 0; var candidates = []; var badness; var currentLine = 0; var tmpSum; var currentClass = 0; var fitnessClass; var candidate; var newNode; // The inner loop iterates through all the active nodes with line < currentLine and then // breaks out to insert the new active node candidates before looking at the next active // nodes for the next lines. The result of this is that the active node list is always // sorted by line number. while (active !== null) { candidates = [ { demerits: Infinity, }, { demerits: Infinity, }, { demerits: Infinity, }, { demerits: Infinity, }, ]; // Iterate through the linked list of active nodes to find new potential active nodes // and deactivate current active nodes. while (active !== null) { next = active.next; currentLine = active.data.line + 1; ratio = computeCost( active.data.position, index, active.data, currentLine ); // Deactive nodes when the distance between the current active node and the // current node becomes too large (i.e. it exceeds the stretch limit and the stretch // ratio becomes negative) or when the current node is a forced break (i.e. the end // of the paragraph when we want to remove all active nodes, but possibly have a final // candidate active node---if the paragraph can be set using the given tolerance value.) if ( ratio < -1 || (node.type === "penalty" && node.penalty === -linebreak.infinity) ) { activeNodes.remove(active); } // If the ratio is within the valid range of -1 <= ratio <= tolerance calculate the // total demerits and record a candidate active node. if (ratio >= -1 && ratio <= options.tolerance) { badness = 100 * Math.pow(Math.abs(ratio), 3); // Positive penalty if ( node.type === "penalty" && node.penalty >= 0 ) { demerits = Math.pow( options.demerits.line + badness, 2 ) + Math.pow(node.penalty, 2); // Negative penalty but not a forced break } else if ( node.type === "penalty" && node.penalty !== -linebreak.infinity ) { demerits = Math.pow( options.demerits.line + badness, 2 ) - Math.pow(node.penalty, 2); // All other cases } else { demerits = Math.pow( options.demerits.line + badness, 2 ); } if ( node.type === "penalty" && nodes[active.data.position].type === "penalty" ) { demerits += options.demerits.flagged * node.flagged * nodes[active.data.position].flagged; } // Calculate the fitness class for this candidate active node. if (ratio < -0.5) { currentClass = 0; } else if (ratio <= 0.5) { currentClass = 1; } else if (ratio <= 1) { currentClass = 2; } else { currentClass = 3; } // Add a fitness penalty to the demerits if the fitness classes of two adjacent lines // differ too much. if ( Math.abs( currentClass - active.data.fitnessClass ) > 1 ) { demerits += options.demerits.fitness; } // Add the total demerits of the active node to get the total demerits of this candidate node. demerits += active.data.demerits; // Only store the best candidate for each fitness class if ( demerits < candidates[currentClass].demerits ) { candidates[currentClass] = { active: active, demerits: demerits, ratio: ratio, }; } } active = next; // Stop iterating through active nodes to insert new candidate active nodes in the active list // before moving on to the active nodes for the next line. // TODO: The Knuth and Plass paper suggests a conditional for currentLine < j0. This means paragraphs // with identical line lengths will not be sorted by line number. Find out if that is a desirable outcome. // For now I left this out, as it only adds minimal overhead to the algorithm and keeping the active node // list sorted has a higher priority. if ( active !== null && active.data.line >= currentLine ) { break; } } tmpSum = computeSum(index); for ( fitnessClass = 0; fitnessClass < candidates.length; fitnessClass += 1 ) { candidate = candidates[fitnessClass]; if (candidate.demerits < Infinity) { newNode = new _linkedList.default.Node( breakpoint( index, candidate.demerits, candidate.ratio, candidate.active.data.line + 1, fitnessClass, tmpSum, candidate.active ) ); if (active !== null) { activeNodes.insertBefore(active, newNode); } else { activeNodes.push(newNode); } } } } } // Add an active node for the start of the paragraph. activeNodes.push( new _linkedList.default.Node( breakpoint(0, 0, 0, 0, 0, undefined, null) ) ); // eslint-disable-next-line no-shadow nodes.forEach(function (node, index, nodes) { if (node.type === "box") { sum.width += node.width; } else if (node.type === "glue") { if (index > 0 && nodes[index - 1].type === "box") { mainLoop(node, index, nodes); } sum.width += node.width; sum.stretch += node.stretch; sum.shrink += node.shrink; } else if ( node.type === "penalty" && node.penalty !== linebreak.infinity ) { mainLoop(node, index, nodes); } }); if (activeNodes.size() !== 0) { // Find the best active node (the one with the least total demerits.) activeNodes.forEach(function (node) { if (node.data.demerits < tmp.data.demerits) { tmp = node; } }); while (tmp !== null) { breaks.push({ position: tmp.data.position, ratio: tmp.data.ratio, }); tmp = tmp.data.previous; } return breaks.reverse(); } return []; }; linebreak.infinity = 10000; linebreak.glue = function (width, value, stretch, shrink) { return { type: "glue", value: value, width: width, stretch: stretch, shrink: shrink, }; }; linebreak.box = function (width, value, hyphenated) { if (hyphenated === void 0) { hyphenated = false; } return { type: "box", width: width, value: value, hyphenated: hyphenated, }; }; linebreak.penalty = function (width, penalty, flagged) { return { type: "penalty", width: width, penalty: penalty, flagged: flagged, }; }; var _default = linebreak; exports["default"] = _default; /***/ }, /***/ 4561: /***/ function (__unused_webpack_module, exports) { "use strict"; exports.__esModule = true; exports["default"] = void 0; /* eslint-disable no-param-reassign */ /* eslint-disable max-classes-per-file */ var Node = /*#__PURE__*/ (function () { function Node(data) { this.prev = null; this.next = null; this.data = data; } var _proto = Node.prototype; _proto.toString = function toString() { return this.data.toString(); }; return Node; })(); var LinkedList = /*#__PURE__*/ (function () { function LinkedList() { this.head = null; this.tail = null; this.listSize = 0; } var _proto2 = LinkedList.prototype; _proto2.isLinked = function isLinked(node) { return !( (node && node.prev === null && node.next === null && this.tail !== node && this.head !== node) || this.isEmpty() ); }; _proto2.size = function size() { return this.listSize; }; _proto2.isEmpty = function isEmpty() { return this.listSize === 0; }; _proto2.first = function first() { return this.head; }; _proto2.last = function last() { return this.last; }; _proto2.toString = function toString() { return this.toArray().toString(); }; _proto2.toArray = function toArray() { var node = this.head; var result = []; while (node !== null) { result.push(node); node = node.next; } return result; }; _proto2.forEach = function forEach(fun) { var node = this.head; while (node !== null) { fun(node); node = node.next; } }; _proto2.contains = function contains(n) { var node = this.head; if (!this.isLinked(n)) { return false; } while (node !== null) { if (node === n) { return true; } node = node.next; } return false; }; _proto2.at = function at(i) { var node = this.head; var index = 0; if (i >= this.listLength || i < 0) { return null; } while (node !== null) { if (i === index) { return node; } node = node.next; index += 1; } return null; }; _proto2.insertAfter = function insertAfter(node, newNode) { if (!this.isLinked(node)) { return this; } newNode.prev = node; newNode.next = node.next; if (node.next === null) { this.tail = newNode; } else { node.next.prev = newNode; } node.next = newNode; this.listSize += 1; return this; }; _proto2.insertBefore = function insertBefore(node, newNode) { if (!this.isLinked(node)) { return this; } newNode.prev = node.prev; newNode.next = node; if (node.prev === null) { this.head = newNode; } else { node.prev.next = newNode; } node.prev = newNode; this.listSize += 1; return this; }; _proto2.push = function push(node) { if (this.head === null) { this.unshift(node); } else { this.insertAfter(this.tail, node); } return this; }; _proto2.unshift = function unshift(node) { if (this.head === null) { this.head = node; this.tail = node; node.prev = null; node.next = null; this.listSize += 1; } else { this.insertBefore(this.head, node); } return this; }; _proto2.remove = function remove(node) { if (!this.isLinked(node)) { return this; } if (node.prev === null) { this.head = node.next; } else { node.prev.next = node.next; } if (node.next === null) { this.tail = node.prev; } else { node.next.prev = node.prev; } this.listSize -= 1; return this; }; _proto2.pop = function pop() { var node = this.tail; this.tail.prev.next = null; this.tail = this.tail.prev; this.listSize -= 1; node.prev = null; node.next = null; return node; }; _proto2.shift = function shift() { var node = this.head; this.head.next.prev = null; this.head = this.head.next; this.listSize -= 1; node.prev = null; node.next = null; return node; }; return LinkedList; })(); LinkedList.Node = Node; var _default = LinkedList; exports["default"] = _default; /***/ }, /***/ 9276: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { "use strict"; var _interopRequireDefault = __webpack_require__(5318)["default"]; exports.__esModule = true; exports["default"] = void 0; var _unicodeProperties = _interopRequireDefault( __webpack_require__(8537) ); var _empty = _interopRequireDefault(__webpack_require__(5579)); var ignoredScripts = ["Common", "Inherited", "Unknown"]; /** * Resolves unicode script in runs, grouping equal runs together * * @param {Object} layout options * @param {Object} attributed string * @return {Object} attributed string */ var scriptItemizer = function scriptItemizer() { return function (attributedString) { var string = attributedString.string; var lastScript = "Unknown"; var lastIndex = 0; var index = 0; var res = []; if (!string) return (0, _empty.default)(); for (var i = 0; i < string.length; i += 1) { var char = string[i]; var codePoint = char.codePointAt(); var script = _unicodeProperties.default.getScript(codePoint); if ( script !== lastScript && !ignoredScripts.includes(script) ) { if (lastScript !== "Unknown") { res.push({ start: lastIndex, end: index, attributes: { script: lastScript, }, }); } lastIndex = index; lastScript = script; } index += char.length; } if (lastIndex < string.length) { res.push({ start: lastIndex, end: string.length, attributes: { script: lastScript, }, }); } return { string: string, runs: res, }; }; }; var _default = scriptItemizer; exports["default"] = _default; /***/ }, /***/ 32: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { "use strict"; var _interopRequireDefault = __webpack_require__(5318)["default"]; exports.__esModule = true; exports["default"] = void 0; var _ascent = _interopRequireDefault(__webpack_require__(1162)); var _ascent2 = _interopRequireDefault(__webpack_require__(3226)); var _advanceWidth = _interopRequireDefault( __webpack_require__(3689) ); var _advanceWidth2 = _interopRequireDefault( __webpack_require__(7106) ); /* eslint-disable no-param-reassign */ // The base font size used for calculating underline thickness. var BASE_FONT_SIZE = 12; /** * A TextDecorationEngine is used by a Typesetter to generate * DecorationLines for a line fragment, including underlines * and strikes. */ var textDecoration = function textDecoration() { return function (lineFragment) { var x = lineFragment.overflowLeft || 0; var overflowRight = lineFragment.overflowRight || 0; var maxX = (0, _advanceWidth2.default)(lineFragment) - overflowRight; lineFragment.decorationLines = []; for (var i = 0; i < lineFragment.runs.length; i += 1) { var run = lineFragment.runs[i]; var width = Math.min( maxX - x, (0, _advanceWidth.default)(run) ); var thickness = Math.max( 0.5, Math.floor(run.attributes.fontSize / BASE_FONT_SIZE) ); if (run.attributes.underline) { var rect = { x: x, y: (0, _ascent2.default)(lineFragment) + thickness * 2, width: width, height: thickness, }; var line = { rect: rect, opacity: run.attributes.opacity, color: run.attributes.underlineColor || "black", style: run.attributes.underlineStyle || "solid", }; lineFragment.decorationLines.push(line); } if (run.attributes.strike) { var y = (0, _ascent2.default)(lineFragment) - (0, _ascent.default)(run) / 3; var _rect = { x: x, y: y, width: width, height: thickness, }; var _line = { rect: _rect, opacity: run.attributes.opacity, color: run.attributes.strikeColor || "black", style: run.attributes.strikeStyle || "solid", }; lineFragment.decorationLines.push(_line); } x += width; } return lineFragment; }; }; var _default = textDecoration; exports["default"] = _default; /***/ }, /***/ 4915: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { "use strict"; var _interopRequireDefault = __webpack_require__(5318)["default"]; exports.__esModule = true; exports["default"] = void 0; var _hyphen = _interopRequireDefault(__webpack_require__(3202)); var _enUs = _interopRequireDefault(__webpack_require__(1487)); var _fns = __webpack_require__(4354); var SOFT_HYPHEN = "\xAD"; var hyphenator = (0, _hyphen.default)(_enUs.default); var splitHyphen = function splitHyphen(word) { return word.split(SOFT_HYPHEN); }; var cache = {}; var getParts = function getParts(word) { var base = word.includes(SOFT_HYPHEN) ? word : hyphenator(word); return splitHyphen(base); }; var wordHyphenation = function wordHyphenation() { return function (word) { var cacheKey = "_" + word; if ((0, _fns.isNil)(word)) return []; if (cache[cacheKey]) return cache[cacheKey]; cache[cacheKey] = getParts(word); return cache[cacheKey]; }; }; var _default = wordHyphenation; exports["default"] = _default; /***/ }, /***/ 6742: /***/ function (__unused_webpack_module, exports) { "use strict"; exports.__esModule = true; exports["default"] = void 0; /** * Get glyph for a given code point * * @param {number} codePoint * @param {Object} font * @return {Object} glyph * */ var fromCodePoint = function fromCodePoint(value, font) { return font && value ? font.glyphForCodePoint(value) : null; }; var _default = fromCodePoint; exports["default"] = _default; /***/ }, /***/ 2065: /***/ function (__unused_webpack_module, exports) { "use strict"; exports.__esModule = true; exports["default"] = void 0; var WHITE_SPACES_CODE = 32; /** * Check if glyph is white space * * @param {Object} glyph * @return {Boolean} is white space * */ var isWhiteSpace = function isWhiteSpace(glyph) { var codePoints = (glyph === null || glyph === void 0 ? void 0 : glyph.codePoints) || []; return codePoints.includes(WHITE_SPACES_CODE); }; var _default = isWhiteSpace; exports["default"] = _default; /***/ }, /***/ 8389: /***/ function (__unused_webpack_module, exports) { "use strict"; exports.__esModule = true; exports["default"] = void 0; /** * Slice glyph between codePoints range * Util for breaking ligatures * * @param {number} start code point index * @param {number} end code point index * @param {Object} font to generate new glyph * @param {Object} glyph to be sliced * @return {Array} sliced glyph parts */ var slice = function slice(start, end, font, glyph) { if (!glyph) return []; if (start === end) return []; if (start === 0 && end === glyph.codePoints.length) return [glyph]; var codePoints = glyph.codePoints.slice(start, end); var string = String.fromCodePoint.apply(String, codePoints); return font ? font.layout(string).glyphs : [glyph]; }; var _default = slice; exports["default"] = _default; /***/ }, /***/ 8931: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { "use strict"; exports.__esModule = true; exports["default"] = void 0; var _fns = __webpack_require__(4354); /** * Append glyph indices with given length * * Ex. appendIndices(3, [0, 1, 2, 2]) => [0, 1, 2, 2, 3, 3, 3] * * @param {number} length * @param {Array} glyph indices * @return {Array} extended glyph indices */ var appendIndices = function appendIndices(length, indices) { var lastIndex = (0, _fns.last)(indices); var value = (0, _fns.isNil)(lastIndex) ? 0 : lastIndex + 1; var newIndices = Array(length).fill(value); return indices.concat(newIndices); }; var _default = appendIndices; exports["default"] = _default; /***/ }, /***/ 298: /***/ function (__unused_webpack_module, exports) { "use strict"; exports.__esModule = true; exports["default"] = void 0; /** * Returns new array starting with zero, and keeping same relation between consecutive values * * @param {Array[number]} list * @return {boolean} normalized array */ var normalize = function normalize(array) { var head = array[0]; return array.map(function (value) { return value - head; }); }; var _default = normalize; exports["default"] = _default; /***/ }, /***/ 4131: /***/ function (__unused_webpack_module, exports) { "use strict"; exports.__esModule = true; exports["default"] = void 0; var DUMMY_CODEPOINT = 123; /** * Resolve string indices based on glyphs code points * * @param {Array} glyphs * @return {Array} glyph indices */ var resolve = function resolve(glyphs) { if (glyphs === void 0) { glyphs = []; } return glyphs.reduce(function (acc, glyph) { var codePoints = (glyph === null || glyph === void 0 ? void 0 : glyph.codePoints) || [DUMMY_CODEPOINT]; if (acc.length === 0) return codePoints.map(function () { return 0; }); var last = acc[acc.length - 1]; var next = codePoints.map(function () { return last + 1; }); return [].concat(acc, next); }, []); }; var _default = resolve; exports["default"] = _default; /***/ }, /***/ 5526: /***/ function (__unused_webpack_module, exports) { "use strict"; exports.__esModule = true; exports["default"] = void 0; var applyAttributes = function applyAttributes(a) { return { align: a.align || "left", alignLastLine: a.alignLastLine || (a.align === "justify" ? "left" : a.align || "left"), attachment: a.attachment || null, backgroundColor: a.backgroundColor || null, bidiLevel: a.bidiLevel || null, bullet: a.bullet || null, characterSpacing: a.characterSpacing || 0, color: a.color || "black", features: a.features || [], fill: a.fill !== false, font: a.font || null, fontSize: a.fontSize || 12, hangingPunctuation: a.hangingPunctuation || false, hyphenationFactor: a.hyphenationFactor || 0, indent: a.indent || 0, justificationFactor: a.justificationFactor || 1, lineHeight: a.lineHeight || null, lineSpacing: a.lineSpacing || 0, link: a.link || null, marginLeft: a.marginLeft || a.margin || 0, marginRight: a.marginRight || a.margin || 0, opacity: a.opacity, paddingTop: a.paddingTop || a.padding || 0, paragraphSpacing: a.paragraphSpacing || 0, underline: a.underline || false, underlineColor: a.underlineColor || a.color || "black", underlineStyle: a.underlineStyle || "solid", script: a.script || null, shrinkFactor: a.shrinkFactor || 0, strike: a.strike || false, strikeColor: a.strikeColor || a.color || "black", strikeStyle: a.strikeStyle || "solid", stroke: a.stroke || false, wordSpacing: a.wordSpacing || 0, yOffset: a.yOffset || 0, }; }; /** * Apply default style to run * * @param {Object} run * @return {Object} run with styles */ var applyRunStyles = function applyRunStyles(run) { var attributes = applyAttributes(run.attributes); return Object.assign({}, run, { attributes: attributes, }); }; /** * Apply default attributes for an attributed string * * @param {Object} engines * @param {Object} layout options * @param {Object} attributed string * @return {Object} attributed string */ var applyDefaultStyles = function applyDefaultStyles() { return function (attributedString) { var string = attributedString.string || ""; var runs = (attributedString.runs || []).map( applyRunStyles ); return { string: string, runs: runs, }; }; }; var _default = applyDefaultStyles; exports["default"] = _default; /***/ }, /***/ 2680: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { "use strict"; var _interopRequireDefault = __webpack_require__(5318)["default"]; exports.__esModule = true; exports["default"] = void 0; var _fns = __webpack_require__(4354); var _advanceWidth = _interopRequireDefault( __webpack_require__(7106) ); var _leadingOffset = _interopRequireDefault( __webpack_require__(2182) ); var _trailingOffset = _interopRequireDefault( __webpack_require__(9815) ); var _dropLast = _interopRequireDefault(__webpack_require__(8208)); var ALIGNMENT_FACTORS = { center: 0.5, right: 1, }; /** * Remove new line char at the end of line if present * * @param {Object} line * @return {Object} line */ var removeNewLine = function removeNewLine(line) { return (0, _fns.last)(line.string) === "\n" ? (0, _dropLast.default)(line) : line; }; var getOverflowLeft = function getOverflowLeft(line) { return ( (0, _leadingOffset.default)(line) + (line.overflowLeft || 0) ); }; var getOverflowRight = function getOverflowRight(line) { return ( (0, _trailingOffset.default)(line) + (line.overflowRight || 0) ); }; /** * Ignore whitespace at the start and end of a line for alignment * * @param {Object} line * @return {Object} line */ var adjustOverflow = function adjustOverflow(line) { var overflowLeft = getOverflowLeft(line); var overflowRight = getOverflowRight(line); var x = line.box.x - overflowLeft; var width = line.box.width + overflowLeft + overflowRight; var box = Object.assign({}, line.box, { x: x, width: width, }); return Object.assign({}, line, { box: box, overflowLeft: overflowLeft, overflowRight: overflowRight, }); }; /** * Performs line justification by calling appropiate engine * * @param {Object} engines * @param {Object} layout options * @param {string} text align * @param {Object} line * @return {Object} line */ var justifyLine = function justifyLine(engines, options, align) { return function (line) { var lineWidth = (0, _advanceWidth.default)(line); var alignFactor = ALIGNMENT_FACTORS[align] || 0; var remainingWidth = Math.max( 0, line.box.width - lineWidth ); var shouldJustify = align === "justify" || lineWidth > line.box.width; var x = line.box.x + remainingWidth * alignFactor; var box = Object.assign({}, line.box, { x: x, }); var newLine = Object.assign({}, line, { box: box, }); return shouldJustify ? engines.justification(options)(newLine) : newLine; }; }; /** * Finalize line by performing line justification * and text decoration (using appropiate engines) * * @param {Object} engines * @param {Object} layout options * @param {Object} line * @param {number} line index * @param {Array} total lines * @return {Object} line */ var finalizeBlock = function finalizeBlock(engines, options) { if (engines === void 0) { engines = {}; } return function (line, i, lines) { var _line$runs, _line$runs$; var isLastFragment = i === lines.length - 1; var style = ((_line$runs = line.runs) === null || _line$runs === void 0 ? void 0 : (_line$runs$ = _line$runs[0]) === null || _line$runs$ === void 0 ? void 0 : _line$runs$.attributes) || {}; var align = isLastFragment ? style.alignLastLine : style.align; return (0, _fns.compose)( engines.textDecoration(options), justifyLine(engines, options, align), adjustOverflow, removeNewLine )(line); }; }; /** * Finalize line block by performing line justification * and text decoration (using appropiate engines) * * @param {Object} engines * @param {Object} layout options * @param {Array} line blocks * @return {Array} line blocks */ var finalizeFragments = function finalizeFragments( engines, options ) { return function (blocks) { var blockFinalizer = finalizeBlock(engines, options); return blocks.map(function (block) { return block.map(blockFinalizer); }); }; }; var _default = finalizeFragments; exports["default"] = _default; /***/ }, /***/ 8019: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { "use strict"; var _interopRequireDefault = __webpack_require__(5318)["default"]; exports.__esModule = true; exports["default"] = void 0; var _extends2 = _interopRequireDefault(__webpack_require__(7154)); var _scale = _interopRequireDefault(__webpack_require__(3241)); var _resolve = _interopRequireDefault(__webpack_require__(4131)); var getCharacterSpacing = function getCharacterSpacing(run) { var _run$attributes; return ( ((_run$attributes = run.attributes) === null || _run$attributes === void 0 ? void 0 : _run$attributes.characterSpacing) || 0 ); }; /** * Scale run positions * * @param {Object} run * @param {Array} positions * @return {Array} scaled positions */ var scalePositions = function scalePositions(run, positions) { var runScale = (0, _scale.default)(run); var characterSpacing = getCharacterSpacing(run); return positions.map(function (position, i) { var isLast = i === positions.length; var xSpacing = isLast ? 0 : characterSpacing; return Object.assign({}, position, { xAdvance: position.xAdvance * runScale + xSpacing, yAdvance: position.yAdvance * runScale, xOffset: position.xOffset * runScale, yOffset: position.yOffset * runScale, }); }); }; /** * Create glyph run * * @param {String} string * @param {Object} run * @return {Object} glyph run */ var layoutRun = function layoutRun(string) { return function (run) { var start = run.start, end = run.end, _run$attributes2 = run.attributes, attributes = _run$attributes2 === void 0 ? {} : _run$attributes2; var font = attributes.font; if (!font) return (0, _extends2.default)({}, run, { glyphs: [], glyphIndices: [], positions: [], }); var runString = string.slice(start, end); var glyphRun = font.layout(runString); var positions = scalePositions(run, glyphRun.positions); var glyphIndices = (0, _resolve.default)(glyphRun.glyphs); return (0, _extends2.default)({}, run, { positions: positions, glyphIndices: glyphIndices, glyphs: glyphRun.glyphs, }); }; }; /** * Generate glyphs for single attributed string * * @param {Object} layout engines * @param {Object} layout options * @param {Array} attributed strings * @return {Array} attributed string with glyphs */ var generateGlyphs = function generateGlyphs() { return function (attributedString) { var runs = attributedString.runs.map( layoutRun(attributedString.string) ); return Object.assign({}, attributedString, { runs: runs, }); }; }; var _default = generateGlyphs; exports["default"] = _default; /***/ }, /***/ 4825: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { "use strict"; var _interopRequireDefault = __webpack_require__(5318)["default"]; exports.__esModule = true; exports["default"] = void 0; var _fns = __webpack_require__(4354); var _wrapWords = _interopRequireDefault(__webpack_require__(7777)); var _typesetter = _interopRequireDefault(__webpack_require__(7924)); var _generateGlyphs = _interopRequireDefault( __webpack_require__(8019) ); var _resolveYOffset = _interopRequireDefault( __webpack_require__(8449) ); var _preprocessRuns = _interopRequireDefault( __webpack_require__(1661) ); var _splitParagraphs = _interopRequireDefault( __webpack_require__(4811) ); var _finalizeFragments = _interopRequireDefault( __webpack_require__(2680) ); var _resolveAttachments = _interopRequireDefault( __webpack_require__(1535) ); var _applyDefaultStyles = _interopRequireDefault( __webpack_require__(5526) ); /** * A LayoutEngine is the main object that performs text layout. * It accepts an AttributedString and a Container object * to layout text into, and uses several helper objects to perform * various layout tasks. These objects can be overridden to customize * layout behavior. * * @param {Object} engines * @param {Object} attributed string * @param {Object} container rect * @param {Object} layout options * @return {Array} paragraph blocks */ var layoutEngine = function layoutEngine(engines) { return function (attributedString, container, options) { if (options === void 0) { options = {}; } var processParagraph = (0, _fns.compose)( (0, _resolveYOffset.default)(engines, options), (0, _resolveAttachments.default)(engines, options), (0, _generateGlyphs.default)(engines, options), (0, _wrapWords.default)(engines, options) ); var processParagraphs = function processParagraphs( paragraphs ) { return paragraphs.map(processParagraph); }; return (0, _fns.compose)( (0, _finalizeFragments.default)(engines, options), (0, _typesetter.default)(engines, options, container), processParagraphs, (0, _splitParagraphs.default)(engines, options), (0, _preprocessRuns.default)(engines, options), (0, _applyDefaultStyles.default)(engines, options) )(attributedString); }; }; var _default = layoutEngine; exports["default"] = _default; /***/ }, /***/ 9507: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { "use strict"; var _interopRequireDefault = __webpack_require__(5318)["default"]; exports.__esModule = true; exports["default"] = void 0; var _omit = _interopRequireDefault(__webpack_require__(9435)); var _height = _interopRequireDefault(__webpack_require__(9528)); var ATTACHMENT_CODE = "\uFFFC"; // 65532 /** * Remove attachment attribute if no char present * * @param {Object} attributed string * @return {Object} attributed string */ var purgeAttachments = function purgeAttachments(attributedString) { var shouldPurge = !attributedString.string.includes(ATTACHMENT_CODE); if (!shouldPurge) return attributedString; var runs = attributedString.runs.map(function (run) { return (0, _omit.default)("attachment", run); }); return Object.assign({}, attributedString, { runs: runs, }); }; /** * Layout paragraphs inside rectangle * * @param {Object} rect * @param {Array} attributed strings * @return {Object} layout blocks */ var layoutLines = function layoutLines(rect, lines, indent) { var currentY = rect.y; return lines.map(function (line, i) { var _line$runs, _line$runs$; var lineIndent = i === 0 ? indent : 0; var style = ((_line$runs = line.runs) === null || _line$runs === void 0 ? void 0 : (_line$runs$ = _line$runs[0]) === null || _line$runs$ === void 0 ? void 0 : _line$runs$.attributes) || {}; var height = Math.max( (0, _height.default)(line), style.lineHeight ); var newLine = Object.assign({}, line); delete newLine.syllables; newLine.box = { x: rect.x + lineIndent, y: currentY, width: rect.width - lineIndent, height: height, }; currentY += height; return purgeAttachments(newLine); }); }; /** * Performs line breaking and layout * * @param {Object} engines * @param {Object} layout options * @param {Object} rect * @param {Object} attributed string * @return {Object} layout block */ var layoutParagraph = function layoutParagraph(engines, options) { return function (rect, paragraph) { var _paragraph$runs, _paragraph$runs$, _paragraph$runs$$attr; var indent = ((_paragraph$runs = paragraph.runs) === null || _paragraph$runs === void 0 ? void 0 : (_paragraph$runs$ = _paragraph$runs[0]) === null || _paragraph$runs$ === void 0 ? void 0 : (_paragraph$runs$$attr = _paragraph$runs$.attributes) === null || _paragraph$runs$$attr === void 0 ? void 0 : _paragraph$runs$$attr.indent) || 0; var availableWidths = [rect.width - indent, rect.width]; var lines = engines.linebreaker(options)( paragraph, availableWidths ); return layoutLines(rect, lines, indent); }; }; var _default = layoutParagraph; exports["default"] = _default; /***/ }, /***/ 1661: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { "use strict"; var _interopRequireDefault = __webpack_require__(5318)["default"]; exports.__esModule = true; exports["default"] = void 0; var _fns = __webpack_require__(4354); var _omit = _interopRequireDefault(__webpack_require__(9435)); var _flatten = _interopRequireDefault(__webpack_require__(6990)); var _empty = _interopRequireDefault(__webpack_require__(5579)); var omitFont = function omitFont(attributedString) { var runs = attributedString.runs.map(function (run) { return (0, _omit.default)("font", run); }); return Object.assign({}, attributedString, { runs: runs, }); }; /** * Performs font substitution and script itemization on attributed string * * @param {Object} engines * @param {Object} layout options * @param {Object} attributed string * @return {Object} processed attributed string */ var preprocessRuns = function preprocessRuns(engines, options) { return function (attributedString) { if ((0, _fns.isNil)(attributedString)) return (0, _empty.default)(); var string = attributedString.string; var fontSubstitution = engines.fontSubstitution, scriptItemizer = engines.scriptItemizer; var _omitFont = omitFont(attributedString), omittedFontRuns = _omitFont.runs; var _fontSubstitution = fontSubstitution(options)(attributedString), substitutedRuns = _fontSubstitution.runs; var _scriptItemizer = scriptItemizer(options)(attributedString), itemizationRuns = _scriptItemizer.runs; var runs = substitutedRuns .concat(itemizationRuns) .concat(omittedFontRuns); return { string: string, runs: (0, _flatten.default)(runs), }; }; }; var _default = preprocessRuns; exports["default"] = _default; /***/ }, /***/ 1535: /***/ function (__unused_webpack_module, exports) { "use strict"; exports.__esModule = true; exports["default"] = void 0; var ATTACHMENT_CODE = 0xfffc; // 65532 var isReplaceGlyph = function isReplaceGlyph(glyph) { return glyph.codePoints.includes(ATTACHMENT_CODE); }; /** * Resolve attachments of run * * @param {Object} run * @return {Object} run */ var resolveRunAttachments = function resolveRunAttachments(run) { var _run$attributes; if (!run.positions) return run; var glyphs = run.glyphs || []; var attachment = ((_run$attributes = run.attributes) === null || _run$attributes === void 0 ? void 0 : _run$attributes.attachment) || {}; var positions = run.positions.map(function (position, i) { var glyph = glyphs[i]; if ( attachment && attachment.width && isReplaceGlyph(glyph) ) { return Object.assign({}, position, { xAdvance: attachment.width, }); } return Object.assign({}, position); }); return Object.assign({}, run, { positions: positions, }); }; /** * Resolve attachments for multiple paragraphs * * @param {Object} layout engines * @param {Object} layout options * @param {Array} attributed strings (paragraphs) * @return {Array} attributed strings (paragraphs) */ var resolveAttachments = function resolveAttachments() { return function (attributedString) { var runs = attributedString.runs.map(resolveRunAttachments); return Object.assign({}, attributedString, { runs: runs, }); }; }; var _default = resolveAttachments; exports["default"] = _default; /***/ }, /***/ 8449: /***/ function (__unused_webpack_module, exports) { "use strict"; exports.__esModule = true; exports["default"] = void 0; /** * Resolves yOffset for run * * @param {Object} run * @return {Object} run */ var resolveRunYOffset = function resolveRunYOffset(run) { var _run$attributes, _run$attributes$font, _run$attributes2; if (!run.positions) return run; var unitsPerEm = ((_run$attributes = run.attributes) === null || _run$attributes === void 0 ? void 0 : (_run$attributes$font = _run$attributes.font) === null || _run$attributes$font === void 0 ? void 0 : _run$attributes$font.unitsPerEm) || 0; var yOffset = (((_run$attributes2 = run.attributes) === null || _run$attributes2 === void 0 ? void 0 : _run$attributes2.yOffset) || 0) * unitsPerEm; var positions = run.positions.map(function (p) { return Object.assign({}, p, { yOffset: yOffset, }); }); return Object.assign({}, run, { positions: positions, }); }; /** * Resolves yOffset for multiple paragraphs * * @param {Object} layout engines * @param {Object} layout options * @param {Array} attributed strings (paragraphs) * @return {Array} attributed strings (paragraphs) */ var resolveYOffset = function resolveYOffset() { return function (attributedString) { var runs = attributedString.runs.map(resolveRunYOffset); return Object.assign({}, attributedString, { runs: runs, }); }; }; var _default = resolveYOffset; exports["default"] = _default; /***/ }, /***/ 4811: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { "use strict"; var _interopRequireDefault = __webpack_require__(5318)["default"]; exports.__esModule = true; exports["default"] = void 0; var _length = _interopRequireDefault(__webpack_require__(7698)); var _slice = _interopRequireDefault(__webpack_require__(2564)); /** * Breaks attributed string into paragraphs * * @param {Object} engines * @param {Object} layout options * @param {Object} attributed string * @return {Array} attributed string array */ var splitParagraphs = function splitParagraphs() { return function (attributedString) { var res = []; var start = 0; var breakPoint = attributedString.string.indexOf("\n") + 1; while (breakPoint > 0) { res.push( (0, _slice.default)( start, breakPoint, attributedString ) ); start = breakPoint; breakPoint = attributedString.string.indexOf("\n", breakPoint) + 1; } if (start === 0) { res.push(attributedString); } else if (start < attributedString.string.length) { res.push( (0, _slice.default)( start, (0, _length.default)(attributedString), attributedString ) ); } return res; }; }; var _default = splitParagraphs; exports["default"] = _default; /***/ }, /***/ 7924: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { "use strict"; var _interopRequireDefault = __webpack_require__(5318)["default"]; exports.__esModule = true; exports["default"] = void 0; var _fns = __webpack_require__(4354); var _copy = _interopRequireDefault(__webpack_require__(7711)); var _crop = _interopRequireDefault(__webpack_require__(5538)); var _height = _interopRequireDefault(__webpack_require__(839)); var _truncate = _interopRequireDefault(__webpack_require__(6314)); var _layoutParagraph = _interopRequireDefault( __webpack_require__(9507) ); var _sliceAtHeight = _interopRequireDefault( __webpack_require__(4248) ); /** * Layout paragraphs inside container until it does not * fit anymore, performing line wrapping in the process. * * @param {Object} engines * @param {Object} layout options * @param {Object} container rect * @param {Object} attributed strings (paragraphs) * @return {Array} paragraph blocks */ var typesetter = function typesetter(engines, options, container) { return function (attributedStrings) { var blocks = []; var paragraphs = [].concat(attributedStrings); var layoutBlock = (0, _layoutParagraph.default)( engines, options ); var maxLines = (0, _fns.isNil)(container.maxLines) ? Infinity : container.maxLines; var truncateEllipsis = container.truncateMode === "ellipsis"; var linesCount = maxLines; var paragraphRect = (0, _copy.default)(container); var nextParagraph = paragraphs.shift(); while (linesCount > 0 && nextParagraph) { var block = layoutBlock(paragraphRect, nextParagraph); var slicedBlock = block.slice(0, linesCount); var linesHeight = (0, _height.default)(slicedBlock); var shouldTruncate = truncateEllipsis && block.length !== slicedBlock.length; linesCount -= slicedBlock.length; if (paragraphRect.height >= linesHeight) { blocks.push( shouldTruncate ? (0, _truncate.default)(slicedBlock) : slicedBlock ); paragraphRect = (0, _crop.default)( linesHeight, paragraphRect ); nextParagraph = paragraphs.shift(); } else { blocks.push( (0, _truncate.default)( (0, _sliceAtHeight.default)( paragraphRect.height, slicedBlock ) ) ); break; } } return blocks; }; }; var _default = typesetter; exports["default"] = _default; /***/ }, /***/ 7777: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { "use strict"; var _interopRequireDefault = __webpack_require__(5318)["default"]; exports.__esModule = true; exports["default"] = void 0; var _extends2 = _interopRequireDefault(__webpack_require__(7154)); var _fromFragments = _interopRequireDefault( __webpack_require__(2779) ); /** * Default word hyphenation engine used when no one provided. * Does not perform word hyphenation at all * * @param {String} word * @return {Array} same word */ var defaultHyphenationEngine = function defaultHyphenationEngine( word ) { return [word]; }; /** * Wrap words of attribute string * * @param {Object} layout engines * @param {Object} layout options * @param {Object} attributed string * @return {Object} attributed string including syllables */ var wrapWords = function wrapWords(engines, options) { if (engines === void 0) { engines = {}; } if (options === void 0) { options = {}; } return function (attributedString) { var _engines$wordHyphenat, _engines; var syllables = []; var fragments = []; var hyphenateWord = options.hyphenationCallback || ((_engines$wordHyphenat = (_engines = engines) .wordHyphenation) === null || _engines$wordHyphenat === void 0 ? void 0 : _engines$wordHyphenat.call(_engines, options)) || defaultHyphenationEngine; for (var i = 0; i < attributedString.runs.length; i += 1) { var string = ""; var run = attributedString.runs[i]; var words = attributedString.string .slice(run.start, run.end) .split(/([ ]+)/g) .filter(Boolean); for (var j = 0; j < words.length; j += 1) { var word = words[j]; var parts = hyphenateWord(word); syllables.push.apply(syllables, parts); string += parts.join(""); } fragments.push({ string: string, attributes: run.attributes, }); } return (0, _extends2.default)( {}, (0, _fromFragments.default)(fragments), { syllables: syllables, } ); }; }; var _default = wrapWords; exports["default"] = _default; /***/ }, /***/ 6499: /***/ function (__unused_webpack_module, exports) { "use strict"; exports.__esModule = true; exports["default"] = void 0; /** * Return positions advance width * * @param {Object} positions * @return {number} advance width */ var advanceWidth = function advanceWidth(positions) { return positions.reduce(function (acc, pos) { return acc + (pos.xAdvance || 0); }, 0); }; var _default = advanceWidth; exports["default"] = _default; /***/ }, /***/ 7711: /***/ function (__unused_webpack_module, exports) { "use strict"; exports.__esModule = true; exports["default"] = void 0; /** * Clone rect * * @param {Object} rect * @return {Object} cloned rect */ var copy = function copy(rect) { return Object.assign({}, rect); }; var _default = copy; exports["default"] = _default; /***/ }, /***/ 5538: /***/ function (__unused_webpack_module, exports) { "use strict"; exports.__esModule = true; exports["default"] = void 0; /** * Crop upper section of rect * * @param {Object} rect * @return {Object} cropped rect */ var crop = function crop(height, rect) { var y = rect.y + height; var h = rect.height - height; return Object.assign({}, rect, { y: y, height: h, }); }; var _default = crop; exports["default"] = _default; /***/ }, /***/ 6062: /***/ function (__unused_webpack_module, exports) { "use strict"; exports.__esModule = true; exports["default"] = void 0; /** * Add scalar to run * * @param {number} scalar * @param {Object} run * @return {Object} added run */ var add = function add(n, run) { var start = run.start + n; var end = run.end + n; return Object.assign({}, run, { start: start, end: end, }); }; var _default = add; exports["default"] = _default; /***/ }, /***/ 3689: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { "use strict"; var _interopRequireDefault = __webpack_require__(5318)["default"]; exports.__esModule = true; exports["default"] = void 0; var _advanceWidth = _interopRequireDefault( __webpack_require__(6499) ); /** * Return run advance width * * @param {Object} run * @return {number} advance width */ var advanceWidth = function advanceWidth(run) { return (0, _advanceWidth.default)(run.positions || []); }; var _default = advanceWidth; exports["default"] = _default; /***/ }, /***/ 3529: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { "use strict"; var _interopRequireDefault = __webpack_require__(5318)["default"]; exports.__esModule = true; exports["default"] = void 0; var _glyphIndexAt = _interopRequireDefault( __webpack_require__(7392) ); var _advanceWidth = _interopRequireDefault( __webpack_require__(6499) ); /** * Advance width between two string indices * * @param {number} start glyph index * @param {number} end glyph index * @param {Object} run * @return {Object} advanced width run */ var advanceWidthBetween = function advanceWidthBetween( start, end, run ) { var runStart = run.start || 0; var glyphStartIndex = Math.max( 0, (0, _glyphIndexAt.default)(start - runStart, run) ); var glyphEndIndex = Math.max( 0, (0, _glyphIndexAt.default)(end - runStart, run) ); var positions = (run.positions || []).slice( glyphStartIndex, glyphEndIndex ); return (0, _advanceWidth.default)(positions); }; var _default = advanceWidthBetween; exports["default"] = _default; /***/ }, /***/ 7763: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { "use strict"; var _interopRequireDefault = __webpack_require__(5318)["default"]; exports.__esModule = true; exports["default"] = void 0; var _scale = _interopRequireDefault(__webpack_require__(3241)); var _getFont = _interopRequireDefault(__webpack_require__(4014)); var _isNumber = _interopRequireDefault(__webpack_require__(8366)); var _append = _interopRequireDefault(__webpack_require__(8931)); var _fromCodePoint = _interopRequireDefault( __webpack_require__(6742) ); /** * Append glyph to run * * @param {Object} glyph * @param {Object} run * @return {Object} run with glyph */ var appendGlyph = function appendGlyph(glyph, run) { var _glyph$codePoints; var glyphLength = ((_glyph$codePoints = glyph.codePoints) === null || _glyph$codePoints === void 0 ? void 0 : _glyph$codePoints.length) || 0; var end = run.end + glyphLength; var glyphs = run.glyphs.concat(glyph); var glyphIndices = (0, _append.default)( glyphLength, run.glyphIndices ); if (!run.positions) return Object.assign({}, run, { end: end, glyphs: glyphs, glyphIndices: glyphIndices, }); var positions = run.positions.concat({ xAdvance: glyph.advanceWidth * (0, _scale.default)(run), }); return Object.assign({}, run, { end: end, glyphs: glyphs, glyphIndices: glyphIndices, positions: positions, }); }; /** * Append glyph or code point to run * * @param {Object | number} glyph | codePoint * @param {Object} run * @return {Object} run with glyph */ var append = function append(value, run) { if (!value) return run; var font = (0, _getFont.default)(run); var glyph = (0, _isNumber.default)(value) ? (0, _fromCodePoint.default)(value, font) : value; return appendGlyph(glyph, run); }; var _default = append; exports["default"] = _default; /***/ }, /***/ 1162: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { "use strict"; var _interopRequireDefault = __webpack_require__(5318)["default"]; exports.__esModule = true; exports["default"] = void 0; var _scale = _interopRequireDefault(__webpack_require__(3241)); /** * Get run ascent * * @param {Object} run * @return {boolean} ascent */ var ascent = function ascent(run) { var _run$attributes, _run$attributes$attac, _run$attributes2, _run$attributes2$font; var attachmentHeight = ((_run$attributes = run.attributes) === null || _run$attributes === void 0 ? void 0 : (_run$attributes$attac = _run$attributes.attachment) === null || _run$attributes$attac === void 0 ? void 0 : _run$attributes$attac.height) || 0; var fontAscent = ((_run$attributes2 = run.attributes) === null || _run$attributes2 === void 0 ? void 0 : (_run$attributes2$font = _run$attributes2.font) === null || _run$attributes2$font === void 0 ? void 0 : _run$attributes2$font.ascent) || 0; return Math.max( attachmentHeight, fontAscent * (0, _scale.default)(run) ); }; var _default = ascent; exports["default"] = _default; /***/ }, /***/ 8687: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { "use strict"; var _interopRequireDefault = __webpack_require__(5318)["default"]; exports.__esModule = true; exports["default"] = void 0; var _fns = __webpack_require__(4354); var _length = _interopRequireDefault(__webpack_require__(1258)); var _normalize = _interopRequireDefault(__webpack_require__(298)); /** * Concats two runs into one * * @param {Object} first run * @param {Object} second run * @return {Object} concatenated run */ var concat = function concat(runA, runB) { var end = runA.end + (0, _length.default)(runB); var glyphs = (runA.glyphs || []).concat(runB.glyphs || []); var positions = (runA.positions || []).concat( runB.positions || [] ); var attributes = Object.assign( {}, runA.attributes, runB.attributes ); var runAIndices = runA.glyphIndices || []; var runALastIndex = (0, _fns.last)(runAIndices) || 0; var runBIndices = (runB.glyphIndices || []).map(function (i) { return i + runALastIndex + 1; }); var glyphIndices = (0, _normalize.default)( runAIndices.concat(runBIndices) ); return Object.assign({}, runA, { end: end, glyphs: glyphs, positions: positions, attributes: attributes, glyphIndices: glyphIndices, }); }; var _default = concat; exports["default"] = _default; /***/ }, /***/ 9406: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { "use strict"; var _interopRequireDefault = __webpack_require__(5318)["default"]; exports.__esModule = true; exports["default"] = void 0; var _scale = _interopRequireDefault(__webpack_require__(3241)); /** * Get run descent * * @param {Object} run * @return {number} descent */ var descent = function descent(run) { var _run$attributes, _run$attributes$font; var fontDescent = ((_run$attributes = run.attributes) === null || _run$attributes === void 0 ? void 0 : (_run$attributes$font = _run$attributes.font) === null || _run$attributes$font === void 0 ? void 0 : _run$attributes$font.descent) || 0; return (0, _scale.default)(run) * fontDescent; }; var _default = descent; exports["default"] = _default; /***/ }, /***/ 8848: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { "use strict"; var _interopRequireDefault = __webpack_require__(5318)["default"]; exports.__esModule = true; exports["default"] = void 0; var _slice = _interopRequireDefault(__webpack_require__(4450)); /** * Drop last char of run * * @param {Object} run * @return {boolean} run without last char */ var dropLast = function dropLast(run) { return (0, _slice.default)(0, run.end - run.start - 1, run); }; var _default = dropLast; exports["default"] = _default; /***/ }, /***/ 6266: /***/ function (__unused_webpack_module, exports) { "use strict"; exports.__esModule = true; exports["default"] = void 0; /** * Returns empty run * * @return {Object} empty run */ var empty = function empty() { return { start: 0, end: 0, glyphIndices: [], glyphs: [], positions: [], attributes: {}, }; }; var _default = empty; exports["default"] = _default; /***/ }, /***/ 7621: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { "use strict"; var _interopRequireDefault = __webpack_require__(5318)["default"]; exports.__esModule = true; exports["default"] = void 0; var _runIndexAt = _interopRequireDefault(__webpack_require__(9139)); /** * Filter runs contained between start and end * * @param {number} start * @param {number} end * @param {Array} runs * @return {boolean} filtered runs */ var filter = function filter(start, end, runs) { var startIndex = (0, _runIndexAt.default)(start, runs); var endIndex = Math.max( (0, _runIndexAt.default)(end - 1, runs), startIndex ); return runs.slice(startIndex, endIndex + 1); }; var _default = filter; exports["default"] = _default; /***/ }, /***/ 6990: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { "use strict"; var _interopRequireDefault = __webpack_require__(5318)["default"]; exports.__esModule = true; exports["default"] = void 0; var _sort = _interopRequireDefault(__webpack_require__(1848)); var _isEmpty = _interopRequireDefault(__webpack_require__(456)); var sortPoints = function sortPoints(a, b) { return a[1] - b[1] || a[3] - b[3]; }; var generatePoints = function generatePoints(runs) { var result = runs.reduce(function (acc, run, i) { return acc.concat([ ["start", run.start, run.attributes, i], ["end", run.end, run.attributes, i], ]); }, []); return result.sort(sortPoints); }; var mergeRuns = function mergeRuns(runs) { return runs.reduce(function (acc, run) { var attributes = Object.assign( {}, acc.attributes, run.attributes ); return Object.assign({}, run, { attributes: attributes, }); }, {}); }; var groupEmptyRuns = function groupEmptyRuns(runs) { var groups = runs.reduce(function (acc, run) { if (!acc[run.start]) acc[run.start] = []; acc[run.start].push(run); return acc; }, {}); return Object.values(groups); }; var flattenEmptyRuns = function flattenEmptyRuns(runs) { return groupEmptyRuns(runs).map(mergeRuns); }; var flattenRegularRuns = function flattenRegularRuns(runs) { var res = []; var points = generatePoints(runs); var start = -1; var attrs = {}; var stack = []; for (var i = 0; i < points.length; i += 1) { var _points$i = points[i], type = _points$i[0], offset = _points$i[1], attributes = _points$i[2]; if (start !== -1 && start < offset) { res.push({ start: start, end: offset, attributes: attrs, }); } if (type === "start") { stack.push(attributes); attrs = Object.assign({}, attrs, attributes); } else { attrs = {}; for (var j = 0; j < stack.length; j += 1) { if (stack[j] === attributes) { // eslint-disable-next-line no-plusplus stack.splice(j--, 1); } else { attrs = Object.assign({}, attrs, stack[j]); } } } start = offset; } return res; }; /** * Flatten many runs * * @param {Array} runs * @return {Array} flatten runs */ var flatten = function flatten(runs) { if (runs === void 0) { runs = []; } var emptyRuns = flattenEmptyRuns( runs.filter(function (run) { return (0, _isEmpty.default)(run); }) ); var regularRuns = flattenRegularRuns( runs.filter(function (run) { return !(0, _isEmpty.default)(run); }) ); return (0, _sort.default)(emptyRuns.concat(regularRuns)); }; var _default = flatten; exports["default"] = _default; /***/ }, /***/ 4014: /***/ function (__unused_webpack_module, exports) { "use strict"; exports.__esModule = true; exports["default"] = void 0; /** * Get run font * * @param {Object} run * @return {Object} font */ var getFont = function getFont(run) { var _run$attributes; return ( ((_run$attributes = run.attributes) === null || _run$attributes === void 0 ? void 0 : _run$attributes.font) || null ); }; var _default = getFont; exports["default"] = _default; /***/ }, /***/ 7392: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { "use strict"; exports.__esModule = true; exports["default"] = void 0; var _fns = __webpack_require__(4354); /** * Return glyph index at string index, if glyph indices present. * Otherwise return string index * * @param {number} string index * @param {Object} run * @return {number} glyph index */ var glyphIndexAt = function glyphIndexAt(index, run) { var _run$glyphIndices; var result = run === null || run === void 0 ? void 0 : (_run$glyphIndices = run.glyphIndices) === null || _run$glyphIndices === void 0 ? void 0 : _run$glyphIndices[index]; return (0, _fns.isNil)(result) ? index : result; }; var _default = glyphIndexAt; exports["default"] = _default; /***/ }, /***/ 7369: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { "use strict"; var _interopRequireDefault = __webpack_require__(5318)["default"]; exports.__esModule = true; exports["default"] = void 0; var _ascent = _interopRequireDefault(__webpack_require__(1162)); var _descent = _interopRequireDefault(__webpack_require__(9406)); var _lineGap = _interopRequireDefault(__webpack_require__(9277)); /** * Get run height * * @param {Object} run * @return {number} height */ var height = function height(run) { var _run$attributes; var lineHeight = (_run$attributes = run.attributes) === null || _run$attributes === void 0 ? void 0 : _run$attributes.lineHeight; return ( lineHeight || (0, _lineGap.default)(run) + (0, _ascent.default)(run) - (0, _descent.default)(run) ); }; var _default = height; exports["default"] = _default; /***/ }, /***/ 7222: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { "use strict"; var _interopRequireDefault = __webpack_require__(5318)["default"]; exports.__esModule = true; exports["default"] = void 0; var _slice = _interopRequireDefault(__webpack_require__(4450)); var _concat = _interopRequireDefault(__webpack_require__(8687)); var _append = _interopRequireDefault(__webpack_require__(7763)); var _getFont = _interopRequireDefault(__webpack_require__(4014)); var _isNumber = _interopRequireDefault(__webpack_require__(8366)); var _fromCodePoint = _interopRequireDefault( __webpack_require__(6742) ); /** * Insert glyph to run in the given index * * @param {number} string index * @param {Object} glyph * @param {Object} run * @return {Object} run with glyph */ var insertGlyph = function insertGlyph(index, glyph, run) { if (!glyph) return run; // Split resolves ligature splitting in case new glyph breaks some var leadingRun = (0, _slice.default)(0, index, run); var trailingRun = (0, _slice.default)(index, Infinity, run); return (0, _concat.default)( (0, _append.default)(glyph, leadingRun), trailingRun ); }; /** * Insert either glyph or code point to run in the given index * * @param {number} string index * @param {Object | number} glyph | codePoint * @param {Object} run * @return {Object} run with glyph */ var insert = function insert(index, value, run) { var font = (0, _getFont.default)(run); var glyph = (0, _isNumber.default)(value) ? (0, _fromCodePoint.default)(value, font) : value; return insertGlyph(index, glyph, run); }; var _default = insert; exports["default"] = _default; /***/ }, /***/ 456: /***/ function (__unused_webpack_module, exports) { "use strict"; exports.__esModule = true; exports["default"] = void 0; /** * Is run empty (start === end) * * @param {Object} run * @return {Object} is run empty */ var isEmpty = function isEmpty(run) { return run.start === run.end; }; var _default = isEmpty; exports["default"] = _default; /***/ }, /***/ 7925: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { "use strict"; var _interopRequireDefault = __webpack_require__(5318)["default"]; exports.__esModule = true; exports["default"] = void 0; var _isWhiteSpace = _interopRequireDefault( __webpack_require__(2065) ); /** * Get white space leading positions * * @param {Object} run * @return {Array} white space leading positions */ var leadingPositions = function leadingPositions(run) { var glyphs = run.glyphs || []; var positions = run.positions || []; var leadingWhitespaces = glyphs.findIndex(function (g) { return !(0, _isWhiteSpace.default)(g); }); return positions.slice(0, leadingWhitespaces); }; /** * Get run leading white space offset * * @param {Object} run * @return {number} leading white space offset */ var leadingOffset = function leadingOffset(run) { var positions = leadingPositions(run); return positions.reduce(function (acc, pos) { return acc + (pos.xAdvance || 0); }, 0); }; var _default = leadingOffset; exports["default"] = _default; /***/ }, /***/ 1258: /***/ function (__unused_webpack_module, exports) { "use strict"; exports.__esModule = true; exports["default"] = void 0; /** * Get run length * * @param {Object} run * @return {number} length */ var length = function length(run) { return run.end - run.start; }; var _default = length; exports["default"] = _default; /***/ }, /***/ 9277: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { "use strict"; var _interopRequireDefault = __webpack_require__(5318)["default"]; exports.__esModule = true; exports["default"] = void 0; var _scale = _interopRequireDefault(__webpack_require__(3241)); /** * Get run lineGap * * @param {Object} run * @return {number} lineGap */ var lineGap = function lineGap(run) { var _run$attributes, _run$attributes$font; return ( (((_run$attributes = run.attributes) === null || _run$attributes === void 0 ? void 0 : (_run$attributes$font = _run$attributes.font) === null || _run$attributes$font === void 0 ? void 0 : _run$attributes$font.lineGap) || 0) * (0, _scale.default)(run) ); }; var _default = lineGap; exports["default"] = _default; /***/ }, /***/ 4363: /***/ function (__unused_webpack_module, exports) { "use strict"; exports.__esModule = true; exports["default"] = void 0; /** * Get ligature offset by index * * Ex. ffi ligature * * glyphs: l o f f i m * glyphIndices: 0 1 2 2 2 3 * offset: 0 0 0 1 2 0 * * @param {number} index * @param {Object} run * @return {number} ligature offset */ var offset = function offset(index, run) { if (!run) return 0; var glyphIndices = run.glyphIndices || []; var value = glyphIndices[index]; return glyphIndices.slice(0, index).filter(function (i) { return i === value; }).length; }; var _default = offset; exports["default"] = _default; /***/ }, /***/ 9435: /***/ function (__unused_webpack_module, exports) { "use strict"; exports.__esModule = true; exports["default"] = void 0; /** * Omit attribute from run * * @param {Object} run * @return {Object} run without ommited attribute */ var omit = function omit(value, run) { var attributes = Object.assign({}, run.attributes); delete attributes[value]; return Object.assign({}, run, { attributes: attributes, }); }; var _default = omit; exports["default"] = _default; /***/ }, /***/ 9139: /***/ function (__unused_webpack_module, exports) { "use strict"; exports.__esModule = true; exports["default"] = void 0; /** * Get run index that contains passed index * * @param {number} char index * @param {Array} runs array * @return {Array} run index */ var runIndexAt = function runIndexAt(n, runs) { if (!runs) return -1; return runs.findIndex(function (run) { return run.start <= n && n < run.end; }); }; var _default = runIndexAt; exports["default"] = _default; /***/ }, /***/ 3241: /***/ function (__unused_webpack_module, exports) { "use strict"; exports.__esModule = true; exports["default"] = void 0; /** * Calculate run scale * * @param {Object} run * @return {number} scale */ var calculateScale = function calculateScale(run) { var _attributes$font; var attributes = run.attributes || {}; var fontSize = attributes.fontSize || 12; var unitsPerEm = (_attributes$font = attributes.font) === null || _attributes$font === void 0 ? void 0 : _attributes$font.unitsPerEm; return unitsPerEm ? fontSize / unitsPerEm : 0; }; /** * Get run scale * * @param {Object} run * @return {number} scale */ var scale = function scale(run) { var _run$attributes; return ( ((_run$attributes = run.attributes) === null || _run$attributes === void 0 ? void 0 : _run$attributes.scale) || calculateScale(run) ); }; var _default = scale; exports["default"] = _default; /***/ }, /***/ 4450: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { "use strict"; var _interopRequireDefault = __webpack_require__(5318)["default"]; exports.__esModule = true; exports["default"] = void 0; var _scale = _interopRequireDefault(__webpack_require__(3241)); var _offset = _interopRequireDefault(__webpack_require__(4363)); var _getFont = _interopRequireDefault(__webpack_require__(4014)); var _slice = _interopRequireDefault(__webpack_require__(8389)); var _glyphIndexAt = _interopRequireDefault( __webpack_require__(7392) ); var _normalize = _interopRequireDefault(__webpack_require__(298)); /** * Slice run between glyph indices range * * @param {number} start glyph index * @param {number} end glyph index * @param {Object} run * @return {Object} sliced run */ var slice = function slice(start, end, run) { var _run$glyphs, _run$glyphs2; var runScale = (0, _scale.default)(run); var font = (0, _getFont.default)(run); // Get glyph start and end indices var startIndex = (0, _glyphIndexAt.default)(start, run); var endIndex = (0, _glyphIndexAt.default)(end, run); // Get start and end glyph var startGlyph = (_run$glyphs = run.glyphs) === null || _run$glyphs === void 0 ? void 0 : _run$glyphs[startIndex]; var endGlyph = (_run$glyphs2 = run.glyphs) === null || _run$glyphs2 === void 0 ? void 0 : _run$glyphs2[endIndex]; // Get start ligature chunks (if any) var startOffset = (0, _offset.default)(start, run); var startGlyphs = startOffset > 0 ? (0, _slice.default)( startOffset, Infinity, font, startGlyph ) : []; // Get end ligature chunks (if any) var endOffset = (0, _offset.default)(end, run); var endGlyphs = (0, _slice.default)( 0, endOffset, font, endGlyph ); // Compute new glyphs var sliceStart = startIndex + Math.min(1, startOffset); var glyphs = (run.glyphs || []).slice(sliceStart, endIndex); // Compute new positions var glyphPosition = function glyphPosition(g) { return { xAdvance: g.advanceWidth * runScale, }; }; var startPositions = startGlyphs.map(glyphPosition); var positions = (run.positions || []).slice( sliceStart, endIndex ); var endPositions = endGlyphs.map(glyphPosition); return Object.assign({}, run, { start: run.start + start, end: Math.min(run.end, run.start + end), glyphIndices: (0, _normalize.default)( (run.glyphIndices || []).slice(start, end) ), glyphs: [startGlyphs, glyphs, endGlyphs].flat(), positions: [startPositions, positions, endPositions].flat(), }); }; var _default = slice; exports["default"] = _default; /***/ }, /***/ 1848: /***/ function (__unused_webpack_module, exports) { "use strict"; exports.__esModule = true; exports["default"] = void 0; /** * Sort runs in ascending order * * @param {Array} runs * @return {Array} sorted runs */ var sort = function sort(runs) { return runs.sort(function (a, b) { return a.start - b.start || a.end - b.end; }); }; var _default = sort; exports["default"] = _default; /***/ }, /***/ 9629: /***/ function (__unused_webpack_module, exports) { "use strict"; exports.__esModule = true; exports["default"] = void 0; /** * Subtract scalar to run * * @param {number} scalar * @param {Object} run * @return {Object} subtracted run */ var subtract = function subtract(n, run) { var start = run.start - n; var end = run.end - n; return Object.assign({}, run, { start: start, end: end, }); }; var _default = subtract; exports["default"] = _default; /***/ }, /***/ 2179: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { "use strict"; var _interopRequireDefault = __webpack_require__(5318)["default"]; exports.__esModule = true; exports["default"] = void 0; var _isWhiteSpace = _interopRequireDefault( __webpack_require__(2065) ); var reverse = function reverse(array) { return [].concat(array).reverse(); }; /** * Get white space trailing positions * * @param {Object} run * @return {Array} white space trailing positions */ var trailingPositions = function trailingPositions(run) { var glyphs = reverse(run.glyphs || []); var positions = reverse(run.positions || []); var leadingWhitespaces = glyphs.findIndex(function (g) { return !(0, _isWhiteSpace.default)(g); }); return positions.slice(0, leadingWhitespaces); }; /** * Get run trailing white space offset * * @param {Object} run * @return {number} trailing white space offset */ var trailingOffset = function trailingOffset(run) { var positions = trailingPositions(run); return positions.reduce(function (acc, pos) { return acc + (pos.xAdvance || 0); }, 0); }; var _default = trailingOffset; exports["default"] = _default; /***/ }, /***/ 8366: /***/ function (__unused_webpack_module, exports) { "use strict"; exports.__esModule = true; exports["default"] = void 0; var isNumber = function isNumber(value) { return typeof value === "number"; }; var _default = isNumber; exports["default"] = _default; /***/ }, /***/ 511: /***/ function (__unused_webpack_module, exports) { "use strict"; exports.__esModule = true; exports["default"] = void 0; /** * Get string from array of code points * * @param {Array} code points * @return {String} string */ var stringFromCodePoints = function stringFromCodePoints( codePoints ) { return String.fromCodePoint.apply(String, codePoints); }; var _default = stringFromCodePoints; exports["default"] = _default; /***/ }, /***/ 8537: /***/ function ( __unused_webpack_module, __webpack_exports__, __webpack_require__ ) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ default: function () { return /* binding */ index; }, /* harmony export */ getCategory: function () { return /* binding */ getCategory; }, /* harmony export */ getCombiningClass: function () { return /* binding */ getCombiningClass; }, /* harmony export */ getEastAsianWidth: function () { return /* binding */ getEastAsianWidth; }, /* harmony export */ getNumericValue: function () { return /* binding */ getNumericValue; }, /* harmony export */ getScript: function () { return /* binding */ getScript; }, /* harmony export */ isAlphabetic: function () { return /* binding */ isAlphabetic; }, /* harmony export */ isBaseForm: function () { return /* binding */ isBaseForm; }, /* harmony export */ isDigit: function () { return /* binding */ isDigit; }, /* harmony export */ isLowerCase: function () { return /* binding */ isLowerCase; }, /* harmony export */ isMark: function () { return /* binding */ isMark; }, /* harmony export */ isPunctuation: function () { return /* binding */ isPunctuation; }, /* harmony export */ isTitleCase: function () { return /* binding */ isTitleCase; }, /* harmony export */ isUpperCase: function () { return /* binding */ isUpperCase; }, /* harmony export */ isWhiteSpace: function () { return /* binding */ isWhiteSpace; }, /* harmony export */ }); /* harmony import */ var unicode_trie__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(7055); /* harmony import */ var unicode_trie__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/ __webpack_require__.n( unicode_trie__WEBPACK_IMPORTED_MODULE_0__ ); /* provided dependency */ var Buffer = __webpack_require__(1876)["Buffer"]; 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$1 = { categories: categories, combiningClasses: combiningClasses, scripts: scripts, eaw: eaw, }; var data = "ABEAAAAAAAAAAXzwZXl5ONRt+/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/MBjgXVx7who94nPn7MPFrnwQP7g0k0Dq0h2GSKO6fTZ8nLodN1SiOUj/5EL/Xo1DBvRm0wmrh3x6phcJ20/9CuMr5h8WPqXMSasLoLHoufTmE7mzYrs6B0dY7KjuCogKqsvxnxAwXWvd9Puc9PnE8DOHT2INHxRlIyVHrqZahtfV2E/A2PDdtA3ewlRHMtFIBKO/T4IozWTQZ+mb+gdKuk/ZHrqloucKdsOSJmlWTSntWjcxVMjUmroXLM10I6TwDLnBq4LP69TxgVeyGsd8yHvhF8ydPlrNRSNs9EP7WmeuSE7Lu10JbOuQcJw/63sDp68wB9iwP5AO+mBpV0R5VDDeyQUFCel1G+4KHBgEVFS0YK+m2sXLWLuGTlkVAd97WwKKdacjWElRCuDRauf33l/yVcDF6sVPKeTes99FC1NpNWcpieGSV/IbO8PCTy5pbUR1U8lxzf4T+y6fZMxOz3LshkQLeeDSd0WmUrQgajmbktrxsb2AZ0ACw2Vgni+gV/m+KvCRWLg08Clx7uhql+v9XySGcjjOHlsp8vBw/e8HS7dtiqF6T/XcSXuaMW66GF1g4q9YyBadHqy3Y5jin1c7yZos6BBr6dsomSHxiUHanYtcYQwnMMZhRhOnaYJeyJzaRuukyCUh48+e/BUvk/aEfDp8ag+jD64BHxNnQ5v/E7WRk7eLjGV13I3oqy45YNONi/1op1oDr7rPjkhPsTXgUpQtGDPlIs55KhQaic9kSGs/UrZ2QKQOflB8MTEQxRF9pullToWO7Eplan6mcMRFnUu2441yxi23x+KqKlr7RWWsi9ZXMWlr8vfP3llk1m2PRj0yudccxBuoa7VfIgRmnFPGX6Pm1WIfMm/Rm4n/xTn8IGqA0GWuqgu48pEUO0U9nN+ZdIvFpPb7VDPphIfRZxznlHeVFebkd9l+raXy9BpTMcIUIvBfgHEb6ndGo8VUkxpief14KjzFOcaANfgvFpvyY8lE8lE4raHizLpluPzMks1hx/e1Hok5yV0p7qQH7GaYeMzzZTFvRpv6k6iaJ4yNqzBvN8J7B430h2wFm1IBPcqbou33G7/NWPgopl4Mllla6e24L3TOTVNkza2zv3QKuDWTeDpClCEYgTQ+5vEBSQZs/rMF50+sm4jofTgWLqgX1x3TkrDEVaRqfY/xZizFZ3Y8/DFEFD31VSfBQ5raEB6nHnZh6ddehtclQJ8fBrldyIh99LNnV32HzKEej04hk6SYjdauCa4aYW0ru/QxvQRGzLKOAQszf3ixJypTW3WWL6BLSF2EMCMIw7OUvWBC6A/gDc2D1jvBapMCc7ztx6jYczwTKsRLL6dMNXb83HS8kdD0pTMMj161zbVHkU0mhSHo9SlBDDXdN6hDvRGizmohtIyR3ot8tF5iUG4GLNcXeGvBudSFrHu+bVZb9jirNVG+rQPI51A7Hu8/b0UeaIaZ4UgDO68PkYx3PE2HWpKapJ764Kxt5TFYpywMy4DLQqVRy11I7SOLhxUFmqiEK52NaijWArIfCg6qG8q5eSiwRCJb1R7GDJG74TrYgx/lVq7w9++Kh929xSJEaoSse5fUOQg9nMAnIZv+7fwVRcNv3gOHI46Vb5jYUC66PYHO6lS+TOmvEQjuYmx4RkffYGxqZIp/DPWNHAixbRBc+XKE3JEOgs4jIwu/dSAwhydruOGF39co91aTs85JJ3Z/LpXoF43hUwJsb/M1Chzdn8HX8vLXnqWUKvRhNLpfAF4PTFqva1sBQG0J+59HyYfmQ3oa4/sxZdapVLlo/fooxSXi/dOEQWIWq8E0FkttEyTFXR2aNMPINMIzZwCNEheYTVltsdaLkMyKoEUluPNAYCM2IG3br0DLy0fVNWKHtbSKbBjfiw7Lu06gQFalC7RC9BwRMSpLYDUo9pDtDfzwUiPJKLJ2LGcSphWBadOI/iJjNqUHV7ucG8yC6+iNM9QYElqBR7ECFXrcTgWQ3eG/tCWacT9bxIkfmxPmi3vOd36KxihAJA73vWNJ+Y9oapXNscVSVqS5g15xOWND/WuUCcA9YAAg6WFbjHamrblZ5c0L6Zx1X58ZittGcfDKU697QRSqW/g+RofNRyvrWMrBn44cPvkRe2HdTu/Cq01C5/riWPHZyXPKHuSDDdW8c1XPgd6ogvLh20qEIu8c19sqr4ufyHrwh37ZN5MkvY1dsGmEz9pUBTxWrvvhNyODyX2Q1k/fbX/T/vbHNcBrmjgDtvBdtZrVtiIg5iXQuzO/DEMvRX8Mi1zymSlt92BGILeKItjoShJXE/H7xwnf0Iewb8BFieJ9MflEBCQYEDm8eZniiEPfGoaYiiEdhQxHQNr2AuRdmbL9mcl18Kumh+HEZLp6z+j35ML9zTbUwahUZCyQQOgQrGfdfQtaR/OYJ/9dYXb2TWZFMijfCA8Nov4sa5FFDUe1T68h4q08WDE7JbbDiej4utRMR9ontevxlXv6LuJTXt1YEv8bDzEt683PuSsIN0afvu0rcBu9AbXZbkOG3K3AhtqQ28N23lXm7S3Yn6KXmAhBhz+GeorJJ4XxO/b3vZk2LXp42+QvsVxGSNVpfSctIFMTR1bD9t70i6sfNF3WKz/uKDEDCpzzztwhL45lsw89H2IpWN10sXHRlhDse9KCdpP5qNNpU84cTY+aiqswqR8XZ9ea0KbVRwRuOGQU3csAtV2fSbnq47U6es6rKlWLWhg3s/B9C9g+oTyp6RtIldR51OOkP5/6nSy6itUVPcMNOp4M/hDdKOz3uK6srbdxOrc2cJgr1Sg02oBxxSky6V7JaG+ziNwlfqnjnvh2/uq1lKfbp+qpwq/D/5OI5gkFl5CejKGxfc2YVJfGqc4E0x5e9PHK2ukbHNI7/RZV6LNe65apbTGjoCaQls0txPPbmQbCQn+/upCoXRZy9yzorWJvZ0KWcbXlBxU/d5I4ERUTxMuVWhSMmF677LNN7NnLwsmKawXkCgbrpcluOl0WChR1qhtSrxGXHu251dEItYhYX3snvn1gS2uXuzdTxCJjZtjsip0iT2sDC0qMS7Bk9su2NyXjFK5/f5ZoWwofg3DtTyjaFqspnOOTSh8xK/CKUFS57guVEkw9xoQuRCwwEO9Lu9z2vYxSa9NFV8DvSxv2C4WYLYF8Nrc4DzWkzNsk81JJOlZ/LYJrGCoj4MmZpnf3AXmzxT4rtl9jsqljEyedz468SGKdBiQzyz/qWKEhFg45ZczlZZ3KGL3l6sn+3TTa3zMVMhPa1obGp/z+fvY0QXTrJTf1XAT3EtQdUfYYlmWZyvPZ/6rWwU7UOQei7pVE0osgN94Iy+T1+omE6z4Rh2O20FjgBeK2y1mcoFiMDOJvuZPn5Moy9fmFH3wyfKvn4+TwfLvt/lHTTVnvrtoUWRBiQXhiNM8nE6ZoWeux/Z0b2unRcdUzdDpmL7CAgd1ToRXwgmHTZOgiGtVT+xr1QH9ObebRTT4NzL+XSpLuuWp62GqQvJVTPoZOeJCb6gIwd9XHMftQ+Kc08IKKdKQANSJ1a2gve3JdRhO0+tNiYzWAZfd7isoeBu67W7xuK8WX7nhJURld98Inb0t/dWOSau/kDvV4DJo/cImw9AO2Gvq0F2n0M7yIZKL8amMbjYld+qFls7hq8Acvq97K2PrCaomuUiesu7qNanGupEl6J/iem8lyr/NMnsTr6o41PO0yhQh3hPFN0wJP7S830je9iTBLzUNgYH+gUZpROo3rN2qgCI+6GewpX8w8CH+ro6QrWiStqmcMzVa3vEel+3/dDxMp0rDv1Q6wTMS3K64zTT6RWzK1y643im25Ja7X2ePCV2mTswd/4jshZPo4bLnerqIosq/hy2bKUAmVn9n4oun1+a0DIZ56UhVwmZHdUNpLa8gmPvxS1eNvCF1T0wo1wKPdCJi0qOrWz7oYRTzgTtkzEzZn308XSLwUog4OWGKJzCn/3FfF9iA32dZHSv30pRCM3KBY9WZoRhtdK/ChHk6DEQBsfV6tN2o1Cn0mLtPBfnkS+qy1L2xfFe9TQPtDE1Be44RTl82E9hPT2rS2+93LFbzhQQO3C/hD2jRFH3BWWbasAfuMhRJFcTri73eE835y016s22DjoFJ862WvLj69fu2TgSF3RHia9D5DSitlQAXYCnbdqjPkR287Lh6dCHDapos+eFDvcZPP2edPmTFxznJE/EBLoQQ0Qmn9EkZOyJmHxMbvKYb8o21ZHmv5YLqgsEPk9gWZwYQY9wLqGXuax/8QlV5qDaPbq9pLPT1yp+zOWKmraEy1OUJI7zdEcEmvBpbdwLrDCgEb2xX8S/nxZgjK4bRi+pbOmbh8bEeoPvU/L9ndx9kntlDALbdAvp0O8ZC3zSUnFg4cePsw7jxewWvL7HRSBLUn6J7vTH9uld5N76JFPgBCdXGF221oEJk++XfRwXplLSyrVO7HFWBEs99nTazKveW3HpbD4dH/YmdAl+lwbSt8BQWyTG7jAsACI7bPPUU9hI9XUHWqQOuezHzUjnx5Qqs6T1qNHfTTHleDtmqK7flA9a0gz2nycIpz1FHBuWxKNtUeTdqP29Fb3tv+tl5JyBqXoR+vCsdzZwZUhf6Lu8bvkB9yQP4x7GGegB0ym0Lpl03Q7e+C0cDsm9GSDepCDji7nUslLyYyluPfvLyKaDSX4xpR+nVYQjQQn5F8KbY1gbIVLiK1J3mW90zTyR1bqApX2BlWh7KG8LAY9/S9nWC0XXh9pZZo6xuir12T43rkaGfQssbQyIslA7uJnSHOV22NhlNtUo0czxPAsXhh8tIQYaTM4l/yAlZlydTcXhlG22Gs/n3BxKBd/3ZjYwg3NaUurVXhNB+afVnFfNr9TbC9ksNdvwpNfeHanyJ8M6GrIVfLlYAPv0ILe4dn0Z+BJSbJkN7eZY/c6+6ttDYcIDeUKIDXqUSE42Xdh5nRbuaObozjht0HJ5H1e+em+NJi/+8kQlyjCbJpPckwThZeIF9/u7lrVIKNeJLCN/TpPAeXxvd31/CUDWHK9MuP1V1TJgngzi4V0qzS3SW3Qy5UiGHqg02wQa5tsEl9s/X9nNMosgLlUgZSfCBj1DiypLfhr9/r0nR0XY2tmhDOcUS4E7cqa4EJBhzqvpbZa35Q5Iz5EqmhYiOGDAYk606Tv74+KGfPjKVuP15rIzgW0I7/niOu9el/sn2bRye0gV+GrePDRDMHjwO1lEdeXH8N+UTO3IoN18kpI3tPxz+fY+n2MGMSGFHAx/83tKeJOl+2i+f1O9v6FfEDBbqrw+lpM8Anav7zHNr7hE78nXUtPNodMbCnITWA7Ma/IHlZ50F9hWge/wzOvSbtqFVFtkS8Of2nssjZwbSFdU+VO8z6tCEc9UA9ACxT5zIUeSrkBB/v1krOpm7bVMrGxEKfI6LcnpB4D8bvn2hDKGqKrJaVAJuDaBEY3F7eXyqnFWlOoFV/8ZLspZiZd7orXLhd4mhHQgbuKbHjJWUzrnm0Dxw/LJLzXCkh7slMxKo8uxZIWZfdKHlfI7uj3LP6ARAuWdF7ZmZ7daOKqKGbz5LxOggTgS39oEioYmrqkCeUDvbxkBYKeHhcLmMN8dMF01ZMb32IpL/cH8R7VHQSI5I0YfL14g9d7P/6cjB1JXXxbozEDbsrPdmL8ph7QW10jio+v7YsqHKQ6xrBbOVtxU0/nFfzUGZwIBLwyUvg49ii+54nv9FyECBpURnQK4Ox6N7lw5fsjdd5l/2SwBcAHMJoyjO1Pifye2dagaOwCVMqdJWAo77pvBe0zdJcTWu5fdzPNfV2p1pc7/JKQ8zhKkwsOELUDhXygPJ5oR8Vpk2lsCen3D3QOQp2zdrSZHjVBstDF/wWO98rrkQ6/7zt/Drip7OHIug1lomNdmRaHRrjmqeodn22sesQQPgzimPOMqC60a5+i/UYh51uZm+ijWkkaI2xjrBO2558DZNZMiuDQlaVAvBy2wLn/bR3FrNzfnO/9oDztYqxZrr7JMIhqmrochbqmQnKowxW29bpqTaJu7kW1VotC72QkYX8OoDDdMDwV1kJRk3mufgJBzf+iwFRJ7XWQwO5ujVglgFgHtycWiMLx5N+6XU+TulLabWjOzoao03fniUW0xvIJNPbk7CQlFZd/RCOPvgQbLjh5ITE8NVJeKt3HGr6JTnFdIzcVOlEtwqbIIX0IM7saC+4N5047MTJ9+Wn11EhyEPIlwsHE5utCeXRjQzlrR+R1Cf/qDzcNbqLXdk3J7gQ39VUrrEkS/VMWjjg+t2oYrqB0tUZClcUF6+LBC3EQ7KnGIwm/qjZX4GKPtjTX1zQKV6nPAb2t/Rza5IqKRf8i2DFEhV/YSifX0YwsiF6TQnp48Gr65TFq0zUe6LGjiY7fq0LSGKL1VnC6ESI2yxvt3XqBx53B3gSlGFeJcPbUbonW1E9E9m4NfuwPh+t5QjRxX34lvBPVxwQd7aeTd+r9dw5CiP1pt8wMZoMdni7GapYdo6KPgeQKcmlFfq4UYhvV0IBgeiR3RnTMBaqDqpZrTRyLdsp4l0IXZTdErfH0sN3dqBG5vRIx3VgCYcHmmkqJ8Hyu3s9K9uBD1d8cZUEx3qYcF5vsqeRpF1GOg8emeWM2OmBlWPdZ6qAXwm3nENFyh+kvXk132PfWAlN0kb7yh4fz2T7VWUY/hEXX5DvxGABC03XRpyOG8t/u3Gh5tZdpsSV9AWaxJN7zwhVglgII1gV28tUViyqn4UMdIh5t+Ea2zo7PO48oba0TwQbiSZOH4YhD578kPF3reuaP7LujPMsjHmaDuId9XEaZBCJhbXJbRg5VCk3KJpryH/+8S3wdhR47pdFcmpZG2p0Bpjp/VbvalgIZMllYX5L31aMPdt1J7r/7wbixt0Mnz2ZvNGTARHPVD+2O1D8SGpWXlVnP2ekgon55YiinADDynyaXtZDXueVqbuTi8z8cHHK325pgqM+mWZwzHeEreMvhZopAScXM14SJHpGwZyRljMlDvcMm9FZ/1e9+r/puOnpXOtc9Iu2fmgBfEP9cGW1Fzb1rGlfJ08pACtq1ZW18bf2cevebzVeHbaA50G9qoUp39JWdPHbYkPCRXjt4gzlq3Cxge28Mky8MoS/+On72kc+ZI2xBtgJytpAQHQ1zrEddMIVyR5urX6yBNu8v5lKC8eLdGKTJtbgIZ3ZyTzSfWmx9f+cvcJe8yM39K/djkp2aUTE/9m2Lj5jg7b8vdRAer7DO3SyLNHs1CAm5x5iAdh2yGJYivArZbCBNY88Tw+w+C1Tbt7wK3zl2rzTHo/D8/gb3c3mYrnEIEipYqPUcdWjnTsSw471O3EUN7Gtg4NOAs9PJrxm03VuZKa5xwXAYCjt7Gs01Km6T2DhOYUMoFcCSu7Hk1p3yP1eG+M3v3Q5luAze6WwBnZIYO0TCucPWK+UJ36KoJ8Y+vpavhLO8g5ed704IjlQdfemrMu//EvPYXTQSGIPPfiagJS9nMqP5IvkxN9pvuJz7h8carPXTKMq8jnTeL0STan6dnLTAqwIswcIwWDR2KwbGddAVN8SYWRB7kfBfBRkSXzvHlIF8D6jo64kUzYk5o/n8oLjKqat0rdXvQ86MkwQGMnnlcasqPPT2+mVtUGb32KuH6cyZQenrRG11TArcAl27+nvOMBDe++EKHf4YdyGf7mznzOz33cFFGEcv329p4qG2hoaQ8ULiMyVz6ENcxhoqGnFIdupcn7GICQWuw3yO3W8S33mzCcMYJ8ywc7U7rmaQf/W5K63Gr4bVTpXOyOp4tbaPyIaatBNpXqlmQUTSZXjxPr19+73PSaT+QnI35YsWn6WpfJjRtK8vlJZoTSgjaRU39AGCkWOZtifJrnefCrqwTKDFmuWUCukEsYcRrMzCoit28wYpP7kSVjMD8WJYQiNc2blMjuqYegmf6SsfC1jqz8XzghMlOX+gn/MKZmgljszrmehEa4V98VreJDxYvHr3j7IeJB9/sBZV41BWT/AZAjuC5XorlIPnZgBAniBEhanp0/0+qZmEWDpu8ige1hUPIyTo6T6gDEcFhWSoduNh8YSu65KgMOGBw7VlNYzNIgwHtq9KP2yyTVysqX5v12sf7D+vQUdR2dRDvCV40rIInXSLWT/yrC6ExOQxBJwIDbeZcl3z1yR5Rj3l8IGpxspapnvBL+fwupA3b6fkFceID9wgiM1ILB0cHVdvo/R4xg8yqKXT8efl0GnGX1/27FUYeUW2L/GNRGGWVGp3i91oaJkb4rybENHre9a2P5viz/yqk8ngWUUS+Kv+fu+9BLFnfLiLXOFcIeBJLhnayCiuDRSqcx0Qu68gVsGYc6EHD500Fkt+gpDj6gvr884n8wZ5o6q7xtL5wA0beXQnffWYkZrs2NGIRgQbsc5NB302SVx+R4ROvmgZaR8wBcji128BMfJ9kcvJ4DC+bQ57kRmv5yxgU4ngZfn0/JNZ8JBwxjTqS+s9kjJFG1unGUGLwMiIuXUD9EFhNIJuyCEAmVZSIGKH4G6v1gRR1LyzQKH2ZqiI1DnHMoDEZspbDjTeaFIAbSvjSq3A+n46y9hhVM8wIpnARSXyzmOD96d9UXvFroSPgGw1dq2vdEqDq9fJN1EbL2WulNmHkFDvxSO9ZT/RX/Bw2gA/BrF90XrJACereVfbV/YXaKfp77Nmx5NjEIUlxojsy7iN7nBHSZigfsbFyVOX1ZTeCCxvqnRSExP4lk5ZeYlRu9caaa743TWNdchRIhEWwadsBIe245C8clpaZ4zrPsk+OwXzxWCvRRumyNSLW5KWaSJyJU95cwheK76gr7228spZ3hmTtLyrfM2QRFqZFMR8/Q6yWfVgwTdfX2Ry4w3+eAO/5VT5nFb5NlzXPvBEAWrNZ6Q3jbH0RF4vcbp+fDngf/ywpoyNQtjrfvcq93AVb1RDWRghvyqgI2BkMr1rwYi8gizZ0G9GmPpMeqPerAQ0dJbzx+KAFM4IBq6iSLpZHUroeyfd9o5o+4fR2EtsZBoJORQEA4SW0CmeXSnblx2e9QkCHIodyqV6+g5ETEpZsLqnd/Na60EKPX/tQpPEcO+COIBPcQdszDzSiHGyQFPly/7KciUh1u+mFfxTCHGv9nn2WqndGgeGjQ/kr02qmTBX7Hc1qiEvgiSz1Tz/sy7Es29wvn6FrDGPP7asXlhOaiHxOctPvTptFA1kHFUk8bME7SsTSnGbFbUrssxrq70LhoSh5OwvQna+w84XdXhZb2sloJ4ZsCg3j+PrjJL08/JBi5zGd6ud/ZxhmcGKLOXPcNunQq5ESW92iJvfsuRrNYtawWwSmNhPYoFj2QqWNF0ffLpGt/ad24RJ8vkb5sXkpyKXmvFG5Vcdzf/44k3PBL/ojJ52+kWGzOArnyp5f969oV3J2c4Li27Nkova9VwRNVKqN0V+gV+mTHitgkXV30aWd3A1RSildEleiNPA+5cp+3+T7X+xfHiRZXQ1s4FA9TxIcnveQs9JSZ5r5qNmgqlW4zMtZ6rYNvgmyVcywKtu8ZxnSbS5vXlBV+NXdIfi3+xzrnJ0TkFL+Un8v1PWOC2PPFCjVPq7qTH7mOpzOYj/b4h0ceT+eHgr97Jqhb1ziVfeANzfN8bFUhPKBi7hJBCukQnB0aGjFTYLJPXL26lQ2b80xrOD5cFWgA8hz3St0e69kwNnD3+nX3gy12FjrjO+ddRvvvfyV3SWbXcxqNHfmsb9u1TV+wHTb9B07/L2sB8WUHJ9eeNomDyysEWZ0deqEhH/oWI2oiEh526gvAK1Nx2kIhNvkYR+tPYHEa9j+nd1VBpQP1uzSjIDO+fDDB7uy029rRjDC5Sk6aKczyz1D5uA9Lu+Rrrapl8JXNL3VRllNQH2K1ZFxOpX8LprttfqQ56MbPM0IttUheXWD/mROOeFqGUbL+kUOVlXLTFX/525g4faLEFO4qWWdmOXMNvVjpIVTWt650HfQjX9oT3Dg5Au6+v1/Ci78La6ZOngYCFPT1AUwxQuZ0yt5xKdNXLaDTISMTeCj16XTryhM36K2mfGRIgot71voWs8tTpL/f1rvcwv3LSDf+/G8THCT7NpfHWcW+lsF/ol8q9Bi6MezNTqp0rpp/kJRiVfNrX/w27cRRTu8RIIqtUblBMkxy4jwAVqCjUJkiPBj2cAoVloG8B2/N5deLdMhDb7xs5nhd3dubJhuj8WbaFRyu1L678DHhhA+rMimNo4C1kGpp0tD/qnCfCFHejpf0LJX43OTr578PY0tnIIrlWyNYyuR/ie6j2xNb1OV6u0dOX/1Dtcd7+ya9W+rY2LmnyQMtk8SMLTon8RAdwOaN2tNg5zVnDKlmVeOxPV2vhHIo9QEPV7jc3f+zVDquiNg1OaHX3cZXJDRY5MJpo+VanAcmqp4oasYLG+wrXUL5vJU0kqk2hGEskhP+Jjigrz1l6QnEwp6n8PMVeJp70Ii6ppeaK9GhF6fJE00ceLyxv08tKiPat4QdxZFgSbQknnEiCLD8Qc1rjazVKM3r3gXnnMeONgdz/yFV1q+haaN+wnF3Fn4uYCI9XsKOuVwDD0LsCO/f0gj5cmxCFcr7sclIcefWjvore+3aSU474cyqDVxH7w1RX3CHsaqsMRX17ZLgjsDXws3kLm2XJdM3Ku383UXqaHqsywzPhx7NFir0Fqjym/w6cxD2U9ypa3dx7Z12w/fi3Jps8sqJ8f8Ah8aZAvkHXvIRyrsxK7rrFaNNdNvjI8+3Emri195DCNa858anj2Qdny6Czshkn4N2+1m+k5S8sunX3Ja7I+JutRzg1mc2e9Yc0Zv9PZn1SwhxIdU9sXwZRTd/J5FoUm0e+PYREeHg3oc2YYzGf2xfJxXExt4pT3RfDRHvMXLUmoXOy63xv5pLuhOEax0dRgSywZ/GH+YBXFgCeTU0hZ8SPEFsn8punp1Kurd1KgXxUZ+la3R5+4ePGR4ZF5UQtOa83+Vj8zh80dfzbhxWCeoJnQ4dkZJM4drzknZOOKx2n3WrvJnzFIS8p0xeic+M3ZRVXIp10tV2DyYKwRxLzulPwzHcLlYTxl4PF7v8l106Azr+6wBFejbq/3P72C/0j78cepY9990/d4eAurn2lqdGKLU8FffnMw7cY7pVeXJRMU73Oxwi2g2vh/+4gX8dvbjfojn/eLVhhYl8GthwCQ50KcZq4z2JeW5eeOnJWFQEnVxDoG459TaC4zXybECEoJ0V5q1tXrQbDMtUxeTV6Pdt1/zJuc7TJoV/9YZFWxUtCf6Ou3Vd/vR/vG0138hJQrHkNeoep5dLe+6umcSquKvMaFpm3EZHDBOvCi0XYyIFHMgX7Cqp3JVXlxJFwQfHSaIUEbI2u1lBVUdlNw4Qa9UsLPEK94Qiln3pyKxQVCeNlx8yd7EegVNQBkFLabKvnietYVB4IPZ1fSor82arbgYec8aSdFMaIluYTYuNx32SxfrjKUdPGq+UNp5YpydoEG3xVLixtmHO9zXxKAnHnPuH2fPGrjx0GcuCDEU+yXUtXh6nfUL+cykws1gJ5vkfYFaFBr9PdCXvVf35OJQxzUMmWjv0W6uGJK11uAGDqSpOwCf6rouSIjPVgw57cJCOQ4b9tkI/Y5WNon9Swe72aZryKo8d+HyHBEdWJKrkary0LIGczA4Irq353Wc0Zga3om7UQiAGCvIl8GGyaqz5zH+1gMP5phWUCpKtttWIyicz09vXg76GxkmiGSMQ06Z9X8BUwqOtauDbPIf4rpK/yYoeAHxJ9soXS9VDe1Aw+awOOxaN8foLrif0TXBvQ55dtRtulRq9emFDBxlQcqKCaD8NeTSE7FOHvcjf/+oKbbtRqz9gbofoc2EzQ3pL6W5JdfJzAWmOk8oeoECe90lVMruwl/ltM015P/zIPazqvdvFmLNVHMIZrwiQ2tIKtGh6PDVH+85ew3caqVt2BsDv5rOcu3G9srQWd7NmgtzCRUXLYknYRSwtH9oUtkqyN3CfP20xQ1faXQl4MEmjQehWR6GmGnkdpYNQYeIG408yAX7uCZmYUic9juOfb+Re28+OVOB+scYK4DaPcBe+5wmji9gymtkMpKo4UKqCz7yxzuN8VIlx9yNozpRJpNaWHtaZVEqP45n2JemTlYBSmNIK1FuSYAUQ1yBLnKxevrjayd+h2i8PjdB3YY6b0nr3JuOXGpPMyh4V2dslpR3DFEvgpsBLqhqLDOWP4yEvIL6f21PpA7/8B"; var trieBuffer = { data: data, }; // we may be running in a browser so we make an Uint8Array var trieData = new Uint8Array( Buffer.from(trieBuffer.data, "base64") ); var trie = new (unicode_trie__WEBPACK_IMPORTED_MODULE_0___default())( trieData ); var log2 = Math.log2 || function (n) { return Math.log(n) / Math.LN2; }; var bits = function bits(n) { return (log2(n) + 1) | 0; }; // compute the number of bits stored for each field var CATEGORY_BITS = bits(data$1.categories.length - 1); var COMBINING_BITS = bits(data$1.combiningClasses.length - 1); var SCRIPT_BITS = bits(data$1.scripts.length - 1); var EAW_BITS = bits(data$1.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$1.categories[ (val >> CATEGORY_SHIFT) & CATEGORY_MASK ]; }; var getCombiningClass = function getCombiningClass(codePoint) { var val = trie.get(codePoint); return data$1.combiningClasses[ (val >> COMBINING_SHIFT) & COMBINING_MASK ]; }; var getScript = function getScript(codePoint) { var val = trie.get(codePoint); return data$1.scripts[(val >> SCRIPT_SHIFT) & SCRIPT_MASK]; }; var getEastAsianWidth = function getEastAsianWidth(codePoint) { var val = trie.get(codePoint); return data$1.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; } if (num <= 50) { return num - 1; } if (num < 0x1e0) { var numerator = (num >> 4) - 12; var denominator = (num & 0xf) + 1; return numerator / denominator; } if (num < 0x300) { val = (num >> 5) - 14; var _exp = (num & 0x1f) + 2; while (_exp > 0) { val *= 10; _exp--; } return val; } 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" ); }; var index = { 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, }; /***/ }, /***/ 1290: /***/ function (module) { "use strict"; /** * Copyright (c) 2014-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * * * @format */ var CONSTANTS = { ALIGN_COUNT: 8, ALIGN_AUTO: 0, ALIGN_FLEX_START: 1, ALIGN_CENTER: 2, ALIGN_FLEX_END: 3, ALIGN_STRETCH: 4, ALIGN_BASELINE: 5, ALIGN_SPACE_BETWEEN: 6, ALIGN_SPACE_AROUND: 7, DIMENSION_COUNT: 2, DIMENSION_WIDTH: 0, DIMENSION_HEIGHT: 1, DIRECTION_COUNT: 3, DIRECTION_INHERIT: 0, DIRECTION_LTR: 1, DIRECTION_RTL: 2, DISPLAY_COUNT: 2, DISPLAY_FLEX: 0, DISPLAY_NONE: 1, EDGE_COUNT: 9, EDGE_LEFT: 0, EDGE_TOP: 1, EDGE_RIGHT: 2, EDGE_BOTTOM: 3, EDGE_START: 4, EDGE_END: 5, EDGE_HORIZONTAL: 6, EDGE_VERTICAL: 7, EDGE_ALL: 8, EXPERIMENTAL_FEATURE_COUNT: 1, EXPERIMENTAL_FEATURE_WEB_FLEX_BASIS: 0, FLEX_DIRECTION_COUNT: 4, FLEX_DIRECTION_COLUMN: 0, FLEX_DIRECTION_COLUMN_REVERSE: 1, FLEX_DIRECTION_ROW: 2, FLEX_DIRECTION_ROW_REVERSE: 3, JUSTIFY_COUNT: 6, JUSTIFY_FLEX_START: 0, JUSTIFY_CENTER: 1, JUSTIFY_FLEX_END: 2, JUSTIFY_SPACE_BETWEEN: 3, JUSTIFY_SPACE_AROUND: 4, JUSTIFY_SPACE_EVENLY: 5, LOG_LEVEL_COUNT: 6, LOG_LEVEL_ERROR: 0, LOG_LEVEL_WARN: 1, LOG_LEVEL_INFO: 2, LOG_LEVEL_DEBUG: 3, LOG_LEVEL_VERBOSE: 4, LOG_LEVEL_FATAL: 5, MEASURE_MODE_COUNT: 3, MEASURE_MODE_UNDEFINED: 0, MEASURE_MODE_EXACTLY: 1, MEASURE_MODE_AT_MOST: 2, NODE_TYPE_COUNT: 2, NODE_TYPE_DEFAULT: 0, NODE_TYPE_TEXT: 1, OVERFLOW_COUNT: 3, OVERFLOW_VISIBLE: 0, OVERFLOW_HIDDEN: 1, OVERFLOW_SCROLL: 2, POSITION_TYPE_COUNT: 2, POSITION_TYPE_RELATIVE: 0, POSITION_TYPE_ABSOLUTE: 1, PRINT_OPTIONS_COUNT: 3, PRINT_OPTIONS_LAYOUT: 1, PRINT_OPTIONS_STYLE: 2, PRINT_OPTIONS_CHILDREN: 4, UNIT_COUNT: 4, UNIT_UNDEFINED: 0, UNIT_POINT: 1, UNIT_PERCENT: 2, UNIT_AUTO: 3, WRAP_COUNT: 3, WRAP_NO_WRAP: 0, WRAP_WRAP: 1, WRAP_WRAP_REVERSE: 2, }; module.exports = CONSTANTS; /***/ }, /***/ 9745: /***/ function ( module, __unused_webpack_exports, __webpack_require__ ) { "use strict"; /** * Copyright (c) 2014-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * * * @format */ var Yoga = __webpack_require__(1009); var nbind = __webpack_require__(8575); var ran = false; var ret = null; nbind({}, function (err, result) { if (ran) { return; } ran = true; if (err) { throw err; } ret = result; }); if (!ran) { throw new Error( "Failed to load the yoga module - it needed to be loaded synchronously, but didn't" ); } // $FlowFixMe ret will not be null here module.exports = Yoga(ret.bind, ret.lib); /***/ }, /***/ 1009: /***/ function ( module, __unused_webpack_exports, __webpack_require__ ) { "use strict"; var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if ( Object.prototype.hasOwnProperty.call( source, key ) ) { target[key] = source[key]; } } } return target; }; var _createClass = (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 ); } } return function (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 _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } } /** * Copyright (c) 2014-present, Facebook, Inc. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. An additional grant * of patent rights can be found in the PATENTS file in the same directory. * * * @format */ var CONSTANTS = __webpack_require__(1290); var Layout = (function () { function Layout(left, right, top, bottom, width, height) { _classCallCheck(this, Layout); this.left = left; this.right = right; this.top = top; this.bottom = bottom; this.width = width; this.height = height; } _createClass(Layout, [ { key: "fromJS", value: function fromJS(expose) { expose( this.left, this.right, this.top, this.bottom, this.width, this.height ); }, }, { key: "toString", value: function toString() { return ( "" ); }, }, ]); return Layout; })(); var Size = (function () { _createClass(Size, null, [ { key: "fromJS", value: function fromJS(_ref) { var width = _ref.width, height = _ref.height; return new Size(width, height); }, }, ]); function Size(width, height) { _classCallCheck(this, Size); this.width = width; this.height = height; } _createClass(Size, [ { key: "fromJS", value: function fromJS(expose) { expose(this.width, this.height); }, }, { key: "toString", value: function toString() { return ( "" ); }, }, ]); return Size; })(); var Value = (function () { function Value(unit, value) { _classCallCheck(this, Value); this.unit = unit; this.value = value; } _createClass(Value, [ { key: "fromJS", value: function fromJS(expose) { expose(this.unit, this.value); }, }, { key: "toString", value: function toString() { switch (this.unit) { case CONSTANTS.UNIT_POINT: return String(this.value); case CONSTANTS.UNIT_PERCENT: return this.value + "%"; case CONSTANTS.UNIT_AUTO: return "auto"; default: { return this.value + "?"; } } }, }, { key: "valueOf", value: function valueOf() { return this.value; }, }, ]); return Value; })(); module.exports = function (bind, lib) { function patch(prototype, name, fn) { var original = prototype[name]; prototype[name] = function () { for ( var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++ ) { args[_key] = arguments[_key]; } return fn.call.apply(fn, [this, original].concat(args)); }; } var _arr = [ "setPosition", "setMargin", "setFlexBasis", "setWidth", "setHeight", "setMinWidth", "setMinHeight", "setMaxWidth", "setMaxHeight", "setPadding", ]; var _loop = function _loop() { var _methods; var fnName = _arr[_i]; var methods = ((_methods = {}), _defineProperty( _methods, CONSTANTS.UNIT_POINT, lib.Node.prototype[fnName] ), _defineProperty( _methods, CONSTANTS.UNIT_PERCENT, lib.Node.prototype[fnName + "Percent"] ), _defineProperty( _methods, CONSTANTS.UNIT_AUTO, lib.Node.prototype[fnName + "Auto"] ), _methods); patch(lib.Node.prototype, fnName, function (original) { for ( var _len2 = arguments.length, args = Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++ ) { args[_key2 - 1] = arguments[_key2]; } // We patch all these functions to add support for the following calls: // .setWidth(100) / .setWidth("100%") / .setWidth(.getWidth()) / .setWidth("auto") var value = args.pop(); var unit = void 0, asNumber = void 0; if (value === "auto") { unit = CONSTANTS.UNIT_AUTO; asNumber = undefined; } else if (value instanceof Value) { unit = value.unit; asNumber = value.valueOf(); } else { unit = typeof value === "string" && value.endsWith("%") ? CONSTANTS.UNIT_PERCENT : CONSTANTS.UNIT_POINT; asNumber = parseFloat(value); if ( !Number.isNaN(value) && Number.isNaN(asNumber) ) { throw new Error( "Invalid value " + value + " for " + fnName ); } } if (!methods[unit]) throw new Error( 'Failed to execute "' + fnName + "\": Unsupported unit '" + value + "'" ); if (asNumber !== undefined) { var _methods$unit; return (_methods$unit = methods[unit]).call.apply( _methods$unit, [this].concat(args, [asNumber]) ); } else { var _methods$unit2; return (_methods$unit2 = methods[unit]).call.apply( _methods$unit2, [this].concat(args) ); } }); }; for (var _i = 0; _i < _arr.length; _i++) { _loop(); } patch(lib.Config.prototype, "free", function () { // Since we handle the memory allocation ourselves (via lib.Config.create), // we also need to handle the deallocation lib.Config.destroy(this); }); patch(lib.Node, "create", function (_, config) { // We decide the constructor we want to call depending on the parameters return config ? lib.Node.createWithConfig(config) : lib.Node.createDefault(); }); patch(lib.Node.prototype, "free", function () { // Since we handle the memory allocation ourselves (via lib.Node.create), // we also need to handle the deallocation lib.Node.destroy(this); }); patch(lib.Node.prototype, "freeRecursive", function () { for (var t = 0, T = this.getChildCount(); t < T; ++t) { this.getChild(0).freeRecursive(); } this.free(); }); patch( lib.Node.prototype, "setMeasureFunc", function (original, measureFunc) { // This patch is just a convenience patch, since it helps write more // idiomatic source code (such as .setMeasureFunc(null)) // We also automatically convert the return value of the measureFunc // to a Size object, so that we can return anything that has .width and // .height properties if (measureFunc) { return original.call(this, function () { return Size.fromJS( measureFunc.apply(undefined, arguments) ); }); } else { return this.unsetMeasureFunc(); } } ); patch( lib.Node.prototype, "calculateLayout", function (original) { var width = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : NaN; var height = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : NaN; var direction = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : CONSTANTS.DIRECTION_LTR; // Just a small patch to add support for the function default parameters return original.call(this, width, height, direction); } ); return _extends( { Config: lib.Config, Node: lib.Node, Layout: bind("Layout", Layout), Size: bind("Size", Size), Value: bind("Value", Value), getInstanceCount: function getInstanceCount() { return lib.getInstanceCount.apply(lib, arguments); }, }, CONSTANTS ); }; /***/ }, /***/ 4299: /***/ function (module) { module.exports = absolutize; /** * redefine `path` with absolute coordinates * * @param {Array} path * @return {Array} */ function absolutize(path) { var startX = 0; var startY = 0; var x = 0; var y = 0; return path.map(function (seg) { seg = seg.slice(); var type = seg[0]; var command = type.toUpperCase(); // is relative if (type != command) { seg[0] = command; switch (type) { case "a": seg[6] += x; seg[7] += y; break; case "v": seg[1] += y; break; case "h": seg[1] += x; break; default: for (var i = 1; i < seg.length; ) { seg[i++] += x; seg[i++] += y; } } } // update cursor state switch (command) { case "Z": x = startX; y = startY; break; case "H": x = seg[1]; break; case "V": y = seg[1]; break; case "M": x = startX = seg[1]; y = startY = seg[2]; break; default: x = seg[seg.length - 2]; y = seg[seg.length - 1]; } return seg; }); } /***/ }, /***/ 7152: /***/ function ( module, __unused_webpack_exports, __webpack_require__ ) { var WritableStream = __webpack_require__(9681).Writable; var util = __webpack_require__(9720); var Blob = __webpack_require__(5548); var URL = __webpack_require__.g.URL || __webpack_require__.g.webkitURL || __webpack_require__.g.mozURL; function BlobStream() { if (!(this instanceof BlobStream)) return new BlobStream(); WritableStream.call(this); this._chunks = []; this._blob = null; this.length = 0; } util.inherits(BlobStream, WritableStream); BlobStream.prototype._write = function (chunk, encoding, callback) { // convert chunks to Uint8Arrays (e.g. Buffer when array fallback is being used) if (!(chunk instanceof Uint8Array)) chunk = new Uint8Array(chunk); this.length += chunk.length; this._chunks.push(chunk); callback(); }; BlobStream.prototype.toBlob = function (type) { type = type || "application/octet-stream"; // cache the blob if needed if (!this._blob) { this._blob = new Blob(this._chunks, { type: type, }); this._chunks = []; // free memory } // if the cached blob's type doesn't match the requested type, make a new blob if (this._blob.type !== type) this._blob = new Blob([this._blob], { type: type }); return this._blob; }; BlobStream.prototype.toBlobURL = function (type) { return URL.createObjectURL(this.toBlob(type)); }; module.exports = BlobStream; /***/ }, /***/ 5548: /***/ function ( module, __unused_webpack_exports, __webpack_require__ ) { /** * Create a blob builder even when vendor prefixes exist */ var BlobBuilder = __webpack_require__.g.BlobBuilder || __webpack_require__.g.WebKitBlobBuilder || __webpack_require__.g.MSBlobBuilder || __webpack_require__.g.MozBlobBuilder; /** * Check if Blob constructor is supported */ var blobSupported = (function () { try { var a = new Blob(["hi"]); return a.size === 2; } catch (e) { return false; } })(); /** * Check if Blob constructor supports ArrayBufferViews * Fails in Safari 6, so we need to map to ArrayBuffers there. */ var blobSupportsArrayBufferView = blobSupported && (function () { try { var b = new Blob([new Uint8Array([1, 2])]); return b.size === 2; } catch (e) { return false; } })(); /** * Check if BlobBuilder is supported */ var blobBuilderSupported = BlobBuilder && BlobBuilder.prototype.append && BlobBuilder.prototype.getBlob; /** * Helper function that maps ArrayBufferViews to ArrayBuffers * Used by BlobBuilder constructor and old browsers that didn't * support it in the Blob constructor. */ function mapArrayBufferViews(ary) { for (var i = 0; i < ary.length; i++) { var chunk = ary[i]; if (chunk.buffer instanceof ArrayBuffer) { var buf = chunk.buffer; // if this is a subarray, make a copy so we only // include the subarray region from the underlying buffer if (chunk.byteLength !== buf.byteLength) { var copy = new Uint8Array(chunk.byteLength); copy.set( new Uint8Array( buf, chunk.byteOffset, chunk.byteLength ) ); buf = copy.buffer; } ary[i] = buf; } } } function BlobBuilderConstructor(ary, options) { options = options || {}; var bb = new BlobBuilder(); mapArrayBufferViews(ary); for (var i = 0; i < ary.length; i++) { bb.append(ary[i]); } return options.type ? bb.getBlob(options.type) : bb.getBlob(); } function BlobConstructor(ary, options) { mapArrayBufferViews(ary); return new Blob(ary, options || {}); } module.exports = (function () { if (blobSupported) { return blobSupportsArrayBufferView ? __webpack_require__.g.Blob : BlobConstructor; } else if (blobBuilderSupported) { return BlobBuilderConstructor; } else { return undefined; } })(); /***/ }, /***/ 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__(1876)["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; } /***/ }, /***/ 8874: /***/ function (module) { "use strict"; module.exports = { 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], green: [0, 128, 0], greenyellow: [173, 255, 47], grey: [128, 128, 128], 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], 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], yellowgreen: [154, 205, 50], }; /***/ }, /***/ 9818: /***/ function ( module, __unused_webpack_exports, __webpack_require__ ) { /* MIT license */ var colorNames = __webpack_require__(8874); var swizzle = __webpack_require__(6851); var hasOwnProperty = Object.hasOwnProperty; var reverseNames = Object.create(null); // create a list of reverse color names for (var name in colorNames) { if (hasOwnProperty.call(colorNames, name)) { reverseNames[colorNames[name]] = name; } } var cs = (module.exports = { to: {}, get: {}, }); cs.get = function (string) { var prefix = string.substring(0, 3).toLowerCase(); var val; var model; switch (prefix) { case "hsl": val = cs.get.hsl(string); model = "hsl"; break; case "hwb": val = cs.get.hwb(string); model = "hwb"; break; default: val = cs.get.rgb(string); model = "rgb"; break; } if (!val) { return null; } return { model: model, value: val }; }; cs.get.rgb = function (string) { if (!string) { return null; } var abbr = /^#([a-f0-9]{3,4})$/i; var hex = /^#([a-f0-9]{6})([a-f0-9]{2})?$/i; var rgba = /^rgba?\(\s*([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)(?=[\s,])\s*(?:,\s*)?([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/; var per = /^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/; var keyword = /^(\w+)$/; var rgb = [0, 0, 0, 1]; var match; var i; var hexAlpha; if ((match = string.match(hex))) { hexAlpha = match[2]; match = match[1]; for (i = 0; i < 3; i++) { // https://jsperf.com/slice-vs-substr-vs-substring-methods-long-string/19 var i2 = i * 2; rgb[i] = parseInt(match.slice(i2, i2 + 2), 16); } if (hexAlpha) { rgb[3] = parseInt(hexAlpha, 16) / 255; } } else if ((match = string.match(abbr))) { match = match[1]; hexAlpha = match[3]; for (i = 0; i < 3; i++) { rgb[i] = parseInt(match[i] + match[i], 16); } if (hexAlpha) { rgb[3] = parseInt(hexAlpha + hexAlpha, 16) / 255; } } else if ((match = string.match(rgba))) { for (i = 0; i < 3; i++) { rgb[i] = parseInt(match[i + 1], 0); } if (match[4]) { if (match[5]) { rgb[3] = parseFloat(match[4]) * 0.01; } else { rgb[3] = parseFloat(match[4]); } } } else if ((match = string.match(per))) { for (i = 0; i < 3; i++) { rgb[i] = Math.round(parseFloat(match[i + 1]) * 2.55); } if (match[4]) { if (match[5]) { rgb[3] = parseFloat(match[4]) * 0.01; } else { rgb[3] = parseFloat(match[4]); } } } else if ((match = string.match(keyword))) { if (match[1] === "transparent") { return [0, 0, 0, 0]; } if (!hasOwnProperty.call(colorNames, match[1])) { return null; } rgb = colorNames[match[1]]; rgb[3] = 1; return rgb; } else { return null; } for (i = 0; i < 3; i++) { rgb[i] = clamp(rgb[i], 0, 255); } rgb[3] = clamp(rgb[3], 0, 1); return rgb; }; cs.get.hsl = function (string) { if (!string) { return null; } var hsl = /^hsla?\(\s*([+-]?(?:\d{0,3}\.)?\d+)(?:deg)?\s*,?\s*([+-]?[\d\.]+)%\s*,?\s*([+-]?[\d\.]+)%\s*(?:[,|\/]\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/; var match = string.match(hsl); if (match) { var alpha = parseFloat(match[4]); var h = ((parseFloat(match[1]) % 360) + 360) % 360; var s = clamp(parseFloat(match[2]), 0, 100); var l = clamp(parseFloat(match[3]), 0, 100); var a = clamp(isNaN(alpha) ? 1 : alpha, 0, 1); return [h, s, l, a]; } return null; }; cs.get.hwb = function (string) { if (!string) { return null; } var hwb = /^hwb\(\s*([+-]?\d{0,3}(?:\.\d+)?)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?(?=\.\d|\d)(?:0|[1-9]\d*)?(?:\.\d*)?(?:[eE][+-]?\d+)?)\s*)?\)$/; var match = string.match(hwb); if (match) { var alpha = parseFloat(match[4]); var h = ((parseFloat(match[1]) % 360) + 360) % 360; var w = clamp(parseFloat(match[2]), 0, 100); var b = clamp(parseFloat(match[3]), 0, 100); var a = clamp(isNaN(alpha) ? 1 : alpha, 0, 1); return [h, w, b, a]; } return null; }; cs.to.hex = function () { var rgba = swizzle(arguments); return ( "#" + hexDouble(rgba[0]) + hexDouble(rgba[1]) + hexDouble(rgba[2]) + (rgba[3] < 1 ? hexDouble(Math.round(rgba[3] * 255)) : "") ); }; cs.to.rgb = function () { var rgba = swizzle(arguments); return rgba.length < 4 || rgba[3] === 1 ? "rgb(" + Math.round(rgba[0]) + ", " + Math.round(rgba[1]) + ", " + Math.round(rgba[2]) + ")" : "rgba(" + Math.round(rgba[0]) + ", " + Math.round(rgba[1]) + ", " + Math.round(rgba[2]) + ", " + rgba[3] + ")"; }; cs.to.rgb.percent = function () { var rgba = swizzle(arguments); var r = Math.round((rgba[0] / 255) * 100); var g = Math.round((rgba[1] / 255) * 100); var b = Math.round((rgba[2] / 255) * 100); return rgba.length < 4 || rgba[3] === 1 ? "rgb(" + r + "%, " + g + "%, " + b + "%)" : "rgba(" + r + "%, " + g + "%, " + b + "%, " + rgba[3] + ")"; }; cs.to.hsl = function () { var hsla = swizzle(arguments); return hsla.length < 4 || hsla[3] === 1 ? "hsl(" + hsla[0] + ", " + hsla[1] + "%, " + hsla[2] + "%)" : "hsla(" + hsla[0] + ", " + hsla[1] + "%, " + hsla[2] + "%, " + hsla[3] + ")"; }; // hwb is a bit different than rgb(a) & hsl(a) since there is no alpha specific syntax // (hwb have alpha optional & 1 is default value) cs.to.hwb = function () { var hwba = swizzle(arguments); var a = ""; if (hwba.length >= 4 && hwba[3] !== 1) { a = ", " + hwba[3]; } return ( "hwb(" + hwba[0] + ", " + hwba[1] + "%, " + hwba[2] + "%" + a + ")" ); }; cs.to.keyword = function (rgb) { return reverseNames[rgb.slice(0, 3)]; }; // helpers function clamp(num, min, max) { return Math.min(Math.max(min, num), max); } function hexDouble(num) { var str = Math.round(num).toString(16).toUpperCase(); return str.length < 2 ? "0" + str : str; } /***/ }, /***/ 4098: /***/ function (module, exports) { var global = typeof self !== "undefined" ? self : this; var __self__ = (function () { function F() { this.fetch = false; this.DOMException = global.DOMException; } F.prototype = global; return new F(); })(); (function (self) { var irrelevant = (function (exports) { var support = { searchParams: "URLSearchParams" in self, iterable: "Symbol" in self && "iterator" in Symbol, blob: "FileReader" in self && "Blob" in self && (function () { try { new Blob(); return true; } catch (e) { return false; } })(), formData: "FormData" in self, arrayBuffer: "ArrayBuffer" in self, }; function isDataView(obj) { return obj && DataView.prototype.isPrototypeOf(obj); } if (support.arrayBuffer) { var viewClasses = [ "[object Int8Array]", "[object Uint8Array]", "[object Uint8ClampedArray]", "[object Int16Array]", "[object Uint16Array]", "[object Int32Array]", "[object Uint32Array]", "[object Float32Array]", "[object Float64Array]", ]; var isArrayBufferView = ArrayBuffer.isView || function (obj) { return ( obj && viewClasses.indexOf( Object.prototype.toString.call(obj) ) > -1 ); }; } function normalizeName(name) { if (typeof name !== "string") { name = String(name); } if (/[^a-z0-9\-#$%&'*+.^_`|~]/i.test(name)) { throw new TypeError( "Invalid character in header field name" ); } return name.toLowerCase(); } function normalizeValue(value) { if (typeof value !== "string") { value = String(value); } return value; } // Build a destructive iterator for the value list function iteratorFor(items) { var iterator = { next: function () { var value = items.shift(); return { done: value === undefined, value: value, }; }, }; if (support.iterable) { iterator[Symbol.iterator] = function () { return iterator; }; } return iterator; } function Headers(headers) { this.map = {}; if (headers instanceof Headers) { headers.forEach(function (value, name) { this.append(name, value); }, this); } else if (Array.isArray(headers)) { headers.forEach(function (header) { this.append(header[0], header[1]); }, this); } else if (headers) { Object.getOwnPropertyNames(headers).forEach( function (name) { this.append(name, headers[name]); }, this ); } } Headers.prototype.append = function (name, value) { name = normalizeName(name); value = normalizeValue(value); var oldValue = this.map[name]; this.map[name] = oldValue ? oldValue + ", " + value : value; }; Headers.prototype["delete"] = function (name) { delete this.map[normalizeName(name)]; }; Headers.prototype.get = function (name) { name = normalizeName(name); return this.has(name) ? this.map[name] : null; }; Headers.prototype.has = function (name) { return this.map.hasOwnProperty(normalizeName(name)); }; Headers.prototype.set = function (name, value) { this.map[normalizeName(name)] = normalizeValue(value); }; Headers.prototype.forEach = function (callback, thisArg) { for (var name in this.map) { if (this.map.hasOwnProperty(name)) { callback.call( thisArg, this.map[name], name, this ); } } }; Headers.prototype.keys = function () { var items = []; this.forEach(function (value, name) { items.push(name); }); return iteratorFor(items); }; Headers.prototype.values = function () { var items = []; this.forEach(function (value) { items.push(value); }); return iteratorFor(items); }; Headers.prototype.entries = function () { var items = []; this.forEach(function (value, name) { items.push([name, value]); }); return iteratorFor(items); }; if (support.iterable) { Headers.prototype[Symbol.iterator] = Headers.prototype.entries; } function consumed(body) { if (body.bodyUsed) { return Promise.reject( new TypeError("Already read") ); } body.bodyUsed = true; } function fileReaderReady(reader) { return new Promise(function (resolve, reject) { reader.onload = function () { resolve(reader.result); }; reader.onerror = function () { reject(reader.error); }; }); } function readBlobAsArrayBuffer(blob) { var reader = new FileReader(); var promise = fileReaderReady(reader); reader.readAsArrayBuffer(blob); return promise; } function readBlobAsText(blob) { var reader = new FileReader(); var promise = fileReaderReady(reader); reader.readAsText(blob); return promise; } function readArrayBufferAsText(buf) { var view = new Uint8Array(buf); var chars = new Array(view.length); for (var i = 0; i < view.length; i++) { chars[i] = String.fromCharCode(view[i]); } return chars.join(""); } function bufferClone(buf) { if (buf.slice) { return buf.slice(0); } else { var view = new Uint8Array(buf.byteLength); view.set(new Uint8Array(buf)); return view.buffer; } } function Body() { this.bodyUsed = false; this._initBody = function (body) { this._bodyInit = body; if (!body) { this._bodyText = ""; } else if (typeof body === "string") { this._bodyText = body; } else if ( support.blob && Blob.prototype.isPrototypeOf(body) ) { this._bodyBlob = body; } else if ( support.formData && FormData.prototype.isPrototypeOf(body) ) { this._bodyFormData = body; } else if ( support.searchParams && URLSearchParams.prototype.isPrototypeOf(body) ) { this._bodyText = body.toString(); } else if ( support.arrayBuffer && support.blob && isDataView(body) ) { this._bodyArrayBuffer = bufferClone( body.buffer ); // IE 10-11 can't handle a DataView body. this._bodyInit = new Blob([ this._bodyArrayBuffer, ]); } else if ( support.arrayBuffer && (ArrayBuffer.prototype.isPrototypeOf(body) || isArrayBufferView(body)) ) { this._bodyArrayBuffer = bufferClone(body); } else { this._bodyText = body = Object.prototype.toString.call(body); } if (!this.headers.get("content-type")) { if (typeof body === "string") { this.headers.set( "content-type", "text/plain;charset=UTF-8" ); } else if ( this._bodyBlob && this._bodyBlob.type ) { this.headers.set( "content-type", this._bodyBlob.type ); } else if ( support.searchParams && URLSearchParams.prototype.isPrototypeOf( body ) ) { this.headers.set( "content-type", "application/x-www-form-urlencoded;charset=UTF-8" ); } } }; if (support.blob) { this.blob = function () { var rejected = consumed(this); if (rejected) { return rejected; } if (this._bodyBlob) { return Promise.resolve(this._bodyBlob); } else if (this._bodyArrayBuffer) { return Promise.resolve( new Blob([this._bodyArrayBuffer]) ); } else if (this._bodyFormData) { throw new Error( "could not read FormData body as blob" ); } else { return Promise.resolve( new Blob([this._bodyText]) ); } }; this.arrayBuffer = function () { if (this._bodyArrayBuffer) { return ( consumed(this) || Promise.resolve(this._bodyArrayBuffer) ); } else { return this.blob().then( readBlobAsArrayBuffer ); } }; } this.text = function () { var rejected = consumed(this); if (rejected) { return rejected; } if (this._bodyBlob) { return readBlobAsText(this._bodyBlob); } else if (this._bodyArrayBuffer) { return Promise.resolve( readArrayBufferAsText(this._bodyArrayBuffer) ); } else if (this._bodyFormData) { throw new Error( "could not read FormData body as text" ); } else { return Promise.resolve(this._bodyText); } }; if (support.formData) { this.formData = function () { return this.text().then(decode); }; } this.json = function () { return this.text().then(JSON.parse); }; return this; } // HTTP methods whose capitalization should be normalized var methods = [ "DELETE", "GET", "HEAD", "OPTIONS", "POST", "PUT", ]; function normalizeMethod(method) { var upcased = method.toUpperCase(); return methods.indexOf(upcased) > -1 ? upcased : method; } function Request(input, options) { options = options || {}; var body = options.body; if (input instanceof Request) { if (input.bodyUsed) { throw new TypeError("Already read"); } this.url = input.url; this.credentials = input.credentials; if (!options.headers) { this.headers = new Headers(input.headers); } this.method = input.method; this.mode = input.mode; this.signal = input.signal; if (!body && input._bodyInit != null) { body = input._bodyInit; input.bodyUsed = true; } } else { this.url = String(input); } this.credentials = options.credentials || this.credentials || "same-origin"; if (options.headers || !this.headers) { this.headers = new Headers(options.headers); } this.method = normalizeMethod( options.method || this.method || "GET" ); this.mode = options.mode || this.mode || null; this.signal = options.signal || this.signal; this.referrer = null; if ( (this.method === "GET" || this.method === "HEAD") && body ) { throw new TypeError( "Body not allowed for GET or HEAD requests" ); } this._initBody(body); } Request.prototype.clone = function () { return new Request(this, { body: this._bodyInit }); }; function decode(body) { var form = new FormData(); body.trim() .split("&") .forEach(function (bytes) { if (bytes) { var split = bytes.split("="); var name = split .shift() .replace(/\+/g, " "); var value = split .join("=") .replace(/\+/g, " "); form.append( decodeURIComponent(name), decodeURIComponent(value) ); } }); return form; } function parseHeaders(rawHeaders) { var headers = new Headers(); // Replace instances of \r\n and \n followed by at least one space or horizontal tab with a space // https://tools.ietf.org/html/rfc7230#section-3.2 var preProcessedHeaders = rawHeaders.replace( /\r?\n[\t ]+/g, " " ); preProcessedHeaders .split(/\r?\n/) .forEach(function (line) { var parts = line.split(":"); var key = parts.shift().trim(); if (key) { var value = parts.join(":").trim(); headers.append(key, value); } }); return headers; } Body.call(Request.prototype); function Response(bodyInit, options) { if (!options) { options = {}; } this.type = "default"; this.status = options.status === undefined ? 200 : options.status; this.ok = this.status >= 200 && this.status < 300; this.statusText = "statusText" in options ? options.statusText : "OK"; this.headers = new Headers(options.headers); this.url = options.url || ""; this._initBody(bodyInit); } Body.call(Response.prototype); Response.prototype.clone = function () { return new Response(this._bodyInit, { status: this.status, statusText: this.statusText, headers: new Headers(this.headers), url: this.url, }); }; Response.error = function () { var response = new Response(null, { status: 0, statusText: "", }); response.type = "error"; return response; }; var redirectStatuses = [301, 302, 303, 307, 308]; Response.redirect = function (url, status) { if (redirectStatuses.indexOf(status) === -1) { throw new RangeError("Invalid status code"); } return new Response(null, { status: status, headers: { location: url }, }); }; exports.DOMException = self.DOMException; try { new exports.DOMException(); } catch (err) { exports.DOMException = function (message, name) { this.message = message; this.name = name; var error = Error(message); this.stack = error.stack; }; exports.DOMException.prototype = Object.create( Error.prototype ); exports.DOMException.prototype.constructor = exports.DOMException; } function fetch(input, init) { return new Promise(function (resolve, reject) { var request = new Request(input, init); if (request.signal && request.signal.aborted) { return reject( new exports.DOMException( "Aborted", "AbortError" ) ); } var xhr = new XMLHttpRequest(); function abortXhr() { xhr.abort(); } xhr.onload = function () { var options = { status: xhr.status, statusText: xhr.statusText, headers: parseHeaders( xhr.getAllResponseHeaders() || "" ), }; options.url = "responseURL" in xhr ? xhr.responseURL : options.headers.get("X-Request-URL"); var body = "response" in xhr ? xhr.response : xhr.responseText; resolve(new Response(body, options)); }; xhr.onerror = function () { reject(new TypeError("Network request failed")); }; xhr.ontimeout = function () { reject(new TypeError("Network request failed")); }; xhr.onabort = function () { reject( new exports.DOMException( "Aborted", "AbortError" ) ); }; xhr.open(request.method, request.url, true); if (request.credentials === "include") { xhr.withCredentials = true; } else if (request.credentials === "omit") { xhr.withCredentials = false; } if ("responseType" in xhr && support.blob) { xhr.responseType = "blob"; } request.headers.forEach(function (value, name) { xhr.setRequestHeader(name, value); }); if (request.signal) { request.signal.addEventListener( "abort", abortXhr ); xhr.onreadystatechange = function () { // DONE (success or failure) if (xhr.readyState === 4) { request.signal.removeEventListener( "abort", abortXhr ); } }; } xhr.send( typeof request._bodyInit === "undefined" ? null : request._bodyInit ); }); } fetch.polyfill = true; if (!self.fetch) { self.fetch = fetch; self.Headers = Headers; self.Request = Request; self.Response = Response; } exports.Headers = Headers; exports.Request = Request; exports.Response = Response; exports.fetch = fetch; Object.defineProperty(exports, "__esModule", { value: true, }); return exports; })({}); })(__self__); __self__.fetch.ponyfill = true; // Remove "polyfill" property added by whatwg-fetch delete __self__.fetch.polyfill; // Choose between native implementation (global) or custom implementation (__self__) // var ctx = global.fetch ? global : __self__; var ctx = __self__; // this line disable service worker support temporarily exports = ctx.fetch; // To enable: import fetch from 'cross-fetch' exports["default"] = ctx.fetch; // For TypeScript consumers without esModuleInterop. exports.fetch = ctx.fetch; // To enable: import {fetch} from 'cross-fetch' exports.Headers = ctx.Headers; exports.Request = ctx.Request; exports.Response = ctx.Response; module.exports = exports; /***/ }, /***/ 8249: /***/ function (module, exports, __webpack_require__) { (function (root, factory) { if (true) { // CommonJS module.exports = exports = factory(); } else { } })(this, 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 () { 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 (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 () { 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 () {}, /** * Copies properties into this object. * * @param {Object} properties The properties to mix in. * * @example * * MyType.mixIn({ * field: 'value' * }); */ mixIn: function (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 () { 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 (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 (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 (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 () { // 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 () { 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 (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 (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 (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 (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 (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 (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 (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 () { // 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 (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 (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 () { 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 (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 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 (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 (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 (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 (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; }); /***/ }, /***/ 8214: /***/ function (module, exports, __webpack_require__) { (function (root, factory) { if (true) { // CommonJS module.exports = exports = factory( __webpack_require__(8249) ); } else { } })(this, 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 () { this._hash = new WordArray.init([ 0x67452301, 0xefcdab89, 0x98badcfe, 0x10325476, ]); }, _doProcessBlock: function (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 () { // 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 () { 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; }); /***/ }, /***/ 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 hasPropertyDescriptors = __webpack_require__(1044)(); var supportsDescriptors = origDefineProperty && hasPropertyDescriptors; 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; // eslint-disable-line no-param-reassign } }; 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; /***/ }, /***/ 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; /***/ }, /***/ 5972: /***/ function (module) { "use strict"; var functionsHaveNames = function functionsHaveNames() { return typeof function f() {}.name === "string"; }; var gOPD = Object.getOwnPropertyDescriptor; if (gOPD) { try { gOPD([], "length"); } catch (e) { // IE 8 has a broken gOPD gOPD = null; } } functionsHaveNames.functionsHaveConfigurableNames = function functionsHaveConfigurableNames() { if (!functionsHaveNames() || !gOPD) { return false; } var desc = gOPD(function () {}, "name"); return !!desc && !!desc.configurable; }; var $bind = Function.prototype.bind; functionsHaveNames.boundFunctionsHaveNames = function boundFunctionsHaveNames() { return ( functionsHaveNames() && typeof $bind === "function" && function f() {}.bind().name !== "" ); }; module.exports = functionsHaveNames; /***/ }, /***/ 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; }; /***/ }, /***/ 1044: /***/ function ( module, __unused_webpack_exports, __webpack_require__ ) { "use strict"; var GetIntrinsic = __webpack_require__(210); var $defineProperty = GetIntrinsic("%Object.defineProperty%", true); var hasPropertyDescriptors = function hasPropertyDescriptors() { if ($defineProperty) { try { $defineProperty({}, "a", { value: 1 }); return true; } catch (e) { // IE 8 has a broken defineProperty return false; } } return false; }; hasPropertyDescriptors.hasArrayLengthDefineBug = function hasArrayLengthDefineBug() { // node v0.6 has a bug where array lengths can be Set but not Defined if (!hasPropertyDescriptors()) { return null; } try { return ( $defineProperty([], "length", { value: 1 }) .length !== 1 ); } catch (e) { // In Firefox 4-22, defining length on an array throws an exception. return true; } }; module.exports = hasPropertyDescriptors; /***/ }, /***/ 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 ); /***/ }, /***/ 6119: /***/ function ( module, __unused_webpack_exports, __webpack_require__ ) { // In our case, there's only one dependency var toRgb = __webpack_require__(7507); // Typically all dependencies should be declared at the top of the file. // Now let's define an API for our module, we're taking hue, saturation and luminosity values and outputting a CSS compatible hex string. // Hue is in degrees, between 0 and 359. Since degrees a cyclical in nature, we'll support numbers greater than 359 or less than 0 by "spinning" them around until they fall within the 0 to 359 range. // Saturation and luminosity are both percentages, we'll represent these percentages with whole numbers between 0 and 100. For these numbers we'll need to enforce a maximum and a minimum, anything below 0 will become 0, anything above 100 will become 100. // Let's write some utility functions to handle this logic: function max(val, n) { return val > n ? n : val; } function min(val, n) { return val < n ? n : val; } function cycle(val) { // for safety: val = max(val, 1e7); val = min(val, -1e7); // cycle value: while (val < 0) { val += 360; } while (val > 359) { val -= 360; } return val; } // Now for the main piece, the `hsl` function: function hsl(hue, saturation, luminosity) { // resolve degrees to 0 - 359 range hue = cycle(hue); // enforce constraints saturation = min(max(saturation, 100), 0); luminosity = min(max(luminosity, 100), 0); // convert to 0 to 1 range used by hsl-to-rgb-for-reals saturation /= 100; luminosity /= 100; // let hsl-to-rgb-for-reals do the hard work var rgb = toRgb(hue, saturation, luminosity); // convert each value in the returned RGB array // to a 2 character hex value, join the array into // a string, prefixed with a hash return ( "#" + rgb .map(function (n) { return (256 + n).toString(16).substr(-2); }) .join("") ); } // In order to make our code into a bona fide module we have to export it: module.exports = hsl; /***/ }, /***/ 7507: /***/ function (module) { // expected hue range: [0, 360) // expected saturation range: [0, 1] // expected lightness range: [0, 1] var hslToRgb = function (hue, saturation, lightness) { // based on algorithm from http://en.wikipedia.org/wiki/HSL_and_HSV#Converting_to_RGB if (hue == undefined) { return [0, 0, 0]; } var chroma = (1 - Math.abs(2 * lightness - 1)) * saturation; var huePrime = hue / 60; var secondComponent = chroma * (1 - Math.abs((huePrime % 2) - 1)); huePrime = Math.floor(huePrime); var red; var green; var blue; if (huePrime === 0) { red = chroma; green = secondComponent; blue = 0; } else if (huePrime === 1) { red = secondComponent; green = chroma; blue = 0; } else if (huePrime === 2) { red = 0; green = chroma; blue = secondComponent; } else if (huePrime === 3) { red = 0; green = secondComponent; blue = chroma; } else if (huePrime === 4) { red = secondComponent; green = 0; blue = chroma; } else if (huePrime === 5) { red = chroma; green = 0; blue = secondComponent; } var lightnessAdjustment = lightness - chroma / 2; red += lightnessAdjustment; green += lightnessAdjustment; blue += lightnessAdjustment; return [ Math.abs(Math.round(red * 255)), Math.abs(Math.round(green * 255)), Math.abs(Math.round(blue * 255)), ]; }; module.exports = hslToRgb; /***/ }, /***/ 4756: /***/ function (module, exports, __webpack_require__) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; /** Text hyphenation in Javascript. * Copyright (C) 2021 Yevhen Tiurin (yevhentiurin@gmail.com) * https://github.com/ytiurin/hyphen * * Released under the ISC license * https://github.com/ytiurin/hyphen/blob/master/LICENSE */ (function (root, factory) { if (true) { // AMD. Register as an anonymous module. !((__WEBPACK_AMD_DEFINE_ARRAY__ = []), (__WEBPACK_AMD_DEFINE_FACTORY__ = factory), (__WEBPACK_AMD_DEFINE_RESULT__ = typeof __WEBPACK_AMD_DEFINE_FACTORY__ === "function" ? __WEBPACK_AMD_DEFINE_FACTORY__.apply( exports, __WEBPACK_AMD_DEFINE_ARRAY__ ) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else { } })(this, function () { var SETTING_DEFAULT_ASYNC = false, SETTING_DEFAULT_DEBUG = false, SETTING_DEFAULT_HTML = false, SETTING_DEFAULT_HYPH_CHAR = "\u00AD", SETTING_DEFAULT_MIN_WORD_LENGTH = 5, SETTING_NAME_ASYNC = "async", SETTING_NAME_DEBUG = "debug", SETTING_NAME_HTML = "html", SETTING_NAME_HYPH_CHAR = "hyphenChar", SETTING_NAME_MIN_WORD_LENGTH = "minWordLength"; var _global = typeof __webpack_require__.g === "object" ? __webpack_require__.g : typeof window === "object" ? window : typeof this === "object" ? this : {}; function cloneObj(source) { var target = {}; for (var key in source) { target[key] = source[key]; } return target; } function keyOrDefault(object, key, defaultValue) { if (key in object) { return object[key]; } return defaultValue; } function exceptionsFromDefinition( patternsDefinition, hyphenChar ) { return patternsDefinition.exceptions.reduce(function ( exceptions, exception ) { exceptions[exception.replace(/\-/g, "")] = exception.replace(/\-/g, hyphenChar); return exceptions; }, {}); } function createHyphenator(patternsDefinition, options) { options = options || {}; var // asyncMode = keyOrDefault( options, SETTING_NAME_ASYNC, SETTING_DEFAULT_ASYNC ), caches = {}, debug = keyOrDefault( options, SETTING_NAME_DEBUG, SETTING_DEFAULT_DEBUG ), exceptions = {}, hyphenChar = keyOrDefault( options, SETTING_NAME_HYPH_CHAR, SETTING_DEFAULT_HYPH_CHAR ), patterns = patternsDefinition.patterns.map(preprocessPattern), minWordLength = keyOrDefault( options, SETTING_NAME_MIN_WORD_LENGTH, SETTING_DEFAULT_MIN_WORD_LENGTH ) >> 0, skipHTML = keyOrDefault( options, SETTING_NAME_HTML, SETTING_DEFAULT_HTML ); // Prepare cache var cacheKey = hyphenChar + minWordLength; exceptions[cacheKey] = exceptionsFromDefinition( patternsDefinition, hyphenChar ); caches[cacheKey] = cloneObj(exceptions[cacheKey]); if (asyncMode && !("Promise" in _global)) { throw new Error( "Failed to create hyphenator: Could not find global Promise object, needed for hyphenator to work in async mode" ); } return function (text, options) { options = options || {}; var localDebug = keyOrDefault( options, SETTING_NAME_DEBUG, debug ), localHyphenChar = keyOrDefault( options, SETTING_NAME_HYPH_CHAR, hyphenChar ), localMinWordLength = keyOrDefault( options, SETTING_NAME_MIN_WORD_LENGTH, minWordLength ) >> 0, cacheKey = localHyphenChar + localMinWordLength; if (!exceptions[cacheKey]) { exceptions[cacheKey] = exceptionsFromDefinition( patternsDefinition, localHyphenChar ); } if (!caches[cacheKey]) { caches[cacheKey] = cloneObj(exceptions[cacheKey]); } return start( text, patterns, caches[cacheKey], localDebug, localHyphenChar, skipHTML, localMinWordLength, asyncMode ); }; } function createTextChunkReader( text, hyphenChar, skipHTML, minWordLength ) { function readNextTextChunk() { var nextTextChunk = ""; shouldHyphenate = void 0; chunkReader: while (nextCharIndex <= text.length) { var // nextChar = text.charAt(nextCharIndex++), charIsLetter = !!nextChar && !/\s|[\!-\@\[-\`\{-\~\u2013-\u203C]/.test( nextChar ), charIsAngleOpen = nextChar === "<", charIsAngleClose = nextChar === ">", charIsHyphen = nextChar === hyphenChar; do { if (state === STATE_READ_TAG) { if (charIsAngleClose) { state = STATE_RETURN_UNTOUCHED; } break; } if (charIsHyphen) { shouldHyphenate = SHOULD_SKIP; state = STATE_READ_WORD; break; } if (charIsLetter) { state = STATE_READ_WORD; break; } if (state === STATE_READ_WORD) { state = STATE_RETURN_WORD; shouldHyphenate = shouldHyphenate || (nextTextChunk.length >= minWordLength && SHOULD_HYPHENATE); break; } shouldHyphenate = SHOULD_SKIP; state = STATE_RETURN_UNTOUCHED; } while (0); if ( charIsAngleOpen && state !== STATE_RETURN_WORD && skipHTML && !isSpacelike(text.charAt(nextCharIndex)) ) { shouldHyphenate = SHOULD_SKIP; state = STATE_READ_TAG; } switch (state) { case STATE_READ_TAG: nextTextChunk += nextChar; break; case STATE_READ_WORD: nextTextChunk += nextChar; break; case STATE_RETURN_UNTOUCHED: nextTextChunk += nextChar; break chunkReader; case STATE_RETURN_WORD: nextCharIndex--; break chunkReader; } } return nextTextChunk || void 0; } function shouldNextHyphenate() { return shouldHyphenate === SHOULD_HYPHENATE; } var isSpacelike = RegExp.prototype.test.bind(/\s/); var // nextCharIndex = 0, SHOULD_HYPHENATE = 1, SHOULD_SKIP = 2, shouldHyphenate, STATE_READ_TAG = 1, STATE_READ_WORD = 2, STATE_RETURN_UNTOUCHED = 3, STATE_RETURN_WORD = 4, state; return [readNextTextChunk, shouldNextHyphenate]; } function hyphenateWord(text, patterns, debug, hyphenChar) { var // levels = new Array(text.length + 1), loweredText = text.toLocaleLowerCase(), p = [], patternData, patternIndex = 0; for (var i = levels.length; i--; ) levels[i] = 0; while ((patternData = patterns[patternIndex++])) { var // fromChar = 0, endPattern = false; while (!endPattern) { var // patternEntityIndex = loweredText.indexOf( patternData.text, fromChar ), patternFits = patternEntityIndex > -1 && (patternData.stickToLeft ? patternEntityIndex === 0 : true) && (patternData.stickToRight ? patternEntityIndex + patternData.text.length === text.length : true); if (patternFits) { p.push( patternData.pattern + ">" + patternData.levels.join("") ); for ( var i = 0; i < patternData.levels.length; i++ ) levels[patternEntityIndex + i] = Math.max( patternData.levels[i], levels[patternEntityIndex + i] ); } if ( patternEntityIndex > -1 && patternData.text.length > 0 ) { fromChar = patternEntityIndex + patternData.text.length + 1; } else { endPattern = true; } } } levels[0] = levels[1] = levels[levels.length - 1] = levels[levels.length - 2] = 0; var // hyphenatedText = "", leveledText = "", debugHyphenatedText = ""; for (var i = 0; i < levels.length; i++) { hyphenatedText += (levels[i] % 2 === 1 ? hyphenChar : "") + text.charAt(i); debugHyphenatedText += (levels[i] % 2 === 1 ? "-" : "") + text.charAt(i); leveledText += (levels[i] > 0 ? levels[i] : "") + text.charAt(i); } if (debug) console.log.apply( console, [text, "->"] .concat(p) .concat(["->"]) .concat(levels) .concat(["->", leveledText]) .concat(["->", debugHyphenatedText]) ); return hyphenatedText; } function preprocessPattern(pattern) { var // patternCharIndex = 0, patternChar, patternData = { pattern: pattern, text: "", levels: [], stickToLeft: 0, stickToRight: 0, }, states = { alphabet: 1, level: 2, stickToLeft: 3, stickToRight: 4, }; while ((patternChar = pattern.charAt(patternCharIndex++))) { var // charIsDot = patternChar === ".", charIsNumber = !charIsDot && /\d/.test(patternChar), state = charIsDot ? patternCharIndex - 1 === 0 ? states.stickToLeft : states.stickToRight : charIsNumber ? states.level : states.alphabet; switch (state) { case states.alphabet: !prevCharIsNumber && patternData.levels.push(0); patternData.text += patternChar; break; case states.level: patternData.levels.push(parseInt(patternChar)); break; case states.stickToLeft: patternData.stickToLeft = true; break; case states.stickToRight: patternData.stickToRight = true; break; } var prevCharIsNumber = charIsNumber; } return patternData; } function start( text, patterns, cache, debug, hyphenChar, skipHTML, minWordLength, isAsync ) { function done() { allTime = new Date() - allTime; resolveNewText(newText); if (debug) { console.log( "----------------\nHyphenation stats: " + processedN + " text chunks processed, " + hyphenatedN + " words hyphenated" ); console.log("Work time: " + workTime / 1000); console.log( "Wait time: " + (allTime - workTime) / 1000 ); console.log("All time: " + allTime / 1000); } } var // cacheKey, newText = "", textChunk, reader = createTextChunkReader( text, hyphenChar, skipHTML, minWordLength ), readNextTextChunk = reader[0], shouldNextHyphenate = reader[1], processedN = 0, hyphenatedN = 0; var // allTime = new Date(), workTime = 0; var resolveNewText = function () {}; function nextTick() { var loopStart = new Date(); while ( (!isAsync || new Date() - loopStart < 10) && (textChunk = readNextTextChunk()) ) { cacheKey = textChunk.length ? "$" + textChunk : ""; if (shouldNextHyphenate()) { if (cache[cacheKey] === undefined) { cache[cacheKey] = hyphenateWord( textChunk, patterns, debug, hyphenChar ); } if (textChunk !== cache[cacheKey]) { hyphenatedN++; } textChunk = cache[cacheKey]; } newText += textChunk; processedN++; } workTime += new Date() - loopStart; if (!textChunk) { done(); } else { setTimeout(nextTick); } } if (isAsync) { setTimeout(nextTick); return new Promise(function (resolve) { resolveNewText = resolve; }); } else { nextTick(); return newText; } } return createHyphenator; }); /***/ }, /***/ 3202: /***/ function ( module, __unused_webpack_exports, __webpack_require__ ) { module.exports = __webpack_require__(4756); /***/ }, /***/ 1487: /***/ function (module, exports) { var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; (function (root, factory) { if (true) { // AMD. Register as an anonymous module. !((__WEBPACK_AMD_DEFINE_ARRAY__ = []), (__WEBPACK_AMD_DEFINE_FACTORY__ = factory), (__WEBPACK_AMD_DEFINE_RESULT__ = typeof __WEBPACK_AMD_DEFINE_FACTORY__ === "function" ? __WEBPACK_AMD_DEFINE_FACTORY__.apply( exports, __WEBPACK_AMD_DEFINE_ARRAY__ ) : __WEBPACK_AMD_DEFINE_FACTORY__), __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)); } else { } })(this, function () { var patterns = [], hyphenation = []; // title: Hyphenation patterns for American English // copyright: Copyright (C) 1990, 2004, 2005 Gerard D.C. Kuiken // notice: This file is part of the hyph-utf8 package. // See http://www.hyphenation.org/tex for more information. // language: // name: English, American spelling // tag: en-us // version: 2005-05-30 // authors: // - // name: Gerard D.C. Kuiken // licence: // text: > // Copying and distribution of this file, with or without modification, // are permitted in any medium without royalty provided the copyright // notice and this notice are preserved. // changes: // March 1, 1990 Initial release // May 30, 2005 Added copyright notice, no patterns change. // ========================================== // // ushyphmax.tex -- patterns for more hyphenation pattern memory (12000+). // Also known as ushyphen.max. // // Needs extended pattern memory. // Hyphenation trie becomes 7283 with 377 ops. // // These patterns are based on the Hyphenation Exception Log // published in TUGboat, Volume 10 (1989), No. 3, pp. 337-341, // and a large number of incorrectly hyphenated words not yet published. // If added to Liang's before the closing bracket } of \patterns, // the patterns run errorfree as far as known at this moment. // // These patterns find all admissible hyphens of the words in // the Exception Log. ushyph2.tex is a smaller set. // // Please send bugs or suggestions to tex-live (at) tug.org. // // 2005-05-30 (karl): in the past, ushyphmax.tex was a file containing // only the additional patterns, without the \patterns command, etc. // This turned out not to be very useful, since in practice the TeX // distributions need one self-contained file for a language. Therefore, // ushyphmax.tex now contains both the additional patterns from // Dr. Kuiken, and the original patterns and hyphenations from Knuth's // hyphen.tex. // // The Plain TeX hyphenation tables. var patterns = [ " ", // just type if you're not using INITEX ".ach4", ".ad4der", ".af1t", ".al3t", ".am5at", ".an5c", ".ang4", ".ani5m", ".ant4", ".an3te", ".anti5s", ".ar5s", ".ar4tie", ".ar4ty", ".as3c", ".as1p", ".as1s", ".aster5", ".atom5", ".au1d", ".av4i", ".awn4", ".ba4g", ".ba5na", ".bas4e", ".ber4", ".be5ra", ".be3sm", ".be5sto", ".bri2", ".but4ti", ".cam4pe", ".can5c", ".capa5b", ".car5ol", ".ca4t", ".ce4la", ".ch4", ".chill5i", ".ci2", ".cit5r", ".co3e", ".co4r", ".cor5ner", ".de4moi", ".de3o", ".de3ra", ".de3ri", ".des4c", ".dictio5", ".do4t", ".du4c", ".dumb5", ".earth5", ".eas3i", ".eb4", ".eer4", ".eg2", ".el5d", ".el3em", ".enam3", ".en3g", ".en3s", ".eq5ui5t", ".er4ri", ".es3", ".eu3", ".eye5", ".fes3", ".for5mer", ".ga2", ".ge2", ".gen3t4", ".ge5og", ".gi5a", ".gi4b", ".go4r", ".hand5i", ".han5k", ".he2", ".hero5i", ".hes3", ".het3", ".hi3b", ".hi3er", ".hon5ey", ".hon3o", ".hov5", ".id4l", ".idol3", ".im3m", ".im5pin", ".in1", ".in3ci", ".ine2", ".in2k", ".in3s", ".ir5r", ".is4i", ".ju3r", ".la4cy", ".la4m", ".lat5er", ".lath5", ".le2", ".leg5e", ".len4", ".lep5", ".lev1", ".li4g", ".lig5a", ".li2n", ".li3o", ".li4t", ".mag5a5", ".mal5o", ".man5a", ".mar5ti", ".me2", ".mer3c", ".me5ter", ".mis1", ".mist5i", ".mon3e", ".mo3ro", ".mu5ta", ".muta5b", ".ni4c", ".od2", ".odd5", ".of5te", ".or5ato", ".or3c", ".or1d", ".or3t", ".os3", ".os4tl", ".oth3", ".out3", ".ped5al", ".pe5te", ".pe5tit", ".pi4e", ".pio5n", ".pi2t", ".pre3m", ".ra4c", ".ran4t", ".ratio5na", ".ree2", ".re5mit", ".res2", ".re5stat", ".ri4g", ".rit5u", ".ro4q", ".ros5t", ".row5d", ".ru4d", ".sci3e", ".self5", ".sell5", ".se2n", ".se5rie", ".sh2", ".si2", ".sing4", ".st4", ".sta5bl", ".sy2", ".ta4", ".te4", ".ten5an", ".th2", ".ti2", ".til4", ".tim5o5", ".ting4", ".tin5k", ".ton4a", ".to4p", ".top5i", ".tou5s", ".trib5ut", ".un1a", ".un3ce", ".under5", ".un1e", ".un5k", ".un5o", ".un3u", ".up3", ".ure3", ".us5a", ".ven4de", ".ve5ra", ".wil5i", ".ye4", "4ab.", "a5bal", "a5ban", "abe2", "ab5erd", "abi5a", "ab5it5ab", "ab5lat", "ab5o5liz", "4abr", "ab5rog", "ab3ul", "a4car", "ac5ard", "ac5aro", "a5ceou", "ac1er", "a5chet", "4a2ci", "a3cie", "ac1in", "a3cio", "ac5rob", "act5if", "ac3ul", "ac4um", "a2d", "ad4din", "ad5er.", "2adi", "a3dia", "ad3ica", "adi4er", "a3dio", "a3dit", "a5diu", "ad4le", "ad3ow", "ad5ran", "ad4su", "4adu", "a3duc", "ad5um", "ae4r", "aeri4e", "a2f", "aff4", "a4gab", "aga4n", "ag5ell", "age4o", "4ageu", "ag1i", "4ag4l", "ag1n", "a2go", "3agog", "ag3oni", "a5guer", "ag5ul", "a4gy", "a3ha", "a3he", "ah4l", "a3ho", "ai2", "a5ia", "a3ic.", "ai5ly", "a4i4n", "ain5in", "ain5o", "ait5en", "a1j", "ak1en", "al5ab", "al3ad", "a4lar", "4aldi", "2ale", "al3end", "a4lenti", "a5le5o", "al1i", "al4ia.", "ali4e", "al5lev", "4allic", "4alm", "a5log.", "a4ly.", "4alys", "5a5lyst", "5alyt", "3alyz", "4ama", "am5ab", "am3ag", "ama5ra", "am5asc", "a4matis", "a4m5ato", "am5era", "am3ic", "am5if", "am5ily", "am1in", "ami4no", "a2mo", "a5mon", "amor5i", "amp5en", "a2n", "an3age", "3analy", "a3nar", "an3arc", "anar4i", "a3nati", "4and", "ande4s", "an3dis", "an1dl", "an4dow", "a5nee", "a3nen", "an5est.", "a3neu", "2ang", "ang5ie", "an1gl", "a4n1ic", "a3nies", "an3i3f", "an4ime", "a5nimi", "a5nine", "an3io", "a3nip", "an3ish", "an3it", "a3niu", "an4kli", "5anniz", "ano4", "an5ot", "anoth5", "an2sa", "an4sco", "an4sn", "an2sp", "ans3po", "an4st", "an4sur", "antal4", "an4tie", "4anto", "an2tr", "an4tw", "an3ua", "an3ul", "a5nur", "4ao", "apar4", "ap5at", "ap5ero", "a3pher", "4aphi", "a4pilla", "ap5illar", "ap3in", "ap3ita", "a3pitu", "a2pl", "apoc5", "ap5ola", "apor5i", "apos3t", "aps5es", "a3pu", "aque5", "2a2r", "ar3act", "a5rade", "ar5adis", "ar3al", "a5ramete", "aran4g", "ara3p", "ar4at", "a5ratio", "ar5ativ", "a5rau", "ar5av4", "araw4", "arbal4", "ar4chan", "ar5dine", "ar4dr", "ar5eas", "a3ree", "ar3ent", "a5ress", "ar4fi", "ar4fl", "ar1i", "ar5ial", "ar3ian", "a3riet", "ar4im", "ar5inat", "ar3io", "ar2iz", "ar2mi", "ar5o5d", "a5roni", "a3roo", "ar2p", "ar3q", "arre4", "ar4sa", "ar2sh", "4as.", "as4ab", "as3ant", "ashi4", "a5sia.", "a3sib", "a3sic", "5a5si4t", "ask3i", "as4l", "a4soc", "as5ph", "as4sh", "as3ten", "as1tr", "asur5a", "a2ta", "at3abl", "at5ac", "at3alo", "at5ap", "ate5c", "at5ech", "at3ego", "at3en.", "at3era", "ater5n", "a5terna", "at3est", "at5ev", "4ath", "ath5em", "a5then", "at4ho", "ath5om", "4ati.", "a5tia", "at5i5b", "at1ic", "at3if", "ation5ar", "at3itu", "a4tog", "a2tom", "at5omiz", "a4top", "a4tos", "a1tr", "at5rop", "at4sk", "at4tag", "at5te", "at4th", "a2tu", "at5ua", "at5ue", "at3ul", "at3ura", "a2ty", "au4b", "augh3", "au3gu", "au4l2", "aun5d", "au3r", "au5sib", "aut5en", "au1th", "a2va", "av3ag", "a5van", "ave4no", "av3era", "av5ern", "av5ery", "av1i", "avi4er", "av3ig", "av5oc", "a1vor", "3away", "aw3i", "aw4ly", "aws4", "ax4ic", "ax4id", "ay5al", "aye4", "ays4", "azi4er", "azz5i", "5ba.", "bad5ger", "ba4ge", "bal1a", "ban5dag", "ban4e", "ban3i", "barbi5", "bari4a", "bas4si", "1bat", "ba4z", "2b1b", "b2be", "b3ber", "bbi4na", "4b1d", "4be.", "beak4", "beat3", "4be2d", "be3da", "be3de", "be3di", "be3gi", "be5gu", "1bel", "be1li", "be3lo", "4be5m", "be5nig", "be5nu", "4bes4", "be3sp", "be5str", "3bet", "bet5iz", "be5tr", "be3tw", "be3w", "be5yo", "2bf", "4b3h", "bi2b", "bi4d", "3bie", "bi5en", "bi4er", "2b3if", "1bil", "bi3liz", "bina5r4", "bin4d", "bi5net", "bi3ogr", "bi5ou", "bi2t", "3bi3tio", "bi3tr", "3bit5ua", "b5itz", "b1j", "bk4", "b2l2", "blath5", "b4le.", "blen4", "5blesp", "b3lis", "b4lo", "blun4t", "4b1m", "4b3n", "bne5g", "3bod", "bod3i", "bo4e", "bol3ic", "bom4bi", "bon4a", "bon5at", "3boo", "5bor.", "4b1ora", "bor5d", "5bore", "5bori", "5bos4", "b5ota", "both5", "bo4to", "bound3", "4bp", "4brit", "broth3", "2b5s2", "bsor4", "2bt", "bt4l", "b4to", "b3tr", "buf4fer", "bu4ga", "bu3li", "bumi4", "bu4n", "bunt4i", "bu3re", "bus5ie", "buss4e", "5bust", "4buta", "3butio", "b5uto", "b1v", "4b5w", "5by.", "bys4", "1ca", "cab3in", "ca1bl", "cach4", "ca5den", "4cag4", "2c5ah", "ca3lat", "cal4la", "call5in", "4calo", "can5d", "can4e", "can4ic", "can5is", "can3iz", "can4ty", "cany4", "ca5per", "car5om", "cast5er", "cas5tig", "4casy", "ca4th", "4cativ", "cav5al", "c3c", "ccha5", "cci4a", "ccompa5", "ccon4", "ccou3t", "2ce.", "4ced.", "4ceden", "3cei", "5cel.", "3cell", "1cen", "3cenc", "2cen4e", "4ceni", "3cent", "3cep", "ce5ram", "4cesa", "3cessi", "ces5si5b", "ces5t", "cet4", "c5e4ta", "cew4", "2ch", "4ch.", "4ch3ab", "5chanic", "ch5a5nis", "che2", "cheap3", "4ched", "che5lo", "3chemi", "ch5ene", "ch3er.", "ch3ers", "4ch1in", "5chine.", "ch5iness", "5chini", "5chio", "3chit", "chi2z", "3cho2", "ch4ti", "1ci", "3cia", "ci2a5b", "cia5r", "ci5c", "4cier", "5cific.", "4cii", "ci4la", "3cili", "2cim", "2cin", "c4ina", "3cinat", "cin3em", "c1ing", "c5ing.", "5cino", "cion4", "4cipe", "ci3ph", "4cipic", "4cista", "4cisti", "2c1it", "cit3iz", "5ciz", "ck1", "ck3i", "1c4l4", "4clar", "c5laratio", "5clare", "cle4m", "4clic", "clim4", "cly4", "c5n", "1co", "co5ag", "coe2", "2cog", "co4gr", "coi4", "co3inc", "col5i", "5colo", "col3or", "com5er", "con4a", "c4one", "con3g", "con5t", "co3pa", "cop3ic", "co4pl", "4corb", "coro3n", "cos4e", "cov1", "cove4", "cow5a", "coz5e", "co5zi", "c1q", "cras5t", "5crat.", "5cratic", "cre3at", "5cred", "4c3reta", "cre4v", "cri2", "cri5f", "c4rin", "cris4", "5criti", "cro4pl", "crop5o", "cros4e", "cru4d", "4c3s2", "2c1t", "cta4b", "ct5ang", "c5tant", "c2te", "c3ter", "c4ticu", "ctim3i", "ctu4r", "c4tw", "cud5", "c4uf", "c4ui", "cu5ity", "5culi", "cul4tis", "3cultu", "cu2ma", "c3ume", "cu4mi", "3cun", "cu3pi", "cu5py", "cur5a4b", "cu5ria", "1cus", "cuss4i", "3c4ut", "cu4tie", "4c5utiv", "4cutr", "1cy", "cze4", "1d2a", "5da.", "2d3a4b", "dach4", "4daf", "2dag", "da2m2", "dan3g", "dard5", "dark5", "4dary", "3dat", "4dativ", "4dato", "5dav4", "dav5e", "5day", "d1b", "d5c", "d1d4", "2de.", "deaf5", "deb5it", "de4bon", "decan4", "de4cil", "de5com", "2d1ed", "4dee.", "de5if", "deli4e", "del5i5q", "de5lo", "d4em", "5dem.", "3demic", "dem5ic.", "de5mil", "de4mons", "demor5", "1den", "de4nar", "de3no", "denti5f", "de3nu", "de1p", "de3pa", "depi4", "de2pu", "d3eq", "d4erh", "5derm", "dern5iz", "der5s", "des2", "d2es.", "de1sc", "de2s5o", "des3ti", "de3str", "de4su", "de1t", "de2to", "de1v", "dev3il", "4dey", "4d1f", "d4ga", "d3ge4t", "dg1i", "d2gy", "d1h2", "5di.", "1d4i3a", "dia5b", "di4cam", "d4ice", "3dict", "3did", "5di3en", "d1if", "di3ge", "di4lato", "d1in", "1dina", "3dine.", "5dini", "di5niz", "1dio", "dio5g", "di4pl", "dir2", "di1re", "dirt5i", "dis1", "5disi", "d4is3t", "d2iti", "1di1v", "d1j", "d5k2", "4d5la", "3dle.", "3dled", "3dles.", "4dless", "2d3lo", "4d5lu", "2dly", "d1m", "4d1n4", "1do", "3do.", "do5de", "5doe", "2d5of", "d4og", "do4la", "doli4", "do5lor", "dom5iz", "do3nat", "doni4", "doo3d", "dop4p", "d4or", "3dos", "4d5out", "do4v", "3dox", "d1p", "1dr", "drag5on", "4drai", "dre4", "drea5r", "5dren", "dri4b", "dril4", "dro4p", "4drow", "5drupli", "4dry", "2d1s2", "ds4p", "d4sw", "d4sy", "d2th", "1du", "d1u1a", "du2c", "d1uca", "duc5er", "4duct.", "4ducts", "du5el", "du4g", "d3ule", "dum4be", "du4n", "4dup", "du4pe", "d1v", "d1w", "d2y", "5dyn", "dy4se", "dys5p", "e1a4b", "e3act", "ead1", "ead5ie", "ea4ge", "ea5ger", "ea4l", "eal5er", "eal3ou", "eam3er", "e5and", "ear3a", "ear4c", "ear5es", "ear4ic", "ear4il", "ear5k", "ear2t", "eart3e", "ea5sp", "e3ass", "east3", "ea2t", "eat5en", "eath3i", "e5atif", "e4a3tu", "ea2v", "eav3en", "eav5i", "eav5o", "2e1b", "e4bel.", "e4bels", "e4ben", "e4bit", "e3br", "e4cad", "ecan5c", "ecca5", "e1ce", "ec5essa", "ec2i", "e4cib", "ec5ificat", "ec5ifie", "ec5ify", "ec3im", "eci4t", "e5cite", "e4clam", "e4clus", "e2col", "e4comm", "e4compe", "e4conc", "e2cor", "ec3ora", "eco5ro", "e1cr", "e4crem", "ec4tan", "ec4te", "e1cu", "e4cul", "ec3ula", "2e2da", "4ed3d", "e4d1er", "ede4s", "4edi", "e3dia", "ed3ib", "ed3ica", "ed3im", "ed1it", "edi5z", "4edo", "e4dol", "edon2", "e4dri", "e4dul", "ed5ulo", "ee2c", "eed3i", "ee2f", "eel3i", "ee4ly", "ee2m", "ee4na", "ee4p1", "ee2s4", "eest4", "ee4ty", "e5ex", "e1f", "e4f3ere", "1eff", "e4fic", "5efici", "efil4", "e3fine", "ef5i5nite", "3efit", "efor5es", "e4fuse.", "4egal", "eger4", "eg5ib", "eg4ic", "eg5ing", "e5git5", "eg5n", "e4go.", "e4gos", "eg1ul", "e5gur", "5egy", "e1h4", "eher4", "ei2", "e5ic", "ei5d", "eig2", "ei5gl", "e3imb", "e3inf", "e1ing", "e5inst", "eir4d", "eit3e", "ei3th", "e5ity", "e1j", "e4jud", "ej5udi", "eki4n", "ek4la", "e1la", "e4la.", "e4lac", "elan4d", "el5ativ", "e4law", "elaxa4", "e3lea", "el5ebra", "5elec", "e4led", "el3ega", "e5len", "e4l1er", "e1les", "el2f", "el2i", "e3libe", "e4l5ic.", "el3ica", "e3lier", "el5igib", "e5lim", "e4l3ing", "e3lio", "e2lis", "el5ish", "e3liv3", "4ella", "el4lab", "ello4", "e5loc", "el5og", "el3op.", "el2sh", "el4ta", "e5lud", "el5ug", "e4mac", "e4mag", "e5man", "em5ana", "em5b", "e1me", "e2mel", "e4met", "em3ica", "emi4e", "em5igra", "em1in2", "em5ine", "em3i3ni", "e4mis", "em5ish", "e5miss", "em3iz", "5emniz", "emo4g", "emoni5o", "em3pi", "e4mul", "em5ula", "emu3n", "e3my", "en5amo", "e4nant", "ench4er", "en3dic", "e5nea", "e5nee", "en3em", "en5ero", "en5esi", "en5est", "en3etr", "e3new", "en5ics", "e5nie", "e5nil", "e3nio", "en3ish", "en3it", "e5niu", "5eniz", "4enn", "4eno", "eno4g", "e4nos", "en3ov", "en4sw", "ent5age", "4enthes", "en3ua", "en5uf", "e3ny.", "4en3z", "e5of", "eo2g", "e4oi4", "e3ol", "eop3ar", "e1or", "eo3re", "eo5rol", "eos4", "e4ot", "eo4to", "e5out", "e5ow", "e2pa", "e3pai", "ep5anc", "e5pel", "e3pent", "ep5etitio", "ephe4", "e4pli", "e1po", "e4prec", "ep5reca", "e4pred", "ep3reh", "e3pro", "e4prob", "ep4sh", "ep5ti5b", "e4put", "ep5uta", "e1q", "equi3l", "e4q3ui3s", "er1a", "era4b", "4erand", "er3ar", "4erati.", "2erb", "er4bl", "er3ch", "er4che", "2ere.", "e3real", "ere5co", "ere3in", "er5el.", "er3emo", "er5ena", "er5ence", "4erene", "er3ent", "ere4q", "er5ess", "er3est", "eret4", "er1h", "er1i", "e1ria4", "5erick", "e3rien", "eri4er", "er3ine", "e1rio", "4erit", "er4iu", "eri4v", "e4riva", "er3m4", "er4nis", "4ernit", "5erniz", "er3no", "2ero", "er5ob", "e5roc", "ero4r", "er1ou", "er1s", "er3set", "ert3er", "4ertl", "er3tw", "4eru", "eru4t", "5erwau", "e1s4a", "e4sage.", "e4sages", "es2c", "e2sca", "es5can", "e3scr", "es5cu", "e1s2e", "e2sec", "es5ecr", "es5enc", "e4sert.", "e4serts", "e4serva", "4esh", "e3sha", "esh5en", "e1si", "e2sic", "e2sid", "es5iden", "es5igna", "e2s5im", "es4i4n", "esis4te", "esi4u", "e5skin", "es4mi", "e2sol", "es3olu", "e2son", "es5ona", "e1sp", "es3per", "es5pira", "es4pre", "2ess", "es4si4b", "estan4", "es3tig", "es5tim", "4es2to", "e3ston", "2estr", "e5stro", "estruc5", "e2sur", "es5urr", "es4w", "eta4b", "eten4d", "e3teo", "ethod3", "et1ic", "e5tide", "etin4", "eti4no", "e5tir", "e5titio", "et5itiv", "4etn", "et5ona", "e3tra", "e3tre", "et3ric", "et5rif", "et3rog", "et5ros", "et3ua", "et5ym", "et5z", "4eu", "e5un", "e3up", "eu3ro", "eus4", "eute4", "euti5l", "eu5tr", "eva2p5", "e2vas", "ev5ast", "e5vea", "ev3ell", "evel3o", "e5veng", "even4i", "ev1er", "e5verb", "e1vi", "ev3id", "evi4l", "e4vin", "evi4v", "e5voc", "e5vu", "e1wa", "e4wag", "e5wee", "e3wh", "ewil5", "ew3ing", "e3wit", "1exp", "5eyc", "5eye.", "eys4", "1fa", "fa3bl", "fab3r", "fa4ce", "4fag", "fain4", "fall5e", "4fa4ma", "fam5is", "5far", "far5th", "fa3ta", "fa3the", "4fato", "fault5", "4f5b", "4fd", "4fe.", "feas4", "feath3", "fe4b", "4feca", "5fect", "2fed", "fe3li", "fe4mo", "fen2d", "fend5e", "fer1", "5ferr", "fev4", "4f1f", "f4fes", "f4fie", "f5fin.", "f2f5is", "f4fly", "f2fy", "4fh", "1fi", "fi3a", "2f3ic.", "4f3ical", "f3ican", "4ficate", "f3icen", "fi3cer", "fic4i", "5ficia", "5ficie", "4fics", "fi3cu", "fi5del", "fight5", "fil5i", "fill5in", "4fily", "2fin", "5fina", "fin2d5", "fi2ne", "f1in3g", "fin4n", "fis4ti", "f4l2", "f5less", "flin4", "flo3re", "f2ly5", "4fm", "4fn", "1fo", "5fon", "fon4de", "fon4t", "fo2r", "fo5rat", "for5ay", "fore5t", "for4i", "fort5a", "fos5", "4f5p", "fra4t", "f5rea", "fres5c", "fri2", "fril4", "frol5", "2f3s", "2ft", "f4to", "f2ty", "3fu", "fu5el", "4fug", "fu4min", "fu5ne", "fu3ri", "fusi4", "fus4s", "4futa", "1fy", "1ga", "gaf4", "5gal.", "3gali", "ga3lo", "2gam", "ga5met", "g5amo", "gan5is", "ga3niz", "gani5za", "4gano", "gar5n4", "gass4", "gath3", "4gativ", "4gaz", "g3b", "gd4", "2ge.", "2ged", "geez4", "gel4in", "ge5lis", "ge5liz", "4gely", "1gen", "ge4nat", "ge5niz", "4geno", "4geny", "1geo", "ge3om", "g4ery", "5gesi", "geth5", "4geto", "ge4ty", "ge4v", "4g1g2", "g2ge", "g3ger", "gglu5", "ggo4", "gh3in", "gh5out", "gh4to", "5gi.", "1gi4a", "gia5r", "g1ic", "5gicia", "g4ico", "gien5", "5gies.", "gil4", "g3imen", "3g4in.", "gin5ge", "5g4ins", "5gio", "3gir", "gir4l", "g3isl", "gi4u", "5giv", "3giz", "gl2", "gla4", "glad5i", "5glas", "1gle", "gli4b", "g3lig", "3glo", "glo3r", "g1m", "g4my", "gn4a", "g4na.", "gnet4t", "g1ni", "g2nin", "g4nio", "g1no", "g4non", "1go", "3go.", "gob5", "5goe", "3g4o4g", "go3is", "gon2", "4g3o3na", "gondo5", "go3ni", "5goo", "go5riz", "gor5ou", "5gos.", "gov1", "g3p", "1gr", "4grada", "g4rai", "gran2", "5graph.", "g5rapher", "5graphic", "4graphy", "4gray", "gre4n", "4gress.", "4grit", "g4ro", "gruf4", "gs2", "g5ste", "gth3", "gu4a", "3guard", "2gue", "5gui5t", "3gun", "3gus", "4gu4t", "g3w", "1gy", "2g5y3n", "gy5ra", "h3ab4l", "hach4", "hae4m", "hae4t", "h5agu", "ha3la", "hala3m", "ha4m", "han4ci", "han4cy", "5hand.", "han4g", "hang5er", "hang5o", "h5a5niz", "han4k", "han4te", "hap3l", "hap5t", "ha3ran", "ha5ras", "har2d", "hard3e", "har4le", "harp5en", "har5ter", "has5s", "haun4", "5haz", "haz3a", "h1b", "1head", "3hear", "he4can", "h5ecat", "h4ed", "he5do5", "he3l4i", "hel4lis", "hel4ly", "h5elo", "hem4p", "he2n", "hena4", "hen5at", "heo5r", "hep5", "h4era", "hera3p", "her4ba", "here5a", "h3ern", "h5erou", "h3ery", "h1es", "he2s5p", "he4t", "het4ed", "heu4", "h1f", "h1h", "hi5an", "hi4co", "high5", "h4il2", "himer4", "h4ina", "hion4e", "hi4p", "hir4l", "hi3ro", "hir4p", "hir4r", "his3el", "his4s", "hith5er", "hi2v", "4hk", "4h1l4", "hlan4", "h2lo", "hlo3ri", "4h1m", "hmet4", "2h1n", "h5odiz", "h5ods", "ho4g", "hoge4", "hol5ar", "3hol4e", "ho4ma", "home3", "hon4a", "ho5ny", "3hood", "hoon4", "hor5at", "ho5ris", "hort3e", "ho5ru", "hos4e", "ho5sen", "hos1p", "1hous", "house3", "hov5el", "4h5p", "4hr4", "hree5", "hro5niz", "hro3po", "4h1s2", "h4sh", "h4tar", "ht1en", "ht5es", "h4ty", "hu4g", "hu4min", "hun5ke", "hun4t", "hus3t4", "hu4t", "h1w", "h4wart", "hy3pe", "hy3ph", "hy2s", "2i1a", "i2al", "iam4", "iam5ete", "i2an", "4ianc", "ian3i", "4ian4t", "ia5pe", "iass4", "i4ativ", "ia4tric", "i4atu", "ibe4", "ib3era", "ib5ert", "ib5ia", "ib3in", "ib5it.", "ib5ite", "i1bl", "ib3li", "i5bo", "i1br", "i2b5ri", "i5bun", "4icam", "5icap", "4icar", "i4car.", "i4cara", "icas5", "i4cay", "iccu4", "4iceo", "4ich", "2ici", "i5cid", "ic5ina", "i2cip", "ic3ipa", "i4cly", "i2c5oc", "4i1cr", "5icra", "i4cry", "ic4te", "ictu2", "ic4t3ua", "ic3ula", "ic4um", "ic5uo", "i3cur", "2id", "i4dai", "id5anc", "id5d", "ide3al", "ide4s", "i2di", "id5ian", "idi4ar", "i5die", "id3io", "idi5ou", "id1it", "id5iu", "i3dle", "i4dom", "id3ow", "i4dr", "i2du", "id5uo", "2ie4", "ied4e", "5ie5ga", "ield3", "ien5a4", "ien4e", "i5enn", "i3enti", "i1er.", "i3esc", "i1est", "i3et", "4if.", "if5ero", "iff5en", "if4fr", "4ific.", "i3fie", "i3fl", "4ift", "2ig", "iga5b", "ig3era", "ight3i", "4igi", "i3gib", "ig3il", "ig3in", "ig3it", "i4g4l", "i2go", "ig3or", "ig5ot", "i5gre", "igu5i", "ig1ur", "i3h", "4i5i4", "i3j", "4ik", "i1la", "il3a4b", "i4lade", "i2l5am", "ila5ra", "i3leg", "il1er", "ilev4", "il5f", "il1i", "il3ia", "il2ib", "il3io", "il4ist", "2ilit", "il2iz", "ill5ab", "4iln", "il3oq", "il4ty", "il5ur", "il3v", "i4mag", "im3age", "ima5ry", "imenta5r", "4imet", "im1i", "im5ida", "imi5le", "i5mini", "4imit", "im4ni", "i3mon", "i2mu", "im3ula", "2in.", "i4n3au", "4inav", "incel4", "in3cer", "4ind", "in5dling", "2ine", "i3nee", "iner4ar", "i5ness", "4inga", "4inge", "in5gen", "4ingi", "in5gling", "4ingo", "4ingu", "2ini", "i5ni.", "i4nia", "in3io", "in1is", "i5nite.", "5initio", "in3ity", "4ink", "4inl", "2inn", "2i1no", "i4no4c", "ino4s", "i4not", "2ins", "in3se", "insur5a", "2int.", "2in4th", "in1u", "i5nus", "4iny", "2io", "4io.", "ioge4", "io2gr", "i1ol", "io4m", "ion3at", "ion4ery", "ion3i", "io5ph", "ior3i", "i4os", "io5th", "i5oti", "io4to", "i4our", "2ip", "ipe4", "iphras4", "ip3i", "ip4ic", "ip4re4", "ip3ul", "i3qua", "iq5uef", "iq3uid", "iq3ui3t", "4ir", "i1ra", "ira4b", "i4rac", "ird5e", "ire4de", "i4ref", "i4rel4", "i4res", "ir5gi", "ir1i", "iri5de", "ir4is", "iri3tu", "5i5r2iz", "ir4min", "iro4g", "5iron.", "ir5ul", "2is.", "is5ag", "is3ar", "isas5", "2is1c", "is3ch", "4ise", "is3er", "3isf", "is5han", "is3hon", "ish5op", "is3ib", "isi4d", "i5sis", "is5itiv", "4is4k", "islan4", "4isms", "i2so", "iso5mer", "is1p", "is2pi", "is4py", "4is1s", "is4sal", "issen4", "is4ses", "is4ta.", "is1te", "is1ti", "ist4ly", "4istral", "i2su", "is5us", "4ita.", "ita4bi", "i4tag", "4ita5m", "i3tan", "i3tat", "2ite", "it3era", "i5teri", "it4es", "2ith", "i1ti", "4itia", "4i2tic", "it3ica", "5i5tick", "it3ig", "it5ill", "i2tim", "2itio", "4itis", "i4tism", "i2t5o5m", "4iton", "i4tram", "it5ry", "4itt", "it3uat", "i5tud", "it3ul", "4itz.", "i1u", "2iv", "iv3ell", "iv3en.", "i4v3er.", "i4vers.", "iv5il.", "iv5io", "iv1it", "i5vore", "iv3o3ro", "i4v3ot", "4i5w", "ix4o", "4iy", "4izar", "izi4", "5izont", "5ja", "jac4q", "ja4p", "1je", "jer5s", "4jestie", "4jesty", "jew3", "jo4p", "5judg", "3ka.", "k3ab", "k5ag", "kais4", "kal4", "k1b", "k2ed", "1kee", "ke4g", "ke5li", "k3en4d", "k1er", "kes4", "k3est.", "ke4ty", "k3f", "kh4", "k1i", "5ki.", "5k2ic", "k4ill", "kilo5", "k4im", "k4in.", "kin4de", "k5iness", "kin4g", "ki4p", "kis4", "k5ish", "kk4", "k1l", "4kley", "4kly", "k1m", "k5nes", "1k2no", "ko5r", "kosh4", "k3ou", "kro5n", "4k1s2", "k4sc", "ks4l", "k4sy", "k5t", "k1w", "lab3ic", "l4abo", "laci4", "l4ade", "la3dy", "lag4n", "lam3o", "3land", "lan4dl", "lan5et", "lan4te", "lar4g", "lar3i", "las4e", "la5tan", "4lateli", "4lativ", "4lav", "la4v4a", "2l1b", "lbin4", "4l1c2", "lce4", "l3ci", "2ld", "l2de", "ld4ere", "ld4eri", "ldi4", "ld5is", "l3dr", "l4dri", "le2a", "le4bi", "left5", "5leg.", "5legg", "le4mat", "lem5atic", "4len.", "3lenc", "5lene.", "1lent", "le3ph", "le4pr", "lera5b", "ler4e", "3lerg", "3l4eri", "l4ero", "les2", "le5sco", "5lesq", "3less", "5less.", "l3eva", "lev4er.", "lev4era", "lev4ers", "3ley", "4leye", "2lf", "l5fr", "4l1g4", "l5ga", "lgar3", "l4ges", "lgo3", "2l3h", "li4ag", "li2am", "liar5iz", "li4as", "li4ato", "li5bi", "5licio", "li4cor", "4lics", "4lict.", "l4icu", "l3icy", "l3ida", "lid5er", "3lidi", "lif3er", "l4iff", "li4fl", "5ligate", "3ligh", "li4gra", "3lik", "4l4i4l", "lim4bl", "lim3i", "li4mo", "l4im4p", "l4ina", "1l4ine", "lin3ea", "lin3i", "link5er", "li5og", "4l4iq", "lis4p", "l1it", "l2it.", "5litica", "l5i5tics", "liv3er", "l1iz", "4lj", "lka3", "l3kal", "lka4t", "l1l", "l4law", "l2le", "l5lea", "l3lec", "l3leg", "l3lel", "l3le4n", "l3le4t", "ll2i", "l2lin4", "l5lina", "ll4o", "lloqui5", "ll5out", "l5low", "2lm", "l5met", "lm3ing", "l4mod", "lmon4", "2l1n2", "3lo.", "lob5al", "lo4ci", "4lof", "3logic", "l5ogo", "3logu", "lom3er", "5long", "lon4i", "l3o3niz", "lood5", "5lope.", "lop3i", "l3opm", "lora4", "lo4rato", "lo5rie", "lor5ou", "5los.", "los5et", "5losophiz", "5losophy", "los4t", "lo4ta", "loun5d", "2lout", "4lov", "2lp", "lpa5b", "l3pha", "l5phi", "lp5ing", "l3pit", "l4pl", "l5pr", "4l1r", "2l1s2", "l4sc", "l2se", "l4sie", "4lt", "lt5ag", "ltane5", "l1te", "lten4", "ltera4", "lth3i", "l5ties.", "ltis4", "l1tr", "ltu2", "ltur3a", "lu5a", "lu3br", "luch4", "lu3ci", "lu3en", "luf4", "lu5id", "lu4ma", "5lumi", "l5umn.", "5lumnia", "lu3o", "luo3r", "4lup", "luss4", "lus3te", "1lut", "l5ven", "l5vet4", "2l1w", "1ly", "4lya", "4lyb", "ly5me", "ly3no", "2lys4", "l5yse", "1ma", "2mab", "ma2ca", "ma5chine", "ma4cl", "mag5in", "5magn", "2mah", "maid5", "4mald", "ma3lig", "ma5lin", "mal4li", "mal4ty", "5mania", "man5is", "man3iz", "4map", "ma5rine.", "ma5riz", "mar4ly", "mar3v", "ma5sce", "mas4e", "mas1t", "5mate", "math3", "ma3tis", "4matiza", "4m1b", "mba4t5", "m5bil", "m4b3ing", "mbi4v", "4m5c", "4me.", "2med", "4med.", "5media", "me3die", "m5e5dy", "me2g", "mel5on", "mel4t", "me2m", "mem1o3", "1men", "men4a", "men5ac", "men4de", "4mene", "men4i", "mens4", "mensu5", "3ment", "men4te", "me5on", "m5ersa", "2mes", "3mesti", "me4ta", "met3al", "me1te", "me5thi", "m4etr", "5metric", "me5trie", "me3try", "me4v", "4m1f", "2mh", "5mi.", "mi3a", "mid4a", "mid4g", "mig4", "3milia", "m5i5lie", "m4ill", "min4a", "3mind", "m5inee", "m4ingl", "min5gli", "m5ingly", "min4t", "m4inu", "miot4", "m2is", "mis4er.", "mis5l", "mis4ti", "m5istry", "4mith", "m2iz", "4mk", "4m1l", "m1m", "mma5ry", "4m1n", "mn4a", "m4nin", "mn4o", "1mo", "4mocr", "5mocratiz", "mo2d1", "mo4go", "mois2", "moi5se", "4mok", "mo5lest", "mo3me", "mon5et", "mon5ge", "moni3a", "mon4ism", "mon4ist", "mo3niz", "monol4", "mo3ny.", "mo2r", "4mora.", "mos2", "mo5sey", "mo3sp", "moth3", "m5ouf", "3mous", "mo2v", "4m1p", "mpara5", "mpa5rab", "mpar5i", "m3pet", "mphas4", "m2pi", "mpi4a", "mp5ies", "m4p1in", "m5pir", "mp5is", "mpo3ri", "mpos5ite", "m4pous", "mpov5", "mp4tr", "m2py", "4m3r", "4m1s2", "m4sh", "m5si", "4mt", "1mu", "mula5r4", "5mult", "multi3", "3mum", "mun2", "4mup", "mu4u", "4mw", "1na", "2n1a2b", "n4abu", "4nac.", "na4ca", "n5act", "nag5er.", "nak4", "na4li", "na5lia", "4nalt", "na5mit", "n2an", "nanci4", "nan4it", "nank4", "nar3c", "4nare", "nar3i", "nar4l", "n5arm", "n4as", "nas4c", "nas5ti", "n2at", "na3tal", "nato5miz", "n2au", "nau3se", "3naut", "nav4e", "4n1b4", "ncar5", "n4ces.", "n3cha", "n5cheo", "n5chil", "n3chis", "nc1in", "nc4it", "ncour5a", "n1cr", "n1cu", "n4dai", "n5dan", "n1de", "nd5est.", "ndi4b", "n5d2if", "n1dit", "n3diz", "n5duc", "ndu4r", "nd2we", "2ne.", "n3ear", "ne2b", "neb3u", "ne2c", "5neck", "2ned", "ne4gat", "neg5ativ", "5nege", "ne4la", "nel5iz", "ne5mi", "ne4mo", "1nen", "4nene", "3neo", "ne4po", "ne2q", "n1er", "nera5b", "n4erar", "n2ere", "n4er5i", "ner4r", "1nes", "2nes.", "4nesp", "2nest", "4nesw", "3netic", "ne4v", "n5eve", "ne4w", "n3f", "n4gab", "n3gel", "nge4n4e", "n5gere", "n3geri", "ng5ha", "n3gib", "ng1in", "n5git", "n4gla", "ngov4", "ng5sh", "n1gu", "n4gum", "n2gy", "4n1h4", "nha4", "nhab3", "nhe4", "3n4ia", "ni3an", "ni4ap", "ni3ba", "ni4bl", "ni4d", "ni5di", "ni4er", "ni2fi", "ni5ficat", "n5igr", "nik4", "n1im", "ni3miz", "n1in", "5nine.", "nin4g", "ni4o", "5nis.", "nis4ta", "n2it", "n4ith", "3nitio", "n3itor", "ni3tr", "n1j", "4nk2", "n5kero", "n3ket", "nk3in", "n1kl", "4n1l", "n5m", "nme4", "nmet4", "4n1n2", "nne4", "nni3al", "nni4v", "nob4l", "no3ble", "n5ocl", "4n3o2d", "3noe", "4nog", "noge4", "nois5i", "no5l4i", "5nologis", "3nomic", "n5o5miz", "no4mo", "no3my", "no4n", "non4ag", "non5i", "n5oniz", "4nop", "5nop5o5li", "nor5ab", "no4rary", "4nosc", "nos4e", "nos5t", "no5ta", "1nou", "3noun", "nov3el3", "nowl3", "n1p4", "npi4", "npre4c", "n1q", "n1r", "nru4", "2n1s2", "ns5ab", "nsati4", "ns4c", "n2se", "n4s3es", "nsid1", "nsig4", "n2sl", "ns3m", "n4soc", "ns4pe", "n5spi", "nsta5bl", "n1t", "nta4b", "nter3s", "nt2i", "n5tib", "nti4er", "nti2f", "n3tine", "n4t3ing", "nti4p", "ntrol5li", "nt4s", "ntu3me", "nu1a", "nu4d", "nu5en", "nuf4fe", "n3uin", "3nu3it", "n4um", "nu1me", "n5umi", "3nu4n", "n3uo", "nu3tr", "n1v2", "n1w4", "nym4", "nyp4", "4nz", "n3za", "4oa", "oad3", "o5a5les", "oard3", "oas4e", "oast5e", "oat5i", "ob3a3b", "o5bar", "obe4l", "o1bi", "o2bin", "ob5ing", "o3br", "ob3ul", "o1ce", "och4", "o3chet", "ocif3", "o4cil", "o4clam", "o4cod", "oc3rac", "oc5ratiz", "ocre3", "5ocrit", "octor5a", "oc3ula", "o5cure", "od5ded", "od3ic", "odi3o", "o2do4", "odor3", "od5uct.", "od5ucts", "o4el", "o5eng", "o3er", "oe4ta", "o3ev", "o2fi", "of5ite", "ofit4t", "o2g5a5r", "og5ativ", "o4gato", "o1ge", "o5gene", "o5geo", "o4ger", "o3gie", "1o1gis", "og3it", "o4gl", "o5g2ly", "3ogniz", "o4gro", "ogu5i", "1ogy", "2ogyn", "o1h2", "ohab5", "oi2", "oic3es", "oi3der", "oiff4", "oig4", "oi5let", "o3ing", "oint5er", "o5ism", "oi5son", "oist5en", "oi3ter", "o5j", "2ok", "o3ken", "ok5ie", "o1la", "o4lan", "olass4", "ol2d", "old1e", "ol3er", "o3lesc", "o3let", "ol4fi", "ol2i", "o3lia", "o3lice", "ol5id.", "o3li4f", "o5lil", "ol3ing", "o5lio", "o5lis.", "ol3ish", "o5lite", "o5litio", "o5liv", "olli4e", "ol5ogiz", "olo4r", "ol5pl", "ol2t", "ol3ub", "ol3ume", "ol3un", "o5lus", "ol2v", "o2ly", "om5ah", "oma5l", "om5atiz", "om2be", "om4bl", "o2me", "om3ena", "om5erse", "o4met", "om5etry", "o3mia", "om3ic.", "om3ica", "o5mid", "om1in", "o5mini", "5ommend", "omo4ge", "o4mon", "om3pi", "ompro5", "o2n", "on1a", "on4ac", "o3nan", "on1c", "3oncil", "2ond", "on5do", "o3nen", "on5est", "on4gu", "on1ic", "o3nio", "on1is", "o5niu", "on3key", "on4odi", "on3omy", "on3s", "onspi4", "onspir5a", "onsu4", "onten4", "on3t4i", "ontif5", "on5um", "onva5", "oo2", "ood5e", "ood5i", "oo4k", "oop3i", "o3ord", "oost5", "o2pa", "ope5d", "op1er", "3opera", "4operag", "2oph", "o5phan", "o5pher", "op3ing", "o3pit", "o5pon", "o4posi", "o1pr", "op1u", "opy5", "o1q", "o1ra", "o5ra.", "o4r3ag", "or5aliz", "or5ange", "ore5a", "o5real", "or3ei", "ore5sh", "or5est.", "orew4", "or4gu", "4o5ria", "or3ica", "o5ril", "or1in", "o1rio", "or3ity", "o3riu", "or2mi", "orn2e", "o5rof", "or3oug", "or5pe", "3orrh", "or4se", "ors5en", "orst4", "or3thi", "or3thy", "or4ty", "o5rum", "o1ry", "os3al", "os2c", "os4ce", "o3scop", "4oscopi", "o5scr", "os4i4e", "os5itiv", "os3ito", "os3ity", "osi4u", "os4l", "o2so", "os4pa", "os4po", "os2ta", "o5stati", "os5til", "os5tit", "o4tan", "otele4g", "ot3er.", "ot5ers", "o4tes", "4oth", "oth5esi", "oth3i4", "ot3ic.", "ot5ica", "o3tice", "o3tif", "o3tis", "oto5s", "ou2", "ou3bl", "ouch5i", "ou5et", "ou4l", "ounc5er", "oun2d", "ou5v", "ov4en", "over4ne", "over3s", "ov4ert", "o3vis", "oviti4", "o5v4ol", "ow3der", "ow3el", "ow5est", "ow1i", "own5i", "o4wo", "oy1a", "1pa", "pa4ca", "pa4ce", "pac4t", "p4ad", "5pagan", "p3agat", "p4ai", "pain4", "p4al", "pan4a", "pan3el", "pan4ty", "pa3ny", "pa1p", "pa4pu", "para5bl", "par5age", "par5di", "3pare", "par5el", "p4a4ri", "par4is", "pa2te", "pa5ter", "5pathic", "pa5thy", "pa4tric", "pav4", "3pay", "4p1b", "pd4", "4pe.", "3pe4a", "pear4l", "pe2c", "2p2ed", "3pede", "3pedi", "pedia4", "ped4ic", "p4ee", "pee4d", "pek4", "pe4la", "peli4e", "pe4nan", "p4enc", "pen4th", "pe5on", "p4era.", "pera5bl", "p4erag", "p4eri", "peri5st", "per4mal", "perme5", "p4ern", "per3o", "per3ti", "pe5ru", "per1v", "pe2t", "pe5ten", "pe5tiz", "4pf", "4pg", "4ph.", "phar5i", "phe3no", "ph4er", "ph4es.", "ph1ic", "5phie", "ph5ing", "5phisti", "3phiz", "ph2l", "3phob", "3phone", "5phoni", "pho4r", "4phs", "ph3t", "5phu", "1phy", "pi3a", "pian4", "pi4cie", "pi4cy", "p4id", "p5ida", "pi3de", "5pidi", "3piec", "pi3en", "pi4grap", "pi3lo", "pi2n", "p4in.", "pind4", "p4ino", "3pi1o", "pion4", "p3ith", "pi5tha", "pi2tu", "2p3k2", "1p2l2", "3plan", "plas5t", "pli3a", "pli5er", "4plig", "pli4n", "ploi4", "plu4m", "plum4b", "4p1m", "2p3n", "po4c", "5pod.", "po5em", "po3et5", "5po4g", "poin2", "5point", "poly5t", "po4ni", "po4p", "1p4or", "po4ry", "1pos", "pos1s", "p4ot", "po4ta", "5poun", "4p1p", "ppa5ra", "p2pe", "p4ped", "p5pel", "p3pen", "p3per", "p3pet", "ppo5site", "pr2", "pray4e", "5preci", "pre5co", "pre3em", "pref5ac", "pre4la", "pre3r", "p3rese", "3press", "pre5ten", "pre3v", "5pri4e", "prin4t3", "pri4s", "pris3o", "p3roca", "prof5it", "pro3l", "pros3e", "pro1t", "2p1s2", "p2se", "ps4h", "p4sib", "2p1t", "pt5a4b", "p2te", "p2th", "pti3m", "ptu4r", "p4tw", "pub3", "pue4", "puf4", "pul3c", "pu4m", "pu2n", "pur4r", "5pus", "pu2t", "5pute", "put3er", "pu3tr", "put4ted", "put4tin", "p3w", "qu2", "qua5v", "2que.", "3quer", "3quet", "2rab", "ra3bi", "rach4e", "r5acl", "raf5fi", "raf4t", "r2ai", "ra4lo", "ram3et", "r2ami", "rane5o", "ran4ge", "r4ani", "ra5no", "rap3er", "3raphy", "rar5c", "rare4", "rar5ef", "4raril", "r2as", "ration4", "rau4t", "ra5vai", "rav3el", "ra5zie", "r1b", "r4bab", "r4bag", "rbi2", "rbi4f", "r2bin", "r5bine", "rb5ing.", "rb4o", "r1c", "r2ce", "rcen4", "r3cha", "rch4er", "r4ci4b", "rc4it", "rcum3", "r4dal", "rd2i", "rdi4a", "rdi4er", "rdin4", "rd3ing", "2re.", "re1al", "re3an", "re5arr", "5reav", "re4aw", "r5ebrat", "rec5oll", "rec5ompe", "re4cre", "2r2ed", "re1de", "re3dis", "red5it", "re4fac", "re2fe", "re5fer.", "re3fi", "re4fy", "reg3is", "re5it", "re1li", "re5lu", "r4en4ta", "ren4te", "re1o", "re5pin", "re4posi", "re1pu", "r1er4", "r4eri", "rero4", "re5ru", "r4es.", "re4spi", "ress5ib", "res2t", "re5stal", "re3str", "re4ter", "re4ti4z", "re3tri", "reu2", "re5uti", "rev2", "re4val", "rev3el", "r5ev5er.", "re5vers", "re5vert", "re5vil", "rev5olu", "re4wh", "r1f", "rfu4", "r4fy", "rg2", "rg3er", "r3get", "r3gic", "rgi4n", "rg3ing", "r5gis", "r5git", "r1gl", "rgo4n", "r3gu", "rh4", "4rh.", "4rhal", "ri3a", "ria4b", "ri4ag", "r4ib", "rib3a", "ric5as", "r4ice", "4rici", "5ricid", "ri4cie", "r4ico", "rid5er", "ri3enc", "ri3ent", "ri1er", "ri5et", "rig5an", "5rigi", "ril3iz", "5riman", "rim5i", "3rimo", "rim4pe", "r2ina", "5rina.", "rin4d", "rin4e", "rin4g", "ri1o", "5riph", "riph5e", "ri2pl", "rip5lic", "r4iq", "r2is", "r4is.", "ris4c", "r3ish", "ris4p", "ri3ta3b", "r5ited.", "rit5er.", "rit5ers", "rit3ic", "ri2tu", "rit5ur", "riv5el", "riv3et", "riv3i", "r3j", "r3ket", "rk4le", "rk4lin", "r1l", "rle4", "r2led", "r4lig", "r4lis", "rl5ish", "r3lo4", "r1m", "rma5c", "r2me", "r3men", "rm5ers", "rm3ing", "r4ming.", "r4mio", "r3mit", "r4my", "r4nar", "r3nel", "r4ner", "r5net", "r3ney", "r5nic", "r1nis4", "r3nit", "r3niv", "rno4", "r4nou", "r3nu", "rob3l", "r2oc", "ro3cr", "ro4e", "ro1fe", "ro5fil", "rok2", "ro5ker", "5role.", "rom5ete", "rom4i", "rom4p", "ron4al", "ron4e", "ro5n4is", "ron4ta", "1room", "5root", "ro3pel", "rop3ic", "ror3i", "ro5ro", "ros5per", "ros4s", "ro4the", "ro4ty", "ro4va", "rov5el", "rox5", "r1p", "r4pea", "r5pent", "rp5er.", "r3pet", "rp4h4", "rp3ing", "r3po", "r1r4", "rre4c", "rre4f", "r4reo", "rre4st", "rri4o", "rri4v", "rron4", "rros4", "rrys4", "4rs2", "r1sa", "rsa5ti", "rs4c", "r2se", "r3sec", "rse4cr", "rs5er.", "rs3es", "rse5v2", "r1sh", "r5sha", "r1si", "r4si4b", "rson3", "r1sp", "r5sw", "rtach4", "r4tag", "r3teb", "rten4d", "rte5o", "r1ti", "rt5ib", "rti4d", "r4tier", "r3tig", "rtil3i", "rtil4l", "r4tily", "r4tist", "r4tiv", "r3tri", "rtroph4", "rt4sh", "ru3a", "ru3e4l", "ru3en", "ru4gl", "ru3in", "rum3pl", "ru2n", "runk5", "run4ty", "r5usc", "ruti5n", "rv4e", "rvel4i", "r3ven", "rv5er.", "r5vest", "r3vey", "r3vic", "rvi4v", "r3vo", "r1w", "ry4c", "5rynge", "ry3t", "sa2", "2s1ab", "5sack", "sac3ri", "s3act", "5sai", "salar4", "sal4m", "sa5lo", "sal4t", "3sanc", "san4de", "s1ap", "sa5ta", "5sa3tio", "sat3u", "sau4", "sa5vor", "5saw", "4s5b", "scan4t5", "sca4p", "scav5", "s4ced", "4scei", "s4ces", "sch2", "s4cho", "3s4cie", "5scin4d", "scle5", "s4cli", "scof4", "4scopy", "scour5a", "s1cu", "4s5d", "4se.", "se4a", "seas4", "sea5w", "se2c3o", "3sect", "4s4ed", "se4d4e", "s5edl", "se2g", "seg3r", "5sei", "se1le", "5self", "5selv", "4seme", "se4mol", "sen5at", "4senc", "sen4d", "s5ened", "sen5g", "s5enin", "4sentd", "4sentl", "sep3a3", "4s1er.", "s4erl", "ser4o", "4servo", "s1e4s", "se5sh", "ses5t", "5se5um", "5sev", "sev3en", "sew4i", "5sex", "4s3f", "2s3g", "s2h", "2sh.", "sh1er", "5shev", "sh1in", "sh3io", "3ship", "shiv5", "sho4", "sh5old", "shon3", "shor4", "short5", "4shw", "si1b", "s5icc", "3side.", "5sides", "5sidi", "si5diz", "4signa", "sil4e", "4sily", "2s1in", "s2ina", "5sine.", "s3ing", "1sio", "5sion", "sion5a", "si2r", "sir5a", "1sis", "3sitio", "5siu", "1siv", "5siz", "sk2", "4ske", "s3ket", "sk5ine", "sk5ing", "s1l2", "s3lat", "s2le", "slith5", "2s1m", "s3ma", "small3", "sman3", "smel4", "s5men", "5smith", "smol5d4", "s1n4", "1so", "so4ce", "soft3", "so4lab", "sol3d2", "so3lic", "5solv", "3som", "3s4on.", "sona4", "son4g", "s4op", "5sophic", "s5ophiz", "s5ophy", "sor5c", "sor5d", "4sov", "so5vi", "2spa", "5spai", "spa4n", "spen4d", "2s5peo", "2sper", "s2phe", "3spher", "spho5", "spil4", "sp5ing", "4spio", "s4ply", "s4pon", "spor4", "4spot", "squal4l", "s1r", "2ss", "s1sa", "ssas3", "s2s5c", "s3sel", "s5seng", "s4ses.", "s5set", "s1si", "s4sie", "ssi4er", "ss5ily", "s4sl", "ss4li", "s4sn", "sspend4", "ss2t", "ssur5a", "ss5w", "2st.", "s2tag", "s2tal", "stam4i", "5stand", "s4ta4p", "5stat.", "s4ted", "stern5i", "s5tero", "ste2w", "stew5a", "s3the", "st2i", "s4ti.", "s5tia", "s1tic", "5stick", "s4tie", "s3tif", "st3ing", "5stir", "s1tle", "5stock", "stom3a", "5stone", "s4top", "3store", "st4r", "s4trad", "5stratu", "s4tray", "s4trid", "4stry", "4st3w", "s2ty", "1su", "su1al", "su4b3", "su2g3", "su5is", "suit3", "s4ul", "su2m", "sum3i", "su2n", "su2r", "4sv", "sw2", "4swo", "s4y", "4syc", "3syl", "syn5o", "sy5rin", "1ta", "3ta.", "2tab", "ta5bles", "5taboliz", "4taci", "ta5do", "4taf4", "tai5lo", "ta2l", "ta5la", "tal5en", "tal3i", "4talk", "tal4lis", "ta5log", "ta5mo", "tan4de", "tanta3", "ta5per", "ta5pl", "tar4a", "4tarc", "4tare", "ta3riz", "tas4e", "ta5sy", "4tatic", "ta4tur", "taun4", "tav4", "2taw", "tax4is", "2t1b", "4tc", "t4ch", "tch5et", "4t1d", "4te.", "tead4i", "4teat", "tece4", "5tect", "2t1ed", "te5di", "1tee", "teg4", "te5ger", "te5gi", "3tel.", "teli4", "5tels", "te2ma2", "tem3at", "3tenan", "3tenc", "3tend", "4tenes", "1tent", "ten4tag", "1teo", "te4p", "te5pe", "ter3c", "5ter3d", "1teri", "ter5ies", "ter3is", "teri5za", "5ternit", "ter5v", "4tes.", "4tess", "t3ess.", "teth5e", "3teu", "3tex", "4tey", "2t1f", "4t1g", "2th.", "than4", "th2e", "4thea", "th3eas", "the5at", "the3is", "3thet", "th5ic.", "th5ica", "4thil", "5think", "4thl", "th5ode", "5thodic", "4thoo", "thor5it", "tho5riz", "2ths", "1tia", "ti4ab", "ti4ato", "2ti2b", "4tick", "t4ico", "t4ic1u", "5tidi", "3tien", "tif2", "ti5fy", "2tig", "5tigu", "till5in", "1tim", "4timp", "tim5ul", "2t1in", "t2ina", "3tine.", "3tini", "1tio", "ti5oc", "tion5ee", "5tiq", "ti3sa", "3tise", "tis4m", "ti5so", "tis4p", "5tistica", "ti3tl", "ti4u", "1tiv", "tiv4a", "1tiz", "ti3za", "ti3zen", "2tl", "t5la", "tlan4", "3tle.", "3tled", "3tles.", "t5let.", "t5lo", "4t1m", "tme4", "2t1n2", "1to", "to3b", "to5crat", "4todo", "2tof", "to2gr", "to5ic", "to2ma", "tom4b", "to3my", "ton4ali", "to3nat", "4tono", "4tony", "to2ra", "to3rie", "tor5iz", "tos2", "5tour", "4tout", "to3war", "4t1p", "1tra", "tra3b", "tra5ch", "traci4", "trac4it", "trac4te", "tras4", "tra5ven", "trav5es5", "tre5f", "tre4m", "trem5i", "5tria", "tri5ces", "5tricia", "4trics", "2trim", "tri4v", "tro5mi", "tron5i", "4trony", "tro5phe", "tro3sp", "tro3v", "tru5i", "trus4", "4t1s2", "t4sc", "tsh4", "t4sw", "4t3t2", "t4tes", "t5to", "ttu4", "1tu", "tu1a", "tu3ar", "tu4bi", "tud2", "4tue", "4tuf4", "5tu3i", "3tum", "tu4nis", "2t3up.", "3ture", "5turi", "tur3is", "tur5o", "tu5ry", "3tus", "4tv", "tw4", "4t1wa", "twis4", "4two", "1ty", "4tya", "2tyl", "type3", "ty5ph", "4tz", "tz4e", "4uab", "uac4", "ua5na", "uan4i", "uar5ant", "uar2d", "uar3i", "uar3t", "u1at", "uav4", "ub4e", "u4bel", "u3ber", "u4bero", "u1b4i", "u4b5ing", "u3ble.", "u3ca", "uci4b", "uc4it", "ucle3", "u3cr", "u3cu", "u4cy", "ud5d", "ud3er", "ud5est", "udev4", "u1dic", "ud3ied", "ud3ies", "ud5is", "u5dit", "u4don", "ud4si", "u4du", "u4ene", "uens4", "uen4te", "uer4il", "3ufa", "u3fl", "ugh3en", "ug5in", "2ui2", "uil5iz", "ui4n", "u1ing", "uir4m", "uita4", "uiv3", "uiv4er.", "u5j", "4uk", "u1la", "ula5b", "u5lati", "ulch4", "5ulche", "ul3der", "ul4e", "u1len", "ul4gi", "ul2i", "u5lia", "ul3ing", "ul5ish", "ul4lar", "ul4li4b", "ul4lis", "4ul3m", "u1l4o", "4uls", "uls5es", "ul1ti", "ultra3", "4ultu", "u3lu", "ul5ul", "ul5v", "um5ab", "um4bi", "um4bly", "u1mi", "u4m3ing", "umor5o", "um2p", "unat4", "u2ne", "un4er", "u1ni", "un4im", "u2nin", "un5ish", "uni3v", "un3s4", "un4sw", "unt3ab", "un4ter.", "un4tes", "unu4", "un5y", "un5z", "u4ors", "u5os", "u1ou", "u1pe", "uper5s", "u5pia", "up3ing", "u3pl", "up3p", "upport5", "upt5ib", "uptu4", "u1ra", "4ura.", "u4rag", "u4ras", "ur4be", "urc4", "ur1d", "ure5at", "ur4fer", "ur4fr", "u3rif", "uri4fic", "ur1in", "u3rio", "u1rit", "ur3iz", "ur2l", "url5ing.", "ur4no", "uros4", "ur4pe", "ur4pi", "urs5er", "ur5tes", "ur3the", "urti4", "ur4tie", "u3ru", "2us", "u5sad", "u5san", "us4ap", "usc2", "us3ci", "use5a", "u5sia", "u3sic", "us4lin", "us1p", "us5sl", "us5tere", "us1tr", "u2su", "usur4", "uta4b", "u3tat", "4ute.", "4utel", "4uten", "uten4i", "4u1t2i", "uti5liz", "u3tine", "ut3ing", "ution5a", "u4tis", "5u5tiz", "u4t1l", "ut5of", "uto5g", "uto5matic", "u5ton", "u4tou", "uts4", "u3u", "uu4m", "u1v2", "uxu3", "uz4e", "1va", "5va.", "2v1a4b", "vac5il", "vac3u", "vag4", "va4ge", "va5lie", "val5o", "val1u", "va5mo", "va5niz", "va5pi", "var5ied", "3vat", "4ve.", "4ved", "veg3", "v3el.", "vel3li", "ve4lo", "v4ely", "ven3om", "v5enue", "v4erd", "5vere.", "v4erel", "v3eren", "ver5enc", "v4eres", "ver3ie", "vermi4n", "3verse", "ver3th", "v4e2s", "4ves.", "ves4te", "ve4te", "vet3er", "ve4ty", "vi5ali", "5vian", "5vide.", "5vided", "4v3iden", "5vides", "5vidi", "v3if", "vi5gn", "vik4", "2vil", "5vilit", "v3i3liz", "v1in", "4vi4na", "v2inc", "vin5d", "4ving", "vio3l", "v3io4r", "vi1ou", "vi4p", "vi5ro", "vis3it", "vi3so", "vi3su", "4viti", "vit3r", "4vity", "3viv", "5vo.", "voi4", "3vok", "vo4la", "v5ole", "5volt", "3volv", "vom5i", "vor5ab", "vori4", "vo4ry", "vo4ta", "4votee", "4vv4", "v4y", "w5abl", "2wac", "wa5ger", "wag5o", "wait5", "w5al.", "wam4", "war4t", "was4t", "wa1te", "wa5ver", "w1b", "wea5rie", "weath3", "wed4n", "weet3", "wee5v", "wel4l", "w1er", "west3", "w3ev", "whi4", "wi2", "wil2", "will5in", "win4de", "win4g", "wir4", "3wise", "with3", "wiz5", "w4k", "wl4es", "wl3in", "w4no", "1wo2", "wom1", "wo5ven", "w5p", "wra4", "wri4", "writa4", "w3sh", "ws4l", "ws4pe", "w5s4t", "4wt", "wy4", "x1a", "xac5e", "x4ago", "xam3", "x4ap", "xas5", "x3c2", "x1e", "xe4cuto", "x2ed", "xer4i", "xe5ro", "x1h", "xhi2", "xhil5", "xhu4", "x3i", "xi5a", "xi5c", "xi5di", "x4ime", "xi5miz", "x3o", "x4ob", "x3p", "xpan4d", "xpecto5", "xpe3d", "x1t2", "x3ti", "x1u", "xu3a", "xx4", "y5ac", "3yar4", "y5at", "y1b", "y1c", "y2ce", "yc5er", "y3ch", "ych4e", "ycom4", "ycot4", "y1d", "y5ee", "y1er", "y4erf", "yes4", "ye4t", "y5gi", "4y3h", "y1i", "y3la", "ylla5bl", "y3lo", "y5lu", "ymbol5", "yme4", "ympa3", "yn3chr", "yn5d", "yn5g", "yn5ic", "5ynx", "y1o4", "yo5d", "y4o5g", "yom4", "yo5net", "y4ons", "y4os", "y4ped", "yper5", "yp3i", "y3po", "y4poc", "yp2ta", "y5pu", "yra5m", "yr5ia", "y3ro", "yr4r", "ys4c", "y3s2e", "ys3ica", "ys3io", "3ysis", "y4so", "yss4", "ys1t", "ys3ta", "ysur4", "y3thin", "yt3ic", "y1w", "za1", "z5a2b", "zar2", "4zb", "2ze", "ze4n", "ze4p", "z1er", "ze3ro", "zet4", "2z1i", "z4il", "z4is", "5zl", "4zm", "1zo", "zo4m", "zo5ol", "zte4", "4z1z2", "z4zy", // hyphen.tex patterns end here, and additional patterns begin: ".con5gr", ".de5riva", ".dri5v4", ".eth1y6l1", ".eu4ler", ".ev2", ".ever5si5b", ".ga4s1om1", ".ge4ome", ".ge5ot1", ".he3mo1", ".he3p6a", ".he3roe", ".in5u2t", ".kil2n3i", ".ko6r1te1", ".le6ices", ".me4ga1l", ".met4ala", ".mim5i2c1", ".mi1s4ers", ".ne6o3f", ".noe1th", ".non1e2m", ".poly1s", ".post1am", ".pre1am", ".rav5en1o", ".semi5", ".sem4ic", ".semid6", ".semip4", ".semir4", ".sem6is4", ".semiv4", ".sph6in1", ".spin1o", ".ta5pes1tr", ".te3legr", ".to6pog", ".to2q", ".un3at5t", ".un5err5", ".vi2c3ar", ".we2b1l", ".re1e4c", "a5bolic", "a2cabl", "af6fish", "am1en3ta5b", "anal6ys", "ano5a2c", "ans5gr", "ans3v", "anti1d", "an3ti1n2", "anti1re", "a4pe5able", "ar3che5t", "ar2range", "as5ymptot", "ath3er1o1s", "at6tes.", "augh4tl", "au5li5f", "av3iou", "back2er.", "ba6r1onie", "ba1thy", "bbi4t", "be2vie", "bi5d2if", "bil2lab", "bio5m", "bi1orb", "bio1rh", "b1i3tive", "blan2d1", "blin2d1", "blon2d2", "bor1no5", "bo2t1u1l", "brus4q", "bus6i2er", "bus6i2es", "buss4ing", "but2ed.", "but4ted", "cad5e1m", "cat1a1s2", "4chs.", "chs3hu", "chie5vo", "cig3a3r", "cin2q", "cle4ar", "co6ph1o3n", "cous2ti", "cri3tie", "croc1o1d", "cro5e2co", "c2tro3me6c", "1cu2r1ance", "2d3alone", "data1b", "dd5a5b", "d2d5ib", "de4als.", "de5clar1", "de2c5lina", "de3fin3iti", "de2mos", "des3ic", "de2tic", "dic1aid", "dif5fra", "3di1methy", "di2ren", "di2rer", "2d1lead", "2d1li2e", "3do5word", "dren1a5l", "drif2t1a", "d1ri3pleg5", "drom3e5d", "d3tab", "du2al.", "du1op1o1l", "ea4n3ies", "e3chas", "edg1l", "ed1uling", "eli2t1is", "e1loa", "en1dix", "eo3grap", "1e6p3i3neph1", "e2r3i4an.", "e3spac6i", "eth1y6l1ene", "5eu2clid1", "feb1rua", "fermi1o", "3fich", "fit5ted.", "fla1g6el", "flow2er.", "3fluor", "gen2cy.", "ge3o1d", "ght1we", "g1lead", "get2ic.", "4g1lish", "5glo5bin", "1g2nac", "gnet1ism", "gno5mo", "g2n1or.", "g2noresp", "2g1o4n3i1za", "graph5er.", "griev1", "g1utan", "hair1s", "ha2p3ar5r", "hatch1", "hex2a3", "hite3sid", "h3i5pel1a4", "hnau3z", "ho6r1ic.", "h2t1eou", "hypo1tha", "id4ios", "ifac1et", "ign4it", "ignit1er", "i4jk", "im3ped3a", "infra1s2", "i5nitely.", "irre6v3oc", "i1tesima", "ith5i2l", "itin5er5ar", "janu3a", "japan1e2s", "je1re1m", "1ke6ling", "1ki5netic", "1kovian", "k3sha", "la4c3i5e", "lai6n3ess", "lar5ce1n", "l3chai", "l3chil6d1", "lead6er.", "lea4s1a", "1lec3ta6b", "le3g6en2dre", "1le1noid", "lith1o5g", "ll1fl", "l2l3ish", "l5mo3nell", "lo1bot1o1", "lo2ges.", "load4ed.", "load6er.", "l3tea", "lth5i2ly", "lue1p", "1lunk3er", "1lum5bia.", "3lyg1a1mi", "ly5styr", "ma1la1p", "m2an.", "man3u1sc", "mar1gin1", "medi2c", "med3i3cin", "medio6c1", "me3gran3", "m2en.", "3mi3da5b", "3milita", "mil2l1ag", "mil5li5li", "mi6n3is.", "mi1n2ut1er", "mi1n2ut1est", "m3ma1b", "5maph1ro1", "5moc1ra1t", "mo5e2las", "mol1e5c", "mon4ey1l", "mono3ch", "mo4no1en", "moro6n5is", "mono1s6", "moth4et2", "m1ou3sin", "m5shack2", "mu2dro", "mul2ti5u", "n3ar4chs.", "n3ch2es1t", "ne3back", "2ne1ski", "n1dieck", "nd3thr", "nfi6n3ites", "4n5i4an.", "nge5nes", "ng1ho", "ng1spr", "nk3rup", "n5less", "5noc3er1os", "nom1a6l", "nom5e1no", "n1o1mist", "non1eq", "non1i4so", "5nop1oly.", "no1vemb", "ns5ceiv", "ns4moo", "ntre1p", "obli2g1", "o3chas", "odel3li", "odit1ic", "oerst2", "oke1st", "o3les3ter", "oli3gop1o1", "o1lo3n4om", "o3mecha6", "onom1ic", "o3norma", "o3no2t1o3n", "o3nou", "op1ism.", "or4tho3ni4t", "orth1ri", "or5tively", "o4s3pher", "o5test1er", "o5tes3tor", "oth3e1o1s", "ou3ba3do", "o6v3i4an.", "oxi6d1ic", "pal6mat", "parag6ra4", "par4a1le", "param4", "para3me", "pee2v1", "phi2l3ant", "phi5lat1e3l", "pi2c1a3d", "pli2c1ab", "pli5nar", "poin3ca", "1pole.", "poly1e", "po3lyph1ono", "1prema3c", "pre1neu", "pres2pli", "pro2cess", "proc3i3ty.", "pro2g1e", "3pseu2d", "pseu3d6o3d2", "pseu3d6o3f2", "pto3mat4", "p5trol3", "pu5bes5c", "quain2t1e", "qu6a3si3", "quasir6", "quasis6", "quin5tes5s", "qui3v4ar", "r1abolic", "3rab1o1loi", "ra3chu", "r3a3dig", "radi1o6g", "r2amen", "3ra4m5e1triz", "ra3mou", "ra5n2has", "ra1or", "r3bin1ge", "re2c3i1pr", "rec5t6ang", "re4t1ribu", "r3ial.", "riv1o1l", "6rk.", "rk1ho", "r1krau", "6rks.", "r5le5qu", "ro1bot1", "ro5e2las", "ro5epide1", "ro3mesh", "ro1tron", "r3pau5li", "rse1rad1i", "r1thou", "r1treu", "r1veil", "rz1sc", "sales3c", "sales5w", "5sa3par5il", "sca6p1er", "sca2t1ol", "s4chitz", "schro1ding1", "1sci2utt", "scrap4er.", "scy4th1", "sem1a1ph", "se3mes1t", "se1mi6t5ic", "sep3temb", "shoe1st", "sid2ed.", "side5st", "side5sw", "si5resid", "sky1sc", "3slova1kia", "3s2og1a1my", "so2lute", "3s2pace", "1s2pacin", "spe3cio", "spher1o", "spi2c1il", "spokes5w", "sports3c", "sports3w", "s3qui3to", "s2s1a3chu1", "ss3hat", "s2s3i4an.", "s5sign5a3b", "1s2tamp", "s2t1ant5shi", "star3tli", "sta1ti", "st5b", "1stor1ab", "strat1a1g", "strib5ut", "st5scr", "stu1pi4d1", "styl1is", "su2per1e6", "1sync", "1syth3i2", "swimm6", "5tab1o1lism", "ta3gon.", "talk1a5", "t1a1min", "t6ap6ath", "5tar2rh", "tch1c", "tch3i1er", "t1cr", "teach4er.", "tele2g", "tele1r6o", "3ter1gei", "ter2ic.", "t3ess2es", "tha4l1am", "tho3don", "th1o5gen1i", "tho1k2er", "thy4l1an", "thy3sc", "2t3i4an.", "ti2n3o1m", "t1li2er", "tolo2gy", "tot3ic", "trai3tor1", "tra1vers", "travers3a3b", "treach1e", "tr4ial.", "3tro1le1um", "trof4ic.", "tro3fit", "tro1p2is", "3trop1o5les", "3trop1o5lis", "t1ro1pol3it", "tsch3ie", "ttrib1ut1", "turn3ar", "t1wh", "ty2p5al", "ua3drati", "uad1ratu", "u5do3ny", "uea1m", "u2r1al.", "uri4al.", "us2er.", "v1ativ", "v1oir5du1", "va6guer", "vaude3v", "1verely.", "v1er1eig", "ves1tite", "vi1vip3a3r", "voice1p", "waste3w6a2", "wave1g4", "w3c", "week1n", "wide5sp", "wo4k1en", "wrap3aro", "writ6er.", "x1q", "xquis3", "y5che3d", "ym5e5try", "y1stro", "yes5ter1y", "z3ian.", "z3o1phr", "z2z3w", // end of additional patterns. "", ]; // DEK's hyphenation exception list, from hyphen.tex; not changed. var hyphenation = [ "as-so-ciate", "as-so-ciates", "dec-li-na-tion", "oblig-a-tory", "phil-an-thropic", "present", "presents", "project", "projects", "reci-procity", "re-cog-ni-zance", "ref-or-ma-tion", "ret-ri-bu-tion", "ta-ble", "", ]; return { patterns: patterns, exceptions: hyphenation, }; }); /***/ }, /***/ 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; /***/ }, /***/ 5171: /***/ function (module) { module.exports = function isArrayish(obj) { if (!obj || typeof obj === "string") { return false; } return ( obj instanceof Array || Array.isArray(obj) || (obj.length >= 0 && (obj.splice instanceof Function || (Object.getOwnPropertyDescriptor( obj, obj.length - 1 ) && obj.constructor.name !== "String"))) ); }; /***/ }, /***/ 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; }; /***/ }, /***/ 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; }; /***/ }, /***/ 8079: /***/ function (module) { /** * Expose `isUrl`. */ module.exports = isUrl; /** * RegExps. * A URL must match #1 and then at least one of #2/#3. * Use two levels of REs to avoid REDOS. */ var protocolAndDomainRE = /^(?:\w+:)?\/\/(\S+)$/; var localhostDomainRE = /^localhost[\:?\d]*(?:[^\:?\d]\S*)?$/; var nonLocalhostDomainRE = /^[^\s\.]+\.\S{2,}$/; /** * Loosely validate a URL `string`. * * @param {String} string * @return {Boolean} */ function isUrl(string) { if (typeof string !== "string") { return false; } var match = string.match(protocolAndDomainRE); if (!match) { return false; } var everythingAfterProtocol = match[1]; if (!everythingAfterProtocol) { return false; } if ( localhostDomainRE.test(everythingAfterProtocol) || nonLocalhostDomainRE.test(everythingAfterProtocol) ) { return true; } return false; } /***/ }, /***/ 1028: /***/ function ( module, __unused_webpack_exports, __webpack_require__ ) { var Parser = __webpack_require__(8897); module.exports = function (queries, options) { var result = {}; Object.keys(queries).forEach(function (query) { if (Parser.parse(query).match(options)) { Object.assign(result, queries[query]); } }); return result; }; /***/ }, /***/ 2304: /***/ function (module) { function And(left, right) { this.left = left; this.right = right; this.match = function (options) { return left.match(options) && right.match(options); }; } function Or(left, right) { this.left = left; this.right = right; this.match = function (options) { return left.match(options) || right.match(options); }; } module.exports = function Operator(type, left, right) { switch (type) { case "and": return new And(left, right); case ",": return new Or(left, right); default: throw new Error(value); } }; /***/ }, /***/ 8897: /***/ function ( module, __unused_webpack_exports, __webpack_require__ ) { var Query = __webpack_require__(6525); var Operator = __webpack_require__(2304); var NUMBERS = /[0-9]/; var LETTERS = /[a-z|\-]/i; var WHITESPACE = /\s/; var COLON = /:/; var COMMA = /,/; var AND = /and$/; var AT = /@/; function tokenizer(input) { var current = 0; var tokens = []; while (current < input.length) { var char = input[current]; if (AT.test(char)) { char = input[++current]; while (LETTERS.test(char) && char !== undefined) { char = input[++current]; } } if (WHITESPACE.test(char) || char === ")" || char === "(") { current++; continue; } if (COLON.test(char) || COMMA.test(char)) { current++; tokens.push({ type: "operator", value: char }); continue; } if (NUMBERS.test(char)) { var value = ""; while (NUMBERS.test(char)) { value += char; char = input[++current]; } tokens.push({ type: "number", value: value }); continue; } if (LETTERS.test(char)) { var value = ""; while (LETTERS.test(char) && char !== undefined) { value += char; char = input[++current]; } if (AND.test(value)) { tokens.push({ type: "operator", value: value }); } else { tokens.push({ type: "literal", value: value }); } continue; } throw new TypeError( "Tokenizer: I dont know what this character is: " + char ); } return tokens; } function parser(tokens) { var output = []; var stack = []; while (tokens.length > 0) { var token = tokens.shift(); if (token.type === "number" || token.type === "literal") { output.push(token); continue; } if (token.type === "operator") { if (COLON.test(token.value)) { token = { type: "query", key: output.pop(), value: tokens.shift(), }; output.push(token); continue; } while (stack.length > 0) { output.unshift(stack.pop()); } stack.push(token); } } while (stack.length > 0) { output.unshift(stack.pop()); } function walk() { var head = output.shift(); if (head.type === "number") { return parseInt(head.value); } if (head.type === "literal") { return head.value; } if (head.type === "operator") { var l = walk(); var r = walk(); return Operator(head.value, l, r); } if (head.type === "query") { var l = head.key.value; var r = head.value.value; return Query(l, r); } } return walk(); } module.exports = { parse: function (query) { var tokens = tokenizer(query); var ast = parser(tokens); return ast; }, }; /***/ }, /***/ 6525: /***/ function (module) { function MaxHeight(value) { this.value = value; this.match = function (options) { return this.value >= options.height; }; } function MinHeight(value) { this.value = value; this.match = function (options) { return this.value < options.height; }; } function MaxWidth(value) { this.value = value; this.match = function (options) { return this.value >= options.width; }; } function MinWidth(value) { this.value = value; this.match = function (options) { return this.value < options.width; }; } function Orientation(value) { this.value = value; this.match = function (options) { return this.value === options.orientation; }; } module.exports = function Query(type, value) { switch (type) { case "max-height": return new MaxHeight(value); case "min-height": return new MinHeight(value); case "max-width": return new MaxWidth(value); case "min-width": return new MinWidth(value); case "orientation": return new Orientation(value); default: throw new Error(value); } }; /***/ }, /***/ 6086: /***/ function (module) { "use strict"; var assign = Object.assign.bind(Object); module.exports = assign; module.exports["default"] = module.exports; //# sourceMappingURL=object-assign.js.map /***/ }, /***/ 3454: /***/ function ( module, __unused_webpack_exports, __webpack_require__ ) { "use strict"; var ref, ref1; module.exports = ((ref = __webpack_require__.g.process) === null || ref === void 0 ? void 0 : ref.env) && typeof ((ref1 = __webpack_require__.g.process) === null || ref1 === void 0 ? void 0 : ref1.env) === "object" ? __webpack_require__.g.process : __webpack_require__(7663); //# sourceMappingURL=process.js.map /***/ }, /***/ 9749: /***/ function (module, exports, __webpack_require__) { "use strict"; 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 _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); } 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 _iterableToArray(iter) { if ( (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null) || iter["@@iterator"] != null ) return Array.from(iter); } function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : (typeof Symbol !== "undefined" && arr[Symbol.iterator]) || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for ( _i = _i.call(arr); !(_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 _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 _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 _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 _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(n); if ( n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ) return _arrayLikeToArray(o, minLen); } Object.defineProperty(exports, "__esModule", { value: true, }); exports["default"] = Image; var _react = _interopRequireWildcard(__webpack_require__(7294)); var _head = _interopRequireDefault(__webpack_require__(3121)); var _imageConfig = __webpack_require__(139); var _useIntersection = __webpack_require__(9246); var _imageConfigContext = __webpack_require__(8730); var _utils = __webpack_require__(670); var _normalizeTrailingSlash = __webpack_require__(2700); function Image(_param) { var src = _param.src, sizes = _param.sizes, _unoptimized = _param.unoptimized, unoptimized = _unoptimized === void 0 ? false : _unoptimized, _priority = _param.priority, priority = _priority === void 0 ? false : _priority, loading = _param.loading, _lazyRoot = _param.lazyRoot, lazyRoot = _lazyRoot === void 0 ? null : _lazyRoot, _lazyBoundary = _param.lazyBoundary, lazyBoundary = _lazyBoundary === void 0 ? "200px" : _lazyBoundary, className = _param.className, quality = _param.quality, width = _param.width, height = _param.height, style = _param.style, objectFit = _param.objectFit, objectPosition = _param.objectPosition, onLoadingComplete = _param.onLoadingComplete, _placeholder = _param.placeholder, placeholder = _placeholder === void 0 ? "empty" : _placeholder, blurDataURL = _param.blurDataURL, all = _objectWithoutProperties(_param, [ "src", "sizes", "unoptimized", "priority", "loading", "lazyRoot", "lazyBoundary", "className", "quality", "width", "height", "style", "objectFit", "objectPosition", "onLoadingComplete", "placeholder", "blurDataURL", ]); var configContext = (0, _react).useContext( _imageConfigContext.ImageConfigContext ); var config = (0, _react).useMemo( function () { var c = configEnv || configContext || _imageConfig.imageConfigDefault; var allSizes = _toConsumableArray(c.deviceSizes) .concat(_toConsumableArray(c.imageSizes)) .sort(function (a, b) { return a - b; }); var deviceSizes = c.deviceSizes.sort(function (a, b) { return a - b; }); return _objectSpread({}, c, { allSizes: allSizes, deviceSizes: deviceSizes, }); }, [configContext] ); var rest = all; var layout = sizes ? "responsive" : "intrinsic"; if ("layout" in rest) { // Override default layout if the user specified one: if (rest.layout) layout = rest.layout; // Remove property so it's not spread on : delete rest.layout; } var loader = defaultImageLoader; if ("loader" in rest) { if (rest.loader) { var customImageLoader = rest.loader; var _tmp; (_tmp = function (obj) { var _ = obj.config, opts = _objectWithoutProperties(obj, [ "config", ]); // The config object is internal only so we must // not pass it to the user-defined loader() return customImageLoader(opts); }), (loader = _tmp), _tmp; } // Remove property so it's not spread on delete rest.loader; } var staticSrc = ""; if (isStaticImport(src)) { var staticImageData = isStaticRequire(src) ? src.default : src; if (!staticImageData.src) { throw new Error( "An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received ".concat( JSON.stringify(staticImageData) ) ); } blurDataURL = blurDataURL || staticImageData.blurDataURL; staticSrc = staticImageData.src; if (!layout || layout !== "fill") { height = height || staticImageData.height; width = width || staticImageData.width; if (!staticImageData.height || !staticImageData.width) { throw new Error( "An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received ".concat( JSON.stringify(staticImageData) ) ); } } } src = typeof src === "string" ? src : staticSrc; var widthInt = getInt(width); var heightInt = getInt(height); var qualityInt = getInt(quality); var isLazy = !priority && (loading === "lazy" || typeof loading === "undefined"); if (src.startsWith("data:") || src.startsWith("blob:")) { // https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs unoptimized = true; isLazy = false; } if (true && loadedImageURLs.has(src)) { isLazy = false; } var ref2 = _slicedToArray((0, _react).useState(false), 2), blurComplete = ref2[0], setBlurComplete = ref2[1]; var ref1 = _slicedToArray( (0, _useIntersection).useIntersection({ rootRef: lazyRoot, rootMargin: lazyBoundary, disabled: !isLazy, }), 3 ), setIntersection = ref1[0], isIntersected = ref1[1], resetIntersected = ref1[2]; var isVisible = !isLazy || isIntersected; var wrapperStyle = { boxSizing: "border-box", display: "block", overflow: "hidden", width: "initial", height: "initial", background: "none", opacity: 1, border: 0, margin: 0, padding: 0, }; var sizerStyle = { boxSizing: "border-box", display: "block", width: "initial", height: "initial", background: "none", opacity: 1, border: 0, margin: 0, padding: 0, }; var hasSizer = false; var sizerSvgUrl; var layoutStyle = { position: "absolute", top: 0, left: 0, bottom: 0, right: 0, boxSizing: "border-box", padding: 0, border: "none", margin: "auto", display: "block", width: 0, height: 0, minWidth: "100%", maxWidth: "100%", minHeight: "100%", maxHeight: "100%", objectFit: objectFit, objectPosition: objectPosition, }; if (false) { } if (false) { var overwrittenStyles, url, urlStr, VALID_BLUR_EXT; } var imgStyle = Object.assign( {}, style, layout === "raw" ? {} : layoutStyle ); var blurStyle = placeholder === "blur" && !blurComplete ? { filter: "blur(20px)", backgroundSize: objectFit || "cover", backgroundImage: 'url("'.concat( blurDataURL, '")' ), backgroundPosition: objectPosition || "0% 0%", } : {}; if (layout === "fill") { // wrapperStyle.display = "block"; wrapperStyle.position = "absolute"; wrapperStyle.top = 0; wrapperStyle.left = 0; wrapperStyle.bottom = 0; wrapperStyle.right = 0; } else if ( typeof widthInt !== "undefined" && typeof heightInt !== "undefined" ) { // var quotient = heightInt / widthInt; var paddingTop = isNaN(quotient) ? "100%" : "".concat(quotient * 100, "%"); if (layout === "responsive") { // wrapperStyle.display = "block"; wrapperStyle.position = "relative"; hasSizer = true; sizerStyle.paddingTop = paddingTop; } else if (layout === "intrinsic") { // wrapperStyle.display = "inline-block"; wrapperStyle.position = "relative"; wrapperStyle.maxWidth = "100%"; hasSizer = true; sizerStyle.maxWidth = "100%"; sizerSvgUrl = "data:image/svg+xml,%3csvg%20xmlns=%27http://www.w3.org/2000/svg%27%20version=%271.1%27%20width=%27" .concat(widthInt, "%27%20height=%27") .concat(heightInt, "%27/%3e"); } else if (layout === "fixed") { // wrapperStyle.display = "inline-block"; wrapperStyle.position = "relative"; wrapperStyle.width = widthInt; wrapperStyle.height = heightInt; } } else { // if (false) { } } var imgAttributes = { src: emptyDataURL, srcSet: undefined, sizes: undefined, }; if (isVisible) { imgAttributes = generateImgAttrs({ config: config, src: src, unoptimized: unoptimized, layout: layout, width: widthInt, quality: qualityInt, sizes: sizes, loader: loader, }); } var srcString = src; if (false) { var fullUrl; } var imageSrcSetPropName = "imagesrcset"; var imageSizesPropName = "imagesizes"; if (true) { imageSrcSetPropName = "imageSrcSet"; imageSizesPropName = "imageSizes"; } var _obj; var linkProps = ((_obj = {}), // Note: imagesrcset and imagesizes are not in the link element type with react 17. _defineProperty( _obj, imageSrcSetPropName, imgAttributes.srcSet ), _defineProperty( _obj, imageSizesPropName, imgAttributes.sizes ), _obj); var useLayoutEffect = false ? 0 : _react.default.useLayoutEffect; var onLoadingCompleteRef = (0, _react).useRef( onLoadingComplete ); var previousImageSrc = (0, _react).useRef(src); (0, _react).useEffect( function () { onLoadingCompleteRef.current = onLoadingComplete; }, [onLoadingComplete] ); useLayoutEffect( function () { if (previousImageSrc.current !== src) { resetIntersected(); previousImageSrc.current = src; } }, [resetIntersected, src] ); var imgElementArgs = _objectSpread( { isLazy: isLazy, imgAttributes: imgAttributes, heightInt: heightInt, widthInt: widthInt, qualityInt: qualityInt, layout: layout, className: className, imgStyle: imgStyle, blurStyle: blurStyle, loading: loading, config: config, unoptimized: unoptimized, placeholder: placeholder, loader: loader, srcString: srcString, onLoadingCompleteRef: onLoadingCompleteRef, setBlurComplete: setBlurComplete, setIntersection: setIntersection, isVisible: isVisible, }, rest ); return /*#__PURE__*/ _react.default.createElement( _react.default.Fragment, null, layout === "raw" ? /*#__PURE__*/ _react.default.createElement( ImageElement, Object.assign({}, imgElementArgs) ) : /*#__PURE__*/ _react.default.createElement( "span", { style: wrapperStyle, }, hasSizer ? /*#__PURE__*/ _react.default.createElement( "span", { style: sizerStyle, }, sizerSvgUrl ? /*#__PURE__*/ _react.default.createElement( "img", { style: { display: "block", maxWidth: "100%", width: "initial", height: "initial", background: "none", opacity: 1, border: 0, margin: 0, padding: 0, }, alt: "", "aria-hidden": true, src: sizerSvgUrl, } ) : null ) : null, /*#__PURE__*/ _react.default.createElement( ImageElement, Object.assign({}, imgElementArgs) ) ), priority // for browsers that do not support `imagesrcset`, and in those cases ? // it would likely cause the incorrect image to be preloaded. // // https://html.spec.whatwg.org/multipage/semantics.html#attr-link-imagesrcset /*#__PURE__*/ _react.default.createElement( _head.default, null, /*#__PURE__*/ _react.default.createElement( "link", Object.assign( { key: "__nimg-" + imgAttributes.src + imgAttributes.srcSet + imgAttributes.sizes, rel: "preload", as: "image", href: imgAttributes.srcSet ? undefined : imgAttributes.src, }, linkProps ) ) ) : null ); } function _defineProperty1(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 _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj, }; } function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if ( Object.prototype.hasOwnProperty.call(obj, key) ) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor( obj, key ) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } function _objectSpread(target) { var _arguments = arguments, _loop = function (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) { _defineProperty1(target, key, source[key]); }); }; for (var i = 1; i < arguments.length; i++) _loop(i); return target; } function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if ( !Object.prototype.propertyIsEnumerable.call( source, key ) ) continue; target[key] = source[key]; } } return target; } function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; } var ref; var experimentalLayoutRaw = (ref = { deviceSizes: [640, 750, 828, 1080, 1200, 1920, 2048, 3840], imageSizes: [16, 32, 48, 64, 96, 128, 256, 384], path: "/_next/image", loader: "default", experimentalLayoutRaw: false, }) === null || ref === void 0 ? void 0 : ref.experimentalLayoutRaw; var configEnv = { deviceSizes: [640, 750, 828, 1080, 1200, 1920, 2048, 3840], imageSizes: [16, 32, 48, 64, 96, 128, 256, 384], path: "/_next/image", loader: "default", experimentalLayoutRaw: false, }; var loadedImageURLs = new Set(); var allImgs = new Map(); var perfObserver; var emptyDataURL = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"; if (false) { } var VALID_LOADING_VALUES = /* unused pure expression or super */ null && [ "lazy", "eager", undefined, ]; var loaders = new Map([ ["default", defaultLoader], ["imgix", imgixLoader], ["cloudinary", cloudinaryLoader], ["akamai", akamaiLoader], ["custom", customLoader], ]); var VALID_LAYOUT_VALUES = /* unused pure expression or super */ null && [ "fill", "fixed", "intrinsic", "responsive", "raw", undefined, ]; function isStaticRequire(src) { return src.default !== undefined; } function isStaticImageData(src) { return src.src !== undefined; } function isStaticImport(src) { return ( typeof src === "object" && (isStaticRequire(src) || isStaticImageData(src)) ); } function getWidths(param, width, layout, sizes) { var deviceSizes = param.deviceSizes, allSizes = param.allSizes; if ( sizes && (layout === "fill" || layout === "responsive" || layout === "raw") ) { // Find all the "vw" percent sizes used in the sizes prop var viewportWidthRe = /(^|\s)(1?\d?\d)vw/g; var percentSizes = []; for ( var match; (match = viewportWidthRe.exec(sizes)); match ) { percentSizes.push(parseInt(match[2])); } if (percentSizes.length) { var _Math; var smallestRatio = (_Math = Math).min.apply( _Math, _toConsumableArray(percentSizes) ) * 0.01; return { widths: allSizes.filter(function (s) { return s >= deviceSizes[0] * smallestRatio; }), kind: "w", }; } return { widths: allSizes, kind: "w", }; } if ( typeof width !== "number" || layout === "fill" || layout === "responsive" ) { return { widths: deviceSizes, kind: "w", }; } var widths = _toConsumableArray( new Set( // > are actually 3x in the green color, but only 1.5x in the red and // > blue colors. Showing a 3x resolution image in the app vs a 2x // > resolution image will be visually the same, though the 3x image // > takes significantly more data. Even true 3x resolution screens are // > wasteful as the human eye cannot see that level of detail without // > something like a magnifying glass. // https://blog.twitter.com/engineering/en_us/topics/infrastructure/2019/capping-image-fidelity-on-ultra-high-resolution-devices.html [width, width * 2 /*, width * 3*/].map(function (w) { return ( allSizes.find(function (p) { return p >= w; }) || allSizes[allSizes.length - 1] ); }) ) ); return { widths: widths, kind: "x", }; } function generateImgAttrs(param) { var config = param.config, src = param.src, unoptimized = param.unoptimized, layout = param.layout, width = param.width, quality = param.quality, sizes = param.sizes, loader = param.loader; if (unoptimized) { return { src: src, srcSet: undefined, sizes: undefined, }; } var ref3 = getWidths(config, width, layout, sizes), widths = ref3.widths, kind = ref3.kind; var last = widths.length - 1; return { sizes: !sizes && kind === "w" ? "100vw" : sizes, srcSet: widths .map(function (w, i) { return "" .concat( loader({ config: config, src: src, quality: quality, width: w, }), " " ) .concat(kind === "w" ? w : i + 1) .concat(kind); }) .join(", "), // It's intended to keep `src` the last attribute because React updates // attributes in order. If we keep `src` the first one, Safari will // immediately start to fetch `src`, before `sizes` and `srcSet` are even // updated by React. That causes multiple unnecessary requests if `srcSet` // and `sizes` are defined. // This bug cannot be reproduced in Chrome or Firefox. src: loader({ config: config, src: src, quality: quality, width: widths[last], }), }; } function getInt(x) { if (typeof x === "number") { return x; } if (typeof x === "string") { return parseInt(x, 10); } return undefined; } function defaultImageLoader(loaderProps) { var ref2; var loaderKey = ((ref2 = loaderProps.config) === null || ref2 === void 0 ? void 0 : ref2.loader) || "default"; var load = loaders.get(loaderKey); if (load) { return load(loaderProps); } throw new Error( 'Unknown "loader" found in "next.config.js". Expected: ' .concat( _imageConfig.VALID_LOADERS.join(", "), ". Received: " ) .concat(loaderKey) ); } // See https://stackoverflow.com/q/39777833/266535 for why we use this ref // handler instead of the img's onLoad attribute. function handleLoading( img, src, layout, placeholder, onLoadingCompleteRef, setBlurComplete ) { if ( !img || img.src === emptyDataURL || img["data-loaded-src"] === src ) { return; } img["data-loaded-src"] = src; var p = "decode" in img ? img.decode() : Promise.resolve(); p.catch(function () {}).then(function () { if (!img.parentNode) { // Exit early in case of race condition: // - onload() is called // - decode() is called but incomplete // - unmount is called // - decode() completes return; } loadedImageURLs.add(src); if (placeholder === "blur") { setBlurComplete(true); } if ( onLoadingCompleteRef === null || onLoadingCompleteRef === void 0 ? void 0 : onLoadingCompleteRef.current ) { var naturalWidth = img.naturalWidth, naturalHeight = img.naturalHeight; // Pass back read-only primitive values but not the // underlying DOM element because it could be misused. onLoadingCompleteRef.current({ naturalWidth: naturalWidth, naturalHeight: naturalHeight, }); } if (false) { var parent, widthModified, heightModified, ref3; } }); } var ImageElement = function (_param) { var imgAttributes = _param.imgAttributes, heightInt = _param.heightInt, widthInt = _param.widthInt, qualityInt = _param.qualityInt, layout = _param.layout, className = _param.className, imgStyle = _param.imgStyle, blurStyle = _param.blurStyle, isLazy = _param.isLazy, placeholder = _param.placeholder, loading = _param.loading, srcString = _param.srcString, config = _param.config, unoptimized = _param.unoptimized, loader = _param.loader, onLoadingCompleteRef = _param.onLoadingCompleteRef, setBlurComplete = _param.setBlurComplete, setIntersection = _param.setIntersection, onLoad = _param.onLoad, onError = _param.onError, isVisible = _param.isVisible, rest = _objectWithoutProperties(_param, [ "imgAttributes", "heightInt", "widthInt", "qualityInt", "layout", "className", "imgStyle", "blurStyle", "isLazy", "placeholder", "loading", "srcString", "config", "unoptimized", "loader", "onLoadingCompleteRef", "setBlurComplete", "setIntersection", "onLoad", "onError", "isVisible", ]); return /*#__PURE__*/ _react.default.createElement( _react.default.Fragment, null, /*#__PURE__*/ _react.default.createElement( "img", Object.assign( {}, rest, imgAttributes, layout === "raw" ? { height: heightInt, width: widthInt, } : {}, { decoding: "async", "data-nimg": layout, className: className, style: _objectSpread({}, imgStyle, blurStyle), ref: (0, _react).useCallback( function (img) { setIntersection(img); if ( img === null || img === void 0 ? void 0 : img.complete ) { handleLoading( img, srcString, layout, placeholder, onLoadingCompleteRef, setBlurComplete ); } }, [ setIntersection, srcString, layout, placeholder, onLoadingCompleteRef, setBlurComplete, ] ), onLoad: function (event) { var img = event.currentTarget; handleLoading( img, srcString, layout, placeholder, onLoadingCompleteRef, setBlurComplete ); if (onLoad) { onLoad(event); } }, onError: function (event) { if (placeholder === "blur") { // If the real image fails to load, this will still remove the placeholder. setBlurComplete(true); } if (onError) { onError(event); } }, } ) ), (isLazy || placeholder === "blur") && /*#__PURE__*/ _react.default.createElement( "noscript", null, /*#__PURE__*/ _react.default.createElement( "img", Object.assign( {}, rest, generateImgAttrs({ config: config, src: srcString, unoptimized: unoptimized, layout: layout, width: widthInt, quality: qualityInt, sizes: imgAttributes.sizes, loader: loader, }), layout === "raw" ? { height: heightInt, width: widthInt, } : {}, { decoding: "async", "data-nimg": layout, style: imgStyle, className: className, // @ts-ignore - TODO: upgrade to `@types/react@17` loading: loading || "lazy", } ) ) ) ); }; function normalizeSrc(src) { return src[0] === "/" ? src.slice(1) : src; } function imgixLoader(param) { var config = param.config, src = param.src, width = param.width, quality = param.quality; // Demo: https://static.imgix.net/daisy.png?auto=format&fit=max&w=300 var url = new URL( "".concat(config.path).concat(normalizeSrc(src)) ); var params = url.searchParams; params.set("auto", params.get("auto") || "format"); params.set("fit", params.get("fit") || "max"); params.set("w", params.get("w") || width.toString()); if (quality) { params.set("q", quality.toString()); } return url.href; } function akamaiLoader(param) { var config = param.config, src = param.src, width = param.width; return "" .concat(config.path) .concat(normalizeSrc(src), "?imwidth=") .concat(width); } function cloudinaryLoader(param) { var config = param.config, src = param.src, width = param.width, quality = param.quality; // Demo: https://res.cloudinary.com/demo/image/upload/w_300,c_limit,q_auto/turtles.jpg var params = [ "f_auto", "c_limit", "w_" + width, "q_" + (quality || "auto"), ]; var paramsString = params.join(",") + "/"; return "" .concat(config.path) .concat(paramsString) .concat(normalizeSrc(src)); } function customLoader(param) { var src = param.src; throw new Error( 'Image with src "'.concat( src, '" is missing "loader" prop.' ) + "\nRead more: https://nextjs.org/docs/messages/next-image-missing-loader" ); } function defaultLoader(param) { var config = param.config, src = param.src, width = param.width, quality = param.quality; if (false) { var parsedSrc, missingValues; } if (src.endsWith(".svg") && !config.dangerouslyAllowSVG) { // Special case to make svg serve as-is to avoid proxying // through the built-in Image Optimization API. return src; } return "" .concat( (0, _normalizeTrailingSlash).normalizePathTrailingSlash( config.path ), "?url=" ) .concat(encodeURIComponent(src), "&w=") .concat(width, "&q=") .concat(quality || 75); } if ( typeof exports.default === "function" || (typeof exports.default === "object" && exports.default !== null) ) { Object.assign(exports.default, exports); module.exports = exports.default; } //# sourceMappingURL=image.js.map /***/ }, /***/ 9246: /***/ function (module, exports, __webpack_require__) { "use strict"; 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 _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; } function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : (typeof Symbol !== "undefined" && arr[Symbol.iterator]) || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for ( _i = _i.call(arr); !(_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 _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 _slicedToArray(arr, i) { return ( _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest() ); } 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(n); if ( n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n) ) return _arrayLikeToArray(o, minLen); } Object.defineProperty(exports, "__esModule", { value: true, }); exports.useIntersection = useIntersection; var _react = __webpack_require__(7294); var _requestIdleCallback = __webpack_require__(4686); var hasIntersectionObserver = typeof IntersectionObserver !== "undefined"; function useIntersection(param) { var rootRef = param.rootRef, rootMargin = param.rootMargin, disabled = param.disabled; var isDisabled = disabled || !hasIntersectionObserver; var unobserve = (0, _react).useRef(); var ref = _slicedToArray((0, _react).useState(false), 2), visible = ref[0], setVisible = ref[1]; var ref1 = _slicedToArray( (0, _react).useState(rootRef ? rootRef.current : null), 2 ), root = ref1[0], setRoot = ref1[1]; var setRef = (0, _react).useCallback( function (el) { if (unobserve.current) { unobserve.current(); unobserve.current = undefined; } if (isDisabled || visible) return; if (el && el.tagName) { unobserve.current = observe( el, function (isVisible) { return isVisible && setVisible(isVisible); }, { root: root, rootMargin: rootMargin, } ); } }, [isDisabled, root, rootMargin, visible] ); var resetVisible = (0, _react).useCallback(function () { setVisible(false); }, []); (0, _react).useEffect( function () { if (!hasIntersectionObserver) { if (!visible) { var idleCallback = (0, _requestIdleCallback).requestIdleCallback( function () { return setVisible(true); } ); return function () { return (0, _requestIdleCallback).cancelIdleCallback( idleCallback ); }; } } }, [visible] ); (0, _react).useEffect( function () { if (rootRef) setRoot(rootRef.current); }, [rootRef] ); return [setRef, visible, resetVisible]; } function observe(element, callback, options) { var ref = createObserver(options), id = ref.id, observer = ref.observer, elements = ref.elements; elements.set(element, callback); observer.observe(element); return function unobserve() { elements.delete(element); observer.unobserve(element); // Destroy observer when there's nothing left to watch: if (elements.size === 0) { observer.disconnect(); observers.delete(id); var index = idList.findIndex(function (obj) { return ( obj.root === id.root && obj.margin === id.margin ); }); if (index > -1) { idList.splice(index, 1); } } }; } var observers = new Map(); var idList = []; function createObserver(options) { var id = { root: options.root || null, margin: options.rootMargin || "", }; var existing = idList.find(function (obj) { return obj.root === id.root && obj.margin === id.margin; }); var instance; if (existing) { instance = observers.get(existing); } else { instance = observers.get(id); idList.push(id); } if (instance) { return instance; } var elements = new Map(); var observer = new IntersectionObserver(function (entries) { entries.forEach(function (entry) { var callback = elements.get(entry.target); var isVisible = entry.isIntersecting || entry.intersectionRatio > 0; if (callback && isVisible) { callback(isVisible); } }); }, options); observers.set( id, (instance = { id: id, observer: observer, elements: elements, }) ); return instance; } if ( typeof exports.default === "function" || (typeof exports.default === "object" && exports.default !== null) ) { Object.assign(exports.default, exports); module.exports = exports.default; } //# sourceMappingURL=use-intersection.js.map /***/ }, /***/ 7596: /***/ function ( module, __unused_webpack_exports, __webpack_require__ ) { var __dirname = "/"; /* provided dependency */ var process = __webpack_require__(3454); /* provided dependency */ var Buffer = __webpack_require__(1876)["Buffer"]; (function () { var e = { 901: function (e) { e.exports = function (e, r, n) { if (e.filter) return e.filter(r, n); if (void 0 === e || null === e) throw new TypeError(); if ("function" != typeof r) throw new TypeError(); var o = []; for (var a = 0; a < e.length; a++) { if (!t.call(e, a)) continue; var i = e[a]; if (r.call(n, i, a, e)) o.push(i); } return o; }; var t = Object.prototype.hasOwnProperty; }, 313: function (e, t, r) { "use strict"; function _typeof(e) { if ( typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ) { _typeof = function _typeof(e) { return typeof e; }; } else { _typeof = function _typeof(e) { return e && typeof Symbol === "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; }; } return _typeof(e); } function _classCallCheck(e, t) { if (!(e instanceof t)) { throw new TypeError( "Cannot call a class as a function" ); } } var n = r(823), o = n.codes, a = o.ERR_AMBIGUOUS_ARGUMENT, i = o.ERR_INVALID_ARG_TYPE, c = o.ERR_INVALID_ARG_VALUE, u = o.ERR_INVALID_RETURN_VALUE, f = o.ERR_MISSING_ARGS; var s = r(298); var p = r(650), l = p.inspect; var y = r(650).types, d = y.isPromise, g = y.isRegExp; var v = Object.assign ? Object.assign : r(274).assign; var b = Object.is ? Object.is : r(450); var h = new Map(); var m; var A; var S; var E; var P; function lazyLoadComparison() { var e = r(655); m = e.isDeepEqual; A = e.isDeepStrictEqual; } var w = /[\x00-\x08\x0b\x0c\x0e-\x1f]/g; var O = null && 0; var j = function escapeFn(e) { return O[e.charCodeAt(0)]; }; var _ = false; var x = (e.exports = ok); var I = {}; function innerFail(e) { if (e.message instanceof Error) throw e.message; throw new s(e); } function fail(e, t, r, n, o) { var a = arguments.length; var i; if (a === 0) { i = "Failed"; } else if (a === 1) { r = e; e = undefined; } else { if (_ === false) { _ = true; var c = process.emitWarning ? process.emitWarning : console.warn.bind(console); c( "assert.fail() with more than one argument is deprecated. " + "Please use assert.strictEqual() instead or only pass a message.", "DeprecationWarning", "DEP0094" ); } if (a === 2) n = "!="; } if (r instanceof Error) throw r; var u = { actual: e, expected: t, operator: n === undefined ? "fail" : n, stackStartFn: o || fail, }; if (r !== undefined) { u.message = r; } var f = new s(u); if (i) { f.message = i; f.generatedMessage = true; } throw f; } x.fail = fail; x.AssertionError = s; function innerOk(e, t, r, n) { if (!r) { var o = false; if (t === 0) { o = true; n = "No value argument passed to `assert.ok()`"; } else if (n instanceof Error) { throw n; } var a = new s({ actual: r, expected: true, message: n, operator: "==", stackStartFn: e, }); a.generatedMessage = o; throw a; } } function ok() { for ( var e = arguments.length, t = new Array(e), r = 0; r < e; r++ ) { t[r] = arguments[r]; } innerOk.apply(void 0, [ok, t.length].concat(t)); } x.ok = ok; x.equal = function equal(e, t, r) { if (arguments.length < 2) { throw new f("actual", "expected"); } if (e != t) { innerFail({ actual: e, expected: t, message: r, operator: "==", stackStartFn: equal, }); } }; x.notEqual = function notEqual(e, t, r) { if (arguments.length < 2) { throw new f("actual", "expected"); } if (e == t) { innerFail({ actual: e, expected: t, message: r, operator: "!=", stackStartFn: notEqual, }); } }; x.deepEqual = function deepEqual(e, t, r) { if (arguments.length < 2) { throw new f("actual", "expected"); } if (m === undefined) lazyLoadComparison(); if (!m(e, t)) { innerFail({ actual: e, expected: t, message: r, operator: "deepEqual", stackStartFn: deepEqual, }); } }; x.notDeepEqual = function notDeepEqual(e, t, r) { if (arguments.length < 2) { throw new f("actual", "expected"); } if (m === undefined) lazyLoadComparison(); if (m(e, t)) { innerFail({ actual: e, expected: t, message: r, operator: "notDeepEqual", stackStartFn: notDeepEqual, }); } }; x.deepStrictEqual = function deepStrictEqual(e, t, r) { if (arguments.length < 2) { throw new f("actual", "expected"); } if (m === undefined) lazyLoadComparison(); if (!A(e, t)) { innerFail({ actual: e, expected: t, message: r, operator: "deepStrictEqual", stackStartFn: deepStrictEqual, }); } }; x.notDeepStrictEqual = notDeepStrictEqual; function notDeepStrictEqual(e, t, r) { if (arguments.length < 2) { throw new f("actual", "expected"); } if (m === undefined) lazyLoadComparison(); if (A(e, t)) { innerFail({ actual: e, expected: t, message: r, operator: "notDeepStrictEqual", stackStartFn: notDeepStrictEqual, }); } } x.strictEqual = function strictEqual(e, t, r) { if (arguments.length < 2) { throw new f("actual", "expected"); } if (!b(e, t)) { innerFail({ actual: e, expected: t, message: r, operator: "strictEqual", stackStartFn: strictEqual, }); } }; x.notStrictEqual = function notStrictEqual(e, t, r) { if (arguments.length < 2) { throw new f("actual", "expected"); } if (b(e, t)) { innerFail({ actual: e, expected: t, message: r, operator: "notStrictEqual", stackStartFn: notStrictEqual, }); } }; var F = function Comparison(e, t, r) { var n = this; _classCallCheck(this, Comparison); t.forEach(function (t) { if (t in e) { if ( r !== undefined && typeof r[t] === "string" && g(e[t]) && e[t].test(r[t]) ) { n[t] = r[t]; } else { n[t] = e[t]; } } }); }; function compareExceptionKey(e, t, r, n, o, a) { if (!(r in e) || !A(e[r], t[r])) { if (!n) { var i = new F(e, o); var c = new F(t, o, e); var u = new s({ actual: i, expected: c, operator: "deepStrictEqual", stackStartFn: a, }); u.actual = e; u.expected = t; u.operator = a.name; throw u; } innerFail({ actual: e, expected: t, message: n, operator: a.name, stackStartFn: a, }); } } function expectedException(e, t, r, n) { if (typeof t !== "function") { if (g(t)) return t.test(e); if (arguments.length === 2) { throw new i( "expected", ["Function", "RegExp"], t ); } if (_typeof(e) !== "object" || e === null) { var o = new s({ actual: e, expected: t, message: r, operator: "deepStrictEqual", stackStartFn: n, }); o.operator = n.name; throw o; } var a = Object.keys(t); if (t instanceof Error) { a.push("name", "message"); } else if (a.length === 0) { throw new c( "error", t, "may not be an empty object" ); } if (m === undefined) lazyLoadComparison(); a.forEach(function (o) { if ( typeof e[o] === "string" && g(t[o]) && t[o].test(e[o]) ) { return; } compareExceptionKey(e, t, o, r, a, n); }); return true; } if (t.prototype !== undefined && e instanceof t) { return true; } if (Error.isPrototypeOf(t)) { return false; } return t.call({}, e) === true; } function getActual(e) { if (typeof e !== "function") { throw new i("fn", "Function", e); } try { e(); } catch (e) { return e; } return I; } function checkIsPromise(e) { return ( d(e) || (e !== null && _typeof(e) === "object" && typeof e.then === "function" && typeof e.catch === "function") ); } function waitForActual(e) { return Promise.resolve().then(function () { var t; if (typeof e === "function") { t = e(); if (!checkIsPromise(t)) { throw new u( "instance of Promise", "promiseFn", t ); } } else if (checkIsPromise(e)) { t = e; } else { throw new i( "promiseFn", ["Function", "Promise"], e ); } return Promise.resolve() .then(function () { return t; }) .then(function () { return I; }) .catch(function (e) { return e; }); }); } function expectsError(e, t, r, n) { if (typeof r === "string") { if (arguments.length === 4) { throw new i( "error", [ "Object", "Error", "Function", "RegExp", ], r ); } if (_typeof(t) === "object" && t !== null) { if (t.message === r) { throw new a( "error/message", 'The error message "'.concat( t.message, '" is identical to the message.' ) ); } } else if (t === r) { throw new a( "error/message", 'The error "'.concat( t, '" is identical to the message.' ) ); } n = r; r = undefined; } else if ( r != null && _typeof(r) !== "object" && typeof r !== "function" ) { throw new i( "error", ["Object", "Error", "Function", "RegExp"], r ); } if (t === I) { var o = ""; if (r && r.name) { o += " (".concat(r.name, ")"); } o += n ? ": ".concat(n) : "."; var c = e.name === "rejects" ? "rejection" : "exception"; innerFail({ actual: undefined, expected: r, operator: e.name, message: "Missing expected " .concat(c) .concat(o), stackStartFn: e, }); } if (r && !expectedException(t, r, n, e)) { throw t; } } function expectsNoError(e, t, r, n) { if (t === I) return; if (typeof r === "string") { n = r; r = undefined; } if (!r || expectedException(t, r)) { var o = n ? ": ".concat(n) : "."; var a = e.name === "doesNotReject" ? "rejection" : "exception"; innerFail({ actual: t, expected: r, operator: e.name, message: "Got unwanted " .concat(a) .concat(o, "\n") + 'Actual message: "'.concat( t && t.message, '"' ), stackStartFn: e, }); } throw t; } x.throws = function throws(e) { for ( var t = arguments.length, r = new Array(t > 1 ? t - 1 : 0), n = 1; n < t; n++ ) { r[n - 1] = arguments[n]; } expectsError.apply( void 0, [throws, getActual(e)].concat(r) ); }; x.rejects = function rejects(e) { for ( var t = arguments.length, r = new Array(t > 1 ? t - 1 : 0), n = 1; n < t; n++ ) { r[n - 1] = arguments[n]; } return waitForActual(e).then(function (e) { return expectsError.apply( void 0, [rejects, e].concat(r) ); }); }; x.doesNotThrow = function doesNotThrow(e) { for ( var t = arguments.length, r = new Array(t > 1 ? t - 1 : 0), n = 1; n < t; n++ ) { r[n - 1] = arguments[n]; } expectsNoError.apply( void 0, [doesNotThrow, getActual(e)].concat(r) ); }; x.doesNotReject = function doesNotReject(e) { for ( var t = arguments.length, r = new Array(t > 1 ? t - 1 : 0), n = 1; n < t; n++ ) { r[n - 1] = arguments[n]; } return waitForActual(e).then(function (e) { return expectsNoError.apply( void 0, [doesNotReject, e].concat(r) ); }); }; x.ifError = function ifError(e) { if (e !== null && e !== undefined) { var t = "ifError got unwanted exception: "; if ( _typeof(e) === "object" && typeof e.message === "string" ) { if ( e.message.length === 0 && e.constructor ) { t += e.constructor.name; } else { t += e.message; } } else { t += l(e); } var r = new s({ actual: e, expected: null, operator: "ifError", message: t, stackStartFn: ifError, }); var n = e.stack; if (typeof n === "string") { var o = n.split("\n"); o.shift(); var a = r.stack.split("\n"); for (var i = 0; i < o.length; i++) { var c = a.indexOf(o[i]); if (c !== -1) { a = a.slice(0, c); break; } } r.stack = "" .concat(a.join("\n"), "\n") .concat(o.join("\n")); } throw r; } }; function strict() { for ( var e = arguments.length, t = new Array(e), r = 0; r < e; r++ ) { t[r] = arguments[r]; } innerOk.apply(void 0, [strict, t.length].concat(t)); } x.strict = v(strict, x, { equal: x.strictEqual, deepEqual: x.deepStrictEqual, notEqual: x.notStrictEqual, notDeepEqual: x.notDeepStrictEqual, }); x.strict.strict = x.strict; }, 298: function (e, t, r) { "use strict"; function _objectSpread(e) { for (var t = 1; t < arguments.length; t++) { var r = arguments[t] != null ? arguments[t] : {}; var n = Object.keys(r); if ( typeof Object.getOwnPropertySymbols === "function" ) { n = n.concat( Object.getOwnPropertySymbols(r).filter( function (e) { return Object.getOwnPropertyDescriptor( r, e ).enumerable; } ) ); } n.forEach(function (t) { _defineProperty(e, t, r[t]); }); } return e; } function _defineProperty(e, t, r) { if (t in e) { Object.defineProperty(e, t, { value: r, enumerable: true, configurable: true, writable: true, }); } else { e[t] = r; } return e; } function _classCallCheck(e, t) { if (!(e instanceof t)) { throw new TypeError( "Cannot call a class as a function" ); } } function _defineProperties(e, t) { for (var r = 0; r < t.length; r++) { var n = t[r]; n.enumerable = n.enumerable || false; n.configurable = true; if ("value" in n) n.writable = true; Object.defineProperty(e, n.key, n); } } function _createClass(e, t, r) { if (t) _defineProperties(e.prototype, t); if (r) _defineProperties(e, r); return e; } function _possibleConstructorReturn(e, t) { if ( t && (_typeof(t) === "object" || typeof t === "function") ) { return t; } return _assertThisInitialized(e); } function _assertThisInitialized(e) { if (e === void 0) { throw new ReferenceError( "this hasn't been initialised - super() hasn't been called" ); } return e; } function _inherits(e, t) { if (typeof t !== "function" && t !== null) { throw new TypeError( "Super expression must either be null or a function" ); } e.prototype = Object.create(t && t.prototype, { constructor: { value: e, writable: true, configurable: true, }, }); if (t) _setPrototypeOf(e, t); } function _wrapNativeSuper(e) { var t = typeof Map === "function" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(e) { if (e === null || !_isNativeFunction(e)) return e; if (typeof e !== "function") { throw new TypeError( "Super expression must either be null or a function" ); } if (typeof t !== "undefined") { if (t.has(e)) return t.get(e); t.set(e, Wrapper); } function Wrapper() { return _construct( e, arguments, _getPrototypeOf(this).constructor ); } Wrapper.prototype = Object.create(e.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true, }, }); return _setPrototypeOf(Wrapper, e); }; return _wrapNativeSuper(e); } 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(e, t, r) { if (isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(e, t, r) { var n = [null]; n.push.apply(n, t); var o = Function.bind.apply(e, n); var a = new o(); if (r) _setPrototypeOf(a, r.prototype); return a; }; } return _construct.apply(null, arguments); } function _isNativeFunction(e) { return ( Function.toString .call(e) .indexOf("[native code]") !== -1 ); } function _setPrototypeOf(e, t) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(e, t) { e.__proto__ = t; return e; }; return _setPrototypeOf(e, t); } function _getPrototypeOf(e) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(e) { return ( e.__proto__ || Object.getPrototypeOf(e) ); }; return _getPrototypeOf(e); } function _typeof(e) { if ( typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ) { _typeof = function _typeof(e) { return typeof e; }; } else { _typeof = function _typeof(e) { return e && typeof Symbol === "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; }; } return _typeof(e); } var n = r(650), o = n.inspect; var a = r(823), i = a.codes.ERR_INVALID_ARG_TYPE; function endsWith(e, t, r) { if (r === undefined || r > e.length) { r = e.length; } return e.substring(r - t.length, r) === t; } function repeat(e, t) { t = Math.floor(t); if (e.length == 0 || t == 0) return ""; var r = e.length * t; t = Math.floor(Math.log(t) / Math.log(2)); while (t) { e += e; t--; } e += e.substring(0, r - e.length); return e; } var c = ""; var u = ""; var f = ""; var s = ""; var p = { 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:", }; var l = 10; function copyError(e) { var t = Object.keys(e); var r = Object.create(Object.getPrototypeOf(e)); t.forEach(function (t) { r[t] = e[t]; }); Object.defineProperty(r, "message", { value: e.message, }); return r; } function inspectValue(e) { return o(e, { compact: false, customInspect: false, depth: 1e3, maxArrayLength: Infinity, showHidden: false, breakLength: Infinity, showProxy: false, sorted: true, getters: true, }); } function createErrDiff(e, t, r) { var n = ""; var o = ""; var a = 0; var i = ""; var y = false; var d = inspectValue(e); var g = d.split("\n"); var v = inspectValue(t).split("\n"); var b = 0; var h = ""; if ( r === "strictEqual" && _typeof(e) === "object" && _typeof(t) === "object" && e !== null && t !== null ) { r = "strictEqualObject"; } if ( g.length === 1 && v.length === 1 && g[0] !== v[0] ) { var m = g[0].length + v[0].length; if (m <= l) { if ( (_typeof(e) !== "object" || e === null) && (_typeof(t) !== "object" || t === null) && (e !== 0 || t !== 0) ) { return ( "".concat(p[r], "\n\n") + "" .concat(g[0], " !== ") .concat(v[0], "\n") ); } } else if (r !== "strictEqualObject") { var A = process.stderr && process.stderr.isTTY ? process.stderr.columns : 80; if (m < A) { while (g[0][b] === v[0][b]) { b++; } if (b > 2) { h = "\n ".concat( repeat(" ", b), "^" ); b = 0; } } } } var S = g[g.length - 1]; var E = v[v.length - 1]; while (S === E) { if (b++ < 2) { i = "\n ".concat(S).concat(i); } else { n = S; } g.pop(); v.pop(); if (g.length === 0 || v.length === 0) break; S = g[g.length - 1]; E = v[v.length - 1]; } var P = Math.max(g.length, v.length); if (P === 0) { var w = d.split("\n"); if (w.length > 30) { w[26] = "".concat(c, "...").concat(s); while (w.length > 27) { w.pop(); } } return "" .concat(p.notIdentical, "\n\n") .concat(w.join("\n"), "\n"); } if (b > 3) { i = "\n".concat(c, "...").concat(s).concat(i); y = true; } if (n !== "") { i = "\n ".concat(n).concat(i); n = ""; } var O = 0; var j = p[r] + "\n" .concat(u, "+ actual") .concat(s, " ") .concat(f, "- expected") .concat(s); var _ = " " .concat(c, "...") .concat(s, " Lines skipped"); for (b = 0; b < P; b++) { var x = b - a; if (g.length < b + 1) { if (x > 1 && b > 2) { if (x > 4) { o += "\n" .concat(c, "...") .concat(s); y = true; } else if (x > 3) { o += "\n ".concat(v[b - 2]); O++; } o += "\n ".concat(v[b - 1]); O++; } a = b; n += "\n" .concat(f, "-") .concat(s, " ") .concat(v[b]); O++; } else if (v.length < b + 1) { if (x > 1 && b > 2) { if (x > 4) { o += "\n" .concat(c, "...") .concat(s); y = true; } else if (x > 3) { o += "\n ".concat(g[b - 2]); O++; } o += "\n ".concat(g[b - 1]); O++; } a = b; o += "\n" .concat(u, "+") .concat(s, " ") .concat(g[b]); O++; } else { var I = v[b]; var F = g[b]; var k = F !== I && (!endsWith(F, ",") || F.slice(0, -1) !== I); if ( k && endsWith(I, ",") && I.slice(0, -1) === F ) { k = false; F += ","; } if (k) { if (x > 1 && b > 2) { if (x > 4) { o += "\n" .concat(c, "...") .concat(s); y = true; } else if (x > 3) { o += "\n ".concat(g[b - 2]); O++; } o += "\n ".concat(g[b - 1]); O++; } a = b; o += "\n" .concat(u, "+") .concat(s, " ") .concat(F); n += "\n" .concat(f, "-") .concat(s, " ") .concat(I); O += 2; } else { o += n; n = ""; if (x === 1 || b === 0) { o += "\n ".concat(F); O++; } } } if (O > 20 && b < P - 2) { return ( "" .concat(j) .concat(_, "\n") .concat(o, "\n") .concat(c, "...") .concat(s) .concat(n, "\n") + "".concat(c, "...").concat(s) ); } } return "" .concat(j) .concat(y ? _ : "", "\n") .concat(o) .concat(n) .concat(i) .concat(h); } var y = (function (e) { _inherits(AssertionError, e); function AssertionError(e) { var t; _classCallCheck(this, AssertionError); if (_typeof(e) !== "object" || e === null) { throw new i("options", "Object", e); } var r = e.message, n = e.operator, o = e.stackStartFn; var a = e.actual, l = e.expected; var y = Error.stackTraceLimit; Error.stackTraceLimit = 0; if (r != null) { t = _possibleConstructorReturn( this, _getPrototypeOf(AssertionError).call( this, String(r) ) ); } else { if ( process.stderr && process.stderr.isTTY ) { if ( process.stderr && process.stderr.getColorDepth && process.stderr.getColorDepth() !== 1 ) { c = ""; u = ""; s = ""; f = ""; } else { c = ""; u = ""; s = ""; f = ""; } } if ( _typeof(a) === "object" && a !== null && _typeof(l) === "object" && l !== null && "stack" in a && a instanceof Error && "stack" in l && l instanceof Error ) { a = copyError(a); l = copyError(l); } if ( n === "deepStrictEqual" || n === "strictEqual" ) { t = _possibleConstructorReturn( this, _getPrototypeOf( AssertionError ).call(this, createErrDiff(a, l, n)) ); } else if ( n === "notDeepStrictEqual" || n === "notStrictEqual" ) { var d = p[n]; var g = inspectValue(a).split("\n"); if ( n === "notStrictEqual" && _typeof(a) === "object" && a !== null ) { d = p.notStrictEqualObject; } if (g.length > 30) { g[26] = "" .concat(c, "...") .concat(s); while (g.length > 27) { g.pop(); } } if (g.length === 1) { t = _possibleConstructorReturn( this, _getPrototypeOf( AssertionError ).call( this, "" .concat(d, " ") .concat(g[0]) ) ); } else { t = _possibleConstructorReturn( this, _getPrototypeOf( AssertionError ).call( this, "" .concat(d, "\n\n") .concat( g.join("\n"), "\n" ) ) ); } } else { var v = inspectValue(a); var b = ""; var h = p[n]; if ( n === "notDeepEqual" || n === "notEqual" ) { v = "" .concat(p[n], "\n\n") .concat(v); if (v.length > 1024) { v = "".concat( v.slice(0, 1021), "..." ); } } else { b = "".concat(inspectValue(l)); if (v.length > 512) { v = "".concat( v.slice(0, 509), "..." ); } if (b.length > 512) { b = "".concat( b.slice(0, 509), "..." ); } if ( n === "deepEqual" || n === "equal" ) { v = "" .concat(h, "\n\n") .concat( v, "\n\nshould equal\n\n" ); } else { b = " " .concat(n, " ") .concat(b); } } t = _possibleConstructorReturn( this, _getPrototypeOf( AssertionError ).call(this, "".concat(v).concat(b)) ); } } Error.stackTraceLimit = y; t.generatedMessage = !r; Object.defineProperty( _assertThisInitialized(t), "name", { value: "AssertionError [ERR_ASSERTION]", enumerable: false, writable: true, configurable: true, } ); t.code = "ERR_ASSERTION"; t.actual = a; t.expected = l; t.operator = n; if (Error.captureStackTrace) { Error.captureStackTrace( _assertThisInitialized(t), o ); } t.stack; t.name = "AssertionError"; return _possibleConstructorReturn(t); } _createClass(AssertionError, [ { key: "toString", value: function toString() { return "" .concat(this.name, " [") .concat(this.code, "]: ") .concat(this.message); }, }, { key: o.custom, value: function value(e, t) { return o( this, _objectSpread({}, t, { customInspect: false, depth: 0, }) ); }, }, ]); return AssertionError; })(_wrapNativeSuper(Error)); e.exports = y; }, 823: function (e, t, r) { "use strict"; function _typeof(e) { if ( typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ) { _typeof = function _typeof(e) { return typeof e; }; } else { _typeof = function _typeof(e) { return e && typeof Symbol === "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; }; } return _typeof(e); } function _classCallCheck(e, t) { if (!(e instanceof t)) { throw new TypeError( "Cannot call a class as a function" ); } } function _possibleConstructorReturn(e, t) { if ( t && (_typeof(t) === "object" || typeof t === "function") ) { return t; } return _assertThisInitialized(e); } function _assertThisInitialized(e) { if (e === void 0) { throw new ReferenceError( "this hasn't been initialised - super() hasn't been called" ); } return e; } function _getPrototypeOf(e) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(e) { return ( e.__proto__ || Object.getPrototypeOf(e) ); }; return _getPrototypeOf(e); } function _inherits(e, t) { if (typeof t !== "function" && t !== null) { throw new TypeError( "Super expression must either be null or a function" ); } e.prototype = Object.create(t && t.prototype, { constructor: { value: e, writable: true, configurable: true, }, }); if (t) _setPrototypeOf(e, t); } function _setPrototypeOf(e, t) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(e, t) { e.__proto__ = t; return e; }; return _setPrototypeOf(e, t); } var n = {}; var o; var a; function createErrorType(e, t, r) { if (!r) { r = Error; } function getMessage(e, r, n) { if (typeof t === "string") { return t; } else { return t(e, r, n); } } var o = (function (t) { _inherits(NodeError, t); function NodeError(t, r, n) { var o; _classCallCheck(this, NodeError); o = _possibleConstructorReturn( this, _getPrototypeOf(NodeError).call( this, getMessage(t, r, n) ) ); o.code = e; return o; } return NodeError; })(r); n[e] = o; } function oneOf(e, t) { if (Array.isArray(e)) { var r = e.length; e = e.map(function (e) { return String(e); }); if (r > 2) { return ( "one of " .concat(t, " ") .concat( e.slice(0, r - 1).join(", "), ", or " ) + e[r - 1] ); } else if (r === 2) { return "one of " .concat(t, " ") .concat(e[0], " or ") .concat(e[1]); } else { return "of ".concat(t, " ").concat(e[0]); } } else { return "of ".concat(t, " ").concat(String(e)); } } function startsWith(e, t, r) { return ( e.substr(!r || r < 0 ? 0 : +r, t.length) === t ); } function endsWith(e, t, r) { if (r === undefined || r > e.length) { r = e.length; } return e.substring(r - t.length, r) === t; } function includes(e, t, r) { if (typeof r !== "number") { r = 0; } if (r + t.length > e.length) { return false; } else { return e.indexOf(t, r) !== -1; } } createErrorType( "ERR_AMBIGUOUS_ARGUMENT", 'The "%s" argument is ambiguous. %s', TypeError ); createErrorType( "ERR_INVALID_ARG_TYPE", function (e, t, n) { if (o === undefined) o = r(313); o( typeof e === "string", "'name' must be a string" ); var a; if ( typeof t === "string" && startsWith(t, "not ") ) { a = "must not be"; t = t.replace(/^not /, ""); } else { a = "must be"; } var i; if (endsWith(e, " argument")) { i = "The " .concat(e, " ") .concat(a, " ") .concat(oneOf(t, "type")); } else { var c = includes(e, ".") ? "property" : "argument"; i = 'The "' .concat(e, '" ') .concat(c, " ") .concat(a, " ") .concat(oneOf(t, "type")); } i += ". Received type ".concat(_typeof(n)); return i; }, TypeError ); createErrorType( "ERR_INVALID_ARG_VALUE", function (e, t) { var n = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : "is invalid"; if (a === undefined) a = r(650); var o = a.inspect(t); if (o.length > 128) { o = "".concat(o.slice(0, 128), "..."); } return "The argument '" .concat(e, "' ") .concat(n, ". Received ") .concat(o); }, TypeError, RangeError ); createErrorType( "ERR_INVALID_RETURN_VALUE", function (e, t, r) { var n; if (r && r.constructor && r.constructor.name) { n = "instance of ".concat( r.constructor.name ); } else { n = "type ".concat(_typeof(r)); } return ( "Expected " .concat(e, ' to be returned from the "') .concat(t, '"') + " function but got ".concat(n, ".") ); }, TypeError ); createErrorType( "ERR_MISSING_ARGS", function () { for ( var e = arguments.length, t = new Array(e), n = 0; n < e; n++ ) { t[n] = arguments[n]; } if (o === undefined) o = r(313); o( t.length > 0, "At least one arg needs to be specified" ); var a = "The "; var i = t.length; t = t.map(function (e) { return '"'.concat(e, '"'); }); switch (i) { case 1: a += "".concat(t[0], " argument"); break; case 2: a += "" .concat(t[0], " and ") .concat(t[1], " arguments"); break; default: a += t.slice(0, i - 1).join(", "); a += ", and ".concat( t[i - 1], " arguments" ); break; } return "".concat(a, " must be specified"); }, TypeError ); e.exports.codes = n; }, 655: function (e, t, r) { "use strict"; function _slicedToArray(e, t) { return ( _arrayWithHoles(e) || _iterableToArrayLimit(e, t) || _nonIterableRest() ); } function _nonIterableRest() { throw new TypeError( "Invalid attempt to destructure non-iterable instance" ); } function _iterableToArrayLimit(e, t) { var r = []; var n = true; var o = false; var a = undefined; try { for ( var i = e[Symbol.iterator](), c; !(n = (c = i.next()).done); n = true ) { r.push(c.value); if (t && r.length === t) break; } } catch (e) { o = true; a = e; } finally { try { if (!n && i["return"] != null) i["return"](); } finally { if (o) throw a; } } return r; } function _arrayWithHoles(e) { if (Array.isArray(e)) return e; } function _typeof(e) { if ( typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ) { _typeof = function _typeof(e) { return typeof e; }; } else { _typeof = function _typeof(e) { return e && typeof Symbol === "function" && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : typeof e; }; } return _typeof(e); } var n = /a/g.flags !== undefined; var o = function arrayFromSet(e) { var t = []; e.forEach(function (e) { return t.push(e); }); return t; }; var a = function arrayFromMap(e) { var t = []; e.forEach(function (e, r) { return t.push([r, e]); }); return t; }; var i = Object.is ? Object.is : r(450); var c = Object.getOwnPropertySymbols ? Object.getOwnPropertySymbols : function () { return []; }; var u = Number.isNaN ? Number.isNaN : r(674); function uncurryThis(e) { return e.call.bind(e); } var f = uncurryThis(Object.prototype.hasOwnProperty); var s = uncurryThis( Object.prototype.propertyIsEnumerable ); var p = uncurryThis(Object.prototype.toString); var l = r(650).types, y = l.isAnyArrayBuffer, d = l.isArrayBufferView, g = l.isDate, v = l.isMap, b = l.isRegExp, h = l.isSet, m = l.isNativeError, A = l.isBoxedPrimitive, S = l.isNumberObject, E = l.isStringObject, P = l.isBooleanObject, w = l.isBigIntObject, O = l.isSymbolObject, j = l.isFloat32Array, _ = l.isFloat64Array; function isNonIndex(e) { if (e.length === 0 || e.length > 10) return true; for (var t = 0; t < e.length; t++) { var r = e.charCodeAt(t); if (r < 48 || r > 57) return true; } return e.length === 10 && e >= Math.pow(2, 32); } function getOwnNonIndexProperties(e) { return Object.keys(e) .filter(isNonIndex) .concat( c(e).filter( Object.prototype.propertyIsEnumerable.bind( e ) ) ); } /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */ function compare(e, t) { if (e === t) { return 0; } var r = e.length; var n = t.length; for (var o = 0, a = Math.min(r, n); o < a; ++o) { if (e[o] !== t[o]) { r = e[o]; n = t[o]; break; } } if (r < n) { return -1; } if (n < r) { return 1; } return 0; } var x = undefined; var I = true; var F = false; var k = 0; var R = 1; var T = 2; var N = 3; function areSimilarRegExps(e, t) { return n ? e.source === t.source && e.flags === t.flags : RegExp.prototype.toString.call(e) === RegExp.prototype.toString.call(t); } function areSimilarFloatArrays(e, t) { if (e.byteLength !== t.byteLength) { return false; } for (var r = 0; r < e.byteLength; r++) { if (e[r] !== t[r]) { return false; } } return true; } function areSimilarTypedArrays(e, t) { if (e.byteLength !== t.byteLength) { return false; } return ( compare( new Uint8Array( e.buffer, e.byteOffset, e.byteLength ), new Uint8Array( t.buffer, t.byteOffset, t.byteLength ) ) === 0 ); } function areEqualArrayBuffers(e, t) { return ( e.byteLength === t.byteLength && compare( new Uint8Array(e), new Uint8Array(t) ) === 0 ); } function isEqualBoxedPrimitive(e, t) { if (S(e)) { return ( S(t) && i( Number.prototype.valueOf.call(e), Number.prototype.valueOf.call(t) ) ); } if (E(e)) { return ( E(t) && String.prototype.valueOf.call(e) === String.prototype.valueOf.call(t) ); } if (P(e)) { return ( P(t) && Boolean.prototype.valueOf.call(e) === Boolean.prototype.valueOf.call(t) ); } if (w(e)) { return ( w(t) && BigInt.prototype.valueOf.call(e) === BigInt.prototype.valueOf.call(t) ); } return ( O(t) && Symbol.prototype.valueOf.call(e) === Symbol.prototype.valueOf.call(t) ); } function innerDeepEqual(e, t, r, n) { if (e === t) { if (e !== 0) return true; return r ? i(e, t) : true; } if (r) { if (_typeof(e) !== "object") { return ( typeof e === "number" && u(e) && u(t) ); } if ( _typeof(t) !== "object" || e === null || t === null ) { return false; } if ( Object.getPrototypeOf(e) !== Object.getPrototypeOf(t) ) { return false; } } else { if (e === null || _typeof(e) !== "object") { if (t === null || _typeof(t) !== "object") { return e == t; } return false; } if (t === null || _typeof(t) !== "object") { return false; } } var o = p(e); var a = p(t); if (o !== a) { return false; } if (Array.isArray(e)) { if (e.length !== t.length) { return false; } var c = getOwnNonIndexProperties(e, x); var f = getOwnNonIndexProperties(t, x); if (c.length !== f.length) { return false; } return keyCheck(e, t, r, n, R, c); } if (o === "[object Object]") { if ((!v(e) && v(t)) || (!h(e) && h(t))) { return false; } } if (g(e)) { if ( !g(t) || Date.prototype.getTime.call(e) !== Date.prototype.getTime.call(t) ) { return false; } } else if (b(e)) { if (!b(t) || !areSimilarRegExps(e, t)) { return false; } } else if (m(e) || e instanceof Error) { if ( e.message !== t.message || e.name !== t.name ) { return false; } } else if (d(e)) { if (!r && (j(e) || _(e))) { if (!areSimilarFloatArrays(e, t)) { return false; } } else if (!areSimilarTypedArrays(e, t)) { return false; } var s = getOwnNonIndexProperties(e, x); var l = getOwnNonIndexProperties(t, x); if (s.length !== l.length) { return false; } return keyCheck(e, t, r, n, k, s); } else if (h(e)) { if (!h(t) || e.size !== t.size) { return false; } return keyCheck(e, t, r, n, T); } else if (v(e)) { if (!v(t) || e.size !== t.size) { return false; } return keyCheck(e, t, r, n, N); } else if (y(e)) { if (!areEqualArrayBuffers(e, t)) { return false; } } else if (A(e) && !isEqualBoxedPrimitive(e, t)) { return false; } return keyCheck(e, t, r, n, k); } function getEnumerables(e, t) { return t.filter(function (t) { return s(e, t); }); } function keyCheck(e, t, r, n, o, a) { if (arguments.length === 5) { a = Object.keys(e); var i = Object.keys(t); if (a.length !== i.length) { return false; } } var u = 0; for (; u < a.length; u++) { if (!f(t, a[u])) { return false; } } if (r && arguments.length === 5) { var p = c(e); if (p.length !== 0) { var l = 0; for (u = 0; u < p.length; u++) { var y = p[u]; if (s(e, y)) { if (!s(t, y)) { return false; } a.push(y); l++; } else if (s(t, y)) { return false; } } var d = c(t); if ( p.length !== d.length && getEnumerables(t, d).length !== l ) { return false; } } else { var g = c(t); if ( g.length !== 0 && getEnumerables(t, g).length !== 0 ) { return false; } } } if ( a.length === 0 && (o === k || (o === R && e.length === 0) || e.size === 0) ) { return true; } if (n === undefined) { n = { val1: new Map(), val2: new Map(), position: 0, }; } else { var v = n.val1.get(e); if (v !== undefined) { var b = n.val2.get(t); if (b !== undefined) { return v === b; } } n.position++; } n.val1.set(e, n.position); n.val2.set(t, n.position); var h = objEquiv(e, t, r, a, n, o); n.val1.delete(e); n.val2.delete(t); return h; } function setHasEqualElement(e, t, r, n) { var a = o(e); for (var i = 0; i < a.length; i++) { var c = a[i]; if (innerDeepEqual(t, c, r, n)) { e.delete(c); return true; } } return false; } function findLooseMatchingPrimitives(e) { switch (_typeof(e)) { case "undefined": return null; case "object": return undefined; case "symbol": return false; case "string": e = +e; case "number": if (u(e)) { return false; } } return true; } function setMightHaveLoosePrim(e, t, r) { var n = findLooseMatchingPrimitives(r); if (n != null) return n; return t.has(n) && !e.has(n); } function mapMightHaveLoosePrim(e, t, r, n, o) { var a = findLooseMatchingPrimitives(r); if (a != null) { return a; } var i = t.get(a); if ( (i === undefined && !t.has(a)) || !innerDeepEqual(n, i, false, o) ) { return false; } return !e.has(a) && innerDeepEqual(n, i, false, o); } function setEquiv(e, t, r, n) { var a = null; var i = o(e); for (var c = 0; c < i.length; c++) { var u = i[c]; if (_typeof(u) === "object" && u !== null) { if (a === null) { a = new Set(); } a.add(u); } else if (!t.has(u)) { if (r) return false; if (!setMightHaveLoosePrim(e, t, u)) { return false; } if (a === null) { a = new Set(); } a.add(u); } } if (a !== null) { var f = o(t); for (var s = 0; s < f.length; s++) { var p = f[s]; if (_typeof(p) === "object" && p !== null) { if (!setHasEqualElement(a, p, r, n)) return false; } else if ( !r && !e.has(p) && !setHasEqualElement(a, p, r, n) ) { return false; } } return a.size === 0; } return true; } function mapHasEqualEntry(e, t, r, n, a, i) { var c = o(e); for (var u = 0; u < c.length; u++) { var f = c[u]; if ( innerDeepEqual(r, f, a, i) && innerDeepEqual(n, t.get(f), a, i) ) { e.delete(f); return true; } } return false; } function mapEquiv(e, t, r, n) { var o = null; var i = a(e); for (var c = 0; c < i.length; c++) { var u = _slicedToArray(i[c], 2), f = u[0], s = u[1]; if (_typeof(f) === "object" && f !== null) { if (o === null) { o = new Set(); } o.add(f); } else { var p = t.get(f); if ( (p === undefined && !t.has(f)) || !innerDeepEqual(s, p, r, n) ) { if (r) return false; if ( !mapMightHaveLoosePrim( e, t, f, s, n ) ) return false; if (o === null) { o = new Set(); } o.add(f); } } } if (o !== null) { var l = a(t); for (var y = 0; y < l.length; y++) { var d = _slicedToArray(l[y], 2), f = d[0], g = d[1]; if (_typeof(f) === "object" && f !== null) { if (!mapHasEqualEntry(o, e, f, g, r, n)) return false; } else if ( !r && (!e.has(f) || !innerDeepEqual( e.get(f), g, false, n )) && !mapHasEqualEntry(o, e, f, g, false, n) ) { return false; } } return o.size === 0; } return true; } function objEquiv(e, t, r, n, o, a) { var i = 0; if (a === T) { if (!setEquiv(e, t, r, o)) { return false; } } else if (a === N) { if (!mapEquiv(e, t, r, o)) { return false; } } else if (a === R) { for (; i < e.length; i++) { if (f(e, i)) { if ( !f(t, i) || !innerDeepEqual(e[i], t[i], r, o) ) { return false; } } else if (f(t, i)) { return false; } else { var c = Object.keys(e); for (; i < c.length; i++) { var u = c[i]; if ( !f(t, u) || !innerDeepEqual( e[u], t[u], r, o ) ) { return false; } } if ( c.length !== Object.keys(t).length ) { return false; } return true; } } } for (i = 0; i < n.length; i++) { var s = n[i]; if (!innerDeepEqual(e[s], t[s], r, o)) { return false; } } return true; } function isDeepEqual(e, t) { return innerDeepEqual(e, t, F); } function isDeepStrictEqual(e, t) { return innerDeepEqual(e, t, I); } e.exports = { isDeepEqual: isDeepEqual, isDeepStrictEqual: isDeepStrictEqual, }; }, 749: function (e, t, r) { "use strict"; var n = r(91); var o = r(112); var a = o(n("String.prototype.indexOf")); e.exports = function callBoundIntrinsic(e, t) { var r = n(e, !!t); if ( typeof r === "function" && a(e, ".prototype.") > -1 ) { return o(r); } return r; }; }, 112: function (e, t, r) { "use strict"; var n = r(517); var o = r(91); var a = o("%Function.prototype.apply%"); var i = o("%Function.prototype.call%"); var c = o("%Reflect.apply%", true) || n.call(i, a); var u = o("%Object.getOwnPropertyDescriptor%", true); var f = o("%Object.defineProperty%", true); var s = o("%Math.max%"); if (f) { try { f({}, "a", { value: 1 }); } catch (e) { f = null; } } e.exports = function callBind(e) { var t = c(n, i, arguments); if (u && f) { var r = u(t, "length"); if (r.configurable) { f(t, "length", { value: 1 + s( 0, e.length - (arguments.length - 1) ), }); } } return t; }; var p = function applyBind() { return c(n, a, arguments); }; if (f) { f(e.exports, "apply", { value: p }); } else { e.exports.apply = p; } }, 91: function (e, t, r) { "use strict"; var n; var o = SyntaxError; var a = Function; var i = TypeError; var getEvalledConstructor = function (e) { try { return Function( '"use strict"; return (' + e + ").constructor;" )(); } catch (e) {} }; var c = Object.getOwnPropertyDescriptor; if (c) { try { c({}, ""); } catch (e) { c = null; } } var throwTypeError = function () { throw new i(); }; var u = c ? (function () { try { arguments.callee; return throwTypeError; } catch (e) { try { return c(arguments, "callee").get; } catch (e) { return throwTypeError; } } })() : throwTypeError; var f = r(449)(); var s = Object.getPrototypeOf || function (e) { return e.__proto__; }; var p = getEvalledConstructor("async function* () {}"); var l = p ? p.prototype : n; var y = l ? l.prototype : n; var d = typeof Uint8Array === "undefined" ? n : s(Uint8Array); var g = { "%AggregateError%": typeof AggregateError === "undefined" ? n : AggregateError, "%Array%": Array, "%ArrayBuffer%": typeof ArrayBuffer === "undefined" ? n : ArrayBuffer, "%ArrayIteratorPrototype%": f ? s([][Symbol.iterator]()) : n, "%AsyncFromSyncIteratorPrototype%": n, "%AsyncFunction%": getEvalledConstructor( "async function () {}" ), "%AsyncGenerator%": l, "%AsyncGeneratorFunction%": p, "%AsyncIteratorPrototype%": y ? s(y) : n, "%Atomics%": typeof Atomics === "undefined" ? n : Atomics, "%BigInt%": typeof BigInt === "undefined" ? n : BigInt, "%Boolean%": Boolean, "%DataView%": typeof DataView === "undefined" ? n : DataView, "%Date%": Date, "%decodeURI%": decodeURI, "%decodeURIComponent%": decodeURIComponent, "%encodeURI%": encodeURI, "%encodeURIComponent%": encodeURIComponent, "%Error%": Error, "%eval%": eval, "%EvalError%": EvalError, "%Float32Array%": typeof Float32Array === "undefined" ? n : Float32Array, "%Float64Array%": typeof Float64Array === "undefined" ? n : Float64Array, "%FinalizationRegistry%": typeof FinalizationRegistry === "undefined" ? n : FinalizationRegistry, "%Function%": a, "%GeneratorFunction%": getEvalledConstructor("function* () {}"), "%Int8Array%": typeof Int8Array === "undefined" ? n : Int8Array, "%Int16Array%": typeof Int16Array === "undefined" ? n : Int16Array, "%Int32Array%": typeof Int32Array === "undefined" ? n : Int32Array, "%isFinite%": isFinite, "%isNaN%": isNaN, "%IteratorPrototype%": f ? s(s([][Symbol.iterator]())) : n, "%JSON%": typeof JSON === "object" ? JSON : n, "%Map%": typeof Map === "undefined" ? n : Map, "%MapIteratorPrototype%": typeof Map === "undefined" || !f ? n : s(new Map()[Symbol.iterator]()), "%Math%": Math, "%Number%": Number, "%Object%": Object, "%parseFloat%": parseFloat, "%parseInt%": parseInt, "%Promise%": typeof Promise === "undefined" ? n : Promise, "%Proxy%": typeof Proxy === "undefined" ? n : Proxy, "%RangeError%": RangeError, "%ReferenceError%": ReferenceError, "%Reflect%": typeof Reflect === "undefined" ? n : Reflect, "%RegExp%": RegExp, "%Set%": typeof Set === "undefined" ? n : Set, "%SetIteratorPrototype%": typeof Set === "undefined" || !f ? n : s(new Set()[Symbol.iterator]()), "%SharedArrayBuffer%": typeof SharedArrayBuffer === "undefined" ? n : SharedArrayBuffer, "%String%": String, "%StringIteratorPrototype%": f ? s(""[Symbol.iterator]()) : n, "%Symbol%": f ? Symbol : n, "%SyntaxError%": o, "%ThrowTypeError%": u, "%TypedArray%": d, "%TypeError%": i, "%Uint8Array%": typeof Uint8Array === "undefined" ? n : Uint8Array, "%Uint8ClampedArray%": typeof Uint8ClampedArray === "undefined" ? n : Uint8ClampedArray, "%Uint16Array%": typeof Uint16Array === "undefined" ? n : Uint16Array, "%Uint32Array%": typeof Uint32Array === "undefined" ? n : Uint32Array, "%URIError%": URIError, "%WeakMap%": typeof WeakMap === "undefined" ? n : WeakMap, "%WeakRef%": typeof WeakRef === "undefined" ? n : WeakRef, "%WeakSet%": typeof WeakSet === "undefined" ? n : WeakSet, }; var v = { "%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 b = r(517); var h = r(793); var m = b.call(Function.call, Array.prototype.concat); var A = b.call(Function.apply, Array.prototype.splice); var S = b.call(Function.call, String.prototype.replace); var E = b.call(Function.call, String.prototype.slice); var P = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; var w = /\\(\\)?/g; var O = function stringToPath(e) { var t = E(e, 0, 1); var r = E(e, -1); if (t === "%" && r !== "%") { throw new o( "invalid intrinsic syntax, expected closing `%`" ); } else if (r === "%" && t !== "%") { throw new o( "invalid intrinsic syntax, expected opening `%`" ); } var n = []; S(e, P, function (e, t, r, o) { n[n.length] = r ? S(o, w, "$1") : t || e; }); return n; }; var j = function getBaseIntrinsic(e, t) { var r = e; var n; if (h(v, r)) { n = v[r]; r = "%" + n[0] + "%"; } if (h(g, r)) { var a = g[r]; if (typeof a === "undefined" && !t) { throw new i( "intrinsic " + e + " exists, but is not available. Please file an issue!" ); } return { alias: n, name: r, value: a }; } throw new o("intrinsic " + e + " does not exist!"); }; e.exports = function GetIntrinsic(e, t) { if (typeof e !== "string" || e.length === 0) { throw new i( "intrinsic name must be a non-empty string" ); } if ( arguments.length > 1 && typeof t !== "boolean" ) { throw new i( '"allowMissing" argument must be a boolean' ); } var r = O(e); var a = r.length > 0 ? r[0] : ""; var u = j("%" + a + "%", t); var f = u.name; var s = u.value; var p = false; var l = u.alias; if (l) { a = l[0]; A(r, m([0, 1], l)); } for (var y = 1, d = true; y < r.length; y += 1) { var v = r[y]; var b = E(v, 0, 1); var S = E(v, -1); if ( (b === '"' || b === "'" || b === "`" || S === '"' || S === "'" || S === "`") && b !== S ) { throw new o( "property names with quotes must have matching quotes" ); } if (v === "constructor" || !d) { p = true; } a += "." + v; f = "%" + a + "%"; if (h(g, f)) { s = g[f]; } else if (s != null) { if (!(v in s)) { if (!t) { throw new i( "base intrinsic for " + e + " exists, but the property is not available." ); } return void n; } if (c && y + 1 >= r.length) { var P = c(s, v); d = !!P; if ( d && "get" in P && !("originalValue" in P.get) ) { s = P.get; } else { s = s[v]; } } else { d = h(s, v); s = s[v]; } if (d && !p) { g[f] = s; } } } return s; }; }, 961: function (e, t, r) { "use strict"; var n = r(283); var o = typeof Symbol === "function" && typeof Symbol("foo") === "symbol"; var a = Object.prototype.toString; var i = Array.prototype.concat; var c = Object.defineProperty; var isFunction = function (e) { return ( typeof e === "function" && a.call(e) === "[object Function]" ); }; var arePropertyDescriptorsSupported = function () { var e = {}; try { c(e, "x", { enumerable: false, value: e }); for (var t in e) { return false; } return e.x === e; } catch (e) { return false; } }; var u = c && arePropertyDescriptorsSupported(); var defineProperty = function (e, t, r, n) { if (t in e && (!isFunction(n) || !n())) { return; } if (u) { c(e, t, { configurable: true, enumerable: false, value: r, writable: true, }); } else { e[t] = r; } }; var defineProperties = function (e, t) { var r = arguments.length > 2 ? arguments[2] : {}; var a = n(t); if (o) { a = i.call(a, Object.getOwnPropertySymbols(t)); } for (var c = 0; c < a.length; c += 1) { defineProperty(e, a[c], t[a[c]], r[a[c]]); } }; defineProperties.supportsDescriptors = !!u; e.exports = defineProperties; }, 274: function (e) { "use strict"; function assign(e, t) { if (e === undefined || e === null) { throw new TypeError( "Cannot convert first argument to object" ); } var r = Object(e); for (var n = 1; n < arguments.length; n++) { var o = arguments[n]; if (o === undefined || o === null) { continue; } var a = Object.keys(Object(o)); for (var i = 0, c = a.length; i < c; i++) { var u = a[i]; var f = Object.getOwnPropertyDescriptor( o, u ); if (f !== undefined && f.enumerable) { r[u] = o[u]; } } } return r; } function polyfill() { if (!Object.assign) { Object.defineProperty(Object, "assign", { enumerable: false, configurable: true, writable: true, value: assign, }); } } e.exports = { assign: assign, polyfill: polyfill }; }, 219: function (e) { var t = Object.prototype.hasOwnProperty; var r = Object.prototype.toString; e.exports = function forEach(e, n, o) { if (r.call(n) !== "[object Function]") { throw new TypeError( "iterator must be a function" ); } var a = e.length; if (a === +a) { for (var i = 0; i < a; i++) { n.call(o, e[i], i, e); } } else { for (var c in e) { if (t.call(e, c)) { n.call(o, e[c], c, e); } } } }; }, 733: function (e) { "use strict"; var t = "Function.prototype.bind called on incompatible "; var r = Array.prototype.slice; var n = Object.prototype.toString; var o = "[object Function]"; e.exports = function bind(e) { var a = this; if (typeof a !== "function" || n.call(a) !== o) { throw new TypeError(t + a); } var i = r.call(arguments, 1); var c; var binder = function () { if (this instanceof c) { var t = a.apply( this, i.concat(r.call(arguments)) ); if (Object(t) === t) { return t; } return this; } else { return a.apply( e, i.concat(r.call(arguments)) ); } }; var u = Math.max(0, a.length - i.length); var f = []; for (var s = 0; s < u; s++) { f.push("$" + s); } c = Function( "binder", "return function (" + f.join(",") + "){ return binder.apply(this,arguments); }" )(binder); if (a.prototype) { var p = function Empty() {}; p.prototype = a.prototype; c.prototype = new p(); p.prototype = null; } return c; }; }, 517: function (e, t, r) { "use strict"; var n = r(733); e.exports = Function.prototype.bind || n; }, 879: function (e, t, r) { "use strict"; var n; var o = SyntaxError; var a = Function; var i = TypeError; var getEvalledConstructor = function (e) { try { return a( '"use strict"; return (' + e + ").constructor;" )(); } catch (e) {} }; var c = Object.getOwnPropertyDescriptor; if (c) { try { c({}, ""); } catch (e) { c = null; } } var throwTypeError = function () { throw new i(); }; var u = c ? (function () { try { arguments.callee; return throwTypeError; } catch (e) { try { return c(arguments, "callee").get; } catch (e) { return throwTypeError; } } })() : throwTypeError; var f = r(449)(); var s = Object.getPrototypeOf || function (e) { return e.__proto__; }; var p = {}; var l = typeof Uint8Array === "undefined" ? n : s(Uint8Array); var y = { "%AggregateError%": typeof AggregateError === "undefined" ? n : AggregateError, "%Array%": Array, "%ArrayBuffer%": typeof ArrayBuffer === "undefined" ? n : ArrayBuffer, "%ArrayIteratorPrototype%": f ? s([][Symbol.iterator]()) : n, "%AsyncFromSyncIteratorPrototype%": n, "%AsyncFunction%": p, "%AsyncGenerator%": p, "%AsyncGeneratorFunction%": p, "%AsyncIteratorPrototype%": p, "%Atomics%": typeof Atomics === "undefined" ? n : Atomics, "%BigInt%": typeof BigInt === "undefined" ? n : BigInt, "%Boolean%": Boolean, "%DataView%": typeof DataView === "undefined" ? n : DataView, "%Date%": Date, "%decodeURI%": decodeURI, "%decodeURIComponent%": decodeURIComponent, "%encodeURI%": encodeURI, "%encodeURIComponent%": encodeURIComponent, "%Error%": Error, "%eval%": eval, "%EvalError%": EvalError, "%Float32Array%": typeof Float32Array === "undefined" ? n : Float32Array, "%Float64Array%": typeof Float64Array === "undefined" ? n : Float64Array, "%FinalizationRegistry%": typeof FinalizationRegistry === "undefined" ? n : FinalizationRegistry, "%Function%": a, "%GeneratorFunction%": p, "%Int8Array%": typeof Int8Array === "undefined" ? n : Int8Array, "%Int16Array%": typeof Int16Array === "undefined" ? n : Int16Array, "%Int32Array%": typeof Int32Array === "undefined" ? n : Int32Array, "%isFinite%": isFinite, "%isNaN%": isNaN, "%IteratorPrototype%": f ? s(s([][Symbol.iterator]())) : n, "%JSON%": typeof JSON === "object" ? JSON : n, "%Map%": typeof Map === "undefined" ? n : Map, "%MapIteratorPrototype%": typeof Map === "undefined" || !f ? n : s(new Map()[Symbol.iterator]()), "%Math%": Math, "%Number%": Number, "%Object%": Object, "%parseFloat%": parseFloat, "%parseInt%": parseInt, "%Promise%": typeof Promise === "undefined" ? n : Promise, "%Proxy%": typeof Proxy === "undefined" ? n : Proxy, "%RangeError%": RangeError, "%ReferenceError%": ReferenceError, "%Reflect%": typeof Reflect === "undefined" ? n : Reflect, "%RegExp%": RegExp, "%Set%": typeof Set === "undefined" ? n : Set, "%SetIteratorPrototype%": typeof Set === "undefined" || !f ? n : s(new Set()[Symbol.iterator]()), "%SharedArrayBuffer%": typeof SharedArrayBuffer === "undefined" ? n : SharedArrayBuffer, "%String%": String, "%StringIteratorPrototype%": f ? s(""[Symbol.iterator]()) : n, "%Symbol%": f ? Symbol : n, "%SyntaxError%": o, "%ThrowTypeError%": u, "%TypedArray%": l, "%TypeError%": i, "%Uint8Array%": typeof Uint8Array === "undefined" ? n : Uint8Array, "%Uint8ClampedArray%": typeof Uint8ClampedArray === "undefined" ? n : Uint8ClampedArray, "%Uint16Array%": typeof Uint16Array === "undefined" ? n : Uint16Array, "%Uint32Array%": typeof Uint32Array === "undefined" ? n : Uint32Array, "%URIError%": URIError, "%WeakMap%": typeof WeakMap === "undefined" ? n : WeakMap, "%WeakRef%": typeof WeakRef === "undefined" ? n : WeakRef, "%WeakSet%": typeof WeakSet === "undefined" ? n : WeakSet, }; var d = function doEval(e) { var t; if (e === "%AsyncFunction%") { t = getEvalledConstructor( "async function () {}" ); } else if (e === "%GeneratorFunction%") { t = getEvalledConstructor("function* () {}"); } else if (e === "%AsyncGeneratorFunction%") { t = getEvalledConstructor( "async function* () {}" ); } else if (e === "%AsyncGenerator%") { var r = doEval("%AsyncGeneratorFunction%"); if (r) { t = r.prototype; } } else if (e === "%AsyncIteratorPrototype%") { var n = doEval("%AsyncGenerator%"); if (n) { t = s(n.prototype); } } y[e] = t; return t; }; var g = { "%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 v = r(517); var b = r(793); var h = v.call(Function.call, Array.prototype.concat); var m = v.call(Function.apply, Array.prototype.splice); var A = v.call(Function.call, String.prototype.replace); var S = v.call(Function.call, String.prototype.slice); var E = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; var P = /\\(\\)?/g; var w = function stringToPath(e) { var t = S(e, 0, 1); var r = S(e, -1); if (t === "%" && r !== "%") { throw new o( "invalid intrinsic syntax, expected closing `%`" ); } else if (r === "%" && t !== "%") { throw new o( "invalid intrinsic syntax, expected opening `%`" ); } var n = []; A(e, E, function (e, t, r, o) { n[n.length] = r ? A(o, P, "$1") : t || e; }); return n; }; var O = function getBaseIntrinsic(e, t) { var r = e; var n; if (b(g, r)) { n = g[r]; r = "%" + n[0] + "%"; } if (b(y, r)) { var a = y[r]; if (a === p) { a = d(r); } if (typeof a === "undefined" && !t) { throw new i( "intrinsic " + e + " exists, but is not available. Please file an issue!" ); } return { alias: n, name: r, value: a }; } throw new o("intrinsic " + e + " does not exist!"); }; e.exports = function GetIntrinsic(e, t) { if (typeof e !== "string" || e.length === 0) { throw new i( "intrinsic name must be a non-empty string" ); } if ( arguments.length > 1 && typeof t !== "boolean" ) { throw new i( '"allowMissing" argument must be a boolean' ); } var r = w(e); var a = r.length > 0 ? r[0] : ""; var u = O("%" + a + "%", t); var f = u.name; var s = u.value; var p = false; var l = u.alias; if (l) { a = l[0]; m(r, h([0, 1], l)); } for (var d = 1, g = true; d < r.length; d += 1) { var v = r[d]; var A = S(v, 0, 1); var E = S(v, -1); if ( (A === '"' || A === "'" || A === "`" || E === '"' || E === "'" || E === "`") && A !== E ) { throw new o( "property names with quotes must have matching quotes" ); } if (v === "constructor" || !g) { p = true; } a += "." + v; f = "%" + a + "%"; if (b(y, f)) { s = y[f]; } else if (s != null) { if (!(v in s)) { if (!t) { throw new i( "base intrinsic for " + e + " exists, but the property is not available." ); } return void n; } if (c && d + 1 >= r.length) { var P = c(s, v); g = !!P; if ( g && "get" in P && !("originalValue" in P.get) ) { s = P.get; } else { s = s[v]; } } else { g = b(s, v); s = s[v]; } if (g && !p) { y[f] = s; } } } return s; }; }, 449: function (e, t, r) { "use strict"; var n = __webpack_require__.g.Symbol; var o = r(545); e.exports = function hasNativeSymbols() { if (typeof n !== "function") { return false; } if (typeof Symbol !== "function") { return false; } if (typeof n("foo") !== "symbol") { return false; } if (typeof Symbol("bar") !== "symbol") { return false; } return o(); }; }, 545: function (e) { "use strict"; e.exports = function hasSymbols() { if ( typeof Symbol !== "function" || typeof Object.getOwnPropertySymbols !== "function" ) { return false; } if (typeof Symbol.iterator === "symbol") { return true; } var e = {}; var t = Symbol("test"); var r = Object(t); if (typeof t === "string") { return false; } if ( Object.prototype.toString.call(t) !== "[object Symbol]" ) { return false; } if ( Object.prototype.toString.call(r) !== "[object Symbol]" ) { return false; } var n = 42; e[t] = n; for (t in e) { return false; } if ( typeof Object.keys === "function" && Object.keys(e).length !== 0 ) { return false; } if ( typeof Object.getOwnPropertyNames === "function" && Object.getOwnPropertyNames(e).length !== 0 ) { return false; } var o = Object.getOwnPropertySymbols(e); if (o.length !== 1 || o[0] !== t) { return false; } if ( !Object.prototype.propertyIsEnumerable.call( e, t ) ) { return false; } if ( typeof Object.getOwnPropertyDescriptor === "function" ) { var a = Object.getOwnPropertyDescriptor(e, t); if (a.value !== n || a.enumerable !== true) { return false; } } return true; }; }, 793: function (e, t, r) { "use strict"; var n = r(517); e.exports = n.call( Function.call, Object.prototype.hasOwnProperty ); }, 526: function (e) { if (typeof Object.create === "function") { e.exports = function inherits(e, t) { if (t) { e.super_ = t; e.prototype = Object.create(t.prototype, { constructor: { value: e, enumerable: false, writable: true, configurable: true, }, }); } }; } else { e.exports = function inherits(e, t) { if (t) { e.super_ = t; var TempCtor = function () {}; TempCtor.prototype = t.prototype; e.prototype = new TempCtor(); e.prototype.constructor = e; } }; } }, 312: function (e) { "use strict"; var t = typeof Symbol === "function" && typeof Symbol.toStringTag === "symbol"; var r = Object.prototype.toString; var n = function isArguments(e) { if ( t && e && typeof e === "object" && Symbol.toStringTag in e ) { return false; } return r.call(e) === "[object Arguments]"; }; var o = function isArguments(e) { if (n(e)) { return true; } return ( e !== null && typeof e === "object" && typeof e.length === "number" && e.length >= 0 && r.call(e) !== "[object Array]" && r.call(e.callee) === "[object Function]" ); }; var a = (function () { return n(arguments); })(); n.isLegacyArguments = o; e.exports = a ? n : o; }, 906: function (e) { "use strict"; var t = Object.prototype.toString; var r = Function.prototype.toString; var n = /^\s*(?:function)?\*/; var o = typeof Symbol === "function" && typeof Symbol.toStringTag === "symbol"; var a = Object.getPrototypeOf; var getGeneratorFunc = function () { if (!o) { return false; } try { return Function("return function*() {}")(); } catch (e) {} }; var i = getGeneratorFunc(); var c = i ? a(i) : {}; e.exports = function isGeneratorFunction(e) { if (typeof e !== "function") { return false; } if (n.test(r.call(e))) { return true; } if (!o) { var i = t.call(e); return i === "[object GeneratorFunction]"; } return a(e) === c; }; }, 720: function (e) { "use strict"; e.exports = function isNaN(e) { return e !== e; }; }, 674: function (e, t, r) { "use strict"; var n = r(112); var o = r(961); var a = r(720); var i = r(78); var c = r(81); var u = n(i(), Number); o(u, { getPolyfill: i, implementation: a, shim: c }); e.exports = u; }, 78: function (e, t, r) { "use strict"; var n = r(720); e.exports = function getPolyfill() { if ( Number.isNaN && Number.isNaN(NaN) && !Number.isNaN("a") ) { return Number.isNaN; } return n; }; }, 81: function (e, t, r) { "use strict"; var n = r(961); var o = r(78); e.exports = function shimNumberIsNaN() { var e = o(); n( Number, { isNaN: e }, { isNaN: function testIsNaN() { return Number.isNaN !== e; }, } ); return e; }; }, 234: function (e, t, r) { "use strict"; var n = r(219); var o = r(627); var a = r(749); var i = a("Object.prototype.toString"); var c = r(449)(); var u = c && typeof Symbol.toStringTag === "symbol"; var f = o(); var s = a("Array.prototype.indexOf", true) || function indexOf(e, t) { for (var r = 0; r < e.length; r += 1) { if (e[r] === t) { return r; } } return -1; }; var p = a("String.prototype.slice"); var l = {}; var y = r(982); var d = Object.getPrototypeOf; if (u && y && d) { n(f, function (e) { var t = new __webpack_require__.g[e](); if (!(Symbol.toStringTag in t)) { throw new EvalError( "this engine has support for Symbol.toStringTag, but " + e + " does not have the property! Please report this." ); } var r = d(t); var n = y(r, Symbol.toStringTag); if (!n) { var o = d(r); n = y(o, Symbol.toStringTag); } l[e] = n.get; }); } var g = function tryAllTypedArrays(e) { var t = false; n(l, function (r, n) { if (!t) { try { t = r.call(e) === n; } catch (e) {} } }); return t; }; e.exports = function isTypedArray(e) { if (!e || typeof e !== "object") { return false; } if (!u) { var t = p(i(e), 8, -1); return s(f, t) > -1; } if (!y) { return false; } return g(e); }; }, 982: function (e, t, r) { "use strict"; var n = r(879); var o = n("%Object.getOwnPropertyDescriptor%"); if (o) { try { o([], "length"); } catch (e) { o = null; } } e.exports = o; }, 450: function (e) { "use strict"; var numberIsNaN = function (e) { return e !== e; }; e.exports = function is(e, t) { if (e === 0 && t === 0) { return 1 / e === 1 / t; } if (e === t) { return true; } if (numberIsNaN(e) && numberIsNaN(t)) { return true; } return false; }; }, 595: function (e, t, r) { "use strict"; var n; if (!Object.keys) { var o = Object.prototype.hasOwnProperty; var a = Object.prototype.toString; var i = r(750); var c = Object.prototype.propertyIsEnumerable; var u = !c.call({ toString: null }, "toString"); var f = c.call(function () {}, "prototype"); var s = [ "toString", "toLocaleString", "valueOf", "hasOwnProperty", "isPrototypeOf", "propertyIsEnumerable", "constructor", ]; var equalsConstructorPrototype = function (e) { var t = e.constructor; return t && t.prototype === e; }; var p = { $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 l = (function () { if (typeof window === "undefined") { return false; } for (var e in window) { try { if ( !p["$" + e] && o.call(window, e) && window[e] !== null && typeof window[e] === "object" ) { try { equalsConstructorPrototype( window[e] ); } catch (e) { return true; } } } catch (e) { return true; } } return false; })(); var equalsConstructorPrototypeIfNotBuggy = function (e) { if (typeof window === "undefined" || !l) { return equalsConstructorPrototype(e); } try { return equalsConstructorPrototype(e); } catch (e) { return false; } }; n = function keys(e) { var t = e !== null && typeof e === "object"; var r = a.call(e) === "[object Function]"; var n = i(e); var c = t && a.call(e) === "[object String]"; var p = []; if (!t && !r && !n) { throw new TypeError( "Object.keys called on a non-object" ); } var l = f && r; if (c && e.length > 0 && !o.call(e, 0)) { for (var y = 0; y < e.length; ++y) { p.push(String(y)); } } if (n && e.length > 0) { for (var d = 0; d < e.length; ++d) { p.push(String(d)); } } else { for (var g in e) { if ( !(l && g === "prototype") && o.call(e, g) ) { p.push(String(g)); } } } if (u) { var v = equalsConstructorPrototypeIfNotBuggy(e); for (var b = 0; b < s.length; ++b) { if ( !(v && s[b] === "constructor") && o.call(e, s[b]) ) { p.push(s[b]); } } } return p; }; } e.exports = n; }, 283: function (e, t, r) { "use strict"; var n = Array.prototype.slice; var o = r(750); var a = Object.keys; var i = a ? function keys(e) { return a(e); } : r(595); var c = Object.keys; i.shim = function shimObjectKeys() { if (Object.keys) { var e = (function () { var e = Object.keys(arguments); return e && e.length === arguments.length; })(1, 2); if (!e) { Object.keys = function keys(e) { if (o(e)) { return c(n.call(e)); } return c(e); }; } } else { Object.keys = i; } return Object.keys || i; }; e.exports = i; }, 750: function (e) { "use strict"; var t = Object.prototype.toString; e.exports = function isArguments(e) { var r = t.call(e); var n = r === "[object Arguments]"; if (!n) { n = r !== "[object Array]" && e !== null && typeof e === "object" && typeof e.length === "number" && e.length >= 0 && t.call(e.callee) === "[object Function]"; } return n; }; }, 536: function (e) { e.exports = function isBuffer(e) { return e instanceof Buffer; }; }, 3: function (e, t, r) { "use strict"; var n = r(312); var o = r(906); var a = r(715); var i = r(234); function uncurryThis(e) { return e.call.bind(e); } var c = typeof BigInt !== "undefined"; var u = typeof Symbol !== "undefined"; var f = uncurryThis(Object.prototype.toString); var s = uncurryThis(Number.prototype.valueOf); var p = uncurryThis(String.prototype.valueOf); var l = uncurryThis(Boolean.prototype.valueOf); if (c) { var y = uncurryThis(BigInt.prototype.valueOf); } if (u) { var d = uncurryThis(Symbol.prototype.valueOf); } function checkBoxedPrimitive(e, t) { if (typeof e !== "object") { return false; } try { t(e); return true; } catch (e) { return false; } } t.isArgumentsObject = n; t.isGeneratorFunction = o; t.isTypedArray = i; function isPromise(e) { return ( (typeof Promise !== "undefined" && e instanceof Promise) || (e !== null && typeof e === "object" && typeof e.then === "function" && typeof e.catch === "function") ); } t.isPromise = isPromise; function isArrayBufferView(e) { if ( typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView ) { return ArrayBuffer.isView(e); } return i(e) || isDataView(e); } t.isArrayBufferView = isArrayBufferView; function isUint8Array(e) { return a(e) === "Uint8Array"; } t.isUint8Array = isUint8Array; function isUint8ClampedArray(e) { return a(e) === "Uint8ClampedArray"; } t.isUint8ClampedArray = isUint8ClampedArray; function isUint16Array(e) { return a(e) === "Uint16Array"; } t.isUint16Array = isUint16Array; function isUint32Array(e) { return a(e) === "Uint32Array"; } t.isUint32Array = isUint32Array; function isInt8Array(e) { return a(e) === "Int8Array"; } t.isInt8Array = isInt8Array; function isInt16Array(e) { return a(e) === "Int16Array"; } t.isInt16Array = isInt16Array; function isInt32Array(e) { return a(e) === "Int32Array"; } t.isInt32Array = isInt32Array; function isFloat32Array(e) { return a(e) === "Float32Array"; } t.isFloat32Array = isFloat32Array; function isFloat64Array(e) { return a(e) === "Float64Array"; } t.isFloat64Array = isFloat64Array; function isBigInt64Array(e) { return a(e) === "BigInt64Array"; } t.isBigInt64Array = isBigInt64Array; function isBigUint64Array(e) { return a(e) === "BigUint64Array"; } t.isBigUint64Array = isBigUint64Array; function isMapToString(e) { return f(e) === "[object Map]"; } isMapToString.working = typeof Map !== "undefined" && isMapToString(new Map()); function isMap(e) { if (typeof Map === "undefined") { return false; } return isMapToString.working ? isMapToString(e) : e instanceof Map; } t.isMap = isMap; function isSetToString(e) { return f(e) === "[object Set]"; } isSetToString.working = typeof Set !== "undefined" && isSetToString(new Set()); function isSet(e) { if (typeof Set === "undefined") { return false; } return isSetToString.working ? isSetToString(e) : e instanceof Set; } t.isSet = isSet; function isWeakMapToString(e) { return f(e) === "[object WeakMap]"; } isWeakMapToString.working = typeof WeakMap !== "undefined" && isWeakMapToString(new WeakMap()); function isWeakMap(e) { if (typeof WeakMap === "undefined") { return false; } return isWeakMapToString.working ? isWeakMapToString(e) : e instanceof WeakMap; } t.isWeakMap = isWeakMap; function isWeakSetToString(e) { return f(e) === "[object WeakSet]"; } isWeakSetToString.working = typeof WeakSet !== "undefined" && isWeakSetToString(new WeakSet()); function isWeakSet(e) { return isWeakSetToString(e); } t.isWeakSet = isWeakSet; function isArrayBufferToString(e) { return f(e) === "[object ArrayBuffer]"; } isArrayBufferToString.working = typeof ArrayBuffer !== "undefined" && isArrayBufferToString(new ArrayBuffer()); function isArrayBuffer(e) { if (typeof ArrayBuffer === "undefined") { return false; } return isArrayBufferToString.working ? isArrayBufferToString(e) : e instanceof ArrayBuffer; } t.isArrayBuffer = isArrayBuffer; function isDataViewToString(e) { return f(e) === "[object DataView]"; } isDataViewToString.working = typeof ArrayBuffer !== "undefined" && typeof DataView !== "undefined" && isDataViewToString( new DataView(new ArrayBuffer(1), 0, 1) ); function isDataView(e) { if (typeof DataView === "undefined") { return false; } return isDataViewToString.working ? isDataViewToString(e) : e instanceof DataView; } t.isDataView = isDataView; var g = typeof SharedArrayBuffer !== "undefined" ? SharedArrayBuffer : undefined; function isSharedArrayBufferToString(e) { return f(e) === "[object SharedArrayBuffer]"; } function isSharedArrayBuffer(e) { if (typeof g === "undefined") { return false; } if ( typeof isSharedArrayBufferToString.working === "undefined" ) { isSharedArrayBufferToString.working = isSharedArrayBufferToString(new g()); } return isSharedArrayBufferToString.working ? isSharedArrayBufferToString(e) : e instanceof g; } t.isSharedArrayBuffer = isSharedArrayBuffer; function isAsyncFunction(e) { return f(e) === "[object AsyncFunction]"; } t.isAsyncFunction = isAsyncFunction; function isMapIterator(e) { return f(e) === "[object Map Iterator]"; } t.isMapIterator = isMapIterator; function isSetIterator(e) { return f(e) === "[object Set Iterator]"; } t.isSetIterator = isSetIterator; function isGeneratorObject(e) { return f(e) === "[object Generator]"; } t.isGeneratorObject = isGeneratorObject; function isWebAssemblyCompiledModule(e) { return f(e) === "[object WebAssembly.Module]"; } t.isWebAssemblyCompiledModule = isWebAssemblyCompiledModule; function isNumberObject(e) { return checkBoxedPrimitive(e, s); } t.isNumberObject = isNumberObject; function isStringObject(e) { return checkBoxedPrimitive(e, p); } t.isStringObject = isStringObject; function isBooleanObject(e) { return checkBoxedPrimitive(e, l); } t.isBooleanObject = isBooleanObject; function isBigIntObject(e) { return c && checkBoxedPrimitive(e, y); } t.isBigIntObject = isBigIntObject; function isSymbolObject(e) { return u && checkBoxedPrimitive(e, d); } t.isSymbolObject = isSymbolObject; function isBoxedPrimitive(e) { return ( isNumberObject(e) || isStringObject(e) || isBooleanObject(e) || isBigIntObject(e) || isSymbolObject(e) ); } t.isBoxedPrimitive = isBoxedPrimitive; function isAnyArrayBuffer(e) { return ( typeof Uint8Array !== "undefined" && (isArrayBuffer(e) || isSharedArrayBuffer(e)) ); } t.isAnyArrayBuffer = isAnyArrayBuffer; [ "isProxy", "isExternal", "isModuleNamespaceObject", ].forEach(function (e) { Object.defineProperty(t, e, { enumerable: false, value: function () { throw new Error( e + " is not supported in userland" ); }, }); }); }, 650: function (e, t, r) { var n = Object.getOwnPropertyDescriptors || function getOwnPropertyDescriptors(e) { var t = Object.keys(e); var r = {}; for (var n = 0; n < t.length; n++) { r[t[n]] = Object.getOwnPropertyDescriptor( e, t[n] ); } return r; }; var o = /%[sdj%]/g; t.format = function (e) { if (!isString(e)) { var t = []; for (var r = 0; r < arguments.length; r++) { t.push(inspect(arguments[r])); } return t.join(" "); } var r = 1; var n = arguments; var a = n.length; var i = String(e).replace(o, function (e) { if (e === "%%") return "%"; if (r >= a) return e; switch (e) { case "%s": return String(n[r++]); case "%d": return Number(n[r++]); case "%j": try { return JSON.stringify(n[r++]); } catch (e) { return "[Circular]"; } default: return e; } }); for (var c = n[r]; r < a; c = n[++r]) { if (isNull(c) || !isObject(c)) { i += " " + c; } else { i += " " + inspect(c); } } return i; }; t.deprecate = function (e, r) { if ( typeof process !== "undefined" && process.noDeprecation === true ) { return e; } if (typeof process === "undefined") { return function () { return t .deprecate(e, r) .apply(this, arguments); }; } var n = false; function deprecated() { if (!n) { if (process.throwDeprecation) { throw new Error(r); } else if (process.traceDeprecation) { console.trace(r); } else { console.error(r); } n = true; } return e.apply(this, arguments); } return deprecated; }; var a = {}; var i = /^$/; if (process.env.NODE_DEBUG) { var c = process.env.NODE_DEBUG; c = c .replace(/[|\\{}()[\]^$+?.]/g, "\\$&") .replace(/\*/g, ".*") .replace(/,/g, "$|^") .toUpperCase(); i = new RegExp("^" + c + "$", "i"); } t.debuglog = function (e) { e = e.toUpperCase(); if (!a[e]) { if (i.test(e)) { var r = process.pid; a[e] = function () { var n = t.format.apply(t, arguments); console.error("%s %d: %s", e, r, n); }; } else { a[e] = function () {}; } } return a[e]; }; function inspect(e, r) { var n = { seen: [], stylize: stylizeNoColor }; if (arguments.length >= 3) n.depth = arguments[2]; if (arguments.length >= 4) n.colors = arguments[3]; if (isBoolean(r)) { n.showHidden = r; } else if (r) { t._extend(n, r); } if (isUndefined(n.showHidden)) n.showHidden = false; if (isUndefined(n.depth)) n.depth = 2; if (isUndefined(n.colors)) n.colors = false; if (isUndefined(n.customInspect)) n.customInspect = true; if (n.colors) n.stylize = stylizeWithColor; return formatValue(n, e, n.depth); } t.inspect = inspect; inspect.colors = { bold: [1, 22], italic: [3, 23], underline: [4, 24], inverse: [7, 27], white: [37, 39], grey: [90, 39], black: [30, 39], blue: [34, 39], cyan: [36, 39], green: [32, 39], magenta: [35, 39], red: [31, 39], yellow: [33, 39], }; inspect.styles = { special: "cyan", number: "yellow", boolean: "yellow", undefined: "grey", null: "bold", string: "green", date: "magenta", regexp: "red", }; function stylizeWithColor(e, t) { var r = inspect.styles[t]; if (r) { return ( "[" + inspect.colors[r][0] + "m" + e + "[" + inspect.colors[r][1] + "m" ); } else { return e; } } function stylizeNoColor(e, t) { return e; } function arrayToHash(e) { var t = {}; e.forEach(function (e, r) { t[e] = true; }); return t; } function formatValue(e, r, n) { if ( e.customInspect && r && isFunction(r.inspect) && r.inspect !== t.inspect && !( r.constructor && r.constructor.prototype === r ) ) { var o = r.inspect(n, e); if (!isString(o)) { o = formatValue(e, o, n); } return o; } var a = formatPrimitive(e, r); if (a) { return a; } var i = Object.keys(r); var c = arrayToHash(i); if (e.showHidden) { i = Object.getOwnPropertyNames(r); } if ( isError(r) && (i.indexOf("message") >= 0 || i.indexOf("description") >= 0) ) { return formatError(r); } if (i.length === 0) { if (isFunction(r)) { var u = r.name ? ": " + r.name : ""; return e.stylize( "[Function" + u + "]", "special" ); } if (isRegExp(r)) { return e.stylize( RegExp.prototype.toString.call(r), "regexp" ); } if (isDate(r)) { return e.stylize( Date.prototype.toString.call(r), "date" ); } if (isError(r)) { return formatError(r); } } var f = "", s = false, p = ["{", "}"]; if (isArray(r)) { s = true; p = ["[", "]"]; } if (isFunction(r)) { var l = r.name ? ": " + r.name : ""; f = " [Function" + l + "]"; } if (isRegExp(r)) { f = " " + RegExp.prototype.toString.call(r); } if (isDate(r)) { f = " " + Date.prototype.toUTCString.call(r); } if (isError(r)) { f = " " + formatError(r); } if (i.length === 0 && (!s || r.length == 0)) { return p[0] + f + p[1]; } if (n < 0) { if (isRegExp(r)) { return e.stylize( RegExp.prototype.toString.call(r), "regexp" ); } else { return e.stylize("[Object]", "special"); } } e.seen.push(r); var y; if (s) { y = formatArray(e, r, n, c, i); } else { y = i.map(function (t) { return formatProperty(e, r, n, c, t, s); }); } e.seen.pop(); return reduceToSingleString(y, f, p); } function formatPrimitive(e, t) { if (isUndefined(t)) return e.stylize("undefined", "undefined"); if (isString(t)) { var r = "'" + JSON.stringify(t) .replace(/^"|"$/g, "") .replace(/'/g, "\\'") .replace(/\\"/g, '"') + "'"; return e.stylize(r, "string"); } if (isNumber(t)) return e.stylize("" + t, "number"); if (isBoolean(t)) return e.stylize("" + t, "boolean"); if (isNull(t)) return e.stylize("null", "null"); } function formatError(e) { return "[" + Error.prototype.toString.call(e) + "]"; } function formatArray(e, t, r, n, o) { var a = []; for (var i = 0, c = t.length; i < c; ++i) { if (hasOwnProperty(t, String(i))) { a.push( formatProperty( e, t, r, n, String(i), true ) ); } else { a.push(""); } } o.forEach(function (o) { if (!o.match(/^\d+$/)) { a.push(formatProperty(e, t, r, n, o, true)); } }); return a; } function formatProperty(e, t, r, n, o, a) { var i, c, u; u = Object.getOwnPropertyDescriptor(t, o) || { value: t[o], }; if (u.get) { if (u.set) { c = e.stylize("[Getter/Setter]", "special"); } else { c = e.stylize("[Getter]", "special"); } } else { if (u.set) { c = e.stylize("[Setter]", "special"); } } if (!hasOwnProperty(n, o)) { i = "[" + o + "]"; } if (!c) { if (e.seen.indexOf(u.value) < 0) { if (isNull(r)) { c = formatValue(e, u.value, null); } else { c = formatValue(e, u.value, r - 1); } if (c.indexOf("\n") > -1) { if (a) { c = c .split("\n") .map(function (e) { return " " + e; }) .join("\n") .substr(2); } else { c = "\n" + c .split("\n") .map(function (e) { return " " + e; }) .join("\n"); } } } else { c = e.stylize("[Circular]", "special"); } } if (isUndefined(i)) { if (a && o.match(/^\d+$/)) { return c; } i = JSON.stringify("" + o); if (i.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { i = i.substr(1, i.length - 2); i = e.stylize(i, "name"); } else { i = i .replace(/'/g, "\\'") .replace(/\\"/g, '"') .replace(/(^"|"$)/g, "'"); i = e.stylize(i, "string"); } } return i + ": " + c; } function reduceToSingleString(e, t, r) { var n = 0; var o = e.reduce(function (e, t) { n++; if (t.indexOf("\n") >= 0) n++; return ( e + t.replace(/\u001b\[\d\d?m/g, "").length + 1 ); }, 0); if (o > 60) { return ( r[0] + (t === "" ? "" : t + "\n ") + " " + e.join(",\n ") + " " + r[1] ); } return r[0] + t + " " + e.join(", ") + " " + r[1]; } t.types = r(3); function isArray(e) { return Array.isArray(e); } t.isArray = isArray; function isBoolean(e) { return typeof e === "boolean"; } t.isBoolean = isBoolean; function isNull(e) { return e === null; } t.isNull = isNull; function isNullOrUndefined(e) { return e == null; } t.isNullOrUndefined = isNullOrUndefined; function isNumber(e) { return typeof e === "number"; } t.isNumber = isNumber; function isString(e) { return typeof e === "string"; } t.isString = isString; function isSymbol(e) { return typeof e === "symbol"; } t.isSymbol = isSymbol; function isUndefined(e) { return e === void 0; } t.isUndefined = isUndefined; function isRegExp(e) { return ( isObject(e) && objectToString(e) === "[object RegExp]" ); } t.isRegExp = isRegExp; t.types.isRegExp = isRegExp; function isObject(e) { return typeof e === "object" && e !== null; } t.isObject = isObject; function isDate(e) { return ( isObject(e) && objectToString(e) === "[object Date]" ); } t.isDate = isDate; t.types.isDate = isDate; function isError(e) { return ( isObject(e) && (objectToString(e) === "[object Error]" || e instanceof Error) ); } t.isError = isError; t.types.isNativeError = isError; function isFunction(e) { return typeof e === "function"; } t.isFunction = isFunction; function isPrimitive(e) { return ( e === null || typeof e === "boolean" || typeof e === "number" || typeof e === "string" || typeof e === "symbol" || typeof e === "undefined" ); } t.isPrimitive = isPrimitive; t.isBuffer = r(536); function objectToString(e) { return Object.prototype.toString.call(e); } function pad(e) { return e < 10 ? "0" + e.toString(10) : e.toString(10); } var u = [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", ]; function timestamp() { var e = new Date(); var t = [ pad(e.getHours()), pad(e.getMinutes()), pad(e.getSeconds()), ].join(":"); return [e.getDate(), u[e.getMonth()], t].join(" "); } t.log = function () { console.log( "%s - %s", timestamp(), t.format.apply(t, arguments) ); }; t.inherits = r(526); t._extend = function (e, t) { if (!t || !isObject(t)) return e; var r = Object.keys(t); var n = r.length; while (n--) { e[r[n]] = t[r[n]]; } return e; }; function hasOwnProperty(e, t) { return Object.prototype.hasOwnProperty.call(e, t); } var f = typeof Symbol !== "undefined" ? Symbol("util.promisify.custom") : undefined; t.promisify = function promisify(e) { if (typeof e !== "function") throw new TypeError( 'The "original" argument must be of type Function' ); if (f && e[f]) { var t = e[f]; if (typeof t !== "function") { throw new TypeError( 'The "util.promisify.custom" argument must be of type Function' ); } Object.defineProperty(t, f, { value: t, enumerable: false, writable: false, configurable: true, }); return t; } function t() { var t, r; var n = new Promise(function (e, n) { t = e; r = n; }); var o = []; for (var a = 0; a < arguments.length; a++) { o.push(arguments[a]); } o.push(function (e, n) { if (e) { r(e); } else { t(n); } }); try { e.apply(this, o); } catch (e) { r(e); } return n; } Object.setPrototypeOf(t, Object.getPrototypeOf(e)); if (f) Object.defineProperty(t, f, { value: t, enumerable: false, writable: false, configurable: true, }); return Object.defineProperties(t, n(e)); }; t.promisify.custom = f; function callbackifyOnRejected(e, t) { if (!e) { var r = new Error( "Promise was rejected with a falsy value" ); r.reason = e; e = r; } return t(e); } function callbackify(e) { if (typeof e !== "function") { throw new TypeError( 'The "original" argument must be of type Function' ); } function callbackified() { var t = []; for (var r = 0; r < arguments.length; r++) { t.push(arguments[r]); } var n = t.pop(); if (typeof n !== "function") { throw new TypeError( "The last argument must be of type Function" ); } var o = this; var cb = function () { return n.apply(o, arguments); }; e.apply(this, t).then( function (e) { process.nextTick( cb.bind(null, null, e) ); }, function (e) { process.nextTick( callbackifyOnRejected.bind( null, e, cb ) ); } ); } Object.setPrototypeOf( callbackified, Object.getPrototypeOf(e) ); Object.defineProperties(callbackified, n(e)); return callbackified; } t.callbackify = callbackify; }, 715: function (e, t, r) { "use strict"; var n = r(219); var o = r(627); var a = r(749); var i = a("Object.prototype.toString"); var c = r(449)(); var u = c && typeof Symbol.toStringTag === "symbol"; var f = o(); var s = a("String.prototype.slice"); var p = {}; var l = r(850); var y = Object.getPrototypeOf; if (u && l && y) { n(f, function (e) { if ( typeof __webpack_require__.g[e] === "function" ) { var t = new __webpack_require__.g[e](); if (!(Symbol.toStringTag in t)) { throw new EvalError( "this engine has support for Symbol.toStringTag, but " + e + " does not have the property! Please report this." ); } var r = y(t); var n = l(r, Symbol.toStringTag); if (!n) { var o = y(r); n = l(o, Symbol.toStringTag); } p[e] = n.get; } }); } var d = function tryAllTypedArrays(e) { var t = false; n(p, function (r, n) { if (!t) { try { var o = r.call(e); if (o === n) { t = o; } } catch (e) {} } }); return t; }; var g = r(234); e.exports = function whichTypedArray(e) { if (!g(e)) { return false; } if (!u) { return s(i(e), 8, -1); } return d(e); }; }, 227: function (e, t, r) { "use strict"; var n; var o = SyntaxError; var a = Function; var i = TypeError; var getEvalledConstructor = function (e) { try { return Function( '"use strict"; return (' + e + ").constructor;" )(); } catch (e) {} }; var c = Object.getOwnPropertyDescriptor; if (c) { try { c({}, ""); } catch (e) { c = null; } } var throwTypeError = function () { throw new i(); }; var u = c ? (function () { try { arguments.callee; return throwTypeError; } catch (e) { try { return c(arguments, "callee").get; } catch (e) { return throwTypeError; } } })() : throwTypeError; var f = r(449)(); var s = Object.getPrototypeOf || function (e) { return e.__proto__; }; var p = getEvalledConstructor("async function* () {}"); var l = p ? p.prototype : n; var y = l ? l.prototype : n; var d = typeof Uint8Array === "undefined" ? n : s(Uint8Array); var g = { "%AggregateError%": typeof AggregateError === "undefined" ? n : AggregateError, "%Array%": Array, "%ArrayBuffer%": typeof ArrayBuffer === "undefined" ? n : ArrayBuffer, "%ArrayIteratorPrototype%": f ? s([][Symbol.iterator]()) : n, "%AsyncFromSyncIteratorPrototype%": n, "%AsyncFunction%": getEvalledConstructor( "async function () {}" ), "%AsyncGenerator%": l, "%AsyncGeneratorFunction%": p, "%AsyncIteratorPrototype%": y ? s(y) : n, "%Atomics%": typeof Atomics === "undefined" ? n : Atomics, "%BigInt%": typeof BigInt === "undefined" ? n : BigInt, "%Boolean%": Boolean, "%DataView%": typeof DataView === "undefined" ? n : DataView, "%Date%": Date, "%decodeURI%": decodeURI, "%decodeURIComponent%": decodeURIComponent, "%encodeURI%": encodeURI, "%encodeURIComponent%": encodeURIComponent, "%Error%": Error, "%eval%": eval, "%EvalError%": EvalError, "%Float32Array%": typeof Float32Array === "undefined" ? n : Float32Array, "%Float64Array%": typeof Float64Array === "undefined" ? n : Float64Array, "%FinalizationRegistry%": typeof FinalizationRegistry === "undefined" ? n : FinalizationRegistry, "%Function%": a, "%GeneratorFunction%": getEvalledConstructor("function* () {}"), "%Int8Array%": typeof Int8Array === "undefined" ? n : Int8Array, "%Int16Array%": typeof Int16Array === "undefined" ? n : Int16Array, "%Int32Array%": typeof Int32Array === "undefined" ? n : Int32Array, "%isFinite%": isFinite, "%isNaN%": isNaN, "%IteratorPrototype%": f ? s(s([][Symbol.iterator]())) : n, "%JSON%": typeof JSON === "object" ? JSON : n, "%Map%": typeof Map === "undefined" ? n : Map, "%MapIteratorPrototype%": typeof Map === "undefined" || !f ? n : s(new Map()[Symbol.iterator]()), "%Math%": Math, "%Number%": Number, "%Object%": Object, "%parseFloat%": parseFloat, "%parseInt%": parseInt, "%Promise%": typeof Promise === "undefined" ? n : Promise, "%Proxy%": typeof Proxy === "undefined" ? n : Proxy, "%RangeError%": RangeError, "%ReferenceError%": ReferenceError, "%Reflect%": typeof Reflect === "undefined" ? n : Reflect, "%RegExp%": RegExp, "%Set%": typeof Set === "undefined" ? n : Set, "%SetIteratorPrototype%": typeof Set === "undefined" || !f ? n : s(new Set()[Symbol.iterator]()), "%SharedArrayBuffer%": typeof SharedArrayBuffer === "undefined" ? n : SharedArrayBuffer, "%String%": String, "%StringIteratorPrototype%": f ? s(""[Symbol.iterator]()) : n, "%Symbol%": f ? Symbol : n, "%SyntaxError%": o, "%ThrowTypeError%": u, "%TypedArray%": d, "%TypeError%": i, "%Uint8Array%": typeof Uint8Array === "undefined" ? n : Uint8Array, "%Uint8ClampedArray%": typeof Uint8ClampedArray === "undefined" ? n : Uint8ClampedArray, "%Uint16Array%": typeof Uint16Array === "undefined" ? n : Uint16Array, "%Uint32Array%": typeof Uint32Array === "undefined" ? n : Uint32Array, "%URIError%": URIError, "%WeakMap%": typeof WeakMap === "undefined" ? n : WeakMap, "%WeakRef%": typeof WeakRef === "undefined" ? n : WeakRef, "%WeakSet%": typeof WeakSet === "undefined" ? n : WeakSet, }; var v = { "%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 b = r(517); var h = r(793); var m = b.call(Function.call, Array.prototype.concat); var A = b.call(Function.apply, Array.prototype.splice); var S = b.call(Function.call, String.prototype.replace); var E = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; var P = /\\(\\)?/g; var w = function stringToPath(e) { var t = []; S(e, E, function (e, r, n, o) { t[t.length] = n ? S(o, P, "$1") : r || e; }); return t; }; var O = function getBaseIntrinsic(e, t) { var r = e; var n; if (h(v, r)) { n = v[r]; r = "%" + n[0] + "%"; } if (h(g, r)) { var a = g[r]; if (typeof a === "undefined" && !t) { throw new i( "intrinsic " + e + " exists, but is not available. Please file an issue!" ); } return { alias: n, name: r, value: a }; } throw new o("intrinsic " + e + " does not exist!"); }; e.exports = function GetIntrinsic(e, t) { if (typeof e !== "string" || e.length === 0) { throw new i( "intrinsic name must be a non-empty string" ); } if ( arguments.length > 1 && typeof t !== "boolean" ) { throw new i( '"allowMissing" argument must be a boolean' ); } var r = w(e); var n = r.length > 0 ? r[0] : ""; var o = O("%" + n + "%", t); var a = o.name; var u = o.value; var f = false; var s = o.alias; if (s) { n = s[0]; A(r, m([0, 1], s)); } for (var p = 1, l = true; p < r.length; p += 1) { var y = r[p]; if (y === "constructor" || !l) { f = true; } n += "." + y; a = "%" + n + "%"; if (h(g, a)) { u = g[a]; } else if (u != null) { if (c && p + 1 >= r.length) { var d = c(u, y); l = !!d; if (!t && !(y in u)) { throw new i( "base intrinsic for " + e + " exists, but the property is not available." ); } if ( l && "get" in d && !("originalValue" in d.get) ) { u = d.get; } else { u = u[y]; } } else { l = h(u, y); u = u[y]; } if (l && !f) { g[a] = u; } } } return u; }; }, 850: function (e, t, r) { "use strict"; var n = r(227); var o = n("%Object.getOwnPropertyDescriptor%"); if (o) { try { o([], "length"); } catch (e) { o = null; } } e.exports = o; }, 627: function (e, t, r) { "use strict"; var n = r(901); e.exports = function availableTypedArrays() { return n( [ "BigInt64Array", "BigUint64Array", "Float32Array", "Float64Array", "Int16Array", "Int32Array", "Int8Array", "Uint16Array", "Uint32Array", "Uint8Array", "Uint8ClampedArray", ], function (e) { return ( typeof __webpack_require__.g[e] === "function" ); } ); }; }, }; var t = {}; function __nccwpck_require__(r) { var n = t[r]; if (n !== undefined) { return n.exports; } var o = (t[r] = { exports: {} }); var a = true; try { e[r](o, o.exports, __nccwpck_require__); a = false; } finally { if (a) delete t[r]; } return o.exports; } if (typeof __nccwpck_require__ !== "undefined") __nccwpck_require__.ab = __dirname + "/"; var r = __nccwpck_require__(313); module.exports = r; })(); /***/ }, /***/ 7715: /***/ function ( module, __unused_webpack_exports, __webpack_require__ ) { var __dirname = "/"; /* provided dependency */ var Buffer = __webpack_require__(1876)["Buffer"]; /* provided dependency */ var process = __webpack_require__(3454); (function () { "use strict"; var e = { 958: function (e, t, i) { var a = i(491); var r = i(944); var n = i(492); var s = i(422); var l = i(234); for (var f in l) { t[f] = l[f]; } t.NONE = 0; t.DEFLATE = 1; t.INFLATE = 2; t.GZIP = 3; t.GUNZIP = 4; t.DEFLATERAW = 5; t.INFLATERAW = 6; t.UNZIP = 7; var o = 31; var h = 139; function Zlib(e) { if ( typeof e !== "number" || e < t.DEFLATE || e > t.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 = e; 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; a(this.init_done, "close before init"); a(this.mode <= t.UNZIP); if ( this.mode === t.DEFLATE || this.mode === t.GZIP || this.mode === t.DEFLATERAW ) { n.deflateEnd(this.strm); } else if ( this.mode === t.INFLATE || this.mode === t.GUNZIP || this.mode === t.INFLATERAW || this.mode === t.UNZIP ) { s.inflateEnd(this.strm); } this.mode = t.NONE; this.dictionary = null; }; Zlib.prototype.write = function (e, t, i, a, r, n, s) { return this._write(true, e, t, i, a, r, n, s); }; Zlib.prototype.writeSync = function ( e, t, i, a, r, n, s ) { return this._write(false, e, t, i, a, r, n, s); }; Zlib.prototype._write = function ( e, i, r, n, s, l, f, o ) { a.equal(arguments.length, 8); a(this.init_done, "write before init"); a(this.mode !== t.NONE, "already finalized"); a.equal( false, this.write_in_progress, "write already in progress" ); a.equal( false, this.pending_close, "close is pending" ); this.write_in_progress = true; a.equal( false, i === undefined, "must provide flush value" ); this.write_in_progress = true; if ( i !== t.Z_NO_FLUSH && i !== t.Z_PARTIAL_FLUSH && i !== t.Z_SYNC_FLUSH && i !== t.Z_FULL_FLUSH && i !== t.Z_FINISH && i !== t.Z_BLOCK ) { throw new Error("Invalid flush value"); } if (r == null) { r = Buffer.alloc(0); s = 0; n = 0; } this.strm.avail_in = s; this.strm.input = r; this.strm.next_in = n; this.strm.avail_out = o; this.strm.output = l; this.strm.next_out = f; this.flush = i; if (!e) { this._process(); if (this._checkError()) { return this._afterSync(); } return; } var h = this; process.nextTick(function () { h._process(); h._after(); }); return this; }; Zlib.prototype._afterSync = function () { var e = this.strm.avail_out; var t = this.strm.avail_in; this.write_in_progress = false; return [t, e]; }; Zlib.prototype._process = function () { var e = null; switch (this.mode) { case t.DEFLATE: case t.GZIP: case t.DEFLATERAW: this.err = n.deflate(this.strm, this.flush); break; case t.UNZIP: if (this.strm.avail_in > 0) { e = this.strm.next_in; } switch (this.gzip_id_bytes_read) { case 0: if (e === null) { break; } if (this.strm.input[e] === o) { this.gzip_id_bytes_read = 1; e++; if (this.strm.avail_in === 1) { break; } } else { this.mode = t.INFLATE; break; } case 1: if (e === null) { break; } if (this.strm.input[e] === h) { this.gzip_id_bytes_read = 2; this.mode = t.GUNZIP; } else { this.mode = t.INFLATE; } break; default: throw new Error( "invalid number of gzip magic number bytes read" ); } case t.INFLATE: case t.GUNZIP: case t.INFLATERAW: this.err = s.inflate(this.strm, this.flush); if ( this.err === t.Z_NEED_DICT && this.dictionary ) { this.err = s.inflateSetDictionary( this.strm, this.dictionary ); if (this.err === t.Z_OK) { this.err = s.inflate( this.strm, this.flush ); } else if ( this.err === t.Z_DATA_ERROR ) { this.err = t.Z_NEED_DICT; } } while ( this.strm.avail_in > 0 && this.mode === t.GUNZIP && this.err === t.Z_STREAM_END && this.strm.next_in[0] !== 0 ) { this.reset(); this.err = s.inflate( this.strm, this.flush ); } break; default: throw new Error( "Unknown mode " + this.mode ); } }; Zlib.prototype._checkError = function () { switch (this.err) { case t.Z_OK: case t.Z_BUF_ERROR: if ( this.strm.avail_out !== 0 && this.flush === t.Z_FINISH ) { this._error("unexpected end of file"); return false; } break; case t.Z_STREAM_END: break; case t.Z_NEED_DICT: if (this.dictionary == null) { this._error("Missing dictionary"); } else { this._error("Bad dictionary"); } return false; default: this._error("Zlib error"); return false; } return true; }; Zlib.prototype._after = function () { if (!this._checkError()) { return; } var e = this.strm.avail_out; var t = this.strm.avail_in; this.write_in_progress = false; this.callback(t, e); if (this.pending_close) { this.close(); } }; Zlib.prototype._error = function (e) { if (this.strm.msg) { e = this.strm.msg; } this.onerror(e, this.err); this.write_in_progress = false; if (this.pending_close) { this.close(); } }; Zlib.prototype.init = function (e, i, r, n, s) { a( arguments.length === 4 || arguments.length === 5, "init(windowBits, level, memLevel, strategy, [dictionary])" ); a(e >= 8 && e <= 15, "invalid windowBits"); a(i >= -1 && i <= 9, "invalid compression level"); a(r >= 1 && r <= 9, "invalid memlevel"); a( n === t.Z_FILTERED || n === t.Z_HUFFMAN_ONLY || n === t.Z_RLE || n === t.Z_FIXED || n === t.Z_DEFAULT_STRATEGY, "invalid strategy" ); this._init(i, e, r, n, s); this._setDictionary(); }; Zlib.prototype.params = function () { throw new Error("deflateParams Not supported"); }; Zlib.prototype.reset = function () { this._reset(); this._setDictionary(); }; Zlib.prototype._init = function (e, i, a, l, f) { this.level = e; this.windowBits = i; this.memLevel = a; this.strategy = l; this.flush = t.Z_NO_FLUSH; this.err = t.Z_OK; if ( this.mode === t.GZIP || this.mode === t.GUNZIP ) { this.windowBits += 16; } if (this.mode === t.UNZIP) { this.windowBits += 32; } if ( this.mode === t.DEFLATERAW || this.mode === t.INFLATERAW ) { this.windowBits = -1 * this.windowBits; } this.strm = new r(); switch (this.mode) { case t.DEFLATE: case t.GZIP: case t.DEFLATERAW: this.err = n.deflateInit2( this.strm, this.level, t.Z_DEFLATED, this.windowBits, this.memLevel, this.strategy ); break; case t.INFLATE: case t.GUNZIP: case t.INFLATERAW: case t.UNZIP: this.err = s.inflateInit2( this.strm, this.windowBits ); break; default: throw new Error( "Unknown mode " + this.mode ); } if (this.err !== t.Z_OK) { this._error("Init error"); } this.dictionary = f; this.write_in_progress = false; this.init_done = true; }; Zlib.prototype._setDictionary = function () { if (this.dictionary == null) { return; } this.err = t.Z_OK; switch (this.mode) { case t.DEFLATE: case t.DEFLATERAW: this.err = n.deflateSetDictionary( this.strm, this.dictionary ); break; default: break; } if (this.err !== t.Z_OK) { this._error("Failed to set dictionary"); } }; Zlib.prototype._reset = function () { this.err = t.Z_OK; switch (this.mode) { case t.DEFLATE: case t.DEFLATERAW: case t.GZIP: this.err = n.deflateReset(this.strm); break; case t.INFLATE: case t.INFLATERAW: case t.GUNZIP: this.err = s.inflateReset(this.strm); break; default: break; } if (this.err !== t.Z_OK) { this._error("Failed to reset stream"); } }; t.Zlib = Zlib; }, 375: function (e, t, i) { var a = i(300).Buffer; var r = i(781).Transform; var n = i(958); var s = i(837); var l = i(491).ok; var f = i(300).kMaxLength; var o = "Cannot create final Buffer. It would be larger " + "than 0x" + f.toString(16) + " bytes"; n.Z_MIN_WINDOWBITS = 8; n.Z_MAX_WINDOWBITS = 15; n.Z_DEFAULT_WINDOWBITS = 15; n.Z_MIN_CHUNK = 64; n.Z_MAX_CHUNK = Infinity; n.Z_DEFAULT_CHUNK = 16 * 1024; n.Z_MIN_MEMLEVEL = 1; n.Z_MAX_MEMLEVEL = 9; n.Z_DEFAULT_MEMLEVEL = 8; n.Z_MIN_LEVEL = -1; n.Z_MAX_LEVEL = 9; n.Z_DEFAULT_LEVEL = n.Z_DEFAULT_COMPRESSION; var h = Object.keys(n); for (var _ = 0; _ < h.length; _++) { var d = h[_]; if (d.match(/^Z/)) { Object.defineProperty(t, d, { enumerable: true, value: n[d], writable: false, }); } } var u = { Z_OK: n.Z_OK, Z_STREAM_END: n.Z_STREAM_END, Z_NEED_DICT: n.Z_NEED_DICT, Z_ERRNO: n.Z_ERRNO, Z_STREAM_ERROR: n.Z_STREAM_ERROR, Z_DATA_ERROR: n.Z_DATA_ERROR, Z_MEM_ERROR: n.Z_MEM_ERROR, Z_BUF_ERROR: n.Z_BUF_ERROR, Z_VERSION_ERROR: n.Z_VERSION_ERROR, }; var c = Object.keys(u); for (var v = 0; v < c.length; v++) { var b = c[v]; u[u[b]] = b; } Object.defineProperty(t, "codes", { enumerable: true, value: Object.freeze(u), writable: false, }); t.Deflate = Deflate; t.Inflate = Inflate; t.Gzip = Gzip; t.Gunzip = Gunzip; t.DeflateRaw = DeflateRaw; t.InflateRaw = InflateRaw; t.Unzip = Unzip; t.createDeflate = function (e) { return new Deflate(e); }; t.createInflate = function (e) { return new Inflate(e); }; t.createDeflateRaw = function (e) { return new DeflateRaw(e); }; t.createInflateRaw = function (e) { return new InflateRaw(e); }; t.createGzip = function (e) { return new Gzip(e); }; t.createGunzip = function (e) { return new Gunzip(e); }; t.createUnzip = function (e) { return new Unzip(e); }; t.deflate = function (e, t, i) { if (typeof t === "function") { i = t; t = {}; } return zlibBuffer(new Deflate(t), e, i); }; t.deflateSync = function (e, t) { return zlibBufferSync(new Deflate(t), e); }; t.gzip = function (e, t, i) { if (typeof t === "function") { i = t; t = {}; } return zlibBuffer(new Gzip(t), e, i); }; t.gzipSync = function (e, t) { return zlibBufferSync(new Gzip(t), e); }; t.deflateRaw = function (e, t, i) { if (typeof t === "function") { i = t; t = {}; } return zlibBuffer(new DeflateRaw(t), e, i); }; t.deflateRawSync = function (e, t) { return zlibBufferSync(new DeflateRaw(t), e); }; t.unzip = function (e, t, i) { if (typeof t === "function") { i = t; t = {}; } return zlibBuffer(new Unzip(t), e, i); }; t.unzipSync = function (e, t) { return zlibBufferSync(new Unzip(t), e); }; t.inflate = function (e, t, i) { if (typeof t === "function") { i = t; t = {}; } return zlibBuffer(new Inflate(t), e, i); }; t.inflateSync = function (e, t) { return zlibBufferSync(new Inflate(t), e); }; t.gunzip = function (e, t, i) { if (typeof t === "function") { i = t; t = {}; } return zlibBuffer(new Gunzip(t), e, i); }; t.gunzipSync = function (e, t) { return zlibBufferSync(new Gunzip(t), e); }; t.inflateRaw = function (e, t, i) { if (typeof t === "function") { i = t; t = {}; } return zlibBuffer(new InflateRaw(t), e, i); }; t.inflateRawSync = function (e, t) { return zlibBufferSync(new InflateRaw(t), e); }; function zlibBuffer(e, t, i) { var r = []; var n = 0; e.on("error", onError); e.on("end", onEnd); e.end(t); flow(); function flow() { var t; while (null !== (t = e.read())) { r.push(t); n += t.length; } e.once("readable", flow); } function onError(t) { e.removeListener("end", onEnd); e.removeListener("readable", flow); i(t); } function onEnd() { var t; var s = null; if (n >= f) { s = new RangeError(o); } else { t = a.concat(r, n); } r = []; e.close(); i(s, t); } } function zlibBufferSync(e, t) { if (typeof t === "string") t = a.from(t); if (!a.isBuffer(t)) throw new TypeError("Not a string or buffer"); var i = e._finishFlushFlag; return e._processChunk(t, i); } function Deflate(e) { if (!(this instanceof Deflate)) return new Deflate(e); Zlib.call(this, e, n.DEFLATE); } function Inflate(e) { if (!(this instanceof Inflate)) return new Inflate(e); Zlib.call(this, e, n.INFLATE); } function Gzip(e) { if (!(this instanceof Gzip)) return new Gzip(e); Zlib.call(this, e, n.GZIP); } function Gunzip(e) { if (!(this instanceof Gunzip)) return new Gunzip(e); Zlib.call(this, e, n.GUNZIP); } function DeflateRaw(e) { if (!(this instanceof DeflateRaw)) return new DeflateRaw(e); Zlib.call(this, e, n.DEFLATERAW); } function InflateRaw(e) { if (!(this instanceof InflateRaw)) return new InflateRaw(e); Zlib.call(this, e, n.INFLATERAW); } function Unzip(e) { if (!(this instanceof Unzip)) return new Unzip(e); Zlib.call(this, e, n.UNZIP); } function isValidFlushFlag(e) { return ( e === n.Z_NO_FLUSH || e === n.Z_PARTIAL_FLUSH || e === n.Z_SYNC_FLUSH || e === n.Z_FULL_FLUSH || e === n.Z_FINISH || e === n.Z_BLOCK ); } function Zlib(e, i) { var s = this; this._opts = e = e || {}; this._chunkSize = e.chunkSize || t.Z_DEFAULT_CHUNK; r.call(this, e); if (e.flush && !isValidFlushFlag(e.flush)) { throw new Error( "Invalid flush flag: " + e.flush ); } if ( e.finishFlush && !isValidFlushFlag(e.finishFlush) ) { throw new Error( "Invalid flush flag: " + e.finishFlush ); } this._flushFlag = e.flush || n.Z_NO_FLUSH; this._finishFlushFlag = typeof e.finishFlush !== "undefined" ? e.finishFlush : n.Z_FINISH; if (e.chunkSize) { if ( e.chunkSize < t.Z_MIN_CHUNK || e.chunkSize > t.Z_MAX_CHUNK ) { throw new Error( "Invalid chunk size: " + e.chunkSize ); } } if (e.windowBits) { if ( e.windowBits < t.Z_MIN_WINDOWBITS || e.windowBits > t.Z_MAX_WINDOWBITS ) { throw new Error( "Invalid windowBits: " + e.windowBits ); } } if (e.level) { if ( e.level < t.Z_MIN_LEVEL || e.level > t.Z_MAX_LEVEL ) { throw new Error( "Invalid compression level: " + e.level ); } } if (e.memLevel) { if ( e.memLevel < t.Z_MIN_MEMLEVEL || e.memLevel > t.Z_MAX_MEMLEVEL ) { throw new Error( "Invalid memLevel: " + e.memLevel ); } } if (e.strategy) { if ( e.strategy != t.Z_FILTERED && e.strategy != t.Z_HUFFMAN_ONLY && e.strategy != t.Z_RLE && e.strategy != t.Z_FIXED && e.strategy != t.Z_DEFAULT_STRATEGY ) { throw new Error( "Invalid strategy: " + e.strategy ); } } if (e.dictionary) { if (!a.isBuffer(e.dictionary)) { throw new Error( "Invalid dictionary: it should be a Buffer instance" ); } } this._handle = new n.Zlib(i); var l = this; this._hadError = false; this._handle.onerror = function (e, i) { _close(l); l._hadError = true; var a = new Error(e); a.errno = i; a.code = t.codes[i]; l.emit("error", a); }; var f = t.Z_DEFAULT_COMPRESSION; if (typeof e.level === "number") f = e.level; var o = t.Z_DEFAULT_STRATEGY; if (typeof e.strategy === "number") o = e.strategy; this._handle.init( e.windowBits || t.Z_DEFAULT_WINDOWBITS, f, e.memLevel || t.Z_DEFAULT_MEMLEVEL, o, e.dictionary ); this._buffer = a.allocUnsafe(this._chunkSize); this._offset = 0; this._level = f; this._strategy = o; this.once("end", this.close); Object.defineProperty(this, "_closed", { get: function () { return !s._handle; }, configurable: true, enumerable: true, }); } s.inherits(Zlib, r); Zlib.prototype.params = function (e, i, a) { if (e < t.Z_MIN_LEVEL || e > t.Z_MAX_LEVEL) { throw new RangeError( "Invalid compression level: " + e ); } if ( i != t.Z_FILTERED && i != t.Z_HUFFMAN_ONLY && i != t.Z_RLE && i != t.Z_FIXED && i != t.Z_DEFAULT_STRATEGY ) { throw new TypeError("Invalid strategy: " + i); } if (this._level !== e || this._strategy !== i) { var r = this; this.flush(n.Z_SYNC_FLUSH, function () { l(r._handle, "zlib binding closed"); r._handle.params(e, i); if (!r._hadError) { r._level = e; r._strategy = i; if (a) a(); } }); } else { process.nextTick(a); } }; Zlib.prototype.reset = function () { l(this._handle, "zlib binding closed"); return this._handle.reset(); }; Zlib.prototype._flush = function (e) { this._transform(a.alloc(0), "", e); }; Zlib.prototype.flush = function (e, t) { var i = this; var r = this._writableState; if ( typeof e === "function" || (e === undefined && !t) ) { t = e; e = n.Z_FULL_FLUSH; } if (r.ended) { if (t) process.nextTick(t); } else if (r.ending) { if (t) this.once("end", t); } else if (r.needDrain) { if (t) { this.once("drain", function () { return i.flush(e, t); }); } } else { this._flushFlag = e; this.write(a.alloc(0), "", t); } }; Zlib.prototype.close = function (e) { _close(this, e); process.nextTick(emitCloseNT, this); }; function _close(e, t) { if (t) process.nextTick(t); if (!e._handle) return; e._handle.close(); e._handle = null; } function emitCloseNT(e) { e.emit("close"); } Zlib.prototype._transform = function (e, t, i) { var r; var s = this._writableState; var l = s.ending || s.ended; var f = l && (!e || s.length === e.length); if (e !== null && !a.isBuffer(e)) return i(new Error("invalid input")); if (!this._handle) return i(new Error("zlib binding closed")); if (f) r = this._finishFlushFlag; else { r = this._flushFlag; if (e.length >= s.length) { this._flushFlag = this._opts.flush || n.Z_NO_FLUSH; } } this._processChunk(e, r, i); }; Zlib.prototype._processChunk = function (e, t, i) { var r = e && e.length; var n = this._chunkSize - this._offset; var s = 0; var h = this; var _ = typeof i === "function"; if (!_) { var d = []; var u = 0; var c; this.on("error", function (e) { c = e; }); l(this._handle, "zlib binding closed"); do { var v = this._handle.writeSync( t, e, s, r, this._buffer, this._offset, n ); } while ( !this._hadError && callback(v[0], v[1]) ); if (this._hadError) { throw c; } if (u >= f) { _close(this); throw new RangeError(o); } var b = a.concat(d, u); _close(this); return b; } l(this._handle, "zlib binding closed"); var w = this._handle.write( t, e, s, r, this._buffer, this._offset, n ); w.buffer = e; w.callback = callback; function callback(f, o) { if (this) { this.buffer = null; this.callback = null; } if (h._hadError) return; var c = n - o; l(c >= 0, "have should not go down"); if (c > 0) { var v = h._buffer.slice( h._offset, h._offset + c ); h._offset += c; if (_) { h.push(v); } else { d.push(v); u += v.length; } } if (o === 0 || h._offset >= h._chunkSize) { n = h._chunkSize; h._offset = 0; h._buffer = a.allocUnsafe(h._chunkSize); } if (o === 0) { s += r - f; r = f; if (!_) return true; var b = h._handle.write( t, e, s, r, h._buffer, h._offset, h._chunkSize ); b.callback = callback; b.buffer = e; return; } if (!_) return false; i(); } }; s.inherits(Deflate, Zlib); s.inherits(Inflate, Zlib); s.inherits(Gzip, Zlib); s.inherits(Gunzip, Zlib); s.inherits(DeflateRaw, Zlib); s.inherits(InflateRaw, Zlib); s.inherits(Unzip, Zlib); }, 533: function (e, t) { var i = typeof Uint8Array !== "undefined" && typeof Uint16Array !== "undefined" && typeof Int32Array !== "undefined"; function _has(e, t) { return Object.prototype.hasOwnProperty.call(e, t); } t.assign = function (e) { var t = Array.prototype.slice.call(arguments, 1); while (t.length) { var i = t.shift(); if (!i) { continue; } if (typeof i !== "object") { throw new TypeError( i + "must be non-object" ); } for (var a in i) { if (_has(i, a)) { e[a] = i[a]; } } } return e; }; t.shrinkBuf = function (e, t) { if (e.length === t) { return e; } if (e.subarray) { return e.subarray(0, t); } e.length = t; return e; }; var a = { arraySet: function (e, t, i, a, r) { if (t.subarray && e.subarray) { e.set(t.subarray(i, i + a), r); return; } for (var n = 0; n < a; n++) { e[r + n] = t[i + n]; } }, flattenChunks: function (e) { var t, i, a, r, n, s; a = 0; for (t = 0, i = e.length; t < i; t++) { a += e[t].length; } s = new Uint8Array(a); r = 0; for (t = 0, i = e.length; t < i; t++) { n = e[t]; s.set(n, r); r += n.length; } return s; }, }; var r = { arraySet: function (e, t, i, a, r) { for (var n = 0; n < a; n++) { e[r + n] = t[i + n]; } }, flattenChunks: function (e) { return [].concat.apply([], e); }, }; t.setTyped = function (e) { if (e) { t.Buf8 = Uint8Array; t.Buf16 = Uint16Array; t.Buf32 = Int32Array; t.assign(t, a); } else { t.Buf8 = Array; t.Buf16 = Array; t.Buf32 = Array; t.assign(t, r); } }; t.setTyped(i); }, 796: function (e) { function adler32(e, t, i, a) { var r = (e & 65535) | 0, n = ((e >>> 16) & 65535) | 0, s = 0; while (i !== 0) { s = i > 2e3 ? 2e3 : i; i -= s; do { r = (r + t[a++]) | 0; n = (n + r) | 0; } while (--s); r %= 65521; n %= 65521; } return r | (n << 16) | 0; } e.exports = adler32; }, 234: function (e) { e.exports = { Z_NO_FLUSH: 0, Z_PARTIAL_FLUSH: 1, Z_SYNC_FLUSH: 2, Z_FULL_FLUSH: 3, Z_FINISH: 4, Z_BLOCK: 5, Z_TREES: 6, Z_OK: 0, Z_STREAM_END: 1, Z_NEED_DICT: 2, Z_ERRNO: -1, Z_STREAM_ERROR: -2, Z_DATA_ERROR: -3, Z_BUF_ERROR: -5, Z_NO_COMPRESSION: 0, Z_BEST_SPEED: 1, Z_BEST_COMPRESSION: 9, Z_DEFAULT_COMPRESSION: -1, Z_FILTERED: 1, Z_HUFFMAN_ONLY: 2, Z_RLE: 3, Z_FIXED: 4, Z_DEFAULT_STRATEGY: 0, Z_BINARY: 0, Z_TEXT: 1, Z_UNKNOWN: 2, Z_DEFLATED: 8, }; }, 597: function (e) { function makeTable() { var e, t = []; for (var i = 0; i < 256; i++) { e = i; for (var a = 0; a < 8; a++) { e = e & 1 ? 3988292384 ^ (e >>> 1) : e >>> 1; } t[i] = e; } return t; } var t = makeTable(); function crc32(e, i, a, r) { var n = t, s = r + a; e ^= -1; for (var l = r; l < s; l++) { e = (e >>> 8) ^ n[(e ^ i[l]) & 255]; } return e ^ -1; } e.exports = crc32; }, 492: function (e, t, i) { var a = i(533); var r = i(427); var n = i(796); var s = i(597); var l = i(678); var f = 0; var o = 1; var h = 3; var _ = 4; var d = 5; var u = 0; var c = 1; var v = -2; var b = -3; var w = -5; var p = -1; var g = 1; var m = 2; var k = 3; var y = 4; var E = 0; var z = 2; var Z = 8; var x = 9; var I = 15; var R = 8; var S = 29; var L = 256; var A = L + 1 + S; var T = 30; var F = 19; var N = 2 * A + 1; var D = 15; var B = 3; var U = 258; var O = U + B + 1; var M = 32; var C = 42; var G = 69; var H = 73; var P = 91; var K = 103; var W = 113; var V = 666; var q = 1; var X = 2; var Y = 3; var j = 4; var J = 3; function err(e, t) { e.msg = l[t]; return t; } function rank(e) { return (e << 1) - (e > 4 ? 9 : 0); } function zero(e) { var t = e.length; while (--t >= 0) { e[t] = 0; } } function flush_pending(e) { var t = e.state; var i = t.pending; if (i > e.avail_out) { i = e.avail_out; } if (i === 0) { return; } a.arraySet( e.output, t.pending_buf, t.pending_out, i, e.next_out ); e.next_out += i; t.pending_out += i; e.total_out += i; e.avail_out -= i; t.pending -= i; if (t.pending === 0) { t.pending_out = 0; } } function flush_block_only(e, t) { r._tr_flush_block( e, e.block_start >= 0 ? e.block_start : -1, e.strstart - e.block_start, t ); e.block_start = e.strstart; flush_pending(e.strm); } function put_byte(e, t) { e.pending_buf[e.pending++] = t; } function putShortMSB(e, t) { e.pending_buf[e.pending++] = (t >>> 8) & 255; e.pending_buf[e.pending++] = t & 255; } function read_buf(e, t, i, r) { var l = e.avail_in; if (l > r) { l = r; } if (l === 0) { return 0; } e.avail_in -= l; a.arraySet(t, e.input, e.next_in, l, i); if (e.state.wrap === 1) { e.adler = n(e.adler, t, l, i); } else if (e.state.wrap === 2) { e.adler = s(e.adler, t, l, i); } e.next_in += l; e.total_in += l; return l; } function longest_match(e, t) { var i = e.max_chain_length; var a = e.strstart; var r; var n; var s = e.prev_length; var l = e.nice_match; var f = e.strstart > e.w_size - O ? e.strstart - (e.w_size - O) : 0; var o = e.window; var h = e.w_mask; var _ = e.prev; var d = e.strstart + U; var u = o[a + s - 1]; var c = o[a + s]; if (e.prev_length >= e.good_match) { i >>= 2; } if (l > e.lookahead) { l = e.lookahead; } do { r = t; if ( o[r + s] !== c || o[r + s - 1] !== u || o[r] !== o[a] || o[++r] !== o[a + 1] ) { continue; } a += 2; r++; do {} while ( o[++a] === o[++r] && o[++a] === o[++r] && o[++a] === o[++r] && o[++a] === o[++r] && o[++a] === o[++r] && o[++a] === o[++r] && o[++a] === o[++r] && o[++a] === o[++r] && a < d ); n = U - (d - a); a = d - U; if (n > s) { e.match_start = t; s = n; if (n >= l) { break; } u = o[a + s - 1]; c = o[a + s]; } } while ((t = _[t & h]) > f && --i !== 0); if (s <= e.lookahead) { return s; } return e.lookahead; } function fill_window(e) { var t = e.w_size; var i, r, n, s, l; do { s = e.window_size - e.lookahead - e.strstart; if (e.strstart >= t + (t - O)) { a.arraySet(e.window, e.window, t, t, 0); e.match_start -= t; e.strstart -= t; e.block_start -= t; r = e.hash_size; i = r; do { n = e.head[--i]; e.head[i] = n >= t ? n - t : 0; } while (--r); r = t; i = r; do { n = e.prev[--i]; e.prev[i] = n >= t ? n - t : 0; } while (--r); s += t; } if (e.strm.avail_in === 0) { break; } r = read_buf( e.strm, e.window, e.strstart + e.lookahead, s ); e.lookahead += r; if (e.lookahead + e.insert >= B) { l = e.strstart - e.insert; e.ins_h = e.window[l]; e.ins_h = ((e.ins_h << e.hash_shift) ^ e.window[l + 1]) & e.hash_mask; while (e.insert) { e.ins_h = ((e.ins_h << e.hash_shift) ^ e.window[l + B - 1]) & e.hash_mask; e.prev[l & e.w_mask] = e.head[e.ins_h]; e.head[e.ins_h] = l; l++; e.insert--; if (e.lookahead + e.insert < B) { break; } } } } while (e.lookahead < O && e.strm.avail_in !== 0); } function deflate_stored(e, t) { var i = 65535; if (i > e.pending_buf_size - 5) { i = e.pending_buf_size - 5; } for (;;) { if (e.lookahead <= 1) { fill_window(e); if (e.lookahead === 0 && t === f) { return q; } if (e.lookahead === 0) { break; } } e.strstart += e.lookahead; e.lookahead = 0; var a = e.block_start + i; if (e.strstart === 0 || e.strstart >= a) { e.lookahead = e.strstart - a; e.strstart = a; flush_block_only(e, false); if (e.strm.avail_out === 0) { return q; } } if ( e.strstart - e.block_start >= e.w_size - O ) { flush_block_only(e, false); if (e.strm.avail_out === 0) { return q; } } } e.insert = 0; if (t === _) { flush_block_only(e, true); if (e.strm.avail_out === 0) { return Y; } return j; } if (e.strstart > e.block_start) { flush_block_only(e, false); if (e.strm.avail_out === 0) { return q; } } return q; } function deflate_fast(e, t) { var i; var a; for (;;) { if (e.lookahead < O) { fill_window(e); if (e.lookahead < O && t === f) { return q; } if (e.lookahead === 0) { break; } } i = 0; if (e.lookahead >= B) { e.ins_h = ((e.ins_h << e.hash_shift) ^ e.window[e.strstart + B - 1]) & e.hash_mask; i = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h]; e.head[e.ins_h] = e.strstart; } if (i !== 0 && e.strstart - i <= e.w_size - O) { e.match_length = longest_match(e, i); } if (e.match_length >= B) { a = r._tr_tally( e, e.strstart - e.match_start, e.match_length - B ); e.lookahead -= e.match_length; if ( e.match_length <= e.max_lazy_match && e.lookahead >= B ) { e.match_length--; do { e.strstart++; e.ins_h = ((e.ins_h << e.hash_shift) ^ e.window[ e.strstart + B - 1 ]) & e.hash_mask; i = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h]; e.head[e.ins_h] = e.strstart; } while (--e.match_length !== 0); e.strstart++; } else { e.strstart += e.match_length; e.match_length = 0; e.ins_h = e.window[e.strstart]; e.ins_h = ((e.ins_h << e.hash_shift) ^ e.window[e.strstart + 1]) & e.hash_mask; } } else { a = r._tr_tally(e, 0, e.window[e.strstart]); e.lookahead--; e.strstart++; } if (a) { flush_block_only(e, false); if (e.strm.avail_out === 0) { return q; } } } e.insert = e.strstart < B - 1 ? e.strstart : B - 1; if (t === _) { flush_block_only(e, true); if (e.strm.avail_out === 0) { return Y; } return j; } if (e.last_lit) { flush_block_only(e, false); if (e.strm.avail_out === 0) { return q; } } return X; } function deflate_slow(e, t) { var i; var a; var n; for (;;) { if (e.lookahead < O) { fill_window(e); if (e.lookahead < O && t === f) { return q; } if (e.lookahead === 0) { break; } } i = 0; if (e.lookahead >= B) { e.ins_h = ((e.ins_h << e.hash_shift) ^ e.window[e.strstart + B - 1]) & e.hash_mask; i = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h]; e.head[e.ins_h] = e.strstart; } e.prev_length = e.match_length; e.prev_match = e.match_start; e.match_length = B - 1; if ( i !== 0 && e.prev_length < e.max_lazy_match && e.strstart - i <= e.w_size - O ) { e.match_length = longest_match(e, i); if ( e.match_length <= 5 && (e.strategy === g || (e.match_length === B && e.strstart - e.match_start > 4096)) ) { e.match_length = B - 1; } } if ( e.prev_length >= B && e.match_length <= e.prev_length ) { n = e.strstart + e.lookahead - B; a = r._tr_tally( e, e.strstart - 1 - e.prev_match, e.prev_length - B ); e.lookahead -= e.prev_length - 1; e.prev_length -= 2; do { if (++e.strstart <= n) { e.ins_h = ((e.ins_h << e.hash_shift) ^ e.window[ e.strstart + B - 1 ]) & e.hash_mask; i = e.prev[e.strstart & e.w_mask] = e.head[e.ins_h]; e.head[e.ins_h] = e.strstart; } } while (--e.prev_length !== 0); e.match_available = 0; e.match_length = B - 1; e.strstart++; if (a) { flush_block_only(e, false); if (e.strm.avail_out === 0) { return q; } } } else if (e.match_available) { a = r._tr_tally( e, 0, e.window[e.strstart - 1] ); if (a) { flush_block_only(e, false); } e.strstart++; e.lookahead--; if (e.strm.avail_out === 0) { return q; } } else { e.match_available = 1; e.strstart++; e.lookahead--; } } if (e.match_available) { a = r._tr_tally(e, 0, e.window[e.strstart - 1]); e.match_available = 0; } e.insert = e.strstart < B - 1 ? e.strstart : B - 1; if (t === _) { flush_block_only(e, true); if (e.strm.avail_out === 0) { return Y; } return j; } if (e.last_lit) { flush_block_only(e, false); if (e.strm.avail_out === 0) { return q; } } return X; } function deflate_rle(e, t) { var i; var a; var n, s; var l = e.window; for (;;) { if (e.lookahead <= U) { fill_window(e); if (e.lookahead <= U && t === f) { return q; } if (e.lookahead === 0) { break; } } e.match_length = 0; if (e.lookahead >= B && e.strstart > 0) { n = e.strstart - 1; a = l[n]; if ( a === l[++n] && a === l[++n] && a === l[++n] ) { s = e.strstart + U; do {} while ( a === l[++n] && a === l[++n] && a === l[++n] && a === l[++n] && a === l[++n] && a === l[++n] && a === l[++n] && a === l[++n] && n < s ); e.match_length = U - (s - n); if (e.match_length > e.lookahead) { e.match_length = e.lookahead; } } } if (e.match_length >= B) { i = r._tr_tally(e, 1, e.match_length - B); e.lookahead -= e.match_length; e.strstart += e.match_length; e.match_length = 0; } else { i = r._tr_tally(e, 0, e.window[e.strstart]); e.lookahead--; e.strstart++; } if (i) { flush_block_only(e, false); if (e.strm.avail_out === 0) { return q; } } } e.insert = 0; if (t === _) { flush_block_only(e, true); if (e.strm.avail_out === 0) { return Y; } return j; } if (e.last_lit) { flush_block_only(e, false); if (e.strm.avail_out === 0) { return q; } } return X; } function deflate_huff(e, t) { var i; for (;;) { if (e.lookahead === 0) { fill_window(e); if (e.lookahead === 0) { if (t === f) { return q; } break; } } e.match_length = 0; i = r._tr_tally(e, 0, e.window[e.strstart]); e.lookahead--; e.strstart++; if (i) { flush_block_only(e, false); if (e.strm.avail_out === 0) { return q; } } } e.insert = 0; if (t === _) { flush_block_only(e, true); if (e.strm.avail_out === 0) { return Y; } return j; } if (e.last_lit) { flush_block_only(e, false); if (e.strm.avail_out === 0) { return q; } } return X; } function Config(e, t, i, a, r) { this.good_length = e; this.max_lazy = t; this.nice_length = i; this.max_chain = a; this.func = r; } var Q; Q = [ new Config(0, 0, 0, 0, deflate_stored), new Config(4, 4, 8, 4, deflate_fast), new Config(4, 5, 16, 8, deflate_fast), new Config(4, 6, 32, 32, deflate_fast), new Config(4, 4, 16, 16, deflate_slow), new Config(8, 16, 32, 32, deflate_slow), new Config(8, 16, 128, 128, deflate_slow), new Config(8, 32, 128, 256, deflate_slow), new Config(32, 128, 258, 1024, deflate_slow), new Config(32, 258, 258, 4096, deflate_slow), ]; function lm_init(e) { e.window_size = 2 * e.w_size; zero(e.head); e.max_lazy_match = Q[e.level].max_lazy; e.good_match = Q[e.level].good_length; e.nice_match = Q[e.level].nice_length; e.max_chain_length = Q[e.level].max_chain; e.strstart = 0; e.block_start = 0; e.lookahead = 0; e.insert = 0; e.match_length = e.prev_length = B - 1; e.match_available = 0; e.ins_h = 0; } function DeflateState() { this.strm = null; this.status = 0; this.pending_buf = null; this.pending_buf_size = 0; this.pending_out = 0; this.pending = 0; this.wrap = 0; this.gzhead = null; this.gzindex = 0; this.method = Z; this.last_flush = -1; this.w_size = 0; this.w_bits = 0; this.w_mask = 0; this.window = null; this.window_size = 0; this.prev = null; this.head = null; this.ins_h = 0; this.hash_size = 0; this.hash_bits = 0; this.hash_mask = 0; this.hash_shift = 0; this.block_start = 0; this.match_length = 0; this.prev_match = 0; this.match_available = 0; this.strstart = 0; this.match_start = 0; this.lookahead = 0; this.prev_length = 0; this.max_chain_length = 0; this.max_lazy_match = 0; this.level = 0; this.strategy = 0; this.good_match = 0; this.nice_match = 0; this.dyn_ltree = new a.Buf16(N * 2); this.dyn_dtree = new a.Buf16((2 * T + 1) * 2); this.bl_tree = new a.Buf16((2 * F + 1) * 2); zero(this.dyn_ltree); zero(this.dyn_dtree); zero(this.bl_tree); this.l_desc = null; this.d_desc = null; this.bl_desc = null; this.bl_count = new a.Buf16(D + 1); this.heap = new a.Buf16(2 * A + 1); zero(this.heap); this.heap_len = 0; this.heap_max = 0; this.depth = new a.Buf16(2 * A + 1); zero(this.depth); this.l_buf = 0; this.lit_bufsize = 0; this.last_lit = 0; this.d_buf = 0; this.opt_len = 0; this.static_len = 0; this.matches = 0; this.insert = 0; this.bi_buf = 0; this.bi_valid = 0; } function deflateResetKeep(e) { var t; if (!e || !e.state) { return err(e, v); } e.total_in = e.total_out = 0; e.data_type = z; t = e.state; t.pending = 0; t.pending_out = 0; if (t.wrap < 0) { t.wrap = -t.wrap; } t.status = t.wrap ? C : W; e.adler = t.wrap === 2 ? 0 : 1; t.last_flush = f; r._tr_init(t); return u; } function deflateReset(e) { var t = deflateResetKeep(e); if (t === u) { lm_init(e.state); } return t; } function deflateSetHeader(e, t) { if (!e || !e.state) { return v; } if (e.state.wrap !== 2) { return v; } e.state.gzhead = t; return u; } function deflateInit2(e, t, i, r, n, s) { if (!e) { return v; } var l = 1; if (t === p) { t = 6; } if (r < 0) { l = 0; r = -r; } else if (r > 15) { l = 2; r -= 16; } if ( n < 1 || n > x || i !== Z || r < 8 || r > 15 || t < 0 || t > 9 || s < 0 || s > y ) { return err(e, v); } if (r === 8) { r = 9; } var f = new DeflateState(); e.state = f; f.strm = e; f.wrap = l; f.gzhead = null; f.w_bits = r; f.w_size = 1 << f.w_bits; f.w_mask = f.w_size - 1; f.hash_bits = n + 7; f.hash_size = 1 << f.hash_bits; f.hash_mask = f.hash_size - 1; f.hash_shift = ~~((f.hash_bits + B - 1) / B); f.window = new a.Buf8(f.w_size * 2); f.head = new a.Buf16(f.hash_size); f.prev = new a.Buf16(f.w_size); f.lit_bufsize = 1 << (n + 6); f.pending_buf_size = f.lit_bufsize * 4; f.pending_buf = new a.Buf8(f.pending_buf_size); f.d_buf = 1 * f.lit_bufsize; f.l_buf = (1 + 2) * f.lit_bufsize; f.level = t; f.strategy = s; f.method = i; return deflateReset(e); } function deflateInit(e, t) { return deflateInit2(e, t, Z, I, R, E); } function deflate(e, t) { var i, a; var n, l; if (!e || !e.state || t > d || t < 0) { return e ? err(e, v) : v; } a = e.state; if ( !e.output || (!e.input && e.avail_in !== 0) || (a.status === V && t !== _) ) { return err(e, e.avail_out === 0 ? w : v); } a.strm = e; i = a.last_flush; a.last_flush = t; if (a.status === C) { if (a.wrap === 2) { e.adler = 0; put_byte(a, 31); put_byte(a, 139); put_byte(a, 8); if (!a.gzhead) { put_byte(a, 0); put_byte(a, 0); put_byte(a, 0); put_byte(a, 0); put_byte(a, 0); put_byte( a, a.level === 9 ? 2 : a.strategy >= m || a.level < 2 ? 4 : 0 ); put_byte(a, J); a.status = W; } else { put_byte( a, (a.gzhead.text ? 1 : 0) + (a.gzhead.hcrc ? 2 : 0) + (!a.gzhead.extra ? 0 : 4) + (!a.gzhead.name ? 0 : 8) + (!a.gzhead.comment ? 0 : 16) ); put_byte(a, a.gzhead.time & 255); put_byte(a, (a.gzhead.time >> 8) & 255); put_byte( a, (a.gzhead.time >> 16) & 255 ); put_byte( a, (a.gzhead.time >> 24) & 255 ); put_byte( a, a.level === 9 ? 2 : a.strategy >= m || a.level < 2 ? 4 : 0 ); put_byte(a, a.gzhead.os & 255); if ( a.gzhead.extra && a.gzhead.extra.length ) { put_byte( a, a.gzhead.extra.length & 255 ); put_byte( a, (a.gzhead.extra.length >> 8) & 255 ); } if (a.gzhead.hcrc) { e.adler = s( e.adler, a.pending_buf, a.pending, 0 ); } a.gzindex = 0; a.status = G; } } else { var b = (Z + ((a.w_bits - 8) << 4)) << 8; var p = -1; if (a.strategy >= m || a.level < 2) { p = 0; } else if (a.level < 6) { p = 1; } else if (a.level === 6) { p = 2; } else { p = 3; } b |= p << 6; if (a.strstart !== 0) { b |= M; } b += 31 - (b % 31); a.status = W; putShortMSB(a, b); if (a.strstart !== 0) { putShortMSB(a, e.adler >>> 16); putShortMSB(a, e.adler & 65535); } e.adler = 1; } } if (a.status === G) { if (a.gzhead.extra) { n = a.pending; while ( a.gzindex < (a.gzhead.extra.length & 65535) ) { if (a.pending === a.pending_buf_size) { if ( a.gzhead.hcrc && a.pending > n ) { e.adler = s( e.adler, a.pending_buf, a.pending - n, n ); } flush_pending(e); n = a.pending; if ( a.pending === a.pending_buf_size ) { break; } } put_byte( a, a.gzhead.extra[a.gzindex] & 255 ); a.gzindex++; } if (a.gzhead.hcrc && a.pending > n) { e.adler = s( e.adler, a.pending_buf, a.pending - n, n ); } if (a.gzindex === a.gzhead.extra.length) { a.gzindex = 0; a.status = H; } } else { a.status = H; } } if (a.status === H) { if (a.gzhead.name) { n = a.pending; do { if (a.pending === a.pending_buf_size) { if ( a.gzhead.hcrc && a.pending > n ) { e.adler = s( e.adler, a.pending_buf, a.pending - n, n ); } flush_pending(e); n = a.pending; if ( a.pending === a.pending_buf_size ) { l = 1; break; } } if (a.gzindex < a.gzhead.name.length) { l = a.gzhead.name.charCodeAt( a.gzindex++ ) & 255; } else { l = 0; } put_byte(a, l); } while (l !== 0); if (a.gzhead.hcrc && a.pending > n) { e.adler = s( e.adler, a.pending_buf, a.pending - n, n ); } if (l === 0) { a.gzindex = 0; a.status = P; } } else { a.status = P; } } if (a.status === P) { if (a.gzhead.comment) { n = a.pending; do { if (a.pending === a.pending_buf_size) { if ( a.gzhead.hcrc && a.pending > n ) { e.adler = s( e.adler, a.pending_buf, a.pending - n, n ); } flush_pending(e); n = a.pending; if ( a.pending === a.pending_buf_size ) { l = 1; break; } } if ( a.gzindex < a.gzhead.comment.length ) { l = a.gzhead.comment.charCodeAt( a.gzindex++ ) & 255; } else { l = 0; } put_byte(a, l); } while (l !== 0); if (a.gzhead.hcrc && a.pending > n) { e.adler = s( e.adler, a.pending_buf, a.pending - n, n ); } if (l === 0) { a.status = K; } } else { a.status = K; } } if (a.status === K) { if (a.gzhead.hcrc) { if (a.pending + 2 > a.pending_buf_size) { flush_pending(e); } if (a.pending + 2 <= a.pending_buf_size) { put_byte(a, e.adler & 255); put_byte(a, (e.adler >> 8) & 255); e.adler = 0; a.status = W; } } else { a.status = W; } } if (a.pending !== 0) { flush_pending(e); if (e.avail_out === 0) { a.last_flush = -1; return u; } } else if ( e.avail_in === 0 && rank(t) <= rank(i) && t !== _ ) { return err(e, w); } if (a.status === V && e.avail_in !== 0) { return err(e, w); } if ( e.avail_in !== 0 || a.lookahead !== 0 || (t !== f && a.status !== V) ) { var g = a.strategy === m ? deflate_huff(a, t) : a.strategy === k ? deflate_rle(a, t) : Q[a.level].func(a, t); if (g === Y || g === j) { a.status = V; } if (g === q || g === Y) { if (e.avail_out === 0) { a.last_flush = -1; } return u; } if (g === X) { if (t === o) { r._tr_align(a); } else if (t !== d) { r._tr_stored_block(a, 0, 0, false); if (t === h) { zero(a.head); if (a.lookahead === 0) { a.strstart = 0; a.block_start = 0; a.insert = 0; } } } flush_pending(e); if (e.avail_out === 0) { a.last_flush = -1; return u; } } } if (t !== _) { return u; } if (a.wrap <= 0) { return c; } if (a.wrap === 2) { put_byte(a, e.adler & 255); put_byte(a, (e.adler >> 8) & 255); put_byte(a, (e.adler >> 16) & 255); put_byte(a, (e.adler >> 24) & 255); put_byte(a, e.total_in & 255); put_byte(a, (e.total_in >> 8) & 255); put_byte(a, (e.total_in >> 16) & 255); put_byte(a, (e.total_in >> 24) & 255); } else { putShortMSB(a, e.adler >>> 16); putShortMSB(a, e.adler & 65535); } flush_pending(e); if (a.wrap > 0) { a.wrap = -a.wrap; } return a.pending !== 0 ? u : c; } function deflateEnd(e) { var t; if (!e || !e.state) { return v; } t = e.state.status; if ( t !== C && t !== G && t !== H && t !== P && t !== K && t !== W && t !== V ) { return err(e, v); } e.state = null; return t === W ? err(e, b) : u; } function deflateSetDictionary(e, t) { var i = t.length; var r; var s, l; var f; var o; var h; var _; var d; if (!e || !e.state) { return v; } r = e.state; f = r.wrap; if ( f === 2 || (f === 1 && r.status !== C) || r.lookahead ) { return v; } if (f === 1) { e.adler = n(e.adler, t, i, 0); } r.wrap = 0; if (i >= r.w_size) { if (f === 0) { zero(r.head); r.strstart = 0; r.block_start = 0; r.insert = 0; } d = new a.Buf8(r.w_size); a.arraySet(d, t, i - r.w_size, r.w_size, 0); t = d; i = r.w_size; } o = e.avail_in; h = e.next_in; _ = e.input; e.avail_in = i; e.next_in = 0; e.input = t; fill_window(r); while (r.lookahead >= B) { s = r.strstart; l = r.lookahead - (B - 1); do { r.ins_h = ((r.ins_h << r.hash_shift) ^ r.window[s + B - 1]) & r.hash_mask; r.prev[s & r.w_mask] = r.head[r.ins_h]; r.head[r.ins_h] = s; s++; } while (--l); r.strstart = s; r.lookahead = B - 1; fill_window(r); } r.strstart += r.lookahead; r.block_start = r.strstart; r.insert = r.lookahead; r.lookahead = 0; r.match_length = r.prev_length = B - 1; r.match_available = 0; e.next_in = h; e.input = _; e.avail_in = o; r.wrap = f; return u; } t.deflateInit = deflateInit; t.deflateInit2 = deflateInit2; t.deflateReset = deflateReset; t.deflateResetKeep = deflateResetKeep; t.deflateSetHeader = deflateSetHeader; t.deflate = deflate; t.deflateEnd = deflateEnd; t.deflateSetDictionary = deflateSetDictionary; t.deflateInfo = "pako deflate (from Nodeca project)"; }, 163: function (e) { var t = 30; var i = 12; e.exports = function inflate_fast(e, a) { var r; var n; var s; var l; var f; var o; var h; var _; var d; var u; var c; var v; var b; var w; var p; var g; var m; var k; var y; var E; var z; var Z; var x; var I, R; r = e.state; n = e.next_in; I = e.input; s = n + (e.avail_in - 5); l = e.next_out; R = e.output; f = l - (a - e.avail_out); o = l + (e.avail_out - 257); h = r.dmax; _ = r.wsize; d = r.whave; u = r.wnext; c = r.window; v = r.hold; b = r.bits; w = r.lencode; p = r.distcode; g = (1 << r.lenbits) - 1; m = (1 << r.distbits) - 1; e: do { if (b < 15) { v += I[n++] << b; b += 8; v += I[n++] << b; b += 8; } k = w[v & g]; t: for (;;) { y = k >>> 24; v >>>= y; b -= y; y = (k >>> 16) & 255; if (y === 0) { R[l++] = k & 65535; } else if (y & 16) { E = k & 65535; y &= 15; if (y) { if (b < y) { v += I[n++] << b; b += 8; } E += v & ((1 << y) - 1); v >>>= y; b -= y; } if (b < 15) { v += I[n++] << b; b += 8; v += I[n++] << b; b += 8; } k = p[v & m]; i: for (;;) { y = k >>> 24; v >>>= y; b -= y; y = (k >>> 16) & 255; if (y & 16) { z = k & 65535; y &= 15; if (b < y) { v += I[n++] << b; b += 8; if (b < y) { v += I[n++] << b; b += 8; } } z += v & ((1 << y) - 1); if (z > h) { e.msg = "invalid distance too far back"; r.mode = t; break e; } v >>>= y; b -= y; y = l - f; if (z > y) { y = z - y; if (y > d) { if (r.sane) { e.msg = "invalid distance too far back"; r.mode = t; break e; } } Z = 0; x = c; if (u === 0) { Z += _ - y; if (y < E) { E -= y; do { R[l++] = c[Z++]; } while (--y); Z = l - z; x = R; } } else if (u < y) { Z += _ + u - y; y -= u; if (y < E) { E -= y; do { R[l++] = c[Z++]; } while (--y); Z = 0; if (u < E) { y = u; E -= y; do { R[l++] = c[Z++]; } while (--y); Z = l - z; x = R; } } } else { Z += u - y; if (y < E) { E -= y; do { R[l++] = c[Z++]; } while (--y); Z = l - z; x = R; } } while (E > 2) { R[l++] = x[Z++]; R[l++] = x[Z++]; R[l++] = x[Z++]; E -= 3; } if (E) { R[l++] = x[Z++]; if (E > 1) { R[l++] = x[Z++]; } } } else { Z = l - z; do { R[l++] = R[Z++]; R[l++] = R[Z++]; R[l++] = R[Z++]; E -= 3; } while (E > 2); if (E) { R[l++] = R[Z++]; if (E > 1) { R[l++] = R[Z++]; } } } } else if ((y & 64) === 0) { k = p[ (k & 65535) + (v & ((1 << y) - 1)) ]; continue i; } else { e.msg = "invalid distance code"; r.mode = t; break e; } break; } } else if ((y & 64) === 0) { k = w[ (k & 65535) + (v & ((1 << y) - 1)) ]; continue t; } else if (y & 32) { r.mode = i; break e; } else { e.msg = "invalid literal/length code"; r.mode = t; break e; } break; } } while (n < s && l < o); E = b >> 3; n -= E; b -= E << 3; v &= (1 << b) - 1; e.next_in = n; e.next_out = l; e.avail_in = n < s ? 5 + (s - n) : 5 - (n - s); e.avail_out = l < o ? 257 + (o - l) : 257 - (l - o); r.hold = v; r.bits = b; return; }; }, 422: function (e, t, i) { var a = i(533); var r = i(796); var n = i(597); var s = i(163); var l = i(473); var f = 0; var o = 1; var h = 2; var _ = 4; var d = 5; var u = 6; var c = 0; var v = 1; var b = 2; var w = -2; var p = -3; var g = -4; var m = -5; var k = 8; var y = 1; var E = 2; var z = 3; var Z = 4; var x = 5; var I = 6; var R = 7; var S = 8; var L = 9; var A = 10; var T = 11; var F = 12; var N = 13; var D = 14; var B = 15; var U = 16; var O = 17; var M = 18; var C = 19; var G = 20; var H = 21; var P = 22; var K = 23; var W = 24; var V = 25; var q = 26; var X = 27; var Y = 28; var j = 29; var J = 30; var Q = 31; var $ = 32; var ee = 852; var te = 592; var ie = 15; var ae = ie; function zswap32(e) { return ( ((e >>> 24) & 255) + ((e >>> 8) & 65280) + ((e & 65280) << 8) + ((e & 255) << 24) ); } function InflateState() { this.mode = 0; this.last = false; this.wrap = 0; this.havedict = false; this.flags = 0; this.dmax = 0; this.check = 0; this.total = 0; this.head = null; this.wbits = 0; this.wsize = 0; this.whave = 0; this.wnext = 0; this.window = null; this.hold = 0; this.bits = 0; this.length = 0; this.offset = 0; this.extra = 0; this.lencode = null; this.distcode = null; this.lenbits = 0; this.distbits = 0; this.ncode = 0; this.nlen = 0; this.ndist = 0; this.have = 0; this.next = null; this.lens = new a.Buf16(320); this.work = new a.Buf16(288); this.lendyn = null; this.distdyn = null; this.sane = 0; this.back = 0; this.was = 0; } function inflateResetKeep(e) { var t; if (!e || !e.state) { return w; } t = e.state; e.total_in = e.total_out = t.total = 0; e.msg = ""; if (t.wrap) { e.adler = t.wrap & 1; } t.mode = y; t.last = 0; t.havedict = 0; t.dmax = 32768; t.head = null; t.hold = 0; t.bits = 0; t.lencode = t.lendyn = new a.Buf32(ee); t.distcode = t.distdyn = new a.Buf32(te); t.sane = 1; t.back = -1; return c; } function inflateReset(e) { var t; if (!e || !e.state) { return w; } t = e.state; t.wsize = 0; t.whave = 0; t.wnext = 0; return inflateResetKeep(e); } function inflateReset2(e, t) { var i; var a; if (!e || !e.state) { return w; } a = e.state; if (t < 0) { i = 0; t = -t; } else { i = (t >> 4) + 1; if (t < 48) { t &= 15; } } if (t && (t < 8 || t > 15)) { return w; } if (a.window !== null && a.wbits !== t) { a.window = null; } a.wrap = i; a.wbits = t; return inflateReset(e); } function inflateInit2(e, t) { var i; var a; if (!e) { return w; } a = new InflateState(); e.state = a; a.window = null; i = inflateReset2(e, t); if (i !== c) { e.state = null; } return i; } function inflateInit(e) { return inflateInit2(e, ae); } var re = true; var ne, se; function fixedtables(e) { if (re) { var t; ne = new a.Buf32(512); se = new a.Buf32(32); t = 0; while (t < 144) { e.lens[t++] = 8; } while (t < 256) { e.lens[t++] = 9; } while (t < 280) { e.lens[t++] = 7; } while (t < 288) { e.lens[t++] = 8; } l(o, e.lens, 0, 288, ne, 0, e.work, { bits: 9, }); t = 0; while (t < 32) { e.lens[t++] = 5; } l(h, e.lens, 0, 32, se, 0, e.work, { bits: 5 }); re = false; } e.lencode = ne; e.lenbits = 9; e.distcode = se; e.distbits = 5; } function updatewindow(e, t, i, r) { var n; var s = e.state; if (s.window === null) { s.wsize = 1 << s.wbits; s.wnext = 0; s.whave = 0; s.window = new a.Buf8(s.wsize); } if (r >= s.wsize) { a.arraySet( s.window, t, i - s.wsize, s.wsize, 0 ); s.wnext = 0; s.whave = s.wsize; } else { n = s.wsize - s.wnext; if (n > r) { n = r; } a.arraySet(s.window, t, i - r, n, s.wnext); r -= n; if (r) { a.arraySet(s.window, t, i - r, r, 0); s.wnext = r; s.whave = s.wsize; } else { s.wnext += n; if (s.wnext === s.wsize) { s.wnext = 0; } if (s.whave < s.wsize) { s.whave += n; } } } return 0; } function inflate(e, t) { var i; var ee, te; var ie; var ae; var re, ne; var se; var le; var fe, oe; var he; var _e; var de; var ue = 0; var ce, ve, be; var we, pe, ge; var me; var ke; var ye = new a.Buf8(4); var Ee; var ze; var Ze = [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15, ]; if ( !e || !e.state || !e.output || (!e.input && e.avail_in !== 0) ) { return w; } i = e.state; if (i.mode === F) { i.mode = N; } ae = e.next_out; te = e.output; ne = e.avail_out; ie = e.next_in; ee = e.input; re = e.avail_in; se = i.hold; le = i.bits; fe = re; oe = ne; ke = c; e: for (;;) { switch (i.mode) { case y: if (i.wrap === 0) { i.mode = N; break; } while (le < 16) { if (re === 0) { break e; } re--; se += ee[ie++] << le; le += 8; } if (i.wrap & 2 && se === 35615) { i.check = 0; ye[0] = se & 255; ye[1] = (se >>> 8) & 255; i.check = n(i.check, ye, 2, 0); se = 0; le = 0; i.mode = E; break; } i.flags = 0; if (i.head) { i.head.done = false; } if ( !(i.wrap & 1) || (((se & 255) << 8) + (se >> 8)) % 31 ) { e.msg = "incorrect header check"; i.mode = J; break; } if ((se & 15) !== k) { e.msg = "unknown compression method"; i.mode = J; break; } se >>>= 4; le -= 4; me = (se & 15) + 8; if (i.wbits === 0) { i.wbits = me; } else if (me > i.wbits) { e.msg = "invalid window size"; i.mode = J; break; } i.dmax = 1 << me; e.adler = i.check = 1; i.mode = se & 512 ? A : F; se = 0; le = 0; break; case E: while (le < 16) { if (re === 0) { break e; } re--; se += ee[ie++] << le; le += 8; } i.flags = se; if ((i.flags & 255) !== k) { e.msg = "unknown compression method"; i.mode = J; break; } if (i.flags & 57344) { e.msg = "unknown header flags set"; i.mode = J; break; } if (i.head) { i.head.text = (se >> 8) & 1; } if (i.flags & 512) { ye[0] = se & 255; ye[1] = (se >>> 8) & 255; i.check = n(i.check, ye, 2, 0); } se = 0; le = 0; i.mode = z; case z: while (le < 32) { if (re === 0) { break e; } re--; se += ee[ie++] << le; le += 8; } if (i.head) { i.head.time = se; } if (i.flags & 512) { ye[0] = se & 255; ye[1] = (se >>> 8) & 255; ye[2] = (se >>> 16) & 255; ye[3] = (se >>> 24) & 255; i.check = n(i.check, ye, 4, 0); } se = 0; le = 0; i.mode = Z; case Z: while (le < 16) { if (re === 0) { break e; } re--; se += ee[ie++] << le; le += 8; } if (i.head) { i.head.xflags = se & 255; i.head.os = se >> 8; } if (i.flags & 512) { ye[0] = se & 255; ye[1] = (se >>> 8) & 255; i.check = n(i.check, ye, 2, 0); } se = 0; le = 0; i.mode = x; case x: if (i.flags & 1024) { while (le < 16) { if (re === 0) { break e; } re--; se += ee[ie++] << le; le += 8; } i.length = se; if (i.head) { i.head.extra_len = se; } if (i.flags & 512) { ye[0] = se & 255; ye[1] = (se >>> 8) & 255; i.check = n(i.check, ye, 2, 0); } se = 0; le = 0; } else if (i.head) { i.head.extra = null; } i.mode = I; case I: if (i.flags & 1024) { he = i.length; if (he > re) { he = re; } if (he) { if (i.head) { me = i.head.extra_len - i.length; if (!i.head.extra) { i.head.extra = new Array( i.head.extra_len ); } a.arraySet( i.head.extra, ee, ie, he, me ); } if (i.flags & 512) { i.check = n( i.check, ee, he, ie ); } re -= he; ie += he; i.length -= he; } if (i.length) { break e; } } i.length = 0; i.mode = R; case R: if (i.flags & 2048) { if (re === 0) { break e; } he = 0; do { me = ee[ie + he++]; if ( i.head && me && i.length < 65536 ) { i.head.name += String.fromCharCode(me); } } while (me && he < re); if (i.flags & 512) { i.check = n( i.check, ee, he, ie ); } re -= he; ie += he; if (me) { break e; } } else if (i.head) { i.head.name = null; } i.length = 0; i.mode = S; case S: if (i.flags & 4096) { if (re === 0) { break e; } he = 0; do { me = ee[ie + he++]; if ( i.head && me && i.length < 65536 ) { i.head.comment += String.fromCharCode(me); } } while (me && he < re); if (i.flags & 512) { i.check = n( i.check, ee, he, ie ); } re -= he; ie += he; if (me) { break e; } } else if (i.head) { i.head.comment = null; } i.mode = L; case L: if (i.flags & 512) { while (le < 16) { if (re === 0) { break e; } re--; se += ee[ie++] << le; le += 8; } if (se !== (i.check & 65535)) { e.msg = "header crc mismatch"; i.mode = J; break; } se = 0; le = 0; } if (i.head) { i.head.hcrc = (i.flags >> 9) & 1; i.head.done = true; } e.adler = i.check = 0; i.mode = F; break; case A: while (le < 32) { if (re === 0) { break e; } re--; se += ee[ie++] << le; le += 8; } e.adler = i.check = zswap32(se); se = 0; le = 0; i.mode = T; case T: if (i.havedict === 0) { e.next_out = ae; e.avail_out = ne; e.next_in = ie; e.avail_in = re; i.hold = se; i.bits = le; return b; } e.adler = i.check = 1; i.mode = F; case F: if (t === d || t === u) { break e; } case N: if (i.last) { se >>>= le & 7; le -= le & 7; i.mode = X; break; } while (le < 3) { if (re === 0) { break e; } re--; se += ee[ie++] << le; le += 8; } i.last = se & 1; se >>>= 1; le -= 1; switch (se & 3) { case 0: i.mode = D; break; case 1: fixedtables(i); i.mode = G; if (t === u) { se >>>= 2; le -= 2; break e; } break; case 2: i.mode = O; break; case 3: e.msg = "invalid block type"; i.mode = J; } se >>>= 2; le -= 2; break; case D: se >>>= le & 7; le -= le & 7; while (le < 32) { if (re === 0) { break e; } re--; se += ee[ie++] << le; le += 8; } if ( (se & 65535) !== ((se >>> 16) ^ 65535) ) { e.msg = "invalid stored block lengths"; i.mode = J; break; } i.length = se & 65535; se = 0; le = 0; i.mode = B; if (t === u) { break e; } case B: i.mode = U; case U: he = i.length; if (he) { if (he > re) { he = re; } if (he > ne) { he = ne; } if (he === 0) { break e; } a.arraySet(te, ee, ie, he, ae); re -= he; ie += he; ne -= he; ae += he; i.length -= he; break; } i.mode = F; break; case O: while (le < 14) { if (re === 0) { break e; } re--; se += ee[ie++] << le; le += 8; } i.nlen = (se & 31) + 257; se >>>= 5; le -= 5; i.ndist = (se & 31) + 1; se >>>= 5; le -= 5; i.ncode = (se & 15) + 4; se >>>= 4; le -= 4; if (i.nlen > 286 || i.ndist > 30) { e.msg = "too many length or distance symbols"; i.mode = J; break; } i.have = 0; i.mode = M; case M: while (i.have < i.ncode) { while (le < 3) { if (re === 0) { break e; } re--; se += ee[ie++] << le; le += 8; } i.lens[Ze[i.have++]] = se & 7; se >>>= 3; le -= 3; } while (i.have < 19) { i.lens[Ze[i.have++]] = 0; } i.lencode = i.lendyn; i.lenbits = 7; Ee = { bits: i.lenbits }; ke = l( f, i.lens, 0, 19, i.lencode, 0, i.work, Ee ); i.lenbits = Ee.bits; if (ke) { e.msg = "invalid code lengths set"; i.mode = J; break; } i.have = 0; i.mode = C; case C: while (i.have < i.nlen + i.ndist) { for (;;) { ue = i.lencode[ se & ((1 << i.lenbits) - 1) ]; ce = ue >>> 24; ve = (ue >>> 16) & 255; be = ue & 65535; if (ce <= le) { break; } if (re === 0) { break e; } re--; se += ee[ie++] << le; le += 8; } if (be < 16) { se >>>= ce; le -= ce; i.lens[i.have++] = be; } else { if (be === 16) { ze = ce + 2; while (le < ze) { if (re === 0) { break e; } re--; se += ee[ie++] << le; le += 8; } se >>>= ce; le -= ce; if (i.have === 0) { e.msg = "invalid bit length repeat"; i.mode = J; break; } me = i.lens[i.have - 1]; he = 3 + (se & 3); se >>>= 2; le -= 2; } else if (be === 17) { ze = ce + 3; while (le < ze) { if (re === 0) { break e; } re--; se += ee[ie++] << le; le += 8; } se >>>= ce; le -= ce; me = 0; he = 3 + (se & 7); se >>>= 3; le -= 3; } else { ze = ce + 7; while (le < ze) { if (re === 0) { break e; } re--; se += ee[ie++] << le; le += 8; } se >>>= ce; le -= ce; me = 0; he = 11 + (se & 127); se >>>= 7; le -= 7; } if ( i.have + he > i.nlen + i.ndist ) { e.msg = "invalid bit length repeat"; i.mode = J; break; } while (he--) { i.lens[i.have++] = me; } } } if (i.mode === J) { break; } if (i.lens[256] === 0) { e.msg = "invalid code -- missing end-of-block"; i.mode = J; break; } i.lenbits = 9; Ee = { bits: i.lenbits }; ke = l( o, i.lens, 0, i.nlen, i.lencode, 0, i.work, Ee ); i.lenbits = Ee.bits; if (ke) { e.msg = "invalid literal/lengths set"; i.mode = J; break; } i.distbits = 6; i.distcode = i.distdyn; Ee = { bits: i.distbits }; ke = l( h, i.lens, i.nlen, i.ndist, i.distcode, 0, i.work, Ee ); i.distbits = Ee.bits; if (ke) { e.msg = "invalid distances set"; i.mode = J; break; } i.mode = G; if (t === u) { break e; } case G: i.mode = H; case H: if (re >= 6 && ne >= 258) { e.next_out = ae; e.avail_out = ne; e.next_in = ie; e.avail_in = re; i.hold = se; i.bits = le; s(e, oe); ae = e.next_out; te = e.output; ne = e.avail_out; ie = e.next_in; ee = e.input; re = e.avail_in; se = i.hold; le = i.bits; if (i.mode === F) { i.back = -1; } break; } i.back = 0; for (;;) { ue = i.lencode[ se & ((1 << i.lenbits) - 1) ]; ce = ue >>> 24; ve = (ue >>> 16) & 255; be = ue & 65535; if (ce <= le) { break; } if (re === 0) { break e; } re--; se += ee[ie++] << le; le += 8; } if (ve && (ve & 240) === 0) { we = ce; pe = ve; ge = be; for (;;) { ue = i.lencode[ ge + ((se & ((1 << (we + pe)) - 1)) >> we) ]; ce = ue >>> 24; ve = (ue >>> 16) & 255; be = ue & 65535; if (we + ce <= le) { break; } if (re === 0) { break e; } re--; se += ee[ie++] << le; le += 8; } se >>>= we; le -= we; i.back += we; } se >>>= ce; le -= ce; i.back += ce; i.length = be; if (ve === 0) { i.mode = q; break; } if (ve & 32) { i.back = -1; i.mode = F; break; } if (ve & 64) { e.msg = "invalid literal/length code"; i.mode = J; break; } i.extra = ve & 15; i.mode = P; case P: if (i.extra) { ze = i.extra; while (le < ze) { if (re === 0) { break e; } re--; se += ee[ie++] << le; le += 8; } i.length += se & ((1 << i.extra) - 1); se >>>= i.extra; le -= i.extra; i.back += i.extra; } i.was = i.length; i.mode = K; case K: for (;;) { ue = i.distcode[ se & ((1 << i.distbits) - 1) ]; ce = ue >>> 24; ve = (ue >>> 16) & 255; be = ue & 65535; if (ce <= le) { break; } if (re === 0) { break e; } re--; se += ee[ie++] << le; le += 8; } if ((ve & 240) === 0) { we = ce; pe = ve; ge = be; for (;;) { ue = i.distcode[ ge + ((se & ((1 << (we + pe)) - 1)) >> we) ]; ce = ue >>> 24; ve = (ue >>> 16) & 255; be = ue & 65535; if (we + ce <= le) { break; } if (re === 0) { break e; } re--; se += ee[ie++] << le; le += 8; } se >>>= we; le -= we; i.back += we; } se >>>= ce; le -= ce; i.back += ce; if (ve & 64) { e.msg = "invalid distance code"; i.mode = J; break; } i.offset = be; i.extra = ve & 15; i.mode = W; case W: if (i.extra) { ze = i.extra; while (le < ze) { if (re === 0) { break e; } re--; se += ee[ie++] << le; le += 8; } i.offset += se & ((1 << i.extra) - 1); se >>>= i.extra; le -= i.extra; i.back += i.extra; } if (i.offset > i.dmax) { e.msg = "invalid distance too far back"; i.mode = J; break; } i.mode = V; case V: if (ne === 0) { break e; } he = oe - ne; if (i.offset > he) { he = i.offset - he; if (he > i.whave) { if (i.sane) { e.msg = "invalid distance too far back"; i.mode = J; break; } } if (he > i.wnext) { he -= i.wnext; _e = i.wsize - he; } else { _e = i.wnext - he; } if (he > i.length) { he = i.length; } de = i.window; } else { de = te; _e = ae - i.offset; he = i.length; } if (he > ne) { he = ne; } ne -= he; i.length -= he; do { te[ae++] = de[_e++]; } while (--he); if (i.length === 0) { i.mode = H; } break; case q: if (ne === 0) { break e; } te[ae++] = i.length; ne--; i.mode = H; break; case X: if (i.wrap) { while (le < 32) { if (re === 0) { break e; } re--; se |= ee[ie++] << le; le += 8; } oe -= ne; e.total_out += oe; i.total += oe; if (oe) { e.adler = i.check = i.flags ? n( i.check, te, oe, ae - oe ) : r( i.check, te, oe, ae - oe ); } oe = ne; if ( (i.flags ? se : zswap32(se)) !== i.check ) { e.msg = "incorrect data check"; i.mode = J; break; } se = 0; le = 0; } i.mode = Y; case Y: if (i.wrap && i.flags) { while (le < 32) { if (re === 0) { break e; } re--; se += ee[ie++] << le; le += 8; } if (se !== (i.total & 4294967295)) { e.msg = "incorrect length check"; i.mode = J; break; } se = 0; le = 0; } i.mode = j; case j: ke = v; break e; case J: ke = p; break e; case Q: return g; case $: default: return w; } } e.next_out = ae; e.avail_out = ne; e.next_in = ie; e.avail_in = re; i.hold = se; i.bits = le; if ( i.wsize || (oe !== e.avail_out && i.mode < J && (i.mode < X || t !== _)) ) { if ( updatewindow( e, e.output, e.next_out, oe - e.avail_out ) ) { i.mode = Q; return g; } } fe -= e.avail_in; oe -= e.avail_out; e.total_in += fe; e.total_out += oe; i.total += oe; if (i.wrap && oe) { e.adler = i.check = i.flags ? n(i.check, te, oe, e.next_out - oe) : r(i.check, te, oe, e.next_out - oe); } e.data_type = i.bits + (i.last ? 64 : 0) + (i.mode === F ? 128 : 0) + (i.mode === G || i.mode === B ? 256 : 0); if ( ((fe === 0 && oe === 0) || t === _) && ke === c ) { ke = m; } return ke; } function inflateEnd(e) { if (!e || !e.state) { return w; } var t = e.state; if (t.window) { t.window = null; } e.state = null; return c; } function inflateGetHeader(e, t) { var i; if (!e || !e.state) { return w; } i = e.state; if ((i.wrap & 2) === 0) { return w; } i.head = t; t.done = false; return c; } function inflateSetDictionary(e, t) { var i = t.length; var a; var n; var s; if (!e || !e.state) { return w; } a = e.state; if (a.wrap !== 0 && a.mode !== T) { return w; } if (a.mode === T) { n = 1; n = r(n, t, i, 0); if (n !== a.check) { return p; } } s = updatewindow(e, t, i, i); if (s) { a.mode = Q; return g; } a.havedict = 1; return c; } t.inflateReset = inflateReset; t.inflateReset2 = inflateReset2; t.inflateResetKeep = inflateResetKeep; t.inflateInit = inflateInit; t.inflateInit2 = inflateInit2; t.inflate = inflate; t.inflateEnd = inflateEnd; t.inflateGetHeader = inflateGetHeader; t.inflateSetDictionary = inflateSetDictionary; t.inflateInfo = "pako inflate (from Nodeca project)"; }, 473: function (e, t, i) { var a = i(533); var r = 15; var n = 852; var s = 592; var l = 0; var f = 1; var o = 2; var h = [ 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 _ = [ 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 d = [ 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 u = [ 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, ]; e.exports = function inflate_table( e, t, i, c, v, b, w, p ) { var g = p.bits; var m = 0; var k = 0; var y = 0, E = 0; var z = 0; var Z = 0; var x = 0; var I = 0; var R = 0; var S = 0; var L; var A; var T; var F; var N; var D = null; var B = 0; var U; var O = new a.Buf16(r + 1); var M = new a.Buf16(r + 1); var C = null; var G = 0; var H, P, K; for (m = 0; m <= r; m++) { O[m] = 0; } for (k = 0; k < c; k++) { O[t[i + k]]++; } z = g; for (E = r; E >= 1; E--) { if (O[E] !== 0) { break; } } if (z > E) { z = E; } if (E === 0) { v[b++] = (1 << 24) | (64 << 16) | 0; v[b++] = (1 << 24) | (64 << 16) | 0; p.bits = 1; return 0; } for (y = 1; y < E; y++) { if (O[y] !== 0) { break; } } if (z < y) { z = y; } I = 1; for (m = 1; m <= r; m++) { I <<= 1; I -= O[m]; if (I < 0) { return -1; } } if (I > 0 && (e === l || E !== 1)) { return -1; } M[1] = 0; for (m = 1; m < r; m++) { M[m + 1] = M[m] + O[m]; } for (k = 0; k < c; k++) { if (t[i + k] !== 0) { w[M[t[i + k]]++] = k; } } if (e === l) { D = C = w; U = 19; } else if (e === f) { D = h; B -= 257; C = _; G -= 257; U = 256; } else { D = d; C = u; U = -1; } S = 0; k = 0; m = y; N = b; Z = z; x = 0; T = -1; R = 1 << z; F = R - 1; if ((e === f && R > n) || (e === o && R > s)) { return 1; } for (;;) { H = m - x; if (w[k] < U) { P = 0; K = w[k]; } else if (w[k] > U) { P = C[G + w[k]]; K = D[B + w[k]]; } else { P = 32 + 64; K = 0; } L = 1 << (m - x); A = 1 << Z; y = A; do { A -= L; v[N + (S >> x) + A] = (H << 24) | (P << 16) | K | 0; } while (A !== 0); L = 1 << (m - 1); while (S & L) { L >>= 1; } if (L !== 0) { S &= L - 1; S += L; } else { S = 0; } k++; if (--O[m] === 0) { if (m === E) { break; } m = t[i + w[k]]; } if (m > z && (S & F) !== T) { if (x === 0) { x = z; } N += y; Z = m - x; I = 1 << Z; while (Z + x < E) { I -= O[Z + x]; if (I <= 0) { break; } Z++; I <<= 1; } R += 1 << Z; if ( (e === f && R > n) || (e === o && R > s) ) { return 1; } T = S & F; v[T] = (z << 24) | (Z << 16) | (N - b) | 0; } } if (S !== 0) { v[N + S] = ((m - x) << 24) | (64 << 16) | 0; } p.bits = z; return 0; }; }, 678: function (e) { e.exports = { 2: "need dictionary", 1: "stream end", 0: "", "-1": "file error", "-2": "stream error", "-3": "data error", "-4": "insufficient memory", "-5": "buffer error", "-6": "incompatible version", }; }, 427: function (e, t, i) { var a = i(533); var r = 4; var n = 0; var s = 1; var l = 2; function zero(e) { var t = e.length; while (--t >= 0) { e[t] = 0; } } var f = 0; var o = 1; var h = 2; var _ = 3; var d = 258; var u = 29; var c = 256; var v = c + 1 + u; var b = 30; var w = 19; var p = 2 * v + 1; var g = 15; var m = 16; var k = 7; var y = 256; var E = 16; var z = 17; var Z = 18; var x = [ 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 I = [ 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 R = [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 3, 7, ]; var S = [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15, ]; var L = 512; var A = new Array((v + 2) * 2); zero(A); var T = new Array(b * 2); zero(T); var F = new Array(L); zero(F); var N = new Array(d - _ + 1); zero(N); var D = new Array(u); zero(D); var B = new Array(b); zero(B); function StaticTreeDesc(e, t, i, a, r) { this.static_tree = e; this.extra_bits = t; this.extra_base = i; this.elems = a; this.max_length = r; this.has_stree = e && e.length; } var U; var O; var M; function TreeDesc(e, t) { this.dyn_tree = e; this.max_code = 0; this.stat_desc = t; } function d_code(e) { return e < 256 ? F[e] : F[256 + (e >>> 7)]; } function put_short(e, t) { e.pending_buf[e.pending++] = t & 255; e.pending_buf[e.pending++] = (t >>> 8) & 255; } function send_bits(e, t, i) { if (e.bi_valid > m - i) { e.bi_buf |= (t << e.bi_valid) & 65535; put_short(e, e.bi_buf); e.bi_buf = t >> (m - e.bi_valid); e.bi_valid += i - m; } else { e.bi_buf |= (t << e.bi_valid) & 65535; e.bi_valid += i; } } function send_code(e, t, i) { send_bits(e, i[t * 2], i[t * 2 + 1]); } function bi_reverse(e, t) { var i = 0; do { i |= e & 1; e >>>= 1; i <<= 1; } while (--t > 0); return i >>> 1; } function bi_flush(e) { if (e.bi_valid === 16) { put_short(e, e.bi_buf); e.bi_buf = 0; e.bi_valid = 0; } else if (e.bi_valid >= 8) { e.pending_buf[e.pending++] = e.bi_buf & 255; e.bi_buf >>= 8; e.bi_valid -= 8; } } function gen_bitlen(e, t) { var i = t.dyn_tree; var a = t.max_code; var r = t.stat_desc.static_tree; var n = t.stat_desc.has_stree; var s = t.stat_desc.extra_bits; var l = t.stat_desc.extra_base; var f = t.stat_desc.max_length; var o; var h, _; var d; var u; var c; var v = 0; for (d = 0; d <= g; d++) { e.bl_count[d] = 0; } i[e.heap[e.heap_max] * 2 + 1] = 0; for (o = e.heap_max + 1; o < p; o++) { h = e.heap[o]; d = i[i[h * 2 + 1] * 2 + 1] + 1; if (d > f) { d = f; v++; } i[h * 2 + 1] = d; if (h > a) { continue; } e.bl_count[d]++; u = 0; if (h >= l) { u = s[h - l]; } c = i[h * 2]; e.opt_len += c * (d + u); if (n) { e.static_len += c * (r[h * 2 + 1] + u); } } if (v === 0) { return; } do { d = f - 1; while (e.bl_count[d] === 0) { d--; } e.bl_count[d]--; e.bl_count[d + 1] += 2; e.bl_count[f]--; v -= 2; } while (v > 0); for (d = f; d !== 0; d--) { h = e.bl_count[d]; while (h !== 0) { _ = e.heap[--o]; if (_ > a) { continue; } if (i[_ * 2 + 1] !== d) { e.opt_len += (d - i[_ * 2 + 1]) * i[_ * 2]; i[_ * 2 + 1] = d; } h--; } } } function gen_codes(e, t, i) { var a = new Array(g + 1); var r = 0; var n; var s; for (n = 1; n <= g; n++) { a[n] = r = (r + i[n - 1]) << 1; } for (s = 0; s <= t; s++) { var l = e[s * 2 + 1]; if (l === 0) { continue; } e[s * 2] = bi_reverse(a[l]++, l); } } function tr_static_init() { var e; var t; var i; var a; var r; var n = new Array(g + 1); i = 0; for (a = 0; a < u - 1; a++) { D[a] = i; for (e = 0; e < 1 << x[a]; e++) { N[i++] = a; } } N[i - 1] = a; r = 0; for (a = 0; a < 16; a++) { B[a] = r; for (e = 0; e < 1 << I[a]; e++) { F[r++] = a; } } r >>= 7; for (; a < b; a++) { B[a] = r << 7; for (e = 0; e < 1 << (I[a] - 7); e++) { F[256 + r++] = a; } } for (t = 0; t <= g; t++) { n[t] = 0; } e = 0; while (e <= 143) { A[e * 2 + 1] = 8; e++; n[8]++; } while (e <= 255) { A[e * 2 + 1] = 9; e++; n[9]++; } while (e <= 279) { A[e * 2 + 1] = 7; e++; n[7]++; } while (e <= 287) { A[e * 2 + 1] = 8; e++; n[8]++; } gen_codes(A, v + 1, n); for (e = 0; e < b; e++) { T[e * 2 + 1] = 5; T[e * 2] = bi_reverse(e, 5); } U = new StaticTreeDesc(A, x, c + 1, v, g); O = new StaticTreeDesc(T, I, 0, b, g); M = new StaticTreeDesc(new Array(0), R, 0, w, k); } function init_block(e) { var t; for (t = 0; t < v; t++) { e.dyn_ltree[t * 2] = 0; } for (t = 0; t < b; t++) { e.dyn_dtree[t * 2] = 0; } for (t = 0; t < w; t++) { e.bl_tree[t * 2] = 0; } e.dyn_ltree[y * 2] = 1; e.opt_len = e.static_len = 0; e.last_lit = e.matches = 0; } function bi_windup(e) { if (e.bi_valid > 8) { put_short(e, e.bi_buf); } else if (e.bi_valid > 0) { e.pending_buf[e.pending++] = e.bi_buf; } e.bi_buf = 0; e.bi_valid = 0; } function copy_block(e, t, i, r) { bi_windup(e); if (r) { put_short(e, i); put_short(e, ~i); } a.arraySet( e.pending_buf, e.window, t, i, e.pending ); e.pending += i; } function smaller(e, t, i, a) { var r = t * 2; var n = i * 2; return ( e[r] < e[n] || (e[r] === e[n] && a[t] <= a[i]) ); } function pqdownheap(e, t, i) { var a = e.heap[i]; var r = i << 1; while (r <= e.heap_len) { if ( r < e.heap_len && smaller( t, e.heap[r + 1], e.heap[r], e.depth ) ) { r++; } if (smaller(t, a, e.heap[r], e.depth)) { break; } e.heap[i] = e.heap[r]; i = r; r <<= 1; } e.heap[i] = a; } function compress_block(e, t, i) { var a; var r; var n = 0; var s; var l; if (e.last_lit !== 0) { do { a = (e.pending_buf[e.d_buf + n * 2] << 8) | e.pending_buf[e.d_buf + n * 2 + 1]; r = e.pending_buf[e.l_buf + n]; n++; if (a === 0) { send_code(e, r, t); } else { s = N[r]; send_code(e, s + c + 1, t); l = x[s]; if (l !== 0) { r -= D[s]; send_bits(e, r, l); } a--; s = d_code(a); send_code(e, s, i); l = I[s]; if (l !== 0) { a -= B[s]; send_bits(e, a, l); } } } while (n < e.last_lit); } send_code(e, y, t); } function build_tree(e, t) { var i = t.dyn_tree; var a = t.stat_desc.static_tree; var r = t.stat_desc.has_stree; var n = t.stat_desc.elems; var s, l; var f = -1; var o; e.heap_len = 0; e.heap_max = p; for (s = 0; s < n; s++) { if (i[s * 2] !== 0) { e.heap[++e.heap_len] = f = s; e.depth[s] = 0; } else { i[s * 2 + 1] = 0; } } while (e.heap_len < 2) { o = e.heap[++e.heap_len] = f < 2 ? ++f : 0; i[o * 2] = 1; e.depth[o] = 0; e.opt_len--; if (r) { e.static_len -= a[o * 2 + 1]; } } t.max_code = f; for (s = e.heap_len >> 1; s >= 1; s--) { pqdownheap(e, i, s); } o = n; do { s = e.heap[1]; e.heap[1] = e.heap[e.heap_len--]; pqdownheap(e, i, 1); l = e.heap[1]; e.heap[--e.heap_max] = s; e.heap[--e.heap_max] = l; i[o * 2] = i[s * 2] + i[l * 2]; e.depth[o] = (e.depth[s] >= e.depth[l] ? e.depth[s] : e.depth[l]) + 1; i[s * 2 + 1] = i[l * 2 + 1] = o; e.heap[1] = o++; pqdownheap(e, i, 1); } while (e.heap_len >= 2); e.heap[--e.heap_max] = e.heap[1]; gen_bitlen(e, t); gen_codes(i, f, e.bl_count); } function scan_tree(e, t, i) { var a; var r = -1; var n; var s = t[0 * 2 + 1]; var l = 0; var f = 7; var o = 4; if (s === 0) { f = 138; o = 3; } t[(i + 1) * 2 + 1] = 65535; for (a = 0; a <= i; a++) { n = s; s = t[(a + 1) * 2 + 1]; if (++l < f && n === s) { continue; } else if (l < o) { e.bl_tree[n * 2] += l; } else if (n !== 0) { if (n !== r) { e.bl_tree[n * 2]++; } e.bl_tree[E * 2]++; } else if (l <= 10) { e.bl_tree[z * 2]++; } else { e.bl_tree[Z * 2]++; } l = 0; r = n; if (s === 0) { f = 138; o = 3; } else if (n === s) { f = 6; o = 3; } else { f = 7; o = 4; } } } function send_tree(e, t, i) { var a; var r = -1; var n; var s = t[0 * 2 + 1]; var l = 0; var f = 7; var o = 4; if (s === 0) { f = 138; o = 3; } for (a = 0; a <= i; a++) { n = s; s = t[(a + 1) * 2 + 1]; if (++l < f && n === s) { continue; } else if (l < o) { do { send_code(e, n, e.bl_tree); } while (--l !== 0); } else if (n !== 0) { if (n !== r) { send_code(e, n, e.bl_tree); l--; } send_code(e, E, e.bl_tree); send_bits(e, l - 3, 2); } else if (l <= 10) { send_code(e, z, e.bl_tree); send_bits(e, l - 3, 3); } else { send_code(e, Z, e.bl_tree); send_bits(e, l - 11, 7); } l = 0; r = n; if (s === 0) { f = 138; o = 3; } else if (n === s) { f = 6; o = 3; } else { f = 7; o = 4; } } } function build_bl_tree(e) { var t; scan_tree(e, e.dyn_ltree, e.l_desc.max_code); scan_tree(e, e.dyn_dtree, e.d_desc.max_code); build_tree(e, e.bl_desc); for (t = w - 1; t >= 3; t--) { if (e.bl_tree[S[t] * 2 + 1] !== 0) { break; } } e.opt_len += 3 * (t + 1) + 5 + 5 + 4; return t; } function send_all_trees(e, t, i, a) { var r; send_bits(e, t - 257, 5); send_bits(e, i - 1, 5); send_bits(e, a - 4, 4); for (r = 0; r < a; r++) { send_bits(e, e.bl_tree[S[r] * 2 + 1], 3); } send_tree(e, e.dyn_ltree, t - 1); send_tree(e, e.dyn_dtree, i - 1); } function detect_data_type(e) { var t = 4093624447; var i; for (i = 0; i <= 31; i++, t >>>= 1) { if (t & 1 && e.dyn_ltree[i * 2] !== 0) { return n; } } if ( e.dyn_ltree[9 * 2] !== 0 || e.dyn_ltree[10 * 2] !== 0 || e.dyn_ltree[13 * 2] !== 0 ) { return s; } for (i = 32; i < c; i++) { if (e.dyn_ltree[i * 2] !== 0) { return s; } } return n; } var C = false; function _tr_init(e) { if (!C) { tr_static_init(); C = true; } e.l_desc = new TreeDesc(e.dyn_ltree, U); e.d_desc = new TreeDesc(e.dyn_dtree, O); e.bl_desc = new TreeDesc(e.bl_tree, M); e.bi_buf = 0; e.bi_valid = 0; init_block(e); } function _tr_stored_block(e, t, i, a) { send_bits(e, (f << 1) + (a ? 1 : 0), 3); copy_block(e, t, i, true); } function _tr_align(e) { send_bits(e, o << 1, 3); send_code(e, y, A); bi_flush(e); } function _tr_flush_block(e, t, i, a) { var n, s; var f = 0; if (e.level > 0) { if (e.strm.data_type === l) { e.strm.data_type = detect_data_type(e); } build_tree(e, e.l_desc); build_tree(e, e.d_desc); f = build_bl_tree(e); n = (e.opt_len + 3 + 7) >>> 3; s = (e.static_len + 3 + 7) >>> 3; if (s <= n) { n = s; } } else { n = s = i + 5; } if (i + 4 <= n && t !== -1) { _tr_stored_block(e, t, i, a); } else if (e.strategy === r || s === n) { send_bits(e, (o << 1) + (a ? 1 : 0), 3); compress_block(e, A, T); } else { send_bits(e, (h << 1) + (a ? 1 : 0), 3); send_all_trees( e, e.l_desc.max_code + 1, e.d_desc.max_code + 1, f + 1 ); compress_block(e, e.dyn_ltree, e.dyn_dtree); } init_block(e); if (a) { bi_windup(e); } } function _tr_tally(e, t, i) { e.pending_buf[e.d_buf + e.last_lit * 2] = (t >>> 8) & 255; e.pending_buf[e.d_buf + e.last_lit * 2 + 1] = t & 255; e.pending_buf[e.l_buf + e.last_lit] = i & 255; e.last_lit++; if (t === 0) { e.dyn_ltree[i * 2]++; } else { e.matches++; t--; e.dyn_ltree[(N[i] + c + 1) * 2]++; e.dyn_dtree[d_code(t) * 2]++; } return e.last_lit === e.lit_bufsize - 1; } t._tr_init = _tr_init; t._tr_stored_block = _tr_stored_block; t._tr_flush_block = _tr_flush_block; t._tr_tally = _tr_tally; t._tr_align = _tr_align; }, 944: function (e) { function ZStream() { this.input = null; this.next_in = 0; this.avail_in = 0; this.total_in = 0; this.output = null; this.next_out = 0; this.avail_out = 0; this.total_out = 0; this.msg = ""; this.state = null; this.data_type = 2; this.adler = 0; } e.exports = ZStream; }, 491: function (e) { e.exports = __webpack_require__(7596); }, 300: function (e) { e.exports = __webpack_require__(1876); }, 781: function (e) { e.exports = __webpack_require__(9681); }, 837: function (e) { e.exports = __webpack_require__(9720); }, }; var t = {}; function __nccwpck_require__(i) { var a = t[i]; if (a !== undefined) { return a.exports; } var r = (t[i] = { exports: {} }); var n = true; try { e[i](r, r.exports, __nccwpck_require__); n = false; } finally { if (n) delete t[i]; } return r.exports; } if (typeof __nccwpck_require__ !== "undefined") __nccwpck_require__.ab = __dirname + "/"; var i = __nccwpck_require__(375); module.exports = i; })(); /***/ }, /***/ 1876: /***/ function (module) { var __dirname = "/"; (function () { var e = { 991: function (e, r) { "use strict"; r.byteLength = byteLength; r.toByteArray = toByteArray; r.fromByteArray = fromByteArray; var t = []; var f = []; var n = typeof Uint8Array !== "undefined" ? Uint8Array : Array; var i = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; for (var o = 0, u = i.length; o < u; ++o) { t[o] = i[o]; f[i.charCodeAt(o)] = o; } f["-".charCodeAt(0)] = 62; f["_".charCodeAt(0)] = 63; function getLens(e) { var r = e.length; if (r % 4 > 0) { throw new Error( "Invalid string. Length must be a multiple of 4" ); } var t = e.indexOf("="); if (t === -1) t = r; var f = t === r ? 0 : 4 - (t % 4); return [t, f]; } function byteLength(e) { var r = getLens(e); var t = r[0]; var f = r[1]; return ((t + f) * 3) / 4 - f; } function _byteLength(e, r, t) { return ((r + t) * 3) / 4 - t; } function toByteArray(e) { var r; var t = getLens(e); var i = t[0]; var o = t[1]; var u = new n(_byteLength(e, i, o)); var a = 0; var s = o > 0 ? i - 4 : i; var h; for (h = 0; h < s; h += 4) { r = (f[e.charCodeAt(h)] << 18) | (f[e.charCodeAt(h + 1)] << 12) | (f[e.charCodeAt(h + 2)] << 6) | f[e.charCodeAt(h + 3)]; u[a++] = (r >> 16) & 255; u[a++] = (r >> 8) & 255; u[a++] = r & 255; } if (o === 2) { r = (f[e.charCodeAt(h)] << 2) | (f[e.charCodeAt(h + 1)] >> 4); u[a++] = r & 255; } if (o === 1) { r = (f[e.charCodeAt(h)] << 10) | (f[e.charCodeAt(h + 1)] << 4) | (f[e.charCodeAt(h + 2)] >> 2); u[a++] = (r >> 8) & 255; u[a++] = r & 255; } return u; } function tripletToBase64(e) { return ( t[(e >> 18) & 63] + t[(e >> 12) & 63] + t[(e >> 6) & 63] + t[e & 63] ); } function encodeChunk(e, r, t) { var f; var n = []; for (var i = r; i < t; i += 3) { f = ((e[i] << 16) & 16711680) + ((e[i + 1] << 8) & 65280) + (e[i + 2] & 255); n.push(tripletToBase64(f)); } return n.join(""); } function fromByteArray(e) { var r; var f = e.length; var n = f % 3; var i = []; var o = 16383; for (var u = 0, a = f - n; u < a; u += o) { i.push( encodeChunk(e, u, u + o > a ? a : u + o) ); } if (n === 1) { r = e[f - 1]; i.push(t[r >> 2] + t[(r << 4) & 63] + "=="); } else if (n === 2) { r = (e[f - 2] << 8) + e[f - 1]; i.push( t[r >> 10] + t[(r >> 4) & 63] + t[(r << 2) & 63] + "=" ); } return i.join(""); } }, 293: function (e, r, t) { "use strict"; /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */ var f = t(991); var n = t(759); var i = typeof Symbol === "function" && typeof Symbol.for === "function" ? Symbol.for("nodejs.util.inspect.custom") : null; r.Buffer = Buffer; r.SlowBuffer = SlowBuffer; r.INSPECT_MAX_BYTES = 50; var o = 2147483647; r.kMaxLength = o; 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() { try { var e = new Uint8Array(1); var r = { foo: function () { return 42; }, }; Object.setPrototypeOf(r, Uint8Array.prototype); Object.setPrototypeOf(e, r); return e.foo() === 42; } catch (e) { return false; } } Object.defineProperty(Buffer.prototype, "parent", { enumerable: true, get: function () { if (!Buffer.isBuffer(this)) return undefined; return this.buffer; }, }); Object.defineProperty(Buffer.prototype, "offset", { enumerable: true, get: function () { if (!Buffer.isBuffer(this)) return undefined; return this.byteOffset; }, }); function createBuffer(e) { if (e > o) { throw new RangeError( 'The value "' + e + '" is invalid for option "size"' ); } var r = new Uint8Array(e); Object.setPrototypeOf(r, Buffer.prototype); return r; } function Buffer(e, r, t) { if (typeof e === "number") { if (typeof r === "string") { throw new TypeError( 'The "string" argument must be of type string. Received type number' ); } return allocUnsafe(e); } return from(e, r, t); } Buffer.poolSize = 8192; function from(e, r, t) { if (typeof e === "string") { return fromString(e, r); } if (ArrayBuffer.isView(e)) { return fromArrayLike(e); } if (e == null) { throw new TypeError( "The first argument must be one of type string, Buffer, ArrayBuffer, Array, " + "or Array-like Object. Received type " + typeof e ); } if ( isInstance(e, ArrayBuffer) || (e && isInstance(e.buffer, ArrayBuffer)) ) { return fromArrayBuffer(e, r, t); } if ( typeof SharedArrayBuffer !== "undefined" && (isInstance(e, SharedArrayBuffer) || (e && isInstance( e.buffer, SharedArrayBuffer ))) ) { return fromArrayBuffer(e, r, t); } if (typeof e === "number") { throw new TypeError( 'The "value" argument must not be of type number. Received type number' ); } var f = e.valueOf && e.valueOf(); if (f != null && f !== e) { return Buffer.from(f, r, t); } var n = fromObject(e); if (n) return n; if ( typeof Symbol !== "undefined" && Symbol.toPrimitive != null && typeof e[Symbol.toPrimitive] === "function" ) { return Buffer.from( e[Symbol.toPrimitive]("string"), r, t ); } throw new TypeError( "The first argument must be one of type string, Buffer, ArrayBuffer, Array, " + "or Array-like Object. Received type " + typeof e ); } Buffer.from = function (e, r, t) { return from(e, r, t); }; Object.setPrototypeOf( Buffer.prototype, Uint8Array.prototype ); Object.setPrototypeOf(Buffer, Uint8Array); function assertSize(e) { if (typeof e !== "number") { throw new TypeError( '"size" argument must be of type number' ); } else if (e < 0) { throw new RangeError( 'The value "' + e + '" is invalid for option "size"' ); } } function alloc(e, r, t) { assertSize(e); if (e <= 0) { return createBuffer(e); } if (r !== undefined) { return typeof t === "string" ? createBuffer(e).fill(r, t) : createBuffer(e).fill(r); } return createBuffer(e); } Buffer.alloc = function (e, r, t) { return alloc(e, r, t); }; function allocUnsafe(e) { assertSize(e); return createBuffer(e < 0 ? 0 : checked(e) | 0); } Buffer.allocUnsafe = function (e) { return allocUnsafe(e); }; Buffer.allocUnsafeSlow = function (e) { return allocUnsafe(e); }; function fromString(e, r) { if (typeof r !== "string" || r === "") { r = "utf8"; } if (!Buffer.isEncoding(r)) { throw new TypeError("Unknown encoding: " + r); } var t = byteLength(e, r) | 0; var f = createBuffer(t); var n = f.write(e, r); if (n !== t) { f = f.slice(0, n); } return f; } function fromArrayLike(e) { var r = e.length < 0 ? 0 : checked(e.length) | 0; var t = createBuffer(r); for (var f = 0; f < r; f += 1) { t[f] = e[f] & 255; } return t; } function fromArrayBuffer(e, r, t) { if (r < 0 || e.byteLength < r) { throw new RangeError( '"offset" is outside of buffer bounds' ); } if (e.byteLength < r + (t || 0)) { throw new RangeError( '"length" is outside of buffer bounds' ); } var f; if (r === undefined && t === undefined) { f = new Uint8Array(e); } else if (t === undefined) { f = new Uint8Array(e, r); } else { f = new Uint8Array(e, r, t); } Object.setPrototypeOf(f, Buffer.prototype); return f; } function fromObject(e) { if (Buffer.isBuffer(e)) { var r = checked(e.length) | 0; var t = createBuffer(r); if (t.length === 0) { return t; } e.copy(t, 0, 0, r); return t; } if (e.length !== undefined) { if ( typeof e.length !== "number" || numberIsNaN(e.length) ) { return createBuffer(0); } return fromArrayLike(e); } if (e.type === "Buffer" && Array.isArray(e.data)) { return fromArrayLike(e.data); } } function checked(e) { if (e >= o) { throw new RangeError( "Attempt to allocate Buffer larger than maximum " + "size: 0x" + o.toString(16) + " bytes" ); } return e | 0; } function SlowBuffer(e) { if (+e != e) { e = 0; } return Buffer.alloc(+e); } Buffer.isBuffer = function isBuffer(e) { return ( e != null && e._isBuffer === true && e !== Buffer.prototype ); }; Buffer.compare = function compare(e, r) { if (isInstance(e, Uint8Array)) e = Buffer.from(e, e.offset, e.byteLength); if (isInstance(r, Uint8Array)) r = Buffer.from(r, r.offset, r.byteLength); if (!Buffer.isBuffer(e) || !Buffer.isBuffer(r)) { throw new TypeError( 'The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array' ); } if (e === r) return 0; var t = e.length; var f = r.length; for (var n = 0, i = Math.min(t, f); n < i; ++n) { if (e[n] !== r[n]) { t = e[n]; f = r[n]; break; } } if (t < f) return -1; if (f < t) return 1; return 0; }; Buffer.isEncoding = function isEncoding(e) { switch (String(e).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(e, r) { if (!Array.isArray(e)) { throw new TypeError( '"list" argument must be an Array of Buffers' ); } if (e.length === 0) { return Buffer.alloc(0); } var t; if (r === undefined) { r = 0; for (t = 0; t < e.length; ++t) { r += e[t].length; } } var f = Buffer.allocUnsafe(r); var n = 0; for (t = 0; t < e.length; ++t) { var i = e[t]; if (isInstance(i, Uint8Array)) { i = Buffer.from(i); } if (!Buffer.isBuffer(i)) { throw new TypeError( '"list" argument must be an Array of Buffers' ); } i.copy(f, n); n += i.length; } return f; }; function byteLength(e, r) { if (Buffer.isBuffer(e)) { return e.length; } if ( ArrayBuffer.isView(e) || isInstance(e, ArrayBuffer) ) { return e.byteLength; } if (typeof e !== "string") { throw new TypeError( 'The "string" argument must be one of type string, Buffer, or ArrayBuffer. ' + "Received type " + typeof e ); } var t = e.length; var f = arguments.length > 2 && arguments[2] === true; if (!f && t === 0) return 0; var n = false; for (;;) { switch (r) { case "ascii": case "latin1": case "binary": return t; case "utf8": case "utf-8": return utf8ToBytes(e).length; case "ucs2": case "ucs-2": case "utf16le": case "utf-16le": return t * 2; case "hex": return t >>> 1; case "base64": return base64ToBytes(e).length; default: if (n) { return f ? -1 : utf8ToBytes(e).length; } r = ("" + r).toLowerCase(); n = true; } } } Buffer.byteLength = byteLength; function slowToString(e, r, t) { var f = false; if (r === undefined || r < 0) { r = 0; } if (r > this.length) { return ""; } if (t === undefined || t > this.length) { t = this.length; } if (t <= 0) { return ""; } t >>>= 0; r >>>= 0; if (t <= r) { return ""; } if (!e) e = "utf8"; while (true) { switch (e) { case "hex": return hexSlice(this, r, t); case "utf8": case "utf-8": return utf8Slice(this, r, t); case "ascii": return asciiSlice(this, r, t); case "latin1": case "binary": return latin1Slice(this, r, t); case "base64": return base64Slice(this, r, t); case "ucs2": case "ucs-2": case "utf16le": case "utf-16le": return utf16leSlice(this, r, t); default: if (f) throw new TypeError( "Unknown encoding: " + e ); e = (e + "").toLowerCase(); f = true; } } } Buffer.prototype._isBuffer = true; function swap(e, r, t) { var f = e[r]; e[r] = e[t]; e[t] = f; } Buffer.prototype.swap16 = function swap16() { var e = this.length; if (e % 2 !== 0) { throw new RangeError( "Buffer size must be a multiple of 16-bits" ); } for (var r = 0; r < e; r += 2) { swap(this, r, r + 1); } return this; }; Buffer.prototype.swap32 = function swap32() { var e = this.length; if (e % 4 !== 0) { throw new RangeError( "Buffer size must be a multiple of 32-bits" ); } for (var r = 0; r < e; r += 4) { swap(this, r, r + 3); swap(this, r + 1, r + 2); } return this; }; Buffer.prototype.swap64 = function swap64() { var e = this.length; if (e % 8 !== 0) { throw new RangeError( "Buffer size must be a multiple of 64-bits" ); } for (var r = 0; r < e; r += 8) { swap(this, r, r + 7); swap(this, r + 1, r + 6); swap(this, r + 2, r + 5); swap(this, r + 3, r + 4); } return this; }; Buffer.prototype.toString = function toString() { var e = this.length; if (e === 0) return ""; if (arguments.length === 0) return utf8Slice(this, 0, e); return slowToString.apply(this, arguments); }; Buffer.prototype.toLocaleString = Buffer.prototype.toString; Buffer.prototype.equals = function equals(e) { if (!Buffer.isBuffer(e)) throw new TypeError( "Argument must be a Buffer" ); if (this === e) return true; return Buffer.compare(this, e) === 0; }; Buffer.prototype.inspect = function inspect() { var e = ""; var t = r.INSPECT_MAX_BYTES; e = this.toString("hex", 0, t) .replace(/(.{2})/g, "$1 ") .trim(); if (this.length > t) e += " ... "; return ""; }; if (i) { Buffer.prototype[i] = Buffer.prototype.inspect; } Buffer.prototype.compare = function compare( e, r, t, f, n ) { if (isInstance(e, Uint8Array)) { e = Buffer.from(e, e.offset, e.byteLength); } if (!Buffer.isBuffer(e)) { throw new TypeError( 'The "target" argument must be one of type Buffer or Uint8Array. ' + "Received type " + typeof e ); } if (r === undefined) { r = 0; } if (t === undefined) { t = e ? e.length : 0; } if (f === undefined) { f = 0; } if (n === undefined) { n = this.length; } if ( r < 0 || t > e.length || f < 0 || n > this.length ) { throw new RangeError("out of range index"); } if (f >= n && r >= t) { return 0; } if (f >= n) { return -1; } if (r >= t) { return 1; } r >>>= 0; t >>>= 0; f >>>= 0; n >>>= 0; if (this === e) return 0; var i = n - f; var o = t - r; var u = Math.min(i, o); var a = this.slice(f, n); var s = e.slice(r, t); for (var h = 0; h < u; ++h) { if (a[h] !== s[h]) { i = a[h]; o = s[h]; break; } } if (i < o) return -1; if (o < i) return 1; return 0; }; function bidirectionalIndexOf(e, r, t, f, n) { if (e.length === 0) return -1; if (typeof t === "string") { f = t; t = 0; } else if (t > 2147483647) { t = 2147483647; } else if (t < -2147483648) { t = -2147483648; } t = +t; if (numberIsNaN(t)) { t = n ? 0 : e.length - 1; } if (t < 0) t = e.length + t; if (t >= e.length) { if (n) return -1; else t = e.length - 1; } else if (t < 0) { if (n) t = 0; else return -1; } if (typeof r === "string") { r = Buffer.from(r, f); } if (Buffer.isBuffer(r)) { if (r.length === 0) { return -1; } return arrayIndexOf(e, r, t, f, n); } else if (typeof r === "number") { r = r & 255; if ( typeof Uint8Array.prototype.indexOf === "function" ) { if (n) { return Uint8Array.prototype.indexOf.call( e, r, t ); } else { return Uint8Array.prototype.lastIndexOf.call( e, r, t ); } } return arrayIndexOf(e, [r], t, f, n); } throw new TypeError( "val must be string, number or Buffer" ); } function arrayIndexOf(e, r, t, f, n) { var i = 1; var o = e.length; var u = r.length; if (f !== undefined) { f = String(f).toLowerCase(); if ( f === "ucs2" || f === "ucs-2" || f === "utf16le" || f === "utf-16le" ) { if (e.length < 2 || r.length < 2) { return -1; } i = 2; o /= 2; u /= 2; t /= 2; } } function read(e, r) { if (i === 1) { return e[r]; } else { return e.readUInt16BE(r * i); } } var a; if (n) { var s = -1; for (a = t; a < o; a++) { if ( read(e, a) === read(r, s === -1 ? 0 : a - s) ) { if (s === -1) s = a; if (a - s + 1 === u) return s * i; } else { if (s !== -1) a -= a - s; s = -1; } } } else { if (t + u > o) t = o - u; for (a = t; a >= 0; a--) { var h = true; for (var c = 0; c < u; c++) { if (read(e, a + c) !== read(r, c)) { h = false; break; } } if (h) return a; } } return -1; } Buffer.prototype.includes = function includes(e, r, t) { return this.indexOf(e, r, t) !== -1; }; Buffer.prototype.indexOf = function indexOf(e, r, t) { return bidirectionalIndexOf(this, e, r, t, true); }; Buffer.prototype.lastIndexOf = function lastIndexOf( e, r, t ) { return bidirectionalIndexOf(this, e, r, t, false); }; function hexWrite(e, r, t, f) { t = Number(t) || 0; var n = e.length - t; if (!f) { f = n; } else { f = Number(f); if (f > n) { f = n; } } var i = r.length; if (f > i / 2) { f = i / 2; } for (var o = 0; o < f; ++o) { var u = parseInt(r.substr(o * 2, 2), 16); if (numberIsNaN(u)) return o; e[t + o] = u; } return o; } function utf8Write(e, r, t, f) { return blitBuffer( utf8ToBytes(r, e.length - t), e, t, f ); } function asciiWrite(e, r, t, f) { return blitBuffer(asciiToBytes(r), e, t, f); } function latin1Write(e, r, t, f) { return asciiWrite(e, r, t, f); } function base64Write(e, r, t, f) { return blitBuffer(base64ToBytes(r), e, t, f); } function ucs2Write(e, r, t, f) { return blitBuffer( utf16leToBytes(r, e.length - t), e, t, f ); } Buffer.prototype.write = function write(e, r, t, f) { if (r === undefined) { f = "utf8"; t = this.length; r = 0; } else if ( t === undefined && typeof r === "string" ) { f = r; t = this.length; r = 0; } else if (isFinite(r)) { r = r >>> 0; if (isFinite(t)) { t = t >>> 0; if (f === undefined) f = "utf8"; } else { f = t; t = undefined; } } else { throw new Error( "Buffer.write(string, encoding, offset[, length]) is no longer supported" ); } var n = this.length - r; if (t === undefined || t > n) t = n; if ( (e.length > 0 && (t < 0 || r < 0)) || r > this.length ) { throw new RangeError( "Attempt to write outside buffer bounds" ); } if (!f) f = "utf8"; var i = false; for (;;) { switch (f) { case "hex": return hexWrite(this, e, r, t); case "utf8": case "utf-8": return utf8Write(this, e, r, t); case "ascii": return asciiWrite(this, e, r, t); case "latin1": case "binary": return latin1Write(this, e, r, t); case "base64": return base64Write(this, e, r, t); case "ucs2": case "ucs-2": case "utf16le": case "utf-16le": return ucs2Write(this, e, r, t); default: if (i) throw new TypeError( "Unknown encoding: " + f ); f = ("" + f).toLowerCase(); i = true; } } }; Buffer.prototype.toJSON = function toJSON() { return { type: "Buffer", data: Array.prototype.slice.call( this._arr || this, 0 ), }; }; function base64Slice(e, r, t) { if (r === 0 && t === e.length) { return f.fromByteArray(e); } else { return f.fromByteArray(e.slice(r, t)); } } function utf8Slice(e, r, t) { t = Math.min(e.length, t); var f = []; var n = r; while (n < t) { var i = e[n]; var o = null; var u = i > 239 ? 4 : i > 223 ? 3 : i > 191 ? 2 : 1; if (n + u <= t) { var a, s, h, c; switch (u) { case 1: if (i < 128) { o = i; } break; case 2: a = e[n + 1]; if ((a & 192) === 128) { c = ((i & 31) << 6) | (a & 63); if (c > 127) { o = c; } } break; case 3: a = e[n + 1]; s = e[n + 2]; if ( (a & 192) === 128 && (s & 192) === 128 ) { c = ((i & 15) << 12) | ((a & 63) << 6) | (s & 63); if ( c > 2047 && (c < 55296 || c > 57343) ) { o = c; } } break; case 4: a = e[n + 1]; s = e[n + 2]; h = e[n + 3]; if ( (a & 192) === 128 && (s & 192) === 128 && (h & 192) === 128 ) { c = ((i & 15) << 18) | ((a & 63) << 12) | ((s & 63) << 6) | (h & 63); if (c > 65535 && c < 1114112) { o = c; } } } } if (o === null) { o = 65533; u = 1; } else if (o > 65535) { o -= 65536; f.push(((o >>> 10) & 1023) | 55296); o = 56320 | (o & 1023); } f.push(o); n += u; } return decodeCodePointsArray(f); } var u = 4096; function decodeCodePointsArray(e) { var r = e.length; if (r <= u) { return String.fromCharCode.apply(String, e); } var t = ""; var f = 0; while (f < r) { t += String.fromCharCode.apply( String, e.slice(f, (f += u)) ); } return t; } function asciiSlice(e, r, t) { var f = ""; t = Math.min(e.length, t); for (var n = r; n < t; ++n) { f += String.fromCharCode(e[n] & 127); } return f; } function latin1Slice(e, r, t) { var f = ""; t = Math.min(e.length, t); for (var n = r; n < t; ++n) { f += String.fromCharCode(e[n]); } return f; } function hexSlice(e, r, t) { var f = e.length; if (!r || r < 0) r = 0; if (!t || t < 0 || t > f) t = f; var n = ""; for (var i = r; i < t; ++i) { n += s[e[i]]; } return n; } function utf16leSlice(e, r, t) { var f = e.slice(r, t); var n = ""; for (var i = 0; i < f.length; i += 2) { n += String.fromCharCode(f[i] + f[i + 1] * 256); } return n; } Buffer.prototype.slice = function slice(e, r) { var t = this.length; e = ~~e; r = r === undefined ? t : ~~r; if (e < 0) { e += t; if (e < 0) e = 0; } else if (e > t) { e = t; } if (r < 0) { r += t; if (r < 0) r = 0; } else if (r > t) { r = t; } if (r < e) r = e; var f = this.subarray(e, r); Object.setPrototypeOf(f, Buffer.prototype); return f; }; function checkOffset(e, r, t) { if (e % 1 !== 0 || e < 0) throw new RangeError("offset is not uint"); if (e + r > t) throw new RangeError( "Trying to access beyond buffer length" ); } Buffer.prototype.readUIntLE = function readUIntLE( e, r, t ) { e = e >>> 0; r = r >>> 0; if (!t) checkOffset(e, r, this.length); var f = this[e]; var n = 1; var i = 0; while (++i < r && (n *= 256)) { f += this[e + i] * n; } return f; }; Buffer.prototype.readUIntBE = function readUIntBE( e, r, t ) { e = e >>> 0; r = r >>> 0; if (!t) { checkOffset(e, r, this.length); } var f = this[e + --r]; var n = 1; while (r > 0 && (n *= 256)) { f += this[e + --r] * n; } return f; }; Buffer.prototype.readUInt8 = function readUInt8(e, r) { e = e >>> 0; if (!r) checkOffset(e, 1, this.length); return this[e]; }; Buffer.prototype.readUInt16LE = function readUInt16LE( e, r ) { e = e >>> 0; if (!r) checkOffset(e, 2, this.length); return this[e] | (this[e + 1] << 8); }; Buffer.prototype.readUInt16BE = function readUInt16BE( e, r ) { e = e >>> 0; if (!r) checkOffset(e, 2, this.length); return (this[e] << 8) | this[e + 1]; }; Buffer.prototype.readUInt32LE = function readUInt32LE( e, r ) { e = e >>> 0; if (!r) checkOffset(e, 4, this.length); return ( (this[e] | (this[e + 1] << 8) | (this[e + 2] << 16)) + this[e + 3] * 16777216 ); }; Buffer.prototype.readUInt32BE = function readUInt32BE( e, r ) { e = e >>> 0; if (!r) checkOffset(e, 4, this.length); return ( this[e] * 16777216 + ((this[e + 1] << 16) | (this[e + 2] << 8) | this[e + 3]) ); }; Buffer.prototype.readIntLE = function readIntLE( e, r, t ) { e = e >>> 0; r = r >>> 0; if (!t) checkOffset(e, r, this.length); var f = this[e]; var n = 1; var i = 0; while (++i < r && (n *= 256)) { f += this[e + i] * n; } n *= 128; if (f >= n) f -= Math.pow(2, 8 * r); return f; }; Buffer.prototype.readIntBE = function readIntBE( e, r, t ) { e = e >>> 0; r = r >>> 0; if (!t) checkOffset(e, r, this.length); var f = r; var n = 1; var i = this[e + --f]; while (f > 0 && (n *= 256)) { i += this[e + --f] * n; } n *= 128; if (i >= n) i -= Math.pow(2, 8 * r); return i; }; Buffer.prototype.readInt8 = function readInt8(e, r) { e = e >>> 0; if (!r) checkOffset(e, 1, this.length); if (!(this[e] & 128)) return this[e]; return (255 - this[e] + 1) * -1; }; Buffer.prototype.readInt16LE = function readInt16LE( e, r ) { e = e >>> 0; if (!r) checkOffset(e, 2, this.length); var t = this[e] | (this[e + 1] << 8); return t & 32768 ? t | 4294901760 : t; }; Buffer.prototype.readInt16BE = function readInt16BE( e, r ) { e = e >>> 0; if (!r) checkOffset(e, 2, this.length); var t = this[e + 1] | (this[e] << 8); return t & 32768 ? t | 4294901760 : t; }; Buffer.prototype.readInt32LE = function readInt32LE( e, r ) { e = e >>> 0; if (!r) checkOffset(e, 4, this.length); return ( this[e] | (this[e + 1] << 8) | (this[e + 2] << 16) | (this[e + 3] << 24) ); }; Buffer.prototype.readInt32BE = function readInt32BE( e, r ) { e = e >>> 0; if (!r) checkOffset(e, 4, this.length); return ( (this[e] << 24) | (this[e + 1] << 16) | (this[e + 2] << 8) | this[e + 3] ); }; Buffer.prototype.readFloatLE = function readFloatLE( e, r ) { e = e >>> 0; if (!r) checkOffset(e, 4, this.length); return n.read(this, e, true, 23, 4); }; Buffer.prototype.readFloatBE = function readFloatBE( e, r ) { e = e >>> 0; if (!r) checkOffset(e, 4, this.length); return n.read(this, e, false, 23, 4); }; Buffer.prototype.readDoubleLE = function readDoubleLE( e, r ) { e = e >>> 0; if (!r) checkOffset(e, 8, this.length); return n.read(this, e, true, 52, 8); }; Buffer.prototype.readDoubleBE = function readDoubleBE( e, r ) { e = e >>> 0; if (!r) checkOffset(e, 8, this.length); return n.read(this, e, false, 52, 8); }; function checkInt(e, r, t, f, n, i) { if (!Buffer.isBuffer(e)) throw new TypeError( '"buffer" argument must be a Buffer instance' ); if (r > n || r < i) throw new RangeError( '"value" argument is out of bounds' ); if (t + f > e.length) throw new RangeError("Index out of range"); } Buffer.prototype.writeUIntLE = function writeUIntLE( e, r, t, f ) { e = +e; r = r >>> 0; t = t >>> 0; if (!f) { var n = Math.pow(2, 8 * t) - 1; checkInt(this, e, r, t, n, 0); } var i = 1; var o = 0; this[r] = e & 255; while (++o < t && (i *= 256)) { this[r + o] = (e / i) & 255; } return r + t; }; Buffer.prototype.writeUIntBE = function writeUIntBE( e, r, t, f ) { e = +e; r = r >>> 0; t = t >>> 0; if (!f) { var n = Math.pow(2, 8 * t) - 1; checkInt(this, e, r, t, n, 0); } var i = t - 1; var o = 1; this[r + i] = e & 255; while (--i >= 0 && (o *= 256)) { this[r + i] = (e / o) & 255; } return r + t; }; Buffer.prototype.writeUInt8 = function writeUInt8( e, r, t ) { e = +e; r = r >>> 0; if (!t) checkInt(this, e, r, 1, 255, 0); this[r] = e & 255; return r + 1; }; Buffer.prototype.writeUInt16LE = function writeUInt16LE( e, r, t ) { e = +e; r = r >>> 0; if (!t) checkInt(this, e, r, 2, 65535, 0); this[r] = e & 255; this[r + 1] = e >>> 8; return r + 2; }; Buffer.prototype.writeUInt16BE = function writeUInt16BE( e, r, t ) { e = +e; r = r >>> 0; if (!t) checkInt(this, e, r, 2, 65535, 0); this[r] = e >>> 8; this[r + 1] = e & 255; return r + 2; }; Buffer.prototype.writeUInt32LE = function writeUInt32LE( e, r, t ) { e = +e; r = r >>> 0; if (!t) checkInt(this, e, r, 4, 4294967295, 0); this[r + 3] = e >>> 24; this[r + 2] = e >>> 16; this[r + 1] = e >>> 8; this[r] = e & 255; return r + 4; }; Buffer.prototype.writeUInt32BE = function writeUInt32BE( e, r, t ) { e = +e; r = r >>> 0; if (!t) checkInt(this, e, r, 4, 4294967295, 0); this[r] = e >>> 24; this[r + 1] = e >>> 16; this[r + 2] = e >>> 8; this[r + 3] = e & 255; return r + 4; }; Buffer.prototype.writeIntLE = function writeIntLE( e, r, t, f ) { e = +e; r = r >>> 0; if (!f) { var n = Math.pow(2, 8 * t - 1); checkInt(this, e, r, t, n - 1, -n); } var i = 0; var o = 1; var u = 0; this[r] = e & 255; while (++i < t && (o *= 256)) { if (e < 0 && u === 0 && this[r + i - 1] !== 0) { u = 1; } this[r + i] = (((e / o) >> 0) - u) & 255; } return r + t; }; Buffer.prototype.writeIntBE = function writeIntBE( e, r, t, f ) { e = +e; r = r >>> 0; if (!f) { var n = Math.pow(2, 8 * t - 1); checkInt(this, e, r, t, n - 1, -n); } var i = t - 1; var o = 1; var u = 0; this[r + i] = e & 255; while (--i >= 0 && (o *= 256)) { if (e < 0 && u === 0 && this[r + i + 1] !== 0) { u = 1; } this[r + i] = (((e / o) >> 0) - u) & 255; } return r + t; }; Buffer.prototype.writeInt8 = function writeInt8( e, r, t ) { e = +e; r = r >>> 0; if (!t) checkInt(this, e, r, 1, 127, -128); if (e < 0) e = 255 + e + 1; this[r] = e & 255; return r + 1; }; Buffer.prototype.writeInt16LE = function writeInt16LE( e, r, t ) { e = +e; r = r >>> 0; if (!t) checkInt(this, e, r, 2, 32767, -32768); this[r] = e & 255; this[r + 1] = e >>> 8; return r + 2; }; Buffer.prototype.writeInt16BE = function writeInt16BE( e, r, t ) { e = +e; r = r >>> 0; if (!t) checkInt(this, e, r, 2, 32767, -32768); this[r] = e >>> 8; this[r + 1] = e & 255; return r + 2; }; Buffer.prototype.writeInt32LE = function writeInt32LE( e, r, t ) { e = +e; r = r >>> 0; if (!t) checkInt( this, e, r, 4, 2147483647, -2147483648 ); this[r] = e & 255; this[r + 1] = e >>> 8; this[r + 2] = e >>> 16; this[r + 3] = e >>> 24; return r + 4; }; Buffer.prototype.writeInt32BE = function writeInt32BE( e, r, t ) { e = +e; r = r >>> 0; if (!t) checkInt( this, e, r, 4, 2147483647, -2147483648 ); if (e < 0) e = 4294967295 + e + 1; this[r] = e >>> 24; this[r + 1] = e >>> 16; this[r + 2] = e >>> 8; this[r + 3] = e & 255; return r + 4; }; function checkIEEE754(e, r, t, f, n, i) { if (t + f > e.length) throw new RangeError("Index out of range"); if (t < 0) throw new RangeError("Index out of range"); } function writeFloat(e, r, t, f, i) { r = +r; t = t >>> 0; if (!i) { checkIEEE754( e, r, t, 4, 34028234663852886e22, -34028234663852886e22 ); } n.write(e, r, t, f, 23, 4); return t + 4; } Buffer.prototype.writeFloatLE = function writeFloatLE( e, r, t ) { return writeFloat(this, e, r, true, t); }; Buffer.prototype.writeFloatBE = function writeFloatBE( e, r, t ) { return writeFloat(this, e, r, false, t); }; function writeDouble(e, r, t, f, i) { r = +r; t = t >>> 0; if (!i) { checkIEEE754( e, r, t, 8, 17976931348623157e292, -17976931348623157e292 ); } n.write(e, r, t, f, 52, 8); return t + 8; } Buffer.prototype.writeDoubleLE = function writeDoubleLE( e, r, t ) { return writeDouble(this, e, r, true, t); }; Buffer.prototype.writeDoubleBE = function writeDoubleBE( e, r, t ) { return writeDouble(this, e, r, false, t); }; Buffer.prototype.copy = function copy(e, r, t, f) { if (!Buffer.isBuffer(e)) throw new TypeError( "argument should be a Buffer" ); if (!t) t = 0; if (!f && f !== 0) f = this.length; if (r >= e.length) r = e.length; if (!r) r = 0; if (f > 0 && f < t) f = t; if (f === t) return 0; if (e.length === 0 || this.length === 0) return 0; if (r < 0) { throw new RangeError( "targetStart out of bounds" ); } if (t < 0 || t >= this.length) throw new RangeError("Index out of range"); if (f < 0) throw new RangeError("sourceEnd out of bounds"); if (f > this.length) f = this.length; if (e.length - r < f - t) { f = e.length - r + t; } var n = f - t; if ( this === e && typeof Uint8Array.prototype.copyWithin === "function" ) { this.copyWithin(r, t, f); } else if (this === e && t < r && r < f) { for (var i = n - 1; i >= 0; --i) { e[i + r] = this[i + t]; } } else { Uint8Array.prototype.set.call( e, this.subarray(t, f), r ); } return n; }; Buffer.prototype.fill = function fill(e, r, t, f) { if (typeof e === "string") { if (typeof r === "string") { f = r; r = 0; t = this.length; } else if (typeof t === "string") { f = t; t = this.length; } if (f !== undefined && typeof f !== "string") { throw new TypeError( "encoding must be a string" ); } if ( typeof f === "string" && !Buffer.isEncoding(f) ) { throw new TypeError( "Unknown encoding: " + f ); } if (e.length === 1) { var n = e.charCodeAt(0); if ( (f === "utf8" && n < 128) || f === "latin1" ) { e = n; } } } else if (typeof e === "number") { e = e & 255; } else if (typeof e === "boolean") { e = Number(e); } if (r < 0 || this.length < r || this.length < t) { throw new RangeError("Out of range index"); } if (t <= r) { return this; } r = r >>> 0; t = t === undefined ? this.length : t >>> 0; if (!e) e = 0; var i; if (typeof e === "number") { for (i = r; i < t; ++i) { this[i] = e; } } else { var o = Buffer.isBuffer(e) ? e : Buffer.from(e, f); var u = o.length; if (u === 0) { throw new TypeError( 'The value "' + e + '" is invalid for argument "value"' ); } for (i = 0; i < t - r; ++i) { this[i + r] = o[i % u]; } } return this; }; var a = /[^+/0-9A-Za-z-_]/g; function base64clean(e) { e = e.split("=")[0]; e = e.trim().replace(a, ""); if (e.length < 2) return ""; while (e.length % 4 !== 0) { e = e + "="; } return e; } function utf8ToBytes(e, r) { r = r || Infinity; var t; var f = e.length; var n = null; var i = []; for (var o = 0; o < f; ++o) { t = e.charCodeAt(o); if (t > 55295 && t < 57344) { if (!n) { if (t > 56319) { if ((r -= 3) > -1) i.push(239, 191, 189); continue; } else if (o + 1 === f) { if ((r -= 3) > -1) i.push(239, 191, 189); continue; } n = t; continue; } if (t < 56320) { if ((r -= 3) > -1) i.push(239, 191, 189); n = t; continue; } t = (((n - 55296) << 10) | (t - 56320)) + 65536; } else if (n) { if ((r -= 3) > -1) i.push(239, 191, 189); } n = null; if (t < 128) { if ((r -= 1) < 0) break; i.push(t); } else if (t < 2048) { if ((r -= 2) < 0) break; i.push((t >> 6) | 192, (t & 63) | 128); } else if (t < 65536) { if ((r -= 3) < 0) break; i.push( (t >> 12) | 224, ((t >> 6) & 63) | 128, (t & 63) | 128 ); } else if (t < 1114112) { if ((r -= 4) < 0) break; i.push( (t >> 18) | 240, ((t >> 12) & 63) | 128, ((t >> 6) & 63) | 128, (t & 63) | 128 ); } else { throw new Error("Invalid code point"); } } return i; } function asciiToBytes(e) { var r = []; for (var t = 0; t < e.length; ++t) { r.push(e.charCodeAt(t) & 255); } return r; } function utf16leToBytes(e, r) { var t, f, n; var i = []; for (var o = 0; o < e.length; ++o) { if ((r -= 2) < 0) break; t = e.charCodeAt(o); f = t >> 8; n = t % 256; i.push(n); i.push(f); } return i; } function base64ToBytes(e) { return f.toByteArray(base64clean(e)); } function blitBuffer(e, r, t, f) { for (var n = 0; n < f; ++n) { if (n + t >= r.length || n >= e.length) break; r[n + t] = e[n]; } return n; } function isInstance(e, r) { return ( e instanceof r || (e != null && e.constructor != null && e.constructor.name != null && e.constructor.name === r.name) ); } function numberIsNaN(e) { return e !== e; } var s = (function () { var e = "0123456789abcdef"; var r = new Array(256); for (var t = 0; t < 16; ++t) { var f = t * 16; for (var n = 0; n < 16; ++n) { r[f + n] = e[t] + e[n]; } } return r; })(); }, 759: function (e, r) { r.read = function (e, r, t, f, n) { var i, o; var u = n * 8 - f - 1; var a = (1 << u) - 1; var s = a >> 1; var h = -7; var c = t ? n - 1 : 0; var l = t ? -1 : 1; var p = e[r + c]; c += l; i = p & ((1 << -h) - 1); p >>= -h; h += u; for ( ; h > 0; i = i * 256 + e[r + c], c += l, h -= 8 ) {} o = i & ((1 << -h) - 1); i >>= -h; h += f; for ( ; h > 0; o = o * 256 + e[r + c], c += l, h -= 8 ) {} if (i === 0) { i = 1 - s; } else if (i === a) { return o ? NaN : (p ? -1 : 1) * Infinity; } else { o = o + Math.pow(2, f); i = i - s; } return (p ? -1 : 1) * o * Math.pow(2, i - f); }; r.write = function (e, r, t, f, n, i) { var o, u, a; var s = i * 8 - n - 1; var h = (1 << s) - 1; var c = h >> 1; var l = n === 23 ? Math.pow(2, -24) - Math.pow(2, -77) : 0; var p = f ? 0 : i - 1; var y = f ? 1 : -1; var g = r < 0 || (r === 0 && 1 / r < 0) ? 1 : 0; r = Math.abs(r); if (isNaN(r) || r === Infinity) { u = isNaN(r) ? 1 : 0; o = h; } else { o = Math.floor(Math.log(r) / Math.LN2); if (r * (a = Math.pow(2, -o)) < 1) { o--; a *= 2; } if (o + c >= 1) { r += l / a; } else { r += l * Math.pow(2, 1 - c); } if (r * a >= 2) { o++; a /= 2; } if (o + c >= h) { u = 0; o = h; } else if (o + c >= 1) { u = (r * a - 1) * Math.pow(2, n); o = o + c; } else { u = r * Math.pow(2, c - 1) * Math.pow(2, n); o = 0; } } for ( ; n >= 8; e[t + p] = u & 255, p += y, u /= 256, n -= 8 ) {} o = (o << n) | u; s += n; for ( ; s > 0; e[t + p] = o & 255, p += y, o /= 256, s -= 8 ) {} e[t + p - y] |= g * 128; }; }, }; var r = {}; function __nccwpck_require__(t) { var f = r[t]; if (f !== undefined) { return f.exports; } var n = (r[t] = { exports: {} }); var i = true; try { e[t](n, n.exports, __nccwpck_require__); i = false; } finally { if (i) delete r[t]; } return n.exports; } if (typeof __nccwpck_require__ !== "undefined") __nccwpck_require__.ab = __dirname + "/"; var t = __nccwpck_require__(293); module.exports = t; })(); /***/ }, /***/ 5293: /***/ function (module) { var __dirname = "/"; (function () { "use strict"; var e = { 182: function (e) { var t = typeof Reflect === "object" ? Reflect : null; var n = t && typeof t.apply === "function" ? t.apply : function ReflectApply(e, t, n) { return Function.prototype.apply.call( e, t, n ); }; var r; if (t && typeof t.ownKeys === "function") { r = t.ownKeys; } else if (Object.getOwnPropertySymbols) { r = function ReflectOwnKeys(e) { return Object.getOwnPropertyNames(e).concat( Object.getOwnPropertySymbols(e) ); }; } else { r = function ReflectOwnKeys(e) { return Object.getOwnPropertyNames(e); }; } function ProcessEmitWarning(e) { if (console && console.warn) console.warn(e); } var i = Number.isNaN || function NumberIsNaN(e) { return e !== e; }; function EventEmitter() { EventEmitter.init.call(this); } e.exports = EventEmitter; e.exports.once = once; EventEmitter.EventEmitter = EventEmitter; EventEmitter.prototype._events = undefined; EventEmitter.prototype._eventsCount = 0; EventEmitter.prototype._maxListeners = undefined; var s = 10; function checkListener(e) { if (typeof e !== "function") { throw new TypeError( 'The "listener" argument must be of type Function. Received type ' + typeof e ); } } Object.defineProperty( EventEmitter, "defaultMaxListeners", { enumerable: true, get: function () { return s; }, set: function (e) { if ( typeof e !== "number" || e < 0 || i(e) ) { throw new RangeError( 'The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received ' + e + "." ); } s = e; }, } ); 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; }; EventEmitter.prototype.setMaxListeners = function setMaxListeners(e) { if (typeof e !== "number" || e < 0 || i(e)) { throw new RangeError( 'The value of "n" is out of range. It must be a non-negative number. Received ' + e + "." ); } this._maxListeners = e; return this; }; function _getMaxListeners(e) { if (e._maxListeners === undefined) return EventEmitter.defaultMaxListeners; return e._maxListeners; } EventEmitter.prototype.getMaxListeners = function getMaxListeners() { return _getMaxListeners(this); }; EventEmitter.prototype.emit = function emit(e) { var t = []; for (var r = 1; r < arguments.length; r++) t.push(arguments[r]); var i = e === "error"; var s = this._events; if (s !== undefined) i = i && s.error === undefined; else if (!i) return false; if (i) { var o; if (t.length > 0) o = t[0]; if (o instanceof Error) { throw o; } var f = new Error( "Unhandled error." + (o ? " (" + o.message + ")" : "") ); f.context = o; throw f; } var u = s[e]; if (u === undefined) return false; if (typeof u === "function") { n(u, this, t); } else { var a = u.length; var c = arrayClone(u, a); for (var r = 0; r < a; ++r) n(c[r], this, t); } return true; }; function _addListener(e, t, n, r) { var i; var s; var o; checkListener(n); s = e._events; if (s === undefined) { s = e._events = Object.create(null); e._eventsCount = 0; } else { if (s.newListener !== undefined) { e.emit( "newListener", t, n.listener ? n.listener : n ); s = e._events; } o = s[t]; } if (o === undefined) { o = s[t] = n; ++e._eventsCount; } else { if (typeof o === "function") { o = s[t] = r ? [n, o] : [o, n]; } else if (r) { o.unshift(n); } else { o.push(n); } i = _getMaxListeners(e); if (i > 0 && o.length > i && !o.warned) { o.warned = true; var f = new Error( "Possible EventEmitter memory leak detected. " + o.length + " " + String(t) + " listeners " + "added. Use emitter.setMaxListeners() to " + "increase limit" ); f.name = "MaxListenersExceededWarning"; f.emitter = e; f.type = t; f.count = o.length; ProcessEmitWarning(f); } } return e; } EventEmitter.prototype.addListener = function addListener(e, t) { return _addListener(this, e, t, false); }; EventEmitter.prototype.on = EventEmitter.prototype.addListener; EventEmitter.prototype.prependListener = function prependListener(e, t) { return _addListener(this, e, t, 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(e, t, n) { var r = { fired: false, wrapFn: undefined, target: e, type: t, listener: n, }; var i = onceWrapper.bind(r); i.listener = n; r.wrapFn = i; return i; } EventEmitter.prototype.once = function once(e, t) { checkListener(t); this.on(e, _onceWrap(this, e, t)); return this; }; EventEmitter.prototype.prependOnceListener = function prependOnceListener(e, t) { checkListener(t); this.prependListener(e, _onceWrap(this, e, t)); return this; }; EventEmitter.prototype.removeListener = function removeListener(e, t) { var n, r, i, s, o; checkListener(t); r = this._events; if (r === undefined) return this; n = r[e]; if (n === undefined) return this; if (n === t || n.listener === t) { if (--this._eventsCount === 0) this._events = Object.create(null); else { delete r[e]; if (r.removeListener) this.emit( "removeListener", e, n.listener || t ); } } else if (typeof n !== "function") { i = -1; for (s = n.length - 1; s >= 0; s--) { if (n[s] === t || n[s].listener === t) { o = n[s].listener; i = s; break; } } if (i < 0) return this; if (i === 0) n.shift(); else { spliceOne(n, i); } if (n.length === 1) r[e] = n[0]; if (r.removeListener !== undefined) this.emit("removeListener", e, o || t); } return this; }; EventEmitter.prototype.off = EventEmitter.prototype.removeListener; EventEmitter.prototype.removeAllListeners = function removeAllListeners(e) { var t, n, r; n = this._events; if (n === undefined) return this; if (n.removeListener === undefined) { if (arguments.length === 0) { this._events = Object.create(null); this._eventsCount = 0; } else if (n[e] !== undefined) { if (--this._eventsCount === 0) this._events = Object.create(null); else delete n[e]; } return this; } if (arguments.length === 0) { var i = Object.keys(n); var s; for (r = 0; r < i.length; ++r) { s = i[r]; if (s === "removeListener") continue; this.removeAllListeners(s); } this.removeAllListeners("removeListener"); this._events = Object.create(null); this._eventsCount = 0; return this; } t = n[e]; if (typeof t === "function") { this.removeListener(e, t); } else if (t !== undefined) { for (r = t.length - 1; r >= 0; r--) { this.removeListener(e, t[r]); } } return this; }; function _listeners(e, t, n) { var r = e._events; if (r === undefined) return []; var i = r[t]; if (i === undefined) return []; if (typeof i === "function") return n ? [i.listener || i] : [i]; return n ? unwrapListeners(i) : arrayClone(i, i.length); } EventEmitter.prototype.listeners = function listeners( e ) { return _listeners(this, e, true); }; EventEmitter.prototype.rawListeners = function rawListeners(e) { return _listeners(this, e, false); }; EventEmitter.listenerCount = function (e, t) { if (typeof e.listenerCount === "function") { return e.listenerCount(t); } else { return listenerCount.call(e, t); } }; EventEmitter.prototype.listenerCount = listenerCount; function listenerCount(e) { var t = this._events; if (t !== undefined) { var n = t[e]; if (typeof n === "function") { return 1; } else if (n !== undefined) { return n.length; } } return 0; } EventEmitter.prototype.eventNames = function eventNames() { return this._eventsCount > 0 ? r(this._events) : []; }; function arrayClone(e, t) { var n = new Array(t); for (var r = 0; r < t; ++r) n[r] = e[r]; return n; } function spliceOne(e, t) { for (; t + 1 < e.length; t++) e[t] = e[t + 1]; e.pop(); } function unwrapListeners(e) { var t = new Array(e.length); for (var n = 0; n < t.length; ++n) { t[n] = e[n].listener || e[n]; } return t; } function once(e, t) { return new Promise(function (n, r) { function errorListener(n) { e.removeListener(t, resolver); r(n); } function resolver() { if ( typeof e.removeListener === "function" ) { e.removeListener( "error", errorListener ); } n([].slice.call(arguments)); } eventTargetAgnosticAddListener(e, t, resolver, { once: true, }); if (t !== "error") { addErrorHandlerIfEventEmitter( e, errorListener, { once: true } ); } }); } function addErrorHandlerIfEventEmitter(e, t, n) { if (typeof e.on === "function") { eventTargetAgnosticAddListener( e, "error", t, n ); } } function eventTargetAgnosticAddListener(e, t, n, r) { if (typeof e.on === "function") { if (r.once) { e.once(t, n); } else { e.on(t, n); } } else if ( typeof e.addEventListener === "function" ) { e.addEventListener(t, function wrapListener(i) { if (r.once) { e.removeEventListener(t, wrapListener); } n(i); }); } else { throw new TypeError( 'The "emitter" argument must be of type EventEmitter. Received type ' + typeof e ); } } }, }; var t = {}; function __nccwpck_require__(n) { var r = t[n]; if (r !== undefined) { return r.exports; } var i = (t[n] = { exports: {} }); var s = true; try { e[n](i, i.exports, __nccwpck_require__); s = false; } finally { if (s) delete t[n]; } return i.exports; } if (typeof __nccwpck_require__ !== "undefined") __nccwpck_require__.ab = __dirname + "/"; var n = __nccwpck_require__(182); module.exports = n; })(); /***/ }, /***/ 7663: /***/ function (module) { var __dirname = "/"; (function () { var e = { 162: function (e) { var t = (e.exports = {}); var r; var n; 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") { r = setTimeout; } else { r = defaultSetTimout; } } catch (e) { r = defaultSetTimout; } try { if (typeof clearTimeout === "function") { n = clearTimeout; } else { n = defaultClearTimeout; } } catch (e) { n = defaultClearTimeout; } })(); function runTimeout(e) { if (r === setTimeout) { return setTimeout(e, 0); } if ((r === defaultSetTimout || !r) && setTimeout) { r = setTimeout; return setTimeout(e, 0); } try { return r(e, 0); } catch (t) { try { return r.call(null, e, 0); } catch (t) { return r.call(this, e, 0); } } } function runClearTimeout(e) { if (n === clearTimeout) { return clearTimeout(e); } if ( (n === defaultClearTimeout || !n) && clearTimeout ) { n = clearTimeout; return clearTimeout(e); } try { return n(e); } catch (t) { try { return n.call(null, e); } catch (t) { return n.call(this, e); } } } var i = []; var o = false; var u; var a = -1; function cleanUpNextTick() { if (!o || !u) { return; } o = false; if (u.length) { i = u.concat(i); } else { a = -1; } if (i.length) { drainQueue(); } } function drainQueue() { if (o) { return; } var e = runTimeout(cleanUpNextTick); o = true; var t = i.length; while (t) { u = i; i = []; while (++a < t) { if (u) { u[a].run(); } } a = -1; t = i.length; } u = null; o = false; runClearTimeout(e); } t.nextTick = function (e) { var t = new Array(arguments.length - 1); if (arguments.length > 1) { for (var r = 1; r < arguments.length; r++) { t[r - 1] = arguments[r]; } } i.push(new Item(e, t)); if (i.length === 1 && !o) { runTimeout(drainQueue); } }; function Item(e, t) { this.fun = e; this.array = t; } Item.prototype.run = function () { this.fun.apply(null, this.array); }; t.title = "browser"; t.browser = true; t.env = {}; t.argv = []; t.version = ""; t.versions = {}; function noop() {} t.on = noop; t.addListener = noop; t.once = noop; t.off = noop; t.removeListener = noop; t.removeAllListeners = noop; t.emit = noop; t.prependListener = noop; t.prependOnceListener = noop; t.listeners = function (e) { return []; }; t.binding = function (e) { throw new Error("process.binding is not supported"); }; t.cwd = function () { return "/"; }; t.chdir = function (e) { throw new Error("process.chdir is not supported"); }; t.umask = function () { return 0; }; }, }; var t = {}; function __nccwpck_require__(r) { var n = t[r]; if (n !== undefined) { return n.exports; } var i = (t[r] = { exports: {} }); var o = true; try { e[r](i, i.exports, __nccwpck_require__); o = false; } finally { if (o) delete t[r]; } return i.exports; } if (typeof __nccwpck_require__ !== "undefined") __nccwpck_require__.ab = __dirname + "/"; var r = __nccwpck_require__(162); module.exports = r; })(); /***/ }, /***/ 9681: /***/ function ( module, __unused_webpack_exports, __webpack_require__ ) { var __dirname = "/"; /* provided dependency */ var process = __webpack_require__(3454); (function () { var e = { 526: function (e) { if (typeof Object.create === "function") { e.exports = function inherits(e, t) { if (t) { e.super_ = t; e.prototype = Object.create(t.prototype, { constructor: { value: e, enumerable: false, writable: true, configurable: true, }, }); } }; } else { e.exports = function inherits(e, t) { if (t) { e.super_ = t; var TempCtor = function () {}; TempCtor.prototype = t.prototype; e.prototype = new TempCtor(); e.prototype.constructor = e; } }; } }, 118: function (e, t, r) { var n = r(300); var i = n.Buffer; function copyProps(e, t) { for (var r in e) { t[r] = e[r]; } } if ( i.from && i.alloc && i.allocUnsafe && i.allocUnsafeSlow ) { e.exports = n; } else { copyProps(n, t); t.Buffer = SafeBuffer; } function SafeBuffer(e, t, r) { return i(e, t, r); } SafeBuffer.prototype = Object.create(i.prototype); copyProps(i, SafeBuffer); SafeBuffer.from = function (e, t, r) { if (typeof e === "number") { throw new TypeError( "Argument must not be a number" ); } return i(e, t, r); }; SafeBuffer.alloc = function (e, t, r) { if (typeof e !== "number") { throw new TypeError( "Argument must be a number" ); } var n = i(e); if (t !== undefined) { if (typeof r === "string") { n.fill(t, r); } else { n.fill(t); } } else { n.fill(0); } return n; }; SafeBuffer.allocUnsafe = function (e) { if (typeof e !== "number") { throw new TypeError( "Argument must be a number" ); } return i(e); }; SafeBuffer.allocUnsafeSlow = function (e) { if (typeof e !== "number") { throw new TypeError( "Argument must be a number" ); } return n.SlowBuffer(e); }; }, 562: function (e, t, r) { e.exports = Stream; var n = r(361).EventEmitter; var i = r(526); i(Stream, n); Stream.Readable = r(375); Stream.Writable = r(886); Stream.Duplex = r(239); Stream.Transform = r(786); Stream.PassThrough = r(663); Stream.finished = r(494); Stream.pipeline = r(229); Stream.Stream = Stream; function Stream() { n.call(this); } Stream.prototype.pipe = function (e, t) { var r = this; function ondata(t) { if (e.writable) { if (false === e.write(t) && r.pause) { r.pause(); } } } r.on("data", ondata); function ondrain() { if (r.readable && r.resume) { r.resume(); } } e.on("drain", ondrain); if (!e._isStdio && (!t || t.end !== false)) { r.on("end", onend); r.on("close", onclose); } var i = false; function onend() { if (i) return; i = true; e.end(); } function onclose() { if (i) return; i = true; if (typeof e.destroy === "function") e.destroy(); } function onerror(e) { cleanup(); if (n.listenerCount(this, "error") === 0) { throw e; } } r.on("error", onerror); e.on("error", onerror); function cleanup() { r.removeListener("data", ondata); e.removeListener("drain", ondrain); r.removeListener("end", onend); r.removeListener("close", onclose); r.removeListener("error", onerror); e.removeListener("error", onerror); r.removeListener("end", cleanup); r.removeListener("close", cleanup); e.removeListener("close", cleanup); } r.on("end", cleanup); r.on("close", cleanup); e.on("close", cleanup); e.emit("pipe", r); return e; }; }, 833: function (e) { "use strict"; const t = {}; function createErrorType(e, r, n) { if (!n) { n = Error; } function getMessage(e, t, n) { if (typeof r === "string") { return r; } else { return r(e, t, n); } } class NodeError extends n { constructor(e, t, r) { super(getMessage(e, t, r)); } } NodeError.prototype.name = n.name; NodeError.prototype.code = e; t[e] = NodeError; } function oneOf(e, t) { if (Array.isArray(e)) { const r = e.length; e = e.map((e) => String(e)); if (r > 2) { return ( `one of ${t} ${e .slice(0, r - 1) .join(", ")}, or ` + e[r - 1] ); } else if (r === 2) { return `one of ${t} ${e[0]} or ${e[1]}`; } else { return `of ${t} ${e[0]}`; } } else { return `of ${t} ${String(e)}`; } } function startsWith(e, t, r) { return ( e.substr(!r || r < 0 ? 0 : +r, t.length) === t ); } function endsWith(e, t, r) { if (r === undefined || r > e.length) { r = e.length; } return e.substring(r - t.length, r) === t; } function includes(e, t, r) { if (typeof r !== "number") { r = 0; } if (r + t.length > e.length) { return false; } else { return e.indexOf(t, r) !== -1; } } createErrorType( "ERR_INVALID_OPT_VALUE", function (e, t) { return ( 'The value "' + t + '" is invalid for option "' + e + '"' ); }, TypeError ); createErrorType( "ERR_INVALID_ARG_TYPE", function (e, t, r) { let n; if ( typeof t === "string" && startsWith(t, "not ") ) { n = "must not be"; t = t.replace(/^not /, ""); } else { n = "must be"; } let i; if (endsWith(e, " argument")) { i = `The ${e} ${n} ${oneOf(t, "type")}`; } else { const r = includes(e, ".") ? "property" : "argument"; i = `The "${e}" ${r} ${n} ${oneOf( t, "type" )}`; } i += `. Received type ${typeof r}`; return i; }, TypeError ); createErrorType( "ERR_STREAM_PUSH_AFTER_EOF", "stream.push() after EOF" ); createErrorType( "ERR_METHOD_NOT_IMPLEMENTED", function (e) { return ( "The " + e + " method is not implemented" ); } ); createErrorType( "ERR_STREAM_PREMATURE_CLOSE", "Premature close" ); createErrorType("ERR_STREAM_DESTROYED", function (e) { return ( "Cannot call " + e + " after a stream was destroyed" ); }); createErrorType( "ERR_MULTIPLE_CALLBACK", "Callback called multiple times" ); createErrorType( "ERR_STREAM_CANNOT_PIPE", "Cannot pipe, not readable" ); createErrorType( "ERR_STREAM_WRITE_AFTER_END", "write after end" ); createErrorType( "ERR_STREAM_NULL_VALUES", "May not write null values to stream", TypeError ); createErrorType( "ERR_UNKNOWN_ENCODING", function (e) { return "Unknown encoding: " + e; }, TypeError ); createErrorType( "ERR_STREAM_UNSHIFT_AFTER_END_EVENT", "stream.unshift() after end event" ); e.exports.q = t; }, 239: function (e, t, r) { "use strict"; var n = Object.keys || function (e) { var t = []; for (var r in e) { t.push(r); } return t; }; e.exports = Duplex; var i = r(375); var a = r(886); r(526)(Duplex, i); { var o = n(a.prototype); for (var s = 0; s < o.length; s++) { var f = o[s]; if (!Duplex.prototype[f]) Duplex.prototype[f] = a.prototype[f]; } } function Duplex(e) { if (!(this instanceof Duplex)) return new Duplex(e); i.call(this, e); a.call(this, e); this.allowHalfOpen = true; if (e) { if (e.readable === false) this.readable = false; if (e.writable === false) this.writable = false; if (e.allowHalfOpen === false) { this.allowHalfOpen = false; this.once("end", onend); } } } Object.defineProperty( Duplex.prototype, "writableHighWaterMark", { enumerable: false, get: function get() { return this._writableState.highWaterMark; }, } ); Object.defineProperty( Duplex.prototype, "writableBuffer", { enumerable: false, get: function get() { return ( this._writableState && this._writableState.getBuffer() ); }, } ); Object.defineProperty( Duplex.prototype, "writableLength", { enumerable: false, get: function get() { return this._writableState.length; }, } ); function onend() { if (this._writableState.ended) return; process.nextTick(onEndNT, this); } function onEndNT(e) { e.end(); } Object.defineProperty(Duplex.prototype, "destroyed", { enumerable: false, get: function get() { if ( this._readableState === undefined || this._writableState === undefined ) { return false; } return ( this._readableState.destroyed && this._writableState.destroyed ); }, set: function set(e) { if ( this._readableState === undefined || this._writableState === undefined ) { return; } this._readableState.destroyed = e; this._writableState.destroyed = e; }, }); }, 663: function (e, t, r) { "use strict"; e.exports = PassThrough; var n = r(786); r(526)(PassThrough, n); function PassThrough(e) { if (!(this instanceof PassThrough)) return new PassThrough(e); n.call(this, e); } PassThrough.prototype._transform = function (e, t, r) { r(null, e); }; }, 375: function (e, t, r) { "use strict"; e.exports = Readable; var n; Readable.ReadableState = ReadableState; var i = r(361).EventEmitter; var a = function EElistenerCount(e, t) { return e.listeners(t).length; }; var o = r(919); var s = r(300).Buffer; var f = __webpack_require__.g.Uint8Array || function () {}; function _uint8ArrayToBuffer(e) { return s.from(e); } function _isUint8Array(e) { return s.isBuffer(e) || e instanceof f; } var l = r(837); var u; if (l && l.debuglog) { u = l.debuglog("stream"); } else { u = function debug() {}; } var d = r(914); var c = r(364); var h = r(322), p = h.getHighWaterMark; var b = r(833).q, g = b.ERR_INVALID_ARG_TYPE, y = b.ERR_STREAM_PUSH_AFTER_EOF, _ = b.ERR_METHOD_NOT_IMPLEMENTED, v = b.ERR_STREAM_UNSHIFT_AFTER_END_EVENT; var w; var m; var S; r(526)(Readable, o); var R = c.errorOrDestroy; var E = [ "error", "close", "destroy", "pause", "resume", ]; function prependListener(e, t, r) { if (typeof e.prependListener === "function") return e.prependListener(t, r); if (!e._events || !e._events[t]) e.on(t, r); else if (Array.isArray(e._events[t])) e._events[t].unshift(r); else e._events[t] = [r, e._events[t]]; } function ReadableState(e, t, i) { n = n || r(239); e = e || {}; if (typeof i !== "boolean") i = t instanceof n; this.objectMode = !!e.objectMode; if (i) this.objectMode = this.objectMode || !!e.readableObjectMode; this.highWaterMark = p( this, e, "readableHighWaterMark", i ); this.buffer = new d(); this.length = 0; this.pipes = null; this.pipesCount = 0; this.flowing = null; this.ended = false; this.endEmitted = false; this.reading = false; this.sync = true; this.needReadable = false; this.emittedReadable = false; this.readableListening = false; this.resumeScheduled = false; this.paused = true; this.emitClose = e.emitClose !== false; this.autoDestroy = !!e.autoDestroy; this.destroyed = false; this.defaultEncoding = e.defaultEncoding || "utf8"; this.awaitDrain = 0; this.readingMore = false; this.decoder = null; this.encoding = null; if (e.encoding) { if (!w) w = r(313).s; this.decoder = new w(e.encoding); this.encoding = e.encoding; } } function Readable(e) { n = n || r(239); if (!(this instanceof Readable)) return new Readable(e); var t = this instanceof n; this._readableState = new ReadableState(e, this, t); this.readable = true; if (e) { if (typeof e.read === "function") this._read = e.read; if (typeof e.destroy === "function") this._destroy = e.destroy; } o.call(this); } Object.defineProperty(Readable.prototype, "destroyed", { enumerable: false, get: function get() { if (this._readableState === undefined) { return false; } return this._readableState.destroyed; }, set: function set(e) { if (!this._readableState) { return; } this._readableState.destroyed = e; }, }); Readable.prototype.destroy = c.destroy; Readable.prototype._undestroy = c.undestroy; Readable.prototype._destroy = function (e, t) { t(e); }; Readable.prototype.push = function (e, t) { var r = this._readableState; var n; if (!r.objectMode) { if (typeof e === "string") { t = t || r.defaultEncoding; if (t !== r.encoding) { e = s.from(e, t); t = ""; } n = true; } } else { n = true; } return readableAddChunk(this, e, t, false, n); }; Readable.prototype.unshift = function (e) { return readableAddChunk(this, e, null, true, false); }; function readableAddChunk(e, t, r, n, i) { u("readableAddChunk", t); var a = e._readableState; if (t === null) { a.reading = false; onEofChunk(e, a); } else { var o; if (!i) o = chunkInvalid(a, t); if (o) { R(e, o); } else if ( a.objectMode || (t && t.length > 0) ) { if ( typeof t !== "string" && !a.objectMode && Object.getPrototypeOf(t) !== s.prototype ) { t = _uint8ArrayToBuffer(t); } if (n) { if (a.endEmitted) R(e, new v()); else addChunk(e, a, t, true); } else if (a.ended) { R(e, new y()); } else if (a.destroyed) { return false; } else { a.reading = false; if (a.decoder && !r) { t = a.decoder.write(t); if (a.objectMode || t.length !== 0) addChunk(e, a, t, false); else maybeReadMore(e, a); } else { addChunk(e, a, t, false); } } } else if (!n) { a.reading = false; maybeReadMore(e, a); } } return ( !a.ended && (a.length < a.highWaterMark || a.length === 0) ); } function addChunk(e, t, r, n) { if (t.flowing && t.length === 0 && !t.sync) { t.awaitDrain = 0; e.emit("data", r); } else { t.length += t.objectMode ? 1 : r.length; if (n) t.buffer.unshift(r); else t.buffer.push(r); if (t.needReadable) emitReadable(e); } maybeReadMore(e, t); } function chunkInvalid(e, t) { var r; if ( !_isUint8Array(t) && typeof t !== "string" && t !== undefined && !e.objectMode ) { r = new g( "chunk", ["string", "Buffer", "Uint8Array"], t ); } return r; } Readable.prototype.isPaused = function () { return this._readableState.flowing === false; }; Readable.prototype.setEncoding = function (e) { if (!w) w = r(313).s; var t = new w(e); this._readableState.decoder = t; this._readableState.encoding = this._readableState.decoder.encoding; var n = this._readableState.buffer.head; var i = ""; while (n !== null) { i += t.write(n.data); n = n.next; } this._readableState.buffer.clear(); if (i !== "") this._readableState.buffer.push(i); this._readableState.length = i.length; return this; }; var T = 1073741824; function computeNewHighWaterMark(e) { if (e >= T) { e = T; } else { e--; e |= e >>> 1; e |= e >>> 2; e |= e >>> 4; e |= e >>> 8; e |= e >>> 16; e++; } return e; } function howMuchToRead(e, t) { if (e <= 0 || (t.length === 0 && t.ended)) return 0; if (t.objectMode) return 1; if (e !== e) { if (t.flowing && t.length) return t.buffer.head.data.length; else return t.length; } if (e > t.highWaterMark) t.highWaterMark = computeNewHighWaterMark(e); if (e <= t.length) return e; if (!t.ended) { t.needReadable = true; return 0; } return t.length; } Readable.prototype.read = function (e) { u("read", e); e = parseInt(e, 10); var t = this._readableState; var r = e; if (e !== 0) t.emittedReadable = false; if ( e === 0 && t.needReadable && ((t.highWaterMark !== 0 ? t.length >= t.highWaterMark : t.length > 0) || t.ended) ) { u("read: emitReadable", t.length, t.ended); if (t.length === 0 && t.ended) endReadable(this); else emitReadable(this); return null; } e = howMuchToRead(e, t); if (e === 0 && t.ended) { if (t.length === 0) endReadable(this); return null; } var n = t.needReadable; u("need readable", n); if ( t.length === 0 || t.length - e < t.highWaterMark ) { n = true; u("length less than watermark", n); } if (t.ended || t.reading) { n = false; u("reading or ended", n); } else if (n) { u("do read"); t.reading = true; t.sync = true; if (t.length === 0) t.needReadable = true; this._read(t.highWaterMark); t.sync = false; if (!t.reading) e = howMuchToRead(r, t); } var i; if (e > 0) i = fromList(e, t); else i = null; if (i === null) { t.needReadable = t.length <= t.highWaterMark; e = 0; } else { t.length -= e; t.awaitDrain = 0; } if (t.length === 0) { if (!t.ended) t.needReadable = true; if (r !== e && t.ended) endReadable(this); } if (i !== null) this.emit("data", i); return i; }; function onEofChunk(e, t) { u("onEofChunk"); if (t.ended) return; if (t.decoder) { var r = t.decoder.end(); if (r && r.length) { t.buffer.push(r); t.length += t.objectMode ? 1 : r.length; } } t.ended = true; if (t.sync) { emitReadable(e); } else { t.needReadable = false; if (!t.emittedReadable) { t.emittedReadable = true; emitReadable_(e); } } } function emitReadable(e) { var t = e._readableState; u( "emitReadable", t.needReadable, t.emittedReadable ); t.needReadable = false; if (!t.emittedReadable) { u("emitReadable", t.flowing); t.emittedReadable = true; process.nextTick(emitReadable_, e); } } function emitReadable_(e) { var t = e._readableState; u("emitReadable_", t.destroyed, t.length, t.ended); if (!t.destroyed && (t.length || t.ended)) { e.emit("readable"); t.emittedReadable = false; } t.needReadable = !t.flowing && !t.ended && t.length <= t.highWaterMark; flow(e); } function maybeReadMore(e, t) { if (!t.readingMore) { t.readingMore = true; process.nextTick(maybeReadMore_, e, t); } } function maybeReadMore_(e, t) { while ( !t.reading && !t.ended && (t.length < t.highWaterMark || (t.flowing && t.length === 0)) ) { var r = t.length; u("maybeReadMore read 0"); e.read(0); if (r === t.length) break; } t.readingMore = false; } Readable.prototype._read = function (e) { R(this, new _("_read()")); }; Readable.prototype.pipe = function (e, t) { var r = this; var n = this._readableState; switch (n.pipesCount) { case 0: n.pipes = e; break; case 1: n.pipes = [n.pipes, e]; break; default: n.pipes.push(e); break; } n.pipesCount += 1; u("pipe count=%d opts=%j", n.pipesCount, t); var i = (!t || t.end !== false) && e !== process.stdout && e !== process.stderr; var o = i ? onend : unpipe; if (n.endEmitted) process.nextTick(o); else r.once("end", o); e.on("unpipe", onunpipe); function onunpipe(e, t) { u("onunpipe"); if (e === r) { if (t && t.hasUnpiped === false) { t.hasUnpiped = true; cleanup(); } } } function onend() { u("onend"); e.end(); } var s = pipeOnDrain(r); e.on("drain", s); var f = false; function cleanup() { u("cleanup"); e.removeListener("close", onclose); e.removeListener("finish", onfinish); e.removeListener("drain", s); e.removeListener("error", onerror); e.removeListener("unpipe", onunpipe); r.removeListener("end", onend); r.removeListener("end", unpipe); r.removeListener("data", ondata); f = true; if ( n.awaitDrain && (!e._writableState || e._writableState.needDrain) ) s(); } r.on("data", ondata); function ondata(t) { u("ondata"); var i = e.write(t); u("dest.write", i); if (i === false) { if ( ((n.pipesCount === 1 && n.pipes === e) || (n.pipesCount > 1 && indexOf(n.pipes, e) !== -1)) && !f ) { u( "false write response, pause", n.awaitDrain ); n.awaitDrain++; } r.pause(); } } function onerror(t) { u("onerror", t); unpipe(); e.removeListener("error", onerror); if (a(e, "error") === 0) R(e, t); } prependListener(e, "error", onerror); function onclose() { e.removeListener("finish", onfinish); unpipe(); } e.once("close", onclose); function onfinish() { u("onfinish"); e.removeListener("close", onclose); unpipe(); } e.once("finish", onfinish); function unpipe() { u("unpipe"); r.unpipe(e); } e.emit("pipe", r); if (!n.flowing) { u("pipe resume"); r.resume(); } return e; }; function pipeOnDrain(e) { return function pipeOnDrainFunctionResult() { var t = e._readableState; u("pipeOnDrain", t.awaitDrain); if (t.awaitDrain) t.awaitDrain--; if (t.awaitDrain === 0 && a(e, "data")) { t.flowing = true; flow(e); } }; } Readable.prototype.unpipe = function (e) { var t = this._readableState; var r = { hasUnpiped: false }; if (t.pipesCount === 0) return this; if (t.pipesCount === 1) { if (e && e !== t.pipes) return this; if (!e) e = t.pipes; t.pipes = null; t.pipesCount = 0; t.flowing = false; if (e) e.emit("unpipe", this, r); return this; } if (!e) { var n = t.pipes; var i = t.pipesCount; t.pipes = null; t.pipesCount = 0; t.flowing = false; for (var a = 0; a < i; a++) { n[a].emit("unpipe", this, { hasUnpiped: false, }); } return this; } var o = indexOf(t.pipes, e); if (o === -1) return this; t.pipes.splice(o, 1); t.pipesCount -= 1; if (t.pipesCount === 1) t.pipes = t.pipes[0]; e.emit("unpipe", this, r); return this; }; Readable.prototype.on = function (e, t) { var r = o.prototype.on.call(this, e, t); var n = this._readableState; if (e === "data") { n.readableListening = this.listenerCount("readable") > 0; if (n.flowing !== false) this.resume(); } else if (e === "readable") { if (!n.endEmitted && !n.readableListening) { n.readableListening = n.needReadable = true; n.flowing = false; n.emittedReadable = false; u("on readable", n.length, n.reading); if (n.length) { emitReadable(this); } else if (!n.reading) { process.nextTick( nReadingNextTick, this ); } } } return r; }; Readable.prototype.addListener = Readable.prototype.on; Readable.prototype.removeListener = function (e, t) { var r = o.prototype.removeListener.call(this, e, t); if (e === "readable") { process.nextTick(updateReadableListening, this); } return r; }; Readable.prototype.removeAllListeners = function (e) { var t = o.prototype.removeAllListeners.apply( this, arguments ); if (e === "readable" || e === undefined) { process.nextTick(updateReadableListening, this); } return t; }; function updateReadableListening(e) { var t = e._readableState; t.readableListening = e.listenerCount("readable") > 0; if (t.resumeScheduled && !t.paused) { t.flowing = true; } else if (e.listenerCount("data") > 0) { e.resume(); } } function nReadingNextTick(e) { u("readable nexttick read 0"); e.read(0); } Readable.prototype.resume = function () { var e = this._readableState; if (!e.flowing) { u("resume"); e.flowing = !e.readableListening; resume(this, e); } e.paused = false; return this; }; function resume(e, t) { if (!t.resumeScheduled) { t.resumeScheduled = true; process.nextTick(resume_, e, t); } } function resume_(e, t) { u("resume", t.reading); if (!t.reading) { e.read(0); } t.resumeScheduled = false; e.emit("resume"); flow(e); if (t.flowing && !t.reading) e.read(0); } Readable.prototype.pause = function () { u( "call pause flowing=%j", this._readableState.flowing ); if (this._readableState.flowing !== false) { u("pause"); this._readableState.flowing = false; this.emit("pause"); } this._readableState.paused = true; return this; }; function flow(e) { var t = e._readableState; u("flow", t.flowing); while (t.flowing && e.read() !== null) {} } Readable.prototype.wrap = function (e) { var t = this; var r = this._readableState; var n = false; e.on("end", function () { u("wrapped end"); if (r.decoder && !r.ended) { var e = r.decoder.end(); if (e && e.length) t.push(e); } t.push(null); }); e.on("data", function (i) { u("wrapped data"); if (r.decoder) i = r.decoder.write(i); if ( r.objectMode && (i === null || i === undefined) ) return; else if (!r.objectMode && (!i || !i.length)) return; var a = t.push(i); if (!a) { n = true; e.pause(); } }); for (var i in e) { if ( this[i] === undefined && typeof e[i] === "function" ) { this[i] = (function methodWrap(t) { return function methodWrapReturnFunction() { return e[t].apply(e, arguments); }; })(i); } } for (var a = 0; a < E.length; a++) { e.on(E[a], this.emit.bind(this, E[a])); } this._read = function (t) { u("wrapped _read", t); if (n) { n = false; e.resume(); } }; return this; }; if (typeof Symbol === "function") { Readable.prototype[Symbol.asyncIterator] = function () { if (m === undefined) { m = r(771); } return m(this); }; } Object.defineProperty( Readable.prototype, "readableHighWaterMark", { enumerable: false, get: function get() { return this._readableState.highWaterMark; }, } ); Object.defineProperty( Readable.prototype, "readableBuffer", { enumerable: false, get: function get() { return ( this._readableState && this._readableState.buffer ); }, } ); Object.defineProperty( Readable.prototype, "readableFlowing", { enumerable: false, get: function get() { return this._readableState.flowing; }, set: function set(e) { if (this._readableState) { this._readableState.flowing = e; } }, } ); Readable._fromList = fromList; Object.defineProperty( Readable.prototype, "readableLength", { enumerable: false, get: function get() { return this._readableState.length; }, } ); function fromList(e, t) { if (t.length === 0) return null; var r; if (t.objectMode) r = t.buffer.shift(); else if (!e || e >= t.length) { if (t.decoder) r = t.buffer.join(""); else if (t.buffer.length === 1) r = t.buffer.first(); else r = t.buffer.concat(t.length); t.buffer.clear(); } else { r = t.buffer.consume(e, t.decoder); } return r; } function endReadable(e) { var t = e._readableState; u("endReadable", t.endEmitted); if (!t.endEmitted) { t.ended = true; process.nextTick(endReadableNT, t, e); } } function endReadableNT(e, t) { u("endReadableNT", e.endEmitted, e.length); if (!e.endEmitted && e.length === 0) { e.endEmitted = true; t.readable = false; t.emit("end"); if (e.autoDestroy) { var r = t._writableState; if (!r || (r.autoDestroy && r.finished)) { t.destroy(); } } } } if (typeof Symbol === "function") { Readable.from = function (e, t) { if (S === undefined) { S = r(16); } return S(Readable, e, t); }; } function indexOf(e, t) { for (var r = 0, n = e.length; r < n; r++) { if (e[r] === t) return r; } return -1; } }, 786: function (e, t, r) { "use strict"; e.exports = Transform; var n = r(833).q, i = n.ERR_METHOD_NOT_IMPLEMENTED, a = n.ERR_MULTIPLE_CALLBACK, o = n.ERR_TRANSFORM_ALREADY_TRANSFORMING, s = n.ERR_TRANSFORM_WITH_LENGTH_0; var f = r(239); r(526)(Transform, f); function afterTransform(e, t) { var r = this._transformState; r.transforming = false; var n = r.writecb; if (n === null) { return this.emit("error", new a()); } r.writechunk = null; r.writecb = null; if (t != null) this.push(t); n(e); var i = this._readableState; i.reading = false; if (i.needReadable || i.length < i.highWaterMark) { this._read(i.highWaterMark); } } function Transform(e) { if (!(this instanceof Transform)) return new Transform(e); f.call(this, e); this._transformState = { afterTransform: afterTransform.bind(this), needTransform: false, transforming: false, writecb: null, writechunk: null, writeencoding: null, }; this._readableState.needReadable = true; this._readableState.sync = false; if (e) { if (typeof e.transform === "function") this._transform = e.transform; if (typeof e.flush === "function") this._flush = e.flush; } this.on("prefinish", prefinish); } function prefinish() { var e = this; if ( typeof this._flush === "function" && !this._readableState.destroyed ) { this._flush(function (t, r) { done(e, t, r); }); } else { done(this, null, null); } } Transform.prototype.push = function (e, t) { this._transformState.needTransform = false; return f.prototype.push.call(this, e, t); }; Transform.prototype._transform = function (e, t, r) { r(new i("_transform()")); }; Transform.prototype._write = function (e, t, r) { var n = this._transformState; n.writecb = r; n.writechunk = e; n.writeencoding = t; if (!n.transforming) { var i = this._readableState; if ( n.needTransform || i.needReadable || i.length < i.highWaterMark ) this._read(i.highWaterMark); } }; Transform.prototype._read = function (e) { var t = this._transformState; if (t.writechunk !== null && !t.transforming) { t.transforming = true; this._transform( t.writechunk, t.writeencoding, t.afterTransform ); } else { t.needTransform = true; } }; Transform.prototype._destroy = function (e, t) { f.prototype._destroy.call(this, e, function (e) { t(e); }); }; function done(e, t, r) { if (t) return e.emit("error", t); if (r != null) e.push(r); if (e._writableState.length) throw new s(); if (e._transformState.transforming) throw new o(); return e.push(null); } }, 886: function (e, t, r) { "use strict"; e.exports = Writable; function WriteReq(e, t, r) { this.chunk = e; this.encoding = t; this.callback = r; this.next = null; } function CorkedRequest(e) { var t = this; this.next = null; this.entry = null; this.finish = function () { onCorkedFinish(t, e); }; } var n; Writable.WritableState = WritableState; var i = { deprecate: r(121) }; var a = r(919); var o = r(300).Buffer; var s = __webpack_require__.g.Uint8Array || function () {}; function _uint8ArrayToBuffer(e) { return o.from(e); } function _isUint8Array(e) { return o.isBuffer(e) || e instanceof s; } var f = r(364); var l = r(322), u = l.getHighWaterMark; var d = r(833).q, c = d.ERR_INVALID_ARG_TYPE, h = d.ERR_METHOD_NOT_IMPLEMENTED, p = d.ERR_MULTIPLE_CALLBACK, b = d.ERR_STREAM_CANNOT_PIPE, g = d.ERR_STREAM_DESTROYED, y = d.ERR_STREAM_NULL_VALUES, _ = d.ERR_STREAM_WRITE_AFTER_END, v = d.ERR_UNKNOWN_ENCODING; var w = f.errorOrDestroy; r(526)(Writable, a); function nop() {} function WritableState(e, t, i) { n = n || r(239); e = e || {}; if (typeof i !== "boolean") i = t instanceof n; this.objectMode = !!e.objectMode; if (i) this.objectMode = this.objectMode || !!e.writableObjectMode; this.highWaterMark = u( this, e, "writableHighWaterMark", i ); this.finalCalled = false; this.needDrain = false; this.ending = false; this.ended = false; this.finished = false; this.destroyed = false; var a = e.decodeStrings === false; this.decodeStrings = !a; this.defaultEncoding = e.defaultEncoding || "utf8"; this.length = 0; this.writing = false; this.corked = 0; this.sync = true; this.bufferProcessing = false; this.onwrite = function (e) { onwrite(t, e); }; this.writecb = null; this.writelen = 0; this.bufferedRequest = null; this.lastBufferedRequest = null; this.pendingcb = 0; this.prefinished = false; this.errorEmitted = false; this.emitClose = e.emitClose !== false; this.autoDestroy = !!e.autoDestroy; this.bufferedRequestCount = 0; this.corkedRequestsFree = new CorkedRequest(this); } WritableState.prototype.getBuffer = function getBuffer() { var e = this.bufferedRequest; var t = []; while (e) { t.push(e); e = e.next; } return t; }; (function () { try { Object.defineProperty( WritableState.prototype, "buffer", { get: i.deprecate( function writableStateBufferGetter() { return this.getBuffer(); }, "_writableState.buffer is deprecated. Use _writableState.getBuffer " + "instead.", "DEP0003" ), } ); } catch (e) {} })(); var m; if ( typeof Symbol === "function" && Symbol.hasInstance && typeof Function.prototype[Symbol.hasInstance] === "function" ) { m = Function.prototype[Symbol.hasInstance]; Object.defineProperty( Writable, Symbol.hasInstance, { value: function value(e) { if (m.call(this, e)) return true; if (this !== Writable) return false; return ( e && e._writableState instanceof WritableState ); }, } ); } else { m = function realHasInstance(e) { return e instanceof this; }; } function Writable(e) { n = n || r(239); var t = this instanceof n; if (!t && !m.call(Writable, this)) return new Writable(e); this._writableState = new WritableState(e, this, t); this.writable = true; if (e) { if (typeof e.write === "function") this._write = e.write; if (typeof e.writev === "function") this._writev = e.writev; if (typeof e.destroy === "function") this._destroy = e.destroy; if (typeof e.final === "function") this._final = e.final; } a.call(this); } Writable.prototype.pipe = function () { w(this, new b()); }; function writeAfterEnd(e, t) { var r = new _(); w(e, r); process.nextTick(t, r); } function validChunk(e, t, r, n) { var i; if (r === null) { i = new y(); } else if (typeof r !== "string" && !t.objectMode) { i = new c("chunk", ["string", "Buffer"], r); } if (i) { w(e, i); process.nextTick(n, i); return false; } return true; } Writable.prototype.write = function (e, t, r) { var n = this._writableState; var i = false; var a = !n.objectMode && _isUint8Array(e); if (a && !o.isBuffer(e)) { e = _uint8ArrayToBuffer(e); } if (typeof t === "function") { r = t; t = null; } if (a) t = "buffer"; else if (!t) t = n.defaultEncoding; if (typeof r !== "function") r = nop; if (n.ending) writeAfterEnd(this, r); else if (a || validChunk(this, n, e, r)) { n.pendingcb++; i = writeOrBuffer(this, n, a, e, t, r); } return i; }; Writable.prototype.cork = function () { this._writableState.corked++; }; Writable.prototype.uncork = function () { var e = this._writableState; if (e.corked) { e.corked--; if ( !e.writing && !e.corked && !e.bufferProcessing && e.bufferedRequest ) clearBuffer(this, e); } }; Writable.prototype.setDefaultEncoding = function setDefaultEncoding(e) { if (typeof e === "string") e = e.toLowerCase(); if ( !( [ "hex", "utf8", "utf-8", "ascii", "binary", "base64", "ucs2", "ucs-2", "utf16le", "utf-16le", "raw", ].indexOf((e + "").toLowerCase()) > -1 ) ) throw new v(e); this._writableState.defaultEncoding = e; return this; }; Object.defineProperty( Writable.prototype, "writableBuffer", { enumerable: false, get: function get() { return ( this._writableState && this._writableState.getBuffer() ); }, } ); function decodeChunk(e, t, r) { if ( !e.objectMode && e.decodeStrings !== false && typeof t === "string" ) { t = o.from(t, r); } return t; } Object.defineProperty( Writable.prototype, "writableHighWaterMark", { enumerable: false, get: function get() { return this._writableState.highWaterMark; }, } ); function writeOrBuffer(e, t, r, n, i, a) { if (!r) { var o = decodeChunk(t, n, i); if (n !== o) { r = true; i = "buffer"; n = o; } } var s = t.objectMode ? 1 : n.length; t.length += s; var f = t.length < t.highWaterMark; if (!f) t.needDrain = true; if (t.writing || t.corked) { var l = t.lastBufferedRequest; t.lastBufferedRequest = { chunk: n, encoding: i, isBuf: r, callback: a, next: null, }; if (l) { l.next = t.lastBufferedRequest; } else { t.bufferedRequest = t.lastBufferedRequest; } t.bufferedRequestCount += 1; } else { doWrite(e, t, false, s, n, i, a); } return f; } function doWrite(e, t, r, n, i, a, o) { t.writelen = n; t.writecb = o; t.writing = true; t.sync = true; if (t.destroyed) t.onwrite(new g("write")); else if (r) e._writev(i, t.onwrite); else e._write(i, a, t.onwrite); t.sync = false; } function onwriteError(e, t, r, n, i) { --t.pendingcb; if (r) { process.nextTick(i, n); process.nextTick(finishMaybe, e, t); e._writableState.errorEmitted = true; w(e, n); } else { i(n); e._writableState.errorEmitted = true; w(e, n); finishMaybe(e, t); } } function onwriteStateUpdate(e) { e.writing = false; e.writecb = null; e.length -= e.writelen; e.writelen = 0; } function onwrite(e, t) { var r = e._writableState; var n = r.sync; var i = r.writecb; if (typeof i !== "function") throw new p(); onwriteStateUpdate(r); if (t) onwriteError(e, r, n, t, i); else { var a = needFinish(r) || e.destroyed; if ( !a && !r.corked && !r.bufferProcessing && r.bufferedRequest ) { clearBuffer(e, r); } if (n) { process.nextTick(afterWrite, e, r, a, i); } else { afterWrite(e, r, a, i); } } } function afterWrite(e, t, r, n) { if (!r) onwriteDrain(e, t); t.pendingcb--; n(); finishMaybe(e, t); } function onwriteDrain(e, t) { if (t.length === 0 && t.needDrain) { t.needDrain = false; e.emit("drain"); } } function clearBuffer(e, t) { t.bufferProcessing = true; var r = t.bufferedRequest; if (e._writev && r && r.next) { var n = t.bufferedRequestCount; var i = new Array(n); var a = t.corkedRequestsFree; a.entry = r; var o = 0; var s = true; while (r) { i[o] = r; if (!r.isBuf) s = false; r = r.next; o += 1; } i.allBuffers = s; doWrite(e, t, true, t.length, i, "", a.finish); t.pendingcb++; t.lastBufferedRequest = null; if (a.next) { t.corkedRequestsFree = a.next; a.next = null; } else { t.corkedRequestsFree = new CorkedRequest(t); } t.bufferedRequestCount = 0; } else { while (r) { var f = r.chunk; var l = r.encoding; var u = r.callback; var d = t.objectMode ? 1 : f.length; doWrite(e, t, false, d, f, l, u); r = r.next; t.bufferedRequestCount--; if (t.writing) { break; } } if (r === null) t.lastBufferedRequest = null; } t.bufferedRequest = r; t.bufferProcessing = false; } Writable.prototype._write = function (e, t, r) { r(new h("_write()")); }; Writable.prototype._writev = null; Writable.prototype.end = function (e, t, r) { var n = this._writableState; if (typeof e === "function") { r = e; e = null; t = null; } else if (typeof t === "function") { r = t; t = null; } if (e !== null && e !== undefined) this.write(e, t); if (n.corked) { n.corked = 1; this.uncork(); } if (!n.ending) endWritable(this, n, r); return this; }; Object.defineProperty( Writable.prototype, "writableLength", { enumerable: false, get: function get() { return this._writableState.length; }, } ); function needFinish(e) { return ( e.ending && e.length === 0 && e.bufferedRequest === null && !e.finished && !e.writing ); } function callFinal(e, t) { e._final(function (r) { t.pendingcb--; if (r) { w(e, r); } t.prefinished = true; e.emit("prefinish"); finishMaybe(e, t); }); } function prefinish(e, t) { if (!t.prefinished && !t.finalCalled) { if ( typeof e._final === "function" && !t.destroyed ) { t.pendingcb++; t.finalCalled = true; process.nextTick(callFinal, e, t); } else { t.prefinished = true; e.emit("prefinish"); } } } function finishMaybe(e, t) { var r = needFinish(t); if (r) { prefinish(e, t); if (t.pendingcb === 0) { t.finished = true; e.emit("finish"); if (t.autoDestroy) { var n = e._readableState; if ( !n || (n.autoDestroy && n.endEmitted) ) { e.destroy(); } } } } return r; } function endWritable(e, t, r) { t.ending = true; finishMaybe(e, t); if (r) { if (t.finished) process.nextTick(r); else e.once("finish", r); } t.ended = true; e.writable = false; } function onCorkedFinish(e, t, r) { var n = e.entry; e.entry = null; while (n) { var i = n.callback; t.pendingcb--; i(r); n = n.next; } t.corkedRequestsFree.next = e; } Object.defineProperty(Writable.prototype, "destroyed", { enumerable: false, get: function get() { if (this._writableState === undefined) { return false; } return this._writableState.destroyed; }, set: function set(e) { if (!this._writableState) { return; } this._writableState.destroyed = e; }, }); Writable.prototype.destroy = f.destroy; Writable.prototype._undestroy = f.undestroy; Writable.prototype._destroy = function (e, t) { t(e); }; }, 771: function (e, t, r) { "use strict"; var n; function _defineProperty(e, t, r) { if (t in e) { Object.defineProperty(e, t, { value: r, enumerable: true, configurable: true, writable: true, }); } else { e[t] = r; } return e; } var i = r(494); var a = Symbol("lastResolve"); var o = Symbol("lastReject"); var s = Symbol("error"); var f = Symbol("ended"); var l = Symbol("lastPromise"); var u = Symbol("handlePromise"); var d = Symbol("stream"); function createIterResult(e, t) { return { value: e, done: t }; } function readAndResolve(e) { var t = e[a]; if (t !== null) { var r = e[d].read(); if (r !== null) { e[l] = null; e[a] = null; e[o] = null; t(createIterResult(r, false)); } } } function onReadable(e) { process.nextTick(readAndResolve, e); } function wrapForNext(e, t) { return function (r, n) { e.then(function () { if (t[f]) { r(createIterResult(undefined, true)); return; } t[u](r, n); }, n); }; } var c = Object.getPrototypeOf(function () {}); var h = Object.setPrototypeOf( ((n = { get stream() { return this[d]; }, next: function next() { var e = this; var t = this[s]; if (t !== null) { return Promise.reject(t); } if (this[f]) { return Promise.resolve( createIterResult(undefined, true) ); } if (this[d].destroyed) { return new Promise(function (t, r) { process.nextTick(function () { if (e[s]) { r(e[s]); } else { t( createIterResult( undefined, true ) ); } }); }); } var r = this[l]; var n; if (r) { n = new Promise(wrapForNext(r, this)); } else { var i = this[d].read(); if (i !== null) { return Promise.resolve( createIterResult(i, false) ); } n = new Promise(this[u]); } this[l] = n; return n; }, }), _defineProperty( n, Symbol.asyncIterator, function () { return this; } ), _defineProperty(n, "return", function _return() { var e = this; return new Promise(function (t, r) { e[d].destroy(null, function (e) { if (e) { r(e); return; } t(createIterResult(undefined, true)); }); }); }), n), c ); var p = function createReadableStreamAsyncIterator(e) { var t; var r = Object.create( h, ((t = {}), _defineProperty(t, d, { value: e, writable: true, }), _defineProperty(t, a, { value: null, writable: true, }), _defineProperty(t, o, { value: null, writable: true, }), _defineProperty(t, s, { value: null, writable: true, }), _defineProperty(t, f, { value: e._readableState.endEmitted, writable: true, }), _defineProperty(t, u, { value: function value(e, t) { var n = r[d].read(); if (n) { r[l] = null; r[a] = null; r[o] = null; e(createIterResult(n, false)); } else { r[a] = e; r[o] = t; } }, writable: true, }), t) ); r[l] = null; i(e, function (e) { if ( e && e.code !== "ERR_STREAM_PREMATURE_CLOSE" ) { var t = r[o]; if (t !== null) { r[l] = null; r[a] = null; r[o] = null; t(e); } r[s] = e; return; } var n = r[a]; if (n !== null) { r[l] = null; r[a] = null; r[o] = null; n(createIterResult(undefined, true)); } r[f] = true; }); e.on("readable", onReadable.bind(null, r)); return r; }; e.exports = p; }, 914: function (e, t, r) { "use strict"; function ownKeys(e, t) { var r = Object.keys(e); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); if (t) n = n.filter(function (t) { return Object.getOwnPropertyDescriptor( e, t ).enumerable; }); r.push.apply(r, n); } return r; } function _objectSpread(e) { for (var t = 1; t < arguments.length; t++) { var r = arguments[t] != null ? arguments[t] : {}; if (t % 2) { ownKeys(Object(r), true).forEach(function ( t ) { _defineProperty(e, t, r[t]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties( e, Object.getOwnPropertyDescriptors(r) ); } else { ownKeys(Object(r)).forEach(function (t) { Object.defineProperty( e, t, Object.getOwnPropertyDescriptor( r, t ) ); }); } } return e; } function _defineProperty(e, t, r) { if (t in e) { Object.defineProperty(e, t, { value: r, enumerable: true, configurable: true, writable: true, }); } else { e[t] = r; } return e; } function _classCallCheck(e, t) { if (!(e instanceof t)) { throw new TypeError( "Cannot call a class as a function" ); } } function _defineProperties(e, t) { for (var r = 0; r < t.length; r++) { var n = t[r]; n.enumerable = n.enumerable || false; n.configurable = true; if ("value" in n) n.writable = true; Object.defineProperty(e, n.key, n); } } function _createClass(e, t, r) { if (t) _defineProperties(e.prototype, t); if (r) _defineProperties(e, r); return e; } var n = r(300), i = n.Buffer; var a = r(837), o = a.inspect; var s = (o && o.custom) || "inspect"; function copyBuffer(e, t, r) { i.prototype.copy.call(e, t, r); } e.exports = (function () { function BufferList() { _classCallCheck(this, BufferList); this.head = null; this.tail = null; this.length = 0; } _createClass(BufferList, [ { key: "push", value: function push(e) { var t = { data: e, next: null }; if (this.length > 0) this.tail.next = t; else this.head = t; this.tail = t; ++this.length; }, }, { key: "unshift", value: function unshift(e) { var t = { data: e, next: this.head }; if (this.length === 0) this.tail = t; this.head = t; ++this.length; }, }, { key: "shift", value: function shift() { if (this.length === 0) return; var e = this.head.data; if (this.length === 1) this.head = this.tail = null; else this.head = this.head.next; --this.length; return e; }, }, { key: "clear", value: function clear() { this.head = this.tail = null; this.length = 0; }, }, { key: "join", value: function join(e) { if (this.length === 0) return ""; var t = this.head; var r = "" + t.data; while ((t = t.next)) { r += e + t.data; } return r; }, }, { key: "concat", value: function concat(e) { if (this.length === 0) return i.alloc(0); var t = i.allocUnsafe(e >>> 0); var r = this.head; var n = 0; while (r) { copyBuffer(r.data, t, n); n += r.data.length; r = r.next; } return t; }, }, { key: "consume", value: function consume(e, t) { var r; if (e < this.head.data.length) { r = this.head.data.slice(0, e); this.head.data = this.head.data.slice(e); } else if ( e === this.head.data.length ) { r = this.shift(); } else { r = t ? this._getString(e) : this._getBuffer(e); } return r; }, }, { key: "first", value: function first() { return this.head.data; }, }, { key: "_getString", value: function _getString(e) { var t = this.head; var r = 1; var n = t.data; e -= n.length; while ((t = t.next)) { var i = t.data; var a = e > i.length ? i.length : e; if (a === i.length) n += i; else n += i.slice(0, e); e -= a; if (e === 0) { if (a === i.length) { ++r; if (t.next) this.head = t.next; else this.head = this.tail = null; } else { this.head = t; t.data = i.slice(a); } break; } ++r; } this.length -= r; return n; }, }, { key: "_getBuffer", value: function _getBuffer(e) { var t = i.allocUnsafe(e); var r = this.head; var n = 1; r.data.copy(t); e -= r.data.length; while ((r = r.next)) { var a = r.data; var o = e > a.length ? a.length : e; a.copy(t, t.length - e, 0, o); e -= o; if (e === 0) { if (o === a.length) { ++n; if (r.next) this.head = r.next; else this.head = this.tail = null; } else { this.head = r; r.data = a.slice(o); } break; } ++n; } this.length -= n; return t; }, }, { key: s, value: function value(e, t) { return o( this, _objectSpread({}, t, { depth: 0, customInspect: false, }) ); }, }, ]); return BufferList; })(); }, 364: function (e) { "use strict"; function destroy(e, t) { var r = this; var n = this._readableState && this._readableState.destroyed; var i = this._writableState && this._writableState.destroyed; if (n || i) { if (t) { t(e); } else if (e) { if (!this._writableState) { process.nextTick(emitErrorNT, this, e); } else if ( !this._writableState.errorEmitted ) { this._writableState.errorEmitted = true; process.nextTick(emitErrorNT, this, e); } } return this; } if (this._readableState) { this._readableState.destroyed = true; } if (this._writableState) { this._writableState.destroyed = true; } this._destroy(e || null, function (e) { if (!t && e) { if (!r._writableState) { process.nextTick( emitErrorAndCloseNT, r, e ); } else if (!r._writableState.errorEmitted) { r._writableState.errorEmitted = true; process.nextTick( emitErrorAndCloseNT, r, e ); } else { process.nextTick(emitCloseNT, r); } } else if (t) { process.nextTick(emitCloseNT, r); t(e); } else { process.nextTick(emitCloseNT, r); } }); return this; } function emitErrorAndCloseNT(e, t) { emitErrorNT(e, t); emitCloseNT(e); } function emitCloseNT(e) { if (e._writableState && !e._writableState.emitClose) return; if (e._readableState && !e._readableState.emitClose) return; e.emit("close"); } function undestroy() { if (this._readableState) { this._readableState.destroyed = false; this._readableState.reading = false; this._readableState.ended = false; this._readableState.endEmitted = false; } if (this._writableState) { this._writableState.destroyed = false; this._writableState.ended = false; this._writableState.ending = false; this._writableState.finalCalled = false; this._writableState.prefinished = false; this._writableState.finished = false; this._writableState.errorEmitted = false; } } function emitErrorNT(e, t) { e.emit("error", t); } function errorOrDestroy(e, t) { var r = e._readableState; var n = e._writableState; if ((r && r.autoDestroy) || (n && n.autoDestroy)) e.destroy(t); else e.emit("error", t); } e.exports = { destroy: destroy, undestroy: undestroy, errorOrDestroy: errorOrDestroy, }; }, 494: function (e, t, r) { "use strict"; var n = r(833).q.ERR_STREAM_PREMATURE_CLOSE; function once(e) { var t = false; return function () { if (t) return; t = true; for ( var r = arguments.length, n = new Array(r), i = 0; i < r; i++ ) { n[i] = arguments[i]; } e.apply(this, n); }; } function noop() {} function isRequest(e) { return e.setHeader && typeof e.abort === "function"; } function eos(e, t, r) { if (typeof t === "function") return eos(e, null, t); if (!t) t = {}; r = once(r || noop); var i = t.readable || (t.readable !== false && e.readable); var a = t.writable || (t.writable !== false && e.writable); var o = function onlegacyfinish() { if (!e.writable) f(); }; var s = e._writableState && e._writableState.finished; var f = function onfinish() { a = false; s = true; if (!i) r.call(e); }; var l = e._readableState && e._readableState.endEmitted; var u = function onend() { i = false; l = true; if (!a) r.call(e); }; var d = function onerror(t) { r.call(e, t); }; var c = function onclose() { var t; if (i && !l) { if ( !e._readableState || !e._readableState.ended ) t = new n(); return r.call(e, t); } if (a && !s) { if ( !e._writableState || !e._writableState.ended ) t = new n(); return r.call(e, t); } }; var h = function onrequest() { e.req.on("finish", f); }; if (isRequest(e)) { e.on("complete", f); e.on("abort", c); if (e.req) h(); else e.on("request", h); } else if (a && !e._writableState) { e.on("end", o); e.on("close", o); } e.on("end", u); e.on("finish", f); if (t.error !== false) e.on("error", d); e.on("close", c); return function () { e.removeListener("complete", f); e.removeListener("abort", c); e.removeListener("request", h); if (e.req) e.req.removeListener("finish", f); e.removeListener("end", o); e.removeListener("close", o); e.removeListener("finish", f); e.removeListener("end", u); e.removeListener("error", d); e.removeListener("close", c); }; } e.exports = eos; }, 16: function (e, t, r) { "use strict"; function asyncGeneratorStep(e, t, r, n, i, a, o) { try { var s = e[a](o); var f = s.value; } catch (e) { r(e); return; } if (s.done) { t(f); } else { Promise.resolve(f).then(n, i); } } function _asyncToGenerator(e) { return function () { var t = this, r = arguments; return new Promise(function (n, i) { var a = e.apply(t, r); function _next(e) { asyncGeneratorStep( a, n, i, _next, _throw, "next", e ); } function _throw(e) { asyncGeneratorStep( a, n, i, _next, _throw, "throw", e ); } _next(undefined); }); }; } function ownKeys(e, t) { var r = Object.keys(e); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); if (t) n = n.filter(function (t) { return Object.getOwnPropertyDescriptor( e, t ).enumerable; }); r.push.apply(r, n); } return r; } function _objectSpread(e) { for (var t = 1; t < arguments.length; t++) { var r = arguments[t] != null ? arguments[t] : {}; if (t % 2) { ownKeys(Object(r), true).forEach(function ( t ) { _defineProperty(e, t, r[t]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties( e, Object.getOwnPropertyDescriptors(r) ); } else { ownKeys(Object(r)).forEach(function (t) { Object.defineProperty( e, t, Object.getOwnPropertyDescriptor( r, t ) ); }); } } return e; } function _defineProperty(e, t, r) { if (t in e) { Object.defineProperty(e, t, { value: r, enumerable: true, configurable: true, writable: true, }); } else { e[t] = r; } return e; } var n = r(833).q.ERR_INVALID_ARG_TYPE; function from(e, t, r) { var i; if (t && typeof t.next === "function") { i = t; } else if (t && t[Symbol.asyncIterator]) i = t[Symbol.asyncIterator](); else if (t && t[Symbol.iterator]) i = t[Symbol.iterator](); else throw new n("iterable", ["Iterable"], t); var a = new e( _objectSpread({ objectMode: true }, r) ); var o = false; a._read = function () { if (!o) { o = true; next(); } }; function next() { return _next2.apply(this, arguments); } function _next2() { _next2 = _asyncToGenerator(function* () { try { var e = yield i.next(), t = e.value, r = e.done; if (r) { a.push(null); } else if (a.push(yield t)) { next(); } else { o = false; } } catch (e) { a.destroy(e); } }); return _next2.apply(this, arguments); } return a; } e.exports = from; }, 229: function (e, t, r) { "use strict"; var n; function once(e) { var t = false; return function () { if (t) return; t = true; e.apply(void 0, arguments); }; } var i = r(833).q, a = i.ERR_MISSING_ARGS, o = i.ERR_STREAM_DESTROYED; function noop(e) { if (e) throw e; } function isRequest(e) { return e.setHeader && typeof e.abort === "function"; } function destroyer(e, t, i, a) { a = once(a); var s = false; e.on("close", function () { s = true; }); if (n === undefined) n = r(494); n(e, { readable: t, writable: i }, function (e) { if (e) return a(e); s = true; a(); }); var f = false; return function (t) { if (s) return; if (f) return; f = true; if (isRequest(e)) return e.abort(); if (typeof e.destroy === "function") return e.destroy(); a(t || new o("pipe")); }; } function call(e) { e(); } function pipe(e, t) { return e.pipe(t); } function popCallback(e) { if (!e.length) return noop; if (typeof e[e.length - 1] !== "function") return noop; return e.pop(); } function pipeline() { for ( var e = arguments.length, t = new Array(e), r = 0; r < e; r++ ) { t[r] = arguments[r]; } var n = popCallback(t); if (Array.isArray(t[0])) t = t[0]; if (t.length < 2) { throw new a("streams"); } var i; var o = t.map(function (e, r) { var a = r < t.length - 1; var s = r > 0; return destroyer(e, a, s, function (e) { if (!i) i = e; if (e) o.forEach(call); if (a) return; o.forEach(call); n(i); }); }); return t.reduce(pipe); } e.exports = pipeline; }, 322: function (e, t, r) { "use strict"; var n = r(833).q.ERR_INVALID_OPT_VALUE; function highWaterMarkFrom(e, t, r) { return e.highWaterMark != null ? e.highWaterMark : t ? e[r] : null; } function getHighWaterMark(e, t, r, i) { var a = highWaterMarkFrom(t, i, r); if (a != null) { if ( !(isFinite(a) && Math.floor(a) === a) || a < 0 ) { var o = i ? r : "highWaterMark"; throw new n(o, a); } return Math.floor(a); } return e.objectMode ? 16 : 16 * 1024; } e.exports = { getHighWaterMark: getHighWaterMark }; }, 919: function (e, t, r) { e.exports = r(781); }, 313: function (e, t, r) { "use strict"; var n = r(118).Buffer; var i = n.isEncoding || function (e) { e = "" + e; switch (e && e.toLowerCase()) { case "hex": case "utf8": case "utf-8": case "ascii": case "binary": case "base64": case "ucs2": case "ucs-2": case "utf16le": case "utf-16le": case "raw": return true; default: return false; } }; function _normalizeEncoding(e) { if (!e) return "utf8"; var t; while (true) { switch (e) { case "utf8": case "utf-8": return "utf8"; case "ucs2": case "ucs-2": case "utf16le": case "utf-16le": return "utf16le"; case "latin1": case "binary": return "latin1"; case "base64": case "ascii": case "hex": return e; default: if (t) return; e = ("" + e).toLowerCase(); t = true; } } } function normalizeEncoding(e) { var t = _normalizeEncoding(e); if ( typeof t !== "string" && (n.isEncoding === i || !i(e)) ) throw new Error("Unknown encoding: " + e); return t || e; } t.s = StringDecoder; function StringDecoder(e) { this.encoding = normalizeEncoding(e); var t; switch (this.encoding) { case "utf16le": this.text = utf16Text; this.end = utf16End; t = 4; break; case "utf8": this.fillLast = utf8FillLast; t = 4; break; case "base64": this.text = base64Text; this.end = base64End; t = 3; break; default: this.write = simpleWrite; this.end = simpleEnd; return; } this.lastNeed = 0; this.lastTotal = 0; this.lastChar = n.allocUnsafe(t); } StringDecoder.prototype.write = function (e) { if (e.length === 0) return ""; var t; var r; if (this.lastNeed) { t = this.fillLast(e); if (t === undefined) return ""; r = this.lastNeed; this.lastNeed = 0; } else { r = 0; } if (r < e.length) return t ? t + this.text(e, r) : this.text(e, r); return t || ""; }; StringDecoder.prototype.end = utf8End; StringDecoder.prototype.text = utf8Text; StringDecoder.prototype.fillLast = function (e) { if (this.lastNeed <= e.length) { e.copy( this.lastChar, this.lastTotal - this.lastNeed, 0, this.lastNeed ); return this.lastChar.toString( this.encoding, 0, this.lastTotal ); } e.copy( this.lastChar, this.lastTotal - this.lastNeed, 0, e.length ); this.lastNeed -= e.length; }; function utf8CheckByte(e) { if (e <= 127) return 0; else if (e >> 5 === 6) return 2; else if (e >> 4 === 14) return 3; else if (e >> 3 === 30) return 4; return e >> 6 === 2 ? -1 : -2; } function utf8CheckIncomplete(e, t, r) { var n = t.length - 1; if (n < r) return 0; var i = utf8CheckByte(t[n]); if (i >= 0) { if (i > 0) e.lastNeed = i - 1; return i; } if (--n < r || i === -2) return 0; i = utf8CheckByte(t[n]); if (i >= 0) { if (i > 0) e.lastNeed = i - 2; return i; } if (--n < r || i === -2) return 0; i = utf8CheckByte(t[n]); if (i >= 0) { if (i > 0) { if (i === 2) i = 0; else e.lastNeed = i - 3; } return i; } return 0; } function utf8CheckExtraBytes(e, t, r) { if ((t[0] & 192) !== 128) { e.lastNeed = 0; return "�"; } if (e.lastNeed > 1 && t.length > 1) { if ((t[1] & 192) !== 128) { e.lastNeed = 1; return "�"; } if (e.lastNeed > 2 && t.length > 2) { if ((t[2] & 192) !== 128) { e.lastNeed = 2; return "�"; } } } } function utf8FillLast(e) { var t = this.lastTotal - this.lastNeed; var r = utf8CheckExtraBytes(this, e, t); if (r !== undefined) return r; if (this.lastNeed <= e.length) { e.copy(this.lastChar, t, 0, this.lastNeed); return this.lastChar.toString( this.encoding, 0, this.lastTotal ); } e.copy(this.lastChar, t, 0, e.length); this.lastNeed -= e.length; } function utf8Text(e, t) { var r = utf8CheckIncomplete(this, e, t); if (!this.lastNeed) return e.toString("utf8", t); this.lastTotal = r; var n = e.length - (r - this.lastNeed); e.copy(this.lastChar, 0, n); return e.toString("utf8", t, n); } function utf8End(e) { var t = e && e.length ? this.write(e) : ""; if (this.lastNeed) return t + "�"; return t; } function utf16Text(e, t) { if ((e.length - t) % 2 === 0) { var r = e.toString("utf16le", t); if (r) { var n = r.charCodeAt(r.length - 1); if (n >= 55296 && n <= 56319) { this.lastNeed = 2; this.lastTotal = 4; this.lastChar[0] = e[e.length - 2]; this.lastChar[1] = e[e.length - 1]; return r.slice(0, -1); } } return r; } this.lastNeed = 1; this.lastTotal = 2; this.lastChar[0] = e[e.length - 1]; return e.toString("utf16le", t, e.length - 1); } function utf16End(e) { var t = e && e.length ? this.write(e) : ""; if (this.lastNeed) { var r = this.lastTotal - this.lastNeed; return ( t + this.lastChar.toString("utf16le", 0, r) ); } return t; } function base64Text(e, t) { var r = (e.length - t) % 3; if (r === 0) return e.toString("base64", t); this.lastNeed = 3 - r; this.lastTotal = 3; if (r === 1) { this.lastChar[0] = e[e.length - 1]; } else { this.lastChar[0] = e[e.length - 2]; this.lastChar[1] = e[e.length - 1]; } return e.toString("base64", t, e.length - r); } function base64End(e) { var t = e && e.length ? this.write(e) : ""; if (this.lastNeed) return ( t + this.lastChar.toString( "base64", 0, 3 - this.lastNeed ) ); return t; } function simpleWrite(e) { return e.toString(this.encoding); } function simpleEnd(e) { return e && e.length ? this.write(e) : ""; } }, 121: function (e) { e.exports = deprecate; function deprecate(e, t) { if (config("noDeprecation")) { return e; } var r = false; function deprecated() { if (!r) { if (config("throwDeprecation")) { throw new Error(t); } else if (config("traceDeprecation")) { console.trace(t); } else { console.warn(t); } r = true; } return e.apply(this, arguments); } return deprecated; } function config(e) { try { if (!__webpack_require__.g.localStorage) return false; } catch (e) { return false; } var t = __webpack_require__.g.localStorage[e]; if (null == t) return false; return String(t).toLowerCase() === "true"; } }, 300: function (e) { "use strict"; e.exports = __webpack_require__(1876); }, 361: function (e) { "use strict"; e.exports = __webpack_require__(5293); }, 781: function (e) { "use strict"; e.exports = __webpack_require__(5293).EventEmitter; }, 837: function (e) { "use strict"; e.exports = __webpack_require__(9720); }, }; var t = {}; function __nccwpck_require__(r) { var n = t[r]; if (n !== undefined) { return n.exports; } var i = (t[r] = { exports: {} }); var a = true; try { e[r](i, i.exports, __nccwpck_require__); a = false; } finally { if (a) delete t[r]; } return i.exports; } if (typeof __nccwpck_require__ !== "undefined") __nccwpck_require__.ab = __dirname + "/"; var r = __nccwpck_require__(562); module.exports = r; })(); /***/ }, /***/ 9720: /***/ function ( module, __unused_webpack_exports, __webpack_require__ ) { var __dirname = "/"; /* provided dependency */ var Buffer = __webpack_require__(1876)["Buffer"]; /* provided dependency */ var process = __webpack_require__(3454); (function () { var r = { 901: function (r) { r.exports = function (r, e, o) { if (r.filter) return r.filter(e, o); if (void 0 === r || null === r) throw new TypeError(); if ("function" != typeof e) throw new TypeError(); var n = []; for (var i = 0; i < r.length; i++) { if (!t.call(r, i)) continue; var a = r[i]; if (e.call(o, a, i, r)) n.push(a); } return n; }; var t = Object.prototype.hasOwnProperty; }, 749: function (r, t, e) { "use strict"; var o = e(91); var n = e(112); var i = n(o("String.prototype.indexOf")); r.exports = function callBoundIntrinsic(r, t) { var e = o(r, !!t); if ( typeof e === "function" && i(r, ".prototype.") > -1 ) { return n(e); } return e; }; }, 112: function (r, t, e) { "use strict"; var o = e(517); var n = e(91); var i = n("%Function.prototype.apply%"); var a = n("%Function.prototype.call%"); var y = n("%Reflect.apply%", true) || o.call(a, i); var p = n("%Object.getOwnPropertyDescriptor%", true); var f = n("%Object.defineProperty%", true); var u = n("%Math.max%"); if (f) { try { f({}, "a", { value: 1 }); } catch (r) { f = null; } } r.exports = function callBind(r) { var t = y(o, a, arguments); if (p && f) { var e = p(t, "length"); if (e.configurable) { f(t, "length", { value: 1 + u( 0, r.length - (arguments.length - 1) ), }); } } return t; }; var s = function applyBind() { return y(o, i, arguments); }; if (f) { f(r.exports, "apply", { value: s }); } else { r.exports.apply = s; } }, 91: function (r, t, e) { "use strict"; var o; var n = SyntaxError; var i = Function; var a = TypeError; var getEvalledConstructor = function (r) { try { return Function( '"use strict"; return (' + r + ").constructor;" )(); } catch (r) {} }; var y = Object.getOwnPropertyDescriptor; if (y) { try { y({}, ""); } catch (r) { y = null; } } var throwTypeError = function () { throw new a(); }; var p = y ? (function () { try { arguments.callee; return throwTypeError; } catch (r) { try { return y(arguments, "callee").get; } catch (r) { return throwTypeError; } } })() : throwTypeError; var f = e(449)(); var u = Object.getPrototypeOf || function (r) { return r.__proto__; }; var s = getEvalledConstructor("async function* () {}"); var c = s ? s.prototype : o; var l = c ? c.prototype : o; var d = typeof Uint8Array === "undefined" ? o : u(Uint8Array); var g = { "%AggregateError%": typeof AggregateError === "undefined" ? o : AggregateError, "%Array%": Array, "%ArrayBuffer%": typeof ArrayBuffer === "undefined" ? o : ArrayBuffer, "%ArrayIteratorPrototype%": f ? u([][Symbol.iterator]()) : o, "%AsyncFromSyncIteratorPrototype%": o, "%AsyncFunction%": getEvalledConstructor( "async function () {}" ), "%AsyncGenerator%": c, "%AsyncGeneratorFunction%": s, "%AsyncIteratorPrototype%": l ? u(l) : o, "%Atomics%": typeof Atomics === "undefined" ? o : Atomics, "%BigInt%": typeof BigInt === "undefined" ? o : BigInt, "%Boolean%": Boolean, "%DataView%": typeof DataView === "undefined" ? o : DataView, "%Date%": Date, "%decodeURI%": decodeURI, "%decodeURIComponent%": decodeURIComponent, "%encodeURI%": encodeURI, "%encodeURIComponent%": encodeURIComponent, "%Error%": Error, "%eval%": eval, "%EvalError%": EvalError, "%Float32Array%": typeof Float32Array === "undefined" ? o : Float32Array, "%Float64Array%": typeof Float64Array === "undefined" ? o : Float64Array, "%FinalizationRegistry%": typeof FinalizationRegistry === "undefined" ? o : FinalizationRegistry, "%Function%": i, "%GeneratorFunction%": getEvalledConstructor("function* () {}"), "%Int8Array%": typeof Int8Array === "undefined" ? o : Int8Array, "%Int16Array%": typeof Int16Array === "undefined" ? o : Int16Array, "%Int32Array%": typeof Int32Array === "undefined" ? o : Int32Array, "%isFinite%": isFinite, "%isNaN%": isNaN, "%IteratorPrototype%": f ? u(u([][Symbol.iterator]())) : o, "%JSON%": typeof JSON === "object" ? JSON : o, "%Map%": typeof Map === "undefined" ? o : Map, "%MapIteratorPrototype%": typeof Map === "undefined" || !f ? o : u(new Map()[Symbol.iterator]()), "%Math%": Math, "%Number%": Number, "%Object%": Object, "%parseFloat%": parseFloat, "%parseInt%": parseInt, "%Promise%": typeof Promise === "undefined" ? o : Promise, "%Proxy%": typeof Proxy === "undefined" ? o : Proxy, "%RangeError%": RangeError, "%ReferenceError%": ReferenceError, "%Reflect%": typeof Reflect === "undefined" ? o : Reflect, "%RegExp%": RegExp, "%Set%": typeof Set === "undefined" ? o : Set, "%SetIteratorPrototype%": typeof Set === "undefined" || !f ? o : u(new Set()[Symbol.iterator]()), "%SharedArrayBuffer%": typeof SharedArrayBuffer === "undefined" ? o : SharedArrayBuffer, "%String%": String, "%StringIteratorPrototype%": f ? u(""[Symbol.iterator]()) : o, "%Symbol%": f ? Symbol : o, "%SyntaxError%": n, "%ThrowTypeError%": p, "%TypedArray%": d, "%TypeError%": a, "%Uint8Array%": typeof Uint8Array === "undefined" ? o : Uint8Array, "%Uint8ClampedArray%": typeof Uint8ClampedArray === "undefined" ? o : Uint8ClampedArray, "%Uint16Array%": typeof Uint16Array === "undefined" ? o : Uint16Array, "%Uint32Array%": typeof Uint32Array === "undefined" ? o : Uint32Array, "%URIError%": URIError, "%WeakMap%": typeof WeakMap === "undefined" ? o : WeakMap, "%WeakRef%": typeof WeakRef === "undefined" ? o : WeakRef, "%WeakSet%": typeof WeakSet === "undefined" ? o : WeakSet, }; var A = { "%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 v = e(517); var b = e(793); var S = v.call(Function.call, Array.prototype.concat); var m = v.call(Function.apply, Array.prototype.splice); var P = v.call(Function.call, String.prototype.replace); var h = v.call(Function.call, String.prototype.slice); var O = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; var w = /\\(\\)?/g; var E = function stringToPath(r) { var t = h(r, 0, 1); var e = h(r, -1); if (t === "%" && e !== "%") { throw new n( "invalid intrinsic syntax, expected closing `%`" ); } else if (e === "%" && t !== "%") { throw new n( "invalid intrinsic syntax, expected opening `%`" ); } var o = []; P(r, O, function (r, t, e, n) { o[o.length] = e ? P(n, w, "$1") : t || r; }); return o; }; var j = function getBaseIntrinsic(r, t) { var e = r; var o; if (b(A, e)) { o = A[e]; e = "%" + o[0] + "%"; } if (b(g, e)) { var i = g[e]; if (typeof i === "undefined" && !t) { throw new a( "intrinsic " + r + " exists, but is not available. Please file an issue!" ); } return { alias: o, name: e, value: i }; } throw new n("intrinsic " + r + " does not exist!"); }; r.exports = function GetIntrinsic(r, t) { if (typeof r !== "string" || r.length === 0) { throw new a( "intrinsic name must be a non-empty string" ); } if ( arguments.length > 1 && typeof t !== "boolean" ) { throw new a( '"allowMissing" argument must be a boolean' ); } var e = E(r); var i = e.length > 0 ? e[0] : ""; var p = j("%" + i + "%", t); var f = p.name; var u = p.value; var s = false; var c = p.alias; if (c) { i = c[0]; m(e, S([0, 1], c)); } for (var l = 1, d = true; l < e.length; l += 1) { var A = e[l]; var v = h(A, 0, 1); var P = h(A, -1); if ( (v === '"' || v === "'" || v === "`" || P === '"' || P === "'" || P === "`") && v !== P ) { throw new n( "property names with quotes must have matching quotes" ); } if (A === "constructor" || !d) { s = true; } i += "." + A; f = "%" + i + "%"; if (b(g, f)) { u = g[f]; } else if (u != null) { if (!(A in u)) { if (!t) { throw new a( "base intrinsic for " + r + " exists, but the property is not available." ); } return void o; } if (y && l + 1 >= e.length) { var O = y(u, A); d = !!O; if ( d && "get" in O && !("originalValue" in O.get) ) { u = O.get; } else { u = u[A]; } } else { d = b(u, A); u = u[A]; } if (d && !s) { g[f] = u; } } } return u; }; }, 219: function (r) { var t = Object.prototype.hasOwnProperty; var e = Object.prototype.toString; r.exports = function forEach(r, o, n) { if (e.call(o) !== "[object Function]") { throw new TypeError( "iterator must be a function" ); } var i = r.length; if (i === +i) { for (var a = 0; a < i; a++) { o.call(n, r[a], a, r); } } else { for (var y in r) { if (t.call(r, y)) { o.call(n, r[y], y, r); } } } }; }, 733: function (r) { "use strict"; var t = "Function.prototype.bind called on incompatible "; var e = Array.prototype.slice; var o = Object.prototype.toString; var n = "[object Function]"; r.exports = function bind(r) { var i = this; if (typeof i !== "function" || o.call(i) !== n) { throw new TypeError(t + i); } var a = e.call(arguments, 1); var y; var binder = function () { if (this instanceof y) { var t = i.apply( this, a.concat(e.call(arguments)) ); if (Object(t) === t) { return t; } return this; } else { return i.apply( r, a.concat(e.call(arguments)) ); } }; var p = Math.max(0, i.length - a.length); var f = []; for (var u = 0; u < p; u++) { f.push("$" + u); } y = Function( "binder", "return function (" + f.join(",") + "){ return binder.apply(this,arguments); }" )(binder); if (i.prototype) { var s = function Empty() {}; s.prototype = i.prototype; y.prototype = new s(); s.prototype = null; } return y; }; }, 517: function (r, t, e) { "use strict"; var o = e(733); r.exports = Function.prototype.bind || o; }, 879: function (r, t, e) { "use strict"; var o; var n = SyntaxError; var i = Function; var a = TypeError; var getEvalledConstructor = function (r) { try { return i( '"use strict"; return (' + r + ").constructor;" )(); } catch (r) {} }; var y = Object.getOwnPropertyDescriptor; if (y) { try { y({}, ""); } catch (r) { y = null; } } var throwTypeError = function () { throw new a(); }; var p = y ? (function () { try { arguments.callee; return throwTypeError; } catch (r) { try { return y(arguments, "callee").get; } catch (r) { return throwTypeError; } } })() : throwTypeError; var f = e(449)(); var u = Object.getPrototypeOf || function (r) { return r.__proto__; }; var s = {}; var c = typeof Uint8Array === "undefined" ? o : u(Uint8Array); var l = { "%AggregateError%": typeof AggregateError === "undefined" ? o : AggregateError, "%Array%": Array, "%ArrayBuffer%": typeof ArrayBuffer === "undefined" ? o : ArrayBuffer, "%ArrayIteratorPrototype%": f ? u([][Symbol.iterator]()) : o, "%AsyncFromSyncIteratorPrototype%": o, "%AsyncFunction%": s, "%AsyncGenerator%": s, "%AsyncGeneratorFunction%": s, "%AsyncIteratorPrototype%": s, "%Atomics%": typeof Atomics === "undefined" ? o : Atomics, "%BigInt%": typeof BigInt === "undefined" ? o : BigInt, "%Boolean%": Boolean, "%DataView%": typeof DataView === "undefined" ? o : DataView, "%Date%": Date, "%decodeURI%": decodeURI, "%decodeURIComponent%": decodeURIComponent, "%encodeURI%": encodeURI, "%encodeURIComponent%": encodeURIComponent, "%Error%": Error, "%eval%": eval, "%EvalError%": EvalError, "%Float32Array%": typeof Float32Array === "undefined" ? o : Float32Array, "%Float64Array%": typeof Float64Array === "undefined" ? o : Float64Array, "%FinalizationRegistry%": typeof FinalizationRegistry === "undefined" ? o : FinalizationRegistry, "%Function%": i, "%GeneratorFunction%": s, "%Int8Array%": typeof Int8Array === "undefined" ? o : Int8Array, "%Int16Array%": typeof Int16Array === "undefined" ? o : Int16Array, "%Int32Array%": typeof Int32Array === "undefined" ? o : Int32Array, "%isFinite%": isFinite, "%isNaN%": isNaN, "%IteratorPrototype%": f ? u(u([][Symbol.iterator]())) : o, "%JSON%": typeof JSON === "object" ? JSON : o, "%Map%": typeof Map === "undefined" ? o : Map, "%MapIteratorPrototype%": typeof Map === "undefined" || !f ? o : u(new Map()[Symbol.iterator]()), "%Math%": Math, "%Number%": Number, "%Object%": Object, "%parseFloat%": parseFloat, "%parseInt%": parseInt, "%Promise%": typeof Promise === "undefined" ? o : Promise, "%Proxy%": typeof Proxy === "undefined" ? o : Proxy, "%RangeError%": RangeError, "%ReferenceError%": ReferenceError, "%Reflect%": typeof Reflect === "undefined" ? o : Reflect, "%RegExp%": RegExp, "%Set%": typeof Set === "undefined" ? o : Set, "%SetIteratorPrototype%": typeof Set === "undefined" || !f ? o : u(new Set()[Symbol.iterator]()), "%SharedArrayBuffer%": typeof SharedArrayBuffer === "undefined" ? o : SharedArrayBuffer, "%String%": String, "%StringIteratorPrototype%": f ? u(""[Symbol.iterator]()) : o, "%Symbol%": f ? Symbol : o, "%SyntaxError%": n, "%ThrowTypeError%": p, "%TypedArray%": c, "%TypeError%": a, "%Uint8Array%": typeof Uint8Array === "undefined" ? o : Uint8Array, "%Uint8ClampedArray%": typeof Uint8ClampedArray === "undefined" ? o : Uint8ClampedArray, "%Uint16Array%": typeof Uint16Array === "undefined" ? o : Uint16Array, "%Uint32Array%": typeof Uint32Array === "undefined" ? o : Uint32Array, "%URIError%": URIError, "%WeakMap%": typeof WeakMap === "undefined" ? o : WeakMap, "%WeakRef%": typeof WeakRef === "undefined" ? o : WeakRef, "%WeakSet%": typeof WeakSet === "undefined" ? o : WeakSet, }; var d = function doEval(r) { var t; if (r === "%AsyncFunction%") { t = getEvalledConstructor( "async function () {}" ); } else if (r === "%GeneratorFunction%") { t = getEvalledConstructor("function* () {}"); } else if (r === "%AsyncGeneratorFunction%") { t = getEvalledConstructor( "async function* () {}" ); } else if (r === "%AsyncGenerator%") { var e = doEval("%AsyncGeneratorFunction%"); if (e) { t = e.prototype; } } else if (r === "%AsyncIteratorPrototype%") { var o = doEval("%AsyncGenerator%"); if (o) { t = u(o.prototype); } } l[r] = t; return t; }; var g = { "%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 A = e(517); var v = e(793); var b = A.call(Function.call, Array.prototype.concat); var S = A.call(Function.apply, Array.prototype.splice); var m = A.call(Function.call, String.prototype.replace); var P = A.call(Function.call, String.prototype.slice); var h = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; var O = /\\(\\)?/g; var w = function stringToPath(r) { var t = P(r, 0, 1); var e = P(r, -1); if (t === "%" && e !== "%") { throw new n( "invalid intrinsic syntax, expected closing `%`" ); } else if (e === "%" && t !== "%") { throw new n( "invalid intrinsic syntax, expected opening `%`" ); } var o = []; m(r, h, function (r, t, e, n) { o[o.length] = e ? m(n, O, "$1") : t || r; }); return o; }; var E = function getBaseIntrinsic(r, t) { var e = r; var o; if (v(g, e)) { o = g[e]; e = "%" + o[0] + "%"; } if (v(l, e)) { var i = l[e]; if (i === s) { i = d(e); } if (typeof i === "undefined" && !t) { throw new a( "intrinsic " + r + " exists, but is not available. Please file an issue!" ); } return { alias: o, name: e, value: i }; } throw new n("intrinsic " + r + " does not exist!"); }; r.exports = function GetIntrinsic(r, t) { if (typeof r !== "string" || r.length === 0) { throw new a( "intrinsic name must be a non-empty string" ); } if ( arguments.length > 1 && typeof t !== "boolean" ) { throw new a( '"allowMissing" argument must be a boolean' ); } var e = w(r); var i = e.length > 0 ? e[0] : ""; var p = E("%" + i + "%", t); var f = p.name; var u = p.value; var s = false; var c = p.alias; if (c) { i = c[0]; S(e, b([0, 1], c)); } for (var d = 1, g = true; d < e.length; d += 1) { var A = e[d]; var m = P(A, 0, 1); var h = P(A, -1); if ( (m === '"' || m === "'" || m === "`" || h === '"' || h === "'" || h === "`") && m !== h ) { throw new n( "property names with quotes must have matching quotes" ); } if (A === "constructor" || !g) { s = true; } i += "." + A; f = "%" + i + "%"; if (v(l, f)) { u = l[f]; } else if (u != null) { if (!(A in u)) { if (!t) { throw new a( "base intrinsic for " + r + " exists, but the property is not available." ); } return void o; } if (y && d + 1 >= e.length) { var O = y(u, A); g = !!O; if ( g && "get" in O && !("originalValue" in O.get) ) { u = O.get; } else { u = u[A]; } } else { g = v(u, A); u = u[A]; } if (g && !s) { l[f] = u; } } } return u; }; }, 449: function (r, t, e) { "use strict"; var o = __webpack_require__.g.Symbol; var n = e(545); r.exports = function hasNativeSymbols() { if (typeof o !== "function") { return false; } if (typeof Symbol !== "function") { return false; } if (typeof o("foo") !== "symbol") { return false; } if (typeof Symbol("bar") !== "symbol") { return false; } return n(); }; }, 545: function (r) { "use strict"; r.exports = function hasSymbols() { if ( typeof Symbol !== "function" || typeof Object.getOwnPropertySymbols !== "function" ) { return false; } if (typeof Symbol.iterator === "symbol") { return true; } var r = {}; var t = Symbol("test"); var e = Object(t); if (typeof t === "string") { return false; } if ( Object.prototype.toString.call(t) !== "[object Symbol]" ) { return false; } if ( Object.prototype.toString.call(e) !== "[object Symbol]" ) { return false; } var o = 42; r[t] = o; for (t in r) { return false; } if ( typeof Object.keys === "function" && Object.keys(r).length !== 0 ) { return false; } if ( typeof Object.getOwnPropertyNames === "function" && Object.getOwnPropertyNames(r).length !== 0 ) { return false; } var n = Object.getOwnPropertySymbols(r); if (n.length !== 1 || n[0] !== t) { return false; } if ( !Object.prototype.propertyIsEnumerable.call( r, t ) ) { return false; } if ( typeof Object.getOwnPropertyDescriptor === "function" ) { var i = Object.getOwnPropertyDescriptor(r, t); if (i.value !== o || i.enumerable !== true) { return false; } } return true; }; }, 793: function (r, t, e) { "use strict"; var o = e(517); r.exports = o.call( Function.call, Object.prototype.hasOwnProperty ); }, 526: function (r) { if (typeof Object.create === "function") { r.exports = function inherits(r, t) { if (t) { r.super_ = t; r.prototype = Object.create(t.prototype, { constructor: { value: r, enumerable: false, writable: true, configurable: true, }, }); } }; } else { r.exports = function inherits(r, t) { if (t) { r.super_ = t; var TempCtor = function () {}; TempCtor.prototype = t.prototype; r.prototype = new TempCtor(); r.prototype.constructor = r; } }; } }, 312: function (r) { "use strict"; var t = typeof Symbol === "function" && typeof Symbol.toStringTag === "symbol"; var e = Object.prototype.toString; var o = function isArguments(r) { if ( t && r && typeof r === "object" && Symbol.toStringTag in r ) { return false; } return e.call(r) === "[object Arguments]"; }; var n = function isArguments(r) { if (o(r)) { return true; } return ( r !== null && typeof r === "object" && typeof r.length === "number" && r.length >= 0 && e.call(r) !== "[object Array]" && e.call(r.callee) === "[object Function]" ); }; var i = (function () { return o(arguments); })(); o.isLegacyArguments = n; r.exports = i ? o : n; }, 906: function (r) { "use strict"; var t = Object.prototype.toString; var e = Function.prototype.toString; var o = /^\s*(?:function)?\*/; var n = typeof Symbol === "function" && typeof Symbol.toStringTag === "symbol"; var i = Object.getPrototypeOf; var getGeneratorFunc = function () { if (!n) { return false; } try { return Function("return function*() {}")(); } catch (r) {} }; var a = getGeneratorFunc(); var y = a ? i(a) : {}; r.exports = function isGeneratorFunction(r) { if (typeof r !== "function") { return false; } if (o.test(e.call(r))) { return true; } if (!n) { var a = t.call(r); return a === "[object GeneratorFunction]"; } return i(r) === y; }; }, 234: function (r, t, e) { "use strict"; var o = e(219); var n = e(627); var i = e(749); var a = i("Object.prototype.toString"); var y = e(449)(); var p = y && typeof Symbol.toStringTag === "symbol"; var f = n(); var u = i("Array.prototype.indexOf", true) || function indexOf(r, t) { for (var e = 0; e < r.length; e += 1) { if (r[e] === t) { return e; } } return -1; }; var s = i("String.prototype.slice"); var c = {}; var l = e(982); var d = Object.getPrototypeOf; if (p && l && d) { o(f, function (r) { var t = new __webpack_require__.g[r](); if (!(Symbol.toStringTag in t)) { throw new EvalError( "this engine has support for Symbol.toStringTag, but " + r + " does not have the property! Please report this." ); } var e = d(t); var o = l(e, Symbol.toStringTag); if (!o) { var n = d(e); o = l(n, Symbol.toStringTag); } c[r] = o.get; }); } var g = function tryAllTypedArrays(r) { var t = false; o(c, function (e, o) { if (!t) { try { t = e.call(r) === o; } catch (r) {} } }); return t; }; r.exports = function isTypedArray(r) { if (!r || typeof r !== "object") { return false; } if (!p) { var t = s(a(r), 8, -1); return u(f, t) > -1; } if (!l) { return false; } return g(r); }; }, 982: function (r, t, e) { "use strict"; var o = e(879); var n = o("%Object.getOwnPropertyDescriptor%"); if (n) { try { n([], "length"); } catch (r) { n = null; } } r.exports = n; }, 536: function (r) { r.exports = function isBuffer(r) { return r instanceof Buffer; }; }, 3: function (r, t, e) { "use strict"; var o = e(312); var n = e(906); var i = e(715); var a = e(234); function uncurryThis(r) { return r.call.bind(r); } var y = typeof BigInt !== "undefined"; var p = typeof Symbol !== "undefined"; var f = uncurryThis(Object.prototype.toString); var u = uncurryThis(Number.prototype.valueOf); var s = uncurryThis(String.prototype.valueOf); var c = uncurryThis(Boolean.prototype.valueOf); if (y) { var l = uncurryThis(BigInt.prototype.valueOf); } if (p) { var d = uncurryThis(Symbol.prototype.valueOf); } function checkBoxedPrimitive(r, t) { if (typeof r !== "object") { return false; } try { t(r); return true; } catch (r) { return false; } } t.isArgumentsObject = o; t.isGeneratorFunction = n; t.isTypedArray = a; function isPromise(r) { return ( (typeof Promise !== "undefined" && r instanceof Promise) || (r !== null && typeof r === "object" && typeof r.then === "function" && typeof r.catch === "function") ); } t.isPromise = isPromise; function isArrayBufferView(r) { if ( typeof ArrayBuffer !== "undefined" && ArrayBuffer.isView ) { return ArrayBuffer.isView(r); } return a(r) || isDataView(r); } t.isArrayBufferView = isArrayBufferView; function isUint8Array(r) { return i(r) === "Uint8Array"; } t.isUint8Array = isUint8Array; function isUint8ClampedArray(r) { return i(r) === "Uint8ClampedArray"; } t.isUint8ClampedArray = isUint8ClampedArray; function isUint16Array(r) { return i(r) === "Uint16Array"; } t.isUint16Array = isUint16Array; function isUint32Array(r) { return i(r) === "Uint32Array"; } t.isUint32Array = isUint32Array; function isInt8Array(r) { return i(r) === "Int8Array"; } t.isInt8Array = isInt8Array; function isInt16Array(r) { return i(r) === "Int16Array"; } t.isInt16Array = isInt16Array; function isInt32Array(r) { return i(r) === "Int32Array"; } t.isInt32Array = isInt32Array; function isFloat32Array(r) { return i(r) === "Float32Array"; } t.isFloat32Array = isFloat32Array; function isFloat64Array(r) { return i(r) === "Float64Array"; } t.isFloat64Array = isFloat64Array; function isBigInt64Array(r) { return i(r) === "BigInt64Array"; } t.isBigInt64Array = isBigInt64Array; function isBigUint64Array(r) { return i(r) === "BigUint64Array"; } t.isBigUint64Array = isBigUint64Array; function isMapToString(r) { return f(r) === "[object Map]"; } isMapToString.working = typeof Map !== "undefined" && isMapToString(new Map()); function isMap(r) { if (typeof Map === "undefined") { return false; } return isMapToString.working ? isMapToString(r) : r instanceof Map; } t.isMap = isMap; function isSetToString(r) { return f(r) === "[object Set]"; } isSetToString.working = typeof Set !== "undefined" && isSetToString(new Set()); function isSet(r) { if (typeof Set === "undefined") { return false; } return isSetToString.working ? isSetToString(r) : r instanceof Set; } t.isSet = isSet; function isWeakMapToString(r) { return f(r) === "[object WeakMap]"; } isWeakMapToString.working = typeof WeakMap !== "undefined" && isWeakMapToString(new WeakMap()); function isWeakMap(r) { if (typeof WeakMap === "undefined") { return false; } return isWeakMapToString.working ? isWeakMapToString(r) : r instanceof WeakMap; } t.isWeakMap = isWeakMap; function isWeakSetToString(r) { return f(r) === "[object WeakSet]"; } isWeakSetToString.working = typeof WeakSet !== "undefined" && isWeakSetToString(new WeakSet()); function isWeakSet(r) { return isWeakSetToString(r); } t.isWeakSet = isWeakSet; function isArrayBufferToString(r) { return f(r) === "[object ArrayBuffer]"; } isArrayBufferToString.working = typeof ArrayBuffer !== "undefined" && isArrayBufferToString(new ArrayBuffer()); function isArrayBuffer(r) { if (typeof ArrayBuffer === "undefined") { return false; } return isArrayBufferToString.working ? isArrayBufferToString(r) : r instanceof ArrayBuffer; } t.isArrayBuffer = isArrayBuffer; function isDataViewToString(r) { return f(r) === "[object DataView]"; } isDataViewToString.working = typeof ArrayBuffer !== "undefined" && typeof DataView !== "undefined" && isDataViewToString( new DataView(new ArrayBuffer(1), 0, 1) ); function isDataView(r) { if (typeof DataView === "undefined") { return false; } return isDataViewToString.working ? isDataViewToString(r) : r instanceof DataView; } t.isDataView = isDataView; var g = typeof SharedArrayBuffer !== "undefined" ? SharedArrayBuffer : undefined; function isSharedArrayBufferToString(r) { return f(r) === "[object SharedArrayBuffer]"; } function isSharedArrayBuffer(r) { if (typeof g === "undefined") { return false; } if ( typeof isSharedArrayBufferToString.working === "undefined" ) { isSharedArrayBufferToString.working = isSharedArrayBufferToString(new g()); } return isSharedArrayBufferToString.working ? isSharedArrayBufferToString(r) : r instanceof g; } t.isSharedArrayBuffer = isSharedArrayBuffer; function isAsyncFunction(r) { return f(r) === "[object AsyncFunction]"; } t.isAsyncFunction = isAsyncFunction; function isMapIterator(r) { return f(r) === "[object Map Iterator]"; } t.isMapIterator = isMapIterator; function isSetIterator(r) { return f(r) === "[object Set Iterator]"; } t.isSetIterator = isSetIterator; function isGeneratorObject(r) { return f(r) === "[object Generator]"; } t.isGeneratorObject = isGeneratorObject; function isWebAssemblyCompiledModule(r) { return f(r) === "[object WebAssembly.Module]"; } t.isWebAssemblyCompiledModule = isWebAssemblyCompiledModule; function isNumberObject(r) { return checkBoxedPrimitive(r, u); } t.isNumberObject = isNumberObject; function isStringObject(r) { return checkBoxedPrimitive(r, s); } t.isStringObject = isStringObject; function isBooleanObject(r) { return checkBoxedPrimitive(r, c); } t.isBooleanObject = isBooleanObject; function isBigIntObject(r) { return y && checkBoxedPrimitive(r, l); } t.isBigIntObject = isBigIntObject; function isSymbolObject(r) { return p && checkBoxedPrimitive(r, d); } t.isSymbolObject = isSymbolObject; function isBoxedPrimitive(r) { return ( isNumberObject(r) || isStringObject(r) || isBooleanObject(r) || isBigIntObject(r) || isSymbolObject(r) ); } t.isBoxedPrimitive = isBoxedPrimitive; function isAnyArrayBuffer(r) { return ( typeof Uint8Array !== "undefined" && (isArrayBuffer(r) || isSharedArrayBuffer(r)) ); } t.isAnyArrayBuffer = isAnyArrayBuffer; [ "isProxy", "isExternal", "isModuleNamespaceObject", ].forEach(function (r) { Object.defineProperty(t, r, { enumerable: false, value: function () { throw new Error( r + " is not supported in userland" ); }, }); }); }, 650: function (r, t, e) { var o = Object.getOwnPropertyDescriptors || function getOwnPropertyDescriptors(r) { var t = Object.keys(r); var e = {}; for (var o = 0; o < t.length; o++) { e[t[o]] = Object.getOwnPropertyDescriptor( r, t[o] ); } return e; }; var n = /%[sdj%]/g; t.format = function (r) { if (!isString(r)) { var t = []; for (var e = 0; e < arguments.length; e++) { t.push(inspect(arguments[e])); } return t.join(" "); } var e = 1; var o = arguments; var i = o.length; var a = String(r).replace(n, function (r) { if (r === "%%") return "%"; if (e >= i) return r; switch (r) { case "%s": return String(o[e++]); case "%d": return Number(o[e++]); case "%j": try { return JSON.stringify(o[e++]); } catch (r) { return "[Circular]"; } default: return r; } }); for (var y = o[e]; e < i; y = o[++e]) { if (isNull(y) || !isObject(y)) { a += " " + y; } else { a += " " + inspect(y); } } return a; }; t.deprecate = function (r, e) { if ( typeof process !== "undefined" && process.noDeprecation === true ) { return r; } if (typeof process === "undefined") { return function () { return t .deprecate(r, e) .apply(this, arguments); }; } var o = false; function deprecated() { if (!o) { if (process.throwDeprecation) { throw new Error(e); } else if (process.traceDeprecation) { console.trace(e); } else { console.error(e); } o = true; } return r.apply(this, arguments); } return deprecated; }; var i = {}; var a = /^$/; if (process.env.NODE_DEBUG) { var y = process.env.NODE_DEBUG; y = y .replace(/[|\\{}()[\]^$+?.]/g, "\\$&") .replace(/\*/g, ".*") .replace(/,/g, "$|^") .toUpperCase(); a = new RegExp("^" + y + "$", "i"); } t.debuglog = function (r) { r = r.toUpperCase(); if (!i[r]) { if (a.test(r)) { var e = process.pid; i[r] = function () { var o = t.format.apply(t, arguments); console.error("%s %d: %s", r, e, o); }; } else { i[r] = function () {}; } } return i[r]; }; function inspect(r, e) { var o = { seen: [], stylize: stylizeNoColor }; if (arguments.length >= 3) o.depth = arguments[2]; if (arguments.length >= 4) o.colors = arguments[3]; if (isBoolean(e)) { o.showHidden = e; } else if (e) { t._extend(o, e); } if (isUndefined(o.showHidden)) o.showHidden = false; if (isUndefined(o.depth)) o.depth = 2; if (isUndefined(o.colors)) o.colors = false; if (isUndefined(o.customInspect)) o.customInspect = true; if (o.colors) o.stylize = stylizeWithColor; return formatValue(o, r, o.depth); } t.inspect = inspect; inspect.colors = { bold: [1, 22], italic: [3, 23], underline: [4, 24], inverse: [7, 27], white: [37, 39], grey: [90, 39], black: [30, 39], blue: [34, 39], cyan: [36, 39], green: [32, 39], magenta: [35, 39], red: [31, 39], yellow: [33, 39], }; inspect.styles = { special: "cyan", number: "yellow", boolean: "yellow", undefined: "grey", null: "bold", string: "green", date: "magenta", regexp: "red", }; function stylizeWithColor(r, t) { var e = inspect.styles[t]; if (e) { return ( "[" + inspect.colors[e][0] + "m" + r + "[" + inspect.colors[e][1] + "m" ); } else { return r; } } function stylizeNoColor(r, t) { return r; } function arrayToHash(r) { var t = {}; r.forEach(function (r, e) { t[r] = true; }); return t; } function formatValue(r, e, o) { if ( r.customInspect && e && isFunction(e.inspect) && e.inspect !== t.inspect && !( e.constructor && e.constructor.prototype === e ) ) { var n = e.inspect(o, r); if (!isString(n)) { n = formatValue(r, n, o); } return n; } var i = formatPrimitive(r, e); if (i) { return i; } var a = Object.keys(e); var y = arrayToHash(a); if (r.showHidden) { a = Object.getOwnPropertyNames(e); } if ( isError(e) && (a.indexOf("message") >= 0 || a.indexOf("description") >= 0) ) { return formatError(e); } if (a.length === 0) { if (isFunction(e)) { var p = e.name ? ": " + e.name : ""; return r.stylize( "[Function" + p + "]", "special" ); } if (isRegExp(e)) { return r.stylize( RegExp.prototype.toString.call(e), "regexp" ); } if (isDate(e)) { return r.stylize( Date.prototype.toString.call(e), "date" ); } if (isError(e)) { return formatError(e); } } var f = "", u = false, s = ["{", "}"]; if (isArray(e)) { u = true; s = ["[", "]"]; } if (isFunction(e)) { var c = e.name ? ": " + e.name : ""; f = " [Function" + c + "]"; } if (isRegExp(e)) { f = " " + RegExp.prototype.toString.call(e); } if (isDate(e)) { f = " " + Date.prototype.toUTCString.call(e); } if (isError(e)) { f = " " + formatError(e); } if (a.length === 0 && (!u || e.length == 0)) { return s[0] + f + s[1]; } if (o < 0) { if (isRegExp(e)) { return r.stylize( RegExp.prototype.toString.call(e), "regexp" ); } else { return r.stylize("[Object]", "special"); } } r.seen.push(e); var l; if (u) { l = formatArray(r, e, o, y, a); } else { l = a.map(function (t) { return formatProperty(r, e, o, y, t, u); }); } r.seen.pop(); return reduceToSingleString(l, f, s); } function formatPrimitive(r, t) { if (isUndefined(t)) return r.stylize("undefined", "undefined"); if (isString(t)) { var e = "'" + JSON.stringify(t) .replace(/^"|"$/g, "") .replace(/'/g, "\\'") .replace(/\\"/g, '"') + "'"; return r.stylize(e, "string"); } if (isNumber(t)) return r.stylize("" + t, "number"); if (isBoolean(t)) return r.stylize("" + t, "boolean"); if (isNull(t)) return r.stylize("null", "null"); } function formatError(r) { return "[" + Error.prototype.toString.call(r) + "]"; } function formatArray(r, t, e, o, n) { var i = []; for (var a = 0, y = t.length; a < y; ++a) { if (hasOwnProperty(t, String(a))) { i.push( formatProperty( r, t, e, o, String(a), true ) ); } else { i.push(""); } } n.forEach(function (n) { if (!n.match(/^\d+$/)) { i.push(formatProperty(r, t, e, o, n, true)); } }); return i; } function formatProperty(r, t, e, o, n, i) { var a, y, p; p = Object.getOwnPropertyDescriptor(t, n) || { value: t[n], }; if (p.get) { if (p.set) { y = r.stylize("[Getter/Setter]", "special"); } else { y = r.stylize("[Getter]", "special"); } } else { if (p.set) { y = r.stylize("[Setter]", "special"); } } if (!hasOwnProperty(o, n)) { a = "[" + n + "]"; } if (!y) { if (r.seen.indexOf(p.value) < 0) { if (isNull(e)) { y = formatValue(r, p.value, null); } else { y = formatValue(r, p.value, e - 1); } if (y.indexOf("\n") > -1) { if (i) { y = y .split("\n") .map(function (r) { return " " + r; }) .join("\n") .substr(2); } else { y = "\n" + y .split("\n") .map(function (r) { return " " + r; }) .join("\n"); } } } else { y = r.stylize("[Circular]", "special"); } } if (isUndefined(a)) { if (i && n.match(/^\d+$/)) { return y; } a = JSON.stringify("" + n); if (a.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)) { a = a.substr(1, a.length - 2); a = r.stylize(a, "name"); } else { a = a .replace(/'/g, "\\'") .replace(/\\"/g, '"') .replace(/(^"|"$)/g, "'"); a = r.stylize(a, "string"); } } return a + ": " + y; } function reduceToSingleString(r, t, e) { var o = 0; var n = r.reduce(function (r, t) { o++; if (t.indexOf("\n") >= 0) o++; return ( r + t.replace(/\u001b\[\d\d?m/g, "").length + 1 ); }, 0); if (n > 60) { return ( e[0] + (t === "" ? "" : t + "\n ") + " " + r.join(",\n ") + " " + e[1] ); } return e[0] + t + " " + r.join(", ") + " " + e[1]; } t.types = e(3); function isArray(r) { return Array.isArray(r); } t.isArray = isArray; function isBoolean(r) { return typeof r === "boolean"; } t.isBoolean = isBoolean; function isNull(r) { return r === null; } t.isNull = isNull; function isNullOrUndefined(r) { return r == null; } t.isNullOrUndefined = isNullOrUndefined; function isNumber(r) { return typeof r === "number"; } t.isNumber = isNumber; function isString(r) { return typeof r === "string"; } t.isString = isString; function isSymbol(r) { return typeof r === "symbol"; } t.isSymbol = isSymbol; function isUndefined(r) { return r === void 0; } t.isUndefined = isUndefined; function isRegExp(r) { return ( isObject(r) && objectToString(r) === "[object RegExp]" ); } t.isRegExp = isRegExp; t.types.isRegExp = isRegExp; function isObject(r) { return typeof r === "object" && r !== null; } t.isObject = isObject; function isDate(r) { return ( isObject(r) && objectToString(r) === "[object Date]" ); } t.isDate = isDate; t.types.isDate = isDate; function isError(r) { return ( isObject(r) && (objectToString(r) === "[object Error]" || r instanceof Error) ); } t.isError = isError; t.types.isNativeError = isError; function isFunction(r) { return typeof r === "function"; } t.isFunction = isFunction; function isPrimitive(r) { return ( r === null || typeof r === "boolean" || typeof r === "number" || typeof r === "string" || typeof r === "symbol" || typeof r === "undefined" ); } t.isPrimitive = isPrimitive; t.isBuffer = e(536); function objectToString(r) { return Object.prototype.toString.call(r); } function pad(r) { return r < 10 ? "0" + r.toString(10) : r.toString(10); } var p = [ "Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", ]; function timestamp() { var r = new Date(); var t = [ pad(r.getHours()), pad(r.getMinutes()), pad(r.getSeconds()), ].join(":"); return [r.getDate(), p[r.getMonth()], t].join(" "); } t.log = function () { console.log( "%s - %s", timestamp(), t.format.apply(t, arguments) ); }; t.inherits = e(526); t._extend = function (r, t) { if (!t || !isObject(t)) return r; var e = Object.keys(t); var o = e.length; while (o--) { r[e[o]] = t[e[o]]; } return r; }; function hasOwnProperty(r, t) { return Object.prototype.hasOwnProperty.call(r, t); } var f = typeof Symbol !== "undefined" ? Symbol("util.promisify.custom") : undefined; t.promisify = function promisify(r) { if (typeof r !== "function") throw new TypeError( 'The "original" argument must be of type Function' ); if (f && r[f]) { var t = r[f]; if (typeof t !== "function") { throw new TypeError( 'The "util.promisify.custom" argument must be of type Function' ); } Object.defineProperty(t, f, { value: t, enumerable: false, writable: false, configurable: true, }); return t; } function t() { var t, e; var o = new Promise(function (r, o) { t = r; e = o; }); var n = []; for (var i = 0; i < arguments.length; i++) { n.push(arguments[i]); } n.push(function (r, o) { if (r) { e(r); } else { t(o); } }); try { r.apply(this, n); } catch (r) { e(r); } return o; } Object.setPrototypeOf(t, Object.getPrototypeOf(r)); if (f) Object.defineProperty(t, f, { value: t, enumerable: false, writable: false, configurable: true, }); return Object.defineProperties(t, o(r)); }; t.promisify.custom = f; function callbackifyOnRejected(r, t) { if (!r) { var e = new Error( "Promise was rejected with a falsy value" ); e.reason = r; r = e; } return t(r); } function callbackify(r) { if (typeof r !== "function") { throw new TypeError( 'The "original" argument must be of type Function' ); } function callbackified() { var t = []; for (var e = 0; e < arguments.length; e++) { t.push(arguments[e]); } var o = t.pop(); if (typeof o !== "function") { throw new TypeError( "The last argument must be of type Function" ); } var n = this; var cb = function () { return o.apply(n, arguments); }; r.apply(this, t).then( function (r) { process.nextTick( cb.bind(null, null, r) ); }, function (r) { process.nextTick( callbackifyOnRejected.bind( null, r, cb ) ); } ); } Object.setPrototypeOf( callbackified, Object.getPrototypeOf(r) ); Object.defineProperties(callbackified, o(r)); return callbackified; } t.callbackify = callbackify; }, 715: function (r, t, e) { "use strict"; var o = e(219); var n = e(627); var i = e(749); var a = i("Object.prototype.toString"); var y = e(449)(); var p = y && typeof Symbol.toStringTag === "symbol"; var f = n(); var u = i("String.prototype.slice"); var s = {}; var c = e(850); var l = Object.getPrototypeOf; if (p && c && l) { o(f, function (r) { if ( typeof __webpack_require__.g[r] === "function" ) { var t = new __webpack_require__.g[r](); if (!(Symbol.toStringTag in t)) { throw new EvalError( "this engine has support for Symbol.toStringTag, but " + r + " does not have the property! Please report this." ); } var e = l(t); var o = c(e, Symbol.toStringTag); if (!o) { var n = l(e); o = c(n, Symbol.toStringTag); } s[r] = o.get; } }); } var d = function tryAllTypedArrays(r) { var t = false; o(s, function (e, o) { if (!t) { try { var n = e.call(r); if (n === o) { t = n; } } catch (r) {} } }); return t; }; var g = e(234); r.exports = function whichTypedArray(r) { if (!g(r)) { return false; } if (!p) { return u(a(r), 8, -1); } return d(r); }; }, 227: function (r, t, e) { "use strict"; var o; var n = SyntaxError; var i = Function; var a = TypeError; var getEvalledConstructor = function (r) { try { return Function( '"use strict"; return (' + r + ").constructor;" )(); } catch (r) {} }; var y = Object.getOwnPropertyDescriptor; if (y) { try { y({}, ""); } catch (r) { y = null; } } var throwTypeError = function () { throw new a(); }; var p = y ? (function () { try { arguments.callee; return throwTypeError; } catch (r) { try { return y(arguments, "callee").get; } catch (r) { return throwTypeError; } } })() : throwTypeError; var f = e(449)(); var u = Object.getPrototypeOf || function (r) { return r.__proto__; }; var s = getEvalledConstructor("async function* () {}"); var c = s ? s.prototype : o; var l = c ? c.prototype : o; var d = typeof Uint8Array === "undefined" ? o : u(Uint8Array); var g = { "%AggregateError%": typeof AggregateError === "undefined" ? o : AggregateError, "%Array%": Array, "%ArrayBuffer%": typeof ArrayBuffer === "undefined" ? o : ArrayBuffer, "%ArrayIteratorPrototype%": f ? u([][Symbol.iterator]()) : o, "%AsyncFromSyncIteratorPrototype%": o, "%AsyncFunction%": getEvalledConstructor( "async function () {}" ), "%AsyncGenerator%": c, "%AsyncGeneratorFunction%": s, "%AsyncIteratorPrototype%": l ? u(l) : o, "%Atomics%": typeof Atomics === "undefined" ? o : Atomics, "%BigInt%": typeof BigInt === "undefined" ? o : BigInt, "%Boolean%": Boolean, "%DataView%": typeof DataView === "undefined" ? o : DataView, "%Date%": Date, "%decodeURI%": decodeURI, "%decodeURIComponent%": decodeURIComponent, "%encodeURI%": encodeURI, "%encodeURIComponent%": encodeURIComponent, "%Error%": Error, "%eval%": eval, "%EvalError%": EvalError, "%Float32Array%": typeof Float32Array === "undefined" ? o : Float32Array, "%Float64Array%": typeof Float64Array === "undefined" ? o : Float64Array, "%FinalizationRegistry%": typeof FinalizationRegistry === "undefined" ? o : FinalizationRegistry, "%Function%": i, "%GeneratorFunction%": getEvalledConstructor("function* () {}"), "%Int8Array%": typeof Int8Array === "undefined" ? o : Int8Array, "%Int16Array%": typeof Int16Array === "undefined" ? o : Int16Array, "%Int32Array%": typeof Int32Array === "undefined" ? o : Int32Array, "%isFinite%": isFinite, "%isNaN%": isNaN, "%IteratorPrototype%": f ? u(u([][Symbol.iterator]())) : o, "%JSON%": typeof JSON === "object" ? JSON : o, "%Map%": typeof Map === "undefined" ? o : Map, "%MapIteratorPrototype%": typeof Map === "undefined" || !f ? o : u(new Map()[Symbol.iterator]()), "%Math%": Math, "%Number%": Number, "%Object%": Object, "%parseFloat%": parseFloat, "%parseInt%": parseInt, "%Promise%": typeof Promise === "undefined" ? o : Promise, "%Proxy%": typeof Proxy === "undefined" ? o : Proxy, "%RangeError%": RangeError, "%ReferenceError%": ReferenceError, "%Reflect%": typeof Reflect === "undefined" ? o : Reflect, "%RegExp%": RegExp, "%Set%": typeof Set === "undefined" ? o : Set, "%SetIteratorPrototype%": typeof Set === "undefined" || !f ? o : u(new Set()[Symbol.iterator]()), "%SharedArrayBuffer%": typeof SharedArrayBuffer === "undefined" ? o : SharedArrayBuffer, "%String%": String, "%StringIteratorPrototype%": f ? u(""[Symbol.iterator]()) : o, "%Symbol%": f ? Symbol : o, "%SyntaxError%": n, "%ThrowTypeError%": p, "%TypedArray%": d, "%TypeError%": a, "%Uint8Array%": typeof Uint8Array === "undefined" ? o : Uint8Array, "%Uint8ClampedArray%": typeof Uint8ClampedArray === "undefined" ? o : Uint8ClampedArray, "%Uint16Array%": typeof Uint16Array === "undefined" ? o : Uint16Array, "%Uint32Array%": typeof Uint32Array === "undefined" ? o : Uint32Array, "%URIError%": URIError, "%WeakMap%": typeof WeakMap === "undefined" ? o : WeakMap, "%WeakRef%": typeof WeakRef === "undefined" ? o : WeakRef, "%WeakSet%": typeof WeakSet === "undefined" ? o : WeakSet, }; var A = { "%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 v = e(517); var b = e(793); var S = v.call(Function.call, Array.prototype.concat); var m = v.call(Function.apply, Array.prototype.splice); var P = v.call(Function.call, String.prototype.replace); var h = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g; var O = /\\(\\)?/g; var w = function stringToPath(r) { var t = []; P(r, h, function (r, e, o, n) { t[t.length] = o ? P(n, O, "$1") : e || r; }); return t; }; var E = function getBaseIntrinsic(r, t) { var e = r; var o; if (b(A, e)) { o = A[e]; e = "%" + o[0] + "%"; } if (b(g, e)) { var i = g[e]; if (typeof i === "undefined" && !t) { throw new a( "intrinsic " + r + " exists, but is not available. Please file an issue!" ); } return { alias: o, name: e, value: i }; } throw new n("intrinsic " + r + " does not exist!"); }; r.exports = function GetIntrinsic(r, t) { if (typeof r !== "string" || r.length === 0) { throw new a( "intrinsic name must be a non-empty string" ); } if ( arguments.length > 1 && typeof t !== "boolean" ) { throw new a( '"allowMissing" argument must be a boolean' ); } var e = w(r); var o = e.length > 0 ? e[0] : ""; var n = E("%" + o + "%", t); var i = n.name; var p = n.value; var f = false; var u = n.alias; if (u) { o = u[0]; m(e, S([0, 1], u)); } for (var s = 1, c = true; s < e.length; s += 1) { var l = e[s]; if (l === "constructor" || !c) { f = true; } o += "." + l; i = "%" + o + "%"; if (b(g, i)) { p = g[i]; } else if (p != null) { if (y && s + 1 >= e.length) { var d = y(p, l); c = !!d; if (!t && !(l in p)) { throw new a( "base intrinsic for " + r + " exists, but the property is not available." ); } if ( c && "get" in d && !("originalValue" in d.get) ) { p = d.get; } else { p = p[l]; } } else { c = b(p, l); p = p[l]; } if (c && !f) { g[i] = p; } } } return p; }; }, 850: function (r, t, e) { "use strict"; var o = e(227); var n = o("%Object.getOwnPropertyDescriptor%"); if (n) { try { n([], "length"); } catch (r) { n = null; } } r.exports = n; }, 627: function (r, t, e) { "use strict"; var o = e(901); r.exports = function availableTypedArrays() { return o( [ "BigInt64Array", "BigUint64Array", "Float32Array", "Float64Array", "Int16Array", "Int32Array", "Int8Array", "Uint16Array", "Uint32Array", "Uint8Array", "Uint8ClampedArray", ], function (r) { return ( typeof __webpack_require__.g[r] === "function" ); } ); }; }, }; var t = {}; function __nccwpck_require__(e) { var o = t[e]; if (o !== undefined) { return o.exports; } var n = (t[e] = { exports: {} }); var i = true; try { r[e](n, n.exports, __nccwpck_require__); i = false; } finally { if (i) delete t[e]; } return n.exports; } if (typeof __nccwpck_require__ !== "undefined") __nccwpck_require__.ab = __dirname + "/"; var e = __nccwpck_require__(650); module.exports = e; })(); /***/ }, /***/ 9008: /***/ function ( module, __unused_webpack_exports, __webpack_require__ ) { module.exports = __webpack_require__(3121); /***/ }, /***/ 5675: /***/ function ( module, __unused_webpack_exports, __webpack_require__ ) { module.exports = __webpack_require__(9749); /***/ }, /***/ 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; }; /***/ }, /***/ 2: /***/ 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__(2); 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; }; /***/ }, /***/ 4462: /***/ function (module) { module.exports = parse; /** * expected argument lengths * @type {Object} */ var length = { a: 7, c: 6, h: 1, l: 2, m: 2, q: 4, s: 4, t: 2, v: 1, z: 0, }; /** * segment pattern * @type {RegExp} */ var segment = /([astvzqmhlc])([^astvzqmhlc]*)/gi; /** * parse an svg path data string. Generates an Array * of commands where each command is an Array of the * form `[command, arg1, arg2, ...]` * * @param {String} path * @return {Array} */ function parse(path) { var data = []; path.replace(segment, function (_, command, args) { var type = command.toLowerCase(); args = parseValues(args); // overloaded moveTo if (type == "m" && args.length > 2) { data.push([command].concat(args.splice(0, 2))); type = "l"; command = command == "m" ? "l" : "L"; } while (true) { if (args.length == length[type]) { args.unshift(command); return data.push(args); } if (args.length < length[type]) throw new Error("malformed path data"); data.push( [command].concat(args.splice(0, length[type])) ); } }); return data; } var number = /-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi; function parseValues(args) { var numbers = args.match(number); return numbers ? numbers.map(Number) : []; } /***/ }, /***/ 788: /***/ function (module) { var openParentheses = "(".charCodeAt(0); var closeParentheses = ")".charCodeAt(0); var singleQuote = "'".charCodeAt(0); var doubleQuote = '"'.charCodeAt(0); var backslash = "\\".charCodeAt(0); var slash = "/".charCodeAt(0); var comma = ",".charCodeAt(0); var colon = ":".charCodeAt(0); var star = "*".charCodeAt(0); var uLower = "u".charCodeAt(0); var uUpper = "U".charCodeAt(0); var plus = "+".charCodeAt(0); var isUnicodeRange = /^[a-f0-9?-]+$/i; module.exports = function (input) { var tokens = []; var value = input; var next, quote, prev, token, escape, escapePos, whitespacePos, parenthesesOpenPos; var pos = 0; var code = value.charCodeAt(pos); var max = value.length; var stack = [{ nodes: tokens }]; var balanced = 0; var parent; var name = ""; var before = ""; var after = ""; while (pos < max) { // Whitespaces if (code <= 32) { next = pos; do { next += 1; code = value.charCodeAt(next); } while (code <= 32); token = value.slice(pos, next); prev = tokens[tokens.length - 1]; if (code === closeParentheses && balanced) { after = token; } else if (prev && prev.type === "div") { prev.after = token; prev.sourceEndIndex += token.length; } else if ( code === comma || code === colon || (code === slash && value.charCodeAt(next + 1) !== star && (!parent || (parent && parent.type === "function" && parent.value !== "calc"))) ) { before = token; } else { tokens.push({ type: "space", sourceIndex: pos, sourceEndIndex: next, value: token, }); } pos = next; // Quotes } else if (code === singleQuote || code === doubleQuote) { next = pos; quote = code === singleQuote ? "'" : '"'; token = { type: "string", sourceIndex: pos, quote: quote, }; do { escape = false; next = value.indexOf(quote, next + 1); if (~next) { escapePos = next; while ( value.charCodeAt(escapePos - 1) === backslash ) { escapePos -= 1; escape = !escape; } } else { value += quote; next = value.length - 1; token.unclosed = true; } } while (escape); token.value = value.slice(pos + 1, next); token.sourceEndIndex = token.unclosed ? next : next + 1; tokens.push(token); pos = next + 1; code = value.charCodeAt(pos); // Comments } else if ( code === slash && value.charCodeAt(pos + 1) === star ) { next = value.indexOf("*/", pos); token = { type: "comment", sourceIndex: pos, sourceEndIndex: next + 2, }; if (next === -1) { token.unclosed = true; next = value.length; token.sourceEndIndex = next; } token.value = value.slice(pos + 2, next); tokens.push(token); pos = next + 2; code = value.charCodeAt(pos); // Operation within calc } else if ( (code === slash || code === star) && parent && parent.type === "function" && parent.value === "calc" ) { token = value[pos]; tokens.push({ type: "word", sourceIndex: pos - before.length, sourceEndIndex: pos + token.length, value: token, }); pos += 1; code = value.charCodeAt(pos); // Dividers } else if ( code === slash || code === comma || code === colon ) { token = value[pos]; tokens.push({ type: "div", sourceIndex: pos - before.length, sourceEndIndex: pos + token.length, value: token, before: before, after: "", }); before = ""; pos += 1; code = value.charCodeAt(pos); // Open parentheses } else if (openParentheses === code) { // Whitespaces after open parentheses next = pos; do { next += 1; code = value.charCodeAt(next); } while (code <= 32); parenthesesOpenPos = pos; token = { type: "function", sourceIndex: pos - name.length, value: name, before: value.slice(parenthesesOpenPos + 1, next), }; pos = next; if ( name === "url" && code !== singleQuote && code !== doubleQuote ) { next -= 1; do { escape = false; next = value.indexOf(")", next + 1); if (~next) { escapePos = next; while ( value.charCodeAt(escapePos - 1) === backslash ) { escapePos -= 1; escape = !escape; } } else { value += ")"; next = value.length - 1; token.unclosed = true; } } while (escape); // Whitespaces before closed whitespacePos = next; do { whitespacePos -= 1; code = value.charCodeAt(whitespacePos); } while (code <= 32); if (parenthesesOpenPos < whitespacePos) { if (pos !== whitespacePos + 1) { token.nodes = [ { type: "word", sourceIndex: pos, sourceEndIndex: whitespacePos + 1, value: value.slice( pos, whitespacePos + 1 ), }, ]; } else { token.nodes = []; } if ( token.unclosed && whitespacePos + 1 !== next ) { token.after = ""; token.nodes.push({ type: "space", sourceIndex: whitespacePos + 1, sourceEndIndex: next, value: value.slice( whitespacePos + 1, next ), }); } else { token.after = value.slice( whitespacePos + 1, next ); token.sourceEndIndex = next; } } else { token.after = ""; token.nodes = []; } pos = next + 1; token.sourceEndIndex = token.unclosed ? next : pos; code = value.charCodeAt(pos); tokens.push(token); } else { balanced += 1; token.after = ""; token.sourceEndIndex = pos + 1; tokens.push(token); stack.push(token); tokens = token.nodes = []; parent = token; } name = ""; // Close parentheses } else if (closeParentheses === code && balanced) { pos += 1; code = value.charCodeAt(pos); parent.after = after; parent.sourceEndIndex += after.length; after = ""; balanced -= 1; stack[stack.length - 1].sourceEndIndex = pos; stack.pop(); parent = stack[balanced]; tokens = parent.nodes; // Words } else { next = pos; do { if (code === backslash) { next += 1; } next += 1; code = value.charCodeAt(next); } while ( next < max && !( code <= 32 || code === singleQuote || code === doubleQuote || code === comma || code === colon || code === slash || code === openParentheses || (code === star && parent && parent.type === "function" && parent.value === "calc") || (code === slash && parent.type === "function" && parent.value === "calc") || (code === closeParentheses && balanced) ) ); token = value.slice(pos, next); if (openParentheses === code) { name = token; } else if ( (uLower === token.charCodeAt(0) || uUpper === token.charCodeAt(0)) && plus === token.charCodeAt(1) && isUnicodeRange.test(token.slice(2)) ) { tokens.push({ type: "unicode-range", sourceIndex: pos, sourceEndIndex: next, value: token, }); } else { tokens.push({ type: "word", sourceIndex: pos, sourceEndIndex: next, value: token, }); } pos = next; } } for (pos = stack.length - 1; pos; pos -= 1) { stack[pos].unclosed = true; stack[pos].sourceEndIndex = value.length; } return stack[0].nodes; }; /***/ }, /***/ 3433: /***/ function (module) { var minus = "-".charCodeAt(0); var plus = "+".charCodeAt(0); var dot = ".".charCodeAt(0); var exp = "e".charCodeAt(0); var EXP = "E".charCodeAt(0); // Check if three code points would start a number // https://www.w3.org/TR/css-syntax-3/#starts-with-a-number function likeNumber(value) { var code = value.charCodeAt(0); var nextCode; if (code === plus || code === minus) { nextCode = value.charCodeAt(1); if (nextCode >= 48 && nextCode <= 57) { return true; } var nextNextCode = value.charCodeAt(2); if ( nextCode === dot && nextNextCode >= 48 && nextNextCode <= 57 ) { return true; } return false; } if (code === dot) { nextCode = value.charCodeAt(1); if (nextCode >= 48 && nextCode <= 57) { return true; } return false; } if (code >= 48 && code <= 57) { return true; } return false; } // Consume a number // https://www.w3.org/TR/css-syntax-3/#consume-number module.exports = function (value) { var pos = 0; var length = value.length; var code; var nextCode; var nextNextCode; if (length === 0 || !likeNumber(value)) { return false; } code = value.charCodeAt(pos); if (code === plus || code === minus) { pos++; } while (pos < length) { code = value.charCodeAt(pos); if (code < 48 || code > 57) { break; } pos += 1; } code = value.charCodeAt(pos); nextCode = value.charCodeAt(pos + 1); if (code === dot && nextCode >= 48 && nextCode <= 57) { pos += 2; while (pos < length) { code = value.charCodeAt(pos); if (code < 48 || code > 57) { break; } pos += 1; } } code = value.charCodeAt(pos); nextCode = value.charCodeAt(pos + 1); nextNextCode = value.charCodeAt(pos + 2); if ( (code === exp || code === EXP) && ((nextCode >= 48 && nextCode <= 57) || ((nextCode === plus || nextCode === minus) && nextNextCode >= 48 && nextNextCode <= 57)) ) { pos += nextCode === plus || nextCode === minus ? 3 : 2; while (pos < length) { code = value.charCodeAt(pos); if (code < 48 || code > 57) { break; } pos += 1; } } return { number: value.slice(0, pos), unit: value.slice(pos), }; }; /***/ }, /***/ 9189: /***/ function ( module, __unused_webpack_exports, __webpack_require__ ) { var inherits = __webpack_require__(5717); var EventEmitter = __webpack_require__(5293).EventEmitter; module.exports = Queue; module.exports["default"] = Queue; function Queue(options) { if (!(this instanceof Queue)) { return new Queue(options); } EventEmitter.call(this); options = options || {}; this.concurrency = options.concurrency || Infinity; this.timeout = options.timeout || 0; this.autostart = options.autostart || false; this.results = options.results || null; this.pending = 0; this.session = 0; this.running = false; this.jobs = []; this.timers = {}; } inherits(Queue, EventEmitter); var arrayMethods = ["pop", "shift", "indexOf", "lastIndexOf"]; arrayMethods.forEach(function (method) { Queue.prototype[method] = function () { return Array.prototype[method].apply(this.jobs, arguments); }; }); Queue.prototype.slice = function (begin, end) { this.jobs = this.jobs.slice(begin, end); return this; }; Queue.prototype.reverse = function () { this.jobs.reverse(); return this; }; var arrayAddMethods = ["push", "unshift", "splice"]; arrayAddMethods.forEach(function (method) { Queue.prototype[method] = function () { var methodResult = Array.prototype[method].apply( this.jobs, arguments ); if (this.autostart) { this.start(); } return methodResult; }; }); Object.defineProperty(Queue.prototype, "length", { get: function () { return this.pending + this.jobs.length; }, }); Queue.prototype.start = function (cb) { if (cb) { callOnErrorOrEnd.call(this, cb); } this.running = true; if (this.pending >= this.concurrency) { return; } if (this.jobs.length === 0) { if (this.pending === 0) { done.call(this); } return; } var self = this; var job = this.jobs.shift(); var once = true; var session = this.session; var timeoutId = null; var didTimeout = false; var resultIndex = null; var timeout = job.hasOwnProperty("timeout") ? job.timeout : this.timeout; function next(err, result) { if (once && self.session === session) { once = false; self.pending--; if (timeoutId !== null) { delete self.timers[timeoutId]; clearTimeout(timeoutId); } if (err) { self.emit("error", err, job); } else if (didTimeout === false) { if (resultIndex !== null) { self.results[resultIndex] = Array.prototype.slice.call(arguments, 1); } self.emit("success", result, job); } if (self.session === session) { if (self.pending === 0 && self.jobs.length === 0) { done.call(self); } else if (self.running) { self.start(); } } } } if (timeout) { timeoutId = setTimeout(function () { didTimeout = true; if (self.listeners("timeout").length > 0) { self.emit("timeout", next, job); } else { next(); } }, timeout); this.timers[timeoutId] = timeoutId; } if (this.results) { resultIndex = this.results.length; this.results[resultIndex] = null; } this.pending++; self.emit("start", job); var promise = job(next); if ( promise && promise.then && typeof promise.then === "function" ) { promise .then(function (result) { return next(null, result); }) .catch(function (err) { return next(err || true); }); } if (this.running && this.jobs.length > 0) { this.start(); } }; Queue.prototype.stop = function () { this.running = false; }; Queue.prototype.end = function (err) { clearTimers.call(this); this.jobs.length = 0; this.pending = 0; done.call(this, err); }; function clearTimers() { for (var key in this.timers) { var timeoutId = this.timers[key]; delete this.timers[key]; clearTimeout(timeoutId); } } function callOnErrorOrEnd(cb) { var self = this; this.on("error", onerror); this.on("end", onend); function onerror(err) { self.end(err); } function onend(err) { self.removeListener("error", onerror); self.removeListener("end", onend); cb(err, this.results); } } function done(err) { this.session++; this.running = false; this.emit("end", err); } /***/ }, /***/ 7287: /***/ function ( module, __unused_webpack_exports, __webpack_require__ ) { /** @license React v0.23.0 * react-reconciler.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ module.exports = function $$$reconciler($$$hostConfig) { "use strict"; var aa = __webpack_require__(6086), ba = __webpack_require__(7294), m = __webpack_require__(373); function n(a) { for ( var b = "https://reactjs.org/docs/error-decoder.html?invariant=" + a, c = 1; c < arguments.length; c++ ) b += "&args[]=" + encodeURIComponent(arguments[c]); return ( "Minified React error #" + a + "; visit " + b + " for the full message or use the non-minified dev environment for full errors and additional helpful warnings." ); } var q = ba.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED; q.hasOwnProperty("ReactCurrentDispatcher") || (q.ReactCurrentDispatcher = { current: null }); q.hasOwnProperty("ReactCurrentBatchConfig") || (q.ReactCurrentBatchConfig = { suspense: null }); var u = "function" === typeof Symbol && Symbol.for, ca = u ? Symbol.for("react.element") : 60103, da = u ? Symbol.for("react.portal") : 60106, ea = u ? Symbol.for("react.fragment") : 60107, fa = u ? Symbol.for("react.strict_mode") : 60108, ha = u ? Symbol.for("react.profiler") : 60114, ia = u ? Symbol.for("react.provider") : 60109, ja = u ? Symbol.for("react.context") : 60110, ka = u ? Symbol.for("react.concurrent_mode") : 60111, la = u ? Symbol.for("react.forward_ref") : 60112, ma = u ? Symbol.for("react.suspense") : 60113, na = u ? Symbol.for("react.suspense_list") : 60120, oa = u ? Symbol.for("react.memo") : 60115, pa = u ? Symbol.for("react.lazy") : 60116; u && Symbol.for("react.fundamental"); u && Symbol.for("react.responder"); u && Symbol.for("react.scope"); var qa = "function" === typeof Symbol && Symbol.iterator; function ra(a) { if (null === a || "object" !== typeof a) return null; a = (qa && a[qa]) || a["@@iterator"]; return "function" === typeof a ? a : null; } function sa(a) { if (-1 === a._status) { a._status = 0; var b = a._ctor; b = b(); a._result = b; b.then( function (b) { 0 === a._status && ((b = b.default), (a._status = 1), (a._result = b)); }, function (b) { 0 === a._status && ((a._status = 2), (a._result = b)); } ); } } function ta(a) { if (null == a) return null; if ("function" === typeof a) return a.displayName || a.name || null; if ("string" === typeof a) return a; switch (a) { case ea: return "Fragment"; case da: return "Portal"; case ha: return "Profiler"; case fa: return "StrictMode"; case ma: return "Suspense"; case na: return "SuspenseList"; } if ("object" === typeof a) switch (a.$$typeof) { case ja: return "Context.Consumer"; case ia: return "Context.Provider"; case la: var b = a.render; b = b.displayName || b.name || ""; return ( a.displayName || ("" !== b ? "ForwardRef(" + b + ")" : "ForwardRef") ); case oa: return ta(a.type); case pa: if ((a = 1 === a._status ? a._result : null)) return ta(a); } return null; } function ua(a) { var b = a, c = a; if (a.alternate) for (; b.return; ) b = b.return; else { a = b; do (b = a), 0 !== (b.effectTag & 1026) && (c = b.return), (a = b.return); while (a); } return 3 === b.tag ? c : null; } function va(a) { if (ua(a) !== a) throw Error(n(188)); } function wa(a) { var b = a.alternate; if (!b) { b = ua(a); if (null === b) throw Error(n(188)); return b !== a ? null : a; } for (var c = a, d = b; ; ) { var e = c.return; if (null === e) break; var f = e.alternate; if (null === f) { d = e.return; if (null !== d) { c = d; continue; } break; } if (e.child === f.child) { for (f = e.child; f; ) { if (f === c) return va(e), a; if (f === d) return va(e), b; f = f.sibling; } throw Error(n(188)); } if (c.return !== d.return) (c = e), (d = f); else { for (var g = !1, l = e.child; l; ) { if (l === c) { g = !0; c = e; d = f; break; } if (l === d) { g = !0; d = e; c = f; break; } l = l.sibling; } if (!g) { for (l = f.child; l; ) { if (l === c) { g = !0; c = f; d = e; break; } if (l === d) { g = !0; d = f; c = e; break; } l = l.sibling; } if (!g) throw Error(n(189)); } } if (c.alternate !== d) throw Error(n(190)); } if (3 !== c.tag) throw Error(n(188)); return c.stateNode.current === c ? a : b; } function xa(a) { a = wa(a); if (!a) return null; for (var b = a; ; ) { if (5 === b.tag || 6 === b.tag) return b; if (b.child) (b.child.return = b), (b = b.child); else { if (b === a) break; for (; !b.sibling; ) { if (!b.return || b.return === a) return null; b = b.return; } b.sibling.return = b.return; b = b.sibling; } } return null; } function ya(a) { a = wa(a); if (!a) return null; for (var b = a; ; ) { if (5 === b.tag || 6 === b.tag) return b; if (b.child && 4 !== b.tag) (b.child.return = b), (b = b.child); else { if (b === a) break; for (; !b.sibling; ) { if (!b.return || b.return === a) return null; b = b.return; } b.sibling.return = b.return; b = b.sibling; } } return null; } var za = $$$hostConfig.getPublicInstance, Aa = $$$hostConfig.getRootHostContext, Ba = $$$hostConfig.getChildHostContext, Ca = $$$hostConfig.prepareForCommit, Da = $$$hostConfig.resetAfterCommit, Ea = $$$hostConfig.createInstance, Fa = $$$hostConfig.appendInitialChild, Ga = $$$hostConfig.finalizeInitialChildren, Ia = $$$hostConfig.prepareUpdate, Ja = $$$hostConfig.shouldSetTextContent, Ka = $$$hostConfig.shouldDeprioritizeSubtree, La = $$$hostConfig.createTextInstance, Ma = $$$hostConfig.setTimeout, Na = $$$hostConfig.clearTimeout, Oa = $$$hostConfig.noTimeout, Pa = $$$hostConfig.isPrimaryRenderer, Qa = $$$hostConfig.supportsMutation, Ra = $$$hostConfig.supportsPersistence, Sa = $$$hostConfig.supportsHydration, Ta = $$$hostConfig.appendChild, Ua = $$$hostConfig.appendChildToContainer, Va = $$$hostConfig.commitTextUpdate, Wa = $$$hostConfig.commitMount, Xa = $$$hostConfig.commitUpdate, Ya = $$$hostConfig.insertBefore, Za = $$$hostConfig.insertInContainerBefore, $a = $$$hostConfig.removeChild, ab = $$$hostConfig.removeChildFromContainer, bb = $$$hostConfig.resetTextContent, cb = $$$hostConfig.hideInstance, db = $$$hostConfig.hideTextInstance, eb = $$$hostConfig.unhideInstance, fb = $$$hostConfig.unhideTextInstance, gb = $$$hostConfig.cloneInstance, hb = $$$hostConfig.createContainerChildSet, ib = $$$hostConfig.appendChildToContainerChildSet, kb = $$$hostConfig.finalizeContainerChildren, lb = $$$hostConfig.replaceContainerChildren, mb = $$$hostConfig.cloneHiddenInstance, nb = $$$hostConfig.cloneHiddenTextInstance, ob = $$$hostConfig.canHydrateInstance, pb = $$$hostConfig.canHydrateTextInstance, qb = $$$hostConfig.isSuspenseInstancePending, rb = $$$hostConfig.isSuspenseInstanceFallback, sb = $$$hostConfig.getNextHydratableSibling, tb = $$$hostConfig.getFirstHydratableChild, ub = $$$hostConfig.hydrateInstance, vb = $$$hostConfig.hydrateTextInstance, wb = $$$hostConfig.getNextHydratableInstanceAfterSuspenseInstance, xb = $$$hostConfig.commitHydratedContainer, yb = $$$hostConfig.commitHydratedSuspenseInstance, zb = /^(.*)[\\\/]/; function Ab(a) { var b = ""; do { a: switch (a.tag) { case 3: case 4: case 6: case 7: case 10: case 9: var c = ""; break a; default: var d = a._debugOwner, e = a._debugSource, f = ta(a.type); c = null; d && (c = ta(d.type)); d = f; f = ""; e ? (f = " (at " + e.fileName.replace(zb, "") + ":" + e.lineNumber + ")") : c && (f = " (created by " + c + ")"); c = "\n in " + (d || "Unknown") + f; } b += c; a = a.return; } while (a); return b; } new Set(); var Bb = [], Cb = -1; function y(a) { 0 > Cb || ((a.current = Bb[Cb]), (Bb[Cb] = null), Cb--); } function z(a, b) { Cb++; Bb[Cb] = a.current; a.current = b; } var Db = {}, A = { current: Db }, B = { current: !1 }, Eb = Db; function Fb(a, b) { var c = a.type.contextTypes; if (!c) return Db; var d = a.stateNode; if ( d && d.__reactInternalMemoizedUnmaskedChildContext === b ) return d.__reactInternalMemoizedMaskedChildContext; var e = {}, f; for (f in c) e[f] = b[f]; d && ((a = a.stateNode), (a.__reactInternalMemoizedUnmaskedChildContext = b), (a.__reactInternalMemoizedMaskedChildContext = e)); return e; } function C(a) { a = a.childContextTypes; return null !== a && void 0 !== a; } function Gb(a) { y(B, a); y(A, a); } function Hb(a) { y(B, a); y(A, a); } function Ib(a, b, c) { if (A.current !== Db) throw Error(n(168)); z(A, b, a); z(B, c, a); } function Jb(a, b, c) { var d = a.stateNode; a = b.childContextTypes; if ("function" !== typeof d.getChildContext) return c; d = d.getChildContext(); for (var e in d) if (!(e in a)) throw Error(n(108, ta(b) || "Unknown", e)); return aa({}, c, {}, d); } function Kb(a) { var b = a.stateNode; b = (b && b.__reactInternalMemoizedMergedChildContext) || Db; Eb = A.current; z(A, b, a); z(B, B.current, a); return !0; } function Lb(a, b, c) { var d = a.stateNode; if (!d) throw Error(n(169)); c ? ((b = Jb(a, b, Eb)), (d.__reactInternalMemoizedMergedChildContext = b), y(B, a), y(A, a), z(A, b, a)) : y(B, a); z(B, c, a); } var Mb = m.unstable_runWithPriority, Nb = m.unstable_scheduleCallback, Ob = m.unstable_cancelCallback, Pb = m.unstable_shouldYield, Qb = m.unstable_requestPaint, Tb = m.unstable_now, Ub = m.unstable_getCurrentPriorityLevel, Vb = m.unstable_ImmediatePriority, Wb = m.unstable_UserBlockingPriority, Xb = m.unstable_NormalPriority, Yb = m.unstable_LowPriority, Zb = m.unstable_IdlePriority, $b = {}, ac = void 0 !== Qb ? Qb : function () {}, bc = null, cc = null, dc = !1, ec = Tb(), E = 1e4 > ec ? Tb : function () { return Tb() - ec; }; function fc() { switch (Ub()) { case Vb: return 99; case Wb: return 98; case Xb: return 97; case Yb: return 96; case Zb: return 95; default: throw Error(n(332)); } } function gc(a) { switch (a) { case 99: return Vb; case 98: return Wb; case 97: return Xb; case 96: return Yb; case 95: return Zb; default: throw Error(n(332)); } } function hc(a, b) { a = gc(a); return Mb(a, b); } function ic(a, b, c) { a = gc(a); return Nb(a, b, c); } function jc(a) { null === bc ? ((bc = [a]), (cc = Nb(Vb, kc))) : bc.push(a); return $b; } function F() { if (null !== cc) { var a = cc; cc = null; Ob(a); } kc(); } function kc() { if (!dc && null !== bc) { dc = !0; var a = 0; try { var b = bc; hc(99, function () { for (; a < b.length; a++) { var c = b[a]; do c = c(!0); while (null !== c); } }); bc = null; } catch (c) { throw ( (null !== bc && (bc = bc.slice(a + 1)), Nb(Vb, F), c) ); } finally { dc = !1; } } } var lc = 3; function mc(a, b, c) { c /= 10; return ( 1073741821 - ((((1073741821 - a + b / 10) / c) | 0) + 1) * c ); } function nc(a, b) { return ( (a === b && (0 !== a || 1 / a === 1 / b)) || (a !== a && b !== b) ); } var oc = "function" === typeof Object.is ? Object.is : nc, pc = Object.prototype.hasOwnProperty; function qc(a, b) { if (oc(a, b)) return !0; if ( "object" !== typeof a || null === a || "object" !== typeof b || null === b ) return !1; var c = Object.keys(a), d = Object.keys(b); if (c.length !== d.length) return !1; for (d = 0; d < c.length; d++) if (!pc.call(b, c[d]) || !oc(a[c[d]], b[c[d]])) return !1; return !0; } function rc(a, b) { if (a && a.defaultProps) { b = aa({}, b); a = a.defaultProps; for (var c in a) void 0 === b[c] && (b[c] = a[c]); } return b; } var sc = { current: null }, tc = null, uc = null, vc = null; function wc() { vc = uc = tc = null; } function xc(a, b) { var c = a.type._context; Pa ? (z(sc, c._currentValue, a), (c._currentValue = b)) : (z(sc, c._currentValue2, a), (c._currentValue2 = b)); } function yc(a) { var b = sc.current; y(sc, a); a = a.type._context; Pa ? (a._currentValue = b) : (a._currentValue2 = b); } function zc(a, b) { for (; null !== a; ) { var c = a.alternate; if (a.childExpirationTime < b) (a.childExpirationTime = b), null !== c && c.childExpirationTime < b && (c.childExpirationTime = b); else if (null !== c && c.childExpirationTime < b) c.childExpirationTime = b; else break; a = a.return; } } function Ac(a, b) { tc = a; vc = uc = null; a = a.dependencies; null !== a && null !== a.firstContext && (a.expirationTime >= b && (Bc = !0), (a.firstContext = null)); } function Cc(a, b) { if (vc !== a && !1 !== b && 0 !== b) { if ("number" !== typeof b || 1073741823 === b) (vc = a), (b = 1073741823); b = { context: a, observedBits: b, next: null }; if (null === uc) { if (null === tc) throw Error(n(308)); uc = b; tc.dependencies = { expirationTime: 0, firstContext: b, responders: null, }; } else uc = uc.next = b; } return Pa ? a._currentValue : a._currentValue2; } var Dc = !1; function Ec(a) { return { baseState: a, firstUpdate: null, lastUpdate: null, firstCapturedUpdate: null, lastCapturedUpdate: null, firstEffect: null, lastEffect: null, firstCapturedEffect: null, lastCapturedEffect: null, }; } function Fc(a) { return { baseState: a.baseState, firstUpdate: a.firstUpdate, lastUpdate: a.lastUpdate, firstCapturedUpdate: null, lastCapturedUpdate: null, firstEffect: null, lastEffect: null, firstCapturedEffect: null, lastCapturedEffect: null, }; } function Gc(a, b) { return { expirationTime: a, suspenseConfig: b, tag: 0, payload: null, callback: null, next: null, nextEffect: null, }; } function Hc(a, b) { null === a.lastUpdate ? (a.firstUpdate = a.lastUpdate = b) : ((a.lastUpdate.next = b), (a.lastUpdate = b)); } function Ic(a, b) { var c = a.alternate; if (null === c) { var d = a.updateQueue; var e = null; null === d && (d = a.updateQueue = Ec(a.memoizedState)); } else (d = a.updateQueue), (e = c.updateQueue), null === d ? null === e ? ((d = a.updateQueue = Ec(a.memoizedState)), (e = c.updateQueue = Ec(c.memoizedState))) : (d = a.updateQueue = Fc(e)) : null === e && (e = c.updateQueue = Fc(d)); null === e || d === e ? Hc(d, b) : null === d.lastUpdate || null === e.lastUpdate ? (Hc(d, b), Hc(e, b)) : (Hc(d, b), (e.lastUpdate = b)); } function Jc(a, b) { var c = a.updateQueue; c = null === c ? (a.updateQueue = Ec(a.memoizedState)) : Kc(a, c); null === c.lastCapturedUpdate ? (c.firstCapturedUpdate = c.lastCapturedUpdate = b) : ((c.lastCapturedUpdate.next = b), (c.lastCapturedUpdate = b)); } function Kc(a, b) { var c = a.alternate; null !== c && b === c.updateQueue && (b = a.updateQueue = Fc(b)); return b; } function Lc(a, b, c, d, e, f) { switch (c.tag) { case 1: return ( (a = c.payload), "function" === typeof a ? a.call(f, d, e) : a ); case 3: a.effectTag = (a.effectTag & -4097) | 64; case 0: a = c.payload; e = "function" === typeof a ? a.call(f, d, e) : a; if (null === e || void 0 === e) break; return aa({}, d, e); case 2: Dc = !0; } return d; } function Nc(a, b, c, d, e) { Dc = !1; b = Kc(a, b); for ( var f = b.baseState, g = null, l = 0, h = b.firstUpdate, k = f; null !== h; ) { var p = h.expirationTime; p < e ? (null === g && ((g = h), (f = k)), l < p && (l = p)) : (Oc(p, h.suspenseConfig), (k = Lc(a, b, h, k, c, d)), null !== h.callback && ((a.effectTag |= 32), (h.nextEffect = null), null === b.lastEffect ? (b.firstEffect = b.lastEffect = h) : ((b.lastEffect.nextEffect = h), (b.lastEffect = h)))); h = h.next; } p = null; for (h = b.firstCapturedUpdate; null !== h; ) { var D = h.expirationTime; D < e ? (null === p && ((p = h), null === g && (f = k)), l < D && (l = D)) : ((k = Lc(a, b, h, k, c, d)), null !== h.callback && ((a.effectTag |= 32), (h.nextEffect = null), null === b.lastCapturedEffect ? (b.firstCapturedEffect = b.lastCapturedEffect = h) : ((b.lastCapturedEffect.nextEffect = h), (b.lastCapturedEffect = h)))); h = h.next; } null === g && (b.lastUpdate = null); null === p ? (b.lastCapturedUpdate = null) : (a.effectTag |= 32); null === g && null === p && (f = k); b.baseState = f; b.firstUpdate = g; b.firstCapturedUpdate = p; Pc(l); a.expirationTime = l; a.memoizedState = k; } function Qc(a, b, c) { null !== b.firstCapturedUpdate && (null !== b.lastUpdate && ((b.lastUpdate.next = b.firstCapturedUpdate), (b.lastUpdate = b.lastCapturedUpdate)), (b.firstCapturedUpdate = b.lastCapturedUpdate = null)); Rc(b.firstEffect, c); b.firstEffect = b.lastEffect = null; Rc(b.firstCapturedEffect, c); b.firstCapturedEffect = b.lastCapturedEffect = null; } function Rc(a, b) { for (; null !== a; ) { var c = a.callback; if (null !== c) { a.callback = null; var d = b; if ("function" !== typeof c) throw Error(n(191, c)); c.call(d); } a = a.nextEffect; } } var Sc = q.ReactCurrentBatchConfig, Tc = new ba.Component().refs; function Uc(a, b, c, d) { b = a.memoizedState; c = c(d, b); c = null === c || void 0 === c ? b : aa({}, b, c); a.memoizedState = c; d = a.updateQueue; null !== d && 0 === a.expirationTime && (d.baseState = c); } var Xc = { isMounted: function (a) { return (a = a._reactInternalFiber) ? ua(a) === a : !1; }, enqueueSetState: function (a, b, c) { a = a._reactInternalFiber; var d = G(), e = Sc.suspense; d = Vc(d, a, e); e = Gc(d, e); e.payload = b; void 0 !== c && null !== c && (e.callback = c); Ic(a, e); Wc(a, d); }, enqueueReplaceState: function (a, b, c) { a = a._reactInternalFiber; var d = G(), e = Sc.suspense; d = Vc(d, a, e); e = Gc(d, e); e.tag = 1; e.payload = b; void 0 !== c && null !== c && (e.callback = c); Ic(a, e); Wc(a, d); }, enqueueForceUpdate: function (a, b) { a = a._reactInternalFiber; var c = G(), d = Sc.suspense; c = Vc(c, a, d); d = Gc(c, d); d.tag = 2; void 0 !== b && null !== b && (d.callback = b); Ic(a, d); Wc(a, c); }, }; function Yc(a, b, c, d, e, f, g) { a = a.stateNode; return "function" === typeof a.shouldComponentUpdate ? a.shouldComponentUpdate(d, f, g) : b.prototype && b.prototype.isPureReactComponent ? !qc(c, d) || !qc(e, f) : !0; } function Zc(a, b, c) { var d = !1, e = Db; var f = b.contextType; "object" === typeof f && null !== f ? (f = Cc(f)) : ((e = C(b) ? Eb : A.current), (d = b.contextTypes), (f = (d = null !== d && void 0 !== d) ? Fb(a, e) : Db)); b = new b(c, f); a.memoizedState = null !== b.state && void 0 !== b.state ? b.state : null; b.updater = Xc; a.stateNode = b; b._reactInternalFiber = a; d && ((a = a.stateNode), (a.__reactInternalMemoizedUnmaskedChildContext = e), (a.__reactInternalMemoizedMaskedChildContext = f)); return b; } function $c(a, b, c, d) { a = b.state; "function" === typeof b.componentWillReceiveProps && b.componentWillReceiveProps(c, d); "function" === typeof b.UNSAFE_componentWillReceiveProps && b.UNSAFE_componentWillReceiveProps(c, d); b.state !== a && Xc.enqueueReplaceState(b, b.state, null); } function ad(a, b, c, d) { var e = a.stateNode; e.props = c; e.state = a.memoizedState; e.refs = Tc; var f = b.contextType; "object" === typeof f && null !== f ? (e.context = Cc(f)) : ((f = C(b) ? Eb : A.current), (e.context = Fb(a, f))); f = a.updateQueue; null !== f && (Nc(a, f, c, e, d), (e.state = a.memoizedState)); f = b.getDerivedStateFromProps; "function" === typeof f && (Uc(a, b, f, c), (e.state = a.memoizedState)); "function" === typeof b.getDerivedStateFromProps || "function" === typeof e.getSnapshotBeforeUpdate || ("function" !== typeof e.UNSAFE_componentWillMount && "function" !== typeof e.componentWillMount) || ((b = e.state), "function" === typeof e.componentWillMount && e.componentWillMount(), "function" === typeof e.UNSAFE_componentWillMount && e.UNSAFE_componentWillMount(), b !== e.state && Xc.enqueueReplaceState(e, e.state, null), (f = a.updateQueue), null !== f && (Nc(a, f, c, e, d), (e.state = a.memoizedState))); "function" === typeof e.componentDidMount && (a.effectTag |= 4); } var bd = Array.isArray; function cd(a, b, c) { a = c.ref; if ( null !== a && "function" !== typeof a && "object" !== typeof a ) { if (c._owner) { c = c._owner; if (c) { if (1 !== c.tag) throw Error(n(309)); var d = c.stateNode; } if (!d) throw Error(n(147, a)); var e = "" + a; if ( null !== b && null !== b.ref && "function" === typeof b.ref && b.ref._stringRef === e ) return b.ref; b = function (b) { var a = d.refs; a === Tc && (a = d.refs = {}); null === b ? delete a[e] : (a[e] = b); }; b._stringRef = e; return b; } if ("string" !== typeof a) throw Error(n(284)); if (!c._owner) throw Error(n(290, a)); } return a; } function dd(a, b) { if ("textarea" !== a.type) throw Error( n( 31, "[object Object]" === Object.prototype.toString.call(b) ? "object with keys {" + Object.keys(b).join(", ") + "}" : b, "" ) ); } function ed(a) { function b(b, c) { if (a) { var d = b.lastEffect; null !== d ? ((d.nextEffect = c), (b.lastEffect = c)) : (b.firstEffect = b.lastEffect = c); c.nextEffect = null; c.effectTag = 8; } } function c(c, d) { if (!a) return null; for (; null !== d; ) b(c, d), (d = d.sibling); return null; } function d(b, a) { for (b = new Map(); null !== a; ) null !== a.key ? b.set(a.key, a) : b.set(a.index, a), (a = a.sibling); return b; } function e(b, a, c) { b = fd(b, a, c); b.index = 0; b.sibling = null; return b; } function f(b, c, d) { b.index = d; if (!a) return c; d = b.alternate; if (null !== d) return ( (d = d.index), d < c ? ((b.effectTag = 2), c) : d ); b.effectTag = 2; return c; } function g(b) { a && null === b.alternate && (b.effectTag = 2); return b; } function l(b, a, c, d) { if (null === a || 6 !== a.tag) return (a = gd(c, b.mode, d)), (a.return = b), a; a = e(a, c, d); a.return = b; return a; } function h(b, a, c, d) { if (null !== a && a.elementType === c.type) return ( (d = e(a, c.props, d)), (d.ref = cd(b, a, c)), (d.return = b), d ); d = hd(c.type, c.key, c.props, null, b.mode, d); d.ref = cd(b, a, c); d.return = b; return d; } function k(b, a, c, d) { if ( null === a || 4 !== a.tag || a.stateNode.containerInfo !== c.containerInfo || a.stateNode.implementation !== c.implementation ) return (a = id(c, b.mode, d)), (a.return = b), a; a = e(a, c.children || [], d); a.return = b; return a; } function p(b, a, c, d, f) { if (null === a || 7 !== a.tag) return (a = jd(c, b.mode, d, f)), (a.return = b), a; a = e(a, c, d); a.return = b; return a; } function D(b, a, c) { if ("string" === typeof a || "number" === typeof a) return ( (a = gd("" + a, b.mode, c)), (a.return = b), a ); if ("object" === typeof a && null !== a) { switch (a.$$typeof) { case ca: return ( (c = hd( a.type, a.key, a.props, null, b.mode, c )), (c.ref = cd(b, null, a)), (c.return = b), c ); case da: return ( (a = id(a, b.mode, c)), (a.return = b), a ); } if (bd(a) || ra(a)) return ( (a = jd(a, b.mode, c, null)), (a.return = b), a ); dd(b, a); } return null; } function x(b, a, c, d) { var e = null !== a ? a.key : null; if ("string" === typeof c || "number" === typeof c) return null !== e ? null : l(b, a, "" + c, d); if ("object" === typeof c && null !== c) { switch (c.$$typeof) { case ca: return c.key === e ? c.type === ea ? p(b, a, c.props.children, d, e) : h(b, a, c, d) : null; case da: return c.key === e ? k(b, a, c, d) : null; } if (bd(c) || ra(c)) return null !== e ? null : p(b, a, c, d, null); dd(b, c); } return null; } function K(b, a, c, d, e) { if ("string" === typeof d || "number" === typeof d) return (b = b.get(c) || null), l(a, b, "" + d, e); if ("object" === typeof d && null !== d) { switch (d.$$typeof) { case ca: return ( (b = b.get(null === d.key ? c : d.key) || null), d.type === ea ? p( a, b, d.props.children, e, d.key ) : h(a, b, d, e) ); case da: return ( (b = b.get(null === d.key ? c : d.key) || null), k(a, b, d, e) ); } if (bd(d) || ra(d)) return ( (b = b.get(c) || null), p(a, b, d, e, null) ); dd(a, d); } return null; } function Ha(e, g, h, l) { for ( var k = null, w = null, t = g, r = (g = 0), p = null; null !== t && r < h.length; r++ ) { t.index > r ? ((p = t), (t = null)) : (p = t.sibling); var v = x(e, t, h[r], l); if (null === v) { null === t && (t = p); break; } a && t && null === v.alternate && b(e, t); g = f(v, g, r); null === w ? (k = v) : (w.sibling = v); w = v; t = p; } if (r === h.length) return c(e, t), k; if (null === t) { for (; r < h.length; r++) (t = D(e, h[r], l)), null !== t && ((g = f(t, g, r)), null === w ? (k = t) : (w.sibling = t), (w = t)); return k; } for (t = d(e, t); r < h.length; r++) (p = K(t, e, r, h[r], l)), null !== p && (a && null !== p.alternate && t.delete(null === p.key ? r : p.key), (g = f(p, g, r)), null === w ? (k = p) : (w.sibling = p), (w = p)); a && t.forEach(function (a) { return b(e, a); }); return k; } function O(e, g, h, l) { var k = ra(h); if ("function" !== typeof k) throw Error(n(150)); h = k.call(h); if (null == h) throw Error(n(151)); for ( var t = (k = null), r = g, w = (g = 0), p = null, v = h.next(); null !== r && !v.done; w++, v = h.next() ) { r.index > w ? ((p = r), (r = null)) : (p = r.sibling); var N = x(e, r, v.value, l); if (null === N) { null === r && (r = p); break; } a && r && null === N.alternate && b(e, r); g = f(N, g, w); null === t ? (k = N) : (t.sibling = N); t = N; r = p; } if (v.done) return c(e, r), k; if (null === r) { for (; !v.done; w++, v = h.next()) (v = D(e, v.value, l)), null !== v && ((g = f(v, g, w)), null === t ? (k = v) : (t.sibling = v), (t = v)); return k; } for (r = d(e, r); !v.done; w++, v = h.next()) (v = K(r, e, w, v.value, l)), null !== v && (a && null !== v.alternate && r.delete(null === v.key ? w : v.key), (g = f(v, g, w)), null === t ? (k = v) : (t.sibling = v), (t = v)); a && r.forEach(function (a) { return b(e, a); }); return k; } return function (a, d, f, h) { var k = "object" === typeof f && null !== f && f.type === ea && null === f.key; k && (f = f.props.children); var l = "object" === typeof f && null !== f; if (l) switch (f.$$typeof) { case ca: a: { l = f.key; for (k = d; null !== k; ) { if (k.key === l) if ( 7 === k.tag ? f.type === ea : k.elementType === f.type ) { c(a, k.sibling); d = e( k, f.type === ea ? f.props.children : f.props, h ); d.ref = cd(a, k, f); d.return = a; a = d; break a; } else { c(a, k); break; } else b(a, k); k = k.sibling; } f.type === ea ? ((d = jd( f.props.children, a.mode, h, f.key )), (d.return = a), (a = d)) : ((h = hd( f.type, f.key, f.props, null, a.mode, h )), (h.ref = cd(a, d, f)), (h.return = a), (a = h)); } return g(a); case da: a: { for (k = f.key; null !== d; ) { if (d.key === k) if ( 4 === d.tag && d.stateNode .containerInfo === f.containerInfo && d.stateNode .implementation === f.implementation ) { c(a, d.sibling); d = e( d, f.children || [], h ); d.return = a; a = d; break a; } else { c(a, d); break; } else b(a, d); d = d.sibling; } d = id(f, a.mode, h); d.return = a; a = d; } return g(a); } if ("string" === typeof f || "number" === typeof f) return ( (f = "" + f), null !== d && 6 === d.tag ? (c(a, d.sibling), (d = e(d, f, h)), (d.return = a), (a = d)) : (c(a, d), (d = gd(f, a.mode, h)), (d.return = a), (a = d)), g(a) ); if (bd(f)) return Ha(a, d, f, h); if (ra(f)) return O(a, d, f, h); l && dd(a, f); if ("undefined" === typeof f && !k) switch (a.tag) { case 1: case 0: throw ( ((a = a.type), Error( n( 152, a.displayName || a.name || "Component" ) )) ); } return c(a, d); }; } var kd = ed(!0), ld = ed(!1), md = {}, H = { current: md }, nd = { current: md }, od = { current: md }; function pd(a) { if (a === md) throw Error(n(174)); return a; } function qd(a, b) { z(od, b, a); z(nd, a, a); z(H, md, a); b = Aa(b); y(H, a); z(H, b, a); } function rd(a) { y(H, a); y(nd, a); y(od, a); } function sd(a) { var b = pd(od.current), c = pd(H.current); b = Ba(c, a.type, b); c !== b && (z(nd, a, a), z(H, b, a)); } function td(a) { nd.current === a && (y(H, a), y(nd, a)); } var I = { current: 0 }; function ud(a) { for (var b = a; null !== b; ) { if (13 === b.tag) { var c = b.memoizedState; if ( null !== c && ((c = c.dehydrated), null === c || qb(c) || rb(c)) ) return b; } else if ( 19 === b.tag && void 0 !== b.memoizedProps.revealOrder ) { if (0 !== (b.effectTag & 64)) return b; } else if (null !== b.child) { b.child.return = b; b = b.child; continue; } if (b === a) break; for (; null === b.sibling; ) { if (null === b.return || b.return === a) return null; b = b.return; } b.sibling.return = b.return; b = b.sibling; } return null; } function vd(a, b) { return { responder: a, props: b }; } var wd = q.ReactCurrentDispatcher, J = q.ReactCurrentBatchConfig, xd = 0, yd = null, L = null, zd = null, Ad = null, M = null, Bd = null, Cd = 0, Dd = null, Ed = 0, Fd = !1, Gd = null, Hd = 0; function P() { throw Error(n(321)); } function Id(a, b) { if (null === b) return !1; for (var c = 0; c < b.length && c < a.length; c++) if (!oc(a[c], b[c])) return !1; return !0; } function Jd(a, b, c, d, e, f) { xd = f; yd = b; zd = null !== a ? a.memoizedState : null; wd.current = null === zd ? Kd : Ld; b = c(d, e); if (Fd) { do (Fd = !1), (Hd += 1), (zd = null !== a ? a.memoizedState : null), (Bd = Ad), (Dd = M = L = null), (wd.current = Ld), (b = c(d, e)); while (Fd); Gd = null; Hd = 0; } wd.current = Md; a = yd; a.memoizedState = Ad; a.expirationTime = Cd; a.updateQueue = Dd; a.effectTag |= Ed; a = null !== L && null !== L.next; xd = 0; Bd = M = Ad = zd = L = yd = null; Cd = 0; Dd = null; Ed = 0; if (a) throw Error(n(300)); return b; } function Nd() { wd.current = Md; xd = 0; Bd = M = Ad = zd = L = yd = null; Cd = 0; Dd = null; Ed = 0; Fd = !1; Gd = null; Hd = 0; } function Od() { var a = { memoizedState: null, baseState: null, queue: null, baseUpdate: null, next: null, }; null === M ? (Ad = M = a) : (M = M.next = a); return M; } function Pd() { if (null !== Bd) (M = Bd), (Bd = M.next), (L = zd), (zd = null !== L ? L.next : null); else { if (null === zd) throw Error(n(310)); L = zd; var a = { memoizedState: L.memoizedState, baseState: L.baseState, queue: L.queue, baseUpdate: L.baseUpdate, next: null, }; M = null === M ? (Ad = a) : (M.next = a); zd = L.next; } return M; } function Qd(a, b) { return "function" === typeof b ? b(a) : b; } function Rd(a) { var b = Pd(), c = b.queue; if (null === c) throw Error(n(311)); c.lastRenderedReducer = a; if (0 < Hd) { var d = c.dispatch; if (null !== Gd) { var e = Gd.get(c); if (void 0 !== e) { Gd.delete(c); var f = b.memoizedState; do (f = a(f, e.action)), (e = e.next); while (null !== e); oc(f, b.memoizedState) || (Bc = !0); b.memoizedState = f; b.baseUpdate === c.last && (b.baseState = f); c.lastRenderedState = f; return [f, d]; } } return [b.memoizedState, d]; } d = c.last; var g = b.baseUpdate; f = b.baseState; null !== g ? (null !== d && (d.next = null), (d = g.next)) : (d = null !== d ? d.next : null); if (null !== d) { var l = (e = null), h = d, k = !1; do { var p = h.expirationTime; p < xd ? (k || ((k = !0), (l = g), (e = f)), p > Cd && ((Cd = p), Pc(Cd))) : (Oc(p, h.suspenseConfig), (f = h.eagerReducer === a ? h.eagerState : a(f, h.action))); g = h; h = h.next; } while (null !== h && h !== d); k || ((l = g), (e = f)); oc(f, b.memoizedState) || (Bc = !0); b.memoizedState = f; b.baseUpdate = l; b.baseState = e; c.lastRenderedState = f; } return [b.memoizedState, c.dispatch]; } function Sd(a) { var b = Od(); "function" === typeof a && (a = a()); b.memoizedState = b.baseState = a; a = b.queue = { last: null, dispatch: null, lastRenderedReducer: Qd, lastRenderedState: a, }; a = a.dispatch = Td.bind(null, yd, a); return [b.memoizedState, a]; } function Ud(a) { return Rd(Qd, a); } function Vd(a, b, c, d) { a = { tag: a, create: b, destroy: c, deps: d, next: null }; null === Dd ? ((Dd = { lastEffect: null }), (Dd.lastEffect = a.next = a)) : ((b = Dd.lastEffect), null === b ? (Dd.lastEffect = a.next = a) : ((c = b.next), (b.next = a), (a.next = c), (Dd.lastEffect = a))); return a; } function Wd(a, b, c, d) { var e = Od(); Ed |= a; e.memoizedState = Vd(b, c, void 0, void 0 === d ? null : d); } function Xd(a, b, c, d) { var e = Pd(); d = void 0 === d ? null : d; var f = void 0; if (null !== L) { var g = L.memoizedState; f = g.destroy; if (null !== d && Id(d, g.deps)) { Vd(0, c, f, d); return; } } Ed |= a; e.memoizedState = Vd(b, c, f, d); } function Yd(a, b) { return Wd(516, 192, a, b); } function Zd(a, b) { return Xd(516, 192, a, b); } function $d(a, b) { if ("function" === typeof b) return ( (a = a()), b(a), function () { b(null); } ); if (null !== b && void 0 !== b) return ( (a = a()), (b.current = a), function () { b.current = null; } ); } function ae() {} function be(a, b) { Od().memoizedState = [a, void 0 === b ? null : b]; return a; } function ce(a, b) { var c = Pd(); b = void 0 === b ? null : b; var d = c.memoizedState; if (null !== d && null !== b && Id(b, d[1])) return d[0]; c.memoizedState = [a, b]; return a; } function Td(a, b, c) { if (!(25 > Hd)) throw Error(n(301)); var d = a.alternate; if (a === yd || (null !== d && d === yd)) if ( ((Fd = !0), (a = { expirationTime: xd, suspenseConfig: null, action: c, eagerReducer: null, eagerState: null, next: null, }), null === Gd && (Gd = new Map()), (c = Gd.get(b)), void 0 === c) ) Gd.set(b, a); else { for (b = c; null !== b.next; ) b = b.next; b.next = a; } else { var e = G(), f = Sc.suspense; e = Vc(e, a, f); f = { expirationTime: e, suspenseConfig: f, action: c, eagerReducer: null, eagerState: null, next: null, }; var g = b.last; if (null === g) f.next = f; else { var l = g.next; null !== l && (f.next = l); g.next = f; } b.last = f; if ( 0 === a.expirationTime && (null === d || 0 === d.expirationTime) && ((d = b.lastRenderedReducer), null !== d) ) try { var h = b.lastRenderedState, k = d(h, c); f.eagerReducer = d; f.eagerState = k; if (oc(k, h)) return; } catch (p) { } finally { } Wc(a, e); } } var Md = { readContext: Cc, useCallback: P, useContext: P, useEffect: P, useImperativeHandle: P, useLayoutEffect: P, useMemo: P, useReducer: P, useRef: P, useState: P, useDebugValue: P, useResponder: P, useDeferredValue: P, useTransition: P, }, Kd = { readContext: Cc, useCallback: be, useContext: Cc, useEffect: Yd, useImperativeHandle: function (a, b, c) { c = null !== c && void 0 !== c ? c.concat([a]) : null; return Wd(4, 36, $d.bind(null, b, a), c); }, useLayoutEffect: function (a, b) { return Wd(4, 36, a, b); }, useMemo: function (a, b) { var c = Od(); b = void 0 === b ? null : b; a = a(); c.memoizedState = [a, b]; return a; }, useReducer: function (a, b, c) { var d = Od(); b = void 0 !== c ? c(b) : b; d.memoizedState = d.baseState = b; a = d.queue = { last: null, dispatch: null, lastRenderedReducer: a, lastRenderedState: b, }; a = a.dispatch = Td.bind(null, yd, a); return [d.memoizedState, a]; }, useRef: function (a) { var b = Od(); a = { current: a }; return (b.memoizedState = a); }, useState: Sd, useDebugValue: ae, useResponder: vd, useDeferredValue: function (a, b) { var c = Sd(a), d = c[0], e = c[1]; Yd( function () { m.unstable_next(function () { var c = J.suspense; J.suspense = void 0 === b ? null : b; try { e(a); } finally { J.suspense = c; } }); }, [a, b] ); return d; }, useTransition: function (a) { var b = Sd(!1), c = b[0], d = b[1]; return [ be( function (b) { d(!0); m.unstable_next(function () { var c = J.suspense; J.suspense = void 0 === a ? null : a; try { d(!1), b(); } finally { J.suspense = c; } }); }, [a, c] ), c, ]; }, }, Ld = { readContext: Cc, useCallback: ce, useContext: Cc, useEffect: Zd, useImperativeHandle: function (a, b, c) { c = null !== c && void 0 !== c ? c.concat([a]) : null; return Xd(4, 36, $d.bind(null, b, a), c); }, useLayoutEffect: function (a, b) { return Xd(4, 36, a, b); }, useMemo: function (a, b) { var c = Pd(); b = void 0 === b ? null : b; var d = c.memoizedState; if (null !== d && null !== b && Id(b, d[1])) return d[0]; a = a(); c.memoizedState = [a, b]; return a; }, useReducer: Rd, useRef: function () { return Pd().memoizedState; }, useState: Ud, useDebugValue: ae, useResponder: vd, useDeferredValue: function (a, b) { var c = Ud(a), d = c[0], e = c[1]; Zd( function () { m.unstable_next(function () { var c = J.suspense; J.suspense = void 0 === b ? null : b; try { e(a); } finally { J.suspense = c; } }); }, [a, b] ); return d; }, useTransition: function (a) { var b = Ud(!1), c = b[0], d = b[1]; return [ ce( function (b) { d(!0); m.unstable_next(function () { var c = J.suspense; J.suspense = void 0 === a ? null : a; try { d(!1), b(); } finally { J.suspense = c; } }); }, [a, c] ), c, ]; }, }, de = null, ee = null, fe = !1; function ge(a, b) { var c = he(5, null, null, 0); c.elementType = "DELETED"; c.type = "DELETED"; c.stateNode = b; c.return = a; c.effectTag = 8; null !== a.lastEffect ? ((a.lastEffect.nextEffect = c), (a.lastEffect = c)) : (a.firstEffect = a.lastEffect = c); } function ie(a, b) { switch (a.tag) { case 5: return ( (b = ob(b, a.type, a.pendingProps)), null !== b ? ((a.stateNode = b), !0) : !1 ); case 6: return ( (b = pb(b, a.pendingProps)), null !== b ? ((a.stateNode = b), !0) : !1 ); case 13: return !1; default: return !1; } } function je(a) { if (fe) { var b = ee; if (b) { var c = b; if (!ie(a, b)) { b = sb(c); if (!b || !ie(a, b)) { a.effectTag = (a.effectTag & -1025) | 2; fe = !1; de = a; return; } ge(de, c); } de = a; ee = tb(b); } else (a.effectTag = (a.effectTag & -1025) | 2), (fe = !1), (de = a); } } function ke(a) { for ( a = a.return; null !== a && 5 !== a.tag && 3 !== a.tag && 13 !== a.tag; ) a = a.return; de = a; } function ne(a) { if (!Sa || a !== de) return !1; if (!fe) return ke(a), (fe = !0), !1; var b = a.type; if ( 5 !== a.tag || ("head" !== b && "body" !== b && !Ja(b, a.memoizedProps)) ) for (b = ee; b; ) ge(a, b), (b = sb(b)); ke(a); if (13 === a.tag) { if (!Sa) throw Error(n(316)); a = a.memoizedState; a = null !== a ? a.dehydrated : null; if (!a) throw Error(n(317)); ee = wb(a); } else ee = de ? sb(a.stateNode) : null; return !0; } function oe() { Sa && ((ee = de = null), (fe = !1)); } var pe = q.ReactCurrentOwner, Bc = !1; function Q(a, b, c, d) { b.child = null === a ? ld(b, null, c, d) : kd(b, a.child, c, d); } function qe(a, b, c, d, e) { c = c.render; var f = b.ref; Ac(b, e); d = Jd(a, b, c, d, f, e); if (null !== a && !Bc) return ( (b.updateQueue = a.updateQueue), (b.effectTag &= -517), a.expirationTime <= e && (a.expirationTime = 0), re(a, b, e) ); b.effectTag |= 1; Q(a, b, d, e); return b.child; } function se(a, b, c, d, e, f) { if (null === a) { var g = c.type; if ( "function" === typeof g && !te(g) && void 0 === g.defaultProps && null === c.compare && void 0 === c.defaultProps ) return ( (b.tag = 15), (b.type = g), ue(a, b, g, d, e, f) ); a = hd(c.type, null, d, null, b.mode, f); a.ref = b.ref; a.return = b; return (b.child = a); } g = a.child; if ( e < f && ((e = g.memoizedProps), (c = c.compare), (c = null !== c ? c : qc), c(e, d) && a.ref === b.ref) ) return re(a, b, f); b.effectTag |= 1; a = fd(g, d, f); a.ref = b.ref; a.return = b; return (b.child = a); } function ue(a, b, c, d, e, f) { return null !== a && qc(a.memoizedProps, d) && a.ref === b.ref && ((Bc = !1), e < f) ? re(a, b, f) : ve(a, b, c, d, f); } function we(a, b) { var c = b.ref; if ( (null === a && null !== c) || (null !== a && a.ref !== c) ) b.effectTag |= 128; } function ve(a, b, c, d, e) { var f = C(c) ? Eb : A.current; f = Fb(b, f); Ac(b, e); c = Jd(a, b, c, d, f, e); if (null !== a && !Bc) return ( (b.updateQueue = a.updateQueue), (b.effectTag &= -517), a.expirationTime <= e && (a.expirationTime = 0), re(a, b, e) ); b.effectTag |= 1; Q(a, b, c, e); return b.child; } function xe(a, b, c, d, e) { if (C(c)) { var f = !0; Kb(b); } else f = !1; Ac(b, e); if (null === b.stateNode) null !== a && ((a.alternate = null), (b.alternate = null), (b.effectTag |= 2)), Zc(b, c, d, e), ad(b, c, d, e), (d = !0); else if (null === a) { var g = b.stateNode, l = b.memoizedProps; g.props = l; var h = g.context, k = c.contextType; "object" === typeof k && null !== k ? (k = Cc(k)) : ((k = C(c) ? Eb : A.current), (k = Fb(b, k))); var p = c.getDerivedStateFromProps, D = "function" === typeof p || "function" === typeof g.getSnapshotBeforeUpdate; D || ("function" !== typeof g.UNSAFE_componentWillReceiveProps && "function" !== typeof g.componentWillReceiveProps) || ((l !== d || h !== k) && $c(b, g, d, k)); Dc = !1; var x = b.memoizedState; h = g.state = x; var K = b.updateQueue; null !== K && (Nc(b, K, d, g, e), (h = b.memoizedState)); l !== d || x !== h || B.current || Dc ? ("function" === typeof p && (Uc(b, c, p, d), (h = b.memoizedState)), (l = Dc || Yc(b, c, l, d, x, h, k)) ? (D || ("function" !== typeof g.UNSAFE_componentWillMount && "function" !== typeof g.componentWillMount) || ("function" === typeof g.componentWillMount && g.componentWillMount(), "function" === typeof g.UNSAFE_componentWillMount && g.UNSAFE_componentWillMount()), "function" === typeof g.componentDidMount && (b.effectTag |= 4)) : ("function" === typeof g.componentDidMount && (b.effectTag |= 4), (b.memoizedProps = d), (b.memoizedState = h)), (g.props = d), (g.state = h), (g.context = k), (d = l)) : ("function" === typeof g.componentDidMount && (b.effectTag |= 4), (d = !1)); } else (g = b.stateNode), (l = b.memoizedProps), (g.props = b.type === b.elementType ? l : rc(b.type, l)), (h = g.context), (k = c.contextType), "object" === typeof k && null !== k ? (k = Cc(k)) : ((k = C(c) ? Eb : A.current), (k = Fb(b, k))), (p = c.getDerivedStateFromProps), (D = "function" === typeof p || "function" === typeof g.getSnapshotBeforeUpdate) || ("function" !== typeof g.UNSAFE_componentWillReceiveProps && "function" !== typeof g.componentWillReceiveProps) || ((l !== d || h !== k) && $c(b, g, d, k)), (Dc = !1), (h = b.memoizedState), (x = g.state = h), (K = b.updateQueue), null !== K && (Nc(b, K, d, g, e), (x = b.memoizedState)), l !== d || h !== x || B.current || Dc ? ("function" === typeof p && (Uc(b, c, p, d), (x = b.memoizedState)), (p = Dc || Yc(b, c, l, d, h, x, k)) ? (D || ("function" !== typeof g.UNSAFE_componentWillUpdate && "function" !== typeof g.componentWillUpdate) || ("function" === typeof g.componentWillUpdate && g.componentWillUpdate(d, x, k), "function" === typeof g.UNSAFE_componentWillUpdate && g.UNSAFE_componentWillUpdate( d, x, k )), "function" === typeof g.componentDidUpdate && (b.effectTag |= 4), "function" === typeof g.getSnapshotBeforeUpdate && (b.effectTag |= 256)) : ("function" !== typeof g.componentDidUpdate || (l === a.memoizedProps && h === a.memoizedState) || (b.effectTag |= 4), "function" !== typeof g.getSnapshotBeforeUpdate || (l === a.memoizedProps && h === a.memoizedState) || (b.effectTag |= 256), (b.memoizedProps = d), (b.memoizedState = x)), (g.props = d), (g.state = x), (g.context = k), (d = p)) : ("function" !== typeof g.componentDidUpdate || (l === a.memoizedProps && h === a.memoizedState) || (b.effectTag |= 4), "function" !== typeof g.getSnapshotBeforeUpdate || (l === a.memoizedProps && h === a.memoizedState) || (b.effectTag |= 256), (d = !1)); return ye(a, b, c, d, f, e); } function ye(a, b, c, d, e, f) { we(a, b); var g = 0 !== (b.effectTag & 64); if (!d && !g) return e && Lb(b, c, !1), re(a, b, f); d = b.stateNode; pe.current = b; var l = g && "function" !== typeof c.getDerivedStateFromError ? null : d.render(); b.effectTag |= 1; null !== a && g ? ((b.child = kd(b, a.child, null, f)), (b.child = kd(b, null, l, f))) : Q(a, b, l, f); b.memoizedState = d.state; e && Lb(b, c, !0); return b.child; } function ze(a) { var b = a.stateNode; b.pendingContext ? Ib( a, b.pendingContext, b.pendingContext !== b.context ) : b.context && Ib(a, b.context, !1); qd(a, b.containerInfo); } var Ae = { dehydrated: null, retryTime: 0 }; function Be(a, b, c) { var d = b.mode, e = b.pendingProps, f = I.current, g = !1, l; (l = 0 !== (b.effectTag & 64)) || (l = 0 !== (f & 2) && (null === a || null !== a.memoizedState)); l ? ((g = !0), (b.effectTag &= -65)) : (null !== a && null === a.memoizedState) || void 0 === e.fallback || !0 === e.unstable_avoidThisFallback || (f |= 1); z(I, f & 1, b); if (null === a) { void 0 !== e.fallback && je(b); if (g) { g = e.fallback; e = jd(null, d, 0, null); e.return = b; if (0 === (b.mode & 2)) for ( a = null !== b.memoizedState ? b.child.child : b.child, e.child = a; null !== a; ) (a.return = e), (a = a.sibling); c = jd(g, d, c, null); c.return = b; e.sibling = c; b.memoizedState = Ae; b.child = e; return c; } d = e.children; b.memoizedState = null; return (b.child = ld(b, null, d, c)); } if (null !== a.memoizedState) { a = a.child; d = a.sibling; if (g) { e = e.fallback; c = fd(a, a.pendingProps, 0); c.return = b; if ( 0 === (b.mode & 2) && ((g = null !== b.memoizedState ? b.child.child : b.child), g !== a.child) ) for (c.child = g; null !== g; ) (g.return = c), (g = g.sibling); d = fd(d, e, d.expirationTime); d.return = b; c.sibling = d; c.childExpirationTime = 0; b.memoizedState = Ae; b.child = c; return d; } c = kd(b, a.child, e.children, c); b.memoizedState = null; return (b.child = c); } a = a.child; if (g) { g = e.fallback; e = jd(null, d, 0, null); e.return = b; e.child = a; null !== a && (a.return = e); if (0 === (b.mode & 2)) for ( a = null !== b.memoizedState ? b.child.child : b.child, e.child = a; null !== a; ) (a.return = e), (a = a.sibling); c = jd(g, d, c, null); c.return = b; e.sibling = c; c.effectTag |= 2; e.childExpirationTime = 0; b.memoizedState = Ae; b.child = e; return c; } b.memoizedState = null; return (b.child = kd(b, a, e.children, c)); } function Ce(a, b) { a.expirationTime < b && (a.expirationTime = b); var c = a.alternate; null !== c && c.expirationTime < b && (c.expirationTime = b); zc(a.return, b); } function De(a, b, c, d, e, f) { var g = a.memoizedState; null === g ? (a.memoizedState = { isBackwards: b, rendering: null, last: d, tail: c, tailExpiration: 0, tailMode: e, lastEffect: f, }) : ((g.isBackwards = b), (g.rendering = null), (g.last = d), (g.tail = c), (g.tailExpiration = 0), (g.tailMode = e), (g.lastEffect = f)); } function Ee(a, b, c) { var d = b.pendingProps, e = d.revealOrder, f = d.tail; Q(a, b, d.children, c); d = I.current; if (0 !== (d & 2)) (d = (d & 1) | 2), (b.effectTag |= 64); else { if (null !== a && 0 !== (a.effectTag & 64)) a: for (a = b.child; null !== a; ) { if (13 === a.tag) null !== a.memoizedState && Ce(a, c); else if (19 === a.tag) Ce(a, c); else if (null !== a.child) { a.child.return = a; a = a.child; continue; } if (a === b) break a; for (; null === a.sibling; ) { if (null === a.return || a.return === b) break a; a = a.return; } a.sibling.return = a.return; a = a.sibling; } d &= 1; } z(I, d, b); if (0 === (b.mode & 2)) b.memoizedState = null; else switch (e) { case "forwards": c = b.child; for (e = null; null !== c; ) (a = c.alternate), null !== a && null === ud(a) && (e = c), (c = c.sibling); c = e; null === c ? ((e = b.child), (b.child = null)) : ((e = c.sibling), (c.sibling = null)); De(b, !1, e, c, f, b.lastEffect); break; case "backwards": c = null; e = b.child; for (b.child = null; null !== e; ) { a = e.alternate; if (null !== a && null === ud(a)) { b.child = e; break; } a = e.sibling; e.sibling = c; c = e; e = a; } De(b, !0, c, null, f, b.lastEffect); break; case "together": De(b, !1, null, null, void 0, b.lastEffect); break; default: b.memoizedState = null; } return b.child; } function re(a, b, c) { null !== a && (b.dependencies = a.dependencies); var d = b.expirationTime; 0 !== d && Pc(d); if (b.childExpirationTime < c) return null; if (null !== a && b.child !== a.child) throw Error(n(153)); if (null !== b.child) { a = b.child; c = fd(a, a.pendingProps, a.expirationTime); b.child = c; for (c.return = b; null !== a.sibling; ) (a = a.sibling), (c = c.sibling = fd(a, a.pendingProps, a.expirationTime)), (c.return = b); c.sibling = null; } return b.child; } function Fe(a) { a.effectTag |= 4; } var Ge, He, Ie, Je; if (Qa) (Ge = function (a, b) { for (var c = b.child; null !== c; ) { if (5 === c.tag || 6 === c.tag) Fa(a, c.stateNode); else if (4 !== c.tag && null !== c.child) { c.child.return = c; c = c.child; continue; } if (c === b) break; for (; null === c.sibling; ) { if (null === c.return || c.return === b) return; c = c.return; } c.sibling.return = c.return; c = c.sibling; } }), (He = function () {}), (Ie = function (a, b, c, d, e) { a = a.memoizedProps; if (a !== d) { var f = b.stateNode, g = pd(H.current); c = Ia(f, c, a, d, e, g); (b.updateQueue = c) && Fe(b); } }), (Je = function (a, b, c, d) { c !== d && Fe(b); }); else if (Ra) { Ge = function (a, b, c, d) { for (var e = b.child; null !== e; ) { if (5 === e.tag) { var f = e.stateNode; c && d && (f = mb(f, e.type, e.memoizedProps, e)); Fa(a, f); } else if (6 === e.tag) (f = e.stateNode), c && d && (f = nb(f, e.memoizedProps, e)), Fa(a, f); else if (4 !== e.tag) { if ( 13 === e.tag && 0 !== (e.effectTag & 4) && (f = null !== e.memoizedState) ) { var g = e.child; if ( null !== g && (null !== g.child && ((g.child.return = g), Ge(a, g, !0, f)), (f = g.sibling), null !== f) ) { f.return = e; e = f; continue; } } if (null !== e.child) { e.child.return = e; e = e.child; continue; } } if (e === b) break; for (; null === e.sibling; ) { if (null === e.return || e.return === b) return; e = e.return; } e.sibling.return = e.return; e = e.sibling; } }; var Ke = function (a, b, c, d) { for (var e = b.child; null !== e; ) { if (5 === e.tag) { var f = e.stateNode; c && d && (f = mb(f, e.type, e.memoizedProps, e)); ib(a, f); } else if (6 === e.tag) (f = e.stateNode), c && d && (f = nb(f, e.memoizedProps, e)), ib(a, f); else if (4 !== e.tag) { if ( 13 === e.tag && 0 !== (e.effectTag & 4) && (f = null !== e.memoizedState) ) { var g = e.child; if ( null !== g && (null !== g.child && ((g.child.return = g), Ke(a, g, !0, f)), (f = g.sibling), null !== f) ) { f.return = e; e = f; continue; } } if (null !== e.child) { e.child.return = e; e = e.child; continue; } } if (e === b) break; for (; null === e.sibling; ) { if (null === e.return || e.return === b) return; e = e.return; } e.sibling.return = e.return; e = e.sibling; } }; He = function (a) { var b = a.stateNode; if (null !== a.firstEffect) { var c = b.containerInfo, d = hb(c); Ke(d, a, !1, !1); b.pendingChildren = d; Fe(a); kb(c, d); } }; Ie = function (a, b, c, d, e) { var f = a.stateNode, g = a.memoizedProps; if ((a = null === b.firstEffect) && g === d) b.stateNode = f; else { var l = b.stateNode, h = pd(H.current), k = null; g !== d && (k = Ia(l, c, g, d, e, h)); a && null === k ? (b.stateNode = f) : ((f = gb(f, k, c, g, d, b, a, l)), Ga(f, c, d, e, h) && Fe(b), (b.stateNode = f), a ? Fe(b) : Ge(f, b, !1, !1)); } }; Je = function (a, b, c, d) { c !== d && ((a = pd(od.current)), (c = pd(H.current)), (b.stateNode = La(d, a, c, b)), Fe(b)); }; } else (He = function () {}), (Ie = function () {}), (Je = function () {}); function Le(a, b) { switch (a.tailMode) { case "hidden": b = a.tail; for (var c = null; null !== b; ) null !== b.alternate && (c = b), (b = b.sibling); null === c ? (a.tail = null) : (c.sibling = null); break; case "collapsed": c = a.tail; for (var d = null; null !== c; ) null !== c.alternate && (d = c), (c = c.sibling); null === d ? b || null === a.tail ? (a.tail = null) : (a.tail.sibling = null) : (d.sibling = null); } } function Me(a) { switch (a.tag) { case 1: C(a.type) && Gb(a); var b = a.effectTag; return b & 4096 ? ((a.effectTag = (b & -4097) | 64), a) : null; case 3: rd(a); Hb(a); b = a.effectTag; if (0 !== (b & 64)) throw Error(n(285)); a.effectTag = (b & -4097) | 64; return a; case 5: return td(a), null; case 13: return ( y(I, a), (b = a.effectTag), b & 4096 ? ((a.effectTag = (b & -4097) | 64), a) : null ); case 19: return y(I, a), null; case 4: return rd(a), null; case 10: return yc(a), null; default: return null; } } function Ne(a, b) { return { value: a, source: b, stack: Ab(b) }; } var Oe = "function" === typeof WeakSet ? WeakSet : Set; function Pe(a, b) { var c = b.source, d = b.stack; null === d && null !== c && (d = Ab(c)); null !== c && ta(c.type); b = b.value; null !== a && 1 === a.tag && ta(a.type); try { console.error(b); } catch (e) { setTimeout(function () { throw e; }); } } function Qe(a, b) { try { (b.props = a.memoizedProps), (b.state = a.memoizedState), b.componentWillUnmount(); } catch (c) { Re(a, c); } } function Se(a) { var b = a.ref; if (null !== b) if ("function" === typeof b) try { b(null); } catch (c) { Re(a, c); } else b.current = null; } function Te(a, b) { switch (b.tag) { case 0: case 11: case 15: Ue(2, 0, b); break; case 1: if (b.effectTag & 256 && null !== a) { var c = a.memoizedProps, d = a.memoizedState; a = b.stateNode; b = a.getSnapshotBeforeUpdate( b.elementType === b.type ? c : rc(b.type, c), d ); a.__reactInternalSnapshotBeforeUpdate = b; } break; case 3: case 5: case 6: case 4: case 17: break; default: throw Error(n(163)); } } function Ue(a, b, c) { c = c.updateQueue; c = null !== c ? c.lastEffect : null; if (null !== c) { var d = (c = c.next); do { if (0 !== (d.tag & a)) { var e = d.destroy; d.destroy = void 0; void 0 !== e && e(); } 0 !== (d.tag & b) && ((e = d.create), (d.destroy = e())); d = d.next; } while (d !== c); } } function Ve(a, b, c) { "function" === typeof We && We(b); switch (b.tag) { case 0: case 11: case 14: case 15: a = b.updateQueue; if ( null !== a && ((a = a.lastEffect), null !== a) ) { var d = a.next; hc(97 < c ? 97 : c, function () { var a = d; do { var c = a.destroy; if (void 0 !== c) { var g = b; try { c(); } catch (l) { Re(g, l); } } a = a.next; } while (a !== d); }); } break; case 1: Se(b); c = b.stateNode; "function" === typeof c.componentWillUnmount && Qe(b, c); break; case 5: Se(b); break; case 4: Qa ? Xe(a, b, c) : Ra && Ye(b); } } function Ze(a, b, c) { for (var d = b; ; ) if ( (Ve(a, d, c), null === d.child || (Qa && 4 === d.tag)) ) { if (d === b) break; for (; null === d.sibling; ) { if (null === d.return || d.return === b) return; d = d.return; } d.sibling.return = d.return; d = d.sibling; } else (d.child.return = d), (d = d.child); } function $e(a) { var b = a.alternate; a.return = null; a.child = null; a.memoizedState = null; a.updateQueue = null; a.dependencies = null; a.alternate = null; a.firstEffect = null; a.lastEffect = null; a.pendingProps = null; a.memoizedProps = null; null !== b && $e(b); } function Ye(a) { if (Ra) { a = a.stateNode.containerInfo; var b = hb(a); lb(a, b); } } function af(a) { return 5 === a.tag || 3 === a.tag || 4 === a.tag; } function bf(a) { if (Qa) { a: { for (var b = a.return; null !== b; ) { if (af(b)) { var c = b; break a; } b = b.return; } throw Error(n(160)); } b = c.stateNode; switch (c.tag) { case 5: var d = !1; break; case 3: b = b.containerInfo; d = !0; break; case 4: b = b.containerInfo; d = !0; break; default: throw Error(n(161)); } c.effectTag & 16 && (bb(b), (c.effectTag &= -17)); a: b: for (c = a; ; ) { for (; null === c.sibling; ) { if (null === c.return || af(c.return)) { c = null; break a; } c = c.return; } c.sibling.return = c.return; for ( c = c.sibling; 5 !== c.tag && 6 !== c.tag && 18 !== c.tag; ) { if (c.effectTag & 2) continue b; if (null === c.child || 4 === c.tag) continue b; else (c.child.return = c), (c = c.child); } if (!(c.effectTag & 2)) { c = c.stateNode; break a; } } for (var e = a; ; ) { var f = 5 === e.tag || 6 === e.tag; if (f) (f = f ? e.stateNode : e.stateNode.instance), c ? d ? Za(b, f, c) : Ya(b, f, c) : d ? Ua(b, f) : Ta(b, f); else if (4 !== e.tag && null !== e.child) { e.child.return = e; e = e.child; continue; } if (e === a) break; for (; null === e.sibling; ) { if (null === e.return || e.return === a) return; e = e.return; } e.sibling.return = e.return; e = e.sibling; } } } function Xe(a, b, c) { for (var d = b, e = !1, f, g; ; ) { if (!e) { e = d.return; a: for (;;) { if (null === e) throw Error(n(160)); f = e.stateNode; switch (e.tag) { case 5: g = !1; break a; case 3: f = f.containerInfo; g = !0; break a; case 4: f = f.containerInfo; g = !0; break a; } e = e.return; } e = !0; } if (5 === d.tag || 6 === d.tag) Ze(a, d, c), g ? ab(f, d.stateNode) : $a(f, d.stateNode); else if (4 === d.tag) { if (null !== d.child) { f = d.stateNode.containerInfo; g = !0; d.child.return = d; d = d.child; continue; } } else if ((Ve(a, d, c), null !== d.child)) { d.child.return = d; d = d.child; continue; } if (d === b) break; for (; null === d.sibling; ) { if (null === d.return || d.return === b) return; d = d.return; 4 === d.tag && (e = !1); } d.sibling.return = d.return; d = d.sibling; } } function cf(a, b) { if (Qa) switch (b.tag) { case 0: case 11: case 14: case 15: Ue(4, 8, b); break; case 1: break; case 5: var c = b.stateNode; if (null != c) { var d = b.memoizedProps; a = null !== a ? a.memoizedProps : d; var e = b.type, f = b.updateQueue; b.updateQueue = null; null !== f && Xa(c, f, e, a, d, b); } break; case 6: if (null === b.stateNode) throw Error(n(162)); c = b.memoizedProps; Va( b.stateNode, null !== a ? a.memoizedProps : c, c ); break; case 3: Sa && ((b = b.stateNode), b.hydrate && ((b.hydrate = !1), xb(b.containerInfo))); break; case 12: break; case 13: df(b); ef(b); break; case 19: ef(b); break; case 17: break; case 20: break; case 21: break; default: throw Error(n(163)); } else { switch (b.tag) { case 0: case 11: case 14: case 15: Ue(4, 8, b); return; case 12: return; case 13: df(b); ef(b); return; case 19: ef(b); return; case 3: Sa && ((c = b.stateNode), c.hydrate && ((c.hydrate = !1), xb(c.containerInfo))); } a: if (Ra) switch (b.tag) { case 1: case 5: case 6: case 20: break a; case 3: case 4: b = b.stateNode; lb(b.containerInfo, b.pendingChildren); break a; default: throw Error(n(163)); } } } function df(a) { var b = a; if (null === a.memoizedState) var c = !1; else (c = !0), (b = a.child), (ff = E()); if (Qa && null !== b) a: if (((a = b), Qa)) for (b = a; ; ) { if (5 === b.tag) { var d = b.stateNode; c ? cb(d) : eb(b.stateNode, b.memoizedProps); } else if (6 === b.tag) (d = b.stateNode), c ? db(d) : fb(d, b.memoizedProps); else if ( 13 === b.tag && null !== b.memoizedState && null === b.memoizedState.dehydrated ) { d = b.child.sibling; d.return = b; b = d; continue; } else if (null !== b.child) { b.child.return = b; b = b.child; continue; } if (b === a) break a; for (; null === b.sibling; ) { if (null === b.return || b.return === a) break a; b = b.return; } b.sibling.return = b.return; b = b.sibling; } } function ef(a) { var b = a.updateQueue; if (null !== b) { a.updateQueue = null; var c = a.stateNode; null === c && (c = a.stateNode = new Oe()); b.forEach(function (b) { var d = gf.bind(null, a, b); c.has(b) || (c.add(b), b.then(d, d)); }); } } var hf = "function" === typeof WeakMap ? WeakMap : Map; function jf(a, b, c) { c = Gc(c, null); c.tag = 3; c.payload = { element: null }; var d = b.value; c.callback = function () { kf || ((kf = !0), (lf = d)); Pe(a, b); }; return c; } function mf(a, b, c) { c = Gc(c, null); c.tag = 3; var d = a.type.getDerivedStateFromError; if ("function" === typeof d) { var e = b.value; c.payload = function () { Pe(a, b); return d(e); }; } var f = a.stateNode; null !== f && "function" === typeof f.componentDidCatch && (c.callback = function () { "function" !== typeof d && (null === nf ? (nf = new Set([this])) : nf.add(this), Pe(a, b)); var c = b.stack; this.componentDidCatch(b.value, { componentStack: null !== c ? c : "", }); }); return c; } var of = Math.ceil, pf = q.ReactCurrentDispatcher, qf = q.ReactCurrentOwner, R = 0, rf = 8, S = 16, sf = 32, tf = 0, uf = 1, vf = 2, wf = 3, xf = 4, yf = 5, T = R, U = null, V = null, W = 0, X = tf, zf = null, Af = 1073741823, Bf = 1073741823, Cf = null, Df = 0, Ef = !1, ff = 0, Ff = 500, Y = null, kf = !1, lf = null, nf = null, Gf = !1, Hf = null, If = 90, Jf = null, Kf = 0, Lf = null, Mf = 0; function G() { return (T & (S | sf)) !== R ? 1073741821 - ((E() / 10) | 0) : 0 !== Mf ? Mf : (Mf = 1073741821 - ((E() / 10) | 0)); } function Vc(a, b, c) { b = b.mode; if (0 === (b & 2)) return 1073741823; var d = fc(); if (0 === (b & 4)) return 99 === d ? 1073741823 : 1073741822; if ((T & S) !== R) return W; if (null !== c) a = mc(a, c.timeoutMs | 0 || 5e3, 250); else switch (d) { case 99: a = 1073741823; break; case 98: a = mc(a, 150, 100); break; case 97: case 96: a = mc(a, 5e3, 250); break; case 95: a = 2; break; default: throw Error(n(326)); } null !== U && a === W && --a; return a; } function Wc(a, b) { if (50 < Kf) throw ((Kf = 0), (Lf = null), Error(n(185))); a = Nf(a, b); if (null !== a) { var c = fc(); 1073741823 === b ? (T & rf) !== R && (T & (S | sf)) === R ? Of(a) : (Z(a), T === R && F()) : Z(a); (T & 4) === R || (98 !== c && 99 !== c) || (null === Jf ? (Jf = new Map([[a, b]])) : ((c = Jf.get(a)), (void 0 === c || c > b) && Jf.set(a, b))); } } function Nf(a, b) { a.expirationTime < b && (a.expirationTime = b); var c = a.alternate; null !== c && c.expirationTime < b && (c.expirationTime = b); var d = a.return, e = null; if (null === d && 3 === a.tag) e = a.stateNode; else for (; null !== d; ) { c = d.alternate; d.childExpirationTime < b && (d.childExpirationTime = b); null !== c && c.childExpirationTime < b && (c.childExpirationTime = b); if (null === d.return && 3 === d.tag) { e = d.stateNode; break; } d = d.return; } null !== e && (U === e && (Pc(b), X === xf && Pf(e, W)), Qf(e, b)); return e; } function Rf(a) { var b = a.lastExpiredTime; if (0 !== b) return b; b = a.firstPendingTime; if (!Sf(a, b)) return b; b = a.lastPingedTime; a = a.nextKnownPendingLevel; return b > a ? b : a; } function Z(a) { if (0 !== a.lastExpiredTime) (a.callbackExpirationTime = 1073741823), (a.callbackPriority = 99), (a.callbackNode = jc(Of.bind(null, a))); else { var b = Rf(a), c = a.callbackNode; if (0 === b) null !== c && ((a.callbackNode = null), (a.callbackExpirationTime = 0), (a.callbackPriority = 90)); else { var d = G(); 1073741823 === b ? (d = 99) : 1 === b || 2 === b ? (d = 95) : ((d = 10 * (1073741821 - b) - 10 * (1073741821 - d)), (d = 0 >= d ? 99 : 250 >= d ? 98 : 5250 >= d ? 97 : 95)); if (null !== c) { var e = a.callbackPriority; if (a.callbackExpirationTime === b && e >= d) return; c !== $b && Ob(c); } a.callbackExpirationTime = b; a.callbackPriority = d; b = 1073741823 === b ? jc(Of.bind(null, a)) : ic(d, Tf.bind(null, a), { timeout: 10 * (1073741821 - b) - E(), }); a.callbackNode = b; } } } function Tf(a, b) { Mf = 0; if (b) return (b = G()), Uf(a, b), Z(a), null; var c = Rf(a); if (0 !== c) { b = a.callbackNode; if ((T & (S | sf)) !== R) throw Error(n(327)); Vf(); (a === U && c === W) || Wf(a, c); if (null !== V) { var d = T; T |= S; var e = Xf(a); do try { Yf(); break; } catch (l) { Zf(a, l); } while (1); wc(); T = d; pf.current = e; if (X === uf) throw ((b = zf), Wf(a, c), Pf(a, c), Z(a), b); if (null === V) switch ( ((e = a.finishedWork = a.current.alternate), (a.finishedExpirationTime = c), (d = X), (U = null), d) ) { case tf: case uf: throw Error(n(345)); case vf: Uf(a, 2 < c ? 2 : c); break; case wf: Pf(a, c); d = a.lastSuspendedTime; c === d && (a.nextKnownPendingLevel = $f(e)); if ( 1073741823 === Af && ((e = ff + Ff - E()), 10 < e) ) { if (Ef) { var f = a.lastPingedTime; if (0 === f || f >= c) { a.lastPingedTime = c; Wf(a, c); break; } } f = Rf(a); if (0 !== f && f !== c) break; if (0 !== d && d !== c) { a.lastPingedTime = d; break; } a.timeoutHandle = Ma( ag.bind(null, a), e ); break; } ag(a); break; case xf: Pf(a, c); d = a.lastSuspendedTime; c === d && (a.nextKnownPendingLevel = $f(e)); if ( Ef && ((e = a.lastPingedTime), 0 === e || e >= c) ) { a.lastPingedTime = c; Wf(a, c); break; } e = Rf(a); if (0 !== e && e !== c) break; if (0 !== d && d !== c) { a.lastPingedTime = d; break; } 1073741823 !== Bf ? (d = 10 * (1073741821 - Bf) - E()) : 1073741823 === Af ? (d = 0) : ((d = 10 * (1073741821 - Af) - 5e3), (e = E()), (c = 10 * (1073741821 - c) - e), (d = e - d), 0 > d && (d = 0), (d = (120 > d ? 120 : 480 > d ? 480 : 1080 > d ? 1080 : 1920 > d ? 1920 : 3e3 > d ? 3e3 : 4320 > d ? 4320 : 1960 * of(d / 1960)) - d), c < d && (d = c)); if (10 < d) { a.timeoutHandle = Ma( ag.bind(null, a), d ); break; } ag(a); break; case yf: if (1073741823 !== Af && null !== Cf) { f = Af; var g = Cf; d = g.busyMinDurationMs | 0; 0 >= d ? (d = 0) : ((e = g.busyDelayMs | 0), (f = E() - (10 * (1073741821 - f) - (g.timeoutMs | 0 || 5e3))), (d = f <= e ? 0 : e + d - f)); if (10 < d) { Pf(a, c); a.timeoutHandle = Ma( ag.bind(null, a), d ); break; } } ag(a); break; default: throw Error(n(329)); } Z(a); if (a.callbackNode === b) return Tf.bind(null, a); } } return null; } function Of(a) { var b = a.lastExpiredTime; b = 0 !== b ? b : 1073741823; if (a.finishedExpirationTime === b) ag(a); else { if ((T & (S | sf)) !== R) throw Error(n(327)); Vf(); (a === U && b === W) || Wf(a, b); if (null !== V) { var c = T; T |= S; var d = Xf(a); do try { bg(); break; } catch (e) { Zf(a, e); } while (1); wc(); T = c; pf.current = d; if (X === uf) throw ((c = zf), Wf(a, b), Pf(a, b), Z(a), c); if (null !== V) throw Error(n(261)); a.finishedWork = a.current.alternate; a.finishedExpirationTime = b; U = null; ag(a); Z(a); } } return null; } function cg(a, b) { Uf(a, b); Z(a); (T & (S | sf)) === R && F(); } function dg() { if (null !== Jf) { var a = Jf; Jf = null; a.forEach(function (a, c) { Uf(c, a); Z(c); }); F(); } } function eg(a, b) { if ((T & (S | sf)) !== R) throw Error(n(187)); var c = T; T |= 1; try { return hc(99, a.bind(null, b)); } finally { (T = c), F(); } } function Wf(a, b) { a.finishedWork = null; a.finishedExpirationTime = 0; var c = a.timeoutHandle; c !== Oa && ((a.timeoutHandle = Oa), Na(c)); if (null !== V) for (c = V.return; null !== c; ) { var d = c; switch (d.tag) { case 1: var e = d.type.childContextTypes; null !== e && void 0 !== e && Gb(d); break; case 3: rd(d); Hb(d); break; case 5: td(d); break; case 4: rd(d); break; case 13: y(I, d); break; case 19: y(I, d); break; case 10: yc(d); } c = c.return; } U = a; V = fd(a.current, null, b); W = b; X = tf; zf = null; Bf = Af = 1073741823; Cf = null; Df = 0; Ef = !1; } function Zf(a, b) { do { try { wc(); Nd(); if (null === V || null === V.return) return (X = uf), (zf = b), null; a: { var c = a, d = V.return, e = V, f = b; b = W; e.effectTag |= 2048; e.firstEffect = e.lastEffect = null; if ( null !== f && "object" === typeof f && "function" === typeof f.then ) { var g = f, l = 0 !== (I.current & 1), h = d; do { var k; if ((k = 13 === h.tag)) { var p = h.memoizedState; if (null !== p) k = null !== p.dehydrated ? !0 : !1; else { var D = h.memoizedProps; k = void 0 === D.fallback ? !1 : !0 !== D.unstable_avoidThisFallback ? !0 : l ? !1 : !0; } } if (k) { var x = h.updateQueue; if (null === x) { var K = new Set(); K.add(g); h.updateQueue = K; } else x.add(g); if (0 === (h.mode & 2)) { h.effectTag |= 64; e.effectTag &= -2981; if (1 === e.tag) if (null === e.alternate) e.tag = 17; else { var Ha = Gc( 1073741823, null ); Ha.tag = 2; Ic(e, Ha); } e.expirationTime = 1073741823; break a; } f = void 0; e = b; var O = c.pingCache; null === O ? ((O = c.pingCache = new hf()), (f = new Set()), O.set(g, f)) : ((f = O.get(g)), void 0 === f && ((f = new Set()), O.set(g, f))); if (!f.has(e)) { f.add(e); var w = fg.bind(null, c, g, e); g.then(w, w); } h.effectTag |= 4096; h.expirationTime = b; break a; } h = h.return; } while (null !== h); f = Error( (ta(e.type) || "A React component") + " suspended while rendering, but no fallback UI was specified.\n\nAdd a component higher in the tree to provide a loading indicator or placeholder to display." + Ab(e) ); } X !== yf && (X = vf); f = Ne(f, e); h = d; do { switch (h.tag) { case 3: g = f; h.effectTag |= 4096; h.expirationTime = b; var r = jf(h, g, b); Jc(h, r); break a; case 1: g = f; var t = h.type, N = h.stateNode; if ( 0 === (h.effectTag & 64) && ("function" === typeof t.getDerivedStateFromError || (null !== N && "function" === typeof N.componentDidCatch && (null === nf || !nf.has(N)))) ) { h.effectTag |= 4096; h.expirationTime = b; var Mc = mf(h, g, b); Jc(h, Mc); break a; } } h = h.return; } while (null !== h); } V = gg(V); } catch (Rb) { b = Rb; continue; } break; } while (1); } function Xf() { var a = pf.current; pf.current = Md; return null === a ? Md : a; } function Oc(a, b) { a < Af && 2 < a && (Af = a); null !== b && a < Bf && 2 < a && ((Bf = a), (Cf = b)); } function Pc(a) { a > Df && (Df = a); } function bg() { for (; null !== V; ) V = hg(V); } function Yf() { for (; null !== V && !Pb(); ) V = hg(V); } function hg(a) { var b = ig(a.alternate, a, W); a.memoizedProps = a.pendingProps; null === b && (b = gg(a)); qf.current = null; return b; } function gg(a) { V = a; do { var b = V.alternate; a = V.return; if (0 === (V.effectTag & 2048)) { a: { var c = b; b = V; var d = W, e = b.pendingProps; switch (b.tag) { case 2: break; case 16: break; case 15: case 0: break; case 1: C(b.type) && Gb(b); break; case 3: rd(b); Hb(b); e = b.stateNode; e.pendingContext && ((e.context = e.pendingContext), (e.pendingContext = null)); (null === c || null === c.child) && ne(b) && Fe(b); He(b); break; case 5: td(b); var f = pd(od.current); d = b.type; if (null !== c && null != b.stateNode) Ie(c, b, d, e, f), c.ref !== b.ref && (b.effectTag |= 128); else if (e) { c = pd(H.current); if (ne(b)) { e = b; if (!Sa) throw Error(n(175)); c = ub( e.stateNode, e.type, e.memoizedProps, f, c, e ); e.updateQueue = c; c = null !== c ? !0 : !1; c && Fe(b); } else { var g = Ea(d, e, f, c, b); Ge(g, b, !1, !1); b.stateNode = g; Ga(g, d, e, f, c) && Fe(b); } null !== b.ref && (b.effectTag |= 128); } else if (null === b.stateNode) throw Error(n(166)); break; case 6: if (c && null != b.stateNode) Je(c, b, c.memoizedProps, e); else { if ( "string" !== typeof e && null === b.stateNode ) throw Error(n(166)); c = pd(od.current); f = pd(H.current); if (ne(b)) { c = b; if (!Sa) throw Error(n(176)); (c = vb( c.stateNode, c.memoizedProps, c )) && Fe(b); } else b.stateNode = La(e, c, f, b); } break; case 11: break; case 13: y(I, b); e = b.memoizedState; if (0 !== (b.effectTag & 64)) { b.expirationTime = d; break a; } e = null !== e; f = !1; null === c ? void 0 !== b.memoizedProps.fallback && ne(b) : ((d = c.memoizedState), (f = null !== d), e || null === d || ((d = c.child.sibling), null !== d && ((g = b.firstEffect), null !== g ? ((b.firstEffect = d), (d.nextEffect = g)) : ((b.firstEffect = b.lastEffect = d), (d.nextEffect = null)), (d.effectTag = 8)))); if (e && !f && 0 !== (b.mode & 2)) if ( (null === c && !0 !== b.memoizedProps .unstable_avoidThisFallback) || 0 !== (I.current & 1) ) X === tf && (X = wf); else { if (X === tf || X === wf) X = xf; 0 !== Df && null !== U && (Pf(U, W), Qf(U, Df)); } Ra && e && (b.effectTag |= 4); Qa && (e || f) && (b.effectTag |= 4); break; case 7: break; case 8: break; case 12: break; case 4: rd(b); He(b); break; case 10: yc(b); break; case 9: break; case 14: break; case 17: C(b.type) && Gb(b); break; case 19: y(I, b); e = b.memoizedState; if (null === e) break; f = 0 !== (b.effectTag & 64); g = e.rendering; if (null === g) if (f) Le(e, !1); else { if ( X !== tf || (null !== c && 0 !== (c.effectTag & 64)) ) for ( c = b.child; null !== c; ) { g = ud(c); if (null !== g) { b.effectTag |= 64; Le(e, !1); c = g.updateQueue; null !== c && ((b.updateQueue = c), (b.effectTag |= 4)); null === e.lastEffect && (b.firstEffect = null); b.lastEffect = e.lastEffect; c = d; for ( e = b.child; null !== e; ) (f = e), (d = c), (f.effectTag &= 2), (f.nextEffect = null), (f.firstEffect = null), (f.lastEffect = null), (g = f.alternate), null === g ? ((f.childExpirationTime = 0), (f.expirationTime = d), (f.child = null), (f.memoizedProps = null), (f.memoizedState = null), (f.updateQueue = null), (f.dependencies = null)) : ((f.childExpirationTime = g.childExpirationTime), (f.expirationTime = g.expirationTime), (f.child = g.child), (f.memoizedProps = g.memoizedProps), (f.memoizedState = g.memoizedState), (f.updateQueue = g.updateQueue), (d = g.dependencies), (f.dependencies = null === d ? null : { expirationTime: d.expirationTime, firstContext: d.firstContext, responders: d.responders, })), (e = e.sibling); z( I, (I.current & 1) | 2, b ); b = b.child; break a; } c = c.sibling; } } else { if (!f) if (((c = ud(g)), null !== c)) { if ( ((b.effectTag |= 64), (f = !0), (c = c.updateQueue), null !== c && ((b.updateQueue = c), (b.effectTag |= 4)), Le(e, !0), null === e.tail && "hidden" === e.tailMode) ) { b = b.lastEffect = e.lastEffect; null !== b && (b.nextEffect = null); break; } } else E() > e.tailExpiration && 1 < d && ((b.effectTag |= 64), (f = !0), Le(e, !1), (b.expirationTime = b.childExpirationTime = d - 1)); e.isBackwards ? ((g.sibling = b.child), (b.child = g)) : ((c = e.last), null !== c ? (c.sibling = g) : (b.child = g), (e.last = g)); } if (null !== e.tail) { 0 === e.tailExpiration && (e.tailExpiration = E() + 500); c = e.tail; e.rendering = c; e.tail = c.sibling; e.lastEffect = b.lastEffect; c.sibling = null; e = I.current; e = f ? (e & 1) | 2 : e & 1; z(I, e, b); b = c; break a; } break; case 20: break; case 21: break; default: throw Error(n(156, b.tag)); } b = null; } c = V; if (1 === W || 1 !== c.childExpirationTime) { e = 0; for (f = c.child; null !== f; ) (d = f.expirationTime), (g = f.childExpirationTime), d > e && (e = d), g > e && (e = g), (f = f.sibling); c.childExpirationTime = e; } if (null !== b) return b; null !== a && 0 === (a.effectTag & 2048) && (null === a.firstEffect && (a.firstEffect = V.firstEffect), null !== V.lastEffect && (null !== a.lastEffect && (a.lastEffect.nextEffect = V.firstEffect), (a.lastEffect = V.lastEffect)), 1 < V.effectTag && (null !== a.lastEffect ? (a.lastEffect.nextEffect = V) : (a.firstEffect = V), (a.lastEffect = V))); } else { b = Me(V, W); if (null !== b) return (b.effectTag &= 2047), b; null !== a && ((a.firstEffect = a.lastEffect = null), (a.effectTag |= 2048)); } b = V.sibling; if (null !== b) return b; V = a; } while (null !== V); X === tf && (X = yf); return null; } function $f(a) { var b = a.expirationTime; a = a.childExpirationTime; return b > a ? b : a; } function ag(a) { var b = fc(); hc(99, jg.bind(null, a, b)); return null; } function jg(a, b) { Vf(); if ((T & (S | sf)) !== R) throw Error(n(327)); var c = a.finishedWork, d = a.finishedExpirationTime; if (null === c) return null; a.finishedWork = null; a.finishedExpirationTime = 0; if (c === a.current) throw Error(n(177)); a.callbackNode = null; a.callbackExpirationTime = 0; a.callbackPriority = 90; a.nextKnownPendingLevel = 0; var e = $f(c); a.firstPendingTime = e; d <= a.lastSuspendedTime ? (a.firstSuspendedTime = a.lastSuspendedTime = a.nextKnownPendingLevel = 0) : d <= a.firstSuspendedTime && (a.firstSuspendedTime = d - 1); d <= a.lastPingedTime && (a.lastPingedTime = 0); d <= a.lastExpiredTime && (a.lastExpiredTime = 0); a === U && ((V = U = null), (W = 0)); 1 < c.effectTag ? null !== c.lastEffect ? ((c.lastEffect.nextEffect = c), (e = c.firstEffect)) : (e = c) : (e = c.firstEffect); if (null !== e) { var f = T; T |= sf; qf.current = null; Ca(a.containerInfo); Y = e; do try { kg(); } catch (jb) { if (null === Y) throw Error(n(330)); Re(Y, jb); Y = Y.nextEffect; } while (null !== Y); Y = e; do try { for (var g = a, l = b; null !== Y; ) { var h = Y.effectTag; h & 16 && Qa && bb(Y.stateNode); if (h & 128) { var k = Y.alternate; if (null !== k) { var p = k.ref; null !== p && ("function" === typeof p ? p(null) : (p.current = null)); } } switch (h & 1038) { case 2: bf(Y); Y.effectTag &= -3; break; case 6: bf(Y); Y.effectTag &= -3; cf(Y.alternate, Y); break; case 1024: Y.effectTag &= -1025; break; case 1028: Y.effectTag &= -1025; cf(Y.alternate, Y); break; case 4: cf(Y.alternate, Y); break; case 8: var D = g, x = Y, K = l; Qa ? Xe(D, x, K) : Ze(D, x, K); $e(x); } Y = Y.nextEffect; } } catch (jb) { if (null === Y) throw Error(n(330)); Re(Y, jb); Y = Y.nextEffect; } while (null !== Y); Da(a.containerInfo); a.current = c; Y = e; do try { for (h = d; null !== Y; ) { var Ha = Y.effectTag; if (Ha & 36) { var O = Y.alternate; k = Y; p = h; switch (k.tag) { case 0: case 11: case 15: Ue(16, 32, k); break; case 1: var w = k.stateNode; if (k.effectTag & 4) if (null === O) w.componentDidMount(); else { var r = k.elementType === k.type ? O.memoizedProps : rc( k.type, O.memoizedProps ); w.componentDidUpdate( r, O.memoizedState, w.__reactInternalSnapshotBeforeUpdate ); } var t = k.updateQueue; null !== t && Qc(k, t, w, p); break; case 3: var N = k.updateQueue; if (null !== N) { g = null; if (null !== k.child) switch (k.child.tag) { case 5: g = za( k.child .stateNode ); break; case 1: g = k.child .stateNode; } Qc(k, N, g, p); } break; case 5: var Mc = k.stateNode; null === O && k.effectTag & 4 && Wa( Mc, k.type, k.memoizedProps, k ); break; case 6: break; case 4: break; case 12: break; case 13: if ( Sa && null === k.memoizedState ) { var Rb = k.alternate; if (null !== Rb) { var le = Rb.memoizedState; if (null !== le) { var me = le.dehydrated; null !== me && yb(me); } } } break; case 19: case 17: case 20: case 21: break; default: throw Error(n(163)); } } if (Ha & 128) { k = void 0; var Sb = Y.ref; if (null !== Sb) { var v = Y.stateNode; switch (Y.tag) { case 5: k = za(v); break; default: k = v; } "function" === typeof Sb ? Sb(k) : (Sb.current = k); } } Y = Y.nextEffect; } } catch (jb) { if (null === Y) throw Error(n(330)); Re(Y, jb); Y = Y.nextEffect; } while (null !== Y); Y = null; ac(); T = f; } else a.current = c; if (Gf) (Gf = !1), (Hf = a), (If = b); else for (Y = e; null !== Y; ) (b = Y.nextEffect), (Y.nextEffect = null), (Y = b); b = a.firstPendingTime; 0 === b && (nf = null); 1073741823 === b ? a === Lf ? Kf++ : ((Kf = 0), (Lf = a)) : (Kf = 0); "function" === typeof lg && lg(c.stateNode, d); Z(a); if (kf) throw ((kf = !1), (a = lf), (lf = null), a); if ((T & rf) !== R) return null; F(); return null; } function kg() { for (; null !== Y; ) { var a = Y.effectTag; 0 !== (a & 256) && Te(Y.alternate, Y); 0 === (a & 512) || Gf || ((Gf = !0), ic(97, function () { Vf(); return null; })); Y = Y.nextEffect; } } function Vf() { if (90 !== If) { var a = 97 < If ? 97 : If; If = 90; return hc(a, mg); } } function mg() { if (null === Hf) return !1; var a = Hf; Hf = null; if ((T & (S | sf)) !== R) throw Error(n(331)); var b = T; T |= sf; for (a = a.current.firstEffect; null !== a; ) { try { var c = a; if (0 !== (c.effectTag & 512)) switch (c.tag) { case 0: case 11: case 15: Ue(128, 0, c), Ue(0, 64, c); } } catch (d) { if (null === a) throw Error(n(330)); Re(a, d); } c = a.nextEffect; a.nextEffect = null; a = c; } T = b; F(); return !0; } function ng(a, b, c) { b = Ne(c, b); b = jf(a, b, 1073741823); Ic(a, b); a = Nf(a, 1073741823); null !== a && Z(a); } function Re(a, b) { if (3 === a.tag) ng(a, a, b); else for (var c = a.return; null !== c; ) { if (3 === c.tag) { ng(c, a, b); break; } else if (1 === c.tag) { var d = c.stateNode; if ( "function" === typeof c.type .getDerivedStateFromError || ("function" === typeof d.componentDidCatch && (null === nf || !nf.has(d))) ) { a = Ne(b, a); a = mf(c, a, 1073741823); Ic(c, a); c = Nf(c, 1073741823); null !== c && Z(c); break; } } c = c.return; } } function fg(a, b, c) { var d = a.pingCache; null !== d && d.delete(b); U === a && W === c ? X === xf || (X === wf && 1073741823 === Af && E() - ff < Ff) ? Wf(a, W) : (Ef = !0) : Sf(a, c) && ((b = a.lastPingedTime), (0 !== b && b < c) || ((a.lastPingedTime = c), a.finishedExpirationTime === c && ((a.finishedExpirationTime = 0), (a.finishedWork = null)), Z(a))); } function gf(a, b) { var c = a.stateNode; null !== c && c.delete(b); b = 0; 0 === b && ((b = G()), (b = Vc(b, a, null))); a = Nf(a, b); null !== a && Z(a); } var ig; ig = function (a, b, c) { var d = b.expirationTime; if (null !== a) { var e = b.pendingProps; if (a.memoizedProps !== e || B.current) Bc = !0; else { if (d < c) { Bc = !1; switch (b.tag) { case 3: ze(b); oe(); break; case 5: sd(b); if ( b.mode & 4 && 1 !== c && Ka(b.type, e) ) return ( (b.expirationTime = b.childExpirationTime = 1), null ); break; case 1: C(b.type) && Kb(b); break; case 4: qd(b, b.stateNode.containerInfo); break; case 10: xc(b, b.memoizedProps.value); break; case 13: if (null !== b.memoizedState) { d = b.child.childExpirationTime; if (0 !== d && d >= c) return Be(a, b, c); z(I, I.current & 1, b); b = re(a, b, c); return null !== b ? b.sibling : null; } z(I, I.current & 1, b); break; case 19: d = b.childExpirationTime >= c; if (0 !== (a.effectTag & 64)) { if (d) return Ee(a, b, c); b.effectTag |= 64; } e = b.memoizedState; null !== e && ((e.rendering = null), (e.tail = null)); z(I, I.current, b); if (!d) return null; } return re(a, b, c); } Bc = !1; } } else Bc = !1; b.expirationTime = 0; switch (b.tag) { case 2: d = b.type; null !== a && ((a.alternate = null), (b.alternate = null), (b.effectTag |= 2)); a = b.pendingProps; e = Fb(b, A.current); Ac(b, c); e = Jd(null, b, d, a, e, c); b.effectTag |= 1; if ( "object" === typeof e && null !== e && "function" === typeof e.render && void 0 === e.$$typeof ) { b.tag = 1; Nd(); if (C(d)) { var f = !0; Kb(b); } else f = !1; b.memoizedState = null !== e.state && void 0 !== e.state ? e.state : null; var g = d.getDerivedStateFromProps; "function" === typeof g && Uc(b, d, g, a); e.updater = Xc; b.stateNode = e; e._reactInternalFiber = b; ad(b, d, a, c); b = ye(null, b, d, !0, f, c); } else (b.tag = 0), Q(null, b, e, c), (b = b.child); return b; case 16: e = b.elementType; null !== a && ((a.alternate = null), (b.alternate = null), (b.effectTag |= 2)); a = b.pendingProps; sa(e); if (1 !== e._status) throw e._result; e = e._result; b.type = e; f = b.tag = og(e); a = rc(e, a); switch (f) { case 0: b = ve(null, b, e, a, c); break; case 1: b = xe(null, b, e, a, c); break; case 11: b = qe(null, b, e, a, c); break; case 14: b = se(null, b, e, rc(e.type, a), d, c); break; default: throw Error(n(306, e, "")); } return b; case 0: return ( (d = b.type), (e = b.pendingProps), (e = b.elementType === d ? e : rc(d, e)), ve(a, b, d, e, c) ); case 1: return ( (d = b.type), (e = b.pendingProps), (e = b.elementType === d ? e : rc(d, e)), xe(a, b, d, e, c) ); case 3: ze(b); d = b.updateQueue; if (null === d) throw Error(n(282)); e = b.memoizedState; e = null !== e ? e.element : null; Nc(b, d, b.pendingProps, null, c); d = b.memoizedState.element; if (d === e) oe(), (b = re(a, b, c)); else { if ((e = b.stateNode.hydrate)) Sa ? ((ee = tb(b.stateNode.containerInfo)), (de = b), (e = fe = !0)) : (e = !1); if (e) for ( c = ld(b, null, d, c), b.child = c; c; ) (c.effectTag = (c.effectTag & -3) | 1024), (c = c.sibling); else Q(a, b, d, c), oe(); b = b.child; } return b; case 5: return ( sd(b), null === a && je(b), (d = b.type), (e = b.pendingProps), (f = null !== a ? a.memoizedProps : null), (g = e.children), Ja(d, e) ? (g = null) : null !== f && Ja(d, f) && (b.effectTag |= 16), we(a, b), b.mode & 4 && 1 !== c && Ka(d, e) ? ((b.expirationTime = b.childExpirationTime = 1), (b = null)) : (Q(a, b, g, c), (b = b.child)), b ); case 6: return null === a && je(b), null; case 13: return Be(a, b, c); case 4: return ( qd(b, b.stateNode.containerInfo), (d = b.pendingProps), null === a ? (b.child = kd(b, null, d, c)) : Q(a, b, d, c), b.child ); case 11: return ( (d = b.type), (e = b.pendingProps), (e = b.elementType === d ? e : rc(d, e)), qe(a, b, d, e, c) ); case 7: return Q(a, b, b.pendingProps, c), b.child; case 8: return Q(a, b, b.pendingProps.children, c), b.child; case 12: return Q(a, b, b.pendingProps.children, c), b.child; case 10: a: { d = b.type._context; e = b.pendingProps; g = b.memoizedProps; f = e.value; xc(b, f); if (null !== g) { var l = g.value; f = oc(l, f) ? 0 : ("function" === typeof d._calculateChangedBits ? d._calculateChangedBits(l, f) : 1073741823) | 0; if (0 === f) { if ( g.children === e.children && !B.current ) { b = re(a, b, c); break a; } } else for ( l = b.child, null !== l && (l.return = b); null !== l; ) { var h = l.dependencies; if (null !== h) { g = l.child; for ( var k = h.firstContext; null !== k; ) { if ( k.context === d && 0 !== (k.observedBits & f) ) { 1 === l.tag && ((k = Gc(c, null)), (k.tag = 2), Ic(l, k)); l.expirationTime < c && (l.expirationTime = c); k = l.alternate; null !== k && k.expirationTime < c && (k.expirationTime = c); zc(l.return, c); h.expirationTime < c && (h.expirationTime = c); break; } k = k.next; } } else g = 10 === l.tag ? l.type === b.type ? null : l.child : l.child; if (null !== g) g.return = l; else for (g = l; null !== g; ) { if (g === b) { g = null; break; } l = g.sibling; if (null !== l) { l.return = g.return; g = l; break; } g = g.return; } l = g; } } Q(a, b, e.children, c); b = b.child; } return b; case 9: return ( (e = b.type), (f = b.pendingProps), (d = f.children), Ac(b, c), (e = Cc(e, f.unstable_observedBits)), (d = d(e)), (b.effectTag |= 1), Q(a, b, d, c), b.child ); case 14: return ( (e = b.type), (f = rc(e, b.pendingProps)), (f = rc(e.type, f)), se(a, b, e, f, d, c) ); case 15: return ue(a, b, b.type, b.pendingProps, d, c); case 17: return ( (d = b.type), (e = b.pendingProps), (e = b.elementType === d ? e : rc(d, e)), null !== a && ((a.alternate = null), (b.alternate = null), (b.effectTag |= 2)), (b.tag = 1), C(d) ? ((a = !0), Kb(b)) : (a = !1), Ac(b, c), Zc(b, d, e, c), ad(b, d, e, c), ye(null, b, d, !0, a, c) ); case 19: return Ee(a, b, c); } throw Error(n(156, b.tag)); }; var lg = null, We = null; function pg(a) { if ("undefined" === typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) return !1; var b = __REACT_DEVTOOLS_GLOBAL_HOOK__; if (b.isDisabled || !b.supportsFiber) return !0; try { var c = b.inject(a); lg = function (a) { try { b.onCommitFiberRoot( c, a, void 0, 64 === (a.current.effectTag & 64) ); } catch (e) {} }; We = function (a) { try { b.onCommitFiberUnmount(c, a); } catch (e) {} }; } catch (d) {} return !0; } function qg(a, b, c, d) { this.tag = a; this.key = c; this.sibling = this.child = this.return = this.stateNode = this.type = this.elementType = null; this.index = 0; this.ref = null; this.pendingProps = b; this.dependencies = this.memoizedState = this.updateQueue = this.memoizedProps = null; this.mode = d; this.effectTag = 0; this.lastEffect = this.firstEffect = this.nextEffect = null; this.childExpirationTime = this.expirationTime = 0; this.alternate = null; } function he(a, b, c, d) { return new qg(a, b, c, d); } function te(a) { a = a.prototype; return !(!a || !a.isReactComponent); } function og(a) { if ("function" === typeof a) return te(a) ? 1 : 0; if (void 0 !== a && null !== a) { a = a.$$typeof; if (a === la) return 11; if (a === oa) return 14; } return 2; } function fd(a, b) { var c = a.alternate; null === c ? ((c = he(a.tag, b, a.key, a.mode)), (c.elementType = a.elementType), (c.type = a.type), (c.stateNode = a.stateNode), (c.alternate = a), (a.alternate = c)) : ((c.pendingProps = b), (c.effectTag = 0), (c.nextEffect = null), (c.firstEffect = null), (c.lastEffect = null)); c.childExpirationTime = a.childExpirationTime; c.expirationTime = a.expirationTime; c.child = a.child; c.memoizedProps = a.memoizedProps; c.memoizedState = a.memoizedState; c.updateQueue = a.updateQueue; b = a.dependencies; c.dependencies = null === b ? null : { expirationTime: b.expirationTime, firstContext: b.firstContext, responders: b.responders, }; c.sibling = a.sibling; c.index = a.index; c.ref = a.ref; return c; } function hd(a, b, c, d, e, f) { var g = 2; d = a; if ("function" === typeof a) te(a) && (g = 1); else if ("string" === typeof a) g = 5; else a: switch (a) { case ea: return jd(c.children, e, f, b); case ka: g = 8; e |= 7; break; case fa: g = 8; e |= 1; break; case ha: return ( (a = he(12, c, b, e | 8)), (a.elementType = ha), (a.type = ha), (a.expirationTime = f), a ); case ma: return ( (a = he(13, c, b, e)), (a.type = ma), (a.elementType = ma), (a.expirationTime = f), a ); case na: return ( (a = he(19, c, b, e)), (a.elementType = na), (a.expirationTime = f), a ); default: if ("object" === typeof a && null !== a) switch (a.$$typeof) { case ia: g = 10; break a; case ja: g = 9; break a; case la: g = 11; break a; case oa: g = 14; break a; case pa: g = 16; d = null; break a; } throw Error( n(130, null == a ? a : typeof a, "") ); } b = he(g, c, b, e); b.elementType = a; b.type = d; b.expirationTime = f; return b; } function jd(a, b, c, d) { a = he(7, a, d, b); a.expirationTime = c; return a; } function gd(a, b, c) { a = he(6, a, null, b); a.expirationTime = c; return a; } function id(a, b, c) { b = he(4, null !== a.children ? a.children : [], a.key, b); b.expirationTime = c; b.stateNode = { containerInfo: a.containerInfo, pendingChildren: null, implementation: a.implementation, }; return b; } function rg(a, b, c) { this.tag = b; this.current = null; this.containerInfo = a; this.pingCache = this.pendingChildren = null; this.finishedExpirationTime = 0; this.finishedWork = null; this.timeoutHandle = Oa; this.pendingContext = this.context = null; this.hydrate = c; this.callbackNode = null; this.callbackPriority = 90; this.lastExpiredTime = this.lastPingedTime = this.nextKnownPendingLevel = this.lastSuspendedTime = this.firstSuspendedTime = this.firstPendingTime = 0; } function Sf(a, b) { var c = a.firstSuspendedTime; a = a.lastSuspendedTime; return 0 !== c && c >= b && a <= b; } function Pf(a, b) { var c = a.firstSuspendedTime, d = a.lastSuspendedTime; c < b && (a.firstSuspendedTime = b); if (d > b || 0 === c) a.lastSuspendedTime = b; b <= a.lastPingedTime && (a.lastPingedTime = 0); b <= a.lastExpiredTime && (a.lastExpiredTime = 0); } function Qf(a, b) { b > a.firstPendingTime && (a.firstPendingTime = b); var c = a.firstSuspendedTime; 0 !== c && (b >= c ? (a.firstSuspendedTime = a.lastSuspendedTime = a.nextKnownPendingLevel = 0) : b >= a.lastSuspendedTime && (a.lastSuspendedTime = b + 1), b > a.nextKnownPendingLevel && (a.nextKnownPendingLevel = b)); } function Uf(a, b) { var c = a.lastExpiredTime; if (0 === c || c > b) a.lastExpiredTime = b; } function sg(a) { var b = a._reactInternalFiber; if (void 0 === b) { if ("function" === typeof a.render) throw Error(n(188)); throw Error(n(268, Object.keys(a))); } a = xa(b); return null === a ? null : a.stateNode; } function tg(a, b) { a = a.memoizedState; null !== a && null !== a.dehydrated && a.retryTime < b && (a.retryTime = b); } function ug(a, b) { tg(a, b); (a = a.alternate) && tg(a, b); } var vg = { createContainer: function (a, b, c) { a = new rg(a, b, c); b = he(3, null, null, 2 === b ? 7 : 1 === b ? 3 : 0); a.current = b; return (b.stateNode = a); }, updateContainer: function (a, b, c, d) { var e = b.current, f = G(), g = Sc.suspense; f = Vc(f, e, g); a: if (c) { c = c._reactInternalFiber; b: { if (ua(c) !== c || 1 !== c.tag) throw Error(n(170)); var l = c; do { switch (l.tag) { case 3: l = l.stateNode.context; break b; case 1: if (C(l.type)) { l = l.stateNode .__reactInternalMemoizedMergedChildContext; break b; } } l = l.return; } while (null !== l); throw Error(n(171)); } if (1 === c.tag) { var h = c.type; if (C(h)) { c = Jb(c, h, l); break a; } } c = l; } else c = Db; null === b.context ? (b.context = c) : (b.pendingContext = c); b = Gc(f, g); b.payload = { element: a }; d = void 0 === d ? null : d; null !== d && (b.callback = d); Ic(e, b); Wc(e, f); return f; }, batchedEventUpdates: function (a, b) { var c = T; T |= 2; try { return a(b); } finally { (T = c), T === R && F(); } }, batchedUpdates: function (a, b) { var c = T; T |= 1; try { return a(b); } finally { (T = c), T === R && F(); } }, unbatchedUpdates: function (a, b) { var c = T; T &= -2; T |= rf; try { return a(b); } finally { (T = c), T === R && F(); } }, deferredUpdates: function (a) { return hc(97, a); }, syncUpdates: function (a, b, c, d) { return hc(99, a.bind(null, b, c, d)); }, discreteUpdates: function (a, b, c, d) { var e = T; T |= 4; try { return hc(98, a.bind(null, b, c, d)); } finally { (T = e), T === R && F(); } }, flushDiscreteUpdates: function () { (T & (1 | S | sf)) === R && (dg(), Vf()); }, flushControlled: function (a) { var b = T; T |= 1; try { hc(99, a); } finally { (T = b), T === R && F(); } }, flushSync: eg, flushPassiveEffects: Vf, IsThisRendererActing: { current: !1 }, getPublicRootInstance: function (a) { a = a.current; if (!a.child) return null; switch (a.child.tag) { case 5: return za(a.child.stateNode); default: return a.child.stateNode; } }, attemptSynchronousHydration: function (a) { switch (a.tag) { case 3: var b = a.stateNode; b.hydrate && cg(b, b.firstPendingTime); break; case 13: eg(function () { return Wc(a, 1073741823); }), (b = mc(G(), 150, 100)), ug(a, b); } }, attemptUserBlockingHydration: function (a) { if (13 === a.tag) { var b = mc(G(), 150, 100); Wc(a, b); ug(a, b); } }, attemptContinuousHydration: function (a) { if (13 === a.tag) { G(); var b = lc++; Wc(a, b); ug(a, b); } }, attemptHydrationAtCurrentPriority: function (a) { if (13 === a.tag) { var b = G(); b = Vc(b, a, null); Wc(a, b); ug(a, b); } }, findHostInstance: sg, findHostInstanceWithWarning: function (a) { return sg(a); }, findHostInstanceWithNoPortals: function (a) { a = ya(a); return null === a ? null : 20 === a.tag ? a.stateNode.instance : a.stateNode; }, shouldSuspend: function () { return !1; }, injectIntoDevTools: function (a) { var b = a.findFiberByHostInstance; return pg( aa({}, a, { overrideHookState: null, overrideProps: null, setSuspenseHandler: null, scheduleUpdate: null, currentDispatcherRef: q.ReactCurrentDispatcher, findHostInstanceByFiber: function (a) { a = xa(a); return null === a ? null : a.stateNode; }, findFiberByHostInstance: function (a) { return b ? b(a) : null; }, findHostInstancesForRefresh: null, scheduleRefresh: null, scheduleRoot: null, setRefreshHandler: null, getCurrentFiber: null, }) ); }, }; module.exports = vg.default || vg; var $$$renderer = module.exports; module.exports = $$$reconciler; return $$$renderer; }; /***/ }, /***/ 8448: /***/ function ( module, __unused_webpack_exports, __webpack_require__ ) { "use strict"; if (true) { module.exports = __webpack_require__(7287); } else { } /***/ }, /***/ 2546: /***/ function (__unused_webpack_module, exports) { "use strict"; /** @license React v0.17.0 * scheduler.production.min.js * * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ Object.defineProperty(exports, "__esModule", { value: !0 }); var f, g, h, k, l; if ( "undefined" === typeof window || "function" !== typeof MessageChannel ) { var p = null, q = null, t = function () { if (null !== p) try { var a = exports.unstable_now(); p(!0, a); p = null; } catch (b) { throw (setTimeout(t, 0), b); } }, u = Date.now(); exports.unstable_now = function () { return Date.now() - u; }; f = function (a) { null !== p ? setTimeout(f, 0, a) : ((p = a), setTimeout(t, 0)); }; g = function (a, b) { q = setTimeout(a, b); }; h = function () { clearTimeout(q); }; k = function () { return !1; }; l = exports.unstable_forceFrameRate = function () {}; } else { var w = window.performance, x = window.Date, y = window.setTimeout, z = window.clearTimeout, A = window.requestAnimationFrame, B = window.cancelAnimationFrame; "undefined" !== typeof console && ("function" !== typeof A && console.error( "This browser doesn't support requestAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills" ), "function" !== typeof B && console.error( "This browser doesn't support cancelAnimationFrame. Make sure that you load a polyfill in older browsers. https://fb.me/react-polyfills" )); if ("object" === typeof w && "function" === typeof w.now) exports.unstable_now = function () { return w.now(); }; else { var C = x.now(); exports.unstable_now = function () { return x.now() - C; }; } var D = !1, E = null, F = -1, G = 5, H = 0; k = function () { return exports.unstable_now() >= H; }; l = function () {}; exports.unstable_forceFrameRate = function (a) { 0 > a || 125 < a ? console.error( "forceFrameRate takes a positive int between 0 and 125, forcing framerates higher than 125 fps is not unsupported" ) : (G = 0 < a ? Math.floor(1e3 / a) : 33.33); }; var I = new MessageChannel(), J = I.port2; I.port1.onmessage = function () { if (null !== E) { var a = exports.unstable_now(); H = a + G; try { E(!0, a) ? J.postMessage(null) : ((D = !1), (E = null)); } catch (b) { throw (J.postMessage(null), b); } } else D = !1; }; f = function (a) { E = a; D || ((D = !0), J.postMessage(null)); }; g = function (a, b) { F = y(function () { a(exports.unstable_now()); }, b); }; h = function () { z(F); F = -1; }; } function K(a, b) { var c = a.length; a.push(b); a: for (;;) { var d = Math.floor((c - 1) / 2), e = a[d]; if (void 0 !== e && 0 < L(e, b)) (a[d] = b), (a[c] = e), (c = d); else break a; } } function M(a) { a = a[0]; return void 0 === a ? null : a; } function N(a) { var b = a[0]; if (void 0 !== b) { var c = a.pop(); if (c !== b) { a[0] = c; a: for (var d = 0, e = a.length; d < e; ) { var m = 2 * (d + 1) - 1, n = a[m], v = m + 1, r = a[v]; if (void 0 !== n && 0 > L(n, c)) void 0 !== r && 0 > L(r, n) ? ((a[d] = r), (a[v] = c), (d = v)) : ((a[d] = n), (a[m] = c), (d = m)); else if (void 0 !== r && 0 > L(r, c)) (a[d] = r), (a[v] = c), (d = v); else break a; } } return b; } return null; } function L(a, b) { var c = a.sortIndex - b.sortIndex; return 0 !== c ? c : a.id - b.id; } var O = [], P = [], Q = 1, R = null, S = 3, T = !1, U = !1, V = !1; function W(a) { for (var b = M(P); null !== b; ) { if (null === b.callback) N(P); else if (b.startTime <= a) N(P), (b.sortIndex = b.expirationTime), K(O, b); else break; b = M(P); } } function X(a) { V = !1; W(a); if (!U) if (null !== M(O)) (U = !0), f(Y); else { var b = M(P); null !== b && g(X, b.startTime - a); } } function Y(a, b) { U = !1; V && ((V = !1), h()); T = !0; var c = S; try { W(b); for ( R = M(O); null !== R && (!(R.expirationTime > b) || (a && !k())); ) { var d = R.callback; if (null !== d) { R.callback = null; S = R.priorityLevel; var e = d(R.expirationTime <= b); b = exports.unstable_now(); "function" === typeof e ? (R.callback = e) : R === M(O) && N(O); W(b); } else N(O); R = M(O); } if (null !== R) var m = !0; else { var n = M(P); null !== n && g(X, n.startTime - b); m = !1; } return m; } finally { (R = null), (S = c), (T = !1); } } function Z(a) { switch (a) { case 1: return -1; case 2: return 250; case 5: return 1073741823; case 4: return 1e4; default: return 5e3; } } var aa = l; exports.unstable_ImmediatePriority = 1; exports.unstable_UserBlockingPriority = 2; exports.unstable_NormalPriority = 3; exports.unstable_IdlePriority = 5; exports.unstable_LowPriority = 4; exports.unstable_runWithPriority = function (a, b) { switch (a) { case 1: case 2: case 3: case 4: case 5: break; default: a = 3; } var c = S; S = a; try { return b(); } finally { S = c; } }; exports.unstable_next = function (a) { switch (S) { case 1: case 2: case 3: var b = 3; break; default: b = S; } var c = S; S = b; try { return a(); } finally { S = c; } }; exports.unstable_scheduleCallback = function (a, b, c) { var d = exports.unstable_now(); if ("object" === typeof c && null !== c) { var e = c.delay; e = "number" === typeof e && 0 < e ? d + e : d; c = "number" === typeof c.timeout ? c.timeout : Z(a); } else (c = Z(a)), (e = d); c = e + c; a = { id: Q++, callback: b, priorityLevel: a, startTime: e, expirationTime: c, sortIndex: -1, }; e > d ? ((a.sortIndex = e), K(P, a), null === M(O) && a === M(P) && (V ? h() : (V = !0), g(X, e - d))) : ((a.sortIndex = c), K(O, a), U || T || ((U = !0), f(Y))); return a; }; exports.unstable_cancelCallback = function (a) { a.callback = null; }; exports.unstable_wrapCallback = function (a) { var b = S; return function () { var c = S; S = b; try { return a.apply(this, arguments); } finally { S = c; } }; }; exports.unstable_getCurrentPriorityLevel = function () { return S; }; exports.unstable_shouldYield = function () { var a = exports.unstable_now(); W(a); var b = M(O); return ( (b !== R && null !== R && null !== b && null !== b.callback && b.startTime <= a && b.expirationTime < R.expirationTime) || k() ); }; exports.unstable_requestPaint = aa; exports.unstable_continueExecution = function () { U || T || ((U = !0), f(Y)); }; exports.unstable_pauseExecution = function () {}; exports.unstable_getFirstCallbackNode = function () { return M(O); }; exports.unstable_Profiling = null; /***/ }, /***/ 373: /***/ function ( module, __unused_webpack_exports, __webpack_require__ ) { "use strict"; if (true) { module.exports = __webpack_require__(2546); } else { } /***/ }, /***/ 3697: /***/ function ( module, __unused_webpack_exports, __webpack_require__ ) { "use strict"; var functionsHaveConfigurableNames = __webpack_require__(5972).functionsHaveConfigurableNames(); 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.hasIndices) { result += "d"; } 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; }; if (functionsHaveConfigurableNames && Object.defineProperty) { Object.defineProperty(module.exports, "name", { value: "get flags", }); } /***/ }, /***/ 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(getPolyfill()); 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; module.exports = function getPolyfill() { if (supportsDescriptors && /a/gim.flags === "gim") { var descriptor = $gOPD(RegExp.prototype, "flags"); if ( descriptor && typeof descriptor.get === "function" && typeof RegExp.prototype.dotAll === "boolean" && typeof RegExp.prototype.hasIndices === "boolean" ) { /* eslint getter-return: 0 */ var calls = ""; var o = {}; Object.defineProperty(o, "hasIndices", { get: function () { calls += "d"; }, }); Object.defineProperty(o, "sticky", { get: function () { calls += "y"; }, }); if (calls === "dy") { 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; }; /***/ }, /***/ 7887: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { // Generated by CoffeeScript 1.7.1 (function () { var key, val, _ref, _ref1; exports.EncodeStream = __webpack_require__(3228); exports.DecodeStream = __webpack_require__(2903); exports.Array = __webpack_require__(8987); exports.LazyArray = __webpack_require__(1296); exports.Bitfield = __webpack_require__(9194); exports.Boolean = __webpack_require__(3522); exports.Buffer = __webpack_require__(3146); exports.Enum = __webpack_require__(5551); exports.Optional = __webpack_require__(5506); exports.Reserved = __webpack_require__(714); exports.String = __webpack_require__(6020); exports.Struct = __webpack_require__(1124); exports.VersionedStruct = __webpack_require__(4180); _ref = __webpack_require__(3660); for (key in _ref) { val = _ref[key]; exports[key] = val; } _ref1 = __webpack_require__(704); for (key in _ref1) { val = _ref1[key]; exports[key] = val; } }.call(this)); /***/ }, /***/ 8987: /***/ function ( module, __unused_webpack_exports, __webpack_require__ ) { // Generated by CoffeeScript 1.7.1 (function () { var ArrayT, NumberT, utils; NumberT = __webpack_require__(3660).Number; utils = __webpack_require__(2022); ArrayT = (function () { function ArrayT(type, length, lengthType) { this.type = type; this.length = length; this.lengthType = lengthType != null ? lengthType : "count"; } ArrayT.prototype.decode = function (stream, parent) { var ctx, i, length, pos, res, target, _i; pos = stream.pos; res = []; ctx = parent; if (this.length != null) { length = utils.resolveLength( this.length, stream, parent ); } if (this.length instanceof NumberT) { 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") { target = length != null ? stream.pos + length : (parent != null ? parent._length : void 0) ? parent._startOffset + parent._length : stream.length; while (stream.pos < target) { res.push(this.type.decode(stream, ctx)); } } else { for (i = _i = 0; _i < length; i = _i += 1) { res.push(this.type.decode(stream, ctx)); } } return res; }; ArrayT.prototype.size = function (array, ctx) { var item, size, _i, _len; if (!array) { return ( this.type.size(null, ctx) * utils.resolveLength(this.length, null, ctx) ); } size = 0; if (this.length instanceof NumberT) { size += this.length.size(); ctx = { parent: ctx, }; } for (_i = 0, _len = array.length; _i < _len; _i++) { item = array[_i]; size += this.type.size(item, ctx); } return size; }; ArrayT.prototype.encode = function (stream, array, parent) { var ctx, i, item, ptr, _i, _len; 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 (_i = 0, _len = array.length; _i < _len; _i++) { item = array[_i]; this.type.encode(stream, item, ctx); } if (this.length instanceof NumberT) { i = 0; while (i < ctx.pointers.length) { ptr = ctx.pointers[i++]; ptr.type.encode(stream, ptr.val); } } }; return ArrayT; })(); module.exports = ArrayT; }.call(this)); /***/ }, /***/ 9194: /***/ function (module) { // Generated by CoffeeScript 1.7.1 (function () { var Bitfield; Bitfield = (function () { function Bitfield(type, flags) { this.type = type; this.flags = flags != null ? flags : []; } Bitfield.prototype.decode = function (stream) { var flag, i, res, val, _i, _len, _ref; val = this.type.decode(stream); res = {}; _ref = this.flags; for ( i = _i = 0, _len = _ref.length; _i < _len; i = ++_i ) { flag = _ref[i]; if (flag != null) { res[flag] = !!(val & (1 << i)); } } return res; }; Bitfield.prototype.size = function () { return this.type.size(); }; Bitfield.prototype.encode = function (stream, keys) { var flag, i, val, _i, _len, _ref; val = 0; _ref = this.flags; for ( i = _i = 0, _len = _ref.length; _i < _len; i = ++_i ) { flag = _ref[i]; if (flag != null) { if (keys[flag]) { val |= 1 << i; } } } return this.type.encode(stream, val); }; return Bitfield; })(); module.exports = Bitfield; }.call(this)); /***/ }, /***/ 3522: /***/ function (module) { // Generated by CoffeeScript 1.7.1 (function () { var BooleanT; BooleanT = (function () { function BooleanT(type) { this.type = type; } BooleanT.prototype.decode = function (stream, parent) { return !!this.type.decode(stream, parent); }; BooleanT.prototype.size = function (val, parent) { return this.type.size(val, parent); }; BooleanT.prototype.encode = function (stream, val, parent) { return this.type.encode(stream, +val, parent); }; return BooleanT; })(); module.exports = BooleanT; }.call(this)); /***/ }, /***/ 3146: /***/ function ( module, __unused_webpack_exports, __webpack_require__ ) { // Generated by CoffeeScript 1.7.1 (function () { var BufferT, NumberT, utils; utils = __webpack_require__(2022); NumberT = __webpack_require__(3660).Number; BufferT = (function () { function BufferT(length) { this.length = length; } BufferT.prototype.decode = function (stream, parent) { var length; length = utils.resolveLength( this.length, stream, parent ); return stream.readBuffer(length); }; BufferT.prototype.size = function (val, parent) { if (!val) { return utils.resolveLength( this.length, null, parent ); } return val.length; }; BufferT.prototype.encode = function (stream, buf, parent) { if (this.length instanceof NumberT) { this.length.encode(stream, buf.length); } return stream.writeBuffer(buf); }; return BufferT; })(); module.exports = BufferT; }.call(this)); /***/ }, /***/ 2903: /***/ function ( module, __unused_webpack_exports, __webpack_require__ ) { /* provided dependency */ var Buffer = __webpack_require__(1876)["Buffer"]; // Generated by CoffeeScript 1.7.1 (function () { var DecodeStream, iconv; try { iconv = __webpack_require__( Object( (function webpackMissingModule() { var e = new Error( "Cannot find module 'iconv-lite'" ); e.code = "MODULE_NOT_FOUND"; throw e; })() ) ); } catch (_error) {} DecodeStream = (function () { var key; function DecodeStream(buffer) { this.buffer = buffer; this.pos = 0; this.length = this.buffer.length; } DecodeStream.TYPES = { UInt8: 1, UInt16: 2, UInt24: 3, UInt32: 4, Int8: 1, Int16: 2, Int24: 3, Int32: 4, Float: 4, Double: 8, }; for (key in Buffer.prototype) { if (key.slice(0, 4) === "read") { (function (key) { var bytes; bytes = DecodeStream.TYPES[ key.replace(/read|[BL]E/g, "") ]; return (DecodeStream.prototype[key] = function () { var ret; ret = this.buffer[key](this.pos); this.pos += bytes; return ret; }); })(key); } } DecodeStream.prototype.readString = function ( length, encoding ) { var buf, byte, i, _i, _ref; if (encoding == null) { encoding = "ascii"; } switch (encoding) { case "utf16le": case "ucs2": case "utf8": case "ascii": return this.buffer.toString( encoding, this.pos, (this.pos += length) ); case "utf16be": buf = new Buffer(this.readBuffer(length)); for ( i = _i = 0, _ref = buf.length - 1; _i < _ref; i = _i += 2 ) { 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 (_error) {} } return buf; } }; DecodeStream.prototype.readBuffer = function (length) { return this.buffer.slice( this.pos, (this.pos += length) ); }; DecodeStream.prototype.readUInt24BE = function () { return (this.readUInt16BE() << 8) + this.readUInt8(); }; DecodeStream.prototype.readUInt24LE = function () { return this.readUInt16LE() + (this.readUInt8() << 16); }; DecodeStream.prototype.readInt24BE = function () { return (this.readInt16BE() << 8) + this.readUInt8(); }; DecodeStream.prototype.readInt24LE = function () { return this.readUInt16LE() + (this.readInt8() << 16); }; return DecodeStream; })(); module.exports = DecodeStream; }.call(this)); /***/ }, /***/ 3228: /***/ function ( module, __unused_webpack_exports, __webpack_require__ ) { /* provided dependency */ var Buffer = __webpack_require__(1876)["Buffer"]; // Generated by CoffeeScript 1.7.1 (function () { var DecodeStream, EncodeStream, iconv, stream, __hasProp = {}.hasOwnProperty, __extends = function (child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; stream = __webpack_require__(9681); DecodeStream = __webpack_require__(2903); try { iconv = __webpack_require__( Object( (function webpackMissingModule() { var e = new Error( "Cannot find module 'iconv-lite'" ); e.code = "MODULE_NOT_FOUND"; throw e; })() ) ); } catch (_error) {} EncodeStream = (function (_super) { var key; __extends(EncodeStream, _super); function EncodeStream(bufferSize) { if (bufferSize == null) { bufferSize = 65536; } EncodeStream.__super__.constructor.apply( this, arguments ); this.buffer = new Buffer(bufferSize); this.bufferOffset = 0; this.pos = 0; } for (key in Buffer.prototype) { if (key.slice(0, 5) === "write") { (function (key) { var bytes; bytes = +DecodeStream.TYPES[ key.replace(/write|[BL]E/g, "") ]; return (EncodeStream.prototype[key] = function ( value ) { this.ensure(bytes); this.buffer[key](value, this.bufferOffset); this.bufferOffset += bytes; return (this.pos += bytes); }); })(key); } } EncodeStream.prototype._read = function () {}; EncodeStream.prototype.ensure = function (bytes) { if (this.bufferOffset + bytes > this.buffer.length) { return this.flush(); } }; EncodeStream.prototype.flush = function () { if (this.bufferOffset > 0) { this.push( new Buffer( this.buffer.slice(0, this.bufferOffset) ) ); return (this.bufferOffset = 0); } }; EncodeStream.prototype.writeBuffer = function (buffer) { this.flush(); this.push(buffer); return (this.pos += buffer.length); }; EncodeStream.prototype.writeString = function ( string, encoding ) { var buf, byte, i, _i, _ref; if (encoding == null) { encoding = "ascii"; } switch (encoding) { case "utf16le": case "ucs2": case "utf8": case "ascii": return this.writeBuffer( new Buffer(string, encoding) ); case "utf16be": buf = new Buffer(string, "utf16le"); for ( i = _i = 0, _ref = buf.length - 1; _i < _ref; i = _i += 2 ) { 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." ); } } }; EncodeStream.prototype.writeUInt24BE = function (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); }; EncodeStream.prototype.writeUInt24LE = function (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); }; EncodeStream.prototype.writeInt24BE = function (val) { if (val >= 0) { return this.writeUInt24BE(val); } else { return this.writeUInt24BE(val + 0xffffff + 1); } }; EncodeStream.prototype.writeInt24LE = function (val) { if (val >= 0) { return this.writeUInt24LE(val); } else { return this.writeUInt24LE(val + 0xffffff + 1); } }; EncodeStream.prototype.fill = function (val, length) { var buf; 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 { buf = new Buffer(length); buf.fill(val); return this.writeBuffer(buf); } }; EncodeStream.prototype.end = function () { this.flush(); return this.push(null); }; return EncodeStream; })(stream.Readable); module.exports = EncodeStream; }.call(this)); /***/ }, /***/ 5551: /***/ function (module) { // Generated by CoffeeScript 1.7.1 (function () { var Enum; Enum = (function () { function Enum(type, options) { this.type = type; this.options = options != null ? options : []; } Enum.prototype.decode = function (stream) { var index; index = this.type.decode(stream); return this.options[index] || index; }; Enum.prototype.size = function () { return this.type.size(); }; Enum.prototype.encode = function (stream, val) { var index; 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; }.call(this)); /***/ }, /***/ 1296: /***/ function ( module, __unused_webpack_exports, __webpack_require__ ) { // Generated by CoffeeScript 1.7.1 (function () { var ArrayT, LazyArray, LazyArrayT, NumberT, inspect, utils, __hasProp = {}.hasOwnProperty, __extends = function (child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; ArrayT = __webpack_require__(8987); NumberT = __webpack_require__(3660).Number; utils = __webpack_require__(2022); inspect = __webpack_require__(9720).inspect; LazyArrayT = (function (_super) { __extends(LazyArrayT, _super); function LazyArrayT() { return LazyArrayT.__super__.constructor.apply( this, arguments ); } LazyArrayT.prototype.decode = function (stream, parent) { var length, pos, res; pos = stream.pos; length = utils.resolveLength( this.length, stream, parent ); if (this.length instanceof NumberT) { parent = { parent: parent, _startOffset: pos, _currentOffset: 0, _length: length, }; } res = new LazyArray(this.type, length, stream, parent); stream.pos += length * this.type.size(null, parent); return res; }; LazyArrayT.prototype.size = function (val, ctx) { if (val instanceof LazyArray) { val = val.toArray(); } return LazyArrayT.__super__.size.call(this, val, ctx); }; LazyArrayT.prototype.encode = function (stream, val, ctx) { if (val instanceof LazyArray) { val = val.toArray(); } return LazyArrayT.__super__.encode.call( this, stream, val, ctx ); }; return LazyArrayT; })(ArrayT); LazyArray = (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 = []; } LazyArray.prototype.get = function (index) { var pos; if (index < 0 || index >= this.length) { return void 0; } if (this.items[index] == null) { 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]; }; LazyArray.prototype.toArray = function () { var i, _i, _ref, _results; _results = []; for ( i = _i = 0, _ref = this.length; _i < _ref; i = _i += 1 ) { _results.push(this.get(i)); } return _results; }; LazyArray.prototype.inspect = function () { return inspect(this.toArray()); }; return LazyArray; })(); module.exports = LazyArrayT; }.call(this)); /***/ }, /***/ 3660: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { // Generated by CoffeeScript 1.7.1 (function () { var DecodeStream, Fixed, NumberT, __hasProp = {}.hasOwnProperty, __extends = function (child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; DecodeStream = __webpack_require__(2903); NumberT = (function () { function NumberT(type, endian) { this.type = type; this.endian = endian != null ? endian : "BE"; this.fn = this.type; if (this.type[this.type.length - 1] !== "8") { this.fn += this.endian; } } NumberT.prototype.size = function () { return DecodeStream.TYPES[this.type]; }; NumberT.prototype.decode = function (stream) { return stream["read" + this.fn](); }; NumberT.prototype.encode = function (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"); Fixed = (function (_super) { __extends(Fixed, _super); function Fixed(size, endian, fracBits) { if (fracBits == null) { fracBits = size >> 1; } Fixed.__super__.constructor.call( this, "Int" + size, endian ); this._point = 1 << fracBits; } Fixed.prototype.decode = function (stream) { return ( Fixed.__super__.decode.call(this, stream) / this._point ); }; Fixed.prototype.encode = function (stream, val) { return Fixed.__super__.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"); }.call(this)); /***/ }, /***/ 5506: /***/ function (module) { // Generated by CoffeeScript 1.7.1 (function () { var Optional; Optional = (function () { function Optional(type, condition) { this.type = type; this.condition = condition != null ? condition : true; } Optional.prototype.decode = function (stream, parent) { var condition; condition = this.condition; if (typeof condition === "function") { condition = condition.call(parent, parent); } if (condition) { return this.type.decode(stream, parent); } }; Optional.prototype.size = function (val, parent) { var condition; condition = this.condition; if (typeof condition === "function") { condition = condition.call(parent, parent); } if (condition) { return this.type.size(val, parent); } else { return 0; } }; Optional.prototype.encode = function (stream, val, parent) { var condition; 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; }.call(this)); /***/ }, /***/ 704: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { // Generated by CoffeeScript 1.7.1 (function () { var Pointer, VoidPointer, utils; utils = __webpack_require__(2022); Pointer = (function () { function Pointer(offsetType, type, options) { var _base, _base1, _base2, _base3; this.offsetType = offsetType; this.type = type; this.options = options != null ? options : {}; if (this.type === "void") { this.type = null; } if ((_base = this.options).type == null) { _base.type = "local"; } if ((_base1 = this.options).allowNull == null) { _base1.allowNull = true; } if ((_base2 = this.options).nullValue == null) { _base2.nullValue = 0; } if ((_base3 = this.options).lazy == null) { _base3.lazy = false; } if (this.options.relativeTo) { this.relativeToGetter = new Function( "ctx", "return ctx." + this.options.relativeTo ); } } Pointer.prototype.decode = function (stream, ctx) { var c, decodeValue, offset, ptr, relative, val; offset = this.offsetType.decode(stream, ctx); if ( offset === this.options.nullValue && this.options.allowNull ) { return null; } relative = function () { switch (this.options.type) { case "local": return ctx._startOffset; case "immediate": return stream.pos - this.offsetType.size(); case "parent": return ctx.parent._startOffset; default: c = ctx; while (c.parent) { c = c.parent; } return c._startOffset || 0; } }.call(this); if (this.options.relativeTo) { relative += this.relativeToGetter(ctx); } ptr = offset + relative; if (this.type != null) { val = null; decodeValue = (function (_this) { return function () { var pos; if (val != null) { return val; } pos = stream.pos; stream.pos = ptr; val = _this.type.decode(stream, ctx); stream.pos = pos; return val; }; })(this); if (this.options.lazy) { return new utils.PropertyDescriptor({ get: decodeValue, }); } return decodeValue(); } else { return ptr; } }; Pointer.prototype.size = function (val, ctx) { var parent, type; parent = ctx; switch (this.options.type) { case "local": case "immediate": break; case "parent": ctx = ctx.parent; break; default: while (ctx.parent) { ctx = ctx.parent; } } type = this.type; if (type == null) { if (!(val instanceof VoidPointer)) { throw new Error("Must be a VoidPointer"); } type = val.type; val = val.value; } if (val && ctx) { ctx.pointerSize += type.size(val, parent); } return this.offsetType.size(); }; Pointer.prototype.encode = function (stream, val, ctx) { var parent, relative, type; 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: relative = 0; while (ctx.parent) { ctx = ctx.parent; } } if (this.options.relativeTo) { relative += this.relativeToGetter(parent.val); } this.offsetType.encode( stream, ctx.pointerOffset - relative ); type = this.type; if (type == null) { if (!(val instanceof VoidPointer)) { throw new Error("Must be a VoidPointer"); } type = val.type; val = val.value; } ctx.pointers.push({ type: type, val: val, parent: parent, }); return (ctx.pointerOffset += type.size(val, parent)); }; return Pointer; })(); VoidPointer = (function () { function VoidPointer(type, value) { this.type = type; this.value = value; } return VoidPointer; })(); exports.Pointer = Pointer; exports.VoidPointer = VoidPointer; }.call(this)); /***/ }, /***/ 714: /***/ function ( module, __unused_webpack_exports, __webpack_require__ ) { // Generated by CoffeeScript 1.7.1 (function () { var Reserved, utils; utils = __webpack_require__(2022); Reserved = (function () { function Reserved(type, count) { this.type = type; this.count = count != null ? count : 1; } Reserved.prototype.decode = function (stream, parent) { stream.pos += this.size(null, parent); return void 0; }; Reserved.prototype.size = function (data, parent) { var count; count = utils.resolveLength(this.count, null, parent); return this.type.size() * count; }; Reserved.prototype.encode = function (stream, val, parent) { return stream.fill(0, this.size(val, parent)); }; return Reserved; })(); module.exports = Reserved; }.call(this)); /***/ }, /***/ 6020: /***/ function ( module, __unused_webpack_exports, __webpack_require__ ) { /* provided dependency */ var Buffer = __webpack_require__(1876)["Buffer"]; // Generated by CoffeeScript 1.7.1 (function () { var NumberT, StringT, utils; NumberT = __webpack_require__(3660).Number; utils = __webpack_require__(2022); StringT = (function () { function StringT(length, encoding) { this.length = length; this.encoding = encoding != null ? encoding : "ascii"; } StringT.prototype.decode = function (stream, parent) { var buffer, encoding, length, pos, string; length = function () { if (this.length != null) { return utils.resolveLength( this.length, stream, parent ); } else { (buffer = stream.buffer), (length = stream.length), (pos = stream.pos); while (pos < length && buffer[pos] !== 0x00) { ++pos; } return pos - stream.pos; } }.call(this); encoding = this.encoding; if (typeof encoding === "function") { encoding = encoding.call(parent, parent) || "ascii"; } string = stream.readString(length, encoding); if (this.length == null && stream.pos < stream.length) { stream.pos++; } return string; }; StringT.prototype.size = function (val, parent) { var encoding, size; if (!val) { return utils.resolveLength( this.length, null, parent ); } encoding = this.encoding; if (typeof encoding === "function") { encoding = encoding.call( parent != null ? parent.val : void 0, parent != null ? parent.val : void 0 ) || "ascii"; } if (encoding === "utf16be") { encoding = "utf16le"; } size = Buffer.byteLength(val, encoding); if (this.length instanceof NumberT) { size += this.length.size(); } if (this.length == null) { size++; } return size; }; StringT.prototype.encode = function (stream, val, parent) { var encoding; encoding = this.encoding; if (typeof encoding === "function") { encoding = encoding.call( parent != null ? parent.val : void 0, parent != null ? parent.val : void 0 ) || "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; }.call(this)); /***/ }, /***/ 1124: /***/ function ( module, __unused_webpack_exports, __webpack_require__ ) { // Generated by CoffeeScript 1.7.1 (function () { var Struct, utils; utils = __webpack_require__(2022); Struct = (function () { function Struct(fields) { this.fields = fields != null ? fields : {}; } Struct.prototype.decode = function ( stream, parent, length ) { var res, _ref; if (length == null) { length = 0; } res = this._setup(stream, parent, length); this._parseFields(stream, res, this.fields); if ((_ref = this.process) != null) { _ref.call(res, stream); } return res; }; Struct.prototype._setup = function ( stream, parent, length ) { var res; res = {}; Object.defineProperties(res, { parent: { value: parent, }, _startOffset: { value: stream.pos, }, _currentOffset: { value: 0, writable: true, }, _length: { value: length, }, }); return res; }; Struct.prototype._parseFields = function ( stream, res, fields ) { var key, type, val; for (key in fields) { type = fields[key]; if (typeof type === "function") { val = type.call(res, res); } else { val = type.decode(stream, res); } if (val !== void 0) { if (val instanceof utils.PropertyDescriptor) { Object.defineProperty(res, key, val); } else { res[key] = val; } } res._currentOffset = stream.pos - res._startOffset; } }; Struct.prototype.size = function ( val, parent, includePointers ) { var ctx, key, size, type, _ref; if (val == null) { val = {}; } if (includePointers == null) { includePointers = true; } ctx = { parent: parent, val: val, pointerSize: 0, }; size = 0; _ref = this.fields; for (key in _ref) { type = _ref[key]; if (type.size != null) { size += type.size(val[key], ctx); } } if (includePointers) { size += ctx.pointerSize; } return size; }; Struct.prototype.encode = function (stream, val, parent) { var ctx, i, key, ptr, type, _ref, _ref1; if ((_ref = this.preEncode) != null) { _ref.call(val, stream); } ctx = { pointers: [], startOffset: stream.pos, parent: parent, val: val, pointerSize: 0, }; ctx.pointerOffset = stream.pos + this.size(val, ctx, false); _ref1 = this.fields; for (key in _ref1) { type = _ref1[key]; if (type.encode != null) { type.encode(stream, val[key], ctx); } } i = 0; while (i < ctx.pointers.length) { ptr = ctx.pointers[i++]; ptr.type.encode(stream, ptr.val, ptr.parent); } }; return Struct; })(); module.exports = Struct; }.call(this)); /***/ }, /***/ 4180: /***/ function ( module, __unused_webpack_exports, __webpack_require__ ) { // Generated by CoffeeScript 1.7.1 (function () { var Struct, VersionedStruct, __hasProp = {}.hasOwnProperty, __extends = function (child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; Struct = __webpack_require__(1124); VersionedStruct = (function (_super) { __extends(VersionedStruct, _super); function VersionedStruct(type, versions) { this.type = type; this.versions = versions != null ? versions : {}; if (typeof this.type === "string") { this.versionGetter = new Function( "parent", "return parent." + this.type ); this.versionSetter = new Function( "parent", "version", "return parent." + this.type + " = version" ); } } VersionedStruct.prototype.decode = function ( stream, parent, length ) { var fields, res, _ref; if (length == null) { length = 0; } res = this._setup(stream, parent, length); if (typeof this.type === "string") { res.version = this.versionGetter(parent); } else { res.version = this.type.decode(stream); } if (this.versions.header) { this._parseFields( stream, res, this.versions.header ); } 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 ((_ref = this.process) != null) { _ref.call(res, stream); } return res; }; VersionedStruct.prototype.size = function ( val, parent, includePointers ) { var ctx, fields, key, size, type, _ref; if (includePointers == null) { includePointers = true; } if (!val) { throw new Error("Not a fixed size"); } ctx = { parent: parent, val: val, pointerSize: 0, }; size = 0; if (typeof this.type !== "string") { size += this.type.size(val.version, ctx); } if (this.versions.header) { _ref = this.versions.header; for (key in _ref) { type = _ref[key]; if (type.size != null) { size += type.size(val[key], ctx); } } } 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; }; VersionedStruct.prototype.encode = function ( stream, val, parent ) { var ctx, fields, i, key, ptr, type, _ref, _ref1; if ((_ref = this.preEncode) != null) { _ref.call(val, stream); } 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) { _ref1 = this.versions.header; for (key in _ref1) { type = _ref1[key]; if (type.encode != null) { type.encode(stream, val[key], ctx); } } } fields = this.versions[val.version]; for (key in fields) { type = fields[key]; if (type.encode != null) { type.encode(stream, val[key], ctx); } } i = 0; while (i < ctx.pointers.length) { ptr = ctx.pointers[i++]; ptr.type.encode(stream, ptr.val, ptr.parent); } }; return VersionedStruct; })(Struct); module.exports = VersionedStruct; }.call(this)); /***/ }, /***/ 2022: /***/ function ( __unused_webpack_module, exports, __webpack_require__ ) { // Generated by CoffeeScript 1.7.1 (function () { var NumberT, PropertyDescriptor; NumberT = __webpack_require__(3660).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; }; PropertyDescriptor = (function () { function PropertyDescriptor(opts) { var key, val; if (opts == null) { opts = {}; } this.enumerable = true; this.configurable = true; for (key in opts) { val = opts[key]; this[key] = val; } } return PropertyDescriptor; })(); exports.PropertyDescriptor = PropertyDescriptor; }.call(this)); /***/ }, /***/ 6851: /***/ function ( module, __unused_webpack_exports, __webpack_require__ ) { "use strict"; var isArrayish = __webpack_require__(5171); var concat = Array.prototype.concat; var slice = Array.prototype.slice; var swizzle = (module.exports = function swizzle(args) { var results = []; for (var i = 0, len = args.length; i < len; i++) { var arg = args[i]; if (isArrayish(arg)) { // http://jsperf.com/javascript-array-concat-vs-push/98 results = concat.call(results, slice.call(arg)); } else { results.push(arg); } } return results; }); swizzle.wrap = function (fn) { return function () { return fn(swizzle(arguments)); }; }; /***/ }, /***/ 311: /***/ function (module) { var TINF_OK = 0; var TINF_DATA_ERROR = -3; function Tree() { this.table = new Uint16Array( 16 ); /* table of code length counts */ this.trans = new Uint16Array( 288 ); /* code -> symbol translation table */ } function Data(source, dest) { this.source = source; this.sourceIndex = 0; this.tag = 0; this.bitcount = 0; this.dest = dest; this.destLen = 0; this.ltree = new Tree(); /* dynamic length/symbol tree */ this.dtree = new Tree(); /* dynamic distance tree */ } /* --------------------------------------------------- * * -- uninitialized global data (static structures) -- * * --------------------------------------------------- */ var sltree = new Tree(); var sdtree = new Tree(); /* extra bits and base tables for length codes */ var length_bits = new Uint8Array(30); var length_base = new Uint16Array(30); /* extra bits and base tables for distance codes */ var dist_bits = new Uint8Array(30); var dist_base = new Uint16Array(30); /* special ordering of code length codes */ var clcidx = new Uint8Array([ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15, ]); /* used by tinf_decode_trees, avoids allocations every call */ var code_tree = new Tree(); var lengths = new Uint8Array(288 + 32); /* ----------------------- * * -- utility functions -- * * ----------------------- */ /* build extra bits and base tables */ function tinf_build_bits_base(bits, base, delta, first) { var i, sum; /* build bits table */ for (i = 0; i < delta; ++i) bits[i] = 0; for (i = 0; i < 30 - delta; ++i) bits[i + delta] = (i / delta) | 0; /* build base table */ for (sum = first, i = 0; i < 30; ++i) { base[i] = sum; sum += 1 << bits[i]; } } /* build the fixed huffman trees */ function tinf_build_fixed_trees(lt, dt) { var i; /* build fixed length tree */ for (i = 0; i < 7; ++i) lt.table[i] = 0; lt.table[7] = 24; lt.table[8] = 152; lt.table[9] = 112; for (i = 0; i < 24; ++i) lt.trans[i] = 256 + i; for (i = 0; i < 144; ++i) lt.trans[24 + i] = i; for (i = 0; i < 8; ++i) lt.trans[24 + 144 + i] = 280 + i; for (i = 0; i < 112; ++i) lt.trans[24 + 144 + 8 + i] = 144 + i; /* build fixed distance tree */ for (i = 0; i < 5; ++i) dt.table[i] = 0; dt.table[5] = 32; for (i = 0; i < 32; ++i) dt.trans[i] = i; } /* given an array of code lengths, build a tree */ var offs = new Uint16Array(16); function tinf_build_tree(t, lengths, off, num) { var i, sum; /* clear code length count table */ for (i = 0; i < 16; ++i) t.table[i] = 0; /* scan symbol lengths, and sum code length counts */ for (i = 0; i < num; ++i) t.table[lengths[off + i]]++; t.table[0] = 0; /* compute offset table for distribution sort */ for (sum = 0, i = 0; i < 16; ++i) { offs[i] = sum; sum += t.table[i]; } /* create code->symbol translation table (symbols sorted by code) */ for (i = 0; i < num; ++i) { if (lengths[off + i]) t.trans[offs[lengths[off + i]]++] = i; } } /* ---------------------- * * -- decode functions -- * * ---------------------- */ /* get one bit from source stream */ function tinf_getbit(d) { /* check if tag is empty */ if (!d.bitcount--) { /* load next tag */ d.tag = d.source[d.sourceIndex++]; d.bitcount = 7; } /* shift bit out of tag */ var bit = d.tag & 1; d.tag >>>= 1; return bit; } /* read a num bit value from a stream and add base */ function tinf_read_bits(d, num, base) { if (!num) return base; while (d.bitcount < 24) { d.tag |= d.source[d.sourceIndex++] << d.bitcount; d.bitcount += 8; } var val = d.tag & (0xffff >>> (16 - num)); d.tag >>>= num; d.bitcount -= num; return val + base; } /* given a data stream and a tree, decode a symbol */ function tinf_decode_symbol(d, t) { while (d.bitcount < 24) { d.tag |= d.source[d.sourceIndex++] << d.bitcount; d.bitcount += 8; } var sum = 0, cur = 0, len = 0; var tag = d.tag; /* get more bits while code value is above sum */ do { cur = 2 * cur + (tag & 1); tag >>>= 1; ++len; sum += t.table[len]; cur -= t.table[len]; } while (cur >= 0); d.tag = tag; d.bitcount -= len; return t.trans[sum + cur]; } /* given a data stream, decode dynamic trees from it */ function tinf_decode_trees(d, lt, dt) { var hlit, hdist, hclen; var i, num, length; /* get 5 bits HLIT (257-286) */ hlit = tinf_read_bits(d, 5, 257); /* get 5 bits HDIST (1-32) */ hdist = tinf_read_bits(d, 5, 1); /* get 4 bits HCLEN (4-19) */ hclen = tinf_read_bits(d, 4, 4); for (i = 0; i < 19; ++i) lengths[i] = 0; /* read code lengths for code length alphabet */ for (i = 0; i < hclen; ++i) { /* get 3 bits code length (0-7) */ var clen = tinf_read_bits(d, 3, 0); lengths[clcidx[i]] = clen; } /* build code length tree */ tinf_build_tree(code_tree, lengths, 0, 19); /* decode code lengths for the dynamic trees */ for (num = 0; num < hlit + hdist; ) { var sym = tinf_decode_symbol(d, code_tree); switch (sym) { case 16: /* copy previous code length 3-6 times (read 2 bits) */ var prev = lengths[num - 1]; for ( length = tinf_read_bits(d, 2, 3); length; --length ) { lengths[num++] = prev; } break; case 17: /* repeat code length 0 for 3-10 times (read 3 bits) */ for ( length = tinf_read_bits(d, 3, 3); length; --length ) { lengths[num++] = 0; } break; case 18: /* repeat code length 0 for 11-138 times (read 7 bits) */ for ( length = tinf_read_bits(d, 7, 11); length; --length ) { lengths[num++] = 0; } break; default: /* values 0-15 represent the actual code lengths */ lengths[num++] = sym; break; } } /* build dynamic trees */ tinf_build_tree(lt, lengths, 0, hlit); tinf_build_tree(dt, lengths, hlit, hdist); } /* ----------------------------- * * -- block inflate functions -- * * ----------------------------- */ /* given a stream and two trees, inflate a block of data */ function tinf_inflate_block_data(d, lt, dt) { while (1) { var sym = tinf_decode_symbol(d, lt); /* check for end of block */ if (sym === 256) { return TINF_OK; } if (sym < 256) { d.dest[d.destLen++] = sym; } else { var length, dist, offs; var i; sym -= 257; /* possibly get more bits from length code */ length = tinf_read_bits( d, length_bits[sym], length_base[sym] ); dist = tinf_decode_symbol(d, dt); /* possibly get more bits from distance code */ offs = d.destLen - tinf_read_bits(d, dist_bits[dist], dist_base[dist]); /* copy match */ for (i = offs; i < offs + length; ++i) { d.dest[d.destLen++] = d.dest[i]; } } } } /* inflate an uncompressed block of data */ function tinf_inflate_uncompressed_block(d) { var length, invlength; var i; /* unread from bitbuffer */ while (d.bitcount > 8) { d.sourceIndex--; d.bitcount -= 8; } /* get length */ length = d.source[d.sourceIndex + 1]; length = 256 * length + d.source[d.sourceIndex]; /* get one's complement of length */ invlength = d.source[d.sourceIndex + 3]; invlength = 256 * invlength + d.source[d.sourceIndex + 2]; /* check length */ if (length !== (~invlength & 0x0000ffff)) return TINF_DATA_ERROR; d.sourceIndex += 4; /* copy block */ for (i = length; i; --i) d.dest[d.destLen++] = d.source[d.sourceIndex++]; /* make sure we start next block on a byte boundary */ d.bitcount = 0; return TINF_OK; } /* inflate stream from source to dest */ function tinf_uncompress(source, dest) { var d = new Data(source, dest); var bfinal, btype, res; do { /* read final block flag */ bfinal = tinf_getbit(d); /* read block type (2 bits) */ btype = tinf_read_bits(d, 2, 0); /* decompress block */ switch (btype) { case 0: /* decompress uncompressed block */ res = tinf_inflate_uncompressed_block(d); break; case 1: /* decompress block with fixed huffman trees */ res = tinf_inflate_block_data(d, sltree, sdtree); break; case 2: /* decompress block with dynamic huffman trees */ tinf_decode_trees(d, d.ltree, d.dtree); res = tinf_inflate_block_data(d, d.ltree, d.dtree); break; default: res = TINF_DATA_ERROR; } if (res !== TINF_OK) throw new Error("Data error"); } while (!bfinal); if (d.destLen < d.dest.length) { if (typeof d.dest.slice === "function") return d.dest.slice(0, d.destLen); else return d.dest.subarray(0, d.destLen); } return d.dest; } /* -------------------- * * -- initialization -- * * -------------------- */ /* build fixed huffman trees */ tinf_build_fixed_trees(sltree, sdtree); /* build extra bits and base tables */ tinf_build_bits_base(length_bits, length_base, 4, 3); tinf_build_bits_base(dist_bits, dist_base, 2, 1); /* fix a special case */ length_bits[28] = 0; length_base[28] = 258; module.exports = tinf_uncompress; /***/ }, /***/ 7055: /***/ function ( module, __unused_webpack_exports, __webpack_require__ ) { // Generated by CoffeeScript 1.7.1 var UnicodeTrie, inflate; inflate = __webpack_require__(311); UnicodeTrie = (function () { var DATA_BLOCK_LENGTH, DATA_GRANULARITY, DATA_MASK, INDEX_1_OFFSET, INDEX_2_BLOCK_LENGTH, INDEX_2_BMP_LENGTH, INDEX_2_MASK, INDEX_SHIFT, LSCP_INDEX_2_LENGTH, LSCP_INDEX_2_OFFSET, OMITTED_BMP_INDEX_1_LENGTH, SHIFT_1, SHIFT_1_2, SHIFT_2, UTF8_2B_INDEX_2_LENGTH, UTF8_2B_INDEX_2_OFFSET; SHIFT_1 = 6 + 5; SHIFT_2 = 5; SHIFT_1_2 = SHIFT_1 - SHIFT_2; OMITTED_BMP_INDEX_1_LENGTH = 0x10000 >> SHIFT_1; INDEX_2_BLOCK_LENGTH = 1 << SHIFT_1_2; INDEX_2_MASK = INDEX_2_BLOCK_LENGTH - 1; INDEX_SHIFT = 2; DATA_BLOCK_LENGTH = 1 << SHIFT_2; DATA_MASK = DATA_BLOCK_LENGTH - 1; LSCP_INDEX_2_OFFSET = 0x10000 >> SHIFT_2; LSCP_INDEX_2_LENGTH = 0x400 >> SHIFT_2; INDEX_2_BMP_LENGTH = LSCP_INDEX_2_OFFSET + LSCP_INDEX_2_LENGTH; UTF8_2B_INDEX_2_OFFSET = INDEX_2_BMP_LENGTH; UTF8_2B_INDEX_2_LENGTH = 0x800 >> 6; INDEX_1_OFFSET = UTF8_2B_INDEX_2_OFFSET + UTF8_2B_INDEX_2_LENGTH; DATA_GRANULARITY = 1 << INDEX_SHIFT; function UnicodeTrie(data) { var isBuffer, uncompressedLength, view; isBuffer = typeof data.readUInt32BE === "function" && typeof data.slice === "function"; if (isBuffer || data instanceof Uint8Array) { if (isBuffer) { this.highStart = data.readUInt32BE(0); this.errorValue = data.readUInt32BE(4); uncompressedLength = data.readUInt32BE(8); data = data.slice(12); } else { view = new DataView(data.buffer); this.highStart = view.getUint32(0); this.errorValue = view.getUint32(4); uncompressedLength = view.getUint32(8); data = data.subarray(12); } data = inflate( data, new Uint8Array(uncompressedLength) ); data = inflate( data, new Uint8Array(uncompressedLength) ); this.data = new Uint32Array(data.buffer); } else { (this.data = data.data), (this.highStart = data.highStart), (this.errorValue = data.errorValue); } } UnicodeTrie.prototype.get = function (codePoint) { var index; if (codePoint < 0 || codePoint > 0x10ffff) { return this.errorValue; } if ( codePoint < 0xd800 || (codePoint > 0xdbff && codePoint <= 0xffff) ) { index = (this.data[codePoint >> SHIFT_2] << INDEX_SHIFT) + (codePoint & DATA_MASK); return this.data[index]; } if (codePoint <= 0xffff) { index = (this.data[ LSCP_INDEX_2_OFFSET + ((codePoint - 0xd800) >> SHIFT_2) ] << INDEX_SHIFT) + (codePoint & DATA_MASK); return this.data[index]; } if (codePoint < this.highStart) { 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; /***/ }, /***/ 3229: /***/ function ( __unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__ ) { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Z: function () { return /* binding */ _applyDecoratedDescriptor; }, /* harmony export */ }); function _applyDecoratedDescriptor( target, property, decorators, descriptor, context ) { var desc = {}; Object.keys(descriptor).forEach(function (key) { desc[key] = descriptor[key]; }); desc.enumerable = !!desc.enumerable; desc.configurable = !!desc.configurable; if ("value" in desc || desc.initializer) { desc.writable = true; } desc = decorators .slice() .reverse() .reduce(function (desc, decorator) { return decorator(target, property, desc) || desc; }, desc); if (context && desc.initializer !== void 0) { desc.value = desc.initializer ? desc.initializer.call(context) : void 0; desc.initializer = undefined; } if (desc.initializer === void 0) { Object.defineProperty(target, property, desc); desc = null; } return desc; } /***/ }, /***/ 7326: /***/ function ( __unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__ ) { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Z: function () { return /* binding */ _assertThisInitialized; }, /* harmony export */ }); function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError( "this hasn't been initialised - super() hasn't been called" ); } return self; } /***/ }, /***/ 3144: /***/ function ( __unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__ ) { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Z: function () { return /* binding */ _createClass; }, /* harmony export */ }); 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); Object.defineProperty(Constructor, "prototype", { writable: false, }); return Constructor; } /***/ }, /***/ 7855: /***/ function ( __unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__ ) { "use strict"; // EXPORTS __webpack_require__.d(__webpack_exports__, { Z: function () { return /* binding */ _createForOfIteratorHelperLoose; }, }); // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js 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; } // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/unsupportedIterableToArray.js 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); } // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/createForOfIteratorHelperLoose.js 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." ); } /***/ }, /***/ 7462: /***/ function ( __unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__ ) { "use strict"; /* harmony export */ __webpack_require__.d(__webpack_exports__, { /* harmony export */ Z: function () { return /* binding */ _extends; }, /* harmony export */ }); function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if ( Object.prototype.hasOwnProperty.call( source, key ) ) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } /***/ }, /***/ 5068: /***/ function ( __unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__ ) { "use strict"; // EXPORTS __webpack_require__.d(__webpack_exports__, { Z: function () { return /* binding */ _inheritsLoose; }, }); // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); } // CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js function _inheritsLoose(subClass, superClass) { subClass.prototype = Object.create(superClass.prototype); subClass.prototype.constructor = subClass; _setPrototypeOf(subClass, superClass); } /***/ }, }, ]);